From 7d2908b365c5a3b879d8cba7e174687ef7a20424 Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Mon, 6 Jun 2022 19:45:52 -0500 Subject: [PATCH] No more GRX. Color bits working but colors wrong in SDL. --- buildPrerequisites.sh | 123 - client/client.pro | 22 +- client/src/gui/font.c | 32 +- client/src/gui/font.h | 2 +- client/src/gui/gui.c | 20 +- client/src/gui/image.c | 11 +- client/src/gui/image.h | 2 +- client/src/gui/surface.c | 301 + client/src/gui/surface.h | 64 + client/src/gui/wmwindow.c | 96 +- client/src/platform/djgpp.h | 28 +- client/src/platform/grx.c | 107 - client/src/platform/grx.h | 57 - client/src/platform/platform.h | 4 - client/src/platform/sdl2.c | 291 +- client/src/platform/sdl2.h | 35 +- makedefs.grx | 261 - thirdparty/grx249/Makefile | 1 - thirdparty/grx249/addons/bmp/bmp.c | 669 - thirdparty/grx249/addons/bmp/bmp.hlp | 190 - thirdparty/grx249/addons/bmp/bmptest.c | 30 - thirdparty/grx249/addons/bmp/grxbmp.h | 78 - thirdparty/grx249/addons/ctx2tiff.c | 210 - thirdparty/grx249/addons/print/copying.uz | 64 - thirdparty/grx249/addons/print/grxprint.c | 1272 -- thirdparty/grx249/addons/print/grxprint.h | 133 - thirdparty/grx249/addons/print/grxprint.lo | Bin 12640 -> 0 bytes thirdparty/grx249/addons/print/grxprint.txt | 109 - thirdparty/grx249/addons/print/grxprn00.h | 221 - thirdparty/grx249/addons/print/printer.doc | 1047 - thirdparty/grx249/addons/print/printest.c | 78 - thirdparty/grx249/addons/print/prndata.c | 1655 -- thirdparty/grx249/addons/print/prndata.lo | Bin 7644 -> 0 bytes thirdparty/grx249/addons/print/readme.txt | 45 - thirdparty/grx249/addons/print/readme.uz | 47 - thirdparty/grx249/chr/addfonts.bat | 32 - thirdparty/grx249/chr/addfonts.sh | 21 - thirdparty/grx249/chr/addfonts.x11 | 21 - thirdparty/grx249/compat/grx.h | 64 - thirdparty/grx249/compat/mousex.h | 88 - thirdparty/grx249/configure | 403 - thirdparty/grx249/copying | 339 - thirdparty/grx249/copying.grx | 53 - thirdparty/grx249/copying.lib | 481 - thirdparty/grx249/copying.mit | 96 - thirdparty/grx249/doc/changes.bgi | 116 - thirdparty/grx249/doc/changes.txt | 728 - thirdparty/grx249/doc/copying.cb | 50 - thirdparty/grx249/doc/credits.doc | 123 - thirdparty/grx249/doc/fna.txt | 140 - thirdparty/grx249/doc/grx249um.html | 2470 --- thirdparty/grx249/doc/grx249um.inf | 2317 --- thirdparty/grx249/doc/old/api.doc | 1610 -- thirdparty/grx249/doc/old/install.doc | 511 - thirdparty/grx249/doc/old/internal.doc | 487 - thirdparty/grx249/doc/old/readme.20 | 104 - thirdparty/grx249/doc/old/readme.22 | 157 - thirdparty/grx249/doc/old/readme.23 | 120 - thirdparty/grx249/doc/old/tests.doc | 76 - thirdparty/grx249/doc/problems.htm | 80 - thirdparty/grx249/doc/readme.bgi | 326 - thirdparty/grx249/doc/tex/grx2.tex | 31 - thirdparty/grx249/doc/tex/grx2_0.tex | 2516 --- thirdparty/grx249/doc/tex/makinf.bat | 7 - thirdparty/grx249/doc/tex/readme | 2 - thirdparty/grx249/doc/watcom.txt | 53 - thirdparty/grx249/fonts/char11.fnt | 3 - thirdparty/grx249/fonts/char11b.fnt | 3 - thirdparty/grx249/fonts/char11bi.fnt | 3 - thirdparty/grx249/fonts/char11i.fnt | 3 - thirdparty/grx249/fonts/char14.fnt | 3 - thirdparty/grx249/fonts/char14b.fnt | 3 - thirdparty/grx249/fonts/char14bi.fnt | 3 - thirdparty/grx249/fonts/char14i.fnt | 3 - thirdparty/grx249/fonts/char16.fnt | 3 - thirdparty/grx249/fonts/char16b.fnt | 3 - thirdparty/grx249/fonts/char16bi.fnt | 3 - thirdparty/grx249/fonts/char16i.fnt | 3 - thirdparty/grx249/fonts/char18.fnt | 3 - thirdparty/grx249/fonts/char18b.fnt | 3 - thirdparty/grx249/fonts/char18bi.fnt | 3 - thirdparty/grx249/fonts/char18i.fnt | 3 - thirdparty/grx249/fonts/char23.fnt | 3 - thirdparty/grx249/fonts/char23b.fnt | 3 - thirdparty/grx249/fonts/char23bi.fnt | 3 - thirdparty/grx249/fonts/char23i.fnt | 3 - thirdparty/grx249/fonts/char30.fnt | 3 - thirdparty/grx249/fonts/char30b.fnt | 3 - thirdparty/grx249/fonts/char30bi.fnt | 3 - thirdparty/grx249/fonts/char30i.fnt | 3 - thirdparty/grx249/fonts/char40.fnt | 3 - thirdparty/grx249/fonts/char40b.fnt | 3 - thirdparty/grx249/fonts/char40bi.fnt | 3 - thirdparty/grx249/fonts/char40i.fnt | 3 - thirdparty/grx249/fonts/cour11.fnt | 3 - thirdparty/grx249/fonts/cour11b.fnt | 3 - thirdparty/grx249/fonts/cour11bi.fnt | 3 - thirdparty/grx249/fonts/cour11i.fnt | 3 - thirdparty/grx249/fonts/cour12.fnt | 3 - thirdparty/grx249/fonts/cour12b.fnt | 3 - thirdparty/grx249/fonts/cour12bi.fnt | 3 - thirdparty/grx249/fonts/cour12i.fnt | 3 - thirdparty/grx249/fonts/cour14.fnt | 3 - thirdparty/grx249/fonts/cour14b.fnt | 3 - thirdparty/grx249/fonts/cour14bi.fnt | 3 - thirdparty/grx249/fonts/cour14i.fnt | 3 - thirdparty/grx249/fonts/cour16.fnt | 3 - thirdparty/grx249/fonts/cour16b.fnt | 3 - thirdparty/grx249/fonts/cour16bi.fnt | 3 - thirdparty/grx249/fonts/cour16i.fnt | 3 - thirdparty/grx249/fonts/cour20.fnt | 3 - thirdparty/grx249/fonts/cour20b.fnt | 3 - thirdparty/grx249/fonts/cour20bi.fnt | 3 - thirdparty/grx249/fonts/cour20i.fnt | 3 - thirdparty/grx249/fonts/cour25.fnt | 3 - thirdparty/grx249/fonts/cour25b.fnt | 3 - thirdparty/grx249/fonts/cour25bi.fnt | 3 - thirdparty/grx249/fonts/cour25i.fnt | 3 - thirdparty/grx249/fonts/cour34.fnt | 3 - thirdparty/grx249/fonts/cour34b.fnt | 3 - thirdparty/grx249/fonts/cour34bi.fnt | 3 - thirdparty/grx249/fonts/cour34i.fnt | 3 - thirdparty/grx249/fonts/helv11.fnt | 3 - thirdparty/grx249/fonts/helv11b.fnt | 3 - thirdparty/grx249/fonts/helv11bi.fnt | 3 - thirdparty/grx249/fonts/helv11i.fnt | 3 - thirdparty/grx249/fonts/helv13.fnt | 3 - thirdparty/grx249/fonts/helv13b.fnt | 3 - thirdparty/grx249/fonts/helv13bi.fnt | 3 - thirdparty/grx249/fonts/helv13i.fnt | 3 - thirdparty/grx249/fonts/helv15.fnt | 3 - thirdparty/grx249/fonts/helv15b.fnt | 3 - thirdparty/grx249/fonts/helv15bi.fnt | 3 - thirdparty/grx249/fonts/helv15i.fnt | 3 - thirdparty/grx249/fonts/helv17.fnt | 3 - thirdparty/grx249/fonts/helv17b.fnt | 3 - thirdparty/grx249/fonts/helv17bi.fnt | 3 - thirdparty/grx249/fonts/helv17i.fnt | 3 - thirdparty/grx249/fonts/helv22.fnt | 3 - thirdparty/grx249/fonts/helv22b.fnt | 3 - thirdparty/grx249/fonts/helv22bi.fnt | 3 - thirdparty/grx249/fonts/helv22i.fnt | 3 - thirdparty/grx249/fonts/helv29.fnt | 3 - thirdparty/grx249/fonts/helv29b.fnt | 3 - thirdparty/grx249/fonts/helv29bi.fnt | 3 - thirdparty/grx249/fonts/helv29i.fnt | 3 - thirdparty/grx249/fonts/helv38.fnt | 3 - thirdparty/grx249/fonts/helv38b.fnt | 3 - thirdparty/grx249/fonts/helv38bi.fnt | 3 - thirdparty/grx249/fonts/helv38i.fnt | 3 - thirdparty/grx249/fonts/lucb11.fnt | 3 - thirdparty/grx249/fonts/lucb11b.fnt | 3 - thirdparty/grx249/fonts/lucb11bi.fnt | 3 - thirdparty/grx249/fonts/lucb11i.fnt | 3 - thirdparty/grx249/fonts/lucb12.fnt | 3 - thirdparty/grx249/fonts/lucb12b.fnt | 3 - thirdparty/grx249/fonts/lucb12bi.fnt | 3 - thirdparty/grx249/fonts/lucb12i.fnt | 3 - thirdparty/grx249/fonts/lucb15.fnt | 3 - thirdparty/grx249/fonts/lucb15b.fnt | 3 - thirdparty/grx249/fonts/lucb15bi.fnt | 3 - thirdparty/grx249/fonts/lucb15i.fnt | 3 - thirdparty/grx249/fonts/lucb17.fnt | 3 - thirdparty/grx249/fonts/lucb17b.fnt | 3 - thirdparty/grx249/fonts/lucb17bi.fnt | 3 - thirdparty/grx249/fonts/lucb17i.fnt | 3 - thirdparty/grx249/fonts/lucb21.fnt | 3 - thirdparty/grx249/fonts/lucb21b.fnt | 3 - thirdparty/grx249/fonts/lucb21bi.fnt | 3 - thirdparty/grx249/fonts/lucb21i.fnt | 3 - thirdparty/grx249/fonts/lucb27.fnt | 3 - thirdparty/grx249/fonts/lucb27b.fnt | 3 - thirdparty/grx249/fonts/lucb27bi.fnt | 3 - thirdparty/grx249/fonts/lucb27i.fnt | 3 - thirdparty/grx249/fonts/lucb40.fnt | 3 - thirdparty/grx249/fonts/lucb40b.fnt | 3 - thirdparty/grx249/fonts/lucb40bi.fnt | 3 - thirdparty/grx249/fonts/lucb40i.fnt | 3 - thirdparty/grx249/fonts/lucs11.fnt | 3 - thirdparty/grx249/fonts/lucs11b.fnt | 3 - thirdparty/grx249/fonts/lucs11bi.fnt | 3 - thirdparty/grx249/fonts/lucs11i.fnt | 3 - thirdparty/grx249/fonts/lucs12.fnt | 3 - thirdparty/grx249/fonts/lucs12b.fnt | 3 - thirdparty/grx249/fonts/lucs12bi.fnt | 3 - thirdparty/grx249/fonts/lucs12i.fnt | 3 - thirdparty/grx249/fonts/lucs15.fnt | 3 - thirdparty/grx249/fonts/lucs15b.fnt | 3 - thirdparty/grx249/fonts/lucs15bi.fnt | 3 - thirdparty/grx249/fonts/lucs15i.fnt | 3 - thirdparty/grx249/fonts/lucs17.fnt | 3 - thirdparty/grx249/fonts/lucs17b.fnt | 3 - thirdparty/grx249/fonts/lucs17bi.fnt | 3 - thirdparty/grx249/fonts/lucs17i.fnt | 3 - thirdparty/grx249/fonts/lucs21.fnt | 3 - thirdparty/grx249/fonts/lucs21b.fnt | 3 - thirdparty/grx249/fonts/lucs21bi.fnt | 3 - thirdparty/grx249/fonts/lucs21i.fnt | 3 - thirdparty/grx249/fonts/lucs27.fnt | 3 - thirdparty/grx249/fonts/lucs27b.fnt | 3 - thirdparty/grx249/fonts/lucs27bi.fnt | 3 - thirdparty/grx249/fonts/lucs27i.fnt | 3 - thirdparty/grx249/fonts/lucs40.fnt | 3 - thirdparty/grx249/fonts/lucs40b.fnt | 3 - thirdparty/grx249/fonts/lucs40bi.fnt | 3 - thirdparty/grx249/fonts/lucs40i.fnt | 3 - thirdparty/grx249/fonts/luct10.fnt | 3 - thirdparty/grx249/fonts/luct10b.fnt | 3 - thirdparty/grx249/fonts/luct11.fnt | 3 - thirdparty/grx249/fonts/luct11b.fnt | 3 - thirdparty/grx249/fonts/luct13.fnt | 3 - thirdparty/grx249/fonts/luct13b.fnt | 3 - thirdparty/grx249/fonts/luct15.fnt | 3 - thirdparty/grx249/fonts/luct15b.fnt | 3 - thirdparty/grx249/fonts/luct19.fnt | 3 - thirdparty/grx249/fonts/luct19b.fnt | 3 - thirdparty/grx249/fonts/luct27.fnt | 3 - thirdparty/grx249/fonts/luct27b.fnt | 3 - thirdparty/grx249/fonts/luct38.fnt | 3 - thirdparty/grx249/fonts/luct38b.fnt | 3 - thirdparty/grx249/fonts/ncen11.fnt | 3 - thirdparty/grx249/fonts/ncen11b.fnt | 3 - thirdparty/grx249/fonts/ncen11bi.fnt | 3 - thirdparty/grx249/fonts/ncen11i.fnt | 3 - thirdparty/grx249/fonts/ncen13.fnt | 3 - thirdparty/grx249/fonts/ncen13b.fnt | 3 - thirdparty/grx249/fonts/ncen13bi.fnt | 3 - thirdparty/grx249/fonts/ncen13i.fnt | 3 - thirdparty/grx249/fonts/ncen15.fnt | 3 - thirdparty/grx249/fonts/ncen15b.fnt | 3 - thirdparty/grx249/fonts/ncen15bi.fnt | 3 - thirdparty/grx249/fonts/ncen15i.fnt | 3 - thirdparty/grx249/fonts/ncen18.fnt | 3 - thirdparty/grx249/fonts/ncen18b.fnt | 3 - thirdparty/grx249/fonts/ncen18bi.fnt | 3 - thirdparty/grx249/fonts/ncen18i.fnt | 3 - thirdparty/grx249/fonts/ncen22.fnt | 3 - thirdparty/grx249/fonts/ncen22b.fnt | 3 - thirdparty/grx249/fonts/ncen22bi.fnt | 3 - thirdparty/grx249/fonts/ncen22i.fnt | 3 - thirdparty/grx249/fonts/ncen29.fnt | 3 - thirdparty/grx249/fonts/ncen29b.fnt | 3 - thirdparty/grx249/fonts/ncen29bi.fnt | 3 - thirdparty/grx249/fonts/ncen29i.fnt | 3 - thirdparty/grx249/fonts/ncen40.fnt | 3 - thirdparty/grx249/fonts/ncen40b.fnt | 3 - thirdparty/grx249/fonts/ncen40bi.fnt | 3 - thirdparty/grx249/fonts/ncen40i.fnt | 3 - thirdparty/grx249/fonts/pc6x14.fnt | 3 - thirdparty/grx249/fonts/pc6x8.fnt | 3 - thirdparty/grx249/fonts/pc8x14.fnt | 3 - thirdparty/grx249/fonts/pc8x14t.fnt | 3 - thirdparty/grx249/fonts/pc8x16.fnt | 3 - thirdparty/grx249/fonts/pc8x8.fnt | 3 - thirdparty/grx249/fonts/pc8x8t.fnt | 3 - thirdparty/grx249/fonts/symb11.fnt | 3 - thirdparty/grx249/fonts/symb14.fnt | 3 - thirdparty/grx249/fonts/symb16.fnt | 3 - thirdparty/grx249/fonts/symb20.fnt | 3 - thirdparty/grx249/fonts/symb25.fnt | 3 - thirdparty/grx249/fonts/symb32.fnt | 3 - thirdparty/grx249/fonts/symb34.fnt | 3 - thirdparty/grx249/fonts/ter-114b.res | Bin 4767 -> 0 bytes thirdparty/grx249/fonts/ter-114n.fna | 4104 ---- thirdparty/grx249/fonts/ter-114v.psf | Bin 4602 -> 0 bytes thirdparty/grx249/fonts/tms11.fnt | 3 - thirdparty/grx249/fonts/tms11b.fnt | 3 - thirdparty/grx249/fonts/tms11bi.fnt | 3 - thirdparty/grx249/fonts/tms11i.fnt | 3 - thirdparty/grx249/fonts/tms13.fnt | 3 - thirdparty/grx249/fonts/tms13b.fnt | 3 - thirdparty/grx249/fonts/tms13bi.fnt | 3 - thirdparty/grx249/fonts/tms13i.fnt | 3 - thirdparty/grx249/fonts/tms15.fnt | 3 - thirdparty/grx249/fonts/tms15b.fnt | 3 - thirdparty/grx249/fonts/tms15bi.fnt | 3 - thirdparty/grx249/fonts/tms15i.fnt | 3 - thirdparty/grx249/fonts/tms18.fnt | 3 - thirdparty/grx249/fonts/tms18b.fnt | 3 - thirdparty/grx249/fonts/tms18bi.fnt | 3 - thirdparty/grx249/fonts/tms18i.fnt | 3 - thirdparty/grx249/fonts/tms22.fnt | 3 - thirdparty/grx249/fonts/tms22b.fnt | 3 - thirdparty/grx249/fonts/tms22bi.fnt | 3 - thirdparty/grx249/fonts/tms22i.fnt | 3 - thirdparty/grx249/fonts/tms29.fnt | 3 - thirdparty/grx249/fonts/tms29b.fnt | 3 - thirdparty/grx249/fonts/tms29bi.fnt | 3 - thirdparty/grx249/fonts/tms29i.fnt | 3 - thirdparty/grx249/fonts/tms38.fnt | 3 - thirdparty/grx249/fonts/tms38b.fnt | 3 - thirdparty/grx249/fonts/tms38bi.fnt | 3 - thirdparty/grx249/fonts/tms38i.fnt | 3 - thirdparty/grx249/fonts/xfonts.dir | 255 - thirdparty/grx249/fonts/xm10x17.fnt | 3 - thirdparty/grx249/fonts/xm10x17b.fnt | 3 - thirdparty/grx249/fonts/xm10x20.fnt | 3 - thirdparty/grx249/fonts/xm10x20b.fnt | 3 - thirdparty/grx249/fonts/xm11x19b.fnt | 3 - thirdparty/grx249/fonts/xm12x15.fnt | 3 - thirdparty/grx249/fonts/xm12x20.fnt | 3 - thirdparty/grx249/fonts/xm12x20b.fnt | 3 - thirdparty/grx249/fonts/xm12x23.fnt | 3 - thirdparty/grx249/fonts/xm12x24.fnt | 3 - thirdparty/grx249/fonts/xm14x26.fnt | 3 - thirdparty/grx249/fonts/xm16x25.fnt | 3 - thirdparty/grx249/fonts/xm16x25b.fnt | 3 - thirdparty/grx249/fonts/xm16x25i.fnt | 3 - thirdparty/grx249/fonts/xm4x5.fnt | 3 - thirdparty/grx249/fonts/xm4x6.fnt | 3 - thirdparty/grx249/fonts/xm5x10.fnt | 3 - thirdparty/grx249/fonts/xm5x6.fnt | 3 - thirdparty/grx249/fonts/xm5x8.fnt | 3 - thirdparty/grx249/fonts/xm6x10.fnt | 3 - thirdparty/grx249/fonts/xm6x10b.fnt | 3 - thirdparty/grx249/fonts/xm6x12.fnt | 3 - thirdparty/grx249/fonts/xm6x12b.fnt | 3 - thirdparty/grx249/fonts/xm6x12i.fnt | 3 - thirdparty/grx249/fonts/xm6x13.fnt | 3 - thirdparty/grx249/fonts/xm6x13b.fnt | 3 - thirdparty/grx249/fonts/xm6x16.fnt | 3 - thirdparty/grx249/fonts/xm6x6.fnt | 3 - thirdparty/grx249/fonts/xm6x8.fnt | 3 - thirdparty/grx249/fonts/xm6x9.fnt | 3 - thirdparty/grx249/fonts/xm7x10.fnt | 3 - thirdparty/grx249/fonts/xm7x12.fnt | 3 - thirdparty/grx249/fonts/xm7x13.fnt | 3 - thirdparty/grx249/fonts/xm7x13b.fnt | 3 - thirdparty/grx249/fonts/xm7x14.fnt | 3 - thirdparty/grx249/fonts/xm7x17.fnt | 3 - thirdparty/grx249/fonts/xm7x8.fnt | 3 - thirdparty/grx249/fonts/xm8x10.fnt | 3 - thirdparty/grx249/fonts/xm8x10b.fnt | 3 - thirdparty/grx249/fonts/xm8x12.fnt | 3 - thirdparty/grx249/fonts/xm8x12b.fnt | 3 - thirdparty/grx249/fonts/xm8x13.fnt | 3 - thirdparty/grx249/fonts/xm8x13b.fnt | 3 - thirdparty/grx249/fonts/xm8x14.fnt | 3 - thirdparty/grx249/fonts/xm8x14b.fnt | 3 - thirdparty/grx249/fonts/xm8x15.fnt | 3 - thirdparty/grx249/fonts/xm8x15b.fnt | 3 - thirdparty/grx249/fonts/xm8x16.fnt | 3 - thirdparty/grx249/fonts/xm8x16b.fnt | 3 - thirdparty/grx249/fonts/xm8x16i.fnt | 3 - thirdparty/grx249/fonts/xm8x19.fnt | 3 - thirdparty/grx249/fonts/xm8x8.fnt | 3 - thirdparty/grx249/fonts/xm8x8b.fnt | 3 - thirdparty/grx249/fonts/xm8x8i.fnt | 3 - thirdparty/grx249/fonts/xm9x15.fnt | 3 - thirdparty/grx249/fonts/xm9x15b.fnt | 3 - thirdparty/grx249/fonts/xm9x17.fnt | 3 - thirdparty/grx249/include/bgiext.h | 43 - thirdparty/grx249/include/grdriver.h | 202 - thirdparty/grx249/include/grfontdv.h | 94 - thirdparty/grx249/include/grx20.h | 1678 -- thirdparty/grx249/include/grxkeys.h | 363 - thirdparty/grx249/include/libbcc.h | 865 - thirdparty/grx249/lib/bcc/readme | 10 - thirdparty/grx249/lib/dj2/readme | 6 - thirdparty/grx249/lib/unix/dummy | 1 - thirdparty/grx249/lib/watcom32/readme | 2 - thirdparty/grx249/lib/win32/dummy | 1 - thirdparty/grx249/makedefs.bcc | 18 - thirdparty/grx249/makedefs.grx | 261 - thirdparty/grx249/makedefs.orig | 261 - thirdparty/grx249/makefile.bcc | 35 - thirdparty/grx249/makefile.dj2 | 69 - thirdparty/grx249/makefile.lnx | 77 - thirdparty/grx249/makefile.sdl | 62 - thirdparty/grx249/makefile.w32 | 62 - thirdparty/grx249/makefile.wat | 105 - thirdparty/grx249/makefile.x11 | 69 - thirdparty/grx249/pascal/bgi/allmodes.pas | 84 - thirdparty/grx249/pascal/bgi/colors.pas | 108 - thirdparty/grx249/pascal/bgi/demo.pas | 547 - thirdparty/grx249/pascal/bgi/graph.pas | 659 - thirdparty/grx249/pascal/bgi/makefile.dj2 | 49 - thirdparty/grx249/pascal/bgi/makefile.lnx | 50 - thirdparty/grx249/pascal/bgi/makefile.sdl | 47 - thirdparty/grx249/pascal/bgi/makefile.w32 | 50 - thirdparty/grx249/pascal/bgi/makefile.x11 | 57 - thirdparty/grx249/pascal/bgi/modelist.pas | 47 - thirdparty/grx249/pascal/bgi/palette.pas | 35 - thirdparty/grx249/pascal/bgi/readme | 49 - thirdparty/grx249/pascal/bgi/small.pas | 15 - thirdparty/grx249/pascal/blt_test.pas | 59 - thirdparty/grx249/pascal/colortst.pas | 47 - thirdparty/grx249/pascal/grx.pas | 1485 -- thirdparty/grx249/pascal/imgview.pas | 139 - thirdparty/grx249/pascal/jpgtest.pas | 114 - thirdparty/grx249/pascal/keytest.pas | 46 - thirdparty/grx249/pascal/makefile | 50 - thirdparty/grx249/pascal/makefile.dj2 | 53 - thirdparty/grx249/pascal/makefile.lnx | 54 - thirdparty/grx249/pascal/makefile.sdl | 50 - thirdparty/grx249/pascal/makefile.w32 | 58 - thirdparty/grx249/pascal/makefile.x11 | 61 - thirdparty/grx249/pascal/modetest.pas | 32 - thirdparty/grx249/pascal/polytest.pas | 148 - thirdparty/grx249/pascal/readme | 51 - thirdparty/grx249/pascal/test.pas | 55 - thirdparty/grx249/pascal/txt_test.pas | 83 - thirdparty/grx249/pascal/vir_test.pas | 190 - thirdparty/grx249/readme | 351 - thirdparty/grx249/src/bgi/arc.c | 30 - thirdparty/grx249/src/bgi/arc.lo | Bin 1368 -> 0 bytes thirdparty/grx249/src/bgi/aspectra.c | 35 - thirdparty/grx249/src/bgi/aspectra.lo | Bin 1532 -> 0 bytes thirdparty/grx249/src/bgi/bar.c | 49 - thirdparty/grx249/src/bgi/bar.lo | Bin 2084 -> 0 bytes thirdparty/grx249/src/bgi/bar3d.c | 74 - thirdparty/grx249/src/bgi/bar3d.lo | Bin 3044 -> 0 bytes thirdparty/grx249/src/bgi/bccgrx.c | 476 - thirdparty/grx249/src/bgi/bccgrx.lo | Bin 15460 -> 0 bytes thirdparty/grx249/src/bgi/bccgrx00.h | 151 - thirdparty/grx249/src/bgi/bgiext01.c | 102 - thirdparty/grx249/src/bgi/bgiext01.lo | Bin 2256 -> 0 bytes thirdparty/grx249/src/bgi/bgiext02.c | 102 - thirdparty/grx249/src/bgi/bgiext02.lo | Bin 2252 -> 0 bytes thirdparty/grx249/src/bgi/bgimode.c | 155 - thirdparty/grx249/src/bgi/bgimode.lo | Bin 3600 -> 0 bytes thirdparty/grx249/src/bgi/bgiprint.c | 69 - thirdparty/grx249/src/bgi/bgiprint.lo | Bin 2440 -> 0 bytes thirdparty/grx249/src/bgi/circle.c | 35 - thirdparty/grx249/src/bgi/circle.lo | Bin 1936 -> 0 bytes thirdparty/grx249/src/bgi/clearvp.c | 33 - thirdparty/grx249/src/bgi/clearvp.lo | Bin 1836 -> 0 bytes thirdparty/grx249/src/bgi/closegra.c | 30 - thirdparty/grx249/src/bgi/closegra.lo | Bin 1344 -> 0 bytes thirdparty/grx249/src/bgi/clrdev.c | 34 - thirdparty/grx249/src/bgi/clrdev.lo | Bin 2152 -> 0 bytes thirdparty/grx249/src/bgi/detectg.c | 33 - thirdparty/grx249/src/bgi/detectg.lo | Bin 1472 -> 0 bytes thirdparty/grx249/src/bgi/drvname.c | 55 - thirdparty/grx249/src/bgi/drvname.lo | Bin 1908 -> 0 bytes thirdparty/grx249/src/bgi/egacolor.c | 91 - thirdparty/grx249/src/bgi/egacolor.lo | Bin 1972 -> 0 bytes thirdparty/grx249/src/bgi/ellipse.c | 73 - thirdparty/grx249/src/bgi/ellipse.lo | Bin 2672 -> 0 bytes thirdparty/grx249/src/bgi/errmsg.c | 49 - thirdparty/grx249/src/bgi/errmsg.lo | Bin 3332 -> 0 bytes thirdparty/grx249/src/bgi/fellipse.c | 53 - thirdparty/grx249/src/bgi/fellipse.lo | Bin 2284 -> 0 bytes thirdparty/grx249/src/bgi/fillpatb.c | 36 - thirdparty/grx249/src/bgi/fillpatb.lo | Bin 1616 -> 0 bytes thirdparty/grx249/src/bgi/fillpolb.c | 74 - thirdparty/grx249/src/bgi/fillpolb.lo | Bin 2256 -> 0 bytes thirdparty/grx249/src/bgi/fillstyl.c | 38 - thirdparty/grx249/src/bgi/fillstyl.lo | Bin 1640 -> 0 bytes thirdparty/grx249/src/bgi/fldfill.c | 305 - thirdparty/grx249/src/bgi/fldfill.lo | Bin 9252 -> 0 bytes thirdparty/grx249/src/bgi/getbkcol.c | 29 - thirdparty/grx249/src/bgi/getbkcol.lo | Bin 1340 -> 0 bytes thirdparty/grx249/src/bgi/getcol.c | 30 - thirdparty/grx249/src/bgi/getcol.lo | Bin 1332 -> 0 bytes thirdparty/grx249/src/bgi/getdefpa.c | 30 - thirdparty/grx249/src/bgi/getdefpa.lo | Bin 1344 -> 0 bytes thirdparty/grx249/src/bgi/getfillp.c | 30 - thirdparty/grx249/src/bgi/getfillp.lo | Bin 1368 -> 0 bytes thirdparty/grx249/src/bgi/getfills.c | 30 - thirdparty/grx249/src/bgi/getfills.lo | Bin 1360 -> 0 bytes thirdparty/grx249/src/bgi/getgramo.c | 30 - thirdparty/grx249/src/bgi/getgramo.lo | Bin 1444 -> 0 bytes thirdparty/grx249/src/bgi/getimage.c | 58 - thirdparty/grx249/src/bgi/getimage.lo | Bin 2532 -> 0 bytes thirdparty/grx249/src/bgi/getmaxmo.c | 29 - thirdparty/grx249/src/bgi/getmaxmo.lo | Bin 1408 -> 0 bytes thirdparty/grx249/src/bgi/getmoran.c | 30 - thirdparty/grx249/src/bgi/getmoran.lo | Bin 1428 -> 0 bytes thirdparty/grx249/src/bgi/getpixel.c | 30 - thirdparty/grx249/src/bgi/getpixel.lo | Bin 1624 -> 0 bytes thirdparty/grx249/src/bgi/getviewp.c | 36 - thirdparty/grx249/src/bgi/getviewp.lo | Bin 1616 -> 0 bytes thirdparty/grx249/src/bgi/getx.c | 29 - thirdparty/grx249/src/bgi/getx.lo | Bin 1324 -> 0 bytes thirdparty/grx249/src/bgi/gety.c | 30 - thirdparty/grx249/src/bgi/gety.lo | Bin 1324 -> 0 bytes thirdparty/grx249/src/bgi/gmaxcol.c | 30 - thirdparty/grx249/src/bgi/gmaxcol.lo | Bin 1444 -> 0 bytes thirdparty/grx249/src/bgi/gmmaxcol.c | 43 - thirdparty/grx249/src/bgi/gmmaxcol.lo | Bin 1632 -> 0 bytes thirdparty/grx249/src/bgi/gmmaxx.c | 36 - thirdparty/grx249/src/bgi/gmmaxx.lo | Bin 1628 -> 0 bytes thirdparty/grx249/src/bgi/gmmaxy.c | 36 - thirdparty/grx249/src/bgi/gmmaxy.lo | Bin 1628 -> 0 bytes thirdparty/grx249/src/bgi/gpalsize.c | 31 - thirdparty/grx249/src/bgi/gpalsize.lo | Bin 1416 -> 0 bytes thirdparty/grx249/src/bgi/graphres.c | 31 - thirdparty/grx249/src/bgi/graphres.lo | Bin 1420 -> 0 bytes thirdparty/grx249/src/bgi/imagesze.c | 41 - thirdparty/grx249/src/bgi/imagesze.lo | Bin 1624 -> 0 bytes thirdparty/grx249/src/bgi/instbgid.c | 30 - thirdparty/grx249/src/bgi/instbgid.lo | Bin 980 -> 0 bytes thirdparty/grx249/src/bgi/lineb.c | 45 - thirdparty/grx249/src/bgi/lineb.lo | Bin 2188 -> 0 bytes thirdparty/grx249/src/bgi/linerel.c | 30 - thirdparty/grx249/src/bgi/linerel.lo | Bin 1456 -> 0 bytes thirdparty/grx249/src/bgi/lineto.c | 29 - thirdparty/grx249/src/bgi/lineto.lo | Bin 1448 -> 0 bytes thirdparty/grx249/src/bgi/linkall.c | 6 - thirdparty/grx249/src/bgi/lnestyle.c | 98 - thirdparty/grx249/src/bgi/lnestyle.lo | Bin 2572 -> 0 bytes thirdparty/grx249/src/bgi/modename.c | 59 - thirdparty/grx249/src/bgi/modename.lo | Bin 2496 -> 0 bytes thirdparty/grx249/src/bgi/moverel.c | 30 - thirdparty/grx249/src/bgi/moverel.lo | Bin 1376 -> 0 bytes thirdparty/grx249/src/bgi/moveto.c | 30 - thirdparty/grx249/src/bgi/moveto.lo | Bin 1372 -> 0 bytes thirdparty/grx249/src/bgi/page1.c | 34 - thirdparty/grx249/src/bgi/page1.lo | Bin 1340 -> 0 bytes thirdparty/grx249/src/bgi/page2.c | 32 - thirdparty/grx249/src/bgi/page2.lo | Bin 1356 -> 0 bytes thirdparty/grx249/src/bgi/page3.c | 37 - thirdparty/grx249/src/bgi/page3.lo | Bin 1704 -> 0 bytes thirdparty/grx249/src/bgi/page4.c | 34 - thirdparty/grx249/src/bgi/page4.lo | Bin 1448 -> 0 bytes thirdparty/grx249/src/bgi/page5.c | 39 - thirdparty/grx249/src/bgi/page5.lo | Bin 1976 -> 0 bytes thirdparty/grx249/src/bgi/page6.c | 35 - thirdparty/grx249/src/bgi/page6.lo | Bin 1452 -> 0 bytes thirdparty/grx249/src/bgi/palette.c | 86 - thirdparty/grx249/src/bgi/palette.lo | Bin 2188 -> 0 bytes thirdparty/grx249/src/bgi/pieslice.c | 30 - thirdparty/grx249/src/bgi/pieslice.lo | Bin 1380 -> 0 bytes thirdparty/grx249/src/bgi/polygonb.c | 67 - thirdparty/grx249/src/bgi/polygonb.lo | Bin 2488 -> 0 bytes thirdparty/grx249/src/bgi/putimage.c | 62 - thirdparty/grx249/src/bgi/putimage.lo | Bin 2576 -> 0 bytes thirdparty/grx249/src/bgi/putpixel.c | 30 - thirdparty/grx249/src/bgi/putpixel.lo | Bin 1624 -> 0 bytes thirdparty/grx249/src/bgi/rectang.c | 37 - thirdparty/grx249/src/bgi/rectang.lo | Bin 1956 -> 0 bytes thirdparty/grx249/src/bgi/regbgidr.c | 30 - thirdparty/grx249/src/bgi/regbgidr.lo | Bin 984 -> 0 bytes thirdparty/grx249/src/bgi/rgbpal_g.c | 84 - thirdparty/grx249/src/bgi/rgbpal_g.lo | Bin 1388 -> 0 bytes thirdparty/grx249/src/bgi/rgbpal_s.c | 36 - thirdparty/grx249/src/bgi/rgbpal_s.lo | Bin 1520 -> 0 bytes thirdparty/grx249/src/bgi/rstcrtmd.c | 30 - thirdparty/grx249/src/bgi/rstcrtmd.lo | Bin 1364 -> 0 bytes thirdparty/grx249/src/bgi/sector.c | 87 - thirdparty/grx249/src/bgi/sector.lo | Bin 2344 -> 0 bytes thirdparty/grx249/src/bgi/setbgiwh.c | 30 - thirdparty/grx249/src/bgi/setbgiwh.lo | Bin 1540 -> 0 bytes thirdparty/grx249/src/bgi/setbkcol.c | 30 - thirdparty/grx249/src/bgi/setbkcol.lo | Bin 1344 -> 0 bytes thirdparty/grx249/src/bgi/setbusze.c | 30 - thirdparty/grx249/src/bgi/setbusze.lo | Bin 980 -> 0 bytes thirdparty/grx249/src/bgi/setcolor.c | 30 - thirdparty/grx249/src/bgi/setcolor.lo | Bin 1340 -> 0 bytes thirdparty/grx249/src/bgi/setrgbc.c | 46 - thirdparty/grx249/src/bgi/setrgbc.lo | Bin 1448 -> 0 bytes thirdparty/grx249/src/bgi/setviewp.c | 46 - thirdparty/grx249/src/bgi/setviewp.lo | Bin 2144 -> 0 bytes thirdparty/grx249/src/bgi/setwrmod.c | 37 - thirdparty/grx249/src/bgi/setwrmod.lo | Bin 1420 -> 0 bytes thirdparty/grx249/src/bgi/text.c | 84 - thirdparty/grx249/src/bgi/text.h | 139 - thirdparty/grx249/src/bgi/text.lo | Bin 2668 -> 0 bytes thirdparty/grx249/src/bgi/text1.c | 115 - thirdparty/grx249/src/bgi/text1.lo | Bin 3096 -> 0 bytes thirdparty/grx249/src/bgi/text2.c | 56 - thirdparty/grx249/src/bgi/text2.lo | Bin 2208 -> 0 bytes thirdparty/grx249/src/bgi/text3.c | 50 - thirdparty/grx249/src/bgi/text3.lo | Bin 2276 -> 0 bytes thirdparty/grx249/src/bgi/text4.c | 128 - thirdparty/grx249/src/bgi/text4.lo | Bin 3932 -> 0 bytes thirdparty/grx249/src/bgi/text5.c | 61 - thirdparty/grx249/src/bgi/text5.lo | Bin 2016 -> 0 bytes thirdparty/grx249/src/bgi/text6.c | 36 - thirdparty/grx249/src/bgi/text6.lo | Bin 1536 -> 0 bytes thirdparty/grx249/src/bgi/text7.c | 65 - thirdparty/grx249/src/bgi/text7.lo | Bin 2820 -> 0 bytes thirdparty/grx249/src/bgi/text8.c | 33 - thirdparty/grx249/src/bgi/text8.lo | Bin 1572 -> 0 bytes thirdparty/grx249/src/bgi/text9.c | 34 - thirdparty/grx249/src/bgi/text9.lo | Bin 1528 -> 0 bytes thirdparty/grx249/src/bgi/texta.c | 98 - thirdparty/grx249/src/bgi/texta.lo | Bin 3760 -> 0 bytes thirdparty/grx249/src/bgi/textb.c | 41 - thirdparty/grx249/src/bgi/textb.lo | Bin 2028 -> 0 bytes thirdparty/grx249/src/bgi/textc.c | 64 - thirdparty/grx249/src/bgi/textc.lo | Bin 1228 -> 0 bytes thirdparty/grx249/src/bgi/textd.c | 75 - thirdparty/grx249/src/bgi/textd.lo | Bin 2248 -> 0 bytes thirdparty/grx249/src/bgi/txtlnest.c | 29 - thirdparty/grx249/src/bgi/txtlnest.lo | Bin 1352 -> 0 bytes thirdparty/grx249/src/depend.dj2 | 10 - thirdparty/grx249/src/depend.lnx | 4 - thirdparty/grx249/src/depend.x11 | 5 - thirdparty/grx249/src/draw/bitblt.c | 61 - thirdparty/grx249/src/draw/bitblt1b.c | 58 - thirdparty/grx249/src/draw/bitbltnc.c | 45 - thirdparty/grx249/src/draw/box.c | 57 - thirdparty/grx249/src/draw/boxnc.c | 53 - thirdparty/grx249/src/draw/clearclp.c | 25 - thirdparty/grx249/src/draw/clearctx.c | 37 - thirdparty/grx249/src/draw/clearscr.c | 28 - thirdparty/grx249/src/draw/drwinlne.c | 36 - thirdparty/grx249/src/draw/fillbox.c | 34 - thirdparty/grx249/src/draw/fillboxn.c | 32 - thirdparty/grx249/src/draw/flodspil.c | 121 - thirdparty/grx249/src/draw/frambox.c | 41 - thirdparty/grx249/src/draw/framboxn.c | 39 - thirdparty/grx249/src/draw/getscl.c | 51 - thirdparty/grx249/src/draw/line.c | 35 - thirdparty/grx249/src/draw/linenc.c | 32 - thirdparty/grx249/src/draw/majorln1.c | 33 - thirdparty/grx249/src/draw/majorln2.c | 33 - thirdparty/grx249/src/draw/majorln3.c | 31 - thirdparty/grx249/src/draw/majorln4.c | 33 - thirdparty/grx249/src/draw/pixel.c | 34 - thirdparty/grx249/src/draw/pixelc.c | 35 - thirdparty/grx249/src/draw/plot.c | 34 - thirdparty/grx249/src/draw/putscl.c | 45 - thirdparty/grx249/src/fdrivers/banked32.h | 173 - thirdparty/grx249/src/fdrivers/dotab8.c | 26 - thirdparty/grx249/src/fdrivers/driver16.h | 360 - thirdparty/grx249/src/fdrivers/driver24.h | 220 - thirdparty/grx249/src/fdrivers/driver32.h | 395 - thirdparty/grx249/src/fdrivers/driver8.h | 410 - thirdparty/grx249/src/fdrivers/ega4.c | 136 - thirdparty/grx249/src/fdrivers/egavga1.c | 462 - thirdparty/grx249/src/fdrivers/fd_xwin.c | 814 - thirdparty/grx249/src/fdrivers/fdw32_24.c | 196 - thirdparty/grx249/src/fdrivers/fdw32_8.c | 189 - thirdparty/grx249/src/fdrivers/ftable.c | 84 - thirdparty/grx249/src/fdrivers/genblit.c | 55 - .../grx249/src/fdrivers/generic/bitblt.c | 48 - .../grx249/src/fdrivers/generic/bitmap.c | 39 - .../grx249/src/fdrivers/generic/block.c | 26 - .../grx249/src/fdrivers/generic/getiscl.c | 48 - .../grx249/src/fdrivers/generic/hline.c | 26 - thirdparty/grx249/src/fdrivers/generic/line.c | 50 - .../grx249/src/fdrivers/generic/pattern.c | 32 - .../grx249/src/fdrivers/generic/putscl.c | 30 - .../grx249/src/fdrivers/generic/vline.c | 26 - thirdparty/grx249/src/fdrivers/gengiscl.c | 54 - thirdparty/grx249/src/fdrivers/genptscl.c | 38 - thirdparty/grx249/src/fdrivers/genstrch.c | 150 - thirdparty/grx249/src/fdrivers/herc1.c | 121 - thirdparty/grx249/src/fdrivers/lfb16.c | 63 - thirdparty/grx249/src/fdrivers/lfb24.c | 63 - thirdparty/grx249/src/fdrivers/lfb32h.c | 65 - thirdparty/grx249/src/fdrivers/lfb32l.c | 65 - thirdparty/grx249/src/fdrivers/lfb8.c | 63 - thirdparty/grx249/src/fdrivers/lfbbltrv.c | 46 - thirdparty/grx249/src/fdrivers/lfbbltvr.c | 46 - thirdparty/grx249/src/fdrivers/lfbbltvv.c | 49 - thirdparty/grx249/src/fdrivers/pblit_nb.h | 128 - thirdparty/grx249/src/fdrivers/pblitr2r.c | 54 - thirdparty/grx249/src/fdrivers/pblitr2v.c | 74 - thirdparty/grx249/src/fdrivers/pblitv2r.c | 72 - thirdparty/grx249/src/fdrivers/pblitv2v.c | 163 - thirdparty/grx249/src/fdrivers/ram1.c | 212 - thirdparty/grx249/src/fdrivers/ram16.c | 83 - thirdparty/grx249/src/fdrivers/ram24.c | 84 - thirdparty/grx249/src/fdrivers/ram32h.c | 86 - thirdparty/grx249/src/fdrivers/ram32l.c | 86 - thirdparty/grx249/src/fdrivers/ram3x8.c | 200 - thirdparty/grx249/src/fdrivers/ram4.c | 293 - thirdparty/grx249/src/fdrivers/ram8.c | 89 - thirdparty/grx249/src/fdrivers/rblit_14.c | 166 - thirdparty/grx249/src/fdrivers/rblit_14.h | 21 - thirdparty/grx249/src/fdrivers/sdl16.c | 65 - thirdparty/grx249/src/fdrivers/sdl24.c | 64 - thirdparty/grx249/src/fdrivers/sdl32h.c | 66 - thirdparty/grx249/src/fdrivers/sdl32l.c | 66 - thirdparty/grx249/src/fdrivers/sdl8.c | 62 - thirdparty/grx249/src/fdrivers/sdlframe.h | 99 - thirdparty/grx249/src/fdrivers/svga16.c | 435 - thirdparty/grx249/src/fdrivers/svga24.c | 406 - thirdparty/grx249/src/fdrivers/svga32h.c | 60 - thirdparty/grx249/src/fdrivers/svga32l.c | 59 - thirdparty/grx249/src/fdrivers/svga4.c | 624 - thirdparty/grx249/src/fdrivers/svga8.c | 459 - thirdparty/grx249/src/fdrivers/vga8x.c | 654 - thirdparty/grx249/src/fonts/fdtable.c | 33 - thirdparty/grx249/src/fonts/fdv_bgi.c | 352 - thirdparty/grx249/src/fonts/fdv_bgi.h | 102 - thirdparty/grx249/src/fonts/fdv_fna.c | 281 - thirdparty/grx249/src/fonts/fdv_grx.c | 204 - thirdparty/grx249/src/fonts/fdv_grx.h | 56 - thirdparty/grx249/src/fonts/fdv_raw.c | 222 - thirdparty/grx249/src/fonts/fdv_raw.h | 52 - thirdparty/grx249/src/fonts/fdv_win.c | 236 - thirdparty/grx249/src/fonts/fdv_win.h | 77 - thirdparty/grx249/src/fonts/fdv_xwin.c | 211 - thirdparty/grx249/src/fonts/pc6x8.c | 812 - thirdparty/grx249/src/fonts/pc8x14.c | 1067 - thirdparty/grx249/src/fonts/pc8x16.c | 1067 - thirdparty/grx249/src/fonts/pc8x8.c | 810 - thirdparty/grx249/src/gformats/ctx2jpg.c | 183 - thirdparty/grx249/src/gformats/ctx2png.c | 169 - thirdparty/grx249/src/gformats/ctx2pnm.c | 167 - thirdparty/grx249/src/gformats/dummyjpg.c | 66 - thirdparty/grx249/src/gformats/dummypng.c | 57 - thirdparty/grx249/src/gformats/jpg2ctx.c | 214 - thirdparty/grx249/src/gformats/png2ctx.c | 298 - thirdparty/grx249/src/gformats/pnm2ctx.c | 422 - thirdparty/grx249/src/image/ialloc.c | 57 - thirdparty/grx249/src/image/ibuild.c | 51 - thirdparty/grx249/src/image/ifbox.c | 77 - thirdparty/grx249/src/image/ihline.c | 56 - thirdparty/grx249/src/image/iinverse.c | 58 - thirdparty/grx249/src/image/image.h | 35 - thirdparty/grx249/src/image/imginlne.c | 44 - thirdparty/grx249/src/image/iplot.c | 39 - thirdparty/grx249/src/image/istretch.c | 35 - thirdparty/grx249/src/include/access24.h | 44 - thirdparty/grx249/src/include/allocate.h | 83 - thirdparty/grx249/src/include/arith.h | 237 - thirdparty/grx249/src/include/bcc/allocate.h | 42 - thirdparty/grx249/src/include/bcc/arith.h | 74 - thirdparty/grx249/src/include/bcc/asmsupp.h | 39 - thirdparty/grx249/src/include/bcc/highlow.h | 20 - thirdparty/grx249/src/include/bcc/memcopy.h | 232 - thirdparty/grx249/src/include/bcc/memfill.h | 114 - thirdparty/grx249/src/include/bcc/memmode.h | 25 - thirdparty/grx249/src/include/bcc/mempeek.h | 70 - thirdparty/grx249/src/include/clipping.h | 239 - thirdparty/grx249/src/include/docolor.h | 25 - thirdparty/grx249/src/include/gcc/arith.h | 86 - thirdparty/grx249/src/include/gcc/asmsupp.h | 13 - thirdparty/grx249/src/include/gcc/highlow.h | 56 - thirdparty/grx249/src/include/gcc/memcopy.h | 243 - thirdparty/grx249/src/include/gcc/memfill.h | 274 - thirdparty/grx249/src/include/gcc/memmode.h | 54 - thirdparty/grx249/src/include/gcc/mempeek.h | 117 - thirdparty/grx249/src/include/grxdebug.h | 59 - thirdparty/grx249/src/include/highlow.h | 33 - thirdparty/grx249/src/include/int86.h | 227 - thirdparty/grx249/src/include/ioport.h | 342 - thirdparty/grx249/src/include/libgrx.h | 338 - thirdparty/grx249/src/include/libsdl.h | 53 - thirdparty/grx249/src/include/libwin32.h | 54 - thirdparty/grx249/src/include/libxwin.h | 93 - thirdparty/grx249/src/include/memcopy.h | 1417 -- thirdparty/grx249/src/include/memfill.h | 944 - thirdparty/grx249/src/include/memmode.h | 45 - thirdparty/grx249/src/include/mempeek.h | 352 - thirdparty/grx249/src/include/ordswap.h | 30 - thirdparty/grx249/src/include/pblit.h | 78 - thirdparty/grx249/src/include/prex11r6.h | 40 - thirdparty/grx249/src/include/shapes.h | 75 - thirdparty/grx249/src/include/usercord.h | 35 - thirdparty/grx249/src/include/usrscale.h | 33 - thirdparty/grx249/src/include/vesa.h | 185 - thirdparty/grx249/src/include/vgaregs.h | 50 - .../grx249/src/include/watcom/memcopy.h | 5 - .../grx249/src/include/watcom/memfill.h | 321 - .../grx249/src/include/watcom/memmode.h | 81 - .../grx249/src/include/watcom/mempeek.h | 28 - thirdparty/grx249/src/makefile.bcc | 205 - thirdparty/grx249/src/makefile.dj2 | 343 - thirdparty/grx249/src/makefile.lnx | 284 - thirdparty/grx249/src/makefile.sdl | 223 - thirdparty/grx249/src/makefile.w32 | 303 - thirdparty/grx249/src/makefile.wat | 1188 -- thirdparty/grx249/src/makefile.x11 | 277 - thirdparty/grx249/src/misc/dosmisc.c | 33 - thirdparty/grx249/src/misc/lnxmisc.c | 33 - thirdparty/grx249/src/misc/sdlmisc.c | 34 - thirdparty/grx249/src/misc/w32misc.c | 35 - thirdparty/grx249/src/misc/x11misc.c | 39 - thirdparty/grx249/src/mouse/bldcurs.c | 65 - thirdparty/grx249/src/mouse/dosinput.c | 212 - thirdparty/grx249/src/mouse/doskeys.c | 121 - thirdparty/grx249/src/mouse/drawcurs.c | 156 - thirdparty/grx249/src/mouse/input.h | 181 - thirdparty/grx249/src/mouse/lnxinpu2.c | 600 - thirdparty/grx249/src/mouse/lnxinput.c | 526 - thirdparty/grx249/src/mouse/lnxkeys.c | 63 - thirdparty/grx249/src/mouse/mouinfo.c | 24 - thirdparty/grx249/src/mouse/mouinlne.c | 70 - thirdparty/grx249/src/mouse/mscursor.c | 289 - thirdparty/grx249/src/mouse/mstime.c | 27 - thirdparty/grx249/src/mouse/sdlinp.c | 324 - thirdparty/grx249/src/mouse/sdlinput.h | 189 - thirdparty/grx249/src/mouse/sdlkeys.c | 109 - thirdparty/grx249/src/mouse/w32inp.c | 391 - thirdparty/grx249/src/mouse/w32input.h | 171 - thirdparty/grx249/src/mouse/w32keys.c | 99 - thirdparty/grx249/src/mouse/xwininp.c | 791 - thirdparty/grx249/src/mouse/xwinkeys.c | 134 - thirdparty/grx249/src/pattern/fillpatt.c | 94 - thirdparty/grx249/src/pattern/makepat.c | 170 - thirdparty/grx249/src/pattern/patfbits.c | 99 - thirdparty/grx249/src/pattern/patfbox.c | 68 - thirdparty/grx249/src/pattern/patfcvxp.c | 33 - thirdparty/grx249/src/pattern/patfline.c | 107 - thirdparty/grx249/src/pattern/patfplot.c | 53 - thirdparty/grx249/src/pattern/patfpoly.c | 34 - thirdparty/grx249/src/pattern/patternf.c | 25 - thirdparty/grx249/src/pattern/pattfldf.c | 29 - thirdparty/grx249/src/pattern/pattline.c | 40 - thirdparty/grx249/src/pattern/pattpoly.c | 59 - thirdparty/grx249/src/pattern/pfcirc.c | 28 - thirdparty/grx249/src/pattern/pfcirca.c | 29 - thirdparty/grx249/src/pattern/pfelli.c | 32 - thirdparty/grx249/src/pattern/pfellia.c | 48 - thirdparty/grx249/src/pattern/ptcirc.c | 31 - thirdparty/grx249/src/pattern/ptcirca.c | 32 - thirdparty/grx249/src/pattern/ptelli.c | 45 - thirdparty/grx249/src/pattern/ptellia.c | 63 - thirdparty/grx249/src/setup/clip.c | 55 - thirdparty/grx249/src/setup/clrinfo.c | 55 - thirdparty/grx249/src/setup/clrinlne.c | 114 - thirdparty/grx249/src/setup/colorbw.c | 41 - thirdparty/grx249/src/setup/colorega.c | 48 - thirdparty/grx249/src/setup/colors.c | 368 - thirdparty/grx249/src/setup/context.c | 156 - thirdparty/grx249/src/setup/cxtinfo.c | 68 - thirdparty/grx249/src/setup/cxtinlne.c | 85 - thirdparty/grx249/src/setup/drvinfo.c | 138 - thirdparty/grx249/src/setup/drvinlne.c | 125 - thirdparty/grx249/src/setup/fframe.c | 37 - thirdparty/grx249/src/setup/fgeom.c | 50 - thirdparty/grx249/src/setup/hooks.c | 35 - thirdparty/grx249/src/setup/modewalk.c | 64 - thirdparty/grx249/src/setup/setdrvr.c | 133 - thirdparty/grx249/src/setup/setmode.c | 444 - thirdparty/grx249/src/setup/version.c | 26 - thirdparty/grx249/src/setup/viewport.c | 40 - thirdparty/grx249/src/shape/circle1.c | 27 - thirdparty/grx249/src/shape/circle2.c | 47 - thirdparty/grx249/src/shape/circle3.c | 25 - thirdparty/grx249/src/shape/circle4.c | 26 - thirdparty/grx249/src/shape/drawpoly.c | 64 - thirdparty/grx249/src/shape/fillcir1.c | 25 - thirdparty/grx249/src/shape/fillcir2.c | 26 - thirdparty/grx249/src/shape/fillcnvx.c | 27 - thirdparty/grx249/src/shape/fillell1.c | 27 - thirdparty/grx249/src/shape/fillell2.c | 42 - thirdparty/grx249/src/shape/fillpoly.c | 27 - thirdparty/grx249/src/shape/flood.c | 251 - thirdparty/grx249/src/shape/floodfil.c | 27 - thirdparty/grx249/src/shape/genellip.c | 152 - thirdparty/grx249/src/shape/polyedge.h | 62 - thirdparty/grx249/src/shape/polygon.c | 16 - thirdparty/grx249/src/shape/polyline.c | 16 - thirdparty/grx249/src/shape/scancnvx.c | 147 - thirdparty/grx249/src/shape/scanellp.c | 125 - thirdparty/grx249/src/shape/scanpoly.c | 223 - thirdparty/grx249/src/shape/solidfil.c | 42 - thirdparty/grx249/src/stdobjs.mak | 341 - thirdparty/grx249/src/text/buildaux.c | 112 - thirdparty/grx249/src/text/buildfnt.c | 352 - thirdparty/grx249/src/text/convfont.c | 52 - thirdparty/grx249/src/text/drawstrg.c | 135 - thirdparty/grx249/src/text/drawtext.c | 34 - thirdparty/grx249/src/text/drwstrg.c | 57 - thirdparty/grx249/src/text/dumpfna.c | 64 - thirdparty/grx249/src/text/dumpfont.c | 167 - thirdparty/grx249/src/text/dumptext.c | 156 - thirdparty/grx249/src/text/epatstrg.c | 40 - thirdparty/grx249/src/text/fntinlne.c | 95 - thirdparty/grx249/src/text/fontinfo.c | 26 - thirdparty/grx249/src/text/fontpath.c | 107 - thirdparty/grx249/src/text/loadfont.c | 138 - thirdparty/grx249/src/text/pattstrg.c | 62 - thirdparty/grx249/src/text/propwdt.c | 34 - thirdparty/grx249/src/text/text.h | 23 - thirdparty/grx249/src/text/unloadfn.c | 37 - thirdparty/grx249/src/user/ubox.c | 30 - thirdparty/grx249/src/user/ucbox.c | 30 - thirdparty/grx249/src/user/uccirc.c | 35 - thirdparty/grx249/src/user/uccirca.c | 35 - thirdparty/grx249/src/user/ucelli.c | 30 - thirdparty/grx249/src/user/ucellia.c | 29 - thirdparty/grx249/src/user/ucirc.c | 39 - thirdparty/grx249/src/user/ucirca.c | 34 - thirdparty/grx249/src/user/ucircf.c | 46 - thirdparty/grx249/src/user/ucircfa.c | 35 - thirdparty/grx249/src/user/ucline.c | 30 - thirdparty/grx249/src/user/ucpolyg.c | 41 - thirdparty/grx249/src/user/ucpolyl.c | 41 - thirdparty/grx249/src/user/udrwchar.c | 29 - thirdparty/grx249/src/user/udrwstrg.c | 28 - thirdparty/grx249/src/user/uelli.c | 33 - thirdparty/grx249/src/user/uellia.c | 29 - thirdparty/grx249/src/user/uellif.c | 33 - thirdparty/grx249/src/user/uellifa.c | 29 - thirdparty/grx249/src/user/ufcpolyg.c | 41 - thirdparty/grx249/src/user/ufillbox.c | 30 - thirdparty/grx249/src/user/uflood.c | 27 - thirdparty/grx249/src/user/ufpolyg.c | 41 - thirdparty/grx249/src/user/uframbox.c | 38 - thirdparty/grx249/src/user/ugetwin.c | 28 - thirdparty/grx249/src/user/uhline.c | 29 - thirdparty/grx249/src/user/uline.c | 30 - thirdparty/grx249/src/user/upbox.c | 29 - thirdparty/grx249/src/user/upcirc.c | 35 - thirdparty/grx249/src/user/upcirca.c | 36 - thirdparty/grx249/src/user/upelli.c | 29 - thirdparty/grx249/src/user/upellia.c | 30 - thirdparty/grx249/src/user/upfbox.c | 29 - thirdparty/grx249/src/user/upfcirc.c | 36 - thirdparty/grx249/src/user/upfcirca.c | 35 - thirdparty/grx249/src/user/upfcpoly.c | 41 - thirdparty/grx249/src/user/upfelli.c | 19 - thirdparty/grx249/src/user/upfellia.c | 29 - thirdparty/grx249/src/user/upfflood.c | 27 - thirdparty/grx249/src/user/upfline.c | 29 - thirdparty/grx249/src/user/upfplot.c | 27 - thirdparty/grx249/src/user/upfpolyg.c | 41 - thirdparty/grx249/src/user/upixel.c | 28 - thirdparty/grx249/src/user/upixelc.c | 28 - thirdparty/grx249/src/user/upline.c | 29 - thirdparty/grx249/src/user/uplot.c | 28 - thirdparty/grx249/src/user/upolygon.c | 41 - thirdparty/grx249/src/user/upolylin.c | 41 - thirdparty/grx249/src/user/uppolyg.c | 41 - thirdparty/grx249/src/user/uppolyl.c | 42 - thirdparty/grx249/src/user/usercord.c | 33 - thirdparty/grx249/src/user/usetwin.c | 28 - thirdparty/grx249/src/user/utextxy.c | 28 - thirdparty/grx249/src/user/uvline.c | 29 - thirdparty/grx249/src/utilprog/bin2c.c | 110 - thirdparty/grx249/src/utilprog/fnt2c.c | 47 - thirdparty/grx249/src/utilprog/fnt2text.c | 56 - thirdparty/grx249/src/utilprog/lfbinfo.c | 76 - thirdparty/grx249/src/utilprog/modetest.c | 235 - thirdparty/grx249/src/utilprog/vesainfo.c | 225 - thirdparty/grx249/src/utils/bccarith.c | 189 - thirdparty/grx249/src/utils/bcccopy.c | 103 - thirdparty/grx249/src/utils/bccfil08.c | 126 - thirdparty/grx249/src/utils/bccfil16.c | 52 - thirdparty/grx249/src/utils/bccfil24.c | 89 - thirdparty/grx249/src/utils/bccfil32.c | 55 - thirdparty/grx249/src/utils/dbgprint.c | 54 - thirdparty/grx249/src/utils/ordswap.c | 101 - thirdparty/grx249/src/utils/resize.c | 110 - thirdparty/grx249/src/utils/shiftscl.c | 142 - thirdparty/grx249/src/utils/strmatch.c | 131 - thirdparty/grx249/src/utils/tmpbuff.c | 41 - thirdparty/grx249/src/utils/watcom32.c | 62 - thirdparty/grx249/src/utils/watmake.c | 246 - thirdparty/grx249/src/vdrivers/ati28800.c | 89 - thirdparty/grx249/src/vdrivers/cl5426.c | 136 - thirdparty/grx249/src/vdrivers/et4000.c | 222 - thirdparty/grx249/src/vdrivers/herc.c | 194 - thirdparty/grx249/src/vdrivers/mach64.c | 172 - thirdparty/grx249/src/vdrivers/s3.c | 197 - thirdparty/grx249/src/vdrivers/stdega.c | 94 - thirdparty/grx249/src/vdrivers/stdvga.c | 350 - thirdparty/grx249/src/vdrivers/svgalib.c | 295 - thirdparty/grx249/src/vdrivers/u_egavga.c | 153 - thirdparty/grx249/src/vdrivers/u_vesa.c | 225 - thirdparty/grx249/src/vdrivers/u_vsvirt.c | 80 - thirdparty/grx249/src/vdrivers/vd_lnxfb.c | 389 - thirdparty/grx249/src/vdrivers/vd_mem.c | 252 - thirdparty/grx249/src/vdrivers/vd_sdl.c | 468 - thirdparty/grx249/src/vdrivers/vd_win32.c | 713 - thirdparty/grx249/src/vdrivers/vd_xfdga.c | 396 - thirdparty/grx249/src/vdrivers/vd_xwin.c | 547 - thirdparty/grx249/src/vdrivers/vesa.c | 458 - thirdparty/grx249/src/vdrivers/vesa.txt | 336 - thirdparty/grx249/src/vdrivers/vesa_pm.c | 548 - thirdparty/grx249/src/vdrivers/vesa_rm.c | 85 - thirdparty/grx249/src/vdrivers/vtable.c | 57 - thirdparty/grx249/src/wideline/ccirc.c | 25 - thirdparty/grx249/src/wideline/ccirca.c | 26 - thirdparty/grx249/src/wideline/celli.c | 37 - thirdparty/grx249/src/wideline/cellia.c | 47 - thirdparty/grx249/src/wideline/custbox.c | 33 - thirdparty/grx249/src/wideline/custline.c | 31 - thirdparty/grx249/src/wideline/custplne.c | 27 - thirdparty/grx249/src/wideline/custpoly.c | 27 - thirdparty/grx249/src/wideline/drwcpoly.c | 437 - thirdparty/grx249/test/arctest.c | 61 - thirdparty/grx249/test/arctest.dat | 9 - thirdparty/grx249/test/bb1test.c | 84 - thirdparty/grx249/test/bgi/bccbgi.c | 2214 --- thirdparty/grx249/test/bgi/bgilink.c | 67 - thirdparty/grx249/test/bgi/colortst.c | 124 - thirdparty/grx249/test/bgi/fontplay.c | 65 - thirdparty/grx249/test/bgi/makefile.bcc | 35 - thirdparty/grx249/test/bgi/makefile.dj2 | 65 - thirdparty/grx249/test/bgi/makefile.lnx | 87 - thirdparty/grx249/test/bgi/makefile.sdl | 73 - thirdparty/grx249/test/bgi/makefile.w32 | 63 - thirdparty/grx249/test/bgi/makefile.wat | 87 - thirdparty/grx249/test/bgi/makefile.x11 | 81 - thirdparty/grx249/test/bgi/small.c | 16 - thirdparty/grx249/test/bgi/stdfun.h | 19 - thirdparty/grx249/test/bgi/tellipse.c | 41 - thirdparty/grx249/test/bgi/tfill.c | 33 - thirdparty/grx249/test/bgi/tmodes.c | 102 - thirdparty/grx249/test/bgi/tpoly.c | 49 - thirdparty/grx249/test/bgi/ttext.c | 148 - thirdparty/grx249/test/blittest.c | 293 - thirdparty/grx249/test/circtest.c | 93 - thirdparty/grx249/test/cliptest.c | 52 - thirdparty/grx249/test/colorops.c | 124 - thirdparty/grx249/test/curstest.c | 106 - thirdparty/grx249/test/demogrx.c | 524 - thirdparty/grx249/test/depend.gnu | 22 - thirdparty/grx249/test/drawing.h | 36 - thirdparty/grx249/test/fontdemo.c | 223 - thirdparty/grx249/test/fonttest.c | 192 - thirdparty/grx249/test/fswwtest.c | 75 - thirdparty/grx249/test/gfaz.c | 398 - thirdparty/grx249/test/gfaz.h | 137 - thirdparty/grx249/test/imgtest.c | 85 - thirdparty/grx249/test/jpeg1.jpg | 3 - thirdparty/grx249/test/jpeg2.jpg | 3 - thirdparty/grx249/test/jpgtest.c | 118 - thirdparty/grx249/test/keys.c | 465 - thirdparty/grx249/test/life.c | 112 - thirdparty/grx249/test/linetest.c | 67 - thirdparty/grx249/test/makefile.bcc | 51 - thirdparty/grx249/test/makefile.dj2 | 87 - thirdparty/grx249/test/makefile.lnx | 113 - thirdparty/grx249/test/makefile.sdl | 96 - thirdparty/grx249/test/makefile.w32 | 97 - thirdparty/grx249/test/makefile.wat | 288 - thirdparty/grx249/test/makefile.x11 | 108 - thirdparty/grx249/test/memtest.c | 67 - thirdparty/grx249/test/mousetst.c | 113 - thirdparty/grx249/test/pcirctst.c | 109 - thirdparty/grx249/test/pngcompo.png | 3 - thirdparty/grx249/test/pngowl.png | 3 - thirdparty/grx249/test/pngred.png | 3 - thirdparty/grx249/test/pngtest.c | 107 - thirdparty/grx249/test/pnmtest.c | 103 - thirdparty/grx249/test/pnmtest.pbm | Bin 5088 -> 0 bytes thirdparty/grx249/test/pnmtest.ppm | 4 - thirdparty/grx249/test/pnmtest2.ppm | Bin 101484 -> 0 bytes thirdparty/grx249/test/polytest.c | 148 - thirdparty/grx249/test/polytest.dat | 87 - thirdparty/grx249/test/rand.h | 44 - thirdparty/grx249/test/rgbtest.c | 38 - thirdparty/grx249/test/sbctest.c | 197 - thirdparty/grx249/test/scroltst.c | 75 - thirdparty/grx249/test/speedtst.c | 888 - thirdparty/grx249/test/test.h | 91 - thirdparty/grx249/test/textpatt.c | 67 - thirdparty/grx249/test/winclip.c | 56 - thirdparty/grx249/test/wintest.c | 56 - thirdparty/jpeg-9e/Makefile | 1249 -- thirdparty/jpeg-9e/Makefile.am | 143 - thirdparty/jpeg-9e/Makefile.in | 1249 -- thirdparty/jpeg-9e/README | 374 - thirdparty/jpeg-9e/aclocal.m4 | 10275 ---------- thirdparty/jpeg-9e/ar-lib | 271 - thirdparty/jpeg-9e/cdaltui.txt | 138 - thirdparty/jpeg-9e/cderror.h | 136 - thirdparty/jpeg-9e/cdjpeg.c | 181 - thirdparty/jpeg-9e/cdjpeg.h | 189 - thirdparty/jpeg-9e/change.log | 516 - thirdparty/jpeg-9e/cjpeg.1 | 384 - thirdparty/jpeg-9e/cjpeg.c | 664 - thirdparty/jpeg-9e/cjpegalt.c | 791 - thirdparty/jpeg-9e/ckconfig.c | 402 - thirdparty/jpeg-9e/coderules.txt | 118 - thirdparty/jpeg-9e/compile | 348 - thirdparty/jpeg-9e/config.guess | 1748 -- thirdparty/jpeg-9e/config.log | 856 - thirdparty/jpeg-9e/config.status | 1987 -- thirdparty/jpeg-9e/config.sub | 1884 -- thirdparty/jpeg-9e/configure | 16365 ---------------- thirdparty/jpeg-9e/configure.ac | 365 - thirdparty/jpeg-9e/depcomp | 791 - thirdparty/jpeg-9e/djpeg.1 | 264 - thirdparty/jpeg-9e/djpeg.c | 631 - thirdparty/jpeg-9e/djpegalt.c | 766 - thirdparty/jpeg-9e/example.c | 433 - thirdparty/jpeg-9e/filelist.txt | 218 - thirdparty/jpeg-9e/install-sh | 541 - thirdparty/jpeg-9e/install.txt | 1198 -- thirdparty/jpeg-9e/jaricom.c | 153 - thirdparty/jpeg-9e/jcapimin.c | 288 - thirdparty/jpeg-9e/jcapistd.c | 162 - thirdparty/jpeg-9e/jcarith.c | 945 - thirdparty/jpeg-9e/jccoefct.c | 456 - thirdparty/jpeg-9e/jccolor.c | 601 - thirdparty/jpeg-9e/jcdctmgr.c | 466 - thirdparty/jpeg-9e/jchuff.c | 1640 -- thirdparty/jpeg-9e/jcinit.c | 249 - thirdparty/jpeg-9e/jcmainct.c | 297 - thirdparty/jpeg-9e/jcmarker.c | 717 - thirdparty/jpeg-9e/jcmaster.c | 675 - thirdparty/jpeg-9e/jcomapi.c | 244 - thirdparty/jpeg-9e/jconfig.bcc | 48 - thirdparty/jpeg-9e/jconfig.cfg | 59 - thirdparty/jpeg-9e/jconfig.dj | 38 - thirdparty/jpeg-9e/jconfig.h | 60 - thirdparty/jpeg-9e/jconfig.mac | 43 - thirdparty/jpeg-9e/jconfig.manx | 43 - thirdparty/jpeg-9e/jconfig.mc6 | 52 - thirdparty/jpeg-9e/jconfig.sas | 43 - thirdparty/jpeg-9e/jconfig.st | 42 - thirdparty/jpeg-9e/jconfig.txt | 171 - thirdparty/jpeg-9e/jconfig.vc | 52 - thirdparty/jpeg-9e/jconfig.vms | 37 - thirdparty/jpeg-9e/jconfig.wat | 38 - thirdparty/jpeg-9e/jcparam.c | 591 - thirdparty/jpeg-9e/jcprepct.c | 358 - thirdparty/jpeg-9e/jcsample.c | 545 - thirdparty/jpeg-9e/jctrans.c | 399 - thirdparty/jpeg-9e/jdapimin.c | 412 - thirdparty/jpeg-9e/jdapistd.c | 276 - thirdparty/jpeg-9e/jdarith.c | 796 - thirdparty/jpeg-9e/jdatadst.c | 267 - thirdparty/jpeg-9e/jdatasrc.c | 274 - thirdparty/jpeg-9e/jdcoefct.c | 744 - thirdparty/jpeg-9e/jdcolor.c | 778 - thirdparty/jpeg-9e/jdct.h | 409 - thirdparty/jpeg-9e/jddctmgr.c | 384 - thirdparty/jpeg-9e/jdhuff.c | 1559 -- thirdparty/jpeg-9e/jdinput.c | 657 - thirdparty/jpeg-9e/jdmainct.c | 511 - thirdparty/jpeg-9e/jdmarker.c | 1505 -- thirdparty/jpeg-9e/jdmaster.c | 532 - thirdparty/jpeg-9e/jdmerge.c | 438 - thirdparty/jpeg-9e/jdpostct.c | 290 - thirdparty/jpeg-9e/jdsample.c | 341 - thirdparty/jpeg-9e/jdtrans.c | 140 - thirdparty/jpeg-9e/jerror.c | 253 - thirdparty/jpeg-9e/jerror.h | 304 - thirdparty/jpeg-9e/jfdctflt.c | 176 - thirdparty/jpeg-9e/jfdctfst.c | 232 - thirdparty/jpeg-9e/jfdctint.c | 4415 ----- thirdparty/jpeg-9e/jidctflt.c | 238 - thirdparty/jpeg-9e/jidctfst.c | 351 - thirdparty/jpeg-9e/jidctint.c | 5240 ----- thirdparty/jpeg-9e/jinclude.h | 97 - thirdparty/jpeg-9e/jmemansi.c | 167 - thirdparty/jpeg-9e/jmemdos.c | 638 - thirdparty/jpeg-9e/jmemdosa.asm | 379 - thirdparty/jpeg-9e/jmemmac.c | 289 - thirdparty/jpeg-9e/jmemmgr.c | 1115 -- thirdparty/jpeg-9e/jmemname.c | 276 - thirdparty/jpeg-9e/jmemnobs.c | 113 - thirdparty/jpeg-9e/jmemsys.h | 198 - thirdparty/jpeg-9e/jmorecfg.h | 446 - thirdparty/jpeg-9e/jpegint.h | 445 - thirdparty/jpeg-9e/jpeglib.h | 1183 -- thirdparty/jpeg-9e/jpegtran.1 | 328 - thirdparty/jpeg-9e/jpegtran.c | 654 - thirdparty/jpeg-9e/jquant1.c | 851 - thirdparty/jpeg-9e/jquant2.c | 1311 -- thirdparty/jpeg-9e/jutils.c | 224 - thirdparty/jpeg-9e/jversion.h | 14 - thirdparty/jpeg-9e/libjpeg.map | 4 - thirdparty/jpeg-9e/libjpeg.pc | 10 - thirdparty/jpeg-9e/libjpeg.pc.in | 10 - thirdparty/jpeg-9e/libjpeg.txt | 3110 --- thirdparty/jpeg-9e/libtool | 11648 ----------- thirdparty/jpeg-9e/ltmain.sh | 11147 ----------- thirdparty/jpeg-9e/makcjpeg.st | 36 - thirdparty/jpeg-9e/makdjpeg.st | 36 - thirdparty/jpeg-9e/makeadsw.vc6 | 77 - thirdparty/jpeg-9e/makeasln.v16 | 71 - thirdparty/jpeg-9e/makecdep.vc6 | 82 - thirdparty/jpeg-9e/makecdsp.vc6 | 130 - thirdparty/jpeg-9e/makecfil.v16 | 69 - thirdparty/jpeg-9e/makecmak.vc6 | 159 - thirdparty/jpeg-9e/makecvcx.v16 | 195 - thirdparty/jpeg-9e/makecvcx.v17 | 195 - thirdparty/jpeg-9e/makeddep.vc6 | 82 - thirdparty/jpeg-9e/makeddsp.vc6 | 130 - thirdparty/jpeg-9e/makedfil.v16 | 69 - thirdparty/jpeg-9e/makedmak.vc6 | 159 - thirdparty/jpeg-9e/makedvcx.v16 | 195 - thirdparty/jpeg-9e/makedvcx.v17 | 195 - thirdparty/jpeg-9e/makefile.ansi | 226 - thirdparty/jpeg-9e/makefile.b32 | 248 - thirdparty/jpeg-9e/makefile.bcc | 298 - thirdparty/jpeg-9e/makefile.dj | 232 - thirdparty/jpeg-9e/makefile.manx | 226 - thirdparty/jpeg-9e/makefile.mc6 | 261 - thirdparty/jpeg-9e/makefile.mms | 230 - thirdparty/jpeg-9e/makefile.sas | 264 - thirdparty/jpeg-9e/makefile.unix | 240 - thirdparty/jpeg-9e/makefile.vc | 388 - thirdparty/jpeg-9e/makefile.vms | 144 - thirdparty/jpeg-9e/makefile.vs | 388 - thirdparty/jpeg-9e/makefile.wat | 246 - thirdparty/jpeg-9e/makejdep.vc6 | 423 - thirdparty/jpeg-9e/makejdsp.vc6 | 285 - thirdparty/jpeg-9e/makejdsw.vc6 | 29 - thirdparty/jpeg-9e/makejfil.v16 | 186 - thirdparty/jpeg-9e/makejmak.vc6 | 425 - thirdparty/jpeg-9e/makejsln.v16 | 31 - thirdparty/jpeg-9e/makejvcx.v16 | 222 - thirdparty/jpeg-9e/makejvcx.v17 | 222 - thirdparty/jpeg-9e/makeproj.mac | 213 - thirdparty/jpeg-9e/makerdep.vc6 | 6 - thirdparty/jpeg-9e/makerdsp.vc6 | 78 - thirdparty/jpeg-9e/makerfil.v16 | 30 - thirdparty/jpeg-9e/makermak.vc6 | 110 - thirdparty/jpeg-9e/makervcx.v16 | 178 - thirdparty/jpeg-9e/makervcx.v17 | 178 - thirdparty/jpeg-9e/maketdep.vc6 | 43 - thirdparty/jpeg-9e/maketdsp.vc6 | 122 - thirdparty/jpeg-9e/maketfil.v16 | 63 - thirdparty/jpeg-9e/maketmak.vc6 | 131 - thirdparty/jpeg-9e/maketvcx.v16 | 193 - thirdparty/jpeg-9e/maketvcx.v17 | 193 - thirdparty/jpeg-9e/makewdep.vc6 | 6 - thirdparty/jpeg-9e/makewdsp.vc6 | 78 - thirdparty/jpeg-9e/makewfil.v16 | 30 - thirdparty/jpeg-9e/makewmak.vc6 | 110 - thirdparty/jpeg-9e/makewvcx.v16 | 178 - thirdparty/jpeg-9e/makewvcx.v17 | 178 - thirdparty/jpeg-9e/makljpeg.st | 68 - thirdparty/jpeg-9e/maktjpeg.st | 30 - thirdparty/jpeg-9e/makvms.opt | 4 - thirdparty/jpeg-9e/missing | 215 - thirdparty/jpeg-9e/rdbmp.c | 469 - thirdparty/jpeg-9e/rdcolmap.c | 253 - thirdparty/jpeg-9e/rdgif.c | 679 - thirdparty/jpeg-9e/rdjpgcom.1 | 63 - thirdparty/jpeg-9e/rdjpgcom.c | 515 - thirdparty/jpeg-9e/rdppm.c | 501 - thirdparty/jpeg-9e/rdrle.c | 380 - thirdparty/jpeg-9e/rdswitch.c | 363 - thirdparty/jpeg-9e/rdtarga.c | 500 - thirdparty/jpeg-9e/stamp-h1 | 1 - thirdparty/jpeg-9e/structure.txt | 942 - thirdparty/jpeg-9e/testimg.bmp | Bin 35050 -> 0 bytes thirdparty/jpeg-9e/testimg.gif | 3 - thirdparty/jpeg-9e/testimg.jpg | 3 - thirdparty/jpeg-9e/testimg.ppm | 4 - thirdparty/jpeg-9e/testimgp.jpg | 3 - thirdparty/jpeg-9e/testorig.jpg | 3 - thirdparty/jpeg-9e/testprog.jpg | 3 - thirdparty/jpeg-9e/transupp.c | 2434 --- thirdparty/jpeg-9e/transupp.h | 230 - thirdparty/jpeg-9e/usage.txt | 709 - thirdparty/jpeg-9e/wizard.txt | 211 - thirdparty/jpeg-9e/wrbmp.c | 437 - thirdparty/jpeg-9e/wrgif.c | 566 - thirdparty/jpeg-9e/wrjpgcom.1 | 103 - thirdparty/jpeg-9e/wrjpgcom.c | 599 - thirdparty/jpeg-9e/wrppm.c | 264 - thirdparty/jpeg-9e/wrrle.c | 306 - thirdparty/jpeg-9e/wrtarga.c | 254 - thirdparty/libpng-1.6.37/ANNOUNCE | 47 - thirdparty/libpng-1.6.37/AUTHORS | 45 - thirdparty/libpng-1.6.37/CHANGES | 6109 ------ thirdparty/libpng-1.6.37/CMakeLists.txt | 931 - thirdparty/libpng-1.6.37/INSTALL | 465 - thirdparty/libpng-1.6.37/LICENSE | 134 - thirdparty/libpng-1.6.37/Makefile | 2428 --- thirdparty/libpng-1.6.37/Makefile.am | 393 - thirdparty/libpng-1.6.37/Makefile.in | 2428 --- thirdparty/libpng-1.6.37/README | 183 - thirdparty/libpng-1.6.37/TODO | 23 - thirdparty/libpng-1.6.37/TRADEMARK | 8 - thirdparty/libpng-1.6.37/aclocal.m4 | 1196 -- .../libpng-1.6.37/arm/.deps/arm_init.Plo | 1 - .../libpng-1.6.37/arm/.deps/filter_neon.Plo | 1 - .../arm/.deps/filter_neon_intrinsics.Plo | 1 - .../arm/.deps/palette_neon_intrinsics.Plo | 1 - thirdparty/libpng-1.6.37/arm/arm_init.c | 136 - thirdparty/libpng-1.6.37/arm/filter_neon.S | 253 - .../arm/filter_neon_intrinsics.c | 402 - .../arm/palette_neon_intrinsics.c | 149 - thirdparty/libpng-1.6.37/autogen.sh | 225 - thirdparty/libpng-1.6.37/compile | 348 - thirdparty/libpng-1.6.37/config.guess | 1476 -- thirdparty/libpng-1.6.37/config.h | 127 - thirdparty/libpng-1.6.37/config.h.in | 126 - thirdparty/libpng-1.6.37/config.log | 998 - thirdparty/libpng-1.6.37/config.status | 2011 -- thirdparty/libpng-1.6.37/config.sub | 1801 -- thirdparty/libpng-1.6.37/configure | 16116 --------------- thirdparty/libpng-1.6.37/configure.ac | 532 - thirdparty/libpng-1.6.37/contrib/README.txt | 5 - .../libpng-1.6.37/contrib/arm-neon/README | 83 - .../contrib/arm-neon/android-ndk.c | 39 - .../contrib/arm-neon/linux-auxv.c | 120 - .../libpng-1.6.37/contrib/arm-neon/linux.c | 161 - .../libpng-1.6.37/contrib/conftest/README | 49 - .../libpng-1.6.37/contrib/conftest/pngcp.dfa | 57 - .../libpng-1.6.37/contrib/conftest/read.dfa | 58 - .../libpng-1.6.37/contrib/conftest/s_read.dfa | 35 - .../contrib/conftest/s_write.dfa | 33 - .../libpng-1.6.37/contrib/conftest/simple.dfa | 36 - .../libpng-1.6.37/contrib/conftest/write.dfa | 45 - .../libpng-1.6.37/contrib/examples/README.txt | 24 - .../contrib/examples/iccfrompng.c | 185 - .../libpng-1.6.37/contrib/examples/pngpixel.c | 371 - .../libpng-1.6.37/contrib/examples/pngtopng.c | 98 - .../contrib/examples/simpleover.c | 648 - .../libpng-1.6.37/contrib/gregbook/COPYING | 340 - .../libpng-1.6.37/contrib/gregbook/LICENSE | 50 - .../contrib/gregbook/Makefile.mingw32 | 131 - .../contrib/gregbook/Makefile.sgi | 105 - .../contrib/gregbook/Makefile.unx | 134 - .../contrib/gregbook/Makefile.w32 | 114 - .../libpng-1.6.37/contrib/gregbook/README | 186 - .../contrib/gregbook/makevms.com | 132 - .../libpng-1.6.37/contrib/gregbook/readpng.c | 323 - .../libpng-1.6.37/contrib/gregbook/readpng.h | 88 - .../libpng-1.6.37/contrib/gregbook/readpng2.c | 521 - .../libpng-1.6.37/contrib/gregbook/readpng2.h | 116 - .../libpng-1.6.37/contrib/gregbook/readppm.c | 188 - .../libpng-1.6.37/contrib/gregbook/rpng-win.c | 735 - .../libpng-1.6.37/contrib/gregbook/rpng-x.c | 911 - .../contrib/gregbook/rpng2-win.c | 1261 -- .../libpng-1.6.37/contrib/gregbook/rpng2-x.c | 2143 -- .../libpng-1.6.37/contrib/gregbook/toucan.png | 3 - .../libpng-1.6.37/contrib/gregbook/wpng.c | 865 - .../libpng-1.6.37/contrib/gregbook/writepng.c | 401 - .../libpng-1.6.37/contrib/gregbook/writepng.h | 133 - .../contrib/libtests/.deps/pngimage.Po | 1 - .../contrib/libtests/.deps/pngstest.Po | 1 - .../contrib/libtests/.deps/pngunknown.Po | 1 - .../contrib/libtests/.deps/pngvalid.Po | 1 - .../contrib/libtests/.deps/timepng.Po | 1 - .../libpng-1.6.37/contrib/libtests/fakepng.c | 65 - .../contrib/libtests/gentests.sh | 102 - .../libpng-1.6.37/contrib/libtests/makepng.c | 1941 -- .../libpng-1.6.37/contrib/libtests/pngimage.c | 1712 -- .../contrib/libtests/pngstest-errors.h | 165 - .../libpng-1.6.37/contrib/libtests/pngstest.c | 3828 ---- .../contrib/libtests/pngunknown.c | 1294 -- .../libpng-1.6.37/contrib/libtests/pngvalid.c | 12230 ------------ .../libpng-1.6.37/contrib/libtests/readpng.c | 115 - .../libpng-1.6.37/contrib/libtests/tarith.c | 999 - .../libpng-1.6.37/contrib/libtests/timepng.c | 608 - .../libpng-1.6.37/contrib/mips-msa/README | 83 - .../libpng-1.6.37/contrib/mips-msa/linux.c | 64 - .../libpng-1.6.37/contrib/oss-fuzz/Dockerfile | 25 - .../libpng-1.6.37/contrib/oss-fuzz/README.txt | 37 - .../libpng-1.6.37/contrib/oss-fuzz/build.sh | 51 - .../contrib/oss-fuzz/libpng_read_fuzzer.cc | 190 - .../oss-fuzz/libpng_read_fuzzer.options | 2 - .../libpng-1.6.37/contrib/oss-fuzz/png.dict | 39 - .../libpng-1.6.37/contrib/pngminim/README | 5 - .../contrib/pngminim/decoder/README | 10 - .../contrib/pngminim/decoder/makefile | 151 - .../contrib/pngminim/decoder/pngusr.dfa | 40 - .../contrib/pngminim/decoder/pngusr.h | 23 - .../contrib/pngminim/encoder/README | 10 - .../contrib/pngminim/encoder/makefile | 150 - .../contrib/pngminim/encoder/pngusr.dfa | 39 - .../contrib/pngminim/encoder/pngusr.h | 23 - .../contrib/pngminim/preader/README | 15 - .../contrib/pngminim/preader/makefile | 166 - .../contrib/pngminim/preader/pngusr.dfa | 40 - .../contrib/pngminim/preader/pngusr.h | 23 - .../contrib/pngminus/CHANGES.txt | 13 - .../contrib/pngminus/CMakeLists.txt | 24 - .../contrib/pngminus/LICENSE.txt | 22 - .../libpng-1.6.37/contrib/pngminus/Makefile | 62 - .../libpng-1.6.37/contrib/pngminus/README.txt | 120 - .../contrib/pngminus/makevms.com | 92 - .../contrib/pngminus/png2pnm.bat | 41 - .../libpng-1.6.37/contrib/pngminus/png2pnm.c | 427 - .../libpng-1.6.37/contrib/pngminus/png2pnm.sh | 42 - .../contrib/pngminus/pngminus.bat | 4 - .../contrib/pngminus/pngminus.sh | 5 - .../contrib/pngminus/pnm2png.bat | 41 - .../libpng-1.6.37/contrib/pngminus/pnm2png.c | 620 - .../libpng-1.6.37/contrib/pngminus/pnm2png.sh | 42 - .../libpng-1.6.37/contrib/pngsuite/README | 107 - .../pngsuite/bad_interlace_conversions.txt | 9 - .../contrib/pngsuite/basn0g01.png | 3 - .../contrib/pngsuite/basn0g02.png | 3 - .../contrib/pngsuite/basn0g04.png | 3 - .../contrib/pngsuite/basn0g08.png | 3 - .../contrib/pngsuite/basn0g16.png | 3 - .../contrib/pngsuite/basn2c08.png | 3 - .../contrib/pngsuite/basn2c16.png | 3 - .../contrib/pngsuite/basn3p01.png | 3 - .../contrib/pngsuite/basn3p02.png | 3 - .../contrib/pngsuite/basn3p04.png | 3 - .../contrib/pngsuite/basn3p08.png | 3 - .../contrib/pngsuite/basn4a08.png | 3 - .../contrib/pngsuite/basn4a16.png | 3 - .../contrib/pngsuite/basn6a08.png | 3 - .../contrib/pngsuite/basn6a16.png | 3 - .../contrib/pngsuite/ftbbn0g01.png | 3 - .../contrib/pngsuite/ftbbn0g02.png | 3 - .../contrib/pngsuite/ftbbn0g04.png | 3 - .../contrib/pngsuite/ftbbn2c16.png | 3 - .../contrib/pngsuite/ftbbn3p08.png | 3 - .../contrib/pngsuite/ftbgn2c16.png | 3 - .../contrib/pngsuite/ftbgn3p08.png | 3 - .../contrib/pngsuite/ftbrn2c08.png | 3 - .../contrib/pngsuite/ftbwn0g16.png | 3 - .../contrib/pngsuite/ftbwn3p08.png | 3 - .../contrib/pngsuite/ftbyn3p08.png | 3 - .../contrib/pngsuite/ftp0n0g08.png | 3 - .../contrib/pngsuite/ftp0n2c08.png | 3 - .../contrib/pngsuite/ftp0n3p08.png | 3 - .../contrib/pngsuite/ftp1n3p08.png | 3 - .../contrib/pngsuite/ibasn0g08.png | 3 - .../contrib/pngsuite/ibasn0g16.png | 3 - .../contrib/pngsuite/ibasn2c08.png | 3 - .../contrib/pngsuite/ibasn2c16.png | 3 - .../contrib/pngsuite/ibasn3p08.png | 3 - .../contrib/pngsuite/ibasn4a08.png | 3 - .../contrib/pngsuite/ibasn4a16.png | 3 - .../contrib/pngsuite/ibasn6a08.png | 3 - .../contrib/pngsuite/ibasn6a16.png | 3 - .../contrib/pngsuite/iftbbn2c16.png | 3 - .../contrib/pngsuite/iftbbn3p08.png | 3 - .../contrib/pngsuite/iftbgn2c16.png | 3 - .../contrib/pngsuite/iftbgn3p08.png | 3 - .../contrib/pngsuite/iftbrn2c08.png | 3 - .../contrib/pngsuite/iftbwn0g16.png | 3 - .../contrib/pngsuite/iftbwn3p08.png | 3 - .../contrib/pngsuite/iftbyn3p08.png | 3 - .../contrib/pngsuite/iftp0n0g08.png | 3 - .../contrib/pngsuite/iftp0n2c08.png | 3 - .../contrib/pngsuite/iftp0n3p08.png | 3 - .../contrib/pngsuite/iftp1n3p08.png | 3 - .../contrib/pngsuite/interlaced/README | 2 - .../contrib/pngsuite/interlaced/ibasn0g01.png | 3 - .../contrib/pngsuite/interlaced/ibasn0g02.png | 3 - .../contrib/pngsuite/interlaced/ibasn0g04.png | 3 - .../contrib/pngsuite/interlaced/ibasn3p01.png | 3 - .../contrib/pngsuite/interlaced/ibasn3p02.png | 3 - .../contrib/pngsuite/interlaced/ibasn3p04.png | 3 - .../pngsuite/interlaced/iftbbn0g01.png | 3 - .../pngsuite/interlaced/iftbbn0g02.png | 3 - .../pngsuite/interlaced/iftbbn0g04.png | 3 - .../libpng-1.6.37/contrib/powerpc-vsx/README | 81 - .../libpng-1.6.37/contrib/powerpc-vsx/linux.c | 57 - .../contrib/powerpc-vsx/linux_aux.c | 34 - .../contrib/testpngs/crashers/bad_iCCP.png | 3 - .../contrib/testpngs/crashers/badadler.png | 3 - .../contrib/testpngs/crashers/badcrc.png | 3 - .../crashers/empty_ancillary_chunks.png | 3 - .../contrib/testpngs/crashers/huge_IDAT.png | 3 - .../testpngs/crashers/huge_bKGD_chunk.png | 3 - .../testpngs/crashers/huge_cHRM_chunk.png | 3 - .../testpngs/crashers/huge_eXIf_chunk.png | 3 - .../testpngs/crashers/huge_gAMA_chunk.png | 3 - .../testpngs/crashers/huge_hIST_chunk.png | 3 - .../testpngs/crashers/huge_iCCP_chunk.png | 3 - .../testpngs/crashers/huge_iTXt_chunk.png | 3 - .../crashers/huge_juNK_unsafe_to_copy.png | 3 - .../crashers/huge_juNk_safe_to_copy.png | 3 - .../testpngs/crashers/huge_pCAL_chunk.png | 3 - .../testpngs/crashers/huge_pHYs_chunk.png | 3 - .../testpngs/crashers/huge_sCAL_chunk.png | 3 - .../testpngs/crashers/huge_sPLT_chunk.png | 3 - .../testpngs/crashers/huge_sRGB_chunk.png | 3 - .../testpngs/crashers/huge_sTER_chunk.png | 3 - .../testpngs/crashers/huge_tEXt_chunk.png | 3 - .../testpngs/crashers/huge_tIME_chunk.png | 3 - .../testpngs/crashers/huge_zTXt_chunk.png | 3 - .../contrib/testpngs/gray-1-1.8-tRNS.png | 3 - .../contrib/testpngs/gray-1-1.8.png | 3 - .../contrib/testpngs/gray-1-linear-tRNS.png | 3 - .../contrib/testpngs/gray-1-linear.png | 3 - .../contrib/testpngs/gray-1-sRGB-tRNS.png | 3 - .../contrib/testpngs/gray-1-sRGB.png | 3 - .../contrib/testpngs/gray-1-tRNS.png | 3 - .../libpng-1.6.37/contrib/testpngs/gray-1.png | 3 - .../contrib/testpngs/gray-16-1.8-tRNS.png | 3 - .../contrib/testpngs/gray-16-1.8.png | 3 - .../contrib/testpngs/gray-16-linear-tRNS.png | 3 - .../contrib/testpngs/gray-16-linear.png | 3 - .../contrib/testpngs/gray-16-sRGB-tRNS.png | 3 - .../contrib/testpngs/gray-16-sRGB.png | 3 - .../contrib/testpngs/gray-16-tRNS.png | 3 - .../contrib/testpngs/gray-16.png | 3 - .../contrib/testpngs/gray-2-1.8-tRNS.png | 3 - .../contrib/testpngs/gray-2-1.8.png | 3 - .../contrib/testpngs/gray-2-linear-tRNS.png | 3 - .../contrib/testpngs/gray-2-linear.png | 3 - .../contrib/testpngs/gray-2-sRGB-tRNS.png | 3 - .../contrib/testpngs/gray-2-sRGB.png | 3 - .../contrib/testpngs/gray-2-tRNS.png | 3 - .../libpng-1.6.37/contrib/testpngs/gray-2.png | 3 - .../contrib/testpngs/gray-4-1.8-tRNS.png | 3 - .../contrib/testpngs/gray-4-1.8.png | 3 - .../contrib/testpngs/gray-4-linear-tRNS.png | 3 - .../contrib/testpngs/gray-4-linear.png | 3 - .../contrib/testpngs/gray-4-sRGB-tRNS.png | 3 - .../contrib/testpngs/gray-4-sRGB.png | 3 - .../contrib/testpngs/gray-4-tRNS.png | 3 - .../libpng-1.6.37/contrib/testpngs/gray-4.png | 3 - .../contrib/testpngs/gray-8-1.8-tRNS.png | 3 - .../contrib/testpngs/gray-8-1.8.png | 3 - .../contrib/testpngs/gray-8-linear-tRNS.png | 3 - .../contrib/testpngs/gray-8-linear.png | 3 - .../contrib/testpngs/gray-8-sRGB-tRNS.png | 3 - .../contrib/testpngs/gray-8-sRGB.png | 3 - .../contrib/testpngs/gray-8-tRNS.png | 3 - .../libpng-1.6.37/contrib/testpngs/gray-8.png | 3 - .../contrib/testpngs/gray-alpha-16-1.8.png | 3 - .../contrib/testpngs/gray-alpha-16-linear.png | 3 - .../contrib/testpngs/gray-alpha-16-sRGB.png | 3 - .../contrib/testpngs/gray-alpha-16.png | 3 - .../contrib/testpngs/gray-alpha-8-1.8.png | 3 - .../contrib/testpngs/gray-alpha-8-linear.png | 3 - .../contrib/testpngs/gray-alpha-8-sRGB.png | 3 - .../contrib/testpngs/gray-alpha-8.png | 3 - .../contrib/testpngs/makepngs.sh | 94 - .../contrib/testpngs/palette-1-1.8-tRNS.png | 3 - .../contrib/testpngs/palette-1-1.8.png | 3 - .../testpngs/palette-1-linear-tRNS.png | 3 - .../contrib/testpngs/palette-1-linear.png | 3 - .../contrib/testpngs/palette-1-sRGB-tRNS.png | 3 - .../contrib/testpngs/palette-1-sRGB.png | 3 - .../contrib/testpngs/palette-1-tRNS.png | 3 - .../contrib/testpngs/palette-1.png | 3 - .../contrib/testpngs/palette-2-1.8-tRNS.png | 3 - .../contrib/testpngs/palette-2-1.8.png | 3 - .../testpngs/palette-2-linear-tRNS.png | 3 - .../contrib/testpngs/palette-2-linear.png | 3 - .../contrib/testpngs/palette-2-sRGB-tRNS.png | 3 - .../contrib/testpngs/palette-2-sRGB.png | 3 - .../contrib/testpngs/palette-2-tRNS.png | 3 - .../contrib/testpngs/palette-2.png | 3 - .../contrib/testpngs/palette-4-1.8-tRNS.png | 3 - .../contrib/testpngs/palette-4-1.8.png | 3 - .../testpngs/palette-4-linear-tRNS.png | 3 - .../contrib/testpngs/palette-4-linear.png | 3 - .../contrib/testpngs/palette-4-sRGB-tRNS.png | 3 - .../contrib/testpngs/palette-4-sRGB.png | 3 - .../contrib/testpngs/palette-4-tRNS.png | 3 - .../contrib/testpngs/palette-4.png | 3 - .../contrib/testpngs/palette-8-1.8-tRNS.png | 3 - .../contrib/testpngs/palette-8-1.8.png | 3 - .../testpngs/palette-8-linear-tRNS.png | 3 - .../contrib/testpngs/palette-8-linear.png | 3 - .../contrib/testpngs/palette-8-sRGB-tRNS.png | 3 - .../contrib/testpngs/palette-8-sRGB.png | 3 - .../contrib/testpngs/palette-8-tRNS.png | 3 - .../contrib/testpngs/palette-8.png | 3 - .../contrib/testpngs/rgb-16-1.8-tRNS.png | 3 - .../contrib/testpngs/rgb-16-1.8.png | 3 - .../contrib/testpngs/rgb-16-linear-tRNS.png | 3 - .../contrib/testpngs/rgb-16-linear.png | 3 - .../contrib/testpngs/rgb-16-sRGB-tRNS.png | 3 - .../contrib/testpngs/rgb-16-sRGB.png | 3 - .../contrib/testpngs/rgb-16-tRNS.png | 3 - .../libpng-1.6.37/contrib/testpngs/rgb-16.png | 3 - .../contrib/testpngs/rgb-8-1.8-tRNS.png | 3 - .../contrib/testpngs/rgb-8-1.8.png | 3 - .../contrib/testpngs/rgb-8-linear-tRNS.png | 3 - .../contrib/testpngs/rgb-8-linear.png | 3 - .../contrib/testpngs/rgb-8-sRGB-tRNS.png | 3 - .../contrib/testpngs/rgb-8-sRGB.png | 3 - .../contrib/testpngs/rgb-8-tRNS.png | 3 - .../libpng-1.6.37/contrib/testpngs/rgb-8.png | 3 - .../contrib/testpngs/rgb-alpha-16-1.8.png | 3 - .../contrib/testpngs/rgb-alpha-16-linear.png | 3 - .../contrib/testpngs/rgb-alpha-16-sRGB.png | 3 - .../contrib/testpngs/rgb-alpha-16.png | 3 - .../contrib/testpngs/rgb-alpha-8-1.8.png | 3 - .../contrib/testpngs/rgb-alpha-8-linear.png | 3 - .../contrib/testpngs/rgb-alpha-8-sRGB.png | 3 - .../contrib/testpngs/rgb-alpha-8.png | 3 - .../contrib/tools/.deps/png-fix-itxt.Po | 1 - .../contrib/tools/.deps/pngcp.Po | 1 - .../contrib/tools/.deps/pngfix.Po | 1 - .../libpng-1.6.37/contrib/tools/README.txt | 27 - .../contrib/tools/checksum-icc.c | 102 - thirdparty/libpng-1.6.37/contrib/tools/chkfmt | 144 - .../libpng-1.6.37/contrib/tools/cvtcolor.c | 188 - .../libpng-1.6.37/contrib/tools/genpng.c | 881 - .../libpng-1.6.37/contrib/tools/intgamma.sh | 110 - .../libpng-1.6.37/contrib/tools/makesRGB.c | 430 - .../contrib/tools/png-fix-itxt.c | 164 - .../libpng-1.6.37/contrib/tools/pngcp.c | 2453 --- .../libpng-1.6.37/contrib/tools/pngfix.c | 4049 ---- .../libpng-1.6.37/contrib/tools/reindent | 25 - thirdparty/libpng-1.6.37/contrib/tools/sRGB.h | 48 - .../libpng-1.6.37/contrib/visupng/PngFile.c | 454 - .../libpng-1.6.37/contrib/visupng/PngFile.h | 30 - .../libpng-1.6.37/contrib/visupng/README.txt | 61 - .../libpng-1.6.37/contrib/visupng/VisualPng.c | 978 - .../contrib/visupng/VisualPng.dsp | 147 - .../contrib/visupng/VisualPng.dsw | 29 - .../contrib/visupng/VisualPng.ico | Bin 766 -> 0 bytes .../contrib/visupng/VisualPng.png | 3 - .../contrib/visupng/VisualPng.rc | 152 - .../libpng-1.6.37/contrib/visupng/cexcept.h | 248 - .../libpng-1.6.37/contrib/visupng/resource.h | 23 - thirdparty/libpng-1.6.37/depcomp | 791 - thirdparty/libpng-1.6.37/example.c | 1040 - thirdparty/libpng-1.6.37/install-sh | 518 - .../intel/.deps/filter_sse2_intrinsics.Plo | 1 - .../libpng-1.6.37/intel/.deps/intel_init.Plo | 1 - .../intel/filter_sse2_intrinsics.c | 391 - thirdparty/libpng-1.6.37/intel/intel_init.c | 52 - thirdparty/libpng-1.6.37/libpng-config.in | 127 - thirdparty/libpng-1.6.37/libpng-manual.txt | 5409 ----- thirdparty/libpng-1.6.37/libpng.3 | 6052 ------ thirdparty/libpng-1.6.37/libpng.pc.in | 12 - thirdparty/libpng-1.6.37/libpngpf.3 | 24 - thirdparty/libpng-1.6.37/libtool | 11645 ----------- thirdparty/libpng-1.6.37/ltmain.sh | 11147 ----------- thirdparty/libpng-1.6.37/makefile.dj2 | 72 - thirdparty/libpng-1.6.37/makefile.linux | 246 - .../mips/.deps/filter_msa_intrinsics.Plo | 1 - .../libpng-1.6.37/mips/.deps/mips_init.Plo | 1 - .../mips/filter_msa_intrinsics.c | 808 - thirdparty/libpng-1.6.37/mips/mips_init.c | 130 - thirdparty/libpng-1.6.37/missing | 215 - thirdparty/libpng-1.6.37/png.5 | 84 - thirdparty/libpng-1.6.37/png.c | 4607 ----- thirdparty/libpng-1.6.37/png.h | 3247 --- thirdparty/libpng-1.6.37/pngbar.jpg | 3 - thirdparty/libpng-1.6.37/pngbar.png | 3 - thirdparty/libpng-1.6.37/pngconf.h | 623 - thirdparty/libpng-1.6.37/pngdebug.h | 153 - thirdparty/libpng-1.6.37/pngerror.c | 963 - thirdparty/libpng-1.6.37/pngget.c | 1249 -- thirdparty/libpng-1.6.37/pnginfo.h | 267 - thirdparty/libpng-1.6.37/pngmem.c | 284 - thirdparty/libpng-1.6.37/pngnow.png | 3 - thirdparty/libpng-1.6.37/pngpread.c | 1096 -- thirdparty/libpng-1.6.37/pngpriv.h | 2152 -- thirdparty/libpng-1.6.37/pngread.c | 4225 ---- thirdparty/libpng-1.6.37/pngrio.c | 120 - thirdparty/libpng-1.6.37/pngrtran.c | 5044 ----- thirdparty/libpng-1.6.37/pngrutil.c | 4681 ----- thirdparty/libpng-1.6.37/pngset.c | 1802 -- thirdparty/libpng-1.6.37/pngstruct.h | 489 - thirdparty/libpng-1.6.37/pngtest.c | 2158 -- thirdparty/libpng-1.6.37/pngtest.png | 3 - thirdparty/libpng-1.6.37/pngtrans.c | 864 - thirdparty/libpng-1.6.37/pngusr.dfa | 14 - thirdparty/libpng-1.6.37/pngwio.c | 168 - thirdparty/libpng-1.6.37/pngwrite.c | 2395 --- thirdparty/libpng-1.6.37/pngwtran.c | 575 - thirdparty/libpng-1.6.37/pngwutil.c | 2781 --- .../powerpc/.deps/filter_vsx_intrinsics.Plo | 1 - .../powerpc/.deps/powerpc_init.Plo | 1 - .../powerpc/filter_vsx_intrinsics.c | 768 - .../libpng-1.6.37/powerpc/powerpc_init.c | 126 - .../libpng-1.6.37/projects/owatcom/libpng.tgt | 383 - .../libpng-1.6.37/projects/owatcom/libpng.wpj | 112 - .../projects/owatcom/pngconfig.mak | 160 - .../projects/owatcom/pngstest.tgt | 219 - .../projects/owatcom/pngtest.tgt | 179 - .../projects/owatcom/pngvalid.tgt | 210 - .../projects/visualc71/PRJ0041.mak | 21 - .../projects/visualc71/README.txt | 58 - .../projects/visualc71/README_zlib.txt | 44 - .../projects/visualc71/libpng.sln | 60 - .../projects/visualc71/libpng.vcproj | 419 - .../projects/visualc71/pngtest.vcproj | 267 - .../projects/visualc71/zlib.vcproj | 391 - .../libpng-1.6.37/projects/vstudio/README.txt | 87 - .../projects/vstudio/libpng/libpng.vcxproj | 234 - .../vstudio/pnglibconf/pnglibconf.vcxproj | 61 - .../vstudio/pngstest/pngstest.vcxproj | 219 - .../projects/vstudio/pngtest/pngtest.vcxproj | 220 - .../vstudio/pngunknown/pngunknown.vcxproj | 219 - .../vstudio/pngvalid/pngvalid.vcxproj | 219 - .../projects/vstudio/vstudio.sln | 109 - .../libpng-1.6.37/projects/vstudio/zlib.props | 57 - .../projects/vstudio/zlib/zlib.vcxproj | 175 - thirdparty/libpng-1.6.37/scripts/README.txt | 79 - .../libpng-1.6.37/scripts/SCOPTIONS.ppc | 7 - thirdparty/libpng-1.6.37/scripts/checksym.awk | 173 - thirdparty/libpng-1.6.37/scripts/descrip.mms | 52 - thirdparty/libpng-1.6.37/scripts/dfn.awk | 203 - .../libpng-1.6.37/scripts/genchk.cmake.in | 37 - .../libpng-1.6.37/scripts/genout.cmake.in | 93 - .../libpng-1.6.37/scripts/gensrc.cmake.in | 138 - thirdparty/libpng-1.6.37/scripts/intprefix.c | 22 - .../scripts/libpng-config-body.in | 96 - .../scripts/libpng-config-head.in | 24 - thirdparty/libpng-1.6.37/scripts/libpng.pc.in | 10 - thirdparty/libpng-1.6.37/scripts/libtool.m4 | 8369 -------- thirdparty/libpng-1.6.37/scripts/ltoptions.m4 | 437 - thirdparty/libpng-1.6.37/scripts/ltsugar.m4 | 124 - thirdparty/libpng-1.6.37/scripts/ltversion.m4 | 23 - .../libpng-1.6.37/scripts/lt~obsolete.m4 | 99 - thirdparty/libpng-1.6.37/scripts/macro.lst | 3 - .../libpng-1.6.37/scripts/makefile.32sunu | 244 - .../libpng-1.6.37/scripts/makefile.64sunu | 244 - .../libpng-1.6.37/scripts/makefile.acorn | 57 - thirdparty/libpng-1.6.37/scripts/makefile.aix | 116 - .../libpng-1.6.37/scripts/makefile.amiga | 58 - .../libpng-1.6.37/scripts/makefile.atari | 71 - .../libpng-1.6.37/scripts/makefile.bc32 | 158 - .../libpng-1.6.37/scripts/makefile.beos | 222 - .../libpng-1.6.37/scripts/makefile.cegcc | 116 - .../libpng-1.6.37/scripts/makefile.clang | 87 - .../libpng-1.6.37/scripts/makefile.clang-asan | 87 - .../libpng-1.6.37/scripts/makefile.darwin | 225 - thirdparty/libpng-1.6.37/scripts/makefile.dec | 210 - thirdparty/libpng-1.6.37/scripts/makefile.dj2 | 72 - .../libpng-1.6.37/scripts/makefile.freebsd | 69 - thirdparty/libpng-1.6.37/scripts/makefile.gcc | 87 - .../libpng-1.6.37/scripts/makefile.gcc-asan | 87 - .../libpng-1.6.37/scripts/makefile.hp64 | 231 - .../libpng-1.6.37/scripts/makefile.hpgcc | 234 - .../libpng-1.6.37/scripts/makefile.hpux | 229 - .../libpng-1.6.37/scripts/makefile.ibmc | 90 - .../libpng-1.6.37/scripts/makefile.intel | 115 - .../libpng-1.6.37/scripts/makefile.linux | 246 - .../libpng-1.6.37/scripts/makefile.linux-opt | 265 - .../libpng-1.6.37/scripts/makefile.mips | 103 - .../libpng-1.6.37/scripts/makefile.msys | 202 - .../libpng-1.6.37/scripts/makefile.netbsd | 55 - .../libpng-1.6.37/scripts/makefile.openbsd | 86 - thirdparty/libpng-1.6.37/scripts/makefile.sco | 226 - .../libpng-1.6.37/scripts/makefile.sggcc | 236 - thirdparty/libpng-1.6.37/scripts/makefile.sgi | 237 - thirdparty/libpng-1.6.37/scripts/makefile.so9 | 247 - .../libpng-1.6.37/scripts/makefile.solaris | 243 - thirdparty/libpng-1.6.37/scripts/makefile.std | 134 - .../libpng-1.6.37/scripts/makefile.sunos | 115 - .../libpng-1.6.37/scripts/makefile.vcwin32 | 113 - thirdparty/libpng-1.6.37/scripts/makevms.com | 142 - thirdparty/libpng-1.6.37/scripts/options.awk | 898 - .../libpng-1.6.37/scripts/pnglibconf.dfa | 920 - .../scripts/pnglibconf.h.prebuilt | 219 - .../libpng-1.6.37/scripts/pnglibconf.mak | 55 - thirdparty/libpng-1.6.37/scripts/pngwin.rc | 112 - thirdparty/libpng-1.6.37/scripts/prefix.c | 24 - .../libpng-1.6.37/scripts/smakefile.ppc | 34 - thirdparty/libpng-1.6.37/scripts/sym.c | 15 - thirdparty/libpng-1.6.37/scripts/symbols.c | 58 - thirdparty/libpng-1.6.37/scripts/symbols.def | 255 - .../libpng-1.6.37/scripts/test.cmake.in | 31 - thirdparty/libpng-1.6.37/scripts/vers.c | 19 - thirdparty/libpng-1.6.37/stamp-h1 | 1 - thirdparty/libpng-1.6.37/test-driver | 148 - thirdparty/libpng-1.6.37/tests/pngimage-full | 2 - thirdparty/libpng-1.6.37/tests/pngimage-quick | 2 - thirdparty/libpng-1.6.37/tests/pngstest | 54 - thirdparty/libpng-1.6.37/tests/pngstest-1.8 | 2 - .../libpng-1.6.37/tests/pngstest-1.8-alpha | 2 - .../libpng-1.6.37/tests/pngstest-linear | 2 - .../libpng-1.6.37/tests/pngstest-linear-alpha | 2 - thirdparty/libpng-1.6.37/tests/pngstest-none | 2 - .../libpng-1.6.37/tests/pngstest-none-alpha | 2 - thirdparty/libpng-1.6.37/tests/pngstest-sRGB | 2 - .../libpng-1.6.37/tests/pngstest-sRGB-alpha | 2 - thirdparty/libpng-1.6.37/tests/pngtest | 2 - .../libpng-1.6.37/tests/pngtest-badpngs | 13 - .../libpng-1.6.37/tests/pngunknown-IDAT | 2 - .../libpng-1.6.37/tests/pngunknown-discard | 2 - .../libpng-1.6.37/tests/pngunknown-if-safe | 2 - .../libpng-1.6.37/tests/pngunknown-sAPI | 2 - .../libpng-1.6.37/tests/pngunknown-sTER | 2 - .../libpng-1.6.37/tests/pngunknown-save | 2 - .../libpng-1.6.37/tests/pngunknown-vpAg | 2 - .../tests/pngvalid-gamma-16-to-8 | 2 - .../tests/pngvalid-gamma-alpha-mode | 2 - .../tests/pngvalid-gamma-background | 2 - .../tests/pngvalid-gamma-expand16-alpha-mode | 2 - .../tests/pngvalid-gamma-expand16-background | 2 - .../tests/pngvalid-gamma-expand16-transform | 2 - .../libpng-1.6.37/tests/pngvalid-gamma-sbit | 2 - .../tests/pngvalid-gamma-threshold | 2 - .../tests/pngvalid-gamma-transform | 2 - .../pngvalid-progressive-interlace-standard | 2 - .../tests/pngvalid-progressive-size | 2 - .../tests/pngvalid-progressive-standard | 2 - .../libpng-1.6.37/tests/pngvalid-standard | 2 - .../libpng-1.6.37/tests/pngvalid-transform | 2 - thirdparty/zlib-1.2.12/CMakeLists.txt | 249 - thirdparty/zlib-1.2.12/ChangeLog | 1578 -- thirdparty/zlib-1.2.12/FAQ | 368 - thirdparty/zlib-1.2.12/INDEX | 68 - thirdparty/zlib-1.2.12/Makefile | 408 - thirdparty/zlib-1.2.12/Makefile.in | 408 - thirdparty/zlib-1.2.12/README | 118 - thirdparty/zlib-1.2.12/adler32.c | 186 - thirdparty/zlib-1.2.12/amiga/Makefile.pup | 69 - thirdparty/zlib-1.2.12/amiga/Makefile.sas | 68 - thirdparty/zlib-1.2.12/compress.c | 86 - thirdparty/zlib-1.2.12/configure | 927 - thirdparty/zlib-1.2.12/configure.log | 7468 ------- thirdparty/zlib-1.2.12/contrib/README.contrib | 57 - .../zlib-1.2.12/contrib/ada/buffer_demo.adb | 106 - thirdparty/zlib-1.2.12/contrib/ada/mtest.adb | 156 - thirdparty/zlib-1.2.12/contrib/ada/read.adb | 156 - thirdparty/zlib-1.2.12/contrib/ada/readme.txt | 65 - thirdparty/zlib-1.2.12/contrib/ada/test.adb | 463 - .../zlib-1.2.12/contrib/ada/zlib-streams.adb | 225 - .../zlib-1.2.12/contrib/ada/zlib-streams.ads | 114 - .../zlib-1.2.12/contrib/ada/zlib-thin.adb | 141 - .../zlib-1.2.12/contrib/ada/zlib-thin.ads | 450 - thirdparty/zlib-1.2.12/contrib/ada/zlib.adb | 701 - thirdparty/zlib-1.2.12/contrib/ada/zlib.ads | 328 - thirdparty/zlib-1.2.12/contrib/ada/zlib.gpr | 20 - thirdparty/zlib-1.2.12/contrib/blast/Makefile | 8 - thirdparty/zlib-1.2.12/contrib/blast/README | 4 - thirdparty/zlib-1.2.12/contrib/blast/blast.c | 466 - thirdparty/zlib-1.2.12/contrib/blast/blast.h | 83 - thirdparty/zlib-1.2.12/contrib/blast/test.pk | Bin 8 -> 0 bytes thirdparty/zlib-1.2.12/contrib/blast/test.txt | 1 - .../zlib-1.2.12/contrib/delphi/ZLib.pas | 557 - .../zlib-1.2.12/contrib/delphi/ZLibConst.pas | 11 - .../zlib-1.2.12/contrib/delphi/readme.txt | 76 - .../zlib-1.2.12/contrib/delphi/zlibd32.mak | 99 - .../zlib-1.2.12/contrib/dotzlib/DotZLib.build | 33 - .../zlib-1.2.12/contrib/dotzlib/DotZLib.chm | Bin 72726 -> 0 bytes .../zlib-1.2.12/contrib/dotzlib/DotZLib.sln | 21 - .../contrib/dotzlib/DotZLib/AssemblyInfo.cs | 58 - .../contrib/dotzlib/DotZLib/ChecksumImpl.cs | 202 - .../contrib/dotzlib/DotZLib/CircularBuffer.cs | 83 - .../contrib/dotzlib/DotZLib/CodecBase.cs | 198 - .../contrib/dotzlib/DotZLib/Deflater.cs | 106 - .../contrib/dotzlib/DotZLib/DotZLib.cs | 288 - .../contrib/dotzlib/DotZLib/DotZLib.csproj | 141 - .../contrib/dotzlib/DotZLib/GZipStream.cs | 301 - .../contrib/dotzlib/DotZLib/Inflater.cs | 105 - .../contrib/dotzlib/DotZLib/UnitTests.cs | 274 - .../contrib/dotzlib/LICENSE_1_0.txt | 23 - .../zlib-1.2.12/contrib/dotzlib/readme.txt | 58 - .../zlib-1.2.12/contrib/gcc_gvmat64/gvmat64.S | 574 - .../zlib-1.2.12/contrib/infback9/README | 1 - .../zlib-1.2.12/contrib/infback9/infback9.c | 615 - .../zlib-1.2.12/contrib/infback9/infback9.h | 37 - .../zlib-1.2.12/contrib/infback9/inffix9.h | 107 - .../zlib-1.2.12/contrib/infback9/inflate9.h | 47 - .../zlib-1.2.12/contrib/infback9/inftree9.c | 324 - .../zlib-1.2.12/contrib/infback9/inftree9.h | 61 - .../zlib-1.2.12/contrib/iostream/test.cpp | 24 - .../zlib-1.2.12/contrib/iostream/zfstream.cpp | 329 - .../zlib-1.2.12/contrib/iostream/zfstream.h | 128 - .../zlib-1.2.12/contrib/iostream2/zstream.h | 307 - .../contrib/iostream2/zstream_test.cpp | 25 - .../zlib-1.2.12/contrib/iostream3/README | 35 - thirdparty/zlib-1.2.12/contrib/iostream3/TODO | 17 - .../zlib-1.2.12/contrib/iostream3/test.cc | 50 - .../zlib-1.2.12/contrib/iostream3/zfstream.cc | 479 - .../zlib-1.2.12/contrib/iostream3/zfstream.h | 466 - .../zlib-1.2.12/contrib/minizip/Makefile | 29 - .../zlib-1.2.12/contrib/minizip/Makefile.am | 45 - .../contrib/minizip/MiniZip64_Changes.txt | 6 - .../contrib/minizip/MiniZip64_info.txt | 74 - .../zlib-1.2.12/contrib/minizip/configure.ac | 32 - .../zlib-1.2.12/contrib/minizip/crypt.h | 132 - .../zlib-1.2.12/contrib/minizip/ioapi.c | 257 - .../zlib-1.2.12/contrib/minizip/ioapi.h | 210 - .../zlib-1.2.12/contrib/minizip/iowin32.c | 462 - .../zlib-1.2.12/contrib/minizip/iowin32.h | 28 - .../zlib-1.2.12/contrib/minizip/make_vms.com | 25 - .../zlib-1.2.12/contrib/minizip/miniunz.c | 659 - .../zlib-1.2.12/contrib/minizip/miniunzip.1 | 63 - .../zlib-1.2.12/contrib/minizip/minizip.1 | 46 - .../zlib-1.2.12/contrib/minizip/minizip.c | 521 - .../zlib-1.2.12/contrib/minizip/minizip.pc.in | 12 - .../zlib-1.2.12/contrib/minizip/mztools.c | 291 - .../zlib-1.2.12/contrib/minizip/mztools.h | 37 - .../zlib-1.2.12/contrib/minizip/unzip.c | 2128 -- .../zlib-1.2.12/contrib/minizip/unzip.h | 437 - thirdparty/zlib-1.2.12/contrib/minizip/zip.c | 2007 -- thirdparty/zlib-1.2.12/contrib/minizip/zip.h | 367 - .../zlib-1.2.12/contrib/pascal/example.pas | 599 - .../zlib-1.2.12/contrib/pascal/readme.txt | 76 - .../zlib-1.2.12/contrib/pascal/zlibd32.mak | 99 - .../zlib-1.2.12/contrib/pascal/zlibpas.pas | 276 - thirdparty/zlib-1.2.12/contrib/puff/Makefile | 42 - thirdparty/zlib-1.2.12/contrib/puff/README | 63 - thirdparty/zlib-1.2.12/contrib/puff/puff.c | 840 - thirdparty/zlib-1.2.12/contrib/puff/puff.h | 35 - .../zlib-1.2.12/contrib/puff/pufftest.c | 165 - thirdparty/zlib-1.2.12/contrib/puff/zeros.raw | Bin 2517 -> 0 bytes .../zlib-1.2.12/contrib/testzlib/testzlib.c | 275 - .../zlib-1.2.12/contrib/testzlib/testzlib.txt | 10 - thirdparty/zlib-1.2.12/contrib/untgz/Makefile | 14 - .../zlib-1.2.12/contrib/untgz/Makefile.msc | 17 - thirdparty/zlib-1.2.12/contrib/untgz/untgz.c | 674 - .../zlib-1.2.12/contrib/vstudio/readme.txt | 78 - .../contrib/vstudio/vc10/miniunz.vcxproj | 310 - .../vstudio/vc10/miniunz.vcxproj.filters | 22 - .../contrib/vstudio/vc10/minizip.vcxproj | 307 - .../vstudio/vc10/minizip.vcxproj.filters | 22 - .../contrib/vstudio/vc10/testzlib.vcxproj | 420 - .../vstudio/vc10/testzlib.vcxproj.filters | 58 - .../contrib/vstudio/vc10/testzlibdll.vcxproj | 310 - .../vstudio/vc10/testzlibdll.vcxproj.filters | 22 - .../zlib-1.2.12/contrib/vstudio/vc10/zlib.rc | 32 - .../contrib/vstudio/vc10/zlibstat.vcxproj | 473 - .../vstudio/vc10/zlibstat.vcxproj.filters | 77 - .../contrib/vstudio/vc10/zlibvc.def | 158 - .../contrib/vstudio/vc10/zlibvc.sln | 135 - .../contrib/vstudio/vc10/zlibvc.vcxproj | 657 - .../vstudio/vc10/zlibvc.vcxproj.filters | 118 - .../contrib/vstudio/vc11/miniunz.vcxproj | 314 - .../contrib/vstudio/vc11/minizip.vcxproj | 311 - .../contrib/vstudio/vc11/testzlib.vcxproj | 426 - .../contrib/vstudio/vc11/testzlibdll.vcxproj | 314 - .../zlib-1.2.12/contrib/vstudio/vc11/zlib.rc | 32 - .../contrib/vstudio/vc11/zlibstat.vcxproj | 464 - .../contrib/vstudio/vc11/zlibvc.def | 158 - .../contrib/vstudio/vc11/zlibvc.sln | 117 - .../contrib/vstudio/vc11/zlibvc.vcxproj | 688 - .../contrib/vstudio/vc12/miniunz.vcxproj | 316 - .../contrib/vstudio/vc12/minizip.vcxproj | 313 - .../contrib/vstudio/vc12/testzlib.vcxproj | 430 - .../contrib/vstudio/vc12/testzlibdll.vcxproj | 316 - .../zlib-1.2.12/contrib/vstudio/vc12/zlib.rc | 32 - .../contrib/vstudio/vc12/zlibstat.vcxproj | 467 - .../contrib/vstudio/vc12/zlibvc.def | 158 - .../contrib/vstudio/vc12/zlibvc.sln | 119 - .../contrib/vstudio/vc12/zlibvc.vcxproj | 692 - .../contrib/vstudio/vc14/miniunz.vcxproj | 316 - .../contrib/vstudio/vc14/minizip.vcxproj | 313 - .../contrib/vstudio/vc14/testzlib.vcxproj | 430 - .../contrib/vstudio/vc14/testzlibdll.vcxproj | 316 - .../zlib-1.2.12/contrib/vstudio/vc14/zlib.rc | 32 - .../contrib/vstudio/vc14/zlibstat.vcxproj | 467 - .../contrib/vstudio/vc14/zlibvc.def | 158 - .../contrib/vstudio/vc14/zlibvc.sln | 119 - .../contrib/vstudio/vc14/zlibvc.vcxproj | 692 - .../contrib/vstudio/vc9/miniunz.vcproj | 565 - .../contrib/vstudio/vc9/minizip.vcproj | 562 - .../contrib/vstudio/vc9/testzlib.vcproj | 852 - .../contrib/vstudio/vc9/testzlibdll.vcproj | 565 - .../zlib-1.2.12/contrib/vstudio/vc9/zlib.rc | 32 - .../contrib/vstudio/vc9/zlibstat.vcproj | 835 - .../contrib/vstudio/vc9/zlibvc.def | 158 - .../contrib/vstudio/vc9/zlibvc.sln | 144 - .../contrib/vstudio/vc9/zlibvc.vcproj | 1156 -- thirdparty/zlib-1.2.12/crc32.c | 1116 -- thirdparty/zlib-1.2.12/crc32.h | 9446 --------- thirdparty/zlib-1.2.12/deflate.c | 2211 --- thirdparty/zlib-1.2.12/deflate.h | 346 - thirdparty/zlib-1.2.12/doc/algorithm.txt | 209 - thirdparty/zlib-1.2.12/doc/crc-doc.1.0.pdf | Bin 776142 -> 0 bytes thirdparty/zlib-1.2.12/doc/rfc1950.txt | 619 - thirdparty/zlib-1.2.12/doc/rfc1951.txt | 955 - thirdparty/zlib-1.2.12/doc/rfc1952.txt | 675 - thirdparty/zlib-1.2.12/doc/txtvsbin.txt | 107 - .../zlib-1.2.12/examples/README.examples | 54 - thirdparty/zlib-1.2.12/examples/enough.c | 597 - thirdparty/zlib-1.2.12/examples/fitblk.c | 233 - thirdparty/zlib-1.2.12/examples/gun.c | 702 - thirdparty/zlib-1.2.12/examples/gzappend.c | 504 - thirdparty/zlib-1.2.12/examples/gzjoin.c | 449 - thirdparty/zlib-1.2.12/examples/gzlog.c | 1061 - thirdparty/zlib-1.2.12/examples/gzlog.h | 91 - thirdparty/zlib-1.2.12/examples/gznorm.c | 470 - thirdparty/zlib-1.2.12/examples/zlib_how.html | 545 - thirdparty/zlib-1.2.12/examples/zpipe.c | 205 - thirdparty/zlib-1.2.12/examples/zran.c | 479 - thirdparty/zlib-1.2.12/examples/zran.h | 40 - thirdparty/zlib-1.2.12/gzclose.c | 25 - thirdparty/zlib-1.2.12/gzguts.h | 219 - thirdparty/zlib-1.2.12/gzlib.c | 639 - thirdparty/zlib-1.2.12/gzread.c | 652 - thirdparty/zlib-1.2.12/gzwrite.c | 677 - thirdparty/zlib-1.2.12/infback.c | 641 - thirdparty/zlib-1.2.12/inffast.c | 323 - thirdparty/zlib-1.2.12/inffast.h | 11 - thirdparty/zlib-1.2.12/inffixed.h | 94 - thirdparty/zlib-1.2.12/inflate.c | 1592 -- thirdparty/zlib-1.2.12/inflate.h | 126 - thirdparty/zlib-1.2.12/inftrees.c | 304 - thirdparty/zlib-1.2.12/inftrees.h | 62 - thirdparty/zlib-1.2.12/make_vms.com | 867 - thirdparty/zlib-1.2.12/msdos/Makefile.bor | 115 - thirdparty/zlib-1.2.12/msdos/Makefile.dj2 | 104 - thirdparty/zlib-1.2.12/msdos/Makefile.emx | 69 - thirdparty/zlib-1.2.12/msdos/Makefile.msc | 112 - thirdparty/zlib-1.2.12/msdos/Makefile.tc | 100 - thirdparty/zlib-1.2.12/nintendods/Makefile | 126 - thirdparty/zlib-1.2.12/nintendods/README | 5 - thirdparty/zlib-1.2.12/old/Makefile.emx | 69 - thirdparty/zlib-1.2.12/old/Makefile.riscos | 151 - thirdparty/zlib-1.2.12/old/README | 3 - thirdparty/zlib-1.2.12/old/descrip.mms | 48 - thirdparty/zlib-1.2.12/old/os2/Makefile.os2 | 136 - thirdparty/zlib-1.2.12/old/os2/zlib.def | 51 - thirdparty/zlib-1.2.12/old/visual-basic.txt | 160 - thirdparty/zlib-1.2.12/os400/README400 | 48 - thirdparty/zlib-1.2.12/os400/bndsrc | 119 - thirdparty/zlib-1.2.12/os400/make.sh | 366 - thirdparty/zlib-1.2.12/os400/zlib.inc | 527 - thirdparty/zlib-1.2.12/qnx/package.qpg | 141 - thirdparty/zlib-1.2.12/test/example.c | 601 - thirdparty/zlib-1.2.12/test/infcover.c | 671 - thirdparty/zlib-1.2.12/test/minigzip.c | 651 - thirdparty/zlib-1.2.12/treebuild.xml | 116 - thirdparty/zlib-1.2.12/trees.c | 1182 -- thirdparty/zlib-1.2.12/trees.h | 128 - thirdparty/zlib-1.2.12/uncompr.c | 93 - thirdparty/zlib-1.2.12/watcom/watcom_f.mak | 43 - thirdparty/zlib-1.2.12/watcom/watcom_l.mak | 43 - thirdparty/zlib-1.2.12/win32/DLL_FAQ.txt | 397 - thirdparty/zlib-1.2.12/win32/Makefile.bor | 109 - thirdparty/zlib-1.2.12/win32/Makefile.gcc | 177 - thirdparty/zlib-1.2.12/win32/Makefile.msc | 159 - thirdparty/zlib-1.2.12/win32/README-WIN32.txt | 103 - thirdparty/zlib-1.2.12/win32/VisualC.txt | 3 - thirdparty/zlib-1.2.12/win32/zlib.def | 97 - thirdparty/zlib-1.2.12/win32/zlib1.rc | 40 - thirdparty/zlib-1.2.12/zconf.h | 534 - thirdparty/zlib-1.2.12/zconf.h.cmakein | 536 - thirdparty/zlib-1.2.12/zconf.h.in | 534 - thirdparty/zlib-1.2.12/zlib.3 | 149 - thirdparty/zlib-1.2.12/zlib.3.pdf | Bin 8848 -> 0 bytes thirdparty/zlib-1.2.12/zlib.h | 1935 -- thirdparty/zlib-1.2.12/zlib.map | 100 - thirdparty/zlib-1.2.12/zlib.pc | 13 - thirdparty/zlib-1.2.12/zlib.pc.cmakein | 13 - thirdparty/zlib-1.2.12/zlib.pc.in | 13 - thirdparty/zlib-1.2.12/zlib2ansi | 152 - thirdparty/zlib-1.2.12/zutil.c | 325 - thirdparty/zlib-1.2.12/zutil.h | 274 - 2003 files changed, 528 insertions(+), 510427 deletions(-) delete mode 100755 buildPrerequisites.sh create mode 100644 client/src/gui/surface.c create mode 100644 client/src/gui/surface.h delete mode 100644 client/src/platform/grx.c delete mode 100644 client/src/platform/grx.h delete mode 100644 makedefs.grx delete mode 120000 thirdparty/grx249/Makefile delete mode 100644 thirdparty/grx249/addons/bmp/bmp.c delete mode 100644 thirdparty/grx249/addons/bmp/bmp.hlp delete mode 100644 thirdparty/grx249/addons/bmp/bmptest.c delete mode 100644 thirdparty/grx249/addons/bmp/grxbmp.h delete mode 100644 thirdparty/grx249/addons/ctx2tiff.c delete mode 100644 thirdparty/grx249/addons/print/copying.uz delete mode 100644 thirdparty/grx249/addons/print/grxprint.c delete mode 100644 thirdparty/grx249/addons/print/grxprint.h delete mode 100644 thirdparty/grx249/addons/print/grxprint.lo delete mode 100644 thirdparty/grx249/addons/print/grxprint.txt delete mode 100644 thirdparty/grx249/addons/print/grxprn00.h delete mode 100644 thirdparty/grx249/addons/print/printer.doc delete mode 100644 thirdparty/grx249/addons/print/printest.c delete mode 100644 thirdparty/grx249/addons/print/prndata.c delete mode 100644 thirdparty/grx249/addons/print/prndata.lo delete mode 100644 thirdparty/grx249/addons/print/readme.txt delete mode 100644 thirdparty/grx249/addons/print/readme.uz delete mode 100755 thirdparty/grx249/chr/addfonts.bat delete mode 100755 thirdparty/grx249/chr/addfonts.sh delete mode 100755 thirdparty/grx249/chr/addfonts.x11 delete mode 100644 thirdparty/grx249/compat/grx.h delete mode 100644 thirdparty/grx249/compat/mousex.h delete mode 100755 thirdparty/grx249/configure delete mode 100644 thirdparty/grx249/copying delete mode 100644 thirdparty/grx249/copying.grx delete mode 100644 thirdparty/grx249/copying.lib delete mode 100644 thirdparty/grx249/copying.mit delete mode 100644 thirdparty/grx249/doc/changes.bgi delete mode 100644 thirdparty/grx249/doc/changes.txt delete mode 100644 thirdparty/grx249/doc/copying.cb delete mode 100644 thirdparty/grx249/doc/credits.doc delete mode 100644 thirdparty/grx249/doc/fna.txt delete mode 100644 thirdparty/grx249/doc/grx249um.html delete mode 100644 thirdparty/grx249/doc/grx249um.inf delete mode 100644 thirdparty/grx249/doc/old/api.doc delete mode 100644 thirdparty/grx249/doc/old/install.doc delete mode 100644 thirdparty/grx249/doc/old/internal.doc delete mode 100644 thirdparty/grx249/doc/old/readme.20 delete mode 100644 thirdparty/grx249/doc/old/readme.22 delete mode 100644 thirdparty/grx249/doc/old/readme.23 delete mode 100644 thirdparty/grx249/doc/old/tests.doc delete mode 100644 thirdparty/grx249/doc/problems.htm delete mode 100644 thirdparty/grx249/doc/readme.bgi delete mode 100644 thirdparty/grx249/doc/tex/grx2.tex delete mode 100644 thirdparty/grx249/doc/tex/grx2_0.tex delete mode 100755 thirdparty/grx249/doc/tex/makinf.bat delete mode 100644 thirdparty/grx249/doc/tex/readme delete mode 100644 thirdparty/grx249/doc/watcom.txt delete mode 100644 thirdparty/grx249/fonts/char11.fnt delete mode 100644 thirdparty/grx249/fonts/char11b.fnt delete mode 100644 thirdparty/grx249/fonts/char11bi.fnt delete mode 100644 thirdparty/grx249/fonts/char11i.fnt delete mode 100644 thirdparty/grx249/fonts/char14.fnt delete mode 100644 thirdparty/grx249/fonts/char14b.fnt delete mode 100644 thirdparty/grx249/fonts/char14bi.fnt delete mode 100644 thirdparty/grx249/fonts/char14i.fnt delete mode 100644 thirdparty/grx249/fonts/char16.fnt delete mode 100644 thirdparty/grx249/fonts/char16b.fnt delete mode 100644 thirdparty/grx249/fonts/char16bi.fnt delete mode 100644 thirdparty/grx249/fonts/char16i.fnt delete mode 100644 thirdparty/grx249/fonts/char18.fnt delete mode 100644 thirdparty/grx249/fonts/char18b.fnt delete mode 100644 thirdparty/grx249/fonts/char18bi.fnt delete mode 100644 thirdparty/grx249/fonts/char18i.fnt delete mode 100644 thirdparty/grx249/fonts/char23.fnt delete mode 100644 thirdparty/grx249/fonts/char23b.fnt delete mode 100644 thirdparty/grx249/fonts/char23bi.fnt delete mode 100644 thirdparty/grx249/fonts/char23i.fnt delete mode 100644 thirdparty/grx249/fonts/char30.fnt delete mode 100644 thirdparty/grx249/fonts/char30b.fnt delete mode 100644 thirdparty/grx249/fonts/char30bi.fnt delete mode 100644 thirdparty/grx249/fonts/char30i.fnt delete mode 100644 thirdparty/grx249/fonts/char40.fnt delete mode 100644 thirdparty/grx249/fonts/char40b.fnt delete mode 100644 thirdparty/grx249/fonts/char40bi.fnt delete mode 100644 thirdparty/grx249/fonts/char40i.fnt delete mode 100644 thirdparty/grx249/fonts/cour11.fnt delete mode 100644 thirdparty/grx249/fonts/cour11b.fnt delete mode 100644 thirdparty/grx249/fonts/cour11bi.fnt delete mode 100644 thirdparty/grx249/fonts/cour11i.fnt delete mode 100644 thirdparty/grx249/fonts/cour12.fnt delete mode 100644 thirdparty/grx249/fonts/cour12b.fnt delete mode 100644 thirdparty/grx249/fonts/cour12bi.fnt delete mode 100644 thirdparty/grx249/fonts/cour12i.fnt delete mode 100644 thirdparty/grx249/fonts/cour14.fnt delete mode 100644 thirdparty/grx249/fonts/cour14b.fnt delete mode 100644 thirdparty/grx249/fonts/cour14bi.fnt delete mode 100644 thirdparty/grx249/fonts/cour14i.fnt delete mode 100644 thirdparty/grx249/fonts/cour16.fnt delete mode 100644 thirdparty/grx249/fonts/cour16b.fnt delete mode 100644 thirdparty/grx249/fonts/cour16bi.fnt delete mode 100644 thirdparty/grx249/fonts/cour16i.fnt delete mode 100644 thirdparty/grx249/fonts/cour20.fnt delete mode 100644 thirdparty/grx249/fonts/cour20b.fnt delete mode 100644 thirdparty/grx249/fonts/cour20bi.fnt delete mode 100644 thirdparty/grx249/fonts/cour20i.fnt delete mode 100644 thirdparty/grx249/fonts/cour25.fnt delete mode 100644 thirdparty/grx249/fonts/cour25b.fnt delete mode 100644 thirdparty/grx249/fonts/cour25bi.fnt delete mode 100644 thirdparty/grx249/fonts/cour25i.fnt delete mode 100644 thirdparty/grx249/fonts/cour34.fnt delete mode 100644 thirdparty/grx249/fonts/cour34b.fnt delete mode 100644 thirdparty/grx249/fonts/cour34bi.fnt delete mode 100644 thirdparty/grx249/fonts/cour34i.fnt delete mode 100644 thirdparty/grx249/fonts/helv11.fnt delete mode 100644 thirdparty/grx249/fonts/helv11b.fnt delete mode 100644 thirdparty/grx249/fonts/helv11bi.fnt delete mode 100644 thirdparty/grx249/fonts/helv11i.fnt delete mode 100644 thirdparty/grx249/fonts/helv13.fnt delete mode 100644 thirdparty/grx249/fonts/helv13b.fnt delete mode 100644 thirdparty/grx249/fonts/helv13bi.fnt delete mode 100644 thirdparty/grx249/fonts/helv13i.fnt delete mode 100644 thirdparty/grx249/fonts/helv15.fnt delete mode 100644 thirdparty/grx249/fonts/helv15b.fnt delete mode 100644 thirdparty/grx249/fonts/helv15bi.fnt delete mode 100644 thirdparty/grx249/fonts/helv15i.fnt delete mode 100644 thirdparty/grx249/fonts/helv17.fnt delete mode 100644 thirdparty/grx249/fonts/helv17b.fnt delete mode 100644 thirdparty/grx249/fonts/helv17bi.fnt delete mode 100644 thirdparty/grx249/fonts/helv17i.fnt delete mode 100644 thirdparty/grx249/fonts/helv22.fnt delete mode 100644 thirdparty/grx249/fonts/helv22b.fnt delete mode 100644 thirdparty/grx249/fonts/helv22bi.fnt delete mode 100644 thirdparty/grx249/fonts/helv22i.fnt delete mode 100644 thirdparty/grx249/fonts/helv29.fnt delete mode 100644 thirdparty/grx249/fonts/helv29b.fnt delete mode 100644 thirdparty/grx249/fonts/helv29bi.fnt delete mode 100644 thirdparty/grx249/fonts/helv29i.fnt delete mode 100644 thirdparty/grx249/fonts/helv38.fnt delete mode 100644 thirdparty/grx249/fonts/helv38b.fnt delete mode 100644 thirdparty/grx249/fonts/helv38bi.fnt delete mode 100644 thirdparty/grx249/fonts/helv38i.fnt delete mode 100644 thirdparty/grx249/fonts/lucb11.fnt delete mode 100644 thirdparty/grx249/fonts/lucb11b.fnt delete mode 100644 thirdparty/grx249/fonts/lucb11bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucb11i.fnt delete mode 100644 thirdparty/grx249/fonts/lucb12.fnt delete mode 100644 thirdparty/grx249/fonts/lucb12b.fnt delete mode 100644 thirdparty/grx249/fonts/lucb12bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucb12i.fnt delete mode 100644 thirdparty/grx249/fonts/lucb15.fnt delete mode 100644 thirdparty/grx249/fonts/lucb15b.fnt delete mode 100644 thirdparty/grx249/fonts/lucb15bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucb15i.fnt delete mode 100644 thirdparty/grx249/fonts/lucb17.fnt delete mode 100644 thirdparty/grx249/fonts/lucb17b.fnt delete mode 100644 thirdparty/grx249/fonts/lucb17bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucb17i.fnt delete mode 100644 thirdparty/grx249/fonts/lucb21.fnt delete mode 100644 thirdparty/grx249/fonts/lucb21b.fnt delete mode 100644 thirdparty/grx249/fonts/lucb21bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucb21i.fnt delete mode 100644 thirdparty/grx249/fonts/lucb27.fnt delete mode 100644 thirdparty/grx249/fonts/lucb27b.fnt delete mode 100644 thirdparty/grx249/fonts/lucb27bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucb27i.fnt delete mode 100644 thirdparty/grx249/fonts/lucb40.fnt delete mode 100644 thirdparty/grx249/fonts/lucb40b.fnt delete mode 100644 thirdparty/grx249/fonts/lucb40bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucb40i.fnt delete mode 100644 thirdparty/grx249/fonts/lucs11.fnt delete mode 100644 thirdparty/grx249/fonts/lucs11b.fnt delete mode 100644 thirdparty/grx249/fonts/lucs11bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucs11i.fnt delete mode 100644 thirdparty/grx249/fonts/lucs12.fnt delete mode 100644 thirdparty/grx249/fonts/lucs12b.fnt delete mode 100644 thirdparty/grx249/fonts/lucs12bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucs12i.fnt delete mode 100644 thirdparty/grx249/fonts/lucs15.fnt delete mode 100644 thirdparty/grx249/fonts/lucs15b.fnt delete mode 100644 thirdparty/grx249/fonts/lucs15bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucs15i.fnt delete mode 100644 thirdparty/grx249/fonts/lucs17.fnt delete mode 100644 thirdparty/grx249/fonts/lucs17b.fnt delete mode 100644 thirdparty/grx249/fonts/lucs17bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucs17i.fnt delete mode 100644 thirdparty/grx249/fonts/lucs21.fnt delete mode 100644 thirdparty/grx249/fonts/lucs21b.fnt delete mode 100644 thirdparty/grx249/fonts/lucs21bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucs21i.fnt delete mode 100644 thirdparty/grx249/fonts/lucs27.fnt delete mode 100644 thirdparty/grx249/fonts/lucs27b.fnt delete mode 100644 thirdparty/grx249/fonts/lucs27bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucs27i.fnt delete mode 100644 thirdparty/grx249/fonts/lucs40.fnt delete mode 100644 thirdparty/grx249/fonts/lucs40b.fnt delete mode 100644 thirdparty/grx249/fonts/lucs40bi.fnt delete mode 100644 thirdparty/grx249/fonts/lucs40i.fnt delete mode 100644 thirdparty/grx249/fonts/luct10.fnt delete mode 100644 thirdparty/grx249/fonts/luct10b.fnt delete mode 100644 thirdparty/grx249/fonts/luct11.fnt delete mode 100644 thirdparty/grx249/fonts/luct11b.fnt delete mode 100644 thirdparty/grx249/fonts/luct13.fnt delete mode 100644 thirdparty/grx249/fonts/luct13b.fnt delete mode 100644 thirdparty/grx249/fonts/luct15.fnt delete mode 100644 thirdparty/grx249/fonts/luct15b.fnt delete mode 100644 thirdparty/grx249/fonts/luct19.fnt delete mode 100644 thirdparty/grx249/fonts/luct19b.fnt delete mode 100644 thirdparty/grx249/fonts/luct27.fnt delete mode 100644 thirdparty/grx249/fonts/luct27b.fnt delete mode 100644 thirdparty/grx249/fonts/luct38.fnt delete mode 100644 thirdparty/grx249/fonts/luct38b.fnt delete mode 100644 thirdparty/grx249/fonts/ncen11.fnt delete mode 100644 thirdparty/grx249/fonts/ncen11b.fnt delete mode 100644 thirdparty/grx249/fonts/ncen11bi.fnt delete mode 100644 thirdparty/grx249/fonts/ncen11i.fnt delete mode 100644 thirdparty/grx249/fonts/ncen13.fnt delete mode 100644 thirdparty/grx249/fonts/ncen13b.fnt delete mode 100644 thirdparty/grx249/fonts/ncen13bi.fnt delete mode 100644 thirdparty/grx249/fonts/ncen13i.fnt delete mode 100644 thirdparty/grx249/fonts/ncen15.fnt delete mode 100644 thirdparty/grx249/fonts/ncen15b.fnt delete mode 100644 thirdparty/grx249/fonts/ncen15bi.fnt delete mode 100644 thirdparty/grx249/fonts/ncen15i.fnt delete mode 100644 thirdparty/grx249/fonts/ncen18.fnt delete mode 100644 thirdparty/grx249/fonts/ncen18b.fnt delete mode 100644 thirdparty/grx249/fonts/ncen18bi.fnt delete mode 100644 thirdparty/grx249/fonts/ncen18i.fnt delete mode 100644 thirdparty/grx249/fonts/ncen22.fnt delete mode 100644 thirdparty/grx249/fonts/ncen22b.fnt delete mode 100644 thirdparty/grx249/fonts/ncen22bi.fnt delete mode 100644 thirdparty/grx249/fonts/ncen22i.fnt delete mode 100644 thirdparty/grx249/fonts/ncen29.fnt delete mode 100644 thirdparty/grx249/fonts/ncen29b.fnt delete mode 100644 thirdparty/grx249/fonts/ncen29bi.fnt delete mode 100644 thirdparty/grx249/fonts/ncen29i.fnt delete mode 100644 thirdparty/grx249/fonts/ncen40.fnt delete mode 100644 thirdparty/grx249/fonts/ncen40b.fnt delete mode 100644 thirdparty/grx249/fonts/ncen40bi.fnt delete mode 100644 thirdparty/grx249/fonts/ncen40i.fnt delete mode 100644 thirdparty/grx249/fonts/pc6x14.fnt delete mode 100644 thirdparty/grx249/fonts/pc6x8.fnt delete mode 100644 thirdparty/grx249/fonts/pc8x14.fnt delete mode 100644 thirdparty/grx249/fonts/pc8x14t.fnt delete mode 100644 thirdparty/grx249/fonts/pc8x16.fnt delete mode 100644 thirdparty/grx249/fonts/pc8x8.fnt delete mode 100644 thirdparty/grx249/fonts/pc8x8t.fnt delete mode 100644 thirdparty/grx249/fonts/symb11.fnt delete mode 100644 thirdparty/grx249/fonts/symb14.fnt delete mode 100644 thirdparty/grx249/fonts/symb16.fnt delete mode 100644 thirdparty/grx249/fonts/symb20.fnt delete mode 100644 thirdparty/grx249/fonts/symb25.fnt delete mode 100644 thirdparty/grx249/fonts/symb32.fnt delete mode 100644 thirdparty/grx249/fonts/symb34.fnt delete mode 100644 thirdparty/grx249/fonts/ter-114b.res delete mode 100644 thirdparty/grx249/fonts/ter-114n.fna delete mode 100644 thirdparty/grx249/fonts/ter-114v.psf delete mode 100644 thirdparty/grx249/fonts/tms11.fnt delete mode 100644 thirdparty/grx249/fonts/tms11b.fnt delete mode 100644 thirdparty/grx249/fonts/tms11bi.fnt delete mode 100644 thirdparty/grx249/fonts/tms11i.fnt delete mode 100644 thirdparty/grx249/fonts/tms13.fnt delete mode 100644 thirdparty/grx249/fonts/tms13b.fnt delete mode 100644 thirdparty/grx249/fonts/tms13bi.fnt delete mode 100644 thirdparty/grx249/fonts/tms13i.fnt delete mode 100644 thirdparty/grx249/fonts/tms15.fnt delete mode 100644 thirdparty/grx249/fonts/tms15b.fnt delete mode 100644 thirdparty/grx249/fonts/tms15bi.fnt delete mode 100644 thirdparty/grx249/fonts/tms15i.fnt delete mode 100644 thirdparty/grx249/fonts/tms18.fnt delete mode 100644 thirdparty/grx249/fonts/tms18b.fnt delete mode 100644 thirdparty/grx249/fonts/tms18bi.fnt delete mode 100644 thirdparty/grx249/fonts/tms18i.fnt delete mode 100644 thirdparty/grx249/fonts/tms22.fnt delete mode 100644 thirdparty/grx249/fonts/tms22b.fnt delete mode 100644 thirdparty/grx249/fonts/tms22bi.fnt delete mode 100644 thirdparty/grx249/fonts/tms22i.fnt delete mode 100644 thirdparty/grx249/fonts/tms29.fnt delete mode 100644 thirdparty/grx249/fonts/tms29b.fnt delete mode 100644 thirdparty/grx249/fonts/tms29bi.fnt delete mode 100644 thirdparty/grx249/fonts/tms29i.fnt delete mode 100644 thirdparty/grx249/fonts/tms38.fnt delete mode 100644 thirdparty/grx249/fonts/tms38b.fnt delete mode 100644 thirdparty/grx249/fonts/tms38bi.fnt delete mode 100644 thirdparty/grx249/fonts/tms38i.fnt delete mode 100644 thirdparty/grx249/fonts/xfonts.dir delete mode 100644 thirdparty/grx249/fonts/xm10x17.fnt delete mode 100644 thirdparty/grx249/fonts/xm10x17b.fnt delete mode 100644 thirdparty/grx249/fonts/xm10x20.fnt delete mode 100644 thirdparty/grx249/fonts/xm10x20b.fnt delete mode 100644 thirdparty/grx249/fonts/xm11x19b.fnt delete mode 100644 thirdparty/grx249/fonts/xm12x15.fnt delete mode 100644 thirdparty/grx249/fonts/xm12x20.fnt delete mode 100644 thirdparty/grx249/fonts/xm12x20b.fnt delete mode 100644 thirdparty/grx249/fonts/xm12x23.fnt delete mode 100644 thirdparty/grx249/fonts/xm12x24.fnt delete mode 100644 thirdparty/grx249/fonts/xm14x26.fnt delete mode 100644 thirdparty/grx249/fonts/xm16x25.fnt delete mode 100644 thirdparty/grx249/fonts/xm16x25b.fnt delete mode 100644 thirdparty/grx249/fonts/xm16x25i.fnt delete mode 100644 thirdparty/grx249/fonts/xm4x5.fnt delete mode 100644 thirdparty/grx249/fonts/xm4x6.fnt delete mode 100644 thirdparty/grx249/fonts/xm5x10.fnt delete mode 100644 thirdparty/grx249/fonts/xm5x6.fnt delete mode 100644 thirdparty/grx249/fonts/xm5x8.fnt delete mode 100644 thirdparty/grx249/fonts/xm6x10.fnt delete mode 100644 thirdparty/grx249/fonts/xm6x10b.fnt delete mode 100644 thirdparty/grx249/fonts/xm6x12.fnt delete mode 100644 thirdparty/grx249/fonts/xm6x12b.fnt delete mode 100644 thirdparty/grx249/fonts/xm6x12i.fnt delete mode 100644 thirdparty/grx249/fonts/xm6x13.fnt delete mode 100644 thirdparty/grx249/fonts/xm6x13b.fnt delete mode 100644 thirdparty/grx249/fonts/xm6x16.fnt delete mode 100644 thirdparty/grx249/fonts/xm6x6.fnt delete mode 100644 thirdparty/grx249/fonts/xm6x8.fnt delete mode 100644 thirdparty/grx249/fonts/xm6x9.fnt delete mode 100644 thirdparty/grx249/fonts/xm7x10.fnt delete mode 100644 thirdparty/grx249/fonts/xm7x12.fnt delete mode 100644 thirdparty/grx249/fonts/xm7x13.fnt delete mode 100644 thirdparty/grx249/fonts/xm7x13b.fnt delete mode 100644 thirdparty/grx249/fonts/xm7x14.fnt delete mode 100644 thirdparty/grx249/fonts/xm7x17.fnt delete mode 100644 thirdparty/grx249/fonts/xm7x8.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x10.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x10b.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x12.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x12b.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x13.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x13b.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x14.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x14b.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x15.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x15b.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x16.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x16b.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x16i.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x19.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x8.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x8b.fnt delete mode 100644 thirdparty/grx249/fonts/xm8x8i.fnt delete mode 100644 thirdparty/grx249/fonts/xm9x15.fnt delete mode 100644 thirdparty/grx249/fonts/xm9x15b.fnt delete mode 100644 thirdparty/grx249/fonts/xm9x17.fnt delete mode 100644 thirdparty/grx249/include/bgiext.h delete mode 100644 thirdparty/grx249/include/grdriver.h delete mode 100644 thirdparty/grx249/include/grfontdv.h delete mode 100644 thirdparty/grx249/include/grx20.h delete mode 100644 thirdparty/grx249/include/grxkeys.h delete mode 100644 thirdparty/grx249/include/libbcc.h delete mode 100644 thirdparty/grx249/lib/bcc/readme delete mode 100644 thirdparty/grx249/lib/dj2/readme delete mode 100644 thirdparty/grx249/lib/unix/dummy delete mode 100644 thirdparty/grx249/lib/watcom32/readme delete mode 100644 thirdparty/grx249/lib/win32/dummy delete mode 100644 thirdparty/grx249/makedefs.bcc delete mode 100644 thirdparty/grx249/makedefs.grx delete mode 100644 thirdparty/grx249/makedefs.orig delete mode 100644 thirdparty/grx249/makefile.bcc delete mode 100644 thirdparty/grx249/makefile.dj2 delete mode 100644 thirdparty/grx249/makefile.lnx delete mode 100644 thirdparty/grx249/makefile.sdl delete mode 100644 thirdparty/grx249/makefile.w32 delete mode 100644 thirdparty/grx249/makefile.wat delete mode 100644 thirdparty/grx249/makefile.x11 delete mode 100644 thirdparty/grx249/pascal/bgi/allmodes.pas delete mode 100644 thirdparty/grx249/pascal/bgi/colors.pas delete mode 100644 thirdparty/grx249/pascal/bgi/demo.pas delete mode 100644 thirdparty/grx249/pascal/bgi/graph.pas delete mode 100644 thirdparty/grx249/pascal/bgi/makefile.dj2 delete mode 100644 thirdparty/grx249/pascal/bgi/makefile.lnx delete mode 100644 thirdparty/grx249/pascal/bgi/makefile.sdl delete mode 100644 thirdparty/grx249/pascal/bgi/makefile.w32 delete mode 100644 thirdparty/grx249/pascal/bgi/makefile.x11 delete mode 100644 thirdparty/grx249/pascal/bgi/modelist.pas delete mode 100644 thirdparty/grx249/pascal/bgi/palette.pas delete mode 100644 thirdparty/grx249/pascal/bgi/readme delete mode 100644 thirdparty/grx249/pascal/bgi/small.pas delete mode 100644 thirdparty/grx249/pascal/blt_test.pas delete mode 100644 thirdparty/grx249/pascal/colortst.pas delete mode 100644 thirdparty/grx249/pascal/grx.pas delete mode 100644 thirdparty/grx249/pascal/imgview.pas delete mode 100644 thirdparty/grx249/pascal/jpgtest.pas delete mode 100644 thirdparty/grx249/pascal/keytest.pas delete mode 100644 thirdparty/grx249/pascal/makefile delete mode 100644 thirdparty/grx249/pascal/makefile.dj2 delete mode 100644 thirdparty/grx249/pascal/makefile.lnx delete mode 100644 thirdparty/grx249/pascal/makefile.sdl delete mode 100644 thirdparty/grx249/pascal/makefile.w32 delete mode 100644 thirdparty/grx249/pascal/makefile.x11 delete mode 100644 thirdparty/grx249/pascal/modetest.pas delete mode 100644 thirdparty/grx249/pascal/polytest.pas delete mode 100644 thirdparty/grx249/pascal/readme delete mode 100644 thirdparty/grx249/pascal/test.pas delete mode 100644 thirdparty/grx249/pascal/txt_test.pas delete mode 100644 thirdparty/grx249/pascal/vir_test.pas delete mode 100644 thirdparty/grx249/readme delete mode 100644 thirdparty/grx249/src/bgi/arc.c delete mode 100644 thirdparty/grx249/src/bgi/arc.lo delete mode 100644 thirdparty/grx249/src/bgi/aspectra.c delete mode 100644 thirdparty/grx249/src/bgi/aspectra.lo delete mode 100644 thirdparty/grx249/src/bgi/bar.c delete mode 100644 thirdparty/grx249/src/bgi/bar.lo delete mode 100644 thirdparty/grx249/src/bgi/bar3d.c delete mode 100644 thirdparty/grx249/src/bgi/bar3d.lo delete mode 100644 thirdparty/grx249/src/bgi/bccgrx.c delete mode 100644 thirdparty/grx249/src/bgi/bccgrx.lo delete mode 100644 thirdparty/grx249/src/bgi/bccgrx00.h delete mode 100644 thirdparty/grx249/src/bgi/bgiext01.c delete mode 100644 thirdparty/grx249/src/bgi/bgiext01.lo delete mode 100644 thirdparty/grx249/src/bgi/bgiext02.c delete mode 100644 thirdparty/grx249/src/bgi/bgiext02.lo delete mode 100644 thirdparty/grx249/src/bgi/bgimode.c delete mode 100644 thirdparty/grx249/src/bgi/bgimode.lo delete mode 100644 thirdparty/grx249/src/bgi/bgiprint.c delete mode 100644 thirdparty/grx249/src/bgi/bgiprint.lo delete mode 100644 thirdparty/grx249/src/bgi/circle.c delete mode 100644 thirdparty/grx249/src/bgi/circle.lo delete mode 100644 thirdparty/grx249/src/bgi/clearvp.c delete mode 100644 thirdparty/grx249/src/bgi/clearvp.lo delete mode 100644 thirdparty/grx249/src/bgi/closegra.c delete mode 100644 thirdparty/grx249/src/bgi/closegra.lo delete mode 100644 thirdparty/grx249/src/bgi/clrdev.c delete mode 100644 thirdparty/grx249/src/bgi/clrdev.lo delete mode 100644 thirdparty/grx249/src/bgi/detectg.c delete mode 100644 thirdparty/grx249/src/bgi/detectg.lo delete mode 100644 thirdparty/grx249/src/bgi/drvname.c delete mode 100644 thirdparty/grx249/src/bgi/drvname.lo delete mode 100644 thirdparty/grx249/src/bgi/egacolor.c delete mode 100644 thirdparty/grx249/src/bgi/egacolor.lo delete mode 100644 thirdparty/grx249/src/bgi/ellipse.c delete mode 100644 thirdparty/grx249/src/bgi/ellipse.lo delete mode 100644 thirdparty/grx249/src/bgi/errmsg.c delete mode 100644 thirdparty/grx249/src/bgi/errmsg.lo delete mode 100644 thirdparty/grx249/src/bgi/fellipse.c delete mode 100644 thirdparty/grx249/src/bgi/fellipse.lo delete mode 100644 thirdparty/grx249/src/bgi/fillpatb.c delete mode 100644 thirdparty/grx249/src/bgi/fillpatb.lo delete mode 100644 thirdparty/grx249/src/bgi/fillpolb.c delete mode 100644 thirdparty/grx249/src/bgi/fillpolb.lo delete mode 100644 thirdparty/grx249/src/bgi/fillstyl.c delete mode 100644 thirdparty/grx249/src/bgi/fillstyl.lo delete mode 100644 thirdparty/grx249/src/bgi/fldfill.c delete mode 100644 thirdparty/grx249/src/bgi/fldfill.lo delete mode 100644 thirdparty/grx249/src/bgi/getbkcol.c delete mode 100644 thirdparty/grx249/src/bgi/getbkcol.lo delete mode 100644 thirdparty/grx249/src/bgi/getcol.c delete mode 100644 thirdparty/grx249/src/bgi/getcol.lo delete mode 100644 thirdparty/grx249/src/bgi/getdefpa.c delete mode 100644 thirdparty/grx249/src/bgi/getdefpa.lo delete mode 100644 thirdparty/grx249/src/bgi/getfillp.c delete mode 100644 thirdparty/grx249/src/bgi/getfillp.lo delete mode 100644 thirdparty/grx249/src/bgi/getfills.c delete mode 100644 thirdparty/grx249/src/bgi/getfills.lo delete mode 100644 thirdparty/grx249/src/bgi/getgramo.c delete mode 100644 thirdparty/grx249/src/bgi/getgramo.lo delete mode 100644 thirdparty/grx249/src/bgi/getimage.c delete mode 100644 thirdparty/grx249/src/bgi/getimage.lo delete mode 100644 thirdparty/grx249/src/bgi/getmaxmo.c delete mode 100644 thirdparty/grx249/src/bgi/getmaxmo.lo delete mode 100644 thirdparty/grx249/src/bgi/getmoran.c delete mode 100644 thirdparty/grx249/src/bgi/getmoran.lo delete mode 100644 thirdparty/grx249/src/bgi/getpixel.c delete mode 100644 thirdparty/grx249/src/bgi/getpixel.lo delete mode 100644 thirdparty/grx249/src/bgi/getviewp.c delete mode 100644 thirdparty/grx249/src/bgi/getviewp.lo delete mode 100644 thirdparty/grx249/src/bgi/getx.c delete mode 100644 thirdparty/grx249/src/bgi/getx.lo delete mode 100644 thirdparty/grx249/src/bgi/gety.c delete mode 100644 thirdparty/grx249/src/bgi/gety.lo delete mode 100644 thirdparty/grx249/src/bgi/gmaxcol.c delete mode 100644 thirdparty/grx249/src/bgi/gmaxcol.lo delete mode 100644 thirdparty/grx249/src/bgi/gmmaxcol.c delete mode 100644 thirdparty/grx249/src/bgi/gmmaxcol.lo delete mode 100644 thirdparty/grx249/src/bgi/gmmaxx.c delete mode 100644 thirdparty/grx249/src/bgi/gmmaxx.lo delete mode 100644 thirdparty/grx249/src/bgi/gmmaxy.c delete mode 100644 thirdparty/grx249/src/bgi/gmmaxy.lo delete mode 100644 thirdparty/grx249/src/bgi/gpalsize.c delete mode 100644 thirdparty/grx249/src/bgi/gpalsize.lo delete mode 100644 thirdparty/grx249/src/bgi/graphres.c delete mode 100644 thirdparty/grx249/src/bgi/graphres.lo delete mode 100644 thirdparty/grx249/src/bgi/imagesze.c delete mode 100644 thirdparty/grx249/src/bgi/imagesze.lo delete mode 100644 thirdparty/grx249/src/bgi/instbgid.c delete mode 100644 thirdparty/grx249/src/bgi/instbgid.lo delete mode 100644 thirdparty/grx249/src/bgi/lineb.c delete mode 100644 thirdparty/grx249/src/bgi/lineb.lo delete mode 100644 thirdparty/grx249/src/bgi/linerel.c delete mode 100644 thirdparty/grx249/src/bgi/linerel.lo delete mode 100644 thirdparty/grx249/src/bgi/lineto.c delete mode 100644 thirdparty/grx249/src/bgi/lineto.lo delete mode 100644 thirdparty/grx249/src/bgi/linkall.c delete mode 100644 thirdparty/grx249/src/bgi/lnestyle.c delete mode 100644 thirdparty/grx249/src/bgi/lnestyle.lo delete mode 100644 thirdparty/grx249/src/bgi/modename.c delete mode 100644 thirdparty/grx249/src/bgi/modename.lo delete mode 100644 thirdparty/grx249/src/bgi/moverel.c delete mode 100644 thirdparty/grx249/src/bgi/moverel.lo delete mode 100644 thirdparty/grx249/src/bgi/moveto.c delete mode 100644 thirdparty/grx249/src/bgi/moveto.lo delete mode 100644 thirdparty/grx249/src/bgi/page1.c delete mode 100644 thirdparty/grx249/src/bgi/page1.lo delete mode 100644 thirdparty/grx249/src/bgi/page2.c delete mode 100644 thirdparty/grx249/src/bgi/page2.lo delete mode 100644 thirdparty/grx249/src/bgi/page3.c delete mode 100644 thirdparty/grx249/src/bgi/page3.lo delete mode 100644 thirdparty/grx249/src/bgi/page4.c delete mode 100644 thirdparty/grx249/src/bgi/page4.lo delete mode 100644 thirdparty/grx249/src/bgi/page5.c delete mode 100644 thirdparty/grx249/src/bgi/page5.lo delete mode 100644 thirdparty/grx249/src/bgi/page6.c delete mode 100644 thirdparty/grx249/src/bgi/page6.lo delete mode 100644 thirdparty/grx249/src/bgi/palette.c delete mode 100644 thirdparty/grx249/src/bgi/palette.lo delete mode 100644 thirdparty/grx249/src/bgi/pieslice.c delete mode 100644 thirdparty/grx249/src/bgi/pieslice.lo delete mode 100644 thirdparty/grx249/src/bgi/polygonb.c delete mode 100644 thirdparty/grx249/src/bgi/polygonb.lo delete mode 100644 thirdparty/grx249/src/bgi/putimage.c delete mode 100644 thirdparty/grx249/src/bgi/putimage.lo delete mode 100644 thirdparty/grx249/src/bgi/putpixel.c delete mode 100644 thirdparty/grx249/src/bgi/putpixel.lo delete mode 100644 thirdparty/grx249/src/bgi/rectang.c delete mode 100644 thirdparty/grx249/src/bgi/rectang.lo delete mode 100644 thirdparty/grx249/src/bgi/regbgidr.c delete mode 100644 thirdparty/grx249/src/bgi/regbgidr.lo delete mode 100644 thirdparty/grx249/src/bgi/rgbpal_g.c delete mode 100644 thirdparty/grx249/src/bgi/rgbpal_g.lo delete mode 100644 thirdparty/grx249/src/bgi/rgbpal_s.c delete mode 100644 thirdparty/grx249/src/bgi/rgbpal_s.lo delete mode 100644 thirdparty/grx249/src/bgi/rstcrtmd.c delete mode 100644 thirdparty/grx249/src/bgi/rstcrtmd.lo delete mode 100644 thirdparty/grx249/src/bgi/sector.c delete mode 100644 thirdparty/grx249/src/bgi/sector.lo delete mode 100644 thirdparty/grx249/src/bgi/setbgiwh.c delete mode 100644 thirdparty/grx249/src/bgi/setbgiwh.lo delete mode 100644 thirdparty/grx249/src/bgi/setbkcol.c delete mode 100644 thirdparty/grx249/src/bgi/setbkcol.lo delete mode 100644 thirdparty/grx249/src/bgi/setbusze.c delete mode 100644 thirdparty/grx249/src/bgi/setbusze.lo delete mode 100644 thirdparty/grx249/src/bgi/setcolor.c delete mode 100644 thirdparty/grx249/src/bgi/setcolor.lo delete mode 100644 thirdparty/grx249/src/bgi/setrgbc.c delete mode 100644 thirdparty/grx249/src/bgi/setrgbc.lo delete mode 100644 thirdparty/grx249/src/bgi/setviewp.c delete mode 100644 thirdparty/grx249/src/bgi/setviewp.lo delete mode 100644 thirdparty/grx249/src/bgi/setwrmod.c delete mode 100644 thirdparty/grx249/src/bgi/setwrmod.lo delete mode 100644 thirdparty/grx249/src/bgi/text.c delete mode 100644 thirdparty/grx249/src/bgi/text.h delete mode 100644 thirdparty/grx249/src/bgi/text.lo delete mode 100644 thirdparty/grx249/src/bgi/text1.c delete mode 100644 thirdparty/grx249/src/bgi/text1.lo delete mode 100644 thirdparty/grx249/src/bgi/text2.c delete mode 100644 thirdparty/grx249/src/bgi/text2.lo delete mode 100644 thirdparty/grx249/src/bgi/text3.c delete mode 100644 thirdparty/grx249/src/bgi/text3.lo delete mode 100644 thirdparty/grx249/src/bgi/text4.c delete mode 100644 thirdparty/grx249/src/bgi/text4.lo delete mode 100644 thirdparty/grx249/src/bgi/text5.c delete mode 100644 thirdparty/grx249/src/bgi/text5.lo delete mode 100644 thirdparty/grx249/src/bgi/text6.c delete mode 100644 thirdparty/grx249/src/bgi/text6.lo delete mode 100644 thirdparty/grx249/src/bgi/text7.c delete mode 100644 thirdparty/grx249/src/bgi/text7.lo delete mode 100644 thirdparty/grx249/src/bgi/text8.c delete mode 100644 thirdparty/grx249/src/bgi/text8.lo delete mode 100644 thirdparty/grx249/src/bgi/text9.c delete mode 100644 thirdparty/grx249/src/bgi/text9.lo delete mode 100644 thirdparty/grx249/src/bgi/texta.c delete mode 100644 thirdparty/grx249/src/bgi/texta.lo delete mode 100644 thirdparty/grx249/src/bgi/textb.c delete mode 100644 thirdparty/grx249/src/bgi/textb.lo delete mode 100644 thirdparty/grx249/src/bgi/textc.c delete mode 100644 thirdparty/grx249/src/bgi/textc.lo delete mode 100644 thirdparty/grx249/src/bgi/textd.c delete mode 100644 thirdparty/grx249/src/bgi/textd.lo delete mode 100644 thirdparty/grx249/src/bgi/txtlnest.c delete mode 100644 thirdparty/grx249/src/bgi/txtlnest.lo delete mode 100644 thirdparty/grx249/src/depend.dj2 delete mode 100644 thirdparty/grx249/src/depend.lnx delete mode 100644 thirdparty/grx249/src/depend.x11 delete mode 100644 thirdparty/grx249/src/draw/bitblt.c delete mode 100644 thirdparty/grx249/src/draw/bitblt1b.c delete mode 100644 thirdparty/grx249/src/draw/bitbltnc.c delete mode 100644 thirdparty/grx249/src/draw/box.c delete mode 100644 thirdparty/grx249/src/draw/boxnc.c delete mode 100644 thirdparty/grx249/src/draw/clearclp.c delete mode 100644 thirdparty/grx249/src/draw/clearctx.c delete mode 100644 thirdparty/grx249/src/draw/clearscr.c delete mode 100644 thirdparty/grx249/src/draw/drwinlne.c delete mode 100644 thirdparty/grx249/src/draw/fillbox.c delete mode 100644 thirdparty/grx249/src/draw/fillboxn.c delete mode 100644 thirdparty/grx249/src/draw/flodspil.c delete mode 100644 thirdparty/grx249/src/draw/frambox.c delete mode 100644 thirdparty/grx249/src/draw/framboxn.c delete mode 100644 thirdparty/grx249/src/draw/getscl.c delete mode 100644 thirdparty/grx249/src/draw/line.c delete mode 100644 thirdparty/grx249/src/draw/linenc.c delete mode 100644 thirdparty/grx249/src/draw/majorln1.c delete mode 100644 thirdparty/grx249/src/draw/majorln2.c delete mode 100644 thirdparty/grx249/src/draw/majorln3.c delete mode 100644 thirdparty/grx249/src/draw/majorln4.c delete mode 100644 thirdparty/grx249/src/draw/pixel.c delete mode 100644 thirdparty/grx249/src/draw/pixelc.c delete mode 100644 thirdparty/grx249/src/draw/plot.c delete mode 100644 thirdparty/grx249/src/draw/putscl.c delete mode 100644 thirdparty/grx249/src/fdrivers/banked32.h delete mode 100644 thirdparty/grx249/src/fdrivers/dotab8.c delete mode 100644 thirdparty/grx249/src/fdrivers/driver16.h delete mode 100644 thirdparty/grx249/src/fdrivers/driver24.h delete mode 100644 thirdparty/grx249/src/fdrivers/driver32.h delete mode 100644 thirdparty/grx249/src/fdrivers/driver8.h delete mode 100644 thirdparty/grx249/src/fdrivers/ega4.c delete mode 100644 thirdparty/grx249/src/fdrivers/egavga1.c delete mode 100644 thirdparty/grx249/src/fdrivers/fd_xwin.c delete mode 100644 thirdparty/grx249/src/fdrivers/fdw32_24.c delete mode 100644 thirdparty/grx249/src/fdrivers/fdw32_8.c delete mode 100644 thirdparty/grx249/src/fdrivers/ftable.c delete mode 100644 thirdparty/grx249/src/fdrivers/genblit.c delete mode 100644 thirdparty/grx249/src/fdrivers/generic/bitblt.c delete mode 100644 thirdparty/grx249/src/fdrivers/generic/bitmap.c delete mode 100644 thirdparty/grx249/src/fdrivers/generic/block.c delete mode 100644 thirdparty/grx249/src/fdrivers/generic/getiscl.c delete mode 100644 thirdparty/grx249/src/fdrivers/generic/hline.c delete mode 100644 thirdparty/grx249/src/fdrivers/generic/line.c delete mode 100644 thirdparty/grx249/src/fdrivers/generic/pattern.c delete mode 100644 thirdparty/grx249/src/fdrivers/generic/putscl.c delete mode 100644 thirdparty/grx249/src/fdrivers/generic/vline.c delete mode 100644 thirdparty/grx249/src/fdrivers/gengiscl.c delete mode 100644 thirdparty/grx249/src/fdrivers/genptscl.c delete mode 100644 thirdparty/grx249/src/fdrivers/genstrch.c delete mode 100644 thirdparty/grx249/src/fdrivers/herc1.c delete mode 100644 thirdparty/grx249/src/fdrivers/lfb16.c delete mode 100644 thirdparty/grx249/src/fdrivers/lfb24.c delete mode 100644 thirdparty/grx249/src/fdrivers/lfb32h.c delete mode 100644 thirdparty/grx249/src/fdrivers/lfb32l.c delete mode 100644 thirdparty/grx249/src/fdrivers/lfb8.c delete mode 100644 thirdparty/grx249/src/fdrivers/lfbbltrv.c delete mode 100644 thirdparty/grx249/src/fdrivers/lfbbltvr.c delete mode 100644 thirdparty/grx249/src/fdrivers/lfbbltvv.c delete mode 100644 thirdparty/grx249/src/fdrivers/pblit_nb.h delete mode 100644 thirdparty/grx249/src/fdrivers/pblitr2r.c delete mode 100644 thirdparty/grx249/src/fdrivers/pblitr2v.c delete mode 100644 thirdparty/grx249/src/fdrivers/pblitv2r.c delete mode 100644 thirdparty/grx249/src/fdrivers/pblitv2v.c delete mode 100644 thirdparty/grx249/src/fdrivers/ram1.c delete mode 100644 thirdparty/grx249/src/fdrivers/ram16.c delete mode 100644 thirdparty/grx249/src/fdrivers/ram24.c delete mode 100644 thirdparty/grx249/src/fdrivers/ram32h.c delete mode 100644 thirdparty/grx249/src/fdrivers/ram32l.c delete mode 100644 thirdparty/grx249/src/fdrivers/ram3x8.c delete mode 100644 thirdparty/grx249/src/fdrivers/ram4.c delete mode 100644 thirdparty/grx249/src/fdrivers/ram8.c delete mode 100644 thirdparty/grx249/src/fdrivers/rblit_14.c delete mode 100644 thirdparty/grx249/src/fdrivers/rblit_14.h delete mode 100644 thirdparty/grx249/src/fdrivers/sdl16.c delete mode 100644 thirdparty/grx249/src/fdrivers/sdl24.c delete mode 100644 thirdparty/grx249/src/fdrivers/sdl32h.c delete mode 100644 thirdparty/grx249/src/fdrivers/sdl32l.c delete mode 100644 thirdparty/grx249/src/fdrivers/sdl8.c delete mode 100644 thirdparty/grx249/src/fdrivers/sdlframe.h delete mode 100644 thirdparty/grx249/src/fdrivers/svga16.c delete mode 100644 thirdparty/grx249/src/fdrivers/svga24.c delete mode 100644 thirdparty/grx249/src/fdrivers/svga32h.c delete mode 100644 thirdparty/grx249/src/fdrivers/svga32l.c delete mode 100644 thirdparty/grx249/src/fdrivers/svga4.c delete mode 100644 thirdparty/grx249/src/fdrivers/svga8.c delete mode 100644 thirdparty/grx249/src/fdrivers/vga8x.c delete mode 100644 thirdparty/grx249/src/fonts/fdtable.c delete mode 100644 thirdparty/grx249/src/fonts/fdv_bgi.c delete mode 100644 thirdparty/grx249/src/fonts/fdv_bgi.h delete mode 100644 thirdparty/grx249/src/fonts/fdv_fna.c delete mode 100644 thirdparty/grx249/src/fonts/fdv_grx.c delete mode 100644 thirdparty/grx249/src/fonts/fdv_grx.h delete mode 100644 thirdparty/grx249/src/fonts/fdv_raw.c delete mode 100644 thirdparty/grx249/src/fonts/fdv_raw.h delete mode 100644 thirdparty/grx249/src/fonts/fdv_win.c delete mode 100644 thirdparty/grx249/src/fonts/fdv_win.h delete mode 100644 thirdparty/grx249/src/fonts/fdv_xwin.c delete mode 100644 thirdparty/grx249/src/fonts/pc6x8.c delete mode 100644 thirdparty/grx249/src/fonts/pc8x14.c delete mode 100644 thirdparty/grx249/src/fonts/pc8x16.c delete mode 100644 thirdparty/grx249/src/fonts/pc8x8.c delete mode 100644 thirdparty/grx249/src/gformats/ctx2jpg.c delete mode 100644 thirdparty/grx249/src/gformats/ctx2png.c delete mode 100644 thirdparty/grx249/src/gformats/ctx2pnm.c delete mode 100644 thirdparty/grx249/src/gformats/dummyjpg.c delete mode 100644 thirdparty/grx249/src/gformats/dummypng.c delete mode 100644 thirdparty/grx249/src/gformats/jpg2ctx.c delete mode 100644 thirdparty/grx249/src/gformats/png2ctx.c delete mode 100644 thirdparty/grx249/src/gformats/pnm2ctx.c delete mode 100644 thirdparty/grx249/src/image/ialloc.c delete mode 100644 thirdparty/grx249/src/image/ibuild.c delete mode 100644 thirdparty/grx249/src/image/ifbox.c delete mode 100644 thirdparty/grx249/src/image/ihline.c delete mode 100644 thirdparty/grx249/src/image/iinverse.c delete mode 100644 thirdparty/grx249/src/image/image.h delete mode 100644 thirdparty/grx249/src/image/imginlne.c delete mode 100644 thirdparty/grx249/src/image/iplot.c delete mode 100644 thirdparty/grx249/src/image/istretch.c delete mode 100644 thirdparty/grx249/src/include/access24.h delete mode 100644 thirdparty/grx249/src/include/allocate.h delete mode 100644 thirdparty/grx249/src/include/arith.h delete mode 100644 thirdparty/grx249/src/include/bcc/allocate.h delete mode 100644 thirdparty/grx249/src/include/bcc/arith.h delete mode 100644 thirdparty/grx249/src/include/bcc/asmsupp.h delete mode 100644 thirdparty/grx249/src/include/bcc/highlow.h delete mode 100644 thirdparty/grx249/src/include/bcc/memcopy.h delete mode 100644 thirdparty/grx249/src/include/bcc/memfill.h delete mode 100644 thirdparty/grx249/src/include/bcc/memmode.h delete mode 100644 thirdparty/grx249/src/include/bcc/mempeek.h delete mode 100644 thirdparty/grx249/src/include/clipping.h delete mode 100644 thirdparty/grx249/src/include/docolor.h delete mode 100644 thirdparty/grx249/src/include/gcc/arith.h delete mode 100644 thirdparty/grx249/src/include/gcc/asmsupp.h delete mode 100644 thirdparty/grx249/src/include/gcc/highlow.h delete mode 100644 thirdparty/grx249/src/include/gcc/memcopy.h delete mode 100644 thirdparty/grx249/src/include/gcc/memfill.h delete mode 100644 thirdparty/grx249/src/include/gcc/memmode.h delete mode 100644 thirdparty/grx249/src/include/gcc/mempeek.h delete mode 100644 thirdparty/grx249/src/include/grxdebug.h delete mode 100644 thirdparty/grx249/src/include/highlow.h delete mode 100644 thirdparty/grx249/src/include/int86.h delete mode 100644 thirdparty/grx249/src/include/ioport.h delete mode 100644 thirdparty/grx249/src/include/libgrx.h delete mode 100644 thirdparty/grx249/src/include/libsdl.h delete mode 100644 thirdparty/grx249/src/include/libwin32.h delete mode 100644 thirdparty/grx249/src/include/libxwin.h delete mode 100644 thirdparty/grx249/src/include/memcopy.h delete mode 100644 thirdparty/grx249/src/include/memfill.h delete mode 100644 thirdparty/grx249/src/include/memmode.h delete mode 100644 thirdparty/grx249/src/include/mempeek.h delete mode 100644 thirdparty/grx249/src/include/ordswap.h delete mode 100644 thirdparty/grx249/src/include/pblit.h delete mode 100644 thirdparty/grx249/src/include/prex11r6.h delete mode 100644 thirdparty/grx249/src/include/shapes.h delete mode 100644 thirdparty/grx249/src/include/usercord.h delete mode 100644 thirdparty/grx249/src/include/usrscale.h delete mode 100644 thirdparty/grx249/src/include/vesa.h delete mode 100644 thirdparty/grx249/src/include/vgaregs.h delete mode 100644 thirdparty/grx249/src/include/watcom/memcopy.h delete mode 100644 thirdparty/grx249/src/include/watcom/memfill.h delete mode 100644 thirdparty/grx249/src/include/watcom/memmode.h delete mode 100644 thirdparty/grx249/src/include/watcom/mempeek.h delete mode 100644 thirdparty/grx249/src/makefile.bcc delete mode 100644 thirdparty/grx249/src/makefile.dj2 delete mode 100644 thirdparty/grx249/src/makefile.lnx delete mode 100644 thirdparty/grx249/src/makefile.sdl delete mode 100644 thirdparty/grx249/src/makefile.w32 delete mode 100644 thirdparty/grx249/src/makefile.wat delete mode 100644 thirdparty/grx249/src/makefile.x11 delete mode 100644 thirdparty/grx249/src/misc/dosmisc.c delete mode 100644 thirdparty/grx249/src/misc/lnxmisc.c delete mode 100644 thirdparty/grx249/src/misc/sdlmisc.c delete mode 100644 thirdparty/grx249/src/misc/w32misc.c delete mode 100644 thirdparty/grx249/src/misc/x11misc.c delete mode 100644 thirdparty/grx249/src/mouse/bldcurs.c delete mode 100644 thirdparty/grx249/src/mouse/dosinput.c delete mode 100644 thirdparty/grx249/src/mouse/doskeys.c delete mode 100644 thirdparty/grx249/src/mouse/drawcurs.c delete mode 100644 thirdparty/grx249/src/mouse/input.h delete mode 100644 thirdparty/grx249/src/mouse/lnxinpu2.c delete mode 100644 thirdparty/grx249/src/mouse/lnxinput.c delete mode 100644 thirdparty/grx249/src/mouse/lnxkeys.c delete mode 100644 thirdparty/grx249/src/mouse/mouinfo.c delete mode 100644 thirdparty/grx249/src/mouse/mouinlne.c delete mode 100644 thirdparty/grx249/src/mouse/mscursor.c delete mode 100644 thirdparty/grx249/src/mouse/mstime.c delete mode 100644 thirdparty/grx249/src/mouse/sdlinp.c delete mode 100644 thirdparty/grx249/src/mouse/sdlinput.h delete mode 100644 thirdparty/grx249/src/mouse/sdlkeys.c delete mode 100644 thirdparty/grx249/src/mouse/w32inp.c delete mode 100644 thirdparty/grx249/src/mouse/w32input.h delete mode 100644 thirdparty/grx249/src/mouse/w32keys.c delete mode 100644 thirdparty/grx249/src/mouse/xwininp.c delete mode 100644 thirdparty/grx249/src/mouse/xwinkeys.c delete mode 100644 thirdparty/grx249/src/pattern/fillpatt.c delete mode 100644 thirdparty/grx249/src/pattern/makepat.c delete mode 100644 thirdparty/grx249/src/pattern/patfbits.c delete mode 100644 thirdparty/grx249/src/pattern/patfbox.c delete mode 100644 thirdparty/grx249/src/pattern/patfcvxp.c delete mode 100644 thirdparty/grx249/src/pattern/patfline.c delete mode 100644 thirdparty/grx249/src/pattern/patfplot.c delete mode 100644 thirdparty/grx249/src/pattern/patfpoly.c delete mode 100644 thirdparty/grx249/src/pattern/patternf.c delete mode 100644 thirdparty/grx249/src/pattern/pattfldf.c delete mode 100644 thirdparty/grx249/src/pattern/pattline.c delete mode 100644 thirdparty/grx249/src/pattern/pattpoly.c delete mode 100644 thirdparty/grx249/src/pattern/pfcirc.c delete mode 100644 thirdparty/grx249/src/pattern/pfcirca.c delete mode 100644 thirdparty/grx249/src/pattern/pfelli.c delete mode 100644 thirdparty/grx249/src/pattern/pfellia.c delete mode 100644 thirdparty/grx249/src/pattern/ptcirc.c delete mode 100644 thirdparty/grx249/src/pattern/ptcirca.c delete mode 100644 thirdparty/grx249/src/pattern/ptelli.c delete mode 100644 thirdparty/grx249/src/pattern/ptellia.c delete mode 100644 thirdparty/grx249/src/setup/clip.c delete mode 100644 thirdparty/grx249/src/setup/clrinfo.c delete mode 100644 thirdparty/grx249/src/setup/clrinlne.c delete mode 100644 thirdparty/grx249/src/setup/colorbw.c delete mode 100644 thirdparty/grx249/src/setup/colorega.c delete mode 100644 thirdparty/grx249/src/setup/colors.c delete mode 100644 thirdparty/grx249/src/setup/context.c delete mode 100644 thirdparty/grx249/src/setup/cxtinfo.c delete mode 100644 thirdparty/grx249/src/setup/cxtinlne.c delete mode 100644 thirdparty/grx249/src/setup/drvinfo.c delete mode 100644 thirdparty/grx249/src/setup/drvinlne.c delete mode 100644 thirdparty/grx249/src/setup/fframe.c delete mode 100644 thirdparty/grx249/src/setup/fgeom.c delete mode 100644 thirdparty/grx249/src/setup/hooks.c delete mode 100644 thirdparty/grx249/src/setup/modewalk.c delete mode 100644 thirdparty/grx249/src/setup/setdrvr.c delete mode 100644 thirdparty/grx249/src/setup/setmode.c delete mode 100644 thirdparty/grx249/src/setup/version.c delete mode 100644 thirdparty/grx249/src/setup/viewport.c delete mode 100644 thirdparty/grx249/src/shape/circle1.c delete mode 100644 thirdparty/grx249/src/shape/circle2.c delete mode 100644 thirdparty/grx249/src/shape/circle3.c delete mode 100644 thirdparty/grx249/src/shape/circle4.c delete mode 100644 thirdparty/grx249/src/shape/drawpoly.c delete mode 100644 thirdparty/grx249/src/shape/fillcir1.c delete mode 100644 thirdparty/grx249/src/shape/fillcir2.c delete mode 100644 thirdparty/grx249/src/shape/fillcnvx.c delete mode 100644 thirdparty/grx249/src/shape/fillell1.c delete mode 100644 thirdparty/grx249/src/shape/fillell2.c delete mode 100644 thirdparty/grx249/src/shape/fillpoly.c delete mode 100644 thirdparty/grx249/src/shape/flood.c delete mode 100644 thirdparty/grx249/src/shape/floodfil.c delete mode 100644 thirdparty/grx249/src/shape/genellip.c delete mode 100644 thirdparty/grx249/src/shape/polyedge.h delete mode 100644 thirdparty/grx249/src/shape/polygon.c delete mode 100644 thirdparty/grx249/src/shape/polyline.c delete mode 100644 thirdparty/grx249/src/shape/scancnvx.c delete mode 100644 thirdparty/grx249/src/shape/scanellp.c delete mode 100644 thirdparty/grx249/src/shape/scanpoly.c delete mode 100644 thirdparty/grx249/src/shape/solidfil.c delete mode 100644 thirdparty/grx249/src/stdobjs.mak delete mode 100644 thirdparty/grx249/src/text/buildaux.c delete mode 100644 thirdparty/grx249/src/text/buildfnt.c delete mode 100644 thirdparty/grx249/src/text/convfont.c delete mode 100644 thirdparty/grx249/src/text/drawstrg.c delete mode 100644 thirdparty/grx249/src/text/drawtext.c delete mode 100644 thirdparty/grx249/src/text/drwstrg.c delete mode 100644 thirdparty/grx249/src/text/dumpfna.c delete mode 100644 thirdparty/grx249/src/text/dumpfont.c delete mode 100644 thirdparty/grx249/src/text/dumptext.c delete mode 100644 thirdparty/grx249/src/text/epatstrg.c delete mode 100644 thirdparty/grx249/src/text/fntinlne.c delete mode 100644 thirdparty/grx249/src/text/fontinfo.c delete mode 100644 thirdparty/grx249/src/text/fontpath.c delete mode 100644 thirdparty/grx249/src/text/loadfont.c delete mode 100644 thirdparty/grx249/src/text/pattstrg.c delete mode 100644 thirdparty/grx249/src/text/propwdt.c delete mode 100644 thirdparty/grx249/src/text/text.h delete mode 100644 thirdparty/grx249/src/text/unloadfn.c delete mode 100644 thirdparty/grx249/src/user/ubox.c delete mode 100644 thirdparty/grx249/src/user/ucbox.c delete mode 100644 thirdparty/grx249/src/user/uccirc.c delete mode 100644 thirdparty/grx249/src/user/uccirca.c delete mode 100644 thirdparty/grx249/src/user/ucelli.c delete mode 100644 thirdparty/grx249/src/user/ucellia.c delete mode 100644 thirdparty/grx249/src/user/ucirc.c delete mode 100644 thirdparty/grx249/src/user/ucirca.c delete mode 100644 thirdparty/grx249/src/user/ucircf.c delete mode 100644 thirdparty/grx249/src/user/ucircfa.c delete mode 100644 thirdparty/grx249/src/user/ucline.c delete mode 100644 thirdparty/grx249/src/user/ucpolyg.c delete mode 100644 thirdparty/grx249/src/user/ucpolyl.c delete mode 100644 thirdparty/grx249/src/user/udrwchar.c delete mode 100644 thirdparty/grx249/src/user/udrwstrg.c delete mode 100644 thirdparty/grx249/src/user/uelli.c delete mode 100644 thirdparty/grx249/src/user/uellia.c delete mode 100644 thirdparty/grx249/src/user/uellif.c delete mode 100644 thirdparty/grx249/src/user/uellifa.c delete mode 100644 thirdparty/grx249/src/user/ufcpolyg.c delete mode 100644 thirdparty/grx249/src/user/ufillbox.c delete mode 100644 thirdparty/grx249/src/user/uflood.c delete mode 100644 thirdparty/grx249/src/user/ufpolyg.c delete mode 100644 thirdparty/grx249/src/user/uframbox.c delete mode 100644 thirdparty/grx249/src/user/ugetwin.c delete mode 100644 thirdparty/grx249/src/user/uhline.c delete mode 100644 thirdparty/grx249/src/user/uline.c delete mode 100644 thirdparty/grx249/src/user/upbox.c delete mode 100644 thirdparty/grx249/src/user/upcirc.c delete mode 100644 thirdparty/grx249/src/user/upcirca.c delete mode 100644 thirdparty/grx249/src/user/upelli.c delete mode 100644 thirdparty/grx249/src/user/upellia.c delete mode 100644 thirdparty/grx249/src/user/upfbox.c delete mode 100644 thirdparty/grx249/src/user/upfcirc.c delete mode 100644 thirdparty/grx249/src/user/upfcirca.c delete mode 100644 thirdparty/grx249/src/user/upfcpoly.c delete mode 100644 thirdparty/grx249/src/user/upfelli.c delete mode 100644 thirdparty/grx249/src/user/upfellia.c delete mode 100644 thirdparty/grx249/src/user/upfflood.c delete mode 100644 thirdparty/grx249/src/user/upfline.c delete mode 100644 thirdparty/grx249/src/user/upfplot.c delete mode 100644 thirdparty/grx249/src/user/upfpolyg.c delete mode 100644 thirdparty/grx249/src/user/upixel.c delete mode 100644 thirdparty/grx249/src/user/upixelc.c delete mode 100644 thirdparty/grx249/src/user/upline.c delete mode 100644 thirdparty/grx249/src/user/uplot.c delete mode 100644 thirdparty/grx249/src/user/upolygon.c delete mode 100644 thirdparty/grx249/src/user/upolylin.c delete mode 100644 thirdparty/grx249/src/user/uppolyg.c delete mode 100644 thirdparty/grx249/src/user/uppolyl.c delete mode 100644 thirdparty/grx249/src/user/usercord.c delete mode 100644 thirdparty/grx249/src/user/usetwin.c delete mode 100644 thirdparty/grx249/src/user/utextxy.c delete mode 100644 thirdparty/grx249/src/user/uvline.c delete mode 100644 thirdparty/grx249/src/utilprog/bin2c.c delete mode 100644 thirdparty/grx249/src/utilprog/fnt2c.c delete mode 100644 thirdparty/grx249/src/utilprog/fnt2text.c delete mode 100644 thirdparty/grx249/src/utilprog/lfbinfo.c delete mode 100644 thirdparty/grx249/src/utilprog/modetest.c delete mode 100644 thirdparty/grx249/src/utilprog/vesainfo.c delete mode 100644 thirdparty/grx249/src/utils/bccarith.c delete mode 100644 thirdparty/grx249/src/utils/bcccopy.c delete mode 100644 thirdparty/grx249/src/utils/bccfil08.c delete mode 100644 thirdparty/grx249/src/utils/bccfil16.c delete mode 100644 thirdparty/grx249/src/utils/bccfil24.c delete mode 100644 thirdparty/grx249/src/utils/bccfil32.c delete mode 100644 thirdparty/grx249/src/utils/dbgprint.c delete mode 100644 thirdparty/grx249/src/utils/ordswap.c delete mode 100644 thirdparty/grx249/src/utils/resize.c delete mode 100644 thirdparty/grx249/src/utils/shiftscl.c delete mode 100644 thirdparty/grx249/src/utils/strmatch.c delete mode 100644 thirdparty/grx249/src/utils/tmpbuff.c delete mode 100644 thirdparty/grx249/src/utils/watcom32.c delete mode 100644 thirdparty/grx249/src/utils/watmake.c delete mode 100644 thirdparty/grx249/src/vdrivers/ati28800.c delete mode 100644 thirdparty/grx249/src/vdrivers/cl5426.c delete mode 100644 thirdparty/grx249/src/vdrivers/et4000.c delete mode 100644 thirdparty/grx249/src/vdrivers/herc.c delete mode 100644 thirdparty/grx249/src/vdrivers/mach64.c delete mode 100644 thirdparty/grx249/src/vdrivers/s3.c delete mode 100644 thirdparty/grx249/src/vdrivers/stdega.c delete mode 100644 thirdparty/grx249/src/vdrivers/stdvga.c delete mode 100644 thirdparty/grx249/src/vdrivers/svgalib.c delete mode 100644 thirdparty/grx249/src/vdrivers/u_egavga.c delete mode 100644 thirdparty/grx249/src/vdrivers/u_vesa.c delete mode 100644 thirdparty/grx249/src/vdrivers/u_vsvirt.c delete mode 100644 thirdparty/grx249/src/vdrivers/vd_lnxfb.c delete mode 100644 thirdparty/grx249/src/vdrivers/vd_mem.c delete mode 100644 thirdparty/grx249/src/vdrivers/vd_sdl.c delete mode 100644 thirdparty/grx249/src/vdrivers/vd_win32.c delete mode 100644 thirdparty/grx249/src/vdrivers/vd_xfdga.c delete mode 100644 thirdparty/grx249/src/vdrivers/vd_xwin.c delete mode 100644 thirdparty/grx249/src/vdrivers/vesa.c delete mode 100644 thirdparty/grx249/src/vdrivers/vesa.txt delete mode 100644 thirdparty/grx249/src/vdrivers/vesa_pm.c delete mode 100644 thirdparty/grx249/src/vdrivers/vesa_rm.c delete mode 100644 thirdparty/grx249/src/vdrivers/vtable.c delete mode 100644 thirdparty/grx249/src/wideline/ccirc.c delete mode 100644 thirdparty/grx249/src/wideline/ccirca.c delete mode 100644 thirdparty/grx249/src/wideline/celli.c delete mode 100644 thirdparty/grx249/src/wideline/cellia.c delete mode 100644 thirdparty/grx249/src/wideline/custbox.c delete mode 100644 thirdparty/grx249/src/wideline/custline.c delete mode 100644 thirdparty/grx249/src/wideline/custplne.c delete mode 100644 thirdparty/grx249/src/wideline/custpoly.c delete mode 100644 thirdparty/grx249/src/wideline/drwcpoly.c delete mode 100644 thirdparty/grx249/test/arctest.c delete mode 100644 thirdparty/grx249/test/arctest.dat delete mode 100644 thirdparty/grx249/test/bb1test.c delete mode 100644 thirdparty/grx249/test/bgi/bccbgi.c delete mode 100644 thirdparty/grx249/test/bgi/bgilink.c delete mode 100644 thirdparty/grx249/test/bgi/colortst.c delete mode 100644 thirdparty/grx249/test/bgi/fontplay.c delete mode 100644 thirdparty/grx249/test/bgi/makefile.bcc delete mode 100644 thirdparty/grx249/test/bgi/makefile.dj2 delete mode 100644 thirdparty/grx249/test/bgi/makefile.lnx delete mode 100644 thirdparty/grx249/test/bgi/makefile.sdl delete mode 100644 thirdparty/grx249/test/bgi/makefile.w32 delete mode 100644 thirdparty/grx249/test/bgi/makefile.wat delete mode 100644 thirdparty/grx249/test/bgi/makefile.x11 delete mode 100644 thirdparty/grx249/test/bgi/small.c delete mode 100644 thirdparty/grx249/test/bgi/stdfun.h delete mode 100644 thirdparty/grx249/test/bgi/tellipse.c delete mode 100644 thirdparty/grx249/test/bgi/tfill.c delete mode 100644 thirdparty/grx249/test/bgi/tmodes.c delete mode 100644 thirdparty/grx249/test/bgi/tpoly.c delete mode 100644 thirdparty/grx249/test/bgi/ttext.c delete mode 100644 thirdparty/grx249/test/blittest.c delete mode 100644 thirdparty/grx249/test/circtest.c delete mode 100644 thirdparty/grx249/test/cliptest.c delete mode 100644 thirdparty/grx249/test/colorops.c delete mode 100644 thirdparty/grx249/test/curstest.c delete mode 100644 thirdparty/grx249/test/demogrx.c delete mode 100644 thirdparty/grx249/test/depend.gnu delete mode 100644 thirdparty/grx249/test/drawing.h delete mode 100644 thirdparty/grx249/test/fontdemo.c delete mode 100644 thirdparty/grx249/test/fonttest.c delete mode 100644 thirdparty/grx249/test/fswwtest.c delete mode 100644 thirdparty/grx249/test/gfaz.c delete mode 100644 thirdparty/grx249/test/gfaz.h delete mode 100644 thirdparty/grx249/test/imgtest.c delete mode 100644 thirdparty/grx249/test/jpeg1.jpg delete mode 100644 thirdparty/grx249/test/jpeg2.jpg delete mode 100644 thirdparty/grx249/test/jpgtest.c delete mode 100644 thirdparty/grx249/test/keys.c delete mode 100644 thirdparty/grx249/test/life.c delete mode 100644 thirdparty/grx249/test/linetest.c delete mode 100644 thirdparty/grx249/test/makefile.bcc delete mode 100644 thirdparty/grx249/test/makefile.dj2 delete mode 100644 thirdparty/grx249/test/makefile.lnx delete mode 100644 thirdparty/grx249/test/makefile.sdl delete mode 100644 thirdparty/grx249/test/makefile.w32 delete mode 100644 thirdparty/grx249/test/makefile.wat delete mode 100644 thirdparty/grx249/test/makefile.x11 delete mode 100644 thirdparty/grx249/test/memtest.c delete mode 100644 thirdparty/grx249/test/mousetst.c delete mode 100644 thirdparty/grx249/test/pcirctst.c delete mode 100644 thirdparty/grx249/test/pngcompo.png delete mode 100644 thirdparty/grx249/test/pngowl.png delete mode 100644 thirdparty/grx249/test/pngred.png delete mode 100644 thirdparty/grx249/test/pngtest.c delete mode 100644 thirdparty/grx249/test/pnmtest.c delete mode 100644 thirdparty/grx249/test/pnmtest.pbm delete mode 100644 thirdparty/grx249/test/pnmtest.ppm delete mode 100644 thirdparty/grx249/test/pnmtest2.ppm delete mode 100644 thirdparty/grx249/test/polytest.c delete mode 100644 thirdparty/grx249/test/polytest.dat delete mode 100644 thirdparty/grx249/test/rand.h delete mode 100644 thirdparty/grx249/test/rgbtest.c delete mode 100644 thirdparty/grx249/test/sbctest.c delete mode 100644 thirdparty/grx249/test/scroltst.c delete mode 100644 thirdparty/grx249/test/speedtst.c delete mode 100644 thirdparty/grx249/test/test.h delete mode 100644 thirdparty/grx249/test/textpatt.c delete mode 100644 thirdparty/grx249/test/winclip.c delete mode 100644 thirdparty/grx249/test/wintest.c delete mode 100644 thirdparty/jpeg-9e/Makefile delete mode 100644 thirdparty/jpeg-9e/Makefile.am delete mode 100644 thirdparty/jpeg-9e/Makefile.in delete mode 100644 thirdparty/jpeg-9e/README delete mode 100644 thirdparty/jpeg-9e/aclocal.m4 delete mode 100755 thirdparty/jpeg-9e/ar-lib delete mode 100644 thirdparty/jpeg-9e/cdaltui.txt delete mode 100644 thirdparty/jpeg-9e/cderror.h delete mode 100644 thirdparty/jpeg-9e/cdjpeg.c delete mode 100644 thirdparty/jpeg-9e/cdjpeg.h delete mode 100644 thirdparty/jpeg-9e/change.log delete mode 100644 thirdparty/jpeg-9e/cjpeg.1 delete mode 100644 thirdparty/jpeg-9e/cjpeg.c delete mode 100644 thirdparty/jpeg-9e/cjpegalt.c delete mode 100644 thirdparty/jpeg-9e/ckconfig.c delete mode 100644 thirdparty/jpeg-9e/coderules.txt delete mode 100755 thirdparty/jpeg-9e/compile delete mode 100755 thirdparty/jpeg-9e/config.guess delete mode 100644 thirdparty/jpeg-9e/config.log delete mode 100755 thirdparty/jpeg-9e/config.status delete mode 100755 thirdparty/jpeg-9e/config.sub delete mode 100755 thirdparty/jpeg-9e/configure delete mode 100644 thirdparty/jpeg-9e/configure.ac delete mode 100755 thirdparty/jpeg-9e/depcomp delete mode 100644 thirdparty/jpeg-9e/djpeg.1 delete mode 100644 thirdparty/jpeg-9e/djpeg.c delete mode 100644 thirdparty/jpeg-9e/djpegalt.c delete mode 100644 thirdparty/jpeg-9e/example.c delete mode 100644 thirdparty/jpeg-9e/filelist.txt delete mode 100755 thirdparty/jpeg-9e/install-sh delete mode 100644 thirdparty/jpeg-9e/install.txt delete mode 100644 thirdparty/jpeg-9e/jaricom.c delete mode 100644 thirdparty/jpeg-9e/jcapimin.c delete mode 100644 thirdparty/jpeg-9e/jcapistd.c delete mode 100644 thirdparty/jpeg-9e/jcarith.c delete mode 100644 thirdparty/jpeg-9e/jccoefct.c delete mode 100644 thirdparty/jpeg-9e/jccolor.c delete mode 100644 thirdparty/jpeg-9e/jcdctmgr.c delete mode 100644 thirdparty/jpeg-9e/jchuff.c delete mode 100644 thirdparty/jpeg-9e/jcinit.c delete mode 100644 thirdparty/jpeg-9e/jcmainct.c delete mode 100644 thirdparty/jpeg-9e/jcmarker.c delete mode 100644 thirdparty/jpeg-9e/jcmaster.c delete mode 100644 thirdparty/jpeg-9e/jcomapi.c delete mode 100644 thirdparty/jpeg-9e/jconfig.bcc delete mode 100644 thirdparty/jpeg-9e/jconfig.cfg delete mode 100644 thirdparty/jpeg-9e/jconfig.dj delete mode 100644 thirdparty/jpeg-9e/jconfig.h delete mode 100644 thirdparty/jpeg-9e/jconfig.mac delete mode 100644 thirdparty/jpeg-9e/jconfig.manx delete mode 100644 thirdparty/jpeg-9e/jconfig.mc6 delete mode 100644 thirdparty/jpeg-9e/jconfig.sas delete mode 100644 thirdparty/jpeg-9e/jconfig.st delete mode 100644 thirdparty/jpeg-9e/jconfig.txt delete mode 100644 thirdparty/jpeg-9e/jconfig.vc delete mode 100644 thirdparty/jpeg-9e/jconfig.vms delete mode 100644 thirdparty/jpeg-9e/jconfig.wat delete mode 100644 thirdparty/jpeg-9e/jcparam.c delete mode 100644 thirdparty/jpeg-9e/jcprepct.c delete mode 100644 thirdparty/jpeg-9e/jcsample.c delete mode 100644 thirdparty/jpeg-9e/jctrans.c delete mode 100644 thirdparty/jpeg-9e/jdapimin.c delete mode 100644 thirdparty/jpeg-9e/jdapistd.c delete mode 100644 thirdparty/jpeg-9e/jdarith.c delete mode 100644 thirdparty/jpeg-9e/jdatadst.c delete mode 100644 thirdparty/jpeg-9e/jdatasrc.c delete mode 100644 thirdparty/jpeg-9e/jdcoefct.c delete mode 100644 thirdparty/jpeg-9e/jdcolor.c delete mode 100644 thirdparty/jpeg-9e/jdct.h delete mode 100644 thirdparty/jpeg-9e/jddctmgr.c delete mode 100644 thirdparty/jpeg-9e/jdhuff.c delete mode 100644 thirdparty/jpeg-9e/jdinput.c delete mode 100644 thirdparty/jpeg-9e/jdmainct.c delete mode 100644 thirdparty/jpeg-9e/jdmarker.c delete mode 100644 thirdparty/jpeg-9e/jdmaster.c delete mode 100644 thirdparty/jpeg-9e/jdmerge.c delete mode 100644 thirdparty/jpeg-9e/jdpostct.c delete mode 100644 thirdparty/jpeg-9e/jdsample.c delete mode 100644 thirdparty/jpeg-9e/jdtrans.c delete mode 100644 thirdparty/jpeg-9e/jerror.c delete mode 100644 thirdparty/jpeg-9e/jerror.h delete mode 100644 thirdparty/jpeg-9e/jfdctflt.c delete mode 100644 thirdparty/jpeg-9e/jfdctfst.c delete mode 100644 thirdparty/jpeg-9e/jfdctint.c delete mode 100644 thirdparty/jpeg-9e/jidctflt.c delete mode 100644 thirdparty/jpeg-9e/jidctfst.c delete mode 100644 thirdparty/jpeg-9e/jidctint.c delete mode 100644 thirdparty/jpeg-9e/jinclude.h delete mode 100644 thirdparty/jpeg-9e/jmemansi.c delete mode 100644 thirdparty/jpeg-9e/jmemdos.c delete mode 100644 thirdparty/jpeg-9e/jmemdosa.asm delete mode 100644 thirdparty/jpeg-9e/jmemmac.c delete mode 100644 thirdparty/jpeg-9e/jmemmgr.c delete mode 100644 thirdparty/jpeg-9e/jmemname.c delete mode 100644 thirdparty/jpeg-9e/jmemnobs.c delete mode 100644 thirdparty/jpeg-9e/jmemsys.h delete mode 100644 thirdparty/jpeg-9e/jmorecfg.h delete mode 100644 thirdparty/jpeg-9e/jpegint.h delete mode 100644 thirdparty/jpeg-9e/jpeglib.h delete mode 100644 thirdparty/jpeg-9e/jpegtran.1 delete mode 100644 thirdparty/jpeg-9e/jpegtran.c delete mode 100644 thirdparty/jpeg-9e/jquant1.c delete mode 100644 thirdparty/jpeg-9e/jquant2.c delete mode 100644 thirdparty/jpeg-9e/jutils.c delete mode 100644 thirdparty/jpeg-9e/jversion.h delete mode 100644 thirdparty/jpeg-9e/libjpeg.map delete mode 100644 thirdparty/jpeg-9e/libjpeg.pc delete mode 100644 thirdparty/jpeg-9e/libjpeg.pc.in delete mode 100644 thirdparty/jpeg-9e/libjpeg.txt delete mode 100755 thirdparty/jpeg-9e/libtool delete mode 100644 thirdparty/jpeg-9e/ltmain.sh delete mode 100644 thirdparty/jpeg-9e/makcjpeg.st delete mode 100644 thirdparty/jpeg-9e/makdjpeg.st delete mode 100644 thirdparty/jpeg-9e/makeadsw.vc6 delete mode 100644 thirdparty/jpeg-9e/makeasln.v16 delete mode 100644 thirdparty/jpeg-9e/makecdep.vc6 delete mode 100644 thirdparty/jpeg-9e/makecdsp.vc6 delete mode 100644 thirdparty/jpeg-9e/makecfil.v16 delete mode 100644 thirdparty/jpeg-9e/makecmak.vc6 delete mode 100644 thirdparty/jpeg-9e/makecvcx.v16 delete mode 100644 thirdparty/jpeg-9e/makecvcx.v17 delete mode 100644 thirdparty/jpeg-9e/makeddep.vc6 delete mode 100644 thirdparty/jpeg-9e/makeddsp.vc6 delete mode 100644 thirdparty/jpeg-9e/makedfil.v16 delete mode 100644 thirdparty/jpeg-9e/makedmak.vc6 delete mode 100644 thirdparty/jpeg-9e/makedvcx.v16 delete mode 100644 thirdparty/jpeg-9e/makedvcx.v17 delete mode 100644 thirdparty/jpeg-9e/makefile.ansi delete mode 100644 thirdparty/jpeg-9e/makefile.b32 delete mode 100644 thirdparty/jpeg-9e/makefile.bcc delete mode 100644 thirdparty/jpeg-9e/makefile.dj delete mode 100644 thirdparty/jpeg-9e/makefile.manx delete mode 100644 thirdparty/jpeg-9e/makefile.mc6 delete mode 100644 thirdparty/jpeg-9e/makefile.mms delete mode 100644 thirdparty/jpeg-9e/makefile.sas delete mode 100644 thirdparty/jpeg-9e/makefile.unix delete mode 100644 thirdparty/jpeg-9e/makefile.vc delete mode 100644 thirdparty/jpeg-9e/makefile.vms delete mode 100644 thirdparty/jpeg-9e/makefile.vs delete mode 100644 thirdparty/jpeg-9e/makefile.wat delete mode 100644 thirdparty/jpeg-9e/makejdep.vc6 delete mode 100644 thirdparty/jpeg-9e/makejdsp.vc6 delete mode 100644 thirdparty/jpeg-9e/makejdsw.vc6 delete mode 100644 thirdparty/jpeg-9e/makejfil.v16 delete mode 100644 thirdparty/jpeg-9e/makejmak.vc6 delete mode 100644 thirdparty/jpeg-9e/makejsln.v16 delete mode 100644 thirdparty/jpeg-9e/makejvcx.v16 delete mode 100644 thirdparty/jpeg-9e/makejvcx.v17 delete mode 100644 thirdparty/jpeg-9e/makeproj.mac delete mode 100644 thirdparty/jpeg-9e/makerdep.vc6 delete mode 100644 thirdparty/jpeg-9e/makerdsp.vc6 delete mode 100644 thirdparty/jpeg-9e/makerfil.v16 delete mode 100644 thirdparty/jpeg-9e/makermak.vc6 delete mode 100644 thirdparty/jpeg-9e/makervcx.v16 delete mode 100644 thirdparty/jpeg-9e/makervcx.v17 delete mode 100644 thirdparty/jpeg-9e/maketdep.vc6 delete mode 100644 thirdparty/jpeg-9e/maketdsp.vc6 delete mode 100644 thirdparty/jpeg-9e/maketfil.v16 delete mode 100644 thirdparty/jpeg-9e/maketmak.vc6 delete mode 100644 thirdparty/jpeg-9e/maketvcx.v16 delete mode 100644 thirdparty/jpeg-9e/maketvcx.v17 delete mode 100644 thirdparty/jpeg-9e/makewdep.vc6 delete mode 100644 thirdparty/jpeg-9e/makewdsp.vc6 delete mode 100644 thirdparty/jpeg-9e/makewfil.v16 delete mode 100644 thirdparty/jpeg-9e/makewmak.vc6 delete mode 100644 thirdparty/jpeg-9e/makewvcx.v16 delete mode 100644 thirdparty/jpeg-9e/makewvcx.v17 delete mode 100644 thirdparty/jpeg-9e/makljpeg.st delete mode 100644 thirdparty/jpeg-9e/maktjpeg.st delete mode 100644 thirdparty/jpeg-9e/makvms.opt delete mode 100755 thirdparty/jpeg-9e/missing delete mode 100644 thirdparty/jpeg-9e/rdbmp.c delete mode 100644 thirdparty/jpeg-9e/rdcolmap.c delete mode 100644 thirdparty/jpeg-9e/rdgif.c delete mode 100644 thirdparty/jpeg-9e/rdjpgcom.1 delete mode 100644 thirdparty/jpeg-9e/rdjpgcom.c delete mode 100644 thirdparty/jpeg-9e/rdppm.c delete mode 100644 thirdparty/jpeg-9e/rdrle.c delete mode 100644 thirdparty/jpeg-9e/rdswitch.c delete mode 100644 thirdparty/jpeg-9e/rdtarga.c delete mode 100644 thirdparty/jpeg-9e/stamp-h1 delete mode 100644 thirdparty/jpeg-9e/structure.txt delete mode 100644 thirdparty/jpeg-9e/testimg.bmp delete mode 100644 thirdparty/jpeg-9e/testimg.gif delete mode 100644 thirdparty/jpeg-9e/testimg.jpg delete mode 100644 thirdparty/jpeg-9e/testimg.ppm delete mode 100644 thirdparty/jpeg-9e/testimgp.jpg delete mode 100644 thirdparty/jpeg-9e/testorig.jpg delete mode 100644 thirdparty/jpeg-9e/testprog.jpg delete mode 100644 thirdparty/jpeg-9e/transupp.c delete mode 100644 thirdparty/jpeg-9e/transupp.h delete mode 100644 thirdparty/jpeg-9e/usage.txt delete mode 100644 thirdparty/jpeg-9e/wizard.txt delete mode 100644 thirdparty/jpeg-9e/wrbmp.c delete mode 100644 thirdparty/jpeg-9e/wrgif.c delete mode 100644 thirdparty/jpeg-9e/wrjpgcom.1 delete mode 100644 thirdparty/jpeg-9e/wrjpgcom.c delete mode 100644 thirdparty/jpeg-9e/wrppm.c delete mode 100644 thirdparty/jpeg-9e/wrrle.c delete mode 100644 thirdparty/jpeg-9e/wrtarga.c delete mode 100644 thirdparty/libpng-1.6.37/ANNOUNCE delete mode 100644 thirdparty/libpng-1.6.37/AUTHORS delete mode 100644 thirdparty/libpng-1.6.37/CHANGES delete mode 100644 thirdparty/libpng-1.6.37/CMakeLists.txt delete mode 100644 thirdparty/libpng-1.6.37/INSTALL delete mode 100644 thirdparty/libpng-1.6.37/LICENSE delete mode 100644 thirdparty/libpng-1.6.37/Makefile delete mode 100644 thirdparty/libpng-1.6.37/Makefile.am delete mode 100644 thirdparty/libpng-1.6.37/Makefile.in delete mode 100644 thirdparty/libpng-1.6.37/README delete mode 100644 thirdparty/libpng-1.6.37/TODO delete mode 100644 thirdparty/libpng-1.6.37/TRADEMARK delete mode 100644 thirdparty/libpng-1.6.37/aclocal.m4 delete mode 100644 thirdparty/libpng-1.6.37/arm/.deps/arm_init.Plo delete mode 100644 thirdparty/libpng-1.6.37/arm/.deps/filter_neon.Plo delete mode 100644 thirdparty/libpng-1.6.37/arm/.deps/filter_neon_intrinsics.Plo delete mode 100644 thirdparty/libpng-1.6.37/arm/.deps/palette_neon_intrinsics.Plo delete mode 100644 thirdparty/libpng-1.6.37/arm/arm_init.c delete mode 100644 thirdparty/libpng-1.6.37/arm/filter_neon.S delete mode 100644 thirdparty/libpng-1.6.37/arm/filter_neon_intrinsics.c delete mode 100644 thirdparty/libpng-1.6.37/arm/palette_neon_intrinsics.c delete mode 100755 thirdparty/libpng-1.6.37/autogen.sh delete mode 100755 thirdparty/libpng-1.6.37/compile delete mode 100755 thirdparty/libpng-1.6.37/config.guess delete mode 100644 thirdparty/libpng-1.6.37/config.h delete mode 100644 thirdparty/libpng-1.6.37/config.h.in delete mode 100644 thirdparty/libpng-1.6.37/config.log delete mode 100755 thirdparty/libpng-1.6.37/config.status delete mode 100755 thirdparty/libpng-1.6.37/config.sub delete mode 100755 thirdparty/libpng-1.6.37/configure delete mode 100644 thirdparty/libpng-1.6.37/configure.ac delete mode 100644 thirdparty/libpng-1.6.37/contrib/README.txt delete mode 100644 thirdparty/libpng-1.6.37/contrib/arm-neon/README delete mode 100644 thirdparty/libpng-1.6.37/contrib/arm-neon/android-ndk.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/arm-neon/linux-auxv.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/arm-neon/linux.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/conftest/README delete mode 100644 thirdparty/libpng-1.6.37/contrib/conftest/pngcp.dfa delete mode 100644 thirdparty/libpng-1.6.37/contrib/conftest/read.dfa delete mode 100644 thirdparty/libpng-1.6.37/contrib/conftest/s_read.dfa delete mode 100644 thirdparty/libpng-1.6.37/contrib/conftest/s_write.dfa delete mode 100644 thirdparty/libpng-1.6.37/contrib/conftest/simple.dfa delete mode 100644 thirdparty/libpng-1.6.37/contrib/conftest/write.dfa delete mode 100644 thirdparty/libpng-1.6.37/contrib/examples/README.txt delete mode 100644 thirdparty/libpng-1.6.37/contrib/examples/iccfrompng.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/examples/pngpixel.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/examples/pngtopng.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/examples/simpleover.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/COPYING delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/LICENSE delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.mingw32 delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.sgi delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.unx delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.w32 delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/README delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/makevms.com delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/readpng.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/readpng.h delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/readpng2.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/readpng2.h delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/readppm.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/rpng-win.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/rpng-x.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/rpng2-win.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/rpng2-x.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/toucan.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/wpng.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/writepng.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/gregbook/writepng.h delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngimage.Po delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngstest.Po delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngunknown.Po delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngvalid.Po delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/.deps/timepng.Po delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/fakepng.c delete mode 100755 thirdparty/libpng-1.6.37/contrib/libtests/gentests.sh delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/makepng.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/pngimage.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/pngstest-errors.h delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/pngstest.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/pngunknown.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/pngvalid.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/readpng.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/tarith.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/libtests/timepng.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/mips-msa/README delete mode 100644 thirdparty/libpng-1.6.37/contrib/mips-msa/linux.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/oss-fuzz/Dockerfile delete mode 100644 thirdparty/libpng-1.6.37/contrib/oss-fuzz/README.txt delete mode 100755 thirdparty/libpng-1.6.37/contrib/oss-fuzz/build.sh delete mode 100644 thirdparty/libpng-1.6.37/contrib/oss-fuzz/libpng_read_fuzzer.cc delete mode 100644 thirdparty/libpng-1.6.37/contrib/oss-fuzz/libpng_read_fuzzer.options delete mode 100644 thirdparty/libpng-1.6.37/contrib/oss-fuzz/png.dict delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/README delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/decoder/README delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/decoder/makefile delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/decoder/pngusr.dfa delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/decoder/pngusr.h delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/encoder/README delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/encoder/makefile delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/encoder/pngusr.dfa delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/encoder/pngusr.h delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/preader/README delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/preader/makefile delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/preader/pngusr.dfa delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminim/preader/pngusr.h delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminus/CHANGES.txt delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminus/CMakeLists.txt delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminus/LICENSE.txt delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminus/Makefile delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminus/README.txt delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminus/makevms.com delete mode 100755 thirdparty/libpng-1.6.37/contrib/pngminus/png2pnm.bat delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminus/png2pnm.c delete mode 100755 thirdparty/libpng-1.6.37/contrib/pngminus/png2pnm.sh delete mode 100755 thirdparty/libpng-1.6.37/contrib/pngminus/pngminus.bat delete mode 100755 thirdparty/libpng-1.6.37/contrib/pngminus/pngminus.sh delete mode 100755 thirdparty/libpng-1.6.37/contrib/pngminus/pnm2png.bat delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngminus/pnm2png.c delete mode 100755 thirdparty/libpng-1.6.37/contrib/pngminus/pnm2png.sh delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/README delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/bad_interlace_conversions.txt delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn0g01.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn0g02.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn0g04.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn0g08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn0g16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn2c08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn2c16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn3p01.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn3p02.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn3p04.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn4a08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn4a16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn6a08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/basn6a16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftbbn0g01.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftbbn0g02.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftbbn0g04.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftbbn2c16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftbbn3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftbgn2c16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftbgn3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftbrn2c08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftbwn0g16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftbwn3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftbyn3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftp0n0g08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftp0n2c08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftp0n3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ftp1n3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ibasn0g08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ibasn0g16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ibasn2c08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ibasn2c16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ibasn3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ibasn4a08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ibasn4a16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ibasn6a08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/ibasn6a16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftbbn2c16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftbbn3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftbgn2c16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftbgn3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftbrn2c08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftbwn0g16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftbwn3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftbyn3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftp0n0g08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftp0n2c08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftp0n3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/iftp1n3p08.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/interlaced/README delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/interlaced/ibasn0g01.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/interlaced/ibasn0g02.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/interlaced/ibasn0g04.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/interlaced/ibasn3p01.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/interlaced/ibasn3p02.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/interlaced/ibasn3p04.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/interlaced/iftbbn0g01.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/interlaced/iftbbn0g02.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/pngsuite/interlaced/iftbbn0g04.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/powerpc-vsx/README delete mode 100644 thirdparty/libpng-1.6.37/contrib/powerpc-vsx/linux.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/powerpc-vsx/linux_aux.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/bad_iCCP.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/badadler.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/badcrc.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/empty_ancillary_chunks.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_IDAT.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_bKGD_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_cHRM_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_eXIf_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_gAMA_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_hIST_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_iCCP_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_iTXt_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_juNK_unsafe_to_copy.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_juNk_safe_to_copy.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_pCAL_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_pHYs_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_sCAL_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_sPLT_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_sRGB_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_sTER_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_tEXt_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_tIME_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/crashers/huge_zTXt_chunk.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-1-1.8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-1-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-1-linear-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-1-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-1-sRGB-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-1-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-1-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-1.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-16-1.8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-16-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-16-linear-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-16-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-16-sRGB-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-16-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-16-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-2-1.8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-2-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-2-linear-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-2-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-2-sRGB-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-2-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-2-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-2.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-4-1.8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-4-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-4-linear-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-4-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-4-sRGB-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-4-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-4-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-4.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-8-1.8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-8-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-8-linear-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-8-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-8-sRGB-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-8-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-alpha-16-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-alpha-16-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-alpha-16-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-alpha-16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-alpha-8-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-alpha-8-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-alpha-8-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/gray-alpha-8.png delete mode 100755 thirdparty/libpng-1.6.37/contrib/testpngs/makepngs.sh delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-1-1.8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-1-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-1-linear-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-1-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-1-sRGB-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-1-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-1-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-1.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-2-1.8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-2-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-2-linear-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-2-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-2-sRGB-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-2-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-2-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-2.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-4-1.8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-4-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-4-linear-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-4-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-4-sRGB-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-4-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-4-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-4.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-8-1.8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-8-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-8-linear-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-8-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-8-sRGB-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-8-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/palette-8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-16-1.8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-16-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-16-linear-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-16-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-16-sRGB-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-16-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-16-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-8-1.8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-8-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-8-linear-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-8-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-8-sRGB-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-8-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-8-tRNS.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-alpha-16-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-alpha-16-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-alpha-16-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-alpha-16.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-alpha-8-1.8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-alpha-8-linear.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-alpha-8-sRGB.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/testpngs/rgb-alpha-8.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/.deps/png-fix-itxt.Po delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/.deps/pngcp.Po delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/.deps/pngfix.Po delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/README.txt delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/checksum-icc.c delete mode 100755 thirdparty/libpng-1.6.37/contrib/tools/chkfmt delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/cvtcolor.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/genpng.c delete mode 100755 thirdparty/libpng-1.6.37/contrib/tools/intgamma.sh delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/makesRGB.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/png-fix-itxt.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/pngcp.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/pngfix.c delete mode 100755 thirdparty/libpng-1.6.37/contrib/tools/reindent delete mode 100644 thirdparty/libpng-1.6.37/contrib/tools/sRGB.h delete mode 100644 thirdparty/libpng-1.6.37/contrib/visupng/PngFile.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/visupng/PngFile.h delete mode 100644 thirdparty/libpng-1.6.37/contrib/visupng/README.txt delete mode 100644 thirdparty/libpng-1.6.37/contrib/visupng/VisualPng.c delete mode 100644 thirdparty/libpng-1.6.37/contrib/visupng/VisualPng.dsp delete mode 100644 thirdparty/libpng-1.6.37/contrib/visupng/VisualPng.dsw delete mode 100644 thirdparty/libpng-1.6.37/contrib/visupng/VisualPng.ico delete mode 100644 thirdparty/libpng-1.6.37/contrib/visupng/VisualPng.png delete mode 100644 thirdparty/libpng-1.6.37/contrib/visupng/VisualPng.rc delete mode 100644 thirdparty/libpng-1.6.37/contrib/visupng/cexcept.h delete mode 100644 thirdparty/libpng-1.6.37/contrib/visupng/resource.h delete mode 100755 thirdparty/libpng-1.6.37/depcomp delete mode 100644 thirdparty/libpng-1.6.37/example.c delete mode 100755 thirdparty/libpng-1.6.37/install-sh delete mode 100644 thirdparty/libpng-1.6.37/intel/.deps/filter_sse2_intrinsics.Plo delete mode 100644 thirdparty/libpng-1.6.37/intel/.deps/intel_init.Plo delete mode 100644 thirdparty/libpng-1.6.37/intel/filter_sse2_intrinsics.c delete mode 100644 thirdparty/libpng-1.6.37/intel/intel_init.c delete mode 100644 thirdparty/libpng-1.6.37/libpng-config.in delete mode 100644 thirdparty/libpng-1.6.37/libpng-manual.txt delete mode 100644 thirdparty/libpng-1.6.37/libpng.3 delete mode 100644 thirdparty/libpng-1.6.37/libpng.pc.in delete mode 100644 thirdparty/libpng-1.6.37/libpngpf.3 delete mode 100755 thirdparty/libpng-1.6.37/libtool delete mode 100755 thirdparty/libpng-1.6.37/ltmain.sh delete mode 100644 thirdparty/libpng-1.6.37/makefile.dj2 delete mode 100644 thirdparty/libpng-1.6.37/makefile.linux delete mode 100644 thirdparty/libpng-1.6.37/mips/.deps/filter_msa_intrinsics.Plo delete mode 100644 thirdparty/libpng-1.6.37/mips/.deps/mips_init.Plo delete mode 100644 thirdparty/libpng-1.6.37/mips/filter_msa_intrinsics.c delete mode 100644 thirdparty/libpng-1.6.37/mips/mips_init.c delete mode 100755 thirdparty/libpng-1.6.37/missing delete mode 100644 thirdparty/libpng-1.6.37/png.5 delete mode 100644 thirdparty/libpng-1.6.37/png.c delete mode 100644 thirdparty/libpng-1.6.37/png.h delete mode 100644 thirdparty/libpng-1.6.37/pngbar.jpg delete mode 100644 thirdparty/libpng-1.6.37/pngbar.png delete mode 100644 thirdparty/libpng-1.6.37/pngconf.h delete mode 100644 thirdparty/libpng-1.6.37/pngdebug.h delete mode 100644 thirdparty/libpng-1.6.37/pngerror.c delete mode 100644 thirdparty/libpng-1.6.37/pngget.c delete mode 100644 thirdparty/libpng-1.6.37/pnginfo.h delete mode 100644 thirdparty/libpng-1.6.37/pngmem.c delete mode 100644 thirdparty/libpng-1.6.37/pngnow.png delete mode 100644 thirdparty/libpng-1.6.37/pngpread.c delete mode 100644 thirdparty/libpng-1.6.37/pngpriv.h delete mode 100644 thirdparty/libpng-1.6.37/pngread.c delete mode 100644 thirdparty/libpng-1.6.37/pngrio.c delete mode 100644 thirdparty/libpng-1.6.37/pngrtran.c delete mode 100644 thirdparty/libpng-1.6.37/pngrutil.c delete mode 100644 thirdparty/libpng-1.6.37/pngset.c delete mode 100644 thirdparty/libpng-1.6.37/pngstruct.h delete mode 100644 thirdparty/libpng-1.6.37/pngtest.c delete mode 100644 thirdparty/libpng-1.6.37/pngtest.png delete mode 100644 thirdparty/libpng-1.6.37/pngtrans.c delete mode 100644 thirdparty/libpng-1.6.37/pngusr.dfa delete mode 100644 thirdparty/libpng-1.6.37/pngwio.c delete mode 100644 thirdparty/libpng-1.6.37/pngwrite.c delete mode 100644 thirdparty/libpng-1.6.37/pngwtran.c delete mode 100644 thirdparty/libpng-1.6.37/pngwutil.c delete mode 100644 thirdparty/libpng-1.6.37/powerpc/.deps/filter_vsx_intrinsics.Plo delete mode 100644 thirdparty/libpng-1.6.37/powerpc/.deps/powerpc_init.Plo delete mode 100644 thirdparty/libpng-1.6.37/powerpc/filter_vsx_intrinsics.c delete mode 100644 thirdparty/libpng-1.6.37/powerpc/powerpc_init.c delete mode 100644 thirdparty/libpng-1.6.37/projects/owatcom/libpng.tgt delete mode 100644 thirdparty/libpng-1.6.37/projects/owatcom/libpng.wpj delete mode 100644 thirdparty/libpng-1.6.37/projects/owatcom/pngconfig.mak delete mode 100644 thirdparty/libpng-1.6.37/projects/owatcom/pngstest.tgt delete mode 100644 thirdparty/libpng-1.6.37/projects/owatcom/pngtest.tgt delete mode 100644 thirdparty/libpng-1.6.37/projects/owatcom/pngvalid.tgt delete mode 100644 thirdparty/libpng-1.6.37/projects/visualc71/PRJ0041.mak delete mode 100644 thirdparty/libpng-1.6.37/projects/visualc71/README.txt delete mode 100644 thirdparty/libpng-1.6.37/projects/visualc71/README_zlib.txt delete mode 100644 thirdparty/libpng-1.6.37/projects/visualc71/libpng.sln delete mode 100644 thirdparty/libpng-1.6.37/projects/visualc71/libpng.vcproj delete mode 100644 thirdparty/libpng-1.6.37/projects/visualc71/pngtest.vcproj delete mode 100644 thirdparty/libpng-1.6.37/projects/visualc71/zlib.vcproj delete mode 100644 thirdparty/libpng-1.6.37/projects/vstudio/README.txt delete mode 100644 thirdparty/libpng-1.6.37/projects/vstudio/libpng/libpng.vcxproj delete mode 100644 thirdparty/libpng-1.6.37/projects/vstudio/pnglibconf/pnglibconf.vcxproj delete mode 100644 thirdparty/libpng-1.6.37/projects/vstudio/pngstest/pngstest.vcxproj delete mode 100644 thirdparty/libpng-1.6.37/projects/vstudio/pngtest/pngtest.vcxproj delete mode 100644 thirdparty/libpng-1.6.37/projects/vstudio/pngunknown/pngunknown.vcxproj delete mode 100644 thirdparty/libpng-1.6.37/projects/vstudio/pngvalid/pngvalid.vcxproj delete mode 100644 thirdparty/libpng-1.6.37/projects/vstudio/vstudio.sln delete mode 100644 thirdparty/libpng-1.6.37/projects/vstudio/zlib.props delete mode 100644 thirdparty/libpng-1.6.37/projects/vstudio/zlib/zlib.vcxproj delete mode 100644 thirdparty/libpng-1.6.37/scripts/README.txt delete mode 100644 thirdparty/libpng-1.6.37/scripts/SCOPTIONS.ppc delete mode 100755 thirdparty/libpng-1.6.37/scripts/checksym.awk delete mode 100644 thirdparty/libpng-1.6.37/scripts/descrip.mms delete mode 100755 thirdparty/libpng-1.6.37/scripts/dfn.awk delete mode 100644 thirdparty/libpng-1.6.37/scripts/genchk.cmake.in delete mode 100644 thirdparty/libpng-1.6.37/scripts/genout.cmake.in delete mode 100644 thirdparty/libpng-1.6.37/scripts/gensrc.cmake.in delete mode 100644 thirdparty/libpng-1.6.37/scripts/intprefix.c delete mode 100644 thirdparty/libpng-1.6.37/scripts/libpng-config-body.in delete mode 100644 thirdparty/libpng-1.6.37/scripts/libpng-config-head.in delete mode 100644 thirdparty/libpng-1.6.37/scripts/libpng.pc.in delete mode 100644 thirdparty/libpng-1.6.37/scripts/libtool.m4 delete mode 100644 thirdparty/libpng-1.6.37/scripts/ltoptions.m4 delete mode 100644 thirdparty/libpng-1.6.37/scripts/ltsugar.m4 delete mode 100644 thirdparty/libpng-1.6.37/scripts/ltversion.m4 delete mode 100644 thirdparty/libpng-1.6.37/scripts/lt~obsolete.m4 delete mode 100644 thirdparty/libpng-1.6.37/scripts/macro.lst delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.32sunu delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.64sunu delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.acorn delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.aix delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.amiga delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.atari delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.bc32 delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.beos delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.cegcc delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.clang delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.clang-asan delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.darwin delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.dec delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.dj2 delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.freebsd delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.gcc delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.gcc-asan delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.hp64 delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.hpgcc delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.hpux delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.ibmc delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.intel delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.linux delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.linux-opt delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.mips delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.msys delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.netbsd delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.openbsd delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.sco delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.sggcc delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.sgi delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.so9 delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.solaris delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.std delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.sunos delete mode 100644 thirdparty/libpng-1.6.37/scripts/makefile.vcwin32 delete mode 100644 thirdparty/libpng-1.6.37/scripts/makevms.com delete mode 100755 thirdparty/libpng-1.6.37/scripts/options.awk delete mode 100644 thirdparty/libpng-1.6.37/scripts/pnglibconf.dfa delete mode 100644 thirdparty/libpng-1.6.37/scripts/pnglibconf.h.prebuilt delete mode 100755 thirdparty/libpng-1.6.37/scripts/pnglibconf.mak delete mode 100644 thirdparty/libpng-1.6.37/scripts/pngwin.rc delete mode 100644 thirdparty/libpng-1.6.37/scripts/prefix.c delete mode 100644 thirdparty/libpng-1.6.37/scripts/smakefile.ppc delete mode 100644 thirdparty/libpng-1.6.37/scripts/sym.c delete mode 100644 thirdparty/libpng-1.6.37/scripts/symbols.c delete mode 100644 thirdparty/libpng-1.6.37/scripts/symbols.def delete mode 100644 thirdparty/libpng-1.6.37/scripts/test.cmake.in delete mode 100644 thirdparty/libpng-1.6.37/scripts/vers.c delete mode 100644 thirdparty/libpng-1.6.37/stamp-h1 delete mode 100755 thirdparty/libpng-1.6.37/test-driver delete mode 100755 thirdparty/libpng-1.6.37/tests/pngimage-full delete mode 100755 thirdparty/libpng-1.6.37/tests/pngimage-quick delete mode 100755 thirdparty/libpng-1.6.37/tests/pngstest delete mode 100755 thirdparty/libpng-1.6.37/tests/pngstest-1.8 delete mode 100755 thirdparty/libpng-1.6.37/tests/pngstest-1.8-alpha delete mode 100755 thirdparty/libpng-1.6.37/tests/pngstest-linear delete mode 100755 thirdparty/libpng-1.6.37/tests/pngstest-linear-alpha delete mode 100755 thirdparty/libpng-1.6.37/tests/pngstest-none delete mode 100755 thirdparty/libpng-1.6.37/tests/pngstest-none-alpha delete mode 100755 thirdparty/libpng-1.6.37/tests/pngstest-sRGB delete mode 100755 thirdparty/libpng-1.6.37/tests/pngstest-sRGB-alpha delete mode 100755 thirdparty/libpng-1.6.37/tests/pngtest delete mode 100755 thirdparty/libpng-1.6.37/tests/pngtest-badpngs delete mode 100755 thirdparty/libpng-1.6.37/tests/pngunknown-IDAT delete mode 100755 thirdparty/libpng-1.6.37/tests/pngunknown-discard delete mode 100755 thirdparty/libpng-1.6.37/tests/pngunknown-if-safe delete mode 100755 thirdparty/libpng-1.6.37/tests/pngunknown-sAPI delete mode 100755 thirdparty/libpng-1.6.37/tests/pngunknown-sTER delete mode 100755 thirdparty/libpng-1.6.37/tests/pngunknown-save delete mode 100755 thirdparty/libpng-1.6.37/tests/pngunknown-vpAg delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-gamma-16-to-8 delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-gamma-alpha-mode delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-gamma-background delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-gamma-expand16-alpha-mode delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-gamma-expand16-background delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-gamma-expand16-transform delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-gamma-sbit delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-gamma-threshold delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-gamma-transform delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-progressive-interlace-standard delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-progressive-size delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-progressive-standard delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-standard delete mode 100755 thirdparty/libpng-1.6.37/tests/pngvalid-transform delete mode 100644 thirdparty/zlib-1.2.12/CMakeLists.txt delete mode 100644 thirdparty/zlib-1.2.12/ChangeLog delete mode 100644 thirdparty/zlib-1.2.12/FAQ delete mode 100644 thirdparty/zlib-1.2.12/INDEX delete mode 100644 thirdparty/zlib-1.2.12/Makefile delete mode 100644 thirdparty/zlib-1.2.12/Makefile.in delete mode 100644 thirdparty/zlib-1.2.12/README delete mode 100644 thirdparty/zlib-1.2.12/adler32.c delete mode 100644 thirdparty/zlib-1.2.12/amiga/Makefile.pup delete mode 100644 thirdparty/zlib-1.2.12/amiga/Makefile.sas delete mode 100644 thirdparty/zlib-1.2.12/compress.c delete mode 100755 thirdparty/zlib-1.2.12/configure delete mode 100644 thirdparty/zlib-1.2.12/configure.log delete mode 100644 thirdparty/zlib-1.2.12/contrib/README.contrib delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/buffer_demo.adb delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/mtest.adb delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/read.adb delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/readme.txt delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/test.adb delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/zlib-streams.adb delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/zlib-streams.ads delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/zlib-thin.adb delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/zlib-thin.ads delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/zlib.adb delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/zlib.ads delete mode 100644 thirdparty/zlib-1.2.12/contrib/ada/zlib.gpr delete mode 100644 thirdparty/zlib-1.2.12/contrib/blast/Makefile delete mode 100644 thirdparty/zlib-1.2.12/contrib/blast/README delete mode 100644 thirdparty/zlib-1.2.12/contrib/blast/blast.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/blast/blast.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/blast/test.pk delete mode 100644 thirdparty/zlib-1.2.12/contrib/blast/test.txt delete mode 100644 thirdparty/zlib-1.2.12/contrib/delphi/ZLib.pas delete mode 100644 thirdparty/zlib-1.2.12/contrib/delphi/ZLibConst.pas delete mode 100644 thirdparty/zlib-1.2.12/contrib/delphi/readme.txt delete mode 100644 thirdparty/zlib-1.2.12/contrib/delphi/zlibd32.mak delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib.build delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib.chm delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib.sln delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib/AssemblyInfo.cs delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib/ChecksumImpl.cs delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib/CircularBuffer.cs delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib/CodecBase.cs delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib/Deflater.cs delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib/DotZLib.cs delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib/DotZLib.csproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib/GZipStream.cs delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib/Inflater.cs delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/DotZLib/UnitTests.cs delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/LICENSE_1_0.txt delete mode 100644 thirdparty/zlib-1.2.12/contrib/dotzlib/readme.txt delete mode 100644 thirdparty/zlib-1.2.12/contrib/gcc_gvmat64/gvmat64.S delete mode 100644 thirdparty/zlib-1.2.12/contrib/infback9/README delete mode 100644 thirdparty/zlib-1.2.12/contrib/infback9/infback9.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/infback9/infback9.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/infback9/inffix9.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/infback9/inflate9.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/infback9/inftree9.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/infback9/inftree9.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/iostream/test.cpp delete mode 100644 thirdparty/zlib-1.2.12/contrib/iostream/zfstream.cpp delete mode 100644 thirdparty/zlib-1.2.12/contrib/iostream/zfstream.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/iostream2/zstream.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/iostream2/zstream_test.cpp delete mode 100644 thirdparty/zlib-1.2.12/contrib/iostream3/README delete mode 100644 thirdparty/zlib-1.2.12/contrib/iostream3/TODO delete mode 100644 thirdparty/zlib-1.2.12/contrib/iostream3/test.cc delete mode 100644 thirdparty/zlib-1.2.12/contrib/iostream3/zfstream.cc delete mode 100644 thirdparty/zlib-1.2.12/contrib/iostream3/zfstream.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/Makefile delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/Makefile.am delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/MiniZip64_Changes.txt delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/MiniZip64_info.txt delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/configure.ac delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/crypt.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/ioapi.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/ioapi.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/iowin32.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/iowin32.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/make_vms.com delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/miniunz.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/miniunzip.1 delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/minizip.1 delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/minizip.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/minizip.pc.in delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/mztools.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/mztools.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/unzip.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/unzip.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/zip.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/minizip/zip.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/pascal/example.pas delete mode 100644 thirdparty/zlib-1.2.12/contrib/pascal/readme.txt delete mode 100644 thirdparty/zlib-1.2.12/contrib/pascal/zlibd32.mak delete mode 100644 thirdparty/zlib-1.2.12/contrib/pascal/zlibpas.pas delete mode 100644 thirdparty/zlib-1.2.12/contrib/puff/Makefile delete mode 100644 thirdparty/zlib-1.2.12/contrib/puff/README delete mode 100644 thirdparty/zlib-1.2.12/contrib/puff/puff.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/puff/puff.h delete mode 100644 thirdparty/zlib-1.2.12/contrib/puff/pufftest.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/puff/zeros.raw delete mode 100644 thirdparty/zlib-1.2.12/contrib/testzlib/testzlib.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/testzlib/testzlib.txt delete mode 100644 thirdparty/zlib-1.2.12/contrib/untgz/Makefile delete mode 100644 thirdparty/zlib-1.2.12/contrib/untgz/Makefile.msc delete mode 100644 thirdparty/zlib-1.2.12/contrib/untgz/untgz.c delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/readme.txt delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/miniunz.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/miniunz.vcxproj.filters delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/minizip.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/minizip.vcxproj.filters delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlib.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlib.vcxproj.filters delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlibdll.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlibdll.vcxproj.filters delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlib.rc delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibstat.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibstat.vcxproj.filters delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.def delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.sln delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.vcxproj.filters delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc11/miniunz.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc11/minizip.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc11/testzlib.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc11/testzlibdll.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlib.rc delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibstat.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.def delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.sln delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc12/miniunz.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc12/minizip.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc12/testzlib.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc12/testzlibdll.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlib.rc delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibstat.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.def delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.sln delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc14/miniunz.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc14/minizip.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc14/testzlib.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc14/testzlibdll.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlib.rc delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibstat.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.def delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.sln delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.vcxproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc9/miniunz.vcproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc9/minizip.vcproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc9/testzlib.vcproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc9/testzlibdll.vcproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlib.rc delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibstat.vcproj delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.def delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.sln delete mode 100644 thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.vcproj delete mode 100644 thirdparty/zlib-1.2.12/crc32.c delete mode 100644 thirdparty/zlib-1.2.12/crc32.h delete mode 100644 thirdparty/zlib-1.2.12/deflate.c delete mode 100644 thirdparty/zlib-1.2.12/deflate.h delete mode 100644 thirdparty/zlib-1.2.12/doc/algorithm.txt delete mode 100644 thirdparty/zlib-1.2.12/doc/crc-doc.1.0.pdf delete mode 100644 thirdparty/zlib-1.2.12/doc/rfc1950.txt delete mode 100644 thirdparty/zlib-1.2.12/doc/rfc1951.txt delete mode 100644 thirdparty/zlib-1.2.12/doc/rfc1952.txt delete mode 100644 thirdparty/zlib-1.2.12/doc/txtvsbin.txt delete mode 100644 thirdparty/zlib-1.2.12/examples/README.examples delete mode 100644 thirdparty/zlib-1.2.12/examples/enough.c delete mode 100644 thirdparty/zlib-1.2.12/examples/fitblk.c delete mode 100644 thirdparty/zlib-1.2.12/examples/gun.c delete mode 100644 thirdparty/zlib-1.2.12/examples/gzappend.c delete mode 100644 thirdparty/zlib-1.2.12/examples/gzjoin.c delete mode 100644 thirdparty/zlib-1.2.12/examples/gzlog.c delete mode 100644 thirdparty/zlib-1.2.12/examples/gzlog.h delete mode 100644 thirdparty/zlib-1.2.12/examples/gznorm.c delete mode 100644 thirdparty/zlib-1.2.12/examples/zlib_how.html delete mode 100644 thirdparty/zlib-1.2.12/examples/zpipe.c delete mode 100644 thirdparty/zlib-1.2.12/examples/zran.c delete mode 100644 thirdparty/zlib-1.2.12/examples/zran.h delete mode 100644 thirdparty/zlib-1.2.12/gzclose.c delete mode 100644 thirdparty/zlib-1.2.12/gzguts.h delete mode 100644 thirdparty/zlib-1.2.12/gzlib.c delete mode 100644 thirdparty/zlib-1.2.12/gzread.c delete mode 100644 thirdparty/zlib-1.2.12/gzwrite.c delete mode 100644 thirdparty/zlib-1.2.12/infback.c delete mode 100644 thirdparty/zlib-1.2.12/inffast.c delete mode 100644 thirdparty/zlib-1.2.12/inffast.h delete mode 100644 thirdparty/zlib-1.2.12/inffixed.h delete mode 100644 thirdparty/zlib-1.2.12/inflate.c delete mode 100644 thirdparty/zlib-1.2.12/inflate.h delete mode 100644 thirdparty/zlib-1.2.12/inftrees.c delete mode 100644 thirdparty/zlib-1.2.12/inftrees.h delete mode 100644 thirdparty/zlib-1.2.12/make_vms.com delete mode 100644 thirdparty/zlib-1.2.12/msdos/Makefile.bor delete mode 100644 thirdparty/zlib-1.2.12/msdos/Makefile.dj2 delete mode 100644 thirdparty/zlib-1.2.12/msdos/Makefile.emx delete mode 100644 thirdparty/zlib-1.2.12/msdos/Makefile.msc delete mode 100644 thirdparty/zlib-1.2.12/msdos/Makefile.tc delete mode 100644 thirdparty/zlib-1.2.12/nintendods/Makefile delete mode 100644 thirdparty/zlib-1.2.12/nintendods/README delete mode 100644 thirdparty/zlib-1.2.12/old/Makefile.emx delete mode 100644 thirdparty/zlib-1.2.12/old/Makefile.riscos delete mode 100644 thirdparty/zlib-1.2.12/old/README delete mode 100644 thirdparty/zlib-1.2.12/old/descrip.mms delete mode 100644 thirdparty/zlib-1.2.12/old/os2/Makefile.os2 delete mode 100644 thirdparty/zlib-1.2.12/old/os2/zlib.def delete mode 100644 thirdparty/zlib-1.2.12/old/visual-basic.txt delete mode 100644 thirdparty/zlib-1.2.12/os400/README400 delete mode 100644 thirdparty/zlib-1.2.12/os400/bndsrc delete mode 100644 thirdparty/zlib-1.2.12/os400/make.sh delete mode 100644 thirdparty/zlib-1.2.12/os400/zlib.inc delete mode 100644 thirdparty/zlib-1.2.12/qnx/package.qpg delete mode 100644 thirdparty/zlib-1.2.12/test/example.c delete mode 100644 thirdparty/zlib-1.2.12/test/infcover.c delete mode 100644 thirdparty/zlib-1.2.12/test/minigzip.c delete mode 100644 thirdparty/zlib-1.2.12/treebuild.xml delete mode 100644 thirdparty/zlib-1.2.12/trees.c delete mode 100644 thirdparty/zlib-1.2.12/trees.h delete mode 100644 thirdparty/zlib-1.2.12/uncompr.c delete mode 100644 thirdparty/zlib-1.2.12/watcom/watcom_f.mak delete mode 100644 thirdparty/zlib-1.2.12/watcom/watcom_l.mak delete mode 100644 thirdparty/zlib-1.2.12/win32/DLL_FAQ.txt delete mode 100644 thirdparty/zlib-1.2.12/win32/Makefile.bor delete mode 100644 thirdparty/zlib-1.2.12/win32/Makefile.gcc delete mode 100644 thirdparty/zlib-1.2.12/win32/Makefile.msc delete mode 100644 thirdparty/zlib-1.2.12/win32/README-WIN32.txt delete mode 100644 thirdparty/zlib-1.2.12/win32/VisualC.txt delete mode 100644 thirdparty/zlib-1.2.12/win32/zlib.def delete mode 100644 thirdparty/zlib-1.2.12/win32/zlib1.rc delete mode 100644 thirdparty/zlib-1.2.12/zconf.h delete mode 100644 thirdparty/zlib-1.2.12/zconf.h.cmakein delete mode 100644 thirdparty/zlib-1.2.12/zconf.h.in delete mode 100644 thirdparty/zlib-1.2.12/zlib.3 delete mode 100644 thirdparty/zlib-1.2.12/zlib.3.pdf delete mode 100644 thirdparty/zlib-1.2.12/zlib.h delete mode 100644 thirdparty/zlib-1.2.12/zlib.map delete mode 100644 thirdparty/zlib-1.2.12/zlib.pc delete mode 100644 thirdparty/zlib-1.2.12/zlib.pc.cmakein delete mode 100644 thirdparty/zlib-1.2.12/zlib.pc.in delete mode 100755 thirdparty/zlib-1.2.12/zlib2ansi delete mode 100644 thirdparty/zlib-1.2.12/zutil.c delete mode 100644 thirdparty/zlib-1.2.12/zutil.h diff --git a/buildPrerequisites.sh b/buildPrerequisites.sh deleted file mode 100755 index e7be748..0000000 --- a/buildPrerequisites.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/bash -x - - -export BUILD_HOME=$(pwd) -export INSTALLED=${BUILD_HOME}/installed -export DJGPP=/opt/cross/djgpp - - -function buildGrx() { - - pushd grx249 - cp -f ${BUILD_HOME}/makedefs.grx . - - make -f makefile.dj2 clean - make -f makefile.dj2 libs \ - CROSS_PLATFORM="${DJGPP}/bin/i586-pc-msdosdjgpp-" \ - C_FLAGS="-I${INSTALLED}/dos/include" \ - L_FLAGS="-L${INSTALLED}/dos/lib" - cp -p -f lib/dj2/*.a ${INSTALLED}/dos/lib - cp -p -f include/*.h ${INSTALLED}/dos/include - make -f makefile.dj2 clean - rm lib/dj2/lib* - rm bin/*.exe - - make -f makefile.x11 clean - make -f makefile.x11 libs \ - C_FLAGS="-I${INSTALLED}/linux/include" \ - L_FLAGS="-L${INSTALLED}/linux/lib" - cp -p -f lib/unix/*.a ${INSTALLED}/linux/lib - cp -p -f include/*.h ${INSTALLED}/linux/include - make -f makefile.x11 clean - rm lib/unix/lib* - rm bin/{bin2c,fnt2c,xmodetest} - - popd -} - - -function buildJpeg() { - pushd jpeg-9e - - ( - source ${DJGPP}/setenv - sed -i 's/RM= del/RM= rm/g' makefile.dj - cp -f jconfig.dj jconfig.h - make -i -f makefile.dj clean - make -i -f makefile.dj libjpeg.a - cp -p -f *.a ${INSTALLED}/dos/lib - cp -p -f *.h ${INSTALLED}/dos/include - make -i -f makefile.dj clean - ) - - ./configure --prefix=${INSTALLED}/linux --disable-shared - make clean - make - make install - make clean - - popd -} - - -function buildPng() { - pushd libpng-1.6.37 - - ( - source ${DJGPP}/setenv - cp scripts/makefile.dj2 . - sed -i "s#\-I\.\./zlib#\-I${INSTALLED}/dos/include \-DPNG_NO_CONSOLE_IO#g" makefile.dj2 - sed -i "s#\-L\.\./zlib/#\-L${INSTALLED}/dos/lib#g" makefile.dj2 - make -f makefile.dj2 clean - make -f makefile.dj2 libpng.a - cp -p -f *.a ${INSTALLED}/dos/lib - cp -p -f *.h ${INSTALLED}/dos/include - make -f makefile.dj2 clean - ) - - make clean - cp scripts/makefile.linux . - make -f makefile.linux clean - make -f makefile.linux libpng.a - cp -p -f *.a ${INSTALLED}/linux/lib - cp -p -f *.h ${INSTALLED}/linux/include - make -f makefile.linux clean - - popd -} - - -function buildZlib() { - pushd zlib-1.2.12 - - ( - source ${DJGPP}/setenv - make clean - ./configure --prefix=${INSTALLED}/dos - make - make install - make clean - rm *.exe - ) - - make clean - ./configure --prefix=${INSTALLED}/linux --static - make - make install - make clean - - popd -} - - -mkdir -p ${INSTALLED}/dos/{include,lib,share} -mkdir -p ${INSTALLED}/linux/{include,lib,share} - -pushd thirdparty - -buildZlib -buildPng -buildJpeg -buildGrx - -popd diff --git a/client/client.pro b/client/client.pro index e361768..e8a4a06 100644 --- a/client/client.pro +++ b/client/client.pro @@ -4,9 +4,8 @@ CONFIG -= qt CONFIG += console CONFIG += c99 -#CONFIG += BACKEND_GRX -#CONFIG += BACKEND_SDL2 -CONFIG += BACKEND_DJGPP +CONFIG += BACKEND_SDL2 +#CONFIG += BACKEND_DJGPP SHARED = $$PWD/../shared @@ -28,10 +27,10 @@ HEADERS += \ src/gui/font.h \ src/gui/gui.h \ src/gui/image.h \ + src/gui/surface.h \ src/gui/wmwindow.h \ src/os.h \ src/platform/djgpp.h \ - src/platform/grx.h \ src/platform/platform.h \ src/platform/sdl2.h \ src/thirdparty/stb_image.h @@ -45,28 +44,15 @@ SOURCES += \ src/gui/font.c \ src/gui/gui.c \ src/gui/image.c \ + src/gui/surface.c \ src/gui/wmwindow.c \ src/main.c \ src/platform/djgpp.c \ - src/platform/grx.c \ src/platform/sdl2.c OTHER_FILES += \ $$PWD/../LICENSE -BACKEND_GRX { - LINUX = $$PWD/../installed/linux - DEFINES += BACKEND_GRX - INCLUDEPATH += $$LINUX/include - LIBS += \ - -L$$LINUX/lib \ - -lgrx20X \ - -lX11 \ - -ljpeg \ - -lpng \ - -lz -} - BACKEND_SDL2 { DEFINES += BACKEND_SDL2 LIBS += \ diff --git a/client/src/gui/font.c b/client/src/gui/font.c index c2f25dc..c541351 100644 --- a/client/src/gui/font.c +++ b/client/src/gui/font.c @@ -105,15 +105,15 @@ void fontRender(FontT *font, char *string, ColorT foreground, ColorT background, offset += (font->span / 2); if (odd) { - videoSurfacePixelSet(x, yp, (data & 0x08) ? foreground : background); - videoSurfacePixelSet(x + 1, yp, (data & 0x04) ? foreground : background); - videoSurfacePixelSet(x + 2, yp, (data & 0x02) ? foreground : background); - videoSurfacePixelSet(x + 3, yp, (data & 0x01) ? foreground : background); + surfacePixelSet(x, yp, (data & 0x08) ? foreground : background); + surfacePixelSet(x + 1, yp, (data & 0x04) ? foreground : background); + surfacePixelSet(x + 2, yp, (data & 0x02) ? foreground : background); + surfacePixelSet(x + 3, yp, (data & 0x01) ? foreground : background); } else { - videoSurfacePixelSet(x, yp, (data & 0x80) ? foreground : background); - videoSurfacePixelSet(x + 1, yp, (data & 0x40) ? foreground : background); - videoSurfacePixelSet(x + 2, yp, (data & 0x20) ? foreground : background); - videoSurfacePixelSet(x + 3, yp, (data & 0x10) ? foreground : background); + surfacePixelSet(x, yp, (data & 0x80) ? foreground : background); + surfacePixelSet(x + 1, yp, (data & 0x40) ? foreground : background); + surfacePixelSet(x + 2, yp, (data & 0x20) ? foreground : background); + surfacePixelSet(x + 3, yp, (data & 0x10) ? foreground : background); } yp++; @@ -130,14 +130,14 @@ void fontRender(FontT *font, char *string, ColorT foreground, ColorT background, data = font->bits[offset]; offset += font->span; - videoSurfacePixelSet(x, yp, (data & 0x80) ? foreground : background); - videoSurfacePixelSet(x + 1, yp, (data & 0x40) ? foreground : background); - videoSurfacePixelSet(x + 2, yp, (data & 0x20) ? foreground : background); - videoSurfacePixelSet(x + 3, yp, (data & 0x10) ? foreground : background); - videoSurfacePixelSet(x + 4, yp, (data & 0x08) ? foreground : background); - videoSurfacePixelSet(x + 5, yp, (data & 0x04) ? foreground : background); - videoSurfacePixelSet(x + 6, yp, (data & 0x02) ? foreground : background); - videoSurfacePixelSet(x + 7, yp, (data & 0x01) ? foreground : background); + surfacePixelSet(x, yp, (data & 0x80) ? foreground : background); + surfacePixelSet(x + 1, yp, (data & 0x40) ? foreground : background); + surfacePixelSet(x + 2, yp, (data & 0x20) ? foreground : background); + surfacePixelSet(x + 3, yp, (data & 0x10) ? foreground : background); + surfacePixelSet(x + 4, yp, (data & 0x08) ? foreground : background); + surfacePixelSet(x + 5, yp, (data & 0x04) ? foreground : background); + surfacePixelSet(x + 6, yp, (data & 0x02) ? foreground : background); + surfacePixelSet(x + 7, yp, (data & 0x01) ? foreground : background); yp++; } diff --git a/client/src/gui/font.h b/client/src/gui/font.h index 22c19a5..0cda234 100644 --- a/client/src/gui/font.h +++ b/client/src/gui/font.h @@ -3,7 +3,7 @@ #include "os.h" -#include "../platform/platform.h" +#include "surface.h" typedef struct FontS { diff --git a/client/src/gui/gui.c b/client/src/gui/gui.c index 35c9e56..784a9c0 100644 --- a/client/src/gui/gui.c +++ b/client/src/gui/gui.c @@ -13,7 +13,6 @@ typedef struct WidgetCatalogS { ColorT *__guiBaseColors = NULL; SurfaceT *__guiBackBuffer = NULL; -SurfaceT *__guiScreenBuffer = NULL; FontT *__guiFontVGA8x14 = NULL; @@ -32,17 +31,17 @@ void guiRun(void) { platformEventGet(&event); // Paint desktop. - videoSurfaceSet(__guiBackBuffer); - videoSurfaceClear(GUI_CYAN); + surfaceSet(__guiBackBuffer); + surfaceClear(GUI_CYAN); // Paint GUI. wmPaint(&event); // Paint mouse pointer. - videoSurfaceBlitWithTransparency(__guiBackBuffer, event.x, event.y, _mousePointer, _mouseTransparency); + surfaceBlitWithTransparency(__guiBackBuffer, event.x, event.y, _mousePointer, _mouseTransparency); // Copy to screen. - videoSurfaceBlit(__guiScreenBuffer, 0, 0, __guiBackBuffer); + videoBlit(0, 0, __guiBackBuffer); // Emergency Exit? if (event.flags & EVENT_FLAG_KEYPRESS && event.key == KEY_ESC) guiStop(); @@ -68,8 +67,8 @@ void guiShutdown(void) { fontUnload(&__guiFontVGA8x14); - videoSurfaceDestroy(_mousePointer); - videoSurfaceDestroy(__guiBackBuffer); + surfaceDestroy(_mousePointer); + surfaceDestroy(__guiBackBuffer); platformShutdown(); } @@ -79,12 +78,11 @@ uint8_t guiStartup(int16_t width, int16_t height, int16_t depth) { if (platformStartup(width, height, depth) == FAIL) return FAIL; - __guiScreenBuffer = videoSurfaceScreenGet(); - __guiBackBuffer = videoSurfaceCreate(videoDisplayWidthGet(), videoDisplayHeightGet()); - videoSurfaceSet(__guiBackBuffer); + __guiBackBuffer = surfaceCreate(videoDisplayWidthGet(), videoDisplayHeightGet()); + surfaceSet(__guiBackBuffer); _mousePointer = imageLoad("mouse.png"); - _mouseTransparency = videoSurfacePixelGet(_mousePointer, videoSurfaceWidthGet(_mousePointer) - 2, 0); // Find our transparency color. + _mouseTransparency = surfacePixelGet(_mousePointer, surfaceWidthGet(_mousePointer) - 2, 0); // Find our transparency color. __guiFontVGA8x14 = fontLoad("vga8x14.dat"); diff --git a/client/src/gui/image.c b/client/src/gui/image.c index 3d1404b..3dc7d77 100644 --- a/client/src/gui/image.c +++ b/client/src/gui/image.c @@ -2,7 +2,6 @@ #define STBI_ONLY_PNG #include "thirdparty/stb_image.h" -#include "../platform/platform.h" #include "image.h" @@ -17,23 +16,23 @@ SurfaceT *imageLoad(char *filename) { int32_t x; int32_t y; SurfaceT *i = NULL; - SurfaceT *t = videoSurfaceGet(); + SurfaceT *t = surfaceGet(); unsigned char *raw = NULL; r = stbi_info(filename, &w, &h, &n); if (r) { raw = stbi_load(filename, &w, &h, &n, PIXEL_COMPONENTS); if (raw) { - i = videoSurfaceCreate(w, h); - videoSurfaceSet(i); + i = surfaceCreate(w, h); + surfaceSet(i); n = 0; for (y=0; ywidth == source->width && target->height == source->height) { + // Direct blit of entire surface. + memcpy(target->buffer.bits8, source->buffer.bits8, source->bytes); + } else { + // Blit into larger surface. + offsetTarget = targetY * __surfaceActive->scanline + targetX * __surfaceBytesPerPixel; + offsetSource = 0; + for (y1=targetY; y1height; y1++) { + memcpy(&target->buffer.bits8[offsetTarget], &source->buffer.bits8[offsetSource], source->scanline); + offsetTarget += target->scanline; + offsetSource += source->scanline; + } + } +} + + +void surfaceBlitWithTransparency(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source, ColorT transparent) { + uint16_t x1; + uint16_t y1; + uint16_t x2 = source->width; + uint16_t y2 = source->height; + ColorT pixel; + SurfaceT *t = surfaceGet(); + + surfaceSet(target); + + // Clip on right and bottom + if (targetX + x2 > target->width) x2 -= targetX + x2 - target->width; + if (targetY + y2 > target->height) y2 -= targetY + y2 - target->height; + + for (y1=0; y1width; x++) { + surfacePixelSet(x, 0, color); + } + + // Copy it to the other lines. + offsetTarget = __surfaceActive->scanline; + for (x=1; x<__surfaceActive->height; x++) { + memcpy(&__surfaceActive->buffer.bits8[offsetTarget], &__surfaceActive->buffer.bits8[0], __surfaceActive->scanline); + offsetTarget += __surfaceActive->scanline; + } +} + + +ColorT surfaceColorMake(uint8_t r, uint8_t g, uint8_t b) { + return + (r >> __surfaceFormat.rLoss) << __surfaceFormat.rShift | + (g >> __surfaceFormat.gLoss) << __surfaceFormat.gShift | + (b >> __surfaceFormat.bLoss) << __surfaceFormat.bShift | + ((255 >> __surfaceFormat.aLoss) << __surfaceFormat.aShift & __surfaceFormat.aMask); +} + + +SurfaceT *surfaceCreate(int16_t width, int16_t height) { + SurfaceT *surface = (SurfaceT *)malloc(sizeof(SurfaceT)); + + if (!surface) return NULL; + + surface->width = width; + surface->height = height; + surface->scanline = width * __surfaceBytesPerPixel; + surface->bytes = surface->scanline * height; + + surface->buffer.bits8 = malloc(surface->bytes); + if (!surface->buffer.bits8) { + free(surface); + return NULL; + } + + memset(surface->buffer.bits8, 0, surface->bytes); + + return surface; +} + + +void surfaceBox(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c) { + surfaceLineH(x1, x2, y1, c); + surfaceLineH(x1, x2, y2, c); + surfaceLineV(x1, y1, y2, c); + surfaceLineV(x2, y1, y2, c); +} + + +void surfaceBoxFilled(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c) { + int16_t i; + size_t offsetTarget; + size_t offsetSource; + uint16_t width; + + if (x1 > x2) { + i = x1; + x1 = x2; + x2 = i; + } + + if (y1 > y2) { + i = y1; + y1 = y2; + y2 = i; + } + + width = (x2 - x1 + 1) * __surfaceBytesPerPixel; + + // Draw the top line. + for (i=x1; i<=x2; i++) { + surfacePixelSet(i, y1, c); + } + + // Copy it to the other lines. + offsetTarget = __surfaceActive->scanline * (y1 + 1) + (x1 * __surfaceBytesPerPixel); + offsetSource = __surfaceActive->scanline * y1 + (x1 * __surfaceBytesPerPixel); + for (i=y1 + 1; i<=y2; i++) { + memcpy(&__surfaceActive->buffer.bits8[offsetTarget], &__surfaceActive->buffer.bits8[offsetSource], width); + offsetTarget += __surfaceActive->scanline; + } +} + + +void surfaceDestroy(SurfaceT *surface) { + free(surface->buffer.bits8); + free(surface); +} + + +SurfaceT *surfaceGet(void) { + return __surfaceActive; +} + + +int16_t surfaceHeightGet(SurfaceT *surface) { + return surface->height; +} + + +void surfaceLineH(int16_t x1, int16_t x2, int16_t y, ColorT c) { + int16_t i; + int16_t t; + + if (x1 > x2) { + t = x2; + x2 = x1; + x1 = t; + } + + for (i=x1; i<=x2; i++) { + surfacePixelSet(i, y, c); + } +} + + +void surfaceLineV(int16_t x, int16_t y1, int16_t y2, ColorT c) { + int16_t i; + int16_t t; + + if (y1 > y2) { + t = y2; + y2 = y1; + y1 = t; + } + + for (i=y1; i<=y2; i++) { + surfacePixelSet(x, i, c); + } +} + + +ColorT surfacePixelGet(SurfaceT *surface, int16_t x, int16_t y) { + switch (__surfaceBitsPerPixel) { + case 8: + return surface->buffer.bits8[y * surface->width + x]; + + case 16: + return surface->buffer.bits16[y * surface->width + x]; + + default: + return surface->buffer.bits32[y * surface->width + x]; + } +} + + +void surfacePixelSet(int16_t x, int16_t y, ColorT c) { + + switch (__surfaceBitsPerPixel) { + case 8: + __surfaceActive->buffer.bits8[y * __surfaceActive->width + x] = (uint8_t)c; + break; + + case 16: + __surfaceActive->buffer.bits16[y * __surfaceActive->width + x] = (uint8_t)c; + break; + + default: + __surfaceActive->buffer.bits32[y * __surfaceActive->width + x] = (uint8_t)c; + break; + } +} + + +void surfaceSet(SurfaceT *surface) { + __surfaceActive = surface; +} + + +void surfaceShutdown(void) { + // Nada +} + + +void surfaceStartup(uint8_t bits) { + uint8_t redMaskSize; + uint8_t greenMaskSize; + uint8_t blueMaskSize; + uint8_t alphaMaskSize; + + __surfaceBitsPerPixel = bits; + __surfaceBytesPerPixel = bits >> 3; + + switch (bits) { + case 8: + // xxx 3:3:2 + alphaMaskSize = 0; + redMaskSize = 3; + greenMaskSize = 3; + blueMaskSize = 2; + break; + + case 16: + // xx 5:6:5 + alphaMaskSize = 0; + redMaskSize = 5; + greenMaskSize = 6; + blueMaskSize = 5; + break; + + default: + // x 8:8:8 + alphaMaskSize = 8; + redMaskSize = 8; + greenMaskSize = 8; + blueMaskSize = 8; + break; + } + + __surfaceFormat.bShift = 0; + __surfaceFormat.gShift = __surfaceFormat.bShift + blueMaskSize; + __surfaceFormat.rShift = __surfaceFormat.gShift + greenMaskSize; + __surfaceFormat.aShift = __surfaceFormat.rShift + redMaskSize; + + __surfaceFormat.rMask = ((1UL << redMaskSize) - 1) << __surfaceFormat.rShift; + __surfaceFormat.gMask = ((1UL << greenMaskSize) - 1) << __surfaceFormat.gShift; + __surfaceFormat.bMask = ((1UL << blueMaskSize) - 1) << __surfaceFormat.bShift; + __surfaceFormat.aMask = ((1UL << alphaMaskSize) - 1) << __surfaceFormat.aShift; + + __surfaceFormat.rLoss = 8 - redMaskSize; + __surfaceFormat.gLoss = 8 - greenMaskSize; + __surfaceFormat.bLoss = 8 - blueMaskSize; + __surfaceFormat.aLoss = 8 - alphaMaskSize; + + printf("Red Mask %u Shift %u Loss %u\n", __surfaceFormat.rMask, __surfaceFormat.rShift, __surfaceFormat.rLoss); + printf("Green Mask %u Shift %u Loss %u\n", __surfaceFormat.gMask, __surfaceFormat.gShift, __surfaceFormat.gLoss); + printf("Blue Mask %u Shift %u Loss %u\n", __surfaceFormat.bMask, __surfaceFormat.bShift, __surfaceFormat.bLoss); + printf("Alpha Mask %u Shift %u Loss %u\n\n", __surfaceFormat.aMask, __surfaceFormat.aShift, __surfaceFormat.aLoss); +} + + +int16_t surfaceWidthGet(SurfaceT *surface) { + return surface->width; +} + + diff --git a/client/src/gui/surface.h b/client/src/gui/surface.h new file mode 100644 index 0000000..98da503 --- /dev/null +++ b/client/src/gui/surface.h @@ -0,0 +1,64 @@ +#ifndef SURFACE_H +#define SURFACE_H + + +#include "os.h" + + +typedef uint32_t ColorT; + +typedef struct SurfaceS { + uint16_t width; + uint16_t height; + size_t scanline; + size_t bytes; + union { + uint8_t *bits8; + uint16_t *bits16; + uint32_t *bits32; + } buffer; +} SurfaceT; + +typedef struct SurfaceFormatS { + uint32_t rMask; + uint32_t gMask; + uint32_t bMask; + uint32_t aMask; + uint8_t rShift; + uint8_t gShift; + uint8_t bShift; + uint8_t aShift; + uint8_t rLoss; + uint8_t gLoss; + uint8_t bLoss; + uint8_t aLoss; +} SurfaceFormatT; + + +extern SurfaceT *__surfaceActive; +extern uint8_t __surfaceBitsPerPixel; +extern uint8_t __surfaceBytesPerPixel; +extern SurfaceFormatT __surfaceFormat; + + +void surfaceBlit(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source); +void surfaceBlitWithTransparency(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source, ColorT transparent); +void surfaceClear(ColorT color); +ColorT surfaceColorMake(uint8_t r, uint8_t g, uint8_t b); +SurfaceT *surfaceCreate(int16_t width, int16_t height); +void surfaceBox(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c); +void surfaceBoxFilled(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c); +void surfaceDestroy(SurfaceT *surface); +SurfaceT *surfaceGet(void); +int16_t surfaceHeightGet(SurfaceT *surface); +void surfaceLineH(int16_t x1, int16_t x2, int16_t y, ColorT c); +void surfaceLineV(int16_t x, int16_t y1, int16_t y2, ColorT c); +ColorT surfacePixelGet(SurfaceT *surface, int16_t x, int16_t y); +void surfacePixelSet(int16_t x, int16_t y, ColorT c); +void surfaceSet(SurfaceT *surface); +void surfaceShutdown(void); +void surfaceStartup(uint8_t bits); +int16_t surfaceWidthGet(SurfaceT *surface); + + +#endif // SURFACE_H diff --git a/client/src/gui/wmwindow.c b/client/src/gui/wmwindow.c index b565f5f..8a0eb99 100644 --- a/client/src/gui/wmwindow.c +++ b/client/src/gui/wmwindow.c @@ -57,14 +57,14 @@ void windowPaint(struct WidgetS *widget, ...) { ColorT titleBackgroundColor = GUI_DARKGRAY; // Fake Window contents. - videoSurfaceBoxFilled(x1, y1, x2, y2, GUI_BLACK); + surfaceBoxFilled(x1, y1, x2, y2, GUI_BLACK); // If we need a titlebar, it's 18px. if (w->title || w->flags & WIN_CLOSE || w->flags & WIN_MAXIMIZE || w->flags & WIN_MINIMIZE) { // Draw title bar background. y1 -= 18; - videoSurfaceBoxFilled(x1, y1, x2, y1 + 17, titleBackgroundColor); + surfaceBoxFilled(x1, y1, x2, y1 + 17, titleBackgroundColor); // Close box? if (w->flags & WIN_CLOSE) { @@ -73,18 +73,18 @@ void windowPaint(struct WidgetS *widget, ...) { w->close.y = y1 + 1; w->close.x2 = w->close.x + 24; w->close.y2 = w->close.y + 15; - videoSurfaceBoxFilled(w->close.x + 1, w->close.y + 1, w->close.x2 - 1, w->close.y2 - 1, GUI_LIGHTGRAY); - videoSurfaceLineH(w->close.x, w->close.x2, w->close.y, GUI_WHITE); - videoSurfaceLineV(w->close.x, w->close.y, w->close.y2, GUI_WHITE); + surfaceBoxFilled(w->close.x + 1, w->close.y + 1, w->close.x2 - 1, w->close.y2 - 1, GUI_LIGHTGRAY); + surfaceLineH(w->close.x, w->close.x2, w->close.y, GUI_WHITE); + surfaceLineV(w->close.x, w->close.y, w->close.y2, GUI_WHITE); // Button is 8px down, 3px tall, and 4px in on both sides. tx1 = w->close.x + 4; ty1 = w->close.y + 7; tx2 = w->close.x2 - 4; ty2 = w->close.y + 9; - videoSurfaceLineH(tx1, tx2, ty1, GUI_WHITE); - videoSurfacePixelSet(tx1, ty1 + 1, GUI_WHITE); - videoSurfaceLineH(tx1, tx2, ty2, GUI_BLACK); - videoSurfaceLineV(tx2, ty1, ty2, GUI_BLACK); + surfaceLineH(tx1, tx2, ty1, GUI_WHITE); + surfacePixelSet(tx1, ty1 + 1, GUI_WHITE); + surfaceLineH(tx1, tx2, ty2, GUI_BLACK); + surfaceLineV(tx2, ty1, ty2, GUI_BLACK); // Set titlebar area. w->titlebar.x = w->close.x2 + 2; } else { @@ -102,18 +102,18 @@ void windowPaint(struct WidgetS *widget, ...) { w->maximize.x2 = x2 - 1; w->maximize.x = w->maximize.x2 - 24; w->maximize.y2 = w->maximize.y + 15; - videoSurfaceBoxFilled(w->maximize.x + 1, w->maximize.y + 1, w->maximize.x2 - 1, w->maximize.y2 - 1, GUI_LIGHTGRAY); - videoSurfaceLineH(w->maximize.x, w->maximize.x2, w->maximize.y, GUI_WHITE); - videoSurfaceLineV(w->maximize.x, w->maximize.y, w->maximize.y2, GUI_WHITE); + surfaceBoxFilled(w->maximize.x + 1, w->maximize.y + 1, w->maximize.x2 - 1, w->maximize.y2 - 1, GUI_LIGHTGRAY); + surfaceLineH(w->maximize.x, w->maximize.x2, w->maximize.y, GUI_WHITE); + surfaceLineV(w->maximize.x, w->maximize.y, w->maximize.y2, GUI_WHITE); // Button is 3px down, and 4px in on both sides. tx1 = w->maximize.x + 4; ty1 = w->maximize.y + 4; tx2 = w->maximize.x2 - 3; ty2 = w->maximize.y + 12; - videoSurfaceLineH(tx1, tx2, ty1, GUI_WHITE); - videoSurfaceLineV(tx1, ty1, ty2, GUI_WHITE); - videoSurfaceLineH(tx1, tx2, ty2, GUI_BLACK); - videoSurfaceLineV(tx2, ty1, ty2, GUI_BLACK); + surfaceLineH(tx1, tx2, ty1, GUI_WHITE); + surfaceLineV(tx1, ty1, ty2, GUI_WHITE); + surfaceLineH(tx1, tx2, ty2, GUI_BLACK); + surfaceLineV(tx2, ty1, ty2, GUI_BLACK); // Move minimize button over. minimizeOffset = 26; // Set titlebar area. @@ -127,24 +127,24 @@ void windowPaint(struct WidgetS *widget, ...) { w->minimize.x2 = x2 - 1 - minimizeOffset; w->minimize.x = w->minimize.x2 - 24; w->minimize.y2 = w->minimize.y + 15; - videoSurfaceBoxFilled(w->minimize.x + 1, w->minimize.y + 1, w->minimize.x2 - 1, w->minimize.y2 - 1, GUI_LIGHTGRAY); - videoSurfaceLineH(w->minimize.x, w->minimize.x2, w->minimize.y, GUI_WHITE); - videoSurfaceLineV(w->minimize.x, w->minimize.y, w->minimize.y2, GUI_WHITE); + surfaceBoxFilled(w->minimize.x + 1, w->minimize.y + 1, w->minimize.x2 - 1, w->minimize.y2 - 1, GUI_LIGHTGRAY); + surfaceLineH(w->minimize.x, w->minimize.x2, w->minimize.y, GUI_WHITE); + surfaceLineV(w->minimize.x, w->minimize.y, w->minimize.y2, GUI_WHITE); tx1 = w->minimize.x + 10; ty1 = w->minimize.y + 6; tx2 = w->minimize.x2 - 8; ty2 = w->minimize.y + 9; - videoSurfaceLineH(tx1, tx2, ty1, GUI_WHITE); - videoSurfaceLineV(tx1, ty1, ty2, GUI_WHITE); - videoSurfaceLineH(tx1, tx2, ty2, GUI_BLACK); - videoSurfaceLineV(tx2, ty1, ty2, GUI_BLACK); + surfaceLineH(tx1, tx2, ty1, GUI_WHITE); + surfaceLineV(tx1, ty1, ty2, GUI_WHITE); + surfaceLineH(tx1, tx2, ty2, GUI_BLACK); + surfaceLineV(tx2, ty1, ty2, GUI_BLACK); // Set titlebar area. w->titlebar.x2 -= 26; } // Title font area is 12px high. - videoSurfaceLineH(w->titlebar.x, w->titlebar.x2 - 1, w->titlebar.y, GUI_WHITE); - videoSurfaceLineV(w->titlebar.x, w->titlebar.y, w->titlebar.y2 - 1, GUI_WHITE); + surfaceLineH(w->titlebar.x, w->titlebar.x2 - 1, w->titlebar.y, GUI_WHITE); + surfaceLineV(w->titlebar.x, w->titlebar.y, w->titlebar.y2 - 1, GUI_WHITE); if (w->title) { ty1 = w->titlebar.y + 2; tx1 = w->titlebar.x + 2 + (w->titlebar.x2 - w->titlebar.x - 4) * 0.5 - ((strlen(w->title) * 8) * 0.5); @@ -157,29 +157,29 @@ void windowPaint(struct WidgetS *widget, ...) { y1--; x2++; y2++; - videoSurfaceLineH(x1, x2, y2, GUI_WHITE); - videoSurfaceLineV(x2, y1, y2, GUI_WHITE); - videoSurfaceLineH(x1, x2, y1, GUI_DARKGRAY); - videoSurfaceLineV(x1, y1, y2, GUI_DARKGRAY); + surfaceLineH(x1, x2, y2, GUI_WHITE); + surfaceLineV(x2, y1, y2, GUI_WHITE); + surfaceLineH(x1, x2, y1, GUI_DARKGRAY); + surfaceLineV(x1, y1, y2, GUI_DARKGRAY); // Frame Border. 4px wide. x1 -= 4; y1 -= 4; x2 += 4; y2 += 4; - videoSurfaceBoxFilled(x1, y1, x1 + 3, y2, GUI_LIGHTGRAY); - videoSurfaceBoxFilled(x2, y1, x2 - 3, y2, GUI_LIGHTGRAY); - videoSurfaceBoxFilled(x1, y1, x2, y1 + 3, GUI_LIGHTGRAY); - videoSurfaceBoxFilled(x1, y2, x2, y2 - 3, GUI_LIGHTGRAY); + surfaceBoxFilled(x1, y1, x1 + 3, y2, GUI_LIGHTGRAY); + surfaceBoxFilled(x2, y1, x2 - 3, y2, GUI_LIGHTGRAY); + surfaceBoxFilled(x1, y1, x2, y1 + 3, GUI_LIGHTGRAY); + surfaceBoxFilled(x1, y2, x2, y2 - 3, GUI_LIGHTGRAY); // Resize handle. if (w->flags & WIN_RESIZE) { ty1 = y2 - 15 - 3; tx1 = x2 - 15 - 3; - videoSurfaceLineH(x2, x2 - 3, ty1, GUI_DARKGRAY); - videoSurfaceLineH(x2, x2 - 3, ty1 + 1, GUI_WHITE); - videoSurfaceLineV(tx1, y2, y2 - 3, GUI_DARKGRAY); - videoSurfaceLineV(tx1 + 1, y2, y2 - 3, GUI_WHITE); + surfaceLineH(x2, x2 - 3, ty1, GUI_DARKGRAY); + surfaceLineH(x2, x2 - 3, ty1 + 1, GUI_WHITE); + surfaceLineV(tx1, y2, y2 - 3, GUI_DARKGRAY); + surfaceLineV(tx1 + 1, y2, y2 - 3, GUI_WHITE); } // Outermost shadow frame. 1px wide. @@ -187,10 +187,10 @@ void windowPaint(struct WidgetS *widget, ...) { y1--; x2++; y2++; - videoSurfaceLineH(x1, x2, y1, GUI_WHITE); - videoSurfaceLineV(x1, y1, y2, GUI_WHITE); - videoSurfaceLineH(x1, x2, y2, GUI_DARKGRAY); - videoSurfaceLineV(x2, y1, y2, GUI_DARKGRAY); + surfaceLineH(x1, x2, y1, GUI_WHITE); + surfaceLineV(x1, y1, y2, GUI_WHITE); + surfaceLineH(x1, x2, y2, GUI_DARKGRAY); + surfaceLineV(x2, y1, y2, GUI_DARKGRAY); w->bounds.x = x1; w->bounds.x2 = x2; w->bounds.y = y1; @@ -225,7 +225,7 @@ void wmPaint(EventT *event) { // Paint all windows. for (i=0; ireg->paint(widget); } @@ -239,12 +239,12 @@ void wmPaint(EventT *event) { if (event->buttons & BUTTON_LEFT) { // DEBUG - draw active regions. ***TODO*** No resize grabber here. - videoSurfaceBox(win->bounds.x, win->bounds.y, win->bounds.x2, win->bounds.y2, GUI_YELLOW); - videoSurfaceBox(win->base.r.x, win->base.r.y, win->base.r.x + win->base.r.w - 1, win->base.r.y + win->base.r.h - 1, GUI_YELLOW); - videoSurfaceBox(win->close.x, win->close.y, win->close.x2, win->close.y2, GUI_RED); - videoSurfaceBox(win->titlebar.x, win->titlebar.y, win->titlebar.x2, win->titlebar.y2, GUI_RED); - videoSurfaceBox(win->minimize.x, win->minimize.y, win->minimize.x2, win->minimize.y2, GUI_RED); - videoSurfaceBox(win->maximize.x, win->maximize.y, win->maximize.x2, win->maximize.y2, GUI_RED); + surfaceBox(win->bounds.x, win->bounds.y, win->bounds.x2, win->bounds.y2, GUI_YELLOW); + surfaceBox(win->base.r.x, win->base.r.y, win->base.r.x + win->base.r.w - 1, win->base.r.y + win->base.r.h - 1, GUI_YELLOW); + surfaceBox(win->close.x, win->close.y, win->close.x2, win->close.y2, GUI_RED); + surfaceBox(win->titlebar.x, win->titlebar.y, win->titlebar.x2, win->titlebar.y2, GUI_RED); + surfaceBox(win->minimize.x, win->minimize.y, win->minimize.x2, win->minimize.y2, GUI_RED); + surfaceBox(win->maximize.x, win->maximize.y, win->maximize.x2, win->maximize.y2, GUI_RED); // Are we currently dragging? if (dragging) { diff --git a/client/src/platform/djgpp.h b/client/src/platform/djgpp.h index ea20372..2944192 100644 --- a/client/src/platform/djgpp.h +++ b/client/src/platform/djgpp.h @@ -64,20 +64,20 @@ void platformEventGet(EventT *event); ColorT videoColorMake(uint8_t red, uint8_t green, uint8_t blue); uint16_t videoDisplayHeightGet(void); uint16_t videoDisplayWidthGet(void); -void videoSurfaceBlit(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source); -void videoSurfaceBlitWithTransparency(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source, ColorT transparent); -void videoSurfaceClear(ColorT color); -SurfaceT *videoSurfaceCreate(int16_t width, int16_t height); -void videoSurfaceBox(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c); -void videoSurfaceBoxFilled(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c); -void videoSurfaceDestroy(SurfaceT *surface); -SurfaceT *videoSurfaceGet(void); -int16_t videoSurfaceHeightGet(SurfaceT *surface); -void videoSurfaceLineH(int16_t x1, int16_t y1, int16_t x, ColorT c); -void videoSurfaceLineV(int16_t x, int16_t x2, int16_t y2, ColorT c); -void videoSurfaceSet(SurfaceT *surface); -SurfaceT *videoSurfaceScreenGet(void); -int16_t videoSurfaceWidthGet(SurfaceT *surface); +void surfaceBlit(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source); +void surfaceBlitWithTransparency(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source, ColorT transparent); +void surfaceClear(ColorT color); +SurfaceT *surfaceCreate(int16_t width, int16_t height); +void surfaceBox(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c); +void surfaceBoxFilled(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c); +void surfaceDestroy(SurfaceT *surface); +SurfaceT *surfaceGet(void); +int16_t surfaceHeightGet(SurfaceT *surface); +void surfaceLineH(int16_t x1, int16_t y1, int16_t x, ColorT c); +void surfaceLineV(int16_t x, int16_t x2, int16_t y2, ColorT c); +void surfaceSet(SurfaceT *surface); +SurfaceT *videoDisplayGet(void); +int16_t surfaceWidthGet(SurfaceT *surface); #endif // DJGPP_H diff --git a/client/src/platform/grx.c b/client/src/platform/grx.c deleted file mode 100644 index de87580..0000000 --- a/client/src/platform/grx.c +++ /dev/null @@ -1,107 +0,0 @@ -#ifdef BACKEND_GRX - - -#include "stdio.h" - -#include "grx.h" -#include "../gui/gui.h" - - -typedef struct VideoModeS { - int width; - int height; - int depth; -} VideoModeT; - - -// This is a total hack to prevent GRX from drawing the mouse pointer. -extern struct _GR_mouseInfo _GrMouseInfo; - - -void platformShutdown(void) { - GrMouseEraseCursor(); - GrMouseUnInit(); - - GrSetMode(GR_default_text); -} - - -uint8_t platformStartup(int16_t width, int16_t height, int16_t depth) { - // Set up graphics environment. - if (!GrSetMode(GR_width_height_bpp_graphics, width, height, depth)) { - return FAIL; - } - GrSetRGBcolorMode(); - __guiBaseColors = GrAllocEgaColors(); // This does not need released. - - // Set up mouse. - GrMouseInit(); - GrMouseEventEnable(1, 1); - GrMouseSetCursorMode(GR_M_CUR_NORMAL); - // This is a total hack to prevent GRX from drawing the mouse pointer. - _GrMouseInfo.cursor = 0; - - return SUCCESS; -} - - -void videoModesShow(void) { - VideoModeT mode[256]; - int32_t modeCount = 0; - int32_t i; - GrFrameMode fm; - const GrVideoMode *mp; - - GrSetDriver(0); - if (GrCurrentVideoDriver() == 0) { - printf("No graphics driver found!\n"); - return; - } - - for (fm=GR_firstGraphicsFrameMode; fm<=GR_lastGraphicsFrameMode; fm++) { - mp = GrFirstVideoMode(fm); - while (mp != 0) { - if (mp->width >= 640 && mp->height >= 480 && mp->bpp >= 8) { - mode[modeCount].width = mp->width; - mode[modeCount].height = mp->height; - mode[modeCount].depth = mp->bpp; - modeCount++; - } - mp = GrNextVideoMode(mp); - } - } - - GrSetMode(GR_default_text); - - printf("Available graphics modes:\n\n"); - for (i=0; igc_ymax + 1; -} - - -int16_t videoSurfaceWidthGet(SurfaceT *surface) { - return surface->gc_xmax + 1; -} - - -#endif // BACKEND_GRX diff --git a/client/src/platform/grx.h b/client/src/platform/grx.h deleted file mode 100644 index 6b28685..0000000 --- a/client/src/platform/grx.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef GRX_H -#define GRX_H - - -#include - -#include "grx20.h" -#include "grxkeys.h" - - -typedef GrColor ColorT; -typedef GrContext SurfaceT; -typedef GrMouseEvent EventT; - - -#define EVENT_FLAG_KEYPRESS GR_M_KEYPRESS -#define EVENT_FLAG_LEFT_DOWN GR_M_LEFT_DOWN -#define EVENT_FLAG_LEFT_UP GR_M_LEFT_UP -#define EVENT_FLAG_RIGHT_DOWN GR_M_RIGHT_DOWN -#define EVENT_FLAG_RIGHT_UP GR_M_RIGHT_UP - -#define BUTTON_LEFT GR_M_LEFT -#define BUTTON_RIGHT GR_M_RIGHT - -#define META_ALT GR_KB_ALT -#define META_CTRL GR_KB_CTRL -#define META_SHIFT GR_KB_SHIFT - -#define KEY_ESC GrKey_Escape - - -#define platformEventGet(p) GrMouseGetEventT(GR_M_EVENT, p, 0) - -#define videoDisplayHeightGet GrScreenY -#define videoDisplayWidthGet GrScreenX -#define videoSurfaceClear GrClearContext -#define videoColorMake GrAllocColor -#define videoSurfaceCreate(w,h) GrCreateContext(w,h,0,0) -#define videoSurfaceBox GrBox -#define videoSurfaceBoxFilled GrFilledBox -#define videoSurfaceDestroy GrDestroyContext -#define videoSurfaceGet GrCurrentContext -#define videoSurfaceLineH GrHLine -#define videoSurfaceLineV GrVLine -#define videoSurfacePixelGet GrPixelC -#define videoSurfacePixelSet GrPlot -#define videoSurfaceSet GrSetContext -#define videoSurfaceScreenGet GrScreenContext - - -void videoSurfaceBlit(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source); -void videoSurfaceBlitWithTransparency(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source, ColorT transparent); -int16_t videoSurfaceHeightGet(SurfaceT *surface); -int16_t videoSurfaceWidthGet(SurfaceT *surface); - - -#endif // GRX_H diff --git a/client/src/platform/platform.h b/client/src/platform/platform.h index 4990035..3b85119 100644 --- a/client/src/platform/platform.h +++ b/client/src/platform/platform.h @@ -5,10 +5,6 @@ #include "stdint.h" -#ifdef BACKEND_GRX -#include "grx.h" -#endif - #ifdef BACKEND_SDL2 #include "sdl2.h" #endif diff --git a/client/src/platform/sdl2.c b/client/src/platform/sdl2.c index 0a83fce..71b44e7 100644 --- a/client/src/platform/sdl2.c +++ b/client/src/platform/sdl2.c @@ -2,28 +2,20 @@ #include "sdl2.h" - - -#define BYTES_PER_PIXEL 4 +#include "../gui/surface.h" static SDL_Window *_window = NULL; static SDL_Renderer *_renderer = NULL; -static SDL_Surface *_surface = NULL; static SDL_Texture *_texture = NULL; static uint16_t _width = 0; static uint16_t _height = 0; static uint8_t _windowScale = 1; -static uint32_t _pixelFormat = SDL_PIXELFORMAT_RGBA8888; -static SurfaceT *_activeSurface = NULL; extern ColorT *__guiBaseColors; -#define PUTPIXEL(s,x,y,c) s->buffer.bits32[(y) * s->width + (x)] = (c) - - void platformEventGet(EventT *event) { SDL_Event e; static uint8_t ASCII = 0; @@ -94,6 +86,8 @@ void platformEventGet(EventT *event) { void platformShutdown(void) { + surfaceShutdown(); + free(__guiBaseColors); if (_texture) { @@ -135,17 +129,52 @@ void platformStartup(int16_t width, int16_t height, int16_t depth) { { 255, 255, 85 }, /* yellow */ { 255, 255, 255 } /* white */ }; + SDL_PixelFormatEnum pixelFormat; + (void)depth; + + SDL_Surface *bits8 = SDL_CreateRGBSurfaceWithFormat(0, 320, 200, 8, SDL_PIXELFORMAT_RGB332); + SDL_Surface *bits16 = SDL_CreateRGBSurfaceWithFormat(0, 320, 200, 8, SDL_PIXELFORMAT_RGB565); + SDL_Surface *bits32 = SDL_CreateRGBSurfaceWithFormat(0, 320, 200, 8, SDL_PIXELFORMAT_ARGB8888); + + printf("8 Red Mask %u Shift %u Loss %u\n", bits8->format->Rmask, bits8->format->Rshift, bits8->format->Rloss); + printf("8 Green Mask %u Shift %u Loss %u\n", bits8->format->Gmask, bits8->format->Gshift, bits8->format->Gloss); + printf("8 Blue Mask %u Shift %u Loss %u\n", bits8->format->Bmask, bits8->format->Bshift, bits8->format->Bloss); + printf("8 Alpha Mask %u Shift %u Loss %u\n\n", bits8->format->Amask, bits8->format->Ashift, bits8->format->Aloss); + + printf("16 Red Mask %u Shift %u Loss %u\n", bits16->format->Rmask, bits16->format->Rshift, bits16->format->Rloss); + printf("16 Green Mask %u Shift %u Loss %u\n", bits16->format->Gmask, bits16->format->Gshift, bits16->format->Gloss); + printf("16 Blue Mask %u Shift %u Loss %u\n", bits16->format->Bmask, bits16->format->Bshift, bits16->format->Bloss); + printf("16 Alpha Mask %u Shift %u Loss %u\n\n", bits16->format->Amask, bits16->format->Ashift, bits16->format->Aloss); + + printf("32 Red Mask %u Shift %u Loss %u\n", bits32->format->Rmask, bits32->format->Rshift, bits32->format->Rloss); + printf("32 Green Mask %u Shift %u Loss %u\n", bits32->format->Gmask, bits32->format->Gshift, bits32->format->Gloss); + printf("32 Blue Mask %u Shift %u Loss %u\n", bits32->format->Bmask, bits32->format->Bshift, bits32->format->Bloss); + printf("32 Alpha Mask %u Shift %u Loss %u\n\n", bits32->format->Amask, bits32->format->Ashift, bits32->format->Aloss); + + switch (depth) { + case 8: + pixelFormat = SDL_PIXELFORMAT_RGB332; + break; + + case 16: + pixelFormat = SDL_PIXELFORMAT_RGB565; + break; + + case 32: + pixelFormat = SDL_PIXELFORMAT_ARGB8888; + break; + } + SDL_Init(SDL_INIT_EVERYTHING); _windowScale = 3; _window = SDL_CreateWindow("GUI Debug", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_ALLOW_HIGHDPI); - _surface = SDL_GetWindowSurface(_window); _renderer = SDL_CreateRenderer(_window, -1, SDL_RENDERER_ACCELERATED); - _texture = SDL_CreateTexture(_renderer, _pixelFormat, SDL_TEXTUREACCESS_STREAMING, width, height); + _texture = SDL_CreateTexture(_renderer, pixelFormat, SDL_TEXTUREACCESS_STREAMING, width, height); SDL_RenderSetLogicalSize(_renderer, width, height); SDL_SetWindowSize(_window, width * _windowScale, height * _windowScale); @@ -153,13 +182,35 @@ void platformStartup(int16_t width, int16_t height, int16_t depth) { _width = width; _height = height; + surfaceStartup(depth); + + // ***TODO*** This needs to be in GUI. __guiBaseColors = (ColorT *)malloc(sizeof(ColorT) * 16); for (i=0; i<16; i++) { - __guiBaseColors[i] = videoColorMake(EGA[i][0], EGA[i][1], EGA[i][2]); + __guiBaseColors[i] = surfaceColorMake(EGA[i][0], EGA[i][1], EGA[i][2]); } } +void videoBlit(int16_t targetX, int16_t targetY, SurfaceT *source) { + void *pixels; + int temp; + + //***TODO*** Does not handle partial blits at this time. + (void)targetX; + (void)targetY; + + SDL_LockTexture(_texture, NULL, &pixels, &temp); + memcpy(pixels, source->buffer.bits8, source->bytes); + SDL_UnlockTexture(_texture); + SDL_RenderCopy(_renderer, _texture, NULL, NULL); + SDL_RenderPresent(_renderer); + + // Throttle this to some sane frame rate. + SDL_Delay(32); +} + + uint16_t videoDisplayHeightGet(void) { return _height; } @@ -175,220 +226,4 @@ void videoModesShow(void) { } -void videoSurfaceBlit(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source) { - uint16_t y1; - size_t offsetTarget; - size_t offsetSource; - void *pixels; - int temp; - - // HACK! Are we copying to the screen? This assumes a full screen update. - if (!target) { - SDL_LockTexture(_texture, NULL, &pixels, &temp); - memcpy(pixels, source->buffer.bits8, source->bytes); - SDL_UnlockTexture(_texture); - SDL_RenderCopy(_renderer, _texture, NULL, NULL); - SDL_RenderPresent(_renderer); - - // Throttle this to some sane frame rate. - SDL_Delay(32); - - return; - } - - if (targetX == 0 && targetY == 0 && target->width == source->width && target->height == source->height) { - // Direct blit of entire surface. - memcpy(target->buffer.bits8, source->buffer.bits8, source->bytes); - } else { - // Blit into larger surface. - offsetTarget = targetY * _activeSurface->scanline + targetX * BYTES_PER_PIXEL; - offsetSource = 0; - for (y1=targetY; y1height; y1++) { - memcpy(&target->buffer.bits8[offsetTarget], &source->buffer.bits8[offsetSource], source->scanline); - offsetTarget += target->scanline; - offsetSource += source->scanline; - } - } -} - - -void videoSurfaceBlitWithTransparency(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source, ColorT transparent) { - uint16_t x1; - uint16_t y1; - uint16_t x2 = source->width; - uint16_t y2 = source->height; - ColorT pixel; - - // Clip on right and bottom - if (targetX + x2 > target->width) x2 -= targetX + x2 - target->width; - if (targetY + y2 > target->height) y2 -= targetY + y2 - target->height; - - for (y1=0; y1buffer.bits32[y1 * source->width + x1]; - if (transparent != pixel) { - PUTPIXEL(target, targetX + x1, targetY + y1, pixel); - } - } - } - -} - - -void videoSurfaceClear(ColorT color) { - uint16_t x; - size_t offsetTarget; - - // Draw the top line. - for (x=0; x<_activeSurface->width; x++) { - PUTPIXEL(_activeSurface, x, 0, color); - } - - // Copy it to the other lines. - offsetTarget = _activeSurface->scanline; - for (x=1; x<_activeSurface->height; x++) { - memcpy(&_activeSurface->buffer.bits8[offsetTarget], &_activeSurface->buffer.bits8[0], _activeSurface->scanline); - offsetTarget += _activeSurface->scanline; - } -} - - -SurfaceT *videoSurfaceCreate(int16_t width, int16_t height) { - SurfaceT *surface = (SurfaceT *)malloc(sizeof(SurfaceT)); - - if (!surface) return NULL; - - surface->width = width; - surface->height = height; - surface->scanline = width * BYTES_PER_PIXEL; - surface->bytes = surface->scanline * height; - - surface->buffer.bits8 = malloc(surface->bytes); - if (!surface->buffer.bits8) { - free(surface); - return NULL; - } - - memset(surface->buffer.bits8, 0, surface->bytes); - - return surface; -} - - -void videoSurfaceBox(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c) { - videoSurfaceLineH(x1, x2, y1, c); - videoSurfaceLineH(x1, x2, y2, c); - videoSurfaceLineV(x1, y1, y2, c); - videoSurfaceLineV(x2, y1, y2, c); -} - - -void videoSurfaceBoxFilled(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c) { - int16_t i; - size_t offsetTarget; - size_t offsetSource; - uint16_t width; - - if (x1 > x2) { - i = x1; - x1 = x2; - x2 = i; - } - - if (y1 > y2) { - i = y1; - y1 = y2; - y2 = i; - } - - width = (x2 - x1 + 1) * BYTES_PER_PIXEL; - - // Draw the top line. - for (i=x1; i<=x2; i++) { - PUTPIXEL(_activeSurface, i, y1, c); - } - - // Copy it to the other lines. - offsetTarget = _activeSurface->scanline * (y1 + 1) + (x1 * BYTES_PER_PIXEL); - offsetSource = _activeSurface->scanline * y1 + (x1 * BYTES_PER_PIXEL); - for (i=y1 + 1; i<=y2; i++) { - memcpy(&_activeSurface->buffer.bits8[offsetTarget], &_activeSurface->buffer.bits8[offsetSource], width); - offsetTarget += _activeSurface->scanline; - } -} - - -void videoSurfaceDestroy(SurfaceT *surface) { - free(surface->buffer.bits8); - free(surface); -} - - -SurfaceT *videoSurfaceGet(void) { - return _activeSurface; -} - - -int16_t videoSurfaceHeightGet(SurfaceT *surface) { - return surface->height; -} - - -void videoSurfaceLineH(int16_t x1, int16_t x2, int16_t y, ColorT c) { - int16_t i; - int16_t t; - - if (x1 > x2) { - t = x2; - x2 = x1; - x1 = t; - } - - for (i=x1; i<=x2; i++) { - PUTPIXEL(_activeSurface, i, y, c); - } -} - - -void videoSurfaceLineV(int16_t x, int16_t y1, int16_t y2, ColorT c) { - int16_t i; - int16_t t; - - if (y1 > y2) { - t = y2; - y2 = y1; - y1 = t; - } - - for (i=y1; i<=y2; i++) { - PUTPIXEL(_activeSurface, x, i, c); - } -} - - -ColorT videoSurfacePixelGet(SurfaceT *surface, int16_t x, int16_t y) { - return surface->buffer.bits32[y * surface->width + x]; -} - - -void videoSurfacePixelSet(int16_t x, int16_t y, ColorT c) { - PUTPIXEL(_activeSurface, x, y, c); -} - - -void videoSurfaceSet(SurfaceT *surface) { - _activeSurface = surface; -} - - -SurfaceT *videoSurfaceScreenGet(void) { - return NULL; -} - - -int16_t videoSurfaceWidthGet(SurfaceT *surface) { - return surface->width; -} - - #endif // BACKEND_SDL2 diff --git a/client/src/platform/sdl2.h b/client/src/platform/sdl2.h index 5a43b33..06b10ec 100644 --- a/client/src/platform/sdl2.h +++ b/client/src/platform/sdl2.h @@ -5,22 +5,9 @@ #include #include +#include "../gui/surface.h" -typedef uint32_t ColorT; - -typedef struct SurfaceS { - uint16_t width; - uint16_t height; - size_t scanline; - size_t bytes; - union { - uint8_t *bits8; - uint16_t *bits16; - uint32_t *bits32; - } buffer; -} SurfaceT; - typedef struct EventS { int32_t flags; int32_t x; @@ -48,28 +35,10 @@ typedef struct EventS { #define KEY_ESC 27 -#define videoColorMake(r,g,b) (((r) << 24) | ((g) << 16) | ((b) << 8) | 255) - - void platformEventGet(EventT *event); +void videoBlit(int16_t targetX, int16_t targetY, SurfaceT *source); uint16_t videoDisplayHeightGet(void); uint16_t videoDisplayWidthGet(void); -void videoSurfaceBlit(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source); -void videoSurfaceBlitWithTransparency(SurfaceT *target, int16_t targetX, int16_t targetY, SurfaceT *source, ColorT transparent); -void videoSurfaceClear(ColorT color); -SurfaceT *videoSurfaceCreate(int16_t width, int16_t height); -void videoSurfaceBox(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c); -void videoSurfaceBoxFilled(int16_t x1, int16_t y1, int16_t x2, int16_t y2, ColorT c); -void videoSurfaceDestroy(SurfaceT *surface); -SurfaceT *videoSurfaceGet(void); -int16_t videoSurfaceHeightGet(SurfaceT *surface); -void videoSurfaceLineH(int16_t x1, int16_t x2, int16_t y, ColorT c); -void videoSurfaceLineV(int16_t x, int16_t y1, int16_t y2, ColorT c); -ColorT videoSurfacePixelGet(SurfaceT *surface, int16_t x, int16_t y); -void videoSurfacePixelSet(int16_t x, int16_t y, ColorT c); -void videoSurfaceSet(SurfaceT *surface); -SurfaceT *videoSurfaceScreenGet(void); -int16_t videoSurfaceWidthGet(SurfaceT *surface); #endif // SDL2_H diff --git a/makedefs.grx b/makedefs.grx deleted file mode 100644 index c39cfe4..0000000 --- a/makedefs.grx +++ /dev/null @@ -1,261 +0,0 @@ -### CONFIGURATION ######################################################## - -# This file sets variables that direct the libary build for the -# programmer needs. The file is used for the four standard plattforms - -# Specify version of GRX -# Currently only used to generate name of shared libraries for linux -GRX_VERSION=2.4.9 - -# Specify if you have libtiff.a and corresponding .h files. -# Change setting to 'y' if you have it, or to 'n' if not. -HAVE_LIBTIFF=n - -# Specify if you have libjpeg.a and corresponding .h files. -HAVE_LIBJPEG=y - -# Specify if you have libpng.a and corresponding .h files. -HAVE_LIBPNG=y - -# Specify if one of the above libs requires the -# zlib compression library -NEED_ZLIB=y - -# Specify if you want to include printing code from addons -INCLUDE_PRINTING_CODE=n - -# Specify if you want to include bmp image code from addons -INCLUDE_BMP_CODE=y - -# Specify if you want to include GNU_Pascal (gpc) support -INCLUDE_GPC_SUPPORT=n - -# Specify if you want shared library support (Linux console and X11) -INCLUDE_SHARED_SUPPORT=n - -# Specify if you want to include BGI support -INCLUDE_BGI_SUPPORT=n - -# For cross-compiling, specify prefix for tools including the trailing dash -# (e.g. i386-mingw32- for using i386-mingw32-gcc instead of just gcc) -#CROSS_PLATFORM=i586-pc-msdosdjgpp- - -# Specify if you want to use Unix tools on DOS-like platforms -HAVE_UNIX_TOOLS=y - -# Specify in linux if you want to build the library for x86_64 -BUILD_X86_64=y - -# For SDL driver the executable prefix EP is used to discriminate -# between linux X11 and mingw32. Set -#EP=x ... For linux X11. -#EP= ... For mingw32 -EP=x - -### SYSTEM SETTINGS ###################################################### - -CC = $(CROSS_PLATFORM)gcc -PC = $(CROSS_PLATFORM)gpc -AR = $(CROSS_PLATFORM)ar -RANLIB = $(CROSS_PLATFORM)ranlib -STRIP = $(CROSS_PLATFORM)strip - -# Different systems / setups may generate .o files -# this tag files will show what version is present -SYSTEM_TAG_PREFIX = systag -LINUX_i386_CONSOLE = $(SYSTEM_TAG_PREFIX).000 -LINUX_i386_X11 = $(SYSTEM_TAG_PREFIX).002 -DOS_DJGPP_V2 = $(SYSTEM_TAG_PREFIX).004 -WIN32_GCC_i386_STATIC = $(SYSTEM_TAG_PREFIX).006 -ANY_GCC_SDL_STATIC = $(SYSTEM_TAG_PREFIX).008 - -ifdef DEBUG -CCOPT = -O2 -fno-strict-aliasing -Wall -g -DDEBUG=$(DEBUG) ${C_FLAGS} -LDOPT = -g ${L_FLAGS} -else -CCOPT = -O2 -fno-strict-aliasing -Wall ${C_FLAGS} -LDOPT = -s ${L_FLAGS} -endif - -ifdef PROFILE -CCOPT += -pg -endif - -# Additional warnings for development -WARNOPTS = -W -Wshadow -Wpointer-arith -Wbad-function-cast \ - -Wcast-align -Wconversion -Wmissing-prototypes \ - -Wnested-externs -Wstrict-prototypes -#CCOPT += $(WARNOPTS) - -# Some systems can't allocate big arrays on stack. -# If test/xcirctest fails on bigger diameters, try -#CCOPT += -DSMALL_STACK - -# You may want to enable one (or both) of the following -# switches if your get lots of warnings when compiling GRX -#CCOPT += -DNO_LEFTSIDE_LVALUE_CAST -#CCOPT += -DNO_LEFTSIDE_PTR_CAST - -########################################################################## - -ifdef GRXVSDL -ifeq ($(EP),x) -GRXVX11=y -else -GRXVW32=y -endif -endif - -ifdef GRXVLNX -GRXVUNX=y -endif - -ifdef GRXVX11 -GRXVUNX=y -endif - -### UNIX SPECIFIC ######################################################## - -ifdef GRXVUNX - -# Put libgrx20.a, libgrx20.so, libgrx20X.a, libgrx20X.so and libgrx20S.a -# in lib/unix -GRX_LIB_SUBDIR=unix - -# Set here the default destination dirs for install and uninstall targets -prefix=/usr/local - -# Set the default GRX font path -#GRX_DEFAULT_FONT_PATH=${datadir}/grx/fonts - -# check for i386 or x86_64 build -ifeq ($(BUILD_X86_64),y) -CCOPT += -m64 -LDOPT += -m64 -else -CCOPT += -m32 -LDOPT += -m32 -endif - -endif - -### LINUX CONSOLE SPECIFIC ############################################### - -ifdef GRXVLNX - -# Use direct PS/2 mouse driver instead the svgalib one -USE_DIRECT_MOUSE_DRIVER=n - -# Set the videodrivers to be included, you can set both or only one of them -# (remember to set USE_DIRECT_MOUSE_DRIVER to 'y' if you set only the -# framebuffer driver) -USE_SVGALIB_DRIVER=y -USE_FRAMEBUFFER_DRIVER=y - -# Set or not set suid root. This is required for the svgalib 1.4.x stable -# release, it can be set to 'n' if you use the framebuffer driver only or -# the svgalib 1.9.x alpha release without the 1 and 4 bpp resolutions -# (see bellow) -SET_SUIDROOT=y - -# Set to 'y' this variable if you want to add the framedrivers that use -# inport/outport instructions: 1 and 4 bpp modes and the 8 bpp mode X. But -# beware this works only with svgalib 1.4.x (not with 1.9.x) and without -# the linux framebuffer enabled -USE_INOUTP_FRAMEDRIVERS=y - -endif - -### LINUX X11 SPECIFIC ################################################### - -ifdef GRXVX11 - -# The X11 base dir on your system -X11BASE=/usr/X11R6 - -# Add directories with X11 include files here -X11INCS=-I$(X11BASE)/include - -# put X11 required libraries and directories here -# note: some systems need -lsocket added -X11LIB=$(X11BASE)/lib -X11LIBS=-L$(X11LIB) -lX11 - -# Set to try to use the XFree86 Direct Graphics Access driver (DGA2) -# (if DGA2 is not available, fall back to the windowed X11 driver) -# As of XFree-4.3.99.5 DGA/DGA2 seems stable, but use with caution. -USE_XF86DGA_DRIVER=n -# Set to 'y' this variable if you want the DGA2 driver to use direct -# framebuffer access. That should not make DGA2 more unstable and is -# faster. If this setting is 'y', the DGA2 driver (see above) must -# also be 'y', or you will get compilation/linkage errors. -USE_XF86DGA_FRAMEBUFFER=n -# Set or not set suid root for X11. This is required for the DGA2 -# framebuffer access, it can be set to 'n' if you use the standard -# X11 driver only or DGA2 without framebuffer access. -SET_XSUIDROOT=n - -endif - -### DOS DJGPPv2 SPECIFIC ################################################# - -ifdef GRXVDJ2 - -# Put libgrx20.a to lib/dj2 -GRX_LIB_SUBDIR=dj2 - -# Set here the destination dir for install and uninstall targets -prefix=/dev/env/DJDIR - -# Set the default GRX font path -#GRX_DEFAULT_FONT_PATH=/dev/env/DJDIR/share/grx/fonts - -# If you want to use 'upx.exe' compressor -# disable the echo line and enable upx line. -EXE_COMPRESS = -echo -#EXE_COMPRESS = upx --best - -# Default compiler switches. In djgpp.env. under [make], -# add the line "BUTT=-mcpu=i386", if that is your target, -# or directly add -mcpu here. -# At present gcc supports 'i386', 'i486', 'i586' ('pentium'), -# 'i686' ('pentiumpro') and 'k6'. -#CCOPT += $(BUTT) -#CCOPT += -mcpu=i586 - -# GRX uses "uclock" to gets 1 ms resolution in the input code, -# this can causes problems in Win3.1, so you may want to enable -# the following switch -#CCOPT += -DNO_REPROGRAM_TIMER - -endif - -### WIN32 MINGW SPECIFIC ################################################# - -ifdef GRXVW32 - -# Put libgrx20.a and libgrx20S.a to lib/win32 -GRX_LIB_SUBDIR=win32 - -# Set here the destination dir for install and uninstall targets -prefix=C:\MINGW - -# Set the default GRX font path -#GRX_DEFAULT_FONT_PATH=c:/grxfonts - -endif - -### COMMON ############################################################## - -exec_prefix=${prefix} - -bindir=${exec_prefix}/bin -libdir=${exec_prefix}/lib -datadir=${prefix}/share - -infodir=${prefix}/info -includedir=${prefix}/include -unitsdir=${exec_prefix}/units - -########################################################################## - diff --git a/thirdparty/grx249/Makefile b/thirdparty/grx249/Makefile deleted file mode 120000 index 6e6bedf..0000000 --- a/thirdparty/grx249/Makefile +++ /dev/null @@ -1 +0,0 @@ -makefile.x11 \ No newline at end of file diff --git a/thirdparty/grx249/addons/bmp/bmp.c b/thirdparty/grx249/addons/bmp/bmp.c deleted file mode 100644 index f25115c..0000000 --- a/thirdparty/grx249/addons/bmp/bmp.c +++ /dev/null @@ -1,669 +0,0 @@ -/* -** - BMP read/write file -** by Michal Stencl Copyright (c) 1998 -** - read BMP 2, 4, 8 bpp -** - write BMP 8, 24 bpp -** - [stenclpmd@ba.telecom.sk] -** -*/ - -#include -#include -#include -#if defined(_MSC_VER) && defined(_WIN32) -#include -#else -#include -#endif -#include -#include -#include -#ifdef __MSDOS__ -# include -#endif - -#include "libgrx.h" -#include "clipping.h" - -#if defined(__MSDOS__) || defined(MSDOS) -#define BIN_WR (O_WRONLY | O_BINARY) -#define BIN_RD (O_RDONLY | O_BINARY) -#else -#define BIN_WR O_WRONLY -#define BIN_RD O_RDONLY -#endif - -#define BIN_CREAT (BIN_WR|O_CREAT) - -#ifndef S_IREAD -#define S_IREAD S_IRUSR -#endif -#ifndef S_IWRITE -#define S_IWRITE S_IWUSR -#endif - -#define CREAT_PERM S_IREAD|S_IWRITE - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -#define BMPFILEHEADERSIZE 14 -#define BMPINFOHEADERSIZE 40 - -#define BI_RGB 0L -#define BI_RLE8 1L -#define BI_RLE4 2L - -#define _GrBitmapPointerTypes_DEFINED_ -typedef struct _GR_bitmapfileheader GrBitmapFileHeader; -typedef struct _GR_bitmapinfoheader GrBitmapInfoHeader; -typedef struct _GR_bmpimagecolors GrBmpImageColors; -typedef struct _GR_bmpimage GrBmpImage; - -/* ************************************************************************ */ -/* _GR_bitmapfileheader */ -/* ************************************************************************ */ -struct _GR_bitmapfileheader { - GR_int16u bf_type; - GR_int32u bf_size; - GR_int16u bf_reserved1; - GR_int16u bf_reserved2; - GR_int32u bf_offbits; -}; - -/* ************************************************************************ */ -/* _GR_bitmapinfoheader */ -/* ************************************************************************ */ -struct _GR_bitmapinfoheader { - GR_int32u bn_size; - GR_int32u bn_width; - GR_int32u bn_height; - GR_int16u bn_planes; - GR_int16u bn_bitcount; - GR_int32u bn_compression; - GR_int32u bn_sizeimage; - GR_int32u bn_xpelspermeter; - GR_int32u bn_ypelspermeter; - GR_int32u bn_clrused; - GR_int32u bn_clrimportant; -}; - -/* ************************************************************************ */ -/* _GR_bmpimagecolors */ -/* ************************************************************************ */ -struct _GR_bmpimagecolors { - GR_int8u *bp_palette; /* (R, G, B, Reserved) * | 2 | 16 | 256 */ - GrColor *bp_colormap; - int bp_numcolors; -}; - -/* ************************************************************************ */ -/* _GR_bmpimage */ -/* ************************************************************************ */ -struct _GR_bmpimage { - GrBitmapFileHeader *bi_bmpfileheader; - GrBitmapInfoHeader *bi_bmpinfoheader; - GrBmpImageColors *bi_bmpimagecolors; - GR_int16s bi_erasepalette; - char *bi_map; -}; - -#define bi_width bi_bmpinfoheader->bn_width -#define bi_height bi_bmpinfoheader->bn_height -#define bi_palette bi_bmpimagecolors->bp_palette -#define bi_colormap bi_bmpimagecolors->bp_colormap -#define bi_numcolors bi_bmpimagecolors->bp_numcolors - -int GrLoadBmpFileHeader ( int _handle, GrBitmapFileHeader* _fileheader ); -int GrLoadBmpInfoHeader ( int _handle, GrBitmapInfoHeader* _infoheader ); -static unsigned char *__GrLoadPaletteBmp ( int _handle, unsigned long _paloffset, int _colors ); -static unsigned char *GrLoadPaletteBmp ( int _handle, int *_col, GrBitmapInfoHeader *_iheader ); -static char *GrLoadImageFromBmpBiRgb ( int _handle, unsigned long _offset, long _maxbufsize, int _colors, GrBitmapInfoHeader *_infoheader ); -static char *GrLoadImageFromBmpBiRle8 ( int _handle, unsigned long _offset, unsigned long _maxbufsize, int _colors, GrBitmapInfoHeader *_infoheader ); -static char *GrLoadImageFromBmpBiRle4 ( int _handle, unsigned long _offset, unsigned long _maxbufsize, int _colors, GrBitmapInfoHeader *_infoheader ); -static char *GrLoadImageFromBmp ( int _handle, unsigned long _offset, int _colors, GrBitmapInfoHeader *_infoheader ); - -/* exported functions */ -int GrFreeBmpImageColors ( GrBmpImageColors *_pal ); -int GrAllocBmpImageColors ( GrBmpImage *_bmp, GrBmpImageColors *_pal ); -GrBmpImage *GrLoadBmpImage ( char *_filename ); -GrPattern *GrConvertBmpImageToPattern ( GrBmpImage *_bmp ); -GrPattern *GrConvertBmpImageToStaticPattern ( GrBmpImage *_bmp ); -void GrUnloadBmpImage ( GrBmpImage *_bmp ); -int GrSaveBmpImage ( char *_filename, GrContext *_c, int _x1, int _y1, int _x2, int _y2 ); -unsigned long GrBmpImageWidth ( GrBmpImage* _bmp ); -unsigned long GrBmpImageHeight ( GrBmpImage* _bmp ); -char *GrBmpImagePalette ( GrBmpImage* _bmp ); -GrColor *GrBmpImageColorMap ( GrBmpImage* _bmp ); -GrColor GrBmpImageNumColors ( GrBmpImage* _bmp ); -/* end of exported functions */ - -/* ************************************************************************ */ -int GrLoadBmpFileHeader ( int _handle, GrBitmapFileHeader *_fileheader ) -/* ************************************************************************ */ -{ - if (( !_fileheader ) || ( _handle == -1 )) return FALSE; - memset(_fileheader, 0, BMPFILEHEADERSIZE); - lseek(_handle, SEEK_SET, 0); - read(_handle, &_fileheader->bf_type, 2); - read(_handle, &_fileheader->bf_size, 4); - read(_handle, &_fileheader->bf_reserved1, 2); - read(_handle, &_fileheader->bf_reserved2, 2); - read(_handle, &_fileheader->bf_offbits, 4); - return TRUE; -} - -/* ************************************************************************ */ -int GrLoadBmpInfoHeader ( int _handle, GrBitmapInfoHeader *_infoheader ) -/* ************************************************************************ */ -{ - if (( !_infoheader ) || ( _handle == -1 )) return FALSE; - lseek(_handle, SEEK_SET, BMPFILEHEADERSIZE); - _infoheader->bn_size = 0; - read(_handle, &_infoheader->bn_size, 4); - memset(_infoheader, 0, _infoheader->bn_size); - read(_handle, &_infoheader->bn_width, 4); - if ( _infoheader->bn_width % 4 ) - _infoheader->bn_width += 4 - (_infoheader->bn_width % 4); - read(_handle, &_infoheader->bn_height, 4); - read(_handle, &_infoheader->bn_planes, 2); - read(_handle, &_infoheader->bn_bitcount, 2); - read(_handle, &_infoheader->bn_compression, 4); - read(_handle, &_infoheader->bn_sizeimage, 4); - read(_handle, &_infoheader->bn_xpelspermeter, 4); - read(_handle, &_infoheader->bn_ypelspermeter, 4); - read(_handle, &_infoheader->bn_clrused, 4); - read(_handle, &_infoheader->bn_clrimportant, 4); - return TRUE; -} - -/* ************************************************************************ */ -static unsigned char *__GrLoadPaletteBmp ( int _handle, unsigned long _paloffset, int _colors ) -/* ************************************************************************ */ -{ - unsigned char *palette; - if ( _handle == -1 ) return NULL; - palette = (unsigned char*)malloc(_colors * 4); - if ( !palette ) return NULL; - lseek(_handle, SEEK_SET, _paloffset); - read(_handle, palette, _colors * 4); - return palette; -} - -/* ************************************************************************ */ -static unsigned char *GrLoadPaletteBmp ( int _handle, int *_col, GrBitmapInfoHeader* _iheader ) -/* ************************************************************************ */ -{ - unsigned char *palette; - unsigned long paloffset; - *_col = -1; - if (( _handle == -1 ) || ( !_iheader )) return NULL; - palette = NULL; - paloffset = BMPFILEHEADERSIZE + _iheader->bn_size; - switch ( _iheader->bn_bitcount ) - { - case 1 : { *_col = 2; palette = __GrLoadPaletteBmp(_handle, paloffset, 2); } break; - case 4 : { *_col = 16; palette = __GrLoadPaletteBmp(_handle, paloffset, 16); } break; - case 8 : { *_col = 256; palette = __GrLoadPaletteBmp(_handle, paloffset, 256); } break; - case 24 : { *_col = 0; palette = NULL; } break; - default : *_col = -1; - } - if (( !palette ) && ( *_col != 0 )) *_col = -1; - return palette; -} - -/* ************************************************************************ */ -static char *GrLoadImageFromBmpBiRgb ( int _handle, unsigned long _offset, long _maxbufsize, int _colors, - GrBitmapInfoHeader *_infoheader ) -/* ************************************************************************ */ -{ - char *map = NULL; - char *buffer = NULL; - unsigned long width; - unsigned long size; - unsigned long i; - if (( _handle == -1 ) || ( !_infoheader ) || ( _infoheader->bn_bitcount < 1 )) - return NULL; - width = _infoheader->bn_width; - size = width; - i = size; - lseek(_handle, SEEK_SET, _offset); - if ( _infoheader->bn_bitcount == 1 ) - { - unsigned char bits[8], n; - unsigned long w, bufsize; - int j, k; - char *runmap; - _maxbufsize = _maxbufsize * 8; - map = (char *)malloc(_maxbufsize); - bufsize = (unsigned long)ceil((float)width / 8); - buffer = (char *)malloc(bufsize); - runmap = NULL; - if ( !map || !buffer ) - { - if (map) free(map); - if (buffer) free(buffer); - return NULL; - } - while ( i <= _maxbufsize ) - { - read(_handle, buffer, bufsize); - runmap = &map[_maxbufsize - i]; - for ( w = 0; w < width; w++) - { - j = w % 8; - if ( !j ) - { - n = buffer[w / 8]; - for ( k = 0; k < 8; k++ ) - { - bits[7 - k] = n & 1; - n = n >> 1; - } - } - runmap[w] = bits[j]; - } - i += size; - } - } - if ( _infoheader->bn_bitcount == 4 ) - { - unsigned long bufsize; - char *runmap; - unsigned char bits[2], n; - unsigned long w; - int j, q; - _maxbufsize = _maxbufsize * 2; - map = (char *)malloc(_maxbufsize); - bufsize = (unsigned long)ceil((float)width / 2); - buffer = (char*)malloc(bufsize); - runmap = NULL; - if ( !map || !buffer ) - { - if (map) free(map); - if (buffer) free(buffer); - return NULL; - } - while ( i <= _maxbufsize ) - { - read(_handle, buffer, bufsize); - runmap = &map[_maxbufsize - i]; - for ( w = 0; w < width; w++) - { - j = w % 2; - if ( !j ) - { - n = buffer[w / 2]; - q = n & 255; - bits[1] = q & 15; - q = q >> 4; - bits[0] = q & 15; - n = n >> 8; - } - runmap[w] = bits[j]; - } - i += size; - } - } - if ( _infoheader->bn_bitcount == 8 ) - { - unsigned long bufsize; - map = (char*)malloc(_maxbufsize); - bufsize = size; - if ( !map ) return NULL; - while ( i <= _maxbufsize ) - { - read(_handle, &map[_maxbufsize - i], bufsize); - i += bufsize; - } - } - if ( _infoheader->bn_bitcount == 24 ) - { - } - if (buffer) free(buffer); - return map; -} - -/* ************************************************************************ */ -static char *GrLoadImageFromBmpBiRle8 ( int _handle, unsigned long _offset, unsigned long _maxbufsize, int _colors, - GrBitmapInfoHeader *_infoheader ) -/* ************************************************************************ */ -{ - return NULL; /* this version not contains Rle8 yet */ -} - -/* ************************************************************************ */ -static char *GrLoadImageFromBmpBiRle4 ( int _handle, unsigned long _offset, unsigned long _maxbufsize, int _colors, - GrBitmapInfoHeader *_infoheader ) -/* ************************************************************************ */ -{ - return NULL; /* this version not contains Rle4 yet */ -} - -/* ************************************************************************ */ -static char *GrLoadImageFromBmp ( int _handle, unsigned long _offset, int _colors, GrBitmapInfoHeader *_infoheader ) -/* ************************************************************************ */ -{ - char* map; - int maxbufsize; - if (( _handle == -1 ) || ( !_infoheader )) return NULL; - map = NULL; - maxbufsize = _infoheader->bn_sizeimage; - switch ( _infoheader->bn_compression ) { - case BI_RGB : - { - if ( !maxbufsize ) - maxbufsize = _infoheader->bn_width * _infoheader->bn_height; - map = GrLoadImageFromBmpBiRgb(_handle, _offset, maxbufsize, _colors, _infoheader); break; - } - case BI_RLE8 : - map = GrLoadImageFromBmpBiRle8(_handle, _offset, maxbufsize, _colors, _infoheader); break; - case BI_RLE4 : - map = GrLoadImageFromBmpBiRle4(_handle, _offset, maxbufsize, _colors, _infoheader); break; - } - return map; -} - -/*====++====================================================================*/ -/* EXPORTED FUNCTIONS */ -/*==++======================================================================*/ - -/* ************************************************************************ */ -int GrFreeBmpImageColors ( GrBmpImageColors *_pal ) -/* ************************************************************************ */ -{ - if (( !_pal ) || ( !_pal->bp_colormap )) return FALSE; - if ( _pal->bp_palette ) - { - int i; - GrColor *colors = _pal->bp_colormap; - colors[0] = _pal->bp_numcolors; - for ( i = 0; i < _pal->bp_numcolors; i++ ) - GrFreeColor(colors[i+1]); - free(_pal->bp_palette); - _pal->bp_palette = NULL; - _pal->bp_numcolors = 0; - return TRUE; - } - return FALSE; -} - -/* ************************************************************************ */ -int GrAllocBmpImageColors ( GrBmpImage *_bmp, GrBmpImageColors *_pal ) -/* ************************************************************************ */ -{ - if (( !_bmp ) || ( _bmp->bi_colormap != NULL ) || (_bmp->bi_numcolors < 2 )) - return FALSE; - _bmp->bi_erasepalette = TRUE; - if ( _bmp->bi_palette ) - { - int i; - GrColor *colors = malloc(sizeof(GrColor)*(_bmp->bi_numcolors+1)); - if ( !colors ) return FALSE; - colors[0] = _bmp->bi_numcolors; - for ( i = 0; i < _bmp->bi_numcolors; i++ ) - colors[i+1] = GrAllocColor(_bmp->bi_palette[i*4+2], _bmp->bi_palette[i*4+1], _bmp->bi_palette[i*4+0]); - _bmp->bi_colormap = colors; - if ( _pal ) - { - _bmp->bi_erasepalette = FALSE; - memcpy(_pal,_bmp->bi_bmpimagecolors,sizeof(GrBmpImageColors)); - _bmp->bi_palette = NULL; - _bmp->bi_numcolors = 0; - } - return TRUE; - } - return FALSE; -} - -/* ************************************************************************ */ -GrBmpImage *GrLoadBmpImage ( char *_filename ) -/* ************************************************************************ */ -{ - #define defClose { \ - close(handle); \ - if (bmpimage) free(bmpimage); \ - return NULL; \ - } - #define ADD2PTR(p,o) ((void *) ((char *)(p)+(o)) ) - int handle; - GrBmpImage *bmpimage = NULL; - if ( (handle = open(_filename, BIN_RD)) != -1 ) { - bmpimage = malloc( sizeof(GrBmpImage) - +sizeof(GrBitmapFileHeader) - +sizeof(GrBitmapInfoHeader) - +sizeof(GrBmpImageColors)); - if ( !bmpimage ) defClose; - memset(bmpimage, 0, sizeof(GrBmpImage) - +sizeof(GrBitmapFileHeader) - +sizeof(GrBitmapInfoHeader) - +sizeof(GrBmpImageColors)); - bmpimage->bi_bmpfileheader = ADD2PTR(bmpimage, sizeof(GrBmpImage)); - bmpimage->bi_bmpinfoheader = ADD2PTR(bmpimage, sizeof(GrBmpImage) - +sizeof(GrBitmapFileHeader)); - bmpimage->bi_bmpimagecolors = ADD2PTR(bmpimage, sizeof(GrBmpImage) - +sizeof(GrBitmapFileHeader) - +sizeof(GrBitmapInfoHeader)); - bmpimage->bi_erasepalette = TRUE; - if ( !GrLoadBmpFileHeader(handle, bmpimage->bi_bmpfileheader) ) - defClose; - if ( bmpimage->bi_bmpfileheader->bf_type != 19778 ) /* MAGIC NUMBER */ - defClose; - if ( !GrLoadBmpInfoHeader(handle, bmpimage->bi_bmpinfoheader) ) - defClose; - bmpimage->bi_palette = GrLoadPaletteBmp(handle, &(bmpimage->bi_numcolors), bmpimage->bi_bmpinfoheader); - if ( bmpimage->bi_numcolors == -1 ) - defClose; - bmpimage->bi_map = GrLoadImageFromBmp(handle, bmpimage->bi_bmpfileheader->bf_offbits - BMPFILEHEADERSIZE, bmpimage->bi_numcolors, bmpimage->bi_bmpinfoheader); - if ( !bmpimage->bi_map ) - defClose; - } - #undef defClose - return bmpimage; -} - -/* ************************************************************************ */ -GrPattern *GrConvertBmpImageToPattern ( GrBmpImage *_bmp ) -/* ************************************************************************ */ -{ - if (( !_bmp ) || ( !_bmp->bi_map )) return NULL; - return GrBuildPixmap(_bmp->bi_map, _bmp->bi_width, _bmp->bi_height, _bmp->bi_colormap); -} - -/* ************************************************************************ */ -GrPattern *GrConvertBmpImageToStaticPattern ( GrBmpImage *_bmp ) -/* ************************************************************************ */ -{ - GrPattern *p = NULL; - if ( _bmp && _bmp->bi_map ) - { - p = GrBuildPixmap(_bmp->bi_map, _bmp->bi_width, _bmp->bi_height, _bmp->bi_colormap); - if ( p ) GrUnloadBmpImage(_bmp); - } - return p; -} - -/* ************************************************************************ */ -void GrUnloadBmpImage ( GrBmpImage *_bmp ) -/* ************************************************************************ */ -{ - if ( !_bmp ) return; - if ( _bmp->bi_erasepalette ) - GrFreeBmpImageColors(_bmp->bi_bmpimagecolors); - _bmp->bi_palette = NULL; - _bmp->bi_numcolors = 0; - if ( _bmp->bi_map ) free(_bmp->bi_map); - free(_bmp); - _bmp = NULL; -} - -/* ************************************************************************ */ -int GrSaveBmpImage ( char *_filename, GrContext *_c, int _x1, int _y1, int _x2, int _y2 ) -/* ************************************************************************ */ -{ - int handle; - unsigned long width, height; - unsigned char palette[256*4]; - int r, g, b; - char* line; - unsigned long yy, xx; - GrColor pixcol; - GrBitmapFileHeader fileheader; - GrBitmapInfoHeader infoheader; - GrColor colors, i; - GrContext safe; - - if ( !_c ) _c = (GrContext *)GrCurrentContext(); - -/* - handle = creat(_filename, S_IWRITE); - if ( handle < 0 ) - { - close(handle); - return FALSE; - } -*/ - handle = open(_filename, BIN_CREAT, CREAT_PERM); - if ( handle < 0 ) return FALSE; - - clip_box_(_c, _x1, _y1, _x2, _y2, CLIP_EMPTY_MACRO_ARG, CLIP_EMPTY_MACRO_ARG); - - width = _x2 - _x1; - height = _y2 - _y1; - - safe = *GrCurrentContext(); - GrSetContext(_c); - colors = GrNumColors(); - GrSetContext(&safe); - - if ( width % 4 ) width += 4 - (width % 4); - - /*========= FILEHEADER =========*/ - fileheader.bf_type = 19778; - if ( colors == 256 ) - fileheader.bf_size = BMPINFOHEADERSIZE + BMPFILEHEADERSIZE + 256*4 + width*height; - else - fileheader.bf_size = BMPINFOHEADERSIZE + BMPFILEHEADERSIZE + (width*height*3); - fileheader.bf_reserved1 = 0; - fileheader.bf_reserved2 = 0; - if ( colors == 256 ) - fileheader.bf_offbits = BMPINFOHEADERSIZE + BMPFILEHEADERSIZE + 256*4; - else - fileheader.bf_offbits = BMPINFOHEADERSIZE + BMPFILEHEADERSIZE; - - /*========= INFOHEADER =========*/ - infoheader.bn_size = BMPINFOHEADERSIZE; - infoheader.bn_width = width; - infoheader.bn_height = height; - infoheader.bn_planes = 1; - infoheader.bn_bitcount = ( colors == 256 ) ? 8 : 24; - infoheader.bn_compression = BI_RGB; - infoheader.bn_sizeimage = width*height*(infoheader.bn_bitcount / 8); - infoheader.bn_xpelspermeter = 0L; - infoheader.bn_ypelspermeter = 0L; - infoheader.bn_clrused = 0L; - infoheader.bn_clrimportant = 0L; - - /*========= PALETTE =========*/ - if ( colors == 256 ) - { - for ( i = 0; i < colors; i++ ) - { - GrQueryColor(i, &r, &g, &b); - palette[(i*4)] = (unsigned char)b; - palette[(i*4)+1] = (unsigned char)g; - palette[(i*4)+2] = (unsigned char)r; - palette[(i*4)+3] = 0; - } - } - - line = (char *)malloc(width*(infoheader.bn_bitcount / 8)); - if ( !line ) - { - close(handle); - return FALSE; - } - /*========= WRITE FILEHEADER =========*/ - write(handle, &fileheader.bf_type, 2); - write(handle, &fileheader.bf_size, 4); - write(handle, &fileheader.bf_reserved1, 2); - write(handle, &fileheader.bf_reserved2, 2); - write(handle, &fileheader.bf_offbits, 4); - - /*========= WRITE INFOHEADER =========*/ - write(handle, &infoheader.bn_size, 4); - write(handle, &infoheader.bn_width, 4); - write(handle, &infoheader.bn_height, 4); - write(handle, &infoheader.bn_planes, 2); - write(handle, &infoheader.bn_bitcount, 2); - write(handle, &infoheader.bn_compression, 4); - write(handle, &infoheader.bn_sizeimage, 4); - write(handle, &infoheader.bn_xpelspermeter, 4); - write(handle, &infoheader.bn_ypelspermeter, 4); - write(handle, &infoheader.bn_clrused, 4); - write(handle, &infoheader.bn_clrimportant, 4); - - /*========= WRITE PALETTE =========*/ - if ( colors == 256 ) write(handle, palette, 256*4); - - /*========= WRITE MAP =========*/ - yy = height; - do { - xx = 0; - do { - pixcol = GrPixelC(_c,_x1+xx,_y1+yy); - if ( colors == 256 ) line[xx] = pixcol; - else - { - line[(xx*3)+0] = GrRGBcolorBlue(pixcol); - line[(xx*3)+1] = GrRGBcolorGreen(pixcol);; - line[(xx*3)+2] = GrRGBcolorRed(pixcol);; - } - } while(++xx < width); - write(handle, line, width*(infoheader.bn_bitcount / 8)); - } while(--yy > 0); - free((void *)line); - close(handle); - return TRUE; -} - -/* ************************************************************************ */ -unsigned long GrBmpImageWidth ( GrBmpImage* _bmp ) -/* ************************************************************************ */ -{ - return ( _bmp && _bmp->bi_bmpinfoheader ) ? _bmp->bi_width : 0L; -} - -/* ************************************************************************ */ -unsigned long GrBmpImageHeight ( GrBmpImage* _bmp ) -/* ************************************************************************ */ -{ - return ( _bmp && _bmp->bi_bmpinfoheader ) ? _bmp->bi_height : 0L; -} - -/* ************************************************************************ */ -char *GrBmpImagePalette ( GrBmpImage* _bmp ) -/* ************************************************************************ */ -{ - return (char *)(( _bmp && _bmp->bi_bmpimagecolors ) ? _bmp->bi_palette : NULL); -} - -/* ************************************************************************ */ -GrColor *GrBmpImageColorMap ( GrBmpImage* _bmp ) -/* ************************************************************************ */ -{ - return ( _bmp && _bmp->bi_bmpimagecolors ) ? _bmp->bi_colormap : NULL; -} - -/* ************************************************************************ */ -GrColor GrGetBmpImageNumColors ( GrBmpImage* _bmp ) -/* ************************************************************************ */ -{ - return ( _bmp && _bmp->bi_bmpimagecolors ) ? _bmp->bi_numcolors : 0; -} - diff --git a/thirdparty/grx249/addons/bmp/bmp.hlp b/thirdparty/grx249/addons/bmp/bmp.hlp deleted file mode 100644 index 028f066..0000000 --- a/thirdparty/grx249/addons/bmp/bmp.hlp +++ /dev/null @@ -1,190 +0,0 @@ -============================== -o LOAD MS-WINDOWS BITMAP FILE -============================== - Syntax - ------ - GrBmpImage *GrLoadBmpImage ( char *_filename ); - - Description - ----------- - This function load BMP file format ( 1, 4, 8 Bytes Per Pixel ) from - the file _filename into structure GrBmpImage*. - - Return Value - ------------ - On succes pointer to new GrBmpImage structure, otherwise NULL - - Example - ------- - GrBmpImage* bmp = GrLoadBmpImage("logogrx.bmp"); - -============================== -o SETTING GrBmpImage COLORS -============================== - Syntax - ------ - int GrAllocBmpImageColors ( GrBmpImage *_bmp, GrBmpImageColors *_col ); - - Description - ----------- - This function setting GrBmpImage colors. (_bmp) is pointer to GrBmpImage - structure and (_pal) is pointer to structrure, where we want to store - information about BMP palette and colors. If (_col) is NULL, it set colors and into - (_bmp) structure write 1 for own destroing palette by GrUnloadBmpImage. - Otherwise palette will be destroy only by function GrEraseBmpImageColors. - - Return Value - ------------ - On succes 1, otherwise 0 - - Example 1 ( _col is NULL ) - ------- - GrBmpImage* bmp = GrLoadBmpImage("logogrx.bmp"); - GrAllocBmpImageColors(bmp, NULL); - GrUnloadBmpImage(bmp); - - Example 2 ( _col is pointer to structure ) - ------- - GrBmpImage* bmp = GrLoadBmpImage("logogrx.bmp"); - GrBmpImageColors col; - GrAllocBmpImageColors(bmp, &col); - GrUnloadBmpImage(bmp); - GrFreeBmpImageColors(&pal); - -============================== -o FREE GrBmpImage COLORS -============================== - Syntax - ------ - int GrFreeBmpImageColors ( GrBmpImageColors *_col ); - - Description - ----------- - It destroy _col structure, free GrBmpImage Colors and set to NULL - - Return Value - ------------ - On succes 1, otherwise 0 - - Example - ------- - GrBmpImage* bmp = GrLoadBmpImage("logogrx.bmp"); - GrBmpImageColors bmpcolors; - GrAllocBmpImageColors(bmp, &bmpcolors); - GrUnloadBmpImage(bmp); - GrFreeBmpImageColors(&bmpcolors); - -=============================== -o CONVERT GrBmpImage STRUCTURE -=============================== - Syntax - ------ - GrPattern *GrConvertBmpImageToPattern ( GrBmpImage *_bmp ); - - Description - ----------- - Make GrPattern structure from GrBmpImage pointer. - - Return Value - ------------ - On succes pointer to new GrPattern structure, else NULL - - Example - ------- - GrPattern *bmppat; - GrBmpImage *bmp = GrLoadBmpImage("logogrx.bmp"); - GrAllocBmpImageColors(bmp, NULL); - bmppat = GrConvertBmpImageToPattern(bmp); - if ( bmppat ) GrPatternFilledBox(0, 0, GrMaxX(), GrMaxY(), bmppat); - GrUnloadBmpImage(bmp); - if ( bmppat ) GrDestroyPattern(bmppat); - - IN THE OTHER WAY - - Syntax - ------ - GrPattern *GrConvertBmpImageToStaticPattern ( GrBmpImage *_bmp ); - - Description - ----------- - Make GrPattern structure from GrBmpImage pointer, AND GrBmpImage (_bmp) - structure unload. - - Return Value - ------------ - On succes pointer to new GrPattern structure, else NULL - - Example - ------- - GrPattern *bmppat; - GrBmpImage *bmp = GrLoadBmpImage("logogrx.bmp"); - GrAllocBmpImageColors(bmp, NULL); - bmppat = GrConvertBmpImageToStaticPattern(bmp); - if ( bmppat ) GrPatternFilledBox(0, 0, GrMaxX(), GrMaxY(), bmppat); - if ( bmppat ) GrDestroyPattern(bmppat); - -============================== -o UNLOAD GrBmpImage STRUCTURE -============================== - - Syntax - ------ - int GrUnloadBmpImage ( GrBmpImage *_bmp ); - - Description - ----------- - Free _bmp and BmpImage colors/palette (only if GrAllocBmpImagePalette - contains NULL in 2nd variable ). - - Return Value - ------------ - On succes 1, else 0 - - Example - ------- - GrBmpImage* bmp = GrLoadBmpImage("logogrx.bmp"); - GrUnloadBmpImage(bmp); - -========================================= -o SAVE CONTEXT TO MS-WINDOWS BITMAP FILE -========================================= - Syntax - ------ - int GrSaveBmpImage ( char *_filename, GrContext *_c, int _x1, int _y1, - int _x2, int _y2 ); - - Description - ----------- - Save context from the position ( where _x1,_y1 is left uppon origin && - _x2,_y2 right bottom origin) - to BMP ( 8 or 24 bpp file ). The BMP file will be set to 8 Bits Per Line, - when GrNumColors() in GRXxx.H is set to 256, otherwise it'll be set to - 24 Bits Per Line. - If _context is set to NULL, _c will be pointer to current context - structure. - - Return Value - ------------ - On succes 1, owtherwise 0 - - Example - ------- - GrSaveBmpImage("logogrx.bmp", NULL, 100, 100, 400, 400); - - - -========================================= -======= THE END ========================= -========================================= - - Michal Stencl - - - [stenclpmd@ba.telecom.sk] - - - - - - - - diff --git a/thirdparty/grx249/addons/bmp/bmptest.c b/thirdparty/grx249/addons/bmp/bmptest.c deleted file mode 100644 index 22533d1..0000000 --- a/thirdparty/grx249/addons/bmp/bmptest.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "grx20.h" -#include "bmp.c" - -int main ( void ) -{ - GrBmpImage *bmp256, *bmp; - GrPattern *p256, *p; - GrSetMode(GR_width_height_color_graphics, 800, 600, 256); - bmp256 = GrLoadBmpImage("mysha256.bmp"); - bmp = GrLoadBmpImage("some1.bmp"); - GrAllocBmpImageColors(bmp, NULL); - GrAllocBmpImageColors(bmp256, NULL); - p256 = GrConvertBmpImageToPattern(bmp256); - p = GrConvertBmpImageToPattern(bmp); - if ( p ) { - GrImageDisplay(0, 0, GrImageFromPattern(p)); - getkey(); - } - if ( p256 ) { - GrImageDisplay(300, 300, GrImageFromPattern(p256)); - getkey(); - } - if ( p ) GrDestroyPattern(p); - if ( p256 ) GrDestroyPattern(p256); - GrSaveBmpImage("save.bmp", NULL, 0, 0, 400, 400); - GrUnloadBmpImage(bmp); - GrUnloadBmpImage(bmp256); - return 0; -}; - diff --git a/thirdparty/grx249/addons/bmp/grxbmp.h b/thirdparty/grx249/addons/bmp/grxbmp.h deleted file mode 100644 index ad4d7aa..0000000 --- a/thirdparty/grx249/addons/bmp/grxbmp.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -** - BMP read/write file -** by Michal Stencl Copyright (c) 1998 -** - read BMP 2, 4, 8 bpp -** - write BMP 8, 24 bpp -** - [stenclpmd@ba.telecom.sk] -** -*/ - -#include "libgrx.h" - -#define _GrBitmapPointerTypes_DEFINED_ -typedef struct _GR_bitmapfileheader GrBitmapFileHeader; -typedef struct _GR_bitmapinfoheader GrBitmapInfoHeader; -typedef struct _GR_bmpimagecolors GrBmpImageColors; -typedef struct _GR_bmpimage GrBmpImage; - -/* ************************************************************************ */ -/* _GR_bitmapfileheader */ -/* ************************************************************************ */ -struct _GR_bitmapfileheader { - GR_int16u bf_type; - GR_int32u bf_size; - GR_int16u bf_reserved1; - GR_int16u bf_reserved2; - GR_int32u bf_offbits; -}; - -/* ************************************************************************ */ -/* _GR_bitmapinfoheader */ -/* ************************************************************************ */ -struct _GR_bitmapinfoheader { - GR_int32u bn_size; - GR_int32u bn_width; - GR_int32u bn_height; - GR_int16u bn_planes; - GR_int16u bn_bitcount; - GR_int32u bn_compression; - GR_int32u bn_sizeimage; - GR_int32u bn_xpelspermeter; - GR_int32u bn_ypelspermeter; - GR_int32u bn_clrused; - GR_int32u bn_clrimportant; -}; - -/* ************************************************************************ */ -/* _GR_bmpimagecolors IMPORTANT */ -/* ************************************************************************ */ -struct _GR_bmpimagecolors { - GR_int8u *bp_palette; /* (R, G, B, Reserved) * | 2 | 16 | 256 */ - GrColor *bp_colormap; - int bp_numcolors; -}; - -/* ************************************************************************ */ -/* _GR_bmpimage IMPORTANT */ -/* ************************************************************************ */ -struct _GR_bmpimage { - GrBitmapFileHeader *bi_bmpfileheader; - GrBitmapInfoHeader *bi_bmpinfoheader; - GrBmpImageColors *bi_bmpimagecolors; - GR_int16s bi_erasepalette; - char *bi_map; -}; - -GrBmpImage *GrLoadBmpImage ( char *_filename ); -int GrSaveBmpImage ( char *_filename, GrContext *_c, int _x1, int _y1, int _x2, int _y2 ); -void GrUnloadBmpImage ( GrBmpImage *_bmp ); -int GrAllocBmpImageColors ( GrBmpImage *_bmp, GrBmpImageColors *_pal ); -int GrFreeBmpImageColors ( GrBmpImageColors *_pal ); -GrPattern *GrConvertBmpImageToPattern ( GrBmpImage *_bmp ); -GrPattern *GrConvertBmpImageToStaticPattern ( GrBmpImage *_bmp ); -unsigned long GrBmpImageWidth ( GrBmpImage* _bmp ); -unsigned long GrBmpImageHeight ( GrBmpImage* _bmp ); -char *GrBmpImagePalette ( GrBmpImage* _bmp ); -GrColor *GrBmpImageColorMap ( GrBmpImage* _bmp ); -GrColor GrBmpImageNumColors ( GrBmpImage* _bmp ); - diff --git a/thirdparty/grx249/addons/ctx2tiff.c b/thirdparty/grx249/addons/ctx2tiff.c deleted file mode 100644 index c93ca8c..0000000 --- a/thirdparty/grx249/addons/ctx2tiff.c +++ /dev/null @@ -1,210 +0,0 @@ -/** - ** CTX2TIFF.C ---- saves a context in a TIFF file - ** - ** Copyright (c) 1997 Hartmut Schirmer - ** - ** requires tifflib by Sam Leffler (sam@engr.sgi.com) - ** available at ftp://ftp.sgi.com/graphics/tiff - ** - ** should work with every compiler supporting both, - ** tifflib and GRX libraries - **/ - -#include -#include -#include -#include - -#define SCALE(x) ((x)<<8) - -#define puttobuf(r,x,depth,col) do { \ - switch (depth) { \ - case 1 : if (col) { \ - int offset = (x) >> 3; \ - int mask = 0x80 >> ((x) & 7); \ - r[offset] |= mask; \ - } \ - break; \ - case 8 : r[x] = (unsigned char)(col); break; \ - case 24: r[3*(x)+0] = GrRGBcolorRed(col); \ - r[3*(x)+1] = GrRGBcolorGreen(col); \ - r[3*(x)+2] = GrRGBcolorBlue(col); \ - break; \ - } \ -} while(0) - - -/* -** SaveContextToTiff - Dump a context in a TIFF file -** -** Arguments: -** ctx: Context to be saved (NULL -> use current context) -** tiffn: Name of tiff file -** compr: Compression method (see tiff.h), 0: automatic selection -** docn: string saved in the tiff file (DOCUMENTNAME tag) -** -** Returns 0 on success -** -1 on error -*/ -int -SaveContextToTiff(GrContext *ctx, char *tiffn, unsigned compr, char *docn) { - int depth, i, res; - long row; - TIFF *tif; - long width, height, colors; - short photometric; - short samplesperpixel; - short bitspersample; - unsigned char *r; - unsigned short red[256], green[256], blue[256]; - - if (!ctx) ctx = (GrContext *)GrCurrentContext(); - if (!ctx) return -1; - width = ctx->gc_xmax+1; - height = ctx->gc_ymax+1; - colors = GrNumColors(); - if (colors < 2) return -1; - if (colors == 2) depth = 1; else - if (colors <= 256) depth = 8; else - if (colors <= 1L<<24) depth = 24; else return -1; - - if (!compr) { /* compr == 0 -> auto select compression */ - if (depth==1) compr = COMPRESSION_CCITTFAX4; - else compr = COMPRESSION_LZW; - } - - switch (depth) { - case 1: - samplesperpixel = 1; - bitspersample = 1; - photometric = PHOTOMETRIC_MINISBLACK; - break; - case 8: - samplesperpixel = 1; - bitspersample = 8; - photometric = PHOTOMETRIC_PALETTE; - break; - case 24: - samplesperpixel = 3; - bitspersample = 8; - photometric = PHOTOMETRIC_RGB; - break; - default: - return -1; /* shouldn't happen */ - } - - r = (unsigned char *) malloc( depth>1 ? - samplesperpixel*width*sizeof(unsigned char) : - (width+7)/8); - if (!r) return -1; - - tif = TIFFOpen(tiffn, "w"); - if (tif == NULL) { - free(r); - return -1; - } - - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, height); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bitspersample); - TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - TIFFSetField(tif, TIFFTAG_COMPRESSION, compr); - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric); - if (docn) - TIFFSetField(tif, TIFFTAG_DOCUMENTNAME, docn); - TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, "GRX saved context"); - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, samplesperpixel); - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, height); - TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - - memset(red, 0, sizeof(red)); - memset(green, 0, sizeof(green)); - memset(blue, 0, sizeof(blue)); - if (depth == 8) { - for (i = 0; i < colors; i++) { - int r, g, b; - GrQueryColor(i, &r, &g, &b); - red[i] = SCALE(r); - green[i] = SCALE(g); - blue[i] = SCALE(b); - } - TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue); - } - res = 0; - for (row = 0; row < height; row++) { - int x; - GrColor c; -#if GRX_VERSION_API-0 >= 0x229 - const GrColor *rcb = GrGetScanlineC(ctx,0,width-1,row); - if (rcb) { - for (x=0; x < width; ++x) { - c = rcb[x]; - puttobuf(r,x,depth,c); - } - } else -#endif - { - if (depth==1) memset (r,0,(width+7)/8); - for (x=0; x < width; ++x) { - c = GrPixelC(ctx,x,row); - puttobuf(r,x,depth,c); - } - } - if (TIFFWriteScanline(tif, r, row, 0) < 0) { - res = -1; - break; - } - } - TIFFFlushData(tif); - TIFFClose(tif); - free(r); - return res; -} - -#ifdef TEST_CTX2TIFF -#include "../test/test.h" - -TESTFUNC(wintest) -{ - int x = GrSizeX(); - int y = GrSizeY(); - int ww = (x / 2) - 10; - int wh = (y / 2) - 10; - long c; - GrContext *w1 = GrCreateSubContext(5,5,ww+4,wh+4,NULL,NULL); - GrContext *w2 = GrCreateSubContext(15+ww,5,ww+ww+14,wh+4,NULL,NULL); - GrContext *w3 = GrCreateSubContext(5,15+wh,ww+4,wh+wh+14,NULL,NULL); - GrContext *w4 = GrCreateSubContext(15+ww,15+wh,ww+ww+14,wh+wh+14,NULL,NULL); - - GrSetContext(w1); - c = GrAllocColor(200,100,100); - drawing(0,0,ww,wh,c,GrBlack()); - c = GrAllocColor(100,50,50); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w2); - c = GrAllocColor(100,200,200); - drawing(0,0,ww,wh,c,GrBlack()); - c = GrAllocColor(50,100,100); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w3); - c = GrAllocColor(200,200,0); - drawing(0,0,ww,wh,c,GrBlack()); - c = GrAllocColor(100,100,0); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w4); - c = GrAllocColor(0,100,200); - drawing(0,0,ww,wh,c,GrBlack()); - c = GrAllocColor(255,0,100); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(NULL); - - SaveContextToTiff(NULL, "test.tif", 0, "Context2TIFF test file"); - getch(); -} -#endif - - diff --git a/thirdparty/grx249/addons/print/copying.uz b/thirdparty/grx249/addons/print/copying.uz deleted file mode 100644 index 680f5b6..0000000 --- a/thirdparty/grx249/addons/print/copying.uz +++ /dev/null @@ -1,64 +0,0 @@ -[See below for an english version] - - PRINTER.BGI - - (C) Copyright 1990-1995 Ullrich von Bassewitz - - Bedingungen fuer Nutzung und Weitergabe - - -Die Software (sowohl die Quellcodes, als auch die Binaries) werden -ohne jegliche Zusagen/Garantien bezglich Funktionalit„t oder -Funktionsf„higkeit abgegeben. Weder die Autoren noch die Distributoren -bernehmen eine Verantwortung fr Sch„den, die durch die Benutzung der -Software verursacht werden. - -Die Software darf frei verwendet und weitergegeben werden, wobei -"frei" ausdrcklich auch eine kommerzielle Nutzung/Weitergabe -einschlieát, *vorausgesetzt* die folgenden Bedingungen werden -eingehalten: - - 1. Die Herkunft der Software muá - wenn berhaupt - dann korrekt - angegeben werden. Es ist nicht erlaubt, die Software als Werk - eines anderen auszugeben. Wird die Software in Teilen oder als - Ganzes in einem Produkt benutzt, dann wrde ich mich ber einen - Hinweis auf die Herkunft in der Dokumentation freuen. Ein solcher - Hinweis ist aber nicht zwingend notwendig. - - 2. Ge„nderte Quellcodes mssen deutlich als solche gekennzeichnet - werden und drfen nicht ohne einen expliziten Hinweis auf die - durchgefhrten Žnderungen weiterverteilt werden. - - 3. Die Bedingungen ber die Nutzung/Weitergabe drfen nicht entfernt - oder ge„ndert werden. - - -------------------------------------------------------------------------------- -[Dasselbe auf englisch:] - - - PRINTER.BGI - - (C) Copyright 1990-1995 Ullrich von Bassewitz - - COPYING CONDITIONS - - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - 3. This notice may not be removed or altered from any source - distribution - - diff --git a/thirdparty/grx249/addons/print/grxprint.c b/thirdparty/grx249/addons/print/grxprint.c deleted file mode 100644 index 1471477..0000000 --- a/thirdparty/grx249/addons/print/grxprint.c +++ /dev/null @@ -1,1272 +0,0 @@ -/*****************************************************************************/ -/* */ -/* grxprint.cc : Output of graphics on printer from GRX graphic library */ -/* Version 0.5 (beta) 98/01/26 Andris Pavenis (pavenis@acad.latnet.lv) */ -/* - Initial version */ -/* */ -/* Version 0.51 98/02/18 A.Pavenis */ -/* - Fixes to allow to work under Linux (still printing to file only) */ -/* */ -/* Version 0.52 98/02/24 A.Pavenis */ -/* - Changed name of function from GrDoPrinting to GrPrintToFile */ -/* - Added function GrDoPrinting(void) that prints to prn in MS-DOS */ -/* and pipes output to lpr in Linux */ -/* - Some other small changes, such as saving current video driver in */ -/* GrSetPrintMode and restoring it from GrDoPrinting */ -/* or GrPrintToFile */ -/* */ -/* Version 0.6 98/02/28 A.Pavenis */ -/* - Many changes and fixed bugs, e.g. the mirror image was */ -/* printed */ -/* */ -/* Version 0.61 98/03/03 A.Pavenis */ -/* - Fixed problem when printing directly to printer (DJGPP version). */ -/* The opened file was opened in text mode (old bug in libc). */ -/* A workaround for this problem is used */ -/* - Get rid of most of warnings that appears with -Wall */ -/* */ -/* Version 0.65 98/03/09 A.Pavenis */ -/* - Changed GrPrintToFile() under Linux. Now GrPrintToFile("|lpr") */ -/* is equivalent to GrDoPrinting(); */ -/* */ -/* Version 0.66 98/05/07 H.Schirmer */ -/* - minor changes for Watcom support */ -/* made cpp # start on first column */ -/* */ -/* Version 0.67 98/05/10 H.Schirmer */ -/* - eleminated C++ style comments for better portability */ -/* */ -/* Version 0.68 98/05/13 H.Schirmer */ -/* - clean source for better portability / ANSI-C conformance */ -/* */ -/* Version 0.7 98/05/14 A.Pavenis */ -/* - internal procedures that are used only from this file are */ -/* defined static and the definitions are removed from prn000.h */ -/* - changed restoring previous state after printing to avoid */ -/* unnecessary autodetection of video driver */ -/* */ -/* This code is port of part of printer BGI driver */ -/* (C) 1990-1995 Ullrich von Bassewitz (see copying.uz). */ -/* Only the code of printing itself is ported. */ -/* */ -/* Full version of printer BGI driver version 4.0 can be found */ -/* at URL ftp://ftp.musoftware.com/pub/uz/printerbgi+src.zip */ -/* An alternate URL is http://www.lanet.lv/~pavenis/printerbgi+src.zip */ -/* */ -/*****************************************************************************/ - -/* ->>>>> We need to configure this code on Unix like systems <<<<< ->>>>> for popen(), ... <<<<< -*/ - -#if defined(__MSDOS__) -# include -# include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if !defined(__WATCOMC__) && !defined(__DJGPP__) && !defined(__WIN32__) -#include -#endif - -static short InitDone=0; -static short Mode=-1; /* Print mode to be used */ -static GrColor numGrxColors; /* Number of colors for GRX to use */ -static int MaxX=0, MaxY=0; -static long AspectRatio=10000L; - -static jmp_buf PrintAborted; - - -/****************************************************************************/ -/* Extern deklarierte Variable */ -/****************************************************************************/ - -/* Die Farbtabelle wird (da nicht verwendet) als Moeglichkeit zur Einstellung */ -/* von diversen Daten von aussen benutzt. Sie heisst daher nicht ColorTable */ -/* (wie im SVGA-Treiber), sondern Settings (fuer die aktuelle Tabelle) und */ -/* DefaultSettings (fuer die Default-Einstellungen). */ - -static struct GrPrintOptionsType DefaultSettings = { - 0, /* Output quality, 0 --> keypad setting */ - /* 1 --> draft */ - /* 2 --> high */ - 0, /* Shingling, 0 --> normal */ - /* 1 --> 25% (2 pass) */ - /* 2 --> 50% (4 pass) */ - 1, /* Depletion 0 --> none */ - /* 1 --> 25% */ - /* 2 --> 50% */ - 0 /* Media type, 0 --> Plain paper */ - /* 1 --> Bond paper */ - /* 2 --> Special paper */ - /* 3 --> Glossy film */ - /* 4 --> Transparency film */ -}; - - - -/* Die folgenden Farbtabelle wird als Einstellungstabelle "missbraucht" */ -static struct GrPrintOptionsType Settings = { - 0, /* Output quality, 0 --> keypad setting */ - /* 1 --> draft */ - /* 2 --> high */ - 0, /* Shingling, 0 --> normal */ - /* 1 --> 25% (2 pass) */ - /* 2 --> 50% (4 pass) */ - 1, /* Depletion 0 --> none */ - /* 1 --> 25% */ - /* 2 --> 50% */ - 0 /* Media type, 0 --> Plain paper */ - /* 1 --> Bond paper */ - /* 2 --> Special paper */ - /* 3 --> Glossy film */ - /* 4 --> Transparency film */ -}; - - - - -/* RGB-Palette */ -static struct RGBEntry RGBPal [256]; - -/* Der Zeiger auf die aktuelle DST */ -static struct _DST * DSTPtr = NULL; - -/*****************************************************************************/ -/* Prototypes of internal procedures */ -/*****************************************************************************/ - - static BOOLEAN InitPrinter (BYTE *Buf, int BufSize, int Handle); - /* Stellt das Ausgabegeraet auf "binary" um und prueft gleichzeitig, ob */ - /* das Handle 4 ok (offen) ist. Der aktuelle Zustand wird gemerkt und bei */ - /* Post wiederhergestellt. Buf wird als Puffer fuer die Ausgabe verwendet */ - /* und muss PrintBufSize Bytes gross sein, Handle ist das Handle auf das */ - /* ausgegeben wird. */ - - static void ResetPrinter (void); - /* Stellt den orginalen Zustand des Ausgabegeraets wieder her. */ - - static void Flush (void); - /* Schreibt den Ausgabepuffer leer. Muss am Ende eines Ausdrucks */ - /* aufgerufen werden. Springt PrintAbortLabel an bei Fehlern. */ - - static void PrintByte (BYTE B); - /* Gibt ein Byte auf den Drucker (bzw. in den Ausgabepuffer) aus. */ - /* Springt PrintAbortLabel an bei Fehlern. */ - - static void PrintData (BYTE * Data, unsigned Size); - /* Gibt Daten auf den Drucker (bzw. in den Ausgabepuffer) aus. */ - /* Springt PrintAbortLabel an bei Fehlern. */ - - static void PrintString (char * S); - /* Gibt einen Pascal-String auf den Drucker (bzw. in den Ausgabepuffer) aus.*/ - /* Springt PrintAbortLabel an bei Fehlern. */ - - static void PrintZString (char * S); - /* Gibt einen nullterminierten String auf den Drucker (bzw. in den */ - /* Ausgabepuffer) aus. Springt PrintAbortLabel an bei Fehlern. */ - - -/****************************************************************************/ -/* */ -/* Interne Variablen */ -/* */ -/****************************************************************************/ - - -/* Default-Palette fuer die ersten Eintraege */ -static struct RGBEntry RGBDefPal [8] = { - { 0, 0, 0 }, /* Black */ - { 255, 0, 0 }, /* Red */ - { 0, 255, 0 }, /* Green */ - { 255, 255, 0 }, /* Yellow */ - { 0, 0, 255 }, /* Blue */ - { 255, 0, 255 }, /* Magenta */ - { 255, 255, 0 }, /* Cyan */ - { 255, 255, 255 } /* White */ -}; - - -static GrVideoDriver * PrevDrv = NULL; - - -int GrPrintSetMode ( int _mode_ ) - { - int rc; - unsigned I; - struct RGBEntry * P; - PrevDrv = GrDriverInfo->vdriver; - - Mode = _mode_; - if (Mode<0 || Mode>MaxModes) return -1; /* Check mode range */ - if (DSTTable[Mode]==0) return -1; - - DSTPtr = DSTTable[Mode]; - - MaxX = (int) ((((long) (DSTPtr->XDPI))*((long) (DSTPtr->XInch)))/1000L); - MaxY = (int) ((((long) (DSTPtr->YDPI))*((long) (DSTPtr->YInch)))/1000L); - AspectRatio = (long) ((10000L*DSTPtr->YDPI)/DSTPtr->XDPI); - - if (DSTPtr->ColorBits==1) numGrxColors=2; - else if (DSTPtr->ColorBits<=4) numGrxColors=16; - else if (DSTPtr->ColorBits<=8) numGrxColors=256; - else numGrxColors=256; - - /* Palette initialisieren, erste 8 Eintraege wie beim DeskJet */ - memcpy (RGBPal, RGBDefPal, sizeof (RGBDefPal)); - - /* Rest der Palette mit Grautoenen vorbesetzen */ - I = sizeof (RGBDefPal) / sizeof (struct RGBEntry); - P = &RGBPal [I]; - while (I < sizeof (RGBPal) / sizeof (struct RGBEntry)) { - P->R = P->G = P->B = I; - P++; - I++; - } - - rc = GrSetDriver ("memory"); - if (rc==TRUE) - { - rc = GrSetMode (GR_width_height_color_graphics, MaxX, MaxY, numGrxColors); - InitDone = 1; - } - return rc; - } - - - - -int GrPrintToFile (const char * DestFile) - { - int handle; -# ifdef __MSDOS__ - handle = creat (DestFile,S_IREAD+S_IWRITE); - if (!handle) return -1; - if (DSTPtr) (DSTPtr->Print) (DSTPtr,handle); - close (handle); - GrSetMode (GR_default_text); -# else - FILE * output; - if (*DestFile=='|') output = popen (DestFile+1,"w"); - else output = fopen (DestFile ,"w"); - if (!output) return -1; - handle = fileno (output); - if (DSTPtr) (DSTPtr->Print) (DSTPtr,handle); - if (*DestFile=='|') pclose (output); - else fclose (output); -# endif - if (PrevDrv) GrSetDriver (PrevDrv->name); - else DRVINFO->vdriver = NULL; - return 0; - } - - - -int GrDoPrinting (void) - { - int handle; -# ifdef __MSDOS__ - handle = creat ("prn",S_IREAD+S_IWRITE); - if (!handle) return -1; -# else - FILE * output = popen ("lpr","w"); - if (!output) return -1; - handle = fileno (output); -# endif - if (DSTPtr) (DSTPtr->Print) (DSTPtr,handle); -# ifdef __MSDOS__ - close (handle); -# else - pclose (output); -# endif - GrSetMode (GR_default_text); - if (PrevDrv) GrSetDriver (PrevDrv->name); - else DRVINFO->vdriver = NULL; - return 0; - } - - -void GrPrintGetAspectRatio ( unsigned * x , unsigned * y ) - { - *x = AspectRatio; - *y = 10000U; - } - - -/*****************************************************************************/ -/* NP.CPP */ -/* */ -/* */ -/* (C) 1994 by Ullrich von Bassewitz */ -/* Zwehrenbuehlstrasse 33 */ -/* 72070 Tuebingen */ -/* */ -/* E-Mail: uz@ibb.schwaben.de */ -/* */ -/* Port of printing code to DJGPP */ -/* Revision 0.5 98/01/26 Andris Pavenis (pavenis@acad.latnet.lv) */ -/* */ -/*****************************************************************************/ - - -/*****************************************************************************/ -/* */ -/* Printing on dot matrix printers */ -/* */ -/*****************************************************************************/ -/* */ -/* */ -/* Anmerkung zur Speicheraufteilung: Die urspruengliche Speicheraufteilung */ -/* wurde so geaendert, dass sich alle Bytes einer Druckerspalte (also bis */ -/* zu 3 bei einem 24-Nadler) linear hintereinander im Speicher befinden. */ -/* Dadurch ergibt sich ein wesentlich schnellerer Ausdruck, da eine */ -/* komplette Zeile mit Druckdaten am Stueck im Speicher steht. */ -/* */ -/* Die Berechnung fuer Adresse und Pixel erfolgt nach folgenden Formeln: */ -/* */ -/* Pixelmaske im Byte: */ -/* */ -/* PixelMask = 0x01 << (7 - (X % 8)); */ -/* */ -/* bzw. (bei Reverse) */ -/* */ -/* PixelMask = 0x01 << (X % 8); */ -/* */ -/* Lineare Adresse des Bytes in dem das Pixel steht (Achtung: die Formel */ -/* kann _nicht_ vereinfacht werden, d.h. es darf nichts weggekuerzt werden, */ -/* da es sich um Ganzzahlarithmetik handelt). */ -/* */ -/* X */ -/* Abs = -------------- * MaxY * ColBytes */ -/* 8 * ColBytes */ -/* */ -/* */ -/* + (MaxY - Y - 1) * ColBytes */ -/* */ -/* */ -/* X % (8 * ColBytes) */ -/* + -------------------- */ -/* 8 */ -/* */ - -/****************************************************************************/ -/* Drucker-Ausgaberoutinen */ -/****************************************************************************/ - -void EpsonPrint ( struct _DST * DSTPtr , int PRNHandle ) -/* Universelle Drucker-Routine fuer Nadeldrucker */ - -{ - /* - ** Steuerstrings fuer EPSON/NEC P6 Farbe. Diese sind bisher fest - ** eincodiert, da die Drucker alle dieselben Steuerstrings haben. - ** ACHTUNG: Zwei der Bit-Ebenen sind vertauscht um eine dem DeskJet - ** aehnliche Farb-Verteilung zu erhalten. - ** Alle Steuerstrings enthalten zusaetzlich zuerst einen Wagenruecklauf. - */ - - static char *ColorSel [4] = { - "\x04\r\x1Br\x02", /* Bit 0 = Cyan */ - "\x04\r\x1Br\x01", /* Bit 1 = Magenta */ - "\x04\r\x1Br\x04", /* Bit 2 = Gelb */ - "\x04\r\x1Br\x00" /* Bit 3 = Schwarz */ - }; - - WORD X, Y, EndX; - BYTE Bytes, Pass, PassCount, ColBytes, ColorBits, Bits; - DWORD Abs; - /*DWORD A;*/ - /*BYTE Buf [6]; */ /* Maximale Groesse: ColBytes(max) * PassCount(max) */ - /*BYTE PrintBuf [3];*/ /* Maximale Groesse: ColBytes(max) */ - /*int I,J,K;*/ - char Reverse; - int MaxX = GrSizeX(); - int MaxY = GrSizeY(); - unsigned char *Buffer[4]; /* Where to create buffer for printing */ - unsigned char *Curr[4] , Mask; - char OrVal[4]; - int i, j, k, l, c, X1; - int PlaneSize, BufSize; - - struct EpsonDST * dst = (struct EpsonDST *) DSTPtr; - - /* Handle auf "raw data" umstellen. Direkt Ende wenn Handle nicht Ok */ - BYTE * OutputBuf = (BYTE *) malloc (PrintBufSize); - assert (OutputBuf!=0); - if (InitPrinter (OutputBuf, PrintBufSize, PRNHandle) == FALSE) return; - - /* Vor Beginn der Druck-Ausgabe jetzt das Sprunglabel fuer Druckerfehler */ - /* setzen. */ - - if (setjmp(PrintAborted)!=0) { /* Fehler! */ return; } - - PrintString (dst->GraphicsOn); /* Variablen-Init */ - - Abs = 0L; - PassCount = dst->PassCount; - ColBytes = dst->ColBytes; - ColorBits = DSTPtr->ColorBits; - Bytes = ColBytes * PassCount; - EndX = MaxX / (ColBytes * 8); - Reverse = DSTPtr->Flags & pfReverse; - - X = 0; - - PlaneSize = ((int) ColBytes)*MaxY; - BufSize = PlaneSize*ColorBits; - Buffer[0] = (unsigned char *) malloc (BufSize); - if (Buffer[0]==0) { fprintf(stderr,"Not enough memory\n"); - longjmp(PrintAborted,-1); } - for (i=1; i=0 ? (GrPixelNC (xPos,Y)) : 0; - /* Insert color conversion here if needed */ - X1 += PassCount; - for (l=0; l>= 1; - } - for (l=0; l 1) PrintString (ColorSel [Bits]); - PrintString (dst->PreBytes); - PrintData (Buffer[Bits], PlaneSize); - PrintString (dst->PostBytes); - } - } - - - if (Pass == (PassCount - 1)) - PrintString (dst->LineFeed1); - else - PrintString (dst->LineFeed2); - } - - X += PassCount*ColBytes*8; - Flush (); - } - /* Grafik beenden, Puffer leeren */ - Flush (); - ResetPrinter (); - free (Buffer[0]); - free (OutputBuf); -} - - -/****************************************************************************/ -/* */ -/* LaserJet/DeskJet-Ausgaberoutinen fuer BGI-Druckertreiber */ -/* */ -/****************************************************************************/ -/* */ -/* (C) 1990-1993 Ullrich von Bassewitz */ -/* */ -/* Port to printing code to DJGPP */ -/* Revision 0.5 1998/01/26 Andris Pavenis (pavenis@acad.latnet.lv) */ -/* This code is not yet optimized and is rather slow espacially for */ -/* color printing. Tested on HP LaserJet 4L (Modes HPLJ_300x300, */ -/* HPLJ_300x300_NC) and on HP DeskJet 690C (Mode HPDJ500C_300x300x8_B). */ -/* Other modes are not tested. */ -/* */ -/* $Id: lj.cpp 2.10 1995/04/28 16:20:46 Uz Exp $ */ -/* */ -/* $Log: lj.cpp $ */ -/* Revision 2.10 1995/04/28 16:20:46 Uz */ -/* Umstellung auf PCX-Treiber. */ -/* */ -/* Revision 2.9 95/04/22 17:32:48 Uz */ -/* Diverse Aenderungen, Funktionen LaserPrint und LJPrint zusammengefasst, */ -/* Anpassungen an geaenderte Struktur von _DST und Support fuer DeskJet */ -/* 1200C mit einstellbarer Palette. */ -/* */ -/* Revision 2.8 94/09/08 14:14:38 Uz */ -/* Kleinere Aenderungen zur Einsprung von ein paar Bytes. */ -/* */ -/* Revision 2.7 94/09/08 09:32:52 Uz */ -/* Anpassung an extra modedata Modul. */ -/* */ -/* Revision 2.6 94/03/29 20:44:54 Uz */ -/* str.h anstelle von string.h verwendet */ -/* */ -/* Revision 2.5 94/03/19 16:16:51 Uz */ -/* Cleanup und Kosmetik. */ -/* */ -/* Revision 2.4 94/01/13 11:32:50 Uz */ -/* Ausdruck erweitert um schaltbare Schwarzabtrennung */ -/* fuer DeskJet 550C. */ -/* */ -/* Revision 2.3 93/08/01 20:53:05 Uz */ -/* Neues Format mit DPMI-Support */ -/* */ - -/****************************************************************************/ -/* Controlstrings zur Ansteuerung des LJ */ -/****************************************************************************/ - -/* defining LJ_LANDSCAPE_MODE changes order of data data output to */ -/* printer to more effectively use memory organization of GRX frame drivers */ -/* Unfortunatelly I was not able to remove some shift of image so part */ -/* of it was not printed (top was shifted down by about 6 mm) */ -/* (A.Pavenis) */ -/*#define LJ_LANDSCAPE_MODE*/ - -/* Drucker-Kontrollstrings */ -#ifndef LJ_LANDSCAPE_MODE -static char InitString [] = - "\x1B""E" /* Reset Printer */ - "\x1B*rbC" /* End Raster Graphics */ - "\x1B&l26A" /* Format: DIN A4 */ - "\x1B&l0o" /* Portrait orientation */ - "0L"; /* perf.-skip off */ -#else -static char InitString [] = - "\x1B""E" /* Reset Printer */ - "\x1B*rbC" /* End Raster Graphics */ - "\x1B&l26A" /* Format: DIN A4 */ - "\x1B&l1o" /* Landscape orientation */ - "\x1B*r0F" /* Follows orientation */ - "\x1B&l6D" /* Vertical line spacing */ - "\x1B&l0E" /* Top margin 0 */ - "\x1B*p0Y" /* Y position is 0 */ - "\x1B*p0Y\x1B*p0X" /* Cursor position 0,0 */ - "0L"; /* perf.-skip off */ -#endif - -static char ColorString1 [] = - "\x1B*r-3U"; /* 3 planes, CMY palette */ - -static char ColorString2 [] = - "\x1B*r-4U"; /* 4 planes, KCMY palette */ - -static char ColorString3 [13] = - "\x0B" /* Stringlaenge */ - "\x1B*v6W" /* CID Command */ - "\x00" /* Device RGB */ - "\x00" /* Indexed by plane */ - "\x00" /* Bits/Index (wird spaeter gesetzt) */ - "\x08\x08\x08"; /* 8 Bits per Primary */ - -static char Quality [3][6] = { - "\x1B*r0Q", /* Use keypad setting */ - "\x1B*r1Q", /* draft */ - "\x1B*r2Q" /* high */ -}; - -static char Shingling [3][6] = { - "\x1B*o0Q", /* None */ - "\x1B*o1Q", /* 25% (2 pass) */ - "\x1B*o2Q" /* 50% (4 pass) */ -}; - -static char Depletion [3][6] = { - "\x1B*o1D", /* None */ - "\x1B*o2D", /* 25% (default) */ - "\x1B*o3D" /* 50% */ -}; - -static char MediaType [5][6] = { - "\x1B&l0M", /* Plain paper */ - "\x1B&l1M", /* Bond paper */ - "\x1B&l2M", /* Special paper */ - "\x1B&l3M", /* Glossy film */ - "\x1B&l4M" /* Transparency film */ -}; - -#ifdef LJ_LANDSCAPE_MODE -static char StartGraphics [] = - "\x1B*r1A"; /* Start graphics */ -/* "\x1B&a1N"; */ /* No negative motion (DeskJet 1200C) */ -#else -static char StartGraphics [] = - "\x1B*r0A"; /* Start graphics*/ -/* "\x1B&a1N"; */ /* No negative motion (DeskJet 1200C) */ -#endif - - -/* Steuerstring zur Einstellung der Palette.*/ -static char RGBCompStr [] = - "\x03" /* Stringlaenge */ - "\x1B*v"; - -/* String der nach der Grafik geschickt wird. */ -static char EndGraphics [] = - "\x1B*rbC" /* Grafik-Ende */ - "\x0C"; /* Papier-Auswurf */ - -/* Steuerstring fuer TIFF-Pacbits Kompression */ -static char Compression [] = - "\x1B*b2M"; - -/* Steuerstring fuer keine Kompression */ -static char NoCompression [] = - "\x1B*b0M"; - -/* Hier werden die Steuercodes fuer eine Zeile zusammengebaut. */ -static char PreBytes [25] = - "\x1B*b"; - - -/****************************************************************************/ -/* */ -/* Kompressionspuffer und dessen Verwaltung */ -/* */ -/****************************************************************************/ - -/*#define CompBufSize 600 */ /* 600 Bytes Puffer */ -#define CompBufSize 6000 /* 6000 Bytes Puffer */ -static BYTE * CompBuf = 0; /* Zeiger auf Kompressionspuffer */ -static WORD CompBufFill = 0; /* Anzahl Zeichen im Puffer */ - - - -static void ToBuf (BYTE B) -/* Speichert das uebergebene Byte im Puffer wenn noch Platz ist. Der Zaehler */ -/* wird auf jeden Fall hochgezaehlt, so dass sich spaeter die theoretische */ -/* Anzahl an Bytes im Puffer auf jeden Fall feststellen laesst. */ -{ - if (CompBufFill < (CompBufSize-1)) - { /* Platz ist da, speichern */ - CompBuf [CompBufFill++] = B; - } -} - - - -static void RepeatByte (WORD bCount, BYTE B) -/* Speichert ein wiederholtes Byte im Kompressionspuffer, wobei Count die */ -/* echte Anzahl ist und B das Byte. Der Zaehler wird auf Maximum */ -/* ueberprueft und eventuell auf zwei oder drei verteilt. */ -{ - int RepeatCount; - - while (bCount) { - /* Maximal koennen 128 Bytes am Stueck geschrieben werden, wobei */ - /* der Wert 0 einem Byte entspricht usw. 127 entsprechen 128 Byte */ - RepeatCount = (bCount > 128) ? 128 : bCount; - bCount -= RepeatCount; - - /* Byte schreiben */ - ToBuf (-(RepeatCount-1)); - ToBuf (B); - } -} - - - - -static void MultiByte (WORD bCount, char *S) -/* Speichert eine Folge von ungleichen Bytes im Kompressionspuffer, wobei */ -/* Count die echte Anzahl ist und S ein Zeiger auf das erste Byte. Der */ -/* Zaehler wird auf Maximum ueberprueft und die komplette Anzahl wird */ -/* evtl. auf mehrere Male rausgeschrieben. */ -{ - WORD ByteCount; - - while (bCount) { - /* Maximal koennen 128 Bytes am Stueck geschrieben werden, wobei der */ - /* Wert 0 einem Byte entspricht usw. 127 entsprechen 128 Byte */ - ByteCount = (bCount > 128) ? 128 : bCount; - bCount -= ByteCount; - - /* Bytefolge schreiben */ - ToBuf (ByteCount-1); - while (ByteCount--) { - ToBuf (*S++); - } - } -} - - - -static void PrintNum (WORD W) -/* Gibt das Wort W vorzeichenlos in ASCII auf den Drucker aus. Zur Wandlung */ -/* wird der Kompressionspuffer verwendet! */ -{ - /*Num (W, CompBuf);*/ - char numBuf[16]; - /*itoa (W,numBuf,10);*/ - sprintf (numBuf,"%u",(unsigned) W); - PrintZString (numBuf); -} - - -/****************************************************************************/ -/* Some setup functions for LaserJet and DeskJet printers */ -/****************************************************************************/ - -static void ljSetRasterSize (int width, int height) -{ - char cmd[32]; - sprintf (cmd,"\x1B*r%dT\x1B*r%dS",height,width); - PrintZString (cmd); -} - -/*****************************************************************************/ -/* */ -/* Universelle Ausgaberoutine fuer den LaserJet/DeskJet/Color-DeskJet. Die */ -/* Routine fuehrt die Drucker-Initialisierung ueber den uebergebenen String */ -/* in Buf aus (der das passende Format haben muss, also mit fuehrendem */ -/* Laengenbyte) und druckt dann den Inhalt des Speichers. Es ist Farbe */ -/* moeglich (im DeskJet-Format), die passende Initialisierung muss aber in */ -/* Buf stehen. Die Routine behandelt nur (falls vorhanden) die Planes */ -/* korrekt. */ -/* Da Buf spaeter als Komprimierungs-Puffer verwendet wird, muss er im Daten-*/ -/* segment liegen (sowieso weil Zeiger) und mindestens 600 Bytes gross sein. */ -/* */ -/* Die Routine wurde spaeter noch erweitert um eine Moeglichkeit, die Daten */ -/* auch gezwungenermassen ohne Kompression rauszuschicken. Dabei wird der */ -/* Einfachheit halber die Zeile auch komprimiert, dann aber bei der */ -/* Abfrage, welcher Puffer kuerzer ist, gleichzeitig das Flag ausgewertet. */ -/* Die zusaetzliche Laufzeit wird hier in Kauf genommen, da diese Modi ja */ -/* wohl nur eine Notloesung fuer Uralt-Drucker sein koennen. */ -/* */ -/* */ -/* Parameter: */ -/* Buf wie oben beschrieben */ -/* */ -/* Ergebnisse: */ -/* (keine) bzw. hoffentlich ein Ausdruck... */ -/* */ -/*****************************************************************************/ - - - - -void LaserPrint ( struct _DST * DSTPtr , int PRNHandle ) -{ - - int i,rc; - int X, Count, FullCount, Len, Plane, A, PlaneCount; - int RowBytes; - unsigned I; - BYTE B, *S; - BOOLEAN SeparateBlack; - BYTE *OutputBuf=0 , *Buf=0; - int *PX=0; - /*int *PXCurr;*/ - struct RGBEntry *P; - - int MaxX = GrSizeX(); - int MaxY = GrSizeY(); - - /* Variablen-Init */ - volatile enum {Unknown, Compressed, NotCompressed} CompStatus = Unknown; - - OutputBuf = (BYTE *) malloc (PrintBufSize); - -# ifdef LJ_LANDSCAPE_MODE - PX = (int *) calloc (MaxX,sizeof(int)); -# else - PX = (int *) calloc (MaxY,sizeof(int)); -# endif - - /* Bytes pro (Plane-) Zeile berechnen */ -# ifdef LJ_LANDSCAPE_MODE - RowBytes = MaxX / 8; -# else - RowBytes = MaxY / 8; -# endif - - /* Dynamischen Speicher fuer die Puffer belegen */ - Buf = (BYTE *) malloc (RowBytes); - CompBuf = (BYTE *) malloc (CompBufSize); - - /* Vor Beginn der Druck-Ausgabe jetzt das Sprunglabel fuer Druckerfehler */ - /* setzen. */ - if ((rc=setjmp (PrintAborted))==0) - { - /* Handle auf "raw data" umstellen. Direkt Ende wenn Handle nicht Ok*/ - /* ACHTUNG: Ab hier Ausstieg mit return nicht mehr zulaessig, es */ - /* muss goto Exit verwendet werden. */ - if (OutputBuf==0 || PX==0) longjmp (PrintAborted,-1); - - if (InitPrinter (OutputBuf, PrintBufSize, PRNHandle) == FALSE) { - longjmp (PrintAborted,-2); - } - - if (Buf==0 || CompBuf==0) longjmp (PrintAborted,-1); - - /* Variable aus DST zwischenspeichern */ - SeparateBlack = hasSeparateBlack (DSTPtr); - - /* Anzahl der Farb-Ebenen rechnen. Diese entspricht der Anzahl der */ - /* Farb-Bits mit Ausnahme der Modi mit Schwarz-Abtrennung, hier */ - /* kommt eine Plane dazu. */ - PlaneCount = DSTPtr->ColorBits; - if (SeparateBlack) PlaneCount++; - - /* Ausgabe der Initialisierungs-Sequenzen */ - PrintZString (InitString); - -# ifdef LJ_LANDSCAPE_MODE - ljSetRasterSize (MaxX, MaxY); -# else - ljSetRasterSize (MaxY, MaxX); -# endif - - if (DSTPtr->ColorCount == 8) { - /* DeskJet Farbe, Schwarz-Abtrennung hat 4 Ebenen, sonst 3 */ - PrintZString (hasSeparateBlack (DSTPtr) ? ColorString2 - : ColorString1); - } else if (DSTPtr->ColorCount > 8) { - /* Deskjet 1200C, Farbmodell und Palette setzen */ - ColorString3 [8] = DSTPtr->ColorBits; - PrintString (ColorString3); - - /* Zeiger auf die Palette */ - P = RGBPal; - - /* Alle Eintraege setzen */ - for (I = 0; I < DSTPtr->ColorCount; I++) { - - /* Steuerstring zum Setzen des Eintrags */ - PrintString (RGBCompStr); - PrintNum (P->R); - PrintByte ('a'); - PrintNum (P->G); - PrintByte ('b'); - PrintNum (P->B); - PrintByte ('c'); - PrintNum (I); - PrintByte ('I'); - - /* Naechster Eintrag */ - P++; - } - } - - PrintZString (((struct LJDST *) DSTPtr)->GraphicsOn); - PrintZString (Quality [djQuality]); - if (DSTPtr->ColorCount >= 8) { - /* Farb-Deskjets */ - PrintZString (Shingling [djShingling]); - PrintZString (Depletion [djDepletion]); - } - if (DSTPtr->ColorCount > 8) { - /* Nur Deskjet 1200C */ - PrintZString (MediaType [djMediaType]); - } - PrintZString (StartGraphics); - - /* Ausgabe beginnt */ - /*for (X = 0; X < MaxX; X++) {*/ -# ifdef LJ_LANDSCAPE_MODE - for (X = 0; X < MaxY; X++) { - for (Count = 0; Count= 0; X--) { - for (Count = 0; Count=MaxX) break; -# else - if (Y>=MaxY) break; -# endif - px = PX[Y]; /* GrPixelNC (X,Y); */ - if ((px & 7)==7) - { - Buf[Count] |= Mask; - PX[Y] = 0; /* GrPlotNC (X,Y,0); */ - } - Mask >>= 1; - } - } - } - else - { - /* Es handelt sich um eine ganz normale Farb-Ebene...*/ - int cmask = 1 << ((SeparateBlack ? Plane-1 : Plane)-1); - for (Count = 0; Count < RowBytes; Count++) - { - unsigned char Mask = 0x80; - int Y = Count<<3; - Buf[Count] = 0; - for (i=0; i<8; i++) - { - int px; -# ifdef LJ_LANDSCAPE_MODE - if (Y>=MaxX) break; -# else - if (Y>=MaxY) break; -# endif - px = PX[Y]; /* GrPixelNC (X,Y); */ - if (px & cmask) Buf[Count] |= Mask; - Mask >>= 1; - Y++; - } - } - - } - - /* Pruefen, wieviele Bytes am Ende des Puffers Null-Bytes sind */ - - S = Buf + RowBytes; - FullCount = RowBytes; - while (FullCount>0 && *(--S)==0) FullCount--; - - /* Versuchen die Zeile nach Algorithmus 2 (TIFF Pacbits) zu */ - /* komprimieren. Abgeschickt wird dann der kuerzere der beiden */ - /* Puffer. */ - - S = Buf; - Count = FullCount; /* Anzahl zu pruefender Bytes */ - CompBufFill = 0; /* Puffer ist leer */ - while (Count) { - /* Erstes Byte holen */ - B = *S++; - Count--; - A = 1; - - if (Count) { - /* Es kommen noch Bytes */ - if (*S == B) { - /* Das naechste ist gleich, zaehlen wieviele - ** gleiche kommen */ - while ((Count) && (*S == B)) { - A++; - Count--; - S++; - } - /* Abschicken */ - RepeatByte (A, B); - } else { - /* Das naechste ist ungleich, zaehlen wieviele - ** ungleiche kommen */ - while ((Count) && (*S != B)) { - A++; - Count--; - B = *(S++); - } - /* Wenn Count nicht 0 ist, dann sind die Bytes an - ** Position S und S-1 gleich, koennen also beim - ** naechsten Durchgang mit einer RepeatByte-Sequenz - ** dargestellt werden. In diesem Fall wird der letzte - ** Durchgang wieder rueckgaengig gemacht. */ - if (Count) { - S--; - A--; - Count++; - } - - /* Abschicken */ - MultiByte (A, (char *) (S-A)); - } - - } else { - /* Es kommen keine Bytes mehr, das letzte Byte als - ** Einzelbyte schicken */ - MultiByte (1, (char *) (S-1)); - } - - } - - /* Sodele, den kuerzeren der beiden Puffer abschicken. Hier auch - ** pruefen ob eine Kompression ueberhaupt gewuenscht ist... */ - if (CompBufFill < FullCount && DoCompression (DSTPtr)) { - /* Der komprimierte Puffer ist kuerzer, Kontrollstring zur */ - /* Festlegung der Kompression senden, falls diese nicht */ - /* schon eingestellt ist. */ - if (CompStatus != Compressed) { - CompStatus = Compressed; - PrintZString (Compression); - } - - FullCount = CompBufFill; - S = CompBuf; - } else { - /* Der unkomprimierte Puffer ist kuerzer, Kontrollstring zur*/ - /* Festlegung der Kompression schicken, falls diese nicht */ - /* schon eingestellt ist. */ - if (CompStatus != NotCompressed) { - CompStatus = NotCompressed; - PrintZString (NoCompression); - } - - S = Buf; - } - - /* Die Steuersequenz fuer die nicht leeren Zeichen zusammenbauen. - ** Beachten, dass sich die letzte Plane in Code von den vorigen - ** unterscheidet. */ - sprintf (&PreBytes[3],"%u",(unsigned) FullCount); /*Num (FullCount, &PreBytes [3]); */ - Len = strlen (PreBytes); - PreBytes [Len] = (Plane == PlaneCount) ? 'W' : 'V'; - PreBytes [Len+1] = '\0'; - - /* Steuersequenz und dann die Zeichen senden */ - PrintZString (PreBytes); - - /* Puffer folgt */ - PrintData (S, FullCount); - - } - } - - /* Das war's, Grafik beenden und Puffer leeren */ - PrintZString (EndGraphics); - Flush (); - } - else switch (rc) - { - case -1: fprintf (stderr,"LaserPrint(): Memory allocation failed\n"); break; - case -2: fprintf (stderr,"LaserPrint(): Error writing output file\n"); break; - } - - /* Bei Fehlern geht's hier raus */ - /* Handle wieder in den Orginalzustand versetzen */ - if (OutputBuf) free(OutputBuf); - if (Buf) free(Buf); - if (PX) free(PX); - if (CompBuf) { free(CompBuf); CompBuf=0; } - - ResetPrinter (); -} - - -void GrPrintGetDefaultOptions ( struct GrPrintOptionsType * opt ) - { - *opt=DefaultSettings; - } - - -void GrPrintGetCurrentOptions ( struct GrPrintOptionsType * opt ) - { - *opt=Settings; - } - - -void GrPrintSetOptions ( struct GrPrintOptionsType * opt ) - { - Settings.Quality = opt->Quality<0 || opt->Quality>2 - ? 0 : opt->Quality; - Settings.Shingling = opt->Shingling<0 || opt->Shingling>2 - ? 0 : opt->Shingling; - Settings.Depletion = opt->Depletion<0 || opt->Depletion>2 - ? 1 : opt->Depletion; - Settings.MediaType = opt->MediaType<0 || opt->MediaType>4 - ? 0 : opt->MediaType; - } - - - - -/****************************************************************************/ -/* */ -/* Modul fuer BGI-Treiber zum Ansprechen des Druckers */ -/* */ -/****************************************************************************/ -/* */ -/* (C) 1990-1993 Ullrich von Bassewitz */ -/* */ -/* Port to DJGPP */ -/* Revision 0.5 98/01/26 Andris Pavenis (pavenis@acad.latnet.lv) */ - -/* */ -/* $Id: print.cpp 2.6 1995/04/28 16:21:14 Uz Exp $ */ -/* */ -/* $Log: print.cpp $ */ -/* Revision 2.6 1995/04/28 16:21:14 Uz */ -/* Umstellung auf PCX-Treiber. */ -/* */ -/* Revision 2.5 95/04/22 17:34:02 Uz */ -/* Neue Funktionen fuer den Ausdruck, PrintZString, PrintData, kleinere */ -/* Aenderungen bei existierenden Funktionen. */ -/* */ -/* Revision 2.4 94/09/08 14:14:51 Uz */ -/* Kleinere Aenderungen zur Einsparung von ein paar Bytes. */ -/* */ -/* Revision 2.3 93/08/01 20:53:10 Uz */ -/* Neues Format mit DPMI-Support */ -/* */ - -/****************************************************************************/ -/* */ -/* Variable */ -/* */ -/****************************************************************************/ - - -/* Ausgabepuffer und Deklarationen dazu */ -static BYTE *OutputBuf; /* Der Puffer */ -static WORD OutputBufFill = 0; /* Anzahl Zeichen im Puffer */ - -/* Handle auf das geschrieben wird */ -static WORD OutputHandle = 4; - -/* Merker fuer die Flags des Printer-Devices */ -WORD PrinterFlags; - - -/****************************************************************************/ -/* Code */ -/****************************************************************************/ - - - -static BOOLEAN InitPrinter (BYTE * Buf, int BufSize, int Handle) -/* Stellt das Ausgabegeraet auf "binary" um und prueft gleichzeitig, ob das */ -/* Handle 4 ok (offen) ist. Der aktuelle Zustand wird gemerkt und bei Post */ -/* wiederhergestellt. Buf wird als Puffer fuer die Ausgabe verwendet und */ -/* muss PrintBufSize Bytes gross sein. ACHTUNG: Buf muss bis zum Aufruf von */ -/* ResetPrinter gueltig sein! */ -{ - /* Puffer und Handle uebernehmen */ - OutputBuf = Buf; - OutputBufFill = 0; -# ifdef __MSDOS__ - PrinterFlags = setmode (Handle,O_BINARY); -# endif - OutputHandle = Handle; - return TRUE; -} - - -static void ResetPrinter (void) -/* Stellt den orginalen Zustand des Ausgabegeraets wieder her. */ -{ -# ifdef __MSDOS__ - setmode (OutputHandle,PrinterFlags); -# endif -} - - - -static void Flush (void) -/* Schreibt den Ausgabepuffer leer. Muss am Ende eines Ausdrucks aufgerufen */ -/* werden. Springt PrintAbortLabel an bei Fehlern. */ -{ - if (OutputBufFill > 0) { - if (write (OutputHandle, OutputBuf, OutputBufFill) != OutputBufFill) { - /* Fehler beim Schreiben, Fehleraussprung */ - longjmp (PrintAborted, -2); - } - /* Puffer ist wieder leer */ - OutputBufFill = 0; - - memset (OutputBuf,0,PrintBufSize); - } -} - - - -static void PrintByte (BYTE B) -/* Gibt ein Byte auf den Drucker (bzw. in den Ausgabepuffer) aus. */ -/* Springt PrintAbortLabel an bei Fehlern. */ -{ - /* Pruefen ob noch Platz im Puffer ist, wenn Nein Puffer leeren */ - if (OutputBufFill == PrintBufSize) { - /* Puffer ist voll, leeren */ - Flush (); - } - /* Neues Byte in den Puffer schreiben */ - OutputBuf [OutputBufFill++] = B; -} - - - -static void PrintData (BYTE * Data, unsigned Size) -/* Gibt Daten auf den Drucker (bzw. in den Ausgabepuffer) aus. */ -/* Springt PrintAbortLabel an bei Fehlern. */ -{ - int i; - for (i=0; i?(2mVX{B+}Wwv^qv2H#3T`_>v)UK zZJ&}d6M9MSq~2|xG+rgd-C6Obr1`XURY>H&NhzYp3$%Q zbjh+Iqhz9^M+Ibzd0!U#*BWOh>+Q2KQ8s^TYk=Fzy}GI06yN;1KcqX5wuc9=t7MoUD6geS)k{ly#4+ zPmy)Dnntdyv(+^6@jl2c#W-}#$uJH(I_8}3nDe>Ot=+}}Bkvd|GgXLF>)1G}g|9M> zWXjFZFD>Fu7ziNT$$d01xsRSC_tD{vBL@4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fb$vSzi;b5jks{aqkHQNl-d32bZ68689dP1fr{yVlB!jxP&e)L)dUaD|h$}Lcc z$T8NblClr!Q_81IdJS@^SWq@4w-ojCxSWJz9`G0!r0>DFY(kym^Z(hgoPfTR z4$^F6G4Z6!CB8)NXG7#peu-R3z`blaiYWxqDNM;HRpmP*0CvCXDL@kMTnq9gJVPF0jQBEXX#jKe!`` ll^o}Xx>9q7s_=bHh##aeQhso+rLn~W7#IIzW3Z&E{}1`$-c$ep diff --git a/thirdparty/grx249/addons/print/grxprint.txt b/thirdparty/grx249/addons/print/grxprint.txt deleted file mode 100644 index 4824891..0000000 --- a/thirdparty/grx249/addons/print/grxprint.txt +++ /dev/null @@ -1,109 +0,0 @@ - - PRINTING FROM GRX GRAPHIC LIBRARY - Version 0.7 - - Andris Pavenis - e-mail: pavenis@lanet.lv - - 26 June 1998 - - This directory contains procedures that allows printing graphics -from GRX graphic library. The source of this package is based on -sources of printer BGI driver for Borland C and Pascal compilers -developed by Ullrich von Bassevitz (see copying.uz). - Printing from GRX is tested under MS-DOS with DJGPP and under Linux. -There is no plans to allow use it from MS-DOS real mode with Borland C++ -as the memory available to program is insufficient to allocate memory -area necessary to build image in memory. - - - -int GrPrintSetMode (int mode) - -Initializes GRX with "memory only" driver with necessary image size to print -the page. See grxprint.h for available modes. - - - -int GrDoPrinting (void) - -Outputs the image built with GRX functions after call to GrSetPrintMode to -printer. In MS-DOS the output is done to file 'prn'. In Linux the output -is written through pipe to lpr. - - - -int GrPrintToFile (const char * fName) - -The same as GrDoPrinting but the output is written to requested file. For Linux -there is one more option: if filename begins with '|', the remaining part of -name is interpretted as command for popen() (it is GrPrintToFile("|lpr") is -the equivalent with GrDoPrinting). - - - -int GrPrintGetAspectRatio ( unsigned * aspx , unsigned * aspy ) - -Returns aspect ratio for image on printer. For example - unsigned AspX, AspY; - double Asp; - int MaxX, MaxY; - MaxX = GrSizeX (); - MaxY = GrSizeY (); - GrPrintGetAspectRatio (&AspX,&AspY); - Asp = ((double) AspX)/AspY; - GrEllipse (MaxX/2-100,MaxY/2,(int) (r*Asp), (int) r, 1); -will draw circle (see test.cc) - - - - -void GrPrintGetDefaultOptions ( struct GrPrintOptionsType * opt ) -void GrPrintGetCurrentOptions ( struct GrPrintOptionsType * opt ) -void GrPrintSetOptions ( struct GrPrintOptionsType * opt ) - -Allows to retrieve printing options. Works for LaserJet and DeskJet -printers. Does nothing for dot matrix printers. - - ------------------------- ChangeLog ----------------------------- - - -98/05/13 H.Schirmer - - clean source for better portability / ANSI-C conformance - -98/05/10 H.Schirmer - - eleminated C++ style comments for better portability - -7 May 1998 H.Schirmer - - made cpp # start on first column - -9 March 1998 Andris Pavenis - - Version changed to 0.65 - - Changed procedure GrPrintToFile(). Now under Linux the output is - written to pipe if the name begins with '|' - -3 March 1998 Andris Pavenis - - Fixed problem when printing directly to printer (DJGPP version). - The opened file was opened in text mode (old bug in libc, it is told - to be fixed, but the workaround mentioned for that worked OK so - I didn't study it more). - - Get rid of most of warnings that appears with -Wall - -26 February 1998 Andris Pavenis - - Version changed to 0.6 - - Many bugfixes. The first tests appeared to be incomplete. - Therefore a mirrored image were printed before. FIXED - -24 February 1998 Andris Pavenis - - Changed names of functions: GrDoPrinting() to GrPrintToFile() - - A new function added to print to PRN under MS-DOS and - to pipe output to lpr under Linux - -18 February 1998 Andris Pavenis - - Fixes to allow to work under Linux (still printing to file only) - -26 January 1998 Andris Pavenis - - Initial version. Only some preliminary tests were done so this - version still were very buggy. - diff --git a/thirdparty/grx249/addons/print/grxprn00.h b/thirdparty/grx249/addons/print/grxprn00.h deleted file mode 100644 index 2b4f1b7..0000000 --- a/thirdparty/grx249/addons/print/grxprn00.h +++ /dev/null @@ -1,221 +0,0 @@ -/*****************************************************************************/ -/* */ -/* grxprn00.h : Output of graphics on printer from GRX graphic library */ -/* Version 0.5 (beta) 98/01/26 Andris Pavenis (pavenis@acad.latnet.lv) */ -/* */ -/* Version 0.66 98/05/07 H.Schirmer */ -/* - made cpp # start on first column */ -/* */ -/* Version 0.68 98/05/13 H.Schirmer */ -/* - clean source for better portability / ANSI-C conformance */ -/* */ -/* Version 0.7 98/05/20 A.Pavenis */ -/* - removed definitions of procedures internal to grxprint.c */ -/* (they are now declared static inside grxprint.c) */ -/* */ -/* This code is port of part of printer BGI driver */ -/* (C) 1990-1995 Ullrich von Bassewitz (see copying.uz). */ -/* */ -/* Full version of printer BGI driver version 4.0 can be found */ -/* at URL ftp://ftp.musoftware.com/pub/uz/ */ -/* An alternate URL is http://www.lanet.lv/~pavenis/printerbgi+src.zip */ -/* */ -/*****************************************************************************/ - -#ifndef __GRXPRN00_H -#define __GRXPRN00_H - -#include - -#ifndef __GRX20_H_INCLUDED__ -#include -#endif - -/* */ -/* Datentyp BOOLEAN */ -/* */ -typedef unsigned char BOOLEAN; -#define TRUE 1 -#define OK TRUE -#define FALSE 0 - -/* */ -/* Diverse andere Datentypen mit festen Bit-Groessen */ -/* */ -/* ->>>>> These types should be mapped to the GRX internal types GR_int..u <<<<< -*/ -typedef unsigned int WORD; -typedef unsigned char BYTE; -typedef unsigned long DWORD; - - -/****************************************************************************/ -/* */ -/* Macros */ -/* */ -/****************************************************************************/ - -/* NULL Macro */ -#ifndef NULL -#define NULL 0 -#endif - -/* Die Farbtabelle wird (da nicht verwendet) als Moeglichkeit zur Einstellung*/ -/* von diversen Daten von aussen benutzt. Sie heisst daher nicht ColorTable */ -/* (wie im SVGA-Treiber), sondern Settings (fuer die aktuelle Tabelle) und */ -/* DefaultSettings (fuer die Default-Einstellungen). */ - -/* Defines zum Zugriff auf die Elemente von Settings und DefaultSettings */ -#define djDefQuality (DefaultSettings.Quality) -#define djDefShingling (DefaultSettings.Shingling) -#define djDefDepletion (DefaultSettings.Depletion) -#define djDefMediaType (DefaultSettings.MediaType) -#define djQuality (Settings.Quality) -#define djShingling (Settings.Shingling) -#define djDepletion (Settings.Depletion) -#define djMediaType (Settings.MediaType) - - -/* RGB Palette. */ -struct RGBEntry { - BYTE R, G, B; -}; - -/****************************************************************************/ -/* Konstante fuer das Flags Byte von _DST */ -/****************************************************************************/ - -#define pfIsEpson 0x01 /* Epson-Modus */ - -/* Nadeldrucker-Flags */ -#define pfReverse 0x02 /* Nadelnummerierung umdrehen (EPSON) */ - -/* Deskjet-Flags */ -#define pfSeparateBlack 0x02 /* Separate Schwarz-Plane (Deskjet) */ -#define pfDoCompression 0x04 /* TIFF Pacbits Kompression durchfuehren */ -#define pfHasPalette 0x08 /* RGB Palette ja/nein */ - - -/* Anzahl Druckermodi */ -#define MaxModes 43 - - -/****************************************************************************/ -/* Grund-Deskriptor fuer einen Druckermodus */ -/****************************************************************************/ - -/* Die folgende struct enthaelt die Grund-Werte bzw. Funktionen, die sich */ -/* nie aendern. Jeder Treiber kann spezielle Funktionen am Ende hinzufuegen.*/ - -struct _DST { - - WORD XDPI; /* Aufloesung in X-Richtung*/ - WORD YDPI; /* Aufloesung in Y-Richtung*/ - WORD XInch; /* Groesse X in Inch * 1000*/ - WORD YInch; /* Groesse Y in Inch * 1000*/ - - WORD ColorCount; /* Anzahl Farben des Modus*/ - BYTE ColorBits; /* Anzahl Bit in denen ein Pixel codiert ist */ - BYTE Flags; /* Diverse bitmapped Flags */ - - char *Name; /* Name des Modes */ - - void (*Print) ( struct _DST * , int ); - /*void (*Print) (); *//* Druck-Routine */ - - /* Member functions, die obige Flags auswerten, alle inline! */ - /*BOOLEAN IsEpson () const { return Flags & pfIsEpson; } */ - /*BOOLEAN Reverse () const { return Flags & pfReverse; } */ - /*BOOLEAN SeparateBlack () const { return Flags & pfSeparateBlack; } */ - /*BOOLEAN DoCompression () const { return Flags & pfDoCompression; } */ - /*BOOLEAN HasPalette () const { return Flags & pfHasPalette; } */ - - }; - -#define IsEpson(x) (x->Flags & pfIsEpson) -#define Reverse(x) (x->Flags & pfReverse) -#define hasSeparateBlack(x) (x->Flags & pfSeparateBlack) -#define DoCompression(x) (x->Flags & pfDoCompression) -#define HasPalette(x) (x->Flags & pfHasPalette) - -/* Der Zeiger auf die aktuelle DST*/ -/* extern struct _DST *DSTPtr; */ -/* Die Tabelle mit den Zeigern auf die Modi*/ -extern struct _DST *DSTTable [MaxModes]; - - -/* Groesse des Ausgabepuffers*/ -#define PrintBufSize 1024 - - -/*****************************************************************************/ -/* Dot matrix printers related procedures */ -/*****************************************************************************/ -/* */ -/* Die folgende Struktur enthaelt einen Device-Status-Block. Die ersten */ -/* Werte muessen immer dieselben sein, da sie vom Grafik-Modul so erwartet */ -/* werden. Im Anschluss kommen eigene Variablen, die von Drucker zu Drucker */ -/* bzw. besser von Treiber zu Treiber verschieden sein koennen. */ -/* */ -/*****************************************************************************/ - - -struct EpsonDST { - - struct _DST DST; /* Orginal-DST */ - - BYTE ColBytes; /* Anzahl Bytes / Druckerspalte */ - BYTE PassCount; /* Wie oft ueberdrucken */ - - char *LineFeed1; /* Normaler Linefeed */ - char *LineFeed2; /* Linefeed zwischen Ueberdrucken */ - - char *GraphicsOn; /* Grafik einschalten (mit Init) */ - char *GraphicsOff; /* Grafik ausschalten */ - - char *PreBytes; /* String vor Grafik-Daten */ - char *PostBytes; /* String nach Grafik-Daten */ - -}; - -/****************************************************************************/ -/* */ -/* Universelle Ausgaberoutine fuer Nadeldrucker. */ -/* */ -/* Parameter: */ -/* (keine) */ -/* */ -/* Ergebnisse: */ -/* (keine) bzw. hoffentlich ein Ausdruck... */ -/* */ -/****************************************************************************/ - -void EpsonPrint ( struct _DST * DSTPtr , int PRNHandle ); -/* Universelle Drucker-Routine fuer Nadeldrucker */ - - -/****************************************************************************/ -/* Laser and DeskJet printers related procedures */ -/****************************************************************************/ -/* */ -/* Die folgende Struktur enthaelt fuer den LaserJet angepassten Device- */ -/* Status Block. */ -/* */ -/****************************************************************************/ - - -struct LJDST { - - struct _DST DST; /* Orginal-DST */ - char *GraphicsOn; /* Grafik einschalten (mit Init) */ - -}; - - - - -void LaserPrint ( struct _DST * DSTPtr , int PRNHandle ); - - -#endif diff --git a/thirdparty/grx249/addons/print/printer.doc b/thirdparty/grx249/addons/print/printer.doc deleted file mode 100644 index 406be49..0000000 --- a/thirdparty/grx249/addons/print/printer.doc +++ /dev/null @@ -1,1047 +0,0 @@ - - - PRINTER.BGI - BGI Treiber fr Drucker - - Version 4.00 vom Oktober 1995 - - (C) 1990-1995 by Ullrich von Bassewitz - Zwehrenbhlstraáe 33 - D-72070 Tbingen - - E-Mail: uz@ibb.schwaben.com - - - - - - -0. Vorwort - -Alle Rechte an der hier beschriebenen Software sowie der Dokumentaton liegen -beim Autor. Die Verwendung von PRINTER.BGI in eigenen Programmen ist frei, -sowohl fr private als auch fr kommerzielle Zwecke. Beachten Sie aber bitte -folgendes: - - Da die Verwendung von PRINTER.BGI kostenlos ist, erfolgt der Einsatz auf - auschlieáliche Gefahr des Anwenders. Jede Haftung fr direkte, indirekte, - verursachte oder gefolgte Sch„den, die durch die Verwendung von - PRINTER.BGI entstehen k”nnen, ist ausgeschlossen. - -PRINTER.BGI darf unter folgenden Bedingungen beliebig weitergegeben werden: - - * Die Weitergabe geschieht im kompletten Paket mit Dokumentation und - Beispielprogrammen. - * Die Weitergabe geschieht kostenlos. Dies bedeutet insbesondere, daá der - Treiber nicht ohne meine vorherige schriftliche Genehmigung auf CD-ROMS - vertrieben werden darf, genauso sind Mailboxen/FTP-Server ausgeschlossen, - bei denen der Zugang zum Treiber nicht frei fr jedermann ist. - - - -1. Einleitung - -Das Borland Graphics Interface (kurz BGI genannt) ist eine ger„teunabh„ngige -Schnittstelle zur Ausgabe von Grafiken auf (fast) beliebigen Ausgabeger„ten. Zu -den Borland-Compilern werden aber ausschlieálich Treiber fr Grafik-Karten -mitgeliefert. - -PRINTER.BGI ist ein zus„tzlicher Treiber, mit dem Grafik auf einer Vielzahl von -Druckern ausgegeben werden kann. Dabei wird (im Gegensatz zu Hardcopys) die -volle Aufl”sung des Druckers ausgenutzt. - -Untersttzt werden beide Borland-Compiler (also Turbo-Pascal und Borland-C++), -sowie die folgenden Drucker: - - * Zum HP-LaserJet II kompatible Drucker. - * Zum HP-LaserJet IV kompatible Drucker. Der Treiber untersttzt bei diesem - Drucker die zus„tzlich verfgbare Aufl”sung von 600 DPI. - * Der HP DeskJet 500 und Abk”mmlinge. - * Der HP DeskJet 500C und Nachfolger (z.B. HP DJ 550C). Hier werden 8 Farben - untersttzt. - * HP PaintJet XL (nur 8 Farben). - * Nadeldrucker der Serien FX und LQ von EPSON sowie dazu kompatible. Dazu - geh”ren z.T. auch Laser- und Tintenstrahldrucker, z.B. der BJ-300 und BJ330 - von Canon. - * NEC P6/P6+/P60. Diese Drucker sind prinzipiell EPSON kompatibel, - unterscheiden sich jedoch im Modus 360 * 360 DPI und verfgen zus„tzlich - noch ber die M”glichkeit zum Ausdruck in Farbe. - * IBM Proprinter X24 und kompatible. - * Benutzerdefinierte Nadeldrucker (ber separat zu erstellende - Definitionsdateien). - -PRINTER.BGI untersttzt alle im "Device Drivers Toolkit" angegebenen Funktionen -einschliesslich FloodFill. Da keiner der untersttzten Farbdrucker ber eine -einstellbare Palette verfgt, sind jedoch die Paletten-Funktionen nicht -verfgbar. - -Der Treiber ist gleichzeitig auch im neuen Format verfgbar, das ben”tigt wird, -wenn das Programm im Protected-Mode arbeitet. N„heres dazu weiter unten. - - - -2. Anforderungen - -2.1 Drucker - -Hardware-Voraussetzung ist ein Drucker der zu einer der oben erw„hnten Familien -geh”rt oder dazu kompatibel ist. Sollten Sie einen Nadeldrucker besitzen bei dem -das nicht der Fall ist, lesen Sie bitte das Kapitel ber benutzerdefinierte Modi -weiter unten. Bitte beachten Sie, daá nicht alle Drucker alle Modi untersttzen. -Speziell die Modi mit Aufl”sungen von 360 * 360 DPI sind nicht auf allen -Nadeldruckern verfgbar. - - - -2.2 Rechner - -Prinzipiell reicht ein XT-kompatibler Rechner zur Benutzung von PRINTER.BGI -aus. Da jedoch relativ groáe Datenmengen bewegt werden wird die Verwendung erst -ab einem AT-kompatiblen Rechner wirklich sinnvoll. Sind weder EMS noch XMS -in ausreichendem Umfang vorhanden (siehe Abschnitt 2.4: Speicher), so ist -die Verwendung einer schnellen Platte anzuraten. - - - -2.3 Compiler - -Der Treiber arbeitet problemlos mit allen Compilern ab Version 6.0 (Turbo -Pascal) bzw. Version 2.0 (Borland-C++) zusammen. - - - -2.4 Speicher - -Da das Grafik-Paket eine beliebige Positionierung des Grafik-Cursors zul„át, und -zudem Funktionen zum Rcklesen von Daten existieren (GetPixel, GetImage etc.), -muá der Treiber das komplette Bild bis zur Ausgabe zwischenspeichern. Dies -geschieht - - - im Real-Mode: Entweder im EMS-Speicher, im XMS-Speicher oder auf Platte. - - - im Protected-Mode: Im DPMI-Speicher oder auf Platte. N„heres siehe - Abschnitt 7. - -PRINTER.BGI entscheidet sich je nach vorhandener Hard- und Software -selbstst„ndig fr eine dieser M”glichkeiten, wobei er (in dieser Reihenfolge) -die Verwendungsm”glichkeit von EMS, XMS (bzw. DPMI-Speicher) und Platte prft. -Die Daten k”nnen dabei nicht aufgeteilt werden k”nnen (also z.B. Verwendung von -200 KB EMS, 89.5 KB XMS und der Rest auf Platte). Kann keines der oben genannten -Speichermedien genug Speicher zur Verfgung stellen, so liefert PRINTER.BGI -einen Fehlercode von -12 (grIOError) zurck. - -Wieviel Speicher fr eine bestimmte Aufl”sung ben”tigt wird, kann nach folgender -Formel berechnet werden, wobei je nach Speichermedium evtl. auf volle 16 oder 64 -KB aufgerundet werden muá: - - Breite * X-Aufl”sung (DPI) * H”he * Y-Aufl”sung (DPI) * Farbbits - ------------------------------------------------------------------ Byte - 8 - -Der Wert von Farbbits betr„gt 1 fr die Schwarz-Weiá Modi, 3 beim DeskJet -500C/550C mit 8 Farben und 4 bei den Farbmodi der Nadeldrucker. - -Die Gr”áe des bedruckbaren Bereichs ist je nach Modus unterschiedlich: In den -Nadeldrucker-Modi betr„gt die Breite immer 8, die L„nge immer 11 Zoll. In den -LaserJet-Modi betr„gt die Breite 7.8 Zoll (neuere Laserdrucker haben des ”fteren -Probleme mit der vollen Breite von 8 Zoll), die L„nge 10.5 Zoll. Beim DeskJekt -500C/550C betr„gt die Breite 8 Zoll und die L„nge 10.33 Zoll. - - - -3. Die Einbindung des Treibers - -Die Einbindung des Treibers erfolgt ber die Prozedur InstallUserDriver. Der -erste Parameter von InstallUserDriver ist der Name des Treibers (ohne die -Endung), der zweite Parameter ist ein Zeiger auf eine Detect-Routine, die prfen -kann, ob der Rechner mit einer fr den Treiber passenden Hardware ausgestattet -ist (was im Falle von Druckern natrlich schlecht geht, weswegen ein NIL-Zeiger -bergeben wird). - -Ist der von InstallUserDriver zurckgegebene Integer-Wert < 0, so ist ein Fehler -aufgetreten, ist er gr”áer, so stellt er die Nummer des Treibers dar. - -Der folgende Ausschnitt zeigt, wie eine Einbindung in Turbo-Pascal aussehen -kann. - - VAR - GraphMode, GraphDriver : INTEGER; - - BEGIN - { Grafiktreiber installieren } - GraphDriver := InstallUserDriver ('PRINTER', NIL); - IF (GraphDriver < 0) THEN BEGIN - { Fehlerbehandlung } - ... - END; - - { Gewnschten Modus festlegen und Grafik einschalten } - GraphMode := 2; { Modus 2, 180*180 DPI } - InitGraph (GraphDriver, GraphMode, PathToDriver); - ... - END; - -Soll der Treiber als OBJ-Datei in das ausfhrbare Programm eingebunden werden, -so mssen folgende Schritte in genau dieser Reihenfolge durchgefhrt werden: - - * "Installierung" des Treibers mit InstallUserDriver. Diese Prozedur teilt - dem Grafik-Kernel mit, daá es einen Treiber mit dem Namen "PRINTER" gibt. - - * "Registrierung" des Treibers mit RegisterBGIDriver. Diese Prozedur teilt - dem Grafik-Kernel mit, daá der Treiber (falls er verwendet werden sollte) - nicht von Platte zu laden ist, sondern daá er sich bereits im Speicher - befindet. - - * Einschalten des Grafikmodus mit InitGraph. - -Der folgende Code-Ausschnitt zeigt beispielhaft, wie die Einbindung erfolgen -kann. Es wird vorausgesetzt, daá der Treiber zuvor mittels - - BINOBJ PRINTER.BGI PRINTER.OBJ PRINTERDRIVER - -in eine OBJ-Datei umgewandelt worden ist (C-Programmierer: Das entsprechende -Programm heiát BGIOBJ und ist etwas komplizierter zu bedienen. Es mssen beim -Aufruf alle Parameter angegeben werden! Dazu einfach BGIOBJ ohne Parameter -aufrufen und nach Hilfestellung vorgehen.) - - - { Der Treiber als Prozedur deklariert } - PROCEDURE PRINTERDriver; FAR; EXTERNAL; - - { Einbinden des Treibers } - {$L PRINTER.OBJ} - - VAR - GraphDriver : INTEGER; { Nummer des Treibers } - - - PROCEDURE Install; - { Fhrt die Installation des Treibers durch } - BEGIN - GraphDriver := InstallUserDriver ('PRINTER', NIL); - IF (GraphDriver < 0) THEN Error; - IF (RegisterBGIDriver (@PRINTERDriver) < 0) THEN Error; - END; - - - BEGIN { Hauptprogramm } - .... - Install; - GraphMode := 1; { Autodetect } - InitGraph (GraphDriver, GraphMode, ''); - { Fehlerauswertung muss folgen } - .... - END. - - -Weitere Details finden Sie im Handbuch zur jeweiligen Programmiersprache. - - - -4. Grafik-Modi - -Folgende Grafik-Modi sind verfgbar: - - Wert Bedeutung Anmerkungen - -------------------------------------------------------------------------- - 0 EPSON FX (8-Nadel), 240 * 72 DPI - 1 EPSON FX (8-Nadel), 240 * 216 DPI - 2 EPSON LQ (24-Nadel), 180 * 180 DPI - 3 EPSON LQ (24-Nadel), 360 * 180 DPI - 4 EPSON LQ (24-Nadel), 360 * 360 DPI - 5 NEC P6, P6+, P60 (24-Nadel), 360 * 360 DPI (1) - 6 IBM Proprinter X24 (24-Nadel), 180 * 180 DPI - 7 IBM Proprinter X24 (24-Nadel), 360 * 180 DPI - 8 EPSON LQ / NEC P6, P6+, 180 * 180 DPI, 9 Farben (6) - 9 EPSON LQ / NEC P6, P6+, 360 * 180 DPI, 9 Farben (6) - 10 EPSON LQ, 360 * 360 DPI, 9 Farben (6) - 11 NEC P6, P6+, 360 * 360 DPI, 9 Farben (6) - 12 Reserviert - 13 Benutzerdefinierter Modus 1 (2) - 14 Benutzerdefinierter Modus 2 (2) - 15 Benutzerdefinierter Modus 3 (2) - 16 HP LJ, 75 * 75 DPI (3) - 17 HP LJ, 100 * 100 DPI (3) - 18 HP LJ, 150 * 150 DPI (3) - 19 HP LJ, 300 * 300 DPI (3) - 20 HP LJ, 75 * 75 DPI, keine Kompression (4) - 21 HP LJ, 100 * 100 DPI, keine Kompression (4) - 22 HP LJ, 150 * 150 DPI, keine Kompression (4) - 23 HP LJ, 300 * 300 DPI, keine Kompression (4) - 24 HP DJ 500C, 75 * 75 DPI, 8 Farben, A4 - 25 HP DJ 500C, 100 * 100 DPI, 8 Farben, A4 - 26 HP DJ 500C, 150 * 150 DPI, 8 Farben, A4 - 27 HP DJ 500C, 300 * 300 DPI, 8 Farben, A4 - 28 HP DJ 550C, 75 * 75 DPI, 8 Farben, echtes Schwarz (7) - 29 HP DJ 550C, 100 * 100 DPI, 8 Farben, echtes Schwarz (7) - 30 HP DJ 550C, 150 * 150 DPI, 8 Farben, echtes Schwarz (7) - 31 HP DJ 550C, 300 * 300 DPI, 8 Farben, echtes Schwarz (7) - 32 HP LJ IV, 600 * 600 DPI (5) - 33 EPSON LQ (24-Nadel), 180 * 180 DPI, DIN A3 - 34 EPSON LQ (24-Nadel), 360 * 180 DPI, DIN A3 - 35 EPSON LQ (24-Nadel), 360 * 360 DPI, DIN A3 - 36 NEC P7 (24-Nadel), 360 * 360 DPI, DIN A3 (1) - 37 EPSON LQ (24-Nadel), 180 * 180 DPI, DIN A3, 9 Farben (6) - 38 EPSON LQ (24-Nadel), 360 * 180 DPI, DIN A3, 9 Farben (6) - 39 EPSON LQ (24-Nadel), 360 * 360 DPI, DIN A3, 9 Farben (6) - 40 NEC P7 (24-Nadel), 360 * 360 DPI, DIN A3, 9 Farben (1) (6) - 41 HP PaintJet 300 XL, 75 * 75 DPI, 8 Farben, A3 (8) - 42 HP PaintJet 300 XL, 100 * 100 DPI, 8 Farben, A3 (8) - 42 HP PaintJet 300 XL, 150 * 150 DPI, 8 Farben, A3 (8) - 42 HP PaintJet 300 XL, 300 * 300 DPI, 8 Farben, A3 (8) - - - -Alle anderen Modi erzeugen den Fehler -10 (grInvalidMode). - -Anmerkungen zur Tabelle: - -(1) -In den niedrigeren Aufl”sungen ist der Drucker EPSON kompatibel, d.h. es k”nnen -die Modi 2 und 3 zus„tzlich verwendet werden. - -(2) -Siehe Abschnitt 8 (Benutzerdefinierte Modi). - -(3) -Žltere Modelle des LaserJet II (und Nachbauten) beherrschen z.T. die vom Treiber -verwendete Kompressionsmethode nicht. Bei Problemen ist auf die (ansonsten -„quivalenten) Modi 20-23 auszuweichen, die keine Kompression verwenden. - -(4) -Die Modi entsprechen den Modi 16-19, es wird jedoch keine Kompression der an den -Drucker gesandten Daten durchgefhrt. Aus diesem Grund ist der Ausdruck -normalerweise langsamer. - -(5) -Der Drucker LaserJet IV kann auch mit geringeren Aufl”sungen in den Modi 16-19 -betrieben werden. - -(6) -Der Drucker muá dazu mit einer Farboption ausgestattet sein. - -(7) -Der Drucker verfgt ber eine separate Schwarz-Patrone und wird vom Treiber so -angesteuert, daá fr schwarze Fl„chen diese Patrone verwendet wird. Beachten Sie -dazu bitte die Hinweise im Abschnitt 6.4. - -(8) -Diese Modi entsprechen bis auf die Blattgr”áe den Modi 24-27. Der PaintJet -300 XL l„át sich auch in diesen Modi betreiben, wenn nur eine Ausgabe im -DIN A4 Format gewnscht ist. - - - -5. Ausgabe der Grafik - -Die Ausgabe der Grafik erfolgt beim abschlieáenden CloseGraph. Sollen mehrere -Seiten ausgegeben werden, so ist eine Ausgabe auch mittels Aufruf von -ClearDevice m”glich. Nach Aufruf dieser Funktion ist die Zeichenfl„che wieder -leer. - -Der Treiber schreibt die Daten auf das MS-DOS Datei-Handle Nr. 4, das -normalerweise (von COMMAND.COM) vor Start des Programms mit dem Ger„t PRN -(also dem ersten Drucker) verbunden wird. Das Device wird vor der Ausgabe auf -"raw data" um- und danach wieder in den Orginalzustand geschaltet. - -Die Verwendung eines Standard-Handles hat den Vorteil, daá die Ausgabe leicht in -eine Datei oder auf einen anderen Ausgabeport umgeleitet werden kann (letzteres -z.B. mit Hilfe des MODE-Kommandos). Beispiele zur Umleitung finden Sie in den -Beispielprogrammen. - - - -6. Besonderheiten der verschiedenen Drucker - -6.1 LaserJet II - -Bei „lteren Modellen dieses Druckers ist die vom Treiber verwendete Methode zur -Kompression der Druckdaten nicht implementiert. Nachbauten verhalten sich hier -unterschiedlich. Bei Problemen sind anstelle der Modi 16-19 die Modi 20-23 zu -verwenden. - - - -6.2 DeskJet 500 - -Beim DeskJet 500 und Nachfolgern (auch DeskJet 500C im Schwarz-Weiá Modus) -k”nnen Ausdruckparameter eingestellt werden. N„heres dazu steht in Abschnitt -9 (Optionen). - - - -6.3 DeskJet 500C - -Der Drucker DeskJet 500C und seine Nachfolger untersttzten 8 Farben, die aus -den drei Grundfarben Cyan, Gelb und Magenta zusammengesetzt werden. Da es sich -hier um eine subtraktive Palette handelt, unterscheiden sich die Farben von -denen des Bildschirmadapters (der eine additive Palette besitzt). Aus diesem -Grund k”nnen die vordefinierten Farb-Konstanten nicht verwendet werden. (Rein -syntaktisch k”nnen diese Konstanten natrlich verwendet werden, d.h. der -Compiler meldet keinen Fehler, das Ergebnis sieht dann jedoch etwas anders aus -als erwartet.) Die Zuordnung der Farben entnehmen Sie bitte der folgenden -Tabelle: - - Wert Farbe - ------------------- - 0 Weiá - 1 Cyan - 2 Magenta - 3 Blau - 4 Gelb - 5 Grn - 6 Rot - 7 Schwarz - -Zus„tzlich k”nnen beim DeskJet 500C Ausdruckparameter ver„ndert werden, n„heres -dazu steht in Abschnitt 9 (Optionen). - - - -6.4 DeskJet 550C - -Der DeskJet 550C verfgt im Gegensatz zu seinem Vorl„ufer ber eine separate -Schwarzpatrone, die gleichzeitig verwendet werden kann. In den Modi 28-31 ist -es m”glich, diese separate Patrone zum Druck schwarzer Fl„chen zu benutzen. -Beachten Sie dazu bitte den folgenden Hinweis aus dem Handbuch des Herstellers -(im Orginal Englisch, von mir frei bersetzt): - - Vorsicht ist geboten, wenn schwarze und farbige Tinte gleichzeitig auf - einer Seite verwendet wird. Die Tinten aus der Farb-Patrone haben eine - andere chemische Zusammensetzung als die Tinte aus der Schwarz-Patrone. - Wenn beide in direkten Kontakt miteinander kommen, kann es passieren, daá - sich die schwarze merklich mit der farbigen Tinte mischt. Das Problem - f„llt am meisten auf, wenn viel Tinte aufgetragen wird. Die Verwendung - von Shingling beim Ausdruck kann dieses Ph„nomen verringern oder ganz - eliminieren. 25% Shingling kann die Qualit„t des Ausdrucks verbessern, - 50% Shingling kann das Problem evtl. ganz zum Verschwinden bringen. - Alternativ kann mit geringerem Tintenauftrag gearbeitet werden (dnnere - Linien oder Fllmuster), oder es kann durch geeigneten Ausdruck dafr - gesorgt werden, daá sich die Fl„chen mit unterschiedlichen Tinten nicht - berhren. - -Weiterhin sind alle Hinweise aus Abschnitt 6.3 gltig. - - - -6.5 PaintJet 300 XL - -Beim PaintJet 300 XL handelt es sich um einen A3 Farbdrucker, der auch mehr -als 8 Farben untersttzt. Dieser Drucker l„sst sich in den Modi 24-27 (A4) -und 41-44 (A3) betreiben. Modi mit mehr als 8 Farben stehen derzeit nicht -zur Verfgung. Fr die Farbzuordnung, siehe Abschnitt 6.3. - - - -6.6 HP DeskJet 1200 - -Der Drucker msste die Modi 24-27 "verstehen". Aufgund fehlender Hardware ist -das bisher aber ungetestet. Fr Rckmeldungen w„re ich dankbar. - - - -6.7 Canon BJ-300 und BJ-330 - -Dieser Tintenstrahldrucker emuliert entweder die EPSON Drucker LQ850 bzw. LQ1050 -oder den IBM Proprinter X24. Je nach Einstellung am Drucker lassen sich deshalb -die Modi 2-4 oder 8-9 des Treibers verwenden. Die Einstellung des -Emulationsmodus ist im Druckerhandbuch beschrieben. - - - -6.8 Canon BJC-800 - -Als Emulationsmodus sollte "EPSON LQ-2550" gew„hlt werden. Der Drucker -untersttzt Farbe, die Farbmodi der EPSON-Drucker k”nnen verwendet werden. - - - -6.9 NEC P6, P6+, P7, P7+, EPSON LQ Serie - -In den entsprechend gekennzeichneten Modi kann der Drucker als Farbdrucker -verwendet werden. Dazu ist jedoch eine Hardware-Aufrstung des Druckers -notwendig. - -Die Farbzuordnung entnehmen Sie bitte folgender Tabelle: - - Wert Farbe - ------------------- - 0 Weiá - 1 Cyan - 2 Magenta - 3 Blau - 4 Gelb - 5 Grn - 6 Rot - 7 Braun - 8 Schwarz - - - - -7. Der Treiber im Protected-Mode - -Aufgrund der Eigenheiten des Protected-Mode muáte Borland das Format der Treiber -beim šbergang auf die Version 7.0 von Turbo-Pascal „ndern. Die neuen Versionen -des Grafik-Kernels erkennen jedoch die alten Treiber und behandeln diese -korrekt, vorausgesetzt, das Programm l„uft im Real-Mode. Die folgende Auflistung -zeigt, welcher Treiber mit welchem Compiler kompatibel ist: - - * Turbo-Pascal bis Version 6.0 und Borland-C++ bis Version 3.1 laufen nur im - Real-Mode und kennen nur das alte Format der Treiber. - - * Borland-Pascal 7.0 l„uft sowohl im Real- als auch im Protected-Mode und - erkennt beide Treiberformate. Der Betrieb im Protected-Mode ist jedoch nur - mit dem neuen Format m”glich. - - * Turbo-Pascal 7.0 ist eine abgespeckte Version von Borland-Pascal 7.0 und - l„uft nur im Real-Mode, erkennt aber beide Treiberformate. - -Im Paket befinden sich der Treiber in beiden Formaten. Der Treiber fr das neue -(DPMI-) Format tr„gt jedoch einen anderen Namen (PRINTER.BP7) und muá vor -Gebrauch umbenannt werden. - -Im Real-Mode unterscheiden sich beide Versionen des Treibers nicht. Im -Protected-Mode ergeben sich jedoch folgende Einschr„nkungen: - - * Der Treiber untersttzt kein EMS und kein XMS. Es kann nur in den - DPMI-Speicher und auf Platte ausgelagert werden. Bei Verwendung von - DPMI-Speicher ist der Treiber dafr wesentlich schneller, da ein direkter - Zugriff erfolgen kann. - - * Der Runtime-Manager von Borland belegt beim Start s„mtlichen verfgbaren - DPMI-Speicher, der dann dem Treiber nicht mehr zur Verfgung steht. Aus - diesem Grund muá dem Runtime-Manager durch Setzen einer Environment-Variable - mitgeteilt werden, welchen Anteil des DPMI-Speichers er freizuhalten hat - - ansonsten wird prinzipiell auf Platte ausgelagert. Dieser Speicher steht - dann aber dem Programm nicht mehr zur Verfgung. (Zumindest nicht ber die - Routinen des Borland-Pakets. šber DPMI-Funktionen kann der Speicher - selbstverst„ndlich belegt werden.) Soll DPMI-Speicher benutzt werden, so ist - vor Start des Programms auf DOS-Ebene - - SET RTM=EXTLEAVE nnnn - - einzugeben, wobei nnnn die Gr”áe (in KB) des vom Runtime-Managers nicht zu - belegenden Speichers ist. Um z.B. 1MB Speicher fr den Treiber freizuhalten, - wird - - SET RTM=EXTLEAVE 1024 - - verwendet. N„heres dazu lesen Sie bitte in Ihrem Compiler-Handbuch nach. - -ACHTUNG: Borland hat mehrere Monate lang eine Version 7.00 des Borland-Pascal -Compilers vertrieben die extrem fehlerhaft war (die sp„tere, fehlerbereinigte -Version tr„gt die Versionsnummer 7.01). Falls Sie im Besitz dieser „lteren -Version sind, sollten Sie auf jeden Fall ein Upgrade bei Borland erstehen (auch -wenn dieses nicht kostenlos ist). Die korrekte Version erkennen Sie an der -Uhrzeit der letzten Žnderung der Datei: Die richtige Version des Compilers zeigt -hier 07:01, die falsche 07:00. - - - -8. Benutzerdefinierte Modi - -PRINTER.BGI l„sst sich ber Drucker-Definitionsdateien an fast alle Nadeldrucker -anpassen. Dazu dient ein kleines šbersetzungsprogramm zusammen mit einigen dafr -reservierten Modi im Treiber. Bei der Initialisierung sucht der Treiber nach den -Dateien PRINTER1.PDF, PRINTER2.PDF und PRINTER3.PDF (fr die Modi 13-15). (Das -".PDF" steht fr "Printer Definition File".) Der Treiber sucht in mehreren -Verzeichnissen nach diesen Dateien, und zwar: - - * Im aktuellen Verzeichnis. - * Im Verzeichnis, in dem sich die EXE-Datei befindet. Dieser Mechanismus - funktioniert erst ab DOS 3.0. - * Im Verzeichnis, das die Environment-Variable BGIPATH angibt. Sie k”nnen - diese Variable auf DOS-Ebene mit - - set BGIPATH=X:\YYY\ZZZ - - setzen. - -Findet PRINTER.BGI eine oder mehrere dieser Dateien so wird/werden sie geladen -und Modus wird entsprechend der in der Datei enthaltenen Angaben untersttzt. - -Zur Erstellung dieser Dateien gehen Sie wie folgt vor: - - * Erstellen Sie mit Ihrem Text-Editor eine ASCII-Datei mit den erforderlichen - Steuersequenzen. Lesen Sie dazu die Anleitung (PDFCOMP.DOC) und orientieren - Sie sich an den beigelegten Beispieldateien. - * šbersetzen Sie die ASCII-Datei mit Hilfe des Programms PDFCOMP in eine - Bin„rdatei. - * Benennen Sie die Datei um in PRINTERx.PDF, je nachdem welchen Modus Sie - verwenden wollen. - * Kopieren Sie die Datei in eines der oben genannten Verzeichnisse. Der - Treiber l„dt diese Datei bei der Initialisierung und untersttzt den Modus - dann wie einen eingebauten. - * Falls Sie mir und anderen Benutzern einen Gefallen tun wollen: Senden Sie - mir die Definitionsdatei (ASCII-Datei) zu, damit ich sie anderen Benutzern - zur Verfgung stellen kann. Vermerken Sie dazu in der Datei bitte Ihren - Namen (fr Rckfragen) und die genaue Bezeichnung des Druckers, fr den die - Datei erstellt wurde. - -Findet der Treiber eine oder beide Dateien nicht in den oben genannten -Verzeichnissen, so gibt der Treiber den Fehlercode grInvalidMode (-10) zurck. -Je nachdem welche Dateien vorhanden sind k”nnen die Modi 13-15 ganz normal -angesprochen werden. - - - -9. Einstellen von Druck-Optionen - -Der Drucker untersttzt bei Ausgabe auf Drucker vom Typ DeskJet (in den Modi -16-31) Optionen zur Beeinflussung der Ausgabequalit„t. Bei Nadel- oder -Laserdruckern haben die hier besprochenen Einstellungen keine Auswirkung, die -entsprechenden Befehle werden ignoriert. Die Optionen werden ber den Treiber -durch einen "Miábrauch" der Funktion SetAllPalette verfgbar gemacht. Diese -Funktion ist speziell auf EGA-Karten bzw. VGA-Karten im 16-Farb Modus -zugeschnitten und hat bereits bei Super-VGA's im Modus mit 256 Farben keine -Bedeutung mehr, so daá die Verwendung zur šbergabe eines Kontrollblocks an den -Treiber nahe lag. - -šblicherweise wird eine Variable vom Typ PaletteType bergeben, deren -Deklaration wie folgt lautet: - - CONST - MaxColor = 15; - - TYPE - PaletteType = RECORD - Size : BYTE; - Colors : ARRAY [0..MaxColor] OF SHORTINT; - END; - -Size entspricht der Anzahl der Farben des Druckers, muá also in den Schwarzweiá- -Modi auf 2, in den Farbmodi des DeskJet dagegen auf 8 gesetzt werden. Im Array -Colors sind die ersten Size Bytes gltig und werden bei einem Aufruf vom -Grafik-Kernel an den Treiber weitergereicht. - -Die Bedeutung der Werte im Array Colors ergeben sich aus den folgenden Tabellen: - -M”gliche Ausdruck-Optionen beim DeskJet 500: - - Index Defaultwert Bedeutung - ----------------------------------------------------------------- - 0 Reserviert - 1 0 Ausgabequalit„t: - 0: Qualit„t wie am Drucker eingestellt - 1: Draft - 2: High - - -M”gliche Ausdruck-Optionen beim DeskJet 500C/550C: - - Index Defaultwert Bedeutung - ----------------------------------------------------------------- - 0 Reserviert - 1 0 Ausgabequalit„t: - 0: Qualit„t wie am Drucker eingestellt - 1: Draft - 2: High - 2 0 Shingling: - 0: Keines - 1: 50% Shingling (2 Druck-Durchg„nge) - 2: 25% Shingling (4 Druck-Durchg„nge) - 3 1 Depletion: - 0: Keine - 1: 25% - 2: 50% - 4-7 Reserviert - -Beim "Shingling" wird die Ausgabe einer Zeile in mehrere Durchg„nge aufgeteilt, -um der Farbe zwischenzeitlich eine M”glichkeit zum Antrocknen zu geben und so -eine saubere Schichtung der Farben zu gew„hrleisten. Der Defaultwert ist 0 (kein -Shingling), die Werte 1 bzw. 2 verlangsamen die Ausgabe, da mehr Durchg„nge -erforderlich sind. - -Beim "Depletion"-Verfahren wird nach einem (mir unbekannten - ich zitiere nur -das Handbuch) gleichnamigen Algorithmus ein Teil der Farb-Pixel entfernt um -Farbe zu sparen und die Qualit„t der Druckausgabe zu verbessern. Default ist -hier 1 (25% Depletion). Hinweis: Es werden keinesfalls die angegebene -Prozentzahl an Pixeln entfernt, es handelt sich um die Vorbesetzung einer -Variable im o.g. Algorithmus. - -Die Einstellung der Druck-Optionen erfolgt durch Deklaration einer Variablen -(oder typisierten Konstanten) vom Typ PaletteType, Zuweisung der Werte Aufruf -von SetAllPalette mit der deklarierten Variablen als Parameter. Werte die sich -nicht „ndern sollen (dazu geh”ren auch die mit "Reserviert" gekennzeichneten -Eintr„ge) sollten mit -1 belegt werden (siehe Compiler-Handbuch). - -ACHTUNG: Sie mssen diese Werte nicht neu einstellen - der Treiber verwendet -dann die unter "Defaultwert" stehenden Vorgaben. Diese Werte sind die -Standard-Werte des Druckers und haben normalerweise eine saubere Druck-Ausgabe -zur Folge. Fr spezielle Anwendungen oder kommerzielle Programme kann es jedoch -u.U. sinnvoll sein, die Ausgabe zu beeinflussen. - - - -10. Fehler im UNIT Graph - -10.1 Fehlercodes - -Durch einen Fehler im UNIT Graph werden die negativen Fehlercodes, die der -Treiber zurckgibt positiv an die Anwendung durchgereicht: Das Status-Feld des -Treibers, ber das die Fehlercodes rckgemeldet werden ist 1 Byte groá. Da die -Fehlercodes negative Werte sind, h„tte dieses Feld als SHORTINT deklariert -werden mssen. Die Entwickler haben dies aber bersehen und das Feld als BYTE -deklariert, was dazu fhrt, daá die Fehlercodes nicht vorzeichenrichtig -erweitert werden. Abhilfe schafft eine Abfrage wie in der folgenden Abbildung. -Unter Umst„nden kann GraphResult entsprechend berdefiniert werden. - - VAR - Result : INTEGER; - - BEGIN - { Grafik einschalten } - InitGraph (GraphDriver, GraphMode, ''); - - { Fehlercode auswerten. Durch den Typecast werden die - obersten 8 Bits abgeschnitten, durch die Zuweisung - an einen INTEGER wird vorzeichenrichtig erweitert. - } - Result := SHORTINT (GraphResult); - IF (Result <> 0) THEN BEGIN - Writeln (GraphErrorMsg (Result)); - Halt; - END; - .... - END; - - - -10.2 SetGraphMode - -Die Funktion SetGraphMode arbeitet fehlerhaft wenn Modusnummern gr”áer 10 -angegeben werden. Von der Verwendung dieser Funktion wird abgeraten. Verwenden -Sie stattdessen Aufrufe von CloseGraph und InitGraph. Siehe auch den folgenden -Abschnitt. - - - -10.3 RestoreCRTMode und SetGraphMode - -Die Funktionen arbeiten unter Borland-Pascal 7.0 im Protected-Mode nicht -korrekt, u.U. ist ein GP Fault die Folge. - - - -10.4 RegisterBGIDriver - -Manuell geladene (d.h. als .OBJ-File eingebundene oder aus einem Resource-File -geladene) Treiber mssen unter Borland-Pascal 7.0 im Protected-Mode auf eine -Adresse zu liegen kommen, die einen Offset von 0 hat. Ansonsten bricht das -Grafik-Kernel beim zweiten Aufruf von InitGraph u.U. das Programm mit einer -Fehlermeldung ab. - -Um sicherzustellen, daá der Treiber auf einer Adresse mit Offset 0 zu liegen -kommt, wenn er als .OBJ-Datei eingebunden wird, erstellen Sie bitte ein -separates Modul, in dem sich ausschlieálich der Treiber befindet. Exportieren -Sie die Adresse des Treibers und fhren Sie die Initialisierung der Grafik in -einem anderen Modul durch. - - - -11. Zusammenfassung - -Nachdem in den vorigen Abschnitten nach und nach immer mehr Details dargestellt -wurden, sollen diese Informationen hier nochmals kurz zusammengefaát und anhand -eines (diesmal vollst„ndigen) Beispiels in Turbo-Pascal demonstriert werden. -Weitere Beispiele (auch in C) sind im Paket enthalten. - - * Die Einbindung des Treibers geschieht mittels der Prozedur - InstallUserDriver, die die Nummer des Treibers zurckliefert. Diese Prozedur - muá vor InitGraph aufgerufen werden. - - * Die Abfrage von Fehlern muá ber den in Abschnitt 10 beschriebenen Umweg - erfolgen, falls die Nummer des Fehlers ausgewertet werden soll (z.B. bei - Aufruf von GraphErrorMsg zur Ausgabe einer Meldung). - - * Die Ausgabe der Grafik erfolgt beim Aufruf von ClearDevice sowie beim - abschliessenden CloseGraph. - - * Die Einstellung von Ausdruck-Optionen oder die Erkl„rungen zum Datei-Handle - k”nnen Sie fr den Anfang getrost vergessen. Der Ausdruck funktioniert - normalerweise auch ohne daá Sie diese Optionen neu einstellen. (Falls Sie - nicht ein sehr speziell konfiguriertes System haben. Aber dann wissen Sie ja - sowieso, was mit diesen Dingen gemeint ist.) - - -Komplettes Beispiel in Turbo-Pascal: - - VAR - GraphDriver, GraphMode : INTEGER; - Result : INTEGER; - - BEGIN - { Einbinden des Treibers } - GraphDriver := InstallUserDriver ('PRINTER', NIL); - IF (GraphDriver < 0) THEN BEGIN - { Fehlerbehandlung } - .... - END; - - { Modus setzen und Einschalten der Grafik } - GraphMode := 11; { Modus 11, LaserJet 300 DPI } - InitGraph (GraphDriver, GraphMode, ''); - { Fehler auswerten } - Result := SHORTINT (GraphResult); - IF (Result <> 0) THEN BEGIN - { Fehlerbehandlung } - Writeln (GraphErrorMsg (Result)); - Halt; - END; - - { Grafik-Operationen } - Line (0, 0, GetMaxX, GetMaxY); - .... - - { Grafik ausgeben } - ClearDevice; - - { Neue Grafik } - Line (0, 0, GetMaxX, GetMaxY); - .... - - { Grafik ausgeben und beenden } - CloseGraph; - END; - - - -12. Zus„tzliche Informationen - -Dieser Abschnitt enth„lt zus„tzliche Informationen, die u.U. von Nutzen sein -k”nnen. Weitere Hinweise entnehmen Sie bitte der Datei README.TXT. - - * Die Auswahl der Speicherm”glichkeit erfolgt in der Reihenfolge der damit - erzielbaren Geschwindigkeit: - - - Der schnellste Zugriff wird durch die Verwendung von DPMI-Speicher im - Protected-Mode erreicht. - - - Direkt danach folgt EMS-Speicher, wobei der Unterschied zu DPMI fast - vollst„ndig auf die zur Seitenumschaltung ben”tigte Zeit zurckzufhren - ist und sich je nach verwendetem EM-Manager unterscheiden kann. - - - Bei Verwendung von XMS wird kein Speicher eingeblendet, sondern die - Daten werden zwischen normalem und erweiterten Speicher hin- und - herkopiert, was zus„tzlich Zeit ben”tigt. - - - Die Verwendung einer tempor„ren Datei auf Platte ist umso langsamer, je - h”her die Aufl”sung ist (weil der interne Puffer des Treibers einen - immer kleineren Bereich der Zeichenfl„che umfaát). Vor allem bei den - hohen Aufl”sungen (ab 180 * 360 DPI) sollte die Verwendung von Platte - wenn m”glich vermieden werden. (Wobei sich dies nicht verallgemeinern - l„sst: Wird ein gutes Plattenpufferprogramm verwendet, ist u.U. auch in - den h”heren Aufl”sungen die Ausdruckzeit akzeptabel. Versuche in den - DOS-Boxen von OS/2 haben gezeigt, daá auch im Modus 19 mit 300 DPI noch - Ausdrucke m”glch sind, die ben”tigte Zeit betr„gt ca. 3-4 Minuten.) - - * Die tempor„re Datei bei Auslagerung auf Platte wird beim Aufruf von - InitGraph im aktuellen Verzeichnis angelegt. Soll diese Datei in einem - bestimmten Verzeichnis liegen, so ist vor Aufruf von InitGraph dieses - Verzeichnis zum aktuellen Verzeichnis zu machen. Sp„tere Wechsel des - Verzeichnisses haben keinen Einfluss mehr auf die Lage der tempor„ren Datei. - Die Auswertung einer Environment-Variable (wie z.B. TMP oder TEMP) erschien - mir problematisch, da diese Variable oft auf eine RAM-Disk mit beschr„nkter - Kapazit„t zeigt. Durch o.g. Verfahren ist es jedoch m”glich, das Verzeichnis - festzulegen, in das die tempor„re Datei gelegt wird. - - * Da Rckmeldungen des Treibers nach durchgefhrten Operationen durch das - Borland Grafik-Modul gr”átenteils nicht ausgewertet werden, ist die Rckgabe - eines Fehlercodes bei nicht eingeschaltetem Drucker nicht m”glich. Sie - sollten daher vor Beginn der Grafik-Ausgabe den Drucker-Status prfen. - PRINTER.BGI bricht bei Druckerfehlern (also auch bei ausgeschaltetem - Drucker) den Ausdruck sofort ab. - - * CloseGraph ruft automatisch immer RestoreCRTMode auf, was zur Folge hat, daá - der Text-Bildschirm gel”scht wird. Sie mssen daher eventuelle Inhalte - retten und nach CloseGraph wiederherstellen (oder kurzfristig die - Modus-Umschaltung verhindern, indem Sie einen eigenen Handler fr den - Interrupt 10h installieren). - - * Fr die Verwendung von EMS wird eine Untersttzung der EMS 3.2 kompatiblen - Funktionen vorausgesetzt (dies wird von allen mir bekannten EMS-Treibern - erfllt). Fr den XMM (Etended emory anager) erwartet PRINTER.BGI - zumindest eine Versionnummer von 2.0, das DPMI-Interface muá Version 0.9 - oder neuer entsprechen. - - * Bei Auslagerung auf Platte berprft der Treiber bei der Initialisierung den - zur Verfgung stehenden Platz auf dem aktuellen Laufwerk. Falls eine - Auslagerung in EMS oder XMS nicht m”glich ist, muá also zum Zeitpunkt des - Aufrufs von InitGraph gengend Platz auf der Platte vorhanden sein. - - * Wird das Programm vor dem Aufruf von CloseGraph unterbrochen, erh„lt der - Treiber keine Gelegenheit mehr, das von ihm verwendete Speichermedium - "aufzur„umen". Dies kann zum Beispiel beim Debuggen eines Programms - passieren, wenn das Programm nicht bis zu Ende ausgefhrt wird. Die Folge - davon sind belegte EMS-Seiten, belegter XMS-Speicher oder nicht gel”schte - tempor„re Dateien auf der Festplatte. Vor allem letztere sind „rgerlich, - weil sie beim Neustart des Systems nicht gel”scht werden und ob ihrer Gr”áe - recht schnell die Platte fllen. Diese Dateien werden vom Treiber als - versteckte (Attribut Hidden) Dateien im aktuellen Verzeichnis angelegt. Sie - sollten also nach einem Programm-Abbruch prfen, ob solche Dateien vorhanden - sind (erkennbar an Namen wie AACGHFKL) und diese - falls vorhanden - - l”schen. - - * Die Aufl”sungen mit 240 * 72 DPI und 240 * 216 DPI funktionieren nicht auf - 24-Nadeldruckern! Auf den ersten Blick scheinen auch die 24-Nadler ber - diese Modi zu verfgen. Ein Test zeigt jedoch, daá ber den unteren - Seitenrand hinausgedruckt wird. Dies liegt daran, daá 24-Nadel Drucker diese - Modi simulieren, indem nur jede dritte Nadel verwendet wird. Da der - Nadel-Abstand bei 1/180 Zoll liegt ergibt sich bei Verwendung jeder dritten - Nadel eine vertikale Aufl”sung von 60 DPI (im Gegensatz zu 72 DPI bei den - 8-Nadlern). Aufgrund dieser niedrigeren Aufl”sung beansprucht das Bild in - vertikaler Richtung mehr Platz, was zum šberschreiten des unteren Bildrandes - fhrt. - - * Der Modus 360 * 360 DPI wird nicht von allen Nadeldruckern untersttzt. - Zus„tzlich ist dieser Modus von unterschiedlichen Herstellern auch - unterschiedlich implementiert worden. Falls Ihr Drucker die Demo-Programme - in diesem Modus fehlerhaft ausdruckt, prfen Sie bitte erst anhand Ihres - Druckerhandbuchs, ob Ihr Drucker einen Befehl zum Einstellen des - Zeilenvorschubs in Einheiten von 1/360 Zoll kennt. Wenn dies nicht der Fall - ist, beherrscht Ihr Drucker diesen Modus nicht. Ist es der Fall, vergleichen - Sie den Befehl bitte mit den folgenden beiden: - - Hersteller Steuersequenz - ----------------------------- - EPSON ESC '+' - NEC FS '3' - - Verwenden Sie dann den entsprechenden Modus des Treibers (NEC 360 * 360 oder - EPSON 360 * 360). - - Sollte Ihr Drucker einen v”llig anderen Befehl zur Einstellung verwenden, - mssen Sie eine Drucker-Definitionsdatei fr diesen Modus erzeugen. Lesen - Sie dazu bitte den entsprechenden Abschnitt. - - * In der C-Version existiert eine undokumentierte Variable namens _BGI_auto, - die dazu verwendet werden kann, das L”schen des Bildschirms bei initgraph() - und closegraph() zu verhindern. Diese Variable war im ursprnglichen - BGI-Konzept dafr vorgesehen war, das L”schen des Bildschirms zu - unterdrcken, indem sie vom Treiber (PRINTER.BGI) auf einen "magischen" Wert - gesetzt wird. Aufgrund eines der vielen Fehler im Grafik-Kernel funktioniert - dies jedoch nicht, da das L”schen des Bildschirms vor dem Aufruf des - Treibers geschieht, so daá ein sp„teres Setzen dieser Variable wirkungslos - ist. In der "C"-Version des Grafik-Kernels ist diese Variable jedoch - ”ffentlich zug„nglich und kann so vor dem Einschalten des Grafik-Modus vom - Programm gesetzt werden. Es gibt keine Garantie dafr, daá dieses Vorgehen - mit sp„teren Versionen des Grafik-Kernels kompatibel ist (es ist jedoch - anzunehmen, daá sich an der GRAPHICS Library nicht mehr viel „ndern wird). - Die Variable wird deklariert als - - extern char _BGI_auto; - - Nach der Zuweisung - - _BGI_auto = 0xA5; - - l”scht das Grafik-Kernel den Bildschirm nicht mehr. Diese Variable existiert - auch in der Pascal-Version ist allerdings dort nicht zug„nglich, da der Name - nur innerhalb von Graph bekannt ist. - - * Wenn sowohl der Treiber als auch das Programm EMS verwenden kann es unter - Umst„nden zu Problemen kommen. Das ist vor allem dann der Fall, wenn das - Programm Overlays ins EMS auslagert. Die einfachste M”glichkeit, diese - Schwierigkeiten zu umgehen ist es, einem der beiden die Benutzung des EMS zu - untersagen. Das kann im Fall der Overlays durch Streichen des Aufrufs von - OvrInitEMS geschehen. Soll der Treiber kein EMS verwenden, so ist vor Aufruf - von InitGraph s„mtlicher EMS-Speicher zu belegen. - - * Beim Fllen von komplexen Mustern mit FloodFill kann es u.U. notwendig sein, - den Puffer, den Graph dafr bereitstellt, mit der Prozedur SetGraphBufSize - *vor* dem Aufruf von InitGraph etwas zu vergroessern (Default sind 4KB). - - - -13. Bei Problemen und Fehlern - -Da sich leider in der Vergangenheit gezeigt hat, daá die wenigsten -Schwierigkeiten tats„chlich am Treiber selber liegen, m”chte ich Sie bitten die -folgenden Punkte zu beherzigen: - - * Lesen Sie die komplette Anleitung sowie alle README-Dateien auf der Diskette - nochmals durch. Einige g„ngigere Fehlerquellen sind dort beschrieben. - - * Falls der Treiber bei Ihnen berhaupt nicht funktionieren sollte berprfen - Sie bitte anhand der beigelegten Beispielprogramme ob das Nicht- - Funktionieren an Ihrem Programm oder am Treiber liegt. - - * Versuchen Sie herauszufinden, ob der Fehler evtl. an Ihrer Hardware liegt, - indem Sie Ihr Programm auf einem anderen Rechner testen. - - * Versuchen Sie, herauszufinden, ob eine spezielle Rechnerkonfiguration fr - den Fehler verantwortlich ist. Entfernen Sie dazu Ger„tetreiber aus den - Konfigurationsdateien CONFIG.SYS und AUTOEXEC.BAT. - - * Falls Sie tats„chlich vermuten, einen Fehler im Treiber gefunden zu haben, - versuchen Sie bitte, den Fehler einzukreisen und ein m”glichst kleines - Programm herzustellen, bei dem der Fehler auftritt. Entfernen Sie dazu allen - Code, der nicht unbedingt notwendig fr die Reproduktion des Fehlers ist. - Bitte senden Sie mir dieses Programm zusammen mit einer detailierten - Fehlerbeschreibung zu. - - - -14. Sonstiges - -Bei mir sind weitere BGI-Treiber fr Plotter, fr Super-VGA's und zur Ausgabe -von PCX-Dateien zu denselben Bedingungen erh„ltlich. Die aktuellen Versionen -erhalten Sie per Modem unter der Nummer 07071/440588, 8N1, V32bis. - -Falls Sie Interesse an weiteren Treibern, weiteren untersttzten Druckern usw. -haben, setzen Sie sich bitte mit mir in Verbindung. Speziell Untersttzung von -weiteren Druckern fr den Druckertreiber werden von mir blicherweise zu einem -sehr gnstigen Festpreis durchgefhrt. - - - -15. Dateien im Paket - -Das vorliegende Archiv muá folgende Dateien enthalten: - - -Im Verzeichnis PRINTER - PRINTER.BGI Der BGI-Treiber. - PRINTER.BP7 BGI-Treiber fr Borland-Pascal 7.0. - - -Im Verzeichnis PDFCOMP - PDFCOMP.EXE Der Definitions-Compiler. - PDFCOMP.DOC Die Dokumentation dazu. - *.DEF Diverse Definitionsdateien. - - -Im Verzeichnis PIXFONT - PIXFONT.PAS Modul zur Ausgabe von Pixelfonts beliebiger - Gr”áe. - PIXFONT.DOC Die Dokumentation dazu. - GETFONT.EXE Programm zur Abspeicherung der VGA-Fonts - (in den Gr”áen 8x14 und 8x16) als Datei. - GETFONT.PAS Quelltext dazu. - *.FNT Einige Pixelfonts zur Verwendung mit dem - Modul PixFont. - FONTDEMO.EXE Beispielprogramm zu Anwendung von PIXFONT. - FONTDEMO.PAS Quellcode zu PIXFONT.EXE. - FONTDEMO.DOC Dokumentation zu FONTDEMO. - - -Im Verzeichnis C - DEMO.EXE Kurzes Demo-Programm zur Verwendung des - Treibers. - DEMO.C Der Quellcode dazu. - - -Im Verzeichnis PASCAL - DEMO.EXE Kurzes Demo-Programm zur Verwendung des - Treibers. - DEMO.PAS Der Quellcode dazu. - DEMO2.EXE Ausfhrliches Demo-Programm. - DEMO2.PAS Quelltext zu DEMO.PAS. - - -Im Verzeichnis BGILIB - MAKELIB.BAT Batch-Datei von Herrn Jung-Merkelbach zur - Erzeugung zweier Libraries fr den C-Compiler, - die die kompletten Fonts und Treiber als OBJ- - Dateien enthalten. - diff --git a/thirdparty/grx249/addons/print/printest.c b/thirdparty/grx249/addons/print/printest.c deleted file mode 100644 index fd76f3a..0000000 --- a/thirdparty/grx249/addons/print/printest.c +++ /dev/null @@ -1,78 +0,0 @@ -#include -#include -#include -#include "grxprint.h" - - -static void displaytext (GrFont *font,char *text,int len); - - -int GRXMain (int argc , char * argv []) - { - int i, j, rc, mc, MaxX, MaxY; - unsigned AspX, AspY; - double Asp, r; - char * text = "Printing example from GRX"; - GrFont * Fnt = GrBuildConvertedFont( - &GrDefaultFont, - (GR_FONTCVT_SKIPCHARS | GR_FONTCVT_RESIZE), - 36, - 72, - ' ', - 'z' - ); - -/* rc = GrPrintSetMode (LQ_180x180); mc = 2; */ -/* rc = GrPrintSetMode (HPLJ_300x300); mc = 2; */ -/* rc = GrPrintSetMode (HPLJ_1200x1200); mc = 2; */ -/* rc = GrPrintSetMode (HPLJ_IV_600x600); mc = 2; */ -/* rc = GrPrintSetMode (HPLJ_300x300_NC); mc = 2; */ - rc = GrPrintSetMode (HPDJ500C_300x300x8_B); mc = 8; - printf ("GrPrintSetMode : rc=%d\n",rc); - - MaxX = GrMaxX (); - MaxY = GrMaxY (); - GrPrintGetAspectRatio (&AspX,&AspY); - Asp = ((double) AspX)/AspY; - printf ("Size : (%d %d)\n",MaxX,MaxY); - - GrBox (0,0,MaxX,MaxY,mc-1); /* Draw box around page */ - GrLine (0,MaxY,MaxX,MaxY-30,mc-1); - r = (int) (MaxY/20); - GrEllipse ((int) (r*Asp), (int) r, (int) (r*Asp), (int) r, mc-1); - displaytext (Fnt,text,strlen(text)); - - if (mc>2) for (i=0; i<8; i++) - { - int x0 = 50*i; - GrFilledBox (x0,1,x0+30,31,i); - } - - for (i=1; i<14; i++) - { - r = (double) (MaxY*(0.45-0.03*i)); - for (j=0; j<(mc>2 ? 3 : 1); j++) - { - GrEllipse (MaxX/2-100,MaxY/2, - (int) (r*Asp), (int) r, i>=mc ? mc-1 : i); - r--; - } - } - GrPrintToFile ("test.pcl"); -/* GrDoPrinting (); */ - return 0; - } - - -void displaytext (GrFont *font,char *text,int len) -{ - GrTextOption opt; - memset(&opt,0,sizeof(opt)); - opt.txo_font = font; - opt.txo_xalign = GR_ALIGN_LEFT; - opt.txo_yalign = GR_ALIGN_TOP; - opt.txo_direct = GR_TEXT_RIGHT; - opt.txo_fgcolor.v = 1; - opt.txo_bgcolor.v = 0; - GrDrawString(text,len,100,100,&opt); -} diff --git a/thirdparty/grx249/addons/print/prndata.c b/thirdparty/grx249/addons/print/prndata.c deleted file mode 100644 index 32c8425..0000000 --- a/thirdparty/grx249/addons/print/prndata.c +++ /dev/null @@ -1,1655 +0,0 @@ -/*****************************************************************************/ -/* */ -/* PRNDATA.CPP */ -/* */ -/* (C) 1994 by Ullrich von Bassewitz */ -/* Zwehrenbuehlstrasse 33 */ -/* 72070 Tuebingen */ -/* */ -/* E-Mail: uz@ibb.schwaben.de */ -/* */ -/*****************************************************************************/ - -/* Revision 1.4 1998/02/05 Andris Pavenis */ -/* Modified for use under DJGPP */ -/* */ -/* (C) 1994 Ullrich von Bassewitz */ -/* */ -/* $Id: prndata.cpp 1.3 1995/04/28 16:20:53 Uz Exp $ */ -/* */ -/* $Log: prndata.cpp $ */ -/* Revision 1.3 1995/04/28 16:20:53 Uz */ -/* Umstellung auf PCX-Treiber. */ -/* */ -/* Revision 1.2 95/04/22 17:31:52 Uz */ -/* Neuer Modus 41 fuer DeskJet 1200 C. */ -/* */ -/* Revision 1.1 94/09/08 09:33:42 Uz */ -/* Initial revision */ -/* */ - - -#include "grxprn00.h" - -/*************** Original values from printer BGI driver */ -/*#define NP_A4_SIZEX 11000*/ -/*#define NP_A4_SIZEY 8000*/ -/*#define LJ_A4_SIZEX 10334*/ -/*#define LJ_A4_SIZEY 7800*/ -/*#define NP_A3_SIZEX 15600*/ -/*#define NP_A3_SIZEY 11400*/ -/*********************************************************/ -#define NP_A4_SIZEX 11000 -#define NP_A4_SIZEY 8000 -#define LJ_A4_SIZEX 10334 -#define LJ_A4_SIZEY 7760 -#define NP_A3_SIZEX 15600 -#define NP_A3_SIZEY 11400 -/*********************************************************/ - -/****************************************************************************/ -/* 8-Nadel Modus 240 * 72 DPI */ -/****************************************************************************/ - -static struct EpsonDST EPSON240x72 = { - - /* DPI in X-und Y-Richtung*/ - { 72, 240, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x10""EPSON 240x72 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 1, 1, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x04\x1B\x4A\x18\r", /* ESC 'J' 24 cr*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - NULL, /* Nicht vorhanden*/ - - /* Einschalten der Grafik*/ - "\x05\x1B\x40\x1B\x4F\r", /* ESC '@' ESC 'O' \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x03\x80\x07", /* ESC '*' 03 1920*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ - -}; - - - -/****************************************************************************/ -/* 8-Nadel Modus 240 * 216 DPI */ -/****************************************************************************/ - -static struct EpsonDST EPSON240x216 = { - - /* DPI in X-und Y-Richtung*/ - { 216, 240, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x11""EPSON 240x216 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 1, 3, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x04\x1B\x4A\x16\r", /* ESC 'J' 22 cr*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - "\x04\x1B\x4A\x01\r", /* ESC 'J' 1 cr*/ - - /* Einschalten der Grafik*/ - "\x05\x1B\x40\x1B\x4F\r", /* ESC '@' ESC 'O' \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x03\x80\x07", /* ESC '*' 03 1920*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ - -}; - - - -/****************************************************************************/ -/* 24-Nadel Modus 180 * 180 DPI */ -/****************************************************************************/ - -static struct EpsonDST EPSON180x180 = { - - /* DPI in X-und Y-Richtung*/ - { 180, 180, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x11""EPSON 180x180 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 1, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x04\x1B\x4A\x18\r", /* ESC 'J' 24 cr*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - NULL, /* Nicht vorhanden*/ - - /* Einschalten der Grafik*/ - "\x05\x1B\x40\x1B\x4F\r", /* ESC '@' ESC 'O' \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x27\xA0\x05", /* ESC '*' 39 1440*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ - -}; - - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 180 DPI */ -/****************************************************************************/ - -static struct EpsonDST EPSON360x180 = { - - /* DPI in X-und Y-Richtung*/ - { 180, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x11""EPSON 360x180 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 1, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x04\x1B\x4A\x18\r", /* ESC 'J' 24 cr*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - NULL, /* Nicht vorhanden*/ - - /* Einschalten der Grafik*/ - "\x05\x1B\x40\x1B\x4F\r", /* ESC '@' ESC 'O' \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x40\x0B", /* ESC '*' 40 2880*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 360 DPI, EPSON */ -/****************************************************************************/ - -static struct EpsonDST EPSON360x360 = { - - /* DPI in X-und Y-Richtung*/ - { 360, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x11""EPSON 360x360 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 2, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x05\x1B\x2B\x2F\x0D\x0A", /* ESC '+' 47 cr lf*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - "\x05\x1B\x2B\x01\x0D\x0A", /* ESC '+' 01 cr lf*/ - - /* Einschalten der Grafik*/ - "\x05\x1B\x40\x1B\x4F\r", /* ESC '@' ESC 'O' \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x40\x0B", /* ESC '*' 40 2880*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 360 DPI, NEC P6 */ -/****************************************************************************/ - -static struct EpsonDST NEC360x360 = { - - /* DPI in X-und Y-Richtung*/ - { 360, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x12""NEC P6 360x360 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 2, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x05\x1C\x33\x2F\x0D\x0A", /* FS '3' 47 cr lf*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - "\x05\x1C\x33\x01\x0D\x0A", /* FS '3' 01 cr lf*/ - - /* Einschalten der Grafik*/ - "\x05\x1B\x40\x1B\x4F\r", /* ESC '@' ESC 'O' \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x40\x0B", /* ESC '*' 40 2880*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - - -/****************************************************************************/ -/* IBM Proprinter X24, 180 * 180 DPI */ -/****************************************************************************/ - -static struct EpsonDST IBMPro180x180 = { - - /* DPI in X-und Y-Richtung*/ - { 180, 180, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x1A""IBM Proprinter 180x180 DPI", - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 1, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x05\x1B\x33\x18\r\n", /* ESC '3' 24 cr lf*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - NULL, /* Nicht vorhanden*/ - - /* Einschalten der Grafik*/ - "\x0C\x1B\x4F\x1B\x5B\x5C\x04\x00\x00\x00\x00\xB4\r", - - /* Ausschalten der Grafik*/ - "\x0C\x1B\x32\x1B\x5B\x5C\x04\x00\x00\x00\x00\xD8\f", - - /* Code vor den Grafik-Bytes*/ - "\x06\x1B\x5B\x67\xE1\x10\x0B", /* ESC '[' 'g' 4321 11*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ - -}; - - - -/****************************************************************************/ -/* IBM Proprinter X24, 360 * 180 DPI */ -/****************************************************************************/ - -static struct EpsonDST IBMPro360x180 = { - - /* DPI in X-und Y-Richtung*/ - { 180, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x1A""IBM Proprinter 360x180 DPI", - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 1, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x05\x1B\x33\x18\r\n", /* ESC '3' 24 cr lf*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - NULL, /* Nicht vorhanden*/ - - /* Einschalten der Grafik*/ - "\x0C\x1B\x4F\x1B\x5B\x5C\x04\x00\x00\x00\x00\xB4\r", - - /* Ausschalten der Grafik*/ - "\x0C\x1B\x32\x1B\x5B\x5C\x04\x00\x00\x00\x00\xD8\f", - - /* Code vor den Grafik-Bytes*/ - "\x06\x1B\x5B\x67\xC1\x21\x0C", /* ESC '[' 'g' 8641 12*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ - -}; - - - -/****************************************************************************/ -/* 24-Nadel Modus 180 * 180 DPI EPSON Farbe */ -/****************************************************************************/ - -static struct EpsonDST EPSON180x180C = { - - /* DPI in X-und Y-Richtung*/ - { 180, 180, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 9, 4, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x18""EPSON 180x180 DPI Color", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 1, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x04\x1B\x4A\x18\r", /* ESC 'J' 24 cr*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - NULL, /* Nicht vorhanden*/ - - /* Einschalten der Grafik*/ - "\x05\x1B\x40\x1B\x4F\r", /* ESC '@' ESC 'O' \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x27\xA0\x05", /* ESC '*' 39 1440*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ - -}; - - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 180 DPI EPSON Farbe */ -/****************************************************************************/ - -static struct EpsonDST EPSON360x180C = { - - /* DPI in X-und Y-Richtung*/ - { 180, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 9, 4, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x17""EPSON 360x180 DPI Color", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 1, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x04\x1B\x4A\x18\r", /* ESC 'J' 24 cr*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - NULL, /* Nicht vorhanden*/ - - /* Einschalten der Grafik*/ - "\x05\x1B\x40\x1B\x4F\r", /* ESC '@' ESC 'O' \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x40\x0B", /* ESC '*' 40 2880*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 360 DPI, EPSON Farbe */ -/****************************************************************************/ - -static struct EpsonDST EPSON360x360C = { - - /* DPI in X-und Y-Richtung*/ - { 360, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 9, 4, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x17""EPSON 360x360 DPI Color", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 2, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x05\x1B\x2B\x2F\x0D\x0A", /* ESC '+' 47 cr lf*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - "\x05\x1B\x2B\x01\x0D\x0A", /* ESC '+' 01 cr lf*/ - - /* Einschalten der Grafik*/ - "\x05\x1B\x40\x1B\x4F\r", /* ESC '@' ESC 'O' \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x40\x0B", /* ESC '*' 40 2880*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 360 DPI, NEC P6 Farbe */ -/****************************************************************************/ - -static struct EpsonDST NEC360x360C = { - - /* DPI in X-und Y-Richtung*/ - { 360, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 9, 4, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x18""NEC P6 360x360 DPI Color", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 2, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x05\x1C\x33\x2F\x0D\x0A", /* FS '3' 47 cr lf*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - "\x05\x1C\x33\x01\x0D\x0A", /* FS '3' 01 cr lf*/ - - /* Einschalten der Grafik*/ - "\x05\x1B\x40\x1B\x4F\r", /* ESC '@' ESC 'O' \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x40\x0B", /* ESC '*' 40 2880*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - - -/****************************************************************************/ -/* HP-Laserdrucker 75*75 DPI */ -/****************************************************************************/ - -static struct LJDST HPLJ75 = { - - /* DPI in X-und Y-Richtung*/ - { 75, 75, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfDoCompression, - - /* Name des Modus*/ - "\x0E""HPLJ 75x75 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Festlegen der Grafik*/ - "\x1B*t75R" /* ESC * t 75 R*/ - -}; - - - -/****************************************************************************/ -/* HP-Laserdrucker 100*100 DPI */ -/****************************************************************************/ - -static struct LJDST HPLJ100 = { - - /* DPI in X-und Y-Richtung*/ - { 100, 100, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfDoCompression, - - /* Name des Modus*/ - "\x10""HPLJ 100x100 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Festlegen der Grafik*/ - "\x1B*t100R" /* ESC * t 100 R*/ - -}; - - - -/****************************************************************************/ -/* HP-Laserdrucker 150*150 DPI */ -/****************************************************************************/ - -static struct LJDST HPLJ150 = { - - /* DPI in X-und Y-Richtung*/ - { 150, 150, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfDoCompression, - - /* Name des Modus*/ - "\x10""HPLJ 150x150 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Festlegen der Grafik*/ - "\x1B*t150R" /* ESC * t 150 R*/ - -}; - - - -/****************************************************************************/ -/* HP-Laserdrucker 300*300 DPI */ -/****************************************************************************/ - -static struct LJDST HPLJ300 = { - - /* DPI in X-und Y-Richtung*/ - { 300, 300, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfDoCompression, - - /* Name des Modus*/ - "\x10""HPLJ 300x300 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Festlegen der Grafik*/ - "\x1B*t300R" /* ESC * t 300 R*/ - -}; - - - -/****************************************************************************/ -/* HP-Laserdrucker 75*75 DPI ohne Kompression */ -/****************************************************************************/ - -static struct LJDST HPLJ75O = { - - /* DPI in X-und Y-Richtung*/ - { 75, 75, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - 0, - - /* Name des Modus*/ - "\x0E""HPLJ 75x75 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Festlegen der Grafik*/ - "\x1B*t75R" /* ESC * t 75 R*/ - -}; - - - -/****************************************************************************/ -/* HP-Laserdrucker 100*100 DPI ohne Kompression */ -/****************************************************************************/ - -static struct LJDST HPLJ100O = { - - /* DPI in X-und Y-Richtung*/ - { 100, 100, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - 0, - - /* Name des Modus*/ - "\x10""HPLJ 100x100 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Festlegen der Grafik*/ - "\x1B*t100R" /* ESC * t 100 R*/ - -}; - - - -/****************************************************************************/ -/* HP-Laserdrucker 150*150 DPI ohne Kompression */ -/****************************************************************************/ - -static struct LJDST HPLJ150O = { - - /* DPI in X-und Y-Richtung*/ - { 150, 150, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - 0, - - /* Name des Modus*/ - "\x10""HPLJ 150x150 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Festlegen der Grafik*/ - "\x1B*t150R" /* ESC * t 150 R*/ - -}; - - - -/****************************************************************************/ -/* HP-Laserdrucker 300*300 DPI ohne Kompression */ -/****************************************************************************/ - -static struct LJDST HPLJ300O = { - - /* DPI in X-und Y-Richtung*/ - { 300, 300, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - 0, - - /* Name des Modus*/ - "\x10""HPLJ 300x300 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Festlegen der Grafik*/ - "\x1B*t300R" /* ESC * t 300 R*/ - -}; - - - -/****************************************************************************/ -/* HP-Laserdrucker 600*600 DPI */ -/****************************************************************************/ - -static struct LJDST HPLJ600 = { - - /* DPI in X-und Y-Richtung*/ - { 600, 600, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfDoCompression, - - /* Name des Modus*/ - "\x10""HPLJ 600x600 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Festlegen der Grafik*/ - "\x1B*t600R" /* ESC * t 300 R*/ - -}; - - - -/****************************************************************************/ -/* 75*75 DPI HP-DJ, Farbe */ -/****************************************************************************/ - -static struct LJDST HPDJ75 = { - - /* DPI in X-und Y-Richtung*/ - { 75, 75, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 8, 3, - - /* Flags*/ - pfDoCompression, - - /* Name des Modus*/ - "\x0F""HPDJ500C 75 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Einschalten der Grafik*/ - "\x1B*t75R" /* ESC * t 75 R*/ - -}; - - -/****************************************************************************/ -/* 100*100 DPI HP-DJ, Farbe */ -/****************************************************************************/ - -static struct LJDST HPDJ100 = { - - /* DPI in X-und Y-Richtung*/ - { 100, 100, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 8, 3, - - /* Flags*/ - pfDoCompression, - - /* Name des Modus*/ - "\x10""HPDJ500C 100 DPI", /* Name des Modus*/ - - /* Druckeroutine */ - LaserPrint }, - - /* Einschalten der Grafik*/ - "\x1B*t100R" /* ESC * t 100 R*/ - -}; - - -/****************************************************************************/ -/* 150*150 DPI HP-DJ, Farbe */ -/****************************************************************************/ - -static struct LJDST HPDJ150 = { - - /* DPI in X-und Y-Richtung*/ - { 150, 150, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 8, 3, - - /* Flags*/ - pfDoCompression, - - /* Name des Modus*/ - "\x10""HPDJ500C 150 DPI", /* Name des Modus*/ - - /* Druckeroutine */ - LaserPrint }, - - /* Einschalten der Grafik*/ - "\x1B*t150R" /* ESC * t 150 R*/ - -}; - - -/****************************************************************************/ -/* 300*300 DPI HP-DJ, Farbe */ -/****************************************************************************/ - -static struct LJDST HPDJ300 = { - - /* DPI in X-und Y-Richtung*/ - { 300, 300, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 8, 3, - - /* Flags*/ - pfDoCompression, - - /* Name des Modus*/ - "\x10""HPDJ500C 300 DPI", /* Name des Modus*/ - - /* Druckeroutine */ - LaserPrint }, - - /* Einschalten der Grafik*/ - "\x1B*t300R" /* ESC * t 300 R*/ - -}; - - -/****************************************************************************/ -/* 75*75 DPI HP-DJ, Farbe, Schwarzabtrennung */ -/****************************************************************************/ - -static struct LJDST HPDJ75S = { - - /* DPI in X-und Y-Richtung*/ - { 75, 75, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 8, 3, - - /* Flags*/ - pfDoCompression | pfSeparateBlack, - - /* Name des Modus*/ - "\x0F""HPDJ500C 75 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Einschalten der Grafik*/ - "\x1B*t75R" /* ESC * t 75 R*/ - -}; - - -/****************************************************************************/ -/* 100*100 DPI HP-DJ, Farbe, Schwarzabtrennung */ -/****************************************************************************/ - -static struct LJDST HPDJ100S = { - - /* DPI in X-und Y-Richtung*/ - { 100, 100, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 8, 3, - - /* Flags*/ - pfDoCompression | pfSeparateBlack, - - /* Name des Modus*/ - "\x10""HPDJ500C 100 DPI", /* Name des Modus*/ - - /* Druckeroutine */ - LaserPrint }, - - /* Einschalten der Grafik*/ - "\x1B*t100R" /* ESC * t 100 R*/ - -}; - - -/****************************************************************************/ -/* 150*150 DPI HP-DJ, Farbe, Schwarabtrennung */ -/****************************************************************************/ - -static struct LJDST HPDJ150S = { - - /* DPI in X-und Y-Richtung*/ - { 150, 150, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 8, 3, - - /* Flags*/ - pfDoCompression | pfSeparateBlack, - - /* Name des Modus*/ - "\x10""HPDJ500C 150 DPI", /* Name des Modus*/ - - /* Druckeroutine */ - LaserPrint }, - - /* Einschalten der Grafik*/ - "\x1B*t150R" /* ESC * t 150 R*/ - -}; - - -/****************************************************************************/ -/* 300*300 DPI HP-DJ, Farbe, Schwarzabtrennung */ -/****************************************************************************/ - -static struct LJDST HPDJ300S = { - - /* DPI in X-und Y-Richtung*/ - { 300, 300, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 8, 3, - - /* Flags*/ - pfDoCompression | pfSeparateBlack, - - /* Name des Modus*/ - "\x10""HPDJ500C 300 DPI", /* Name des Modus*/ - - /* Druckeroutine */ - LaserPrint }, - - /* Einschalten der Grafik*/ - "\x1B*t300R" /* ESC * t 300 R*/ - -}; - - -/****************************************************************************/ -/* 24-Nadel Modus 180 * 180 DPI, DIN A3 */ -/****************************************************************************/ - -/* Achtung: Die Anzahl der Pixel in X- sowie Y-Richtung muss durch 8 teilbar*/ -/* sein. Aus diesem Grund sind beim Druckerstring vor den Grafikbytes 2048*/ -/* Bytes anstelle (der sich aus Aufloesung/Blattgroesse ergebenden) 2052*/ -/* eingetragen.*/ - -static struct EpsonDST EPSON180x180_A3 = { - - /* DPI in X-und Y-Richtung*/ - { 180, 180, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x14""EPSON 180x180 DPI A3", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 1, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x04\x1B\x4A\x18\r", /* ESC 'J' 24 cr*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - NULL, /* Nicht vorhanden*/ - - /* Einschalten der Grafik*/ - "\x09\x1B\x40\x1B\x4F\x1B\x43\x00\x10\r", /* ESC '@' ESC 'O' ESC 'C' 0 16 \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x27\x00\x08", /* ESC '*' 39 2048*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ - -}; - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 180 DPI, DIN A3 */ -/****************************************************************************/ - -static struct EpsonDST EPSON360x180_A3 = { - - /* DPI in X-und Y-Richtung*/ - { 180, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x14""EPSON 360x180 DPI A3", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 1, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x04\x1B\x4A\x18\r", /* ESC 'J' 24 cr*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - NULL, /* Nicht vorhanden*/ - - /* Einschalten der Grafik*/ - "\x09\x1B\x40\x1B\x4F\x1B\x43\x00\x10\r", /* ESC '@' ESC 'O' ESC 'C' 0 16 \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x08\x10", /* ESC '*' 40 4104*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 360 DPI, EPSON, DIN A3 */ -/****************************************************************************/ - -static struct EpsonDST EPSON360x360_A3 = { - - /* DPI in X-und Y-Richtung*/ - { 360, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x14""EPSON 360x360 DPI A3", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 2, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x05\x1B\x2B\x2F\x0D\x0A", /* ESC '+' 47 cr lf*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - "\x05\x1B\x2B\x01\x0D\x0A", /* ESC '+' 01 cr lf*/ - - /* Einschalten der Grafik*/ - "\x09\x1B\x40\x1B\x4F\x1B\x43\x00\x10\r", /* ESC '@' ESC 'O' ESC 'C' 0 16 \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x08\x10", /* ESC '*' 40 4104*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 360 DPI, NEC P7, DIN A3 */ -/****************************************************************************/ - -static struct EpsonDST NEC360x360_A3 = { - - /* DPI in X-und Y-Richtung*/ - { 360, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x15""NEC P7 360x360 DPI A3", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 2, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x05\x1C\x33\x2F\x0D\x0A", /* FS '3' 47 cr lf*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - "\x05\x1C\x33\x01\x0D\x0A", /* FS '3' 01 cr lf*/ - - /* Einschalten der Grafik*/ - "\x09\x1B\x40\x1B\x4F\x1B\x43\x00\x10\r", /* ESC '@' ESC 'O' ESC 'C' 0 16 \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x08\x10", /* ESC '*' 40 4104*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - - -/****************************************************************************/ -/* 24-Nadel Modus 180 * 180 DPI, DIN A3, Farbe */ -/****************************************************************************/ - -/* Achtung: Die Anzahl der Pixel in X- sowie Y-Richtung muss durch 8 teilbar */ -/* sein. Aus diesem Grund sind beim Druckerstring vor den Grafikbytes 2048 */ -/* Bytes anstelle (der sich aus Aufloesung/Blattgroesse ergebenden) 2052 */ -/* eingetragen. */ - -static struct EpsonDST EPSON180x180C_A3 = { - - /* DPI in X-und Y-Richtung*/ - { 180, 180, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 9, 4, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x1A""EPSON 180x180 DPI A3 Color", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 1, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x04\x1B\x4A\x18\r", /* ESC 'J' 24 cr*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - NULL, /* Nicht vorhanden*/ - - /* Einschalten der Grafik*/ - "\x09\x1B\x40\x1B\x4F\x1B\x43\x00\x10\r", /* ESC '@' ESC 'O' ESC 'C' 0 16 \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x27\x00\x08", /* ESC '*' 39 2048*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ - -}; - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 180 DPI, DIN A3, Farbe */ -/****************************************************************************/ - -static struct EpsonDST EPSON360x180C_A3 = { - - /* DPI in X-und Y-Richtung*/ - { 180, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 9, 4, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x1A""EPSON 360x180 DPI A3 Color", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 1, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x04\x1B\x4A\x18\r", /* ESC 'J' 24 cr*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - NULL, /* Nicht vorhanden*/ - - /* Einschalten der Grafik*/ - "\x09\x1B\x40\x1B\x4F\x1B\x43\x00\x10\r", /* ESC '@' ESC 'O' ESC 'C' 0 16 \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x08\x10", /* ESC '*' 40 4104*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 360 DPI, EPSON, DIN A3, Farbe */ -/****************************************************************************/ - -static struct EpsonDST EPSON360x360C_A3 = { - - /* DPI in X-und Y-Richtung*/ - { 360, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 9, 4, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x1A""EPSON 360x360 DPI A3 Color", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 2, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x05\x1B\x2B\x2F\x0D\x0A", /* ESC '+' 47 cr lf*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - "\x05\x1B\x2B\x01\x0D\x0A", /* ESC '+' 01 cr lf*/ - - /* Einschalten der Grafik*/ - "\x09\x1B\x40\x1B\x4F\x1B\x43\x00\x10\r", /* ESC '@' ESC 'O' ESC 'C' 0 16 \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x08\x10", /* ESC '*' 40 4104*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - - -/****************************************************************************/ -/* 24-Nadel Modus 360 * 360 DPI, NEC P7, DIN A3, Farbe */ -/****************************************************************************/ - -static struct EpsonDST NEC360x360C_A3 = { - - /* DPI in X-und Y-Richtung*/ - { 360, 360, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - NP_A4_SIZEX, NP_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 9, 4, - - /* Flags*/ - pfIsEpson, - - /* Name des Modus*/ - "\x1B""NEC P7 360x360 DPI A3 Color", /* Name des Modus*/ - - /* Druckeroutine*/ - EpsonPrint }, - - /* Bytes pro Druckerspalte und Durchgaenge*/ - 3, 2, - - /* Linefeed1, d.h. normaler Linefeed*/ - "\x05\x1C\x33\x2F\x0D\x0A", /* FS '3' 47 cr lf*/ - - /* LineFeed2, d.h. kleinster Linefeed*/ - "\x05\x1C\x33\x01\x0D\x0A", /* FS '3' 01 cr lf*/ - - /* Einschalten der Grafik*/ - "\x09\x1B\x40\x1B\x4F\x1B\x43\x00\x10\r", /* ESC '@' ESC 'O' ESC 'C' 0 16 \r*/ - - /* Ausschalten der Grafik*/ - "\x03\f\x1B\x40", /* \f ESC '@'*/ - - /* Code vor den Grafik-Bytes*/ - "\x05\x1B\x2A\x28\x08\x10", /* ESC '*' 40 4104*/ - - /* Code nach den Grafik-Bytes*/ - NULL /* Nicht vorhanden*/ -}; - - - -/****************************************************************************/ -/* 150*150 DPI HP-DJ 1200C, 256 Farben, A4 */ -/****************************************************************************/ - -static struct LJDST HPDJ1200C150 = { - - /* DPI in X-und Y-Richtung*/ - { 150, 150, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 256, 8, - - /* Flags*/ - pfDoCompression | pfHasPalette, - - /* Name des Modus*/ - "\x11""HPDJ1200C 150 DPI", /* Name des Modus*/ - - /* Druckeroutine */ - LaserPrint }, - - /* Einschalten der Grafik*/ - "\x1B*t150R" /* ESC * t 150 R*/ - -}; - -/****************************************************************************/ -/* HP-Laserdrucker 1200*1200 DPI */ -/****************************************************************************/ - -static struct LJDST HPLJ1200 = { - - /* DPI in X-und Y-Richtung*/ - { 1200, 1200, - - /* Blattgroesse in X- und Y-Richtung in 1/1000 Inch*/ - LJ_A4_SIZEX, LJ_A4_SIZEY, - - /* Anzahl Farben und Bits pro Pixel*/ - 2, 1, - - /* Flags*/ - pfDoCompression, - - /* Name des Modus*/ - "\x12""HPLJ 1200x1200 DPI", /* Name des Modus*/ - - /* Druckeroutine*/ - LaserPrint }, - - /* Festlegen der Grafik*/ - "\x1B*t1200R" /* ESC * t 300 R*/ - -}; - - -/****************************************************************************/ -/* Das Array Zeigern auf die DST's */ -/****************************************************************************/ - -struct _DST * DSTTable [MaxModes] = { - - (struct _DST*) &EPSON240x72, /* 0*/ - (struct _DST*) &EPSON240x216, /* 1*/ - (struct _DST*) &EPSON180x180, /* 2*/ - (struct _DST*) &EPSON360x180, /* 3*/ - (struct _DST*) &EPSON360x360, /* 4*/ - (struct _DST*) &NEC360x360, /* 5*/ - (struct _DST*) &IBMPro180x180, /* 6*/ - (struct _DST*) &IBMPro360x180, /* 7*/ - (struct _DST*) &EPSON180x180C, /* 8*/ - (struct _DST*) &EPSON360x180C, /* 9*/ - (struct _DST*) &EPSON360x360C, /* 11*/ - (struct _DST*) &NEC360x360C, /* 10*/ - (struct _DST*) NULL, /* 12*/ - (struct _DST*) NULL, /* 13 Benutzerdefinierter Modus 1*/ - (struct _DST*) NULL, /* 14 Benutzerdefinierter Modus 2*/ - (struct _DST*) NULL, /* 15 Benutzerdefinierter Modus 3*/ - (struct _DST*) &HPLJ75, /* 16 LaserJet-Modi*/ - (struct _DST*) &HPLJ100, /* 17*/ - (struct _DST*) &HPLJ150, /* 18*/ - (struct _DST*) &HPLJ300, /* 19*/ - (struct _DST*) &HPLJ75O, /* 20 Nochmals LJ, ohne Kompression*/ - (struct _DST*) &HPLJ100O, /* 21*/ - (struct _DST*) &HPLJ150O, /* 22*/ - (struct _DST*) &HPLJ300O, /* 23*/ - (struct _DST*) &HPDJ75, /* 24 Farbmodi des DeskJet*/ - (struct _DST*) &HPDJ100, /* 25*/ - (struct _DST*) &HPDJ150, /* 26*/ - (struct _DST*) &HPDJ300, /* 27*/ - (struct _DST*) &HPDJ75S, /* 28 Farbmodi, Deskjet mit Schwarzabtrennung*/ - (struct _DST*) &HPDJ100S, /* 29*/ - (struct _DST*) &HPDJ150S, /* 30*/ - (struct _DST*) &HPDJ300S, /* 31*/ - (struct _DST*) &HPLJ600, /* 32*/ - (struct _DST*) &EPSON180x180_A3, /* 33 A3 Modi*/ - (struct _DST*) &EPSON360x180_A3, /* 34*/ - (struct _DST*) &EPSON360x360_A3, /* 35*/ - (struct _DST*) &NEC360x360_A3, /* 36*/ - (struct _DST*) &EPSON180x180C_A3, /* 37 A3 Modi, Farbe*/ - (struct _DST*) &EPSON360x180C_A3, /* 38*/ - (struct _DST*) &EPSON360x360C_A3, /* 39*/ - (struct _DST*) &NEC360x360C_A3, /* 40*/ - (struct _DST*) &HPDJ1200C150, /* 41 Deskjet 1200C, 256 Farben*/ - (struct _DST*) &HPLJ1200, /* 42 HP LJ4000, 1200 * 1200 DPI*/ - -}; - - - diff --git a/thirdparty/grx249/addons/print/prndata.lo b/thirdparty/grx249/addons/print/prndata.lo deleted file mode 100644 index 5010038c5c0728f9c6082ce13df61f8d6392cdb8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7644 zcmbtZU1*!v89thv&S~Pt&ay^C>88>`Jl9bq+lsqU#@EVOUDr!Yeu|;mX2&-5m|`1Q z87_=Yu)+o%Wj|$TpbKAg;0r@@;ZaxzQ?E9*!3G;l7pA1Ji)@&ZfG;{2Y|nGP=SWAg zl*IVJ>*qZ0d7tz5o$s9Q$lt#(`L#$SVqA)tsA(``a`CWa#6rL6HOE}2#nNG80+@kS zyNxNq0+@kSKMM{EU(gVALg^A5LVK^UDQu==AWpo<|80K=f!lFo)s;{oTFh)P<=lmo9ct z#h_k?Ch!>hFqA#Clu=O4s&8e7%!z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~{dZ`$UifXj8DngH;I=;CCgaZGw-Ci|32VY_B6R;0 zza!isLU&huR~W-P&i+Y=4M|Pl!(obMnuKmxUGi*TrkXZTWAD$GTKMk@bsD z3;B^n|BQH9Sdo8Sye8b1|F(Dx=eO-Yk@bsD3v=?%h?j*G`Pap3!fp9)i^p(`+4_mB zUwm4alYd6MEUd`CE?yIE6S-c*?+AB-TbK9TE1yk9sdObJJX)508)>qa~; zToD$9WnqPg_;6>TlGj&PO|r0% zx723x%X71N_?GP_6Ex{$x;exZn&jN_jT;L%gOf|k#f2p9HD_0gvvc1Oe{Jbzas@y8 zFBFQeV;g_y#DB42o2-91;&p3EEMs~S#yqwdn>xjvK`9>B1LIPN@#_n~d5*c1P-YN_ zX*Pj)^>g@r9l{=PY)97EUI1f#Log0 ziv5Z0;`OSx`wiq-FSd4@{)+&7%G49fm=<8nbKFb=kKwoDFl+y^jJ71SPW*WVaei|3 zy#Xit;o6->9KR=A;@mJX-o=m?5jTUuv)W-8<9cBntD6&K&ENZs`Il=9+-2cziu=PU LV}443l8gI49GL4z diff --git a/thirdparty/grx249/addons/print/readme.txt b/thirdparty/grx249/addons/print/readme.txt deleted file mode 100644 index 5035aa1..0000000 --- a/thirdparty/grx249/addons/print/readme.txt +++ /dev/null @@ -1,45 +0,0 @@ - Printing from GRX - -This is source of beta version of printing procedures for GRX. -These procedures are based on sources of printer BGI drivers -for Borland C++ and Pascal compilers. This BGI driver was -developed by Ullrich von Bassevitz (see copying.uz). - -Only part of sources of printer BGI driver are used. I didn't port -drawing functions from BGI driver as they are already implemented in GRX. -I took only printing part which is now rather heavily modified to get -rid of Borland C++ specific features (e.g. inline assembler). - -Current version is tested with DJGPP and Linux versions of GRX only. -I didn't even try to compile it with Borland C++ for real mode as -I think it is useless due to lack of memory needed for buffer where -to create image. To print from GRX under Linux one should install -printer filter that allows to send PCL output to printer. - -Only some modes are tested: - Epson LQ printer : 180x180 dpi - LaserJet 4L : 300x300 dpi (with and without compression) - -I also tried DeskJet 500C mode (300x300 dpi with separate black) -on DeskJet 690C and it worked. - -Printing code is linked into executable only when it is really required. - -Currently it's included as addon to GRX. - --------------------- Files ------------------------------------------- -grxprint.c - main sources of printing code -grxprint.h - interface definitions for user -prndata.c - printer definitions -grxprn00.h - definitions used internally by grxprint only -printest.c - test example -copying.uz - original copyright notice from Ullrich von Bassevitz -printer.doc - original docs on printer BGI driver ------------------------------------------------------------------------- - -NOTE: Ullrich von Bassevitz is no more maintaining printer BGI driver. - Addresses mentioned in printer.doc are NO MORE USABLE - - -Andris Pavenis -e-mail: pavenis@latnet.lv diff --git a/thirdparty/grx249/addons/print/readme.uz b/thirdparty/grx249/addons/print/readme.uz deleted file mode 100644 index d8cbc3c..0000000 --- a/thirdparty/grx249/addons/print/readme.uz +++ /dev/null @@ -1,47 +0,0 @@ - -Das Paket enthaelt die komplette Distribution meines PRINTER BGI-Treibers mit -allen Quellen. - - - -Bitte beachten: - - * Fuer die Uebersetzung der Quellen wird Borland C++ in der Version - 3.1 benoetigt. - - * Die Adressen und Telefonnumern, die in README.TXT genannt sind, sind - nicht mehr gueltig. - - * Ich will keine Anrufe, Briefe oder Mails bezueglich des Treibers - bekommen. Ich mache nichts mehr mit dem Treiber, und o.g. Dinge - stehlen mir nur meine Zeit. Eine Ausnahme mache ich nur, wenn mir - die anfallende Zeit bezahlt wird. - - * Fuer die Quellen gilt folgendes Copyright: - -Die Software (sowohl die Quellcodes, als auch die Binaries) werden -ohne jegliche Zusagen/Garantien bezglich Funktionalit„t oder -Funktionsf„higkeit abgegeben. Weder die Autoren noch die Distributoren -bernehmen eine Verantwortung fr Sch„den, die durch die Benutzung der -Software verursacht werden. - -Die Software darf frei verwendet und weitergegeben werden, wobei -"frei" ausdrcklich auch eine kommerzielle Nutzung/Weitergabe -einschlieát, *vorausgesetzt* die folgenden Bedingungen werden -eingehalten: - - 1. Die Herkunft der Software muá - wenn berhaupt - dann korrekt - angegeben werden. Es ist nicht erlaubt, die Software als Werk - eines anderen auszugeben. Wird die Software in Teilen oder als - Ganzes in einem Produkt benutzt, dann wrde ich mich ber einen - Hinweis auf die Herkunft in der Dokumentation freuen. Ein solcher - Hinweis ist aber nicht zwingend notwendig. - - 2. Ge„nderte Quellcodes mssen deutlich als solche gekennzeichnet - werden und drfen nicht ohne einen expliziten Hinweis auf die - durchgefhrten Žnderungen weiterverteilt werden. - - 3. Die Bedingungen ber die Nutzung/Weitergabe drfen nicht entfernt - oder ge„ndert werden. - - diff --git a/thirdparty/grx249/chr/addfonts.bat b/thirdparty/grx249/chr/addfonts.bat deleted file mode 100755 index 01d18aa..0000000 --- a/thirdparty/grx249/chr/addfonts.bat +++ /dev/null @@ -1,32 +0,0 @@ -rem We are not distributing Borland BGI fonts with GRX. -rem To add them to the library put .CHR files in this -rem directory (where this script is located) and run it -rem after building GRX -rem This file is for Borland C. - -if "%1"=="" addfonts bold euro goth lcom litt sans scri simp trip tscr - -del *.obj -del addfonts.rsp -bcc -O -ml -ebin2c.exe ..\src\utilprog\bin2c.c - -:proc -if not exist %1.chr goto next - -echo Processing %1.chr -bin2c %1.chr _%1_font %1.c -bcc -c -O -ml %1.c -echo +%1.obj & >> addfonts.rsp -del %1.c - -:next -shift -if not "%1"=="" goto proc - -:done -echo , >> addfonts.rsp -tlib ..\lib\bcc\grx20l.lib @addfonts.rsp - -del *.obj -del addfonts.rsp -del ..\lib\bcc\grx20l.bak diff --git a/thirdparty/grx249/chr/addfonts.sh b/thirdparty/grx249/chr/addfonts.sh deleted file mode 100755 index afcae89..0000000 --- a/thirdparty/grx249/chr/addfonts.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -# -# We are not distributing Borland BGI fonts with GRX. -# To add them to the library put .CHR files in this -# directory (where this script is located) and run it -# after building GRX -# - -rm -f *.o -gcc -O2 ../src/utilprog/bin2c.c -o bin2c.exe -for x in *.chr; do - echo "Processing $x ..."; - name=`basename $x | sed -e 's,\.chr,,g'` - ./bin2c $x _${name}_font $name.c - gcc -c -O2 $name.c - rm $name.c -done - -ar rc ../lib/dj2/libgrx20.a *.o -ranlib ../lib/dj2/libgrx20.a -rm -f *.o diff --git a/thirdparty/grx249/chr/addfonts.x11 b/thirdparty/grx249/chr/addfonts.x11 deleted file mode 100755 index abdf21a..0000000 --- a/thirdparty/grx249/chr/addfonts.x11 +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -# -# We are not distributing Borland BGI fonts with GRX. -# To add them to the library put .CHR files in this -# directory (where this script is located) and run it -# after building GRX -# - -rm -f *.o -gcc -O2 ../src/utilprog/bin2c.c -o bin2c -for x in *.chr; do - echo "Processing $x ..."; - name=`basename $x | sed -e 's,\.chr,,g'` - ./bin2c $x _${name}_font $name.c - gcc -c -O2 $name.c - rm $name.c -done - -ar rc ../lib/unix/libgrx20X.a *.o -ranlib ../lib/unix/libgrx20X.a -rm -f *.o diff --git a/thirdparty/grx249/compat/grx.h b/thirdparty/grx249/compat/grx.h deleted file mode 100644 index 5a1240c..0000000 --- a/thirdparty/grx249/compat/grx.h +++ /dev/null @@ -1,64 +0,0 @@ -/** - ** grx.h ---- GRX 2.0 -> 1.0x backward compatibility declarations - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __GRX_H_INCLUDED__ -#define __GRX_H_INCLUDED__ - -#ifndef __GRX20_H_INCLUDED__ -#include "grx20.h" -#endif - -/* - * old style context creation - */ -static char far *_context_memory_[4] = { 0 }; -#ifdef GrCreateContext -#undef GrCreateContext -#endif -#define GrCreateContext(w,h,mem,where) ( \ - _context_memory_[0] = (char far *)(mem), \ - GrCreateFrameContext( \ - GrCoreFrameMode(), \ - (w),(h), \ - (((GrCurrentFrameDriver()->num_planes == 1) && _context_memory_[0]) ? \ - _context_memory_ : \ - (char far **)0 \ - ), \ - (where) \ - ) \ -) - -/* - * drawing stuff - */ -#define GR_MAX_POLY_VERTICES GR_MAX_POLYGON_POINTS -#define GrCircleArc(x,y,r,s,e,c) (GrCircleArc)((x),(y),(r),(s),(e),GR_ARC_STYLE_OPEN,(c)) -#define GrEllipseArc(x,y,w,h,s,e,c) (GrEllipseArc)((x),(y),(w),(h),(s),(e),GR_ARC_STYLE_OPEN,(c)) -#define GrFilledCircleArc(x,y,r,s,e,c) (GrFilledCircleArc)((x),(y),(r),(s),(e),GR_ARC_STYLE_CLOSE2,(c)) -#define GrFilledEllipseArc(x,y,w,h,s,e,c) (GrFilledEllipseArc)((x),(y),(w),(h),(s),(e),GR_ARC_STYLE_CLOSE2,(c)) -#define GrGetLastArcCoords GrLastArcCoords - -/* - * text stuff - */ -#define GrLoadBIOSFont GrLoadFont /* I don't know whether this is a good idea */ -#define GrFontWidth(opt) ((opt)->txo_font->h.width) -#define GrFontHeight(opt) ((opt)->txo_font->h.height) - -#endif /* whole file */ - diff --git a/thirdparty/grx249/compat/mousex.h b/thirdparty/grx249/compat/mousex.h deleted file mode 100644 index b4f0e01..0000000 --- a/thirdparty/grx249/compat/mousex.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - ** mousex.h ---- GRX 2.0 -> 1.0x mouse backward compatibility declarations - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __MOUSEX_H_INCLUDED__ -#define __MOUSEX_H_INCLUDED__ - -#ifndef __GRX20_H_INCLUDED__ -#include "grx20.h" -#endif - -#ifndef M_MOTION /* "eventque.h" also defines these */ -#define M_MOTION GR_M_MOTION -#define M_LEFT_DOWN GR_M_LEFT_DOWN -#define M_LEFT_UP GR_M_LEFT_UP -#define M_RIGHT_DOWN GR_M_RIGHT_DOWN -#define M_RIGHT_UP GR_M_RIGHT_UP -#define M_MIDDLE_DOWN GR_M_MIDDLE_DOWN -#define M_MIDDLE_UP GR_M_MIDDLE_UP -#define M_BUTTON_DOWN GR_M_BUTTON_DOWN -#define M_BUTTON_UP GR_M_BUTTON_UP -#define M_BUTTON_CHANGE GR_M_BUTTON_CHANGE -#define M_LEFT GR_M_LEFT -#define M_RIGHT GR_M_RIGHT -#define M_MIDDLE GR_M_MIDDLE -#endif /* M_MOTION */ - -#define M_KEYPRESS GR_M_KEYPRESS -#define M_POLL GR_M_POLL -#define M_NOPAINT GR_M_NOPAINT -#define M_EVENT GR_M_EVENT - -#ifndef KB_SHIFT /* "eventque.h" also defines these */ -#define KB_RIGHTSHIFT GR_KB_RIGHTSHIFT -#define KB_LEFTSHIFT GR_KB_LEFTSHIFT -#define KB_CTRL GR_KB_CTRL -#define KB_ALT GR_KB_ALT -#define KB_SCROLLOCK GR_KB_SCROLLOCK -#define KB_NUMLOCK GR_KB_NUMLOCK -#define KB_CAPSLOCK GR_KB_CAPSLOCK -#define KB_INSERT GR_KB_INSERT -#define KB_SHIFT GR_KB_SHIFT -#endif /* KB_SHIFT */ - -#define M_CUR_NORMAL GR_M_CUR_NORMAL -#define M_CUR_RUBBER GR_M_CUR_RUBBER -#define M_CUR_LINE GR_M_CUR_LINE -#define M_CUR_BOX GR_M_CUR_BOX - -#define MouseEvent GrMouseEvent -#define MouseDetect GrMouseDetect -#define MouseEventMode GrMouseEventMode -#define MouseInit GrMouseInit -#define MouseUnInit GrMouseUnInit -#define MouseSetSpeed(s) GrMouseSetSpeed(1,s) -#define MouseSetAccel GrMouseSetAccel -#define MouseSetLimits GrMouseSetLimits -#define MouseGetLimits GrMouseGetLimits -#define MouseWarp GrMouseWarp -#define MouseEventEnable GrMouseEventEnable -#define MouseGetEvent GrMouseGetEvent -#define MousePendingEvent GrMousePendingEvent -#define MouseGetCursor GrMouseGetCursor -#define MouseSetCursor GrMouseSetCursor -#define MouseSetColors GrMouseSetColors -#define MouseSetCursorMode GrMouseSetCursorMode -#define MouseDisplayCursor GrMouseDisplayCursor -#define MouseEraseCursor GrMouseEraseCursor -#define MouseBlock GrMouseBlock -#define MouseUnBlock GrMouseUnBlock -#define MouseCursorIsDisplayed GrMouseCursorIsDisplayed - -#endif /* whole file */ - diff --git a/thirdparty/grx249/configure b/thirdparty/grx249/configure deleted file mode 100755 index 73478b3..0000000 --- a/thirdparty/grx249/configure +++ /dev/null @@ -1,403 +0,0 @@ -#!/bin/sh - -# Configure script for GRX -# -# NOTE: This script is completely OPTIONAL. If you don't know what -# to do with it, just ignore it and follow the normal install -# instructions. -# -# Copyright (C) 2001-2002,2004 Frank Heckenbach -# Peter Gerwinski -# -# Parts copied from some version of GCC's configure script, -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, version 2. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -silent=n - -default_prefix=/usr/local -prefix=$default_prefix -exec_prefix='${prefix}' -bindir='${exec_prefix}/bin' -datadir='${prefix}/share' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -infodir='${prefix}/info' - -# "Detect" default target (wrong for cross-compiling) -if [ x"$COMSPEC" != x ]; then - default_target=DJGPP -else - default_target=x11 -fi -target=$default_target - -default_fontpath='${datadir}/grx/fonts' -fontpath="" - -default_x11base=/usr/X11R6 -x11base="$default_x11base" - -default_x11lib='$(X11BASE)/lib' -x11lib="$default_x11lib" - -default_unitspath='${exec_prefix}/units' -unitspath="$default_unitspath" - -HAVE_LIBJPEG=n -HAVE_LIBPNG=n -NEED_ZLIB=n -HAVE_LIBTIFF=n -# if you are able to run this script you have (ba)sh -# we suppose you have other needed unix tools as well -HAVE_UNIX_TOOLS=y -INCLUDE_BMP_CODE=y -INCLUDE_PRINTING_CODE=y -INCLUDE_GPC_SUPPORT=n -INCLUDE_SHARED_SUPPORT=y -INCLUDE_BGI_SUPPORT=y -USE_DIRECT_MOUSE_DRIVER=n -USE_SVGALIB_DRIVER=y -USE_FRAMEBUFFER_DRIVER=y -SET_SUIDROOT=y -USE_INOUTP_FRAMEDRIVERS=y -BUILD_X86_64=n -lsocket="" -subst_EP="" - -ac_prev= -for ac_option do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'`;; - *) ac_optarg=;; - esac - - case "$ac_option" in - - -s | --silent | --silen | --sile | --sil | --si | --s) - silent=y;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg";; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg";; - - # Don't complain about unknown enable, disable, with and without options - -enable-* | --enable-* | -en-* | --en-*) - case "`echo "$ac_option" | sed -e 's/^-*enable-//;s/^-*en-//'`" in - x86_64) BUILD_X86_64=y;; - jpeg) HAVE_LIBJPEG=y;; - png) HAVE_LIBPNG=y;; - z | zlib) NEED_ZLIB=y;; - png-z) HAVE_LIBPNG=y; NEED_ZLIB=y;; - tiff) HAVE_LIBTIFF=y;; - bmp) INCLUDE_BMP_CODE=y;; - print) INCLUDE_PRINTING_CODE=y;; - pascal | gpc) INCLUDE_GPC_SUPPORT=y;; - shared) INCLUDE_SHARED_SUPPORT=y;; - bgi) INCLUDE_BGI_SUPPORT=y;; - direct-mouse) USE_DIRECT_MOUSE_DRIVER=y;; - svgalib) USE_SVGALIB_DRIVER=y;; - framebuffer) USE_FRAMEBUFFER_DRIVER=y;; - suidroot) SET_SUIDROOT=y;; - io-framedrivers) USE_INOUTP_FRAMEDRIVERS=y;; - lsocket) lsocket=" -lsocket";; - esac;; - -disable-* | --disable-* | -di-* | --di-*) - case "`echo "$ac_option" | sed -e 's/^-*disable-//;s/^-*di-//'`" in - x86_64) BUILD_X86_64=n;; - jpeg) HAVE_LIBJPEG=n;; - png) HAVE_LIBPNG=n;; - z | zlib) NEED_ZLIB=n;; - png-z) HAVE_LIBPNG=n; NEED_ZLIB=n;; - tiff) HAVE_LIBTIFF=n;; - bmp) INCLUDE_BMP_CODE=n;; - print) INCLUDE_PRINTING_CODE=n;; - pascal | gpc) INCLUDE_GPC_SUPPORT=n;; - shared) INCLUDE_SHARED_SUPPORT=n;; - bgi) INCLUDE_BGI_SUPPORT=n;; - direct-mouse) USE_DIRECT_MOUSE_DRIVER=n;; - svgalib) USE_SVGALIB_DRIVER=n;; - framebuffer) USE_FRAMEBUFFER_DRIVER=n;; - suidroot) SET_SUIDROOT=n;; - io-framedrivers) USE_INOUTP_FRAMEDRIVERS=n;; - lsocket) lsocket="";; - esac;; - -with-* | --with-*) - case "`echo "$ac_option" | sed -e 's/^-*with-//'`" in - fontpath=*) fontpath="$ac_optarg";; - fontpath) fontpath="$default_fontpath";; - x11-base=*) x11base="$ac_optarg";; - x11-base) echo "$0: \`--with-x11-base' requires an argument" >&2; exit 1;; - x11-lib=*) x11lib="$ac_optarg";; - x11-base) echo "$0: \`--with-x11-lib' requires an argument" >&2; exit 1;; - unitspath=*) unitspath="$ac_optarg";; - unitspath) echo "$0: \`--with-unitspath' requires an argument" >&2; exit 1;; - esac;; - -without-* | --without-*) - case "`echo "$ac_option" | sed -e 's/^-*without-//'`" in - fontpath) fontpath="";; - esac;; - -h | -help | --help | --hel | --he) - cat << EOF -Usage: $0 [options] -Options: [defaults in brackets after descriptions] - --help print this message and exit - --version print version information and exit - --silent silent operation - --prefix=PREFIX install architecture-independent files in PREFIX - [$default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - --bindir=DIR user executables [EPREFIX/bin] - --datadir=DIR read-only architecture-independent data - [PREFIX/share] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --infodir=DIR info documentation [PREFIX/info] - --target=TARGET configure for TARGET [$default_target] - possible values: djgpp,x11,console,w32,sdlx,sdlw - or GCC-style ("i386-mingw32") for cross-compiling - --enable-x86_64 build for x86_64 architecture [no] - --enable-jpeg include JPEG support [no] - --enable-png include PNG support [no] - --enable-zlib use zlib [no] - --enable-png-z include PNG support and use zlib [no] - --enable-tiff include TIFF support [no] - --enable-bmp include BMP support [yes] - --enable-print include printing code [yes] - --enable-pascal or include Pascal support [no] - --enable-gpc - --enable-shared build shared libraries [yes] - --enable-bgi include BGI support [yes] - --enable-lsocket link lsocket [no] - --disable-FOO opposite of --enable-FOO - --with-fontpath=PATH set GRX font path to PATH - --with-fontpath set GRX font path to $default_fontpath - --without-fontpath use no GRX font path [default] - --with-x11-base=DIR use DIR as X11 base directory [$default_x11base] - --with-x11-lib=DIR use DIR as X11 lib directory [$default_x11lib] - --with-unitspath=PATH set GPC units path to PATH [$default_unitspath] -The following options apply to the Linux console (not X11) target only: - --enable-direct-mouse use PS/2 instead of svgalib mouse driver [no] - --enable-svgalib use svgalib driver [yes] - --enable-framebuffer use framebuffer driver [yes] - --enable-suidroot create suid root executables (required with svgalib - 1.4.x) [yes] - --enable-io-framedrivers use frame drivers that require suid root - executables under newer versions of svgalib [yes] -Some options can be abbreviated, e.g. \`--p' for \`--prefix', -\`--en-FOO' for \`--enable-FOO' and \`--di-FOO' for \`--disable-FOO'. -NOTE: This script is completely OPTIONAL. If you don't know what to do with it, - just ignore it and follow the normal install instructions. -EOF - exit 0;; - -v | -version | --version | --versio | --versi | --vers) - echo "Optional GRX configure script" - exit 0;; - *) { echo "$0: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - esac -done - -case "`echo "$target" | tr A-Z a-z`" in - *djgpp*) cfgsection=GRXVDJ2; target_makefile=makefile.dj2;; - x | x11) cfgsection=GRXVX11; target_makefile=makefile.x11;; - console) cfgsection=GRXVLNX; target_makefile=makefile.lnx;; - *w32 | *mingw*) cfgsection=GRXVW32; target_makefile=makefile.w32;; - sdlx) cfgsection=GRXVX11; target_makefile=makefile.sdl; subst_EP="/^EP=/s/=.*/=x/";; - sdlw) cfgsection=GRXVW32; target_makefile=makefile.sdl; subst_EP="/^EP=/s/=.*/=/";; - *) echo "$0: invalid target" >&2; exit 1;; -esac - -case "$target" in - *[A-Za-z0-9]-[A-Za-z0-9]*|mingw32) - CROSS_PLATFORM="`echo "$target" | tr A-Z a-z`-" - exec_prefix="$prefix/$target";; - *) - CROSS_PLATFORM="" - exec_prefix='${prefix}';; -esac - -if [ $USE_SVGALIB_DRIVER != y ] && [ $USE_FRAMEBUFFER_DRIVER != y ]; then - echo "$0: either \`--enable-svgalib' or \`--enable-framebuffer' must be set" >&2 - exit 1 -fi - -if [ $USE_SVGALIB_DRIVER != y ] && [ $USE_DIRECT_MOUSE_DRIVER != y ]; then - echo "$0: if \`--disable-svgalib' is unset then \`--enable-direct-mouse' must be set" >&2 - exit 1 -fi - -if [ -r Makefile ]; then - if cmp Makefile makefile.lnx > /dev/null 2>&1 || - cmp Makefile makefile.dj2 > /dev/null 2>&1 || - cmp Makefile makefile.w32 > /dev/null 2>&1 || - cmp Makefile makefile.x11 > /dev/null 2>&1 || - cmp Makefile makefile.sdl > /dev/null 2>&1; then - rm -f Makefile - else - echo "$0: Makefile exists already. Not overwriting!" >&2 - exit 1 - fi -fi - -if [ ! -r "$target_makefile" ]; then - echo "$0: $target_makefile not found (please run in source directory)" >&2 - exit 1 -fi - -# On DJGPP, `ln -s' creates `makefile.exe', so copy in this case -{ ln -s "$target_makefile" Makefile && [ -r Makefile ]; } || - { rm -f makefile.exe; cp "$target_makefile" Makefile; } -[ $silent = y ] || echo "Created Makefile" - -cfgfile="makedefs.grx" -cfgorigfile="makedefs.orig" -if [ ! -r "$cfgfile" ]; then - echo "$0: $cfgfile not found" >&2 - exit 1 -fi - -if [ ! -r "$cfgorigfile" ]; then - cp "$cfgfile" "$cfgorigfile" -fi - -if [ x"$fontpath" = x ]; then - subst_fontpath="/^#*GRX_DEFAULT_FONT_PATH=/s/^#*/#/" -else - subst_fontpath="/^#*GRX_DEFAULT_FONT_PATH=/{s/^#*//;s|=.*|=$fontpath|;}" -fi - -if [ "$cfgsection" = GRXVLNX ] || [ "$cfgsection" = GRXVX11 ]; then - extra_unix="/^ifdef GRXVUNX\$/,/^endif\$/{/^prefix=/s|=.*|=$prefix|;$subst_fontpath;}" -else - extra_unix= -fi - -if sed -e "/^BUILD_X86_64=/s/=.*/=$BUILD_X86_64/; - $subst_EP; - /^HAVE_LIBTIFF=/s/=.*/=$HAVE_LIBTIFF/; - /^HAVE_LIBJPEG=/s/=.*/=$HAVE_LIBJPEG/; - /^HAVE_LIBPNG=/s/=.*/=$HAVE_LIBPNG/; - /^HAVE_UNIX_TOOLS=/s/=.*/=$HAVE_UNIX_TOOLS/; - /^NEED_ZLIB=/s/=.*/=$NEED_ZLIB/; - /^INCLUDE_PRINTING_CODE=/s/=.*/=$INCLUDE_PRINTING_CODE/; - /^INCLUDE_BMP_CODE=/s/=.*/=$INCLUDE_BMP_CODE/; - /^INCLUDE_GPC_SUPPORT=/s/=.*/=$INCLUDE_GPC_SUPPORT/; - /^INCLUDE_SHARED_SUPPORT=/s/=.*/=$INCLUDE_SHARED_SUPPORT/; - /^INCLUDE_BGI_SUPPORT=/s/=.*/=$INCLUDE_BGI_SUPPORT/; - /^CROSS_PLATFORM=/s/=.*/=$CROSS_PLATFORM/; - /^USE_DIRECT_MOUSE_DRIVER=/s/=.*/=$USE_DIRECT_MOUSE_DRIVER/; - /^USE_SVGALIB_DRIVER=/s/=.*/=$USE_SVGALIB_DRIVER/; - /^USE_FRAMEBUFFER_DRIVER=/s/=.*/=$USE_FRAMEBUFFER_DRIVER/; - /^SET_SUIDROOT=/s/=.*/=$SET_SUIDROOT/; - /^USE_INOUTP_FRAMEDRIVERS=/s/=.*/=$USE_INOUTP_FRAMEDRIVERS/; - /^exec_prefix=/s|=.*|=$exec_prefix|; - /^bindir=/s|=.*|=$bindir|; - /^libdir=/s|=.*|=$libdir|; - /^datadir=/s|=.*|=$datadir|; - /^includedir=/s|=.*|=$includedir|; - /^unitsdir=/s|=.*|=$unitspath|; - /^infodir=/s|=.*|=$infodir|; - $extra_unix; - /^ifdef $cfgsection\$/,/^endif\$/{ - /^prefix=/s|=.*|=$prefix|; - $subst_fontpath; - /^X11BASE=/s|=.*|=$x11base|; - /^X11LIB=/s|=.*|=$x11lib|; - /^X11LIBS=/s/\$/$lsocket/; - }" "$cfgorigfile" > "$cfgfile"; then - [ $silent = y ] || echo "Modified $cfgfile" -else - cp -f "$cfgorigfile" "$cfgfile" - exit 1 -fi - -if [ x"$INCLUDE_GPC_SUPPORT" = x"y" ]; then - for file in pascal/grx.pas pascal/bgi/graph.pas; do - if [ ! -r "$file" ]; then - echo "$0: $file not found" >&2 - exit 1 - fi - if sed -e "s/{.*\\\$define LINUX_CONSOLE}/{`if [ x"$target" != x"console" ]; then echo .; fi`\$define LINUX_CONSOLE}/; - s/{.*\\\$define SVGALIB}/{`if [ x"$target" != x"console" -o $USE_SVGALIB_DRIVER != y ]; then echo .; fi`\$define SVGALIB}/; - s/{.*\\\$define __SDL__}/{`if [ x"$target" != x"sdlx" -a x"$target" != x"sdlw" ]; then echo .; fi`\$define __SDL__}/; - s/{.*\\\$L socket}/{`if [ x"$lsocket" = x ]; then echo .; fi`\$L socket}/ - " "$file" > "$file.new" && - sed -e "s/{.*\\\$L tiff}/{`if [ $HAVE_LIBTIFF != y ]; then echo .; fi`\$L tiff}/; - s/{.*\\\$L jpeg}/{`if [ $HAVE_LIBJPEG != y ]; then echo .; fi`\$L jpeg}/; - s/{.*\\\$L png}/{`if [ $HAVE_LIBPNG != y ]; then echo .; fi`\$L png}/; - s/{.*\\\$L z}/{`if [ $NEED_ZLIB != y ]; then echo .; fi`\$L z}/; - " "$file.new" > "$file" && - rm -f "$file.new" ; then - [ $silent = y ] || echo "Modified $file" - else - rm -f "$file.new" - exit 1 - fi - done -fi diff --git a/thirdparty/grx249/copying b/thirdparty/grx249/copying deleted file mode 100644 index a43ea21..0000000 --- a/thirdparty/grx249/copying +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/thirdparty/grx249/copying.grx b/thirdparty/grx249/copying.grx deleted file mode 100644 index ed54935..0000000 --- a/thirdparty/grx249/copying.grx +++ /dev/null @@ -1,53 +0,0 @@ -This is file "copying.grx". - -This document describes the terms for distributing the source code of and any -derived work based on the GRX graphics library. Such source code is marked -with the next text: - - ** Copyright (c) [year] [author], [author information] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - -Source code with the above copyright is distributed under the following terms: - - (1) The test programs for the graphics library (code in the 'test' - sub-directory) is distributed without restrictions. This code - is free for use in commercial, shareware or freeware applications. - - (2) The GRX graphics library is distributed under the terms of the - GNU LGPL (Library General Public License) with the following amendments - and/or exceptions: - - - Using the DOS versions (DOS only! this exception DOES NOT apply to - the Linux version) you are permitted to distribute an application - linked with GRX in binary only, provided that the documentation - of the program: - - a) informs the user that GRX is used in the program, AND - - b) provides the user with the necessary information about - how to obtain GRX. (i.e. ftp site, etc..) - - (3) Fonts (in the 'fonts' sub-directory). Most of the fonts included with - the GRX library were derived from fonts in the MIT X11R4 distribution. - They are distributed according to the terms in the file "COPYING.MIT" - (X license). Exceptions are: - - The fonts "ter-114b.res", "ter-114n.fna" and "ter-114v.psf" are - Copyright (C) 2002 Dimitar Zhekov, but are distributed under the - X license too. - - The "pc" BIOS font family, which is distributed without restrictions. - -A copy of the GNU GPL (in the file "COPYING") and the GNU LGPL (in -the file "COPYING.LIB") is included with this document. If you did -not receive a copy of "COPYING" or "COPYING.LIB", you may obtain one -from where this document was obtained, or by writing to: - - Free Software Foundation - 675 Mass Ave - Cambridge, MA 02139 - USA - diff --git a/thirdparty/grx249/copying.lib b/thirdparty/grx249/copying.lib deleted file mode 100644 index d750c7e..0000000 --- a/thirdparty/grx249/copying.lib +++ /dev/null @@ -1,481 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/thirdparty/grx249/copying.mit b/thirdparty/grx249/copying.mit deleted file mode 100644 index fdc3a01..0000000 --- a/thirdparty/grx249/copying.mit +++ /dev/null @@ -1,96 +0,0 @@ -Software in this distribution of the X Window System is covered by copyrights; -see the file LABELS in this directory for a list. - -The MIT distribution of the X Window System is publicly available, but is NOT -in the public domain. The difference is that copyrights granting rights for -unrestricted use and redistribution have been placed on all of the software to -identify its authors. You are allowed and encouraged to take this software and -build commerical products. - -Individuals or organizations wishing to contribute software to the public -releases should use a copyright notice that is no more restrictive than -the sample given below. In particular, - - o Do not place any restictions on what can be done with this software - (this includes using the GNU "copyleft"). - - o Do not include the words "All rights reserved" unless you have had a - lawyer verify that you have also explicitly given away all of the - necessary rights shown in the samples. - - o Spell out the word "Copyright"; the phrase "(c)" is NOT a legal - alternative to the c-in-circle symbol. - - o Put at least a one-line copyright at the top of EVERY source file, if - not the full copyright. Also, the copyright line or full notice MUST - physically appear in each file. Using the preprocessor to #include the - copyright from some other file has no legal meaning (it can be used to - incorporate common strings into the binary, but has no effect on the - status of the source code). - - o Things that are copyrighted are, by definition, not in the public - domain. - -A copyright notice similar to the following is strongly recommended (replacing -MIT with your organization's name and putting your name and address at the -bottom). - -/* - * Copyright 1989 Massachusetts Institute of Technology - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Your Name, Name of your organization - */ - - - X Window System, Version 11 - Release 4 - - contents copyrighted by - - - Massachusetts Institute of Technology - Adobe Systems, Inc. - Apollo Computer Inc. - Apple Computer, Inc. - AT&T, Inc. - Don Bennett - Bigelow & Holmes - Bitstream, Inc. - Adam de Boor - Cognition Corp. - Digital Equipment Corporation - Evans & Sutherland Computer Corporation - Franz Inc - Hewlett-Packard Company - IBM Corporation - Network Computing Devices, Inc. - O'Reilly and Associates, Inc. - Dale Schumacher - Marvin Solomon - Sony Corp. - SRI - Sun Microsystems, Inc. - Tektronix, Inc. - Texas Instruments Incorporated - UniSoft Systems - The Regents of the University of California - University of Wisconsin - Larry Wall - Wyse Technology, Inc. diff --git a/thirdparty/grx249/doc/changes.bgi b/thirdparty/grx249/doc/changes.bgi deleted file mode 100644 index 23adb99..0000000 --- a/thirdparty/grx249/doc/changes.bgi +++ /dev/null @@ -1,116 +0,0 @@ -******* 2.3 --> 2.3.4 -- BCC2GRX is now part of the GRX graphics library. -******* 2.0 --> 2.3 -- will use the floodfill() from GRX 2.25 or newer -- Linux: can be compiled as shared library (make SHARED=1 in src/) -- made all functions direct linkable (mostly for GPC support) -- Pascal (GPC) support by Sven Hilscher included -- updated for grx21 (patterns & custom lines) -- No more warnings using LIBBCC.H in C++ programs -******* 1.3 --> 2.0 -- new copyright terms, see readme -- compiles with both grx v2.0 and v1.03 -- text.c splitted -- added setactivepage(), setvisualpage() and helper func's - set_BGI_mode_pages(int p), get_BGI_mode_pages(), - getactivepage() and getvisualpage() (functional only with - grx v2.0 or newer) -- __gr_Y_page_offs disabled if compiled for grx 1.0x -- restrict RGB values in setrgbpalette() to 0..63 -- added extended graphics modes from BC++ 4.5 -- few experimental custom line hacks for grx 2.0 (lnestyle.c) -- more work on Makefiles, make in src or test subdir works -- Due to limited stack space with DJGPP v2, complete rewrite - of floodfill() to avoid deep recursions. -- DJGPP: libbcc2.a will work on v1 and v2 systems with grx10, no need - to keep libbccx.a any longer. -- Link test: create dummy executable using all library objects. Nice to - check grx20fix.h settings. -- Optimized makefiles and configuration -- getdrivername() will report GRX driver name with GRX2 -- LINUX: saved some getpixel() calls for floodfill() under X11. Remains slow :-( -- LINUX: No need to keep a seperate X11 directory any longer, binaries - are just linked with -lgrx20X -X11 instead of -lgrx20 -lvga -- LINUX: Enhanced Linux support (svgalib && X11) -- rewrote bgi font loading -- libbcc.h won't include GRX stuff any more -- rewrote floodfill(): Will use it's own dumb monochrome - context to keep track of drawn points. Uses less memory but - seems to be a little slower in few cases. -- moved _ega_color, setrgbdefaults() and setrgbgray256() from libbcc?.a - to src/addons.a -- added four new functions getmodemaxcolor(), getmodemaxx(), getmodemaxy() - and setrgbcolor(). -- added version check __BCC2GRX__ (equals to 0x21a for v2.1 alpha, - 0x20b -> v2.0 beta, 0x230 -> v2.3 offical release, ...) - -******* 1.2 --> 1.3 (1.3 didn't made it to public) - -- Vector fonts may be plotted using the actual line style. - calling textlinestyle(1) enables and textlinestyle(0) disables - this feature. -- corrected getmodename() TrueColor definition, name of actual - graphics mode valid now, will display 32K/64K/16M instead of - huge numbers -- CGA/MCGA/ATT400 will be emulated by 16 color modes -- EGA64HI sets 16 color mode on non EGA cards -- named source files in a more functional way -- circle() will use GrCircle() in "round" cases -- graphdefaults(), setgraphmode() and initgraph() set up the - correct aspect ratio -- added __gr_ prefix to several library functions called - by other bcc2grx functions. Protects against interference - with other libraries (problem reported by Axel Rohde) -- updated for libgrx 1.03 -- should work with .vdr drivers now -- uses GrGetLastArcCoords() instead of global variables -- BLACK changed into constant -- Pascal support improved. KeyPressed and ReadKey will - flush stdout first, updated Readme -- bccbgi now uses random() instead of RANDOM_TP() for correct - support of >32768 colors modes. (Bad news: random() is much slower) -- set_BGI_mode_whc translates 64K and 16M color values into - GRX internals 0xC010 and 0xC018 (grx1.0x only) -- added _ega_color for EGA color emulation in HiColor/TrueColor modes -- Corrected range check in setfillstyle() (bug found by Axel Rohde) -- Corrected bugs/problems reported by Antonio Carlos Moreirao de Queiroz: - - initgraph won't crash if pathtodriver == NULL - - When loading a font failed, DEFAULT_FONT size 1 will be used - - font switching should be faster now - - if a font can't be found, grFontNotFound error will be set. -- Correct name expansion in installuserfont() - -******* 1.1 --> 1.2 - -- installuserfont() accepts GRX font names (name.fnt). -- getmodename() supports modes >32768 colors -- initgraph() has NATIVE_GRX driver entry. NATIVE_GRX supports - the default, biggest (noninterlaced), BGI_mode graphics and all valid - modes from .grn drivers -- set_BGI_mode()/set_BGI_mode_whc() routines to emulate BGI driver resolutions -- floodfill() doesn't uses second context in simple cases (much faster), - leaves viewport if no clipping required -- getmoderange(), getmaxmode() and getpalettesize() will call - __gr_set_up_modes() first -->> returned values are initialized -- closegraph() resets __gr_INIT flag -- cleardevice(), clearviewport(), imagesize(), graphresult(), getmaxcolor(), getgraphmode(), getpixel() and - putpixel() are checking __gr_INIT flag now -- setrgbpalette() check's initgraph(), moved from bccgrx.h -> bccgrx20.c -- drawpoly() always closed the polygon -- fixed. -- registerfarbgifont() now same as registerbgifont() -- setgraphbufsize() returns a defined value -- setwritemode() protects against setting color bits -- detectgraph() returns the correct graphdriver info -- graphdefaults() doesn't call setlinestyle() & setviewport() any more -- bccgrx.c/__gr_set_up_modes() executed once only (fixes memory waste) - -******* 1.0 --> 1.1 - -- initgraph() will set the requested graphmode if graphdriver != DETECT. -- using GrHLineNC and GrPixelNC in bccgrx09.c / _floodfill() -- BCC2GRX should run correct with old style drivers (.grd) - (bccgrx.c/__gr_set_up_modes changed) -- Corrected detectgraph()/initgraph() problem calling Gr... funcs - before GrSetMode() -- Used normal filled / solid line commands where ever possible -- Text direction and justify setting compatible with Borland definition diff --git a/thirdparty/grx249/doc/changes.txt b/thirdparty/grx249/doc/changes.txt deleted file mode 100644 index bdab75c..0000000 --- a/thirdparty/grx249/doc/changes.txt +++ /dev/null @@ -1,728 +0,0 @@ -This file lists the history of changes to the grx source files from -the 2.2 version. -------------------------------------------------------------------- - -Date Changes - -12/07/10 ----------- GRX v2.4.9 released (Maurice Lombardi) -12/07/04 Change configure script and makedefs.grx to conform to recent - GNU practice. Honours DESTDIR to ease building binary distributions. - INSTALLDIR is no more present in makedefs.grx, but prefix is there - to replace it. (Extension of a patch by Guillem Jover to all targets - by M. Lombardi) -11/11/23 All drivers generate button4 and button5 mouse events (the scroll - wheel scrolled up or down). Extended from MGRX by M. Lombardi. -11/11/18 Add GrFlush(). Useful only on X11 when when switching between - graphics and console windows open simultaneously. (M. Lombardi) -10/08/17 Add GrMsecTime(). Adapted from MGRX. -09/04/02 Synchronisation of windows and grx mouse cursors by Richard Sanders - -08/12/12 Fix a race condition with the loadcolor SetDIBColorTable function - call, which happens sometimes on fast multiprocessor machines - This affects only 8 bpp modes (Peter Schauer ) -08/11/05 Added GrClearContextC function, by Richard Sanders. -08/08/01 fdrivers/fd_xwin.c: Sanitized pixel cache code. - New faster and specific for X11 putscanline function, this change - accelerates a lot displaying pnm, png and jpeg images. - Backports from MGRX of M.Alvarez -08/05/15 Fix a conflict between underline and XOR char writing reported by - Al-Junaid H. Walker (M. Lombardi) -07/12/27 Added GrFloodSpill functions, by Richard Sanders -07/12/01 vd_xwin: go to fullscreen if w,h == X resolution, GR_biggest_graphics - is honored. Modes higher than X resolution are made no-present. - Added videomodes for wide monitors in x11 and w32 drivers. - Backports from MGRX of M.Alvarez -07/08/11 Fix a keyboard bug reported by A. Moreira. It was a bug produced by - the optimiser for gcc >= 4 when using asm: memory clobber. - If not corrected it could pop up at other places. (M. Lombardi) - -07/08/29 ----------- GRX v2.4.8 released (Maurice Lombardi) -07/08/29 Sanitized win32, eliminating WM_SIZE events -07/08/27 Add Sleep(5) to setrgbpalette for win32 which sends WM_PAINT to - redraw whole screen. Compare PlayRGBpalette() in test/bgi/bccbgi.c - Add Sleep(1) when no more W32events queued to yield control - when looking for grx events by M. Lombardi. -07/08/21 Correction to WM_PAINT in vdrivers/vd_win32.c: GetUpdateRect() gave - wrong UpdateRect -> few missing chars in text drawing, by M. Lombardi -07/08/17 Change to text/fontpath.c and text/loadfont.c to allow the syntax - /dev/env/DJDIR in djgpp when loading fonts by M. Lombardi -07/08/07 Correction to test/test.h to enable test/scroltst to run as expected. -07/08/05 Eliminate WM_PAINT in mouse/w32inp.c to enqueue GR_OS_DRAW_REQUEST. - Too frequents, they produced saturation of the GRX event queue and - gobbling of keybord/mouse events. Compare responsivity of - test/mousetst.c, test/bgi/bccbgi.c, pascal/bgi/demo.pas by M. Lombardi -07/08/01 The X11 driver now responds to Expose events by using a pixmap - for backing store. But this slows it down. You can recover - previous behaviour (faster but no response to Expose) by editing - src/include/libxwin.h and setting USE_PIXMAP_FOR_BS to 0. - Backported from Mariano's MGRX by M. Lombardi. -07/07/30 various improvements in makefiles, demo.pas, test/speedtst.c - by M. Lombardi. - -07/04/06 ----------- GRX v2.4.7 released (Maurice Lombardi) -07/04/06 updates in test/speedtst.c -07/04/05 change to bgi/bccgrx.c, so that all 32 bpp modes are considered - by BGI as 16M modes (the extra byte is only for padding): this was - the case for older drivers up to VESA which gave GrVideoMode->bpp=24 - in these cases (see lines 246-258 in vdrivers/vesa.c). -07/03/25 SDL driver (sdl-rc4-support.zip) by Dimitar Zhekov 28 May 2004 - with changes to makefiles/makedefs/configure - and pascal support by Maurice Lombardi -07/03/16 inclusion of various corrections submitted to the list - grx.diff-byteorder by Frank Heckenbach 31 May 2006 - grx-exitprocess.diff GRX app termination bug (winXP) - by Mario Zagar 15 Feb 2005 - grxfixes.zip by Dimitar Zhekov 24 Sep 2004 - fontdemo-res-fix.diff - fontdemo-Y-fix.diff - test-changes.diff - win32-8bpp-cls-fix.diff (win32 setmode() clear screen problem) - xfdga-detect-once.diff (xfdga avoid double detection) - grx-w32events.diff (more W32 event handling) - by Peter Gerwinski 19 Jun 2004 - graphresult.diff by Andris Pavenis 8 Jan 2004 -07/01/05 introduction of GR_PtrInt (integer of same length as a pointer) - to suppress warnings (in fact errors) when compiling with - x86_64 platforms, - renaming sincos() to GrSinCos() in genellip.c to avoid - name conflict with builtin, by M. Lombardi. -06/09/19 correction to bgi/text4.c to correct update of graphics - pointer in vertical writing with outtext (was going in - the wrong direction. BP does not update it at all, - but this is stupid), by M. Lombardi. -06/09/11 correction to grx.pas (bar3d) -06/02/10 Better understanding of x86_64. Now by default an i386 - library is built even on x86_64 platforms. If you set - BUILD_X86_64 to 'y' in makdefs.grx a x86_64 library is - built, and the install target go to the lib64 subdir - (backport from MGRX by M. Lombardi) -04/09/24 Added x86_64 support (backport from MGRX by M. Lombardi) -xx/09/05 Florian Xaver updated GRX to make it compatible with latest - DJGPP/GCC. -05/03/08 correction to polytest.pas -04/09/27 more changes to graph.pas, jpgtest.pas, imgview.pas, - by Frank Heckenbach. -04/09/17 more changes to grx.pas and graph.pas, by Frank Heckenbach. -04/06/06 more changes for same purpose by Peter Gerwinski. -04/04/25 changes to introduce: - HAVE_UNIX_TOOLS, CROSS_PLATFORM in makefefs.grx and configure - w32 (mingw32) target in configure - corresponding changes in makefiles, - by Frank Heckenbach and Peter Gerwinski. -04/03/28 changes in grx.pas to make it compile with recent versions of - gpc, by Frank Heckenbach. -03/12/27 Close the framebuffer if DGA is compiled with framebuffer - support, not without it, by Dimitar Zhekov. -03/12/27 Version 2 of the raw driver. Support for psf2. Better - support for RAW: up to 16x32, assuming width:height 1:2 - (the previous code was always assuming width = 8), - by Dimitar Zhekov. -03/12/27 Small bug in grxprint.c, by Andris Pavenis. -03/12/27 Version 2 of the libGRX DGA2 driver. Features set mode - via DGA2 and rendering via Xlib or linear framebuffer, - by Dimitar Zhekov. -03/12/27 Up to 200 the possible modes in the DGA2 driver, by Dimitar - Zhekov. -03/12/27 A batch mode for speedtst. Usage: run speedtst to see the - mode numbers, then "time speedtst MODE" or [4dos] "timer ^ - speedtst ^timer". Maybe "first" should be named "prompt", - by Dimitar Zhekov. - -03/07/17 ----------- GRX v2.4.6 released (Mariano Alvarez Fernandez) -03/07/15 fdv_win.c: the resource header fields must be swapped, - not the data they "point" to, by Dimitar Zhekov. -03/07/15 Changed the default to 'n' for the USE_INOUTP_FRAMEDRIVERS - switch in makedefs.grx -03/06/25 In the svgalib driver don't re-setting the initial mode if - it's already set, by Dimitar Zhekov. -03/06/23 define alloca to __builtin_alloca in src/include/allocate.h - to avoid warnings in Mingw with gcc 3.x. src/makefile.lnx, - src/makefile.x11: don't link ADDON_LIBS for UTILP. - src/stdobjs.mak: remove any duplicate definitions and - trailing \-s. src/text/buildfnt.c: produce a more readable - bdump() DEBUG output, by Dimitar Zhekov. -03/06/23 The GRX raw keyboard I/O can't be safely used in text mode. - Fixed it in test/bgi/, by Dimitar Zhekov. -03/06/10 Small fixes, replaced some printf with DBGPRINTF, removed - GrKeyPressed test in debug mode, it can't be used in all - plattforms, by Dimitar Zhekov. -03/06/10 Small chamges to fdv_win.c, better name/family supportm, avoid - possible overflow, by Dimitar Zhekov. -03/06/10 More Pascal updates, by Frank Heckenbach. -03/05/31 Small fixes to fdv_fna.c and fdv_xwin.c, by Dimitar Zhekov. -03/05/31 Pascal demos updates, by Eike Lange. -03/05/03 Added a InvalidateRect in the loadcolor function in the Win32 - videodriver, now the play-palette bgi demo works properly. - I think the Win32 driver is now very usable, not more in alpha. -03/05/03 Faster w32_drawpixel function in the Win32 framedrivers. -03/05/02 Small patch for the next GPC version, by Frank Heckenbach. -03/05/02 Small test fixes, by Dimitar Zhekov. -03/05/02 Added a cleanall target to the borland makefile, - by Dimitar Zhekov. -03/04/02 Added new video driver for Xfree86 DGA2 (Direct Graphics Access), - experimental, not compiled by default, you must activate it in - makedefs.grx, by Dimitar Zhekov. -03/03/31 New 8bpp frame driver (by Josu) and 24 bpp frame driver (by me) - for Win32. They use the standard GRX framedirvers plus the - necesary InvalidateRects. Now the Win32 version is faster and - reliable. -03/03/31 With the Thomas idea of using a DIB in the win32 video driver, - we can now use the DIB like a linear frame buffer, so the new - win32 framedrivers can take advantage of the standard GRX frame - drivers, by Josu Onandia. -03/03/31 Use a DIB for the hDCMem in the win32 video driver, - by Thomas Demmer -03/03/11 The alternate linux console input driver now calls - _LnxfbSwitchConsoleAndWait if _lnxfb_waiting_to_switch_console - is set. -03/03/11 Changes to the linuxfb driver. Added code to catch a signal - when user wants to change virtual terminals. The driver sets - _lnxfb_waiting_to_switch_console and the input driver must - calls _LnxfbSwitchConsoleAndWait then. - Previous function _SwitchConsoleLnxfbDriver renamed to - _LnxfbSwitchConsoleVt, not used,is here only for possible - future use. -03/03/10 Some more adjustments to GPC changes. This time, however, - there will be backward-incompatible changes (WRT …smname' - etc.). Therefore, I'm using a compiler version check, so it - should work with old and new GPC versions. At this occasion, - I'm also removing the old-style external variable syntax - (of GPC versions prior to 2000-04-12) from graph.pas, by - Frank Heckenbach. -03/03/10 Changes the x11 font driver to use it's own X11 display - and window. It allows X11 fonts to be loaded before GrSetMode() - and makes the font driver independent from the X11 video and - frame drivers, by Dimitar Zhekov. -03/03/10 Syncs ulheight/ulpos calculation in the X11 font driver with - all other drivers for which ulheight isn't known, by - Dimitar Zhekov. -03/02/27 Changes to the .fna font driver: undpos is not supported and - fix driver inability to read fonts with 2+ nonempty "note", - by Dimitar Zhekov. -03/02/26 Get rid of GRXMain in test programs, we use main now. -03/02/12 Sanitize the Thomas changes. -03/02/12 Changes to the win32 videodriver. Instead of begin with WinMain - and start a thread with the main GRX program, do it backward: - begin in main and start a thread to handle the Windows window. - With this change we get rid of the awful GRXMain special entry - point and GRX compiles now with CygWin, added the new platform - to grx20.h, by Thomas Demmer -03/02/11 Some small bugfixes for the Pascal units, by Frank Heckenbach. -03/01/14 Pascal units rewritten, this is to make the formatting more in - line with the GPC conventions, by Frank Heckenbach. -02/12/29 The alternate linux console input driver now works with PS2 and - IMPS2 mice (but the whell is not used). -02/12/21 Added function to change virtual terminals in the linuxfb - driver, _SwitchConsoleLnxfbDriver to be called from the input - driver (it doesn't work yet). -02/12/21 Some cleanups to the linuxfb driver, now the text screen restart - ok on exit. -02/12/13 Added 8bpp paletted mode to the linuxfb driver, - by Josu Onandia. -02/11/24 In fdrivers/lfb8.c, lfbbltrv.c, lfbbltvr.c and lfbbltvv.c - there was a erroneous test on LBF_BY_NEAR_POINTER instead - LFB_BY_NEAR_POINTER, reported by . -02/11/24 Changes avoid some warnings given by `-W' in graph.pas, by - Frank Heckenbach. -02/11/24 The test program launcher, demogrx, has now two pages. Added - some fontdemos. -02/10/27 Modetest shows the actual resolution when in graphics mode. -02/10/26 Corrected bug in fdrives/ram4.c, if the GR_UNDERLINE_TEXT - flag was set colors were wrong, reported by Alex. -02/10/26 Corrected bug in draw/bitblt1b.c, bad source origin if the - destination origin was negative, by Alex - Changed bb1test.c test program to see the efect. - -02/10/20 ----------- GRX v2.4.5 released (Mariano Alvarez Fernandez) -02/10/18 Changed __MINGW32__ to _WIN32 in Pascal units, by - Frank Heckenbach. -02/10/16 Updated the configure script, by Frank Heckenbach. -02/10/02 Corrected bugs in GrFloodFill, before it didn't paint the - righter point (causing ocasionall aborts too) and didn't - work on subcontexts. -02/08/27 Updates to the fdv_raw font driver, the loadfont source - now does a cleanup to close the font file, fontdemo test - program updated, by Dimitar Zhekov. -02/08/10 Make the test/bgi programs depend of a unique file header - for input and delay functions. -02/08/10 New api functions with a unique color parameter in 0xRRGGBB - format: - GrColor GrAllocColor2(long hcolor); - GrColor GrAllocColor2ID(long hcolor); - void GrQueryColor2(GrColor c,long *hcolor); - void GrQueryColor2ID(GrColor c,long *hcolor); -02/08/06 Added 'setsuid' target to test/makefile.lnx and - test/bgi/makefile.lnx. Now you can run 'make -f makefile.lnx' - in the grx base directory an them become root and run - 'make -f makefile.lnx setsuid'. -02/08/06 Use the SET_SUIDROOT variable in test/bgi/makefile.lnx, - by Dimitar Zhekov. -02/08/06 Fontdemo update, by Dimitar Zhekov. -02/08/02 Modifications to acomodate new options in makedefs.grx, - for the four standard platforms: - INCLUDE_BGI_SUPPORT, 'y' by default - for the linux console platform: - USE_SVGALIB_DRIVER, 'y' by default - USE_FRAMEBUFFER_DRIVER, 'y' by default - SET_SUIDROOT, 'y' by default - USE_INOUTP_FRAMEDRIVERS, 'y' by default - Added a note about "Suidroot in the Linux console platform" - in the readme file. -02/07/29 Revert some changes in the bgi test demos to compile again - with DJGPP. -02/07/29 Corrected an off-by-one error in the raw font driver, by - Dimitar Zhekov. -02/07/29 16-bit fix for BGI and GRX. __gr_WR must match GrColor, by - Dimitar Zhekov. -02/07/29 Changes to the BGI interface, by Dimitar Zhekov. - Inline functions defined as macro and non-inline versions. - BGI number of colors for DOS / BCC limited to < 15bpp. - BGI aspect ratio fixed for 16-bit systems (DOS / BCC). - _BGI_INLINE_ moved to fldfill.c, the only module that uses it now. - Inline functions in text4.c replaced with macros. - Test\bgi\colortst.c fixed to use getch() not getchar(). -02/07/21 Make bccbgi works with Borland C, by Dimitar Zhekov. -02/06/17 Added fontdemo test program, by Dimitar Zhekov. -02/06/17 Added the GrDumpFnaFont fucntion, to save a fon in a ascii - fna file, by Dimitar Zhekov. -02/06/12 Three new font drivers by Dimitar Zhekov: - * RAW driver - for RAW data and Linux PSF (not PCF) files. RAW - data files must be 8 points wide. 512 character PSF files are - supported. For the PSF files contained in Linux systems to be - readable with GRX, you'll have to unzip them. - * FNA driver - for the ascii font format used by grx 1 font - read/write tool. A doc about this format was added to the doc - subdirectory. - * WIN driver - for MS Windows FNT and RES files. FNT versions 2 - and 3 are supported, 32-bit RES and FON files are not. The first - resource from RES is used. As far as I know, all MS Windows-es - from 2.0 to NT 4.0 use FNT version 2 and 16-bit resources packed - into FON for raster fonts. To use the MS Windows .FON files, - split them into .FNT or .RES files using a resource editor. - Note. Big endian support is untested. -02/06/12 Fixes for src/makefile.bcc and test/makefile.bcc, - by Dimitar Zhekov -02/04/29 GrResizeSubContext uses now the parent context coordinates. -02/04/29 Reverted some 'const' that didn't make sense. -02/03/31 The win32 driver accepts arbitrary (user defined) resolution. -02/03/14 A new global switch _GR_textattrintensevideo (false by default) - permits the use (when true) of 16 background colors in - GR_ATTR_TEXT strings. -02/03/13 When the close icon is pressed in the w32 version a dialog - is issued warning it aborts the program. -02/03/12 Fixed some bugs introduced with the new win32 input queue. -02/02/11 The makefile install target installs the grxprint.h file - if printer support is activate -02/02/11 Inprovements to the win32 driver: - Now the GRX window is properly closed, so the previous app - gets the focus. -02/02/02 Inprovements to the win32 driver: - The w32 imput queue implemented as a circular queue. - All the input related code moved to w32inp.c from vd_win32.c - The main window is created in WinMain, so the grx program - can use other videodrivers like the memory one. - Now the printer stuff compiles and run, checked with the - DeskJet driver, printing to a file and them "copy file lpt1", - but the printout is not totally correct (?). - -02/01/11 ----------- GRX v2.4.4 released (Mariano Alvarez Fernandez) -02/01/09 Modified the demogrx test program to center the image when - a mode bigger than 640x480 is selected -02/01/09 Added an alternate linux console input driver, it handles - the mouse directly openning /dev/psaux, but note only PS/2 - mouses work by now. It must be activate explicitly by - uncomenting the switch "USE_DIRECT_MOUSE_DRIVER=y" in - "makedefs.grx" -02/01/09 The linux framebuffer video driver now set the console in - graphics or text mode when necesary. Now the text cursor is - not show, and the svgalib mouse input driver doesn't collide - with GPM, so, surprise!, it works! -02/01/09 Small changes to improve the linux console input driver -02/01/07 More patches to the Pascal interface, by Frank Heckenbach and - Maurice Lombardi -02/01/02 Go to full screen in the Win32 driver if the requested framemode - dimensions are equal to the screen dimensions (setting the - client start area at 0,0). -01/12/22 More patches to the Pascal interface, by Frank Heckenbach and - Maurice Lombardi -01/12/22 Added an optional configure script, by Frank Heckenbach -01/12/21 The linuxfb driver now open /dev/fb0 by default. An alternative - frame buffer device can be specified setting the environment - variable $FRAMEBUFFER -01/12/21 pascal ega colors are now functions, by Frank Heckenbach -01/12/21 fixed some borland bgi incompatibilities, by Frank Heckenbach -01/12/21 added 'const' (C) and 'protected' (Pascal) to some - function parameters, to make them a little "safer", - by Frank Heckenbach -01/12/16 Added imgview.pas and colortst.pas demo programs, by - Frank Heckenbach -01/12/16 Change in the pascal interface: GrAllocEgaColors, GrGetScanline, - etc. return a pointer to an array of GrColor, rather than to a - single GrColor, by Frank Heckenbach -01/12/16 Make installation of shared libraries optional on Linux/X11 - by Frank Heckenbach -01/12/16 GrSaveContextToGrayJpeg added to the pascal interface, by - Maurice Lombardi -01/11/29 better w32 keyboard handling. Now most special keys with - shift, alt and control combinations works -01/11/29 added jpeg functions to grx.pas and jpgtest.pas demo, by - Maurice Lombardi -01/11/29 patch to define gpc-main in grx.pas and graph.pas, by - Frank Heckenbach -01/11/29 patch to remove warnings on unix in test/bgi programs, by - Frank Heckenbach -01/11/16 Added new function: GrSaveContextToGrayJpeg. Now - GrLoadContextFromJpeg can load grayscale jpeg files -01/11/08 jpgtest test program added. It works too without jpeg support - and shows a message -01/11/08 New jpeg functions (GrSaveContextToJpeg, GrLoadContextFromJpeg, - GrQueryJpeg, GrJpegSupport). Added dummy functions if there - isn't jpeg support -01/11/07 Added new targets to makefiles: install-info, unisntall-info. - Now install doesn't install info (readme file updated) -01/09/08 Applied additional patches to update Pascal interface, new - polytest.pas demo, by Maurice Lombardi -01/09/07 Applied patches to update the Pascal interface, by - Frank Heckenbach. Note, the "bgi2grx" unit was renamed to - "Graph", so it will be BP compatible and more natural to - Pascal programmers - -01/06/28 ----------- GRX v2.4.3 released (Mariano Alvarez Fernandez) -01/06/27 Added new targets to makefiles: install-bin, uninstall-bin, - install-fonts and uninstall-fonts (readme file updated) -01/06/26 Moved bin2c, fnt2c, vesainfo, lfbinfo and modetest to - src/utilprog. They are build in the source makefile. -01/06/22 Except for the w32 version the install target installs the - info manual. As suggested by Maurice Lombardi and Waldemar - Schultz -01/06/21 pngtest test program added. It works too without png support - and shows a message -01/06/20 Changed BCCGRX cleardevice function to clear the screen to - the current BACKGROUND color instead of black. Suggested by - Waldemar Schultz -01/06/19 ctx2png functions (GrSaveContextToPng, GrLoadContextFromPng, - GrQueryPng, GrPngSupport) integrated in GRX. src/pnm subdir - renamed to src/gformats. Added dummy functions if there isn't - png support -01/06/18 New API functions: GrLoadContextFromPnmBuffer and - GrQueryPnmBuffer - -01/06/15 ----------- GRX v2.4.2 released (Mariano Alvarez Fernandez) -01/06/12 Modified win32 input code for GrMouseGetEvent and GrKeyRead - work at the same time, when GrMouseEventEnable(1,0) is set -01/06/07 Merged makedefs.gnu, makedefs.x11, makedefs.dj2 and - makedefs.w32 in makedefs.grx (readme file updated) -01/06/06 Now we can use "GRXMain" for all GRX versions, grx20.h defines - it like "main" except for the win32 version. Deleted the ugly - "#ifdef __WIN32__ ..." in test programs (except for BGI tests) -01/06/05 Added the Linux framebuffer videodriver (vdrivers/vd_lnxfb.c) - alpha stage, only in 16 or 24 bpp. To use it set GRX20DRV to - "linuxfb" in the GRX Linux version. The mouse doesn't work -01/06/05 Some minimal changes to compile ok with gcc 2.96 and - Linux 2.4.x -01/05/30 Applied patch to sanity bgi code for gcc 3.0, by Andris - Pavenis -01/05/28 Modified makefiles for linux and x11. Now they build - shared and static libs at the same time. Added install and - uninstall targets. -01/05/16 Applied patch to add standard pascal makefiles for dj2, w32, - x11 and lnx. pascal/bgi/test and pascal/bgi/demo merged in - pascal/bgi. Pascal readme updated. By Maurice Lombardi -01/05/09 Applied patch to produce makefiles for mingw32 pascal tests - by Maurice Lombardi - -01/04/26 ----------- GRX v2.4.1 released (Mariano Alvarez Fernandez) -01/04/25 User's guide (info) updated, by Vicente Fuentes Gea -01/04/20 User's guide (html) updated -01/04/19 Applied partially patches to make GRX compile with MS-VC - by Hartmut Schirmer -01/04/18 Added install and uninstall targets to src/makefile.dj2 and - src/makefile.w32 -01/04/18 Patched src/bgi/text7.c to compile Ok with GCC 3.0 - by Andris Pavenis -01/04/14 New API routine: GrBitBlt1bpp, contributed by Josu Onandia - Added bb1test.c test program -01/04/01 Changed compiler options from "-O6 -fomit-frame-pointer" to - "-O2" only. Suggested by Andris Pavenis. -01/03/27 drawpattern and bltr2v_24 added to fdrivers/fd_win32.c -01/03/26 Fixed a bug in pnm/ctx2pnm.c, when grx == NULL the actual context - must be used. Reported by Vicente Fuentes Gea -01/03/25 The dj2 version uses now "uclock" in mouse/input.h to get 1ms - resolution in input code. Because "uclock" can be unsafe in W3.1 - when NO_REPROGRAM_TIMER is defined the old code is used. A - comment has been added to makedefs.dj2 -01/03/25 Changed CLOCKS_PER_SECOND by CLK_TCK for linux in mouse/input.h - to get real ticks per second -01/03/24 New API routines: GrSetWindowTitle and GrSleep -01/03/22 Changed DJGPP test macro from __GO32__ to __DJGPP__ - by Andris Pavenis - -01/03/18 ----------- GRX v2.4 released (Mariano Alvarez Fernandez) -01/03/16 Win32 drivers improved again by Josu Onandia -01/03/15 Make bccbgi to use ../rand.h to work with the Win32 drivers -01/03/14 Added ifdef to demo programs to use GRXMain with the Win32 drivers -01/03/12 Fixed a bug in mouse/xwinkeys.c, preventing getkey & kbhit work - together (Now bccbgi demo works properly in X, except restoring - from text mode) -01/03/10 Support for DJGPP v1 removed (really only removed makefiles by now) -01/03/10 Optimized pnm/ctx2pnm.c, contributed by Josu Onandia -01/03/10 Improved frame and video drivers for win32, by Josu Onandia - -01/03/06 Integrated the win32 version written by Gernot Graeff - -01/03/05 Fixed bug in modetest.c preventing 32 bpp modes to work. -01/03/04 Applied patch to solve 32bpp problems, by Hartmut Schirmer -01/03/03 Applied patch to make GRX compile with gcc 3.0, by Andris Pavenis -01/03/03 Fixed bug in pattern/fillpatt.c -01/02/26 Modified setmode.c and svgalib.c to set frame pointer dinamicaly - and fix the svgalib video driver. -01/02/22 Applied some patches by Maurice Lombardi - -01/02/20 Fixed bug in pattern/patfbox.c -01/02/14 Fixed bug preventing GrLoadFont work with BGI fonts - -01/02/12 ----------- GRX v2.3.4 released (Mariano Alvarez Fernandez) -01/02/06 user's manual in info format contributed by Vicente Fuentes Gea - -01/02/01 new WIN32 Mingw32 target (memory driver only) -01/01/28 ctx2pnm functions added. -01/01/28 user's manual updated again. -01/01/28 new test programs added: pnmtest and demogrx. -01/01/28 some test programs bug fixes. -01/01/28 pascal subdirectory update contributed by Eike Lange - - -01/01/24 ----------- GRX v2.3.3 released (Mariano Alvarez Fernandez) -01/01/21 BGI test programs moved to test/bgi -01/01/21 Added the updated GRX user's guide. -01/01/20 BCC2GRX license comments changed to point to the GRX license. -01/01/20 Sources changed to point to the copying.grx file -01/01/10 Applied some patches by Andris Pavenis. - -00/09/14 ----------- GRX v2.3.2 released (Peter Gerwinski) - -00/06/21 ----------- GRX v2.3.1 released (Peter Gerwinski) -00/06/21 Some bug fixes (solved problems induced by the update). - -00/05/20 ----------- GRX update released (Hartmut Schirmer) -00/05/20 Added AIX support in grx20.h, xwininp.c, allocate.h as - suggested by Andris Pavenis . - Added BGI-Support from BCC2GRX. -00/05/19 Don't use GCC/i386 asm in highlow.h on gcc after v2.8.x -00/05/17 Added test/sbctest.c contributed by - Mariano Alvarez Fernandez - Fixed additional subcontext bugs in GrPatternFilledLine - and GrPatternFilledPlot (reported by Mariano Alvarez - Fernández ) - Applied the 32bit X11 patch by Ulrich Leodolter -00/04/23 Applied some changes suggested by Josu Onandia - - - pattern/patfbox.c: Context offset wasn't added - to drawing coordinates - - text/buildfnt.c: Fixed a typo, pointer to passed - free() not same as returned by malloc() - - mouse/drawcurs.c: Incorrect calculation of mouse - cursor work area - Applied asm bugfixes by Ian Miller - required for EGCS/GCC compilers after v2.8.x - and for binutils after v2.9.1 - Changed GRX internal version to 0x0231 - Changed return type of main in test/textpatt.c to int -00/04/06 Fixed an uninitialized variable reported by Josu Onandia - n wideline/drwcpoly.c -98/06/28 Updated addons/print test files - Added a note to DJGPP & BCC src/makefiles that command.com - is required as shell -98/06/08 GCC asm enhancements (arith.h,ioport.h,highlow.h) -98/06/07 fine tuning mach64 banking functions -98/06/06 Fixed a typo in addons/ctx2jpeg.c - DJGPP&BCC didn't cleanup the addons subdir's - DJGPP v1 failed on grxprint.c compilation - Added optimized GCC/i386 asm repfill_b code - -98/06/03 ----------- GRX v2.3 released (Hartmut Schirmer) -98/05/26 Fixed a bug in gcc/highlow.h -98/05/24 Printing code synced with Andris - Some additional files needed memcopy.h - X11R6 driver was broken (XInitImage) -- fixed -98/05/20 DOS _GrUpdateInputs() still used getxkey -- fixed - ram3x8, ega4, herc1 & dosinput didn't include memcopy.h - System endian can now be defined by -D_BIG_ENDIAN or - -D_LITTLE_ENDIAN at compile time -98/05/19 GrSetFontPath() still used alloca -- fixed - Again fixed minor problems in printing code: - - some functions where declared extern but - implemented static - - signed / unsigned problem in RepeatByte() -98/05/18 Update printing support. - There were no RAM drivers for 1 & 4bpp in X11 - build. - Fixed a bug on short hlines in ram1 & ram4 - GRX uses it's own memcopy now -98/05/17 Watcom makefiles changed for DEBUG support and - .dat copy from test/ to bin/ -98/05/14 Some code fixes to avoid warnings fron SUN cc -98/05/13 Minor changes to avoid warnings on several platforms - (eg, eliminated C++ style comments, non ASCII chars, ...) -98/05/11 Fixed LFB frame buffer address handling when - LFB_BY_NEAR_POINTER active - JPEG & TIFF save now use GrGetScanlineC() and - malloc() instead of alloca() -98/05/10 Fixed a typo in watcom/memfill.h - GCC v2.8.1 broke dependency file creation under - DJGPP v2, no subdir information was included for - the target. The gcc -MM output is now passed through - a new sed script and the created dep-file should be - ok on any version GCC. Same change for Linux and X11 - makefile. This change makes Watcom makefile creation - by utils/watmake work again. - Again fixed Watcom makefiles - Added -DGRX_DEFAULT_FONT_PATH="...." configuration for - default font path when no GRXFONT environment entry - specified. This is mostly useful on Unix platforms. - Getting scanline changed for GrPixel / GrPixelC - like naming: GrGetScanline && GrGetScanlineC -98/05/07 Watcom updates (bmp/printing/makefiles) - Minor BMP & printing updates for better Unix support -98/05/06 Fixed a bug in _GrFrDrvGenericStretchBlt() - Fixed potential bug in GrImageFilledBoxAlign() -98/05/05 GrGetScanline && GrPutScanline functions added -98/05/04 GCC/i386 peek_24 was broken - Image streching fixes and imgtest prog -98/05/03 Added getindexscanline() and putscanline() to frame - drivers and implemented generic versions. - Added _GrFrDrvGenericStretchBlt() using integer - arithmetic and the new scanline functions. - Fixed dynamic memory allocation bugs im image code. - GrImageStretch() now uses _GrFrDrvGenericStretchBlt() -98/04/30 Pascal definition for GrGetLibrarySystem - Changed VBE2 memory mapped IO support so a buggy BIOS - won't break the code that easily -98/04/28 Pattern filling uses predefined _GrPatternFiller instead - of local initialized var - S3 drivers banking functions enhanced - Unified DJGPP & Watcom VBE2 code -98/04/27 Fixed problems in font loading code on big endian systems - Updated Watcom support - Again eliminated some empty macro args - Added GrGetLibrarySystem() returning GRX_VERSION for - portable runtime system check -98/04/26 Fixed a bug introduced when changing pattern filled text - code -98/04/22 (Pattern-) fill code unified & simplified. - Fixed a filling bug on big endian systems. - Makefiles updated (printing, zlib) - Configuration switches for 'noisy' compilers - Code cleanups and splitted some files -98/04/21 Better cooperation between X11 and GRX in Pseudocolor mode - Added GrAllocEgaColors() for allocation standard EGA colors - Borland-C++ 4bpp blit was broken. - Relaxed some macro argument handlings for older BCC versions -98/04/20 GRX should work on X11R5 systems now. - Added some new key definitions (shift left/right/up/down). - Changed inline -> INLINE for portability. - Removed empty arguments in clipping.h - Again fixed minor problems. -98/04/15 Added X11 driver changes by Ulrich. Fixes the XGetImage problem. - Fixed several portability problems, mainly removed cast - to (unsigned) int of assigned variables. - Fixed some bugs Thomas found in the ALPHA code - Changed temp. memory allocation. New function ALLOC() - will use malloc if SMALL_STACK defined of alloca otherwise. - Watcom assembler code didn't work. Changed the #pragma - definitions so they don't use macros. - Fixed several minor bugs -98/04/13 Fixed minor bugs in X11 driver. -98/04/06 Checked GNU-Pascal support (basic functions only) -98/04/05 Minor bugfixes and some GCC/386 speedups (copy & fill - loops aligned on 16byte boundary for optimal performance) - Changed the mouse timing information to real world time - instead of user process time (X11 & Linux) - GrMouseGetEventT will only return a valid ev.dtime if - any event occured -98/04/02 Faster VGA8X line drawing - The far (eg. to video ram) peek and poke operations - won't get optimized away any more (solves 4bpp blit bug) -98/03/31 Added 64 bit support (_h) - Fixed a bug in egavga1.c/drawvline -98/03/30 Integrated Gary's Watcom changes. - Watcom port now defined LFB_BY_NEAR_POINTER - Added _n as near/normal opposite of _f in macro names to - avoid empty arguments in macro calls -98/03/27 Borland port now uses RAM3x8 in 24bpp and 32bpp modes - Fast and robust colfill_... functions for Borland - Updated image support -98/03/19 24bpp mode changed: - - Added repfill_24 and optimized peek_24/poke_24 - - dropped access24.h (only color component access left) - - LFB24 and RAM24 now use the same code. - - Optimization for black/grey/white filling: done by repfill_b - Fixed some Linux/386 shared lib problems (can't use EBX with -fPIC) -98/03/17 Major code rearrangement: (Watcom port may be broken :(( - - A lot of frame driver now share code and use much - more optimized (!= generic) drawing functions - - Generic and asm fwdcopy/revcopy functions for blitting - - splitted header files to individual system files - (filling, copying, ...) for better maintaince and - easier optimization - - much work on BCC speed & stability - - Expect the Watcom port to be broken :(( - Added Andris latest changes to the printing system -98/02/25 Fixed X11 keyboard handling - minor changes for BSD compilation - updates to printing system -98/02/24 Fixed a bug in GrDestroyPattern() when freeing the - bitmap planes (found&patched by Michal). - access24.h needed another fix for linux shared lib :( -98/02/20 Added BMP file read && image display contributed - by Michal Stencl - Added JPEG context save by Vincenzo Morello -98/02/19 Watcom makefiles, fixes to print system - Changed access24.h for shared library compilation - on Linux-i386 systems -98/02/17 Watcom fixes and addons by Gary - Fixed svga4, lfb8 and vga8x blit functions - Added color selection by bpp to GrSetMode - Added patterned text output by Stencl Peter - Added printing support (thanks again Andris!) -98/01/13 fast RAM to video blit to 16 color driver - fast hline for 16 color RAM driver -98/01/08 Watcom support integrated. Code cleanup (eg. gcc - multi line strings cleaned for other compilers) - Added platform dependent lib-subdirs - Fixed some Linux/svgalib keyboard bugs -98/01/01 Revised keyboard support as suggested by Andris and - Vincenzo. See new grxkeys.h file in include dir! -97/12/21 Updated DJGPP (v1&v2) makefiles again. - Fixed some GCC warnings with additional -W... switches - (WARNOPTS in makedefs.gnu) - Fixed a BCC problem with the new 16 color blit function - Some local functions didn't have a static :( - Fixed some Linux && X11 keyboard problems (input got - desynced on heavy load / high keyrates) -97/12/18 updated Pascal support - BCC allocates from heap instead of stack for big blocks - eliminated some unchecked malloc's - Splitted several code files for smarter linking - BCC arithmetic moved from assembler macro to optimized - function for more reliable results -97/12/16 ported the flood fill function from BCC2GRX. See grx20.h - for ...FloodFill -97/12/15 changed ulong, ushort, etc to GR_int32u, GR_int16u, etc - for better portability and to avoid warnings on Linux -97/12/08 Integrated code (variable X11 window size & memory driver) - and patches (genellip & SaveContextToTiff & other) by Andris -97/11/16 Updated Linux and X11 makefiles -97/11/02 Makefiles for DJGPP v1 compilation - New (much faster) 16 color video to video blit routine -97/11/01 Fixed some far pointers to RAM area in the video drivers -97/10/29 Added ALPHA processor support -97/10/01 Fixed DJGPP systag generation in SRC makefile -97/09/30 Updated makefiles and makedefs - Added the addons directory and the SaveContextToTiff - function - Fixed some BCC specific warnings - S3 driver banking doesn't work for 16 color modes, at - least for my card. Uses VESA banking for < 256 colors - Fixed BCC __emit__() code in arith.h (thanks, Andris) -------- grx v2.2 release diff --git a/thirdparty/grx249/doc/copying.cb b/thirdparty/grx249/doc/copying.cb deleted file mode 100644 index e6f7c19..0000000 --- a/thirdparty/grx249/doc/copying.cb +++ /dev/null @@ -1,50 +0,0 @@ -This is the original Csaba Biegl copying file, it will be here until -all source files will be updated to point to ../copying.grx -The license terms have not changed. - --------------------------------------------------------------------- - -This is file "copying.cb". - -This document describes the terms for distributing the source code of and any -derived work based on the GRX graphics library. Such source code is marked -with the copyright notice: - - "Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221" - -Source code with the above copyright is distributed under the following terms: - - (1) The test programs for the graphics library (code in the 'test' - sub-directory) is distributed without restrictions. This code - is free for use in commercial, shareware or freeware applications. - - (2) The GRX graphics library is distributed under the terms of the - GNU LGPL (Library General Public License) with the following amendments - and/or exceptions: - - - Using the DOS versions (DOS only! this exception DOES NOT apply to - the Linux version) you are permitted to distribute an application - linked with GRX in binary only, provided that the documentation - of the program: - - a) informs the user that GRX is used in the program, AND - - b) provides the user with the necessary information about - how to obtain GRX. (i.e. ftp site, etc..) - - (3) Fonts (in the 'fonts' directory) are distributed according to the - terms in the file "COPYING.MIT". Most of the fonts included with the - GRX library were derived from fonts in the MIT X11R4 distribution. - The exception is the "pc" BIOS font family, which is distributed - without restrictions. - -A copy of the GNU GPL (in the file "COPYING") and the GNU LGPL (in -the file "COPYING.LIB") is included with this document. If you did -not receive a copy of "COPYING" or "COPYING.LIB", you may obtain one -from where this document was obtained, or by writing to: - - Free Software Foundation - 675 Mass Ave - Cambridge, MA 02139 - USA - diff --git a/thirdparty/grx249/doc/credits.doc b/thirdparty/grx249/doc/credits.doc deleted file mode 100644 index 7d32ed3..0000000 --- a/thirdparty/grx249/doc/credits.doc +++ /dev/null @@ -1,123 +0,0 @@ -CONTRIB.DOC -=========== - -GRX was original written by Csaba Biegl -for DJ Delorie's DOS port of the GCC compiler. - -Michael Goffioul released GRX 2.1a -(first full API implementation). - -Starting from version v2.2 GRX was maintained by Hartmut Schirmer -. - -Peter Gerwinski released GRX 2.3.1 and 2.3.2. - -Mariano Alvarez Fernandez (malfer@telefonica.net) released GRX 2.3.3, -2.3.4 and the 2.4.0-6 series. - -Maurice Lombardi packed together -various contributions to release GRX 2.4.7-9 - -Credits for GRX > v2.0 in alphabetical order -============================================ - -Csaba Biegl for the post v2.0 developers -source code (and of course: MANY THANKS FOR THE GREAT GRX LIB !). - -N. D. Culver for suggesting the bpp based color -spec with GrSetMode(). - -Thomas Demmer for inprovements and good ideas -with the win32 driver. - -Frank Donahoe for bug reports and patches. - -Vicente Fuentes Gea for the info version of the -user's manual. - -Michael Goffioul for his GREAT work: - - Pattern Filled functions - - Patterned Line functions - - Custom Line functions - - User Coordinates functions - -Gernot Graeff for the Win32 driver. - -Thomas Hahn for the ALPHA -processor patches (64bit support). - -Frank Heckenbach for Pascal interface updates, -configure script and many others inprovements. - -Sven Hilscher for GNU-Pascal interface and -bug reports. - -Eike Lange for Pascal updates. - -Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] for linear framebuffer -support. - -Maurice Lombardi for many patches -and bug reports. - -Peter C. Mehlitz for his suggestions on -Linux and X11 event time handling - -Vincenzo Morello continous using GRX as base -graphics API for his MGUI lib. He submitted many suggestions, -found lots of bugs and contributed the SaveContextToJpeg() code. - -Josu Onandia for patches, bug reports -and lot of inprovements to the Win32 driver. - -Andris Pavenis for many suggestions, the -memory driver, printing support, variable X11 resolution, patches -and bug reports. - -Gary Sands did the Watcom C++ port. - -Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz> for Linux shared -libraries and bug reports. - -Anton Norup Soerensen for patches and bug reports. - -Michal Stencl for the pattern text -output, BMP handling and image display functions. - -Waldemar Schultz for bug reports. - -Michael for bug reports. - -Dimitar Zhekov for three new font drivers, makefile -fixes for the bcc version, bgi updates, X11 fixes and the Xfree86 DGA2 -video driver. - -########################################################################### -This is the original contrib.doc by Csaba Biegl (csaba@vuse.vanderbilt.edu) -########################################################################### - -This is a (far from complete) list of people who sent me ideas, bug reports -or useful code pieces during the development of GRX 2.0. - -This file is under construction (I need to go back in my e-mail records to -see who sent me bug reports, ideas, etc...). Currently it has only the most -recent contributions. If you think you sent me something for which you should -be mentioned here, but you don't see your name in the list, drop me an e-mail. -I may have lost same of the older correspondence. - -Hartmut Schirmer (hsc@techfak.uni-kiel.de) for many good ideas, bug reports, -the BGI font loader sources and the protected mode VESA paging code. - -Christian Domp (alma.student.uni-kl.de) for bug reports, the 90x30, 94x30 -90x34 and 94x34 text modes in the stdvga driver and for fixing the HiColor -and TrueColor modes in the et4000 driver. - -Ulrich Leodolter (ulrich@lab1.psy.univie.ac.at) for the wonderful X11 -video, frame and font drivers, bug reports and the DOS Hercules video -driver. - -Daniel Skarda (DSKA4435@novell.karlin.mff.cuni.cz) for bug reports. - -Mauro Condarelli (mc5686@mclink.it) for the Linux SVGA version keyboard -enhancements. - diff --git a/thirdparty/grx249/doc/fna.txt b/thirdparty/grx249/doc/fna.txt deleted file mode 100644 index 1af5a2f..0000000 --- a/thirdparty/grx249/doc/fna.txt +++ /dev/null @@ -1,140 +0,0 @@ -ASCII FONT FORMAT - -This document describes the ascii font format, FNA, as found in GRX 1 font -read/write-tool and GRX 2 FNA driver. - -FILE FORMAT - -An ascii font file consists of lines. Each line consists of zero or more -8-bit characters and is terminated by a line feed, a carriage return or a -carriage return followed by a line feed, depending on the operating system. -Line length must not exceed 129 characters with the line terminators and 127 -characters without them. Trailing blanks are allowed (and ignored), while -leading blanks are not allowed. Lines starting with semicolon are comments. -They are ignored, and so are the blank lines. - -HEADER - -An ascii font file starts with a header. The header must specify at least 8 -font properties. Each property is on a separate line, can only be specified -once and has the general form: - - - -where separator consists of one or more blanks. - -Required properties: - -name - -Font name. - -family - -Font family. - -isfixed <0|1> - -0 for proportional or 1 for monospaced fonts. Any non-zero value is treated -as 1. - -width - -Font width for monospaced fonts. - -avgwidth - -Average font width for proportional fonts. - -Note: monospaced fonts should only specify width, and proportional fonts -should only specify avgwidth. The GRX FNA driver does not check for that. It -expects one width or avgwidth property for each font, no matter the spacing. - -height - -Font height. - -minchar - -The character with which the font starts. Usually 32 (ascii space). - -maxchar - -The character with which the font ends. Must be > minchar. The number of -characters in an ascii font file equals to maxchar - minchar + 1. - -baseline - -Font baseline. 1-based. - -minwidth - -The narrowest character width (proportional fonts only). Must be non-zero. -Ignored by the driver. - -maxwidth - -The widest character width (proportional fonts only). Must be <= 127. Ignored -by the driver. - -Note: the driver does not require minwidth and maxwidth, but any proper ascii -font header should include them when describing a proportional font. - -Optional properties: - -undwidth - -Underline height in lines. The default is height / 15 rounded down, or 1 if -the font height is < 15. - -note - -Comment. May be empty. Any number of comments may be specified. The usual -comments are the font XFDL name and copyright. Ignored by the driver. - -Note: the comments starting with semicolon are always ignored, while the note -comments may be taken into account by a non-GRX driver or program. - -DATA - -The file header is followed by data lines. -Each data lines describe one character scan line by scan line. These -lines must all be characters long, where is the width of the -character being described. Each line describes one character scan line bit by -bit from left to right: period for 0-bit, number sign for 1-bit. A blank line -and a comment are usually placed before each lines to make the file -more readable. Hope my english was good enought, and here is an example: - -; character 36 ($) width = 8 -........ -...#.... -...#.... -.#####.. -#..#..#. -#..#.... -#..#.... -.#####.. -...#..#. -...#..#. -#..#..#. -.#####.. -...#.... -...#.... - -If the character being described is less than 33 (exclamation) or greater -than 96 (asciitilde), the comment is shorter: - -; character 255 width = 8 - -Note: both the blank line and the comment are ignored and DO NOT act as -character data separators. Do not let them fool you and check if there are -exactly data lines for each character. The driver will not read a -file without enough data in it, but will silently ignore any extra data. - -THE END - -No non-blank lines should follow the data, except for semicolon comments. The -driver does not check for that. Placing one blank line after the data is not -a practice. - -For a full ascii font example, see ter-114n.fna in the GRX fonts directory. diff --git a/thirdparty/grx249/doc/grx249um.html b/thirdparty/grx249/doc/grx249um.html deleted file mode 100644 index 9b696c3..0000000 --- a/thirdparty/grx249/doc/grx249um.html +++ /dev/null @@ -1,2470 +0,0 @@ - - -GRX 2.4.9 User's Manual - - - - - - - - - - -
-

GRX -2.4.9

-

a 2D graphics library for DOS, Linux, X11 and Win32

-

User's Manual

-

Based on the original doc written by: Csaba Biegl on August 10, 1992 -

Updated by: Mariano Alvarez Fernández on August 17, 2000 -

Last update: July 10, 2012 -

- -
- -


-Next:  -
- - - -

Abstract

- -

GRX is a 2D graphics library originaly written by -Csaba Biegl for DJ Delorie's DOS port of the GCC compiler. Now it support -a big range of platforms, the main four are: DOS (DJGPPv2), Linux console, -X11 and Win32 (Mingw). On DOS it supports VGA, EGA and VESA compliant cards. -On Linux console it uses svgalib or the framebuffer. On X11 it must work on -any X11R5 (or later). From the 2.4 version, GRX comes with a Win32 driver. -The framebuffer Linux console driver was new in 2.4.2. From 2.4.7 there is a -support for x86_64 bits Linux machines and a support for an SDL driver -on MingW and X11. On MingW and X11 it runs on a window with the original -driver, and either full screen or on a window with the SDL driver. - -

- - -
- -


-Next: , -Previous: Top, -Up: Top - -
- -

GRX2 User's Manual

- - - - - - -

Hello world

- -

The next program draws a double frame around the screen and writes "Hello, GRX -world" centered. Then it waits after a key is pressed. - -

     #include <string.h>
-     #include <grx20.h>
-     #include <grxkeys.h>
-     
-     int main()
-     {
-       char *message = "Hello, GRX world";
-       int x, y;
-       GrTextOption grt;
-     
-       GrSetMode( GR_default_graphics );
-     
-       grt.txo_font = &GrDefaultFont;
-       grt.txo_fgcolor.v = GrWhite();
-       grt.txo_bgcolor.v = GrBlack();
-       grt.txo_direct = GR_TEXT_RIGHT;
-       grt.txo_xalign = GR_ALIGN_CENTER;
-       grt.txo_yalign = GR_ALIGN_CENTER;
-       grt.txo_chrtype = GR_BYTE_TEXT;
-     
-       GrBox( 0,0,GrMaxX(),GrMaxY(),GrWhite() );
-       GrBox( 4,4,GrMaxX()-4,GrMaxY()-4,GrWhite() );
-     
-       x = GrMaxX()/2;
-       y = GrMaxY()/2;
-       GrDrawString( message,strlen( message ),x,y,&grt );
-     
-       GrKeyRead();
-     
-       return 0;
-     }
-     
-
-

How to compile the hello world (assuming the GRX library was -previously installed) -

       DJGPP: gcc -o hellogrx.exe hellogrx.c -lgrx20
-       Mingw: gcc -o hellogrx.exe hellogrx.c -lgrx20 -mwindows
-       X11  : gcc -o hellogrx hellogrx.c -D__XWIN__ -I/usr/X11R6/include
-              -lgrx20X -L/usr/X11R6/lib -lX11
-       Linux: gcc -o hellogrx hellogrx.c -lgrx20 -lvga
-     
-       For the SDL driver:
-       Mingw: gcc -o hellogrx.exe hellogrx.c -lgrx20S -lSDL
-       X11  : gcc -o hellogrx hellogrx.c -D__XWIN__ -I/usr/X11R6/include
-              -lgrx20S -lSDL -lpthread -L/usr/X11R6/lib -lX11
-     
-       For x86_64 systems add -m32 or -m64 for 32/64 bits executables
-       and replace /lib by /lib64 or /lib32 as needed
-     
-
- - - -

Data types and function declarations

- -

All public data structures and graphics primitives meant for usage by the -application program are declared/prototyped in the header files (in the -'include' sub-directory): - -

        * grdriver.h   graphics driver format specifications
-        * grfontdv.h   format of a font when loaded into memory
-        * grx20.h      drawing-related structures and functions
-        * grxkeys.h    platform independent key definitions
-     
-     User programs normally only include include/grx20.h and include/grxkeys.h
-
- - - -

Setting the graphics driver

- -

The graphics driver is normally set by the final user by the environment -variable GRX20DRV, but a program can set it using: - -

     int GrSetDriver(char *drvspec);
-
-

The drvspec string has the same format as the environment variable: - -

     <driver> gw <width> gh <height> nc <colors>
-
-

Available drivers are for: - -

     * DOS => herc, stdvga, stdega, et4000, cl5426, mach64, ati28800, s3, VESA, memory
-     * Linux => svgalib, linuxfb, memory
-     * X11 => xwin, memory
-     * Win32 => win32, memory
-     * SDL (Win32 and X11) => sdl::fs, sdl::ww, memory
-
-

The xwin and win32 drivers are windowed. -The SDL driver on the same systems can be either fullscreen (::fs) or windowed (::ww). - -

The optionals gw, gh and nc parameters set the desired default graphics mode. -Normal values for 'nc' are 2, 16, 256, 64K and 16M. The current driver name can -be obtained from: - -

     GrCurrentVideoDriver()->name
-
- - - -

Setting video modes

- -

Before a program can do any graphics drawing it has to configure the graphics -driver for the desired graphics mode. It is done with the GrSetMode function as -follows: - -

     int GrSetMode(int which,...);
-
-

On succes it returns non-zero (TRUE). The which parameter can be one of the -following constants, declared in grx20.h: - -

     typedef enum _GR_graphicsModes {
-       GR_80_25_text,
-       GR_default_text,
-       GR_width_height_text,
-       GR_biggest_text,
-       GR_320_200_graphics,
-       GR_default_graphics,
-       GR_width_height_graphics,
-       GR_biggest_noninterlaced_graphics,
-       GR_biggest_graphics,
-       GR_width_height_color_graphics,
-       GR_width_height_color_text,
-       GR_custom_graphics,
-       GR_width_height_bpp_graphics,
-       GR_width_height_bpp_text,
-       GR_custom_bpp_graphics,
-       GR_NC_80_25_text,
-       GR_NC_default_text,
-       GR_NC_width_height_text,
-       GR_NC_biggest_text,
-       GR_NC_320_200_graphics,
-       GR_NC_default_graphics,
-       GR_NC_width_height_graphics,
-       GR_NC_biggest_noninterlaced_graphics,
-       GR_NC_biggest_graphics,
-       GR_NC_width_height_color_graphics,
-       GR_NC_width_height_color_text,
-       GR_NC_custom_graphics,
-       GR_NC_width_height_bpp_graphics,
-       GR_NC_width_height_bpp_text,
-       GR_NC_custom_bpp_graphics,
-     } GrGraphicsMode;
-
-

The GR_width_height_text and GR_width_height_graphics modes require the two -size arguments: int width and int height. - -

The GR_width_height_color_graphics and GR_width_height_color_text modes -require three arguments: int width, int height and GrColor colors. - -

The GR_width_height_bpp_graphics and GR_width_height_bpp_text modes require -three arguments: int width, int height and int bpp (bits per plane instead -number of colors). - -

The GR_custom_graphics and GR_custom_bpp_graphics modes require five -arguments: int width, int height, GrColor colors or int bpp, int vx and int vy. -Using this modes you can set a virtual screen of vx by vy size. - -

A call with any other mode does not require any arguments. - -

The GR_NC_... modes are equivalent to the GR_.. ones, but they don't clear the -video memory. - -

Graphics drivers can provide info of the supported graphics modes, use the -next code skeleton to colect the data: - -

     {
-       GrFrameMode fm;
-       const GrVideoMode *mp;
-       for(fm =GR_firstGraphicsFrameMode; fm <= GR_lastGraphicsFrameMode; fm++) {
-         mp = GrFirstVideoMode(fm);
-         while( mp != NULL ) {
-           ..
-           .. use the mp info
-           ..
-           mp = GrNextVideoMode(mp))
-         }
-       }
-     }
-
-

Don't worry if you don't understand it, normal user programs don't need to -know about FrameModes. The GrVideoMode structure has the following fields: - -

     typedef struct _GR_videoMode GrVideoMode;
-     
-     struct _GR_videoMode {
-       char    present;                    /* is it really available? */
-       char    bpp;                        /* log2 of # of colors */
-       short   width,height;               /* video mode geometry */
-       short   mode;                       /* BIOS mode number (if any) */
-       int     lineoffset;                 /* scan line length */
-       int     privdata;                   /* driver can use it for anything */
-       struct _GR_videoModeExt *extinfo;   /* extra info (maybe shared) */
-     };
-
-

The width, height and bpp members are the useful information if you are -interested in set modes other than the GR_default_graphics. - -

A user-defined function can be invoked every time the video mode is changed -(i.e. GrSetMode is called). This function should not take any parameters and -don't return any value. It can be installed (for all subsequent GrSetMode calls) -with the: - -

     void GrSetModeHook(void (*hookfunc)(void));
-
-

function. The current graphics mode (one of the valid mode argument values for -GrSetMode) can be obtained with the: - -

     GrGraphicsMode GrCurrentMode(void);
-
-

function, while the type of the installed graphics adapter can be determined -with the: - -

     GrVideoAdapter GrAdapterType(void);
-
-

function. GrAdapterType returns the type of the adapter as one of the following -symbolic constants (defined in grx20.h): - -

     typedef enum _GR_videoAdapters {
-       GR_UNKNOWN = (-1),     /* not known (before driver set) */
-       GR_VGA,                /* VGA adapter */
-       GR_EGA,                /* EGA adapter */
-       GR_HERC,               /* Hercules mono adapter */
-       GR_8514A,              /* 8514A or compatible */
-       GR_S3,                 /* S3 graphics accelerator */
-       GR_XWIN,               /* X11 driver */
-       GR_WIN32,              /* WIN32 driver */
-       GR_LNXFB,              /* Linux framebuffer */
-       GR_SDL,                /* SDL driver */
-       GR_MEM                 /* memory only driver */
-     } GrVideoAdapter;
-
-

Note that the VESA driver return GR_VGA here. - - -

- -


-Next: , -Previous: Setting video modes, -Up: A User Manual For GRX2 - -
- -

Graphics contexts

- -

The library supports a set of drawing regions called contexts (the GrContext -structure). These can be in video memory or in system memory. Contexts in system -memory always have the same memory organization as the video memory. When -GrSetMode is called, a default context is created which maps to the whole -graphics screen. Contexts are described by the GrContext data structure: - -

     typedef struct _GR_context GrContext;
-     
-     struct _GR_context {
-       struct _GR_frame    gc_frame;       /* frame buffer info */
-       struct _GR_context *gc_root;        /* context which owns frame */
-       int    gc_xmax;                     /* max X coord (width  - 1) */
-       int    gc_ymax;                     /* max Y coord (height - 1) */
-       int    gc_xoffset;                  /* X offset from root's base */
-       int    gc_yoffset;                  /* Y offset from root's base */
-       int    gc_xcliplo;                  /* low X clipping limit */
-       int    gc_ycliplo;                  /* low Y clipping limit */
-       int    gc_xcliphi;                  /* high X clipping limit */
-       int    gc_ycliphi;                  /* high Y clipping limit */
-       int    gc_usrxbase;                 /* user window min X coordinate */
-       int    gc_usrybase;                 /* user window min Y coordinate */
-       int    gc_usrwidth;                 /* user window width  */
-       int    gc_usrheight;                /* user window height */
-     # define gc_baseaddr                  gc_frame.gf_baseaddr
-     # define gc_selector                  gc_frame.gf_selector
-     # define gc_onscreen                  gc_frame.gf_onscreen
-     # define gc_memflags                  gc_frame.gf_memflags
-     # define gc_lineoffset                gc_frame.gf_lineoffset
-     # define gc_driver                    gc_frame.gf_driver
-     };
-
-

The following four functions return information about the layout of and memory -occupied by a graphics context of size width by height in the current graphics -mode (as set up by GrSetMode): - -

     int GrLineOffset(int width);
-     int GrNumPlanes(void);
-     long GrPlaneSize(int w,int h);
-     long GrContextSize(int w,int h);
-
-

GrLineOffset always returns the offset between successive pixel rows of the -context in bytes. GrNumPlanes returns the number of bitmap planes in the current -graphics mode. GrContextSize calculates the total amount of memory needed by a -context, while GrPlaneSize calculates the size of a bitplane in the context. The -function: - -

     GrContext *GrCreateContext(int w,int h,char far *memory[4],GrContext *where);
-
-

can be used to create a new context in system memory. The NULL pointer is also -accepted as the value of the memory and where arguments, in this case the -library allocates the necessary amount of memory internally. It is a general -convention in the library that functions returning pointers to any GRX -specific data structure have a last argument (most of the time named where in -the prototypes) which can be used to pass the address of the data structure -which should be filled with the result. If this where pointer has the value of -NULL, then the library allocates space for the data structure internally. - -

The memory argument is really a 4 pointer array, each pointer must point to -space to handle GrPlaneSize(w,h) bytes, really only GrNumPlanes() pointers must -be malloced, the rest can be NULL. Nevertheless the normal use (see below) is - -

     gc = GrCreateContext(w,h,NULL,NULL);
-
-

so yo don't need to care about. - -

The function: -

     
-     GrContext *GrCreateSubContext(int x1,int y1,int x2,int y2,
-                                   const GrContext *parent,GrContext *where);
-
-

creates a new sub-context which maps to a part of an existing context. The -coordinate arguments (x1 through y2) are interpreted relative to the parent -context's limits. Pixel addressing is zero-based even in sub-contexts, i.e. the -address of the top left pixel is (0,0) even in a sub-context which has been -mapped onto the interior of its parent context. - -

Sub-contexts can be resized, but not their parents (i.e. anything returned by -GrCreateContext or set up by GrSetMode cannot be resized – because this could -lead to irrecoverable "loss" of drawing memory. The following function can be -used for this purpose: - -

     void GrResizeSubContext(GrContext *context,int x1,int y1,int x2,int y2);
-
-

The current context structure is stored in a static location in the library. -(For efficiency reasons – it is used quite frequently, and this way no pointer -dereferencing is necessary.) The context stores all relevant information about -the video organization, coordinate limits, etc... The current context can be set -with the: - -

     void GrSetContext(const GrContext *context);
-
-

function. This function will reset the current context to the full graphics -screen if it is passed the NULL pointer as argument. The value of the current -context can be saved into a GrContext structure pointed to by where using: - -

     GrContext *GrSaveContext(GrContext *where);
-
-

(Again, if where is NULL, the library allocates the space.) The next two -functions: - -

     const GrContext *GrCurrentContext(void);
-     const GrContext *GrScreenContext(void);
-
-

return the current context and the screen context respectively. Contexts can be -destroyed with: - -

     void GrDestroyContext(GrContext *context);
-
-

This function will free the memory occupied by the context only if it was -allocated originally by the library. The next three functions set up and query -the clipping limits associated with the current context: - -

     void GrSetClipBox(int x1,int y1,int x2,int y2);
-     void GrGetClipBox(int *x1p,int *y1p,int *x2p,int *y2p);
-     void GrResetClipBox(void);
-
-

GrResetClipBox sets the clipping limits to the limits of context. These are -the limits set up initially when a context is created. There are three similar -functions to sets/gets the clipping limits of any context: - -

     void  GrSetClipBoxC(GrContext *c,int x1,int y1,int x2,int y2);
-     void  GrGetClipBoxC(const GrContext *c,int *x1p,int *y1p,int *x2p,int *y2p);
-     void  GrResetClipBoxC(GrContext *c);
-
-

The limits of the current context can be obtained using the following -functions: - -

     int GrMaxX(void);
-     int GrMaxY(void);
-     int GrSizeX(void);
-     int GrSizeY(void);
-
-

The Max functions return the biggest valid coordinate, while the Size -functions return a value one higher. The limits of the graphics screen -(regardless of the current context) can be obtained with: - -

     int GrScreenX(void);
-     int GrScreenY(void);
-
-

If you had set a virtual screen (using a custom graphics mode), the limits of -the virtual screen can be fetched with: - -

     int GrVirtualX(void);
-     int GrVirtualY(void);
-
-

The routine: - -

     int GrScreenIsVirtual(void);
-
-

returns non zero if a virtual screen is set. The rectangle showed in the real -screen can be set with: - -

     int GrSetViewport(int xpos,int ypos);
-
-

and the current viewport position can be obtained by: - -

     int GrViewportX(void);
-     int GrViewportY(void);
-
- -
- -


-Next: , -Previous: Graphics contexts, -Up: A User Manual For GRX2 - -
- -

Context use

- -

Here is a example of normal context use: - -

     GrContext *grc;
-     
-     if( (grc = GrCreateContext( w,h,NULL,NULL )) == NULL ){
-       ...process the error
-       }
-     else {
-       GrSetContext( grc );
-       ...do some drawing
-       ...and probably bitblt to the screen context
-       GrSetContext( NULL ); /* the screen context! */
-       GrDestroyContext( grc );
-       }
-     
-
-

But if you have a GrContext variable (not a pointer) you want to use (probably -because is static to some routines) you can do: - -

     static GrContext grc; /* not a pointer!! */
-     
-     if( GrCreateContext( w,h,NULL,&grc )) == NULL ) {
-       ...process the error
-      }
-     else {
-       GrSetContext( &grc );
-       ...do some drawing
-       ...and probably bitblt to the screen context
-       GrSetContext( NULL ); /* the screen context! */
-       GrDestroyContext( &grc );
-       }
-     
-
-

Note that GrDestoryContext knows if grc was automatically malloced or not!! - -

Only if you don't want GrCreateContext use malloc at all, you must allocate -the memory buffers and pass it to GrCreateContext. - -

Using GrCreateSubContext is the same, except it doesn't need the buffer, -because it uses the parent buffer. - -

See the test/winclip.c and test/wintest.c examples. - - -

- -

Color management

- -

GRX defines the type GrColor for color variables. GrColor it's a 32 bits -integer. The 8 left bits are reserved for the write mode (see below). The 24 -bits right are the color value. - -

The library supports two models for color management. In the 'indirect' (or -color table) model, color values are indices to a color table. The color table -slots will be allocated with the highest resolution supported by the hardware -(EGA: 2 bits, VGA: 6 bits) with respect to the component color intensities. In -the 'direct' (or RGB) model, color values map directly into component color -intensities with non-overlapping bitfields of the color index representing the -component colors. - -

Color table model is supported until 256 color modes. The RGB model is -supported in 256 color and up color modes. - -

In RGB model the color index map to component color intensities depend on the -video mode set, so it can't be assumed the component color bitfields (but if you -are curious check the GrColorInfo global structure in grx20.h). - -

After the first GrSetMode call two colors are always defined: black and white. -The color values of these two colors are returned by the functions: - -

     GrColor GrBlack(void);
-     GrColor GrWhite(void);
-
-

GrBlack() is guaranteed to be 0. - -

The library supports five write modes (a write mode descibes the operation -between the actual bit color and the one to be set): write, XOR, logical OR, -logical AND and IMAGE. These can be selected with OR-ing the color value with -one of the following constants declared in grx20.h : - -

     #define GrWRITE       0UL            /* write color */
-     #define GrXOR         0x01000000UL   /* to "XOR" any color to the screen */
-     #define GrOR          0x02000000UL   /* to "OR" to the screen */
-     #define GrAND         0x03000000UL   /* to "AND" to the screen */
-     #define GrIMAGE       0x04000000UL   /* blit: write, except given color */
-
-

The GrIMAGE write mode only works with the bitblt function. -By convention, the no-op color is obtained by combining color value 0 (black) -with the XOR operation. This no-op color has been defined in grx20.h as: - -

     #define GrNOCOLOR     (GrXOR | 0)    /* GrNOCOLOR is used for "no" color */
-
-

The write mode part and the color value part of a GrColor variable can be -obtained OR-ing it with one of the following constants declared in grx20.h: - -

     #define GrCVALUEMASK  0x00ffffffUL   /* color value mask */
-     #define GrCMODEMASK   0xff000000UL   /* color operation mask */
-
-

The number of colors in the current graphics mode is returned by the: - -

     GrColor GrNumColors(void);
-
-

function, while the number of unused, available color can be obtained by -calling: - -

     GrColor GrNumFreeColors(void);
-
-

Colors can be allocated with the: - -

     GrColor GrAllocColor(int r,int g,int b);
-     GrColor GrAllocColor2(long hcolor);
-
-

functions (component intensities can range from 0 to 255, -hcolor must be in 0xRRGGBB format), or with the: - -

     GrColor GrAllocCell(void);
-
-

function. In the second case the component intensities of the returned color can -be set with: - -

     void GrSetColor(GrColor color,int r,int g,int b);
-
-

In the color table model both Alloc functions return GrNOCOLOR if there are no -more free colors available. In the RGB model GrNumFreeColors returns 0 and -GrAllocCell always returns GrNOCOLOR, as colors returned by GrAllocCell are -meant to be changed – what is not supposed to be done in RGB mode. Also note -that GrAllocColor operates much more efficiently in RGB mode, and that it never -returns GrNOCOLOR in this case. - -

Color table entries can be freed (when not in RGB mode) by calling: - -

     void GrFreeColor(GrColor color);
-
-

The component intensities of any color can be queried using one of this function: - -

     void GrQueryColor(GrColor c,int *r,int *g,int *b);
-     void GrQueryColor2(GrColor c,long *hcolor);
-
-

Initially the color system is in color table (indirect) model if there are 256 -or less colors. 256 color modes can be put into the RGB model by calling: - -

     void GrSetRGBcolorMode(void);
-
-

The color system can be reset (i.e. put back into color table model if -possible, all colors freed except for black and white) by calling: - -

     void GrResetColors(void);
-
-

The function: - -

     void GrRefreshColors(void);
-
-

reloads the currently allocated color values into the video hardware. This -function is not needed in typical applications, unless the display adapter is -programmed directly by the application. - -

This functions: - -

     GrColor GrAllocColorID(int r,int g,int b);
-     GrColor GrAllocColor2ID(long hcolor);
-     void GrQueryColorID(GrColor c,int *r,int *g,int *b);
-     void GrQueryColor2ID(GrColor c,long *hcolor);
-
-

are inlined versions (except if you compile GRX with GRX_SKIP_INLINES defined) -to be used in the RGB model (in the color table model they call the normal -routines). - -

See the test/rgbtest.c and test/colorops.c examples. - - -

- -


-Next: , -Previous: Color management, -Up: A User Manual For GRX2 - -
- -

Portable use of a few colors

- -

People that only want to use a few colors find the GRX color handling a bit -confusing, but it gives the power to manage a lot of color deeps and two color -models. Here are some guidelines to easily use the famous 16 ega colors in GRX -programs. We need this GRX function: - -

     GrColor *GrAllocEgaColors(void);
-
-

it returns a 16 GrColor array with the 16 ega colors alloced (really it's a -trivial function, read the source src/setup/colorega.c). We can use a -construction like that: - -

First, in your C code make a global pointer, and init it after set the -graphics mode: - -

     GrColor *egacolors;
-     ....
-     int your_setup_function( ... )
-     {
-       ...
-       GrSetMode( ... )
-       ...
-       egacolors = GrAllocEgaColors();
-       ...
-     }
-     
-
-

Next, add this to your main include file: - -

     extern GrColor *egacolors;
-     #define BLACK        egacolors[0]
-     #define BLUE         egacolors[1]
-     #define GREEN        egacolors[2]
-     #define CYAN         egacolors[3]
-     #define RED          egacolors[4]
-     #define MAGENTA      egacolors[5]
-     #define BROWN        egacolors[6]
-     #define LIGHTGRAY    egacolors[7]
-     #define DARKGRAY     egacolors[8]
-     #define LIGHTBLUE    egacolors[9]
-     #define LIGHTGREEN   egacolors[10]
-     #define LIGHTCYAN    egacolors[11]
-     #define LIGHTRED     egacolors[12]
-     #define LIGHTMAGENTA egacolors[13]
-     #define YELLOW       egacolors[14]
-     #define WHITE        egacolors[15]
-
-

Now you can use the defined colors in your code. Note that if you are in color -table model in a 16 color mode, you have exhausted the color table. Note too -that this don't work to initialize static variables with a color, because -egacolors is not initialized. - - -

- -

Graphics primitives

- -

The screen, the current context or the current clip box can be cleared (i.e. -set to a desired background color) by using one of the following three -functions: - -

     void GrClearScreen(GrColor bg);
-     void GrClearContext(GrColor bg);
-     void GrClearClipBox(GrColor bg);
-
-

Any context can be cleared using this function: -

     void GrClearContextC(GrContext *ctx, GrColor bg);
-
-

Thanks to the special GrColor definition, you can do more than simple clear -with this functions, by example with: - -

     GrClearScreen( GrWhite()|GrXOR );
-
-

the graphics screen is negativized, do it again and the screen is restored. - -

The following line drawing graphics primitives are supported by the library: - -

     void GrPlot(int x,int y,GrColor c);
-     void GrLine(int x1,int y1,int x2,int y2,GrColor c);
-     void GrHLine(int x1,int x2,int y,GrColor c);
-     void GrVLine(int x,int y1,int y2,GrColor c);
-     void GrBox(int x1,int y1,int x2,int y2,GrColor c);
-     void GrCircle(int xc,int yc,int r,GrColor c);
-     void GrEllipse(int xc,int yc,int xa,int ya,GrColor c);
-     void GrCircleArc(int xc,int yc,int r,int start,int end,int style,GrColor c);
-     void GrEllipseArc(int xc,int yc,int xa,int ya,
-                       int start,int end,int style,GrColor c);
-     void GrPolyLine(int numpts,int points[][2],GrColor c);
-     void GrPolygon(int numpts,int points[][2],GrColor c);
-
-

All primitives operate on the current graphics context. The last argument of -these functions is always the color to use for the drawing. The HLine and VLine -primitives are for drawing horizontal and vertical lines. They have been -included in the library because they are more efficient than the general line -drawing provided by GrLine. The ellipse primitives can only draw ellipses with -their major axis parallel with either the X or Y coordinate axis. They take the -half X and Y axis length in the xa and ya arguments. The arc (circle and -ellipse) drawing functions take the start and end angles in tenths of degrees -(i.e. meaningful range: 0 ... 3600). The angles are interpreted -counter-clockwise starting from the positive X axis. The style argument can be -one of this defines from grx20.h: - -

     #define GR_ARC_STYLE_OPEN       0
-     #define GR_ARC_STYLE_CLOSE1     1
-     #define GR_ARC_STYLE_CLOSE2     2
-
-

GR_ARC_STYLE_OPEN draws only the arc, GR_ARC_STYLE_CLOSE1 closes the arc with -a line between his start and end point, GR_ARC_STYLE_CLOSE1 draws the typical -cake slice. This routine: - -

     void GrLastArcCoords(int *xs,int *ys,int *xe,int *ye,int *xc,int *yc);
-
-

can be used to retrieve the start, end, and center points used by the last arc -drawing functions. - -

See the test/circtest.c and test/arctest.c examples. - -

The polyline and polygon primitives take the address of an n by 2 coordinate -array. The X values should be stored in the elements with 0 second index, and -the Y values in the elements with a second index value of 1. Coordinate arrays -passed to the polygon primitive can either contain or omit the closing edge of -the polygon – the primitive will append it to the list if it is missing. - -

See the test/polytest.c example. - -

Because calculating the arc points it's a very time consuming operation, there -are two functions to pre-calculate the points, that can be used next with -polyline and polygon primitives: - -

     int  GrGenerateEllipse(int xc,int yc,int xa,int ya,
-                            int points[GR_MAX_ELLIPSE_POINTS][2]);
-     int  GrGenerateEllipseArc(int xc,int yc,int xa,int ya,int start,int end,
-                               int points[GR_MAX_ELLIPSE_POINTS][2]);
-
-

The following filled primitives are available: - -

     void GrFilledBox(int x1,int y1,int x2,int y2,GrColor c);
-     void GrFramedBox(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c);
-     void GrFilledCircle(int xc,int yc,int r,GrColor c);
-     void GrFilledEllipse(int xc,int yc,int xa,int ya,GrColor c);
-     void GrFilledCircleArc(int xc,int yc,int r,
-                            int start,int end,int style,GrColor c);
-     void GrFilledEllipseArc(int xc,int yc,int xa,int ya,
-                             int start,int end,int style,GrColor c);
-     void GrFilledPolygon(int numpts,int points[][2],GrColor c);
-     void GrFilledConvexPolygon(int numpts,int points[][2],GrColor c);
-
-

Similarly to the line drawing, all of the above primitives operate on the -current graphics context. The GrFramedBox primitive can be used to draw -motif-like shaded boxes and "ordinary" framed boxes as well. The x1 through y2 -coordinates specify the interior of the box, the border is outside this area, -wdt pixels wide. The primitive uses five different colors for the interior and -four borders of the box which are specified in the GrFBoxColors structure: - -

     typedef struct {
-       GrColor fbx_intcolor;
-       GrColor fbx_topcolor;
-       GrColor fbx_rightcolor;
-       GrColor fbx_bottomcolor;
-       GrColor fbx_leftcolor;
-     } GrFBoxColors;
-
-

The GrFilledConvexPolygon primitive can be used to fill convex polygons. It -can also be used to fill some concave polygons whose boundaries do not intersect -any horizontal scan line more than twice. All other concave polygons have to be -filled with the (somewhat less efficient) GrFilledPolygon primitive. This -primitive can also be used to fill several disjoint non­overlapping polygons in -a single operation. - -

The function: - -

     void GrFloodFill(int x, int y, GrColor border, GrColor c);
-
-

flood-fills the area bounded by the color border using x, y like the starting -point. - -

Floodspill is a color replacer, replacing color A with color B. -This is quite useful for highlighting a selected item in a list, or changing -a selected color(s) in a multi colored area. - -

     void GrFloodSpill(int x1, int y1, int x2, int y2,
-                      GrColor old_c, GrColor new_c)
-
-

replaces old color with new color in the rectangle bounded by x1, y1, x2, y2. - -

     void GrFloodSpillC(GrContext *ctx, int x1, int y1, int x2, int y2,
-                       GrColor old_c, GrColor new_c)
-
-

as above but in the specified context. - -

     void GrFloodSpill2(int x1, int y1, int x2, int y2,
-                       GrColor old_c1, GrColor new_c1,
-                       GrColor old_c2, GrColor new_c2)
-
-

replaces 2 colors, a one stop shop for highlighting a selection in a list. - -

     void GrFloodSpillC2(GrContext *ctx, int x1, int y1, int x2, int y2,
-                       GrColor old_c1, GrColor new_c1,
-                       GrColor old_c2, GrColor new_c2)
-
-

as above but in the specified context. - -

The current color value of any pixel in the current context can be obtained -with: - -

     GrColor GrPixel(int x,int y);
-
-

and: - -

     GrColor GrPixelC(GrContext *c,int x,int y);
-
-

do the same for any context. - -

Rectangular areas can be transferred within a context or between contexts by -calling: - -

     void GrBitBlt(GrContext *dest,int x,int y,GrContext *source,
-                   int x1,int y1,int x2,int y2,GrColor op);
-
-

x, y is the position in the destination context, and x1, y1, x2, y2 the area -from the source context to be transfered. The op argument should be one of -supported color write modes (GrWRITE, GrXOR, GrOR, GrAND, GrIMAGE), it will -control how the pixels from the source context are combined with the pixels in -the destination context (the GrIMAGE op must be ored with the color value to be -handled as transparent). If either the source or the destination context -argument is the NULL pointer then the current context is used for that argument. - -

See the test/blittest.c example. - -

A efficient form to get/put pixels from/to a context can be achieved using the -next functions: - -

     const GrColor *GrGetScanline(int x1,int x2,int yy);
-     const GrColor *GrGetScanlineC(GrContext *ctx,int x1,int x2,int yy);
-     void GrPutScanline(int x1,int x2,int yy,const GrColor *c, GrColor op);
-
-

The Get functions return a pointer to a static GrColor pixel array (or NULL if -they fail) with the color values of a row (yy) segment (x1 to x2). GrGetScanline -uses the current context. GrGestScanlineC uses the context ctx (that can be NULL -to refer to the current context). Note that the output is only valid until the -next GRX call. - -

GrPutScanline puts the GrColor pixel array c on the yy row segmet defined by -x1 to x2 in the current context using the op operation. op can be any of -GrWRITE, GrXOR, GrOR, GrAND or GrIMAGE. Data in c must fit GrCVALUEMASK -otherwise the results are implementation dependend. So you can't supply -operation code with the pixel data!. - - -

- -

Non-clipping graphics primitives

- -

There is a non-clipping version of some of the elementary primitives. These -are somewhat more efficient than the regular versions. These are to be used only -in situations when it is absolutely certain that no drawing will be performed -beyond the boundaries of the current context. Otherwise the program will almost -certainly crash! The reason for including these functions is that they are -somewhat more efficient than the regular, clipping versions. ALSO NOTE: These -function do not check for conflicts with the mouse cursor. (See the explanation -about the mouse cursor handling later in this document.) The list of the -supported non-clipping primitives: - -

     void GrPlotNC(int x,int y,GrColor c);
-     void GrLineNC(int x1,int y1,int x2,int y2,GrColor c);
-     void GrHLineNC(int x1,int x2,int y,GrColor c);
-     void GrVLineNC(int x,int y1,int y2,GrColor c);
-     void GrBoxNC(int x1,int y1,int x2,int y2,GrColor c);
-     void GrFilledBoxNC(int x1,int y1,int x2,int y2,GrColor c);
-     void GrFramedBoxNC(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c);
-     void grbitbltNC(GrContext *dst,int x,int y,GrContext *src,
-                     int x1,int y1,int x2,int y2,GrColor op);
-     GrColor GrPixelNC(int x,int y);
-     GrColor GrPixelCNC(GrContext *c,int x,int y);
-
- - - -

Customized line drawing

- -

The basic line drawing graphics primitives described previously always draw -continuous lines which are one pixel wide. There is another group of line -drawing functions which can be used to draw wide and/or patterned lines. These -functions have similar parameter passing conventions as the basic ones with one -difference: instead of the color value a pointer to a structure of type -GrLineOption has to be passed to them. The definition of the GrLineOption -structure: - -

     typedef struct {
-       GrColor lno_color;             /* color used to draw line */
-       int     lno_width;             /* width of the line */
-       int     lno_pattlen;           /* length of the dash pattern */
-       unsigned char *lno_dashpat;    /* draw/nodraw pattern */
-     } GrLineOption;
-
-

The lno_pattlen structure element should be equal to the number of alternating -draw – no draw section length values in the array pointed to by the lno_dashpat -element. The dash pattern array is assumed to begin with a drawn section. If the -pattern length is equal to zero a continuous line is drawn. - -

Example, a white line 3 bits wide (thick) and pattern 6 bits draw, 4 bits nodraw: - -

     GrLineOption mylineop;
-     ...
-     mylineop.lno_color = GrWhite();
-     mylineop.lno_width = 3;
-     mylineop.lno_pattlen = 2;
-     mylineop.lno_dashpat = "\x06\x04";
-
-

The available custom line drawing primitives: - -

     void GrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *o);
-     void GrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *o);
-     void GrCustomCircle(int xc,int yc,int r,const GrLineOption *o);
-     void GrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *o);
-     void GrCustomCircleArc(int xc,int yc,int r,
-                            int start,int end,int style,const GrLineOption *o);
-     void GrCustomEllipseArc(int xc,int yc,int xa,int ya,
-                             int start,int end,int style,const GrLineOption *o);
-     void GrCustomPolyLine(int numpts,int points[][2],const GrLineOption *o);
-     void GrCustomPolygon(int numpts,int points[][2],const GrLineOption *o);
-
-

See the test/linetest.c example. - - -

- -

Pattern filled graphics primitives

- -

The library also supports a pattern filled version of the basic filled -primitives described above. These functions have similar parameter passing -conventions as the basic ones with one difference: instead of the color value a -pointer to an union of type 'GrPattern' has to be passed to them. The GrPattern -union can contain either a bitmap or a pixmap fill pattern. The first integer -slot in the union determines which type it is. Bitmap fill patterns are -rectangular arrays of bits, each set bit representing the foreground color of -the fill operation, and each zero bit representing the background. Both the -foreground and background colors can be combined with any of the supported -logical operations. Bitmap fill patterns have one restriction: their width must -be eight pixels. Pixmap fill patterns are very similar to contexts. The relevant -structure declarations (from grx20.h): - -

     /*
-      * BITMAP: a mode independent way to specify a fill pattern of two
-      *   colors. It is always 8 pixels wide (1 byte per scan line), its
-      *   height is user-defined. SET THE TYPE FLAG TO ZERO!!!
-      */
-     typedef struct _GR_bitmap {
-       int     bmp_ispixmap;          /* type flag for pattern union */
-       int     bmp_height;            /* bitmap height */
-       char   *bmp_data;              /* pointer to the bit pattern */
-       GrColor bmp_fgcolor;           /* foreground color for fill */
-       GrColor bmp_bgcolor;           /* background color for fill */
-       int     bmp_memflags;          /* set if dynamically allocated */
-     } GrBitmap;
-     
-     /*
-      * PIXMAP: a fill pattern stored in a layout identical to the video RAM
-      *   for filling using 'bitblt'-s. It is mode dependent, typically one
-      *   of the library functions is used to build it. KEEP THE TYPE FLAG
-      *   NONZERO!!!
-      */
-     typedef struct _GR_pixmap {
-       int     pxp_ispixmap;          /* type flag for pattern union */
-       int     pxp_width;             /* pixmap width (in pixels)  */
-       int     pxp_height;            /* pixmap height (in pixels) */
-       GrColor pxp_oper;              /* bitblt mode (SET, OR, XOR, AND, IMAGE) */
-       struct _GR_frame pxp_source;   /* source context for fill */
-     } GrPixmap;
-     
-     /*
-      * Fill pattern union -- can either be a bitmap or a pixmap
-      */
-     typedef union _GR_pattern {
-       int      gp_ispixmap;          /* nonzero for pixmaps */
-       GrBitmap gp_bitmap;            /* fill bitmap */
-       GrPixmap gp_pixmap;            /* fill pixmap */
-     } GrPattern;
-     
-
-

This define group (from grx20.h) help to acces the GrPattern menbers: - -

     #define gp_bmp_data                     gp_bitmap.bmp_data
-     #define gp_bmp_height                   gp_bitmap.bmp_height
-     #define gp_bmp_fgcolor                  gp_bitmap.bmp_fgcolor
-     #define gp_bmp_bgcolor                  gp_bitmap.bmp_bgcolor
-     
-     #define gp_pxp_width                    gp_pixmap.pxp_width
-     #define gp_pxp_height                   gp_pixmap.pxp_height
-     #define gp_pxp_oper                     gp_pixmap.pxp_oper
-     #define gp_pxp_source                   gp_pixmap.pxp_source
-
-

Bitmap patterns can be easily built from initialized character arrays and -static structures by the C compiler, thus no special support is included in the -library for creating them. The only action required from the application program -might be changing the foreground and background colors as needed. Pixmap -patterns are more difficult to build as they replicate the layout of the video -memory which changes for different video modes. For this reason the library -provides three functions to create pixmap patterns in a mode-independent way: - -

     GrPattern *GrBuildPixmap(const char *pixels,int w,int h,const GrColorTableP colors);
-     GrPattern *GrBuildPixmapFromBits(const char *bits,int w,int h,
-                                      GrColor fgc,GrColor bgc);
-     GrPattern *GrConvertToPixmap(GrContext *src);
-
-

GrBuildPixmap build a pixmap from a two dimensional (w by h) array of -characters. The elements in this array are used as indices into the color table -specified with the argument colors. (This means that pixmaps created this way -can use at most 256 colors.) The color table pointer: - -

     typedef GrColor *GrColorTableP;
-
-

should point to an array of integers with the first element being the number of -colors in the table and the color values themselves starting with the second -element. NOTE: any color modifiers (GrXOR, GrOR, GrAND) OR-ed to the elements of -the color table are ignored. - -

The GrBuildPixmapFromBits function builds a pixmap fill pattern from bitmap -data. It is useful if the width of the bitmap pattern is not eight as such -bitmap patterns can not be used to build a GrBitmap structure. - -

The GrConvertToPixmap function converts a graphics context to a pixmap fill -pattern. It is useful when the pattern can be created with graphics drawing -operations. NOTE: the pixmap pattern and the original context share the drawing -RAM, thus if the context is redrawn the fill pattern changes as well. Fill -patterns which were built by library routines can be destroyed when no longer -needed (i.e. the space occupied by them can be freed) by calling: - -

     void GrDestroyPattern(GrPattern *p);
-
-

NOTE: when pixmap fill patterns converted from contexts are destroyed, the -drawing RAM is not freed. It is freed when the original context is destroyed. -Fill patterns built by the application have to be destroyed by the application -as well (if this is needed). - -

The list of supported pattern filled graphics primitives is shown below. These -functions are very similar to their solid filled counterparts, only their last -argument is different: - -

     void GrPatternFilledPlot(int x,int y,GrPattern *p);
-     void GrPatternFilledLine(int x1,int y1,int x2,int y2,GrPattern *p);
-     void GrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p);
-     void GrPatternFilledCircle(int xc,int yc,int r,GrPattern *p);
-     void GrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p);
-     void GrPatternFilledCircleArc(int xc,int yc,int r,int start,int end,
-                                   int style,GrPattern *p);
-     void GrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,
-                                    int style,GrPattern *p);
-     void GrPatternFilledConvexPolygon(int numpts,int points[][2],GrPattern *p);
-     void GrPatternFilledPolygon(int numpts,int points[][2],GrPattern *p);
-     void GrPatternFloodFill(int x, int y, GrColor border, GrPattern *p);
-
-

Strictly speaking the plot and line functions in the above group are not -filled, but they have been included here for convenience. - - -

- -

Patterned line drawing

- -

The custom line drawing functions introduced above also have a version when -the drawn sections can be filled with a (pixmap or bitmap) fill pattern. To -achieve this these functions must be passed both a custom line drawing option -(GrLineOption structure) and a fill pattern (GrPattern union). These two have -been combined into the GrLinePattern structure: - -

     typedef struct {
-       GrPattern     *lnp_pattern;    /* fill pattern */
-       GrLineOption  *lnp_option;     /* width + dash pattern */
-     } GrLinePattern;
-     
-
-

All patterned line drawing functions take a pointer to this structure as their -last argument. The list of available functions: - -

     void GrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp);
-     void GrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp);
-     void GrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp);
-     void GrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp);
-     void GrPatternedCircleArc(int xc,int yc,int r,int start,int end,
-                               int style,GrLinePattern *lp);
-     void GrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end,
-                                int style,GrLinePattern *lp);
-     void GrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp);
-     void GrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp);
-     
-
- -
- -


-Next: , -Previous: Patterned line drawing, -Up: A User Manual For GRX2 - -
- -

Image manipulation

- -

GRX defines the GrImage type like a GrPixmap synonym: - -

     #define GrImage GrPixmap
-
-

nevertheless the GrImage type enforces the image character of this object, so -for compatibility with future GRX versions use the next functions if you need to -convert between GrImage and GrPixmap objects: - -

     GrImage *GrImageFromPattern(GrPattern *p);
-     GrPattern *GrPatternFromImage(GrImage *p);
-
-

the GrImageFromPattern function returns NULL if the GrPattern given is not a -GrPixmap. - -

Like pixmaps patterns images are dependent of the actual video mode set. So -the library provides functions to create images in a mode-independent way: - -

     GrImage *GrImageBuild(const char *pixels,int w,int h,const GrColorTableP colors);
-     GrImage *GrImageFromContext(GrContext *c);
-
-

these functions work like the GrBuildPixmap and GrConvertToPixmap ones. -Remember: the image and the original context share the drawing RAM. - -

There are a number of functions to display all or part of an image in the -current context: - -

     void GrImageDisplay(int x,int y, GrImage *i);
-     void GrImageDisplayExt(int x1,int y1,int x2,int y2, GrImage *i);
-     void GrImageFilledBoxAlign(int xo,int yo,int x1,int y1,int x2,int y2,
-                                GrImage *p);
-     void GrImageHLineAlign(int xo,int yo,int x,int y,int width,GrImage *p);
-     void GrImagePlotAlign(int xo,int yo,int x,int y,GrImage *p);
-
-

GrImageDisplay display the whole image using x, y like the upper left corner -in the current context. GrImageDisplayExt display as much as it can (repiting -the image if necesary) in the rectangle defined by x1, y1 and x2, y2. - -

GrImageFilledBoxAlign is a most general funtion (really the later two call it) -display as much as it can in the defined rectangle using xo, yo like the align -point, it is the virtual point in the destination context (it doesn't need to be -into the rectangle) with that the upper left image corner is aligned. - -

GrImageHLineAlign and GrImagePlotAlign display a row segment or a point of the -image at x y position using the xo, yo allign point. - -

The most usefull image funtions are these: - -

     GrImage *GrImageInverse(GrImage *p,int flag);
-     GrImage *GrImageStretch(GrImage *p,int nwidth,int nheight);
-
-

GrImageInverse creates a new image object, flipping p left-right or top-down -as indicated by flag that can be: - -

     #define GR_IMAGE_INVERSE_LR  0x01  /* inverse left right */
-     #define GR_IMAGE_INVERSE_TD  0x02  /* inverse top down */
-
-

GrImageStretch creates a new image stretching p to nwidth by nheight. - -

To destroy a image objet when you don't need it any more use: - -

     void GrImageDestroy(GrImage *i);
-
-

See the test/imgtest.c example. - - -

- -

Text drawing

- -

The library supports loadable fonts. When in memory they are bit-mapped (i.e. -not scalable!) fonts. A driver design allow GRX to load different font formats, -the last GRX release come with drivers to load the GRX own font format and the -BGI Borland format for all platforms supported, the X11 version can load X11 -fonts too. - -

The GRX distribution come with a font collection in the GRX own format. Some -of these fonts were converted from VGA fonts. These fonts have all 256 -characters from the PC-437 codepage. Some additional fonts were converted from -fonts in the MIT X11 distribution. Most of these are ISO-8859-1 coded. Fonts -also have family names. The following font families are included: - -

     Font file name       Family  Description
-     pc<W>x<H>[t].fnt     pc      VGA font, fixed
-     xm<W>x<H>[b][i].fnt  X_misc  X11, fixed, miscellaneous group
-     char<H>[b][i].fnt    char    X11, proportional, charter family
-     cour<H>[b][i].fnt    cour    X11, fixed, courier
-     helve<H>[b][i].fnt   helve   X11, proportional, helvetica
-     lucb<H>[b][i].fnt    lucb    X11, proportional, lucida bright
-     lucs<H>[b][i].fnt    lucs    X11, proportional, lucida sans serif
-     luct<H>[b][i].fnt    luct    X11, fixed, lucida typewriter
-     ncen<H>[b][i].fnt    ncen    X11, proportional, new century schoolbook
-     symb<H>.fnt          symbol  X11, proportional, greek letters, symbols
-     tms<H>[b][i].fnt     times   X11, proportional, times
-
-

In the font names <W> means the font width, <H> the font height. Many font -families have bold and/or italic variants. The files containing these fonts -contain a 'b' and/or 'i' character in their name just before the extension. -Additionally, the strings "_bold" and/or "_ital" are appended to the font family -names. Some of the pc VGA fonts come in thin formats also, these are denoted by -a 't' in their file names and the string "_thin" in their family names. - -

The GrFont structure hold a font in memory. A number of 'pc' fonts are -built-in to the library and don't need to be loaded: - -

     extern  GrFont          GrFont_PC6x8;
-     extern  GrFont          GrFont_PC8x8;
-     extern  GrFont          GrFont_PC8x14;
-     extern  GrFont          GrFont_PC8x16;
-
-

Other fonts must be loaded with the GrLoadFont function. If the font file name -starts with any path separator character or character sequence (':', '/' or '\') -then it is loaded from the specified directory, otherwise the library try load -the font first from the current directory and next from the default font path. -The font path can be set up with the GrSetFontPath function. If the font path is -not set then the value of the 'GRXFONT' environment variable is used as the font -path. If GrLoadFont is called again with the name of an already loaded font then -it will return a pointer to the result of the first loading. Font loading -routines return NULL if the font was not found. When not needed any more, fonts -can be unloaded (i.e. the storage occupied by them freed) by calling -GrUnloadFont. - -

The prototype declarations for these functions: - -

     GrFont *GrLoadFont(char *name);
-     void GrUnloadFont(GrFont *font);
-     void GrSetFontPath(char *path_list);
-
-

Using these functions: - -

     GrFont *GrLoadConvertedFont(char *name,int cvt,int w,int h,
-                                 int minch,int maxch);
-     GrFont *GrBuildConvertedFont(const GrFont *from,int cvt,int w,int h,
-                                  int minch,int maxch);
-
-

a new font can be generated from a file font or a font in memory, the 'cvt' -argument direct the conversion or-ing the desired operations from these defines: - -

     /*
-      * Font conversion flags for 'GrLoadConvertedFont'. OR them as desired.
-      */
-     #define GR_FONTCVT_NONE         0     /* no conversion */
-     #define GR_FONTCVT_SKIPCHARS    1     /* load only selected characters */
-     #define GR_FONTCVT_RESIZE       2     /* resize the font */
-     #define GR_FONTCVT_ITALICIZE    4     /* tilt font for "italic" look */
-     #define GR_FONTCVT_BOLDIFY      8     /* make a "bold"(er) font  */
-     #define GR_FONTCVT_FIXIFY       16    /* convert prop. font to fixed wdt */
-     #define GR_FONTCVT_PROPORTION   32    /* convert fixed font to prop. wdt */
-
-

GR_FONTCVT_SKIPCHARS needs 'minch' and 'maxch' arguments. - -

GR_FONTCVT_RESIZE needs 'w' and 'h' arguments. - -

The function: - -

     void GrDumpFnaFont(const GrFont *f, char *fileName);
-
-

writes a font to an ascii font file, so it can be quickly edited with a text -editor. For a description of the ascii font format, see the fna.txt file. - -

The function: - -

     void GrDumpFont(const GrFont *f,char *CsymbolName,char *fileName);
-
-

writes a font to a C source code file, so it can be compiled and linked with a -user program. GrDumpFont would not normally be used in a release program because -its purpose is to produce source code. When the source code is compiled and -linked into a program distributing the font file with the program in not -necessary, avoiding the possibility of the font file being deleted or corrupted. - -

You can use the premade fnt2c.c program (see the source, it's so simple) to -dump a selected font to source code, by example: - -

     fnt2c helv15 myhelv15 myhelv15.c
-
-

Next, if this line is included in your main include file: - -

     extern GrFont myhelv15
-
-

and "myhelv15.c" compiled and linked with your project, you can use 'myhelv15' -in every place a GrFont is required. - -

This simple function: - -

     void GrTextXY(int x,int y,char *text,GrColor fg,GrColor bg);
-
-

draw text in the current context in the standard direction, using the -GrDefaultFont (mapped in the grx20.h file to the GrFont_PC8x14 font) with x, y -like the upper left corner and the foreground and background colors given (note -that bg equal to GrNOCOLOR make the background transparent). - -

For other functions the GrTextOption structure specifies how to draw a -character string: - -

     typedef struct _GR_textOption {      /* text drawing option structure */
-       struct _GR_font     *txo_font;      /* font to be used */
-       union  _GR_textColor txo_fgcolor;   /* foreground color */
-       union  _GR_textColor txo_bgcolor;   /* background color */
-       char    txo_chrtype;                /* character type (see above) */
-       char    txo_direct;                 /* direction (see above) */
-       char    txo_xalign;                 /* X alignment (see above) */
-       char    txo_yalign;                 /* Y alignment (see above) */
-     } GrTextOption;
-     
-     typedef union _GR_textColor {        /* text color union */
-       GrColor       v;                    /* color value for "direct" text */
-       GrColorTableP p;                    /* color table for attribute text */
-     } GrTextColor;
-     
-
-

The text can be rotated in increments of 90 degrees (txo_direct), alignments -can be set in both directions (txo_xalign and txo_yalign), and separate fore and -background colors can be specified. The accepted text direction values: - -

     #define GR_TEXT_RIGHT           0       /* normal */
-     #define GR_TEXT_DOWN            1       /* downward */
-     #define GR_TEXT_LEFT            2       /* upside down, right to left */
-     #define GR_TEXT_UP              3       /* upward */
-     #define GR_TEXT_DEFAULT         GR_TEXT_RIGHT
-
-

The accepted horizontal and vertical alignment option values: - -

     #define GR_ALIGN_LEFT           0       /* X only */
-     #define GR_ALIGN_TOP            0       /* Y only */
-     #define GR_ALIGN_CENTER         1       /* X, Y   */
-     #define GR_ALIGN_RIGHT          2       /* X only */
-     #define GR_ALIGN_BOTTOM         2       /* Y only */
-     #define GR_ALIGN_BASELINE       3       /* Y only */
-     #define GR_ALIGN_DEFAULT        GR_ALIGN_LEFT
-
-

Text strings can be of three different types: one character per byte (i.e. the -usual C character string, this is the default), one character per 16-bit word -(suitable for fonts with a large number of characters), and a PC-style -character-attribute pair. In the last case the GrTextOption structure must -contain a pointer to a color table of size 16 (fg color bits in attrib) or 8 (bg -color bits). (The color table format is explained in more detail in the previous -section explaining the methods to build fill patterns.) The supported text -types: - -

     #define GR_BYTE_TEXT            0       /* one byte per character */
-     #define GR_WORD_TEXT            1       /* two bytes per character */
-     #define GR_ATTR_TEXT            2       /* chr w/ PC style attribute byte */
-
-

The PC-style attribute text uses the same layout (first byte: character, -second: attributes) and bitfields as the text mode screen on the PC. The only -difference is that the 'blink' bit is not supported (it would be very time -consuming – the PC text mode does it with hardware support). This bit is used -instead to control the underlined display of characters. For convenience the -following attribute manipulation macros have been declared in grx20.h: - -

     #define GR_BUILD_ATTR(fg,bg,ul) \
-             (((fg) & 15) | (((bg) & 7) << 4) | ((ul) ? 128 : 0))
-     #define GR_ATTR_FGCOLOR(attr)   (((attr)     ) &  15)
-     #define GR_ATTR_BGCOLOR(attr)   (((attr) >> 4) &   7)
-     #define GR_ATTR_UNDERLINE(attr) (((attr)     ) & 128)
-
-

Text strings of the types GR_BYTE_TEXT and GR_WORD_TEXT can also be drawn -underlined. This is controlled by OR-ing the constant GR_UNDERLINE_TEXT to the -foreground color value: - -

     #define GR_UNDERLINE_TEXT       (GrXOR << 4)
-
-

After the application initializes a text option structure with the desired -values it can call one of the following two text drawing functions: - -

     void GrDrawChar(int chr,int x,int y,const GrTextOption *opt);
-     void GrDrawString(void *text,int length,int x,int y,const GrTextOption *opt);
-
-

NOTE: text drawing is fastest when it is drawn in the 'normal' direction, and -the character does not have to be clipped. It this case the library can use the -appropriate low-level video RAM access routine, while in any other case the text -is drawn pixel-by-pixel by the higher-level code. - -

There are pattern filed versions too: - -

     void GrPatternDrawChar(int chr,int x,int y,const GrTextOption *opt,GrPattern *p);
-     void GrPatternDrawString(void *text,int length,int x,int y,const GrTextOption *opt,
-                              GrPattern *p);
-     void GrPatternDrawStringExt(void *text,int length,int x,int y,
-                                 const GrTextOption *opt,GrPattern *p);
-
-

The size of a font, a character or a text string can be obtained by calling -one of the following functions. These functions also take into consideration the -text direction specified in the text option structure passed to them. - -

     int  GrFontCharPresent(const GrFont *font,int chr);
-     int  GrFontCharWidth(const GrFont *font,int chr);
-     int  GrFontCharHeight(const GrFont *font,int chr);
-     int  GrFontCharBmpRowSize(const GrFont *font,int chr);
-     int  GrFontCharBitmapSize(const GrFont *font,int chr);
-     int  GrFontStringWidth(const GrFont *font,void *text,int len,int type);
-     int  GrFontStringHeight(const GrFont *font,void *text,int len,int type);
-     int  GrProportionalTextWidth(const GrFont *font,void *text,int len,int type);
-     int  GrCharWidth(int chr,const GrTextOption *opt);
-     int  GrCharHeight(int chr,const GrTextOption *opt);
-     void GrCharSize(int chr,const GrTextOption *opt,int *w,int *h);
-     int  GrStringWidth(void *text,int length,const GrTextOption *opt);
-     int  GrStringHeight(void *text,int length,const GrTextOption *opt);
-     void GrStringSize(void *text,int length,const GrTextOption *opt,int *w,int *h);
-
-

The GrTextRegion structure and its associated functions can be used to -implement a fast (as much as possible in graphics modes) rectangular text window -using a fixed font. Clipping for such windows is done in character size -increments instead of pixels (i.e. no partial characters are drawn). Only fixed -fonts can be used in their natural size. GrDumpText will cache the code of the -drawn characters in the buffer pointed to by the 'backup' slot (if it is -non-NULL) and will draw a character only if the previously drawn character in -that grid element is different. - -

This can speed up text scrolling significantly in graphics modes. The -supported text types are the same as above. - -

     typedef struct {                     /* fixed font text window desc. */
-       struct _GR_font     *txr_font;      /* font to be used */
-       union  _GR_textColor txr_fgcolor;   /* foreground color */
-       union  _GR_textColor txr_bgcolor;   /* background color */
-       void   *txr_buffer;                 /* pointer to text buffer */
-       void   *txr_backup;                 /* optional backup buffer */
-       int     txr_width;                  /* width of area in chars */
-       int     txr_height;                 /* height of area in chars */
-       int     txr_lineoffset;             /* offset in buffer(s) between rows */
-       int     txr_xpos;                   /* upper left corner X coordinate */
-       int     txr_ypos;                   /* upper left corner Y coordinate */
-       char    txr_chrtype;                /* character type (see above) */
-     } GrTextRegion;
-     
-     void GrDumpChar(int chr,int col,int row,const GrTextRegion *r);
-     void GrDumpText(int col,int row,int wdt,int hgt,const GrTextRegion *r);
-     void GrDumpTextRegion(const GrTextRegion *r);
-     
-
-

The GrDumpTextRegion function outputs the whole text region, while GrDumpText -draws only a user-specified part of it. GrDumpChar updates the character in the -buffer at the specified location with the new character passed to it as argument -and then draws the new character on the screen as well. With these functions you -can simulate a text mode window, write chars directly to the txr_buffer and call -GrDumpTextRegion when you want to update the window (or GrDumpText if you know -the area to update is small). - -

See the test/fonttest.c example. - - -

- -


-Next: , -Previous: Text drawing, -Up: A User Manual For GRX2 - -
- -

Drawing in user coordinates

- -

There is a second set of the graphics primitives which operates in user -coordinates. Every context has a user to screen coordinate mapping associated -with it. An application specifies the user window by calling the GrSetUserWindow -function. - -

     void GrSetUserWindow(int x1,int y1,int x2,int y2);
-
-

A call to this function it in fact specifies the virtual coordinate limits -which will be mapped onto the current context regardless of the size of the -context. For example, the call: - -

     GrSetUserWindow(0,0,11999,8999);
-
-

tells the library that the program will perform its drawing operations in a -coordinate system X:0...11999 (width = 12000) and Y:0...8999 (height = 9000). -This coordinate range will be mapped onto the total area of the current context. -The virtual coordinate system can also be shifted. For example: - -

     GrSetUserWindow(5000,2000,16999,10999);
-
-

The user coordinates can even be used to turn the usual left-handed coordinate -system (0:0 corresponds to the upper left corner) to a right handed one (0:0 -corresponds to the bottom left corner) by calling: - -

     GrSetUserWindow(0,8999,11999,0);
-
-

The library also provides three utility functions for the query of the current -user coordinate limits and for converting user coordinates to screen coordinates -and vice versa. - -

     void GrGetUserWindow(int *x1,int *y1,int *x2,int *y2);
-     void GrGetScreenCoord(int *x,int *y);
-     void GrGetUserCoord(int *x,int *y);
-
-

If an application wants to take advantage of the user to screen coordinate -mapping it has to use the user coordinate version of the graphics primitives. -These have exactly the same parameter passing conventions as their screen -coordinate counterparts. NOTE: the user coordinate system is not initialized by -the library! The application has to set up its coordinate mapping before calling -any of the use coordinate drawing functions – otherwise the program will almost -certainly exit (in a quite ungraceful fashion) with a 'division by zero' error. -The list of supported user coordinate drawing functions: - -

     void GrUsrPlot(int x,int y,GrColor c);
-     void GrUsrLine(int x1,int y1,int x2,int y2,GrColor c);
-     void GrUsrHLine(int x1,int x2,int y,GrColor c);
-     void GrUsrVLine(int x,int y1,int y2,GrColor c);
-     void GrUsrBox(int x1,int y1,int x2,int y2,GrColor c);
-     void GrUsrFilledBox(int x1,int y1,int x2,int y2,GrColor c);
-     void GrUsrFramedBox(int x1,int y1,int x2,int y2,int wdt,GrFBoxColors *c);
-     void GrUsrCircle(int xc,int yc,int r,GrColor c);
-     void GrUsrEllipse(int xc,int yc,int xa,int ya,GrColor c);
-     void GrUsrCircleArc(int xc,int yc,int r,int start,int end,
-                         int style,GrColor c);
-     void GrUsrEllipseArc(int xc,int yc,int xa,int ya,int start,int end,
-                          int style,GrColor c);
-     void GrUsrFilledCircle(int xc,int yc,int r,GrColor c);
-     void GrUsrFilledEllipse(int xc,int yc,int xa,int ya,GrColor c);
-     void GrUsrFilledCircleArc(int xc,int yc,int r,int start,int end,
-                               int style,GrColor c);
-     void GrUsrFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,
-                                int style,GrColor c);
-     void GrUsrPolyLine(int numpts,int points[][2],GrColor c);
-     void GrUsrPolygon(int numpts,int points[][2],GrColor c);
-     void GrUsrFilledConvexPolygon(int numpts,int points[][2],GrColor c);
-     void GrUsrFilledPolygon(int numpts,int points[][2],GrColor c);
-     void GrUsrFloodFill(int x, int y, GrColor border, GrColor c);
-     GrColor GrUsrPixel(int x,int y);
-     GrColor GrUsrPixelC(GrContext *c,int x,int y);
-     void GrUsrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *o);
-     void GrUsrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *o);
-     void GrUsrCustomCircle(int xc,int yc,int r,const GrLineOption *o);
-     void GrUsrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *o);
-     void GrUsrCustomCircleArc(int xc,int yc,int r,int start,int end,
-                               int style,const GrLineOption *o);
-     void GrUsrCustomEllipseArc(int xc,int yc,int xa,int ya,int start,int end,
-                                int style,const GrLineOption *o);
-     void GrUsrCustomPolyLine(int numpts,int points[][2],const GrLineOption *o);
-     void GrUsrCustomPolygon(int numpts,int points[][2],const GrLineOption *o);
-     void GrUsrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp);
-     void GrUsrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp);
-     void GrUsrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp);
-     void GrUsrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp);
-     void GrUsrPatternedCircleArc(int xc,int yc,int r,int start,int end,
-                                  int style,GrLinePattern *lp);
-     void GrUsrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end,
-                                   int style,GrLinePattern *lp);
-     void GrUsrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp);
-     void GrUsrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp);
-     void GrUsrPatternFilledPlot(int x,int y,GrPattern *p);
-     void GrUsrPatternFilledLine(int x1,int y1,int x2,int y2,GrPattern *p);
-     void GrUsrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p);
-     void GrUsrPatternFilledCircle(int xc,int yc,int r,GrPattern *p);
-     void GrUsrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p);
-     void GrUsrPatternFilledCircleArc(int xc,int yc,int r,int start,int end,int style,GrPattern *p);
-     void GrUsrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrPattern *p);
-     void GrUsrPatternFilledConvexPolygon(int numpts,int points[][2],GrPattern *p);
-     void GrUsrPatternFilledPolygon(int numpts,int points[][2],GrPattern *p);
-     void GrUsrPatternFloodFill(int x, int y, GrColor border, GrPattern *p);
-     void GrUsrDrawChar(int chr,int x,int y,const GrTextOption *opt);
-     void GrUsrDrawString(char *text,int length,int x,int y,const GrTextOption *opt);
-     void GrUsrTextXY(int x,int y,char *text,GrColor fg,GrColor bg);
-
- - - -

Graphics cursors

- -

The library provides support for the creation and usage of an unlimited number -of graphics cursors. An application can use these cursors for any purpose. -Cursors always save the area they occupy before they are drawn. When moved or -erased they restore this area. As a general rule of thumb, an application should -erase a cursor before making changes to an area it occupies and redraw the -cursor after finishing the drawing. Cursors are created with the GrBuildCursor -function: - -

     GrCursor *GrBuildCursor(char far *pixels,int pitch,int w,int h,
-                             int xo,int yo,const GrColorTableP c);
-
-

The pixels, w (=width), h (=height) and c (= color table) arguments are -similar to the arguments of the pixmap building library function GrBuildPixmap -(see that paragraph for a more detailed explanation.), but with two differences. -First, is not assumed that the pixels data is w x h sized, the pitch argument -set the offset between rows. Second, the pixmap data is interpreted slightly -differently, any pixel with value zero is taken as a "transparent" pixel, i.e. -the background will show through the cursor pattern at that pixel. A pixmap data -byte with value = 1 will refer to the first color in the table, and so on. - -

The xo (= X offset) and yo (= Y offset) arguments specify the position (from -the top left corner of the cursor pattern) of the cursor's "hot point". - -

The GrCursor data structure: - -

     typedef struct _GR_cursor {
-       struct _GR_context work;            /* work areas (4) */
-       int     xcord,ycord;                /* cursor position on screen */
-       int     xsize,ysize;                /* cursor size */
-       int     xoffs,yoffs;                /* LU corner to hot point offset */
-       int     xwork,ywork;                /* save/work area sizes */
-       int     xwpos,ywpos;                /* save/work area position on screen */
-       int     displayed;                  /* set if displayed */
-     } GrCursor;
-
-

is typically not used (i.e. read or changed) by the application program, it -should just pass pointers to these structures to the appropriate library -functions. Other cursor manipulation functions: - -

     void GrDisplayCursor(GrCursor *cursor);
-     void GrEraseCursor(GrCursor *cursor);
-     void GrMoveCursor(GrCursor *cursor,int x,int y);
-     void GrDestroyCursor(GrCursor *cursor);
-
-

See the test/curstest.c example. - - -

- -


-Next: , -Previous: Graphics cursors, -Up: A User Manual For GRX2 - -
- -

Keyboard input

- -

GRX can handle platform independant key input. The file grxkeys.h defines the -keys to be used in the user's program. This is an extract: - -

     #define GrKey_Control_A            0x0001
-     #define GrKey_Control_B            0x0002
-     #define GrKey_Control_C            0x0003
-     ...
-     #define GrKey_A                    0x0041
-     #define GrKey_B                    0x0042
-     #define GrKey_C                    0x0043
-     ...
-     #define GrKey_F1                   0x013b
-     #define GrKey_F2                   0x013c
-     #define GrKey_F3                   0x013d
-     ...
-     #define GrKey_Alt_F1               0x0168
-     #define GrKey_Alt_F2               0x0169
-     #define GrKey_Alt_F3               0x016a
-
-

But you can be confident that the standard ASCII is right maped. -The GrKeyType type is defined to store keycodes: - -

     typedef unsigned short GrKeyType;
-
-

This function: - -

     int GrKeyPressed(void);
-
-

returns non zero if there are any keycode waiting, that can be read with: - -

     GrKeyType GrKeyRead(void);
-
-

The function: - -

     int GrKeyStat(void);
-
-

returns a keyboard status word, or-ing it with the next defines it can be known -the status of some special keys: - -

     #define GR_KB_RIGHTSHIFT    0x01      /* right shift key depressed */
-     #define GR_KB_LEFTSHIFT     0x02      /* left shift key depressed */
-     #define GR_KB_CTRL          0x04      /* CTRL depressed */
-     #define GR_KB_ALT           0x08      /* ALT depressed */
-     #define GR_KB_SCROLLOCK     0x10      /* SCROLL LOCK active */
-     #define GR_KB_NUMLOCK       0x20      /* NUM LOCK active */
-     #define GR_KB_CAPSLOCK      0x40      /* CAPS LOCK active */
-     #define GR_KB_INSERT        0x80      /* INSERT state active */
-     #define GR_KB_SHIFT         (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT)
-
-

See the test/keys.c example. - - -

- -

Mouse event handling

- -

All mouse services need the presence of a mouse. An application can test -whether a mouse is available by calling the function: - -

     int  GrMouseDetect(void);
-
-

which will return zero if no mouse (or mouse driver) is present, non-zero -otherwise. The mouse must be initialized by calling one (and only one) of these -functions: - -

     void GrMouseInit(void);
-     void GrMouseInitN(int queue_size);
-
-

GrMouseInit sets a event queue (see below) size to GR_M_QUEU_SIZE (128). A -user supply event queue size can be set calling GrMouseInitN instead. - -

It is a good practice to call GrMouseUnInit before exiting the program. This -will restore any interrupt vectors hooked by the program to their original -values. - -

     void GrMouseUnInit(void);
-
-

The mouse can be controlled with the following functions: - -

     void GrMouseSetSpeed(int spmult,int spdiv);
-     void GrMouseSetAccel(int thresh,int accel);
-     void GrMouseSetLimits(int x1,int y1,int x2,int y2);
-     void GrMouseGetLimits(int *x1,int *y1,int *x2,int *y2);
-     void GrMouseWarp(int x,int y);
-
-

The library calculates the mouse position only from the mouse mickey counters. -(To avoid the limit and 'rounding to the next multiple of eight' problem with -some mouse driver when it finds itself in a graphics mode unknown to it.) The -parameters to the GrMouseSetSpeed function specify how coordinate changes are -obtained from mickey counter changes, multipling by spmult and dividing by -spdiv. In high resolution graphics modes the value of one just works fine, in -low resolution modes (320x200 or similar) it is best set the spdiv to two or -three. (Of course, it also depends on the sensitivity the mouse.) The -GrMouseSetAccel function is used to control the ballistic effect: if a mouse -coordinate changes between two samplings by more than the thresh parameter, the -change is multiplied by the accel parameter. NOTE: some mouse drivers perform -similar calculations before reporting the coordinates in mickeys. In this case -the acceleration done by the library will be additional to the one already -performed by the mouse driver. The limits of the mouse movement can be set -(passed limits will be clipped to the screen) with GrMouseSetLimits (default is -the whole screen) and the current limits can be obtained with GrMouseGetLimits. -GrMouseWarp sets the mouse cursor to the specified position. - -

As typical mouse drivers do not know how to draw mouse cursors in high -resolution graphics modes, the mouse cursor is drawn by the library. The mouse -cursor can be set with: - -

     void GrMouseSetCursor(GrCursor *cursor);
-     void GrMouseSetColors(GrColor fg,GrColor bg);
-
-

GrMouseSetColors uses an internal arrow pattern, the color fg will be used as -the interior of it and bg will be the border. The current mouse cursor can be -obtained with: - -

     GrCursor *GrMouseGetCursor(void);
-
-

The mouse cursor can be displayed/erased with: - -

     void GrMouseDisplayCursor(void);
-     void GrMouseEraseCursor(void);
-
-

The mouse cursor can be left permanently displayed. All graphics primitives -except for the few non-clipping functions check for conflicts with the mouse -cursor and erase it before the drawing if necessary. Of course, it may be more -efficient to erase the cursor manually before a long drawing sequence and redraw -it after completion. The library provides an alternative pair of calls for this -purpose which will erase the cursor only if it interferes with the drawing: - -

     int  GrMouseBlock(GrContext *c,int x1,int y1,int x2,int y2);
-     void GrMouseUnBlock(int return_value_from_GrMouseBlock);
-
-

GrMouseBlock should be passed the context in which the drawing will take place -(the usual convention of NULL meaning the current context is supported) and the -limits of the affected area. It will erase the cursor only if it interferes with -the drawing. When the drawing is finished GrMouseUnBlock must be called with the -argument returned by GrMouseBlock. - -

The status of the mouse cursor can be obtained with calling -GrMouseCursorIsDisplayed. This function will return non-zero if the cursor is -displayed, zero if it is erased. - -

     int  GrMouseCursorIsDisplayed(void);
-
-

The library supports (beside the simple cursor drawing) three types of -"rubberband" attached to the mouse cursor. The GrMouseSetCursorMode function is -used to select the cursor drawing mode. - -

     void GrMouseSetCursorMode(int mode,...);
-
-

The parameter mode can have the following values: - -

     #define GR_M_CUR_NORMAL   0    /* MOUSE CURSOR modes: just the cursor */
-     #define GR_M_CUR_RUBBER   1    /* rect. rubber band (XOR-d to the screen) */
-     #define GR_M_CUR_LINE     2    /* line attached to the cursor */
-     #define GR_M_CUR_BOX      3    /* rectangular box dragged by the cursor */
-
-

GrMouseSetCursorMode takes different parameters depending on the cursor -drawing mode selected. The accepted call formats are: - -

     GrMouseSetCursorMode(M_CUR_NORMAL);
-     GrMouseSetCursorMode(M_CUR_RUBBER,xanchor,yanchor,GrColor);
-     GrMouseSetCursorMode(M_CUR_LINE,xanchor,yanchor,GrColor);
-     GrMouseSetCursorMode(M_CUR_BOX,dx1,dy1,dx2,dy2,GrColor);
-
-

The anchor parameters for the rubberband and rubberline modes specify a fixed -screen location to which the other corner of the primitive is bound. The dx1 -through dy2 parameters define the offsets of the corners of the dragged box from -the hotpoint of the mouse cursor. The color value passed is always XOR-ed to the -screen, i.e. if an application wants the rubberband to appear in a given color -on a given background then it has to pass the XOR of these two colors to -GrMouseSetCursorMode. - -

The GrMouseGetEvent function is used to obtain the next mouse or keyboard -event. It takes a flag with various bits encoding the type of event needed. It -returns the event in a GrMouseEvent structure. The relevant declarations from -grx20.h: - -

     void GrMouseGetEvent(int flags,GrMouseEvent *event);
-     
-     typedef struct _GR_mouseEvent {    /* mouse event buffer structure */
-       int  flags;                       /* event type flags (see above) */
-       int  x,y;                         /* mouse coordinates */
-       int  buttons;                     /* mouse button state */
-       int  key;                         /* key code from keyboard */
-       int  kbstat;                      /* keybd status (ALT, CTRL, etc..) */
-       long dtime;                       /* time since last event (msec) */
-     } GrMouseEvent;
-
-

The event structure has been extended with a keyboard status word (thus a -program can check for combinations like ALT-<left mousebutton press>) and a time -stamp which can be used to check for double clicks, etc... The following macros -have been defined in grx20.h to help in creating the control flag for -GrMouseGetEvent and decoding the various bits in the event structure: - -

     #define GR_M_MOTION         0x001       /* mouse event flag bits */
-     #define GR_M_LEFT_DOWN      0x002
-     #define GR_M_LEFT_UP        0x004
-     #define GR_M_RIGHT_DOWN     0x008
-     #define GR_M_RIGHT_UP       0x010
-     #define GR_M_MIDDLE_DOWN    0x020
-     #define GR_M_MIDDLE_UP      0x040
-     #define GR_M_BUTTON_DOWN    (GR_M_LEFT_DOWN  | GR_M_MIDDLE_DOWN | \
-                                  GR_M_RIGHT_DOWN | GR_M_P4_DOWN | GR_M_P5_DOWN)
-     #define GR_M_BUTTON_UP      (GR_M_LEFT_UP    | GR_M_MIDDLE_UP   | \
-                                  GR_M_RIGHT_UP   | GR_M_P4_UP  | GR_M_P5_UP)
-     #define GR_M_BUTTON_CHANGE  (GR_M_BUTTON_UP  | GR_M_BUTTON_DOWN )
-     
-     #define GR_M_LEFT           0x01        /* mouse button index bits */
-     #define GR_M_RIGHT          0x02
-     #define GR_M_MIDDLE         0x04
-     #define GR_M_P4             0x08        /* wheel rolls up */
-     #define GR_M_P5             0x10        /* wheel rolls down */
-     
-     #define GR_M_KEYPRESS       0x080        /* other event flag bits */
-     #define GR_M_POLL           0x100
-     #define GR_M_NOPAINT        0x200
-     #define GR_COMMAND          0x1000
-     #define GR_M_EVENT          (GR_M_MOTION | GR_M_KEYPRESS | \
-                                  GR_M_BUTTON_CHANGE | GR_COMMAND)
-
-

GrMouseGetEvent will display the mouse cursor if it was previously erased and -the GR_M_NOPAINT bit is not set in the flag passed to it. In this case it will -also erase the cursor after an event has been obtained. - -

GrMouseGetEvent block until a event is produced, except if the GR_M_POLL bit -is set in the flag passed to it. - -

Another version of GetEvent: - -

     void GrMouseGetEventT(int flags,GrMouseEvent *event,long timout_msecs);
-
-

can be istructed to wait timout_msec for the presence of an event. Note that -event->dtime is only valid if any event occured (event->flags != 0) otherwise -it's set as -1. Additionally event timing is real world time even in X11 && -Linux. - -

If there are one or more events waiting the function: - -

     int  GrMousePendingEvent(void);
-
-

returns non-zero value. - -

The generation of mouse and keyboard events can be individually enabled or -disabled (by passing a non-zero or zero, respectively, value in the -corresponding enable_XX parameter) by calling: - -

     void GrMouseEventEnable(int enable_kb,int enable_ms);
-
-

Note that GrMouseInit set both by default. If you want to use -GrMouseGetEvent and GrKeyRead at the same time, a call to -GrMouseEventEnable( 0,1 ) is needed before input process. - -

See the test/mousetst.c example. - -

- -

Writing/reading PNM graphics files

- -

GRX includes functions to load/save a context from/to a PNM file. - -

PNM is a group of simple graphics formats from the -NetPbm -distribution. NetPbm can convert from/to PNM lots of graphics formats, -and apply some transformations to PNM files. -(Note. You don't need the NetPbm distribution to use this functions). - -

There are six PNM formats: - -

       P1 text PBM (bitmap)
-       P2 text PGM (gray scale)
-       P3 text PPM (real color)
-       P4 binary PBM (bitmap)
-       P5 binary PGM (gray scale)
-       P6 binary PPM (real color)
-
-

GRX can handle the binary formats only (get the NetPbm distribution if you -need convert text to binary formats). - -

To save a context in a PNM file you have three functions: - -

     int GrSaveContextToPbm( GrContext *grc, char *pbmfn, char *docn );
-     int GrSaveContextToPgm( GrContext *grc, char *pgmfn, char *docn );
-     int GrSaveContextToPpm( GrContext *grc, char *ppmfn, char *docn );
-
-

they work both in RGB and palette modes, grc must be a pointer to the context to -be saved, if it is NULL the current context is saved; p-mfn is the file name to -be created and docn is an optional text comment to be written in the file, it -can be NULL. Three functions return 0 on succes and -1 on error. - -

GrSaveContextToPbm dumps a context in a PBM file (bitmap). If the pixel color -isn't Black it asumes White. - -

GrSaveContextToPgm dumps a context in a PGM file (gray scale). The colors are -quantized to gray scale using .299r + .587g + .114b. - -

GrSaveContextToPpm dumps a context in a PPM file (real color). -To load a PNM file in a context you must use: - -

     int GrLoadContextFromPnm( GrContext *grc, char *pnmfn );
-
-

it support reading PBM, PGM and PPM binary files. grc must be a pointer to the -context to be written, if it is NULL the current context is used; p-mfn is the -file name to be read. If context dimensions are lesser than pnm dimensions, the -function loads as much as it can. If color mode is not in RGB mode, the routine -allocates as much colors as it can. The function returns 0 on succes and -1 on -error. - -

To query the file format, width and height of a PNM file you can use: - -

     int GrQueryPnm( char *ppmfn, int *width, int *height, int *maxval );
-
-

pnmfn is the name of pnm file; width returns the pnm width; height returns the -pnm height; maxval returns the max color component value. The function returns 1 -to 6 on success (the PNM format) or -1 on error. - -

The two next functions: - -

     int GrLoadContextFromPnmBuffer( GrContext *grc, const char *pnmbuf );
-     int GrQueryPnmBuffer( const char *pnmbuf, int *width, int *height, int *maxval );
-
-

work like GrLoadContextFromPnm and -GrQueryPnmBuffer, but they get his input from a buffer instead -of a file. This way, pnm files can be embeded in a program (using the -bin2c program by example). - -

- -

Writing/reading PNG graphics files

- -

GRX includes functions to load/save a context -from/to a png file. But note, for this purpose it needs the -libpng library, -and to enable the png support before make the GRX lib. - -

Use next function to save a context in a PNG file: - -

     int GrSaveContextToPng( GrContext *grc, char *pngfn );
-
-

it works both in RGB and palette modes, grc must be -a pointer to the context to be saved, if it is NULL the current context is -saved; pngfn is the file name to be created. -The function returns 0 on succes and -1 on error. - -

To load a PNG file in a context you must use: - -

     int GrLoadContextFromPng( GrContext *grc, char *pngfn, int use_alpha );
-
-

grc must be a pointer to the context to be written, if it -is NULL the current context is used; pngfn is the file name -to be read; set use_alpha to 1 if you want to use the image -alpha channel (if available). If context dimensions are lesser than png -dimensions, the function loads as much as it can. If color mode is not -in RGB mode, the routine allocates as much colors as it can. The function -returns 0 on succes and -1 on error. - -

To query the width and height of a PNG file you can use: - -

     int GrQueryPng( char *pngfn, int *width, int *height );
-
-

pngfn is the name of png file; width returns the -png width; height returns the png height. -The function returns 0 on success or -1 on error. - -

The function: - -

     int GrPngSupport( void );
-
-

returns 1 if there is png support in the library, 0 otherwise. If there is -not support for png, dummy functions are added to the library, returning -error (-1) ever. - -

- -

Writing/reading PNG graphics files

- -

GRX includes functions to load/save a context -from/to a jpeg file. But note, for this purpose it needs the -libjpeg library, -and to enable the jpeg support before make the GRX lib. - -

Use next function to save a context in a JPEG file: - -

     int GrSaveContextToJpeg( GrContext *grc, char *jpegfn, int quality );
-
-

it works both in RGB and palette modes, grc must be -a pointer to the context to be saved, if it is NULL the current context is -saved; jpegfn is the file name to be created; -quality is a number between 1 and 100 to drive the compression -quality, use higher values for better quality (and bigger files), you can -use 75 as a standard value, normally a value between 50 and 95 is good. -The function returns 0 on succes and -1 on error. - -

This function saves a context in a grayscale JPEG file: - -

     int GrSaveContextToGrayJpeg( GrContext *grc, char *jpegfn, int quality );
-
-

parameters and return codes are like in GrSaveContextToJpeg. -The colors are quantized to gray scale using .299r + .587g + .114b. - -

To load a JPEG file in a context you must use: - -

     int GrLoadContextFromJpeg( GrContext *grc, char *jpegfn, int scale );
-
-

grc must be a pointer to the context to be written, if it -is NULL the current context is used; jpegfn is the file name -to be read; set scale to 1, 2, 4 or 8 to reduce the loaded -image to 1/1, 1/2, 1/4 or 1/8. If context dimensions are lesser than jpeg -dimensions, the function loads as much as it can. If color mode is not -in RGB mode, the routine allocates as much colors as it can. The function -returns 0 on succes and -1 on error. - -

To query the width and height of a JPEG file you can use: - -

     int GrQueryJpeg( char *jpegfn, int *width, int *height );
-
-

jpegfn is the name of jpeg file; width returns the -jpeg width; height returns the jpeg height. -The function returns 0 on success or -1 on error. - -

The function: - -

     int GrJpegSupport( void );
-
-

returns 1 if there is jpeg support in the library, 0 otherwise. If there is -not support for jpeg, dummy functions are added to the library, returning -error (-1) ever. - -

- -

Miscellaneous functions

- -

Here we will describe some miscellaneous functions. - -

     unsigned GrGetLibraryVersion(void);
-
-

GrGetLibraryVersion returns the GRX version API, like a hexadecimal coded -number. By example 0x0241 means 2.4.1 Because grx20.h defines the -GRX_VERSION_API macro, you can check if both, the library and the -include file, are in the same version using -if(GrGetLibraryVersion() == GRX_VERSION_API ) - -

     unsigned GrGetLibrarySystem(void);
-
-

This functions returns a unsigned integer identifing the system you are -working in. grx20.h defines some macros you can use: - -

     /* these are the supported configurations: */
-     #define GRX_VERSION_TCC_8086_DOS        1   /* also works with BCC */
-     #define GRX_VERSION_GCC_386_DJGPP       2   /* DJGPP v2 */
-     #define GRX_VERSION_GCC_386_LINUX       3   /* the real stuff */
-     #define GRX_VERSION_GENERIC_X11         4   /* generic X11 version */
-     #define GRX_VERSION_WATCOM_DOS4GW       5   /* GS - Watcom C++ 11.0 32 Bit
-     #define GRX_VERSION_GCC_386_WIN32       7   /* WIN32 using Mingw32 */
-     #define GRX_VERSION_MSC_386_WIN32       8   /* WIN32 using MS-VC */
-     #define GRX_VERSION_GCC_386_CYG32       9   /* WIN32 using CYGWIN */
-     #define GRX_VERSION_GCC_386_X11        10   /* X11 version */
-     #define GRX_VERSION_GCC_X86_64_LINUX   11   /* console framebuffer 64 */
-     #define GRX_VERSION_GCC_X86_64_X11     12   /* X11 version 64 */
-
-

Note. On Linux, GrGetLibrarySystem returns GRX_VERSION_GCC_386_LINUX even in the -X11 version. - -

     void GrSetWindowTitle(char *title);
-
-

GrSetWindowTitle sets the main window title in the X11 an Win32 versions. It -doesn't do nothing in the DOS and Linux-SvgaLib versions. - -

     void GrSleep(int msec);
-
-

This function stops the program execution for msec miliseconds. - -

     long GrMsecTime( void );
-
-

This function gives the current time with millisecond resolution - -

     void GrFlush( void );
-
-

This funnction flushes the graphics window. Not dummy because useful only on -X11 when switching between graphics and console windows open simultaneously. - -

      GrContext *GrCreateFrameContext(GrFrameMode md,int w,int h,
-                 char far *memory[4],GrContext *where);
-     
-
-

This function is like GrCreateContext, except that you can specify any valid -memory frame mode, not only the Screen associated frame mode. It can be used for -special purposes (see GrBitBlt1bpp for an example). - -

      void GrBitBlt1bpp(GrContext *dst,int dx,int dy,GrContext *src,
-           int x1,int y1,int x2,int y2,GrColor fg,GrColor bg);
-     
-
-

This special function does a bitblt from a 1bpp context (a bitmap really), -using fg and bg like the color+opcode when bit=1 and bit=0 respectively. Here is -an example: - -

        pContext = GrCreateFrameContext(GR_frameRAM1, sizex, sizey, NULL, NULL);
-        /* draw something (black and white) into the bitmap */
-        GrSetContext(pContext);
-        GrClearContext( GrBlack() );
-        GrLine(0, 0, sizex-1, sizey-1, GrWhite());
-        GrLine(0, sizey-1, sizex-1, 0, GrWhite());
-     
-        /* Put the bitmap into the screen */
-        GrSetContext(NULL);
-        fcolor = GrAllocColor( 255,0,0 );
-        bcolor = GrAllocColor( 0,0,255 );
-        GrBitBlt1bpp(NULL,x,y,pContext,0,0,sizex-1,sizey-1,fcolor,bcolor);
-
- - - -

BGI interface

- -

From the 2.3.1 version, GRX includes the BCC2GRX library created by Hartmut -Schirmer. The BCC2GRX was created to allow users of GRX to compile graphics -programs written for Borland-C++ and Turbo-C graphics interface. BCC2GRX is not -a convenient platform to develop new BGI programs. Of course you should use -native GRX interface in such cases! - -

Read the readme.bgi file for more info. - - -

- -


-Next: , -Previous: BGI interface, -Up: A User Manual For GRX2 - -
- -

Pascal interface

- -

The Pascal (gpc) support is produced by two unit files pascal/grx.pas -and pascal/bgi/graph.pas which are the Pascal translations of the C -header files include/grx20.h + include/grxkeys.h -and include/libbcc.h. - -

Compilation of the examples and installation of the header files is allowed -by setting INCLUDE_GPC_SUPPORT=y in makedef.grx. - -

The unit files contain at the beginning instructions to load the required -libraries (libgrx20..., depending on the system) and addon libraries -(e.g. libpng). -You can uncomment manually the addons you want. -You can also use the configure script which does that automatically, -together with editing the makedefs.grx file. - -

By default they are installed in a units directory below the -INSTALLDIR directory. But you can put them where you like. - - -

- -


-Previous: Pascal interface, -Up: A User Manual For GRX2 - -
- -

References

- -

Official GRX site -http://grx.gnu.de -
GRX mailing list archive -http://grx.gnu.de/archive/grx/en/ -
MGRX site (fork from GRX) -http://mgrx.fgrim.com -
NetPbm distribution -http://netpbm.sourceforge.net -
PNG library -http://www.libpng.org/pub/png/libpng.html -
JPEG library -http://www.ijg.org -
TIFF library -http://www.remotesensing.org/libtiff/ -
- - -

- - - diff --git a/thirdparty/grx249/doc/grx249um.inf b/thirdparty/grx249/doc/grx249um.inf deleted file mode 100644 index c09bf06..0000000 --- a/thirdparty/grx249/doc/grx249um.inf +++ /dev/null @@ -1,2317 +0,0 @@ -This is grx249um.inf, produced by makeinfo version 4.13 from grx2.tex. - -INFO-DIR-SECTION Libraries -START-INFO-DIR-ENTRY -* GRX: (grx). The GRX Graphics Library. -END-INFO-DIR-ENTRY - - -File: grx249um.inf, Node: Top, Next: A User Manual For GRX2 - - GRX 2.4.9 User's Manual -*********************** - -A 2D graphics library for DOS, Linux, X11 and Win32 -*************************************************** - Based on the original doc written by: Csaba Biegl on August 10, 1992 - Updated by: Mariano Alvarez Fernandez on August 17, 2000 - Last update: July 10, 2012 - -Abstract -******** - -*GRX* is a 2D graphics library originaly written by Csaba Biegl for DJ -Delorie's DOS port of the GCC compiler. Now it support a big range of -platforms, the main four are: DOS (DJGPPv2), Linux console, X11 and -Win32 (Mingw). On DOS it supports VGA, EGA and VESA compliant cards. -On Linux console it uses svgalib or the framebuffer. On X11 it must -work on any X11R5 (or later). From the 2.4 version, GRX comes with a -Win32 driver. The framebuffer Linux console driver was new in 2.4.2. -From 2.4.7 there is a support for x86_64 bits Linux machines and a -support for an SDL driver on MingW and X11. On MingW and X11 it runs on -a window with the original driver, and either full screen or on a -window with the SDL driver. - -* Menu: - -* A User Manual For GRX2:: - - -File: grx249um.inf, Node: A User Manual For GRX2, Next: Hello world, Prev: Top, Up: Top - -GRX2 User's Manual -****************** - -* Menu: - -* Top:: -* Hello world:: -* Data types and function declarations:: -* Setting the graphics driver:: -* Setting video modes:: -* Graphics contexts:: -* Context use:: -* Color management:: -* Portable use of a few colors:: -* Graphics primitives:: -* Non-clipping graphics primitives:: -* Customized line drawing:: -* Pattern filled graphics primitives:: -* Patterned line drawing:: -* Image manipulation:: -* Text drawing:: -* Drawing in user coordinates:: -* Graphics cursors:: -* Keyboard input:: -* Mouse event handling:: -* Writing/reading PNM graphics files:: -* Writing/reading PNG graphics files:: -* Writing/reading JPEG graphics files:: -* Miscellaneous functions:: -* BGI interface:: -* Pascal interface:: -* References:: - - -File: grx249um.inf, Node: Hello world, Next: Data types and function declarations, Prev: A User Manual For GRX2, Up: A User Manual For GRX2 - -Hello world -=========== - -The next program draws a double frame around the screen and writes -"Hello, GRX world" centered. Then it waits after a key is pressed. - - #include - #include - #include - - int main() - { - char *message = "Hello, GRX world"; - int x, y; - GrTextOption grt; - - GrSetMode( GR_default_graphics ); - - grt.txo_font = &GrDefaultFont; - grt.txo_fgcolor.v = GrWhite(); - grt.txo_bgcolor.v = GrBlack(); - grt.txo_direct = GR_TEXT_RIGHT; - grt.txo_xalign = GR_ALIGN_CENTER; - grt.txo_yalign = GR_ALIGN_CENTER; - grt.txo_chrtype = GR_BYTE_TEXT; - - GrBox( 0,0,GrMaxX(),GrMaxY(),GrWhite() ); - GrBox( 4,4,GrMaxX()-4,GrMaxY()-4,GrWhite() ); - - x = GrMaxX()/2; - y = GrMaxY()/2; - GrDrawString( message,strlen( message ),x,y,&grt ); - - GrKeyRead(); - - return 0; - } -How to compile the hello world (assuming the GRX library was previously -installed) - DJGPP: gcc -o hellogrx.exe hellogrx.c -lgrx20 - Mingw: gcc -o hellogrx.exe hellogrx.c -lgrx20 -mwindows - X11 : gcc -o hellogrx hellogrx.c -D__XWIN__ -I/usr/X11R6/include - -lgrx20X -L/usr/X11R6/lib -lX11 - Linux: gcc -o hellogrx hellogrx.c -lgrx20 -lvga - - For the SDL driver: - Mingw: gcc -o hellogrx.exe hellogrx.c -lgrx20S -lSDL - X11 : gcc -o hellogrx hellogrx.c -D__XWIN__ -I/usr/X11R6/include - -lgrx20S -lSDL -lpthread -L/usr/X11R6/lib -lX11 - - For x86_64 systems add -m32 or -m64 for 32/64 bits executables - and replace /lib by /lib64 or /lib32 as needed - - -File: grx249um.inf, Node: Data types and function declarations, Next: Setting the graphics driver, Prev: Hello world, Up: A User Manual For GRX2 - -Data types and function declarations -==================================== - -All public data structures and graphics primitives meant for usage by -the application program are declared/prototyped in the header files (in -the 'include' sub-directory): - - * grdriver.h graphics driver format specifications - * grfontdv.h format of a font when loaded into memory - * grx20.h drawing-related structures and functions - * grxkeys.h platform independent key definitions - - User programs normally only include *include/grx20.h* and *include/grxkeys.h* - - -File: grx249um.inf, Node: Setting the graphics driver, Next: Setting video modes, Prev: Data types and function declarations, Up: A User Manual For GRX2 - -Setting the graphics driver -=========================== - -The graphics driver is normally set by the final user by the environment -variable GRX20DRV, but a program can set it using: - - int GrSetDriver(char *drvspec); - -The drvspec string has the same format as the environment variable: - - gw gh nc - -Available drivers are for: - - * DOS => herc, stdvga, stdega, et4000, cl5426, mach64, ati28800, s3, VESA, memory - * Linux => svgalib, linuxfb, memory - * X11 => xwin, memory - * Win32 => win32, memory - * SDL (Win32 and X11) => sdl::fs, sdl::ww, memory - -The xwin and win32 drivers are windowed. The SDL driver on the same -systems can be either fullscreen (::fs) or windowed (::ww). - -The optionals gw, gh and nc parameters set the desired default graphics -mode. Normal values for 'nc' are 2, 16, 256, 64K and 16M. The current -driver name can be obtained from: - - GrCurrentVideoDriver()->name - - -File: grx249um.inf, Node: Setting video modes, Next: Graphics contexts, Prev: Setting the graphics driver, Up: A User Manual For GRX2 - -Setting video modes -=================== - -Before a program can do any graphics drawing it has to configure the -graphics driver for the desired graphics mode. It is done with the -GrSetMode function as follows: - - int GrSetMode(int which,...); - -On succes it returns non-zero (TRUE). The which parameter can be one of -the following constants, declared in grx20.h: - - typedef enum _GR_graphicsModes { - GR_80_25_text, - GR_default_text, - GR_width_height_text, - GR_biggest_text, - GR_320_200_graphics, - GR_default_graphics, - GR_width_height_graphics, - GR_biggest_noninterlaced_graphics, - GR_biggest_graphics, - GR_width_height_color_graphics, - GR_width_height_color_text, - GR_custom_graphics, - GR_width_height_bpp_graphics, - GR_width_height_bpp_text, - GR_custom_bpp_graphics, - GR_NC_80_25_text, - GR_NC_default_text, - GR_NC_width_height_text, - GR_NC_biggest_text, - GR_NC_320_200_graphics, - GR_NC_default_graphics, - GR_NC_width_height_graphics, - GR_NC_biggest_noninterlaced_graphics, - GR_NC_biggest_graphics, - GR_NC_width_height_color_graphics, - GR_NC_width_height_color_text, - GR_NC_custom_graphics, - GR_NC_width_height_bpp_graphics, - GR_NC_width_height_bpp_text, - GR_NC_custom_bpp_graphics, - } GrGraphicsMode; - -The GR_width_height_text and GR_width_height_graphics modes require the -two size arguments: int width and int height. - -The GR_width_height_color_graphics and GR_width_height_color_text modes -require three arguments: int width, int height and GrColor colors. - -The GR_width_height_bpp_graphics and GR_width_height_bpp_text modes -require three arguments: int width, int height and int bpp (bits per -plane instead number of colors). - -The GR_custom_graphics and GR_custom_bpp_graphics modes require five -arguments: int width, int height, GrColor colors or int bpp, int vx and -int vy. Using this modes you can set a virtual screen of vx by vy size. - -A call with any other mode does not require any arguments. - -The GR_NC_... modes are equivalent to the GR_.. ones, but they don't -clear the video memory. - -Graphics drivers can provide info of the supported graphics modes, use -the next code skeleton to colect the data: - - { - GrFrameMode fm; - const GrVideoMode *mp; - for(fm =GR_firstGraphicsFrameMode; fm <= GR_lastGraphicsFrameMode; fm++) { - mp = GrFirstVideoMode(fm); - while( mp != NULL ) { - .. - .. use the mp info - .. - mp = GrNextVideoMode(mp)) - } - } - } - -Don't worry if you don't understand it, normal user programs don't need -to know about FrameModes. The GrVideoMode structure has the following -fields: - - typedef struct _GR_videoMode GrVideoMode; - - struct _GR_videoMode { - char present; /* is it really available? */ - char bpp; /* log2 of # of colors */ - short width,height; /* video mode geometry */ - short mode; /* BIOS mode number (if any) */ - int lineoffset; /* scan line length */ - int privdata; /* driver can use it for anything */ - struct _GR_videoModeExt *extinfo; /* extra info (maybe shared) */ - }; - -The width, height and bpp members are the useful information if you are -interested in set modes other than the GR_default_graphics. - -A user-defined function can be invoked every time the video mode is -changed (i.e. GrSetMode is called). This function should not take any -parameters and don't return any value. It can be installed (for all -subsequent GrSetMode calls) with the: - - void GrSetModeHook(void (*hookfunc)(void)); - -function. The current graphics mode (one of the valid mode argument -values for GrSetMode) can be obtained with the: - - GrGraphicsMode GrCurrentMode(void); - -function, while the type of the installed graphics adapter can be -determined with the: - - GrVideoAdapter GrAdapterType(void); - -function. GrAdapterType returns the type of the adapter as one of the -following symbolic constants (defined in grx20.h): - - typedef enum _GR_videoAdapters { - GR_UNKNOWN = (-1), /* not known (before driver set) */ - GR_VGA, /* VGA adapter */ - GR_EGA, /* EGA adapter */ - GR_HERC, /* Hercules mono adapter */ - GR_8514A, /* 8514A or compatible */ - GR_S3, /* S3 graphics accelerator */ - GR_XWIN, /* X11 driver */ - GR_WIN32, /* WIN32 driver */ - GR_LNXFB, /* Linux framebuffer */ - GR_SDL, /* SDL driver */ - GR_MEM /* memory only driver */ - } GrVideoAdapter; - -Note that the VESA driver return GR_VGA here. - - -File: grx249um.inf, Node: Graphics contexts, Next: Context use, Prev: Setting video modes, Up: A User Manual For GRX2 - -Graphics contexts -================= - -The library supports a set of drawing regions called contexts (the -GrContext structure). These can be in video memory or in system memory. -Contexts in system memory always have the same memory organization as -the video memory. When GrSetMode is called, a default context is -created which maps to the whole graphics screen. Contexts are described -by the GrContext data structure: - - typedef struct _GR_context GrContext; - - struct _GR_context { - struct _GR_frame gc_frame; /* frame buffer info */ - struct _GR_context *gc_root; /* context which owns frame */ - int gc_xmax; /* max X coord (width - 1) */ - int gc_ymax; /* max Y coord (height - 1) */ - int gc_xoffset; /* X offset from root's base */ - int gc_yoffset; /* Y offset from root's base */ - int gc_xcliplo; /* low X clipping limit */ - int gc_ycliplo; /* low Y clipping limit */ - int gc_xcliphi; /* high X clipping limit */ - int gc_ycliphi; /* high Y clipping limit */ - int gc_usrxbase; /* user window min X coordinate */ - int gc_usrybase; /* user window min Y coordinate */ - int gc_usrwidth; /* user window width */ - int gc_usrheight; /* user window height */ - # define gc_baseaddr gc_frame.gf_baseaddr - # define gc_selector gc_frame.gf_selector - # define gc_onscreen gc_frame.gf_onscreen - # define gc_memflags gc_frame.gf_memflags - # define gc_lineoffset gc_frame.gf_lineoffset - # define gc_driver gc_frame.gf_driver - }; - -The following four functions return information about the layout of and -memory occupied by a graphics context of size width by height in the -current graphics mode (as set up by GrSetMode): - - int GrLineOffset(int width); - int GrNumPlanes(void); - long GrPlaneSize(int w,int h); - long GrContextSize(int w,int h); - -GrLineOffset always returns the offset between successive pixel rows of -the context in bytes. GrNumPlanes returns the number of bitmap planes -in the current graphics mode. GrContextSize calculates the total amount -of memory needed by a context, while GrPlaneSize calculates the size of -a bitplane in the context. The function: - - GrContext *GrCreateContext(int w,int h,char far *memory[4],GrContext *where); - -can be used to create a new context in system memory. The NULL pointer -is also accepted as the value of the memory and where arguments, in -this case the library allocates the necessary amount of memory -internally. It is a general convention in the library that functions -returning pointers to any GRX specific data structure have a last -argument (most of the time named where in the prototypes) which can be -used to pass the address of the data structure which should be filled -with the result. If this where pointer has the value of NULL, then the -library allocates space for the data structure internally. - -The memory argument is really a 4 pointer array, each pointer must -point to space to handle GrPlaneSize(w,h) bytes, really only -GrNumPlanes() pointers must be malloced, the rest can be NULL. -Nevertheless the normal use (see below) is - - gc = GrCreateContext(w,h,NULL,NULL); - -so yo don't need to care about. - -The function: - - GrContext *GrCreateSubContext(int x1,int y1,int x2,int y2, - const GrContext *parent,GrContext *where); - -creates a new sub-context which maps to a part of an existing context. -The coordinate arguments (x1 through y2) are interpreted relative to -the parent context's limits. Pixel addressing is zero-based even in -sub-contexts, i.e. the address of the top left pixel is (0,0) even in a -sub-context which has been mapped onto the interior of its parent -context. - -Sub-contexts can be resized, but not their parents (i.e. anything -returned by GrCreateContext or set up by GrSetMode cannot be resized - -because this could lead to irrecoverable "loss" of drawing memory. The -following function can be used for this purpose: - - void GrResizeSubContext(GrContext *context,int x1,int y1,int x2,int y2); - -The current context structure is stored in a static location in the -library. (For efficiency reasons - it is used quite frequently, and -this way no pointer dereferencing is necessary.) The context stores all -relevant information about the video organization, coordinate limits, -etc... The current context can be set with the: - - void GrSetContext(const GrContext *context); - -function. This function will reset the current context to the full -graphics screen if it is passed the NULL pointer as argument. The value -of the current context can be saved into a GrContext structure pointed -to by where using: - - GrContext *GrSaveContext(GrContext *where); - -(Again, if where is NULL, the library allocates the space.) The next two -functions: - - const GrContext *GrCurrentContext(void); - const GrContext *GrScreenContext(void); - -return the current context and the screen context respectively. -Contexts can be destroyed with: - - void GrDestroyContext(GrContext *context); - -This function will free the memory occupied by the context only if it -was allocated originally by the library. The next three functions set -up and query the clipping limits associated with the current context: - - void GrSetClipBox(int x1,int y1,int x2,int y2); - void GrGetClipBox(int *x1p,int *y1p,int *x2p,int *y2p); - void GrResetClipBox(void); - -GrResetClipBox sets the clipping limits to the limits of context. These -are the limits set up initially when a context is created. There are -three similar functions to sets/gets the clipping limits of any context: - - void GrSetClipBoxC(GrContext *c,int x1,int y1,int x2,int y2); - void GrGetClipBoxC(const GrContext *c,int *x1p,int *y1p,int *x2p,int *y2p); - void GrResetClipBoxC(GrContext *c); - -The limits of the current context can be obtained using the following -functions: - - int GrMaxX(void); - int GrMaxY(void); - int GrSizeX(void); - int GrSizeY(void); - -The Max functions return the biggest valid coordinate, while the Size -functions return a value one higher. The limits of the graphics screen -(regardless of the current context) can be obtained with: - - int GrScreenX(void); - int GrScreenY(void); - -If you had set a virtual screen (using a custom graphics mode), the -limits of the virtual screen can be fetched with: - - int GrVirtualX(void); - int GrVirtualY(void); - -The routine: - - int GrScreenIsVirtual(void); - -returns non zero if a virtual screen is set. The rectangle showed in -the real screen can be set with: - - int GrSetViewport(int xpos,int ypos); - -and the current viewport position can be obtained by: - - int GrViewportX(void); - int GrViewportY(void); - - -File: grx249um.inf, Node: Context use, Next: Color management, Prev: Graphics contexts, Up: A User Manual For GRX2 - -Context use -=========== - -Here is a example of normal context use: - - GrContext *grc; - - if( (grc = GrCreateContext( w,h,NULL,NULL )) == NULL ){ - ...process the error - } - else { - GrSetContext( grc ); - ...do some drawing - ...and probably bitblt to the screen context - GrSetContext( NULL ); /* the screen context! */ - GrDestroyContext( grc ); - } - -But if you have a GrContext variable (not a pointer) you want to use -(probably because is static to some routines) you can do: - - static GrContext grc; /* not a pointer!! */ - - if( GrCreateContext( w,h,NULL,&grc )) == NULL ) { - ...process the error - } - else { - GrSetContext( &grc ); - ...do some drawing - ...and probably bitblt to the screen context - GrSetContext( NULL ); /* the screen context! */ - GrDestroyContext( &grc ); - } - -Note that GrDestoryContext knows if grc was automatically malloced or -not!! - -Only if you don't want GrCreateContext use malloc at all, you must -allocate the memory buffers and pass it to GrCreateContext. - -Using GrCreateSubContext is the same, except it doesn't need the buffer, -because it uses the parent buffer. - -See the *test/winclip.c* and *test/wintest.c* examples. - - -File: grx249um.inf, Node: Color management, Next: Portable use of a few colors, Prev: Context use, Up: A User Manual For GRX2 - -Color management -================ - -GRX defines the type GrColor for color variables. GrColor it's a 32 bits -integer. The 8 left bits are reserved for the write mode (see below). -The 24 bits right are the color value. - -The library supports two models for color management. In the 'indirect' -(or color table) model, color values are indices to a color table. The -color table slots will be allocated with the highest resolution -supported by the hardware (EGA: 2 bits, VGA: 6 bits) with respect to -the component color intensities. In the 'direct' (or RGB) model, color -values map directly into component color intensities with -non-overlapping bitfields of the color index representing the component -colors. - -Color table model is supported until 256 color modes. The RGB model is -supported in 256 color and up color modes. - -In RGB model the color index map to component color intensities depend -on the video mode set, so it can't be assumed the component color -bitfields (but if you are curious check the GrColorInfo global -structure in grx20.h). - -After the first GrSetMode call two colors are always defined: black and -white. The color values of these two colors are returned by the -functions: - - GrColor GrBlack(void); - GrColor GrWhite(void); - -GrBlack() is guaranteed to be 0. - -The library supports five write modes (a write mode descibes the -operation between the actual bit color and the one to be set): write, -XOR, logical OR, logical AND and IMAGE. These can be selected with -OR-ing the color value with one of the following constants declared in -grx20.h : - - #define GrWRITE 0UL /* write color */ - #define GrXOR 0x01000000UL /* to "XOR" any color to the screen */ - #define GrOR 0x02000000UL /* to "OR" to the screen */ - #define GrAND 0x03000000UL /* to "AND" to the screen */ - #define GrIMAGE 0x04000000UL /* blit: write, except given color */ - -The GrIMAGE write mode only works with the bitblt function. By -convention, the no-op color is obtained by combining color value 0 -(black) with the XOR operation. This no-op color has been defined in -grx20.h as: - - #define GrNOCOLOR (GrXOR | 0) /* GrNOCOLOR is used for "no" color */ - -The write mode part and the color value part of a GrColor variable can -be obtained OR-ing it with one of the following constants declared in -grx20.h: - - #define GrCVALUEMASK 0x00ffffffUL /* color value mask */ - #define GrCMODEMASK 0xff000000UL /* color operation mask */ - -The number of colors in the current graphics mode is returned by the: - - GrColor GrNumColors(void); - -function, while the number of unused, available color can be obtained by -calling: - - GrColor GrNumFreeColors(void); - -Colors can be allocated with the: - - GrColor GrAllocColor(int r,int g,int b); - GrColor GrAllocColor2(long hcolor); - -functions (component intensities can range from 0 to 255, hcolor must -be in 0xRRGGBB format), or with the: - - GrColor GrAllocCell(void); - -function. In the second case the component intensities of the returned -color can be set with: - - void GrSetColor(GrColor color,int r,int g,int b); - -In the color table model both Alloc functions return GrNOCOLOR if there -are no more free colors available. In the RGB model GrNumFreeColors -returns 0 and GrAllocCell always returns GrNOCOLOR, as colors returned -by GrAllocCell are meant to be changed - what is not supposed to be -done in RGB mode. Also note that GrAllocColor operates much more -efficiently in RGB mode, and that it never returns GrNOCOLOR in this -case. - -Color table entries can be freed (when not in RGB mode) by calling: - - void GrFreeColor(GrColor color); - -The component intensities of any color can be queried using one of this -function: - - void GrQueryColor(GrColor c,int *r,int *g,int *b); - void GrQueryColor2(GrColor c,long *hcolor); - -Initially the color system is in color table (indirect) model if there -are 256 or less colors. 256 color modes can be put into the RGB model -by calling: - - void GrSetRGBcolorMode(void); - -The color system can be reset (i.e. put back into color table model if -possible, all colors freed except for black and white) by calling: - - void GrResetColors(void); - -The function: - - void GrRefreshColors(void); - -reloads the currently allocated color values into the video hardware. -This function is not needed in typical applications, unless the display -adapter is programmed directly by the application. - -This functions: - - GrColor GrAllocColorID(int r,int g,int b); - GrColor GrAllocColor2ID(long hcolor); - void GrQueryColorID(GrColor c,int *r,int *g,int *b); - void GrQueryColor2ID(GrColor c,long *hcolor); - -are inlined versions (except if you compile GRX with GRX_SKIP_INLINES -defined) to be used in the RGB model (in the color table model they -call the normal routines). - -See the *test/rgbtest.c* and *test/colorops.c* examples. - - -File: grx249um.inf, Node: Portable use of a few colors, Next: Graphics primitives, Prev: Color management, Up: A User Manual For GRX2 - -Portable use of a few colors -============================ - -People that only want to use a few colors find the GRX color handling a -bit confusing, but it gives the power to manage a lot of color deeps -and two color models. Here are some guidelines to easily use the famous -16 ega colors in GRX programs. We need this GRX function: - - GrColor *GrAllocEgaColors(void); - -it returns a 16 GrColor array with the 16 ega colors alloced (really -it's a trivial function, read the source src/setup/colorega.c). We can -use a construction like that: - -First, in your C code make a global pointer, and init it after set the -graphics mode: - - GrColor *egacolors; - .... - int your_setup_function( ... ) - { - ... - GrSetMode( ... ) - ... - egacolors = GrAllocEgaColors(); - ... - } - -Next, add this to your main include file: - - extern GrColor *egacolors; - #define BLACK egacolors[0] - #define BLUE egacolors[1] - #define GREEN egacolors[2] - #define CYAN egacolors[3] - #define RED egacolors[4] - #define MAGENTA egacolors[5] - #define BROWN egacolors[6] - #define LIGHTGRAY egacolors[7] - #define DARKGRAY egacolors[8] - #define LIGHTBLUE egacolors[9] - #define LIGHTGREEN egacolors[10] - #define LIGHTCYAN egacolors[11] - #define LIGHTRED egacolors[12] - #define LIGHTMAGENTA egacolors[13] - #define YELLOW egacolors[14] - #define WHITE egacolors[15] - -Now you can use the defined colors in your code. Note that if you are -in color table model in a 16 color mode, you have exhausted the color -table. Note too that this don't work to initialize static variables -with a color, because egacolors is not initialized. - - -File: grx249um.inf, Node: Graphics primitives, Next: Non-clipping graphics primitives, Prev: Portable use of a few colors, Up: A User Manual For GRX2 - -Graphics primitives -=================== - -The screen, the current context or the current clip box can be cleared -(i.e. set to a desired background color) by using one of the following -three functions: - - void GrClearScreen(GrColor bg); - void GrClearContext(GrColor bg); - void GrClearClipBox(GrColor bg); - -Any context can be cleared using this function: - void GrClearContextC(GrContext *ctx, GrColor bg); - -Thanks to the special GrColor definition, you can do more than simple -clear with this functions, by example with: - - GrClearScreen( GrWhite()|GrXOR ); - -the graphics screen is negativized, do it again and the screen is -restored. - -The following line drawing graphics primitives are supported by the -library: - - void GrPlot(int x,int y,GrColor c); - void GrLine(int x1,int y1,int x2,int y2,GrColor c); - void GrHLine(int x1,int x2,int y,GrColor c); - void GrVLine(int x,int y1,int y2,GrColor c); - void GrBox(int x1,int y1,int x2,int y2,GrColor c); - void GrCircle(int xc,int yc,int r,GrColor c); - void GrEllipse(int xc,int yc,int xa,int ya,GrColor c); - void GrCircleArc(int xc,int yc,int r,int start,int end,int style,GrColor c); - void GrEllipseArc(int xc,int yc,int xa,int ya, - int start,int end,int style,GrColor c); - void GrPolyLine(int numpts,int points[][2],GrColor c); - void GrPolygon(int numpts,int points[][2],GrColor c); - -All primitives operate on the current graphics context. The last -argument of these functions is always the color to use for the drawing. -The HLine and VLine primitives are for drawing horizontal and vertical -lines. They have been included in the library because they are more -efficient than the general line drawing provided by GrLine. The ellipse -primitives can only draw ellipses with their major axis parallel with -either the X or Y coordinate axis. They take the half X and Y axis -length in the xa and ya arguments. The arc (circle and ellipse) drawing -functions take the start and end angles in tenths of degrees (i.e. -meaningful range: 0 ... 3600). The angles are interpreted -counter-clockwise starting from the positive X axis. The style argument -can be one of this defines from grx20.h: - - #define GR_ARC_STYLE_OPEN 0 - #define GR_ARC_STYLE_CLOSE1 1 - #define GR_ARC_STYLE_CLOSE2 2 - -GR_ARC_STYLE_OPEN draws only the arc, GR_ARC_STYLE_CLOSE1 closes the -arc with a line between his start and end point, GR_ARC_STYLE_CLOSE1 -draws the typical cake slice. This routine: - - void GrLastArcCoords(int *xs,int *ys,int *xe,int *ye,int *xc,int *yc); - -can be used to retrieve the start, end, and center points used by the -last arc drawing functions. - -See the *test/circtest.c* and *test/arctest.c* examples. - -The polyline and polygon primitives take the address of an n by 2 -coordinate array. The X values should be stored in the elements with 0 -second index, and the Y values in the elements with a second index -value of 1. Coordinate arrays passed to the polygon primitive can -either contain or omit the closing edge of the polygon - the primitive -will append it to the list if it is missing. - -See the *test/polytest.c* example. - -Because calculating the arc points it's a very time consuming -operation, there are two functions to pre-calculate the points, that -can be used next with polyline and polygon primitives: - - int GrGenerateEllipse(int xc,int yc,int xa,int ya, - int points[GR_MAX_ELLIPSE_POINTS][2]); - int GrGenerateEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int points[GR_MAX_ELLIPSE_POINTS][2]); - -The following filled primitives are available: - - void GrFilledBox(int x1,int y1,int x2,int y2,GrColor c); - void GrFramedBox(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c); - void GrFilledCircle(int xc,int yc,int r,GrColor c); - void GrFilledEllipse(int xc,int yc,int xa,int ya,GrColor c); - void GrFilledCircleArc(int xc,int yc,int r, - int start,int end,int style,GrColor c); - void GrFilledEllipseArc(int xc,int yc,int xa,int ya, - int start,int end,int style,GrColor c); - void GrFilledPolygon(int numpts,int points[][2],GrColor c); - void GrFilledConvexPolygon(int numpts,int points[][2],GrColor c); - -Similarly to the line drawing, all of the above primitives operate on -the current graphics context. The GrFramedBox primitive can be used to -draw motif-like shaded boxes and "ordinary" framed boxes as well. The -x1 through y2 coordinates specify the interior of the box, the border -is outside this area, wdt pixels wide. The primitive uses five -different colors for the interior and four borders of the box which are -specified in the GrFBoxColors structure: - - typedef struct { - GrColor fbx_intcolor; - GrColor fbx_topcolor; - GrColor fbx_rightcolor; - GrColor fbx_bottomcolor; - GrColor fbx_leftcolor; - } GrFBoxColors; - -The GrFilledConvexPolygon primitive can be used to fill convex -polygons. It can also be used to fill some concave polygons whose -boundaries do not intersect any horizontal scan line more than twice. -All other concave polygons have to be filled with the (somewhat less -efficient) GrFilledPolygon primitive. This primitive can also be used -to fill several disjoint non­overlapping polygons in a single operation. - -The function: - - void GrFloodFill(int x, int y, GrColor border, GrColor c); - -flood-fills the area bounded by the color border using x, y like the -starting point. - -Floodspill is a color replacer, replacing color A with color B. This -is quite useful for highlighting a selected item in a list, or changing -a selected color(s) in a multi colored area. - - void GrFloodSpill(int x1, int y1, int x2, int y2, - GrColor old_c, GrColor new_c) - -replaces old color with new color in the rectangle bounded by x1, y1, -x2, y2. - - void GrFloodSpillC(GrContext *ctx, int x1, int y1, int x2, int y2, - GrColor old_c, GrColor new_c) - -as above but in the specified context. - - void GrFloodSpill2(int x1, int y1, int x2, int y2, - GrColor old_c1, GrColor new_c1, - GrColor old_c2, GrColor new_c2) - -replaces 2 colors, a one stop shop for highlighting a selection in a -list. - - void GrFloodSpillC2(GrContext *ctx, int x1, int y1, int x2, int y2, - GrColor old_c1, GrColor new_c1, - GrColor old_c2, GrColor new_c2) - -as above but in the specified context. - -The current color value of any pixel in the current context can be -obtained with: - - GrColor GrPixel(int x,int y); - -and: - - GrColor GrPixelC(GrContext *c,int x,int y); - -do the same for any context. - -Rectangular areas can be transferred within a context or between -contexts by calling: - - void GrBitBlt(GrContext *dest,int x,int y,GrContext *source, - int x1,int y1,int x2,int y2,GrColor op); - -x, y is the position in the destination context, and x1, y1, x2, y2 the -area from the source context to be transfered. The op argument should -be one of supported color write modes (GrWRITE, GrXOR, GrOR, GrAND, -GrIMAGE), it will control how the pixels from the source context are -combined with the pixels in the destination context (the GrIMAGE op -must be ored with the color value to be handled as transparent). If -either the source or the destination context argument is the NULL -pointer then the current context is used for that argument. - -See the *test/blittest.c* example. - -A efficient form to get/put pixels from/to a context can be achieved -using the next functions: - - const GrColor *GrGetScanline(int x1,int x2,int yy); - const GrColor *GrGetScanlineC(GrContext *ctx,int x1,int x2,int yy); - void GrPutScanline(int x1,int x2,int yy,const GrColor *c, GrColor op); - -The Get functions return a pointer to a static GrColor pixel array (or -NULL if they fail) with the color values of a row (yy) segment (x1 to -x2). GrGetScanline uses the current context. GrGestScanlineC uses the -context ctx (that can be NULL to refer to the current context). Note -that the output is only valid until the next GRX call. - -GrPutScanline puts the GrColor pixel array c on the yy row segmet -defined by x1 to x2 in the current context using the op operation. op -can be any of GrWRITE, GrXOR, GrOR, GrAND or GrIMAGE. Data in c must -fit GrCVALUEMASK otherwise the results are implementation dependend. So -you can't supply operation code with the pixel data!. - - -File: grx249um.inf, Node: Non-clipping graphics primitives, Next: Customized line drawing, Prev: Graphics primitives, Up: A User Manual For GRX2 - -Non-clipping graphics primitives -================================ - -There is a non-clipping version of some of the elementary primitives. -These are somewhat more efficient than the regular versions. These are -to be used only in situations when it is absolutely certain that no -drawing will be performed beyond the boundaries of the current context. -Otherwise the program will almost certainly crash! The reason for -including these functions is that they are somewhat more efficient than -the regular, clipping versions. ALSO NOTE: These function do not check -for conflicts with the mouse cursor. (See the explanation about the -mouse cursor handling later in this document.) The list of the -supported non-clipping primitives: - - void GrPlotNC(int x,int y,GrColor c); - void GrLineNC(int x1,int y1,int x2,int y2,GrColor c); - void GrHLineNC(int x1,int x2,int y,GrColor c); - void GrVLineNC(int x,int y1,int y2,GrColor c); - void GrBoxNC(int x1,int y1,int x2,int y2,GrColor c); - void GrFilledBoxNC(int x1,int y1,int x2,int y2,GrColor c); - void GrFramedBoxNC(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c); - void grbitbltNC(GrContext *dst,int x,int y,GrContext *src, - int x1,int y1,int x2,int y2,GrColor op); - GrColor GrPixelNC(int x,int y); - GrColor GrPixelCNC(GrContext *c,int x,int y); - - -File: grx249um.inf, Node: Customized line drawing, Next: Pattern filled graphics primitives, Prev: Non-clipping graphics primitives, Up: A User Manual For GRX2 - -Customized line drawing -======================= - -The basic line drawing graphics primitives described previously always -draw continuous lines which are one pixel wide. There is another group -of line drawing functions which can be used to draw wide and/or -patterned lines. These functions have similar parameter passing -conventions as the basic ones with one difference: instead of the color -value a pointer to a structure of type GrLineOption has to be passed to -them. The definition of the GrLineOption structure: - - typedef struct { - GrColor lno_color; /* color used to draw line */ - int lno_width; /* width of the line */ - int lno_pattlen; /* length of the dash pattern */ - unsigned char *lno_dashpat; /* draw/nodraw pattern */ - } GrLineOption; - -The lno_pattlen structure element should be equal to the number of -alternating draw - no draw section length values in the array pointed -to by the lno_dashpat element. The dash pattern array is assumed to -begin with a drawn section. If the pattern length is equal to zero a -continuous line is drawn. - -Example, a white line 3 bits wide (thick) and pattern 6 bits draw, 4 -bits nodraw: - - GrLineOption mylineop; - ... - mylineop.lno_color = GrWhite(); - mylineop.lno_width = 3; - mylineop.lno_pattlen = 2; - mylineop.lno_dashpat = "\x06\x04"; - -The available custom line drawing primitives: - - void GrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *o); - void GrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *o); - void GrCustomCircle(int xc,int yc,int r,const GrLineOption *o); - void GrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *o); - void GrCustomCircleArc(int xc,int yc,int r, - int start,int end,int style,const GrLineOption *o); - void GrCustomEllipseArc(int xc,int yc,int xa,int ya, - int start,int end,int style,const GrLineOption *o); - void GrCustomPolyLine(int numpts,int points[][2],const GrLineOption *o); - void GrCustomPolygon(int numpts,int points[][2],const GrLineOption *o); - -See the *test/linetest.c* example. - - -File: grx249um.inf, Node: Pattern filled graphics primitives, Next: Patterned line drawing, Prev: Customized line drawing, Up: A User Manual For GRX2 - -Pattern filled graphics primitives -================================== - -The library also supports a pattern filled version of the basic filled -primitives described above. These functions have similar parameter -passing conventions as the basic ones with one difference: instead of -the color value a pointer to an union of type 'GrPattern' has to be -passed to them. The GrPattern union can contain either a bitmap or a -pixmap fill pattern. The first integer slot in the union determines -which type it is. Bitmap fill patterns are rectangular arrays of bits, -each set bit representing the foreground color of the fill operation, -and each zero bit representing the background. Both the foreground and -background colors can be combined with any of the supported logical -operations. Bitmap fill patterns have one restriction: their width must -be eight pixels. Pixmap fill patterns are very similar to contexts. The -relevant structure declarations (from grx20.h): - - /* - * BITMAP: a mode independent way to specify a fill pattern of two - * colors. It is always 8 pixels wide (1 byte per scan line), its - * height is user-defined. SET THE TYPE FLAG TO ZERO!!! - */ - typedef struct _GR_bitmap { - int bmp_ispixmap; /* type flag for pattern union */ - int bmp_height; /* bitmap height */ - char *bmp_data; /* pointer to the bit pattern */ - GrColor bmp_fgcolor; /* foreground color for fill */ - GrColor bmp_bgcolor; /* background color for fill */ - int bmp_memflags; /* set if dynamically allocated */ - } GrBitmap; - - /* - * PIXMAP: a fill pattern stored in a layout identical to the video RAM - * for filling using 'bitblt'-s. It is mode dependent, typically one - * of the library functions is used to build it. KEEP THE TYPE FLAG - * NONZERO!!! - */ - typedef struct _GR_pixmap { - int pxp_ispixmap; /* type flag for pattern union */ - int pxp_width; /* pixmap width (in pixels) */ - int pxp_height; /* pixmap height (in pixels) */ - GrColor pxp_oper; /* bitblt mode (SET, OR, XOR, AND, IMAGE) */ - struct _GR_frame pxp_source; /* source context for fill */ - } GrPixmap; - - /* - * Fill pattern union -- can either be a bitmap or a pixmap - */ - typedef union _GR_pattern { - int gp_ispixmap; /* nonzero for pixmaps */ - GrBitmap gp_bitmap; /* fill bitmap */ - GrPixmap gp_pixmap; /* fill pixmap */ - } GrPattern; - -This define group (from grx20.h) help to acces the GrPattern menbers: - - #define gp_bmp_data gp_bitmap.bmp_data - #define gp_bmp_height gp_bitmap.bmp_height - #define gp_bmp_fgcolor gp_bitmap.bmp_fgcolor - #define gp_bmp_bgcolor gp_bitmap.bmp_bgcolor - - #define gp_pxp_width gp_pixmap.pxp_width - #define gp_pxp_height gp_pixmap.pxp_height - #define gp_pxp_oper gp_pixmap.pxp_oper - #define gp_pxp_source gp_pixmap.pxp_source - -Bitmap patterns can be easily built from initialized character arrays -and static structures by the C compiler, thus no special support is -included in the library for creating them. The only action required -from the application program might be changing the foreground and -background colors as needed. Pixmap patterns are more difficult to -build as they replicate the layout of the video memory which changes -for different video modes. For this reason the library provides three -functions to create pixmap patterns in a mode-independent way: - - GrPattern *GrBuildPixmap(const char *pixels,int w,int h,const GrColorTableP colors); - GrPattern *GrBuildPixmapFromBits(const char *bits,int w,int h, - GrColor fgc,GrColor bgc); - GrPattern *GrConvertToPixmap(GrContext *src); - -GrBuildPixmap build a pixmap from a two dimensional (w by h) array of -characters. The elements in this array are used as indices into the -color table specified with the argument colors. (This means that -pixmaps created this way can use at most 256 colors.) The color table -pointer: - - typedef GrColor *GrColorTableP; - -should point to an array of integers with the first element being the -number of colors in the table and the color values themselves starting -with the second element. NOTE: any color modifiers (GrXOR, GrOR, GrAND) -OR-ed to the elements of the color table are ignored. - -The GrBuildPixmapFromBits function builds a pixmap fill pattern from -bitmap data. It is useful if the width of the bitmap pattern is not -eight as such bitmap patterns can not be used to build a GrBitmap -structure. - -The GrConvertToPixmap function converts a graphics context to a pixmap -fill pattern. It is useful when the pattern can be created with -graphics drawing operations. NOTE: the pixmap pattern and the original -context share the drawing RAM, thus if the context is redrawn the fill -pattern changes as well. Fill patterns which were built by library -routines can be destroyed when no longer needed (i.e. the space -occupied by them can be freed) by calling: - - void GrDestroyPattern(GrPattern *p); - -NOTE: when pixmap fill patterns converted from contexts are destroyed, -the drawing RAM is not freed. It is freed when the original context is -destroyed. Fill patterns built by the application have to be destroyed -by the application as well (if this is needed). - -The list of supported pattern filled graphics primitives is shown -below. These functions are very similar to their solid filled -counterparts, only their last argument is different: - - void GrPatternFilledPlot(int x,int y,GrPattern *p); - void GrPatternFilledLine(int x1,int y1,int x2,int y2,GrPattern *p); - void GrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p); - void GrPatternFilledCircle(int xc,int yc,int r,GrPattern *p); - void GrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p); - void GrPatternFilledCircleArc(int xc,int yc,int r,int start,int end, - int style,GrPattern *p); - void GrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,GrPattern *p); - void GrPatternFilledConvexPolygon(int numpts,int points[][2],GrPattern *p); - void GrPatternFilledPolygon(int numpts,int points[][2],GrPattern *p); - void GrPatternFloodFill(int x, int y, GrColor border, GrPattern *p); - -Strictly speaking the plot and line functions in the above group are not -filled, but they have been included here for convenience. - - -File: grx249um.inf, Node: Patterned line drawing, Next: Image manipulation, Prev: Pattern filled graphics primitives, Up: A User Manual For GRX2 - -Patterned line drawing -====================== - -The custom line drawing functions introduced above also have a version -when the drawn sections can be filled with a (pixmap or bitmap) fill -pattern. To achieve this these functions must be passed both a custom -line drawing option (GrLineOption structure) and a fill pattern -(GrPattern union). These two have been combined into the GrLinePattern -structure: - - typedef struct { - GrPattern *lnp_pattern; /* fill pattern */ - GrLineOption *lnp_option; /* width + dash pattern */ - } GrLinePattern; - -All patterned line drawing functions take a pointer to this structure -as their last argument. The list of available functions: - - void GrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp); - void GrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp); - void GrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp); - void GrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp); - void GrPatternedCircleArc(int xc,int yc,int r,int start,int end, - int style,GrLinePattern *lp); - void GrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,GrLinePattern *lp); - void GrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp); - void GrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp); - - -File: grx249um.inf, Node: Image manipulation, Next: Text drawing, Prev: Patterned line drawing, Up: A User Manual For GRX2 - -Image manipulation -================== - -GRX defines the GrImage type like a GrPixmap synonym: - - #define GrImage GrPixmap - -nevertheless the GrImage type enforces the image character of this -object, so for compatibility with future GRX versions use the next -functions if you need to convert between GrImage and GrPixmap objects: - - GrImage *GrImageFromPattern(GrPattern *p); - GrPattern *GrPatternFromImage(GrImage *p); - -the GrImageFromPattern function returns NULL if the GrPattern given is -not a GrPixmap. - -Like pixmaps patterns images are dependent of the actual video mode -set. So the library provides functions to create images in a -mode-independent way: - - GrImage *GrImageBuild(const char *pixels,int w,int h,const GrColorTableP colors); - GrImage *GrImageFromContext(GrContext *c); - -these functions work like the GrBuildPixmap and GrConvertToPixmap ones. -Remember: the image and the original context share the drawing RAM. - -There are a number of functions to display all or part of an image in -the current context: - - void GrImageDisplay(int x,int y, GrImage *i); - void GrImageDisplayExt(int x1,int y1,int x2,int y2, GrImage *i); - void GrImageFilledBoxAlign(int xo,int yo,int x1,int y1,int x2,int y2, - GrImage *p); - void GrImageHLineAlign(int xo,int yo,int x,int y,int width,GrImage *p); - void GrImagePlotAlign(int xo,int yo,int x,int y,GrImage *p); - -GrImageDisplay display the whole image using x, y like the upper left -corner in the current context. GrImageDisplayExt display as much as it -can (repiting the image if necesary) in the rectangle defined by x1, y1 -and x2, y2. - -GrImageFilledBoxAlign is a most general funtion (really the later two -call it) display as much as it can in the defined rectangle using xo, -yo like the align point, it is the virtual point in the destination -context (it doesn't need to be into the rectangle) with that the upper -left image corner is aligned. - -GrImageHLineAlign and GrImagePlotAlign display a row segment or a point -of the image at x y position using the xo, yo allign point. - -The most usefull image funtions are these: - - GrImage *GrImageInverse(GrImage *p,int flag); - GrImage *GrImageStretch(GrImage *p,int nwidth,int nheight); - -GrImageInverse creates a new image object, flipping p left-right or -top-down as indicated by flag that can be: - - #define GR_IMAGE_INVERSE_LR 0x01 /* inverse left right */ - #define GR_IMAGE_INVERSE_TD 0x02 /* inverse top down */ - -GrImageStretch creates a new image stretching p to nwidth by nheight. - -To destroy a image objet when you don't need it any more use: - - void GrImageDestroy(GrImage *i); - -See the *test/imgtest.c* example. - - -File: grx249um.inf, Node: Text drawing, Next: Drawing in user coordinates, Prev: Image manipulation, Up: A User Manual For GRX2 - -Text drawing -============ - -The library supports loadable fonts. When in memory they are bit-mapped -(i.e. not scalable!) fonts. A driver design allow GRX to load -different font formats, the last GRX release come with drivers to load -the GRX own font format and the BGI Borland format for all platforms -supported, the X11 version can load X11 fonts too. - -The GRX distribution come with a font collection in the GRX own format. -Some of these fonts were converted from VGA fonts. These fonts have all -256 characters from the PC-437 codepage. Some additional fonts were -converted from fonts in the MIT X11 distribution. Most of these are -ISO-8859-1 coded. Fonts also have family names. The following font -families are included: - - Font file name Family Description - pcx[t].fnt pc VGA font, fixed - xmx[b][i].fnt X_misc X11, fixed, miscellaneous group - char[b][i].fnt char X11, proportional, charter family - cour[b][i].fnt cour X11, fixed, courier - helve[b][i].fnt helve X11, proportional, helvetica - lucb[b][i].fnt lucb X11, proportional, lucida bright - lucs[b][i].fnt lucs X11, proportional, lucida sans serif - luct[b][i].fnt luct X11, fixed, lucida typewriter - ncen[b][i].fnt ncen X11, proportional, new century schoolbook - symb.fnt symbol X11, proportional, greek letters, symbols - tms[b][i].fnt times X11, proportional, times - -In the font names means the font width, the font height. Many -font families have bold and/or italic variants. The files containing -these fonts contain a 'b' and/or 'i' character in their name just -before the extension. Additionally, the strings "_bold" and/or "_ital" -are appended to the font family names. Some of the pc VGA fonts come in -thin formats also, these are denoted by a 't' in their file names and -the string "_thin" in their family names. - -The GrFont structure hold a font in memory. A number of 'pc' fonts are -built-in to the library and don't need to be loaded: - - extern GrFont GrFont_PC6x8; - extern GrFont GrFont_PC8x8; - extern GrFont GrFont_PC8x14; - extern GrFont GrFont_PC8x16; - -Other fonts must be loaded with the GrLoadFont function. If the font -file name starts with any path separator character or character -sequence (':', '/' or '\') then it is loaded from the specified -directory, otherwise the library try load the font first from the -current directory and next from the default font path. The font path -can be set up with the GrSetFontPath function. If the font path is not -set then the value of the 'GRXFONT' environment variable is used as the -font path. If GrLoadFont is called again with the name of an already -loaded font then it will return a pointer to the result of the first -loading. Font loading routines return NULL if the font was not found. -When not needed any more, fonts can be unloaded (i.e. the storage -occupied by them freed) by calling GrUnloadFont. - -The prototype declarations for these functions: - - GrFont *GrLoadFont(char *name); - void GrUnloadFont(GrFont *font); - void GrSetFontPath(char *path_list); - -Using these functions: - - GrFont *GrLoadConvertedFont(char *name,int cvt,int w,int h, - int minch,int maxch); - GrFont *GrBuildConvertedFont(const GrFont *from,int cvt,int w,int h, - int minch,int maxch); - -a new font can be generated from a file font or a font in memory, the -'cvt' argument direct the conversion or-ing the desired operations from -these defines: - - /* - * Font conversion flags for 'GrLoadConvertedFont'. OR them as desired. - */ - #define GR_FONTCVT_NONE 0 /* no conversion */ - #define GR_FONTCVT_SKIPCHARS 1 /* load only selected characters */ - #define GR_FONTCVT_RESIZE 2 /* resize the font */ - #define GR_FONTCVT_ITALICIZE 4 /* tilt font for "italic" look */ - #define GR_FONTCVT_BOLDIFY 8 /* make a "bold"(er) font */ - #define GR_FONTCVT_FIXIFY 16 /* convert prop. font to fixed wdt */ - #define GR_FONTCVT_PROPORTION 32 /* convert fixed font to prop. wdt */ - -GR_FONTCVT_SKIPCHARS needs 'minch' and 'maxch' arguments. - -GR_FONTCVT_RESIZE needs 'w' and 'h' arguments. - -The function: - - void GrDumpFnaFont(const GrFont *f, char *fileName); - -writes a font to an ascii font file, so it can be quickly edited with a -text editor. For a description of the ascii font format, see the -fna.txt file. - -The function: - - void GrDumpFont(const GrFont *f,char *CsymbolName,char *fileName); - -writes a font to a C source code file, so it can be compiled and linked -with a user program. GrDumpFont would not normally be used in a release -program because its purpose is to produce source code. When the source -code is compiled and linked into a program distributing the font file -with the program in not necessary, avoiding the possibility of the font -file being deleted or corrupted. - -You can use the premade fnt2c.c program (see the source, it's so -simple) to dump a selected font to source code, by example: - - fnt2c helv15 myhelv15 myhelv15.c - -Next, if this line is included in your main include file: - - extern GrFont myhelv15 - -and "myhelv15.c" compiled and linked with your project, you can use -'myhelv15' in every place a GrFont is required. - -This simple function: - - void GrTextXY(int x,int y,char *text,GrColor fg,GrColor bg); - -draw text in the current context in the standard direction, using the -GrDefaultFont (mapped in the grx20.h file to the GrFont_PC8x14 font) -with x, y like the upper left corner and the foreground and background -colors given (note that bg equal to GrNOCOLOR make the background -transparent). - -For other functions the GrTextOption structure specifies how to draw a -character string: - - typedef struct _GR_textOption { /* text drawing option structure */ - struct _GR_font *txo_font; /* font to be used */ - union _GR_textColor txo_fgcolor; /* foreground color */ - union _GR_textColor txo_bgcolor; /* background color */ - char txo_chrtype; /* character type (see above) */ - char txo_direct; /* direction (see above) */ - char txo_xalign; /* X alignment (see above) */ - char txo_yalign; /* Y alignment (see above) */ - } GrTextOption; - - typedef union _GR_textColor { /* text color union */ - GrColor v; /* color value for "direct" text */ - GrColorTableP p; /* color table for attribute text */ - } GrTextColor; - -The text can be rotated in increments of 90 degrees (txo_direct), -alignments can be set in both directions (txo_xalign and txo_yalign), -and separate fore and background colors can be specified. The accepted -text direction values: - - #define GR_TEXT_RIGHT 0 /* normal */ - #define GR_TEXT_DOWN 1 /* downward */ - #define GR_TEXT_LEFT 2 /* upside down, right to left */ - #define GR_TEXT_UP 3 /* upward */ - #define GR_TEXT_DEFAULT GR_TEXT_RIGHT - -The accepted horizontal and vertical alignment option values: - - #define GR_ALIGN_LEFT 0 /* X only */ - #define GR_ALIGN_TOP 0 /* Y only */ - #define GR_ALIGN_CENTER 1 /* X, Y */ - #define GR_ALIGN_RIGHT 2 /* X only */ - #define GR_ALIGN_BOTTOM 2 /* Y only */ - #define GR_ALIGN_BASELINE 3 /* Y only */ - #define GR_ALIGN_DEFAULT GR_ALIGN_LEFT - -Text strings can be of three different types: one character per byte -(i.e. the usual C character string, this is the default), one character -per 16-bit word (suitable for fonts with a large number of characters), -and a PC-style character-attribute pair. In the last case the -GrTextOption structure must contain a pointer to a color table of size -16 (fg color bits in attrib) or 8 (bg color bits). (The color table -format is explained in more detail in the previous section explaining -the methods to build fill patterns.) The supported text types: - - #define GR_BYTE_TEXT 0 /* one byte per character */ - #define GR_WORD_TEXT 1 /* two bytes per character */ - #define GR_ATTR_TEXT 2 /* chr w/ PC style attribute byte */ - -The PC-style attribute text uses the same layout (first byte: character, -second: attributes) and bitfields as the text mode screen on the PC. -The only difference is that the 'blink' bit is not supported (it would -be very time consuming - the PC text mode does it with hardware -support). This bit is used instead to control the underlined display of -characters. For convenience the following attribute manipulation macros -have been declared in grx20.h: - - #define GR_BUILD_ATTR(fg,bg,ul) \ - (((fg) & 15) | (((bg) & 7) << 4) | ((ul) ? 128 : 0)) - #define GR_ATTR_FGCOLOR(attr) (((attr) ) & 15) - #define GR_ATTR_BGCOLOR(attr) (((attr) >> 4) & 7) - #define GR_ATTR_UNDERLINE(attr) (((attr) ) & 128) - -Text strings of the types GR_BYTE_TEXT and GR_WORD_TEXT can also be -drawn underlined. This is controlled by OR-ing the constant -GR_UNDERLINE_TEXT to the foreground color value: - - #define GR_UNDERLINE_TEXT (GrXOR << 4) - -After the application initializes a text option structure with the -desired values it can call one of the following two text drawing -functions: - - void GrDrawChar(int chr,int x,int y,const GrTextOption *opt); - void GrDrawString(void *text,int length,int x,int y,const GrTextOption *opt); - -NOTE: text drawing is fastest when it is drawn in the 'normal' -direction, and the character does not have to be clipped. It this case -the library can use the appropriate low-level video RAM access routine, -while in any other case the text is drawn pixel-by-pixel by the -higher-level code. - -There are pattern filed versions too: - - void GrPatternDrawChar(int chr,int x,int y,const GrTextOption *opt,GrPattern *p); - void GrPatternDrawString(void *text,int length,int x,int y,const GrTextOption *opt, - GrPattern *p); - void GrPatternDrawStringExt(void *text,int length,int x,int y, - const GrTextOption *opt,GrPattern *p); - -The size of a font, a character or a text string can be obtained by -calling one of the following functions. These functions also take into -consideration the text direction specified in the text option structure -passed to them. - - int GrFontCharPresent(const GrFont *font,int chr); - int GrFontCharWidth(const GrFont *font,int chr); - int GrFontCharHeight(const GrFont *font,int chr); - int GrFontCharBmpRowSize(const GrFont *font,int chr); - int GrFontCharBitmapSize(const GrFont *font,int chr); - int GrFontStringWidth(const GrFont *font,void *text,int len,int type); - int GrFontStringHeight(const GrFont *font,void *text,int len,int type); - int GrProportionalTextWidth(const GrFont *font,void *text,int len,int type); - int GrCharWidth(int chr,const GrTextOption *opt); - int GrCharHeight(int chr,const GrTextOption *opt); - void GrCharSize(int chr,const GrTextOption *opt,int *w,int *h); - int GrStringWidth(void *text,int length,const GrTextOption *opt); - int GrStringHeight(void *text,int length,const GrTextOption *opt); - void GrStringSize(void *text,int length,const GrTextOption *opt,int *w,int *h); - -The GrTextRegion structure and its associated functions can be used to -implement a fast (as much as possible in graphics modes) rectangular -text window using a fixed font. Clipping for such windows is done in -character size increments instead of pixels (i.e. no partial characters -are drawn). Only fixed fonts can be used in their natural size. -GrDumpText will cache the code of the drawn characters in the buffer -pointed to by the 'backup' slot (if it is non-NULL) and will draw a -character only if the previously drawn character in that grid element -is different. - -This can speed up text scrolling significantly in graphics modes. The -supported text types are the same as above. - - typedef struct { /* fixed font text window desc. */ - struct _GR_font *txr_font; /* font to be used */ - union _GR_textColor txr_fgcolor; /* foreground color */ - union _GR_textColor txr_bgcolor; /* background color */ - void *txr_buffer; /* pointer to text buffer */ - void *txr_backup; /* optional backup buffer */ - int txr_width; /* width of area in chars */ - int txr_height; /* height of area in chars */ - int txr_lineoffset; /* offset in buffer(s) between rows */ - int txr_xpos; /* upper left corner X coordinate */ - int txr_ypos; /* upper left corner Y coordinate */ - char txr_chrtype; /* character type (see above) */ - } GrTextRegion; - - void GrDumpChar(int chr,int col,int row,const GrTextRegion *r); - void GrDumpText(int col,int row,int wdt,int hgt,const GrTextRegion *r); - void GrDumpTextRegion(const GrTextRegion *r); - -The GrDumpTextRegion function outputs the whole text region, while -GrDumpText draws only a user-specified part of it. GrDumpChar updates -the character in the buffer at the specified location with the new -character passed to it as argument and then draws the new character on -the screen as well. With these functions you can simulate a text mode -window, write chars directly to the txr_buffer and call -GrDumpTextRegion when you want to update the window (or GrDumpText if -you know the area to update is small). - -See the *test/fonttest.c* example. - - -File: grx249um.inf, Node: Drawing in user coordinates, Next: Graphics cursors, Prev: Text drawing, Up: A User Manual For GRX2 - -Drawing in user coordinates -=========================== - -There is a second set of the graphics primitives which operates in user -coordinates. Every context has a user to screen coordinate mapping -associated with it. An application specifies the user window by calling -the GrSetUserWindow function. - - void GrSetUserWindow(int x1,int y1,int x2,int y2); - -A call to this function it in fact specifies the virtual coordinate -limits which will be mapped onto the current context regardless of the -size of the context. For example, the call: - - GrSetUserWindow(0,0,11999,8999); - -tells the library that the program will perform its drawing operations -in a coordinate system X:0...11999 (width = 12000) and Y:0...8999 -(height = 9000). This coordinate range will be mapped onto the total -area of the current context. The virtual coordinate system can also be -shifted. For example: - - GrSetUserWindow(5000,2000,16999,10999); - -The user coordinates can even be used to turn the usual left-handed -coordinate system (0:0 corresponds to the upper left corner) to a right -handed one (0:0 corresponds to the bottom left corner) by calling: - - GrSetUserWindow(0,8999,11999,0); - -The library also provides three utility functions for the query of the -current user coordinate limits and for converting user coordinates to -screen coordinates and vice versa. - - void GrGetUserWindow(int *x1,int *y1,int *x2,int *y2); - void GrGetScreenCoord(int *x,int *y); - void GrGetUserCoord(int *x,int *y); - -If an application wants to take advantage of the user to screen -coordinate mapping it has to use the user coordinate version of the -graphics primitives. These have exactly the same parameter passing -conventions as their screen coordinate counterparts. NOTE: the user -coordinate system is not initialized by the library! The application -has to set up its coordinate mapping before calling any of the use -coordinate drawing functions - otherwise the program will almost -certainly exit (in a quite ungraceful fashion) with a 'division by -zero' error. The list of supported user coordinate drawing functions: - - void GrUsrPlot(int x,int y,GrColor c); - void GrUsrLine(int x1,int y1,int x2,int y2,GrColor c); - void GrUsrHLine(int x1,int x2,int y,GrColor c); - void GrUsrVLine(int x,int y1,int y2,GrColor c); - void GrUsrBox(int x1,int y1,int x2,int y2,GrColor c); - void GrUsrFilledBox(int x1,int y1,int x2,int y2,GrColor c); - void GrUsrFramedBox(int x1,int y1,int x2,int y2,int wdt,GrFBoxColors *c); - void GrUsrCircle(int xc,int yc,int r,GrColor c); - void GrUsrEllipse(int xc,int yc,int xa,int ya,GrColor c); - void GrUsrCircleArc(int xc,int yc,int r,int start,int end, - int style,GrColor c); - void GrUsrEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,GrColor c); - void GrUsrFilledCircle(int xc,int yc,int r,GrColor c); - void GrUsrFilledEllipse(int xc,int yc,int xa,int ya,GrColor c); - void GrUsrFilledCircleArc(int xc,int yc,int r,int start,int end, - int style,GrColor c); - void GrUsrFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,GrColor c); - void GrUsrPolyLine(int numpts,int points[][2],GrColor c); - void GrUsrPolygon(int numpts,int points[][2],GrColor c); - void GrUsrFilledConvexPolygon(int numpts,int points[][2],GrColor c); - void GrUsrFilledPolygon(int numpts,int points[][2],GrColor c); - void GrUsrFloodFill(int x, int y, GrColor border, GrColor c); - GrColor GrUsrPixel(int x,int y); - GrColor GrUsrPixelC(GrContext *c,int x,int y); - void GrUsrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *o); - void GrUsrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *o); - void GrUsrCustomCircle(int xc,int yc,int r,const GrLineOption *o); - void GrUsrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *o); - void GrUsrCustomCircleArc(int xc,int yc,int r,int start,int end, - int style,const GrLineOption *o); - void GrUsrCustomEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,const GrLineOption *o); - void GrUsrCustomPolyLine(int numpts,int points[][2],const GrLineOption *o); - void GrUsrCustomPolygon(int numpts,int points[][2],const GrLineOption *o); - void GrUsrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp); - void GrUsrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp); - void GrUsrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp); - void GrUsrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp); - void GrUsrPatternedCircleArc(int xc,int yc,int r,int start,int end, - int style,GrLinePattern *lp); - void GrUsrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,GrLinePattern *lp); - void GrUsrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp); - void GrUsrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp); - void GrUsrPatternFilledPlot(int x,int y,GrPattern *p); - void GrUsrPatternFilledLine(int x1,int y1,int x2,int y2,GrPattern *p); - void GrUsrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p); - void GrUsrPatternFilledCircle(int xc,int yc,int r,GrPattern *p); - void GrUsrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p); - void GrUsrPatternFilledCircleArc(int xc,int yc,int r,int start,int end,int style,GrPattern *p); - void GrUsrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrPattern *p); - void GrUsrPatternFilledConvexPolygon(int numpts,int points[][2],GrPattern *p); - void GrUsrPatternFilledPolygon(int numpts,int points[][2],GrPattern *p); - void GrUsrPatternFloodFill(int x, int y, GrColor border, GrPattern *p); - void GrUsrDrawChar(int chr,int x,int y,const GrTextOption *opt); - void GrUsrDrawString(char *text,int length,int x,int y,const GrTextOption *opt); - void GrUsrTextXY(int x,int y,char *text,GrColor fg,GrColor bg); - - -File: grx249um.inf, Node: Graphics cursors, Next: Keyboard input, Prev: Drawing in user coordinates, Up: A User Manual For GRX2 - -Graphics cursors -================ - -The library provides support for the creation and usage of an unlimited -number of graphics cursors. An application can use these cursors for -any purpose. Cursors always save the area they occupy before they are -drawn. When moved or erased they restore this area. As a general rule -of thumb, an application should erase a cursor before making changes to -an area it occupies and redraw the cursor after finishing the drawing. -Cursors are created with the GrBuildCursor function: - - GrCursor *GrBuildCursor(char far *pixels,int pitch,int w,int h, - int xo,int yo,const GrColorTableP c); - -The pixels, w (=width), h (=height) and c (= color table) arguments are -similar to the arguments of the pixmap building library function -GrBuildPixmap (see that paragraph for a more detailed explanation.), -but with two differences. First, is not assumed that the pixels data -is w x h sized, the pitch argument set the offset between rows. Second, -the pixmap data is interpreted slightly differently, any pixel with -value zero is taken as a "transparent" pixel, i.e. the background will -show through the cursor pattern at that pixel. A pixmap data byte with -value = 1 will refer to the first color in the table, and so on. - -The xo (= X offset) and yo (= Y offset) arguments specify the position -(from the top left corner of the cursor pattern) of the cursor's "hot -point". - -The GrCursor data structure: - - typedef struct _GR_cursor { - struct _GR_context work; /* work areas (4) */ - int xcord,ycord; /* cursor position on screen */ - int xsize,ysize; /* cursor size */ - int xoffs,yoffs; /* LU corner to hot point offset */ - int xwork,ywork; /* save/work area sizes */ - int xwpos,ywpos; /* save/work area position on screen */ - int displayed; /* set if displayed */ - } GrCursor; - -is typically not used (i.e. read or changed) by the application -program, it should just pass pointers to these structures to the -appropriate library functions. Other cursor manipulation functions: - - void GrDisplayCursor(GrCursor *cursor); - void GrEraseCursor(GrCursor *cursor); - void GrMoveCursor(GrCursor *cursor,int x,int y); - void GrDestroyCursor(GrCursor *cursor); - -See the *test/curstest.c* example. - - -File: grx249um.inf, Node: Keyboard input, Next: Mouse event handling, Prev: Graphics cursors, Up: A User Manual For GRX2 - -Keyboard input -============== - -GRX can handle platform independant key input. The file grxkeys.h -defines the keys to be used in the user's program. This is an extract: - - #define GrKey_Control_A 0x0001 - #define GrKey_Control_B 0x0002 - #define GrKey_Control_C 0x0003 - ... - #define GrKey_A 0x0041 - #define GrKey_B 0x0042 - #define GrKey_C 0x0043 - ... - #define GrKey_F1 0x013b - #define GrKey_F2 0x013c - #define GrKey_F3 0x013d - ... - #define GrKey_Alt_F1 0x0168 - #define GrKey_Alt_F2 0x0169 - #define GrKey_Alt_F3 0x016a - -But you can be confident that the standard ASCII is right maped. The -GrKeyType type is defined to store keycodes: - - typedef unsigned short GrKeyType; - -This function: - - int GrKeyPressed(void); - -returns non zero if there are any keycode waiting, that can be read -with: - - GrKeyType GrKeyRead(void); - -The function: - - int GrKeyStat(void); - -returns a keyboard status word, or-ing it with the next defines it can -be known the status of some special keys: - - #define GR_KB_RIGHTSHIFT 0x01 /* right shift key depressed */ - #define GR_KB_LEFTSHIFT 0x02 /* left shift key depressed */ - #define GR_KB_CTRL 0x04 /* CTRL depressed */ - #define GR_KB_ALT 0x08 /* ALT depressed */ - #define GR_KB_SCROLLOCK 0x10 /* SCROLL LOCK active */ - #define GR_KB_NUMLOCK 0x20 /* NUM LOCK active */ - #define GR_KB_CAPSLOCK 0x40 /* CAPS LOCK active */ - #define GR_KB_INSERT 0x80 /* INSERT state active */ - #define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT) - -See the *test/keys.c* example. - - -File: grx249um.inf, Node: Mouse event handling, Next: Writing/reading PNM graphics files, Prev: Keyboard input, Up: A User Manual For GRX2 - -Mouse event handling -==================== - -All mouse services need the presence of a mouse. An application can test -whether a mouse is available by calling the function: - - int GrMouseDetect(void); - -which will return zero if no mouse (or mouse driver) is present, -non-zero otherwise. The mouse must be initialized by calling one (and -only one) of these functions: - - void GrMouseInit(void); - void GrMouseInitN(int queue_size); - -GrMouseInit sets a event queue (see below) size to GR_M_QUEU_SIZE -(128). A user supply event queue size can be set calling GrMouseInitN -instead. - -It is a good practice to call GrMouseUnInit before exiting the program. -This will restore any interrupt vectors hooked by the program to their -original values. - - void GrMouseUnInit(void); - -The mouse can be controlled with the following functions: - - void GrMouseSetSpeed(int spmult,int spdiv); - void GrMouseSetAccel(int thresh,int accel); - void GrMouseSetLimits(int x1,int y1,int x2,int y2); - void GrMouseGetLimits(int *x1,int *y1,int *x2,int *y2); - void GrMouseWarp(int x,int y); - -The library calculates the mouse position only from the mouse mickey -counters. (To avoid the limit and 'rounding to the next multiple of -eight' problem with some mouse driver when it finds itself in a -graphics mode unknown to it.) The parameters to the GrMouseSetSpeed -function specify how coordinate changes are obtained from mickey -counter changes, multipling by spmult and dividing by spdiv. In high -resolution graphics modes the value of one just works fine, in low -resolution modes (320x200 or similar) it is best set the spdiv to two or -three. (Of course, it also depends on the sensitivity the mouse.) The -GrMouseSetAccel function is used to control the ballistic effect: if a -mouse coordinate changes between two samplings by more than the thresh -parameter, the change is multiplied by the accel parameter. NOTE: some -mouse drivers perform similar calculations before reporting the -coordinates in mickeys. In this case the acceleration done by the -library will be additional to the one already performed by the mouse -driver. The limits of the mouse movement can be set (passed limits will -be clipped to the screen) with GrMouseSetLimits (default is the whole -screen) and the current limits can be obtained with GrMouseGetLimits. -GrMouseWarp sets the mouse cursor to the specified position. - -As typical mouse drivers do not know how to draw mouse cursors in high -resolution graphics modes, the mouse cursor is drawn by the library. -The mouse cursor can be set with: - - void GrMouseSetCursor(GrCursor *cursor); - void GrMouseSetColors(GrColor fg,GrColor bg); - -GrMouseSetColors uses an internal arrow pattern, the color fg will be -used as the interior of it and bg will be the border. The current mouse -cursor can be obtained with: - - GrCursor *GrMouseGetCursor(void); - -The mouse cursor can be displayed/erased with: - - void GrMouseDisplayCursor(void); - void GrMouseEraseCursor(void); - -The mouse cursor can be left permanently displayed. All graphics -primitives except for the few non-clipping functions check for -conflicts with the mouse cursor and erase it before the drawing if -necessary. Of course, it may be more efficient to erase the cursor -manually before a long drawing sequence and redraw it after completion. -The library provides an alternative pair of calls for this purpose -which will erase the cursor only if it interferes with the drawing: - - int GrMouseBlock(GrContext *c,int x1,int y1,int x2,int y2); - void GrMouseUnBlock(int return_value_from_GrMouseBlock); - -GrMouseBlock should be passed the context in which the drawing will -take place (the usual convention of NULL meaning the current context is -supported) and the limits of the affected area. It will erase the -cursor only if it interferes with the drawing. When the drawing is -finished GrMouseUnBlock must be called with the argument returned by -GrMouseBlock. - -The status of the mouse cursor can be obtained with calling -GrMouseCursorIsDisplayed. This function will return non-zero if the -cursor is displayed, zero if it is erased. - - int GrMouseCursorIsDisplayed(void); - -The library supports (beside the simple cursor drawing) three types of -"rubberband" attached to the mouse cursor. The GrMouseSetCursorMode -function is used to select the cursor drawing mode. - - void GrMouseSetCursorMode(int mode,...); - -The parameter mode can have the following values: - - #define GR_M_CUR_NORMAL 0 /* MOUSE CURSOR modes: just the cursor */ - #define GR_M_CUR_RUBBER 1 /* rect. rubber band (XOR-d to the screen) */ - #define GR_M_CUR_LINE 2 /* line attached to the cursor */ - #define GR_M_CUR_BOX 3 /* rectangular box dragged by the cursor */ - -GrMouseSetCursorMode takes different parameters depending on the cursor -drawing mode selected. The accepted call formats are: - - GrMouseSetCursorMode(M_CUR_NORMAL); - GrMouseSetCursorMode(M_CUR_RUBBER,xanchor,yanchor,GrColor); - GrMouseSetCursorMode(M_CUR_LINE,xanchor,yanchor,GrColor); - GrMouseSetCursorMode(M_CUR_BOX,dx1,dy1,dx2,dy2,GrColor); - -The anchor parameters for the rubberband and rubberline modes specify a -fixed screen location to which the other corner of the primitive is -bound. The dx1 through dy2 parameters define the offsets of the corners -of the dragged box from the hotpoint of the mouse cursor. The color -value passed is always XOR-ed to the screen, i.e. if an application -wants the rubberband to appear in a given color on a given background -then it has to pass the XOR of these two colors to GrMouseSetCursorMode. - -The GrMouseGetEvent function is used to obtain the next mouse or -keyboard event. It takes a flag with various bits encoding the type of -event needed. It returns the event in a GrMouseEvent structure. The -relevant declarations from grx20.h: - - void GrMouseGetEvent(int flags,GrMouseEvent *event); - - typedef struct _GR_mouseEvent { /* mouse event buffer structure */ - int flags; /* event type flags (see above) */ - int x,y; /* mouse coordinates */ - int buttons; /* mouse button state */ - int key; /* key code from keyboard */ - int kbstat; /* keybd status (ALT, CTRL, etc..) */ - long dtime; /* time since last event (msec) */ - } GrMouseEvent; - -The event structure has been extended with a keyboard status word (thus -a program can check for combinations like ALT-) -and a time stamp which can be used to check for double clicks, etc... -The following macros have been defined in grx20.h to help in creating -the control flag for GrMouseGetEvent and decoding the various bits in -the event structure: - - #define GR_M_MOTION 0x001 /* mouse event flag bits */ - #define GR_M_LEFT_DOWN 0x002 - #define GR_M_LEFT_UP 0x004 - #define GR_M_RIGHT_DOWN 0x008 - #define GR_M_RIGHT_UP 0x010 - #define GR_M_MIDDLE_DOWN 0x020 - #define GR_M_MIDDLE_UP 0x040 - #define GR_M_BUTTON_DOWN (GR_M_LEFT_DOWN | GR_M_MIDDLE_DOWN | \ - GR_M_RIGHT_DOWN | GR_M_P4_DOWN | GR_M_P5_DOWN) - #define GR_M_BUTTON_UP (GR_M_LEFT_UP | GR_M_MIDDLE_UP | \ - GR_M_RIGHT_UP | GR_M_P4_UP | GR_M_P5_UP) - #define GR_M_BUTTON_CHANGE (GR_M_BUTTON_UP | GR_M_BUTTON_DOWN ) - - #define GR_M_LEFT 0x01 /* mouse button index bits */ - #define GR_M_RIGHT 0x02 - #define GR_M_MIDDLE 0x04 - #define GR_M_P4 0x08 /* wheel rolls up */ - #define GR_M_P5 0x10 /* wheel rolls down */ - - #define GR_M_KEYPRESS 0x080 /* other event flag bits */ - #define GR_M_POLL 0x100 - #define GR_M_NOPAINT 0x200 - #define GR_COMMAND 0x1000 - #define GR_M_EVENT (GR_M_MOTION | GR_M_KEYPRESS | \ - GR_M_BUTTON_CHANGE | GR_COMMAND) - -GrMouseGetEvent will display the mouse cursor if it was previously -erased and the GR_M_NOPAINT bit is not set in the flag passed to it. In -this case it will also erase the cursor after an event has been -obtained. - -GrMouseGetEvent block until a event is produced, except if the -GR_M_POLL bit is set in the flag passed to it. - -Another version of GetEvent: - - void GrMouseGetEventT(int flags,GrMouseEvent *event,long timout_msecs); - -can be istructed to wait timout_msec for the presence of an event. Note -that event->dtime is only valid if any event occured (event->flags != -0) otherwise it's set as -1. Additionally event timing is real world -time even in X11 && Linux. - -If there are one or more events waiting the function: - - int GrMousePendingEvent(void); - -returns non-zero value. - -The generation of mouse and keyboard events can be individually enabled -or disabled (by passing a non-zero or zero, respectively, value in the -corresponding enable_XX parameter) by calling: - - void GrMouseEventEnable(int enable_kb,int enable_ms); - -Note that GrMouseInit set both by default. If you want to use -GrMouseGetEvent and GrKeyRead at the same time, a call to -GrMouseEventEnable( 0,1 ) is needed before input process. - -See the *test/mousetst.c* example. - - -File: grx249um.inf, Node: Writing/reading PNM graphics files, Next: Writing/reading PNG graphics files, Prev: Mouse event handling, Up: A User Manual For GRX2 - -Writing/reading PNM graphics files -================================== - -GRX includes functions to load/save a context from/to a PNM file. - -PNM is a group of simple graphics formats from the NetPbm -(http://netpbm.sourceforge.net) distribution. NetPbm can convert -from/to PNM lots of graphics formats, and apply some transformations to -PNM files. (Note. You don't need the NetPbm distribution to use this -functions). - -There are six PNM formats: - - P1 text PBM (bitmap) - P2 text PGM (gray scale) - P3 text PPM (real color) - P4 binary PBM (bitmap) - P5 binary PGM (gray scale) - P6 binary PPM (real color) - -GRX can handle the binary formats only (get the NetPbm distribution if -you need convert text to binary formats). - -To save a context in a PNM file you have three functions: - - int GrSaveContextToPbm( GrContext *grc, char *pbmfn, char *docn ); - int GrSaveContextToPgm( GrContext *grc, char *pgmfn, char *docn ); - int GrSaveContextToPpm( GrContext *grc, char *ppmfn, char *docn ); - -they work both in RGB and palette modes, grc must be a pointer to the -context to be saved, if it is NULL the current context is saved; p-mfn -is the file name to be created and docn is an optional text comment to -be written in the file, it can be NULL. Three functions return 0 on -succes and -1 on error. - -GrSaveContextToPbm dumps a context in a PBM file (bitmap). If the pixel -color isn't Black it asumes White. - -GrSaveContextToPgm dumps a context in a PGM file (gray scale). The -colors are quantized to gray scale using .299r + .587g + .114b. - -GrSaveContextToPpm dumps a context in a PPM file (real color). To load -a PNM file in a context you must use: - - int GrLoadContextFromPnm( GrContext *grc, char *pnmfn ); - -it support reading PBM, PGM and PPM binary files. grc must be a pointer -to the context to be written, if it is NULL the current context is -used; p-mfn is the file name to be read. If context dimensions are -lesser than pnm dimensions, the function loads as much as it can. If -color mode is not in RGB mode, the routine allocates as much colors as -it can. The function returns 0 on succes and -1 on error. - -To query the file format, width and height of a PNM file you can use: - - int GrQueryPnm( char *ppmfn, int *width, int *height, int *maxval ); - -pnmfn is the name of pnm file; width returns the pnm width; height -returns the pnm height; maxval returns the max color component value. -The function returns 1 to 6 on success (the PNM format) or -1 on error. - -The two next functions: - - int GrLoadContextFromPnmBuffer( GrContext *grc, const char *pnmbuf ); - int GrQueryPnmBuffer( const char *pnmbuf, int *width, int *height, int *maxval ); - -work like GrLoadContextFromPnm and GrQueryPnmBuffer, but they get his -input from a buffer instead of a file. This way, pnm files can be -embeded in a program (using the bin2c program by example). - - -File: grx249um.inf, Node: Writing/reading PNG graphics files, Next: Writing/reading JPEG graphics files, Prev: Writing/reading PNM graphics files, Up: A User Manual For GRX2 - -Writing/reading PNG graphics files -================================== - -GRX includes functions to load/save a context from/to a png file. But -note, for this purpose it needs the libpng -(http://www.libpng.org/pub/png/libpng.html) library, and to enable the -png support before make the GRX lib. - -Use next function to save a context in a PNG file: - - int GrSaveContextToPng( GrContext *grc, char *pngfn ); - -it works both in RGB and palette modes, grc must be a pointer to the -context to be saved, if it is NULL the current context is saved; pngfn -is the file name to be created. The function returns 0 on succes and --1 on error. - -To load a PNG file in a context you must use: - - int GrLoadContextFromPng( GrContext *grc, char *pngfn, int use_alpha ); - -grc must be a pointer to the context to be written, if it is NULL the -current context is used; pngfn is the file name to be read; set -use_alpha to 1 if you want to use the image alpha channel (if -available). If context dimensions are lesser than png dimensions, the -function loads as much as it can. If color mode is not in RGB mode, the -routine allocates as much colors as it can. The function returns 0 on -succes and -1 on error. - -To query the width and height of a PNG file you can use: - - int GrQueryPng( char *pngfn, int *width, int *height ); - -pngfn is the name of png file; width returns the png width; height -returns the png height. The function returns 0 on success or -1 on -error. - -The function: - - int GrPngSupport( void ); - -returns 1 if there is png support in the library, 0 otherwise. If there -is not support for png, dummy functions are added to the library, -returning error (-1) ever. - - -File: grx249um.inf, Node: Writing/reading JPEG graphics files, Next: Miscellaneous functions, Prev: Writing/reading PNG graphics files, Up: A User Manual For GRX2 - -Writing/reading PNG graphics files -================================== - -GRX includes functions to load/save a context from/to a jpeg file. But -note, for this purpose it needs the libjpeg (http://www.ijg.org) -library, and to enable the jpeg support before make the GRX lib. - -Use next function to save a context in a JPEG file: - - int GrSaveContextToJpeg( GrContext *grc, char *jpegfn, int quality ); - -it works both in RGB and palette modes, grc must be a pointer to the -context to be saved, if it is NULL the current context is saved; jpegfn -is the file name to be created; quality is a number between 1 and 100 -to drive the compression quality, use higher values for better quality -(and bigger files), you can use 75 as a standard value, normally a -value between 50 and 95 is good. The function returns 0 on succes and --1 on error. - -This function saves a context in a grayscale JPEG file: - - int GrSaveContextToGrayJpeg( GrContext *grc, char *jpegfn, int quality ); - -parameters and return codes are like in GrSaveContextToJpeg. The -colors are quantized to gray scale using .299r + .587g + .114b. - -To load a JPEG file in a context you must use: - - int GrLoadContextFromJpeg( GrContext *grc, char *jpegfn, int scale ); - -grc must be a pointer to the context to be written, if it is NULL the -current context is used; jpegfn is the file name to be read; set scale -to 1, 2, 4 or 8 to reduce the loaded image to 1/1, 1/2, 1/4 or 1/8. If -context dimensions are lesser than jpeg dimensions, the function loads -as much as it can. If color mode is not in RGB mode, the routine -allocates as much colors as it can. The function returns 0 on succes -and -1 on error. - -To query the width and height of a JPEG file you can use: - - int GrQueryJpeg( char *jpegfn, int *width, int *height ); - -jpegfn is the name of jpeg file; width returns the jpeg width; height -returns the jpeg height. The function returns 0 on success or -1 on -error. - -The function: - - int GrJpegSupport( void ); - -returns 1 if there is jpeg support in the library, 0 otherwise. If -there is not support for jpeg, dummy functions are added to the -library, returning error (-1) ever. - - -File: grx249um.inf, Node: Miscellaneous functions, Next: BGI interface, Prev: Writing/reading JPEG graphics files, Up: A User Manual For GRX2 - -Miscellaneous functions -======================= - -Here we will describe some miscellaneous functions. - - unsigned GrGetLibraryVersion(void); - -GrGetLibraryVersion returns the GRX version API, like a hexadecimal -coded number. By example 0x0241 means 2.4.1 Because grx20.h defines the -GRX_VERSION_API macro, you can check if both, the library and the -include file, are in the same version using if(GrGetLibraryVersion() == -GRX_VERSION_API ) - - unsigned GrGetLibrarySystem(void); - -This functions returns a unsigned integer identifing the system you are -working in. grx20.h defines some macros you can use: - - /* these are the supported configurations: */ - #define GRX_VERSION_TCC_8086_DOS 1 /* also works with BCC */ - #define GRX_VERSION_GCC_386_DJGPP 2 /* DJGPP v2 */ - #define GRX_VERSION_GCC_386_LINUX 3 /* the real stuff */ - #define GRX_VERSION_GENERIC_X11 4 /* generic X11 version */ - #define GRX_VERSION_WATCOM_DOS4GW 5 /* GS - Watcom C++ 11.0 32 Bit - #define GRX_VERSION_GCC_386_WIN32 7 /* WIN32 using Mingw32 */ - #define GRX_VERSION_MSC_386_WIN32 8 /* WIN32 using MS-VC */ - #define GRX_VERSION_GCC_386_CYG32 9 /* WIN32 using CYGWIN */ - #define GRX_VERSION_GCC_386_X11 10 /* X11 version */ - #define GRX_VERSION_GCC_X86_64_LINUX 11 /* console framebuffer 64 */ - #define GRX_VERSION_GCC_X86_64_X11 12 /* X11 version 64 */ - -Note. On Linux, GrGetLibrarySystem returns GRX_VERSION_GCC_386_LINUX -even in the X11 version. - - void GrSetWindowTitle(char *title); -GrSetWindowTitle sets the main window title in the X11 an Win32 -versions. It doesn't do nothing in the DOS and Linux-SvgaLib versions. - - void GrSleep(int msec); -This function stops the program execution for msec miliseconds. - - long GrMsecTime( void ); -This function gives the current time with millisecond resolution - - void GrFlush( void ); -This funnction flushes the graphics window. Not dummy because useful -only on X11 when switching between graphics and console windows open -simultaneously. - - GrContext *GrCreateFrameContext(GrFrameMode md,int w,int h, - char far *memory[4],GrContext *where); -This function is like GrCreateContext, except that you can specify any -valid memory frame mode, not only the Screen associated frame mode. It -can be used for special purposes (see GrBitBlt1bpp for an example). - - void GrBitBlt1bpp(GrContext *dst,int dx,int dy,GrContext *src, - int x1,int y1,int x2,int y2,GrColor fg,GrColor bg); -This special function does a bitblt from a 1bpp context (a bitmap -really), using fg and bg like the color+opcode when bit=1 and bit=0 -respectively. Here is an example: - - pContext = GrCreateFrameContext(GR_frameRAM1, sizex, sizey, NULL, NULL); - /* draw something (black and white) into the bitmap */ - GrSetContext(pContext); - GrClearContext( GrBlack() ); - GrLine(0, 0, sizex-1, sizey-1, GrWhite()); - GrLine(0, sizey-1, sizex-1, 0, GrWhite()); - - /* Put the bitmap into the screen */ - GrSetContext(NULL); - fcolor = GrAllocColor( 255,0,0 ); - bcolor = GrAllocColor( 0,0,255 ); - GrBitBlt1bpp(NULL,x,y,pContext,0,0,sizex-1,sizey-1,fcolor,bcolor); - - -File: grx249um.inf, Node: BGI interface, Next: Pascal interface, Prev: Miscellaneous functions, Up: A User Manual For GRX2 - -BGI interface -============= - -From the 2.3.1 version, GRX includes the BCC2GRX library created by -Hartmut Schirmer. The BCC2GRX was created to allow users of GRX to -compile graphics programs written for Borland-C++ and Turbo-C graphics -interface. BCC2GRX is not a convenient platform to develop new BGI -programs. Of course you should use native GRX interface in such cases! - -Read the readme.bgi file for more info. - - -File: grx249um.inf, Node: Pascal interface, Next: References, Prev: BGI interface, Up: A User Manual For GRX2 - -Pascal interface -================ - -The Pascal (gpc) support is produced by two unit files *pascal/grx.pas* -and *pascal/bgi/graph.pas* which are the Pascal translations of the C -header files *include/grx20.h + include/grxkeys.h* and -*include/libbcc.h*. - -Compilation of the examples and installation of the header files is -allowed by setting INCLUDE_GPC_SUPPORT=y in makedef.grx. - -The unit files contain at the beginning instructions to load the -required libraries (libgrx20..., depending on the system) and addon -libraries (e.g. libpng). You can uncomment manually the addons you -want. You can also use the configure script which does that -automatically, together with editing the makedefs.grx file. - -By default they are installed in a *units* directory below the -INSTALLDIR directory. But you can put them where you like. - - -File: grx249um.inf, Node: References, Prev: Pascal interface, Up: A User Manual For GRX2 - -References -========== - -Official GRX site `http://grx.gnu.de' -GRX mailing list archive `http://grx.gnu.de/archive/grx/en/' -MGRX site (fork from GRX) `http://mgrx.fgrim.com' -NetPbm distribution `http://netpbm.sourceforge.net' -PNG library `http://www.libpng.org/pub/png/libpng.html' -JPEG library `http://www.ijg.org' -TIFF library `http://www.remotesensing.org/libtiff/' - - - -Tag Table: -Node: Top198 -Node: A User Manual For GRX21387 -Node: Hello world2236 -Node: Data types and function declarations4021 -Node: Setting the graphics driver4755 -Node: Setting video modes5866 -Node: Graphics contexts10923 -Node: Context use18111 -Node: Color management19492 -Node: Portable use of a few colors24538 -Node: Graphics primitives26456 -Node: Non-clipping graphics primitives35143 -Node: Customized line drawing36646 -Node: Pattern filled graphics primitives39000 -Node: Patterned line drawing45938 -Node: Image manipulation47507 -Node: Text drawing50338 -Node: Drawing in user coordinates64451 -Node: Graphics cursors70791 -Node: Keyboard input73353 -Node: Mouse event handling75355 -Node: Writing/reading PNM graphics files84879 -Node: Writing/reading PNG graphics files87934 -Node: Writing/reading JPEG graphics files89779 -Node: Miscellaneous functions92098 -Node: BGI interface95535 -Node: Pascal interface96080 -Node: References97023 - -End Tag Table diff --git a/thirdparty/grx249/doc/old/api.doc b/thirdparty/grx249/doc/old/api.doc deleted file mode 100644 index 64651c0..0000000 --- a/thirdparty/grx249/doc/old/api.doc +++ /dev/null @@ -1,1610 +0,0 @@ -GRX graphics library user's manual, version 2.0 -=============================================== - - -THIS FILE IS UNDER CONSTRUCTION!!!!!!! -Use the 1.03 user's manual for description of the library functions and -consult "grx20.h" - -The most important differences: -1) COLORS ARE LONG!!!! -2) NO WIDE LINES AND PATTERNED FILLS YET! -3) NO GrFindBestFont(), NO INTEGER FONT MAGNIFICATION, - BUT FONTS CAN BE SCALED -4) ARCS HAVE AN EXTRA PARAMETER, WHICH IS THE STYLE FOR CLOSING THEM - - -==================== Don't read after this ============================= - - -Abstract - -LIBGRX is a graphics library for DJGPP or Turbo C programs. (The Turbo -C version was tested using TC++ 1.01) Currently it supports VGA (32768, -256 or 16 colors), EGA (16 colors), 8514/A (256 colors) and S3-based (256 -colors) cards. Planned future improvements include support for Hercules -cards as well. It is upward compatible with the graphics library in DJGPP -(the C part, no C++ classes). It can use the same drivers as the graphics -library in DJGPP or it can work with a new driver format supporting -programmable number of colors as well. - - -Data types, function declarations - -All public data structures and graphics primitives meant for usage by -the application program are declared/prototyped in the header files (in the -'include' sub-directory): - -GRDRIVER.H graphics driver format specifications -MOUSEX.H cursor, mouse and keyboard handling -GRX.H drawing-related structures and functions -GRXFILE.H file formats and file access routines -GRXFONT.H format of a font when loaded into memory - - -Setting video modes - -Before a program can do any graphics drawing it has to configure the -display adapter of the PC for the desired graphics mode. It is done with the -'GrSetMode' function as follows: - -#ifdef __cplusplus -void GrSetMode(int which,int width=0,int height=0,int colors=0); -#else -void GrSetMode(int which,...); -#endif - -The 'mode' parameter can be one of the following constants, declared in -"grx.h": - -typedef enum { -GR_80_25_text, -GR_default_text, -GR_width_height_text, -GR_biggest_text, -GR_320_200_graphics, -GR_default_graphics, -GR_width_height_graphics, -GR_biggest_noninterlaced_graphics, -GR_biggest_graphics, -GR_width_height_color_graphics - - - - - -LIBGRX graphics library user's manual 3 - - -} GR_graphics_modes; - -The 'GR_width_height_text' and 'GR_width_height_graphics' modes require -the two optional size arguments, and the 'GR_width_height_color_graphics' mode -requires all three optional arguments. A call with any other mode does not -require any of the optional arguments. - -NOTE: the 'GR_width_height_color_graphics' mode is a new mode supported only -if: (1) you have a new format graphics driver (see the accompanying -documentation in the file "DRIVERS.DOC"), and (2) you have a recent (version -1.06, dated after the middle of April 1992) copy of GO32 which knows how to -deal with the new driver format. - -New format graphics drivers operating in the proper environment (see above) -can provide a table of the supported text and graphics modes using: - -void GrGetDriverModes(GR_DRIVER_MODE_ENTRY **ttable,GR_DRIVER_MODE_ENTRY **gtable) - -The arguments 'ttable' and 'gtable' should be addresses of pointers to the -'GR_DRIVER_MODE_ENTRY' structure defined in the include file "grdriver.h". -Upon return the pointer variables will point to two arrays of these -structures, one for the text modes, the other for graphics. The -'GR_DRIVER_MODE_ENTRY' structure has the following fields: - -typedef struct { -unsigned short width; -unsigned short height; -unsigned short number_of_colors; -unsigned char BIOS_mode; -unsigned char special; -} GR_DRIVER_MODE_ENTRY; - -The first four structure members should be obvious, but the 'special' -field may deserve some explanation. It is non-zero if the driver does some -special "tricks" to put the card into the desired mode. An example might be -the 43 row EGA text mode: for this first the "standard" 80x25 text mode is -set up and then the character generator is re-loaded with a smaller font. -If the 'special' field is zero then the driver simply invokes the INT 10 -function 0 BIOS routine with the mode in the 'BIOS_mode' slot. - -A user-defined function can be invoked every time the video mode is -changed (i.e. 'GrSetMode' is called). This function should not take any -parameters and its return value (if any) is ignored. It can be installed -(for all subsequent 'GrSetMode' calls) with the: - -void GrSetModeHook(void (*callback)(void)); - -function. The current graphics mode (one of the valid 'mode' argument values -for 'GrSetMode') can be obtained with the: - -int GrCurrentMode(void); - - - - - -LIBGRX graphics library user's manual 4 - - -function, while the type of the installed graphics adapter can be determined -with the - -int GrAdapterType(void); - -function. 'GrAdapterType' returns the type of the adapter as one of the -following three symbolic constants (defined in "grx.h"): - -#define GR_VGA 0 /* VGA adapter */ -#define GR_EGA 1 /* EGA adapter */ -#define GR_HERC 2 /* Hercules mono adapter */ -#define GR_8514A 3 /* 8514/A or compatible */ -#define GR_S3 4 /* S3 graphics accelerator */ - - - - - -LIBGRX graphics library user's manual 5 - - -Graphics contexts - -The library supports a set of drawing regions called 'contexts' (the -'GrContext' structure). These can be in video memory or in system memory. -Contexts in system memory always have the same memory organization as the -video memory. When 'GrSetMode' is called, a default context is created which -maps to the whole graphics screen. Contexts are described by the 'GrContext' -data structure: - -typedef struct _GR_context_ { -char far *gc_baseaddr; /* base address of display memory */ -long gc_frameaddr; /* upper left corner coordinate */ -long gc_planeoffset; /* offset to next color plane */ -int gc_lineoffset; /* offset to next scan line in bytes */ -char gc_onscreen; /* is it in video memory ? */ -char gc_memflags; /* memory allocation flags */ -int gc_xmax; /* max X coord (width - 1) */ -int gc_ymax; /* max Y coord (height - 1) */ -int gc_xcliplo; /* low X clipping limit */ -int gc_ycliplo; /* low Y clipping limit */ -int gc_xcliphi; /* high X clipping limit */ -int gc_ycliphi; /* high Y clipping limit */ -int gc_usrxbase; /* user window min X coordinate */ -int gc_usrybase; /* user window min Y coordinate */ -int gc_usrwidth; /* user window width */ -int gc_usrheight; /* user window height */ -int gc_xoffset; /* X offset from root's base */ -int gc_yoffset; /* Y offset from root's base */ -struct _GR_context_ *gc_root; /* context which owns frame buf */ -} GrContext; - -There is a subtype of the 'GrContext' structure. The structure -'GrVidRAM' contains only the first slots of a context describing the memory -layout of a context. This structure is used as a component of other more -complex data structures in the library. - -typedef struct { -char far *gc_baseaddr; /* base address of display memory */ -long gc_frameaddr; /* upper left corner coordinate */ -long gc_planeoffset; /* offset to next color plane */ -int gc_lineoffset; /* offset to next scan line in bytes */ -char gc_onscreen; /* is it in video memory ? */ -char gc_memflags; /* memory allocation flags */ -} GrVidRAM; - -The following four functions return information about the layout of and -memory occupied by a graphics context of size 'width' by 'height' in the -current graphics mode (as set up by 'GrSetMode'): - -int GrLineOffset(int width); -int GrNumPlanes(void); - - - - - -LIBGRX graphics library user's manual 6 - - -long GrPlaneSize(int w,int h); -long GrContextSize(int w,int h); - -'GrLineOffset' always returns the offset between successive pixel rows of the -context in bytes. 'GrNumPlanes' returns the number of bitmap planes in the -current graphics mode. 'GrContextSize' calculates the total amount of memory -needed by a context, while 'GrPlaneSize' calculates the size of a bitplane in -the context. The function: - -GrContext *GrCreateContext(int w,int h,char far *memory,GrContext *where); - -can be used to create a new context in system memory. The NULL pointer is also -accepted as the value of the 'memory' and 'where' arguments, in this case the -library allocates the necessary amount of memory internally. - -It is a general convention in the library that functions returning -pointers to any LIBGRX specific data structure have a last argument (most of -the time named 'where' in the prototypes) which can be used to pass the -address of the data structure which should be filled with the result. If this -'where' pointer has the value of NULL, then the library allocates space for -the data structure internally. - -The function: - -GrContext *GrCreateSubContext(int x1,int y1,int x2,int y2,GrContext *parent,GrContext *where); - -creates a new sub-context which maps to a part of an existing context. The -coordinate arguments ('x1' through 'y2') are interpreted relative to the -parent context's limits. Pixel addressing is zero-based even in sub-contexts, -i.e. the address of the top left pixel is (0,0) even in a sub-context which -has been mapped onto the interior of its parent context. - -Sub-contexts can be resized, but not their parents (i.e. anything -returned by 'GrCreateContext' or set up by 'GrSetMode' cannot be resized -- -because this could lead to irrecoverable "loss" of drawing memory. The -following function can be used for this purpose: - -void GrResizeSubContext(GrContext *context,int x1,int y1,int x2,int y2); - -The current context structure is stored in a static location in the -library. (For efficiency reasons -- it is used quite frequently, and this way -no pointer dereferencing is necessary.) The context stores all relevant -information about the video organization, coordinate limits, etc... The -current context can be set with the: - -void GrSetContext(GrContext *context); - -function. This function will reset the current context to the full graphics -screen if it is passed the NULL pointer as argument. The value of the current -context can be saved into a 'GrContext' structure pointed to by 'where' using: - - - - - -LIBGRX graphics library user's manual 7 - - -GrContext *GrSaveContext(GrContext *where); - -(Again, if 'where' is NULL, the library allocates the space.) Contexts can be -destroyed with: - -void GrDestroyContext(GrContext *context); - -This function will free the memory occupied by the context only if it was -allocated originally by the library. The next three functions set up and query -the clipping limits associated with the context: - -void GrSetClipBox(int x1,int y1,int x2,int y2); -void GrGetClipBox(int *x1p,int *y1p,int *x2p,int *y2p); -void GrResetClipBox(void); - -'GrResetClipBox' sets the clipping limits to the limits of context. These are -the limits set up initially when a context is created. The limits of the -current context can be obtained using the following functions: - -int GrMaxX(void); -int GrMaxY(void); -int GrSizeX(void); -int GrSizeY(void); - -The 'Max' functions return the biggest valid coordinate, while the 'Size' -functions return a value one higher. The limits of the graphics screen -(regardless of the current context) can be obtained with: - -int GrScreenX(void); -int GrScreenY(void); - - -Color management - -The library supports two models for color management. In the 'indirect' -(or color table) mode colors can be allocated with the highest resolution -supported by the hardware (EGA: 2 bits, VGA: 6 bits) with respect to the -component color intensities. In the 'direct' or RGB mode color indices map -directly into component color intensities with non-overlapping bitfields of -the color index representing the component colors. The RGB mode is supported -in 256 color and 32768 color VGA modes only (for 32768 colors this is the only -mode because of the limitations of the VGA hardware with HiColor DAC). In RGB -mode the color index maps to component color intensities as follows: - -256: rrrgggbb (3 bits for red and green, 2 for blue) -32768: xrrrrrgggggbbbbb (5 bits for each component color) - -The RGB mode is not supported in 16 color EGA and VGA modes as there are -too few available colors to provide adequate coverage. The advantage of the -RGB mode is faster color allocation (no table lookup, DAC register - - - - - -LIBGRX graphics library user's manual 8 - - -programming, etc...) its disadvantage is the relatively crude approximation of -the component color intensities. - -After the first 'GrSetMode' call two colors are always defined: black -and white. The indices of these two colors are returned by the functions: - -int GrBlack(void); -int GrWhite(void); - -NOTE: unlike the original DJGPP library, LIBGRX does not guarantee that the -white color -has the color index value of one. (GrBlack still returns 0). - -The library supports four write modes: write, XOR, logical OR and -logical AND. These can be selected with OR-ing the color index with one of the -following constants declared in "grx.h": - -#ifdef __TURBOC__ -# define GrXOR 0x100 /* to "XOR" any color to the screen */ -# define GrOR 0x200 /* to "OR" to the screen */ -# define GrAND 0x300 /* to "AND" to the screen */ -#endif -#ifdef __GNUC__ /* changed for 16 bit colors */ -# define GrXOR 0x10000 /* to "XOR" any color to the screen */ -# define GrOR 0x20000 /* to "OR" to the screen */ -# define GrAND 0x30000 /* to "AND" to the screen */ -#endif -#define GrWRITE 0 /* write color */ -#define GrNOCOLOR (GrXOR | 0) /* GrNOCOLOR is used for "no" color */ - -NOTE: 'GrXOR' was declared to be "0x100" in the original DJGPP library, but -its value had to be changed in LIBGRX in anticipation of the 32768 color VGA -support. - -By convention, the no-op color is obtained by combining color index 0 (black) -with the XOR operation. This no-op color has been defined in "grx.h" as -'GrNOCOLOR'. - -The number of colors in the current graphics mode is returned by the: - -int GrNumColors(void); - -function, while the number of unused, available color can be obtained by -calling: - -int GrNumFreeColors(void); - -Colors can be allocated with the: - -int GrAllocColor(int r,int g,int b); - - - - - -LIBGRX graphics library user's manual 9 - - -function (component intensities can range from 0 to 255), or with the: - -int GrAllocCell(void); - -function. In the second case the component intensities of the returned color -can be set with: - -void GrSetColor(int color,int r,int g,int b); - -Both 'Alloc' functions return 'GrNOCOLOR' if there are no more free colors -available. Additionally 'GrAllocCell' always returns 'GrNOCOLOR' when the -color system is in RGB mode, as colors returned by 'GrAllocCell' are meant to -be changed -- what is not supposed to be done in RGB mode. Also note that -'GrAllocColor' operates much more efficiently in RGB mode, and that it never -returns 'GrNOCOLOR' in this case. - -Color table entries can be freed (when not in RGB mode) by calling: - -void GrFreeColor(int color); - -The component intensities of any color can be queried using the function: - -void GrQueryColor(int c,int *r,int *g,int *b); - -Initially the color system is in color table (indirect) mode. (Except -for the 32768 color VGA modes which are always in RGB mode.) 256 color VGA -modes can be put into the RGB mode by calling: - -void GrSetRGBcolorMode(void); - -The color system can be reset (i.e. put back into color table mode if -possible, all colors freed except for black and white) by calling: - -void GrResetColors(void); - -The function: - -void GrRefreshColors(void); - -reloads the currently allocated color values into the video hardware. This -function is not needed in typical applications, unless the display adapter is -programmed directly by the application. - -Graphics primitives - -The screen, the current context or the current clip box can be cleared -(i.e.set toadesired backgroundcolor)by usingoneof thefollowingthree functions: - -void GrClearScreen(int bg); -void GrClearContext(int bg); -void GrClearClipBox(int bg); - - - - - -LIBGRX graphics library user's manual 10 - - -The following line drawing graphics primitives are supported by the library: - -void GrPlot(int x,int y,int c); -void GrLine(int x1,int y1,int x2,int y2,int c); -void GrHLine(int x1,int x2,int y,int c); -void GrVLine(int x,int y1,int y2,int c); -void GrBox(int x1,int y1,int x2,int y2,int c); -void GrCircle(int xc,int yc,int r,int c); -void GrEllipse(int xc,int yc,int xa,int ya,int c); -void GrCircleArc(int xc,int yc,int r,int start,int end,int c); -void GrEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int c); -void GrPolyLine(int numpts,int points[][2],int c); -void GrPolygon(int numpts,int points[][2],int c); - -All primitives operate on the current graphics context. The last argument of -these functions is always the color index to use for the drawing. The -'HLine' and 'VLine' primitives are for drawing horizontal and vertical -lines. They have been included in the library because they are more -efficient than the general line drawing provided by 'GrLine'. The ellipse -primitives can only draw ellipses with their major axis parallel with either -the X or Y coordinate axis. They take the half X and Y axis length in the -'xa' and 'ya' arguments. The arc (circle and ellipse) drawing functions take -the start and end angles in tenths of degrees (i.e. meaningful range: 0 ... -3600). The angles are interpreted counter-clockwise starting from the -positive X axis. The polyline and polygon primitives take the address of an -n by 2 coordinate array. The X values should be stored in the elements with -0 second index, and the Y values in the elements with a second index value -of 1. Coordinate arrays passed to the polygon primitives can either contain -or omit the closing edge of the polygon -- the primitive will append it to -the list if it is missing. - -The following filled primitives are available: - -void GrFilledBox(int x1,int y1,int x2,int y2,int c); -void GrFramedBox(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c); -void GrFilledCircle(int xc,int yc,int r,int c); -void GrFilledEllipse(int xc,int yc,int xa,int ya,int c); -void GrFilledCircleArc(int xc,int yc,int r,int start,int end,int c); -void GrFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int c); -void GrFilledPolygon(int numpts,int points[][2],int c); -void GrFilledConvexPolygon(int numpts,int points[][2],int c); - -Similarly to the line drawing, all of the above primitives operate on -the current graphics context. The 'GrFramedBox' primitive can be used to draw -motif-like shaded boxes and "ordinary" framed boxes as well. The 'x1' through -'y2' coordinates specify the interior of the box, the border is outside this -area. The primitive uses five different colors for the interior and four -borders of the box which are specified in the 'GrFBoxColors' structure: - -typedef struct { -int fbx_intcolor; -int fbx_topcolor; - - - - - -LIBGRX graphics library user's manual 11 - - -int fbx_rightcolor; -int fbx_bottomcolor; -int fbx_leftcolor; -} GrFBoxColors; - -The 'GrFilledConvexPolygon' primitive can be used to fill convex polygons. It -can also be used to fill some concave polygons whose boundaries do not -intersect any horizontal scan line more than twice. All other concave polygons -have to be filled with the (somewhat less efficient) 'GrFilledPolygon' -primitive. This primitive can also be used to fill several disjoint non- -overlapping polygons in a single operation. - -The current color value of any pixel in the current context can be obtained -with: - -int GrPixel(int x,int y); - -Rectangular areas can be transferred within a context or between contexts by -calling: - -void GrBitBlt(GrContext *dest,int x,int y,GrContext *source,int x1,int y1,int x2,int y2,int oper); - -The 'oper' argument should be one of supported color modes (write, XOR, OR, -AND), it will control how the pixels from the source context are combined with -the pixels in the destination context. If either the source or the destination -context argument is the NULL pointer then the current context is used for that -argument. - - -Non-clipping graphics primitives - -There is a non-clipping version of some of the elementary primitives. -These are somewhat more efficient than the regular versions. These are to be -used only in situations when it is absolutely certain that no drawing will be -performed beyond the boundaries of the current context. Otherwise the program -will almost certainly crash! The reason for including these functions is that -they are somewhat more efficient than the regular, clipping versions. ALSO -NOTE: These function do not check for conflicts with the mouse cursor. (See -the explanation about the mouse cursor handling later in this document.) The -list of the supported non-clipping primitives: - -void GrPlotNC(int x,int y,int c); -void GrLineNC(int x1,int y1,int x2,int y2,int c); -void GrHLineNC(int x1,int x2,int y,int c); -void GrVLineNC(int x,int y1,int y2,int c); -void GrBoxNC(int x1,int y1,int x2,int y2,int c); -void GrFilledBoxNC(int x1,int y1,int x2,int y2,int c); -void GrFramedBoxNC(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c); -void GrBitBltNC(GrContext *dst,int x,int y,GrContext *src,int x1,int y1,int x2,int y2,int oper); -int GrPixelNC(int x,int y); - - - - - -LIBGRX graphics library user's manual 12 - - -Customized line drawing - -The basic line drawing graphics primitives described previously always -draw continuous lines which are one pixel wide. There is another group of line -drawing functions which can be used to draw wide and/or patterned lines. These -functions have similar parameter passing conventions as the basic ones with -one difference: instead of the color value a pointer to a structure of type -'GrLineOption' has to be passed to them. The definition of the 'GrLineOption' -structure: - -typedef struct { -int lno_color; /* color used to draw line */ -int lno_width; /* width of the line */ -int lno_pattlen; /* length of the dash pattern */ -unsigned char *lno_dashpat; /* draw/nodraw pattern */ -} GrLineOption; - -The 'lno_pattlen' structure element should be equal to the number of -alternating draw -- no draw section length values in the array pointed to by -the 'lno_dashpat' element. The dash pattern array is assumed to begin with a -drawn section. If the pattern length is equal to zero a continuous line is -drawn. The available custom line drawing primitives: - -void GrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrCustomCircle(int xc,int yc,int r,const GrLineOption *o); -void GrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *o); -void GrCustomCircleArc(int xc,int yc,int r,int start,int end,const GrLineOption *o); -void GrCustomEllipseArc(int xc,int yc,int xa,int ya,int start,int end,const GrLineOption *o); -void GrCustomPolyLine(int numpts,int points[][2],const GrLineOption *o); -void GrCustomPolygon(int numpts,int points[][2],const GrLineOption *o); - - -Pattern filled graphics primitives - -The library also supports a pattern filled version of the basic filled -primitives described above. These functions have similar parameter passing -conventions as the basic ones with one difference: instead of the color value -a pointer to an union of type 'GrPattern' has to be passed to them. The -'GrPattern' union can contain either a bitmap or a pixmap fill pattern. The -first integer slot in the union determines which type it is. Bitmap fill -patterns are rectangular arrays of bits, each set bit representing the -foreground color of the fill operation, and each zero bit representing the -background. Both the foreground and background colors can be combined with any -of the supported logical operations. Bitmap fill patterns have one -restriction: their width must be eight pixels. Pixmap fill patterns are very -similar to contexts, the data is transferred to the filled primitive using -'BitBlt' operations. The relevant structure declarations (from "grx.h"): - -/* -* BITMAP: a mode independent way to specify a fill pattern of two - - - - - -LIBGRX graphics library user's manual 13 - - -* colors. It is always 8 pixels wide (1 byte per scan line), its -* height is user-defined. SET THE TYPE FLAG TO ZERO!!! -*/ -typedef struct { -int bmp_ispixmap; /* type flag for pattern union */ -int bmp_height; /* bitmap height */ -unsigned char *bmp_data; /* pointer to the bit pattern */ -int bmp_fgcolor; /* foreground color for fill */ -int bmp_bgcolor; /* background color for fill */ -int bmp_memflags; /* set if dynamically allocated */ -} GrBitmap; - -/* -* PIXMAP: a fill pattern stored in a layout identical to the video RAM -* for filling using 'bitblt'-s. It is mode dependent, typically one -* of the library functions is used to build it. KEEP THE TYPE FLAG -* NONZERO!!! -*/ -typedef struct { -int pxp_ispixmap; /* type flag for pattern union */ -int pxp_width; /* pixmap width (in pixels) */ -int pxp_height; /* pixmap height (in pixels) */ -int pxp_oper; /* bitblt mode (SET, OR, XOR, AND) */ -GrVidRAM pxp_source; /* source context for fill */ -} GrPixmap; - -/* -* Fill pattern union -- can either be a bitmap or a pixmap -*/ -typedef union { -int gp_ispixmap; /* nonzero for pixmaps */ -GrBitmap gp_bitmap; /* fill bitmap */ -GrPixmap gp_pixmap; /* fill pixmap */ -} GrPattern; - -#define gp_bmp_data gp_bitmap.bmp_data -#define gp_bmp_height gp_bitmap.bmp_height -#define gp_bmp_fgcolor gp_bitmap.bmp_fgcolor -#define gp_bmp_bgcolor gp_bitmap.bmp_bgcolor - -#define gp_pxp_width gp_pixmap.pxp_width -#define gp_pxp_height gp_pixmap.pxp_height -#define gp_pxp_oper gp_pixmap.pxp_oper -#define gp_pxp_source gp_pixmap.pxp_source - -Bitmap patterns can be easily built from initialized character arrays and -static structures by the C compiler, thus no special support is included in -the library for creating them. The only action required from the application -program might be changing the foreground and background colors as needed. -Pixmap patterns are more difficult to build as they replicate the layout of -the video memory which changes for different video modes. For this reason the - - - - - -LIBGRX graphics library user's manual 14 - - -library provides three functions to create pixmap patterns in a mode- -independent way: - -GrPattern *GrBuildPixmap(const char *pixels,int w,int h,const GrColorTableP colors); -GrPattern *GrBuildPixmapFromBits(const char *bits,int w,int h,int fgc,int bgc); -GrPattern *GrConvertToPixmap(GrContext *src); - -'GrBuildPixmap' build a pixmap from a two dimensional ('w' by 'h') array of -characters. The elements in this array are used as indices into the color -table specified with the argument 'colors'. (This means that pixmaps created -this way can use at most 256 colors.) The color table pointer: - -typedef int *GrColorTableP; - -should point to an array of integers with the first element being the number -of colors in the table and the color indices themselves starting with the -second element. NOTE: any color modifiers (GrXOR, GrOR, GrAND) OR-ed to the -elements of the color table are ignored. - -The 'GrBuildPixmapFromBits' function builds a pixmap fill pattern from bitmap -data. It is useful if the width of the bitmap pattern is not eight as such -bitmap patterns can not be used to build a 'GrBitmap' structure. - -The 'GrConvertToPixmap' function converts a graphics context to a pixmap fill -pattern. It is useful when the pattern can be created with graphics drawing -operations. NOTE: the pixmap pattern and the original context share the -drawing RAM, thus if the context is redrawn the fill pattern changes as well. - -Fill patterns which were built by library routines can be destroyed when -no longer needed (i.e. the space occupied by them can be freed) by calling: - -void GrDestroyPattern(GrPattern *p); - -NOTE: when pixmap fill patterns converted from contexts are destroyed, the -drawing RAM is not freed. It is freed when the original context is destroyed. -Fill patterns built by the application have to be destroyed by the application -as well (if this is needed). - -The list of supported pattern filled graphics primitives is shown below. -These functions are very similar to their solid filled counterparts, only -their last argument is different: - -void GrPatternFilledPlot(int x,int y,GrPattern *p); -void GrPatternFilledLine(int x1,int y1,int x2,int y2,GrPattern *p); -void GrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p); -void GrPatternFilledCircle(int xc,int yc,int r,GrPattern *p); -void GrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p); -void GrPatternFilledCircleArc(int xc,int yc,int r,int start,int end,GrPattern *p); -void GrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,GrPattern *p); -void GrPatternFilledConvexPolygon(int numpts,int points[][2],GrPattern *p); -void GrPatternFilledPolygon(int numpts,int points[][2],GrPattern *p); - - - - - -LIBGRX graphics library user's manual 15 - - -Strictly speaking the plot and line functions in the above group are not -filled, but they have been included here for convenience. - - -Patterned line drawing - -The custom line drawing functions introduced above also have a version -when the drawn sections can be filled with a (pixmap or bitmap) fill pattern. -To achieve this these functions must be passed both a custom line drawing -option ('GrLineOption' structure) and a fill pattern ('GrPattern' union). -These two have been combined into the 'GrLinePattern' structure: - -typedef struct { -GrPattern *lnp_pattern; /* fill pattern */ -GrLineOption *lnp_option; /* width + dash pattern */ -} GrLinePattern; - -All patterned line drawing functions take a pointer to this structure as their -last argument. The list of available functions: - -void GrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp); -void GrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp); -void GrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp); -void GrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp); -void GrPatternedCircleArc(int xc,int yc,int r,int start,int end,GrLinePattern *lp); -void GrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end,GrLinePattern *lp); -void GrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp); -void GrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp); - - -Text drawing - -The library supports loadable bit-mapped (i.e. not scalable!) fonts. -Some of these fonts were converted from VGA BIOS fonts and fonts on utility -diskettes coming with VGA cards. These fonts have all 256 characters. Some -additional fonts were converted from fonts in the MIT X11 distribution. These -have a variable number of characters, some support all 256 character codes, -some only the printable ASCII codes. Fonts also have family names, which are -used in a font lookup procedure supported by the library (see later). The -following font families are included in the distribution: - - - - - -LIBGRX graphics library user's manual 16 - - -Font file name: Family: Description: - -pcx[t].fnt pc BIOS font, fixed -xmx[b][i].fnt X_misc X11, fixed, miscellaneous group -char[b][i].fnt char X11, proportional, charter family -cour[b][i].fnt cour X11, fixed, courier -helve[b][i].fnt helve X11, proportional, helvetica -lucb[b][i].fnt lucb X11, proportional, lucida bright -lucs[b][i].fnt lucs X11, proportional, lucida sans serif -luct[b][i].fnt luct X11, fixed, lucida typewriter -ncen[b][i].fnt ncen X11, proportional, new century schoolbook -symb.fnt symbol X11, proportional, greek letters, -symbols -tms[b][i].fnt times X11, proportional, times - -In the font names means the font width, the font height. Many font -families have bold and/or italic variants. The files containing these fonts -contain a 'b' and/or 'i' character in their name just before the extension. -Additionally, the strings "_bold" and/or "_ital" are appended to the font -family names. Some of the pc BIOS fonts come in thin formats also, these are -denoted by a 't' in their file names and the string "_thin" in their family -names. - -NOTE: the basic libgrx distribution ("cbgrx101.zip") contains only the full -"pc", "courier", "helve", "symbol" and "times" font families and selected -sizes from the "X_misc" family. (Because of archive size considerations!) The -full compliment of fonts can be found in the archive file named -"cbgrxfnt.zip", which should be available from the same site where the basic -library was obtained from. - -Fonts are loaded with the 'GrLoadFont' function. If the font file name -starts with any path separator character or character sequence (':', '/' or '\') then it is loaded from the specified directory, -otherwise the font is loaded from the default font path. The font path can be -set up with the 'GrSetFontPath' function. If the font path is not set then the -value of the 'GRXFONT' environment variable is used as the font path. If -'GrLoadFont' is called again with the name of an already loaded font then it -will return a pointer to the result of the first loading. The special font -names "@:pc8x8.fnt", "@:pc8x14.fnt" and "@:pc8x16.fnt" will cause 'GrLoadFont' -to load the font from the BIOS of the graphics card of the PC (provided that -it has the desired font). Alternatively, 'GrLoadBIOSFont' can also be called -to load a font which resides in the BIOS of the display adapter. (The -difference is that 'GrLoadFont' will look at the disk as well if the BIOS does -not have the font. For example: EGA-s don't have a 16 row font in their BIOS.) -Both font loading routines return NULL if the font was not found. When not -needed any more, fonts can be unloaded (i.e. the storage occupied by them -freed) by calling 'GrUnloadFont'. The prototype declarations for these -functions: - -GrFont *GrLoadFont(char *name); -GrFont *GrLoadBIOSFont(char *name); - - - - - -LIBGRX graphics library user's manual 17 - - -void GrUnloadFont(GrFont *font); -void GrSetFontPath(char *path); - -The 'GrFont' structure is actually a font header, the real font data is -right next to this header in memory, but it is typically hidden from the -application program. If needed, the include file "grxfont.h" can provide more -details. The 'GrFont' structure: - -typedef struct { -short fnt_width; /* width (average for proportional) */ -short fnt_height; /* font height */ -short fnt_minchar; /* lowest character code in font */ -short fnt_maxchar; /* highest character code in font */ -short fnt_isfixed; /* nonzero if fixed font */ -short fnt_internal; /* nonzero if BIOS font */ -short fnt_baseline; /* baseline from top of font */ -short fnt_undwidth; /* underline width (at bottom) */ -char fnt_name[GR_NAMEWIDTH]; /* font file name (w/o path) */ -char fnt_family[GR_NAMEWIDTH]; /* font family name */ -} GrFont; - -There is a function: 'GrFindBestFont' which returns the font which -matches best a desired size. (Best match: not bigger, but as close as -possible). The application can specify whether it wants 'GrFindBestFont' to -find the best match using fonts in their original sizes only, or possibly -enlarged (with the value of the 'magnify' argument -- 0: no, nonzero: yes). -'GrFindBestFont' also takes a string argument which specifies the font family -from which to select the font. The string can specify several family patterns -separated by the ':' character. Each pattern can contain the '?' and '*' -wildcard characters which work the usual way (in UNIX sense -- i.e. "X*ital" -will match "X_misc_ital", but not "X_misc_bold"..). - -GrTextOption *GrFindBestFont(int width,int height,int magnify,char *family,GrTextOption *where); - -The 'GrTextOption' structure specifies how to draw a character string: - -typedef struct { -GrFont *txo_font; /* font to be used */ -int txo_xmag; /* X magnification */ -int txo_ymag; /* Y magnification */ -union { -int v; /* color when no attributes */ -GrColorTableP p; /* ptr to color table otherwise */ -} txo_fgcolor,txo_bgcolor; /* foreground, background */ -char txo_direct; /* direction */ -char txo_xalign; /* X alignment */ -char txo_yalign; /* Y alignment */ -char txo_chrtype; /* character type */ -} GrTextOption; - - - - - -LIBGRX graphics library user's manual 18 - - -The font can be enlarged independently in the X and Y directions, ('txo_xmag' -and 'txo_ymag' slots -- values: 1 and up) the text can be rotated in -increments of 90 degrees ('txo_direct'), alignments can be set in both -directions ('txo_xalign' and 'txo_yalign'), and separate fore and background -colors can be specified. The accepted text direction values: - -#define GR_TEXT_RIGHT 0 /* normal */ -#define GR_TEXT_DOWN 1 /* downward */ -#define GR_TEXT_LEFT 2 /* upside down, right to left */ -#define GR_TEXT_UP 3 /* upward */ -#define GR_TEXT_DEFAULT GR_TEXT_RIGHT - -The accepted horizontal and vertical alignment option values: - -#define GR_ALIGN_LEFT 0 /* X only */ -#define GR_ALIGN_TOP 0 /* Y only */ -#define GR_ALIGN_CENTER 1 /* X, Y */ -#define GR_ALIGN_RIGHT 2 /* X only */ -#define GR_ALIGN_BOTTOM 2 /* Y only */ -#define GR_ALIGN_BASELINE 3 /* Y only */ -#define GR_ALIGN_DEFAULT GR_ALIGN_LEFT - -Text strings can be of three different types: one character per byte (i.e. the -usual C character string, this is the default), one character per 16-bit word -(suitable for fonts with a large number of characters), and a PC-style -character-attribute pair. In the last case the 'GrTextOption' structure must -contain a pointer to a color table of size 16 (fg color bits in attrib) or 8 -(bg color bits). (The color table format is explained in more detail in the -previous section explaining the methods to build fill patterns.) The supported -text types: - -#define GR_BYTE_TEXT 0 /* one byte per character */ -#define GR_WORD_TEXT 1 /* two bytes per character */ -#define GR_ATTR_TEXT 2 /* char w/ PC style attribute byte */ - -The PC-style attribute text uses the same layout (first byte: character, -second: attributes) and bitfields as the text mode screen on the PC. The only -difference is that the 'blink' bit is not supported (it would be very time -consuming -- the PC text mode does it with hardware support). This bit is used -instead to control the underlined display of characters. For convenience the -following attribute manipulation macros have been declared in "grx.h": - -#define GR_BUILD_ATTR(fgcolor,bgcolor,underline) \ -((fgcolor) & 15) | (((bgcolor) & 7) << 4) | (((underline) & 1) << 7)) -#define GR_ATTR_FGCOLOR(attr) ((attr) & 15) -#define GR_ATTR_BGCOLOR(attr) (((attr) >> 4) & 7) -#define GR_ATTR_UNDERLINE(attr) (((attr) >> 7) & 1) - -Text strings of the types 'GR_BYTE_TEXT' and 'GR_WORD_TEXT" can also be drawn -underlined. This is controlled by OR-ing the constant 'GR_UNDERLINE_TEXT' to -the foreground color value: - - - - - -LIBGRX graphics library user's manual 19 - - -#define GR_UNDERLINE_TEXT (GrXOR << 6) - -After the application initializes a text option structure with the -desired values it can call one of the following two text drawing functions: - -void GrDrawChar(int chr,int x,int y,const GrTextOption *opt); -void GrDrawString(char *text,int length,int x,int y,const GrTextOption *opt); - -NOTE: text drawing is fastest when the font is not magnified, it is drawn in -the 'normal' direction, and the character does not have to be clipped. It this -case the library can use the appropriate low-level video RAM access routine -(see "INTERNAL.DOC" for more details), while in any other case the text is -drawn pixel-by-pixel (or rectangle-by-rectangle if enlarged) by the -higher-level code. - -The function 'GrTextXY' is provided for compatibility with the original -256 color DJGPP graphics library. It draws the text in the standard direction, -unmagnified, and using the 16 row BIOS font on VGA-s or the 14 row font on -EGA-s. - -void GrTextXY(int x,int y,char *text,int fg,int bg); - -The size of a font, a character or a text string can be obtained by -calling one of the following functions. These functions also take into -consideration the magnification and text direction specified in the text -option structure passed to them. - -int GrFontHeight(GrTextOption *opt); -int GrFontWidth(GrTextOption *opt); -int GrCharWidth(int chr,const GrTextOption *opt); -int GrCharHeight(int chr,const GrTextOption *opt); -int GrStringWidth(char *text,int length,const GrTextOption *opt); -int GrStringHeight(char *text,int length,const GrTextOption *opt); - -The 'GrTextRegion' structure and its associated functions can be used to -implement a fast (as much as possible in graphics modes) rectangular text -window using a fixed font. Clipping for such windows is done in character size -increments instead of pixels (i.e. no partial characters are drawn). Only -fixed fonts can be used in their natural size. 'GrDumpText' will cache the -code of the drawn characters in the buffer pointed to by the 'backup' slot (if -it is non-NULL) and will draw a character only if the previously drawn -character in that grid element is different. This can speed up text scrolling -significantly in graphics modes. The supported text types are the same as -above. - -typedef struct { -GrFont *txr_font; /* font to be used */ -char *txr_buffer; /* pointer to text buffer */ -char *txr_backup; /* optional backup buffer */ -int txr_xpos; /* upper left corner X coordinate */ -int txr_ypos; /* upper left corner Y coordinate */ - - - - - -LIBGRX graphics library user's manual 20 - - -int txr_width; /* width of area in chars */ -int txr_height; /* height of area in chars */ -int txr_lineoffset; /* offset in buffer(s) between lines */ -union { -int v; /* color when no attributes */ -GrColorTableP p; /* ptr to color table otherwise */ -} txr_fgcolor,txr_bgcolor; /* foreground, background */ -char txr_chrtype; /* character type (see above) */ -} GrTextRegion; - -void GrDumpChar(int chr,int col,int row,const GrTextRegion *r); -void GrDumpText(int col,int row,int wdt,int hgt,const GrTextRegion *r); -void GrDumpTextRegion(const GrTextRegion *r); - -The 'GrDumpTextRegion' function outputs the whole text region, while -'GrDumpText' draws only a user-specified part of it. 'GrDumpChar' updates the -character in the buffer at the specified location with the new character -passed to it as argument and then draws the new character on the screen as -well. - - -Drawing in user coordinates - -There is a second set of the graphics primitives which operates in user -coordinates. Every context has a user to screen coordinate mapping associated -with it. An application specifies the user window by calling the -'GrSetUserWindow' function. - -void GrSetUserWindow(int x1,int y1,int x2,int y2); - -A call to this function it in fact specifies the virtual coordinate limits -which will be mapped onto the current context regardless of the size of the -context. For example, the call: - -GrSetUserWindow(0,0,11999,8999); - -tells the library that the program will perform its drawing operations in a -coordinate system X:0...11999 (width = 12000) and Y:0...8999 (height = 9000). -This coordinate range will be mapped onto the total area of the current -context. The virtual coordinate system can also be shifted. For example: - -GrSetUserWindow(5000,2000,16999,10999); - -The user coordinates can even be used to turn the usual left-handed coordinate -system (0:0 corresponds to the upper left corner) to a right handed one (0:0 -corresponds to the bottom left corner) by calling: - -GrSetUserWindow(0,8999,11999,0); - - - - - -LIBGRX graphics library user's manual 21 - - -The library also provides three utility functions for the query of the -current user coordinate limits and for converting user coordinates to screen -coordinates and vice versa. - -void GrGetUserWindow(int *x1,int *y1,int *x2,int *y2); -void GrGetScreenCoord(int *x,int *y); -void GrGetUserCoord(int *x,int *y); - -If an application wants to take advantage of the user to screen -coordinate mapping it has to use the user coordinate version of -the graphics primitives. These have exactly the same parameter -passing conventions as their screen coordinate counterparts. -NOTE: the user coordinate system is not initialized by the -library! The application has to set up its coordinate mapping -before calling any of the use coordinate drawing functions -- -otherwise the program will almost certainly exit (in a quite -ungraceful fashion) with a 'division by zero' error. The list of -supported user coordinate drawing functions: - -void GrUsrPlot(int x,int y,int c); -void GrUsrLine(int x1,int y1,int x2,int y2,int c); -void GrUsrHLine(int x1,int x2,int y,int c); -void GrUsrVLine(int x,int y1,int y2,int c); -void GrUsrBox(int x1,int y1,int x2,int y2,int c); -void GrUsrFilledBox(int x1,int y1,int x2,int y2,int c); -void GrUsrFramedBox(int x1,int y1,int x2,int y2,int wdt,GrFBoxColors *c); -void GrUsrCircle(int xc,int yc,int r,int c); -void GrUsrEllipse(int xc,int yc,int xa,int ya,int c); -void GrUsrCircleArc(int xc,int yc,int r,int start,int end,int c); -void GrUsrEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int c); -void GrUsrFilledCircle(int xc,int yc,int r,int c); -void GrUsrFilledEllipse(int xc,int yc,int xa,int ya,int c); -void GrUsrFilledCircleArc(int xc,int yc,int r,int start,int end,int c); -void GrUsrFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int c); -void GrUsrPolyLine(int numpts,int points[][2],int c); -void GrUsrPolygon(int numpts,int points[][2],int c); -void GrUsrFilledConvexPolygon(int numpts,int points[][2],int c); -void GrUsrFilledPolygon(int numpts,int points[][2],int c); -int GrUsrPixel(int x,int y); - -void GrUsrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrUsrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrUsrCustomCircle(int xc,int yc,int r,const GrLineOption *o); -void GrUsrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *o); -void GrUsrCustomCircleArc(int xc,int yc,int r,int start,int end,const GrLineOption *o); -void GrUsrCustomEllipseArc(int xc,int yc,int xa,int ya,int start,int end,const GrLineOption *o); -void GrUsrCustomPolyLine(int numpts,int points[][2],const GrLineOption *o); -void GrUsrCustomPolygon(int numpts,int points[][2],const GrLineOption *o); - -void GrUsrPatternedPlot(int x,int y,GrPattern *p); -void GrUsrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp); - - - - - -LIBGRX graphics library user's manual 22 - - -void GrUsrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp); -void GrUsrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp); -void GrUsrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp); -void GrUsrPatternedCircleArc(int xc,int yc,int r,int start,int end,GrLinePattern *lp); -void GrUsrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end,GrLinePattern *lp); -void GrUsrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp); -void GrUsrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp); - -void GrUsrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p); -void GrUsrPatternFilledCircle(int xc,int yc,int r,GrPattern *p); -void GrUsrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p); -void GrUsrPatternFilledCircleArc(int xc,int yc,int r,int start,int end,GrPattern *p); -void GrUsrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,GrPattern *p); -void GrUsrPatternFilledConvexPolygon(int numpts,int points[][2],GrPattern *p); -void GrUsrPatternFilledPolygon(int numpts,int points[][2],GrPattern *p); - -GrTextOption *GrUsrFindBestFont(int width,int height,int magnify,char *family,GrTextOption *where); -void GrUsrDrawChar(int chr,int x,int y,const GrTextOption *opt); -void GrUsrDrawString(char *text,int length,int x,int y,const GrTextOption *opt); -void GrUsrTextXY(int x,int y,char *text,int fg,int bg); - - -Graphics cursors - -The library provides support for the creation and usage of an unlimited -number of graphics cursors. An application can use these cursors for any -purpose. Cursors always save the area they occupy before they are drawn. When -moved or erased they restore this area. As a general rule of thumb, an -application should erase a cursor before making changes to an area it occupies -and redraw the cursor after finishing the drawing. All cursor and mouse -related declaration are in the include file "mousex.h". Cursors are created -with the 'GrBuildCursor' function: - -GrCursor *GrBuildCursor(char *data,int w,int h,int xo,int yo,const GrColorTableP c); - -The 'data', 'w' (=width), 'h' (=height) and 'c' (= color table) arguments are -similar to the arguments of the pixmap building library function: -'GrBuildPixmap'. (See that paragraph for a more detailed explanation.) The -only difference is that the pixmap data is interpreted slightly differently: -any pixel with value zero is taken as a "transparent" pixel, i.e. the -background will show through the cursor pattern at that pixel. A pixmap data -byte with value = 1 will refer to the first color in the table, and so on. The -'xo' (= X offset) and 'yo' (= Y offset) arguments specify the position (from -the top left corner of the cursor pattern) of the cursor's "hot point". The -'GrCursor' data structure: - - - - - -LIBGRX graphics library user's manual 23 - - -typedef struct { -GrVidRAM cr_andmask; /* cursor bitmap to AND */ -GrVidRAM cr_ormask; /* cursor bitmap to OR */ -GrVidRAM cr_work; /* work area */ -GrVidRAM cr_save; /* screen save area */ -int cr_xcord,cr_ycord; /* cursor position on screen */ -int cr_xsize,cr_ysize; /* cursor size */ -int cr_xoffs,cr_yoffs; /* LU corner to hot point offset */ -int cr_xwork,cr_ywork; /* save/work area sizes */ -int cr_xwpos,cr_ywpos; /* save/work area position on screen */ -int cr_displayed; /* set if displayed */ -} GrCursor; - -is typically not used (i.e. read or changed) by the application program, it -should just pass pointers to these structures to the appropriate library -functions. Other cursor manipulation functions: - -void GrDestroyCursor(GrCursor *cursor); -void GrDisplayCursor(GrCursor *cursor); -void GrEraseCursor(GrCursor *cursor); -void GrMoveCursor(GrCursor *cursor,int x,int y); - - -Mouse event handling - -All mouse services need the presence of a mouse and an installed -Microsoft compatible mouse driver. An application can test whether a mouse is -available by calling the function: - -int MouseDetect(void); - -which will return zero if no mouse (or mouse driver) is present, non-zero -otherwise. If the mouse is present the application may decide if it wants to -use the mouse in interrupt-driven or polled mode. The polled mode is -compatible with previous releases of DJGPP and the 256 color graphics library, -it uses the mouse driver interrupts (INT 33h) to query the mouse about its -position and buttons. This method is adequate if the program can do the -polling in a tight enough loop. If the program does lengthy computations in -the background during which a "frozen" mouse and the loss of mouse button -presses would be disturbing it has to use the interrupt driven method. For -this a patched version of GO32 is needed -- a GO32 version dated after the -middle of April 1992 should work. The interrupt driven mouse event mechanism -uses an event queue library (described in the document "EVENTS.DOC") which -stores all user interaction events (mouse presses and keyboard hits) in a -queue, timestamped, in the order of occurrence. The disadvantage of the -interrupt-driven mouse event mechanism is that it may be harder to debug. To -select between the two modes the following function needs to be called: - -void MouseEventMode(int use_interrupts); - - - - - -LIBGRX graphics library user's manual 24 - - -If the 'use_interrupts' parameter is zero the mouse is put into polled mode -(this is the default), otherwise it will work interrupt-driven. After -selecting the mode, the mouse can be initialized by calling: - -void MouseInit(void); - -It is not necessary to call this function as the first call the -'MouseGetEvent' (see later) function will also perform the initialization. -However, if the mouse event mode is changed after using 'MouseGetEvent', a -call to 'MouseInit' is the only way to enforce the change. - -If the mouse is used in interrupt-driven mode, it is a good practice to -call 'MouseUnInit' before exiting the program. This will restore any interrupt -vectors hooked by the program to their original values. - -void MouseUnInit(void); - -The mouse can be controlled with the following functions: - -void MouseSetSpeed(int speed); -void MouseSetAccel(int thresh,int accel); -void MouseSetLimits(int x1,int y1,int x2,int y2); -void MouseGetLimits(int *x1,int *y1,int *x2,int *y2); -void MouseWarp(int x,int y); - -The library calculates the mouse position only from the mouse mickey counters. -(To avoid the limit and 'rounding to the next multiple of eight' problem with -the Microsoft mouse driver when it finds itself in a graphics mode unknown to -it.) The 'speed' parameter to the 'MouseSetSpeed' function is used as a -divisor, i.e. coordinate changes are obtained by dividing the mickey counter -changes by this value. In high resolution graphics modes the value of one just -works fine, in low resolution modes (320x200 or similar) it is best set the -speed to two or three. (Of course, it also depends on the sensitivity the -mouse.) The 'MouseSetAccel' function is used to control the ballistic effect: -if a mouse coordinate changes between two samplings by more than the 'thresh' -parameter, the change is multiplied by the 'accel' parameter. NOTE: some mouse -drivers perform similar calculations before reporting the coordinates in -mickeys. In this case the acceleration done by the library will be additional -to the one already performed by the mouse driver. The limits of the mouse -movement can be set (passed limits will be clipped to the screen) with -'MouseSetLimits' (default is the whole screen) and the current limits can be -obtained with 'MouseGetLimits'. 'MouseWarp' sets the mouse cursor to the -specified position. - -As typical mouse drivers do not know how to draw mouse cursors in high -resolution graphics modes, the mouse cursor is drawn by the library. The mouse -cursor can be set with: - -void MouseSetCursor(GrCursor *cursor); -void MouseSetColors(int fg,int bg); - - - - - -LIBGRX graphics library user's manual 25 - - -'MouseSetColors' uses an internal arrow pattern, the color 'fg' will be used -as the interior of it and 'bg' will be the border. The current mouse cursor -can be obtained with: - -GrCursor *MouseGetCursor(void); - -The mouse cursor can be displayed/erased with: - -void MouseDisplayCursor(void); -void MouseEraseCursor(void); - -The mouse cursor can be left permanently displayed. All graphics primitives -except for the few non-clipping functions check for conflicts with the mouse -cursor and erase it before the drawing if necessary. Of course, it may be more -efficient to erase the cursor manually before a long drawing sequence and -redraw it after completion. The library provides an alternative pair of calls -for this purpose which will erase the cursor only if it interferes with the -drawing: - -int MouseBlock(GrContext *c,int x1,int y1,int x2,int y2); -void MouseUnBlock(void); - -'MouseBlock' should be passed the context in which the drawing will take place -(the usual convention of NULL meaning the current context is supported) and -the limits of the affected area. It will erase the cursor only if it -interferes with the drawing. If it returns a non-zero value then -'MouseUnBlock' has to be called at the end of the drawing, otherwise it should -not be called. - -The library supports (beside the simple cursor drawing) three types of -"rubberband" attached to the mouse cursor. The 'MouseSetCursorMode' function -is used to select the cursor drawing mode. - -void MouseSetCursorMode(int mode,...); - -The parameter 'mode' can have the following values: - -/* -* MOUSE CURSOR modes: -* M_CUR_NORMAL -- just the cursor -* M_CUR_RUBBER -- rectangular rubber band (XOR-d to the screen) -* M_CUR_LINE -- line attached to the cursor -* M_CUR_BOX -- rectangular box dragged by the cursor -*/ -#define M_CUR_NORMAL 0 -#define M_CUR_RUBBER 1 -#define M_CUR_LINE 2 -#define M_CUR_BOX 3 - -'MouseSetCursorMode' takes different parameters depending on the cursor -drawing mode selected. The accepted call formats are: - - - - - -LIBGRX graphics library user's manual 26 - - -MouseSetCursorMode(M_CUR_NORMAL); -MouseSetCursorMode(M_CUR_RUBBER,xanchor,yanchor,color); -MouseSetCursorMode(M_CUR_LINE,xanchor,yanchor,color); -MouseSetCursorMode(M_CUR_BOX,dx1,dy1,dx2,dy2,color); - -The anchor parameters for the rubberband and rubberline modes specify a fixed -screen location to which the other corner of the primitive is bound. The 'dx1' -through 'dy2' parameters define the offsets of the corners of the dragged box -from the hotpoint of the mouse cursor. The color value passed is always XOR-ed -to the screen, i.e. if an application wants the rubberband to appear in a -given color on a given background then it has to pass the XOR of these two -colors to 'MouseSetCursorMode'. - -The status of the mouse cursor can be obtained with calling -'MouseCursorIsDisplayed'. This function will return non-zero if the cursor is -displayed, zero if it is erased. - -int MouseCursorIsDisplayed(void); - -The 'MouseGetEvent' function is used to obtain the next mouse or -keyboard event. It takes a flag with various bits encoding the type of event -needed. It returns the event in a 'MouseEvent' structure. The relevant -declarations from "mousex.h": - -void MouseGetEvent(int flags,MouseEvent *event); - -typedef struct { -int flags; /* flags (see above) */ -int x,y; /* coordinates */ -int buttons; /* button state */ -int key; /* key code from keyboard */ -int kbstat; /* keybd status (ALT, CTRL, etc..) */ -long time; /* time stamp of the event */ -} MouseEvent; - -The event structure has been extended with a keyboard status word (thus a -program can check for combinations like ALT-) and a -time stamp (in DOS clock ticks since the start of the program) which can be -used to check for double clicks, etc... The following macros have been defined -in "mousex.h" to help in creating the control flag for 'MouseGetEvent' and -decoding the various bits in the event structure: - -/* -* MOUSE event flag bits -*/ -#define M_MOTION 0x001 -#define M_LEFT_DOWN 0x002 -#define M_LEFT_UP 0x004 -#define M_RIGHT_DOWN 0x008 -#define M_RIGHT_UP 0x010 -#define M_MIDDLE_DOWN 0x020 - - - - - -LIBGRX graphics library user's manual 27 - - -#define M_MIDDLE_UP 0x040 -#define M_BUTTON_DOWN (M_LEFT_DOWN | M_MIDDLE_DOWN | M_RIGHT_DOWN) -#define M_BUTTON_UP (M_LEFT_UP | M_MIDDLE_UP | M_RIGHT_UP) -#define M_BUTTON_CHANGE (M_BUTTON_UP | M_BUTTON_DOWN ) - -/* -* MOUSE button status bits -*/ -#define M_LEFT 1 -#define M_RIGHT 2 -#define M_MIDDLE 4 - -/* -* Other bits and combinations -*/ -#define M_KEYPRESS 0x080 /* keypress */ -#define M_POLL 0x100 /* do not wait for the event */ -#define M_NOPAINT 0x200 -#define M_EVENT (M_MOTION | M_KEYPRESS | M_BUTTON_DOWN | M_BUTTON_UP) - -/* -* KEYBOARD status word bits -*/ -#define KB_RIGHTSHIFT 0x01 /* right shift key depressed */ -#define KB_LEFTSHIFT 0x02 /* left shift key depressed */ -#define KB_CTRL 0x04 /* CTRL depressed */ -#define KB_ALT 0x08 /* ALT depressed */ -#define KB_SCROLLOCK 0x10 /* SCROLL LOCK active */ -#define KB_NUMLOCK 0x20 /* NUM LOCK active */ -#define KB_CAPSLOCK 0x40 /* CAPS LOCK active */ -#define KB_INSERT 0x80 /* INSERT state active */ - -#define KB_SHIFT (KB_LEFTSHIFT | KB_RIGHTSHIFT) - -'MouseGetEvent' will display the mouse cursor if it was previously erased and -the 'M_NOPAINT' bit is not set in the flag passed to it. In this case it will -also erase the cursor after an event has been obtained. - -NOTE: some of the mouse event constants have different values than in the -original DJGPP graphics library. This change was necessary to better follow -the mouse driver conventions for assigning bits with similar functions. - -The generation of mouse and keyboard events can be individually enabled or -disabled (by passing a non-zero or zero, respectively, value in the -corresponding 'enable_XX' parameter) by calling: - -void MouseEventEnable(int enable_kb,int enable_ms); - - -README for GRX 1.03 beta release -================================ - -This is file README.GRX. It can be found at the beta7 distribution site -and also in the DOCS sub-directory of the GRX archive. This file contains -additional information about the new graphics-related features of GO32, -the new graphics drivers and GRX 1.03. - -What is in this release? ------------------------- - -This is an intermediate release based on my working sources. This version -does not yet work with DPMI. On the other hand, it has been modified to work -with the new (.VDR) drivers. These drivers together with the modifications -in GO32 1.11 allow the use of more than 1MB of video RAM. Virtual screens -larger than the displayed screen are also supported, together with a GO32 -function to change the start of the displayed region (pan). The beta GO32 -1.11 already has a new format built-in VESA driver. - -This version only supports display modes which were present in GRX 1.02. -(I.e. 16, 256, 32K colors and accelerated S3/8514A 256 color modes.) I don't -intend to finish the missing display modes in the current page-fault based -video RAM access mode. Currently I am working on a new set of low-level GRX -video RAM access routines which will use explicit paging. These will support -DPMI graphics with >64K frame buffers. As soon as these are finished and -tested there will be another GRX release. - -The other new feature of this release is that all thick and patterned -line primitives (which were missing from GRX 1.02) are present in this -version. - -New driver interface --------------------- - -The format of the VDR drivers can be found in the "grdriver.h" file in -the GO32 source directory or in the NDRIVERS directory of the GRX archive. -The built-in driver in GO32 should work with any VESA compatible SVGA card. -Older (.GRD or .GRN) drivers still work with the new GO32 and graphics -library. There is a small change in the driver specification part of the -GO32 environment variable: - -SET GO32=driver :: tw ... - ^^^^^^^^^^^^^^^^^^ - new fields - -If the name of the driver is followed by two colons and a string then this -string is taken as an option string for the driver. GO32 configures the driver -according to the characters in this string when the driver is loaded. (Which -now happens only when the driver is first used.) The option string is -ignored for .GRD and .GRD drivers. - -The option string can contain the following characters (in any order, case -does not matter): - -p: Enables protected mode paging. For .VDR drivers the default is to use - the driver's paging function in real mode. This is necessary because - the VESA BIOS paging function was written for real mode. However, many - VESA BIOS-es are well written, and their paging function can be used - in protected mode. Give it a try, if it fails then you have to use - real mode paging which is MUCH slower. (paging with .GRD and .GRN - drivers is always in protected mode) - -f: Enables fast 256 color mode. On some SVGA cards the planar, mode X-like - 256 color memory organization can be used even in SVGA modes. There are - a few operations (especially horizontal scan line fills) which can - be much faster in this mode. Give it a try -- and if you see garbage - on the screen then it does not work with your card. - -5: This field is necessary only if your VESA BIOS is version 1.1 or older - and the 64K (16 bit) color mode reported by it is really only a 32K - (15 bit) mode. You can find out your VESA version number and a lot of - other VESA related stuff by running the VESAINFO program in the - NDRIVERS directory of the GRX archive. - -If you want to use the built-in GO32 driver with options use the following -syntax: - - SET GO32 = driver ::pf5 tw ... - -When using a new .VDR driver with GO32 1.11 the video memory is mapped as -follows: - - 0xd0000000 .. 0xd0100000 old 1MB RW area - 0xd0100000 .. 0xd0200000 old 1MB R0 area - 0xd0200000 .. 0xd0300000 old 1MB W0 area - - 0xd1000000 .. 0xd2000000 new 16MB RW area - 0xd2000000 .. 0xd3000000 new 16MB R0 area - 0xd3000000 .. 0xd4000000 new 16MB W0 area - -GRX 1.03 uses the 1MB areas whenever the frame buffer is less then 1MB, -otherwise it uses the 16MB areas. - -GO32 1.11 supports the following new int 0x10 calls: - -Mode set with virtual screen sizes: -Input: -ax = 10 // = GR_custom_graphics -bx = colors -cx = desired screen width -dx = desired screen height -VDR_driver_header.virtual_x = desired virtual width -VDR_driver_header.virtual_y = desired virtual heigth -Output: -bx = mode descriptor bits -cx = actual screen width -dx = actual screen height -VDR_driver_header.virtual_x = actual virtual width -VDR_driver_header.virtual_y = actual virtual heigth - -Inquire driver header linear address: -Input: -ax = 0xfffe -Output: -eax = linear address of driver header in real memory. (Add 0xe0000000 - when used in non-DPMI modes of the extender). Use this buffer - for passing the virtual screen parameters to the driver. - -Call driver paging function in real mode: -Input: -ax = 0xfffd -bl = read page -bh = write page -Output: none - -Set displayed screen start when virtual screen > displayed screen -Input: -ax = 0xfffc -cx = X position -dx = Y position -Output: none - - diff --git a/thirdparty/grx249/doc/old/install.doc b/thirdparty/grx249/doc/old/install.doc deleted file mode 100644 index f28c2cd..0000000 --- a/thirdparty/grx249/doc/old/install.doc +++ /dev/null @@ -1,511 +0,0 @@ -THIS FILE IS UNDER CONSTRUCTION!!!! - -After you un-zip the GRX archive you need to do the following things to -use it: - -Set two environment variables: - -1) SET GRX20DRV= gw gh nc -2) SET GRXFONT= - -Available drivers are: - - stdvga - stdega - et4000 - cl5426 - mach64 - ati28800 - VESA - -After setting these you may run "bin/modetest" to see what modes you have. - -To compile and link a program you need to make sure that the compiler -"sees" the "include" and "lib" directories of the GRX20 package. Either -use the -I and -L compiler switches with these directories or copy -the files from these dirs to a standard place. - - -====================== don't read after this ======================== - - - -Abstract -======== - -This document contains information necessary for rebuilding -the LIBGRX graphics library. Additionally, it describes some internal -details of the library associated with way it accesses the video RAM. This -info might be useful for adding support for new graphics adapter types. - - -How to rebuild the library -========================== - -The LIBGRX library is built using the Turbo C MAKE. (TC++ 1.01 -professional was used.) If an other MAKE has to be used it has to provide -some method for generating response files from long command lines. The -makefiles may have to be changed from the Turbo C MAKE response file -syntax to the syntax of the new MAKE. Additionally, the Turbo C MAKE -provides a C preprocessor-like conditional syntax. If the new MAKE utility -does not support this, the desired option has to be hard-coded. - -The makefile in the base directory of the package (typically it is -....djgpp\contrib\libgrx) can be invoked as follows: - - 1) make build DJGPP libraries, and the drivers - 2) make turboc build Turbo C libraries - 3) make test (1+) build DJGPP test programs - 4) make turbotst (2+) build Turbo C test programs - 5) make install copy .h and .a files into DJGPP dirs - 6) make clean clean up after recompiling - -All graphics library sources are in the 'src' directory. The makefile -in that directory can also be used to build a customized version of the -library. Customized libraries (and the executable built using them) can be -smaller, because they don't include support for all video RAM access -methods. (see later) The makefile in the src directory can be used as -follows: - - make -DPLANES= - -- or -- - make -DPLANES= [-DMODEL=] turboc - -The value of the PLANES macro determines the included video RAM access -methods. This is a number obtained by OR-ing together the following -values: - - 1 monochrome (Hercules) - 4 16 color EGA/VGA/SVGA - 8 256 color VGA/SVGA - 16 32768 color SVGA - 32 256 color plane mode (mode X) - -For example: - - make -DPLANES=12 - -will build a DJGPP library which only includes support for 16 and 256 -color video modes. - -To rebuild the Turbo C version of the library a copy of TASM is also -needed, as the library contains a significant amount of in-line assembly -code. - - -Compiling the test programs -=========================== - -The makefile in the test directory accepts the following arguments: - - 1) make build all DJGPP test programs - 2) make turboc build all Turbo C test programs - 3) make . build a single DJGPP test program - 4) make .exe build a single Turbo C test program - -See the accompanying document "tests.doc" on how to run the test programs. - - -Low-level video RAM access support -================================== - -When 'GrSetMode' is called it finally ends up making a call to the mode -set routine of the graphics driver which knows about the capabilities of -the card, and how to put the card into the desired mode. (This is card -dependent -- that's why there are so many drivers.) - -Having done this, the driver returns a status word to the library -which specifies the MEMORY ORGANIZATION of the selected graphics mode. -There are MUCH FEWER possible memory organizations than video drivers. The -currently supported memory organizations in LIBGRX are the following: - - 256 color VGA - 16 color EGA/VGA/SVGA - 32768 color SVGA - 8514/A and S3 hardware accelerated video RAM access - -The following two memory organizations are not supported yet, but stubs -have been included for them in the library: - - monochrome (Hercules, CGA 640x200 mode, EGA, VGA) - VGA 256 color plane-oriented (Mode X, Y...) - -The driver status word is used to set up some global variables -describing the layout of the video memory, the number of colors, etc.. The -library contains different low-level video RAM access routines for the -different video RAM organizations. These low-level video RAM access -routines are called indirectly via function pointers. These function -pointers are set up when a graphics primitive first attempts to use them. -This means that an attempt to draw anything before the first call to -'GrSetMode' will fail miserably as the library will has no idea about the -video access method to be used. - -The library source files containing the memory mode specific functions -are named as follows: - - p1*.c - monochrome (currently dummies only) - p4*.c - EGA/VGA 16 color modes - p8*.c - VGA 256 color modes - ph*.c - VGA 32768 color mode - px*.c - VGA 256 color mode X (currently dummies only) - pi*.c - 8514/A and S3 256 color mode - ps*.c - a few additional S3 routines where its programming - differs from the 8514/A - -Each memory mode access group contains ten files (one function in each) -which do the following: - - p?init.c - global data and possibly an init function - p?pixset.c - set a single pixel - p?pixrd.c - read a single pixel - p?pixrow.c - set a pixel row - p?pixcol.c - set a pixel column - p?pixblk.c - set a rectangular pixel block - p?bitblt.c - copy a rectangular pixel block - p?line.c - draw a line - p?char.c - draw a character - p?fillp.c - fill a pixel row with a pattern - -The library does all mode-specific video RAM access through these nine -functions. There is a small amount of mode specific code related to -setup and color management in the files "setmode.c", "layout.c", -"context.c" and "colors.c", other than these the rest of the library -(drawing functions, etc..) is video RAM organization independent. - -If the library was built to support only a single memory organization -then the calls to the appropriate low-level functions are hard-coded into -the code (via preprocessor macros in "libgrx.h"). Additionally, in 256 and -32768 color modes some trivial pixel manipulations (read and set a single -pixel) are expanded in-line. - -If the library supports more than one video RAM model then this -in-line expansion is not done, and all low-level access functions are -called via pointers. There is a dispatch routine for every low-level -service (in the files "sw*.c"). The pointers initially point to these -dispatch routines. When a dispatch routine is first called it puts the -address of the appropriate (i.e. corresponding to the current video mode) -low-level access function into the pointer and then calls it. This way the -dispatch routine gets called only the first time a video RAM access -function is used. A call to 'GrSetMode' resets the pointers to point to -the dispatch routines. - -NOTE: The Turbo C low-level video RAM access routines do not support -paging. (Actually, the 32 bit routines do not support it either because it -is handled transparently by the 386's page fault mechanism and the DOS -extender.) For this reason the Turbo C version has a resolution -limitation: 320x200 in 256 color mode and 800x600 in 16 color mode. For -the same reason there is no support for the 32768 color modes in the -Turbo C version of the library. HOWEVER: the 8514/A and S3 accelerators -do not need direct video RAM access and paging. For this reason the -full resolution of these boards (1024x768x256) can be supported even in the -Turbo C version of the library. - - - - - - - - Abstract - - This document describes the graphics driver format used for DJGPP and the - LIBGRX graphics library. It also gives hints for creating a driver for an - unsupported display adapter. - - Introduction - - The DJGPP graphics drivers do two things: - - (1) Invoke the BIOS INT 10 routine for setting up the desired graphics mode. - Different boards support different resolutions and use different mode - numbers -- that's why different drivers are needed for different boards. - - (2) Implement page mapping for video modes which use more than 64K of video - memory. This is again board dependent. - - Old driver format - - The following C declarations describe the header of an old format DJGPP - graphics driver. Of course, real drivers are coded in assembly. - - typedef unsigned short u_short; - typedef unsigned char u_char; - - struct old_driver_header { - u_short mode_set_routine_offset; - u_short paging_routine_offset; - u_short paging_mode_flag; /* 0 if no separate R/W, 1 if yes */ - u_short default_text_width; - u_short default_text_height; - u_short default_graphics_width; - u_short default_graphics_height; - }; - - The mode set routine does the following: - - ;-------------------------------------------------------------------------- - ; Entry: AX=mode selection - ; 0=80x25 text - ; 1=default text - ; 2=text CX cols by DX rows - ; 3=biggest text - ; 4=320x200 graphics - ; 5=default graphics - ; 6=graphics CX width by DX height - ; 7=biggest non-interlaced graphics - ; 8=biggest graphics - ; CX=width (in pixels or characters) (not always used -- depends on AX) - ; DX=height - ; - ; NOTE: This runs in real mode, but don't mess with the segment registers. - ; - ; Exit: CX=width (in pixels or characters) - - - - - - ; DX=height - ;-------------------------------------------------------------------------- - - The paging routine does the following: - - ;-------------------------------------------------------------------------- - ; Entry: AH=read page - ; AL=write page - ; - ; NOTE: This runs in protected mode! Don't mess with the segment registers! - ; This code must be relocatable and may not reference any data! - ; - ; Exit: VGA configured. - ; AX,BX,CX,DX,SI,DI may be trashed - ;-------------------------------------------------------------------------- - - The old style graphics driver structure remained unchanged for the first 16 - color drivers developed for LIBGRX. The only difference is that the additional - 15 bits in the third word of the header were given new meanings. (The 256 - color DJGPP library only used one bit to encode the capability to map - different pages for reading and writing.) The values of these new bitfields - were assigned as to stay compatible with the existing 256 color drivers. (I.e. - the 0 value in every bitfield selects the 256 color VGA option.) The - definition of these bits (from "grdriver.h"): - - #define GRD_NEW_DRIVER 0x0008 /* NEW FORMAT DRIVER IF THIS IS SET */ - - #define GRD_PAGING_MASK 0x0007 /* mask for paging modes */ - #define GRD_NO_RW 0x0000 /* standard paging, no separate R/W */ - #define GRD_RW_64K 0x0001 /* two separate 64K R/W pages */ - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - /* THE FOLLOWING THREE OPTIONS ARE NOT SUPPORTED AT THIS TIME */ - #define GRD_RW_32K 0x0002 /* two separate 32Kb pages */ - #define GRD_MAP_128K 0x0003 /* 128Kb memory map -- some Tridents - can do it (1024x768x16 without - paging!!!) - #define GRD_MAP_EXTMEM 0x0004 /* Can be mapped extended, above 1M. - Some Tseng 4000-s can do it, NO - PAGING AT ALL!!!! */ - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - - #define GRD_TYPE_MASK 0xf000 /* adapter type mask */ - #define GRD_VGA 0x0000 /* vga */ - #define GRD_EGA 0x1000 /* ega */ - #define GRD_HERC 0x2000 /* hercules */ - #define GRD_8514A 0x3000 /* 8514/A or compatible */ - #define GRD_S3 0x4000 /* S3 graphics accelerator */ - - #define GRD_PLANE_MASK 0x0f00 /* bitplane number mask */ - #define GRD_8_PLANES 0x0000 /* 8 planes = 256 colors */ - #define GRD_4_PLANES 0x0100 /* 4 planes = 16 colors */ - #define GRD_1_PLANE 0x0200 /* 1 plane = 2 colors */ - #define GRD_16_PLANES 0x0300 /* VGA with 32K colors */ - #define GRD_8_X_PLANES 0x0400 /* VGA in mode X w/ 256 colors */ - - - - - - #define GRD_MEM_MASK 0x00f0 /* memory size mask */ - #define GRD_64K 0x0010 /* 64K display memory */ - #define GRD_128K 0x0020 /* 128K display memory */ - #define GRD_256K 0x0030 /* 256K display memory */ - #define GRD_512K 0x0040 /* 512K display memory */ - #define GRD_1024K 0x0050 /* 1MB display memory */ - #define GRD_192K 0x0060 /* 192K -- some 640x480 EGA-s */ - #define GRD_M_NOTSPEC 0x0000 /* memory amount not specified */ - - An old style driver has the 'GRD_NEW_DRIVER' bit cleared. It can work with - previous versions of GO32. Of course for 16 color support the application has - to be linked with the LIBGRX library instead of the original 256 color - library. - - The following additional old format graphics drivers are supplied with the - LIBGRX graphics library: - - EGA16.GRD 16 color EGA driver (640x350x16 max. resolution) - VGA16.GRD 16 color standard VGA driver (640x480x16 max. - resolution) - TSENG4KN.GRD same as DJGPP's Tseng ET 4000 256 color driver, but - with added support for the 100x40 text mode. (max: - 1024x768x256) - TSENG416.GRD Tseng ET 4000 16 color driver. (max: 1024x768x16) - TRID89N.GRD Trident 8900 256 color driver. This driver has an - updated paging routine which seems to fix some - previous problems on boards with recent enough - chipsets. (max: 1024x768x256) - TRID8916.GRD: Trident 8900 16 color driver (max: 1024x768x16) - - - New driver format - - The disadvantage of the old driver format is that the number of colors is not - programmable. The new driver format solves this problem and it also gives the - application program a way to query the driver for a list of the supported text - and graphics modes. For this the driver header was extended as follows: - - struct new_driver_header { - u_short mode_set_routine_offset; - u_short paging_routine_offset; - u_short driver_mode_flag; /* flag word, see bits below */ - u_short default_text_width; - u_short default_text_height; - u_short default_graphics_width; - u_short default_graphics_height; - u_short default_color_number; /* NEW, may be set from environment */ - u_short init_routine_offset; /* NEW, call once after drvr loaded */ - u_short text_mode_table_offset; /* NEW, table of supported text modes */ - u_short graphics_mode_table_offset; /* NEW, table of supported graphics modes */ - }; - - 'text_mode_table_offset' points to a table with entries as follows: - - - - - - struct text_mode_entry { - u_short columns; - u_short rows; - u_short number_of_colors; /* in text mode it is mainly here to make - GCC happy with the alignments */ - u_char BIOS_mode; /* BIOS mode number. Mode not available on - the current card if this field is 0xff. */ - u_char special; /* if non zero then the driver does some - special hacks to set it up (like - the 50 row mode on a standard VGA) */ - }; - - The end of the table is marked by an all 0 entry. The table entries are sorted - by increasing size. The field 'graphics_mode_table_offset' points to a table - with entries as follows: - - struct graphics_mode_entry { - u_short width; - u_short height; - u_short number_of_colors; - u_char BIOS_mode; /* BIOS mode number. Mode not available on - the current card if this field is 0xff. - (This may happen for example if the card - is not fully populated with RAM) */ - u_char special; /* if non zero then the driver does some - special hacks to set it up (like - setting up the 32768 color mode on - some ET4000 cards) */ - }; - - The end of the table is marked by an all 0 entry. The table is sorted by - increasing color number and within the same color modes by increasing size. - - If the driver is of the new type then it also supports an initialization - routine. This is called once after the driver is loaded. The initialization - routine can do one or more of the following: - - (1) Check whether the video card is of the expected type - - (2) Determine the amount of video memory on board. - - (3) Determine which of the modes in the text and graphics mode tables are - actually available (due to video RAM and possibly DAC [32768 colors!!] - limitations) and mark the unavailable entries in the tables. - - To use the new format drivers a recent version of GO32 (1.06, after the middle - of April 1992) has to be used. Such versions should recognize the "nc - " option field in the GO32 environment variable which specifies the - default number of colors for the driver. - - The following new format drivers have been included with the LIBGRX library - (new drivers have the ".GRN" extension): - - STDEGA.GRN standard EGA 16 color driver - - - - - - STDVGA.GRN standard VGA 16 and 256 color driver - ET4000.GRN Tseng ET 4000 16 256 and 32768 color driver - TR8900.GRN Trident 8900 16 and 256 color driver - ATIULTRA.GRN Driver for the ATI ULTRA board. This board actually - contains two graphics adapters: a 512 KByte SVGA board - and a 8514/A compatible accelerator. The driver was - programmed to use the VGA part for text, 16 color - graphics, and low resolution 256 color graphics modes - and the 8514/A part for high resolution 256 color - modes. This driver should work with any VGA+8514/A - (the 8514/A MUST have 1MB memory for 1024x768 - resolution) combination as long as the ATI-specific - modes of the VGA part are not used. - STEALTH.GRN Driver for the Diamond Stealth S3 graphics accelerator - board. The driver was programmed to use VGA-style video RAM - access for text, 16 color graphics, and low resolution 256 - color graphics modes and the S3 accelarator functions for - high resolution 256 color modes. Currently no 32768 color - modes are supported on S3 boards. This driver should work - with other S3-based boards which have a VESA BIOS. - - - Creating a driver for an unsupported board - - You can only use EGA or VGA boards in 16 256 or 32768 color modes with the - graphics library. In the near future there will be support for Hercules boards - as well. SUPPORT IS NOT PLANNED FOR: BOARDS WITH ON-BOARD GRAPHICS PROCESSORS - (TIGA, 8514A, etc...) To create a driver for an unsupported EGA or VGA board - you will need the followings: - - (1) An assembler (TASM or MASM), a linker (TLINK or LINK) and a utility to - convert .EXE files to the .COM format (EXE2BIN). See also the 'makefile' - in the 'drivers' sub-directory. - (2) A documentation of the board containing the supported BIOS mode numbers - and resolutions. - (3) If the driver needs to support modes which use a memory map bigger than - 64K then you also need a piece of code which does page switching on your - board. (Any mode above 800x600 in 16 colors or 320x200 in 256 colors - DOES USE paging.) Possible sources: - - a working, tested 256 color original DJGPP driver (if you just - want to convert it to the new format). - - VGAKIT.ZIP (available from various archive sites, like wuarchive, - simtel, etc...) - - various books on the subject. - - It is best to start with the source of a driver supporting similar resolutions - as your board. Use the proper format driver, i.e. if you want a new format - driver start with a new original, etc... Typically the driver sources are - relatively well commented. What you need to do is: - - (1) possibly change the option word at the head of the driver to indicate - the number of colors (old format only), the amount of memory on board, - the memory mapping capabilities of the board. - (2) change the mode setting code to use the proper BIOS mode numbers. In the - - - - - - old format drivers these are somewhat scattered throughout the code, in - the new format drivers you need to edit a few tables only. - (3) Replace the paging routine with the one suitable for your board. If your - driver supports 16 color resolutions beyond 800x600 then you have to - make sure that upon exit from the paging routine the graphics controller - port's (0x3ce) index register is reset to 8. (See the paging routine in - "TR8900.ASM".) If the paging mechanism does not use any register - accessed through the graphics controller port, then you don't need to - worry about this. \ No newline at end of file diff --git a/thirdparty/grx249/doc/old/internal.doc b/thirdparty/grx249/doc/old/internal.doc deleted file mode 100644 index 48d6d83..0000000 --- a/thirdparty/grx249/doc/old/internal.doc +++ /dev/null @@ -1,487 +0,0 @@ -THIS FILE IS UNDER CONSTRUCTION!!!!! -DON'T READ IT. IF YOU WANT TO SEE THE INTERNALS OF GRX 2.0 CONSULT THE -SOURCE! - - - - - -Abstract -======== - -This document describes contains information necessary for rebuilding -the LIBGRX graphics library. Additionally, it describes some internal -details of the library associated with way it accesses the video RAM. This -info might be useful for adding support for new graphics adapter types. - - -How to rebuild the library -========================== - -The LIBGRX library is built using the Turbo C MAKE. (TC++ 1.01 -professional was used.) If an other MAKE has to be used it has to provide -some method for generating response files from long command lines. The -makefiles may have to be changed from the Turbo C MAKE response file -syntax to the syntax of the new MAKE. Additionally, the Turbo C MAKE -provides a C preprocessor-like conditional syntax. If the new MAKE utility -does not support this, the desired option has to be hard-coded. - -The makefile in the base directory of the package (typically it is -....djgpp\contrib\libgrx) can be invoked as follows: - - 1) make build DJGPP libraries, and the drivers - 2) make turboc build Turbo C libraries - 3) make test (1+) build DJGPP test programs - 4) make turbotst (2+) build Turbo C test programs - 5) make install copy .h and .a files into DJGPP dirs - 6) make clean clean up after recompiling - -All graphics library sources are in the 'src' directory. The makefile -in that directory can also be used to build a customized version of the -library. Customized libraries (and the executable built using them) can be -smaller, because they don't include support for all video RAM access -methods. (see later) The makefile in the src directory can be used as -follows: - - make -DPLANES= - -- or -- - make -DPLANES= [-DMODEL=] turboc - -The value of the PLANES macro determines the included video RAM access -methods. This is a number obtained by OR-ing together the following -values: - - 1 monochrome (Hercules) - 4 16 color EGA/VGA/SVGA - 8 256 color VGA/SVGA - 16 32768 color SVGA - 32 256 color plane mode (mode X) - -For example: - - make -DPLANES=12 - -will build a DJGPP library which only includes support for 16 and 256 -color video modes. - -To rebuild the Turbo C version of the library a copy of TASM is also -needed, as the library contains a significant amount of in-line assembly -code. - - -Compiling the test programs -=========================== - -The makefile in the test directory accepts the following arguments: - - 1) make build all DJGPP test programs - 2) make turboc build all Turbo C test programs - 3) make . build a single DJGPP test program - 4) make .exe build a single Turbo C test program - -See the accompanying document "tests.doc" on how to run the test programs. - - -Low-level video RAM access support -================================== - -When 'GrSetMode' is called it finally ends up making a call to the mode -set routine of the graphics driver which knows about the capabilities of -the card, and how to put the card into the desired mode. (This is card -dependent -- that's why there are so many drivers.) - -Having done this, the driver returns a status word to the library -which specifies the MEMORY ORGANIZATION of the selected graphics mode. -There are MUCH FEWER possible memory organizations than video drivers. The -currently supported memory organizations in LIBGRX are the following: - - 256 color VGA - 16 color EGA/VGA/SVGA - 32768 color SVGA - 8514/A and S3 hardware accelerated video RAM access - -The following two memory organizations are not supported yet, but stubs -have been included for them in the library: - - monochrome (Hercules, CGA 640x200 mode, EGA, VGA) - VGA 256 color plane-oriented (Mode X, Y...) - -The driver status word is used to set up some global variables -describing the layout of the video memory, the number of colors, etc.. The -library contains different low-level video RAM access routines for the -different video RAM organizations. These low-level video RAM access -routines are called indirectly via function pointers. These function -pointers are set up when a graphics primitive first attempts to use them. -This means that an attempt to draw anything before the first call to -'GrSetMode' will fail miserably as the library will has no idea about the -video access method to be used. - -The library source files containing the memory mode specific functions -are named as follows: - - p1*.c - monochrome (currently dummies only) - p4*.c - EGA/VGA 16 color modes - p8*.c - VGA 256 color modes - ph*.c - VGA 32768 color mode - px*.c - VGA 256 color mode X (currently dummies only) - pi*.c - 8514/A and S3 256 color mode - ps*.c - a few additional S3 routines where its programming - differs from the 8514/A - -Each memory mode access group contains ten files (one function in each) -which do the following: - - p?init.c - global data and possibly an init function - p?pixset.c - set a single pixel - p?pixrd.c - read a single pixel - p?pixrow.c - set a pixel row - p?pixcol.c - set a pixel column - p?pixblk.c - set a rectangular pixel block - p?bitblt.c - copy a rectangular pixel block - p?line.c - draw a line - p?char.c - draw a character - p?fillp.c - fill a pixel row with a pattern - -The library does all mode-specific video RAM access through these nine -functions. There is a small amount of mode specific code related to -setup and color management in the files "setmode.c", "layout.c", -"context.c" and "colors.c", other than these the rest of the library -(drawing functions, etc..) is video RAM organization independent. - -If the library was built to support only a single memory organization -then the calls to the appropriate low-level functions are hard-coded into -the code (via preprocessor macros in "libgrx.h"). Additionally, in 256 and -32768 color modes some trivial pixel manipulations (read and set a single -pixel) are expanded in-line. - -If the library supports more than one video RAM model then this -in-line expansion is not done, and all low-level access functions are -called via pointers. There is a dispatch routine for every low-level -service (in the files "sw*.c"). The pointers initially point to these -dispatch routines. When a dispatch routine is first called it puts the -address of the appropriate (i.e. corresponding to the current video mode) -low-level access function into the pointer and then calls it. This way the -dispatch routine gets called only the first time a video RAM access -function is used. A call to 'GrSetMode' resets the pointers to point to -the dispatch routines. - -NOTE: The Turbo C low-level video RAM access routines do not support -paging. (Actually, the 32 bit routines do not support it either because it -is handled transparently by the 386's page fault mechanism and the DOS -extender.) For this reason the Turbo C version has a resolution -limitation: 320x200 in 256 color mode and 800x600 in 16 color mode. For -the same reason there is no support for the 32768 color modes in the -Turbo C version of the library. HOWEVER: the 8514/A and S3 accelerators -do not need direct video RAM access and paging. For this reason the -full resolution of these boards (1024x768x256) can be supported even in the -Turbo C version of the library. - - - - - - - - Abstract - - This document describes the graphics driver format used for DJGPP and the - LIBGRX graphics library. It also gives hints for creating a driver for an - unsupported display adapter. - - Introduction - - The DJGPP graphics drivers do two things: - - (1) Invoke the BIOS INT 10 routine for setting up the desired graphics mode. - Different boards support different resolutions and use different mode - numbers -- that's why different drivers are needed for different boards. - - (2) Implement page mapping for video modes which use more than 64K of video - memory. This is again board dependent. - - Old driver format - - The following C declarations describe the header of an old format DJGPP - graphics driver. Of course, real drivers are coded in assembly. - - typedef unsigned short u_short; - typedef unsigned char u_char; - - struct old_driver_header { - u_short mode_set_routine_offset; - u_short paging_routine_offset; - u_short paging_mode_flag; /* 0 if no separate R/W, 1 if yes */ - u_short default_text_width; - u_short default_text_height; - u_short default_graphics_width; - u_short default_graphics_height; - }; - - The mode set routine does the following: - - ;-------------------------------------------------------------------------- - ; Entry: AX=mode selection - ; 0=80x25 text - ; 1=default text - ; 2=text CX cols by DX rows - ; 3=biggest text - ; 4=320x200 graphics - ; 5=default graphics - ; 6=graphics CX width by DX height - ; 7=biggest non-interlaced graphics - ; 8=biggest graphics - ; CX=width (in pixels or characters) (not always used -- depends on AX) - ; DX=height - ; - ; NOTE: This runs in real mode, but don't mess with the segment registers. - ; - ; Exit: CX=width (in pixels or characters) - - - - - - ; DX=height - ;-------------------------------------------------------------------------- - - The paging routine does the following: - - ;-------------------------------------------------------------------------- - ; Entry: AH=read page - ; AL=write page - ; - ; NOTE: This runs in protected mode! Don't mess with the segment registers! - ; This code must be relocatable and may not reference any data! - ; - ; Exit: VGA configured. - ; AX,BX,CX,DX,SI,DI may be trashed - ;-------------------------------------------------------------------------- - - The old style graphics driver structure remained unchanged for the first 16 - color drivers developed for LIBGRX. The only difference is that the additional - 15 bits in the third word of the header were given new meanings. (The 256 - color DJGPP library only used one bit to encode the capability to map - different pages for reading and writing.) The values of these new bitfields - were assigned as to stay compatible with the existing 256 color drivers. (I.e. - the 0 value in every bitfield selects the 256 color VGA option.) The - definition of these bits (from "grdriver.h"): - - #define GRD_NEW_DRIVER 0x0008 /* NEW FORMAT DRIVER IF THIS IS SET */ - - #define GRD_PAGING_MASK 0x0007 /* mask for paging modes */ - #define GRD_NO_RW 0x0000 /* standard paging, no separate R/W */ - #define GRD_RW_64K 0x0001 /* two separate 64K R/W pages */ - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - /* THE FOLLOWING THREE OPTIONS ARE NOT SUPPORTED AT THIS TIME */ - #define GRD_RW_32K 0x0002 /* two separate 32Kb pages */ - #define GRD_MAP_128K 0x0003 /* 128Kb memory map -- some Tridents - can do it (1024x768x16 without - paging!!!) - #define GRD_MAP_EXTMEM 0x0004 /* Can be mapped extended, above 1M. - Some Tseng 4000-s can do it, NO - PAGING AT ALL!!!! */ - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - - #define GRD_TYPE_MASK 0xf000 /* adapter type mask */ - #define GRD_VGA 0x0000 /* vga */ - #define GRD_EGA 0x1000 /* ega */ - #define GRD_HERC 0x2000 /* hercules */ - #define GRD_8514A 0x3000 /* 8514/A or compatible */ - #define GRD_S3 0x4000 /* S3 graphics accelerator */ - - #define GRD_PLANE_MASK 0x0f00 /* bitplane number mask */ - #define GRD_8_PLANES 0x0000 /* 8 planes = 256 colors */ - #define GRD_4_PLANES 0x0100 /* 4 planes = 16 colors */ - #define GRD_1_PLANE 0x0200 /* 1 plane = 2 colors */ - #define GRD_16_PLANES 0x0300 /* VGA with 32K colors */ - #define GRD_8_X_PLANES 0x0400 /* VGA in mode X w/ 256 colors */ - - - - - - #define GRD_MEM_MASK 0x00f0 /* memory size mask */ - #define GRD_64K 0x0010 /* 64K display memory */ - #define GRD_128K 0x0020 /* 128K display memory */ - #define GRD_256K 0x0030 /* 256K display memory */ - #define GRD_512K 0x0040 /* 512K display memory */ - #define GRD_1024K 0x0050 /* 1MB display memory */ - #define GRD_192K 0x0060 /* 192K -- some 640x480 EGA-s */ - #define GRD_M_NOTSPEC 0x0000 /* memory amount not specified */ - - An old style driver has the 'GRD_NEW_DRIVER' bit cleared. It can work with - previous versions of GO32. Of course for 16 color support the application has - to be linked with the LIBGRX library instead of the original 256 color - library. - - The following additional old format graphics drivers are supplied with the - LIBGRX graphics library: - - EGA16.GRD 16 color EGA driver (640x350x16 max. resolution) - VGA16.GRD 16 color standard VGA driver (640x480x16 max. - resolution) - TSENG4KN.GRD same as DJGPP's Tseng ET 4000 256 color driver, but - with added support for the 100x40 text mode. (max: - 1024x768x256) - TSENG416.GRD Tseng ET 4000 16 color driver. (max: 1024x768x16) - TRID89N.GRD Trident 8900 256 color driver. This driver has an - updated paging routine which seems to fix some - previous problems on boards with recent enough - chipsets. (max: 1024x768x256) - TRID8916.GRD: Trident 8900 16 color driver (max: 1024x768x16) - - - New driver format - - The disadvantage of the old driver format is that the number of colors is not - programmable. The new driver format solves this problem and it also gives the - application program a way to query the driver for a list of the supported text - and graphics modes. For this the driver header was extended as follows: - - struct new_driver_header { - u_short mode_set_routine_offset; - u_short paging_routine_offset; - u_short driver_mode_flag; /* flag word, see bits below */ - u_short default_text_width; - u_short default_text_height; - u_short default_graphics_width; - u_short default_graphics_height; - u_short default_color_number; /* NEW, may be set from environment */ - u_short init_routine_offset; /* NEW, call once after drvr loaded */ - u_short text_mode_table_offset; /* NEW, table of supported text modes */ - u_short graphics_mode_table_offset; /* NEW, table of supported graphics modes */ - }; - - 'text_mode_table_offset' points to a table with entries as follows: - - - - - - struct text_mode_entry { - u_short columns; - u_short rows; - u_short number_of_colors; /* in text mode it is mainly here to make - GCC happy with the alignments */ - u_char BIOS_mode; /* BIOS mode number. Mode not available on - the current card if this field is 0xff. */ - u_char special; /* if non zero then the driver does some - special hacks to set it up (like - the 50 row mode on a standard VGA) */ - }; - - The end of the table is marked by an all 0 entry. The table entries are sorted - by increasing size. The field 'graphics_mode_table_offset' points to a table - with entries as follows: - - struct graphics_mode_entry { - u_short width; - u_short height; - u_short number_of_colors; - u_char BIOS_mode; /* BIOS mode number. Mode not available on - the current card if this field is 0xff. - (This may happen for example if the card - is not fully populated with RAM) */ - u_char special; /* if non zero then the driver does some - special hacks to set it up (like - setting up the 32768 color mode on - some ET4000 cards) */ - }; - - The end of the table is marked by an all 0 entry. The table is sorted by - increasing color number and within the same color modes by increasing size. - - If the driver is of the new type then it also supports an initialization - routine. This is called once after the driver is loaded. The initialization - routine can do one or more of the following: - - (1) Check whether the video card is of the expected type - - (2) Determine the amount of video memory on board. - - (3) Determine which of the modes in the text and graphics mode tables are - actually available (due to video RAM and possibly DAC [32768 colors!!] - limitations) and mark the unavailable entries in the tables. - - To use the new format drivers a recent version of GO32 (1.06, after the middle - of April 1992) has to be used. Such versions should recognize the "nc - " option field in the GO32 environment variable which specifies the - default number of colors for the driver. - - The following new format drivers have been included with the LIBGRX library - (new drivers have the ".GRN" extension): - - STDEGA.GRN standard EGA 16 color driver - - - - - - STDVGA.GRN standard VGA 16 and 256 color driver - ET4000.GRN Tseng ET 4000 16 256 and 32768 color driver - TR8900.GRN Trident 8900 16 and 256 color driver - ATIULTRA.GRN Driver for the ATI ULTRA board. This board actually - contains two graphics adapters: a 512 KByte SVGA board - and a 8514/A compatible accelerator. The driver was - programmed to use the VGA part for text, 16 color - graphics, and low resolution 256 color graphics modes - and the 8514/A part for high resolution 256 color - modes. This driver should work with any VGA+8514/A - (the 8514/A MUST have 1MB memory for 1024x768 - resolution) combination as long as the ATI-specific - modes of the VGA part are not used. - STEALTH.GRN Driver for the Diamond Stealth S3 graphics accelerator - board. The driver was programmed to use VGA-style video RAM - access for text, 16 color graphics, and low resolution 256 - color graphics modes and the S3 accelarator functions for - high resolution 256 color modes. Currently no 32768 color - modes are supported on S3 boards. This driver should work - with other S3-based boards which have a VESA BIOS. - - - Creating a driver for an unsupported board - - You can only use EGA or VGA boards in 16 256 or 32768 color modes with the - graphics library. In the near future there will be support for Hercules boards - as well. SUPPORT IS NOT PLANNED FOR: BOARDS WITH ON-BOARD GRAPHICS PROCESSORS - (TIGA, 8514A, etc...) To create a driver for an unsupported EGA or VGA board - you will need the followings: - - (1) An assembler (TASM or MASM), a linker (TLINK or LINK) and a utility to - convert .EXE files to the .COM format (EXE2BIN). See also the 'makefile' - in the 'drivers' sub-directory. - (2) A documentation of the board containing the supported BIOS mode numbers - and resolutions. - (3) If the driver needs to support modes which use a memory map bigger than - 64K then you also need a piece of code which does page switching on your - board. (Any mode above 800x600 in 16 colors or 320x200 in 256 colors - DOES USE paging.) Possible sources: - - a working, tested 256 color original DJGPP driver (if you just - want to convert it to the new format). - - VGAKIT.ZIP (available from various archive sites, like wuarchive, - simtel, etc...) - - various books on the subject. - - It is best to start with the source of a driver supporting similar resolutions - as your board. Use the proper format driver, i.e. if you want a new format - driver start with a new original, etc... Typically the driver sources are - relatively well commented. What you need to do is: - - (1) possibly change the option word at the head of the driver to indicate - the number of colors (old format only), the amount of memory on board, - the memory mapping capabilities of the board. - (2) change the mode setting code to use the proper BIOS mode numbers. In the - - - - - - old format drivers these are somewhat scattered throughout the code, in - the new format drivers you need to edit a few tables only. - (3) Replace the paging routine with the one suitable for your board. If your - driver supports 16 color resolutions beyond 800x600 then you have to - make sure that upon exit from the paging routine the graphics controller - port's (0x3ce) index register is reset to 8. (See the paging routine in - "TR8900.ASM".) If the paging mechanism does not use any register - accessed through the graphics controller port, then you don't need to - worry about this. \ No newline at end of file diff --git a/thirdparty/grx249/doc/old/readme.20 b/thirdparty/grx249/doc/old/readme.20 deleted file mode 100644 index dd1c063..0000000 --- a/thirdparty/grx249/doc/old/readme.20 +++ /dev/null @@ -1,104 +0,0 @@ -**************** -** README.NEW ** -**************** - -Introduction ------------- - -This is an updated (beta) version of the GRX v2.0 graphics library. - -New features are : - - - Pattern Filled functions - - ex.: GrPatternFilledCircle(xc,yc,r,p); - - - Patterned Line functions - - ex.: GrPatternedCircle(xc,yc,r,lp); - - - Custom Line functions - - ex.: GrCustomLine(x1,y1,x2,y2,lo); - - - User Coordinates functions - - ex.: GrUsrFilledEllipse(xc,yc,xa,ya,c); - -These features have been ported to GRX v2.0 from previous versions -in the GRX v1.03. However some functions had to be entirely rewritten -for compatibility with the new version of the library. - -For more informations on these functions, see the documentation located -in the 'doc/' subdirectory, or edit the 'grx20.h' file to see how to use -the functions. - - -Library -------- - -A compiled version of the library (with Djgpp v2.01) is supplied with -this upgrade and is located in the lib/ subdirectory as the 'libgrx20.a' -file. The file 'libgrx20.bk2' also present is a backup of the library -of the previous version of GRX20 (without the new features). - -The library can be recompiled by 'make' in the root directory : - - make libs - -If you don't want these new features, you can compile the previous -version of the library with the command line - - make previous - -In case of bugs, this can be useful. - -After compiling the library, you can clean the directory (by deleting -all the objects files in the 'src/' subdirectory with the command line - - make clean - -so you keep only the archive file on your disk. It can save a little -amount of memory. - - -Installing ----------- - -With the line command - - make install - -in the root directory of GRX20 'make' will copy the include files in the -'include/' directory of DJGPP and the library file in the 'lib/' directory. - - -Testing -------- - -For compiling the tests programs, just type the line command - - make test - -This will compile the library and the tests programs supplied in the -'test/' subdirectory of GRX20. These tests are those supplied with the -previous version. No tests are already available for the new features -of the library. But testing these shouldn't be very difficult ... - -Check your bookmarks, maybe I can release some tests soon ! - - -Conclusion ----------- - -I have not completely tested the library, but it passed all the tests -I made on it (and there were a lot of tests). However, if you encounter -some problems in using these new functions, you may contact me at this -address : - goffioul@emic.ucl.ac.be - -Please send the most reduced code which shows the bug with your message, -so I can test it for myself. - -I hope you'll enjoy these new features which I missed sometimes (and -I think I was not the only one ...). diff --git a/thirdparty/grx249/doc/old/readme.22 b/thirdparty/grx249/doc/old/readme.22 deleted file mode 100644 index 6ba1e27..0000000 --- a/thirdparty/grx249/doc/old/readme.22 +++ /dev/null @@ -1,157 +0,0 @@ -Hi, - -the official public release GRX v2.2 is available from - - http://www.techfak.uni-kiel.de/~hsc/GRX/grx22.zip - -and soon from any SimTel mirror in the DJGPP/v2tk -directory. - -Thanks to a lot of work by - - Csaba Biegl (csaba@vuse.vanderbilt.edu) - -of course and - - Mauro Condarelli (mc5686@mclink.it) - Christian Domp (alma.student.uni-kl.de) - Michael Goffioul (goffioul@emic.ucl.ac.be) - Sven Hilscher (Sven@rufus.central.de) - Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - Ulrich Leodolter (ulrich@lab1.psy.univie.ac.at) - Hartmut Schirmer (hsc@techfak.uni-kiel.de) - Daniel Skarda (0rfelyus@atrey.karlin.mff.cuni.cz) - -and others (see doc/credits.doc) the GRX library is now -greatly enhanced. - - -Compared with the grx20.zip from DJ-dirs this release provides: ---------------------------------------------------------------- - - user coordinates (by Michael) - - pattern filling (by Michael) - - custom lines (by Michael) - - Linux support [svgalib && X11 (Ulrich) support and other - things Csaba mentions in credits.doc ] - - reorganized font support (Csaba) - - linkable bitmap fonts (Csaba) - - Borland vector fonts (Csaba) - - VESA 2.0 and svgalib linear frame buffer support - - VESA 2.0 8bit DAC support - - various driver speed ups - - slightly changed color interface (by Michael for better - MGUI support) - - GNU-Pascal support (by Sven) - - -What's currently untested: --------------------------- - - LFB32H frame driver - - svgalib linear frame buffer support - - X11 driver is supposed to work but couldn't test this - - svgalib/X11 on non i386 platforms - - -What's missing: ---------------- - - documentation - - VESA 2.0 protected mode virtual screen support - - -Installation for DJGPP: ------------------------ - Unpack the grx22.zip archive in your DJGPP v2 root directory - by 'pkunzip -d grx22.zip' or 'unzip grx22.zip' - - Edit your DJGPP.ENV file. - a. delete all references to GRX v2.0 or v2.1 - b. In the [cpp] section append - ;%DJDIR%/contrib/grx22/include - to C_INCLUDE_PATH and CPLUS_INCLUDE_PATH variables - c. In the [gcc] section append - ;%DJDIR%/contrib/grx22/lib - to the LIBRARY_PATH entry - d. GNU-Pascal users need to change [gpc-cpp] and - [gpc] sections too. - e. Make sure the GRXFONT environment variable is set, - otherwise add - +GRXFONT=%DJDIR%/contrib/grx22/fonts - at top of DJGPP.ENV - - Check GRX v2.2 - a. go to DJDIR/contrib/grx22 and check makedefs.gnu and - makedefs.dj2 for your system requirements (default - should work well on average system ) - b. go to the test subdir and build the test files: - make -f makefile.dj2 - c. run the tests - - Recompile your own programs with GRX v2.2! - - -Installation for Linux: ------------------------ - Unpack the grx22.zip archive in a temporary directory - using 'unzip -L -a grx22.zip'. Make sure all .fnt - files where extracted in binary mode! Go to contrib - subdir and move the grx22 tree to /usr/src - - Delete the DJGPP .a file in the grx22/lib subdir. - - Many GRX based programs need to access the font file. - Either make the /usr/src/grx22/fonts subdir readable - to anyone running GRX programs or copy the fonts subdir - to a place where anyone can access it (I placed the - fonts in /usr/local/grx-fonts on my system) - Make sure the GRXFONT environment variable points to - the fonts directory. - - In /usr/src/grx22 check the default settings in - makedefs.gnu and makedefs.x11 - - To build the SVGALIB based GRX v2.2 run - make -f makefile.lnx - - To build the X11 based GRX v2.2 run - make -f makefile.x11 - - Check the by running the (static linked) test programs. - - If everything works well, copy the .a and .so library - files to a system lib dir, eg. /usr/local/lib and - generate symbolic links for the shared libraries: - libgrx20.so -> libgrx20.so.2.2.0 - libgrx20X.so -> libgrx20X.so.2.2.0 - - Copy the files from grx22/include and grx22/compat to - an include dir (eg. /usr/local/include) - - Make sure all installed files are readable everyone - compiling/running GRX based programs. - - Now GRX v2.2 should be ready for your programs ! - - -Important: ----------- - - Due to slight changes in grx20.h you'll have to recompile - your programs. Just relinking it won't work in most cases. - - -Help: ------ -If you find a bug in GRX v2.2, if GRX doesn't work on -your system or if you have any other question concerning -GRX, please contact me by e-mail: - - hsc@techfak.uni-kiel.de - -For DJGPP based systems you might also check the DJGPP -news group: - - comp.os.msdos.djgpp - - - -Hartmut Schirmer diff --git a/thirdparty/grx249/doc/old/readme.23 b/thirdparty/grx249/doc/old/readme.23 deleted file mode 100644 index d8909a9..0000000 --- a/thirdparty/grx249/doc/old/readme.23 +++ /dev/null @@ -1,120 +0,0 @@ -GRX installation instructions -============================= - -Requirements: -------------- - - The source files: grx23.zip - The fonts : grx23fnt.zip - This document : grx23rme.1st - - Currently GRX directly supports the following platforms: - - DOS / DJGPP v1.12 (GCC 2.6.3) - DOS / DJGPP v2.01 (GCC 2.6.3, 2.7.2 and 2.8.1) - DOS / Borland C++ (v2.0, v3.1 and v4.52 checked) - DOS / Turbo C (v1.0) - DOS / Watcom C++ (v11.0 checked, 32bit only) - Linux / svgalib (GCC 2.7.2, 2.8.1) - Linux / X11R6 (GCC 2.7.2, 2.8.1) - Solaris / X11R5 (GCC 2.7.2, SUN cc v4.1) - - GRX should work on any X11R5 (or later) system after a few - changes in makedefs.gnu and makedefs.x11 - - Most makefiles (DJGPP and Unix systems) require GNU make - - -A. Unzip the GRX archives -------------------------- - - 1) create a directory for the GRX file tree. Examples: - DJGPP: eg. DJGPP/contrib/grx23 - Linux: /usr/src/grx-2.3 - 2) unzip the GRX source archive in the GRX dir: - DOS : pkunzip -d grx23.zip - Unix : unzip grx23.zip - 3) unzip the GRX font archive in the same base dir: - DOS : pkunzip -d grx2fnt.zip - Unix : unzip grx2fnt.zip - - -B. Set the environment variables --------------------------------- - - 1) set the default driver and graphics mode info: - SET GRX20DRV= gw gh nc - (very useful but not required) - Available drivers are for - DOS : stdvga, stdega, et4000, cl5426, mach64, ati28800, VESA, - memory - Linux: svgalib, memory - X11 : xwin, memory - - 2) set the GRX font dir. - SET GRXFONT= - This is required for GRX graphics text output. Path: /fonts - NOTE: You can define a default font directory when compiling GRX. - E.g, if you installed the fonts in /usr/local/lib/grx/fonts add - CCOPT += -DGRX_DEFAULT_FONT_PATH=\"/usr/local/lib/grx/fonts\" - to makedefs.gnu (Linux / GNU-make example) - - -C. Compiling GRX ----------------- - - This is only required if there's no pre-compiled GRX for your system - or you want to change GRX or the library configuration. - - 1) Go to GRX base dir and check the makefile and makedefs file - for your system setup - 2) Switch to src sub dir and check the makefile - 3) run make -f - (some system may need additional arguments here !) - 4) if every thing worked fine go to /test, check the makefile - and build all test files / examples: - make -f - - -D. Testing GRX --------------- - - 1) go to /bin and run the modetest program. If you don't have - a modetest (or modtst16) binary, do step C4 first. - 2) Build and run the other examples (see C4) - - -E. Installing GRX for your compiler ------------------------------------ - - You'll either need to 1: copy some GRX files to places where your compiler - will find them or 2: change your compiler setup so it will find the GRX - files in there default place. - - 1) Copy the library from /lib/ to the compiler - library directory. - Copy the header files from /include to your compiler include - directory - 2) See compiler documentation. Either change the default compiler behaviour - (eg., change djgpp.env) or use command line switches to tell the - compiler where to find the GRX files. - - -F. Problems ------------ - - If you have problems installing or running GRX check - - http://www.techfak.uni-kiel.de/~hsc/GRX/ - - for updates, pre-compiled libs, ... - - If this doesn't help, check your system/compiler FAQ (eg., the - DJGPP v2 FAQ is at http://www.delorie.com/djgpp/v2faq) - - Check out the DJGPP newsgroup comp.os.msdos.djgpp (archive at - http://www.delorie.com/djgpp/mail-archives) - - Send a problem report to comp.os.msdos.djgpp or me - (hsc@techfak.uni-kiel.de) - diff --git a/thirdparty/grx249/doc/old/tests.doc b/thirdparty/grx249/doc/old/tests.doc deleted file mode 100644 index dd84e36..0000000 --- a/thirdparty/grx249/doc/old/tests.doc +++ /dev/null @@ -1,76 +0,0 @@ -Introduction -============ - -This document gives a brief description of the test programs in the -'tests' sub-directory. - -The test programs were not intended as a flashy demo of the capabilities -of LIBGRX. Their purpose is to test the various services of the library. -The general syntax of their usage is: - - go32 [ []] - -- or for the Turbo C tests -- - [ []] - -The test programs typically display several screens, hitting any key -will advance to the next screen. In a few cases the keyboard is used -differently, these programs will be described below. - - -Description of the test programs: -================================= - - MODETEST: - perform video adapter speed test and test the basic primitives - of the library. - - WINTEST, WINCLIP, CLIPTEST: - test graphics contexts sub-contexts and clipping - - FRAMTEST: - demo of the framed box primitive - - BLITTEST: - test the bit block transfer function. First it tests the bitblt - primitive for 64 possible alignment cases in planar modes (8 - possible alignments for the source and destination each). It does - this test both for forward and backward copy (it depends on - whether the source address is bigger than the destination) and - for a system RAM graphics context source. A wide and a narrow - test pattern is used. After finishing the basic tests the program - gives a demo of tiling the screen with a pattern similar to the - one in FRAMTEST. - - RGBTEST: - tests the 256 color RGB mode. - - COLOROPS: - tests the four write modes: SET, XOR, OR, AND - - CURSTEST: - tests the graphics cursor drawing routines, Keyboard usage: - u U (up) \ - d D (down) move the cursor - l L (left) capitals faster - r R (right) / - q exit program - - MOUSETST: - test the mouse cursor and the rubberband cursor options. - - POLYTEST: - test the polygon filling algorithm. It takes the coordinates - of the polygons from the data file "polytest.dat" - - CIRCTEST: - test the circle drawing algorithm with a circle, horizontal and - vertical main axis ellipse. It draws the exact points (calculated - using FP arithmetics) in red. The 'q' key aborts the test. - - TESTPATT: - tests the pattern filled graphics primitives. - - -NOTE: these programs can also be used as examples for the usage of the -library. As always: CONSULT THE SOURCE!!!! - diff --git a/thirdparty/grx249/doc/problems.htm b/thirdparty/grx249/doc/problems.htm deleted file mode 100644 index 4927a7c..0000000 --- a/thirdparty/grx249/doc/problems.htm +++ /dev/null @@ -1,80 +0,0 @@ - - - - - -

Known GRX problems and things that must be improved

-

General:

-
    -
  • The memory driver allocates all planes in one chunk instead -of using real planes. -

    -
  • -
  • Printing in 1200dpi on Laserjet supporting PCL6 doesn't work. -
  • -
-

Win32 driver:

-
    -
  • Drawline can be faster. Now when we paint a long diagonal line, -the -invalidate rect is very big. -

    -
  • -
  • Add a 16 bpp framedriver. -

    -
  • -
  • The printing code doesn't work correctly. -
  • -
-

X11 driver:

-
    -
  • Try to make GrPixel faster. -

    -
  • -
  • The driver can't respond to PAINT events, so it has problems with -XFree86 v4 because the backing-store is not enabled by default. The -best solution is to have a context to save the actual window (and the -GrPixel problem can be solved too). The workaround is to add next lines -to the /etc/X11/XF86Config-4 file, in the Device section: -

    Option "BackingStore" -

    -

    Option "SaveUnders" -

    -
  • -
-

Linux console framebuffer driver:

-
    -
  • Try to change modes if the underlaying framebuffer driver allow -it. -

    -
  • -
  • Complete the alternate direct mouse driver (now it only handles -PS/2 and IMPS2 mice). -

    -
  • -
  • Use the alternate input driver even when the Svgalib driver is -included, -so virtual consoles can be switched. -
  • -
-

Linux console SVGALIB driver:

-
    -
  • Nedded alternate framedrivers for 1 and 4 bpp modes. The actual -ones are -using inport/outport instructions and doesn't work with svgalib 1.9.x -and -even with 1.4.x if the linux framebuffer is enabled. -

    -
  • -
-

VGA DOS driver:

-
    -
  • It can be improved a lot, replacing the generic funtions it uses. -

    -
  • -
  • BitBlt to screen doens't work in 4bpp modes if the screen is not -set as the default context. -
  • -
- - diff --git a/thirdparty/grx249/doc/readme.bgi b/thirdparty/grx249/doc/readme.bgi deleted file mode 100644 index dafa361..0000000 --- a/thirdparty/grx249/doc/readme.bgi +++ /dev/null @@ -1,326 +0,0 @@ - - BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - Copyright (C) 1993-97 by Hartmut Schirmer - Copyright (C) 2002 by Dimitar Zhekov - - This library is now part of the GRX graphics library. - - Contact : grx@gnu.de - -1. Introduction and overview ------------------------------------------------------------------------------ - - The BCC2GRX was created to allow users of LIBGRX to compile graphics - programs written for Borland-C++ and Turbo-C graphics interface. C code - can be directly compiled and linked with BCC2GRX. - - Using LIBGRX based graphics gives you some advantages : - - - 32 bit linear memory model (except for Turbo-C and BCC / DOS) - - high resolution and high color graphics modes supported - - easy way to support new graphics adapters - - LIBGRX and BCC2GRX are free software - - most ported applications run faster - - The current BCC2GRX (v2.3) does only a few error checks since it is - assumed the program was extensively tested before porting it to GRX. - BCC2GRX is not a convenient platform to develop new BGI programs. Of - course you should use native LIBGRX in such cases! - - -2. Differences between BGI and BCC2GRX ------------------------------------------------------------------------------ - - BCC2GRX is based on LIBGRX instead of using an .bgi driver. This - introduces some differences compared with the Borland GI. The (known) - differences are listed below. - - - Most LIBGRX platforms are 32 bit. An int will take 4 bytes instead of - 2 with Turbo-C and BCC for DOS. If you need a 16 bit integer, change - the definition from int to short which is 16 bit on all systems. - - WHITE is a function not constant with BCC2GRX. This may cause - problems in switch () statements. - (You may use - #define WHITE 15 - #include - to improve compatibility.) - - BCC2GRX can not use .bgi drivers. Installing an user driver and the - register(far)bgidriver will always cause an error. - - registerfarbgifont() and registerbgifont() are the same. Both take a - void* to the character font (whole file with header !) - - initgraph()/detectgraph() work slightly different. See below for - details. - - getmodenames() and other functions may be called before initgraph() - - character files won't be flushed at closegraph() - - NOT_PUT isn't supported. - - some constants may differ in value - - BCC2GRX's outtext() and outtextxy() do correct clipping - - some graphics primitives slightly differ in behaviour between BGI and - LIBGRX. Eg. the "saucer" in bccbgi.c putimage()/getimage() demo - looks a little different. - - the BCC2GRX header file is . You must change the #include - statements since BCC2GRX is incompatible with . For - programs compatible with both Borland GI and BCC2GRX, conditional - compilation may be used: - #if defined(__MSDOS__) && defined(__TURBOC__) - # include - #else - # include - #endif - and such programs should be linked with the respective library, - either Borland or GRX (but not both). - - the color constants like REG, GREEN, etc. won't work in graphics - modes with more than 256 colors. Use _ega_color(RED), - _ega_color(GREEN), etc to get the right colors - - -3. Some useful internals of BCC2GRX ------------------------------------------------------------------------------ - - Since LIBGRX provides a flexible and powerful set of graphics primitives, - some of the basic routines are defined within bccgrx.h using "__inline__ - static" functions when using a GNU-C compiler. It compiles these functions - like macros, but you can refer to their addresses. There is one exeption to - this rule: When compiling code based on a pascal program, a macro is used - for getaspectratio since the pascal and C graphics interfaces use different - calling types. - - BGI has something called a 'viewport'. There are two very different - behaviors depending on the clipping flag: - - If clipping is on, one introduces something like a subscreen where - (nearly) all drawing operations are done. - Otherwise the origin of the drawing coordinate system is shifted from - the top left corner to some other point on screen. - - BCC2GRX always adds the origin shift to all operations. If clipping is - requested, GrSetClipBox() is called and LIBGRX restricts drawing to the - selected subscreen. - - One may wonder why BCC2GRX has it's own drawpoly() function instead of - using the LIBGRX function. In BGI a polygon isn't really a polygon but may - be a union of several unconnected closed polygons. In more detail: - - If the start point of a polygon is reached again, the next point - is the start point of a new polygon. No connection line is drawn. - - So one may draw several closed polygons at once. I don't know whether this - behavior of the BGI is a bug or a feature, but BCC2GRX is at least - compatible ... - - -4. initgraph()/detectgraph()/closegraph() ------------------------------------------------------------------------------ - - It's recommended to use something like the following code to - initialize the graphics interface : - - int gd, gm, err; - gd = DETECT; /* or detectgraph(&gd,&gm); */ - initgraph(&gd,&gm,PATH_TO_CHR_FILES); - err = graphresult(); - if (err != grOk) ... - - This code sets up the default graphics mode defined in the GO32 or GRX20DRV - environment variable. This code will work with Borland and GRX based BGI - code without change. BCC2GRX will treat all gd values as 'DETECT' and set - up the GRX default graphics mode. - - BCC2GRX provides two new functions to select the graphics mode: - - void set_BGI_mode(int *graphdriver, int *graphmode); - and - void set_BGI_mode_whc(int *graphdriver, int *graphmode, - int width, int height, int colors); - - If your code requires one of the standard BGI modes, use set_BGI_mode() - with BCC2GRX: - - gd = VGA; gm = VGAHI; - #ifdef __GNUC__ - set_BGI_mode( &gd, &gm); - #endif - initgraph( &gd, &gm, ""); - - All resolutions including the SVGA modes may be set up by calling the - set_BGI_mode_whc() function: - - #ifdef __GNUC__ - set_BGI_mode_whc( &gd, &gm, 640, 480, 1<<24); - #else - /* BCC stuff invoking a SVGA mode, needs nonstd BGI driver */ - #endif - initgraph( &gd, &gm, ""); - - The BCC2GRX requests the desired resolution from LIBGRX by calling - - GrSetMode( GR_width_height_color_graphics, ...) - - If there is no such mode in the current driver, a related one may be set up - by LIBGRX. If you program needs a special resolution (say eg. Hercules - 720x348) you should check getmaxx() and getmaxy() after initgraph(). - - Please note that - - set_BGI_mode(HERCMONO, HERCMONOHI) uses 720x350x16 on VGA cards, - - all drivers != NATIVE_GRX behave like DETECT with BCC2GRX, - - set_BGI_mode[_whc]() sets up local variables used by initgraph() and - setgraphmode(). You may change the resolution after initgraph() done - by - gd = DETECT; - initgraph(&gd, &gm, ""); - /* Default graphics mode */ - .... - #if defined(__TURBOC__) && defined(__MSDOS__) - /* Borland GI stuff to set up 1024x768x256 mode */ - gm = ... ; - #else - set_BGI_mode_whc(&gd, &gm, 1024, 768, 256); - #endif - setgraphmode( gm); - /* Now in 1024x768x256 mode */ - - Starting with BCC2GRX v2.0 there are new functions: - - getmodemaxcolor(int mode), getmodemaxx(int mode), getmodemaxy(int mode) - - which may be called at any time, even before initgraph(). A program may - require true rgb support (32k colors or more) and at least 800x600 pixels. - The new getmodemax*() functions may be used for flexible setup: - - int gd=DETECT, gm; - #if defined(__BCC2GRX__) && (__BCC2GRX__>=0x200) - #define XR 800 - #define YR 600 - #define CR (1<<15) - int lo,hi,x=0,y=0,c=0,i; - detectgraph(&gd,&gm); - getmoderange(gd, &lo, &hi); gm=-1; - for (i=hi;i>=lo;--i) - if (getmodemaxcolor(i)>=CR) { - if (getmodemaxx(i)==XR && getmodemaxy(i)==YR) { - gm = i; /* enough colors and exact geometry */ - break; /* ==> done */ - } - if (getmodemaxx(i)>=XR && getmodemaxy(i)>=YR) - gm = i; - } else break; /* no success */ - if (gm<0) { - puts("Sorry, no sufficient video mode available\n"); - exit(1); - } - #undef XR - #undef YR - #undef CR - #endif - initgraph(&gd,&gm,""); - - The above example exploits the BCC2GRX ordering of modes: - less colors first, less total pixel count earlier, or - decide by horizontal width - Eg.: - 640x480x16 // 16 < 256 available colors - 320x200x256 // 64000 < 128000 total pixel - 640x200x256 // 128000 < 172800 total pixel - 360x480x256 // 360 < 480 horizontal pixel - 480x360x256 // 172800 < 480000 total pixel - 800x600x256 // 256 < 16M available colors - 640x480x16M - - closegraph() doesn't free any allocated memory (eg. vector fonts). - - The paging routines setactivepage() and setvisualpage() are functional for - GRX v2 base BCC2GRX. Just call set_BGI_mode_pages() before calling - initgraph(): - - set_BGI_mode_pages(2); /* 1 or 2 valid ! */ - initgraph(...); - if (graphresult() == grOk && get_BGI_mode_pages() > 1) { - /* Do cool paging stuff */ - } - - You can't check paging without switching into graphics mode! - Translating BCC modes by set_BGI_mode() will disable paging! - - -5. Using fonts ------------------------------------------------------------------------------- - - The BCC2GRX v1.2 or newer can link vector fonts into the .exe file. - The standard fonts are in the libbcc*.a: - - _bold_font, _euro_font, _goth_font, _lcom_font - _litt_font, _sans_font, _scri_font, _simp_font - _trip_font, _tscr_font - - Call registerbgifont() to enable font usage: - - registerbgifont( &_bold_font); - registerbgifont( &_euro_font); - registerbgifont( &_goth_font); - registerbgifont( &_lcom_font); - registerbgifont( &_litt_font); - registerbgifont( &_sans_font); - registerbgifont( &_scri_font); - registerbgifont( &_simp_font); - registerbgifont( &_trip_font); - registerbgifont( &_tscr_font); - - Of course you can also link non standard fonts: - - - copy the .chr file(s) to bcc2grx/src - - goto bcc2grx and type 'make' - - add - extern int __font; - registerbgifont( &__font); - to your source - - The actual BCC2GRX handels the 11 standard and up to 10 user fonts. If you - need more user fonts, you should change the definition of LastUserFont in - text.c! - - Starting with BCC2GRX v1.2 you can also use the LIBGRX bitmapped fonts. - Just get a font handle and set the new text style. Eg. you may want to use - the 8x16 VGA font in high resolution graphics: - - font_handle = installuserfont( "pc8x16.fnt"); - settextstyle( font_handle, HORIZ_DIR, 1); - - See test/ttext.c for more examples. - - Please note that GRX 2.x can't scale bitmap fonts at drawing level any - longer. Before drawing a magnified DEFAULT_FONT, BCC2GRX will first set up - the required new font and keeps a pointer for later use. Due to this, you - might notice a slight delay the first time you request a magnified font. - - The new GRX 2.x may use Borland vector fonts as native fonts. Managing the - resulting bitmap fonts would use much more memory than linking the font - rendering code twice, so I decided not to use the GRX font API. - - Every font will be loaded only once and stay in (virtual) memory until the - program terminates. If this behaviour doesn't work with your program (eg. - something like a font editor) or you get short of memory loading hundreds - of fonts, please tell me about. - - -8. What's new in this release? ------------------------------------------------------------------------------ - - New copyright terms: same license as the rest of GRX. - Updated for GRX 1.03 / .vdr drivers / 64K && 16M color modes - More robust library internal function naming - BLACK now is a constant - Several (minor) bug fixes - Updated for GRX v2 - libbcc.h won't include GRX stuff any more - added version control __BCC2GRX__ - Linux support - setactivepage()/setvisualpage() with GRX v2 - - For a more complete list of changes and new features check src/changes. - - -9. LIBGRX 2.4.5 and later ------------------------------------------------------------------------------ - - Starting with LIBGRX 2.4.5, BCC2GRX supports Turbo-C and BCC. The - documentation has been updated accordingly. diff --git a/thirdparty/grx249/doc/tex/grx2.tex b/thirdparty/grx249/doc/tex/grx2.tex deleted file mode 100644 index b956fb0..0000000 --- a/thirdparty/grx249/doc/tex/grx2.tex +++ /dev/null @@ -1,31 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@c %**start of header -@setfilename grx249um.inf -@settitle GRX 2.4.9 User's Manual -@c %**end of header - -@dircategory Libraries -@direntry -* GRX: (grx). The GRX Graphics Library. -@end direntry - -@setchapternewpage odd -@paragraphindent 0 - -@titlepage -@sp 10 -@comment The title is printed in a large font. -@title GRX 2.4.9 User's Manual -@subtitle A 2D graphics library for DOS, Linux, X11 and Win32 - -@c The following two commands start the copyright page. -@page -@vskip 0pt plus 1filll - -@end titlepage - -@include grx2_0.tex - -@contents -@bye - diff --git a/thirdparty/grx249/doc/tex/grx2_0.tex b/thirdparty/grx249/doc/tex/grx2_0.tex deleted file mode 100644 index cead19a..0000000 --- a/thirdparty/grx249/doc/tex/grx2_0.tex +++ /dev/null @@ -1,2516 +0,0 @@ -@ifnottex -@node Top, A User Manual For GRX2, , -@comment node-name, next,previous, up - -@center @majorheading GRX 2.4.9 User's Manual - -@center @chapheading A 2D graphics library for DOS, Linux, X11 and Win32 -@end ifnottex - -@center Based on the original doc written by: Csaba Biegl on August 10, 1992 -@center Updated by: Mariano Alvarez Fernandez on August 17, 2000 -@center Last update: July 10, 2012 - -@unnumbered Abstract - - @strong{GRX} is a 2D graphics library originaly written by -Csaba Biegl for DJ Delorie's DOS port of the GCC compiler. Now it support -a big range of platforms, the main four are: DOS (DJGPPv2), Linux console, -X11 and Win32 (Mingw). On DOS it supports VGA, EGA and VESA compliant cards. -On Linux console it uses svgalib or the framebuffer. On X11 it must work on -any X11R5 (or later). From the 2.4 version, GRX comes with a Win32 driver. -The framebuffer Linux console driver was new in 2.4.2. From 2.4.7 there is a -support for x86_64 bits Linux machines and a support for an SDL driver -on MingW and X11. On MingW and X11 it runs on a window with the original -driver, and either full screen or on a window with the SDL driver. - -@menu -* A User Manual For GRX2:: -@end menu - -@c ----------------------------------------------------------------------------- -@node A User Manual For GRX2, Hello world, Top, Top -@unnumbered GRX2 User's Manual - -@menu -* Top:: -* Hello world:: -* Data types and function declarations:: -* Setting the graphics driver:: -* Setting video modes:: -* Graphics contexts:: -* Context use:: -* Color management:: -* Portable use of a few colors:: -* Graphics primitives:: -* Non-clipping graphics primitives:: -* Customized line drawing:: -* Pattern filled graphics primitives:: -* Patterned line drawing:: -* Image manipulation:: -* Text drawing:: -* Drawing in user coordinates:: -* Graphics cursors:: -* Keyboard input:: -* Mouse event handling:: -* Writing/reading PNM graphics files:: -* Writing/reading PNG graphics files:: -* Writing/reading JPEG graphics files:: -* Miscellaneous functions:: -* BGI interface:: -* Pascal interface:: -* References:: -@end menu - -@c ----------------------------------------------------------------------------- - -@node Hello world, Data types and function declarations, A User Manual For GRX2, A User Manual For GRX2 -@unnumberedsec Hello world -The next program draws a double frame around the screen and writes "Hello, GRX -world" centered. Then it waits after a key is pressed. - -@example -#include -#include -#include - -int main() -@{ - char *message = "Hello, GRX world"; - int x, y; - GrTextOption grt; - - GrSetMode( GR_default_graphics ); - - grt.txo_font = &GrDefaultFont; - grt.txo_fgcolor.v = GrWhite(); - grt.txo_bgcolor.v = GrBlack(); - grt.txo_direct = GR_TEXT_RIGHT; - grt.txo_xalign = GR_ALIGN_CENTER; - grt.txo_yalign = GR_ALIGN_CENTER; - grt.txo_chrtype = GR_BYTE_TEXT; - - GrBox( 0,0,GrMaxX(),GrMaxY(),GrWhite() ); - GrBox( 4,4,GrMaxX()-4,GrMaxY()-4,GrWhite() ); - - x = GrMaxX()/2; - y = GrMaxY()/2; - GrDrawString( message,strlen( message ),x,y,&grt ); - - GrKeyRead(); - - return 0; -@} - -@end example -How to compile the hello world (assuming the GRX library was -previously installed) -@example - DJGPP: gcc -o hellogrx.exe hellogrx.c -lgrx20 - Mingw: gcc -o hellogrx.exe hellogrx.c -lgrx20 -mwindows - X11 : gcc -o hellogrx hellogrx.c -D__XWIN__ -I/usr/X11R6/include - -lgrx20X -L/usr/X11R6/lib -lX11 - Linux: gcc -o hellogrx hellogrx.c -lgrx20 -lvga - - For the SDL driver: - Mingw: gcc -o hellogrx.exe hellogrx.c -lgrx20S -lSDL - X11 : gcc -o hellogrx hellogrx.c -D__XWIN__ -I/usr/X11R6/include - -lgrx20S -lSDL -lpthread -L/usr/X11R6/lib -lX11 - - For x86_64 systems add -m32 or -m64 for 32/64 bits executables - and replace /lib by /lib64 or /lib32 as needed - -@end example - -@c ----------------------------------------------------------------------------- -@node Data types and function declarations, Setting the graphics driver, Hello world, A User Manual For GRX2 -@unnumberedsec Data types and function declarations -All public data structures and graphics primitives meant for usage by the -application program are declared/prototyped in the header files (in the -'include' sub-directory): - -@example - * grdriver.h graphics driver format specifications - * grfontdv.h format of a font when loaded into memory - * grx20.h drawing-related structures and functions - * grxkeys.h platform independent key definitions - -User programs normally only include @strong{include/grx20.h} and @strong{include/grxkeys.h} -@end example - -@c ----------------------------------------------------------------------------- -@node Setting the graphics driver, Setting video modes, Data types and function declarations, A User Manual For GRX2 -@unnumberedsec Setting the graphics driver -The graphics driver is normally set by the final user by the environment -variable GRX20DRV, but a program can set it using: - -@example -int GrSetDriver(char *drvspec); -@end example - -The drvspec string has the same format as the environment variable: - -@example - gw gh nc -@end example - -Available drivers are for: - -@example -* DOS => herc, stdvga, stdega, et4000, cl5426, mach64, ati28800, s3, VESA, memory -* Linux => svgalib, linuxfb, memory -* X11 => xwin, memory -* Win32 => win32, memory -* SDL (Win32 and X11) => sdl::fs, sdl::ww, memory -@end example - -The xwin and win32 drivers are windowed. -The SDL driver on the same systems can be either fullscreen (::fs) or windowed (::ww). - -The optionals gw, gh and nc parameters set the desired default graphics mode. -Normal values for 'nc' are 2, 16, 256, 64K and 16M. The current driver name can -be obtained from: - -@example -GrCurrentVideoDriver()->name -@end example - -@c ----------------------------------------------------------------------------- -@node Setting video modes, Graphics contexts, Setting the graphics driver, A User Manual For GRX2 -@unnumberedsec Setting video modes - -Before a program can do any graphics drawing it has to configure the graphics -driver for the desired graphics mode. It is done with the GrSetMode function as -follows: - -@example -int GrSetMode(int which,...); -@end example - -On succes it returns non-zero (TRUE). The which parameter can be one of the -following constants, declared in grx20.h: - -@example -typedef enum _GR_graphicsModes @{ - GR_80_25_text, - GR_default_text, - GR_width_height_text, - GR_biggest_text, - GR_320_200_graphics, - GR_default_graphics, - GR_width_height_graphics, - GR_biggest_noninterlaced_graphics, - GR_biggest_graphics, - GR_width_height_color_graphics, - GR_width_height_color_text, - GR_custom_graphics, - GR_width_height_bpp_graphics, - GR_width_height_bpp_text, - GR_custom_bpp_graphics, - GR_NC_80_25_text, - GR_NC_default_text, - GR_NC_width_height_text, - GR_NC_biggest_text, - GR_NC_320_200_graphics, - GR_NC_default_graphics, - GR_NC_width_height_graphics, - GR_NC_biggest_noninterlaced_graphics, - GR_NC_biggest_graphics, - GR_NC_width_height_color_graphics, - GR_NC_width_height_color_text, - GR_NC_custom_graphics, - GR_NC_width_height_bpp_graphics, - GR_NC_width_height_bpp_text, - GR_NC_custom_bpp_graphics, -@} GrGraphicsMode; -@end example - -The GR_width_height_text and GR_width_height_graphics modes require the two -size arguments: int width and int height. - -The GR_width_height_color_graphics and GR_width_height_color_text modes -require three arguments: int width, int height and GrColor colors. - -The GR_width_height_bpp_graphics and GR_width_height_bpp_text modes require -three arguments: int width, int height and int bpp (bits per plane instead -number of colors). - -The GR_custom_graphics and GR_custom_bpp_graphics modes require five -arguments: int width, int height, GrColor colors or int bpp, int vx and int vy. -Using this modes you can set a virtual screen of vx by vy size. - -A call with any other mode does not require any arguments. - -The GR_NC_... modes are equivalent to the GR_.. ones, but they don't clear the -video memory. - -Graphics drivers can provide info of the supported graphics modes, use the -next code skeleton to colect the data: - -@example -@{ - GrFrameMode fm; - const GrVideoMode *mp; - for(fm =GR_firstGraphicsFrameMode; fm <= GR_lastGraphicsFrameMode; fm++) @{ - mp = GrFirstVideoMode(fm); - while( mp != NULL ) @{ - .. - .. use the mp info - .. - mp = GrNextVideoMode(mp)) - @} - @} -@} -@end example - -Don't worry if you don't understand it, normal user programs don't need to -know about FrameModes. The GrVideoMode structure has the following fields: - -@example -typedef struct _GR_videoMode GrVideoMode; - -struct _GR_videoMode @{ - char present; /* is it really available? */ - char bpp; /* log2 of # of colors */ - short width,height; /* video mode geometry */ - short mode; /* BIOS mode number (if any) */ - int lineoffset; /* scan line length */ - int privdata; /* driver can use it for anything */ - struct _GR_videoModeExt *extinfo; /* extra info (maybe shared) */ -@}; -@end example - -The width, height and bpp members are the useful information if you are -interested in set modes other than the GR_default_graphics. - -A user-defined function can be invoked every time the video mode is changed -(i.e. GrSetMode is called). This function should not take any parameters and -don't return any value. It can be installed (for all subsequent GrSetMode calls) -with the: - -@example -void GrSetModeHook(void (*hookfunc)(void)); -@end example - -function. The current graphics mode (one of the valid mode argument values for -GrSetMode) can be obtained with the: - -@example -GrGraphicsMode GrCurrentMode(void); -@end example - -function, while the type of the installed graphics adapter can be determined -with the: - -@example -GrVideoAdapter GrAdapterType(void); -@end example - -function. GrAdapterType returns the type of the adapter as one of the following -symbolic constants (defined in grx20.h): - -@example -typedef enum _GR_videoAdapters @{ - GR_UNKNOWN = (-1), /* not known (before driver set) */ - GR_VGA, /* VGA adapter */ - GR_EGA, /* EGA adapter */ - GR_HERC, /* Hercules mono adapter */ - GR_8514A, /* 8514A or compatible */ - GR_S3, /* S3 graphics accelerator */ - GR_XWIN, /* X11 driver */ - GR_WIN32, /* WIN32 driver */ - GR_LNXFB, /* Linux framebuffer */ - GR_SDL, /* SDL driver */ - GR_MEM /* memory only driver */ -@} GrVideoAdapter; -@end example - -Note that the VESA driver return GR_VGA here. - -@c ----------------------------------------------------------------------------- -@node Graphics contexts, Context use, Setting video modes, A User Manual For GRX2 -@unnumberedsec Graphics contexts - - -The library supports a set of drawing regions called contexts (the GrContext -structure). These can be in video memory or in system memory. Contexts in system -memory always have the same memory organization as the video memory. When -GrSetMode is called, a default context is created which maps to the whole -graphics screen. Contexts are described by the GrContext data structure: - -@example -typedef struct _GR_context GrContext; - -struct _GR_context @{ - struct _GR_frame gc_frame; /* frame buffer info */ - struct _GR_context *gc_root; /* context which owns frame */ - int gc_xmax; /* max X coord (width - 1) */ - int gc_ymax; /* max Y coord (height - 1) */ - int gc_xoffset; /* X offset from root's base */ - int gc_yoffset; /* Y offset from root's base */ - int gc_xcliplo; /* low X clipping limit */ - int gc_ycliplo; /* low Y clipping limit */ - int gc_xcliphi; /* high X clipping limit */ - int gc_ycliphi; /* high Y clipping limit */ - int gc_usrxbase; /* user window min X coordinate */ - int gc_usrybase; /* user window min Y coordinate */ - int gc_usrwidth; /* user window width */ - int gc_usrheight; /* user window height */ -# define gc_baseaddr gc_frame.gf_baseaddr -# define gc_selector gc_frame.gf_selector -# define gc_onscreen gc_frame.gf_onscreen -# define gc_memflags gc_frame.gf_memflags -# define gc_lineoffset gc_frame.gf_lineoffset -# define gc_driver gc_frame.gf_driver -@}; -@end example - -The following four functions return information about the layout of and memory -occupied by a graphics context of size width by height in the current graphics -mode (as set up by GrSetMode): - -@example -int GrLineOffset(int width); -int GrNumPlanes(void); -long GrPlaneSize(int w,int h); -long GrContextSize(int w,int h); -@end example - -GrLineOffset always returns the offset between successive pixel rows of the -context in bytes. GrNumPlanes returns the number of bitmap planes in the current -graphics mode. GrContextSize calculates the total amount of memory needed by a -context, while GrPlaneSize calculates the size of a bitplane in the context. The -function: - -@example -GrContext *GrCreateContext(int w,int h,char far *memory[4],GrContext *where); -@end example - -can be used to create a new context in system memory. The NULL pointer is also -accepted as the value of the memory and where arguments, in this case the -library allocates the necessary amount of memory internally. It is a general -convention in the library that functions returning pointers to any GRX -specific data structure have a last argument (most of the time named where in -the prototypes) which can be used to pass the address of the data structure -which should be filled with the result. If this where pointer has the value of -NULL, then the library allocates space for the data structure internally. - -The memory argument is really a 4 pointer array, each pointer must point to -space to handle GrPlaneSize(w,h) bytes, really only GrNumPlanes() pointers must -be malloced, the rest can be NULL. Nevertheless the normal use (see below) is - -@example -gc = GrCreateContext(w,h,NULL,NULL); -@end example - -so yo don't need to care about. - -The function: -@example - -GrContext *GrCreateSubContext(int x1,int y1,int x2,int y2, - const GrContext *parent,GrContext *where); -@end example - -creates a new sub-context which maps to a part of an existing context. The -coordinate arguments (x1 through y2) are interpreted relative to the parent -context's limits. Pixel addressing is zero-based even in sub-contexts, i.e. the -address of the top left pixel is (0,0) even in a sub-context which has been -mapped onto the interior of its parent context. - -Sub-contexts can be resized, but not their parents (i.e. anything returned by -GrCreateContext or set up by GrSetMode cannot be resized -- because this could -lead to irrecoverable "loss" of drawing memory. The following function can be -used for this purpose: - -@example -void GrResizeSubContext(GrContext *context,int x1,int y1,int x2,int y2); -@end example - -The current context structure is stored in a static location in the library. -(For efficiency reasons -- it is used quite frequently, and this way no pointer -dereferencing is necessary.) The context stores all relevant information about -the video organization, coordinate limits, etc... The current context can be set -with the: - -@example -void GrSetContext(const GrContext *context); -@end example - -function. This function will reset the current context to the full graphics -screen if it is passed the NULL pointer as argument. The value of the current -context can be saved into a GrContext structure pointed to by where using: - -@example -GrContext *GrSaveContext(GrContext *where); -@end example - -(Again, if where is NULL, the library allocates the space.) The next two -functions: - -@example -const GrContext *GrCurrentContext(void); -const GrContext *GrScreenContext(void); -@end example - -return the current context and the screen context respectively. Contexts can be -destroyed with: - -@example -void GrDestroyContext(GrContext *context); -@end example - -This function will free the memory occupied by the context only if it was -allocated originally by the library. The next three functions set up and query -the clipping limits associated with the current context: - -@example -void GrSetClipBox(int x1,int y1,int x2,int y2); -void GrGetClipBox(int *x1p,int *y1p,int *x2p,int *y2p); -void GrResetClipBox(void); -@end example - -GrResetClipBox sets the clipping limits to the limits of context. These are -the limits set up initially when a context is created. There are three similar -functions to sets/gets the clipping limits of any context: - -@example -void GrSetClipBoxC(GrContext *c,int x1,int y1,int x2,int y2); -void GrGetClipBoxC(const GrContext *c,int *x1p,int *y1p,int *x2p,int *y2p); -void GrResetClipBoxC(GrContext *c); -@end example - -The limits of the current context can be obtained using the following -functions: - -@example -int GrMaxX(void); -int GrMaxY(void); -int GrSizeX(void); -int GrSizeY(void); -@end example - -The Max functions return the biggest valid coordinate, while the Size -functions return a value one higher. The limits of the graphics screen -(regardless of the current context) can be obtained with: - -@example -int GrScreenX(void); -int GrScreenY(void); -@end example - -If you had set a virtual screen (using a custom graphics mode), the limits of -the virtual screen can be fetched with: - -@example -int GrVirtualX(void); -int GrVirtualY(void); -@end example - -The routine: - -@example -int GrScreenIsVirtual(void); -@end example - -returns non zero if a virtual screen is set. The rectangle showed in the real -screen can be set with: - -@example -int GrSetViewport(int xpos,int ypos); -@end example - -and the current viewport position can be obtained by: - -@example -int GrViewportX(void); -int GrViewportY(void); -@end example - -@c ----------------------------------------------------------------------------- -@node Context use, Color management, Graphics contexts, A User Manual For GRX2 -@unnumberedsec Context use - - -Here is a example of normal context use: - -@example -GrContext *grc; - -if( (grc = GrCreateContext( w,h,NULL,NULL )) == NULL )@{ - ...process the error - @} -else @{ - GrSetContext( grc ); - ...do some drawing - ...and probably bitblt to the screen context - GrSetContext( NULL ); /* the screen context! */ - GrDestroyContext( grc ); - @} - -@end example - -But if you have a GrContext variable (not a pointer) you want to use (probably -because is static to some routines) you can do: - -@example -static GrContext grc; /* not a pointer!! */ - -if( GrCreateContext( w,h,NULL,&grc )) == NULL ) @{ - ...process the error - @} -else @{ - GrSetContext( &grc ); - ...do some drawing - ...and probably bitblt to the screen context - GrSetContext( NULL ); /* the screen context! */ - GrDestroyContext( &grc ); - @} - -@end example - -Note that GrDestoryContext knows if grc was automatically malloced or not!! - -Only if you don't want GrCreateContext use malloc at all, you must allocate -the memory buffers and pass it to GrCreateContext. - -Using GrCreateSubContext is the same, except it doesn't need the buffer, -because it uses the parent buffer. - -See the @strong{test/winclip.c} and @strong{test/wintest.c} examples. - -@c ----------------------------------------------------------------------------- -@node Color management, Portable use of a few colors, Context use, A User Manual For GRX2 -@unnumberedsec Color management - -GRX defines the type GrColor for color variables. GrColor it's a 32 bits -integer. The 8 left bits are reserved for the write mode (see below). The 24 -bits right are the color value. - -The library supports two models for color management. In the 'indirect' (or -color table) model, color values are indices to a color table. The color table -slots will be allocated with the highest resolution supported by the hardware -(EGA: 2 bits, VGA: 6 bits) with respect to the component color intensities. In -the 'direct' (or RGB) model, color values map directly into component color -intensities with non-overlapping bitfields of the color index representing the -component colors. - -Color table model is supported until 256 color modes. The RGB model is -supported in 256 color and up color modes. - -In RGB model the color index map to component color intensities depend on the -video mode set, so it can't be assumed the component color bitfields (but if you -are curious check the GrColorInfo global structure in grx20.h). - -After the first GrSetMode call two colors are always defined: black and white. -The color values of these two colors are returned by the functions: - -@example -GrColor GrBlack(void); -GrColor GrWhite(void); -@end example - -GrBlack() is guaranteed to be 0. - -The library supports five write modes (a write mode descibes the operation -between the actual bit color and the one to be set): write, XOR, logical OR, -logical AND and IMAGE. These can be selected with OR-ing the color value with -one of the following constants declared in grx20.h : - -@example -#define GrWRITE 0UL /* write color */ -#define GrXOR 0x01000000UL /* to "XOR" any color to the screen */ -#define GrOR 0x02000000UL /* to "OR" to the screen */ -#define GrAND 0x03000000UL /* to "AND" to the screen */ -#define GrIMAGE 0x04000000UL /* blit: write, except given color */ -@end example - -The GrIMAGE write mode only works with the bitblt function. -By convention, the no-op color is obtained by combining color value 0 (black) -with the XOR operation. This no-op color has been defined in grx20.h as: - -@example -#define GrNOCOLOR (GrXOR | 0) /* GrNOCOLOR is used for "no" color */ -@end example - -The write mode part and the color value part of a GrColor variable can be -obtained OR-ing it with one of the following constants declared in grx20.h: - -@example -#define GrCVALUEMASK 0x00ffffffUL /* color value mask */ -#define GrCMODEMASK 0xff000000UL /* color operation mask */ -@end example - -The number of colors in the current graphics mode is returned by the: - -@example -GrColor GrNumColors(void); -@end example - -function, while the number of unused, available color can be obtained by -calling: - -@example -GrColor GrNumFreeColors(void); -@end example - -Colors can be allocated with the: - -@example -GrColor GrAllocColor(int r,int g,int b); -GrColor GrAllocColor2(long hcolor); -@end example - -functions (component intensities can range from 0 to 255, -hcolor must be in 0xRRGGBB format), or with the: - -@example -GrColor GrAllocCell(void); -@end example - -function. In the second case the component intensities of the returned color can -be set with: - -@example -void GrSetColor(GrColor color,int r,int g,int b); -@end example - -In the color table model both Alloc functions return GrNOCOLOR if there are no -more free colors available. In the RGB model GrNumFreeColors returns 0 and -GrAllocCell always returns GrNOCOLOR, as colors returned by GrAllocCell are -meant to be changed -- what is not supposed to be done in RGB mode. Also note -that GrAllocColor operates much more efficiently in RGB mode, and that it never -returns GrNOCOLOR in this case. - -Color table entries can be freed (when not in RGB mode) by calling: - -@example -void GrFreeColor(GrColor color); -@end example - -The component intensities of any color can be queried using one of this function: - -@example -void GrQueryColor(GrColor c,int *r,int *g,int *b); -void GrQueryColor2(GrColor c,long *hcolor); -@end example - -Initially the color system is in color table (indirect) model if there are 256 -or less colors. 256 color modes can be put into the RGB model by calling: - -@example -void GrSetRGBcolorMode(void); -@end example - -The color system can be reset (i.e. put back into color table model if -possible, all colors freed except for black and white) by calling: - -@example -void GrResetColors(void); -@end example - -The function: - -@example -void GrRefreshColors(void); -@end example - -reloads the currently allocated color values into the video hardware. This -function is not needed in typical applications, unless the display adapter is -programmed directly by the application. - -This functions: - -@example -GrColor GrAllocColorID(int r,int g,int b); -GrColor GrAllocColor2ID(long hcolor); -void GrQueryColorID(GrColor c,int *r,int *g,int *b); -void GrQueryColor2ID(GrColor c,long *hcolor); -@end example - -are inlined versions (except if you compile GRX with GRX_SKIP_INLINES defined) -to be used in the RGB model (in the color table model they call the normal -routines). - -See the @strong{test/rgbtest.c} and @strong{test/colorops.c} examples. - - -@c ----------------------------------------------------------------------------- -@node Portable use of a few colors, Graphics primitives, Color management, A User Manual For GRX2 -@unnumberedsec Portable use of a few colors - -People that only want to use a few colors find the GRX color handling a bit -confusing, but it gives the power to manage a lot of color deeps and two color -models. Here are some guidelines to easily use the famous 16 ega colors in GRX -programs. We need this GRX function: - -@example -GrColor *GrAllocEgaColors(void); -@end example - -it returns a 16 GrColor array with the 16 ega colors alloced (really it's a -trivial function, read the source src/setup/colorega.c). We can use a -construction like that: - -First, in your C code make a global pointer, and init it after set the -graphics mode: - -@example -GrColor *egacolors; -.... -int your_setup_function( ... ) -@{ - ... - GrSetMode( ... ) - ... - egacolors = GrAllocEgaColors(); - ... -@} - -@end example - -Next, add this to your main include file: - -@example -extern GrColor *egacolors; -#define BLACK egacolors[0] -#define BLUE egacolors[1] -#define GREEN egacolors[2] -#define CYAN egacolors[3] -#define RED egacolors[4] -#define MAGENTA egacolors[5] -#define BROWN egacolors[6] -#define LIGHTGRAY egacolors[7] -#define DARKGRAY egacolors[8] -#define LIGHTBLUE egacolors[9] -#define LIGHTGREEN egacolors[10] -#define LIGHTCYAN egacolors[11] -#define LIGHTRED egacolors[12] -#define LIGHTMAGENTA egacolors[13] -#define YELLOW egacolors[14] -#define WHITE egacolors[15] -@end example - -Now you can use the defined colors in your code. Note that if you are in color -table model in a 16 color mode, you have exhausted the color table. Note too -that this don't work to initialize static variables with a color, because -egacolors is not initialized. - - -@c ----------------------------------------------------------------------------- -@node Graphics primitives, Non-clipping graphics primitives, Portable use of a few colors, A User Manual For GRX2 -@unnumberedsec Graphics primitives - -The screen, the current context or the current clip box can be cleared (i.e. -set to a desired background color) by using one of the following three -functions: - -@example -void GrClearScreen(GrColor bg); -void GrClearContext(GrColor bg); -void GrClearClipBox(GrColor bg); -@end example - -Any context can be cleared using this function: -@example -void GrClearContextC(GrContext *ctx, GrColor bg); -@end example - -Thanks to the special GrColor definition, you can do more than simple clear -with this functions, by example with: - -@example -GrClearScreen( GrWhite()|GrXOR ); -@end example - -the graphics screen is negativized, do it again and the screen is restored. - -The following line drawing graphics primitives are supported by the library: - -@example -void GrPlot(int x,int y,GrColor c); -void GrLine(int x1,int y1,int x2,int y2,GrColor c); -void GrHLine(int x1,int x2,int y,GrColor c); -void GrVLine(int x,int y1,int y2,GrColor c); -void GrBox(int x1,int y1,int x2,int y2,GrColor c); -void GrCircle(int xc,int yc,int r,GrColor c); -void GrEllipse(int xc,int yc,int xa,int ya,GrColor c); -void GrCircleArc(int xc,int yc,int r,int start,int end,int style,GrColor c); -void GrEllipseArc(int xc,int yc,int xa,int ya, - int start,int end,int style,GrColor c); -void GrPolyLine(int numpts,int points[][2],GrColor c); -void GrPolygon(int numpts,int points[][2],GrColor c); -@end example - -All primitives operate on the current graphics context. The last argument of -these functions is always the color to use for the drawing. The HLine and VLine -primitives are for drawing horizontal and vertical lines. They have been -included in the library because they are more efficient than the general line -drawing provided by GrLine. The ellipse primitives can only draw ellipses with -their major axis parallel with either the X or Y coordinate axis. They take the -half X and Y axis length in the xa and ya arguments. The arc (circle and -ellipse) drawing functions take the start and end angles in tenths of degrees -(i.e. meaningful range: 0 ... 3600). The angles are interpreted -counter-clockwise starting from the positive X axis. The style argument can be -one of this defines from grx20.h: - -@example -#define GR_ARC_STYLE_OPEN 0 -#define GR_ARC_STYLE_CLOSE1 1 -#define GR_ARC_STYLE_CLOSE2 2 -@end example - -GR_ARC_STYLE_OPEN draws only the arc, GR_ARC_STYLE_CLOSE1 closes the arc with -a line between his start and end point, GR_ARC_STYLE_CLOSE1 draws the typical -cake slice. This routine: - -@example -void GrLastArcCoords(int *xs,int *ys,int *xe,int *ye,int *xc,int *yc); -@end example - -can be used to retrieve the start, end, and center points used by the last arc -drawing functions. - -See the @strong{test/circtest.c} and @strong{test/arctest.c} examples. - -The polyline and polygon primitives take the address of an n by 2 coordinate -array. The X values should be stored in the elements with 0 second index, and -the Y values in the elements with a second index value of 1. Coordinate arrays -passed to the polygon primitive can either contain or omit the closing edge of -the polygon -- the primitive will append it to the list if it is missing. - -See the @strong{test/polytest.c} example. - -Because calculating the arc points it's a very time consuming operation, there -are two functions to pre-calculate the points, that can be used next with -polyline and polygon primitives: - -@example -int GrGenerateEllipse(int xc,int yc,int xa,int ya, - int points[GR_MAX_ELLIPSE_POINTS][2]); -int GrGenerateEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int points[GR_MAX_ELLIPSE_POINTS][2]); -@end example - -The following filled primitives are available: - -@example -void GrFilledBox(int x1,int y1,int x2,int y2,GrColor c); -void GrFramedBox(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c); -void GrFilledCircle(int xc,int yc,int r,GrColor c); -void GrFilledEllipse(int xc,int yc,int xa,int ya,GrColor c); -void GrFilledCircleArc(int xc,int yc,int r, - int start,int end,int style,GrColor c); -void GrFilledEllipseArc(int xc,int yc,int xa,int ya, - int start,int end,int style,GrColor c); -void GrFilledPolygon(int numpts,int points[][2],GrColor c); -void GrFilledConvexPolygon(int numpts,int points[][2],GrColor c); -@end example - -Similarly to the line drawing, all of the above primitives operate on the -current graphics context. The GrFramedBox primitive can be used to draw -motif-like shaded boxes and "ordinary" framed boxes as well. The x1 through y2 -coordinates specify the interior of the box, the border is outside this area, -wdt pixels wide. The primitive uses five different colors for the interior and -four borders of the box which are specified in the GrFBoxColors structure: - -@example -typedef struct @{ - GrColor fbx_intcolor; - GrColor fbx_topcolor; - GrColor fbx_rightcolor; - GrColor fbx_bottomcolor; - GrColor fbx_leftcolor; -@} GrFBoxColors; -@end example - -The GrFilledConvexPolygon primitive can be used to fill convex polygons. It -can also be used to fill some concave polygons whose boundaries do not intersect -any horizontal scan line more than twice. All other concave polygons have to be -filled with the (somewhat less efficient) GrFilledPolygon primitive. This -primitive can also be used to fill several disjoint non­overlapping polygons in -a single operation. - -The function: - -@example -void GrFloodFill(int x, int y, GrColor border, GrColor c); -@end example - -flood-fills the area bounded by the color border using x, y like the starting -point. - -Floodspill is a color replacer, replacing color A with color B. -This is quite useful for highlighting a selected item in a list, or changing -a selected color(s) in a multi colored area. - -@example -void GrFloodSpill(int x1, int y1, int x2, int y2, - GrColor old_c, GrColor new_c) -@end example - -replaces old color with new color in the rectangle bounded by x1, y1, x2, y2. - -@example -void GrFloodSpillC(GrContext *ctx, int x1, int y1, int x2, int y2, - GrColor old_c, GrColor new_c) -@end example - -as above but in the specified context. - -@example -void GrFloodSpill2(int x1, int y1, int x2, int y2, - GrColor old_c1, GrColor new_c1, - GrColor old_c2, GrColor new_c2) -@end example - -replaces 2 colors, a one stop shop for highlighting a selection in a list. - -@example -void GrFloodSpillC2(GrContext *ctx, int x1, int y1, int x2, int y2, - GrColor old_c1, GrColor new_c1, - GrColor old_c2, GrColor new_c2) -@end example - -as above but in the specified context. - -The current color value of any pixel in the current context can be obtained -with: - -@example -GrColor GrPixel(int x,int y); -@end example - -and: - -@example -GrColor GrPixelC(GrContext *c,int x,int y); -@end example - -do the same for any context. - -Rectangular areas can be transferred within a context or between contexts by -calling: - -@example -void GrBitBlt(GrContext *dest,int x,int y,GrContext *source, - int x1,int y1,int x2,int y2,GrColor op); -@end example - -x, y is the position in the destination context, and x1, y1, x2, y2 the area -from the source context to be transfered. The op argument should be one of -supported color write modes (GrWRITE, GrXOR, GrOR, GrAND, GrIMAGE), it will -control how the pixels from the source context are combined with the pixels in -the destination context (the GrIMAGE op must be ored with the color value to be -handled as transparent). If either the source or the destination context -argument is the NULL pointer then the current context is used for that argument. - -See the @strong{test/blittest.c} example. - -A efficient form to get/put pixels from/to a context can be achieved using the -next functions: - -@example -const GrColor *GrGetScanline(int x1,int x2,int yy); -const GrColor *GrGetScanlineC(GrContext *ctx,int x1,int x2,int yy); -void GrPutScanline(int x1,int x2,int yy,const GrColor *c, GrColor op); -@end example - -The Get functions return a pointer to a static GrColor pixel array (or NULL if -they fail) with the color values of a row (yy) segment (x1 to x2). GrGetScanline -uses the current context. GrGestScanlineC uses the context ctx (that can be NULL -to refer to the current context). Note that the output is only valid until the -next GRX call. - -GrPutScanline puts the GrColor pixel array c on the yy row segmet defined by -x1 to x2 in the current context using the op operation. op can be any of -GrWRITE, GrXOR, GrOR, GrAND or GrIMAGE. Data in c must fit GrCVALUEMASK -otherwise the results are implementation dependend. So you can't supply -operation code with the pixel data!. - -@c ----------------------------------------------------------------------------- -@node Non-clipping graphics primitives, Customized line drawing, Graphics primitives, A User Manual For GRX2 -@unnumberedsec Non-clipping graphics primitives - -There is a non-clipping version of some of the elementary primitives. These -are somewhat more efficient than the regular versions. These are to be used only -in situations when it is absolutely certain that no drawing will be performed -beyond the boundaries of the current context. Otherwise the program will almost -certainly crash! The reason for including these functions is that they are -somewhat more efficient than the regular, clipping versions. ALSO NOTE: These -function do not check for conflicts with the mouse cursor. (See the explanation -about the mouse cursor handling later in this document.) The list of the -supported non-clipping primitives: - -@example -void GrPlotNC(int x,int y,GrColor c); -void GrLineNC(int x1,int y1,int x2,int y2,GrColor c); -void GrHLineNC(int x1,int x2,int y,GrColor c); -void GrVLineNC(int x,int y1,int y2,GrColor c); -void GrBoxNC(int x1,int y1,int x2,int y2,GrColor c); -void GrFilledBoxNC(int x1,int y1,int x2,int y2,GrColor c); -void GrFramedBoxNC(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c); -void grbitbltNC(GrContext *dst,int x,int y,GrContext *src, - int x1,int y1,int x2,int y2,GrColor op); -GrColor GrPixelNC(int x,int y); -GrColor GrPixelCNC(GrContext *c,int x,int y); -@end example - -@c ----------------------------------------------------------------------------- -@node Customized line drawing, Pattern filled graphics primitives, Non-clipping graphics primitives, A User Manual For GRX2 -@unnumberedsec Customized line drawing - -The basic line drawing graphics primitives described previously always draw -continuous lines which are one pixel wide. There is another group of line -drawing functions which can be used to draw wide and/or patterned lines. These -functions have similar parameter passing conventions as the basic ones with one -difference: instead of the color value a pointer to a structure of type -GrLineOption has to be passed to them. The definition of the GrLineOption -structure: - -@example -typedef struct @{ - GrColor lno_color; /* color used to draw line */ - int lno_width; /* width of the line */ - int lno_pattlen; /* length of the dash pattern */ - unsigned char *lno_dashpat; /* draw/nodraw pattern */ -@} GrLineOption; -@end example - -The lno_pattlen structure element should be equal to the number of alternating -draw -- no draw section length values in the array pointed to by the lno_dashpat -element. The dash pattern array is assumed to begin with a drawn section. If the -pattern length is equal to zero a continuous line is drawn. - -Example, a white line 3 bits wide (thick) and pattern 6 bits draw, 4 bits nodraw: - -@example -GrLineOption mylineop; -... -mylineop.lno_color = GrWhite(); -mylineop.lno_width = 3; -mylineop.lno_pattlen = 2; -mylineop.lno_dashpat = "\x06\x04"; -@end example - -The available custom line drawing primitives: - -@example -void GrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrCustomCircle(int xc,int yc,int r,const GrLineOption *o); -void GrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *o); -void GrCustomCircleArc(int xc,int yc,int r, - int start,int end,int style,const GrLineOption *o); -void GrCustomEllipseArc(int xc,int yc,int xa,int ya, - int start,int end,int style,const GrLineOption *o); -void GrCustomPolyLine(int numpts,int points[][2],const GrLineOption *o); -void GrCustomPolygon(int numpts,int points[][2],const GrLineOption *o); -@end example - -See the @strong{test/linetest.c} example. - -@c ----------------------------------------------------------------------------- -@node Pattern filled graphics primitives, Patterned line drawing, Customized line drawing, A User Manual For GRX2 -@unnumberedsec Pattern filled graphics primitives - -The library also supports a pattern filled version of the basic filled -primitives described above. These functions have similar parameter passing -conventions as the basic ones with one difference: instead of the color value a -pointer to an union of type 'GrPattern' has to be passed to them. The GrPattern -union can contain either a bitmap or a pixmap fill pattern. The first integer -slot in the union determines which type it is. Bitmap fill patterns are -rectangular arrays of bits, each set bit representing the foreground color of -the fill operation, and each zero bit representing the background. Both the -foreground and background colors can be combined with any of the supported -logical operations. Bitmap fill patterns have one restriction: their width must -be eight pixels. Pixmap fill patterns are very similar to contexts. The relevant -structure declarations (from grx20.h): - -@example -/* - * BITMAP: a mode independent way to specify a fill pattern of two - * colors. It is always 8 pixels wide (1 byte per scan line), its - * height is user-defined. SET THE TYPE FLAG TO ZERO!!! - */ -typedef struct _GR_bitmap @{ - int bmp_ispixmap; /* type flag for pattern union */ - int bmp_height; /* bitmap height */ - char *bmp_data; /* pointer to the bit pattern */ - GrColor bmp_fgcolor; /* foreground color for fill */ - GrColor bmp_bgcolor; /* background color for fill */ - int bmp_memflags; /* set if dynamically allocated */ -@} GrBitmap; - -/* - * PIXMAP: a fill pattern stored in a layout identical to the video RAM - * for filling using 'bitblt'-s. It is mode dependent, typically one - * of the library functions is used to build it. KEEP THE TYPE FLAG - * NONZERO!!! - */ -typedef struct _GR_pixmap @{ - int pxp_ispixmap; /* type flag for pattern union */ - int pxp_width; /* pixmap width (in pixels) */ - int pxp_height; /* pixmap height (in pixels) */ - GrColor pxp_oper; /* bitblt mode (SET, OR, XOR, AND, IMAGE) */ - struct _GR_frame pxp_source; /* source context for fill */ -@} GrPixmap; - -/* - * Fill pattern union -- can either be a bitmap or a pixmap - */ -typedef union _GR_pattern @{ - int gp_ispixmap; /* nonzero for pixmaps */ - GrBitmap gp_bitmap; /* fill bitmap */ - GrPixmap gp_pixmap; /* fill pixmap */ -@} GrPattern; - -@end example - -This define group (from grx20.h) help to acces the GrPattern menbers: - -@example -#define gp_bmp_data gp_bitmap.bmp_data -#define gp_bmp_height gp_bitmap.bmp_height -#define gp_bmp_fgcolor gp_bitmap.bmp_fgcolor -#define gp_bmp_bgcolor gp_bitmap.bmp_bgcolor - -#define gp_pxp_width gp_pixmap.pxp_width -#define gp_pxp_height gp_pixmap.pxp_height -#define gp_pxp_oper gp_pixmap.pxp_oper -#define gp_pxp_source gp_pixmap.pxp_source -@end example - -Bitmap patterns can be easily built from initialized character arrays and -static structures by the C compiler, thus no special support is included in the -library for creating them. The only action required from the application program -might be changing the foreground and background colors as needed. Pixmap -patterns are more difficult to build as they replicate the layout of the video -memory which changes for different video modes. For this reason the library -provides three functions to create pixmap patterns in a mode-independent way: - -@example -GrPattern *GrBuildPixmap(const char *pixels,int w,int h,const GrColorTableP colors); -GrPattern *GrBuildPixmapFromBits(const char *bits,int w,int h, - GrColor fgc,GrColor bgc); -GrPattern *GrConvertToPixmap(GrContext *src); -@end example - -GrBuildPixmap build a pixmap from a two dimensional (w by h) array of -characters. The elements in this array are used as indices into the color table -specified with the argument colors. (This means that pixmaps created this way -can use at most 256 colors.) The color table pointer: - -@example -typedef GrColor *GrColorTableP; -@end example - -should point to an array of integers with the first element being the number of -colors in the table and the color values themselves starting with the second -element. NOTE: any color modifiers (GrXOR, GrOR, GrAND) OR-ed to the elements of -the color table are ignored. - -The GrBuildPixmapFromBits function builds a pixmap fill pattern from bitmap -data. It is useful if the width of the bitmap pattern is not eight as such -bitmap patterns can not be used to build a GrBitmap structure. - -The GrConvertToPixmap function converts a graphics context to a pixmap fill -pattern. It is useful when the pattern can be created with graphics drawing -operations. NOTE: the pixmap pattern and the original context share the drawing -RAM, thus if the context is redrawn the fill pattern changes as well. Fill -patterns which were built by library routines can be destroyed when no longer -needed (i.e. the space occupied by them can be freed) by calling: - -@example -void GrDestroyPattern(GrPattern *p); -@end example - -NOTE: when pixmap fill patterns converted from contexts are destroyed, the -drawing RAM is not freed. It is freed when the original context is destroyed. -Fill patterns built by the application have to be destroyed by the application -as well (if this is needed). - -The list of supported pattern filled graphics primitives is shown below. These -functions are very similar to their solid filled counterparts, only their last -argument is different: - -@example -void GrPatternFilledPlot(int x,int y,GrPattern *p); -void GrPatternFilledLine(int x1,int y1,int x2,int y2,GrPattern *p); -void GrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p); -void GrPatternFilledCircle(int xc,int yc,int r,GrPattern *p); -void GrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p); -void GrPatternFilledCircleArc(int xc,int yc,int r,int start,int end, - int style,GrPattern *p); -void GrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,GrPattern *p); -void GrPatternFilledConvexPolygon(int numpts,int points[][2],GrPattern *p); -void GrPatternFilledPolygon(int numpts,int points[][2],GrPattern *p); -void GrPatternFloodFill(int x, int y, GrColor border, GrPattern *p); -@end example - -Strictly speaking the plot and line functions in the above group are not -filled, but they have been included here for convenience. - -@c ----------------------------------------------------------------------------- -@node Patterned line drawing, Image manipulation, Pattern filled graphics primitives, A User Manual For GRX2 -@unnumberedsec Patterned line drawing - -The custom line drawing functions introduced above also have a version when -the drawn sections can be filled with a (pixmap or bitmap) fill pattern. To -achieve this these functions must be passed both a custom line drawing option -(GrLineOption structure) and a fill pattern (GrPattern union). These two have -been combined into the GrLinePattern structure: - -@example -typedef struct @{ - GrPattern *lnp_pattern; /* fill pattern */ - GrLineOption *lnp_option; /* width + dash pattern */ -@} GrLinePattern; - -@end example - -All patterned line drawing functions take a pointer to this structure as their -last argument. The list of available functions: - -@example -void GrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp); -void GrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp); -void GrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp); -void GrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp); -void GrPatternedCircleArc(int xc,int yc,int r,int start,int end, - int style,GrLinePattern *lp); -void GrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,GrLinePattern *lp); -void GrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp); -void GrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp); - -@end example - -@c ----------------------------------------------------------------------------- -@node Image manipulation, Text drawing, Patterned line drawing, A User Manual For GRX2 -@unnumberedsec Image manipulation - -GRX defines the GrImage type like a GrPixmap synonym: - -@example -#define GrImage GrPixmap -@end example - -nevertheless the GrImage type enforces the image character of this object, so -for compatibility with future GRX versions use the next functions if you need to -convert between GrImage and GrPixmap objects: - -@example -GrImage *GrImageFromPattern(GrPattern *p); -GrPattern *GrPatternFromImage(GrImage *p); -@end example - -the GrImageFromPattern function returns NULL if the GrPattern given is not a -GrPixmap. - -Like pixmaps patterns images are dependent of the actual video mode set. So -the library provides functions to create images in a mode-independent way: - -@example -GrImage *GrImageBuild(const char *pixels,int w,int h,const GrColorTableP colors); -GrImage *GrImageFromContext(GrContext *c); -@end example - -these functions work like the GrBuildPixmap and GrConvertToPixmap ones. -Remember: the image and the original context share the drawing RAM. - -There are a number of functions to display all or part of an image in the -current context: - -@example -void GrImageDisplay(int x,int y, GrImage *i); -void GrImageDisplayExt(int x1,int y1,int x2,int y2, GrImage *i); -void GrImageFilledBoxAlign(int xo,int yo,int x1,int y1,int x2,int y2, - GrImage *p); -void GrImageHLineAlign(int xo,int yo,int x,int y,int width,GrImage *p); -void GrImagePlotAlign(int xo,int yo,int x,int y,GrImage *p); -@end example - -GrImageDisplay display the whole image using x, y like the upper left corner -in the current context. GrImageDisplayExt display as much as it can (repiting -the image if necesary) in the rectangle defined by x1, y1 and x2, y2. - -GrImageFilledBoxAlign is a most general funtion (really the later two call it) -display as much as it can in the defined rectangle using xo, yo like the align -point, it is the virtual point in the destination context (it doesn't need to be -into the rectangle) with that the upper left image corner is aligned. - -GrImageHLineAlign and GrImagePlotAlign display a row segment or a point of the -image at x y position using the xo, yo allign point. - -The most usefull image funtions are these: - -@example -GrImage *GrImageInverse(GrImage *p,int flag); -GrImage *GrImageStretch(GrImage *p,int nwidth,int nheight); -@end example - -GrImageInverse creates a new image object, flipping p left-right or top-down -as indicated by flag that can be: - -@example -#define GR_IMAGE_INVERSE_LR 0x01 /* inverse left right */ -#define GR_IMAGE_INVERSE_TD 0x02 /* inverse top down */ -@end example - -GrImageStretch creates a new image stretching p to nwidth by nheight. - -To destroy a image objet when you don't need it any more use: - -@example -void GrImageDestroy(GrImage *i); -@end example - -See the @strong{test/imgtest.c} example. - -@c ----------------------------------------------------------------------------- -@node Text drawing, Drawing in user coordinates, Image manipulation, A User Manual For GRX2 -@unnumberedsec Text drawing - -The library supports loadable fonts. When in memory they are bit-mapped (i.e. -not scalable!) fonts. A driver design allow GRX to load different font formats, -the last GRX release come with drivers to load the GRX own font format and the -BGI Borland format for all platforms supported, the X11 version can load X11 -fonts too. - -The GRX distribution come with a font collection in the GRX own format. Some -of these fonts were converted from VGA fonts. These fonts have all 256 -characters from the PC-437 codepage. Some additional fonts were converted from -fonts in the MIT X11 distribution. Most of these are ISO-8859-1 coded. Fonts -also have family names. The following font families are included: - -@example -Font file name Family Description -pcx[t].fnt pc VGA font, fixed -xmx[b][i].fnt X_misc X11, fixed, miscellaneous group -char[b][i].fnt char X11, proportional, charter family -cour[b][i].fnt cour X11, fixed, courier -helve[b][i].fnt helve X11, proportional, helvetica -lucb[b][i].fnt lucb X11, proportional, lucida bright -lucs[b][i].fnt lucs X11, proportional, lucida sans serif -luct[b][i].fnt luct X11, fixed, lucida typewriter -ncen[b][i].fnt ncen X11, proportional, new century schoolbook -symb.fnt symbol X11, proportional, greek letters, symbols -tms[b][i].fnt times X11, proportional, times -@end example - -In the font names means the font width, the font height. Many font -families have bold and/or italic variants. The files containing these fonts -contain a 'b' and/or 'i' character in their name just before the extension. -Additionally, the strings "_bold" and/or "_ital" are appended to the font family -names. Some of the pc VGA fonts come in thin formats also, these are denoted by -a 't' in their file names and the string "_thin" in their family names. - -The GrFont structure hold a font in memory. A number of 'pc' fonts are -built-in to the library and don't need to be loaded: - -@example -extern GrFont GrFont_PC6x8; -extern GrFont GrFont_PC8x8; -extern GrFont GrFont_PC8x14; -extern GrFont GrFont_PC8x16; -@end example - -Other fonts must be loaded with the GrLoadFont function. If the font file name -starts with any path separator character or character sequence (':', '/' or '\') -then it is loaded from the specified directory, otherwise the library try load -the font first from the current directory and next from the default font path. -The font path can be set up with the GrSetFontPath function. If the font path is -not set then the value of the 'GRXFONT' environment variable is used as the font -path. If GrLoadFont is called again with the name of an already loaded font then -it will return a pointer to the result of the first loading. Font loading -routines return NULL if the font was not found. When not needed any more, fonts -can be unloaded (i.e. the storage occupied by them freed) by calling -GrUnloadFont. - -The prototype declarations for these functions: - -@example -GrFont *GrLoadFont(char *name); -void GrUnloadFont(GrFont *font); -void GrSetFontPath(char *path_list); -@end example - -Using these functions: - -@example -GrFont *GrLoadConvertedFont(char *name,int cvt,int w,int h, - int minch,int maxch); -GrFont *GrBuildConvertedFont(const GrFont *from,int cvt,int w,int h, - int minch,int maxch); -@end example - -a new font can be generated from a file font or a font in memory, the 'cvt' -argument direct the conversion or-ing the desired operations from these defines: - -@example -/* - * Font conversion flags for 'GrLoadConvertedFont'. OR them as desired. - */ -#define GR_FONTCVT_NONE 0 /* no conversion */ -#define GR_FONTCVT_SKIPCHARS 1 /* load only selected characters */ -#define GR_FONTCVT_RESIZE 2 /* resize the font */ -#define GR_FONTCVT_ITALICIZE 4 /* tilt font for "italic" look */ -#define GR_FONTCVT_BOLDIFY 8 /* make a "bold"(er) font */ -#define GR_FONTCVT_FIXIFY 16 /* convert prop. font to fixed wdt */ -#define GR_FONTCVT_PROPORTION 32 /* convert fixed font to prop. wdt */ -@end example - -GR_FONTCVT_SKIPCHARS needs 'minch' and 'maxch' arguments. - -GR_FONTCVT_RESIZE needs 'w' and 'h' arguments. - -The function: - -@example -void GrDumpFnaFont(const GrFont *f, char *fileName); -@end example - -writes a font to an ascii font file, so it can be quickly edited with a text -editor. For a description of the ascii font format, see the fna.txt file. - -The function: - -@example -void GrDumpFont(const GrFont *f,char *CsymbolName,char *fileName); -@end example - -writes a font to a C source code file, so it can be compiled and linked with a -user program. GrDumpFont would not normally be used in a release program because -its purpose is to produce source code. When the source code is compiled and -linked into a program distributing the font file with the program in not -necessary, avoiding the possibility of the font file being deleted or corrupted. - -You can use the premade fnt2c.c program (see the source, it's so simple) to -dump a selected font to source code, by example: - -@example -fnt2c helv15 myhelv15 myhelv15.c -@end example - -Next, if this line is included in your main include file: - -@example -extern GrFont myhelv15 -@end example - -and "myhelv15.c" compiled and linked with your project, you can use 'myhelv15' -in every place a GrFont is required. - -This simple function: - -@example -void GrTextXY(int x,int y,char *text,GrColor fg,GrColor bg); -@end example - -draw text in the current context in the standard direction, using the -GrDefaultFont (mapped in the grx20.h file to the GrFont_PC8x14 font) with x, y -like the upper left corner and the foreground and background colors given (note -that bg equal to GrNOCOLOR make the background transparent). - -For other functions the GrTextOption structure specifies how to draw a -character string: - -@example -typedef struct _GR_textOption @{ /* text drawing option structure */ - struct _GR_font *txo_font; /* font to be used */ - union _GR_textColor txo_fgcolor; /* foreground color */ - union _GR_textColor txo_bgcolor; /* background color */ - char txo_chrtype; /* character type (see above) */ - char txo_direct; /* direction (see above) */ - char txo_xalign; /* X alignment (see above) */ - char txo_yalign; /* Y alignment (see above) */ -@} GrTextOption; - -typedef union _GR_textColor @{ /* text color union */ - GrColor v; /* color value for "direct" text */ - GrColorTableP p; /* color table for attribute text */ -@} GrTextColor; - -@end example - -The text can be rotated in increments of 90 degrees (txo_direct), alignments -can be set in both directions (txo_xalign and txo_yalign), and separate fore and -background colors can be specified. The accepted text direction values: - -@example -#define GR_TEXT_RIGHT 0 /* normal */ -#define GR_TEXT_DOWN 1 /* downward */ -#define GR_TEXT_LEFT 2 /* upside down, right to left */ -#define GR_TEXT_UP 3 /* upward */ -#define GR_TEXT_DEFAULT GR_TEXT_RIGHT -@end example - -The accepted horizontal and vertical alignment option values: - -@example -#define GR_ALIGN_LEFT 0 /* X only */ -#define GR_ALIGN_TOP 0 /* Y only */ -#define GR_ALIGN_CENTER 1 /* X, Y */ -#define GR_ALIGN_RIGHT 2 /* X only */ -#define GR_ALIGN_BOTTOM 2 /* Y only */ -#define GR_ALIGN_BASELINE 3 /* Y only */ -#define GR_ALIGN_DEFAULT GR_ALIGN_LEFT -@end example - -Text strings can be of three different types: one character per byte (i.e. the -usual C character string, this is the default), one character per 16-bit word -(suitable for fonts with a large number of characters), and a PC-style -character-attribute pair. In the last case the GrTextOption structure must -contain a pointer to a color table of size 16 (fg color bits in attrib) or 8 (bg -color bits). (The color table format is explained in more detail in the previous -section explaining the methods to build fill patterns.) The supported text -types: - -@example -#define GR_BYTE_TEXT 0 /* one byte per character */ -#define GR_WORD_TEXT 1 /* two bytes per character */ -#define GR_ATTR_TEXT 2 /* chr w/ PC style attribute byte */ -@end example - -The PC-style attribute text uses the same layout (first byte: character, -second: attributes) and bitfields as the text mode screen on the PC. The only -difference is that the 'blink' bit is not supported (it would be very time -consuming -- the PC text mode does it with hardware support). This bit is used -instead to control the underlined display of characters. For convenience the -following attribute manipulation macros have been declared in grx20.h: - -@example -#define GR_BUILD_ATTR(fg,bg,ul) \ - (((fg) & 15) | (((bg) & 7) << 4) | ((ul) ? 128 : 0)) -#define GR_ATTR_FGCOLOR(attr) (((attr) ) & 15) -#define GR_ATTR_BGCOLOR(attr) (((attr) >> 4) & 7) -#define GR_ATTR_UNDERLINE(attr) (((attr) ) & 128) -@end example - -Text strings of the types GR_BYTE_TEXT and GR_WORD_TEXT can also be drawn -underlined. This is controlled by OR-ing the constant GR_UNDERLINE_TEXT to the -foreground color value: - -@example -#define GR_UNDERLINE_TEXT (GrXOR << 4) -@end example - -After the application initializes a text option structure with the desired -values it can call one of the following two text drawing functions: - -@example -void GrDrawChar(int chr,int x,int y,const GrTextOption *opt); -void GrDrawString(void *text,int length,int x,int y,const GrTextOption *opt); -@end example - -NOTE: text drawing is fastest when it is drawn in the 'normal' direction, and -the character does not have to be clipped. It this case the library can use the -appropriate low-level video RAM access routine, while in any other case the text -is drawn pixel-by-pixel by the higher-level code. - -There are pattern filed versions too: - -@example -void GrPatternDrawChar(int chr,int x,int y,const GrTextOption *opt,GrPattern *p); -void GrPatternDrawString(void *text,int length,int x,int y,const GrTextOption *opt, - GrPattern *p); -void GrPatternDrawStringExt(void *text,int length,int x,int y, - const GrTextOption *opt,GrPattern *p); -@end example - -The size of a font, a character or a text string can be obtained by calling -one of the following functions. These functions also take into consideration the -text direction specified in the text option structure passed to them. - -@example -int GrFontCharPresent(const GrFont *font,int chr); -int GrFontCharWidth(const GrFont *font,int chr); -int GrFontCharHeight(const GrFont *font,int chr); -int GrFontCharBmpRowSize(const GrFont *font,int chr); -int GrFontCharBitmapSize(const GrFont *font,int chr); -int GrFontStringWidth(const GrFont *font,void *text,int len,int type); -int GrFontStringHeight(const GrFont *font,void *text,int len,int type); -int GrProportionalTextWidth(const GrFont *font,void *text,int len,int type); -int GrCharWidth(int chr,const GrTextOption *opt); -int GrCharHeight(int chr,const GrTextOption *opt); -void GrCharSize(int chr,const GrTextOption *opt,int *w,int *h); -int GrStringWidth(void *text,int length,const GrTextOption *opt); -int GrStringHeight(void *text,int length,const GrTextOption *opt); -void GrStringSize(void *text,int length,const GrTextOption *opt,int *w,int *h); -@end example - - The GrTextRegion structure and its associated functions can be used to -implement a fast (as much as possible in graphics modes) rectangular text window -using a fixed font. Clipping for such windows is done in character size -increments instead of pixels (i.e. no partial characters are drawn). Only fixed -fonts can be used in their natural size. GrDumpText will cache the code of the -drawn characters in the buffer pointed to by the 'backup' slot (if it is -non-NULL) and will draw a character only if the previously drawn character in -that grid element is different. - -This can speed up text scrolling significantly in graphics modes. The -supported text types are the same as above. - -@example -typedef struct @{ /* fixed font text window desc. */ - struct _GR_font *txr_font; /* font to be used */ - union _GR_textColor txr_fgcolor; /* foreground color */ - union _GR_textColor txr_bgcolor; /* background color */ - void *txr_buffer; /* pointer to text buffer */ - void *txr_backup; /* optional backup buffer */ - int txr_width; /* width of area in chars */ - int txr_height; /* height of area in chars */ - int txr_lineoffset; /* offset in buffer(s) between rows */ - int txr_xpos; /* upper left corner X coordinate */ - int txr_ypos; /* upper left corner Y coordinate */ - char txr_chrtype; /* character type (see above) */ -@} GrTextRegion; - -void GrDumpChar(int chr,int col,int row,const GrTextRegion *r); -void GrDumpText(int col,int row,int wdt,int hgt,const GrTextRegion *r); -void GrDumpTextRegion(const GrTextRegion *r); - -@end example - -The GrDumpTextRegion function outputs the whole text region, while GrDumpText -draws only a user-specified part of it. GrDumpChar updates the character in the -buffer at the specified location with the new character passed to it as argument -and then draws the new character on the screen as well. With these functions you -can simulate a text mode window, write chars directly to the txr_buffer and call -GrDumpTextRegion when you want to update the window (or GrDumpText if you know -the area to update is small). - -See the @strong{test/fonttest.c} example. - -@c ----------------------------------------------------------------------------- -@node Drawing in user coordinates, Graphics cursors, Text drawing, A User Manual For GRX2 -@unnumberedsec Drawing in user coordinates - - -There is a second set of the graphics primitives which operates in user -coordinates. Every context has a user to screen coordinate mapping associated -with it. An application specifies the user window by calling the GrSetUserWindow -function. - -@example -void GrSetUserWindow(int x1,int y1,int x2,int y2); -@end example - -A call to this function it in fact specifies the virtual coordinate limits -which will be mapped onto the current context regardless of the size of the -context. For example, the call: - -@example -GrSetUserWindow(0,0,11999,8999); -@end example - -tells the library that the program will perform its drawing operations in a -coordinate system X:0...11999 (width = 12000) and Y:0...8999 (height = 9000). -This coordinate range will be mapped onto the total area of the current context. -The virtual coordinate system can also be shifted. For example: - -@example -GrSetUserWindow(5000,2000,16999,10999); -@end example - -The user coordinates can even be used to turn the usual left-handed coordinate -system (0:0 corresponds to the upper left corner) to a right handed one (0:0 -corresponds to the bottom left corner) by calling: - -@example -GrSetUserWindow(0,8999,11999,0); -@end example - -The library also provides three utility functions for the query of the current -user coordinate limits and for converting user coordinates to screen coordinates -and vice versa. - -@example -void GrGetUserWindow(int *x1,int *y1,int *x2,int *y2); -void GrGetScreenCoord(int *x,int *y); -void GrGetUserCoord(int *x,int *y); -@end example - -If an application wants to take advantage of the user to screen coordinate -mapping it has to use the user coordinate version of the graphics primitives. -These have exactly the same parameter passing conventions as their screen -coordinate counterparts. NOTE: the user coordinate system is not initialized by -the library! The application has to set up its coordinate mapping before calling -any of the use coordinate drawing functions -- otherwise the program will almost -certainly exit (in a quite ungraceful fashion) with a 'division by zero' error. -The list of supported user coordinate drawing functions: - -@example -void GrUsrPlot(int x,int y,GrColor c); -void GrUsrLine(int x1,int y1,int x2,int y2,GrColor c); -void GrUsrHLine(int x1,int x2,int y,GrColor c); -void GrUsrVLine(int x,int y1,int y2,GrColor c); -void GrUsrBox(int x1,int y1,int x2,int y2,GrColor c); -void GrUsrFilledBox(int x1,int y1,int x2,int y2,GrColor c); -void GrUsrFramedBox(int x1,int y1,int x2,int y2,int wdt,GrFBoxColors *c); -void GrUsrCircle(int xc,int yc,int r,GrColor c); -void GrUsrEllipse(int xc,int yc,int xa,int ya,GrColor c); -void GrUsrCircleArc(int xc,int yc,int r,int start,int end, - int style,GrColor c); -void GrUsrEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,GrColor c); -void GrUsrFilledCircle(int xc,int yc,int r,GrColor c); -void GrUsrFilledEllipse(int xc,int yc,int xa,int ya,GrColor c); -void GrUsrFilledCircleArc(int xc,int yc,int r,int start,int end, - int style,GrColor c); -void GrUsrFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,GrColor c); -void GrUsrPolyLine(int numpts,int points[][2],GrColor c); -void GrUsrPolygon(int numpts,int points[][2],GrColor c); -void GrUsrFilledConvexPolygon(int numpts,int points[][2],GrColor c); -void GrUsrFilledPolygon(int numpts,int points[][2],GrColor c); -void GrUsrFloodFill(int x, int y, GrColor border, GrColor c); -GrColor GrUsrPixel(int x,int y); -GrColor GrUsrPixelC(GrContext *c,int x,int y); -void GrUsrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrUsrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrUsrCustomCircle(int xc,int yc,int r,const GrLineOption *o); -void GrUsrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *o); -void GrUsrCustomCircleArc(int xc,int yc,int r,int start,int end, - int style,const GrLineOption *o); -void GrUsrCustomEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,const GrLineOption *o); -void GrUsrCustomPolyLine(int numpts,int points[][2],const GrLineOption *o); -void GrUsrCustomPolygon(int numpts,int points[][2],const GrLineOption *o); -void GrUsrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp); -void GrUsrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp); -void GrUsrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp); -void GrUsrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp); -void GrUsrPatternedCircleArc(int xc,int yc,int r,int start,int end, - int style,GrLinePattern *lp); -void GrUsrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end, - int style,GrLinePattern *lp); -void GrUsrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp); -void GrUsrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp); -void GrUsrPatternFilledPlot(int x,int y,GrPattern *p); -void GrUsrPatternFilledLine(int x1,int y1,int x2,int y2,GrPattern *p); -void GrUsrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p); -void GrUsrPatternFilledCircle(int xc,int yc,int r,GrPattern *p); -void GrUsrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p); -void GrUsrPatternFilledCircleArc(int xc,int yc,int r,int start,int end,int style,GrPattern *p); -void GrUsrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrPattern *p); -void GrUsrPatternFilledConvexPolygon(int numpts,int points[][2],GrPattern *p); -void GrUsrPatternFilledPolygon(int numpts,int points[][2],GrPattern *p); -void GrUsrPatternFloodFill(int x, int y, GrColor border, GrPattern *p); -void GrUsrDrawChar(int chr,int x,int y,const GrTextOption *opt); -void GrUsrDrawString(char *text,int length,int x,int y,const GrTextOption *opt); -void GrUsrTextXY(int x,int y,char *text,GrColor fg,GrColor bg); -@end example - -@c ----------------------------------------------------------------------------- -@node Graphics cursors, Keyboard input, Drawing in user coordinates, A User Manual For GRX2 -@unnumberedsec Graphics cursors - -The library provides support for the creation and usage of an unlimited number -of graphics cursors. An application can use these cursors for any purpose. -Cursors always save the area they occupy before they are drawn. When moved or -erased they restore this area. As a general rule of thumb, an application should -erase a cursor before making changes to an area it occupies and redraw the -cursor after finishing the drawing. Cursors are created with the GrBuildCursor -function: - -@example -GrCursor *GrBuildCursor(char far *pixels,int pitch,int w,int h, - int xo,int yo,const GrColorTableP c); -@end example - -The pixels, w (=width), h (=height) and c (= color table) arguments are -similar to the arguments of the pixmap building library function GrBuildPixmap -(see that paragraph for a more detailed explanation.), but with two differences. -First, is not assumed that the pixels data is w x h sized, the pitch argument -set the offset between rows. Second, the pixmap data is interpreted slightly -differently, any pixel with value zero is taken as a "transparent" pixel, i.e. -the background will show through the cursor pattern at that pixel. A pixmap data -byte with value = 1 will refer to the first color in the table, and so on. - -The xo (= X offset) and yo (= Y offset) arguments specify the position (from -the top left corner of the cursor pattern) of the cursor's "hot point". - -The GrCursor data structure: - -@example -typedef struct _GR_cursor @{ - struct _GR_context work; /* work areas (4) */ - int xcord,ycord; /* cursor position on screen */ - int xsize,ysize; /* cursor size */ - int xoffs,yoffs; /* LU corner to hot point offset */ - int xwork,ywork; /* save/work area sizes */ - int xwpos,ywpos; /* save/work area position on screen */ - int displayed; /* set if displayed */ -@} GrCursor; -@end example - -is typically not used (i.e. read or changed) by the application program, it -should just pass pointers to these structures to the appropriate library -functions. Other cursor manipulation functions: - -@example -void GrDisplayCursor(GrCursor *cursor); -void GrEraseCursor(GrCursor *cursor); -void GrMoveCursor(GrCursor *cursor,int x,int y); -void GrDestroyCursor(GrCursor *cursor); -@end example - -See the @strong{test/curstest.c} example. - -@c ----------------------------------------------------------------------------- -@node Keyboard input, Mouse event handling, Graphics cursors, A User Manual For GRX2 -@unnumberedsec Keyboard input - -GRX can handle platform independant key input. The file grxkeys.h defines the -keys to be used in the user's program. This is an extract: - -@example -#define GrKey_Control_A 0x0001 -#define GrKey_Control_B 0x0002 -#define GrKey_Control_C 0x0003 -... -#define GrKey_A 0x0041 -#define GrKey_B 0x0042 -#define GrKey_C 0x0043 -... -#define GrKey_F1 0x013b -#define GrKey_F2 0x013c -#define GrKey_F3 0x013d -... -#define GrKey_Alt_F1 0x0168 -#define GrKey_Alt_F2 0x0169 -#define GrKey_Alt_F3 0x016a -@end example - -But you can be confident that the standard ASCII is right maped. -The GrKeyType type is defined to store keycodes: - -@example -typedef unsigned short GrKeyType; -@end example - -This function: - -@example -int GrKeyPressed(void); -@end example - -returns non zero if there are any keycode waiting, that can be read with: - -@example -GrKeyType GrKeyRead(void); -@end example - -The function: - -@example -int GrKeyStat(void); -@end example - -returns a keyboard status word, or-ing it with the next defines it can be known -the status of some special keys: - -@example -#define GR_KB_RIGHTSHIFT 0x01 /* right shift key depressed */ -#define GR_KB_LEFTSHIFT 0x02 /* left shift key depressed */ -#define GR_KB_CTRL 0x04 /* CTRL depressed */ -#define GR_KB_ALT 0x08 /* ALT depressed */ -#define GR_KB_SCROLLOCK 0x10 /* SCROLL LOCK active */ -#define GR_KB_NUMLOCK 0x20 /* NUM LOCK active */ -#define GR_KB_CAPSLOCK 0x40 /* CAPS LOCK active */ -#define GR_KB_INSERT 0x80 /* INSERT state active */ -#define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT) -@end example - -See the @strong{test/keys.c} example. - -@c ----------------------------------------------------------------------------- -@node Mouse event handling, Writing/reading PNM graphics files, Keyboard input, A User Manual For GRX2 -@unnumberedsec Mouse event handling - -All mouse services need the presence of a mouse. An application can test -whether a mouse is available by calling the function: - -@example -int GrMouseDetect(void); -@end example - -which will return zero if no mouse (or mouse driver) is present, non-zero -otherwise. The mouse must be initialized by calling one (and only one) of these -functions: - -@example -void GrMouseInit(void); -void GrMouseInitN(int queue_size); -@end example - -GrMouseInit sets a event queue (see below) size to GR_M_QUEU_SIZE (128). A -user supply event queue size can be set calling GrMouseInitN instead. - -It is a good practice to call GrMouseUnInit before exiting the program. This -will restore any interrupt vectors hooked by the program to their original -values. - -@example -void GrMouseUnInit(void); -@end example - -The mouse can be controlled with the following functions: - -@example -void GrMouseSetSpeed(int spmult,int spdiv); -void GrMouseSetAccel(int thresh,int accel); -void GrMouseSetLimits(int x1,int y1,int x2,int y2); -void GrMouseGetLimits(int *x1,int *y1,int *x2,int *y2); -void GrMouseWarp(int x,int y); -@end example - -The library calculates the mouse position only from the mouse mickey counters. -(To avoid the limit and 'rounding to the next multiple of eight' problem with -some mouse driver when it finds itself in a graphics mode unknown to it.) The -parameters to the GrMouseSetSpeed function specify how coordinate changes are -obtained from mickey counter changes, multipling by spmult and dividing by -spdiv. In high resolution graphics modes the value of one just works fine, in -low resolution modes (320x200 or similar) it is best set the spdiv to two or -three. (Of course, it also depends on the sensitivity the mouse.) The -GrMouseSetAccel function is used to control the ballistic effect: if a mouse -coordinate changes between two samplings by more than the thresh parameter, the -change is multiplied by the accel parameter. NOTE: some mouse drivers perform -similar calculations before reporting the coordinates in mickeys. In this case -the acceleration done by the library will be additional to the one already -performed by the mouse driver. The limits of the mouse movement can be set -(passed limits will be clipped to the screen) with GrMouseSetLimits (default is -the whole screen) and the current limits can be obtained with GrMouseGetLimits. -GrMouseWarp sets the mouse cursor to the specified position. - -As typical mouse drivers do not know how to draw mouse cursors in high -resolution graphics modes, the mouse cursor is drawn by the library. The mouse -cursor can be set with: - -@example -void GrMouseSetCursor(GrCursor *cursor); -void GrMouseSetColors(GrColor fg,GrColor bg); -@end example - -GrMouseSetColors uses an internal arrow pattern, the color fg will be used as -the interior of it and bg will be the border. The current mouse cursor can be -obtained with: - -@example -GrCursor *GrMouseGetCursor(void); -@end example - -The mouse cursor can be displayed/erased with: - -@example -void GrMouseDisplayCursor(void); -void GrMouseEraseCursor(void); -@end example - -The mouse cursor can be left permanently displayed. All graphics primitives -except for the few non-clipping functions check for conflicts with the mouse -cursor and erase it before the drawing if necessary. Of course, it may be more -efficient to erase the cursor manually before a long drawing sequence and redraw -it after completion. The library provides an alternative pair of calls for this -purpose which will erase the cursor only if it interferes with the drawing: - -@example -int GrMouseBlock(GrContext *c,int x1,int y1,int x2,int y2); -void GrMouseUnBlock(int return_value_from_GrMouseBlock); -@end example - -GrMouseBlock should be passed the context in which the drawing will take place -(the usual convention of NULL meaning the current context is supported) and the -limits of the affected area. It will erase the cursor only if it interferes with -the drawing. When the drawing is finished GrMouseUnBlock must be called with the -argument returned by GrMouseBlock. - -The status of the mouse cursor can be obtained with calling -GrMouseCursorIsDisplayed. This function will return non-zero if the cursor is -displayed, zero if it is erased. - -@example -int GrMouseCursorIsDisplayed(void); -@end example - -The library supports (beside the simple cursor drawing) three types of -"rubberband" attached to the mouse cursor. The GrMouseSetCursorMode function is -used to select the cursor drawing mode. - -@example -void GrMouseSetCursorMode(int mode,...); -@end example - -The parameter mode can have the following values: - -@example -#define GR_M_CUR_NORMAL 0 /* MOUSE CURSOR modes: just the cursor */ -#define GR_M_CUR_RUBBER 1 /* rect. rubber band (XOR-d to the screen) */ -#define GR_M_CUR_LINE 2 /* line attached to the cursor */ -#define GR_M_CUR_BOX 3 /* rectangular box dragged by the cursor */ -@end example - -GrMouseSetCursorMode takes different parameters depending on the cursor -drawing mode selected. The accepted call formats are: - -@example -GrMouseSetCursorMode(M_CUR_NORMAL); -GrMouseSetCursorMode(M_CUR_RUBBER,xanchor,yanchor,GrColor); -GrMouseSetCursorMode(M_CUR_LINE,xanchor,yanchor,GrColor); -GrMouseSetCursorMode(M_CUR_BOX,dx1,dy1,dx2,dy2,GrColor); -@end example - -The anchor parameters for the rubberband and rubberline modes specify a fixed -screen location to which the other corner of the primitive is bound. The dx1 -through dy2 parameters define the offsets of the corners of the dragged box from -the hotpoint of the mouse cursor. The color value passed is always XOR-ed to the -screen, i.e. if an application wants the rubberband to appear in a given color -on a given background then it has to pass the XOR of these two colors to -GrMouseSetCursorMode. - -The GrMouseGetEvent function is used to obtain the next mouse or keyboard -event. It takes a flag with various bits encoding the type of event needed. It -returns the event in a GrMouseEvent structure. The relevant declarations from -grx20.h: - -@example -void GrMouseGetEvent(int flags,GrMouseEvent *event); - -typedef struct _GR_mouseEvent @{ /* mouse event buffer structure */ - int flags; /* event type flags (see above) */ - int x,y; /* mouse coordinates */ - int buttons; /* mouse button state */ - int key; /* key code from keyboard */ - int kbstat; /* keybd status (ALT, CTRL, etc..) */ - long dtime; /* time since last event (msec) */ -@} GrMouseEvent; -@end example - -The event structure has been extended with a keyboard status word (thus a -program can check for combinations like ALT-) and a time -stamp which can be used to check for double clicks, etc... The following macros -have been defined in grx20.h to help in creating the control flag for -GrMouseGetEvent and decoding the various bits in the event structure: - -@example -#define GR_M_MOTION 0x001 /* mouse event flag bits */ -#define GR_M_LEFT_DOWN 0x002 -#define GR_M_LEFT_UP 0x004 -#define GR_M_RIGHT_DOWN 0x008 -#define GR_M_RIGHT_UP 0x010 -#define GR_M_MIDDLE_DOWN 0x020 -#define GR_M_MIDDLE_UP 0x040 -#define GR_M_BUTTON_DOWN (GR_M_LEFT_DOWN | GR_M_MIDDLE_DOWN | \ - GR_M_RIGHT_DOWN | GR_M_P4_DOWN | GR_M_P5_DOWN) -#define GR_M_BUTTON_UP (GR_M_LEFT_UP | GR_M_MIDDLE_UP | \ - GR_M_RIGHT_UP | GR_M_P4_UP | GR_M_P5_UP) -#define GR_M_BUTTON_CHANGE (GR_M_BUTTON_UP | GR_M_BUTTON_DOWN ) - -#define GR_M_LEFT 0x01 /* mouse button index bits */ -#define GR_M_RIGHT 0x02 -#define GR_M_MIDDLE 0x04 -#define GR_M_P4 0x08 /* wheel rolls up */ -#define GR_M_P5 0x10 /* wheel rolls down */ - -#define GR_M_KEYPRESS 0x080 /* other event flag bits */ -#define GR_M_POLL 0x100 -#define GR_M_NOPAINT 0x200 -#define GR_COMMAND 0x1000 -#define GR_M_EVENT (GR_M_MOTION | GR_M_KEYPRESS | \ - GR_M_BUTTON_CHANGE | GR_COMMAND) -@end example - -GrMouseGetEvent will display the mouse cursor if it was previously erased and -the GR_M_NOPAINT bit is not set in the flag passed to it. In this case it will -also erase the cursor after an event has been obtained. - -GrMouseGetEvent block until a event is produced, except if the GR_M_POLL bit -is set in the flag passed to it. - -Another version of GetEvent: - -@example -void GrMouseGetEventT(int flags,GrMouseEvent *event,long timout_msecs); -@end example - -can be istructed to wait timout_msec for the presence of an event. Note that -event->dtime is only valid if any event occured (event->flags != 0) otherwise -it's set as -1. Additionally event timing is real world time even in X11 && -Linux. - -If there are one or more events waiting the function: - -@example -int GrMousePendingEvent(void); -@end example - -returns non-zero value. - -The generation of mouse and keyboard events can be individually enabled or -disabled (by passing a non-zero or zero, respectively, value in the -corresponding enable_XX parameter) by calling: - -@example -void GrMouseEventEnable(int enable_kb,int enable_ms); -@end example - -Note that GrMouseInit set both by default. If you want to use -GrMouseGetEvent and GrKeyRead at the same time, a call to -GrMouseEventEnable( 0,1 ) is needed before input process. - -See the @strong{test/mousetst.c} example. - -@node Writing/reading PNM graphics files, Writing/reading PNG graphics files,Mouse event handling , A User Manual For GRX2 -@unnumberedsec Writing/reading PNM graphics files - -GRX includes functions to load/save a context from/to a PNM file. - -PNM is a group of simple graphics formats from the -@uref{http://netpbm.sourceforge.net, NetPbm} -distribution. NetPbm can convert from/to PNM lots of graphics formats, -and apply some transformations to PNM files. -(Note. You don't need the NetPbm distribution to use this functions). - -There are six PNM formats: - -@example - P1 text PBM (bitmap) - P2 text PGM (gray scale) - P3 text PPM (real color) - P4 binary PBM (bitmap) - P5 binary PGM (gray scale) - P6 binary PPM (real color) -@end example - -GRX can handle the binary formats only (get the NetPbm distribution if you -need convert text to binary formats). - -To save a context in a PNM file you have three functions: - -@example -int GrSaveContextToPbm( GrContext *grc, char *pbmfn, char *docn ); -int GrSaveContextToPgm( GrContext *grc, char *pgmfn, char *docn ); -int GrSaveContextToPpm( GrContext *grc, char *ppmfn, char *docn ); -@end example - -they work both in RGB and palette modes, grc must be a pointer to the context to -be saved, if it is NULL the current context is saved; p-mfn is the file name to -be created and docn is an optional text comment to be written in the file, it -can be NULL. Three functions return 0 on succes and -1 on error. - -GrSaveContextToPbm dumps a context in a PBM file (bitmap). If the pixel color -isn't Black it asumes White. - -GrSaveContextToPgm dumps a context in a PGM file (gray scale). The colors are -quantized to gray scale using .299r + .587g + .114b. - -GrSaveContextToPpm dumps a context in a PPM file (real color). -To load a PNM file in a context you must use: - -@example -int GrLoadContextFromPnm( GrContext *grc, char *pnmfn ); -@end example - -it support reading PBM, PGM and PPM binary files. grc must be a pointer to the -context to be written, if it is NULL the current context is used; p-mfn is the -file name to be read. If context dimensions are lesser than pnm dimensions, the -function loads as much as it can. If color mode is not in RGB mode, the routine -allocates as much colors as it can. The function returns 0 on succes and -1 on -error. - -To query the file format, width and height of a PNM file you can use: - -@example -int GrQueryPnm( char *ppmfn, int *width, int *height, int *maxval ); -@end example - -pnmfn is the name of pnm file; width returns the pnm width; height returns the -pnm height; maxval returns the max color component value. The function returns 1 -to 6 on success (the PNM format) or -1 on error. - -The two next functions: - -@example -int GrLoadContextFromPnmBuffer( GrContext *grc, const char *pnmbuf ); -int GrQueryPnmBuffer( const char *pnmbuf, int *width, int *height, int *maxval ); -@end example - -work like GrLoadContextFromPnm and -GrQueryPnmBuffer, but they get his input from a buffer instead -of a file. This way, pnm files can be embeded in a program (using the -bin2c program by example). - -@node Writing/reading PNG graphics files, Writing/reading JPEG graphics files, Writing/reading PNM graphics files, A User Manual For GRX2 -@unnumberedsec Writing/reading PNG graphics files - -GRX includes functions to load/save a context -from/to a png file. But note, for this purpose it needs the -@uref{http://www.libpng.org/pub/png/libpng.html, libpng} library, -and to enable the png support before make the GRX lib. - -Use next function to save a context in a PNG file: - -@example -int GrSaveContextToPng( GrContext *grc, char *pngfn ); -@end example - -it works both in RGB and palette modes, grc must be -a pointer to the context to be saved, if it is NULL the current context is -saved; pngfn is the file name to be created. -The function returns 0 on succes and -1 on error. - -To load a PNG file in a context you must use: - -@example -int GrLoadContextFromPng( GrContext *grc, char *pngfn, int use_alpha ); -@end example - -grc must be a pointer to the context to be written, if it -is NULL the current context is used; pngfn is the file name -to be read; set use_alpha to 1 if you want to use the image -alpha channel (if available). If context dimensions are lesser than png -dimensions, the function loads as much as it can. If color mode is not -in RGB mode, the routine allocates as much colors as it can. The function -returns 0 on succes and -1 on error. - -To query the width and height of a PNG file you can use: - -@example -int GrQueryPng( char *pngfn, int *width, int *height ); -@end example - -pngfn is the name of png file; width returns the -png width; height returns the png height. -The function returns 0 on success or -1 on error. - -The function: - -@example -int GrPngSupport( void ); -@end example - -returns 1 if there is png support in the library, 0 otherwise. If there is -not support for png, dummy functions are added to the library, returning -error (-1) ever. - -@node Writing/reading JPEG graphics files, Miscellaneous functions, Writing/reading PNG graphics files, A User Manual For GRX2 -@unnumberedsec Writing/reading PNG graphics files - -GRX includes functions to load/save a context -from/to a jpeg file. But note, for this purpose it needs the -@uref{http://www.ijg.org, libjpeg} library, -and to enable the jpeg support before make the GRX lib. - -Use next function to save a context in a JPEG file: - -@example -int GrSaveContextToJpeg( GrContext *grc, char *jpegfn, int quality ); -@end example - -it works both in RGB and palette modes, grc must be -a pointer to the context to be saved, if it is NULL the current context is -saved; jpegfn is the file name to be created; -quality is a number between 1 and 100 to drive the compression -quality, use higher values for better quality (and bigger files), you can -use 75 as a standard value, normally a value between 50 and 95 is good. -The function returns 0 on succes and -1 on error. - -This function saves a context in a grayscale JPEG file: - -@example -int GrSaveContextToGrayJpeg( GrContext *grc, char *jpegfn, int quality ); -@end example - -parameters and return codes are like in GrSaveContextToJpeg. -The colors are quantized to gray scale using .299r + .587g + .114b. - -To load a JPEG file in a context you must use: - -@example -int GrLoadContextFromJpeg( GrContext *grc, char *jpegfn, int scale ); -@end example - -grc must be a pointer to the context to be written, if it -is NULL the current context is used; jpegfn is the file name -to be read; set scale to 1, 2, 4 or 8 to reduce the loaded -image to 1/1, 1/2, 1/4 or 1/8. If context dimensions are lesser than jpeg -dimensions, the function loads as much as it can. If color mode is not -in RGB mode, the routine allocates as much colors as it can. The function -returns 0 on succes and -1 on error. - -To query the width and height of a JPEG file you can use: - -@example -int GrQueryJpeg( char *jpegfn, int *width, int *height ); -@end example - -jpegfn is the name of jpeg file; width returns the -jpeg width; height returns the jpeg height. -The function returns 0 on success or -1 on error. - -The function: - -@example -int GrJpegSupport( void ); -@end example - -returns 1 if there is jpeg support in the library, 0 otherwise. If there is -not support for jpeg, dummy functions are added to the library, returning -error (-1) ever. - -@node Miscellaneous functions, BGI interface, Writing/reading JPEG graphics files, A User Manual For GRX2 -@unnumberedsec Miscellaneous functions - -Here we will describe some miscellaneous functions. - -@example -unsigned GrGetLibraryVersion(void); -@end example - -GrGetLibraryVersion returns the GRX version API, like a hexadecimal coded -number. By example 0x0241 means 2.4.1 Because grx20.h defines the -GRX_VERSION_API macro, you can check if both, the library and the -include file, are in the same version using -if(GrGetLibraryVersion() == GRX_VERSION_API ) - -@example -unsigned GrGetLibrarySystem(void); -@end example - -This functions returns a unsigned integer identifing the system you are -working in. grx20.h defines some macros you can use: - -@example -/* these are the supported configurations: */ -#define GRX_VERSION_TCC_8086_DOS 1 /* also works with BCC */ -#define GRX_VERSION_GCC_386_DJGPP 2 /* DJGPP v2 */ -#define GRX_VERSION_GCC_386_LINUX 3 /* the real stuff */ -#define GRX_VERSION_GENERIC_X11 4 /* generic X11 version */ -#define GRX_VERSION_WATCOM_DOS4GW 5 /* GS - Watcom C++ 11.0 32 Bit -#define GRX_VERSION_GCC_386_WIN32 7 /* WIN32 using Mingw32 */ -#define GRX_VERSION_MSC_386_WIN32 8 /* WIN32 using MS-VC */ -#define GRX_VERSION_GCC_386_CYG32 9 /* WIN32 using CYGWIN */ -#define GRX_VERSION_GCC_386_X11 10 /* X11 version */ -#define GRX_VERSION_GCC_X86_64_LINUX 11 /* console framebuffer 64 */ -#define GRX_VERSION_GCC_X86_64_X11 12 /* X11 version 64 */ -@end example - -Note. On Linux, GrGetLibrarySystem returns GRX_VERSION_GCC_386_LINUX even in the -X11 version. - -@example -void GrSetWindowTitle(char *title); -@end example -GrSetWindowTitle sets the main window title in the X11 an Win32 versions. It -doesn't do nothing in the DOS and Linux-SvgaLib versions. - -@example -void GrSleep(int msec); -@end example -This function stops the program execution for msec miliseconds. - -@example -long GrMsecTime( void ); -@end example -This function gives the current time with millisecond resolution - - -@example -void GrFlush( void ); -@end example -This funnction flushes the graphics window. Not dummy because useful only on -X11 when switching between graphics and console windows open simultaneously. - -@example - GrContext *GrCreateFrameContext(GrFrameMode md,int w,int h, - char far *memory[4],GrContext *where); - -@end example -This function is like GrCreateContext, except that you can specify any valid -memory frame mode, not only the Screen associated frame mode. It can be used for -special purposes (see GrBitBlt1bpp for an example). - -@example - void GrBitBlt1bpp(GrContext *dst,int dx,int dy,GrContext *src, - int x1,int y1,int x2,int y2,GrColor fg,GrColor bg); - -@end example -This special function does a bitblt from a 1bpp context (a bitmap really), -using fg and bg like the color+opcode when bit=1 and bit=0 respectively. Here is -an example: - -@example - pContext = GrCreateFrameContext(GR_frameRAM1, sizex, sizey, NULL, NULL); - /* draw something (black and white) into the bitmap */ - GrSetContext(pContext); - GrClearContext( GrBlack() ); - GrLine(0, 0, sizex-1, sizey-1, GrWhite()); - GrLine(0, sizey-1, sizex-1, 0, GrWhite()); - - /* Put the bitmap into the screen */ - GrSetContext(NULL); - fcolor = GrAllocColor( 255,0,0 ); - bcolor = GrAllocColor( 0,0,255 ); - GrBitBlt1bpp(NULL,x,y,pContext,0,0,sizex-1,sizey-1,fcolor,bcolor); -@end example - -@c ----------------------------------------------------------------------------- -@node BGI interface, Pascal interface, Miscellaneous functions, A User Manual For GRX2 -@unnumberedsec BGI interface - -From the 2.3.1 version, GRX includes the BCC2GRX library created by Hartmut -Schirmer. The BCC2GRX was created to allow users of GRX to compile graphics -programs written for Borland-C++ and Turbo-C graphics interface. BCC2GRX is not -a convenient platform to develop new BGI programs. Of course you should use -native GRX interface in such cases! - -Read the readme.bgi file for more info. - -@c ----------------------------------------------------------------------------- -@node Pascal interface, References, BGI interface, A User Manual For GRX2 -@unnumberedsec Pascal interface - -The Pascal (gpc) support is produced by two unit files @strong{pascal/grx.pas} -and @strong{pascal/bgi/graph.pas} which are the Pascal translations of the C -header files @strong{include/grx20.h + include/grxkeys.h} -and @strong{include/libbcc.h}. - -Compilation of the examples and installation of the header files is allowed -by setting INCLUDE_GPC_SUPPORT=y in makedef.grx. - -The unit files contain at the beginning instructions to load the required -libraries (libgrx20..., depending on the system) and addon libraries -(e.g. libpng). -You can uncomment manually the addons you want. -You can also use the configure script which does that automatically, -together with editing the makedefs.grx file. - -By default they are installed in a @strong{units} directory below the -INSTALLDIR directory. But you can put them where you like. - -@c ----------------------------------------------------------------------------- -@node References, , Pascal interface, A User Manual For GRX2 -@unnumberedsec References - -@multitable {MGRX site (fork from GRX)----}{----http://www.libpng.org/pub/png/libpng.html} -@item Official GRX site -@tab @uref{http://grx.gnu.de} -@item GRX mailing list archive -@tab @uref{http://grx.gnu.de/archive/grx/en/} -@item MGRX site (fork from GRX) -@tab @uref{http://mgrx.fgrim.com} -@item NetPbm distribution -@tab @uref{http://netpbm.sourceforge.net} -@item PNG library -@tab @uref{http://www.libpng.org/pub/png/libpng.html} -@item JPEG library -@tab @uref{http://www.ijg.org} -@item TIFF library -@tab @uref{http://www.remotesensing.org/libtiff/} -@end multitable - -@c ----------------------------------------------------------------------------- - diff --git a/thirdparty/grx249/doc/tex/makinf.bat b/thirdparty/grx249/doc/tex/makinf.bat deleted file mode 100755 index c63f32d..0000000 --- a/thirdparty/grx249/doc/tex/makinf.bat +++ /dev/null @@ -1,7 +0,0 @@ -makeinfo --no-split grx2.tex -makeinfo --html --no-split grx2.tex -d2u grx* -texi2dvi grx2.tex -dvips grx2 -d2u grx2.ps -texi2dvi --pdf grx2.tex diff --git a/thirdparty/grx249/doc/tex/readme b/thirdparty/grx249/doc/tex/readme deleted file mode 100644 index ceebdbb..0000000 --- a/thirdparty/grx249/doc/tex/readme +++ /dev/null @@ -1,2 +0,0 @@ -Here are files I use to generate the grxvvvum.[inf/html/dvi/pdf] file before every release. -It is no necesary to do nothing with them. diff --git a/thirdparty/grx249/doc/watcom.txt b/thirdparty/grx249/doc/watcom.txt deleted file mode 100644 index 2bf472a..0000000 --- a/thirdparty/grx249/doc/watcom.txt +++ /dev/null @@ -1,53 +0,0 @@ -WATCOM C++ 11.0 Port of GRX2.2x -Contact - Gary Sands (gsands@stbni.co.uk) -The port has been caried out for a 32-bit library for DOS4GW binaries. - -Compilation --------------------------------------------- -NOW HAVE REAL MAKE FILES. -The project and target files were a real pain to maintain! -Run "WMAKE -F MAKEFILE.WAT" in the GRX base directory to -build the library and test executables. The library builds -to "LIB/WATCOM32" and the tests build to "BIN". Run -"WMAKE -F MAKEFILE.WAT CLEAN" to delete the object and -link files. You may see a few warnings from the test -programs - DON'T PANIC. The WATCOM compiler is just very -pedantic. - -Running "WMAKE DEBUG=1 -F MAKEFILE.WAT" should make a -debug build of the library. - -If you want to make your own .PRJ and .TGT files for the IDE -remember to compile everything with __MSDOS__ and -SMALL_STACK defined (-d option in source options). There -may be a few more definitions necessary. Check the top level -makefile to see what the compiler options are if you have -problems or see a large amount of warning messages. - -What works --------------------------------------------- -All the test programs shipped with GRX2.29 should work. -VBE2 Protected Mode Interface and Linear Frame Buffer Support now -compile and work. Don't forget to copy any .DAT files the test -programs need to the "BIN" directory. - -What does not work --------------------------------------------- -16-bit Real Mode Library - I have not looked at it yet. -// Added a few fixes for 16-bit mode but not finished. HSC - -What needs to be done --------------------------------------------- -Speed enhancements - need Watcom versions of the DJGPP/GNU inline -assembly routines. In particular the line drawing and fill algorithms. -Some of the fills have been written by Hartmut. He has put a lot of -effort turning my hacks for Watcom into a structured part of GRX and -deserves most of the credit for this port. - -** REMEMBER THAT THE DEFAULT STACK SIZE IS 3K SO YOU MAY HAVE TO -ADJUST THAT IN THE LINKER OPTIONS OF YOUR EXECUTABLE - This is less -of a problem now if you define SMALL_STACK ** - -And of course best of luck using GRX with Watcom! - - diff --git a/thirdparty/grx249/fonts/char11.fnt b/thirdparty/grx249/fonts/char11.fnt deleted file mode 100644 index 9b04d63..0000000 --- a/thirdparty/grx249/fonts/char11.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:04c36ce034058fb68aa347ff8ce117c7f8e890b1c6079b0151cb76da3701cb8c -size 4626 diff --git a/thirdparty/grx249/fonts/char11b.fnt b/thirdparty/grx249/fonts/char11b.fnt deleted file mode 100644 index dd66e38..0000000 --- a/thirdparty/grx249/fonts/char11b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0ea7c938e2d74cee4889412a81efc22f27983b50bed44ee33ba6efa523372ba -size 4658 diff --git a/thirdparty/grx249/fonts/char11bi.fnt b/thirdparty/grx249/fonts/char11bi.fnt deleted file mode 100644 index e481aea..0000000 --- a/thirdparty/grx249/fonts/char11bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1c47603b4da61e5f9842e8019de2205f083a908d9ab76aff956b89b5c0c09415 -size 4657 diff --git a/thirdparty/grx249/fonts/char11i.fnt b/thirdparty/grx249/fonts/char11i.fnt deleted file mode 100644 index 82e7e21..0000000 --- a/thirdparty/grx249/fonts/char11i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3644b2c4a3ab7926abd70ad8b81770deba0e8afc628530f68a4ad109dd39ccd3 -size 4626 diff --git a/thirdparty/grx249/fonts/char14.fnt b/thirdparty/grx249/fonts/char14.fnt deleted file mode 100644 index 40a002f..0000000 --- a/thirdparty/grx249/fonts/char14.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab72f2a6094db8188fc85557a2c5f87409feb4d8c4d61bca7ea5ef6cf1d55065 -size 5594 diff --git a/thirdparty/grx249/fonts/char14b.fnt b/thirdparty/grx249/fonts/char14b.fnt deleted file mode 100644 index 8b80da5..0000000 --- a/thirdparty/grx249/fonts/char14b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2378e0d12a7e1e91375921688d464a70c41458f4b76c9809ae5c18e98dc36210 -size 5718 diff --git a/thirdparty/grx249/fonts/char14bi.fnt b/thirdparty/grx249/fonts/char14bi.fnt deleted file mode 100644 index 632abb0..0000000 --- a/thirdparty/grx249/fonts/char14bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0b90d45b662fc9f83b24f8e3eccaa943f4c2ef3ffc80914e72457c320b24898 -size 5662 diff --git a/thirdparty/grx249/fonts/char14i.fnt b/thirdparty/grx249/fonts/char14i.fnt deleted file mode 100644 index a772df9..0000000 --- a/thirdparty/grx249/fonts/char14i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6146f52bb5479b02d23fc41e3218f8d7dba2f4440162b405c0bbf7e031879ab2 -size 5580 diff --git a/thirdparty/grx249/fonts/char16.fnt b/thirdparty/grx249/fonts/char16.fnt deleted file mode 100644 index e4e5278..0000000 --- a/thirdparty/grx249/fonts/char16.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b3bb92547f7440438f3f5ca343416cb8b57abe468ee09fd41a5cfbf55613794f -size 6468 diff --git a/thirdparty/grx249/fonts/char16b.fnt b/thirdparty/grx249/fonts/char16b.fnt deleted file mode 100644 index 290b094..0000000 --- a/thirdparty/grx249/fonts/char16b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ba0af27ec3f5b16f8a1f5e10ffc8650f6e471e8ad6fcfe06411a57fdf747b33e -size 6722 diff --git a/thirdparty/grx249/fonts/char16bi.fnt b/thirdparty/grx249/fonts/char16bi.fnt deleted file mode 100644 index b5f5bb1..0000000 --- a/thirdparty/grx249/fonts/char16bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ad88118fd0a4e971fd842adfaf6ee876db6163acae61582f30a6a98f4e55313 -size 6754 diff --git a/thirdparty/grx249/fonts/char16i.fnt b/thirdparty/grx249/fonts/char16i.fnt deleted file mode 100644 index db11b90..0000000 --- a/thirdparty/grx249/fonts/char16i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:918457c08b498e025e9cd52968595298b47718a8e22f144af3dca945d69b5570 -size 6580 diff --git a/thirdparty/grx249/fonts/char18.fnt b/thirdparty/grx249/fonts/char18.fnt deleted file mode 100644 index df1cfcd..0000000 --- a/thirdparty/grx249/fonts/char18.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:92d792c840477ed38a3915412d285b8b5ce88580ed8cfb1d49f286cc26138c3a -size 7366 diff --git a/thirdparty/grx249/fonts/char18b.fnt b/thirdparty/grx249/fonts/char18b.fnt deleted file mode 100644 index 3cc8651..0000000 --- a/thirdparty/grx249/fonts/char18b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0f6c9fd9f94537a0dc0c089fc3901e8be39a3a8549a6f22651e5aba2610298c -size 8516 diff --git a/thirdparty/grx249/fonts/char18bi.fnt b/thirdparty/grx249/fonts/char18bi.fnt deleted file mode 100644 index 221f502..0000000 --- a/thirdparty/grx249/fonts/char18bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:84bd5c3c423e786c9693f42cd1856ca7597608c79468f4bfa8fc46b074357e4d -size 8462 diff --git a/thirdparty/grx249/fonts/char18i.fnt b/thirdparty/grx249/fonts/char18i.fnt deleted file mode 100644 index b9c262b..0000000 --- a/thirdparty/grx249/fonts/char18i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be5a2ee6a8a2902c9715cf433cfdd5d7b5f429f0df59683d58ee9e34202d9e63 -size 7522 diff --git a/thirdparty/grx249/fonts/char23.fnt b/thirdparty/grx249/fonts/char23.fnt deleted file mode 100644 index e7a9be3..0000000 --- a/thirdparty/grx249/fonts/char23.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:af8b0a6b6c2440cc69f82f2d0080c1f7ffce51ecb2b15f210725c19f375fe393 -size 10905 diff --git a/thirdparty/grx249/fonts/char23b.fnt b/thirdparty/grx249/fonts/char23b.fnt deleted file mode 100644 index 7379d37..0000000 --- a/thirdparty/grx249/fonts/char23b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a0a0c91f472bc49b073f14ca7ca773674d724254c97dda1a4f512340cd05139e -size 11271 diff --git a/thirdparty/grx249/fonts/char23bi.fnt b/thirdparty/grx249/fonts/char23bi.fnt deleted file mode 100644 index cc7d2b4..0000000 --- a/thirdparty/grx249/fonts/char23bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:80988a1f0090bac72502335a62fd7ba6b5adad0f738338980ca1f5c8be3f075c -size 11363 diff --git a/thirdparty/grx249/fonts/char23i.fnt b/thirdparty/grx249/fonts/char23i.fnt deleted file mode 100644 index 9b7c470..0000000 --- a/thirdparty/grx249/fonts/char23i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:07851b3dde94f1b75dea2fb65c935488ab07f33e8171357bf1ccbce4ebf35941 -size 10963 diff --git a/thirdparty/grx249/fonts/char30.fnt b/thirdparty/grx249/fonts/char30.fnt deleted file mode 100644 index 97b134f..0000000 --- a/thirdparty/grx249/fonts/char30.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ebcf6faa4440cd730b8ea7e9f249667bca7432a3d0d447302b82690b2044ddbd -size 15197 diff --git a/thirdparty/grx249/fonts/char30b.fnt b/thirdparty/grx249/fonts/char30b.fnt deleted file mode 100644 index 90ab77a..0000000 --- a/thirdparty/grx249/fonts/char30b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b93c602c3a74bc8878461e7f1e3b40830f1c63d41474ad488a8eba9efb006a09 -size 16725 diff --git a/thirdparty/grx249/fonts/char30bi.fnt b/thirdparty/grx249/fonts/char30bi.fnt deleted file mode 100644 index c2ed61e..0000000 --- a/thirdparty/grx249/fonts/char30bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6202bb3ea976396a6cd2d75282fc7ad59b46fb40478bdcc7f664e3739496a8f7 -size 16815 diff --git a/thirdparty/grx249/fonts/char30i.fnt b/thirdparty/grx249/fonts/char30i.fnt deleted file mode 100644 index 7fd8b0c..0000000 --- a/thirdparty/grx249/fonts/char30i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b2acf7c9624a7e15f86924036e163a5ce19de04ffeb84ac5e2ec9cdfb10e25d -size 15737 diff --git a/thirdparty/grx249/fonts/char40.fnt b/thirdparty/grx249/fonts/char40.fnt deleted file mode 100644 index d664749..0000000 --- a/thirdparty/grx249/fonts/char40.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ebc6cfbe9602fabb8fdfd3fdf7244f746901c95cdf3c0ee55a06e4580131945f -size 26459 diff --git a/thirdparty/grx249/fonts/char40b.fnt b/thirdparty/grx249/fonts/char40b.fnt deleted file mode 100644 index b670d74..0000000 --- a/thirdparty/grx249/fonts/char40b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3f4f44987c0c124446e762c4ae7ed05571d370238319ed789ee4ac5c3b0ba1e4 -size 28137 diff --git a/thirdparty/grx249/fonts/char40bi.fnt b/thirdparty/grx249/fonts/char40bi.fnt deleted file mode 100644 index d04ec24..0000000 --- a/thirdparty/grx249/fonts/char40bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f53d22a2f86c7646c9466b313465cd976cbf748a49d57020a9d7ac3e532ab7bd -size 28817 diff --git a/thirdparty/grx249/fonts/char40i.fnt b/thirdparty/grx249/fonts/char40i.fnt deleted file mode 100644 index e0592c8..0000000 --- a/thirdparty/grx249/fonts/char40i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd0b51357b76118a1496e2cad0cd512646d9b106924cdf9e07a86246a30af441 -size 26539 diff --git a/thirdparty/grx249/fonts/cour11.fnt b/thirdparty/grx249/fonts/cour11.fnt deleted file mode 100644 index ccfcf3b..0000000 --- a/thirdparty/grx249/fonts/cour11.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3d55d623c1482adee621627c60ab623c69a8d6a4ad3ed0a39dec75067dc1d682 -size 2858 diff --git a/thirdparty/grx249/fonts/cour11b.fnt b/thirdparty/grx249/fonts/cour11b.fnt deleted file mode 100644 index 5f21459..0000000 --- a/thirdparty/grx249/fonts/cour11b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:37acd5bec3a5178c13b9d20146286182419cf84abdb9a903efbd06468312db85 -size 2856 diff --git a/thirdparty/grx249/fonts/cour11bi.fnt b/thirdparty/grx249/fonts/cour11bi.fnt deleted file mode 100644 index 95ece74..0000000 --- a/thirdparty/grx249/fonts/cour11bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3011be65ddba335b87b1080ea4c6230336a2ea027edaf0dfd450ac214c11722c -size 2856 diff --git a/thirdparty/grx249/fonts/cour11i.fnt b/thirdparty/grx249/fonts/cour11i.fnt deleted file mode 100644 index 4f33e11..0000000 --- a/thirdparty/grx249/fonts/cour11i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a65747e873bc1bc6abeb24936bd53e4cb2d50a578c96440af7d172053a2ecd79 -size 2858 diff --git a/thirdparty/grx249/fonts/cour12.fnt b/thirdparty/grx249/fonts/cour12.fnt deleted file mode 100644 index b719256..0000000 --- a/thirdparty/grx249/fonts/cour12.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00e93171c37110b1c5498dd9a2be7e351f68c24b048afede46c12deccf4f0ffd -size 2948 diff --git a/thirdparty/grx249/fonts/cour12b.fnt b/thirdparty/grx249/fonts/cour12b.fnt deleted file mode 100644 index b438e01..0000000 --- a/thirdparty/grx249/fonts/cour12b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d701411d0cb7b70a15aa0638c55ac9cf6c8e0a3366c9f249af09927ab6eab49b -size 2946 diff --git a/thirdparty/grx249/fonts/cour12bi.fnt b/thirdparty/grx249/fonts/cour12bi.fnt deleted file mode 100644 index 951c3f1..0000000 --- a/thirdparty/grx249/fonts/cour12bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b9bbb8a2fcdabf5ddd169d766c27ea47d413cfacd9006fe0845b72866f906a4a -size 4086 diff --git a/thirdparty/grx249/fonts/cour12i.fnt b/thirdparty/grx249/fonts/cour12i.fnt deleted file mode 100644 index e1f8581..0000000 --- a/thirdparty/grx249/fonts/cour12i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c8488e72a678280afeca3a2846bab4d3374c573b27ac3b118a28c9a368e7933 -size 2948 diff --git a/thirdparty/grx249/fonts/cour14.fnt b/thirdparty/grx249/fonts/cour14.fnt deleted file mode 100644 index 5d2c8a7..0000000 --- a/thirdparty/grx249/fonts/cour14.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e6f314045bbc473be7d1196c17c9aa905a277c0510b8415948565caea55761da -size 3145 diff --git a/thirdparty/grx249/fonts/cour14b.fnt b/thirdparty/grx249/fonts/cour14b.fnt deleted file mode 100644 index 64fb25a..0000000 --- a/thirdparty/grx249/fonts/cour14b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:da17b47345fd17e7505b774c7f68b95c7d0cde4db9d7b50b70ead42e1e86b543 -size 3144 diff --git a/thirdparty/grx249/fonts/cour14bi.fnt b/thirdparty/grx249/fonts/cour14bi.fnt deleted file mode 100644 index 86b9f40..0000000 --- a/thirdparty/grx249/fonts/cour14bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1c9658fe82f56bbed39d764c4ed52cfdc4b9aac9089c7958feefed8c0d034c3c -size 4473 diff --git a/thirdparty/grx249/fonts/cour14i.fnt b/thirdparty/grx249/fonts/cour14i.fnt deleted file mode 100644 index db22ade..0000000 --- a/thirdparty/grx249/fonts/cour14i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1c9771dd0b49f8ab7a965eaa7c4cfd296160b39ea0fd779b682a100bf070f109 -size 4475 diff --git a/thirdparty/grx249/fonts/cour16.fnt b/thirdparty/grx249/fonts/cour16.fnt deleted file mode 100644 index 1e5365f..0000000 --- a/thirdparty/grx249/fonts/cour16.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c83cb3f7e5bc52b77664c175b712891cbdbd4fff821340ab03e8c85d47bccce5 -size 4855 diff --git a/thirdparty/grx249/fonts/cour16b.fnt b/thirdparty/grx249/fonts/cour16b.fnt deleted file mode 100644 index 9f2ba25..0000000 --- a/thirdparty/grx249/fonts/cour16b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:694c22dc7f8be068ce4b7a37ebccafdcc57dc4a20ce1e21bbbcb1e50c0cac772 -size 4853 diff --git a/thirdparty/grx249/fonts/cour16bi.fnt b/thirdparty/grx249/fonts/cour16bi.fnt deleted file mode 100644 index 200252b..0000000 --- a/thirdparty/grx249/fonts/cour16bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dda32267d811bba7683de8ae56385ca4c39ff83c883989f7c095a4c8a9f22bd9 -size 4853 diff --git a/thirdparty/grx249/fonts/cour16i.fnt b/thirdparty/grx249/fonts/cour16i.fnt deleted file mode 100644 index e29d333..0000000 --- a/thirdparty/grx249/fonts/cour16i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:32528fdc5e57612ccc80d8722cdf8e2937c5b15c331113a8e0af85e73e76587d -size 4855 diff --git a/thirdparty/grx249/fonts/cour20.fnt b/thirdparty/grx249/fonts/cour20.fnt deleted file mode 100644 index 2e5219f..0000000 --- a/thirdparty/grx249/fonts/cour20.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b838cb20f160582227225c5c5aba925b8209cd1c1fb77723ffc671a98402a96e -size 5609 diff --git a/thirdparty/grx249/fonts/cour20b.fnt b/thirdparty/grx249/fonts/cour20b.fnt deleted file mode 100644 index e744c8e..0000000 --- a/thirdparty/grx249/fonts/cour20b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea3a7235d0bff5ea45189e6d48bf8bdeefac1e0c4f9ba1195cfff90b7ad89be8 -size 5614 diff --git a/thirdparty/grx249/fonts/cour20bi.fnt b/thirdparty/grx249/fonts/cour20bi.fnt deleted file mode 100644 index f50f808..0000000 --- a/thirdparty/grx249/fonts/cour20bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a4ec6fdbc22daba4f84bec69859086257b29093637c7b98436bb97679802c34 -size 5614 diff --git a/thirdparty/grx249/fonts/cour20i.fnt b/thirdparty/grx249/fonts/cour20i.fnt deleted file mode 100644 index a5acb1f..0000000 --- a/thirdparty/grx249/fonts/cour20i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec0fa3e41684278d6b2dda66a93fa076c194aa6093bbc8fd81f39b27b4d66821 -size 5609 diff --git a/thirdparty/grx249/fonts/cour25.fnt b/thirdparty/grx249/fonts/cour25.fnt deleted file mode 100644 index 3d17fe2..0000000 --- a/thirdparty/grx249/fonts/cour25.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3def672d047421077a3f2d586c1b73d5502dd0256919a9d7b770c9e642158e2c -size 6559 diff --git a/thirdparty/grx249/fonts/cour25b.fnt b/thirdparty/grx249/fonts/cour25b.fnt deleted file mode 100644 index 33f0101..0000000 --- a/thirdparty/grx249/fonts/cour25b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c29ef4d3e8f42fc8066adb1dab42dafdf13c19c507e1271fa14b58a8f2805a37 -size 6564 diff --git a/thirdparty/grx249/fonts/cour25bi.fnt b/thirdparty/grx249/fonts/cour25bi.fnt deleted file mode 100644 index 5f2b559..0000000 --- a/thirdparty/grx249/fonts/cour25bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6000c593437a611760703d51d3033764f222efd9f7e691047a3e4644e4fe0ff4 -size 8939 diff --git a/thirdparty/grx249/fonts/cour25i.fnt b/thirdparty/grx249/fonts/cour25i.fnt deleted file mode 100644 index 808994a..0000000 --- a/thirdparty/grx249/fonts/cour25i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e370ca188133ca3bbb3ca458b8d6a0de389fee6b740c290f45dd0061fd571cfc -size 8934 diff --git a/thirdparty/grx249/fonts/cour34.fnt b/thirdparty/grx249/fonts/cour34.fnt deleted file mode 100644 index 3cbb8e4..0000000 --- a/thirdparty/grx249/fonts/cour34.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d95725374a316cc780e2335c1ef32eefdcd346e9c87f32a2d32167f099c90e7c -size 11533 diff --git a/thirdparty/grx249/fonts/cour34b.fnt b/thirdparty/grx249/fonts/cour34b.fnt deleted file mode 100644 index 287cdf9..0000000 --- a/thirdparty/grx249/fonts/cour34b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:04990b3e7bce36bec2e03abd9f0a0cd45570f343b330acbba31ec13ecb9bd770 -size 11531 diff --git a/thirdparty/grx249/fonts/cour34bi.fnt b/thirdparty/grx249/fonts/cour34bi.fnt deleted file mode 100644 index 3076dc0..0000000 --- a/thirdparty/grx249/fonts/cour34bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a94ace3fca044a9cdf1da6511ef4bf9b2448920731f38fb74d5305517b683ff1 -size 14761 diff --git a/thirdparty/grx249/fonts/cour34i.fnt b/thirdparty/grx249/fonts/cour34i.fnt deleted file mode 100644 index ee3873f..0000000 --- a/thirdparty/grx249/fonts/cour34i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a38b4b4878bb93ba1e752ee7c0f81510a624ee5bbd33a74368e3af1ffea73240 -size 11533 diff --git a/thirdparty/grx249/fonts/helv11.fnt b/thirdparty/grx249/fonts/helv11.fnt deleted file mode 100644 index 85553a0..0000000 --- a/thirdparty/grx249/fonts/helv11.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c934d8f90e7792ffd9acd2c666f8cbd9be92b464da6370a2b82b787586a2c764 -size 3112 diff --git a/thirdparty/grx249/fonts/helv11b.fnt b/thirdparty/grx249/fonts/helv11b.fnt deleted file mode 100644 index 2f7e7e5..0000000 --- a/thirdparty/grx249/fonts/helv11b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:60ed5e029f311b44319423a355ef44840cb36d52dc2ebdb42c2be5b00db51b9d -size 3122 diff --git a/thirdparty/grx249/fonts/helv11bi.fnt b/thirdparty/grx249/fonts/helv11bi.fnt deleted file mode 100644 index f939bc1..0000000 --- a/thirdparty/grx249/fonts/helv11bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:28a9fbc76b772fac800ad094f0599acc73fb1e5fa8549734b1c012bb628c1f24 -size 3122 diff --git a/thirdparty/grx249/fonts/helv11i.fnt b/thirdparty/grx249/fonts/helv11i.fnt deleted file mode 100644 index 7c44cf8..0000000 --- a/thirdparty/grx249/fonts/helv11i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d4285d6a82770d8cdc8783518275411a3195637e7f1ccd04b4b74c53cc48df7 -size 3113 diff --git a/thirdparty/grx249/fonts/helv13.fnt b/thirdparty/grx249/fonts/helv13.fnt deleted file mode 100644 index b33a3af..0000000 --- a/thirdparty/grx249/fonts/helv13.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:61882c5ef0a9abeb9deb7d158cb0646191805a35f884542d3d10c26e12664cc3 -size 3345 diff --git a/thirdparty/grx249/fonts/helv13b.fnt b/thirdparty/grx249/fonts/helv13b.fnt deleted file mode 100644 index 75489ac..0000000 --- a/thirdparty/grx249/fonts/helv13b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed3f004dddfd87aad45f209ec19e71a4e53aae1d8103ef8e5b8c59680d16c8c3 -size 3357 diff --git a/thirdparty/grx249/fonts/helv13bi.fnt b/thirdparty/grx249/fonts/helv13bi.fnt deleted file mode 100644 index 9641c81..0000000 --- a/thirdparty/grx249/fonts/helv13bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20015f391349b6d8adf8795b9bf9259ec6c0efb67f5d3a14c42942e7912f225c -size 3396 diff --git a/thirdparty/grx249/fonts/helv13i.fnt b/thirdparty/grx249/fonts/helv13i.fnt deleted file mode 100644 index 54746a8..0000000 --- a/thirdparty/grx249/fonts/helv13i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6e41a4088d5acabf7078749bbd08c554de654a06f8d34967d5a68ca0bb7e3dd0 -size 3346 diff --git a/thirdparty/grx249/fonts/helv15.fnt b/thirdparty/grx249/fonts/helv15.fnt deleted file mode 100644 index fa2339f..0000000 --- a/thirdparty/grx249/fonts/helv15.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d0952c4870ec6cee65d63f5d6e3aaf7b6c3942de93ea4d3d6ecc1bdb0b98ff2a -size 3768 diff --git a/thirdparty/grx249/fonts/helv15b.fnt b/thirdparty/grx249/fonts/helv15b.fnt deleted file mode 100644 index 3862333..0000000 --- a/thirdparty/grx249/fonts/helv15b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:89464ee7788c6ccf1126430cff74f4d65a3c76f6625b464311b842207a5a2531 -size 3752 diff --git a/thirdparty/grx249/fonts/helv15bi.fnt b/thirdparty/grx249/fonts/helv15bi.fnt deleted file mode 100644 index ad78b2c..0000000 --- a/thirdparty/grx249/fonts/helv15bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3c883addd9fdec2931c77293a2272b49441ae471f3c84a256518b550a1a07bae -size 3977 diff --git a/thirdparty/grx249/fonts/helv15i.fnt b/thirdparty/grx249/fonts/helv15i.fnt deleted file mode 100644 index d8276a6..0000000 --- a/thirdparty/grx249/fonts/helv15i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8876e639a7d1aabfa1c5731beac01337db72b9dcf53e680edae711edaf1c35b5 -size 3919 diff --git a/thirdparty/grx249/fonts/helv17.fnt b/thirdparty/grx249/fonts/helv17.fnt deleted file mode 100644 index 8526ce1..0000000 --- a/thirdparty/grx249/fonts/helv17.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ffaf2922a515ea33ea92173aca62160f695a4f16f77fd9bc7eebc73baf44e285 -size 4200 diff --git a/thirdparty/grx249/fonts/helv17b.fnt b/thirdparty/grx249/fonts/helv17b.fnt deleted file mode 100644 index 3e315cc..0000000 --- a/thirdparty/grx249/fonts/helv17b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5ff51b756754097b856d0377f371163c7a7b76c091d283b83c478f17df1670e7 -size 4386 diff --git a/thirdparty/grx249/fonts/helv17bi.fnt b/thirdparty/grx249/fonts/helv17bi.fnt deleted file mode 100644 index eb2db17..0000000 --- a/thirdparty/grx249/fonts/helv17bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1211c73640d54275e9f79e9158eb182ecba16da0d7d019c1d626843422481f9c -size 4811 diff --git a/thirdparty/grx249/fonts/helv17i.fnt b/thirdparty/grx249/fonts/helv17i.fnt deleted file mode 100644 index c58d76d..0000000 --- a/thirdparty/grx249/fonts/helv17i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4347b0927fa3facf9eae939a991909e6f1c859cd629beee5f09ac2f9f8d0cea3 -size 4388 diff --git a/thirdparty/grx249/fonts/helv22.fnt b/thirdparty/grx249/fonts/helv22.fnt deleted file mode 100644 index 6a9dd89..0000000 --- a/thirdparty/grx249/fonts/helv22.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a4e6d0a3d0b73711f3d57d736d2662c061e7710f62d66e588f918f0e33e457e6 -size 5710 diff --git a/thirdparty/grx249/fonts/helv22b.fnt b/thirdparty/grx249/fonts/helv22b.fnt deleted file mode 100644 index 93541e7..0000000 --- a/thirdparty/grx249/fonts/helv22b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dfc7b6117aa898dfa3b126c4dec0637c7663d78fc4359bb4843482c2940f8302 -size 5732 diff --git a/thirdparty/grx249/fonts/helv22bi.fnt b/thirdparty/grx249/fonts/helv22bi.fnt deleted file mode 100644 index 7aad81c..0000000 --- a/thirdparty/grx249/fonts/helv22bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c7703c7b2bd7f7cec47340a1f088aef795fae7dfa6926d2a1080602f4e2c457 -size 5930 diff --git a/thirdparty/grx249/fonts/helv22i.fnt b/thirdparty/grx249/fonts/helv22i.fnt deleted file mode 100644 index 909ffc0..0000000 --- a/thirdparty/grx249/fonts/helv22i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1b5cdc09bf383dcc58416e140bd0f2428bd4bf13f075b06d685a59202d68f9c -size 5799 diff --git a/thirdparty/grx249/fonts/helv29.fnt b/thirdparty/grx249/fonts/helv29.fnt deleted file mode 100644 index 94a473d..0000000 --- a/thirdparty/grx249/fonts/helv29.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11f69058526ab3742d24af3aec7494f2bb25624e2d6605bfa1fc968f80245604 -size 7511 diff --git a/thirdparty/grx249/fonts/helv29b.fnt b/thirdparty/grx249/fonts/helv29b.fnt deleted file mode 100644 index aaee29d..0000000 --- a/thirdparty/grx249/fonts/helv29b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3b5a2303339128d311801feda19204fb778d85f4838dbb9b022a79dbc5527265 -size 7713 diff --git a/thirdparty/grx249/fonts/helv29bi.fnt b/thirdparty/grx249/fonts/helv29bi.fnt deleted file mode 100644 index 2b0a23d..0000000 --- a/thirdparty/grx249/fonts/helv29bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:503d63640fa933923b2a163577a8ba06a675bc3592a2bbc0fdea21ce748e4afc -size 8438 diff --git a/thirdparty/grx249/fonts/helv29i.fnt b/thirdparty/grx249/fonts/helv29i.fnt deleted file mode 100644 index 65708a8..0000000 --- a/thirdparty/grx249/fonts/helv29i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:db5e57f92fcce2363e233fc15656f8ece7725d110fa2d01fe83726c4373051eb -size 8063 diff --git a/thirdparty/grx249/fonts/helv38.fnt b/thirdparty/grx249/fonts/helv38.fnt deleted file mode 100644 index 2befa6a..0000000 --- a/thirdparty/grx249/fonts/helv38.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67f3aff9f3e3337e457ff3846a7ea4165192d09cb1b1b5201c526e55cd3afb41 -size 11708 diff --git a/thirdparty/grx249/fonts/helv38b.fnt b/thirdparty/grx249/fonts/helv38b.fnt deleted file mode 100644 index af505ee..0000000 --- a/thirdparty/grx249/fonts/helv38b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:767bcffcb0cbb0b1eb02a2185dc953ebd5061ae34111a8a68d91da805e4c6a7a -size 12276 diff --git a/thirdparty/grx249/fonts/helv38bi.fnt b/thirdparty/grx249/fonts/helv38bi.fnt deleted file mode 100644 index cd7a586..0000000 --- a/thirdparty/grx249/fonts/helv38bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b58b3a685ecfcebefd74e9e9724862f59d28f197293a317ce292e1b274d19cd7 -size 12884 diff --git a/thirdparty/grx249/fonts/helv38i.fnt b/thirdparty/grx249/fonts/helv38i.fnt deleted file mode 100644 index 82bfd9e..0000000 --- a/thirdparty/grx249/fonts/helv38i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc8fd5c48f3b810880f99a43de0f6cc24e0dba02b4ab960cf6ea5da2f69f25eb -size 12734 diff --git a/thirdparty/grx249/fonts/lucb11.fnt b/thirdparty/grx249/fonts/lucb11.fnt deleted file mode 100644 index d0a1a53..0000000 --- a/thirdparty/grx249/fonts/lucb11.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7cdde45be108c9957aa459cb02734d595aefbc7c2cb4848be1b4f60d7a33a01d -size 3302 diff --git a/thirdparty/grx249/fonts/lucb11b.fnt b/thirdparty/grx249/fonts/lucb11b.fnt deleted file mode 100644 index 1f821ba..0000000 --- a/thirdparty/grx249/fonts/lucb11b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:01f945d7d94f0435bafcfc6b08fe50042ec2c0b2276fc64873dff829ea57bc30 -size 3302 diff --git a/thirdparty/grx249/fonts/lucb11bi.fnt b/thirdparty/grx249/fonts/lucb11bi.fnt deleted file mode 100644 index 499a05a..0000000 --- a/thirdparty/grx249/fonts/lucb11bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72ee960ba3f8d960b277a1b9be6f470fb9d6fa3ec661c5b0f8af89659026fe8a -size 3346 diff --git a/thirdparty/grx249/fonts/lucb11i.fnt b/thirdparty/grx249/fonts/lucb11i.fnt deleted file mode 100644 index c5b2da3..0000000 --- a/thirdparty/grx249/fonts/lucb11i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2c5f9067ba9215d8365fa21571a6086e633a833c9757f8bc615aaa1abf63281 -size 3291 diff --git a/thirdparty/grx249/fonts/lucb12.fnt b/thirdparty/grx249/fonts/lucb12.fnt deleted file mode 100644 index 2bb1ea4..0000000 --- a/thirdparty/grx249/fonts/lucb12.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:97641b4de61078791cd70df3d177b66b104ec06a51d6fe1c180d5f4958f3c0b5 -size 3673 diff --git a/thirdparty/grx249/fonts/lucb12b.fnt b/thirdparty/grx249/fonts/lucb12b.fnt deleted file mode 100644 index 1d84d47..0000000 --- a/thirdparty/grx249/fonts/lucb12b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98f47a8bfb678ce1c2ce9db437f3eb899096e25bcd3692746c80d0dc5e56d65b -size 3697 diff --git a/thirdparty/grx249/fonts/lucb12bi.fnt b/thirdparty/grx249/fonts/lucb12bi.fnt deleted file mode 100644 index 6f243b9..0000000 --- a/thirdparty/grx249/fonts/lucb12bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5727de12923ad08aa2962406d0d8051f070adad167cfa157df57f206523dd0f5 -size 3829 diff --git a/thirdparty/grx249/fonts/lucb12i.fnt b/thirdparty/grx249/fonts/lucb12i.fnt deleted file mode 100644 index c8c3bf9..0000000 --- a/thirdparty/grx249/fonts/lucb12i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0d4eb265756b34d55d19e8d2a3e3268384b68756e55591cfd336de88532f80f1 -size 3757 diff --git a/thirdparty/grx249/fonts/lucb15.fnt b/thirdparty/grx249/fonts/lucb15.fnt deleted file mode 100644 index ffc21d7..0000000 --- a/thirdparty/grx249/fonts/lucb15.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0791e65951092058a95c10c91026a7e988ca8dcbdc46de27024d93cda5096774 -size 4789 diff --git a/thirdparty/grx249/fonts/lucb15b.fnt b/thirdparty/grx249/fonts/lucb15b.fnt deleted file mode 100644 index 7a9c6a9..0000000 --- a/thirdparty/grx249/fonts/lucb15b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb0d45db30e7ed3ab8711a6002bdde7b64c10df72d9c4177ea219a25e25ceaf5 -size 4939 diff --git a/thirdparty/grx249/fonts/lucb15bi.fnt b/thirdparty/grx249/fonts/lucb15bi.fnt deleted file mode 100644 index ff68a3b..0000000 --- a/thirdparty/grx249/fonts/lucb15bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12c288e34eb5ac244f5f50cad7814e278103448961e7256655c31ca5b8661696 -size 5059 diff --git a/thirdparty/grx249/fonts/lucb15i.fnt b/thirdparty/grx249/fonts/lucb15i.fnt deleted file mode 100644 index 52cb6b2..0000000 --- a/thirdparty/grx249/fonts/lucb15i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15368685bcd6b56cdaec26a1f0af1018af458592137edb707e8627fca98c722e -size 4999 diff --git a/thirdparty/grx249/fonts/lucb17.fnt b/thirdparty/grx249/fonts/lucb17.fnt deleted file mode 100644 index b975454..0000000 --- a/thirdparty/grx249/fonts/lucb17.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:45ff77f487cd9ae9d27c16a63c9a9cb04eda26e24d256d44dd99e8688b089183 -size 6318 diff --git a/thirdparty/grx249/fonts/lucb17b.fnt b/thirdparty/grx249/fonts/lucb17b.fnt deleted file mode 100644 index 224ecfb..0000000 --- a/thirdparty/grx249/fonts/lucb17b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d9ec0efd679cdf5609efc08d7df4905439554a26b312d8aa09880103c489513 -size 6660 diff --git a/thirdparty/grx249/fonts/lucb17bi.fnt b/thirdparty/grx249/fonts/lucb17bi.fnt deleted file mode 100644 index c2342e7..0000000 --- a/thirdparty/grx249/fonts/lucb17bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d1aec367d4e9dbd25de1088f733b69e2822f0bd8735df6d2dd1f4554afd913ca -size 6949 diff --git a/thirdparty/grx249/fonts/lucb17i.fnt b/thirdparty/grx249/fonts/lucb17i.fnt deleted file mode 100644 index 63e3675..0000000 --- a/thirdparty/grx249/fonts/lucb17i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:77e9708bb75cb622b6092ed3776c44c6d2c63627791a890c5bb8aa0e9569178a -size 6726 diff --git a/thirdparty/grx249/fonts/lucb21.fnt b/thirdparty/grx249/fonts/lucb21.fnt deleted file mode 100644 index 6ace297..0000000 --- a/thirdparty/grx249/fonts/lucb21.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b59199c62efe743828731f7610f586551ad22b6ff9e71f451f0e28251fd10ef -size 8852 diff --git a/thirdparty/grx249/fonts/lucb21b.fnt b/thirdparty/grx249/fonts/lucb21b.fnt deleted file mode 100644 index 22fe3d8..0000000 --- a/thirdparty/grx249/fonts/lucb21b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:db2618fb6d35c81577624334dd7d80eabc05fb7a8bf9b52acbdc7a8f376004b5 -size 8873 diff --git a/thirdparty/grx249/fonts/lucb21bi.fnt b/thirdparty/grx249/fonts/lucb21bi.fnt deleted file mode 100644 index 482c0b0..0000000 --- a/thirdparty/grx249/fonts/lucb21bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc5be089790fd9cc7f66d0b1d393e8492ae9aa9d5abe2cf71c998a803e605fff -size 9272 diff --git a/thirdparty/grx249/fonts/lucb21i.fnt b/thirdparty/grx249/fonts/lucb21i.fnt deleted file mode 100644 index 178b417..0000000 --- a/thirdparty/grx249/fonts/lucb21i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6d50c1755b484a90e0626aad6284ba64d1c0897090b857e6515b25b8bfdebf53 -size 9041 diff --git a/thirdparty/grx249/fonts/lucb27.fnt b/thirdparty/grx249/fonts/lucb27.fnt deleted file mode 100644 index e248e04..0000000 --- a/thirdparty/grx249/fonts/lucb27.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c0ae42f59b7cf2b32a8601765fa75a73fc027f228bb84e5c9741aee7b424a0c -size 12492 diff --git a/thirdparty/grx249/fonts/lucb27b.fnt b/thirdparty/grx249/fonts/lucb27b.fnt deleted file mode 100644 index e7bace0..0000000 --- a/thirdparty/grx249/fonts/lucb27b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3fc19f35a5998769ec98c9d9ada36483eef52dbfcbdb1c9bde728dc0b889fbc4 -size 12683 diff --git a/thirdparty/grx249/fonts/lucb27bi.fnt b/thirdparty/grx249/fonts/lucb27bi.fnt deleted file mode 100644 index 1f572c9..0000000 --- a/thirdparty/grx249/fonts/lucb27bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bef6f7dc81d831f3508c07ee5e8bfe354e681878e99c15da0ae016fb4d19294a -size 13817 diff --git a/thirdparty/grx249/fonts/lucb27i.fnt b/thirdparty/grx249/fonts/lucb27i.fnt deleted file mode 100644 index e8dc146..0000000 --- a/thirdparty/grx249/fonts/lucb27i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a4d8bc4039905730071859ffda8a053b1bc3bbebfc4bb1b62f52a425827ab345 -size 13142 diff --git a/thirdparty/grx249/fonts/lucb40.fnt b/thirdparty/grx249/fonts/lucb40.fnt deleted file mode 100644 index a40a2e1..0000000 --- a/thirdparty/grx249/fonts/lucb40.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7fec44807673f8e6fc73941f083e6efe660e819ebde1f26997a0dfa89628c63b -size 26230 diff --git a/thirdparty/grx249/fonts/lucb40b.fnt b/thirdparty/grx249/fonts/lucb40b.fnt deleted file mode 100644 index f1013cc..0000000 --- a/thirdparty/grx249/fonts/lucb40b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3d1884744d7a03326afd8b5d0f9e178fa3d495a1aa27765b3167fd6122fc2ee4 -size 27272 diff --git a/thirdparty/grx249/fonts/lucb40bi.fnt b/thirdparty/grx249/fonts/lucb40bi.fnt deleted file mode 100644 index 406fa7b..0000000 --- a/thirdparty/grx249/fonts/lucb40bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ad92e9db309f25be75514c0575a7746628a33adfe2cde2464fd683bf3443fbd -size 28552 diff --git a/thirdparty/grx249/fonts/lucb40i.fnt b/thirdparty/grx249/fonts/lucb40i.fnt deleted file mode 100644 index b5942ac..0000000 --- a/thirdparty/grx249/fonts/lucb40i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e4da5119654a8a05e05e19637b34e8afc06496a359a0cb2f13ed2dc0c386915 -size 27510 diff --git a/thirdparty/grx249/fonts/lucs11.fnt b/thirdparty/grx249/fonts/lucs11.fnt deleted file mode 100644 index 878aed9..0000000 --- a/thirdparty/grx249/fonts/lucs11.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ead851a96aa09d02a245d549727bf70b8c90342dd5edd8a2b3f8b2047c9f1c89 -size 3289 diff --git a/thirdparty/grx249/fonts/lucs11b.fnt b/thirdparty/grx249/fonts/lucs11b.fnt deleted file mode 100644 index 8fbe742..0000000 --- a/thirdparty/grx249/fonts/lucs11b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed30fdc3b11ddf365b25f1745ac3bc9c929b99bd0bd39ed702e931df82ad2331 -size 3329 diff --git a/thirdparty/grx249/fonts/lucs11bi.fnt b/thirdparty/grx249/fonts/lucs11bi.fnt deleted file mode 100644 index 2706fd4..0000000 --- a/thirdparty/grx249/fonts/lucs11bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5a05579e3573daef77ff8ba83f0ea2e5eb4437499b7b03d8a73cb77e7b99c5e8 -size 3362 diff --git a/thirdparty/grx249/fonts/lucs11i.fnt b/thirdparty/grx249/fonts/lucs11i.fnt deleted file mode 100644 index 61fc9e9..0000000 --- a/thirdparty/grx249/fonts/lucs11i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:651df59f76696c28bd98fe1bea000338b556a37fe3560099dc27a2c8fa0e966f -size 3322 diff --git a/thirdparty/grx249/fonts/lucs12.fnt b/thirdparty/grx249/fonts/lucs12.fnt deleted file mode 100644 index f4f7821..0000000 --- a/thirdparty/grx249/fonts/lucs12.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:278a755fffdf1fd72b86e12bdb55cfb3783fdfa59e524e7d55858e07c64be1d2 -size 3670 diff --git a/thirdparty/grx249/fonts/lucs12b.fnt b/thirdparty/grx249/fonts/lucs12b.fnt deleted file mode 100644 index 6d0e61f..0000000 --- a/thirdparty/grx249/fonts/lucs12b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59a3e2c0c2d1349f6617d27aac4a091c4f1f25ca9a81fecbbfece9cd450d3c67 -size 3776 diff --git a/thirdparty/grx249/fonts/lucs12bi.fnt b/thirdparty/grx249/fonts/lucs12bi.fnt deleted file mode 100644 index 885e77f..0000000 --- a/thirdparty/grx249/fonts/lucs12bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:29490c9f75210a483565404f060a9a4d514df5dcaae66b471a15ac99593f3aef -size 3788 diff --git a/thirdparty/grx249/fonts/lucs12i.fnt b/thirdparty/grx249/fonts/lucs12i.fnt deleted file mode 100644 index 783f028..0000000 --- a/thirdparty/grx249/fonts/lucs12i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87be1de140cd7f3d1903e0fac1aef6142ffeb523139d532a56471f197200e05d -size 3670 diff --git a/thirdparty/grx249/fonts/lucs15.fnt b/thirdparty/grx249/fonts/lucs15.fnt deleted file mode 100644 index 881b0ed..0000000 --- a/thirdparty/grx249/fonts/lucs15.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:73c3ec55e528e2c41c3aaee943e6e8feb1a7da9756732486c0a34012970853c0 -size 4720 diff --git a/thirdparty/grx249/fonts/lucs15b.fnt b/thirdparty/grx249/fonts/lucs15b.fnt deleted file mode 100644 index 5884990..0000000 --- a/thirdparty/grx249/fonts/lucs15b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:73356076b922a0d367477b4b3b5c27a6e0f911e84f6c1fa846c6c2a146185a31 -size 5153 diff --git a/thirdparty/grx249/fonts/lucs15bi.fnt b/thirdparty/grx249/fonts/lucs15bi.fnt deleted file mode 100644 index 9c6b488..0000000 --- a/thirdparty/grx249/fonts/lucs15bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0c39ab521e1889e3b252210899c9500bb5dcb07047764dcca7b14fd21570a084 -size 5273 diff --git a/thirdparty/grx249/fonts/lucs15i.fnt b/thirdparty/grx249/fonts/lucs15i.fnt deleted file mode 100644 index 33149d6..0000000 --- a/thirdparty/grx249/fonts/lucs15i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7c118cfac7365a8635933f5dd161c12ab588caba20371ab7b02f165ea5c331e -size 4690 diff --git a/thirdparty/grx249/fonts/lucs17.fnt b/thirdparty/grx249/fonts/lucs17.fnt deleted file mode 100644 index 5f4b352..0000000 --- a/thirdparty/grx249/fonts/lucs17.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:975ea5e3010c8c67a002049ec04675a3a454620aa345f91a1af9f19554afcd21 -size 6392 diff --git a/thirdparty/grx249/fonts/lucs17b.fnt b/thirdparty/grx249/fonts/lucs17b.fnt deleted file mode 100644 index 7afa039..0000000 --- a/thirdparty/grx249/fonts/lucs17b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a42fcae2da6c7a970951e5d8f8cd6c0d40c3d3cbed403a8eb1a51d6810992133 -size 7087 diff --git a/thirdparty/grx249/fonts/lucs17bi.fnt b/thirdparty/grx249/fonts/lucs17bi.fnt deleted file mode 100644 index e4437e1..0000000 --- a/thirdparty/grx249/fonts/lucs17bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d80743c7b08a3edac52eeec9ca1203b9ee415926645730f72aa1e467c42c12c -size 7019 diff --git a/thirdparty/grx249/fonts/lucs17i.fnt b/thirdparty/grx249/fonts/lucs17i.fnt deleted file mode 100644 index 21b9565..0000000 --- a/thirdparty/grx249/fonts/lucs17i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6428b1a2066447b361aaa277440c0249d3a971f9600c562d6af860a6fe8949f6 -size 6630 diff --git a/thirdparty/grx249/fonts/lucs21.fnt b/thirdparty/grx249/fonts/lucs21.fnt deleted file mode 100644 index fadbf0c..0000000 --- a/thirdparty/grx249/fonts/lucs21.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8c39501ded06cb6d68d54d29c89a7a8730a70f4fc34e7a1360ef5d8a976dc73 -size 8684 diff --git a/thirdparty/grx249/fonts/lucs21b.fnt b/thirdparty/grx249/fonts/lucs21b.fnt deleted file mode 100644 index 9d6109f..0000000 --- a/thirdparty/grx249/fonts/lucs21b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e4e368f4e8ef06b6ccc5f1c0e899b2ca256666f3a4e598e96ce4aaef2fc07d0 -size 9039 diff --git a/thirdparty/grx249/fonts/lucs21bi.fnt b/thirdparty/grx249/fonts/lucs21bi.fnt deleted file mode 100644 index ceaf7e9..0000000 --- a/thirdparty/grx249/fonts/lucs21bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:92121a15bc2f36eeff4fa1c0ec8b1fceb2cb23c0cba76c6600c8092e03c85781 -size 9228 diff --git a/thirdparty/grx249/fonts/lucs21i.fnt b/thirdparty/grx249/fonts/lucs21i.fnt deleted file mode 100644 index a37bd94..0000000 --- a/thirdparty/grx249/fonts/lucs21i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e1c2f39fef961e1ec4f09ce0fd6d7edae2ac8560af639c41e6fcb9571d453b98 -size 8852 diff --git a/thirdparty/grx249/fonts/lucs27.fnt b/thirdparty/grx249/fonts/lucs27.fnt deleted file mode 100644 index b841d40..0000000 --- a/thirdparty/grx249/fonts/lucs27.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:000700a88cd99b982eade740af1600112b9c6c15bc5ecf47eee89c798ade474a -size 12492 diff --git a/thirdparty/grx249/fonts/lucs27b.fnt b/thirdparty/grx249/fonts/lucs27b.fnt deleted file mode 100644 index 17329f3..0000000 --- a/thirdparty/grx249/fonts/lucs27b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a4e700f9abe68c71f83a7412b6f66042ac142541a3bbf9aa8069ac20678d2ddd -size 13624 diff --git a/thirdparty/grx249/fonts/lucs27bi.fnt b/thirdparty/grx249/fonts/lucs27bi.fnt deleted file mode 100644 index 031b719..0000000 --- a/thirdparty/grx249/fonts/lucs27bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0b29e6c5efd47b14a6c9e8810b4c705aec2185cf3dbbb5fbdf442f8b6e67ecce -size 15325 diff --git a/thirdparty/grx249/fonts/lucs27i.fnt b/thirdparty/grx249/fonts/lucs27i.fnt deleted file mode 100644 index a3966a6..0000000 --- a/thirdparty/grx249/fonts/lucs27i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a847ad26b4a5717de11e956ab9dbc559f73742e051ed61ef0c99a251d1f887ac -size 13059 diff --git a/thirdparty/grx249/fonts/lucs40.fnt b/thirdparty/grx249/fonts/lucs40.fnt deleted file mode 100644 index ed80356..0000000 --- a/thirdparty/grx249/fonts/lucs40.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:41df25a6a23e01a24909108abcf8b3e82eaac237a55023ec94cf28555e9ca5cd -size 26108 diff --git a/thirdparty/grx249/fonts/lucs40b.fnt b/thirdparty/grx249/fonts/lucs40b.fnt deleted file mode 100644 index dd43f76..0000000 --- a/thirdparty/grx249/fonts/lucs40b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:baf263e2adbb565ea575238639c14f2d7f48757f5cfc71a560c2c9883abf23d3 -size 27388 diff --git a/thirdparty/grx249/fonts/lucs40bi.fnt b/thirdparty/grx249/fonts/lucs40bi.fnt deleted file mode 100644 index 00c1e6f..0000000 --- a/thirdparty/grx249/fonts/lucs40bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c72ff86775f8988a1bac2ee4bf12d00cac3ff60dd5053ad34671fbfb5472e07e -size 29226 diff --git a/thirdparty/grx249/fonts/lucs40i.fnt b/thirdparty/grx249/fonts/lucs40i.fnt deleted file mode 100644 index 5f45781..0000000 --- a/thirdparty/grx249/fonts/lucs40i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7ff224817d1b5b6e4d4706d2536913cd43ba3eeedba2866943ea087078560676 -size 26988 diff --git a/thirdparty/grx249/fonts/luct10.fnt b/thirdparty/grx249/fonts/luct10.fnt deleted file mode 100644 index c51cd1c..0000000 --- a/thirdparty/grx249/fonts/luct10.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1ec9b744cd8e586860333d498bac64ca5082a0e84ec2a56c26ab15814700d46f -size 2627 diff --git a/thirdparty/grx249/fonts/luct10b.fnt b/thirdparty/grx249/fonts/luct10b.fnt deleted file mode 100644 index 7c5cd27..0000000 --- a/thirdparty/grx249/fonts/luct10b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a48d616bc26a4fbd569583b48f79d3779f114af3597a6fc9ca9063831d73cd1e -size 2623 diff --git a/thirdparty/grx249/fonts/luct11.fnt b/thirdparty/grx249/fonts/luct11.fnt deleted file mode 100644 index 9b96e70..0000000 --- a/thirdparty/grx249/fonts/luct11.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bfc0bcc52883c560553572016fa6d6972aed6026fa189cda67f2361a8db333cb -size 2878 diff --git a/thirdparty/grx249/fonts/luct11b.fnt b/thirdparty/grx249/fonts/luct11b.fnt deleted file mode 100644 index 247e741..0000000 --- a/thirdparty/grx249/fonts/luct11b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6cdb506af26cc8cfa314f2977f28a99c65a6cb3627ce14af219810763588adb -size 2874 diff --git a/thirdparty/grx249/fonts/luct13.fnt b/thirdparty/grx249/fonts/luct13.fnt deleted file mode 100644 index c6239e6..0000000 --- a/thirdparty/grx249/fonts/luct13.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c7e0da297c0de92338524998da93ee4b591c217e9115d16aeb68fb82c22902af -size 3326 diff --git a/thirdparty/grx249/fonts/luct13b.fnt b/thirdparty/grx249/fonts/luct13b.fnt deleted file mode 100644 index 40c6dc8..0000000 --- a/thirdparty/grx249/fonts/luct13b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a62746e3d97ed6894fd34c250cc9070dc440a2f78bf1670a9a0d50a7878d28f7 -size 3322 diff --git a/thirdparty/grx249/fonts/luct15.fnt b/thirdparty/grx249/fonts/luct15.fnt deleted file mode 100644 index 2995d41..0000000 --- a/thirdparty/grx249/fonts/luct15.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2cff2870723ee85731135d8ea8409cb834e6d08adb325a80dfbb51261a37b6a9 -size 7134 diff --git a/thirdparty/grx249/fonts/luct15b.fnt b/thirdparty/grx249/fonts/luct15b.fnt deleted file mode 100644 index be2d849..0000000 --- a/thirdparty/grx249/fonts/luct15b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f9388ac5902602d612eae536031056a8f17bf0fc5aa291b358f75fff29458c6 -size 7130 diff --git a/thirdparty/grx249/fonts/luct19.fnt b/thirdparty/grx249/fonts/luct19.fnt deleted file mode 100644 index 436a29f..0000000 --- a/thirdparty/grx249/fonts/luct19.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e7a507dcbd55c195cfbbd281c3bff2fe7c37a944c8f42e7869a35af1a2a154ae -size 8927 diff --git a/thirdparty/grx249/fonts/luct19b.fnt b/thirdparty/grx249/fonts/luct19b.fnt deleted file mode 100644 index 833de5e..0000000 --- a/thirdparty/grx249/fonts/luct19b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0287edebb89b8653de538d123b9a3230ddce9c30015c32cfa14d2f34db94b51 -size 8923 diff --git a/thirdparty/grx249/fonts/luct27.fnt b/thirdparty/grx249/fonts/luct27.fnt deleted file mode 100644 index a79e45e..0000000 --- a/thirdparty/grx249/fonts/luct27.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:71bbc42234ea73accc0637b89273c0b54a5024b76160f2e9226140903d197148 -size 12486 diff --git a/thirdparty/grx249/fonts/luct27b.fnt b/thirdparty/grx249/fonts/luct27b.fnt deleted file mode 100644 index 3749db9..0000000 --- a/thirdparty/grx249/fonts/luct27b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7e10ea363f9a15e12f9bf0d0ec4e96c8b8406b2b83577d37996e72205079c85 -size 18530 diff --git a/thirdparty/grx249/fonts/luct38.fnt b/thirdparty/grx249/fonts/luct38.fnt deleted file mode 100644 index 4c2d861..0000000 --- a/thirdparty/grx249/fonts/luct38.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14090db531ca1d86e8228acea9dc4d59d57b3b595f9414eee2996bb3074251c7 -size 25928 diff --git a/thirdparty/grx249/fonts/luct38b.fnt b/thirdparty/grx249/fonts/luct38b.fnt deleted file mode 100644 index a5a2545..0000000 --- a/thirdparty/grx249/fonts/luct38b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:304af9934d7360f879d7cd46bf59f567177d44238de6107c42b7d0762e794402 -size 34436 diff --git a/thirdparty/grx249/fonts/ncen11.fnt b/thirdparty/grx249/fonts/ncen11.fnt deleted file mode 100644 index 2c19e8c..0000000 --- a/thirdparty/grx249/fonts/ncen11.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:31504af8aa49224997e5424fd4b1a7664d47550cd2d70b16c5feab5422575b97 -size 4819 diff --git a/thirdparty/grx249/fonts/ncen11b.fnt b/thirdparty/grx249/fonts/ncen11b.fnt deleted file mode 100644 index 746549f..0000000 --- a/thirdparty/grx249/fonts/ncen11b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a11370e8ecac2fffb71dc4c05d33f17394d95dc8bf8b26f70a6bb733f38fbbbd -size 4856 diff --git a/thirdparty/grx249/fonts/ncen11bi.fnt b/thirdparty/grx249/fonts/ncen11bi.fnt deleted file mode 100644 index 296211a..0000000 --- a/thirdparty/grx249/fonts/ncen11bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f0bd5d9df97ec3bbb8c101071077aa19735f4b52aacd431be06e196a996d1217 -size 4856 diff --git a/thirdparty/grx249/fonts/ncen11i.fnt b/thirdparty/grx249/fonts/ncen11i.fnt deleted file mode 100644 index f7e7766..0000000 --- a/thirdparty/grx249/fonts/ncen11i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dd72e4aee13640fa033805023dfc54eb285057d80efd57d1936ba707fe17af0b -size 4836 diff --git a/thirdparty/grx249/fonts/ncen13.fnt b/thirdparty/grx249/fonts/ncen13.fnt deleted file mode 100644 index 849222f..0000000 --- a/thirdparty/grx249/fonts/ncen13.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:774d96d22e4de07a976fc8b4337fb591ac6efb921f44d9c2afa7653045e7c832 -size 5435 diff --git a/thirdparty/grx249/fonts/ncen13b.fnt b/thirdparty/grx249/fonts/ncen13b.fnt deleted file mode 100644 index 210e73d..0000000 --- a/thirdparty/grx249/fonts/ncen13b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e9aa7b2eb8862898ebe25273b043b7063a56e3696455e3fe82872269f93fe093 -size 5745 diff --git a/thirdparty/grx249/fonts/ncen13bi.fnt b/thirdparty/grx249/fonts/ncen13bi.fnt deleted file mode 100644 index 8e76a49..0000000 --- a/thirdparty/grx249/fonts/ncen13bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c6949b57cb6b5bffd7d70749a62d8a51e5c15f18c3264e3e2f5a742bfb06546b -size 5641 diff --git a/thirdparty/grx249/fonts/ncen13i.fnt b/thirdparty/grx249/fonts/ncen13i.fnt deleted file mode 100644 index 721617a..0000000 --- a/thirdparty/grx249/fonts/ncen13i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d51b1eb5e87dcb2a1287ee13c99791dd1b0f1c1bd427a60bd3e036991afbde7f -size 5513 diff --git a/thirdparty/grx249/fonts/ncen15.fnt b/thirdparty/grx249/fonts/ncen15.fnt deleted file mode 100644 index bb2e325..0000000 --- a/thirdparty/grx249/fonts/ncen15.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd8603b4a1e11d347320240015367b056a2397040854e67adad2ba8f08a4294a -size 6421 diff --git a/thirdparty/grx249/fonts/ncen15b.fnt b/thirdparty/grx249/fonts/ncen15b.fnt deleted file mode 100644 index c51c670..0000000 --- a/thirdparty/grx249/fonts/ncen15b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15e79f2792ab16c92860ea36bd6bacf3adb8a587bda14c7f2ec6a4fb5dcfe5d6 -size 6824 diff --git a/thirdparty/grx249/fonts/ncen15bi.fnt b/thirdparty/grx249/fonts/ncen15bi.fnt deleted file mode 100644 index 0b57f3b..0000000 --- a/thirdparty/grx249/fonts/ncen15bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d3f9b0815aa55658785278d3fe90342d418b65a5adc83bd00fd12e52542fae14 -size 6734 diff --git a/thirdparty/grx249/fonts/ncen15i.fnt b/thirdparty/grx249/fonts/ncen15i.fnt deleted file mode 100644 index 671217b..0000000 --- a/thirdparty/grx249/fonts/ncen15i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:076219aa4119a7ac4be9df2cfbfbf94b98d1eaa2f4260bdb71da03be724a4b74 -size 6526 diff --git a/thirdparty/grx249/fonts/ncen18.fnt b/thirdparty/grx249/fonts/ncen18.fnt deleted file mode 100644 index 48ccc0b..0000000 --- a/thirdparty/grx249/fonts/ncen18.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0874139a510667a132618334a9f371a9b5c83fbd2958c3949f60bde2fd24e5bb -size 7970 diff --git a/thirdparty/grx249/fonts/ncen18b.fnt b/thirdparty/grx249/fonts/ncen18b.fnt deleted file mode 100644 index 32461d6..0000000 --- a/thirdparty/grx249/fonts/ncen18b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a292950196bf4c989e12878f25087ed2dd2a40df80105ee5c62febbca158ef0 -size 8243 diff --git a/thirdparty/grx249/fonts/ncen18bi.fnt b/thirdparty/grx249/fonts/ncen18bi.fnt deleted file mode 100644 index 31bd348..0000000 --- a/thirdparty/grx249/fonts/ncen18bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1478b8d281ff8fe2cbee0a83c13eae0616c39a1bee5d9624b79c3a571ef542b1 -size 8237 diff --git a/thirdparty/grx249/fonts/ncen18i.fnt b/thirdparty/grx249/fonts/ncen18i.fnt deleted file mode 100644 index 7925356..0000000 --- a/thirdparty/grx249/fonts/ncen18i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a387222fe764a7d66ac08fe24edcc8601a851d4f24fea8d219235ac70c0ebbaf -size 8005 diff --git a/thirdparty/grx249/fonts/ncen22.fnt b/thirdparty/grx249/fonts/ncen22.fnt deleted file mode 100644 index 96a2ef9..0000000 --- a/thirdparty/grx249/fonts/ncen22.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a6aaaeff0215402b05494189a02a9abf9faea72d056007092c6d7197c316978 -size 10482 diff --git a/thirdparty/grx249/fonts/ncen22b.fnt b/thirdparty/grx249/fonts/ncen22b.fnt deleted file mode 100644 index cc9de89..0000000 --- a/thirdparty/grx249/fonts/ncen22b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7b85e30d372a1d94b060b8e4b009a36b0273a37c17477e7132bc36a97f7ed6b -size 10744 diff --git a/thirdparty/grx249/fonts/ncen22bi.fnt b/thirdparty/grx249/fonts/ncen22bi.fnt deleted file mode 100644 index c04ed5a..0000000 --- a/thirdparty/grx249/fonts/ncen22bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4bae63eeddce0fa2d621a2896bf2d806a5b0715483de7c3bc8b825144387921c -size 10788 diff --git a/thirdparty/grx249/fonts/ncen22i.fnt b/thirdparty/grx249/fonts/ncen22i.fnt deleted file mode 100644 index ae277c8..0000000 --- a/thirdparty/grx249/fonts/ncen22i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:84c2404120fcb043d01525fe1ffc1260a61b4efadc29b2ea234c0476554cb535 -size 10614 diff --git a/thirdparty/grx249/fonts/ncen29.fnt b/thirdparty/grx249/fonts/ncen29.fnt deleted file mode 100644 index 7e02d80..0000000 --- a/thirdparty/grx249/fonts/ncen29.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11db4cc51de37ad6b36e1652cfa6b2d5293a6cac8ec6decf8ed40af4378b487a -size 15038 diff --git a/thirdparty/grx249/fonts/ncen29b.fnt b/thirdparty/grx249/fonts/ncen29b.fnt deleted file mode 100644 index 1888202..0000000 --- a/thirdparty/grx249/fonts/ncen29b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef8a3e6992b92a0abfc53473fc9ae75a517eec9961d6eef444d7899fd18a474a -size 15999 diff --git a/thirdparty/grx249/fonts/ncen29bi.fnt b/thirdparty/grx249/fonts/ncen29bi.fnt deleted file mode 100644 index 0100929..0000000 --- a/thirdparty/grx249/fonts/ncen29bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1d3872148bb1b11cffe94b62c0a9403a60cdabd0a7edfd049b1247ab9529b4a2 -size 15709 diff --git a/thirdparty/grx249/fonts/ncen29i.fnt b/thirdparty/grx249/fonts/ncen29i.fnt deleted file mode 100644 index 24e54c1..0000000 --- a/thirdparty/grx249/fonts/ncen29i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:236dd397396c13ef8f9806405ee102cfa465f667613b133b02e3402a1d7f3cb3 -size 15038 diff --git a/thirdparty/grx249/fonts/ncen40.fnt b/thirdparty/grx249/fonts/ncen40.fnt deleted file mode 100644 index 70b51d1..0000000 --- a/thirdparty/grx249/fonts/ncen40.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06e6afb17ca49eb953d1bbc4ea394d8030d7527cdf39bb7804918bfab37949a6 -size 26133 diff --git a/thirdparty/grx249/fonts/ncen40b.fnt b/thirdparty/grx249/fonts/ncen40b.fnt deleted file mode 100644 index baa59c7..0000000 --- a/thirdparty/grx249/fonts/ncen40b.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:47c775f55f5b35a7d9419c056d67117912c7b5bf97ebfaef76355b3e70ef1f65 -size 27497 diff --git a/thirdparty/grx249/fonts/ncen40bi.fnt b/thirdparty/grx249/fonts/ncen40bi.fnt deleted file mode 100644 index 89f6ac3..0000000 --- a/thirdparty/grx249/fonts/ncen40bi.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:739593021e66536b9763f12f0d4cadcf1b06f42b20b69e2ebdbb351bc64b2907 -size 28691 diff --git a/thirdparty/grx249/fonts/ncen40i.fnt b/thirdparty/grx249/fonts/ncen40i.fnt deleted file mode 100644 index 7c72204..0000000 --- a/thirdparty/grx249/fonts/ncen40i.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a8888f4ee564a8b7c6aeaf73501f2e8ec746839b486485cea6c40844a7190967 -size 27053 diff --git a/thirdparty/grx249/fonts/pc6x14.fnt b/thirdparty/grx249/fonts/pc6x14.fnt deleted file mode 100644 index 2c9da12..0000000 --- a/thirdparty/grx249/fonts/pc6x14.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a507d8245fc603525c4c533f900f2d292fa2dc195099c9e1cd35bba813e713bf -size 3640 diff --git a/thirdparty/grx249/fonts/pc6x8.fnt b/thirdparty/grx249/fonts/pc6x8.fnt deleted file mode 100644 index 6c34059..0000000 --- a/thirdparty/grx249/fonts/pc6x8.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:51d53fec9a21eee5a2973e034c4cecbd028cc301de3b1b07d188d4007c498c6b -size 2104 diff --git a/thirdparty/grx249/fonts/pc8x14.fnt b/thirdparty/grx249/fonts/pc8x14.fnt deleted file mode 100644 index 42ec654..0000000 --- a/thirdparty/grx249/fonts/pc8x14.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:faaa4318b813785fa799945a571e4f7613def80ef8b8754ff0f06b67b655ce73 -size 3640 diff --git a/thirdparty/grx249/fonts/pc8x14t.fnt b/thirdparty/grx249/fonts/pc8x14t.fnt deleted file mode 100644 index cd8f0a0..0000000 --- a/thirdparty/grx249/fonts/pc8x14t.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5a222373e021dc6eee16e162f6588f641a593b2c02d34c47f818b01fb4c3f8df -size 3640 diff --git a/thirdparty/grx249/fonts/pc8x16.fnt b/thirdparty/grx249/fonts/pc8x16.fnt deleted file mode 100644 index 4064097..0000000 --- a/thirdparty/grx249/fonts/pc8x16.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6aede38f7065d1ae51581bf1c239a69f09905c6428b513bd4cb6009a97552a78 -size 4152 diff --git a/thirdparty/grx249/fonts/pc8x8.fnt b/thirdparty/grx249/fonts/pc8x8.fnt deleted file mode 100644 index f6a1c09..0000000 --- a/thirdparty/grx249/fonts/pc8x8.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09c7e8777bc585008259022f03119ad5664794c6073f5af4a5521c1d5a270240 -size 2104 diff --git a/thirdparty/grx249/fonts/pc8x8t.fnt b/thirdparty/grx249/fonts/pc8x8t.fnt deleted file mode 100644 index 1548e40..0000000 --- a/thirdparty/grx249/fonts/pc8x8t.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2416e05afd3309b04df2fba556a4a3c9d9b6274ad901a3aa29a005e8ae7e5892 -size 2104 diff --git a/thirdparty/grx249/fonts/symb11.fnt b/thirdparty/grx249/fonts/symb11.fnt deleted file mode 100644 index 56e78b6..0000000 --- a/thirdparty/grx249/fonts/symb11.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9bf3d1aba11e47c504c175049b2ada2fbaaa569d172622a3c80b341606331a95 -size 2984 diff --git a/thirdparty/grx249/fonts/symb14.fnt b/thirdparty/grx249/fonts/symb14.fnt deleted file mode 100644 index d7cff1b..0000000 --- a/thirdparty/grx249/fonts/symb14.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:93bdbec9ac843be6a7cc47d6ee6d35cb86ca07e65f56676f94bf12ccf678f7bb -size 3379 diff --git a/thirdparty/grx249/fonts/symb16.fnt b/thirdparty/grx249/fonts/symb16.fnt deleted file mode 100644 index 1255ab2..0000000 --- a/thirdparty/grx249/fonts/symb16.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a5a29ead462f471c5c84b0fbe9fcf3209f253d2f30cee3c851595b1cf4414d10 -size 3864 diff --git a/thirdparty/grx249/fonts/symb20.fnt b/thirdparty/grx249/fonts/symb20.fnt deleted file mode 100644 index d0ddb4a..0000000 --- a/thirdparty/grx249/fonts/symb20.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3942654e8b1731a11cfa2dfd6132361c2571608aa46957633d1d8c972c1cae07 -size 4608 diff --git a/thirdparty/grx249/fonts/symb25.fnt b/thirdparty/grx249/fonts/symb25.fnt deleted file mode 100644 index 0e12764..0000000 --- a/thirdparty/grx249/fonts/symb25.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f4394ed622593457e9a0e49cb635a34e18115134d8d5e3e92815d0f1321ba210 -size 6259 diff --git a/thirdparty/grx249/fonts/symb32.fnt b/thirdparty/grx249/fonts/symb32.fnt deleted file mode 100644 index c4125fd..0000000 --- a/thirdparty/grx249/fonts/symb32.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2ef7dfb1003ad7e7e81e7c44832eac6ee06a36eed332737cea412a802a28cde8 -size 8249 diff --git a/thirdparty/grx249/fonts/symb34.fnt b/thirdparty/grx249/fonts/symb34.fnt deleted file mode 100644 index 43ef2e7..0000000 --- a/thirdparty/grx249/fonts/symb34.fnt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ae2a62905c171a22787ab154872fea0a4dc70fc392617acc86b8e2b4dff4edb6 -size 10613 diff --git a/thirdparty/grx249/fonts/ter-114b.res b/thirdparty/grx249/fonts/ter-114b.res deleted file mode 100644 index a8c90c220feb515f24ec30fdaa5a29d6e5d4364b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4767 zcmaKu0cadm8i3!0-rQREa=9X9uptB~(i15|Dq$%@D7A=)h$mG_5E+Zkr8?FSdm&er zxi*N1h)9uQi+G+`@k$X9DO##5Mus9`3F0lmguNh=ii8qGLh!=mzW;x3b|)hDXTR+H z@BiQb-v9nL@2%1gSX)W_zY&@8~7g9VB1X+=TxCkFZ24BOsunIX;d#OL{fnhiV4?zUSp$;#>>+mjo1fRnkv|$B)hRPqP zKkSAfH~Q`a?h50X4V>4#QCxhZJ6h^Y9*AhA-eNSb`g{0o!*_f4Cj)f`jlNJO;^* zK68@eAkUoSaxm1VFHTQiIWs+7S1oVld3GbuRWnJB)N6fWLi{k@Ohey2hyLj1=BOX4 zMNFHiZ#8vwew!lKXJ)SJgZPH=!Gp2(lBSt+pMH97MxKlr>AiJmY8IKYesLU!K0!rG z<1`XkYB&vJ93Nj%)%O>|>*0cW9*D-L>Sl3HGq_*TgLm(whT>n7WA zmj}@eC&XlCs8uN+Vm;KLH8hmG@VXPPScJ$6V^k=lOgpZgBue`yUbJ+iAjPs z6k1buTC-7Plx6x#isuHNLbl=hkwwGJY<*S?SvI>aHpy>Yth%NhtHR-4At^7tdZ8d365<9b*896jW#3q%N?P6Cc zv>Q1HH1{Y90-xRN$;3=(SE5=Kn;*u~_A8PbI{l(OmH9MJN-Ifgine|<)H9mwy0975 zGt;`OEu(Il-#`#-*vUy0#CdvHJ27?5$g8I5X%3!edWq|KB(0uOLAScr4PW&n=7wy$ zR!if%Qe+yF7F#ApQ*k*o8mbj@@l@mggRX-96K$L)-Z9@FM|p0cDQ#Wplkk~tWHYcY zTIVm?r}NBZED>vTUF@0FyGxHVg3e1+CviMmJo3G;AWGq9cb(JpBrKhc+H2*~x}0=> z|M!24Nou-3#}XDr;%f)E2X2D#(i6Ei>+x% zAFiNsXF1DE?PKy>VSN##Q6dWC1>Dc6Ckl0LzxkrJXHCk>XvzC*`X}l{Xjh$7}s6$DsCAE@f z-<4e6m9|V9lN?cu$4`o&b5*j?j8|NhXpC3V7@?$b$`@Bqok2VNn^y4Mg>b6nb@kNhND&ZwVeiyI>EyX=vY#t0>im?f?2=`kX^ bzbIIvRO{kSmC(N;ho78y=GgJSK4<<1?0NOL diff --git a/thirdparty/grx249/fonts/ter-114n.fna b/thirdparty/grx249/fonts/ter-114n.fna deleted file mode 100644 index 0d15d72..0000000 --- a/thirdparty/grx249/fonts/ter-114n.fna +++ /dev/null @@ -1,4104 +0,0 @@ -name ter-u14n -family Terminus -isfixed 1 -width 8 -height 14 -minchar 0 -maxchar 255 -baseline 12 - -; character 0 width = 8 -........ -........ -.######. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.######. -........ -........ - -; character 1 width = 8 -........ -........ -.#####.. -#.....#. -#.#.#.#. -#.....#. -#.....#. -#.###.#. -#..#..#. -#.....#. -#.....#. -.#####.. -........ -........ - -; character 2 width = 8 -........ -........ -.#####.. -#######. -##.#.##. -#######. -#######. -##...##. -###.###. -#######. -#######. -.#####.. -........ -........ - -; character 3 width = 8 -........ -........ -........ -.##.##.. -#######. -#######. -#######. -#######. -.#####.. -..###... -...#.... -........ -........ -........ - -; character 4 width = 8 -........ -........ -........ -........ -...#.... -..###... -.#####.. -#######. -.#####.. -..###... -...#.... -........ -........ -........ - -; character 5 width = 8 -........ -........ -...#.... -..###... -..###... -...#.... -.#.#.#.. -#######. -#######. -.#.#.#.. -...#.... -..###... -........ -........ - -; character 6 width = 8 -........ -........ -...#.... -...#.... -..###... -.#####.. -#######. -#######. -.#####.. -...#.... -...#.... -..###... -........ -........ - -; character 7 width = 8 -........ -........ -........ -........ -........ -...##... -..####.. -..####.. -...##... -........ -........ -........ -........ -........ - -; character 8 width = 8 -######## -######## -######## -######## -######## -###..### -##....## -##....## -###..### -######## -######## -######## -######## -######## - -; character 9 width = 8 -........ -........ -........ -........ -........ -...##... -..#..#.. -..#..#.. -...##... -........ -........ -........ -........ -........ - -; character 10 width = 8 -######## -######## -######## -######## -######## -###..### -##.##.## -##.##.## -###..### -######## -######## -######## -######## -######## - -; character 11 width = 8 -........ -........ -...####. -.....##. -....#.#. -...#..#. -..###... -.#...#.. -.#...#.. -.#...#.. -.#...#.. -..###... -........ -........ - -; character 12 width = 8 -........ -........ -..###... -.#...#.. -.#...#.. -.#...#.. -.#...#.. -..###... -...#.... -.#####.. -...#.... -...#.... -........ -........ - -; character 13 width = 8 -........ -........ -..#####. -..#...#. -..#####. -..#..... -..#..... -..#..... -..#..... -..#..... -..#..... -##...... -........ -........ - -; character 14 width = 8 -........ -........ -.######. -.#....#. -.######. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#...#.. -#....... -........ - -; character 15 width = 8 -........ -........ -........ -...#.... -...#.... -##.#.##. -..###... -###.###. -..###... -##.#.##. -...#.... -...#.... -........ -........ - -; character 16 width = 8 -........ -.#...... -.##..... -.###.... -.####... -.#####.. -.######. -.#####.. -.####... -.###.... -.##..... -.#...... -........ -........ - -; character 17 width = 8 -........ -......#. -.....##. -....###. -...####. -..#####. -.######. -..#####. -...####. -....###. -.....##. -......#. -........ -........ - -; character 18 width = 8 -........ -........ -...#.... -..###... -.#####.. -...#.... -...#.... -...#.... -...#.... -.#####.. -..###... -...#.... -........ -........ - -; character 19 width = 8 -........ -........ -..#..#.. -..#..#.. -..#..#.. -..#..#.. -..#..#.. -..#..#.. -..#..#.. -........ -..#..#.. -..#..#.. -........ -........ - -; character 20 width = 8 -........ -........ -.######. -#..#..#. -#..#..#. -#..#..#. -#..#..#. -.###..#. -...#..#. -...#..#. -...#..#. -...#..#. -........ -........ - -; character 21 width = 8 -........ -..###... -.#...#.. -.#...... -..##.... -.#..#... -.#...#.. -.#...#.. -..#..#.. -...##... -.....#.. -.#...#.. -..###... -........ - -; character 22 width = 8 -........ -........ -........ -........ -........ -........ -........ -........ -.######. -.######. -.######. -.######. -........ -........ - -; character 23 width = 8 -........ -........ -...#.... -..###... -.#####.. -...#.... -...#.... -...#.... -...#.... -.#####.. -..###... -...#.... -.#####.. -........ - -; character 24 width = 8 -........ -........ -...#.... -..###... -.#####.. -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -........ -........ - -; character 25 width = 8 -........ -........ -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -.#####.. -..###... -...#.... -........ -........ - -; character 26 width = 8 -........ -........ -........ -........ -....#... -....##.. -#######. -....##.. -....#... -........ -........ -........ -........ -........ - -; character 27 width = 8 -........ -........ -........ -........ -..#..... -.##..... -#######. -.##..... -..#..... -........ -........ -........ -........ -........ - -; character 28 width = 8 -........ -........ -........ -........ -........ -........ -.#...... -.#...... -.######. -........ -........ -........ -........ -........ - -; character 29 width = 8 -........ -........ -........ -........ -..#..#.. -.##..##. -######## -.##..##. -..#..#.. -........ -........ -........ -........ -........ - -; character 30 width = 8 -........ -........ -........ -...#.... -...#.... -..###... -..###... -.#####.. -.#####.. -#######. -#######. -........ -........ -........ - -; character 31 width = 8 -........ -........ -........ -#######. -#######. -.#####.. -.#####.. -..###... -..###... -...#.... -...#.... -........ -........ -........ - -; character 32 width = 8 -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 33 (!) width = 8 -........ -........ -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -........ -...#.... -...#.... -........ -........ - -; character 34 (") width = 8 -........ -..#..#.. -..#..#.. -..#..#.. -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 35 (#) width = 8 -........ -........ -..#..#.. -..#..#.. -..#..#.. -.######. -..#..#.. -..#..#.. -.######. -..#..#.. -..#..#.. -..#..#.. -........ -........ - -; character 36 ($) width = 8 -........ -...#.... -...#.... -.#####.. -#..#..#. -#..#.... -#..#.... -.#####.. -...#..#. -...#..#. -#..#..#. -.#####.. -...#.... -...#.... - -; character 37 (%) width = 8 -........ -........ -.##..#.. -#..#.#.. -.##.#... -....#... -...#.... -...#.... -..#..... -..#.##.. -.#.#..#. -.#..##.. -........ -........ - -; character 38 (&) width = 8 -........ -........ -...##... -..#..#.. -..#..#.. -...##... -..##..#. -.#..##.. -.#...#.. -.#...#.. -.#..##.. -..##.##. -........ -........ - -; character 39 (') width = 8 -........ -...#.... -...#.... -..#..... -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 40 (() width = 8 -........ -........ -....#... -...#.... -..#..... -..#..... -..#..... -..#..... -..#..... -..#..... -...#.... -....#... -........ -........ - -; character 41 ()) width = 8 -........ -........ -..#..... -...#.... -....#... -....#... -....#... -....#... -....#... -....#... -...#.... -..#..... -........ -........ - -; character 42 (*) width = 8 -........ -........ -........ -........ -........ -..#..#.. -...##... -.######. -...##... -..#..#.. -........ -........ -........ -........ - -; character 43 (+) width = 8 -........ -........ -........ -........ -........ -...#.... -...#.... -.#####.. -...#.... -...#.... -........ -........ -........ -........ - -; character 44 (,) width = 8 -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -...#.... -...#.... -..#..... -........ - -; character 45 (-) width = 8 -........ -........ -........ -........ -........ -........ -........ -.######. -........ -........ -........ -........ -........ -........ - -; character 46 (.) width = 8 -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -...#.... -...#.... -........ -........ - -; character 47 (/) width = 8 -........ -........ -.....#.. -.....#.. -....#... -....#... -...#.... -...#.... -..#..... -..#..... -.#...... -.#...... -........ -........ - -; character 48 (0) width = 8 -........ -........ -..####.. -.#....#. -.#....#. -.#...##. -.#..#.#. -.#.#..#. -.##...#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 49 (1) width = 8 -........ -........ -...#.... -..##.... -.#.#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -.#####.. -........ -........ - -; character 50 (2) width = 8 -........ -........ -..####.. -.#....#. -.#....#. -......#. -.....#.. -....#... -...#.... -..#..... -.#...... -.######. -........ -........ - -; character 51 (3) width = 8 -........ -........ -..####.. -.#....#. -.#....#. -......#. -...###.. -......#. -......#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 52 (4) width = 8 -........ -........ -......#. -.....##. -....#.#. -...#..#. -..#...#. -.#....#. -.######. -......#. -......#. -......#. -........ -........ - -; character 53 (5) width = 8 -........ -........ -.######. -.#...... -.#...... -.#...... -.#####.. -......#. -......#. -......#. -.#....#. -..####.. -........ -........ - -; character 54 (6) width = 8 -........ -........ -...###.. -..#..... -.#...... -.#...... -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 55 (7) width = 8 -........ -........ -.######. -......#. -......#. -.....#.. -.....#.. -....#... -....#... -...#.... -...#.... -...#.... -........ -........ - -; character 56 (8) width = 8 -........ -........ -..####.. -.#....#. -.#....#. -.#....#. -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 57 (9) width = 8 -........ -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -......#. -......#. -.....#.. -..###... -........ -........ - -; character 58 (:) width = 8 -........ -........ -........ -........ -........ -...#.... -...#.... -........ -........ -........ -...#.... -...#.... -........ -........ - -; character 59 (;) width = 8 -........ -........ -........ -........ -........ -...#.... -...#.... -........ -........ -........ -...#.... -...#.... -..#..... -........ - -; character 60 (<) width = 8 -........ -........ -........ -.....#.. -....#... -...#.... -..#..... -.#...... -..#..... -...#.... -....#... -.....#.. -........ -........ - -; character 61 (=) width = 8 -........ -........ -........ -........ -........ -.######. -........ -........ -.######. -........ -........ -........ -........ -........ - -; character 62 (>) width = 8 -........ -........ -........ -.#...... -..#..... -...#.... -....#... -.....#.. -....#... -...#.... -..#..... -.#...... -........ -........ - -; character 63 (?) width = 8 -........ -........ -..####.. -.#....#. -.#....#. -.#....#. -.....#.. -....#... -....#... -........ -....#... -....#... -........ -........ - -; character 64 (@) width = 8 -........ -........ -.#####.. -#.....#. -#..####. -#.#...#. -#.#...#. -#.#...#. -#.#..##. -#..##.#. -#....... -.######. -........ -........ - -; character 65 (A) width = 8 -........ -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.######. -.#....#. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 66 (B) width = 8 -........ -........ -.#####.. -.#....#. -.#....#. -.#....#. -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#####.. -........ -........ - -; character 67 (C) width = 8 -........ -........ -..####.. -.#....#. -.#....#. -.#...... -.#...... -.#...... -.#...... -.#....#. -.#....#. -..####.. -........ -........ - -; character 68 (D) width = 8 -........ -........ -.####... -.#...#.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#...#.. -.####... -........ -........ - -; character 69 (E) width = 8 -........ -........ -.######. -.#...... -.#...... -.#...... -.####... -.#...... -.#...... -.#...... -.#...... -.######. -........ -........ - -; character 70 (F) width = 8 -........ -........ -.######. -.#...... -.#...... -.#...... -.####... -.#...... -.#...... -.#...... -.#...... -.#...... -........ -........ - -; character 71 (G) width = 8 -........ -........ -..####.. -.#....#. -.#....#. -.#...... -.#...... -.#..###. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 72 (H) width = 8 -........ -........ -.#....#. -.#....#. -.#....#. -.#....#. -.######. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 73 (I) width = 8 -........ -........ -..###... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -..###... -........ -........ - -; character 74 (J) width = 8 -........ -........ -....###. -.....#.. -.....#.. -.....#.. -.....#.. -.....#.. -.....#.. -.#...#.. -.#...#.. -..###... -........ -........ - -; character 75 (K) width = 8 -........ -........ -.#....#. -.#...#.. -.#..#... -.#.#.... -.##..... -.##..... -.#.#.... -.#..#... -.#...#.. -.#....#. -........ -........ - -; character 76 (L) width = 8 -........ -........ -.#...... -.#...... -.#...... -.#...... -.#...... -.#...... -.#...... -.#...... -.#...... -.######. -........ -........ - -; character 77 (M) width = 8 -........ -........ -#.....#. -##...##. -#.#.#.#. -#..#..#. -#.....#. -#.....#. -#.....#. -#.....#. -#.....#. -#.....#. -........ -........ - -; character 78 (N) width = 8 -........ -........ -.#....#. -.#....#. -.#....#. -.##...#. -.#.#..#. -.#..#.#. -.#...##. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 79 (O) width = 8 -........ -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 80 (P) width = 8 -........ -........ -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#####.. -.#...... -.#...... -.#...... -.#...... -........ -........ - -; character 81 (Q) width = 8 -........ -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#..#.#. -..####.. -......#. -........ - -; character 82 (R) width = 8 -........ -........ -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#####.. -.#.#.... -.#..#... -.#...#.. -.#....#. -........ -........ - -; character 83 (S) width = 8 -........ -........ -..####.. -.#....#. -.#...... -.#...... -..####.. -......#. -......#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 84 (T) width = 8 -........ -........ -#######. -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -........ -........ - -; character 85 (U) width = 8 -........ -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 86 (V) width = 8 -........ -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#..#.. -..#..#.. -..#..#.. -...##... -...##... -........ -........ - -; character 87 (W) width = 8 -........ -........ -#.....#. -#.....#. -#.....#. -#.....#. -#.....#. -#.....#. -#..#..#. -#.#.#.#. -##...##. -#.....#. -........ -........ - -; character 88 (X) width = 8 -........ -........ -.#....#. -.#....#. -..#..#.. -..#..#.. -...##... -...##... -..#..#.. -..#..#.. -.#....#. -.#....#. -........ -........ - -; character 89 (Y) width = 8 -........ -........ -#.....#. -#.....#. -.#...#.. -.#...#.. -..#.#... -...#.... -...#.... -...#.... -...#.... -...#.... -........ -........ - -; character 90 (Z) width = 8 -........ -........ -.######. -......#. -......#. -.....#.. -....#... -...#.... -..#..... -.#...... -.#...... -.######. -........ -........ - -; character 91 ([) width = 8 -........ -........ -..###... -..#..... -..#..... -..#..... -..#..... -..#..... -..#..... -..#..... -..#..... -..###... -........ -........ - -; character 92 (\) width = 8 -........ -........ -.#...... -.#...... -..#..... -..#..... -...#.... -...#.... -....#... -....#... -.....#.. -.....#.. -........ -........ - -; character 93 (]) width = 8 -........ -........ -..###... -....#... -....#... -....#... -....#... -....#... -....#... -....#... -....#... -..###... -........ -........ - -; character 94 (^) width = 8 -........ -...#.... -..#.#... -.#...#.. -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 95 (_) width = 8 -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -.######. - -; character 96 (`) width = 8 -........ -...#.... -...#.... -....#... -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 97 (a) width = 8 -........ -........ -........ -........ -........ -..#####. -.#....#. -.#....#. -.#....#. -.#....#. -.#...##. -..###.#. -........ -........ - -; character 98 (b) width = 8 -........ -........ -.#...... -.#...... -.#...... -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#####.. -........ -........ - -; character 99 (c) width = 8 -........ -........ -........ -........ -........ -..####.. -.#....#. -.#...... -.#...... -.#...... -.#....#. -..####.. -........ -........ - -; character 100 (d) width = 8 -........ -........ -......#. -......#. -......#. -..#####. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -........ -........ - -; character 101 (e) width = 8 -........ -........ -........ -........ -........ -..####.. -.#....#. -.#....#. -.######. -.#...... -.#...... -..####.. -........ -........ - -; character 102 (f) width = 8 -........ -........ -....###. -...#.... -...#.... -.#####.. -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -........ -........ - -; character 103 (g) width = 8 -........ -........ -........ -........ -........ -..#####. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -......#. -..####.. - -; character 104 (h) width = 8 -........ -........ -.#...... -.#...... -.#...... -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 105 (i) width = 8 -........ -........ -...#.... -...#.... -........ -..##.... -...#.... -...#.... -...#.... -...#.... -...#.... -..###... -........ -........ - -; character 106 (j) width = 8 -........ -........ -.....#.. -.....#.. -........ -....##.. -.....#.. -.....#.. -.....#.. -.....#.. -.....#.. -.#...#.. -.#...#.. -..###... - -; character 107 (k) width = 8 -........ -........ -.#...... -.#...... -.#...... -.#....#. -.#...#.. -.#..#... -.###.... -.#..#... -.#...#.. -.#....#. -........ -........ - -; character 108 (l) width = 8 -........ -........ -..##.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -..###... -........ -........ - -; character 109 (m) width = 8 -........ -........ -........ -........ -........ -######.. -#..#..#. -#..#..#. -#..#..#. -#..#..#. -#..#..#. -#..#..#. -........ -........ - -; character 110 (n) width = 8 -........ -........ -........ -........ -........ -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 111 (o) width = 8 -........ -........ -........ -........ -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 112 (p) width = 8 -........ -........ -........ -........ -........ -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#####.. -.#...... -.#...... - -; character 113 (q) width = 8 -........ -........ -........ -........ -........ -..#####. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -......#. -......#. - -; character 114 (r) width = 8 -........ -........ -........ -........ -........ -.#.####. -.##..... -.#...... -.#...... -.#...... -.#...... -.#...... -........ -........ - -; character 115 (s) width = 8 -........ -........ -........ -........ -........ -..#####. -.#...... -.#...... -..####.. -......#. -......#. -.#####.. -........ -........ - -; character 116 (t) width = 8 -........ -........ -...#.... -...#.... -...#.... -.#####.. -...#.... -...#.... -...#.... -...#.... -...#.... -....###. -........ -........ - -; character 117 (u) width = 8 -........ -........ -........ -........ -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -........ -........ - -; character 118 (v) width = 8 -........ -........ -........ -........ -........ -.#....#. -.#....#. -.#....#. -..#..#.. -..#..#.. -...##... -...##... -........ -........ - -; character 119 (w) width = 8 -........ -........ -........ -........ -........ -#.....#. -#.....#. -#..#..#. -#..#..#. -#..#..#. -#..#..#. -.#####.. -........ -........ - -; character 120 (x) width = 8 -........ -........ -........ -........ -........ -.#....#. -.#....#. -..#..#.. -...##... -..#..#.. -.#....#. -.#....#. -........ -........ - -; character 121 (y) width = 8 -........ -........ -........ -........ -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -......#. -..####.. - -; character 122 (z) width = 8 -........ -........ -........ -........ -........ -.######. -.....#.. -....#... -...#.... -..#..... -.#...... -.######. -........ -........ - -; character 123 ({) width = 8 -........ -........ -....##.. -...#.... -...#.... -...#.... -..#..... -...#.... -...#.... -...#.... -...#.... -....##.. -........ -........ - -; character 124 (|) width = 8 -........ -........ -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -........ -........ - -; character 125 (}) width = 8 -........ -........ -..##.... -....#... -....#... -....#... -.....#.. -....#... -....#... -....#... -....#... -..##.... -........ -........ - -; character 126 (~) width = 8 -........ -.##...#. -#..#..#. -#...##.. -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 127 width = 8 -........ -........ -........ -........ -...#.... -..#.#... -.#...#.. -#.....#. -#.....#. -#.....#. -#######. -........ -........ -........ - -; character 128 width = 8 -........ -........ -...###.. -..#...#. -.#...... -####.... -.#...... -####.... -.#...... -.#...... -..#...#. -...###.. -........ -........ - -; character 129 width = 8 -........ -........ -.######. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.######. -........ -........ - -; character 130 width = 8 -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -...#.... -...#.... -..#..... -........ - -; character 131 width = 8 -........ -........ -....##.. -...#..#. -...#.... -...#.... -.#####.. -...#.... -...#.... -...#.... -...#.... -...#.... -#..#.... -.##..... - -; character 132 width = 8 -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -..#..#.. -..#..#.. -.#..#... -........ - -; character 133 width = 8 -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -#..#..#. -#..#..#. -........ -........ - -; character 134 width = 8 -........ -........ -...#.... -...#.... -.#####.. -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -........ -........ - -; character 135 width = 8 -........ -........ -...#.... -...#.... -.#####.. -...#.... -...#.... -...#.... -...#.... -.#####.. -...#.... -...#.... -........ -........ - -; character 136 width = 8 -...##... -..#..#.. -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 137 width = 8 -........ -........ -.#..#... -#.#.#... -.#.#.... -...#.... -..#..... -..#..... -.#...... -.#.#.#.. -#.#.#.#. -#..#.#.. -........ -........ - -; character 138 width = 8 -..#..#.. -...##... -........ -..####.. -.#....#. -.#...... -.#...... -..####.. -......#. -......#. -.#....#. -..####.. -........ -........ - -; character 139 width = 8 -........ -........ -........ -........ -........ -.....#.. -....#... -...#.... -..#..... -...#.... -....#... -.....#.. -........ -........ - -; character 140 width = 8 -........ -........ -.######. -#..#.... -#..#.... -#..#.... -#..###.. -#..#.... -#..#.... -#..#.... -#..#.... -.######. -........ -........ - -; character 141 width = 8 -........ -........ -.######. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.######. -........ -........ - -; character 142 width = 8 -..#..#.. -...##... -........ -.######. -......#. -.....#.. -....#... -...#.... -..#..... -.#...... -.#...... -.######. -........ -........ - -; character 143 width = 8 -........ -........ -.######. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.######. -........ -........ - -; character 144 width = 8 -........ -........ -.######. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.######. -........ -........ - -; character 145 width = 8 -........ -....#... -...#.... -...#.... -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 146 width = 8 -........ -...#.... -...#.... -..#..... -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 147 width = 8 -........ -...#..#. -..#..#.. -..#..#.. -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 148 width = 8 -........ -..#..#.. -..#..#.. -.#..#... -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 149 width = 8 -........ -........ -........ -........ -........ -...##... -..####.. -..####.. -...##... -........ -........ -........ -........ -........ - -; character 150 width = 8 -........ -........ -........ -........ -........ -........ -........ -.######. -........ -........ -........ -........ -........ -........ - -; character 151 width = 8 -........ -........ -........ -........ -........ -........ -........ -#######. -........ -........ -........ -........ -........ -........ - -; character 152 width = 8 -..##..#. -.#..##.. -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 153 width = 8 -........ -........ -#####.## -.#.#.#.# -.#.#.#.# -.#.#...# -........ -........ -........ -........ -........ -........ -........ -........ - -; character 154 width = 8 -........ -........ -..#..#.. -...##... -........ -..#####. -.#...... -.#...... -..####.. -......#. -......#. -.#####.. -........ -........ - -; character 155 width = 8 -........ -........ -........ -........ -........ -..#..... -...#.... -....#... -.....#.. -....#... -...#.... -..#..... -........ -........ - -; character 156 width = 8 -........ -........ -........ -........ -........ -.#####.. -#..#..#. -#..#..#. -#..####. -#..#.... -#..#.... -.#####.. -........ -........ - -; character 157 width = 8 -........ -........ -.######. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.######. -........ -........ - -; character 158 width = 8 -........ -........ -..#..#.. -...##... -........ -.######. -.....#.. -....#... -...#.... -..#..... -.#...... -.######. -........ -........ - -; character 159 width = 8 -.#...#.. -.#...#.. -........ -#.....#. -#.....#. -.#...#.. -.#...#.. -..#.#... -...#.... -...#.... -...#.... -...#.... -........ -........ - -; character 160 width = 8 -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 161 width = 8 -........ -........ -...#.... -...#.... -........ -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -........ -........ - -; character 162 width = 8 -........ -........ -........ -...#.... -...#.... -.#####.. -#..#..#. -#..#.... -#..#.... -#..#.... -#..#..#. -.#####.. -...#.... -...#.... - -; character 163 width = 8 -........ -........ -...##... -..#..#.. -..#..... -..#..... -.####... -..#..... -..#..... -..#..... -..#...#. -.######. -........ -........ - -; character 164 width = 8 -........ -........ -........ -........ -.#...#.. -..###... -.#...#.. -.#...#.. -.#...#.. -..###... -.#...#.. -........ -........ -........ - -; character 165 width = 8 -........ -........ -#.....#. -#.....#. -.#...#.. -..#.#... -...#.... -.#####.. -...#.... -.#####.. -...#.... -...#.... -........ -........ - -; character 166 width = 8 -........ -........ -...#.... -...#.... -...#.... -...#.... -........ -........ -...#.... -...#.... -...#.... -...#.... -........ -........ - -; character 167 width = 8 -........ -..###... -.#...#.. -.#...... -..##.... -.#..#... -.#...#.. -.#...#.. -..#..#.. -...##... -.....#.. -.#...#.. -..###... -........ - -; character 168 width = 8 -..#..#.. -..#..#.. -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 169 width = 8 -........ -........ -........ -.######. -#......# -#..##..# -#.#..#.# -#.#....# -#.#..#.# -#..##..# -#......# -.######. -........ -........ - -; character 170 width = 8 -........ -..####.. -.#...#.. -.#...#.. -.#..##.. -..##.#.. -........ -.#####.. -........ -........ -........ -........ -........ -........ - -; character 171 width = 8 -........ -........ -........ -........ -........ -...#..#. -..#..#.. -.#..#... -#..#.... -.#..#... -..#..#.. -...#..#. -........ -........ - -; character 172 width = 8 -........ -........ -........ -........ -........ -........ -.######. -......#. -......#. -........ -........ -........ -........ -........ - -; character 173 width = 8 -........ -........ -........ -........ -........ -........ -........ -..####.. -........ -........ -........ -........ -........ -........ - -; character 174 width = 8 -........ -........ -........ -.######. -#......# -#.###..# -#.#..#.# -#.###..# -#.#.#..# -#.#..#.# -#......# -.######. -........ -........ - -; character 175 width = 8 -.######. -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 176 width = 8 -........ -...##... -..#..#.. -..#..#.. -...##... -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 177 width = 8 -........ -........ -........ -........ -...#.... -...#.... -.#####.. -...#.... -...#.... -........ -........ -.#####.. -........ -........ - -; character 178 width = 8 -........ -...##... -..#..#.. -....#... -...#.... -..####.. -........ -........ -........ -........ -........ -........ -........ -........ - -; character 179 width = 8 -........ -..###... -.....#.. -...##... -.....#.. -..###... -........ -........ -........ -........ -........ -........ -........ -........ - -; character 180 width = 8 -.....#.. -....#... -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ - -; character 181 width = 8 -........ -........ -........ -........ -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#...##. -.####.#. -.#...... -.#...... - -; character 182 width = 8 -........ -........ -.######. -#..#..#. -#..#..#. -#..#..#. -#..#..#. -.###..#. -...#..#. -...#..#. -...#..#. -...#..#. -........ -........ - -; character 183 width = 8 -........ -........ -........ -........ -........ -........ -...#.... -...#.... -........ -........ -........ -........ -........ -........ - -; character 184 width = 8 -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -........ -...#.... -...#.... -..#..... - -; character 185 width = 8 -........ -...#.... -..##.... -...#.... -...#.... -...#.... -........ -........ -........ -........ -........ -........ -........ -........ - -; character 186 width = 8 -........ -..###... -.#...#.. -.#...#.. -.#...#.. -..###... -........ -.#####.. -........ -........ -........ -........ -........ -........ - -; character 187 width = 8 -........ -........ -........ -........ -........ -#..#.... -.#..#... -..#..#.. -...#..#. -..#..#.. -.#..#... -#..#.... -........ -........ - -; character 188 width = 8 -..#..... -.##..... -..#..... -..#...#. -..#..#.. -....#... -...#.... -..#...#. -.#...##. -#...#.#. -...####. -......#. -......#. -........ - -; character 189 width = 8 -..#..... -.##..... -..#..... -..#...#. -..#..#.. -....#... -...#.... -..#..... -.#..##.. -#..#..#. -.....#.. -....#... -...####. -........ - -; character 190 width = 8 -###..... -...#.... -.##..... -...#..#. -###..#.. -....#... -...#.... -..#...#. -.#...##. -#...#.#. -...####. -......#. -......#. -........ - -; character 191 width = 8 -........ -........ -...#.... -...#.... -........ -...#.... -...#.... -..#..... -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 192 width = 8 -..#..... -...#.... -........ -..####.. -.#....#. -.#....#. -.#....#. -.######. -.#....#. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 193 width = 8 -.....#.. -....#... -........ -..####.. -.#....#. -.#....#. -.#....#. -.######. -.#....#. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 194 width = 8 -...##... -..#..#.. -........ -..####.. -.#....#. -.#....#. -.#....#. -.######. -.#....#. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 195 width = 8 -..##..#. -.#..##.. -........ -..####.. -.#....#. -.#....#. -.#....#. -.######. -.#....#. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 196 width = 8 -..#..#.. -..#..#.. -........ -..####.. -.#....#. -.#....#. -.#....#. -.######. -.#....#. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 197 width = 8 -...##... -..#..#.. -...##... -..####.. -.#....#. -.#....#. -.#....#. -.######. -.#....#. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 198 width = 8 -........ -........ -.######. -#..#.... -#..#.... -#..#.... -######.. -#..#.... -#..#.... -#..#.... -#..#.... -#..####. -........ -........ - -; character 199 width = 8 -........ -........ -..####.. -.#....#. -.#....#. -.#...... -.#...... -.#...... -.#...... -.#....#. -.#....#. -..####.. -...#.... -..#..... - -; character 200 width = 8 -..#..... -...#.... -........ -.######. -.#...... -.#...... -.#...... -.####... -.#...... -.#...... -.#...... -.######. -........ -........ - -; character 201 width = 8 -.....#.. -....#... -........ -.######. -.#...... -.#...... -.#...... -.####... -.#...... -.#...... -.#...... -.######. -........ -........ - -; character 202 width = 8 -...##... -..#..#.. -........ -.######. -.#...... -.#...... -.#...... -.####... -.#...... -.#...... -.#...... -.######. -........ -........ - -; character 203 width = 8 -..#..#.. -..#..#.. -........ -.######. -.#...... -.#...... -.#...... -.####... -.#...... -.#...... -.#...... -.######. -........ -........ - -; character 204 width = 8 -..#..... -...#.... -........ -..###... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -..###... -........ -........ - -; character 205 width = 8 -....#... -...#.... -........ -..###... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -..###... -........ -........ - -; character 206 width = 8 -..##.... -.#..#... -........ -..###... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -..###... -........ -........ - -; character 207 width = 8 -.#...#.. -.#...#.. -........ -..###... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -...#.... -..###... -........ -........ - -; character 208 width = 8 -........ -........ -.####... -.#...#.. -.#....#. -.#....#. -####..#. -.#....#. -.#....#. -.#....#. -.#...#.. -.####... -........ -........ - -; character 209 width = 8 -..##..#. -.#..##.. -........ -.#....#. -.#....#. -.##...#. -.#.#..#. -.#..#.#. -.#...##. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 210 width = 8 -..#..... -...#.... -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 211 width = 8 -.....#.. -....#... -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 212 width = 8 -...##... -..#..#.. -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 213 width = 8 -..##..#. -.#..##.. -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 214 width = 8 -..#..#.. -..#..#.. -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 215 width = 8 -........ -........ -........ -........ -........ -.#....#. -..#..#.. -...##... -..#..#.. -.#....#. -........ -........ -........ -........ - -; character 216 width = 8 -........ -......#. -..#####. -.#...##. -.#...##. -.#..#.#. -.#..#.#. -.#.#..#. -.#.#..#. -.##...#. -.##...#. -.#####.. -.#...... -........ - -; character 217 width = 8 -..#..... -...#.... -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 218 width = 8 -.....#.. -....#... -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 219 width = 8 -...##... -..#..#.. -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 220 width = 8 -..#..#.. -..#..#.. -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 221 width = 8 -....#... -...#.... -#.....#. -#.....#. -.#...#.. -.#...#.. -..#.#... -...#.... -...#.... -...#.... -...#.... -...#.... -........ -........ - -; character 222 width = 8 -........ -........ -.#...... -.#...... -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#####.. -.#...... -.#...... -........ -........ - -; character 223 width = 8 -........ -........ -..###... -.#...#.. -.#...#.. -.#..#... -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#####.. -.#...... -.#...... - -; character 224 width = 8 -........ -........ -..#..... -...#.... -........ -..#####. -.#....#. -.#....#. -.#....#. -.#....#. -.#...##. -..###.#. -........ -........ - -; character 225 width = 8 -........ -........ -.....#.. -....#... -........ -..#####. -.#....#. -.#....#. -.#....#. -.#....#. -.#...##. -..###.#. -........ -........ - -; character 226 width = 8 -........ -........ -...##... -..#..#.. -........ -..#####. -.#....#. -.#....#. -.#....#. -.#....#. -.#...##. -..###.#. -........ -........ - -; character 227 width = 8 -........ -........ -..##..#. -.#..##.. -........ -..#####. -.#....#. -.#....#. -.#....#. -.#....#. -.#...##. -..###.#. -........ -........ - -; character 228 width = 8 -........ -........ -..#..#.. -..#..#.. -........ -..#####. -.#....#. -.#....#. -.#....#. -.#....#. -.#...##. -..###.#. -........ -........ - -; character 229 width = 8 -........ -........ -...##... -..#..#.. -...##... -..#####. -.#....#. -.#....#. -.#....#. -.#....#. -.#...##. -..###.#. -........ -........ - -; character 230 width = 8 -........ -........ -........ -........ -........ -.#####.. -#..#..#. -#..#..#. -#..####. -#..#.... -#..#.... -.##.##.. -........ -........ - -; character 231 width = 8 -........ -........ -........ -........ -........ -..####.. -.#....#. -.#...... -.#...... -.#...... -.#....#. -..####.. -...#.... -..#..... - -; character 232 width = 8 -........ -........ -..#..... -...#.... -........ -..####.. -.#....#. -.#....#. -.######. -.#...... -.#...... -..####.. -........ -........ - -; character 233 width = 8 -........ -........ -.....#.. -....#... -........ -..####.. -.#....#. -.#....#. -.######. -.#...... -.#...... -..####.. -........ -........ - -; character 234 width = 8 -........ -........ -...##... -..#..#.. -........ -..####.. -.#....#. -.#....#. -.######. -.#...... -.#...... -..####.. -........ -........ - -; character 235 width = 8 -........ -........ -..#..#.. -..#..#.. -........ -..####.. -.#....#. -.#....#. -.######. -.#...... -.#...... -..####.. -........ -........ - -; character 236 width = 8 -........ -........ -..#..... -...#.... -........ -..##.... -...#.... -...#.... -...#.... -...#.... -...#.... -..###... -........ -........ - -; character 237 width = 8 -........ -........ -....#... -...#.... -........ -..##.... -...#.... -...#.... -...#.... -...#.... -...#.... -..###... -........ -........ - -; character 238 width = 8 -........ -........ -..##.... -.#..#... -........ -..##.... -...#.... -...#.... -...#.... -...#.... -...#.... -..###... -........ -........ - -; character 239 width = 8 -........ -........ -.#..#... -.#..#... -........ -..##.... -...#.... -...#.... -...#.... -...#.... -...#.... -..###... -........ -........ - -; character 240 width = 8 -........ -........ -..#.#... -...#.... -..#.#... -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 241 width = 8 -........ -........ -..##..#. -.#..##.. -........ -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -........ -........ - -; character 242 width = 8 -........ -........ -..#..... -...#.... -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 243 width = 8 -........ -........ -.....#.. -....#... -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 244 width = 8 -........ -........ -...##... -..#..#.. -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 245 width = 8 -........ -........ -..##..#. -.#..##.. -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 246 width = 8 -........ -........ -..#..#.. -..#..#.. -........ -..####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..####.. -........ -........ - -; character 247 width = 8 -........ -........ -........ -........ -...#.... -...#.... -........ -.#####.. -........ -...#.... -...#.... -........ -........ -........ - -; character 248 width = 8 -........ -........ -........ -........ -......#. -..####.. -.#...##. -.#..#.#. -.#.#..#. -.##...#. -.#....#. -#.####.. -........ -........ - -; character 249 width = 8 -........ -........ -..#..... -...#.... -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -........ -........ - -; character 250 width = 8 -........ -........ -.....#.. -....#... -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -........ -........ - -; character 251 width = 8 -........ -........ -...##... -..#..#.. -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -........ -........ - -; character 252 width = 8 -........ -........ -..#..#.. -..#..#.. -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -........ -........ - -; character 253 width = 8 -........ -........ -.....#.. -....#... -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -......#. -..####.. - -; character 254 width = 8 -........ -........ -.#...... -.#...... -.#...... -.#####.. -.#....#. -.#....#. -.#....#. -.#....#. -.#####.. -.#...... -.#...... -.#...... - -; character 255 width = 8 -........ -........ -..#..#.. -..#..#.. -........ -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -.#....#. -..#####. -......#. -..####.. diff --git a/thirdparty/grx249/fonts/ter-114v.psf b/thirdparty/grx249/fonts/ter-114v.psf deleted file mode 100644 index a84b253f0bf4cf02a6bcce8a76ef06b9f65b0fce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4602 zcmZvfS$G^r5r7B5H&6TN%lDCo0SU=g5_5$x;2VS$&?w8Y4`mS4B40~#UpsKb*Yc6NBu~6ng5Y4g-L9a$5+GDHk+N*Wb^7b`-h;mO z=V|okY4qS}aTKJHkyQOW4L?uIGGC+jY<~XK{QP{@2m*2_%Z;t|j%I6fm(;1Vxm(TV zZZ(^`)okuolMI70Pjbc&8EbSp>#M6<8yk(Af_f}QD%yinq(6FaDjIEiS}kg|vdknU zjW(OxQoG%3iniEpKkVyL=EROs5Ji+^jD;t8p7-@Xr!b0&?%G;0G0`o=He1bWQ54T! zs~$<7CkKu&e+Seu_8MWFVwI>SrEyeKiJVQI^vTQ#y=Wv(=SeS4V+D+gu?@qT#KK~c zT2@bIeQQJK2=8Rkq*&Oxka+5{meev#!_ZoW<5RO)*$=}|>SQTx^DZMF1ZmxlsA|}l z4mB|PD+ObzZv_U6;)iI6gPg3Ujv5K$q5WY=OoIgLQZA876VfILnx=xHwbDgang?B- z+l@i6jipd-+d8sn+Q@ossVK{KPwL!OF(Wb1nghReOf_5a(d}MJo!dB3D%zBp%ywI| zrR}woC)eml>ZEHGO=_uiyy~_@q>d&ByUOGzy_o(?{NgE=lDo)yLx#!JNf)NB*=!8v zud++ojJ5INbC5&Ha!wNQ(=fW#@z#=PB^3z^*hD?Lk7TB0xtLK(%|ec2&7Gquj#$m1 z1Qw)bBx*IOi_%QW9z*&8PN$U@5^LuMDJ5x5(aawOjglgh1B+2D%fk9IG|ZdkHxj`XSl^Z|t!sT0ptJ+mW)NoFUDZeJz;UUGMQ%->q@>wX;E` zbunkw_=Fy3G`c3OTFJ7ud*x}y)7hD|Yc)Lyy|YohP8{mVNq6v(quc?Bt`FG)Zsa9d zjt()EJ9S0wR6QsBIPvTI>)Nkl!2FEl*cpm<6jQi+JYKr`)h3 za%$hcONIqR>a7sUB{_R4q7~ilQSKzMABkE>WwVnZn~HmSREnkBmhV`;ZAqe@qrE+W z#&3-#X7jatcEY)E{+XkrNhgI?^>2tY;ev_u44DDPhCxTpd@(|58GI*C4*Z^ zzRjF2x(+&9vR4nvZo6>;aYiHS!W6PBxo+J^N|}z=NPdzWDKe4A_Gd(sbv`ynj#jI8 zJ|5PlgJbdj*%O00IT`q`6OP6{Ix8~fNTEw@j5~a;DCVZd!?7UPTVGgg6h&ikp}v=3 zqLj%}34)tv{67h`p(1a0@ALl{v(v{jEh^I;#`c;XPR!04tmu%snkfmjAJl373aoTwrXM?A)lRS-I5S~Vl<}A3*^zH6V`Tk_S zwY!_rd~0_a{du>j`JV3TxTh11I+Zr@^ECWC4L?u2D!#(I4avdWhI%^A};8+S6#$(}tFEZ*oCv)ck;G zdcQTeQ=2TTZ^E~r1>c76KndT4hv9qhefR;i;fK(H75EYS7=8jjg`dGAunIqiHTVVm z61s2%9))!{3OisY%)nW2Hk<>y;HmI5cse`-o(bo|v*0{@6 - -#ifdef __cplusplus -extern "C" { -#endif - -extern unsigned char _dac_g256[][3]; /* 256 shading dac values */ -extern unsigned char _dac_normal[][3]; /* 256 standard colors */ - -extern void setrgbdefaults(void); -extern void setrgbgray256(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/thirdparty/grx249/include/grdriver.h b/thirdparty/grx249/include/grdriver.h deleted file mode 100644 index b7fb885..0000000 --- a/thirdparty/grx249/include/grdriver.h +++ /dev/null @@ -1,202 +0,0 @@ -/** - ** grdriver.h ---- utilities for frame buffer and video card drivers - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __GRDRIVER_H_INCLUDED__ -#define __GRDRIVER_H_INCLUDED__ - -#ifndef __GRX20_H_INCLUDED__ -#include "grx20.h" -#endif - -/* -** The following definitions shouldn't be used in portable -** or binary distributed programs for compatibility with -** future versions of GRX -*/ -#ifdef USE_GRX_INTERNAL_DEFINITIONS - -/* - * Video mode flag bits (in the 'GrVideoModeExt' structure) - */ -#define GR_VMODEF_LINEAR 1 /* uses linear memory mapping */ -#define GR_VMODEF_ACCEL 2 /* it is an accelerated mode */ -#define GR_VMODEF_FAST_SVGA8 4 /* use faster mixed linear-planar access */ -#define GR_VMODEF_MEMORY 8 /* virtual screen, memory only mode */ - -extern GrFrameDriver -/* - * Standard frame drivers in GRX - */ -_GrFrameDriverHERC1, /* Hercules mono */ -_GrFrameDriverEGAVGA1, /* EGA VGA mono */ -_GrFrameDriverEGA4, /* EGA 16 color */ -_GrFrameDriverSVGA4, /* (Super) VGA 16 color */ -_GrFrameDriverSVGA8, /* (Super) VGA 256 color */ -_GrFrameDriverVGA8X, /* VGA 256 color mode X */ -_GrFrameDriverSVGA16, /* Super VGA 32768/65536 color */ -_GrFrameDriverSVGA24, /* Super VGA 16M color */ -_GrFrameDriverSVGA32L, /* Super VGA 16M color padded #1 */ -_GrFrameDriverSVGA32H, /* Super VGA 16M color padded #2 */ - /* Linear Framebuffer Modes : */ -_GrFrameDriverSVGA8_LFB, /* (Super) VGA 256 color */ -_GrFrameDriverSVGA16_LFB, /* Super VGA 32768/65536 color */ -_GrFrameDriverSVGA24_LFB, /* Super VGA 16M color */ -_GrFrameDriverSVGA32L_LFB, /* Super VGA 16M color padded #1 */ -_GrFrameDriverSVGA32H_LFB, /* Super VGA 16M color padded #2 */ - -_GrFrameDriverXWIN8, /* X 8 bpp */ -_GrFrameDriverXWIN16, /* X 16 bpp */ -_GrFrameDriverXWIN24, /* X 24 bpp */ -_GrFrameDriverXWIN32L, /* X 32 bpp padded #1 */ -_GrFrameDriverXWIN32H, /* X 32 bpp padded #2 */ - -_GrFrameDriverWIN32_4, /* WIN32 4 bpp */ -_GrFrameDriverWIN32_8, /* WIN32 8 bpp */ -_GrFrameDriverWIN32_24, /* WIN32 24 bpp */ - -_GrFrameDriverSDL8, /* SDL 8 bpp */ -_GrFrameDriverSDL16, /* SDL 16 bpp */ -_GrFrameDriverSDL24, /* SDL 24 bpp */ -_GrFrameDriverSDL32L, /* SDL 32 bpp padded #2 */ -_GrFrameDriverSDL32H, /* SDL 32 bpp padded #2 */ - -_GrFrameDriverRAM1, /* mono */ -_GrFrameDriverRAM4, /* 16 color planar */ -_GrFrameDriverRAM8, /* 256 color */ -_GrFrameDriverRAM16, /* 32768/65536 color */ -_GrFrameDriverRAM24, /* 16M color */ -_GrFrameDriverRAM32L, /* 16M color padded #1 */ -_GrFrameDriverRAM32H, /* 16M color padded #2 */ -_GrFrameDriverRAM3x8, /* 16M color planar (image mode) */ -/* - * This is a NULL-terminated table of frame driver descriptor pointers. Users - * can provide their own table with only the desired (or additional) drivers. - * Otherwise the table from the GRX library is linked, which includes ALL - * currently available drivers (i.e. the ones above). - */ -*_GrFrameDriverTable[]; - - -extern GrVideoDriver -/* - * Standard video drivers in GRX - */ -_GrVideoDriverHERC, /* Hercules driver */ -_GrVideoDriverSTDEGA, /* standard EGA driver */ -_GrVideoDriverSTDVGA, /* standard VGA driver */ -_GrVideoDriverVESA, /* generic VESA Super VGA driver */ -_GrVideoDriverATI28800, /* ATI 28800 chipset driver */ -_GrVideoDriverET4000, /* Tseng ET4000 driver */ -_GrVideoDriverCL5426, /* Cirrus 5426 driver */ -_GrVideoDriverMACH64, /* ATI MACH64 driver */ -_GrVideoDriverS3, /* S3 driver */ - -_GrVideoDriverXWIN, /* X11 interface */ -_GrVideoDriverXF86DGA, /* XFree86 DGA interface */ - -_GrVideoDriverSVGALIB, /* Linux SVGALIB interface */ -_GrVideoDriverLINUXFB, /* Linux framebuffer */ - -_GrVideoDriverWIN32, /* WIN32 interface */ - -_GrVideoDriverSDL, /* SDL intrercace */ - -_GrDriverMEM, /* memory screen driver */ - -/* - * This is a NULL-terminated table of video driver descriptor pointers. Users - * can provide their own table with only the desired (or additional) drivers. - * Otherwise the table from the GRX library is linked, which includes ALL - * currently available drivers (i.e. the ones above). - */ -*_GrVideoDriverTable[]; - -/* - * frame driver function types used inside GRX - */ -typedef GrColor (*_GR_readPix)(GrFrame *,int,int); -typedef void (*_GR_drawPix)(int,int,GrColor); -typedef void (*_GR_blitFunc)(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y, - int w,int h,GrColor op); -typedef GrColor far *(*_GR_getIndexedScanline)(GrFrame *c,int x,int y, - int w, int *indx); -typedef void (*_GR_putScanline)(int x,int y,int w, - const GrColor far *scl,GrColor op); - -/* - * Frame driver utility functions - */ -void _GrFrDrvGenericBitBlt(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op); -void _GrFrDrvPackedBitBltR2R(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op); -void _GrFrDrvPackedBitBltR2V(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op); -void _GrFrDrvPackedBitBltV2R(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op); -void _GrFrDrvPackedBitBltV2V(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op); -void _GrFrDrvPackedBitBltR2V_LFB(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op); -void _GrFrDrvPackedBitBltV2R_LFB(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op); -void _GrFrDrvPackedBitBltV2V_LFB(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op); - -void _GrFrDrvGenericPutScanline(int x,int y,int w,const GrColor far *scl, GrColor op ); -GrColor *_GrFrDrvGenericGetIndexedScanline(GrFrame *c, - int x,int y,int w, - int *indx ); - -void _GrFrDrvGenericStretchBlt(GrFrame *dst,int dx,int dy,int dw,int dh, - GrFrame *src,int sx,int sy,int sw,int sh, - GrColor op); - -/* - * Video driver utility functions - */ -int _GrViDrvDetectEGAVGA(void); -int _GrViDrvDetectVGA(void); -int _GrViDrvDetectEGA(void); -int _GrViDrvInitEGAVGA(char *options); -void _GrViDrvResetEGAVGA(void); -int _GrViDrvGetCurrentEGAVGAmode(void); -int _GrViDrvSetEGAVGAmode(GrVideoMode *mp,int noclear); -int _GrViDrvSetEGAVGAcustomTextMode(GrVideoMode *mp,int noclear); -void _GrViDrvLoadColorEGA4(int c,int r,int g,int b); -void _GrViDrvLoadColorVGA4(int c,int r,int g,int b); -void _GrViDrvLoadColorVGA8(int c,int r,int g,int b); -int _GrViDrvVESAsetVirtualSize(GrVideoMode *md,int w,int h,GrVideoMode *result); -int _GrViDrvVESAvirtualScroll(GrVideoMode *md,int x,int y,int result[2]); - -/* for 8 bit color modes: -** normal DAC has 6bit for each rgb color component, VESA 2.0 allows -** 6bit or 8bit DAC color values. -** _GrViDrvLoadColorVGA8() requires 8bit values that will be shifted right: -** -** DAC width 6bit 8bit -** shift 2 0 -*/ -void _GrViDrvSetDACshift(int shift); - -/* - * Commonly used video driver data structures - */ -extern GrVideoModeExt _GrViDrvEGAVGAtextModeExt; -extern GrVideoModeExt _GrViDrvEGAVGAcustomTextModeExt; - -GrVideoMode * _gr_selectmode(GrVideoDriver *drv,int w,int h,int bpp, - int txt,unsigned int *ep); - -#endif /* USE_GRX_INTERNAL_DEFINITIONS */ - -#endif /* whole file */ - diff --git a/thirdparty/grx249/include/grfontdv.h b/thirdparty/grx249/include/grfontdv.h deleted file mode 100644 index cfeb80a..0000000 --- a/thirdparty/grx249/include/grfontdv.h +++ /dev/null @@ -1,94 +0,0 @@ -/** - ** grfontdv.h ---- font driver declarations - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __GRFONTDV_H_INCLUDED__ -#define __GRFONTDV_H_INCLUDED__ - -#ifndef __GRX20_H_INCLUDED__ -#include "grx20.h" -#endif - -/* -** The following definitions shouldn't be used in portable -** or binary distributed programs for compatibility with -** future versions of GRX -*/ -#ifdef USE_GRX_INTERNAL_DEFINITIONS - -/* - * Font driver header. Font drivers are used to load various font file - * formats into the internal bitmap ('GrFont') representation. - */ -typedef struct _GR_fontDriver { - char *name; /* font format name (doc only) */ - char *ext; /* font file name extension */ - int scalable; /* scalable font file format */ - int (*openfile)(char *fname); - int (*header)(GrFontHeader *hdr); - int (*charwdt)(int chr); - int (*bitmap)(int chr,int w,int h,char *buffer); - void (*cleanup)(void); -} GrFontDriver; - -extern GrFontDriver -/* - * Available font drivers in GRX - */ -_GrFontDriverGRX, /* native GRX bitmap fonts */ -_GrFontDriverBGI, /* Borland BGI font driver */ -#ifdef __XWIN__ -_GrFontDriverXWIN, /* X font driver */ -#endif -_GrFontDriverRAW, /* RAW data/linux PSF font driver */ -_GrFontDriverFNA, /* ASCII font driver */ -_GrFontDriverWIN, /* MS Windows font resource driver */ -/* - * This is a NULL-terminated table of font driver descriptor pointers. Users - * can provide their own table with only the desired (or additional) drivers. - * Otherwise the table from the GRX library is linked, which includes ALL - * currently available drivers (i.e. the ones above). - */ -*_GrFontDriverTable[]; - -/* - * Various bits of font related global data - */ -extern struct _GR_fontFileInfo { - int npath; /* number of dirs to search */ - char **path; /* the search directories */ -} _GrFontFileInfo; - -/* - * utilities - */ -GrFont *_GrBuildFont( - const GrFontHeader *hdr, - int cvt, - int width, - int height, - int minch, - int maxch, - int (*charwdt)(int chr), - int (*bitmap)(int chr,int w,int h,char far *buffer), - int canscale -); - -#endif /* USE_GRX_INTERNAL_DEFINITIONS */ - -#endif /* whole file */ - diff --git a/thirdparty/grx249/include/grx20.h b/thirdparty/grx249/include/grx20.h deleted file mode 100644 index a0d9f62..0000000 --- a/thirdparty/grx249/include/grx20.h +++ /dev/null @@ -1,1678 +0,0 @@ -/** - ** grx20.h ---- GRX 2.x API functions and data structure declarations - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __GRX20_H_INCLUDED__ -#define __GRX20_H_INCLUDED__ - -/* ================================================================== */ -/* COMPILER -- CPU -- SYSTEM SPECIFIC VERSION STUFF */ -/* ================================================================== */ - -/* Version of GRX API -** -** usage: -** #include -** #ifndef GRX_VERSION_API -** #ifdef GRX_VERSION -** #define GRX_VERSION_API 0x0200 -** #else -** #define GRX_VERSION_API 0x0103 -** #endif -** #endif -*/ -#define GRX_VERSION_API 0x0249 - -/* these are the supported configurations: */ -#define GRX_VERSION_TCC_8086_DOS 1 /* also works with BCC */ -#define GRX_VERSION_GCC_386_GO32 2 /* deprecated, don't use it */ -#define GRX_VERSION_GCC_386_DJGPP 2 /* DJGPP v2 */ -#define GRX_VERSION_GCC_386_LINUX 3 /* the real stuff */ -#define GRX_VERSION_GENERIC_X11 4 /* generic X11 version */ -#define GRX_VERSION_WATCOM_DOS4GW 5 /* GS - Watcom C++ 11.0 32 Bit */ -/*#define GRX_VERSION_WATCOM_REAL_MODE 6*/ /* GS - Watcom C++ 11.0 16 Bit - TODO! */ -#define GRX_VERSION_GCC_386_WIN32 7 /* WIN32 using Mingw32 */ -#define GRX_VERSION_MSC_386_WIN32 8 /* WIN32 using MS-VC */ -#define GRX_VERSION_GCC_386_CYG32 9 /* WIN32 using CYGWIN */ -#define GRX_VERSION_GCC_386_X11 10 /* X11 version */ -#define GRX_VERSION_GCC_X86_64_LINUX 11 /* console framebuffer 64 */ -#define GRX_VERSION_GCC_X86_64_X11 12 /* X11 version 64 */ - -#define GRXMain main /* From the 2.4.6 version We don't need this */ - /* anymore, but it is here for previous apps */ - -#ifdef __TURBOC__ -#define GRX_VERSION GRX_VERSION_TCC_8086_DOS -#endif - -#ifdef __GNUC__ -#ifdef __DJGPP__ -#define GRX_VERSION GRX_VERSION_GCC_386_DJGPP -#endif -#if defined(__XWIN__) -#if defined(__linux__) && defined(__i386__) -#define GRX_VERSION GRX_VERSION_GCC_386_X11 -#endif -#if defined(__linux__) && defined(__x86_64__) -#define GRX_VERSION GRX_VERSION_GCC_X86_64_X11 -#endif -#else -#if defined(__linux__) && defined(__i386__) -#define GRX_VERSION GRX_VERSION_GCC_386_LINUX -#endif -#if defined(__linux__) && defined(__x86_64__) -#define GRX_VERSION GRX_VERSION_GCC_X86_64_LINUX -#endif -#endif -#ifdef __WIN32__ -#define GRX_VERSION GRX_VERSION_GCC_386_WIN32 -#endif -#ifdef __CYGWIN32__ -#define GRX_VERSION GRX_VERSION_GCC_386_CYG32 -#define __WIN32__ -#endif -#endif /* __GNUC__ */ - -#ifdef __WATCOMC__ /* GS - Watcom C++ 11.0 */ -#ifdef __DOS__ -#ifdef __386__ -#define GRX_VERSION GRX_VERSION_WATCOM_DOS4GW -#else -/* #define GRX_VERSION GRX_VERSION_WATCOM_REAL_MODE - I haven't tested GRX in 16 bit*/ -#endif /* __386__ */ -#endif /* __DOS__ */ -#endif /* __WATCOMC__ */ - -#ifdef _MSC_VER -#ifdef _WIN32 -#ifdef _M_IX86 -#define GRX_VERSION GRX_VERSION_MSC_386_WIN32 -#if !defined(__WIN32__) -#define __WIN32__ _WIN32 -#endif -#endif /* _M_IX86 */ -#endif /* _WIN32 */ -#endif /* _MSC_VER */ - -#ifndef GRX_VERSION -#if defined(unix) || defined(__unix) || defined(__unix__) || defined(_AIX) -#define GRX_VERSION GRX_VERSION_GENERIC_X11 -#endif -#endif - -#ifndef GRX_VERSION -#error GRX is not supported on your COMPILER/CPU/OPERATING SYSTEM! -#endif - -#if (GRX_VERSION==GRX_VERSION_WATCOM_DOS4GW) -#define near -#define far -#define huge -#endif - -#if !defined(__TURBOC__) && (GRX_VERSION!=GRX_VERSION_WATCOM_REAL_MODE) -#ifndef near /* get rid of these stupid keywords */ -#define near -#endif -#ifndef far -#define far -#endif -#ifndef huge -#define huge -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* a couple of forward declarations ... */ -typedef struct _GR_frameDriver GrFrameDriver; -typedef struct _GR_videoDriver GrVideoDriver; -typedef struct _GR_videoMode GrVideoMode; -typedef struct _GR_videoModeExt GrVideoModeExt; -typedef struct _GR_frame GrFrame; -typedef struct _GR_context GrContext; - -/* ================================================================== */ -/* SYSTEM TYPE DEF's */ -/* ================================================================== */ - -/* need unsigned 32 bit integer for color stuff */ -#if defined(__TURBOC__) && defined(__MSDOS__) -/* TCC && BCC are 16 bit compilers */ -typedef unsigned long int GrColor; -#else -/* all other platforms (GCC on i386 or x86_64 and ALPHA) have 32 bit ints */ -typedef unsigned int GrColor; -#endif - -/* ================================================================== */ -/* MODE SETTING */ -/* ================================================================== */ - -/* - * available video modes (for 'GrSetMode') - */ -typedef enum _GR_graphicsModes { - GR_unknown_mode = (-1), /* initial state */ - /* ============= modes which clear the video memory ============= */ - GR_80_25_text = 0, /* Extra parameters for GrSetMode: */ - GR_default_text, - GR_width_height_text, /* int w,int h */ - GR_biggest_text, - GR_320_200_graphics, - GR_default_graphics, - GR_width_height_graphics, /* int w,int h */ - GR_biggest_noninterlaced_graphics, - GR_biggest_graphics, - GR_width_height_color_graphics, /* int w,int h,GrColor nc */ - GR_width_height_color_text, /* int w,int h,GrColor nc */ - GR_custom_graphics, /* int w,int h,GrColor nc,int vx,int vy */ - /* ==== equivalent modes which do not clear the video memory ==== */ - GR_NC_80_25_text, - GR_NC_default_text, - GR_NC_width_height_text, /* int w,int h */ - GR_NC_biggest_text, - GR_NC_320_200_graphics, - GR_NC_default_graphics, - GR_NC_width_height_graphics, /* int w,int h */ - GR_NC_biggest_noninterlaced_graphics, - GR_NC_biggest_graphics, - GR_NC_width_height_color_graphics, /* int w,int h,GrColor nc */ - GR_NC_width_height_color_text, /* int w,int h,GrColor nc */ - GR_NC_custom_graphics, /* int w,int h,GrColor nc,int vx,int vy */ - /* ==== plane instead of color based modes ==== */ - /* colors = 1 << bpp >>> resort enum for GRX3 <<< */ - GR_width_height_bpp_graphics, /* int w,int h,int bpp */ - GR_width_height_bpp_text, /* int w,int h,int bpp */ - GR_custom_bpp_graphics, /* int w,int h,int bpp,int vx,int vy */ - GR_NC_width_height_bpp_graphics, /* int w,int h,int bpp */ - GR_NC_width_height_bpp_text, /* int w,int h,int bpp */ - GR_NC_custom_bpp_graphics /* int w,int h,int bpp,int vx,int vy */ -} GrGraphicsMode; - -/* - * Available frame modes (video memory layouts) - */ -typedef enum _GR_frameModes { - /* ====== video frame buffer modes ====== */ - GR_frameUndef, /* undefined */ - GR_frameText, /* text modes */ - GR_frameHERC1, /* Hercules mono */ - GR_frameEGAVGA1, /* EGA VGA mono */ - GR_frameEGA4, /* EGA 16 color */ - GR_frameSVGA4, /* (Super) VGA 16 color */ - GR_frameSVGA8, /* (Super) VGA 256 color */ - GR_frameVGA8X, /* VGA 256 color mode X */ - GR_frameSVGA16, /* Super VGA 32768/65536 color */ - GR_frameSVGA24, /* Super VGA 16M color */ - GR_frameSVGA32L, /* Super VGA 16M color padded #1 */ - GR_frameSVGA32H, /* Super VGA 16M color padded #2 */ - /* ==== modes provided by the X11 driver ===== */ - GR_frameXWIN1 = GR_frameEGAVGA1, - GR_frameXWIN4 = GR_frameSVGA4, - GR_frameXWIN8 = GR_frameSVGA8, - GR_frameXWIN16 = GR_frameSVGA16, - GR_frameXWIN24 = GR_frameSVGA24, - GR_frameXWIN32L = GR_frameSVGA32L, - GR_frameXWIN32H = GR_frameSVGA32H, - /* ==== modes provided by the WIN32 driver ===== */ - GR_frameWIN32_1 = GR_frameEGAVGA1, - GR_frameWIN32_4 = GR_frameSVGA4, - GR_frameWIN32_8 = GR_frameSVGA8, - GR_frameWIN32_16 = GR_frameSVGA16, - GR_frameWIN32_24 = GR_frameSVGA24, - GR_frameWIN32_32L = GR_frameSVGA32L, - GR_frameWIN32_32H = GR_frameSVGA32H, - /* ==== modes provided by the SDL driver ===== */ - GR_frameSDL8 = GR_frameSVGA8, - GR_frameSDL16 = GR_frameSVGA16, - GR_frameSDL24 = GR_frameSVGA24, - GR_frameSDL32L = GR_frameSVGA32L, - GR_frameSDL32H = GR_frameSVGA32H, - /* ==== linear frame buffer modes ====== */ - GR_frameSVGA8_LFB, /* (Super) VGA 256 color */ - GR_frameSVGA16_LFB, /* Super VGA 32768/65536 color */ - GR_frameSVGA24_LFB, /* Super VGA 16M color */ - GR_frameSVGA32L_LFB, /* Super VGA 16M color padded #1 */ - GR_frameSVGA32H_LFB, /* Super VGA 16M color padded #2 */ - /* ====== system RAM frame buffer modes ====== */ - GR_frameRAM1, /* mono */ - GR_frameRAM4, /* 16 color planar */ - GR_frameRAM8, /* 256 color */ - GR_frameRAM16, /* 32768/65536 color */ - GR_frameRAM24, /* 16M color */ - GR_frameRAM32L, /* 16M color padded #1 */ - GR_frameRAM32H, /* 16M color padded #2 */ - GR_frameRAM3x8, /* 16M color planar (image mode) */ - /* ====== markers for scanning modes ====== */ - GR_firstTextFrameMode = GR_frameText, - GR_lastTextFrameMode = GR_frameText, - GR_firstGraphicsFrameMode = GR_frameHERC1, - GR_lastGraphicsFrameMode = GR_frameSVGA32H_LFB, - GR_firstRAMframeMode = GR_frameRAM1, - GR_lastRAMframeMode = GR_frameRAM3x8 -} GrFrameMode; - -/* - * supported video adapter types - */ -typedef enum _GR_videoAdapters { - GR_UNKNOWN = (-1), /* not known (before driver set) */ - GR_VGA, /* VGA adapter */ - GR_EGA, /* EGA adapter */ - GR_HERC, /* Hercules mono adapter */ - GR_8514A, /* 8514A or compatible */ - GR_S3, /* S3 graphics accelerator */ - GR_XWIN, /* X11 driver */ - GR_WIN32, /* WIN32 driver */ - GR_LNXFB, /* Linux framebuffer */ - GR_SDL, /* SDL driver */ - GR_MEM /* memory only driver */ -} GrVideoAdapter; - -/* - * The video driver descriptor structure - */ -struct _GR_videoDriver { - char *name; /* driver name */ - enum _GR_videoAdapters adapter; /* adapter type */ - struct _GR_videoDriver *inherit; /* inherit video modes from this */ - struct _GR_videoMode *modes; /* table of supported modes */ - int nmodes; /* number of modes */ - int (*detect)(void); - int (*init)(char *options); - void (*reset)(void); - GrVideoMode * (*selectmode)(GrVideoDriver *drv,int w,int h,int bpp, - int txt,unsigned int *ep); - unsigned drvflags; -}; -/* bits in the drvflags field: */ -#define GR_DRIVERF_USER_RESOLUTION 1 - /* set if driver supports user setable arbitrary resolution */ - - -/* - * Video driver mode descriptor structure - */ -struct _GR_videoMode { - char present; /* is it really available? */ - char bpp; /* log2 of # of colors */ - short width,height; /* video mode geometry */ - short mode; /* BIOS mode number (if any) */ - int lineoffset; /* scan line length */ - int privdata; /* driver can use it for anything */ - struct _GR_videoModeExt *extinfo; /* extra info (maybe shared) */ -}; - -/* - * Video driver mode descriptor extension structure. This is a separate - * structure accessed via a pointer from the main mode descriptor. The - * reason for this is that frequently several modes can share the same - * extended info. - */ -struct _GR_videoModeExt { - enum _GR_frameModes mode; /* frame driver for this video mode */ - struct _GR_frameDriver *drv; /* optional frame driver override */ - char far *frame; /* frame buffer address */ - char cprec[3]; /* color component precisions */ - char cpos[3]; /* color component bit positions */ - int flags; /* mode flag bits; see "grdriver.h" */ - int (*setup)(GrVideoMode *md,int noclear); - int (*setvsize)(GrVideoMode *md,int w,int h,GrVideoMode *result); - int (*scroll)(GrVideoMode *md,int x,int y,int result[2]); - void (*setbank)(int bk); - void (*setrwbanks)(int rb,int wb); - void (*loadcolor)(int c,int r,int g,int b); - int LFB_Selector; -}; - -/* - * The frame driver descriptor structure. - */ -struct _GR_frameDriver { - enum _GR_frameModes mode; /* supported frame access mode */ - enum _GR_frameModes rmode; /* matching RAM frame (if video) */ - int is_video; /* video RAM frame driver ? */ - int row_align; /* scan line size alignment */ - int num_planes; /* number of planes */ - int bits_per_pixel; /* bits per pixel */ - long max_plane_size; /* maximum plane size in bytes */ - int (*init)(GrVideoMode *md); - GrColor (*readpixel)(GrFrame *c,int x,int y); - void (*drawpixel)(int x,int y,GrColor c); - void (*drawline)(int x,int y,int dx,int dy,GrColor c); - void (*drawhline)(int x,int y,int w,GrColor c); - void (*drawvline)(int x,int y,int h,GrColor c); - void (*drawblock)(int x,int y,int w,int h,GrColor c); - void (*drawbitmap)(int x,int y,int w,int h,char far *bmp,int pitch,int start,GrColor fg,GrColor bg); - void (*drawpattern)(int x,int y,int w,char patt,GrColor fg,GrColor bg); - void (*bitblt)(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op); - void (*bltv2r)(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op); - void (*bltr2v)(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op); - /* new functions in v2.3 */ - GrColor far *(*getindexedscanline)(GrFrame *c,int x, int y, int w, int *indx); - /* will return an array of pixel values pv[] read from frame */ - /* if indx == NULL: pv[i=0..w-1] = readpixel(x+i,y) */ - /* else pv[i=0..w-1] = readpixel(x+indx[i],y) */ - void (*putscanline)(int x, int y, int w,const GrColor far *scl, GrColor op); - /** will draw scl[i=0..w-1] to frame: */ - /* if (scl[i] != skipcolor) drawpixel(x+i,y,(scl[i] | op)) */ -}; - -/* - * driver and mode info structure - */ -extern const struct _GR_driverInfo { - struct _GR_videoDriver *vdriver; /* the current video driver */ - struct _GR_videoMode *curmode; /* current video mode pointer */ - struct _GR_videoMode actmode; /* copy of above, resized if virtual */ - struct _GR_frameDriver fdriver; /* frame driver for the current context */ - struct _GR_frameDriver sdriver; /* frame driver for the screen */ - struct _GR_frameDriver tdriver; /* a dummy driver for text modes */ - enum _GR_graphicsModes mcode; /* code for the current mode */ - int deftw,defth; /* default text mode size */ - int defgw,defgh; /* default graphics mode size */ - GrColor deftc,defgc; /* default text and graphics colors */ - int vposx,vposy; /* current virtual viewport position */ - int errsfatal; /* if set, exit upon errors */ - int moderestore; /* restore startup video mode if set */ - int splitbanks; /* indicates separate R/W banks */ - int curbank; /* currently mapped bank */ - void (*mdsethook)(void); /* callback for mode set */ - void (*setbank)(int bk); /* banking routine */ - void (*setrwbanks)(int rb,int wb); /* split banking routine */ -} * const GrDriverInfo; - -/* - * setup stuff - */ -int GrSetDriver(char *drvspec); -int GrSetMode(GrGraphicsMode which,...); -int GrSetViewport(int xpos,int ypos); -void GrSetModeHook(void (*hookfunc)(void)); -void GrSetModeRestore(int restoreFlag); -void GrSetErrorHandling(int exitIfError); -void GrSetEGAVGAmonoDrawnPlane(int plane); -void GrSetEGAVGAmonoShownPlane(int plane); - -unsigned GrGetLibraryVersion(void); -unsigned GrGetLibrarySystem(void); - -/* - * inquiry stuff ---- many of these are actually macros (see below) - */ -GrGraphicsMode GrCurrentMode(void); -GrVideoAdapter GrAdapterType(void); -GrFrameMode GrCurrentFrameMode(void); -GrFrameMode GrScreenFrameMode(void); -GrFrameMode GrCoreFrameMode(void); - -const GrVideoDriver *GrCurrentVideoDriver(void); -const GrVideoMode *GrCurrentVideoMode(void); -const GrVideoMode *GrVirtualVideoMode(void); -const GrFrameDriver *GrCurrentFrameDriver(void); -const GrFrameDriver *GrScreenFrameDriver(void); -const GrVideoMode *GrFirstVideoMode(GrFrameMode fmode); -const GrVideoMode *GrNextVideoMode(const GrVideoMode *prev); - -int GrScreenX(void); -int GrScreenY(void); -int GrVirtualX(void); -int GrVirtualY(void); -int GrViewportX(void); -int GrViewportY(void); - -int GrScreenIsVirtual(void); - -/* - * RAM context geometry and memory allocation inquiry stuff - */ -int GrFrameNumPlanes(GrFrameMode md); -int GrFrameLineOffset(GrFrameMode md,int width); -long GrFramePlaneSize(GrFrameMode md,int w,int h); -long GrFrameContextSize(GrFrameMode md,int w,int h); - -int GrNumPlanes(void); -int GrLineOffset(int width); -long GrPlaneSize(int w,int h); -long GrContextSize(int w,int h); - -/* - * inline implementation for some of the above - */ -#ifndef GRX_SKIP_INLINES -#define GrAdapterType() (GrDriverInfo->vdriver ? GrDriverInfo->vdriver->adapter : GR_UNKNOWN) -#define GrCurrentMode() (GrDriverInfo->mcode) -#define GrCurrentFrameMode() (GrDriverInfo->fdriver.mode) -#define GrScreenFrameMode() (GrDriverInfo->sdriver.mode) -#define GrCoreFrameMode() (GrDriverInfo->sdriver.rmode) - -#define GrCurrentVideoDriver() ((const GrVideoDriver *)( GrDriverInfo->vdriver)) -#define GrCurrentVideoMode() ((const GrVideoMode *)( GrDriverInfo->curmode)) -#define GrVirtualVideoMode() ((const GrVideoMode *)(&GrDriverInfo->actmode)) -#define GrCurrentFrameDriver() ((const GrFrameDriver *)(&GrDriverInfo->fdriver)) -#define GrScreenFrameDriver() ((const GrFrameDriver *)(&GrDriverInfo->sdriver)) - -#define GrIsFixedMode() (!( GrCurrentVideoDriver()->drvflags \ - & GR_DRIVERF_USER_RESOLUTION)) - -#define GrScreenX() (GrCurrentVideoMode()->width) -#define GrScreenY() (GrCurrentVideoMode()->height) -#define GrVirtualX() (GrVirtualVideoMode()->width) -#define GrVirtualY() (GrVirtualVideoMode()->height) -#define GrViewportX() (GrDriverInfo->vposx) -#define GrViewportY() (GrDriverInfo->vposy) - -#define GrScreenIsVirtual() ((GrScreenX() + GrScreenY()) < (GrVirtualX() + GrVirtualY())) - -#define GrNumPlanes() GrFrameNumPlanes(GrCoreFrameMode()) -#define GrLineOffset(w) GrFrameLineOffset(GrCoreFrameMode(),w) -#define GrPlaneSize(w,h) GrFramePlaneSize(GrCoreFrameMode(),w,h) -#define GrContextSize(w,h) GrFrameContextSize(GrCoreFrameMode(),w,h) -#endif /* GRX_SKIP_INLINES */ - - -/* ================================================================== */ -/* FRAME BUFFER, CONTEXT AND CLIPPING STUFF */ -/* ================================================================== */ - -struct _GR_frame { - char far *gf_baseaddr[4]; /* base address of frame memory */ - short gf_selector; /* frame memory segment selector */ - char gf_onscreen; /* is it in video memory ? */ - char gf_memflags; /* memory allocation flags */ - int gf_lineoffset; /* offset to next scan line in bytes */ - struct _GR_frameDriver *gf_driver; /* frame access functions */ -}; - -struct _GR_context { - struct _GR_frame gc_frame; /* frame buffer info */ - struct _GR_context *gc_root; /* context which owns frame */ - int gc_xmax; /* max X coord (width - 1) */ - int gc_ymax; /* max Y coord (height - 1) */ - int gc_xoffset; /* X offset from root's base */ - int gc_yoffset; /* Y offset from root's base */ - int gc_xcliplo; /* low X clipping limit */ - int gc_ycliplo; /* low Y clipping limit */ - int gc_xcliphi; /* high X clipping limit */ - int gc_ycliphi; /* high Y clipping limit */ - int gc_usrxbase; /* user window min X coordinate */ - int gc_usrybase; /* user window min Y coordinate */ - int gc_usrwidth; /* user window width */ - int gc_usrheight; /* user window height */ -# define gc_baseaddr gc_frame.gf_baseaddr -# define gc_selector gc_frame.gf_selector -# define gc_onscreen gc_frame.gf_onscreen -# define gc_memflags gc_frame.gf_memflags -# define gc_lineoffset gc_frame.gf_lineoffset -# define gc_driver gc_frame.gf_driver -}; - -extern const struct _GR_contextInfo { - struct _GR_context current; /* the current context */ - struct _GR_context screen; /* the screen context */ -} * const GrContextInfo; - -GrContext *GrCreateContext(int w,int h,char far *memory[4],GrContext *where); -GrContext *GrCreateFrameContext(GrFrameMode md,int w,int h,char far *memory[4],GrContext *where); -GrContext *GrCreateSubContext(int x1,int y1,int x2,int y2,const GrContext *parent,GrContext *where); -GrContext *GrSaveContext(GrContext *where); - -GrContext *GrCurrentContext(void); -GrContext *GrScreenContext(void); - -void GrDestroyContext(GrContext *context); -void GrResizeSubContext(GrContext *context,int x1,int y1,int x2,int y2); -void GrSetContext(const GrContext *context); - -void GrSetClipBox(int x1,int y1,int x2,int y2); -void GrSetClipBoxC(GrContext *c,int x1,int y1,int x2,int y2); -void GrGetClipBox(int *x1p,int *y1p,int *x2p,int *y2p); -void GrGetClipBoxC(const GrContext *c,int *x1p,int *y1p,int *x2p,int *y2p); -void GrResetClipBox(void); -void GrResetClipBoxC(GrContext *c); - -int GrMaxX(void); -int GrMaxY(void); -int GrSizeX(void); -int GrSizeY(void); -int GrLowX(void); -int GrLowY(void); -int GrHighX(void); -int GrHighY(void); - -#ifndef GRX_SKIP_INLINES -#define GrCreateContext(w,h,m,c) (GrCreateFrameContext(GrCoreFrameMode(),w,h,m,c)) -#define GrCurrentContext() ((GrContext *)(&GrContextInfo->current)) -#define GrScreenContext() ((GrContext *)(&GrContextInfo->screen)) -#define GrMaxX() (GrCurrentContext()->gc_xmax) -#define GrMaxY() (GrCurrentContext()->gc_ymax) -#define GrSizeX() (GrMaxX() + 1) -#define GrSizeY() (GrMaxY() + 1) -#define GrLowX() (GrCurrentContext()->gc_xcliplo) -#define GrLowY() (GrCurrentContext()->gc_ycliplo) -#define GrHighX() (GrCurrentContext()->gc_xcliphi) -#define GrHighY() (GrCurrentContext()->gc_ycliphi) -#define GrGetClipBoxC(C,x1p,y1p,x2p,y2p) do { \ - *(x1p) = (C)->gc_xcliplo; \ - *(y1p) = (C)->gc_ycliplo; \ - *(x2p) = (C)->gc_xcliphi; \ - *(y2p) = (C)->gc_ycliphi; \ -} while(0) -#define GrGetClipBox(x1p,y1p,x2p,y2p) do { \ - *(x1p) = GrLowX(); \ - *(y1p) = GrLowY(); \ - *(x2p) = GrHighX(); \ - *(y2p) = GrHighY(); \ -} while(0) -#endif /* GRX_SKIP_INLINES */ - -/* ================================================================== */ -/* COLOR STUFF */ -/* ================================================================== */ - -/* - * Flags to 'OR' to colors for various operations - */ -#define GrWRITE 0UL /* write color */ -#define GrXOR 0x01000000UL /* to "XOR" any color to the screen */ -#define GrOR 0x02000000UL /* to "OR" to the screen */ -#define GrAND 0x03000000UL /* to "AND" to the screen */ -#define GrIMAGE 0x04000000UL /* BLIT: write, except given color */ -#define GrCVALUEMASK 0x00ffffffUL /* color value mask */ -#define GrCMODEMASK 0xff000000UL /* color operation mask */ -#define GrNOCOLOR (GrXOR | 0) /* GrNOCOLOR is used for "no" color */ - -GrColor GrColorValue(GrColor c); -GrColor GrColorMode(GrColor c); -GrColor GrWriteModeColor(GrColor c); -GrColor GrXorModeColor(GrColor c); -GrColor GrOrModeColor(GrColor c); -GrColor GrAndModeColor(GrColor c); -GrColor GrImageModeColor(GrColor c); - -/* - * color system info structure (all [3] arrays are [r,g,b]) - */ -extern const struct _GR_colorInfo { - GrColor ncolors; /* number of colors */ - GrColor nfree; /* number of unallocated colors */ - GrColor black; /* the black color */ - GrColor white; /* the white color */ - unsigned int RGBmode; /* set when RGB mode */ - unsigned int prec[3]; /* color field precisions */ - unsigned int pos[3]; /* color field positions */ - unsigned int mask[3]; /* masks for significant bits */ - unsigned int round[3]; /* add these for rounding */ - unsigned int shift[3]; /* shifts for (un)packing color */ - unsigned int norm; /* normalization for (un)packing */ - struct { /* color table for non-RGB modes */ - unsigned char r,g,b; /* loaded components */ - unsigned int defined:1; /* r,g,b values are valid if set */ - unsigned int writable:1; /* can be changed by 'GrSetColor' */ - unsigned long int nused; /* usage count */ - } ctable[256]; -} * const GrColorInfo; - -void GrResetColors(void); -void GrSetRGBcolorMode(void); -void GrRefreshColors(void); - -GrColor GrNumColors(void); -GrColor GrNumFreeColors(void); - -GrColor GrBlack(void); -GrColor GrWhite(void); - -GrColor GrBuildRGBcolorT(int r,int g,int b); -GrColor GrBuildRGBcolorR(int r,int g,int b); -int GrRGBcolorRed(GrColor c); -int GrRGBcolorGreen(GrColor c); -int GrRGBcolorBlue(GrColor c); - -GrColor GrAllocColor(int r,int g,int b); /* shared, read-only */ -GrColor GrAllocColorID(int r,int g,int b); /* potentially inlined version */ -GrColor GrAllocColor2(long hcolor); /* shared, read-only, 0xRRGGBB */ -GrColor GrAllocColor2ID(long hcolor); /* potentially inlined version */ -GrColor GrAllocCell(void); /* unshared, read-write */ - -GrColor *GrAllocEgaColors(void); /* shared, read-only standard EGA colors */ - -void GrSetColor(GrColor c,int r,int g,int b); -void GrFreeColor(GrColor c); -void GrFreeCell(GrColor c); - -void GrQueryColor(GrColor c,int *r,int *g,int *b); -void GrQueryColorID(GrColor c,int *r,int *g,int *b); -void GrQueryColor2(GrColor c,long *hcolor); -void GrQueryColor2ID(GrColor c,long *hcolor); - -int GrColorSaveBufferSize(void); -void GrSaveColors(void *buffer); -void GrRestoreColors(void *buffer); - -#ifndef GRX_SKIP_INLINES -#define GrColorValue(c) ((GrColor)(c) & GrCVALUEMASK) -#define GrColorMode(c) ((GrColor)(c) & GrCMODEMASK) -#define GrWriteModeColor(c) (GrColorValue(c) | GrWRITE) -#define GrXorModeColor(c) (GrColorValue(c) | GrXOR) -#define GrOrModeColor(c) (GrColorValue(c) | GrOR) -#define GrAndModeColor(c) (GrColorValue(c) | GrAND) -#define GrImageModeColor(c) (GrColorValue(c) | GrIMAGE) -#define GrNumColors() (GrColorInfo->ncolors) -#define GrNumFreeColors() (GrColorInfo->nfree) -#define GrBlack() ( \ - (GrColorInfo->black == GrNOCOLOR) ? \ - (GrBlack)() : \ - GrColorInfo->black \ -) -#define GrWhite() ( \ - (GrColorInfo->white == GrNOCOLOR) ? \ - (GrWhite)() : \ - GrColorInfo->white \ -) -#define GrBuildRGBcolorT(r,g,b) (( \ - ((GrColor)((int)(r) & GrColorInfo->mask[0]) << GrColorInfo->shift[0]) |\ - ((GrColor)((int)(g) & GrColorInfo->mask[1]) << GrColorInfo->shift[1]) |\ - ((GrColor)((int)(b) & GrColorInfo->mask[2]) << GrColorInfo->shift[2]) \ - ) >> GrColorInfo->norm \ -) -#define GrBuildRGBcolorR(r,g,b) GrBuildRGBcolorT( \ - (((unsigned int)(r)) > GrColorInfo->mask[0]) ? 255 : (unsigned int)(r) + GrColorInfo->round[0], \ - (((unsigned int)(g)) > GrColorInfo->mask[1]) ? 255 : (unsigned int)(g) + GrColorInfo->round[1], \ - (((unsigned int)(b)) > GrColorInfo->mask[2]) ? 255 : (unsigned int)(b) + GrColorInfo->round[2] \ -) -#define GrRGBcolorRed(c) ( \ - (int)(((GrColor)(c) << GrColorInfo->norm) >> GrColorInfo->shift[0]) & \ - (GrColorInfo->mask[0]) \ -) -#define GrRGBcolorGreen(c) ( \ - (int)(((GrColor)(c) << GrColorInfo->norm) >> GrColorInfo->shift[1]) & \ - (GrColorInfo->mask[1]) \ -) -#define GrRGBcolorBlue(c) ( \ - (int)(((GrColor)(c) << GrColorInfo->norm) >> GrColorInfo->shift[2]) & \ - (GrColorInfo->mask[2]) \ -) -#define GrAllocColorID(r,g,b) (GrColorInfo->RGBmode ? \ - GrBuildRGBcolorR(r,g,b) : \ - GrAllocColor(r,g,b) \ -) -#define GrAllocColor2(hcolor) (GrAllocColor( \ - ((hcolor & 0xff0000) >> 16), \ - ((hcolor & 0x00ff00) >> 8), \ - (hcolor & 0x0000ff)) \ -) -#define GrAllocColor2ID(hcolor) (GrAllocColorID( \ - ((hcolor & 0xff0000) >> 16), \ - ((hcolor & 0x00ff00) >> 8), \ - (hcolor & 0x0000ff)) \ -) -#define GrQueryColorID(c,r,g,b) do { \ - if(GrColorInfo->RGBmode) { \ - *(r) = GrRGBcolorRed(c); \ - *(g) = GrRGBcolorGreen(c); \ - *(b) = GrRGBcolorBlue(c); \ - break; \ - } \ - if(((GrColor)(c) < GrColorInfo->ncolors) && \ - (GrColorInfo->ctable[(GrColor)(c)].defined)) { \ - *(r) = GrColorInfo->ctable[(GrColor)(c)].r; \ - *(g) = GrColorInfo->ctable[(GrColor)(c)].g; \ - *(b) = GrColorInfo->ctable[(GrColor)(c)].b; \ - break; \ - } \ - *(r) = *(g) = *(b) = 0; \ -} while(0) -#define GrQueryColor2ID(c,hcolor) do { \ - if(GrColorInfo->RGBmode) { \ - *(hcolor) = GrRGBcolorRed(c) << 16; \ - *(hcolor) |= GrRGBcolorGreen(c) << 8; \ - *(hcolor) |= GrRGBcolorBlue(c); \ - break; \ - } \ - if(((GrColor)(c) < GrColorInfo->ncolors) && \ - (GrColorInfo->ctable[(GrColor)(c)].defined)) { \ - *(hcolor) = GrColorInfo->ctable[(GrColor)(c)].r; \ - *(hcolor) = GrColorInfo->ctable[(GrColor)(c)].g; \ - *(hcolor) = GrColorInfo->ctable[(GrColor)(c)].b; \ - break; \ - } \ - *(hcolor) = 0; \ -} while(0) -#endif /* GRX_SKIP_INLINES */ - -/* - * color table (for primitives using several colors): - * it is an array of colors with the first element being - * the number of colors in the table - */ -typedef GrColor *GrColorTableP; - -#define GR_CTABLE_SIZE(table) ( \ - (table) ? (unsigned int)((table)[0]) : 0U \ -) -#define GR_CTABLE_COLOR(table,index) ( \ - ((unsigned)(index) < GR_CTABLE_SIZE(table)) ? \ - (table)[((unsigned)(index)) + 1] : \ - GrNOCOLOR \ -) -#define GR_CTABLE_ALLOCSIZE(ncolors) ((ncolors) + 1) - -/* ================================================================== */ -/* GRAPHICS PRIMITIVES */ -/* ================================================================== */ - -#ifdef __TURBOC__ -/* this is for GRX compiled with SMALL_STACK: */ -#define GR_MAX_POLYGON_POINTS (8192) -#define GR_MAX_ELLIPSE_POINTS (1024 + 5) -/* old values without SMALL_STACK: */ -/* #define GR_MAX_POLYGON_POINTS (512) */ -/* #define GR_MAX_ELLIPSE_POINTS (256 + 5) */ -#else -#define GR_MAX_POLYGON_POINTS (1000000) -#define GR_MAX_ELLIPSE_POINTS (1024 + 5) -#endif -#define GR_MAX_ANGLE_VALUE (3600) -#define GR_ARC_STYLE_OPEN 0 -#define GR_ARC_STYLE_CLOSE1 1 -#define GR_ARC_STYLE_CLOSE2 2 - -typedef struct { /* framed box colors */ - GrColor fbx_intcolor; - GrColor fbx_topcolor; - GrColor fbx_rightcolor; - GrColor fbx_bottomcolor; - GrColor fbx_leftcolor; -} GrFBoxColors; - -void GrClearScreen(GrColor bg); -void GrClearContext(GrColor bg); -void GrClearContextC(GrContext *ctx, GrColor bg); -void GrClearClipBox(GrColor bg); -void GrPlot(int x,int y,GrColor c); -void GrLine(int x1,int y1,int x2,int y2,GrColor c); -void GrHLine(int x1,int x2,int y,GrColor c); -void GrVLine(int x,int y1,int y2,GrColor c); -void GrBox(int x1,int y1,int x2,int y2,GrColor c); -void GrFilledBox(int x1,int y1,int x2,int y2,GrColor c); -void GrFramedBox(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c); -int GrGenerateEllipse(int xc,int yc,int xa,int ya,int points[GR_MAX_ELLIPSE_POINTS][2]); -int GrGenerateEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int points[GR_MAX_ELLIPSE_POINTS][2]); -void GrLastArcCoords(int *xs,int *ys,int *xe,int *ye,int *xc,int *yc); -void GrCircle(int xc,int yc,int r,GrColor c); -void GrEllipse(int xc,int yc,int xa,int ya,GrColor c); -void GrCircleArc(int xc,int yc,int r,int start,int end,int style,GrColor c); -void GrEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrColor c); -void GrFilledCircle(int xc,int yc,int r,GrColor c); -void GrFilledEllipse(int xc,int yc,int xa,int ya,GrColor c); -void GrFilledCircleArc(int xc,int yc,int r,int start,int end,int style,GrColor c); -void GrFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrColor c); -void GrPolyLine(int numpts,int points[][2],GrColor c); -void GrPolygon(int numpts,int points[][2],GrColor c); -void GrFilledConvexPolygon(int numpts,int points[][2],GrColor c); -void GrFilledPolygon(int numpts,int points[][2],GrColor c); -void GrBitBlt(GrContext *dst,int x,int y,GrContext *src,int x1,int y1,int x2,int y2,GrColor op); -void GrBitBlt1bpp(GrContext *dst,int dx,int dy,GrContext *src,int x1,int y1,int x2,int y2,GrColor fg,GrColor bg); -void GrFloodFill(int x, int y, GrColor border, GrColor c); -void GrFloodSpill(int x1, int y1, int x2, int y2, GrColor old_c, GrColor new_c); -void GrFloodSpill2(int x1, int y1, int x2, int y2, GrColor old_c1, GrColor new_c1, GrColor old_c2, GrColor new_c2); -void GrFloodSpillC(GrContext *ctx, int x1, int y1, int x2, int y2, GrColor old_c, GrColor new_c); -void GrFloodSpillC2(GrContext *ctx, int x1, int y1, int x2, int y2, GrColor old_c1, GrColor new_c1, GrColor old_c2, GrColor new_c2); - -GrColor GrPixel(int x,int y); -GrColor GrPixelC(GrContext *c,int x,int y); - -const GrColor *GrGetScanline(int x1,int x2,int yy); -const GrColor *GrGetScanlineC(GrContext *ctx,int x1,int x2,int yy); -/* Input ctx: source context, if NULL the current context is used */ -/* x1 : first x coordinate read */ -/* x2 : last x coordinate read */ -/* yy : y coordinate */ -/* Output NULL : error / no data (clipping occured) */ -/* else */ -/* p[0..w]: pixel values read */ -/* (w = |x2-y1|) */ -/* Output data is valid until next GRX call ! */ - -void GrPutScanline(int x1,int x2,int yy,const GrColor *c, GrColor op); -/* Input x1 : first x coordinate to be set */ -/* x2 : last x coordinate to be set */ -/* yy : y coordinate */ -/* c : c[0..(|x2-x1|] hold the pixel data */ -/* op : Operation (GrWRITE/GrXOR/GrOR/GrAND/GrIMAGE) */ -/* */ -/* Note c[..] data must fit GrCVALUEMASK otherwise the results */ -/* are implementation dependend. */ -/* => You can't supply operation code with the pixel data! */ - - -#ifndef GRX_SKIP_INLINES -#define GrGetScanline(x1,x2,yy) \ - GrGetScanlineC(NULL,(x1),(x2),(yy)) -#endif - -/* ================================================================== */ -/* NON CLIPPING DRAWING PRIMITIVES */ -/* ================================================================== */ - -void GrPlotNC(int x,int y,GrColor c); -void GrLineNC(int x1,int y1,int x2,int y2,GrColor c); -void GrHLineNC(int x1,int x2,int y,GrColor c); -void GrVLineNC(int x,int y1,int y2,GrColor c); -void GrBoxNC(int x1,int y1,int x2,int y2,GrColor c); -void GrFilledBoxNC(int x1,int y1,int x2,int y2,GrColor c); -void GrFramedBoxNC(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c); -void GrBitBltNC(GrContext *dst,int x,int y,GrContext *src,int x1,int y1,int x2,int y2,GrColor op); - -GrColor GrPixelNC(int x,int y); -GrColor GrPixelCNC(GrContext *c,int x,int y); - -#ifndef GRX_SKIP_INLINES -#define GrPlotNC(x,y,c) ( \ - (*GrCurrentFrameDriver()->drawpixel)( \ - ((x) + GrCurrentContext()->gc_xoffset), \ - ((y) + GrCurrentContext()->gc_yoffset), \ - ((c)) \ - ) \ -) -#define GrPixelNC(x,y) ( \ - (*GrCurrentFrameDriver()->readpixel)( \ - (GrFrame *)(&GrCurrentContext()->gc_frame), \ - ((x) + GrCurrentContext()->gc_xoffset), \ - ((y) + GrCurrentContext()->gc_yoffset) \ - ) \ -) -#define GrPixelCNC(c,x,y) ( \ - (*(c)->gc_driver->readpixel)( \ - (&(c)->gc_frame), \ - ((x) + (c)->gc_xoffset), \ - ((y) + (c)->gc_yoffset) \ - ) \ -) -#endif /* GRX_SKIP_INLINES */ - -/* ================================================================== */ -/* FONTS AND TEXT PRIMITIVES */ -/* ================================================================== */ - -/* - * text drawing directions - */ -#define GR_TEXT_RIGHT 0 /* normal */ -#define GR_TEXT_DOWN 1 /* downward */ -#define GR_TEXT_LEFT 2 /* upside down, right to left */ -#define GR_TEXT_UP 3 /* upward */ -#define GR_TEXT_DEFAULT GR_TEXT_RIGHT -#define GR_TEXT_IS_VERTICAL(d) ((d) & 1) - -/* - * text alignment options - */ -#define GR_ALIGN_LEFT 0 /* X only */ -#define GR_ALIGN_TOP 0 /* Y only */ -#define GR_ALIGN_CENTER 1 /* X, Y */ -#define GR_ALIGN_RIGHT 2 /* X only */ -#define GR_ALIGN_BOTTOM 2 /* Y only */ -#define GR_ALIGN_BASELINE 3 /* Y only */ -#define GR_ALIGN_DEFAULT GR_ALIGN_LEFT - -/* - * character types in text strings - */ -#define GR_BYTE_TEXT 0 /* one byte per character */ -#define GR_WORD_TEXT 1 /* two bytes per character */ -#define GR_ATTR_TEXT 2 /* chr w/ PC style attribute byte */ - -/* - * macros to access components of various string/character types - */ -#define GR_TEXTCHR_SIZE(ty) (((ty) == GR_BYTE_TEXT) ? sizeof(char) : sizeof(short)) -#define GR_TEXTCHR_CODE(ch,ty) (((ty) == GR_WORD_TEXT) ? (unsigned short)(ch) : (unsigned char)(ch)) -#define GR_TEXTCHR_ATTR(ch,ty) (((ty) == GR_ATTR_TEXT) ? ((unsigned short)(ch) >> 8) : 0) -#define GR_TEXTSTR_CODE(pt,ty) (((ty) == GR_WORD_TEXT) ? ((unsigned short *)(pt))[0] : ((unsigned char *)(pt))[0]) -#define GR_TEXTSTR_ATTR(pt,ty) (((ty) == GR_ATTR_TEXT) ? ((unsigned char *)(pt))[1] : 0) - -/* - * text attribute macros for the GR_ATTR_TEXT type - * _GR_textattrintensevideo drives if the eighth bit is used for - * underline (false, default) or more background colors (true) - */ -extern int _GR_textattrintensevideo; - -#define GR_BUILD_ATTR(fg,bg,ul) (_GR_textattrintensevideo ? \ - (((fg) & 15) | (((bg) & 15) << 4)) \ - : \ - (((fg) & 15) | (((bg) & 7) << 4) | ((ul) ? 128 : 0)) \ - ) -#define GR_ATTR_FGCOLOR(attr) (((attr) ) & 15) -#define GR_ATTR_BGCOLOR(attr) (_GR_textattrintensevideo ? \ - (((attr) >> 4) & 15) \ - : \ - (((attr) >> 4) & 7) \ - ) -#define GR_ATTR_UNDERLINE(attr) (_GR_textattrintensevideo ? \ - (0) \ - : \ - (((attr) ) & 128) \ - ) - -/* - * OR this to the foreground color value for underlined text when - * using GR_BYTE_TEXT or GR_WORD_TEXT modes. - */ -#define GR_UNDERLINE_TEXT (GrXOR << 4) - -/* - * Font conversion flags for 'GrLoadConvertedFont'. OR them as desired. - */ -#define GR_FONTCVT_NONE 0 /* no conversion */ -#define GR_FONTCVT_SKIPCHARS 1 /* load only selected characters */ -#define GR_FONTCVT_RESIZE 2 /* resize the font */ -#define GR_FONTCVT_ITALICIZE 4 /* tilt font for "italic" look */ -#define GR_FONTCVT_BOLDIFY 8 /* make a "bold"(er) font */ -#define GR_FONTCVT_FIXIFY 16 /* convert prop. font to fixed wdt */ -#define GR_FONTCVT_PROPORTION 32 /* convert fixed font to prop. wdt */ - -/* - * font structures - */ -typedef struct _GR_fontHeader { /* font descriptor */ - char *name; /* font name */ - char *family; /* font family name */ - char proportional; /* characters have varying width */ - char scalable; /* derived from a scalable font */ - char preloaded; /* set when linked into program */ - char modified; /* "tweaked" font (resized, etc..) */ - unsigned int width; /* width (proportional=>average) */ - unsigned int height; /* font height */ - unsigned int baseline; /* baseline pixel pos (from top) */ - unsigned int ulpos; /* underline pixel pos (from top) */ - unsigned int ulheight; /* underline width */ - unsigned int minchar; /* lowest character code in font */ - unsigned int numchars; /* number of characters in font */ -} GrFontHeader; - -typedef struct _GR_fontChrInfo { /* character descriptor */ - unsigned int width; /* width of this character */ - unsigned int offset; /* offset from start of bitmap */ -} GrFontChrInfo; - -typedef struct _GR_font { /* the complete font */ - struct _GR_fontHeader h; /* the font info structure */ - char far *bitmap; /* character bitmap array */ - char far *auxmap; /* map for rotated & underline chrs */ - unsigned int minwidth; /* width of narrowest character */ - unsigned int maxwidth; /* width of widest character */ - unsigned int auxsize; /* allocated size of auxiliary map */ - unsigned int auxnext; /* next free byte in auxiliary map */ - unsigned int far *auxoffs[7]; /* offsets to completed aux chars */ - struct _GR_fontChrInfo chrinfo[1]; /* character info (not act. size) */ -} GrFont; - -extern GrFont GrFont_PC6x8; -extern GrFont GrFont_PC8x8; -extern GrFont GrFont_PC8x14; -extern GrFont GrFont_PC8x16; -#define GrDefaultFont GrFont_PC8x14 - -GrFont *GrLoadFont(char *name); -GrFont *GrLoadConvertedFont(char *name,int cvt,int w,int h,int minch,int maxch); -GrFont *GrBuildConvertedFont(const GrFont *from,int cvt,int w,int h,int minch,int maxch); - -void GrUnloadFont(GrFont *font); -void GrDumpFont(const GrFont *f,char *CsymbolName,char *fileName); -void GrDumpFnaFont(const GrFont *f, char *fileName); -void GrSetFontPath(char *path_list); - -int GrFontCharPresent(const GrFont *font,int chr); -int GrFontCharWidth(const GrFont *font,int chr); -int GrFontCharHeight(const GrFont *font,int chr); -int GrFontCharBmpRowSize(const GrFont *font,int chr); -int GrFontCharBitmapSize(const GrFont *font,int chr); -int GrFontStringWidth(const GrFont *font,void *text,int len,int type); -int GrFontStringHeight(const GrFont *font,void *text,int len,int type); -int GrProportionalTextWidth(const GrFont *font,const void *text,int len,int type); - -char far *GrBuildAuxiliaryBitmap(GrFont *font,int chr,int dir,int ul); -char far *GrFontCharBitmap(const GrFont *font,int chr); -char far *GrFontCharAuxBmp(GrFont *font,int chr,int dir,int ul); - -typedef union _GR_textColor { /* text color union */ - GrColor v; /* color value for "direct" text */ - GrColorTableP p; /* color table for attribute text */ -} GrTextColor; - -typedef struct _GR_textOption { /* text drawing option structure */ - struct _GR_font *txo_font; /* font to be used */ - union _GR_textColor txo_fgcolor; /* foreground color */ - union _GR_textColor txo_bgcolor; /* background color */ - char txo_chrtype; /* character type (see above) */ - char txo_direct; /* direction (see above) */ - char txo_xalign; /* X alignment (see above) */ - char txo_yalign; /* Y alignment (see above) */ -} GrTextOption; - -typedef struct { /* fixed font text window desc. */ - struct _GR_font *txr_font; /* font to be used */ - union _GR_textColor txr_fgcolor; /* foreground color */ - union _GR_textColor txr_bgcolor; /* background color */ - void *txr_buffer; /* pointer to text buffer */ - void *txr_backup; /* optional backup buffer */ - int txr_width; /* width of area in chars */ - int txr_height; /* height of area in chars */ - int txr_lineoffset; /* offset in buffer(s) between rows */ - int txr_xpos; /* upper left corner X coordinate */ - int txr_ypos; /* upper left corner Y coordinate */ - char txr_chrtype; /* character type (see above) */ -} GrTextRegion; - -int GrCharWidth(int chr,const GrTextOption *opt); -int GrCharHeight(int chr,const GrTextOption *opt); -void GrCharSize(int chr,const GrTextOption *opt,int *w,int *h); -int GrStringWidth(void *text,int length,const GrTextOption *opt); -int GrStringHeight(void *text,int length,const GrTextOption *opt); -void GrStringSize(void *text,int length,const GrTextOption *opt,int *w,int *h); - -void GrDrawChar(int chr,int x,int y,const GrTextOption *opt); -void GrDrawString(void *text,int length,int x,int y,const GrTextOption *opt); -void GrTextXY(int x,int y,char *text,GrColor fg,GrColor bg); - -void GrDumpChar(int chr,int col,int row,const GrTextRegion *r); -void GrDumpText(int col,int row,int wdt,int hgt,const GrTextRegion *r); -void GrDumpTextRegion(const GrTextRegion *r); - -#ifndef GRX_SKIP_INLINES -#define GrFontCharPresent(f,ch) ( \ - ((unsigned int)(ch) - (f)->h.minchar) < (f)->h.numchars \ -) -#define GrFontCharWidth(f,ch) ( \ - GrFontCharPresent(f,ch) ? \ - (int)(f)->chrinfo[(unsigned int)(ch) - (f)->h.minchar].width : \ - (f)->h.width \ -) -#define GrFontCharHeight(f,ch) ( \ - (f)->h.height \ -) -#define GrFontCharBmpRowSize(f,ch) ( \ - GrFontCharPresent(f,ch) ? \ - (((f)->chrinfo[(unsigned int)(ch) - (f)->h.minchar].width + 7) >> 3) : \ - 0 \ -) -#define GrFontCharBitmapSize(f,ch) ( \ - GrFontCharBmpRowSize(f,ch) * (f)->h.height \ -) -#define GrFontStringWidth(f,t,l,tp) ( \ - (f)->h.proportional ? \ - GrProportionalTextWidth((f),(t),(l),(tp)) : \ - (f)->h.width * (l) \ -) -#define GrFontStringHeight(f,t,l,tp) ( \ - (f)->h.height \ -) -#define GrFontCharBitmap(f,ch) ( \ - GrFontCharPresent(f,ch) ? \ - &(f)->bitmap[(f)->chrinfo[(unsigned int)(ch) - (f)->h.minchar].offset]:\ - (char far *)0 \ -) -#define GrFontCharAuxBmp(f,ch,dir,ul) ( \ - (((dir) == GR_TEXT_DEFAULT) && !(ul)) ? \ - GrFontCharBitmap(f,ch) : \ - GrBuildAuxiliaryBitmap((f),(ch),(dir),(ul)) \ -) -#define GrCharWidth(c,o) ( \ - GR_TEXT_IS_VERTICAL((o)->txo_direct) ? \ - GrFontCharHeight((o)->txo_font,GR_TEXTCHR_CODE(c,(o)->txo_chrtype)) : \ - GrFontCharWidth( (o)->txo_font,GR_TEXTCHR_CODE(c,(o)->txo_chrtype)) \ -) -#define GrCharHeight(c,o) ( \ - GR_TEXT_IS_VERTICAL((o)->txo_direct) ? \ - GrFontCharWidth( (o)->txo_font,GR_TEXTCHR_CODE(c,(o)->txo_chrtype)) : \ - GrFontCharHeight((o)->txo_font,GR_TEXTCHR_CODE(c,(o)->txo_chrtype)) \ -) -#define GrCharSize(c,o,wp,hp) do { \ - *(wp) = GrCharHeight(c,o); \ - *(hp) = GrCharWidth( c,o); \ -} while(0) -#define GrStringWidth(t,l,o) ( \ - GR_TEXT_IS_VERTICAL((o)->txo_direct) ? \ - GrFontStringHeight((o)->txo_font,(t),(l),(o)->txo_chrtype) : \ - GrFontStringWidth( (o)->txo_font,(t),(l),(o)->txo_chrtype) \ -) -#define GrStringHeight(t,l,o) ( \ - GR_TEXT_IS_VERTICAL((o)->txo_direct) ? \ - GrFontStringWidth( (o)->txo_font,(t),(l),(o)->txo_chrtype) : \ - GrFontStringHeight((o)->txo_font,(t),(l),(o)->txo_chrtype) \ -) -#define GrStringSize(t,l,o,wp,hp) do { \ - *(wp) = GrStringWidth( t,l,o); \ - *(hp) = GrStringHeight(t,l,o); \ -} while(0) -#endif /* GRX_SKIP_INLINES */ - -/* ================================================================== */ -/* THICK AND DASHED LINE DRAWING PRIMITIVES */ -/* ================================================================== */ - -/* - * custom line option structure - * zero or one dash pattern length means the line is continuous - * the dash pattern always begins with a drawn section - */ -typedef struct { - GrColor lno_color; /* color used to draw line */ - int lno_width; /* width of the line */ - int lno_pattlen; /* length of the dash pattern */ - unsigned char *lno_dashpat; /* draw/nodraw pattern */ -} GrLineOption; - -void GrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrCustomCircle(int xc,int yc,int r,const GrLineOption *o); -void GrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *o); -void GrCustomCircleArc(int xc,int yc,int r,int start,int end,int style,const GrLineOption *o); -void GrCustomEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,const GrLineOption *o); -void GrCustomPolyLine(int numpts,int points[][2],const GrLineOption *o); -void GrCustomPolygon(int numpts,int points[][2],const GrLineOption *o); - -/* ================================================================== */ -/* PATTERNED DRAWING AND FILLING PRIMITIVES */ -/* ================================================================== */ - -/* - * BITMAP: a mode independent way to specify a fill pattern of two - * colors. It is always 8 pixels wide (1 byte per scan line), its - * height is user-defined. SET THE TYPE FLAG TO ZERO!!! - */ -typedef struct _GR_bitmap { - int bmp_ispixmap; /* type flag for pattern union */ - int bmp_height; /* bitmap height */ - char *bmp_data; /* pointer to the bit pattern */ - GrColor bmp_fgcolor; /* foreground color for fill */ - GrColor bmp_bgcolor; /* background color for fill */ - int bmp_memflags; /* set if dynamically allocated */ -} GrBitmap; - -/* - * PIXMAP: a fill pattern stored in a layout identical to the video RAM - * for filling using 'bitblt'-s. It is mode dependent, typically one - * of the library functions is used to build it. KEEP THE TYPE FLAG - * NONZERO!!! - */ -typedef struct _GR_pixmap { - int pxp_ispixmap; /* type flag for pattern union */ - int pxp_width; /* pixmap width (in pixels) */ - int pxp_height; /* pixmap height (in pixels) */ - GrColor pxp_oper; /* bitblt mode (SET, OR, XOR, AND, IMAGE) */ - struct _GR_frame pxp_source; /* source context for fill */ -} GrPixmap; - -/* - * Fill pattern union -- can either be a bitmap or a pixmap - */ -typedef union _GR_pattern { - int gp_ispixmap; /* nonzero for pixmaps */ - GrBitmap gp_bitmap; /* fill bitmap */ - GrPixmap gp_pixmap; /* fill pixmap */ -} GrPattern; - -#define gp_bmp_data gp_bitmap.bmp_data -#define gp_bmp_height gp_bitmap.bmp_height -#define gp_bmp_fgcolor gp_bitmap.bmp_fgcolor -#define gp_bmp_bgcolor gp_bitmap.bmp_bgcolor - -#define gp_pxp_width gp_pixmap.pxp_width -#define gp_pxp_height gp_pixmap.pxp_height -#define gp_pxp_oper gp_pixmap.pxp_oper -#define gp_pxp_source gp_pixmap.pxp_source - -/* - * Draw pattern for line drawings -- specifies both the: - * (1) fill pattern, and the - * (2) custom line drawing option - */ -typedef struct { - GrPattern *lnp_pattern; /* fill pattern */ - GrLineOption *lnp_option; /* width + dash pattern */ -} GrLinePattern; - -GrPattern *GrBuildPixmap(const char *pixels,int w,int h,const GrColorTableP colors); -GrPattern *GrBuildPixmapFromBits(const char *bits,int w,int h,GrColor fgc,GrColor bgc); -GrPattern *GrConvertToPixmap(GrContext *src); - -void GrDestroyPattern(GrPattern *p); - -void GrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp); -void GrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp); -void GrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp); -void GrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp); -void GrPatternedCircleArc(int xc,int yc,int r,int start,int end,int style,GrLinePattern *lp); -void GrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrLinePattern *lp); -void GrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp); -void GrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp); - -void GrPatternFilledPlot(int x,int y,GrPattern *p); -void GrPatternFilledLine(int x1,int y1,int x2,int y2,GrPattern *p); -void GrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p); -void GrPatternFilledCircle(int xc,int yc,int r,GrPattern *p); -void GrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p); -void GrPatternFilledCircleArc(int xc,int yc,int r,int start,int end,int style,GrPattern *p); -void GrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrPattern *p); -void GrPatternFilledConvexPolygon(int numpts,int points[][2],GrPattern *p); -void GrPatternFilledPolygon(int numpts,int points[][2],GrPattern *p); -void GrPatternFloodFill(int x, int y, GrColor border, GrPattern *p); - -void GrPatternDrawChar(int chr,int x,int y,const GrTextOption *opt,GrPattern *p); -void GrPatternDrawString(void *text,int length,int x,int y,const GrTextOption *opt,GrPattern *p); -void GrPatternDrawStringExt(void *text,int length,int x,int y,const GrTextOption *opt,GrPattern *p); - -/* ================================================================== */ -/* IMAGE MANIPULATION */ -/* ================================================================== */ - -/* - * by Michal Stencl Copyright (c) 1998 for GRX - * - [stenclpmd@ba.telecom.sk] - */ - -#ifndef GrImage -#define GrImage GrPixmap -#endif - -/* Flags for GrImageInverse() */ - -#define GR_IMAGE_INVERSE_LR 0x01 /* inverse left right */ -#define GR_IMAGE_INVERSE_TD 0x02 /* inverse top down */ - -GrImage *GrImageBuild(const char *pixels,int w,int h,const GrColorTableP colors); -void GrImageDestroy(GrImage *i); -void GrImageDisplay(int x,int y, GrImage *i); -void GrImageDisplayExt(int x1,int y1,int x2,int y2, GrImage *i); -void GrImageFilledBoxAlign(int xo,int yo,int x1,int y1,int x2,int y2,GrImage *p); -void GrImageHLineAlign(int xo,int yo,int x,int y,int width,GrImage *p); -void GrImagePlotAlign(int xo,int yo,int x,int y,GrImage *p); - -GrImage *GrImageInverse(GrImage *p,int flag); -GrImage *GrImageStretch(GrImage *p,int nwidth,int nheight); - -GrImage *GrImageFromPattern(GrPattern *p); -GrImage *GrImageFromContext(GrContext *c); -GrImage *GrImageBuildUsedAsPattern(const char *pixels,int w,int h,const GrColorTableP colors); - -GrPattern *GrPatternFromImage(GrImage *p); - - -#ifndef GRX_SKIP_INLINES -#define GrImageFromPattern(p) \ - (((p) && (p)->gp_ispixmap) ? (&(p)->gp_pixmap) : NULL) -#define GrImageFromContext(c) \ - (GrImage *)GrConvertToPixmap(c) -#define GrPatternFromImage(p) \ - (GrPattern *)(p) -#define GrImageBuildUsedAsPattern(pixels,w,h,colors) \ - (GrImage *)GrBuildPixmap(pixels,w,h,colors); -#define GrImageDestroy(i) \ - GrDestroyPattern((GrPattern *)(i)); -#endif - -/* ================================================================== */ -/* DRAWING IN USER WINDOW COORDINATES */ -/* ================================================================== */ - -void GrSetUserWindow(int x1,int y1,int x2,int y2); -void GrGetUserWindow(int *x1,int *y1,int *x2,int *y2); -void GrGetScreenCoord(int *x,int *y); -void GrGetUserCoord(int *x,int *y); - -void GrUsrPlot(int x,int y,GrColor c); -void GrUsrLine(int x1,int y1,int x2,int y2,GrColor c); -void GrUsrHLine(int x1,int x2,int y,GrColor c); -void GrUsrVLine(int x,int y1,int y2,GrColor c); -void GrUsrBox(int x1,int y1,int x2,int y2,GrColor c); -void GrUsrFilledBox(int x1,int y1,int x2,int y2,GrColor c); -void GrUsrFramedBox(int x1,int y1,int x2,int y2,int wdt,GrFBoxColors *c); -void GrUsrCircle(int xc,int yc,int r,GrColor c); -void GrUsrEllipse(int xc,int yc,int xa,int ya,GrColor c); -void GrUsrCircleArc(int xc,int yc,int r,int start,int end,int style,GrColor c); -void GrUsrEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrColor c); -void GrUsrFilledCircle(int xc,int yc,int r,GrColor c); -void GrUsrFilledEllipse(int xc,int yc,int xa,int ya,GrColor c); -void GrUsrFilledCircleArc(int xc,int yc,int r,int start,int end,int style,GrColor c); -void GrUsrFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrColor c); -void GrUsrPolyLine(int numpts,int points[][2],GrColor c); -void GrUsrPolygon(int numpts,int points[][2],GrColor c); -void GrUsrFilledConvexPolygon(int numpts,int points[][2],GrColor c); -void GrUsrFilledPolygon(int numpts,int points[][2],GrColor c); -void GrUsrFloodFill(int x, int y, GrColor border, GrColor c); - -GrColor GrUsrPixel(int x,int y); -GrColor GrUsrPixelC(GrContext *c,int x,int y); - -void GrUsrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrUsrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *o); -void GrUsrCustomCircle(int xc,int yc,int r,const GrLineOption *o); -void GrUsrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *o); -void GrUsrCustomCircleArc(int xc,int yc,int r,int start,int end,int style,const GrLineOption *o); -void GrUsrCustomEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,const GrLineOption *o); -void GrUsrCustomPolyLine(int numpts,int points[][2],const GrLineOption *o); -void GrUsrCustomPolygon(int numpts,int points[][2],const GrLineOption *o); - -void GrUsrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp); -void GrUsrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp); -void GrUsrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp); -void GrUsrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp); -void GrUsrPatternedCircleArc(int xc,int yc,int r,int start,int end,int style,GrLinePattern *lp); -void GrUsrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrLinePattern *lp); -void GrUsrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp); -void GrUsrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp); - -void GrUsrPatternFilledPlot(int x,int y,GrPattern *p); -void GrUsrPatternFilledLine(int x1,int y1,int x2,int y2,GrPattern *p); -void GrUsrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p); -void GrUsrPatternFilledCircle(int xc,int yc,int r,GrPattern *p); -void GrUsrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p); -void GrUsrPatternFilledCircleArc(int xc,int yc,int r,int start,int end,int style,GrPattern *p); -void GrUsrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrPattern *p); -void GrUsrPatternFilledConvexPolygon(int numpts,int points[][2],GrPattern *p); -void GrUsrPatternFilledPolygon(int numpts,int points[][2],GrPattern *p); -void GrUsrPatternFloodFill(int x, int y, GrColor border, GrPattern *p); - -void GrUsrDrawChar(int chr,int x,int y,const GrTextOption *opt); -void GrUsrDrawString(char *text,int length,int x,int y,const GrTextOption *opt); -void GrUsrTextXY(int x,int y,char *text,GrColor fg,GrColor bg); - -/* ================================================================== */ -/* GRAPHICS CURSOR UTILITIES */ -/* ================================================================== */ - -typedef struct _GR_cursor { - struct _GR_context work; /* work areas (4) */ - int xcord,ycord; /* cursor position on screen */ - int xsize,ysize; /* cursor size */ - int xoffs,yoffs; /* LU corner to hot point offset */ - int xwork,ywork; /* save/work area sizes */ - int xwpos,ywpos; /* save/work area position on screen */ - int displayed; /* set if displayed */ -} GrCursor; - -GrCursor *GrBuildCursor(char far *pixels,int pitch,int w,int h,int xo,int yo,const GrColorTableP c); -void GrDestroyCursor(GrCursor *cursor); -void GrDisplayCursor(GrCursor *cursor); -void GrEraseCursor(GrCursor *cursor); -void GrMoveCursor(GrCursor *cursor,int x,int y); - -/* ================================================================== */ -/* MOUSE AND KEYBOARD INPUT UTILITIES */ -/* ================================================================== */ - -#define GR_M_MOTION 0x001 /* mouse event flag bits */ -#define GR_M_LEFT_DOWN 0x002 -#define GR_M_LEFT_UP 0x004 -#define GR_M_RIGHT_DOWN 0x008 -#define GR_M_RIGHT_UP 0x010 -#define GR_M_MIDDLE_DOWN 0x020 -#define GR_M_MIDDLE_UP 0x040 -#define GR_M_P4_DOWN 0x400 -#define GR_M_P4_UP 0x800 -#define GR_M_P5_DOWN 0x2000 -#define GR_M_P5_UP 0x4000 -#define GR_M_BUTTON_DOWN (GR_M_LEFT_DOWN | GR_M_MIDDLE_DOWN | GR_M_RIGHT_DOWN | GR_M_P4_DOWN | GR_M_P5_DOWN) -#define GR_M_BUTTON_UP (GR_M_LEFT_UP | GR_M_MIDDLE_UP | GR_M_RIGHT_UP | GR_M_P4_UP | GR_M_P5_UP) -#define GR_M_BUTTON_CHANGE (GR_M_BUTTON_UP | GR_M_BUTTON_DOWN ) - -#define GR_M_LEFT 0x01 /* mouse button index bits */ -#define GR_M_RIGHT 0x02 -#define GR_M_MIDDLE 0x04 -#define GR_M_P4 0x08 -#define GR_M_P5 0x10 - -#define GR_M_KEYPRESS 0x080 /* other event flag bits */ -#define GR_M_POLL 0x100 -#define GR_M_NOPAINT 0x200 -#define GR_COMMAND 0x1000 -#define GR_M_EVENT (GR_M_MOTION | GR_M_KEYPRESS | GR_M_BUTTON_CHANGE | GR_COMMAND) - -#define GR_KB_RIGHTSHIFT 0x01 /* Keybd states: right shift key depressed */ -#define GR_KB_LEFTSHIFT 0x02 /* left shift key depressed */ -#define GR_KB_CTRL 0x04 /* CTRL depressed */ -#define GR_KB_ALT 0x08 /* ALT depressed */ -#define GR_KB_SCROLLOCK 0x10 /* SCROLL LOCK active */ -#define GR_KB_NUMLOCK 0x20 /* NUM LOCK active */ -#define GR_KB_CAPSLOCK 0x40 /* CAPS LOCK active */ -#define GR_KB_INSERT 0x80 /* INSERT state active */ -#define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT) - -#define GR_M_CUR_NORMAL 0 /* MOUSE CURSOR modes: just the cursor */ -#define GR_M_CUR_RUBBER 1 /* rectangular rubber band (XOR-d to the screen) */ -#define GR_M_CUR_LINE 2 /* line attached to the cursor */ -#define GR_M_CUR_BOX 3 /* rectangular box dragged by the cursor */ - -#define GR_M_QUEUE_SIZE 128 /* default queue size */ - -typedef struct _GR_mouseEvent { /* mouse event buffer structure */ - int flags; /* event type flags (see above) */ - int x,y; /* mouse coordinates */ - int buttons; /* mouse button state */ - int key; /* key code from keyboard */ - int kbstat; /* keybd status (ALT, CTRL, etc..) */ - long dtime; /* time since last event (msec) */ -} GrMouseEvent; - -/* - * mouse status information - */ -extern const struct _GR_mouseInfo { - int (*block)(GrContext*,int,int,int,int); /* mouse block function */ - void (*unblock)(int flags); /* mouse unblock function */ - void (*uninit)(void); /* mouse cleanupt function */ - struct _GR_cursor *cursor; /* the mouse cursor */ - struct _GR_mouseEvent *queue; /* queue of pending input events */ - int msstatus; /* -1:missing, 0:unknown, 1:present, 2:initted */ - int displayed; /* cursor is (generally) drawn */ - int blockflag; /* cursor temp. erase/block flag */ - int docheck; /* need to check before gr. op. to screen */ - int cursmode; /* mouse cursor draw mode */ - int x1,y1,x2,y2; /* auxiliary params for some cursor draw modes */ - GrColor curscolor; /* color for some cursor draw modes */ - int owncursor; /* auto generated cursor */ - int xpos,ypos; /* current mouse position */ - int xmin,xmax; /* mouse movement X coordinate limits */ - int ymin,ymax; /* mouse movement Y coordinate limits */ - int spmult,spdiv; /* mouse cursor speed factors */ - int thresh,accel; /* mouse acceleration parameters */ - int moved; /* mouse cursor movement flag */ - int qsize; /* max size of the queue */ - int qlength; /* current # of items in the queue */ - int qread; /* read pointer for the queue */ - int qwrite; /* write pointer for the queue */ -} * const GrMouseInfo; - -int GrMouseDetect(void); -void GrMouseEventMode(int dummy); -void GrMouseInit(void); -void GrMouseInitN(int queue_size); -void GrMouseUnInit(void); -void GrMouseSetSpeed(int spmult,int spdiv); -void GrMouseSetAccel(int thresh,int accel); -void GrMouseSetLimits(int x1,int y1,int x2,int y2); -void GrMouseGetLimits(int *x1,int *y1,int *x2,int *y2); -void GrMouseWarp(int x,int y); -void GrMouseEventEnable(int enable_kb,int enable_ms); -void GrMouseGetEvent(int flags,GrMouseEvent *event); - -void GrMouseGetEventT(int flags,GrMouseEvent *event,long timout_msecs); -/* Note: -** event->dtime is only valid if any event occured (event->flags !=0) -** otherwise it's set as -1. -** Additionally event timing is now real world time. (X11 && Linux -** used clock(), user process time, up to 2.28f) -*/ - -int GrMousePendingEvent(void); - -GrCursor *GrMouseGetCursor(void); -void GrMouseSetCursor(GrCursor *cursor); -void GrMouseSetColors(GrColor fg,GrColor bg); -void GrMouseSetCursorMode(int mode,...); -void GrMouseDisplayCursor(void); -void GrMouseEraseCursor(void); -void GrMouseUpdateCursor(void); -int GrMouseCursorIsDisplayed(void); - -int GrMouseBlock(GrContext *c,int x1,int y1,int x2,int y2); -void GrMouseUnBlock(int return_value_from_GrMouseBlock); - -#if 0 -/* !! old style (before grx v2.26) keyboard interface !! - !! old functions still linkable but for compatibility !! - !! across platforms and with future versions of GRX !! - !! one use functions from grkeys.h !! */ -#ifndef __MSDOS__ -int kbhit(void); -int getch(void); -#endif -#ifndef __DJGPP__ -int getkey(void); -int getxkey(void); -#endif -int getkbstat(void); -#endif -/* Why this ??? -#ifdef __WATCOMC__ -int getxkey(void); -#endif -*/ - -#ifndef GRX_SKIP_INLINES -#define GrMouseEventMode(x) /* nothing! */ -#define GrMouseGetCursor() (GrMouseInfo->cursor) -#define GrMouseCursorIsDisplayed() (GrMouseInfo->displayed) -#define GrMouseInit() GrMouseInitN(GR_M_QUEUE_SIZE); -#define GrMouseGetEvent(f,ev) GrMouseGetEventT((f),(ev),(-1L)); -#define GrMousePendingEvent() ( \ - GrMouseUpdateCursor(), \ - (GrMouseInfo->qlength > 0) \ -) -#define GrMouseUnInit() do { \ - if(GrMouseInfo->uninit) { \ - (*GrMouseInfo->uninit)(); \ - } \ -} while(0) -#define GrMouseGetLimits(x1p,y1p,x2p,y2p) do { \ - *(x1p) = GrMouseInfo->xmin; *(y1p) = GrMouseInfo->ymin; \ - *(x2p) = GrMouseInfo->xmax; *(y2p) = GrMouseInfo->ymax; \ -} while(0) -#define GrMouseBlock(c,x1,y1,x2,y2) ( \ - (((c) ? (const GrContext*)(c) : GrCurrentContext())->gc_onscreen && \ - (GrMouseInfo->docheck)) ? \ - (*GrMouseInfo->block)((c),(x1),(y1),(x2),(y2)) : \ - 0 \ -) -#define GrMouseUnBlock(f) do { \ - if((f) && GrMouseInfo->displayed) { \ - (*GrMouseInfo->unblock)((f)); \ - } \ -} while(0) -#endif /* GRX_SKIP_INLINES */ - -/* ================================================================== */ -/* PNM FUNCTIONS */ -/* ================================================================== */ - -/* - * The PNM formats, grx support load/save of - * binaries formats (4,5,6) only - */ - -#define PLAINPBMFORMAT 1 -#define PLAINPGMFORMAT 2 -#define PLAINPPMFORMAT 3 -#define PBMFORMAT 4 -#define PGMFORMAT 5 -#define PPMFORMAT 6 - -/* The PNM functions */ - -int GrSaveContextToPbm( GrContext *grc, char *pbmfn, char *docn ); -int GrSaveContextToPgm( GrContext *grc, char *pgmfn, char *docn ); -int GrSaveContextToPpm( GrContext *grc, char *ppmfn, char *docn ); -int GrLoadContextFromPnm( GrContext *grc, char *pnmfn ); -int GrQueryPnm( char *pnmfn, int *width, int *height, int *maxval ); -int GrLoadContextFromPnmBuffer( GrContext *grc, const char *buffer ); -int GrQueryPnmBuffer( const char *buffer, int *width, int *height, int *maxval ); - -/* ================================================================== */ -/* PNG FUNCTIONS */ -/* these functions may not be installed or available on all system */ -/* ================================================================== */ - -int GrPngSupport( void ); -int GrSaveContextToPng( GrContext *grc, char *pngfn ); -int GrLoadContextFromPng( GrContext *grc, char *pngfn, int use_alpha ); -int GrQueryPng( char *pngfn, int *width, int *height ); - -/* ================================================================== */ -/* JPEG FUNCTIONS */ -/* these functions may not be installed or available on all system */ -/* ================================================================== */ - -int GrJpegSupport( void ); -int GrLoadContextFromJpeg( GrContext *grc, char *jpegfn, int scale ); -int GrQueryJpeg( char *jpegfn, int *width, int *height ); -int GrSaveContextToJpeg( GrContext *grc, char *jpegfn, int quality ); -int GrSaveContextToGrayJpeg( GrContext *grc, char *jpegfn, int quality ); - -/* ================================================================== */ -/* MISCELLANEOUS UTILITIY FUNCTIONS */ -/* ================================================================== */ - -void GrResizeGrayMap(unsigned char far *map,int pitch,int ow,int oh,int nw,int nh); -int GrMatchString(const char *pattern,const char *strg); -void GrSetWindowTitle(char *title); -void GrSleep(int msec); -void GrFlush(void); -long GrMsecTime(void); - -/* ================================================================== */ -/* TIFF ADDON FUNCTIONS */ -/* these functions may not be installed or available on all system */ -/* ================================================================== */ - -/* -** SaveContextToTiff - Dump a context in a TIFF file -** -** Arguments: -** cxt: Context to be saved (NULL -> use current context) -** tiffn: Name of tiff file -** compr: Compression method (see tiff.h), 0: automatic selection -** docn: string saved in the tiff file (DOCUMENTNAME tag) -** -** Returns 0 on success -** -1 on error -** -** requires tifflib by Sam Leffler (sam@engr.sgi.com) -** available at ftp://ftp.sgi.com/graphics/tiff -*/ -int SaveContextToTiff(GrContext *cxt, char *tiffn, unsigned compr, char *docn); - -#ifdef __cplusplus -} -#endif -#endif /* whole file */ diff --git a/thirdparty/grx249/include/grxkeys.h b/thirdparty/grx249/include/grxkeys.h deleted file mode 100644 index c0213f3..0000000 --- a/thirdparty/grx249/include/grxkeys.h +++ /dev/null @@ -1,363 +0,0 @@ -/** - ** grxkeys.h ---- platform independent key definitions - ** - ** Copyright (c) 1997 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __GRKEYS_H_INCLUDED__ -#define __GRKEYS_H_INCLUDED__ - -/* -** NOTES - some keys may not be available under all systems -** - key values will be differ on different systems -*/ - -#ifndef __GRX20_H_INCLUDED__ -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* all keycodes should fit into 16 bit unsigned */ -typedef unsigned short GrKeyType; - -/* no key available */ -#define GrKey_NoKey 0x0000 - -/* key typed but code outside 1..GrKey_LastDefinedKeycode */ -#define GrKey_OutsideValidRange 0x0100 - -/* standard ASCII key codes */ -#define GrKey_Control_A 0x0001 -#define GrKey_Control_B 0x0002 -#define GrKey_Control_C 0x0003 -#define GrKey_Control_D 0x0004 -#define GrKey_Control_E 0x0005 -#define GrKey_Control_F 0x0006 -#define GrKey_Control_G 0x0007 -#define GrKey_Control_H 0x0008 -#define GrKey_Control_I 0x0009 -#define GrKey_Control_J 0x000a -#define GrKey_Control_K 0x000b -#define GrKey_Control_L 0x000c -#define GrKey_Control_M 0x000d -#define GrKey_Control_N 0x000e -#define GrKey_Control_O 0x000f -#define GrKey_Control_P 0x0010 -#define GrKey_Control_Q 0x0011 -#define GrKey_Control_R 0x0012 -#define GrKey_Control_S 0x0013 -#define GrKey_Control_T 0x0014 -#define GrKey_Control_U 0x0015 -#define GrKey_Control_V 0x0016 -#define GrKey_Control_W 0x0017 -#define GrKey_Control_X 0x0018 -#define GrKey_Control_Y 0x0019 -#define GrKey_Control_Z 0x001a -#define GrKey_Control_LBracket 0x001b -#define GrKey_Control_BackSlash 0x001c -#define GrKey_Control_RBracket 0x001d -#define GrKey_Control_Caret 0x001e -#define GrKey_Control_Underscore 0x001f -#define GrKey_Space 0x0020 -#define GrKey_ExclamationPoint 0x0021 -#define GrKey_DoubleQuote 0x0022 -#define GrKey_Hash 0x0023 -#define GrKey_Dollar 0x0024 -#define GrKey_Percent 0x0025 -#define GrKey_Ampersand 0x0026 -#define GrKey_Quote 0x0027 -#define GrKey_LParen 0x0028 -#define GrKey_RParen 0x0029 -#define GrKey_Star 0x002a -#define GrKey_Plus 0x002b -#define GrKey_Comma 0x002c -#define GrKey_Dash 0x002d -#define GrKey_Period 0x002e -#define GrKey_Slash 0x002f -#define GrKey_0 0x0030 -#define GrKey_1 0x0031 -#define GrKey_2 0x0032 -#define GrKey_3 0x0033 -#define GrKey_4 0x0034 -#define GrKey_5 0x0035 -#define GrKey_6 0x0036 -#define GrKey_7 0x0037 -#define GrKey_8 0x0038 -#define GrKey_9 0x0039 -#define GrKey_Colon 0x003a -#define GrKey_SemiColon 0x003b -#define GrKey_LAngle 0x003c -#define GrKey_Equals 0x003d -#define GrKey_RAngle 0x003e -#define GrKey_QuestionMark 0x003f -#define GrKey_At 0x0040 -#define GrKey_A 0x0041 -#define GrKey_B 0x0042 -#define GrKey_C 0x0043 -#define GrKey_D 0x0044 -#define GrKey_E 0x0045 -#define GrKey_F 0x0046 -#define GrKey_G 0x0047 -#define GrKey_H 0x0048 -#define GrKey_I 0x0049 -#define GrKey_J 0x004a -#define GrKey_K 0x004b -#define GrKey_L 0x004c -#define GrKey_M 0x004d -#define GrKey_N 0x004e -#define GrKey_O 0x004f -#define GrKey_P 0x0050 -#define GrKey_Q 0x0051 -#define GrKey_R 0x0052 -#define GrKey_S 0x0053 -#define GrKey_T 0x0054 -#define GrKey_U 0x0055 -#define GrKey_V 0x0056 -#define GrKey_W 0x0057 -#define GrKey_X 0x0058 -#define GrKey_Y 0x0059 -#define GrKey_Z 0x005a -#define GrKey_LBracket 0x005b -#define GrKey_BackSlash 0x005c -#define GrKey_RBracket 0x005d -#define GrKey_Caret 0x005e -#define GrKey_UnderScore 0x005f -#define GrKey_BackQuote 0x0060 -#define GrKey_a 0x0061 -#define GrKey_b 0x0062 -#define GrKey_c 0x0063 -#define GrKey_d 0x0064 -#define GrKey_e 0x0065 -#define GrKey_f 0x0066 -#define GrKey_g 0x0067 -#define GrKey_h 0x0068 -#define GrKey_i 0x0069 -#define GrKey_j 0x006a -#define GrKey_k 0x006b -#define GrKey_l 0x006c -#define GrKey_m 0x006d -#define GrKey_n 0x006e -#define GrKey_o 0x006f -#define GrKey_p 0x0070 -#define GrKey_q 0x0071 -#define GrKey_r 0x0072 -#define GrKey_s 0x0073 -#define GrKey_t 0x0074 -#define GrKey_u 0x0075 -#define GrKey_v 0x0076 -#define GrKey_w 0x0077 -#define GrKey_x 0x0078 -#define GrKey_y 0x0079 -#define GrKey_z 0x007a -#define GrKey_LBrace 0x007b -#define GrKey_Pipe 0x007c -#define GrKey_RBrace 0x007d -#define GrKey_Tilde 0x007e -#define GrKey_Control_Backspace 0x007f - -/* extended key codes as defined in DJGPP */ -#define GrKey_Alt_Escape 0x0101 -#define GrKey_Control_At 0x0103 -#define GrKey_Alt_Backspace 0x010e -#define GrKey_BackTab 0x010f -#define GrKey_Alt_Q 0x0110 -#define GrKey_Alt_W 0x0111 -#define GrKey_Alt_E 0x0112 -#define GrKey_Alt_R 0x0113 -#define GrKey_Alt_T 0x0114 -#define GrKey_Alt_Y 0x0115 -#define GrKey_Alt_U 0x0116 -#define GrKey_Alt_I 0x0117 -#define GrKey_Alt_O 0x0118 -#define GrKey_Alt_P 0x0119 -#define GrKey_Alt_LBracket 0x011a -#define GrKey_Alt_RBracket 0x011b -#define GrKey_Alt_Return 0x011c -#define GrKey_Alt_A 0x011e -#define GrKey_Alt_S 0x011f -#define GrKey_Alt_D 0x0120 -#define GrKey_Alt_F 0x0121 -#define GrKey_Alt_G 0x0122 -#define GrKey_Alt_H 0x0123 -#define GrKey_Alt_J 0x0124 -#define GrKey_Alt_K 0x0125 -#define GrKey_Alt_L 0x0126 -#define GrKey_Alt_Semicolon 0x0127 -#define GrKey_Alt_Quote 0x0128 -#define GrKey_Alt_Backquote 0x0129 -#define GrKey_Alt_Backslash 0x012b -#define GrKey_Alt_Z 0x012c -#define GrKey_Alt_X 0x012d -#define GrKey_Alt_C 0x012e -#define GrKey_Alt_V 0x012f -#define GrKey_Alt_B 0x0130 -#define GrKey_Alt_N 0x0131 -#define GrKey_Alt_M 0x0132 -#define GrKey_Alt_Comma 0x0133 -#define GrKey_Alt_Period 0x0134 -#define GrKey_Alt_Slash 0x0135 -#define GrKey_Alt_KPStar 0x0137 -#define GrKey_F1 0x013b -#define GrKey_F2 0x013c -#define GrKey_F3 0x013d -#define GrKey_F4 0x013e -#define GrKey_F5 0x013f -#define GrKey_F6 0x0140 -#define GrKey_F7 0x0141 -#define GrKey_F8 0x0142 -#define GrKey_F9 0x0143 -#define GrKey_F10 0x0144 -#define GrKey_Home 0x0147 -#define GrKey_Up 0x0148 -#define GrKey_PageUp 0x0149 -#define GrKey_Alt_KPMinus 0x014a -#define GrKey_Left 0x014b -#define GrKey_Center 0x014c -#define GrKey_Right 0x014d -#define GrKey_Alt_KPPlus 0x014e -#define GrKey_End 0x014f -#define GrKey_Down 0x0150 -#define GrKey_PageDown 0x0151 -#define GrKey_Insert 0x0152 -#define GrKey_Delete 0x0153 -#define GrKey_Shift_F1 0x0154 -#define GrKey_Shift_F2 0x0155 -#define GrKey_Shift_F3 0x0156 -#define GrKey_Shift_F4 0x0157 -#define GrKey_Shift_F5 0x0158 -#define GrKey_Shift_F6 0x0159 -#define GrKey_Shift_F7 0x015a -#define GrKey_Shift_F8 0x015b -#define GrKey_Shift_F9 0x015c -#define GrKey_Shift_F10 0x015d -#define GrKey_Control_F1 0x015e -#define GrKey_Control_F2 0x015f -#define GrKey_Control_F3 0x0160 -#define GrKey_Control_F4 0x0161 -#define GrKey_Control_F5 0x0162 -#define GrKey_Control_F6 0x0163 -#define GrKey_Control_F7 0x0164 -#define GrKey_Control_F8 0x0165 -#define GrKey_Control_F9 0x0166 -#define GrKey_Control_F10 0x0167 -#define GrKey_Alt_F1 0x0168 -#define GrKey_Alt_F2 0x0169 -#define GrKey_Alt_F3 0x016a -#define GrKey_Alt_F4 0x016b -#define GrKey_Alt_F5 0x016c -#define GrKey_Alt_F6 0x016d -#define GrKey_Alt_F7 0x016e -#define GrKey_Alt_F8 0x016f -#define GrKey_Alt_F9 0x0170 -#define GrKey_Alt_F10 0x0171 -#define GrKey_Control_Print 0x0172 -#define GrKey_Control_Left 0x0173 -#define GrKey_Control_Right 0x0174 -#define GrKey_Control_End 0x0175 -#define GrKey_Control_PageDown 0x0176 -#define GrKey_Control_Home 0x0177 -#define GrKey_Alt_1 0x0178 -#define GrKey_Alt_2 0x0179 -#define GrKey_Alt_3 0x017a -#define GrKey_Alt_4 0x017b -#define GrKey_Alt_5 0x017c -#define GrKey_Alt_6 0x017d -#define GrKey_Alt_7 0x017e -#define GrKey_Alt_8 0x017f -#define GrKey_Alt_9 0x0180 -#define GrKey_Alt_0 0x0181 -#define GrKey_Alt_Dash 0x0182 -#define GrKey_Alt_Equals 0x0183 -#define GrKey_Control_PageUp 0x0184 -#define GrKey_F11 0x0185 -#define GrKey_F12 0x0186 -#define GrKey_Shift_F11 0x0187 -#define GrKey_Shift_F12 0x0188 -#define GrKey_Control_F11 0x0189 -#define GrKey_Control_F12 0x018a -#define GrKey_Alt_F11 0x018b -#define GrKey_Alt_F12 0x018c -#define GrKey_Control_Up 0x018d -#define GrKey_Control_KPDash 0x018e -#define GrKey_Control_Center 0x018f -#define GrKey_Control_KPPlus 0x0190 -#define GrKey_Control_Down 0x0191 -#define GrKey_Control_Insert 0x0192 -#define GrKey_Control_Delete 0x0193 -#define GrKey_Control_Tab 0x0194 -#define GrKey_Control_KPSlash 0x0195 -#define GrKey_Control_KPStar 0x0196 -#define GrKey_Alt_KPSlash 0x01a4 -#define GrKey_Alt_Tab 0x01a5 -#define GrKey_Alt_Enter 0x01a6 - -/* some additional codes not in DJGPP */ -#define GrKey_Alt_LAngle 0x01b0 -#define GrKey_Alt_RAngle 0x01b1 -#define GrKey_Alt_At 0x01b2 -#define GrKey_Alt_LBrace 0x01b3 -#define GrKey_Alt_Pipe 0x01b4 -#define GrKey_Alt_RBrace 0x01b5 -#define GrKey_Print 0x01b6 -#define GrKey_Shift_Insert 0x01b7 -#define GrKey_Shift_Home 0x01b8 -#define GrKey_Shift_End 0x01b9 -#define GrKey_Shift_PageUp 0x01ba -#define GrKey_Shift_PageDown 0x01bb -#define GrKey_Alt_Up 0x01bc -#define GrKey_Alt_Left 0x01bd -#define GrKey_Alt_Center 0x01be -#define GrKey_Alt_Right 0x01c0 -#define GrKey_Alt_Down 0x01c1 -#define GrKey_Alt_Insert 0x01c2 -#define GrKey_Alt_Delete 0x01c3 -#define GrKey_Alt_Home 0x01c4 -#define GrKey_Alt_End 0x01c5 -#define GrKey_Alt_PageUp 0x01c6 -#define GrKey_Alt_PageDown 0x01c7 -#define GrKey_Shift_Up 0x01c8 -#define GrKey_Shift_Down 0x01c9 -#define GrKey_Shift_Right 0x01ca -#define GrKey_Shift_Left 0x01cb - -/* this may be usefull for table allocation ... */ -#define GrKey_LastDefinedKeycode GrKey_Shift_Left - -/* some well known synomyms */ -#define GrKey_BackSpace GrKey_Control_H -#define GrKey_Tab GrKey_Control_I -#define GrKey_LineFeed GrKey_Control_J -#define GrKey_Escape GrKey_Control_LBracket -#define GrKey_Return GrKey_Control_M - -/* -** new functions to replace the old style -** kbhit / getch / getkey / getxkey / getkbstat -** keyboard interface -*/ -extern int GrKeyPressed(void); -extern GrKeyType GrKeyRead(void); -extern int GrKeyStat(void); - -/* some compatibility interface here ?? */ -/* eg., #define kbhit() GrKeyPressed() ?? */ - -#ifdef __cplusplus -} -#endif - -#endif /* whole file */ diff --git a/thirdparty/grx249/include/libbcc.h b/thirdparty/grx249/include/libbcc.h deleted file mode 100644 index 235c65a..0000000 --- a/thirdparty/grx249/include/libbcc.h +++ /dev/null @@ -1,865 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __LIBBCC_H -#define __LIBBCC_H - -/* Version number, read as - 0x20a v2.0 alpha - 0x21b v2.1 beta - 0x230 v2.3 offical release */ -#define __BCC2GRX__ 0x22b - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef TRUE -# define TRUE (1==1) -#endif -#ifndef FALSE -# define FALSE (1==0) -#endif - -#ifndef near /* get rid of these stupid keywords */ -#define near -#endif -#ifndef far -#define far -#endif -#ifndef huge -#define huge -#endif - -#define grOk 0 -#define grNoInitGraph -1 -#define grNotDetected -2 -#define grFileNotFound -3 -#define grInvalidDriver -4 -#define grNoLoadMem -5 -#define grNoScanMem -6 -#define grNoFloodMem -7 -#define grFontNotFound -8 -#define grNoFontMem -9 -#define grInvalidMode -10 -#define grError -11 -#define grIOerror -12 -#define grInvalidFont -13 -#define grInvalidFontNum -14 -#define grInvalidVersion -18 - -#define DETECT (-2) -#define DETECT_PAS (0) -#define NATIVE_GRX (-3) -#define CURRENT_DRIVER (-1) -#define VGA ( 9) -#define EGA ( 3) -#define IBM8514 ( 6) -#define HERCMONO ( 7) -#define EGA64 ( 4) -#define EGAMONO ( 5) -#define CGA ( 1) -#define MCGA ( 2) -#define ATT400 ( 8) -#define PC3270 (10) -/* driver definitions from BC++ 4.5 : */ -#define DETECTX (DETECT) -#define VGA256 (11) -#define ATTDEB (12) -#define TOSHIBA (13) -#define SVGA16 (14) -#define SVGA256 (15) -#define SVGA32K (16) -#define SVGA64K (17) -#define VESA16 (18) -#define VESA256 (19) -#define VESA32K (20) -#define VESA64K (21) -#define VESA16M (22) -#define ATI16 (23) -#define ATI256 (24) -#define ATI32K (25) -#define COMPAQ (26) -#define TSENG316 (27) -#define TSENG3256 (28) -#define TSENG416 (29) -#define TSENG4256 (30) -#define TSENG432K (31) -#define GENOA5 (32) -#define GENOA6 (33) -#define OAK (34) -#define PARADIS16 (35) -#define PARADIS256 (36) -#define TECMAR (37) -#define TRIDENT16 (38) -#define TRIDENT256 (39) -#define VIDEO7 (40) -#define VIDEO7II (41) -#define S3 (42) -#define ATIGUP (43) - -#define VGALO 0 -#define VGAMED 1 -#define VGAHI 2 -#define IBM8514LO 0 -#define IBM8514HI 1 -#define HERCMONOHI 0 -#define CGAC0 0 -#define CGAC1 1 -#define CGAC2 2 -#define CGAC3 3 -#define CGAHI 4 -#define MCGAC0 CGAC0 -#define MCGAC1 CGAC1 -#define MCGAC2 CGAC2 -#define MCGAC3 CGAC3 -#define MCGAMED CGAHI -#define MCGAHI 5 -#define ATT400C0 MCGAC0 -#define ATT400C1 MCGAC1 -#define ATT400C2 MCGAC2 -#define ATT400C3 MCGAC3 -#define ATT400MED MCGAMED -#define ATT400HI MCGAHI -#define EGA64LO 0 -#define EGA64HI 1 -#define EGALO 0 -#define EGAHI 1 -#define EGAMONOHI 0 -#define EGAMONOHI_PAS 3 -#define PC3270HI 0 -/* mode definitions from BC++ 4.5 : */ -#define RES640x350 0 -#define RES640x480 1 -#define RES800x600 2 -#define RES1024x768 3 -#define RES1280x1024 4 - -/* NATIVE_GRX modes : */ -#define GRX_DEFAULT_GRAPHICS 0 -#define GRX_BIGGEST_NONINTERLACED_GRAPHICS 1 -#define GRX_BIGGEST_GRAPHICS 2 -#define GRX_BGI_EMULATION 3 -#define __FIRST_DRIVER_SPECIFIC_MODE 4 - - -#ifndef BLACK -# define BLACK 0 -#endif -#ifndef BLUE -# define BLUE 1 -#endif -#ifndef GREEN -# define GREEN 2 -#endif -#ifndef CYAN -# define CYAN 3 -#endif -#ifndef RED -# define RED 4 -#endif -#ifndef MAGENTA -# define MAGENTA 5 -#endif -#ifndef BROWN -# define BROWN 6 -#endif -#ifndef LIGHTGRAY -# define LIGHTGRAY 7 -#endif -#ifndef DARKGRAY -# define DARKGRAY 8 -#endif -#ifndef LIGHTBLUE -# define LIGHTBLUE 9 -#endif -#ifndef LIGHTGREEN -# define LIGHTGREEN 10 -#endif -#ifndef LIGHTCYAN -# define LIGHTCYAN 11 -#endif -#ifndef LIGHTRED -# define LIGHTRED 12 -#endif -#ifndef LIGHTMAGENTA -# define LIGHTMAGENTA 13 -#endif -#ifndef YELLOW -# define YELLOW 14 -#endif -#ifndef WHITE -# define WHITE (__gr_White()) -#endif - -#define EGA_BLACK 0 -#define EGA_BLUE 1 -#define EGA_GREEN 2 -#define EGA_RED 4 -#define EGA_LIGHTBLUE 57 -#define EGA_LIGHTGREEN 58 -#define EGA_LIGHTRED 60 -#define EGA_CYAN 3 -#define EGA_LIGHTCYAN 59 -#define EGA_MAGENTA 5 -#define EGA_LIGHTMAGENTA 61 -#define EGA_BROWN 20 -#define EGA_LIGHTGRAY 7 -#define EGA_DARKGRAY 56 -#define EGA_YELLOW 62 -#define EGA_WHITE 63 - -#define SOLID_LINE 0 -#define DOTTED_LINE 1 -#define CENTER_LINE 2 -#define DASHED_LINE 3 -#define USERBIT_LINE 4 - -#define NORM_WIDTH 1 -#define THICK_WIDTH 3 - -#define DEFAULT_FONT 0 /* 8x8 bit mapped font */ -#define TRIPLEX_FONT 1 -#define SMALL_FONT 2 -#define SANS_SERIF_FONT 3 -#define GOTHIC_FONT 4 -#define SCRIPT_FONT 5 -#define SIMPLEX_FONT 6 -#define TRIPLEX_SCR_FONT 7 -#define COMPLEX_FONT 8 -#define EUROPEAN_FONT 9 -#define BOLD_FONT 10 - -#define HORIZ_DIR 0 /* left to right */ -#define VERT_DIR 1 /* bottom to top */ - -#define USER_CHAR_SIZE 0 /* user-defined char size */ - -enum fill_patterns { /* Fill patterns for get/setfillstyle */ - EMPTY_FILL, /* fills area in background color */ - SOLID_FILL, /* fills area in solid fill color */ - LINE_FILL, /* --- fill */ - LTSLASH_FILL, /* /// fill */ - SLASH_FILL, /* /// fill with thick lines */ - BKSLASH_FILL, /* \\\ fill with thick lines */ - LTBKSLASH_FILL, /* \\\ fill */ - HATCH_FILL, /* light hatch fill */ - XHATCH_FILL, /* heavy cross hatch fill */ - INTERLEAVE_FILL, /* interleaving line fill */ - WIDE_DOT_FILL, /* Widely spaced dot fill */ - CLOSE_DOT_FILL, /* Closely spaced dot fill */ - USER_FILL /* user defined fill */ -}; - -#define COPY_PUT 0 -#define XOR_PUT 1 -#define OR_PUT 2 -#define AND_PUT 3 -#define NOT_PUT 4 - -#define LEFT_TEXT 0 -#define CENTER_TEXT 1 -#define RIGHT_TEXT 2 -#define BOTTOM_TEXT 0 -#define TOP_TEXT 2 - -#define MAXCOLORS 15 - -struct palettetype { - unsigned char size; - signed char colors[MAXCOLORS+1]; -}; - -struct linesettingstype { - int linestyle; - unsigned short upattern; /* Note : BCC defines unsigned ! */ - int thickness; -}; - -struct textsettingstype { - int font; - int direction; - int charsize; - int horiz; - int vert; -}; - -struct fillsettingstype { - int pattern; - int color; -}; - -/* This definition is compatible with the grx - definition 'int pts[][2]' used to define polygons */ -struct pointtype { - int x, y; -}; - -struct viewporttype { - int left, top, right, bottom; - int clip; -}; - -struct arccoordstype { - int x, y; - int xstart, ystart, xend, yend; -}; - -/* ------------------------------------------------------------------ */ -/* --- Internal definitions --- */ -/* --- Don't access one of these variable and functions directly! --- */ - -extern int __gr_Mode; -extern int __gr_INIT; -extern int __gr_MaxMode; -extern int __gr_Result; -extern int __gr_X, __gr_Y; /* graphics cursor pos */ -extern int __gr_vpl, __gr_vpt, /* actual viewport */ - __gr_vpr, __gr_vpb; -extern int __gr_color; /* drawing color */ -extern int __gr_colorbg; /* background color */ -extern int __gr_colorfill; /* fill color */ -#if defined(__TURBOC__) && defined(__MSDOS__) -extern unsigned long __gr_WR; /* Write mode, type */ -#else -extern unsigned int __gr_WR; /* must match GrColor */ -#endif -extern int __gr_Xasp; /* Aspect ratio */ -extern int __gr_Yasp; -extern int __gr_fpatno; -extern int __gr_lstyle; -extern int __gr_clip; /* actual clipping state */ -extern int __gr_ADAPTER; /* Adapter used */ -extern unsigned char __gr_fpatterns[][8]; -extern struct palettetype __gr_EGAdef; -extern int __gr_BGI_w; /* Width, height and color */ -extern int __gr_BGI_h; /* used in */ -extern int __gr_BGI_c; /* GRX_BGI_EMULATION mode */ -extern int __gr_TextLineStyle; /* use setlinestyle() while - plotting .chr fonts */ - -void __gr_set_up_modes(void); -int __gr_White(void); - -/* ------------------------------------------------------------------ */ -/* --- BGI - API definitions --- */ - -void detectgraph(int *graphdriver,int *graphmode); -void initgraph(int *graphdriver, int *graphmode, char *pathtodriver); -void closegraph(void); -void setgraphmode(int mode); -char *getmodename( int mode_number ); -void graphdefaults(void); -char *getdrivername( void ); -char *grapherrormsg(int errorcode); -int getmaxx(void); -int getmaxy(void); -int getmaxcolor(void); -void getviewsettings(struct viewporttype *viewport); -void setviewport(int left, int top, int right, int bottom, int clip); -void getlinesettings(struct linesettingstype *lineinfo); -void setlinestyle(int linestyle, unsigned upattern, int thickness); -void clearviewport(void); -unsigned getpixel(int x, int y); -void putpixel(int x, int y, int color); -void bar3d(int left,int top,int right,int bottom,int depth, int topflag); -void rectangle(int left, int top, int right, int bottom); -void fillpoly(int numpoints, void *polypoints); -void fillellipse( int x, int y, int xradius, int yradius ); -void getarccoords(struct arccoordstype *arccoords); -void floodfill(int x, int y, int border); -void setfillpattern( char *upattern, int color); -void setfillstyle(int pattern, int color); -void getimage(int left, int top, int right, int bottom, void *bitmap); -void putimage(int left, int top, void *bitmap, int op); -unsigned imagesize(int left, int top, int right, int bottom); -void gettextsettings(struct textsettingstype *texttypeinfo); -void settextjustify(int horiz, int vert); -void settextstyle(int font, int direction, int charsize); -void setrgbpalette(int color, int red, int green, int blue); -void setusercharsize(int multx, int divx, int multy, int divy); -void setwritemode( int mode ); -void outtext(const char *textstring); -void outtextxy(int x, int y, const char *textstring); -int textheight(const char *textstring); -int textwidth(const char *textstring); - -int registerbgifont(void *font); -int installuserfont(const char *name); - -int getpalettesize(void); -void getpalette(struct palettetype *palette); -void setallpalette( const struct palettetype *palette); - - - -/* ------------------------------------------------------------------ */ -/* --- BGI - API extensions --- */ - -extern int _bold_font, _euro_font, /* Linkable font files */ - _goth_font, _lcom_font, - _litt_font, _sans_font, - _scri_font, _simp_font, - _trip_font, _tscr_font; -void set_BGI_mode(int *graphdriver, int *graphmode); -/*void set_BGI_mode_whc() declared inline */ -void __getrgbpalette(int color, int *red, int *green, int *blue); - - -void __gr_set_libbcc_init_hooks ( - int (*init) (void) , - int (*close) (void) ); - - -int set_BGI_print_mode ( int mode , char * dest ); - -extern unsigned char _dac_g256[][3]; /* 256 shading dac values */ -extern unsigned char _dac_normal[][3]; /* 256 standard colors */ - -extern void setrgbdefaults(void); -extern void setrgbgray256(void); -int _ega_color(int egacol); - - -/* ------------------------------------------------------------------ */ -/* --- direct linkable API functions --- */ -/* --- ( mainly for GNU Pascal Graph unit usage ) --- */ - -void __gr_restorecrtmode(void); -void __gr_closegraph(void); -int __gr_getgraphmode(void); -int __gr_getmaxmode(void); -void __gr_getmoderange(int gd, int *lomode, int *himode); -int __gr_graphresult(void); -int __gr_getx(void); -int __gr_gety(void); -void __gr_moveto(int x, int y); -void __gr_moverel(int dx, int dy); -int __gr_getbkcolor(void); -int __gr_getcolor(void); -void __gr_cleardevice(void); -void __gr_setbkcolor(int color); -void __gr_setcolor(int color); -void __gr_line(int x1, int y1, int x2, int y2); -void __gr_linerel(int dx, int dy); -void __gr_lineto(int x, int y); -void __gr_drawpol(int numpoints, void *polypoints, int close); -void __gr_drawpoly(int numpoints, void *polypoints); -void __gr_bar(int left, int top, int right, int bottom); -void __gr_circle(int x, int y, int radius); -void __gr_ellipse(int x,int y,int stangle,int endangle,int xradius,int yradius); -void __gr_arc(int x, int y, int stangle, int endangle, int radius); -void __gr_getaspectratio(int *xasp, int *yasp); -void __gr_setaspectratio( int xasp, int yasp ); -void __gr_getfillsettings(struct fillsettingstype *fillinfo); -void __gr_getfillpattern(char *pattern); -void __gr_sector(int x,int y,int stangle,int endangle,int xradius,int yradius); -void __gr_pieslice(int x, int y, int stangle, int endangle, int radius); -unsigned __gr_setgraphbufsize(unsigned bufsize); -struct palettetype *__gr_getdefaultpalette(void); -int __gr_installbgidriver(char *name, void *detect); -int __gr_registerfarbgidriver(void *driver); -int __gr_registerfarbgifont(void *font); -void __gr_textlinestyle(int on); -void __gr_setpalette(int colornum, int color); -int __gr_getvisualpage(void); -void __gr_setvisualpage(int p); -int __gr_getactivepage(void); -void __gr_setactivepage(int p); -int __gr_setrgbcolor(int r, int g, int b); -int __gr_getmodemaxy(int mode); -int __gr_getmodemaxx(int mode); -int __gr_getmodemaxcolor(int mode); -void __gr_set_BGI_mode_whc(int *gd, int *gm, int width, int height, int colors); -int __gr_get_BGI_mode_pages(void); -void __gr_set_BGI_mode_pages(int p); - -#ifdef __cplusplus -} -#endif - -/* ----------------------------------------------------------------- */ -/* --- API functions with macro equivalents --- */ -/* --- (for inlining) --- */ -/* ----------------------------------------------------------------- */ -void restorecrtmode(void); -int getgraphmode(void); -int getmaxmode(void); -void getmoderange(int gd, int *lomode, int *himode); -int graphresult(void); -int getx(void); -int gety(void); -void moveto(int x, int y); -void moverel(int dx, int dy); -int getbkcolor(void); -int getcolor(void); -void cleardevice(void); -void setbkcolor(int color); -void setcolor(int color); -void line(int x1, int y1, int x2, int y2); -void linerel(int dx, int dy); -void lineto(int x, int y); -void drawpoly(int numpoints, void *polypoints); -void bar(int left, int top, int right, int bottom); -void circle(int x, int y, int radius); -void ellipse( int x, int y, int stangle, int endangle, - int xradius, int yradius ); -void arc(int x, int y, int stangle, int endangle, int radius); -void getaspectratio(int *xasp, int *yasp); -void setaspectratio( int xasp, int yasp ); -void getfillsettings(struct fillsettingstype *fillinfo); -void getfillpattern(char *pattern); -void sector( int x, int y, int stangle, int endangle, - int xradius, int yradius ); -void pieslice(int x, int y, int stangle, int endangle, int radius); -unsigned setgraphbufsize(unsigned bufsize); -struct palettetype *getdefaultpalette(void); -int installbgidriver(char *name, void *detect); -int registerfarbgidriver(void *driver); -int registerfarbgifont(void *font); -void textlinestyle(int on); -void setpalette(int colornum, int color); -void set_BGI_mode_pages(int p); -int get_BGI_mode_pages(void); -void set_BGI_mode_whc(int *gd, int *gm, int width, int height, int colors); -int getmodemaxcolor(int mode); -int getmodemaxx(int mode); -int getmodemaxy(int mode); -int setrgbcolor(int r, int g, int b); -void setactivepage(int p); -int getactivepage(void); -void setvisualpage(int p); -int getvisualpage(void); - -/* ----------------------------------------------------------------- */ -#define restorecrtmode() __gr_restorecrtmode() -#define getgraphmode() (__gr_INIT ? __gr_Mode : (__gr_Result=grNoInitGraph)) -#define getmaxmode() (__gr_set_up_modes(), __gr_MaxMode) -#define getmoderange(gd, lomode, himode) \ - __gr_getmoderange((gd),(lomode),(himode)) -#define graphresult() __gr_graphresult() -#define getx() (__gr_X+0) -#define gety() (__gr_Y+0) -#define moveto(x, y) do { __gr_X = (x); __gr_Y = (y); } while(0) -#define moverel(dx, dy) moveto(getx()+(dx),gety()+(dy)) -#define getbkcolor() (__gr_colorbg+0) -#define getcolor() (__gr_color+0) -#define cleardevice() __gr_cleardevice() -#define setbkcolor(color) do __gr_colorbg = (color); while(0) -#define setcolor(color) do __gr_color = (color); while(0) -#define line(x1, y1, x2, y2) __gr_line((x1),(y1),(x2),(y2)) -#define linerel(dx, dy) __gr_line(getx(),gety(),getx()+(dx),gety()+(dy)) -#define lineto(x, y) __gr_line(getx(),gety(),(x),(y)) -#define drawpoly(numpoints, polypoints) \ - __gr_drawpol((numpoints), (polypoints), FALSE) -#define bar(left, top, right, bottom) __gr_bar((left),(top),(right),(bottom)) -#define circle(x, y, radius) __gr_circle((x),(y),(radius)) -#define ellipse(x, y, stangle, endangle, xradius, yradius) \ - __gr_ellipse((x),(y),(stangle),(endangle),(xradius),(yradius)) -/* arc() uses radius twice */ -#define getaspectratio(xasp, yasp) \ - do { *(xasp) = __gr_Xasp; *(yasp) = __gr_Yasp; } while(0) -#define setaspectratio(xasp, yasp ) \ - do { __gr_Xasp = (xasp); __gr_Yasp = (yasp); } while(0) -/* getfillsettings() uses fillinfo twice */ -#define getfillpattern(pattern) __gr_getfillpattern(pattern) -#define sector(x, y, stangle, endangle, xradius, yradius) \ - __gr_sector((x),(y),(stangle),(endangle),(xradius), (yradius)); -/* pieslice() uses radius twice */ -#define setgraphbufsize(bufsize) __gr_setgraphbufsize(bufsize) -#define getdefaultpalette() (&__gr_EGAdef) -#define installbgidriver(name, detect) __gr_installbgidriver((name), (detect)) -#define registerfarbgidriver(driver) __gr_registerfarbgidriver(driver) -#define registerfarbgifont(font) registerbgifont(font) -#define textlinestyle(on) do __gr_TextLineStyle = on; while(0); -#define setpalette(colornum, color) __gr_setpalette((colornum),(color)) -#define set_BGI_mode_pages(p) __gr_set_BGI_mode_pages(p) -#define get_BGI_mode_pages() __gr_get_BGI_mode_pages() -#define set_BGI_mode_whc(gd, gm, width, height, colors) \ - do { \ - __gr_set_BGI_mode_pages(1); \ - __gr_BGI_w = (width); \ - __gr_BGI_h = (height); \ - __gr_BGI_c = (colors); \ - *(gd) = NATIVE_GRX; \ - *(gm) = GRX_BGI_EMULATION; \ - } while(0) -#define getmodemaxcolor(mode) __gr_getmodemaxcolor(mode) -#define getmodemaxx(mode) __gr_getmodemaxx(mode) -#define getmodemaxy(mode) __gr_getmodemaxx(mode) -#define setrgbcolor(r, g, b) __gr_setrgbcolor((r),(g),(b)) -#define setactivepage(p) __gr_setactivepage(p) -#define getactivepage() __gr_getactivepage() -#define setvisualpage(p) __gr_setvisualpage(p) -#define getvisualpage() __gr_getvisualpage() - -#ifdef __BCCGRX_C - -/* ----------------------------------------------------------------- */ -void (restorecrtmode)(void) { - __gr_restorecrtmode(); -} - -/* ----------------------------------------------------------------- */ -int (getgraphmode)(void) { - return (__gr_INIT ? __gr_Mode : (__gr_Result=grNoInitGraph)); -} - -/* ----------------------------------------------------------------- */ -int (getmaxmode)(void) { - __gr_set_up_modes(); - return __gr_MaxMode; -} - -/* ----------------------------------------------------------------- */ -void (getmoderange)(int gd, int *lomode, int *himode) { - __gr_getmoderange(gd, lomode, himode); -} - -/* ----------------------------------------------------------------- */ -int (graphresult)(void) { - return __gr_graphresult(); -} - -/* ----------------------------------------------------------------- */ -int (getx)(void) { - return __gr_X; -} - -/* ----------------------------------------------------------------- */ -int (gety)(void) { - return __gr_Y; -} - -/* ----------------------------------------------------------------- */ -void (moveto)(int x, int y) { - __gr_X = x; __gr_Y = y; -} - -/* ----------------------------------------------------------------- */ -void (moverel)(int dx, int dy) { - moveto( getx()+dx, gety()+dy); -} - -/* ----------------------------------------------------------------- */ -int (getbkcolor)(void) { - return __gr_colorbg; -} - -/* ----------------------------------------------------------------- */ -int (getcolor)(void) { - return __gr_color; -} - -/* ----------------------------------------------------------------- */ -void (cleardevice)(void) { - __gr_cleardevice(); -} - -/* ----------------------------------------------------------------- */ -void (setbkcolor)(int color) { - __gr_colorbg= color; -} - -/* ----------------------------------------------------------------- */ -void (setcolor)(int color) { - __gr_color= color; -} - -/* ----------------------------------------------------------------- */ -void (line)(int x1, int y1, int x2, int y2) { - __gr_line(x1,y1,x2,y2); -} - -/* ----------------------------------------------------------------- */ -void (linerel)(int dx, int dy) { - register int x = getx(); - register int y = gety(); - __gr_line(x,y,x+dx,y+dy); -} - -/* ----------------------------------------------------------------- */ -void (lineto)(int x, int y) { - __gr_line( getx(), gety(), x, y); -} - -/* ----------------------------------------------------------------- */ -void (drawpoly)(int numpoints, void *polypoints) { - __gr_drawpol(numpoints, polypoints, FALSE); -} - -/* ----------------------------------------------------------------- */ -void (bar)(int left, int top, int right, int bottom) { - __gr_bar(left,top,right, bottom); -} - -/* ----------------------------------------------------------------- */ -void (circle)(int x, int y, int radius) { - __gr_circle(x,y,radius); -} - -/* ----------------------------------------------------------------- */ -void (ellipse)( int x, int y, int stangle, int endangle, - int xradius, int yradius ) { - __gr_ellipse( x, y, stangle, endangle, xradius, yradius); -} - -/* ----------------------------------------------------------------- */ -void (arc)(int x, int y, int stangle, int endangle, int radius) { - __gr_ellipse(x,y,stangle,endangle,radius,radius); -} - -/* ----------------------------------------------------------------- */ -void (getaspectratio)(int *xasp, int *yasp) { - *xasp = __gr_Xasp; *yasp = __gr_Yasp; -} - -/* ----------------------------------------------------------------- */ -void (setaspectratio)( int xasp, int yasp ) { - __gr_Xasp = xasp; __gr_Yasp = yasp; -} - -/* ----------------------------------------------------------------- */ -void (getfillsettings)(struct fillsettingstype *fillinfo) { - fillinfo->pattern = __gr_fpatno; - fillinfo->color = __gr_colorfill; -} - -/* ----------------------------------------------------------------- */ -void (getfillpattern)(char *pattern) { - __gr_getfillpattern(pattern); -} - -/* ----------------------------------------------------------------- */ -void (sector)( int x, int y, int stangle, int endangle, - int xradius, int yradius ) { - __gr_sector(x,y,stangle,endangle,xradius, yradius); -} - -/* ----------------------------------------------------------------- */ -void (pieslice)(int x, int y, int stangle, int endangle, int radius) { - __gr_sector(x,y,stangle,endangle,radius,radius); -} - -/* ----------------------------------------------------------------- */ -unsigned (setgraphbufsize)(unsigned bufsize) { - return __gr_setgraphbufsize(bufsize); -} - -/* ----------------------------------------------------------------- */ -struct palettetype *(getdefaultpalette)(void) { - return &__gr_EGAdef; -} - -/* ----------------------------------------------------------------- */ -int (installbgidriver)(char *name, void *detect) { - return __gr_installbgidriver(name, detect); -} - -/* ----------------------------------------------------------------- */ -int (registerfarbgidriver)(void *driver) { - return __gr_registerfarbgidriver(driver); -} - -/* ----------------------------------------------------------------- */ -int (registerfarbgifont)(void *font) { - return registerbgifont(font); -} - -/* ----------------------------------------------------------------- */ -void (textlinestyle)(int on) { - __gr_TextLineStyle = on; -} - -/* ----------------------------------------------------------------- */ -void (setpalette)(int colornum, int color) { - __gr_setpalette(colornum,color); -} - -/* ----------------------------------------------------------------- */ -void (set_BGI_mode_pages)(int p) { - __gr_set_BGI_mode_pages(p); -} - -/* ----------------------------------------------------------------- */ -int (get_BGI_mode_pages)(void) { - return __gr_get_BGI_mode_pages(); -} - -/* ----------------------------------------------------------------- */ -void (set_BGI_mode_whc)(int *gd, int *gm, int width, int height, int colors) { - __gr_set_BGI_mode_pages(1); - __gr_BGI_w = width; - __gr_BGI_h = height; - __gr_BGI_c = colors; - *gd = NATIVE_GRX; - *gm = GRX_BGI_EMULATION; -} - -/* ----------------------------------------------------------------- */ -int (getmodemaxcolor)(int mode) { - /* works like getmaxcolor() for mode */ - return __gr_getmodemaxcolor(mode); -} - -/* ----------------------------------------------------------------- */ -int (getmodemaxx)(int mode) { - /* works like getmaxx() for mode */ - return __gr_getmodemaxx(mode); -} - -/* ----------------------------------------------------------------- */ -int (getmodemaxy)(int mode) { - /* works like getmaxy() for mode */ - return __gr_getmodemaxx(mode); -} - -/* ----------------------------------------------------------------- */ -int (setrgbcolor)(int r, int g, int b) { - return __gr_setrgbcolor(r,g,b); -} - -/* ----------------------------------------------------------------- */ -void (setactivepage)(int p) { - __gr_setactivepage(p); -} - -/* ----------------------------------------------------------------- */ -int (getactivepage)(void) { - return __gr_getactivepage(); -} - -/* ----------------------------------------------------------------- */ -void (setvisualpage)(int p) { - __gr_setvisualpage(p); -} - -/* ----------------------------------------------------------------- */ -int (getvisualpage)(void) { - return __gr_getvisualpage(); -} - -#endif /* __BCCGRX_C */ -/* ----------------------------------------------------------------- */ - -#endif diff --git a/thirdparty/grx249/lib/bcc/readme b/thirdparty/grx249/lib/bcc/readme deleted file mode 100644 index 995cc75..0000000 --- a/thirdparty/grx249/lib/bcc/readme +++ /dev/null @@ -1,10 +0,0 @@ -GRX library for Turbo-C / Borland-C++ - -Models supported: - - large - -Recompile: - go to the grx base dir (cd ..\..) - - edit the makedefs.bcc file - - run Borland make: - make -f makefile.bcc libs diff --git a/thirdparty/grx249/lib/dj2/readme b/thirdparty/grx249/lib/dj2/readme deleted file mode 100644 index 2ab13ca..0000000 --- a/thirdparty/grx249/lib/dj2/readme +++ /dev/null @@ -1,6 +0,0 @@ -GRX library for DJGPP v2.x - -Recompile: - go to the grx base dir (cd ..\..) - - edit the makedefs.grx file - - run GNU make: - make -f makefile.dj2 libs diff --git a/thirdparty/grx249/lib/unix/dummy b/thirdparty/grx249/lib/unix/dummy deleted file mode 100644 index cd301b1..0000000 --- a/thirdparty/grx249/lib/unix/dummy +++ /dev/null @@ -1 +0,0 @@ --- empty -- diff --git a/thirdparty/grx249/lib/watcom32/readme b/thirdparty/grx249/lib/watcom32/readme deleted file mode 100644 index 4769766..0000000 --- a/thirdparty/grx249/lib/watcom32/readme +++ /dev/null @@ -1,2 +0,0 @@ -GRX library for Watcom C++ 11.0 (32bit) - diff --git a/thirdparty/grx249/lib/win32/dummy b/thirdparty/grx249/lib/win32/dummy deleted file mode 100644 index cd301b1..0000000 --- a/thirdparty/grx249/lib/win32/dummy +++ /dev/null @@ -1 +0,0 @@ --- empty -- diff --git a/thirdparty/grx249/makedefs.bcc b/thirdparty/grx249/makedefs.bcc deleted file mode 100644 index bc2ccf5..0000000 --- a/thirdparty/grx249/makedefs.bcc +++ /dev/null @@ -1,18 +0,0 @@ -BCCROOT =c:\comp\bc -BCC =$(BCCROOT)\bin\bcc -TLIB =$(BCCROOT)\bin\tlib -TASM =$(BCCROOT)\bin\tasm -STRIP =$(BCCROOT)\bin\tdstrip -MAKE =$(BCCROOT)\bin\maker -fmakefile.bcc - -MODEL= l - -GRX_LIB_SUBDIR=bcc - -!if $d(DEBUG) -CCOPT= -O -G -Z -2 -m$(MODEL) -w -w-par -w-stv -d -v -DDEBUG=$(DEBUG) -LDOPT= -m$(MODEL) -v -!else -CCOPT= -O -G -Z -2 -m$(MODEL) -w -w-par -w-stv -d -k- -LDOPT= -m$(MODEL) -!endif diff --git a/thirdparty/grx249/makedefs.grx b/thirdparty/grx249/makedefs.grx deleted file mode 100644 index c39cfe4..0000000 --- a/thirdparty/grx249/makedefs.grx +++ /dev/null @@ -1,261 +0,0 @@ -### CONFIGURATION ######################################################## - -# This file sets variables that direct the libary build for the -# programmer needs. The file is used for the four standard plattforms - -# Specify version of GRX -# Currently only used to generate name of shared libraries for linux -GRX_VERSION=2.4.9 - -# Specify if you have libtiff.a and corresponding .h files. -# Change setting to 'y' if you have it, or to 'n' if not. -HAVE_LIBTIFF=n - -# Specify if you have libjpeg.a and corresponding .h files. -HAVE_LIBJPEG=y - -# Specify if you have libpng.a and corresponding .h files. -HAVE_LIBPNG=y - -# Specify if one of the above libs requires the -# zlib compression library -NEED_ZLIB=y - -# Specify if you want to include printing code from addons -INCLUDE_PRINTING_CODE=n - -# Specify if you want to include bmp image code from addons -INCLUDE_BMP_CODE=y - -# Specify if you want to include GNU_Pascal (gpc) support -INCLUDE_GPC_SUPPORT=n - -# Specify if you want shared library support (Linux console and X11) -INCLUDE_SHARED_SUPPORT=n - -# Specify if you want to include BGI support -INCLUDE_BGI_SUPPORT=n - -# For cross-compiling, specify prefix for tools including the trailing dash -# (e.g. i386-mingw32- for using i386-mingw32-gcc instead of just gcc) -#CROSS_PLATFORM=i586-pc-msdosdjgpp- - -# Specify if you want to use Unix tools on DOS-like platforms -HAVE_UNIX_TOOLS=y - -# Specify in linux if you want to build the library for x86_64 -BUILD_X86_64=y - -# For SDL driver the executable prefix EP is used to discriminate -# between linux X11 and mingw32. Set -#EP=x ... For linux X11. -#EP= ... For mingw32 -EP=x - -### SYSTEM SETTINGS ###################################################### - -CC = $(CROSS_PLATFORM)gcc -PC = $(CROSS_PLATFORM)gpc -AR = $(CROSS_PLATFORM)ar -RANLIB = $(CROSS_PLATFORM)ranlib -STRIP = $(CROSS_PLATFORM)strip - -# Different systems / setups may generate .o files -# this tag files will show what version is present -SYSTEM_TAG_PREFIX = systag -LINUX_i386_CONSOLE = $(SYSTEM_TAG_PREFIX).000 -LINUX_i386_X11 = $(SYSTEM_TAG_PREFIX).002 -DOS_DJGPP_V2 = $(SYSTEM_TAG_PREFIX).004 -WIN32_GCC_i386_STATIC = $(SYSTEM_TAG_PREFIX).006 -ANY_GCC_SDL_STATIC = $(SYSTEM_TAG_PREFIX).008 - -ifdef DEBUG -CCOPT = -O2 -fno-strict-aliasing -Wall -g -DDEBUG=$(DEBUG) ${C_FLAGS} -LDOPT = -g ${L_FLAGS} -else -CCOPT = -O2 -fno-strict-aliasing -Wall ${C_FLAGS} -LDOPT = -s ${L_FLAGS} -endif - -ifdef PROFILE -CCOPT += -pg -endif - -# Additional warnings for development -WARNOPTS = -W -Wshadow -Wpointer-arith -Wbad-function-cast \ - -Wcast-align -Wconversion -Wmissing-prototypes \ - -Wnested-externs -Wstrict-prototypes -#CCOPT += $(WARNOPTS) - -# Some systems can't allocate big arrays on stack. -# If test/xcirctest fails on bigger diameters, try -#CCOPT += -DSMALL_STACK - -# You may want to enable one (or both) of the following -# switches if your get lots of warnings when compiling GRX -#CCOPT += -DNO_LEFTSIDE_LVALUE_CAST -#CCOPT += -DNO_LEFTSIDE_PTR_CAST - -########################################################################## - -ifdef GRXVSDL -ifeq ($(EP),x) -GRXVX11=y -else -GRXVW32=y -endif -endif - -ifdef GRXVLNX -GRXVUNX=y -endif - -ifdef GRXVX11 -GRXVUNX=y -endif - -### UNIX SPECIFIC ######################################################## - -ifdef GRXVUNX - -# Put libgrx20.a, libgrx20.so, libgrx20X.a, libgrx20X.so and libgrx20S.a -# in lib/unix -GRX_LIB_SUBDIR=unix - -# Set here the default destination dirs for install and uninstall targets -prefix=/usr/local - -# Set the default GRX font path -#GRX_DEFAULT_FONT_PATH=${datadir}/grx/fonts - -# check for i386 or x86_64 build -ifeq ($(BUILD_X86_64),y) -CCOPT += -m64 -LDOPT += -m64 -else -CCOPT += -m32 -LDOPT += -m32 -endif - -endif - -### LINUX CONSOLE SPECIFIC ############################################### - -ifdef GRXVLNX - -# Use direct PS/2 mouse driver instead the svgalib one -USE_DIRECT_MOUSE_DRIVER=n - -# Set the videodrivers to be included, you can set both or only one of them -# (remember to set USE_DIRECT_MOUSE_DRIVER to 'y' if you set only the -# framebuffer driver) -USE_SVGALIB_DRIVER=y -USE_FRAMEBUFFER_DRIVER=y - -# Set or not set suid root. This is required for the svgalib 1.4.x stable -# release, it can be set to 'n' if you use the framebuffer driver only or -# the svgalib 1.9.x alpha release without the 1 and 4 bpp resolutions -# (see bellow) -SET_SUIDROOT=y - -# Set to 'y' this variable if you want to add the framedrivers that use -# inport/outport instructions: 1 and 4 bpp modes and the 8 bpp mode X. But -# beware this works only with svgalib 1.4.x (not with 1.9.x) and without -# the linux framebuffer enabled -USE_INOUTP_FRAMEDRIVERS=y - -endif - -### LINUX X11 SPECIFIC ################################################### - -ifdef GRXVX11 - -# The X11 base dir on your system -X11BASE=/usr/X11R6 - -# Add directories with X11 include files here -X11INCS=-I$(X11BASE)/include - -# put X11 required libraries and directories here -# note: some systems need -lsocket added -X11LIB=$(X11BASE)/lib -X11LIBS=-L$(X11LIB) -lX11 - -# Set to try to use the XFree86 Direct Graphics Access driver (DGA2) -# (if DGA2 is not available, fall back to the windowed X11 driver) -# As of XFree-4.3.99.5 DGA/DGA2 seems stable, but use with caution. -USE_XF86DGA_DRIVER=n -# Set to 'y' this variable if you want the DGA2 driver to use direct -# framebuffer access. That should not make DGA2 more unstable and is -# faster. If this setting is 'y', the DGA2 driver (see above) must -# also be 'y', or you will get compilation/linkage errors. -USE_XF86DGA_FRAMEBUFFER=n -# Set or not set suid root for X11. This is required for the DGA2 -# framebuffer access, it can be set to 'n' if you use the standard -# X11 driver only or DGA2 without framebuffer access. -SET_XSUIDROOT=n - -endif - -### DOS DJGPPv2 SPECIFIC ################################################# - -ifdef GRXVDJ2 - -# Put libgrx20.a to lib/dj2 -GRX_LIB_SUBDIR=dj2 - -# Set here the destination dir for install and uninstall targets -prefix=/dev/env/DJDIR - -# Set the default GRX font path -#GRX_DEFAULT_FONT_PATH=/dev/env/DJDIR/share/grx/fonts - -# If you want to use 'upx.exe' compressor -# disable the echo line and enable upx line. -EXE_COMPRESS = -echo -#EXE_COMPRESS = upx --best - -# Default compiler switches. In djgpp.env. under [make], -# add the line "BUTT=-mcpu=i386", if that is your target, -# or directly add -mcpu here. -# At present gcc supports 'i386', 'i486', 'i586' ('pentium'), -# 'i686' ('pentiumpro') and 'k6'. -#CCOPT += $(BUTT) -#CCOPT += -mcpu=i586 - -# GRX uses "uclock" to gets 1 ms resolution in the input code, -# this can causes problems in Win3.1, so you may want to enable -# the following switch -#CCOPT += -DNO_REPROGRAM_TIMER - -endif - -### WIN32 MINGW SPECIFIC ################################################# - -ifdef GRXVW32 - -# Put libgrx20.a and libgrx20S.a to lib/win32 -GRX_LIB_SUBDIR=win32 - -# Set here the destination dir for install and uninstall targets -prefix=C:\MINGW - -# Set the default GRX font path -#GRX_DEFAULT_FONT_PATH=c:/grxfonts - -endif - -### COMMON ############################################################## - -exec_prefix=${prefix} - -bindir=${exec_prefix}/bin -libdir=${exec_prefix}/lib -datadir=${prefix}/share - -infodir=${prefix}/info -includedir=${prefix}/include -unitsdir=${exec_prefix}/units - -########################################################################## - diff --git a/thirdparty/grx249/makedefs.orig b/thirdparty/grx249/makedefs.orig deleted file mode 100644 index 670cbb8..0000000 --- a/thirdparty/grx249/makedefs.orig +++ /dev/null @@ -1,261 +0,0 @@ -### CONFIGURATION ######################################################## - -# This file sets variables that direct the libary build for the -# programmer needs. The file is used for the four standard plattforms - -# Specify version of GRX -# Currently only used to generate name of shared libraries for linux -GRX_VERSION=2.4.9 - -# Specify if you have libtiff.a and corresponding .h files. -# Change setting to 'y' if you have it, or to 'n' if not. -HAVE_LIBTIFF=n - -# Specify if you have libjpeg.a and corresponding .h files. -HAVE_LIBJPEG=n - -# Specify if you have libpng.a and corresponding .h files. -HAVE_LIBPNG=n - -# Specify if one of the above libs requires the -# zlib compression library -NEED_ZLIB=n - -# Specify if you want to include printing code from addons -INCLUDE_PRINTING_CODE=n - -# Specify if you want to include bmp image code from addons -INCLUDE_BMP_CODE=n - -# Specify if you want to include GNU_Pascal (gpc) support -INCLUDE_GPC_SUPPORT=n - -# Specify if you want shared library support (Linux console and X11) -INCLUDE_SHARED_SUPPORT=n - -# Specify if you want to include BGI support -INCLUDE_BGI_SUPPORT=n - -# For cross-compiling, specify prefix for tools including the trailing dash -# (e.g. i386-mingw32- for using i386-mingw32-gcc instead of just gcc) -#CROSS_PLATFORM=i586-pc-msdosdjgpp- - -# Specify if you want to use Unix tools on DOS-like platforms -HAVE_UNIX_TOOLS=y - -# Specify in linux if you want to build the library for x86_64 -BUILD_X86_64=y - -# For SDL driver the executable prefix EP is used to discriminate -# between linux X11 and mingw32. Set -#EP=x ... For linux X11. -#EP= ... For mingw32 -EP=x - -### SYSTEM SETTINGS ###################################################### - -CC = $(CROSS_PLATFORM)gcc -PC = $(CROSS_PLATFORM)gpc -AR = $(CROSS_PLATFORM)ar -RANLIB = $(CROSS_PLATFORM)ranlib -STRIP = $(CROSS_PLATFORM)strip - -# Different systems / setups may generate .o files -# this tag files will show what version is present -SYSTEM_TAG_PREFIX = systag -LINUX_i386_CONSOLE = $(SYSTEM_TAG_PREFIX).000 -LINUX_i386_X11 = $(SYSTEM_TAG_PREFIX).002 -DOS_DJGPP_V2 = $(SYSTEM_TAG_PREFIX).004 -WIN32_GCC_i386_STATIC = $(SYSTEM_TAG_PREFIX).006 -ANY_GCC_SDL_STATIC = $(SYSTEM_TAG_PREFIX).008 - -ifdef DEBUG -CCOPT = -O2 -fno-strict-aliasing -Wall -g -DDEBUG=$(DEBUG) -LDOPT = -g -else -CCOPT = -O2 -fno-strict-aliasing -Wall -LDOPT = -s -endif - -ifdef PROFILE -CCOPT += -pg -endif - -# Additional warnings for development -WARNOPTS = -W -Wshadow -Wpointer-arith -Wbad-function-cast \ - -Wcast-align -Wconversion -Wmissing-prototypes \ - -Wnested-externs -Wstrict-prototypes -#CCOPT += $(WARNOPTS) - -# Some systems can't allocate big arrays on stack. -# If test/xcirctest fails on bigger diameters, try -#CCOPT += -DSMALL_STACK - -# You may want to enable one (or both) of the following -# switches if your get lots of warnings when compiling GRX -#CCOPT += -DNO_LEFTSIDE_LVALUE_CAST -#CCOPT += -DNO_LEFTSIDE_PTR_CAST - -########################################################################## - -ifdef GRXVSDL -ifeq ($(EP),x) -GRXVX11=y -else -GRXVW32=y -endif -endif - -ifdef GRXVLNX -GRXVUNX=y -endif - -ifdef GRXVX11 -GRXVUNX=y -endif - -### UNIX SPECIFIC ######################################################## - -ifdef GRXVUNX - -# Put libgrx20.a, libgrx20.so, libgrx20X.a, libgrx20X.so and libgrx20S.a -# in lib/unix -GRX_LIB_SUBDIR=unix - -# Set here the default destination dirs for install and uninstall targets -prefix=/usr/local - -# Set the default GRX font path -#GRX_DEFAULT_FONT_PATH=${datadir}/grx/fonts - -# check for i386 or x86_64 build -ifeq ($(BUILD_X86_64),y) -CCOPT += -m64 -LDOPT += -m64 -else -CCOPT += -m32 -LDOPT += -m32 -endif - -endif - -### LINUX CONSOLE SPECIFIC ############################################### - -ifdef GRXVLNX - -# Use direct PS/2 mouse driver instead the svgalib one -USE_DIRECT_MOUSE_DRIVER=n - -# Set the videodrivers to be included, you can set both or only one of them -# (remember to set USE_DIRECT_MOUSE_DRIVER to 'y' if you set only the -# framebuffer driver) -USE_SVGALIB_DRIVER=y -USE_FRAMEBUFFER_DRIVER=y - -# Set or not set suid root. This is required for the svgalib 1.4.x stable -# release, it can be set to 'n' if you use the framebuffer driver only or -# the svgalib 1.9.x alpha release without the 1 and 4 bpp resolutions -# (see bellow) -SET_SUIDROOT=y - -# Set to 'y' this variable if you want to add the framedrivers that use -# inport/outport instructions: 1 and 4 bpp modes and the 8 bpp mode X. But -# beware this works only with svgalib 1.4.x (not with 1.9.x) and without -# the linux framebuffer enabled -USE_INOUTP_FRAMEDRIVERS=n - -endif - -### LINUX X11 SPECIFIC ################################################### - -ifdef GRXVX11 - -# The X11 base dir on your system -X11BASE=/usr/X11R6 - -# Add directories with X11 include files here -X11INCS=-I$(X11BASE)/include - -# put X11 required libraries and directories here -# note: some systems need -lsocket added -X11LIB=$(X11BASE)/lib -X11LIBS=-L$(X11LIB) -lX11 - -# Set to try to use the XFree86 Direct Graphics Access driver (DGA2) -# (if DGA2 is not available, fall back to the windowed X11 driver) -# As of XFree-4.3.99.5 DGA/DGA2 seems stable, but use with caution. -USE_XF86DGA_DRIVER=n -# Set to 'y' this variable if you want the DGA2 driver to use direct -# framebuffer access. That should not make DGA2 more unstable and is -# faster. If this setting is 'y', the DGA2 driver (see above) must -# also be 'y', or you will get compilation/linkage errors. -USE_XF86DGA_FRAMEBUFFER=n -# Set or not set suid root for X11. This is required for the DGA2 -# framebuffer access, it can be set to 'n' if you use the standard -# X11 driver only or DGA2 without framebuffer access. -SET_XSUIDROOT=n - -endif - -### DOS DJGPPv2 SPECIFIC ################################################# - -ifdef GRXVDJ2 - -# Put libgrx20.a to lib/dj2 -GRX_LIB_SUBDIR=dj2 - -# Set here the destination dir for install and uninstall targets -prefix=/dev/env/DJDIR - -# Set the default GRX font path -#GRX_DEFAULT_FONT_PATH=/dev/env/DJDIR/share/grx/fonts - -# If you want to use 'upx.exe' compressor -# disable the echo line and enable upx line. -EXE_COMPRESS = -echo -#EXE_COMPRESS = upx --best - -# Default compiler switches. In djgpp.env. under [make], -# add the line "BUTT=-mcpu=i386", if that is your target, -# or directly add -mcpu here. -# At present gcc supports 'i386', 'i486', 'i586' ('pentium'), -# 'i686' ('pentiumpro') and 'k6'. -#CCOPT += $(BUTT) -#CCOPT += -mcpu=i586 - -# GRX uses "uclock" to gets 1 ms resolution in the input code, -# this can causes problems in Win3.1, so you may want to enable -# the following switch -#CCOPT += -DNO_REPROGRAM_TIMER - -endif - -### WIN32 MINGW SPECIFIC ################################################# - -ifdef GRXVW32 - -# Put libgrx20.a and libgrx20S.a to lib/win32 -GRX_LIB_SUBDIR=win32 - -# Set here the destination dir for install and uninstall targets -prefix=C:\MINGW - -# Set the default GRX font path -#GRX_DEFAULT_FONT_PATH=c:/grxfonts - -endif - -### COMMON ############################################################## - -exec_prefix=${prefix} - -bindir=${exec_prefix}/bin -libdir=${exec_prefix}/lib -datadir=${prefix}/share - -infodir=${prefix}/info -includedir=${prefix}/include -unitsdir=${exec_prefix}/units - -########################################################################## - diff --git a/thirdparty/grx249/makefile.bcc b/thirdparty/grx249/makefile.bcc deleted file mode 100644 index df23c20..0000000 --- a/thirdparty/grx249/makefile.bcc +++ /dev/null @@ -1,35 +0,0 @@ -# -# GRX 2.0 makefile for Borland C distribution version -# -!include "makedefs.bcc" - -all: libs test bgitest - -libs: - cd src - $(MAKE) - cd .. - -test: libs - cd test - $(MAKE) - cd .. - -bgitest: libs - cd test\bgi - $(MAKE) - cd ..\.. - -clean: - cd src - $(MAKE) clean - cd ..\test - $(MAKE) clean - cd bgi - $(MAKE) clean - cd ..\.. - -cleanall: clean - cd src - $(MAKE) cleanall - cd .. diff --git a/thirdparty/grx249/makefile.dj2 b/thirdparty/grx249/makefile.dj2 deleted file mode 100644 index 00cb852..0000000 --- a/thirdparty/grx249/makefile.dj2 +++ /dev/null @@ -1,69 +0,0 @@ -# -# GRX makefile for DJGPPv2 version -# -.PHONY : libs test bgitest clean cleanall install uninstall \ - install-bin uninstall-bin install-fonts uninstall-fonts \ - install-info uninstall-info - -GRXVDJ2=y - -include makedefs.grx - -all: libs test bgitest - -libs: - $(MAKE) -C src -f makefile.dj2 - -test: libs - $(MAKE) -C test -f makefile.dj2 -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal -f makefile.dj2 -endif - -bgitest: libs -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C test/bgi -f makefile.dj2 -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal/bgi -f makefile.dj2 -endif -endif - -clean: - $(MAKE) -C test -f makefile.dj2 clean -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C test/bgi -f makefile.dj2 clean -endif - $(MAKE) -C src -f makefile.dj2 clean -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal -f makefile.dj2 clean -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C pascal/bgi -f makefile.dj2 clean -endif -endif - -cleanall: clean - $(MAKE) -C src -f makefile.dj2 cleanall - -install: - $(MAKE) -C src -f makefile.dj2 install - -uninstall: - $(MAKE) -C src -f makefile.dj2 uninstall - -install-info: - $(MAKE) -C src -f makefile.dj2 install-info - -uninstall-info: - $(MAKE) -C src -f makefile.dj2 uninstall-info - -install-bin: - $(MAKE) -C src -f makefile.dj2 install-bin - -uninstall-bin: - $(MAKE) -C src -f makefile.dj2 uninstall-bin - -install-fonts: - $(MAKE) -C src -f makefile.dj2 install-fonts - -uninstall-fonts: - $(MAKE) -C src -f makefile.dj2 uninstall-fonts diff --git a/thirdparty/grx249/makefile.lnx b/thirdparty/grx249/makefile.lnx deleted file mode 100644 index 4612440..0000000 --- a/thirdparty/grx249/makefile.lnx +++ /dev/null @@ -1,77 +0,0 @@ -# -# GRX makefile for LINUX/console version -# -.PHONY : libs test bgitest clean cleanall install uninstall setsuid \ - install-bin uninstall-bin install-fonts uninstall-fonts \ - install-info uninstall-info - -GRXVLNX=y - -include makedefs.grx - -all: libs test bgitest - -libs: - $(MAKE) -C src -f makefile.lnx - -test: libs - $(MAKE) -C test -f makefile.lnx -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal -f makefile.lnx -endif - -bgitest: libs -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C test/bgi -f makefile.lnx -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal/bgi -f makefile.lnx -endif -endif - -clean: - $(MAKE) -C test -f makefile.lnx clean -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C test/bgi -f makefile.lnx clean -endif - $(MAKE) -C src -f makefile.lnx clean -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal -f makefile.lnx clean -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C pascal/bgi -f makefile.lnx clean -endif -endif - -cleanall: clean - $(MAKE) -C src -f makefile.lnx cleanall - -install: - $(MAKE) -C src -f makefile.lnx install - -uninstall: - $(MAKE) -C src -f makefile.lnx uninstall - -install-info: - $(MAKE) -C src -f makefile.lnx install-info - -uninstall-info: - $(MAKE) -C src -f makefile.lnx uninstall-info - -install-bin: - $(MAKE) -C src -f makefile.lnx install-bin - -uninstall-bin: - $(MAKE) -C src -f makefile.lnx uninstall-bin - -install-fonts: - $(MAKE) -C src -f makefile.lnx install-fonts - -uninstall-fonts: - $(MAKE) -C src -f makefile.lnx uninstall-fonts - -setsuid: - $(MAKE) -C src -f makefile.lnx setsuid - $(MAKE) -C test -f makefile.lnx setsuid -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C test/bgi -f makefile.lnx setsuid -endif - diff --git a/thirdparty/grx249/makefile.sdl b/thirdparty/grx249/makefile.sdl deleted file mode 100644 index c936fa8..0000000 --- a/thirdparty/grx249/makefile.sdl +++ /dev/null @@ -1,62 +0,0 @@ -# -# GRX makefile for SDL version -# -.PHONY : libs test bgitest clean cleanall install uninstall \ - install-bin uninstall-bin install-fonts uninstall-fonts - -GRXVSDL=y - -include makedefs.grx - -all: libs test bgitest - -libs: - $(MAKE) -C src -f makefile.sdl - -test: libs - $(MAKE) -C test -f makefile.sdl -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal -f makefile.sdl -endif - -bgitest: libs -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C test/bgi -f makefile.sdl -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal/bgi -f makefile.sdl -endif -endif - -clean: - $(MAKE) -C test -f makefile.sdl clean -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C test/bgi -f makefile.sdl clean -endif - $(MAKE) -C src -f makefile.sdl clean -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal -f makefile.sdl clean -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C pascal/bgi -f makefile.sdl clean -endif -endif - -cleanall: clean - $(MAKE) -C src -f makefile.sdl cleanall - -install: - $(MAKE) -C src -f makefile.sdl install - -uninstall: - $(MAKE) -C src -f makefile.sdl uninstall - -install-bin: - $(MAKE) -C src -f makefile.sdl install-bin - -uninstall-bin: - $(MAKE) -C src -f makefile.sdl uninstall-bin - -install-fonts: - $(MAKE) -C src -f makefile.sdl install-fonts - -uninstall-fonts: - $(MAKE) -C src -f makefile.sdl uninstall-fonts diff --git a/thirdparty/grx249/makefile.w32 b/thirdparty/grx249/makefile.w32 deleted file mode 100644 index e2f653e..0000000 --- a/thirdparty/grx249/makefile.w32 +++ /dev/null @@ -1,62 +0,0 @@ -# -# GRX makefile for Mingw version -# -.PHONY : libs test bgitest clean cleanall install uninstall \ - install-bin uninstall-bin install-fonts uninstall-fonts - -GRXVW32=y - -include makedefs.grx - -all: libs test bgitest - -libs: - $(MAKE) -C src -f makefile.w32 - -test: libs - $(MAKE) -C test -f makefile.w32 -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal -f makefile.w32 -endif - -bgitest: libs -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C test/bgi -f makefile.w32 -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal/bgi -f makefile.w32 -endif -endif - -clean: - $(MAKE) -C test -f makefile.w32 clean -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C test/bgi -f makefile.w32 clean -endif - $(MAKE) -C src -f makefile.w32 clean -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal -f makefile.w32 clean -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C pascal/bgi -f makefile.w32 clean -endif -endif - -cleanall: clean - $(MAKE) -C src -f makefile.w32 cleanall - -install: - $(MAKE) -C src -f makefile.w32 install - -uninstall: - $(MAKE) -C src -f makefile.w32 uninstall - -install-bin: - $(MAKE) -C src -f makefile.w32 install-bin - -uninstall-bin: - $(MAKE) -C src -f makefile.w32 uninstall-bin - -install-fonts: - $(MAKE) -C src -f makefile.w32 install-fonts - -uninstall-fonts: - $(MAKE) -C src -f makefile.w32 uninstall-fonts diff --git a/thirdparty/grx249/makefile.wat b/thirdparty/grx249/makefile.wat deleted file mode 100644 index 2421abe..0000000 --- a/thirdparty/grx249/makefile.wat +++ /dev/null @@ -1,105 +0,0 @@ -################## -## Include Directories - -!ifndef %INCLUDE -## DEFAULT -WATCOM_HEADER_DIR=C:\WATCOM\H -!else -WATCOM_HEADER_DIR=$(%INCLUDE) -!endif - - -################## -## Locations - -GRX_LIB_SUBDIR=watcom32 -GRX_BIN_SUBDIR=bin - -################## -## Binaries - -CC = wcc386 -LIB = wlib -LINK = wlink - -################## -## Binary Flags and Options - -!ifdef DEBUG - -################## -## DEBUG FLAGS -CC_OPTS = -i=$(WATCOM_HEADER_DIR);.\include;.\src\include;.\src;.\addons\print;.\addons\bmp -w4 & --e25 -d__MSDOS__ -dSMALL_STACK -dLFB_BY_NEAR_POINTER -dUSE_WATCOM386_ASM -dDEBUG=0x7800 -zq -od -d2 -5r & --bt=dos -mf -LIB_OPTS = -b -c -n -q -p=512 -LINK_OPTS = d all SYS dos4g op inc op m op maxe=25 op q op symf - -!else - -################## -## RELEASE FLAGS -CC_OPTS = -i=$(WATCOM_HEADER_DIR);.\include;.\src\include;.\src;.\addons\print;.\addons\bmp -w4 & --e25 -d__MSDOS__ -dSMALL_STACK -dLFB_BY_NEAR_POINTER -dUSE_WATCOM386_ASM -zq -otexan -d1 -5r & --bt=dos -mf -LIB_OPTS = -b -c -n -q -p=512 -LINK_OPTS = SYS dos4g op inc op m op maxe=25 op q op symf - -!endif - -################## -## Targets - -GRXVERSION = 229 -GRXLIB = lib\$(GRX_LIB_SUBDIR)\grx$(GRXVERSION).lib -GRXLINK = wat32mak.lb1 -GRXTESTS = $(GRX_BIN_SUBDIR)\modetest.exe & -$(GRX_BIN_SUBDIR)\arctest.exe & -$(GRX_BIN_SUBDIR)\blittest.exe & -$(GRX_BIN_SUBDIR)\circtest.exe & -$(GRX_BIN_SUBDIR)\cliptest.exe & -$(GRX_BIN_SUBDIR)\colorops.exe & -$(GRX_BIN_SUBDIR)\curstest.exe & -$(GRX_BIN_SUBDIR)\fonttest.exe & -$(GRX_BIN_SUBDIR)\imgtest.exe & -$(GRX_BIN_SUBDIR)\fnt2c.exe & -$(GRX_BIN_SUBDIR)\fnt2text.exe & -$(GRX_BIN_SUBDIR)\keys.exe & -$(GRX_BIN_SUBDIR)\life.exe & -$(GRX_BIN_SUBDIR)\linetest.exe & -$(GRX_BIN_SUBDIR)\mousetst.exe & -$(GRX_BIN_SUBDIR)\pcirctst.exe & -$(GRX_BIN_SUBDIR)\polytest.exe & -$(GRX_BIN_SUBDIR)\rgbtest.exe & -$(GRX_BIN_SUBDIR)\scroltst.exe & -$(GRX_BIN_SUBDIR)\speedtst.exe & -$(GRX_BIN_SUBDIR)\textpatt.exe & -$(GRX_BIN_SUBDIR)\winclip.exe & -$(GRX_BIN_SUBDIR)\wintest.exe & -$(GRX_BIN_SUBDIR)\arctest.dat & -$(GRX_BIN_SUBDIR)\polytest.dat - - - -################## -## Rules - -all : lib tests .SYMBOLIC - -lib : $(GRXLIB) .SYMBOLIC - -tests : $(GRXTESTS) .SYMBOLIC - - -clean : .SYMBOLIC - @del *.obj - @del *.err - @del *.lb1 - @del *.lk1 - @del *.map - @del $(GRX_BIN_SUBDIR)\*.ilk - @del $(GRX_BIN_SUBDIR)\*.sym - -!include .\src\makefile.wat - -!include .\test\makefile.wat diff --git a/thirdparty/grx249/makefile.x11 b/thirdparty/grx249/makefile.x11 deleted file mode 100644 index c114535..0000000 --- a/thirdparty/grx249/makefile.x11 +++ /dev/null @@ -1,69 +0,0 @@ -# -# GRX makefile for LINUX/X11 version (GNU-make) -# -.PHONY : libs test bgitest clean cleanall install uninstall \ - install-bin uninstall-bin install-fonts uninstall-fonts \ - install-info uninstall-info - -GRXVX11=y - -include makedefs.grx - -all: libs test bgitest - -libs: - $(MAKE) -C src -f makefile.x11 - -test: libs - $(MAKE) -C test -f makefile.x11 -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal -f makefile.x11 -endif - -bgitest: libs -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C test/bgi -f makefile.x11 -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal/bgi -f makefile.x11 -endif -endif - -clean: - $(MAKE) -C test -f makefile.x11 clean -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C test/bgi -f makefile.x11 clean -endif - $(MAKE) -C src -f makefile.x11 clean -ifeq ($(INCLUDE_GPC_SUPPORT),y) - $(MAKE) -C pascal -f makefile.x11 clean -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(MAKE) -C pascal/bgi -f makefile.x11 clean -endif -endif - -cleanall: clean - $(MAKE) -C src -f makefile.x11 cleanall - -install: - $(MAKE) -C src -f makefile.x11 install - -uninstall: - $(MAKE) -C src -f makefile.x11 uninstall - -install-info: - $(MAKE) -C src -f makefile.x11 install-info - -uninstall-info: - $(MAKE) -C src -f makefile.x11 uninstall-info - -install-bin: - $(MAKE) -C src -f makefile.x11 install-bin - -uninstall-bin: - $(MAKE) -C src -f makefile.x11 uninstall-bin - -install-fonts: - $(MAKE) -C src -f makefile.x11 install-fonts - -uninstall-fonts: - $(MAKE) -C src -f makefile.x11 uninstall-fonts diff --git a/thirdparty/grx249/pascal/bgi/allmodes.pas b/thirdparty/grx249/pascal/bgi/allmodes.pas deleted file mode 100644 index 93e4413..0000000 --- a/thirdparty/grx249/pascal/bgi/allmodes.pas +++ /dev/null @@ -1,84 +0,0 @@ -{$X+} - -program AllModes; -{ - * test and demo program for the Graph unit - * - * Please read the copyright notices of graph.pas - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Author : Sven Hilscher - * e-mail : sven@rufus.central.de -} - -uses - Graph; - -function MyStr(Numeric, Len: Integer):WrkString; -var - RetString : WrkString; -begin - str(Numeric:Len, RetString); - MyStr := RetString; -end; - - -var - i, c, - grDriver, - grMode, - ErrCode: Integer; - -begin - grDriver := Detect; - { grDriver := InstallUserDriver('SVGA256', nil); Not used in GPC } - InitGraph(grDriver, grMode,'../../chr'); - ErrCode := GraphResult; - if ErrCode = GrOk then - begin { Do graphics } - for i := 0 to GetMaxMode do - begin - SetGraphMode(i); - - if GetMaxColor < 256 then - for c := 1 to GetMaxColor-1 do begin - begin - SetRGBPalette(c,c,0,255-c); - SetColor(c); - Line(c + 10, 5, c + 10, 30) - end; - SetRGBPalette(GetMaxColor,255,255,255); - SetColor(GetMaxColor) - end else begin - for c := 0 to 255 do - begin - SetColor(c); - Line(c + 10, 5, c + 10, 30) - end; - SetColor(White) - end; - - OutTextXY(10,40, GetDriverName); - OutTextXY(10,50, 'Resolution : ' + MyStr(GetMaxX + 1, 4) + ' x' + MyStr(GetMaxY + 1, 4)); - OutTextXY(10,60, 'Colors : ' + MyStr(GetMaxColor + 1, 10)); - OutTextXY(10,80, 'ActMode : ' + MyStr(i , 4)); - OutTextXY(10,90, 'ModeName : ' + GetModeName(i) ); - OutTextXY(10,140,'Press Enter'); - - Rectangle(0,0,GetMaxX,GetMaxY); - Rectangle(2,2,GetMaxX-2,GetMaxY-2); - - ReadKey; - end; - CloseGraph - end - else begin - Writeln('Graphics error:', GraphErrorMsg(ErrCode)); - Write ('Press Enter ...'); - ReadLn - end -end. - diff --git a/thirdparty/grx249/pascal/bgi/colors.pas b/thirdparty/grx249/pascal/bgi/colors.pas deleted file mode 100644 index ca03330..0000000 --- a/thirdparty/grx249/pascal/bgi/colors.pas +++ /dev/null @@ -1,108 +0,0 @@ -{$X+} - -program Colors; -{ - * test and demo program for the Graph unit - * - * Please read the copyright notices of graph.pas - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Author : Sven Hilscher - * e-mail : sven@rufus.central.de -} - -uses - Graph; - -var - i, grDriver, grMode, ErrCode: Integer; - -procedure ShowColors(Mode: Word); -var - y: Word; - f1, f2: Real; -begin - { Show only 8 bit, hicolor and truecolor modes } - if GetMaxColor < 255 then return; - { Show only 640 x 480 modes } - { if (GetMaxX <> 639) or (GetMaxY <> 479) then return; } - - f1 := GetMaxY / 64; - f2 := GetMaxY / 256; - - { Red } - for y := 0 to GetMaxY do begin - if GetMaxColor = 255 then begin - SetRGBPalette(trunc(y / f1), trunc(y / f1), 0, 0); - SetColor(trunc(y / f1)) - end - else - SetRGBColor(trunc(y / f2), 0, 0); - Line(0, y, GetMaxX div 4, y) - end; - - { Green } - for y := 0 to GetMaxY do begin - if GetMaxColor = 255 then begin - SetRGBPalette(64 + trunc(y / f1), 0, trunc(y / f1), 0); - SetColor(64 + trunc(y / f1)) - end - else - SetRGBColor(0, trunc(y / f2), 0); - Line(GetMaxX div 4, y, GetMaxX div 2, y) - end; - - { Blue } - for y := 0 to GetMaxY do begin - if GetMaxColor = 255 then begin - SetRGBPalette(128 + trunc(y / f1), 0, 0, trunc(y / f1)); - SetColor(128 + trunc(y / f1)) - end - else - SetRGBColor(0, 0, trunc(y / f2)); - Line(GetMaxX div 2, y, GetMaxX - GetMaxX div 4, y) - end; - - { Gray } - for y := 0 to GetMaxY do begin - if GetMaxColor = 255 then begin - SetRGBPalette(192 + trunc(y / f1), trunc(y / f1), trunc(y / f1), trunc(y / f1)); - SetColor(192 + trunc(y / f1)) - end - else - SetRGBColor(trunc(y / f2), trunc(y / f2), trunc(y / f2)); - Line(GetMaxX - GetMaxX div 4, y, GetMaxX, y) - end; - - if GetMaxColor = 255 then - SetColor(255) - else - SetColor(White); - OutTextXY(10, 2, GetModeName(Mode)) ; - Rectangle(0,0,GetMaxX,GetMaxY); - ReadKey -end; - -begin - grDriver := Detect; - InitGraph(grDriver, grMode,'../../chr'); - ErrCode := GraphResult; - if ErrCode = GrOk then - begin { Do graphics } - for i := 0 to GetMaxMode do - begin - SetGraphMode(i); - ShowColors(i) - end; - CloseGraph - end - else begin - Writeln('Graphics error:', GraphErrorMsg(ErrCode)); - Write ('Press Enter ...'); - ReadLn - end -end. - diff --git a/thirdparty/grx249/pascal/bgi/demo.pas b/thirdparty/grx249/pascal/bgi/demo.pas deleted file mode 100644 index 4c2e90e..0000000 --- a/thirdparty/grx249/pascal/bgi/demo.pas +++ /dev/null @@ -1,547 +0,0 @@ -program Demo; -{ - * test and demo program for the Graph unit - * - * Please read the copyright notices of graph.pas - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Author : Sven Hilscher - * e-mail : sven@rufus.central.de -} - -uses -(*$ifdef __GPC__ *) - Graph; -(*$else *) - graph, crt; -(*$endif*) - -var - Test, Corr: Real; - -procedure Pause; -const - ESC = #$1b; -var - c: Char; -begin - c := ReadKey; - if c=ESC then begin - CloseGraph; - Halt(1) - end; - if ord(c )= 0 then - c := ReadKey; - ClearDevice; -end; - -function MyStr(Numeric, Len: Integer):WrkString; -var - RetString: WrkString; -begin - str(Numeric: Len, RetString); - MyStr := RetString -end; - -procedure ColorSetup; -var i: Integer; -begin - if GetMaxColor < 2 then - else if GetMaxColor < 16 then - for i := 1 to 14 do - SetRGBPalette(i, random(64), random(64), random(64)) - else if GetMaxColor < 256 then begin - for i := 0 to 63 do begin - if i > 32 then begin - SetRGBPalette(i , i, i - random(16), i - random(16)); - SetRGBPalette(i + 64, i - random(16), i, i - random(16)); - SetRGBPalette(i + 128, i - random(16), i - random(16), i); - SetRGBPalette(i + 192, i - random(16), i - random(16), i - random(16)) - end - else begin - SetRGBPalette(i, i, i + random(16), i + random(16)); - SetRGBPalette(i + 64, i + random(16), i, i + random(16)); - SetRGBPalette(i + 128, i + random(16), i + random(16), i); - SetRGBPalette(i + 192, i + random(16), i + random(16), i + random(16)) - end; - { Set entry 15 to white for text } - SetRGBPalette(15, 63, 63, 63); - { Set entry 0 to black for text } - SetRGBPalette(0, 0, 0, 0) - end - end -end; - -procedure StartTest(HeadLine: WrkString); -begin - ClearDevice; - SetColor(White); - SetTextStyle(0,0,0); - SetTextJustify(CenterText, TopText); - OutTextXY(GetMaxX div 2, 0, HeadLine + ' Demo - Hit Any Key ...'); - SetTextJustify(LeftText, TopText); - Line(0, 9, GetMaxX, 9) -end; - -procedure SetRandomColor; -var i, c : Integer; -begin - if GetMaxColor < 256 then begin - SetColor(random(GetMaxColor + 1)); - SetFillStyle(random(UserFill + 1), random(GetMaxColor + 1)); - end - else begin - (*$ifdef __GPC__ *) - i := random(4); - c := random(128) + 32; - case i of - 0: SetRGBColor(c, c - random(32), c + random(32)); - 1: SetRGBColor(c - random(32), c + random(32), c); - 2: SetRGBColor(c + random(32), c, c - random(32)); - else - SetRGBColor(c, c, c) - end; - SetFillStyle(random(UserFill + 1), random(255) shl 16 + random(255) shl 8 + random(255)) - (*$endif*) - end; -end; - -procedure BGIInfo(Mode: Integer); -var - x, y: Integer; -begin - StartTest('Info Functions'); - OutTextXY( 2, 20, 'GetDriverName : ' + GetDriverName); - OutTextXY( 2, 30, 'GetMaxMode : ' + MyStr(GetMaxMode , 10)); - OutTextXY( 2, 40, 'GetGraphMode : ' + MyStr(GetGraphMode , 10)); - OutTextXY( 2, 50, 'GetModeName : ' + GetModeName(Mode)); - OutTextXY( 2, 70, 'GetMaxColor : ' + MyStr(GetMaxColor , 10)); - OutTextXY( 2, 80, 'GetPaletteSize : ' + MyStr(GetPaletteSize, 10)); - OutTextXY( 2,100, 'GetMaxX : ' + MyStr(GetMaxX , 10)); - OutTextXY( 2,110, 'GetMaxY : ' + MyStr(GetMaxY , 10)); - GetAspectRatio(x, y); - Corr := ((GetMaxY+1)/(GetMaxX+1)) / 0.75; - OutTextXY( 2,120, 'GetAspectRatio->X : ' + MyStr(x , 10)); - OutTextXY( 2,130, 'GetAspectRatio->Y : ' + MyStr(y , 10)); - OutTextXY( 2,150, 'ImageSize(1,8,1,8) : ' + MyStr(ImageSize(1, 8, 1, 8), 10)); - repeat - until KeyPressed; - Pause; -end; - -procedure LineTest; -begin - StartTest('Line'); - repeat - SetRandomColor; - Line(0, random(GetMaxY)+10, GetMaxX, random(GetMaxY)+10); - Line(random(GetMaxX), 10, random(GetMaxX), GetMaxY); - until KeyPressed; - Pause; -end; - -procedure RectangleTest; -begin - StartTest('Rectangle'); - repeat - SetRandomColor; - Rectangle(random(GetMaxX), random(GetMaxY-10)+10, random(GetMaxX), random(GetMaxY-10)+10); - until KeyPressed; - Pause; -end; - -procedure BarTest; -begin - StartTest('Bar'); - repeat - SetRandomColor; - Bar(random(GetMaxX), random(GetMaxY-10)+10, random(GetMaxX), random(GetMaxY-10)+10); - until KeyPressed; - Pause; -end; - -procedure CircleTest; -var - r: Integer; -begin - StartTest('Circle'); - repeat - SetRandomColor; - r := random(GetMaxX div 3) + 1; - Circle(random(GetMaxX - 2 * r) + r, random(GetMaxY - (2 * Round(r * Corr) + 10)) + Round(r * Corr) + 10, Round(r*Corr)); - until KeyPressed; - Pause; -end; - -procedure EllipseTest; -var - rx, ry: Word; -begin - StartTest('Ellipse'); - repeat - SetRandomColor; - rx := random(GetMaxX div 3); - ry := random(GetMaxY div 3); - Ellipse(random(GetMaxX - 2 * rx) + rx, random(GetMaxY-(2 * ry + 10)) + ry + 10, 0, 359, - Round(rx * Corr), Round(ry * Corr)); - until KeyPressed; - Pause; -end; - -procedure Ellipse2Test; -var - i: Word; -begin - StartTest('Ellipse 2.'); - for i := 20 to GetMaxX div 2 do begin - SetRandomColor; - Test := i; - Ellipse(GetMaxX div 2, GetMaxY div 2 + 5, 0, Round(i * (720 / GetMaxX)), - i, Round(i * GetMaxY / GetMaxX) - 6); - end; - repeat - until KeyPressed; - Pause; -end; - -procedure FillEllipseTest; -var - rx, ry: Word; -begin - StartTest('FillEllipse'); - repeat - SetRandomColor; - rx := random(GetMaxX div 3); - ry := random(GetMaxY div 3); - FillEllipse(random(GetMaxX - 2 * rx) + rx, random(GetMaxY-(2 * Round(ry * Corr) + 10)) + Round(ry * Corr) + 10, - Round(rx * Corr), Round(ry * Corr)); - until KeyPressed; - Pause; -end; - -procedure ArcTest; -var - r: Word; -begin - StartTest('Arc'); - repeat - SetRandomColor; - r := random(GetMaxX div 3); - Arc(random(GetMaxX - 2 * r) + r, random(GetMaxY-(2 * Round(r * Corr) + 10)) + Round(r * Corr) + 10, 0, random(360), - Round(r * Corr)); - until KeyPressed; - Pause; -end; - -procedure SectorTest; -var - rx, ry: Word; -begin - StartTest('Sector'); - repeat - SetRandomColor; - rx := random(GetMaxX div 3); - ry := random(GetMaxY div 3); - Sector(random(GetMaxX - 2 * rx) + rx, random(GetMaxY-(2 * Round(ry * Corr) + 10)) + Round(ry * Corr) + 10, - random(360), random(360), Round(rx * Corr), Round(ry * Corr)); - until KeyPressed; - Pause; -end; - -procedure PieSliceTest; -var - r: Word; -begin - StartTest('PieSlice'); - repeat - SetRandomColor; - r := random(GetMaxX div 3); - PieSlice(random(GetMaxX - 2 * r) + r, random(GetMaxY-(2 * Round(r * Corr) + 10)) + Round(r * Corr) + 10, 0, random(360), - Round(r * Corr)); - until KeyPressed; - Pause; -end; - -procedure Bar3DTest; -var - i, h, n: Word; -begin - StartTest('Bar3D'); - n := GetMaxX div 50; - for i := 0 to (n - 1) do begin - SetRandomColor; - h := random(GetMaxY-30); - Bar3D((GetMaxX div n) * i + 2, GetMaxY -15, (GetMaxX div n) * i + (GetMaxX div n - 12), GetMaxY - (15 + h), 10, TopOn); - OutTextXY((GetMaxX div n) * i + 2, GetMaxY -12, MyStr(h,4)); - end; - repeat - until KeyPressed; - Pause; -end; - -procedure PolyTest; -var - j : Word; - a : array[1..4] of PointType; -begin - StartTest('Poly'); - repeat - SetRandomColor; - for j := 1 to 4 do begin - a[j].x := random(GetMaxX); - a[j].y := random(GetMaxY - 10) + 10; - end; - DrawPoly(4, a); - until KeyPressed; - Pause; -end; - -procedure FillPolyTest; -var - j : Word; - a : array[1..4] of PointType; -begin - StartTest('FillPoly'); - repeat - SetRandomColor; - for j := 1 to 4 do begin - a[j].x := random(GetMaxX); - a[j].y := random(GetMaxY - 10) + 10; - end; - FillPoly(4, a); - until KeyPressed; - Pause; -end; - -procedure FloodFillTest; -var - x, y: Word; - r, p : Real; -begin - StartTest('LineTo/FloodFill'); - repeat - SetRandomColor; - p := 0; { Angle } - r := 10; { Radius } - x := GetMaxX div 2; - y := 10 + GetMaxY div 2 + 10; - MoveTo(x, y); - repeat - p := p + (Pi / 20); - r := r + 0.5; - x := Round(sin(p) * r ) + GetMaxX div 2; - y := Round(cos(p) * (r * Corr)) + GetMaxY div 2 + 10; - LineTo(x, y); - until ((r + 1) * Corr) > GetMaxY div 2 - 5; - Rectangle(0, 10, GetMaxX, GetMaxY); - FloodFill(GetMaxX div 2,GetMaxY div 2 + 10, GetColor); - until KeyPressed; - Pause; -end; - - -procedure ImageTest; -const - d = 8; -var - p1, p2 : ^Byte; - Size, - x, y, c, - i, j : Word; - -begin - StartTest('GetImage/PutImage'); - - { Draw a little ball } - SetFillStyle(SolidFill, White); - FillEllipse(30, 25, 15, 15); - for j := 0 to 20 do - for i := 0 to 20 do PutPixel(2 * j + 10, 2 * i + 10, 0); - - Size := ImageSize(10, 10, 50, 40); - GetMem(p1, Size); - GetMem(p2, Size); - GetImage(10, 10, 50, 40, p1^); - - { Clear the litte ball } - GetImage(110, 110, 150, 140, p2^); - PutImage(10, 10, p2^, NormalPut); - - for i := 1 to 50 do begin - SetRandomColor; - c := GetColor; - for j := 1 to 50 do begin - PutPixel(random(GetMaxX), random(GetMaxY - 10) + 10, c) - end; - end; - x := GetMaxX div 2; - y := GetMaxY div 2; - repeat - if x < d * 3 then - x := x + random(d) - else - if x > GetMaxX - d * 3 then - x := x - random(d) - else - x := x + d - random(d * 2 + 1); - - if y < d * 3 then - y := y + random(d) - else - if y > GetMaxY - d * 3 then - y := y - random(d) - else - y := y + d - random(d * 2 + 1); - - GetImage(x, y, x+40, y+30, p2^); - PutImage(x, y, p1^, OrPut); - for i := 1 to 50 do begin - SetRandomColor; - c := GetColor; - for j := 1 to 50 do begin - PutPixel(random(GetMaxX), random(GetMaxY - 10) + 10, c) - end; - end; - PutImage(x, y, p2^, NormalPut); - until KeyPressed; - Pause; - FreeMem(p1, Size); - FreeMem(p2, Size); -end; - -procedure TextTest; -var - FontName: array[0..10] of WrkString; - i, Pos : Word; -begin - StartTest('Text'); - repeat - SetRandomColor; - OutTextXY(random(GetMaxX - 100), random(GetMaxY - 10) + 10, 'OutTextXY DefaultFont'); - until KeyPressed; - Pause; - StartTest('Vector Fonts'); - repeat - SetRandomColor; - SetTextStyle(random(10)+1, random(2), random(20) + 6); - OutTextXY(random(GetMaxX - 100), random(GetMaxY - 10), 'Vector Fonts'); - until KeyPressed; - Pause; - StartTest('Font Names'); - FontName[ 0] := 'DefaultFont'; - FontName[ 1] := 'TriplexFont'; - FontName[ 2] := 'SmallFont'; - FontName[ 3] := 'SansSerifFont'; - FontName[ 4] := 'GothicFont'; - FontName[ 5] := 'ScriptFont'; - FontName[ 6] := 'SimplexFont'; - FontName[ 7] := 'TriplexScrFont'; - FontName[ 8] := 'ComplexFont'; - FontName[ 9] := 'EuropeanFont'; - FontName[10] := 'BoldFont'; - Pos := 0; - for i := 0 to 10 do begin - SetTextStyle(i, HorizDir, 0); - OutTextXY(10, Pos + 12, chr(i div 10 + 48) + chr(i mod 10 + 48) + ' ' + FontName[i]); - Inc(Pos, TextHeight('H') + 2); - end; - repeat - until KeyPressed; - Pause; - StartTest('Vertical Fonts'); - Pos := 0; - for i := 0 to 10 do begin - SetTextStyle(i, VertDir, 0); - OutTextXY(Pos + 10, 12, chr(i div 10 + 48) + chr(i mod 10 + 48) + ' ' + FontName[i]); - Inc(Pos, TextHeight('H') + 2); - end; - repeat - until KeyPressed; - Pause; - StartTest('SetTextJustify'); - for i := 1 to 10 do begin - SetTextJustify(CenterText, TopText); - if GetMaxX < 320 then - SetTextStyle(SmallFont, HorizDir, 5) - else - SetTextStyle(SmallFont, HorizDir, 7); - OutTextXY(GetMaxX div 2, GetMaxY div 2 - 60, 'That''s all friends'); - OutTextXY(GetMaxX div 2, GetMaxY div 2 - 20, 'Have a good time while using'); - OutTextXY(GetMaxX div 2, GetMaxY div 2 + 20, 'GPC and GRX !'); - SetTextStyle(DefaultFont, HorizDir, 0); - OutTextXY(GetMaxX div 2, GetMaxY div 2 + 80, 'Contact me: sven@rufus.central.de'); - end; - repeat - until KeyPressed; - Pause; - -end; - -var - m, grDriver, grMode, ErrCode: Integer; - ModeName: array[0..200] of WrkString; - -begin - { Try different drivers in Borland Pascal } - { No difference in GPC } - - grDriver := Detect; - { grDriver := CGA; } - { grDriver := MCGA; } - { grDriver := EGA; } - { grDriver := EGA64; } - { grDriver := EGAMono; } - { grDriver := VGA; } - { grDriver := InstallUserDriver('svga256', nil) } - - InitGraph(grDriver, grMode,'../../chr'); - ErrCode := GraphResult; - if ErrCode = GrOk then - begin { Do graphics } - m := GetMaxMode; - for grMode := 0 to m do - ModeName[grMode] := GetModeName(grMode); - grMode := -1; - CloseGraph; - while (grMode < 0) or (grMode > m) do begin - WriteLn; - for grMode := 0 to m do begin - if grMode mod 2 = 0 then WriteLn; - Write(' #',grMode:1, ' = "', ModeName[grMode],'"'); - end; - WriteLn; - Write('Modenumber (0..',m:1,') : '); - ReadLn(grMode); - end; - m := grMode; - InitGraph(grDriver, grMode,'../../chr'); - SetGraphMode(m); - ColorSetup; - BGIInfo(m); - LineTest; - RectangleTest; - BarTest; - CircleTest; - EllipseTest; - Ellipse2Test; - FillEllipseTest; - ArcTest; - Bar3DTest; - SectorTest; - PieSliceTest; - PolyTest; - FillPolyTest; - FloodFillTest; - ImageTest; - TextTest; - CloseGraph; - end - else begin - WriteLn ('Graphics error:', GraphErrorMsg(ErrCode)); - Write ('Press Enter ...'); - ReadLn - end; -end. diff --git a/thirdparty/grx249/pascal/bgi/graph.pas b/thirdparty/grx249/pascal/bgi/graph.pas deleted file mode 100644 index c0dc978..0000000 --- a/thirdparty/grx249/pascal/bgi/graph.pas +++ /dev/null @@ -1,659 +0,0 @@ -{ Graph - Interfacing BGI based graphics programs to LIBGRX - Copyright (C) 96 by Sven Hilscher - - This file is part of the GRX graphics library. - - The GRX graphics library is free software; you can redistribute it - and/or modify it under some conditions; see the "copying.grx" file - for details. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - Author: Sven Hilscher - e-mail: sven@rufus.lan-ks.de - - Version 1.0 12/96 - - 22/02/01 patches by Maurice Lombardi - Necessary to correct the drawpoly and fillpoly declarations. - - Maurice Lombardi, Frank Heckenbach : Some changes - to make this file compile with more recent versions of GPC. } - -{ Define this if you don't want this unit to declare a KeyPressed - and a ReadKey function. } -{.$define NO_GRAPH_KEY_FUNCTIONS} - -{ Define this if you want to use the Linux console version. - (Ignored on non-Linux systems.) } -{.$define LINUX_CONSOLE} - {and this if you use the svgalib (instead of only the framebuffer) driver} -{.$define SVGALIB} - -{ Define this if you want to use the SDL driver in mingw or x11} -{.$define __SDL__} - -{$gnu-pascal,I-} -{$ifdef __DJGPP__} - {$L grx20} -{$elif defined (__MINGW32__)} - {$ifdef __SDL__} - {$L grx20S, SDL} - {$else} - {$L grx20} - {$endif} -{$elif defined (_WIN32)} - {$L grxW32, vfs.c, user32, gdi32} -{$elif defined (linux) and defined (LINUX_CONSOLE)} - {$L grx20} - {$ifdef SVGALIB} - {$L vga} - {$endif} -{$else} - {$ifdef __SDL__} - {$L grx20S, SDL, pthread, X11} - {$else} - {$L grx20X, X11} - {$endif} -{$endif} - -{ Uncomment those of the following libraries that you need } -{.$L tiff} -{.$L jpeg} -{.$L png} -{.$L z} -{.$L socket} - -unit Graph; - -interface - -{$if __GPC_RELEASE__ >= 20030303} -{$define asmname external name} -{$define varasmname external name} -{$else} -{$define varasmname external; asmname} -{$endif} -{$if __GPC_RELEASE__ < 20040917} -type - CInteger = Integer; - CCardinal = Cardinal; -{$endif} - -type - PByte = ^Byte; - WrkString = String[255]; - -const - GrOk = 0; - GrNoInitGraph = -1; - GrNotDetected = -2; - GrFileNotFound = -3; - GrInvalidDriver = -4; - GrNoLoadMem = -5; - GrNoScanMem = -6; - GrNoFloodMem = -7; - GrFontNotFound = -8; - GrNoFontMem = -9; - GrInvalidMode = -10; - GrError = -11; - GrIOError = -12; - GrInvalidFont = -13; - GrInvalidFontNum = -14; - GrInvalidVersion = -18; - - Detect = 0; - Native_GRX = -3; - CurrentDriver = -128; - VGA = 9; - EGA = 3; - IBM8514 = 6; - HercMono = 7; - EGA64 = 4; - EGAMono = 5; - CGA = 1; - MCGA = 2; - ATT400 = 8; - PC3270 = 10; - - { driver definitions from BC++ 4.5: } - DetectX = Detect; - VGA256 = 11; - ATTDEB = 12; - Toshiba = 13; - SVGA16 = 14; - SVGA256 = 15; - SVGA32K = 16; - SVGA64K = 17; - VESA16 = 18; - VESA256 = 19; - VESA32K = 20; - VESA64K = 21; - VESA16M = 22; - ATI16 = 23; - ATI256 = 24; - ATI32K = 25; - Compaq = 26; - Tseng316 = 27; - Tseng3256 = 28; - Tseng416 = 29; - Tseng4256 = 30; - Tseng432K = 31; - Genoa5 = 32; - Genoa6 = 33; - OAK = 34; - Paradis16 = 35; - Paradis256 = 36; - Tecmar = 37; - Trident16 = 38; - Trident256 = 39; - Video7 = 40; - Video7ii = 41; - S3 = 42; - ATIGUP = 43; - - VGALo = 0; - VGAMed = 1; - VGAHi = 2; - IBM8514Lo = 0; - IBM8514Hi = 1; - HercMonoHi = 0; - CGAC0 = 0; - CGAC1 = 1; - CGAC2 = 2; - CGAC3 = 3; - CGAHi = 4; - MCGAC0 = CGAC0; - MCGAC1 = CGAC1; - MCGAC2 = CGAC2; - MCGAC3 = CGAC3; - MCGAMed = CGAHi; - MCGAHi = 5; - ATT400C0 = MCGAC0; - ATT400C1 = MCGAC1; - ATT400C2 = MCGAC2; - ATT400C3 = MCGAC3; - ATT400Med = MCGAMed; - ATT400Hi = MCGAHi; - EGA64Lo = 0; - EGA64Hi = 1; - EGALo = 0; - EGAHi = 1; - EGAMonoHi = 3; - PC3270Hi = 0; - - { mode definitions from BC++ 4.5: } - Res640x350 = 0; - Res640x480 = 1; - Res800x600 = 2; - Res1024x768 = 3; - Res1280x1024 = 4; - - { NATIVE_GRX modes: } - GRX_Default_Graphics = 0; - GRX_Biggest_Noninterlaced_Graphics = 1; - GRX_Biggest_Graphics = 2; - GRX_BGI_Emulation = 3; - First_Driver_Specific_Mode = 4; - - EGABlack = 0; - EGABlue = 1; - EGAGreen = 2; - EGACyan = 3; - EGARed = 4; - EGAMagenta = 5; - EGABrown = 20; - EGALightGray = 7; - EGADarkGray = 56; - EGALightBlue = 57; - EGALightGreen = 58; - EGALightCyan = 59; - EGALightRed = 60; - EGALightMagenta = 61; - EGAYellow = 62; - EGAWhite = 63; - - SolidLn = 0; - DottedLn = 1; - CenterLn = 2; - DashedLn = 3; - UserBitLn = 4; - - NormWidth = 1; - ThickWidth = 3; - - DefaultFont = 0; { 8x8 bit mapped font } - TriplexFont = 1; - SmallFont = 2; - SansSerifFont = 3; - GothicFont = 4; - ScriptFont = 5; - SimplexFont = 6; - TriplexScrFont = 7; - ComplexFont = 8; - EuropeanFont = 9; - BoldFont = 10; - - HorizDir = 0; { left to right } - VertDir = 1; { bottom to top } - - UserCharSize = 0; { user-defined char size } - - NormalPut = 0; { copy } - CopyPut = 0; { copy } - XORPut = 1; { xor } - OrPut = 2; { or } - AndPut = 3; { and } - NotPut = 4; { not } - - LeftText = 0; - CenterText = 1; - RightText = 2; - BottomText = 0; - TopText = 2; - - MaxColors = 15; - - { Clipping } - ClipOn = True; - ClipOff = False; - - { Bar3D } - TopOn = True; - TopOff = False; - - { FillStyles } - EmptyFill = 0; { fills area in background color } - SolidFill = 1; { fills area in solid fill color } - LineFill = 2; { --- fill } - LtSlashFill = 3; { /// fill } - SlashFill = 4; { /// fill with thick lines } - BkSlashFill = 5; { \\\ fill with thick lines } - LtBkSlashFill = 6; { \\\ fill } - HatchFill = 7; { light hatch fill } - XHatchFill = 8; { heavy cross hatch fill } - InterleaveFill = 9; { interleaving line fill } - WideDotFill = 10; { Widely spaced dot fill } - CloseDotFill = 11; { Closely spaced dot fill } - UserFill = 12; { user defined fill } - -type - PaletteType = record - Size : Byte; - Colors: array [0 .. MaxColors] of Byte - end; - - LineSettingsType = record - LineStyle: CInteger; - UPattern : ShortCard; - Thickness: CInteger - end; - - TextSettingsType = record - Font, - Direction, - CharSize, - Horiz, - Vert: CInteger - end; - - FillSettingsType = record - Pattern, - Color: CInteger - end; - - FillPatternType = array [1 .. 8] of Byte; - - { This definition is compatible with the grx - definition `int pts[][2]' used to define polygons } - PointType = record - x, y: CInteger - end; - - ViewPortType = record - x1, y1, x2, y2: CInteger; - Clip: WordBool - end; - - ArcCoordsType = record - x, y, - XStart, YStart, XEnd, YEnd: CInteger - end; - -var - GraphGetMemPtr : Pointer; { Dummy! } - GraphFreeMemPtr: Pointer; { Dummy! } - -{ BGI - API definitions } - -procedure DetectGraph(var GraphDriver, GraphMode: Integer); -procedure InitGraph(var GraphDriver, GraphMode: Integer; PathToDriver: CString); -procedure SetGraphMode(Mode: CInteger); asmname 'setgraphmode'; -function GetModeName(ModeNumber: CInteger): WrkString; -procedure GraphDefaults; asmname 'graphdefaults'; -function GetDriverName: WrkString; -function GraphErrorMsg(ErrorCode: CInteger): WrkString; -function GetMaxX: CInteger; asmname 'getmaxx'; -function GetMaxY: CInteger; asmname 'getmaxy'; -function GetMaxColor: CInteger; asmname 'getmaxcolor'; -procedure GetViewSettings(var ViewPort: ViewPortType); asmname 'getviewsettings'; -procedure SetViewPort(Left, Top, Right, Bottom: CInteger; Clip: Boolean); asmname 'setviewport'; -procedure GetLineSettings(var LineInfo: LineSettingsType); asmname 'getlinesettings'; -procedure SetLineStyle(LineStyle: CInteger; Pattern: CInteger; Thickness: CInteger); asmname 'setlinestyle'; -procedure ClearViewPort; asmname 'clearviewport'; -function GetPixel(x,y: CInteger): CInteger; asmname 'getpixel'; -procedure PutPixel(x, y: CInteger; Pixel: CInteger); asmname 'putpixel'; -procedure Bar3D(Left, Top, Right, Bottom: CInteger; Depth: CInteger; TopFlag: Boolean); asmname 'bar3d'; -procedure Rectangle(Left, Top, Right, Bottom: CInteger); asmname 'rectangle'; -procedure FillPoly(NumPoints: CCardinal; var PolyPoints { : array of PointType }); asmname 'fillpoly'; -procedure FillEllipse(x, y: CInteger; XRadius, YRadius: CInteger); asmname 'fillellipse'; -procedure GetArcCoords(var ArcCoords: ArcCoordsType); asmname 'getarccoords'; -procedure FloodFill(x, y: CInteger; Border: CInteger); asmname 'floodfill'; -procedure SetFillPattern(UPattern: FillPatternType; Color: CInteger); asmname 'setfillpattern'; -procedure SetFillStyle(Pattern: CInteger; Color: CInteger); asmname 'setfillstyle'; -procedure GetImage(Left, Top, Right, Bottom: CInteger; var BitMap); asmname 'getimage'; -procedure PutImage(Left, Top: CInteger; var BitMap; Op: CInteger); asmname 'putimage'; -function ImageSize(Left, Top, Right, Bottom: CInteger): CInteger; asmname 'imagesize'; -procedure GetTextSettings(var TextTypeInfo: TextSettingsType); asmname 'gettextsettings'; -procedure SetTextJustify(Horiz, Vert: CInteger); asmname 'settextjustify'; -procedure SetTextStyle(Font, Direction: CInteger; CharSize: CInteger); asmname 'settextstyle'; -procedure SetRGBPalette(Color, Red, Green, Blue: CInteger); asmname 'setrgbpalette'; -procedure SetUserCharSize(MultX, DivX, MultY, DivY: CInteger); asmname 'setusercharsize'; -procedure SetWriteMode(Mode: CInteger); asmname 'setwritemode'; -procedure OutText(TextString: CString); asmname 'outtext'; -procedure OutTextXY(x, y: CInteger; TextString: CString); asmname 'outtextxy'; -function TextHeight(TextString: CString): CInteger; asmname 'textheight'; -function TextWidth(TextString: CString): CInteger; asmname 'textwidth'; - -function RegisterBGIfont(Font: Pointer): CInteger; asmname 'registerbgifont'; -function InstallUserFont(FontName: CString): CInteger; asmname 'installuserfont'; - -function GetPaletteSize: CInteger; asmname 'getpalettesize'; -procedure GetPalette(var Palette: PaletteType); asmname 'getpalette'; -procedure SetPalette(ColorNum: CCardinal; Color: CInteger); asmname '__gr_setpalette'; -procedure SetAllPalette(protected var Palette: PaletteType); asmname 'setallpalette'; - -procedure RestoreCrtMode; asmname '__gr_restorecrtmode'; -procedure CloseGraph; asmname '__gr_closegraph'; -procedure SetColor(Color: CInteger); asmname '__gr_setcolor'; -procedure SetBkColor(Color: CInteger); asmname '__gr_setbkcolor'; -procedure Bar(Left, Top, Right, Bottom: CInteger); asmname '__gr_bar'; -function GraphResult:CInteger; asmname '__gr_graphresult'; -procedure Line(x1, y1, x2, y2: CInteger); asmname '__gr_line'; -procedure MoveTo(x, y: CInteger); asmname '__gr_moveto'; -procedure Arc(x, y: CInteger; StAngle, EndAngle, Radius: CCardinal); asmname '__gr_arc'; -procedure Circle(x, y: CInteger; Radius: CCardinal); asmname '__gr_circle'; -procedure ClearDevice; asmname '__gr_cleardevice'; -procedure DrawPoly(NumPoints: CCardinal; var PolyPoints { : array of PointType }); asmname '__gr_drawpoly'; -procedure Ellipse(x, y: CInteger; StAngle, EndAngle: CCardinal; XRadius, YRadius: CCardinal); asmname '__gr_ellipse'; -procedure GetAspectRatio(var XAsp, YAsp: Integer); -function GetBkColor: CCardinal; asmname '__gr_getbkcolor'; -function GetColor: CCardinal; asmname '__gr_getcolor'; -procedure GetFillPattern(var FillPattern: FillPatternType); asmname '__gr_getfillpattern'; -procedure GetFillSettings(var FillInfo: FillSettingsType); asmname '__gr_getfillsettings'; -function GetMaxMode: CInteger; asmname '__gr_getmaxmode'; -function GetGraphMode: CInteger; asmname '__gr_getgraphmode'; -function GetX: CInteger; asmname '__gr_getx'; -function GetY: CInteger; asmname '__gr_gety'; -function InstallUserDriver(const DriverName: String; AutoDetectPtr: Pointer):CInteger; -procedure LineRel(dx, dy: CInteger); asmname '__gr_linerel'; -procedure LineTo(x, y: CInteger); asmname '__gr_lineto'; -procedure MoveRel(dx, dy: CInteger); asmname '__gr_moverel'; -procedure PieSlice(x, y: CInteger; StAngle, EndAngle, Radius: CCardinal); asmname '__gr_pieslice'; -function RegisterBGIdriver(Driver: Pointer): CInteger; -procedure Sector(x, y: CInteger; StAngle,EndAngle, XRadius, YRadius: CCardinal); asmname '__gr_sector'; -procedure SetAspectRatio(XAsp, YAsp: CInteger); asmname '__gr_setaspectratio'; -procedure SetGraphBufSize(BufSize: CCardinal); asmname '__gr_setgraphbufsize'; -procedure SetActivePage(Page: CCardinal); asmname '__gr_setactivepage'; -procedure SetVisualPage(Page: CCardinal); asmname '__gr_setvisualpage'; -procedure GetDefaultPalette(var Palette: PaletteType); -procedure GetModeRange(GraphDriver:CInteger; var LoMode, HiMode:Integer); - -function Black : CInteger; -function Blue : CInteger; -function Green : CInteger; -function Cyan : CInteger; -function Red : CInteger; -function Magenta : CInteger; -function Brown : CInteger; -function LightGray : CInteger; -function DarkGray : CInteger; -function LightBlue : CInteger; -function LightGreen : CInteger; -function LightCyan : CInteger; -function LightRed : CInteger; -function LightMagenta: CInteger; -function Yellow : CInteger; -function White : CInteger; - -{ BGI - API extensions } - -{ Linkable font files } -var - Bold_Font: PByte; varasmname '_bold_font'; - Euro_Font: PByte; varasmname '_euro_font'; - Goth_Font: PByte; varasmname '_goth_font'; - Lcom_Font: PByte; varasmname '_lcom_font'; - Litt_Font: PByte; varasmname '_litt_font'; - Sans_Font: PByte; varasmname '_sans_font'; - Scri_Font: PByte; varasmname '_scri_font'; - Simp_Font: PByte; varasmname '_simp_font'; - Trip_Font: PByte; varasmname '_trip_font'; - Tscr_Font: PByte; varasmname '_tscr_font'; - - -{ Translates BGI driver/mode into a driver/mode pair for this unit - for usage with InitGraph / SetGraphMode } -procedure SetBGImode(var GDrv, GMode: CInteger); asmname 'set_BGI_mode'; - -{ Determines a driver/mode pair for InitGraph that will set - up a graphics mode with the desired resolution and colors } -procedure SetBGImodeWHC(var GDrv, GMode: CInteger; Width, Height, Colors: CInteger); asmname '__gr_set_BGI_mode_whc'; - -{ enable multiple graphics pages by - SetBGIModePages (2); - InitGraph (gd, gm, ''); - if (GraphResult = grOk) and (GetBGIModePages=2) then PlayWithPages; } -procedure SetBGIModePages(p: CInteger); asmname '__gr_set_BGI_mode_pages'; -function GetBGIModePages: CInteger; asmname '__gr_get_BGI_mode_pages'; - -{ like GetMaxColor, GetMaxX, GetMaxY but for any available mode } -function GetModeMaxColor(Mode: CInteger): CInteger; asmname '__gr_getmodemaxcolor'; -function GetModeMaxX(Mode: CInteger): CInteger; asmname '__gr_getmodemaxx'; -function GetModeMaxY(Mode: CInteger): CInteger; asmname '__gr_getmodemaxy'; - -{ Set the actual drawing color to r/g/b. - Functional in HiColor/TrueColor modes only } -procedure SetRGBColor(Red, Green, Blue: CCardinal); asmname '__gr_setrgbcolor'; - -{ Returns the actual RGB palette. } -procedure GetRGBPalette(Color: CInteger; var Red, Green, Blue: CInteger); asmname '__getrgbpalette'; - -{ Transforms the predefined 16 EGA colors (RED, BLUE, MAGENTA, ...) - into the correct color value for the active graphics mode } -function EGAColor(EGACol: CInteger): CInteger; asmname '_ega_color'; - -{ Enable/disable linestyle drawing of vector fonts. - Currently only functional with GRX v1.x } -procedure TextLineStyle(On: Boolean); asmname '__gr_textlinestyle'; - -{ Counterparts of SetActivePage/SetVisualPage } -function GetActivePage: CInteger; asmname '__gr_getactivepage'; -function GetVisualPage: CInteger; asmname '__gr_getvisualpage'; - -{$ifndef NO_GRAPH_KEY_FUNCTIONS} -function KeyPressed: Boolean; asmname 'kbhit'; -function ReadKey: Char; asmname 'getch'; -{$endif} - -{flush the graphics: useful only in X windows when switching - between graphics and console windows open simultaneously} -procedure GrFlush; asmname 'GrFlush'; - -implementation - -procedure dg(var GraphDriver, GraphMode: CInteger); asmname 'detectgraph'; -procedure DetectGraph(var GraphDriver, GraphMode: Integer); -var gd, gm: CInteger; -begin - gd := GraphDriver; - gm := GraphMode; - dg (gd, gm); - GraphDriver := gd; - GraphMode := gm -end; - -procedure ig(var gd, gm: CInteger; PathToDriver: CString); asmname 'initgraph'; -procedure InitGraph(var GraphDriver, GraphMode: Integer; PathToDriver: CString); -var gd, gm: CInteger; -begin - gd := GraphDriver; - gm := GraphMode; - ig (gd, gm, PathToDriver); - GraphDriver := gd; - GraphMode := gm -end; - -function gem(ec: CInteger): CString; asmname 'grapherrormsg'; -function GraphErrorMsg(ErrorCode: CInteger): WrkString; -begin - GraphErrorMsg := CString2String (gem (ErrorCode)) -end; - -function gmn(mn: CInteger): CString; asmname 'getmodename'; -function GetModeName(ModeNumber: CInteger): WrkString; -begin - GetModeName := CString2String (gmn (ModeNumber)) -end; - -function gdn: CString; asmname 'getdrivername'; -function GetDriverName: WrkString; -begin - GetDriverName := CString2String (gdn) -end; - -procedure gar(var XAsp, YAsp: CInteger); asmname '__gr_getaspectratio'; -procedure GetAspectRatio(var XAsp, YAsp: Integer); -var xa, ya: CInteger; -begin - gar (xa, ya); - XAsp := xa; - YAsp := ya -end; - -type pPT = ^PaletteType; -function gdp: pPT; asmname '__gr_getdefaultpalette'; -procedure GetDefaultPalette(var Palette: PaletteType); -begin - Palette := gdp^ -end; - -procedure gmr(GraphDriver:CInteger; var LoMode, HiMode:CInteger); asmname '__gr_getmoderange'; -procedure GetModeRange(GraphDriver:CInteger; var LoMode, HiMode:Integer); -var lm, hm: CInteger; -begin - gmr (GraphDriver, lm, hm); - LoMode := lm; - HiMode := hm -end; - -function InstallUserDriver(const DriverName: String; AutoDetectPtr: Pointer):CInteger; -var - Dummy1: Integer; - Dummy2: Pointer; -begin - Dummy1 := Length (DriverName); - Dummy2 := AutoDetectPtr; - InstallUserDriver := GrError -end; - -function RegisterBGIdriver(Driver: Pointer): CInteger; -var Dummy: Pointer; -begin - Dummy := Driver; - RegisterBGIdriver := GrError -end; - -function Black: CInteger; -begin - Black := EGAColor (0) -end; - -function Blue: CInteger; -begin - Blue := EGAColor (1) -end; - -function Green: CInteger; -begin - Green := EGAColor (2) -end; - -function Cyan: CInteger; -begin - Cyan := EGAColor (3) -end; - -function Red: CInteger; -begin - Red := EGAColor (4) -end; - -function Magenta: CInteger; -begin - Magenta := EGAColor (5) -end; - -function Brown: CInteger; -begin - Brown := EGAColor (6) -end; - -function LightGray: CInteger; -begin - LightGray := EGAColor (7) -end; - -function DarkGray: CInteger; -begin - DarkGray := EGAColor (8) -end; - -function LightBlue: CInteger; -begin - LightBlue := EGAColor (9) -end; - -function LightGreen: CInteger; -begin - LightGreen := EGAColor (10) -end; - -function LightCyan: CInteger; -begin - LightCyan := EGAColor (11) -end; - -function LightRed: CInteger; -begin - LightRed := EGAColor (12) -end; - -function LightMagenta: CInteger; -begin - LightMagenta := EGAColor (13) -end; - -function Yellow: CInteger; -begin - Yellow := EGAColor (14) -end; - -function White: CInteger; -begin - White := EGAColor (15) -end; - -end. diff --git a/thirdparty/grx249/pascal/bgi/makefile.dj2 b/thirdparty/grx249/pascal/bgi/makefile.dj2 deleted file mode 100644 index fc50a21..0000000 --- a/thirdparty/grx249/pascal/bgi/makefile.dj2 +++ /dev/null @@ -1,49 +0,0 @@ -# -# GRX test programs makefile for DJGPP v2. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean - -GRXVDJ2=y - -include ../../makedefs.grx - -# The following line is useful only in this makefile to force recompilation -GRXLIB = ../../lib/$(GRX_LIB_SUBDIR)/libgrx20.a -# In normal use the library libgrx20.a is linked in through -# {$L grx20} contained in the unit graph.pas called by "uses graph". -# The same is valid for other ADDON libraries. -# If the library is NOT installed give its path -# (default when first compiling/testing the library) -GRXLIBPATH = -L../../lib/$(GRX_LIB_SUBDIR) -# When it is installed in a standard system location -# (normal use) this is no more necessary - -LIBS= $(GRXLIBPATH) - -# Compiler and options on your system -COMPILER = $(PC) --automake - -PROGS= \ - allmodes.exe \ - modelist.exe \ - colors.exe \ - demo.exe \ - small.exe \ - palette.exe - -all: $(PROGS) - -$(PROGS): %.exe : %.pas $(GRXLIB) graph.pas - $(COMPILER) $(CCOPT) -o $*.exe $*.pas $(LDOPT) $(LIBS) - -clean: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f *.o *.exe *.gpi *.gpm -else - if exist *.o del *.o - if exist *.exe del *.exe - if exist *.gpi del *.gpi - if exist *.gpm del *.gpm -endif diff --git a/thirdparty/grx249/pascal/bgi/makefile.lnx b/thirdparty/grx249/pascal/bgi/makefile.lnx deleted file mode 100644 index c5e2a0b..0000000 --- a/thirdparty/grx249/pascal/bgi/makefile.lnx +++ /dev/null @@ -1,50 +0,0 @@ -# -# GRX test programs makefile for LINUX/console. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean - -GRXVLNX=y - -include ../../makedefs.grx - -# The following line is useful only in this makefile to force recompilation -GRXLIB = ../../lib/$(GRX_LIB_SUBDIR)/libgrx20.a -# In normal use the library libgrx20.a or libgrx20.so is linked in through -# {$L grx20} contained in the unit graph.pas called by "uses graph". -# The same is valid for other ADDON libraries. -# If the library is NOT installed give its path -# (default when first compiling/testing the library) -GRXLIBPATH = -L../../lib/$(GRX_LIB_SUBDIR) -# When it is installed in a standard system location -# (normal use) this is no more necessary - -ifeq ($(SET_SUIDROOT),y) -EXECBITS = 4755 -else -EXECBITS = 0755 -endif - -LIBS= $(GRXLIBPATH) - -# Compiler and options on your system -COMPILER = $(PC) --automake - -PROGS= \ - allmodes \ - modelist \ - colors \ - demo \ - small \ - palette - -all: $(PROGS) - -$(PROGS): % : %.pas $(GRXLIB) graph.pas - $(COMPILER) $(CCOPT) -o $* $*.pas $(LIBS) - chmod $(EXECBITS) $@ - -clean: - rm -f *.o *.gpi *.gpm $(PROGS) - diff --git a/thirdparty/grx249/pascal/bgi/makefile.sdl b/thirdparty/grx249/pascal/bgi/makefile.sdl deleted file mode 100644 index 5e3e82e..0000000 --- a/thirdparty/grx249/pascal/bgi/makefile.sdl +++ /dev/null @@ -1,47 +0,0 @@ -# -# GRX test programs makefile for SDL. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean - -GRXVSDL=y - -include ../../makedefs.grx - -# The following line is useful only in this makefile to force recompilation -GRXLIB = ../../lib/$(GRX_LIB_SUBDIR)/libgrx20S.a -# In normal use the library libgrx20S.a is linked in through -# {$L grx20S} contained in the unit graph.pas called by "uses graph". -# The same is valid for other ADDON libraries. -# If the library is NOT installed give its path -# (default when first compiling/testing the library) -GRXLIBPATH = -L../../lib/$(GRX_LIB_SUBDIR) -# When it is installed in a standard system location -# (normal use) this is no more necessary - -ifneq ($(EP),x) - EX = .exe -endif - -LIBS = $(GRXLIBPATH) - -# Compiler and options on your system -COMPILER = $(PC) --autobuild - - -PROGS= \ - $(EP)allmodes$(EX) \ - $(EP)modelist$(EX) \ - $(EP)colors$(EX) \ - $(EP)demo$(EX) \ - $(EP)small$(EX) \ - $(EP)palette$(EX) - -all: $(PROGS) - -$(PROGS): $(EP)%$(EX) : %.pas $(GRXLIB) graph.pas - $(COMPILER) $(CCOPT) -o $@ $*.pas $(LDOPT) $(LIBS) - -clean: - rm -f *.o *.gpi *.gpm $(PROGS) diff --git a/thirdparty/grx249/pascal/bgi/makefile.w32 b/thirdparty/grx249/pascal/bgi/makefile.w32 deleted file mode 100644 index ba65d9c..0000000 --- a/thirdparty/grx249/pascal/bgi/makefile.w32 +++ /dev/null @@ -1,50 +0,0 @@ -# -# GRX test programs makefile for Mingw. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean - -GRXVW32=y - -include ../../makedefs.grx - -# The following line is useful only in this makefile to force recompilation -GRXLIB = ../../lib/$(GRX_LIB_SUBDIR)/libgrx20.a -# In normal use the library libgrx20.a is linked in through -# {$L grx20} contained in the unit graph.pas called by "uses graph". -# The same is valid for other ADDON libraries. -# If the library is NOT installed give its path -# (default when first compiling/testing the library) -GRXLIBPATH = -L../../lib/$(GRX_LIB_SUBDIR) -# When it is installed in a standard system location -# (normal use) this is no more necessary - -LIBS= $(GRXLIBPATH) -mwindows -mconsole - -# Compiler and options on your system -COMPILER = $(PC) --autobuild - - -PROGS= \ - allmodes.exe \ - modelist.exe \ - colors.exe \ - demo.exe \ - small.exe \ - palette.exe - -all: $(PROGS) - -$(PROGS): %.exe : %.pas $(GRXLIB) graph.pas - $(COMPILER) $(CCOPT) -o $*.exe $*.pas $(LDOPT) $(LIBS) - -clean: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f *.o *.exe *.gpi *.gpm -else - if exist *.o del *.o - if exist *.exe del *.exe - if exist *.gpi del *.gpi - if exist *.gpm del *.gpm -endif diff --git a/thirdparty/grx249/pascal/bgi/makefile.x11 b/thirdparty/grx249/pascal/bgi/makefile.x11 deleted file mode 100644 index 745bc45..0000000 --- a/thirdparty/grx249/pascal/bgi/makefile.x11 +++ /dev/null @@ -1,57 +0,0 @@ -# -# GRX test programs makefile for LINUX/X11. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean - -GRXVX11=y - -include ../../makedefs.grx - -# The following line is useful only in this makefile to force recompilation -GRXLIB = ../../lib/$(GRX_LIB_SUBDIR)/libgrx20X.a -# In normal use the library libgrx20X.a or libgrx20X.so is linked in through -# {$L grx20X} contained in the unit graph.pas called by "uses graph". -# The same is valid for other ADDON libraries. -# If the library is NOT installed give its path -# (default when first compiling/testing the library) -GRXLIBPATH = -L../../lib/$(GRX_LIB_SUBDIR) -# When it is installed in a standard system location -# (normal use) this is no more necessary - -ifeq ($(SET_XSUIDROOT),y) -EXECBITS = 4755 -else -EXECBITS = 0755 -endif - -ADDON_LIBS= - -ifeq ($(USE_XF86DGA_DRIVER),y) - ADDON_LIBS += -lXxf86dga -lXext #NOT included in graph.pas -endif - -LIBS= $(GRXLIBPATH) $(ADDON_LIBS) - -# Compiler and options on your system -COMPILER = $(PC) --automake - -PROGS= \ - xallmodes \ - xmodelist \ - xcolors \ - xdemo \ - xsmall \ - xpalette - -all: $(PROGS) - -$(PROGS): x% : %.pas $(GRXLIB) graph.pas - $(COMPILER) $(CCOPT) -o $@ $*.pas $(LIBS) - chmod $(EXECBITS) $@ - -clean: - rm -f *.o *.gpi *.gpm $(PROGS) - - diff --git a/thirdparty/grx249/pascal/bgi/modelist.pas b/thirdparty/grx249/pascal/bgi/modelist.pas deleted file mode 100644 index c165de1..0000000 --- a/thirdparty/grx249/pascal/bgi/modelist.pas +++ /dev/null @@ -1,47 +0,0 @@ -program ModeList; -{ - * test and demo program for the Graph unit - * - * Please read the copyright notices of graph.pas - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Author : Sven Hilscher - * e-mail : sven@rufus.central.de -} - -uses Graph; - -var - i, - grDriver, - grMode, - ErrCode: Integer; - -begin - { InitGraph is not needed for GetMaxMode and GetModeName in GPC } - grDriver := Detect; - {grDriver := InstallUserDriver('SVGA256', nil);} { Not used in GPC } - InitGraph(grDriver, grMode,'../../chr'); - ErrCode := GraphResult; - if ErrCode = GrOk then - begin { Do graphics } - (*$ifdef __GPC__ *) - CloseGraph; - (*$endif*) - for i := 0 to GetMaxMode do begin - WriteLn(i:4, ' ' + GetModeName(i)) - end; - ReadLn; - (*$ifndef __GPC__ *) - CloseGraph - (*$endif*) - end - else begin - WriteLn('Graphics error:', GraphErrorMsg(ErrCode)); - Write ('Press Enter ...'); - ReadLn - end -end. diff --git a/thirdparty/grx249/pascal/bgi/palette.pas b/thirdparty/grx249/pascal/bgi/palette.pas deleted file mode 100644 index 305ca09..0000000 --- a/thirdparty/grx249/pascal/bgi/palette.pas +++ /dev/null @@ -1,35 +0,0 @@ -program Test_GetDefaultPalette; -{ - * test program for the Graph unit -} - -uses Graph; - -var - i, - grDriver, - grMode, - ErrCode: Integer; - pal : PaletteType; -begin - { InitGraph is not needed for GetMaxMode and GetModeName in GPC } - { grDriver := Detect; } - grDriver := InstallUserDriver('SVGA256', nil); { Not used in GPC } - InitGraph(grDriver, grMode,'../../chr'); - ErrCode := GraphResult; - if ErrCode = GrOk then - begin { Do graphics } - GetDefaultPalette(pal); - CloseGraph; - i := pal.Size; - WriteLn('Palette size: ', i); - for i := 0 to pal.Size-1 do - WriteLn('Color ', i:3, ' : ', pal.Colors[i]); - ReadLn; - end - else begin - WriteLn('Graphics error:', GraphErrorMsg(ErrCode)); - Write ('Press Enter ...'); - ReadLn - end -end. diff --git a/thirdparty/grx249/pascal/bgi/readme b/thirdparty/grx249/pascal/bgi/readme deleted file mode 100644 index 5fcf9e3..0000000 --- a/thirdparty/grx249/pascal/bgi/readme +++ /dev/null @@ -1,49 +0,0 @@ - - BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - Copyright (C) 1993-97 by Hartmut Schirmer - - This library is now part of the GRX graphics library. - - Contact : Hartmut Schirmer - Feldstrasse 118 - D-24105 Kiel - Germany - e-mail : hsc@techfak.uni-kiel.de - - -Pascal (GPC) demo Programs - -graph.pas is the unit import file, as far as possible a plug-in -replacement for the BP unit of the same name -(see doc/readme.bgi for differences) - -* small.pas opens and closes the graphics to check for improper installation. -* modelist.pas prints out the available modes. -* palette.pas prints out the colors in the default palette. -* allmodes.pas for each available mode prints out mode number and its parameters - and displays one color rainbow. -* colors.pas for each avalaible mode with nc>=256 prints out mode name - and displays red, green, blue gray degraded stripes. -* demo.pas displays various demos to illustrate graphics possibilities. - It supposes for some of them that borland .chr files have been put in - the chr directory (otherwise it uses the always available default font). - -Makefiles are supplied to build up the demo programs for -djgpp, mingw32, LINUX/svga and LINUX/X11. -They should have been built with the library and C tests if you -used the top level makefiles. -If you want to rebuild only the demos type from this dir - make -f -Pathes and parameters will be borrowed from corresponding top level -makedefs files - -Have fun! - - - - - - - - - diff --git a/thirdparty/grx249/pascal/bgi/small.pas b/thirdparty/grx249/pascal/bgi/small.pas deleted file mode 100644 index df2a33b..0000000 --- a/thirdparty/grx249/pascal/bgi/small.pas +++ /dev/null @@ -1,15 +0,0 @@ -program Minimum_Size_Test; -{ - * test program for the Graph unit -} - -uses - Graph; - -var - grDriver, grMode: Integer; -begin - grDriver := Detect; - InitGraph(grDriver, grMode,''); - CloseGraph -end. diff --git a/thirdparty/grx249/pascal/blt_test.pas b/thirdparty/grx249/pascal/blt_test.pas deleted file mode 100644 index 1685e5a..0000000 --- a/thirdparty/grx249/pascal/blt_test.pas +++ /dev/null @@ -1,59 +0,0 @@ -{$X+} - -Program Blt_Test; - -uses GRX; - -procedure TestFunc; -var - x, y, ww, wh, ii, jj, c : Integer; - -begin - x := GrSizeX; - y := GrSizeY; - ww := round((x-10)/32); - wh := round((y-10)/8); - - GrSetRGBcolorMode; - for ii := 0 to 7 do - for jj := 0 to 31 do begin - c := ii*32+jj; - {gives the same color independently of BPP: not all drivers have good BPP=8} - c := GrAllocColor(c and 2#11100000,(c and 2#11100) shl 3, (c and 2#11) shl 6); - GrFilledBox(5+jj*ww,5+ii*wh,5+jj*ww+ww-1,5+ii*wh+wh-1,c); - end; -end; { TestFunc } - -var - x, y, xv, yv, BPP, - m : Integer; - -begin - x := 1000; - y := 1000; - xv := 1280; - yv := 1024; - BPP:= 24; - -(* m := GrSetMode(Gr_Width_Height_BPP_Graphics,x,y,bpp,0,0); *) - m := GrSetMode(Gr_Custom_BPP_Graphics,x,y,BPP,xv,yv); - - TestFunc; - GrCircle(400,400,200,GrWhite); - GrCircle(400,400,205,GrWhite); - GrLineNC(0, 0, GrScreenX-1, GrScreenY-1, GrWhite); - GrLineNC(0, GrScreenY-1, GrScreenX-1, 0, GrWhite); - GrKeyRead; - GrTextXY(0,0,'GrScreenContext',GrWhite,GrBlack); - GrBitBltNC(GrScreenContext, 200, 200, GrScreenContext, 0, 0, 200, 200, GrWrite); - GrKeyRead; - GrBitBltNC(GrScreenContext, 300, 300, GrScreenContext, 0, 0, 200, 200, GrOr); - GrKeyRead; - GrBitBltNC(GrScreenContext, 400, 400, GrScreenContext, 0, 0, 200, 200, GrAnd); - GrKeyRead; - GrBitBltNC(GrScreenContext, 500, 500, GrScreenContext, 0, 0, 200, 200, GrXor); - GrKeyRead; - GrBitBltNC(GrScreenContext, 600, 600, GrScreenContext, 0, 0, 200, 200, GrImage); - GrKeyRead; -end. - diff --git a/thirdparty/grx249/pascal/colortst.pas b/thirdparty/grx249/pascal/colortst.pas deleted file mode 100644 index 77b4bbc..0000000 --- a/thirdparty/grx249/pascal/colortst.pas +++ /dev/null @@ -1,47 +0,0 @@ -{ GRX color allocation test. - - Copyright (C) 2001 Frank Heckenbach - - This file is free software; as a special exception the author - gives unlimited permission to copy and/or distribute it, with or - without modifications, as long as this notice is preserved. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY, to the extent permitted by law; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. } - -{$X+} - -program ColorTest; - -uses GRX; - -var - Dummy, i, x, y, j: Integer = 0; - Color: array [0 .. 1023] of Integer; - s : string[255]; - -begin - Dummy := GrSetMode (Gr_Width_Height_BPP_Graphics, 800, 300, 16, 0, 0); - for x := 0 to 1023 do - begin - { GrAllocCell; GrSetColor (x, x, x, x); } - if x < 256 then - Color[x] := GrAllocColor (x, x, x) - else if x < 512 then - Color[x] := GrAllocColor (x - 256, 0, 0) - else if x < 768 then - Color[x] := GrAllocColor (0, x - 512, 0) - else - Color[x] := GrAllocColor (0, 0, x - 768); - Inc (j); - if Color[x] <= $100000 then Inc (i) - end; - WriteStr (s, i, ' of ', j, ' colors allocated.'); - for y := 0 to 299 do - for x := 0 to 799 do - GrPlot (x, y, Color[(x + y) mod 1024]); - GrTextXY(300, 10, s, GrWhite, GrNoColor); - i := GrKeyRead -end. diff --git a/thirdparty/grx249/pascal/grx.pas b/thirdparty/grx249/pascal/grx.pas deleted file mode 100644 index 31a159f..0000000 --- a/thirdparty/grx249/pascal/grx.pas +++ /dev/null @@ -1,1485 +0,0 @@ -{ Converted by Sven Hilscher eMail sven@rufus.lan-ks.de - from header file grx20.h - - grx20.h ---- GRX 2.x API functions and data structure declarations - - Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - [e-mail: csaba@vuse.vanderbilt.edu] - - This file is part of the GRX graphics library. - - The GRX graphics library is free software; you can redistribute it - and/or modify it under some conditions; see the "copying.grx" file - for details. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. } - -{ Define this if you want to use the Linux console version. - (Ignored on non-Linux systems.) } -{.$define LINUX_CONSOLE} - {and this if you use the svgalib (instead of only the framebuffer) driver} -{.$define SVGALIB} - -{ Define this if you want to use the SDL driver in mingw or x11} -{.$define __SDL__} - -{$gnu-pascal,I-} -{$ifdef __DJGPP__} - {$L grx20} -{$elif defined (__MINGW32__)} - {$ifdef __SDL__} - {$L grx20S, SDL} - {$else} - {$L grx20} - {$endif} -{$elif defined (_WIN32)} - {$L grxW32, vfs.c, user32, gdi32} -{$elif defined (linux) and defined (LINUX_CONSOLE)} - {$L grx20} - {$ifdef SVGALIB} - {$L vga} - {$endif} -{$else} - {$ifdef __SDL__} - {$L grx20S, SDL, pthread, X11} - {$else} - {$L grx20X, X11} - {$endif} -{$endif} - -{ Uncomment those of the following libraries that you need } -{.$L tiff} -{.$L jpeg} -{.$L png} -{.$L z} -{.$L socket} - -unit GRX; - -interface - -{$if __GPC_RELEASE__ >= 20030303} -{$define asmname external name} -{$define varasmname external name} -{$else} -{$define varasmname external; asmname} -{$endif} -{$if __GPC_RELEASE__ < 20040917} -type - CInteger = Integer; - CCardinal = Cardinal; -{$endif} - -const - MaxVarSize = MaxInt div 8; - -type - MemPtr = ^Char; -{$if __GPC_RELEASE__ >= 20030424} - GrColor = Integer attribute (Size = 32); { color and operation type, must be 32bit } -{$else} - GrColor = Integer (32); { color and operation type, must be 32bit } -{$endif} - GrColorPtr = ^GrColor; - GrColors = array [0 .. MaxVarSize div SizeOf (GrColor) - 1] of GrColor; - GrColorsPtr = ^GrColors; - - { This definition is compatible with the grx - definition 'int pts[][2]' used to define polygons } - PointType = record - x, y: CInteger - end; - -const - { these are the supported configurations: } - GRX_Version_TCC_8086_DOS = 1; { also works with BCC } - GRX_Version_GCC_386_GO32 = 2; { DJGPP } - GRX_Version_GCC_386_Linux = 3; { the real stuff } - GRX_Version_Generic_X11 = 4; { generic X11 version } - GRX_Version_Watcom_DOS4GW = 5; { Watcom C++ 11.0 32 Bit } - GRX_VERSION_GCC_386_WIN32 = 7; { WIN32 using Mingw32 } - GRX_VERSION_MSC_386_WIN32 = 8; { WIN32 using MS-VC } - GRX_VERSION_GCC_386_CYG32 = 9; { WIN32 using CYGWIN } - GRX_VERSION_GCC_386_X11 = 10; { X11 version } - GRX_VERSION_GCC_X86_64_LINUX = 11; { console framebuffer 64 } - GRX_VERSION_GCC_X86_64_X11 = 12; { X11 version 64 } - - { available video modes (for 'GrSetMode') } - - Gr_Unknown_Mode = -1; { initial state } - { ============= modes which clear the video memory ============= } - Gr_80_25_Text = 0; { Extra parameters for GrSetMode: } - Gr_Default_Text = 1; - Gr_Width_Height_Text = 2; { Integer w,Integer h } - Gr_Biggest_Text = 3; - Gr_320_200_Graphics = 4; - Gr_Default_Graphics = 5; - Gr_Width_Height_Graphics = 6; { Integer w,Integer h } - Gr_Biggest_Noninterlaced_Graphics = 7; - Gr_Biggest_Graphics = 8; - Gr_Width_Height_Color_Graphics = 9; { Integer w,Integer h,Cardinal nc } - Gr_Width_Height_Color_Text = 10; { Integer w,Integer h,Cardinal nc } - Gr_Custom_Graphics = 11; { Integer w,Integer h,Cardinal nc,Integer vx,Integer vy } - { ==== equivalent modes which do not clear the video memory ==== } - Gr_NC_80_25_Text = 12; - Gr_NC_Default_Text = 13; - Gr_NC_Width_Height_Text = 14; { Integer w,Integer h } - Gr_NC_Biggest_Text = 15; - Gr_NC_320_200_Graphics = 16; - Gr_NC_Default_Graphics = 17; - Gr_NC_Width_Height_Graphics = 18; { Integer w,Integer h } - Gr_NC_Biggest_Noninterlaced_Graphics = 19; - Gr_NC_Biggest_Graphics = 20; - Gr_NC_Width_Height_Color_Graphics = 21; { Integer w,Integer h,Cardinal nc } - Gr_NC_Width_Height_Color_Text = 22; { Integer w,Integer h,Cardinal nc } - Gr_NC_Custom_Graphics = 23; { Integer w,Integer h,Cardinal nc,Integer vx,Integer vy } - { ==== plane instead of color based modes ==== } - { colors = 1 << bpp >>> resort enum for GRX3 <<< } - Gr_Width_Height_BPP_Graphics = 24; { Integer w,Integer h,Integer bpp } - Gr_Width_Height_BPP_Text = 25; { Integer w,Integer h,Integer bpp } - Gr_Custom_BPP_Graphics = 26; { Integer w,Integer h,Integer bpp,Integer vx,Integer vy } - Gr_NC_Width_Height_BPP_Graphics = 27; { Integer w,Integer h,Integer bpp } - Gr_NC_Width_Height_BPP_Text = 28; { Integer w,Integer h,Integer bpp } - Gr_NC_Custom_BPP_Graphics = 29; { Integer w,Integer h,Integer bpp,Integer vx,Integer vy } - - { Available frame modes (video memory layouts) } - - { ====== video frame buffer modes ====== } - Gr_FrameUndef = 0; { undefined } - Gr_FrameText = 1; { text modes } - Gr_FrameHerc1 = 2; { Hercules mono } - Gr_FrameEGAVGA1 = 3; { EGA VGA mono } - Gr_FrameEGA4 = 4; { EGA 16 color } - Gr_FrameSVGA4 = 5; { (Super) VGA 16 color } - Gr_FrameSVGA8 = 6; { (Super) VGA 256 color } - Gr_FrameVGA8X = 7; { VGA 256 color mode X } - Gr_FrameSVGA16 = 8; { Super VGA 32768/65536 color } - Gr_FrameSVGA24 = 9; { Super VGA 16M color } - Gr_FrameSVGA32L = 10; { Super VGA 16M color padded #1 } - Gr_FrameSVGA32H = 11; { Super VGA 16M color padded #2 } - { ==== modes provided by the X11 driver ===== } - Gr_FrameXWin1 = Gr_FrameEGAVGA1; - Gr_FrameXWin4 = Gr_FrameSVGA4; - Gr_FrameXWin8 = Gr_FrameSVGA8; - Gr_FrameXWin16 = Gr_FrameSVGA16; - Gr_FrameXWin24 = Gr_FrameSVGA24; - Gr_FrameXWin32L = Gr_FrameSVGA32L; - Gr_FrameXWin32H = Gr_FrameSVGA32H; - { ==== modes provided by the WIN32 driver ===== } - Gr_FrameWIN32_1 = Gr_FrameEGAVGA1; - Gr_FrameWIN32_4 = Gr_FrameSVGA4; - Gr_FrameWIN32_8 = Gr_FrameSVGA8; - Gr_FrameWIN32_16 = Gr_FrameSVGA16; - Gr_FrameWIN32_24 = Gr_FrameSVGA24; - Gr_FrameWIN32_32L = Gr_FrameSVGA32L; - Gr_FrameWIN32_32H = Gr_FrameSVGA32H; - { ==== modes provided by the SDL driver ===== } - Gr_FrameSDL8 = Gr_FrameSVGA8; - Gr_FrameSDL16 = Gr_FrameSVGA16; - Gr_FrameSDL24 = Gr_FrameSVGA24; - Gr_FrameSDL32L = Gr_FrameSVGA32L; - Gr_FrameSDL32H = Gr_FrameSVGA32H; - { ==== linear frame buffer modes ====== } - Gr_FrameSVGA8_LFB = 12; { (Super) VGA 256 color } - Gr_FrameSVGA16_LFB = 13; { Super VGA 32768/65536 color } - Gr_FrameSVGA24_LFB = 14; { Super VGA 16M color } - Gr_FrameSVGA32L_LFB = 15; { Super VGA 16M color padded #1 } - Gr_FrameSVGA32H_LFB = 16; { Super VGA 16M color padded #2 } - { ====== system RAM frame buffer modes ====== } - Gr_FrameRAM1 = 17; { mono } - Gr_FrameRAM4 = 18; { 16 color planar } - Gr_FrameRAM8 = 19; { 256 color } - Gr_FrameRAM16 = 20; { 32768/65536 color } - Gr_FrameRAM24 = 21; { 16M color } - Gr_FrameRAM32L = 22; { 16M color padded #1 } - Gr_FrameRAM32H = 23; { 16M color padded #2 } - Gr_FrameRAM3x8 = 24; { 16M color planar (image mode) } - { ====== markers for scanning modes ====== } - Gr_FirstTextFrameMode = Gr_FrameText; - Gr_LastTextFrameMode = Gr_FrameText; - Gr_FirstGraphicsFrameMode = Gr_FrameHerc1; - Gr_LastGraphicsFrameMode = Gr_FrameSVGA32H_LFB; - Gr_FirstRAMframeMode = Gr_FrameRAM1; - Gr_LastRAMframeMode = Gr_FrameRAM3x8; - - { supported video adapter types } - - Gr_Unknown = -1; { not known (before driver set) } - Gr_VGA = 0; { VGA adapter } - Gr_EGA = 1; { EGA adapter } - Gr_Herc = 2; { Hercules mono adapter } - Gr_8514A = 3; { 8514A or compatible } - Gr_S3 = 4; { S3 graphics accelerator } - Gr_XWin = 5; { X11 driver } - Gr_WIN32 = 6; { WIN32 driver } - Gr_LNXFB = 7; { Linux framebuffer } - Gr_SDL = 8; { SDL driver } - Gr_Mem = 9; { memory only driver } - - Gr_Max_Polygon_Pointers = 1000000; - Gr_Max_Ellipse_Pointers = 1024 + 5; - Gr_Max_Angle_Value = 3600; - Gr_Arc_Style_Open = 0; - Gr_Arc_Style_Close1 = 1; - Gr_Arc_Style_Close2 = 2; - - { bits in the GrVideoDriver.drvflags field: } - Gr_DriverF_User_Resolution = 1; { set if driver supports user setable arbitrary resolution } - -type - - GrVideoModePtr = ^GrVideoMode; - - { The video driver descriptor structure } - { struct _GR_videoDriver } - GrVideoDriverPtr = ^GrVideoDriver; - GrVideoDriver = record - Name : CString; { driver name } - Adapter : CInteger; { adapter type } - Inherit : GrVideoDriverPtr; { inherit video modes from this } - Modes : GrVideoModePtr; { table of supported modes } - NModes : CInteger; { number of modes } - Detect : function: CInteger; - Init : function (Options: CString): CInteger; - Reset : procedure; - SelectMode: function (Drv: GrVideoDriverPtr; w, h, BPP, txt: CInteger; var ep: CCardinal): GrVideoModePtr; - DrvFlags : CCardinal - end; - - { Video driver mode descriptor structure } - { struct _GR_videoMode } - GrVideoMode = record - Present: ByteBool; { is it really available? } - BPP: Byte; { log2 of # of colors } - Width, Height, { video mode geometry } - Mode: ShortInt; { BIOS mode number (if any) } - LineOffset, { scan line length } - PrivData: CInteger; { driver can use it for anything } - ExtInfo: ^GrVideoModeExt { extra info (maybe shared) } - end; - - { Video driver mode descriptor extension structure. This is a separate - structure accessed via a pointer from the main mode descriptor. The - reason for this is that frequently several modes can share the same - extended info. } - - { struct _GR_videoModeExt } - Int2 = array [0 .. 1] of CInteger; - GrVideoModeExt = record - Mode : CInteger; { frame driver for this video mode } - Drv : ^GrFrameDriver; { optional frame driver override } - Frame : MemPtr; { frame buffer address } - CPrec : array [1 .. 3] of ByteCard; { color component precisions } - CPos : array [1 .. 3] of ByteCard; { color component bit positions } - Flags : CInteger; { mode flag bits; see "grdriver.h" } - Setup : function (var md: GrVideoMode; NoClear: CInteger): CInteger; - SetVSize : function (var md: GrVideoMode; w, h: CInteger; var Result: GrVideoMode): CInteger; - Scroll : function (var md: GrVideoMode; x, y: CInteger; var Result: Int2): CInteger; - SetBank : procedure (bk: CInteger); - SetRWBanks : procedure (rb, wb: CInteger); - LoadColor : procedure (c, r, g, b: CInteger); - LFB_Selector: CInteger - end; - - GrFrameDriverPtr = ^GrFrameDriver; - - GrFrameType = record - gf_BaseAddr : array [0 .. 3] of MemPtr; { base address of frame memory } - gf_Selector : ShortInt; { frame memory segment selector } - gf_OnScreen : ByteBool; { is it in video memory ? } - gf_MemFlags : Byte; { memory allocation flags } - gf_LineOffset: CInteger; { offset to next scan line in bytes } - gf_Driver : GrFrameDriverPtr { frame access functions } - end; - - { The frame driver descriptor structure. } - - { struct _GR_frameDriver } - GrFrameDriver = record - Mode, { supported frame access mode } - RMode, { matching RAM frame (if video) } - Is_Video, { video RAM frame driver ? } - Row_Align, { scan line size alignment } - Num_Planes, { number of planes } - Bits_Per_Pixel : CInteger; { bits per pixel } - Max_Plane_Size : MedInt; { maximum plane size in bytes } - Init : function (var md: GrVideoMode): CInteger; - ReadPixel : function (var c: GrFrameType; x, y: CInteger): GrColor; - DrawPixel : procedure (x, y: CInteger; c: GrColor); - DrawLine : procedure (x, y, dx, dy: CInteger; c: GrColor); - DrawHLine : procedure (x, y, w: CInteger; c: GrColor); - DrawVLine : procedure (x, y, h: CInteger; c: GrColor); - DrawBlock : procedure (x, y, w, h: CInteger; c: GrColor); - DrawBitmap : procedure (x, y, w, h: CInteger; BMP: MemPtr; Pitch, Start: CInteger; fg, bg: GrColor); - DrawPattern : procedure (x, y, w: CInteger; Patt: Byte; fg, bg: GrColor); - BitBlt : procedure (var Dst: GrFrameType; dx, dy: CInteger; var Src: GrFrameType; x, y, w, h: CInteger; Op: GrColor); - BltV2R : procedure (var Dst: GrFrameType; dx, dy: CInteger; var Src: GrFrameType; x, y, w, h: CInteger; Op: GrColor); - BltR2V : procedure (var Dst: GrFrameType; dx, dy: CInteger; var Src: GrFrameType; x, y, w, h: CInteger; Op: GrColor); - GetIndexedScanline: function (var c: GrFrameType; x, y, w: CInteger; var Index: CInteger): GrColorsPtr; - PutScanLine : procedure (x, y, w: CInteger; scl: GrColorsPtr; Op: GrColor); - end; - - { driver and mode info structure } - - { extern const struct _GR_driverInfo } - GrDriverInfoType = record - VDriver : GrVideoDriverPtr; { the current video driver } - CurMode : GrVideoModePtr; { current video mode pointer } - ActMode : GrVideoMode; { copy of above, resized if virtual } - FDriver, { frame driver for the current context } - SDriver, { frame driver for the screen } - TDriver : GrFrameDriver; { a dummy driver for text modes } - MCode, { code for the current mode } - DefTW,DefTH, { default text mode size } - DefGW,DefGH: CInteger; { default graphics mode size } - DefTC,DefGC: GrColor; { default text and graphics colors } - VPosX,VPosY, { current virtual viewport position } - ErrsFatal, { if set, exit upon errors } - ModeRestore, { restore startup video mode if set } - SplitBanks, { indicates separate R/W banks } - CurBank : CInteger; { currently mapped bank } - MdSetHook : procedure; { callback for mode set } - SetBank : procedure (bk: CInteger); { banking routine } - SetRWBanks : procedure (rb, wb: CInteger); { split banking routine } - end; - -var - GrDriverInfo: ^GrDriverInfoType; varasmname 'GrDriverInfo'; - -{ setup stuff } - -function GrSetDriver(DrvSpec: CString):CInteger; asmname 'GrSetDriver'; -function GrSetMode(m, w, h, nc, vx, vy:CInteger):CInteger; asmname 'GrSetMode'; -function GrSetViewport(XPos, YPos: CInteger):CInteger; asmname 'GrSetViewport'; -procedure GrSetModeHook(HookFunc:Pointer); asmname 'GrSetModeHook'; -procedure GrSetModeRestore(RestoreFlag:Boolean); asmname 'GrSetModeRestore'; - -procedure GrSetErrorHandling(ExitIfError:Boolean); asmname 'GrSetErrorHandling'; -procedure GrSetEGAVGAmonoDrawnPlane(Plane:CInteger); asmname 'GrSetEGAVGAmonoDrawnPlane'; -procedure GrSetEGAVGAmonoShownPlane(Plane:CInteger); asmname 'GrSetEGAVGAmonoShownPlane'; - -function GrGetLibraryVersion: CInteger; asmname 'GrGetLibraryVersion'; -function GrGetLibrarySystem: CInteger; asmname 'GrGetLibrarySystem'; - -{ inquiry stuff ---- many of these can be macros } - -function GrCurrentMode:CInteger; asmname 'GrCurrentMode'; -function GrAdapterType:CInteger; asmname 'GrAdapterType'; -function GrCurrentFrameMode:CInteger; asmname 'GrCurrentFrameMode'; -function GrScreenFrameMode:CInteger; asmname 'GrScreenFrameMode'; -function GrCoreFrameMode:CInteger; asmname 'GrCoreFrameMode'; - -function GrCurrentVideoDriver: GrVideoDriverPtr; asmname 'GrCurrentVideoDriver' ; -function GrCurrentVideoMode:GrVideoModePtr; asmname 'GrCurrentVideoMode'; -function GrVirtualVideoMode:GrVideoModePtr; asmname 'GrVirtualVideoMode'; -function GrCurrentFrameDriver: GrFrameDriverPtr; asmname 'GrCurrentFrameDriver'; -function GrScreenFrameDriver: GrFrameDriverPtr; asmname 'GrScreenFrameDriver'; - -function GrFirstVideoMode(FMode:CInteger):GrVideoModePtr; asmname 'GrFirstVideoMode'; -function GrNextVideoMode(Prev:GrVideoModePtr):GrVideoModePtr; asmname 'GrNextVideoMode'; - -function GrScreenX:CInteger; asmname 'GrScreenX'; -function GrScreenY:CInteger; asmname 'GrScreenY'; -function GrVirtualX:CInteger; asmname 'GrVirtualX'; -function GrVirtualY:CInteger; asmname 'GrVirtualY'; -function GrViewportX:CInteger; asmname 'GrViewportX'; -function GrViewportY:CInteger; asmname 'GrViewportY'; -function GrScreenIsVirtual:Boolean; asmname 'GrScreenIsVirtual'; - -{ RAM context geometry and memory allocation inquiry stuff } - -function GrFrameNumPlanes(md:CInteger):CInteger; asmname 'GrFrameNumPlanes'; -function GrFrameLineOffset(md,Width:CInteger):CInteger; asmname 'GrFrameLineOffset'; -function GrFramePlaneSize(md,w,h:CInteger):CInteger; asmname 'GrFramePlaneSize'; -function GrFrameContextSize(md,w,h:CInteger):CInteger; asmname 'GrFrameContextSize'; - -function GrNumPlanes:CInteger; asmname 'GrNumPlanes'; -function GrLineOffset(Width:CInteger):CInteger; asmname 'GrLineOffset'; -function GrPlaneSize(w,h:CInteger):CInteger; asmname 'GrPlaneSize'; -function GrContextSize(w,h:CInteger):CInteger; asmname 'GrContextSize'; - -{ ================================================================== - FRAME BUFFER, CONTEXT AND CLIPPING STUFF - ================================================================== } - -type - { struct _GR_context } - GrContextPtr = ^GrContext; - GrContext = record - gc_Frame: GrFrameType; { frame buffer info } - gc_Root: GrContextPtr; { context which owns frame } - gc_XMax, { max X coord (width - 1) } - gc_YMax, { max Y coord (height - 1) } - gc_XOffset, { X offset from root's base } - gc_YOffset, { Y offset from root's base } - gc_XClipLo, { low X clipping limit } - gc_YClipLo, { low Y clipping limit } - gc_XClipHi, { high X clipping limit } - gc_YClipHi, { high Y clipping limit } - gc_UsrXBase, { user window min X coordinate } - gc_UsrYBase, { user window min Y coordinate } - gc_UsrWidth, { user window width } - gc_UsrHeight: CInteger { user window height } - end; - - { extern const struct _GR_contextInfo } - GrContextInfoType = record - Current, { the current context } - Screen: GrContext { the screen context } - end; - -var - GrContextInfo: GrContextInfoType; varasmname 'GrContextInfo'; - -function GrCreateContext(w, h: CInteger; Memory: MemPtr; Where: GrContextPtr): GrContextPtr; asmname 'GrCreateContext'; -function GrCreateFrameContext(md: ByteCard; w, h: CInteger; Memory: MemPtr; Where: GrContextPtr): GrContextPtr; asmname 'GrCreateFrameContext'; -function GrCreateSubContext(x1, y1, x2, y2: CInteger; Parent, Where: GrContextPtr): GrContextPtr; asmname 'GrCreateSubContext'; -function GrSaveContext(Where: GrContextPtr): GrContextPtr; asmname 'GrSaveContext'; -function GrCurrentContext: GrContextPtr; asmname 'GrCurrentContext'; -function GrScreenContext: GrContextPtr; asmname 'GrScreenContext'; - -procedure GrDestroyContext(Context: GrContextPtr); asmname 'GrDestroyContext'; -procedure GrResizeSubContext(Context: GrContextPtr; x1, y1, x2, y2: CInteger); asmname 'GrResizeSubContext'; -procedure GrSetContext(Context: GrContextPtr); asmname 'GrSetContext'; - -procedure GrSetClipBox(x1, y1, x2, y2:CInteger); asmname 'GrSetClipBox'; -procedure GrGetClipBox(var x1p, y1p, x2p, y2p: CInteger); asmname 'GrGetClipBox'; -procedure GrResetClipBox; asmname 'GrResetClipBox'; - -function GrMaxX: CInteger; asmname 'GrMaxX'; -function GrMaxY: CInteger; asmname 'GrMaxY'; -function GrSizeX:CInteger; asmname 'GrSizeX'; -function GrSizeY:CInteger; asmname 'GrSizeY'; -function GrLowX: CInteger; asmname 'GrLowX'; -function GrLowY: CInteger; asmname 'GrLowY'; -function GrHighX:CInteger; asmname 'GrHighX'; -function GrHighY:CInteger; asmname 'GrHighY'; - -{ ================================================================== - COLOR STUFF - ================================================================== } - -{ Flags to 'OR' to colors for various operations } -const - GrWrite = 0 ; { write color } - GrXor = $01000000 ; { to "xor" any color to the screen } - GrOr = $02000000 ; { to "or" to the screen } - GrAnd = $03000000 ; { to "and" to the screen } - GrImage = $04000000 ; { BLIT: write, except given color } - GrCValueMask = $00ffffff ; { color value mask } - GrCModeMask = $ff000000 ; { color operation mask } - GrNoColor = GrXor or 0 ; { GrNoColor is used for "no" color } - -function GrColorValue(c:GrColor):GrColor; asmname 'GrColorValue'; -function GrColorMode(c:GrColor):GrColor; asmname 'GrColorMode'; -function GrWriteModeColor(c:GrColor):GrColor; asmname 'GrWriteModeColor'; -function GrXorModeColor(c:GrColor):GrColor; asmname 'GrXorModeColor'; -function GrOrModeColor(c:GrColor):GrColor; asmname 'GrOrModeColor'; -function GrAndModeColor(c:GrColor):GrColor; asmname 'GrAndModeColor'; -function GrImageModeColor(c:GrColor):GrColor; asmname 'GrImageModeColor'; - -procedure GrResetColors; asmname 'GrResetColors'; -procedure GrSetRGBcolorMode; asmname 'GrSetRGBcolorMode'; -procedure GrRefreshColors; asmname 'GrRefreshColors'; - -function GrNumColors:GrColor; asmname 'GrNumColors'; -function GrNumFreeColors:GrColor; asmname 'GrNumFreeColors'; - -function GrBlack:GrColor; asmname 'GrBlack'; -function GrWhite:GrColor; asmname 'GrWhite'; - -function GrBuildRGBcolorT(r,g,b:CInteger):GrColor; asmname 'GrBuildRGBcolorT'; -function GrBuildRGBcolorR(r,g,b:CInteger):GrColor; asmname 'GrBuildRGBcolorR'; -function GrRGBcolorRed(c:GrColor):CInteger ; asmname 'GrRGBcolorRed'; -function GrRGBcolorGreen(c:GrColor):CInteger ; asmname 'GrRGBcolorGreen'; -function GrRGBcolorBlue(c:GrColor):CInteger ; asmname 'GrRGBcolorBlue'; - -function GrAllocColor(r,g,b:CInteger):GrColor; asmname 'GrAllocColor'; { shared, read-only } -function GrAllocColorID(r,g,b:CInteger):GrColor; asmname 'GrAllocColorID'; { potentially inlined version } -function GrAllocColor2(hcolor:MedInt):GrColor; asmname 'GrAllocColor2'; { $RRGGBB shared, read-only } -function GrAllocColor2ID(hcolor:MedInt):GrColor; asmname 'GrAllocColor2ID'; { potentially inlined version } -function GrAllocCell:GrColor; asmname 'GrAllocCell'; { unshared, read-write } - -function GrAllocEgaColors:GrColorsPtr; asmname 'GrAllocEgaColors'; { shared, read-only standard EGA colors } - -procedure GrSetColor(c:GrColor; r,g,b:CInteger); asmname 'GrSetColor'; -procedure GrFreeColor(c:GrColor); asmname 'GrFreeColor'; -procedure GrFreeCell(c:GrColor); asmname 'GrFreeCell'; - -procedure GrQueryColor(c:GrColor; var r,g,b:CInteger); asmname 'GrQueryColor'; -procedure GrQueryColorID(c:GrColor; var r,g,b:CInteger); asmname 'GrQueryColorID'; -procedure GrQueryColor2(c:GrColor; var hcolor:MedInt); asmname 'GrQueryColor2'; -procedure GrQueryColor2ID(c:GrColor; var hcolor:MedInt); asmname 'GrQueryColor2ID'; - -function GrColorSaveBufferSize:CInteger ; asmname 'GrColorSaveBufferSize'; -procedure GrSaveColors(Buffer:Pointer); asmname 'GrSaveColors'; -procedure GrRestoreColors(Buffer:Pointer); asmname 'GrRestoreColors'; - -{ ================================================================== - GRAPHICS PRIMITIVES - ================================================================== } - -type - { framed box colors } - GrFBoxColors = record - fbx_IntColor, - fbx_TopColor, - fbx_RightColor, - fbx_BottomColor, - fbx_LeftColor: GrColor - end; - -procedure GrClearScreen(bg:GrColor); asmname 'GrClearScreen'; -procedure GrClearContext(bg:GrColor); asmname 'GrClearContext'; -procedure GrClearContextC(ctx:GrContextPtr; bg:GrColor); asmname 'GrClearContextC'; -procedure GrClearClipBox(bg:GrColor); asmname 'GrClearClipBox'; -procedure GrPlot(x, y: CInteger; c:GrColor); asmname 'GrPlot'; -procedure GrLine(x1, y1, x2, y2: CInteger; c:GrColor); asmname 'GrLine'; -procedure GrHLine(x1, x2, y:CInteger; c:GrColor); asmname 'GrHLine'; -procedure GrVLine(x, y1, y2: CInteger; c: GrColor); asmname 'GrVLine'; -procedure GrBox(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrBox'; -procedure GrFilledBox(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrFilledBox'; -procedure GrFramedBox(x1, y1, x2, y2, Wdt: CInteger; protected var c: GrFBoxColors); asmname 'GrFramedBox'; -function GrGenerateEllipse(xc, yc, xa, ya:CInteger; var Points{ : array of PointType }):CInteger; asmname 'GrGenerateEllipse'; -function GrGenerateEllipseArc(xc, yc, xa, ya, Start, Ende: CInteger; var Points{ : array of PointType }):CInteger; asmname 'GrGenerateEllipseArc'; -procedure GrLastArcCoords(var xs, ys, xe, ye, xc, yc: CInteger); asmname 'GrLastArcCoords'; -procedure GrCircle(xc, yc, r: CInteger; c: GrColor); asmname 'GrCircle'; -procedure GrEllipse(xc, yc, xa, ya: CInteger; c: GrColor); asmname 'GrEllipse'; -procedure GrCircleArc(xc, yc, r, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrCircleArc'; -procedure GrEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrEllipseArc'; -procedure GrFilledCircle(xc, yc, r: CInteger; c: GrColor); asmname 'GrFilledCircle'; -procedure GrFilledEllipse(xc, yc, xa, ya: CInteger; c: GrColor); asmname 'GrFilledEllipse'; -procedure GrFilledCircleArc(xc, yc, r, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrFilledCircleArc'; -procedure GrFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrFilledEllipseArc'; -procedure GrPolyLine(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrPolyLine'; -procedure GrPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrPolygon'; -procedure GrFilledConvexPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrFilledConvexPolygon'; -procedure GrFilledPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrFilledPolygon'; -procedure GrBitBlt(Dest: GrContextPtr; x, y: CInteger; Src: GrContextPtr; x1, y1, x2, y2: CInteger; Op: GrColor); asmname 'GrBitBlt'; -function GrPixel(x, y:CInteger):GrColor; asmname 'GrPixel'; -function GrPixelC(c: GrContextPtr; x, y: CInteger): GrColor; asmname 'GrPixelC'; - -procedure GrFloodFill(x, y: CInteger; Border, c: GrColor); asmname 'GrFloodFill'; -procedure GrFloodSpill(x1, y1, x2, y2: CInteger; old_c, new_c: GrColor); asmname 'GrFloodSpill'; -procedure GrFloodSpill2( x1, y1, x2, y2: CInteger; old_c1, new_c1, old_c2, new_c2: GrColor); asmname 'GrFloodSpill2'; -procedure GrFloodSpillC(var ctx: GrContext; x1, y1, x2, y2: CInteger; old_c, new_c: GrColor); asmname 'GrFloodSpillC'; -procedure GrFloodSpillC2(var ctx: GrContext; x1, y1, x2, y2: CInteger; old_c1, new_c1, old_c2, new_c2: GrColor); asmname 'GrFloodSpillC2'; - -function GrGetScanline(x1,x2,yy: CInteger): GrColorsPtr; asmname 'GrGetScanline'; -function GrGetScanlineC(ctx: GrContextPtr; x1,x2,yy: CInteger): GrColorsPtr; asmname 'GrGetScanlineC'; -{ Input ctx: source context, if NULL the current context is used } -{ x1 : first x coordinate read } -{ x2 : last x coordinate read } -{ yy : y coordinate } -{ Output nil : error / no data (clipping occurred) } -{ else } -{ p[0..w]: pixel values read } -{ (w = |x2-y1|) } -{ Output data is valid until next GRX call ! } - -procedure GrPutScanline(x1,x2,yy: CInteger;c: GrColorsPtr; Op: GrColor); asmname 'GrPutScanline'; -{ Input x1: first x coordinate to be set } -{ x2: last x coordinate to be set } -{ yy: y coordinate } -{ c : c[0..(|x2-x1|] hold the pixel data } -{ Op: Operation (GrWRITE/GrXOR/GrOR/GrAND/GrIMAGE) } -{ } -{ Note c[..] data must fit GrCVALUEMASK otherwise the results } -{ are implementation dependend. } -{ => You can't supply operation code with the pixel data! } - - -{ ================================================================== - NON CLIPPING DRAWING PRIMITIVES - ================================================================== } - -procedure GrPlotNC(x, y: CInteger; c: GrColor); asmname 'GrPlotNC'; -procedure GrLineNC(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrLineNC'; -procedure GrHLineNC(x1, x2, y: CInteger; c: GrColor); asmname 'GrHLineNC'; -procedure GrVLineNC(x, y1, y2: CInteger; c: GrColor); asmname 'GrVLineNC'; -procedure GrBoxNC(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrBoxNC'; -procedure GrFilledBoxNC(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrFilledBoxNC'; -procedure GrFramedBoxNC(x1, y1, x2, y2, Wdt: CInteger; protected var c: GrFBoxColors); asmname 'GrFramedBoxNC'; -procedure GrBitBltNC(Dest: GrContextPtr; x, y: CInteger; Src: GrContextPtr; x1, y1, x2, y2: CInteger; Op: GrColor); asmname 'GrBitBltNC'; -function GrPixelNC(x, y:CInteger):GrColor; asmname 'GrPixelNC'; -function GrPixelCNC(c: GrContextPtr; x, y: CInteger): GrColor; asmname 'GrPixelCNC'; - -{ ================================================================== - FONTS AND TEXT PRIMITIVES - ================================================================== } - -const - { text drawing directions } - Gr_Text_Right = 0; { normal } - Gr_Text_Down = 1; { downward } - Gr_Text_Left = 2; { upside down, right to left } - Gr_Text_Up = 3; { upward } - Gr_Text_Default = Gr_Text_Right; - { Gr_Text_Is_Vertical(d) = ((d) and 1); } - - { text alignment options } - Gr_Align_Left = 0; { X only } - Gr_Align_Top = 0; { Y only } - Gr_Align_Center = 1; { X, Y } - Gr_Align_Right = 2; { X only } - Gr_Align_Bottom = 2; { Y only } - Gr_Align_Baseline = 3; { Y only } - Gr_Align_Default = Gr_Align_Left; - - { character types in text strings } - Gr_Byte_Text = 0; { one byte per character } - Gr_Word_Text = 1; { two bytes per character } - Gr_Attr_Text = 2; { chr w/ PC style attribute byte } - - { OR this to the foreground color value for underlined text when - using Gr_Byte_Text or Gr_Word_Text modes. } - Gr_Underline_Text = GrXor shl 4; - - { Font conversion flags for 'GrLoadConvertedFont'. OR them as desired. } - Gr_FontCvt_None = 0; { no conversion } - Gr_FontCvt_SkipChars = 1; { load only selected characters } - Gr_FontCvt_Resize = 2; { resize the font } - Gr_FontCvt_Italicize = 4; { tilt font for "italic" look } - Gr_FontCvt_Boldify = 8; { make a "bold"(er) font } - Gr_FontCvt_Fixify = 16; { convert prop. font to fixed wdt } - Gr_FontCvt_Proportion = 32; { convert fixed font to prop. wdt } - -{ font structures } -type - { font descriptor } - GrFontHeader = record - Name, { font name } - Family: CString; { font family name } - Proportional, { characters have varying width } - Scalable, { derived from a scalable font } - Preloaded, { set when linked Integero program } - Modified: ByteBool; { "tweaked" font (resized, etc..) } - Width, { width (proportional=>average) } - Height, { font height } - Baseline, { baseline pixel pos (from top) } - ULPos, { underline pixel pos (from top) } - ULHeight, { underline width } - MinChar, { lowest character code in font } - NumChars: CCardinal { number of characters in font } - end; - - { character descriptor } - GrFontChrInfo = record - Width, { width of this character } - Offset: CCardinal { offset from start of bitmap } - end; - - { the complete font } - AuxOffsType = array [0 .. 6] of CInteger; - GrFont = record - h: GrFontHeader; { the font info structure } - BitMap, { character bitmap array } - AuxMap: MemPtr; { map for rotated & underline chrs } - MinWidth, { width of narrowest character } - MaxWidth, { width of widest character } - AuxSize, { allocated size of auxiliary map } - AuxNext: CCardinal; { next free byte in auxiliary map } - AuxOffs: ^AuxOffsType; { offsets to completed aux chars } - ChrInfo: array [1 .. 1] of GrFontChrInfo { character info (not act. size) } - end; - GrFontPtr = ^GrFont; - -var - GrFont_PC6x8 : GrFont; varasmname 'GrFont_PC6x8'; - GrFont_PC8x8 : GrFont; varasmname 'GrFont_PC8x8'; - GrFont_PC8x14: GrFont; varasmname 'GrFont_PC8x14'; - GrFont_PC8x16: GrFont; varasmname 'GrFont_PC8x16'; - GrDefaultFont: GrFont; varasmname 'GrFont_PC8x14'; - -function GrLoadFont(FontName: CString): GrFontPtr; asmname 'GrLoadFont'; -function GrLoadConvertedFont(FontName: CString; cvt, w, h, MinCh, MaxCh: CInteger): GrFontPtr; asmname 'GrLoadConvertedFont'; -function GrBuildConvertedFont(protected var From: GrFont; cvt, w, h, MinCh, MaxCh: CInteger): GrFontPtr; asmname 'GrBuildConvertedFont'; - -procedure GrUnloadFont(var Font: GrFont); asmname 'GrUnloadFont'; -procedure GrDumpFont(protected var f: GrFont; CsymbolName, FileName: CString); asmname 'GrDumpFont'; -procedure GrSetFontPath(path_list: CString); asmname 'GrSetFontPath'; - -function GrFontCharPresent(protected var Font: GrFont; Chr: CInteger): Boolean; asmname 'GrFontCharPresent'; -function GrFontCharWidth(protected var Font: GrFont; Chr: CInteger): CInteger; asmname 'GrFontCharWidth'; -function GrFontCharHeight(protected var Font: GrFont; Chr: CInteger): CInteger; asmname 'GrFontCharHeight'; -function GrFontCharBmpRowSize(protected var Font: GrFont; Chr: CInteger): CInteger; asmname 'GrFontCharBmpRowSize'; -function GrFontCharBitmapSize(protected var Font: GrFont; Chr: CInteger): CInteger; asmname 'GrFontCharBitmapSize'; -function GrFontStringWidth(protected var Font: GrFont; Text: CString; Len, Typ_e: CInteger): CInteger; asmname 'GrFontStringWidth'; -function GrFontStringHeight(protected var Font: GrFont; Text: CString; Len, Typ_e: CInteger): CInteger; asmname 'GrFontStringHeight'; -function GrProportionalTextWidth(protected var Font: GrFont; Text: CString; Len, Typ_e: CInteger): CInteger; asmname 'GrProportionalTextWidth'; -function GrBuildAuxiliaryBitmap(var Font: GrFont; Chr, Dir, ul: CInteger): MemPtr; asmname 'GrBuildAuxiliaryBitmap'; -function GrFontCharBitmap(protected var Font: GrFont; Chr: CInteger): MemPtr; asmname 'GrFontCharBitmap'; -function GrFontCharAuxBmp(var Font: GrFont; Chr, Dir, ul: CInteger): MemPtr; asmname 'GrFontCharAuxBmp'; - -type - GrColorTableP = ^GrColors; - - { text color union } - GrTextColor = record - case 1 .. 2 of - 1: (v: GrColor); { color value for "direct" text } - 2: (p: GrColorTableP); { color table for attribute text } - end; - - { text drawing option structure } - GrTextOption = record - txo_Font: GrFontPtr; { font to be used } - txo_FgColor, { foreground color } - txo_BgColor: GrTextColor; { background color } - txo_ChrType, { character type (see above) } - txo_Direct, { direction (see above) } - txo_XAlign, { X alignment (see above) } - txo_YAlign: ByteCard { Y alignment (see above) } - end; - - { fixed font text window desc. } - GrTextRegion = record - txr_Font: GrFontPtr; { font to be used } - txr_FgColor, { foreground color } - txr_BgColor: GrTextColor; { background color } - txr_Buffer, { pointer to text buffer } - txr_Backup: Pointer; { optional backup buffer } - txr_Width, { width of area in chars } - txr_Height, { height of area in chars } - txr_LineOffset, { offset in buffer(s) between rows } - txr_XPos, { upper left corner X coordinate } - txr_YPos: CInteger; { upper left corner Y coordinate } - txr_ChrType: ByteCard { character type (see above) } - end; - -function GrCharWidth(Chr: CInteger; protected var Opt: GrTextOption): CInteger; asmname 'GrCharWidth'; -function GrCharHeight(Chr: CInteger; protected var Opt: GrTextOption): CInteger; asmname 'GrCharHeight'; -procedure GrCharSize(Chr: CInteger; protected var Opt: GrTextOption; var w, h: CInteger); asmname 'GrCharSize'; -function GrStringWidth(Text: CString; Length: CInteger; protected var Opt: GrTextOption): CInteger; asmname 'GrStringWidth'; -function GrStringHeight(Text: CString; Length: CInteger; protected var Opt: GrTextOption): CInteger; asmname 'GrStringHeight'; -procedure GrStringSize(Text: CString; Length: CInteger; protected var Opt: GrTextOption;var w, h: CInteger); asmname 'GrStringSize'; - -procedure GrDrawChar(Chr, x, y: CInteger; protected var Opt: GrTextOption); asmname 'GrDrawChar'; -procedure GrDrawString(Text: CString; Length, x, y: CInteger; protected var Opt: GrTextOption); asmname 'GrDrawString'; -procedure GrTextXY(x, y: CInteger; Text: CString; fg, bg: GrColor); asmname 'GrTextXY'; - -procedure GrDumpChar(Chr, Col, Row: CInteger; protected var r: GrTextRegion); asmname 'GrDumpChar'; -procedure GrDumpText(Col, Row, Wdt, Hgt: CInteger; protected var r: GrTextRegion); asmname 'GrDumpText'; -procedure GrDumpTextRegion(protected var r: GrTextRegion); asmname 'GrDumpTextRegion'; - -{ ================================================================= - THICK AND DASHED LINE DRAWING PRIMITIVES - ================================================================== } - -{ custom line option structure - zero or one dash pattern length means the line is continuous - the dash pattern always begins with a drawn section } - -type - GrLineOption = record - Lno_Color : GrColor; { color used to draw line } - Lno_Width, { width of the line } - Lno_PattLen: CInteger; { length of the dash pattern } - Lno_DashPat: MemPtr { draw/nodraw pattern } - end; - -procedure GrCustomLine(x1, y1, x2, y2: CInteger; protected var o: GrLineOption); asmname 'GrCustomLine'; -procedure GrCustomBox(x1, y1, x2, y2: CInteger; protected var o: GrLineOption); asmname 'GrCustomBox'; -procedure GrCustomCircle(xc, yc, r: CInteger; protected var o: GrLineOption); asmname 'GrCustomCircle'; -procedure GrCustomEllipse(xc, yc, r: CInteger; protected var o: GrLineOption); asmname 'GrCustomEllipse'; -procedure GrCustomCircleArc(xc, yc, r, Start, Ende, Style: CInteger; protected var o: GrLineOption); asmname 'GrCustomCircleArc'; -procedure GrCustomEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; protected var o: GrLineOption); asmname 'GrCustomEllipseArc'; -procedure GrCustomPolyLine(NumPts: CInteger; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrCustomPolyLine'; -procedure GrCustomPolygon(NumPts: CInteger; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrCustomPolygon'; - -{ ================================================================== - PATTERNED DRAWING AND FILLING PRIMITIVES - ================================================================== } - -{ BITMAP: a mode independent way to specify a fill pattern of two - colors. It is always 8 pixels wide (1 byte per scan line), its - height is user-defined. SET THE TYPE FLAG TO ZERO!!! } - -type - GrBitmap = record - bmp_IsPixMap, { type flag for pattern union } - bmp_Height: CInteger; { bitmap height } - bmp_Data: MemPtr; { pointer to the bit pattern } - bmp_FgColor, { foreground color for fill } - bmp_BgColor: GrColor; { background color for fill } - bmp_MemFlags: CInteger { set if dynamically allocated } - end; - - { PIXMAP: a fill pattern stored in a layout identical to the video RAM - for filling using 'bitblt'-s. It is mode dependent, typically one - of the library functions is used to build it. KEEP THE TYPE FLAG - NONZERO!!! } - - GrPixmap = record - pxp_IsPixMap, { type flag for pattern union } - pxp_Width, { pixmap width (in pixels) } - pxp_Height: CInteger; { pixmap height (in pixels) } - pxp_Oper: GrColor; { bitblt mode (SET, OR, XOR, AND, IMAGE) } - pxp_Source: GrFrameType { source context for fill } - end; - - { Fill pattern union -- can either be a bitmap or a pixmap } - - GrPattern = record - case 1 .. 3 of - 1: (gp_IsPixMap: CInteger); { nonzero for pixmaps } - 2: (gp_BitMap : GrBitmap); { fill bitmap } - 3: (gp_PixMap : GrPixmap); { fill pixmap } - end; - GrPatternPtr = ^GrPattern; - - { Draw pattern for line drawings -- specifies both the: - (1) fill pattern, and the - (2) custom line drawing option } - GrLinePattern = record - lnp_Pattern: GrPatternPtr; { fill pattern } - lnp_Option : ^GrLineOption { width + dash pattern } - end; - GrLinePatternPtr = GrLinePattern; - -function GrBuildPixmap(protected var Pixels; w, h: CInteger; protected var Colors { : array of GrColor }): GrPatternPtr; asmname 'GrBuildPixmap'; -function GrBuildPixmapFromBits(protected var Bits; w, h: CInteger; fgc, bgc: GrColor): GrPatternPtr; asmname 'GrBuildPixmapFromBits'; -function GrConvertToPixmap(Src: GrContextPtr): GrPatternPtr; asmname 'GrConvertToPixmap'; - -procedure GrDestroyPattern(p: GrPatternPtr); asmname 'GrDestroyPattern'; - -procedure GrPatternedLine(x1, y1, x2, y2: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedLine'; -procedure GrPatternedBox(x1, y1, x2, y2: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedBox'; -procedure GrPatternedCircle(xc, yc, r: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedCircle'; -procedure GrPatternedEllipse(xc, yc, xa, ya: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedEllipse'; -procedure GrPatternedCircleArc(xc, yc, r, Start, Ende, Style: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedCircleArc'; -procedure GrPatternedEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedEllipseArc'; -procedure GrPatternedPolyLine(NumPts: CInteger; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrPatternedPolyLine'; -procedure GrPatternedPolygon(NumPts: CInteger; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrPatternedPolygon'; - -procedure GrPatternFilledPlot(x, y: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledPlot'; -procedure GrPatternFilledLine(x1, y1, x2, y2: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledLine'; -procedure GrPatternFilledBox(x1, y1, x2, y2: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledBox'; -procedure GrPatternFilledCircle(xc, yc, r: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledCircle'; -procedure GrPatternFilledEllipse(xc, yc, xa, ya: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledEllipse'; -procedure GrPatternFilledCircleArc(xc, yc, r, Start, Ende, Style: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledCircleArc'; -procedure GrPatternFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledEllipseArc'; -procedure GrPatternFilledConvexPolygon(NumPts: CInteger; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrPatternFilledConvexPolygon'; -procedure GrPatternFilledPolygon(NumPts: CInteger; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrPatternFilledPolygon'; -procedure GrPatternFloodFill(x, y: CInteger; Border: GrColor; p: GrPatternPtr); asmname 'GrPatternFloodFill'; - -procedure GrPatternDrawChar(Chr, x, y: CInteger; protected var Opt: GrTextOption; p: GrPatternPtr); asmname 'GrPatternDrawChar'; -procedure GrPatternDrawString(Text: CString; Length, x, y: CInteger; protected var Opt: GrTextOption; p: GrPatternPtr); asmname 'GrPatternDrawString'; -procedure GrPatternDrawStringExt(Text: CString; Length, x, y: CInteger; protected var Opt: GrTextOption; p: GrPatternPtr); asmname 'GrPatternDrawStringExt'; - - -{ ================================================================== - IMAGE MANIPULATION - ================================================================== } - -{ - Image Utility - by Michal Stencl Copyright (c) 1998 for GRX - - [stenclpmd@ba.telecom.sk] } - -type - GrImagePtr = ^GrPixmap; - -{ Flags for GrImageInverse() } -const - Gr_Image_Inverse_LR = 1; { inverse left right } - Gr_Image_Inverse_TD = 2; { inverse top down } - -function GrImageBuild(protected var Pixels; w, h: CInteger; protected var Colors { : array of GrColor }): GrImagePtr; asmname 'GrImageBuild'; -procedure GrImageDestroy(i: GrImagePtr); asmname 'GrImageDestroy'; -procedure GrImageDisplay(x,y: CInteger; i: GrImagePtr); asmname 'GrImageDisplay'; -procedure GrImageDisplayExt(x1,y1,x2,y2: CInteger; i: GrImagePtr); asmname 'GrImageDisplayExt'; -procedure GrImageFilledBoxAlign(xo,yo,x1,y1,x2,y2: CInteger; p: GrImagePtr); asmname 'GrImageFilledBoxAlign'; -procedure GrImageHLineAlign(xo,yo,x,y,Width: CInteger; p: GrImagePtr); asmname 'GrImageHLineAlign'; -procedure GrImagePlotAlign(xo,yo,x,y: CInteger; p: GrImagePtr); asmname 'GrImagePlotAlign'; - -function GrImageInverse(p: GrImagePtr; Flag: CInteger): GrImagePtr; asmname 'GrImageInverse'; -function GrImageStretch(p: GrImagePtr; NWidth, NHeight: CInteger): GrImagePtr; asmname 'GrImageStretch'; - -function GrImageFromPattern(p: GrPatternPtr): GrImagePtr; asmname 'GrImageFromPattern'; -function GrImageFromContext(c: GrContextPtr): GrImagePtr; asmname 'GrImageFromContext'; -function GrImageBuildUsedAsPattern(protected var Pixels; w, h: CInteger; protected var Colors { : array of GrColor }): GrImagePtr; asmname 'GrImageBuildUsedAsPattern'; - -function GrPatternFromImage(i: GrImagePtr): GrPatternPtr; asmname 'GrPatternFromImage'; - -{ ================================================================== - DRAWING IN USER WINDOW COORDINATES - ================================================================== } - -procedure GrSetUserWindow(x1, y1, x2, y2: CInteger); asmname 'GrSetUserWindow'; -procedure GrGetUserWindow(var x1, y1, x2, y2: CInteger); asmname 'GrGetUserWindow'; -procedure GrGetScreenCoord(var x, y: CInteger); asmname 'GrGetScreenCoord'; -procedure GrGetUserCoord(var x, y: CInteger); asmname 'GrGetUserCoord'; - -procedure GrUsrPlot(x, y: CInteger; c:GrColor); asmname 'GrUsrPlot'; -procedure GrUsrLine(x1, y1, x2, y2: CInteger; c:GrColor); asmname 'GrUsrLine'; -procedure GrUsrHLine(x1, x2, y:CInteger; c:GrColor); asmname 'GrUsrHLine'; -procedure GrUsrVLine(x, y1, y2: CInteger; c: GrColor); asmname 'GrUsrVLine'; -procedure GrUsrBox(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrUsrBox'; -procedure GrUsrFilledBox(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrUsrFilledBox'; -procedure GrUsrFramedBox(x1, y1, x2, y2, Wdt: CInteger; c: GrFBoxColors); asmname 'GrUsrFramedBox'; - -procedure GrUsrCircle(xc, yc, r: CInteger; c: GrColor); asmname 'GrUsrCircle'; -procedure GrUsrEllipse(xc, yc, xa, ya: CInteger; c: GrColor); asmname 'GrUsrEllipse'; -procedure GrUsrCircleArc(xc, yc, r, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrUsrCircleArc'; -procedure GrUsrEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrUsrEllipseArc'; -procedure GrUsrFilledCircle(xc, yc, r: CInteger; c: GrColor); asmname 'GrUsrFilledCircle'; -procedure GrUsrFilledEllipse(xc, yc, xa, ya: CInteger; c: GrColor); asmname 'GrUsrFilledEllipse'; -procedure GrUsrFilledCircleArc(xc, yc, r, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrUsrFilledCircleArc'; -procedure GrUsrFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrUsrFilledEllipseArc'; -procedure GrUsrPolyLine(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrPolyLine'; -procedure GrUsrPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrPolygon'; -procedure GrUsrFilledConvexPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrFilledConvexPolygon'; -procedure GrUsrFilledPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrFilledPolygon'; -procedure GrUsrFloodFill(x, y: CInteger; Border, c: GrColor); asmname 'GrUsrFloodFill'; - -function GrUsrPixel(x, y:CInteger):GrColor; asmname 'GrUsrPixel'; -function GrUsrPixelC(c: GrContextPtr; x, y: CInteger):GrColor; asmname 'GrUsrPixelC'; - -procedure GrUsrCustomLine(x1, y1, x2, y2: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomLine'; -procedure GrUsrCustomBox(x1, y1, x2, y2: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomBox'; -procedure GrUsrCustomCircle(xc, yc, r: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomCircle'; -procedure GrUsrCustomEllipse(xc, yc, r: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomEllipse'; -procedure GrUsrCustomCircleArc(xc, yc, r, Start, Ende, Style: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomCircleArc'; -procedure GrUsrCustomEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomEllipseArc'; -procedure GrUsrCustomPolyLine(NumPts: CInteger; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrUsrCustomPolyLine'; -procedure GrUsrCustomPolygon(NumPts: CInteger; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrUsrCustomPolygon'; - -procedure GrUsrPatternedLine(x1, y1, x2, y2: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedLine'; -procedure GrUsrPatternedBox(x1, y1, x2, y2: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedBox'; -procedure GrUsrPatternedCircle(xc, yc, r: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedCircle'; -procedure GrUsrPatternedEllipse(xc, yc, xa, ya: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedEllipse'; -procedure GrUsrPatternedCircleArc(xc, yc, r, Start, Ende, Style: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedCircleArc'; -procedure GrUsrPatternedEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedEllipseArc'; -procedure GrUsrPatternedPolyLine(NumPts: CInteger; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrUsrPatternedPolyLine'; -procedure GrUsrPatternedPolygon(NumPts: CInteger; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrUsrPatternedPolygon'; - -procedure GrUsrPatternFilledPlot(x, y: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledPlot'; -procedure GrUsrPatternFilledLine(x1, y1, x2, y2: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledLine'; -procedure GrUsrPatternFilledBox(x1, y1, x2, y2: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledBox'; -procedure GrUsrPatternFilledCircle(xc, yc, r: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledCircle'; -procedure GrUsrPatternFilledEllipse(xc, yc, xa, ya: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledEllipse'; -procedure GrUsrPatternFilledCircleArc(xc, yc, r, Start, Ende, Style: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledCircleArc'; -procedure GrUsrPatternFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledEllipseArc'; -procedure GrUsrPatternFilledConvexPolygon(NumPts: CInteger; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrUsrPatternFilledConvexPolygon'; -procedure GrUsrPatternFilledPolygon(NumPts: CInteger; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrUsrPatternFilledPolygon'; -procedure GrUsrPatternFloodFill(x, y: CInteger; Border: GrColor; p: GrPatternPtr); asmname 'GrUsrPatternFloodFill'; - -procedure GrUsrDrawChar(Chr, x, y: CInteger; protected var Opt: GrTextOption); asmname 'GrUsrDrawChar'; -procedure GrUsrDrawString(Text: CString; Length, x, y: CInteger; protected var Opt: GrTextOption); asmname 'GrUsrDrawString'; -procedure GrUsrTextXY(x, y: CInteger; Text: CString; fg, bg: CInteger); asmname 'GrUsrTextXY'; - -{ ================================================================== - GRAPHICS CURSOR UTILITIES - ================================================================== } - -type - GrCursor = record - Work: GrContext; { work areas (4) } - XCord,YCord, { cursor position on screen } - XSize,YSize, { cursor size } - XOffs,YOffs, { LU corner to hot point offset } - XWork,YWork, { save/work area sizes } - XWPos,YWPos, { save/work area position on screen } - Displayed: CInteger { set if displayed } - end; - GrCursorPtr = ^GrCursor; - -function GrBuildCursor(Pixels: Pointer; Pitch, w, h, xo, yo: CInteger; protected var Colors { : array of GrColor }): GrCursorPtr; asmname 'GrBuildCursor'; -procedure GrDestroyCursor(Cursor: GrCursorPtr); asmname 'GrDestroyCursor'; -procedure GrDisplayCursor(Cursor: GrCursorPtr); asmname 'GrDisplayCursor'; -procedure GrEraseCursor(Cursor: GrCursorPtr); asmname 'GrEraseCursor'; -procedure GrMoveCursor(Cursor: GrCursorPtr; x, y: CInteger); asmname 'GrMoveCursor'; - -{ ================================================================== - MOUSE AND KEYBOARD INPUT UTILITIES - ================================================================== } - -const - Gr_M_Motion = $0001; { mouse event flag bits } - Gr_M_Left_Down = $0002; - Gr_M_Left_Up = $0004; - Gr_M_Right_Down = $0008; - Gr_M_Right_Up = $0010; - Gr_M_Middle_Down = $0020; - Gr_M_Middle_Up = $0040; - Gr_M_P4_Down = $0400; - Gr_M_P4_Up = $0800; - Gr_M_P5_Down = $2000; - Gr_M_P5_Up = $4000; - Gr_M_Button_Down = Gr_M_Left_Down or Gr_M_Middle_Down or Gr_M_Right_Down or Gr_M_P4_Down or Gr_M_P5_Down; - Gr_M_Button_Up = Gr_M_Left_Up or Gr_M_Middle_Up or Gr_M_Right_Up or Gr_M_P4_Up or Gr_M_P5_Up; - Gr_M_Button_Change = Gr_M_Button_Up or Gr_M_Button_Down; - - Gr_M_Left = $01; { mouse button index bits } - Gr_M_Right = $02; - Gr_M_Middle = $04; - Gr_M_P4 = $08; - Gr_M_P5 = $10; - - Gr_M_KeyPress = $0080; { other event flag bits } - Gr_M_Poll = $0100; - Gr_M_NoPaint = $0200; - Gr_Command = $1000; - Gr_M_Event = Gr_M_Motion or Gr_M_KeyPress or Gr_M_Button_Change or Gr_Command; - - Gr_KB_RightShift = $01; { Keybd states: right shift key depressed } - Gr_KB_LeftShift = $02; { left shift key depressed } - Gr_KB_Ctrl = $04; { CTRL depressed } - Gr_KB_Alt = $08; { ALT depressed } - Gr_KB_ScrolLock = $10; { SCROLL LOCK active } - Gr_KB_NumLock = $20; { NUM LOCK active } - Gr_KB_CapsLock = $40; { CAPS LOCK active } - Gr_KB_Insert = $80; { INSERT state active } - Gr_KB_Shift = Gr_KB_LeftShift or Gr_KB_RightShift; - - Gr_M_Cur_Normal = 0; { MOUSE CURSOR modes: just the cursor } - Gr_M_Cur_Rubber = 1; { rectangular rubber band (XOR-d to the screen) } - Gr_M_Cur_Line = 2; { line attached to the cursor } - Gr_M_Cur_Box = 3; { rectangular box dragged by the cursor } - Gr_M_Cur_Cross = 4; { crosshair } - - Gr_M_Queue_Size = 128; { default queue size } - -type - { mouse event buffer structure } - GrMouseEvent = record - Flags, { event type flags (see above) } - x, y, { mouse coordinates } - Buttons, { mouse button state } - Key, { key code from keyboard } - KBStat: CInteger; { keybd status (ALT, CTRL, etc..) } - DTime: MedInt { time since last event (msec) } - end; - GrMouseEventPtr = ^GrMouseEvent; - -function GrMouseDetect: Boolean; asmname 'GrMouseDetect'; -procedure GrMouseEventMode(Dummy: CInteger); asmname 'GrMouseEventMode'; -procedure GrMouseInit; asmname 'GrMouseInit'; -procedure GrMouseInitN(Queue_Size: CInteger); asmname 'GrMouseInitN'; -procedure GrMouseUnInit; asmname 'GrMouseUnInit'; -procedure GrMouseSetSpeed(SPMult, SPDiv: CInteger); asmname 'GrMouseSetSpeed'; -procedure GrMouseSetAccel(Thresh, Accel: CInteger); asmname 'GrMouseSetAccel'; -procedure GrMouseSetLimits(x1, y1, x2, y2: CInteger); asmname 'GrMouseSetLimits'; -procedure GrMouseGetLimits(var x1, y1, x2, y2: CInteger); asmname 'GrMouseGetLimits'; -procedure GrMouseWarp(x, y: CInteger); asmname 'GrMouseWarp'; -procedure GrMouseEventEnable(Enable_KB, Enable_MS: Boolean); asmname 'GrMouseEventEnable'; -procedure GrMouseGetEvent(Flags: CInteger; Event: GrMouseEventPtr); asmname 'GrMouseGetEvent'; -procedure GrMouseGetEventT(Flags: CInteger; Event: GrMouseEventPtr; timout_msecs: CInteger); asmname 'GrMouseGetEventT'; -function GrMousePendingEvent: CInteger; asmname 'GrMousePendingEvent'; - -function GrMouseGetCursor: GrCursorPtr; asmname 'GrMouseGetCursor'; -procedure GrMouseSetCursor(Cursor: GrCursorPtr); asmname 'GrMouseSetCursor'; -procedure GrMouseSetColors(fg,bg: GrColor); asmname 'GrMouseSetColors'; -procedure GrMouseSetCursorMode(Mode: CInteger; x1, y1, x2, y2: CInteger; c: CInteger); asmname 'GrMouseSetCursorMode'; -procedure GrMouseDisplayCursor; asmname 'GrMouseDisplayCursor'; -procedure GrMouseEraseCursor; asmname 'GrMouseEraseCursor'; -procedure GrMouseUpdateCursor; asmname 'GrMouseUpdateCursor'; -function GrMouseCursorIsDisplayed: Boolean; asmname 'GrMouseCursorIsDisplayed'; - -function GrMouseBlock(c: GrContextPtr; x1, y1, x2, y2: CInteger): CInteger; asmname 'GrMouseBlock'; -procedure GrMouseUnBlock(Return_Value_From_GrMouseBlock: CInteger); asmname 'GrMouseUnBlock'; - -{ ================================================================== - KEYBOARD INTERFACE - ================================================================== } - -const - GrKey_NoKey = $0000; { no key available } - GrKey_OutsideValidRange = $0100; { key typed but code outside 1 .. GrKey_LastDefinedKeycode } - - { standard ASCII key codes } - GrKey_Control_A = $0001; - GrKey_Control_B = $0002; - GrKey_Control_C = $0003; - GrKey_Control_D = $0004; - GrKey_Control_E = $0005; - GrKey_Control_F = $0006; - GrKey_Control_G = $0007; - GrKey_Control_H = $0008; - GrKey_Control_I = $0009; - GrKey_Control_J = $000a; - GrKey_Control_K = $000b; - GrKey_Control_L = $000c; - GrKey_Control_M = $000d; - GrKey_Control_N = $000e; - GrKey_Control_O = $000f; - GrKey_Control_P = $0010; - GrKey_Control_Q = $0011; - GrKey_Control_R = $0012; - GrKey_Control_S = $0013; - GrKey_Control_T = $0014; - GrKey_Control_U = $0015; - GrKey_Control_V = $0016; - GrKey_Control_W = $0017; - GrKey_Control_X = $0018; - GrKey_Control_Y = $0019; - GrKey_Control_Z = $001a; - GrKey_Control_LBracket = $001b; - GrKey_Control_BackSlash = $001c; - GrKey_Control_RBracket = $001d; - GrKey_Control_Caret = $001e; - GrKey_Control_Underscore = $001f; - GrKey_Space = $0020; - GrKey_ExclamationPoint = $0021; - GrKey_DoubleQuote = $0022; - GrKey_Hash = $0023; - GrKey_Dollar = $0024; - GrKey_Percent = $0025; - GrKey_Ampersand = $0026; - GrKey_Quote = $0027; - GrKey_LParen = $0028; - GrKey_RParen = $0029; - GrKey_Star = $002a; - GrKey_Plus = $002b; - GrKey_Comma = $002c; - GrKey_Dash = $002d; - GrKey_Period = $002e; - GrKey_Slash = $002f; - GrKey_0 = $0030; - GrKey_1 = $0031; - GrKey_2 = $0032; - GrKey_3 = $0033; - GrKey_4 = $0034; - GrKey_5 = $0035; - GrKey_6 = $0036; - GrKey_7 = $0037; - GrKey_8 = $0038; - GrKey_9 = $0039; - GrKey_Colon = $003a; - GrKey_SemiColon = $003b; - GrKey_LAngle = $003c; - GrKey_Equals = $003d; - GrKey_RAngle = $003e; - GrKey_QuestionMark = $003f; - GrKey_At = $0040; - GrKey_A = $0041; - GrKey_B = $0042; - GrKey_C = $0043; - GrKey_D = $0044; - GrKey_E = $0045; - GrKey_F = $0046; - GrKey_G = $0047; - GrKey_H = $0048; - GrKey_I = $0049; - GrKey_J = $004a; - GrKey_K = $004b; - GrKey_L = $004c; - GrKey_M = $004d; - GrKey_N = $004e; - GrKey_O = $004f; - GrKey_P = $0050; - GrKey_Q = $0051; - GrKey_R = $0052; - GrKey_S = $0053; - GrKey_T = $0054; - GrKey_U = $0055; - GrKey_V = $0056; - GrKey_W = $0057; - GrKey_X = $0058; - GrKey_Y = $0059; - GrKey_Z = $005a; - GrKey_LBracket = $005b; - GrKey_BackSlash = $005c; - GrKey_RBracket = $005d; - GrKey_Caret = $005e; - GrKey_UnderScore = $005f; - GrKey_BackQuote = $0060; - GrKey_Small_a = $0061; - GrKey_Small_b = $0062; - GrKey_Small_c = $0063; - GrKey_Small_d = $0064; - GrKey_Small_e = $0065; - GrKey_Small_f = $0066; - GrKey_Small_g = $0067; - GrKey_Small_h = $0068; - GrKey_Small_i = $0069; - GrKey_Small_j = $006a; - GrKey_Small_k = $006b; - GrKey_Small_l = $006c; - GrKey_Small_m = $006d; - GrKey_Small_n = $006e; - GrKey_Small_o = $006f; - GrKey_Small_p = $0070; - GrKey_Small_q = $0071; - GrKey_Small_r = $0072; - GrKey_Small_s = $0073; - GrKey_Small_t = $0074; - GrKey_Small_u = $0075; - GrKey_Small_v = $0076; - GrKey_Small_w = $0077; - GrKey_Small_x = $0078; - GrKey_Small_y = $0079; - GrKey_Small_z = $007a; - GrKey_LBrace = $007b; - GrKey_Pipe = $007c; - GrKey_RBrace = $007d; - GrKey_Tilde = $007e; - GrKey_Control_Backspace = $007f; - - { extended key codes as defined in DJGPP } - GrKey_Alt_Escape = $0101; - GrKey_Control_At = $0103; - GrKey_Alt_Backspace = $010e; - GrKey_BackTab = $010f; - GrKey_Alt_Q = $0110; - GrKey_Alt_W = $0111; - GrKey_Alt_E = $0112; - GrKey_Alt_R = $0113; - GrKey_Alt_T = $0114; - GrKey_Alt_Y = $0115; - GrKey_Alt_U = $0116; - GrKey_Alt_I = $0117; - GrKey_Alt_O = $0118; - GrKey_Alt_P = $0119; - GrKey_Alt_LBracket = $011a; - GrKey_Alt_RBracket = $011b; - GrKey_Alt_Return = $011c; - GrKey_Alt_A = $011e; - GrKey_Alt_S = $011f; - GrKey_Alt_D = $0120; - GrKey_Alt_F = $0121; - GrKey_Alt_G = $0122; - GrKey_Alt_H = $0123; - GrKey_Alt_J = $0124; - GrKey_Alt_K = $0125; - GrKey_Alt_L = $0126; - GrKey_Alt_Semicolon = $0127; - GrKey_Alt_Quote = $0128; - GrKey_Alt_Backquote = $0129; - GrKey_Alt_Backslash = $012b; - GrKey_Alt_Z = $012c; - GrKey_Alt_X = $012d; - GrKey_Alt_C = $012e; - GrKey_Alt_V = $012f; - GrKey_Alt_B = $0130; - GrKey_Alt_N = $0131; - GrKey_Alt_M = $0132; - GrKey_Alt_Comma = $0133; - GrKey_Alt_Period = $0134; - GrKey_Alt_Slash = $0135; - GrKey_Alt_KPStar = $0137; - GrKey_F1 = $013b; - GrKey_F2 = $013c; - GrKey_F3 = $013d; - GrKey_F4 = $013e; - GrKey_F5 = $013f; - GrKey_F6 = $0140; - GrKey_F7 = $0141; - GrKey_F8 = $0142; - GrKey_F9 = $0143; - GrKey_F10 = $0144; - GrKey_Home = $0147; - GrKey_Up = $0148; - GrKey_PageUp = $0149; - GrKey_Alt_KPMinus = $014a; - GrKey_Left = $014b; - GrKey_Center = $014c; - GrKey_Right = $014d; - GrKey_Alt_KPPlus = $014e; - GrKey_End = $014f; - GrKey_Down = $0150; - GrKey_PageDown = $0151; - GrKey_Insert = $0152; - GrKey_Delete = $0153; - GrKey_Shift_F1 = $0154; - GrKey_Shift_F2 = $0155; - GrKey_Shift_F3 = $0156; - GrKey_Shift_F4 = $0157; - GrKey_Shift_F5 = $0158; - GrKey_Shift_F6 = $0159; - GrKey_Shift_F7 = $015a; - GrKey_Shift_F8 = $015b; - GrKey_Shift_F9 = $015c; - GrKey_Shift_F10 = $015d; - GrKey_Control_F1 = $015e; - GrKey_Control_F2 = $015f; - GrKey_Control_F3 = $0160; - GrKey_Control_F4 = $0161; - GrKey_Control_F5 = $0162; - GrKey_Control_F6 = $0163; - GrKey_Control_F7 = $0164; - GrKey_Control_F8 = $0165; - GrKey_Control_F9 = $0166; - GrKey_Control_F10 = $0167; - GrKey_Alt_F1 = $0168; - GrKey_Alt_F2 = $0169; - GrKey_Alt_F3 = $016a; - GrKey_Alt_F4 = $016b; - GrKey_Alt_F5 = $016c; - GrKey_Alt_F6 = $016d; - GrKey_Alt_F7 = $016e; - GrKey_Alt_F8 = $016f; - GrKey_Alt_F9 = $0170; - GrKey_Alt_F10 = $0171; - GrKey_Control_Print = $0172; - GrKey_Control_Left = $0173; - GrKey_Control_Right = $0174; - GrKey_Control_End = $0175; - GrKey_Control_PageDown = $0176; - GrKey_Control_Home = $0177; - GrKey_Alt_1 = $0178; - GrKey_Alt_2 = $0179; - GrKey_Alt_3 = $017a; - GrKey_Alt_4 = $017b; - GrKey_Alt_5 = $017c; - GrKey_Alt_6 = $017d; - GrKey_Alt_7 = $017e; - GrKey_Alt_8 = $017f; - GrKey_Alt_9 = $0180; - GrKey_Alt_0 = $0181; - GrKey_Alt_Dash = $0182; - GrKey_Alt_Equals = $0183; - GrKey_Control_PageUp = $0184; - GrKey_F11 = $0185; - GrKey_F12 = $0186; - GrKey_Shift_F11 = $0187; - GrKey_Shift_F12 = $0188; - GrKey_Control_F11 = $0189; - GrKey_Control_F12 = $018a; - GrKey_Alt_F11 = $018b; - GrKey_Alt_F12 = $018c; - GrKey_Control_Up = $018d; - GrKey_Control_KPDash = $018e; - GrKey_Control_Center = $018f; - GrKey_Control_KPPlus = $0190; - GrKey_Control_Down = $0191; - GrKey_Control_Insert = $0192; - GrKey_Control_Delete = $0193; - GrKey_Control_Tab = $0194; - GrKey_Control_KPSlash = $0195; - GrKey_Control_KPStar = $0196; - GrKey_Alt_KPSlash = $01a4; - GrKey_Alt_Tab = $01a5; - GrKey_Alt_Enter = $01a6; - - { some additional codes not in DJGPP } - GrKey_Alt_LAngle = $01b0; - GrKey_Alt_RAngle = $01b1; - GrKey_Alt_At = $01b2; - GrKey_Alt_LBrace = $01b3; - GrKey_Alt_Pipe = $01b4; - GrKey_Alt_RBrace = $01b5; - GrKey_Print = $01b6; - GrKey_Shift_Insert = $01b7; - GrKey_Shift_Home = $01b8; - GrKey_Shift_End = $01b9; - GrKey_Shift_PageUp = $01ba; - GrKey_Shift_PageDown = $01bb; - GrKey_Alt_Up = $01bc; - GrKey_Alt_Left = $01bd; - GrKey_Alt_Center = $01be; - GrKey_Alt_Right = $01c0; - GrKey_Alt_Down = $01c1; - GrKey_Alt_Insert = $01c2; - GrKey_Alt_Delete = $01c3; - GrKey_Alt_Home = $01c4; - GrKey_Alt_End = $01c5; - GrKey_Alt_PageUp = $01c6; - GrKey_Alt_PageDown = $01c7; - GrKey_Shift_Up = $01c8; - GrKey_Shift_Down = $01c9; - GrKey_Shift_Right = $01ca; - GrKey_Shift_Left = $01cb; - - { this may be usefull for table allocation ... } - GrKey_LastDefinedKeycode = GrKey_Shift_Left; - - { some well known synomyms } - GrKey_BackSpace = GrKey_Control_H; - GrKey_Tab = GrKey_Control_I; - GrKey_LineFeed = GrKey_Control_J; - GrKey_Escape = GrKey_Control_LBracket; - GrKey_Return = GrKey_Control_M; - -type - GrKeyType = ShortInt; - -{ new functions to replace the old style - kbhit / getch / getkey / getxkey / getkbstat - keyboard interface } -function GrKeyPressed: CInteger; asmname 'GrKeyPressed'; -function GrKeyRead: GrKeyType; asmname 'GrKeyRead'; -function GrKeyStat: CInteger; asmname 'GrKeyStat'; - -{ ================================================================== - MISCELLANEOUS UTILITIY FUNCTIONS - ================================================================== } - -procedure GrResizeGrayMap (var Map; Pitch, ow, oh, nw, nh: CInteger); asmname 'GrResizeGrayMap'; -function GrMatchString (Pattern, Strg: CString): CInteger; asmname 'GrMatchString'; -procedure GrSetWindowTitle (Title: CString); asmname 'GrSetWindowTitle'; -procedure GrSleep (MSec: CInteger); asmname 'GrSleep'; -procedure GrFlush; asmname 'GrFlush'; - -{ ================================================================== - PNM FUNCTIONS - ================================================================== } - -{ The PNM formats, grx support load/save of binaries formats (4,5,6) only } - -const - PlainPBMFormat = 1; - PlainPGMFormat = 2; - PlainPPMFormat = 3; - PBMFormat = 4; - PGMFormat = 5; - PPMFormat = 6; - -{ The PNM functions } - -function GrSaveContextToPbm (grc: GrContextPtr; FileName, Comment: CString): CInteger; asmname 'GrSaveContextToPbm'; -function GrSaveContextToPgm (grc: GrContextPtr; FileName, Comment: CString): CInteger; asmname 'GrSaveContextToPgm'; -function GrSaveContextToPpm (grc: GrContextPtr; FileName, Comment: CString): CInteger; asmname 'GrSaveContextToPpm'; -function GrLoadContextFromPnm (grc: GrContextPtr; FileName: CString): CInteger; asmname 'GrLoadContextFromPnm'; -function GrQueryPnm (FileName: CString; var Width, Height, MaxVal: CInteger): CInteger; asmname 'GrQueryPnm'; -function GrLoadContextFromPnmBuffer (grc: GrContextPtr; protected var Buffer): CInteger; asmname 'GrLoadContextFromPnmBuffer'; -function GrQueryPnmBuffer (protected var Buffer; var Width, Height, MaxVal: CInteger): CInteger; asmname 'GrQueryPnmBuffer'; - -{ ================================================================== - ADDON FUNCTIONS - these functions may not be installed or available on all systems - ================================================================== } - -function GrPngSupport: CInteger; asmname 'GrPngSupport'; -function GrSaveContextToPng (grc: GrContextPtr; FileName: CString): CInteger; asmname 'GrSaveContextToPng'; -function GrLoadContextFromPng (grc: GrContextPtr; FileName: CString; UseAlpha: CInteger): CInteger; asmname 'GrLoadContextFromPng'; -function GrQueryPng (FileName: CString; var Width, Height: CInteger): CInteger; asmname 'GrQueryPng'; - -{ SaveContextToTiff - Dump a context in a TIFF file - - Arguments: - cxt: Context to be saved (nil -> use current context) - tiffn: Name of tiff file - compr: Compression method (see tiff.h), 0: automatic selection - docn: string saved in the tiff file (DOCUMENTNAME tag) - - Returns 0 on success - -1 on error - - requires tifflib by Sam Leffler (sam@engr.sgi.com) - available at ftp://ftp.sgi.com/graphics/tiff } -function SaveContextToTiff(Cxt: GrContextPtr; TiffN: CString; Compr: CInteger; DocN: CString): CInteger; asmname 'SaveContextToTiff'; - -{ GrSaveContextToJpeg - Dump a context in a JPEG file - - Arguments: - grc: Context to be saved (nil -> use current context) - Filename: Name of the jpeg file - accuracy: Accuracy percentage (100 for no loss of quality) - - Returns 0 on success - -1 on error - - requires jpeg-6a by IJG (Independent JPEG Group) - available at ftp.uu.net as graphics/jpeg/jpegsrc.v6a.tar.gz } -function GrSaveContextToJpeg(grc: GrContextPtr; FileName: CString; Accuracy: CInteger): CInteger; asmname 'GrSaveContextToJpeg'; -function GrSaveContextToGrayJpeg(grc: GrContextPtr; FileName: CString; Accuracy: CInteger): CInteger; asmname 'GrSaveContextToGrayJpeg'; -function GrJpegSupport: CInteger; asmname 'GrJpegSupport'; -function GrLoadContextFromJpeg(grc: GrContextPtr; FileName: CString; Scale: CInteger): CInteger; asmname 'GrLoadContextFromJpeg'; -function GrQueryJpeg(FileName: CString; var Width, Height: CInteger): CInteger; asmname 'GrQueryJpeg'; - -implementation - -end. diff --git a/thirdparty/grx249/pascal/imgview.pas b/thirdparty/grx249/pascal/imgview.pas deleted file mode 100644 index 81215e9..0000000 --- a/thirdparty/grx249/pascal/imgview.pas +++ /dev/null @@ -1,139 +0,0 @@ -{ PNG and JPEG viewer demo for GRX. - - Copyright (C) 2001 Frank Heckenbach - - This file is free software; as a special exception the author - gives unlimited permission to copy and/or distribute it, with or - without modifications, as long as this notice is preserved. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY, to the extent permitted by law; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. } - -program ImgViewer; - -uses GPC, GRX; - -var - GraphicsActive: Boolean = False; - -procedure CloseGraph; -var Dummy: Integer; -begin - if GraphicsActive then Dummy := GrSetMode (Gr_Default_Text, 0, 0, 0, 0, 0); - GraphicsActive := False -end; - -procedure Warning (const Msg: String); -begin - WriteLn (StdErr, ParamStr (0), ': ', Msg) -end; - -procedure Error (const Msg: String); -begin - CloseGraph; - Warning (Msg); - Halt (1) -end; - -procedure OpenGraph (GWidth, GHeight: Integer); -var Width, Height: Integer; -begin - Width := (GWidth + 7) div 8 * 8; - Height := GHeight; - if GrSetMode (Gr_Width_Height_BPP_Graphics, Width, Height, 24, 0, 0) <> 1 then - Error ('could not initialize graphics'); - GraphicsActive := True -end; - -var - ImgFileName: TString; - ArgStart, ArgN, Key: Integer; - ImgWidth, ImgHeight: CInteger; - grc: GrContextPtr; - Centered: Boolean; - -begin - { Handle command-line arguments } - Centered := ParamStr (1) = '-c'; - ArgStart := 1 + Ord (Centered); - if ParamCount < ArgStart then - begin - WriteLn (StdErr, 'Usage: ', ParamStr (0), ' [-c] PNG-or-JPEG-file...'); - WriteLn (StdErr, ' -c Center images in a larger window'); - Halt (1) - end; - - { Check if library supports PNG and/or JPEG } - if GrPngSupport = 0 then - if GrJpegSupport = 0 then - Error ('your version of GRX was compiled without PNG and JPEG support, sorry.') - else - Warning ('your version of GRX was compiled without PNG support, PNGs will not be recognized') - else if GrJpegSupport = 0 then - Warning ('your version of GRX was compiled without JPEG support, JPEGs will not be recognized'); - - for ArgN := ArgStart to ParamCount do - begin - ImgFileName := ParamStr (ArgN); - if not FileExists (ImgFileName) then - Error ('file `' + ImgFileName + ''' not found'); - - { PNG files } - { Check if file is PNG and get its size } - if GrQueryPng (ImgFileName, ImgWidth, ImgHeight) = 0 then - begin - if not Centered then - begin - - { Simple example: window size = image size } - OpenGraph (ImgWidth, ImgHeight); - if GrLoadContextFromPng (nil, ImgFileName, 0) <> 0 then - Error ('could not load ' + ImgFileName) - - end - else - begin - - { More complex example: window larger than image, display image centered } - OpenGraph (2 * ImgWidth, 2 * ImgHeight); - GrClearScreen (GrWhite); - grc := GrCreateSubContext (Max (0, (GrScreenX - ImgWidth) div 2), - Max (0, (GrScreenY - ImgHeight) div 2), - GrScreenX, GrScreenY, nil, nil); - if GrLoadContextFromPng (grc, ImgFileName, 0) <> 0 then - Error ('could not load ' + ImgFileName); - GrDestroyContext (grc) - - end - end - - { Same for JPEG files (see the comments for PNG above) } - else if GrQueryJpeg (ImgFileName, ImgWidth, ImgHeight) = 0 then - begin - if not Centered then - begin - OpenGraph (ImgWidth, ImgHeight); - if GrLoadContextFromJpeg (nil, ImgFileName, 1) <> 0 then - Error ('could not load ' + ImgFileName) - end - else - begin - OpenGraph (2 * ImgWidth, 2 * ImgHeight); - GrClearScreen (GrWhite); - grc := GrCreateSubContext (Max (0, (GrScreenX - ImgWidth) div 2), - Max (0, (GrScreenY - ImgHeight) div 2), - GrScreenX, GrScreenY, nil, nil); - if GrLoadContextFromJpeg (grc, ImgFileName, 1) <> 0 then - Error ('could not load ' + ImgFileName); - GrDestroyContext (grc) - end - end - - else - Error (ImgFileName + ' does not seem to be a PNG or JPEG file'); - Key := GrKeyRead; - CloseGraph - end -end. diff --git a/thirdparty/grx249/pascal/jpgtest.pas b/thirdparty/grx249/pascal/jpgtest.pas deleted file mode 100644 index 09bbf8c..0000000 --- a/thirdparty/grx249/pascal/jpgtest.pas +++ /dev/null @@ -1,114 +0,0 @@ -(** - ** jpgtest.pas ---- test the ctx2jpeg routines - ** - ** Copyright (c) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - **) - -{$X+} - -program jpgtest; - -uses GPC, GRX; - -var grc: GrContextPtr; - -procedure imagen( nf: String; Scale: Integer ); -var - grc : GrContextPtr; - Width, Height : Integer; - s : String[81]; - w, h : CInteger; -begin - GrQueryJpeg( nf,w,h ); - WriteStr( s,nf,' ',w,' ',h,' Scale 1/',Scale ); - Width := min(600 , w div Scale); - Height := min(400 , h div Scale); - GrClearScreen( GrAllocColor( 0,0,200 ) ); - - GrBox( 10,40,10+Width+1,40+Height+1,GrWhite ); - grc := GrCreateSubContext( 11,41,11+Width-1,41+Height-1,NIL,NIL ); - GrLoadContextFromJpeg( grc,nf,Scale ); - GrDestroyContext( grc ); - - GrTextXY( 10,10,s,GrBlack,GrWhite ); - GrTextXY( 10,50+Height,'Press any key to continue',GrBlack,GrWhite ); - GrKeyRead -end; - -procedure nojpegsupport; -const - s: array[0..5] of String[50] = ( - 'Warning!', - 'You need libjpeg (http://www.ijg.org) and enable', - 'jpeg support in the GRX lib (edit makedefs.grx)', - 'to run this demo', - ' ', - 'Press any key to continue...' ); -var - i: Integer; -begin - GrClearScreen( GrAllocColor( 0,0,100 ) ); - for i:=0 to 5 do - GrTextXY( 90,160+i*18,s[i],GrWhite,GrNoColor); - GrKeyRead -end; - -begin - GrSetMode( Gr_Width_Height_BPP_Graphics,640,480,24,0,0 ); - - if GrJpegSupport = 0 then begin - nojpegsupport; - GrSetMode(Gr_Default_Text,0,0,0,0,0); - halt( 1 ); - end; - - imagen( '../test/jpeg1.jpg',1 ); - imagen( '../test/jpeg1.jpg',2 ); - imagen( '../test/jpeg1.jpg',4 ); - imagen( '../test/jpeg1.jpg',8 ); - imagen( '../test/jpeg2.jpg',1 ); - imagen( '../test/jpeg2.jpg',2 ); - imagen( '../test/jpeg2.jpg',4 ); - imagen( '../test/jpeg2.jpg',8 ); - - GrClearScreen( GrAllocColor( 0,100,0 ) ); - grc := GrCreateSubContext( 10,40,10+400-1,40+300-1,NIL,NIL ); - GrLoadContextFromJpeg( grc,'../test/jpeg1.jpg',2 ); - GrDestroyContext( grc ); - grc := GrCreateSubContext( 210,150,210+400-1,150+300-1,NIL,NIL ); - GrLoadContextFromJpeg( grc,'../test/jpeg2.jpg',2 ); - GrDestroyContext( grc ); - - GrTextXY( 10,10,'Press any key to save color and gray screen',GrBlack,GrWhite ); - GrKeyRead; - - GrSaveContextToJpeg( NIL,'p.jpg',75 ); - GrSaveContextToGrayJpeg( NIL,'pgray.jpg',75 ); - - GrClearScreen( GrBlack ); - GrTextXY( 10,10,'Press any key to reload color screen ',GrBlack,GrWhite ); - GrKeyRead; - GrLoadContextFromJpeg( NIL,'p.jpg',1 ); - - GrTextXY( 10,10,'Press any key to reload gray screen ',GrBlack,GrWhite ); - GrKeyRead; - GrClearScreen(GrBlack); - GrLoadContextFromJpeg( NIL,'pgray.jpg',1 ); - - GrTextXY( 10,10,'Press any key to end ',GrBlack,GrWhite ); - GrKeyRead; - - GrSetMode(Gr_Default_Text,0,0,0,0,0) -end. diff --git a/thirdparty/grx249/pascal/keytest.pas b/thirdparty/grx249/pascal/keytest.pas deleted file mode 100644 index da9e9db..0000000 --- a/thirdparty/grx249/pascal/keytest.pas +++ /dev/null @@ -1,46 +0,0 @@ -program KeyTest; - -uses GRX; - -var - MouseMode, DrawMode, - m, x, y, co : Integer; - evt: GrMouseEvent; - Key : Char; - Finito : boolean; - -procedure MouseRoutine; - var st: String[80]; -begin - if (evt.Flags and Gr_M_KeyPress) > 0 then begin - Key := Chr (evt.Key and $FF); - writestr(st,'Key :', Key:2, Ord(Key):4, evt.Key mod 256: 4, evt.Key div 256: 4, evt.Key: 6); - GrTextXY(evt.x,evt.y,st,GrWhite,GrBlack); - case evt.Key of - 81, 113 : Finito := true; {'Q', 'q'} - end; - end; -end; - -begin - x := 640; - y := 480; - co := 256; - m := GrSetMode(Gr_Default_Graphics,x,y,co,0,0); - - if GrMouseDetect then begin - GrMouseEventMode(1); - GrMouseInit; - GrMouseDisplayCursor; - DrawMode := 0; - MouseMode := 4; - end else - exit; - - GrTextXY(0,0,'Use ''Q'' to Quit',GrWhite,GrBlack); - repeat - Finito := false; - GrMouseGetEventT(Gr_M_Event,@evt,0); - if evt.Flags > 0 then MouseRoutine; - until Finito -end. diff --git a/thirdparty/grx249/pascal/makefile b/thirdparty/grx249/pascal/makefile deleted file mode 100644 index eef5674..0000000 --- a/thirdparty/grx249/pascal/makefile +++ /dev/null @@ -1,50 +0,0 @@ -# -------------------------------- -# Check, if the paths are correct -# -------------------------------- - -# Set the library-path to libgrx -GRXLIB = -L/usr/X11R6/lib - -# Set the library-path to libjpeg and libtiff -GRAPHICSLIB = -L/usr/lib - -# Compiler and options on your system -COMPILER = $(PC) --automake -Wall - -# -------------------------------------------- -# I Think, you don't need to change from here -# -------------------------------------------- - -all: blt_test modetest keytest txt_test vir_test polytest jpgtest colortst imgview - -blt_test:blt_test.pas - $(COMPILER) $(GRXLIB) $(GRAPHICSLIB) blt_test.pas -oblt_test - -modetest:modetest.pas - $(COMPILER) $(GRXLIB) $(GRAPHICSLIB) modetest.pas -omodetest - -keytest: keytest.pas - $(COMPILER) $(GRXLIB) $(GRAPHICSLIB) keytest.pas -okeytest - -txt_test:txt_test.pas - $(COMPILER) $(GRXLIB) $(GRAPHICSLIB) txt_test.pas -otxt_test - -vir_test:vir_test.pas - $(COMPILER) $(GRXLIB) $(GRAPHICSLIB) vir_test.pas -ovir_test - -polytest:polytest.pas - $(COMPILER) $(GRXLIB) $(GRAPHICSLIB) polytest.pas -opolytest - -jpgtest:jpgtest.pas - $(COMPILER) $(GRXLIB) $(GRAPHICSLIB) jpgtest.pas -ojpgtest - -colortst:colortst.pas - $(COMPILER) $(GRXLIB) $(GRAPHICSLIB) colortst.pas -ocolortst - -imgview:imgview.pas - $(COMPILER) $(GRXLIB) $(GRAPHICSLIB) imgview.pas -oimgview - -clean: - rm -f *.o *.gpi blt_test modetest keytest txt_test vir_test polytest jpgtest colortst imgview - - diff --git a/thirdparty/grx249/pascal/makefile.dj2 b/thirdparty/grx249/pascal/makefile.dj2 deleted file mode 100644 index cd25ec1..0000000 --- a/thirdparty/grx249/pascal/makefile.dj2 +++ /dev/null @@ -1,53 +0,0 @@ -# -# GRX test programs makefile for DJGPP v2. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean - -GRXVDJ2=y - -include ../makedefs.grx - -# The following line is useful only in this makefile to force recompilation -GRXLIB = ../lib/$(GRX_LIB_SUBDIR)/libgrx20.a -# In normal use the library libgrx20.a is linked in through -# {$L grx20} contained in the unit grx.pas called by "uses grx". -# The same is valid for other ADDON libraries. -# If the library is NOT installed give its path -# (default when first compiling/testing the library) -GRXLIBPATH = -L../lib/$(GRX_LIB_SUBDIR) -# When it is installed in a standard system location -# (normal use) this is no more necessary - -LIBS= $(GRXLIBPATH) - -# Compiler and options on your system -COMPILER = $(PC) --automake - - -PROGS= \ - blt_test.exe \ - modetest.exe \ - keytest.exe \ - txt_test.exe \ - vir_test.exe \ - polytest.exe \ - jpgtest.exe \ - colortst.exe \ - imgview.exe - -all: $(PROGS) - -$(PROGS): %.exe : %.pas $(GRXLIB) grx.pas - $(COMPILER) $(CCOPT) -o $*.exe $*.pas $(LDOPT) $(LIBS) - -clean: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f *.o *.exe *.gpi *.gpm -else - if exist *.o del *.o - if exist *.exe del *.exe - if exist *.gpi del *.gpi - if exist *.gpm del *.gpm -endif diff --git a/thirdparty/grx249/pascal/makefile.lnx b/thirdparty/grx249/pascal/makefile.lnx deleted file mode 100644 index 2189629..0000000 --- a/thirdparty/grx249/pascal/makefile.lnx +++ /dev/null @@ -1,54 +0,0 @@ -# -# GRX test programs makefile for LINUX/console. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean - -GRXVLNX=y - -include ../makedefs.grx - -# The following line is useful only in this makefile to force recompilation -GRXLIB = ../lib/$(GRX_LIB_SUBDIR)/libgrx20.a -# In normal use the library libgrx20.a or libgrx20.so is linked in through -# {$L grx20} contained in the unit grx.pas called by "uses grx". -# The same is valid for other ADDON libraries. -# If the library is NOT installed give its path -# (default when first compiling/testing the library) -GRXLIBPATH = -L../lib/$(GRX_LIB_SUBDIR) -# When it is installed in a standard system location -# (normal use) this is no more necessary - -ifeq ($(SET_SUIDROOT),y) -EXECBITS = 4755 -else -EXECBITS = 0755 -endif - -LIBS= $(GRXLIBPATH) - -# Compiler and options on your system -COMPILER = $(PC) --automake - - -PROGS= \ - blt_test \ - modetest \ - keytest \ - txt_test \ - vir_test \ - polytest \ - jpgtest \ - colortst \ - imgview - -all: $(PROGS) - -$(PROGS): % : %.pas $(GRXLIB) grx.pas - $(COMPILER) $(CCOPT) -o $* $*.pas $(LIBS) - chmod $(EXECBITS) $@ - -clean: - rm -f *.o *.gpi *.gpm $(PROGS) - diff --git a/thirdparty/grx249/pascal/makefile.sdl b/thirdparty/grx249/pascal/makefile.sdl deleted file mode 100644 index b434380..0000000 --- a/thirdparty/grx249/pascal/makefile.sdl +++ /dev/null @@ -1,50 +0,0 @@ -# -# GRX test programs makefile for SDL. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean - -GRXVSDL=y - -include ../makedefs.grx - -# The following line is useful only in this makefile to force recompilation -GRXLIB = ../lib/$(GRX_LIB_SUBDIR)/libgrx20S.a -# In normal use the library libgrx20S.a is linked in through -# {$L grx20S} contained in the unit grx.pas called by "uses grx". -# The same is valid for other ADDON libraries. -# If the library is NOT installed give its path -# (default when first compiling/testing the library) -GRXLIBPATH = -L../lib/$(GRX_LIB_SUBDIR) -# When it is installed in a standard system location -# (normal use) this is no more necessary - -ifneq ($(EP),x) - EX = .exe -endif - -LIBS = $(GRXLIBPATH) - -# Compiler and options on your system -COMPILER = $(PC) --autobuild - - -PROGS= \ - $(EP)blt_test$(EX) \ - $(EP)modetest$(EX) \ - $(EP)keytest$(EX) \ - $(EP)txt_test$(EX) \ - $(EP)vir_test$(EX) \ - $(EP)polytest$(EX) \ - $(EP)jpgtest$(EX) \ - $(EP)colortst$(EX) \ - $(EP)imgview$(EX) - -all: $(PROGS) - -$(PROGS): $(EP)%$(EX) : %.pas $(GRXLIB) grx.pas - $(COMPILER) $(CCOPT) -o $@ $*.pas $(LDOPT) $(LIBS) - -clean: - rm -f *.o *.gpi *.gpm $(PROGS) diff --git a/thirdparty/grx249/pascal/makefile.w32 b/thirdparty/grx249/pascal/makefile.w32 deleted file mode 100644 index dd1f775..0000000 --- a/thirdparty/grx249/pascal/makefile.w32 +++ /dev/null @@ -1,58 +0,0 @@ -# -# GRX test programs makefile for mingw32. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean - -GRXVW32=y - -include ../makedefs.grx - -# The following line is useful only in this makefile to force recompilation -GRXLIB = ../lib/$(GRX_LIB_SUBDIR)/libgrx20.a -# In normal use the library libgrx20.a is linked in through -# {$L grx20} contained in the unit grx.pas called by "uses grx". -# The same is valid for other ADDON libraries. -# If the library is NOT installed give its path -# (default when first compiling/testing the library) -GRXLIBPATH = -L../lib/$(GRX_LIB_SUBDIR) -# When it is installed in a standard system location -# (normal use) this is no more necessary - -LIBS= $(GRXLIBPATH) -mwindows - -# Compiler and options on your system -COMPILER = $(PC) --autobuild - - -PROGS= \ - blt_test.exe \ - keytest.exe \ - txt_test.exe \ - vir_test.exe \ - jpgtest.exe \ - colortst.exe \ - imgview.exe - -PROGS_C= \ - polytest.exe \ - modetest.exe - -all: $(PROGS) $(PROGS_C) - -$(PROGS): %.exe : %.pas $(GRXLIB) grx.pas - $(COMPILER) $(CCOPT) -o $*.exe $*.pas $(LIBS) - -$(PROGS_C): %.exe : %.pas $(GRXLIB) grx.pas - $(COMPILER) $(CCOPT) -o $*.exe $*.pas $(LIBS) -mconsole - -clean: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f *.o *.exe *.gpi *.gpm -else - if exist *.o del *.o - if exist *.exe del *.exe - if exist *.gpi del *.gpi - if exist *.gpm del *.gpm -endif diff --git a/thirdparty/grx249/pascal/makefile.x11 b/thirdparty/grx249/pascal/makefile.x11 deleted file mode 100644 index 93eff90..0000000 --- a/thirdparty/grx249/pascal/makefile.x11 +++ /dev/null @@ -1,61 +0,0 @@ -# -# GRX test programs makefile for LINUX/X11. Uses GNU make. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean - -GRXVX11=y - -include ../makedefs.grx - -# The following line is useful only in this makefile to force recompilation -GRXLIB = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X.a -# In normal use the library libgrx20X.a or libgrx20X.so is linked in through -# {$L grx20X} contained in the unit grx.pas called by "uses grx". -# The same is valid for other ADDON libraries. -# If the library is NOT installed give its path -# (default when first compiling/testing the library) -GRXLIBPATH = -L../lib/$(GRX_LIB_SUBDIR) -# When it is installed in a standard system location -# (normal use) this is no more necessary - -ifeq ($(SET_XSUIDROOT),y) -EXECBITS = 4755 -else -EXECBITS = 0755 -endif - -ADDON_LIBS= - -ifeq ($(USE_XF86DGA_DRIVER),y) - ADDON_LIBS += -lXxf86dga -lXext #NOT included in grx.pas -endif - -LIBS= $(GRXLIBPATH) $(ADDON_LIBS) - -# Compiler and options on your system -COMPILER = $(PC) --automake - - -PROGS= \ - xblt_test \ - xmodetest \ - xkeytest \ - xtxt_test \ - xvir_test \ - xpolytest \ - xjpgtest \ - xcolortst \ - ximgview - -all: $(PROGS) - -$(PROGS): x% : %.pas $(GRXLIB) grx.pas - $(COMPILER) $(CCOPT) -o $@ $*.pas $(LIBS) - chmod $(EXECBITS) $@ - -clean: - rm -f *.o *.gpi *.gpm $(PROGS) - - diff --git a/thirdparty/grx249/pascal/modetest.pas b/thirdparty/grx249/pascal/modetest.pas deleted file mode 100644 index 5337a5e..0000000 --- a/thirdparty/grx249/pascal/modetest.pas +++ /dev/null @@ -1,32 +0,0 @@ -{$X+} - -program Vir_Test; - -uses GRX; - -var - i, f, m : Integer; - gvm : GrVideoMode; - fivm : GrVideoModePtr; - -begin - { intializes grx20 } - m := GrSetMode(Gr_Default_Text, 0, 0, 0, 0, 0); - - GrSetModeRestore(False); - - for f := Gr_Unknown_Mode to Gr_FrameSVGA32H do begin - fivm := GrFirstVideoMode(f); - while fivm <> Nil do begin - gvm := fivm^; - i := i + 1; - Write (i:3); - Write (f:3); - Write (gvm.Mode:6); - Write (gvm.Width:5, 'x',gvm.Height:4, 'x', gvm.BPP:3); - WriteLn; - fivm := GrNextVideoMode(fivm) - end - end; - Readln -end. diff --git a/thirdparty/grx249/pascal/polytest.pas b/thirdparty/grx249/pascal/polytest.pas deleted file mode 100644 index fba7c38..0000000 --- a/thirdparty/grx249/pascal/polytest.pas +++ /dev/null @@ -1,148 +0,0 @@ -(** - ** polytest.pas ---- test polygon rendering - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **) - -{$R-} - -program polytest; - -uses GPC, GRX, Test; - -type WrkString = String[80]; - -var f : Text; - Line,msg : WrkString; - nb : Integer; - convex,collect : boolean; - k : GrKeyType; - polygon : array [0..300] of PointType; - pEGA : GrColorsPtr; - black,white,red : GrColor; - -procedure TestPoly(n:Integer; var Points: array of PointType; convex:boolean); -begin - GrClearScreen(black); - GrPolygon(n,Points,white); - GrFilledPolygon(n,Points,(red or GrXor)); - k:=GrKeyRead; - if convex or (n <= 3) then begin - GrClearScreen(black); - GrFilledPolygon(n,Points,white); - GrFilledConvexPolygon(n,Points,(red or GrXor)); - k:=GrKeyRead - end -end; - -procedure SpeedTest; -var - pts : array[0..3,0..1] of CInteger; - ww : Integer = GrSizeX div 10; - hh : Integer = GrSizeY div 10; - sx : Integer = (GrSizeX - 2*ww) div 32; - sy : Integer = (GrSizeY - 2*hh) div 32; - ii,jj : Integer; - color : GrColor; - t1,t2,t3,mu1,mu2,mu3: CInteger; -begin - GrClearScreen(black); - t1 := GetCPUTime(mu1); - pts[0][1] := 0; - pts[1][1] := hh; - pts[2][1] := 2*hh; - pts[3][1] := hh; - color := 0; - for ii := 0 to 31 do begin - pts[0][0] := ww; - pts[1][0] := 2*ww; - pts[2][0] := ww; - pts[3][0] := 0; - for jj := 0 to 31 do begin - GrFilledPolygon(4,pts, pEGA^[color] or GrXor); - color := (color + 1) and 15; - Inc(pts[0][0],sx); - Inc(pts[1][0],sx); - Inc(pts[2][0],sx); - Inc(pts[3][0],sx); - end; - Inc(pts[0][1],sy); - Inc(pts[1][1],sy); - Inc(pts[2][1],sy); - Inc(pts[3][1],sy); - end; - t2 := GetCPUTime(mu2); - pts[0][1] := 0; - pts[1][1] := hh; - pts[2][1] := 2*hh; - pts[3][1] := hh; - color := 0; - for ii := 0 to 31 do begin - pts[0][0] := ww; - pts[1][0] := 2*ww; - pts[2][0] := ww; - pts[3][0] := 0; - for jj := 0 to 31 do begin - GrFilledConvexPolygon(4,pts, pEGA^[color] or GrXor); - color := (color + 1) and 15; - Inc(pts[0][0],sx); - Inc(pts[1][0],sx); - Inc(pts[2][0],sx); - Inc(pts[3][0],sx); - end; - Inc(pts[0][1],sy); - Inc(pts[1][1],sy); - Inc(pts[2][1],sy); - Inc(pts[3][1],sy); - end; - t3 := GetCPUTime(mu3); - GrTextXY(0, 0, 'Times to scan 1024 polygons', white, black); - WriteStr(msg, ' with GrFilledPolygon: ',((t2+mu2/1e6)-(t1+mu1/1e6)):0:2,' (s)'); - GrTextXY(0, 18, msg, white, black); - WriteStr(msg, ' with GrFilledConvexPolygon: ',((t3+mu3/1e6)-(t2+mu2/1e6)):0:2,' (s)'); - GrTextXY(0, 36, msg, white, black); -end; - -begin - InitTest; - pEGA:=GrAllocEgaColors; - black:=pEGA^[0]; red:=pEGA^[12]; white:=pEGA^[15]; - - Assign(f,'../test/polytest.dat'); Reset(f); - collect:=false; - while not eof(f) do begin - ReadLn(f,Line); - if not collect then begin - if Copy(Line,1,5)='begin' then begin - collect:=true; - convex := Line[6]='c'; - nb:=0; - end - end else begin - if Copy(Line,1,3)='end' then begin - if nb>0 then TestPoly(nb,polygon,convex); - collect:=false; - end else begin - with polygon[nb] do ReadStr(Line,x, y); - Inc(nb); - end; - end; - end; - Close(f); - SpeedTest; - k:=GrKeyRead; - EndTest -end. diff --git a/thirdparty/grx249/pascal/readme b/thirdparty/grx249/pascal/readme deleted file mode 100644 index 27e95da..0000000 --- a/thirdparty/grx249/pascal/readme +++ /dev/null @@ -1,51 +0,0 @@ - -Welcome to the wonderful world of GRX for pascal-users. -======================================================= - -If you are interested in GNU-Pascal (gpc), visit -http://gnu-pascal.de/gpc/h-index.html -There is a mailinglist available. - -This directory contains several test-programs for GRX -and GNU-Pascal. - -* blt_test.pas draws some circles -* modetest.pas prints out the available modes -* keytest.pas prints out the character-codes. Use "Q" to quit. -* txt_test.pas prints out some text. Press Return to exit. -* vir_test.pas lets you draw something. - Press "1", to place some sqares with the mouse. - Press "2" to draw some lines - Press "3" to copy some drawings from one place to another - ("<" and ">" change the size of your "copy-area") - Press "4" to draw whatever you like :-) - Press "0" to leave drawing-mode - "Q" leaves vir_test. -* polytest.pas draws some polygons -* jpgtest.pas loads/saves jpeg images -* imgview.pas loads png and jpeg images -* colortst.pas tests allocating many colors - -To build up the programs, either - -- use the generic makefile and edit the paths, then type - make - -- For djgpp, mingw32, LINUX/svga and LINUX/X11, sdl, they should -have been built with the library and C tests from top level makefile, -if you used them. -If you want to rebuild only the tests type from this dir - make -f -Pathes and parameters will be borrowed from corresponding top level -makedefs files - -Have fun! - - - - - - - - - diff --git a/thirdparty/grx249/pascal/test.pas b/thirdparty/grx249/pascal/test.pas deleted file mode 100644 index 47e8e2b..0000000 --- a/thirdparty/grx249/pascal/test.pas +++ /dev/null @@ -1,55 +0,0 @@ -unit Test; - -interface - -uses GRX; - -var exit_message: String [1000]; - -procedure InitTest; -procedure EndTest; - -implementation - -procedure InitTest; - var m,n,i: Integer; - w,h,c,xv,yv: Integer = 0; -begin - if ParamCount < 2 then - m := GrSetMode(Gr_Default_Graphics,0,0,0,0,0) - else begin - for n:=1 to ParamCount do begin - ReadStr(ParamStr(n),i); - if n = 3 then - case ParamStr(n)[Length(ParamStr(n))] of - 'k','K': i := i shl 10; - 'm','M': i := i shl 20; - end; - case n of - 1: w := i; - 2: h := i; - 3: c := i; - 4: xv := i; - 5: yv := i; - end - end; - if ParamCount = 5 then - m := GrSetMode(Gr_Custom_Graphics,w,h,c,xv,yv) - else if ParamCount = 2 then - m := GrSetMode(Gr_Width_Height_Graphics,w,h,0,0,0) - else - m := GrSetMode(Gr_Width_Height_Color_Graphics,w,h,c,0,0) - end -end; - -procedure EndTest; - var m:Integer; -begin - m:=GrSetMode(Gr_Default_Text,0,0,0,0,0); - if exit_message <> '' then begin - WriteLn(exit_message); - Readln - end -end; - -end. diff --git a/thirdparty/grx249/pascal/txt_test.pas b/thirdparty/grx249/pascal/txt_test.pas deleted file mode 100644 index b219ba2..0000000 --- a/thirdparty/grx249/pascal/txt_test.pas +++ /dev/null @@ -1,83 +0,0 @@ -{$X+} - -program Text_Test; - -uses GRX; - -procedure TestFunc; -var - x, y, ww, wh, ii, jj, c : Integer; - -begin - x := GrSizeX; - y := GrSizeY; - ww := round((x-10)/32); - wh := round((y-10)/8); - - GrSetRGBcolorMode; - for ii := 0 to 7 do - for jj := 0 to 31 do begin - c := ii*32+jj; - {gives the same color independently of BPP: not all drivers have good BPP=8} - c := GrAllocColor(c and 2#11100000,(c and 2#11100) shl 3, (c and 2#11) shl 6); - GrFilledBox(5+jj*ww,5+ii*wh,5+jj*ww+ww-1,5+ii*wh+wh-1,c); - end; -end; { TestFunc } - -var - x, y, xv, yv, c, - m : Integer; - St : String(255); - o : GrTextOption; - -begin - x := 640; - y := 480; - xv := 640; - yv := 480; - c := 65536; - - m := GrSetMode(Gr_Width_Height_Color_Graphics,x,y,c,xv,yv); - { M := GrSetMode(Gr_Custom_Graphics,x,y,c,xv,yv); } - - TestFunc; - GrCircle(400,400,200,GrWhite); - GrCircle(400,400,205,GrWhite); - GrLineNC(0, 0, GrScreenX-1, GrScreenY-1, GrWhite); - GrLineNC(0, GrScreenY-1, GrScreenX-1, 0, GrWhite); - - { o.txo_font := @GrFont_PC8x16; } - o.txo_Font := GrLoadFont('pc8x16.fnt'); - o.txo_FgColor.v := GrBlack; - o.txo_BgColor.v := GrWhite; - o.txo_ChrType := Gr_Byte_Text; - o.txo_Direct := Gr_Text_Default; - o.txo_XAlign := Gr_Align_Default; - o.txo_YAlign := Gr_Align_Default; - - GrDrawString('This is simple text', 16, 20, 20, o); - St := 'This text is more complex'; - o.txo_Font := @GrFont_PC8x8; - GrDrawString(St, Length(St), 20, 50, o); - GrTextXY(20, 80, 'This is another text', GrBlack, GrWhite); - - o.txo_Font := GrLoadFont('helv22.fnt'); - GrDrawString(St, Length(St), 20, 100, o); - - { GrLoadConvertedFont(var name: Char; cvt, w, h, minch, maxch: Integer): GrFontPt;} - o.txo_Font := GrLoadConvertedFont('helv22.fnt', - { Gr_FontCvt_None = 0; - Gr_FontCvt_Skipchars = 1; - Gr_FontCvt_Resize = 2; - Gr_FontCvt_Italicize = 4; - Gr_FontCvt_Boldify = 8; - Gr_FontCvt_Fixify = 16; - Gr_FontCvt_Proportion = 32; } - Gr_FontCvt_Resize or - Gr_FontCvt_Italicize, - 20, 30, - 32, 127); - GrDrawString(St, Length(St), 20, 130, o); - - GrKeyRead; -end. diff --git a/thirdparty/grx249/pascal/vir_test.pas b/thirdparty/grx249/pascal/vir_test.pas deleted file mode 100644 index 9360834..0000000 --- a/thirdparty/grx249/pascal/vir_test.pas +++ /dev/null @@ -1,190 +0,0 @@ -program Vir_Test; - -uses GRX; - -procedure TestFunc; -var - x, y, ww, wh, ii, jj, c : Integer; - -begin - x := GrSizeX; - y := GrSizeY; - ww := round((x-10)/32); - wh := round((y-10)/8); - - GrSetRGBcolorMode; - for ii := 0 to 7 do - for jj := 0 to 31 do begin - c := ii*32+jj; - {gives the same color independently of BPP: not all drivers have good BPP=8} - c := GrAllocColor(c and 2#11100000,(c and 2#11100) shl 3, (c and 2#11) shl 6); - GrFilledBox(5+jj*ww,5+ii*wh,5+jj*ww+ww-1,5+ii*wh+wh-1,c); - end; -end; { TestFunc } - -var - x1, y1, - MouseMode, DrawMode, - xc, yc, - x, y, xv, yv, c : Integer; - m : Integer; - evt: GrMouseEvent; - Key : Char; - Finito : Boolean; - Conti: GrContext; - ContiPtr : GrContextPtr; - -begin - x := 640; - y := 480; - xv := 1024; - yv := 1024; - c := 65536; - xc := 40; - yc := 30; - - m := GrSetMode(Gr_Custom_Graphics,x,y,c,xv,yv); - GrSetModeRestore(False); - - xv := GrVirtualX; - yv := GrVirtualY; - - TestFunc; - GrTextXY(10, 10, ' Use the Keys <1> <2> <3> <4> <0> and press the mousebutton ', GrBlack, GrWhite); - GrTextXY(10, 30, ' In "mode 3" use "<" and ">" to resize the area "Q" = Quit ', GrBlack, GrWhite); - - if GrMouseDetect then begin - GrMouseEventMode(1); - GrMouseInit; - GrMouseSetColors(GrAllocColor(200,50,150),GrBlack); - { GrMouseSetLimits(10, 10, xv-10, yv-10); } - GrMouseDisplayCursor; - Finito := False; - repeat - GrMouseGetEvent(Gr_M_Event,@evt); - if (evt.Flags and Gr_M_KeyPress) > 0 then begin - Key := Chr (evt.Key and $FF); - case Key of - 'Q', 'q': Finito := True; - 'W', 'w': GrMouseWarp(2, 2); - 'U', 'u': GrMouseUpdateCursor; - '>': if (xc < x) and (MouseMode = 3) and ((evt.Flags and Gr_M_Left_Down) = 0) then begin - xc := xc + 8; - yc := yc + 6; - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Box, -xc div 2, -yc div 2, xc div 2, yc div 2,GrWhite); - GrMouseDisplayCursor; - end; - '<': if (xc > 8) and (MouseMode = 3) and ((evt.Flags and Gr_M_Left_Down) = 0) then begin - xc := xc - 8; - yc := yc - 6; - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Box, -xc div 2, -yc div 2, xc div 2, yc div 2,GrWhite); - GrMouseDisplayCursor; - end; - '1': begin - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Normal,0,0,0,0,0); - GrMouseDisplayCursor; - MouseMode := 1; - end; - '2': begin - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Normal,0,0,0,0,0); - GrMouseDisplayCursor; - MouseMode := 2; - end; - '3': begin - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Box, -xc div 2, -yc div 2, xc div 2, yc div 2,GrWhite); - GrMouseDisplayCursor; - MouseMode := 3; - end; - '0': begin - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Normal,0,0,0,0,0); - GrMouseDisplayCursor; - MouseMode := 0; - end; - '4': begin - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Normal,0,0,0,0,0); - GrMouseDisplayCursor; - MouseMode := 4; - end; - '5': begin - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Cross,0,0,GrWhite,0,0); - GrMouseDisplayCursor; - MouseMode := 4; - end; - end; - end; - if (evt.Flags and Gr_M_Left_Down) > 0 then begin - case MouseMode of - 1: begin - x1 := evt.x; - y1 := evt.y; - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Rubber,evt.x,evt.y,GrWhite,0,0); - GrMouseDisplayCursor; - end; - 2: begin - x1 := evt.x; - y1 := evt.y; - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Line,evt.x,evt.y,GrWhite,0,0); - GrMouseDisplayCursor; - end; - 3: begin - x1 := evt.x; - y1 := evt.y; { Why I have to save the position ??? } - ContiPtr := GrCreateContext(xc + 1, yc + 1, Nil, @Conti); - GrMouseEraseCursor; - GrBitBlt(@Conti, 0, 0, GrScreenContext, x1 - (xc div 2), y1 - (yc div 2), x1 + (xc div 2), y1 + (yc div 2), GrWrite); - GrMouseDisplayCursor; - end; - 4: begin - x1 := evt.x; - y1 := evt.y; - DrawMode := 4; - end; - end; - end; - if (evt.Flags and Gr_M_Left_Up) > 0 then begin - case MouseMode of - 1: begin - GrBox(x1, y1, evt.x, evt.y, GrAllocColor(50,100,150)); - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Normal,0,0,0,0,0); - GrMouseDisplayCursor; - end; - 2: begin - GrLine(x1, y1, evt.x, evt.y, GrAllocColor(150,100,50)); - GrMouseEraseCursor; - GrMouseSetCursorMode(Gr_M_Cur_Normal,0,0,0,0,0); - GrMouseDisplayCursor; - end; - 3: begin - GrMouseEraseCursor; - GrBitBlt(GrScreenContext, evt.x - (xc div 2), evt.y - (yc div 2), @Conti, 0, 0, xc, yc, GrWrite); - GrDestroyContext(@Conti); - GrMouseDisplayCursor; - end; - 4: DrawMode := 0; - end; - end; - if DrawMode = 4 then begin - GrLine(x1, y1, evt.x, evt.y, GrWhite); - x1 := evt.x; - y1 := evt.y; - end; - if (evt.Flags and Gr_M_Right_Down) > 0 then begin - end; - { Move the visible Part of the virtual screen } - m := GrSetViewport(evt.x - x div 2, evt.y - y div 2); - until Finito; - GrMouseUnInit; - end; -end. - diff --git a/thirdparty/grx249/readme b/thirdparty/grx249/readme deleted file mode 100644 index a66254f..0000000 --- a/thirdparty/grx249/readme +++ /dev/null @@ -1,351 +0,0 @@ -Welcome to GRX 2.4.9! - -GRX is a 2D graphics C library originaly written by Csaba Biegl for -DJ Delorie's DOS port of the GCC compiler. Now it support a big range -of platforms. - - -Supported platforms -=================== - -Directly supported platforms: ------------------------------ - - Currently GRX directly supports the following four platforms: - - DOS / DJGPP v>=2.03 EGA, VGA and VESA drivers - Linux / console svgalib and framebuffer drivers - Linux / X11R6 xwin driver (windowed) and SDL (full screen) - Win32 / Mingw win32 driver (windowed) and SDL (full screen) - - The Linux console framebuffer driver is new from GRX 2.4.2. - The SDL driver, compiled separately, is new from GRX 2.4.7. - Both i386 and x86_64 architectures are supported for the linux - console and the linux X11 versions. See below. - -Other DOS platforms: --------------------- - - Makefiles for Borland C++ have been updated in GRX 2.4.6 - - Until 2.3 the Watcom C++ compiler was supported, probably it still work, - but the makefiles must be updated: - -Other X11 platforms: --------------------- - - GRX should work on any X11R5 (or later) system after a few changes - in "makedefs.grx" - - New in GRX 2.4.6 is a DGA (Direct Graphics Access) driver for Xfree86, - experimental, not compiled by default, it must be enabled editing - the "makedefs.grx" file. - - New in GRX 2.4.7 is a SDL driver. Compiled separately after editing - the "makedefs.grx" file, SDL section, EP=x . - -Other Win32 platforms: ----------------------- - - GRX is reported to compile with MSVC, and there is support in the source - files, so you only need to generate the project files. - - New in GRX 2.4.7 is a SDL driver. Compiled separately after editing - the "makedefs.grx" file, SDL section, EP= . - - Other Win32 compilers may probably work. - -Other platforms: ----------------- - - Some people has ported GRX to embeded devices. For this you need a good - understanding of GRX internals. - - -GRX installation instructions -============================= - -Requirements: -------------- - - The source files and fonts: grx249.tar.gz or grx249.zip - This document: readme - -A. Unpacking the GRX archive ----------------------------- - - 1) Choose and download the .tar.gz or .zip package. You can use either. - The .zip is intended for dos and win32 users, specialy for DJGPP users, - because it expand to the contrib subdir and has manifest files. - - 2) 'cd' to a directory where you want the GRX file tree to be created - as a subdirectory. Examples are: - - DJGPP : C:\DJGPP\ - Mingw : C:\MINGW\ - Linux : /usr/local/src/ - - 3) unpack the GRX archive: - - tar xzvf grx249.tar.gz (1) - or - unzip grx249.zip (2) - - (1) This will create the subdirectory 'grx249'. - (2) This will create the subdirectory 'contrib/grx249'. - -B. Compiling GRX ----------------- - - 1) Go to GRX base dir and edit "makedefs.grx" to customize it for - your system. - - 2) Switch to "src" sub dir - - 3) run 'make -f ': - - makefile.dj2 for DOS/DJGPPv2 - makefile.w32 for Win32/Mingw - makefile.lnx for Linux/console - makefile.x11 for Linux/X11 - makefile.sdl for SDL driver on MingW and X11 - - This process generates the GRX lib in the "lib/---" (where --- is - dj2, w32, lnx, x11) subdir and some utility programs in the - "bin" subdir. - - Note for DJGPP/Mingw users: If you set in makedefs.grx HAVE_UNIX_TOOLS=n - do _not_ use an environment variable `SHELL' leading to `bash', e.g. - `SHELL=/djgpp/bin/bash.exe'. For mingw use mingw32-make instead of make. - Some parts of the DJGPP/Mingw Makefiles with this option require - `command.com'. If you set HAVE_UNIX_TOOLS=y (i.e. work under bash - for djgpp or msys for mingw32), there are no problems. - - Note for Linux/console users: At the end you must become root and - run 'make -f makefile.lnx setsuid' in order to set de suid flag of - the modetest utility program. (This is required by the SVGALIB - video driver). - -C. Testing GRX --------------- - - 1) Switch to "test" sub dir - - 2) run 'make -f ' - - 3) run the 'demogrx' program - - 4) Switch to "test/bgi" sub dir - - 5) run 'make -f ' - - 6) run the 'bccbgi' program - - Note for Linux/console users: you must compile test programs as root. - (This is required by the SVGALIB video driver). - -D. Installing GRX lib for your compiler ---------------------------------------- - - You'll either need to 1: copy some GRX files to places where your compiler - will find them or 2: change your compiler setup so it will find the GRX - files in there default place. - - 1) Copy the library from /lib/ to the compiler - library directory. - Copy the header files from /include to your compiler include - directory. - - Or you can let makefiles do it for you, switch to "src" sub dir and - run 'make -f install'. You can uninstall the library - running 'make -f uninstall'. - - Note for Linux users: probably you must be root to do that. Don't forget - to run 'ldconfig' to register the shared libraries. - - 2) See compiler documentation. Either change the default compiler behaviour - (eg., change djgpp.env) or use command line switches to tell the - compiler where to find the GRX files. - -E. Installing GRX utility programs ----------------------------------- - - Run 'make -f install-bin' - - You can uninstall them running 'make -f uninstall-bin' - - Note for Linux users: probably you must be root to do that. - -F. Installing GRX fonts ------------------------ - - Only if you have defined a default font directory in "makedefs.grx" - you can install them running 'make -f install-fonts' - - You can uninstall them running 'make -f uninstall-fonts' - - Note for Linux users: probably you must be root to do that. - -G. Installing GRX info doc --------------------------- - - Except for the 'w32' target you can install the GRX info doc in your - info tree. Run 'make -f install-info' - - You can uninstall them running 'make -f uninstall-info' - - Note for Linux users: probably you must be root to do that. - - -Support for the x86_64 architecture -=================================== - - By default, on linux, the makefiles build the library for the i386 - architecture even in a x86_64 cpu. To build the x86_64 library (in - a x86_64 compatible cpu of course) you must set to 'y' the BUILD_X86_64 - variable in the makedefs.grx file. - -Alternate installation by a Configure script -============================================ - - For people who know how to use it, a configure script is provided, - run './configure --help' to show the options. - - -Environment variables for using GRX programs -============================================ - - 1) set the default driver and graphics mode info (very useful but not - required), in DOS or Windows: - - SET GRX20DRV= gw gh nc - - in Linux: - - export GRX20DRV=" gw gh nc " - - Available drivers are for: - - DOS : herc, stdvga, stdega, et4000, cl5426, mach64, - ati28800, s3, VESA, memory - Linux: svgalib, linuxfb, memory - X11 : xwin, memory - Win32: win32, memory - - There is also a sdl driver for x11 and win32, compiled separately. - In this case GRX20DRV="sdl::fs" gives full screen, GRX20DRV="sdl::ww" - gives windowed graphics. You can also change inside a program: - see test/fswwtest.c. - - Values for gw and gh can be by example 640,480 or 800,600 - Values for nc can be 2, 16, 256, 64K or 16M. - - 2) set the GRX font dir, in DOS or Windows: - - SET GRXFONT= - - in linux: - - export GRXFONT= - - This is required for GRX graphics text output. Path: /fonts - - NOTE: You can define a default font directory when compiling GRX. - Check the "makedefs.grx" file. - - 3) the linux framebuffer driver opens the "/dev/fb0" device file by - default, if you want to open an alternate device file, set the - $FRAMEBUFFER environment variable: - - export FRAMEBUFFER= - - -Suidroot in the Linux console platform -====================================== - - You know setting suidroot is a security flaw, if you want your grx linux - console program really portable yo have not options, because the svgalib - stable version requires it. But if you really wants a suidroot aware - libgrx you can modify makedefs.grx to obtain: - - * a framebuffer only linux console libgrx version - - * a libgrx version without some framedrivers than do direct in/out port, - so you can link it with the svgalib alpha version (1.9.x) that not - requires suidroot. - - -Pascal users -============ - - GRX has a Pascal interface (gpc), if you plan to use it don't forget - next steps before compiling: - - 1) Activate INCLUDE_GPC_SUPPORT editing the "makedefs.grx" file. - - 2) Edit the files pascal/grx.pas and pascal/bgi/graph.pas to uncomment - the '{.$L ...}' directives (near the beginning) to load the auxiliary - libraries (tiff, jpeg, png, z and socket) you need. - - Alternatively you can use the configure script. - - See the "pascal/readme" file for other details. - - -Help -==== - - Read the user's guide in the "doc/grx249um.htm" file. If you ran - 'make install-info', just type 'info grx' to view - the info version of the manual. - - If you have problems installing or running GRX check - - http://www.gnu.de/software/GRX/ - - for updates, pre-compiled libs, ... - - If this doesn't help, check your system/compiler FAQ (eg., the - DJGPP v2 FAQ is at http://www.delorie.com/djgpp/v2faq) - - Check the GRX mailing list archive at - http://grx.gnu.de/archive/grx/en/ - - Check out the DJGPP newsgroup comp.os.msdos.djgpp (archive at - http://www.delorie.com/djgpp/mail-archives/ ) - - Send a problem report to comp.os.msdos.djgpp or to the GRX mailing - list (see below). - - There is a GRX mailing list and a separate, moderated - mailing list for GRX announcements . To - subscribe to one of the lists, send an email containing "subscribe - grx" or "subscribe grx-announce" in the body to . - (The subject will be ignored.) - - -License -======= - - The GRX graphics library is free software; you can redistribute it - and/or modify it under some conditions; see the "copying.grx" file - for details. - - -Credits -======= - - I am maintainig GRX now by accident, but if GRX is a so good library - it is thanks to: - - Csaba Biegl who wrote it. - Michael Goffioul who released 2.1 - Hartmut Schirmer who released 2.2 and 2.3 - Peter Gerwinski released GRX 2.3.1 and 2.3.2. - Mariano Alvarez Fernandez who released 2.3.3-4 and 2.4.0-6. - - and other people, see the "doc/credits.doc" for details. - - -Enjoy, M. Lombardi - diff --git a/thirdparty/grx249/src/bgi/arc.c b/thirdparty/grx249/src/bgi/arc.c deleted file mode 100644 index 7451335..0000000 --- a/thirdparty/grx249/src/bgi/arc.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void __gr_arc(int x, int y, int stangle, int endangle, int radius) { - arc(x, y, stangle, endangle, radius); -} - diff --git a/thirdparty/grx249/src/bgi/arc.lo b/thirdparty/grx249/src/bgi/arc.lo deleted file mode 100644 index 75d0ab7d4d6d23c5644445e3b947223d6e7e4ff2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1368 zcma)5U279j5S`7&8f)BY>4VUqd597*y(CgZ#fN?*Z687_ws}(6CUH%n=EKb{q*4?q zh#>w5!5>nHKgI_i6dx7hIX8RF5(+vnJ2U5=J3Dvo+&7i#hGkh|#1dO35m0-)vaC&B z=ETwKGtq{hbJu?De*HZfjouCuz)rp`jDlQYS~cV3Oa965Lnb$r&Gq#M*?g@Lc7iZ_ zUoETRQYq9?>GhqWDlV(itufBuB%x{OIq2qgP4J&nVk~U|O0ix&7V9`=EvA#n_c%ZS zSVpgilxQnX>Lju4WXevq?BvQ$zU&mrPI1dgtqz@}Tn42Y@tON9iT5QbKSptm&8lKz z>#8S!t*ej6rh{Y5megbso-G%q;@PSA{8Vg-L3rMI)Wb6wnNQ5fO%uR!jXgD@xplv( zn&P@G--QcjaPO{ad4bz&y1_x%IaG~-xSQ3TwbiP-v$3&T*>m?+*Qym)c$x$fGUx0i zkvweD5y=uqYaY?^0#*O09n>4Jfj_nf#`C=wD)0t@sAu({E~?S*iw4x$m8fR7-S#@* zce;V6Fd9q!px!);;#MbAJ-^%Y{NP9wlY0m5bHCp9M78{G*h4k{E$_g*5@Yi{@Wyyv zDrbgz9m+W|x4Qyg&mSyB_ZfB(${SvRQnt{etFX+)Nn$SMzX4^w=o!jO_;E2ac^e@4 z|Kb(F(e?2s5ax@|yUAAtPM>^A2rX!D{NWn47TGZ>^2s=nC5PfcIiJyQhY z;TS&m7~U!Tr%)rN)&YQc|Mszgy=DLSQcVBixd2NBz;{@Ts9c1S$9>FYdIwk1$oG&= SB<38PfjF-R-bX`%HM~FioQItN diff --git a/thirdparty/grx249/src/bgi/aspectra.c b/thirdparty/grx249/src/bgi/aspectra.c deleted file mode 100644 index 2610d6a..0000000 --- a/thirdparty/grx249/src/bgi/aspectra.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* ----------------------------------------------------------------- */ -void __gr_getaspectratio(int *xasp, int *yasp) { - getaspectratio(xasp, yasp); -} - -/* ----------------------------------------------------------------- */ -void __gr_setaspectratio( int xasp, int yasp ) { - setaspectratio( xasp, yasp ); -} diff --git a/thirdparty/grx249/src/bgi/aspectra.lo b/thirdparty/grx249/src/bgi/aspectra.lo deleted file mode 100644 index 7e933e174108d8f670c07c0a1a7ab9f6e96c914e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1532 zcma)6&1(};5TDI%YmBvxrHD|`9HLfgAF0GrdrCi&6j>~2>c?r_#5I+g4>m85N>NW@ z35DJ~c=gZlAoQSrhzGCY(L$Wx+xP4m3OX=5Gr#%0+1c6IeO+`*mSvFiMsTWs0J#4~T~qx^*4az-)BUwC~n`$9#VOAbtyBmS?xAuH*;I$MQ(1stD^Z=H*+GF7xUL6oXFu@j$MoRrhU{rN#Zke=*J+=vC&OT zY}M^CV5_dGl$*pd4TlhWl%I?O>vg>V> zO81Kuud=-27QN{FBR(B@kN#!&)Iy(*NSJ}!ivRlRrgBL;uJxSuJFMSf#PKOjAPJTjBYc(1{llje- z38I|L#mZmvQ*uLq4$HP+oLF4!Wsrgc5x*j<%*=z%jlYeOvm2j8~YVjBZk*wAU?k%K5&6C%nv&Y9_A6R#UU*+kY?qTrZcSI;hmtCnH{^d&h;c5 TEvN&*4#as=9PF!1bTPc{ze diff --git a/thirdparty/grx249/src/bgi/bar.c b/thirdparty/grx249/src/bgi/bar.c deleted file mode 100644 index b877958..0000000 --- a/thirdparty/grx249/src/bgi/bar.c +++ /dev/null @@ -1,49 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void __gr_bar(int left, int top, int right, int bottom) -{ - _DO_INIT_CHECK; - - if (left > right) SWAP(int,left,right); - if (bottom < top) SWAP(int,bottom,top); - - left += VL; right += VL; - top += VT+PY; bottom += VT+PY; - - switch (FPATT) { - case SOLID_FILL : GrFilledBox( left, top, right, bottom, FILL); - break; - case EMPTY_FILL : GrFilledBox( left, top, right, bottom, COLBG); - break; - default : FILLP.gp_bmp_fgcolor = FILL; - FILLP.gp_bmp_bgcolor = COLBG; - GrPatternFilledBox( left, top, right, bottom, &FILLP); - break; - } -} - - diff --git a/thirdparty/grx249/src/bgi/bar.lo b/thirdparty/grx249/src/bgi/bar.lo deleted file mode 100644 index fe5d61df75d0c85061b4da79a3ce6d7a6dccd2ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2084 zcma)6&2Jl35TEtBAtdG{gzzD?0v}8jRQJh2R%uWqvPo?>!b(cwv>-%Rw!3zs+Fon@ zwn|Y5LT(Dy5-A5x+~9mv7d~$M0f++<9H2;i2qZJ}c3-nvD$$WyryZOL<1cT8NgRZ{E@7L2^aw;#|MH5zl}Wp_sWIy%Rm0p@Au!>i=n&w zbHXd7l3p>D^3J3typ2@a`A{IshgVvz3+NAd%sM5``SS7o8Di&KZ2MK z{YdS$cFXHZ8}uA#H?%*!&n10st1s5Nea%hz4qUGP%(?R~EXfkO`^oNp;^m9xD|_4G zIP7?SJ~@>NYeLUX1WvL?FWhzN?r~ac`wHAy1k9g`yfaoV698{CQ+Eb*ppu+i&rgN=8OEU;wEX6ad$F<91Mrwul3u$i+g zIXA?{jXgGM++qpifDIa7vUq-Yk)@aKDfIc_`5~4r;DrBV8O2g|Rb2r_A$*?V@M}Lj zuG8O#M3>z;bm+26VXjV|@6%!Ma1bpW?vL=H2){4FHBcVv>loHU|D`AOWWtiwaT|hujdnPO7ia`= z=mCHU#1jmlNQllQLfn{(gbxBV3C9372_FJ@8!?U-?frm%K=?4gCxnjx9MJfq0N)4v zHsNCcNyHc)*G~!Q^778rrYKhsh2!I@vK*_yg|#k#Un+|-@Jgox(!uZEeO|SjO{<0R zEn8R|pM{ehQLbJNc)jKFwqv&~M_dI?$*onh=9HTj@VaBWZLH>=X!&JYQS zq9@Qt@&6Z>!5CQ|ErLS%sBR@HUlAQ-Q#{F8Bx&E2Um7D_2~axmBgh#NMJ@Evn-MH4 zQ%UZX*^rhTk0RZUKB_D2 diff --git a/thirdparty/grx249/src/bgi/bar3d.c b/thirdparty/grx249/src/bgi/bar3d.c deleted file mode 100644 index 186ef44..0000000 --- a/thirdparty/grx249/src/bgi/bar3d.c +++ /dev/null @@ -1,74 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void bar3d(int left,int top,int right,int bottom,int depth, int topflag) -{ - int yofs, l_d, r_d, t_y, fast, col; - - _DO_INIT_CHECK; - - if (left > right) SWAP(int,left,right); - if (bottom < top) SWAP(int,bottom,top); - - __gr_bar(left,top,right,bottom); - - left += VL; - top += VT+PY; - right += VL; - bottom += VT+PY; - if (left > right) SWAP(int,left,right); - if (bottom < top) SWAP(int,bottom,top); - - fast = (__gr_lstyle == SOLID_LINE) && (LNE.lno_width == 1); - LNE.lno_color = col = COL|WR; - if (fast) GrBox( left, top, right, bottom, col); - else GrCustomBox( left, top, right, bottom, &LNE); - - if (depth == 0) return; - - yofs = -depth * getmaxy() / getmaxx(); - r_d = right+depth; - t_y = top + yofs; - if (fast) { - GrLine( right, bottom, r_d, bottom+yofs, col); - GrVLine(r_d, bottom+yofs, t_y, col); - } else { - GrCustomLine( right, bottom, r_d, bottom+yofs, &LNE); - GrCustomLine( r_d, bottom+yofs, r_d, t_y, &LNE); - } - if (topflag) { - l_d = left+depth; - if (fast) { - GrHLine( r_d, l_d, t_y, col); - GrLine( l_d, t_y, left, top, col); - GrLine( r_d, t_y, right, top, col); - } else { - GrCustomLine( r_d, t_y, l_d, t_y, &LNE); - GrCustomLine( l_d, t_y, left, top, &LNE); - GrCustomLine( r_d, t_y, right, top, &LNE); - } - } -} diff --git a/thirdparty/grx249/src/bgi/bar3d.lo b/thirdparty/grx249/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{HW7`Xu0EOCPl`DB0?PS3e$8r;s5+~5gxq3@!iG30U z30LT}`S22=Gqd_3fC%Ci2Cy43fJWN;Ex2h12_FU+A#4SBhwu@A_XzQ_`hai^z{iA- z0$f21tOfX$^mPCm@g)j82C$XzaXf>B>j91t;)OOvxDnue!c71dr2SioKNDg;w-70x z+k}{hf@hxc(h-SwfDn1737-IXQ{v|mzn6GjVg&Q^VZVrcKDvmt^5mGE8$z^80!Q6m z$;xZCHDQBxBxmP98!DH98??qpL>n%QjalR9KVGmc4X^mEWji-~TI{%I!lF<7} zf+ghlN{kegMY?vdM#P2X;#|Z}cMF>NHwyutrH@yg&=|=UY~=3_|DRtJeP~V-1wkRd z`g_^sGjWXiR z(2vfpE3V%J8tC1M$$>>&Jk^%!M>jh8Q9bIpP!&G|NRF=}v|uAYnnzqKQpaQ$(dLSq S0-b?+zq=S@)^$R3{r&~{z+|KV diff --git a/thirdparty/grx249/src/bgi/bccgrx.c b/thirdparty/grx249/src/bgi/bccgrx.c deleted file mode 100644 index 23b6879..0000000 --- a/thirdparty/grx249/src/bgi/bccgrx.c +++ /dev/null @@ -1,476 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#define __BCCGRX_C - -#include "bccgrx00.h" - -#define MAX_MODES 256 - -/* ----------------------------------------------------------------- */ - -static char copyright[]="Copyright (C) 1993-1994 Hartmut Schirmer"; -int __gr_Mode = 0; /* actual graphics mode */ -int __gr_INIT = FALSE; /* TRUE after initgraph() */ -char __gr_BGICHR[128]; /* Path to .chr files */ -int __gr_MaxMode = 0; /* Last available mode */ -int __gr_Result = grOk; /* stores error code */ -int __gr_X, __gr_Y; /* graphics cursor pos */ -int __gr_vpl, __gr_vpt, /* actual viewport */ - __gr_vpr, __gr_vpb; -int __gr_color; /* drawing color */ -int __gr_colorbg; /* background color */ -int __gr_colorfill; /* fill color */ -GrColor __gr_WR = GrWRITE; /* Write mode */ -int __gr_lstyle = SOLID_LINE; /* Actual line style */ -int __gr_fpatno = SOLID_FILL; /* Actual filling pattern */ -int __gr_Xasp = 10000; /* Aspect ratio */ -int __gr_Yasp = 10000; -int __gr_clip = TRUE; /* actual clipping state */ - -int __gr_Y_page_offs = 0; /* Y offset for page simulation */ - -int __gr_ADAPTER = GR_VGA; /* Adapter used */ -int __gr_TextLineStyle = 0; /* use setlinestyle() while - plotting .chr fonts */ - -int (*__gr_initgraph_hook)(void)=NULL; /* hook for overriding mode */ - /* setting in initgraph */ -int (*__gr_closegraph_hook)(void)=NULL; - -GrPattern __gr_fillpattern; /* GRX filling settings */ -GrLineOption __gr_Line; /* GRX line settings */ - -unsigned char __gr_fpatterns[][8] = { /* BGI fill patterns */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* EMPTY_FILL */ - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, /* SOLID_FILL */ - { 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00}, /* LINE_FILL */ - { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}, /* LTSLASH_FILL */ - { 0xE0, 0xC1, 0x83, 0x07, 0x0E, 0x1C, 0x38, 0x70}, /* SLASH_FILL */ - { 0xF0, 0x78, 0x3C, 0x1E, 0x0F, 0x87, 0xC3, 0xE1}, /* BKSLASH_FILL */ - { 0xA5, 0xD2, 0x69, 0xB4, 0x5A, 0x2D, 0x96, 0x4B}, /* LTBKSLASH_FILL */ - { 0xFF, 0x88, 0x88, 0x88, 0xFF, 0x88, 0x88, 0x88}, /* HATCH_FILL */ - { 0x81, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x81}, /* XHATCH_FILL */ - { 0xCC, 0x33, 0xCC, 0x33, 0xCC, 0x33, 0xCC, 0x33}, /* INTERLEAVE_FILL */ - { 0x80, 0x00, 0x08, 0x00, 0x80, 0x00, 0x08, 0x00}, /* WIDE_DOT_FILL */ - { 0x88, 0x00, 0x22, 0x00, 0x88, 0x00, 0x22, 0x00}, /* CLOSE_DOT_FILL */ - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} /* USER_FILL */ -}; - -#ifdef GRX_VERSION -int __gr_BGI_p = 1; /* requested / available # of pages (valid: 1,2) */ -#endif -int __gr_BGI_w = 640; /* resulution and colors needed to emulate */ -int __gr_BGI_h = 480; /* BGI driver modes */ -int __gr_BGI_c = 16; /* default : Standard VGA */ - - -#ifdef __GNUC__ -#define NULL_IS_EMPTY(s) ((s) ? : "") -#else -#define NULL_IS_EMPTY(s) ((s) ? (s) : "") -#endif - -/* ----------------------------------------------------------------- */ - -GraphicsMode *__gr_Modes = NULL; - -static int ModeCompare(GraphicsMode *a, GraphicsMode *b) { - int size_a, size_b; - if (a->colors < b->colors) return -1; - if (a->colors > b->colors) return +1; - size_a = a->width * a->height; - size_b = b->width * b->height; - if (size_a < size_b) return -1; - if (size_a > size_b) return +1; - if (a->width < b->width) return -1; - if (a->width > b->width) return +1; - return 0; -} - -static void NewMode(int w, int h, long c) { - GraphicsMode *p, *q, *qn; - p = malloc(sizeof(GraphicsMode)); - if (p != NULL) { - p->width = w; - p->height = h; - p->colors = c; - p->next = NULL; - if (__gr_Modes == NULL) { - __gr_Modes = p; - return; - } - switch(ModeCompare(p,__gr_Modes)) { - case -1 : /* p < __gr_Modes */ - p->next = __gr_Modes; - __gr_Modes = p; - return; - case 0 : /* p == __gr_Modes */ - free(p); - return; - } - q = __gr_Modes; - while ((qn=q->next) != NULL) { - switch (ModeCompare(p,qn)) { - case -1 : /* p < q->next */ - p->next = qn; - q->next = p; - return; - case 0 : /* p == q->next */ - free(p); - return; - } - q = q->next; - } - /* append to end */ - p->next = q->next; - q->next = p; - } -} - -int __gr_getmode_whc(int mode, int *w, int *h, long *c) { - GraphicsMode *p; - p = __gr_Modes; - mode -= __FIRST_DRIVER_SPECIFIC_MODE; - if (mode < 0) - return FALSE; - while (p != NULL && mode-->0) - p = p->next; - if (p==NULL) return FALSE; - *w = p->width; - *h = p->height; - *c = p->colors; - return TRUE; -} - -#ifdef GRX_VERSION - - /* ---- GRX v2.0 */ - static void build_mode_table(void) { - GrFrameMode fmode; - const GrVideoMode *mp; - char ubpp; - - for (fmode = GR_firstGraphicsFrameMode; - fmode <= GR_lastGraphicsFrameMode; - ++fmode ) { - mp = GrFirstVideoMode(fmode); - while (mp != NULL) { - ubpp = mp->bpp; - if(ubpp > 24) ubpp = 24; -#if defined(__TURBOC__) && defined(__MSDOS__) - if(ubpp < 15) -#endif - NewMode(mp->width, mp->height, 1L << ubpp); - mp = GrNextVideoMode(mp); - } - } - } - - #define COLOR_NR2DRV(col) (col) - -#else - - /* ---- GRX v1.0x */ - #ifdef GR_DRV_VER_GRD - #define _GRD GR_DRV_VER_GRD - #define _GRN GR_DRV_VER_GRN - #define _VDR GR_DRV_VER_VDR - #endif - - static long COLOR_NR2DRV(int col) { - switch (col) { - case 1<<16 : return 0xC010; - case 1<<24 : return 0xC018; - } - return col; - } - - static long COLOR_DRV2NR(int c) { - if ( (c & 0xC000) == 0xC000) - c = 1<<(c & 0x00ff); - return c; - } - - static int color_ok(long c) { - /* Check if GRX supports requested color mode */ - int old_colors, res; - extern int _GrNumColors; /* happy hacking ... */ - c = COLOR_DRV2NR(c); - switch (c) { - case 1<<15 : - case 1<<16 : - case 1<<24 : old_colors = _GrNumColors; - _GrNumColors = c; - res = GrLineOffset(128) != 0; - _GrNumColors = old_colors; - return res; - } - return TRUE; /* No way to check other colors ... */ - } - - #ifdef _VDR - static int driver = _GRD; - #endif - - static int CheckTableEntry(GR_DRIVER_MODE_ENTRY *gm) { - if (gm == NULL) return FALSE; - if (!color_ok(gm->number_of_colors) ) - return FALSE; - #ifdef _VDR - if (driver == _VDR) - return gm->mode.vdr.BIOS_mode != 0xFFF; - if (driver == _GRN) - return gm->mode.grn.BIOS_mode != 0xFF; - return FALSE; - #else - return gm->BIOS_mode != 0xFF; - #endif - } - - static void build_mode_table(void) { - GR_DRIVER_MODE_ENTRY *tm, *gm; - #ifdef _VDR - driver = 0xFFFF0000 & - #endif - GrGetDriverModes(&tm, &gm); - - while (gm->width != 0 && gm->height != 0 && gm->number_of_colors != 0) { - if (CheckTableEntry(gm)) - NewMode(gm->width, gm->height, COLOR_DRV2NR(gm->number_of_colors)); - ++gm; - } - } - -#endif - -/* ----------------------------------------------------------------- */ - -void __gr_set_up_modes(void) -{ - int mode; - GraphicsMode *p; - static int DidInit = FALSE; - - if (DidInit) return; - if (strlen(copyright) != sizeof(copyright)-1) - ; // exit(1); -# ifdef __linux__ - /* vga_init(); */ -# endif - MM = 1; - GrSetMode( GrCurrentMode()); /* Init grx */ - __gr_ADAPTER = GrAdapterType(); - if (__gr_ADAPTER == GR_S3) - __gr_ADAPTER = GR_VGA; - build_mode_table(); - p = __gr_Modes; - mode = __FIRST_DRIVER_SPECIFIC_MODE-1; - while (p != NULL) { - ++mode; - p = p->next; - } - MM = mode; - DidInit = TRUE; -} - -/* ----------------------------------------------------------------- */ - -int __gr_White(void) { - return GrNumColors() > 256 ? GrWhite() : 15; -} - -int getmaxx(void) { - return GrScreenX()-1; -} - -int getmaxy(void) { - return GrScreenY()-1; -} - -/* ----------------------------------------------------------------- */ -void graphdefaults(void) -{ - ERR = grOk; - moveto( 0, 0); - COL = FILL = WHITE; - COLBG = BLACK; - __gr_WR = GrWRITE; - - _DO_INIT_CHECK; - GrSetContext( NULL); /* ViewPort == Full screen */ -#ifdef GRX_VERSION - GrSetViewport(0,0); - PY = 0; -#endif - VL = VT = 0; - VR = getmaxx(); - VB = getmaxy(); - __gr_clip = TRUE; - - __gr_Xasp = 10000; - __gr_Yasp = __gr_Xasp * ((VR+1)*3L) / ((VB+1)*4L); - - __gr_lstyle = SOLID_LINE; - LNE.lno_pattlen = 0; - LNE.lno_dashpat = NULL; - LNE.lno_width = 1; - - FPATT = SOLID_FILL; - FILLP.gp_ispixmap = 0; /* Bitmap fill pattern */ - FILLP.gp_bmp_data = (unsigned char *)&__gr_fpatterns[FPATT]; - FILLP.gp_bmp_height = 8; - FILLP.gp_bmp_fgcolor = COL; - FILLP.gp_bmp_bgcolor = COLBG; - - __gr_TextLineStyle = 0; -} - -/* ----------------------------------------------------------------- */ - -int __gr_adaptcnv(int grx) { - switch (grx) { - case GR_VGA : return VGA; - case GR_EGA : return EGA; - case GR_8514A : return IBM8514; - case GR_HERC : return HERCMONO; - } - return grx; -} - -/* ----------------------------------------------------------------- */ -void setgraphmode(int mode) -{ - int w, h; - long c; - - _DO_INIT_CHECK; - switch (mode) { - case GRX_DEFAULT_GRAPHICS: -#ifdef GRX_VERSION - w = GrDriverInfo->defgw; - h = GrDriverInfo->defgh; - c = GrDriverInfo->defgc; - goto Default; -#else - GrSetMode( GR_default_graphics); - break; -#endif - case GRX_BIGGEST_NONINTERLACED_GRAPHICS: - GrSetMode( GR_biggest_noninterlaced_graphics); - break; - case GRX_BIGGEST_GRAPHICS: - GrSetMode( GR_biggest_graphics); - break; - case GRX_BGI_EMULATION: -#ifdef GRX_VERSION - if (__gr_BGI_p > 1) { - __gr_BGI_p = 2; - GrSetMode( GR_custom_graphics , __gr_BGI_w, __gr_BGI_h, - COLOR_NR2DRV(__gr_BGI_c), __gr_BGI_w, 2*__gr_BGI_h); - if (GrVirtualY() < 2*GrScreenY()) __gr_BGI_p = 1; - } else -#endif - GrSetMode( GR_width_height_color_graphics, __gr_BGI_w, - __gr_BGI_h, COLOR_NR2DRV(__gr_BGI_c)); - break; - default: - if (mode < __FIRST_DRIVER_SPECIFIC_MODE || mode > MM) { - ERR = grInvalidMode; - return; - } - if (!__gr_getmode_whc(mode, &w, &h, &c)) { - ERR = grInvalidMode; - return; - } -#ifdef GRX_VERSION -Default: - if (__gr_BGI_p > 1) { - __gr_BGI_p = 2; - GrSetMode( GR_custom_graphics , w, h, COLOR_NR2DRV(c), w, 2*h); - if (GrVirtualY() < 2*GrScreenY()) __gr_BGI_p = 1; - } else -#endif - GrSetMode( GR_width_height_color_graphics, w, h, COLOR_NR2DRV(c)); - break; - } - __gr_Mode = mode; - graphdefaults(); - GrClearScreen(BLACK); -} - -/* ----------------------------------------------------------------- */ -void __gr_initgraph(int *graphdriver, int *graphmode) { - ERR = grOk; - if (__gr_initgraph_hook) { - (*__gr_initgraph_hook) (); - if (ERR != grOk) { - __gr_INIT = FALSE; - return; - } - } else if (!__gr_INIT) { - __gr_set_up_modes(); - if (ERR != grOk) return; - if ( *graphdriver != NATIVE_GRX || *graphmode < 0 || *graphmode > MM) - *graphmode = 0; - __gr_INIT = TRUE; - setgraphmode(*graphmode); - if (ERR != grOk) { - __gr_INIT = FALSE; - return; - } - } - if (*graphmode == 0) *graphdriver = __gr_adaptcnv(__gr_ADAPTER); - else *graphdriver = NATIVE_GRX; -} - - - -void closegraph(void) -{ - if (__gr_closegraph_hook) { - (*__gr_closegraph_hook) (); - __gr_initgraph_hook = NULL; - __gr_closegraph_hook = NULL; - } else - restorecrtmode(); - __gr_INIT = FALSE; -} - - - -void __gr_set_libbcc_init_hooks ( - int (*init) (void) , - int (*close) (void) ) -{ - __gr_initgraph_hook = init; - __gr_closegraph_hook = close; -} - - - -void initgraph(int *graphdriver, int *graphmode, char *pathtodriver) { - __gr_initgraph(graphdriver, graphmode); - strcpy(__gr_BGICHR, NULL_IS_EMPTY(pathtodriver)); -} diff --git a/thirdparty/grx249/src/bgi/bccgrx.lo b/thirdparty/grx249/src/bgi/bccgrx.lo deleted file mode 100644 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60cG9*sUHGXuEMzF zb6myW05rlFSMj$g{%-PDBmRp2h~gh4zZH2wKH|eSA??2itZYMGkPrKBE52tA^w%RV zfaF&JslSx`TkzYo;%`v=Zt^$4AI0CM_`Ar5{vKfEZTNkR*p7Wi>_9#MY5#d3?Y{&x zI*||fyhXkTNPaoc=te#$ezoE^D}ImS#}$8s{9f!E#eZ1wzfOJ(`Jnj66#u8>Ig!n69VcL=eWeCUsm9>KpKQ1Wj8Ij{Xd zj&l&m^XB_RocBK>ULnLUfW{p{{EBp=5Wgc<3GsU(&c!!~IoQD0y1X}nKw}TiJK|oP zcjROI8;J089T9$Z0_jg5Y0M)*8vbr2jd^B?nD^(2I8XKyYmf)TyO9UPdxZEQaSVPD z8}R?NA$}J38@^WNKD-7f^9jg#-T<77T)CNi%)ednhk^9}>p{(^_#$;AmcT5Dk5}P(f z@i{lxpGZf8_*YbmL5B z)n%ctSaMM#DV!^dus1M~GSEm(X^-<-fJ%GV9(j?3@BVIQs6 z4ZTOW;Hqf7{{(H%gXgconxG@|03pxkf!!8O_;3fGM#oFgzEtUPeP~PP0Gjg0uR5Gz Uy6AZ@CGC1Y{V2xON -#include -#include - -#include "../include/grx20.h" -#include "../include/grdriver.h" -#include "../include/libbcc.h" - - -#define __ABS(a) (a<0 ? -a : a) -#define YR(r) ((r)*__gr_Xasp/__gr_Yasp) -#define XR(r) (r) - -/* --- from grx/genellipse (LIBGRX 1.02+ only) : */ - -#if !defined(GR_DRV_VER_GRD) && !defined(GRX_VERSION) -extern int _grx_arc_xc, _grx_arc_yc, - _grx_arc_xs, _grx_arc_ys, - _grx_arc_xe, _grx_arc_ye; -#endif - -/* --- from bccgrx.c : */ - -extern GrLineOption __gr_Line; -extern short *__gr_modeindx; -extern GrContext *__gr_viewport; -extern char __gr_BGICHR[]; -extern GrPattern __gr_fillpattern; -void __gr_initgraph(int *graphdriver, int *graphmode); - -/* --- some things require GRX v2 */ -#ifdef GRX_VERSION -extern int __gr_BGI_p; -extern int __gr_Y_page_offs; -#endif - -/* ------------------------------ */ - -/* internal graphics modes */ -typedef struct GraphicsMode { - int width, height; - long colors; - struct GraphicsMode *next; -} GraphicsMode; -extern GraphicsMode *__gr_Modes; - -/* ------------------------- */ - -#define ERR __gr_Result -#define MM __gr_MaxMode -#define X __gr_X -#define Y __gr_Y -#define LNE __gr_Line -#define LNEP __gr_LineP -#define COL __gr_color -#define COLBG __gr_colorbg -#define FILL __gr_colorfill -#define WR __gr_WR -#define FPATT __gr_fpatno -#define FILLP __gr_fillpattern -#define VL __gr_vpl -#define VR __gr_vpr -#define VT __gr_vpt -#define VB __gr_vpb -#ifdef GRX_VERSION -#define PY __gr_Y_page_offs -#else -#define PY (0) -#endif - -#define SWAP(ty,a,b) do { ty _tmp_; _tmp_=(a);(a)=(b);(b)=_tmp_; } while(0) - -#define _DO_INIT_CHECK do {if (!__gr_INIT) {__gr_Result=grNoInitGraph;return; }} while (0) -#define _DO_INIT_CHECK_RV(rv) do {if (!__gr_INIT) {__gr_Result=grNoInitGraph;return (rv);}} while (0) - -#define IMAGE_CONTEXT_SIZE (((sizeof(GrContext)+15)&~15)+4) - -/* ----------------------------------------------------------------- */ -#ifdef GRX_VERSION -#define GrResetClipBox() GrSetClipBox( 0, PY, getmaxx(), getmaxy()+PY) -#endif - -void __gr_Reset_ClipBox(void); -#define __gr_Reset_ClipBox() \ - do { \ - if (__gr_clip) GrSetClipBox( VL, VT+PY, VR, VB+PY); \ - else GrResetClipBox(); \ - } while(0) - -#ifdef GRX_VERSION -#undef GrResetClipBox -#endif - -#ifdef __BCCGRX_C - -void (__gr_Reset_ClipBox)(void) -{ - if (__gr_clip) GrSetClipBox( VL, VT+PY, VR, VB+PY); - else -#ifdef GRX_VERSION - GrSetClipBox( 0, PY, getmaxx(), getmaxy()+PY); -#else - GrResetClipBox(); -#endif -} - -#endif - -/* ----------------------------------------------------------------- */ - -extern int __gr_getmode_whc(int idx, int *width, int *height, long *colors); -extern int __gr_adaptcnv(int grx); - -#ifndef GRX_VERSION -/* Some usefull GRX 2.0 functions for 1.0x libraries */ -#define MMSK (GrXOR|GrOR|GrAND) -#define GrWriteModeColor(c) (((c)&MMSK) | GrWRITE) -#define GrXorModeColor(c) (((c)&MMSK) | GrXOR) -#define GrOrModeColor(c) (((c)&MMSK) | GrOR) -#define GrAndModeColor(c) (((c)&MMSK) | GrAND) -#endif - -#endif - diff --git a/thirdparty/grx249/src/bgi/bgiext01.c b/thirdparty/grx249/src/bgi/bgiext01.c deleted file mode 100644 index 6d51cf3..0000000 --- a/thirdparty/grx249/src/bgi/bgiext01.c +++ /dev/null @@ -1,102 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libbcc.h" -#include "bgiext.h" - -unsigned char _dac_normal[256][3] = { - { 0, 0, 0}, { 0, 0,42}, { 0,42, 0}, { 0,42,42}, - {42, 0, 0}, {42, 0,42}, {42,21, 0}, {42,42,42}, - {21,21,21}, {21,21,63}, {21,63,21}, {21,63,63}, - {63,21,21}, {63,21,63}, {63,63,21}, {63,63,63}, - { 0, 0, 0}, { 5, 5, 5}, { 8, 8, 8}, {11,11,11}, - {14,14,14}, {17,17,17}, {20,20,20}, {24,24,24}, - {28,28,28}, {32,32,32}, {36,36,36}, {40,40,40}, - {45,45,45}, {50,50,50}, {56,56,56}, {63,63,63}, - { 0, 0,63}, {16, 0,63}, {31, 0,63}, {47, 0,63}, - {63, 0,63}, {63, 0,47}, {63, 0,31}, {63, 0,16}, - {63, 0, 0}, {63,16, 0}, {63,31, 0}, {63,47, 0}, - {63,63, 0}, {47,63, 0}, {31,63, 0}, {16,63, 0}, - { 0,63, 0}, { 0,63,16}, { 0,63,31}, { 0,63,47}, - { 0,63,63}, { 0,47,63}, { 0,31,63}, { 0,16,63}, - {31,31,63}, {39,31,63}, {47,31,63}, {55,31,63}, - {63,31,63}, {63,31,55}, {63,31,47}, {63,31,39}, - {63,31,31}, {63,39,31}, {63,47,31}, {63,55,31}, - {63,63,31}, {55,63,31}, {47,63,31}, {39,63,31}, - {31,63,31}, {31,63,39}, {31,63,47}, {31,63,55}, - {31,63,63}, {31,55,63}, {31,47,63}, {31,39,63}, - {45,45,63}, {49,45,63}, {54,45,63}, {58,45,63}, - {63,45,63}, {63,45,58}, {63,45,54}, {63,45,49}, - {63,45,45}, {63,49,45}, {63,54,45}, {63,58,45}, - {63,63,45}, {58,63,45}, {54,63,45}, {49,63,45}, - {45,63,45}, {45,63,49}, {45,63,54}, {45,63,58}, - {45,63,63}, {45,58,63}, {45,54,63}, {45,49,63}, - { 0, 0,28}, { 7, 0,28}, {14, 0,28}, {21, 0,28}, - {28, 0,28}, {28, 0,21}, {28, 0,14}, {28, 0, 7}, - {28, 0, 0}, {28, 7, 0}, {28,14, 0}, {28,21, 0}, - {28,28, 0}, {21,28, 0}, {14,28, 0}, { 7,28, 0}, - { 0,28, 0}, { 0,28, 7}, { 0,28,14}, { 0,28,21}, - { 0,28,28}, { 0,21,28}, { 0,14,28}, { 0, 7,28}, - {14,14,28}, {17,14,28}, {21,14,28}, {24,14,28}, - {28,14,28}, {28,14,24}, {28,14,21}, {28,14,17}, - {28,14,14}, {28,17,14}, {28,21,14}, {28,24,14}, - {28,28,14}, {24,28,14}, {21,28,14}, {17,28,14}, - {14,28,14}, {14,28,17}, {14,28,21}, {14,28,24}, - {14,28,28}, {14,24,28}, {14,21,28}, {14,17,28}, - {20,20,28}, {22,20,28}, {24,20,28}, {26,20,28}, - {28,20,28}, {28,20,26}, {28,20,24}, {28,20,22}, - {28,20,20}, {28,22,20}, {28,24,20}, {28,26,20}, - {28,28,20}, {26,28,20}, {24,28,20}, {22,28,20}, - {20,28,20}, {20,28,22}, {20,28,24}, {20,28,26}, - {20,28,28}, {20,26,28}, {20,24,28}, {20,22,28}, - { 0, 0,16}, { 4, 0,16}, { 8, 0,16}, {12, 0,16}, - {16, 0,16}, {16, 0,12}, {16, 0, 8}, {16, 0, 4}, - {16, 0, 0}, {16, 4, 0}, {16, 8, 0}, {16,12, 0}, - {16,16, 0}, {12,16, 0}, { 8,16, 0}, { 4,16, 0}, - { 0,16, 0}, { 0,16, 4}, { 0,16, 8}, { 0,16,12}, - { 0,16,16}, { 0,12,16}, { 0, 8,16}, { 0, 4,16}, - { 8, 8,16}, {10, 8,16}, {12, 8,16}, {14, 8,16}, - {16, 8,16}, {16, 8,14}, {16, 8,12}, {16, 8,10}, - {16, 8, 8}, {16,10, 8}, {16,12, 8}, {16,14, 8}, - {16,16, 8}, {14,16, 8}, {12,16, 8}, {10,16, 8}, - { 8,16, 8}, { 8,16,10}, { 8,16,12}, { 8,16,14}, - { 8,16,16}, { 8,14,16}, { 8,12,16}, { 8,10,16}, - {11,11,16}, {12,11,16}, {13,11,16}, {15,11,16}, - {16,11,16}, {16,11,15}, {16,11,13}, {16,11,12}, - {16,11,11}, {16,12,11}, {16,13,11}, {16,15,11}, - {16,16,11}, {15,16,11}, {13,16,11}, {12,16,11}, - {11,16,11}, {11,16,12}, {11,16,13}, {11,16,15}, - {11,16,16}, {11,15,16}, {11,13,16}, {11,12,16}, - {21,21,21}, {21,21,63}, {21,63,21}, {21,63,63}, - {63,21,21}, {63,21,63}, {63,63,21}, {63,63,63} -}; - -void setrgbdefaults(void) -{ - int i; - - for (i = 0; i < 256; ++i) - setrgbpalette(i,_dac_normal[i][0],_dac_normal[i][1],_dac_normal[i][2]); -} - diff --git a/thirdparty/grx249/src/bgi/bgiext01.lo b/thirdparty/grx249/src/bgi/bgiext01.lo deleted file mode 100644 index d6e2b05a72970ea82e2153cc2e95d4fbee14a9d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2256 zcma)7Piq@T6o1mn_SU-|jl#-^Wa#SP64mLhC1Y&Wmx*Fz(^fR0wwpjpmzBJcORPUg zD^N;k35K)~@*Q&MHzU9svyJ$H+!x3XldC;gdA{oqqS9yQR_R`>+2UjYf~plE{1d6Oo_2pgH|w zH+lL}yMy)(P5<4wd-^I7kxzf+k4IE&@W&Tld1u7FL{?!HV0D!yG+A=9BohC!QqmL| zbg{zR+?=lKhG8(qGMS8JS-D(J2$9d{S5{UEg@WTa>+9>~ayjBl4$=m>2KX?JH3_x^ zj)hb}$<79BTVA*2nk~0%DQRp;drjKcFzgK_e@G30M%*fRddJFeWlgWSPh@A!y_T%LP_nZD0GwHn?rp}qpISs~jlk1Co8c?#c z0mI;?!Iuo4HaMq|=Ef2?Og;@L+1bEl{rps{oWb7C&UU_VSRb^*LH?M|=dpG?Yh{gWUJ16qRKDv2MO)>~Wx zSVnt;0c@d7r2+D2lX$dWlBH&F`wv^8Uq>7E#`ZY&dclbs;)cOJ@<_$4c&+m6UKRR1FKkCW& t{M1^Qh64gHiLD9-DuwhM)l#>9fc1RL#X@yRs0UQuYvetPknt4r{s-uj@^AnE diff --git a/thirdparty/grx249/src/bgi/bgiext02.c b/thirdparty/grx249/src/bgi/bgiext02.c deleted file mode 100644 index 8c853ae..0000000 --- a/thirdparty/grx249/src/bgi/bgiext02.c +++ /dev/null @@ -1,102 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libbcc.h" -#include "bgiext.h" - -unsigned char _dac_g256[256][3] = { - { 0, 0, 0}, { 1, 0, 0}, { 1, 0, 2}, { 0, 1, 1}, - { 1, 1, 1}, { 2, 1, 1}, { 2, 1, 3}, { 1, 2, 2}, - { 2, 2, 2}, { 3, 2, 2}, { 3, 2, 4}, { 2, 3, 3}, - { 3, 3, 3}, { 4, 3, 3}, { 4, 3, 5}, { 3, 4, 4}, - { 4, 4, 4}, { 5, 4, 4}, { 5, 4, 6}, { 4, 5, 5}, - { 5, 5, 5}, { 6, 5, 5}, { 6, 5, 7}, { 5, 6, 6}, - { 6, 6, 6}, { 7, 6, 6}, { 7, 6, 8}, { 6, 7, 7}, - { 7, 7, 7}, { 8, 7, 7}, { 8, 7, 9}, { 7, 8, 8}, - { 8, 8, 8}, { 9, 8, 8}, { 9, 8,10}, { 8, 9, 9}, - { 9, 9, 9}, {10, 9, 9}, {10, 9,11}, { 9,10,10}, - {10,10,10}, {11,10,10}, {11,10,12}, {10,11,11}, - {11,11,11}, {12,11,11}, {12,11,13}, {11,12,12}, - {12,12,12}, {13,12,12}, {13,12,14}, {12,13,13}, - {13,13,13}, {14,13,13}, {14,13,15}, {13,14,14}, - {14,14,14}, {15,14,14}, {15,14,16}, {14,15,15}, - {15,15,15}, {16,15,15}, {16,15,17}, {15,16,16}, - {16,16,16}, {17,16,16}, {17,16,18}, {16,17,17}, - {17,17,17}, {18,17,17}, {18,17,19}, {17,18,18}, - {18,18,18}, {19,18,18}, {19,18,20}, {18,19,19}, - {19,19,19}, {20,19,19}, {20,19,21}, {19,20,20}, - {20,20,20}, {21,20,20}, {21,20,22}, {20,21,21}, - {21,21,21}, {22,21,21}, {22,21,23}, {21,22,22}, - {22,22,22}, {23,22,22}, {23,22,24}, {22,23,23}, - {23,23,23}, {24,23,23}, {24,23,25}, {23,24,24}, - {24,24,24}, {25,24,24}, {25,24,26}, {24,25,25}, - {25,25,25}, {26,25,25}, {26,25,27}, {25,26,26}, - {26,26,26}, {27,26,26}, {27,26,28}, {26,27,27}, - {27,27,27}, {28,27,27}, {28,27,29}, {27,28,28}, - {28,28,28}, {29,28,28}, {29,28,30}, {28,29,29}, - {29,29,29}, {30,29,29}, {30,29,31}, {29,30,30}, - {30,30,30}, {31,30,30}, {31,30,32}, {30,31,31}, - {31,31,31}, {32,31,31}, {32,31,33}, {31,32,32}, - {32,32,32}, {33,32,32}, {33,32,34}, {32,33,33}, - {33,33,33}, {34,33,33}, {34,33,35}, {33,34,34}, - {34,34,34}, {35,34,34}, {35,34,36}, {34,35,35}, - {35,35,35}, {36,35,35}, {36,35,37}, {35,36,36}, - {36,36,36}, {37,36,36}, {37,36,38}, {36,37,37}, - {37,37,37}, {38,37,37}, {38,37,39}, {37,38,38}, - {38,38,38}, {39,38,38}, {39,38,40}, {38,39,39}, - {39,39,39}, {40,39,39}, {40,39,41}, {39,40,40}, - {40,40,40}, {41,40,40}, {41,40,42}, {40,41,41}, - {41,41,41}, {42,41,41}, {42,41,43}, {41,42,42}, - {42,42,42}, {43,42,42}, {43,42,44}, {42,43,43}, - {43,43,43}, {44,43,43}, {44,43,45}, {43,44,44}, - {44,44,44}, {45,44,44}, {45,44,46}, {44,45,45}, - {45,45,45}, {46,45,45}, {46,45,47}, {45,46,46}, - {46,46,46}, {47,46,46}, {47,46,48}, {46,47,47}, - {47,47,47}, {48,47,47}, {48,47,49}, {47,48,48}, - {48,48,48}, {49,48,48}, {49,48,50}, {48,49,49}, - {49,49,49}, {50,49,49}, {50,49,51}, {49,50,50}, - {50,50,50}, {51,50,50}, {51,50,52}, {50,51,51}, - {51,51,51}, {52,51,51}, {52,51,53}, {51,52,52}, - {52,52,52}, {53,52,52}, {53,52,54}, {52,53,53}, - {53,53,53}, {54,53,53}, {54,53,55}, {53,54,54}, - {54,54,54}, {55,54,54}, {55,54,56}, {54,55,55}, - {55,55,55}, {56,55,55}, {56,55,57}, {55,56,56}, - {56,56,56}, {57,56,56}, {57,56,58}, {56,57,57}, - {57,57,57}, {58,57,57}, {58,57,59}, {57,58,58}, - {58,58,58}, {59,58,58}, {59,58,60}, {58,59,59}, - {59,59,59}, {60,59,59}, {60,59,61}, {59,60,60}, - {60,60,60}, {61,60,60}, {61,60,62}, {60,61,61}, - {61,61,61}, {62,61,61}, {62,61,63}, {61,62,62}, - {62,62,62}, {63,62,62}, {63,62,63}, {62,63,63}, - {63,63,63}, {63,63,63}, {63,63,63}, {63,63,63} -}; - -void setrgbgray256(void) -{ - int ci; - - for (ci = 0; ci < 256; ++ci) - setrgbpalette( ci, _dac_g256[ci][0], _dac_g256[ci][1], _dac_g256[ci][2]); -} - diff --git a/thirdparty/grx249/src/bgi/bgiext02.lo b/thirdparty/grx249/src/bgi/bgiext02.lo deleted file mode 100644 index e381015bd7292575387d33d2078780d01898da4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2252 zcma)-%TF6e9DrxN#uzYbW6axtc|VL7+n6^baS))ks6h=hm0D$Gh-<2Zhs;`nDryxW zrIn)m4>|NdXq9s%qU72`Pd)e0LoZd2ebC>x_68SGsb9X?ncvKBXJ^N=7pS87XD^$|D)48dX7MIOCOW^?R`Ak9(<$5AXi+=f%avlXH*cJ^PmA=P$ViU#@x1 zUhA7u|IOvE&3k8WG$;A&Rp`kDla+q@_`Y>c_O(ccraVeksc9b6H4o_M_2}Tm8r=&u z==0Wq4{K|DP>X(FE%>pn)(>@9@2`V;Y^bY;1`O0UKmZ#X0?>#?pb-oVHX0DbkP(Cs zHU&e_gyB#Vgt56P49yq`H$wzlnj_GHt&tXJ#kQ7KXv6l_HfYC=wsz>i&h`%I#IBA` z=)!1c7eukUD+=A%6YYi`?CtJ>UX1nhLJa$QW6+2Fu|DX>fxdniz`_0j7{sB0K^Vf} z!66vNk)dH2!O`In7{#%XQ5eJV(J>gu_}Dnaabi3U6PSokKmyH)1eiFPFkupt<|HIB zHJOAIrjsd1<5VgQQC>e|q=5GM2TFVF*SZ2;@7MBm%}HO>8Byw8 z>Q%%4m1o5WJk_&C=*(*wkyWF8)re+|*n39kopU3QeQo%&Zw#*rN%}{XdwI@v$Rpn3 zRli-l4Wyy7!YXv<4K6!$=S`|(_b*SmPgnlSL22o#?n+#LC9b^^YtDYr$-9STJ)Kn< zVUJHGt76`F&5dPKn`FJ4ZY(w9YNzm7{=`nE&0Tezw~K|HLNRxmo}N*bbuu?&7V@@r zv}@UWrGtm&&WW^PG9^`hd0(X_?ILbZB+jd^2=Z!q_ zBlE2KMx|P%jvGqNO6?6Q6_eT{+xiJL2f;i(-M4c)QrpFHz2~-y`A4QLi&f@>oSjqV z&hfEwI?U_WYVIEH@8=IB|KQNhn{vbw$98V_VI?jcl+2^z;ZeS5pDL5d^Ly5(#oT^g znT6tE=}1=dzj-Q|O;y?aAH=WC`KEB*D7{iRWA4egC2i*%OAXF%B6XJ(PRA`N@SW^U zOls!h6fzg{4@qG@z8QGI#SNqxBNpOP$ajZcxD5sc=76LW+P=zBC$IWjaq~7RdE~=4 zk~dLqI#=>2+m+hsl*(yg`_kWM+OszC}N_c2%X(zj&3`_kvaJir;K&ih&No;xGui<|ck DAgckF diff --git a/thirdparty/grx249/src/bgi/bgimode.c b/thirdparty/grx249/src/bgi/bgimode.c deleted file mode 100644 index 944a03b..0000000 --- a/thirdparty/grx249/src/bgi/bgimode.c +++ /dev/null @@ -1,155 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void set_BGI_mode(int *graphdriver, int *graphmode) -{ - int rx = 0; - int ry = 0; - int rc = 0; - - switch (*graphdriver) { - case VGA : switch (*graphmode) { - case VGALO : rx = 640; ry = 200; rc = 16; break; - case VGAMED: rx = 640; ry = 350; rc = 16; break; - case VGAHI : rx = 640; ry = 480; rc = 16; break; - } - break; - case IBM8514 : switch (*graphmode) { - case IBM8514LO: rx = 640; ry = 480; rc = 256; break; - case IBM8514HI: rx = 1024; ry = 768; rc = 256; break; - } - break; - case HERCMONO: if (*graphmode == HERCMONOHI) { - rx = 720; - ry = ((__gr_ADAPTER == GR_HERC) ? 348 : 350); - rc = ((__gr_ADAPTER == GR_HERC) ? 2 : 16); - } - break; - case CGA : - case MCGA : - case ATT400 : switch (*graphmode) { - case CGAC0 : - case CGAC1 : - case CGAC2 : - case CGAC3 : rx = 320; ry = 200; break; - case CGAHI : /* == MCGAMED == ATT400MED */ - rx = 640; ry = 200; break; - case MCGAHI: /* == ATT400HI */ - switch (*graphdriver) { - case MCGA : rx = 640; ry = 480; break; - case ATT400: rx = 640; ry = 400; break; - } - break; - } - rc = 16; - break; - case EGA64 : switch (*graphmode) { - case EGA64LO : rx = 640; ry = 200; rc = 16; break; - case EGA64HI : rx = 640; - ry = 350; - rc = ((__gr_ADAPTER == GR_EGA) ? 4 : 16); - break; - } - break; - case EGA : switch (*graphmode) { - case EGALO : rx = 640; ry = 200; rc = 16; break; - case EGAHI : rx = 640; ry = 350; rc = 16; break; - } - break; - case EGAMONO : if (*graphmode == EGAMONOHI || *graphmode == EGAMONOHI_PAS) { - rx = 640; ry = 350; rc = 16; - } - break; - case PC3270 : if (*graphmode == PC3270HI) { - rx = 720; ry = 350; rc = 16; - } - break; - /* ---- extende modes from BCC++ 4.5 */ - /* unknown modes - assume 16 colors */ - case ATTDEB: - case COMPAQ: - case GENOA5: - case GENOA6: - case OAK: - case TECMAR: - case TOSHIBA: - case VIDEO7: - case VIDEO7II: - case S3: - case ATIGUP: - /* 16 color modes */ - case ATI16: - case PARADIS16: - case SVGA16: - case TRIDENT16: - case TRIDENT256: - case TSENG316: - case TSENG416: - case VESA16: rc = 16; - goto ExModes; - /* 256 color modes */ - case ATI256: - case PARADIS256: - case SVGA256: - case TSENG3256: - case TSENG4256: - case VESA256: - case VGA256: rc = 256; - goto ExModes; - /* 32k color modes */ - case ATI32K: - case SVGA32K: - case TSENG432K: - case VESA32K: rc = 1<<15; - goto ExModes; - /* 64k color modes */ - case SVGA64K: - case VESA64K: rc = 1<<16; - goto ExModes; - /* 16M color modes */ - case VESA16M: rc = 1<<24; - ExModes:switch (*graphmode) { - case RES640x350 : rx = 640; ry = 350; break; - case RES640x480 : rx = 640; ry = 480; break; - case RES800x600 : rx = 800; ry = 600; break; - case RES1024x768 : rx = 1024; ry = 768; break; - case RES1280x1024: rx = 1280; ry = 1024; break; - } - break; - default : ERR = grInvalidDriver; - return; - } - - if (rx != 0 && ry != 0 && rc != 0) { - set_BGI_mode_pages(1); - __gr_BGI_w = rx; - __gr_BGI_h = ry; - __gr_BGI_c = rc; - *graphdriver = NATIVE_GRX; - *graphmode = GRX_BGI_EMULATION; - } else - ERR = grInvalidMode; -} diff --git a/thirdparty/grx249/src/bgi/bgimode.lo b/thirdparty/grx249/src/bgi/bgimode.lo deleted file mode 100644 index 4af6b23b714a5c0214551c8c8ad6238caccbc765..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3600 zcmds3ZERCz6h8exSD0%m$_UnvBf1G$uW_{B+C<4Fh?d!Q2Fz8hhGDa{jqNSb8CP8b8KvE_mCUr z)Xl>5(&A9Mxj38-rAA8vdyc}K?m5mbt}Bbit{-?+P6t7Nsn^6C*z*=jrlXQRm^#Lo zZx)Sxf8fL{#-C=j8&@^k+IL#I!Ov$odZk9Zft~`C2)r|j9;p#eU{3{l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&#zaoto>Lnwbxpi8 z*=$;RWNBn|U387w8TSml=~$16Gew~@*5HVJzU0~ zm*8;UABmjL3!b>lnW!{y{nB;rqe_gQ=8^ILC~4};=8^I-$| zKKUk#6cG`Op@?sa2ug_Wem!nHa3S&sM8X<*C&(*_@K+HZ6j@4q2xpuKe=QMyHE;Oq zw0{E;gV?C!HWLxIg^0L>wl`~R*M3v;F3tJ=F}_>ddo=FVxL;!*5%~{l{(;6r8V_qc zqVZ#mpJ+Trd|2cJ@e$l{;xv&{#6rA5L_Ai*M8usVBJKhaaTke*yF^4>5zvjj>n7fd zkI}iK#jI}tnjID%c`nI;2 zaRWbH^E%D?#%-E6wI+@Bj<)uAhq=Sb8BfHvcGS1T#c1kiOLE!&v%H5$9Hp#;q2;0B z*vSkuuWr+UIM&%;k1FWu_Yp`5S|C_9b&skvKZIl)5c6T_R6gd%wNd%-VZ^H6xEoN*UW L_e15eK6c#SMiUoO diff --git a/thirdparty/grx249/src/bgi/bgiprint.c b/thirdparty/grx249/src/bgi/bgiprint.c deleted file mode 100644 index bc8e245..0000000 --- a/thirdparty/grx249/src/bgi/bgiprint.c +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************************ - * * - * Printing from BCC2GRX * - * * - * Author: Andris Pavenis (pavenis@latnet.lv) * - * * - ************************************************************************/ - - -#include -#include -#include -#include -#include -#include "bccgrx00.h" - - - -int __gr_print_mode = -1; -char * __gr_print_dest = NULL; - - -static int bgiprint_init (void); -static int bgiprint_close (void); - - -int set_BGI_print_mode ( int mode , char * dest ) - { - if (dest) - if (*dest==0) - dest = 0; - __gr_print_mode = mode; - if (__gr_print_dest) free(__gr_print_dest); - __gr_print_dest = dest ? strdup(dest) : NULL; - __gr_set_libbcc_init_hooks (bgiprint_init,bgiprint_close); - return 0; - } - - - -static int bgiprint_init (void) - { - int ret; - ret = GrPrintSetMode (__gr_print_mode); - if (ret!=TRUE) { ERR=grInvalidMode; return -1; } - __gr_Mode = 1; - __gr_INIT = 1; - graphdefaults(); - return 0; - } - - -static int bgiprint_close (void) - { - if (__gr_print_dest) - { - GrPrintToFile (__gr_print_dest); - free (__gr_print_dest); - __gr_print_dest = 0; - } - else - { - GrDoPrinting (); - } - return 0; - } - - - diff --git a/thirdparty/grx249/src/bgi/bgiprint.lo b/thirdparty/grx249/src/bgi/bgiprint.lo deleted file mode 100644 index 2fb0751cbba415d91cd4568c0395ef6e2ae7cc2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2440 zcma)7Ur1zS6hAX_{j)k<|75kaLkZcUm=_IMs)yRq9YO6RlZ@c z(zw0v^p=mJGb;L8?Shi!+wF&H@z8$xwzhb+y89i`ZcH26r|aAE^zAz5h57%TzN=DZ zur}zWD<6kSy>;iI+M8cjAeL%gtTLY$yN?a;fou1E@v5nPu->Z+vlXYOOD(N8RhjE) zuYAw4m8R|cPQ#5CrIe^t=(yQ|HuaM>(H^QDHQ#L7Rok4|EiVC8pMeT4UNuh|d_#Om zqW&b%7rX}VeT8;Gl~_+zlB1(9bob7uOL?c%{k$=33=RyHlr{9$vxCOqurbtE_lt(Y zQE&q|IW;dho_+cv;4UyJ^yU=_U2hJZi)z|?IQUEO#Z*LOo-&~~?}X!ev>chz+o$zd zT<;#!V+3c7C=mZFV1F5~ z_X74o!2SugckZ2-*RO%N|1n}elFsHfi@CgGWKL8wvtF>RQ!|&(Ibxby&s{LGmSb*a zOlP%}Uo+BMVkRf2N8*#_^w`*JV$Ph4k4z>^V6#P2Wi^*A+mU2(h9%|-W4U!pR*IGd z*QJ7T=JHuTextC=pbE`e&dW4ax>IdpYGO{Z#nk5NvbB;btvhxdamBJ>h>b0dBq!YZ zDxXR~|9UQ+&SXqBWUdwpYqr=i4f7$v&n3F_Ew7KPz$vlIwql z;3@8gkMrXzOC0Cn&jnL{L*jind1l_Z@l2S@n;lfSg#=Ap?2@PQ8}Q>kLET*s1nJ@a E0R=LakpKVy diff --git a/thirdparty/grx249/src/bgi/circle.c b/thirdparty/grx249/src/bgi/circle.c deleted file mode 100644 index 1b79c48..0000000 --- a/thirdparty/grx249/src/bgi/circle.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void __gr_circle(int x, int y, int radius) -{ - _DO_INIT_CHECK; - if (__gr_Xasp==__gr_Yasp) - GrCircle(x+VL,y+VT+PY, XR(radius), COL); - else - GrEllipse(x+VL,y+VT+PY, XR(radius), YR(radius), COL); -} - diff --git a/thirdparty/grx249/src/bgi/circle.lo b/thirdparty/grx249/src/bgi/circle.lo deleted file mode 100644 index 388af6dcef1b2287527bf74034d3b0cf5285bc7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1936 zcma)6L2nyX5FUHC#ZAn!328ahf*cGgv|Txs)w&gjY#b*kSV@{DDFMOan6(qtv90wp zN~?+jrX`hCREbMDa_a$vgg78^sg%(El^%LQ9C`p`=6ky@SuI8FNVD^OGxO%n&c3(T zOXcZUEJj*lWY9h%Dje`5d1a1KiiCN&EdiAg6ODh*2{XG~AzSxPgyZ1QLpUM_) zO=Xk)9@6@B<9_O^FM)njyqwMVzg0-Zja1-&t518_kIQV%IMW}w_2ld$ne9DJF7{+NPf_{jNir*>y?AhYQUD?uQw1Gj&91N+tP_#HhY?slMq z{Y-X;W{SmgW5<@)x=q;~J8R{w+{y8-V&k8k%2~O*HU6gWCzC5BSuvWKxn<&)z7L-Q68k|$1|5pZzA!#5&nIIQ+30uHe9Ppj#Kv>pE2Gl zoVMz&blO!%u6LW4t+g$3X3F!EcG;Pqp1xRGa+d7La>?=6ou50uvTvttf$Y&>p!_F8S%lUK+>ad+LRd6i9 zZ!NlBnH|8$ha{Ms@S%Dl2E~1Y)shbrc53P}#_bQbCFJSrhM2jv;L``4J!x)Pdj(g!Ark Lf!iwLKXl%|6I=rq diff --git a/thirdparty/grx249/src/bgi/clearvp.c b/thirdparty/grx249/src/bgi/clearvp.c deleted file mode 100644 index 309eac0..0000000 --- a/thirdparty/grx249/src/bgi/clearvp.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void clearviewport(void) -{ - _DO_INIT_CHECK; - GrFilledBox( VL, VT+PY, VR, VB+PY, COLBG); - moveto(0,0); -} - diff --git a/thirdparty/grx249/src/bgi/clearvp.lo b/thirdparty/grx249/src/bgi/clearvp.lo deleted file mode 100644 index 54b8b167ab7f46e3ae1dec13e7cc1c8892ebae42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1836 zcma)6&ubG=5S~q9jcwi5TD4-)2o);TXIhF>@z7S&T8NFcEmSJ3N!%u-X?EFcYARLH zs0dLI^y(kr&6`&x1uq^v_(yo~A|5To`S$H=!XoIv>^I-cyxI5W{dky2PHCD(N;C>n zlM#K3$jGP%gVaU37jN?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thirdparty/grx249/src/bgi/clrdev.c +++ /dev/null @@ -1,34 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void __gr_cleardevice(void) { - _DO_INIT_CHECK; - GrResetClipBox(); - GrFilledBox( 0, 0+PY, getmaxx(), getmaxy()+PY, __gr_colorbg); - __gr_Reset_ClipBox(); - moveto( 0, 0); -} - diff --git a/thirdparty/grx249/src/bgi/clrdev.lo b/thirdparty/grx249/src/bgi/clrdev.lo deleted file mode 100644 index a25d7f993428e1b078d423b682147bd79a5e2b28..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2152 zcma)7O>7%g5T5mJ8|7l>)MI0fZ12E{H1}xF9a2Nt**F5CV>Hiv$uv96>Vk?N76MiUcD)&wMlA%zHcg zcKqgCeqK=&3PmB6ju27uq#wz6YJ!GIc=5nZe+{4cyYTYmmBWAf{r-);7}L7HCwg7b zd&!;e+h=_HfH>ao?kBFiYF^#j{qiXgcDKmO3+NL*_!=Q~;N80(7yHk?7NvIg zQ$5vS?j(7l*?j0*Q&u>5WPLJiY#@H)XOw^Sf*#4Y$#UZcDq z%IlX%xgJ->5}Ni7H`!(1X)i+b6ZD*j@5Bs|cw03@@}_2p(e8;Qk-9P{MvXm@H13Lo zaUkNx9ihE6R1s5#NE;$!i1S(TLRQQ$bxn+C#l)hRS`g`l<1=3zO7d181pDHQ$4T@K zX!K`4%2Dxj5mCLTKXRyE7os@4Exu2s_)(B8mF|=9po9k`tWd~6-$wX6V-dzk>?BP` zFrGIj;bjS5m9Q=0Z3*9y@Ou*eSi+x4_zMYtCE?o={#L?2NcdL?A4-_Ywo|dT^fH-d z)iKMqRRrEFTkPnZe@3rbuGuV`?nb+QO)quG%;hg+jl6kbetupF;j6|B#KK&`dV-h2E1Uo`Y z4^u7JmKHb={uh8Ap5Z#%$O(BB2A_fuNXY9jj`pv~cMH8m|1c}TLqDRm7*d=I|H4lG lL}-W?c*sMouy<_IA%j0)1cEvc+<_?XE#7z6i}*hw?_VEiFzf&T diff --git a/thirdparty/grx249/src/bgi/detectg.c b/thirdparty/grx249/src/bgi/detectg.c deleted file mode 100644 index 0e70070..0000000 --- a/thirdparty/grx249/src/bgi/detectg.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void detectgraph(int *graphdriver,int *graphmode) -{ - __gr_set_up_modes(); - *graphdriver = __gr_adaptcnv(__gr_ADAPTER); - *graphmode = 0; -} - diff --git a/thirdparty/grx249/src/bgi/detectg.lo b/thirdparty/grx249/src/bgi/detectg.lo deleted file mode 100644 index f2166060260d856034d8bdecba19b5bc4737e539..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1472 zcma)5QEL-H5T47$8f(4AA}BU!9wJm~mQ;$UAT&*r`Vd-aQxJSOF3FidO>$iJB$cX^ zfGEZP;2#kD2|@&Y@CW!4eCUh#s1WDdyQN1c*nzp3Z|2*%-PzgK_p=K-^`I+*>^-q83i+i#p`};13!<($NG zV%6TPRJO}CyH;GSmTl&?e7n!oz_UBOrrQrA#kJz2T6rr3PSf#Zqx+oDp#)zz?tJ<} zc*jYL=qlsI+3;?Ye2^@7-2R8K7!J|j>qw{0R{EiBYtMI|3F!_biKZhR67_zcR6v}3 z4AJOyI&PQw-JWy>k6pemoyKm2Tirl-e$R7#xkm!U-M0PIcRDVKmfs6J-p#4y4Kpvs z*m!rC3Y;H`xrAP4#VqOxT47(!Hd_ep7BbI@DOzELeBd4}uthC)RV~!N!HRm(bElW= z$3@TmA_u|$AFse1wLkoX1@+=@O4qA$96tDv1J+y03qQy~F_*AfK58ejI_EORtB8I} zpV-%LA5^`EefF_N^S-lRW7VR00}jOd_l*~zx9A^UBY5aXycR>sav;shBdgvdcvy#8 cx_9hSf$Mp2B0(JpW+2Y{!Myh>6Mi)BAI_YgvH$=8 diff --git a/thirdparty/grx249/src/bgi/drvname.c b/thirdparty/grx249/src/bgi/drvname.c deleted file mode 100644 index 3213dcf..0000000 --- a/thirdparty/grx249/src/bgi/drvname.c +++ /dev/null @@ -1,55 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -char *getdrivername( void ) -{ - _DO_INIT_CHECK_RV(NULL); -#ifdef GRX_VERSION -{ - static char *grxname = NULL; - const GrVideoDriver *vd = GrCurrentVideoDriver(); - if (vd != NULL) { - grxname = realloc(grxname, 16+strlen(vd->name)); - if (grxname != NULL) { - strcpy(grxname, "GRX driver \""); - strcat(grxname, vd->name); - strcat(grxname, "\""); - return grxname; - } - } -} -#else - switch (__gr_ADAPTER) { - case GR_VGA : return "VGA driver"; - case GR_EGA : return "EGA driver"; - case GR_HERC : return "Hercules mono driver"; - case GR_8514A : return "8514A driver"; - case GR_S3 : return "S3 graphics accelerator driver"; - } -#endif - return "unknown graphics driver"; -} - diff --git a/thirdparty/grx249/src/bgi/drvname.lo b/thirdparty/grx249/src/bgi/drvname.lo deleted file mode 100644 index 9b421378af31cc70c8f2a20b7c3322d98dc5a438..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1908 zcma)6U2hvz5S_J6>LzAm!iOT&z^W>!DD=v%Od1dp-lVo0VYMMm+Mr0?I?l$f>a4Bn zbxHUrLT+iTPzfO+@xT**0iJk@6cqmz9{LbOg^;MU%(=T8Z!I1eX?EtEnLB%T?%e&d zSSe|mMxkgFry(MGlJFyWWzJHXCRO}Iu;9L%DbSlKfcl1PcL~tBU=%@-_m`xwtskk-<=&$d3nv~Jx)Fl4SQ z%WAuEtJX14+m^JKIdeeeg@yNwv#T3j$L$*LioD34%XJmX-94Wb*}TZT<@1Erq*$M0 zEni+G{`!4zan_euA=;Z>?f4a z&oY5E=Ys(1Meh}2&<_GThRv{~m<($GBL}k13LkYLX$Eimu6iN{-3+WE`SCu;h=kB( z4kHu1R^^5NNTi2**kd1S!n`#GKOiBHFz*55XrC`}0B3+c^T;0eIa-TpI%1;Din{?t hJ*-2mu*dAuO$Oh>2?TW@n3ZVW8W;FcMf^vY_b))t1egE- diff --git a/thirdparty/grx249/src/bgi/egacolor.c b/thirdparty/grx249/src/bgi/egacolor.c deleted file mode 100644 index 9b91a67..0000000 --- a/thirdparty/grx249/src/bgi/egacolor.c +++ /dev/null @@ -1,91 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -#ifdef __GNUC__ -#define _tc(r,g,b) ((r)<<2),((g)<<2),((b)<<2) -#define UNSIGNED unsigned char -#else -#define _hi15(r,g,b) ( (((r)>>1)<<10)|(((g)>>1)<<5)|((b)>>1) ) -#define _hi16(r,g,b) ( (((r)>>1)<<11)|((g)<<5)|((b)>>1) ) -#define _tc(r,g,b) ( ((r)<<2) | ((g)<<2) | ((b)<<2) ) -#define UNSIGNED unsigned -static unsigned short _hi15_ega[16] = { - _hi15( 0, 0, 0), _hi15( 0, 0,42), _hi15( 0,42, 0), _hi15( 0,42,42), - _hi15(42, 0, 0), _hi15(42, 0,42), _hi15(42,21, 0), _hi15(42,42,42), - _hi15(21,21,21), _hi15(21,21,63), _hi15(21,63,21), _hi15(21,63,63), - _hi15(63,21,21), _hi15(63,21,63), _hi15(63,63,21), _hi15(63,63,63) -}; -static unsigned short _hi16_ega[16] = { - _hi16( 0, 0, 0), _hi16( 0, 0,42), _hi16( 0,42, 0), _hi16( 0,42,42), - _hi16(42, 0, 0), _hi16(42, 0,42), _hi16(42,21, 0), _hi16(42,42,42), - _hi16(21,21,21), _hi16(21,21,63), _hi16(21,63,21), _hi16(21,63,63), - _hi16(63,21,21), _hi16(63,21,63), _hi16(63,63,21), _hi16(63,63,63) -}; -#endif - -static UNSIGNED _tc_ega[] = { - _tc( 0, 0, 0), _tc( 0, 0,42), _tc( 0,42, 0), _tc( 0,42,42), - _tc(42, 0, 0), _tc(42, 0,42), _tc(42,21, 0), _tc(42,42,42), - _tc(21,21,21), _tc(21,21,63), _tc(21,63,21), _tc(21,63,63), - _tc(63,21,21), _tc(63,21,63), _tc(63,63,21), _tc(63,63,63) -}; - -#ifdef __GNUC__ - -int _ega_color(int color) -{ - _DO_INIT_CHECK_RV(0); - switch(GrNumColors()) { - case 1L<<15: - case 1L<<16: - case 1L<<24: - if ((color&15) == 15) - color = GrWhite(); - else { - int oldc = COL; - color = (color&15)*3; - color = setrgbcolor(_tc_ega[color], _tc_ega[color+1], _tc_ega[color+2]); - COL = oldc; - } - break; - } - return color; -} - -#else - -int _ega_color(int color) -{ - switch (getmaxcolor()+1) { - case 1L<<15: return _hi15_ega[color&15]; -#if 0 - case 1L<<16: return _hi16_ega[color&15]; - case 1L<<24: return _tc_ega[color&15]; -#endif - } - return color; -} -#endif diff --git a/thirdparty/grx249/src/bgi/egacolor.lo b/thirdparty/grx249/src/bgi/egacolor.lo deleted file mode 100644 index 03ec3374d8a19003135bf42ab02a6f4ffc4715ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1972 zcma)6O>Y}j6uo0l+cY-gGz2M9EAS$q^lRiGg8~v&rp5_TqokxZMM7n;&BQ^C?PxrM zQiNzCw|vMg0s#_>F1lcm1&d0cERZTyN}vmN`~t)ZK{tpEf=K3^@w|34jReJ z&b@T^#j$MnGfKL{SAX)3h4Enb(8k{&HE(j`H(3|i_@#Hb*Yl2bcG9oCZeQ45`lQ?8 zuDgP4J+KpZ0{;59Pm#XZ6(pCI`{PMHX) zGF#V1`JXadS4PQqPnBOj8*J+oo)aY;JObD={q5cJV9i?s5to!tRl= zZJ8+)p3jb#tA5k-v(K4%Gk0>r575MWPv^{B-kdnv=S9a8(-5qVvJkH3Cqa6WMqpE?-aaykcYMvDF>A_@JShr;ZzI{#ISb1=B(>5&ih0} zF`PIc&qOfmaV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mpw)8L)aXS69zKRwYAXyT1YUDKzuiKkpYgfVdp*D+k#LJ6>`H_4~s z8o@=PyuJ*|Rzx`w3y0sq1N#VlNf7}^(E(;yWIJTA*xRbXhOdMTHqt#-V0x&^re|0> z!{+ALg2D0zTUus%j!hdZZTOrEOrMRi5o3=H8(*=Qalj(REf&rUEk@b&*?YMKkuo=w z!%%i;@!z|!oMBvFc=ge{93}pH7lvQ^evV3A@QEtAbm&k;xBOV%P}iqIYq3WEV0 z4dD9%SP^GJPU>$0>v_b-NQ4GJ^I>}5xd1K%@Jaw%0lXf-TLHWs!0!d{^#HyRz~UqH zd{pnPK>Ygv{vm+x1~63Zdi`RnZEF>%UaZ$W1g5!p=4q{FbF)=3`C6y3u9Y{z%;pzo zjJ&xxKYuP$G>gVeK4T)c=9sxcuIO5?wd$_%lGSdx*2{;M*|KW3*{oLElFePC+Ol|~ z>DrZMz3EUnkagy%s@05Jr7w)3dz?ha6x?sAu)>n5DgX5G-R~)r44SCQFF)DYtnM; zy2kBI4%({4EzrvCHVB7y^r>o<=EjEIKz^giZ4JlQ={C12>mIH(I$FzVwrq!A0*#W} zYi8B4Hf+#pPP5a(YW}xeK_<5EAEE!K2rinPv}n%IdIA@|I>?ETMqA8C)FgEGNw8(& z?9v2KirAa$s3{jsAIe4fpTtG^XdaWS67Y$H-95!2mI zd;Z_Cf7Dy*A5B-;KYuQwZeikY(TSf540$}-N4aG0(1biD7@*CbNR#e>pBKi1-jyWO GlJ_?u5mjvf diff --git a/thirdparty/grx249/src/bgi/fillpatb.c b/thirdparty/grx249/src/bgi/fillpatb.c deleted file mode 100644 index f5a7c11..0000000 --- a/thirdparty/grx249/src/bgi/fillpatb.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* ----------------------------------------------------------------- */ -void setfillpattern( char *upattern, int color) -{ - _DO_INIT_CHECK; - FILL = color; - FPATT = USER_FILL; - memcpy(__gr_fpatterns[USER_FILL], upattern, 8); - FILLP.gp_bmp_data = (unsigned char *)&__gr_fpatterns[USER_FILL]; -} - diff --git a/thirdparty/grx249/src/bgi/fillpatb.lo b/thirdparty/grx249/src/bgi/fillpatb.lo deleted file mode 100644 index 6ec297c7a3b51d311f4fc64b74575f60f86ad05c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1616 zcma)6&1(};5TDJa8f#2z6e(1+hbooWN1{cl2&OG{CP242Xe7SiGX(?JL zeuPly(Lch22mb&uhu%H=2Y3}P1%){CKFqQdbYL>``^~(0?@i|ItNHALVHlvr02BHM z;K-DbDPbmH2x20BLM`|?bm`ak-@RUMfL3)5i0;H+fAubOcF8{kjP<(vpRN)r9;~XA z?0B?2DE-4w6hocdc%-u)?kG~OZa>)A`?Aqq54Rsio^(6m@h)WM=I)G5tmVBL_r`9s zDVCf}c><+g-bk|K6iZ!`JcO|OX~oK`WabDa2l7lt1_e~w8f@QEo-*e6VJQa{#RmYfNZeh@tq zP6hB_0G|wCL-d14x?3F2GwREThfYAshv~kV0Dcs}PXk!=OmVcn6^OqLU?@JXR2nwV zvjQ|7t`K+J8dz3q`W7oW+-ejoUiNC6%x-~|$u7^%WUb|eh1L0-m7AH(&RdvUa;?Rs z#hmn3oTgXd(l692b(iW&Sj5e0^}bJAH5HUc5u4M@&|FeS2hYg=J`t0%kr)EFiF^Vt zc#rH^fE?L4z&hD;0ApxF_;=qWOT}1otIF*>TJB0))}HHB7M3t4zBb43&>19-!eLb;h^n*`uxBL z^!=jWSprGQ|5siTbHw>*6BMfFf5W<77J2e1pX4Lzb>Yb$ijl4 -#include "bccgrx00.h" - -/* - - Take care : Borland C defines polypoints as int * but - - assumes struct pointtype * . - - GRX requires int points[][2] ! - - The good news are : Both definitions are compatible ! -*/ - -void fillpoly(int numpoints, void *polypoints) -{ - void *cpp; - - _DO_INIT_CHECK; - if (VL != 0 || VT+PY != 0) { - int i, *ppd, *pps; - - pps = polypoints; - ppd = cpp = alloca( sizeof(int) * 2 * numpoints); - if (cpp==NULL) { - ERR = grNoScanMem; - return; - } - for (i=0; i < numpoints; ++i) { - *(ppd++) = *(pps++) + VL; - *(ppd++) = *(pps++) + VT+PY; - } - } else - cpp = polypoints; - - switch (FPATT) { - case SOLID_FILL : - GrFilledPolygon(numpoints, cpp, FILL); - if (COL != FILL) - __gr_drawpol(numpoints, polypoints, TRUE); - break; - case EMPTY_FILL : - GrFilledPolygon(numpoints, cpp, COLBG); - if (COL != COLBG) - __gr_drawpol(numpoints, polypoints, TRUE); - break; - default : - FILLP.gp_bmp_fgcolor = FILL; - FILLP.gp_bmp_bgcolor = COLBG; - GrPatternFilledPolygon( numpoints, cpp, &FILLP); - __gr_drawpol( numpoints, polypoints, TRUE); - break; - } -} diff --git a/thirdparty/grx249/src/bgi/fillpolb.lo b/thirdparty/grx249/src/bgi/fillpolb.lo deleted file mode 100644 index f9fa6e72efb9bc8f0656de061377ed9f927499c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2256 zcma)7UrZcj5TCtW>OpCbBK~U|w1xdCm&6G^U1{c;>%Ge?E{HKo7mSj)zlOX{&{E=v(D`9Cz}n4PV(K%Z|3*S zH#^^-dpDIH;W!SMaKOVZ0+`$9NBTU~0SP$h#RE6|o_O-Fto_4lXV2W*ab5S)Y7B|i zR<~m|DxbEXZKv+`)*OqbJ57t3wXQ8%{h3^#`u8n+{Id{>3S4;LL-?DDEtT>r8W6sw!(b^K+=UsEdHRIkF2hwWfi7;}C}5=FYMpI-S&A<=Hywgeg~*Ki+st zI=5P#1!tL(`IB*u(`-*P20k>KCPFJ%YmN6muYP%qCM^A1#80!>?!uCv;W{92?=Slm z9c^2M(c$3}tsU8%Su)Jl0kKc)Io@k}sQ2PCJz`Iv*xTv*0R&9kh@%e2=y(=z3v1-# zaZuqT+=bJ?EyTGaje_t2?qE0ij(QP*WjZjagYm`K(1E()_xUS=RmVTgHLNDrlh>2i zaK=mfai<_1@G19R5k&EWdz-PIM?#F|*gohAVfx-=1iu==nFu}?!KDbk5W#i?e-go;Mer99d^Li6C=rqAr~rKbi5Z*|N$E!#7@+%5qVWv_hfcI|^mlC~3Z(*HlfX5@1vxL8VMiXzF}X zD}}S6;(0h{IryxnwARkc~w%iysT1N z_Tz}*B|3z<;Q&Af>aK$T{iN|t8YYd0g3dq}l5UZ12Kbru!vKGy7Vxt1c(%ImU>!y+ zJPL4vFvbT-KL#*P`f&h>;!gnR0e+A4VStZO$MC&u#e6Z`qY2V#j3MVx8@jKj zn58SKXee_Ah?BA*gP5ySz;lRuZ>E^nW@eNU@=Kbbi1=h2_u3NRV#yTCx>i5C*4GU<~9L8%!<4qz2!gzCt z!~MI3{iEJe|L6r}{R`(pH!NVj8anZ6cz1<(G>>wz-k}LEV4$8AkC>Ts2Ex31xNemu I1j2a#0RK~YFaQ7m diff --git a/thirdparty/grx249/src/bgi/fillstyl.c b/thirdparty/grx249/src/bgi/fillstyl.c deleted file mode 100644 index 303cc13..0000000 --- a/thirdparty/grx249/src/bgi/fillstyl.c +++ /dev/null @@ -1,38 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void setfillstyle(int pattern, int color) -{ - _DO_INIT_CHECK; - if (pattern < 0 || pattern > USER_FILL) { - ERR = grError; - return; - } - FPATT = pattern; - FILL = color; - FILLP.gp_bmp_data = (unsigned char *)&__gr_fpatterns[FPATT]; -} - diff --git a/thirdparty/grx249/src/bgi/fillstyl.lo b/thirdparty/grx249/src/bgi/fillstyl.lo deleted file mode 100644 index e30a58af82d96efac855b3140ca85729386dc4ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1640 zcma)6&rcIk5T0!d7O4CZ4+NteD!~BHLWogL1uRHXD1maqWYgAdQQB>@eT}UlN*iW1on-c#Z)SEnZ#r*ZC6X(erjZhjg4AI| zgCQp}Z^I-FP`@4Tc3=28aP!ai^LD%4g}1hw>1eolj99bh^=G+w^gHr=+I2jRMoxwt z`()Jh9U}E~hki!_~cHuX3E<512HdR zGqW|D&AyzAiP*fDz2o?~HrkJ{cCoH*>`;K{BYZ*D5mt!yVvDqcur?M6g^u|cQTE-i zBSa=J)gL|z9Q3yOLy5k1z;fR@KL*JJv zS}ay&qbPDzHKbw&>3aSCJy9^EUdicluV(IxOr7-AWNK+Ksi#&}wi9VRy||Q2=$u=y z^tFw(v}5Hf8EKXsJ6A52EmZA9>5_Fg5r&N$Ui zGyxnSngjBH7Jx%Uao{k~7VsKT*2Qtg0RQcefG8@ejgrh{8Kvdmp0X^XD5O!BB%Wks zhD5enCEFn`ABM=4OC`hPe6uVK!RtO#m6_bW%L`^rRIGBvuw;V-iW_@+-pZ5=5(TSV zt8h2}EpIrJk9i^ZK42Sh*Pyr$&|9py18Q^QY}j`A@3cyc&ht0#UAAUD=)@5c7OO07S!|JWmPZ9e%Q!|d|;inE$4w4bjL-< zOY~J4E~YKynMGpsT;~kZE&UTtriR!h^4)6Rbd~nPb^TW;}5A*QW sVoICrh_muaQy(kx@E&TZ*|AAy+`u~+uAmMCJK)VbWO8apoQKN$3;LJ9ZvX%Q diff --git a/thirdparty/grx249/src/bgi/fldfill.c b/thirdparty/grx249/src/bgi/fldfill.c deleted file mode 100644 index fe82ed4..0000000 --- a/thirdparty/grx249/src/bgi/fldfill.c +++ /dev/null @@ -1,305 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -#if 0 && ((GRX_VERSION_API-0)>=0x0225) -/* GRX has floodfill */ - -void floodfill(int x, int y, int border) -{ - _DO_INIT_CHECK; - x += VL; - y += VT+PY; - - if ( FPATT == SOLID_FILL || FPATT == EMPTY_FILL) { - GrColor color = (FPATT==SOLID_FILL) ? FILL : COLBG; - GrFloodFill( x, y, (GrColor)border, color); - } else { - FILLP.gp_bmp_fgcolor = FILL; - FILLP.gp_bmp_bgcolor = COLBG; - GrPatternFloodFill( x, y, (GrColor)border, &FILLP); - } -} - -#else -/* use BCC2GRX flood fill function */ - -#include - -static int lx, ly, mx, my; -static GrColor _border; -static GrColor _color; -static jmp_buf error; - -typedef unsigned char element; /* for 1bit/pixel images */ -typedef unsigned short line_index; /* start index table */ -static element **done = NULL; /* bitmap of already processed pixel */ -static element **start = NULL; /* pixel that need to be processed */ -static int elements; /* no. bytes in each bitmap line */ -static line_index *start_flg = NULL; /* !=0: index+1 of first start element !=0 */ - /* ==0: nothing to do */ - -#define bits_per_element (sizeof(element)*8) -#define offset_div (bits_per_element) -#define calc_bit(x) ( ((element)1) << ((x)&(bits_per_element-1))) -#define calc_high_bits(x) ( (~((element)0)) << ((x)&(bits_per_element-1))) -#define calc_ofs(x) ((x) / offset_div) - -/* ----------------------------------------------------------------- */ -#if defined(__GNUC__) -#define _BGI_INLINE_ __inline__ -#elif defined(_MSC_VER) -#define _BGI_INLINE_ _inline -#else -#define _BGI_INLINE_ -#endif -/* ----------------------------------------------------------------- */ - -/* -------- internal line buffer functions -** -** (x,y) scaled to (0..mx,0..my) -*/ - -static _BGI_INLINE_ element *generate_line(element **buf, int y) { - if (buf[y] == NULL) - if ( (buf[y] = calloc(sizeof(element),elements)) == NULL) - longjmp(error,1); - return buf[y]; -} - -static _BGI_INLINE_ void mark_line( element **buf, int x1, int x2, int y) { - element *l = generate_line(buf,y); - element *anf, *ende; - int start_bit, stop_bit; - - anf = &l[calc_ofs(x1)]; - ende = &l[calc_ofs(x2)]; - start_bit = calc_high_bits(x1); - if (anf != ende) { - *(anf++) |= start_bit; - if (anf != ende) - memset(anf,~0,(ende-anf)*sizeof(element)); - start_bit = ~0; - } - /* start_bit rejects all invalid low bits, let stop_bit discard - all invalid high bits, but make sure stop_bit won't get zero */ - stop_bit = ~calc_high_bits(x2+1); - if ( stop_bit ) - start_bit &= stop_bit; - *ende |= start_bit; -} - -static _BGI_INLINE_ void set_pix(element **buf, int x, int y) { - element *l = generate_line(buf,y); - l[calc_ofs(x)] |= calc_bit(x); -} - -static _BGI_INLINE_ int test_pix(element **buf, int x, int y) { - element *l = buf[y]; - if (l != NULL) - return (l[calc_ofs(x)] & calc_bit(x)) != 0; - return FALSE; -} - -static _BGI_INLINE_ int test_screen(int x, int y) { - return (GrPixelNC(x+lx,y+ly) == _border); -} - -static _BGI_INLINE_ int test_pixel(int x, int y) { - if (test_pix(done,x,y)) return TRUE; - if (test_screen(x,y)) { - set_pix(done,x,y); - return TRUE; - } - return FALSE; -} - -static _BGI_INLINE_ void SetStartFlag(int x, int y) { - int _x = calc_ofs(x); - if ( !start_flg[y] - || _x 0 && !test_pixel(sx-1,y)) - --sx; - while ( x < mx && !test_pixel(x+1,y)) - ++x; - GrHLine( sx+lx, x+lx, y+ly, _color); - mark_line( done, sx, x, y); - if (y>0) { mark_line( start, sx, x, y-1); - SetStartFlag(sx,y-1); } - if (y 0 && !test_pixel(sx-1,y)) - --sx; - while ( x < mx && !test_pixel(x+1,y)) - ++x; - GrPatternFilledLine( sx+lx, y+ly, x+lx, y+ly, &FILLP); - mark_line( done, sx, x, y); - if (y>0) { mark_line( start, sx, x, y-1); - SetStartFlag(sx,y-1); } - if (y mx || y > my || GrPixel(x,y) == _border) - return; - - mx -= lx; _x = x - lx; - my -= ly; _y = y - ly; - done = calloc(sizeof(element *), my+1); - start = calloc(sizeof(element *), my+1); - start_flg = calloc(sizeof(line_index), my+1); - if (done==NULL || start==NULL || start_flg==NULL) { - ERR = grNoFloodMem; - goto FreeMem; - } - - if (setjmp(error) == 0) { - elements = calc_ofs(mx + bits_per_element) + 1; - - set_pix(start, _x, _y); - SetStartFlag(_x,_y); - if ( FPATT == SOLID_FILL || FPATT == EMPTY_FILL) { - _color = (FPATT==SOLID_FILL) ? FILL : COLBG; - work(solid_fill); - } else { - FILLP.gp_bmp_fgcolor = FILL; - FILLP.gp_bmp_bgcolor = COLBG; - work(pattern_fill); - } - } else { - /* generate_line() called longjmp() : out of memory error */ - ERR = grNoFloodMem; - } - -FreeMem: - if (done != NULL) { - int i; - for (i=my; i >= 0; --i) - if (done[i] != NULL) - free(done[i]); - free(done); - done = NULL; - } - if (start != NULL) { - int i; - for (i=my; i >= 0; --i) - if (start[i] != NULL) - free(start[i]); - free(start); - start = NULL; - } - if (start_flg != NULL) { - free(start_flg); - start_flg = NULL; - } -} - -#endif diff --git a/thirdparty/grx249/src/bgi/fldfill.lo b/thirdparty/grx249/src/bgi/fldfill.lo deleted file mode 100644 index 64f6034e358aa2109864da6df14aa62f851f0154..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9252 zcmds64|G)3nZIvlAY&Ncq%gX%#yZxiCYvw~HpWcJb~DL@40V8U2nvV}A(=@ClT12! z!O%tMIvL=d=KvKdmP4&|PtUqr*Yzw29<4PYkYLy2QmKEc-4;)4OA59~y8?>N{=WO} zOCCew@wDe`w|(cl`Q6`lzkBa@zx&ls^e$L%LB{7P&Fp8v5 zp%vk`QlsHKTBKH6S^;w%T3xBS!c(L@d=zT>JO@G;dSE+v`jk!jz>2v_ujALXB%D(` z#krT$hl=KI8brM_^E7@n?hHP+MwS^=lIr{F`De+yL%*@6-zqrv3wueCwt`HgN$t0) zKbkYNWk$_W=Rg^j308S@i?whqhy#{gWEHn3(*xD?sC2Z=V;@_Na(3Sh7=e*rPT6z& zxg&qyDe;wufhw8e%zTAfow8>)xuM%Bg?Y7T3Qw0>AEZvybLxlA1BF8;tnthXip_WA z-s$N%Ghft8M=R z3nu(WwsEu7h`t`$>0N8E^tQ0p$Z`mtW{;a+AV2dz73 zb`dR2QzL}!(wWnTq0Z64b5x%VO6VOM`0cZ= zTz4Y#jmjrG{u>X_Y8G`14kM}*Y&iFVvWjg&lH)PC{Q?VmQcr^stYR0VTdnsRh@ebEK& z7IN4((F05_LbXdeZACUyU-O+-=4AUNdl5z}K}E^)G<{~`4 z5rh@+k$TSTkTeEiSy#|`z=Djg6#6iPGkY91IS-(y=Ms~vw!VTYZeou#ZlX;qph@09 zCL-W5>0&JZsPBEH3`^$RAM&`c7hPnWz0fy`rF;LL3@EF4C~Pi>x-Gp zF;*(Ros!&M%Ac2H&u!$@v>R2Ch><)$PXAiypL|K5{Tbw#liMf`ChuPz!E7^MBCS1Q zKX7MXVhcQ8k{MJB)DdT<4g-vJ!UI$FOD@bjM_K{W;^+4N*Zed<;rthnpAe0K^eKm) zoN{{+4M^RTp(0qCW@$(|ciTjcsxW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*D+53Bh0`i>qM-CFl`^fe}C|{x9 kp`fT-fD*?#_A++|S3aY#K_?Y+4ssxibFl9R1A;ZUKNop<&;S4c diff --git a/thirdparty/grx249/src/bgi/getdefpa.c b/thirdparty/grx249/src/bgi/getdefpa.c deleted file mode 100644 index d8f89fe..0000000 --- a/thirdparty/grx249/src/bgi/getdefpa.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* ----------------------------------------------------------------- */ -struct palettetype *__gr_getdefaultpalette(void) { - return getdefaultpalette(); -} diff --git a/thirdparty/grx249/src/bgi/getdefpa.lo b/thirdparty/grx249/src/bgi/getdefpa.lo deleted file mode 100644 index 5fc317c937beeab76d811cca80da339e08f990b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1344 zcma)5U279T6up~GYpu1_q99Z>phBf~NF<2$DQQXKLolEXC_XHkbell)v211`m7=~V zh2p>PhY0-({sbTTsQ9Q5&)MBEODO1tv-e}}y)$#??7K?6YFU;TvBZ|CCvujFSBjBZ zmlau#*5{LgpDVY1o&BCnCUdMhdC&0aN%rok)OL2B>>#d`BxtfK{MZ7G{Q#&%Z_yBV#BTu(G(`NU@Z zd6K?gR(?#y#BG2)GOu5PZ8!)s;wJSPKn9cm zN**)10nJ`y8hf$-J%IhlcSf4_#a8;CIfUwQloqVsVR2>Ye~2h*>PIBoOKyn_7z zFv2y0^`?evANWa$S@RGhqmymr7`FLGnQqQ-1e-M`?=$QYV8rB&5lGMPDGJDW&W{{q u9_Nwn1y{ZS-vLlmE&TBcAIWeZ7$2^1X3v~ z2x1Aoia*33Amq>Z;Dh3$h4_8Dd*~7hI`HjW&dltbnK^IQ%0PnoNKV!(Mcg> zGcqCB@O(55_&ss^&-b&zU@*d{&E7lOdpifc^}XKH>C9>7bSJ&r@1>{vQd(VooSWI+ z?=*EM_ed2~er~=KYV&U%=2gC+=I=*#q(}qfzz9%!wk;`L3UW-xxo%AP3opY zkFSE-|~l{Z$F%g#ozxVg6FY%Q;p*PJN6>PM07Xig~% zjJFuODsmlsHY;I`DYWhh^c07w+Q$v;?t|+f;)g~Gyt>j}SBpAuwJU1B-ImaxF0M>f zT8)O+gnzT8J%u%yYiqZ16zjESNBKd^_X2$^ipjl0ry95oPgE^vb$nFw-}C{Vyptim z2TqhbN^qx$I{^2{On(V7=VgdXFct)B9 z=>IRjJbc3X_!AKGCEtU|SB9N3{YkHY2cZ;wct&i;JhF;>HbTrzJ`XxKI{vMEfo$F? zT}=%qkQrnAzCvCH3>m*J49WiOA%MMQ|G0yuf5}`h%Ng(!z>3NhfPRc)F4H@R@&kdp V6k;;>;0`4HeEj#5aRN7fe*wWihN=Jn diff --git a/thirdparty/grx249/src/bgi/getfills.c b/thirdparty/grx249/src/bgi/getfills.c deleted file mode 100644 index 0df276b..0000000 --- a/thirdparty/grx249/src/bgi/getfills.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* ----------------------------------------------------------------- */ -void __gr_getfillsettings(struct fillsettingstype *fillinfo) { - getfillsettings(fillinfo); -} diff --git a/thirdparty/grx249/src/bgi/getfills.lo b/thirdparty/grx249/src/bgi/getfills.lo deleted file mode 100644 index c84c2dcd83faa1e1876499f24665d6be333285b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1360 zcma)5U279j5S`7&8f)Fw(uYEWMyOEHUJ@yOJtb|E_z+vMEeJj=N!%u-%?FzsNTn!J z5J7wp{2~4XA^sR2e5m*$D8zGi_u3^CbYOPo&YXMhy)(0~ij|UOSz^QzTTWLZKNDeQ zB``}eEl!Z1h&KF~zVd79>+jKM^m<6>@wd5=UQ7p(<1h2ihVRmgLn*JVJ;*HW)cS4R z&)iolD!ZKP2dmu6+gX)eQMnsooU}>k6!aXlys;zT{mhsRor6-W7f-}GN?8k2$>dvH zID=T43CJ~micab{vEiiGoyXo=vn6$!glEfzvGwHG`uy113hKfj-#Cl=1aFN{vxy108~HSR@8z+zG(5e#cW}^C zb#dK>@0zuz^z_&ZvQy7uup03vSqjjU*S6#o;^?ZFOisW9?-Sw+2PgKM2^t-stf6E&n<2B@e zz%KH=RL&9gDwMNhI-Z9g?+trFS%9+Zc_<~18nI^N;&hRV{MVu6XlAA+Eds+_R9KUjF(k^BKTt6y1sk_L#_=^nIzM=GAB-Z_q9Pas z|BmnvXwf2YQS1JSw$ZX+`o4SL#m6Ajf%EP;-~G;c=bn4+>*d0V=Xv796JO3fk%Dh` zX3a7sBQk9E`;&lQBNM-W{ONYPeT?dy5blh<`>uyOZ;UNx$NH|ESnsQV+5N=NSton@ zOjehc<|e1Mw&S{vC!eTUm7ku8jW=`jFt75nYUZBBkt_=xg7!gI*S91i@`V^nybh&! z2b!Q(@Y7-LjZ3 z1LvEte7W4?5BB(%dVJ6HfgsN`hI%GajIm6=*!!{|&-*mBPrumXzv%I$66#7+sx?$u zf}j!w)^Ap8jhzrk`|%?MC}@@gU5)Fzs??TXwXm_cPzW|wR-P{xgW|$sVL7nTYwK%8 zYdy2^$haA{;ysQ3@;)=TSe|wc@O5b6r1PaL~ypLoJr~}DCf{k&pd25!!XTka~+3rg65%= zx9HInR_5ZQG8gmTfihq6q~!p1THMU%0FwVNULG7%AAbU2zVv%?`3k^klTSH;_1${J#elb^eZ6GRjFM;h+d{Kx?*L9IBeg|+w2Fwe%SBw;*t+<_OUjFz zs~^z>W6wPWJUH)=oodG5#+GNbS15+P((?NJN%W5V`5pQr#=3yZN$7|njGCNk&WLeF z)MQkfDPZ(cXK}%Mx_m|F@r^BaS@*h&+teR9JCkUk) z(-bx?m(PjEBjxkf9zDA&hvo9B{xDqQp4}@1dA-~BX@9$q;mMe>8@!tk>h6A`v1w?m zkk$*07vv7Pt+l|>IX_znuq6Q(dY(o7Y{U$VAv~DUr&fNnm)i-YZHolIm2I1}NL8p1kyq)+ zA@XWfV*BedeIisJ4WcE&9S&UMz}81=dFhL$Ga;e+)?q$(n~?W)u4B+#foZ=!2Y%Xt zhaGs_f%6W$02S z7c?D0xj|L$&ZKp9jsSWQYLi)iW)5K>H#w{3`qIe^f}UJ_M(r=mM6`HX&D#!+1}Cqo z=;+R=ab4v+J0xFqHmjS9&So{!cuvXUR+LOKNrC*6x*v1l+ypLelgDf$ha}3=N=#Am zdOR_$BvR8#GCrv(S|$)SIwQk?^H7bcpPyvI+Lg+EbcVvlK>x+zYgFl z!gt}_B#ng=+ zkj8a>KPH9*^sBkjL_Q;12orhb|{F zGc#&h2RWV5RT-bYR$e3vPoxWSHkZk&Iei{v3a+My~t& zMK1(> zw1V!Z diff --git a/thirdparty/grx249/src/bgi/getmaxmo.c b/thirdparty/grx249/src/bgi/getmaxmo.c deleted file mode 100644 index 1568698..0000000 --- a/thirdparty/grx249/src/bgi/getmaxmo.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -int __gr_getmaxmode(void) { - return getmaxmode(); -} diff --git a/thirdparty/grx249/src/bgi/getmaxmo.lo b/thirdparty/grx249/src/bgi/getmaxmo.lo deleted file mode 100644 index f440715295f52a0a3163142195c2fe3e2fae359e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1408 zcma)5L2DCH5T4D(8f#5z@nnnUpipW1NJ|kF4@pZ}4{0m5z35@tq-!E|ld#!^REi=2 zDHM-Fe~3Roh(E@I7xAbNzwhlnx`u)d%+AdBzBfB>-n@6!+J7U zW?l-C*Xt9>hM$F7zjnX<9*suthZ$gl?>QZv4oEna!Pnf2;pyC+p=_?NKPt}e*Q0hA z6(6cqRa#n(bhP|-rKC!$YWZG_b7vMh1-%5_+};=D{z8o9+<;Q7H_ya6&RMfl+3X35 zo&!du+~ud5&kZu$`RS+mTxFQgP6K*O9Ku`|N&4(r`7ug!Y*vvHdn}8st34;!V!9M# zw&czi;n{L!ES?;TFOS8R?g>GjZwB?4^AelMOvnnIM0nmOCV*x9d@Pox7y54B@2G}2 zPBU;!eBdGOKe(>|INgR5wxaf-s`tg&tnI8-YR=Ba#%^`b*{iJ8s!qJO2Wr%H{LX>b zi;*q2zlBJ2Co;HD-s$AE_ztsqk(-DY3L-_=4BA_!<)y3MksrEs*f5A~%XoqJT7_Oe z6m{T+uBdviCmK)}SF9Qx-}lzPyFiuOo&}|$hakCw%ZqVs^L3kvJ$-S2IGH`uQ zR5R#AT~zbm@&U~2DK_5?Z=L6+a_*?Np`0}{A!Yb_W??D3E6OaCQ&NUfTIf*`mbu{S zT+GkC%$Gb@LCgOVu2B}C4VTx^H8Budr75=N+0@RT9C8_+de65H|d&6%?F!ZNTnze z5GD8zd=-4~M+hnSSA6hAd{l_%+}%r;P|$(dJ9FmTxwCWUzAly5Ez1%kme_LUi7eSs zWKl1(l9Q~CkHi~(<)(k{eE%~T4Bqrpz`8#&y@xXs-*i~xy)Nxu9`LpI`R-}vNxwHW z)0d64wFiaSy-L^!!oq#EsEYFoq4pMD-7c!)qFT5a;oP5wjzKR#H@5Z!XMH8c@+P1Z z>*ZsyPBPZySUUXd6Mi!T7C|a9Gg`n z#2(6G>uS#kwwSI(m@S#JAS_!h4f&%({>35R(mf%_{~Jd=(+S3SYDA)Yi$MPGqePtk z(;;7KUQloPZbMbYacaJ!{R0n3%>&Z8cUJ*&T2&`F3>!zP(h+B)yuG?ocDC2ocS^g? z?#gPp4IrE+$$~B z;eAmip`4UuDCGn_Dqv+Um^v5p-+(e-{DdWhofO6>b5QdC#VdlN>*FC1=1aaCldlY% zHu;oe=q+tUAI7MA@fx8bpNtW&CLf1|lOG=|pJAJKO{%Hk1UB~=-YIO>V#M$|0FwRt zhz;y5`^OhY9{Z8Z1y}L}pcqxT3?+~In9KAIrsR?DIgMDjjlvm7^1gugK}VvG;r#{k C`jiy_ diff --git a/thirdparty/grx249/src/bgi/getpixel.c b/thirdparty/grx249/src/bgi/getpixel.c deleted file mode 100644 index 3fd1655..0000000 --- a/thirdparty/grx249/src/bgi/getpixel.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -unsigned getpixel(int x, int y) { - _DO_INIT_CHECK_RV(0); - return GrPixel(x+VL,y+VT+PY); -} diff --git a/thirdparty/grx249/src/bgi/getpixel.lo b/thirdparty/grx249/src/bgi/getpixel.lo deleted file mode 100644 index a07cea7f6b3bf2eb83106086e93b57138250ea43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1624 zcma)6L2DCH5S~q9jcMJ+s-QGzgbJ0~C6OZ9Q_`5mU}$SiP^q|0(rv13l6A8yX(@^Z zMF>54^%r>X=(&)B|3Ul#9=wPbK_Sk!yRTUmK?ml|d^7WAXD0LVJX@HTB#8t`6r=%S zYsm4;*kY1KNw)n%?u8$t=YHM!`n%unzvuqaImRVBZ|5M&H&=Sy*hG(Vnapf_vQ)7erWL=g%qWTJq-CSz zvnvTDF{30eId;yD(npw&Fy|IZ#P#jN7Gyrf43c)1N!krd<0GNa8*UtZ#%vGKW5}!= z?gSR(=t@KmXL@odH=LKxl;l`Wj^C7{89AJ0BT{-ExzQ?$p)1HX2zz|J&F#1jV@GT#{ z>%*%){KSWMe3)vQsXuCKTT1m%B~@)-yQ;89)vKzxVKp|DN}JSNVR0^9P#5Rt?_`T= zF+EqvsvKK0)ciue=xEDY%i1y>{i*IM_f@@I)70krdP{h=C}%9;yIc>Z9N;Cw9z~9m zJ(DS!=mO)ZQKDH$9!4JW1kr8CF`|boLnn#iECc-0-h;#v4a(n}R;tZB0T zWr`(o;Uyp!@?T^|KD=4bdq*6e@PV+Ki2qkyf@AFZ@DV2D^S)P+ufTTbhzEUOzHDpG z0Ux;JO2t(mO8TB@~yC2ZSB)#_0_9Y>#t@xIenleft = VL; - viewport->right = VR; - viewport->top = VT; - viewport->bottom = VB; - viewport->clip = __gr_clip; -} - diff --git a/thirdparty/grx249/src/bgi/getviewp.lo b/thirdparty/grx249/src/bgi/getviewp.lo deleted file mode 100644 index c57be9bfed174a3e15428d9de92917e8bdf25041..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1616 zcma)6Ur!T35TEN61Vlje4WoU)1VuK5RHHl<2t`N(21{b_;nJ3~CG^kbZm$+Ylm|7C z%E$1*Z(+iN@dKFn5qvfJV4_K#-`*{~Tu5}1>HL1Pv$MN%Gkvw3&l!e6S`0F&$B2HJ z!AeG%DH^2_wca0Y_%V9@_qRXYZnqD+I)%w(=Lk!k!8f1fyvD~vXJ~Dp2X*XWu%koA zYs1HjW2YxA>L}kQ;>_LCPIB^;R+g6LQ&U?dzajn91CbHwnOR@4*_U%^kaYa{!^> zy$>~E3%(iSPh)&1#_KWOit)o3r;06GyY_QOlr{8hDR&zck1VTw|DNCg%PCv3>Noa8 zu}#)Weq(VVZ*AmqkCzKpVPP@9Y;kPGwN}?x3ju05H4R)1qz0t`lxw?AfHrNd>X2SEfgZQp~4EiEhJkQSQQCCd$H&6Xjs95N*S9gQeIe_|s!<5@lg090$SVzBIBwIi zUAa#J$?dB3%q`Y!5*4@UJA9k}mbVn2OWvof?_71H&`(Tx_h&X^$amoeFQtf ziVn`QLdJL?(Qn9wNkJ~;zsZVx;olFvXB-u*L8e&||F5_-$Ef?^5EkUaSz2_yJUf69 z5Bb1)N1@;cYtXIG2412s8iZEoLk%#I;j#3UadiIl9S+!!Jv#0u<1DKd9oJ?@w0=+c z;oOd@e&|_Uzi2Mx$gtxPE4MUV4CAm5xpeIq(rdoJJAhD-2ZA1m##Nb|sFmPH$NdG$ Cz^=^z diff --git a/thirdparty/grx249/src/bgi/getx.c b/thirdparty/grx249/src/bgi/getx.c deleted file mode 100644 index a2419d9..0000000 --- a/thirdparty/grx249/src/bgi/getx.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -int __gr_getx(void) { - return getx(); -} diff --git a/thirdparty/grx249/src/bgi/getx.lo b/thirdparty/grx249/src/bgi/getx.lo deleted file mode 100644 index 976671340c2bd156d37f2104832b7d0f85c74d0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1324 zcma)5U279T6up~GYpu1_ASkqG9uy+ALn1-c2T5C#yaWr{qTs`_iE9EiA8ckJm7+dr zA^0!+AwvH`e}WG_Dn2U2b9Q%{Ar$n&-TN`;-nlb#_IALa{t&8VlN`~y{1#f?%FN2Pan zi>g>wrQ1nfB#XKw=p3~EWKXc|SLR&k6)44d`&6961!r|Bn?1sImylbFS46I+mbqf; zv;Hix&zF^-6C2}lXG`38vT4GNC$wX86G_gMh3O(ZSI*DGi!<@Lnby4eQ&4#yAt39jkdb^uj zjjESay_r1O>l4l;*L{4M~Qp1C;_M5OeOl-$^Vem%jV5CL8^0hCj zIUGuyP-oAiTK#S}=mFpB>p+1D8$<24_S3lCi_{?O4}wr1h+^}g%u83`8@|Dfc}Tko6`!KCHy;3BV42IrPky>87H--Ux1kG zO}CXJ_~w5k)XZ=QpEU;e1%3r;#Nb9q*!NdP0r}1QBL|7&eb~Ja$~Wi_C@3lypv19` cz0BRgl@k7-)LK@Qls$JqC?0l^yFU&IG>UH||9 diff --git a/thirdparty/grx249/src/bgi/gety.c b/thirdparty/grx249/src/bgi/gety.c deleted file mode 100644 index 8396a45..0000000 --- a/thirdparty/grx249/src/bgi/gety.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* ----------------------------------------------------------------- */ -int __gr_gety(void) { - return gety(); -} diff --git a/thirdparty/grx249/src/bgi/gety.lo b/thirdparty/grx249/src/bgi/gety.lo deleted file mode 100644 index de7a0a6afb57b3627b8bae9116af1a04f6f33ab4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1324 zcma)5U279T6up~GKdiOYASkqG9uy+ALn1-c2T5C#yaWr{AmYQaiE9FFHes_1sTB1| z3&DTk4-xto`V)NcQSnhBp0m5t456SG?%t0%_s*S}v+t{onq^s{#S&Ylk;rK#St-Y+ zAgi(xug|9izgBPj{{Ck&nar_j{DJAQoQ$)#PNcrG^C(|vwjw`_@()#66*o&!9F^YP zE2?5ymF^^Yku2(#p>xps)23kCuguxdt5Ayd_L*2mi`Lq5HhYZiE+e-duZUbrEpx@x zXZ?9%o-ZpuCnm<`&W70WWYdHlPiV&aCX$>ji_=ATwp^HrmuBLHnbv=x#en0dSsIWN<-S&POcl<~Vg8sk@a4N;-Ue|dOxIIr)C+J55 zO!MFJ5y&eBn&;u`k%v_Bhk6rA&ghq}z}I|(8}pEM4a(Q9Kq>3EqwBEjMOLvF``?DL zAGu9=k(jfu=H~`7#QzINzQ^-%6A1g6+}HgY$kW&V$1C`Ep<1{`ZKhV|KWQhmx}S%b z>`k|oWBB@iBvj9E1fMk;_XU0hszu{QNSOCmMgjTF`y&U5<9(RD5Xv{`4=5-q7oo(l dj=l8V!Ie`KR_Uao&p{5DxF^{6vj)Lx++WSObzuMi diff --git a/thirdparty/grx249/src/bgi/gmaxcol.c b/thirdparty/grx249/src/bgi/gmaxcol.c deleted file mode 100644 index c83605d..0000000 --- a/thirdparty/grx249/src/bgi/gmaxcol.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -int getmaxcolor(void) { - _DO_INIT_CHECK_RV(0); - return GrNumColors()-1; -} diff --git a/thirdparty/grx249/src/bgi/gmaxcol.lo b/thirdparty/grx249/src/bgi/gmaxcol.lo deleted file mode 100644 index 368d1167b1f33c0a7a9661c5563ac7a8ca93008b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1444 zcma)5&r4KM6h3d>RA#0oMhmT6R2b%E6p0D~b1bI-l++!qVQMaOZ(iX*O^cp^nN zUYRjwTn41yte;I1ehyswb^N>2>Fj^afNH-a-*w8&O?HWB1jJ%1us1#+!ORom06PHFZ1YnVE(5LC-)7%j<$o56Q93 zVJO9Ux+>0Ik2BJj&A!872EmP*6_JODC6`Mu^G}oXJ!IuaCmrK*=ajgnvlGHK9j1MI zV=?DS&&eW?E9blX-Y)-Km+#1hgyETn(9e}r#8Bp}Os0IEH{azy>hhm-`BJHsTIHas z%2M%ljDt`-uXXRP0^>Exp5Bh?J8H8fUZJ=$KUeft78f5cta)p5^Th=Zv6awUT3%X{ zLYNP#LAX@k3SxHEZ$?$kE%`4q_^CWk??sVIuoL|vS7`@CrfG42G1v^QowJx>l4|bO zbZG-thq2wZDDWm z0_F6~LMg9tN8_-p#VKVi*1rj5z2r&DGvKt?d7l8u_Uv^hR^+1viDeAMhw?Qf+sY?k`@RAH_OJ)c92@r?cou5K_SyoGzP}Gh z7zD@r<14iHm#zg``aldqF|uZM8OJ=l6&zn1rYx7+QZ7L zZZ$mFQbXyZ0KFKt=$>&$>mpD1=O2RaZO=pX(3Cw2ipu?%I`Ak6@=H0kAcQ?9YC$;C zfxA2K;SQ{bIgyci?!$V{_#*lOU2xflso$F&_*Mrlc3|$u)NY|%*6Vq*#PXnN1xqU! zylk!+j?uKxSRWr_Xw|BDjTi082Fuk!o6RgtO=h%(bb2|J)v}XQnUv-vn46!=9!RC# zFS@yxjGA5I=&W%)zoF%e8``>lx1^QKyj}t^%>XV6?MnAC5WNqp0M`+RdI0XB9LA=f zxbij1z;S>mN$e#{l0FfuZI-#7L&+^i7NuqxCB}_92ezhj9ayeb17To)Zu?CsIHArY6rW@tHR>aAF z2!+ZTwos=tGA@ST4q{0%u8s!({EFB(&6egzH(Aclp9{_K6b(^iTw%c9l8B>oluOPI aRd|O5G)ZxZ@(|Gu_~YsbwuQ%e$hbeC*4UE( diff --git a/thirdparty/grx249/src/bgi/gmmaxx.c b/thirdparty/grx249/src/bgi/gmmaxx.c deleted file mode 100644 index d1cb74b..0000000 --- a/thirdparty/grx249/src/bgi/gmmaxx.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -int __gr_getmodemaxx(int mode) { - int w, h; - long c; - _DO_INIT_CHECK_RV(-1); - if (!__gr_getmode_whc(mode, &w, &h, &c)) { - ERR = grInvalidMode; - return -1; - } - return (int)(w-1); -} diff --git a/thirdparty/grx249/src/bgi/gmmaxx.lo b/thirdparty/grx249/src/bgi/gmmaxx.lo deleted file mode 100644 index a1f85b9756f4241c51fed7d5c11bb2a89f1f0e70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1628 zcma)6O=}Zj5S~q9jWup-Q7E)%geaA!FNuay1+iagEQGeU=|zz>Nw%dLVtna!5>i2iwIs6;ymx}HrpWR!0gO3Gw(M1;n|Rf)onE`>xWBElC^5juZ8B*phX|8m)yo;?Vr*d%NR7J(zNb+_G{fMh6{oll`Sko145H zCu?px)`fe!@X;=;kR5@Z2e_UgN5p`uhr$kweq&wuW*1I%;er#R-Aq28tkp!CG%Zus zGP;p3uIVtbp*Art*rJuvnvty*Hbjc8vH0TjR9st}n_Gz{w8YeOJgS+8=NIM^htg;d zvR2+@y;98??5r5c^oEwsZfNVtdpRvvOeb?F36pg3l3-7IPY|7BIjRy}XX)u9x)00^ zKegm*madaTen{>k0g2BeDw}yDnPO>_O_{Z|vYr!$UNcCnC5Y zy}qM-|3-7#6dg)@b!D3yyPy=-ifKyp2+t(TK|okXTwtd_W%|EA|0$?Y6agf(mv z<^je&gU>Q!hwaUqWL@45mLTi|2z!I=n`8zB`La#0L@s=GNV_gC~5T zQD(&dD=x$_vOc_o3Hh9N(aslVJ9NZ@zAy)+WaIfS{Y~m zKM-oyu*Evg*l_^{cNyDc$JN;2oZlKZj@e>k}>$OFO-IO7ZkP3bWocHAFxLDek) diff --git a/thirdparty/grx249/src/bgi/gmmaxy.c b/thirdparty/grx249/src/bgi/gmmaxy.c deleted file mode 100644 index d63c13e..0000000 --- a/thirdparty/grx249/src/bgi/gmmaxy.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -int __gr_getmodemaxy(int mode) { - int w, h; - long c; - _DO_INIT_CHECK_RV(-1); - if (!__gr_getmode_whc(mode, &w, &h, &c)) { - ERR = grInvalidMode; - return -1; - } - return (int)(h-1); -} diff --git a/thirdparty/grx249/src/bgi/gmmaxy.lo b/thirdparty/grx249/src/bgi/gmmaxy.lo deleted file mode 100644 index 805121101fbd6fb4221866eeaca302e6281c76da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1628 zcma)6O=}Zj5S~q9jWup-Q7E)%gjFg{UlNU_3SvL$Fhi#2-!}{A(th|gVfyi#Nfw(4Z?;6*4 zVv2vM^Jp7N$U4~A8)WxnGp6_&`%*Kl1oX?Nk;1&v*c)DL?HCv6m7VA#@r&B;@%Z}b zkp1U@{ezXXIjXcMIX8DLIJS~8ONJS|DxxAh5iu} z{WC4umpD!|$YD#)8E3Q(>WD-0r|<2K2lZge9r9Y0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?$6cKR(w)&4U-gB~GlNGy(a7sBhx_`v9K`Gg zZ0P>@*2!Kyl%<7*d*c(ETTxv{<9Ag-<)@}2<4r%A$*X)pP2Y%l=E*{H&_3wW%BEyQ zK9XaZ=b;qm(V94W1I}13n|+0{M!;P(D;a?mte_eaOnsZaT*0ms8@J%8m%v zRG9W{$70TvfultrS5Ei%gFXJK9^Wy2Ajvb0qMl2sh|x^H+)DX8?{bg7-s4Lp^qbW% zXsNPzUM0jY_M;sQqJ8JKss!3=mOWjK>f6e1i?>u-ou4attHt8_;)b^|H(y%x;?2t| z%NsFT3tG%zI+DTV@nnN%<9nGLitlD}SY!q~?Ko@(?d8m6c+sl0Thsm)tPW#awI~dB zln&Zj)B|7pqPAKsF@!q4U{!9^YC#?G^@a`RnMx9#p-D zpzrRI=Z<;>%2~4$G7D_y6wu5s?HH6(G7F{bphpw1 z%*APBF6O@mWxnL;%46WP*twnr$@u@p@tv6Z_z?*6rQeLrR{~FL-_>*An@}rUqi!bF z^6xB2EMq7ElvAI4R^9{KcMSNihCN{Jv2mY)XQ5VXt!)tL{=LD55pe7uXVUgBoeQ+& nNI)^Nat6vc?qe?7J3z@HpGS}gw^29)>A1Iu+czumpN;zq|F(}c diff --git a/thirdparty/grx249/src/bgi/imagesze.c b/thirdparty/grx249/src/bgi/imagesze.c deleted file mode 100644 index 63e816a..0000000 --- a/thirdparty/grx249/src/bgi/imagesze.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* ----------------------------------------------------------------- */ -unsigned imagesize(int left, int top, int right, int bottom) -{ - unsigned result; - int w, h; - - _DO_INIT_CHECK_RV(0); - w = __ABS(right-left)+1; - h = __ABS(bottom-top)+1; - result = GrContextSize( w, h); - if (result == 0) - return 0; - return result + IMAGE_CONTEXT_SIZE; -} - diff --git a/thirdparty/grx249/src/bgi/imagesze.lo b/thirdparty/grx249/src/bgi/imagesze.lo deleted file mode 100644 index d5f869f1fc59e9cecb55186d83519f0ccfa5e2b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1624 zcma)6&1(};5T8wAjcwh;8l}*nIYh0reI!z(da?O#YiMhmf>L2k;x-9wKHO|1EyW_C zB7}f=^6nqt)nhOP!LtYN9u(S(c<`VQXWs6!%OdEI*?GU2+24CJJ1={QbW)Ne5F&vS zjuCoYMr4|saqxi5;{)ak-#r(8u73U1@Asef9O!Eux!Wy@wPC-jKWb-!qZ65+x3eHM z;|Tl+e4VJ&ywW;yEgPA4+R(4*oTGK%?JQ^ZyPm|m)`5GyxACGK5Bh(6nurH|t*&(V zf$%8taG#g6%}GeO{pRpvN52dP<$J&b^^qdnUGKI1!5*Yyv73SMwOpg3Hv%`k$zyJNV(R4?jXdI!a9w*f3q>o;-1 zx4tEW=c3LZi_^y9XblQt{?^^1gRAHnmS=g4@BI0j(S zf~nr94X17Ro(*r=FqF#Kf?D5ES>9Zhc2rQ5=FD|gP<5r2SM*||vdMByP*UloXe6yH zC6lX(jFO2&(+LH03z{;&IG=%(7S~FTRc*eqQALo{vSl?^t>|h~Uo}`Ub49H;wsfG* zIj~s#!Qg3tb7&`IfLmle01IecSl~;-X8;0d9r$_flcj-T_3g5r&7svb!xqI#Q@0px z3hZH4&jQQU>%blC?{%?!wOm#!m|v;tD#KBos_WVOrilxc2CHe+nyTsBz=&KeDjQTB zu!2@?)bKR_Ezd9$%lRYpe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*kv&{DPcGopj+l{vEs*SGLZBP|hPl4)LvU9zzXg4L0=AzZ@H3T|5|E4FG zrIcqL!H;ng_d0$rz{4nK898Ycam@FM^}5q=clcampt2H;)OW&je1BQyv|(qQ1--KHp4Pzu|Xbzifs z1{cS*A?aJRS(x%J>Id~9m^KGz$v*^ zH@EF_(*jXm z2q49Z52%11MlXq7;Kd^n3XivO>;G{(sKys7A&UuqAjKofLqvBV821UjH#o2S GxW54d7&Ax! diff --git a/thirdparty/grx249/src/bgi/linerel.c b/thirdparty/grx249/src/bgi/linerel.c deleted file mode 100644 index 56e3b16..0000000 --- a/thirdparty/grx249/src/bgi/linerel.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* ----------------------------------------------------------------- */ -void __gr_linerel(int dx, int dy) { - linerel( dx, dy); -} diff --git a/thirdparty/grx249/src/bgi/linerel.lo b/thirdparty/grx249/src/bgi/linerel.lo deleted file mode 100644 index 9065427f70e1316d313f696c730a019897514949..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1456 zcma)5&ubGw6n>kHHP*U~C5K3ZMu-rp9a0IRg3z?4DHvLtwir=ZlDH<)W)n6WNTn(z zAVLuQM+A=^m3Z*r#s9*C7xAbN-#5EsmQc_S-o796&D%F`-n_^c*ECHd1&wqXdqid3 zTggh5rdcxN`jo%n=j{1k+uweVMx&!)h-3ZlkwGyP8}zY0h%0SP3x8s=lC(zHm_omRKa)%-VJGV^SJjq_mwaDE785ORS9bEl?d znQb}CtO493FwcUCS!My=aE~zm$c4#7F66(&f_(n-re|yifi+-(1^j>UGR%?n;U^5_ z!@m?%KHL{<@PQ+iE7I~lScB~P+KUpsRfey@0W2200ROl2j&1eU+5B6>A=}uacwg8q zvnZ%qdmIS%?>%ooZ_z)zJk`HoE)G+Q15p+pS^56J!#?Cvy27-lDP$g&jlz}a(|Z@xKu=FEpuwQLv$X)(y8aYVFZ1}n?T zEKr&(wLTGU_?5o%d-wYv-}gU`5}X_UNcnPp26{FG#xH2AP{WJaSEIA+{D?N!*PrGV z_Um3pdbuZJSrnFvo{Ea^9~4AkSrqRFdC(+Tr&zDBZf@-ppLLEL%9~+@81J5wags9T zrjp51{)q+7Wz`DNL)em)8YZ@^%!W0yVa-;oY{kk|tkmkrN@jSu5@Nx7nMC`Nq@R8i zW1^ynn5yD&!c>(G8-9clL(wrqKwLs1`)y;I ztCs9w-;2N;j9K^`bR)qRj60sZL3Eq#qD6EMHchH_TvCqX1h={hi(wG`5T*-AIC zE$z9^k&w2cH*T%%kZ8JHugBH=w|rvc%?KLr3lo60?`(R{cs_`pMsS@X&Z zK3Ie9hc?I(ebG*6HJ`&VUO;#(ePv(2bwG6uC+uU7#$B*~z^X;#2AqiY?;CGGZ_z)z xE8x(NC>Mv6linestyle = __gr_lstyle; - lineinfo->upattern = usr_pat; - lineinfo->thickness = LNE.lno_width; -} - -/* ----------------------------------------------------------------- */ -void setlinestyle(int linestyle, unsigned upattern, int thickness) -{ - int i, j; - - _DO_INIT_CHECK; - switch (linestyle) { - case SOLID_LINE : LNE.lno_pattlen = 0; - LNE.lno_dashpat = NULL; - break; - case DOTTED_LINE : LNE.lno_pattlen = 4; - LNE.lno_dashpat = "\0\2\2\0"; - break; - case CENTER_LINE : LNE.lno_pattlen = 6; - LNE.lno_dashpat = "\0\3\4\3\6\0"; - break; - case DASHED_LINE : LNE.lno_pattlen = 6; - LNE.lno_dashpat = "\0\3\5\3\5\0"; - break; - case USERBIT_LINE: usr_pat = upattern; - if (upattern == 0xFFFF) { - LNE.lno_pattlen = 0; - LNE.lno_dashpat = NULL; - break; - } - j = 0; - user[0] = 0; - for (i=0; i < 16; ++i) { - if ( (upattern & 1) == 0) { - if ( (j&1) == 0) { - ++j; - user[j] = 0; - } - ++user[j]; - } else { - if ( (j&1) != 0) { - ++j; - user[j] = 0; - } - ++user[j]; - } - upattern >>= 1; - } -#ifdef GRX_VERSION - if (j==1 && user[0]==0) - j = 0; - else -#endif - if ( (j&1) == 0) - user[++j] = 0; - LNE.lno_pattlen = j+1; - LNE.lno_dashpat = user; - break; - default : ERR = grError; - return; - } - __gr_lstyle = linestyle; - LNE.lno_width = thickness; -} diff --git a/thirdparty/grx249/src/bgi/lnestyle.lo b/thirdparty/grx249/src/bgi/lnestyle.lo deleted file mode 100644 index c8edadb6b7b895d79a12cb0fdfe22e932c91c580..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2572 zcma)8U1(cn7=BOAX_vGy>FTr{D_fn}sB}BDwWyOJO}4hI)J?Wlhkr5aPJdXM*5pLn zAzI1m5<+B%7n_Lal{X^07;|1I+G^`=#0^A5P#B2L>STx$oEV?y{4{5w7ryYF_wRY% z?|a|xCwZxNuuoAGaY+$XDw@dAb+)J5Vr{Zs8Z5ux3HT$t`R336l*{EBMiqx5S}{*o zF))A8-0I4Oy6^}2tu)WkIa(OdialB(=3lf8%YqE$#nN+fYrf&f9zB%%RV$uiRMCvI z6rYSV7aI%Rk@?GJOYWu?KDi$A7GFQT0RUy;q4Jf|x$PEsj$b=(?lbL)r{hm8+G&T-+OJEyT22p(U#n1ZaR327)V>>=dPZ4U@O_p+yw)dmtLa=Yvh938io~A8cCrj)92zh&#Z*m7mQw^_PFkWv7YQk2z~`%EpViPkk%jFhdpjd@!h*%2uc~ zDjTyF6}8Bs^zYg8U~Aj(k!;G$w(ioq^^TpLSxf7Dv8zMx=+-;$vF*Z+vzg4-zkgUT z%O|v{7~E@;a{QnuFZh*BK~2k}c(${}@`ya_@Nw`Cj7KouVuKEZ{PVtOD0othh8kYc zqM;4BnmwUrU#u>)A-Wi9h%SYK(dCdo`gur;){m}f^?kX9xxb$CzllNOTGt{j!6i+u z<49CUWtARMtFox*279sJZ;P0(ktJf2h z&G1!@fluy+{<{a?26^3Tkv`c8eTzq5g+fpz;8m@cr^~T${~A$c%!6q3`Q@-jXTMWb z`b?F6qDp_YN`C{odp0_;3-pgLQYVJ1XBlF5ipV|vOq(5bJzZ~Dm8paESMUvTDh2i8wSJqwvu!@J>;h5nIhiB z^#I3xajDf2xNgR{X^3lcd}OSH)Pdn$UmgV!$Mvx`;yB-K4CbqK5{`qrIbgPY$U|m~i#rFQ@`hG$CxG$R zdlp6Vyt7`u>u$Z?TrkTsX!uzeaSh~l2gf~TE_W{=N(1)yT?!7lb?{7iabIBGGcE|+ G#r+3)glj?o diff --git a/thirdparty/grx249/src/bgi/modename.c b/thirdparty/grx249/src/bgi/modename.c deleted file mode 100644 index 0a831a2..0000000 --- a/thirdparty/grx249/src/bgi/modename.c +++ /dev/null @@ -1,59 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" -#include - -char *getmodename(int mode_number) -{ - static char result[50]; - char cols[20]; - int xw, yw; - long nc; - -/* _DO_INIT_CHECK_RV(NULL); */ - __gr_set_up_modes(); - if (mode_number < 0 || mode_number > MM) { - ERR = grInvalidMode; - return NULL; - } - switch (mode_number) { - case GRX_DEFAULT_GRAPHICS : return "default graphics mode"; - case GRX_BIGGEST_NONINTERLACED_GRAPHICS : return "biggest non interlaced graphics mode"; - case GRX_BIGGEST_GRAPHICS : return "biggest graphics mode"; - case GRX_BGI_EMULATION : return "BGI emulation mode"; - } - if (!__gr_getmode_whc(mode_number, &xw, &yw, &nc)) - return NULL; - switch (nc) { - case 1L<<15 : strcpy(cols,"32K"); break; - case 1L<<16 : strcpy(cols,"64K"); break; - case 1L<<24 : strcpy(cols,"16M"); break; - default : sprintf(cols, "%ld", nc); - break; - } - sprintf(result, "%d x %d x %s", xw, yw, cols); - return result; -} - diff --git a/thirdparty/grx249/src/bgi/modename.lo b/thirdparty/grx249/src/bgi/modename.lo deleted file mode 100644 index b600da82eb56f2377ccab6eaea118baa2fe850c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2496 zcma)7O>7%Q6n<-){F-%Ir4VQUt8)6IrYk!!QCoqCoj3{9Nv$@CidwNa&c;sS*p|J9 z6c7zKL8(%so~jBVB&6Qp1_zFjQc-SjK%9Dj0}>IDXoVCZfnvTlyAy9s4?Jn+z3;tm z-plQWSDi9T9akTamC($LRodh!|!>?vByy+^xng*LZ)Ibt5An^vOjZi(*=2f7Br=LjF{`u$dYeeCb= zv;5od*7LGIG%zms+o`%A-}r8?RugOIInEk$$#T~8r;Eu#WXh?L`{sT zg9TxXs*_RmQdGSXQ{RMhNF5$k$6iz8!)hWTLlF_`K>Bt2TRgAF2~Rk&^AJ@*K1rX#>l z?faVO80=RZxEJ=21BYOraNvCthMQWQ5LlrB+rzaxi2aE=7zbS~bjg8v|8os^r2$tP z@MjJ9%Le?76LWd^Zsd|nhL)nDQNp#+!l%P8k`^Bda@WUQh`TU%BG6B1!<6Gl*OyNZ zXz=KTlx}9qxkYVene@^4`Di4rpC1{y7@O25Bhh$F2RB{ROQ4nuI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b=X0NaobEL^x3jF4MMZ!+>D)?u@`1+ zOALblw2FQ%#}KQDdD)2B{NK`y{cy&XPVbecd#WLh)AXItfRd|^c#+D4ZCgS zj>IWf_DkCpXMb<+>2B4jZkH;%PMG&B6wiYRByd^mGj$=npWL#@71+77NCq;2F>;3z zyiheb>}aqdX?}5A+L-T)lyWCSU_ltZT%$+iuP=s#w z5o)lflxtvaLlI1RfEi^VSqo}Vi}i1SSuc8u(u5u-#z;9Z@&Cf{Jp}#n5D@Fd--fAI zfuFj0KW*q6U_*?NYmqem&qj%)spr9707u8l7wG1_5^8!lg3cU+`wG1XHe_%kIO6j= zKmzxl^W!cO$9cqS!IV>e;KZuRc`$LzV=Xf~sB#L-V=57`4v9Mu$7!7VF^Gg8gZl#_ C4Sk~k diff --git a/thirdparty/grx249/src/bgi/page1.c b/thirdparty/grx249/src/bgi/page1.c deleted file mode 100644 index d60bf68..0000000 --- a/thirdparty/grx249/src/bgi/page1.c +++ /dev/null @@ -1,34 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -int __gr_get_BGI_mode_pages(void) { -#ifdef GRX_VERSION - return __gr_BGI_p; -#else - return 1; -#endif -} - diff --git a/thirdparty/grx249/src/bgi/page1.lo b/thirdparty/grx249/src/bgi/page1.lo deleted file mode 100644 index d63e61de567aa4e7b7ae78c01d62a7458828487c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1340 zcma)5-D(q25T4DZwbt5d5fmyKL7~$2kVx?FDoss-5G`nmf)|HPx+YMQESp_OrKne0 z2)>06BJ>q}gkE^5c&QM-Z+B0#gn|xyJO6X$%$a>(saGw_5<`~QGSNhiGqI-_u~k`; z#mGOKB>Y;s_WS#v@pwGLtkDOWM{+dE-aL}p*4D$^>P|E41!3-iDysZOA&j)byE}Q6 zFRH@r*e;Sq-U2WK)Sm7Lj{QoT4O{|9*4t-d9n4uP3)$=;j=KQc)yN}qIpMVB6Pfv^ zQTl#a`8iI<*gQE!cGTI#U`HLMbu)?BX3N~f3CWhTQ~Larer8IyPBM6>W%P3+6|tO| zm3t|j_kA*@i|4f6f@+D@ZC|(DK$mNeb+^CkYI+8+5AWYqba*Wtbi&@Aa)zR7_3iRz zU2j*b&npex*eus8IaKkHj0ypO5FiwkVQ=p266-BN;xR8tiuirwJbTG4B}3 zci*VM9R{Lyoxl;*91J8fsMDKLt$w%b_7LCe2d=_uYzzXYwU_AaUZ_03@40@kFN($8 zj(+VsT~}1w?}r|``EUA&$cw3H-iNQry(G9##C3o>WL~}m+3X+0XfMfE0KR?+AgyCY zSHM||TgF1) ? 2 : 1; -#endif -} - diff --git a/thirdparty/grx249/src/bgi/page2.lo b/thirdparty/grx249/src/bgi/page2.lo deleted file mode 100644 index fd626e7bb5f4983a005585bbc51bf81c8b4c7f07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1356 zcma)5OKTHh6upy)wbt5b=|ZT~2o)-AKavuB;UY~*f)Fie0`7)9#zbl!%mY#hiWEdC zZUn)df5IOS>|b%=Qn5RQc+O*L9t@4c4^8B2vW>ra#DdE@eP6y=y)IU;7Tvq``Vb{O^b&5UEF%ubT9OgT5@&rSJf zr+nk2f@fO9ey&9ri?JEG74doA2UEWEs!e-K)y1-!j^)~(l`G!2+TDh2G2a4cc?Yx}`10ey%*b?}=(uy{f31>q-z%r*BHtyY05!0l(ArY=zO- zbiHbQFZ7!oU-g`B&vv|hQEYCvtfx-3ZHsC;UB8Fj{I|RT^HPM(^YAq}mjvgDxC(HF z^vh>q>-mEj%q8_Qz}L?LlzX_N%h2q_DPu48XD$12)+zQ_oqU<2tOMl#i^us7_Qypa z>=*qPbiWefwDte;4E6?~g*l=UY90TmjZo`;T!+&fE-Rm4>;IEfy@vs8)@a@r*jYe} z=JgSX-d`C7oOj+I{~~>V(OwA4G4KPxhz7Gt9_!dk-yKZ(hQcQ_Leb~o3`BVitovS* Hpf&F=59foZ diff --git a/thirdparty/grx249/src/bgi/page3.c b/thirdparty/grx249/src/bgi/page3.c deleted file mode 100644 index 72ff599..0000000 --- a/thirdparty/grx249/src/bgi/page3.c +++ /dev/null @@ -1,37 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void __gr_setvisualpage(int p) { -#ifdef GRX_VERSION - _DO_INIT_CHECK; - if (p < 0 || p >= __gr_BGI_p) { - ERR = grError; - return; - } - if (p!=0) GrSetViewport(0, GrScreenY()); - else GrSetViewport(0, 0); -#endif -} diff --git a/thirdparty/grx249/src/bgi/page3.lo b/thirdparty/grx249/src/bgi/page3.lo deleted file mode 100644 index b6977a9920f3bcd5e2c42575debe3c554dcb388c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1704 zcma)6OHUI~6h3{36>wS`7Z`}LKm$Rp1&NBQQXU0t!0>QG%%rVD%d2gsw^#_ln2IrJ zNKD-L1N;Fl*h>P5dw&B97H*7jr3s#IW^Ox9O!OpY&i&5$?z#8ed+xlLNKN{DK2qYN z05uWOpvIHex0A6zdZJ{ul6-mAMc6O-yvR)?thU>`$yFg z8;|(+?(84Q<$4WKP^lgdhCjuFkJrdbQag#%PD0Da2Zy&nS$S(yKhqCh!5vY4cK_k$ zq-*3!R`2RLrsUYz!|vXtOr;Yei7c@KW-!D}8|^DW)4PGJ207r>-9Q)q!ceC~Lm7+#Ju1=JbEQ8J4q!<5@3kle`YD`tAr zAdxeRl@jmfzvVSExy**(|AJ1#`9RU@&>O7iZ`GA?9;1(xpkE-Jtmw=*D0->3wRLqUTvUYfJ4#dE(awTE5iV2wd~w0DEHPqFa7E-%Y>DM!pY>-+@*dLivy;rRxpPA7aI#at4kt{; z=Efq-mfq7vc(z>Xiu=0ai(RqxuYzY9#60GVOdL%0$W)?&=Y7%@uXM#uS1fh6?B!KS z9H;C%Wl!&IHv)H;D4^#3dkUCSFFATEsP3qZrZ|P-^6X5}SzcIpHoxku&de6)ov3_q zX>nBw{$qc8&+`|no3#jD@fyLdj{au~KlUF2r&py~rQ%hQU#)3RfnF00?Ur`p zxLgfX-LKU>U+;@zb8pMp^xcXls_fT-I;Qz=d527%(Fo5&Mv&W7a*}!zN*)^aOv5)E zh8uF5b{I+qO+zV1xT7&x_99c+i~Vmy*)M+9@&bNR4CluIGXK0hzM*hFZUSMy= __gr_BGI_p) { - ERR = grError; - return; - } - if (p!=0) PY = GrScreenY(); - else PY = 0; - __gr_Reset_ClipBox(); -#endif -} - diff --git a/thirdparty/grx249/src/bgi/page5.lo b/thirdparty/grx249/src/bgi/page5.lo deleted file mode 100644 index 75b50b33de46ca3d519bffe89db957467875bb6d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1976 zcma)6&2JM|5T9MU)EK&UQ@$!9$N?&zgKXoxfte=|johFNpWz z-Cq+wUuUno-gXps%)EA{yDk&Gj+a5biD=@vyUFB|Z(DoB*% z5>>w*_I{fL?=wn&_k%eRoH`&8@2$3oi1&6utZ!a%5sGaE*^AKj5RQlNhaqgdS%H2G z@OgB9kT_s&qp`pWyl*yy7ee^^5I!HmS3BvG!o?COkGS&X-OHpy8-6+{|rB%Biifytp`T6u@-kzVGU7T66mnPHs8CxyS z&E=Mqm(Jwu24&o7my5Z%TDh+H?`%}I>*aD&5vA(6hVs@LMeVrSk=m(ptwl#padx`S zXTV_>oMx*kIl#_Vh~E!ig~`K!d5C{R^eNk6i)aKkL39F^FYgrW$3(cZ;Q^u_U_T)$ z!}8EvgxyVa8Fmj5ejd@iM0bJr5k2(n26*0Nh^@(=a03>DD4Lg6WueGcy2`F-&vmLo zI&DefY(W-C6q`-*2=Vr=i&A}c)v0lQtu7tGBR` zi&~g?)I$Bktf+^779(R51X){9`@3r>*bk%k9>&5;0xt?PsE_h zzV%3c90wT?4ISq2XYseClN<>CNAwx4at_w$yl)wR)1vdxt6=}uIe^}xe{ojip&!9o s4CzlM?z8d;&<uGA6951J diff --git a/thirdparty/grx249/src/bgi/page6.c b/thirdparty/grx249/src/bgi/page6.c deleted file mode 100644 index 6e4b417..0000000 --- a/thirdparty/grx249/src/bgi/page6.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -int __gr_getactivepage(void) { -#ifdef GRX_VERSION - _DO_INIT_CHECK_RV(0); - return PY ? 1 : 0; -#else - return 0; -#endif -} - diff --git a/thirdparty/grx249/src/bgi/page6.lo b/thirdparty/grx249/src/bgi/page6.lo deleted file mode 100644 index 56cbf317b324bd27a37286a667b594cc4e2ac228..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1452 zcma)5-%C_c5T3htGc$8d>`5yhDh%_mibw^4KTs1E1zR6_x~%JU4c#ByJvY{{!k`E? zUxNOOpoi#r$)K11kY1z5g6;dxy{Ek_LJiEFneWWZnVCE1`BHA#aU8Mah$|gSB=1Hi zGe(R{Mh47zPaN5O9$jaj4-Ldh_t+1lQu{&x;WhbXXV@*Aq&Z_K;nz|X`j7)?3!DqlLYny^gTf|uA zFqq^#*%0Tj*BR+gr(dI)L13fiMC4v9iDhG*@uyL84r%$(PWrgKIYF+etOK~F!lZ2{ z7GbXRb`GJra<0qn>$1;w+0Nex_B4cgY>#vtO7+NeB7*(i@3J?#>|&QKwL;0CRYmc< zQs9+*T`1~DkA0$m8nkue9ILqP7dVAZn{#7Xzr%J5a@Hx$IZqU#V(eVZ|ov=zA}=OO;U7 zf@;kV^noZQ_jkRWpiuTjm4a$mLpA?Rui(iZEwLYN1^1iGy(C`+a~JIf%|W+&4Aty6 zFN8DssvL7xL#vVIK!$@zUm zz#uTrkFU|rFPRIl^aB_KV`a_m(vNY>WoHLfMv<>dB_`$}aR-uqU*LCaPNI+X`vZVI BmvR6A diff --git a/thirdparty/grx249/src/bgi/palette.c b/thirdparty/grx249/src/bgi/palette.c deleted file mode 100644 index d608a85..0000000 --- a/thirdparty/grx249/src/bgi/palette.c +++ /dev/null @@ -1,86 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -#define DEFAULT_PALETTE \ - { /*size:*/16, \ - /*colors:*/ {EGA_BLACK, EGA_BLUE, EGA_GREEN, EGA_CYAN, EGA_RED, \ - EGA_MAGENTA, EGA_BROWN, EGA_LIGHTGRAY, EGA_DARKGRAY, \ - EGA_LIGHTBLUE, EGA_LIGHTGREEN, EGA_LIGHTCYAN, \ - EGA_LIGHTRED, EGA_LIGHTMAGENTA, EGA_YELLOW, EGA_WHITE} } - -struct palettetype __gr_EGAdef = DEFAULT_PALETTE; -static struct palettetype UsrPal = DEFAULT_PALETTE; - -/* ----------------------------------------------------------------- */ - -void __gr_setpalette(int colornum, int color) -{ -#ifdef __DJGPP__ -# include -//# include - _go32_dpmi_registers regs; - - _DO_INIT_CHECK; - colornum &= 0x0f; - color &= 0x3f; - UsrPal.colors[colornum] = color; - - memset(®s, 0, sizeof(regs)); - regs.x.ax = 0x1000; - regs.x.bx = colornum | (color << 8); - /* real mode interruts may be called by - _go32_dpmi_simulate_int() (v1 & v2) - and - __dpmi_simulate_real_mode_interrupt() (v2 only) - - Under v2 the _go32_dpmi_simulate_int is actually a macro - referencing __dpmi_simulate_real_mode_interrupt(). Undefining - this macro makes the library linkable under both DJGPP v1 and - v2 since there _is_ a compatible _go32_dpmi_simulate_int() in - the v2 library! Don't worry about the compiler warning here ! */ - #undef _go32_dpmi_simulate_int - _go32_dpmi_simulate_int(0x10,®s); -#endif -} -/* ----------------------------------------------------------------- */ -void getpalette(struct palettetype *palette) -{ - _DO_INIT_CHECK; - *palette = UsrPal; -} - -/* ----------------------------------------------------------------- */ -void setallpalette(const struct palettetype *palette) -{ - int i, col; - - _DO_INIT_CHECK; - if (palette == NULL) - return; - for (i=0; i < palette->size; ++i) - if ( (col = palette->colors[i]) >= 0) - __gr_setpalette( i, col); -} diff --git a/thirdparty/grx249/src/bgi/palette.lo b/thirdparty/grx249/src/bgi/palette.lo deleted file mode 100644 index 1dd71a2130071bf9bf5e840131c27bc2da41fabd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2188 zcma)7O>7%g5T5lqiIcjv6AD5!f(W@)AY|oKQAtXmIH{91P203}iV%X8?QRpPj&0d% zl%POULcq}y35hEbIdI|vNT{a@MKWpyCypF@bnM#4h4{CB zTdh_X*-kbYb{dR1z1u(8Cp>$n&uN6=+nGm@iFf8BP9q8vo zbOw`6nVXq8H8i}Gub1rl(4;YLq(;Z;E*ksbM9N5w8)Gkce$JC?=W1E%xrn!Xo{r0>VVnL`%>$j$vJ`$IT43dh@{0Z~2=wZFl$6qY|* z?FiS$6}ClpD-gupa>$4M(3Fd@FktZ?F5GMN!bRUYB zgdTaqJGZ^vA``&WX1EbA_8eUM|&*O0`_Es`fg@!UU`p^F}qdYKgI2E!TM@ z{a{sa+0v&!O=qV4GZ7#P?UZwc48zC$;LArI>l@4kD2qtE316XDI3}g}axw#{1VsWO zh(AK`hZN$Eap6L7sSwYZ%riqM=!G-) z5-V6=2siv(y7}wy>+i{A@^&0UZ1inq;;m)p5imwyGEc`JQfp(`+uePb&K%YJj_0Qz zs7;mI$oqkpe|kdw1rX*&IuuQo$=P%Cr7w3E<=n;cF?=tGS5n(LH79!Z*c#fYB-+VtJ_}F@0_UGK-QxHsPk)4 z^=`ZEbinU)Jx5_oHu_$*eiHhPj<0%dx97OtsVF9Qn)VB~+IB=W+^*k4HUBN|z>M~e zZ-ckT^AemN;ugS}(Ko#XJD5di3h#ij3h=hK07?Ztx(>};oGRvG{@Vcag-=pm!j6ib z&vgXJ{}(R@PEa3z0%5-B?CX4G#A%aH@quh$O+Q>CjzT?+ihR;WsL7!?0H-(nt$c>9 z-zv<%H4I^MkLI1heg@EApSEKtE&4sX}5cm#_5tYjTdECcbx_2-o XiF_p*q3CmP2BN$ncpo(hTJ!z@R-cR| diff --git a/thirdparty/grx249/src/bgi/polygonb.c b/thirdparty/grx249/src/bgi/polygonb.c deleted file mode 100644 index 0ccf8fc..0000000 --- a/thirdparty/grx249/src/bgi/polygonb.c +++ /dev/null @@ -1,67 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* - - Take care : Borland C defines polypoints as int * but - - assumes struct pointtype * . - - GRX requires int points[][2] ! - - The good news are : Both definitions are compatible ! -*/ - -void __gr_drawpol(int numpoints, void *polypoints, int close) -{ - int *pp, x, y, sx, sy, nx, ny, fast; - - _DO_INIT_CHECK; - LNE.lno_color = COL|WR; - fast = (__gr_lstyle == SOLID_LINE) && (LNE.lno_width == 1); - pp = (int *)polypoints; - while (numpoints > 0) { - x = sx = *(pp++)+VL; - y = sy = *(pp++)+VT+PY; - --numpoints; - while (numpoints > 0) { - nx = *(pp++) + VL; - ny = *(pp++) + VT + PY; - if (fast) GrLine( x, y, nx, ny, LNE.lno_color); - else GrCustomLine( x, y, nx, ny, &LNE); - x = nx; y = ny; - --numpoints; - if ( x==sx && y==sy) - break; - } - if ( close && (x != sx || y != sy)) - { - if (fast) GrLine( x, y, sx, sy, LNE.lno_color); - else GrCustomLine( x, y, sx, sy, &LNE); - } - } -} - -void __gr_drawpoly(int numpoints, void *polypoints) { - drawpoly(numpoints, polypoints); -} - diff --git a/thirdparty/grx249/src/bgi/polygonb.lo b/thirdparty/grx249/src/bgi/polygonb.lo deleted file mode 100644 index 309023ce2b8825888d4a357783f4c291563a3dba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2488 zcma)7Piz!r6o0!j;6m4LOI@Xgsy&QYZ5dnA5bLSaZd*tuEtD-)0jJxtU6k$aW_K1^ z(@1bxV4YNZ@aDxBIT{l+#zYR7qD^mNqFy{`;sFAQ5)-14xc=TZGwm{g$V=Y5zu)hB z-~0Z|=^=AC6bg|~AyR0=BAR;0jr2;h0Lsi-7g)&)B<~(Bd-smHcjL61A8cuPth=&X($0?5u?`)yuJW zenpBS^J-TSjd=Q^7G2kxm%flVh*qwJobAfCrG-fC$68WTQAxDct2r&o0o5_JW@Q_^ zZMCa6cF!(XZbnh8R_{JEaiDH%ZE_v(OjWM51E(*mspZXm2-tJAF0FQ}df7G|8xzH#y>?8~1#UesF3acAJuF@y z7jgfLp0&zpH57aA>zb*>ufO|mz3x=Fv{k~?_3Iffz%5qR!TWvpW=CHqptmu5v$q~z zaoV&M8W|jXvAttrx}3Ai?R|Q$-o2}*EUlh5cX#XEy?W2HuAfN7lu_^|@W|){;UHaR zp8}T01Tyr-IE5A?p&e0Gy?~Q(3BEQk({He8NJOe(LqyLjhG;&g8X{iVG%EVT9}9C> z>^DTx5HA_xNJ31R@D2zwakqD`=s&tu#ElivYc?n5&;!fOPveJ}FD zGNjV2dSi~l9c>^bfTGCGZzL$>-*DHbP-G(rO`$CTduzb<9uCjTuL|!k6Yo_E>UrEX z<+mlgnVxU3dA&mcdn{nT60oNOb~a$o2kbKe`|W`Je!%`PV1E*@`GNBHlGjIte0Cv| z&rRzyWLcS_b*z{=1s{z07xw6xv~3k;Ec{aDIQkv?52k#y+y-Vl8zKR1`oAwQS5 z(>k7|T_rm;bHcMTxw2j;<_qbfy+AsHr;l5+#nfDy^h_~dE})tRrgO+d+t!Kyw|wKU zbjf_@nV$k1GbV*KLx;R{gw ze*=&8YgmNNxPIP8P+HmHk)OxswXuI+qJKD!vVZ*2`Tc9eVu(v<&?8CGZ(&%=-@WF8N82e%^o6Hn#u( diff --git a/thirdparty/grx249/src/bgi/putimage.c b/thirdparty/grx249/src/bgi/putimage.c deleted file mode 100644 index 4b33912..0000000 --- a/thirdparty/grx249/src/bgi/putimage.c +++ /dev/null @@ -1,62 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* ----------------------------------------------------------------- */ -static void invert_image (GrContext *gc) -{ - int i, j, psize = GrPlaneSize(gc->gc_xmax + 1,gc->gc_ymax + 1); - for (i = 0; i < 4; ++i) - { - char *p = gc->gc_baseaddr[i]; - if (p) - for (j = 0; j < psize; ++j) - p[j] ^= 0xff; - } -} - -void putimage(int left, int top, void *bitmap, int op) -{ - GrContext *gc; - GrColor gr_op; - - _DO_INIT_CHECK; - GrSetContext(NULL); - GrResetClipBox(); - gc = bitmap; - switch (op) { - case XOR_PUT : gr_op = GrXorModeColor(0); break; - case OR_PUT : gr_op = GrOrModeColor(0); break; - case AND_PUT : gr_op = GrAndModeColor(0); break; - default : gr_op = GrWriteModeColor(0); break; - } - if (op == NOT_PUT) - invert_image (gc); - GrBitBlt( NULL, left+VL, top+VT+PY, gc, 0, 0, gc->gc_xmax, gc->gc_ymax, gr_op); - if (op == NOT_PUT) - invert_image (gc); - __gr_Reset_ClipBox(); -} - diff --git a/thirdparty/grx249/src/bgi/putimage.lo b/thirdparty/grx249/src/bgi/putimage.lo deleted file mode 100644 index b8141b961b35ebb0cc5c410447658d4eb1cdecd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2576 zcmb7FOKcle6uo0l+mM(SHv~xAsI|aUL3IZQMOBKrh#fn2TQ@cN5meEUlaBLqY~zeW zQbny`l(f|-A&ah2cPv9ABAHIlI6JMDs@E4TVL|EyFhZ?1dbGJdKvyMo4= zls0<;mNGceq)Jh@(u@s%`zKe{&E}QG&&o~44axXjF5fdYR~brwH3_gC%Pgq|wKhVRT-^|f`I zZh00B`X^zQ1bw5KaaoV9T^ zoLw~*f+1Po)4q0h3g44mwG-{nn&ocWHsAOQpZajWlN|Zq4WnilO>Z6q;oS%(G+Tq~ zl<4k$DbO}JQqJq;z)__`2_J4RTd4iQi(w_)p|n3=^%KeXLLbHsj70As;ZUrx&x_HF z!6KdSBWa;d+UJwy%Q$R&wpy(S(G=^5s9W-M3!mZb70n6Jk`S#YMIb5sL-oQJSr>JY zTSAUEtRZy(qli)9LmL-$i=K$^UGheRe@TvrW@AUM2%M=G&8YID$``qf>W_tdvY}gq zq9XjV2n>nPDG@#;IufEYDvm`(S4_lCh-5;fq9UCXfe{gminfTA57@m8-HC?bZM?CD zlnC`cnmZ)|eze_UUpQW;?WFcT%5<+%o8#pbt`V=b0}mWt>;&%z3$Lx`ANkHrwoM`|KK5eF)(~;k=>D`6AuFWxk7ce(bj218*SIidms`08?M5AgUo1JkYIaEX^ z^eA|&+))%du@T28*>l*W*8TV3;5A?^>K`Y12Kta73PH<_MDx%bzi7uVb9^_^Rn|>J zA41Dd5b+Z%Hxqr${wImPWBnA-&#a#&+Jnm>w}2n|5DuQgdN0vY*87N(9LMAGI&1K( zupc~ES%c>qYw+CRICui!_25bk+qxBg9AOa8%unl?5oovi$}tqlM{dEw7W3FX)A6_#!7`U zUyc7POUT5sZb=6$zTsGUYw(-H;{XOem7Le03-&kcu!Zj}3zpP+5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*y@=Rc zi|mzd%Qz}>T0OO=*X3N*H#;6J2j#G*{Pv>H>tcm9uNSry^I%wTk{Nyw6KuyGAbO1L zNkLSAW%3zVK9G6X2Zh-|>|v`B|Upse0pb zjGLWMb_2ib1!|8Zl6yPuc2IA7B%6UBc6m4dTW)Y9m*F2lZ^i3CPl4inLZ4v8n=~(J zfqmS4Be>&`}XxrB%=&k$9*lA*4bnJro2Fg>(}qG1Me7JCURmy?XTE zAK;(SW1xRgDTP80>3fqMv&}^xy#0Q?*>C2XxvIT?8w7!P1QN04)aYEQjq_0WnsiES*ZktCv;{cczHkn8oWRv6<>V&mqQG;a3>>fH3twXq{nMxQBt zT5p-StI_7MSci}^^(Q}opPfDLgxCP7uRBKmDR=-9e4jiQbL>MM n${4%@IYVlx;|%HhnZT9LSon%g3jT*!0kgUr6k4t_{dnC!w69h( diff --git a/thirdparty/grx249/src/bgi/rgbpal_g.c b/thirdparty/grx249/src/bgi/rgbpal_g.c deleted file mode 100644 index e505c96..0000000 --- a/thirdparty/grx249/src/bgi/rgbpal_g.c +++ /dev/null @@ -1,84 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -#if 0 -/* The following io routines were taken from Csaba Biegl's - GRX v2.0 source. Many thanks Csaba ! */ -#define __INLINE_LOW_PORT_TEST__(P) ( \ - (__builtin_constant_p((P))) && \ - ((unsigned)(P) < 0x100U) \ -) -#define inportb(P) ({ \ - register unsigned char _value; \ - if(__INLINE_LOW_PORT_TEST__(P)) __asm__ volatile( \ - "inb %1,%0" \ - : "=a" (_value) \ - : "n" ((unsigned short)(P)) \ - ); \ - else __asm__ volatile( \ - "inb %1,%0" \ - : "=a" (_value) \ - : "d" ((unsigned short)(P)) \ - ); \ - _value; \ -}) - -#define outportb(p,v) ({ \ - __asm__ volatile( \ - "outb %0,%1" \ - : /* no outputs */ \ - : "a" ((unsigned char)(v)), \ - "d" ((unsigned short)(p)) \ - ); \ -}) - -static volatile int dummy; - -#define WAIT() do { \ - dummy += inportb(0x80); \ -} while(0) - -void __getrgbpalette(int color, int *red, int *green, int *blue) { -#ifdef GO32 - _DO_INIT_CHECK; - WAIT(); - outportb(0x3c8, color&0xff); - WAIT(); - *red = inportb(0x3c9)<<2; - WAIT(); - *green = inportb(0x3c9)<<2; - WAIT(); - *blue = inportb(0x3c9)<<2; -#else - *red = *green = *blue = 0; -#endif -} - -#else -void __getrgbpalette(int color, int *red, int *green, int *blue) { - GrQueryColor(color,red,green,blue); -} -#endif diff --git a/thirdparty/grx249/src/bgi/rgbpal_g.lo b/thirdparty/grx249/src/bgi/rgbpal_g.lo deleted file mode 100644 index da17036b32d5007e217a10db159e46a65ffd650f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1388 zcma)5U279j5S`7gHP*VVB@cxL%|nHX_L7t$>Qg_GrVpV-+k&95Bymll`Eqj?QYng5 zL=b<1;1BUZh(E>$9~2)I;yJr}=~4Kcajn*fU4Zo(Z{oeidXFMLi9%X=?e9w;cLO!k0>dDu+$D{Z8g^^S@HtrV|_ZwkX zhlP7;MHQDyVHA~KE*DjCMU`&GIFE3kQ_u_0>h`|ij4#AkRt`$BUOW`*IBU&MInFy2 zzX&WJt%xkqR^04KX4{=9yScJES9bGdx3J}A*G8^0gXOJ+%e?1Fx*v}G9H%)pD@utS zReTEAQRV5_bS}nh$(}C4v*ps6c=Akq@l0$*{UOM^&Y~W3cVe@d30bC-Ncz5n7)#J< z^y_V}rJCY-Enmm6ueFbOc=wJ1=JlJNJ_x&qsxcI=TH9G)t9d({o4b`gZ*OhAR`H}7 zJP7^ZXrtHe1x(AEX7G4?zsV~i3$TtWQXr1D)oA&!YH-xi^#-gCVtZh`z;7$<54EVL zbzK+L7z`u=)cKXEX0OxnyWn?w+E*BvrGc(D50kjn4OKtr_5DB}iDGj9zmJ+=I>^zjOzY3*1L67EOnTu1# zT+Dw1%6!SMDING}G4py0Ao>5|6~T$>;~@~{<5@;bKE4-y@+r@uw<9n9aE-d3*ccW0 zXq?2Fd_H1Mb8@VFf}fsUQ^PTE?lHX2@E<{q7~T*-x_=rQ*jx6Gf05~5Iu~Hc0r&xn j5tYkO^0<$=Oz+@|gM7T35pxgDK$`akybp#1Yj}SFAPJ8M diff --git a/thirdparty/grx249/src/bgi/rgbpal_s.c b/thirdparty/grx249/src/bgi/rgbpal_s.c deleted file mode 100644 index 59f80db..0000000 --- a/thirdparty/grx249/src/bgi/rgbpal_s.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -#define SIX(a) ((a)&63) - -void setrgbpalette(int color, int red, int green, int blue) -{ - _DO_INIT_CHECK; - GrSetColor( color, SIX(red)<<2, SIX(green)<<2, SIX(blue)<<2); -#if defined(__WIN32__) && !defined(__SDL__) - GrSleep(5); /* yields for win32 driver which redraws whole screen */ -#endif -} diff --git a/thirdparty/grx249/src/bgi/rgbpal_s.lo b/thirdparty/grx249/src/bgi/rgbpal_s.lo deleted file mode 100644 index 2aea46c6306da763b2049ce9dc6d07896a33f1a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1520 zcma)6OKTHR6h4!Qb!_V-EfvHDjZmRddr758b=5RYVrghgA5u^lk~k*NyqLKIsT4(m zA{6(oUHB7RS5j~*;tz1?!iC~SP>A1|2OWlj9{A?GzI*20Gw06Je5s%)3I(E&N+%xC zYt_rlyK0&eq`Ubcf5Feh<=HrKk8_9g{Ky&e><@(epm(g@?;kEt zrQUyuCEguvoNf-}RLZT_J5G8lQd4~@=5lw^(>oQXC7twbF)uQ+bB^oHJ-L|?nRzjH z-HYSZabOfU0~FVG2>UwX7$0Qke#HxOARZlJJ>AQL|=fy!y0=v8h!tXgv!aa@Ck3pED@(x3yMyjapNlpkV z1>N^zDrqN4SSp>1_`?zZY{XaGesPe`K92od3NglGLzD^meBMID--!4RB0gEQN~hc~ zY*8iKl%8iwX_8@d7jB7~DUD9mkaefECn{Ysilz0XY{^(J6t?o)#&&k8lsCYwS;orR z%C={1nzqxBRJ68CnQJ%N7P*~?;p6l7A3jfX0eVI!y2?61bPqa?1Eis2XglvS#)Bg4 z{iZBeprz&MdSF>*LrAkLNjxmeGKq?9lN%7H?_E^e&8FD`ztxtezzELTvRvKs{aVWr z9jo0jExAvEi<@=hkyUP*Bx+XM>0meiEib?v3$gj0@-*=I89a}SD*(@6Fgc5`-8qM5 z;cv<^3GnnR0xTcVqiJZa1=Fp?^{)Y3&;LEp8`xpt9Lo&A{D1K>;JEwamq55)_$~$Y zN{F+~e3rMs4cGD>oMY_x+KUo>3JhNd^-TDD8~oSOXV}4ifT_VA4q)?|fcG7C9S9`g zbrA^n?-v$uZ@GVb3z^6L2-kv3y9gu!j4X`+%;R-jE9f0es-s?w4PUqp3(r89r@?vU JX1qth`wJfDv916B diff --git a/thirdparty/grx249/src/bgi/rstcrtmd.c b/thirdparty/grx249/src/bgi/rstcrtmd.c deleted file mode 100644 index 1508a4c..0000000 --- a/thirdparty/grx249/src/bgi/rstcrtmd.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void __gr_restorecrtmode(void) { - GrSetMode(GR_default_text); -} - diff --git a/thirdparty/grx249/src/bgi/rstcrtmd.lo b/thirdparty/grx249/src/bgi/rstcrtmd.lo deleted file mode 100644 index 24e2a2e1311024af236934b8c481a874ac16a133..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1364 zcma)5U279T6up~`HP*VVrAVPc^Po`C4ylx)J|$_B_z+vMjV~6KBwbT%^TB2UsT4&D zB8cb@@ka>p$N10(#YYSAoZTI}gn}Npdq3vPojY^yzA08pmSu^7CAOS-BBzOPWhGFH zGA&N9J`rvBHGTc}*7wuVX!LeS>ha0kODph?zs)}%en{UON_lPVVP>&f@3(b7^FXbr z?9y^S@RncS%c|^(TD~2|MUu!d1-SqzZ&U?2zcOY+<{*Ui>Zw>qDQjUWnS768Gl-?R z0NmiG=%kJl8&105WF9%G{Lo3t48l3C0nB$E;`dI<&rzIXvyvF>u`G5_@fpDu^Fm?F zmekoIEL$#(`IBS*#WCLs-i1NlaTfJt=tP)JOvtKnpn2cQm@j@$H+%EYI@r3He9{eZ||%6K-_X=vyiX2o2AlLaogR_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zy>+Hxz7T zr#ie`z2@M0v#YetR@*T73MiD^Sk!A~dC35!ZnnB@+|B=%Tgb%n?Fjw9(QBtZN`v|h zji+(or|)!zG}>0bL`{N6VF{MZI=i$D;WpOhF4~lfx)9}}{Ks)nKI+XR9};khfG5#M z{Qu%5kYnx7X?2v3))FG}Y3LxE_#}4_OxULNOEDVMUq}ntbOUq>XrN8q&RG_SC;m@p zuGqsW+B8S-zD2N21V;pq?k(N@wBt`;E2i2~{iuhE`nhuv^)pPojZS1czv{Bf_LR;O3=qU3xo01n+ONGiX!* diff --git a/thirdparty/grx249/src/bgi/setbgiwh.c b/thirdparty/grx249/src/bgi/setbgiwh.c deleted file mode 100644 index 0244d26..0000000 --- a/thirdparty/grx249/src/bgi/setbgiwh.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -void __gr_set_BGI_mode_whc(int *gd, int *gm, - int width, int height, int colors) { - set_BGI_mode_whc( gd, gm, width, height, colors); -} diff --git a/thirdparty/grx249/src/bgi/setbgiwh.lo b/thirdparty/grx249/src/bgi/setbgiwh.lo deleted file mode 100644 index 4e3f55a8cc765451dad714433a4d640d0eebbb6e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1540 zcma)6&ubG=5T4COjkTt=6cHLUNQ6q-M=C+8r!;LEgwTpj@!(-e(ruzOKTI|>m7++& z9~93X{1^Nqgb4MI@aVyV7xAbPzi&6MS(bth%+7q@n>TOXWL}=<3af@;h!#Uk86lAm zrni!I&8$pF)LlP4-0*Ya@~@3=zXyZCi+%{)!T0G$hKmmm7;;!l%)XgC_UC+l3jRtW zek6ae8(!iFXCuR>OAq>ou|!|;%geXpvzz5^!|BFvskBPXFLYhB@a#rPrP6BQy2p!z zv2z@H3YuTr6x8yO95YTsDaO-#V(dqZnelM=H7*$k7vlotK0mo=PN$qpfgYk^PMFAeud@7z#n6>5}%lXET&uWD8LlmS&uU%GFpUZ%Gm%O3*a*WY`A?P z$vaM=o~yoysnBUz^kLq2Er7QJ_(=fo2e5Q(r(AuwTT>OWtZLf=wzByRL)kh4z6&?;5!j>j|W?#Qi;+={rJ z3}GlZ7h~r|F2aVR-fy0q5Sax|;=-KmfI}Q4)!C~%r82D3_H0diZTqou z?4BcPtK^hKl{+1A33c+_RHa$3+YQ7wnvSh7qVpZ6RM{EgYNM-K?PkkvJA0y-+^$*M z?NZ$qRc$xBEmZU0@)D7_&av=*oFevt$~mT9fpT{B#AV>S?*NvU;(8^chci51n&8@543f z=Fobq$dPu2R_C*U`HF_e%4hice}bX92F^YA=(w-&??SccxE=_9|Hg6gNpS2RUoYd> t4}UH|NrQ+(F}iXN$~f+0F5Nr0QbYl-=nRE diff --git a/thirdparty/grx249/src/bgi/setbkcol.c b/thirdparty/grx249/src/bgi/setbkcol.c deleted file mode 100644 index 1b750a7..0000000 --- a/thirdparty/grx249/src/bgi/setbkcol.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* ----------------------------------------------------------------- */ -void __gr_setbkcolor(int color) { - setbkcolor(color); -} diff --git a/thirdparty/grx249/src/bgi/setbkcol.lo b/thirdparty/grx249/src/bgi/setbkcol.lo deleted file mode 100644 index 8dfd721b30697611aa016abef4221612632e510c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1344 zcma)5(P|S>5S`6#Ypu1d#Rs9Hd8kmSy(A@w`joaL=|ixf2?#zcNxCMGCL1<)A(f&& zi4y$}KSStG_z8Jbd{l_%?Cv#7DCofK%$z$j_s+d%-7|vF?O~tq;h!pB)eU2hJ77oAFG1O?dHQM z%D>smsa!$j@5i`^gSr*y0<`k9F4+1jF&lalO0ix)6YG4*+FWs*57=@Y*zIUVWHYhE za*5CS%OpLcBR{6;9Gg3*#Ewoj1MKL8>Db&xjM=g@TZCuJ)wy_iF1|7sThTobQe{ z9v|#i-Q#lkd8y{s_7AEhH?Bn+KWMhumT!~6BXNS|>+!qntcqlbgK; z=rd7l?seQ(L8Ir1Y6pHez-j(l-XrryDx350HOWgV`9!@7C5Oz*7vUTJ!HwS_!T9<` zC?$tGx&_N#WEp$0|2-)Ck?WL~vHANoeBA-U{D0+<|Izul355O9|AOgP1x}y&6c_p+ z^5PHIsP)9gDE@TgB-Zrv5R=Wxw(<#nn!Dx<=fGKG^1i??LXDWb5rFjl9if2y=KYa_ t=Kj*X0LujW9SVxdH7N5~$6n^{;L0}?ayBDo4ssx!_X7KVHc7B1?++Mqeb@j1 diff --git a/thirdparty/grx249/src/bgi/setbusze.c b/thirdparty/grx249/src/bgi/setbusze.c deleted file mode 100644 index 6e83b93..0000000 --- a/thirdparty/grx249/src/bgi/setbusze.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* ----------------------------------------------------------------- */ -unsigned __gr_setgraphbufsize(unsigned bufsize) { - return 4096; /* BCC default value */ -} diff --git a/thirdparty/grx249/src/bgi/setbusze.lo b/thirdparty/grx249/src/bgi/setbusze.lo deleted file mode 100644 index 6b5e0768f20f5e20bd048fe680306c3d4ba7f79c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 980 zcma)4O-ma=7=G7Xt<`{9yjdikj9`XD;-Q`dQK5(jLGU2N-8f04%?G=)MT6K&4<0=B z2lQun6#9#b-g?mIne3R=i$3t|`}NGcGwF6$U-Ja13BP=H-Y<$b&RyS4sxYyUQxeyiW?@G7p%{c7X zhG_L3EI`D0x?69;&(EFjK`epP@$HDOL-YJ)jaUXJ!MAj)&~Qx!B)A`Q4y=*unRWRe z&dIFnyN#GHdCj<8(=D@t}28E`r3_niy1nzxMX#fBK diff --git a/thirdparty/grx249/src/bgi/setcolor.c b/thirdparty/grx249/src/bgi/setcolor.c deleted file mode 100644 index bfbd3ca..0000000 --- a/thirdparty/grx249/src/bgi/setcolor.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -/* ----------------------------------------------------------------- */ -void __gr_setcolor(int color) { - setcolor(color); -} diff --git a/thirdparty/grx249/src/bgi/setcolor.lo b/thirdparty/grx249/src/bgi/setcolor.lo deleted file mode 100644 index 5bdd83f43a0f37081f6d7b3d81c44a566903b57a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1340 zcma)5L2DCH5T4C$Ypu1d#e-PU94b`WJ`xF{p3>GNmtawolZR!St_ifshRs_@rKl%S zqW{C6A@oo913dJocvOhrx4W-dLO};+XXbm~%$xV#?AuDcYFU;TvBZ{1B=S9%tdwH2 zE=#f)ug|6lzm{(QKKnBsk7t-QYOFbd%X%0E&iRoE&< zaa4SBzn}^wRlJwrA`bEvpfk|g)23kSuf%NVbtuJp{amb*Ics&naXw(nWnj1B6_M4{ z5-X%W^DmO@86EjK&T?$-oDndSO&gs1xG=sTH?Cx&^0ll;ll^2?Q6H+a&;%_9V%}qZmqtz zvt4)hs?`^jhTGWQsaM=2GcLoDe3u*^h~3X$P2OZC1k)#I4UG43|>M*e# z-WI#1=?2_i>-n7T8C-e?nSB}27N!&$D&x= z@3^l*uj`9yhe6awH~%f~!Mv7X^E`Y>&LowyM7;y${FqlS!#A@BH+~OVVtn~Bl(LCC zx&g~toG{j6{ku@sv8Ys9b@P$2`_DcL!I#A@LcVRLnUz16f`J`+hbgSi}1ZMQVIJ diff --git a/thirdparty/grx249/src/bgi/setrgbc.c b/thirdparty/grx249/src/bgi/setrgbc.c deleted file mode 100644 index 9accaab..0000000 --- a/thirdparty/grx249/src/bgi/setrgbc.c +++ /dev/null @@ -1,46 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "bccgrx00.h" - -int __gr_setrgbcolor(int r, int g, int b) { -#ifdef GRX_VERSION - COL = (int) GrBuildRGBcolorT(r,g,b); - return COL; -#else - switch (GrNumColors()) { - case 1<<15 : return COL = ((r&0xf8)<<7) - | ((g&0xf8)<<2) - | ((b&0xf8)>>3); - case 1<<16 : return COL = ((r&0xf8)<<8) - | ((g&0xfc)<<3) - | ((b&0xf8)>>3); - case 1<<24 : return COL = ((r&0xff)<<16) - | ((g&0xff)<< 8) - | ((b&0xff) ); - } - ERR = grError; - return -1; -#endif -} diff --git a/thirdparty/grx249/src/bgi/setrgbc.lo b/thirdparty/grx249/src/bgi/setrgbc.lo deleted file mode 100644 index 02232841815e1bafc456eb7c9d6b31f70f9b329e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1448 zcma)5ZA%nU6h1Sv)oR;nA{5xmf(C|q8D)v;lk2K$xa5}Fm!M&H9aqrZS!QNo4KXT^ zVhAeefAkY9qd(vu@KgBF=wrclo;!1KScH1u%z1n6nKS2}c`;X<*EEe3G&1PaBPtnT zCM(q_^-)^p&qoJ-_1*Y={HN3Dy!@(j=*e>6j|>K{kPSY{=ha|#q(4|(7|xr+UiR=P zSS%j?2o`61PMDe+_Qv6rdQJ|H-|A1F9R!0T2UN)C?`K9=E3Jm#%G?uKVNOi8q&K-c zWePJZCU1vvyduGpVmZfBc(_X3$Ub6deUJsvoPPEbFGr;%fz-dTvxDnUOxagKpbVlcX@7_#G2fZ4I?KL}3m4vY-7i;I`);T=l;zr6!nfN#iM6s{CQvn_r4ac_yuhN9)m#dqRUu(2P({-A*>u-}laeKpBcguB~M9pe5x zX2G^cucdEn$9G%xu)}ejQM@CzODqbC*XBTcexLaOW{dgZF9Q$rh}UA5OaxeXRprit fhjXZ right) SWAP(int,left,right); - if (bottom < top) SWAP(int,bottom,top); - if (left < 0) left = 0; - if (right > (mm=getmaxx())) right = mm; - if (top < 0) top = 0; - if (bottom > (mm=getmaxy())) bottom = mm; - __gr_clip = clip; - VL = left; - VR = right; - VT = top; - VB = bottom; - __gr_Reset_ClipBox(); - moveto( 0,0); -} diff --git a/thirdparty/grx249/src/bgi/setviewp.lo b/thirdparty/grx249/src/bgi/setviewp.lo deleted file mode 100644 index cbd6fc65b74c438ce7ad2afd75fc75be30670219..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2144 zcma)7O>7%g5T3QSsY%V+giwB3fe%|L5ckQcB7}R&+DY69%Rx<2ekxemX5*CF-qm_H zaZo6#EVnfaQY1KX<;W3kNR`|Wl~dtDkL6Ygs6a^V0VFf?c3-nvMS_u@XTF*5&3kY5 zz46Bj&cZch{Nd5r$8!5@PMgFSCvRrB*| z_M@a%R4-@x;T9f?izwEQspWP&)rE+_ta*E^{Wp;RoM%}lM;+_vLp z@@$snPS3a;&0IN?W4T#2^Rn*;kTFRT#}OQ*${JwdZjvvKV-g36^x=7sb`sKwq%7aS zkJ3cnNge?>N*`%KN%UiylDr<*l=L-OQzm;yDoUn4u1sn}C9Qq0B(;4dq3tPh@mNvG z7L?pMB@?@@sG2gRDOrurlL+P)IPlSazKq1bir{Y}co@MyMDULh3?0MSyku-ytp3;;p}e3Yw_)o`m8DhRI&XB`rUNB=#c+yd+cCNh zV4_yF+YR)#PpmgDS-!PtHHBddgZ6-VH?5j)yscZ+hM}A5>zyDsPA{0aDWbggi(+WVAG&&bi%UEca^iu%zJ>&_1U5Y;qK=q!+2l+MWX8^t- zeH`FB($50iCXJWsE^7ICfL{o|0Ps8M6ZnSl-pTlAGl*mO94K#$9zE-9x14GXwPX8w zLs+)aWV~wZ{i;(1R_kT)cEZejU+t~(2 z$&C$t-LAF_U=7=JE!@rjmTSnwGCdahU!YftCFXZbC%18Z?q(mSj0#2ik`2WSrA&2iTXi=1p))FG}mC->q z@kw4sKzBz7#b~SrTKKof84>{v^ih`*ow17n(bI`8_OOFC%@MpW5QKYy;B}EhcYF>9 z$p+pnsx8%zx}&IHI2XDhhl%f?6Q2Z7uO}YOqg>av#aPQF5*Y*yb{pTd=!B2+Y zc-8Wa=Qa)=ia}1};QeJ1Hsb4EV}D?zAq#VJx00hPYqgTDC2y*2KXNCl{8+rn|aCb#e)Cb0RjR7dddAuafZl^QUok+aIW&02tHY+0cBgI=2R^ z!`K#DAiOYELVb1 z?}%dZVAJ0SbHzYZAuQJ_sOG=r1(;`JY~F{j%K4;nuBaEFoFzK})4+BP0nL2U4na8u z(@@GbdNc~lT!1DQ^Iw88U-Wh54RBoS+>Rkg{=azq2c|wA0%5-RpRoC|h!fj?^A>m< zYK3dmmB`xoXA2@r4kdtcs-t7&3$XpCfPZV)1?C>h`vyD>wPI_nBM|T3Yi#I4jQ!(p vB9Hxu=YlKa2z-ad$eP(DkNcR*_6|^nk?#&cB=#PhfjI9Scn6jQYk7YFOP!BJ diff --git a/thirdparty/grx249/src/bgi/text.c b/thirdparty/grx249/src/bgi/text.c deleted file mode 100644 index bce1539..0000000 --- a/thirdparty/grx249/src/bgi/text.c +++ /dev/null @@ -1,84 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "text.h" - -CharInfo *fntptr = NULL; -char *StdFonts[BOLD_FONT+1] = { - "", "TRIP.CHR", "LITT.CHR", "SANS.CHR", "GOTH.CHR", "SCRI.CHR", - "SIMP.CHR", "TSCR.CHR", "LCOM.CHR", "EURO.CHR", "BOLD.CHR" }; - -int __gr_text_height; -int __gr_text_multx, __gr_text_divx, - __gr_text_multy, __gr_text_divy; -int __gr_text_usr_multx=1, __gr_text_usr_divx=1, - __gr_text_usr_multy=1, __gr_text_usr_divy=1; - -void *Fonts[NrFonts]; -struct textsettingstype __gr_text_setting; -GrTextOption Style; - -#ifdef GRX_VERSION -GrFont *DefaultFonts[11]; -#endif - - -void __gr_text_init(void) -{ - static int Init = FALSE; - int i; - - if (Init) return; - for (i=0; i < NrFonts; ++i) - Fonts[i] = NULL; - -#ifdef GRX_VERSION - for (i=2; i < sizeof(DefaultFonts)/sizeof(GrFont *); ++i) - DefaultFonts[i] = NULL; - Fonts[DEFAULT_FONT] = - DefaultFonts[0] = - DefaultFonts[1] = - #ifdef LOAD_8x8_FONT - Fonts[DEFAULT_FONT] = (void *) GrLoadFont("pc8x8.fnt"); - #else - &GrFont_PC8x8; - #endif -#else - Fonts[DEFAULT_FONT] = (void *) GrLoadFont("@:pc8x8.fnt"); -#endif - Style.txo_font = (GrFont *)Fonts[DEFAULT_FONT]; - Style.txo_chrtype = GR_BYTE_TEXT; - - TXT.font = DEFAULT_FONT; - TXT.direction = HORIZ_DIR; - TXT.charsize = 1; - TXT.horiz = LEFT_TEXT; - TXT.vert = TOP_TEXT; - __gr_text_usr_multx = __gr_text_usr_divx = - __gr_text_usr_multy = __gr_text_usr_divy = - __gr_text_multx = __gr_text_divx = - __gr_text_multy = __gr_text_divy = 1; - - Init = TRUE; -} diff --git a/thirdparty/grx249/src/bgi/text.h b/thirdparty/grx249/src/bgi/text.h deleted file mode 100644 index 051b5ff..0000000 --- a/thirdparty/grx249/src/bgi/text.h +++ /dev/null @@ -1,139 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __BCC2GRX_TEXT_H__ -#define __BCC2GRX_TEXT_H__ - -#include -#include -#include - -typedef unsigned char uchar; -typedef signed char schar; -typedef unsigned short _ushort; - -#if defined(__TURBOC__) || (defined(_MSC_VER) && defined(_WIN32)) -#include -#else -#include -#endif -#include "bccgrx00.h" - -#define FirstUserFont 11 -#define LastUserFont (FirstUserFont+9) -#define FirstGrxFont (LastUserFont+1) -#define LastGrxFont (FirstGrxFont+9) -#define NrFonts (LastGrxFont+1) -#define PreSkip 0x080 - -#ifdef __GNUC__ -#define ZERO2ONE(chrsze) ((chrsze) ? : 1) -#else -#define ZERO2ONE(chrsze) ((chrsze) ? (chrsze) : 1) -#endif - -#define BITMAP(f) ((f)==DEFAULT_FONT || ((f)>=FirstGrxFont && (f)<=LastGrxFont)) - -typedef struct { - uchar width; - _ushort *cmd; -} CharInfo; - -/* -------------------------------------------------------------- */ - -typedef char FontNameTyp[4]; - -#ifdef __GNUC__ -#define PACKED __attribute ((packed)) -#elif defined(_MSC_VER) -#pragma pack(push,1) -#endif - -#ifndef PACKED -#define PACKED -#endif - -typedef struct FontFileHeader { - _ushort header_size PACKED; /* Version 2.0 Header Format */ - FontNameTyp font_name PACKED; /* Font Internal Name */ - _ushort font_size PACKED; /* filesize in byte */ - uchar font_major PACKED, /* Driver Version Information */ - font_minor PACKED; - uchar min_major PACKED, /* BGI Revision Information */ - min_minor PACKED; -} FontFileHeader; - -typedef struct FontHeaderTyp { - char sig PACKED; /* SIGNATURE byte */ - _ushort nchrs PACKED; /* number of characters in file */ - char unused1 PACKED; /* Currently Undefined */ - uchar firstch PACKED; /* first character in file */ - _ushort cdefs PACKED; /* offset to char definitions */ - uchar scan_flag PACKED; /* <> 0 if set is scanable */ - uchar org_to_cap PACKED; /* Height from origin to top of capitol */ - uchar org_to_base PACKED; /* Height from origin to baseline */ - schar org_to_dec PACKED; /* Height from origin to bot of decender */ - uchar unused2[0x5] PACKED; /* Currently undefined */ -} FontHeaderTyp; - -#undef PACKED -#if defined(_MSC_VER) -#pragma pack(pop) -#endif - -extern int __gr_text_height; -extern int __gr_text_multx, __gr_text_divx, - __gr_text_multy, __gr_text_divy; -extern int __gr_text_usr_multx, __gr_text_usr_divx, - __gr_text_usr_multy, __gr_text_usr_divy; - -extern void *__gr_text_Fonts[]; -#define Fonts __gr_text_Fonts -extern CharInfo *__gr_text_fntptr; -#define fntptr __gr_text_fntptr -extern char *__gr_text_StdFonts[]; -#define StdFonts __gr_text_StdFonts - -extern GrTextOption __gr_text_style; -#define Style __gr_text_style - -extern struct textsettingstype __gr_text_setting; -#define TXT __gr_text_setting - -#ifdef GRX_VERSION -extern GrFont *__gr_text_DefaultFonts[11]; -#define DefaultFonts __gr_text_DefaultFonts -#endif - -extern void __gr_text_init(void); -extern void __gr_text_vec(int *xx, int *yy, int XX, int YY, int len, uchar *textstring); -extern void __gr_text_bit(GrFont *fnt, int *xx, int *yy, int XX, int YY, int len, uchar *txt); -extern int __gr_text_ChrFontInfo(void *Font, CharInfo *fntptr, int *height); -extern int __gr_text_registerfont( int start, int stop, void *font); -extern int __gr_text_installfont( int start, int stop, const char *name); - -extern int __gr_text_Width(int len, const char *txt); -extern int __gr_text_Height(int len, const char *txt); - -#endif diff --git a/thirdparty/grx249/src/bgi/text.lo b/thirdparty/grx249/src/bgi/text.lo deleted file mode 100644 index 30992bdc46cea79dd476ce1c14a8aceaa9852c8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2668 zcmb_eO>7%g5FUF?>XeW);hz+6rM3!6yChZArd)91#Hl5xj%=qws_4pbwoa79j_fr` zP*fC^qC}P@xPd_8zzI%(D$apO%?-f~Aue1HLOnpjjSBO9Z{JI{76%TDH2cjrGjI0& z%s%_A$#gOl3W<@BSaQTfK04+{MidN4pY*DDryg+7^TJ=hK4`UCn_q|FYHUXEytC7D z=Ky#u*Z6>W+dnjO8_ln1?(reFcOsX+s~hHch8bM9N(m?@tz8(%ADGE zcsm){?%1{(DtvFeOOM)%^X0M^k1}m9-sQ6s{=^hfbN9#X{jc`*8@o;Kth~F6*YNE@ zm3%feV<)a;C7sIWm602}np4J9CV$2EB(f>rNKO06`CKBaJn2McS{akG*^DyAGwBIs za8c@A$AOPSPeRW?ZRjOv9GZe=p^dK7yE2tXyb>FjovW9%x#d zG-40Gsu`Q}4U4mA>yKU&5nTAWEhthOo^W*kMFwW%Ssf};VJ zbQ}>_mgpweUQ0}O`wmMUZOd1kb?CF?u|u1NB|MEI;TP4XDfgrg^FMVImcDSOIxFMi z{!Bw-&<$v>?6+Rm{G8?<&&!*D`l@1;1ll6 zLVelu-BVSfGm{uy8x7>ty!B-_$X(A{ESCbF`NcQZ19SxygB)SZ>~Q)F2YJ0#b=oS> z)m}xXwU2DCw%{(77PviTw{qTm`>Jo2y;ZNOzKU>dH`-jM$CbE}_D6Nq940%lBX^jH`e;8NA1bCQ5?b`Z^SC|8ORUa3ORdttb zHka7*1+O6XT&*T{wL-$|VS5-9Im$s}xl$}FiyCA9doS9>%F2pcM#*x;b8Xz9=WAY} zxTJZhT(?)Nl~uQjW>K}>1?Oh9u;Pkcs#fZ&nDBp-Pm#v6Gcp2$%f-s(q%3BT_eDoCNX!pW_yg^?38L7VDpZvL1gAD0vW`l@aDq2BFM1dGp94 zH)8UJ;9$KAI>5Z^CP~K_PiWiJ+kun!h>@5!*uT8V)?%V){%qFx*c2` zv7^b|B0z4BV#$@jW^X}ul KpPMA0$@>TK&~o7b diff --git a/thirdparty/grx249/src/bgi/text1.c b/thirdparty/grx249/src/bgi/text1.c deleted file mode 100644 index e6d0347..0000000 --- a/thirdparty/grx249/src/bgi/text1.c +++ /dev/null @@ -1,115 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "text.h" - - -/* -------------------------------------------------------------- */ - -int __gr_text_registerfont( int start, int stop, void *font) -{ - int i; - char *Header; - char *name; - - __gr_text_init(); - Header = (char *)font + PreSkip; - if ( memcmp( font, "PK\x8\x8",4)!=0 || *Header != '+') - return grInvalidFont; - - name = (char *) font; - while (*name != '\x1a') { - if ( name-(char *)font > 128) - return grInvalidFont; - ++name; - } - name += 3; - - for (i=1; i <= BOLD_FONT; ++i) - if (memcmp( name, StdFonts[i], 4) == 0) - break; - if (i > BOLD_FONT) { - i = start; - while ( i <= stop && Fonts[i] != NULL) - ++i; - if (i > stop) - return grNoFontMem; - } - Fonts[i] = font; - return i; -} - -int __gr_text_installfont( int start, int stop, const char *name) -{ - FILE *ff; - long size; - void *font; - int res; - char *temp = alloca(strlen(name)+1+4); - char *temp1; - -#ifdef __linux__ -# define CHG_CHAR '\\' -# define NEW_CHAR '/' -#else -# define CHG_CHAR '/' -# define NEW_CHAR '\\' -#endif - - if (temp != NULL) { - int have_ext = FALSE; - strcpy(temp, name); - temp1 = temp; - while (*temp != '\0') { - if (*temp == CHG_CHAR) *temp = NEW_CHAR; - else *temp = (tolower)(*temp); - if (*temp == NEW_CHAR) have_ext = FALSE; - else have_ext |= *temp == '.'; - ++temp; - } - if (!have_ext) - strcat(temp1, ".chr"); - ff = fopen(temp1, "rb"); - } - else - ff = NULL; - - if (ff == NULL) - return grFileNotFound; - fseek( ff, 0, SEEK_END); - size = ftell(ff); - fseek( ff, 0, SEEK_SET); - font = malloc( (size_t) size); - if (font == NULL) { - fclose( ff); - return grNoFontMem; - } - fread( font, (size_t) size, 1, ff); - fclose( ff); - res = __gr_text_registerfont(start, stop, font); - if (res < 0) - free( font); - return res; -} - diff --git a/thirdparty/grx249/src/bgi/text1.lo b/thirdparty/grx249/src/bgi/text1.lo deleted file mode 100644 index bc201c18857af7be764b756e3eb66777e2893b2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3096 zcma)8Yitx%6h8YXY};jbDGeeZlw?5~VCZ5)D3r(cNwAS3eV8DQ+hw+|?e4le1Fhk) zb-KW~Y|Ish=iJe7Q=2`QnxwevgX_KB^2A|7$&^pb>X4(L@Ityykgz=7Q25?nXms5E;(&E2&q65-}gU8`@}D5 z6ko5hKj~-OR%$1Mv`KMtQ(SOxALnCVs=VV$HYiT_gmOqRwfjT}_&$8@1xysfI>rMmjR0 z1h)6h#n>*nCn?m9=MXt{7>R>mzci9~KT7MUAM1X441I@e%9wclSRCwq=H8QYO4r+a zyyz)q>>niUeaY-$dta4795VDI`TWv1g|CO^tXD0{9FsBG-g6#fij$Uvh#G2TA+-`* zhBOpQ+I#LRZgZQl4QiG7q++Lf2-Y@`hTEV)svJvsN;Qu|8m6%qaco1IK^DgTHMCI{ ztg>KHBROKpPG9`U9qyH_bkz3P8GI(V-&5DvhXCUBBk>&ZvN_Q$&&aahGbVwcfgF)9tffcS%H*vNQW!b4?d7+->yolxRn(&Bm>m5Jk(W4OMZOt;$fBJbn(j;UbYItQV;ynJ)P z>iQ-jzzYQ>Ofgfm&Lt?wb#y}!Q&h~j3R8C4j~Sa4TNbwJ*XjY&ElD;LHaY_m!@IA8 z;jqQ9#A-I5#Cxqn+fu~?aD#NE%@Q-#*sLc^Zkyw{*=@@gv&wA+#xps#eD|Qu;U2PC z-NQDE`>M@cmAms9){0yVvlbhV?IyO3l=n*9vUyqMCrro9VwUNYA!pD%RBm4sJqgult~k7i&cr*!-uGyFeg;CmT(Dg!^xz|(q6dB$^{ zyo>PyQ&V09EZZDr$-;)Y=GF+$g?+&QkLJ!z8<}Q~XG30=ZxI6ROj8Kh>YCkU?izM? zRn^|gI=0STR#VC9LbL{2X{Z))FMps4gGF?vOxzlX@E*VaxpQ_xgb(|<0CaF2-cT1t z^736Fj^%^?;2|!|`h#BZ1w%;iML4b*0H4<%jBo@v9FEg@+gWc* zJL~hb`f0q!4?tON#LJ@EkTV}(1!{91z<$(g765dU#scxJswYqz7Xmy$O?(T!WabwD zJfs%^oF@Guz-`po_zFxAUW|1I&)>WRU><2KD$7;;GU=B9c933%{|Tg*jW4h4I$Hd>2lM z>)={gU)a;Z0n;1~3L#wh|C29}hR2_lV(d{xqTc|#9;HrFt<2<=qD|w`J4zgCc;w1| zm{#>_5ig{VgDS)&!7Ehi)(!$F{dm??hiP7-Q!I*4wFs|Xv7rK=E*4?(k*vW+e9iql zUJ-I=%m!>E#M8zQCLgu!s-AOK zbRYAuY4@Rzg=XkMM*#+>dnGRMs86xb;>9hD7kTQjX diff --git a/thirdparty/grx249/src/bgi/text2.c b/thirdparty/grx249/src/bgi/text2.c deleted file mode 100644 index cdc78e5..0000000 --- a/thirdparty/grx249/src/bgi/text2.c +++ /dev/null @@ -1,56 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "text.h" - -static int GRX_textheight(int len, char *txt) { - Style.txo_font = (GrFont *)Fonts[TXT.font]; - Style.txo_direct = GR_TEXT_RIGHT; - return GrStringHeight(txt, len, &Style); -} - -/* ----------------------------------------------------------------- */ - -int textheight(const char *textstring) -{ - _DO_INIT_CHECK_RV(0); - __gr_text_init(); - if (TXT.font == DEFAULT_FONT) - return 8*ZERO2ONE(TXT.charsize); - if (TXT.font >= FirstGrxFont && TXT.font <= LastGrxFont) - return GRX_textheight(strlen(textstring), (char *) textstring); - return __gr_text_height * __gr_text_multy / __gr_text_divy; -} - -/* ----------------------------------------------------------------- */ - -int __gr_text_Height(int len, const char *txt) { - _DO_INIT_CHECK_RV(0); - __gr_text_init(); - if (TXT.font == DEFAULT_FONT) - return 8*ZERO2ONE(TXT.charsize); - if (TXT.font >= FirstGrxFont && TXT.font <= LastGrxFont) - return GRX_textheight(len, (char *) txt); - return __gr_text_height * __gr_text_multy / __gr_text_divy; -} diff --git a/thirdparty/grx249/src/bgi/text2.lo b/thirdparty/grx249/src/bgi/text2.lo deleted file mode 100644 index 808b01e473487a5890307f70be5d421fc72844f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2208 zcmdT^O=whC6h8CbG#L|}iP088(G*my*4sovTZ@Y%nm-+)#zYrUUMKN6GnknPGjGyF zL|cc{mLVXzv9yA&+_dOIRK!IvT33a(Q0Uf`f-YLRD5x;~zW0+{9)jYo2hKa^JNG-^ zyYJq2@9FMjPb3nNz#?MGA`|ovvskr4 zZdGRH%FC-4m_IZyUaQ=Xjm*1LuUa)`=A4ga_dTsVUozS2*Sy}Ur;xa2eE08mw{P~w zM%K<%2V*n8&qn_sxD&%8vFn~r@MWTByyRP>+R^lL*D~=qlmD;zR@bbbm)@N_KWo`E zJX+2><(BQLUA1m)E4!%e)V5aD+OFC@@akNXD10gW9eD4+uwYN-STo@(;k3w!L5ZA< zMOH73M!&&k??7#hJ0kKEV|P4OF$UsIBMtFb=X^Zc**NKE{f&qGtgmsz8}#}QqwPBU zZTg$g_XC{9xxUKue=;h6*L04_uhh&8shI9+ED}r!{$8(U3V);wqs3L2JI^0Gm@R34`Ss#LbJ`K%60w&P^;X^oHre_F!}a|jfUW+(OWo`|&a(54S2! z=bY3iqEqx@Cdi8RxZ)ysT?Bvqhzgh4KVu^TzfynE3n!Ye&Y@$Nix5{L|OLu>=bzwFCJP z7JS1}y0#imp4JW*iTs7;>&U5vWplNtzX8s6-h;GDnig>Yw;(6~b-Y%;r;aayQBS|S z0=*>0n3GSt0`Q@ix=)VLhyCal@%V*B%>u}KpdRkOR({1maCeg)%;6+*_5{3V06&u8 zTfmzF*4OVc{;gH0as7Dfk;nDWwE*QJgug@)zq&NS$>W|-D_A?EvI+x#GVzT%H2woR O?>62$>yCJjfcGDP%TLAt diff --git a/thirdparty/grx249/src/bgi/text3.c b/thirdparty/grx249/src/bgi/text3.c deleted file mode 100644 index 981b936..0000000 --- a/thirdparty/grx249/src/bgi/text3.c +++ /dev/null @@ -1,50 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "text.h" - -/* ----------------------------------------------------------------- */ -int __gr_text_Width(int len, const char *txt) { - int sum; - - _DO_INIT_CHECK_RV(0); - __gr_text_init(); - if (TXT.font == DEFAULT_FONT) - return 8*ZERO2ONE(TXT.charsize) * len; - if (TXT.font >= FirstGrxFont && TXT.font <= LastGrxFont) { - Style.txo_font = (GrFont *)Fonts[TXT.font]; - Style.txo_direct = GR_TEXT_RIGHT; - return GrStringWidth((char *) txt, len, &Style); - } - sum = 0; - while (len-- > 0) - sum += fntptr[*((uchar *)txt++)].width * __gr_text_multx / __gr_text_divx; - return sum; -} - -/* ----------------------------------------------------------------- */ - -int textwidth( const char *textstring) { - return __gr_text_Width(strlen(textstring), textstring); -} diff --git a/thirdparty/grx249/src/bgi/text3.lo b/thirdparty/grx249/src/bgi/text3.lo deleted file mode 100644 index d31468ddd5b01118278273d9c088e5c95c21c601..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2276 zcma)7-D@0G6hE`GjoV~wyXZcwB{pWkq(b=hcG0|8$YEa|K(nz(Ri;OKw9Na zw8rB-wF)h%g{phzBldU)kkhDKi>~ZWpHt7)SNTb>*3~|?sDbJx&#jK$uKayeTBg;t z!FZy3uey2ZJ3B!4Uai9k+w0hN;t0R3493G0ZcW-~s%#6=#^4r6>pP$Rbyv9hB9Dj7 zpZ}e9t=1o^Zmx#6DDl@J{E-HCrS(iafjrvW%C5D&HD_zV_wB)U|1r2+4#7&mJYGY# zv_2HRbqY_l`qfDawI+Q#79MNh@uxNYLZed+0hoam9epRoNDKZqJeJ%XAZo&>y* zP4bDTZKx!|+hZVH3<)Q~!Qh8@*=6)atr>t*boogZssofpm2yg)$%%e6(4!1#biB$tXE+#DXedZB>*qFlPs2EQH8ZD^cx$(ymidG&4Ll6-XJ~-o$oO5_Hht?Z+JN(RmLNtFN$bY z@PHtK+wrzf1ZtWC5#i_oz>x^eK75}K3;Qdm=B>D&hdqqeKodOW!F1lF50Cipv=6`G z!xw#c)rYV6@RvUPjSpY<;hTuvd!+OH>YE3ymH9LBEU0SEPzk7K@^gG1ak=+dIj3=T zaaQH?rhY-5DTA8MjPxrRbtIJi<$562Z`(JJ!j?a?A5&EV`PN32q z^`Vl?VQns>rFis8P%Mi7I4Uitx0K|HCl+BBcH)@$|HVr8LX^wQ#v6d5mz9*+gT&SUsULz+h+`tL<{U^G+2YN4Pjmx`(;77!+xIFs* z@Ye4p)~_9XR6lwJ-THZBp&PDa;Lp*CEeqJD7LV?PV!5@$ArvscpEPiU;*d}eczO3Q KulG%JdH(<&WOkMS diff --git a/thirdparty/grx249/src/bgi/text4.c b/thirdparty/grx249/src/bgi/text4.c deleted file mode 100644 index 681f4df..0000000 --- a/thirdparty/grx249/src/bgi/text4.c +++ /dev/null @@ -1,128 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "text.h" - -/* ----------------------------------------------------------------- */ -#define xoff(x) ((int)(signed char)(((_ushort) (x)) << 1) >> 1) -#define yoff(y) (-((int)(signed char)(((_ushort) (y)) >> 7) >> 1)) - -/* ----------------------------------------------------------------- */ -void __gr_text_vec(int *xx, int *yy, int XX, int YY, int len, uchar *txt) -{ - if (__gr_TextLineStyle) - LNE.lno_color= COL|WR; - if (TXT.direction == HORIZ_DIR) { - int _XX, x, y, nx, ny, w; - _ushort *dc; - - switch (TXT.horiz) { - case CENTER_TEXT : XX -= __gr_text_Width(len, txt) / 2; break; - case RIGHT_TEXT : XX -= __gr_text_Width(len, txt); break; - default : break; - } - switch (TXT.vert) { - case CENTER_TEXT : YY += __gr_text_Height(len, txt) / 2; break; - case TOP_TEXT : YY += __gr_text_Height(len, txt); break; - default : break; - } - _XX = XX; - x = y = 0; - while (len-- > 0) { - w = fntptr[*txt].width; - dc = fntptr[*(txt++)].cmd; - while (dc != NULL) { - switch ( *dc & 0x8080) { - case 0x0000 : dc = NULL; - XX += w * __gr_text_multx / __gr_text_divx; - break; - case 0x8000 : /* DO_SCAN op, any font using this ? */ - ++dc; - break; - case 0x0080 : x = xoff(*dc) * __gr_text_multx / __gr_text_divx; - y = yoff(*dc) * __gr_text_multy / __gr_text_divy; - ++dc; - break; - case 0x8080 : nx = xoff(*dc) * __gr_text_multx / __gr_text_divx; - ny = yoff(*dc) * __gr_text_multy / __gr_text_divy; - if (__gr_TextLineStyle) - GrCustomLine( XX+x, YY+y, XX+nx, YY+ny, &LNE); - else - GrLine( XX+x, YY+y, XX+nx, YY+ny, COL); - x = nx; - y = ny; - ++dc; - break; - } - } - } - *xx += XX-_XX; - } else { - int _YY, x, y, nx, ny, w; - _ushort *dc; - - switch (TXT.horiz) { - case LEFT_TEXT : XX += __gr_text_Height(len, txt); break; - case CENTER_TEXT : XX += __gr_text_Height(len, txt) / 2; break; - default : break; - } - switch (TXT.vert) { - case CENTER_TEXT : YY += __gr_text_Width(len,txt) / 2; break; - case TOP_TEXT : YY += __gr_text_Width(len,txt); break; - default : break; - } - _YY = YY; - x = y = 0; - while (len-- > 0) { - w = fntptr[*txt].width; - dc = fntptr[*(txt++)].cmd; - while (dc != NULL) { - switch ( *dc & 0x8080) { - case 0x0000 : dc = NULL; - YY -= w * __gr_text_multx / __gr_text_divx; - break; - case 0x8000 : /* DO_SCAN op, any font using this ? */ - ++dc; - break; - case 0x0080 : y = -xoff(*dc) * __gr_text_multx / __gr_text_divx; - x = yoff(*dc) * __gr_text_multy / __gr_text_divy; - ++dc; - break; - case 0x8080 : ny = -xoff(*dc) * __gr_text_multx / __gr_text_divx; - nx = yoff(*dc) * __gr_text_multy / __gr_text_divy; - if (__gr_TextLineStyle) - GrCustomLine( XX+x, YY+y, XX+nx, YY+ny, &LNE); - else - GrLine( XX+x, YY+y, XX+nx, YY+ny, COL); - x = nx; - y = ny; - ++dc; - break; - } - } - } - *yy += YY-_YY; - } -} - diff --git a/thirdparty/grx249/src/bgi/text4.lo b/thirdparty/grx249/src/bgi/text4.lo deleted file mode 100644 index ae7e34b4cffced5f9a0a43b92244cd73b737368f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3932 zcmbVPUu;uV7(cfyFxc#^qv(VQOT6O9#!Y7yGH~k3%C?vWCffi*v6j)TldfC3+hveN zM%n_`%gl^~0PaDbG``>iq7MW+#vhF_4h#tiPa2IB@qrlG0I~kQb8oks%W%Y#ocsO% z&hLKTIp?WzkMpo4)6=`Rr5n=<9OIwz{t}Io@wIMQUAMhtDwCS8`)5!gEu5ECrYx zTESN%V-096XdUc6*qYR+)T~9Nk`XLV>n3#~h^Jjxc$>zC9TVbd55mf{UdM1hOW#pC z#4qQo=hU%|{XY*4b?m>#h7`YeaIuZCj`S5V^_m^b{(D0#@uM~<)e4!8vFw70sfoMd z*^GE{0d#f8Ctn3=QZI;S$0o0#^ghWao-9$X!Jv*OFWS;~5+|SxtkvO&=^g0gu(Fbk zKWH#eB1Y^RR&Gov3=Cv8+pfe7|| zAE;rp@{pLm@F17Nnv#&QkMg2UOigcxa_age^&1U)wqxuD_6kgdN`S_5d~&UJgoi+K z3*QUpP^6M!_gaW9u%+6<^tWOvfVV_dOOv;Xa*Fg8X8GopHoR6PKW~6pn>=5Jt%Vc( zAiD-|hED@*9^V)L{5|k5)o|bubA0lZRl5I7=RU^EXMMB;`~e8=+j1T&B*1~8DI3xIj92jM zz5(4A{vK0-b$5UE1oF;y;i>1wZmtj}E>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M{@YYAo@tq_N~pSz}|)iAyXcuCTKj%j8)$ z&!#o@VxHwLvQ&A9jcNNVsU5O}cEsY^cTCoYO9QlX!!}E6Y&`F!nPaJ!2RIdm3;%Wk zNMcEMg8JwzgD5(;GW^z!`bgA;2uWU-dJ4(wRuqR5?&~C=Y3-2&kM;oWBpB+$kMv>T zVFdMe6zh2+;xQ`5U^0T~yfb}xp$}i}!yA40MjyW2hk=`I{+wC`!>CyX0i&|U5w)k! zt2L7w8&!j^+KuaKr47bx@$v<&Xk6Cyg+j?FX%~tGBNEx-n|0I2)n>hEMNKB>YmFMr zT6wGd+5)$HaK&nFG%dc?Y?SLI{P^EKM~85VbGY~3HA*6EnMWsar5@)z1n@Bi z&*7eO(Tky6l>ZrI%18eYqE87#D1;NJBme*NqxfLuM<74yM>H2gxPysvsKk+mVPx{7ILa0F4!7_C!6&o{i1HB83`G6zV}d=;;xD1! EKc`GXp#T5? diff --git a/thirdparty/grx249/src/bgi/text6.c b/thirdparty/grx249/src/bgi/text6.c deleted file mode 100644 index 1cda9a5..0000000 --- a/thirdparty/grx249/src/bgi/text6.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "text.h" - -int registerbgifont(void *font) -{ - return __gr_text_registerfont( FirstUserFont, LastUserFont, font); -} - -/* ----------------------------------------------------------------- */ - -int __gr_registerfarbgifont(void *font) { - return registerfarbgifont(font); -} diff --git a/thirdparty/grx249/src/bgi/text6.lo b/thirdparty/grx249/src/bgi/text6.lo deleted file mode 100644 index a022d4d18aa329a7ee32258666726715443d3d8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1536 zcma)6-D(q25T4DhHMVuDB^QwfjZjNPdrYMi6))PfNqP}lw9S=)WfQmQUw+t}g;a_n z1rekdUic0^fDfRg58xws>4i7qr9zx*TnVTo8SNRdcD`(82gTYjQ8YpVlS~b=6jD%lh3**pJqTm zku!9bpJ0A!z^{IA3(lM;(YhM+vlr#)$T}kWP!!$2-GHEz>OkPrDL&X_ zO{Ysk_UMp(amd#CCs2<`&gWW$F&P`7dl4J=%?;UQwpERAo}|-}i=s-dQ`>Dz$F05x?@Ze*8>)*_zjYCne~)^SGhzOfFU5|wL*9nt#X;z{od%QLzHG46twOhnLvFTlHwIf<+gsSk zqLH#extUp_AB_4Z@WDi)#>9l!Iid-XZ+tNElZi7Df-!zkr2fu*ncZasPjY&m^Y(k5 zbDpQCeJ7Rf4g><^QGg`+Pb0b*ay%Wj*h#GoNAs*twPE=o;pw9gMTInE9>p*OpT;2exvwzQcVFqwjXxZT!LY_Z7BGMRCe?yS5y*nijK4o0L|GbYLfy zD9{%nR&W2q_-(^SYF0$4QBNZAa&+gwXgOz=qc5o)YHatOvaRiT`}vp}>rnSR>)3Hl z8QcQi1n%h@AUvPTY?HukV5Y$70~DAG1-7@y@_9VWpJ9vG9wLn&swP77K~1!rlQa=t zkQ1V;2u`2UA%+tHskP9kCNdeShEntg|{`l*&`4vt~4XGB??% zmJHLJ%uO@|B#rSAq;%(VW~sqEx-QM{J!yTg8xdCubNL8O*u zr_GU3NVDk3W8SK0OsRZ{q#hkHM@StlmB==z8@~{BEI&PM;1<+e-ZWH<``smTWbA~i zPvpvKp_nh=wq{9XaO0RhUL2V=NS!F=%LSa~f71dY(f&2!|1LZ|&>EY0o-scKMycdY znl7xH&|@#m=J@-?#Smkk z&&6T9##!v)rQJA=XX-;-yR)=EIgWY2m9`Ndr|)q-o@@47cLV1T=l$lg$veXw){N`H ze2B#d-k}=eX0Ya2-vws64e%%=_m5|e*S|(An5i9(TQKtXjbk~E?}V|u-eE}*TwrU% TzTT4Gz`8gzeUTGf^5XslSF`R` diff --git a/thirdparty/grx249/src/bgi/text8.c b/thirdparty/grx249/src/bgi/text8.c deleted file mode 100644 index db6f2a1..0000000 --- a/thirdparty/grx249/src/bgi/text8.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "text.h" - -void gettextsettings(struct textsettingstype *texttypeinfo) -{ - _DO_INIT_CHECK; - __gr_text_init(); - memcpy( texttypeinfo, &TXT, sizeof(TXT)); -} - diff --git a/thirdparty/grx249/src/bgi/text8.lo b/thirdparty/grx249/src/bgi/text8.lo deleted file mode 100644 index 62fae2035da4a6578ea6c843d4e5dcf4135d0f48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1572 zcma)6TWb?h5T4DhHMVgZiwN4Hd8krpdrYNB6(5?GBosqi+9U`C*CbujTP`HKl1lMH zuo#y96dweCKp~aaa5wxOzWyh_{^O+A>%HlQIN1KFSjKqNYJ*_W+hcRg@xKsrdhJij z#*^;R$6HuFdQSFEmmKX}u~wB%Ua?lgoqX6@jdb!6Yd+dZMV)Qd*m#%Hi;E9p6S<;U zHO$z3F)QNJGp3DZUfzw1_^g<@?Zk0}!Wv;c$C_Tw5tn$37}~nb3Xxu{k#rE2Mk9*y zj+;lXWA+MB1vaUM4?_tx(w3Lis5YoZ5?wW%_^c|AhIaaZqD;-Y`*6lt;=fyke)aqu z8P)kjwyW<4WV;JL_TGXMlPTO^WKX6G0X!JM=L1+e-GRPGxSp#%#z<&@?)WhJO$P8v z0B;2FP5_gkw~RSaqOxwlZL-;}mYbw$t+{)GqguVB8Czy`R}@>Mr86rFiHx?AO06fe zS~jteNove3H?*bYrL5zv=}mLbaD3#{wyWEI=$=97KE%Uuk?kNquCbj|i7=a!!$b+T z3OAVszC;vb8{${=7#0I1n)?-_P-JT~9J}Rt4Si4GY!aIVqd=nAY?2)iXE!EFwMs>= zGQV0gbit!K-82fNT^Eb+b-iKilR$EPOMBKRRCE&MM$N2qHUBM#%;a`X1@n%{ z!FK}1>_Ts_VqU!|n`htt9@s+g{vo5Rn6!CT$O+$3oGo%;qLB;vZ?Ynv`%9ts?E3|4 zkV#hX|HZ=@c6~U61^N8notH1earodvKCn*Np7X#OH0N3;O7zWhTpF diff --git a/thirdparty/grx249/src/bgi/text9.c b/thirdparty/grx249/src/bgi/text9.c deleted file mode 100644 index 21c94fe..0000000 --- a/thirdparty/grx249/src/bgi/text9.c +++ /dev/null @@ -1,34 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "text.h" - -void settextjustify(int horiz, int vert) -{ - _DO_INIT_CHECK; - __gr_text_init(); - TXT.horiz = horiz; - TXT.vert = vert; -} - diff --git a/thirdparty/grx249/src/bgi/text9.lo b/thirdparty/grx249/src/bgi/text9.lo deleted file mode 100644 index 0599617e4cc1ae07bd5cd2fe70bd4bcd2f02ba98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1528 zcma)6-D(q25T4D(8rzztrGn6+5h_$_4~Yb|UNx<0ErhhRDTo!8ByQ8#W)pVLLaIfP zpjd)l_yj(Q6e4)*1NZ=5cq3ja#QApjq)RC1!0deUb7tnu&hE=xenrzXQlybiry9{m z-S=cXF-v0<_xwY_fnQ@+es6vM)9dwKbt7zR|A=+k@O9|*i97D&FU0;{`*Uok>xBjp z#hJwM#%QNFGkLs`@VuSrnJ%p^FW*bfZkJt4y2%BR5vlpK>uKp1w^AaN5$PMgoy$a- zN14wtuNJn6dpLm&ZBH_Tv}c>79mTY%(P;E7Uv8Fd)1HT@0GW%&+L1y$u`?WxWxMfc zcI2@Sh!X665X2(ySrndElz#TYF*-U5k?wVTYS6vT!@8QRZ__Du>SUzTg#mqdKtDgA zYyA_r>jd|6ITSGw86pwVao_s`x;LZ12LGc0e{Db~X}08osE}hyz^ASwYrBVJ7_Gav zMb(r>vtr0S*V-5578$Gg^`&gySYKJ$$`y@bb}64TIJRmVYlXFHLz;l3rkOzbv2*)K@dFOfjhl=|PUpA{D diff --git a/thirdparty/grx249/src/bgi/texta.c b/thirdparty/grx249/src/bgi/texta.c deleted file mode 100644 index 32f641e..0000000 --- a/thirdparty/grx249/src/bgi/texta.c +++ /dev/null @@ -1,98 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "text.h" - -static int _mult[11] = { 1, 3, 2, 3, 1, 4, 5, 2, 5, 3, 4}; -static int _div[11] = { 1, 5, 3, 4, 1, 3, 3, 1, 2, 1, 1}; -static CharInfo *chi[LastUserFont+1] = { NULL }; -static int Heights[LastUserFont+1]; - -static int SetFont(int fnt) -{ - if (Fonts[fnt] == NULL) - return FALSE; - - if (chi[fnt] == NULL) { - chi[fnt] = calloc(256,sizeof(CharInfo)); - if (chi[fnt] == NULL) - return FALSE; - fntptr = chi[fnt]; - - if (!__gr_text_ChrFontInfo(Fonts[fnt], fntptr, &Heights[fnt])) - return FALSE; - } - fntptr = chi[fnt]; - __gr_text_height = Heights[fnt]; - return TRUE; -} - -void settextstyle(int font, int direction, int charsize) -{ - _DO_INIT_CHECK; - __gr_text_init(); - if (font < DEFAULT_FONT || font >= NrFonts || - (font > BOLD_FONT && Fonts[font] == NULL)) { - ERR = grInvalidFontNum; - return; - } - if (BITMAP(font) && charsize < 1) charsize = 1; - if (charsize < 0) charsize = 4; /* 100% */ - if (charsize > 10) charsize = 10; - - if (!BITMAP(font)) { - if (Fonts[font] == NULL) { - char fn[256], *cp; - - strcpy(fn, (*__gr_BGICHR != '\0' ? __gr_BGICHR : ".\\")); - cp = fn; - while ( *cp != '\0') ++cp; - if ( *(--cp) != '\\' && *cp != '/') { - *(++cp) = '\\'; - *(cp+1) = '\0'; - } - strcat( fn, StdFonts[font]); - __gr_text_installfont( font, font, fn); - } - if (!SetFont( font)) { - ERR = grFontNotFound; - font = DEFAULT_FONT; - charsize = 1; - } - } - TXT.font = font; - TXT.direction = direction; - TXT.charsize = charsize; - if (charsize == USER_CHAR_SIZE) { - __gr_text_multx = __gr_text_usr_multx; - __gr_text_divx = __gr_text_usr_divx; - __gr_text_multy = __gr_text_usr_multy; - __gr_text_divy = __gr_text_usr_divy; - } else { - __gr_text_multx = __gr_text_multy = _mult[charsize]; - __gr_text_divx = __gr_text_divy = _div[charsize]; - } -} - - diff --git a/thirdparty/grx249/src/bgi/texta.lo b/thirdparty/grx249/src/bgi/texta.lo deleted file mode 100644 index 3a002fc84cc6ee1cf0636684fb1fa666a0193e7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3760 zcma)8YiwIZ7CwHo>jc+!OUkRIq{Tp??InSL00|K{&7-W11xvj;`ZQ$DvL`ow7%%IBJ+Pk+FXp3f`aMQ6UG?QB!@@z2ny zy&LZXL8TF`4ndy?()JvFq_*{q$`{d@eX!1!_rXxz5f9da$13&c%sR|$d(GA`B2|B_ zWzI?asrU|rRAV-*wpIIr)k7gnP`R5?_S*EQqieq#FMfXxg|JCfE|qIh8E5IXeL=p4 zY4Kw?YWwSIktdLsyxoi+ENr*E@N%O$y8B0z<6sE2srXoCo84YV?fG{)xj<(bwV8K- zMDyBc5xtdRK?&vNXExy3Pw@7EtIDMOxR?e!)s{`?1`Ajg& zQ?zF`7vDT+Z|Qujda8!8>BI5$V#S;^o+;OT3_crutFJNr!~NE(=^t*iLVvp-)Fai9 z&F-dbbR5%!;lZIH#SPk)@_fwR^-A+{mF+sb9RS&aoL#EV0uvW(?m}mXb^YrK{4AbE z+{iQKGogn>Lxk}wS>OMDEBl3z>{j)7|)nq)}zend4<1u@Lvn6rr2IApb za1Pzj;*m4zrMy*Yz1`?A+P1Zq6l#C;rZ%Ik!)U+WwyS)2y^y1K*C6@o zLugx_MD|5(7 z8EHvp$D}VaHk!4HVvd(`mYBn12gOKswMj8!(XD7r(3MwF|8yt$MR#CX9@O95V+ssvpIW;T`|by-Tqf=VALE%9(UZcHC6&TaBQ%`)X-abt(YZ32q}xA*Ss z>gz{z(JG`Tr_6NrfQxFcHLTal@s#BmAIlf5R4zAydPo|biL@)YD_daj&iu%P;!mXy zFx(tTjpaDv@o}ts=KjZ^V4mn{bs=Uo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-0eRPxja~a8iNosHouaUnjrFlTU z!H~;6;Jv^csVg&?g}^tdL$8AU`^E$4E&7L75IXcDSc@sW<-}8Vz5>+74jty9mh2se YWHX6kvTriPHxSfC_?uppB1WnE4N!?7O#lD@ diff --git a/thirdparty/grx249/src/bgi/textc.c b/thirdparty/grx249/src/bgi/textc.c deleted file mode 100644 index 60183ca..0000000 --- a/thirdparty/grx249/src/bgi/textc.c +++ /dev/null @@ -1,64 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "text.h" - -int __gr_text_ChrFontInfo(void *Font, CharInfo *fntptr, int *height) { - int i, LstChar; - char *cp; - _ushort *Offsets; - uchar *Widths; - char *Data; - FontFileHeader *ffh; - FontHeaderTyp *fht; - - cp = (char *)Font; - i = 256; - while (*cp != '\x1a' ) { /* \x1a = ^Z */ - ++cp; - --i; - if (i == 0) /* Error, no ^Z at end of copyright */ - return FALSE; - } - ++cp; - ffh = (FontFileHeader *)cp; - fht = (FontHeaderTyp *)((char *)Font + ffh->header_size); - if (fht->sig != '+') - return FALSE; /* Magic failed */ - if (fht->scan_flag) { - /* font may have DO_SCAN op, anything we should do ? */ - } - Offsets = (_ushort *)((char *)fht + sizeof(FontHeaderTyp)); - Widths = (uchar *)Offsets + 2 * (int)fht->nchrs; - Data = (char *)Font + fht->cdefs + ffh->header_size; - LstChar = fht->firstch + fht->nchrs - 1; - - *height = (int)fht->org_to_cap - (int)fht->org_to_dec; - for (i=fht->firstch; i <= LstChar; ++i) { - fntptr[i].width = Widths[i - fht->firstch]; - fntptr[i].cmd = (_ushort *)(Data + Offsets[i - fht->firstch]); - } - return TRUE; -} - diff --git a/thirdparty/grx249/src/bgi/textc.lo b/thirdparty/grx249/src/bgi/textc.lo deleted file mode 100644 index 7618cf74b608bb6632d369ec367eaf7fbdff559c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1228 zcma)4&rcIk5T5NmWQAt8nvDl(v?d#c2rsRc#ByR&ftVNrT9ibzDRluOZOL|5#1JGY zDjU*^2haWkUa1FTnpDfRC;tW$IAA<_(3$PNu;HSU%+7q@d~e>5*;f;{CnZS&VG_u2 zi~tTJ-AdXIgAj#&A@$=g?ZWTb2lwyQ4wYTUi0{rDiTZo$;2j;P_2*D)N|}zf{SL)j zH_p39T4P#DHS5uHTbZlwn$|FTw8m4Zz8;f0+LxI=@20`DJ(Ed4>cbU}8JH_Wo!y*a zcoA)HhIyTgZfuTuxYdDDcP@iZwuioJd%02Y+BIP0kq%J?`aNjLyLfxATcE zSNp0we4KyO!kB9M8BArfV~N4p1-I8!zE1Ci{X{&0(B8O2CuG{oWcS| z$L_{uk0wZg6C z{GwebS-8#r+5igaEyaz;G52SNku25?a0w&nXzpaa1VSd@73383f9Zx%Lu-=gWYmv1 zVN@d@4Wi($6B#lACy=8liAkriApSv;(?3f#k4|fZZW_S~6#^5wIm9&M@qpjJ1#~as yXdluM4);O`pON^0u@9ZJq@y>aT)YXUFpvE%QW6;TAv=Q})@`G1(XVtrLiZQv^Pdp_ diff --git a/thirdparty/grx249/src/bgi/textd.c b/thirdparty/grx249/src/bgi/textd.c deleted file mode 100644 index f5e0ba1..0000000 --- a/thirdparty/grx249/src/bgi/textd.c +++ /dev/null @@ -1,75 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "text.h" -#include "allocate.h" - -#include -static void StrLwrCpy(char *d, const char *s, int n) -{ - while (n-- > 0) { - *(d++) = tolower(*s); - ++s; - } - *d = '\0'; -} - -static int _installgrxfont(int start, int stop, const char *name) -{ - __gr_text_init(); - while (start < stop && Fonts[start] != NULL) ++start; - if (start >= stop) - return grNoFontMem; -#ifdef GRX_VERSION - if ( name[0] == '@' && name[1] == ':') - name += 2; -#endif - Fonts[start] = (void *) GrLoadFont((char *) name); - if (Fonts[start] == NULL) - return grFontNotFound; - return start; -} - -static int _installuserfont(int len, const char *name) -{ - int res; - char *loc_name = ALLOC(len+5); - - if ( !loc_name ) - return grNoFontMem; - - StrLwrCpy(loc_name, name, len); - if (strstr(loc_name, ".fnt") != NULL) - res = _installgrxfont( FirstGrxFont, LastGrxFont, name); - else - res = __gr_text_installfont( FirstUserFont, LastUserFont, loc_name); - - FREE(loc_name); - return res; -} - -int installuserfont(const char *name) -{ - return _installuserfont(strlen(name), name); -} diff --git a/thirdparty/grx249/src/bgi/textd.lo b/thirdparty/grx249/src/bgi/textd.lo deleted file mode 100644 index d31c36a8f344aa726763b1d0bd4db7b71165a601..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2248 zcma)6Z%kWN6hG}NTL)c>h{iaad|(S~?AcB1vv&*%wXpiyw@ijQ>J(!-1g5ViwaFKQA*AA%;y8i4yDYyuK%;F42>B-#O== z-~HWt&pr3P5)5_OY&NpQMgnblL_Ir7kv2m$Q!ROn_)c>`pZ=x(<3PXu{i&Zei^byX zf*k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YdNocx8sRw`n{l!Y5rS2AoEHho9E%HlAl!aipqB(mka|6@C^^)hWw-@ zMivyHlpWmBHCXl{+t`c!Z$a6QoTogC%-^r!?G_N`|0|FGK{y{bfv{ilpD_I@!0DU+ z#({qaYJ_XlT5JtIHco6!KMyfk9d9e2;hX=Isb+>__^dH`U*Q*^MoiuiK=S^cpn$yR x{gH#_{*t`_%PI5>3W~}lDDzmyUgqxL%6Ak#rxS}g2RV?;dx3qwm?T(}_Xo53f%O0Y diff --git a/thirdparty/grx249/src/depend.dj2 b/thirdparty/grx249/src/depend.dj2 deleted file mode 100644 index f65078f..0000000 --- a/thirdparty/grx249/src/depend.dj2 +++ /dev/null @@ -1,10 +0,0 @@ -# This is just a dummy file -# If you really work on GRX and need a working -# rebuild, create a real dependencies file by -# -# make -f makefile.dj2 dep -# -# If you want to use utils/watmake to create -# a Watcom makefile you have to create a valid -# DJGPP v2 dependencies file first (see above) - diff --git a/thirdparty/grx249/src/depend.lnx b/thirdparty/grx249/src/depend.lnx deleted file mode 100644 index 72af130..0000000 --- a/thirdparty/grx249/src/depend.lnx +++ /dev/null @@ -1,4 +0,0 @@ -# This is just a dummy file -# If you really work on GRX and need a working -# rebuild, create a real dependencies file by -# make -f makefile.lnx dep diff --git a/thirdparty/grx249/src/depend.x11 b/thirdparty/grx249/src/depend.x11 deleted file mode 100644 index b372032..0000000 --- a/thirdparty/grx249/src/depend.x11 +++ /dev/null @@ -1,5 +0,0 @@ -# This is just a dummy file -# If you really work on GRX and need a working -# rebuild, create a real dependencies file by -# make -f makefile.x11 dep - diff --git a/thirdparty/grx249/src/draw/bitblt.c b/thirdparty/grx249/src/draw/bitblt.c deleted file mode 100644 index e44cf45..0000000 --- a/thirdparty/grx249/src/draw/bitblt.c +++ /dev/null @@ -1,61 +0,0 @@ -/** - ** bitblt.c ---- the pixel transfer routine - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrBitBlt(GrContext *dst,int dx,int dy, - GrContext *src,int x1,int y1,int x2,int y2,GrColor oper) -{ - int oldx1,oldy1; - int oldx2,oldy2; - int dstx2,dsty2; - void (*bltfun)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor); - if(dst == NULL) dst = CURC; - if(src == NULL) src = CURC; - isort(x1,x2); oldx1 = x1; - isort(y1,y2); oldy1 = y1; - cxclip_ordbox(src,x1,y1,x2,y2); - oldx1 = (dx += (x1 - oldx1)); - oldy1 = (dy += (y1 - oldy1)); - oldx2 = dstx2 = dx + x2 - x1; - oldy2 = dsty2 = dy + y2 - y1; - clip_ordbox(dst,dx,dy,dstx2,dsty2); - x1 += (dx - oldx1); - y1 += (dy - oldy1); - x2 -= (oldx2 - dstx2); - y2 -= (oldy2 - dsty2); - if(src->gc_driver == dst->gc_driver) - bltfun = src->gc_driver->bitblt; - else if(src->gc_driver->mode == dst->gc_driver->rmode) - bltfun = dst->gc_driver->bltr2v; - else if(src->gc_driver->rmode == dst->gc_driver->mode) - bltfun = src->gc_driver->bltv2r; - else return; - mouse_block(src,x1,y1,x2,y2); - mouse_addblock(dst,dx,dy,dstx2,dsty2); - (*bltfun)( - &dst->gc_frame,(dx + dst->gc_xoffset),(dy + dst->gc_yoffset), - &src->gc_frame,(x1 + src->gc_xoffset),(y1 + src->gc_yoffset), - (x2 - x1 + 1), - (y2 - y1 + 1), - oper - ); - mouse_unblock(); -} - diff --git a/thirdparty/grx249/src/draw/bitblt1b.c b/thirdparty/grx249/src/draw/bitblt1b.c deleted file mode 100644 index 1b2725d..0000000 --- a/thirdparty/grx249/src/draw/bitblt1b.c +++ /dev/null @@ -1,58 +0,0 @@ -/** - ** bitblt1b.c ---- bitblt from a 1bpp context - ** - ** Copyright (c) 2001 Josu Onandia - ** [e-mail: jonandia@fagorautomation.es]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrBitBlt1bpp(GrContext *dst,int dx,int dy, - GrContext *src,int x1,int y1,int x2,int y2, - GrColor fg, GrColor bg) -{ - int oldx1,oldy1; - int oldx2,oldy2; - int dstx2,dsty2; - - if(dst == NULL) dst = CURC; - if(src == NULL) src = CURC; - - if(src->gc_driver->num_planes != 1 || src->gc_driver->bits_per_pixel != 1) - return; - - isort(x1,x2); oldx1 = x1; - isort(y1,y2); oldy1 = y1; - cxclip_ordbox(src,x1,y1,x2,y2); - oldx1 = (dx += (x1 - oldx1)); - oldy1 = (dy += (y1 - oldy1)); - oldx2 = dstx2 = dx + x2 - x1; - oldy2 = dsty2 = dy + y2 - y1; - clip_ordbox(dst,dx,dy,dstx2,dsty2); - x1 += (dx - oldx1); - y1 += (dy - oldy1); - x2 -= (oldx2 - dstx2); - y2 -= (oldy2 - dsty2); - mouse_block(src,x1,y1,x2,y2); - mouse_addblock(dst,dx,dy,dstx2,dsty2); - - (dst->gc_driver->drawbitmap)((dx + dst->gc_xoffset),(dy + dst->gc_yoffset), - (x2 - x1 + 1),(y2 - y1 + 1),src->gc_baseaddr[0],src->gc_lineoffset, - /*alex:the offset should anyway be the x1,y1 point in src, as clipped*/ - (x1 + (y1 * (src->gc_lineoffset << 3))),fg,bg); - - mouse_unblock(); -} - diff --git a/thirdparty/grx249/src/draw/bitbltnc.c b/thirdparty/grx249/src/draw/bitbltnc.c deleted file mode 100644 index a8c151c..0000000 --- a/thirdparty/grx249/src/draw/bitbltnc.c +++ /dev/null @@ -1,45 +0,0 @@ -/** - ** bitbltnc.c ---- the pixel transfer routine (no clip) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrBitBltNC(GrContext *dst,int dx,int dy, - GrContext *src,int x1,int y1,int x2,int y2,GrColor oper) -{ - void (*bltfun)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor); - if(dst == NULL) dst = CURC; - if(src == NULL) src = CURC; - isort(x1,x2); - isort(y1,y2); - if(src->gc_driver == dst->gc_driver) - bltfun = src->gc_driver->bitblt; - else if(src->gc_driver->mode == dst->gc_driver->rmode) - bltfun = dst->gc_driver->bltr2v; - else if(src->gc_driver->rmode == dst->gc_driver->mode) - bltfun = src->gc_driver->bltv2r; - else return; - (*bltfun)( - &dst->gc_frame,(dx + dst->gc_xoffset),(dy + dst->gc_yoffset), - &src->gc_frame,(x1 + src->gc_xoffset),(y1 + src->gc_yoffset), - (x2 - x1 + 1), - (y2 - y1 + 1), - oper - ); -} - diff --git a/thirdparty/grx249/src/draw/box.c b/thirdparty/grx249/src/draw/box.c deleted file mode 100644 index 1ba736f..0000000 --- a/thirdparty/grx249/src/draw/box.c +++ /dev/null @@ -1,57 +0,0 @@ -/** - ** box.c ---- draw a rectangle - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrBox(int x1,int y1,int x2,int y2,GrColor c) -{ - int ox1,oy1,ox2,oy2; - isort(x1,x2); ox1 = x1; ox2 = x2; - isort(y1,y2); oy1 = y1; oy2 = y2; - clip_ordbox(CURC,x1,y1,x2,y2); - mouse_block(CURC,x1,y1,x2,y2); - if(!(oy1 -= y1)) (*FDRV->drawhline)( - x1 + CURC->gc_xoffset, - y1 + CURC->gc_yoffset, - x2 - x1 + 1, - c - ); - if(!(oy2 -= y2) && ((y1 != y2) || oy1)) (*FDRV->drawhline)( - x1 + CURC->gc_xoffset, - y2 + CURC->gc_yoffset, - x2 - x1 + 1, - c - ); - if((y2 = y2 - (oy1 ? y1 : ++y1) + (oy2 ? 1 : 0)) > 0) { - if(!(ox1 -= x1)) (*FDRV->drawvline)( - x1 + CURC->gc_xoffset, - y1 + CURC->gc_yoffset, - y2, - c - ); - if((ox2 == x2) && ((x1 != x2) || ox1)) (*FDRV->drawvline)( - x2 + CURC->gc_xoffset, - y1 + CURC->gc_yoffset, - y2, - c - ); - } - mouse_unblock(); -} - diff --git a/thirdparty/grx249/src/draw/boxnc.c b/thirdparty/grx249/src/draw/boxnc.c deleted file mode 100644 index 2902544..0000000 --- a/thirdparty/grx249/src/draw/boxnc.c +++ /dev/null @@ -1,53 +0,0 @@ -/** - ** boxnc.c ---- draw a rectangle (no clip) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrBoxNC(int x1,int y1,int x2,int y2,GrColor c) -{ - isort(x1,x2); - isort(y1,y2); - (*FDRV->drawhline)( - x1 + CURC->gc_xoffset, - y1 + CURC->gc_yoffset, - x2 - x1 + 1, - c - ); - if(y2 != y1) (*FDRV->drawhline)( - x1 + CURC->gc_xoffset, - y2 + CURC->gc_yoffset, - x2 - x1 + 1, - c - ); - if((y2 = y2 - y1 + 1 - 2) > 0) { - (*FDRV->drawvline)( - x1 + CURC->gc_xoffset, - y1 + CURC->gc_yoffset + 1, - y2, - c - ); - if(x2 != x1) (*FDRV->drawvline)( - x2 + CURC->gc_xoffset, - y1 + CURC->gc_yoffset + 1, - y2, - c - ); - } -} - diff --git a/thirdparty/grx249/src/draw/clearclp.c b/thirdparty/grx249/src/draw/clearclp.c deleted file mode 100644 index c568ca3..0000000 --- a/thirdparty/grx249/src/draw/clearclp.c +++ /dev/null @@ -1,25 +0,0 @@ -/** - ** clearclp.c ---- clear clipbox - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -void GrClearClipBox(GrColor bg) -{ - GrFilledBox(0,0,CURC->gc_xmax,CURC->gc_ymax,bg); -} - diff --git a/thirdparty/grx249/src/draw/clearctx.c b/thirdparty/grx249/src/draw/clearctx.c deleted file mode 100644 index 63498b1..0000000 --- a/thirdparty/grx249/src/draw/clearctx.c +++ /dev/null @@ -1,37 +0,0 @@ -/** - ** clearctx.c ---- clear context - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: - ** 081105 Richard, GrClearContextC - ** - **/ - -#include "libgrx.h" - -void GrClearContext(GrColor bg) -{ - mouse_block(CURC,0,0,CURC->gc_xmax,CURC->gc_ymax); - GrFilledBoxNC(0,0,CURC->gc_xmax,CURC->gc_ymax,bg); - mouse_unblock(); -} - -void GrClearContextC(GrContext *ctx, GrColor bg) -{ - GrContext *s = GrCurrentContext(); - GrSetContext(ctx); - GrClearContext(bg); - GrSetContext(s); -} diff --git a/thirdparty/grx249/src/draw/clearscr.c b/thirdparty/grx249/src/draw/clearscr.c deleted file mode 100644 index 411c631..0000000 --- a/thirdparty/grx249/src/draw/clearscr.c +++ /dev/null @@ -1,28 +0,0 @@ -/** - ** clearscr.c ---- clear screen - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -void GrClearScreen(GrColor bg) -{ - GrContext save; - GrSaveContext(&save); - GrSetContext(SCRN); - GrClearContext(bg); - GrSetContext(&save); -} diff --git a/thirdparty/grx249/src/draw/drwinlne.c b/thirdparty/grx249/src/draw/drwinlne.c deleted file mode 100644 index f47c10e..0000000 --- a/thirdparty/grx249/src/draw/drwinlne.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - ** drvinlne.c ---- the drawing inline functions - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -void (GrPlotNC)(int x,int y,GrColor c) -{ - GrPlotNC(x,y,c); -} - -GrColor (GrPixelNC)(int x,int y) -{ - return(GrPixelNC(x,y)); -} - -GrColor (GrPixelCNC)(GrContext *c,int x,int y) -{ - return(GrPixelCNC(c,x,y)); -} - - diff --git a/thirdparty/grx249/src/draw/fillbox.c b/thirdparty/grx249/src/draw/fillbox.c deleted file mode 100644 index f947510..0000000 --- a/thirdparty/grx249/src/draw/fillbox.c +++ /dev/null @@ -1,34 +0,0 @@ -/** - ** fillbox.c ---- draw a filled rectangle - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrFilledBox(int x1,int y1,int x2,int y2,GrColor c) -{ - clip_box(CURC,x1,y1,x2,y2); - mouse_block(CURC,x1,y1,x2,y2); - (*FDRV->drawblock)( - x1 + CURC->gc_xoffset, - y1 + CURC->gc_yoffset, - x2 - x1 + 1, - y2 - y1 + 1, - c - ); - mouse_unblock(); -} diff --git a/thirdparty/grx249/src/draw/fillboxn.c b/thirdparty/grx249/src/draw/fillboxn.c deleted file mode 100644 index d55f0fe..0000000 --- a/thirdparty/grx249/src/draw/fillboxn.c +++ /dev/null @@ -1,32 +0,0 @@ -/** - ** fillboxn.c ---- draw a filled rectangle (no clip) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrFilledBoxNC(int x1,int y1,int x2,int y2,GrColor c) -{ - (*FDRV->drawblock)( - x1 + CURC->gc_xoffset, - y1 + CURC->gc_yoffset, - x2 - x1 + 1, - y2 - y1 + 1, - c - ); -} - diff --git a/thirdparty/grx249/src/draw/flodspil.c b/thirdparty/grx249/src/draw/flodspil.c deleted file mode 100644 index 8e9b9dd..0000000 --- a/thirdparty/grx249/src/draw/flodspil.c +++ /dev/null @@ -1,121 +0,0 @@ -/** - ** flodspil.c ---- Floodspill is a color replacer - ** - ** Copyright (c) 2007 Richard - ** [e-mail: richard at dogcreek.ca]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "libgrx.h" - - -void GrFloodSpill(int x1, int y1, int x2, int y2, - GrColor old_c, GrColor new_c) -{ - int y; - int x; - - GrColor *scanline; - - for(y = y1; y <= y2; ++y) - { - if ((scanline = (GrColor *)GrGetScanline(x1, x2, y)) != NULL) - { - for(x = x1; x <= x2; ++x) - { - if (scanline[x] == old_c) - scanline[x] = new_c; - } - GrPutScanline(x1, x2, y, scanline, GrWRITE); - } - } -} - -void GrFloodSpill2(int x1, int y1, int x2, int y2, - GrColor old_c1, GrColor new_c1, - GrColor old_c2, GrColor new_c2) -{ - int y; - int x; - - GrColor *scanline; - - for(y = y1; y <= y2; ++y) - { - if ((scanline = (GrColor *)GrGetScanline(x1, x2, y)) != NULL) - { - for(x = x1; x <= x2; ++x) - { - if (scanline[x] == old_c1) - scanline[x] = new_c1; - else if(scanline[x] == old_c2) - scanline[x] = new_c2; - } - GrPutScanline(x1, x2, y, scanline, GrWRITE); - } - } -} - -void GrFloodSpillC(GrContext *ctx, int x1, int y1, int x2, int y2, - GrColor old_c, GrColor new_c) -{ - int y; - int x; - GrContext *ctx_save = GrCurrentContext(); - GrColor *scanline; - - GrSetContext(ctx); - - for(y = y1; y <= y2; ++y) - { - if ((scanline = (GrColor *)GrGetScanline(x1, x2, y)) != NULL) - { - for(x = x1; x <= x2; ++x) - { - if (scanline[x] == old_c) - scanline[x] = new_c; - } - GrPutScanline(x1, x2, y, scanline, GrWRITE); - } - } - GrSetContext(ctx_save); -} - -void GrFloodSpillC2(GrContext *ctx, int x1, int y1, int x2, int y2, - GrColor old_c1, GrColor new_c1, - GrColor old_c2, GrColor new_c2) -{ - int y; - int x; - GrContext *ctx_save = GrCurrentContext(); - GrColor *scanline; - - GrSetContext(ctx); - - for(y = y1; y <= y2; ++y) - { - if ((scanline = (GrColor *)GrGetScanline(x1, x2, y)) != NULL) - { - for(x = x1; x <= x2; ++x) - { - if (scanline[x] == old_c1) - scanline[x] = new_c1; - else if(scanline[x] == old_c2) - scanline[x] = new_c2; - } - GrPutScanline(x1, x2, y, scanline, GrWRITE); - } - } - GrSetContext(ctx_save); -} diff --git a/thirdparty/grx249/src/draw/frambox.c b/thirdparty/grx249/src/draw/frambox.c deleted file mode 100644 index e4ac220..0000000 --- a/thirdparty/grx249/src/draw/frambox.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** frambox.c ---- framed (possibly shaded) box primitive - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrFramedBox(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c) -{ - isort(x1,x2); - isort(y1,y2); - if(wdt < 0) wdt = 0; - mouse_block(CURC,(x1 - wdt),(y1 - wdt),(x2 + wdt),(y2 + wdt)); - if(c->fbx_intcolor != GrNOCOLOR) { - GrFilledBox(x1,y1,x2,y2,c->fbx_intcolor); - } - while(--wdt >= 0) { - x1--; x2++; - y1--; y2++; - GrHLine(x1,x2,y1,c->fbx_topcolor); - GrVLine(x1,(y1 + 1),(y2 - 1),c->fbx_leftcolor); - GrVLine(x2,(y1 + 1),(y2 - 1),c->fbx_rightcolor); - GrHLine(x1,x2,y2,c->fbx_bottomcolor); - } - mouse_unblock(); -} - diff --git a/thirdparty/grx249/src/draw/framboxn.c b/thirdparty/grx249/src/draw/framboxn.c deleted file mode 100644 index 09a8974..0000000 --- a/thirdparty/grx249/src/draw/framboxn.c +++ /dev/null @@ -1,39 +0,0 @@ -/** - ** framboxn.c ---- framed (possibly shaded) box primitive (no clip) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrFramedBoxNC(int x1,int y1,int x2,int y2,int wdt,const GrFBoxColors *c) -{ - isort(x1,x2); - isort(y1,y2); - if(wdt < 0) wdt = 0; - if(c->fbx_intcolor != GrNOCOLOR) { - GrFilledBoxNC(x1,y1,x2,y2,c->fbx_intcolor); - } - while(--wdt >= 0) { - x1--; x2++; - y1--; y2++; - GrHLineNC(x1,x2,y1,c->fbx_topcolor); - GrVLineNC(x1,(y1 + 1),(y2 - 1),c->fbx_leftcolor); - GrVLineNC(x2,(y1 + 1),(y2 - 1),c->fbx_rightcolor); - GrHLineNC(x1,x2,y2,c->fbx_bottomcolor); - } -} - diff --git a/thirdparty/grx249/src/draw/getscl.c b/thirdparty/grx249/src/draw/getscl.c deleted file mode 100644 index f7d3165..0000000 --- a/thirdparty/grx249/src/draw/getscl.c +++ /dev/null @@ -1,51 +0,0 @@ -/** - ** getscl.c ---- get scanline pixels - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -const GrColor *GrGetScanlineC(GrContext *ctx,int x1,int x2,int yy) -/* Input ctx: source context, if NULL the current context is used */ -/* x1 : first x coordinate read */ -/* x2 : last x coordinate read */ -/* yy : y coordinate */ -/* Output NULL : error / no data (clipping occured) */ -/* else */ -/* p[0..w-1]: pixel values read */ -/* p[w] : GrNOCOLOR end marker */ -/* (w = |x2-y1|+1) */ -/* Output data is valid until next GRX call ! */ -{ - GrColor *res = NULL; - if (ctx == NULL) ctx = CURC; - /* don't accept any clipping .... */ - clip_hline_(ctx,x1,x2,yy,goto done,goto done); - mouse_block(ctx,x1,yy,x2,yy); - res = (*ctx->gc_driver->getindexedscanline)( - &ctx->gc_frame, - x1 + ctx->gc_xoffset, - yy + ctx->gc_yoffset, - x2 - x1 + 1, - NULL - ); - mouse_unblock(); -done: return res; -} - -const GrColor *(GrGetScanline)(int x1,int x2,int yy) { - return GrGetScanlineC(NULL, x1,x2,yy); -} diff --git a/thirdparty/grx249/src/draw/line.c b/thirdparty/grx249/src/draw/line.c deleted file mode 100644 index 8ccd318..0000000 --- a/thirdparty/grx249/src/draw/line.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** LINE.C ---- line drawing - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrLine(int x1,int y1,int x2,int y2,GrColor c) -{ - clip_line(CURC,x1,y1,x2,y2); - mouse_block(CURC,x1,y1,x2,y2); - (*FDRV->drawline)( - x1 + CURC->gc_xoffset, - y1 + CURC->gc_yoffset, - x2 - x1, - y2 - y1, - c - ); - mouse_unblock(); -} - diff --git a/thirdparty/grx249/src/draw/linenc.c b/thirdparty/grx249/src/draw/linenc.c deleted file mode 100644 index 42b3f09..0000000 --- a/thirdparty/grx249/src/draw/linenc.c +++ /dev/null @@ -1,32 +0,0 @@ -/** - ** linenc.c ---- line drawing (no clip) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrLineNC(int x1,int y1,int x2,int y2,GrColor c) -{ - (*FDRV->drawline)( - x1 + CURC->gc_xoffset, - y1 + CURC->gc_yoffset, - x2 - x1, - y2 - y1, - c - ); -} - diff --git a/thirdparty/grx249/src/draw/majorln1.c b/thirdparty/grx249/src/draw/majorln1.c deleted file mode 100644 index 2e225cb..0000000 --- a/thirdparty/grx249/src/draw/majorln1.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** majorln1.c ---- lines parallel with the X axis - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrHLine(int x1,int x2,int yy,GrColor c) -{ - clip_hline(CURC,x1,x2,yy); - mouse_block(CURC,x1,yy,x2,yy); - (*FDRV->drawhline)( - x1 + CURC->gc_xoffset, - yy + CURC->gc_yoffset, - x2 - x1 + 1, - c - ); - mouse_unblock(); -} diff --git a/thirdparty/grx249/src/draw/majorln2.c b/thirdparty/grx249/src/draw/majorln2.c deleted file mode 100644 index a520630..0000000 --- a/thirdparty/grx249/src/draw/majorln2.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** majorln2.c ---- lines parallel with the Y axis - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrVLine(int xx,int y1,int y2,GrColor c) -{ - clip_vline(CURC,xx,y1,y2); - mouse_block(CURC,xx,y1,xx,y2); - (*FDRV->drawvline)( - xx + CURC->gc_xoffset, - y1 + CURC->gc_yoffset, - y2 - y1 + 1, - c - ); - mouse_unblock(); -} diff --git a/thirdparty/grx249/src/draw/majorln3.c b/thirdparty/grx249/src/draw/majorln3.c deleted file mode 100644 index 51f696a..0000000 --- a/thirdparty/grx249/src/draw/majorln3.c +++ /dev/null @@ -1,31 +0,0 @@ -/** - ** majorln3.c---- lines parallel with the X axis (no clip) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrHLineNC(int x1,int x2,int yy,GrColor c) -{ - isort(x1,x2); - (*FDRV->drawhline)( - x1 + CURC->gc_xoffset, - yy + CURC->gc_yoffset, - x2 - x1 + 1, - c - ); -} diff --git a/thirdparty/grx249/src/draw/majorln4.c b/thirdparty/grx249/src/draw/majorln4.c deleted file mode 100644 index 4d64b30..0000000 --- a/thirdparty/grx249/src/draw/majorln4.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** majorln4.c ---- lines parallel with the Y axis (no clip) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrVLineNC(int xx,int y1,int y2,GrColor c) -{ - isort(y1,y2); - (*FDRV->drawvline)( - xx + CURC->gc_xoffset, - y1 + CURC->gc_yoffset, - y2 - y1 + 1, - c - ); -} - - diff --git a/thirdparty/grx249/src/draw/pixel.c b/thirdparty/grx249/src/draw/pixel.c deleted file mode 100644 index 624298f..0000000 --- a/thirdparty/grx249/src/draw/pixel.c +++ /dev/null @@ -1,34 +0,0 @@ -/** - ** PIXEL.C ---- pixel read routine - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -GrColor GrPixel(int x,int y) -{ - GrColor retval; - cxclip_dot_(CURC,x,y,return(GrNOCOLOR)); - mouse_block(CURC,x,y,x,y); - retval = (*FDRV->readpixel)( - &CURC->gc_frame, - x + CURC->gc_xoffset, - y + CURC->gc_yoffset - ); - mouse_unblock(); - return(retval); -} diff --git a/thirdparty/grx249/src/draw/pixelc.c b/thirdparty/grx249/src/draw/pixelc.c deleted file mode 100644 index 16459ec..0000000 --- a/thirdparty/grx249/src/draw/pixelc.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** pixelc.c ---- pixel read from context - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -GrColor GrPixelC(GrContext *c,int x,int y) -{ - GrColor retval; - cxclip_dot_(c,x,y,return(GrNOCOLOR)); - mouse_block(c,x,y,x,y); - retval = (*c->gc_driver->readpixel)( - &c->gc_frame, - x + c->gc_xoffset, - y + c->gc_yoffset - ); - mouse_unblock(); - return(retval); -} - diff --git a/thirdparty/grx249/src/draw/plot.c b/thirdparty/grx249/src/draw/plot.c deleted file mode 100644 index 0452dbd..0000000 --- a/thirdparty/grx249/src/draw/plot.c +++ /dev/null @@ -1,34 +0,0 @@ -/** - ** plot.c ---- pixel draw routines - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "arith.h" -#include "clipping.h" - -void GrPlot(int x,int y,GrColor c) -{ - clip_dot(CURC,x,y); - mouse_block(CURC,x,y,x,y); - (*FDRV->drawpixel)( - x + CURC->gc_xoffset, - y + CURC->gc_yoffset, - c - ); - mouse_unblock(); -} - diff --git a/thirdparty/grx249/src/draw/putscl.c b/thirdparty/grx249/src/draw/putscl.c deleted file mode 100644 index ae2f356..0000000 --- a/thirdparty/grx249/src/draw/putscl.c +++ /dev/null @@ -1,45 +0,0 @@ -/** - ** putscl.c ---- put scanline pixels - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrPutScanline(int x1,int x2,int yy,const GrColor *c, GrColor op) -/* Input x1 : first x coordinate to be set */ -/* x2 : last x coordinate to be set */ -/* yy : y coordinate */ -/* c : c[0..(|x2-x1|] hold the pixel data */ -/* op : Operation (GrWRITE/GrXOR/GrOR/GrAND/GrIMAGE) */ -/* */ -/* Note c[..] data must fit GrCVALUEMASK otherwise the results */ -/* are implementation dependend. */ -/* => You can't supply operation code with the pixel data! */ -{ - int xs; - isort(x1,x2); - xs = x1; - clip_hline(CURC,x1,x2,yy); - mouse_block(CURC,x1,yy,x2,yy); - (*FDRV->putscanline)( - x1 + CURC->gc_xoffset, - yy + CURC->gc_yoffset, - x2 - x1 + 1, - &c[x1-xs], /* adjust pixel pointer when clipped */ - op - ); - mouse_unblock(); -} diff --git a/thirdparty/grx249/src/fdrivers/banked32.h b/thirdparty/grx249/src/fdrivers/banked32.h deleted file mode 100644 index cc5d33b..0000000 --- a/thirdparty/grx249/src/fdrivers/banked32.h +++ /dev/null @@ -1,173 +0,0 @@ -/** - ** banked32.h ---- the 16M color padded SVGA banked frame buffer driver - ** standard routines for 32H and 32L support - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "mempeek.h" -#include "memfill.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),((x)<<2)) - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GR_int32u offs; - char far *pp; - GRX_ENTER(); - offs = FOFS(x,y,SCRN->gc_lineoffset); - CHKBANK(BANKNUM(offs)); - pp = &SCRN->gc_baseaddr[0][BANKPOS(offs)]; - setup_far_selector(SCRN->gc_selector); - GRX_RETURN(PIX2COL(peek_l_f(pp))); -} - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - GR_int32u offs; - char far *ptr; - int op; - GRX_ENTER(); - offs = FOFS(x,y,SCRN->gc_lineoffset); - CHKBANK(BANKNUM(offs)); - ptr = &SCRN->gc_baseaddr[0][BANKPOS(offs)]; - op = C_OPER(color); - color = COL2PIX(color); - setup_far_selector(CURC->gc_selector); - switch(op) { - case C_XOR: poke_l_f_xor(ptr,color); break; - case C_OR: poke_l_f_or( ptr,color); break; - case C_AND: poke_l_f_and(ptr,color); break; - default: poke_l_f( ptr,color); break; - } - GRX_LEAVE(); -} - -#ifdef freplicate_l -static void drawhline(int x,int y,int w,GrColor color) -{ - GR_int32u offs; - GR_repl cval; - int oper; - unsigned int w1, w2; - GRX_ENTER(); - offs = FOFS(x,y,SCRN->gc_lineoffset); - w2 = BANKLFT(offs) >> 2; - w2 = w - (w1 = umin(w,w2)); - oper = C_OPER(color); - color = COL2PIX(color); - cval = freplicate_l(color); - setup_far_selector(CURC->gc_selector); - do { - char far *pp = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - offs += (w1 << 2); - switch(oper) { - case C_XOR: repfill_l_f_xor(pp,cval,w1); break; - case C_OR: repfill_l_f_or( pp,cval,w1); break; - case C_AND: repfill_l_f_and(pp,cval,w1); break; - default: repfill_l_f( pp,cval,w1); break; - } - w1 = w2; - w2 = 0; - } while(w1 != 0); - GRX_LEAVE(); -} -#else -static -#include "fdrivers/generic/hline.c" -#endif - -static -#include "fdrivers/generic/vline.c" - -static -#include "fdrivers/generic/block.c" - -static -#include "fdrivers/generic/line.c" - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -static void bitblt(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltV2V( - dst,(dx << 2),dy, - src,(sx << 2),sy, - (w << 2),h, - op - ); - GRX_LEAVE(); -} - -#ifndef GRX_USE_RAM3x8 - -static void bltv2r(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltV2R( - dst,(dx << 2),dy, - src,(sx << 2),sy, - (w << 2),h, - op - ); - GRX_LEAVE(); -} - -static void bltr2v(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltR2V( - dst,(dx << 2),dy, - src,(sx << 2),sy, - (w << 2),h, - op - ); - GRX_LEAVE(); -} - -#endif /* !GRX_USE_RAM3x8 */ diff --git a/thirdparty/grx249/src/fdrivers/dotab8.c b/thirdparty/grx249/src/fdrivers/dotab8.c deleted file mode 100644 index 7e84742..0000000 --- a/thirdparty/grx249/src/fdrivers/dotab8.c +++ /dev/null @@ -1,26 +0,0 @@ -/** - ** dotab8.c ---- 256 color mode operation check table - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#include "libgrx.h" -#include "docolor.h" - -unsigned int _GrFDdotable8[] = { 0xffffU, 0, 0, 0xffU }; - diff --git a/thirdparty/grx249/src/fdrivers/driver16.h b/thirdparty/grx249/src/fdrivers/driver16.h deleted file mode 100644 index 57bd186..0000000 --- a/thirdparty/grx249/src/fdrivers/driver16.h +++ /dev/null @@ -1,360 +0,0 @@ -/** - ** driver16.h ---- the 32k/64k color padded SVGA linear frame buffer driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "mempeek.h" -#include "memfill.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),((x) << 1)) - -/* #define FAR_ACCESS for video access routines */ - -#ifdef FAR_ACCESS -# define peek16 peek_w_f -# define poke16_xor poke_w_f_xor -# define poke16_or poke_w_f_or -# define poke16_and poke_w_f_and -# define poke16 poke_w_f -# define colfill16_xor colfill_w_f_xor -# define colfill16_or colfill_w_f_or -# define colfill16_and colfill_w_f_and -# define colfill16 colfill_w_f -# define repfill16_xor repfill_w_f_xor -# define repfill16_or repfill_w_f_or -# define repfill16_and repfill_w_f_and -# define repfill16 repfill_w_f -# define SETFARSEL(sel) setup_far_selector(sel) -# if defined(__GNUC__) && defined(__i386__) -# define ASM_386_SEL I386_GCC_FAR_SELECTOR -# endif /* GCC i386 */ -#else /* defined FAR_ACCESS */ -# define peek16 peek_w -# define poke16_xor poke_w_xor -# define poke16_or poke_w_or -# define poke16_and poke_w_and -# define poke16 poke_w -# define colfill16_xor colfill_w_xor -# define colfill16_or colfill_w_or -# define colfill16_and colfill_w_and -# define colfill16 colfill_w -# define repfill16_xor repfill_w_xor -# define repfill16_or repfill_w_or -# define repfill16_and repfill_w_and -# define repfill16 repfill_w -# define SETFARSEL(sel) -#endif - -#ifndef ASM_386_SEL -# define ASM_386_SEL -#endif - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GR_int16u far *pp; - GRX_ENTER(); -#ifdef FAR_ACCESS - pp = (GR_int16u far *)&SCRN->gc_baseaddr[0][FOFS(x,y,SCRN->gc_lineoffset)]; - setup_far_selector(SCRN->gc_selector); -#else -/* problem with LFB_BY_NEAR_POINTER here? Does c always point to screen? */ - pp = (GR_int16u far *)&c->gf_baseaddr[0][FOFS(x,y,c->gf_lineoffset)]; -#endif -#if defined(MISALIGNED_16bit_OK) && !defined(FAR_ACCESS) - GRX_RETURN(*pp); -#else - GRX_RETURN((GR_int16u)peek16(pp)); -#endif -} - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - char far *ptr; - GRX_ENTER(); - ptr = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - SETFARSEL(CURC->gc_selector); - switch(C_OPER(color)) { - case C_XOR: poke16_xor(ptr,(GR_int16u)color); break; - case C_OR: poke16_or( ptr,(GR_int16u)color); break; - case C_AND: poke16_and(ptr,(GR_int16u)color); break; - default: poke16( ptr,(GR_int16u)color); break; - } - GRX_LEAVE(); -} - -static void drawhline(int x,int y,int w,GrColor color) -{ - char far *pp; - GR_repl cval; - GRX_ENTER(); - pp = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - cval = freplicate_w(color); - SETFARSEL(CURC->gc_selector); - switch(C_OPER(color)) { - case C_XOR: repfill16_xor(pp,cval,w); break; - case C_OR: repfill16_or( pp,cval,w); break; - case C_AND: repfill16_and(pp,cval,w); break; - default: repfill16( pp,cval,w); break; - } - GRX_LEAVE(); -} - -static void drawvline(int x,int y,int h,GrColor color) -{ - unsigned lwdt; - char far *pp; - GRX_ENTER(); - lwdt = CURC->gc_lineoffset; - pp = &CURC->gc_baseaddr[0][FOFS(x,y,lwdt)]; - SETFARSEL(CURC->gc_selector); - switch(C_OPER(color)) { - case C_XOR: colfill16_xor(pp,lwdt,(GR_int16u)color,h); break; - case C_OR: colfill16_or( pp,lwdt,(GR_int16u)color,h); break; - case C_AND: colfill16_and(pp,lwdt,(GR_int16u)color,h); break; - default: colfill16( pp,lwdt,(GR_int16u)color,h); break; - } - GRX_LEAVE(); -} - -static void drawblock(int x,int y,int w,int h,GrColor color) -{ - int skip; - char far *ptr; - GR_repl cval; - - GRX_ENTER(); - skip = CURC->gc_lineoffset; - ptr = &CURC->gc_baseaddr[0][FOFS(x,y,skip)]; - skip -= w<<1; - cval = freplicate_w(color); - SETFARSEL(CURC->gc_selector); - switch (C_OPER(color)) { - case C_XOR: while (h-- != 0) { - int ww = w; - repfill16_xor(ptr,cval,ww); - ptr += skip; - } - break; - case C_OR: while (h-- != 0) { - int ww = w; - repfill16_or(ptr,cval,ww); - ptr += skip; - } - break; - case C_AND: while (h-- != 0) { - int ww = w; - repfill16_and(ptr,cval,ww); - ptr += skip; - } - break; - default: while (h-- != 0) { - int ww = w; - repfill16(ptr,cval,ww); - ptr += skip; - } - break; - } - GRX_LEAVE(); -} - -#if defined(__GNUC__) && defined(__i386__) -static void drawline(int x,int y,int dx,int dy,GrColor color) -{ - struct { - int errsub; /* subtract from error term */ - int erradd; /* add to error term when carry */ - int offset1; /* add to pointer if no carry on error term */ - int offset2; /* add to pointer if carry / banking dir */ - } lndata; - int npts,error,xstep; - char far *ptr; - - GRX_ENTER(); - -# ifdef __GNUC__ -# ifdef __i386__ -# define ASM_LINE1(OPC) asm volatile("" \ - " .align 2,0x90 \n" \ - "0: "#OPC"w %6,"ASM_386_SEL"(%0) \n" \ - " subl %7,%2 \n" \ - " jb 1f \n" \ - " leal -2(%3),%3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 2f \n" \ - " .align 2,0x90 \n" \ - "1: addl 4 + %7,%2 \n" \ - " addl 12 + %7,%3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - "2: " \ - : "=r" (ptr), "=r" (npts), "=r" (error) \ - : "0" ((long)(ptr)), "1" (npts), "2" (error), \ - "r" ((short)(color)), "o" (lndata) \ - ) -# define ASM_LINE2(OPC) asm volatile("" \ - " .align 2,0x90 \n" \ - "0: "#OPC"w %6,"ASM_386_SEL"(%0) \n" \ - " subl %7,%2 \n" \ - " jb 1f \n" \ - " addl 8 + %7,%3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 2f \n" \ - " .align 2,0x90 \n" \ - "1: addl 4 + %7,%2 \n" \ - " addl 12 + %7,%3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - "2: " \ - : "=r" (ptr), "=r" (npts), "=r" (error) \ - : "0" ((long)(ptr)), "1" (npts), "2" (error), \ - "r" ((short)(color)), "o" (lndata) \ - ) -# endif -# endif - - if(dy < 0) { - y -= (dy = (-dy)); - x -= (dx = (-dx)); - } - if(dx < 0) { - xstep = (-2); - dx = (-dx); - } else - xstep = 2; - - ptr = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - SETFARSEL(CURC->gc_selector); - if(dx > dy) { - npts = dx + 1; - error = dx >> 1; - lndata.errsub = dy; - lndata.erradd = dx; - lndata.offset1 = xstep; - lndata.offset2 = CURC->gc_lineoffset + xstep; - if(xstep < 0) { - lndata.offset1 = 1; - switch(C_OPER(color)) { - case C_XOR: ASM_LINE1(xor); break; - case C_OR: ASM_LINE1(or); break; - case C_AND: ASM_LINE1(and); break; - default: ASM_LINE1(mov); break; - } - goto done; - } - } - else { - npts = dy + 1; - error = dy >> 1; - lndata.errsub = dx; - lndata.erradd = dy; - lndata.offset1 = CURC->gc_lineoffset; - lndata.offset2 = CURC->gc_lineoffset + xstep; - } - switch(C_OPER(color)) { - case C_XOR: ASM_LINE2(xor); break; - case C_OR: ASM_LINE2(or); break; - case C_AND: ASM_LINE2(and); break; - default: ASM_LINE2(mov); break; - } - done: - GRX_LEAVE(); -} -#else -static -#include "fdrivers/generic/line.c" -#endif - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -static void bitblt(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else -#ifdef FAR_ACCESS - _GrFrDrvPackedBitBltV2V_LFB( -#else - _GrFrDrvPackedBitBltR2R( -#endif - dst,(dx << 1),dy, - src,(sx << 1),sy, - (w << 1),h, - op - ); - GRX_LEAVE(); -} - -#ifdef FAR_ACCESS -static void bltv2r(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltV2R_LFB( - dst,(dx << 1),dy, - src,(sx << 1),sy, - (w << 1),h, - op - ); - GRX_LEAVE(); -} - -static void bltr2v(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltR2V_LFB( - dst,(dx << 1),dy, - src,(sx << 1),sy, - (w << 1),h, - op - ); - GRX_LEAVE(); -} -#endif - diff --git a/thirdparty/grx249/src/fdrivers/driver24.h b/thirdparty/grx249/src/fdrivers/driver24.h deleted file mode 100644 index 3111dbf..0000000 --- a/thirdparty/grx249/src/fdrivers/driver24.h +++ /dev/null @@ -1,220 +0,0 @@ -/** - ** driver24.h ---- the 24bpp color padded SVGA linear frame buffer driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "mempeek.h" -#include "memfill.h" -#include "access24.h" - -/* frame offset address calculation */ -#define MULT3(x) ( (x)+(x)+(x) ) -#define FOFS(x,y,lo) umuladd32((y),(lo),MULT3(x)) - -/* #define FAR_ACCESS for video access routines */ - -#ifdef FAR_ACCESS -# define peek24(p) peek_24_f((p)) -# define poke24_xor poke_24_f_xor -# define poke24_or poke_24_f_or -# define poke24_and poke_24_f_and -# define poke24_set poke_24_f -# define repfill8_xor repfill_b_f_xor -# define repfill8_or repfill_b_f_or -# define repfill8_and repfill_b_f_and -# define repfill8_set repfill_b_f -# define repfill24_xor repfill_24_f_xor -# define repfill24_or repfill_24_f_or -# define repfill24_and repfill_24_f_and -# define repfill24_set repfill_24_f_set -# define SETFARSEL(sel) setup_far_selector(sel) -#else /* defined FAR_ACCESS */ -# define peek24(p) peek_24((p)) -# define poke24_xor poke_24_xor -# define poke24_or poke_24_or -# define poke24_and poke_24_and -# define poke24_set poke_24 -# define repfill8_xor repfill_b_xor -# define repfill8_or repfill_b_or -# define repfill8_and repfill_b_and -# define repfill8_set repfill_b -# define repfill24_xor repfill_24_xor -# define repfill24_or repfill_24_or -# define repfill24_and repfill_24_and -# define repfill24_set repfill_24_set -# define SETFARSEL(sel) -#endif - - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GrColor col; - char far *p; - GRX_ENTER(); -#ifdef FAR_ACCESS - p = &SCRN->gc_baseaddr[0][FOFS(x,y,SCRN->gc_lineoffset)]; - setup_far_selector(SCRN->gc_selector); -#else - p = &c->gf_baseaddr[0][FOFS(x,y,c->gf_lineoffset)]; -#endif - col = peek24(p); - GRX_RETURN(col); -} - - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - char far *p; - GRX_ENTER(); - p = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - SETFARSEL(CURC->gc_selector); - switch(C_OPER(color)) { - case C_XOR: poke24_xor(p,color); break; - case C_OR: poke24_or( p,color); break; - case C_AND: poke24_and(p,color); break; - default: poke24_set(p,color); break; - } - GRX_LEAVE(); -} - - -static void drawhline(int x,int y,int w,GrColor color) -{ - char far *p; - GRX_ENTER(); - p = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - - w = MULT3(w); - SETFARSEL(CURC->gc_selector); -# ifndef GRX_HAVE_FAST_REPFILL24 - { - GR_int8u c0; - c0 = RD24BYTE(color,0); - if (c0 == RD24BYTE(color,1) && c0 == RD24BYTE(color,2) ) { - GR_repl cval = freplicate_b(c0); - switch(C_OPER(color)) { - case C_XOR: repfill8_xor(p,cval,w); break; - case C_OR: repfill8_or( p,cval,w); break; - case C_AND: repfill8_and(p,cval,w); break; - default: repfill8_set(p,cval,w); break; - } - goto done; - } - } -# endif - switch (C_OPER(color)) { - case C_XOR: repfill24_xor(p,color,w); break; - case C_OR: repfill24_or( p,color,w); break; - case C_AND: repfill24_and(p,color,w); break; - default: repfill24_set(p,color,w); break; - } -#ifndef GRX_HAVE_FAST_REPFILL24 - done: -#endif - GRX_LEAVE(); -} - - - -static -#include "fdrivers/generic/vline.c" - -static -#include "fdrivers/generic/line.c" - -static -#include "fdrivers/generic/block.c" - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -static void bitblt(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else -#ifdef FAR_ACCESS - _GrFrDrvPackedBitBltV2V_LFB( -#else - _GrFrDrvPackedBitBltR2R( -#endif - dst,MULT3(dx),dy, - src,MULT3(sx),sy, - MULT3(w),h, - op - ); - GRX_LEAVE(); -} - -#ifdef FAR_ACCESS - -static void bltv2r(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltV2R_LFB( - dst,MULT3(dx),dy, - src,MULT3(sx),sy, - MULT3(w),h, - op - ); - GRX_LEAVE(); -} - -static void bltr2v(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltR2V_LFB( - dst,MULT3(dx),dy, - src,MULT3(sx),sy, - MULT3(w),h, - op - ); - GRX_LEAVE(); -} -#endif /* FAR_ACCESS */ diff --git a/thirdparty/grx249/src/fdrivers/driver32.h b/thirdparty/grx249/src/fdrivers/driver32.h deleted file mode 100644 index a8ea52c..0000000 --- a/thirdparty/grx249/src/fdrivers/driver32.h +++ /dev/null @@ -1,395 +0,0 @@ -/** - ** driver32.h ---- the 16M color padded SVGA linear frame buffer driver - ** standard routines for 32H and 32L support - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "mempeek.h" -#include "memfill.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),((x)<<2)) - -/* #define FAR_ACCESS for video access routines */ - -#ifdef FAR_ACCESS -# define peek32 peek_l_f -# define poke32_xor poke_l_f_xor -# define poke32_or poke_l_f_or -# define poke32_and poke_l_f_and -# define poke32 poke_l_f -# ifdef colfill_l_f -# define colfill32_xor colfill_l_f_xor -# define colfill32_or colfill_l_f_or -# define colfill32_and colfill_l_f_and -# define colfill32 colfill_l_f -# endif /* defined colfill_l */ -# ifdef repfill_l_f -# define repfill32_xor repfill_l_f_xor -# define repfill32_or repfill_l_f_or -# define repfill32_and repfill_l_f_and -# define repfill32 repfill_l_f -# endif /* defined repfill_l */ -# define SETFARSEL(sel) setup_far_selector(sel) -# if defined(__GNUC__) && defined(__i386__) -# define ASM_386_SEL I386_GCC_FAR_SELECTOR -# endif /* GCC i386 */ -#else /* defined FAR_ACCESS */ -# define peek32 peek_l -# define poke32_xor poke_l_xor -# define poke32_or poke_l_or -# define poke32_and poke_l_and -# define poke32 poke_l -# ifdef colfill_l -# define colfill32_xor colfill_l_xor -# define colfill32_or colfill_l_or -# define colfill32_and colfill_l_and -# define colfill32 colfill_l -# endif /* defined colfill_l */ -# ifdef repfill_l -# define repfill32_xor repfill_l_xor -# define repfill32_or repfill_l_or -# define repfill32_and repfill_l_and -# define repfill32 repfill_l -# endif /* defined repfill_l */ -# define SETFARSEL(sel) -#endif - -#ifndef ASM_386_SEL -# define ASM_386_SEL -#endif - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - char far *pp; - GRX_ENTER(); -#ifdef FAR_ACCESS - pp = &SCRN->gc_baseaddr[0][FOFS(x,y,SCRN->gc_lineoffset)]; - SETFARSEL(SCRN->gc_selector); -#else -/* problem with LFB_BY_NEAR_POINTER here? Does c always point to screen? */ - pp = &c->gf_baseaddr[0][FOFS(x,y,c->gf_lineoffset)]; -#endif - GRX_RETURN(PIX2COL(peek32(pp))); -} - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - char far *ptr; - int op; - GRX_ENTER(); - ptr = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - op = C_OPER(color); - color= COL2PIX(color); - SETFARSEL(CURC->gc_selector); - switch(op) { - case C_XOR: poke32_xor(ptr,color); break; - case C_OR: poke32_or( ptr,color); break; - case C_AND: poke32_and(ptr,color); break; - default: poke32( ptr,color); break; - } - GRX_LEAVE(); -} - -#ifdef colfill32 -static void drawvline(int x,int y,int h,GrColor color) -{ - unsigned lwdt; - char far *pp; - int op; - - GRX_ENTER(); - lwdt = CURC->gc_lineoffset; - pp = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - op = C_OPER(color); - color= COL2PIX(color); - SETFARSEL(CURC->gc_selector); - switch(op) { - case C_XOR: colfill32_xor(pp,lwdt,color,h); break; - case C_OR: colfill32_or( pp,lwdt,color,h); break; - case C_AND: colfill32_and(pp,lwdt,color,h); break; - default: colfill32( pp,lwdt,color,h); break; - } - GRX_LEAVE(); -} -#else -static -#include "fdrivers/generic/vline.c" -#endif - -#ifdef repfill32 -static void drawhline(int x,int y,int w,GrColor color) -{ - int op; - char far *pp; - GR_repl cval; - - GRX_ENTER(); - pp = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - op = C_OPER(color); - color= COL2PIX(color); - cval = freplicate_l(color); - SETFARSEL(CURC->gc_selector); - switch(op) { - case C_XOR: repfill32_xor(pp,cval,w); break; - case C_OR: repfill32_or( pp,cval,w); break; - case C_AND: repfill32_and(pp,cval,w); break; - default: repfill32( pp,cval,w); break; - } - GRX_LEAVE(); -} - -static void drawblock(int x,int y,int w,int h,GrColor color) -{ - unsigned skip; - int op; - char far *pp; - GR_repl cval; - - GRX_ENTER(); - skip = CURC->gc_lineoffset; - pp = &CURC->gc_baseaddr[0][FOFS(x,y,skip)]; - skip -= w<<2; - op = C_OPER(color); - color = COL2PIX(color); - cval = freplicate_l(color); - SETFARSEL(CURC->gc_selector); - switch(op) { - case C_XOR: do { int ww = w; - repfill32_xor(pp,cval,ww); - pp += skip; - } while(--h != 0); - break; - case C_OR: do { int ww = w; - repfill32_or(pp,cval,ww); - pp += skip; - } while(--h != 0); - break; - case C_AND: do { int ww = w; - repfill32_and(pp,cval,ww); - pp += skip; - } while(--h != 0); - break; - default: do { int ww = w; - repfill32(pp,cval,ww); - pp += skip; - } while(--h != 0); - break; - } - GRX_LEAVE(); -} -#else -static -#include "fdrivers/generic/hline.c" - -static -#include "fdrivers/generic/block.c" -#endif - - -#if defined(__GNUC__) && defined(__i386__) -static void drawline(int x,int y,int dx,int dy,GrColor color) -{ - struct { - int errsub; /* subtract from error term */ - int erradd; /* add to error term when carry */ - int offset1; /* add to pointer if no carry on error term */ - int offset2; /* add to pointer if carry / banking dir */ - } lndata; - int op,npts,error,xstep; - char far *ptr; - - GRX_ENTER(); - op = C_OPER(color); - color = COL2PIX(color); - -# ifdef __GNUC__ -# ifdef __i386__ -# define ASM_LINE1(OPC) asm volatile("" \ - " .align 2,0x90 \n" \ - "0: "#OPC"l %6,"ASM_386_SEL"(%0) \n" \ - " subl %7,%2 \n" \ - " jb 1f \n" \ - " leal -4(%3),%3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 2f \n" \ - " .align 2,0x90 \n" \ - "1: addl 4 + %7,%2 \n" \ - " addl 12 + %7,%3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - "2: " \ - : "=r" (ptr), "=r" (npts), "=r" (error) \ - : "0" ((long)(ptr)), "1" (npts), "2" (error), \ - "r" ((long)(color)), "o" (lndata) \ - ) -# define ASM_LINE2(OPC) asm volatile("" \ - " .align 2,0x90 \n" \ - "0: "#OPC"l %6,"ASM_386_SEL"(%0) \n" \ - " subl %7,%2 \n" \ - " jb 1f \n" \ - " addl 8 + %7,%3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 2f \n" \ - " .align 2,0x90 \n" \ - "1: addl 4 + %7,%2 \n" \ - " addl 12 + %7,%3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - "2: " \ - : "=r" (ptr), "=r" (npts), "=r" (error) \ - : "0" ((long)(ptr)), "1" (npts), "2" (error), \ - "r" ((long)(color)), "o" (lndata) \ - ) -# endif -# endif - - if(dy < 0) { - y -= (dy = (-dy)); - x -= (dx = (-dx)); - } - if(dx < 0) { - xstep = (-4); - dx = (-dx); - } else - xstep = 4; - - ptr = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - SETFARSEL(CURC->gc_selector); - if(dx > dy) { - npts = dx + 1; - error = dx >> 1; - lndata.errsub = dy; - lndata.erradd = dx; - lndata.offset1 = xstep; - lndata.offset2 = CURC->gc_lineoffset + xstep; - if(xstep < 0) { - lndata.offset1 = 1; - switch(op) { - case C_XOR: ASM_LINE1(xor); break; - case C_OR: ASM_LINE1(or); break; - case C_AND: ASM_LINE1(and); break; - default: ASM_LINE1(mov); break; - } - goto done; - } - } - else { - npts = dy + 1; - error = dy >> 1; - lndata.errsub = dx; - lndata.erradd = dy; - lndata.offset1 = CURC->gc_lineoffset; - lndata.offset2 = CURC->gc_lineoffset + xstep; - } - switch(op) { - case C_XOR: ASM_LINE2(xor); break; - case C_OR: ASM_LINE2(or); break; - case C_AND: ASM_LINE2(and); break; - default: ASM_LINE2(mov); break; - } -done: GRX_LEAVE(); -} -#else -static -#include "fdrivers/generic/line.c" -#endif - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -static void bitblt(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else -#ifdef FAR_ACCESS - _GrFrDrvPackedBitBltV2V_LFB( -#else - _GrFrDrvPackedBitBltR2R( -#endif - dst,(dx << 2),dy, - src,(sx << 2),sy, - (w << 2),h, - op - ); - GRX_LEAVE(); -} - -#ifdef FAR_ACCESS - -static void bltv2r(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltV2R_LFB( - dst,(dx << 2),dy, - src,(sx << 2),sy, - (w << 2),h, - op - ); - GRX_LEAVE(); -} - -static void bltr2v(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltR2V_LFB( - dst,(dx << 2),dy, - src,(sx << 2),sy, - (w << 2),h, - op - ); - GRX_LEAVE(); -} -#endif /* FAR_ACCESS */ - diff --git a/thirdparty/grx249/src/fdrivers/driver8.h b/thirdparty/grx249/src/fdrivers/driver8.h deleted file mode 100644 index 5ead39d..0000000 --- a/thirdparty/grx249/src/fdrivers/driver8.h +++ /dev/null @@ -1,410 +0,0 @@ -/** - ** driver8.h ---- the 256 color padded SVGA linear frame buffer driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "allocate.h" -#include "arith.h" -#include "docolor.h" -#include "mempeek.h" -#include "memfill.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),(x)) - -/* #define FAR_ACCESS for video access routines */ - -#ifdef FAR_ACCESS -# define peek8 peek_b_f -# define poke8_xor poke_b_f_xor -# define poke8_or poke_b_f_or -# define poke8_and poke_b_f_and -# define poke8 poke_b_f -# define colfill8_xor colfill_b_f_xor -# define colfill8_or colfill_b_f_or -# define colfill8_and colfill_b_f_and -# define colfill8 colfill_b_f -# define repfill8_xor repfill_b_f_xor -# define repfill8_or repfill_b_f_or -# define repfill8_and repfill_b_f_and -# define repfill8 repfill_b_f -# define SETFARSEL(sel) setup_far_selector(sel) -# if defined(__GNUC__) && defined(__i386__) -# define ASM_386_SEL I386_GCC_FAR_SELECTOR -# endif /* GCC i386 */ -#else /* defined FAR_ACCESS */ -# define peek8 peek_b -# define poke8_xor poke_b_xor -# define poke8_or poke_b_or -# define poke8_and poke_b_and -# define poke8 poke_b -# define colfill8_xor colfill_b_xor -# define colfill8_or colfill_b_or -# define colfill8_and colfill_b_and -# define colfill8 colfill_b -# define repfill8_xor repfill_b_xor -# define repfill8_or repfill_b_or -# define repfill8_and repfill_b_and -# define repfill8 repfill_b -# define SETFARSEL(sel) -#endif - -#ifndef ASM_386_SEL -# define ASM_386_SEL -#endif - - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GR_int8u far *pp; - GRX_ENTER(); -#ifdef FAR_ACCESS - pp = (GR_int8u far *)&SCRN->gc_baseaddr[0][FOFS(x,y,SCRN->gc_lineoffset)]; - SETFARSEL(SCRN->gc_selector); - GRX_RETURN((GR_int8u)peek8(pp)); -#else -/* problem with LFB_BY_NEAR_POINTER here? Does c always point to screen? */ - pp = (GR_int8u far *)&c->gf_baseaddr[0][FOFS(x,y,c->gf_lineoffset)]; - GRX_RETURN(*pp); -#endif -} - -/* -------------------------------------------------------------------- */ - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - char far *pp; - GRX_ENTER(); - pp = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - SETFARSEL(CURC->gc_selector); - switch(C_OPER(color)) { - case C_XOR: poke8_xor(pp,(GR_int8u)color); break; - case C_OR: poke8_or( pp,(GR_int8u)color); break; - case C_AND: poke8_and(pp,(GR_int8u)color); break; - default: poke8( pp,(GR_int8u)color); break; - } - GRX_LEAVE(); -} - -/* -------------------------------------------------------------------- */ - -static void drawvline(int x,int y,int h,GrColor color) -{ - int copr; - GRX_ENTER(); - copr = C_OPER(color); - if(DOCOLOR8(color,copr)) { - unsigned lwdt = CURC->gc_lineoffset; - char far *pp = &CURC->gc_baseaddr[0][FOFS(x,y,lwdt)]; - SETFARSEL(CURC->gc_selector); - switch(copr) { - case C_XOR: colfill8_xor(pp,lwdt,(GR_int8u)color,h); break; - case C_OR: colfill8_or( pp,lwdt,(GR_int8u)color,h); break; - case C_AND: colfill8_and(pp,lwdt,(GR_int8u)color,h); break; - default: colfill8( pp,lwdt,(GR_int8u)color,h); break; - } - } - GRX_LEAVE(); -} - -/* -------------------------------------------------------------------- */ - -static void drawhline(int x,int y,int w,GrColor color) -{ - int copr; - GRX_ENTER(); - copr = C_OPER(color); - if(DOCOLOR8(color,copr)) { - GR_repl cval = freplicate_b(color); - char far *pp = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - SETFARSEL(CURC->gc_selector); - switch(copr) { - case C_XOR: repfill8_xor(pp,cval,w); break; - case C_OR: repfill8_or( pp,cval,w); break; - case C_AND: repfill8_and(pp,cval,w); break; - default: repfill8( pp,cval,w); break; - } - } - GRX_LEAVE(); -} - -/* -------------------------------------------------------------------- */ - -static void drawblock(int x,int y,int w,int h,GrColor color) -{ - int copr; - GRX_ENTER(); - copr = C_OPER(color); - if(DOCOLOR8(color,copr)) { - GR_repl cval = freplicate_b(color); - unsigned int skip = CURC->gc_lineoffset; - char far *pp = &CURC->gc_baseaddr[0][FOFS(x,y,skip)]; - skip -= w; - SETFARSEL(CURC->gc_selector); - switch(copr) { - case C_XOR: do { int ww = w; - repfill8_xor(pp,cval,ww); - pp += skip; - } while(--h != 0); - break; - case C_OR: do { int ww = w; - repfill8_or(pp,cval,ww); - pp += skip; - } while(--h != 0); - break; - case C_AND: do { int ww = w; - repfill8_and(pp,cval,ww); - pp += skip; - } while(--h != 0); - break; - default: do { int ww = w; - repfill8(pp,cval,ww); - pp += skip; - } while(--h != 0); - break; - } - } - GRX_LEAVE(); -} - -/* -------------------------------------------------------------------- */ - -#if defined(__GNUC__) && defined(__i386__) -static void drawline(int x,int y,int dx,int dy,GrColor color) -{ - struct { - int errsub; - int erradd; - int offset1; - int offset2; - } lndata; - int copr,xstep,npts,error; - char far *ptr; - - GRX_ENTER(); - copr = C_OPER(color); - if(!DOCOLOR8(color,copr)) goto done; - -# ifdef __GNUC__ -# ifdef __i386__ -# define ASM_LINE1(OPC) asm volatile("" \ - " .align 2,0x90 \n" \ - "0: "#OPC"b %6,"ASM_386_SEL"(%0) \n" \ - " subl %7,%2 \n" \ - " jb 1f \n" \ - " decl %3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 2f \n" \ - " .align 2,0x90 \n" \ - "1: addl 4 + %7,%2 \n" \ - " addl 12 + %7,%3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - "2: " \ - : "=r" (ptr), "=r" (npts), "=r" (error) \ - : "0" ((long)(ptr)), "1" (npts), "2" (error), \ - "q" ((char)(color)), "o" (lndata) \ - ) -# define ASM_LINE2(OPC) asm volatile("" \ - " .align 2,0x90 \n" \ - "0: "#OPC"b %6,"ASM_386_SEL"(%0) \n" \ - " subl %7,%2 \n" \ - " jb 1f \n" \ - " addl 8 + %7,%3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 2f \n" \ - " .align 2,0x90 \n" \ - "1: addl 4 + %7,%2 \n" \ - " addl 12 + %7,%3 \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - "2: " \ - : "=r" (ptr), "=r" (npts), "=r" (error) \ - : "0" ((long)(ptr)), "1" (npts), "2" (error), \ - "q" ((char)(color)), "o" (lndata) \ - ) -# endif -# endif - - if(dy < 0) { - y -= (dy = (-dy)); - x -= (dx = (-dx)); - } - if(dx < 0) { - xstep = (-1); - dx = (-dx); - } else - xstep = 1; - - ptr = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - SETFARSEL(CURC->gc_selector); - if(dx > dy) { - npts = dx + 1; - error = dx >> 1; - lndata.errsub = dy; - lndata.erradd = dx; - lndata.offset1 = xstep; - lndata.offset2 = CURC->gc_lineoffset + xstep; - if(xstep < 0) { - again_nonlinear: - lndata.offset1 = 1; - switch(copr) { - case C_XOR: ASM_LINE1(xor); break; - case C_OR: ASM_LINE1(or); break; - case C_AND: ASM_LINE1(and); break; - default: ASM_LINE1(mov); break; - } - if(npts == 0) goto done; - goto again_nonlinear; - } - } - else { - npts = dy + 1; - error = dy >> 1; - lndata.errsub = dx; - lndata.erradd = dy; - lndata.offset1 = CURC->gc_lineoffset; - lndata.offset2 = CURC->gc_lineoffset + xstep; - } - again_linear: - switch(copr) { - case C_XOR: ASM_LINE2(xor); break; - case C_OR: ASM_LINE2(or); break; - case C_AND: ASM_LINE2(and); break; - default: ASM_LINE2(mov); break; - } - if(npts == 0) goto done; - goto again_linear; - done: - GRX_LEAVE(); -} -#else -static -#include "fdrivers/generic/line.c" -#endif - -/* -------------------------------------------------------------------- */ - -static void drawbitmap(int x,int y,int w,int h, - char far *bmp,int pitch,int start,GrColor fg,GrColor bg) -{ - int fgop, bgop; - int dofg, dobg; - GRX_ENTER(); - fgop = C_OPER(fg); - bgop = C_OPER(bg); - dofg = DOCOLOR8(fg,fgop); - dobg = DOCOLOR8(bg,bgop); - if(dofg | dobg) { - long offs = FOFS(x,y,CURC->gc_lineoffset); - int once = dofg && dobg && (fgop == bgop); - int skip = CURC->gc_lineoffset; - bmp += start >> 3; - start &= 7; - SETFARSEL(CURC->gc_selector); - do { - GR_int8u far *bp = (GR_int8u far *)bmp; - GR_int8u bits = *bp; - GR_int8u mask = 0x80 >> start; - GR_int32u w1 = w; - char far *pp = &CURC->gc_baseaddr[0][offs]; -# define DOBOTH(POKEOP) do { \ - POKEOP(pp,((bits&mask)?(GR_int8u)fg:(GR_int8u)bg)); \ - if((mask >>= 1) == 0) bits = *++bp,mask = 0x80; \ - pp++; \ - } while(--w1 != 0) -# define DOFGC(POKEOP) do { \ - if((mask & bits) != 0) POKEOP(pp,(GR_int8u)fg); \ - if((mask >>= 1) == 0) bits = *++bp,mask = 0x80; \ - pp++; \ - } while(--w1 != 0) -# define DOBGC(POKEOP) do { \ - if((mask & bits) == 0) POKEOP(pp,(GR_int8u)bg); \ - if((mask >>= 1) == 0) bits = *++bp,mask = 0x80; \ - pp++; \ - } while(--w1 != 0) - if(once) switch(fgop) { - case C_XOR: DOBOTH(poke8_xor); break; - case C_OR: DOBOTH(poke8_or); break; - case C_AND: DOBOTH(poke8_and); break; - default: DOBOTH(poke8); break; - } - else { - char far *ppsave = pp; - GR_int32u w1save = w1; - if(dofg) switch(fgop) { - case C_XOR: DOFGC(poke8_xor); break; - case C_OR: DOFGC(poke8_or); break; - case C_AND: DOFGC(poke8_and); break; - default: DOFGC(poke8); break; - } - if(dobg) { - pp = ppsave; - w1 = w1save; - bp = (GR_int8u far *)bmp; - bits = *bp; - mask = 0x80 >> start; - switch(bgop) { - case C_XOR: DOBGC(poke8_xor); break; - case C_OR: DOBGC(poke8_or); break; - case C_AND: DOBGC(poke8_and); break; - default: DOBGC(poke8); break; - } - } - } - offs += skip; - bmp += pitch; - } while(--h != 0); - } - GRX_LEAVE(); -} - -/* -------------------------------------------------------------------- */ - -static -#include "fdrivers/generic/pattern.c" - -/* -------------------------------------------------------------------- */ - -#ifdef FAR_ACCESS -#define bitblit _GrFrDrvPackedBitBltV2V_LFB -#define bltr2v _GrFrDrvPackedBitBltR2V_LFB -#define bltv2r _GrFrDrvPackedBitBltV2R_LFB -#else -#define bitblit _GrFrDrvPackedBitBltR2R -#endif - -/* -------------------------------------------------------------------- */ - -static -#include "fdrivers/generic/getiscl.c" - -/* -------------------------------------------------------------------- */ - -static -#include "fdrivers/generic/putscl.c" - -/* -------------------------------------------------------------------- */ diff --git a/thirdparty/grx249/src/fdrivers/ega4.c b/thirdparty/grx249/src/fdrivers/ega4.c deleted file mode 100644 index ccebcfd..0000000 --- a/thirdparty/grx249/src/fdrivers/ega4.c +++ /dev/null @@ -1,136 +0,0 @@ -/** - ** ega4.c ---- the 16 color EGA frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "mempeek.h" -#include "memcopy.h" -#include "memfill.h" -#include "vgaregs.h" -#include "ioport.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),((x) >> 3)) - -static GrColor lastcolor; -static int writeops[] = { - (VGA_FUNC_SET << 8) + VGA_ROT_FN_SEL_REG, /* C_SET */ - (VGA_FUNC_XOR << 8) + VGA_ROT_FN_SEL_REG, /* C_XOR */ - (VGA_FUNC_OR << 8) + VGA_ROT_FN_SEL_REG, /* C_OR */ - (VGA_FUNC_AND << 8) + VGA_ROT_FN_SEL_REG /* C_AND */ -}; - -static int init(GrVideoMode *mp) -{ - GRX_ENTER(); - /* set write mode 0 */ - outport_w(VGA_GR_CTRL_PORT,((0 << 8) | VGA_MODE_REG)); - /* don't care register to 0 */ - outport_w(VGA_GR_CTRL_PORT,((0 << 8) | VGA_COLOR_DONTC_REG)); - /* enable all 4 planes for writing */ - outport_w(VGA_SEQUENCER_PORT,((0x0f << 8) | VGA_WRT_PLANE_ENB_REG)); - /* enable all 4 planes for set/reset */ - outport_w(VGA_GR_CTRL_PORT,((0x0f << 8) | VGA_SET_RESET_ENB_REG)); - lastcolor = (-1L); - GRX_RETURN(TRUE); -} - - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - char far *ptr; - unsigned mask, pixval; - GRX_ENTER(); - ptr = &SCRN->gc_baseaddr[0][FOFS(x,y,SCRN->gc_lineoffset)]; - mask= 0x80U >> (x &= 7); - setup_far_selector(SCRN->gc_selector); - outport_w(VGA_GR_CTRL_PORT,((3 << 8) | VGA_RD_PLANE_SEL_REG)); - pixval = (peek_b_f(ptr) & mask); - outport_b(VGA_GR_CTRL_DATA,2); - pixval = (peek_b_f(ptr) & mask) | (pixval << 1); - outport_b(VGA_GR_CTRL_DATA,1); - pixval = (peek_b_f(ptr) & mask) | (pixval << 1); - outport_b(VGA_GR_CTRL_DATA,0); - pixval = (peek_b_f(ptr) & mask) | (pixval << 1); - lastcolor = (-1L); - GRX_RETURN((GrColor)(pixval >> (7 - x))); -} - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - char far *ptr; - GRX_ENTER(); - ptr = &CURC->gc_baseaddr[0][FOFS(x,y,SCRN->gc_lineoffset)]; - setup_far_selector(CURC->gc_selector); - if(lastcolor != color) { - outport_w(VGA_GR_CTRL_PORT,writeops[C_OPER(color) & 3]); - outport_w(VGA_GR_CTRL_PORT,((((int)color & 0x0f) << 8) | VGA_SET_RESET_REG)); - lastcolor = color; - } - outport_w(VGA_GR_CTRL_PORT,((0x8000U >> (x & 7)) | VGA_BIT_MASK_REG)); - poke_b_f_or(ptr,0); - GRX_LEAVE(); -} - -static -#include "fdrivers/generic/hline.c" - -static -#include "fdrivers/generic/vline.c" - -static -#include "fdrivers/generic/block.c" - -static -#include "fdrivers/generic/line.c" - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -static -#include "fdrivers/generic/bitblt.c" - -GrFrameDriver _GrFrameDriverEGA4 = { - GR_frameEGA4, /* frame mode */ - GR_frameRAM4, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* scan line width alignment */ - 4, /* number of planes */ - 4, /* bits per pixel */ - 64*1024L, /* max plane size the code can handle */ - init, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - _GrFrDrvGenericBitBlt, - _GrFrDrvGenericBitBlt, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; diff --git a/thirdparty/grx249/src/fdrivers/egavga1.c b/thirdparty/grx249/src/fdrivers/egavga1.c deleted file mode 100644 index 62535ee..0000000 --- a/thirdparty/grx249/src/fdrivers/egavga1.c +++ /dev/null @@ -1,462 +0,0 @@ -/** - ** egavga1.c ---- the mono EGA/VGA frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "allocate.h" -#include "arith.h" -#include "mempeek.h" -#include "memcopy.h" -#include "memfill.h" -#include "vgaregs.h" -#include "ioport.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),((x) >> 3)) - -void GrSetEGAVGAmonoDrawnPlane(int plane) -{ - GRX_ENTER(); - plane &= 3; - outport_w(VGA_SEQUENCER_PORT,((0x100 << plane) | VGA_WRT_PLANE_ENB_REG)); - outport_w(VGA_GR_CTRL_PORT,((plane << 8) | VGA_RD_PLANE_SEL_REG)); - GRX_LEAVE(); -} - -void GrSetEGAVGAmonoShownPlane(int plane) -{ - void (*DACload)(int c,int r,int g,int b); - int i; - GRX_ENTER(); - DACload = DRVINFO->actmode.extinfo->loadcolor; - plane &= 3; - if(DACload) for(i = 0; i < 16; i++) { - int v = (i & (1 << plane)) ? 255 : 0; - (*DACload)(i,v,v,v); - } - GRX_LEAVE(); -} - -static size_t LineBytes = 0; -static char far *LineBuff = NULL; - -static int alloc_blit_buffer(void) { - GRX_ENTER(); - LineBuff = _GrTempBufferAlloc(LineBytes); - GRX_RETURN(LineBuff != NULL); -} - -static int init(GrVideoMode *mp) -{ - GRX_ENTER(); - - /* set write mode 0 */ - outport_w(VGA_GR_CTRL_PORT,((0 << 8) | VGA_MODE_REG)); - /* don't care register to 0 */ - outport_w(VGA_GR_CTRL_PORT,((0 << 8) | VGA_COLOR_DONTC_REG)); - /* disable all planes for set/reset */ - outport_w(VGA_GR_CTRL_PORT,((0 << 8) | VGA_SET_RESET_ENB_REG)); - GrSetEGAVGAmonoShownPlane(0); - GrSetEGAVGAmonoDrawnPlane(0); - - /* set up LineBuff max. line length for blits */ - LineBytes = sizeof(char) * (((mp->width+7) >> 3)+2); - - GRX_RETURN(TRUE); -} - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - char far *ptr; - GRX_ENTER(); - ptr = &SCRN->gc_baseaddr[0][FOFS(x,y,SCRN->gc_lineoffset)]; - setup_far_selector(SCRN->gc_selector); - GRX_RETURN((GrColor)((peek_b_f(ptr) >> (7 - (x & 7)) ) & 1)); -} - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - char far *ptr; - unsigned cval; - GRX_ENTER(); - ptr = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - cval= ((unsigned int)color & 1) << (7 - (x &= 7)); - setup_far_selector(CURC->gc_selector); - switch(C_OPER(color)) { - case C_XOR: poke_b_f_xor(ptr,cval); break; - case C_OR: poke_b_f_or(ptr,cval); break; - case C_AND: poke_b_f_and(ptr,~cval); break; - default: poke_b_f(ptr,((peek_b_f(ptr) & (~0x80 >> x)) | cval)); - } - GRX_LEAVE(); -} - -#define maskoper(d,op,s,msk,SF,DF) do { \ - unsigned char _c_ = peek_b##DF(d); \ - poke_b##DF((d), (_c_ & ~(msk)) | ((_c_ op (s)) & (msk))); \ - } while (0) -#define maskset(d,c,msk,DF) \ - poke_b##DF((d),(peek_b##DF(d) & ~(msk)) | ((c) & (msk))) - -static void drawhline(int x,int y,int w,GrColor color) -{ - int oper; - GRX_ENTER(); - oper = C_OPER(color); - color = color & 1 ? ~0L : 0L; - if ( !(!color && (oper==C_OR||oper==C_XOR)) - && !( color && oper==C_AND) ) { - GR_int8u far *pp = (GR_int8u far *)&CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - GR_int8u lm = 0xff >> (x & 7); - GR_int8u rm = 0xff << ((-(w += x)) & 7); - w = ((w + 7) >> 3) - (x >> 3); - if(w == 1) lm &= rm; - setup_far_selector(CURC->gc_selector); - if( lm ) { - switch(oper) { - case C_XOR: maskoper(pp,^,(GR_int8u)color,lm,_f,_f); break; - case C_OR: maskoper(pp,|,(GR_int8u)color,lm,_f,_f); break; - case C_AND: maskoper(pp,&,(GR_int8u)color,lm,_f,_f); break; - default: maskset(pp,(GR_int8u)color,lm,_f); break; - break; - } - if (!(--w)) goto done; - ++pp; - } - if ( rm ) --w; - if (w) { - switch(oper) { - case C_XOR: repfill_b_f_xor(pp,color,w); break; - case C_OR: repfill_b_f_or( pp,color,w); break; - case C_AND: repfill_b_f_and(pp,color,w); break; - default: repfill_b_f( pp,color,w); break; - } - } - if ( rm ) { - switch(oper) { - case C_XOR: maskoper(pp,^,(GR_int8u)color,rm,_f,_f); break; - case C_OR: maskoper(pp,|,(GR_int8u)color,rm,_f,_f); break; - case C_AND: maskoper(pp,&,(GR_int8u)color,rm,_f,_f); break; - default: maskset(pp,(GR_int8u)color,rm,_f); break; - } - } - } -done: - GRX_LEAVE(); -} - - -static void drawvline(int x,int y,int h,GrColor color) -{ - char far *p; - unsigned int cval; - unsigned int lwdt; - GRX_ENTER(); - lwdt = CURC->gc_lineoffset; - cval = ((unsigned int)color & 1) << (7 - (x & 7)); - setup_far_selector(CURC->gc_selector); - switch (C_OPER(color)) { - case C_XOR: - /* no need to xor anything with 0 */ - if (cval) { - p = &CURC->gc_baseaddr[0][FOFS(x,y,lwdt)]; - colfill_b_f_xor(p,lwdt,cval,h); - } - break; - case C_OR: - /* no need to or anything with 0 */ - if (cval) { - do_OR: - p = &CURC->gc_baseaddr[0][FOFS(x,y,lwdt)]; - colfill_b_f_or(p,lwdt,cval,h); - } - break; - case C_AND: - /* no need to and anything with 1 */ - if (!cval) { - do_AND: - cval = ~(1 << (7 - (x & 7))); - p = &CURC->gc_baseaddr[0][FOFS(x,y,lwdt)]; - colfill_b_f_and(p,lwdt,cval,h); - } - break; - default: - if (cval) goto do_OR; - goto do_AND; - break; - } - GRX_LEAVE(); -} - - -static -#include "fdrivers/generic/block.c" - -static -#include "fdrivers/generic/line.c" - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -/* some routines for fast blit operations -** -** All algorithms use a preallocated buffer for temporary -** storage and manipulation of pixel data: LineBuff[4] -** -** video -> video algorithm: -** read data from scanline into LineBuff[plane] -** if bit alignment between source and destination differs -** shift LineBuff for destination bit alignment -** write LineBuff[plane] to video memory -** -** ram -> video algorithm: -** calculate 'start of line' pointer (slp) holding the first -** blitting byte in RAM -** if bit alignment between RAM and screen differs -** shift© from slp to LineBuff with destination -** bit alignment. Reload slp with LineBuff -** write slp to video memory -** -** video -> ram algorithm -** read data from scanline into LineBuff[plane] -** if bit alignment between screen and RAM differs -** shift LineBuff for RAM bit alignment -** copy from LineBuff to RAM -** -** These algorithms save a lot of VGA register port settings -** compared with the old pixel by pixel method. -*/ - -static void put_scanline(char far *dptr,char far *sptr,int w, - GR_int8u lm, GR_int8u rm, int op ) { - GRX_ENTER(); - if (w==1) lm &= rm; - if ( ((GR_int8u)(~lm)) ) { - switch (op) { - case C_XOR: maskoper(dptr,^,*sptr,lm,_set,_f); break; - case C_OR : maskoper(dptr,|,*sptr,lm,_set,_f); break; - case C_AND: maskoper(dptr,&,*sptr,lm,_set,_f); break; - default : maskset(dptr,*sptr,lm,_f); break; - } - if (--w == 0) goto done; - ++dptr; - ++sptr; - } - if ( ((GR_int8u)(~rm)) ) --w; - if (w) switch (op) { - case C_XOR: fwdcopy_f_xor(dptr,dptr,sptr,w); break; - case C_OR : fwdcopy_f_or( dptr,dptr,sptr,w); break; - case C_AND: fwdcopy_f_and(dptr,dptr,sptr,w); break; - default : fwdcopy_f_set(dptr,dptr,sptr,w); break; - } - if ( ((GR_int8u)(~rm)) ) - switch (op) { - case C_XOR: maskoper(dptr,^,*sptr,rm,_set,_f); break; - case C_OR : maskoper(dptr,|,*sptr,rm,_set,_f); break; - case C_AND: maskoper(dptr,&,*sptr,rm,_set,_f); break; - default : maskset(dptr,*sptr,rm,_f); break; - } -done: - GRX_LEAVE(); -} - -static void get_scanline(char far *dptr, char far *sptr, int w) { - GRX_ENTER(); - fwdcopy_set_f(sptr,dptr,sptr,w); - GRX_LEAVE(); -} - -extern void _GR_shift_scanline(GR_int8u far **dst, - GR_int8u far **src, - int ws, int shift, int planes ); -#define shift_scanline(dst,src,w,sh) \ - _GR_shift_scanline((GR_int8u **)&(dst),(GR_int8u **)&(src),(w),(sh),1) - - -static -#include "fdrivers/generic/bitblt.c" - -static void bltv2v(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y,int w,int h, - GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) != GrIMAGE && alloc_blit_buffer()) { - int shift = ((int)(x&7)) - ((int)(dx&7)); - char far *dptr, *sptr; - int skip, lo = SCRN->gc_lineoffset; - int oper= C_OPER(op); - GR_int8u lm = 0xff >> (dx & 7); - GR_int8u rm = 0xff << ((-(w + dx)) & 7); - int ws = ((x+w+7) >> 3) - (x >> 3); - int wd = ((dx+w+7) >> 3) - (dx >> 3); - setup_far_selector(SCRN->gc_selector); - if (dy < y) { - skip = lo; - } else { - y += h-1; dy += h-1; - skip = -lo; - } - sptr = &SCRN->gc_baseaddr[0][FOFS(x,y,lo)]; - dptr = &SCRN->gc_baseaddr[0][FOFS(dx,dy,lo)]; - while (h-- > 0) { - get_scanline(LineBuff,sptr,ws); - if (shift) - shift_scanline(LineBuff,LineBuff,ws,shift); - put_scanline(dptr,LineBuff, wd, lm, rm, oper); - dptr += skip; - sptr += skip; - } - } else - bitblt(dst,dx,dy,src,x,y,w,h,op); - GRX_LEAVE(); -} - -static void bltr2v(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y,int w,int h, - GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) != GrIMAGE && alloc_blit_buffer()) { - int oper = C_OPER(op); - int shift = ((int)(x&7)) - ((int)(dx&7)); - char far *dptr, *sptr; - int sskip,dskip; - GR_int8u lm = 0xff >> (dx & 7); - GR_int8u rm = 0xff << ((-(w + dx)) & 7); - int ws = ((x+w+7) >> 3) - (x >> 3); - int wd = ((dx+w+7) >> 3) - (dx >> 3); - setup_far_selector(SCRN->gc_selector); - dskip = SCRN->gc_lineoffset; - dptr = &SCRN->gc_baseaddr[0][FOFS(dx,dy,dskip)]; - sskip = src->gf_lineoffset; - sptr = &src->gf_baseaddr[0][FOFS(x,y,sskip)]; - if (shift) - while (h-- > 0) { - shift_scanline(LineBuff,sptr,ws,shift); - put_scanline(dptr,LineBuff,wd,lm,rm,oper); - dptr += dskip; - sptr += sskip; - } - else - while (h-- > 0) { - put_scanline(dptr,sptr,wd,lm,rm,oper); - dptr += dskip; - sptr += sskip; - } - } else - _GrFrDrvGenericBitBlt(dst,dx,dy,src,x,y,w,h,op); - GRX_LEAVE(); -} - - -static void bltv2r(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y,int w,int h, - GrColor op) -{ - GRX_ENTER(); - while(GrColorMode(op) != GrIMAGE) - if(alloc_blit_buffer()) { - int oper = C_OPER(op); - int shift = ((int)(x&7)) - ((int)(dx&7)); - char far *dp, *dptr, *sp, *sptr; - int sskip,dskip; - GR_int8u lm = 0xff >> (dx & 7); - GR_int8u rm = 0xff << ((-(w + dx)) & 7); - int ws = ((x+w+7) >> 3) - (x >> 3); - int wd = ((dx+w+7) >> 3) - (dx >> 3); - if (wd==1) break; - setup_far_selector(SCRN->gc_selector); - sskip = SCRN->gc_lineoffset; - sp = &SCRN->gc_baseaddr[0][FOFS(x,y,sskip)]; - dskip = dst->gf_lineoffset; - dp = &dst->gf_baseaddr[0][FOFS(x,y,dskip)]; - while (h-- > 0) { - int ww = wd; - get_scanline(LineBuff,sp,ws); - if (shift) - shift_scanline(LineBuff,LineBuff,ws,shift); - sptr = LineBuff; - dptr = dp; - if ( ((GR_int8u)(~lm)) ) { - switch (op) { - case C_XOR: maskoper(dptr,^,*sptr,lm,_set,_n); break; - case C_OR : maskoper(dptr,|,*sptr,lm,_set,_n); break; - case C_AND: maskoper(dptr,&,*sptr,lm,_set,_n); break; - default : maskset(dptr,*sptr,lm,_n); break; - } - ++dptr; - ++sptr; - if (!(--ww)) goto next; - } - if ( ((GR_int8u)(~rm)) ) --ww; - if (ww) switch(oper) { - case C_XOR: fwdcopy_xor(dptr,dptr,sptr,ww); break; - case C_OR: fwdcopy_or( dptr,dptr,sptr,ww); break; - case C_AND: fwdcopy_and(dptr,dptr,sptr,ww); break; - default: fwdcopy_set(dptr,dptr,sptr,ww); break; - } - if ( ((GR_int8u)(~rm)) ) { - switch (op) { - case C_XOR: maskoper(dptr,^,*sptr,rm,_set,_n); break; - case C_OR : maskoper(dptr,|,*sptr,rm,_set,_n); break; - case C_AND: maskoper(dptr,&,*sptr,rm,_set,_n); break; - default : maskset(dptr,*sptr,rm,_n); break; - } - } - next: - sp += sskip; - dp += dskip; - } - goto done; - } - _GrFrDrvGenericBitBlt(dst,dx,dy,src,x,y,w,h,op); -done: - GRX_LEAVE(); -} - - -GrFrameDriver _GrFrameDriverEGAVGA1 = { - GR_frameEGAVGA1, /* frame mode */ - GR_frameRAM1, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 1, /* bits per pixel */ - 64*1024L, /* max plane size the code can handle */ - init, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bltv2v, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - diff --git a/thirdparty/grx249/src/fdrivers/fd_xwin.c b/thirdparty/grx249/src/fdrivers/fd_xwin.c deleted file mode 100644 index a79089e..0000000 --- a/thirdparty/grx249/src/fdrivers/fd_xwin.c +++ /dev/null @@ -1,814 +0,0 @@ -/** - ** fd_xwin.c - the X Window color frame driver - ** - ** Author: Ulrich Leodolter - ** E-mail: ulrich@lab1.psy.univie.ac.at - ** Date: Thu Sep 28 10:31:08 1995 - ** RCSId: $Id: fd_xwin.c 1.1 1995/11/19 17:42:55 ulrich Exp $ - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** 070505 M.Alvarez, Using a Pixmap for BackingStore - ** 080801 M.Alvarez, Sanitized pixel cache code - ** 080801 M.Alvarez, New faster and specific for X11 putscanline function - ** - **/ - -#include -#include "libgrx.h" -#include "libxwin.h" -#include "arith.h" -#include "memfill.h" -#include "grdriver.h" - -INLINE -void _XGrCopyBStore(int x, int y, int width, int lenght) -{ - if (USE_PIXMAP_FOR_BS) { - XCopyArea (_XGrDisplay, - _XGrBStore, - _XGrWindow, - DefaultGC (_XGrDisplay, _XGrScreen), - x, - y, - width, - lenght, - x, - y); - } -} - -static INLINE -void _XGrSetForeColor (GrColor color) -{ - GRX_ENTER(); - color &= GrCVALUEMASK; - if (color != _XGrForeColor) - { - DBGPRINTF(DBG_DRIVER,("New foreground color: %x\n",(unsigned)color)); - _XGrForeColor = color; - XSetForeground (_XGrDisplay, _XGrGC, _XGrForeColor); - } - GRX_LEAVE(); -} - -static INLINE -void _XGrSetBackColor (GrColor color) -{ - GRX_ENTER(); - color &= GrCVALUEMASK; - if (color != _XGrBackColor) - { - DBGPRINTF(DBG_DRIVER,("New background color: %x\n",(unsigned)color)); - _XGrBackColor = color; - XSetBackground (_XGrDisplay, _XGrGC, _XGrBackColor); - } - GRX_LEAVE(); -} - -static INLINE -void _XGrSetColorOper (GrColor color) -{ - static int _GXtable[4] = { - GXcopy, /* C_WRITE */ - GXxor, /* C_XOR */ - GXor, /* C_OR */ - GXand /* C_AND */ - }; - unsigned int coper; - - GRX_ENTER(); - coper = C_OPER(color) & 0x03; - if (coper != _XGrColorOper) - { - _XGrColorOper = coper; - XSetFunction (_XGrDisplay, _XGrGC, _GXtable[_XGrColorOper]); - } - GRX_LEAVE(); -} - -/* - * PixelCache uses complete rows now - * Designed for loops like: - * - * for (y = 0; y < height; y++) - * for (x = 0; x < width; x++) - * *dest++ = GrPixel (x, y); - */ - -#define PIXEL_CACHE_HEIGHT 4 - -static XImage * _XGrPixelCacheImage = NULL; -static Drawable _XGrPixelCacheDrawable = None; -static int _XGrPixelCacheWidth = 0; -static int _XGrPixelCacheHeight = 0; -static int _XGrPixelCacheY1 = 0; -static int _XGrPixelCacheY2 = 0; - -/* y1 <= y2 required ! */ -#define AREA_OVERLAP_PIXEL_CACHE(y1,y2) \ - ( (y2) >= _XGrPixelCacheY1 \ - && (y1) <= _XGrPixelCacheY2 ) - -#define PIXEL_CACHE_INVALIDATE() do { \ - _XGrPixelCacheDrawable = None; \ - if (_XGrPixelCacheImage) { \ - XDestroyImage (_XGrPixelCacheImage); \ - _XGrPixelCacheImage = NULL; \ - } \ - } while (0) - -static INLINE -void _XGrCheckPixelCache(int y1, int y2) -{ - if (_XGrPixelCacheDrawable == None) return; - if (AREA_OVERLAP_PIXEL_CACHE(y1,y2)) - PIXEL_CACHE_INVALIDATE(); -} - -static -GrColor readpixel(GrFrame *c, int x, int y) -{ - GrColor col; - GRX_ENTER(); - if (_XGrPixelCacheDrawable != (Drawable) c->gf_baseaddr[0] - || _XGrPixelCacheImage == NULL - || !AREA_OVERLAP_PIXEL_CACHE(y,y)) { - - if (_XGrPixelCacheImage) { - XDestroyImage (_XGrPixelCacheImage); - _XGrPixelCacheImage = NULL; - } - _XGrPixelCacheDrawable = (Drawable) c->gf_baseaddr[0]; - - _XGrPixelCacheWidth = GrScreenX(); - _XGrPixelCacheY1 = y; - _XGrPixelCacheY2 = y + PIXEL_CACHE_HEIGHT - 1; - if (_XGrPixelCacheY2 >= GrScreenY()) - _XGrPixelCacheY2 = GrScreenY() - 1; - _XGrPixelCacheHeight = _XGrPixelCacheY2 - _XGrPixelCacheY1 + 1; - - _XGrPixelCacheImage = XGetImage (_XGrDisplay, - _XGrPixelCacheDrawable, - 0, - _XGrPixelCacheY1, - _XGrPixelCacheWidth, - _XGrPixelCacheHeight, - AllPlanes, - ZPixmap); - if (! _XGrPixelCacheImage) { - col = GrNOCOLOR; - goto done; - } - } - col = XGetPixel (_XGrPixelCacheImage, x, y - _XGrPixelCacheY1); -done: - GRX_RETURN( col ); -} - -static INLINE -void drawpixel(int x,int y,GrColor c) -{ - GRX_ENTER(); - _XGrSetForeColor (c); - _XGrSetColorOper (c); - XDrawPoint (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, - x, - y); - _XGrCopyBStore(x, y, 1, 1); - _XGrCheckPixelCache(y, y); - - GRX_LEAVE(); -} - -static -void drawhline(int x,int y,int w,GrColor c) -{ - int x2; - - GRX_ENTER(); - _XGrSetForeColor (c); - _XGrSetColorOper (c); - x2 = x + w - 1; - XDrawLine (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, - x, y, - x2, y); - _XGrCopyBStore(x, y, w, 1); - _XGrCheckPixelCache(y, y); - - GRX_LEAVE(); -} - -static -void drawvline(int x,int y,int h,GrColor c) -{ - int y2; - - GRX_ENTER(); - _XGrSetForeColor (c); - _XGrSetColorOper (c); - y2 = y + h - 1; - XDrawLine (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, - x, y, - x, y2); - _XGrCopyBStore(x, y, 1, h); - _XGrCheckPixelCache(y, y2); - - GRX_LEAVE(); -} - -static -void drawblock(int x,int y,int w,int h,GrColor c) -{ - GRX_ENTER(); - _XGrSetForeColor (c); - _XGrSetColorOper (c); - XFillRectangle (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, - x, - y, - w, - h); - _XGrCopyBStore(x, y, w, h); - _XGrCheckPixelCache(y, y+h-1); - - GRX_LEAVE(); -} - - -static -void drawline(int x,int y,int dx,int dy,GrColor c) -{ - GRX_ENTER(); - _XGrSetForeColor (c); - _XGrSetColorOper (c); - dx += x; - dy += y; - XDrawLine (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, - x, y, - dx, dy); - isort(x,dx); - isort(y,dy); - _XGrCopyBStore(x, y, dx-x+1, dy-y+1); - _XGrCheckPixelCache(y, dy); - - GRX_LEAVE(); -} - -static -void drawbitmap(int x,int y,int w,int h,char far *bmp,int pitch,int start,GrColor fg,GrColor bg) -{ - XImage ximage; - - GRX_ENTER(); - bmp += (unsigned int)start >> 3; - start &= 7; - - ximage.width = w; - ximage.height = h; - ximage.xoffset = start; - ximage.format = XYBitmap; - ximage.data = bmp; - ximage.byte_order = LSBFirst; - ximage.bitmap_unit = 8; - ximage.bitmap_bit_order = MSBFirst; - ximage.bitmap_pad = 8; - ximage.depth = 1; - ximage.bytes_per_line = pitch; - ximage.bits_per_pixel = 1; - ximage.red_mask = 0L; - ximage.green_mask = 0L; - ximage.blue_mask = 0L; - ximage.obdata = NULL; - sttzero(&ximage.f); - -# ifndef PRE_R6_ICCCM - if ( XInitImage (&ximage) != 0) -# endif - { - if ((C_OPER(fg) == C_OPER(bg)) && (fg != GrNOCOLOR)) { - _XGrSetForeColor (fg); - _XGrSetBackColor (bg); - _XGrSetColorOper (fg); - DBGPRINTF(DBG_DRIVER,("Calling XPutImage (1) ...\n")); - XPutImage (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, - &ximage, - 0, - 0, - x, - y, - w, - h); - DBGPRINTF(DBG_DRIVER,("Calling XPutImage (1) done\n")); - } - else { - if (fg != GrNOCOLOR) { - XSetForeground (_XGrDisplay, _XGrBitmapGC, 1); - XSetBackground (_XGrDisplay, _XGrBitmapGC, 0); - DBGPRINTF(DBG_DRIVER,("Calling XPutImage (2) ...\n")); - XPutImage (_XGrDisplay, - _XGrBitmap, - _XGrBitmapGC, - &ximage, - 0, - 0, - 0, - 0, - w, - h); - DBGPRINTF(DBG_DRIVER,("Calling XPutImage (2) done\n")); - XSetStipple (_XGrDisplay, _XGrGC, _XGrBitmap); - XSetTSOrigin (_XGrDisplay, _XGrGC, x, y); - XSetFillStyle (_XGrDisplay, _XGrGC, FillStippled); - _XGrSetForeColor (fg); - _XGrSetColorOper (fg); - XFillRectangle (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, - x, - y, - w, - h); - } - if (bg != GrNOCOLOR) { - XSetForeground (_XGrDisplay, _XGrBitmapGC, 0); - XSetBackground (_XGrDisplay, _XGrBitmapGC, 1); - DBGPRINTF(DBG_DRIVER,("Calling XPutImage (3) ...\n")); - XPutImage (_XGrDisplay, - _XGrBitmap, - _XGrBitmapGC, - &ximage, - 0, - 0, - 0, - 0, - w, - h); - DBGPRINTF(DBG_DRIVER,("Calling XPutImage (3) done\n")); - XSetStipple (_XGrDisplay, _XGrGC, _XGrBitmap); - XSetTSOrigin (_XGrDisplay, _XGrGC, x, y); - XSetFillStyle (_XGrDisplay, _XGrGC, FillStippled); - _XGrSetForeColor (bg); - _XGrSetColorOper (bg); - XFillRectangle (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, - x, - y, - w, - h); - } - XSetFillStyle (_XGrDisplay, _XGrGC, FillSolid); - } - - _XGrCopyBStore(x, y, w, h); - _XGrCheckPixelCache(y, y+h-1); - } - GRX_LEAVE(); -} - -/* Note: drawpattern is not tested because it's not used in this GRX version */ -static -void drawpattern(int x,int y,int w,char patt,GrColor fg,GrColor bg) -{ - XImage ximage; - - GRX_ENTER(); - ximage.width = 8; - ximage.height = 1; - ximage.xoffset = 0; - ximage.format = XYBitmap; - ximage.data = &patt; - ximage.byte_order = LSBFirst; - ximage.bitmap_unit = 8; - ximage.bitmap_bit_order = MSBFirst; - ximage.bitmap_pad = 8; - ximage.depth = 1; - ximage.bytes_per_line = 1; - ximage.bits_per_pixel = 1; - ximage.red_mask = 0L; - ximage.green_mask = 0L; - ximage.blue_mask = 0L; - ximage.obdata = NULL; - sttzero(&ximage.f); - -# ifndef PRE_R6_ICCCM - if (XInitImage (&ximage) != 0) -# endif - { - if ((C_OPER(fg) == C_OPER(bg)) && (fg != GrNOCOLOR)) { - XSetForeground (_XGrDisplay, _XGrPatternGC, 1); - XSetBackground (_XGrDisplay, _XGrPatternGC, 0); - XPutImage (_XGrDisplay, - _XGrPattern, - _XGrPatternGC, - &ximage, - 0, - 0, - 0, - 0, - 8, - 1); - XSetStipple (_XGrDisplay, _XGrGC, _XGrPattern); - XSetTSOrigin (_XGrDisplay, _XGrGC, x, y); - XSetFillStyle (_XGrDisplay, _XGrGC, FillOpaqueStippled); - _XGrSetForeColor (fg); - _XGrSetBackColor (bg); - _XGrSetColorOper (fg); - XFillRectangle (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, - x, - y, - w, - 1); - } - else { - if (fg != GrNOCOLOR) { - XSetForeground (_XGrDisplay, _XGrPatternGC, 1); - XSetBackground (_XGrDisplay, _XGrPatternGC, 0); - XPutImage (_XGrDisplay, - _XGrPattern, - _XGrPatternGC, - &ximage, - 0, - 0, - 0, - 0, - 8, - 1); - XSetStipple (_XGrDisplay, _XGrGC, _XGrPattern); - XSetTSOrigin (_XGrDisplay, _XGrGC, x, y); - XSetFillStyle (_XGrDisplay, _XGrGC, FillStippled); - _XGrSetForeColor (fg); - _XGrSetColorOper (fg); - XFillRectangle (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, - x, - y, - w, - 1); - } - if (bg != GrNOCOLOR) { - XSetForeground (_XGrDisplay, _XGrPatternGC, 0); - XSetBackground (_XGrDisplay, _XGrPatternGC, 1); - XPutImage (_XGrDisplay, - _XGrPattern, - _XGrPatternGC, - &ximage, - 0, - 0, - 0, - 0, - 8, - 1); - XSetStipple (_XGrDisplay, _XGrGC, _XGrPattern); - XSetTSOrigin (_XGrDisplay, _XGrGC, x, y); - XSetFillStyle (_XGrDisplay, _XGrGC, FillStippled); - _XGrSetForeColor (bg); - _XGrSetColorOper (bg); - XFillRectangle (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, - x, - y, - w, - 1); - } - } - XSetFillStyle (_XGrDisplay, _XGrGC, FillSolid); - - _XGrCopyBStore(x, y, w, 1); - _XGrCheckPixelCache(y, y); - } - GRX_LEAVE(); -} - -static -void bitblt(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op) -{ - GRX_ENTER(); - _XGrSetColorOper (op); - XCopyArea (_XGrDisplay, - (Drawable) src->gf_baseaddr[0], - (Drawable) dst->gf_baseaddr[0], - _XGrGC, - x, - y, - w, - h, - dx, - dy); - - _XGrCopyBStore(dx, dy, w, h); - _XGrCheckPixelCache(dy, dy+h-1); - - GRX_LEAVE(); -} - -static -void bltv2r(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) - _GrFrDrvGenericBitBlt(dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else { - XImage *ximage; - - ximage = XGetImage (_XGrDisplay, - (Drawable) src->gf_baseaddr[0], - sx, - sy, - w, - h, - AllPlanes, - ZPixmap); - if (ximage) { - int bytes_per_pixel = _XGrBitsPerPixel >> 3; - GrFrame tmp = *dst; - - tmp.gf_baseaddr[0] = - tmp.gf_baseaddr[1] = - tmp.gf_baseaddr[2] = - tmp.gf_baseaddr[3] = ximage->data; - tmp.gf_lineoffset = ximage->bytes_per_line; - - _GrFrDrvPackedBitBltR2R(dst, (dx * bytes_per_pixel), dy, - &tmp, 0, 0, - (w * bytes_per_pixel), h, - op - ); - XDestroyImage (ximage); - } - } - GRX_LEAVE(); -} - -static void bltr2v(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) - _GrFrDrvGenericBitBlt(dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else { - XImage ximage; - Visual *visual = DefaultVisual(_XGrDisplay,_XGrScreen); - - ximage.width = sx + w; - ximage.height = sy + h; - ximage.xoffset = 0; - ximage.format = ZPixmap; - ximage.data = src->gf_baseaddr[0]; - ximage.byte_order = LSBFirst; - ximage.bitmap_unit = BitmapUnit(_XGrDisplay); - ximage.bitmap_bit_order = BitmapBitOrder(_XGrDisplay); - ximage.bitmap_pad = BitmapPad(_XGrDisplay); - ximage.depth = _XGrDepth; - ximage.bytes_per_line = src->gf_lineoffset; - ximage.bits_per_pixel = _XGrBitsPerPixel; - ximage.red_mask = visual->red_mask; - ximage.green_mask = visual->green_mask; - ximage.blue_mask = visual->blue_mask; - ximage.obdata = NULL; - sttzero(&ximage.f); - -# ifndef PRE_R6_ICCCM - if (XInitImage (&ximage) != 0) -# endif - { - _XGrSetColorOper (op); - XPutImage (_XGrDisplay, - (Drawable) dst->gf_baseaddr[0], - _XGrGC, - &ximage, - sx, - sy, - dx, - dy, - w, - h); - _XGrCopyBStore(dx, dy, w, h); - _XGrCheckPixelCache(dy, dy+h-1); - } - } - GRX_LEAVE(); -} - -static -void putscanline(int x, int y, int w, const GrColor *scl, GrColor op) -{ - GrColor skipc; - int ind; - GRX_ENTER(); - skipc = op ^ GrIMAGE; - _XGrSetColorOper(op); - - for (ind = 0; ind < w; ind++) { - if (scl[ind] != skipc) { - _XGrSetForeColor(scl[ind]); - XDrawPoint (_XGrDisplay, - (Drawable) CURC->gc_baseaddr[0], - _XGrGC, x+ind, y); - } - } - - _XGrCopyBStore(x, y, w, 1); - _XGrCheckPixelCache(y, y); - - GRX_LEAVE(); -} - -#define ROUNDCOLORCOMP(x,n) ( \ - ((uint)(x) >= CLRINFO->mask[n]) ? \ - CLRINFO->mask[n] : \ - (((x) + CLRINFO->round[n]) & CLRINFO->mask[n]) \ -) - -static int init(GrVideoMode *mp) -{ - - if (_XGrColorNumPixels == 1) { - unsigned long i; - - for (i = 0; i < CLRINFO->ncolors; i++) { - if (i >= _XGrColorPixels[0] && i <= _XGrColorPixels[1]) { - CLRINFO->ctable[i].defined = FALSE; - } - else { - int r, g, b; - XColor xcolor; - - xcolor.red = 0; - xcolor.green = 0; - xcolor.blue = 0; - xcolor.pixel = i; - XQueryColors (_XGrDisplay, _XGrColormap, &xcolor, 1); - r = xcolor.red >> 8; - g = xcolor.green >> 8; - b = xcolor.blue >> 8; - /* - * Preallocate Cell; Only a buggy program will free this entry. - */ - CLRINFO->ctable[i].r = ROUNDCOLORCOMP(r,0); - CLRINFO->ctable[i].g = ROUNDCOLORCOMP(g,1); - CLRINFO->ctable[i].b = ROUNDCOLORCOMP(b,2); - CLRINFO->ctable[i].defined = TRUE; - CLRINFO->ctable[i].writable = FALSE; - CLRINFO->ctable[i].nused = 1; - CLRINFO->nfree--; - } - } - } - PIXEL_CACHE_INVALIDATE(); - return(TRUE); -} - - -GrFrameDriver _GrFrameDriverXWIN8 = { - GR_frameXWIN8, /* frame mode */ - GR_frameRAM8, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 8, /* bits per pixel */ - 8*16*1024L*1024L, /* max plane size the code can handle */ - init, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - putscanline -}; - -GrFrameDriver _GrFrameDriverXWIN16 = { - GR_frameXWIN16, /* frame mode */ - GR_frameRAM16, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 16, /* bits per pixel */ - 16*16*1024L*1024L, /* max plane size the code can handle */ - init, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - putscanline -}; - -GrFrameDriver _GrFrameDriverXWIN24 = { - GR_frameXWIN24, /* frame mode */ - GR_frameRAM24, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 24, /* bits per pixel */ - 24*16*1024L*1024L, /* max plane size the code can handle */ - init, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - putscanline -}; - -GrFrameDriver _GrFrameDriverXWIN32L = { - GR_frameXWIN32L, /* frame mode */ - GR_frameRAM32L, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ - 32*16*1024L*1024L, /* max plane size the code can handle */ - init, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - putscanline -}; - -GrFrameDriver _GrFrameDriverXWIN32H = { - GR_frameXWIN32H, /* frame mode */ - GR_frameRAM32H, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ - 32*16*1024L*1024L, /* max plane size the code can handle */ - init, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - putscanline -}; diff --git a/thirdparty/grx249/src/fdrivers/fdw32_24.c b/thirdparty/grx249/src/fdrivers/fdw32_24.c deleted file mode 100644 index f781318..0000000 --- a/thirdparty/grx249/src/fdrivers/fdw32_24.c +++ /dev/null @@ -1,196 +0,0 @@ -/** - ** w32dib24.c ---- the 16M color Win32 linear frame buffer driver using DIB - ** - ** Copyright (c) 2003 Mariano Alvarez Fernandez - ** [e-mail: malfer@telefonica.net] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libwin32.h" -#include "fdrivers/driver24.h" - -static void w32_drawpixel(int x, int y, GrColor color) -{ - HDC hDC; - COLORREF c; - - GRX_ENTER(); - drawpixel(x, y, color); - - c = GetPixel ( hDCMem, x, y ); - hDC = GetDC ( hGRXWnd ); - SetPixelV ( hDC, x, y, c ); - ReleaseDC ( hGRXWnd, hDC ); - - GRX_LEAVE(); -} - -static void w32_drawline(int x, int y, int dx, int dy, GrColor color) -{ - RECT Rect; - - GRX_ENTER(); - drawline(x, y, dx, dy, color); - if (dx > 0 ) { - Rect.left = x; - Rect.right = x + dx + 1; - } else { - Rect.left = x + dx; - Rect.right = x + 1; - } - if (dy > 0 ) { - Rect.top = y; - Rect.bottom = y + dy + 1; - } else { - Rect.top = y + dy; - Rect.bottom = y + 1; - } - InvalidateRect(hGRXWnd, &Rect, FALSE); - GRX_LEAVE(); -} - -static void w32_drawhline(int x, int y, int w, GrColor color) -{ - RECT Rect; - - GRX_ENTER(); - drawhline(x, y, w, color); - Rect.left = x; - Rect.top = y; - Rect.right = x + w; - Rect.bottom = y + 1; - InvalidateRect(hGRXWnd, &Rect, FALSE); - GRX_LEAVE(); -} - -static void w32_drawvline(int x, int y, int h, GrColor color) -{ - RECT Rect; - - GRX_ENTER(); - drawvline(x, y, h, color); - Rect.left = x; - Rect.top = y; - Rect.right = x + 1; - Rect.bottom = y + h; - InvalidateRect(hGRXWnd, &Rect, FALSE); - GRX_LEAVE(); -} - -static void w32_drawblock(int x, int y, int w, int h, GrColor color) -{ - RECT Rect; - - GRX_ENTER(); - drawblock(x, y, w, h, color); - Rect.left = x; - Rect.top = y; - Rect.right = x + w; - Rect.bottom = y + h; - InvalidateRect(hGRXWnd, &Rect, FALSE); - GRX_LEAVE(); -} - -static void w32_drawbitmap(int x, int y, int w, int h, char far *bmp, - int pitch, int start, GrColor fg, GrColor bg) -{ - RECT Rect; - - GRX_ENTER(); - drawbitmap(x, y, w, h, bmp, pitch, start, fg, bg); - Rect.left = x; - Rect.top = y; - Rect.right = x + w; - Rect.bottom = y + h; - InvalidateRect(hGRXWnd, &Rect, FALSE); - GRX_LEAVE(); -} - -static void w32_drawpattern(int x, int y, int w, char patt, - GrColor fg, GrColor bg) -{ - RECT Rect; - - GRX_ENTER(); - drawpattern(x, y, w, patt, fg, bg); - Rect.left = x; - Rect.top = y; - Rect.right = x + w; - Rect.bottom = y + 1; - InvalidateRect(hGRXWnd, &Rect, FALSE); - GRX_LEAVE(); -} - -static void w32_bitblt(GrFrame *dst, int dx, int dy, GrFrame *src, - int sx, int sy, int w, int h, GrColor op) -{ - RECT Rect; - - GRX_ENTER(); - bitblt(dst, dx, dy, src, sx, sy, w, h, op); - Rect.left = dx; - Rect.top = dy; - Rect.right = dx + w; - Rect.bottom = dy + h; - InvalidateRect(hGRXWnd, &Rect, FALSE); - GRX_LEAVE(); -} - -void w32_putscanline(int x, int y, int w, - const GrColor far *scl, GrColor op ) -{ - GrColor skipc; - RECT Rect; - - GRX_ENTER(); - Rect.left = x; - Rect.top = y; - Rect.right = x + w; - Rect.bottom = y + 1; - - skipc = op ^ GrIMAGE; - op &= GrCMODEMASK; - for ( w += x; x < w; ++x) { - GrColor c = *(scl++); - if (c != skipc) drawpixel(x, y, (c|op)); - } - - InvalidateRect(hGRXWnd, &Rect, FALSE); - GRX_LEAVE(); -} - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverWIN32_24 = { - GR_frameWIN32_24, /* frame mode */ - GR_frameRAM24, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 24, /* bits per pixel */ - 24 * 16 * 1024L * 1024L, /* max plane size the code can handle */ - NULL, - readpixel, - w32_drawpixel, - w32_drawline, - w32_drawhline, - w32_drawvline, - w32_drawblock, - w32_drawbitmap, - w32_drawpattern, - w32_bitblt, - bitblt, - w32_bitblt, - _GrFrDrvGenericGetIndexedScanline, - w32_putscanline -}; diff --git a/thirdparty/grx249/src/fdrivers/fdw32_8.c b/thirdparty/grx249/src/fdrivers/fdw32_8.c deleted file mode 100644 index fabeec5..0000000 --- a/thirdparty/grx249/src/fdrivers/fdw32_8.c +++ /dev/null @@ -1,189 +0,0 @@ -/** - ** w32dib24.c ---- the 256 color Win32 linear frame buffer driver using DIB - ** - ** Copyright (c) 2003 Josu Onandia - ** [e-mail: jonandia@fagorautomation.es] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libwin32.h" -#include "fdrivers/driver8.h" - -static void w32_drawpixel(int x, int y, GrColor color) -{ - HDC hDC; - COLORREF c; - - GRX_ENTER(); - drawpixel(x, y, color); - - c = GetPixel ( hDCMem, x, y ); - hDC = GetDC ( hGRXWnd ); - SetPixelV ( hDC, x, y, c ); - ReleaseDC ( hGRXWnd, hDC ); - - GRX_LEAVE(); -} - -static void w32_drawline(int x, int y, int dx, int dy, GrColor c) -{ - RECT r; - - GRX_ENTER(); - drawline(x, y, dx, dy, c); - if (dx > 0 ) { - r.left = x; - r.right = x + dx + 1; - } else { - r.left = x + dx; - r.right = x + 1; - } - if (dy > 0 ) { - r.top = y; - r.bottom = y + dy + 1; - } else { - r.top = y + dy; - r.bottom = y + 1; - } - InvalidateRect(hGRXWnd, &r, FALSE); - GRX_LEAVE(); -} - -static void w32_drawhline(int x, int y, int w, GrColor c) -{ - RECT r; - - GRX_ENTER(); - drawhline(x, y, w, c); - r.left = x; - r.top = y; - r.right = x + w; - r.bottom = y + 1; - InvalidateRect(hGRXWnd, &r, FALSE); - GRX_LEAVE(); -} - -static void w32_drawvline(int x, int y, int h, GrColor c) -{ - RECT r; - - GRX_ENTER(); - drawvline(x, y, h, c); - r.left = x; - r.top = y; - r.right = x + 1; - r.bottom = y + h; - InvalidateRect(hGRXWnd, &r, FALSE); - GRX_LEAVE(); -} - -static void w32_drawpattern(int x, int y, int w, char patt, - GrColor fg, GrColor bg) -{ - RECT r; - - GRX_ENTER(); - drawpattern(x, y, w, patt, fg, bg); - r.left = x; - r.top = y; - r.right = x + w; - r.bottom = y + 1; - InvalidateRect(hGRXWnd, &r, FALSE); - GRX_LEAVE(); -} - -static void w32_putscanline(int x, int y, int w, - const GrColor far *scl, GrColor op) -{ - RECT r; - - GRX_ENTER(); - putscanline(x, y, w, scl, op); - r.left = x; - r.top = y; - r.right = x + w; - r.bottom = y + 1; - InvalidateRect(hGRXWnd, &r, FALSE); - GRX_LEAVE(); -} - -static void w32_drawblock(int x, int y, int w, int h, GrColor c) -{ - RECT r; - - GRX_ENTER(); - drawblock(x, y, w, h, c); - r.left = x; - r.top = y; - r.right = x + w; - r.bottom = y + h; - InvalidateRect(hGRXWnd, &r, FALSE); - GRX_LEAVE(); -} - -static void w32_drawbitmap(int x, int y, int w, int h, char far *bmp, - int pitch, int start, GrColor fg, GrColor bg) -{ - RECT r; - - GRX_ENTER(); - drawbitmap(x, y, w, h, bmp, pitch, start, fg, bg); - r.left = x; - r.top = y; - r.right = x + w; - r.bottom = y + h; - InvalidateRect(hGRXWnd, &r, FALSE); - GRX_LEAVE(); -} - -static void w32_bitblit(GrFrame *dst, int dx, int dy, GrFrame *src, - int sx, int sy, int w, int h, GrColor op) -{ - RECT r; - - GRX_ENTER(); - bitblit(dst, dx, dy, src, sx, sy, w, h, op); - r.left = dx; - r.top = dy; - r.right = dx + w; - r.bottom = dy + h; - InvalidateRect(hGRXWnd, &r, FALSE); - GRX_LEAVE(); -} - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverWIN32_8 = { - GR_frameWIN32_8, /* frame mode */ - GR_frameRAM8, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 8, /* bits per pixel */ - 8 * 16 * 1024L * 1024L, /* max plane size the code can handle */ - NULL, - readpixel, - w32_drawpixel, - w32_drawline, - w32_drawhline, - w32_drawvline, - w32_drawblock, - w32_drawbitmap, - w32_drawpattern, - w32_bitblit, - bitblit, - w32_bitblit, - getindexedscanline, - w32_putscanline -}; - diff --git a/thirdparty/grx249/src/fdrivers/ftable.c b/thirdparty/grx249/src/fdrivers/ftable.c deleted file mode 100644 index 9e9a430..0000000 --- a/thirdparty/grx249/src/fdrivers/ftable.c +++ /dev/null @@ -1,84 +0,0 @@ -/** - ** ftable.c ---- a table of available frame drivers - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" - -GrFrameDriver *_GrFrameDriverTable[] = { -/* first the drivers for video based context */ -#if defined(__DJGPP__) || defined(__TURBOC__) || defined (__WATCOMC__) - &_GrFrameDriverHERC1, -#endif -#if defined(__MSDOS__) || (defined(__linux__) && !defined(__XWIN__)) -#ifdef __i386__ - &_GrFrameDriverEGAVGA1, - &_GrFrameDriverEGA4, - &_GrFrameDriverSVGA4, - &_GrFrameDriverVGA8X, -#endif - &_GrFrameDriverSVGA8, - &_GrFrameDriverSVGA16, - &_GrFrameDriverSVGA24, - &_GrFrameDriverSVGA32L, - &_GrFrameDriverSVGA32H, -#endif -#if defined(__DJGPP__) || defined(XF86DGA_FRAMEBUFFER) \ - || ( defined(LFB_BY_NEAR_POINTER) && !defined(__WIN32__) ) \ - || ( defined(__WATCOMC__) && defined ( __386__ ) ) - &_GrFrameDriverSVGA8_LFB, - &_GrFrameDriverSVGA16_LFB, - &_GrFrameDriverSVGA24_LFB, - &_GrFrameDriverSVGA32L_LFB, - &_GrFrameDriverSVGA32H_LFB, -#endif -#if defined(__XWIN__) && !defined(__SDL__) - &_GrFrameDriverXWIN8, - &_GrFrameDriverXWIN16, - &_GrFrameDriverXWIN24, - &_GrFrameDriverXWIN32L, - &_GrFrameDriverXWIN32H, -#endif -#if defined(__WIN32__) && !defined(__SDL__) - &_GrFrameDriverWIN32_8, - &_GrFrameDriverWIN32_24, -#endif -#if defined(__SDL__) - &_GrFrameDriverSDL8, - &_GrFrameDriverSDL16, - &_GrFrameDriverSDL24, - &_GrFrameDriverSDL32L, - &_GrFrameDriverSDL32H, -#endif -/* now the drivers for RAM based context */ - &_GrFrameDriverRAM1, - &_GrFrameDriverRAM4, - &_GrFrameDriverRAM8, - &_GrFrameDriverRAM16, -#ifdef GRX_USE_RAM3x8 - &_GrFrameDriverRAM3x8, -#else - &_GrFrameDriverRAM24, - &_GrFrameDriverRAM32L, - &_GrFrameDriverRAM32H, -#endif - NULL -}; - diff --git a/thirdparty/grx249/src/fdrivers/genblit.c b/thirdparty/grx249/src/fdrivers/genblit.c deleted file mode 100644 index cc8bef9..0000000 --- a/thirdparty/grx249/src/fdrivers/genblit.c +++ /dev/null @@ -1,55 +0,0 @@ -/** - ** genblit.c ---- generic, VERY SLOW bitblt routine - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "memcopy.h" - -void _GrFrDrvGenericBitBlt(GrFrame *dst,int dx,int dy,GrFrame *src,int x,int y,int w,int h,GrColor op) -{ - GrFrame csave; - GrColor (*readpix)(GrFrame *,int,int); - void (*drawpix)(int,int,GrColor); - GrColor skipc; - int step; - GRX_ENTER(); - readpix = src->gf_driver->readpixel; - drawpix = dst->gf_driver->drawpixel; - skipc = op ^ GrIMAGE; - step = 1; - op &= GrCMODEMASK; - sttcopy(&csave,&CURC->gc_frame); - sttcopy(&CURC->gc_frame,dst); - if((dy > y) || ((dy == y) && (dx > x))) { - x += (w - 1); dx += (w - 1); - y += (h - 1); dy += (h - 1); - step = (-1); - } - do { - int dxx = dx,xx = x,ww = w; - do { - GrColor c = (*readpix)(src,xx,y); - if(c != skipc) (*drawpix)(dxx,dy,(c | op)); - dxx += step; xx += step; - } while(--ww > 0); - dy += step; y += step; - } while(--h > 0); - sttcopy(&CURC->gc_frame,&csave); - GRX_LEAVE(); -} - diff --git a/thirdparty/grx249/src/fdrivers/generic/bitblt.c b/thirdparty/grx249/src/fdrivers/generic/bitblt.c deleted file mode 100644 index 5472d77..0000000 --- a/thirdparty/grx249/src/fdrivers/generic/bitblt.c +++ /dev/null @@ -1,48 +0,0 @@ -/** - ** generic/bitblt.c ---- generic (slow) bitblt routine - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -void bitblt(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y,int w,int h,GrColor op) -{ - GrFrame csave; - GrColor skipc; - int step; - GRX_ENTER(); - skipc = op ^ GrIMAGE; - step = 1; - op &= GrCMODEMASK; - sttcopy(&csave,&CURC->gc_frame); - sttcopy(&CURC->gc_frame,dst); - if((dy > y) || ((dy == y) && (dx > x))) { - x += (w - 1); dx += (w - 1); - y += (h - 1); dy += (h - 1); - step = (-1); - } - do { - int dxx = dx,xx = x,ww = w; - do { - GrColor c = readpixel(src,xx,y); - if(c != skipc) drawpixel(dxx,dy,(c | op)); - dxx += step; xx += step; - } while(--ww > 0); - dy += step; y += step; - } while(--h > 0); - sttcopy(&CURC->gc_frame,&csave); - GRX_LEAVE(); -} - diff --git a/thirdparty/grx249/src/fdrivers/generic/bitmap.c b/thirdparty/grx249/src/fdrivers/generic/bitmap.c deleted file mode 100644 index 7d7b70a..0000000 --- a/thirdparty/grx249/src/fdrivers/generic/bitmap.c +++ /dev/null @@ -1,39 +0,0 @@ -/** - ** generic/bitmap.c ---- generic (=slow) font or bitmap draw routine - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -void drawbitmap(int x,int y,int w,int h, - char far *bmp,int pitch,int start,GrColor fg,GrColor bg) -{ - GRX_ENTER(); - w += x; h += y; - bmp += (unsigned int)start >> 3; - start &= 7; - do { - unsigned char far *bitp = (unsigned char far *)bmp; - unsigned char bits = *bitp; - unsigned char mask = 0x80 >> start; - int xx = x; - do { - drawpixel(xx,y,(bits & mask) ? fg : bg); - if((mask >>= 1) == 0) bits = *++bitp,mask = 0x80; - } while(++xx != w); - bmp += pitch; - } while(++y != h); - GRX_LEAVE(); -} - diff --git a/thirdparty/grx249/src/fdrivers/generic/block.c b/thirdparty/grx249/src/fdrivers/generic/block.c deleted file mode 100644 index 116a507..0000000 --- a/thirdparty/grx249/src/fdrivers/generic/block.c +++ /dev/null @@ -1,26 +0,0 @@ -/** - ** generic/block.c ---- generic (=slow) rectangle fill routine - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -void drawblock(int x,int y,int w,int h,GrColor c) -{ - GRX_ENTER(); - h += y; - do { drawhline(x,y,w,c); } while(++y != h); - GRX_LEAVE(); -} - diff --git a/thirdparty/grx249/src/fdrivers/generic/getiscl.c b/thirdparty/grx249/src/fdrivers/generic/getiscl.c deleted file mode 100644 index 3ef09c7..0000000 --- a/thirdparty/grx249/src/fdrivers/generic/getiscl.c +++ /dev/null @@ -1,48 +0,0 @@ - /** - ** generic/getiscl.c ---- generic getindexscanline routine - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - - -GrColor far *getindexedscanline(GrFrame *c, - int x,int y,int w, - int *indx ) -{ - GrColor far *pixels; - GrColor far *p; - GRX_ENTER(); - p = pixels = _GrTempBufferAlloc(sizeof(GrColor) * (w+1)); - if (pixels) { - if (indx) { - int i, oldx = -1; - GrColor col = 0; - for (i=0; i < w; ++i) { - int xx = x+indx[i]; - if (oldx != xx) { - oldx = xx; - col = readpixel(c,xx,y); - } - *(p++) = col; - } - } else { - for ( ; w > 0; --w) - *(p++) = readpixel(c,x++,y); - } - } - GRX_RETURN(pixels); -} -/* will return an array of pixel values pv[] read from frame */ -/* if indx == NULL: pv[i=0..w-1] = readpixel(x+i,y) */ -/* else pv[i=0..w-1] = readpixel(x+indx[i],y) */ diff --git a/thirdparty/grx249/src/fdrivers/generic/hline.c b/thirdparty/grx249/src/fdrivers/generic/hline.c deleted file mode 100644 index e59fbb7..0000000 --- a/thirdparty/grx249/src/fdrivers/generic/hline.c +++ /dev/null @@ -1,26 +0,0 @@ -/** - ** generic/hline.c ---- generic (=slow) scan line fill routine - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -void drawhline(int x,int y,int w,GrColor c) -{ - GRX_ENTER(); - w += x; - do { drawpixel(x,y,c); } while(++x != w); - GRX_LEAVE(); -} - diff --git a/thirdparty/grx249/src/fdrivers/generic/line.c b/thirdparty/grx249/src/fdrivers/generic/line.c deleted file mode 100644 index 7164468..0000000 --- a/thirdparty/grx249/src/fdrivers/generic/line.c +++ /dev/null @@ -1,50 +0,0 @@ -/** - ** generic/line.c ---- generic (=slow) line draw routine - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -void drawline(int x,int y,int dx,int dy,GrColor c) -{ - int cnt,err,yoff; - GRX_ENTER(); - yoff = 1; - if(dx < 0) { - x += dx; dx = (-dx); - y += dy; dy = (-dy); - } - if(dy < 0) { - yoff = (-1); - dy = (-dy); - } - if(dx > dy) { - err = (cnt = dx) >> 1; - do { - drawpixel(x,y,c); - if((err -= dy) < 0) err += dx,y += yoff; - x++; - } while(--cnt >= 0); - } - else { - err = (cnt = dy) >> 1; - do { - drawpixel(x,y,c); - if((err -= dx) < 0) err += dy,x++; - y += yoff; - } while(--cnt >= 0); - } - GRX_LEAVE(); -} - diff --git a/thirdparty/grx249/src/fdrivers/generic/pattern.c b/thirdparty/grx249/src/fdrivers/generic/pattern.c deleted file mode 100644 index fc37b93..0000000 --- a/thirdparty/grx249/src/fdrivers/generic/pattern.c +++ /dev/null @@ -1,32 +0,0 @@ -/** - ** generic/pattern.c ---- generic (=slow) patterned scan line fill routine - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -void drawpattern(int x,int y,int w,char patt,GrColor fg,GrColor bg) -{ - GR_int8u mask; - GRX_ENTER(); - mask = 0x80; - w += x; - do { - drawpixel(x,y,(patt & mask) ? fg : bg); - if((mask >>= 1) == 0) mask = 0x80; - } while(++x != w); - GRX_LEAVE(); -} - - diff --git a/thirdparty/grx249/src/fdrivers/generic/putscl.c b/thirdparty/grx249/src/fdrivers/generic/putscl.c deleted file mode 100644 index 272fb8d..0000000 --- a/thirdparty/grx249/src/fdrivers/generic/putscl.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** generic/putscl.c ---- generic putscanline routine - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -void putscanline(int x,int y,int w, - const GrColor far *scl, GrColor op ) -{ - GrColor skipc; - GRX_ENTER(); - skipc = op ^ GrIMAGE; - op &= GrCMODEMASK; - for ( w += x; x < w; ++x) { - GrColor c = *(scl++); - if (c != skipc) drawpixel(x,y,(c|op)); - } - GRX_LEAVE(); -} diff --git a/thirdparty/grx249/src/fdrivers/generic/vline.c b/thirdparty/grx249/src/fdrivers/generic/vline.c deleted file mode 100644 index add3728..0000000 --- a/thirdparty/grx249/src/fdrivers/generic/vline.c +++ /dev/null @@ -1,26 +0,0 @@ -/** - ** generic/bitblt.c ---- generic (=slow) vertical line draw routine - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -void drawvline(int x,int y,int h,GrColor c) -{ - GRX_ENTER(); - h += y; - do { drawpixel(x,y,c); } while(++y != h); - GRX_LEAVE(); -} - diff --git a/thirdparty/grx249/src/fdrivers/gengiscl.c b/thirdparty/grx249/src/fdrivers/gengiscl.c deleted file mode 100644 index 05246ba..0000000 --- a/thirdparty/grx249/src/fdrivers/gengiscl.c +++ /dev/null @@ -1,54 +0,0 @@ -/** - ** gengiscl.c ---- generic, VERY SLOW getindexscanline routine - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "allocate.h" - -/* will return an array of pixel values pv[] read from frame */ -/* if indx == NULL: pv[i=0..w-1] = readpixel(x+i,y) */ -/* else pv[i=0..w-1] = readpixel(x+indx[i],y) */ - -GrColor far *_GrFrDrvGenericGetIndexedScanline(GrFrame *c, - int x,int y,int w, - int *indx ) -{ - GrColor far *pixels; - GrColor far *p; - GRX_ENTER(); - DBGPRINTF(DBG_DRIVER,("x=%d, y=%d, w=%d\n",x,y,w)); - p = pixels = _GrTempBufferAlloc(sizeof(GrColor) * (w+1)); - if (pixels) { - _GR_readPix readpix = c->gf_driver->readpixel; - if (indx) { - int i, oldx = -1; - GrColor col = 0; - for (i=0; i < w; ++i) { - int xx = x+indx[i]; - if (oldx != xx) { - oldx = xx; - col = (*readpix)(c,xx,y); - } - *(p++) = col; - } - } else { - for ( ; w > 0; --w) - *(p++) = (*readpix)(c,x++,y); - } - } - GRX_RETURN(pixels); -} diff --git a/thirdparty/grx249/src/fdrivers/genptscl.c b/thirdparty/grx249/src/fdrivers/genptscl.c deleted file mode 100644 index e36b883..0000000 --- a/thirdparty/grx249/src/fdrivers/genptscl.c +++ /dev/null @@ -1,38 +0,0 @@ -/** - ** genptscl.c ---- generic, VERY SLOW putscanline routine - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" - -/* will draw array of pixel values to current context */ - -void _GrFrDrvGenericPutScanline(int x,int y,int w, - const GrColor far *scl, GrColor op ) -{ - GrColor skipc; - _GR_drawPix drawpixel; - GRX_ENTER(); - drawpixel = CURC->gc_driver->drawpixel; - DBGPRINTF(DBG_DRIVER,("x=%d, y=%d, w=%d, op=%lx\n",x,y,w,op)); - skipc = op ^ GrIMAGE; - op &= GrCMODEMASK; - for ( w += x; x < w; ++x) { - GrColor c = *(scl++); - if (c != skipc) (*drawpixel)(x,y,(c|op)); - } - GRX_LEAVE(); -} diff --git a/thirdparty/grx249/src/fdrivers/genstrch.c b/thirdparty/grx249/src/fdrivers/genstrch.c deleted file mode 100644 index b784850..0000000 --- a/thirdparty/grx249/src/fdrivers/genstrch.c +++ /dev/null @@ -1,150 +0,0 @@ -/** - ** genstrch.c ---- generic (and slow) stretching bitblt routine - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "allocate.h" -#include "arith.h" -#include "mempeek.h" -#include "memcopy.h" - -/* ----------------------------- generic Bresenham line code for stretching */ - -typedef struct { - int x, y; - int dx, dy; - int cnt; - int err; -} _GR_lineData; - -static INLINE int XLineInit(_GR_lineData *ld, int x,int y,int dx,int dy) -{ - GRX_ENTER(); - ld->x = x; - ld->y = y; - ld->dx = dx; - ld->dy = dy; - ld->cnt = dx; - if (dx <= dy) ld->err = dx >> 1; - else ld->err = dx-dy; - GRX_RETURN(ld->cnt > 0); -} - -#define XLineStep(ldp) do { \ - (ldp)->err -= (ldp)->dy; \ - while((ldp)->err < 0) { \ - (ldp)->err += (ldp)->dx; \ - (ldp)->y += 1; \ - } \ - (ldp)->x++; \ - --((ldp)->cnt); \ -} while(0) - -#define XLineCheckDone(ldp) ((ldp)->cnt <= 0) - -/* ---------------------------------------------------- x- and y-dir stretch */ -static void stretch(GrFrame *dst,int dx,int dy,int dw, int dh, - GrFrame *src,int sx,int sy,int sw, int sh, - GrColor op) -{ - int maxi; - GRX_ENTER(); - setup_ALLOC(); - do { - GrFrame csave; - GrColor far *pixels = NULL; - _GR_lineData lne; - _GR_getIndexedScanline getscl = src->gf_driver->getindexedscanline; - _GR_putScanline putscl = dst->gf_driver->putscanline; - int rd_y = -1; - int *xsrc = ALLOC(sizeof(int) * dw); - if (!xsrc) break; - /* set up xsrc[0..dw-1] = (line 0,sx to dw-1,sx+sw-1).y */ - if(!XLineInit(&lne,0,sx,dw,sw)) { - FREE(xsrc); - break; - } - DBGPRINTF(DBG_DRIVER,("dw=%d, sw=%d\n",dw,sw)); - maxi = sx+sw-1; - do { - /* we need to check for upper bound here */ - /* in rare cases the last element could overflow */ - xsrc[lne.x] = min(lne.y,maxi); - DBGPRINTF(DBG_DRIVER,("xsrc[%d] = %d\n",lne.x,xsrc[lne.x])); - XLineStep(&lne); - } while (!XLineCheckDone(&lne)); - - if(!XLineInit(&lne,dy,sy,dh,sh)) { - FREE(xsrc); - break; - } - maxi = sy+sh-1; - sttcopy(&csave,&CURC->gc_frame); - sttcopy(&CURC->gc_frame,dst); - do { - int y = min(lne.y,maxi); - if (!pixels || y != rd_y) - pixels = getscl(src,sx,(rd_y=y),dw,xsrc); - if (pixels) - putscl(dx,lne.x,dw,pixels,op); - XLineStep(&lne); - } while (!XLineCheckDone(&lne)); - sttcopy(&CURC->gc_frame,&csave); - FREE(xsrc); - } while (0); - reset_ALLOC(); - GRX_LEAVE(); -} - -/* -----------------------------------------------------general stretch blit */ - -void _GrFrDrvGenericStretchBlt(GrFrame *dst,int dx,int dy,int dw,int dh, - GrFrame *src,int sx,int sy,int sw,int sh, - GrColor op) -{ - GRX_ENTER(); - if (sw > 0 && dw > 0 && sh > 0 && dh > 0) { - if (sw == dw) { - _GR_blitFunc blit; - if (dst->gf_onscreen) { - if(src->gf_onscreen) blit = dst->gf_driver->bitblt; - else blit = dst->gf_driver->bltr2v; - } else { - if(src->gf_onscreen) blit = dst->gf_driver->bltv2r; - else blit = dst->gf_driver->bitblt; - } - - if (sh == dh) { - /* no stretching required */ - (*blit)(dst,dx,dy,src,sx,sy,sw,sh,op); - } else { - /* can blit line by line */ - _GR_lineData yline; - if (XLineInit(&yline,dy,sy,dh,sh)) { - do { - (*blit)(dst,dx,yline.x,src,sx,yline.y,sw,1,op); - XLineStep(&yline); - } while (!XLineCheckDone(&yline)); - } - } - } else - stretch(dst,dx,dy,dw,dh, - src,sx,sy,sw,sh, - op); - } - GRX_LEAVE(); -} diff --git a/thirdparty/grx249/src/fdrivers/herc1.c b/thirdparty/grx249/src/fdrivers/herc1.c deleted file mode 100644 index 9003a7e..0000000 --- a/thirdparty/grx249/src/fdrivers/herc1.c +++ /dev/null @@ -1,121 +0,0 @@ -/** - ** herc1.c ---- the mono Hercules frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "mempeek.h" -#include "memcopy.h" -#include "memfill.h" - -#define HRES 720 -#define VRES 348 - -static unsigned int offtab[2 * VRES]; - -/* frame offset address calculation */ -#define FOFS(x,y) ( offtab[y] + ((x) >> 3) ) - -static int init(GrVideoMode *mp) -{ - int i, res; - GRX_ENTER(); - res = ( (mp->height == VRES) || (mp->height == 2*VRES) ) - && (mp->width == HRES); - if (res) { - for(i = 0; i < VRES; i++) { - offtab[i] = ((i & 3) * 0x2000U) + ((i >> 2) * (HRES / 8)); - offtab[i + VRES] = offtab[i] + 0x8000U; - } - } - GRX_RETURN(res); -} - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - char far *ptr; - GRX_ENTER(); - ptr = &SCRN->gc_baseaddr[0][FOFS(x,y)]; - setup_far_selector(SCRN->gc_selector); - GRX_RETURN((GrColor)(( peek_b_f(ptr) >> (7 - (x & 7)) ) & 1)); -} - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - char far *ptr; - unsigned cval; - GRX_ENTER(); - ptr = &CURC->gc_baseaddr[0][FOFS(x,y)]; - cval = ((unsigned)color & 1) << (7 - (x &= 7)); - setup_far_selector(CURC->gc_selector); - switch(C_OPER(color)) { - case C_XOR: poke_b_f_xor(ptr,cval); break; - case C_OR: poke_b_f_or(ptr,cval); break; - case C_AND: poke_b_f_and(ptr,~cval); break; - default: poke_b_f(ptr,((peek_b_f(ptr) & (~0x80 >> x)) | cval)); - } - GRX_LEAVE(); -} - -static -#include "fdrivers/generic/hline.c" - -static -#include "fdrivers/generic/vline.c" - -static -#include "fdrivers/generic/block.c" - -static -#include "fdrivers/generic/line.c" - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -static -#include "fdrivers/generic/bitblt.c" - -GrFrameDriver _GrFrameDriverHERC1 = { - GR_frameHERC1, /* frame mode */ - GR_frameRAM1, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 1, /* bits per pixel */ - 64*1024L, /* max plane size the code can handle */ - init, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - _GrFrDrvGenericBitBlt, - _GrFrDrvGenericBitBlt, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - diff --git a/thirdparty/grx249/src/fdrivers/lfb16.c b/thirdparty/grx249/src/fdrivers/lfb16.c deleted file mode 100644 index 16e4521..0000000 --- a/thirdparty/grx249/src/fdrivers/lfb16.c +++ /dev/null @@ -1,63 +0,0 @@ -/** - ** lfb16.c ---- the 32768/65536 color Super VGA linear frame buffer driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* -------------------------------------------------------------------- */ - -#define FAR_ACCESS -#include "fdrivers/driver16.h" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverSVGA16_LFB = { - GR_frameSVGA16_LFB, /* frame mode */ - GR_frameRAM16, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 16, /* bits per pixel */ - 16*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/lfb24.c b/thirdparty/grx249/src/fdrivers/lfb24.c deleted file mode 100644 index 152727a..0000000 --- a/thirdparty/grx249/src/fdrivers/lfb24.c +++ /dev/null @@ -1,63 +0,0 @@ -/** - ** lfb24.c ---- the 16M color Super VGA linear frame buffer driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* -------------------------------------------------------------------- */ - -#define FAR_ACCESS -#include "fdrivers/driver24.h" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverSVGA24_LFB = { - GR_frameSVGA24_LFB, /* frame mode */ - GR_frameRAM24, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 24, /* bits per pixel */ - 24*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - -#endif /* !defined(LFB_BY_NEAR_POINTER) */ diff --git a/thirdparty/grx249/src/fdrivers/lfb32h.c b/thirdparty/grx249/src/fdrivers/lfb32h.c deleted file mode 100644 index 9709d82..0000000 --- a/thirdparty/grx249/src/fdrivers/lfb32h.c +++ /dev/null @@ -1,65 +0,0 @@ -/** - ** lfb32h.c ---- the 16M color padded SVGA linear frame buffer driver (high) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* -------------------------------------------------------------------- */ - -#define PIX2COL(col) ((col)>>8) -#define COL2PIX(col) ((col)<<8) -#define FAR_ACCESS -#include "fdrivers/driver32.h" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverSVGA32H_LFB = { - GR_frameSVGA32H_LFB, /* frame mode */ - GR_frameRAM32H, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ - 32*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/lfb32l.c b/thirdparty/grx249/src/fdrivers/lfb32l.c deleted file mode 100644 index d533707..0000000 --- a/thirdparty/grx249/src/fdrivers/lfb32l.c +++ /dev/null @@ -1,65 +0,0 @@ -/** - ** lfb32l.c ---- the 16M color padded SVGA linear frame buffer driver (low) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* -------------------------------------------------------------------- */ - -#define PIX2COL(col) ((col)&0xFFFFFF) -#define COL2PIX(col) ((col)&0xFFFFFF) -#define FAR_ACCESS -#include "fdrivers/driver32.h" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverSVGA32L_LFB = { - GR_frameSVGA32L_LFB, /* frame mode */ - GR_frameRAM32L, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ - 32*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/lfb8.c b/thirdparty/grx249/src/fdrivers/lfb8.c deleted file mode 100644 index 6f73d38..0000000 --- a/thirdparty/grx249/src/fdrivers/lfb8.c +++ /dev/null @@ -1,63 +0,0 @@ -/** - ** lfb8.c ---- the 256 color Super VGA linear frame buffer driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* -------------------------------------------------------------------- */ - -#define FAR_ACCESS -#include "fdrivers/driver8.h" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverSVGA8_LFB = { - GR_frameSVGA8_LFB, /* frame mode */ - GR_frameRAM8, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 8, /* bits per pixel */ - 8*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblit, - bltv2r, - bltr2v, - getindexedscanline, - putscanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/lfbbltrv.c b/thirdparty/grx249/src/fdrivers/lfbbltrv.c deleted file mode 100644 index bad30ea..0000000 --- a/thirdparty/grx249/src/fdrivers/lfbbltrv.c +++ /dev/null @@ -1,46 +0,0 @@ -/** - ** lfbbltrv.c ---- packed ram->video blit operations for - ** 8,16,24 and 32bpp Super VGA linear frame buffer modes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* name of blit function to be created */ -#define BLITFUNC _GrFrDrvPackedBitBltR2V_LFB - -/* destination is video */ -#define WRITE_FAR _f -/* source is ram */ -#define READ_FAR _n - -/* need a selector before video access */ -#define BLITSEL dst->gf_selector - -#include "fdrivers/pblit_nb.h" - -#endif diff --git a/thirdparty/grx249/src/fdrivers/lfbbltvr.c b/thirdparty/grx249/src/fdrivers/lfbbltvr.c deleted file mode 100644 index 5a5c026..0000000 --- a/thirdparty/grx249/src/fdrivers/lfbbltvr.c +++ /dev/null @@ -1,46 +0,0 @@ -/** - ** lfbbltvr.c ---- packed video->ram blit operations for - ** 8,16,24 and 32bpp Super VGA linear frame buffer modes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* name of blit function to be created */ -#define BLITFUNC _GrFrDrvPackedBitBltV2R_LFB - -/* destination is RAM */ -#define WRITE_FAR _n -/* source is video */ -#define READ_FAR _f - -/* need a selector before video access */ -#define BLITSEL src->gf_selector - -#include "fdrivers/pblit_nb.h" - -#endif diff --git a/thirdparty/grx249/src/fdrivers/lfbbltvv.c b/thirdparty/grx249/src/fdrivers/lfbbltvv.c deleted file mode 100644 index b6fd35b..0000000 --- a/thirdparty/grx249/src/fdrivers/lfbbltvv.c +++ /dev/null @@ -1,49 +0,0 @@ -/** - ** lfbbltvv.c ---- packed video->video blit operations for - ** 8,16,24 and 32bpp Super VGA linear frame buffer modes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* name of blit function to be created */ -#define BLITFUNC _GrFrDrvPackedBitBltV2V_LFB - -/* destination is video */ -#define WRITE_FAR _f -/* source is video */ -#define READ_FAR _f - -/* need a selector before video access */ -#define BLITSEL dst->gf_selector - -/* source and destination may overlap */ -#define BLIT_CAN_OVERLAP - -#include "fdrivers/pblit_nb.h" - -#endif diff --git a/thirdparty/grx249/src/fdrivers/pblit_nb.h b/thirdparty/grx249/src/fdrivers/pblit_nb.h deleted file mode 100644 index 364d4fd..0000000 --- a/thirdparty/grx249/src/fdrivers/pblit_nb.h +++ /dev/null @@ -1,128 +0,0 @@ -/** - ** pblit_nb.h ---- bitblt routine for packed (8,16,24,32 bpp) modes - ** (non banking, source and destination may overlap) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "mempeek.h" - -#include "pblit.h" - -/* WRITE_FAR should be defined as _f if destination is video */ -/* READ_FAR should be defined as _f if source is video */ - -#define __DOCPYF(WF,OP,RF) fwdcopy##WF##OP##RF(dptr,dptr,sptr,ww) -#define __DOCPYR(WF,OP,RF) revcopy##WF##OP##RF(dptr,dptr,sptr,ww) - -#define __DOIMGCPYF(WF,RF) DOIMGCOPY(FW,WF,RF,ww) -#define __DOIMGCPYR(WF,RF) DOIMGCOPY(RV,WF,RF,ww) - -/* indirection to resolve WF=WRITE_FAR / RF=READ_FAR macros */ -#define DOCPYF(WF,OP,RF) __DOCPYF(WF,OP,RF) -#define DOCPYR(WF,OP,RF) __DOCPYR(WF,OP,RF) -#define DOIMGCPYF(WF,RF) __DOIMGCPYF(WF,RF) -#define DOIMGCPYR(WF,RF) __DOIMGCPYR(WF,RF) - -/* check if forward blit would overwrite source */ -#ifdef BLIT_CAN_OVERLAP -#ifdef __TURBOC__ -#define _USEG_(p) ((unsigned)(void _seg *)(void far *)(p)) -#define _UOFF_(p) ((unsigned)(void near *)(p)) -#define OVERLAP(dp,sp) ( _USEG_(dp) == _USEG_(sp) && _UOFF_(dp) > _UOFF_(sp) ) -#endif -#ifndef OVERLAP -#define OVERLAP(dp,sp) ( ((GR_int8 far *)dp) > ((GR_int8 far *)sp) ) -#endif -#endif - -/* for RAM3x8 support */ -#ifndef PLANE_ARG -#define PLANE 0 -#endif - -#ifdef LOCALFUNC -static -#endif -void BLITFUNC(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op -#ifdef PLANE_ARG - ,int PLANE -#endif - ) -{ - char far *dptr, *sptr; - unsigned dskip, sskip; - int oper, ww; - GR_int8u cval; - - GRX_ENTER(); - dskip = dst->gf_lineoffset - w; - sskip = src->gf_lineoffset - w; - oper = C_OPER(op); - cval = (GR_int8u)op; - - dptr = &dst->gf_baseaddr[PLANE][umuladd32(dy,dst->gf_lineoffset,dx)]; - sptr = &src->gf_baseaddr[PLANE][umuladd32(sy,src->gf_lineoffset,sx)]; - -# ifdef BLITSEL - setup_far_selector(BLITSEL); -# endif - -# ifdef BLIT_CAN_OVERLAP - if(OVERLAP(dptr,sptr)) { - dptr += umuladd32((h-1),dst->gf_lineoffset,w-1); - sptr += umuladd32((h-1),src->gf_lineoffset,w-1); - do { - ww = w; - switch(oper) { - case C_IMAGE: DOIMGCPYR(WRITE_FAR,READ_FAR); break; - case C_XOR: DOCPYR(WRITE_FAR,_xor,READ_FAR); break; - case C_OR: DOCPYR(WRITE_FAR,_or,READ_FAR); break; - case C_AND: DOCPYR(WRITE_FAR,_and,READ_FAR); break; - default: DOCPYR(WRITE_FAR,_set,READ_FAR); break; - } - dptr -= dskip; - sptr -= sskip; - } while(--h != 0); - } else -#endif /* BLIT_CAN_OVERLAP */ - do { - ww = w; - switch(oper) { - case C_IMAGE: DOIMGCPYF(WRITE_FAR,READ_FAR); break; - case C_XOR: DOCPYF(WRITE_FAR,_xor,READ_FAR); break; - case C_OR: DOCPYF(WRITE_FAR,_or,READ_FAR); break; - case C_AND: DOCPYF(WRITE_FAR,_and,READ_FAR); break; - default: DOCPYF(WRITE_FAR,_set,READ_FAR); break; - } - dptr += dskip; - sptr += sskip; - } while(--h != 0); - GRX_LEAVE(); -} - -#undef __DOCPYF -#undef __DOCPYR -#undef DOCPYF -#undef DOCPYR diff --git a/thirdparty/grx249/src/fdrivers/pblitr2r.c b/thirdparty/grx249/src/fdrivers/pblitr2r.c deleted file mode 100644 index dfa47df..0000000 --- a/thirdparty/grx249/src/fdrivers/pblitr2r.c +++ /dev/null @@ -1,54 +0,0 @@ -/** - ** pblitr2r.c ---- RAM to RAM bitblt routine for packed (8,16,24,32 bpp) modes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#ifdef GRX_USE_RAM3x8 - -/* name of blit function to be created */ -#define BLITFUNC _GrFrDrvPackedBitBltR2Rpl -/* create function with additional 'int plane' as last arg */ -#define PLANE_ARG - -#else /* GRX_USE_RAM3x8 */ - -/* name of blit function to be created */ -#define BLITFUNC _GrFrDrvPackedBitBltR2R - -#endif /* GRX_USE_RAM3x8 */ - -/* only RAM access, use _n to keep preprocessor happy */ - -#define WRITE_FAR _n -#define READ_FAR _n - -/* source and destination may overlap */ -#define BLIT_CAN_OVERLAP - -#include "fdrivers/pblit_nb.h" - - -#ifdef GRX_USE_RAM3x8 -void _GrFrDrvPackedBitBltR2R(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - _GrFrDrvPackedBitBltR2Rpl(dst,dx,dy,src,sx,sy,w,h,op,0); -} -#endif diff --git a/thirdparty/grx249/src/fdrivers/pblitr2v.c b/thirdparty/grx249/src/fdrivers/pblitr2v.c deleted file mode 100644 index 49fa2df..0000000 --- a/thirdparty/grx249/src/fdrivers/pblitr2v.c +++ /dev/null @@ -1,74 +0,0 @@ -/** - ** pblitr2v.c ---- RAM to video bitblt routine for packed (8, 16, 24, 32 bpp) modes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "mempeek.h" -#include "memcopy.h" -#include "pblit.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),(x)) - -void _GrFrDrvPackedBitBltR2V(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - GR_int32u doff; - char far *dptr, *sptr; - unsigned int dskip, sskip; - int oper; - GR_int8u cval; - - GRX_ENTER(); - dskip = dst->gf_lineoffset; - doff = FOFS(dx,dy,dskip); - sskip = src->gf_lineoffset; - sptr = &src->gf_baseaddr[0][FOFS(sx,sy,sskip)]; - dskip -= w; - sskip -= w; - oper = C_OPER(op); - cval = (GR_int8u)op; - -# define DOICPY() DOIMGCOPY(FW,_f,_n,w1) - - setup_far_selector(dst->gf_selector); - do { - unsigned int w1 = BANKLFT(doff); - unsigned int w2 = w - (w1 = umin(w,w1)); - do { - dptr = &dst->gf_baseaddr[0][BANKPOS(doff)]; - CHKBANK(BANKNUM(doff)); - doff += w1; - if (w1) switch(oper) { - case C_IMAGE: DOICPY(); break; - case C_XOR: fwdcopy_f_xor(dptr,dptr,sptr,w1); break; - case C_OR: fwdcopy_f_or (dptr,dptr,sptr,w1); break; - case C_AND: fwdcopy_f_and(dptr,dptr,sptr,w1); break; - default: fwdcopy_f_set(dptr,dptr,sptr,w1); break; - } - w1 = w2; - w2 = 0; - } while(w1 != 0); - doff += dskip; - sptr += sskip; - } while(--h != 0); - GRX_LEAVE(); -} - diff --git a/thirdparty/grx249/src/fdrivers/pblitv2r.c b/thirdparty/grx249/src/fdrivers/pblitv2r.c deleted file mode 100644 index 64aefc5..0000000 --- a/thirdparty/grx249/src/fdrivers/pblitv2r.c +++ /dev/null @@ -1,72 +0,0 @@ -/** - ** pblitv2r.c ---- video to RAM bitblt routine for packed (8, 16, 24, 32 bpp) modes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "mempeek.h" -#include "memcopy.h" -#include "pblit.h" - - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),(x)) - -void _GrFrDrvPackedBitBltV2R(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - char far *dptr, *sptr; - GR_int32u soff; - unsigned dskip, sskip; - int oper; - GR_int8u cval; - - GRX_ENTER(); - dptr = &dst->gf_baseaddr[0][FOFS(dx,dy,dst->gf_lineoffset)]; - soff = FOFS(sx,sy,src->gf_lineoffset); - dskip = dst->gf_lineoffset - w; - sskip = src->gf_lineoffset - w; - oper = C_OPER(op); - cval = (GR_int8u)op; - -# define DOICPY() DOIMGCOPY(FW,_n,_f,w1) - - setup_far_selector(src->gf_selector); - do { - unsigned w1 = BANKLFT(soff); - unsigned w2 = w - (w1 = umin(w,w1)); - do { - sptr = &src->gf_baseaddr[0][BANKPOS(soff)]; - CHKBANK(BANKNUM(soff)); - soff += w1; - if (w1) switch(oper) { - case C_IMAGE: DOICPY(); break; - case C_XOR: fwdcopy_xor_f(sptr,dptr,sptr,w1); break; - case C_OR: fwdcopy_or_f( sptr,dptr,sptr,w1); break; - case C_AND: fwdcopy_and_f(sptr,dptr,sptr,w1); break; - default: fwdcopy_set_f(sptr,dptr,sptr,w1); break; - } - w1 = w2; - w2 = 0; - } while(w1 != 0); - dptr += dskip; - soff += sskip; - } while(--h != 0); - GRX_LEAVE(); -} diff --git a/thirdparty/grx249/src/fdrivers/pblitv2v.c b/thirdparty/grx249/src/fdrivers/pblitv2v.c deleted file mode 100644 index 55317c7..0000000 --- a/thirdparty/grx249/src/fdrivers/pblitv2v.c +++ /dev/null @@ -1,163 +0,0 @@ -/** - ** pblitv2v.c ---- video to video bitblt routine for packed (8, 16, 24, 32 bpp) modes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "allocate.h" -#include "arith.h" -#include "mempeek.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),(x)) - -#ifndef __XWIN__ -static INLINE -void dualpageblt(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h) -{ - unsigned long doff,soff; - int dskip,sskip; - int rb,rbb; - int wb,wbb; - - GRX_ENTER(); - if(dy > sy) { - dy += (h - 1); - sy += (h - 1); - dskip = -(dst->gf_lineoffset + w); - sskip = -(src->gf_lineoffset + w); - } - else { - dskip = dst->gf_lineoffset - w; - sskip = src->gf_lineoffset - w; - } - doff = FOFS(dx,dy,dst->gf_lineoffset); - soff = FOFS(sx,sy,src->gf_lineoffset); - wbb = (-1); - rbb = (-1); - setup_far_selector(dst->gf_selector); - do { - unsigned w1 = BANKLFT(doff); - unsigned w2 = BANKLFT(soff); - unsigned w3,ww; - w1 = umin(w,w1); - w2 = umin(w,w2); - usort(w1,w2); - w3 = w - w2; - w2 = w2 - w1; - if(w2 == 0) w2=w3 , w3=0; - do { - char far *dptr = &dst->gf_baseaddr[0][BANKPOS(doff)]; - char far *sptr = &src->gf_baseaddr[0][BANKPOS(soff)]; - wb = BANKNUM(doff); - rb = BANKNUM(soff); - if((rbb - rb) | (wbb - wb)) SRWBANK((rbb = rb),(wbb = wb)); - doff += w1; - soff += w1; -#ifndef MISALIGNED_16bit_OK - do { - poke_b_f(dptr,peek_b_f(sptr)); - dptr++; sptr++; - } while (w1--); -#else - if(w1 >= 3) { - if((int)(dptr) & 1) { - poke_b_f(dptr,peek_b_f(sptr)); - dptr++; sptr++; w1--; - } - if((int)(dptr) & 2) { - poke_w_f(dptr,peek_w_f(sptr)); - dptr += 2; sptr += 2; w1 -= 2; - } - if((ww = w1 >> 2) > 0) do { - poke_l_f(dptr,peek_l_f(sptr)); - dptr += 4; sptr += 4; - } while(--ww != 0); - } - if(w1 & 2) { - poke_w_f(dptr,peek_w_f(sptr)); - dptr += 2; sptr += 2; - } - if(w1 & 1) { - poke_b_f(dptr,peek_b_f(sptr)); - } -#endif - w1 = w2; - w2 = w3; - w3 = 0; - } while(w1 != 0); - doff += dskip; - soff += sskip; - } while(--h != 0); - GRX_LEAVE(); -} -#endif /* !__XWIN__ */ - -#define TMPSIZE 16384 - -void _GrFrDrvPackedBitBltV2V(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - - GRX_ENTER(); -#ifndef __XWIN__ - if((C_OPER(op) == C_WRITE) && DRVINFO->splitbanks && - ((dy != sy) || (sx >= dx))) { - dualpageblt(dst,dx,dy,src,sx,sy,w,h); - } else -#endif - { - GrFrame tmp; - int tmpx,tmpn; - tmp.gf_lineoffset = (w + 7) & ~3; - tmpn = umax(umin(h,(TMPSIZE / tmp.gf_lineoffset)),1); - tmpx = tmp.gf_lineoffset * tmpn; -#ifdef SMALL_STACK - tmp.gf_baseaddr[0] = _GrTempBufferAlloc(tmpx); -#else - setup_alloca(); - tmp.gf_baseaddr[0] = alloca((size_t)tmpx); -#endif - if(tmp.gf_baseaddr[0]) { - int ydir = 0; - tmpx = sx & 3; - if(dy > sy) { - dy += h; - sy += h; - ydir = ~0; - } - do { - int cnt = umin(h,tmpn); - dy -= (ydir & cnt); - sy -= (ydir & cnt); - _GrFrDrvPackedBitBltV2R(&tmp,tmpx,0,src,sx,sy,w,cnt,GrWRITE); - _GrFrDrvPackedBitBltR2V(dst,dx,dy,&tmp,tmpx,0,w,cnt,op); - dy += (~ydir & cnt); - sy += (~ydir & cnt); - h -= cnt; - } while(h != 0); - } -#ifndef SMALL_STACK - reset_alloca(); -#endif - } - GRX_LEAVE(); -} - diff --git a/thirdparty/grx249/src/fdrivers/ram1.c b/thirdparty/grx249/src/fdrivers/ram1.c deleted file mode 100644 index 7948817..0000000 --- a/thirdparty/grx249/src/fdrivers/ram1.c +++ /dev/null @@ -1,212 +0,0 @@ -/** - ** ram1.c ---- the mono system RAM frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "allocate.h" -#include "arith.h" -#include "mempeek.h" -#include "memcopy.h" -#include "memfill.h" - -#include "fdrivers/rblit_14.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),((x)>>3)) - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GR_int8u far *ptr; - GRX_ENTER(); - ptr = (GR_int8u far *)&c->gf_baseaddr[0][FOFS(x,y,c->gf_lineoffset)]; - GRX_RETURN((GrColor)( (*ptr >> (7 - (x & 7)) ) & 1)); -} - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - GR_int8u far *ptr; - GR_int8u cval; - - GRX_ENTER(); - ptr = (GR_int8u far *)&CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - cval = (color & 1) << (7 - (x &= 7)); - switch(C_OPER(color)) { - case C_XOR: *ptr ^= cval; break; - case C_OR: *ptr |= cval; break; - case C_AND: *ptr &= ~cval; break; - default: *ptr = (*ptr & (~0x80 >> x)) | cval; break; - } - GRX_LEAVE(); -} - -#define maskoper(d,op,s,msk,SF,DF) do { \ - unsigned char _c_ = peek_b##DF(d); \ - poke_b##DF((d), (_c_ & ~(msk)) | ((_c_ op (s)) & (msk))); \ - } while (0) -#define maskset(d,c,msk,DF) \ - poke_b##DF((d),(peek_b##DF(d) & ~(msk)) | ((c) & (msk))) - -static void drawhline(int x,int y,int w,GrColor color) { - int oper; - - GRX_ENTER(); - oper = C_OPER(color); - color &= 1; - if (!( !color && (oper==C_OR||oper==C_XOR)) && !(color && oper==C_AND) ) { - GR_int8u lm = 0xff >> (x & 7); - GR_int8u rm = 0xff << ((-(w + x)) & 7); - GR_int8u far *p = (GR_int8u far *)&CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - GR_repl cv = 0; - if (color) cv = ~cv; - w = ((x+w+7) >> 3) - (x >> 3); - if (w==1) lm &= rm; - if ( ((GR_int8u)(~lm)) ) { - switch(oper) { - case C_XOR: maskoper(p,^,(GR_int8u)cv,lm,_set,_n); break; - case C_OR: maskoper(p,|,(GR_int8u)cv,lm,_set,_n); break; - case C_AND: maskoper(p,&,(GR_int8u)cv,lm,_set,_n); break; - default: maskset(p,(GR_int8u)cv,lm,_n); break; - } - if (!(--w)) goto done; - ++p; - } - if ( ((GR_int8u)(~rm)) ) --w; - if (w) { - switch(oper) { - case C_XOR: repfill_b_xor(p,cv,w); break; - case C_OR: repfill_b_or(p,cv,w); break; - case C_AND: repfill_b_and(p,cv,w); break; - default: repfill_b(p,cv,w); break; - } - } - if ( ((GR_int8u)(~rm)) ) { - switch(oper) { - case C_XOR: maskoper(p,^,(GR_int8u)cv,rm,_set,_n); break; - case C_OR: maskoper(p,|,(GR_int8u)cv,rm,_set,_n); break; - case C_AND: maskoper(p,&,(GR_int8u)cv,rm,_set,_n); break; - default: maskset(p,(GR_int8u)cv,rm,_n); break; - } - } - } -done: - GRX_LEAVE(); -} - -static void drawvline(int x,int y,int h,GrColor color) -{ - unsigned int lwdt, mask, oper; - char far *p; - GRX_ENTER(); - oper = C_OPER(color); - color &= 1; - lwdt = CURC->gc_lineoffset; - mask = 0x80 >> (x & 7); - switch (oper) { - case C_XOR: - /* no need to xor anything with 0 */ - if (color) { - p = &CURC->gc_baseaddr[0][FOFS(x,y,lwdt)]; - colfill_b_xor(p,lwdt,mask,h); - } - break; - case C_OR: - /* no need to or anything with 0 */ - if (color) { - do_OR: - p = &CURC->gc_baseaddr[0][FOFS(x,y,lwdt)]; - colfill_b_or(p,lwdt,mask,h); - } - break; - case C_AND: - /* no need to and anything with 1 */ - if (!color) { - do_AND: - mask = ~mask; - p = &CURC->gc_baseaddr[0][FOFS(x,y,lwdt)]; - colfill_b_and(p,lwdt,mask,h); - } - break; - default: - if (color) goto do_OR; - goto do_AND; - } - GRX_LEAVE(); -} - -static -#include "fdrivers/generic/block.c" - -static -#include "fdrivers/generic/line.c" - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -static -#include "fdrivers/generic/bitblt.c" - -static void bltr2r(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y,int w,int h, - GrColor op) -{ - GRX_ENTER(); - _GR_rblit_14(dst,dx,dy,src,x,y,w,h,op,1,bitblt); - GRX_LEAVE(); -} - - -/* -------------------------------------------------------------------- */ - -static -#include "fdrivers/generic/getiscl.c" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverRAM1 = { - GR_frameRAM1, /* frame mode */ - GR_frameUndef, /* compatible RAM frame mode */ - FALSE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 1, /* bits per pixel */ -#ifdef __TURBOC__ - 65520L, /* max plane size the code can handle */ -#else - 16*1024L*1024L, /* max plane size the code can handle */ -#endif - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bltr2r, - NULL, - NULL, - getindexedscanline, - _GrFrDrvGenericPutScanline -}; - diff --git a/thirdparty/grx249/src/fdrivers/ram16.c b/thirdparty/grx249/src/fdrivers/ram16.c deleted file mode 100644 index 9f664f9..0000000 --- a/thirdparty/grx249/src/fdrivers/ram16.c +++ /dev/null @@ -1,83 +0,0 @@ -/** - ** ram16.c ---- the 32768/65536 color system RAM frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#include "fdrivers/driver16.h" - -GrFrameDriver _GrFrameDriverRAM16 = { - GR_frameRAM16, /* frame mode */ - GR_frameUndef, /* compatible RAM frame mode */ - FALSE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 16, /* bits per pixel */ -#ifdef __TURBOC__ - 65520L, /* max plane size the code can handle */ -#else - 16*16*1024L*1024L, /* max plane size the code can handle */ -#endif - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - NULL, - NULL, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -#ifdef LFB_BY_NEAR_POINTER - -/* always do RAM to RAM blit. May result in ** -** bottom first blits but this shouldn't matter */ - -GrFrameDriver _GrFrameDriverSVGA16_LFB = { - GR_frameSVGA16_LFB, /* frame mode */ - GR_frameRAM16, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 16, /* bits per pixel */ - 16*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bitblt, - bitblt, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/ram24.c b/thirdparty/grx249/src/fdrivers/ram24.c deleted file mode 100644 index ccce5a7..0000000 --- a/thirdparty/grx249/src/fdrivers/ram24.c +++ /dev/null @@ -1,84 +0,0 @@ -/** - ** ram24.c ---- the 16M color system RAM frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - - -#undef FAR_ACCESS -#include "fdrivers/driver24.h" - -GrFrameDriver _GrFrameDriverRAM24 = { - GR_frameRAM24, /* frame mode */ - GR_frameUndef, /* compatible RAM frame mode */ - FALSE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 24, /* bits per pixel */ -#ifdef __TURBOC__ - 65520L, /* max plane size the code can handle */ -#else - 24*16*1024L*1024L, /* max plane size the code can handle */ -#endif - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - NULL, - NULL, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -#ifdef LFB_BY_NEAR_POINTER - -/* always do RAM to RAM blit. May result in ** -** bottom first blits but this shouldn't matter */ - -GrFrameDriver _GrFrameDriverSVGA24_LFB = { - GR_frameSVGA24_LFB, /* frame mode */ - GR_frameRAM24, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 24, /* bits per pixel */ - 24*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bitblt, - bitblt, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; -#endif /* defined(LFB_BY_NEAR_POINTER) */ diff --git a/thirdparty/grx249/src/fdrivers/ram32h.c b/thirdparty/grx249/src/fdrivers/ram32h.c deleted file mode 100644 index f0c10d1..0000000 --- a/thirdparty/grx249/src/fdrivers/ram32h.c +++ /dev/null @@ -1,86 +0,0 @@ -/** - ** ram32h.c ---- the 16M color padded system RAM frame driver (high) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#define PIX2COL(col) ((col)>>8) -#define COL2PIX(col) ((col)<<8) - -#include "fdrivers/driver32.h" - -GrFrameDriver _GrFrameDriverRAM32H = { - GR_frameRAM32H, /* frame mode */ - GR_frameUndef, /* compatible RAM frame mode */ - FALSE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ -#ifdef __TURBOC__ - 65520L, /* max plane size the code can handle */ -#else - 32*16*1024L*1024L, /* max plane size the code can handle */ -#endif - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - NULL, - NULL, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -#ifdef LFB_BY_NEAR_POINTER - -/* always do RAM to RAM blit. May result in ** -** bottom first blits but this shouldn't matter */ - -GrFrameDriver _GrFrameDriverSVGA32H_LFB = { - GR_frameSVGA32H_LFB, /* frame mode */ - GR_frameRAM32H, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ - 32*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bitblt, - bitblt, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/ram32l.c b/thirdparty/grx249/src/fdrivers/ram32l.c deleted file mode 100644 index 361d300..0000000 --- a/thirdparty/grx249/src/fdrivers/ram32l.c +++ /dev/null @@ -1,86 +0,0 @@ -/** - ** ram32l.c ---- the 16M color padded system RAM frame driver (low) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#define PIX2COL(col) ((col)&0xFFFFFF) -#define COL2PIX(col) ((col)&0xFFFFFF) - -#include "fdrivers/driver32.h" - -GrFrameDriver _GrFrameDriverRAM32L = { - GR_frameRAM32L, /* frame mode */ - GR_frameUndef, /* compatible RAM frame mode */ - FALSE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ -#ifdef __TURBOC__ - 65520L, /* max plane size the code can handle */ -#else - 32*16*1024L*1024L, /* max plane size the code can handle */ -#endif - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - NULL, - NULL, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -#ifdef LFB_BY_NEAR_POINTER - -/* always do RAM to RAM blit. May result in ** -** bottom first blits but this shouldn't matter */ - -GrFrameDriver _GrFrameDriverSVGA32L_LFB = { - GR_frameSVGA32L_LFB, /* frame mode */ - GR_frameRAM32L, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ - 32*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bitblt, - bitblt, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/ram3x8.c b/thirdparty/grx249/src/fdrivers/ram3x8.c deleted file mode 100644 index e5a30d4..0000000 --- a/thirdparty/grx249/src/fdrivers/ram3x8.c +++ /dev/null @@ -1,200 +0,0 @@ -/** - ** ram3x8.c ---- the 16M color planar (image) system RAM frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "access24.h" -#include "arith.h" -#include "docolor.h" -#include "mempeek.h" -#include "memcopy.h" -#include "memfill.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),(x)) - - -/* -------------------------------------------------------------------- */ - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GR_int32u offs; - GrColor pix; - GRX_ENTER(); - offs = FOFS(x,y,c->gf_lineoffset); - pix = 0; - WR24BYTE(pix,0,peek_b(&c->gf_baseaddr[0][offs])); - WR24BYTE(pix,1,peek_b(&c->gf_baseaddr[1][offs])); - WR24BYTE(pix,2,peek_b(&c->gf_baseaddr[2][offs])); - GRX_RETURN(pix); -} - -/* -------------------------------------------------------------------- */ - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - GR_int32u offs; - char far *p0,*p1,*p2; - GRX_ENTER(); - offs = FOFS(x,y,CURC->gc_lineoffset); - p0 = &CURC->gc_baseaddr[0][offs]; - p1 = &CURC->gc_baseaddr[1][offs]; - p2 = &CURC->gc_baseaddr[2][offs]; - switch(C_OPER(color)) { - case C_XOR: poke_b_xor(p0,RD24BYTE(color,0)); - poke_b_xor(p1,RD24BYTE(color,1)); - poke_b_xor(p2,RD24BYTE(color,2)); - break; - case C_OR: poke_b_or(p0,RD24BYTE(color,0)); - poke_b_or(p1,RD24BYTE(color,1)); - poke_b_or(p2,RD24BYTE(color,2)); - break; - case C_AND: poke_b_and(p0,RD24BYTE(color,0)); - poke_b_and(p1,RD24BYTE(color,1)); - poke_b_and(p2,RD24BYTE(color,2)); - break; - default: poke_b(p0,RD24BYTE(color,0)); - poke_b(p1,RD24BYTE(color,1)); - poke_b(p2,RD24BYTE(color,2)); - break; - } - GRX_LEAVE(); -} - -/* -------------------------------------------------------------------- */ - -static void drawhline(int x,int y,int w,GrColor color) { - int copr, pl; - GR_int32u offs; - GRX_ENTER(); - copr = C_OPER(color); - offs = FOFS(x,y,CURC->gc_lineoffset); - for (pl=0; pl < 3; ++pl) { - if(DOCOLOR8(color,copr)) { - GR_repl cval = freplicate_b(color); - char far *pp = &CURC->gc_baseaddr[pl][offs]; - int ww = w; - switch(copr) { - case C_XOR: repfill_b_xor(pp,cval,ww); break; - case C_OR: repfill_b_or( pp,cval,ww); break; - case C_AND: repfill_b_and(pp,cval,ww); break; - default: repfill_b( pp,cval,ww); break; - } - } - color >>= 8; - } - GRX_LEAVE(); -} - - -/* -------------------------------------------------------------------- */ - -static void drawvline(int x,int y,int h,GrColor color) -{ - int copr, pl; - GR_int32u offs; - unsigned lwdt; - GRX_ENTER(); - copr = C_OPER(color); - lwdt = CURC->gc_lineoffset; - offs = FOFS(x,y,lwdt); - for (pl=0; pl < 3; ++pl) { - if(DOCOLOR8(color,copr)) { - char far *pp = &CURC->gc_baseaddr[pl][offs]; - int hh = h; - switch(copr) { - case C_XOR: colfill_b_xor(pp,lwdt,(GR_int8u)color,hh); break; - case C_OR: colfill_b_or( pp,lwdt,(GR_int8u)color,hh); break; - case C_AND: colfill_b_and(pp,lwdt,(GR_int8u)color,hh); break; - default: colfill_b( pp,lwdt,(GR_int8u)color,hh); break; - } - } - color >>= 8; - } - GRX_LEAVE(); -} - -/* -------------------------------------------------------------------- */ - -static -#include "fdrivers/generic/block.c" - -static -#include "fdrivers/generic/line.c" - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -/* -------------------------------------------------------------------- */ - -static -#include "fdrivers/generic/bitblt.c" - -/* in pblitr2r.c if GRX_USE_RAM3x8 defined */ -extern void _GrFrDrvPackedBitBltR2Rpl(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y, - int w,int h,GrColor op,int plane); - -static void bitblit(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - int pl; - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) - bitblt(dst,dx,dy,src,sx,sy,w,h,op); - else - for (pl=0; pl < 3; ++pl) - _GrFrDrvPackedBitBltR2Rpl(dst,dx,dy,src,sx,sy,w,h,op,pl); - GRX_LEAVE(); -} - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverRAM3x8 = { - GR_frameRAM3x8, /* frame mode */ - GR_frameUndef, /* compatible RAM frame mode */ - FALSE, /* onscreen */ - 4, /* scan line width alignment */ - 3, /* number of planes */ - 24, /* bits per pixel */ -#ifdef __TURBOC__ - 65520L, /* max plane size the code can handle */ -#else - 8*16*1024L*1024L, /* max plane size the code can handle */ -#endif - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblit, - NULL, - NULL, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; diff --git a/thirdparty/grx249/src/fdrivers/ram4.c b/thirdparty/grx249/src/fdrivers/ram4.c deleted file mode 100644 index f5aa2fa..0000000 --- a/thirdparty/grx249/src/fdrivers/ram4.c +++ /dev/null @@ -1,293 +0,0 @@ -/** - ** ram4.c ---- the 16 color RAM frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "memcopy.h" -#include "memfill.h" - -#include "fdrivers/rblit_14.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) ( umul32((y),(int)(lo)) + ((x)>>3) ) - - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GR_int32u offs; - unsigned mask; - GrColor pix; - GRX_ENTER(); - offs = FOFS(x,y,c->gf_lineoffset); - mask = 0x80 >> (x &= 7); - pix = (GrColor)( - (((c->gf_baseaddr[0][offs] & mask) ) | - ((c->gf_baseaddr[1][offs] & mask) << 1) | - ((c->gf_baseaddr[2][offs] & mask) << 2) | - ((c->gf_baseaddr[3][offs] & mask) << 3) - ) >> (7 - x) - ); - GRX_RETURN(pix); -} - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - GR_int32u offs; - unsigned int mask; - unsigned int cval; - int op; - GRX_ENTER(); - offs = FOFS(x,y,CURC->gc_lineoffset); - mask = 0x80 >> (x &= 7); - cval = (unsigned int)color << (7 - x); - switch(op = C_OPER(color) & 3) { - case C_WRITE: - case C_AND: - CURC->gc_baseaddr[0][offs] &= ((cval ) | ~mask); - CURC->gc_baseaddr[1][offs] &= ((cval >> 1) | ~mask); - CURC->gc_baseaddr[2][offs] &= ((cval >> 2) | ~mask); - CURC->gc_baseaddr[3][offs] &= ((cval >> 3) | ~mask); - if(op != C_WRITE) break; - case C_OR: - CURC->gc_baseaddr[0][offs] |= ((cval ) & mask); - CURC->gc_baseaddr[1][offs] |= ((cval >> 1) & mask); - CURC->gc_baseaddr[2][offs] |= ((cval >> 2) & mask); - CURC->gc_baseaddr[3][offs] |= ((cval >> 3) & mask); - break; - default: - CURC->gc_baseaddr[0][offs] ^= ((cval ) & mask); - CURC->gc_baseaddr[1][offs] ^= ((cval >> 1) & mask); - CURC->gc_baseaddr[2][offs] ^= ((cval >> 2) & mask); - CURC->gc_baseaddr[3][offs] ^= ((cval >> 3) & mask); - break; - } - GRX_LEAVE(); -} - -#define maskoper(d,op,s,msk) do { \ - unsigned char _c_ = peek_b(d); \ - poke_b((d),(_c_ & ~(msk)) | ((_c_ op (s)) & (msk)) ); \ -} while (0) -#define maskset(d,c,msk) \ - poke_b((d),(peek_b(d) & ~(msk)) | ((c) & (msk))) - -static void drawhline(int x,int y,int w,GrColor color) { - int oper, cval, wd, pl; - GR_int32u DO; - GR_int8u lm, rm; - GRX_ENTER(); - oper = C_OPER(color); - cval = (int)color; - DO = FOFS(x,y,CURC->gc_lineoffset); - lm = 0xff >> (x & 7); - rm = 0xff << ((-(w + x)) & 7); - wd = ((x+w+7) >> 3) - (x >> 3); - if (wd == 1) lm &= rm; - for (pl = 0; pl < 4; ++pl) { - GR_int32u cv = cval & 1 ? ~0L : 0L; - cval >>= 1; - if (!( !cv && (oper==C_OR||oper==C_XOR)) && !(cv && oper==C_AND) ) { - GR_int8u far *dptr = (GR_int8u far *)&CURC->gc_baseaddr[pl][DO]; - int ww = wd; - if ( ((GR_int8u)(~lm)) ) { - switch(oper) { - case C_XOR: maskoper(dptr,^,(GR_int8u)cv,lm); break; - case C_OR: maskoper(dptr,|,(GR_int8u)cv,lm); break; - case C_AND: maskoper(dptr,&,(GR_int8u)cv,lm); break; - default: maskset(dptr,(GR_int8u)cv,lm); break; - } - if (!(--ww)) continue; - ++dptr; - } - if ( ((GR_int8u)(~rm)) ) --ww; - if (ww) { - switch(oper) { - case C_XOR: repfill_b_xor(dptr,cv,ww); break; - case C_OR: repfill_b_or( dptr,cv,ww); break; - case C_AND: repfill_b_and(dptr,cv,ww); break; - default: repfill_b( dptr,cv,ww); break; - } - } - if ( ((GR_int8u)(~rm)) ) { - switch(oper) { - case C_XOR: maskoper(dptr,^,(GR_int8u)cv,rm); break; - case C_OR: maskoper(dptr,|,(GR_int8u)cv,rm); break; - case C_AND: maskoper(dptr,&,(GR_int8u)cv,rm); break; - default: maskset(dptr,(GR_int8u)cv,rm); break; - } - } - } - } - GRX_LEAVE(); -} -#undef maskoper - -static void drawvline(int x,int y,int h,GrColor color) -{ - unsigned int lwdt, mask, oper, hh; - char far *p; - GR_int32u offs; - GRX_ENTER(); - oper = C_OPER(color); - lwdt = CURC->gc_lineoffset; - offs = FOFS(x,y,lwdt); - mask = 0x80 >> (x & 7); - switch (oper) { - case C_XOR: - /* no need to xor anything with 0 */ - if (color&1) { - p = &CURC->gc_baseaddr[0][offs]; - hh = h; - colfill_b_xor(p,lwdt,mask,hh); - } - if (color&2) { - p = &CURC->gc_baseaddr[1][offs]; - hh = h; - colfill_b_xor(p,lwdt,mask,hh); - } - if (color&4) { - p = &CURC->gc_baseaddr[2][offs]; - hh = h; - colfill_b_xor(p,lwdt,mask,hh); - } - if (color&8) { - p = &CURC->gc_baseaddr[3][offs]; - colfill_b_xor(p,lwdt,mask,h); - } - break; - case C_OR: - /* no need to or anything with 0 */ - if (color&1) { - p = &CURC->gc_baseaddr[0][offs]; - hh = h; - colfill_b_or(p,lwdt,mask,hh); - } - if (color&2) { - p = &CURC->gc_baseaddr[1][offs]; - hh = h; - colfill_b_or(p,lwdt,mask,hh); - } - if (color&4) { - p = &CURC->gc_baseaddr[2][offs]; - hh = h; - colfill_b_or(p,lwdt,mask,hh); - } - if (color&8) { - p = &CURC->gc_baseaddr[3][offs]; - colfill_b_or(p,lwdt,mask,h); - } - break; - case C_AND: - /* no need to and anything with 1 */ - mask = ~mask; /* set up reset mask */ - if (!(color&1)) { - p = &CURC->gc_baseaddr[0][offs]; - hh = h; - colfill_b_and(p,lwdt,mask,hh); - } - if (!(color&2)) { - p = &CURC->gc_baseaddr[1][offs]; - hh = h; - colfill_b_and(p,lwdt,mask,hh); - } - if (!(color&4)) { - p = &CURC->gc_baseaddr[2][offs]; - hh = h; - colfill_b_and(p,lwdt,mask,hh); - } - if (!(color&8)) { - p = &CURC->gc_baseaddr[3][offs]; - colfill_b_and(p,lwdt,mask,h); - } - break; - default: { - p = &CURC->gc_baseaddr[0][offs]; - hh = h; - if (color&1) colfill_b_or(p,lwdt,mask,hh); - else colfill_b_and(p,lwdt,~mask,hh); - p = &CURC->gc_baseaddr[1][offs]; - hh = h; - if (color&2) colfill_b_or(p,lwdt,mask,hh); - else colfill_b_and(p,lwdt,~mask,hh); - p = &CURC->gc_baseaddr[2][offs]; - hh = h; - if (color&4) colfill_b_or(p,lwdt,mask,hh); - else colfill_b_and(p,lwdt,~mask,hh); - p = &CURC->gc_baseaddr[3][offs]; - if (color&8) colfill_b_or(p,lwdt,mask,h); - else colfill_b_and(p,lwdt,~mask,h); - break; - } - } - GRX_LEAVE(); -} - -static -#include "fdrivers/generic/block.c" - -static -#include "fdrivers/generic/line.c" - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -static -#include "fdrivers/generic/bitblt.c" - -static void bltr2r(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y,int w,int h, - GrColor op) -{ - GRX_ENTER(); - _GR_rblit_14(dst,dx,dy,src,x,y,w,h,op,4,bitblt); - GRX_LEAVE(); -} - -GrFrameDriver _GrFrameDriverRAM4 = { - GR_frameRAM4, /* frame mode */ - GR_frameUndef, /* compatible RAM frame mode */ - FALSE, /* onscreen */ - 4, /* scan line width alignment */ - 4, /* number of planes */ - 4, /* bits per pixel */ -#ifdef __TURBOC__ - 65520L, /* max plane size the code can handle */ -#else - 16*1024L*1024L, /* max plane size the code can handle */ -#endif - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bltr2r, - NULL, - NULL, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; diff --git a/thirdparty/grx249/src/fdrivers/ram8.c b/thirdparty/grx249/src/fdrivers/ram8.c deleted file mode 100644 index b373d1b..0000000 --- a/thirdparty/grx249/src/fdrivers/ram8.c +++ /dev/null @@ -1,89 +0,0 @@ -/** - ** ram8.c ---- the 256 color system RAM frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -/* -------------------------------------------------------------------- */ - -#include "fdrivers/driver8.h" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverRAM8 = { - GR_frameRAM8, /* frame mode */ - GR_frameUndef, /* compatible RAM frame mode */ - FALSE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 8, /* bits per pixel */ -#ifdef __TURBOC__ - 65520L, /* max plane size the code can handle */ -#else - 8*16*1024L*1024L, /* max plane size the code can handle */ -#endif - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblit, - NULL, - NULL, - getindexedscanline, - putscanline -}; - - -/* -------------------------------------------------------------------- */ -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -#ifdef LFB_BY_NEAR_POINTER - -/* always do RAM to RAM blit. May result in ** -** bottom first blits but this shouldn't matter */ - -GrFrameDriver _GrFrameDriverSVGA8_LFB = { - GR_frameSVGA8_LFB, /* frame mode */ - GR_frameRAM8, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 8, /* bits per pixel */ - 8*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblit, - bitblit, - bitblit, - getindexedscanline, - putscanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/rblit_14.c b/thirdparty/grx249/src/fdrivers/rblit_14.c deleted file mode 100644 index ef5cd39..0000000 --- a/thirdparty/grx249/src/fdrivers/rblit_14.c +++ /dev/null @@ -1,166 +0,0 @@ -/** - ** rblit_14.c ---- ram to ram blit support functions for 1bpp and - ** 4bpp RAM frame drivers - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "allocate.h" -#include "arith.h" -#include "mempeek.h" -#include "memcopy.h" -#include "memfill.h" - -#include "fdrivers/rblit_14.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),((x)>>3)) - -#define maskoper(d,op,s,msk) do { \ - unsigned char _c_ = peek_b(d); \ - poke_b((d), (_c_ & ~(msk)) | ((_c_ op (s)) & (msk))); \ - } while (0) -#define maskset(d,c,msk) \ - poke_b((d),(peek_b(d) & ~(msk)) | ((c) & (msk))) - -static char far *LineBuff = NULL; - -static int do_alloc(int width) { - size_t bytes; - GRX_ENTER(); - bytes = sizeof(char) * (((width+7) >> 3)+2); - LineBuff = _GrTempBufferAlloc(bytes); - GRX_RETURN(LineBuff != NULL); -} - - -static void get_scanline(char far *dptr, char far *sptr, int w) { - GRX_ENTER(); - fwdcopy_set(sptr,dptr,sptr,w); - GRX_LEAVE(); -} - -static void put_scanline(char far *dptr,char far *sptr,int w, - GR_int8u lm, GR_int8u rm, int op ) { - GRX_ENTER(); - if (w==1) lm &= rm; - if ( ((GR_int8u)(~lm)) ) { - switch (op) { - case C_XOR: maskoper(dptr,^,*sptr,lm); break; - case C_OR : maskoper(dptr,|,*sptr,lm); break; - case C_AND: maskoper(dptr,&,*sptr,lm); break; - default : maskset(dptr,*sptr,lm); break; - } - if (--w == 0) goto done; - ++dptr; - ++sptr; - } - if ( ((GR_int8u)(~rm)) ) --w; - if (w) switch (op) { - case C_XOR: fwdcopy_xor(dptr,dptr,sptr,w); break; - case C_OR : fwdcopy_or( dptr,dptr,sptr,w); break; - case C_AND: fwdcopy_and(dptr,dptr,sptr,w); break; - default : fwdcopy_set(dptr,dptr,sptr,w); break; - } - if ( ((GR_int8u)(~rm)) ) - switch (op) { - case C_XOR: maskoper(dptr,^,*sptr,rm); break; - case C_OR : maskoper(dptr,|,*sptr,rm); break; - case C_AND: maskoper(dptr,&,*sptr,rm); break; - default : maskset(dptr,*sptr,rm); break; - } -done: - GRX_LEAVE(); -} - - -extern void _GR_shift_scanline(GR_int8u far **dst, - GR_int8u far **src, - int ws, int shift, int planes ); -#define shift_scanline(dst,src,w,sh) \ - _GR_shift_scanline((GR_int8u **)&(dst),(GR_int8u **)&(src),(w),(sh),1) - - -void _GR_rblit_14(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y,int w,int h, - GrColor op, int planes, _GR_blitFunc bitblt) -{ - int pl; - GRX_ENTER(); - if(GrColorMode(op) != GrIMAGE && do_alloc(w)) { - GR_int32u doffs, soffs; - int oper = C_OPER(op); - int shift = ((int)(x&7)) - ((int)(dx&7)); - GR_int8u lm = 0xff >> (dx & 7); - GR_int8u rm = 0xff << ((-(w + dx)) & 7); - int ws = ((x+w+7) >> 3) - (x >> 3); - int wd = ((dx+w+7) >> 3) - (dx >> 3); - int dskip = dst->gf_lineoffset; - int sskip = src->gf_lineoffset; - if ((dy>y) && (dst->gf_baseaddr[0]==src->gf_baseaddr[0])) { - /* reverse */ - dy += h-1; - y += h-1; - doffs = FOFS(dx,dy,dskip); - soffs = FOFS( x, y,sskip); - for (pl=0; pl < planes; ++pl) { - char far *dptr = &dst->gf_baseaddr[pl][doffs]; - char far *sptr = &src->gf_baseaddr[pl][soffs]; - int hh = h; - if (shift) { - while (hh-- > 0) { - shift_scanline(LineBuff,sptr,ws,shift); - put_scanline(dptr,LineBuff,wd,lm,rm,oper); - dptr -= dskip; - sptr -= sskip; - } - } else { - while (hh-- > 0) { - get_scanline(LineBuff, sptr, ws); - put_scanline(dptr,LineBuff,wd,lm,rm,oper); - dptr -= dskip; - sptr -= sskip; - } - } - } - } else { - /* forward */ - doffs = FOFS(dx,dy,dst->gf_lineoffset); - soffs = FOFS( x, y,src->gf_lineoffset); - for (pl=0; pl < planes; ++pl) { - char far *dptr = &dst->gf_baseaddr[pl][doffs]; - char far *sptr = &src->gf_baseaddr[pl][soffs]; - int hh = h; - if (shift) { - while (hh-- > 0) { - shift_scanline(LineBuff,sptr,ws,shift); - put_scanline(dptr,LineBuff,wd,lm,rm,oper); - dptr += dskip; - sptr += sskip; - } - } else { - while (hh-- > 0) { - put_scanline(dptr,sptr,wd,lm,rm,oper); - dptr += dskip; - sptr += sskip; - } - } - } - } - } else - bitblt(dst,dx,dy,src,x,y,w,h,op); - GRX_LEAVE(); -} diff --git a/thirdparty/grx249/src/fdrivers/rblit_14.h b/thirdparty/grx249/src/fdrivers/rblit_14.h deleted file mode 100644 index 9e42fcc..0000000 --- a/thirdparty/grx249/src/fdrivers/rblit_14.h +++ /dev/null @@ -1,21 +0,0 @@ -/** - ** rblit_14.h ---- ram to ram blit support functions for 1bpp and - ** 4bpp RAM frame drivers - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -void _GR_rblit_14(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y,int w,int h, - GrColor op, int planes, _GR_blitFunc bitblt); diff --git a/thirdparty/grx249/src/fdrivers/sdl16.c b/thirdparty/grx249/src/fdrivers/sdl16.c deleted file mode 100644 index bb4077a..0000000 --- a/thirdparty/grx249/src/fdrivers/sdl16.c +++ /dev/null @@ -1,65 +0,0 @@ -/** - ** sdl16.c ---- the 32768/65536 color SDL frame buffer driver - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* -------------------------------------------------------------------- */ - - -#define FAR_ACCESS -#include "fdrivers/driver16.h" - -static -#include "fdrivers/generic/putscl.c" - -#include "fdrivers/sdlframe.h" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverSDL16 = { - GR_frameSDL16, /* frame mode */ - GR_frameRAM16, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 16, /* bits per pixel */ - 16*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - sdl_drawpixel, - sdl_drawline, - sdl_drawhline, - sdl_drawvline, - sdl_drawblock, - sdl_drawbitmap, - sdl_drawpattern, - sdl_bitblt, - bltv2r, - sdl_bltr2v, - _GrFrDrvGenericGetIndexedScanline, - sdl_putscanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/sdl24.c b/thirdparty/grx249/src/fdrivers/sdl24.c deleted file mode 100644 index 43ab073..0000000 --- a/thirdparty/grx249/src/fdrivers/sdl24.c +++ /dev/null @@ -1,64 +0,0 @@ -/** - ** sdl24.c ---- the 16M color SDL frame buffer driver - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* -------------------------------------------------------------------- */ - -#define FAR_ACCESS -#include "fdrivers/driver24.h" - -static -#include "fdrivers/generic/putscl.c" - -#include "fdrivers/sdlframe.h" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverSDL24 = { - GR_frameSDL24, /* frame mode */ - GR_frameRAM24, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 24, /* bits per pixel */ - 24*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - sdl_drawpixel, - sdl_drawline, - sdl_drawhline, - sdl_drawvline, - sdl_drawblock, - sdl_drawbitmap, - sdl_drawpattern, - sdl_bitblt, - bltv2r, - sdl_bltr2v, - _GrFrDrvGenericGetIndexedScanline, - sdl_putscanline -}; - -#endif /* !defined(LFB_BY_NEAR_POINTER) */ diff --git a/thirdparty/grx249/src/fdrivers/sdl32h.c b/thirdparty/grx249/src/fdrivers/sdl32h.c deleted file mode 100644 index 6f9fe23..0000000 --- a/thirdparty/grx249/src/fdrivers/sdl32h.c +++ /dev/null @@ -1,66 +0,0 @@ -/** - ** sdl32h.c ---- the 16M color padded SDL frame buffer driver (high) - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* -------------------------------------------------------------------- */ - -#define PIX2COL(col) ((col)>>8) -#define COL2PIX(col) ((col)<<8) -#define FAR_ACCESS -#include "fdrivers/driver32.h" - -static -#include "fdrivers/generic/putscl.c" - -#include "fdrivers/sdlframe.h" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverSDL32H = { - GR_frameSDL32H, /* frame mode */ - GR_frameRAM32H, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ - 32*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - sdl_drawpixel, - sdl_drawline, - sdl_drawhline, - sdl_drawvline, - sdl_drawblock, - sdl_drawbitmap, - sdl_drawpattern, - sdl_bitblt, - bltv2r, - sdl_bltr2v, - _GrFrDrvGenericGetIndexedScanline, - sdl_putscanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/sdl32l.c b/thirdparty/grx249/src/fdrivers/sdl32l.c deleted file mode 100644 index a9aa717..0000000 --- a/thirdparty/grx249/src/fdrivers/sdl32l.c +++ /dev/null @@ -1,66 +0,0 @@ -/** - ** sdl32l.c ---- the 16M color padded SDL frame buffer driver (low) - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* -------------------------------------------------------------------- */ - -#define PIX2COL(col) ((col)&0xFFFFFF) -#define COL2PIX(col) ((col)&0xFFFFFF) -#define FAR_ACCESS -#include "fdrivers/driver32.h" - -static -#include "fdrivers/generic/putscl.c" - -#include "fdrivers/sdlframe.h" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverSDL32L = { - GR_frameSDL32L, /* frame mode */ - GR_frameRAM32L, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ - 32*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - sdl_drawpixel, - sdl_drawline, - sdl_drawhline, - sdl_drawvline, - sdl_drawblock, - sdl_drawbitmap, - sdl_drawpattern, - sdl_bitblt, - bltv2r, - sdl_bltr2v, - _GrFrDrvGenericGetIndexedScanline, - sdl_putscanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/sdl8.c b/thirdparty/grx249/src/fdrivers/sdl8.c deleted file mode 100644 index 94b0bf4..0000000 --- a/thirdparty/grx249/src/fdrivers/sdl8.c +++ /dev/null @@ -1,62 +0,0 @@ -/** - ** sdl8.c ---- the 256 color SDL frame buffer driver - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* some systems map LFB in normal user space (eg. Linux/svgalib) */ -/* near pointer stuff is equal to ram stuff :) */ -/* in this is the far pointer code using %fs descriptor */ -#ifndef LFB_BY_NEAR_POINTER - -#ifdef __TURBOC__ -#error This library will not work with as a 16-bit real-mode code -#endif - -/* -------------------------------------------------------------------- */ - -#define FAR_ACCESS -#include "fdrivers/driver8.h" - -#define bitblt bitblit -#include "fdrivers/sdlframe.h" - -/* -------------------------------------------------------------------- */ - -GrFrameDriver _GrFrameDriverSDL8 = { - GR_frameSDL8, /* frame mode */ - GR_frameRAM8, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 8, /* bits per pixel */ - 8*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - sdl_drawpixel, - sdl_drawline, - sdl_drawhline, - sdl_drawvline, - sdl_drawblock, - sdl_drawbitmap, - sdl_drawpattern, - sdl_bitblt, - bltv2r, - sdl_bltr2v, - getindexedscanline, - sdl_putscanline -}; - -#endif diff --git a/thirdparty/grx249/src/fdrivers/sdlframe.h b/thirdparty/grx249/src/fdrivers/sdlframe.h deleted file mode 100644 index 9c3891b..0000000 --- a/thirdparty/grx249/src/fdrivers/sdlframe.h +++ /dev/null @@ -1,99 +0,0 @@ -/** - ** sdlframe.h ---- the SDL wrapper for linear framebuffer drivers - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Using SDL_FillRect() does not provide any speedup above the margin - ** of error. Our main problem is sdl_drawpixel() and sdl_drawline() - ** being too slow in windowed modes. - ** - **/ - -#include "libsdl.h" -#include "memcopy.h" - -static INLINE void sdl_drawpixel(int x, int y, GrColor color) -{ - drawpixel(x, y, color); - SDL_UpdateRect(_SGrScreen, x, y, 1, 1); -} - -static void sdl_drawline(int x, int y, int dx, int dy, GrColor color) -{ - drawline(x, y, dx, dy, color); - - if(dx < 0) { - x += dx; - dx = -dx; - } - if(dy < 0) { - y += dy; - dy = -dy; - } - - SDL_UpdateRect(_SGrScreen, x, y, dx + 1, dy + 1); -} - -static INLINE void sdl_drawhline(int x, int y, int w, GrColor color) -{ - drawhline(x, y, w, color); - SDL_UpdateRect(_SGrScreen, x, y, w, 1); -} - -static INLINE void sdl_drawvline(int x, int y, int h, GrColor color) -{ - drawvline(x, y, h, color); - SDL_UpdateRect(_SGrScreen, x, y, 1, h); -} - -static INLINE void sdl_drawblock(int x, int y, int w, int h, GrColor color) -{ - drawblock(x, y, w, h, color); - SDL_UpdateRect(_SGrScreen, x, y, w, h); -} - -static INLINE void sdl_drawbitmap(int x, int y, int w, int h, char far *bmp, - int pitch, int start, GrColor fg, GrColor bg) -{ - drawbitmap(x, y, w, h, bmp, pitch, start, fg, bg); - SDL_UpdateRect(_SGrScreen, x, y, w, h); -} - -static INLINE void sdl_drawpattern(int x, int y, int w, char patt, GrColor fg, - GrColor bg) -{ - drawpattern(x, y, w, patt, fg, bg); - SDL_UpdateRect(_SGrScreen, x, y, w, 1); -} - -static INLINE void sdl_bitblt(GrFrame *dst, int dx, int dy, GrFrame *src, - int sx, int sy,int w,int h, GrColor op) -{ - bitblt(dst, dx, dy, src, sx, sy, w, h, op); - SDL_UpdateRect(_SGrScreen, dx, dy, w, h); -} - -static INLINE void sdl_bltr2v(GrFrame *dst, int dx, int dy, GrFrame *src, - int sx, int sy, int w, int h, GrColor op) -{ - bltr2v(dst, dx, dy, src, sx, sy, w, h, op); - SDL_UpdateRect(_SGrScreen, dx, dy, w, h); -} - -static INLINE void sdl_putscanline(int x, int y, int w, const GrColor far *scl, - GrColor op) -{ - putscanline(x, y, w, scl, op); - SDL_UpdateRect(_SGrScreen, x, y, w, 1); -} diff --git a/thirdparty/grx249/src/fdrivers/svga16.c b/thirdparty/grx249/src/fdrivers/svga16.c deleted file mode 100644 index f27c7fe..0000000 --- a/thirdparty/grx249/src/fdrivers/svga16.c +++ /dev/null @@ -1,435 +0,0 @@ -/** - ** svga18.c ---- the 32768/65536 color Super VGA frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifdef __TURBOC__ -#pragma inline -#endif - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "mempeek.h" -#include "memfill.h" - -#if BYTE_ORDER!=HARDWARE_BYTE_ORDER -#error Mismatching byte order between ram and video ram ! -#endif - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),((x) << 1)) - - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GR_int32u offs; - GRX_ENTER(); - offs = FOFS(x,y,SCRN->gc_lineoffset); - CHKBANK(BANKNUM(offs)); - setup_far_selector(SCRN->gc_selector); - GRX_RETURN((GR_int16u)peek_w_f(&SCRN->gc_baseaddr[0][BANKPOS(offs)])); -} - - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - GR_int32u offs; - char far *ptr; - GRX_ENTER(); - offs = FOFS(x,y,CURC->gc_lineoffset); - ptr = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - setup_far_selector(CURC->gc_selector); - switch(C_OPER(color)) { - case C_XOR: poke_w_f_xor(ptr,(GR_int16u)color); break; - case C_OR: poke_w_f_or( ptr,(GR_int16u)color); break; - case C_AND: poke_w_f_and(ptr,(GR_int16u)color); break; - default: poke_w_f( ptr,(GR_int16u)color); break; - } - GRX_LEAVE(); -} - - -static void drawhline(int x,int y,int w,GrColor color) -{ - GR_int32u offs; - GR_repl cval; - unsigned int w1,w2; - GRX_ENTER(); - offs = FOFS(x,y,CURC->gc_lineoffset); - w2 = BANKLFT(offs) >> 1; - w2 = w - (w1 = umin(w,w2)); - cval = freplicate_w(color); - setup_far_selector(CURC->gc_selector); - do { - char far *pp = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - offs += (w1 << 1); - switch(C_OPER(color)) { - case C_XOR: repfill_w_f_xor(pp,cval,w1); break; - case C_OR: repfill_w_f_or( pp,cval,w1); break; - case C_AND: repfill_w_f_and(pp,cval,w1); break; - default: repfill_w_f( pp,cval,w1); break; - } - w1 = w2; - w2 = 0; - } while(w1 != 0); - GRX_LEAVE(); -} - - -static void drawvline(int x,int y,int h,GrColor color) -{ - unsigned int lwdt; - GR_int32u offs; - GRX_ENTER(); - lwdt = CURC->gc_lineoffset; - offs = FOFS(x,y,lwdt); - setup_far_selector(CURC->gc_selector); - do { - char far *pp = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - unsigned int h1 = BANKLFT(offs) / lwdt; - h -= (h1 = umin(h,umax(h1,1))); - CHKBANK(BANKNUM(offs)); - offs += (h1 * lwdt); - switch(C_OPER(color)) { - case C_XOR: colfill_w_f_xor(pp,lwdt,(GR_int16u)color,h1); break; - case C_OR: colfill_w_f_or( pp,lwdt,(GR_int16u)color,h1); break; - case C_AND: colfill_w_f_and(pp,lwdt,(GR_int16u)color,h1); break; - default: colfill_w_f( pp,lwdt,(GR_int16u)color,h1); break; - } - } while(h != 0); - GRX_LEAVE(); -} - - -static void drawblock(int x,int y,int w,int h,GrColor color) -{ - GR_int32u offs; - GR_repl cval; - int copr, skip; - GRX_ENTER(); - skip = CURC->gc_lineoffset; - offs = FOFS(x,y,skip); - skip -= w << 1; - cval = freplicate_w(color); - copr = C_OPER(color); - setup_far_selector(CURC->gc_selector); - do { - unsigned int w1,w2 = BANKLFT(offs) >> 1; - w2 = w - (w1 = umin(w,w2)); - do { - char far *pp = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - offs += (w1 << 1); - switch(copr) { - case C_XOR: repfill_w_f_xor(pp,cval,w1); break; - case C_OR: repfill_w_f_or( pp,cval,w1); break; - case C_AND: repfill_w_f_and(pp,cval,w1); break; - default: repfill_w_f( pp,cval,w1); break; - } - w1 = w2; - w2 = 0; - } while(w1 != 0); - offs += skip; - } while(--h != 0); - GRX_LEAVE(); -} - - -#if !defined(__WATCOMC__) && (defined(__DJGPP__) || defined(__TURBOC__)) -/* The VGA banked frame buffer must start on a 64k boundary -** for this optimized assembler code. -** Linux: mmap may place the frame buffer on a 4k boundary :( -** Watcom C++: Can't use ES register :( -*/ -static void drawline(int x,int y,int dx,int dy,GrColor color) -{ - struct { - int errsub; /* subtract from error term */ - int erradd; /* add to error term when carry */ - int offset1; /* add to pointer if no carry on error term */ - int offset2; /* add to pointer if carry / banking dir */ - } lndata; - long offs; - int npts,error,xstep; - char far *ptr; - - GRX_ENTER(); - -# ifdef __GNUC__ -# ifdef __i386__ -# define ASM_LINE1(OPC) asm volatile("" \ - " .align 2,0x90 \n" \ - "0: "#OPC"w %6,"I386_GCC_FAR_SELECTOR"(%0) \n" \ - " subl %7,%2 \n" \ - " jb 1f \n" \ - " subw $2,%3 \n" \ - " jb 2f \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 4f \n" \ - " .align 2,0x90 \n" \ - "1: addl 4 + %7,%2 \n" \ - " addw 12 + %7,%3 \n" \ - " jb 3f \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 4f \n" \ - "2: negl 8 + %7 \n" \ - "3: decl %1 \n" \ - "4: " \ - : "=r" (ptr), "=r" (npts), "=r" (error) \ - : "0" ((short)(long)(ptr)), "1" (npts), "2" (error), \ - "r" ((short)(color)), "o" (lndata) \ - ) -# define ASM_LINE2(OPC) asm volatile("" \ - " .align 2,0x90 \n" \ - "0: "#OPC"w %6,"I386_GCC_FAR_SELECTOR"(%0) \n" \ - " subl %7,%2 \n" \ - " jb 1f \n" \ - " addw 8 + %7,%3 \n" \ - " jb 2f \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 3f \n" \ - " .align 2,0x90 \n" \ - "1: addl 4 + %7,%2 \n" \ - " addw 12 + %7,%3 \n" \ - " jb 2f \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 3f \n" \ - "2: decl %1 \n" \ - "3: " \ - : "=r" (ptr), "=r" (npts), "=r" (error) \ - : "0" ((short)(long)(ptr)), "1" (npts), "2" (error), \ - "r" ((short)(color)), "o" (lndata) \ - ) -# endif -# endif -# ifdef __TURBOC__ -# define ASM_LINE1(OPC) { \ - _ES = FP_SEG(ptr); \ - _BX = FP_OFF(ptr); \ - _CX = npts; \ - _DX = error; \ - _AX = (int)color; \ - OPC##1loop: \ - asm OPC word ptr es:[bx],ax; \ - asm sub dx,word ptr lndata.errsub; \ - asm jb OPC##1adjust; \ - asm sub bx,2; \ - asm jb OPC##1newbank1; \ - asm loop OPC##1loop; \ - asm jmp OPC##1done; \ - OPC##1adjust: \ - asm add dx,word ptr lndata.erradd; \ - asm add bx,word ptr lndata.offset2; \ - asm jb OPC##1newbank2; \ - asm loop OPC##1loop; \ - asm jmp OPC##1done; \ - OPC##1newbank1: \ - asm neg word ptr lndata.offset1; \ - OPC##1newbank2: \ - asm dec cx; \ - OPC##1done: \ - *((short *)(&ptr)) = _BX; \ - npts = _CX; \ - error = _DX; \ - } -# define ASM_LINE2(OPC) { \ - _ES = FP_SEG(ptr); \ - _BX = FP_OFF(ptr); \ - _CX = npts; \ - _DX = error; \ - _AX = (int)color; \ - OPC##2loop: \ - asm OPC word ptr es:[bx],ax; \ - asm sub dx,word ptr lndata.errsub; \ - asm jb OPC##2adjust; \ - asm add bx,word ptr lndata.offset1; \ - asm jb OPC##2newbank; \ - asm loop OPC##2loop; \ - asm jmp OPC##2done; \ - OPC##2adjust: \ - asm add dx,word ptr lndata.erradd; \ - asm add bx,word ptr lndata.offset2; \ - asm jb OPC##2newbank; \ - asm loop OPC##2loop; \ - asm jmp OPC##2done; \ - OPC##2newbank: \ - asm dec cx; \ - OPC##2done: \ - *((short *)(&ptr)) = _BX; \ - npts = _CX; \ - error = _DX; \ - } -# endif - - if(dy < 0) { - y -= (dy = (-dy)); - x -= (dx = (-dx)); - } - if(dx < 0) { - xstep = (-2); - dx = (-dx); - } else - xstep = 2; - - offs = FOFS(x,y,CURC->gc_lineoffset); - ptr = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - setup_far_selector(CURC->gc_selector); - if(dx > dy) { - npts = dx + 1; - error = dx >> 1; - lndata.errsub = dy; - lndata.erradd = dx; - lndata.offset1 = xstep; - lndata.offset2 = CURC->gc_lineoffset + xstep; - if(xstep < 0) { - again_nonlinear: - lndata.offset1 = 1; - switch(C_OPER(color)) { - case C_XOR: ASM_LINE1(xor); break; - case C_OR: ASM_LINE1(or); break; - case C_AND: ASM_LINE1(and); break; - default: ASM_LINE1(mov); break; - } - if(npts == 0) goto done; - SETBANK(DRVINFO->curbank + lndata.offset1); - goto again_nonlinear; - } - } - else { - npts = dy + 1; - error = dy >> 1; - lndata.errsub = dx; - lndata.erradd = dy; - lndata.offset1 = CURC->gc_lineoffset; - lndata.offset2 = CURC->gc_lineoffset + xstep; - } - again_linear: - switch(C_OPER(color)) { - case C_XOR: ASM_LINE2(xor); break; - case C_OR: ASM_LINE2(or); break; - case C_AND: ASM_LINE2(and); break; - default: ASM_LINE2(mov); break; - } - if(npts == 0) goto done; - SETBANK(DRVINFO->curbank + 1); - goto again_linear; - done: - GRX_LEAVE(); -} -#else -static -#include "fdrivers/generic/line.c" -#endif - - -static -#include "fdrivers/generic/bitmap.c" - - -static -#include "fdrivers/generic/pattern.c" - - -static void bitblt(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltV2V( - dst,(dx << 1),dy, - src,(sx << 1),sy, - (w << 1),h, - op - ); - GRX_LEAVE(); -} - - -static void bltv2r(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltV2R( - dst,(dx << 1),dy, - src,(sx << 1),sy, - (w << 1),h, - op - ); - GRX_LEAVE(); -} - - -static void bltr2v(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltR2V( - dst,(dx << 1),dy, - src,(sx << 1),sy, - (w << 1),h, - op - ); - GRX_LEAVE(); -} - - -GrFrameDriver _GrFrameDriverSVGA16 = { - GR_frameSVGA16, /* frame mode */ - GR_frameRAM16, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 16, /* bits per pixel */ - 16*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; diff --git a/thirdparty/grx249/src/fdrivers/svga24.c b/thirdparty/grx249/src/fdrivers/svga24.c deleted file mode 100644 index 4bdcf4e..0000000 --- a/thirdparty/grx249/src/fdrivers/svga24.c +++ /dev/null @@ -1,406 +0,0 @@ -/** - ** svga24.c ---- the 16M color Super VGA frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "mempeek.h" -#include "memfill.h" -#include "access24.h" - -#if BYTE_ORDER!=HARDWARE_BYTE_ORDER -#error Mismatching byte order between ram and video ram ! -#endif - -/* helper ... */ -#define MULT3(x) ( (x)+(x)+(x) ) -#ifdef __TURBOC__ -#define REMAIN3(x) ( ((unsigned int)(x)) % 3 ) -#else -#define REMAIN3(x) ( (x) % 3 ) -#endif - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),MULT3(x)) - - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GrColor cval; - GR_int32u offs; - int bank; - char far *p; - GRX_ENTER(); - cval = (GrColor)0; - offs = FOFS(x,y,SCRN->gc_lineoffset); - bank = BANKNUM(offs); - p = &SCRN->gc_baseaddr[0][BANKPOS(offs)]; - setup_far_selector(SCRN->gc_selector); - CHKBANK(bank); - switch (BANKLFT(offs)) { - case 1 : cval = peek_b_f(p); - ++bank; - SETBANK(bank); - p = SCRN->gc_baseaddr[0]; - cval |= ((GR_int32u)peek_w_f(p)) << 8; - break; - case 2 : cval = peek_w_f(p); - ++bank; - SETBANK(bank); - p = SCRN->gc_baseaddr[0]; - WR24BYTE(cval,2,peek_b_f(p)); - break; -#ifdef PEEK_24_F_READS_ONE_MORE - case 3 : cval = peek_w_f(p); - WR24BYTE(cval,2,peek_b_f(p+2)); - break; -#endif - default: cval = peek_24_f(p); - break; - } - GRX_RETURN(cval); -} - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - GR_int32u offs; - int bank; - char far *p; - GRX_ENTER(); - offs = FOFS(x,y,CURC->gc_lineoffset); - p = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - setup_far_selector(CURC->gc_selector); - bank = BANKNUM(offs); - CHKBANK(bank); - switch(C_OPER(color)) { - case C_XOR: - switch (BANKLFT(offs)) { - case 1: - poke_b_f_xor(p,(GR_int8u)color); - SETBANK(++bank); - p = SCRN->gc_baseaddr[0]; - poke_b_f_xor(p,RD24BYTE(color,1)); - poke_b_f_xor(p+1,RD24BYTE(color,2)); - break; - case 2: - poke_w_f_xor(p,(GR_int16u)color); - SETBANK(++bank); - p = SCRN->gc_baseaddr[0]; - poke_b_f_xor(p,RD24BYTE(color,2)); - break; - default: - poke_24_f_xor(p,color); - break; - } - break; - case C_OR: - switch (BANKLFT(offs)) { - case 1: - poke_b_f_or(p,(GR_int8u)color); - SETBANK(++bank); - p = SCRN->gc_baseaddr[0]; - poke_b_f_or(p,RD24BYTE(color,1)); - poke_b_f_or(p+1,RD24BYTE(color,2)); - break; - case 2: - poke_w_f_or(p,(GR_int16u)color); - SETBANK(++bank); - p = SCRN->gc_baseaddr[0]; - poke_b_f_or(p,RD24BYTE(color,2)); - break; - default: - poke_24_f_or(p,color); - break; - } - break; - case C_AND: - switch (BANKLFT(offs)) { - case 1: - poke_b_f_and(p,(GR_int8u)color); - SETBANK(++bank); - p = SCRN->gc_baseaddr[0]; - poke_b_f_and(p,RD24BYTE(color,1)); - poke_b_f_and(p+1,RD24BYTE(color,2)); - break; - case 2: - poke_w_f_and(p,(GR_int16u)color); - SETBANK(++bank); - p = SCRN->gc_baseaddr[0]; - poke_b_f_and(p,RD24BYTE(color,2)); - break; - default: - poke_24_f_and(p,color); - break; - } - break; - default: - switch (BANKLFT(offs)) { - case 1: - poke_b_f(p,(GR_int8u)color); - SETBANK(++bank); - p = SCRN->gc_baseaddr[0]; - poke_b_f(p,RD24BYTE(color,1)); - poke_b_f(p+1,RD24BYTE(color,2)); - break; - case 2: - poke_w_f(p,(GR_int16u)color); - SETBANK(++bank); - p = SCRN->gc_baseaddr[0]; - poke_b_f(p,RD24BYTE(color,2)); - break; - default: - poke_24_f(p,color); - break; - } - break; - } - GRX_LEAVE(); -} - - -static void drawhline(int x,int y,int w,GrColor color) -{ - char far *p; - int op, bank; - unsigned int w1, w2; - GR_int32u offs; - GR_int8u c2; - - GRX_ENTER(); - op = C_OPER(color); - offs = FOFS(x,y,CURC->gc_lineoffset); - p = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - setup_far_selector(CURC->gc_selector); - - c2 = RD24BYTE(color,2); - bank = BANKNUM(offs); - CHKBANK(bank); - w = MULT3(w); -# ifndef GRX_HAVE_FAST_REPFILL24 - if (c2 == RD24BYTE(color,0) && c2 == RD24BYTE(color,1) ) { - GR_repl cval = freplicate_b(c2); - w1 = BANKLFT(offs); - w2 = w - (w1 = umin(w,w1)); - for (;;) { - switch(op) { - case C_XOR: repfill_b_f_xor(p,cval,w1); break; - case C_OR: repfill_b_f_or( p,cval,w1); break; - case C_AND: repfill_b_f_and(p,cval,w1); break; - default: repfill_b_f( p,cval,w1); break; - } - if (!w2) break; - w1 = w2; - w2 = 0; - ++bank; - SETBANK(bank); - p = CURC->gc_baseaddr[0]; - } - goto done; - } -# endif - for (;;) { - w1 = BANKLFT(offs); - w1 = umin(w,w1); - w -= w1; - if (w1 <= 3) { - /* make sure we don't run in problems on first pixel */ - w2 = w1; - switch (w1) { - case 1 : switch (op) { - case C_XOR: poke_b_f_xor(p,color); break; - case C_OR: poke_b_f_or( p,color); break; - case C_AND: poke_b_f_and(p,color); break; - default: poke_b_f_set(p,color); break; - } - break; - case 2 : switch (op) { - case C_XOR: poke_w_f_xor(p,color); break; - case C_OR: poke_w_f_or( p,color); break; - case C_AND: poke_w_f_and(p,color); break; - default: poke_w_f_set(p,color); break; - } - break; - case 3 : switch (op) { - case C_XOR: poke_24_f_xor(p,color); break; - case C_OR: poke_24_f_or( p,color); break; - case C_AND: poke_24_f_and(p,color); break; - default: poke_24_f_set(p,color); break; - } - goto next_bank; - } - goto complete; - } - if (w) w2 = REMAIN3(w1); - else w2 = 0; - switch (op) { - case C_XOR: repfill_24_f_xor(p,color,w1); break; - case C_OR: repfill_24_f_or( p,color,w1); break; - case C_AND: repfill_24_f_and(p,color,w1); break; - default: repfill_24_f_set(p,color,w1); break; - } - if (w2) { - /* complete pixel on next bank */ - complete: - bank++; - SETBANK(bank); - p = CURC->gc_baseaddr[0]; - switch (w2) { - case 1 : offs = 2; - switch (op) { - case C_XOR: poke_w_f_xor(p,color>>8); break; - case C_OR: poke_w_f_or( p,color>>8); break; - case C_AND: poke_w_f_and(p,color>>8); break; - default: poke_w_f_set(p,color>>8); break; - } - if ( !(w-=2) ) goto done; - p += 2; - break; - case 2 : offs = 1; - switch (op) { - case C_XOR: poke_b_f_xor(p,c2); break; - case C_OR: poke_b_f_or( p,c2); break; - case C_AND: poke_b_f_and(p,c2); break; - default: poke_b_f_set(p,c2); break; - } - if ( !(--w) ) goto done; - ++p; - break; - } - continue; - } - next_bank: - if (!w) goto done; - bank++; - SETBANK(bank); - p = CURC->gc_baseaddr[0]; - offs = 0; - } - done: - GRX_LEAVE(); -} - -static -#include "fdrivers/generic/vline.c" - -static -#include "fdrivers/generic/block.c" - -static -#include "fdrivers/generic/line.c" - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -static void bitblt(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltV2V( - dst,MULT3(dx),dy, - src,MULT3(sx),sy, - MULT3(w),h, - op - ); - GRX_LEAVE(); -} - -#ifndef GRX_USE_RAM3x8 - -static void bltv2r(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltV2R( - dst,MULT3(dx),dy, - src,MULT3(sx),sy, - MULT3(w),h, - op - ); - GRX_LEAVE(); -} - -static void bltr2v(GrFrame *dst,int dx,int dy,GrFrame *src,int sx,int sy,int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) _GrFrDrvGenericBitBlt( - dst,dx,dy, - src,sx,sy, - w,h, - op - ); - else _GrFrDrvPackedBitBltR2V( - dst,MULT3(dx),dy, - src,MULT3(sx),sy, - MULT3(w),h, - op - ); - GRX_LEAVE(); -} - -#endif /* !GRX_USE_RAM3x8 */ - -GrFrameDriver _GrFrameDriverSVGA24 = { - GR_frameSVGA24, /* frame mode */ -#ifdef GRX_USE_RAM3x8 - GR_frameRAM3x8, /* compatible RAM frame mode */ -#else - GR_frameRAM24, /* compatible RAM frame mode */ -#endif - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 24, /* bits per pixel */ - 24*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, -#ifdef GRX_USE_RAM3x8 - _GrFrDrvGenericBitBlt, - _GrFrDrvGenericBitBlt, -#else - bltv2r, - bltr2v, -#endif - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; diff --git a/thirdparty/grx249/src/fdrivers/svga32h.c b/thirdparty/grx249/src/fdrivers/svga32h.c deleted file mode 100644 index b6a45f7..0000000 --- a/thirdparty/grx249/src/fdrivers/svga32h.c +++ /dev/null @@ -1,60 +0,0 @@ -/** - ** svga32h.c ---- the 16M color padded Super VGA frame driver (high) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -#define PIX2COL(col) ((col)>>8) -#define COL2PIX(col) ((col)<<8) - -#include "fdrivers/banked32.h" - -GrFrameDriver _GrFrameDriverSVGA32H = { - GR_frameSVGA32H, /* frame mode */ -#ifdef GRX_USE_RAM3x8 - GR_frameRAM3x8, /* compatible RAM frame mode */ -#else - GR_frameRAM32H, /* compatible RAM frame mode */ -#endif - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ - 32*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, -#ifdef GRX_USE_RAM3x8 - _GrFrDrvGenericBitBlt, - _GrFrDrvGenericBitBlt, -#else - bltv2r, - bltr2v, -#endif - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - diff --git a/thirdparty/grx249/src/fdrivers/svga32l.c b/thirdparty/grx249/src/fdrivers/svga32l.c deleted file mode 100644 index 97a0f26..0000000 --- a/thirdparty/grx249/src/fdrivers/svga32l.c +++ /dev/null @@ -1,59 +0,0 @@ -/** - ** svga32l.c ---- the 16M color padded Super VGA frame driver (low) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - **/ - -#define PIX2COL(col) ((col)&((GrColor)0xFFFFFFUL)) -#define COL2PIX(col) ((col)&((GrColor)0xFFFFFFUL)) - -#include "fdrivers/banked32.h" - -GrFrameDriver _GrFrameDriverSVGA32L = { - GR_frameSVGA32L, /* frame mode */ -#ifdef GRX_USE_RAM3x8 - GR_frameRAM3x8, /* compatible RAM frame mode */ -#else - GR_frameRAM32L, /* compatible RAM frame mode */ -#endif - TRUE, /* onscreen */ - 4, /* line width alignment */ - 1, /* number of planes */ - 32, /* bits per pixel */ - 32*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bitblt, -#ifdef GRX_USE_RAM3x8 - _GrFrDrvGenericBitBlt, - _GrFrDrvGenericBitBlt, -#else - bltv2r, - bltr2v, -#endif - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; diff --git a/thirdparty/grx249/src/fdrivers/svga4.c b/thirdparty/grx249/src/fdrivers/svga4.c deleted file mode 100644 index fc5fd83..0000000 --- a/thirdparty/grx249/src/fdrivers/svga4.c +++ /dev/null @@ -1,624 +0,0 @@ -/** - ** svga4.c ---- the 16 color (Super) VGA frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "allocate.h" -#include "arith.h" -#include "mempeek.h" -#include "memcopy.h" -#include "memfill.h" -#include "vgaregs.h" -#include "ioport.h" -#include "highlow.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(int)(lo),((x)>>3)) - -static GrColor lastcolor; -static int modereg; -static int writeops[] = { - (VGA_FUNC_SET << 8) + VGA_ROT_FN_SEL_REG, /* C_SET */ - (VGA_FUNC_XOR << 8) + VGA_ROT_FN_SEL_REG, /* C_XOR */ - (VGA_FUNC_OR << 8) + VGA_ROT_FN_SEL_REG, /* C_OR */ - (VGA_FUNC_AND << 8) + VGA_ROT_FN_SEL_REG /* C_AND */ -}; - -static size_t LineBytes = 0; -static GR_int8u far *LineBuff[4] = {NULL, NULL, NULL, NULL}; - -static INLINE -void reginit(void) { - GRX_ENTER(); - /* set write mode 3 and enable color compare */ - outport_w(VGA_GR_CTRL_PORT,(((8 + 3) << 8) | modereg)); - /* don't care register to 0 */ - outport_w(VGA_GR_CTRL_PORT,((0 << 8) | VGA_COLOR_DONTC_REG)); - /* enable all 4 planes for writing */ - outport_w(VGA_SEQUENCER_PORT,((0x0f << 8) | VGA_WRT_PLANE_ENB_REG)); - /* enable all 4 planes for set/reset */ - outport_w(VGA_GR_CTRL_PORT,((0x0f << 8) | VGA_SET_RESET_ENB_REG)); - lastcolor = (-1L); - GRX_LEAVE(); -} - -static int alloc_blit_buffer(void) { - size_t bytes; - GR_int8u far *base; - - GRX_ENTER(); - - bytes = LineBytes<<2; - base = (GR_int8u far *)_GrTempBufferAlloc(bytes); - LineBuff[0] = base; - LineBuff[1] = base+LineBytes; - LineBuff[2] = base+LineBytes*2; - LineBuff[3] = base+LineBytes*3; - GRX_RETURN(base != NULL); -} - -static int init(GrVideoMode *mp) -{ - GRX_ENTER(); - - /* save original mode register */ - outport_b(VGA_GR_CTRL_PORT,VGA_MODE_REG); - modereg = ((inport_b(VGA_GR_CTRL_DATA) & 0xfc) << 8) | VGA_MODE_REG; - - /* set up default register values */ - reginit(); - - /* set up LineBuff max. line length for blits */ - LineBytes = sizeof(char) * (((mp->width+7) >> 3)+2); - - GRX_RETURN(TRUE); -} - - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GR_int32u offs; - char far *ptr; - unsigned int mask, pixval; - GRX_ENTER(); - offs = FOFS(x,y,SCRN->gc_lineoffset); - ptr = &SCRN->gc_baseaddr[0][BANKPOS(offs)]; - mask = 0x80 >> (x &= 7); - CHKBANK(BANKNUM(offs)); - setup_far_selector(SCRN->gc_selector); - outport_w(VGA_GR_CTRL_PORT,modereg); - outport_w(VGA_GR_CTRL_PORT,((3 << 8) | VGA_RD_PLANE_SEL_REG)); - pixval = peek_b_f(ptr) & mask; - outport_b(VGA_GR_CTRL_DATA,2); - pixval = (peek_b_f(ptr) & mask) | (pixval << 1); - outport_b(VGA_GR_CTRL_DATA,1); - pixval = (peek_b_f(ptr) & mask) | (pixval << 1); - outport_b(VGA_GR_CTRL_DATA,0); - pixval = (peek_b_f(ptr) & mask) | (pixval << 1); - outport_w(VGA_GR_CTRL_PORT,(((8 + 3) << 8) | modereg)); - lastcolor = (-1L); - GRX_RETURN((GrColor)(pixval >> (7 - x))); -} - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - GR_int32u offs; - char far *ptr; - GRX_ENTER(); - offs = umul32(y,CURC->gc_lineoffset) + (x >> 3); - ptr = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - setup_far_selector(CURC->gc_selector); - if(lastcolor != color) { - outport_w(VGA_GR_CTRL_PORT,writeops[C_OPER(color) & 3]); - outport_w(VGA_GR_CTRL_PORT,((((int)color & 0x0f) << 8) | VGA_SET_RESET_REG)); - lastcolor = color; - } - poke_b_f_and(ptr,(0x80U >> (x & 7))); - GRX_LEAVE(); -} - -static void drawhline(int x,int y,int w,GrColor color) -{ - GR_int32u offs; - GR_int8u lmask, rmask; - unsigned int w1, w2; - int oper; - GRX_ENTER(); - oper = C_OPER(color); - offs = FOFS(x,y,CURC->gc_lineoffset); - w2 = BANKLFT(offs); - lmask = 0xff >> (x & 7); - rmask = 0xff << ((-(w += x)) & 7); - w = ((w + 7) >> 3) - (x >> 3); - w2 = w - (w1 = umin(w,w2)); - if(w == 1) lmask &= rmask; - setup_far_selector(CURC->gc_selector); - if(lastcolor != color) { - outport_w(VGA_GR_CTRL_PORT,writeops[oper & 3]); - outport_w(VGA_GR_CTRL_PORT,((((int)color & 0x0f) << 8) | VGA_SET_RESET_REG)); - lastcolor = color; - } - do { - GR_int8u far *pp = (GR_int8u far *)&CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - offs += w1; - if( ((GR_int8u)(~lmask)) ) { - poke_b_f_and(pp,lmask); - lmask = 0xff; - if(--w1 == 0) goto nextbank; - pp++; - } - if( ((GR_int8u)(~rmask)) && (w2 == 0)) { - w1--; - poke_b_f_and(&pp[w1],rmask); - if(w1 == 0) break; - } - if(oper == C_WRITE) repfill_b_f( pp,(-1),w1); - else rowfill_b_f_or(pp,0xff,w1); - nextbank: - w1 = w2; - w2 = 0; - } while(w1 != 0); - GRX_LEAVE(); -} - -static void drawvline(int x,int y,int h,GrColor color) -{ - unsigned int lwdt, mask; - GR_int32u offs; - GRX_ENTER(); - if(lastcolor != color) { - outport_w(VGA_GR_CTRL_PORT,writeops[C_OPER(color) & 3]); - outport_w(VGA_GR_CTRL_PORT,((((int)color & 0x0f) << 8) | VGA_SET_RESET_REG)); - lastcolor = color; - } - lwdt = CURC->gc_lineoffset; - offs = FOFS(x,y,lwdt); - mask = 0x80 >> (x & 7); - setup_far_selector(CURC->gc_selector); - do { - char far *pp = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - unsigned h1 = BANKLFT(offs) / lwdt; - h -= (h1 = umin(h,umax(h1,1))); - CHKBANK(BANKNUM(offs)); - offs += (h1 * lwdt); - colfill_b_f_and(pp,lwdt,mask,h1); - } while(h != 0); - GRX_LEAVE(); -} - -static void drawline(int x,int y,int dx,int dy,GrColor color) -{ - int cnt,err, yoff, mask; - GR_int32u offs; - GRX_ENTER(); - if(dx < 0) { - x += dx; dx = (-dx); - y += dy; dy = (-dy); - } - yoff = CURC->gc_lineoffset; - offs = FOFS(x,y,yoff); - if(dy < 0) { - yoff = (-yoff); - dy = (-dy); - } - mask = 0x80 >> (x & 7); - setup_far_selector(CURC->gc_selector); - if(lastcolor != color) { - outport_w(VGA_GR_CTRL_PORT,writeops[C_OPER(color) & 3]); - outport_w(VGA_GR_CTRL_PORT,((((int)color & 0x0f) << 8) | VGA_SET_RESET_REG)); - lastcolor = color; - } - if(dx > dy) { - char far *pp = NULL; - int newoffs = TRUE; - err = (cnt = dx) >> 1; - do { - if (newoffs) { - CHKBANK(BANKNUM(offs)); - pp = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - newoffs = FALSE; - } - poke_b_f_and(pp,mask); - if((err -= dy) < 0) { - err += dx; - offs += yoff; - newoffs = TRUE; - } - if((mask >>= 1) == 0) { - mask = 0x80; - offs++; - newoffs = TRUE; - } - } while(--cnt >= 0); - } - else { - err = (cnt = dy) >> 1; - do { - CHKBANK(BANKNUM(offs)); - poke_b_f_and(&CURC->gc_baseaddr[0][BANKPOS(offs)],mask); - if((err -= dx) < 0) { - err += dy; - if((mask >>= 1) == 0) { - mask = 0x80; - offs++; - } - } - offs += yoff; - } while(--cnt >= 0); - } - GRX_LEAVE(); -} - - -static -#include "fdrivers/generic/block.c" - - -static -#include "fdrivers/generic/bitmap.c" - - -static -#include "fdrivers/generic/pattern.c" - - -/* some routines for fast blit operations -** -** All algorithms use a preallocated buffer for temporary -** storage and manipulation of pixel data: LineBuff[4] -** -** video -> video algorithm: -** for plane = 0 .. 3 -** select plane -** read data from scanline into LineBuff[plane] -** if bit alignment between source and destination differs -** shift LineBuff for destination bit alignment -** for plane = 0 .. 3 -** select plane -** write LineBuff[plane] to video memory -** -** ram -> video algorithm: -** for plane = 0 .. 3 -** calculate 'start of line' pointer (slp) -** holding the first blitting byte in RAM -** if bit alignment between RAM and screen differs -** shift© from slp to LineBuff with destination -** bit alignment. Reload slp with LineBuff -** for plane = 0 .. 3 -** select plane -** write slp[plane] to video memory -** -** video -> ram algorithm -** for plane = 0 .. 3 -** select plane -** read data from scanline into LineBuff[plane] -** if bit alignment between screen and RAM differs -** shift LineBuff for RAM bit alignment -** for plane = 0 .. 3 -** copy from LineBuff[plane] to RAM -** -** These algorithms save a lot of VGA register port settings -** compared with the old pixel by pixel method. There's one -** minor problem: When writing the scanline intermediate -** pixel colors may occur since not all color bits will -** be updated simultanously. Heavy blitting to video RAM -** may force a little 'snow' effect on screen. -*/ - -static void get_one(long offs, char far *ptr, int w, GR_int8u far *sl) { - int bnk; - int w1, w2; - GRX_ENTER(); - bnk = BANKNUM(offs); - w2 = BANKLFT(offs); - w2 = w - (w1 = umin(w,w2)); - CHKBANK(bnk); - while (w1-- > 0) { - *(sl++) = peek_b_f(ptr); - ++ptr; - } - if (w2) { - SETBANK(bnk+1); - ptr = SCRN->gc_baseaddr[0]; - while (w2-- > 0) { - *(sl++) = peek_b_f(ptr); - ++ptr; - } - } - GRX_LEAVE(); -} - - -#define poke_b_f_rw(p,v) do { \ - register GR_int8u __v = (v); \ - (void) (volatile int) peek_b_f(p); \ - poke_b_f((p),__v); \ -} while (0) - -static void put_one(int op, long offs, GR_int8u far *ptr, int w, - GR_int8u lm, GR_int8u rm, GR_int8u far *sl ) { - int w1, w2; - int bnk; - GRX_ENTER(); - bnk = BANKNUM(offs); - CHKBANK(bnk); - if (w==1) lm &= rm; - if ( ((GR_int8u)(~lm)) ) { - outport_w(VGA_GR_CTRL_PORT,((lm << 8) | VGA_BIT_MASK_REG)); - poke_b_f_rw(ptr,*sl); - if (--w == 0) goto done; - ++ptr; - ++sl; - ++offs; - } - if ( ((GR_int8u)(~rm)) ) --w; - if (w) { - w2 = BANKLFT(offs); - w2 = w - (w1 = umin(w,w2)); - outport_w(VGA_GR_CTRL_PORT,((0xff << 8) | VGA_BIT_MASK_REG)); - if (op) while (w1-- > 0) { poke_b_f_rw(ptr,*sl); - ++sl; ++ptr; } - else while (w1-- > 0) { poke_b_f(ptr, *sl); - ++sl; ++ptr; } - if (w2) { - SETBANK(bnk+1); - ptr = (GR_int8u far *)SCRN->gc_baseaddr[0]; - if (op) while (w2-- > 0) { poke_b_f_rw(ptr,*sl); - ++sl; ++ptr; } - else while (w2-- > 0) { poke_b_f(ptr, *sl); - ++sl; ++ptr; } - } - } - if ( ((GR_int8u)(~rm)) ) { - offs += w; - CHKBANK(BANKNUM(offs)); - outport_w(VGA_GR_CTRL_PORT,((rm << 8) | VGA_BIT_MASK_REG)); - poke_b_f_rw(ptr,*sl); - } -done: - GRX_LEAVE(); -} - -static void get_scanline(long offs, int w) { - char far *ptr; - int plane; - GRX_ENTER(); - ptr = &SCRN->gc_baseaddr[0][BANKPOS(offs)]; - outport_w(VGA_GR_CTRL_PORT,modereg); - for (plane = 0; plane < 4; ++plane) { - outport_w(VGA_GR_CTRL_PORT,((plane << 8) | VGA_RD_PLANE_SEL_REG)); - get_one(offs, ptr, w, LineBuff[plane]); - } - outport_w(VGA_GR_CTRL_PORT,(((8 + 3) << 8) | modereg)); - lastcolor = (-1L); - GRX_LEAVE(); -} - -extern void _GR_shift_scanline(GR_int8u far **dst, - GR_int8u far **src, - int ws, int shift, int planes ); -#define shift_scanline(dst,src,w,sh) \ - _GR_shift_scanline((dst),(src),(w),(sh),4) - -static void put_scanline(GR_int8u **src, long offs, int ws, int wd, - GR_int8u lm, GR_int8u rm, int oper) { - int plane; - GR_int8u far *ptr; - - GRX_ENTER(); - ptr = (GR_int8u far *)&CURC->gc_baseaddr[0][BANKPOS(offs)]; - - /* dump to screen */ - outport_w(VGA_GR_CTRL_PORT,modereg); - outport_w(VGA_GR_CTRL_PORT,((0 << 8) | VGA_SET_RESET_ENB_REG)); - outport_w(VGA_GR_CTRL_PORT,writeops[(unsigned)oper & 3]); - for (plane = 0; plane < 4; ++plane) { - outport_w(VGA_SEQUENCER_PORT,((1<<(plane+8)) | VGA_WRT_PLANE_ENB_REG)); - put_one(oper != C_WRITE, offs, ptr, wd, lm, rm, src[plane]); - } - outport_w(VGA_GR_CTRL_PORT,((0xff << 8) | VGA_BIT_MASK_REG)); -/* reginit(); */ - GRX_LEAVE(); -} - -static -#include "fdrivers/generic/bitblt.c" - -static void bltv2v(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y,int w,int h, - GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) != GrIMAGE && alloc_blit_buffer()) { - int shift = ((int)(x&7)) - ((int)(dx&7)); - long SO, DO; - int oper= C_OPER(op); - GR_int8u lm = 0xff >> (dx & 7); - GR_int8u rm = 0xff << ((-(w + dx)) & 7); - int ws = ((x+w+7) >> 3) - (x >> 3); - int wd = ((dx+w+7) >> 3) - (dx >> 3); - int hh = h; - setup_far_selector(SCRN->gc_selector); - if (dy < y) { - SO = FOFS(x,y,SCRN->gc_lineoffset); - DO = FOFS(dx,dy,SCRN->gc_lineoffset); - while (hh-- > 0) { - get_scanline(SO, ws); - if (shift) - shift_scanline(LineBuff,LineBuff,ws,shift); - put_scanline(LineBuff, DO, ws, wd, lm, rm, oper); - SO += SCRN->gc_lineoffset; - DO += SCRN->gc_lineoffset; - } - } else { - y += h-1; dy += h-1; - SO = FOFS(x,y,SCRN->gc_lineoffset); - DO = FOFS(dx,dy,SCRN->gc_lineoffset); - while (hh-- > 0) { - get_scanline(SO, ws); - if (shift) - shift_scanline(LineBuff,LineBuff,ws,shift); - put_scanline(LineBuff, DO, ws, wd, lm, rm, oper); - SO -= SCRN->gc_lineoffset; - DO -= SCRN->gc_lineoffset; - } - } - reginit(); - } else - bitblt(dst,dx,dy,src,x,y,w,h,op); - GRX_LEAVE(); -} - -static void bltr2v(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y,int w,int h, - GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) != GrIMAGE && alloc_blit_buffer()) { - int oper = C_OPER(op); - int shift = ((int)(x&7)) - ((int)(dx&7)); - GR_int32u SO, DO; - GR_int8u lm = 0xff >> (dx & 7); - GR_int8u rm = 0xff << ((-(w + dx)) & 7); - int ws = ((x+w+7) >> 3) - (x >> 3); - int wd = ((dx+w+7) >> 3) - (dx >> 3); - int hh = h; - setup_far_selector(SCRN->gc_selector); - SO = FOFS(x,y,src->gf_lineoffset); - DO = FOFS(dx,dy,SCRN->gc_lineoffset); - while (hh-- > 0) { - /* load pointer to RAM */ - int i; - GR_int8u far *slp[4]; - for (i=0; i < 4; ++i) - slp[i] = (GR_int8u far *)&src->gf_baseaddr[i][SO]; - if (shift) { - shift_scanline(LineBuff,slp,ws,shift); - for (i=0; i < 4; ++i) - slp[i] = LineBuff[i]; - } - put_scanline(slp, DO, ws, wd, lm, rm, oper); - SO += src->gf_lineoffset; - DO += SCRN->gc_lineoffset; - } - reginit(); - } else - _GrFrDrvGenericBitBlt(dst,dx,dy,src,x,y,w,h,op); - GRX_LEAVE(); -} - -#define mcopy(d,op,s,msk) do { \ - unsigned char _c_ = *(d); \ - *(d) = (_c_ & ~(msk)) | ((_c_ op *(s)) & (msk)); \ -} while (0) - -static void bltv2r(GrFrame *dst,int dx,int dy, - GrFrame *src,int x,int y,int w,int h, - GrColor op) -{ - GRX_ENTER(); - while(GrColorMode(op) != GrIMAGE) - if(alloc_blit_buffer()) { - int oper = C_OPER(op); - int shift = ((int)(x&7)) - ((int)(dx&7)); - GR_int32u SO, DO; - GR_int8u lm = 0xff >> (dx & 7); - GR_int8u rm = 0xff << ((-(w + dx)) & 7); - int ws = ((x+w+7) >> 3) - (x >> 3); - int wd = ((dx+w+7) >> 3) - (dx >> 3); - if (wd==1) break; - setup_far_selector(SCRN->gc_selector); - SO = FOFS(x,y,SCRN->gc_lineoffset); - DO = FOFS(dx,dy,dst->gf_lineoffset); - while (h-- > 0) { - int pl; - get_scanline(SO, ws); - if (shift) - shift_scanline(LineBuff,LineBuff,ws,shift); - for (pl = 0; pl < 4; ++pl) { - GR_int8u far *sptr = LineBuff[pl]; - GR_int8u far *dptr = (GR_int8u far *)&dst->gf_baseaddr[pl][DO]; - int ww = wd; - if ( ((GR_int8u)(~lm)) ) { - switch(oper) { - case C_XOR: mcopy(dptr,^,sptr,lm); break; - case C_OR: mcopy(dptr,|,sptr,lm); break; - case C_AND: mcopy(dptr,&,sptr,lm); break; - default: *dptr = (*dptr & ~lm) | (*sptr & lm); - break; - } - if (!(--ww)) continue; - ++dptr; ++sptr; - } - if ( ((GR_int8u)(~rm)) ) --ww; - if (ww) switch(oper) { - case C_XOR: fwdcopy_xor(dptr,dptr,sptr,ww); break; - case C_OR: fwdcopy_or( dptr,dptr,sptr,ww); break; - case C_AND: fwdcopy_and(dptr,dptr,sptr,ww); break; - default: fwdcopy_set(dptr,dptr,sptr,ww); break; - } - if ( ((GR_int8u)(~rm)) ) { - switch(oper) { - case C_XOR: mcopy(dptr,^,sptr,rm); break; - case C_OR: mcopy(dptr,|,sptr,rm); break; - case C_AND: mcopy(dptr,&,sptr,rm); break; - default: *dptr = (*dptr & ~rm) | (*sptr & rm); break; - } - } - } - SO += SCRN->gc_lineoffset; - DO += dst->gf_lineoffset; - } - goto done; - } - _GrFrDrvGenericBitBlt(dst,dx,dy,src,x,y,w,h,op); -done: - GRX_LEAVE(); -} - - -GrFrameDriver _GrFrameDriverSVGA4 = { - GR_frameSVGA4, /* frame mode */ - GR_frameRAM4, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* scan line width alignment */ - 4, /* number of planes */ - 4, /* bits per pixel */ - 16*1024L*1024L, /* max plane size the code can handle */ - init, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bltv2v, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; diff --git a/thirdparty/grx249/src/fdrivers/svga8.c b/thirdparty/grx249/src/fdrivers/svga8.c deleted file mode 100644 index f3fabc3..0000000 --- a/thirdparty/grx249/src/fdrivers/svga8.c +++ /dev/null @@ -1,459 +0,0 @@ -/** - ** svga8.c ---- the 256 color (Super) VGA frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifdef __TURBOC__ -#pragma inline -#endif - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "docolor.h" -#include "mempeek.h" -#include "memfill.h" - - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),(x)) - - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GR_int32u offs; - GRX_ENTER(); - offs = FOFS(x,y,SCRN->gc_lineoffset); - CHKBANK(BANKNUM(offs)); - setup_far_selector(SCRN->gc_selector); - GRX_RETURN((GR_int8u)peek_b_f(&SCRN->gc_baseaddr[0][BANKPOS(offs)])); -} - - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - GR_int32u offs; - char far *ptr; - GRX_ENTER(); - offs = FOFS(x,y,CURC->gc_lineoffset); - ptr = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - setup_far_selector(CURC->gc_selector); - switch(C_OPER(color)) { - case C_XOR: poke_b_f_xor(ptr,(GR_int8u)color); break; - case C_OR: poke_b_f_or( ptr,(GR_int8u)color); break; - case C_AND: poke_b_f_and(ptr,(GR_int8u)color); break; - default: poke_b_f( ptr,(GR_int8u)color); break; - } - GRX_LEAVE(); -} - - -static void drawhline(int x,int y,int w,GrColor color) -{ - int copr; - GRX_ENTER(); - copr = C_OPER(color); - if(DOCOLOR8(color,copr)) { - GR_int32u offs = FOFS(x,y,CURC->gc_lineoffset); - unsigned int w1 = BANKLFT(offs); - unsigned int w2 = w - (w1 = umin(w,w1)); - GR_repl cval = freplicate_b(color); - setup_far_selector(CURC->gc_selector); - do { - char far *pp = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - offs += w1; - switch(copr) { - case C_XOR: repfill_b_f_xor(pp,cval,w1); break; - case C_OR: repfill_b_f_or( pp,cval,w1); break; - case C_AND: repfill_b_f_and(pp,cval,w1); break; - default: repfill_b_f( pp,cval,w1); break; - } - w1 = w2; - w2 = 0; - } while(w1 != 0); - } - GRX_LEAVE(); -} - - -static void drawvline(int x,int y,int h,GrColor color) -{ - int copr; - GRX_ENTER(); - copr = C_OPER(color); - if(DOCOLOR8(color,copr)) { - unsigned int lwdt = CURC->gc_lineoffset; - GR_int32u offs = FOFS(x,y,lwdt); - setup_far_selector(CURC->gc_selector); - do { - char far *pp = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - unsigned int h1 = BANKLFT(offs) / lwdt; - h -= (h1 = umin(h,umax(h1,1))); - CHKBANK(BANKNUM(offs)); - offs += umul32(h1,lwdt); - switch(copr) { - case C_XOR: colfill_b_f_xor(pp,lwdt,(int)color,h1); break; - case C_OR: colfill_b_f_or( pp,lwdt,(int)color,h1); break; - case C_AND: colfill_b_f_and(pp,lwdt,(int)color,h1); break; - default: colfill_b_f( pp,lwdt,(int)color,h1); break; - } - } while(h != 0); - } - GRX_LEAVE(); -} - - -static void drawblock(int x,int y,int w,int h,GrColor color) -{ - int copr; - GRX_ENTER(); - copr = C_OPER(color); - if(DOCOLOR8(color,copr)) { - unsigned int skip = CURC->gc_lineoffset; - GR_int32u offs = FOFS(x,y,skip); - GR_repl cval = freplicate_b(color); - skip -= w; - setup_far_selector(CURC->gc_selector); - do { - unsigned int w1 = BANKLFT(offs); - unsigned int w2 = w - (w1 = umin(w,w1)); - do { - char far *pp = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - offs += w1; - switch(copr) { - case C_XOR: repfill_b_f_xor(pp,cval,w1); break; - case C_OR: repfill_b_f_or( pp,cval,w1); break; - case C_AND: repfill_b_f_and(pp,cval,w1); break; - default: repfill_b_f( pp,cval,w1); break; - } - w1 = w2; - w2 = 0; - } while(w1 != 0); - offs += skip; - } while(--h != 0); - } - GRX_LEAVE(); -} - - -#if !defined(__WATCOMC__) && (defined(__DJGPP__) || defined(__TURBOC__)) -/* The VGA banked frame buffer must start on a 64k boundary -** for this optimized assembler code. -** Linux: mmap may place the frame buffer on a 4k boundary :( -** Watcom C++: Can't use ES register :( -*/ -static void drawline(int x,int y,int dx,int dy,GrColor color) -{ - struct { - int errsub; /* subtract from error term */ - int erradd; /* add to error term when carry */ - int offset1; /* add to pointer if no carry on error term */ - int offset2; /* add to pointer if carry / banking dir */ - } lndata; - int copr, xstep, npts,error; - char far *ptr; - GR_int32u offs; - - GRX_ENTER(); - -# ifdef __GNUC__ -# ifdef __i386__ -# define ASM_LINE1(OPC) asm volatile("" \ - " .align 2,0x90 \n" \ - "0: "#OPC"b %6,"I386_GCC_FAR_SELECTOR"(%0) \n" \ - " subl %7,%2 \n" \ - " jb 1f \n" \ - " subw $1,%3 \n" \ - " jb 2f \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 4f \n" \ - " .align 2,0x90 \n" \ - "1: addl 4 + %7,%2 \n" \ - " addw 12 + %7,%3 \n" \ - " jb 3f \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 4f \n" \ - "2: negl 8 + %7 \n" \ - "3: decl %1 \n" \ - "4: " \ - : "=r" (ptr), "=r" (npts), "=r" (error) \ - : "0" ((short)(long)(ptr)), "1" (npts), "2" (error), \ - "q" ((char)(color)), "o" (lndata) \ - ) -# define ASM_LINE2(OPC) asm volatile("" \ - " .align 2,0x90 \n" \ - "0: "#OPC"b %6,"I386_GCC_FAR_SELECTOR"(%0) \n" \ - " subl %7,%2 \n" \ - " jb 1f \n" \ - " addw 8 + %7,%3 \n" \ - " jb 2f \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 3f \n" \ - " .align 2,0x90 \n" \ - "1: addl 4 + %7,%2 \n" \ - " addw 12 + %7,%3 \n" \ - " jb 2f \n" \ - " decl %1 \n" \ - " jne 0b \n" \ - " jmp 3f \n" \ - "2: decl %1 \n" \ - "3: " \ - : "=r" (ptr), "=r" (npts), "=r" (error) \ - : "0" ((short)(long)(ptr)), "1" (npts), "2" (error), \ - "q" ((char)(color)), "o" (lndata) \ - ) -# endif -# endif -# ifdef __TURBOC__ -# define ASM_LINE1(OPC) { \ - _ES = FP_SEG(ptr); \ - _BX = FP_OFF(ptr); \ - _CX = npts; \ - _DX = error; \ - _AX = (int)color; \ - OPC##1loop: \ - asm OPC byte ptr es:[bx],al; \ - asm sub dx,word ptr lndata.errsub; \ - asm jb OPC##1adjust; \ - asm sub bx,1; \ - asm jb OPC##1newbank1; \ - asm loop OPC##1loop; \ - asm jmp OPC##1done; \ - OPC##1adjust: \ - asm add dx,word ptr lndata.erradd; \ - asm add bx,word ptr lndata.offset2; \ - asm jb OPC##1newbank2; \ - asm loop OPC##1loop; \ - asm jmp OPC##1done; \ - OPC##1newbank1: \ - asm neg word ptr lndata.offset1; \ - OPC##1newbank2: \ - asm dec cx; \ - OPC##1done: \ - *((short *)(&ptr)) = _BX; \ - npts = _CX; \ - error = _DX; \ - } -# define ASM_LINE2(OPC) { \ - _ES = FP_SEG(ptr); \ - _BX = FP_OFF(ptr); \ - _CX = npts; \ - _DX = error; \ - _AX = (int)color; \ - OPC##2loop: \ - asm OPC byte ptr es:[bx],al; \ - asm sub dx,word ptr lndata.errsub; \ - asm jb OPC##2adjust; \ - asm add bx,word ptr lndata.offset1; \ - asm jb OPC##2newbank; \ - asm loop OPC##2loop; \ - asm jmp OPC##2done; \ - OPC##2adjust: \ - asm add dx,word ptr lndata.erradd; \ - asm add bx,word ptr lndata.offset2; \ - asm jb OPC##2newbank; \ - asm loop OPC##2loop; \ - asm jmp OPC##2done; \ - OPC##2newbank: \ - asm dec cx; \ - OPC##2done: \ - *((short *)(&ptr)) = _BX; \ - npts = _CX; \ - error = _DX; \ - } -# endif - - copr = C_OPER(color); - while(DOCOLOR8(color,copr)) { - if(dy < 0) { - y -= (dy = (-dy)); - x -= (dx = (-dx)); - } - if(dx < 0) { - xstep = (-1); - dx = (-dx); - } else - xstep = 1; - - offs = FOFS(x,y,CURC->gc_lineoffset); - ptr = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - setup_far_selector(CURC->gc_selector); - if(dx > dy) { - npts = dx + 1; - error = dx >> 1; - lndata.errsub = dy; - lndata.erradd = dx; - lndata.offset1 = xstep; - lndata.offset2 = CURC->gc_lineoffset + xstep; - if(xstep < 0) { - again_nonlinear: - lndata.offset1 = 1; - switch(copr) { - case C_XOR: ASM_LINE1(xor); break; - case C_OR: ASM_LINE1(or); break; - case C_AND: ASM_LINE1(and); break; - default: ASM_LINE1(mov); break; - } - if(npts == 0) break; - SETBANK(DRVINFO->curbank + lndata.offset1); - goto again_nonlinear; - } - } - else { - npts = dy + 1; - error = dy >> 1; - lndata.errsub = dx; - lndata.erradd = dy; - lndata.offset1 = CURC->gc_lineoffset; - lndata.offset2 = CURC->gc_lineoffset + xstep; - } - again_linear: - switch(copr) { - case C_XOR: ASM_LINE2(xor); break; - case C_OR: ASM_LINE2(or); break; - case C_AND: ASM_LINE2(and); break; - default: ASM_LINE2(mov); break; - } - if(npts == 0) break; - SETBANK(DRVINFO->curbank + 1); - goto again_linear; - } - GRX_LEAVE(); -} -#else -static -#include "fdrivers/generic/line.c" -#endif - - -static void drawbitmap(int x,int y,int w,int h,char far *bmp,int pitch,int start,GrColor fg,GrColor bg) -{ - int fgop, bgop; - int dofg, dobg; - GRX_ENTER(); - fgop = C_OPER(fg); - bgop = C_OPER(bg); - dofg = DOCOLOR8(fg,fgop); - dobg = DOCOLOR8(bg,bgop); - if(dofg | dobg) { - unsigned int skip = CURC->gc_lineoffset; - GR_int32u offs = FOFS(x,y,skip); - int once = dofg && dobg && (fgop == bgop); - skip -= w; - bmp += start >> 3; - start &= 7; - setup_far_selector(CURC->gc_selector); - do { - GR_int8u far *bp = (GR_int8u far *)bmp; - GR_int8u bits = *bp; - GR_int8u mask = 0x80 >> start; - unsigned int w1 = BANKLFT(offs); - unsigned int w2 = w - (w1 = umin(w,w1)); - do { - char far *pp = &CURC->gc_baseaddr[0][BANKPOS(offs)]; - CHKBANK(BANKNUM(offs)); - offs += w1; -# define DOBOTH(POKEOP) do { \ - POKEOP(pp,((bits&mask)?(GR_int8u)fg:(GR_int8u)bg)); \ - if((mask >>= 1) == 0) bits = *++bp,mask = 0x80; \ - pp++; \ - } while(--w1 != 0) -# define DOFGC(POKEOP) do { \ - if((mask & bits) != 0) POKEOP(pp,(GR_int8u)fg); \ - if((mask >>= 1) == 0) bits = *++bp,mask = 0x80; \ - pp++; \ - } while(--w1 != 0) -# define DOBGC(POKEOP) do { \ - if((mask & bits) == 0) POKEOP(pp,(GR_int8u)bg); \ - if((mask >>= 1) == 0) bits = *++bp,mask = 0x80; \ - pp++; \ - } while(--w1 != 0) - if(once) switch(fgop) { - case C_XOR: DOBOTH(poke_b_f_xor); break; - case C_OR: DOBOTH(poke_b_f_or); break; - case C_AND: DOBOTH(poke_b_f_and); break; - default: DOBOTH(poke_b_f); break; - } - else { - char far *ppsave = pp; - unsigned int w1save = w1; - if(dofg) switch(fgop) { - case C_XOR: DOFGC(poke_b_f_xor); break; - case C_OR: DOFGC(poke_b_f_or); break; - case C_AND: DOFGC(poke_b_f_and); break; - default: DOFGC(poke_b_f); break; - } - if(dobg) { - pp = ppsave; - w1 = w1save; - bp = (GR_int8u far *)bmp; - bits = *bp; - mask = 0x80 >> start; - switch(bgop) { - case C_XOR: DOBGC(poke_b_f_xor); break; - case C_OR: DOBGC(poke_b_f_or); break; - case C_AND: DOBGC(poke_b_f_and); break; - default: DOBGC(poke_b_f); break; - } - } - } - w1 = w2; - w2 = 0; - } while(w1 != 0); - offs += skip; - bmp += pitch; - } while(--h != 0); - } - GRX_LEAVE(); -} - - -static -#include "fdrivers/generic/pattern.c" - - -GrFrameDriver _GrFrameDriverSVGA8 = { - GR_frameSVGA8, /* frame mode */ - GR_frameRAM8, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 4, /* scan line width alignment */ - 1, /* number of planes */ - 8, /* bits per pixel */ - 8*16*1024L*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - _GrFrDrvPackedBitBltV2V, - _GrFrDrvPackedBitBltV2R, - _GrFrDrvPackedBitBltR2V, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; diff --git a/thirdparty/grx249/src/fdrivers/vga8x.c b/thirdparty/grx249/src/fdrivers/vga8x.c deleted file mode 100644 index 2bb140f..0000000 --- a/thirdparty/grx249/src/fdrivers/vga8x.c +++ /dev/null @@ -1,654 +0,0 @@ -/** - ** vga8x.c ---- the 256 color VGA mode X frame driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu]. - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "allocate.h" -#include "arith.h" -#include "docolor.h" -#include "mempeek.h" -#include "memcopy.h" -#include "memfill.h" -#include "ioport.h" -#include "vgaregs.h" -#include "highlow.h" - -/* frame offset address calculation */ -#define FOFS(x,y,lo) umuladd32((y),(lo),((x)>>2)) - -#define _SetVGAWritePlanes(planes) \ - outport_w(VGA_SEQUENCER_PORT,highlow((planes),VGA_WRT_PLANE_ENB_REG)) - -#define _SetVGAReadPlane(plane) \ - outport_w(VGA_GR_CTRL_PORT,highlow((plane),VGA_RD_PLANE_SEL_REG)) - -#define _SetVGAWritePlane(plane) _SetVGAWritePlanes(1<<(plane)) - -#define _SetVGAWriteAllPlanes() _SetVGAWritePlanes(0x0f) - -static GR_int8u _GrPXLmaskTable[] = { 0, 0x0e, 0x0c, 0x08 }; -static GR_int8u _GrPXRmaskTable[] = { 0, 0x01, 0x03, 0x07 }; - - -#define _SetNoPlane_ -#define POKEX(P,C,OP,SRP) do { \ - switch(OP) { \ - case C_XOR: SRP; poke_b_f_xor((P),(C)); break; \ - case C_OR: SRP; poke_b_f_or( (P),(C)); break; \ - case C_AND: SRP; poke_b_f_and((P),(C)); break; \ - default: poke_b_f( (P),(C)); break; \ - } \ - } while (0) -#define POKEFAST(P,C,OP) POKEX((P),(C),(OP),_SetNoPlane_) - - -static INLINE -GrColor readpixel(GrFrame *c,int x,int y) -{ - GRX_ENTER(); - _SetVGAReadPlane(x&3); - setup_far_selector(SCRN->gc_selector); - GRX_RETURN((GR_int8u) - peek_b_f(&SCRN->gc_baseaddr[0][FOFS(x,y,SCRN->gc_lineoffset)]) - ); -} - - -static INLINE -void drawpixel(int x,int y,GrColor color) -{ - char far *ptr; - GRX_ENTER(); - ptr = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - x &= 3; - _SetVGAWritePlane(x); - setup_far_selector(CURC->gc_selector); - POKEX(ptr,color,C_OPER(color),_SetVGAReadPlane(x)); - GRX_LEAVE(); -} - - -static void drawhline(int x,int y,int w,GrColor color) { - int opr; - - GRX_ENTER(); - opr = C_OPER(color); - if (w > 0 && DOCOLOR8(color,opr)) { - GR_repl cval = freplicate_b(color); - char far *p = &CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - setup_far_selector(CURC->gc_selector); - if ((opr == C_WRITE) && (w >= 10)) { /* 10 = 3(left) + 1*4 + 3(right) */ - int rmask = (x + w) & 3; - int lmask = x & 3; - if(lmask) { - _SetVGAWritePlanes(_GrPXLmaskTable[lmask]); - poke_b_f(p,(GR_int8u)cval); - ++p; - w -= (4 - lmask); - } - w >>= 2; - if(rmask) { - _SetVGAWritePlanes(_GrPXRmaskTable[rmask]); - poke_b_f(p+w,(GR_int8u)cval); - } - _SetVGAWriteAllPlanes(); - repfill_b_f(p,cval,w); - } else { - int i, plane = x & 3; - for (i=0; i < 4; ++i) { - GR_int8u far *pp = (GR_int8u far *)p; - int ww = (w+3) >> 2; - if ( !ww ) break; - _SetVGAWritePlane(plane); - switch (opr) { - case C_XOR: _SetVGAReadPlane(plane); - repfill_b_f_xor(pp,cval,ww); - break; - case C_OR: _SetVGAReadPlane(plane); - repfill_b_f_or(pp,cval,ww); - break; - case C_AND: _SetVGAReadPlane(plane); - repfill_b_f_and(pp,cval,ww); - break; - default : repfill_b_f(pp,cval,ww); - break; - } - --w; - if (++plane == 4) { plane = 0; ++p; } - } - } - } - GRX_LEAVE(); -} - - -static void drawvline(int x,int y,int h,GrColor color) -{ - char far *ptr; - unsigned skip; - GR_int8u cv; - GRX_ENTER(); - skip = CURC->gc_lineoffset; - ptr = &CURC->gc_baseaddr[0][FOFS(x,y,skip)]; - cv = (GR_int8u)color; - x &= 3; - _SetVGAWritePlane(x); - setup_far_selector(CURC->gc_selector); - switch(C_OPER(color)) { - case C_XOR: _SetVGAReadPlane(x); - colfill_b_f_xor(ptr,skip,cv,h); - break; - case C_OR: _SetVGAReadPlane(x); - colfill_b_f_or(ptr,skip,cv,h); - break; - case C_AND: _SetVGAReadPlane(x); - colfill_b_f_and(ptr,skip,cv,h); - break; - default: colfill_b_f(ptr,skip,cv,h); - break; - } - GRX_LEAVE(); -} - - -static -#include "fdrivers/generic/block.c" - -/* ------------------------------------------------------------------------ */ - -#if 1 - -static INLINE -void xmajor(GR_int8u far *ptr, int len, int yskip, - GR_int32u ErrorAcc, GR_int32u ErrorAdj, - int op, int color) -{ - if (len) { - while (--len) { - POKEFAST(ptr,color,op); - ptrinc(ptr,1); - ErrorAcc += ErrorAdj; - - if (ErrorAcc & ~0xFFFFL) { - ErrorAcc &= 0xFFFFL; - ptrinc(ptr,yskip); - } - } - POKEFAST(ptr,color,op); - } -} - -static INLINE -void middle(GR_int8u far *ptr, int len, int yskip, - GR_int32u ErrorAcc, GR_int32u ErrorAdj, - int op, int color) -{ - if (len) { - while (--len) { - POKEFAST(ptr,color,op); - ErrorAcc += ErrorAdj; - ptrinc(ptr, (yskip * (int)(ErrorAcc >> 16)) + 1); - ErrorAcc &= 0xFFFFL; - } - POKEFAST(ptr,color,op); - } -} - - -static INLINE -void ymajor(GR_int8u *ptr, int len, int yskip, - GR_int32u ErrorAcc, GR_int32u ErrorAdj, - int op, int color) -{ - - if (len) { - int i; - GR_int32u TinyAdj = (ErrorAdj >> 2); - ErrorAdj -= TinyAdj; - - while (--len) { - ErrorAcc += TinyAdj; - i = (ErrorAcc >> 16); - ErrorAcc &= 0xFFFFL; - - while (i--) { - POKEFAST(ptr,color,op); - ptrinc(ptr,yskip); - } - - ErrorAcc += ErrorAdj; - ptrinc(ptr, (yskip * (int)(ErrorAcc >> 16)) + 1); - ErrorAcc &= 0xFFFFL; - } - ErrorAcc += TinyAdj; - i = (ErrorAcc >> 16); - while (i--) { - POKEFAST(ptr,color,op); - ptrinc(ptr,yskip); - } - } -} - - -static void drawline(int x,int y,int dx,int dy,GrColor color) -{ - int i, yskip, oper, plane; - int len[4]; - GR_int8u far *ptr; - - /* Mode X 4-way folded Bresenham line function - by David Boeren */ - - GRX_ENTER(); - /* Make sure the line runs left to right */ - if (dx < 0) { - x -= (dx=-dx); - y -= (dy=-dy); - } - - yskip = CURC->gc_lineoffset; - if (dy < 0) { - dy = -dy; /* Make dy positive */ - yskip = -yskip; - } - - if (dx == 0) { - /* Vertical Line (and one pixel lines) */ - if (yskip > 0) { - drawvline(x,y,dy+1,color); - goto done; - } - drawvline(x,y-dy,dy+1,color); - goto done; - } - - if (dy == 0) { - /* Horizontal Line */ - drawhline(x,y,dx+1,color); - goto done; - } - - oper = C_OPER(color); - ptr = (GR_int8u far *)&CURC->gc_baseaddr[0][FOFS(x,y,CURC->gc_lineoffset)]; - - /* Length of sub-line in each plane */ - plane = (x & 3); - i = dx + plane; - len[0] = ((i--) >> 2); - len[1] = ((i--) >> 2); - len[2] = ((i--) >> 2); - len[3] = (i >> 2) + 1; - - for (i=plane; i < 3; i++) len[i]++; - - if ((dx >> 2) >= dy) { - /* X-Major line (0.00 < slope <= 0.25) */ - GR_int32u ErrorAcc = 0x8000; - GR_int32u ErrorAdj = ((((GR_int32u)dy << 18) / (GR_int32u)dx)); - GR_int32u TinyAdj = (ErrorAdj >> 2); - while (i--) { - if (oper != C_WRITE) _SetVGAReadPlane(plane); - _SetVGAWritePlane(plane); - xmajor(ptr, len[plane], yskip, ErrorAcc, ErrorAdj, oper, color); - if (++plane == 4) { - plane = 0; - ptrinc(ptr,1); - } - ErrorAcc += TinyAdj; - if (ErrorAcc & ~0xFFFFL) { - ErrorAcc &= 0xFFFFL; - ptrinc(ptr,yskip); - } - } - if (oper != C_WRITE) _SetVGAReadPlane(plane); - _SetVGAWritePlane(plane); - xmajor(ptr, len[plane], yskip, ErrorAcc, ErrorAdj, oper, color); - } else if (dx >= dy) { - /* Middle line (0.25 < slope <= 1.00) */ - GR_int32u ErrorAcc = 0x8000; - GR_int32u ErrorAdj = ((((GR_int32u)dy << 18) / (GR_int32u)dx)); - GR_int32u TinyAdj = (ErrorAdj >> 2); - while (i--) { - if (oper != C_WRITE) _SetVGAReadPlane(plane); - _SetVGAWritePlane(plane); - middle(ptr, len[plane], yskip, ErrorAcc, ErrorAdj, oper, color); - if (++plane == 4) { - plane = 0; - ptrinc(ptr,1); - } - ErrorAcc += TinyAdj; - if (ErrorAcc & ~0xFFFFL) { - ptrinc(ptr,yskip); - ErrorAcc &= 0xFFFFL; - } - } - if (oper != C_WRITE) _SetVGAReadPlane(plane); - _SetVGAWritePlane(plane); - middle(ptr, len[plane], yskip, ErrorAcc, ErrorAdj, oper, color); - } else { - /* Y-Major line (slope > 1) */ - GR_int32u ErrorAcc = 0x8000; - GR_int32u ErrorAdj = ((((GR_int32u)(dy+1) << 18) / (GR_int32u)(dx+1))); - GR_int32u TinyAdj = (ErrorAdj >> 2); - while (i--) { - if (oper != C_WRITE) _SetVGAReadPlane(plane); - _SetVGAWritePlane(plane); - ymajor(ptr, len[plane], yskip, ErrorAcc, ErrorAdj, oper, color); - if (++plane == 4) { - plane = 0; - ptrinc(ptr,1); - } - ErrorAcc += TinyAdj; - ptrinc(ptr,(yskip * (ErrorAcc >> 16))); - ErrorAcc &= 0xFFFFL; - } - if (oper != C_WRITE) _SetVGAReadPlane(plane); - _SetVGAWritePlane(plane); - ymajor(ptr, len[plane], yskip, ErrorAcc, ErrorAdj, oper, color); - } - done: - GRX_LEAVE(); -} -#else -static -#include "fdrivers/generic/line.c" -#endif - -/* ------------------------------------------------------------------------ */ - -static -#include "fdrivers/generic/bitmap.c" - -static -#include "fdrivers/generic/pattern.c" - -/* ---------------------------------------------------- video -> video blit */ -static -#include "fdrivers/generic/bitblt.c" - -static char far *LineBuff = NULL; - -static void pbltv2v(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op ) -{ - GR_int32u soffs, doffs; - int skip, lo; - char far *vp; - GRX_ENTER(); - op = C_OPER(op); - lo = SCRN->gc_lineoffset; - if (dy <= sy) { - /* forward */ - skip = lo; - } else { - /* reverse */ - dy += h-1; - sy += h-1; - skip = -lo; - } - soffs = FOFS(sx,sy,lo); - doffs = FOFS(dx,dy,lo); - setup_far_selector(SCRN->gc_selector); - while (h--) { - char far *dptr, *sptr; - int ww; - int plc, pl; - pl = sx & 3; - ww = w; - vp = &SCRN->gc_baseaddr[0][soffs]; - dptr = LineBuff; - for (plc=0; plc < 4; ++plc) { - char far *sptr = vp; - int bytes = (ww+3)>>2; - _SetVGAReadPlane(pl); - fwdcopy_set_f(sptr,dptr,sptr,bytes); - if (--ww <= 0) break; - if (++pl == 4) { pl=0; ++vp; } - } - pl = dx & 3; - ww = w; - vp = &SCRN->gc_baseaddr[0][doffs]; - sptr = LineBuff; - switch (op) { - case C_XOR: - for (plc=0; plc < 4; ++plc) { - char far *dptr = vp; - int bytes = (ww+3)>>2; - _SetVGAReadPlane(pl); - _SetVGAWritePlane(pl); - fwdcopy_f_xor(dptr,dptr,sptr,bytes); - if (--ww <= 0) break; - if (++pl == 4) { pl=0; ++vp; } - } - break; - case C_OR: - for (plc=0; plc < 4; ++plc) { - char far *dptr = vp; - int bytes = (ww+3)>>2; - _SetVGAReadPlane(pl); - _SetVGAWritePlane(pl); - fwdcopy_f_or(dptr,dptr,sptr,bytes); - if (--ww <= 0) break; - if (++pl == 4) { pl=0; ++vp; } - } - break; - case C_AND: - for (plc=0; plc < 4; ++plc) { - char far *dptr = vp; - int bytes = (ww+3)>>2; - _SetVGAReadPlane(pl); - _SetVGAWritePlane(pl); - fwdcopy_f_and(dptr,dptr,sptr,bytes); - if (--ww <= 0) break; - if (++pl == 4) { pl=0; ++vp; } - } - break; - default: - for (plc=0; plc < 4; ++plc) { - char far *dptr = vp; - int bytes = (ww+3)>>2; - _SetVGAWritePlane(pl); - fwdcopy_f_set(dptr,dptr,sptr,bytes); - if (--ww <= 0) break; - if (++pl == 4) { pl=0; ++vp; } - } - break; - } - doffs += skip; - soffs += skip; - } - GRX_LEAVE(); -} - -static int alloc_blit_buffer(int width) { - GRX_ENTER(); - LineBuff = _GrTempBufferAlloc(width); - GRX_RETURN(LineBuff != NULL); -} - -static void bltv2v(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) != GrIMAGE && alloc_blit_buffer(w)) - pbltv2v(dst,dx,dy,src,sx,sy,w,h,op); - else - bitblt(dst,dx,dy,src,sx,sy,w,h,op); - GRX_LEAVE(); -} - - - -/* ------------------------------------------------- video -> ram blit */ - -#define VID2MEM_OPR(M,OP) do { \ - int _ww_ = w; \ - for (plc = 0; plc < 4; ++plc) { \ - char far *_p_ = vp; \ - char far *_dptr_ = &M[plc]; \ - int _w_ = (_ww_+3)>>2; \ - _SetVGAReadPlane(pl); \ - colcopy_b##OP##_f(_dptr_,4,_p_,1,_w_); \ - if ((--_ww_) == 0) break; \ - if (++pl == 4) { pl = 0; ++vp; } \ - } \ -} while (0) - -static void pbltv2r(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op ) -{ - GR_int32u soffs; - int sskip, dskip; - char far *rp, *vp; - GRX_ENTER(); - op = C_OPER(op); - sskip = SCRN->gc_lineoffset; - dskip = dst->gf_lineoffset; - soffs = FOFS(sx,sy,sskip); - rp = &dst->gf_baseaddr[0][umuladd32(dy,dskip,dx)]; - setup_far_selector(SCRN->gc_selector); - while (h--) { - int plc, pl; - pl = sx & 3; - vp = &SCRN->gc_baseaddr[0][soffs]; - switch (op) { - case C_XOR: VID2MEM_OPR(rp,_xor); break; - case C_OR: VID2MEM_OPR(rp,_or); break; - case C_AND: VID2MEM_OPR(rp,_and); break; - default: VID2MEM_OPR(rp,_set); break; - } - rp += dskip; - soffs += sskip; - } - GRX_LEAVE(); -} - -static void bltv2r(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) != GrIMAGE) - pbltv2r(dst,dx,dy,src,sx,sy,w,h,op); - else - _GrFrDrvGenericBitBlt(dst,dx,dy,src,sx,sy,w,h,op); - GRX_LEAVE(); -} - -/* ------------------------------------------------- ram -> video blit */ - -#define MEM2VID_OPR(M,OP) do { \ - int _ww_ = w; \ - for (plc = 0; plc < 4; ++plc) { \ - char far *_p_ = vp; \ - char far *_sptr_ = &M[plc]; \ - int _w_ = (_ww_+3)>>2; \ - _SetVGAWritePlane(pl); \ - _SetVGAReadPlane(pl); \ - colcopy_b_f##OP(_p_,1,_sptr_,4,_w_); \ - if ((--_ww_) == 0) break; \ - if (++pl == 4) { pl = 0; ++vp; } \ - } \ -} while (0) - -#define MEM2VID_SET(M) do { \ - int _ww_ = w; \ - for (plc = 0; plc < 4; ++plc) { \ - char far *_p_ = vp; \ - char far *_sptr_ = &M[plc]; \ - int _w_ = (_ww_+3)>>2; \ - _SetVGAWritePlane(pl); \ - colcopy_b_f_set(_p_,1,_sptr_,4,_w_); \ - if ((--_ww_) == 0) break; \ - if (++pl == 4) { pl = 0; ++vp; } \ - } \ -} while (0) - -static void pbltr2v(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op ) -{ - GR_int32u doffs; - int sskip, dskip; - char far *rp, *vp; - GRX_ENTER(); - op = C_OPER(op); - dskip = SCRN->gc_lineoffset; - sskip = src->gf_lineoffset; - doffs = FOFS(dx,dy,dskip); - rp = &src->gf_baseaddr[0][umuladd32(sy,sskip,sx)]; - setup_far_selector(SCRN->gc_selector); - while (h--) { - int plc, pl; - pl = dx & 3; - vp = &SCRN->gc_baseaddr[0][doffs]; - switch (op) { - case C_XOR: MEM2VID_OPR(rp,_xor); break; - case C_OR: MEM2VID_OPR(rp,_or); break; - case C_AND: MEM2VID_OPR(rp,_and); break; - default: MEM2VID_SET(rp); break; - } - doffs += dskip; - rp += sskip; - } - GRX_LEAVE(); -} - -static void bltr2v(GrFrame *dst,int dx,int dy, - GrFrame *src,int sx,int sy, - int w,int h,GrColor op) -{ - GRX_ENTER(); - if(GrColorMode(op) == GrIMAGE) - _GrFrDrvGenericBitBlt(dst,dx,dy,src,sx,sy,w,h,op); - else - pbltr2v(dst,dx,dy,src,sx,sy,w,h,op); - GRX_LEAVE(); -} - - - -GrFrameDriver _GrFrameDriverVGA8X = { - GR_frameVGA8X, /* frame mode */ - GR_frameRAM8, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 2, /* scan line width alignment */ - 4, /* number of planes */ - 8, /* bits per pixel */ - 64*1024L, /* max plane size the code can handle */ - NULL, - readpixel, - drawpixel, - drawline, - drawhline, - drawvline, - drawblock, - drawbitmap, - drawpattern, - bltv2v, - bltv2r, - bltr2v, - _GrFrDrvGenericGetIndexedScanline, - _GrFrDrvGenericPutScanline -}; - diff --git a/thirdparty/grx249/src/fonts/fdtable.c b/thirdparty/grx249/src/fonts/fdtable.c deleted file mode 100644 index cfff3e2..0000000 --- a/thirdparty/grx249/src/fonts/fdtable.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** fdtable.c ---- a table of available font drivers - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grfontdv.h" - -GrFontDriver *_GrFontDriverTable[] = { -#ifdef __XWIN__ - &_GrFontDriverXWIN, -#endif - &_GrFontDriverGRX, - &_GrFontDriverBGI, - &_GrFontDriverRAW, - &_GrFontDriverFNA, - &_GrFontDriverWIN, - NULL -}; - diff --git a/thirdparty/grx249/src/fonts/fdv_bgi.c b/thirdparty/grx249/src/fonts/fdv_bgi.c deleted file mode 100644 index 53f7593..0000000 --- a/thirdparty/grx249/src/fonts/fdv_bgi.c +++ /dev/null @@ -1,352 +0,0 @@ -/** - ** fdv_bgi.c -- driver for Borland BGI font file format - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contrib by Christian Domp (alma.student.uni-kl.de) See "doc/contrib.doc" - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#include -#include - -#include "libgrx.h" -#include "grfontdv.h" -#include "allocate.h" -#include "arith.h" -#include "memfill.h" -#include "ordswap.h" -#include "fonts/fdv_bgi.h" - -/* This is based on the font code in Hartmut Schirmer's BCC2GRX package */ - -/* This code requires packed structs. Should be revised for ** -** better portability hsc, 980427 */ - -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif -#ifndef SEEK_END -#define SEEK_END 2 -#endif - -static GR_int8 far *fdata = NULL; -static GR_int8u far *wtable = NULL; -static GR_int16u far *offsets = NULL; -static GR_int8u far *vecdata = NULL; -static int far *realwdt = NULL; -static int far *xoffset = NULL; -static int realhgt = 0; -static int yoffset = 0; -static BGIfontFileHeader far *fhdr = NULL; -static BGIfontHeaderType far *fhtp = NULL; - -static void cleanup(void) -{ - if(fdata) farfree(fdata); - if(realwdt) farfree(realwdt); - fdata = NULL; - realwdt = NULL; -} - -/* fix up up sizes to account for out of box characters */ -static void fixlimits(void) -{ - int i,ymin = 32000,ymax = -32000; - int orighgt = fhtp->org_to_cap - fhtp->org_to_dec; - for(i = 0; i < fhtp->nchrs; i++) { - int xpos = 0,ypos = 0,xend,yend; - int xmin = 32000,xmax = -32000; - GR_int16u far *vp = (GR_int16u far *)(vecdata + offsets[i]); - for( ; ; vp++) { - switch(SV_COMMAND(*vp)) { - case SVC_END: - break; - case SVC_MOVE: - xpos = SV_XCOORD(*vp); - ypos = fhtp->org_to_cap - SV_YCOORD(*vp); - continue; - case SVC_SCAN: - /* what to do here ? */ - continue; - case SVC_DRAW: - xend = SV_XCOORD(*vp); - yend = fhtp->org_to_cap - SV_YCOORD(*vp); - xmin = imin(xmin,imin(xpos,xend)); - ymin = imin(ymin,imin(ypos,yend)); - xmax = imax(xmax,imax(xpos,xend)); - ymax = imax(ymax,imax(ypos,yend)); - xpos = xend; - ypos = yend; - continue; - } - break; - } - xoffset[i] = imax(0,(-xmin)); - realwdt[i] = imax(1,(imax((xmax + 1),wtable[i]) + xoffset[i])); - DBGPRINTF(DBG_FONT,( - "character %3d: origwdt=%-3d realwdt=%-3d xoffset=%-3d %c\n", - (i + fhtp->firstch), - wtable[i], - realwdt[i], - xoffset[i], - (realwdt[i] > wtable[i]) ? '*' : ' ' - )); - } - yoffset = imax(0,(-ymin)); - realhgt = imax((ymax + 1),orighgt) + yoffset; - DBGPRINTF(DBG_FONT,( - "FONT orighgt=%-3d realhgt=%-3d yoffset=%-3d\n", - orighgt, - realhgt, - yoffset - )); -} - -static int openfile(char *fname) -{ - GR_int8 far *p; - FILE *fp; - long flen; - int res; - GRX_ENTER(); - res = FALSE; - do { - cleanup(); - fp = fopen(fname,"rb"); - if(!fp) break; /* FALSE */ - fseek(fp,0L,SEEK_END); - flen = ftell(fp); - fseek(fp,0L,SEEK_SET); - if((flen <= (signed long)(sizeof(*fhdr) + sizeof(*fhtp))) || - (flen != (signed long)((size_t)flen))) - break; /* FALSE */ - fdata = farmalloc((size_t)flen); - if (!fdata) break; /* FALSE */ - if (fread(fdata,1,(size_t)flen,fp) != (size_t)flen) - break; /* FALSE */ - fclose(fp); fp = NULL; - if (strncmp(fdata,FILEMARKER,strlen(FILEMARKER)) != 0) - break; /*FALSE, magic code not found */ - p = strchr(fdata,MARKEREND); /* skip copyright text */ - if (!p || ((++p) > &fdata[128 - sizeof(*fhdr)])) break; /* FALSE */ - fhdr = (BGIfontFileHeader *)p; -# if BYTE_ORDER==BIG_ENDIAN - _GR_swap16u(&fhdr->header_size); - _GR_swap16u(&fhdr->font_size); -# endif - fhtp = (BGIfontHeaderType *)(fdata + fhdr->header_size); -# if BYTE_ORDER==BIG_ENDIAN - _GR_swap16u(&fhtp->nchrs); - _GR_swap16u(&fhtp->cdefs); -# endif - if (fhtp->sig != SIGBYTE) - break; /* FALSE */ - offsets = (GR_int16u *)(fhtp + 1); - wtable = (GR_int8u *)(offsets + fhtp->nchrs); - vecdata = (GR_int8u far *)((GR_int8u far *)fhtp + fhtp->cdefs); - realwdt = farmalloc(sizeof(int) * fhtp->nchrs * 2); - xoffset = realwdt + fhtp->nchrs; - if(!realwdt) - break; /* FALSE */ - fixlimits(); - res = TRUE; - } while (0); - if (!res) { - cleanup(); - if (fp) fclose(fp); - } - GRX_RETURN(res); -} - -static unsigned int avgwidth(void) -{ - unsigned int i,total = 0; - for(i = 0; i < fhtp->nchrs; i++) total += realwdt[i]; - return((total + (fhtp->nchrs >> 1)) / fhtp->nchrs); -} - -static int header(GrFontHeader *hdr) -{ - if(!fdata) return(FALSE); - strcpy(hdr->family,"BGI"); - memcpy(hdr->name,fhdr->font_name,sizeof(fhdr->font_name)); - hdr->name[sizeof(fhdr->font_name)] = '\0'; - hdr->proportional = TRUE; - hdr->scalable = TRUE; - hdr->preloaded = FALSE; - hdr->modified = GR_FONTCVT_NONE; - hdr->width = avgwidth(); - hdr->height = realhgt; - hdr->baseline = fhtp->org_to_cap - fhtp->org_to_base + yoffset; - hdr->ulheight = imax(1,(hdr->height / 15)); - hdr->ulpos = hdr->height - hdr->ulheight; - hdr->minchar = fhtp->firstch; - hdr->numchars = fhtp->nchrs; - DBGPRINTF(DBG_FONT,( - "Font header:\n" - " name = %s\n" - " family = %s\n" - " proportional = %d\n" - " scalable = %d\n" - " preloaded = %d\n" - " modified = %d\n" - " width = %d\n" - " height = %d\n" - " baseline = %d\n" - " ulheight = %d\n" - " ulpos = %d\n" - " minchar = %d\n" - " numchars = %d\n", - hdr->name, - hdr->family, - hdr->proportional, - hdr->scalable, - hdr->preloaded, - hdr->modified, - hdr->width, - hdr->height, - hdr->baseline, - hdr->ulheight, - hdr->ulpos, - hdr->minchar, - hdr->numchars - )); - return(TRUE); -} - -static int charwdt(int chr) -{ - chr -= fhtp->firstch; - if(!fdata) return(-1); - if((unsigned int)chr >= (unsigned int)fhtp->nchrs) return(-1); - DBGPRINTF(DBG_FONT,("charwdt for %d is %d\n",(chr + fhtp->firstch),realwdt[chr])); - return(realwdt[chr]); -} - -static void bitline(int x1,int y1,int x2,int y2,char *buffer,int pitch) -{ - int dx = x2 - x1; - int dy = y2 - y1; - int xstep = (dx < 0) ? ((dx = -dx),(-1)) : 1; - int ystep = ((dy < 0) ? ((dy = -dy),(-pitch)) : pitch) << 3; - unsigned int addr = ((y1 * pitch) << 3) + x1; - int count,error,errsub,erradd; - unsigned int step1,step2; - if(dy > dx) { - count = dy + 1; - error = dy >> 1; - erradd = dy; - errsub = dx; - step1 = ystep; - step2 = xstep + ystep; - } - else { - count = dx + 1; - error = dx >> 1; - erradd = dx; - errsub = dy; - step1 = xstep; - step2 = xstep + ystep; - } - do { - buffer[addr >> 3] |= (0x80U >> (addr & 7)); - if((error -= errsub) < 0) { - error += erradd; - addr += step2; - } - else { - addr += step1; - } - } while(--count); -} - -static int bitmap(int chr,int w,int h,char *buffer) -{ - int xmul,xdiv,ymul,ydiv; - int xpos,ypos,xend,yend; - int offs; - GR_int16u far *vp; - chr -= fhtp->firstch; - if(!fdata) return(FALSE); - if((unsigned int)chr >= (unsigned int)fhtp->nchrs) return(FALSE); - if((w <= 0) || (h <= 0)) return(FALSE); - xmul = w - 1; - xdiv = realwdt[chr] - 1; - ymul = h - 1; - ydiv = realhgt - 1; - DBGPRINTF(DBG_FONT,( - "bitmap for %d, origsize = %d %d, rendered = %d %d\n", - (chr + fhtp->firstch), - (xdiv + 1),(ydiv + 1), - (xmul + 1),(ymul + 1) - )); - vp = (GR_int16u far *)(vecdata + offsets[chr]); - offs = (w + 7) >> 3; - memfill_b(buffer,0,(offs * h)); - if(xdiv <= 0) return(TRUE); - for(xpos = ypos = 0; ; vp++) { - switch(SV_COMMAND(*vp)) { - case SVC_END: - break; - case SVC_MOVE: - xpos = SV_XCOORD(*vp) + xoffset[chr]; - ypos = fhtp->org_to_cap - SV_YCOORD(*vp) + yoffset; - DBGPRINTF(DBG_FONT,( - " cmd=0x%04x, move %-3d %d\n", - *vp,xpos,ypos - )); - continue; - case SVC_SCAN: - /* what to do here ? */ - DBGPRINTF(DBG_FONT,(" cmd=0x%04x **** SCAN COMMAND FOUND ****\n",*vp)); - continue; - case SVC_DRAW: - xend = SV_XCOORD(*vp) + xoffset[chr]; - yend = fhtp->org_to_cap - SV_YCOORD(*vp) + yoffset; - DBGPRINTF(DBG_FONT,( - " cmd=0x%04x, vector %-3d %-3d [ %-3d %-3d ] %c\n", - *vp,xend,yend,xpos,ypos, - ((((unsigned int)xend > (unsigned int)xdiv) || - ((unsigned int)yend > (unsigned int)ydiv) || - ((unsigned int)xpos > (unsigned int)xdiv) || - ((unsigned int)ypos > (unsigned int)ydiv)) ? '*' : ' ' - ) - )); - bitline( - urscale(xpos,xmul,xdiv),urscale(ypos,ymul,ydiv), - urscale(xend,xmul,xdiv),urscale(yend,ymul,ydiv), - buffer,offs - ); - xpos = xend; - ypos = yend; - continue; - } - break; - } - return(TRUE); -} - -GrFontDriver _GrFontDriverBGI = { - "BGI", /* driver name (doc only) */ - ".chr", /* font file extension */ - TRUE, /* scalable */ - openfile, /* file open and check routine */ - header, /* font header reader routine */ - charwdt, /* character width reader routine */ - bitmap, /* character bitmap reader routine */ - cleanup /* cleanup routine */ -}; diff --git a/thirdparty/grx249/src/fonts/fdv_bgi.h b/thirdparty/grx249/src/fonts/fdv_bgi.h deleted file mode 100644 index ea71a96..0000000 --- a/thirdparty/grx249/src/fonts/fdv_bgi.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - ** fdv_bgi.h -- Borland BGI font file format - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#ifndef __FDV_BGI_H_INCLUDED__ -#define __FDV_BGI_H_INCLUDED__ - -/* This is based on the font code in Hartmut Schirmer's BCC2GRX package */ - -#ifdef __GNUC__ -#define PACKED __attribute ((packed)) -#else -#define PACKED -#endif - -/* - * Stroked BGI font file layout: - * - * +-------------------------------------------------------------------+ - * | ASCII copyright message, starts with "PK\b\b", terminated with ^Z | - * +-------------------------------------------------------------------+ - * | BGIfontFileHeader structure | - * +-------------------------------------------------------------------+ - * | BGIfontHeaderType structure (at offset 'header_size') | - * +-------------------------------------------------------------------+ - * | table of unsigned short offsets into the data table | - * +-------------------------------------------------------------------+ - * | table of unsigned char character widths | - * +-------------------------------------------------------------------+ - * | data table containing stroke vector coordinates and commands | - * +-------------------------------------------------------------------+ - */ - -typedef struct { - GR_int16u header_size PACKED; /* Version 2.0 Header Format */ - char font_name[4] PACKED; /* Font Internal Name */ - GR_int16u font_size PACKED; /* file size in bytes */ - GR_int8u font_major PACKED; /* Driver Version Information */ - GR_int8u font_minor PACKED; - GR_int8u bgi_major PACKED; /* BGI Revision Information */ - GR_int8u bgi_minor PACKED; -} BGIfontFileHeader; - -typedef struct { - char sig PACKED; /* SIGNATURE byte */ - GR_int16u nchrs PACKED; /* number of characters in file */ - char unused1 PACKED; /* Currently Undefined */ - GR_int8u firstch PACKED; /* first character in file */ - GR_int16u cdefs PACKED; /* offset to char definitions */ - GR_int8u scan_flag PACKED; /* (!= 0) -> set is scanable */ - char org_to_cap PACKED; /* Height from origin to top of capitol */ - char org_to_base PACKED; /* Height from origin to baseline */ - char org_to_dec PACKED; /* Height from origin to bot of decender */ - char unused2[5] PACKED; /* Currently undefined */ -} BGIfontHeaderType; - -#define FILEMARKER "PK\b\b" /* file should start with this */ -#define MARKEREND ('Z' - 0x40) /* end of copyright message */ -#define SIGBYTE ('+') /* value of signature byte */ - -/* - * macros to parse data words in the stroke vector table - */ -#if BYTE_ORDER==LITTLE_ENDIAN -#define SV_COMMAND(w) ((w) & 0x8080U) -#define SV_XCOORD(w) ((int)(signed char)((w) << 1) >> 1) -#define SV_YCOORD(w) ((int)(signed char)((w) >> 7) >> 1) - -#define SVC_END 0x0000U -#define SVC_MOVE 0x0080U -#define SVC_SCAN 0x8000U -#define SVC_DRAW 0x8080U -#else -/* BIG_ENDIAN system */ -#define SV_COMMAND(w) ((w) & 0x8080U) -#define SV_YCOORD(w) ((int)(signed char)((w) << 1) >> 1) -#define SV_XCOORD(w) ((int)(signed char)((w) >> 7) >> 1) - -#define SVC_END 0x0000U -#define SVC_MOVE 0x8000U -#define SVC_SCAN 0x0080U -#define SVC_DRAW 0x8080U -#endif - -#endif /* whole file */ diff --git a/thirdparty/grx249/src/fonts/fdv_fna.c b/thirdparty/grx249/src/fonts/fdv_fna.c deleted file mode 100644 index 10b87b0..0000000 --- a/thirdparty/grx249/src/fonts/fdv_fna.c +++ /dev/null @@ -1,281 +0,0 @@ -/** - ** fdv_fna.c -- driver for ascii font file format - ** - ** Copyright (C) 2003 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include -#include - -#include "libgrx.h" -#include "grfontdv.h" -#include "arith.h" - -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - -static FILE *fontfp = NULL; - -static struct { - char buffer[131]; - long offset; - int index; - int minchar; - int maxchar; - int width; - int height; - int isfixed; -} fhdr; - -static int readline(void) -{ - int res; - char *s; - GRX_ENTER(); - res = FALSE; - do { - if(fgets(fhdr.buffer, sizeof fhdr.buffer, fontfp) == NULL) { - DBGPRINTF(DBG_FONT, ("read line failed at index %d\n", fhdr.index)); - goto done; - } - s = fhdr.buffer + strlen(fhdr.buffer); - while(--s >= fhdr.buffer && (*s == '\n' || *s == '\r')); - *++s = '\0'; - if(strlen(fhdr.buffer) > 127) { - DBGPRINTF(DBG_FONT, ("line too long \"%s\"", fhdr.buffer)); - goto done; - } - while(--s >= fhdr.buffer && isspace(*s)); - *++s = '\0'; - } while(s == fhdr.buffer || *fhdr.buffer == ';'); - res = TRUE; -done: GRX_RETURN(res); -} - -static int readindex(int chr, int y) -{ - int res; - int index; - GRX_ENTER(); - res = FALSE; - index = (chr - fhdr.minchar) * fhdr.height + y; - if(fhdr.index > index) { - DBGPRINTF(DBG_FONT, ("current index %d > requested %d\n", fhdr.index, index)); - if(fseek(fontfp, fhdr.offset, SEEK_SET) < 0) goto done; - fhdr.index = -1; - } - while(fhdr.index < index) { - if(!readline()) goto done; - fhdr.index++; - } - res = TRUE; -done: GRX_RETURN(res); -} - -static void cleanup(void) -{ - GRX_ENTER(); - if(fontfp != NULL) fclose(fontfp); - fontfp = NULL; - fhdr.index = -1; - GRX_LEAVE(); -} - -static int openfile(char *fname) -{ - int res; - GRX_ENTER(); - res = FALSE; - cleanup(); - fontfp = fopen(fname, "rb"); - if(fontfp == NULL) { - DBGPRINTF(DBG_FONT, ("fopen(\"%s\") failed\n", fname)); - goto done; - } - res = TRUE; -done: if(!res) cleanup(); - GRX_RETURN(res); -} - -static int header(GrFontHeader *hdr) -{ - int res; - char *s; - int index; - int i, n; - static char *names[] = { - "name", - "family", - "isfixed", - "width", - "height", - "minchar", - "maxchar", - "baseline", - "undwidth", - "avgwidth", - "minwidth", - "maxwidth", - "note", - NULL - }; - int attrib; - GRX_ENTER(); - res = FALSE; - if(fontfp == NULL) goto done; - attrib = 0; - while(readline() && isalpha(*fhdr.buffer)) { - fhdr.offset = ftell(fontfp); - if(fhdr.offset == -1) { - DBGPRINTF(DBG_FONT, ("ftell failed after \"%s\"\n", fhdr.buffer)); - goto done; - } - if(!strcmp(fhdr.buffer, "note")) continue; - s = fhdr.buffer; - while(isalpha(*++s)); - if(!isspace(*s)) { - DBGPRINTF(DBG_FONT, ("invalid header line \"%s\"\n", fhdr.buffer)); - goto done; - } - *s = '\0'; - while(isspace(*++s)); - for(index = 0; names[index] != NULL; index++) - if(!strcmp(fhdr.buffer, names[index])) break; - if(names[index] == NULL) { - DBGPRINTF(DBG_FONT, ("unknown attribute \"%s\"\n", fhdr.buffer)); - goto done; - } - if(index == 9) index = 3; - if(attrib & (1 << index)) { - DBGPRINTF(DBG_FONT, ("duplicate attribute \"%s\"\n", fhdr.buffer)); - goto done; - } - if(index >= 2 && index <= 11) { - if(sscanf(s, "%d%n", &i, &n) != 1 || n != strlen(s)) { - DBGPRINTF(DBG_FONT, ("invalid number \"%s\"\n", s)); - goto done; - } - if(i < 0) { - DBGPRINTF(DBG_FONT, ("negative number %d\n", i)); - goto done; - } - } - switch(index) { - case 0 : strcpy(hdr->name, s); break; - case 1 : strcpy(hdr->family, s); break; - case 2 : - fhdr.isfixed = i; - hdr->proportional = !fhdr.isfixed; - break; - case 3 : hdr->width = fhdr.width = i; break; - case 4 : hdr->height = fhdr.height = i; break; - case 5 : hdr->minchar = fhdr.minchar = i; break; - case 6 : fhdr.maxchar = i; break; - case 7 : hdr->baseline = i; break; - case 8 : hdr->ulheight = i; break; - case 10 : - if(i == 0) { - DBGPRINTF(DBG_FONT, ("invalid width %d\n", i)); - goto done; - } - break; - case 11 : - if(i > 127) { - DBGPRINTF(DBG_FONT, ("invalid width %d\n", i)); - goto done; - } - break; - case 12 : continue; - default : - DBGPRINTF(DBG_FONT, ("unsupported attribute \"%s\"\n", fhdr.buffer)); - goto done; - } - attrib |= 1 << index; - } - if((attrib & 0xFF) != 0xFF) { - DBGPRINTF(DBG_FONT, ("insufficient attributes 0x%x\n", attrib)); - goto done; - } - hdr->numchars = fhdr.maxchar - fhdr.minchar + 1; - if(hdr->numchars <= 0) { - DBGPRINTF(DBG_FONT, ("minchar %d > maxchar %d\n", fhdr.minchar, fhdr.maxchar)); - goto done; - } - fhdr.index++; - hdr->scalable = FALSE; - hdr->preloaded = FALSE; - hdr->modified = GR_FONTCVT_NONE; - if((attrib & 0x0100) == 0) hdr->ulheight = imax(1, hdr->height / 15); - hdr->ulpos = hdr->height - hdr->ulheight; - res = TRUE; -done: GRX_RETURN(res); -} - -static int charwdt(int chr) -{ - int res; - GRX_ENTER(); - DBGPRINTF(DBG_FONT, ("charwdt(%d)\n", chr)); - res = -1; - if(fontfp != NULL && chr >= fhdr.minchar && chr <= fhdr.maxchar) { - if(fhdr.isfixed) res = fhdr.width; - else if(readindex(chr, 0)) res = strlen(fhdr.buffer); - } - GRX_RETURN(res); -} - -static int bitmap(int chr, int w, int h, char *buffer) -{ - int res; - int y, x; - int bytes; - GRX_ENTER(); - DBGPRINTF(DBG_FONT, ("bitmap(%d, %d, %d)\n", chr, w, h)); - res = FALSE; - if(w != charwdt(chr) || h != fhdr.height) goto done; - bytes = (w - 1) / 8 + 1; - memset(buffer, '\0', bytes * h); - for(y = 0; y < h; y++) { - if(!readindex(chr, y)) goto done; - if(strlen(fhdr.buffer) != w) { - DBGPRINTF(DBG_FONT, ("strlen(\"%s\") != %d\n", fhdr.buffer, w)); - goto done; - } - for(x = 0; x < w; x++) { - if(fhdr.buffer[x] == '#') buffer[x >> 3] |= 1 << (7 - (x & 7)); - else if(fhdr.buffer[x] != '.') { - DBGPRINTF(DBG_FONT, ("invalid character data \'%c\'\n", fhdr.buffer[x])); - goto done; - } - } - buffer += bytes; - } - res = TRUE; -done: GRX_RETURN(res); -} - -GrFontDriver _GrFontDriverFNA = { - "FNA", /* driver name (doc only) */ - ".fna", /* font file extension */ - FALSE, /* scalable */ - openfile, /* file open and check routine */ - header, /* font header reader routine */ - charwdt, /* character width reader routine */ - bitmap, /* character bitmap reader routine */ - cleanup /* cleanup routine */ -}; diff --git a/thirdparty/grx249/src/fonts/fdv_grx.c b/thirdparty/grx249/src/fonts/fdv_grx.c deleted file mode 100644 index 1d03b1f..0000000 --- a/thirdparty/grx249/src/fonts/fdv_grx.c +++ /dev/null @@ -1,204 +0,0 @@ -/** - ** fdv_grx.c -- driver for GRX native font file format - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include - -#include "libgrx.h" -#include "grfontdv.h" -#include "allocate.h" -#include "fonts/fdv_grx.h" - -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - -static GrFontFileHeaderGRX fhdr; -static FILE *fontfp = NULL; -static GR_int16u far *wtable = NULL; -static unsigned int wtsize = 0; -static int nextch = 0; - -#if BYTE_ORDER==BIG_ENDIAN -#include "ordswap.h" -static void swap_header(void) { - GRX_ENTER(); - _GR_swap32u(&fhdr.magic); - _GR_swap32u(&fhdr.bmpsize); - _GR_swap16u(&fhdr.width); - _GR_swap16u(&fhdr.height); - _GR_swap16u(&fhdr.minchar); - _GR_swap16u(&fhdr.maxchar); - _GR_swap16u(&fhdr.isfixed); - _GR_swap16u(&fhdr.reserved); - _GR_swap16u(&fhdr.baseline); - _GR_swap16u(&fhdr.undwidth); - /* no need to change fnname && family */ - GRX_LEAVE(); -} - -static void swap_wtable(void) { - GR_int16u far *wt; - unsigned int ws; - GRX_ENTER(); - wt = wtable; - ws = wtsize / sizeof(GR_int16u); - while (ws-- > 0) { - _GR_swap16u(wt); - ++wt; - } - GRX_LEAVE(); -} -#endif - -static void cleanup(void) -{ - GRX_ENTER(); - if(fontfp != NULL) fclose(fontfp); - if(wtable != NULL) farfree(wtable); - fontfp = NULL; - wtable = NULL; - nextch = 0; - wtsize = 0; - GRX_LEAVE(); -} - -static int openfile(char *fname) -{ - int res; -#if BYTE_ORDER==BIG_ENDIAN - int swap; -#endif - GRX_ENTER(); - res = FALSE; - cleanup(); - fontfp = fopen(fname,"rb"); - if(fontfp == NULL) { - DBGPRINTF(DBG_FONT,("fopen(\"%s\") failed\n", fname)); - goto done; - } - if(fread(&fhdr,sizeof(fhdr),1,fontfp) != 1) { - DBGPRINTF(DBG_FONT,("reading header failed\n")); - goto done; - } -#if BYTE_ORDER==BIG_ENDIAN - swap = 0; - if(fhdr.magic == GRX_FONTMAGIC_SWAPPED) { - swap = 1; - DBGPRINTF(DBG_FONT,("swaping header byte order\n")); - swap_header(); - } -#endif - if(fhdr.magic != GRX_FONTMAGIC) { - DBGPRINTF(DBG_FONT,("font magic doesn't fit: %lx != %lx\n", \ - (unsigned long)fhdr.magic,(unsigned long)GRX_FONTMAGIC)); - goto done; - } - if(!fhdr.isfixed) { - wtsize = sizeof(GR_int16u) * (fhdr.maxchar - fhdr.minchar + 1); - wtable = farmalloc(wtsize); - if(wtable == NULL) { - DBGPRINTF(DBG_FONT,("Allocating wtable failed\n")); - goto done; - } - if(fread(wtable,wtsize,1,fontfp) != 1) { - DBGPRINTF(DBG_FONT,("Loading wtable failed\n")); - goto done; - } -#if BYTE_ORDER==BIG_ENDIAN - if (swap) { - DBGPRINTF(DBG_FONT,("swaping wtable byte order\n")); - swap_wtable(); - } -#endif - } - nextch = fhdr.minchar; - res = TRUE; -done: if (!res) cleanup(); - GRX_RETURN(res); -} - -static int header(GrFontHeader *hdr) -{ - int res; - GRX_ENTER(); - res = FALSE; - if(fontfp != NULL) { - memcpy(hdr->name, fhdr.fnname,sizeof(fhdr.fnname)); - memcpy(hdr->family,fhdr.family,sizeof(fhdr.family)); - hdr->name [sizeof(fhdr.fnname)] = '\0'; - hdr->family[sizeof(fhdr.family)] = '\0'; - hdr->proportional = fhdr.isfixed ? FALSE : TRUE; - hdr->scalable = FALSE; - hdr->preloaded = FALSE; - hdr->modified = GR_FONTCVT_NONE; - hdr->width = fhdr.width; - hdr->height = fhdr.height; - hdr->baseline = fhdr.baseline; - hdr->ulpos = fhdr.height - fhdr.undwidth; - hdr->ulheight = fhdr.undwidth; - hdr->minchar = fhdr.minchar; - hdr->numchars = fhdr.maxchar - fhdr.minchar + 1; - res = TRUE; - } - GRX_RETURN(res); -} - -static int charwdt(int chr) -{ - int res; - GRX_ENTER(); - res = -1; - if(fontfp != NULL && - chr >= fhdr.minchar && - chr <= fhdr.maxchar ) - res = (fhdr.isfixed ? fhdr.width : wtable[chr - fhdr.minchar]); - GRX_RETURN(res); -} - -static int bitmap(int chr,int w,int h,char *buffer) -{ - int res; - GRX_ENTER(); - res = FALSE; - if( (w > 0) && (w == charwdt(chr)) - &&(h > 0) && (h == fhdr.height) ) { - if(chr != nextch) { - long fpos = sizeof(fhdr) + (fhdr.isfixed ? 0 : wtsize); - for(nextch = fhdr.minchar; nextch != chr; nextch++) { - fpos += ((charwdt(nextch) + 7) >> 3) * fhdr.height; - } - fseek(fontfp,fpos,SEEK_SET); - } - nextch = chr + 1; - res = fread(buffer,(((w + 7) >> 3) * h),1,fontfp) == 1; - } - GRX_RETURN(res); -} - -GrFontDriver _GrFontDriverGRX = { - "GRX", /* driver name (doc only) */ - ".fnt", /* font file extension */ - FALSE, /* scalable */ - openfile, /* file open and check routine */ - header, /* font header reader routine */ - charwdt, /* character width reader routine */ - bitmap, /* character bitmap reader routine */ - cleanup /* cleanup routine */ -}; - diff --git a/thirdparty/grx249/src/fonts/fdv_grx.h b/thirdparty/grx249/src/fonts/fdv_grx.h deleted file mode 100644 index c67918a..0000000 --- a/thirdparty/grx249/src/fonts/fdv_grx.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - ** fdv_grx.h -- GRX native font file format - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __FDV_GRX_H_INCLUDED__ -#define __FDV_GRX_H_INCLUDED__ - -/* - * font file structure: - * +-----------------------+ - * | FILE HEADER | - * +-----------------------+ - * | PROPORTIONAL | - * | WIDTH TABLE | - * | (16 bit ints) | - * | (prop fonts only) | - * +-----------------------+ - * | BITMAP | - * +-----------------------+ - */ - -#define GRX_NAMEWIDTH 16 -#define GRX_FONTMAGIC 0x19590214L -#define GRX_FONTMAGIC_SWAPPED 0x14025919L - -typedef struct _GR_fontFileHeaderGRX { /* the header */ - GR_int32u magic; /* font file magic number */ - GR_int32u bmpsize; /* character bitmap size */ - GR_int16u width; /* width (average for proportional) */ - GR_int16u height; /* font height */ - GR_int16u minchar; /* lowest character code in font */ - GR_int16u maxchar; /* highest character code in font */ - GR_int16u isfixed; /* nonzero if fixed font */ - GR_int16u reserved; /* ??? */ - GR_int16u baseline; /* baseline from top of font */ - GR_int16u undwidth; /* underline width (at bottom) */ - char fnname[GRX_NAMEWIDTH]; /* font file name (w/o path) */ - char family[GRX_NAMEWIDTH]; /* font family name */ -} GrFontFileHeaderGRX; - -#endif /* whole file */ - diff --git a/thirdparty/grx249/src/fonts/fdv_raw.c b/thirdparty/grx249/src/fonts/fdv_raw.c deleted file mode 100644 index eee7809..0000000 --- a/thirdparty/grx249/src/fonts/fdv_raw.c +++ /dev/null @@ -1,222 +0,0 @@ -/** - ** fdv_raw.c -- driver for raw font file format - ** - ** Copyright (C) 2003 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Changes by Dimitar Zhekov (jimmy@is-vn.bg) Nov 20 2003 - ** - Added psf2 support, raw and psf1 are now treated as pseudo-psf2. - ** - Better support for RAW files: up to 16x32, assuming scale 1:2. - ** - **/ - -#include -#include -#include -#include - -#include "libgrx.h" -#include "grfontdv.h" -#include "arith.h" -#include "fonts/fdv_raw.h" - -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - -#ifndef SEEK_END -#define SEEK_END 2 -#endif - -static FILE *fontfp = NULL; -static int nextch = 0; -static char name[40], family[40]; -static GrFontFileHeaderPSF fhdr; - -#if BYTE_ORDER==BIG_ENDIAN -#include "ordswap.h" -static void swap_header(void) { - GRX_ENTER(); - _GR_swap32u(&fhdr.version); - _GR_swap32u(&fhdr.offset); - _GR_swap32u(&fhdr.flags); - _GR_swap32u(&fhdr.length); - _GR_swap32u(&fhdr.charsize); - _GR_swap32u(&fhdr.height); - _GR_swap32u(&fhdr.width); - GRX_LEAVE(); -} -#endif - -static void cleanup(void) -{ - GRX_ENTER(); - if(fontfp != NULL) fclose(fontfp); - fontfp = NULL; - nextch = 0; - GRX_LEAVE(); -} - -static int openfile(char *fname) -{ - int res; - long size; - char *s; - GRX_ENTER(); - res = FALSE; - cleanup(); - /* open fname and read header */ - fontfp = fopen(fname, "rb"); - if(fontfp == NULL) { - DBGPRINTF(DBG_FONT, ("fopen(\"%s\") failed\n", fname)); - goto done; - } - if(fread(&fhdr, 1, sizeof fhdr, fontfp) != sizeof fhdr) { - DBGPRINTF(DBG_FONT, ("read header failed\n")); - goto done; - } - if(fseek(fontfp, 0, SEEK_END) < 0) { - DBGPRINTF(DBG_FONT, ("seek to end of file failed\n")); - goto done; - } - size = ftell(fontfp); - if(size < 0) { - DBGPRINTF(DBG_FONT, ("tell file position failed\n")); - goto done; - } - /* try to guess file type */ - if(fhdr.id[0] == PSF1_MAGIC0 && fhdr.id[1] == PSF1_MAGIC1) { - fhdr.offset = PSF1_HDRSIZE; - fhdr.width = 8; - fhdr.height = fhdr.charsize = fhdr.size; - fhdr.numchars = (fhdr.mode & PSF1_MODE512) == 0 ? 256 : 512; - } - else if(fhdr.id[0] == PSF2_MAGIC0 && fhdr.id[1] == PSF2_MAGIC1 && fhdr.mode == PSF2_MAGIC2 && fhdr.size == PSF2_MAGIC3) - { -#if BYTE_ORDER==BIG_ENDIAN - DBGPRINTF(DBG_FONT, ("swapping header byte order\n")); - swap_header(); -#endif - fhdr.charsize = ((fhdr.width + 7) / 8) * fhdr.height; - if(fhdr.numchars == 0) { - DBGPRINTF(DBG_FONT, ("invalid numchars\n")); - goto done; - } - } - else { - if(size > 16384 || size % (size <= 4096 ? 256 : 512)) { - DBGPRINTF(DBG_FONT, ("invalid raw file size\n")); - goto done; - } - fhdr.offset = 0; - fhdr.charsize = size / 256; - if(size <= 4096) { - fhdr.width = 8; - fhdr.height = fhdr.charsize; - } - else { - fhdr.height = size / 512; - fhdr.width = (fhdr.height + 1) / 2; - } - fhdr.numchars = 256; - } - if(fhdr.offset != 0) { - if(fhdr.charsize == 0) { - DBGPRINTF(DBG_FONT, ("invalid psf charsize\n")); - goto done; - } - if(size - fhdr.offset < fhdr.charsize * fhdr.numchars) { - DBGPRINTF(DBG_FONT, ("invalid psf file size\n")); - goto done; - } - } - /* get font name and family */ - s = strrchr(fname, '/'); -#if defined(__MSDOS__) || defined(__WIN32__) - if(s == NULL) { - s = strrchr(fname, '\\'); - if(s == NULL) s = strrchr(fname, ':'); - } - else if(strrchr(s, '\\') != NULL) s = strrchr(s, '\\'); -#endif - if(s == NULL || *++s == '\0') s = fname; - strncpy(name, s, sizeof name - 1); - name[sizeof name - 1] = '\0'; - if((s = strrchr(name, '.')) != NULL) *s = '\0'; - if(*name == '\0') sprintf(name, fhdr.offset != 0 ? "psf%d" : "raw%d", (int) fhdr.height); - strcpy(family, name); - for(s = family; isalpha(*s); s++); - if(s > family) *s = '\0'; - /* finish and return */ - nextch = fhdr.numchars; - res = TRUE; -done: if(!res) cleanup(); - GRX_RETURN(res); -} - -static int header(GrFontHeader *hdr) -{ - int res; - GRX_ENTER(); - res = FALSE; - if(fontfp != NULL) { - strcpy(hdr->name, name); - strcpy(hdr->family, family); - hdr->proportional = FALSE; - hdr->scalable = FALSE; - hdr->preloaded = FALSE; - hdr->modified = GR_FONTCVT_NONE; - hdr->width = fhdr.width; - hdr->height = fhdr.height; - hdr->baseline = (hdr->height * 4) / 5 + (hdr->height < 15); - hdr->ulheight = imax(1, hdr->height / 15); - hdr->ulpos = hdr->height - hdr->ulheight; - hdr->minchar = 0; - hdr->numchars = fhdr.numchars; - res = TRUE; - } - GRX_RETURN(res); -} - -static int charwdt(int chr) -{ - int res; - GRX_ENTER(); - res = -1; - if(fontfp != NULL && chr >= 0 && chr < fhdr.numchars) res = fhdr.width; - GRX_RETURN(res); -} - -static int bitmap(int chr,int w,int h,char *buffer) -{ - int res; - GRX_ENTER(); - res = FALSE; - if(w != charwdt(chr) || h != fhdr.height) goto done; - if(chr != nextch && fseek(fontfp, fhdr.offset + fhdr.charsize * chr, SEEK_SET) < 0) goto done; - if(fread(buffer, 1, fhdr.charsize, fontfp) != fhdr.charsize) goto done; - nextch = chr + 1; - res = TRUE; -done: GRX_RETURN(res); -} - -GrFontDriver _GrFontDriverRAW = { - "RAW", /* driver name (doc only) */ - ".psf", /* font file extension */ - FALSE, /* scalable */ - openfile, /* file open and check routine */ - header, /* font header reader routine */ - charwdt, /* character width reader routine */ - bitmap, /* character bitmap reader routine */ - cleanup /* cleanup routine */ -}; diff --git a/thirdparty/grx249/src/fonts/fdv_raw.h b/thirdparty/grx249/src/fonts/fdv_raw.h deleted file mode 100644 index d65f826..0000000 --- a/thirdparty/grx249/src/fonts/fdv_raw.h +++ /dev/null @@ -1,52 +0,0 @@ -/** - ** fdv_raw.h -- driver for raw font file format - ** - ** Copyright (C) 2003 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __FDV_RAW_H_INCLUDED__ -#define __FDV_RAW_H_INCLUDED__ - -#ifdef __GNUC__ -#define PACKED __attribute__((packed)) -#else -#define PACKED -#endif - -#define PSF1_MAGIC0 0x36 -#define PSF1_MAGIC1 0x04 -#define PSF1_MODE512 0x01 -#define PSF1_UNICODE 0x02 -#define PSF1_HDRSIZE 0x04 - -#define PSF2_MAGIC0 0x72 -#define PSF2_MAGIC1 0xb5 -#define PSF2_MAGIC2 0x4a -#define PSF2_MAGIC3 0x86 -#define PSF2_UNICODE 0x01 - -typedef struct _GR_fontFileHeaderPSF { /* the header */ - GR_int8u id[2]; - GR_int8u mode; /* or psf2 id[2] */ - GR_int8u size; /* or psf2 id[3] */ - GR_int32u version; - GR_int32u offset; - GR_int32u flags; - GR_int32u numchars; - GR_int32u charsize; - GR_int32u height, width; -} PACKED GrFontFileHeaderPSF; - -#endif diff --git a/thirdparty/grx249/src/fonts/fdv_win.c b/thirdparty/grx249/src/fonts/fdv_win.c deleted file mode 100644 index fb342a2..0000000 --- a/thirdparty/grx249/src/fonts/fdv_win.c +++ /dev/null @@ -1,236 +0,0 @@ -/** - ** fdv_win.c -- driver for Windows resource font file format - ** - ** Copyright (C) 2003 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include -#include - -#include "libgrx.h" -#include "grfontdv.h" -#include "arith.h" -#include "allocate.h" -#include "fonts/fdv_win.h" - -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - -static FILE *fontfp = NULL; -static int offset = 0; -static GrResourceFileHeaderWIN rhdr; -static GrFontFileHeaderWIN fhdr; -static GrCharHeaderWIN far *ctable = NULL; - -#if BYTE_ORDER==BIG_ENDIAN -#include "ordswap.h" -static void swap_resource(void) -{ - GRX_ENTER(); - _GR_swap16u(&rhdr.type_id); - _GR_swap16u(&rhdr.name_id); - _GR_swap16u(&rhdr.flags); - _GR_swap32u(&rhdr.size); - GRX_LEAVE(); -} - -static void swap_header(void) -{ - GRX_ENTER(); - _GR_swap16u(&fhdr.version); - _GR_swap32u(&fhdr.size); - _GR_swap16u(&fhdr.type); - _GR_swap16u(&fhdr.points); - _GR_swap16u(&fhdr.vert_res); - _GR_swap16u(&fhdr.horiz_res); - _GR_swap16u(&fhdr.ascent); - _GR_swap16u(&fhdr.internal_leading); - _GR_swap16u(&fhdr.external_leading); - _GR_swap16u(&fhdr.weight); - _GR_swap16u(&fhdr.pix_width); - _GR_swap16u(&fhdr.pix_height); - _GR_swap16u(&fhdr.avg_width); - _GR_swap16u(&fhdr.max_width); - _GR_swap16u(&fhdr.width_bytes); - _GR_swap32u(&fhdr.device); - _GR_swap32u(&fhdr.face); - _GR_swap32u(&fhdr.bits_pointer); - _GR_swap32u(&fhdr.bits_offset); - GRX_LEAVE(); -} - -static void swap_ctable(void) -{ - int i; - GRX_ENTER(); - for(i = 0; i < fhdr.last_char - fhdr.first_char + 2; i++) { - _GR_swap16u(&ctable[i].width); - _GR_swap16u(&ctable[i].offset); - } - GRX_LEAVE(); -} -#endif - -static void cleanup(void) -{ - GRX_ENTER(); - if(fontfp != NULL) fclose(fontfp); - if(ctable != NULL) farfree(ctable); - fontfp = NULL; - ctable = NULL; - offset = 0; - GRX_LEAVE(); -} - -static int openfile(char *fname) -{ - int res; - unsigned size; - GRX_ENTER(); - res = FALSE; - cleanup(); - /* open and test the file */ - fontfp = fopen(fname, "rb"); - if(fontfp == NULL) { - DBGPRINTF(DBG_FONT, ("fopen(\"%s\") failed\n", fname)); - goto done; - } - if(fread(&rhdr, 1, sizeof rhdr, fontfp) != sizeof rhdr) { - DBGPRINTF(DBG_FONT, ("read resource failed\n", fname)); - goto done; - } - if(rhdr.type_ff == 0xFF) { -#if BYTE_ORDER==BIG_ENDIAN - DBGPRINTF(DBG_FONT, ("swapping resource byte order\n")); - swap_resource(); -#endif - if(rhdr.type_id != 0x0008 || rhdr.name_ff != 0xFF) { - DBGPRINTF(DBG_FONT, ("invalid or unsupported resource header\n")); - goto done; - } - offset = sizeof rhdr; - } - else if(fseek(fontfp, 0, SEEK_SET < 0)) { - DBGPRINTF(DBG_FONT, ("rewind failed")); - goto done; - } - if(fread(&fhdr, 1, sizeof fhdr, fontfp) != sizeof fhdr) { - DBGPRINTF(DBG_FONT, ("read header failed\n")); - goto done; - } -#if BYTE_ORDER==BIG_ENDIAN - DBGPRINTF(DBG_FONT, ("swapping header byte order\n")); - swap_header(); -#endif - if(fhdr.version != 0x0200 || fhdr.type != 0) { - DBGPRINTF(DBG_FONT, ("unrecognized font header\n")); - goto done; - } - /* allocate and read the ctable */ - size = (fhdr.last_char - fhdr.first_char + 2) * sizeof *ctable; - if((ctable = farmalloc(size)) == NULL) { - DBGPRINTF(DBG_FONT, ("allocate ctable failed\n")); - goto done; - } - if(fread(ctable, 1, size, fontfp) != size) { - DBGPRINTF(DBG_FONT, ("read ctable failed\n")); - goto done; - } -#if BYTE_ORDER==BIG_ENDIAN - DBGPRINTF(DBG_FONT, ("swapping ctable byte order\n")); - swap_ctable(); -#endif - res = TRUE; -done: if(!res) cleanup(); - GRX_RETURN(res); -} - -static char *families[] = { "Unknown", "Roman", "Swiss", "Modern", "Script", "Decorative" }; - -static int header(GrFontHeader *hdr) -{ - int res; - int c; - char *s; - GRX_ENTER(); - res = FALSE; - if(fontfp != NULL) { - if((c = fhdr.pitch_and_family >> 4) <= 5) strcpy(hdr->family, families[c]); - else sprintf(hdr->family, "0x%x", fhdr.pitch_and_family); - if(fhdr.face) { - s = hdr->name; - if(fseek(fontfp, offset + fhdr.face, SEEK_SET) < 0) goto done; - do { - if((c = fgetc(fontfp)) == EOF) goto done; - *(s++) = c; - } while(c && s - hdr->name < 99); - if(c) *s = '\0'; - } - else sprintf(hdr->name, "%s-%d", hdr->family, fhdr.pix_height); - hdr->proportional = fhdr.pix_width == 0; - hdr->scalable = FALSE; - hdr->preloaded = FALSE; - hdr->modified = GR_FONTCVT_NONE; - hdr->width = hdr->proportional ? fhdr.avg_width : fhdr.pix_width; - hdr->height = fhdr.pix_height; - hdr->baseline = fhdr.ascent; - hdr->ulheight = imax(1, hdr->height / 15); - hdr->ulpos = hdr->height - hdr->ulheight; - hdr->minchar = fhdr.first_char; - hdr->numchars = fhdr.last_char - fhdr.first_char + 1; - res = TRUE; - } -done: GRX_RETURN(res); -} - -static int charwdt(int chr) -{ - int res; - GRX_ENTER(); - res = -1; - if(fontfp != NULL && chr >= fhdr.first_char && chr <= fhdr.last_char) res = ctable[chr - fhdr.first_char].width; - GRX_RETURN(res); -} - -static int bitmap(int chr, int w, int h, char *buffer) -{ - int res; - int i, y; - int bytes; - GRX_ENTER(); - res = FALSE; - if(w != charwdt(chr) || h != fhdr.pix_height) goto done; - bytes = (w - 1) / 8 + 1; - if(fseek(fontfp, offset + ctable[chr - fhdr.first_char].offset, SEEK_SET) < 0) goto done; - for(i = 0; i < bytes; i++) - for(y = 0; y < h; y++) - if(fread(buffer + bytes * y + i, 1, 1, fontfp) != 1) goto done; - res = TRUE; -done: GRX_RETURN(res); -} - -GrFontDriver _GrFontDriverWIN = { - "WIN", /* driver name (doc only) */ - ".res", /* font file extension */ - FALSE, /* scalable */ - openfile, /* file open and check routine */ - header, /* font header reader routine */ - charwdt, /* character width reader routine */ - bitmap, /* character bitmap reader routine */ - cleanup /* cleanup routine */ -}; diff --git a/thirdparty/grx249/src/fonts/fdv_win.h b/thirdparty/grx249/src/fonts/fdv_win.h deleted file mode 100644 index 536a3a8..0000000 --- a/thirdparty/grx249/src/fonts/fdv_win.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - ** fdv_win.h -- driver for Windows resource font file format - ** - ** Copyright (C) 2002 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __FDV_WIN_H_INCLUDED__ -#define __FDV_WIN_H_INCLUDED__ - -#ifdef __GNUC__ -#define PACKED __attribute__((packed)) -#else -#define PACKED -#endif - -typedef struct _GR_resourceFileHeaderWIN -{ - GR_int8u type_ff; - GR_int16u type_id; - GR_int8u name_ff; - GR_int16u name_id; - GR_int16u flags; - GR_int32u size; -} PACKED GrResourceFileHeaderWIN; - -typedef struct _GR_fontFileHeaderWIN { /* the header */ - GR_int16u version; - GR_int32u size; - GR_int8 copyright[60]; - GR_int16u type; - GR_int16u points; - GR_int16u vert_res; - GR_int16u horiz_res; - GR_int16u ascent; - GR_int16u internal_leading; - GR_int16u external_leading; - GR_int8u italic; - GR_int8u underline; - GR_int8u strike_out; - GR_int16u weight; - GR_int8u char_set; - GR_int16u pix_width; - GR_int16u pix_height; - GR_int8u pitch_and_family; - GR_int16u avg_width; - GR_int16u max_width; - GR_int8u first_char; - GR_int8u last_char; - GR_int8u default_char; - GR_int8u break_char; - GR_int16u width_bytes; - GR_int32u device; - GR_int32u face; - GR_int32u bits_pointer; - GR_int32u bits_offset; - GR_int8u reserved; -} PACKED GrFontFileHeaderWIN; - -typedef struct _GR_charHeaderWIN -{ - GR_int16u width; - GR_int16u offset; -} PACKED GrCharHeaderWIN; - -#endif diff --git a/thirdparty/grx249/src/fonts/fdv_xwin.c b/thirdparty/grx249/src/fonts/fdv_xwin.c deleted file mode 100644 index ca19af9..0000000 --- a/thirdparty/grx249/src/fonts/fdv_xwin.c +++ /dev/null @@ -1,211 +0,0 @@ -/** - ** fdv_xwin.c -- driver X Windows fonts - ** - ** Author: Ulrich Leodolter - ** E-mail: ulrich@lab1.psy.univie.ac.at - ** Date: Thu Sep 28 11:21:46 1995 - ** RCSId: $Id$ - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by Dimitar Zhekov (jimmy@is-vn.bg) May 11 2003 - ** - use the default underline height instead of font descent - ** - use a separate X display and window (how costly is that?) - ** - use the real font name and font family whenever possible - **/ - -#include -#include - -#include "libgrx.h" -#include "libxwin.h" -#include -#include "grfontdv.h" -#include "allocate.h" -#include "arith.h" - -static Display * fontdsp = NULL; -static Window fontwin = None; -static XFontStruct * fontp = NULL; -static Pixmap fontbmp = None; -static GC fontgc = None; - -static unsigned char swap_byte[256]; -static unsigned char swap_byte_inited = 0; - -static void init_swap_byte (void) -{ - if (!swap_byte_inited) { - unsigned int i; - for (i = 0; i < 256; i++) { - swap_byte[i] = ( ((i&0x01)<<7) | ((i&0x02)<<5) - | ((i&0x04)<<3) | ((i&0x08)<<1) - | ((i&0x10)>>1) | ((i&0x20)>>3) - | ((i&0x40)>>5) | ((i&0x80)>>7)); - } - swap_byte_inited = 1; - } -} - -static void cleanup(void) -{ - if (fontdsp != NULL) { - if (fontp != NULL) XFreeFont (fontdsp, fontp); - if (fontbmp != None) XFreePixmap (fontdsp, fontbmp); - if (fontgc != None) XFreeGC (fontdsp, fontgc); - if (fontwin != None) XDestroyWindow (fontdsp, fontwin); - XCloseDisplay (fontdsp); - } - fontdsp = NULL; - fontwin = None; - fontp = NULL; - fontbmp = None; - fontgc = None; -} - -static int openfile(char *fname) -{ - int res; - Window root; - int i, numchars; - - res = FALSE; - init_swap_byte(); - cleanup(); - fontdsp = XOpenDisplay (""); - if (fontdsp == NULL) goto done; - root = DefaultRootWindow (fontdsp); - fontwin = XCreateSimpleWindow (fontdsp, root, 0, 0, 1, 1, 0, 0, 0); - if (fontwin == None) goto done; - - fontp = XLoadQueryFont (fontdsp, fname); - if (fontp == NULL) goto done; - - numchars = fontp->max_char_or_byte2 - fontp->min_char_or_byte2 + 1; - fontbmp = XCreatePixmap (fontdsp, fontwin, - numchars * fontp->max_bounds.width, - fontp->ascent + fontp->descent, 1); - if (fontbmp == None) goto done; - fontgc = XCreateGC (fontdsp, fontbmp, 0L, NULL); - if (fontgc == None) goto done; - XSetFont (fontdsp, fontgc, fontp->fid); - XSetForeground (fontdsp, fontgc, 0); - XFillRectangle (fontdsp, fontbmp, fontgc, 0, 0, - numchars * fontp->max_bounds.width, - fontp->ascent + fontp->descent); - XSetForeground (fontdsp, fontgc, 1); - XSetBackground (fontdsp, fontgc, 0); - for (i = 0; i < numchars; i++) { - char c = fontp->min_char_or_byte2 + i; - XDrawString (fontdsp, fontbmp, fontgc, - i * fontp->max_bounds.width, - fontp->ascent, &c, 1); - } - res = TRUE; -done: - if (!res) cleanup(); - return(res); -} - -static int header(GrFontHeader *hdr) -{ - unsigned long card32; - char *value; - - if (fontp == NULL) return(FALSE); - strcpy(hdr->family, "xwin"); - if (XGetFontProperty (fontp, XA_FAMILY_NAME, &card32)) { - value = XGetAtomName (fontdsp, card32); - if (value != NULL) { - strncpy(hdr->family, value, 99); - hdr->family[99] = '\0'; - XFree (value); - } - } - hdr->proportional = (fontp->per_char == NULL) ? FALSE : TRUE; - hdr->scalable = FALSE; - hdr->preloaded = FALSE; - hdr->modified = GR_FONTCVT_NONE; - hdr->width = fontp->max_bounds.width; - hdr->height = fontp->ascent + fontp->descent; - hdr->baseline = fontp->ascent; - hdr->ulheight = imax(1,(hdr->height / 15)); - hdr->ulpos = hdr->height - hdr->ulheight; - hdr->minchar = fontp->min_char_or_byte2; - hdr->numchars = fontp->max_char_or_byte2 - fontp->min_char_or_byte2 + 1; - strncpy(hdr->name, hdr->family, 89); - hdr->name[89] = '\0'; - sprintf(hdr->name + strlen(hdr->name), "-%d", hdr->height); - if (XGetFontProperty (fontp, XA_FONT_NAME, &card32)) { - value = XGetAtomName (fontdsp, card32); - if (value != NULL) { - strncpy(hdr->name, value, 99); - hdr->name[99] = '\0'; - XFree (value); - } - } - return(TRUE); -} - -static int charwdt(int chr) -{ - int width; - if (fontp == NULL) return(-1); - if (chr < fontp->min_char_or_byte2) return(-1); - if (chr > fontp->max_char_or_byte2) return(-1); - if (fontp->per_char == NULL) return(fontp->max_bounds.width); - width = fontp->per_char[chr - fontp->min_char_or_byte2].width; - if (width <= 0) - return fontp->per_char[fontp->default_char - fontp->min_char_or_byte2].width; - return(width); -} - -static int bitmap(int chr,int w,int h,char *buffer) -{ - XImage *img; - int x, y, bpl; - unsigned char *data; - - if (fontp == NULL || fontbmp == None) return(FALSE); - if ((w <= 0) || (w != charwdt(chr))) return(FALSE); - if ((h <= 0) || (h != (fontp->ascent + fontp->descent))) return(FALSE); - if (fontdsp == NULL) return(FALSE); - img = XGetImage (fontdsp, - fontbmp, - (chr - fontp->min_char_or_byte2) * fontp->max_bounds.width, - 0, - w, - h, - AllPlanes, - ZPixmap); - if (img == NULL) return(FALSE); - data = (unsigned char *)(img->data); - bpl = (w + 7) >> 3; - for (y = 0; y < h; y++) { - for (x = 0; x < bpl; x++) buffer[x] = swap_byte[data[x]]; - buffer += bpl; - data += img->bytes_per_line; - } - XDestroyImage (img); - return(TRUE); -} - -GrFontDriver _GrFontDriverXWIN = { - "XWIN", /* driver name (doc only) */ - "", /* font file extension */ - FALSE, /* scalable */ - openfile, /* file open and check routine */ - header, /* font header reader routine */ - charwdt, /* character width reader routine */ - bitmap, /* character bitmap reader routine */ - cleanup /* cleanup routine */ -}; - diff --git a/thirdparty/grx249/src/fonts/pc6x8.c b/thirdparty/grx249/src/fonts/pc6x8.c deleted file mode 100644 index 5b1d260..0000000 --- a/thirdparty/grx249/src/fonts/pc6x8.c +++ /dev/null @@ -1,812 +0,0 @@ -/** - ** pc6x8.c ---- GRX 2.0 font converted to C by 'GrDumpFont()' - ** - **/ - -#define GrFont_PC6x8 FONTNAME_TEMPORARY_REDIRECTION -#include "grx20.h" -#undef GrFont_PC6x8 - -static unsigned char far GrFont_PC6x8_bits[] = { - /* character 0 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - /* character 1 */ - 0x70,0xf8,0xa8,0xf8,0xd8,0x88,0x70,0x00, - /* character 2 */ - 0x70,0xf8,0xa8,0xf8,0x88,0xd8,0x70,0x00, - /* character 3 */ - 0x00,0x50,0xf8,0xf8,0xf8,0x70,0x20,0x00, - /* character 4 */ - 0x00,0x20,0x70,0xf8,0xf8,0x70,0x20,0x00, - /* character 5 */ - 0x70,0x50,0xf8,0xa8,0xf8,0x20,0x70,0x00, - /* character 6 */ - 0x20,0x70,0xf8,0xf8,0xf8,0x20,0x70,0x00, - /* character 7 */ - 0x00,0x00,0x20,0x70,0x70,0x20,0x00,0x00, - /* character 8 */ - 0xf8,0xf8,0xd8,0x88,0x88,0xd8,0xf8,0xf8, - /* character 9 */ - 0x00,0x00,0x20,0x50,0x50,0x20,0x00,0x00, - /* character 10 */ - 0xf8,0xf8,0xd8,0xa8,0xa8,0xd8,0xf8,0xf8, - /* character 11 */ - 0x00,0x38,0x18,0x68,0xa0,0xa0,0x40,0x00, - /* character 12 */ - 0x70,0x88,0x88,0x70,0x20,0xf8,0x20,0x00, - /* character 13 */ - 0x78,0x48,0x78,0x40,0x40,0x40,0xc0,0x00, - /* character 14 */ - 0x78,0x48,0x78,0x48,0x48,0x58,0xc0,0x00, - /* character 15 */ - 0x20,0xa8,0x70,0xd8,0xd8,0x70,0xa8,0x20, - /* character 16 */ - 0x80,0xc0,0xf0,0xf8,0xf0,0xc0,0x80,0x00, - /* character 17 */ - 0x08,0x18,0x78,0xf8,0x78,0x18,0x08,0x00, - /* character 18 */ - 0x20,0x70,0xa8,0x20,0xa8,0x70,0x20,0x00, - /* character 19 */ - 0xd8,0xd8,0xd8,0xd8,0xd8,0x00,0xd8,0x00, - /* character 20 */ - 0x78,0xa8,0xa8,0x68,0x28,0x28,0x28,0x00, - /* character 21 */ - 0x30,0x48,0x50,0x28,0x10,0x48,0x48,0x30, - /* character 22 */ - 0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0x00, - /* character 23 */ - 0x20,0x70,0xa8,0x20,0xa8,0x70,0x20,0xf8, - /* character 24 */ - 0x00,0x20,0x70,0xa8,0x20,0x20,0x20,0x00, - /* character 25 */ - 0x00,0x20,0x20,0x20,0xa8,0x70,0x20,0x00, - /* character 26 */ - 0x00,0x20,0x10,0xf8,0x10,0x20,0x00,0x00, - /* character 27 */ - 0x00,0x20,0x40,0xf8,0x40,0x20,0x00,0x00, - /* character 28 */ - 0x00,0x80,0x80,0x80,0xf8,0x00,0x00,0x00, - /* character 29 */ - 0x00,0x50,0xf8,0xf8,0x50,0x00,0x00,0x00, - /* character 30 */ - 0x00,0x20,0x20,0x70,0xf8,0xf8,0x00,0x00, - /* character 31 */ - 0x00,0xf8,0xf8,0x70,0x20,0x20,0x00,0x00, - /* character 32 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - /* character 33 */ - 0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00, - /* character 34 */ - 0x50,0x50,0x50,0x00,0x00,0x00,0x00,0x00, - /* character 35 */ - 0x50,0x50,0xf8,0x50,0xf8,0x50,0x50,0x00, - /* character 36 */ - 0x20,0x78,0xa0,0x70,0x28,0xf0,0x20,0x00, - /* character 37 */ - 0xc0,0xc8,0x10,0x20,0x40,0x98,0x18,0x00, - /* character 38 */ - 0x40,0xa0,0xa0,0x40,0xa8,0x90,0x68,0x00, - /* character 39 */ - 0x30,0x30,0x20,0x40,0x00,0x00,0x00,0x00, - /* character 40 */ - 0x10,0x20,0x40,0x40,0x40,0x20,0x10,0x00, - /* character 41 */ - 0x40,0x20,0x10,0x10,0x10,0x20,0x40,0x00, - /* character 42 */ - 0x20,0xa8,0x70,0xf8,0x70,0xa8,0x20,0x00, - /* character 43 */ - 0x00,0x20,0x20,0xf8,0x20,0x20,0x00,0x00, - /* character 44 */ - 0x00,0x00,0x00,0x00,0x30,0x30,0x20,0x40, - /* character 45 */ - 0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00, - /* character 46 */ - 0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00, - /* character 47 */ - 0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00, - /* character 48 */ - 0x70,0x88,0x98,0xa8,0xc8,0x88,0x70,0x00, - /* character 49 */ - 0x20,0x60,0x20,0x20,0x20,0x20,0x70,0x00, - /* character 50 */ - 0x70,0x88,0x08,0x70,0x80,0x80,0xf8,0x00, - /* character 51 */ - 0xf8,0x08,0x10,0x30,0x08,0x88,0x70,0x00, - /* character 52 */ - 0x10,0x30,0x50,0x90,0xf8,0x10,0x10,0x00, - /* character 53 */ - 0xf8,0x80,0xf0,0x08,0x08,0x88,0x70,0x00, - /* character 54 */ - 0x38,0x40,0x80,0xf0,0x88,0x88,0x70,0x00, - /* character 55 */ - 0xf8,0x08,0x08,0x10,0x20,0x40,0x80,0x00, - /* character 56 */ - 0x70,0x88,0x88,0x70,0x88,0x88,0x70,0x00, - /* character 57 */ - 0x70,0x88,0x88,0x78,0x08,0x10,0xe0,0x00, - /* character 58 */ - 0x00,0x00,0x20,0x00,0x20,0x00,0x00,0x00, - /* character 59 */ - 0x00,0x00,0x20,0x00,0x20,0x20,0x40,0x00, - /* character 60 */ - 0x08,0x10,0x20,0x40,0x20,0x10,0x08,0x00, - /* character 61 */ - 0x00,0x00,0xf8,0x00,0xf8,0x00,0x00,0x00, - /* character 62 */ - 0x40,0x20,0x10,0x08,0x10,0x20,0x40,0x00, - /* character 63 */ - 0x70,0x88,0x08,0x30,0x20,0x00,0x20,0x00, - /* character 64 */ - 0x70,0x88,0xa8,0xb8,0xb0,0x80,0x78,0x00, - /* character 65 */ - 0x20,0x50,0x88,0x88,0xf8,0x88,0x88,0x00, - /* character 66 */ - 0xf0,0x88,0x88,0xf0,0x88,0x88,0xf0,0x00, - /* character 67 */ - 0x70,0x88,0x80,0x80,0x80,0x88,0x70,0x00, - /* character 68 */ - 0xf0,0x88,0x88,0x88,0x88,0x88,0xf0,0x00, - /* character 69 */ - 0xf8,0x80,0x80,0xf0,0x80,0x80,0xf8,0x00, - /* character 70 */ - 0xf8,0x80,0x80,0xf0,0x80,0x80,0x80,0x00, - /* character 71 */ - 0x78,0x88,0x80,0x80,0x98,0x88,0x78,0x00, - /* character 72 */ - 0x88,0x88,0x88,0xf8,0x88,0x88,0x88,0x00, - /* character 73 */ - 0x70,0x20,0x20,0x20,0x20,0x20,0x70,0x00, - /* character 74 */ - 0x38,0x10,0x10,0x10,0x10,0x90,0x60,0x00, - /* character 75 */ - 0x88,0x90,0xa0,0xc0,0xa0,0x90,0x88,0x00, - /* character 76 */ - 0x80,0x80,0x80,0x80,0x80,0x80,0xf8,0x00, - /* character 77 */ - 0x88,0xd8,0xa8,0xa8,0xa8,0x88,0x88,0x00, - /* character 78 */ - 0x88,0x88,0xc8,0xa8,0x98,0x88,0x88,0x00, - /* character 79 */ - 0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x00, - /* character 80 */ - 0xf0,0x88,0x88,0xf0,0x80,0x80,0x80,0x00, - /* character 81 */ - 0x70,0x88,0x88,0x88,0xa8,0x90,0x68,0x00, - /* character 82 */ - 0xf0,0x88,0x88,0xf0,0xa0,0x90,0x88,0x00, - /* character 83 */ - 0x70,0x88,0x80,0x70,0x08,0x88,0x70,0x00, - /* character 84 */ - 0xf8,0xa8,0x20,0x20,0x20,0x20,0x20,0x00, - /* character 85 */ - 0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00, - /* character 86 */ - 0x88,0x88,0x88,0x88,0x88,0x50,0x20,0x00, - /* character 87 */ - 0x88,0x88,0x88,0xa8,0xa8,0xa8,0x50,0x00, - /* character 88 */ - 0x88,0x88,0x50,0x20,0x50,0x88,0x88,0x00, - /* character 89 */ - 0x88,0x88,0x50,0x20,0x20,0x20,0x20,0x00, - /* character 90 */ - 0xf8,0x08,0x10,0x70,0x40,0x80,0xf8,0x00, - /* character 91 */ - 0x78,0x40,0x40,0x40,0x40,0x40,0x78,0x00, - /* character 92 */ - 0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00, - /* character 93 */ - 0x78,0x08,0x08,0x08,0x08,0x08,0x78,0x00, - /* character 94 */ - 0x20,0x50,0x88,0x00,0x00,0x00,0x00,0x00, - /* character 95 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00, - /* character 96 */ - 0x60,0x60,0x20,0x10,0x00,0x00,0x00,0x00, - /* character 97 */ - 0x00,0x00,0x60,0x10,0x70,0x90,0x78,0x00, - /* character 98 */ - 0x80,0x80,0xb0,0xc8,0x88,0xc8,0xb0,0x00, - /* character 99 */ - 0x00,0x00,0x70,0x88,0x80,0x88,0x70,0x00, - /* character 100 */ - 0x08,0x08,0x68,0x98,0x88,0x98,0x68,0x00, - /* character 101 */ - 0x00,0x00,0x70,0x88,0xf8,0x80,0x70,0x00, - /* character 102 */ - 0x10,0x28,0x20,0x70,0x20,0x20,0x20,0x00, - /* character 103 */ - 0x00,0x00,0x70,0x98,0x98,0x68,0x08,0x70, - /* character 104 */ - 0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0x00, - /* character 105 */ - 0x20,0x00,0x60,0x20,0x20,0x20,0x70,0x00, - /* character 106 */ - 0x10,0x00,0x10,0x10,0x10,0x90,0x60,0x00, - /* character 107 */ - 0x80,0x80,0x90,0xa0,0xc0,0xa0,0x90,0x00, - /* character 108 */ - 0x60,0x20,0x20,0x20,0x20,0x20,0x70,0x00, - /* character 109 */ - 0x00,0x00,0xd0,0xa8,0xa8,0xa8,0xa8,0x00, - /* character 110 */ - 0x00,0x00,0xb0,0xc8,0x88,0x88,0x88,0x00, - /* character 111 */ - 0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x00, - /* character 112 */ - 0x00,0x00,0xb0,0xc8,0xc8,0xb0,0x80,0x80, - /* character 113 */ - 0x00,0x00,0x68,0x98,0x98,0x68,0x08,0x08, - /* character 114 */ - 0x00,0x00,0xb0,0xc8,0x80,0x80,0x80,0x00, - /* character 115 */ - 0x00,0x00,0x78,0x80,0x70,0x08,0xf0,0x00, - /* character 116 */ - 0x20,0x20,0xf8,0x20,0x20,0x28,0x10,0x00, - /* character 117 */ - 0x00,0x00,0x88,0x88,0x88,0x98,0x68,0x00, - /* character 118 */ - 0x00,0x00,0x88,0x88,0x88,0x50,0x20,0x00, - /* character 119 */ - 0x00,0x00,0x88,0x88,0xa8,0xa8,0x50,0x00, - /* character 120 */ - 0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x00, - /* character 121 */ - 0x00,0x00,0x88,0x88,0x78,0x08,0x88,0x70, - /* character 122 */ - 0x00,0x00,0xf8,0x10,0x20,0x40,0xf8,0x00, - /* character 123 */ - 0x10,0x20,0x20,0x40,0x20,0x20,0x10,0x00, - /* character 124 */ - 0x20,0x20,0x20,0x00,0x20,0x20,0x20,0x00, - /* character 125 */ - 0x40,0x20,0x20,0x10,0x20,0x20,0x40,0x00, - /* character 126 */ - 0x40,0xa8,0x10,0x00,0x00,0x00,0x00,0x00, - /* character 127 */ - 0x20,0x70,0xd8,0x88,0x88,0xf8,0x00,0x00, - /* character 128 */ - 0x70,0x88,0x80,0x80,0x88,0x70,0x10,0x60, - /* character 129 */ - 0x00,0x88,0x00,0x88,0x88,0x98,0x68,0x00, - /* character 130 */ - 0x18,0x00,0x70,0x88,0xf8,0x80,0x78,0x00, - /* character 131 */ - 0xf8,0x00,0x60,0x10,0x70,0x90,0x78,0x00, - /* character 132 */ - 0x88,0x00,0x60,0x10,0x70,0x90,0x78,0x00, - /* character 133 */ - 0xc0,0x00,0x60,0x10,0x70,0x90,0x78,0x00, - /* character 134 */ - 0x30,0x00,0x60,0x10,0x70,0x90,0x78,0x00, - /* character 135 */ - 0x00,0x78,0xc0,0xc0,0x78,0x10,0x30,0x00, - /* character 136 */ - 0xf8,0x00,0x70,0x88,0xf8,0x80,0x78,0x00, - /* character 137 */ - 0x88,0x00,0x70,0x88,0xf8,0x80,0x78,0x00, - /* character 138 */ - 0xc0,0x00,0x70,0x88,0xf8,0x80,0x78,0x00, - /* character 139 */ - 0x28,0x00,0x30,0x10,0x10,0x10,0x38,0x00, - /* character 140 */ - 0x30,0x48,0x30,0x10,0x10,0x10,0x38,0x00, - /* character 141 */ - 0x60,0x00,0x30,0x10,0x10,0x10,0x38,0x00, - /* character 142 */ - 0x50,0x00,0x20,0x50,0x88,0xf8,0x88,0x88, - /* character 143 */ - 0x20,0x00,0x20,0x50,0x88,0xf8,0x88,0x88, - /* character 144 */ - 0x30,0x00,0xf0,0x80,0xe0,0x80,0xf0,0x00, - /* character 145 */ - 0x00,0x00,0x7c,0x10,0x78,0x90,0x7c,0x00, - /* character 146 */ - 0x3c,0x50,0x90,0xf8,0x90,0x90,0x9c,0x00, - /* character 147 */ - 0x70,0x88,0x00,0x70,0x88,0x88,0x70,0x00, - /* character 148 */ - 0x00,0x88,0x00,0x70,0x88,0x88,0x70,0x00, - /* character 149 */ - 0x00,0xc0,0x00,0x70,0x88,0x88,0x70,0x00, - /* character 150 */ - 0x70,0x88,0x00,0x88,0x88,0x98,0x68,0x00, - /* character 151 */ - 0x00,0xc0,0x00,0x88,0x88,0x98,0x68,0x00, - /* character 152 */ - 0x48,0x00,0x48,0x48,0x48,0x38,0x08,0x70, - /* character 153 */ - 0x88,0x00,0x70,0x88,0x88,0x88,0x70,0x00, - /* character 154 */ - 0x88,0x00,0x88,0x88,0x88,0x88,0x70,0x00, - /* character 155 */ - 0x20,0x20,0xf8,0xa0,0xa0,0xf8,0x20,0x20, - /* character 156 */ - 0x30,0x58,0x48,0xe0,0x40,0x48,0xf8,0x00, - /* character 157 */ - 0xd8,0xd8,0x70,0xf8,0x20,0xf8,0x20,0x20, - /* character 158 */ - 0xe0,0x90,0x90,0xe0,0x90,0xb8,0x90,0x90, - /* character 159 */ - 0x18,0x28,0x20,0x70,0x20,0x20,0xa0,0xc0, - /* character 160 */ - 0x18,0x00,0x60,0x10,0x70,0x90,0x78,0x00, - /* character 161 */ - 0x18,0x00,0x30,0x10,0x10,0x10,0x38,0x00, - /* character 162 */ - 0x00,0x18,0x00,0x70,0x88,0x88,0x70,0x00, - /* character 163 */ - 0x00,0x18,0x00,0x88,0x88,0x98,0x68,0x00, - /* character 164 */ - 0x00,0x78,0x00,0x70,0x48,0x48,0x48,0x00, - /* character 165 */ - 0xf8,0x00,0xc8,0xe8,0xb8,0x98,0x88,0x00, - /* character 166 */ - 0x70,0x90,0x90,0x78,0x00,0xf8,0x00,0x00, - /* character 167 */ - 0x70,0x88,0x88,0x70,0x00,0xf8,0x00,0x00, - /* character 168 */ - 0x20,0x00,0x20,0x60,0x80,0x88,0x70,0x00, - /* character 169 */ - 0x00,0x00,0x00,0xf8,0x80,0x80,0x00,0x00, - /* character 170 */ - 0x00,0x00,0x00,0xf8,0x08,0x08,0x00,0x00, - /* character 171 */ - 0x80,0x88,0x90,0xb8,0x48,0x98,0x20,0x38, - /* character 172 */ - 0x80,0x88,0x90,0xa8,0x58,0xb8,0x08,0x08, - /* character 173 */ - 0x20,0x20,0x00,0x20,0x20,0x20,0x20,0x00, - /* character 174 */ - 0x00,0x28,0x50,0xa0,0x50,0x28,0x00,0x00, - /* character 175 */ - 0x00,0xa0,0x50,0x28,0x50,0xa0,0x00,0x00, - /* character 176 */ - 0x20,0x88,0x20,0x88,0x20,0x88,0x20,0x88, - /* character 177 */ - 0x54,0xa8,0x54,0xa8,0x54,0xa8,0x54,0xa8, - /* character 178 */ - 0xa8,0x54,0xa8,0x54,0xa8,0x54,0xa8,0x54, - /* character 179 */ - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - /* character 180 */ - 0x10,0x10,0x10,0x10,0xf0,0x10,0x10,0x10, - /* character 181 */ - 0x10,0x10,0xf0,0x10,0xf0,0x10,0x10,0x10, - /* character 182 */ - 0x28,0x28,0x28,0x28,0xe8,0x28,0x28,0x28, - /* character 183 */ - 0x00,0x00,0x00,0x00,0xf8,0x28,0x28,0x28, - /* character 184 */ - 0x00,0x00,0xf0,0x10,0xf0,0x10,0x10,0x10, - /* character 185 */ - 0x28,0x28,0xe8,0x08,0xe8,0x28,0x28,0x28, - /* character 186 */ - 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, - /* character 187 */ - 0x00,0x00,0xf8,0x08,0xe8,0x28,0x28,0x28, - /* character 188 */ - 0x28,0x28,0xe8,0x08,0xf8,0x00,0x00,0x00, - /* character 189 */ - 0x28,0x28,0x28,0x28,0xf8,0x00,0x00,0x00, - /* character 190 */ - 0x10,0x10,0xf0,0x10,0xf0,0x00,0x00,0x00, - /* character 191 */ - 0x00,0x00,0x00,0x00,0xf0,0x10,0x10,0x10, - /* character 192 */ - 0x10,0x10,0x10,0x10,0x1c,0x00,0x00,0x00, - /* character 193 */ - 0x10,0x10,0x10,0x10,0xfc,0x00,0x00,0x00, - /* character 194 */ - 0x00,0x00,0x00,0x00,0xfc,0x10,0x10,0x10, - /* character 195 */ - 0x10,0x10,0x10,0x10,0x1c,0x10,0x10,0x10, - /* character 196 */ - 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, - /* character 197 */ - 0x10,0x10,0x10,0x10,0xfc,0x10,0x10,0x10, - /* character 198 */ - 0x10,0x10,0x1c,0x10,0x1c,0x10,0x10,0x10, - /* character 199 */ - 0x28,0x28,0x28,0x28,0x2c,0x28,0x28,0x28, - /* character 200 */ - 0x28,0x28,0x2c,0x20,0x3c,0x00,0x00,0x00, - /* character 201 */ - 0x00,0x00,0x3c,0x20,0x2c,0x28,0x28,0x28, - /* character 202 */ - 0x28,0x28,0xec,0x00,0xfc,0x00,0x00,0x00, - /* character 203 */ - 0x00,0x00,0xfc,0x00,0xec,0x28,0x28,0x28, - /* character 204 */ - 0x28,0x28,0x2c,0x20,0x2c,0x28,0x28,0x28, - /* character 205 */ - 0x00,0x00,0xfc,0x00,0xfc,0x00,0x00,0x00, - /* character 206 */ - 0x28,0x28,0xec,0x00,0xec,0x28,0x28,0x28, - /* character 207 */ - 0x10,0x10,0xfc,0x00,0xfc,0x00,0x00,0x00, - /* character 208 */ - 0x28,0x28,0x28,0x28,0xfc,0x00,0x00,0x00, - /* character 209 */ - 0x00,0x00,0xfc,0x00,0xfc,0x10,0x10,0x10, - /* character 210 */ - 0x00,0x00,0x00,0x00,0xfc,0x28,0x28,0x28, - /* character 211 */ - 0x28,0x28,0x28,0x28,0x3c,0x00,0x00,0x00, - /* character 212 */ - 0x10,0x10,0x1c,0x10,0x1c,0x00,0x00,0x00, - /* character 213 */ - 0x00,0x00,0x1c,0x10,0x1c,0x10,0x10,0x10, - /* character 214 */ - 0x00,0x00,0x00,0x00,0x3c,0x28,0x28,0x28, - /* character 215 */ - 0x28,0x28,0x28,0x28,0xfc,0x28,0x28,0x28, - /* character 216 */ - 0x10,0x10,0xfc,0x10,0xfc,0x10,0x10,0x10, - /* character 217 */ - 0x10,0x10,0x10,0x10,0xf0,0x00,0x00,0x00, - /* character 218 */ - 0x00,0x00,0x00,0x00,0x1c,0x10,0x10,0x10, - /* character 219 */ - 0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc, - /* character 220 */ - 0x00,0x00,0x00,0x00,0xfc,0xfc,0xfc,0xfc, - /* character 221 */ - 0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0, - /* character 222 */ - 0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, - /* character 223 */ - 0xfc,0xfc,0xfc,0xfc,0x00,0x00,0x00,0x00, - /* character 224 */ - 0x00,0x00,0x68,0x90,0x90,0x90,0x68,0x00, - /* character 225 */ - 0x00,0x70,0x98,0xf0,0x98,0xf0,0x80,0x00, - /* character 226 */ - 0x00,0xf8,0x98,0x80,0x80,0x80,0x80,0x00, - /* character 227 */ - 0x00,0xf8,0x50,0x50,0x50,0x50,0x50,0x00, - /* character 228 */ - 0xf8,0x88,0x40,0x20,0x40,0x88,0xf8,0x00, - /* character 229 */ - 0x00,0x00,0x78,0x90,0x90,0x90,0x60,0x00, - /* character 230 */ - 0x00,0x50,0x50,0x50,0x50,0x68,0xc0,0x00, - /* character 231 */ - 0x00,0xf8,0xa0,0x20,0x20,0x20,0x20,0x00, - /* character 232 */ - 0xf8,0x20,0x70,0x88,0x88,0x70,0x20,0xf8, - /* character 233 */ - 0x20,0x50,0x88,0xf8,0x88,0x50,0x20,0x00, - /* character 234 */ - 0x20,0x50,0x88,0x88,0x50,0x50,0xd8,0x00, - /* character 235 */ - 0x30,0x40,0x30,0x70,0x88,0x88,0x70,0x00, - /* character 236 */ - 0x00,0x00,0x00,0x70,0xa8,0xa8,0x70,0x00, - /* character 237 */ - 0x08,0x70,0x98,0xa8,0xa8,0xc8,0x70,0x80, - /* character 238 */ - 0x70,0x80,0x80,0xf0,0x80,0x80,0x70,0x00, - /* character 239 */ - 0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x00, - /* character 240 */ - 0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0x00, - /* character 241 */ - 0x20,0x20,0xf8,0x20,0x20,0x00,0xf8,0x00, - /* character 242 */ - 0x40,0x20,0x10,0x20,0x40,0x00,0xf8,0x00, - /* character 243 */ - 0x10,0x20,0x40,0x20,0x10,0x00,0xf8,0x00, - /* character 244 */ - 0x38,0x28,0x20,0x20,0x20,0x20,0x20,0x20, - /* character 245 */ - 0x20,0x20,0x20,0x20,0x20,0xa0,0xa0,0xe0, - /* character 246 */ - 0x30,0x30,0x00,0xfc,0x00,0x30,0x30,0x00, - /* character 247 */ - 0x00,0xe8,0xb8,0x00,0xe8,0xb8,0x00,0x00, - /* character 248 */ - 0x70,0xd8,0xd8,0x70,0x00,0x00,0x00,0x00, - /* character 249 */ - 0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00, - /* character 250 */ - 0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00, - /* character 251 */ - 0x38,0x20,0x20,0x20,0xa0,0xa0,0x60,0x20, - /* character 252 */ - 0x70,0x48,0x48,0x48,0x48,0x00,0x00,0x00, - /* character 253 */ - 0x70,0x18,0x30,0x60,0x78,0x00,0x00,0x00, - /* character 254 */ - 0x00,0x00,0x78,0x78,0x78,0x78,0x00,0x00, - /* character 255 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -struct { - GrFont theFont; - GrFontChrInfo rest[255]; -} GrFont_PC6x8 = { - { - { /* font header */ - "pc6x8", /* font name */ - "pc", /* font family name */ - 0, /* characters have varying width */ - 0, /* derived from a scalable font */ - 1, /* font permanently linked into program */ - GR_FONTCVT_NONE, /* 'tweaked' font (resized, etc..) */ - 6, /* width (average when proportional) */ - 8, /* font height */ - 6, /* baseline pixel pos (from top) */ - 7, /* underline pixel pos (from top) */ - 1, /* underline width */ - 0, /* lowest character code in font */ - 256 /* number of characters in font */ - }, - (char *)GrFont_PC6x8_bits, /* character bitmap array */ - 0, /* auxiliary bitmap */ - 6, /* width of narrowest character */ - 6, /* width of widest character */ - 0, /* allocated size of auxiliary bitmap */ - 0, /* free space in auxiliary bitmap */ - { 0 }, /* converted character bitmap offsets */ - {{ 6, 0 }} /* first character info */ - }, - { - { 6, 8 }, /* info for character 1 */ - { 6, 16 }, /* info for character 2 */ - { 6, 24 }, /* info for character 3 */ - { 6, 32 }, /* info for character 4 */ - { 6, 40 }, /* info for character 5 */ - { 6, 48 }, /* info for character 6 */ - { 6, 56 }, /* info for character 7 */ - { 6, 64 }, /* info for character 8 */ - { 6, 72 }, /* info for character 9 */ - { 6, 80 }, /* info for character 10 */ - { 6, 88 }, /* info for character 11 */ - { 6, 96 }, /* info for character 12 */ - { 6, 104 }, /* info for character 13 */ - { 6, 112 }, /* info for character 14 */ - { 6, 120 }, /* info for character 15 */ - { 6, 128 }, /* info for character 16 */ - { 6, 136 }, /* info for character 17 */ - { 6, 144 }, /* info for character 18 */ - { 6, 152 }, /* info for character 19 */ - { 6, 160 }, /* info for character 20 */ - { 6, 168 }, /* info for character 21 */ - { 6, 176 }, /* info for character 22 */ - { 6, 184 }, /* info for character 23 */ - { 6, 192 }, /* info for character 24 */ - { 6, 200 }, /* info for character 25 */ - { 6, 208 }, /* info for character 26 */ - { 6, 216 }, /* info for character 27 */ - { 6, 224 }, /* info for character 28 */ - { 6, 232 }, /* info for character 29 */ - { 6, 240 }, /* info for character 30 */ - { 6, 248 }, /* info for character 31 */ - { 6, 256 }, /* info for character 32 */ - { 6, 264 }, /* info for character 33 */ - { 6, 272 }, /* info for character 34 */ - { 6, 280 }, /* info for character 35 */ - { 6, 288 }, /* info for character 36 */ - { 6, 296 }, /* info for character 37 */ - { 6, 304 }, /* info for character 38 */ - { 6, 312 }, /* info for character 39 */ - { 6, 320 }, /* info for character 40 */ - { 6, 328 }, /* info for character 41 */ - { 6, 336 }, /* info for character 42 */ - { 6, 344 }, /* info for character 43 */ - { 6, 352 }, /* info for character 44 */ - { 6, 360 }, /* info for character 45 */ - { 6, 368 }, /* info for character 46 */ - { 6, 376 }, /* info for character 47 */ - { 6, 384 }, /* info for character 48 */ - { 6, 392 }, /* info for character 49 */ - { 6, 400 }, /* info for character 50 */ - { 6, 408 }, /* info for character 51 */ - { 6, 416 }, /* info for character 52 */ - { 6, 424 }, /* info for character 53 */ - { 6, 432 }, /* info for character 54 */ - { 6, 440 }, /* info for character 55 */ - { 6, 448 }, /* info for character 56 */ - { 6, 456 }, /* info for character 57 */ - { 6, 464 }, /* info for character 58 */ - { 6, 472 }, /* info for character 59 */ - { 6, 480 }, /* info for character 60 */ - { 6, 488 }, /* info for character 61 */ - { 6, 496 }, /* info for character 62 */ - { 6, 504 }, /* info for character 63 */ - { 6, 512 }, /* info for character 64 */ - { 6, 520 }, /* info for character 65 */ - { 6, 528 }, /* info for character 66 */ - { 6, 536 }, /* info for character 67 */ - { 6, 544 }, /* info for character 68 */ - { 6, 552 }, /* info for character 69 */ - { 6, 560 }, /* info for character 70 */ - { 6, 568 }, /* info for character 71 */ - { 6, 576 }, /* info for character 72 */ - { 6, 584 }, /* info for character 73 */ - { 6, 592 }, /* info for character 74 */ - { 6, 600 }, /* info for character 75 */ - { 6, 608 }, /* info for character 76 */ - { 6, 616 }, /* info for character 77 */ - { 6, 624 }, /* info for character 78 */ - { 6, 632 }, /* info for character 79 */ - { 6, 640 }, /* info for character 80 */ - { 6, 648 }, /* info for character 81 */ - { 6, 656 }, /* info for character 82 */ - { 6, 664 }, /* info for character 83 */ - { 6, 672 }, /* info for character 84 */ - { 6, 680 }, /* info for character 85 */ - { 6, 688 }, /* info for character 86 */ - { 6, 696 }, /* info for character 87 */ - { 6, 704 }, /* info for character 88 */ - { 6, 712 }, /* info for character 89 */ - { 6, 720 }, /* info for character 90 */ - { 6, 728 }, /* info for character 91 */ - { 6, 736 }, /* info for character 92 */ - { 6, 744 }, /* info for character 93 */ - { 6, 752 }, /* info for character 94 */ - { 6, 760 }, /* info for character 95 */ - { 6, 768 }, /* info for character 96 */ - { 6, 776 }, /* info for character 97 */ - { 6, 784 }, /* info for character 98 */ - { 6, 792 }, /* info for character 99 */ - { 6, 800 }, /* info for character 100 */ - { 6, 808 }, /* info for character 101 */ - { 6, 816 }, /* info for character 102 */ - { 6, 824 }, /* info for character 103 */ - { 6, 832 }, /* info for character 104 */ - { 6, 840 }, /* info for character 105 */ - { 6, 848 }, /* info for character 106 */ - { 6, 856 }, /* info for character 107 */ - { 6, 864 }, /* info for character 108 */ - { 6, 872 }, /* info for character 109 */ - { 6, 880 }, /* info for character 110 */ - { 6, 888 }, /* info for character 111 */ - { 6, 896 }, /* info for character 112 */ - { 6, 904 }, /* info for character 113 */ - { 6, 912 }, /* info for character 114 */ - { 6, 920 }, /* info for character 115 */ - { 6, 928 }, /* info for character 116 */ - { 6, 936 }, /* info for character 117 */ - { 6, 944 }, /* info for character 118 */ - { 6, 952 }, /* info for character 119 */ - { 6, 960 }, /* info for character 120 */ - { 6, 968 }, /* info for character 121 */ - { 6, 976 }, /* info for character 122 */ - { 6, 984 }, /* info for character 123 */ - { 6, 992 }, /* info for character 124 */ - { 6, 1000 }, /* info for character 125 */ - { 6, 1008 }, /* info for character 126 */ - { 6, 1016 }, /* info for character 127 */ - { 6, 1024 }, /* info for character 128 */ - { 6, 1032 }, /* info for character 129 */ - { 6, 1040 }, /* info for character 130 */ - { 6, 1048 }, /* info for character 131 */ - { 6, 1056 }, /* info for character 132 */ - { 6, 1064 }, /* info for character 133 */ - { 6, 1072 }, /* info for character 134 */ - { 6, 1080 }, /* info for character 135 */ - { 6, 1088 }, /* info for character 136 */ - { 6, 1096 }, /* info for character 137 */ - { 6, 1104 }, /* info for character 138 */ - { 6, 1112 }, /* info for character 139 */ - { 6, 1120 }, /* info for character 140 */ - { 6, 1128 }, /* info for character 141 */ - { 6, 1136 }, /* info for character 142 */ - { 6, 1144 }, /* info for character 143 */ - { 6, 1152 }, /* info for character 144 */ - { 6, 1160 }, /* info for character 145 */ - { 6, 1168 }, /* info for character 146 */ - { 6, 1176 }, /* info for character 147 */ - { 6, 1184 }, /* info for character 148 */ - { 6, 1192 }, /* info for character 149 */ - { 6, 1200 }, /* info for character 150 */ - { 6, 1208 }, /* info for character 151 */ - { 6, 1216 }, /* info for character 152 */ - { 6, 1224 }, /* info for character 153 */ - { 6, 1232 }, /* info for character 154 */ - { 6, 1240 }, /* info for character 155 */ - { 6, 1248 }, /* info for character 156 */ - { 6, 1256 }, /* info for character 157 */ - { 6, 1264 }, /* info for character 158 */ - { 6, 1272 }, /* info for character 159 */ - { 6, 1280 }, /* info for character 160 */ - { 6, 1288 }, /* info for character 161 */ - { 6, 1296 }, /* info for character 162 */ - { 6, 1304 }, /* info for character 163 */ - { 6, 1312 }, /* info for character 164 */ - { 6, 1320 }, /* info for character 165 */ - { 6, 1328 }, /* info for character 166 */ - { 6, 1336 }, /* info for character 167 */ - { 6, 1344 }, /* info for character 168 */ - { 6, 1352 }, /* info for character 169 */ - { 6, 1360 }, /* info for character 170 */ - { 6, 1368 }, /* info for character 171 */ - { 6, 1376 }, /* info for character 172 */ - { 6, 1384 }, /* info for character 173 */ - { 6, 1392 }, /* info for character 174 */ - { 6, 1400 }, /* info for character 175 */ - { 6, 1408 }, /* info for character 176 */ - { 6, 1416 }, /* info for character 177 */ - { 6, 1424 }, /* info for character 178 */ - { 6, 1432 }, /* info for character 179 */ - { 6, 1440 }, /* info for character 180 */ - { 6, 1448 }, /* info for character 181 */ - { 6, 1456 }, /* info for character 182 */ - { 6, 1464 }, /* info for character 183 */ - { 6, 1472 }, /* info for character 184 */ - { 6, 1480 }, /* info for character 185 */ - { 6, 1488 }, /* info for character 186 */ - { 6, 1496 }, /* info for character 187 */ - { 6, 1504 }, /* info for character 188 */ - { 6, 1512 }, /* info for character 189 */ - { 6, 1520 }, /* info for character 190 */ - { 6, 1528 }, /* info for character 191 */ - { 6, 1536 }, /* info for character 192 */ - { 6, 1544 }, /* info for character 193 */ - { 6, 1552 }, /* info for character 194 */ - { 6, 1560 }, /* info for character 195 */ - { 6, 1568 }, /* info for character 196 */ - { 6, 1576 }, /* info for character 197 */ - { 6, 1584 }, /* info for character 198 */ - { 6, 1592 }, /* info for character 199 */ - { 6, 1600 }, /* info for character 200 */ - { 6, 1608 }, /* info for character 201 */ - { 6, 1616 }, /* info for character 202 */ - { 6, 1624 }, /* info for character 203 */ - { 6, 1632 }, /* info for character 204 */ - { 6, 1640 }, /* info for character 205 */ - { 6, 1648 }, /* info for character 206 */ - { 6, 1656 }, /* info for character 207 */ - { 6, 1664 }, /* info for character 208 */ - { 6, 1672 }, /* info for character 209 */ - { 6, 1680 }, /* info for character 210 */ - { 6, 1688 }, /* info for character 211 */ - { 6, 1696 }, /* info for character 212 */ - { 6, 1704 }, /* info for character 213 */ - { 6, 1712 }, /* info for character 214 */ - { 6, 1720 }, /* info for character 215 */ - { 6, 1728 }, /* info for character 216 */ - { 6, 1736 }, /* info for character 217 */ - { 6, 1744 }, /* info for character 218 */ - { 6, 1752 }, /* info for character 219 */ - { 6, 1760 }, /* info for character 220 */ - { 6, 1768 }, /* info for character 221 */ - { 6, 1776 }, /* info for character 222 */ - { 6, 1784 }, /* info for character 223 */ - { 6, 1792 }, /* info for character 224 */ - { 6, 1800 }, /* info for character 225 */ - { 6, 1808 }, /* info for character 226 */ - { 6, 1816 }, /* info for character 227 */ - { 6, 1824 }, /* info for character 228 */ - { 6, 1832 }, /* info for character 229 */ - { 6, 1840 }, /* info for character 230 */ - { 6, 1848 }, /* info for character 231 */ - { 6, 1856 }, /* info for character 232 */ - { 6, 1864 }, /* info for character 233 */ - { 6, 1872 }, /* info for character 234 */ - { 6, 1880 }, /* info for character 235 */ - { 6, 1888 }, /* info for character 236 */ - { 6, 1896 }, /* info for character 237 */ - { 6, 1904 }, /* info for character 238 */ - { 6, 1912 }, /* info for character 239 */ - { 6, 1920 }, /* info for character 240 */ - { 6, 1928 }, /* info for character 241 */ - { 6, 1936 }, /* info for character 242 */ - { 6, 1944 }, /* info for character 243 */ - { 6, 1952 }, /* info for character 244 */ - { 6, 1960 }, /* info for character 245 */ - { 6, 1968 }, /* info for character 246 */ - { 6, 1976 }, /* info for character 247 */ - { 6, 1984 }, /* info for character 248 */ - { 6, 1992 }, /* info for character 249 */ - { 6, 2000 }, /* info for character 250 */ - { 6, 2008 }, /* info for character 251 */ - { 6, 2016 }, /* info for character 252 */ - { 6, 2024 }, /* info for character 253 */ - { 6, 2032 }, /* info for character 254 */ - { 6, 2040 } /* info for character 255 */ - } -}; - diff --git a/thirdparty/grx249/src/fonts/pc8x14.c b/thirdparty/grx249/src/fonts/pc8x14.c deleted file mode 100644 index 91fa737..0000000 --- a/thirdparty/grx249/src/fonts/pc8x14.c +++ /dev/null @@ -1,1067 +0,0 @@ -/** - ** pc8x14.c ---- GRX 2.0 font converted to C by 'GrDumpFont()' - **/ - -#define GrFont_PC8x14 FONTNAME_TEMPORARY_REDIRECTION -#include "grx20.h" -#undef GrFont_PC8x14 - -static unsigned char far GrFont_PC8x14_bits[] = { - /* character 0 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 1 */ - 0x00,0x00,0x7e,0x81,0xa5,0x81,0x81,0xbd,0x99,0x81,0x7e,0x00, - 0x00,0x00, - /* character 2 */ - 0x00,0x00,0x7e,0xff,0xdb,0xff,0xff,0xc3,0xe7,0xff,0x7e,0x00, - 0x00,0x00, - /* character 3 */ - 0x00,0x00,0x00,0x36,0x7f,0x7f,0x7f,0x7f,0x3e,0x1c,0x08,0x00, - 0x00,0x00, - /* character 4 */ - 0x00,0x00,0x00,0x08,0x1c,0x3e,0x7f,0x3e,0x1c,0x08,0x00,0x00, - 0x00,0x00, - /* character 5 */ - 0x00,0x00,0x18,0x3c,0x3c,0xe7,0xe7,0xe7,0x18,0x18,0x3c,0x00, - 0x00,0x00, - /* character 6 */ - 0x00,0x00,0x18,0x3c,0x7e,0xff,0xff,0x7e,0x18,0x18,0x3c,0x00, - 0x00,0x00, - /* character 7 */ - 0x00,0x00,0x00,0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00,0x00, - 0x00,0x00, - /* character 8 */ - 0xff,0xff,0xff,0xff,0xff,0xe7,0xc3,0xc3,0xe7,0xff,0xff,0xff, - 0xff,0xff, - /* character 9 */ - 0x00,0x00,0x00,0x00,0x3c,0x66,0x42,0x42,0x66,0x3c,0x00,0x00, - 0x00,0x00, - /* character 10 */ - 0xff,0xff,0xff,0xff,0xc3,0x99,0xbd,0xbd,0x99,0xc3,0xff,0xff, - 0xff,0xff, - /* character 11 */ - 0x00,0x00,0x0f,0x07,0x0d,0x19,0x3c,0x66,0x66,0x66,0x3c,0x00, - 0x00,0x00, - /* character 12 */ - 0x00,0x00,0x3c,0x66,0x66,0x66,0x3c,0x18,0x7e,0x18,0x18,0x00, - 0x00,0x00, - /* character 13 */ - 0x00,0x00,0x3f,0x33,0x3f,0x30,0x30,0x30,0x70,0xf0,0xe0,0x00, - 0x00,0x00, - /* character 14 */ - 0x00,0x00,0x7f,0x63,0x7f,0x63,0x63,0x63,0x67,0xe7,0xe6,0xc0, - 0x00,0x00, - /* character 15 */ - 0x00,0x00,0x18,0x18,0xdb,0x3c,0xe7,0x3c,0xdb,0x18,0x18,0x00, - 0x00,0x00, - /* character 16 */ - 0x00,0x00,0x40,0x60,0x70,0x7c,0x7f,0x7c,0x70,0x60,0x40,0x00, - 0x00,0x00, - /* character 17 */ - 0x00,0x00,0x01,0x03,0x07,0x1f,0x7f,0x1f,0x07,0x03,0x01,0x00, - 0x00,0x00, - /* character 18 */ - 0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00, - 0x00,0x00, - /* character 19 */ - 0x00,0x00,0x33,0x33,0x33,0x33,0x33,0x33,0x00,0x33,0x33,0x00, - 0x00,0x00, - /* character 20 */ - 0x00,0x00,0x7f,0xdb,0xdb,0xdb,0x7b,0x1b,0x1b,0x1b,0x1b,0x00, - 0x00,0x00, - /* character 21 */ - 0x00,0x3e,0x63,0x30,0x1c,0x36,0x63,0x63,0x36,0x1c,0x06,0x63, - 0x3e,0x00, - /* character 22 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0x7f,0x00, - 0x00,0x00, - /* character 23 */ - 0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x7e, - 0x00,0x00, - /* character 24 */ - 0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x00, - 0x00,0x00, - /* character 25 */ - 0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00, - 0x00,0x00, - /* character 26 */ - 0x00,0x00,0x00,0x00,0x0c,0x06,0x7f,0x06,0x0c,0x00,0x00,0x00, - 0x00,0x00, - /* character 27 */ - 0x00,0x00,0x00,0x00,0x18,0x30,0x7f,0x30,0x18,0x00,0x00,0x00, - 0x00,0x00, - /* character 28 */ - 0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x7f,0x00,0x00,0x00, - 0x00,0x00, - /* character 29 */ - 0x00,0x00,0x00,0x00,0x24,0x66,0xff,0x66,0x24,0x00,0x00,0x00, - 0x00,0x00, - /* character 30 */ - 0x00,0x00,0x00,0x08,0x1c,0x1c,0x3e,0x3e,0x7f,0x7f,0x00,0x00, - 0x00,0x00, - /* character 31 */ - 0x00,0x00,0x00,0x7f,0x7f,0x3e,0x3e,0x1c,0x1c,0x08,0x00,0x00, - 0x00,0x00, - /* character 32 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 33 */ - 0x00,0x00,0x18,0x3c,0x3c,0x3c,0x18,0x18,0x00,0x18,0x18,0x00, - 0x00,0x00, - /* character 34 */ - 0x00,0x63,0x63,0x63,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 35 */ - 0x00,0x00,0x36,0x36,0x7f,0x36,0x36,0x36,0x7f,0x36,0x36,0x00, - 0x00,0x00, - /* character 36 */ - 0x0c,0x0c,0x3e,0x63,0x61,0x60,0x3e,0x03,0x43,0x63,0x3e,0x0c, - 0x0c,0x00, - /* character 37 */ - 0x00,0x00,0x00,0x00,0x61,0x63,0x06,0x0c,0x18,0x33,0x63,0x00, - 0x00,0x00, - /* character 38 */ - 0x00,0x00,0x1c,0x36,0x36,0x1c,0x3b,0x6e,0x66,0x66,0x3b,0x00, - 0x00,0x00, - /* character 39 */ - 0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 40 */ - 0x00,0x00,0x0c,0x18,0x30,0x30,0x30,0x30,0x30,0x18,0x0c,0x00, - 0x00,0x00, - /* character 41 */ - 0x00,0x00,0x18,0x0c,0x06,0x06,0x06,0x06,0x06,0x0c,0x18,0x00, - 0x00,0x00, - /* character 42 */ - 0x00,0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00, - 0x00,0x00, - /* character 43 */ - 0x00,0x00,0x00,0x18,0x18,0x18,0xff,0x18,0x18,0x18,0x00,0x00, - 0x00,0x00, - /* character 44 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30, - 0x00,0x00, - /* character 45 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 46 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00, - 0x00,0x00, - /* character 47 */ - 0x00,0x00,0x01,0x03,0x06,0x0c,0x18,0x30,0x60,0x40,0x00,0x00, - 0x00,0x00, - /* character 48 */ - 0x00,0x00,0x3e,0x63,0x67,0x6f,0x7b,0x73,0x63,0x63,0x3e,0x00, - 0x00,0x00, - /* character 49 */ - 0x00,0x00,0x0c,0x1c,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3f,0x00, - 0x00,0x00, - /* character 50 */ - 0x00,0x00,0x3e,0x63,0x03,0x06,0x0c,0x18,0x30,0x63,0x7f,0x00, - 0x00,0x00, - /* character 51 */ - 0x00,0x00,0x3e,0x63,0x03,0x03,0x1e,0x03,0x03,0x63,0x3e,0x00, - 0x00,0x00, - /* character 52 */ - 0x00,0x00,0x06,0x0e,0x1e,0x36,0x66,0x7f,0x06,0x06,0x0f,0x00, - 0x00,0x00, - /* character 53 */ - 0x00,0x00,0x7f,0x60,0x60,0x60,0x7e,0x03,0x03,0x63,0x3e,0x00, - 0x00,0x00, - /* character 54 */ - 0x00,0x00,0x1c,0x30,0x60,0x60,0x7e,0x63,0x63,0x63,0x3e,0x00, - 0x00,0x00, - /* character 55 */ - 0x00,0x00,0x7f,0x63,0x03,0x06,0x0c,0x18,0x18,0x18,0x18,0x00, - 0x00,0x00, - /* character 56 */ - 0x00,0x00,0x3e,0x63,0x63,0x63,0x3e,0x63,0x63,0x63,0x3e,0x00, - 0x00,0x00, - /* character 57 */ - 0x00,0x00,0x3e,0x63,0x63,0x63,0x3f,0x03,0x03,0x06,0x3c,0x00, - 0x00,0x00, - /* character 58 */ - 0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00, - 0x00,0x00, - /* character 59 */ - 0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00, - 0x00,0x00, - /* character 60 */ - 0x00,0x00,0x06,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x06,0x00, - 0x00,0x00, - /* character 61 */ - 0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00,0x00, - 0x00,0x00, - /* character 62 */ - 0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00, - 0x00,0x00, - /* character 63 */ - 0x00,0x00,0x3e,0x63,0x63,0x06,0x0c,0x0c,0x00,0x0c,0x0c,0x00, - 0x00,0x00, - /* character 64 */ - 0x00,0x00,0x3e,0x63,0x63,0x6f,0x6f,0x6f,0x6e,0x60,0x3e,0x00, - 0x00,0x00, - /* character 65 */ - 0x00,0x00,0x08,0x1c,0x36,0x63,0x63,0x7f,0x63,0x63,0x63,0x00, - 0x00,0x00, - /* character 66 */ - 0x00,0x00,0x7e,0x33,0x33,0x33,0x3e,0x33,0x33,0x33,0x7e,0x00, - 0x00,0x00, - /* character 67 */ - 0x00,0x00,0x1e,0x33,0x61,0x60,0x60,0x60,0x61,0x33,0x1e,0x00, - 0x00,0x00, - /* character 68 */ - 0x00,0x00,0x7c,0x36,0x33,0x33,0x33,0x33,0x33,0x36,0x7c,0x00, - 0x00,0x00, - /* character 69 */ - 0x00,0x00,0x7f,0x33,0x31,0x34,0x3c,0x34,0x31,0x33,0x7f,0x00, - 0x00,0x00, - /* character 70 */ - 0x00,0x00,0x7f,0x33,0x31,0x34,0x3c,0x34,0x30,0x30,0x78,0x00, - 0x00,0x00, - /* character 71 */ - 0x00,0x00,0x1e,0x33,0x61,0x60,0x60,0x6f,0x63,0x33,0x1d,0x00, - 0x00,0x00, - /* character 72 */ - 0x00,0x00,0x63,0x63,0x63,0x63,0x7f,0x63,0x63,0x63,0x63,0x00, - 0x00,0x00, - /* character 73 */ - 0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00, - 0x00,0x00, - /* character 74 */ - 0x00,0x00,0x0f,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3c,0x00, - 0x00,0x00, - /* character 75 */ - 0x00,0x00,0x73,0x33,0x36,0x36,0x3c,0x36,0x36,0x33,0x73,0x00, - 0x00,0x00, - /* character 76 */ - 0x00,0x00,0x78,0x30,0x30,0x30,0x30,0x30,0x31,0x33,0x7f,0x00, - 0x00,0x00, - /* character 77 */ - 0x00,0x00,0xc3,0xe7,0xff,0xdb,0xc3,0xc3,0xc3,0xc3,0xc3,0x00, - 0x00,0x00, - /* character 78 */ - 0x00,0x00,0x63,0x73,0x7b,0x7f,0x6f,0x67,0x63,0x63,0x63,0x00, - 0x00,0x00, - /* character 79 */ - 0x00,0x00,0x1c,0x36,0x63,0x63,0x63,0x63,0x63,0x36,0x1c,0x00, - 0x00,0x00, - /* character 80 */ - 0x00,0x00,0x7e,0x33,0x33,0x33,0x3e,0x30,0x30,0x30,0x78,0x00, - 0x00,0x00, - /* character 81 */ - 0x00,0x00,0x3e,0x63,0x63,0x63,0x63,0x6b,0x6f,0x3e,0x06,0x07, - 0x00,0x00, - /* character 82 */ - 0x00,0x00,0x7e,0x33,0x33,0x33,0x3e,0x36,0x33,0x33,0x73,0x00, - 0x00,0x00, - /* character 83 */ - 0x00,0x00,0x3e,0x63,0x63,0x30,0x1c,0x06,0x63,0x63,0x3e,0x00, - 0x00,0x00, - /* character 84 */ - 0x00,0x00,0xff,0xdb,0x99,0x18,0x18,0x18,0x18,0x18,0x3c,0x00, - 0x00,0x00, - /* character 85 */ - 0x00,0x00,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x3e,0x00, - 0x00,0x00, - /* character 86 */ - 0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x00, - 0x00,0x00, - /* character 87 */ - 0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xdb,0xdb,0xff,0x66,0x66,0x00, - 0x00,0x00, - /* character 88 */ - 0x00,0x00,0xc3,0xc3,0x66,0x3c,0x18,0x3c,0x66,0xc3,0xc3,0x00, - 0x00,0x00, - /* character 89 */ - 0x00,0x00,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x18,0x18,0x3c,0x00, - 0x00,0x00, - /* character 90 */ - 0x00,0x00,0xff,0xc3,0x86,0x0c,0x3c,0x30,0x61,0xc3,0xff,0x00, - 0x00,0x00, - /* character 91 */ - 0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00, - 0x00,0x00, - /* character 92 */ - 0x00,0x00,0x40,0x60,0x70,0x38,0x1c,0x0e,0x07,0x03,0x01,0x00, - 0x00,0x00, - /* character 93 */ - 0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00, - 0x00,0x00, - /* character 94 */ - 0x08,0x1c,0x36,0x63,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 95 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xff,0x00, - /* character 96 */ - 0x18,0x18,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 97 */ - 0x00,0x00,0x00,0x00,0x00,0x3c,0x06,0x3e,0x66,0x66,0x3b,0x00, - 0x00,0x00, - /* character 98 */ - 0x00,0x00,0x70,0x30,0x30,0x3c,0x36,0x33,0x33,0x33,0x6e,0x00, - 0x00,0x00, - /* character 99 */ - 0x00,0x00,0x00,0x00,0x00,0x3e,0x63,0x60,0x60,0x63,0x3e,0x00, - 0x00,0x00, - /* character 100 */ - 0x00,0x00,0x0e,0x06,0x06,0x1e,0x36,0x66,0x66,0x66,0x3b,0x00, - 0x00,0x00, - /* character 101 */ - 0x00,0x00,0x00,0x00,0x00,0x3e,0x63,0x7f,0x60,0x63,0x3e,0x00, - 0x00,0x00, - /* character 102 */ - 0x00,0x00,0x1c,0x36,0x32,0x30,0x7c,0x30,0x30,0x30,0x78,0x00, - 0x00,0x00, - /* character 103 */ - 0x00,0x00,0x00,0x00,0x00,0x3b,0x66,0x66,0x66,0x3e,0x06,0x66, - 0x3c,0x00, - /* character 104 */ - 0x00,0x00,0x70,0x30,0x30,0x36,0x3b,0x33,0x33,0x33,0x73,0x00, - 0x00,0x00, - /* character 105 */ - 0x00,0x00,0x0c,0x0c,0x00,0x1c,0x0c,0x0c,0x0c,0x0c,0x1e,0x00, - 0x00,0x00, - /* character 106 */ - 0x00,0x00,0x06,0x06,0x00,0x0e,0x06,0x06,0x06,0x06,0x66,0x66, - 0x3c,0x00, - /* character 107 */ - 0x00,0x00,0x70,0x30,0x30,0x33,0x36,0x3c,0x36,0x33,0x73,0x00, - 0x00,0x00, - /* character 108 */ - 0x00,0x00,0x1c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x1e,0x00, - 0x00,0x00, - /* character 109 */ - 0x00,0x00,0x00,0x00,0x00,0xe6,0xff,0xdb,0xdb,0xdb,0xdb,0x00, - 0x00,0x00, - /* character 110 */ - 0x00,0x00,0x00,0x00,0x00,0x6e,0x33,0x33,0x33,0x33,0x33,0x00, - 0x00,0x00, - /* character 111 */ - 0x00,0x00,0x00,0x00,0x00,0x3e,0x63,0x63,0x63,0x63,0x3e,0x00, - 0x00,0x00, - /* character 112 */ - 0x00,0x00,0x00,0x00,0x00,0x6e,0x33,0x33,0x33,0x3e,0x30,0x30, - 0x78,0x00, - /* character 113 */ - 0x00,0x00,0x00,0x00,0x00,0x3b,0x66,0x66,0x66,0x3e,0x06,0x06, - 0x0f,0x00, - /* character 114 */ - 0x00,0x00,0x00,0x00,0x00,0x6e,0x3b,0x33,0x30,0x30,0x78,0x00, - 0x00,0x00, - /* character 115 */ - 0x00,0x00,0x00,0x00,0x00,0x3e,0x63,0x38,0x0e,0x63,0x3e,0x00, - 0x00,0x00, - /* character 116 */ - 0x00,0x00,0x08,0x18,0x18,0x7e,0x18,0x18,0x18,0x1b,0x0e,0x00, - 0x00,0x00, - /* character 117 */ - 0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3b,0x00, - 0x00,0x00, - /* character 118 */ - 0x00,0x00,0x00,0x00,0x00,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x00, - 0x00,0x00, - /* character 119 */ - 0x00,0x00,0x00,0x00,0x00,0xc3,0xc3,0xdb,0xdb,0xff,0x66,0x00, - 0x00,0x00, - /* character 120 */ - 0x00,0x00,0x00,0x00,0x00,0x63,0x36,0x1c,0x1c,0x36,0x63,0x00, - 0x00,0x00, - /* character 121 */ - 0x00,0x00,0x00,0x00,0x00,0x63,0x63,0x63,0x63,0x3f,0x03,0x06, - 0x3c,0x00, - /* character 122 */ - 0x00,0x00,0x00,0x00,0x00,0x7f,0x66,0x0c,0x18,0x33,0x7f,0x00, - 0x00,0x00, - /* character 123 */ - 0x00,0x00,0x0e,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x0e,0x00, - 0x00,0x00, - /* character 124 */ - 0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00, - 0x00,0x00, - /* character 125 */ - 0x00,0x00,0x70,0x18,0x18,0x18,0x0e,0x18,0x18,0x18,0x70,0x00, - 0x00,0x00, - /* character 126 */ - 0x00,0x00,0x3b,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 127 */ - 0x00,0x00,0x00,0x00,0x08,0x1c,0x36,0x63,0x63,0x7f,0x00,0x00, - 0x00,0x00, - /* character 128 */ - 0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc2,0x66,0x3c,0x0c,0x06, - 0x7c,0x00, - /* character 129 */ - 0x00,0x00,0xcc,0xcc,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00, - 0x00,0x00, - /* character 130 */ - 0x00,0x0c,0x18,0x30,0x00,0x7c,0xc6,0xfe,0xc0,0xc6,0x7c,0x00, - 0x00,0x00, - /* character 131 */ - 0x00,0x10,0x38,0x6c,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0x76,0x00, - 0x00,0x00, - /* character 132 */ - 0x00,0x00,0xcc,0xcc,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0x76,0x00, - 0x00,0x00, - /* character 133 */ - 0x00,0x60,0x30,0x18,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0x76,0x00, - 0x00,0x00, - /* character 134 */ - 0x00,0x38,0x6c,0x38,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0x76,0x00, - 0x00,0x00, - /* character 135 */ - 0x00,0x00,0x00,0x00,0x78,0xcc,0xc0,0xcc,0x78,0x18,0x0c,0x78, - 0x00,0x00, - /* character 136 */ - 0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xfe,0xc0,0xc6,0x7c,0x00, - 0x00,0x00, - /* character 137 */ - 0x00,0x00,0xcc,0xcc,0x00,0x7c,0xc6,0xfe,0xc0,0xc6,0x7c,0x00, - 0x00,0x00, - /* character 138 */ - 0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xfe,0xc0,0xc6,0x7c,0x00, - 0x00,0x00, - /* character 139 */ - 0x00,0x00,0xcc,0xcc,0x00,0x70,0x30,0x30,0x30,0x30,0x78,0x00, - 0x00,0x00, - /* character 140 */ - 0x00,0x30,0x78,0xcc,0x00,0x70,0x30,0x30,0x30,0x30,0x78,0x00, - 0x00,0x00, - /* character 141 */ - 0x00,0xc0,0x60,0x30,0x00,0x70,0x30,0x30,0x30,0x30,0x78,0x00, - 0x00,0x00, - /* character 142 */ - 0x00,0xc6,0xc6,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0x00, - 0x00,0x00, - /* character 143 */ - 0x38,0x6c,0x38,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0x00, - 0x00,0x00, - /* character 144 */ - 0x18,0x30,0x60,0x00,0xfe,0x66,0x60,0x7c,0x60,0x66,0xfe,0x00, - 0x00,0x00, - /* character 145 */ - 0x00,0x00,0x00,0x00,0x6c,0xba,0x12,0x7e,0x90,0x98,0x7e,0x00, - 0x00,0x00, - /* character 146 */ - 0x00,0x00,0x3e,0x6c,0xcc,0xcc,0xfe,0xcc,0xcc,0xcc,0xce,0x00, - 0x00,0x00, - /* character 147 */ - 0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0x00, - 0x00,0x00, - /* character 148 */ - 0x00,0x00,0xc6,0xc6,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0x00, - 0x00,0x00, - /* character 149 */ - 0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0x00, - 0x00,0x00, - /* character 150 */ - 0x00,0x30,0x78,0xcc,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00, - 0x00,0x00, - /* character 151 */ - 0x00,0x60,0x30,0x18,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00, - 0x00,0x00, - /* character 152 */ - 0x00,0x00,0xc6,0xc6,0x00,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x0c, - 0x78,0x00, - /* character 153 */ - 0x00,0xc6,0xc6,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x00, - 0x00,0x00, - /* character 154 */ - 0x00,0xc6,0xc6,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00, - 0x00,0x00, - /* character 155 */ - 0x00,0x08,0x08,0x7e,0xc8,0xc8,0xc8,0xc8,0x7e,0x08,0x08,0x00, - 0x00,0x00, - /* character 156 */ - 0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0xe6,0xfc,0x00, - 0x00,0x00, - /* character 157 */ - 0x00,0x00,0xc6,0x6c,0x38,0x10,0xfe,0x10,0xfe,0x10,0x10,0x00, - 0x00,0x00, - /* character 158 */ - 0x00,0xf8,0xcc,0xcc,0xf8,0xc4,0xcc,0xde,0xcc,0xcc,0xe6,0x00, - 0x00,0x00, - /* character 159 */ - 0x00,0x1c,0x34,0x30,0x30,0x30,0xfc,0x30,0x30,0x30,0x30,0xb0, - 0xe0,0x00, - /* character 160 */ - 0x00,0x18,0x30,0x60,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0x76,0x00, - 0x00,0x00, - /* character 161 */ - 0x00,0x0c,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x3c,0x00, - 0x00,0x00, - /* character 162 */ - 0x00,0x18,0x30,0x60,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0x00, - 0x00,0x00, - /* character 163 */ - 0x00,0x18,0x30,0x60,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00, - 0x00,0x00, - /* character 164 */ - 0x00,0x00,0x76,0xdc,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x00, - 0x00,0x00, - /* character 165 */ - 0x76,0xdc,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0x00, - 0x00,0x00, - /* character 166 */ - 0x00,0x3c,0x6c,0x6c,0x3e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 167 */ - 0x00,0x38,0x6c,0x6c,0x38,0x00,0x7c,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 168 */ - 0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x60,0xc6,0xc6,0x7c,0x00, - 0x00,0x00, - /* character 169 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x60,0x60,0x60,0x00,0x00, - 0x00,0x00, - /* character 170 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x01,0x01,0x01,0x00,0x00, - 0x00,0x00, - /* character 171 */ - 0x00,0xc0,0xc0,0xc6,0xcc,0xd8,0x30,0x60,0xdc,0x86,0x0c,0x18, - 0x3e,0x00, - /* character 172 */ - 0x00,0xc0,0xc0,0xc6,0xcc,0xd8,0x30,0x66,0xce,0x9a,0x3e,0x06, - 0x06,0x00, - /* character 173 */ - 0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x3c,0x3c,0x3c,0x18,0x00, - 0x00,0x00, - /* character 174 */ - 0x00,0x00,0x00,0x00,0x36,0x6c,0xd8,0x6c,0x36,0x00,0x00,0x00, - 0x00,0x00, - /* character 175 */ - 0x00,0x00,0x00,0x00,0xd8,0x6c,0x36,0x6c,0xd8,0x00,0x00,0x00, - 0x00,0x00, - /* character 176 */ - 0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88, - 0x22,0x88, - /* character 177 */ - 0xaa,0x54,0xaa,0x54,0xaa,0x54,0xaa,0x54,0xaa,0x54,0xaa,0x54, - 0xaa,0x54, - /* character 178 */ - 0xba,0xee,0xba,0xee,0xba,0xee,0xba,0xee,0xba,0xee,0xba,0xee, - 0xba,0xee, - /* character 179 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 180 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 181 */ - 0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 182 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xf6,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 183 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 184 */ - 0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 185 */ - 0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xf6,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 186 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 187 */ - 0x00,0x00,0x00,0x00,0x00,0xfe,0x06,0xf6,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 188 */ - 0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xfe,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 189 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xfe,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 190 */ - 0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 191 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 192 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 193 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 194 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 195 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 196 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 197 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 198 */ - 0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 199 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 200 */ - 0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x3f,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 201 */ - 0x00,0x00,0x00,0x00,0x00,0x3f,0x30,0x37,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 202 */ - 0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 203 */ - 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xf7,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 204 */ - 0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 205 */ - 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 206 */ - 0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xf7,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 207 */ - 0x18,0x18,0x18,0x18,0x18,0xff,0x00,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 208 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 209 */ - 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 210 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 211 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x3f,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 212 */ - 0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 213 */ - 0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 214 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 215 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0x36, - 0x36,0x36, - /* character 216 */ - 0x18,0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 217 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 218 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 219 */ - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff, - /* character 220 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff, - /* character 221 */ - 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, - 0xf0,0xf0, - /* character 222 */ - 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f, - 0x0f,0x0f, - /* character 223 */ - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 224 */ - 0x00,0x00,0x00,0x00,0x00,0x76,0xdc,0xd8,0xd8,0xdc,0x76,0x00, - 0x00,0x00, - /* character 225 */ - 0x00,0x00,0x00,0x00,0x7c,0xc6,0xfc,0xc6,0xc6,0xfc,0xc0,0xc0, - 0x40,0x00, - /* character 226 */ - 0x00,0x00,0xfe,0xc6,0xc6,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00, - 0x00,0x00, - /* character 227 */ - 0x00,0x00,0x00,0x00,0xfe,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x00, - 0x00,0x00, - /* character 228 */ - 0x00,0x00,0xfe,0xc6,0x60,0x30,0x18,0x30,0x60,0xc6,0xfe,0x00, - 0x00,0x00, - /* character 229 */ - 0x00,0x00,0x00,0x00,0x00,0x7e,0xd8,0xd8,0xd8,0xd8,0x70,0x00, - 0x00,0x00, - /* character 230 */ - 0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xc0, - 0x00,0x00, - /* character 231 */ - 0x00,0x00,0x00,0x00,0x76,0xdc,0x18,0x18,0x18,0x18,0x18,0x00, - 0x00,0x00, - /* character 232 */ - 0x00,0x00,0xfc,0x30,0x78,0xcc,0xcc,0xcc,0x78,0x30,0xfc,0x00, - 0x00,0x00, - /* character 233 */ - 0x00,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0x6c,0x38,0x00, - 0x00,0x00, - /* character 234 */ - 0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0x6c,0x6c,0x6c,0xee,0x00, - 0x00,0x00, - /* character 235 */ - 0x00,0x00,0x3c,0x60,0x30,0x18,0x7c,0xcc,0xcc,0xcc,0x78,0x00, - 0x00,0x00, - /* character 236 */ - 0x00,0x00,0x00,0x00,0x00,0x7c,0xd6,0xd6,0x7c,0x00,0x00,0x00, - 0x00,0x00, - /* character 237 */ - 0x00,0x00,0x06,0x0c,0x7c,0xce,0xd6,0xe6,0x7c,0x60,0xc0,0x00, - 0x00,0x00, - /* character 238 */ - 0x00,0x00,0x38,0x60,0xc0,0xc0,0xf8,0xc0,0xc0,0x60,0x38,0x00, - 0x00,0x00, - /* character 239 */ - 0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00, - 0x00,0x00, - /* character 240 */ - 0x00,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00,0x00, - 0x00,0x00, - /* character 241 */ - 0x00,0x00,0x30,0x30,0x30,0xfc,0x30,0x30,0x30,0x00,0xfc,0x00, - 0x00,0x00, - /* character 242 */ - 0x00,0x00,0x60,0x30,0x18,0x0c,0x18,0x30,0x60,0x00,0xfc,0x00, - 0x00,0x00, - /* character 243 */ - 0x00,0x00,0x18,0x30,0x60,0xc0,0x60,0x30,0x18,0x00,0xfc,0x00, - 0x00,0x00, - /* character 244 */ - 0x00,0x00,0x0e,0x1a,0x1a,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18, - /* character 245 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x58,0x58,0x70,0x00, - 0x00,0x00, - /* character 246 */ - 0x00,0x00,0x30,0x30,0x00,0x00,0xfc,0x00,0x00,0x30,0x30,0x00, - 0x00,0x00, - /* character 247 */ - 0x00,0x00,0x00,0x00,0x76,0xdc,0x00,0x76,0xdc,0x00,0x00,0x00, - 0x00,0x00, - /* character 248 */ - 0x00,0x70,0xd8,0xd8,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 249 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 250 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 251 */ - 0x00,0x1e,0x18,0x18,0x18,0x18,0x18,0xd8,0xd8,0x78,0x38,0x00, - 0x00,0x00, - /* character 252 */ - 0x00,0xd8,0x6c,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 253 */ - 0x00,0x70,0xd8,0x30,0x60,0xc8,0xf8,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00, - /* character 254 */ - 0x00,0x00,0x00,0x00,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x00,0x00, - 0x00,0x00, - /* character 255 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00 -}; - -struct { - GrFont theFont; - GrFontChrInfo rest[255]; -} GrFont_PC8x14 = { - { - { /* font header */ - "pc8x14", /* font name */ - "pc", /* font family name */ - 0, /* characters have varying width */ - 0, /* derived from a scalable font */ - 1, /* font permanently linked into program */ - GR_FONTCVT_NONE, /* 'tweaked' font (resized, etc..) */ - 8, /* width (average when proportional) */ - 14, /* font height */ - 10, /* baseline pixel pos (from top) */ - 13, /* underline pixel pos (from top) */ - 1, /* underline width */ - 0, /* lowest character code in font */ - 256 /* number of characters in font */ - }, - (char *)GrFont_PC8x14_bits, /* character bitmap array */ - 0, /* auxiliary bitmap */ - 8, /* width of narrowest character */ - 8, /* width of widest character */ - 0, /* allocated size of auxiliary bitmap */ - 0, /* free space in auxiliary bitmap */ - { 0 }, /* converted character bitmap offsets */ - {{ 8, 0 }} /* first character info */ - }, - { - { 8, 14 }, /* info for character 1 */ - { 8, 28 }, /* info for character 2 */ - { 8, 42 }, /* info for character 3 */ - { 8, 56 }, /* info for character 4 */ - { 8, 70 }, /* info for character 5 */ - { 8, 84 }, /* info for character 6 */ - { 8, 98 }, /* info for character 7 */ - { 8, 112 }, /* info for character 8 */ - { 8, 126 }, /* info for character 9 */ - { 8, 140 }, /* info for character 10 */ - { 8, 154 }, /* info for character 11 */ - { 8, 168 }, /* info for character 12 */ - { 8, 182 }, /* info for character 13 */ - { 8, 196 }, /* info for character 14 */ - { 8, 210 }, /* info for character 15 */ - { 8, 224 }, /* info for character 16 */ - { 8, 238 }, /* info for character 17 */ - { 8, 252 }, /* info for character 18 */ - { 8, 266 }, /* info for character 19 */ - { 8, 280 }, /* info for character 20 */ - { 8, 294 }, /* info for character 21 */ - { 8, 308 }, /* info for character 22 */ - { 8, 322 }, /* info for character 23 */ - { 8, 336 }, /* info for character 24 */ - { 8, 350 }, /* info for character 25 */ - { 8, 364 }, /* info for character 26 */ - { 8, 378 }, /* info for character 27 */ - { 8, 392 }, /* info for character 28 */ - { 8, 406 }, /* info for character 29 */ - { 8, 420 }, /* info for character 30 */ - { 8, 434 }, /* info for character 31 */ - { 8, 448 }, /* info for character 32 */ - { 8, 462 }, /* info for character 33 */ - { 8, 476 }, /* info for character 34 */ - { 8, 490 }, /* info for character 35 */ - { 8, 504 }, /* info for character 36 */ - { 8, 518 }, /* info for character 37 */ - { 8, 532 }, /* info for character 38 */ - { 8, 546 }, /* info for character 39 */ - { 8, 560 }, /* info for character 40 */ - { 8, 574 }, /* info for character 41 */ - { 8, 588 }, /* info for character 42 */ - { 8, 602 }, /* info for character 43 */ - { 8, 616 }, /* info for character 44 */ - { 8, 630 }, /* info for character 45 */ - { 8, 644 }, /* info for character 46 */ - { 8, 658 }, /* info for character 47 */ - { 8, 672 }, /* info for character 48 */ - { 8, 686 }, /* info for character 49 */ - { 8, 700 }, /* info for character 50 */ - { 8, 714 }, /* info for character 51 */ - { 8, 728 }, /* info for character 52 */ - { 8, 742 }, /* info for character 53 */ - { 8, 756 }, /* info for character 54 */ - { 8, 770 }, /* info for character 55 */ - { 8, 784 }, /* info for character 56 */ - { 8, 798 }, /* info for character 57 */ - { 8, 812 }, /* info for character 58 */ - { 8, 826 }, /* info for character 59 */ - { 8, 840 }, /* info for character 60 */ - { 8, 854 }, /* info for character 61 */ - { 8, 868 }, /* info for character 62 */ - { 8, 882 }, /* info for character 63 */ - { 8, 896 }, /* info for character 64 */ - { 8, 910 }, /* info for character 65 */ - { 8, 924 }, /* info for character 66 */ - { 8, 938 }, /* info for character 67 */ - { 8, 952 }, /* info for character 68 */ - { 8, 966 }, /* info for character 69 */ - { 8, 980 }, /* info for character 70 */ - { 8, 994 }, /* info for character 71 */ - { 8, 1008 }, /* info for character 72 */ - { 8, 1022 }, /* info for character 73 */ - { 8, 1036 }, /* info for character 74 */ - { 8, 1050 }, /* info for character 75 */ - { 8, 1064 }, /* info for character 76 */ - { 8, 1078 }, /* info for character 77 */ - { 8, 1092 }, /* info for character 78 */ - { 8, 1106 }, /* info for character 79 */ - { 8, 1120 }, /* info for character 80 */ - { 8, 1134 }, /* info for character 81 */ - { 8, 1148 }, /* info for character 82 */ - { 8, 1162 }, /* info for character 83 */ - { 8, 1176 }, /* info for character 84 */ - { 8, 1190 }, /* info for character 85 */ - { 8, 1204 }, /* info for character 86 */ - { 8, 1218 }, /* info for character 87 */ - { 8, 1232 }, /* info for character 88 */ - { 8, 1246 }, /* info for character 89 */ - { 8, 1260 }, /* info for character 90 */ - { 8, 1274 }, /* info for character 91 */ - { 8, 1288 }, /* info for character 92 */ - { 8, 1302 }, /* info for character 93 */ - { 8, 1316 }, /* info for character 94 */ - { 8, 1330 }, /* info for character 95 */ - { 8, 1344 }, /* info for character 96 */ - { 8, 1358 }, /* info for character 97 */ - { 8, 1372 }, /* info for character 98 */ - { 8, 1386 }, /* info for character 99 */ - { 8, 1400 }, /* info for character 100 */ - { 8, 1414 }, /* info for character 101 */ - { 8, 1428 }, /* info for character 102 */ - { 8, 1442 }, /* info for character 103 */ - { 8, 1456 }, /* info for character 104 */ - { 8, 1470 }, /* info for character 105 */ - { 8, 1484 }, /* info for character 106 */ - { 8, 1498 }, /* info for character 107 */ - { 8, 1512 }, /* info for character 108 */ - { 8, 1526 }, /* info for character 109 */ - { 8, 1540 }, /* info for character 110 */ - { 8, 1554 }, /* info for character 111 */ - { 8, 1568 }, /* info for character 112 */ - { 8, 1582 }, /* info for character 113 */ - { 8, 1596 }, /* info for character 114 */ - { 8, 1610 }, /* info for character 115 */ - { 8, 1624 }, /* info for character 116 */ - { 8, 1638 }, /* info for character 117 */ - { 8, 1652 }, /* info for character 118 */ - { 8, 1666 }, /* info for character 119 */ - { 8, 1680 }, /* info for character 120 */ - { 8, 1694 }, /* info for character 121 */ - { 8, 1708 }, /* info for character 122 */ - { 8, 1722 }, /* info for character 123 */ - { 8, 1736 }, /* info for character 124 */ - { 8, 1750 }, /* info for character 125 */ - { 8, 1764 }, /* info for character 126 */ - { 8, 1778 }, /* info for character 127 */ - { 8, 1792 }, /* info for character 128 */ - { 8, 1806 }, /* info for character 129 */ - { 8, 1820 }, /* info for character 130 */ - { 8, 1834 }, /* info for character 131 */ - { 8, 1848 }, /* info for character 132 */ - { 8, 1862 }, /* info for character 133 */ - { 8, 1876 }, /* info for character 134 */ - { 8, 1890 }, /* info for character 135 */ - { 8, 1904 }, /* info for character 136 */ - { 8, 1918 }, /* info for character 137 */ - { 8, 1932 }, /* info for character 138 */ - { 8, 1946 }, /* info for character 139 */ - { 8, 1960 }, /* info for character 140 */ - { 8, 1974 }, /* info for character 141 */ - { 8, 1988 }, /* info for character 142 */ - { 8, 2002 }, /* info for character 143 */ - { 8, 2016 }, /* info for character 144 */ - { 8, 2030 }, /* info for character 145 */ - { 8, 2044 }, /* info for character 146 */ - { 8, 2058 }, /* info for character 147 */ - { 8, 2072 }, /* info for character 148 */ - { 8, 2086 }, /* info for character 149 */ - { 8, 2100 }, /* info for character 150 */ - { 8, 2114 }, /* info for character 151 */ - { 8, 2128 }, /* info for character 152 */ - { 8, 2142 }, /* info for character 153 */ - { 8, 2156 }, /* info for character 154 */ - { 8, 2170 }, /* info for character 155 */ - { 8, 2184 }, /* info for character 156 */ - { 8, 2198 }, /* info for character 157 */ - { 8, 2212 }, /* info for character 158 */ - { 8, 2226 }, /* info for character 159 */ - { 8, 2240 }, /* info for character 160 */ - { 8, 2254 }, /* info for character 161 */ - { 8, 2268 }, /* info for character 162 */ - { 8, 2282 }, /* info for character 163 */ - { 8, 2296 }, /* info for character 164 */ - { 8, 2310 }, /* info for character 165 */ - { 8, 2324 }, /* info for character 166 */ - { 8, 2338 }, /* info for character 167 */ - { 8, 2352 }, /* info for character 168 */ - { 8, 2366 }, /* info for character 169 */ - { 8, 2380 }, /* info for character 170 */ - { 8, 2394 }, /* info for character 171 */ - { 8, 2408 }, /* info for character 172 */ - { 8, 2422 }, /* info for character 173 */ - { 8, 2436 }, /* info for character 174 */ - { 8, 2450 }, /* info for character 175 */ - { 8, 2464 }, /* info for character 176 */ - { 8, 2478 }, /* info for character 177 */ - { 8, 2492 }, /* info for character 178 */ - { 8, 2506 }, /* info for character 179 */ - { 8, 2520 }, /* info for character 180 */ - { 8, 2534 }, /* info for character 181 */ - { 8, 2548 }, /* info for character 182 */ - { 8, 2562 }, /* info for character 183 */ - { 8, 2576 }, /* info for character 184 */ - { 8, 2590 }, /* info for character 185 */ - { 8, 2604 }, /* info for character 186 */ - { 8, 2618 }, /* info for character 187 */ - { 8, 2632 }, /* info for character 188 */ - { 8, 2646 }, /* info for character 189 */ - { 8, 2660 }, /* info for character 190 */ - { 8, 2674 }, /* info for character 191 */ - { 8, 2688 }, /* info for character 192 */ - { 8, 2702 }, /* info for character 193 */ - { 8, 2716 }, /* info for character 194 */ - { 8, 2730 }, /* info for character 195 */ - { 8, 2744 }, /* info for character 196 */ - { 8, 2758 }, /* info for character 197 */ - { 8, 2772 }, /* info for character 198 */ - { 8, 2786 }, /* info for character 199 */ - { 8, 2800 }, /* info for character 200 */ - { 8, 2814 }, /* info for character 201 */ - { 8, 2828 }, /* info for character 202 */ - { 8, 2842 }, /* info for character 203 */ - { 8, 2856 }, /* info for character 204 */ - { 8, 2870 }, /* info for character 205 */ - { 8, 2884 }, /* info for character 206 */ - { 8, 2898 }, /* info for character 207 */ - { 8, 2912 }, /* info for character 208 */ - { 8, 2926 }, /* info for character 209 */ - { 8, 2940 }, /* info for character 210 */ - { 8, 2954 }, /* info for character 211 */ - { 8, 2968 }, /* info for character 212 */ - { 8, 2982 }, /* info for character 213 */ - { 8, 2996 }, /* info for character 214 */ - { 8, 3010 }, /* info for character 215 */ - { 8, 3024 }, /* info for character 216 */ - { 8, 3038 }, /* info for character 217 */ - { 8, 3052 }, /* info for character 218 */ - { 8, 3066 }, /* info for character 219 */ - { 8, 3080 }, /* info for character 220 */ - { 8, 3094 }, /* info for character 221 */ - { 8, 3108 }, /* info for character 222 */ - { 8, 3122 }, /* info for character 223 */ - { 8, 3136 }, /* info for character 224 */ - { 8, 3150 }, /* info for character 225 */ - { 8, 3164 }, /* info for character 226 */ - { 8, 3178 }, /* info for character 227 */ - { 8, 3192 }, /* info for character 228 */ - { 8, 3206 }, /* info for character 229 */ - { 8, 3220 }, /* info for character 230 */ - { 8, 3234 }, /* info for character 231 */ - { 8, 3248 }, /* info for character 232 */ - { 8, 3262 }, /* info for character 233 */ - { 8, 3276 }, /* info for character 234 */ - { 8, 3290 }, /* info for character 235 */ - { 8, 3304 }, /* info for character 236 */ - { 8, 3318 }, /* info for character 237 */ - { 8, 3332 }, /* info for character 238 */ - { 8, 3346 }, /* info for character 239 */ - { 8, 3360 }, /* info for character 240 */ - { 8, 3374 }, /* info for character 241 */ - { 8, 3388 }, /* info for character 242 */ - { 8, 3402 }, /* info for character 243 */ - { 8, 3416 }, /* info for character 244 */ - { 8, 3430 }, /* info for character 245 */ - { 8, 3444 }, /* info for character 246 */ - { 8, 3458 }, /* info for character 247 */ - { 8, 3472 }, /* info for character 248 */ - { 8, 3486 }, /* info for character 249 */ - { 8, 3500 }, /* info for character 250 */ - { 8, 3514 }, /* info for character 251 */ - { 8, 3528 }, /* info for character 252 */ - { 8, 3542 }, /* info for character 253 */ - { 8, 3556 }, /* info for character 254 */ - { 8, 3570 } /* info for character 255 */ - } -}; - diff --git a/thirdparty/grx249/src/fonts/pc8x16.c b/thirdparty/grx249/src/fonts/pc8x16.c deleted file mode 100644 index 1410478..0000000 --- a/thirdparty/grx249/src/fonts/pc8x16.c +++ /dev/null @@ -1,1067 +0,0 @@ -/** - ** pc8x16.c ---- GRX 2.0 font converted to C by 'GrDumpFont()' - **/ - -#define GrFont_PC8x16 FONTNAME_TEMPORARY_REDIRECTION -#include "grx20.h" -#undef GrFont_PC8x16 - -static unsigned char far GrFont_PC8x16_bits[] = { - /* character 0 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 1 */ - 0x00,0x00,0x7e,0x81,0xa5,0x81,0x81,0xbd,0x99,0x81,0x81,0x7e, - 0x00,0x00,0x00,0x00, - /* character 2 */ - 0x00,0x00,0x7e,0xff,0xdb,0xff,0xff,0xc3,0xe7,0xff,0xff,0x7e, - 0x00,0x00,0x00,0x00, - /* character 3 */ - 0x00,0x00,0x00,0x00,0x6c,0xfe,0xfe,0xfe,0xfe,0x7c,0x38,0x10, - 0x00,0x00,0x00,0x00, - /* character 4 */ - 0x00,0x00,0x00,0x00,0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10,0x00, - 0x00,0x00,0x00,0x00, - /* character 5 */ - 0x00,0x00,0x00,0x18,0x3c,0x3c,0xe7,0xe7,0xe7,0x18,0x18,0x3c, - 0x00,0x00,0x00,0x00, - /* character 6 */ - 0x00,0x00,0x00,0x18,0x3c,0x7e,0xff,0xff,0x7e,0x18,0x18,0x3c, - 0x00,0x00,0x00,0x00, - /* character 7 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 8 */ - 0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xc3,0xc3,0xe7,0xff,0xff, - 0xff,0xff,0xff,0xff, - /* character 9 */ - 0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x42,0x42,0x66,0x3c,0x00, - 0x00,0x00,0x00,0x00, - /* character 10 */ - 0xff,0xff,0xff,0xff,0xff,0xc3,0x99,0xbd,0xbd,0x99,0xc3,0xff, - 0xff,0xff,0xff,0xff, - /* character 11 */ - 0x00,0x00,0x1e,0x0e,0x1a,0x32,0x78,0xcc,0xcc,0xcc,0xcc,0x78, - 0x00,0x00,0x00,0x00, - /* character 12 */ - 0x00,0x00,0x3c,0x66,0x66,0x66,0x66,0x3c,0x18,0x7e,0x18,0x18, - 0x00,0x00,0x00,0x00, - /* character 13 */ - 0x00,0x00,0x3f,0x33,0x3f,0x30,0x30,0x30,0x30,0x70,0xf0,0xe0, - 0x00,0x00,0x00,0x00, - /* character 14 */ - 0x00,0x00,0x7f,0x63,0x7f,0x63,0x63,0x63,0x63,0x67,0xe7,0xe6, - 0xc0,0x00,0x00,0x00, - /* character 15 */ - 0x00,0x00,0x00,0x18,0x18,0xdb,0x3c,0xe7,0x3c,0xdb,0x18,0x18, - 0x00,0x00,0x00,0x00, - /* character 16 */ - 0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfe,0xf8,0xf0,0xe0,0xc0,0x80, - 0x00,0x00,0x00,0x00, - /* character 17 */ - 0x00,0x02,0x06,0x0e,0x1e,0x3e,0xfe,0x3e,0x1e,0x0e,0x06,0x02, - 0x00,0x00,0x00,0x00, - /* character 18 */ - 0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00, - 0x00,0x00,0x00,0x00, - /* character 19 */ - 0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x66, - 0x00,0x00,0x00,0x00, - /* character 20 */ - 0x00,0x00,0x7f,0xdb,0xdb,0xdb,0x7b,0x1b,0x1b,0x1b,0x1b,0x1b, - 0x00,0x00,0x00,0x00, - /* character 21 */ - 0x00,0x7c,0xc6,0x60,0x38,0x6c,0xc6,0xc6,0x6c,0x38,0x0c,0xc6, - 0x7c,0x00,0x00,0x00, - /* character 22 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0xfe,0xfe, - 0x00,0x00,0x00,0x00, - /* character 23 */ - 0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x7e, - 0x00,0x00,0x00,0x00, - /* character 24 */ - 0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x00,0x00,0x00,0x00, - /* character 25 */ - 0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x3c,0x18, - 0x00,0x00,0x00,0x00, - /* character 26 */ - 0x00,0x00,0x00,0x00,0x00,0x18,0x0c,0xfe,0x0c,0x18,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 27 */ - 0x00,0x00,0x00,0x00,0x00,0x30,0x60,0xfe,0x60,0x30,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 28 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xfe,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 29 */ - 0x00,0x00,0x00,0x00,0x00,0x28,0x6c,0xfe,0x6c,0x28,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 30 */ - 0x00,0x00,0x00,0x00,0x10,0x38,0x38,0x7c,0x7c,0xfe,0xfe,0x00, - 0x00,0x00,0x00,0x00, - /* character 31 */ - 0x00,0x00,0x00,0x00,0xfe,0xfe,0x7c,0x7c,0x38,0x38,0x10,0x00, - 0x00,0x00,0x00,0x00, - /* character 32 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 33 */ - 0x00,0x00,0x18,0x3c,0x3c,0x3c,0x18,0x18,0x18,0x00,0x18,0x18, - 0x00,0x00,0x00,0x00, - /* character 34 */ - 0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 35 */ - 0x00,0x00,0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c, - 0x00,0x00,0x00,0x00, - /* character 36 */ - 0x18,0x18,0x7c,0xc6,0xc2,0xc0,0x7c,0x06,0x06,0x86,0xc6,0x7c, - 0x18,0x18,0x00,0x00, - /* character 37 */ - 0x00,0x00,0x00,0x00,0xc2,0xc6,0x0c,0x18,0x30,0x60,0xc6,0x86, - 0x00,0x00,0x00,0x00, - /* character 38 */ - 0x00,0x00,0x38,0x6c,0x6c,0x38,0x76,0xdc,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 39 */ - 0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 40 */ - 0x00,0x00,0x0c,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0c, - 0x00,0x00,0x00,0x00, - /* character 41 */ - 0x00,0x00,0x30,0x18,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x18,0x30, - 0x00,0x00,0x00,0x00, - /* character 42 */ - 0x00,0x00,0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 43 */ - 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 44 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18, - 0x30,0x00,0x00,0x00, - /* character 45 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 46 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18, - 0x00,0x00,0x00,0x00, - /* character 47 */ - 0x00,0x00,0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80, - 0x00,0x00,0x00,0x00, - /* character 48 */ - 0x00,0x00,0x7c,0xc6,0xc6,0xce,0xde,0xf6,0xe6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 49 */ - 0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7e, - 0x00,0x00,0x00,0x00, - /* character 50 */ - 0x00,0x00,0x7c,0xc6,0x06,0x0c,0x18,0x30,0x60,0xc0,0xc6,0xfe, - 0x00,0x00,0x00,0x00, - /* character 51 */ - 0x00,0x00,0x7c,0xc6,0x06,0x06,0x3c,0x06,0x06,0x06,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 52 */ - 0x00,0x00,0x0c,0x1c,0x3c,0x6c,0xcc,0xfe,0x0c,0x0c,0x0c,0x1e, - 0x00,0x00,0x00,0x00, - /* character 53 */ - 0x00,0x00,0xfe,0xc0,0xc0,0xc0,0xfc,0x06,0x06,0x06,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 54 */ - 0x00,0x00,0x38,0x60,0xc0,0xc0,0xfc,0xc6,0xc6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 55 */ - 0x00,0x00,0xfe,0xc6,0x06,0x06,0x0c,0x18,0x30,0x30,0x30,0x30, - 0x00,0x00,0x00,0x00, - /* character 56 */ - 0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 57 */ - 0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x06,0x0c,0x78, - 0x00,0x00,0x00,0x00, - /* character 58 */ - 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00, - 0x00,0x00,0x00,0x00, - /* character 59 */ - 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30, - 0x00,0x00,0x00,0x00, - /* character 60 */ - 0x00,0x00,0x00,0x06,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x06, - 0x00,0x00,0x00,0x00, - /* character 61 */ - 0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 62 */ - 0x00,0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60, - 0x00,0x00,0x00,0x00, - /* character 63 */ - 0x00,0x00,0x7c,0xc6,0xc6,0x0c,0x18,0x18,0x18,0x00,0x18,0x18, - 0x00,0x00,0x00,0x00, - /* character 64 */ - 0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xde,0xde,0xde,0xdc,0xc0,0x7c, - 0x00,0x00,0x00,0x00, - /* character 65 */ - 0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6, - 0x00,0x00,0x00,0x00, - /* character 66 */ - 0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0x66,0xfc, - 0x00,0x00,0x00,0x00, - /* character 67 */ - 0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc0,0xc2,0x66,0x3c, - 0x00,0x00,0x00,0x00, - /* character 68 */ - 0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8, - 0x00,0x00,0x00,0x00, - /* character 69 */ - 0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xfe, - 0x00,0x00,0x00,0x00, - /* character 70 */ - 0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xf0, - 0x00,0x00,0x00,0x00, - /* character 71 */ - 0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xde,0xc6,0xc6,0x66,0x3a, - 0x00,0x00,0x00,0x00, - /* character 72 */ - 0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0xc6, - 0x00,0x00,0x00,0x00, - /* character 73 */ - 0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c, - 0x00,0x00,0x00,0x00, - /* character 74 */ - 0x00,0x00,0x1e,0x0c,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0xcc,0x78, - 0x00,0x00,0x00,0x00, - /* character 75 */ - 0x00,0x00,0xe6,0x66,0x66,0x6c,0x78,0x78,0x6c,0x66,0x66,0xe6, - 0x00,0x00,0x00,0x00, - /* character 76 */ - 0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xfe, - 0x00,0x00,0x00,0x00, - /* character 77 */ - 0x00,0x00,0xc6,0xee,0xfe,0xfe,0xd6,0xc6,0xc6,0xc6,0xc6,0xc6, - 0x00,0x00,0x00,0x00, - /* character 78 */ - 0x00,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0xc6,0xc6, - 0x00,0x00,0x00,0x00, - /* character 79 */ - 0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 80 */ - 0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x60,0x60,0x60,0x60,0xf0, - 0x00,0x00,0x00,0x00, - /* character 81 */ - 0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xd6,0xde,0x7c, - 0x0c,0x0e,0x00,0x00, - /* character 82 */ - 0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x6c,0x66,0x66,0x66,0xe6, - 0x00,0x00,0x00,0x00, - /* character 83 */ - 0x00,0x00,0x7c,0xc6,0xc6,0x60,0x38,0x0c,0x06,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 84 */ - 0x00,0x00,0x7e,0x7e,0x5a,0x18,0x18,0x18,0x18,0x18,0x18,0x3c, - 0x00,0x00,0x00,0x00, - /* character 85 */ - 0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 86 */ - 0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x10, - 0x00,0x00,0x00,0x00, - /* character 87 */ - 0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xd6,0xd6,0xd6,0xfe,0xee,0x6c, - 0x00,0x00,0x00,0x00, - /* character 88 */ - 0x00,0x00,0xc6,0xc6,0x6c,0x7c,0x38,0x38,0x7c,0x6c,0xc6,0xc6, - 0x00,0x00,0x00,0x00, - /* character 89 */ - 0x00,0x00,0x66,0x66,0x66,0x66,0x3c,0x18,0x18,0x18,0x18,0x3c, - 0x00,0x00,0x00,0x00, - /* character 90 */ - 0x00,0x00,0xfe,0xc6,0x86,0x0c,0x18,0x30,0x60,0xc2,0xc6,0xfe, - 0x00,0x00,0x00,0x00, - /* character 91 */ - 0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c, - 0x00,0x00,0x00,0x00, - /* character 92 */ - 0x00,0x00,0x00,0x80,0xc0,0xe0,0x70,0x38,0x1c,0x0e,0x06,0x02, - 0x00,0x00,0x00,0x00, - /* character 93 */ - 0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c, - 0x00,0x00,0x00,0x00, - /* character 94 */ - 0x10,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 95 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xff,0x00,0x00, - /* character 96 */ - 0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 97 */ - 0x00,0x00,0x00,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 98 */ - 0x00,0x00,0xe0,0x60,0x60,0x78,0x6c,0x66,0x66,0x66,0x66,0x7c, - 0x00,0x00,0x00,0x00, - /* character 99 */ - 0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xc0,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 100 */ - 0x00,0x00,0x1c,0x0c,0x0c,0x3c,0x6c,0xcc,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 101 */ - 0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 102 */ - 0x00,0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0x60,0xf0, - 0x00,0x00,0x00,0x00, - /* character 103 */ - 0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c, - 0x0c,0xcc,0x78,0x00, - /* character 104 */ - 0x00,0x00,0xe0,0x60,0x60,0x6c,0x76,0x66,0x66,0x66,0x66,0xe6, - 0x00,0x00,0x00,0x00, - /* character 105 */ - 0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c, - 0x00,0x00,0x00,0x00, - /* character 106 */ - 0x00,0x00,0x06,0x06,0x00,0x0e,0x06,0x06,0x06,0x06,0x06,0x06, - 0x66,0x66,0x3c,0x00, - /* character 107 */ - 0x00,0x00,0xe0,0x60,0x60,0x66,0x6c,0x78,0x78,0x6c,0x66,0xe6, - 0x00,0x00,0x00,0x00, - /* character 108 */ - 0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c, - 0x00,0x00,0x00,0x00, - /* character 109 */ - 0x00,0x00,0x00,0x00,0x00,0xec,0xfe,0xd6,0xd6,0xd6,0xd6,0xc6, - 0x00,0x00,0x00,0x00, - /* character 110 */ - 0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66, - 0x00,0x00,0x00,0x00, - /* character 111 */ - 0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 112 */ - 0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x7c, - 0x60,0x60,0xf0,0x00, - /* character 113 */ - 0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c, - 0x0c,0x0c,0x1e,0x00, - /* character 114 */ - 0x00,0x00,0x00,0x00,0x00,0xdc,0x76,0x66,0x60,0x60,0x60,0xf0, - 0x00,0x00,0x00,0x00, - /* character 115 */ - 0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0x60,0x38,0x0c,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 116 */ - 0x00,0x00,0x10,0x30,0x30,0xfc,0x30,0x30,0x30,0x30,0x36,0x1c, - 0x00,0x00,0x00,0x00, - /* character 117 */ - 0x00,0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 118 */ - 0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3c,0x18, - 0x00,0x00,0x00,0x00, - /* character 119 */ - 0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xd6,0xd6,0xd6,0xfe,0x6c, - 0x00,0x00,0x00,0x00, - /* character 120 */ - 0x00,0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x38,0x38,0x6c,0xc6, - 0x00,0x00,0x00,0x00, - /* character 121 */ - 0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e, - 0x06,0x0c,0xf8,0x00, - /* character 122 */ - 0x00,0x00,0x00,0x00,0x00,0xfe,0xcc,0x18,0x30,0x60,0xc6,0xfe, - 0x00,0x00,0x00,0x00, - /* character 123 */ - 0x00,0x00,0x0e,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0e, - 0x00,0x00,0x00,0x00, - /* character 124 */ - 0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18, - 0x00,0x00,0x00,0x00, - /* character 125 */ - 0x00,0x00,0x70,0x18,0x18,0x18,0x0e,0x18,0x18,0x18,0x18,0x70, - 0x00,0x00,0x00,0x00, - /* character 126 */ - 0x00,0x00,0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 127 */ - 0x00,0x00,0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xc6,0xfe,0x00, - 0x00,0x00,0x00,0x00, - /* character 128 */ - 0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x0c, - 0x06,0x7c,0x00,0x00, - /* character 129 */ - 0x00,0x00,0xcc,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 130 */ - 0x00,0x0c,0x18,0x30,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 131 */ - 0x00,0x10,0x38,0x6c,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 132 */ - 0x00,0x00,0xcc,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 133 */ - 0x00,0x60,0x30,0x18,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 134 */ - 0x00,0x38,0x6c,0x38,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 135 */ - 0x00,0x00,0x00,0x00,0x3c,0x66,0x60,0x60,0x66,0x3c,0x0c,0x06, - 0x3c,0x00,0x00,0x00, - /* character 136 */ - 0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 137 */ - 0x00,0x00,0xc6,0x00,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 138 */ - 0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 139 */ - 0x00,0x00,0x66,0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c, - 0x00,0x00,0x00,0x00, - /* character 140 */ - 0x00,0x18,0x3c,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c, - 0x00,0x00,0x00,0x00, - /* character 141 */ - 0x00,0x60,0x30,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c, - 0x00,0x00,0x00,0x00, - /* character 142 */ - 0x00,0xc6,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6, - 0x00,0x00,0x00,0x00, - /* character 143 */ - 0x38,0x6c,0x38,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6, - 0x00,0x00,0x00,0x00, - /* character 144 */ - 0x18,0x30,0x60,0x00,0xfe,0x66,0x60,0x7c,0x60,0x60,0x66,0xfe, - 0x00,0x00,0x00,0x00, - /* character 145 */ - 0x00,0x00,0x00,0x00,0x6c,0xfe,0xb2,0x32,0x7e,0xd8,0xd8,0x6e, - 0x00,0x00,0x00,0x00, - /* character 146 */ - 0x00,0x00,0x3e,0x6c,0xcc,0xcc,0xfe,0xcc,0xcc,0xcc,0xcc,0xce, - 0x00,0x00,0x00,0x00, - /* character 147 */ - 0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 148 */ - 0x00,0x00,0xc6,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 149 */ - 0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 150 */ - 0x00,0x30,0x78,0xcc,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 151 */ - 0x00,0x60,0x30,0x18,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 152 */ - 0x00,0x00,0xc6,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e, - 0x06,0x0c,0x78,0x00, - /* character 153 */ - 0x00,0xc6,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 154 */ - 0x00,0xc6,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 155 */ - 0x00,0x18,0x18,0x3c,0x66,0x60,0x60,0x60,0x66,0x3c,0x18,0x18, - 0x00,0x00,0x00,0x00, - /* character 156 */ - 0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0x60,0xe6,0xfc, - 0x00,0x00,0x00,0x00, - /* character 157 */ - 0x00,0x00,0x66,0x66,0x3c,0x18,0x7e,0x18,0x7e,0x18,0x18,0x18, - 0x00,0x00,0x00,0x00, - /* character 158 */ - 0x00,0xf8,0xcc,0xcc,0xf8,0xc4,0xcc,0xde,0xcc,0xcc,0xcc,0xc6, - 0x00,0x00,0x00,0x00, - /* character 159 */ - 0x00,0x0e,0x1b,0x18,0x18,0x18,0x7e,0x18,0x18,0x18,0x18,0x18, - 0xd8,0x70,0x00,0x00, - /* character 160 */ - 0x00,0x18,0x30,0x60,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 161 */ - 0x00,0x0c,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c, - 0x00,0x00,0x00,0x00, - /* character 162 */ - 0x00,0x18,0x30,0x60,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 163 */ - 0x00,0x18,0x30,0x60,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76, - 0x00,0x00,0x00,0x00, - /* character 164 */ - 0x00,0x00,0x76,0xdc,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66, - 0x00,0x00,0x00,0x00, - /* character 165 */ - 0x76,0xdc,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0xc6, - 0x00,0x00,0x00,0x00, - /* character 166 */ - 0x00,0x3c,0x6c,0x6c,0x3e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 167 */ - 0x00,0x38,0x6c,0x6c,0x38,0x00,0x7c,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 168 */ - 0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x60,0xc0,0xc6,0xc6,0x7c, - 0x00,0x00,0x00,0x00, - /* character 169 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xc0,0xc0,0xc0,0xc0,0x00, - 0x00,0x00,0x00,0x00, - /* character 170 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x06,0x06,0x06,0x06,0x00, - 0x00,0x00,0x00,0x00, - /* character 171 */ - 0x00,0xc0,0xc0,0xc2,0xc6,0xcc,0x18,0x30,0x60,0xdc,0x86,0x0c, - 0x18,0x3e,0x00,0x00, - /* character 172 */ - 0x00,0xc0,0xc0,0xc2,0xc6,0xcc,0x18,0x30,0x66,0xce,0x9e,0x3e, - 0x06,0x06,0x00,0x00, - /* character 173 */ - 0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3c,0x3c,0x3c,0x18, - 0x00,0x00,0x00,0x00, - /* character 174 */ - 0x00,0x00,0x00,0x00,0x00,0x36,0x6c,0xd8,0x6c,0x36,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 175 */ - 0x00,0x00,0x00,0x00,0x00,0xd8,0x6c,0x36,0x6c,0xd8,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 176 */ - 0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44, - 0x11,0x44,0x11,0x44, - /* character 177 */ - 0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, - 0x55,0xaa,0x55,0xaa, - /* character 178 */ - 0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77, - 0xdd,0x77,0xdd,0x77, - /* character 179 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 180 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 181 */ - 0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 182 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xf6,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 183 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 184 */ - 0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 185 */ - 0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xf6,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 186 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 187 */ - 0x00,0x00,0x00,0x00,0x00,0xfe,0x06,0xf6,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 188 */ - 0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xfe,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 189 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xfe,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 190 */ - 0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 191 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 192 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 193 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 194 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 195 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 196 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 197 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 198 */ - 0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 199 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 200 */ - 0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x3f,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 201 */ - 0x00,0x00,0x00,0x00,0x00,0x3f,0x30,0x37,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 202 */ - 0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 203 */ - 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xf7,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 204 */ - 0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 205 */ - 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 206 */ - 0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xf7,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 207 */ - 0x18,0x18,0x18,0x18,0x18,0xff,0x00,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 208 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 209 */ - 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 210 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 211 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x3f,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 212 */ - 0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 213 */ - 0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 214 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 215 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36, - /* character 216 */ - 0x18,0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 217 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 218 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 219 */ - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff, - /* character 220 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff, - /* character 221 */ - 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, - 0xf0,0xf0,0xf0,0xf0, - /* character 222 */ - 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f, - 0x0f,0x0f,0x0f,0x0f, - /* character 223 */ - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 224 */ - 0x00,0x00,0x00,0x00,0x00,0x76,0xdc,0xd8,0xd8,0xd8,0xdc,0x76, - 0x00,0x00,0x00,0x00, - /* character 225 */ - 0x00,0x00,0x78,0xcc,0xcc,0xcc,0xd8,0xcc,0xc6,0xc6,0xc6,0xcc, - 0x00,0x00,0x00,0x00, - /* character 226 */ - 0x00,0x00,0xfe,0xc6,0xc6,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0x00,0x00,0x00,0x00, - /* character 227 */ - 0x00,0x00,0x00,0x00,0xfe,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c, - 0x00,0x00,0x00,0x00, - /* character 228 */ - 0x00,0x00,0x00,0xfe,0xc6,0x60,0x30,0x18,0x30,0x60,0xc6,0xfe, - 0x00,0x00,0x00,0x00, - /* character 229 */ - 0x00,0x00,0x00,0x00,0x00,0x7e,0xd8,0xd8,0xd8,0xd8,0xd8,0x70, - 0x00,0x00,0x00,0x00, - /* character 230 */ - 0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x7c,0x60,0x60, - 0xc0,0x00,0x00,0x00, - /* character 231 */ - 0x00,0x00,0x00,0x00,0x76,0xdc,0x18,0x18,0x18,0x18,0x18,0x18, - 0x00,0x00,0x00,0x00, - /* character 232 */ - 0x00,0x00,0x00,0x7e,0x18,0x3c,0x66,0x66,0x66,0x3c,0x18,0x7e, - 0x00,0x00,0x00,0x00, - /* character 233 */ - 0x00,0x00,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0x6c,0x38, - 0x00,0x00,0x00,0x00, - /* character 234 */ - 0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0x6c,0x6c,0x6c,0x6c,0xee, - 0x00,0x00,0x00,0x00, - /* character 235 */ - 0x00,0x00,0x1e,0x30,0x18,0x0c,0x3e,0x66,0x66,0x66,0x66,0x3c, - 0x00,0x00,0x00,0x00, - /* character 236 */ - 0x00,0x00,0x00,0x00,0x00,0x7e,0xdb,0xdb,0xdb,0x7e,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 237 */ - 0x00,0x00,0x00,0x03,0x06,0x7e,0xdb,0xdb,0xf3,0x7e,0x60,0xc0, - 0x00,0x00,0x00,0x00, - /* character 238 */ - 0x00,0x00,0x1c,0x30,0x60,0x60,0x7c,0x60,0x60,0x60,0x30,0x1c, - 0x00,0x00,0x00,0x00, - /* character 239 */ - 0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6, - 0x00,0x00,0x00,0x00, - /* character 240 */ - 0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00, - 0x00,0x00,0x00,0x00, - /* character 241 */ - 0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0xff, - 0x00,0x00,0x00,0x00, - /* character 242 */ - 0x00,0x00,0x00,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x00,0x7e, - 0x00,0x00,0x00,0x00, - /* character 243 */ - 0x00,0x00,0x00,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x00,0x7e, - 0x00,0x00,0x00,0x00, - /* character 244 */ - 0x00,0x00,0x0e,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18, - /* character 245 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xd8,0xd8,0xd8,0x70, - 0x00,0x00,0x00,0x00, - /* character 246 */ - 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x7e,0x00,0x18,0x18,0x00, - 0x00,0x00,0x00,0x00, - /* character 247 */ - 0x00,0x00,0x00,0x00,0x00,0x76,0xdc,0x00,0x76,0xdc,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 248 */ - 0x00,0x38,0x6c,0x6c,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 249 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 250 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 251 */ - 0x00,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0xec,0x6c,0x6c,0x3c,0x1c, - 0x00,0x00,0x00,0x00, - /* character 252 */ - 0x00,0xd8,0x6c,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 253 */ - 0x00,0x70,0xd8,0x30,0x60,0xc8,0xf8,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00, - /* character 254 */ - 0x00,0x00,0x00,0x00,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x00, - 0x00,0x00,0x00,0x00, - /* character 255 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00 -}; - -struct { - GrFont theFont; - GrFontChrInfo rest[255]; -} GrFont_PC8x16 = { - { - { /* font header */ - "pc8x16", /* font name */ - "pc", /* font family name */ - 0, /* characters have varying width */ - 0, /* derived from a scalable font */ - 1, /* font permanently linked into program */ - GR_FONTCVT_NONE, /* 'tweaked' font (resized, etc..) */ - 8, /* width (average when proportional) */ - 16, /* font height */ - 11, /* baseline pixel pos (from top) */ - 15, /* underline pixel pos (from top) */ - 1, /* underline width */ - 0, /* lowest character code in font */ - 256 /* number of characters in font */ - }, - (char *)GrFont_PC8x16_bits, /* character bitmap array */ - 0, /* auxiliary bitmap */ - 8, /* width of narrowest character */ - 8, /* width of widest character */ - 0, /* allocated size of auxiliary bitmap */ - 0, /* free space in auxiliary bitmap */ - { 0 }, /* converted character bitmap offsets */ - {{ 8, 0 }} /* first character info */ - }, - { - { 8, 16 }, /* info for character 1 */ - { 8, 32 }, /* info for character 2 */ - { 8, 48 }, /* info for character 3 */ - { 8, 64 }, /* info for character 4 */ - { 8, 80 }, /* info for character 5 */ - { 8, 96 }, /* info for character 6 */ - { 8, 112 }, /* info for character 7 */ - { 8, 128 }, /* info for character 8 */ - { 8, 144 }, /* info for character 9 */ - { 8, 160 }, /* info for character 10 */ - { 8, 176 }, /* info for character 11 */ - { 8, 192 }, /* info for character 12 */ - { 8, 208 }, /* info for character 13 */ - { 8, 224 }, /* info for character 14 */ - { 8, 240 }, /* info for character 15 */ - { 8, 256 }, /* info for character 16 */ - { 8, 272 }, /* info for character 17 */ - { 8, 288 }, /* info for character 18 */ - { 8, 304 }, /* info for character 19 */ - { 8, 320 }, /* info for character 20 */ - { 8, 336 }, /* info for character 21 */ - { 8, 352 }, /* info for character 22 */ - { 8, 368 }, /* info for character 23 */ - { 8, 384 }, /* info for character 24 */ - { 8, 400 }, /* info for character 25 */ - { 8, 416 }, /* info for character 26 */ - { 8, 432 }, /* info for character 27 */ - { 8, 448 }, /* info for character 28 */ - { 8, 464 }, /* info for character 29 */ - { 8, 480 }, /* info for character 30 */ - { 8, 496 }, /* info for character 31 */ - { 8, 512 }, /* info for character 32 */ - { 8, 528 }, /* info for character 33 */ - { 8, 544 }, /* info for character 34 */ - { 8, 560 }, /* info for character 35 */ - { 8, 576 }, /* info for character 36 */ - { 8, 592 }, /* info for character 37 */ - { 8, 608 }, /* info for character 38 */ - { 8, 624 }, /* info for character 39 */ - { 8, 640 }, /* info for character 40 */ - { 8, 656 }, /* info for character 41 */ - { 8, 672 }, /* info for character 42 */ - { 8, 688 }, /* info for character 43 */ - { 8, 704 }, /* info for character 44 */ - { 8, 720 }, /* info for character 45 */ - { 8, 736 }, /* info for character 46 */ - { 8, 752 }, /* info for character 47 */ - { 8, 768 }, /* info for character 48 */ - { 8, 784 }, /* info for character 49 */ - { 8, 800 }, /* info for character 50 */ - { 8, 816 }, /* info for character 51 */ - { 8, 832 }, /* info for character 52 */ - { 8, 848 }, /* info for character 53 */ - { 8, 864 }, /* info for character 54 */ - { 8, 880 }, /* info for character 55 */ - { 8, 896 }, /* info for character 56 */ - { 8, 912 }, /* info for character 57 */ - { 8, 928 }, /* info for character 58 */ - { 8, 944 }, /* info for character 59 */ - { 8, 960 }, /* info for character 60 */ - { 8, 976 }, /* info for character 61 */ - { 8, 992 }, /* info for character 62 */ - { 8, 1008 }, /* info for character 63 */ - { 8, 1024 }, /* info for character 64 */ - { 8, 1040 }, /* info for character 65 */ - { 8, 1056 }, /* info for character 66 */ - { 8, 1072 }, /* info for character 67 */ - { 8, 1088 }, /* info for character 68 */ - { 8, 1104 }, /* info for character 69 */ - { 8, 1120 }, /* info for character 70 */ - { 8, 1136 }, /* info for character 71 */ - { 8, 1152 }, /* info for character 72 */ - { 8, 1168 }, /* info for character 73 */ - { 8, 1184 }, /* info for character 74 */ - { 8, 1200 }, /* info for character 75 */ - { 8, 1216 }, /* info for character 76 */ - { 8, 1232 }, /* info for character 77 */ - { 8, 1248 }, /* info for character 78 */ - { 8, 1264 }, /* info for character 79 */ - { 8, 1280 }, /* info for character 80 */ - { 8, 1296 }, /* info for character 81 */ - { 8, 1312 }, /* info for character 82 */ - { 8, 1328 }, /* info for character 83 */ - { 8, 1344 }, /* info for character 84 */ - { 8, 1360 }, /* info for character 85 */ - { 8, 1376 }, /* info for character 86 */ - { 8, 1392 }, /* info for character 87 */ - { 8, 1408 }, /* info for character 88 */ - { 8, 1424 }, /* info for character 89 */ - { 8, 1440 }, /* info for character 90 */ - { 8, 1456 }, /* info for character 91 */ - { 8, 1472 }, /* info for character 92 */ - { 8, 1488 }, /* info for character 93 */ - { 8, 1504 }, /* info for character 94 */ - { 8, 1520 }, /* info for character 95 */ - { 8, 1536 }, /* info for character 96 */ - { 8, 1552 }, /* info for character 97 */ - { 8, 1568 }, /* info for character 98 */ - { 8, 1584 }, /* info for character 99 */ - { 8, 1600 }, /* info for character 100 */ - { 8, 1616 }, /* info for character 101 */ - { 8, 1632 }, /* info for character 102 */ - { 8, 1648 }, /* info for character 103 */ - { 8, 1664 }, /* info for character 104 */ - { 8, 1680 }, /* info for character 105 */ - { 8, 1696 }, /* info for character 106 */ - { 8, 1712 }, /* info for character 107 */ - { 8, 1728 }, /* info for character 108 */ - { 8, 1744 }, /* info for character 109 */ - { 8, 1760 }, /* info for character 110 */ - { 8, 1776 }, /* info for character 111 */ - { 8, 1792 }, /* info for character 112 */ - { 8, 1808 }, /* info for character 113 */ - { 8, 1824 }, /* info for character 114 */ - { 8, 1840 }, /* info for character 115 */ - { 8, 1856 }, /* info for character 116 */ - { 8, 1872 }, /* info for character 117 */ - { 8, 1888 }, /* info for character 118 */ - { 8, 1904 }, /* info for character 119 */ - { 8, 1920 }, /* info for character 120 */ - { 8, 1936 }, /* info for character 121 */ - { 8, 1952 }, /* info for character 122 */ - { 8, 1968 }, /* info for character 123 */ - { 8, 1984 }, /* info for character 124 */ - { 8, 2000 }, /* info for character 125 */ - { 8, 2016 }, /* info for character 126 */ - { 8, 2032 }, /* info for character 127 */ - { 8, 2048 }, /* info for character 128 */ - { 8, 2064 }, /* info for character 129 */ - { 8, 2080 }, /* info for character 130 */ - { 8, 2096 }, /* info for character 131 */ - { 8, 2112 }, /* info for character 132 */ - { 8, 2128 }, /* info for character 133 */ - { 8, 2144 }, /* info for character 134 */ - { 8, 2160 }, /* info for character 135 */ - { 8, 2176 }, /* info for character 136 */ - { 8, 2192 }, /* info for character 137 */ - { 8, 2208 }, /* info for character 138 */ - { 8, 2224 }, /* info for character 139 */ - { 8, 2240 }, /* info for character 140 */ - { 8, 2256 }, /* info for character 141 */ - { 8, 2272 }, /* info for character 142 */ - { 8, 2288 }, /* info for character 143 */ - { 8, 2304 }, /* info for character 144 */ - { 8, 2320 }, /* info for character 145 */ - { 8, 2336 }, /* info for character 146 */ - { 8, 2352 }, /* info for character 147 */ - { 8, 2368 }, /* info for character 148 */ - { 8, 2384 }, /* info for character 149 */ - { 8, 2400 }, /* info for character 150 */ - { 8, 2416 }, /* info for character 151 */ - { 8, 2432 }, /* info for character 152 */ - { 8, 2448 }, /* info for character 153 */ - { 8, 2464 }, /* info for character 154 */ - { 8, 2480 }, /* info for character 155 */ - { 8, 2496 }, /* info for character 156 */ - { 8, 2512 }, /* info for character 157 */ - { 8, 2528 }, /* info for character 158 */ - { 8, 2544 }, /* info for character 159 */ - { 8, 2560 }, /* info for character 160 */ - { 8, 2576 }, /* info for character 161 */ - { 8, 2592 }, /* info for character 162 */ - { 8, 2608 }, /* info for character 163 */ - { 8, 2624 }, /* info for character 164 */ - { 8, 2640 }, /* info for character 165 */ - { 8, 2656 }, /* info for character 166 */ - { 8, 2672 }, /* info for character 167 */ - { 8, 2688 }, /* info for character 168 */ - { 8, 2704 }, /* info for character 169 */ - { 8, 2720 }, /* info for character 170 */ - { 8, 2736 }, /* info for character 171 */ - { 8, 2752 }, /* info for character 172 */ - { 8, 2768 }, /* info for character 173 */ - { 8, 2784 }, /* info for character 174 */ - { 8, 2800 }, /* info for character 175 */ - { 8, 2816 }, /* info for character 176 */ - { 8, 2832 }, /* info for character 177 */ - { 8, 2848 }, /* info for character 178 */ - { 8, 2864 }, /* info for character 179 */ - { 8, 2880 }, /* info for character 180 */ - { 8, 2896 }, /* info for character 181 */ - { 8, 2912 }, /* info for character 182 */ - { 8, 2928 }, /* info for character 183 */ - { 8, 2944 }, /* info for character 184 */ - { 8, 2960 }, /* info for character 185 */ - { 8, 2976 }, /* info for character 186 */ - { 8, 2992 }, /* info for character 187 */ - { 8, 3008 }, /* info for character 188 */ - { 8, 3024 }, /* info for character 189 */ - { 8, 3040 }, /* info for character 190 */ - { 8, 3056 }, /* info for character 191 */ - { 8, 3072 }, /* info for character 192 */ - { 8, 3088 }, /* info for character 193 */ - { 8, 3104 }, /* info for character 194 */ - { 8, 3120 }, /* info for character 195 */ - { 8, 3136 }, /* info for character 196 */ - { 8, 3152 }, /* info for character 197 */ - { 8, 3168 }, /* info for character 198 */ - { 8, 3184 }, /* info for character 199 */ - { 8, 3200 }, /* info for character 200 */ - { 8, 3216 }, /* info for character 201 */ - { 8, 3232 }, /* info for character 202 */ - { 8, 3248 }, /* info for character 203 */ - { 8, 3264 }, /* info for character 204 */ - { 8, 3280 }, /* info for character 205 */ - { 8, 3296 }, /* info for character 206 */ - { 8, 3312 }, /* info for character 207 */ - { 8, 3328 }, /* info for character 208 */ - { 8, 3344 }, /* info for character 209 */ - { 8, 3360 }, /* info for character 210 */ - { 8, 3376 }, /* info for character 211 */ - { 8, 3392 }, /* info for character 212 */ - { 8, 3408 }, /* info for character 213 */ - { 8, 3424 }, /* info for character 214 */ - { 8, 3440 }, /* info for character 215 */ - { 8, 3456 }, /* info for character 216 */ - { 8, 3472 }, /* info for character 217 */ - { 8, 3488 }, /* info for character 218 */ - { 8, 3504 }, /* info for character 219 */ - { 8, 3520 }, /* info for character 220 */ - { 8, 3536 }, /* info for character 221 */ - { 8, 3552 }, /* info for character 222 */ - { 8, 3568 }, /* info for character 223 */ - { 8, 3584 }, /* info for character 224 */ - { 8, 3600 }, /* info for character 225 */ - { 8, 3616 }, /* info for character 226 */ - { 8, 3632 }, /* info for character 227 */ - { 8, 3648 }, /* info for character 228 */ - { 8, 3664 }, /* info for character 229 */ - { 8, 3680 }, /* info for character 230 */ - { 8, 3696 }, /* info for character 231 */ - { 8, 3712 }, /* info for character 232 */ - { 8, 3728 }, /* info for character 233 */ - { 8, 3744 }, /* info for character 234 */ - { 8, 3760 }, /* info for character 235 */ - { 8, 3776 }, /* info for character 236 */ - { 8, 3792 }, /* info for character 237 */ - { 8, 3808 }, /* info for character 238 */ - { 8, 3824 }, /* info for character 239 */ - { 8, 3840 }, /* info for character 240 */ - { 8, 3856 }, /* info for character 241 */ - { 8, 3872 }, /* info for character 242 */ - { 8, 3888 }, /* info for character 243 */ - { 8, 3904 }, /* info for character 244 */ - { 8, 3920 }, /* info for character 245 */ - { 8, 3936 }, /* info for character 246 */ - { 8, 3952 }, /* info for character 247 */ - { 8, 3968 }, /* info for character 248 */ - { 8, 3984 }, /* info for character 249 */ - { 8, 4000 }, /* info for character 250 */ - { 8, 4016 }, /* info for character 251 */ - { 8, 4032 }, /* info for character 252 */ - { 8, 4048 }, /* info for character 253 */ - { 8, 4064 }, /* info for character 254 */ - { 8, 4080 } /* info for character 255 */ - } -}; - diff --git a/thirdparty/grx249/src/fonts/pc8x8.c b/thirdparty/grx249/src/fonts/pc8x8.c deleted file mode 100644 index 9356a31..0000000 --- a/thirdparty/grx249/src/fonts/pc8x8.c +++ /dev/null @@ -1,810 +0,0 @@ -/** - ** pc8x8.c ---- GRX 2.0 font converted to C by 'GrDumpFont()' - **/ - -#define GrFont_PC8x8 FONTNAME_TEMPORARY_REDIRECTION -#include "grx20.h" -#undef GrFont_PC8x8 - -static unsigned char far GrFont_PC8x8_bits[] = { - /* character 0 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - /* character 1 */ - 0x7e,0x81,0xa5,0x81,0xbd,0x99,0x81,0x7e, - /* character 2 */ - 0x7e,0xff,0xdb,0xff,0xc3,0xe7,0xff,0x7e, - /* character 3 */ - 0x6c,0xfe,0xfe,0xfe,0x7c,0x38,0x10,0x00, - /* character 4 */ - 0x08,0x1c,0x3e,0x7f,0x3e,0x1c,0x08,0x00, - /* character 5 */ - 0x1c,0x1c,0x1c,0x7f,0x7f,0x6b,0x08,0x1c, - /* character 6 */ - 0x10,0x10,0x38,0x7c,0xfe,0x7c,0x10,0x38, - /* character 7 */ - 0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00, - /* character 8 */ - 0xff,0xff,0xe7,0xc3,0xc3,0xe7,0xff,0xff, - /* character 9 */ - 0x00,0x3c,0x66,0x42,0x42,0x66,0x3c,0x00, - /* character 10 */ - 0xff,0xc3,0x99,0xbd,0xbd,0x99,0xc3,0xff, - /* character 11 */ - 0x0f,0x07,0x0f,0x7d,0xcc,0xcc,0xcc,0x78, - /* character 12 */ - 0x3c,0x66,0x66,0x66,0x3c,0x18,0x7e,0x18, - /* character 13 */ - 0x3f,0x33,0x3f,0x30,0x30,0x70,0xf0,0xe0, - /* character 14 */ - 0x7f,0x63,0x7f,0x63,0x63,0x67,0xe6,0xc0, - /* character 15 */ - 0x18,0xdb,0x3c,0xe7,0xe7,0x3c,0xdb,0x18, - /* character 16 */ - 0x80,0xe0,0xf8,0xfe,0xf8,0xe0,0x80,0x00, - /* character 17 */ - 0x02,0x0e,0x3e,0xfe,0x3e,0x0e,0x02,0x00, - /* character 18 */ - 0x18,0x3c,0x7e,0x18,0x18,0x7e,0x3c,0x18, - /* character 19 */ - 0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x00, - /* character 20 */ - 0x7f,0xdb,0xdb,0x7b,0x1b,0x1b,0x1b,0x00, - /* character 21 */ - 0x3e,0x63,0x38,0x6c,0x6c,0x38,0xcc,0x78, - /* character 22 */ - 0x00,0x00,0x00,0x00,0x7e,0x7e,0x7e,0x00, - /* character 23 */ - 0x18,0x3c,0x7e,0x18,0x7e,0x3c,0x18,0xff, - /* character 24 */ - 0x18,0x3c,0x7e,0x18,0x18,0x18,0x18,0x00, - /* character 25 */ - 0x18,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00, - /* character 26 */ - 0x00,0x18,0x0c,0xfe,0x0c,0x18,0x00,0x00, - /* character 27 */ - 0x00,0x30,0x60,0xfe,0x60,0x30,0x00,0x00, - /* character 28 */ - 0x00,0x00,0xc0,0xc0,0xc0,0xfe,0x00,0x00, - /* character 29 */ - 0x00,0x24,0x66,0xff,0x66,0x24,0x00,0x00, - /* character 30 */ - 0x00,0x18,0x3c,0x7e,0xff,0xff,0x00,0x00, - /* character 31 */ - 0x00,0xff,0xff,0x7e,0x3c,0x18,0x00,0x00, - /* character 32 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - /* character 33 */ - 0x30,0x78,0x78,0x30,0x30,0x00,0x30,0x00, - /* character 34 */ - 0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00,0x00, - /* character 35 */ - 0x6c,0x6c,0xfe,0x6c,0xfe,0x6c,0x6c,0x00, - /* character 36 */ - 0x18,0x3e,0x60,0x3c,0x06,0x7c,0x18,0x00, - /* character 37 */ - 0x00,0x63,0x66,0x0c,0x18,0x33,0x63,0x00, - /* character 38 */ - 0x1c,0x36,0x1c,0x3b,0x6e,0x66,0x3b,0x00, - /* character 39 */ - 0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00, - /* character 40 */ - 0x0c,0x18,0x30,0x30,0x30,0x18,0x0c,0x00, - /* character 41 */ - 0x30,0x18,0x0c,0x0c,0x0c,0x18,0x30,0x00, - /* character 42 */ - 0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00, - /* character 43 */ - 0x00,0x30,0x30,0xfc,0x30,0x30,0x00,0x00, - /* character 44 */ - 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x30, - /* character 45 */ - 0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00, - /* character 46 */ - 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00, - /* character 47 */ - 0x03,0x06,0x0c,0x18,0x30,0x60,0x40,0x00, - /* character 48 */ - 0x3e,0x63,0x67,0x6f,0x7b,0x73,0x3e,0x00, - /* character 49 */ - 0x18,0x38,0x58,0x18,0x18,0x18,0x7e,0x00, - /* character 50 */ - 0x3c,0x66,0x06,0x1c,0x30,0x66,0x7e,0x00, - /* character 51 */ - 0x3c,0x66,0x06,0x1c,0x06,0x66,0x3c,0x00, - /* character 52 */ - 0x0e,0x1e,0x36,0x66,0x7f,0x06,0x0f,0x00, - /* character 53 */ - 0x7e,0x60,0x7c,0x06,0x06,0x66,0x3c,0x00, - /* character 54 */ - 0x1c,0x30,0x60,0x7c,0x66,0x66,0x3c,0x00, - /* character 55 */ - 0x7e,0x66,0x06,0x0c,0x18,0x18,0x18,0x00, - /* character 56 */ - 0x3c,0x66,0x66,0x3c,0x66,0x66,0x3c,0x00, - /* character 57 */ - 0x3c,0x66,0x66,0x3e,0x06,0x0c,0x38,0x00, - /* character 58 */ - 0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00, - /* character 59 */ - 0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x30, - /* character 60 */ - 0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x00, - /* character 61 */ - 0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00, - /* character 62 */ - 0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x00, - /* character 63 */ - 0x3c,0x66,0x06,0x0c,0x18,0x00,0x18,0x00, - /* character 64 */ - 0x3e,0x63,0x6f,0x69,0x6f,0x60,0x3e,0x00, - /* character 65 */ - 0x18,0x3c,0x66,0x66,0x7e,0x66,0x66,0x00, - /* character 66 */ - 0x7e,0x33,0x33,0x3e,0x33,0x33,0x7e,0x00, - /* character 67 */ - 0x1e,0x33,0x60,0x60,0x60,0x33,0x1e,0x00, - /* character 68 */ - 0x7c,0x36,0x33,0x33,0x33,0x36,0x7c,0x00, - /* character 69 */ - 0x7f,0x31,0x34,0x3c,0x34,0x31,0x7f,0x00, - /* character 70 */ - 0x7f,0x31,0x34,0x3c,0x34,0x30,0x78,0x00, - /* character 71 */ - 0x1e,0x33,0x60,0x60,0x67,0x33,0x1f,0x00, - /* character 72 */ - 0x66,0x66,0x66,0x7e,0x66,0x66,0x66,0x00, - /* character 73 */ - 0x3c,0x18,0x18,0x18,0x18,0x18,0x3c,0x00, - /* character 74 */ - 0x0f,0x06,0x06,0x06,0x66,0x66,0x3c,0x00, - /* character 75 */ - 0x73,0x33,0x36,0x3c,0x36,0x33,0x73,0x00, - /* character 76 */ - 0x78,0x30,0x30,0x30,0x31,0x33,0x7f,0x00, - /* character 77 */ - 0x63,0x77,0x7f,0x7f,0x6b,0x63,0x63,0x00, - /* character 78 */ - 0x63,0x73,0x7b,0x6f,0x67,0x63,0x63,0x00, - /* character 79 */ - 0x3e,0x63,0x63,0x63,0x63,0x63,0x3e,0x00, - /* character 80 */ - 0x7e,0x33,0x33,0x3e,0x30,0x30,0x78,0x00, - /* character 81 */ - 0x3c,0x66,0x66,0x66,0x6e,0x3c,0x0e,0x00, - /* character 82 */ - 0x7e,0x33,0x33,0x3e,0x36,0x33,0x73,0x00, - /* character 83 */ - 0x3c,0x66,0x30,0x18,0x0c,0x66,0x3c,0x00, - /* character 84 */ - 0x7e,0x5a,0x18,0x18,0x18,0x18,0x3c,0x00, - /* character 85 */ - 0x66,0x66,0x66,0x66,0x66,0x66,0x7e,0x00, - /* character 86 */ - 0x66,0x66,0x66,0x66,0x66,0x3c,0x18,0x00, - /* character 87 */ - 0x63,0x63,0x63,0x6b,0x7f,0x77,0x63,0x00, - /* character 88 */ - 0x63,0x63,0x36,0x1c,0x1c,0x36,0x63,0x00, - /* character 89 */ - 0x66,0x66,0x66,0x3c,0x18,0x18,0x3c,0x00, - /* character 90 */ - 0x7f,0x63,0x46,0x0c,0x19,0x33,0x7f,0x00, - /* character 91 */ - 0x3c,0x30,0x30,0x30,0x30,0x30,0x3c,0x00, - /* character 92 */ - 0x60,0x30,0x18,0x0c,0x06,0x03,0x01,0x00, - /* character 93 */ - 0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00, - /* character 94 */ - 0x08,0x1c,0x36,0x63,0x00,0x00,0x00,0x00, - /* character 95 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff, - /* character 96 */ - 0x18,0x18,0x0c,0x00,0x00,0x00,0x00,0x00, - /* character 97 */ - 0x00,0x00,0x3c,0x06,0x3e,0x66,0x3b,0x00, - /* character 98 */ - 0x70,0x30,0x30,0x3e,0x33,0x33,0x6e,0x00, - /* character 99 */ - 0x00,0x00,0x3c,0x66,0x60,0x66,0x3c,0x00, - /* character 100 */ - 0x0e,0x06,0x06,0x3e,0x66,0x66,0x3b,0x00, - /* character 101 */ - 0x00,0x00,0x3c,0x66,0x7e,0x60,0x3c,0x00, - /* character 102 */ - 0x1c,0x36,0x30,0x78,0x30,0x30,0x78,0x00, - /* character 103 */ - 0x00,0x00,0x3b,0x66,0x66,0x3e,0x06,0x7c, - /* character 104 */ - 0x70,0x30,0x36,0x3b,0x33,0x33,0x73,0x00, - /* character 105 */ - 0x18,0x00,0x38,0x18,0x18,0x18,0x3c,0x00, - /* character 106 */ - 0x06,0x00,0x06,0x06,0x06,0x66,0x66,0x3c, - /* character 107 */ - 0x70,0x30,0x33,0x36,0x3c,0x36,0x73,0x00, - /* character 108 */ - 0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00, - /* character 109 */ - 0x00,0x00,0x66,0x7f,0x7f,0x6b,0x63,0x00, - /* character 110 */ - 0x00,0x00,0x7c,0x66,0x66,0x66,0x66,0x00, - /* character 111 */ - 0x00,0x00,0x3c,0x66,0x66,0x66,0x3c,0x00, - /* character 112 */ - 0x00,0x00,0x6e,0x33,0x33,0x3e,0x30,0x78, - /* character 113 */ - 0x00,0x00,0x3b,0x66,0x66,0x3e,0x06,0x0f, - /* character 114 */ - 0x00,0x00,0x6e,0x3b,0x33,0x30,0x78,0x00, - /* character 115 */ - 0x00,0x00,0x3e,0x60,0x3c,0x06,0x7c,0x00, - /* character 116 */ - 0x08,0x18,0x3e,0x18,0x18,0x1a,0x0c,0x00, - /* character 117 */ - 0x00,0x00,0x66,0x66,0x66,0x66,0x3b,0x00, - /* character 118 */ - 0x00,0x00,0x66,0x66,0x66,0x3c,0x18,0x00, - /* character 119 */ - 0x00,0x00,0x63,0x6b,0x7f,0x7f,0x36,0x00, - /* character 120 */ - 0x00,0x00,0x63,0x36,0x1c,0x36,0x63,0x00, - /* character 121 */ - 0x00,0x00,0x66,0x66,0x66,0x3e,0x06,0x7c, - /* character 122 */ - 0x00,0x00,0x7e,0x4c,0x18,0x32,0x7e,0x00, - /* character 123 */ - 0x0e,0x18,0x18,0x70,0x18,0x18,0x0e,0x00, - /* character 124 */ - 0x0c,0x0c,0x0c,0x00,0x0c,0x0c,0x0c,0x00, - /* character 125 */ - 0x70,0x18,0x18,0x0e,0x18,0x18,0x70,0x00, - /* character 126 */ - 0x3b,0x6e,0x00,0x00,0x00,0x00,0x00,0x00, - /* character 127 */ - 0x00,0x08,0x1c,0x36,0x63,0x63,0x7f,0x00, - /* character 128 */ - 0x3c,0x66,0x60,0x66,0x3c,0x0c,0x06,0x3c, - /* character 129 */ - 0x00,0x66,0x00,0x66,0x66,0x66,0x3f,0x00, - /* character 130 */ - 0x1c,0x00,0x78,0xcc,0xfc,0xc0,0x78,0x00, - /* character 131 */ - 0x7e,0xc3,0x3c,0x06,0x3e,0x66,0x3f,0x00, - /* character 132 */ - 0x66,0x00,0x3c,0x06,0x3e,0x66,0x3f,0x00, - /* character 133 */ - 0x70,0x00,0x3c,0x06,0x3e,0x66,0x3f,0x00, - /* character 134 */ - 0x18,0x18,0x3c,0x06,0x3e,0x66,0x3f,0x00, - /* character 135 */ - 0x00,0x00,0x3c,0x60,0x60,0x3c,0x06,0x1c, - /* character 136 */ - 0x7e,0xc3,0x3c,0x66,0x7e,0x60,0x3c,0x00, - /* character 137 */ - 0xcc,0x00,0x78,0xcc,0xfc,0xc0,0x78,0x00, - /* character 138 */ - 0x70,0x00,0x3c,0x66,0x7e,0x60,0x3c,0x00, - /* character 139 */ - 0x66,0x00,0x38,0x18,0x18,0x18,0x3c,0x00, - /* character 140 */ - 0x3e,0x63,0x1c,0x0c,0x0c,0x0c,0x1e,0x00, - /* character 141 */ - 0x70,0x00,0x38,0x18,0x18,0x18,0x3c,0x00, - /* character 142 */ - 0x63,0x1c,0x36,0x63,0x7f,0x63,0x63,0x00, - /* character 143 */ - 0x18,0x18,0x00,0x3c,0x66,0x7e,0x66,0x00, - /* character 144 */ - 0x1c,0x00,0xfc,0x60,0x78,0x60,0xfc,0x00, - /* character 145 */ - 0x00,0x00,0x7f,0x0c,0x7f,0xcc,0x7f,0x00, - /* character 146 */ - 0x1f,0x36,0x66,0x7f,0x66,0x66,0x67,0x00, - /* character 147 */ - 0x3c,0x66,0x00,0x3c,0x66,0x66,0x3c,0x00, - /* character 148 */ - 0x00,0x66,0x00,0x3c,0x66,0x66,0x3c,0x00, - /* character 149 */ - 0x00,0x70,0x00,0x3c,0x66,0x66,0x3c,0x00, - /* character 150 */ - 0x3c,0x66,0x00,0x66,0x66,0x66,0x3f,0x00, - /* character 151 */ - 0x00,0x70,0x00,0x66,0x66,0x66,0x3f,0x00, - /* character 152 */ - 0x00,0xcc,0x00,0xcc,0xcc,0x7c,0x0c,0xf8, - /* character 153 */ - 0xc3,0x18,0x3c,0x66,0x66,0x3c,0x18,0x00, - /* character 154 */ - 0x66,0x00,0x66,0x66,0x66,0x66,0x3c,0x00, - /* character 155 */ - 0x0c,0x0c,0x3f,0x60,0x60,0x3f,0x0c,0x0c, - /* character 156 */ - 0x1c,0x36,0x32,0x78,0x30,0x73,0x7e,0x00, - /* character 157 */ - 0x66,0x66,0x3c,0x7e,0x18,0x7e,0x18,0x18, - /* character 158 */ - 0xf8,0xcc,0xcc,0xfa,0xc6,0xcf,0xc6,0xc7, - /* character 159 */ - 0x0e,0x1b,0x18,0x3c,0x18,0x18,0xd8,0x70, - /* character 160 */ - 0x0e,0x00,0x3c,0x06,0x3e,0x66,0x3f,0x00, - /* character 161 */ - 0x1c,0x00,0x38,0x18,0x18,0x18,0x3c,0x00, - /* character 162 */ - 0x00,0x0e,0x00,0x3c,0x66,0x66,0x3c,0x00, - /* character 163 */ - 0x00,0x0e,0x00,0x66,0x66,0x66,0x3f,0x00, - /* character 164 */ - 0x00,0x7c,0x00,0x7c,0x66,0x66,0x66,0x00, - /* character 165 */ - 0x7e,0x00,0x66,0x76,0x7e,0x6e,0x66,0x00, - /* character 166 */ - 0x1e,0x36,0x36,0x1f,0x00,0x3f,0x00,0x00, - /* character 167 */ - 0x1c,0x36,0x36,0x1c,0x00,0x3e,0x00,0x00, - /* character 168 */ - 0x18,0x00,0x18,0x30,0x60,0x66,0x3c,0x00, - /* character 169 */ - 0x00,0x00,0x00,0x7e,0x60,0x60,0x00,0x00, - /* character 170 */ - 0x00,0x00,0x00,0xfc,0x0c,0x0c,0x00,0x00, - /* character 171 */ - 0xc3,0xc6,0xcc,0xde,0x33,0x66,0xcc,0x0f, - /* character 172 */ - 0xc3,0xc6,0xcc,0xdb,0x37,0x6f,0xcf,0x03, - /* character 173 */ - 0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00, - /* character 174 */ - 0x00,0x33,0x66,0xcc,0x66,0x33,0x00,0x00, - /* character 175 */ - 0x00,0xcc,0x66,0x33,0x66,0xcc,0x00,0x00, - /* character 176 */ - 0x22,0x88,0x22,0x88,0x22,0x88,0x22,0x88, - /* character 177 */ - 0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, - /* character 178 */ - 0xdb,0x77,0xdb,0xee,0xdb,0x77,0xdb,0xee, - /* character 179 */ - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - /* character 180 */ - 0x18,0x18,0x18,0x18,0xf8,0x18,0x18,0x18, - /* character 181 */ - 0x18,0x18,0xf8,0x18,0xf8,0x18,0x18,0x18, - /* character 182 */ - 0x36,0x36,0x36,0x36,0xf6,0x36,0x36,0x36, - /* character 183 */ - 0x00,0x00,0x00,0x00,0xfe,0x36,0x36,0x36, - /* character 184 */ - 0x00,0x00,0xf8,0x18,0xf8,0x18,0x18,0x18, - /* character 185 */ - 0x36,0x36,0xf6,0x06,0xf6,0x36,0x36,0x36, - /* character 186 */ - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - /* character 187 */ - 0x00,0x00,0xfe,0x06,0xf6,0x36,0x36,0x36, - /* character 188 */ - 0x36,0x36,0xf6,0x06,0xfe,0x00,0x00,0x00, - /* character 189 */ - 0x36,0x36,0x36,0x36,0xfe,0x00,0x00,0x00, - /* character 190 */ - 0x18,0x18,0xf8,0x18,0xf8,0x00,0x00,0x00, - /* character 191 */ - 0x00,0x00,0x00,0x00,0xf8,0x18,0x18,0x18, - /* character 192 */ - 0x18,0x18,0x18,0x18,0x1f,0x00,0x00,0x00, - /* character 193 */ - 0x18,0x18,0x18,0x18,0xff,0x00,0x00,0x00, - /* character 194 */ - 0x00,0x00,0x00,0x00,0xff,0x18,0x18,0x18, - /* character 195 */ - 0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18, - /* character 196 */ - 0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00, - /* character 197 */ - 0x18,0x18,0x18,0x18,0xff,0x18,0x18,0x18, - /* character 198 */ - 0x18,0x18,0x1f,0x18,0x1f,0x18,0x18,0x18, - /* character 199 */ - 0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36, - /* character 200 */ - 0x36,0x36,0x37,0x30,0x3f,0x00,0x00,0x00, - /* character 201 */ - 0x00,0x00,0x3f,0x30,0x37,0x36,0x36,0x36, - /* character 202 */ - 0x36,0x36,0xf7,0x00,0xff,0x00,0x00,0x00, - /* character 203 */ - 0x00,0x00,0xff,0x00,0xf7,0x36,0x36,0x36, - /* character 204 */ - 0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36, - /* character 205 */ - 0x00,0x00,0xff,0x00,0xff,0x00,0x00,0x00, - /* character 206 */ - 0x36,0x36,0xf7,0x00,0xf7,0x36,0x36,0x36, - /* character 207 */ - 0x18,0x18,0xff,0x00,0xff,0x00,0x00,0x00, - /* character 208 */ - 0x36,0x36,0x36,0x36,0xff,0x00,0x00,0x00, - /* character 209 */ - 0x00,0x00,0xff,0x00,0xff,0x18,0x18,0x18, - /* character 210 */ - 0x00,0x00,0x00,0x00,0xff,0x36,0x36,0x36, - /* character 211 */ - 0x36,0x36,0x36,0x36,0x3f,0x00,0x00,0x00, - /* character 212 */ - 0x18,0x18,0x1f,0x18,0x1f,0x00,0x00,0x00, - /* character 213 */ - 0x00,0x00,0x1f,0x18,0x1f,0x18,0x18,0x18, - /* character 214 */ - 0x00,0x00,0x00,0x00,0x3f,0x36,0x36,0x36, - /* character 215 */ - 0x36,0x36,0x36,0x36,0xff,0x36,0x36,0x36, - /* character 216 */ - 0x18,0x18,0xff,0x18,0xff,0x18,0x18,0x18, - /* character 217 */ - 0x18,0x18,0x18,0x18,0xf8,0x00,0x00,0x00, - /* character 218 */ - 0x00,0x00,0x00,0x00,0x1f,0x18,0x18,0x18, - /* character 219 */ - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - /* character 220 */ - 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff, - /* character 221 */ - 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, - /* character 222 */ - 0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f, - /* character 223 */ - 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, - /* character 224 */ - 0x00,0x00,0x3b,0x6e,0x64,0x6e,0x3b,0x00, - /* character 225 */ - 0x00,0x3c,0x66,0x7c,0x66,0x7c,0x60,0x60, - /* character 226 */ - 0x00,0x7e,0x66,0x60,0x60,0x60,0x60,0x00, - /* character 227 */ - 0x00,0x7f,0x36,0x36,0x36,0x36,0x36,0x00, - /* character 228 */ - 0x7e,0x66,0x30,0x18,0x30,0x66,0x7e,0x00, - /* character 229 */ - 0x00,0x00,0x3f,0x6c,0x6c,0x6c,0x38,0x00, - /* character 230 */ - 0x00,0x33,0x33,0x33,0x33,0x3e,0x30,0x60, - /* character 231 */ - 0x00,0x3b,0x6e,0x0c,0x0c,0x0c,0x0c,0x00, - /* character 232 */ - 0x7e,0x18,0x3c,0x66,0x66,0x3c,0x18,0x7e, - /* character 233 */ - 0x1c,0x36,0x63,0x7f,0x63,0x36,0x1c,0x00, - /* character 234 */ - 0x1c,0x36,0x63,0x63,0x36,0x36,0x77,0x00, - /* character 235 */ - 0x0e,0x18,0x0c,0x3e,0x66,0x66,0x3c,0x00, - /* character 236 */ - 0x00,0x00,0x7e,0xdb,0xdb,0x7e,0x00,0x00, - /* character 237 */ - 0x06,0x0c,0x7e,0xdb,0xdb,0x7e,0x60,0xc0, - /* character 238 */ - 0x1c,0x30,0x60,0x7c,0x60,0x30,0x1c,0x00, - /* character 239 */ - 0x3c,0x66,0x66,0x66,0x66,0x66,0x66,0x00, - /* character 240 */ - 0x00,0x7e,0x00,0x7e,0x00,0x7e,0x00,0x00, - /* character 241 */ - 0x18,0x18,0x7e,0x18,0x18,0x00,0x7e,0x00, - /* character 242 */ - 0x30,0x18,0x0c,0x18,0x30,0x00,0x7e,0x00, - /* character 243 */ - 0x0c,0x18,0x30,0x18,0x0c,0x00,0x7e,0x00, - /* character 244 */ - 0x0e,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18, - /* character 245 */ - 0x18,0x18,0x18,0x18,0x18,0xd8,0xd8,0x70, - /* character 246 */ - 0x18,0x18,0x00,0x7e,0x00,0x18,0x18,0x00, - /* character 247 */ - 0x00,0x3b,0x6e,0x00,0x3b,0x6e,0x00,0x00, - /* character 248 */ - 0x1c,0x36,0x36,0x1c,0x00,0x00,0x00,0x00, - /* character 249 */ - 0x00,0x00,0x00,0x0c,0x0c,0x00,0x00,0x00, - /* character 250 */ - 0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00, - /* character 251 */ - 0x0f,0x0c,0x0c,0x0c,0xec,0x6c,0x3c,0x1c, - /* character 252 */ - 0x78,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00, - /* character 253 */ - 0x70,0x18,0x30,0x60,0x78,0x00,0x00,0x00, - /* character 254 */ - 0x00,0x00,0x3c,0x3c,0x3c,0x3c,0x00,0x00, - /* character 255 */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -struct { - GrFont theFont; - GrFontChrInfo rest[255]; -} GrFont_PC8x8 = { - { - { /* font header */ - "pc8x8", /* font name */ - "pc", /* font family name */ - 0, /* characters have varying width */ - 0, /* derived from a scalable font */ - 1, /* font permanently linked into program */ - GR_FONTCVT_NONE, /* 'tweaked' font (resized, etc..) */ - 8, /* width (average when proportional) */ - 8, /* font height */ - 6, /* baseline pixel pos (from top) */ - 7, /* underline pixel pos (from top) */ - 1, /* underline width */ - 0, /* lowest character code in font */ - 256 /* number of characters in font */ - }, - (char*)GrFont_PC8x8_bits, /* character bitmap array */ - 0, /* auxiliary bitmap */ - 8, /* width of narrowest character */ - 8, /* width of widest character */ - 0, /* allocated size of auxiliary bitmap */ - 0, /* free space in auxiliary bitmap */ - { 0 }, /* converted character bitmap offsets */ - {{ 8, 0 }} /* first character info */ - }, - { - { 8, 8 }, /* info for character 1 */ - { 8, 16 }, /* info for character 2 */ - { 8, 24 }, /* info for character 3 */ - { 8, 32 }, /* info for character 4 */ - { 8, 40 }, /* info for character 5 */ - { 8, 48 }, /* info for character 6 */ - { 8, 56 }, /* info for character 7 */ - { 8, 64 }, /* info for character 8 */ - { 8, 72 }, /* info for character 9 */ - { 8, 80 }, /* info for character 10 */ - { 8, 88 }, /* info for character 11 */ - { 8, 96 }, /* info for character 12 */ - { 8, 104 }, /* info for character 13 */ - { 8, 112 }, /* info for character 14 */ - { 8, 120 }, /* info for character 15 */ - { 8, 128 }, /* info for character 16 */ - { 8, 136 }, /* info for character 17 */ - { 8, 144 }, /* info for character 18 */ - { 8, 152 }, /* info for character 19 */ - { 8, 160 }, /* info for character 20 */ - { 8, 168 }, /* info for character 21 */ - { 8, 176 }, /* info for character 22 */ - { 8, 184 }, /* info for character 23 */ - { 8, 192 }, /* info for character 24 */ - { 8, 200 }, /* info for character 25 */ - { 8, 208 }, /* info for character 26 */ - { 8, 216 }, /* info for character 27 */ - { 8, 224 }, /* info for character 28 */ - { 8, 232 }, /* info for character 29 */ - { 8, 240 }, /* info for character 30 */ - { 8, 248 }, /* info for character 31 */ - { 8, 256 }, /* info for character 32 */ - { 8, 264 }, /* info for character 33 */ - { 8, 272 }, /* info for character 34 */ - { 8, 280 }, /* info for character 35 */ - { 8, 288 }, /* info for character 36 */ - { 8, 296 }, /* info for character 37 */ - { 8, 304 }, /* info for character 38 */ - { 8, 312 }, /* info for character 39 */ - { 8, 320 }, /* info for character 40 */ - { 8, 328 }, /* info for character 41 */ - { 8, 336 }, /* info for character 42 */ - { 8, 344 }, /* info for character 43 */ - { 8, 352 }, /* info for character 44 */ - { 8, 360 }, /* info for character 45 */ - { 8, 368 }, /* info for character 46 */ - { 8, 376 }, /* info for character 47 */ - { 8, 384 }, /* info for character 48 */ - { 8, 392 }, /* info for character 49 */ - { 8, 400 }, /* info for character 50 */ - { 8, 408 }, /* info for character 51 */ - { 8, 416 }, /* info for character 52 */ - { 8, 424 }, /* info for character 53 */ - { 8, 432 }, /* info for character 54 */ - { 8, 440 }, /* info for character 55 */ - { 8, 448 }, /* info for character 56 */ - { 8, 456 }, /* info for character 57 */ - { 8, 464 }, /* info for character 58 */ - { 8, 472 }, /* info for character 59 */ - { 8, 480 }, /* info for character 60 */ - { 8, 488 }, /* info for character 61 */ - { 8, 496 }, /* info for character 62 */ - { 8, 504 }, /* info for character 63 */ - { 8, 512 }, /* info for character 64 */ - { 8, 520 }, /* info for character 65 */ - { 8, 528 }, /* info for character 66 */ - { 8, 536 }, /* info for character 67 */ - { 8, 544 }, /* info for character 68 */ - { 8, 552 }, /* info for character 69 */ - { 8, 560 }, /* info for character 70 */ - { 8, 568 }, /* info for character 71 */ - { 8, 576 }, /* info for character 72 */ - { 8, 584 }, /* info for character 73 */ - { 8, 592 }, /* info for character 74 */ - { 8, 600 }, /* info for character 75 */ - { 8, 608 }, /* info for character 76 */ - { 8, 616 }, /* info for character 77 */ - { 8, 624 }, /* info for character 78 */ - { 8, 632 }, /* info for character 79 */ - { 8, 640 }, /* info for character 80 */ - { 8, 648 }, /* info for character 81 */ - { 8, 656 }, /* info for character 82 */ - { 8, 664 }, /* info for character 83 */ - { 8, 672 }, /* info for character 84 */ - { 8, 680 }, /* info for character 85 */ - { 8, 688 }, /* info for character 86 */ - { 8, 696 }, /* info for character 87 */ - { 8, 704 }, /* info for character 88 */ - { 8, 712 }, /* info for character 89 */ - { 8, 720 }, /* info for character 90 */ - { 8, 728 }, /* info for character 91 */ - { 8, 736 }, /* info for character 92 */ - { 8, 744 }, /* info for character 93 */ - { 8, 752 }, /* info for character 94 */ - { 8, 760 }, /* info for character 95 */ - { 8, 768 }, /* info for character 96 */ - { 8, 776 }, /* info for character 97 */ - { 8, 784 }, /* info for character 98 */ - { 8, 792 }, /* info for character 99 */ - { 8, 800 }, /* info for character 100 */ - { 8, 808 }, /* info for character 101 */ - { 8, 816 }, /* info for character 102 */ - { 8, 824 }, /* info for character 103 */ - { 8, 832 }, /* info for character 104 */ - { 8, 840 }, /* info for character 105 */ - { 8, 848 }, /* info for character 106 */ - { 8, 856 }, /* info for character 107 */ - { 8, 864 }, /* info for character 108 */ - { 8, 872 }, /* info for character 109 */ - { 8, 880 }, /* info for character 110 */ - { 8, 888 }, /* info for character 111 */ - { 8, 896 }, /* info for character 112 */ - { 8, 904 }, /* info for character 113 */ - { 8, 912 }, /* info for character 114 */ - { 8, 920 }, /* info for character 115 */ - { 8, 928 }, /* info for character 116 */ - { 8, 936 }, /* info for character 117 */ - { 8, 944 }, /* info for character 118 */ - { 8, 952 }, /* info for character 119 */ - { 8, 960 }, /* info for character 120 */ - { 8, 968 }, /* info for character 121 */ - { 8, 976 }, /* info for character 122 */ - { 8, 984 }, /* info for character 123 */ - { 8, 992 }, /* info for character 124 */ - { 8, 1000 }, /* info for character 125 */ - { 8, 1008 }, /* info for character 126 */ - { 8, 1016 }, /* info for character 127 */ - { 8, 1024 }, /* info for character 128 */ - { 8, 1032 }, /* info for character 129 */ - { 8, 1040 }, /* info for character 130 */ - { 8, 1048 }, /* info for character 131 */ - { 8, 1056 }, /* info for character 132 */ - { 8, 1064 }, /* info for character 133 */ - { 8, 1072 }, /* info for character 134 */ - { 8, 1080 }, /* info for character 135 */ - { 8, 1088 }, /* info for character 136 */ - { 8, 1096 }, /* info for character 137 */ - { 8, 1104 }, /* info for character 138 */ - { 8, 1112 }, /* info for character 139 */ - { 8, 1120 }, /* info for character 140 */ - { 8, 1128 }, /* info for character 141 */ - { 8, 1136 }, /* info for character 142 */ - { 8, 1144 }, /* info for character 143 */ - { 8, 1152 }, /* info for character 144 */ - { 8, 1160 }, /* info for character 145 */ - { 8, 1168 }, /* info for character 146 */ - { 8, 1176 }, /* info for character 147 */ - { 8, 1184 }, /* info for character 148 */ - { 8, 1192 }, /* info for character 149 */ - { 8, 1200 }, /* info for character 150 */ - { 8, 1208 }, /* info for character 151 */ - { 8, 1216 }, /* info for character 152 */ - { 8, 1224 }, /* info for character 153 */ - { 8, 1232 }, /* info for character 154 */ - { 8, 1240 }, /* info for character 155 */ - { 8, 1248 }, /* info for character 156 */ - { 8, 1256 }, /* info for character 157 */ - { 8, 1264 }, /* info for character 158 */ - { 8, 1272 }, /* info for character 159 */ - { 8, 1280 }, /* info for character 160 */ - { 8, 1288 }, /* info for character 161 */ - { 8, 1296 }, /* info for character 162 */ - { 8, 1304 }, /* info for character 163 */ - { 8, 1312 }, /* info for character 164 */ - { 8, 1320 }, /* info for character 165 */ - { 8, 1328 }, /* info for character 166 */ - { 8, 1336 }, /* info for character 167 */ - { 8, 1344 }, /* info for character 168 */ - { 8, 1352 }, /* info for character 169 */ - { 8, 1360 }, /* info for character 170 */ - { 8, 1368 }, /* info for character 171 */ - { 8, 1376 }, /* info for character 172 */ - { 8, 1384 }, /* info for character 173 */ - { 8, 1392 }, /* info for character 174 */ - { 8, 1400 }, /* info for character 175 */ - { 8, 1408 }, /* info for character 176 */ - { 8, 1416 }, /* info for character 177 */ - { 8, 1424 }, /* info for character 178 */ - { 8, 1432 }, /* info for character 179 */ - { 8, 1440 }, /* info for character 180 */ - { 8, 1448 }, /* info for character 181 */ - { 8, 1456 }, /* info for character 182 */ - { 8, 1464 }, /* info for character 183 */ - { 8, 1472 }, /* info for character 184 */ - { 8, 1480 }, /* info for character 185 */ - { 8, 1488 }, /* info for character 186 */ - { 8, 1496 }, /* info for character 187 */ - { 8, 1504 }, /* info for character 188 */ - { 8, 1512 }, /* info for character 189 */ - { 8, 1520 }, /* info for character 190 */ - { 8, 1528 }, /* info for character 191 */ - { 8, 1536 }, /* info for character 192 */ - { 8, 1544 }, /* info for character 193 */ - { 8, 1552 }, /* info for character 194 */ - { 8, 1560 }, /* info for character 195 */ - { 8, 1568 }, /* info for character 196 */ - { 8, 1576 }, /* info for character 197 */ - { 8, 1584 }, /* info for character 198 */ - { 8, 1592 }, /* info for character 199 */ - { 8, 1600 }, /* info for character 200 */ - { 8, 1608 }, /* info for character 201 */ - { 8, 1616 }, /* info for character 202 */ - { 8, 1624 }, /* info for character 203 */ - { 8, 1632 }, /* info for character 204 */ - { 8, 1640 }, /* info for character 205 */ - { 8, 1648 }, /* info for character 206 */ - { 8, 1656 }, /* info for character 207 */ - { 8, 1664 }, /* info for character 208 */ - { 8, 1672 }, /* info for character 209 */ - { 8, 1680 }, /* info for character 210 */ - { 8, 1688 }, /* info for character 211 */ - { 8, 1696 }, /* info for character 212 */ - { 8, 1704 }, /* info for character 213 */ - { 8, 1712 }, /* info for character 214 */ - { 8, 1720 }, /* info for character 215 */ - { 8, 1728 }, /* info for character 216 */ - { 8, 1736 }, /* info for character 217 */ - { 8, 1744 }, /* info for character 218 */ - { 8, 1752 }, /* info for character 219 */ - { 8, 1760 }, /* info for character 220 */ - { 8, 1768 }, /* info for character 221 */ - { 8, 1776 }, /* info for character 222 */ - { 8, 1784 }, /* info for character 223 */ - { 8, 1792 }, /* info for character 224 */ - { 8, 1800 }, /* info for character 225 */ - { 8, 1808 }, /* info for character 226 */ - { 8, 1816 }, /* info for character 227 */ - { 8, 1824 }, /* info for character 228 */ - { 8, 1832 }, /* info for character 229 */ - { 8, 1840 }, /* info for character 230 */ - { 8, 1848 }, /* info for character 231 */ - { 8, 1856 }, /* info for character 232 */ - { 8, 1864 }, /* info for character 233 */ - { 8, 1872 }, /* info for character 234 */ - { 8, 1880 }, /* info for character 235 */ - { 8, 1888 }, /* info for character 236 */ - { 8, 1896 }, /* info for character 237 */ - { 8, 1904 }, /* info for character 238 */ - { 8, 1912 }, /* info for character 239 */ - { 8, 1920 }, /* info for character 240 */ - { 8, 1928 }, /* info for character 241 */ - { 8, 1936 }, /* info for character 242 */ - { 8, 1944 }, /* info for character 243 */ - { 8, 1952 }, /* info for character 244 */ - { 8, 1960 }, /* info for character 245 */ - { 8, 1968 }, /* info for character 246 */ - { 8, 1976 }, /* info for character 247 */ - { 8, 1984 }, /* info for character 248 */ - { 8, 1992 }, /* info for character 249 */ - { 8, 2000 }, /* info for character 250 */ - { 8, 2008 }, /* info for character 251 */ - { 8, 2016 }, /* info for character 252 */ - { 8, 2024 }, /* info for character 253 */ - { 8, 2032 }, /* info for character 254 */ - { 8, 2040 } /* info for character 255 */ - } -}; diff --git a/thirdparty/grx249/src/gformats/ctx2jpg.c b/thirdparty/grx249/src/gformats/ctx2jpg.c deleted file mode 100644 index c33d224..0000000 --- a/thirdparty/grx249/src/gformats/ctx2jpg.c +++ /dev/null @@ -1,183 +0,0 @@ -/** - ** ctx2jpg.c ---- saves a context to a JPEG file - ** - ** Copyright (C) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include -#include -#include "grx20.h" - -static int writejpeg( FILE *f, GrContext *grc, int quality, int grayscale ); - -/* -** GrSaveContextToJpeg - Dump a context in a JPEG file -** -** This routine works both in RGB and palette modes -** -** Arguments: -** grc: Context to be saved (NULL -> use current context) -** jpegfn: Name of jpeg file -** quality: quality scaling (1 to 100) the normal value is 75 -** -** Returns 0 on success -** -1 on error -*/ - -int GrSaveContextToJpeg( GrContext *grc, char *jpegfn, int quality ) -{ - GrContext grcaux; - FILE *f; - int r; - - f = fopen( jpegfn,"wb" ); - if( f == NULL ) return -1; - - GrSaveContext( &grcaux ); - if( grc != NULL ) GrSetContext( grc ); - r = writejpeg( f,grc,quality,0 ); - GrSetContext( &grcaux ); - - fclose( f ); - - return r; -} - -/* -** GrSaveContextToGrayJpeg - Dump a context in a Gray JPEG file -** -** This routine works both in RGB and palette modes -** -** Arguments: -** grc: Context to be saved (NULL -> use current context) -** jpegfn: Name of jpeg file -** quality: quality scaling (1 to 100) the normal value is 75 -** -** Returns 0 on success -** -1 on error -*/ - -int GrSaveContextToGrayJpeg( GrContext *grc, char *jpegfn, int quality ) -{ - GrContext grcaux; - FILE *f; - int r; - - f = fopen( jpegfn,"wb" ); - if( f == NULL ) return -1; - - GrSaveContext( &grcaux ); - if( grc != NULL ) GrSetContext( grc ); - r = writejpeg( f,grc,quality,1 ); - GrSetContext( &grcaux ); - - fclose( f ); - - return r; -} - -/**/ -/**/ - -struct my_error_mgr{ - struct jpeg_error_mgr pub; - jmp_buf setjmp_buffer; - }; - -typedef struct my_error_mgr *my_error_ptr; - -/**/ - -METHODDEF(void) my_error_exit( j_common_ptr cinfo ) -{ - my_error_ptr myerr = (my_error_ptr) cinfo->err; - - /*(*cinfo->err_>output_message)( cinfo );*/ - - longjmp( myerr->setjmp_buffer,1 ); -} - -/**/ - -static int writejpeg( FILE *f, GrContext *grc, int quality, int grayscale ) -{ - struct jpeg_compress_struct cinfo; - struct my_error_mgr jerr; - JSAMPROW row_pointer[1]; - static unsigned char *buffer = NULL; - unsigned char *pix_ptr; - const GrColor *pColors; - int row_stride; - int x, y, r, g, b; - - cinfo.err = jpeg_std_error( &jerr.pub ); - jerr.pub.error_exit = my_error_exit; - if( setjmp( jerr.setjmp_buffer ) ) { - if( buffer ) free( buffer ); - jpeg_destroy_compress( &cinfo ); - return -1; - } - - jpeg_create_compress( &cinfo ); - jpeg_stdio_dest( &cinfo,f ); - - cinfo.image_width = GrSizeX(); - cinfo.image_height = GrSizeY(); - if( grayscale ){ - cinfo.input_components = 1; - cinfo.in_color_space = JCS_GRAYSCALE; - } - else{ - cinfo.input_components = 3; - cinfo.in_color_space = JCS_RGB; - } - - jpeg_set_defaults( &cinfo ); - jpeg_set_quality( &cinfo,quality,TRUE ); - - jpeg_start_compress( &cinfo, TRUE ); - - row_stride = cinfo.image_width * 3; - buffer = malloc( row_stride ); - if( buffer == NULL ) longjmp( jerr.setjmp_buffer,1 ); - row_pointer[0] = buffer; - - for( y=0; y -#include -#include -#include "grx20.h" - -#ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) -#endif - -static int writepng( FILE *f, GrContext *grc ); - -/* -** GrSaveContextToPng - Dump a context in a PNG file -** -** This routine works both in RGB and palette modes -** -** Arguments: -** grc: Context to be saved (NULL -> use current context) -** pngfn: Name of png file -** -** Returns 0 on success -** -1 on error -*/ - -int GrSaveContextToPng( GrContext *grc, char *pngfn ) -{ - GrContext grcaux; - FILE *f; - int r; - - f = fopen( pngfn,"wb" ); - if( f == NULL ) return -1; - - GrSaveContext( &grcaux ); - if( grc != NULL ) GrSetContext( grc ); - r = writepng( f,grc ); - GrSetContext( &grcaux ); - - fclose( f ); - - return r; -} - -/**/ - -static int writepng( FILE *f, GrContext *grc ) -{ - png_structp png_ptr; - png_infop info_ptr; - png_uint_32 height; - png_uint_32 width; - png_byte *png_pixels = NULL; - png_byte **row_pointers = NULL; - png_byte *pix_ptr = NULL; - int x, y, r, g, b; - GrColor *pColors = NULL; - - /* Create and initialize the png_struct */ - png_ptr = png_create_write_struct( PNG_LIBPNG_VER_STRING,NULL,NULL,NULL ); - if( png_ptr == NULL ) - return -1; - - /* Allocate/initialize the image information data */ - info_ptr = png_create_info_struct( png_ptr ); - if( info_ptr == NULL ){ - png_destroy_write_struct( &png_ptr,(png_infopp)NULL ); - return -1; - } - - /* Set error handling */ - if( setjmp( png_jmpbuf(png_ptr) ) ){ - /* If we get here, we had a problem reading the file */ - png_destroy_write_struct( &png_ptr,&info_ptr ); - return -1; - } - - /* set up the output control we are using standard C streams */ - png_init_io( png_ptr,f ); - - /* Set the image information */ - width = GrSizeX(); - height = GrSizeY(); - png_set_IHDR( png_ptr,info_ptr,width,height,8,PNG_COLOR_TYPE_RGB, - PNG_INTERLACE_NONE,PNG_COMPRESSION_TYPE_BASE, - PNG_FILTER_TYPE_BASE ); - - /* No gamma correction by now */ - /* png_set_gAMA(png_ptr, info_ptr, gamma); */ - - /* No comments by now */ - /* text_ptr[0].key = "Title"; - text_ptr[0].text = "Mona Lisa"; - text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr[1].key = "Author"; - text_ptr[1].text = "Leonardo DaVinci"; - text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr[2].key = "Description"; - text_ptr[2].text = ""; - text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt; - png_set_text(png_ptr, info_ptr, text_ptr, 3); */ - - /* Write the file header information */ - png_write_info( png_ptr,info_ptr ); - - png_pixels = (png_byte *) malloc( width * 3 * sizeof(png_byte) ); - if( png_pixels == NULL ){ - png_destroy_write_struct( &png_ptr,&info_ptr ); - return -1; - } - - row_pointers = (png_byte **) malloc( 1 * sizeof(png_bytep) ); - if( row_pointers == NULL ){ - png_destroy_write_struct( &png_ptr,&info_ptr ); - free( png_pixels ); - return -1; - } - - pColors = malloc( width * sizeof(GrColor) ); - if( pColors == NULL ){ - png_destroy_write_struct( &png_ptr,&info_ptr ); - free( row_pointers ); - free( png_pixels ); - return -1; - } - - row_pointers[0] = png_pixels; - - for( y=0; y -#include -#include -#include "grx20.h" - -/* -** GrSaveContextToPbm - Dump a context in a PBM file (bitmap) -** -** This routine works both in RGB and palette modes -** If the pixel color isn't Black it asumes White -** -** Arguments: -** ctx: Context to be saved (NULL -> use current context) -** pbmfn: Name of pbm file -** docn: string saved like a comment in the pbm file (can be NULL) -** -** Returns 0 on success -** -1 on error -*/ - -int GrSaveContextToPbm( GrContext *grc, char *pbmfn, char *docn ) -{ - FILE *f; - GrContext grcaux; - char cab[81]; - int currentbyte = 0, currentbit = 7; - int x, y; - - if( (f = fopen( pbmfn,"wb" )) == NULL ) return -1; - - GrSaveContext( &grcaux ); - if( grc != NULL ) GrSetContext( grc ); - sprintf( cab,"P4\n#" ); - fwrite( cab,1,strlen( cab ),f ); - if( docn != NULL ) fwrite( docn,1,strlen( docn ), f ); - sprintf( cab,"\n%d %d\n",GrSizeX(),GrSizeY() ); - fwrite( cab,1,strlen( cab ),f ); - for( y=0; y use current context) -** pgmfn: Name of pgm file -** docn: string saved like a comment in the pgm file (can be NULL) -** -** Returns 0 on success -** -1 on error -*/ - -int GrSaveContextToPgm( GrContext *grc, char *pgmfn, char *docn ) -{ - FILE *f; - GrContext grcaux; - char cab[81]; - unsigned char grey; - int rgb[3]; - int x, y; - - if( (f = fopen( pgmfn,"wb" )) == NULL ) return -1; - - GrSaveContext( &grcaux ); - if( grc != NULL ) GrSetContext( grc ); - sprintf( cab,"P5\n#" ); - fwrite( cab,1,strlen( cab ),f ); - if( docn != NULL ) fwrite( docn,1,strlen( docn ), f ); - sprintf( cab,"\n%d %d\n255\n",GrSizeX(),GrSizeY() ); - fwrite( cab,1,strlen( cab ),f ); - for( y=0; y use current context) -** ppmfn: Name of ppm file -** docn: string saved like a comment in the ppm file (can be NULL) -** -** Returns 0 on success -** -1 on error -*/ - -int GrSaveContextToPpm( GrContext *grc, char *ppmfn, char *docn ) -{ - FILE *f; - GrContext grcaux; - char cab[81]; - unsigned char brgb[3]; - int x, y, r, g, b; - - if( (f = fopen( ppmfn,"wb" )) == NULL ) return -1; - - GrSaveContext( &grcaux ); - if( grc != NULL ) GrSetContext( grc ); - sprintf( cab,"P6\n#" ); - fwrite( cab,1,strlen( cab ),f ); - if( docn != NULL ) fwrite( docn,1,strlen( docn ), f ); - sprintf( cab,"\n%d %d\n255\n",GrSizeX(),GrSizeY() ); - fwrite( cab,1,strlen( cab ),f ); - for( y=0; y -#include -#include "grx20.h" - -/* -** GrJpegSupport - Returns false -*/ - -int GrJpegSupport( void ) -{ - return 0; -} - -/* -** GrSaveContextToJpeg - Returns error -*/ - -int GrSaveContextToJpeg( GrContext *grc, char *jpegfn, int quality ) -{ - return -1; -} - -/* -** GrSaveContextToGrayJpeg - Returns error -*/ - -int GrSaveContextToGrayJpeg( GrContext *grc, char *jpegfn, int quality ) -{ - return -1; -} - -/* -** GrLoadContextFromJpeg - Returns error -*/ - -int GrLoadContextFromJpeg( GrContext *grc, char *jpegfn, int scale ) -{ - return -1; -} - -/* -** GrQueryJpeg - Returns error -*/ - -int GrQueryJpeg( char *jpegfn, int *width, int *height ) -{ - return -1; -} diff --git a/thirdparty/grx249/src/gformats/dummypng.c b/thirdparty/grx249/src/gformats/dummypng.c deleted file mode 100644 index 071b628..0000000 --- a/thirdparty/grx249/src/gformats/dummypng.c +++ /dev/null @@ -1,57 +0,0 @@ -/** - ** dummypng.c ---- dummy png funtions if not PNG support in the library - ** - ** Copyright (C) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include "grx20.h" - -/* -** GrPngSupport - Returns false -*/ - -int GrPngSupport( void ) -{ - return 0; -} - -/* -** GrSaveContextToPng - Returns error -*/ - -int GrSaveContextToPng( GrContext *grc, char *pngfn ) -{ - return -1; -} - -/* -** GrLoadContextFromPng - Returns error -*/ - -int GrLoadContextFromPng( GrContext *grc, char *pngfn, int use_alpha ) -{ - return -1; -} - -/* -** GrQueryPnm - Returns error -*/ - -int GrQueryPng( char *pngfn, int *width, int *height ) -{ - return -1; -} diff --git a/thirdparty/grx249/src/gformats/jpg2ctx.c b/thirdparty/grx249/src/gformats/jpg2ctx.c deleted file mode 100644 index cfba554..0000000 --- a/thirdparty/grx249/src/gformats/jpg2ctx.c +++ /dev/null @@ -1,214 +0,0 @@ -/** - ** jpg2ctx.c ---- loads a context from a JPEG file - ** - ** Copyright (C) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include -#include -#include "grx20.h" - -/* -** GrJpegSupport - Returns true -*/ - -int GrJpegSupport( void ) -{ - return 1; -} - -static int readjpeg( FILE *f, GrContext *grc, int scale ); -static int queryjpeg( FILE *f, int *w, int *h ); - -/* -** GrLoadContextFromJpeg - Load a context from a JPEG file -** -** If context dimensions are lesser than jpeg dimensions, -** the routine loads as much as it can -** -** If color mode is not in RGB mode, the routine allocates as -** much colors as it can -** -** Arguments: -** grc: Context to be loaded (NULL -> use current context) -** jpegfn: Name of jpeg file -** scale: scale the image to 1/scale, actually libjpeg support -** 1, 2, 4 and 8 noly -** -** Returns 0 on success -** -1 on error -*/ - -int GrLoadContextFromJpeg( GrContext *grc, char *jpegfn, int scale ) -{ - GrContext grcaux; - FILE *f; - int r; - - f = fopen( jpegfn,"rb" ); - if( f == NULL ) return -1; - - GrSaveContext( &grcaux ); - if( grc != NULL ) GrSetContext( grc ); - r = readjpeg( f,grc,scale ); - GrSetContext( &grcaux ); - - fclose( f ); - - return r; -} - -/* -** GrQueryJpeg - Query width and height data from a JPEG file -** -** Arguments: -** jpegfn: Name of jpeg file -** width: return pnm width -** height: return pnm height -** -** Returns 0 on success -** -1 on error -*/ - -int GrQueryJpeg( char *jpegfn, int *width, int *height ) -{ - FILE *f; - int r; - - f = fopen( jpegfn,"rb" ); - if( f == NULL ) return -1; - - r = queryjpeg( f,width,height ); - - fclose( f ); - - return r; -} - -/**/ - -struct my_error_mgr{ - struct jpeg_error_mgr pub; - jmp_buf setjmp_buffer; - }; - -typedef struct my_error_mgr *my_error_ptr; - -/**/ - -METHODDEF(void) my_error_exit( j_common_ptr cinfo ) -{ - my_error_ptr myerr = (my_error_ptr) cinfo->err; - - /*(*cinfo->err_>output_message)( cinfo );*/ - - longjmp( myerr->setjmp_buffer,1 ); -} - -/**/ - -static int readjpeg( FILE *f, GrContext *grc, int scale ) -{ - struct jpeg_decompress_struct cinfo; - struct my_error_mgr jerr; - JSAMPARRAY buffer; - int row_stride; - int maxwidth, maxheight; - static GrColor *pColors = NULL; - unsigned char *pix_ptr; - int x, y, r, g, b; - - cinfo.err = jpeg_std_error( &jerr.pub ); - jerr.pub.error_exit = my_error_exit; - if( setjmp( jerr.setjmp_buffer ) ) { - if( pColors) free( pColors ); - jpeg_destroy_decompress( &cinfo ); - return -1; - } - - jpeg_create_decompress( &cinfo ); - jpeg_stdio_src( &cinfo,f ); - jpeg_read_header( &cinfo,TRUE ); - - cinfo.scale_denom = scale; - - jpeg_start_decompress( &cinfo ); - - row_stride = cinfo.output_width * cinfo.output_components; - - buffer = (*cinfo.mem->alloc_sarray) - ( (j_common_ptr)&cinfo,JPOOL_IMAGE,row_stride,1 ); - - maxwidth = (cinfo.output_width > GrSizeX()) ? - GrSizeX() : cinfo.output_width; - maxheight = (cinfo.output_height > GrSizeY()) ? - GrSizeY() : cinfo.output_height; - pColors = malloc( maxwidth * sizeof(GrColor) ); - if( pColors == NULL ) longjmp( jerr.setjmp_buffer,1 ); - - for( y=0; y -#include -#include -#include "grx20.h" - -/* -** GrPngSupport - Returns true -*/ - -int GrPngSupport( void ) -{ - return 1; -} - -#ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) -#endif - -static int readpng( FILE *f, GrContext *grc, int use_alpha ); -static int querypng( FILE *f, int *w, int *h ); - -/* -** GrLoadContextFromPng - Load a context from a PNG file -** -** If context dimensions are lesser than png dimensions, -** the routine loads as much as it can -** -** If color mode is not in RGB mode, the routine allocates as -** much colors as it can -** -** Arguments: -** grc: Context to be loaded (NULL -> use current context) -** pngfn: Name of pnm file -** use_alpha: if true, use alpha channel if available -** -** Returns 0 on success -** -1 on error -*/ - -int GrLoadContextFromPng( GrContext *grc, char *pngfn, int use_alpha ) -{ - GrContext grcaux; - FILE *f; - int r; - - f = fopen( pngfn,"rb" ); - if( f == NULL ) return -1; - - GrSaveContext( &grcaux ); - if( grc != NULL ) GrSetContext( grc ); - r = readpng( f,grc,use_alpha ); - GrSetContext( &grcaux ); - - fclose( f ); - - return r; -} - -/* -** GrQueryPnm - Query width and height data from a PNG file -** -** Arguments: -** pngfn: Name of png file -** width: return pnm width -** height: return pnm height -** -** Returns 0 on success -** -1 on error -*/ - -int GrQueryPng( char *pngfn, int *width, int *height ) -{ - FILE *f; - int r; - - f = fopen( pngfn,"rb" ); - if( f == NULL ) return -1; - - r = querypng( f,width,height ); - - fclose( f ); - - return r; -} - -/**/ - -static int readpng( FILE *f, GrContext *grc, int use_alpha ) -{ - png_struct *png_ptr = NULL; - png_info *info_ptr = NULL; - png_byte buf[8]; - png_byte *png_pixels = NULL; - png_byte **row_pointers = NULL; - png_byte *pix_ptr = NULL; - png_uint_32 row_bytes; - png_uint_32 width; - png_uint_32 height; - int bit_depth; - int color_type; - int alpha_present; - int i, x, y, r, g, b; - int alpha = 0, ro, go, bo; - int maxwidth, maxheight; - GrColor *pColors = NULL; - - /* is it a PNG file? */ - if( fread( buf,1,8,f ) != 8 ) return -1; - if( ! png_check_sig( buf,8 ) ) return -1; - - png_ptr = png_create_read_struct( PNG_LIBPNG_VER_STRING,NULL,NULL,NULL); - if( !png_ptr ){ - return -1; - } - - info_ptr = png_create_info_struct( png_ptr ); - if( !info_ptr ){ - png_destroy_read_struct( &png_ptr,NULL,NULL ); - return -1; - } - - if( setjmp( png_jmpbuf(png_ptr) ) ){ - png_destroy_read_struct( &png_ptr,&info_ptr,NULL ); - return -1; - } - - png_init_io( png_ptr,f ); - png_set_sig_bytes( png_ptr,8 ); - png_read_info( png_ptr,info_ptr ); - - png_get_IHDR( png_ptr,info_ptr,&width,&height,&bit_depth, - &color_type,NULL,NULL,NULL); - - /* tell libpng to strip 16 bit/color files down to 8 bits/color */ - if( bit_depth == 16 ) - png_set_strip_16( png_ptr ); - /* expand paletted colors into true RGB triplets */ - if( color_type == PNG_COLOR_TYPE_PALETTE ) - png_set_expand( png_ptr ); - /* expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */ - if( color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8 ) - png_set_expand( png_ptr ); - /* expand paletted or RGB images with transparency to full alpha channels - so the data will be available as RGBA quartets. */ - if( png_get_valid( png_ptr,info_ptr,PNG_INFO_tRNS ) ) - png_set_expand( png_ptr ); - /* transform grayscale images into rgb */ - if( color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) - png_set_gray_to_rgb( png_ptr ); - - /* we don't do gamma correction by now */ - - png_read_update_info( png_ptr,info_ptr ); - png_get_IHDR( png_ptr,info_ptr,&width,&height,&bit_depth, - &color_type,NULL,NULL,NULL); - - if( color_type == PNG_COLOR_TYPE_RGB ) - alpha_present = 0; - else if( color_type == PNG_COLOR_TYPE_RGB_ALPHA ) - alpha_present = 1; - else{ - png_destroy_read_struct( &png_ptr,&info_ptr,NULL ); - return -1; - } - - row_bytes = png_get_rowbytes( png_ptr,info_ptr ); - - png_pixels = (png_byte *) malloc( row_bytes * height * sizeof(png_byte) ); - if( png_pixels == NULL ){ - png_destroy_read_struct( &png_ptr,&info_ptr,NULL ); - return -1; - } - - row_pointers = (png_byte **) malloc( height * sizeof(png_bytep) ); - if( row_pointers == NULL ){ - png_destroy_read_struct( &png_ptr,&info_ptr,NULL ); - free( png_pixels ); - png_pixels = NULL; - return -1; - } - - for( i=0; i GrSizeX()) ? GrSizeX() : width; - maxheight = (height > GrSizeY()) ? GrSizeY() : height; - - pColors = malloc( maxwidth * sizeof(GrColor) ); - if( pColors == NULL ){ - free( row_pointers ); - row_pointers = NULL; - free( png_pixels ); - png_pixels = NULL; - return -1; - } - - for( y=0; y -#include -#include -#include "grx20.h" - -typedef struct{ - int method; /* 0=file, 1=buffer */ - FILE *file; - const char *buffer; - int bufferpointer; - } inputstruct; - -/**/ - -static size_t inputread( void *buffer, size_t size, size_t number, - inputstruct *is ) -{ - if( is->method == 0 ) - return fread( buffer,size,number,is->file ); - else{ - memcpy( buffer,&(is->buffer[is->bufferpointer]),size*number ); - is->bufferpointer += size * number; - return number; - } -} - -/**/ - -static int inputgetc( inputstruct *is ) -{ - if( is->method == 0 ) - return fgetc( is->file ); - else - return is->buffer[is->bufferpointer++]; -} - -/**/ - -int inputungetc( int c, inputstruct *is ) -{ - if( is->method == 0 ) - return ungetc( c,is->file ); - else{ - is->bufferpointer--; - return c; - } -} - -/**/ - -static int skipspaces( inputstruct *is ) -{ - int c; - - while( 1 ){ - if( (c = inputgetc( is )) == EOF ) return -1; - if( c == '#' ) // it's a comment - while( 1 ){ - if( (c = inputgetc( is )) == EOF ) return -1; - if( c == '\n' ) break; - } - if( c != ' ' && c != '\t' && c != '\n' && c != '\r' ){ - inputungetc( c,is ); - return 0; - } - } -} - -/**/ - -static int readnumber( inputstruct *is ) -{ - char buf[81]; - int count; - - count = 0; - while( 1 ){ - if( (buf[count] = inputgetc( is )) == EOF ) return -1; - if( buf[count] == ' ' || buf[count] == '\t' || buf[count] == '\n' ){ - inputungetc( buf[count],is ); - break; - } - if( count > 80 ) break; - count++; - } - buf[count] = '\0'; - return atoi( buf ); -} - -/**/ - -static int loaddata( inputstruct *is, int *width, int *height, int *maxval ) -{ - unsigned char buf[10]; - int r; - - if( inputread( buf,1,2,is ) != 2 ) return -1; - if( buf[0] != 'P' ) return -1; - r = buf[1] - '0'; - if( (r < PLAINPBMFORMAT) || (r > PPMFORMAT) ) return -1; - if( skipspaces( is ) != 0 ) return -1; - if( (*width = readnumber( is )) < 0 ) return -1; - if( skipspaces( is ) != 0 ) return -1; - if( (*height = readnumber( is )) < 0 ) return -1; - if( (r == PLAINPBMFORMAT) || (r == PBMFORMAT) ) - *maxval = 1; - else{ - if( skipspaces( is ) != 0 ) return -1; - if( (*maxval = readnumber( is )) < 0 ) return -1; - } - inputgetc( is ); // skip \n - return r; -} - -/**/ - -static int _GrLoadContextFromPbm( inputstruct *is, int width, int height ) -{ - int x, y; - int maxwidth, maxheight; - GrColor color; - int currentbyte, isbyteread = 0; - int currentbit = 0; - GrColor *pColors=NULL; - int res = 0; - - maxwidth = (width > GrSizeX()) ? GrSizeX() : width; - maxheight = (height > GrSizeY()) ? GrSizeY() : height; - - pColors = malloc( maxwidth * sizeof(GrColor) ); - if(pColors == NULL) { res = -1; goto salida; } - - for( y=0; y GrSizeX()) ? GrSizeX() : width; - maxheight = (height > GrSizeY()) ? GrSizeY() : height; - - if( maxval < 255 ){ - needcoloradjust = 1; - coloradjust = 255.0 / maxval; - } - - pData = NULL; - pColors = malloc( maxwidth * sizeof(GrColor) ); - if(pColors == NULL) { res = -1; goto salida; } - pData = malloc( width * sizeof(char) ); - if(pData == NULL) { res = -1; goto salida; } - - for( y=0; y GrSizeX()) ? GrSizeX() : width; - maxheight = (height > GrSizeY()) ? GrSizeY() : height; - - if( maxval < 255 ){ - needcoloradjust = 1; - coloradjust = 255.0 / maxval; - } - - pRGB = NULL; - pColors = malloc( maxwidth * sizeof(GrColor) ); - if(pColors == NULL) { res = -1; goto salida; } - pRGB = malloc( width * 3 * sizeof(char) ); - if(pRGB == NULL) { res = -1; goto salida; } - - for( y=0; y use current context) -** pnmfn: Name of pnm file -** -** Returns 0 on success -** -1 on error -*/ - -int GrLoadContextFromPnm( GrContext *grc, char *pnmfn ) -{ - inputstruct is = {0, NULL, NULL, 0}; - GrContext grcaux; - int r = -1; - int format, width, height, maxval; - - if( (is.file = fopen( pnmfn,"rb" )) == NULL ) return -1; - - GrSaveContext( &grcaux ); - if( grc != NULL ) GrSetContext( grc ); - - format = loaddata( &is,&width,&height,&maxval ); - if( maxval > 255 ) goto ENDFUNCTION; - if( (format < PBMFORMAT) || (format > PPMFORMAT) ) goto ENDFUNCTION; - - switch( format ){ - case PBMFORMAT: r = _GrLoadContextFromPbm( &is,width,height ); - break; - case PGMFORMAT: r = _GrLoadContextFromPgm( &is,width,height,maxval ); - break; - case PPMFORMAT: r = _GrLoadContextFromPpm( &is,width,height,maxval ); - break; - } - -ENDFUNCTION: - GrSetContext( &grcaux ); - fclose( is.file ); - - return r; -} - -/* -** GrQueryPnm - Query format, width and height data from a PNM file -** -** Arguments: -** pnmfn: Name of pnm file -** width: return pnm width -** height: return pnm height -** maxval: max color component value -** -** Returns 1 to 6 on success (PNM FORMAT) -** -1 on error -*/ - -int GrQueryPnm( char *pnmfn, int *width, int *height, int *maxval ) -{ - inputstruct is = {0, NULL, NULL, 0}; - int r; - - if( (is.file = fopen( pnmfn,"rb" )) == NULL ) return -1; - - r = loaddata( &is,width,height,maxval ); - - fclose( is.file ); - - return r; -} - -/* -** GrLoadContextFromPnmBuffer - Load a context from a PNM buffer -** -** Support only PBM, PGM and PPM binary buffers with maxval < 256 -** -** If context dimensions are lesser than pnm dimensions, -** the routine loads as much as it can -** -** If color mode is not in RGB mode, the routine allocates as -** much colors as it can -** -** Arguments: -** ctx: Context to be loaded (NULL -> use current context) -** pnmbuf: Buffer that holds data -** -** Returns 0 on success -** -1 on error -*/ - -int GrLoadContextFromPnmBuffer( GrContext *grc, const char *pnmbuf ) -{ - inputstruct is = {1, NULL, NULL, 0}; - GrContext grcaux; - int r = -1; - int format, width, height, maxval; - - is.buffer = pnmbuf; - - GrSaveContext( &grcaux ); - if( grc != NULL ) GrSetContext( grc ); - - format = loaddata( &is,&width,&height,&maxval ); - if( maxval > 255 ) goto ENDFUNCTION; - if( (format < PBMFORMAT) || (format > PPMFORMAT) ) goto ENDFUNCTION; - - switch( format ){ - case PBMFORMAT: r = _GrLoadContextFromPbm( &is,width,height ); - break; - case PGMFORMAT: r = _GrLoadContextFromPgm( &is,width,height,maxval ); - break; - case PPMFORMAT: r = _GrLoadContextFromPpm( &is,width,height,maxval ); - break; - } - -ENDFUNCTION: - GrSetContext( &grcaux ); - - return r; -} - -/* -** GrQueryPnmBuffer - Query format, width and height data from a PNM buffer -** -** Arguments: -** pnmbuf: Buffer that holds data -** width: return pnm width -** height: return pnm height -** maxval: max color component value -** -** Returns 1 to 6 on success (PNM FORMAT) -** -1 on error -*/ - -int GrQueryPnmBuffer( const char *pnmbuf, int *width, int *height, int *maxval ) -{ - inputstruct is = {1, NULL, NULL, 0}; - int r; - - is.buffer = pnmbuf; - - r = loaddata( &is,width,height,maxval ); - - return r; -} - diff --git a/thirdparty/grx249/src/image/ialloc.c b/thirdparty/grx249/src/image/ialloc.c deleted file mode 100644 index c633c0b..0000000 --- a/thirdparty/grx249/src/image/ialloc.c +++ /dev/null @@ -1,57 +0,0 @@ -/** - ** ialloc.c ---- Source Image Utility - ** - ** by Michal Stencl Copyright (c) 1998 - ** - [stenclpmd@ba.telecom.sk] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** modifications by Hartmut Schirmer Copyright (c) 1998 - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "image/image.h" - -int _GrImageTestSize(int wdt,int hgt) -{ - long total; - GRX_ENTER(); - total = GrContextSize(wdt,hgt); -# ifdef _MAXMEMPLANESIZE - if ( total > _MAXMEMPLANESIZE ) total = 0L; -# endif - GRX_RETURN(total); -} - -GrImage *_GrImageAllocate(GrContext *ctx, int nwidth,int nheight) -{ - GrImage *img; - - GRX_ENTER(); - img = NULL; - if ( _GrImageTestSize(nwidth, nheight) <= 0 ) goto done; - if (!GrCreateContext(nwidth, nheight, NULL, ctx)) goto done; - img = (GrImage *)malloc(sizeof(GrImage)); - if ( !img ) { - GrDestroyContext(ctx); - goto done; - } - img->pxp_ispixmap = 1; - img->pxp_width = nwidth; - img->pxp_height = nheight; - img->pxp_oper = 0; - img->pxp_source = ctx->gc_frame; - img->pxp_source.gf_memflags = 3;/* MY_CONTEXT & MY_MEMORY */ -done: - GRX_RETURN(img); -} diff --git a/thirdparty/grx249/src/image/ibuild.c b/thirdparty/grx249/src/image/ibuild.c deleted file mode 100644 index 81b5ce8..0000000 --- a/thirdparty/grx249/src/image/ibuild.c +++ /dev/null @@ -1,51 +0,0 @@ -/** - ** ibuild.c ---- Source Image Utility - ** - ** by Michal Stencl Copyright (c) 1998 - ** - [stenclpmd@ba.telecom.sk] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** modifications by Hartmut Schirmer (c) 1998 - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "mempeek.h" -#include "image/image.h" - -GrImage *GrImageBuild(const char *pixels,int w,int h,const GrColorTableP colors) -{ - GrImage *img; - GRX_ENTER(); - img = NULL; - if ( pixels ) do { - GrContext ctx, save; - GrColor col; - int yy=0, xx; - img = _GrImageAllocate(&ctx,w,h); - if ( !img ) break; - save = *CURC; - *CURC = ctx; - do { - xx = 0; - do { - col = peek_b(pixels); - ptrinc(pixels,1); - if ( colors ) col = GR_CTABLE_COLOR(colors,col); - (*CURC->gc_driver->drawpixel)(xx, yy, (col & C_COLOR)); - } while(++xx < w); - } while(++yy < h); - *CURC = save; - } while(0); - GRX_RETURN(img); -} diff --git a/thirdparty/grx249/src/image/ifbox.c b/thirdparty/grx249/src/image/ifbox.c deleted file mode 100644 index a39690e..0000000 --- a/thirdparty/grx249/src/image/ifbox.c +++ /dev/null @@ -1,77 +0,0 @@ -/** - ** ifbox.c ---- Source Image Utility - ** - ** by Michal Stencl Copyright (c) 1998 - ** - [stenclpmd@ba.telecom.sk] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** modifications by Hartmut Schirmer (c) 1998 - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "image/image.h" - -void GrImageFilledBoxAlign(int xo,int yo,int x1,int y1,int x2,int y2,GrImage *p) -{ - int iwdt, ihgt, xoff, yoff, yy, xx, copyh, copyw; - void (*bltfun)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor); - xo = min(xo, min(x1,x2)); - yo = min(yo, min(y1,y2)); - clip_box(CURC,x1,y1,x2,y2); - iwdt = p->pxp_width; - ihgt = p->pxp_height; - if ( (y2-y1) <= 0 || (x2-x1) <= 0 || iwdt <= 0 || ihgt <= 0) return; - if (CURC->gc_onscreen) bltfun = CURC->gc_driver->bltr2v; - else bltfun = CURC->gc_driver->bitblt; - while (xo > x1) xo -= iwdt; - while (yo > y1) yo -= ihgt; - yoff = (y1-yo)%ihgt; - yy = y1; - mouse_block(CURC,x1,y1,x2,y2); - x2++; - y2++; - do { - xx = x1; - copyh = min(y2-yy,ihgt-yoff); - xoff = (x1-xo)%iwdt; - do { - copyw = min(x2-xx,iwdt-xoff); - (*bltfun)( &CURC->gc_frame, xx + CURC->gc_xoffset, yy + CURC->gc_yoffset, - &p->pxp_source,xoff,yoff,copyw,copyh, - p->pxp_oper - ); - xx += iwdt-xoff; - xoff = 0; - } while ( xx < x2 ); - yy += ihgt-yoff; - yoff = 0; - } while ( yy < y2 ); - mouse_unblock(); -} - -void GrImageDisplay(int x,int y,GrImage *p) -{ - GRX_ENTER(); - GrImageFilledBoxAlign(x,y,x,y,x+p->pxp_width-1,y+p->pxp_height-1,p); - GRX_LEAVE(); -} - -void GrImageDisplayExt(int x1,int y1,int x2,int y2,GrImage* p) -{ - GRX_ENTER(); - GrImageFilledBoxAlign(x1,y1,x1,y1,x2,y2,p); - GRX_LEAVE(); -} - - diff --git a/thirdparty/grx249/src/image/ihline.c b/thirdparty/grx249/src/image/ihline.c deleted file mode 100644 index f0bdd85..0000000 --- a/thirdparty/grx249/src/image/ihline.c +++ /dev/null @@ -1,56 +0,0 @@ -/** - ** ihline.c ---- Source Image Utility - ** - ** by Michal Stencl Copyright (c) 1998 - ** - [stenclpmd@ba.telecom.sk] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** modifications by Hartmut Schirmer (c) 1998 - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "image/image.h" - -void GrImageHLineAlign(int xo,int yo,int x,int y,int width,GrImage *p) -{ - int x2, widthimg, yimg, ximg, xdest, ydest, cpysize; - GrColor optype; - void (*bltfun)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor); - x2 = x+width; - xo = min(xo, min(x,x2)); - yo = min(yo, y); - clip_hline(CURC,x,x2,y); - width = x2 - x; - mouse_block(CURC,x,y,x2,y); - widthimg = p->pxp_width; - yimg = (y - yo) % p->pxp_height; - ximg = (x - xo) % widthimg; - xdest = x + CURC->gc_xoffset; - ydest = y + CURC->gc_yoffset; - cpysize = widthimg - ximg; - optype = p->pxp_oper; - if (CURC->gc_onscreen) bltfun = CURC->gc_driver->bltr2v; - else bltfun = CURC->gc_driver->bitblt; - while ( width > 0 ) { - if ( cpysize > width ) cpysize = width; - (*bltfun)(&CURC->gc_frame,xdest,ydest, - &p->pxp_source,ximg,yimg,cpysize,1, - optype); - width -= cpysize; - ximg = 0; - xdest += cpysize; - cpysize = widthimg; - }; - mouse_unblock(); -} diff --git a/thirdparty/grx249/src/image/iinverse.c b/thirdparty/grx249/src/image/iinverse.c deleted file mode 100644 index a9ead77..0000000 --- a/thirdparty/grx249/src/image/iinverse.c +++ /dev/null @@ -1,58 +0,0 @@ -/** - ** iinverse.c ---- Source Image Utility - ** - ** by Michal Stencl Copyright (c) 1998 - ** - [stenclpmd@ba.telecom.sk] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** modifications by Hartmut Schirmer (c) 1998 - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "image/image.h" - -GrImage *GrImageInverse(GrImage *p,int flag) -{ - GrContext ctx, save; - GrColor col; - GrImage *img; - int yy, xx, sidex, sidey, width, height, xs, ys = 0; - width = p->pxp_width; - height = p->pxp_height; - img = _GrImageAllocate(&ctx,width,height); - if ( !img ) return(NULL); - save = *CURC; - *CURC = ctx; - sidex = ( flag & GR_IMAGE_INVERSE_LR ) ? -1 : 1; - sidey = ( flag & GR_IMAGE_INVERSE_TD ) ? -1 : 1; - yy = ( flag & GR_IMAGE_INVERSE_TD ) ? height-1 : 0; - do { - xx = ( flag & GR_IMAGE_INVERSE_LR ) ? width-1 : 0; - xs = 0; - do { - col = (*p->pxp_source.gf_driver->readpixel)(&p->pxp_source,xs,ys); - (*CURC->gc_driver->drawpixel)(xx, yy, col); - xx += sidex; - } while(++xs < width); - yy += sidey; - } while(++ys < height); - *CURC = save; - img->pxp_ispixmap = 1; - img->pxp_width = width; - img->pxp_height = height; - img->pxp_oper = 0; - img->pxp_source = ctx.gc_frame; - img->pxp_source.gf_memflags = 3;/* MY_CONTEXT & MY_MEMORY */ - return(img); -} diff --git a/thirdparty/grx249/src/image/image.h b/thirdparty/grx249/src/image/image.h deleted file mode 100644 index 625f5ee..0000000 --- a/thirdparty/grx249/src/image/image.h +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** image.h ---- Source Image Utility - ** - ** by Michal Stencl Copyright (c) 1998 - ** - [stenclpmd@ba.telecom.sk] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** modifications by Hartmut Schirmer (c) 1998 - ** - **/ - -#ifndef __IMAGE_H_INCLUDED__ -#define __IMAGE_H_INCLUDED__ - -#ifndef __LIBGRX_H_INCLUDED__ -#include "libgrx.h" -#endif - -#ifndef GrImage -#define GrImage GrPixmap -#endif - -int _GrImageTestSize(int wdt,int hgt); -GrImage *_GrImageAllocate(GrContext *ctx, int nwidth,int nheight); - -#endif diff --git a/thirdparty/grx249/src/image/imginlne.c b/thirdparty/grx249/src/image/imginlne.c deleted file mode 100644 index e91707e..0000000 --- a/thirdparty/grx249/src/image/imginlne.c +++ /dev/null @@ -1,44 +0,0 @@ -/** - ** imginlne.h ---- Image Utility - ** - ** by Michal Stencl Copyright (c) 1998 for GRX - ** - [stenclpmd@ba.telecom.sk] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "image/image.h" - -GrImage *(GrImageFromPattern)(GrPattern *p) { - return GrImageFromPattern(p); -} - -GrImage *(GrImageFromContext)(GrContext *c) { - return GrImageFromContext(c); -} - -GrPattern *(GrPatternFromImage)(GrImage *p) { - return GrPatternFromImage(p); -} - -GrImage *(GrImageBuildUsedAsPattern)(const char *pixels,int w,int h, - const GrColorTableP colors ) { - return GrImageBuildUsedAsPattern(pixels,w,h,colors); -} - -void (GrImageDestroy)(GrImage *i) { - GrImageDestroy(i); -} - - - diff --git a/thirdparty/grx249/src/image/iplot.c b/thirdparty/grx249/src/image/iplot.c deleted file mode 100644 index 3eed462..0000000 --- a/thirdparty/grx249/src/image/iplot.c +++ /dev/null @@ -1,39 +0,0 @@ -/** - ** iplot.c ---- Source Image Utility - ** - ** by Michal Stencl Copyright (c) 1998 - ** - [stenclpmd@ba.telecom.sk] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** modifications by Hartmut Schirmer (c) 1998 - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "image/image.h" - -void GrImagePlotAlign(int xo,int yo,int x,int y,GrImage *p) -{ - int xp, yp; - GrColor col; - - xo = min(xo, x); - yo = min(yo, y); - clip_dot(CURC,x,y); - xp = (x - xo) % p->pxp_width; - yp = (y - yo) % p->pxp_height; - mouse_block(CURC,x,y,x,y); - col = (*p->pxp_source.gf_driver->readpixel)(&p->pxp_source,xp,yp); - (*CURC->gc_driver->drawpixel)(x + CURC->gc_xoffset, y + CURC->gc_yoffset, col); - mouse_unblock(); -} diff --git a/thirdparty/grx249/src/image/istretch.c b/thirdparty/grx249/src/image/istretch.c deleted file mode 100644 index d78be9b..0000000 --- a/thirdparty/grx249/src/image/istretch.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** istretch.c ---- Source Image Utility - ** - ** Copyright (c) 1998 by Michal Stencl and Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "clipping.h" -#include "image/image.h" - -GrImage *GrImageStretch(GrImage *p,int nwidth,int nheight) -{ - GrContext ctx; - GrImage *img; - - GRX_ENTER(); - img = _GrImageAllocate(&ctx,nwidth,nheight); - if ( img ) - _GrFrDrvGenericStretchBlt(&ctx.gc_frame,0,0,nwidth,nheight, - &p->pxp_source,0,0,p->pxp_width,p->pxp_height, - p->pxp_oper); - GRX_RETURN(img); -} diff --git a/thirdparty/grx249/src/include/access24.h b/thirdparty/grx249/src/include/access24.h deleted file mode 100644 index 7a460d2..0000000 --- a/thirdparty/grx249/src/include/access24.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - ** access24.h ---- 16M color (24bit) access macros - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - **/ - -#ifndef __ACCESS24_H_INCLUDED__ -#define __ACCESS24_H_INCLUDED__ - -#ifndef __LIBGRX_H_INCLUDED__ -#include "libgrx.h" -#endif - -#ifndef __MEMPEEK_H_INCLUDED__ -#include "mempeek.h" -#endif - -#if BYTE_ORDER==LITTLE_ENDIAN -/* read color component from 32bit variable */ -#define RD24BYTE(p,idx) peek_b(((GR_int8u *)(&p))+idx) -/* write color componet to 32bit variable */ -#define WR24BYTE(p,idx,cc) poke_b(((GR_int8u *)(&p))+idx,cc) -#else -/* read color component from 32bit variable */ -#define RD24BYTE(p,idx) peek_b(((GR_int8u *)(&p))+idx+1) -/* write color componet to 32bit variable */ -#define WR24BYTE(p,idx,cc) poke_b(((GR_int8u *)(&p))+idx+1,cc) -#endif - -#endif diff --git a/thirdparty/grx249/src/include/allocate.h b/thirdparty/grx249/src/include/allocate.h deleted file mode 100644 index edbaf8a..0000000 --- a/thirdparty/grx249/src/include/allocate.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - ** allocate.h ---- common ground for malloc & friends in 16 & 32 bit envs - ** stack based temporary memory allocation - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#if defined(__alpha__) || (GRX_VERSION==GRX_VERSION_GENERIC_X11) && !defined(_AIX) -# include -#elif defined(__TURBOC__) -# include -# include "bcc/allocate.h" -#elif defined(__WATCOMC__) -# include -#elif defined(_MSC_VER) && defined(_WIN32) -# include -#elif defined(__MINGW32__) && !defined(alloca) -# define alloca __builtin_alloca -#else -# include -#endif - -#if defined(_MSC_VER) && !defined(_WIN32) -#define farmalloc _fmalloc -#define farrealloc _frealloc -#define farcalloc _fcalloc -#define farfree _ffree -#elif !defined(__TURBOC__) -#define farmalloc malloc -#define farrealloc realloc -#define farcalloc calloc -#define farfree free -#endif - -#if 0 && defined(_MSC_VER) -#define setup_alloca() do { unsigned char _stack_dummy_var_ = '\001' -#define reset_alloca() } while (0) -#endif - - -#ifndef setup_alloca -#define setup_alloca() -#define reset_alloca() -#endif - -/* ALLOC / FREE : use alloca if possible */ -#ifdef SMALL_STACK -#define ALLOC(sze) malloc(sze) -#define FREE(p) free(p) -#define setup_ALLOC() -#define reset_ALLOC() -#elif defined(_MSC_VER) && !defined(_WIN32) -#define ALLOC(sze) _alloca(sze) -#define FREE(p) -#define setup_ALLOC setup_alloca -#define reset_ALLOC reset_alloca -#else -#define ALLOC(sze) alloca(sze) -#define FREE(p) -#define setup_ALLOC setup_alloca -#define reset_ALLOC reset_alloca -#endif - -/* temp buffer for blits etc. */ -extern void far *_GrTempBuffer; -extern unsigned _GrTempBufferBytes; -#define _GrTempBufferAlloc(b) ( \ - ((unsigned)(b) <= _GrTempBufferBytes) ? _GrTempBuffer \ - : _GrTempBufferAlloc_(b) ) -extern void far *_GrTempBufferAlloc_(size_t bytes); -extern void _GrTempBufferFree(void); diff --git a/thirdparty/grx249/src/include/arith.h b/thirdparty/grx249/src/include/arith.h deleted file mode 100644 index 77685a7..0000000 --- a/thirdparty/grx249/src/include/arith.h +++ /dev/null @@ -1,237 +0,0 @@ -/** - ** arith.h ---- some common integer arithmetic macros/inline functions - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Intel CPU specific support is provided for the Turbo C and GNU C. May - ** work with other compilers and CPU-s, but is not optimized for them. - ** - **/ - -#ifndef __ARITH_H_INCLUDED__ -#define __ARITH_H_INCLUDED__ - -#ifdef __GNUC__ -#include "gcc/arith.h" -#elif defined(__TURBOC__) -#include "bcc/arith.h" -#endif - -#ifdef _MSC_VER -#define __emit__(x) __asm{ __emit (x) } -#endif - -/* - * old standbys - */ -#ifndef min -#define min(x,y) (((x) < (y)) ? (x) : (y)) -#endif -#ifndef max -#define max(x,y) (((x) > (y)) ? (x) : (y)) -#endif -#ifndef __ABS -#define __ABS(x) (((x) < (0)) ? -(x) : (x)) -#endif -#ifndef abs -#define abs(x) __ABS(x) -#endif -#ifndef scale -#define scale(x,n,d) (((x) * (n)) / (d)) -#endif -#ifndef imin -#define imin(x,y) min((int)(x),(int)(y)) -#endif -#ifndef imax -#define imax(x,y) max((int)(x),(int)(y)) -#endif -#ifndef iabs -#define iabs(x) abs((int)(x)) -#endif -#ifndef umin -#define umin(x,y) min((unsigned int)(x),(unsigned int)(y)) -#endif -#ifndef umax -#define umax(x,y) max((unsigned int)(x),(unsigned int)(y)) -#endif -#ifndef lmin -#define lmin(x,y) min((long)(x),(long)(y)) -#endif -#ifndef lmax -#define lmax(x,y) max((long)(x),(long)(y)) -#endif -#ifndef labs -#define labs(x) __ABS((long)(x)) -#endif -#ifndef ulmin -#define ulmin(x,y) min((unsigned long)(x),(unsigned long)(y)) -#endif -#ifndef ulmax -#define ulmax(x,y) max((unsigned long)(x),(unsigned long)(y)) -#endif - -/* - * swap and sort stuff - */ -#define iswap(x,y) { \ - int _swap_tmpval_ = (x); \ - (x) = (y); \ - (y) = _swap_tmpval_; \ -} - -#define lswap(x,y) { \ - long _swap_tmpval_ = (x); \ - (x) = (y); \ - (y) = _swap_tmpval_; \ -} - -#define isort(x,y) { \ - if((int)(x) > (int)(y)) iswap(x,y) \ -} - -#define usort(x,y) { \ - if((unsigned int)(x) > (unsigned int)(y)) iswap(x,y) \ -} - -#define lsort(x,y) { \ - if((long)(x) > (long)(y)) lswap(x,y) \ -} - -#define ulsort(x,y) { \ - if((unsigned long)(x) > (unsigned long)(y)) lswap(x,y) \ -} - - -/* - * couple of 'sizeof'-like useful macros - */ -#ifndef bsizeof -#define bsizeof(s) (sizeof(s) / sizeof(char)) -#endif -#ifndef wsizeof -#define wsizeof(s) (sizeof(s) / sizeof(short)) -#endif -#ifndef lsizeof -#define lsizeof(s) (sizeof(s) / sizeof(long)) -#endif -#ifndef bitsof -#define bitsof(s) (sizeof(s) * 8) -#endif -#ifndef bytesof -#define bytesof(s) ((sizeof(s) + sizeof(char) - 1) / sizeof(char)) -#endif -#ifndef wordsof -#define wordsof(s) ((sizeof(s) + sizeof(short) - 1) / sizeof(short)) -#endif -#ifndef longsof -#define longsof(s) ((sizeof(s) + sizeof(long) - 1) / sizeof(long)) -#endif -#ifndef itemsof -#define itemsof(arr) (sizeof(arr) / sizeof((arr)[0])) -#endif -#ifndef offsetof -#define offsetof(structype,field) (int)( \ - (char *)(&((structype *)(0))->field) - \ - (char *)(0) \ -) -#endif - -/* - * [i|u]mul32(x,y) - * multiply two int-s for a long result - */ -#ifndef imul32 -#define imul32(X,Y) ((long)(X) * (long)(Y)) -#endif -#ifndef umul32 -#define umul32(X,Y) ((unsigned long)(X) * (unsigned long)(Y)) -#endif - - -/* - * umuladd32(x,y,z) - * multiply two unsigned-s for a long result and add an unsigned - */ -#ifndef umuladd32 -#define umuladd32(X,Y,Z) (umul32((X),(Y))+(Z)) -#endif - - -/* - * [i|u]scale(X,N,D) - * scale an integer with long intermediate result but without using long - * arithmetic all the way - */ -#ifndef iscale -#define iscale(X,N,D) (int)(imul32(X,N) / (long)(D)) -#endif -#ifndef uscale -#define uscale(X,N,D) (unsigned int)(umul32(X,N) / (unsigned long)(D)) -#endif -#ifndef irscale -#define irscale(X,N,D) (( \ - iscale(((int)(X) << 1),N,D) + \ - (((int)(X) ^ (int)(N) ^ (int)(D)) >> (bitsof(int) - 1)) + \ - 1 \ -) >> 1) -#endif -#ifndef urscale -#define urscale(X,N,D) ((uscale(((int)(X) << 1),N,D) + 1) >> 1) -#endif - -/* - * replicate_2(byte_or_word_value) - * copy the lower byte(s) of a byte or word into the upper byte(s) - */ -#define __INLINE_REPLICATE__(V,TFROM,TTO) ( \ - ((unsigned TTO)(unsigned TFROM)(V)) | \ - ((unsigned TTO)(unsigned TFROM)(V) << (sizeof(TFROM) * 8)) \ -) - -#ifndef replicate_b2b -#define replicate_b2b(BYTE) (BYTE) -#endif -#ifndef replicate_b2w -#define replicate_b2w(BYTE) __INLINE_REPLICATE__(BYTE,GR_int8,GR_int16) -#endif -#ifndef replicate_b2l -#define replicate_b2l(BYTE) replicate_w2l(replicate_b2w(BYTE)) -#endif -#ifndef replicate_b2h -#define replicate_b2h(BYTE) replicate_l2h(replicate_w2l(replicate_b2w(BYTE))) -#endif - -#ifndef replicate_w2w -#define replicate_w2w(WORD) (WORD) -#endif -#ifndef replicate_w2l -#define replicate_w2l(WORD) __INLINE_REPLICATE__(WORD,GR_int16,GR_int32) -#endif -#ifndef replicate_w2h -#define replicate_w2h(WORD) replicate_l2h(replicate_w2l(WORD)) -#endif - -#ifndef replicate_l2l -#define replicate_l2l(LONG) (LONG) -#endif -#ifndef replicate_l2h -#define replicate_l2h(LONG) __INLINE_REPLICATE__(LONG,GR_int32,GR_int64) -#endif - -#ifndef replicate_h2h -#define replicate_h2h(LLONG) (LLONG) -#endif - -#endif /* whole file */ - diff --git a/thirdparty/grx249/src/include/bcc/allocate.h b/thirdparty/grx249/src/include/bcc/allocate.h deleted file mode 100644 index 7d0b3fd..0000000 --- a/thirdparty/grx249/src/include/bcc/allocate.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - ** allocate.h ---- common ground for malloc & friends in 16 & 32 bit envs - ** stack based temporary memory allocation - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* - * I have TC++ 1.01 (quite old). It is possible that newer TC++ versions - * have a built-in alloca. - */ -#if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__) -extern unsigned int __brklvl; -#define alloca(size) ( \ - ((_AX = _SP - (((unsigned int)(size) + 3) & ~3)) > __brklvl) ? \ - (void near *)(_SP = _AX) : \ - (void near *)(0) \ -) -#else -extern unsigned int _stklen; -#define alloca(size) ( \ - ((_AX = _SP - (((unsigned int)(size) + 3) & ~3)) < _stklen) ? \ - (void far *)((void _seg *)(_SS) + (void near *)(_SP = _AX)) : \ - (void far *)(0) \ -) -#endif - -#define setup_alloca() { unsigned int __saved_SP__ = _SP; -#define reset_alloca() _SP = __saved_SP__; } - diff --git a/thirdparty/grx249/src/include/bcc/arith.h b/thirdparty/grx249/src/include/bcc/arith.h deleted file mode 100644 index 334df21..0000000 --- a/thirdparty/grx249/src/include/bcc/arith.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - ** arith.h ---- some common integer arithmetic macros/inline functions - ** Special Borland-C++ handling - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* - * arithmetic stuff - */ - -/* prototype for __emit__() */ -#include - -/* - * [i|u]mul32(x,y) - * multiply two int-s for a long result - */ -extern long _GR_imul32(int x, int y); -extern unsigned long _GR_umul32(int x, int y); -#define imul32(X,Y) _GR_imul32((X),(Y)) -#define umul32(X,Y) _GR_umul32((X),(Y)) - -/* - * umuladd32(x,y,z) - * multiply two unsigned-s for a long result and add an unsigned - */ -extern unsigned long _GR_umuladd32(unsigned x, unsigned y, unsigned z); -#define umuladd32(X,Y,Z) _GR_umuladd32((X),(Y),(Z)) - -/* - * [i|u]scale(X,N,D) - * scale an integer with long intermediate result but without using long - * arithmetic all the way - */ -extern int _GR_iscale(int x,int n,int d); -extern unsigned _GR_uscale(int x,int n,int d); -extern int _GR_irscale(int x, int n, int d); -#define iscale(X,N,D) _GR_iscale((X),(N),(D)) -#define uscale(X,N,D) _GR_uscale((X),(N),(D)) -#define irscale(X,N,D) _GR_irscale((X),(N),(D)) - -/* - * replicate_2(byte_or_word_value) - * copy the lower byte(s) of a byte or word into the upper byte(s) - */ -#define replicate_b2w(BYTE) ( \ - _AL = (char)(BYTE), \ - _AH = _AL, \ - (int)_AX \ -) -#define replicate_w2l(WORD) ( \ - _AX = (int)(WORD), \ - _DX = _AX, \ - (long)((void _seg *)_DX + (void near *)_AX) \ -) -#define replicate_b2l(BYTE) ( \ - _AL = (char)(BYTE), \ - _AH = _AL, \ - _DX = _AX, \ - (long)((void _seg *)_DX + (void near *)_AX) \ -) diff --git a/thirdparty/grx249/src/include/bcc/asmsupp.h b/thirdparty/grx249/src/include/bcc/asmsupp.h deleted file mode 100644 index f6e7c38..0000000 --- a/thirdparty/grx249/src/include/bcc/asmsupp.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Define assembler memonics for asm code creation - * and memonic extensions for different operand sizes - */ - -#ifndef __BCC_ASMSUPP_H_INCLUDED -#define __BCC_ASMSUPP_H_INCLUDED - -#define __EMIT__(x) __emit__((char)(x)) - -#define MOV_INS mov -#define XOR_INS xor -#define OR_INS or -#define AND_INS and - -/* for opcode generation using __emit__ */ -/* mov [...],al */ -#define OPCODE_mov_mem_b 0x88 -/* mov [...],ax */ -#define OPCODE_mov_mem_w 0x89 -/* xor [...],al */ -#define OPCODE_xor_mem_b 0x30 -/* xor [...],ax */ -#define OPCODE_xor_mem_w 0x31 -/* or [...],al */ -#define OPCODE_or_mem_b 0x08 -/* or [...],ax */ -#define OPCODE_or_mem_w 0x09 -/* and [...],al */ -#define OPCODE_and_mem_b 0x20 -/* and [...],ax */ -#define OPCODE_and_mem_w 0x21 - - -#define OP8b b -#define OP16b w -#define OP32b l - -#endif diff --git a/thirdparty/grx249/src/include/bcc/highlow.h b/thirdparty/grx249/src/include/bcc/highlow.h deleted file mode 100644 index a05ed8b..0000000 --- a/thirdparty/grx249/src/include/bcc/highlow.h +++ /dev/null @@ -1,20 +0,0 @@ -/** - ** highlow.h ---- combining two BYTES into one WORD -- Borland-C++ special - ** - ** Copyright (c) 1997 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* combine two bytes into one word: optimized x86 version */ -#define highlow(hi,lo) ( _AH = (hi), _AL = (lo), _AX ) - diff --git a/thirdparty/grx249/src/include/bcc/memcopy.h b/thirdparty/grx249/src/include/bcc/memcopy.h deleted file mode 100644 index 82d613f..0000000 --- a/thirdparty/grx249/src/include/bcc/memcopy.h +++ /dev/null @@ -1,232 +0,0 @@ -/** - ** memcopy.h ---- inline assembly memory copy macros -- GNU-C code - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* bcc can't do 32bit copies -> use 16bit instead */ -#ifndef NO_32BIT_COPY -# define NO_32BIT_COPY -#endif - -#include "bcc/asmsupp.h" - -#define __INLINE_STD_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) do { \ - __EMIT__(0x1e); /* push ds */ \ - _ES = (unsigned)(void _seg *)(void far *)(S); \ - _SI = (unsigned)(void near *)(S); \ - __EMIT__(0x06); /* push es */ \ - _ES = (unsigned)(void _seg *)(void far *)(D); \ - _DI = (unsigned)(void near *)(D); \ - _CX = (int)(C); \ - __EMIT__(0x1f); /* pop ds */ \ - __EMIT__(0xfc); /* cld */ \ - __EMIT__(0xf3); /* rep */ \ - __EMIT__(0xa4 + sizeof(TYPE) - 1); /* movsB|W */ \ - __EMIT__(0x1f); /* pop ds */ \ - (unsigned)(void near *)(D) = _DI; \ - (unsigned)(void near *)(S) = _SI; \ -} while(0) - -/* -------------------------------------------------------------------------- */ - -#define __INLINE_BCC_OPRCOPY_b__(D,S,C,WROPCODE) do { \ - __EMIT__(0x1e); /* push ds */ \ - _ES = (unsigned)(void _seg *)(void far *)(S); \ - _SI = (unsigned)(void near *)(S); \ - __EMIT__(0x06); /* push es */ \ - _ES = (unsigned)(void _seg *)(void far *)(D); \ - _DI = (unsigned)(void near *)(D); \ - _CX = (int)(C); \ - __EMIT__(0x1f); /* pop ds */ \ - __EMIT__(0xfc); /* cld */ \ - /* loop: */ \ - __EMIT__(0xac); /* lodsb */ \ - __EMIT__(0x26); /* es: */ \ - __EMIT__(WROPCODE); /* xor/or/and/mov [..],al/ax */ \ - __EMIT__(0x05); /* di */ \ - __EMIT__(0x47); /* inc di */ \ - __EMIT__(0x49); /* dec cx */ \ - __EMIT__(0x75); /* jnz */ \ - __EMIT__(0xf8); /* loop*/ \ - __EMIT__(0x1f); /* pop ds */ \ - (unsigned)(void near *)(D) = _DI; \ - (unsigned)(void near *)(S) = _SI; \ -} while(0) - - -#define __INLINE_BCC_OPRCOPY_w__(D,S,C,WROPCODE) do { \ - __EMIT__(0x1e); /* push ds */ \ - _ES = (unsigned)(void _seg *)(void far *)(S); \ - _SI = (unsigned)(void near *)(S); \ - __EMIT__(0x06); /* push es */ \ - _ES = (unsigned)(void _seg *)(void far *)(D); \ - _DI = (unsigned)(void near *)(D); \ - _CX = (int)(C); \ - __EMIT__(0x1f); /* pop ds */ \ - __EMIT__(0xfc); /* cld */ \ - /* loop: */ \ - __EMIT__(0xad); /* lodsw */ \ - __EMIT__(0x26); /* es: */ \ - __EMIT__(WROPCODE); /* xor/or/and/mov [..],al/ax */ \ - __EMIT__(0x05); /* di */ \ - __EMIT__(0x47); /* inc di */ \ - __EMIT__(0x47); /* inc di */ \ - __EMIT__(0x49); /* dec cx */ \ - __EMIT__(0x75); /* jnz */ \ - __EMIT__(0xf7); /* loop*/ \ - __EMIT__(0x1f); /* pop ds */ \ - (unsigned)(void near *)(D) = _DI; \ - (unsigned)(void near *)(S) = _SI; \ -} while(0) - -/* need an additional indirection to resolve INS and SIZE */ -#define __INLINE_TMP_OPRCOPY__(D,S,C,INS,SIZE,TY) \ - __INLINE_BCC_OPRCOPY_##SIZE##__(D,S,C,OPCODE_##INS##_mem_##SIZE,TY) - -#define __INLINE_STD_OPRCOPY__(D,S,C,DM,SM,INS,SIZE,TY) \ - __INLINE_TMP_OPRCOPY__(D,S,C,INS,SIZE,TY) - -/* -------------------------------------------------------------------------- */ - -#define __INLINE_BCC_COLCOPY__(D,DS,S,SS,C,WROPCODE,TYPE) do { \ - volatile int _dskip_ = (int)(DS); \ - volatile int _sskip_ = (int)(SS); \ - volatile unsigned int _cnt_ = (unsigned int)(C); \ - __EMIT__(0x1e); /* push ds */ \ - _ES = (unsigned)(void _seg *)(void far *)(S); \ - _SI = (unsigned)(void near *)(S); \ - __EMIT__(0x06); /* push es */ \ - _ES = (unsigned)(void _seg *)(void far *)(D); \ - _DI = (unsigned)(void near *)(D); \ - _BX = (int)(_sskip_); \ - _CX = (int)(_cnt_); \ - _DX = (int)(_dskip_); \ - __EMIT__(0x1f); /* pop ds */ \ - __EMIT__(0xfc); /* cld */ \ - /* loop: */ \ - __EMIT__(0x8a+sizeof(TYPE)-1); /* mov al/ax,[si] */ \ - __EMIT__(0x04); \ - __EMIT__(0x26); /* es: */ \ - __EMIT__(WROPCODE); /* xor/or/and/mov [..],al/ax */ \ - __EMIT__(0x05); /* di */ \ - __EMIT__(0x01); /* add di,dx */ \ - __EMIT__(0xd7); \ - __EMIT__(0x01); /* add si,bx */ \ - __EMIT__(0xde); \ - __EMIT__(0x49); /* dec cx */ \ - __EMIT__(0x75); /* jnz */ \ - __EMIT__(0xf4); /* loop*/ \ - __EMIT__(0x1f); /* pop ds */ \ - (unsigned)(void near *)(D) = _DI; \ - (unsigned)(void near *)(S) = _SI; \ -} while(0) - -/* need an additional indirection to resolve INS and SIZE */ -#define __INLINE_STD_COLCOPY__(D,DSKP,S,SSKP,C,DM,SM,INS,SIZE,TYPE) \ - __INLINE_TMP1_COLCOPY__(D,DSKP,S,SSKP,C,INS,SIZE,TYPE) -#define __INLINE_TMP1_COLCOPY__(D,DS,S,SS,C,INS,SIZE,TY) \ - __INLINE_TMP2_COLCOPY__(D,DS,S,SS,C,OPCODE_##INS##_mem_##SIZE,TY) -#define __INLINE_TMP2_COLCOPY__(D,DS,S,SS,C,WOPC,TY) \ - __INLINE_BCC_COLCOPY__(D,DS,S,SS,C,WOPC,TY) - - -/* memory -> video copy */ -#define rowcopy_b_f_set rowcopy_b_set -#define rowcopy_w_f_set rowcopy_w_set -#define rowcopy_l_f_set rowcopy_l_set - -#define rowcopy_b_f_xor rowcopy_b_xor -#define rowcopy_w_f_xor rowcopy_w_xor -#define rowcopy_l_f_xor rowcopy_l_xor - -#define rowcopy_b_f_or rowcopy_b_or -#define rowcopy_w_f_or rowcopy_w_or -#define rowcopy_l_f_or rowcopy_l_or - -#define rowcopy_b_f_and rowcopy_b_and -#define rowcopy_w_f_and rowcopy_w_and -#define rowcopy_l_f_and rowcopy_l_and - -/* video -> memory copy */ -#define rowcopy_b_set_f rowcopy_b_set -#define rowcopy_w_set_f rowcopy_w_set -#define rowcopy_l_set_f rowcopy_l_set - -#define rowcopy_b_xor_f rowcopy_b_xor -#define rowcopy_w_xor_f rowcopy_w_xor -#define rowcopy_l_xor_f rowcopy_l_xor - -#define rowcopy_b_or_f rowcopy_b_or -#define rowcopy_w_or_f rowcopy_w_or -#define rowcopy_l_or_f rowcopy_l_or - -#define rowcopy_b_and_f rowcopy_b_and -#define rowcopy_w_and_f rowcopy_w_and -#define rowcopy_l_and_f rowcopy_l_and - -/* video -> video copy */ -#define rowcopy_b_f_set_f rowcopy_b_set -#define rowcopy_w_f_set_f rowcopy_w_set -#define rowcopy_l_f_set_f rowcopy_l_set - -#define rowcopy_b_f_xor_f rowcopy_b_xor -#define rowcopy_w_f_xor_f rowcopy_w_xor -#define rowcopy_l_f_xor_f rowcopy_l_xor - -#define rowcopy_b_f_or_f rowcopy_b_or -#define rowcopy_w_f_or_f rowcopy_w_or -#define rowcopy_l_f_or_f rowcopy_l_or - -#define rowcopy_b_f_and_f rowcopy_b_and -#define rowcopy_w_f_and_f rowcopy_w_and -#define rowcopy_l_f_and_f rowcopy_l_and - - -/* ------------------------------------------- optimal fills */ -extern void far *_GR_fwdcopy_set(void near *ap, void far *d, - void far *s, unsigned cnt); -extern void far *_GR_fwdcopy_xor(void near *ap, void far *d, - void far *s, unsigned cnt); -extern void far *_GR_fwdcopy_or( void near *ap, void far *d, - void far *s, unsigned cnt); -extern void far *_GR_fwdcopy_and(void near *ap, void far *d, - void far *s, unsigned cnt); - -#define __BCC_FWD_COPY__(OP,ap,d,s,c) do { \ - (d) = _GR_fwdcopy_##OP((void near *)(ap),(void far *)(d), \ - (void far *)(s), (unsigned)(c) ); \ - ((char far *)(s)) += (unsigned)(c); \ -} while (0) - -#define fwdcopy_set(ap,d,s,c) __BCC_FWD_COPY__(set,ap,d,s,c) -#define fwdcopy_f_set fwdcopy_set -#define fwdcopy_set_f fwdcopy_set -#define fwdcopy_f_set_f fwdcopy_set - -#define fwdcopy_xor(ap,d,s,c) __BCC_FWD_COPY__(xor,ap,d,s,c) -#define fwdcopy_f_xor fwdcopy_xor -#define fwdcopy_xor_f fwdcopy_xor -#define fwdcopy_f_xor_f fwdcopy_xor - -#define fwdcopy_or(ap,d,s,c) __BCC_FWD_COPY__(or,ap,d,s,c) -#define fwdcopy_f_or fwdcopy_or -#define fwdcopy_or_f fwdcopy_or -#define fwdcopy_f_or_f fwdcopy_or - -#define fwdcopy_and(ap,d,s,c) __BCC_FWD_COPY__(and,ap,d,s,c) -#define fwdcopy_f_and fwdcopy_and -#define fwdcopy_and_f fwdcopy_and -#define fwdcopy_f_and_f fwdcopy_and diff --git a/thirdparty/grx249/src/include/bcc/memfill.h b/thirdparty/grx249/src/include/bcc/memfill.h deleted file mode 100644 index a57a092..0000000 --- a/thirdparty/grx249/src/include/bcc/memfill.h +++ /dev/null @@ -1,114 +0,0 @@ -/** - ** memfill.h ---- inline assembly memory fill macros - ** Borland-C++ special version - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Basic and optimized memory block fill operations in byte, word and - ** long sizes. The fills are available in WRITE, XOR, OR and AND modes. - **/ - -#include "bcc/asmsupp.h" - -#define __INLINE_STD_ROWFILL__(P,V,C,FMODE,SIZE,TYPE) do { \ - _ES = (unsigned)(void _seg *)(void far *)(P); \ - _DI = (unsigned)(void near *)(P); \ - _CX = (int)(C); \ - _AX = (int)(V); \ - __emit__((char)(0xfc)); /* cld */ \ - __emit__((char)(0xf3)); /* rep */ \ - __emit__((char)(0xaa + sizeof(TYPE) - 1)); /* stosB|W */ \ - (unsigned)(void near *)(P) = _DI; \ -} while(0) - -#define __INLINE_BCC_COLFILL__(P,V,C,SKIP,INS,SIZE) do { \ - (P) = _GR_colfill_##SIZE##_##INS((P),(SKIP),(V),(C)); \ -} while(0) - -#define __INLINE_STD_COLFILL__(P,V,C,SKIP,FMODE,INS,SIZE,TYPE) \ - __INLINE_BCC_COLFILL__(P,V,C,SKIP,INS,SIZE) - -#define __INLINE_FAR_ROWFILL__(P,V,C,FMODE,SIZE,TYPE) \ - __INLINE_STD_ROWFILL__(P,V,C,FMODE,SIZE,TYPE) - -#define __INLINE_B_REPFILL__(P,V,C,FMODE) rowfill_b##FMODE(P,V,C) -#define __INLINE_W_REPFILL__(P,V,C,FMODE) rowfill_w##FMODE(P,V,C) -#define __INLINE_L_REPFILL__(P,V,C,FMODE) rowfill_l##FMODE(P,V,C) - -void far *_GR_colfill_b_mov(void far *P, int O, unsigned char V, unsigned C); -void far *_GR_colfill_b_xor(void far *P, int O, unsigned char V, unsigned C); -void far *_GR_colfill_b_or( void far *P, int O, unsigned char V, unsigned C); -void far *_GR_colfill_b_and(void far *P, int O, unsigned char V, unsigned C); - -void far *_GR_colfill_w_mov(void far *P, int O, unsigned V, unsigned C); -void far *_GR_colfill_w_xor(void far *P, int O, unsigned V, unsigned C); -void far *_GR_colfill_w_or( void far *P, int O, unsigned V, unsigned C); -void far *_GR_colfill_w_and(void far *P, int O, unsigned V, unsigned C); - -void far *_GR_colfill_l_mov(void far *P, int O, unsigned long V, unsigned C); -void far *_GR_colfill_l_xor(void far *P, int O, unsigned long V, unsigned C); -void far *_GR_colfill_l_or( void far *P, int O, unsigned long V, unsigned C); -void far *_GR_colfill_l_and(void far *P, int O, unsigned long V, unsigned C); - -#define rowfill_l(p,v,c) do (p)=_GR_colfill_l_mov((p),4,(v),(c)); while(0) -#define rowfill_l_xor(p,v,c) do (p)=_GR_colfill_l_xor((p),4,(v),(c)); while(0) -#define rowfill_l_or(p,v,c) do (p)=_GR_colfill_l_or( (p),4,(v),(c)); while(0) -#define rowfill_l_and(p,v,c) do (p)=_GR_colfill_l_and((p),4,(v),(c)); while(0) - -#define rowfill_l_f(p,v,c) rowfill_l( (p),(v),(c)) -#define rowfill_l_f_xor(p,v,c) rowfill_l_xor((p),(v),(c)) -#define rowfill_l_f_or(p,v,c) rowfill_l_or( (p),(v),(c)) -#define rowfill_l_f_and(p,v,c) rowfill_l_and((p),(v),(c)) - - -void far *_GR_repfill_b( void far *P,unsigned int V, unsigned int C); -void far *_GR_repfill_b_xor(void far *P,unsigned int V, unsigned int C); -void far *_GR_repfill_b_or( void far *P,unsigned int V, unsigned int C); -void far *_GR_repfill_b_and(void far *P,unsigned int V, unsigned int C); - -#define repfill_b(p,v,c) do (p) = _GR_repfill_b( (p),(v),(c)); while(0) -#define repfill_b_xor(p,v,c) do (p) = _GR_repfill_b_xor((p),(v),(c)); while(0) -#define repfill_b_or(p,v,c) do (p) = _GR_repfill_b_or( (p),(v),(c)); while(0) -#define repfill_b_and(p,v,c) do (p) = _GR_repfill_b_and((p),(v),(c)); while(0) - -#define repfill_b_f(p,v,c) repfill_b( (p),(v),(c)) -#define repfill_b_f_xor(p,v,c) repfill_b_xor((p),(v),(c)) -#define repfill_b_f_or(p,v,c) repfill_b_or( (p),(v),(c)) -#define repfill_b_f_and(p,v,c) repfill_b_and((p),(v),(c)) - - -#define __INLINE_MEMFILL__(P,V,C,SIZE,TYPE,FMODE) do { \ - void far *_PTR = (void far *)(P); \ - register int _VAL = (int)(V); \ - register int _CNT = (int)(C); \ - rowfill_##SIZE##FMODE(_PTR,_VAL,_CNT); \ -} while(0) - - -void far *_GR_repfill_24_set(void far *P,unsigned long V, unsigned int B); -void far *_GR_repfill_24_xor(void far *P,unsigned long V, unsigned int B); -void far *_GR_repfill_24_or( void far *P,unsigned long V, unsigned int B); -void far *_GR_repfill_24_and(void far *P,unsigned long V, unsigned int B); - -#define GRX_HAVE_FAST_REPFILL24 - -#define repfill_24(p,v,b) do (p)=_GR_repfill_24_set((p),(v),(b)); while(0) -#define repfill_24_xor(p,v,b) do (p)=_GR_repfill_24_xor((p),(v),(b)); while(0) -#define repfill_24_or(p,v,b) do (p)=_GR_repfill_24_or( (p),(v),(b)); while(0) -#define repfill_24_and(p,v,b) do (p)=_GR_repfill_24_and((p),(v),(b)); while(0) - -#define repfill_24_f(p,v,b) repfill_24( (p),(v),(b)) -#define repfill_24_f_xor(p,v,b) repfill_24_xor((p),(v),(b)) -#define repfill_24_f_or(p,v,b) repfill_24_or( (p),(v),(b)) -#define repfill_24_f_and(p,v,b) repfill_24_and((p),(v),(b)) diff --git a/thirdparty/grx249/src/include/bcc/memmode.h b/thirdparty/grx249/src/include/bcc/memmode.h deleted file mode 100644 index adddf97..0000000 --- a/thirdparty/grx249/src/include/bcc/memmode.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - ** memmode.h ---- determine how to access video and system RAM - ** Borland-C++ code - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include - -#define DECLARE_XFER_BUFFER(size) char XFER_BUFFER[size] -#define DELETE_XFER_BUFFER -#define FP86_SEG(p) FP_SEG(p) -#define FP86_OFF(p) FP_OFF(p) diff --git a/thirdparty/grx249/src/include/bcc/mempeek.h b/thirdparty/grx249/src/include/bcc/mempeek.h deleted file mode 100644 index d3528e3..0000000 --- a/thirdparty/grx249/src/include/bcc/mempeek.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - ** mempeek.h ---- (far) memory read/write operations - ** Borland-C code - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Basic memory peek and poke operations in byte, word and long sizes. - ** The poke operations are available in WRITE, XOR, OR and AND versions. - ** - **/ - -/* There's actually nothing special except of far pointer usage */ -#define __INLINE_STD_PEEK__(P,S,T) (*(unsigned T far *)(P)) -#define __INLINE_STD_POKE__(P,V,OP,I,S,T) (*(unsigned T far *)(P) OP (V)) - -#define __INLINE_FAR_PEEK__(P,S,T) (*(volatile unsigned T far *)(P)) -#define __INLINE_FAR_POKE__(P,V,OP,I,S,T) (*(volatile unsigned T far *)(P) OP (V)) - - -/* optimized 24bpp access */ - -#include "access24.h" - -#define __INLINE_24_PEEK__(P) ( \ - _ES = (unsigned)(void _seg *)(void far *)(P), \ - _DI = (unsigned)(void near *)(P), \ - (__emit__(0x26),__emit__(0x8b),__emit__(0x05), /* mov ax,es:[di] */ \ - __emit__(0x26),__emit__(0x8a), /* mov dl,es:[di+2] */ \ - __emit__(0x55), __emit__(0x02), \ - __emit__(0x30), __emit__(0xf6) ), /* xor dh,dh */ \ - (long)((void _seg *)_DX + (void near *)_AX) \ -) -#define __INLINE_24_FAR_PEEK__ __INLINE_24_PEEK__ - - -#define __INLINE_24_BCC_POKE__(P,C,OPC_w,OPC_b) do { \ - _AX = (unsigned)(C); \ - _ES = (unsigned)(void _seg *)(void far *)(P); \ - _DI = (unsigned)(void near *)(P); \ - __emit__((char)(0x26)); /* es: */ \ - __emit__((char)(OPC_w)); /* xor/or/and/mov [..],ax */ \ - __emit__((char)(0x05)); /* di */ \ - __emit__((char)(0x47)); /* inc di */ \ - __emit__((char)(0x47)); /* inc di */ \ - _AL = RD24BYTE((C),2); \ - __emit__((char)(0x26)); /* es: */ \ - __emit__((char)(OPC_b)); /* xor/or/and/mov [..],al */ \ - __emit__((char)(0x05)); /* di */ \ -} while (0) - - -#define __INLINE_24_POKE__(P,C,OP,INS) \ - __INLINE_24_TMP1_POKE__(P,C,INS) -#define __INLINE_24_TMP1_POKE__(P,C,INS) \ - __INLINE_24_TMP2_POKE__(P,C,OPCODE_##INS##_mem_w,OPCODE_##INS##_mem_b) -#define __INLINE_24_TMP2_POKE__(P,C,OPCw,OPCb) \ - __INLINE_24_BCC_POKE__(P,C,OPCw,OPCb) - -#define __INLINE_24_FAR_POKE__ __INLINE_24_POKE__ diff --git a/thirdparty/grx249/src/include/clipping.h b/thirdparty/grx249/src/include/clipping.h deleted file mode 100644 index b2a6079..0000000 --- a/thirdparty/grx249/src/include/clipping.h +++ /dev/null @@ -1,239 +0,0 @@ -/** - ** clipping.h ---- macros to clip pixels lines and boxes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __CLIPPING_H_INCLUDED__ -#define __CLIPPING_H_INCLUDED__ - -#ifndef __ARITH_H_INCLUDED__ -#include "arith.h" -#endif - -/* - * clip pixels and pixel ranges to the clip box - */ -#define clip_xdot_(c,x,when_out) { \ - if((x > c->gc_xcliphi) || (x < c->gc_xcliplo)) { when_out; } \ -} - -#define clip_ydot_(c,y,when_out) { \ - if((y > c->gc_ycliphi) || (y < c->gc_ycliplo)) { when_out; } \ -} - -#define clip_dot_(c,x,y,when_out) { \ - clip_xdot_(c,x,when_out); \ - clip_ydot_(c,y,when_out); \ -} - -#define clip_ordxrange_(c,x1,x2,when_out,when_clip) { \ - if(x1 > c->gc_xcliphi) { when_out; } \ - if(x2 < c->gc_xcliplo) { when_out; } \ - if(x1 < c->gc_xcliplo) { x1 = c->gc_xcliplo; when_clip; } \ - if(x2 > c->gc_xcliphi) { x2 = c->gc_xcliphi; when_clip; } \ -} - -#define clip_ordyrange_(c,y1,y2,when_out,when_clip) { \ - if(y1 > c->gc_ycliphi) { when_out; } \ - if(y2 < c->gc_ycliplo) { when_out; } \ - if(y1 < c->gc_ycliplo) { y1 = c->gc_ycliplo; when_clip; } \ - if(y2 > c->gc_ycliphi) { y2 = c->gc_ycliphi; when_clip; } \ -} - -#define clip_xrange_(c,x1,x2,when_out,when_clip) { \ - isort(x1,x2); \ - clip_ordxrange_(c,x1,x2,when_out,when_clip); \ -} - -#define clip_yrange_(c,y1,y2,when_out,when_clip) { \ - isort(y1,y2); \ - clip_ordyrange_(c,y1,y2,when_out,when_clip); \ -} - -#define clip_ordbox_(c,x1,y1,x2,y2,when_out,when_clip) { \ - clip_ordxrange_(c,x1,x2,when_out,when_clip); \ - clip_ordyrange_(c,y1,y2,when_out,when_clip); \ -} - -#define clip_box_(c,x1,y1,x2,y2,when_out,when_clip) { \ - clip_xrange_(c,x1,x2,when_out,when_clip); \ - clip_yrange_(c,y1,y2,when_out,when_clip); \ -} - -/* - * clip pixels and pixel ranges to the full context - */ -#define cxclip_xdot_(c,x,when_out) { \ - if((unsigned int)x > (unsigned int)c->gc_xmax) { when_out; } \ -} - -#define cxclip_ydot_(c,y,when_out) { \ - if((unsigned int)y > (unsigned int)c->gc_ymax) { when_out; } \ -} - -#define cxclip_dot_(c,x,y,when_out) { \ - cxclip_xdot_(c,x,when_out); \ - cxclip_ydot_(c,y,when_out); \ -} - -#define cxclip_ordxrange_(c,x1,x2,when_out,when_clip) { \ - if(x1 > c->gc_xmax) { when_out; } \ - if(x2 < 0) { when_out; } \ - if(x1 < 0) { x1 = 0; when_clip; } \ - if(x2 > c->gc_xmax) { x2 = c->gc_xmax; when_clip; } \ -} - -#define cxclip_ordyrange_(c,y1,y2,when_out,when_clip) { \ - if(y1 > c->gc_ymax) { when_out; } \ - if(y2 < 0) { when_out; } \ - if(y1 < 0) { y1 = 0; when_clip; } \ - if(y2 > c->gc_ymax) { y2 = c->gc_ymax; when_clip; } \ -} - -#define cxclip_xrange_(c,x1,x2,when_out,when_clip) { \ - isort(x1,x2); \ - cxclip_ordxrange_(c,x1,x2,when_out,when_clip); \ -} - -#define cxclip_yrange_(c,y1,y2,when_out,when_clip) { \ - isort(y1,y2); \ - cxclip_ordyrange_(c,y1,y2,when_out,when_clip); \ -} - -#define cxclip_ordbox_(c,x1,y1,x2,y2,when_out,when_clip) { \ - cxclip_ordxrange_(c,x1,x2,when_out,when_clip); \ - cxclip_ordyrange_(c,y1,y2,when_out,when_clip); \ -} - -#define cxclip_box_(c,x1,y1,x2,y2,when_out,when_clip) { \ - cxclip_xrange_(c,x1,x2,when_out,when_clip); \ - cxclip_yrange_(c,y1,y2,when_out,when_clip); \ -} - -/* - * clip lines to the clip box - */ -#define clip_hline_(c,x1,x2,y,when_out,when_clip) { \ - clip_ydot_(c,y,when_out); \ - clip_xrange_(c,x1,x2,when_out,when_clip); \ -} - -#define clip_vline_(c,x,y1,y2,when_out,when_clip) { \ - clip_xdot_(c,x,when_out); \ - clip_yrange_(c,y1,y2,when_out,when_clip); \ -} - -#define clip_line_xmin_(c,x1,y1,x2,y2,when_clip) { \ - if(x1 < c->gc_xcliplo) { \ - y1 += irscale((y2 - y1),(c->gc_xcliplo - x1),(x2 - x1)); \ - x1 = c->gc_xcliplo; \ - when_clip; \ - } \ -} - -#define clip_line_xmax_(c,x1,y1,x2,y2,when_clip) { \ - if(x2 > c->gc_xcliphi) { \ - y2 -= irscale((y2 - y1),(x2 - c->gc_xcliphi),(x2 - x1)); \ - x2 = c->gc_xcliphi; \ - when_clip; \ - } \ -} - -#define clip_line_ymin_(c,x1,y1,x2,y2,when_clip) { \ - if(y1 < c->gc_ycliplo) { \ - x1 += irscale((x2 - x1),(c->gc_ycliplo - y1),(y2 - y1)); \ - y1 = c->gc_ycliplo; \ - when_clip; \ - } \ -} - -#define clip_line_ymax_(c,x1,y1,x2,y2,when_clip) { \ - if(y2 > c->gc_ycliphi) { \ - x2 -= irscale((x2 - x1),(y2 - c->gc_ycliphi),(y2 - y1)); \ - y2 = c->gc_ycliphi; \ - when_clip; \ - } \ -} - -#define clip_line_(c,x1,y1,x2,y2,when_out,when_clip) { \ - if(x1 < x2) { \ - if(x2 < c->gc_xcliplo) { when_out; } \ - if(x1 > c->gc_xcliphi) { when_out; } \ - clip_line_xmin_(c,x1,y1,x2,y2,when_clip); \ - clip_line_xmax_(c,x1,y1,x2,y2,when_clip); \ - } \ - else { \ - if(x1 < c->gc_xcliplo) { when_out; } \ - if(x2 > c->gc_xcliphi) { when_out; } \ - clip_line_xmin_(c,x2,y2,x1,y1,when_clip); \ - clip_line_xmax_(c,x2,y2,x1,y1,when_clip); \ - } \ - if(y1 < y2) { \ - if(y2 < c->gc_ycliplo) { when_out; } \ - if(y1 > c->gc_ycliphi) { when_out; } \ - clip_line_ymin_(c,x1,y1,x2,y2,when_clip); \ - clip_line_ymax_(c,x1,y1,x2,y2,when_clip); \ - } \ - else { \ - if(y1 < c->gc_ycliplo) { when_out; } \ - if(y2 > c->gc_ycliphi) { when_out; } \ - clip_line_ymin_(c,x2,y2,x1,y1,when_clip); \ - clip_line_ymax_(c,x2,y2,x1,y1,when_clip); \ - } \ -} - -/* - * clipping with default actions: outside => return, clipped => nothing - */ -/* some systems have problems with emtpy macro args ... */ -#if defined(__GNUC__) || defined(__TURBOC__) -#define CLIP_EMPTY_MACRO_ARG -#endif - -#ifndef CLIP_EMPTY_MACRO_ARG -#define CLIP_EMPTY_MACRO_ARG do ; while(0) -#endif - -#define clip_xdot(c,x) clip_xdot_(c,x,return) -#define clip_ydot(c,x) clip_ydot_(c,y,return) -#define clip_dot(c,x,y) clip_dot_(c,x,y,return) -#define clip_ordxrange(c,x1,x2) clip_ordxrange_(c,x1,x2,return,CLIP_EMPTY_MACRO_ARG) -#define clip_ordyrange(c,y1,y2) clip_ordyrange_(c,y1,y2,return,CLIP_EMPTY_MACRO_ARG) -#define clip_xrange(c,x1,x2) clip_xrange_(c,x1,x2,return,CLIP_EMPTY_MACRO_ARG) -#define clip_yrange(c,y1,y2) clip_yrange_(c,y1,y2,return,CLIP_EMPTY_MACRO_ARG) -#define clip_ordbox(c,x1,y1,x2,y2) clip_ordbox_(c,x1,y1,x2,y2,return,CLIP_EMPTY_MACRO_ARG) -#define clip_box(c,x1,y1,x2,y2) clip_box_(c,x1,y1,x2,y2,return,CLIP_EMPTY_MACRO_ARG) - -#define cxclip_xdot(c,x) cxclip_xdot_(c,x,return) -#define cxclip_ydot(c,x) cxclip_ydot_(c,y,return) -#define cxclip_dot(c,x,y) cxclip_dot_(c,x,y,return) -#define cxclip_ordxrange(c,x1,x2) cxclip_ordxrange_(c,x1,x2,return,CLIP_EMPTY_MACRO_ARG) -#define cxclip_ordyrange(c,y1,y2) cxclip_ordyrange_(c,y1,y2,return,CLIP_EMPTY_MACRO_ARG) -#define cxclip_xrange(c,x1,x2) cxclip_xrange_(c,x1,x2,return,CLIP_EMPTY_MACRO_ARG) -#define cxclip_yrange(c,y1,y2) cxclip_yrange_(c,y1,y2,return,CLIP_EMPTY_MACRO_ARG) -#define cxclip_ordbox(c,x1,y1,x2,y2) cxclip_ordbox_(c,x1,y1,x2,y2,return,CLIP_EMPTY_MACRO_ARG) -#define cxclip_box(c,x1,y1,x2,y2) cxclip_box_(c,x1,y1,x2,y2,return,CLIP_EMPTY_MACRO_ARG) - -#define clip_hline(c,x1,x2,y) clip_hline_(c,x1,x2,y,return,CLIP_EMPTY_MACRO_ARG) -#define clip_vline(c,x,y1,y2) clip_vline_(c,x,y1,y2,return,CLIP_EMPTY_MACRO_ARG) -#define clip_line_xmin(c,x1,y1,x2,y2) clip_line_xmin_(c,x1,y1,x2,y2,CLIP_EMPTY_MACRO_ARG) -#define clip_line_xmax(c,x1,y1,x2,y2) clip_line_xmax_(c,x1,y1,x2,y2,CLIP_EMPTY_MACRO_ARG) -#define clip_line_ymin(c,x1,y1,x2,y2) clip_line_ymin_(c,x1,y1,x2,y2,CLIP_EMPTY_MACRO_ARG) -#define clip_line_ymax(c,x1,y1,x2,y2) clip_line_ymax_(c,x1,y1,x2,y2,CLIP_EMPTY_MACRO_ARG) -#define clip_line(c,x1,y1,x2,y2) clip_line_(c,x1,y1,x2,y2,return,CLIP_EMPTY_MACRO_ARG) - -#endif /* whole file */ - diff --git a/thirdparty/grx249/src/include/docolor.h b/thirdparty/grx249/src/include/docolor.h deleted file mode 100644 index 1c33ace..0000000 --- a/thirdparty/grx249/src/include/docolor.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - ** docolor.h ---- color mode operation check table - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -extern unsigned int _GrFDdotable8[]; - -#define DOCOLOR8(c,op) (_GrFDdotable8[(op)] ^ (unsigned int)(unsigned char)(c)) - diff --git a/thirdparty/grx249/src/include/gcc/arith.h b/thirdparty/grx249/src/include/gcc/arith.h deleted file mode 100644 index 6cdb969..0000000 --- a/thirdparty/grx249/src/include/gcc/arith.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - ** arith.h ---- some common integer arithmetic macros/inline functions - ** Special GNU-C handling - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* - * [i|u]scale(X,N,D) - * scale an integer with long intermediate result but without using long - * arithmetic all the way - */ - -#define irscale(X,N,D) ({ \ - register int _SclVal_ = iscale(((int)(X) << 1),N,D); \ - (_SclVal_ + (_SclVal_ >> (bitsof(int) - 1)) + 1) >> 1; \ -}) - -/* ================================================================ */ -/* == 80386 FAMILY == */ -/* ================================================================ */ -#ifdef __i386__ -/* - * replicate_2(byte_or_word_value) - * copy the lower byte(s) of a byte or word into the upper byte(s) - */ - -#define replicate_b2w(BYTE) (__builtin_constant_p(BYTE) ? \ - (long)(0x00000101UL * (GR_int8u)(BYTE)) : \ - ({ \ - register long _repvalue; \ - __asm__( \ - "movzbl %b1,%0 " "\n\t" \ - "movb %b0,%h0 " \ - : "=q" (_repvalue) \ - : "0m" ((char)(BYTE)) \ - ); \ - _repvalue; \ - }) \ -) - -#define replicate_w2l(WORD) (__builtin_constant_p(WORD) ? \ - (long)(0x00010001UL * (GR_int16u)(WORD)) : \ - ({ \ - register long _repvalue; \ - __asm__( \ - "movw %w1,%w0 " "\n\t" \ - "shll $16,%0 " "\n\t" \ - "movw %w1,%w0 " \ - : "=&r" (_repvalue) \ - : "rm" ((GR_int16u)(WORD)) \ - ); \ - _repvalue; \ - }) \ -) - -#define replicate_b2l(BYTE) (__builtin_constant_p(BYTE) ? \ - (long)(0x01010101UL * (GR_int8u)(BYTE)) : \ - ({ \ - register long _repvalue; \ - __asm__( \ - "movb %b1,%b0 " "\n\t" \ - "movb %b0,%h0 " "\n\t" \ - "shll $16,%0 " "\n\t" \ - "movb %b1,%b0 " "\n\t" \ - "movb %b0,%h0 " \ - : "=&q" (_repvalue) \ - : "qm" ((char)(BYTE)) \ - ); \ - _repvalue; \ - }) \ -) - -#endif /* __i386__ */ diff --git a/thirdparty/grx249/src/include/gcc/asmsupp.h b/thirdparty/grx249/src/include/gcc/asmsupp.h deleted file mode 100644 index 139660c..0000000 --- a/thirdparty/grx249/src/include/gcc/asmsupp.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Define assembler memonics for asm code creation - * and memonic extensions for different operand sizes - */ - -#define MOV_INS mov -#define XOR_INS xor -#define OR_INS or -#define AND_INS and - -#define OP8b b -#define OP16b w -#define OP32b l diff --git a/thirdparty/grx249/src/include/gcc/highlow.h b/thirdparty/grx249/src/include/gcc/highlow.h deleted file mode 100644 index 573039d..0000000 --- a/thirdparty/grx249/src/include/gcc/highlow.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - ** highlow.h ---- combining two BYTES into one WORD -- GNU-C special - ** - ** Copyright (c) 1997 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* ================================================================ */ -/* == 80386 FAMILY == */ -/* ================================================================ */ -#ifdef __i386__ -#if __GNUC_MAJOR__==2 && __GNUC_MINOR__<=8 -/* should not be used for EGCS/GCC after v2.8.x */ - -/* combine two bytes into one word: optimized i386 version */ -#define highlow(hi,lo) ({ \ - register GR_int32u _res_; \ - if(__builtin_constant_p((hi))&& __builtin_constant_p((lo))) \ - _res_ = __highlow__((hi),(lo)); \ - else \ - if(__builtin_constant_p((hi))) \ - __asm__ volatile( " movb %b1,%b0" \ - : "=&q" (_res_) \ - : "qnm" ((GR_int8u)(lo)), "0" (((int)(hi))<<8) ); \ - else \ - __asm__ volatile( " movb %b1,%h0" \ - : "=&q" (_res_) \ - : "qnm" ((GR_int8u)(hi)), "0" ((int)(lo)) ); \ - _res_; \ -}) - - -/* high from *p / low from *(p+1) */ -#define highlowP(p) ({ \ - register GR_int32u _res_; \ - __asm__ volatile( "xorl %0,%0 \n\t" \ - "movw (%1),%w0 \n\t" \ - "exch %b0,%h0 " \ - : "=&q" (_res_) \ - : "r" ((GR_int8u *)(p)) \ - ); \ - _res_; \ -}) - -#endif /* __GNUC_MAJOR__==2 && __GNUC_MINOR__<=8 */ -#endif /* __i386__ */ diff --git a/thirdparty/grx249/src/include/gcc/memcopy.h b/thirdparty/grx249/src/include/gcc/memcopy.h deleted file mode 100644 index 95b27eb..0000000 --- a/thirdparty/grx249/src/include/gcc/memcopy.h +++ /dev/null @@ -1,243 +0,0 @@ -/** - ** memcopy.h ---- inline assembly memory copy macros -- GNU-C code - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* ================================================================ */ -/* == 80386 FAMILY == */ -/* ================================================================ */ -#ifdef __i386__ - -#ifndef MOV_INS -#include "gcc/asmsupp.h" -#endif - -#define __INLINE_386_ROWCOPY__(D,S,C,SIZE) ({ \ - __asm__ volatile( \ - " cld \n" \ - " rep \n" \ - " movs"#SIZE \ - : "=D" ((void *)(D)), "=S" ((void *)(S)), "=c" ((int)(C)) \ - : "0" ((void *)(D)), "1" ((void *)(S)), "2" ((int)(C)) \ - : "memory" \ - ); \ -}) - -#define __INLINE_STD_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) \ - __INLINE_386_ROWCOPY__(D,S,C,SIZE) - -#define __INLINE_386_G_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL) ({ \ - register TYPE _scr_; \ - __asm__ volatile("" \ - " incl %2 \n" \ - " shrl $1,%2 \n" \ - " jnc 1f \n" \ - " jmp 0f \n" \ - " .align 4,0x90 \n" \ - "0: "#SIN""#SIZE" "#SSEL"(%1),%3 \n" \ - " addl %8,%1 \n" \ - " "#DIN""#SIZE" %3,"#DSEL"(%0) \n" \ - " addl %7,%0 \n" \ - "1: "#SIN""#SIZE" "#SSEL"(%1),%3 \n" \ - " addl %8,%1 \n" \ - " "#DIN""#SIZE" %3,"#DSEL"(%0) \n" \ - " addl %7,%0 \n" \ - " decl %2 \n" \ - " jne 0b" \ - : "=r" ((void *)(DP)),"=r" ((void *)(SP)),"=r" ((int)(C)), \ - "=&q" ((TYPE)_scr_) \ - : "0" ((void *)(DP)),"1" ((void *)(SP)), "2" ((int)(C)), \ - "gn" ((int)(DS)), "gn" ((int)(SS)) \ - : "memory" \ - ); \ -}) - -#define __INLINE_386_C_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,DINC,SINC) ({\ - register TYPE _scr_; \ - __asm__ volatile("" \ - " incl %2 \n" \ - " shrl $1,%2 \n" \ - " jnc 1f \n" \ - " jmp 0f \n" \ - " .align 4,0x90 \n" \ - "0: "#SIN""#SIZE" "#SSEL"(%1),%3 \n" \ - " " SINC " \n" \ - " "#DIN""#SIZE" %3,"#DSEL"(%0) \n" \ - " " DINC " \n" \ - "1: "#SIN""#SIZE" "#SSEL"(%1),%3 \n" \ - " " SINC " \n" \ - " "#DIN""#SIZE" %3,"#DSEL"(%0) \n" \ - " " DINC " \n" \ - " decl %2 \n" \ - " jne 0b" \ - : "=r" ((void *)(DP)),"=r" ((void *)(SP)),"=r" ((int)(C)), \ - "=&q" ((TYPE)_scr_) \ - : "0" ((void *)(DP)),"1" ((void *)(SP)), "2" ((int)(C)) \ - : "memory" \ - ); \ -}) - -#define __INLINE_386_C2_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,DINC) ({\ - if( (SS) == 1 ) \ - __INLINE_386_C_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,DINC,"incl %1");\ - else \ - if( (SS) == -1 ) \ - __INLINE_386_C_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,DINC,"decl %1");\ - else \ - if( (SS) == 2 ) \ - __INLINE_386_C_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,DINC,"leal 2(%1),%1");\ - else \ - if( (SS) == -2 ) \ - __INLINE_386_C_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,DINC,"leal -2(%1),%1");\ - else \ - if( (SS) == 4 ) \ - __INLINE_386_C_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,DINC,"leal 4(%1),%1");\ - else \ - if( (SS) == -4 ) \ - __INLINE_386_C_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,DINC,"leal -4(%1),%1");\ - else \ - __INLINE_386_G_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL); \ -}) - -#define __INLINE_386_C1_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL) ({ \ - if( (DS) == 1 ) \ - __INLINE_386_C2_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,"incl %0");\ - else \ - if( (DS) == -1 ) \ - __INLINE_386_C2_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,"decl %0");\ - else \ - if( (DS) == 2 ) \ - __INLINE_386_C2_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,"leal 2(%0),%0");\ - else \ - if( (DS) == -2 ) \ - __INLINE_386_C2_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,"leal -2(%0),%0");\ - else \ - if( (DS) == 4 ) \ - __INLINE_386_C2_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,"leal 4(%0),%0");\ - else \ - if( (DS) == -4 ) \ - __INLINE_386_C2_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL,"leal -4(%0),%0");\ - else \ - __INLINE_386_G_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL); \ -}) - - -#define __INLINE_386_COLCOPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL) ({ \ - if(__builtin_constant_p(DS) && __builtin_constant_p(SS) ) \ - __INLINE_386_C1_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL); \ - else \ - __INLINE_386_G_COPY__(DP,DS,SP,SS,C,DIN,SIN,SIZE,TYPE,DSEL,SSEL); \ -}) - -#define __INLINE_SEGSEG_ROWCOPY__(D,S,C,SZ,T,DS,SS) \ - __INLINE_386_COLCOPY__(D,CPSIZE_##SZ,S,CPSIZE_##SZ,C,mov,mov,SZ,T,DS,SS) - -/* memory -> memory copies */ -#define __INLINE_STD_COLCOPY__(D,DSKP,S,SSKP,C,DM,SM,INS,SIZE,TYPE) \ - __INLINE_386_COLCOPY__(D,DSKP,S,SSKP,C,INS,mov,SIZE,TYPE,,) -#ifdef I386_GCC_FAR_MEMORY -/* memory -> video copies */ -#define __INLINE_FAR_STD_COLCOPY__(DST,DSKP,SRC,SSKP,C,DM,SM,INS,SIZE,TYPE) \ - __INLINE_386_COLCOPY__(DST,DSKP,SRC,SSKP,C,INS,mov,SIZE,TYPE,%%fs:,) -#define __INLINE_FAR_STD_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) \ - __INLINE_SEGSEG_ROWCOPY__(D,S,C,SIZE,TYPE,%%fs:,) -/* video -> memory copies */ -#define __INLINE_STD_FAR_COLCOPY__(DST,DSKP,SRC,SSKP,C,DM,SM,INS,SIZE,TYPE) \ - __INLINE_386_COLCOPY__(DST,DSKP,SRC,SSKP,C,INS,mov,SIZE,TYPE,,%%fs:) -#define __INLINE_STD_FAR_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) \ - __INLINE_SEGSEG_ROWCOPY__(D,S,C,SIZE,TYPE,,%%fs:) -/* video -> video copies */ -#define __INLINE_FAR_FAR_COLCOPY__(DST,DSKP,SRC,SSKP,C,DM,SM,INS,SIZE,TYPE) \ - __INLINE_386_COLCOPY__(DST,DSKP,SRC,SSKP,C,INS,mov,SIZE,TYPE,%%fs:,%%fs:) -#define __INLINE_FAR_FAR_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) \ - __INLINE_SEGSEG_ROWCOPY__(D,S,C,SIZE,TYPE,%%fs:,%%fs:) -#else /* I386_GCC_FAR_MEMORY */ -#define __INLINE_FAR_STD_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) \ - __INLINE_STD_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) -#define __INLINE_STD_FAR_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) \ - __INLINE_STD_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) -#define __INLINE_FAR_FAR_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) \ - __INLINE_STD_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) -#endif /* I386_GCC_FAR_MEMORY */ - -#define fwdcopy_set(AP,D,S,C) do { \ - int _scr_; \ - if ((AP)==(D)) \ - __asm__ volatile("\n" \ - " cld \n" \ - " cmpl $4,%2 \n" \ - " jb 3f \n" \ - " testl $1,%0 \n" \ - " je 1f \n" \ - " movsb \n" \ - " decl %2 \n" \ - "1: testl $2,%0 \n" \ - " je 2f \n" \ - " movsw \n" \ - " decl %2 \n" \ - " decl %2 \n" \ - "2: movl %2,%3 \n" \ - " shrl $2,%3 \n" \ - " je 3f \n" \ - " rep \n" \ - " movsl \n" \ - "3: testl $2,%2 \n" \ - " je 4f \n" \ - " movsw \n" \ - "4: testl $1,%2 \n" \ - " je 5f \n" \ - " movsb \n" \ - "5: " \ - : "=D" ((void *)(D)),"=S" ((void *)(S)),"=r" ((int)(C)), \ - "=&c" ((int)_scr_) \ - : "0" ((void *)(D)), "1" ((void *)(S)), "2" ((int)(C)) \ - : "memory" \ - ); \ - else \ - __asm__ volatile("\n" \ - " cld \n" \ - " cmpl $4,%2 \n" \ - " jb 3f \n" \ - " testl $1,%1 \n" \ - " je 1f \n" \ - " movsb \n" \ - " decl %2 \n" \ - "1: testl $2,%1 \n" \ - " je 2f \n" \ - " movsw \n" \ - " decl %2 \n" \ - " decl %2 \n" \ - "2: movl %2,%3 \n" \ - " shrl $2,%3 \n" \ - " je 3f \n" \ - " rep \n" \ - " movsl \n" \ - "3: testl $2,%2 \n" \ - " je 4f \n" \ - " movsw \n" \ - "4: testl $1,%2 \n" \ - " je 5f \n" \ - " movsb \n" \ - "5: " \ - : "=D" ((void *)(D)),"=S" ((void *)(S)),"=r" ((int)(C)), \ - "=&c" ((int)_scr_) \ - : "0" ((void *)(D)), "1" ((void *)(S)), "2" ((int)(C)) \ - : "memory" \ - ); \ -} while (0) - -#endif /* __i386__ */ - diff --git a/thirdparty/grx249/src/include/gcc/memfill.h b/thirdparty/grx249/src/include/gcc/memfill.h deleted file mode 100644 index f10cd1d..0000000 --- a/thirdparty/grx249/src/include/gcc/memfill.h +++ /dev/null @@ -1,274 +0,0 @@ -/** - ** memfill.h ---- inline assembly memory fill macros -- GNU-C code - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* ================================================================ */ -/* == 80386 FAMILY == */ -/* ================================================================ */ -#ifdef __i386__ - -#ifndef MOV_INS -#include "gcc/asmsupp.h" -#endif - -/* - * Unoptimized row and column fills - */ -#define __INLINE_386_ROWFILL__(P,V,C,SIZE,TYPE) ({ \ - __asm__ volatile( \ - " cld \n" \ - " rep \n" \ - " stos"#SIZE \ - : "=D" ((void *)(P)), "=c" ((int)(C)) \ - : "0" ((void *)(P)), "1" ((int)(C)), \ - "a" ((TYPE)(V)) \ - : "memory" \ - ); \ -}) -#define __INLINE_STD_ROWFILL__(P,V,C,FMODE,SIZE,TYPE) \ - __INLINE_386_ROWFILL__(P,V,C,SIZE,TYPE) - -#define __INLINE_386_COLFILL__(P,V,C,SKIP,INS,SIZE,TYPE,SEL) ({ \ - if(__builtin_constant_p(SKIP) && ((SKIP) == 1)) \ - __asm__ volatile("" \ - " incl %1 \n" \ - " shrl $1,%1 \n" \ - " jnc 1f \n" \ - " jmp 0f \n" \ - " .align 4,0x90 \n" \ - "0: "#INS""#SIZE" %4,"#SEL"(%0) \n" \ - " incl %0 \n" \ - "1: "#INS""#SIZE" %4,"#SEL"(%0) \n" \ - " incl %0 \n" \ - " decl %1 \n" \ - " jne 0b" \ - : "=r" ((void *)(P)), "=r" ((int)(C)) \ - : "0" ((void *)(P)), "1" ((int)(C)), \ - "qn" ((TYPE)(V)) \ - : "memory" \ - ); \ - else \ - if(__builtin_constant_p(SKIP) && ((SKIP) == 2)) \ - __asm__ volatile("" \ - " incl %1 \n" \ - " shrl $1,%1 \n" \ - " jnc 1f \n" \ - " jmp 0f \n" \ - " .align 4,0x90 \n" \ - "0: "#INS""#SIZE" %4,"#SEL"(%0) \n" \ - " leal 2(%0),%0 \n" \ - "1: "#INS""#SIZE" %4,"#SEL"(%0) \n" \ - " leal 2(%0),%0 \n" \ - " decl %1 \n" \ - " jne 0b" \ - : "=r" ((void *)(P)), "=r" ((int)(C)) \ - : "0" ((void *)(P)), "1" ((int)(C)), \ - "qn" ((TYPE)(V)) \ - : "memory" \ - ); \ - else \ - if(__builtin_constant_p(SKIP) && ((SKIP) == 4)) \ - __asm__ volatile("" \ - " incl %1 \n" \ - " shrl $1,%1 \n" \ - " jnc 1f \n" \ - " jmp 0f \n" \ - " .align 4,0x90 \n" \ - "0: "#INS""#SIZE" %4,"#SEL"(%0) \n" \ - " leal 4(%0),%0 \n" \ - "1: "#INS""#SIZE" %4,"#SEL"(%0) \n" \ - " leal 4(%0),%0 \n" \ - " decl %1 \n" \ - " jne 0b" \ - : "=r" ((void *)(P)), "=r" ((int)(C)) \ - : "0" ((void *)(P)), "1" ((int)(C)), \ - "qn" ((TYPE)(V)) \ - : "memory" \ - ); \ - else \ - __asm__ volatile("" \ - " incl %1 \n" \ - " shrl $1,%1 \n" \ - " jnc 1f \n" \ - " jmp 0f \n" \ - " .align 4,0x90 \n" \ - "0: "#INS""#SIZE" %5,"#SEL"(%0) \n" \ - " addl %4,%0 \n" \ - "1: "#INS""#SIZE" %5,"#SEL"(%0) \n" \ - " addl %4,%0 \n" \ - " decl %1 \n" \ - " jne 0b" \ - : "=r" ((void *)(P)), "=r" ((int)(C)) \ - : "0" ((void *)(P)), "1" ((int)(C)), \ - "ng" ((int)(SKIP)), "qn" ((TYPE)(V)) \ - : "memory" \ - ); \ -}) -#define __INLINE_STD_COLFILL__(P,V,C,SKIP,FMODE,INS,SIZE,TYPE) \ - __INLINE_386_COLFILL__(P,V,C,SKIP,INS,SIZE,TYPE,) -#ifdef I386_GCC_FAR_MEMORY -#define __INLINE_FAR_COLFILL__(P,V,C,SKIP,FMODE,INS,SIZE,TYPE) \ - __INLINE_386_COLFILL__(P,V,C,SKIP,INS,SIZE,TYPE,%%fs:) -#else /* I386_GCC_FAR_MEMORY */ -#define __INLINE_FAR_ROWFILL__(P,V,C,FMODE,SIZE,TYPE) \ - __INLINE_STD_ROWFILL__(P,V,C,FMODE,SIZE,TYPE) -#endif /* I386_GCC_FAR_MEMORY */ - -/* ============================================ special optimized fills */ - -/* optimized byte based fill: -** if (c&(~3)) { (* c >= 4 *) -** if (p&1) write 8bit, p++, c--; -** if (p&2) write 16bit, p+=2, c-=2; -** if (c&(~3)) { (* c >= 4 *) -** c>>2 times: write 32bit, p+=4; -** } -** } -** if (c&2) write 16bit, p += 2; -** if (c&1) write 8bit, p++; -*/ -#define repfill_b(p,v,c) do { \ - asm volatile("" \ - " testl $-4,%%ecx \n" \ - " je 2f \n" \ - " testl $1,%%edi \n" \ - " je 0f \n" \ - " movb %%al,(%%edi) \n" \ - " incl %%edi \n" \ - " decl %%ecx \n" \ - "0: testl $2,%%edi \n" \ - " je 1f \n" \ - " movw %%ax,(%%edi) \n" \ - " leal -2(%%ecx),%%ecx \n" \ - " leal 2(%%edi),%%edi \n" \ - "1: testl $-4,%%ecx \n" \ - " je 2f \n" \ - " pushl %%ecx \n" \ - " shrl $2,%%ecx \n" \ - " cld \n" \ - " rep \n" \ - " stosl \n" \ - " popl %%ecx \n" \ - "2: testb $2,%%cl \n" \ - " je 3f \n" \ - " movw %%ax,(%%edi) \n" \ - " leal 2(%%edi),%%edi \n" \ - "3: testb $1,%%cl \n" \ - " je 4f \n" \ - " movb %%al,(%%edi) \n" \ - " incl %%edi \n" \ - "4: " \ - : "=c" ((unsigned int) (c)), \ - "=D" ((void *)(p)) \ - : "0" ((unsigned int) (c)), \ - "1" ((void *)(p)), \ - "a" ((GR_int32u)(v)) \ - : "memory" \ - ); \ -} while (0) - -#ifndef I386_GCC_FAR_MEMORY -/* Video memory is near: use optimized code */ -#define repfill_b_f(p,v,c) repfill_b((p),(v),(c)) -#endif - -/* ====================================================== 24bpp support */ - -#define __INLINE_386_REPFILL24__(p,c,b,INS,SEG) do { \ - int _dummy_; \ - __asm__ volatile ( "\n" \ - " testl $1,%0 \n" \ - " je 1f \n" \ - " "#INS"b %%dl,"#SEG"(%0) \n" \ - " incl %0 \n" \ - " decl %1 \n" \ - " shll $8,%%edx \n" \ - " movb %%dh,%%dl \n" \ - " rorl $16,%%edx \n" \ - "1: testl $2,%0 \n" \ - " je 2f \n" \ - " "#INS"w %%dx,"#SEG"(%0) \n" \ - " leal 2(%0),%0 \n" \ - " leal -2(%1),%1 \n" \ - " roll $16,%%edx \n" \ - " movb %%dl,%%dh \n" \ - " shrl $8,%%edx \n" \ - "2: cmpl $4,%1 \n" \ - " jb 7f \n" \ - " movl %%edx,%%eax \n" \ - " shl $8,%%eax \n" \ - " shldl $8,%%eax,%%edx \n" \ - " movl %%edx,%%ecx \n" \ - " shl $8,%%ecx \n" \ - " movb %%ah,%%al \n" \ - " rorl $8,%%eax \n" \ - " movb %%ah,%%cl \n" \ - /* now we have : eax=La, ecx=Lb, edx=Lc */ \ - " subl $12,%1 \n" \ - " jb 4f \n" \ - " jmp 3f \n" \ - " .align 4,0x90 \n" \ - "3: "#INS"l %%eax,"#SEG"(%0) \n" \ - " leal 4(%0),%0 \n" \ - " "#INS"l %%ecx,"#SEG"(%0) \n" \ - " leal 4(%0),%0 \n" \ - " "#INS"l %%edx,"#SEG"(%0) \n" \ - " leal 4(%0),%0 \n" \ - " subl $12,%1 \n" \ - " jnb 3b \n" \ - /* 0 .. 11 bytes left */ \ - "4: leal 12(%1),%1 \n" \ - " cmpl $4,%1 \n" \ - " jnb 5f \n" \ - " movl %%eax,%%edx \n" \ - " jmp 7f \n" \ - "5: "#INS"l %%eax,"#SEG"(%0) \n" \ - " leal -4(%1),%1 \n" \ - " leal 4(%0),%0 \n" \ - " cmpl $4,%1 \n" \ - " jnb 6f \n" \ - " movl %%ecx,%%edx \n" \ - " jmp 7f \n" \ - "6: "#INS"l %%ecx,"#SEG"(%0) \n" \ - " leal 4(%0),%0 \n" \ - /* 0 .. 3 bytes left */ \ - "7: testl $2,%1 \n" \ - " je 8f \n" \ - " "#INS"w %%dx,"#SEG"(%0) \n" \ - " leal 2(%0),%0 \n" \ - " shrl $16,%%edx \n" \ - "8: testl $1,%1 \n" \ - " je 9f \n" \ - " "#INS"b %%dl,"#SEG"(%0) \n" \ - " incl %0 \n" \ - "9: \n" \ - : "=r" ((void *)(p)), "=r" ((int)(b)), "=d" (_dummy_) \ - : "2" ((int)(c)), "0" ((void *)(p)), "1" ((int)(b)) \ - : "ax", "cx", "memory" \ - ); \ -} while (0) - -#define __INLINE_24_REPFILL__(P,C,B,FMODE,INS) \ - __INLINE_386_REPFILL24__(P,C,B,INS,) - -#define __INLINE_24_FAR_REPFILL__(P,C,B,FMODE,INS) \ - __INLINE_386_REPFILL24__(P,C,B,INS,%%fs:) - -#define GRX_HAVE_FAST_REPFILL24 - -#endif /* __i386__ */ - diff --git a/thirdparty/grx249/src/include/gcc/memmode.h b/thirdparty/grx249/src/include/gcc/memmode.h deleted file mode 100644 index 4c775f0..0000000 --- a/thirdparty/grx249/src/include/gcc/memmode.h +++ /dev/null @@ -1,54 +0,0 @@ -/** - ** memmode.h ---- determine how to access video and system RAM - ** GNU-C / DJGPP code - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifdef __i386__ -#ifdef __MSDOS__ - -#include - -#ifdef ECHILD - -#include -#define I386_GCC_FAR_MEMORY -#define LINP_PTR(p) (void *)((long)(p) & 0x00ffffffUL) -#define LINP_SEL(p) _go32_info_block.selector_for_linear_memory -#define XFER_BUFFER _go32_info_block.linear_address_of_transfer_buffer - -#else /* ECHILD */ - -#define LINP_PTR(p) (void *)(((long)(p) & 0x00ffffffUL) | 0xe0000000UL) -#define LINP_SEL(p) 0 -#define XFER_BUFFER __transfer_buffer -extern char *__transfer_buffer; - -#endif /* ECHILD */ -#endif /* __MSDOS__ */ - -#define MK_FP(s,o) (void *)( \ - ((long)(unsigned short)(s) << 4) + \ - (unsigned short)(o) \ -) -#define FP_SEG(p) (unsigned short)((long)(p) >> 4) -#define FP_OFF(p) (unsigned short)((int)(p) & 15) -#define FP86_SEG(p) (unsigned short)((long)(p) >> 16) -#define FP86_OFF(p) (unsigned short)((int)(p)) -#define DECLARE_XFER_BUFFER(size) -#define DELETE_XFER_BUFFER - -#endif /* __i386__ */ diff --git a/thirdparty/grx249/src/include/gcc/mempeek.h b/thirdparty/grx249/src/include/gcc/mempeek.h deleted file mode 100644 index 6f9bee1..0000000 --- a/thirdparty/grx249/src/include/gcc/mempeek.h +++ /dev/null @@ -1,117 +0,0 @@ -/** - ** mempeek.h ---- (far) memory read/write operations - ** GNU-C special assembler code - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Basic memory peek and poke operations in byte, word and long sizes. - ** The poke operations are available in WRITE, XOR, OR and AND versions. - ** - **/ - -/* ================================================================ */ -/* == 80386 FAMILY == */ -/* ================================================================ */ -#ifdef __i386__ - -/* the far selector peek / poke stuff is only used -** if far memory access is required (DJGPP v2) */ -#ifdef I386_GCC_FAR_MEMORY - -#ifndef MOV_INS -#include "gcc/asmsupp.h" -#endif - -#define __INLINE_386_PEEK__(P,SIZE,T,SEL) ({ \ - unsigned T _peekvalue; \ - if(sizeof(T) == 1) __asm__ volatile( \ - "mov"#SIZE" "#SEL"(%1),%0" \ - : "=q" (_peekvalue) \ - : "r" (((unsigned T *)(P))) \ - ); \ - else __asm__ volatile( \ - "mov"#SIZE" "#SEL"(%1),%0" \ - : "=r" (_peekvalue) \ - : "r" (((unsigned T *)(P))) \ - ); \ - _peekvalue; \ -}) -#define __INLINE_386_POKE__(P,V,INS,SIZE,T,SEL) ({ \ - if(sizeof(T) == 1) __asm__ volatile( \ - ""#INS""#SIZE" %1,"#SEL"%0" \ - : "=m" (*((unsigned T *)(P))) \ - : "qn" ((unsigned T)(V)) \ - ); \ - else __asm__ volatile( \ - ""#INS""#SIZE" %1,"#SEL"%0" \ - : "=m" (*((unsigned T *)(P))) \ - : "rn" ((unsigned T)(V)) \ - ); \ -}) - -#define __INLINE_STD_PEEK__(P,S,T) __INLINE_386_PEEK__(P,S,T,) -#define __INLINE_STD_POKE__(P,V,OP,I,S,T) __INLINE_386_POKE__(P,V,I,S,T,) - -#define I386_GCC_FAR_SELECTOR "%%fs:" -#define __INLINE_FAR_PEEK__(P,S,T) __INLINE_386_PEEK__(P,S,T,%%fs:) -#define __INLINE_FAR_POKE__(P,V,OP,I,S,T) __INLINE_386_POKE__(P,V,I,S,T,%%fs:) -#define setup_far_selector(S) ({ \ - __asm__ volatile( \ - "movw %0,%%fs" \ - : /* no outputs */ \ - : "r" ((unsigned short)(S)) \ - ); \ -}) -#endif /* I386_GCC_FAR_MEMORY */ - -#ifndef I386_GCC_FAR_SELECTOR -#define I386_GCC_FAR_SELECTOR "" -#endif /* I386_GCC_FAR_SELECTOR */ - -#define __INLINE_386_PEEK24__(P,SEL) ({ \ - register GR_int32u _pix_; \ - __asm__ volatile( "\n" \ - " xorl %%eax,%%eax \n" \ - " movb " SEL "2(%1),%%ah \n" \ - " sall $8,%%eax \n" \ - " movw " SEL "(%1),%%ax " \ - : "=&a" ((GR_int32u)_pix_) \ - : "r" ((void *)(P)) \ - ); \ - (GrColor)_pix_; \ -}) - -#define __INLINE_386_POKE24__(P,C,INS,SEL) do { \ - int _dummy_; \ - __asm__ volatile( "\n" \ - " "#INS"w %%ax," SEL "(%2) \n" \ - " shrl $8,%%eax \n" \ - " "#INS"b %%ah," SEL "2(%2) \n" \ - : "=a" (_dummy_) \ - : "0" (C), "r" ((void *)(P)) \ - ); \ -} while (0) - -#define __INLINE_24_PEEK__(p) \ - __INLINE_386_PEEK24__(p,) - -#define __INLINE_24_FAR_PEEK__(p) (peek_l_f(p) & 0xffffff) -#define PEEK_24_F_READS_ONE_MORE - -#define __INLINE_24_POKE__(p,c,op,INS) \ - __INLINE_386_POKE24__(p,c,INS,) -#define __INLINE_24_FAR_POKE__(p,c,op,INS) \ - __INLINE_386_POKE24__(p,c,INS,I386_GCC_FAR_SELECTOR) - -#endif /* __i386__ */ diff --git a/thirdparty/grx249/src/include/grxdebug.h b/thirdparty/grx249/src/include/grxdebug.h deleted file mode 100644 index 5c98c43..0000000 --- a/thirdparty/grx249/src/include/grxdebug.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - ** grxdebug.h ---- GRX library debug support - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __GRXDEBUG_H_INCLUDED__ -#define __GRXDEBUG_H_INCLUDED__ - -#define DBG_ENTER 0x8000 -#define DBG_LEAVE DBG_ENTER -#define DBG_FONT 0x4000 -#define DBG_SETMD 0x2000 -#define DBG_DRIVER 0x1000 -#define DBG_COLOR 0x0800 -#define DBG_COPYFILL 0x0400 - -extern char *_GR_debug_file; -extern int _GR_debug_line; -extern int _GR_debug_flags; -extern void _GR_debug_printf(char *fmt,...); - -# ifdef __GNUC__ - extern char *_GR_debug_function; -# define DBGPRINTF(tst,x) do { \ - if ((tst)&_GR_debug_flags) { \ - _GR_debug_file = __FILE__; \ - _GR_debug_line = __LINE__; \ - _GR_debug_function = __FUNCTION__; \ - _GR_debug_printf x; \ - } \ - } while (0) -# else -# define DBGPRINTF(tst,x) do { \ - if ((tst)&_GR_debug_flags) { \ - _GR_debug_file = __FILE__; \ - _GR_debug_line = __LINE__; \ - _GR_debug_printf x ; \ - } \ - } while (0) -#endif - -#define GRX_ENTER() DBGPRINTF(DBG_ENTER,("FUNC ENTER\n")) -#define GRX_LEAVE() DBGPRINTF(DBG_LEAVE,("FUNC EXIT\n")) -#define GRX_RETURN(x) GRX_LEAVE(); return x; - -#endif /* whole file */ - diff --git a/thirdparty/grx249/src/include/highlow.h b/thirdparty/grx249/src/include/highlow.h deleted file mode 100644 index 8f9588c..0000000 --- a/thirdparty/grx249/src/include/highlow.h +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** highlow.h ---- combining two BYTES into one WORD - ** - ** Copyright (c) 1997 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* combine two bytes into one word: generic version */ -#define __highlow__(hi,lo) ((((GR_int16u)(hi))<<8)|((GR_int8u)(lo))) - -#ifdef __GNUC__ -#include "gcc/highlow.h" -#elif defined(__TURBOC__) -#include "bcc/highlow.h" -#endif - -#ifndef highlow -#define highlow(hi,lo) __highlow__((hi),(lo)) -#endif - -#ifndef highlowP -#define highlowP(p) highlow(*((GR_int8u *)(p)),*(((GR_int8u *)(p))+1)) -#endif diff --git a/thirdparty/grx249/src/include/int86.h b/thirdparty/grx249/src/include/int86.h deleted file mode 100644 index 76662ed..0000000 --- a/thirdparty/grx249/src/include/int86.h +++ /dev/null @@ -1,227 +0,0 @@ -/** - ** int86.h ---- common ground for DOS/BIOS interrupts under TCC and DJGPP - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __INT86_H_INCLUDED__ -#define __INT86_H_INCLUDED__ - -#ifndef __MEMMODE_H_INCLUDED__ -#include "memmode.h" -#endif - -#if defined(MSDOS) && defined(_MSC_VER) - -#include - -typedef union _REGS Int86Regs; -#define int10(iregp) _int86(0x10,(iregp),(iregp)) -#define int11(iregp) _int86(0x11,(iregp),(iregp)) -#define int16(iregp) _int86(0x16,(iregp),(iregp)) -#define int33(iregp) _int86(0x33,(iregp),(iregp)) - -#define IREG_AX(iregs) ((iregs).x.ax) -#define IREG_BX(iregs) ((iregs).x.bx) -#define IREG_CX(iregs) ((iregs).x.cx) -#define IREG_DX(iregs) ((iregs).x.dx) -#define IREG_SI(iregs) ((iregs).x.si) -#define IREG_DI(iregs) ((iregs).x.di) -/* ==== IREG_BP() not implemented ==== */ -/* ==== IREG_DS() not implemented ==== */ -/* ==== IREG_ES() not implemented ==== */ - - -#define IREG_AL(iregs) ((iregs).h.al) -#define IREG_AH(iregs) ((iregs).h.ah) -#define IREG_BL(iregs) ((iregs).h.bl) -#define IREG_BH(iregs) ((iregs).h.bh) -#define IREG_CL(iregs) ((iregs).h.cl) -#define IREG_CH(iregs) ((iregs).h.ch) -#define IREG_DL(iregs) ((iregs).h.dl) -#define IREG_DH(iregs) ((iregs).h.dh) - -#endif /* _MSC_VER */ - -#ifdef __WATCOMC__ /* GS - WATCOM C++ 11.0 */ -/* Use the 386 enhanced interrupt for 32 bit DOS4GW. */ -#include -#include -#include -#if defined(__386__) && !defined(__WINDOWS_386__) -#define int86(a,b,c) int386(a,&(b->Normal),&(c->Normal)) - -struct ALLREGS -{ - union REGS Normal; - struct SREGS Extended; -}; -typedef struct ALLREGS Int86Regs; - -#define IREG_AX(iregs) ((iregs).Normal.w.ax) -#define IREG_BX(iregs) ((iregs).Normal.w.bx) -#define IREG_CX(iregs) ((iregs).Normal.w.cx) -#define IREG_DX(iregs) ((iregs).Normal.w.dx) -#define IREG_SI(iregs) ((iregs).Normal.w.si) -#define IREG_DI(iregs) ((iregs).Normal.w.di) -#define IREG_EDI(iregs) ((iregs).Normal.x.edi) -#define IREG_BP(iregs) ((iregs).Normal.w.bp) -#define IREG_DS(iregs) ((iregs).Extended.ds) -#define IREG_ES(iregs) ((iregs).Extended.es) - -#define IREG_AL(iregs) ((iregs).Normal.h.al) -#define IREG_AH(iregs) ((iregs).Normal.h.ah) -#define IREG_BL(iregs) ((iregs).Normal.h.bl) -#define IREG_BH(iregs) ((iregs).Normal.h.bh) -#define IREG_CL(iregs) ((iregs).Normal.h.cl) -#define IREG_CH(iregs) ((iregs).Normal.h.ch) -#define IREG_DL(iregs) ((iregs).Normal.h.dl) -#define IREG_DH(iregs) ((iregs).Normal.h.dh) - -/* all int10 calls using the XFER_BUFFER _must_ use int10x ! */ -extern void wc32_int10x(Int86Regs *regs, int seg); -#define int10x(r) wc32_int10x(r, int10_segment) - -#else - -typedef union REGS Int86Regs; - -#define IREG_AX(iregs) ((iregs).x.ax) -#define IREG_BX(iregs) ((iregs).x.bx) -#define IREG_CX(iregs) ((iregs).x.cx) -#define IREG_DX(iregs) ((iregs).x.dx) -#define IREG_SI(iregs) ((iregs).x.si) -#define IREG_DI(iregs) ((iregs).x.di) -#define IREG_BP(iregs) ((iregs).x.bp) -#define IREG_DS(iregs) ((iregs).x.ds) -/* #define IREG_ES(iregs) ((iregs).x.es) */ - -#define IREG_AL(iregs) ((iregs).h.al) -#define IREG_AH(iregs) ((iregs).h.ah) -#define IREG_BL(iregs) ((iregs).h.bl) -#define IREG_BH(iregs) ((iregs).h.bh) -#define IREG_CL(iregs) ((iregs).h.cl) -#define IREG_CH(iregs) ((iregs).h.ch) -#define IREG_DL(iregs) ((iregs).h.dl) -#define IREG_DH(iregs) ((iregs).h.dh) -#endif /* __386__ */ - -/*the standard interrupt macros*/ -#define int10(iregp) int86(0x10,(iregp),(iregp)) -#define int16(iregp) int86(0x16,(iregp),(iregp)) -#define int33(iregp) int86(0x33,(iregp),(iregp)) - -#endif /* __WATCOM__ */ - -#ifdef __MSDOS__ -#ifdef __TURBOC__ - -typedef struct REGPACK Int86Regs; -#define int10(iregp) intr(0x10,(iregp)) -#define int11(iregp) intr(0x11,(iregp)) -#define int16(iregp) intr(0x16,(iregp)) -#define int33(iregp) intr(0x33,(iregp)) - -#define IREG_AX(iregs) ((iregs).r_ax) -#define IREG_BX(iregs) ((iregs).r_bx) -#define IREG_CX(iregs) ((iregs).r_cx) -#define IREG_DX(iregs) ((iregs).r_dx) -#define IREG_SI(iregs) ((iregs).r_si) -#define IREG_DI(iregs) ((iregs).r_di) -#define IREG_BP(iregs) ((iregs).r_bp) -#define IREG_DS(iregs) ((iregs).r_ds) -#define IREG_ES(iregs) ((iregs).r_es) - -#define IREG_AL(iregs) (((unsigned char *)(&(iregs).r_ax))[0]) -#define IREG_AH(iregs) (((unsigned char *)(&(iregs).r_ax))[1]) -#define IREG_BL(iregs) (((unsigned char *)(&(iregs).r_bx))[0]) -#define IREG_BH(iregs) (((unsigned char *)(&(iregs).r_bx))[1]) -#define IREG_CL(iregs) (((unsigned char *)(&(iregs).r_cx))[0]) -#define IREG_CH(iregs) (((unsigned char *)(&(iregs).r_cx))[1]) -#define IREG_DL(iregs) (((unsigned char *)(&(iregs).r_dx))[0]) -#define IREG_DH(iregs) (((unsigned char *)(&(iregs).r_dx))[1]) - -#endif /* __TURBOC__ */ - -#ifdef __GNUC__ -#ifdef I386_GCC_FAR_MEMORY - -#include - -typedef _go32_dpmi_registers Int86Regs; -#define int10(iregp) _go32_dpmi_simulate_int(0x10,(iregp)) -#define int11(iregp) _go32_dpmi_simulate_int(0x11,(iregp)) -#define int16(iregp) _go32_dpmi_simulate_int(0x16,(iregp)) -#define int33(iregp) _go32_dpmi_simulate_int(0x33,(iregp)) - -#define IREG_AX(iregs) ((iregs).x.ax) -#define IREG_BX(iregs) ((iregs).x.bx) -#define IREG_CX(iregs) ((iregs).x.cx) -#define IREG_DX(iregs) ((iregs).x.dx) -#define IREG_SI(iregs) ((iregs).x.si) -#define IREG_DI(iregs) ((iregs).x.di) -#define IREG_BP(iregs) ((iregs).x.bp) -#define IREG_DS(iregs) ((iregs).x.ds) -#define IREG_ES(iregs) ((iregs).x.es) - -#define IREG_AL(iregs) ((iregs).h.al) -#define IREG_AH(iregs) ((iregs).h.ah) -#define IREG_BL(iregs) ((iregs).h.bl) -#define IREG_BH(iregs) ((iregs).h.bh) -#define IREG_CL(iregs) ((iregs).h.cl) -#define IREG_CH(iregs) ((iregs).h.ch) -#define IREG_DL(iregs) ((iregs).h.dl) -#define IREG_DH(iregs) ((iregs).h.dh) - -#else /* I386_GCC_FAR_MEMORY */ - -#include - -typedef union REGS Int86Regs; -#define int10(iregp) int86(0x10,(iregp),(iregp)) -#define int11(iregp) int86(0x11,(iregp),(iregp)) -#define int16(iregp) int86(0x16,(iregp),(iregp)) -#define int33(iregp) int86(0x33,(iregp),(iregp)) - -#define IREG_AX(iregs) ((iregs).x.ax) -#define IREG_BX(iregs) ((iregs).x.bx) -#define IREG_CX(iregs) ((iregs).x.cx) -#define IREG_DX(iregs) ((iregs).x.dx) -#define IREG_SI(iregs) ((iregs).x.si) -#define IREG_DI(iregs) ((iregs).x.di) -/* ==== IREG_BP() not implemented ==== */ -/* ==== IREG_DS() not implemented ==== */ -/* ==== IREG_ES() not implemented ==== */ - -#define IREG_AL(iregs) ((iregs).h.al) -#define IREG_AH(iregs) ((iregs).h.ah) -#define IREG_BL(iregs) ((iregs).h.bl) -#define IREG_BH(iregs) ((iregs).h.bh) -#define IREG_CL(iregs) ((iregs).h.cl) -#define IREG_CH(iregs) ((iregs).h.ch) -#define IREG_DL(iregs) ((iregs).h.dl) -#define IREG_DH(iregs) ((iregs).h.dh) - -#endif /* I386_GCC_FAR_MEMORY */ -#endif /* __GNUC__ */ -#endif /* __MSDOS__ */ - -/* all int10 calls using the XFER_BUFFER _must_ use int10x ! */ -#ifndef int10x -#define int10x(r) int10(r) -#endif - -#endif /* whole file */ - diff --git a/thirdparty/grx249/src/include/ioport.h b/thirdparty/grx249/src/include/ioport.h deleted file mode 100644 index fb26771..0000000 --- a/thirdparty/grx249/src/include/ioport.h +++ /dev/null @@ -1,342 +0,0 @@ -/** - ** ioport.h ---- port input/output macros - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Intel CPU specific input/output instructions. This file - ** supports i386 GCC and Turbo C. - ** - **/ - -#ifndef __IOPORT_H_INCLUDED__ -#define __IOPORT_H_INCLUDED__ - -#ifdef __TURBOC__ -/* prototype for __emit__() */ -#include -#endif - -#ifdef _MSC_VER -/* prototype for _inp/_inpw/_outp/_outpw */ -#include -/* prototype _enable/_disable */ -#include -#endif - -#ifdef SLOW_DOWN_IO -#ifndef SLOW_DOWN_IO_PORT -#define SLOW_DOWN_IO_PORT 0x80 -#endif -#ifdef __GNUC__ -#ifdef __i386__ -#define __INLINE_SLOW_IO_ONCE__ ({ \ - __asm__ volatile( \ - "outb %%al,%0" \ - : /* no outputs */ \ - : "n" (SLOW_DOWN_IO_PORT) \ - ); \ -}) -#endif -#endif -#ifdef __TURBOC__ -#define __INLINE_SLOW_IO_ONCE__ ( \ - __emit__((char)(0xe6)), /* outb to const port */ \ - __emit__((char)(SLOW_DOWN_IO_PORT)) \ -) -#endif - -#ifdef _MSC_VER -#define __INLINE_SLOW_IO_ONCE__ outp(SLOW_DOWN_IO_PORT,0) -#endif - -#if (SLOW_DOWN_IO - 0) <= 1 -#define __INLINE_SLOW_DOWN_IO__ \ - __INLINE_SLOW_IO_ONCE__ -#elif (SLOW_DOWN_IO - 0) == 2 -#define __INLINE_SLOW_DOWN_IO__ \ - __INLINE_SLOW_IO_ONCE__, \ - __INLINE_SLOW_IO_ONCE__ -#elif (SLOW_DOWN_IO - 0) == 3 -#define __INLINE_SLOW_DOWN_IO__ \ - __INLINE_SLOW_IO_ONCE__, \ - __INLINE_SLOW_IO_ONCE__, \ - __INLINE_SLOW_IO_ONCE__ -#else -#define __INLINE_SLOW_DOWN_IO__ \ - __INLINE_SLOW_IO_ONCE__, \ - __INLINE_SLOW_IO_ONCE__, \ - __INLINE_SLOW_IO_ONCE__, \ - __INLINE_SLOW_IO_ONCE__ -#endif -#define __INLINE_SLOW_DWN_IOC__ __INLINE_SLOW_DOWN_IO__, -#else /* SLOW_DOWN_IO */ -#define __INLINE_SLOW_DOWN_IO__ -#define __INLINE_SLOW_DWN_IOC__ -#endif - -#ifdef __GNUC__ -#ifdef __i386__ -#define __INLINE_INPORT__(P,SIZE,T) ({ \ - register T _value; \ - __asm__ volatile( \ - "in"#SIZE" %w1,%0" \ - : "=a" (_value) \ - : "Nd" ((unsigned short)(P)) \ - ); \ - __INLINE_SLOW_DOWN_IO__; \ - _value; \ -}) -#define __INLINE_OUTPORT__(P,V,SIZE,T) ({ \ - __asm__ volatile( \ - "out"#SIZE" %"#SIZE"0,%w1" \ - : /* no outputs */ \ - : "a" ((unsigned T)(V)), \ - "Nd" ((unsigned short)(P)) \ - ); \ - __INLINE_SLOW_DOWN_IO__; \ -}) -#ifndef SLOW_DOWN_IO -#define __INLINE_INPORTS__(P,B,C,SIZE,T) ({ \ - register void *_inportptr = ((void *)(B)); \ - register int _inportcnt = ((int)(C)); \ - __asm__ volatile( \ - "cld; " \ - "rep; ins"#SIZE"" \ - : "=D" (_inportptr), "=c" (_inportcnt) \ - : "0" (_inportptr), "1" (_inportcnt), \ - "d" ((unsigned short)(P)) \ - ); \ -}) -#define __INLINE_OUTPORTS__(P,B,C,SIZE,T) ({ \ - register void *_outportptr = ((void *)(B)); \ - register int _outportcnt = ((int)(C)); \ - __asm__ volatile( \ - "cld; " \ - "rep; outs"#SIZE"" \ - : "=S" (_outportptr), "=c" (_outportcnt) \ - : "0" (_outportptr), "1" (_outportcnt), \ - "d" ((unsigned short)(P)) \ - ); \ -}) -#else /* SLOW_DOWN_IO */ -#define __INLINE_INPORTS__(P,B,C,SIZE,T) ({ \ - register T *_inportptr = ((T *)(B)); \ - register int _inportcnt = ((int)(C)); \ - register int _inportadr = ((int)(P)); \ - do *_inportptr++ = inport_##SIZE(_inportadr); \ - while(--_inportcnt); \ -}) -#define __INLINE_OUTPORTS__(P,B,C,SIZE,T) ({ \ - register T *_outportptr = ((T *)(B)); \ - register int _outportcnt = ((int)(C)); \ - register int _outportadr = ((int)(P)); \ - do outport_##SIZE(_outportadr,*_outportptr++); \ - while(--_outportcnt); \ -}) -#endif /* SLOW_DOWN_IO */ -#endif /* __i386__ */ -#endif /* __GNUC__ */ - -#ifdef __TURBOC__ -/* void __emit__(); */ -#define __INLINE_INPORT__(P,SIZE,T) ( \ - _DX = ((unsigned short)(P)), \ - __emit__((char)(0xec+sizeof(T)-1)), /* inB|W */ \ - __INLINE_SLOW_DWN_IOC__ \ - (unsigned T)_AX \ -) -#define __INLINE_OUTPORT__(P,V,SIZE,T) do { \ - _AX = ((unsigned short)(V)); \ - _DX = ((unsigned short)(P)); \ - __emit__((char)(0xee+sizeof(T)-1)); /* outB|W */ \ - __INLINE_SLOW_DOWN_IO__; \ -} while(0) -#ifndef SLOW_DOWN_IO -#define __INLINE_INPORTS__(P,B,C,SIZE,T) do { \ - _ES = (unsigned)(void _seg *)(void far *)(B); \ - _DI = (unsigned)(void near *)(B); \ - _CX = ((unsigned short)(C)); \ - _DX = ((unsigned short)(P)); \ - __emit__((char)(0xfc)); /* cld */ \ - __emit__((char)(0xf3)); /* rep */ \ - __emit__((char)(0x6c+sizeof(T)-1)); /* insB|W */ \ -} while(0) -#define __INLINE_OUTPORTS__(P,B,C,SIZE,T) do { \ - _ES = (unsigned)(void _seg *)(void far *)(B); \ - _SI = (unsigned)(void near *)(B); \ - _CX = ((unsigned short)(C)); \ - _DX = ((unsigned short)(P)); \ - __emit__((char)(0xfc)); /* cld */ \ - __emit__((char)(0x26)); /* seg es */ \ - __emit__((char)(0xf3)); /* rep */ \ - __emit__((char)(0x6e+sizeof(T)-1)); /* outsB|W */ \ -} while(0) -#else /* SLOW_DOWN_IO */ -#define __INLINE_INPORTS__(P,B,C,SIZE,T) do { \ - _ES = (unsigned)(void _seg *)(void far *)(B); \ - _BX = (unsigned)(void near *)(B); \ - _CX = ((unsigned short)(C)); \ - _DX = ((unsigned short)(P)); \ - do { \ - __emit__((char)(0xec+sizeof(T)-1)); /* inB|W */ \ - __INLINE_SLOW_DOWN_IO__; \ - *((T _seg *)_ES + (T near *)_BX) = (T)_AX; \ - _BX += sizeof(T); \ - _CX--; \ - } while(_CX); \ -} while(0) -#define __INLINE_OUTPORTS__(P,B,C,SIZE,T) do { \ - _ES = (unsigned)(void _seg *)(void far *)(B); \ - _BX = (unsigned)(void near *)(B); \ - _CX = ((unsigned short)(C)); \ - _DX = ((unsigned short)(P)); \ - do { \ - (T)_AX = *((T _seg *)_ES + (T near *)_BX); \ - __emit__((char)(0xee+sizeof(T)-1)); /* outB|W */ \ - __INLINE_SLOW_DOWN_IO__; \ - _BX += sizeof(T); \ - _CX--; \ - } while(_CX); \ -} while(0) -#endif /* SLOW_DOWN_IO */ -#endif /* __TURBOC__ */ - -#ifdef __WATCOMC__ /* GS - Watcom C++ 11.0 */ -#include -/* 8bit port access */ -#define inpb(a) inp(a) -#define outpb(a,b) outp(a,b) -/* 16bit port access */ -/* inpw(a) already defined */ -/* outpw(a,b) already defined */ -/* 32bit port access */ -#define inpl(a) inpd(a) -#define outpl(a,b) outpd(a,b) -#define __INLINE_INPORT__(P,SIZE,T) ( \ - (unsigned T) inp##SIZE (P) \ -) -#define __INLINE_OUTPORT__(P,V,SIZE,T) ( \ - (unsigned T) outp##SIZE (P,V) \ -) -#ifndef SLOW_DOWN_IO -#define __INLINE_INPORTS__(P,B,C,SIZE,T) do { \ - do { \ - *B = __INLINE_INPORT__(P,SIZE,T); \ - (T)B ++; \ - } while(C--); \ -} while(0) -#define __INLINE_OUTPORTS__(P,B,C,SIZE,T) do { \ - do{ \ - __INLINE_OUTPORTS__(P,*B,SIZE,T); \ - (T)B ++; \ - } while (C--); \ -} while(0) -#else /* SLOW_DOWN_IO */ -#define __INLINE_INPORTS__(P,B,C,SIZE,T) do { \ - do { \ - *B = __INLINE_INPORT__(P,SIZE,T); \ - (T)B ++; \ - } while(C--); \ -} while(0) -#define __INLINE_OUTPORTS__(P,B,C,SIZE,T) do { \ - do{ \ - __INLINE_OUTPORTS__(P,*B,SIZE,T); \ - (T)B ++; \ - } while (C--); \ -} while(0) -#endif /* SLOW_DOWN_IO */ -#endif /* __WATCOMC__ */ - -#ifdef _MSC_VER -#define inport_b(port) _inp((unsigned)(port)) -#define inport_w(port) _inpw((unsigned)(port)) -#define outport_b(port,val) _outp(((unsigned)(port)),((int)(val))) -#define outport_w(port,val) _outp(((unsigned)(port)),((unsigned)(val))) -#endif - -#ifndef inport_b -#define inport_b(port) __INLINE_INPORT__(port,b,char) -#endif -#ifndef inport_w -#define inport_w(port) __INLINE_INPORT__(port,w,short) -#endif -#ifndef inport_l -#define inport_l(port) __INLINE_INPORT__(port,l,long) -#endif - -#ifndef outport_b -#define outport_b(port,val) __INLINE_OUTPORT__(port,val,b,char) -#endif -#ifndef outport_w -#define outport_w(port,val) __INLINE_OUTPORT__(port,val,w,short) -#endif -#ifndef outport_l -#define outport_l(port,val) __INLINE_OUTPORT__(port,val,l,long) -#endif - -#ifndef inport_b_s -#define inport_b_s(port,buf,cnt) __INLINE_INPORTS__(port,buf,cnt,b,char) -#endif -#ifndef inport_w_s -#define inport_w_s(port,buf,cnt) __INLINE_INPORTS__(port,buf,cnt,w,short) -#endif -#ifndef inport_l_s -#define inport_l_s(port,buf,cnt) __INLINE_INPORTS__(port,buf,cnt,l,long) -#endif - -#ifndef outport_b_s -#define outport_b_s(port,buf,cnt) __INLINE_OUTPORTS__(port,buf,cnt,b,char) -#endif -#ifndef outport_w_s -#define outport_w_s(port,buf,cnt) __INLINE_OUTPORTS__(port,buf,cnt,w,short) -#endif -#ifndef outport_l_s -#define outport_l_s(port,buf,cnt) __INLINE_OUTPORTS__(port,buf,cnt,l,long) -#endif - -#ifdef __GNUC__ -#ifdef __i386__ -#ifdef __MSDOS__ -#define int_disable() ({ __asm__ volatile("cli"); }) -#define int_enable() ({ __asm__ volatile("sti"); }) -#else -#define int_disable() -#define int_enable() -#endif -#endif -#endif - -#ifdef __TURBOC__ -#define int_disable() __emit__((char)(0xfa)) -#define int_enable() __emit__((char)(0xfb)) -#endif - -#if defined(_MSC_VER) || defined(__WATCOMC__) /* GS - Watcom C++ 11.0 */ -#define int_disable() _disable() -#define int_enable() _enable() -#endif - - -#if defined(__TURBOC__) || defined(_MSC_VER) -/* - * These are not really here! - */ -#undef inport_l -#undef outport_l -#undef inport_l_s -#undef outport_l_s -#endif - -#endif /* whole file */ - diff --git a/thirdparty/grx249/src/include/libgrx.h b/thirdparty/grx249/src/include/libgrx.h deleted file mode 100644 index 70fefa2..0000000 --- a/thirdparty/grx249/src/include/libgrx.h +++ /dev/null @@ -1,338 +0,0 @@ -/** - ** libgrx.h ---- GRX library private include file - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __LIBGRX_H_INCLUDED__ -#define __LIBGRX_H_INCLUDED__ - -#define USE_GRX_INTERNAL_DEFINITIONS - -/* The LCC compiler on Linux requires this */ -#if defined(__LCC__) && defined(__linux__) -/* make alloca work ... */ -# define __USE_MISC -#endif - -#ifdef _AIX -#define _BIG_ENDIAN -#endif - -#include -#include -#include - -#ifndef __GRX20_H_INCLUDED__ -#include "grx20.h" -#endif - -#ifndef NULL -#define NULL ((void *)(0)) -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -/* -** identify the compiler / system -** and check for special restrictions -*/ -/* DEC alpha chips have special alignment -** restrictions. We'll have do care about them */ -#if !defined(__alpha__) && defined(__alpha) -#define __alpha__ __alpha -#endif - - -/* Casting a lvalue on the left side of an assignment -** causes error or warnings on several compilers: -** -** LCC v4.0 -** Watcom C++ v11.0 -** SUN cc v4.0 -** GCC v > 3 -*/ -#if !defined(NO_LEFTSIDE_LVALUE_CAST) && \ - ( defined(__LCC__) \ - || defined(__WATCOMC__) \ - || (defined(__GNUC__) && (__GNUC__>=3)) \ - || defined(__SUNPRO_C) ) -#define NO_LEFTSIDE_LVALUE_CAST -#endif -/* Casting a pointer on the left side of an assignment -** also cuses problems on several systems: -** -** LCC v4.0 -** Watcom C++ v11.0 -*/ -#if !defined(NO_LEFTSIDE_PTR_CAST) && \ - ( defined(__LCC__) \ - || defined(__WATCOMC__) ) -#define NO_LEFTSIDE_PTR_CAST -#endif - -/* some CPU allow misaligned access to non byte location */ -#if defined(__TURBOC__) \ - || defined(_MSC_VER) \ - || defined(__386__) \ - || defined(__i386__) \ - || defined(__i386) \ - || defined(__x86_64__) - /* x86 can write to misalgined 16bit locations */ -# define MISALIGNED_16bit_OK -#endif - -#if defined(__386__) \ - || defined(__i386__) \ - || defined(__i386) \ - || defined(__x86_64__) - /* x86 can write to misalgined 32bit locations */ -# define MISALIGNED_32bit_OK -#endif - - -/* need some n-bit types */ -/* char should always be 8bit and short 16bit ... */ -#define GR_int8 char -#define GR_int16 short -#if defined(__alpha__) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__x86_64__) -#define GR_int32 int -#define GR_int64 long -#define GR_PtrInt long -#else -#define GR_int32 long -#define GR_PtrInt int -#endif - -/* signed and unsigned variants of the above */ -typedef signed GR_int8 GR_int8s; -typedef signed GR_int16 GR_int16s; -typedef signed GR_int32 GR_int32s; -typedef unsigned GR_int8 GR_int8u; -typedef unsigned GR_int16 GR_int16u; -typedef unsigned GR_int32 GR_int32u; -#ifdef GR_int64 -typedef signed GR_int64 GR_int64s; -typedef unsigned GR_int64 GR_int64u; -#endif - - -/* -** get system endian -*/ -#if !defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) -# if defined(__TURBOC__) \ - || defined(__WATCOMC__) \ - || defined(_MSC_VER) \ - || defined(__alpha__) \ - || (defined(__LCC__) && defined(__i386__)) \ - || (defined(__GNUC__) && \ - (defined(__i386__) || defined(__x86_64__))) -# define _LITTLE_ENDIAN -# else -# include -# ifdef __LITTLE_ENDIAN -# define _LITTLE_ENDIAN -# endif -# ifdef __BIG_ENDIAN -# define _BIG_ENDIAN -# endif -# endif -#endif - -#if defined(__BYTE_ORDER__) && !defined(BYTE_ORDER) -# define BYTE_ORDER __BYTE_ORDER__ -# define LITTLE_ENDIAN __LITTLE_ENDIAN__ -# define BIG_ENDIAN __BIG_ENDIAN__ -#endif -#if !defined(BYTE_ORDER) && defined(_LITTLE_ENDIAN) -#define LITTLE_ENDIAN 0x1234 -#define BIG_ENDIAN 0x4321 -#define BYTE_ORDER LITTLE_ENDIAN -#endif -#if !defined(BYTE_ORDER) && defined(_BIG_ENDIAN) -#define LITTLE_ENDIAN 0x1234 -#define BIG_ENDIAN 0x4321 -#define BYTE_ORDER BIG_ENDIAN -#endif -#ifndef BYTE_ORDER -#error Unknown byte ordering ! -#endif - -#ifndef HARDWARE_BYTE_ORDER -#define HARDWARE_BYTE_ORDER BYTE_ORDER -#endif - -/* - * Debug support - */ -#if defined(DEBUG) && !defined(__GRXDEBUG_H_INCLUDED__) -# include "grxdebug.h" -#endif -#ifndef DBGPRINTF -# define DBGPRINTF(chk,x) -# define GRX_ENTER() -# define GRX_LEAVE() -# define GRX_RETURN(x) return x -#endif - -/* simple pointer arithmetic */ -#define ptrdiff(a,b) ( ((GR_int8 far *)(a)) - ((GR_int8 far *)(b)) ) -#define ptradd(P,SKIP) ( (void *)( ((GR_int8 *)(P))+(SKIP)) ) -#ifdef NO_LEFTSIDE_LVALUE_CAST -#define ptrinc(P,SKIP) do (P) = ptradd((P),(SKIP)); while (0) -#else -#define ptrinc(P,SKIP) do ((GR_int8 *)(P)) += (SKIP); while (0) -#endif - -/* - * function inline - */ -#ifdef __GNUC__ -#define INLINE __inline__ -#endif -#ifndef INLINE -#define INLINE -#endif - - -/* - * global library data structures - */ -extern struct _GR_driverInfo _GrDriverInfo; -extern struct _GR_contextInfo _GrContextInfo; -extern struct _GR_colorInfo _GrColorInfo; -extern struct _GR_mouseInfo _GrMouseInfo; - -#define GrDriverInfo (&_GrDriverInfo) -#define GrContextInfo (&_GrContextInfo) -#define GrColorInfo (&_GrColorInfo) -#define GrMouseInfo (&_GrMouseInfo) - -#define DRVINFO (&_GrDriverInfo) -#define CXTINFO (&_GrContextInfo) -#define CLRINFO (&_GrColorInfo) -#define MOUINFO (&_GrMouseInfo) - -#define CURC (&(CXTINFO->current)) -#define SCRN (&(CXTINFO->screen)) -#define FDRV (&(DRVINFO->fdriver)) -#define SDRV (&(DRVINFO->sdriver)) -#define VDRV ( (DRVINFO->vdriver)) - -/* - * banking stuff - */ -#ifndef BANKHOOK -#define BANKHOOK -#endif - -#ifndef RWBANKHOOK -#define RWBANKHOOK -#endif - -#ifdef __TURBOC__ -# define BANKPOS(offs) ((unsigned short)(offs)) -# define BANKNUM(offs) (((unsigned short *)(&(offs)))[1]) -# define BANKLFT(offs) (_AX = -(int)(BANKPOS(offs)),(_AX ? _AX : 0xffffU)) -#endif - -#ifndef BANKPOS -#define BANKPOS(offs) ((GR_int16u)(offs)) -#endif -#ifndef BANKNUM -#define BANKNUM(offs) ((int)((GR_int32u)(offs) >> 16)) -#endif -#ifndef BANKLFT -#define BANKLFT(offs) (0x10000 - BANKPOS(offs)) -#endif - -#define SETBANK(bk) do { \ - register int _bankval_ = (bk); \ - DRVINFO->curbank = _bankval_; \ - (*DRVINFO->setbank)(_bankval_); \ - BANKHOOK; \ -} while(0) - -#define SRWBANK(rb,wb) do { \ - DRVINFO->curbank = (-1); \ - (*DRVINFO->setrwbanks)((rb),(wb)); \ - RWBANKHOOK; \ -} while(0) - -#define CHKBANK(bk) do { \ - register int _bankval_ = (bk); \ - if(_bankval_ != DRVINFO->curbank) { \ - DRVINFO->curbank = _bankval_; \ - (*DRVINFO->setbank)(_bankval_); \ - BANKHOOK; \ - } \ -} while(0) - -/* - * color stuff - */ -extern int _GR_firstFreeColor; /* can't access all colors on all systems */ -extern int _GR_lastFreeColor; /* eg. X11 and other windowing systems */ -int _GrResetColors(void); /* like GrResetColors but return true on success */ - -#ifdef __TURBOC__ -# define C_OPER(color) (unsigned int)(((unsigned char *)(&(color)))[3] & 15) -#endif - -#ifndef C_OPER -#define C_OPER(color) (unsigned int)(((GrColor)(color) >> 24) & 15) -#endif -#define C_WRITE (int)(GrWRITE >> 24) -#define C_XOR (int)(GrXOR >> 24) -#define C_OR (int)(GrOR >> 24) -#define C_AND (int)(GrAND >> 24) -#define C_IMAGE (int)(GrIMAGE >> 24) -#define C_COLOR GrCVALUEMASK - -/* - * mouse stuff - */ -#define mouse_block(c,x1,y1,x2,y2) { \ - int __mouse_block_flag = 0; \ - mouse_addblock(c,x1,y1,x2,y2); -#define mouse_addblock(c,x1,y1,x2,y2) \ - if(MOUINFO->docheck && (c)->gc_onscreen) { \ - __mouse_block_flag |= (*MOUINFO->block)((c),(x1),(y1),(x2),(y2)); \ - } -#define mouse_unblock() \ - if(__mouse_block_flag) { \ - (*MOUINFO->unblock)(__mouse_block_flag); \ - } \ -} - -/* - * internal utility functions - */ -GrFrameDriver *_GrFindFrameDriver(GrFrameMode mode); -GrFrameDriver *_GrFindRAMframeDriver(GrFrameMode mode); - -void _GrCloseVideoDriver(void); -void _GrDummyFunction(void); - - -#endif /* whole file */ - diff --git a/thirdparty/grx249/src/include/libsdl.h b/thirdparty/grx249/src/include/libsdl.h deleted file mode 100644 index 6bdafc0..0000000 --- a/thirdparty/grx249/src/include/libsdl.h +++ /dev/null @@ -1,53 +0,0 @@ -/** - ** libsdl.h - GRX library SDL private include file - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef _LIBSDL_H_ - -#include - -#define KMOD_SCROLL ((SDLMod) 0x10) -#define KMOD_INSERT ((SDLMod) 0x20) - -extern SDL_Surface *_SGrScreen; -#if defined(__WIN32__) -extern void *_SGrBackup; -extern int _SGrLength; -extern int _SGrActive; -#endif - -extern int _GrIsKbdEnabled(void); -extern int _GrKeyPressed(void); - -/* _keyssdlpool used only when GrMouseEventEnable( 0,x ) is set */ - -#define _MAXKEYSSDLPOOL 16 -extern int _nkeyssdlpool; -extern int _keyssdlpool[_MAXKEYSSDLPOOL]; - -#if defined(__WIN32__) -#include -#include -#elif defined(__XWIN__) -#include -#include -#include -#include -#endif - -#define _LIBSDL_H_ 1 -#endif diff --git a/thirdparty/grx249/src/include/libwin32.h b/thirdparty/grx249/src/include/libwin32.h deleted file mode 100644 index 5cede92..0000000 --- a/thirdparty/grx249/src/include/libwin32.h +++ /dev/null @@ -1,54 +0,0 @@ -/** - ** libwin32.h - GRX library Win32-API private include file - ** - ** Author: Gernot Graeff - ** E-mail: gernot.graeff@t-online.de - ** Date: 13.11.98 - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef _LIBWIN32_H_ -#define _LIBWIN32_H_ - -#include -#include "grx20.h" - -typedef struct _W32Event { - UINT uMsg; - WPARAM wParam; - LPARAM lParam; - int kbstat; -} W32Event; - -extern CRITICAL_SECTION _csEventQueue; -extern W32Event *_W32EventQueue; -extern volatile int _W32EventQueueSize; -extern volatile int _W32EventQueueRead; -extern volatile int _W32EventQueueWrite; -extern volatile int _W32EventQueueLength; - -extern HWND hGRXWnd; -extern HDC hDCMem; -extern HANDLE windowThread; - -extern int _GrIsKbdEnabled(void); -extern int _GrKeyPressed(void); -extern int _GrKeyStat(void); - -/* _keysw32pool used only when GrMouseEventEnable( 0,x ) is set */ - -#define _MAXKEYSW32POOL 16 -extern int _nkeysw32pool; -extern int _keysw32pool[_MAXKEYSW32POOL]; - -#endif diff --git a/thirdparty/grx249/src/include/libxwin.h b/thirdparty/grx249/src/include/libxwin.h deleted file mode 100644 index ccd8925..0000000 --- a/thirdparty/grx249/src/include/libxwin.h +++ /dev/null @@ -1,93 +0,0 @@ -/** - ** libxwin.h - GRX library X Windows private include file - ** - ** Author: Ulrich Leodolter - ** E-mail: ulrich@lab1.psy.univie.ac.at - ** Date: Thu Sep 28 09:46:21 1995 - ** RCSId: $Id$ - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: - ** 070505 M.Alvarez, Using a Pixmap for BackingStore - ** - **/ - -#ifndef _LIBXWIN_H_ -#define _LIBXWIN_H_ - -#include -#include -#include -#include -#include - -#define USE_PIXMAP_FOR_BS 1 // 1 = use a pixmap for backing store - -#if defined(XF86DGA_DRIVER) -#include -extern int _XGrWindowedMode; -#else -#define _XGrWindowedMode 1 -#endif - -/* - Invoke pre-X11R6 ICCCM routines if XlibSpecificationRelease is not 6. -*/ -#if XlibSpecificationRelease-0 < 6 -#define PRE_R6_ICCCM -#endif -/* - Invoke pre-X11R5 ICCCM routines if XlibSpecificationRelease is not defined. -*/ -#if !defined(XlibSpecificationRelease) -#define PRE_R5_ICCCM -#endif -/* - Invoke pre-X11R4 ICCCM routines if PWinGravity is not defined. -*/ -#if !defined(PWinGravity) -#define PRE_R4_ICCCM -#endif - -#define Export -#include "prex11r6.h" - -extern Display * _XGrDisplay; -extern int _XGrScreen; -extern Colormap _XGrColormap; -extern Window _XGrWindow; -extern Pixmap _XGrBitmap; -extern Pixmap _XGrPattern; -extern Pixmap _XGrBStore; -extern GC _XGrGC; -extern GC _XGrBitmapGC; -extern GC _XGrPatternGC; -extern unsigned long _XGrForeColor; -extern unsigned long _XGrBackColor; -extern unsigned int _XGrColorOper; -extern unsigned int _XGrDepth; -extern unsigned int _XGrBitsPerPixel; -extern int _XGrBStoreInited; - -extern unsigned long _XGrColorPlanes[8]; -extern unsigned int _XGrColorNumPlanes; -extern unsigned long _XGrColorPixels[2]; -extern unsigned int _XGrColorNumPixels; -extern char * _XGrClassNames[6]; - -extern void _XGrCopyBStore(int x, int y, int width, int lenght); - -extern int _XGrKeyboardHit(void); -extern int _XGrKeyboardGetKey(void); -extern int _XGrKeyboardGetState(void); - -#endif diff --git a/thirdparty/grx249/src/include/memcopy.h b/thirdparty/grx249/src/include/memcopy.h deleted file mode 100644 index 2e5eb48..0000000 --- a/thirdparty/grx249/src/include/memcopy.h +++ /dev/null @@ -1,1417 +0,0 @@ -/** - ** memcopy.h ---- inline assembly memory copy macros - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Basic and optimized memory block copy operations in byte, word and - ** long sizes. The copys are available in WRITE, XOR, OR and AND modes. - ** - **/ - -#ifndef __MEMCOPY_H_INCLUDED__ -#define __MEMCOPY_H_INCLUDED__ - -#ifndef __MEMMODE_H_INCLUDED__ -#include "memmode.h" -#endif -#ifndef __MEMPEEK_H_INCLUDED__ -#include "mempeek.h" -#endif -#ifndef __ARITH_H_INCLUDED__ -#include "arith.h" -#endif - -#if !defined(CPSIZE_b) && defined(GR_int8) -#define CPSIZE_b sizeof(GR_int8) -#endif -#if !defined(CPSIZE_w) && defined(GR_int16) -#define CPSIZE_w sizeof(GR_int16) -#endif -#if !defined(CPSIZE_l) && defined(GR_int32) -#define CPSIZE_l sizeof(GR_int32) -#endif -#if !defined(CPSIZE_h) && defined(GR_int64) -#define CPSIZE_h sizeof(GR_int64) -#endif - -#ifdef __GNUC__ -# include "gcc/memcopy.h" -#elif defined(__TURBOC__) -# include "bcc/memcopy.h" -#elif defined(__WATCOMC__) -# include "watcom/memcopy.h" -#endif - -#if !defined(GR_int64) && !defined(NO_64BIT_COPY) -#define NO_64BIT_COPY -#endif -#if !defined(GR_int32) && !defined(NO_32BIT_COPY) -#define NO_32BIT_COPY -#endif -#if !defined(GR_int16) && !defined(NO_16BIT_COPY) -#define NO_16BIT_COPY -#endif - -/* Note: -** These functions alter the destination and source pointers and the -** counter. Destination and source pointer _must_ point to next copy -** location at return -*/ - -/* memory -> memory copies */ -#ifndef __INLINE_STD_COLCOPY__ -#define __INLINE_STD_COLCOPY__(D,DSKP,S,SSKP,C,DM,SM,INS,SIZE,TYPE) do { \ - poke##DM((D),peek##SM(S)); \ - ptrinc((D),(DSKP)); ptrinc((S),(SSKP)); \ -} while(--(C)) -#endif - -#ifndef __INLINE_STD_OPRCOPY__ -#define __INLINE_STD_OPRCOPY__(D,S,C,DM,SM,INS,SIZE,TY) \ - __INLINE_STD_COLCOPY__(D,sizeof(TY),S,sizeof(TY),C,DM,SM,INS,SIZE,TY) -#endif - -#ifndef __INLINE_STD_ROWCOPY__ -#define __INLINE_STD_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) \ - __INLINE_STD_OPRCOPY__(D,S,C,DM,SM,MOV_INS,SIZE,TYPE) -#endif - -/* video -> memory copies */ -#ifndef __INLINE_STD_FAR_COLCOPY__ -#define __INLINE_STD_FAR_COLCOPY__(D,DSK,S,SSK,C,DM,SM,INS,SIZE,TYPE) \ - __INLINE_STD_COLCOPY__(D,DSK,S,SSK,C,DM,SM,INS,SIZE,TYPE) -#endif - -#ifndef __INLINE_STD_FAR_OPRCOPY__ -#define __INLINE_STD_FAR_OPRCOPY__(D,S,C,DM,SM,INS,SIZE,TY) \ - __INLINE_STD_FAR_COLCOPY__(D,sizeof(TY),S,sizeof(TY),C,DM,SM,INS,SIZE,TY) -#endif - -#ifndef __INLINE_STD_FAR_ROWCOPY__ -#define __INLINE_STD_FAR_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) \ - __INLINE_STD_FAR_OPRCOPY__(D,S,C,DM,SM,MOV_INS,SIZE,TYPE) -#endif - -/* memory -> video copies */ -#ifndef __INLINE_FAR_STD_COLCOPY__ -#define __INLINE_FAR_STD_COLCOPY__(D,DSK,S,SSK,C,DM,SM,INS,SIZE,TYPE) \ - __INLINE_STD_COLCOPY__(D,DSK,S,SSK,C,DM,SM,INS,SIZE,TYPE) -#endif - -#ifndef __INLINE_FAR_STD_OPRCOPY__ -#define __INLINE_FAR_STD_OPRCOPY__(D,S,C,DM,SM,INS,SIZE,TY) \ - __INLINE_FAR_STD_COLCOPY__(D,sizeof(TY),S,sizeof(TY),C,DM,SM,INS,SIZE,TY) -#endif - -#ifndef __INLINE_FAR_STD_ROWCOPY__ -#define __INLINE_FAR_STD_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) \ - __INLINE_FAR_STD_OPRCOPY__(D,S,C,DM,SM,MOV_INS,SIZE,TYPE) -#endif - -/* video -> video copies */ -#ifndef __INLINE_FAR_FAR_COLCOPY__ -#define __INLINE_FAR_FAR_COLCOPY__(D,DSK,S,SSK,C,DM,SM,INS,SIZE,TYPE) \ - __INLINE_STD_COLCOPY__(D,DSK,S,SSK,C,DM,SM,INS,SIZE,TYPE) -#endif - -#ifndef __INLINE_FAR_FAR_OPRCOPY__ -#define __INLINE_FAR_FAR_OPRCOPY__(D,S,C,DM,SM,INS,SIZE,TY) \ - __INLINE_FAR_FAR_COLCOPY__(D,sizeof(TY),S,sizeof(TY),C,DM,SM,INS,SIZE,TY) -#endif - -#ifndef __INLINE_FAR_FAR_ROWCOPY__ -#define __INLINE_FAR_FAR_ROWCOPY__(D,S,C,DM,SM,SIZE,TYPE) \ - __INLINE_FAR_FAR_OPRCOPY__(D,S,C,DM,SM,MOV_INS,SIZE,TYPE) -#endif - -/* - * rowcopy_[_][_][_](dst,src,count) - * ^-^-^-dst-^-^-^ ^src^ - */ -/* memory -> memory copy */ -#ifndef rowcopy_b_set -#define rowcopy_b_set(d,s,c) \ - __INLINE_STD_ROWCOPY__(d,s,c,_b,_b,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_set -# ifdef NO_16BIT_COPY -# define rowcopy_w_set(d,s,c) rowcopy_b_set(d,s,(c)<<1) -# else -# define rowcopy_w_set(d,s,c) __INLINE_STD_ROWCOPY__(d,s,c,_w,_w,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_set -# ifdef NO_32BIT_COPY -# define rowcopy_l_set(d,s,c) rowcopy_w_set(d,s,(c)<<1) -# else -# define rowcopy_l_set(d,s,c) __INLINE_STD_ROWCOPY__(d,s,c,_l,_l,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_set) -# ifdef NO_64BIT_COPY -# define rowcopy_h_set(d,s,c) rowcopy_l_set(d,s,(c)<<1) -# else -# define rowcopy_h_set(d,s,c) __INLINE_STD_ROWCOPY__(d,s,c,_h,_h,OP64b,GR_int64) -# endif -#endif - -#define rowcopy_b rowcopy_b_set -#define rowcopy_w rowcopy_w_set -#define rowcopy_l rowcopy_l_set -#ifdef rowcopy_h_set -#define rowcopy_h rowcopy_h_set -#endif - -#ifndef rowcopy_b_xor -#define rowcopy_b_xor(d,s,c) \ - __INLINE_STD_OPRCOPY__(d,s,c,_b_xor,_b,XOR_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_xor -# ifdef NO_16BIT_COPY -# define rowcopy_w_xor(d,s,c) rowcopy_b_xor(d,s,(c)<<1) -# else -# define rowcopy_w_xor(d,s,c) __INLINE_STD_OPRCOPY__(d,s,c,_w_xor,_w,XOR_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_xor -# ifdef NO_32BIT_COPY -# define rowcopy_l_xor(d,s,c) rowcopy_w_xor(d,s,(c)<<1) -# else -# define rowcopy_l_xor(d,s,c) __INLINE_STD_OPRCOPY__(d,s,c,_l_xor,_l,XOR_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_xor) -# ifdef NO_64BIT_COPY -# define rowcopy_h_xor(d,s,c) rowcopy_l_xor(d,s,(c)<<1) -# else -# define rowcopy_h_xor(d,s,c) __INLINE_STD_OPRCOPY__(d,s,c,_h_xor,_h,XOR_INS,OP64b,GR_int64) -# endif -#endif - -#ifndef rowcopy_b_or -#define rowcopy_b_or(d,s,c) \ - __INLINE_STD_OPRCOPY__(d,s,c,_b_or,_b,OR_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_or -# ifdef NO_16BIT_COPY -# define rowcopy_w_or(d,s,c) rowcopy_b_or(d,s,(c)<<1) -# else -# define rowcopy_w_or(d,s,c) __INLINE_STD_OPRCOPY__(d,s,c,_w_or,_w,OR_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_or -# ifdef NO_32BIT_COPY -# define rowcopy_l_or(d,s,c) rowcopy_w_or(d,s,(c)<<1) -# else -# define rowcopy_l_or(d,s,c) __INLINE_STD_OPRCOPY__(d,s,c,_l_or,_l,OR_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_or) -# ifdef NO_64BIT_COPY -# define rowcopy_h_or(d,s,c) rowcopy_l_or(d,s,(c)<<1) -# else -# define rowcopy_h_or(d,s,c) __INLINE_STD_OPRCOPY__(d,s,c,_h_or,_h,OR_INS,OP64b,GR_int64) -# endif -#endif - -#ifndef rowcopy_b_and -#define rowcopy_b_and(d,s,c) \ - __INLINE_STD_OPRCOPY__(d,s,c,_b_and,_b,AND_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_and -# ifdef NO_16BIT_COPY -# define rowcopy_w_and(d,s,c) rowcopy_b_and(d,s,(c)<<1) -# else -# define rowcopy_w_and(d,s,c) __INLINE_STD_OPRCOPY__(d,s,c,_w_and,_w,AND_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_and -# ifdef NO_32BIT_COPY -# define rowcopy_l_and(d,s,c) rowcopy_w_and(d,s,(c)<<1) -# else -# define rowcopy_l_and(d,s,c) __INLINE_STD_OPRCOPY__(d,s,c,_l_and,_l,AND_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_and) -# ifdef NO_64BIT_COPY -# define rowcopy_h_and(d,s,c) rowcopy_l_and(d,s,(c)<<1) -# else -# define rowcopy_h_and(d,s,c) __INLINE_STD_OPRCOPY__(d,s,c,_h_and,_h,AND_INS,OP64b,GR_int64) -# endif -#endif - -#define rowcopy_b_n_set_n rowcopy_b_set -#define rowcopy_b_n_xor_n rowcopy_b_xor -#define rowcopy_b_n_or_n rowcopy_b_or -#define rowcopy_b_n_and_n rowcopy_b_and -#define rowcopy_w_n_set_n rowcopy_w_set -#define rowcopy_w_n_xor_n rowcopy_w_xor -#define rowcopy_w_n_or_n rowcopy_w_or -#define rowcopy_w_n_and_n rowcopy_w_and -#define rowcopy_l_n_set_n rowcopy_l_set -#define rowcopy_l_n_xor_n rowcopy_l_xor -#define rowcopy_l_n_or_n rowcopy_l_or -#define rowcopy_l_n_and_n rowcopy_l_and -#ifdef rowcopy_l_set -#define rowcopy_h_n_set_n rowcopy_h_set -#define rowcopy_h_n_xor_n rowcopy_h_xor -#define rowcopy_h_n_or_n rowcopy_h_or -#define rowcopy_h_n_and_n rowcopy_h_and -#endif - -/* memory -> video copy */ -#ifndef rowcopy_b_f_set -#define rowcopy_b_f_set(d,s,c) \ - __INLINE_FAR_STD_ROWCOPY__(d,s,c,_b_f,_b,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_f_set -# ifdef NO_16BIT_COPY -# define rowcopy_w_f_set(d,s,c) rowcopy_b_f_set(d,s,(c)<<1) -# else -# define rowcopy_w_f_set(d,s,c) \ - __INLINE_FAR_STD_ROWCOPY__(d,s,c,_w_f,_w,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_f_set -# ifdef NO_32BIT_COPY -# define rowcopy_l_f_set(d,s,c) rowcopy_w_f_set(d,s,(c)<<1) -# else -# define rowcopy_l_f_set(d,s,c) \ - __INLINE_FAR_STD_ROWCOPY__(d,s,c,_l_f,_l,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_f_set) -# ifdef NO_64BIT_COPY -# define rowcopy_h_f_set(d,s,c) rowcopy_l_f_set(d,s,(c)<<1) -# else -# define rowcopy_h_f_set(d,s,c) \ - __INLINE_FAR_STD_ROWCOPY__(d,s,c,_h_f,_h,OP64b,GR_int64) -# endif -#endif - -#ifndef rowcopy_b_f_xor -#define rowcopy_b_f_xor(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_b_f_xor,_b,XOR_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_f_xor -# ifdef NO_16BIT_COPY -# define rowcopy_w_f_xor(d,s,c) rowcopy_b_f_xor(d,s,(c)<<1) -# else -# define rowcopy_w_f_xor(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_w_f_xor,_w,XOR_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_f_xor -# ifdef NO_32BIT_COPY -# define rowcopy_l_f_xor(d,s,c) rowcopy_w_f_xor(d,s,(c)<<1) -# else -# define rowcopy_l_f_xor(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_l_f_xor,_l,XOR_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_f_xor) -# ifdef NO_64BIT_COPY -# define rowcopy_h_f_xor(d,s,c) rowcopy_l_f_xor(d,s,(c)<<1) -# else -# define rowcopy_h_f_xor(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_h_f_xor,_h,XOR_INS,OP64b,GR_int64) -# endif -#endif - -#ifndef rowcopy_b_f_or -#define rowcopy_b_f_or(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_b_f_or,_b,OR_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_f_or -# ifdef NO_16BIT_COPY -# define rowcopy_w_f_or(d,s,c) rowcopy_b_f_or(d,s,(c)<<1) -# else -# define rowcopy_w_f_or(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_w_f_or,_w,OR_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_f_or -# ifdef NO_32BIT_COPY -# define rowcopy_l_f_or(d,s,c) rowcopy_w_f_or(d,s,(c)<<1) -# else -# define rowcopy_l_f_or(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_l_f_or,_l,OR_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_f_or) -# ifdef NO_64BIT_COPY -# define rowcopy_h_f_or(d,s,c) rowcopy_l_f_or(d,s,(c)<<1) -# else -# define rowcopy_h_f_or(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_h_f_or,_h,OR_INS,OP64b,GR_int64) -# endif -#endif - -#ifndef rowcopy_b_f_and -#define rowcopy_b_f_and(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_b_f_and,_b,AND_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_f_and -# ifdef NO_16BIT_COPY -# define rowcopy_w_f_and(d,s,c) rowcopy_b_f_and(d,s,(c)<<1) -# else -# define rowcopy_w_f_and(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_w_f_and,_w,AND_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_f_and -# ifdef NO_16BIT_COPY -# define rowcopy_l_f_and(d,s,c) rowcopy_w_f_and(d,s,(c)<<1) -# else -# define rowcopy_l_f_and(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_l_f_and,_l,AND_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_f_and) -# ifdef NO_16BIT_COPY -# define rowcopy_h_f_and(d,s,c) rowcopy_l_f_and(d,s,(c)<<1) -# else -# define rowcopy_h_f_and(d,s,c) \ - __INLINE_FAR_STD_OPRCOPY__(d,s,c,_h_f_and,_h,AND_INS,OP64b,GR_int64) -# endif -#endif - -#define rowcopy_b_f_set_n rowcopy_b_f_set -#define rowcopy_b_f_xor_n rowcopy_b_f_xor -#define rowcopy_b_f_or_n rowcopy_b_f_or -#define rowcopy_b_f_and_n rowcopy_b_f_and -#define rowcopy_w_f_set_n rowcopy_w_f_set -#define rowcopy_w_f_xor_n rowcopy_w_f_xor -#define rowcopy_w_f_or_n rowcopy_w_f_or -#define rowcopy_w_f_and_n rowcopy_w_f_and -#define rowcopy_l_f_set_n rowcopy_l_f_set -#define rowcopy_l_f_xor_n rowcopy_l_f_xor -#define rowcopy_l_f_or_n rowcopy_l_f_or -#define rowcopy_l_f_and_n rowcopy_l_f_and -#ifdef rowcopy_h_f_set -#define rowcopy_h_f_set_n rowcopy_h_f_set -#define rowcopy_h_f_xor_n rowcopy_h_f_xor -#define rowcopy_h_f_or_n rowcopy_h_f_or -#define rowcopy_h_f_and_n rowcopy_h_f_and -#endif - - -/* video -> memory copy */ -#ifndef rowcopy_b_set_f -#define rowcopy_b_set_f(d,s,c) \ - __INLINE_STD_FAR_ROWCOPY__(d,s,c,_b,_b_f,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_set_f -# ifdef NO_16BIT_COPY -# define rowcopy_w_set_f(d,s,c) rowcopy_b_set_f(d,s,(c)<<1) -# else -# define rowcopy_w_set_f(d,s,c) \ - __INLINE_STD_FAR_ROWCOPY__(d,s,c,_w,_w_f,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_set_f -# ifdef NO_32BIT_COPY -# define rowcopy_l_set_f(d,s,c) rowcopy_w_set_f(d,s,(c)<<1) -# else -# define rowcopy_l_set_f(d,s,c) \ - __INLINE_STD_FAR_ROWCOPY__(d,s,c,_l,_l_f,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_set_f) -# ifdef NO_64BIT_COPY -# define rowcopy_h_set_f(d,s,c) rowcopy_l_set_f(d,s,(c)<<1) -# else -# define rowcopy_h_set_f(d,s,c) \ - __INLINE_STD_FAR_ROWCOPY__(d,s,c,_h,_h_f,OP64b,GR_int64) -# endif -#endif - -#ifndef rowcopy_b_xor_f -#define rowcopy_b_xor_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_b_xor,_b_f,XOR_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_xor_f -# ifdef NO_16BIT_COPY -# define rowcopy_w_xor_f(d,s,c) rowcopy_b_xor_f(d,s,(c)<<1) -# else -# define rowcopy_w_xor_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_w_xor,_w_f,XOR_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_xor_f -# ifdef NO_32BIT_COPY -# define rowcopy_l_xor_f(d,s,c) rowcopy_w_xor_f(d,s,(c)<<1) -# else -# define rowcopy_l_xor_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_l_xor,_l_f,XOR_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_xor_f) -# ifdef NO_64BIT_COPY -# define rowcopy_h_xor_f(d,s,c) rowcopy_l_xor_f(d,s,(c)<<1) -# else -# define rowcopy_h_xor_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_h_xor,_h_f,XOR_INS,OP64b,GR_int64) -# endif -#endif - -#ifndef rowcopy_b_or_f -#define rowcopy_b_or_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_b_or,_b_f,OR_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_or_f -# ifdef NO_16BIT_COPY -# define rowcopy_w_or_f(d,s,c) rowcopy_b_or_f(d,s,(c)<<1) -# else -# define rowcopy_w_or_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_w_or,_w_f,OR_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_or_f -# ifdef NO_32BIT_COPY -# define rowcopy_l_or_f(d,s,c) rowcopy_w_or_f(d,s,(c)<<1) -# else -# define rowcopy_l_or_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_l_or,_l_f,OR_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_or_f) -# ifdef NO_64BIT_COPY -# define rowcopy_h_or_f(d,s,c) rowcopy_l_or_f(d,s,(c)<<1) -# else -# define rowcopy_h_or_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_h_or,_h_f,OR_INS,OP64b,GR_int64) -# endif -#endif - -#ifndef rowcopy_b_and_f -#define rowcopy_b_and_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_b_and,_b_f,AND_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_and_f -# ifdef NO_16BIT_COPY -# define rowcopy_w_and_f(d,s,c) rowcopy_b_and_f(d,s,(c)<<1) -# else -# define rowcopy_w_and_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_w_and,_w_f,AND_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_and_f -# ifdef NO_32BIT_COPY -# define rowcopy_l_and_f(d,s,c) rowcopy_w_and_f(d,s,(c)<<1) -# else -# define rowcopy_l_and_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_l_and,_l_f,AND_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_and_f) -# ifdef NO_64BIT_COPY -# define rowcopy_h_and_f(d,s,c) rowcopy_l_and_f(d,s,(c)<<1) -# else -# define rowcopy_h_and_f(d,s,c) \ - __INLINE_STD_FAR_OPRCOPY__(d,s,c,_h_and,_h_f,AND_INS,OP64b,GR_int64) -# endif -#endif - -#define rowcopy_b_n_set_f rowcopy_b_set_f -#define rowcopy_b_n_xor_f rowcopy_b_xor_f -#define rowcopy_b_n_or_f rowcopy_b_or_f -#define rowcopy_b_n_and_f rowcopy_b_and_f -#define rowcopy_w_n_set_f rowcopy_w_set_f -#define rowcopy_w_n_xor_f rowcopy_w_xor_f -#define rowcopy_w_n_or_f rowcopy_w_or_f -#define rowcopy_w_n_and_f rowcopy_w_and_f -#define rowcopy_l_n_set_f rowcopy_l_set_f -#define rowcopy_l_n_xor_f rowcopy_l_xor_f -#define rowcopy_l_n_or_f rowcopy_l_or_f -#define rowcopy_l_n_and_f rowcopy_l_and_f -#ifdef rowcopy_h_set_f -#define rowcopy_h_n_set_f rowcopy_h_set_f -#define rowcopy_h_n_xor_f rowcopy_h_xor_f -#define rowcopy_h_n_or_f rowcopy_h_or_f -#define rowcopy_h_n_and_f rowcopy_h_and_f -#endif - - -/* video -> video copy */ -#ifndef rowcopy_b_f_set_f -#define rowcopy_b_f_set_f(d,s,c) \ - __INLINE_FAR_FAR_ROWCOPY__(d,s,c,_b_f,_b_f,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_f_set_f -# ifdef NO_16BIT_COPY -# define rowcopy_w_f_set_f(d,s,c) rowcopy_b_f_set_f(d,s,(c)<<1) -# else -# define rowcopy_w_f_set_f(d,s,c) \ - __INLINE_FAR_FAR_ROWCOPY__(d,s,c,_w_f,_w_f,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_f_set_f -# ifdef NO_32BIT_COPY -# define rowcopy_l_f_set_f(d,s,c) rowcopy_w_f_set_f(d,s,(c)<<1) -# else -# define rowcopy_l_f_set_f(d,s,c) \ - __INLINE_FAR_FAR_ROWCOPY__(d,s,c,_l_f,_l_f,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_f_set_f) -# ifdef NO_64BIT_COPY -# define rowcopy_h_f_set_f(d,s,c) rowcopy_l_f_set_f(d,s,(c)<<1) -# else -# define rowcopy_h_f_set_f(d,s,c) \ - __INLINE_FAR_FAR_ROWCOPY__(d,s,c,_h_f,_h_f,OP64b,GR_int64) -# endif -#endif - -#ifndef rowcopy_b_f_xor_f -#define rowcopy_b_f_xor_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_b_f_xor,_b_f,XOR_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_f_xor_f -# ifdef NO_16BIT_COPY -# define rowcopy_w_f_xor_f(d,s,c) rowcopy_b_f_xor_f(d,s,(c)<<1) -# else -# define rowcopy_w_f_xor_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_w_f_xor,_w_f,XOR_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_f_xor_f -# ifdef NO_32BIT_COPY -# define rowcopy_l_f_xor_f(d,s,c) rowcopy_w_f_xor_f(d,s,(c)<<1) -# else -# define rowcopy_l_f_xor_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_l_f_xor,_l_f,XOR_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_f_xor_f) -# ifdef NO_64BIT_COPY -# define rowcopy_h_f_xor_f(d,s,c) rowcopy_l_f_xor_f(d,s,(c)<<1) -# else -# define rowcopy_h_f_xor_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_h_f_xor,_h_f,XOR_INS,OP64b,GR_int64) -# endif -#endif - -#ifndef rowcopy_b_f_or_f -#define rowcopy_b_f_or_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_b_f_or,_b_f,OR_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_f_or_f -# ifdef NO_16BIT_COPY -# define rowcopy_w_f_or_f(d,s,c) rowcopy_b_f_or_f(d,s,(c)<<1) -# else -# define rowcopy_w_f_or_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_w_f_or,_w_f,OR_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_f_or_f -# ifdef NO_32BIT_COPY -# define rowcopy_l_f_or_f(d,s,c) rowcopy_w_f_or_f(d,s,(c)<<1) -# else -# define rowcopy_l_f_or_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_l_f_or,_l_f,OR_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_f_or_f) -# ifdef NO_64BIT_COPY -# define rowcopy_h_f_or_f(d,s,c) rowcopy_l_f_or_f(d,s,(c)<<1) -# else -# define rowcopy_h_f_or_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_h_f_or,_h_f,OR_INS,OP64b,GR_int64) -# endif -#endif - -#ifndef rowcopy_b_f_and_f -#define rowcopy_b_f_and_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_b_f_and,_b_f,AND_INS,OP8b,GR_int8) -#endif -#ifndef rowcopy_w_f_and_f -# ifdef NO_16BIT_COPY -# define rowcopy_w_f_and_f(d,s,c) rowcopy_b_f_and_f(d,s,(c)<<1) -# else -# define rowcopy_w_f_and_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_w_f_and,_w_f,AND_INS,OP16b,GR_int16) -# endif -#endif -#ifndef rowcopy_l_f_and_f -# ifdef NO_32BIT_COPY -# define rowcopy_l_f_and_f(d,s,c) rowcopy_w_f_and_f(d,s,(c)<<1) -# else -# define rowcopy_l_f_and_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_l_f_and,_l_f,AND_INS,OP32b,GR_int32) -# endif -#endif -#if defined(GR_int64) && !defined(rowcopy_h_f_and_f) -# ifdef NO_64BIT_COPY -# define rowcopy_h_f_and_f(d,s,c) rowcopy_l_f_and_f(d,s,(c)<<1) -# else -# define rowcopy_h_f_and_f(d,s,c) \ - __INLINE_FAR_FAR_OPRCOPY__(d,s,c,_h_f_and,_h_f,AND_INS,OP64b,GR_int64) -# endif -#endif - - - -/* - * colcopy_[_][_][_](dst,doffs,src,srcoffs,count) - * ^-^-^-dst-^-^-^ ^src^ - */ -/* memory -> memory copy */ -#ifndef colcopy_b_set -#define colcopy_b_set(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_b,_b,MOV_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_set -#define colcopy_w_set(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_w,_w,MOV_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_set) -#define colcopy_l_set(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_l,_l,MOV_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_set) -#define colcopy_h_set(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_h,_h,MOV_INS,OP64b,GR_int64) -#endif - -#define colcopy_b colcopy_b_set -#define colcopy_w colcopy_w_set -#define colcopy_l colcopy_l_set -#ifdef colcopy_h_set -#define colcopy_h colcopy_h_set -#endif - - -#ifndef colcopy_b_xor -#define colcopy_b_xor(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_b_xor,_b,XOR_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_xor -#define colcopy_w_xor(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_w_xor,_w,XOR_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_xor) -#define colcopy_l_xor(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_l_xor,_l,XOR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_xor) -#define colcopy_h_xor(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_h_xor,_h,XOR_INS,OP64b,GR_int64) -#endif - -#ifndef colcopy_b_or -#define colcopy_b_or(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_b_or,_b,OR_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_or -#define colcopy_w_or(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_w_or,_w,OR_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_or) -#define colcopy_l_or(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_l_or,_l,OR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_or) -#define colcopy_h_or(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_h_or,_h,OR_INS,OP64b,GR_int64) -#endif - -#ifndef colcopy_b_and -#define colcopy_b_and(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_b_and,_b,AND_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_and -#define colcopy_w_and(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_w_and,_w,AND_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_and) -#define colcopy_l_and(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_l_and,_l,AND_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_and) -#define colcopy_h_and(d,dof,s,sof,c) \ - __INLINE_STD_COLCOPY__(d,dof,s,sof,c,_h_and,_h,AND_INS,OP64b,GR_int64) -#endif - -#define colcopy_b_n_set_n colcopy_b_set -#define colcopy_b_n_xor_n colcopy_b_xor -#define colcopy_b_n_or_n colcopy_b_or -#define colcopy_b_n_and_n colcopy_b_and -#define colcopy_w_n_set_n colcopy_w_set -#define colcopy_w_n_xor_n colcopy_w_xor -#define colcopy_w_n_or_n colcopy_w_or -#define colcopy_w_n_and_n colcopy_w_and -#define colcopy_l_n_set_n colcopy_l_set -#define colcopy_l_n_xor_n colcopy_l_xor -#define colcopy_l_n_or_n colcopy_l_or -#define colcopy_l_n_and_n colcopy_l_and -#ifdef colcopy_h_set -#define colcopy_h_n_set_n colcopy_h_set -#define colcopy_h_n_xor_n colcopy_h_xor -#define colcopy_h_n_or_n colcopy_h_or -#define colcopy_h_n_and_n colcopy_h_and -#endif - - -/* memory -> video copy */ -#ifndef colcopy_b_f_set -#define colcopy_b_f_set(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_b_f,_b,MOV_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_f_set -#define colcopy_w_f_set(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_w_f,_w,MOV_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_f_set) -#define colcopy_l_f_set(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_l_f,_l,MOV_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_f_set) -#define colcopy_h_f_set(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_h_f,_h,MOV_INS,OP64b,GR_int64) -#endif - -#ifndef colcopy_b_f_xor -#define colcopy_b_f_xor(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_b_f_xor,_b,XOR_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_f_xor -#define colcopy_w_f_xor(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_w_f_xor,_w,XOR_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_f_xor) -#define colcopy_l_f_xor(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_l_f_xor,_l,XOR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_f_xor) -#define colcopy_h_f_xor(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_h_f_xor,_h,XOR_INS,OP64b,GR_int64) -#endif - -#ifndef colcopy_b_f_or -#define colcopy_b_f_or(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_b_f_or,_b,OR_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_f_or -#define colcopy_w_f_or(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_w_f_or,_w,OR_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_f_or) -#define colcopy_l_f_or(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_l_f_or,_l,OR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_f_or) -#define colcopy_h_f_or(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_h_f_or,_h,OR_INS,OP64b,GR_int64) -#endif - -#ifndef colcopy_b_f_and -#define colcopy_b_f_and(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_b_f_and,_b,AND_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_f_and -#define colcopy_w_f_and(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_w_f_and,_w,AND_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_f_and) -#define colcopy_l_f_and(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_l_f_and,_l,AND_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_f_and) -#define colcopy_h_f_and(d,dof,s,sof,c) \ - __INLINE_FAR_STD_COLCOPY__(d,dof,s,sof,c,_h_f_and,_h,AND_INS,OP64b,GR_int64) -#endif - -#define colcopy_b_f_set_n colcopy_b_f_set -#define colcopy_b_f_xor_n colcopy_b_f_xor -#define colcopy_b_f_or_n colcopy_b_f_or -#define colcopy_b_f_and_n colcopy_b_f_and -#define colcopy_w_f_set_n colcopy_w_f_set -#define colcopy_w_f_xor_n colcopy_w_f_xor -#define colcopy_w_f_or_n colcopy_w_f_or -#define colcopy_w_f_and_n colcopy_w_f_and -#define colcopy_l_f_set_n colcopy_l_f_set -#define colcopy_l_f_xor_n colcopy_l_f_xor -#define colcopy_l_f_or_n colcopy_l_f_or -#define colcopy_l_f_and_n colcopy_l_f_and -#ifdef colcopy_h_f_set -#define colcopy_h_f_set_n colcopy_h_f_set -#define colcopy_h_f_xor_n colcopy_h_f_xor -#define colcopy_h_f_or_n colcopy_h_f_or -#define colcopy_h_f_and_n colcopy_h_f_and -#endif - - -/* video -> memory copy */ -#ifndef colcopy_b_set_f -#define colcopy_b_set_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_b,_b_f,MOV_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_set_f -#define colcopy_w_set_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_w,_w_f,MOV_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_set_f) -#define colcopy_l_set_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_l,_l_f,MOV_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_set_f) -#define colcopy_h_set_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_h,_h_f,MOV_INS,OP64b,GR_int64) -#endif - -#ifndef colcopy_b_xor_f -#define colcopy_b_xor_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_b_xor,_b_f,XOR_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_xor_f -#define colcopy_w_xor_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_w_xor,_w_f,XOR_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_xor_f) -#define colcopy_l_xor_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_l_xor,_l_f,XOR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_xor_f) -#define colcopy_h_xor_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_h_xor,_h_f,XOR_INS,OP64b,GR_int64) -#endif - -#ifndef colcopy_b_or_f -#define colcopy_b_or_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_b_or,_b_f,OR_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_or_f -#define colcopy_w_or_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_w_or,_w_f,OR_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_or_f) -#define colcopy_l_or_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_l_or,_l_f,OR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_or_f) -#define colcopy_h_or_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_h_or,_h_f,OR_INS,OP64b,GR_int64) -#endif - -#ifndef colcopy_b_and_f -#define colcopy_b_and_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_b_and,_b_f,AND_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_and_f -#define colcopy_w_and_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_w_and,_w_f,AND_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_and_f) -#define colcopy_l_and_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_l_and,_l_f,AND_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_and_f) -#define colcopy_h_and_f(d,dof,s,sof,c) \ - __INLINE_STD_FAR_COLCOPY__(d,dof,s,sof,c,_h_and,_h_f,AND_INS,OP64b,GR_int64) -#endif - -#define colcopy_b_n_set_f colcopy_b_set_f -#define colcopy_b_n_xor_f colcopy_b_xor_f -#define colcopy_b_n_or_f colcopy_b_or_f -#define colcopy_b_n_and_f colcopy_b_and_f -#define colcopy_w_n_set_f colcopy_w_set_f -#define colcopy_w_n_xor_f colcopy_w_xor_f -#define colcopy_w_n_or_f colcopy_w_or_f -#define colcopy_w_n_and_f colcopy_w_and_f -#define colcopy_l_n_set_f colcopy_l_set_f -#define colcopy_l_n_xor_f colcopy_l_xor_f -#define colcopy_l_n_or_f colcopy_l_or_f -#define colcopy_l_n_and_f colcopy_l_and_f -#ifdef colcopy_h_set_f -#define colcopy_h_n_set_f colcopy_h_set_f -#define colcopy_h_n_xor_f colcopy_h_xor_f -#define colcopy_h_n_or_f colcopy_h_or_f -#define colcopy_h_n_and_f colcopy_h_and_f -#endif - - -/* video -> video copy */ -#ifndef colcopy_b_f_set_f -#define colcopy_b_f_set_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_b_f,_b_f,MOV_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_f_set_f -#define colcopy_w_f_set_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_w_f,_w_f,MOV_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_f_set_f) -#define colcopy_l_f_set_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_l_f,_l_f,MOV_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_f_set_f) -#define colcopy_h_f_set_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_h_f,_h_f,MOV_INS,OP64b,GR_int64) -#endif - -#ifndef colcopy_b_f_xor_f -#define colcopy_b_f_xor_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_b_f_xor,_b_f,XOR_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_f_xor_f -#define colcopy_w_f_xor_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_w_f_xor,_w_f,XOR_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_f_xor_f) -#define colcopy_l_f_xor_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_l_f_xor,_l_f,XOR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_f_xor_f) -#define colcopy_h_f_xor_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_h_f_xor,_h_f,XOR_INS,OP64b,GR_int64) -#endif - -#ifndef colcopy_b_f_or_f -#define colcopy_b_f_or_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_b_f_or,_b_f,OR_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_f_or_f -#define colcopy_w_f_or_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_w_f_or,_w_f,OR_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_f_or_f) -#define colcopy_l_f_or_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_l_f_or,_l_f,OR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_f_or_f) -#define colcopy_h_f_or_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_h_f_or,_h_f,OR_INS,OP64b,GR_int64) -#endif - -#ifndef colcopy_b_f_and_f -#define colcopy_b_f_and_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_b_f_and,_b_f,AND_INS,OP8b,GR_int8) -#endif -#ifndef colcopy_w_f_and_f -#define colcopy_w_f_and_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_w_f_and,_w_f,AND_INS,OP16b,GR_int16) -#endif -#if defined(GR_int32) && !defined(colcopy_l_f_and_f) -#define colcopy_l_f_and_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_l_f_and,_l_f,AND_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(colcopy_h_f_and_f) -#define colcopy_h_f_and_f(d,dof,s,sof,c) \ - __INLINE_FAR_FAR_COLCOPY__(d,dof,s,sof,c,_h_f_and,_h_f,AND_INS,OP64b,GR_int64) -#endif - - -/* - * fwdcopy[_]_[_](alp,dst,src,cnt) - * revcopy[_]_[_](alp,dst,src,count) - * ^-^-^-dst-^-^-^ ^src^ - * - * optimized copy - will use fastest available copy - * alp: alignment pointer will be moved to an aligned - * boundary by small size copy ops before bulk copy is - * done using max. data width. Must equal dst or src - * dst: destination pointer, on return points to first address - * following the copy area - * src: source pointer, on return points to first address - * following the copy area - * cnt: number of bytes to be copied. Changed. - */ - -/* generic single element copy */ -#ifndef __INLINE_1_COPY__ -#define __INLINE_1_COPY__(D,S,SZ,WOP,SF,INC) do { \ - poke_##SZ##WOP((D),peek_##SZ##SF(S)); \ - ptrinc((D),(INC)); ptrinc((S),(INC)); \ -} while (0) -#endif - -/* generic optimized forward copy (meets NO alignment resriction :( */ -#ifndef __INLINE_STD_FWD_COPY__ -#define __INLINE_STD_FWD_COPY__(SZ,WOP,SF,ALP,DST,SRC,CNT) do { \ - if ((GR_PtrInt)(CNT) >= 2*CPSIZE_##SZ-1 ) { \ - GR_PtrInt _c_ = (-((GR_PtrInt)(ALP))) & (CPSIZE_##SZ-1); \ - if (_c_) { \ - (CNT) -= _c_; \ - rowcopy_b##WOP##SF(DST,SRC,_c_); \ - } \ - _c_ = ((GR_PtrInt)(CNT)) / CPSIZE_##SZ; \ - rowcopy_##SZ##WOP##SF(DST,SRC,_c_); \ - (CNT) &= (CPSIZE_##SZ-1); \ - } \ - if ( (GR_PtrInt)(CNT) ) \ - rowcopy_b##WOP##SF(DST,SRC,CNT)); \ -} while(0) -#endif - -/* generic optimized reverse copy (meets NO alignment resrictions :( */ -#ifndef __INLINE_STD_REV_COPY__ -#define __INLINE_STD_REV_COPY__(SZ,WOP,SF,ALP,DST,SRC,CNT) do { \ - if ((GR_PtrInt)(CNT) >= 2*CPSIZE_##SZ-1 ) { \ - GR_PtrInt _c_ = ((GR_PtrInt)(ALP)+1) & (CPSIZE_##SZ-1); \ - if (_c_) { \ - (CNT) -= _c_; \ - colcopy_b##WOP##SF(DST,(-1),SRC,(-1),_c_); \ - } \ - _c_ = ((GR_PtrInt)(CNT)) / CPSIZE_##SZ; \ - ptrinc(DST,-(CPSIZE_##SZ)+1); \ - ptrinc(SRC,-(CPSIZE_##SZ)+1); \ - colcopy_##SZ##WOP##SF(DST,-(CPSIZE_##SZ),SRC,-(CPSIZE_##SZ),_c_); \ - ptrinc(DST,(CPSIZE_##SZ)-1); \ - ptrinc(SRC,(CPSIZE_##SZ)-1); \ - (CNT) &= (CPSIZE_##SZ-1); \ - } \ - if ( (GR_PtrInt)(CNT) ) \ - colcopy_b##WOP##SF(DST,(-1),SRC,(-1),CNT); \ -} while(0) -#endif - -/* forward copy: copy and step to next higher alignment boundary */ -#ifndef __INLINE_FWD_ALIGN__ -#define __INLINE_FWD_ALIGN__(SZ,WOP,SF,AP,D,S,C) \ - if ( ((GR_PtrInt)(AP)) & CPSIZE_##SZ ) { \ - __INLINE_1_COPY__(D,S,SZ,WOP,SF,CPSIZE_##SZ); \ - (C) -= CPSIZE_##SZ; \ - if ( ! ((GR_PtrInt)(C)) ) break; \ - } -#endif - -/* forward copy: copy one remaining element */ -#ifndef __INLINE_FWD_TAIL__ -#define __INLINE_FWD_TAIL__(SZ,WOP,SF,D,S,C) do \ - if ( ((GR_PtrInt)(C)) & CPSIZE_##SZ ) \ - __INLINE_1_COPY__(D,S,SZ,WOP,SF,CPSIZE_##SZ); \ -while (0) -#endif - -/* ------------------- check for system alignment requirements ------------- */ -#if defined(MISALIGNED_64bit_OK) && !defined(NO_64BIT_COPY) && \ - defined(MISALIGNED_32bit_OK) && defined(MISALIGNED_16bit_OK) -/* 8,16,32,64bit misaligned ok */ -#ifndef __INLINE_FWD_COPY__ -#define __INLINE_FWD_COPY__(WOP,SF,AP,D,S,C) do { \ - if ( ((GR_PtrInt)(C)) >= 7 ) { \ - __INLINE_FWD_ALIGN__(b,WOP,SF,AP,D,S,C); \ - __INLINE_FWD_ALIGN__(w,WOP,SF,AP,D,S,C); \ - __INLINE_FWD_ALIGN__(l,WOP,SF,AP,D,S,C); \ - { GR_PtrInt _c_ = ((GR_PtrInt)(C)) >> 3; \ - if (_c_) rowcopy_h##WOP##SF(D,S,_c_); } \ - } \ - __INLINE_FWD_TAIL__(l,WOP,SF,D,S,C); \ - __INLINE_FWD_TAIL__(w,WOP,SF,D,S,C); \ - __INLINE_FWD_TAIL__(b,WOP,SF,D,S,C); \ -} while (0) -#endif -#ifndef __INLINE_REV_COPY__ -#define __INLINE_REV_COPY__(WOP,SF,AP,D,S,C) do { \ - if (((GR_PtrInt)(C)) >= 7) { \ - if ( ! ( ((GR_PtrInt)(AP)) & 1) ) { \ - __INLINE_1_COPY__(D,S,b,WOP,SF,-1); \ - (C)--; \ - } \ - if ( ! ( ((GR_PtrInt)(AP)) & 2) ) { \ - ptrinc((D),-1); \ - ptrinc((S),-1); \ - __INLINE_1_COPY__(D,S,w,WOP,SF,-1); \ - (C) -= 2; \ - } \ - if ( ! ( ((GR_PtrInt)(AP)) & 4) ) { \ - ptrinc((D),-3); \ - ptrinc((S),-3); \ - __INLINE_1_COPY__(D,S,l,WOP,SF,-1); \ - (C) -= 4; \ - } \ - { GR_PtrInt _rch_ = ((GR_PtrInt)(C)) >> 3; \ - if (_rch_) { \ - ptrinc((D),-7); \ - ptrinc((S),-7); \ - colcopy_h##WOP##SF(D,-8,S,-8,_rch_); \ - ptrinc((D),+7); \ - ptrinc((S),+7); \ - } \ - } \ - } \ - if ( ((GR_PtrInt)(C)) & 4 ) { \ - ptrinc((D),-3); \ - ptrinc((S),-3); \ - __INLINE_1_COPY__(D,S,l,WOP,SF,-1); \ - } \ - if ( ((GR_PtrInt)(C)) & 2 ) { \ - ptrinc((D),-1); \ - ptrinc((S),-1); \ - __INLINE_1_COPY__(D,S,w,WOP,SF,-1); \ - } \ - if ( ((GR_PtrInt)(C)) & 1 ) \ - __INLINE_1_COPY__(D,S,b,WOP,SF,-1); \ -} while (0) -#endif - -#elif defined(MISALIGNED_64bit_OK) && !defined(NO_64BIT_COPY) -/* 8,64bit misaligned ok -> standard code */ -#ifndef __INLINE_FWD_COPY__ -#define __INLINE_FWD_COPY__(WOP,SF,AP,D,S,C) \ - __INLINE_STD_FWD_COPY__(h,WOP,SF,AP,D,S,C) -#endif -#ifndef __INLINE_REV_COPY__ -#define __INLINE_REV_COPY__(WOP,SF,AP,D,S,C) \ - __INLINE_STD_REV_COPY__(h,WOP,SF,AP,D,S,C) -#endif - -#elif defined(MISALIGNED_32bit_OK) && !defined(NO_32BIT_COPY) && \ - defined(MISALIGNED_16bit_OK) -/* 8,16,32bit misaligned ok */ -#ifndef __INLINE_FWD_COPY__ -#define __INLINE_FWD_COPY__(WOP,SF,AP,D,S,C) do { \ - if ( ((GR_PtrInt)(C)) >= 3 ) { \ - GR_PtrInt _fcl_; \ - __INLINE_FWD_ALIGN__(b,WOP,SF,AP,D,S,C); \ - __INLINE_FWD_ALIGN__(w,WOP,SF,AP,D,S,C); \ - if ( (_fcl_ = ((GR_PtrInt)(C)) >> 2) != 0) rowcopy_l##WOP##SF(D,S,_fcl_); \ - } \ - __INLINE_FWD_TAIL__(w,WOP,SF,D,S,C); \ - __INLINE_FWD_TAIL__(b,WOP,SF,D,S,C); \ -} while (0) -#endif -#ifndef __INLINE_REV_COPY__ -#define __INLINE_REV_COPY__(WOP,SF,AP,D,S,C) do { \ - if (((GR_PtrInt)(C)) >= 3) { \ - if ( ! ( ((GR_PtrInt)(AP)) & 1) ) { \ - __INLINE_1_COPY__(D,S,b,WOP,SF,-1); \ - (C)--; \ - } \ - if ( ! ( ((GR_PtrInt)(AP)) & 2) ) { \ - ptrinc((D),-1); \ - ptrinc((S),-1); \ - __INLINE_1_COPY__(D,S,w,WOP,SF,-1); \ - (C) -= 2; \ - } \ - { GR_PtrInt _rcl_ = ((GR_PtrInt)(C)) >> 2; \ - if (_rcl_) { \ - ptrinc((D),-3); \ - ptrinc((S),-3); \ - colcopy_l##WOP##SF(D,-4,S,-4,_rcl_); \ - ptrinc((D),+3); \ - ptrinc((S),+3); \ - } \ - } \ - } \ - if ( ((GR_PtrInt)(C)) & 2 ) { \ - ptrinc((D),-1); \ - ptrinc((S),-1); \ - __INLINE_1_COPY__(D,S,w,WOP,SF,-1); \ - } \ - if ( ((GR_PtrInt)(C)) & 1 ) \ - __INLINE_1_COPY__(D,S,b,WOP,SF,-1); \ -} while(0) -#endif - -#elif defined(MISALIGNED_32bit_OK) && !defined(NO_32BIT_COPY) -/* 8,32bit misaligned ok -> standard code */ -#ifndef __INLINE_FWD_COPY__ -#define __INLINE_FWD_COPY__(WOP,SF,AP,D,S,C) \ - __INLINE_STD_FWD_COPY__(l,WOP,SF,AP,D,S,C) -#endif -#ifndef __INLINE_REV_COPY__ -#define __INLINE_REV_COPY__(WOP,SF,AP,D,S,C) \ - __INLINE_STD_REV_COPY__(l,WOP,SF,AP,D,S,C) -#endif - -#elif defined(MISALIGNED_16bit_OK) && !defined(NO_16BIT_COPY) -/* 8,16bit misaligned ok */ -#ifndef __INLINE_FWD_COPY__ -#define __INLINE_FWD_COPY__(WOP,SF,AP,D,S,C) do if ((GR_PtrInt)(C)) { \ - __INLINE_FWD_ALIGN__(b,WOP,SF,AP,D,S,C); \ - { GR_PtrInt _fcw_ = ((GR_PtrInt)(C)) >> 1; \ - if (_fcw_) rowcopy_w##WOP##SF(D,S,_fcw_); } \ - __INLINE_FWD_TAIL__(b,WOP,SF,D,S,C); \ -} while (0) -#endif -#ifndef __INLINE_REV_COPY__ -#define __INLINE_REV_COPY__(WOP,SF,AP,D,S,C) do if ((GR_PtrInt)(C)) { \ - if ( ! ( ((GR_PtrInt)(AP)) & 1) ) { \ - __INLINE_1_COPY__(D,S,b,WOP,SF,-1); \ - (C)--; \ - if ( ! ((GR_PtrInt)(C)) ) break; \ - } \ - { GR_PtrInt _rcw_ = ((GR_PtrInt)(C)) >> 1; \ - if (_rcw_) { \ - ptrinc((D),-1); \ - ptrinc((S),-1); \ - colcopy_w##WOP##SF(D,-2,S,-2,_rcw_); \ - ptrinc((D),+1); \ - ptrinc((S),+1); \ - } \ - } \ - if ( ((GR_PtrInt)(C)) & 1 ) \ - __INLINE_1_COPY__(D,S,b,WOP,SF,-1); \ -} while (0) -#endif - -#endif - -/* ---------------------------------------- fall back to byte copy */ -#ifndef __INLINE_FWD_COPY__ -#define __INLINE_FWD_COPY__(WOP,SF,AP,D,S,C) rowcopy_b##WOP##SF(D,S,C) -#endif -#ifndef __INLINE_REV_COPY__ -#define __INLINE_REV_COPY__(WOP,SF,AP,D,S,C) colcopy_b##WOP##SF(D,-1,S,-1,C) -#endif - -/* memory -> memory copy */ -#ifndef fwdcopy_set -#define fwdcopy_set(ap,d,s,c) __INLINE_FWD_COPY__(_n_set,_n,ap,d,s,c) -#endif -#ifndef fwdcopy_xor -#define fwdcopy_xor(ap,d,s,c) __INLINE_FWD_COPY__(_n_xor,_n,ap,d,s,c) -#endif -#ifndef fwdcopy_or -#define fwdcopy_or(ap,d,s,c) __INLINE_FWD_COPY__(_n_or,_n,ap,d,s,c) -#endif -#ifndef fwdcopy_and -#define fwdcopy_and(ap,d,s,c) __INLINE_FWD_COPY__(_n_and,_n,ap,d,s,c) -#endif -#ifndef revcopy_set -#define revcopy_set(ap,d,s,c) __INLINE_REV_COPY__(_n_set,_n,ap,d,s,c) -#endif -#ifndef revcopy_xor -#define revcopy_xor(ap,d,s,c) __INLINE_REV_COPY__(_n_xor,_n,ap,d,s,c) -#endif -#ifndef revcopy_or -#define revcopy_or(ap,d,s,c) __INLINE_REV_COPY__(_n_or,_n,ap,d,s,c) -#endif -#ifndef revcopy_and -#define revcopy_and(ap,d,s,c) __INLINE_REV_COPY__(_n_and,_n,ap,d,s,c) -#endif - -#define fwdcopy_n_set_n fwdcopy_set -#define fwdcopy_n_xor_n fwdcopy_xor -#define fwdcopy_n_or_n fwdcopy_or -#define fwdcopy_n_and_n fwdcopy_and -#define revcopy_n_set_n revcopy_set -#define revcopy_n_xor_n revcopy_xor -#define revcopy_n_or_n revcopy_or -#define revcopy_n_and_n revcopy_and - - -/* memory -> video copy */ -#ifndef fwdcopy_f_set -#define fwdcopy_f_set(ap,d,s,c) __INLINE_FWD_COPY__(_f_set,_n,ap,d,s,c) -#endif -#ifndef fwdcopy_f_xor -#define fwdcopy_f_xor(ap,d,s,c) __INLINE_FWD_COPY__(_f_xor,_n,ap,d,s,c) -#endif -#ifndef fwdcopy_f_or -#define fwdcopy_f_or(ap,d,s,c) __INLINE_FWD_COPY__(_f_or,_n,ap,d,s,c) -#endif -#ifndef fwdcopy_f_and -#define fwdcopy_f_and(ap,d,s,c) __INLINE_FWD_COPY__(_f_and,_n,ap,d,s,c) -#endif -#ifndef revcopy_f_set -#define revcopy_f_set(ap,d,s,c) __INLINE_REV_COPY__(_f_set,_n,ap,d,s,c) -#endif -#ifndef revcopy_f_xor -#define revcopy_f_xor(ap,d,s,c) __INLINE_REV_COPY__(_f_xor,_n,ap,d,s,c) -#endif -#ifndef revcopy_f_or -#define revcopy_f_or(ap,d,s,c) __INLINE_REV_COPY__(_f_or,_n,ap,d,s,c) -#endif -#ifndef revcopy_f_and -#define revcopy_f_and(ap,d,s,c) __INLINE_REV_COPY__(_f_and,_n,ap,d,s,c) -#endif - -#define fwdcopy_f_set_n fwdcopy_f_set -#define fwdcopy_f_xor_n fwdcopy_f_xor -#define fwdcopy_f_or_n fwdcopy_f_or -#define fwdcopy_f_and_n fwdcopy_f_and -#define revcopy_f_set_n revcopy_f_set -#define revcopy_f_xor_n revcopy_f_xor -#define revcopy_f_or_n revcopy_f_or -#define revcopy_f_and_n revcopy_f_and - - -/* video -> memory copy */ -#ifndef fwdcopy_set_f -#define fwdcopy_set_f(ap,d,s,c) __INLINE_FWD_COPY__(_n_set,_f,ap,d,s,c) -#endif -#ifndef fwdcopy_xor_f -#define fwdcopy_xor_f(ap,d,s,c) __INLINE_FWD_COPY__(_n_xor,_f,ap,d,s,c) -#endif -#ifndef fwdcopy_or_f -#define fwdcopy_or_f(ap,d,s,c) __INLINE_FWD_COPY__(_n_or,_f,ap,d,s,c) -#endif -#ifndef fwdcopy_and_f -#define fwdcopy_and_f(ap,d,s,c) __INLINE_FWD_COPY__(_n_and,_f,ap,d,s,c) -#endif -#ifndef revcopy_set_f -#define revcopy_set_f(ap,d,s,c) __INLINE_REV_COPY__(_n_set,_f,ap,d,s,c) -#endif -#ifndef revcopy_xor_f -#define revcopy_xor_f(ap,d,s,c) __INLINE_REV_COPY__(_n_xor,_f,ap,d,s,c) -#endif -#ifndef revcopy_or_f -#define revcopy_or_f(ap,d,s,c) __INLINE_REV_COPY__(_n_or,_f,ap,d,s,c) -#endif -#ifndef revcopy_and_f -#define revcopy_and_f(ap,d,s,c) __INLINE_REV_COPY__(_n_and,_f,ap,d,s,c) -#endif - -#define fwdcopy_n_set_f fwdcopy_set_f -#define fwdcopy_n_xor_f fwdcopy_xor_f -#define fwdcopy_n_or_f fwdcopy_or_f -#define fwdcopy_n_and_f fwdcopy_and_f -#define revcopy_n_set_f revcopy_set_f -#define revcopy_n_xor_f revcopy_xor_f -#define revcopy_n_or_f revcopy_or_f -#define revcopy_n_and_f revcopy_and_f - - -/* video -> video copy */ -#ifndef fwdcopy_f_set_f -#define fwdcopy_f_set_f(ap,d,s,c) __INLINE_FWD_COPY__(_f_set,_f,ap,d,s,c) -#endif -#ifndef fwdcopy_f_xor_f -#define fwdcopy_f_xor_f(ap,d,s,c) __INLINE_FWD_COPY__(_f_xor,_f,ap,d,s,c) -#endif -#ifndef fwdcopy_f_or_f -#define fwdcopy_f_or_f(ap,d,s,c) __INLINE_FWD_COPY__(_f_or,_f,ap,d,s,c) -#endif -#ifndef fwdcopy_f_and_f -#define fwdcopy_f_and_f(ap,d,s,c) __INLINE_FWD_COPY__(_f_and,_f,ap,d,s,c) -#endif -#ifndef revcopy_f_set_f -#define revcopy_f_set_f(ap,d,s,c) __INLINE_REV_COPY__(_f_set,_f,ap,d,s,c) -#endif -#ifndef revcopy_f_xor_f -#define revcopy_f_xor_f(ap,d,s,c) __INLINE_REV_COPY__(_f_xor,_f,ap,d,s,c) -#endif -#ifndef revcopy_f_or_f -#define revcopy_f_or_f(ap,d,s,c) __INLINE_REV_COPY__(_f_or,_f,ap,d,s,c) -#endif -#ifndef revcopy_f_and_f -#define revcopy_f_and_f(ap,d,s,c) __INLINE_REV_COPY__(_f_and,_f,ap,d,s,c) -#endif - -/* - * stuff to copy arrays, structures - */ -#define memcopy(d,s,sze) do { \ - register void far *_CD = (void far *)(d); \ - register void far *_CS = (void far *)(s); \ - register unsigned GR_PtrInt _CC = (unsigned GR_PtrInt)(sze); \ - DBGPRINTF(DBG_COPYFILL,("memcopy size=%u\n",_CC)); \ - fwdcopy_set(_CD,_CD,_CS,_CC); \ -} while(0) -#define sttcopy(dstp,srcp) memcopy((dstp),(srcp),sizeof(*(srcp))) - - - -#endif /* whole file */ diff --git a/thirdparty/grx249/src/include/memfill.h b/thirdparty/grx249/src/include/memfill.h deleted file mode 100644 index 5f70a17..0000000 --- a/thirdparty/grx249/src/include/memfill.h +++ /dev/null @@ -1,944 +0,0 @@ -/** - ** memfill.h ---- inline assembly memory fill macros - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Basic and optimized memory block fill operations in byte, word and - ** long sizes. The fills are available in WRITE, XOR, OR and AND modes. - ** - **/ - -#ifndef __MEMFILL_H_INCLUDED__ -#define __MEMFILL_H_INCLUDED__ - -#ifndef __MEMMODE_H_INCLUDED__ -#include "memmode.h" -#endif -#ifndef __MEMPEEK_H_INCLUDED__ -#include "mempeek.h" -#endif -#ifndef __ARITH_H_INCLUDED__ -#include "arith.h" -#endif - -#ifdef __GNUC__ -# include "gcc/memfill.h" -#elif defined(__TURBOC__) -# include "bcc/memfill.h" -#elif defined(__WATCOMC__) -# include "watcom/memfill.h" -#endif - -#if !defined(GR_int64) && !defined(NO_64BIT_FILL) -#define NO_64BIT_FILL -#endif -#if !defined(GR_int32) && !defined(NO_32BIT_FILL) -#define NO_32BIT_FILL -#endif -#if !defined(GR_int16) && !defined(NO_16BIT_FILL) -#define NO_16BIT_FILL -#endif - -#if !defined(CPSIZE_b) && defined(GR_int8) -#define CPSIZE_b sizeof(GR_int8) -#endif -#if !defined(CPSIZE_w) && defined(GR_int16) -#define CPSIZE_w sizeof(GR_int16) -#endif -#if !defined(CPSIZE_l) && defined(GR_int32) -#define CPSIZE_l sizeof(GR_int32) -#endif -#if !defined(CPSIZE_h) && defined(GR_int64) -#define CPSIZE_h sizeof(GR_int64) -#endif - -#ifndef __INLINE_STD_COLFILL__ -#define __INLINE_STD_COLFILL__(P,V,C,SKIP,FMODE,INS,SIZE,TYPE) do { \ - poke##FMODE((P),(V)); \ - ptrinc((P),(SKIP)); \ -} while(--(C)) -#endif - -#ifndef __INLINE_STD_OPRFILL__ -#define __INLINE_STD_OPRFILL__(P,V,C,FMODE,INS,SIZE,TYPE) \ - __INLINE_STD_COLFILL__(P,V,C,sizeof(TYPE),FMODE,INS,SIZE,TYPE) -#endif - -#ifndef __INLINE_STD_ROWFILL__ -#define __INLINE_STD_ROWFILL__(P,V,C,FMODE,SIZE,TYPE) \ - __INLINE_STD_OPRFILL__(P,V,C,FMODE,MOV_INS,SIZE,TYPE) -#endif - -#ifndef __INLINE_FAR_COLFILL__ -#define __INLINE_FAR_COLFILL__(P,V,C,SKIP,FMODE,INS,SIZE,TYPE) \ - __INLINE_STD_COLFILL__(P,V,C,SKIP,FMODE,INS,SIZE,TYPE) -#endif - -#ifndef __INLINE_FAR_OPRFILL__ -#define __INLINE_FAR_OPRFILL__(P,V,C,FMODE,INS,SIZE,TYPE) \ - __INLINE_FAR_COLFILL__(P,V,C,sizeof(TYPE),FMODE,INS,SIZE,TYPE) -#endif - -#ifndef __INLINE_FAR_ROWFILL__ -#define __INLINE_FAR_ROWFILL__(P,V,C,FMODE,SIZE,TYPE) \ - __INLINE_FAR_OPRFILL__(P,V,C,FMODE,MOV_INS,SIZE,TYPE) -#endif - -/* - * rowfill_[_][_](pointer,value,count) - */ -#ifndef rowfill_b -#define rowfill_b(p,v,c) \ - __INLINE_STD_ROWFILL__(p,v,c,_b,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(rowfill_w) -#define rowfill_w(p,v,c) \ - __INLINE_STD_ROWFILL__(p,v,c,_w,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(rowfill_l) -#define rowfill_l(p,v,c) \ - __INLINE_STD_ROWFILL__(p,v,c,_l,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(rowfill_h) -#define rowfill_h(p,v,c) \ - __INLINE_STD_ROWFILL__(p,v,c,_h,OP64b,GR_int64) -#endif - -#ifndef rowfill_b_xor -#define rowfill_b_xor(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_b_xor,XOR_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(rowfill_w_xor) -#define rowfill_w_xor(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_w_xor,XOR_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(rowfill_l_xor) -#define rowfill_l_xor(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_l_xor,XOR_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(rowfill_h_xor) -#define rowfill_h_xor(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_h_xor,XOR_INS,OP64b,GR_int64) -#endif - -#ifndef rowfill_b_or -#define rowfill_b_or(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_b_or,OR_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(rowfill_w_or) -#define rowfill_w_or(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_w_or,OR_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(rowfill_l_or) -#define rowfill_l_or(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_l_or,OR_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(rowfill_h_or) -#define rowfill_h_or(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_h_or,OR_INS,OP64b,GR_int64) -#endif - -#ifndef rowfill_b_and -#define rowfill_b_and(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_b_and,AND_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(rowfill_w_and) -#define rowfill_w_and(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_w_and,AND_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(rowfill_l_and) -#define rowfill_l_and(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_l_and,AND_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(rowfill_h_and) -#define rowfill_h_and(p,v,c) \ - __INLINE_STD_OPRFILL__(p,v,c,_h_and,AND_INS,OP64b,GR_int64) -#endif - -#define rowfill_b_n rowfill_b -#define rowfill_w_n rowfill_w -#define rowfill_l_n rowfill_l -#define rowfill_h_n rowfill_h -#define rowfill_b_xor_n rowfill_b_xor -#define rowfill_w_xor_n rowfill_w_xor -#define rowfill_l_xor_n rowfill_l_xor -#define rowfill_h_xor_n rowfill_h_xor -#define rowfill_b_or_n rowfill_b_or -#define rowfill_w_or_n rowfill_w_or -#define rowfill_l_or_n rowfill_l_or -#define rowfill_h_or_n rowfill_h_or -#define rowfill_b_and_n rowfill_b_and -#define rowfill_w_and_n rowfill_w_and -#define rowfill_l_and_n rowfill_l_and -#define rowfill_h_and_n rowfill_h_and - - - -#ifndef rowfill_b_f -#define rowfill_b_f(p,v,c) \ - __INLINE_FAR_ROWFILL__(p,v,c,_b_f,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(rowfill_w_f) -#define rowfill_w_f(p,v,c) \ - __INLINE_FAR_ROWFILL__(p,v,c,_w_f,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(rowfill_l_f) -#define rowfill_l_f(p,v,c) \ - __INLINE_FAR_ROWFILL__(p,v,c,_l_f,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(rowfill_h_f) -#define rowfill_h_f(p,v,c) \ - __INLINE_FAR_ROWFILL__(p,v,c,_h_f,OP64b,GR_int64) -#endif - -#ifndef rowfill_b_f_xor -#define rowfill_b_f_xor(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_b_f_xor,XOR_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(rowfill_w_f_xor) -#define rowfill_w_f_xor(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_w_f_xor,XOR_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(rowfill_l_f_xor) -#define rowfill_l_f_xor(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_l_f_xor,XOR_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(rowfill_h_f_xor) -#define rowfill_h_f_xor(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_h_f_xor,XOR_INS,OP64b,GR_int64) -#endif - -#ifndef rowfill_b_f_or -#define rowfill_b_f_or(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_b_f_or,OR_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(rowfill_w_f_or) -#define rowfill_w_f_or(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_w_f_or,OR_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(rowfill_l_f_or) -#define rowfill_l_f_or(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_l_f_or,OR_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(rowfill_h_f_or) -#define rowfill_h_f_or(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_h_f_or,OR_INS,OP64b,GR_int64) -#endif - -#ifndef rowfill_b_f_and -#define rowfill_b_f_and(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_b_f_and,AND_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(rowfill_w_f_and) -#define rowfill_w_f_and(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_w_f_and,AND_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(rowfill_l_f_and) -#define rowfill_l_f_and(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_l_f_and,AND_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(rowfill_h_f_and) -#define rowfill_h_f_and(p,v,c) \ - __INLINE_FAR_OPRFILL__(p,v,c,_h_f_and,AND_INS,OP64b,GR_int64) -#endif - -/* - * colfill_[_][_](pointer,offset,value,count) - */ -#ifndef colfill_b -#define colfill_b(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_b,MOV_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(colfill_w) -#define colfill_w(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_w,MOV_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(colfill_l) -#define colfill_l(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_l,MOV_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(colfill_h) -#define colfill_h(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_h,MOV_INS,OP64b,GR_int64) -#endif - -#ifndef colfill_b_xor -#define colfill_b_xor(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_b_xor,XOR_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(colfill_w_xor) -#define colfill_w_xor(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_w_xor,XOR_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(colfill_l_xor) -#define colfill_l_xor(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_l_xor,XOR_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(colfill_h_xor) -#define colfill_h_xor(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_h_xor,XOR_INS,OP64b,GR_int64) -#endif - -#ifndef colfill_b_or -#define colfill_b_or(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_b_or,OR_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(colfill_w_or) -#define colfill_w_or(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_w_or,OR_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(colfill_l_or) -#define colfill_l_or(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_l_or,OR_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(colfill_h_or) -#define colfill_h_or(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_h_or,OR_INS,OP64b,GR_int64) -#endif - -#ifndef colfill_b_and -#define colfill_b_and(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_b_and,AND_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(colfill_w_and) -#define colfill_w_and(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_w_and,AND_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(colfill_l_and) -#define colfill_l_and(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_l_and,AND_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(colfill_h_and) -#define colfill_h_and(p,o,v,c) \ - __INLINE_STD_COLFILL__(p,v,c,o,_h_and,AND_INS,OP64b,GR_int64) -#endif - -#ifndef colfill_b_f -#define colfill_b_f(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_b_f,MOV_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(colfill_w_f) -#define colfill_w_f(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_w_f,MOV_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(colfill_l_f) -#define colfill_l_f(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_l_f,MOV_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(colfill_h_f) -#define colfill_h_f(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_h_f,MOV_INS,OP64b,GR_int64) -#endif - -#ifndef colfill_b_f_xor -#define colfill_b_f_xor(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_b_f_xor,XOR_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(colfill_w_f_xor) -#define colfill_w_f_xor(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_w_f_xor,XOR_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(colfill_l_f_xor) -#define colfill_l_f_xor(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_l_f_xor,XOR_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(colfill_h_f_xor) -#define colfill_h_f_xor(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_h_f_xor,XOR_INS,OP64b,GR_int64) -#endif - -#ifndef colfill_b_f_or -#define colfill_b_f_or(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_b_f_or,OR_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(colfill_w_f_or) -#define colfill_w_f_or(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_w_f_or,OR_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(colfill_l_f_or) -#define colfill_l_f_or(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_l_f_or,OR_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(colfill_h_f_or) -#define colfill_h_f_or(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_h_f_or,OR_INS,OP64b,GR_int64) -#endif - -#ifndef colfill_b_f_and -#define colfill_b_f_and(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_b_f_and,AND_INS,OP8b,GR_int8) -#endif -#if !defined(NO_16BIT_FILL) && !defined(colfill_w_f_and) -#define colfill_w_f_and(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_w_f_and,AND_INS,OP16b,GR_int16) -#endif -#if !defined(NO_32BIT_FILL) && !defined(colfill_l_f_and) -#define colfill_l_f_and(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_l_f_and,AND_INS,OP32b,GR_int32) -#endif -#if !defined(NO_64BIT_FILL) && !defined(colfill_h_f_and) -#define colfill_h_f_and(p,o,v,c) \ - __INLINE_FAR_COLFILL__(p,v,c,o,_h_f_and,AND_INS,OP64b,GR_int64) -#endif - -/* - * Optimized row fill operations in byte, word and long sizes. - * The idea is that the bulk of the fill operation is done using - * aligned long fills with a few possible shorter alignment and/or pad - * fills at start and/or end. The smaller size routines (byte, word) - * still assume a long fill argument with the fill value replicated - * in the upper bytes. - */ - -/* generic single element fill */ -#ifndef __INLINE_1_FILL__ -#define __INLINE_1_FILL__(P,V,WOP,SZ) do { \ - poke_##SZ##WOP((P),(V)); \ - ptrinc((P),(CPSIZE_##SZ)); \ -} while (0) -#endif - -/* fill and step to next higher alignment boundary */ -#ifndef __INLINE_ALIGN_FILL__ -#define __INLINE_ALIGN_FILL__(P,V,C,WOP,SZ,BASE) \ - if ( ((GR_PtrInt)(P)) & CPSIZE_##SZ ) { \ - __INLINE_1_FILL__(P,V,WOP,SZ); \ - (C) -= (CPSIZE_##SZ/CPSIZE_##BASE); \ - if ( ! ((GR_PtrInt)(C)) ) break; \ - } -#endif - -/* fill && step remaining bytes after otimal fill */ -#ifndef __INLINE_TAIL_FILL__ -#define __INLINE_TAIL_FILL__(P,V,C,WOP,SZ,BASE) do { \ - if ( ((GR_PtrInt)(C)) & (CPSIZE_##SZ/CPSIZE_##BASE) ) \ - __INLINE_1_FILL__(P,V,WOP,SZ); \ -} while (0) -#endif - -#ifndef __INLINE_STD_OPT_FILL__ -#define __INLINE_STD_OPT_FILL__(P,V,C,WOP,SZ,BASE) do { \ - if ((unsigned GR_PtrInt)(C) >= 2*(CPSIZE_##SZ/CPSIZE_##BASE)-1 ) { \ - unsigned GR_PtrInt _c_ = (-((GR_PtrInt)(P))) & ((CPSIZE_##SZ/CPSIZE_##BASE)-1); \ - if (_c_) { \ - (C) -= _c_; \ - rowfill_##BASE##WOP(P,V,_c_); \ - } \ - _c_ = ((unsigned GR_PtrInt)(C)) / (CPSIZE_##SZ/CPSIZE_##BASE); \ - rowfill_##SZ##WOP(P,V,_c_); \ - (C) &= ((CPSIZE_##SZ/CPSIZE_##BASE)-1); \ - } \ - if ( (GR_PtrInt)(C) ) \ - rowfill_b##WOP(P,V,C); \ -} while(0) -#endif - - -#ifndef __INLINE_B_REPFILL__ -# if !defined(NO_64BIT_FILL) -# if defined(MISALIGNED_32bit_OK) && defined(MISALIGNED_16bit_OK) -# define __INLINE_B_REPFILL__(P,V,C,FMODE) do { \ - if ((unsigned GR_PtrInt)(C) >= 7 ) { \ - __INLINE_ALIGN_FILL__(P,V,C,FMODE,b,b); \ - __INLINE_ALIGN_FILL__(P,V,C,FMODE,w,b); \ - __INLINE_ALIGN_FILL__(P,V,C,FMODE,l,b); \ - { unsigned GR_PtrInt _c64_ = ((unsigned GR_PtrInt)(C)) >> 3; \ - if (_c64_) rowfill_h##FMODE(P,V,_c64_); } \ - } \ - __INLINE_TAIL_FILL__(P,V,C,FMODE,l,b); \ - __INLINE_TAIL_FILL__(P,V,C,FMODE,w,b); \ - __INLINE_TAIL_FILL__(P,V,C,FMODE,b,b); \ - } while (0) -# else -# define __INLINE_B_REPFILL__(P,V,C,FMODE) \ - __INLINE_STD_OPT_FILL__(P,V,C,FMODE,h,b) -# endif -# elif !defined(NO_32BIT_FILL) -# if defined(MISALIGNED_16bit_OK) -# define __INLINE_B_REPFILL__(P,V,C,FMODE) do { \ - if ((unsigned GR_PtrInt)(C) >= 3 ) { \ - __INLINE_ALIGN_FILL__(P,V,C,FMODE,b,b); \ - __INLINE_ALIGN_FILL__(P,V,C,FMODE,w,b); \ - { unsigned GR_PtrInt _c32_ = ((unsigned GR_PtrInt)(C)) >> 2; \ - if (_c32_) rowfill_l##FMODE(P,V,_c32_); } \ - } \ - __INLINE_TAIL_FILL__(P,V,C,FMODE,w,b); \ - __INLINE_TAIL_FILL__(P,V,C,FMODE,b,b); \ - } while (0) -# else -# define __INLINE_B_REPFILL__(P,V,C,FMODE) \ - __INLINE_STD_OPT_FILL__(P,V,C,FMODE,l,b) -# endif -# elif !defined(NO_16BIT_FILL) -# define __INLINE_B_REPFILL__(P,V,C,FMODE) do { \ - __INLINE_ALIGN_FILL__(P,V,C,FMODE,b,b); \ - { unsigned GR_PtrInt _c16_ = ((unsigned GR_PtrInt)(C)) >> 1; \ - if (_c16_) rowfill_w##FMODE(P,V,_c16_); } \ - __INLINE_TAIL_FILL__(P,V,C,FMODE,b,b); \ - } while (0) -# else -# define __INLINE_B_REPFILL__(P,V,C,FMODE) \ - rowfill_b##FMODE(P,V,C) -# endif -#endif /* !__INLINE_B_REPFILL__ */ - -#if !defined(NO_16BIT_FILL) && !defined(__INLINE_W_REPFILL__) -# if !defined(NO_64BIT_FILL) -# if defined(MISALIGNED_32bit_OK) -# define __INLINE_W_REPFILL__(P,V,C,FMODE) do { \ - if ((unsigned GR_PtrInt)(C) >= 3 ) { \ - __INLINE_ALIGN_FILL__(P,V,C,FMODE,w,w); \ - __INLINE_ALIGN_FILL__(P,V,C,FMODE,l,w); \ - { unsigned GR_PtrInt _c64_ = ((unsigned GR_PtrInt)(C)) >> 2; \ - if (_c64_) rowfill_h##FMODE(P,V,_c64_); } \ - } \ - __INLINE_TAIL_FILL__(P,V,C,FMODE,l,w); \ - __INLINE_TAIL_FILL__(P,V,C,FMODE,w,w); \ - } while (0) -# else -# define __INLINE_W_REPFILL__(P,V,C,FMODE) \ - __INLINE_STD_OPT_FILL__(P,V,C,FMODE,h,w) -# endif -# elif !defined(NO_32BIT_FILL) -# define __INLINE_W_REPFILL__(P,V,C,FMODE) do { \ - __INLINE_ALIGN_FILL__(P,V,C,FMODE,w,w); \ - { unsigned GR_PtrInt _c32_ = ((unsigned GR_PtrInt)(C)) >> 1; \ - if (_c32_) rowfill_l##FMODE(P,V,_c32_); } \ - __INLINE_TAIL_FILL__(P,V,C,FMODE,w,w); \ - } while (0) -# else -# define __INLINE_W_REPFILL__(P,V,C,FMODE) \ - rowfill_w##FMODE(P,V,C) -# endif -#endif /* !__INLINE_W_REPFILL__ */ - -#if !defined(NO_32BIT_FILL) && !defined(__INLINE_L_REPFILL__) -# if !defined(NO_64BIT_FILL) -# define __INLINE_L_REPFILL__(P,V,C,FMODE) do { \ - __INLINE_ALIGN_FILL__(P,V,C,FMODE,l,l); \ - { unsigned GR_PtrInt _c64_ = ((unsigned GR_PtrInt)(C)) >> 1; \ - if (_c64_) rowfill_h##FMODE(P,V,_c64_); } \ - __INLINE_TAIL_FILL__(P,V,C,FMODE,l,l); \ - } while (0) -# else -# define __INLINE_L_REPFILL__(P,V,C,FMODE) \ - rowfill_l##FMODE(P,V,C) -# endif -#endif /* !__INLINE_L_REPFILL__ */ - -#if !defined(NO_64BIT_FILL) && !defined(__INLINE_H_REPFILL__) -#define __INLINE_H_REPFILL__(P,V,C,FMODE) do { \ - rowfill_h##FMODE((P),(V),(C)); \ -} while(0) -#endif /* !__INLINE_H_REPFILL__ */ - -/* - * repfill_[_][_](pointer,value,count) - */ -#ifndef repfill_b -#define repfill_b(p,v,c) __INLINE_B_REPFILL__(p,v,c,_n) -#endif -#if defined(__INLINE_W_REPFILL__) && !defined(repfill_w) -#define repfill_w(p,v,c) __INLINE_W_REPFILL__(p,v,c,_n) -#endif -#if defined(__INLINE_L_REPFILL__) && !defined(repfill_l) -#define repfill_l(p,v,c) __INLINE_L_REPFILL__(p,v,c,_n) -#endif -#if defined(__INLINE_H_REPFILL__) && !defined(repfill_h) -#define repfill_h(p,v,c) __INLINE_H_REPFILL__(p,v,c,_n) -#endif - -#ifndef repfill_b_xor -#define repfill_b_xor(p,v,c) __INLINE_B_REPFILL__(p,v,c,_xor) -#endif -#if defined(__INLINE_W_REPFILL__) && !defined(repfill_w_xor) -#define repfill_w_xor(p,v,c) __INLINE_W_REPFILL__(p,v,c,_xor) -#endif -#if defined(__INLINE_L_REPFILL__) && !defined(repfill_l_xor) -#define repfill_l_xor(p,v,c) __INLINE_L_REPFILL__(p,v,c,_xor) -#endif -#if defined(__INLINE_H_REPFILL__) && !defined(repfill_h_xor) -#define repfill_h_xor(p,v,c) __INLINE_H_REPFILL__(p,v,c,_xor) -#endif - -#ifndef repfill_b_or -#define repfill_b_or(p,v,c) __INLINE_B_REPFILL__(p,v,c,_or) -#endif -#if defined(__INLINE_W_REPFILL__) && !defined(repfill_w_or) -#define repfill_w_or(p,v,c) __INLINE_W_REPFILL__(p,v,c,_or) -#endif -#if defined(__INLINE_L_REPFILL__) && !defined(repfill_l_or) -#define repfill_l_or(p,v,c) __INLINE_L_REPFILL__(p,v,c,_or) -#endif -#if defined(__INLINE_H_REPFILL__) && !defined(repfill_h_or) -#define repfill_h_or(p,v,c) __INLINE_H_REPFILL__(p,v,c,_or) -#endif - -#ifndef repfill_b_and -#define repfill_b_and(p,v,c) __INLINE_B_REPFILL__(p,v,c,_and) -#endif -#if defined(__INLINE_W_REPFILL__) && !defined(repfill_w_and) -#define repfill_w_and(p,v,c) __INLINE_W_REPFILL__(p,v,c,_and) -#endif -#if defined(__INLINE_L_REPFILL__) && !defined(repfill_l_and) -#define repfill_l_and(p,v,c) __INLINE_L_REPFILL__(p,v,c,_and) -#endif -#if defined(__INLINE_H_REPFILL__) && !defined(repfill_h_and) -#define repfill_h_and(p,v,c) __INLINE_H_REPFILL__(p,v,c,_and) -#endif - -#ifndef repfill_b_f -#define repfill_b_f(p,v,c) __INLINE_B_REPFILL__(p,v,c,_f) -#endif -#if defined(__INLINE_W_REPFILL__) && !defined(repfill_w_f) -#define repfill_w_f(p,v,c) __INLINE_W_REPFILL__(p,v,c,_f) -#endif -#if defined(__INLINE_L_REPFILL__) && !defined(repfill_l_f) -#define repfill_l_f(p,v,c) __INLINE_L_REPFILL__(p,v,c,_f) -#endif -#if defined(__INLINE_H_REPFILL__) && !defined(repfill_h_f) -#define repfill_h_f(p,v,c) __INLINE_H_REPFILL__(p,v,c,_f) -#endif - -#ifndef repfill_b_f_xor -#define repfill_b_f_xor(p,v,c) __INLINE_B_REPFILL__(p,v,c,_f_xor) -#endif -#if defined(__INLINE_W_REPFILL__) && !defined(repfill_w_f_xor) -#define repfill_w_f_xor(p,v,c) __INLINE_W_REPFILL__(p,v,c,_f_xor) -#endif -#if defined(__INLINE_L_REPFILL__) && !defined(repfill_l_f_xor) -#define repfill_l_f_xor(p,v,c) __INLINE_L_REPFILL__(p,v,c,_f_xor) -#endif -#if defined(__INLINE_H_REPFILL__) && !defined(repfill_h_f_xor) -#define repfill_h_f_xor(p,v,c) __INLINE_H_REPFILL__(p,v,c,_f_xor) -#endif - -#ifndef repfill_b_f_or -#define repfill_b_f_or(p,v,c) __INLINE_B_REPFILL__(p,v,c,_f_or) -#endif -#if defined(__INLINE_W_REPFILL__) && !defined(repfill_w_f_or) -#define repfill_w_f_or(p,v,c) __INLINE_W_REPFILL__(p,v,c,_f_or) -#endif -#if defined(__INLINE_L_REPFILL__) && !defined(repfill_l_f_or) -#define repfill_l_f_or(p,v,c) __INLINE_L_REPFILL__(p,v,c,_f_or) -#endif -#if defined(__INLINE_H_REPFILL__) && !defined(repfill_h_f_or) -#define repfill_h_f_or(p,v,c) __INLINE_H_REPFILL__(p,v,c,_f_or) -#endif - -#ifndef repfill_b_f_and -#define repfill_b_f_and(p,v,c) __INLINE_B_REPFILL__(p,v,c,_f_and) -#endif -#if defined(__INLINE_W_REPFILL__) && !defined(repfill_w_f_and) -#define repfill_w_f_and(p,v,c) __INLINE_W_REPFILL__(p,v,c,_f_and) -#endif -#if defined(__INLINE_L_REPFILL__) && !defined(repfill_l_f_and) -#define repfill_l_f_and(p,v,c) __INLINE_L_REPFILL__(p,v,c,_f_and) -#endif -#if defined(__INLINE_H_REPFILL__) && !defined(repfill_h_f_and) -#define repfill_h_f_and(p,v,c) __INLINE_H_REPFILL__(p,v,c,_f_and) -#endif - -#define repfill_b_n repfill_b -#define repfill_w_n repfill_w -#define repfill_l_n repfill_l -#define repfill_h_n repfill_h -#define repfill_b_xor_n repfill_b_xor -#define repfill_w_xor_n repfill_w_xor -#define repfill_l_xor_n repfill_l_xor -#define repfill_h_xor_n repfill_h_xor -#define repfill_b_or_n repfill_b_or -#define repfill_w_or_n repfill_w_or -#define repfill_l_or_n repfill_l_or -#define repfill_h_or_n repfill_h_or -#define repfill_b_and_n repfill_b_and -#define repfill_w_and_n repfill_w_and -#define repfill_l_and_n repfill_l_and -#define repfill_h_and_n repfill_h_and - - -/* - * Another set of optimized fills which also do the replication. - */ -#if !defined(NO_64BIT_FILL) -#define GR_repl GR_int64u -#define freplicate_b(V) replicate_b2h(V) -#define freplicate_w(V) replicate_w2h(V) -#define freplicate_l(V) replicate_l2h(V) -#elif !defined(NO_32BIT_FILL) -#define GR_repl GR_int32u -#define freplicate_b(V) replicate_b2l(V) -#define freplicate_w(V) replicate_w2l(V) -#define freplicate_l(V) (V) -#elif !defined(NO_16BIT_FILL) -#define GR_repl GR_int16u -#define freplicate_b(V) replicate_b2w(V) -#define freplicate_w(V) (V) -#else -#define GR_repl GR_int8u -#define freplicate_b(V) (V) -#endif - -/* - * optfill_[_][_](pointer,value,count) - */ -#define optfill_b(p,v,c) repfill_b(p,freplicate_b(v),c) -#define optfill_w(p,v,c) repfill_w(p,freplicate_w(v),c) -#define optfill_l(p,v,c) repfill_l(p,freplicate_l(v),c) - -#define optfill_b_xor(p,v,c) repfill_b_xor(p,freplicate_b(v),c) -#define optfill_w_xor(p,v,c) repfill_w_xor(p,freplicate_w(v),c) -#define optfill_l_xor(p,v,c) repfill_l_xor(p,freplicate_l(v),c) - -#define optfill_b_or(p,v,c) repfill_b_or(p,freplicate_b(v),c) -#define optfill_w_or(p,v,c) repfill_w_or(p,freplicate_w(v),c) -#define optfill_l_or(p,v,c) repfill_l_or(p,freplicate_l(v),c) - -#define optfill_b_and(p,v,c) repfill_b_and(p,freplicate_b(v),c) -#define optfill_w_and(p,v,c) repfill_w_and(p,freplicate_w(v),c) -#define optfill_l_and(p,v,c) repfill_l_and(p,freplicate_l(v),c) - -#define optfill_b_f(p,v,c) repfill_b_f(p,freplicate_b(v),c) -#define optfill_w_f(p,v,c) repfill_w_f(p,freplicate_w(v),c) -#define optfill_l_f(p,v,c) repfill_l_f(p,freplicate_l(v),c) - -#define optfill_b_f_xor(p,v,c) repfill_b_f_xor(p,freplicate_b(v),c) -#define optfill_w_f_xor(p,v,c) repfill_w_f_xor(p,freplicate_w(v),c) -#define optfill_l_f_xor(p,v,c) repfill_l_f_xor(p,freplicate_l(v),c) - -#define optfill_b_f_or(p,v,c) repfill_b_f_or(p,freplicate_b(v),c) -#define optfill_w_f_or(p,v,c) repfill_w_f_or(p,freplicate_w(v),c) -#define optfill_l_f_or(p,v,c) repfill_l_f_or(p,freplicate_l(v),c) - -#define optfill_b_f_and(p,v,c) repfill_b_f_and(p,freplicate_b(v),c) -#define optfill_w_f_and(p,v,c) repfill_w_f_and(p,freplicate_w(v),c) -#define optfill_l_f_and(p,v,c) repfill_l_f_and(p,freplicate_l(v),c) - -/* - * A set of optimized fills which preserves the address and count arguments - * and performs small constant sized fills unrolled if the compiler supports - * this (e.g. GCC) - */ - -#ifndef __INLINE_MEMFILL__ -#define __INLINE_MEMFILL__(P,V,C,SIZE,TYPE,FMODE) do { \ - register void *_FP = (void *)(P); \ - register GR_repl _FV = freplicate_##SIZE((TYPE)(V)); \ - register GR_PtrInt _FC = (GR_PtrInt)(C); \ - repfill_##SIZE##FMODE(_FP,_FV,_FC); \ -} while(0) -#endif - -/* - * memfill_[_][_](pointer,value,count) - */ -#define memfill_b(p,v,c) __INLINE_MEMFILL__(p,v,c,b,GR_int8,_n) -#define memfill_w(p,v,c) __INLINE_MEMFILL__(p,v,c,w,GR_int16,_n) -#define memfill_l(p,v,c) __INLINE_MEMFILL__(p,v,c,l,GR_int32,_n) - -#define memfill_b_xor(p,v,c) __INLINE_MEMFILL__(p,v,c,b,GR_int8,_xor) -#define memfill_w_xor(p,v,c) __INLINE_MEMFILL__(p,v,c,w,GR_int16,_xor) -#define memfill_l_xor(p,v,c) __INLINE_MEMFILL__(p,v,c,l,GR_int32,_xor) - -#define memfill_b_or(p,v,c) __INLINE_MEMFILL__(p,v,c,b,GR_int8,_or) -#define memfill_w_or(p,v,c) __INLINE_MEMFILL__(p,v,c,w,GR_int16,_or) -#define memfill_l_or(p,v,c) __INLINE_MEMFILL__(p,v,c,l,GR_int32,_or) - -#define memfill_b_and(p,v,c) __INLINE_MEMFILL__(p,v,c,b,GR_int8,_and) -#define memfill_w_and(p,v,c) __INLINE_MEMFILL__(p,v,c,w,GR_int16,_and) -#define memfill_l_and(p,v,c) __INLINE_MEMFILL__(p,v,c,l,GR_int32,_and) - -#define memfill_b_f(p,v,c) __INLINE_MEMFILL__(p,v,c,b,GR_int8,_f) -#define memfill_w_f(p,v,c) __INLINE_MEMFILL__(p,v,c,w,GR_int16,_f) -#define memfill_l_f(p,v,c) __INLINE_MEMFILL__(p,v,c,l,GR_int32,_f) - -#define memfill_b_f_xor(p,v,c) __INLINE_MEMFILL__(p,v,c,b,GR_int8,_f_xor) -#define memfill_w_f_xor(p,v,c) __INLINE_MEMFILL__(p,v,c,w,GR_int16,_f_xor) -#define memfill_l_f_xor(p,v,c) __INLINE_MEMFILL__(p,v,c,l,GR_int32,_f_xor) - -#define memfill_b_f_or(p,v,c) __INLINE_MEMFILL__(p,v,c,b,GR_int8,_f_or) -#define memfill_w_f_or(p,v,c) __INLINE_MEMFILL__(p,v,c,w,GR_int16,_f_or) -#define memfill_l_f_or(p,v,c) __INLINE_MEMFILL__(p,v,c,l,GR_int32,_f_or) - -#define memfill_b_f_and(p,v,c) __INLINE_MEMFILL__(p,v,c,b,GR_int8,_f_and) -#define memfill_w_f_and(p,v,c) __INLINE_MEMFILL__(p,v,c,w,GR_int16,_f_and) -#define memfill_l_f_and(p,v,c) __INLINE_MEMFILL__(p,v,c,l,GR_int32,_f_and) - -/* - * 24bpp special support functions - */ - -#ifndef __INLINE_24_REPFILL__ -#define __INLINE_24_REPFILL__(P,C,B,FMODE,INS) do { \ - GR_int32u _cl24_ = (GR_int32u)(C); \ - GR_PtrInt _b24_ = (GR_PtrInt)(B); \ - while ( _b24_ >= 3) { \ - poke_24##FMODE((P), _cl24_); \ - ptrinc((P),3); \ - _b24_ -= 3; \ - } \ - /* B = 0..2 */ \ - if (! _b24_ ) break; \ - poke_b##FMODE((P), (GR_int8u)_cl24_); \ - ptrinc((P),1); \ - if (! --_b24_ ) break; \ - poke_b##FMODE((P), (GR_int8u)(_cl24_>>8)); \ - ptrinc((P),1); \ -} while (0) -#endif - -#ifndef __INLINE_24_FAR_REPFILL__ -#define __INLINE_24_FAR_REPFILL__(P,C,B,FMODE,INS) \ - __INLINE_24_REPFILL__(P,C,B,FMODE,INS) -#endif - -#ifndef repfill_24_set -#define repfill_24_set(p,c,b) __INLINE_24_REPFILL__(p,c,b,_set,MOV_INS) -#endif -#ifndef repfill_24_xor -#define repfill_24_xor(p,c,b) __INLINE_24_REPFILL__(p,c,b,_xor,XOR_INS) -#endif -#ifndef repfill_24_or -#define repfill_24_or(p,c,b) __INLINE_24_REPFILL__(p,c,b,_or,OR_INS) -#endif -#ifndef repfill_24_and -#define repfill_24_and(p,c,b) __INLINE_24_REPFILL__(p,c,b,_and,AND_INS) -#endif - -#ifndef repfill_24_f_set -#define repfill_24_f_set(p,c,b) __INLINE_24_FAR_REPFILL__(p,c,b,_f_set,MOV_INS) -#endif -#ifndef repfill_24_f_xor -#define repfill_24_f_xor(p,c,b) __INLINE_24_FAR_REPFILL__(p,c,b,_f_xor,XOR_INS) -#endif -#ifndef repfill_24_f_or -#define repfill_24_f_or(p,c,b) __INLINE_24_FAR_REPFILL__(p,c,b,_f_or,OR_INS) -#endif -#ifndef repfill_24_f_and -#define repfill_24_f_and(p,c,b) __INLINE_24_FAR_REPFILL__(p,c,b,_f_and,AND_INS) -#endif - -#ifndef __INLINE_24_MEMFILL -#define __INLINE_24_MEMFILL__(p,c,b,FMODE) do { \ - void *_p24 = (p); \ - unsigned long _c24 = (c); \ - unsigned _b24 = (b); \ - repfill_24##FMODE(_p24,_c24,_b24); \ -} while (0) -#endif - -#ifndef memfill_24_set -#define memfill_24_set(p,c,b) __INLINE_24_MEMFILL__(p,c,b,_set) -#endif -#ifndef memfill_24_xor -#define memfill_24_xor(p,c,b) __INLINE_24_MEMFILL__(p,c,b,_xor) -#endif -#ifndef memfill_24_or -#define memfill_24_or(p,c,b) __INLINE_24_MEMFILL__(p,c,b,_or) -#endif -#ifndef memfill_24_and -#define memfill_24_and(p,c,b) __INLINE_24_MEMFILL__(p,c,b,_and) -#endif - -#ifndef memfill_24_set_f -#define memfill_24_set_f(p,c,b) __INLINE_24_MEMFILL__(p,c,b,_set_f) -#endif -#ifndef memfill_24_xor_f -#define memfill_24_xor_f(p,c,b) __INLINE_24_MEMFILL__(p,c,b,_xor_f) -#endif -#ifndef memfill_24_or_f -#define memfill_24_or_f(p,c,b) __INLINE_24_MEMFILL__(p,c,b,_or_f) -#endif -#ifndef memfill_24_and_f -#define memfill_24_and_f(p,c,b) __INLINE_24_MEMFILL__(p,c,b,_and_f) -#endif - -#define memfill_24 memfill_24_set -#define memfill_24_f memfill_24_set_f - - -/* - * stuff to clear arrays, structures - */ -/* -#ifdef __TURBOC__ -#define memzero(p,s) memfill_w((p),0,((s) >> 1)) -#endif -#ifndef memzero -#define memzero(p,s) memfill_l((p),0,((s) >> 2)) -#endif -*/ -#define memzero(p,s) do { \ - register void far *_FP = (void far *)(p); \ - register GR_repl _FV = 0; \ - register unsigned _FC = (unsigned)(s); \ - DBGPRINTF(DBG_COPYFILL,("memzero size=%u\n",_FC)); \ - repfill_b(_FP,_FV,_FC); \ -} while(0) - - -#define sttzero(p) memzero((p),sizeof(*(p))) - -#if (defined(__WATCOMC__) && !defined(__386__)) -/* - * These are not really here! - */ -#undef rowfill_l -#undef rowfill_l_xor -#undef rowfill_l_or -#undef rowfill_l_and -#undef rowfill_l_f -#undef rowfill_l_f_xor -#undef rowfill_l_f_or -#undef rowfill_l_f_and - -#undef repfill_l -#undef repfill_l_xor -#undef repfill_l_or -#undef repfill_l_and -#undef repfill_l_f -#undef repfill_l_f_xor -#undef repfill_l_f_or -#undef repfill_l_f_and - -#undef optfill_l -#undef optfill_l_xor -#undef optfill_l_or -#undef optfill_l_and -#undef optfill_l_f -#undef optfill_l_f_xor -#undef optfill_l_f_or -#undef optfill_l_f_and - -#undef memfill_l -#undef memfill_l_xor -#undef memfill_l_or -#undef memfill_l_and -#undef memfill_l_f -#undef memfill_l_f_xor -#undef memfill_l_f_or -#undef memfill_l_f_and - -#undef colfill_l -#undef colfill_l_xor -#undef colfill_l_or -#undef colfill_l_and -#undef colfill_l_f -#undef colfill_l_f_xor -#undef colfill_l_f_or -#undef colfill_l_f_and - -#endif - -#endif /* whole file */ diff --git a/thirdparty/grx249/src/include/memmode.h b/thirdparty/grx249/src/include/memmode.h deleted file mode 100644 index 8456a18..0000000 --- a/thirdparty/grx249/src/include/memmode.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - ** memmode.h ---- determine how to access video and system RAM - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __MEMMODE_H_INCLUDED__ -#define __MEMMODE_H_INCLUDED__ - -#ifdef __GNUC__ -#include "gcc/memmode.h" -#elif defined(__TURBOC__) -#include "bcc/memmode.h" -#elif defined(__WATCOMC__) -#include "watcom/memmode.h" -#endif - -#ifndef LINP_PTR -#define LINP_PTR(p) (p) -#endif -#ifndef LINP_SEL -#define LINP_SEL(p) 0 -#endif - -#ifndef MK_FP -#define MK_FP(s,o) (void *)( \ - ((GR_int32u)(GR_int16u)(s) << 4) + \ - (GR_int16u)(o) \ -) -#endif - -#endif /* whole file */ - diff --git a/thirdparty/grx249/src/include/mempeek.h b/thirdparty/grx249/src/include/mempeek.h deleted file mode 100644 index 8a4ba91..0000000 --- a/thirdparty/grx249/src/include/mempeek.h +++ /dev/null @@ -1,352 +0,0 @@ -/** - ** mempeek.h ---- (far) memory read/write operations - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Basic memory peek and poke operations in byte, word and long sizes. - ** The poke operations are available in WRITE, XOR, OR and AND versions. - ** Intel CPU specific support is provided for the Turbo C and GNU C - ** compilers. The i386 GCC version supports segment overrides. May - ** work with other compilers and CPU-s, but is not optimized for them. - ** - **/ - -#ifndef __MEMPEEK_H_INCLUDED__ -#define __MEMPEEK_H_INCLUDED__ - -#ifndef __MEMMODE_H_INCLUDED__ -#include "memmode.h" -#endif - -#ifdef __GNUC__ -#include "gcc/mempeek.h" -#elif defined(__TURBOC__) -#include "bcc/mempeek.h" -#elif defined(__WATCOMC__) -#include "watcom/mempeek.h" -#endif - -#ifndef __INLINE_STD_PEEK__ -#define __INLINE_STD_PEEK__(P,S,T) (*(unsigned T *)(P)) -#endif - -#ifndef __INLINE_STD_POKE__ -# ifdef NO_LEFTSIDE_PTR_CAST -# define __INLINE_STD_POKE__(P,V,OP,I,S,T) do { \ - register unsigned T *_ISPptr = (void *)(P); \ - *_ISPptr OP (unsigned T)(V); \ - } while (0) -# else -# define __INLINE_STD_POKE__(P,V,OP,I,S,T) (*(unsigned T *)(P) OP (unsigned T)(V)) -# endif -#endif - -/* the volatile modifier ensures the video ram access is really done */ -#ifndef __INLINE_FAR_PEEK__ -#define __INLINE_FAR_PEEK__(P,S,T) (*(volatile unsigned T *)(P)) -#endif - -#ifndef __INLINE_FAR_POKE__ -# ifdef NO_LEFTSIDE_PTR_CAST -# define __INLINE_FAR_POKE__(P,V,OP,I,S,T) do { \ - register unsigned T *_ISPptr = (void *)(P); \ - *_ISPptr OP (V); \ - } while (0) -# else -# define __INLINE_FAR_POKE__(P,V,OP,I,S,T) (*(volatile unsigned T *)(P) OP (V)) -# endif -#endif - - -/* - * setup_far_selector(segment_selector) - */ -#ifndef setup_far_selector -#define setup_far_selector(S) -#endif - -/* - * peek_... (pointer) - * poke_... (pointer,value) - */ - -/* some processors (eg. DEC alpha) need special handling for word access */ -#ifndef MISALIGNED_16bit_OK -#define peek_w(p) ( ((GR_int16u)(*((GR_int8u *)(p) )) ) \ - | ((GR_int16u)(*((GR_int8u *)(p)+1))<<8) ) -#define __SPLIT_16_POKE__(P,V,OP) ( (*((GR_int8u *)(P) ) OP ((V) )), \ - (*((GR_int8u *)(P)+1) OP ((V)>>8)) ) -#define poke_w(p,v) __SPLIT_16_POKE__(p,v,=) -#define poke_w_xor(p,v) __SPLIT_16_POKE__(p,v,^=) -#define poke_w_or(p,v) __SPLIT_16_POKE__(p,v,|=) -#define poke_w_and(p,v) __SPLIT_16_POKE__(p,v,&=) -#define peek_w_f(p) peek_w(p) -#define poke_w_f(p,v) poke_w((p),(v)) -#define poke_w_f_xor(p,v) poke_w_xor((p),(v)) -#define poke_w_f_or(p,v) poke_w_or((p),(v)) -#define poke_w_f_and(p,v) poke_w_and((p),(v)) -#endif - - -/* ------------------------------------- near memory (RAM) access */ -#ifndef peek_b -#define peek_b(p) __INLINE_STD_PEEK__(p,OP8b,GR_int8) -#endif -#ifndef peek_w -#define peek_w(p) __INLINE_STD_PEEK__(p,OP16b,GR_int16) -#endif -#ifndef peek_l -#define peek_l(p) __INLINE_STD_PEEK__(p,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(peek_h) -#define peek_h(p) __INLINE_STD_PEEK__(p,OP64b,GR_int64) -#endif - -#ifndef poke_b -#define poke_b(p,v) __INLINE_STD_POKE__(p,v,=,MOV_INS,OP8b,GR_int8) -#endif -#ifndef poke_w -#define poke_w(p,v) __INLINE_STD_POKE__(p,v,=,MOV_INS,OP16b,GR_int16) -#endif -#ifndef poke_l -#define poke_l(p,v) __INLINE_STD_POKE__(p,v,=,MOV_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(poke_h) -#define poke_h(p,v) __INLINE_STD_POKE__(p,v,=,MOV_INS,OP64b,GR_int64) -#endif - -#define poke_b_set poke_b -#define poke_w_set poke_w -#define poke_l_set poke_l -#ifdef poke_h -#define poke_h_set poke_h -#endif - -#ifndef poke_b_xor -#define poke_b_xor(p,v) __INLINE_STD_POKE__(p,v,^=,XOR_INS,OP8b,GR_int8) -#endif -#ifndef poke_w_xor -#define poke_w_xor(p,v) __INLINE_STD_POKE__(p,v,^=,XOR_INS,OP16b,GR_int16) -#endif -#ifndef poke_l_xor -#define poke_l_xor(p,v) __INLINE_STD_POKE__(p,v,^=,XOR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(poke_h_xor) -#define poke_h_xor(p,v) __INLINE_STD_POKE__(p,v,^=,XOR_INS,OP64b,GR_int64) -#endif - -#ifndef poke_b_or -#define poke_b_or(p,v) __INLINE_STD_POKE__(p,v,|=,OR_INS,OP8b,GR_int8) -#endif -#ifndef poke_w_or -#define poke_w_or(p,v) __INLINE_STD_POKE__(p,v,|=,OR_INS,OP16b,GR_int16) -#endif -#ifndef poke_l_or -#define poke_l_or(p,v) __INLINE_STD_POKE__(p,v,|=,OR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(poke_h_or) -#define poke_h_or(p,v) __INLINE_STD_POKE__(p,v,|=,OR_INS,OP64b,GR_int64) -#endif - -#ifndef poke_b_and -#define poke_b_and(p,v) __INLINE_STD_POKE__(p,v,&=,AND_INS,OP8b,GR_int8) -#endif -#ifndef poke_w_and -#define poke_w_and(p,v) __INLINE_STD_POKE__(p,v,&=,AND_INS,OP16b,GR_int16) -#endif -#ifndef poke_l_and -#define poke_l_and(p,v) __INLINE_STD_POKE__(p,v,&=,AND_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(poke_h_and) -#define poke_h_and(p,v) __INLINE_STD_POKE__(p,v,&=,AND_INS,OP64b,GR_int64) -#endif - -/* ------------------------------------- far memory (video) access */ -#ifndef peek_b_f -#define peek_b_f(p) __INLINE_FAR_PEEK__(p,OP8b,GR_int8) -#endif -#ifndef peek_w_f -#define peek_w_f(p) __INLINE_FAR_PEEK__(p,OP16b,GR_int16) -#endif -#ifndef peek_l_f -#define peek_l_f(p) __INLINE_FAR_PEEK__(p,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(peek_h_f) -#define peek_h_f(p) __INLINE_FAR_PEEK__(p,OP64b,GR_int64) -#endif - -#ifndef poke_b_f -#define poke_b_f(p,v) __INLINE_FAR_POKE__(p,v,=,MOV_INS,OP8b,GR_int8) -#endif -#ifndef poke_w_f -#define poke_w_f(p,v) __INLINE_FAR_POKE__(p,v,=,MOV_INS,OP16b,GR_int16) -#endif -#ifndef poke_l_f -#define poke_l_f(p,v) __INLINE_FAR_POKE__(p,v,=,MOV_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(poke_h_f) -#define poke_h_f(p,v) __INLINE_FAR_POKE__(p,v,=,MOV_INS,OP64b,GR_int64) -#endif - -#define poke_b_f_set poke_b_f -#define poke_w_f_set poke_w_f -#define poke_l_f_set poke_l_f -#ifdef poke_h_f -#define poke_h_f_set poke_h_f -#endif - -#ifndef poke_b_f_xor -#define poke_b_f_xor(p,v) __INLINE_FAR_POKE__(p,v,^=,XOR_INS,OP8b,GR_int8) -#endif -#ifndef poke_w_f_xor -#define poke_w_f_xor(p,v) __INLINE_FAR_POKE__(p,v,^=,XOR_INS,OP16b,GR_int16) -#endif -#ifndef poke_l_f_xor -#define poke_l_f_xor(p,v) __INLINE_FAR_POKE__(p,v,^=,XOR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(poke_h_f_xor) -#define poke_h_f_xor(p,v) __INLINE_FAR_POKE__(p,v,^=,XOR_INS,OP64b,GR_int64) -#endif - -#ifndef poke_b_f_or -#define poke_b_f_or(p,v) __INLINE_FAR_POKE__(p,v,|=,OR_INS,OP8b,GR_int8) -#endif -#ifndef poke_w_f_or -#define poke_w_f_or(p,v) __INLINE_FAR_POKE__(p,v,|=,OR_INS,OP16b,GR_int16) -#endif -#ifndef poke_l_f_or -#define poke_l_f_or(p,v) __INLINE_FAR_POKE__(p,v,|=,OR_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(poke_h_f_or) -#define poke_h_f_or(p,v) __INLINE_FAR_POKE__(p,v,|=,OR_INS,OP64b,GR_int64) -#endif - -#ifndef poke_b_f_and -#define poke_b_f_and(p,v) __INLINE_FAR_POKE__(p,v,&=,AND_INS,OP8b,GR_int8) -#endif -#ifndef poke_w_f_and -#define poke_w_f_and(p,v) __INLINE_FAR_POKE__(p,v,&=,AND_INS,OP16b,GR_int16) -#endif -#ifndef poke_l_f_and -#define poke_l_f_and(p,v) __INLINE_FAR_POKE__(p,v,&=,AND_INS,OP32b,GR_int32) -#endif -#if defined(GR_int64) && !defined(poke_h_f_and) -#define poke_h_f_and(p,v) __INLINE_FAR_POKE__(p,v,&=,AND_INS,OP64b,GR_int64) -#endif - -/* ------------------------------------------- special 24bpp handling --- */ - -#define __INTERN_24_PEEK__(P,F) \ - ( peek_b##F(P) \ - | ((GR_int16u)peek_b##F(((GR_int8 *)(P))+1)<<8) \ - | ((GR_int32u)peek_b##F(((GR_int8 *)(P))+2)<<16)) - -#define __INTERN_24_POKE__(P,C,F,OP) do { \ - poke_b##F##OP((P),(GR_int8)(C)); \ - poke_b##F##OP(((GR_int8 *)(P))+1,(GR_int8)((C)>>8)); \ - poke_b##F##OP(((GR_int8 *)(P))+2,(GR_int8)((C)>>16)); \ - } while (0) - -#ifndef __INLINE_24_PEEK__ -#define __INLINE_24_PEEK__(p) \ - __INTERN_24_PEEK__(p,_n) -#endif -#ifndef __INLINE_24_FAR_PEEK__ -#define __INLINE_24_FAR_PEEK__(p) \ - __INTERN_24_PEEK__(p,_f) -#endif - -#ifndef __INLINE_24_POKE__ -#define __INLINE_24_POKE__(p,c,op,INS) \ - __INTERN_24_POKE__(p,c,_n,op) -#endif - -#ifndef __INLINE_24_FAR_POKE__ -#define __INLINE_24_FAR_POKE__(p,c,op,INS) \ - __INTERN_24_POKE__(p,c,_f,op) -#endif - -#ifndef peek_24 -#define peek_24(p) __INLINE_24_PEEK__(p) -#endif -#ifndef peek_24_f -#define peek_24_f(p) __INLINE_24_FAR_PEEK__(p) -#endif - -#ifndef poke_24_set -#define poke_24_set(p,c) __INLINE_24_POKE__(p,c,_set,MOV_INS) -#endif -#ifndef poke_24_xor -#define poke_24_xor(p,c) __INLINE_24_POKE__(p,c,_xor,XOR_INS) -#endif -#ifndef poke_24_or -#define poke_24_or(p,c) __INLINE_24_POKE__(p,c,_or,OR_INS) -#endif -#ifndef poke_24_and -#define poke_24_and(p,c) __INLINE_24_POKE__(p,c,_and,AND_INS) -#endif -#define poke_24 poke_24_set - -#ifndef poke_24_f_set -#define poke_24_f_set(p,c) __INLINE_24_FAR_POKE__(p,c,_set,MOV_INS) -#endif -#ifndef poke_24_f_xor -#define poke_24_f_xor(p,c) __INLINE_24_FAR_POKE__(p,c,_xor,XOR_INS) -#endif -#ifndef poke_24_f_or -#define poke_24_f_or(p,c) __INLINE_24_FAR_POKE__(p,c,_or,OR_INS) -#endif -#ifndef poke_24_f_and -#define poke_24_f_and(p,c) __INLINE_24_FAR_POKE__(p,c,_and,AND_INS) -#endif -#define poke_24_f poke_24_f_set - -/* ..._n is used in some makros to keep the preprocessor happy. -** Mapped to standard near memory commands : */ -#define peek_b_n peek_b -#define peek_w_n peek_w -#define peek_l_n peek_l -#define poke_b_n poke_b -#define poke_w_n poke_w -#define poke_l_n poke_l -#define poke_b_n_set poke_b -#define poke_w_n_set poke_w -#define poke_l_n_set poke_l -#define poke_b_n_xor poke_b_xor -#define poke_w_n_xor poke_w_xor -#define poke_l_n_xor poke_l_xor -#define poke_b_n_or poke_b_or -#define poke_w_n_or poke_w_or -#define poke_l_n_or poke_l_or -#define poke_b_n_and poke_b_and -#define poke_w_n_and poke_w_and -#define poke_l_n_and poke_l_and -#ifdef poke_h -#define peek_h_n peek_h -#define poke_h_n poke_h -#define poke_h_n_set poke_h -#define poke_h_n_xor poke_h_xor -#define poke_h_n_or poke_h_or -#define poke_h_n_and poke_h_and -#endif - -#define peek_24_n peek_24 -#define poke_24_n poke_24_set -#define poke_24_n_set poke_24_set -#define poke_24_n_xor poke_24_xor -#define poke_24_n_or poke_24_or -#define poke_24_n_and poke_24_and - -#endif /* whole file */ - diff --git a/thirdparty/grx249/src/include/ordswap.h b/thirdparty/grx249/src/include/ordswap.h deleted file mode 100644 index ad7370c..0000000 --- a/thirdparty/grx249/src/include/ordswap.h +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** ordswap.h ---- definitions for multibyte value order swaping - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -extern void _GR_swap16(GR_int16 far *w); -extern void _GR_swap32(GR_int32 far *l); - -#define _GR_swap16s(w) _GR_swap16((GR_int16 far *)(w)) -#define _GR_swap16u(w) _GR_swap16((GR_int16 far *)(w)) -#define _GR_swap32s(l) _GR_swap32((GR_int32 far *)(l)) -#define _GR_swap32u(l) _GR_swap32((GR_int32 far *)(l)) - -#ifdef GR_int64 -extern void _GR_swap64(GR_int64 far *h); -#define _GR_swap64s(h) _GR_swap64((GR_int64 far *)(h)) -#define _GR_swap64u(h) _GR_swap64((GR_int64 far *)(h)) -#endif diff --git a/thirdparty/grx249/src/include/pblit.h b/thirdparty/grx249/src/include/pblit.h deleted file mode 100644 index d93b910..0000000 --- a/thirdparty/grx249/src/include/pblit.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - ** pblit.h ---- video->video; video->ram; ram->video blit support macros - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#ifndef __PBLIT_H_INCLUDED__ -#define __PBLIT_H_INCLUDED__ - -#ifndef __MEMCOPY_H_INCLUDED__ -#include "memcopy.h" -#endif - -/* -** single element (SIZE=b: 8bit, w:16bit, l:32bit) copy command. -** Source is 'sptr', destination 'dptr'. Read operation memory -** reference F is empty for standard memory access (near pointer) -** and '_f' for far pointer access. OP is the write command -** specifier: use _xor, _and, _or, _set and _image for near -** pointer writes and _f_xor, ... for far pointer destination. -** -** DO1COPY_FW: forward copy, pointers are incremented after -** copy operation -** DO1COPY_RV: reverse copy, pointers are decremented before -** copy operation -*/ -#define DO1COPY_FW(SIZE,OP,F) do { \ - poke_##SIZE##OP((dptr),peek_##SIZE##F(sptr)); \ - (dptr) += CPSIZE_##SIZE; \ - (sptr) += CPSIZE_##SIZE; \ - } while(0) - -#define DO1COPY_RV(SIZE,OP,F) do { \ - poke_##SIZE##OP((dptr),peek_##SIZE##F(sptr)); \ - (dptr) -= CPSIZE_##SIZE; \ - (sptr) -= CPSIZE_##SIZE; \ - } while(0) - - -/* special handling for image blits */ -#define poke_b_image(p,v) do { \ - GR_int8u val = (v); \ - if(val != cval) poke_b(p,val); \ - } while (0) - -#define poke_b_f_image(p,v) do { \ - GR_int8u val = (v); \ - if(val != cval) poke_b_f(p,val); \ - } while (0) - -#define poke_b_n_image poke_b_image - -#define __DOICOPY__(INC,WF,RF) do { \ - poke_b##WF##_image((dptr),peek_b##RF(sptr)); \ - (dptr) INC CPSIZE_b; \ - (sptr) INC CPSIZE_b; \ - } while(0) - -#define __DOICOPY_FW__(WF,RF) __DOICOPY__(+=,WF,RF) -#define __DOICOPY_RV__(WF,RF) __DOICOPY__(-=,WF,RF) -#define DOIMGCOPY(DIR,WF,RF,W) do __DOICOPY_##DIR##__(WF,RF); while(--(W) != 0) - -#endif /* whole file */ diff --git a/thirdparty/grx249/src/include/prex11r6.h b/thirdparty/grx249/src/include/prex11r6.h deleted file mode 100644 index 57984a1..0000000 --- a/thirdparty/grx249/src/include/prex11r6.h +++ /dev/null @@ -1,40 +0,0 @@ -#if defined(PRE_R6_ICCCM) -/* - Compatability defines for pre X11R6 ICCCM. -*/ -#define XK_KP_Home 0xFF95 -#define XK_KP_Left 0xFF96 -#define XK_KP_Up 0xFF97 -#define XK_KP_Right 0xFF98 -#define XK_KP_Down 0xFF99 -#define XK_KP_Prior 0xFF9A -#define XK_KP_Page_Up 0xFF9A -#define XK_KP_Next 0xFF9B -#define XK_KP_Page_Down 0xFF9B -#define XK_KP_End 0xFF9C -#define XK_KP_Delete 0xFF9F -/* -XK_ISO_Left_Tab -XK_KP_Add -XK_KP_Begin 0xffd8 -XK_KP_Divide -XK_KP_End -XK_KP_Enter -XK_KP_Insert -XK_KP_Multiply -XK_KP_Subtract -*/ - -#endif - -#if defined(PRE_R5_ICCCM) -/* - Compatability defines for pre X11R5 ICCCM. -*/ -#endif - -#if defined(PRE_R4_ICCCM) -/* - Compatability defines for pre X11R4 ICCCM. -*/ -#endif diff --git a/thirdparty/grx249/src/include/shapes.h b/thirdparty/grx249/src/include/shapes.h deleted file mode 100644 index 9143bb1..0000000 --- a/thirdparty/grx249/src/include/shapes.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - ** shapes.h ---- declarations and global data for generating complex shapes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __SHAPES_H_INCLUDED__ -#define __SHAPES_H_INCLUDED__ - -#define USE_FDR_DRAWPATTERN 1 - -typedef union _GR_fillArg { - GrColor color; - struct _GR_bitmap *bmp; - struct _GR_pixmap *pxp; - GrPattern *p; -} GrFillArg; - -typedef void (*PixelFillFunc)(int x,int y,GrFillArg fval); -typedef void (*LineFillFunc)(int x,int y,int dx,int dy,GrFillArg fval); -typedef void (*ScanFillFunc)(int x,int y,int w,GrFillArg fval); - -typedef struct _GR_filler { - PixelFillFunc pixel; - LineFillFunc line; - ScanFillFunc scan; -} GrFiller; - -extern GrFiller _GrSolidFiller; -extern GrFiller _GrPatternFiller; -/* -extern GrFiller _GrBitmapFiller; -extern GrFiller _GrPixmapFiller; -*/ - -void _GrDrawPolygon(int n,int pt[][2],GrFiller *f,GrFillArg c,int doClose); -void _GrDrawCustomPolygon(int n,int pt[][2],const GrLineOption *lp,GrFiller *f,GrFillArg c,int doClose,int circle); -void _GrScanConvexPoly(int n,int pt[][2],GrFiller *f,GrFillArg c); -void _GrScanPolygon(int n,int pt[][2],GrFiller *f,GrFillArg c); -void _GrScanEllipse(int xc,int yc,int xa,int ya,GrFiller *f,GrFillArg c,int filled); - -/* --- */ -#define _GrDrawPatternedPixel ((PixelFillFunc)_GrPatternFilledPlot) -#define _GrDrawPatternedLine ((LineFillFunc)_GrPatternFilledLine) -void _GrFillPatternedScanLine(int x,int y,int w,GrFillArg arg); - -/* --- */ -void _GrFloodFill(int x,int y,GrColor border,GrFiller *f,GrFillArg fa); - -/* -- */ -void _GrFillPattern(int x,int y,int width,GrPattern *p); -void _GrFillPatternExt(int x,int y,int sx, int sy,int width,GrPattern *p); -void _GrPatternFilledLine(int x1,int y1,int dx,int dy,GrPattern *p); -void _GrPatternFilledPlot(int x,int y,GrPattern *p); - -void _GrFillBitmapPattern(int x,int y,int w,int h, - char far *bmp,int pitch,int start, - GrPattern* p,GrColor bg); -void _GrFillBitmapPatternExt(int x,int y,int w,int h, int sx, int sy, - char far *bmp,int pitch,int start, - GrPattern* p,GrColor bg); - -#endif diff --git a/thirdparty/grx249/src/include/usercord.h b/thirdparty/grx249/src/include/usercord.h deleted file mode 100644 index f45cbc3..0000000 --- a/thirdparty/grx249/src/include/usercord.h +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** usercord.h - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "usrscale.h" - -#define U2SX(x,c) \ - SCALE(x,((x) - (c)->gc_usrxbase),(c)->gc_xmax,(c)->gc_usrwidth) -#define U2SY(y,c) \ - SCALE(y,((y) - (c)->gc_usrybase),(c)->gc_ymax,(c)->gc_usrheight) - -#define S2UX(x,c) do { \ - SCALE(x,x,(c)->gc_usrwidth,(c)->gc_xmax); \ - (x) += (c)->gc_usrxbase; \ -} while(0) - -#define S2UY(y,c) do { \ - SCALE(y,y,(c)->gc_usrheight,(c)->gc_ymax); \ - (y) += (c)->gc_usrybase; \ -} while(0) diff --git a/thirdparty/grx249/src/include/usrscale.h b/thirdparty/grx249/src/include/usrscale.h deleted file mode 100644 index 6dbaafc..0000000 --- a/thirdparty/grx249/src/include/usrscale.h +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** usrscale.h - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef _SCALE_H_ -#define _SCALE_H_ - -#include "arith.h" - -#define SCALE(var,arg,nom,den) do { \ - (var) = iscale((arg),(nom),(den)); \ -} while(0) - -# define USCALE(var,arg,nom,den) do { \ - (var) = uscale((arg),(nom),(den)); \ -} while(0) - -#endif /* whole file */ diff --git a/thirdparty/grx249/src/include/vesa.h b/thirdparty/grx249/src/include/vesa.h deleted file mode 100644 index 2879042..0000000 --- a/thirdparty/grx249/src/include/vesa.h +++ /dev/null @@ -1,185 +0,0 @@ -/** - ** vesa.h ---- VESA BIOS extensions function codes, structures and return codes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#ifndef _VESA_H_included -#define _VESA_H_included - -#define VESA_FUNC 0x4f00 -#define VESA_SUCCESS 0x004f - -#define VESA_VERSION(major,minor) ((((major) & 0xff) << 8) | ((minor) & 0xff)) -#define VESA_VERSION_MAJOR(vers) (((vers) >> 8) & 0xff) -#define VESA_VERSION_MINOR(vers) ((vers) & 0xff) - -/* - * VESA BIOS sub-function numbers - */ -#define VESA_VGA_INFO 0 /* get VGA adapter info */ -#define VESA_MODE_INFO 1 /* get SVGA mode info */ -#define VESA_SET_MODE 2 /* set video mode */ -#define VESA_GET_MODE 3 /* get current video mode */ -#define VESA_VGA_STATE 4 /* save/restore VGA state */ -#define VESA_PAGE_CTL 5 /* memory control */ -/* VESA 1.1 +++ */ -#define VESA_SCAN_LNLEN 6 /* set/get scan line length */ -#define VESA_DISP_START 7 /* set/get display start address */ -/* VESA 1.2 +++ */ -#define VESA_PAL_CNTRL 8 /* DAC palette control */ -/* VESA 2.0 +++ */ -#define VESA_PAL_GETSET 9 /* get/set DAC palette entries */ -#define VESA_PM_INTERF 10 /* VBE protected mode interface */ - -#ifdef __GNUC__ -#define PACK __attribute__((packed)) -#else -#define PACK -#endif - -#ifdef __WATCOMC__ /* GS - WATCOM C++ 11.0 */ -#pragma pack ( 0 ); -#define PACKTYPEMOD _Packed -#else -#define PACKTYPEMOD -#endif - -/* - * The VGA info structure (without padding) - */ -typedef PACKTYPEMOD struct { - char VESAsignature[4] PACK; /* should be "VESA" */ - short VESAversion PACK; /* VESA version number */ - char far *OEMstringPtr PACK; /* Pointer to OEM string */ - long Capabilities PACK; /* capabilities of the video env */ - short far *VideoModePtr PACK; /* ptr to supported Super VGA modes */ - /* ==== VESA 1.2 and later ==== */ - short MemorySize PACK; /* # of 64K pages */ - /* ==== VESA 2.0 and later ==== */ - short OEMversion PACK; /* OEM software revision number */ - char far *VendorNamePtr PACK; /* Pointer to vendor name */ - char far *ProductNamePtr PACK; /* Pointer to product name */ - char far *RevisionStrPtr PACK; /* Pointer to product revision string */ -} VESAvgaInfoBlock; - -/* - * Capabilities flags - */ -#define CAP_DAC_WIDTH 1 /* set if DAC width can be changed */ -/* ==== VESA 2.0 and later ==== */ -#define CAP_NON_VGA 2 /* set if non VGA controller */ -#define CAP_DAC_BLANK 4 /* set if programmed DAC with blank bit */ - -/* - * The mode information structure (without padding) - */ -typedef PACKTYPEMOD struct { - short ModeAttributes PACK; /* mode attributes */ - char WinAAttributes PACK; /* Window A attributes */ - char WinBAttributes PACK; /* Window B attributes */ - short WinGranularity PACK; /* window granularity */ - short WinSize PACK; /* window size */ - short WinASegment PACK; /* Window A start segment */ - short WinBSegment PACK; /* Window B start segment */ - void far (*WinFuncPtr)() PACK; /* pointer to window function */ - short BytesPerScanLine PACK; /* bytes per scan line */ - /* ==== extended and optional information ==== */ - short XResolution PACK; /* horizontal resolution */ - short YResolution PACK; /* vertical resolution */ - char XCharSize PACK; /* character cell width */ - char YCharSize PACK; /* character cell height */ - char NumberOfPlanes PACK; /* number of memory planes */ - char BitsPerPixel PACK; /* bits per pixel */ - char NumberOfBanks PACK; /* number of banks */ - char MemoryModel PACK; /* memory model type */ - char BankSize PACK; /* bank size in K */ - char NumImagePages PACK; /* number of image pages */ - char reserved[1] PACK; - /* ==== VESA 1.2 and later ==== */ - char RedMaskSize PACK; /* number of bits in red mask */ - char RedMaskPos PACK; /* starting bit for red mask */ - char GreenMaskSize PACK; - char GreenMaskPos PACK; - char BlueMaskSize PACK; - char BlueMaskPos PACK; - char ReservedMaskSize PACK; /* reserved bits in pixel */ - char ReservedMaskPos PACK; - char DirectScreenMode PACK; - /* ==== VESA 2.0 and later ==== */ - unsigned long LinearFrameBuffer PACK; /* physical address of linear frame buf */ - unsigned long StartOffScreenMem PACK; /* physical addr.: start of off screen mem */ - short OffScreenMemSize PACK; /* off screen mem size in kb */ -} VESAmodeInfoBlock; - -/* - * The protected mode info structure (VBE2+) - */ -typedef PACKTYPEMOD struct { - unsigned short RealMode_SEG PACK; /* RealMode physical base addr */ - unsigned short RealMode_OFF PACK; /* of the following data table */ - unsigned short PhysicalLength PACK; /* length of original table */ - /* Original table starts here */ - unsigned short SetWindow_off PACK; /* ofs to PM Set Windows func */ - unsigned short DisplStart_off PACK; /* ofs to PM Set Display Start func */ - unsigned short PPalette_off PACK; /* ofs to PM Set Primary Palette func */ - unsigned short SubTable_off PACK; /* ofs to PM resource sub table */ -} VESApmInfoBlock; -#define VESApmInfoBlock_BASEOFF (3*sizeof(unsigned short)) - -#undef PACK -#undef PACKTYPEMOD - -/* - * MODE attribute bits - */ -#define MODE_SUPPORTED 1 /* Mode supported in hardware */ -#define MODE_EXTINFO 2 /* Extended information available */ -#define MODE_SUPBIOS 4 /* Text output supported by BIOS */ -#define MODE_ISCOLOR 8 /* Monochrome/color mode */ -#define MODE_ISGRAPHICS 16 /* Mode type (0: text, 1:graphics) */ -/* ==== VESA 2.0 and later ==== */ -#define MODE_NON_VGA 32 /* set if not a VGA mode */ -#define MODE_NO_BANKING 64 /* set if non banking mode */ -#define MODE_LIN_FRAME 128 /* set if linear frame buffer available */ - -/* - * Window attribute bits - */ -#define WIN_SUPPORTED 1 /* Window supported */ -#define WIN_READABLE 2 /* Window readable */ -#define WIN_WRITABLE 4 /* Window writable */ - -/* - * MemoryModel values - */ -#define MODEL_TEXT 0 /* 00h = Text mode */ -#define MODEL_CGA 1 /* 01h = CGA graphics */ -#define MODEL_HERC 2 /* 02h = Hercules graphics */ -#define MODEL_4PLANE 3 /* 03h = 4-plane planar */ -#define MODEL_PACKED 4 /* 04h = Packed pixel */ -#define MODEL_256_NC 5 /* 05h = Non-chain 4, 256 color */ -#define MODEL_DIRECT 6 /* 06h = direct color mode */ -/* 07h-0Fh = Reserved, to be defined by VESA */ -/* 10h-FFh = To be defined by OEM */ - -int _GrViDrvVESAgetVGAinfo(VESAvgaInfoBlock *ib); -int _GrViDrvVESAgetModeInfo(int mode,VESAmodeInfoBlock *ib); -VESApmInfoBlock * _GrViDrvVESAgetPMinfo(void); - -#endif diff --git a/thirdparty/grx249/src/include/vgaregs.h b/thirdparty/grx249/src/include/vgaregs.h deleted file mode 100644 index 0219088..0000000 --- a/thirdparty/grx249/src/include/vgaregs.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - ** vgaregs.h ---- EGA/VGA register declarations - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* - * color plane operations - */ -#define VGA_FUNC_SET 0 -#define VGA_FUNC_AND 8 -#define VGA_FUNC_OR 16 -#define VGA_FUNC_XOR 24 - -/* - * Sequencer port and frequently used register indices - */ -#define VGA_SEQUENCER_PORT 0x3c4 -#define VGA_SEQUENCER_DATA 0x3c5 - -#define VGA_WRT_PLANE_ENB_REG 2 - -/* - * Graphics controller port and frequently used registers - */ -#define VGA_GR_CTRL_PORT 0x3ce -#define VGA_GR_CTRL_DATA 0x3cf - -#define VGA_SET_RESET_REG 0 -#define VGA_SET_RESET_ENB_REG 1 -#define VGA_COLOR_COMP_REG 2 -#define VGA_ROT_FN_SEL_REG 3 -#define VGA_RD_PLANE_SEL_REG 4 -#define VGA_MODE_REG 5 -#define VGA_MISC_REG 6 -#define VGA_COLOR_DONTC_REG 7 -#define VGA_BIT_MASK_REG 8 - diff --git a/thirdparty/grx249/src/include/watcom/memcopy.h b/thirdparty/grx249/src/include/watcom/memcopy.h deleted file mode 100644 index f938c00..0000000 --- a/thirdparty/grx249/src/include/watcom/memcopy.h +++ /dev/null @@ -1,5 +0,0 @@ -/** - ** memcopy.h ---- inline assembly memory copy macros -- WATCOM-C++ code - **/ - -/* this is a good candidate for optimized assembler code */ diff --git a/thirdparty/grx249/src/include/watcom/memfill.h b/thirdparty/grx249/src/include/watcom/memfill.h deleted file mode 100644 index dab777c..0000000 --- a/thirdparty/grx249/src/include/watcom/memfill.h +++ /dev/null @@ -1,321 +0,0 @@ -/** - ** memfill.h ---- inline assembly memory fill macros - ** Watcom special version - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#if defined(USE_WATCOM386_ASM) && defined(__386__) - -/* ------------------------------------------------------------------------ */ - -extern void *_GR_rowfill_b_set(void *P, GR_int8u V, unsigned C); -extern void *_GR_rowfill_w_set(void *P, GR_int16u V, unsigned C); -extern void *_GR_rowfill_l_set(void *P, GR_int32u V, unsigned C); - -#pragma aux _GR_rowfill_b_set = \ - "cld" \ - "rep stosb" \ - parm [edi]/*=P*/ [al]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -#pragma aux _GR_rowfill_w_set = \ - "cld" \ - "rep stosw" \ - parm [edi]/*=P*/ [ax]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -#pragma aux _GR_rowfill_l_set = \ - "cld" \ - "rep stosd" \ - parm [edi]/*=P*/ [eax]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -/* ------------------------------------------------------------------------ */ - -extern void *_GR_colfill_b_set(void *P, unsigned SKIP, GR_int8u V, unsigned C); -extern void *_GR_colfill_w_set(void *P, unsigned SKIP, GR_int16u V, unsigned C); -extern void *_GR_colfill_l_set(void *P, unsigned SKIP, GR_int32u V, unsigned C); - -#pragma aux _GR_colfill_b_set = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: mov byte ptr [edi],al" \ - "add edi,ebx" \ - "odd: mov byte ptr [edi],al" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [al]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -#pragma aux _GR_colfill_w_set = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: mov word ptr [edi],ax" \ - "add edi,ebx" \ - "odd: mov word ptr [edi],ax" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [ax]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -#pragma aux _GR_colfill_l_set = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: mov dword ptr [edi],eax" \ - "add edi,ebx" \ - "odd: mov dword ptr [edi],eax" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [eax]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -/* ------------------------------------------------------------------------ */ - -extern void *_GR_colfill_b_xor(void *P, unsigned SKIP, GR_int8u V, unsigned C); -extern void *_GR_colfill_w_xor(void *P, unsigned SKIP, GR_int16u V, unsigned C); -extern void *_GR_colfill_l_xor(void *P, unsigned SKIP, GR_int32u V, unsigned C); - -#pragma aux _GR_colfill_b_xor = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: xor byte ptr [edi],al" \ - "add edi,ebx" \ - "odd: xor byte ptr [edi],al" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [al]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -#pragma aux _GR_colfill_w_xor = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: xor word ptr [edi],ax" \ - "add edi,ebx" \ - "odd: xor word ptr [edi],ax" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [ax]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -#pragma aux _GR_colfill_l_xor = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: xor dword ptr [edi],eax" \ - "add edi,ebx" \ - "odd: xor dword ptr [edi],eax" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [eax]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -/* ------------------------------------------------------------------------ */ - -extern void *_GR_colfill_b_or(void *P, unsigned SKIP, GR_int8u V, unsigned C); -extern void *_GR_colfill_w_or(void *P, unsigned SKIP, GR_int16u V, unsigned C); -extern void *_GR_colfill_l_or(void *P, unsigned SKIP, GR_int32u V, unsigned C); - -#pragma aux _GR_colfill_b_or = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: or byte ptr [edi],al" \ - "add edi,ebx" \ - "odd: or byte ptr [edi],al" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [al]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -#pragma aux _GR_colfill_w_or = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: or word ptr [edi],ax" \ - "add edi,ebx" \ - "odd: or word ptr [edi],ax" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [ax]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -#pragma aux _GR_colfill_l_or = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: or dword ptr [edi],eax" \ - "add edi,ebx" \ - "odd: or dword ptr [edi],eax" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [eax]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -/* ------------------------------------------------------------------------ */ - -extern void *_GR_colfill_b_and(void *P, unsigned SKIP, GR_int8u V, unsigned C); -extern void *_GR_colfill_w_and(void *P, unsigned SKIP, GR_int16u V, unsigned C); -extern void *_GR_colfill_l_and(void *P, unsigned SKIP, GR_int32u V, unsigned C); - -#pragma aux _GR_colfill_b_and = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: and byte ptr [edi],al" \ - "add edi,ebx" \ - "odd: and byte ptr [edi],al" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [al]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -#pragma aux _GR_colfill_w_and = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: and word ptr [edi],ax" \ - "add edi,ebx" \ - "odd: and word ptr [edi],ax" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [ax]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -#pragma aux _GR_colfill_l_and = \ - "inc ecx" \ - "shr ecx,1" \ - "jnc short odd" \ - "jmp short lop1" \ - /* align to 16byte boundary here */ \ - "lop1: and dword ptr [edi],eax" \ - "add edi,ebx" \ - "odd: and dword ptr [edi],eax" \ - "add edi,ebx" \ - "dec ecx" \ - "jnz short lop1" \ - parm [edi]/*=P*/ [ebx]/*=SKIP*/ [eax]/*=V*/ [ecx]/*=C*/ \ - value [edi]; - -/* ------------------------------------------------------------------------ */ - -#define colfill_b(P,S,V,C) do (P)=_GR_colfill_b_set(P,S,V,C); while (0) -#define colfill_w(P,S,V,C) do (P)=_GR_colfill_w_set(P,S,V,C); while (0) -#define colfill_l(P,S,V,C) do (P)=_GR_colfill_l_set(P,S,V,C); while (0) - -#define colfill_b_xor(P,S,V,C) do (P)=_GR_colfill_b_xor(P,S,V,C); while (0) -#define colfill_w_xor(P,S,V,C) do (P)=_GR_colfill_w_xor(P,S,V,C); while (0) -#define colfill_l_xor(P,S,V,C) do (P)=_GR_colfill_l_xor(P,S,V,C); while (0) - -#define colfill_b_or(P,S,V,C) do (P)=_GR_colfill_b_or(P,S,V,C); while (0) -#define colfill_w_or(P,S,V,C) do (P)=_GR_colfill_w_or(P,S,V,C); while (0) -#define colfill_l_or(P,S,V,C) do (P)=_GR_colfill_l_or(P,S,V,C); while (0) - -#define colfill_b_and(P,S,V,C) do (P)=_GR_colfill_b_and(P,S,V,C); while (0) -#define colfill_w_and(P,S,V,C) do (P)=_GR_colfill_w_and(P,S,V,C); while (0) -#define colfill_l_and(P,S,V,C) do (P)=_GR_colfill_l_and(P,S,V,C); while (0) - -/* ------------------------------------------------------------------------ */ - -#define rowfill_b(P,V,C) do (P)=_GR_rowfill_b_set(P,V,C); while (0) -#define rowfill_w(P,V,C) do (P)=_GR_rowfill_w_set(P,V,C); while (0) -#define rowfill_l(P,V,C) do (P)=_GR_rowfill_l_set(P,V,C); while (0) - -#define rowfill_b_xor(P,V,C) colfill_b_xor(P,1,V,C) -#define rowfill_w_xor(P,V,C) colfill_w_xor(P,2,V,C) -#define rowfill_l_xor(P,V,C) colfill_l_xor(P,4,V,C) - -#define rowfill_b_or(P,V,C) colfill_b_or(P,1,V,C) -#define rowfill_w_or(P,V,C) colfill_w_or(P,2,V,C) -#define rowfill_l_or(P,V,C) colfill_l_or(P,4,V,C) - -#define rowfill_b_and(P,V,C) colfill_b_and(P,1,V,C) -#define rowfill_w_and(P,V,C) colfill_w_and(P,2,V,C) -#define rowfill_l_and(P,V,C) colfill_l_and(P,4,V,C) - -/* ------------------------------------------------------------------------ */ - -#define colfill_b_f colfill_b -#define colfill_w_f colfill_w -#define colfill_l_f colfill_l - -#define colfill_b_f_xor colfill_b_xor -#define colfill_w_f_xor colfill_w_xor -#define colfill_l_f_xor colfill_l_xor - -#define colfill_b_f_or colfill_b_or -#define colfill_w_f_or colfill_w_or -#define colfill_l_f_or colfill_l_or - -#define colfill_b_f_and colfill_b_and -#define colfill_w_f_and colfill_w_and -#define colfill_l_f_and colfill_l_and - -/* ------------------------------------------------------------------------ */ - -#define rowfill_b_f rowfill_b -#define rowfill_w_f rowfill_w -#define rowfill_l_f rowfill_l - -#define rowfill_b_f_xor rowfill_b_xor -#define rowfill_w_f_xor rowfill_w_xor -#define rowfill_l_f_xor rowfill_l_xor - -#define rowfill_b_f_or rowfill_b_or -#define rowfill_w_f_or rowfill_w_or -#define rowfill_l_f_or rowfill_l_or - -#define rowfill_b_f_and rowfill_b_and -#define rowfill_w_f_and rowfill_w_and -#define rowfill_l_f_and rowfill_l_and - -#endif /* USE_WATCOM386_ASM && __386__ */ diff --git a/thirdparty/grx249/src/include/watcom/memmode.h b/thirdparty/grx249/src/include/watcom/memmode.h deleted file mode 100644 index be089b3..0000000 --- a/thirdparty/grx249/src/include/watcom/memmode.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - ** memmode.h ---- determine how to access video and system RAM - ** Watcom-C++ code - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "int86.h" -#undef MK_FP - -#ifdef __386__ -/* WATCOM DOS4GW protected mode */ -#define MK_FP(s,o) (void *)( \ - ( ( ( (long)(unsigned short)(s) ) << 4 ) + \ - (unsigned short)(o)) \ -) -#define MK_DOS_ADDR(s,o) (void *)((s):>(o)) -#else -#define MK_FP(s,o) (void far *)( \ - ( ( ( (long)(unsigned short)(s) ) << 4 ) + \ - (unsigned short)(o)) \ -) -#define MK_DOS_ADDR(s,o) (void far *)((s):>(o)) - -#endif /* __386__ */ - -#define LINP_PTR(p) (p) -#define LINP_SEL(p) 0 -#define FP86_SEG(p) ((unsigned short)((unsigned long)(p)>>16)) -#define FP86_OFF(p) ((unsigned short)((int)(p))) - -/* -The DECLARE_XFER_BUFFER macro allocates a DOS memory block. -Used by the int10x macro. -*/ -#ifdef __386__ -/* WATCOM DOS4GW protected mode */ -#pragma off (unreferenced); -static short int10_segment = 0; /*this is not nice! - hack to load real segment for int10*/ -/* allocate a real mode segment so we can return info from VESA int10 */ -#define DECLARE_XFER_BUFFER(size) \ - void _far * xfer_ptr; \ - Int86Regs BuffRegs; \ - do { \ - sttzero((&BuffRegs)); \ - IREG_AX(BuffRegs) = 0x100; \ - IREG_BX(BuffRegs) = 64; \ - int386 ( 0x31, &(BuffRegs.Normal), &(BuffRegs.Normal) ); \ - int10_segment = IREG_AX(BuffRegs); \ - xfer_ptr = IREG_DX(BuffRegs) :> (void near *)0; \ - _fmemset ( xfer_ptr, 0xaa, 256 ); \ - } while (0) -/* access the real mode segment */ -#define XFER_BUFFER xfer_ptr -/* clean up the DOS memory allocated by DOS4GW DPMI macro above */ -#define DELETE_XFER_BUFFER \ - do { \ - sttzero((&BuffRegs)); \ - IREG_AX(BuffRegs) = 0x101; \ - IREG_DX(BuffRegs) = FP_SEG(xfer_ptr); \ - int386x(0x31,&(BuffRegs.Normal),&(BuffRegs.Normal),&(BuffRegs.Extended) ); \ - } while (0) -#else /* __386__ */ -/* WATCOM 16 Bit DOS - hey we're in real mode! */ -#define DECLARE_XFER_BUFFER(size) char XFER_BUFFER[size] -#define DELETE_XFER_BUFFER -#endif /* !__386__ */ - diff --git a/thirdparty/grx249/src/include/watcom/mempeek.h b/thirdparty/grx249/src/include/watcom/mempeek.h deleted file mode 100644 index 66b374f..0000000 --- a/thirdparty/grx249/src/include/watcom/mempeek.h +++ /dev/null @@ -1,28 +0,0 @@ -/** - ** mempeek.h ---- (far) memory read/write operations - ** Watcom-C++ code - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Basic memory peek and poke operations in byte, word and long sizes. - ** The poke operations are available in WRITE, XOR, OR and AND versions. - ** - **/ - -/* candidate for speed ups */ -#define __INLINE_STD_PEEK__(P,S,T) (*((unsigned T *)(P))) -#define __INLINE_STD_POKE__(P,V,OP,I,S,T) ((*((unsigned T *)(P))) OP (V)) - -#define __INLINE_FAR_PEEK__(P,S,T) (*((volatile unsigned T *)(P))) -#define __INLINE_FAR_POKE__(P,V,OP,I,S,T) ((*((volatile unsigned T *)(P))) OP (V)) diff --git a/thirdparty/grx249/src/makefile.bcc b/thirdparty/grx249/src/makefile.bcc deleted file mode 100644 index 541c496..0000000 --- a/thirdparty/grx249/src/makefile.bcc +++ /dev/null @@ -1,205 +0,0 @@ -# -# GRX 2.0 Library Makefile for Turbo C. -# Uses Turbo C Make (v3.7 worked for me) -# Make sure your shell is command.com ! -# -.AUTODEPEND - -!include "../makedefs.bcc" - -# The library may get too complex ... -#LIBPAGE=/P32 - -# -w-sig : Don't warn "conversion may lose significant digits" -# -DGRX_USE_RAM3x8 : Use planed ram driver for TrueColor modes (24/32bpp) -ADDOPT = -w-sig -DGRX_USE_RAM3x8 - -!ifdef DEBUG -ADDOPT = -DDEBUG=$(DEBUG) $(ADDOPT) -!endif - -# SMALL_STACK: Turbo-C / Borland-C++ have only a small stack. -# It's usually better to get memory from heap -# instead of alloca()-ing it from stack. -ADDOPT = -DSMALL_STACK $(ADDOPT) - -GRX20ST = ..\lib\$(GRX_LIB_SUBDIR)\grx20$(MODEL).lib -# Borland make fails on long lines, build lib in stages -GRX20STa= ..\lib\$(GRX_LIB_SUBDIR)\temp1.lib -GRX20STb= ..\lib\$(GRX_LIB_SUBDIR)\temp2.lib -GRX20STc= ..\lib\$(GRX_LIB_SUBDIR)\temp3.lib -GRX20STd= ..\lib\$(GRX_LIB_SUBDIR)\temp4.lib -GRX20STe= ..\lib\$(GRX_LIB_SUBDIR)\temp5.lib -TEMP_LIB= ..\lib\$(GRX_LIB_SUBDIR)\temp?.lib - -INCDIR= -I. -I./include -I../include -I$(BCCROOT)/include\ - -I./vdrivers -I./bgi -LIBDIR= -L$(BCCROOT)/lib - -OP=+ -OX=.obj - -!include "./stdobjs.mak" - -!ifdef DEBUG -DBG_O = +utils\dbgprint.obj -!else -DBG_O = -!endif - -BCCOBJ= +fdrivers\egavga1.obj \ - +fdrivers\ega4.obj \ - +fdrivers\herc1.obj \ - +fdrivers\ram3x8.obj \ - +fdrivers\svga16.obj \ - +fdrivers\svga24.obj \ - +fdrivers\svga32h.obj \ - +fdrivers\svga32l.obj \ - +fdrivers\svga4.obj \ - +fdrivers\svga8.obj \ - +fdrivers\vga8x.obj \ - +mouse\dosinput.obj \ - +mouse\doskeys.obj \ - +misc\dosmisc.obj \ - +utils\bccarith.obj \ - +utils\bcccopy.obj \ - +utils\bccfil08.obj \ - +utils\bccfil16.obj \ - +utils\bccfil24.obj \ - +utils\bccfil32.obj \ - +vdrivers\ati28800.obj \ - +vdrivers\cl5426.obj \ - +vdrivers\et4000.obj \ - +vdrivers\herc.obj \ - +vdrivers\mach64.obj \ - +vdrivers\s3.obj \ - +vdrivers\stdega.obj \ - +vdrivers\stdvga.obj \ - +vdrivers\u_egavga.obj \ - +vdrivers\u_vesa.obj \ - +vdrivers\u_vsvirt.obj \ - +vdrivers\vesa.obj - - -# Borland make and librarian don't like very long lines ... -LOBJ1=$(STD_1:/=\) $(STD_2:/=\) $(STD_3:/=\) $(STD_4:/=\) -LOBJ2=$(STD_5:/=\) $(STD_6:/=\) $(STD_7:/=\) $(STD_8:/=\) -LOBJ3=$(STD_9:/=\) $(STD_10:/=\) -LOBJ4=$(BGI_1:/=\) $(BGI_2:/=\) $(BGI_3:/=\) -LOBJ5=$(BGI_4:/=\) $(BGI_5:/=\) $(BGI_6:/=\) -LOBJ6=$(STD_11:/=\) $(BCCOBJ) $(DBG_O) - -UTILP = \ - ..\bin\vesaif16.exe \ - ..\bin\fnt2c16.exe \ - ..\bin\modtst16.exe \ - ..\bin\bin2c16.exe - -all: config.bcc $(GRX20ST) $(UTILP) - -clean: - if exist bgi\*.obj del bgi\*.obj - if exist draw\*.obj del draw\*.obj - if exist fdrivers\*.obj del fdrivers\*.obj - if exist fonts\*.obj del fonts\*.obj - if exist gformats\*.obj del gformats\*.obj - if exist image\*.obj del image\*.obj - if exist misc\*.obj del misc\*.obj - if exist mouse\*.obj del mouse\*.obj - if exist pattern\*.obj del pattern\*.obj - if exist setup\*.obj del setup\*.obj - if exist shape\*.obj del shape\*.obj - if exist text\*.obj del text\*.obj - if exist user\*.obj del user\*.obj - if exist utils\*.obj del utils\*.obj - if exist vdrivers\*.obj del vdrivers\*.obj - if exist wideline\*.obj del wideline\*.obj - if exist ..\addons\*.obj del ..\addons\*.obj - if exist ..\addons\print\*.obj del ..\addons\print\*.obj - if exist ..\addons\bmp\*.obj del ..\addons\bmp\*.obj - if exist config.bcc del config.bcc - if exist *.asm del *.asm - if exist *.obj del *.obj - if exist $(TEMP_LIB) del $(TEMP_LIB) - -cleanall: clean - if exist $(GRX20ST) del $(GRX20ST) - if exist ..\bin\*.exe del ..\bin\*.exe - -# the & tells TLIB to continue on next line -$(GRX20ST): $(GRX20STa) $(GRX20STb) $(GRX20STc) $(GRX20STd) $(GRX20STe) $(LOBJ6:+=) - if exist $(GRX20ST) del $(GRX20ST) - $(TLIB) $(LIBPAGE) /C $(GRX20ST) @&&! - +$(GRX20STa) & - +$(GRX20STb) & - +$(GRX20STc) & - +$(GRX20STd) & - +$(GRX20STe) & - $(LOBJ6) -! - -$(GRX20STa): $(LOBJ1:+=) - if exist $(GRX20STa) del $(GRX20STa) - $(TLIB) $(LIBPAGE) /C $(GRX20STa) @&&! - $(LOBJ1) -! - -$(GRX20STb): $(LOBJ2:+=) - if exist $(GRX20STb) del $(GRX20STb) - $(TLIB) $(LIBPAGE) /C $(GRX20STb) @&&! - $(LOBJ2) -! - -$(GRX20STc): $(LOBJ3:+=) - if exist $(GRX20STc) del $(GRX20STc) - $(TLIB) $(LIBPAGE) /C $(GRX20STc) @&&! - $(LOBJ3) -! - -$(GRX20STd): $(LOBJ4:+=) - if exist $(GRX20STd) del $(GRX20STd) - $(TLIB) $(LIBPAGE) /C $(GRX20STd) @&&! - $(LOBJ4) -! - -$(GRX20STe): $(LOBJ5:+=) - if exist $(GRX20STe) del $(GRX20STe) - $(TLIB) $(LIBPAGE) /C $(GRX20STe) @&&! - $(LOBJ5) -! - -..\bin\vesaif16.exe: utilprog\vesainfo.c $(GRX20ST) config.bcc - $(BCC) +config.bcc -e..\bin\vesaif16 @&&! - utilprog\vesainfo.c $(GRX20ST) -! - -..\bin\fnt2c16.exe: utilprog\fnt2c.c $(GRX20ST) config.bcc - $(BCC) +config.bcc -e..\bin\fnt2c16 @&&! - utilprog\fnt2c.c $(GRX20ST) -! - -..\bin\modtst16.exe: utilprog\modetest.c $(GRX20ST) config.bcc - $(BCC) +config.bcc -I..\test -e..\bin\modtst16 @&&! - utilprog\modetest.c $(GRX20ST) -! - -..\bin\bin2c16.exe: utilprog\bin2c.c $(GRX20ST) config.bcc - $(BCC) +config.bcc -e..\bin\bin2c16 @&&! - utilprog\bin2c.c $(GRX20ST) -! - -.c.obj: - $(BCC) +config.bcc -c -o$*.obj $*.c - -.c.asm: - $(BCC) +config.bcc -S -o$*.asm $*.c - - -config.bcc: makefile.bcc ../makedefs.bcc - copy &&! - $(CCOPT) $(ADDOPT) - $(INCDIR) - $(LIBDIR) -! config.bcc - -#!include "depend.bcc" diff --git a/thirdparty/grx249/src/makefile.dj2 b/thirdparty/grx249/src/makefile.dj2 deleted file mode 100644 index e56ef19..0000000 --- a/thirdparty/grx249/src/makefile.dj2 +++ /dev/null @@ -1,343 +0,0 @@ -# -# GRX Library Makefile for DJGPP v2. Needs GNU Make. -# Make sure your shell is command.com ! -# -.PHONY : clean cleanall install uninstall \ - install-bin uninstall-bin install-fonts uninstall-fonts \ - install-info uninstall-info - -GRXVDJ2=y - -include ../makedefs.grx - -INCDIR= -I. -I./include -I../include - -ifdef GRX_DEFAULT_FONT_PATH -CCOPT += -DGRX_DEFAULT_FONT_PATH=\"$(GRX_DEFAULT_FONT_PATH)\" -endif - -TAG = $(DOS_DJGPP_V2) - -GRX20ln = libgrx20.a -GRX20ST = ../lib/$(GRX_LIB_SUBDIR)/$(GRX20ln) -ifeq ($(HAVE_UNIX_TOOLS),n) -GRX20STdos = $(subst /,\,$(GRX20ST)) -DESTDIRdos = $(subst /,\,$(DESTDIR)) -libdirdos = $(subst /,\,$(libdir)) -includedirdos = $(subst /,\,$(includedir)) -unitsdirdos = $(subst /,\,$(unitsdir)) -infodirdos = $(subst /,\,$(infodir)) -endif - -OX=.o -OP= - -include ./stdobjs.mak - -# Keep things a little smaller when building the lib ... -STD_Oa= $(STD_1) $(STD_2) $(STD_3) $(STD_4) $(STD_5) $(STD_6) -STD_Ob= $(STD_7) $(STD_8) $(STD_9) $(STD_10) $(STD_11) $(STD_12) -BGI_Oa= $(BGI_1) $(BGI_2) $(BGI_3) -BGI_Ob= $(BGI_4) $(BGI_5) $(BGI_6) - -ADDON_O= -ifdef DEBUG - ADDON_O += $(DBG_1) -endif - -ifeq ($(HAVE_LIBTIFF),y) - ADDON_O += $(TIF_1) -endif - -ifeq ($(HAVE_LIBJPEG),y) - ADDON_O += $(JPG_1) -else - ADDON_O += $(NOJPG_1) -endif - -ifeq ($(HAVE_LIBPNG),y) - ADDON_O += $(PNG_1) -else - ADDON_O += $(NOPNG_1) -endif - -ifeq ($(INCLUDE_PRINTING_CODE),y) - ADDON_O += $(PRN_1) - INCDIR += -I../addons/print -ifeq ($(INCLUDE_BGI_SUPPORT),y) - BGI_Ob += $(PRNBGI_1) -endif -endif - -ifeq ($(INCLUDE_BMP_CODE),y) - ADDON_O += $(BMP_1) - INCDIR += -I../addons/bmp -endif - -DJ_O= $(ADDON_O) \ - fdrivers/egavga1.o \ - fdrivers/ega4.o \ - fdrivers/herc1.o \ - fdrivers/lfb16.o \ - fdrivers/lfb24.o \ - fdrivers/lfb32h.o \ - fdrivers/lfb32l.o \ - fdrivers/lfb8.o \ - fdrivers/lfbbltrv.o \ - fdrivers/lfbbltvr.o \ - fdrivers/lfbbltvv.o \ - fdrivers/ram24.o \ - fdrivers/ram32l.o \ - fdrivers/ram32h.o \ - fdrivers/svga16.o \ - fdrivers/svga24.o \ - fdrivers/svga32h.o \ - fdrivers/svga32l.o \ - fdrivers/svga4.o \ - fdrivers/svga8.o \ - fdrivers/vga8x.o \ - mouse/dosinput.o \ - mouse/doskeys.o \ - misc/dosmisc.o \ - vdrivers/ati28800.o \ - vdrivers/cl5426.o \ - vdrivers/et4000.o \ - vdrivers/herc.o \ - vdrivers/mach64.o \ - vdrivers/s3.o \ - vdrivers/stdega.o \ - vdrivers/stdvga.o \ - vdrivers/u_egavga.o \ - vdrivers/u_vesa.o \ - vdrivers/u_vsvirt.o \ - vdrivers/vesa.o - -ALL_O = $(STD_Oa) $(STD_Ob) $(DJ_O) - -ifeq ($(INCLUDE_BGI_SUPPORT),y) - ALL_O += $(BGI_Oa) $(BGI_Ob) -endif - -UTILP = ../bin/bin2c.exe \ - ../bin/fnt2c.exe \ - ../bin/vesainfo.exe \ - ../bin/modetest.exe - -all: $(GRX20ST) $(UTILP) - -clean: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f */*.o ../addons/*.o ../addons/*/*.o $(TAG) -else - if exist bgi\*.o del bgi\*.o - if exist draw\*.o del draw\*.o - if exist fdrivers\*.o del fdrivers\*.o - if exist fonts\*.o del fonts\*.o - if exist image\*.o del image\*.o - if exist gformats\*.o del gformats\*.o - if exist mouse\*.o del mouse\*.o - if exist misc\*.o del misc\*.o - if exist pattern\*.o del pattern\*.o - if exist setup\*.o del setup\*.o - if exist shape\*.o del shape\*.o - if exist text\*.o del text\*.o - if exist user\*.o del user\*.o - if exist utilprog\*.o del utilprog\*.o - if exist utils\*.o del utils\*.o - if exist vdrivers\*.o del vdrivers\*.o - if exist wideline\*.o del wideline\*.o - if exist ..\addons\*.o del ..\addons\*.o - if exist ..\addons\print\*.o del ..\addons\print\*.o - if exist ..\addons\bmp\*.o del ..\addons\bmp\*.o - if exist $(TAG) del $(TAG) -endif - -cleanall: clean -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f $(GRX20ST) ../bin/*.exe -else - if exist $(GRX20STdos) del $(GRX20STdos) - if exist ..\bin\*.exe del ..\bin\*.exe -endif - -install: $(GRX20ST) -ifeq ($(HAVE_UNIX_TOOLS),y) - mkdir -p $(DESTDIR)$(libdir) - mkdir -p $(DESTDIR)$(includedir) - cp $(GRX20ST) $(DESTDIR)$(libdir) - cp ../include/grx20.h ../include/grxkeys.h \ - ../include/libbcc.h $(DESTDIR)$(includedir) -ifeq ($(INCLUDE_PRINTING_CODE),y) - cp ../addons/print/grxprint.h $(DESTDIR)$(includedir) -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - mkdir -p $(DESTDIR)$(unitsdir) - cp ../pascal/grx.pas ../pascal/bgi/graph.pas $(DESTDIR)$(unitsdir) -endif -else - if not exist $(DESTDIRdos)\nul mkdir $(DESTDIRdos) - if not exist $(DESTDIRdos)$(libdirdos)\nul mkdir $(DESTDIRdos)$(libdirdos) - if not exist $(DESTDIRdos)$(includedirdos)\nul mkdir $(DESTDIRdos)$(includedirdos) - copy $(GRX20STdos) $(DESTDIRdos)$(libdirdos) - copy ..\include\grx20.h $(DESTDIRdos)$(includedirdos) - copy ..\include\grxkeys.h $(DESTDIRdos)$(includedirdos) - copy ..\include\libbcc.h $(DESTDIRdos)$(includedirdos) -ifeq ($(INCLUDE_PRINTING_CODE),y) - copy ..\addons\print\grxprint.h $(DESTDIRdos)$(includedirdos) -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - if not exist $(DESTDIRdos)$(unitsdirdos)\nul mkdir $(DESTDIRdos)$(unitsdirdos) - copy ..\pascal\grx.pas $(DESTDIRdos)$(unitsdirdos) - copy ..\pascal\bgi\graph.pas $(DESTDIRdos)$(unitsdirdos) -endif -endif - -uninstall: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f $(DESTDIR)$(libdir)/$(GRX20ln) $(DESTDIR)$(includedir)/grx20.h \ - $(DESTDIR)$(includedir)/grxkeys.h $(DESTDIR)$(includedir)/libbcc.h -ifeq ($(INCLUDE_PRINTING_CODE),y) - rm -f $(DESTDIR)$(includedir)/grxprint.h -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - rm -f $(DESTDIR)$(unitsdir)/grx.pas $(DESTDIR)$(unitsdir)/graph.pas -endif -else - if exist $(DESTDIRdos)$(libdirdos)\$(GRX20ln) del $(DESTDIRdos)$(libdirdos)\$(GRX20ln) - if exist $(DESTDIRdos)$(includedirdos)\grx20.h del $(DESTDIRdos)$(includedirdos)\grx20.h - if exist $(DESTDIRdos)$(includedirdos)\grxkeys.h del $(DESTDIRdos)$(includedirdos)\grxkeys.h - if exist $(DESTDIRdos)$(includedirdos)\libbcc.h del $(DESTDIRdos)$(includedirdos)\libbcc.h -ifeq ($(INCLUDE_PRINTING_CODE),y) - if exist $(DESTDIRdos)$(includedirdos)\grxprint.h del $(DESTDIRdos)$(includedirdos)\grxprint.h -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - if exist $(DESTDIRdos)$(unitsdirdos)\grx.pas del $(DESTDIRdos)$(unitsdirdos)\grx.pas - if exist $(DESTDIRdos)$(unitsdirdos)\graph.pas del $(DESTDIRdos)$(unitsdirdos)\graph.pas -endif -endif - -install-info: -ifeq ($(HAVE_UNIX_TOOLS),y) - mkdir -p $(DESTDIR)$(infodir) - cp ../doc/grx*um.inf $(DESTDIR)$(infodir)/grx.inf - install-info $(DESTDIR)$(infodir)/grx.inf $(DESTDIR)$(infodir)/dir -else - if not exist $(DESTDIRdos)$(infodirdos)\nul mkdir $(DESTDIRdos)$(infodirdos) - copy ..\doc\grx*um.inf $(DESTDIRdos)$(infodirdos)\grx.inf - install-info $(DESTDIRdos)$(infodirdos)\grx.inf $(DESTDIRdos)$(infodirdos)\dir -endif - -uninstall-info: -ifeq ($(HAVE_UNIX_TOOLS),y) - install-info -r $(DESTDIR)$(infodir)/grx.inf $(DESTDIR)$(infodir)/dir - rm -f $(DESTDIR)$(infodir)/grx.inf -else - install-info -r $(DESTDIRdos)$(infodirdos)\grx.inf $(DESTDIRdos)$(infodirdos)\dir - if exist $(DESTDIRdos)$(infodirdos)\grx.inf del $(DESTDIRdos)$(infodirdos)\grx.inf -endif - -install-bin: $(UTILP) -ifeq ($(HAVE_UNIX_TOOLS),y) - mkdir -p $(DESTDIR)$(bindir) - cp ../bin/bin2c.exe ../bin/fnt2c.exe ../bin/vesainfo.exe \ - ../bin/modetest.exe $(DESTDIR)$(bindir) -else - if not exist $(DESTDIRdos)$(bindirdos)\nul mkdir $(DESTDIRdos)$(bindirdos) - copy ..\bin\bin2c.exe $(DESTDIRdos)$(bindirdos) - copy ..\bin\fnt2c.exe $(DESTDIRdos)$(bindirdos) - copy ..\bin\vesainfo.exe $(DESTDIRdos)$(bindirdos) - copy ..\bin\modetest.exe $(DESTDIRdos)$(bindirdos) -endif - -uninstall-bin: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f $(DESTDIR)$(bindir)/bin2c.exe $(DESTDIR)$(bindir)/fnt2c.exe \ - $(DESTDIR)$(bindir)/vesainfo.exe $(DESTDIR)$(bindir)/modetest.exe -else - if exist $(DESTDIRdos)$(bindirdos)\bin2c.exe del $(DESTDIRdos)$(bindirdos)\bin2c.exe - if exist $(DESTDIRdos)$(bindirdos)\fnt2c.exe del $(DESTDIRdos)$(bindirdos)\fnt2c.exe - if exist $(DESTDIRdos)$(bindirdos)\vesainfo.exe del $(DESTDIRdos)$(bindirdos)\vesainfo.exe - if exist $(DESTDIRdos)$(bindirdos)\modetest.exe del $(DESTDIRdos)$(bindirdos)\modetest.exe -endif - -ifdef GRX_DEFAULT_FONT_PATH -ifeq ($(HAVE_UNIX_TOOLS),n) -FONTPATHdos = $(subst /,\,$(GRX_DEFAULT_FONT_PATH)) -endif -install-fonts: -ifeq ($(HAVE_UNIX_TOOLS),y) - mkdir -p $(DESTDIR)$(GRX_DEFAULT_FONT_PATH) - cp ../fonts/* $(DESTDIR)$(GRX_DEFAULT_FONT_PATH) -else - if not exist $(DESTDIRdos)$(FONTPATHdos)\nul mkdir $(DESTDIRdos)$(FONTPATHdos) - copy ..\fonts\*.* $(DESTDIRdos)$(FONTPATHdos) -endif -uninstall-fonts: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f $(DESTDIR)$(GRX_DEFAULT_FONT_PATH)/* -else - del $(DESTDIRdos)$(FONTPATHdos)\*.* -endif -endif - -dep: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f depend.tmp -else - if exist depend.tmp del depend.tmp -endif - $(CC) -MM $(CCOPT) $(INCDIR) $(ALL_O:.o=.c) >depend.tmp - sed 's#^.*: \(.*\)\.c#\1.o: \1.c#g' depend.dj2 -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f depend.tmp -else - if exist depend.tmp del depend.tmp -endif - -depend.b: depend.new - sed "s#\.o:#.obj:#g" depend.b - sed "s#\.o:#.asm:#g" >depend.b - -$(GRX20ST): $(TAG) $(ALL_O) -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f $(GRX20ST) -else - if exist $(GRX20STdos) del $(GRX20STdos) -endif - $(AR) -r $(GRX20ST) $(STD_Oa) - $(AR) -r $(GRX20ST) $(STD_Ob) -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(AR) -r $(GRX20ST) $(BGI_Oa) - $(AR) -r $(GRX20ST) $(BGI_Ob) -endif - $(AR) -r $(GRX20ST) $(DJ_O) - $(RANLIB) $(GRX20ST) - -$(UTILP): ../bin/%.exe : utilprog/%.o $(GRX20ST) - $(CC) $(LDOPT) -o $@ utilprog/$*.o $(GRX20ST) - $(EXE_COMPRESS) $@ - -$(DOS_DJGPP_V2): - $(MAKE) -f makefile.dj2 clean -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f $(SYSTEM_TAG_PREFIX).* -else - if exist $(SYSTEM_TAG_PREFIX).* del $(SYSTEM_TAG_PREFIX).* -endif - echo DOS_DJGPP_V2_TARGET > $(DOS_DJGPP_V2) - -$(ALL_O): $(TAG) - -$(ALL_O:.o=.i) : %.i : %.c - $(CC) -E $(CCOPT) $(INCDIR) $*.c > $*.i - -$(ALL_O:.o=.dm) : %.dm : %.c - $(CC) -dM -E $(CCOPT) $(INCDIR) $*.c > $*.dm - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c -o $*.s - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -include depend.dj2 diff --git a/thirdparty/grx249/src/makefile.lnx b/thirdparty/grx249/src/makefile.lnx deleted file mode 100644 index 7a02842..0000000 --- a/thirdparty/grx249/src/makefile.lnx +++ /dev/null @@ -1,284 +0,0 @@ -# -# GRX Library Makefile for LINUX/console. Uses GNU Make. -# -.PHONY : libst libsh clean cleanall install uninstall setsuid \ - install-bin uninstall-bin install-fonts uninstall-fonts \ - install-info uninstall-info - -GRXVLNX=y - -include ../makedefs.grx - -INCDIR= -I. -I./include -I../include -CCOPT += -DLFB_BY_NEAR_POINTER -pipe -ADDON_LIBS = - -ifdef GRX_DEFAULT_FONT_PATH -CCOPT += -DGRX_DEFAULT_FONT_PATH=\"$(GRX_DEFAULT_FONT_PATH)\" -endif - -ifeq ($(USE_SVGALIB_DRIVER),y) -CCOPT += -DSVGALIB_DRIVER -ADDON_LIBS += -lvga -endif - -ifeq ($(USE_FRAMEBUFFER_DRIVER),y) -CCOPT += -DFRAMEBUFFER_DRIVER -endif - -ifeq ($(USE_INOUTP_FRAMEDRIVERS),y) -CCOPT += -DINOUTP_FRAMEDRIVERS -endif - -ifeq ($(SET_SUIDROOT),y) -EXECBITS = 4755 -else -EXECBITS = 0755 -endif - -GRX20ST = ../lib/$(GRX_LIB_SUBDIR)/libgrx20.a - -GRX20SH = ../lib/$(GRX_LIB_SUBDIR)/libgrx20.so -GRX20SHli = $(GRX20SH).$(word 1,$(subst ., ,$(GRX_VERSION))) -GRX20SHna = $(GRX20SH).$(GRX_VERSION) -SHCCOPT = -fPIC -D__SHARED__ - -OX=.o -OP= - -include ./stdobjs.mak - -STD_O= $(STD_1) $(STD_2) $(STD_3) $(STD_4) \ - $(STD_5) $(STD_6) $(STD_7) $(STD_8) \ - $(STD_9) $(STD_10) $(STD_11) $(STD_12) - -BGI_O= $(BGI_1) $(BGI_2) $(BGI_3) $(BGI_4) \ - $(BGI_5) $(BGI_6) - -ADDON_O= - -ifdef DEBUG - ADDON_O += $(DBG_1) -endif - -ifeq ($(HAVE_LIBTIFF),y) - ADDON_O += $(TIF_1) -endif - -ifeq ($(HAVE_LIBJPEG),y) - ADDON_O += $(JPG_1) -else - ADDON_O += $(NOJPG_1) -endif - -ifeq ($(HAVE_LIBPNG),y) - ADDON_O += $(PNG_1) -else - ADDON_O += $(NOPNG_1) -endif - -ifeq ($(INCLUDE_PRINTING_CODE),y) - ADDON_O += $(PRN_1) - INCDIR += -I../addons/print -ifeq ($(INCLUDE_BGI_SUPPORT),y) - BGI_O += $(PRNBGI_1) -endif -endif - -O= $(STD_O) \ - $(ADDON_O) \ - fdrivers/ram24.o \ - fdrivers/ram32l.o \ - fdrivers/ram32h.o \ - fdrivers/svga16.o \ - fdrivers/svga24.o \ - fdrivers/svga32h.o \ - fdrivers/svga32l.o \ - fdrivers/svga8.o \ - mouse/lnxkeys.o \ - misc/lnxmisc.o - -ifeq ($(BUILD_X86_64),n) - O += fdrivers/egavga1.o \ - fdrivers/ega4.o \ - fdrivers/svga4.o \ - fdrivers/vga8x.o -endif - -ifeq ($(INCLUDE_BGI_SUPPORT),y) - O += $(BGI_O) -endif - -ifeq ($(USE_SVGALIB_DRIVER),y) - O += vdrivers/svgalib.o -endif - -ifeq ($(USE_FRAMEBUFFER_DRIVER),y) - O += vdrivers/vd_lnxfb.o -endif - -ifeq ($(USE_DIRECT_MOUSE_DRIVER),y) - O += mouse/lnxinpu2.o -else - O += mouse/lnxinput.o -endif - -LO = $(subst $(OX),.lo,$(O)) - -UTILP = ../bin/bin2c \ - ../bin/fnt2c \ - ../bin/lfbinfo - -UTILPS= ../bin/modetest - -all: libst libsh $(UTILP) $(UTILPS) - -libst: $(GRX20ST) - -$(GRX20ST): $(LINUX_i386_CONSOLE) $(O) - -rm -f $(GRX20ST) - $(AR) -r $(GRX20ST) $(O) - $(RANLIB) $(GRX20ST) - -ifeq ($(INCLUDE_SHARED_SUPPORT),y) -libsh: $(GRX20SHna) -else -libsh: -endif - -$(GRX20SHna): $(LINUX_i386_CONSOLE) $(LO) - -rm -f $(GRX20SHna) - $(CC) $(LDOPT) -shared -Wl,-soname,$(notdir $(GRX20SHli)) -o $(GRX20SHna) $(LO) - ln -sf $(notdir $(GRX20SHna)) $(GRX20SHli) - -$(UTILP): ../bin/% : utilprog/%.o $(GRX20ST) - $(CC) $(LDOPT) -o $@ utilprog/$*.o $(GRX20ST) - $(STRIP) $@ - -$(UTILPS): ../bin/% : utilprog/%.o $(GRX20ST) - $(CC) $(LDOPT) -o $@ utilprog/$*.o $(GRX20ST) $(ADDON_LIBS) -lm - $(STRIP) $@ - chmod $(EXECBITS) $@ - -$(O): $(LINUX_i386_CONSOLE) - -$(LO): $(LINUX_i386_CONSOLE) - -$(LINUX_i386_CONSOLE): - if [ ! -r $(LINUX_i386_CONSOLE) ]; then \ - rm -f $(SYSTEM_TAG_PREFIX).* $(O) $(LO) utilprog/*.o; fi - touch $(LINUX_i386_CONSOLE) - -clean: - rm -f $(O) $(O:.o=.s) $(LO) $(LINUX_i386_CONSOLE) - rm -f utilprog/*.o - -cleanall: clean -ifeq ($(INCLUDE_SHARED_SUPPORT),y) - rm -f $(GRX20SHna) $(GRX20SHli) -endif - rm -f $(GRX20ST) - rm -f $(UTILP) $(UTILPS) - -install: libst libsh - install -m 0755 -d $(DESTDIR)$(libdir) - install -m 0755 -d $(DESTDIR)$(includedir) - install -m 0644 $(GRX20ST) $(DESTDIR)$(libdir) -ifeq ($(INCLUDE_SHARED_SUPPORT),y) - install -m 0755 $(GRX20SHna) $(DESTDIR)$(libdir) - ln -sf $(notdir $(GRX20SHna)) $(DESTDIR)$(libdir)/$(notdir $(GRX20SHli)) - ln -sf $(notdir $(GRX20SHli)) $(DESTDIR)$(libdir)/$(notdir $(GRX20SH)) -endif - install -m 0644 ../include/grx20.h $(DESTDIR)$(includedir) - install -m 0644 ../include/grxkeys.h $(DESTDIR)$(includedir) - install -m 0644 ../include/libbcc.h $(DESTDIR)$(includedir) -ifeq ($(INCLUDE_PRINTING_CODE),y) - install -m 0644 ../addons/print/grxprint.h $(DESTDIR)$(includedir) -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - install -m 0755 -d $(DESTDIR)$(unitsdir) - install -m 0644 ../pascal/grx.pas $(DESTDIR)$(unitsdir) - install -m 0644 ../pascal/bgi/graph.pas $(DESTDIR)$(unitsdir) -endif - -uninstall: - rm -f $(DESTDIR)$(libdir)/$(notdir $(GRX20ST)) -ifeq ($(INCLUDE_SHARED_SUPPORT),y) - rm -f $(DESTDIR)$(libdir)/$(notdir $(GRX20SH)) - rm -f $(DESTDIR)$(libdir)/$(notdir $(GRX20SHli)) - rm -f $(DESTDIR)$(libdir)/$(notdir $(GRX20SHna)) -endif - rm -f $(DESTDIR)$(includedir)/grx20.h - rm -f $(DESTDIR)$(includedir)/grxkeys.h - rm -f $(DESTDIR)$(includedir)/libbcc.h -ifeq ($(INCLUDE_PRINTING_CODE),y) - rm -f $(DESTDIR)$(includedir)/grxprint.h -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - rm -f $(DESTDIR)$(unitsdir)/grx.pas - rm -f $(DESTDIR)$(unitsdir)/graph.pas -endif - -setsuid: $(UTILPS) -ifeq ($(SET_SUIDROOT),y) - chown root ../bin/modetest - chmod $(EXECBITS) ../bin/modetest -else - @echo "Nothing to do, SET_SUIDROOT is not set to 'y' in makedefs.grx" -endif - -install-info: - install -m 0755 -d $(DESTDIR)$(infodir) - install -m 0644 ../doc/grx*um.inf $(DESTDIR)$(infodir)/grx.info - for info_dir_file in $(DESTDIR)$(infodir)/dir /etc/info-dir; do \ - if [ -w $info_dir_file ]; then \ - install-info --dir-file=$info_dir_file $(DESTDIR)$(infodir)/grx.info; \ - fi; \ - done - -uninstall-info: - for info_dir_file in $(DESTDIR)$(infodir)/dir /etc/info-dir; do \ - if [ -w $info_dir_file ]; then \ - install-info --dir-file=$info_dir_file -r grx; \ - fi; \ - done - rm -f $(DESTDIR)$(infodir)/grx.info - -install-bin: $(UTILP) $(UTILPS) - install -m 0755 -d $(DESTDIR)$(bindir) - install -m 0755 ../bin/bin2c $(DESTDIR)$(bindir) - install -m 0755 ../bin/fnt2c $(DESTDIR)$(bindir) - install -m 0755 ../bin/lfbinfo $(DESTDIR)$(bindir) - install -m $(EXECBITS) ../bin/modetest $(DESTDIR)$(bindir) - -uninstall-bin: - rm -f $(DESTDIR)$(bindir)/bin2c - rm -f $(DESTDIR)$(bindir)/fnt2c - rm -f $(DESTDIR)$(bindir)/lfbinfo - rm -f $(DESTDIR)$(bindir)/modetest - -ifdef GRX_DEFAULT_FONT_PATH -install-fonts: - install -m 0755 -d $(DESTDIR)$(GRX_DEFAULT_FONT_PATH) - install -m 0644 ../fonts/* $(DESTDIR)$(GRX_DEFAULT_FONT_PATH) -uninstall-fonts: - rm -f $(GRX_DEFAULT_FONT_PATH)/* -endif - -dep: - $(CC) -MM $(CCOPT) $(INCDIR) $(O:.o=.c) \ - | sed 's#^.*: \(.*\)\.c#\1.o: \1.c#g' >depend.lnx - -$(O): %.o : %.c - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -$(LO): %.lo : %.c - $(CC) -c $(CCOPT) $(SHCCOPT) $(INCDIR) $*.c -o $*.lo - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c -o $*.s - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -include depend.lnx diff --git a/thirdparty/grx249/src/makefile.sdl b/thirdparty/grx249/src/makefile.sdl deleted file mode 100644 index 0e87cad..0000000 --- a/thirdparty/grx249/src/makefile.sdl +++ /dev/null @@ -1,223 +0,0 @@ -# -# GRX Library Makefile for SDL -# -.PHONY : clean cleanall install uninstall \ - install-bin uninstall-bin install-fonts uninstall-fonts - -GRXVSDL=y - -include ../makedefs.grx - -INCDIR= -I. -I./include -I../include - -ifeq ($(EP),x) - INCDIR += $(X11INCS) - SDLDEFS = -D__XWIN__ -D__SDL__ - LIBS = $(X11LIBS) - SDLLIBS = -lSDL -lpthread -else - EX = .exe - SDLDEFS = -D__SDL__ - LIBS = - SDLLIBS = -lSDL -endif - -CCOPT += $(SDLDEFS) - -ifdef GRX_DEFAULT_FONT_PATH -CCOPT += -DGRX_DEFAULT_FONT_PATH=\"$(GRX_DEFAULT_FONT_PATH)\" -endif - -TAG = $(ANY_GCC_SDL_STATIC) - -GRX20ST = ../lib/$(GRX_LIB_SUBDIR)/libgrx20S.a - -OX=.o -OP= - -include ./stdobjs.mak - -# Keep things a little smaller when building the lib ... -STD_Oa= $(STD_1) $(STD_2) $(STD_3) -STD_Ob= $(STD_4) $(STD_5) $(STD_6) -STD_Oc= $(STD_7) $(STD_8) $(STD_9) -STD_Od= $(STD_10) $(STD_11) $(STD_12) -BGI_Oa= $(BGI_1) $(BGI_2) $(BGI_3) -BGI_Ob= $(BGI_4) $(BGI_5) $(BGI_6) - -ADDON_O= -ifdef DEBUG - ADDON_O += $(DBG_1) -endif - -ifeq ($(HAVE_LIBTIFF),y) - ADDON_O += $(TIF_1) -endif - -ifeq ($(HAVE_LIBJPEG),y) - ADDON_O += $(JPG_1) -else - ADDON_O += $(NOJPG_1) -endif - -ifeq ($(HAVE_LIBPNG),y) - ADDON_O += $(PNG_1) -else - ADDON_O += $(NOPNG_1) -endif - -ifeq ($(INCLUDE_PRINTING_CODE),y) - ADDON_O += $(PRN_1) - INCDIR += -I../addons/print -ifeq ($(INCLUDE_BGI_SUPPORT),y) - BGI_Ob += $(PRNBGI_1) -endif -endif - -ifeq ($(INCLUDE_BMP_CODE),y) - ADDON_O += $(BMP_1) - INCDIR += -I../addons/bmp -endif - -SDL_O = $(ADDON_O) \ - fdrivers/sdl8.o \ - fdrivers/sdl16.o \ - fdrivers/sdl24.o \ - fdrivers/sdl32l.o \ - fdrivers/sdl32h.o \ - fdrivers/lfbbltrv.o \ - fdrivers/lfbbltvr.o \ - fdrivers/lfbbltvv.o \ - fdrivers/ram24.o \ - fdrivers/ram32l.o \ - fdrivers/ram32h.o \ - mouse/sdlinp.o \ - mouse/sdlkeys.o \ - misc/sdlmisc.o \ - vdrivers/vd_sdl.o - -ifneq ($(EX),.exe) - SDL_O += fonts/fdv_xwin.o -endif - -ALL_O = $(STD_Oa) $(STD_Ob) $(STD_Oc) $(STD_Od) $(SDL_O) - -ifeq ($(INCLUDE_BGI_SUPPORT),y) - ALL_O += $(BGI_Oa) $(BGI_Ob) -endif - -UTILPC= ../bin/bin2c$(EX) \ - ../bin/fnt2c$(EX) \ - -UTILPS= ../bin/$(EP)modetest$(EX) - -all: $(GRX20ST) $(UTILPC) $(UTILPS) - -clean: - rm -f bgi/*.o draw/*.o fdrivers/*.o fonts/*.o image/*.o gformats/*.o - rm -f mouse/*.o misc/*.o pattern/*.o setup/*.o shape/*.o text/*.o - rm -f user/*.o utils/*.o utilprog/*.o vdrivers/*.o wideline/*.o - rm -f ../addons/*.o ../addons/print/*.o ../addons/bmp/*.o $(TAG) - -cleanall: clean - rm -f $(GRX20ST) $(UTILPC) $(UTILPS) - -install: $(GRX20ST) - mkdir -p $(DESTDIR)$(libdir) - mkdir -p $(DESTDIR)$(includedir) - cp $(GRX20ST) $(DESTDIR)$(libdir) - cp ../include/grx20.h ../include/grxkeys.h \ - ../include/libbcc.h $(DESTDIR)$(includedir) -ifeq ($(INCLUDE_PRINTING_CODE),y) - cp ../addons/print/grxprint.h $(DESTDIR)$(includedir) -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - mkdir -p $(DESTDIR)$(unitsdir) - cp ../pascal/grx.pas ../pascal/bgi/graph.pas $(DESTDIR)$(unitsdir) -endif - -uninstall: - rm -f $(DESTDIR)$(libdir)/$(notdir $(GRX20ST)) $(DESTDIR)$(includedir)/grx20.h \ - $(DESTDIR)$(includedir)/grxkeys.h $(DESTDIR)$(includedir)/libbcc.h -ifeq ($(INCLUDE_PRINTING_CODE),y) - rm -f $(DESTDIR)$(includedir)/grxprint.h -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - rm -f $(DESTDIR)$(unitsdir)/grx.pas $(DESTDIR)$(unitsdir)/graph.pas -endif - -install-bin: $(UTILPC) $(UTILPW) - mkdir -p $(DESTDIR)$(bindir) - cp ../bin/bin2c$(EX) ../bin/fnt2c$(EX) \ - ../bin/$(EP)modetest$(EX) $(DESTDIR)$(bindir) - -uninstall-bin: - rm -f $(DESTDIR)$(bindir)/bin2c$(EX) $(DESTDIR)$(bindir)/fnt2c$(EX) \ - $(DESTDIR)$(bindir)/$(EP)modetest$(EX) - -ifdef GRX_DEFAULT_FONT_PATH -install-fonts: - mkdir -p $(DESTDIR)$(GRX_DEFAULT_FONT_PATH) - cp ../fonts/* $(DESTDIR)$(GRX_DEFAULT_FONT_PATH) - -uninstall-fonts: - rm -f $(DESTDIR)$(GRX_DEFAULT_FONT_PATH)/* -endif - -dep: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f depend.tmp -else - if exist depend.tmp del depend.tmp -endif - gcc -MM $(CCOPT) $(INCDIR) $(ALL_O:.o=.c) >depend.tmp - sed 's#^.*: \(.*\)\.c#\1.o: \1.c#g' depend.sdl -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f depend.tmp -else - if exist depend.tmp del depend.tmp -endif - -depend.b: depend.new - sed "s#\.o:#.obj:#g" depend.b - sed "s#\.o:#.asm:#g" >depend.b - -$(GRX20ST): $(TAG) $(ALL_O) - rm -f $(GRX20ST) - $(AR) -r $(GRX20ST) $(STD_Oa) - $(AR) -r $(GRX20ST) $(STD_Ob) - $(AR) -r $(GRX20ST) $(STD_Oc) - $(AR) -r $(GRX20ST) $(STD_Od) -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(AR) -r $(GRX20ST) $(BGI_Oa) - $(AR) -r $(GRX20ST) $(BGI_Ob) -endif - $(AR) -r $(GRX20ST) $(SDL_O) - $(RANLIB) $(GRX20ST) - -$(UTILPC): ../bin/%$(EX) : utilprog/%.o $(GRX20ST) - $(CC) $(LDOPT) -o $@ utilprog/$*.o $(GRX20ST) $(LIBS) - -$(UTILPS): ../bin/$(EP)%$(EX) : utilprog/%.o $(GRX20ST) - $(CC) $(LDOPT) -o $@ utilprog/$*.o $(GRX20ST) $(SDLLIBS) $(LIBS) - -$(ANY_GCC_SDL_STATIC): - $(MAKE) -f makefile.sdl clean - rm -f $(SYSTEM_TAG_PREFIX).* - echo ANY_GCC_SDL_STATIC_TARGET > $(ANY_GCC_SDL_STATIC) - -$(ALL_O): $(TAG) - -$(ALL_O:.o=.i) : %.i : %.c - $(CC) -E $(CCOPT) $(INCDIR) $*.c > $*.i - -$(ALL_O:.o=.dm) : %.dm : %.c - $(CC) -dM -E $(CCOPT) $(INCDIR) $*.c > $*.dm - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c -o $*.s - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -#include depend.sdl diff --git a/thirdparty/grx249/src/makefile.w32 b/thirdparty/grx249/src/makefile.w32 deleted file mode 100644 index 642c310..0000000 --- a/thirdparty/grx249/src/makefile.w32 +++ /dev/null @@ -1,303 +0,0 @@ -# -# GRX Library Makefile for Mingw -# Make sure your shell is command.com ! -# -.PHONY : clean cleanall install uninstall \ - install-bin uninstall-bin install-fonts uninstall-fonts - -GRXVW32=y - -include ../makedefs.grx - -INCDIR= -I. -I./include -I../include - -ifdef GRX_DEFAULT_FONT_PATH -CCOPT += -DGRX_DEFAULT_FONT_PATH=\"$(GRX_DEFAULT_FONT_PATH)\" -endif - -TAG = $(WIN32_GCC_i386_STATIC) - -GRX20ln = libgrx20.a -GRX20ST = ../lib/$(GRX_LIB_SUBDIR)/$(GRX20ln) -ifeq ($(HAVE_UNIX_TOOLS),n) -GRX20STdos = $(subst /,\,$(GRX20ST)) -DESTDIRdos = $(subst /,\,$(DESTDIR)) -libdirdos = $(subst /,\,$(libdir)) -includedirdos = $(subst /,\,$(includedir)) -unitsdirdos = $(subst /,\,$(unitsdir)) -infodirdos = $(subst /,\,$(infodir)) -endif - -OX=.o -OP= - -include ./stdobjs.mak - -# Keep things a little smaller when building the lib ... -STD_Oa= $(STD_1) $(STD_2) $(STD_3) -STD_Ob= $(STD_4) $(STD_5) $(STD_6) -STD_Oc= $(STD_7) $(STD_8) $(STD_9) -STD_Od= $(STD_10) $(STD_11) $(STD_12) -BGI_Oa= $(BGI_1) $(BGI_2) $(BGI_3) -BGI_Ob= $(BGI_4) $(BGI_5) $(BGI_6) - -ADDON_O= -ifdef DEBUG - ADDON_O += $(DBG_1) -endif - -ifeq ($(HAVE_LIBTIFF),y) - ADDON_O += $(TIF_1) -endif - -ifeq ($(HAVE_LIBJPEG),y) - ADDON_O += $(JPG_1) -else - ADDON_O += $(NOJPG_1) -endif - -ifeq ($(HAVE_LIBPNG),y) - ADDON_O += $(PNG_1) -else - ADDON_O += $(NOPNG_1) -endif - -ifeq ($(INCLUDE_PRINTING_CODE),y) - ADDON_O += $(PRN_1) - INCDIR += -I../addons/print -ifeq ($(INCLUDE_BGI_SUPPORT),y) - BGI_Ob += $(PRNBGI_1) -endif -endif - -ifeq ($(INCLUDE_BMP_CODE),y) - ADDON_O += $(BMP_1) - INCDIR += -I../addons/bmp -endif - -W32_O = $(ADDON_O) \ - fdrivers/fdw32_24.o \ - fdrivers/fdw32_8.o \ - fdrivers/lfbbltrv.o \ - fdrivers/lfbbltvr.o \ - fdrivers/lfbbltvv.o \ - fdrivers/ram24.o \ - fdrivers/ram32l.o \ - fdrivers/ram32h.o \ - mouse/w32inp.o \ - mouse/w32keys.o \ - misc/w32misc.o \ - vdrivers/vd_win32.o - -ALL_O = $(STD_Oa) $(STD_Ob) $(STD_Oc) $(STD_Od) $(W32_O) - -ifeq ($(INCLUDE_BGI_SUPPORT),y) - ALL_O += $(BGI_Oa) $(BGI_Ob) -endif - -UTILPC= ../bin/bin2c.exe \ - ../bin/fnt2c.exe \ - -UTILPW= ../bin/modetest.exe - -all: $(GRX20ST) $(UTILPC) $(UTILPW) - -clean: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f */*.o ../addons/*.o ../addons/*/*.o $(TAG) -else - if exist bgi\*.o del bgi\*.o - if exist draw\*.o del draw\*.o - if exist fdrivers\*.o del fdrivers\*.o - if exist fonts\*.o del fonts\*.o - if exist image\*.o del image\*.o - if exist gformats\*.o del gformats\*.o - if exist mouse\*.o del mouse\*.o - if exist misc\*.o del misc\*.o - if exist pattern\*.o del pattern\*.o - if exist setup\*.o del setup\*.o - if exist shape\*.o del shape\*.o - if exist text\*.o del text\*.o - if exist user\*.o del user\*.o - if exist utils\*.o del utils\*.o - if exist utilprog\*.o del utilprog\*.o - if exist vdrivers\*.o del vdrivers\*.o - if exist wideline\*.o del wideline\*.o - if exist ..\addons\*.o del ..\addons\*.o - if exist ..\addons\print\*.o del ..\addons\print\*.o - if exist ..\addons\bmp\*.o del ..\addons\bmp\*.o - if exist $(TAG) del $(TAG) -endif - -cleanall: clean -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f $(GRX20STdos) ../bin/*.exe -else - if exist $(GRX20STdos) del $(GRX20STdos) - if exist ..\bin\*.exe del ..\bin\*.exe -endif - -install: $(GRX20ST) -ifeq ($(HAVE_UNIX_TOOLS),y) - mkdir -p $(DESTDIR)$(libdir) - mkdir -p $(DESTDIR)$(includedir) - cp $(GRX20ST) $(DESTDIR)$(libdir) - cp ../include/grx20.h ../include/grxkeys.h \ - ../include/libbcc.h $(DESTDIR)$(includedir) -ifeq ($(INCLUDE_PRINTING_CODE),y) - cp ../addons/print/grxprint.h $(DESTDIR)$(includedir) -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - mkdir -p $(DESTDIR)$(unitsdir) - cp ../pascal/grx.pas ../pascal/bgi/graph.pas $(DESTDIR)$(unitsdir) -endif -else - if not exist $(DESTDIRdos)\nul mkdir $(DESTDIRdos) - if not exist $(DESTDIRdos)$(libdirdos)\nul mkdir $(DESTDIRdos)$(libdirdos) - if not exist $(DESTDIRdos)$(includedirdos)\nul mkdir $(DESTDIRdos)$(includedirdos) - copy $(GRX20STdos) $(DESTDIRdos)$(libdirdos) - copy ..\include\grx20.h $(DESTDIRdos)$(includedirdos) - copy ..\include\grxkeys.h $(DESTDIRdos)$(includedirdos) - copy ..\include\libbcc.h $(DESTDIRdos)$(includedirdos) -ifeq ($(INCLUDE_PRINTING_CODE),y) - copy ..\addons\print\grxprint.h $(DESTDIRdos)$(includedirdos) -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - if not exist $(DESTDIRdos)$(unitsdirdos)\nul mkdir $(DESTDIRdos)$(unitsdirdos) - copy ..\pascal\grx.pas $(DESTDIRdos)$(unitsdirdos) - copy ..\pascal\bgi\graph.pas $(DESTDIRdos)$(unitsdirdos) -endif -endif - -uninstall: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f $(DESTDIR)$(libdir)/$(GRX20ln) $(DESTDIR)$(includedir)/grx20.h \ - $(DESTDIR)$(includedir)/grxkeys.h $(DESTDIR)$(includedir)/libbcc.h -ifeq ($(INCLUDE_PRINTING_CODE),y) - rm -f $(DESTDIR)$(includedir)/grxprint.h -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - rm -f $(DESTDIR)$(unitsdir)/grx.pas $(DESTDIR)$(unitsdir)/graph.pas -endif -else - if exist $(DESTDIRdos)$(libdirdos)\$(GRX20ln) del $(DESTDIRdos)$(libdirdos)\$(GRX20ln) - if exist $(DESTDIRdos)$(includedirdos)\grx20.h del $(DESTDIRdos)$(includedirdos)\grx20.h - if exist $(DESTDIRdos)$(includedirdos)\grxkeys.h del $(DESTDIRdos)$(includedirdos)\grxkeys.h - if exist $(DESTDIRdos)$(includedirdos)\libbcc.h del $(DESTDIRdos)$(includedirdos)\libbcc.h -ifeq ($(INCLUDE_PRINTING_CODE),y) - if exist $(DESTDIRdos)$(includedirdos)\grxprint.h del $(DESTDIRdos)$(includedirdos)\grxprint.h -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - if exist $(DESTDIRdos)$(unitsdirdos)\grx.pas del $(DESTDIRdos)$(unitsdirdos)\grx.pas - if exist $(DESTDIRdos)$(unitsdirdos)\graph.pas del $(DESTDIRdos)$(unitsdirdos)\graph.pas -endif -endif - -install-bin: $(UTILP) -ifeq ($(HAVE_UNIX_TOOLS),y) - mkdir -p $(DESTDIR)$(bindir) - cp ../bin/bin2c.exe ../bin/fnt2c.exe \ - ../bin/modetest.exe $(DESTDIR)$(bindir) -else - if not exist $(DESTDIRdos)$(bindirdos)\nul mkdir $(DESTDIRdos)$(bindirdos) - copy ..\bin\bin2c.exe $(DESTDIRdos)$(bindirdos) - copy ..\bin\fnt2c.exe $(DESTDIRdos)$(bindirdos) - copy ..\bin\modetest.exe $(DESTDIRdos)$(bindirdos) -endif - -uninstall-bin: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f $(DESTDIR)$(bindir)/bin2c.exe $(DESTDIR)$(bindir)/fnt2c.exe \ - $(DESTDIR)$(bindir)/modetest.exe -else - if exist $(DESTDIRdos)$(bindirdos)\bin2c.exe del $(DESTDIRdos)$(bindirdos)\bin2c.exe - if exist $(DESTDIRdos)$(bindirdos)\fnt2c.exe del $(DESTDIRdos)$(bindirdos)\fnt2c.exe - if exist $(DESTDIRdos)$(bindirdos)\modetest.exe del $(DESTDIRdos)$(bindirdos)\modetest.exe -endif - -ifdef GRX_DEFAULT_FONT_PATH -ifeq ($(HAVE_UNIX_TOOLS),n) -FONTPATHdos = $(subst /,\,$(GRX_DEFAULT_FONT_PATH)) -endif -install-fonts: -ifeq ($(HAVE_UNIX_TOOLS),y) - mkdir -p $(DESTDIR)$(GRX_DEFAULT_FONT_PATH) - cp ../fonts/* $(DESTDIR)$(GRX_DEFAULT_FONT_PATH) -else - if not exist $(DESTDIRdos)$(FONTPATHdos)\nul mkdir $(DESTDIRdos)$(FONTPATHdos) - copy ..\fonts\*.* $(DESTDIRdos)$(FONTPATHdos) -endif -uninstall-fonts: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f $(DESTDIR)$(GRX_DEFAULT_FONT_PATH)/* -else - del $(DESTDIRdos)$(FONTPATHdos)\*.* -endif -endif - -dep: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f depend.tmp -else - if exist depend.tmp del depend.tmp -endif - $(CC) -MM $(CCOPT) $(INCDIR) $(ALL_O:.o=.c) >depend.tmp - sed 's#^.*: \(.*\)\.c#\1.o: \1.c#g' depend.w32 -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f depend.tmp -else - if exist depend.tmp del depend.tmp -endif - -depend.b: depend.new - sed "s#\.o:#.obj:#g" depend.b - sed "s#\.o:#.asm:#g" >depend.b - -$(GRX20ST): $(TAG) $(ALL_O) -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f $(GRX20ST) -else - if exist $(GRX20STdos) del $(GRX20STdos) -endif - $(AR) -r $(GRX20ST) $(STD_Oa) - $(AR) -r $(GRX20ST) $(STD_Ob) - $(AR) -r $(GRX20ST) $(STD_Oc) - $(AR) -r $(GRX20ST) $(STD_Od) -ifeq ($(INCLUDE_BGI_SUPPORT),y) - $(AR) -r $(GRX20ST) $(BGI_Oa) - $(AR) -r $(GRX20ST) $(BGI_Ob) -endif - $(AR) -r $(GRX20ST) $(W32_O) - $(RANLIB) $(GRX20ST) - -$(UTILPC): ../bin/%.exe : utilprog/%.o $(GRX20ST) - $(CC) $(LDOPT) -o $@ utilprog/$*.o $(GRX20ST) - -$(UTILPW): ../bin/%.exe : utilprog/%.o $(GRX20ST) - $(CC) $(LDOPT) -o $@ utilprog/$*.o $(GRX20ST) -mwindows -mconsole - -$(WIN32_GCC_i386_STATIC): - $(MAKE) -f makefile.w32 clean -ifeq ($(HAVE_UNIX_TOOLS),y) - if [ ! -r $(WIN32_GCC_i386_STATIC) ]; then \ - rm -f $(SYSTEM_TAG_PREFIX).*; fi -else - if not exist $(WIN32_GCC_i386_STATIC) del $(SYSTEM_TAG_PREFIX).* -endif - echo WIN32_GCC_i386_STATIC_TARGET > $(WIN32_GCC_i386_STATIC) - -$(ALL_O): $(TAG) - -$(ALL_O:.o=.i) : %.i : %.c - $(CC) -E $(CCOPT) $(INCDIR) $*.c > $*.i - -$(ALL_O:.o=.dm) : %.dm : %.c - $(CC) -dM -E $(CCOPT) $(INCDIR) $*.c > $*.dm - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c -o $*.s - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -#include depend.w32 diff --git a/thirdparty/grx249/src/makefile.wat b/thirdparty/grx249/src/makefile.wat deleted file mode 100644 index e0b8db4..0000000 --- a/thirdparty/grx249/src/makefile.wat +++ /dev/null @@ -1,1188 +0,0 @@ -!define BLANK "" - -## Object Files -OBJS = .\bmp.obj .\grxprint.obj .\prndata.obj .\bitblt.obj .\bitbltnc.obj & - .\box.obj .\boxnc.obj .\clearclp.obj .\clearctx.obj .\clearscr.obj & - .\drwinlne.obj .\fillbox.obj .\fillboxn.obj .\frambox.obj .\framboxn.obj & - .\getscl.obj .\line.obj .\linenc.obj .\majorln1.obj .\majorln2.obj & - .\majorln3.obj .\majorln4.obj .\pixel.obj .\pixelc.obj .\plot.obj & - .\putscl.obj .\dotab8.obj .\ega4.obj .\egavga1.obj .\ftable.obj & - .\genblit.obj .\gengiscl.obj .\genptscl.obj .\genstrch.obj .\herc1.obj & - .\lfb16.obj .\lfb24.obj .\lfb32h.obj .\lfb32l.obj .\lfb8.obj & - .\lfbbltrv.obj .\lfbbltvr.obj .\lfbbltvv.obj .\pblitr2r.obj .\pblitr2v.obj & - .\pblitv2r.obj .\pblitv2v.obj .\ram1.obj .\ram16.obj .\ram24.obj & - .\ram32h.obj .\ram32l.obj .\ram4.obj .\ram8.obj .\rblit_14.obj & - .\svga16.obj .\svga24.obj .\svga32h.obj .\svga32l.obj .\svga4.obj & - .\svga8.obj .\vga8x.obj .\fdtable.obj .\fdv_bgi.obj .\fdv_grx.obj & - .\pc6x8.obj .\pc8x14.obj .\pc8x16.obj .\pc8x8.obj .\ialloc.obj & - .\ibuild.obj .\ifbox.obj .\ihline.obj .\iinverse.obj .\imginlne.obj & - .\iplot.obj .\istretch.obj .\bldcurs.obj .\dosinput.obj .\doskeys.obj & - .\drawcurs.obj .\mouinfo.obj .\mouinlne.obj .\mscursor.obj .\fillpatt.obj & - .\makepat.obj .\patfbits.obj .\patfbox.obj .\patfcvxp.obj .\patfline.obj & - .\patfplot.obj .\patfpoly.obj .\patternf.obj .\pattfldf.obj .\pattline.obj & - .\pattpoly.obj .\pfcirc.obj .\pfcirca.obj .\pfelli.obj .\pfellia.obj & - .\ptcirc.obj .\ptcirca.obj .\ptelli.obj .\ptellia.obj .\clip.obj & - .\clrinfo.obj .\clrinlne.obj .\colorbw.obj .\colorega.obj .\colors.obj & - .\context.obj .\cxtinfo.obj .\cxtinlne.obj .\drvinfo.obj .\drvinlne.obj & - .\fframe.obj .\fgeom.obj .\hooks.obj .\modewalk.obj .\setdrvr.obj & - .\setmode.obj .\version.obj .\viewport.obj .\circle1.obj .\circle2.obj & - .\circle3.obj .\circle4.obj .\drawpoly.obj .\fillcir1.obj .\fillcir2.obj & - .\fillcnvx.obj .\fillell1.obj .\fillell2.obj .\fillpoly.obj .\flood.obj & - .\floodfil.obj .\genellip.obj .\polygon.obj .\polyline.obj .\scancnvx.obj & - .\scanellp.obj .\scanpoly.obj .\solidfil.obj .\buildaux.obj .\buildfnt.obj & - .\convfont.obj .\drawstrg.obj .\drawtext.obj .\drwstrg.obj .\dumpfont.obj & - .\dumptext.obj .\epatstrg.obj .\fntinlne.obj .\fontinfo.obj .\fontpath.obj & - .\loadfont.obj .\pattstrg.obj .\propwdt.obj .\unloadfn.obj .\ubox.obj & - .\ucbox.obj .\uccirc.obj .\uccirca.obj .\ucelli.obj .\ucellia.obj & - .\ucirc.obj .\ucirca.obj .\ucircf.obj .\ucircfa.obj .\ucline.obj & - .\ucpolyg.obj .\ucpolyl.obj .\udrwchar.obj .\udrwstrg.obj .\uelli.obj & - .\uellia.obj .\uellif.obj .\uellifa.obj .\ufcpolyg.obj .\ufillbox.obj & - .\uflood.obj .\ufpolyg.obj .\uframbox.obj .\ugetwin.obj .\uhline.obj & - .\uline.obj .\upbox.obj .\upcirc.obj .\upcirca.obj .\upelli.obj & - .\upellia.obj .\upfbox.obj .\upfcirc.obj .\upfcirca.obj .\upfcpoly.obj & - .\upfelli.obj .\upfellia.obj .\upfflood.obj .\upfline.obj .\upfplot.obj & - .\upfpolyg.obj .\upixel.obj .\upixelc.obj .\upline.obj .\uplot.obj & - .\upolygon.obj .\upolylin.obj .\uppolyg.obj .\uppolyl.obj .\usercord.obj & - .\usetwin.obj .\utextxy.obj .\uvline.obj .\ordswap.obj .\resize.obj & - .\shiftscl.obj .\strmatch.obj .\tmpbuff.obj .\watcom32.obj .\ati28800.obj & - .\cl5426.obj .\et4000.obj .\herc.obj .\mach64.obj .\s3.obj .\stdega.obj & - .\stdvga.obj .\u_egavga.obj .\u_vesa.obj .\u_vsvirt.obj .\vd_mem.obj & - .\vesa.obj .\vtable.obj .\ccirc.obj .\ccirca.obj .\celli.obj .\cellia.obj & - .\custbox.obj .\custline.obj .\custplne.obj .\custpoly.obj .\drwcpoly.obj - -OBJS += .\arc.obj .\aspectra.obj .\bar.obj .\bar3d.obj .\bccgrx.obj & - .\bgimode.obj .\circle.obj .\clearvp.obj .\closegra.obj & - .\clrdev.obj .\detectg.obj .\drvname.obj .\egacolor.obj .\ellipse.obj & - .\errmsg.obj .\fellipse.obj .\fillpatt.obj .\fillpoly.obj .\fillstyl.obj & - .\fldfill.obj .\getbkcol.obj .\getcol.obj .\getdefpa.obj .\getfillp.obj & - .\getfills.obj .\getgramo.obj .\getimage.obj .\getmaxmo.obj .\getmoran.obj & - .\getpixel.obj .\getviewp.obj .\getx.obj .\gety.obj .\gmaxcol.obj & - .\gmmaxcol.obj .\gmmaxx.obj .\gmmaxy.obj .\gpalsize.obj .\graphres.obj & - .\imagesze.obj .\instbgid.obj .\line.obj .\linerel.obj .\lineto.obj & - .\lnestyle.obj .\modename.obj .\moverel.obj .\moveto.obj .\page1.obj & - .\page2.obj .\page3.obj .\page4.obj .\page5.obj .\page6.obj .\palette.obj & - .\pieslice.obj .\polygon.obj .\putimage.obj .\putpixel.obj .\rectang.obj & - .\regbgidr.obj .\rgbpal_g.obj .\rgbpal_s.obj .\rstcrtmd.obj .\sector.obj & - .\setbgiwh.obj .\setbkcol.obj .\setbusze.obj .\setcolor.obj .\setrgbc.obj & - .\setviewp.obj .\setwrmod.obj .\text.obj .\text1.obj .\text2.obj & - .\text3.obj .\text4.obj .\text5.obj .\text6.obj .\text7.obj .\text8.obj & - .\text9.obj .\texta.obj .\textb.obj .\textc.obj .\textd.obj .\txtlnest.obj & - .\bgiext01.obj .\bgiext01.obj - -!ifdef DEBUG -OBJS += .\dbgprint.obj -!endif -OBJS += .AUTODEPEND - -## implicit rules do not seem to work with wmake - it complains about -## no default action??? -.c.obj: - $(CC) $[@ $(CC_OPTS) - -## Rules -.\bmp.obj : .\addons\bmp\bmp.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\grxprint.obj : .\addons\print\grxprint.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\prndata.obj : .\addons\print\prndata.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bitblt.obj : .\src\draw\bitblt.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bitbltnc.obj : .\src\draw\bitbltnc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\box.obj : .\src\draw\box.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\boxnc.obj : .\src\draw\boxnc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\clearclp.obj : .\src\draw\clearclp.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\clearctx.obj : .\src\draw\clearctx.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\clearscr.obj : .\src\draw\clearscr.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\drwinlne.obj : .\src\draw\drwinlne.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillbox.obj : .\src\draw\fillbox.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillboxn.obj : .\src\draw\fillboxn.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\frambox.obj : .\src\draw\frambox.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\framboxn.obj : .\src\draw\framboxn.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getscl.obj : .\src\draw\getscl.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\line.obj : .\src\draw\line.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\linenc.obj : .\src\draw\linenc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\majorln1.obj : .\src\draw\majorln1.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\majorln2.obj : .\src\draw\majorln2.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\majorln3.obj : .\src\draw\majorln3.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\majorln4.obj : .\src\draw\majorln4.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pixel.obj : .\src\draw\pixel.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pixelc.obj : .\src\draw\pixelc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\plot.obj : .\src\draw\plot.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\putscl.obj : .\src\draw\putscl.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\dotab8.obj : .\src\fdrivers\dotab8.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ega4.obj : .\src\fdrivers\ega4.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\egavga1.obj : .\src\fdrivers\egavga1.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ftable.obj : .\src\fdrivers\ftable.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\genblit.obj : .\src\fdrivers\genblit.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\gengiscl.obj : .\src\fdrivers\gengiscl.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\genptscl.obj : .\src\fdrivers\genptscl.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\genstrch.obj : .\src\fdrivers\genstrch.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\herc1.obj : .\src\fdrivers\herc1.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\lfb16.obj : .\src\fdrivers\lfb16.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\lfb24.obj : .\src\fdrivers\lfb24.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\lfb32h.obj : .\src\fdrivers\lfb32h.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\lfb32l.obj : .\src\fdrivers\lfb32l.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\lfb8.obj : .\src\fdrivers\lfb8.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\lfbbltrv.obj : .\src\fdrivers\lfbbltrv.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\lfbbltvr.obj : .\src\fdrivers\lfbbltvr.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\lfbbltvv.obj : .\src\fdrivers\lfbbltvv.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pblitr2r.obj : .\src\fdrivers\pblitr2r.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pblitr2v.obj : .\src\fdrivers\pblitr2v.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pblitv2r.obj : .\src\fdrivers\pblitv2r.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pblitv2v.obj : .\src\fdrivers\pblitv2v.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ram1.obj : .\src\fdrivers\ram1.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ram16.obj : .\src\fdrivers\ram16.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ram24.obj : .\src\fdrivers\ram24.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ram32h.obj : .\src\fdrivers\ram32h.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ram32l.obj : .\src\fdrivers\ram32l.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ram4.obj : .\src\fdrivers\ram4.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ram8.obj : .\src\fdrivers\ram8.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\rblit_14.obj : .\src\fdrivers\rblit_14.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\svga16.obj : .\src\fdrivers\svga16.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\svga24.obj : .\src\fdrivers\svga24.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\svga32h.obj : .\src\fdrivers\svga32h.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\svga32l.obj : .\src\fdrivers\svga32l.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\svga4.obj : .\src\fdrivers\svga4.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\svga8.obj : .\src\fdrivers\svga8.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\vga8x.obj : .\src\fdrivers\vga8x.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fdtable.obj : .\src\fonts\fdtable.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fdv_bgi.obj : .\src\fonts\fdv_bgi.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fdv_grx.obj : .\src\fonts\fdv_grx.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pc6x8.obj : .\src\fonts\pc6x8.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pc8x14.obj : .\src\fonts\pc8x14.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pc8x16.obj : .\src\fonts\pc8x16.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pc8x8.obj : .\src\fonts\pc8x8.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ialloc.obj : .\src\image\ialloc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ibuild.obj : .\src\image\ibuild.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ifbox.obj : .\src\image\ifbox.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ihline.obj : .\src\image\ihline.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\iinverse.obj : .\src\image\iinverse.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\imginlne.obj : .\src\image\imginlne.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\iplot.obj : .\src\image\iplot.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\istretch.obj : .\src\image\istretch.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bldcurs.obj : .\src\mouse\bldcurs.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\dosinput.obj : .\src\mouse\dosinput.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\doskeys.obj : .\src\mouse\doskeys.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\drawcurs.obj : .\src\mouse\drawcurs.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\mouinfo.obj : .\src\mouse\mouinfo.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\mouinlne.obj : .\src\mouse\mouinlne.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\mscursor.obj : .\src\mouse\mscursor.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillpatt.obj : .\src\pattern\fillpatt.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\makepat.obj : .\src\pattern\makepat.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\patfbits.obj : .\src\pattern\patfbits.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\patfbox.obj : .\src\pattern\patfbox.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\patfcvxp.obj : .\src\pattern\patfcvxp.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\patfline.obj : .\src\pattern\patfline.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\patfplot.obj : .\src\pattern\patfplot.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\patfpoly.obj : .\src\pattern\patfpoly.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\patternf.obj : .\src\pattern\patternf.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pattfldf.obj : .\src\pattern\pattfldf.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pattline.obj : .\src\pattern\pattline.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pattpoly.obj : .\src\pattern\pattpoly.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pfcirc.obj : .\src\pattern\pfcirc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pfcirca.obj : .\src\pattern\pfcirca.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pfelli.obj : .\src\pattern\pfelli.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pfellia.obj : .\src\pattern\pfellia.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ptcirc.obj : .\src\pattern\ptcirc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ptcirca.obj : .\src\pattern\ptcirca.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ptelli.obj : .\src\pattern\ptelli.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ptellia.obj : .\src\pattern\ptellia.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\clip.obj : .\src\setup\clip.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\clrinfo.obj : .\src\setup\clrinfo.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\clrinlne.obj : .\src\setup\clrinlne.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\colorbw.obj : .\src\setup\colorbw.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\colorega.obj : .\src\setup\colorega.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\colors.obj : .\src\setup\colors.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\context.obj : .\src\setup\context.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\cxtinfo.obj : .\src\setup\cxtinfo.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\cxtinlne.obj : .\src\setup\cxtinlne.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\drvinfo.obj : .\src\setup\drvinfo.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\drvinlne.obj : .\src\setup\drvinlne.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fframe.obj : .\src\setup\fframe.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fgeom.obj : .\src\setup\fgeom.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\hooks.obj : .\src\setup\hooks.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\modewalk.obj : .\src\setup\modewalk.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\setdrvr.obj : .\src\setup\setdrvr.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\setmode.obj : .\src\setup\setmode.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\version.obj : .\src\setup\version.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\viewport.obj : .\src\setup\viewport.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\circle1.obj : .\src\shape\circle1.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\circle2.obj : .\src\shape\circle2.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\circle3.obj : .\src\shape\circle3.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\circle4.obj : .\src\shape\circle4.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\drawpoly.obj : .\src\shape\drawpoly.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillcir1.obj : .\src\shape\fillcir1.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillcir2.obj : .\src\shape\fillcir2.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillcnvx.obj : .\src\shape\fillcnvx.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillell1.obj : .\src\shape\fillell1.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillell2.obj : .\src\shape\fillell2.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillpoly.obj : .\src\shape\fillpoly.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\flood.obj : .\src\shape\flood.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\floodfil.obj : .\src\shape\floodfil.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\genellip.obj : .\src\shape\genellip.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\polygon.obj : .\src\shape\polygon.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\polyline.obj : .\src\shape\polyline.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\scancnvx.obj : .\src\shape\scancnvx.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\scanellp.obj : .\src\shape\scanellp.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\scanpoly.obj : .\src\shape\scanpoly.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\solidfil.obj : .\src\shape\solidfil.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\buildaux.obj : .\src\text\buildaux.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\buildfnt.obj : .\src\text\buildfnt.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\convfont.obj : .\src\text\convfont.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\drawstrg.obj : .\src\text\drawstrg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\drawtext.obj : .\src\text\drawtext.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\drwstrg.obj : .\src\text\drwstrg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\dumpfont.obj : .\src\text\dumpfont.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\dumptext.obj : .\src\text\dumptext.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\epatstrg.obj : .\src\text\epatstrg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fntinlne.obj : .\src\text\fntinlne.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fontinfo.obj : .\src\text\fontinfo.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fontpath.obj : .\src\text\fontpath.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\loadfont.obj : .\src\text\loadfont.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pattstrg.obj : .\src\text\pattstrg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\propwdt.obj : .\src\text\propwdt.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\unloadfn.obj : .\src\text\unloadfn.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ubox.obj : .\src\user\ubox.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ucbox.obj : .\src\user\ucbox.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uccirc.obj : .\src\user\uccirc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uccirca.obj : .\src\user\uccirca.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ucelli.obj : .\src\user\ucelli.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ucellia.obj : .\src\user\ucellia.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ucirc.obj : .\src\user\ucirc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ucirca.obj : .\src\user\ucirca.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ucircf.obj : .\src\user\ucircf.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ucircfa.obj : .\src\user\ucircfa.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ucline.obj : .\src\user\ucline.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ucpolyg.obj : .\src\user\ucpolyg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ucpolyl.obj : .\src\user\ucpolyl.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\udrwchar.obj : .\src\user\udrwchar.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\udrwstrg.obj : .\src\user\udrwstrg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uelli.obj : .\src\user\uelli.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uellia.obj : .\src\user\uellia.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uellif.obj : .\src\user\uellif.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uellifa.obj : .\src\user\uellifa.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ufcpolyg.obj : .\src\user\ufcpolyg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ufillbox.obj : .\src\user\ufillbox.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uflood.obj : .\src\user\uflood.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ufpolyg.obj : .\src\user\ufpolyg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uframbox.obj : .\src\user\uframbox.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ugetwin.obj : .\src\user\ugetwin.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uhline.obj : .\src\user\uhline.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uline.obj : .\src\user\uline.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upbox.obj : .\src\user\upbox.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upcirc.obj : .\src\user\upcirc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upcirca.obj : .\src\user\upcirca.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upelli.obj : .\src\user\upelli.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upellia.obj : .\src\user\upellia.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upfbox.obj : .\src\user\upfbox.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upfcirc.obj : .\src\user\upfcirc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upfcirca.obj : .\src\user\upfcirca.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upfcpoly.obj : .\src\user\upfcpoly.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upfelli.obj : .\src\user\upfelli.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upfellia.obj : .\src\user\upfellia.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upfflood.obj : .\src\user\upfflood.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upfline.obj : .\src\user\upfline.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upfplot.obj : .\src\user\upfplot.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upfpolyg.obj : .\src\user\upfpolyg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upixel.obj : .\src\user\upixel.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upixelc.obj : .\src\user\upixelc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upline.obj : .\src\user\upline.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uplot.obj : .\src\user\uplot.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upolygon.obj : .\src\user\upolygon.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\upolylin.obj : .\src\user\upolylin.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uppolyg.obj : .\src\user\uppolyg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uppolyl.obj : .\src\user\uppolyl.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\usercord.obj : .\src\user\usercord.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\usetwin.obj : .\src\user\usetwin.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\utextxy.obj : .\src\user\utextxy.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\uvline.obj : .\src\user\uvline.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ordswap.obj : .\src\utils\ordswap.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\resize.obj : .\src\utils\resize.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\shiftscl.obj : .\src\utils\shiftscl.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\strmatch.obj : .\src\utils\strmatch.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\tmpbuff.obj : .\src\utils\tmpbuff.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\watcom32.obj : .\src\utils\watcom32.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ati28800.obj : .\src\vdrivers\ati28800.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\cl5426.obj : .\src\vdrivers\cl5426.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\et4000.obj : .\src\vdrivers\et4000.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\herc.obj : .\src\vdrivers\herc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\mach64.obj : .\src\vdrivers\mach64.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\s3.obj : .\src\vdrivers\s3.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\stdega.obj : .\src\vdrivers\stdega.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\stdvga.obj : .\src\vdrivers\stdvga.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\u_egavga.obj : .\src\vdrivers\u_egavga.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\u_vesa.obj : .\src\vdrivers\u_vesa.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\u_vsvirt.obj : .\src\vdrivers\u_vsvirt.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\vd_mem.obj : .\src\vdrivers\vd_mem.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\vesa.obj : .\src\vdrivers\vesa.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\vtable.obj : .\src\vdrivers\vtable.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ccirc.obj : .\src\wideline\ccirc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ccirca.obj : .\src\wideline\ccirca.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\celli.obj : .\src\wideline\celli.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\cellia.obj : .\src\wideline\cellia.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\custbox.obj : .\src\wideline\custbox.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\custline.obj : .\src\wideline\custline.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\custplne.obj : .\src\wideline\custplne.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\custpoly.obj : .\src\wideline\custpoly.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\drwcpoly.obj : .\src\wideline\drwcpoly.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\dbgprint.obj : .\src\utils\dbgprint.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\arc.obj : .\src\bgi\arc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\aspectra.obj : .\src\bgi\aspectra.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bar.obj : .\src\bgi\bar.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bar3d.obj : .\src\bgi\bar3d.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bccgrx.obj : .\src\bgi\bccgrx.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bgimode.obj : .\src\bgi\bgimode.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\circle.obj : .\src\bgi\circle.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\clearvp.obj : .\src\bgi\clearvp.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\closegra.obj : .\src\bgi\closegra.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\clrdev.obj : .\src\bgi\clrdev.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\detectg.obj : .\src\bgi\detectg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\drvname.obj : .\src\bgi\drvname.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\egacolor.obj : .\src\bgi\egacolor.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ellipse.obj : .\src\bgi\ellipse.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\errmsg.obj : .\src\bgi\errmsg.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fellipse.obj : .\src\bgi\fellipse.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillpatt.obj : .\src\bgi\fillpatt.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillpoly.obj : .\src\bgi\fillpoly.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fillstyl.obj : .\src\bgi\fillstyl.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fldfill.obj : .\src\bgi\fldfill.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getbkcol.obj : .\src\bgi\getbkcol.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getcol.obj : .\src\bgi\getcol.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getdefpa.obj : .\src\bgi\getdefpa.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getfillp.obj : .\src\bgi\getfillp.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getfills.obj : .\src\bgi\getfills.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getgramo.obj : .\src\bgi\getgramo.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getimage.obj : .\src\bgi\getimage.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getmaxmo.obj : .\src\bgi\getmaxmo.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getmoran.obj : .\src\bgi\getmoran.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getpixel.obj : .\src\bgi\getpixel.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getviewp.obj : .\src\bgi\getviewp.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\getx.obj : .\src\bgi\getx.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\gety.obj : .\src\bgi\gety.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\gmaxcol.obj : .\src\bgi\gmaxcol.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\gmmaxcol.obj : .\src\bgi\gmmaxcol.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\gmmaxx.obj : .\src\bgi\gmmaxx.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\gmmaxy.obj : .\src\bgi\gmmaxy.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\gpalsize.obj : .\src\bgi\gpalsize.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\graphres.obj : .\src\bgi\graphres.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\imagesze.obj : .\src\bgi\imagesze.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\instbgid.obj : .\src\bgi\instbgid.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\line.obj : .\src\bgi\line.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\linerel.obj : .\src\bgi\linerel.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\lineto.obj : .\src\bgi\lineto.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\lnestyle.obj : .\src\bgi\lnestyle.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\modename.obj : .\src\bgi\modename.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\moverel.obj : .\src\bgi\moverel.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\moveto.obj : .\src\bgi\moveto.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\page1.obj : .\src\bgi\page1.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\page2.obj : .\src\bgi\page2.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\page3.obj : .\src\bgi\page3.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\page4.obj : .\src\bgi\page4.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\page5.obj : .\src\bgi\page5.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\page6.obj : .\src\bgi\page6.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\palette.obj : .\src\bgi\palette.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pieslice.obj : .\src\bgi\pieslice.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\polygon.obj : .\src\bgi\polygon.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\putimage.obj : .\src\bgi\putimage.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\putpixel.obj : .\src\bgi\putpixel.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\rectang.obj : .\src\bgi\rectang.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\regbgidr.obj : .\src\bgi\regbgidr.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\rgbpal_g.obj : .\src\bgi\rgbpal_g.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\rgbpal_s.obj : .\src\bgi\rgbpal_s.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\rstcrtmd.obj : .\src\bgi\rstcrtmd.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\sector.obj : .\src\bgi\sector.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\setbgiwh.obj : .\src\bgi\setbgiwh.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\setbkcol.obj : .\src\bgi\setbkcol.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\setbusze.obj : .\src\bgi\setbusze.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\setcolor.obj : .\src\bgi\setcolor.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\setrgbc.obj : .\src\bgi\setrgbc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\setviewp.obj : .\src\bgi\setviewp.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\setwrmod.obj : .\src\bgi\setwrmod.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\text.obj : .\src\bgi\text.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\text1.obj : .\src\bgi\text1.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\text2.obj : .\src\bgi\text2.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\text3.obj : .\src\bgi\text3.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\text4.obj : .\src\bgi\text4.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\text5.obj : .\src\bgi\text5.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\text6.obj : .\src\bgi\text6.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\text7.obj : .\src\bgi\text7.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\text8.obj : .\src\bgi\text8.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\text9.obj : .\src\bgi\text9.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\texta.obj : .\src\bgi\texta.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\textb.obj : .\src\bgi\textb.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\textc.obj : .\src\bgi\textc.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\textd.obj : .\src\bgi\textd.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\txtlnest.obj : .\src\bgi\txtlnest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bgiext01.obj : .\src\bgi\bgiext01.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bgiext02.obj : .\src\bgi\bgiext02.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -## wat32mak.lb1 is a text file with the names of all the object files -## this gets around DOS command line length limit - -$(GRXLIB) : $(OBJS) - %create wat32mak.lb1 -!ifneq BLANK "bmp.obj grxprint.obj prndata.obj bitblt.obj bitbltnc.obj & -box.obj boxnc.obj clearclp.obj clearctx.obj clearscr.obj drwinlne.obj & -fillbox.obj fillboxn.obj frambox.obj framboxn.obj getscl.obj line.obj & -linenc.obj majorln1.obj majorln2.obj majorln3.obj majorln4.obj pixel.obj & -pixelc.obj plot.obj putscl.obj dotab8.obj ega4.obj egavga1.obj ftable.obj & -genblit.obj gengiscl.obj genptscl.obj genstrch.obj herc1.obj lfb16.obj & -lfb24.obj lfb32h.obj lfb32l.obj lfb8.obj lfbbltrv.obj lfbbltvr.obj & -lfbbltvv.obj pblitr2r.obj pblitr2v.obj pblitv2r.obj pblitv2v.obj ram1.obj & -ram16.obj ram24.obj ram32h.obj ram32l.obj ram4.obj ram8.obj rblit_14.obj & -svga16.obj svga24.obj svga32h.obj svga32l.obj svga4.obj svga8.obj vga8x.obj & -fdtable.obj fdv_bgi.obj fdv_grx.obj pc6x8.obj pc8x14.obj pc8x16.obj & -pc8x8.obj ialloc.obj ibuild.obj ifbox.obj ihline.obj iinverse.obj & -imginlne.obj iplot.obj istretch.obj bldcurs.obj dosinput.obj doskeys.obj & -drawcurs.obj mouinfo.obj mouinlne.obj mscursor.obj fillpatt.obj makepat.obj & -patfbits.obj patfbox.obj patfcvxp.obj patfline.obj patfplot.obj & -patfpoly.obj patternf.obj pattfldf.obj pattline.obj pattpoly.obj pfcirc.obj & -pfcirca.obj pfelli.obj pfellia.obj ptcirc.obj ptcirca.obj ptelli.obj & -ptellia.obj clip.obj clrinfo.obj clrinlne.obj colorbw.obj colorega.obj & -colors.obj context.obj cxtinfo.obj cxtinlne.obj drvinfo.obj drvinlne.obj & -fframe.obj fgeom.obj hooks.obj modewalk.obj setdrvr.obj setmode.obj & -version.obj viewport.obj circle1.obj circle2.obj circle3.obj circle4.obj & -drawpoly.obj fillcir1.obj fillcir2.obj fillcnvx.obj fillell1.obj & -fillell2.obj fillpoly.obj flood.obj floodfil.obj genellip.obj polygon.obj & -polyline.obj scancnvx.obj scanellp.obj scanpoly.obj solidfil.obj & -buildaux.obj buildfnt.obj convfont.obj drawstrg.obj drawtext.obj & -drwstrg.obj dumpfont.obj dumptext.obj epatstrg.obj fntinlne.obj & -fontinfo.obj fontpath.obj loadfont.obj pattstrg.obj propwdt.obj & -unloadfn.obj ubox.obj ucbox.obj uccirc.obj uccirca.obj ucelli.obj & -ucellia.obj ucirc.obj ucirca.obj ucircf.obj ucircfa.obj ucline.obj & -ucpolyg.obj ucpolyl.obj udrwchar.obj udrwstrg.obj uelli.obj uellia.obj & -uellif.obj uellifa.obj ufcpolyg.obj ufillbox.obj uflood.obj ufpolyg.obj & -uframbox.obj ugetwin.obj uhline.obj uline.obj upbox.obj upcirc.obj & -upcirca.obj upelli.obj upellia.obj upfbox.obj upfcirc.obj upfcirca.obj & -upfcpoly.obj upfelli.obj upfellia.obj upfflood.obj upfline.obj upfplot.obj & -upfpolyg.obj upixel.obj upixelc.obj upline.obj uplot.obj upolygon.obj & -upolylin.obj uppolyg.obj uppolyl.obj usercord.obj usetwin.obj utextxy.obj & -uvline.obj ordswap.obj resize.obj shiftscl.obj strmatch.obj tmpbuff.obj & -watcom32.obj ati28800.obj cl5426.obj et4000.obj herc.obj mach64.obj s3.obj & -stdega.obj stdvga.obj u_egavga.obj u_vesa.obj u_vsvirt.obj vd_mem.obj & -vesa.obj vtable.obj ccirc.obj ccirca.obj celli.obj cellia.obj custbox.obj & -custline.obj custplne.obj custpoly.obj drwcpoly.obj" - @for %i in (bmp.obj grxprint.obj prndata.obj bitblt.obj bitbltnc.obj & -box.obj boxnc.obj clearclp.obj clearctx.obj clearscr.obj drwinlne.obj & -fillbox.obj fillboxn.obj frambox.obj framboxn.obj getscl.obj line.obj & -linenc.obj majorln1.obj majorln2.obj majorln3.obj majorln4.obj pixel.obj & -pixelc.obj plot.obj putscl.obj dotab8.obj ega4.obj egavga1.obj ftable.obj & -genblit.obj gengiscl.obj genptscl.obj genstrch.obj herc1.obj lfb16.obj & -lfb24.obj lfb32h.obj lfb32l.obj lfb8.obj lfbbltrv.obj lfbbltvr.obj & -lfbbltvv.obj pblitr2r.obj pblitr2v.obj pblitv2r.obj pblitv2v.obj ram1.obj & -ram16.obj ram24.obj ram32h.obj ram32l.obj ram4.obj ram8.obj rblit_14.obj & -svga16.obj svga24.obj svga32h.obj svga32l.obj svga4.obj svga8.obj vga8x.obj & -fdtable.obj fdv_bgi.obj fdv_grx.obj pc6x8.obj pc8x14.obj pc8x16.obj & -pc8x8.obj ialloc.obj ibuild.obj ifbox.obj ihline.obj iinverse.obj & -imginlne.obj iplot.obj istretch.obj bldcurs.obj dosinput.obj doskeys.obj & -drawcurs.obj mouinfo.obj mouinlne.obj mscursor.obj fillpatt.obj makepat.obj & -patfbits.obj patfbox.obj patfcvxp.obj patfline.obj patfplot.obj & -patfpoly.obj patternf.obj pattfldf.obj pattline.obj pattpoly.obj pfcirc.obj & -pfcirca.obj pfelli.obj pfellia.obj ptcirc.obj ptcirca.obj ptelli.obj & -ptellia.obj clip.obj clrinfo.obj clrinlne.obj colorbw.obj colorega.obj & -colors.obj context.obj cxtinfo.obj cxtinlne.obj drvinfo.obj drvinlne.obj & -fframe.obj fgeom.obj hooks.obj modewalk.obj setdrvr.obj setmode.obj & -version.obj viewport.obj circle1.obj circle2.obj circle3.obj circle4.obj & -drawpoly.obj fillcir1.obj fillcir2.obj fillcnvx.obj fillell1.obj & -fillell2.obj fillpoly.obj flood.obj floodfil.obj genellip.obj polygon.obj & -polyline.obj scancnvx.obj scanellp.obj scanpoly.obj solidfil.obj & -buildaux.obj buildfnt.obj convfont.obj drawstrg.obj drawtext.obj & -drwstrg.obj dumpfont.obj dumptext.obj epatstrg.obj fntinlne.obj & -fontinfo.obj fontpath.obj loadfont.obj pattstrg.obj propwdt.obj & -unloadfn.obj ubox.obj ucbox.obj uccirc.obj uccirca.obj ucelli.obj & -ucellia.obj ucirc.obj ucirca.obj ucircf.obj ucircfa.obj ucline.obj & -ucpolyg.obj ucpolyl.obj udrwchar.obj udrwstrg.obj uelli.obj uellia.obj & -uellif.obj uellifa.obj ufcpolyg.obj ufillbox.obj uflood.obj ufpolyg.obj & -uframbox.obj ugetwin.obj uhline.obj uline.obj upbox.obj upcirc.obj & -upcirca.obj upelli.obj upellia.obj upfbox.obj upfcirc.obj upfcirca.obj & -upfcpoly.obj upfelli.obj upfellia.obj upfflood.obj upfline.obj upfplot.obj & -upfpolyg.obj upixel.obj upixelc.obj upline.obj uplot.obj upolygon.obj & -upolylin.obj uppolyg.obj uppolyl.obj usercord.obj usetwin.obj utextxy.obj & -uvline.obj ordswap.obj resize.obj shiftscl.obj strmatch.obj tmpbuff.obj & -watcom32.obj ati28800.obj cl5426.obj et4000.obj herc.obj mach64.obj s3.obj & -stdega.obj stdvga.obj u_egavga.obj u_vesa.obj u_vsvirt.obj vd_mem.obj & -vesa.obj vtable.obj ccirc.obj ccirca.obj celli.obj cellia.obj custbox.obj & -arc.obj aspectra.obj bar.obj bar3d.obj bccgrx.obj bgimode.obj circle.obj & -clearvp.obj closegra.obj clrdev.obj detectg.obj drvname.obj egacolor.obj & -ellipse.obj errmsg.obj fellipse.obj fillpatt.obj fillpoly.obj fillstyl.obj & -fldfill.obj getbkcol.obj getcol.obj getdefpa.obj getfillp.obj getfills.obj & -getgramo.obj getimage.obj getmaxmo.obj getmoran.obj getpixel.obj & -getviewp.obj getx.obj gety.obj gmaxcol.obj gmmaxcol.obj gmmaxx.obj & -gmmaxy.obj gpalsize.obj graphres.obj imagesze.obj instbgid.obj line.obj & -linerel.obj lineto.obj lnestyle.obj modename.obj moverel.obj moveto.obj & -page1.obj page2.obj page3.obj page4.obj page5.obj page6.obj palette.obj & -pieslice.obj polygon.obj putimage.obj putpixel.obj rectang.obj regbgidr.obj & -rgbpal_g.obj rgbpal_s.obj rstcrtmd.obj sector.obj \setbgiwh.obj setbkcol.obj & -setbusze.obj setcolor.obj setrgbc.obj setviewp.obj setwrmod.obj text.obj & -text1.obj text2.obj text3.obj text4.obj text5.obj text6.obj text7.obj & -text8.obj text9.obj texta.obj textb.obj textc.obj textd.obj txtlnest.obj & -bgiext01.obj bgiext02.obj custline.obj custplne.obj custpoly.obj drwcpoly.obj& -) do @%append wat32mak.lb1 +'%i' -!endif -!ifdef DEBUG - @for %i in (dbgprint.obj) do @%append wat32mak.lb1 +'%i' -!endif -!ifneq BLANK "" - @for %i in () do @%append wat32mak.lb1 +'%i' -!endif - $(LIB) $(LIB_OPTS) $(GRXLIB) @wat32mak.lb1 diff --git a/thirdparty/grx249/src/makefile.x11 b/thirdparty/grx249/src/makefile.x11 deleted file mode 100644 index 7fbcebc..0000000 --- a/thirdparty/grx249/src/makefile.x11 +++ /dev/null @@ -1,277 +0,0 @@ -# -# Library Makefile for LINUX/X11. Uses GNU Make. -# -# set up for GCC / Linux -# -.PHONY : libst libsh clean cleanall install uninstall setsuid \ - install-bin uninstall-bin install-fonts uninstall-fonts \ - install-info uninstall-info - -GRXVX11=y - -include ../makedefs.grx - -INCDIR= -I. -I./include -I../include $(X11INCS) - -ifdef GRX_DEFAULT_FONT_PATH -CCOPT += -DGRX_DEFAULT_FONT_PATH=\"$(GRX_DEFAULT_FONT_PATH)\" -endif - -ifeq ($(USE_XF86DGA_DRIVER),y) -CCOPT += -DXF86DGA_DRIVER -endif - -ifeq ($(USE_XF86DGA_FRAMEBUFFER),y) -CCOPT += -DXF86DGA_FRAMEBUFFER -endif - -ifeq ($(SET_XSUIDROOT),y) -EXECBITS = 4755 -else -EXECBITS = 0755 -endif - -ADDON_LIBS = - -ifeq ($(USE_XF86DGA_DRIVER),y) - ADDON_LIBS += -lXxf86dga -lXext -endif - -GRX20ST = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X.a - -GRX20SH = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X.so -GRX20SHli = $(GRX20SH).$(word 1,$(subst ., ,$(GRX_VERSION))) -GRX20SHna = $(GRX20SH).$(GRX_VERSION) -SHCCOPT = -fPIC -D__SHARED__ - -OX=.o -OP= - -include ./stdobjs.mak - -STD_O= $(STD_1) $(STD_2) $(STD_3) $(STD_4) \ - $(STD_5) $(STD_6) $(STD_7) $(STD_8) \ - $(STD_9) $(STD_10) $(STD_11) $(STD_12)\ - -BGI_O= $(BGI_1) $(BGI_2) $(BGI_3) $(BGI_4) \ - $(BGI_5) $(BGI_6) - -ADDON_O= - -ifdef DEBUG - ADDON_O += $(DBG_1) -endif - -ifeq ($(HAVE_LIBTIFF),y) - ADDON_O += $(TIF_1) -endif - -ifeq ($(HAVE_LIBJPEG),y) - ADDON_O += $(JPG_1) -else - ADDON_O += $(NOJPG_1) -endif - -ifeq ($(HAVE_LIBPNG),y) - ADDON_O += $(PNG_1) -else - ADDON_O += $(NOPNG_1) -endif - -ifeq ($(INCLUDE_PRINTING_CODE),y) - ADDON_O += $(PRN_1) - INCDIR += -I../addons/print -ifeq ($(INCLUDE_BGI_SUPPORT),y) - BGI_O += $(PRNBGI_1) -endif -endif - -ifeq ($(INCLUDE_BMP_CODE),y) - ADDON_O += $(BMP_1) - INCDIR += -I../addons/bmp -endif - -O= $(STD_O) \ - $(ADDON_O) \ - fdrivers/fd_xwin.o \ - fdrivers/ram24.o \ - fdrivers/ram32l.o \ - fdrivers/ram32h.o \ - fonts/fdv_xwin.o \ - mouse/xwininp.o \ - mouse/xwinkeys.o \ - misc/x11misc.o \ - vdrivers/vd_xwin.o - -ifeq ($(USE_XF86DGA_DRIVER),y) -O+= fdrivers/lfb16.o \ - fdrivers/lfb24.o \ - fdrivers/lfb32h.o \ - fdrivers/lfb32l.o \ - fdrivers/lfb8.o \ - fdrivers/lfbbltrv.o \ - fdrivers/lfbbltvr.o \ - fdrivers/lfbbltvv.o \ - vdrivers/vd_xfdga.o -endif - -ifeq ($(INCLUDE_BGI_SUPPORT),y) - O += $(BGI_O) -endif - -LO = $(subst $(OX),.lo,$(O)) - -UTILP = ../bin/bin2c \ - ../bin/fnt2c - -UTILPX= ../bin/xmodetest - -all: libst libsh $(UTILP) $(UTILPX) - -libst: $(GRX20ST) - -$(GRX20ST): $(LINUX_i386_X11) $(O) - -rm -f $(GRX20ST) - $(AR) -r $(GRX20ST) $(O) - $(RANLIB) $(GRX20ST) - -ifeq ($(INCLUDE_SHARED_SUPPORT),y) -libsh: $(GRX20SHna) -else -libsh: -endif - -$(GRX20SHna): $(LINUX_i386_X11) $(LO) - -rm -f $(GRX20SHna) - $(CC) $(LDOPT) -shared -Wl,-soname,$(notdir $(GRX20SHli)) -o $(GRX20SHna) $(LO) - ln -sf $(notdir $(GRX20SHna)) $(GRX20SHli) - -$(UTILP): ../bin/% : utilprog/%.o $(GRX20ST) - $(CC) $(LDOPT) -o $@ utilprog/$*.o $(GRX20ST) $(X11LIBS) - $(STRIP) $@ - -$(UTILPX): ../bin/x% : utilprog/%.o $(GRX20ST) - $(CC) $(LDOPT) -o $@ utilprog/$*.o $(GRX20ST) $(ADDON_LIBS) $(X11LIBS) - $(STRIP) $@ - chmod $(EXECBITS) $@ - -$(O): $(LINUX_i386_X11) - -$(LO): $(LINUX_i386_X11) - -$(LINUX_i386_X11): - -if [ ! -r $(LINUX_i386_X11) ]; then \ - rm -f $(SYSTEM_TAG_PREFIX).* $(O) $(LO) utilprog/*.o; fi - touch $(LINUX_i386_X11) - -clean: - rm -f $(O) $(LO) $(LINUX_i386_X11) - rm -f utilprog/*.o - -cleanall: clean -ifeq ($(INCLUDE_SHARED_SUPPORT),y) - rm -f $(GRX20SHna) $(GRX20SHli) -endif - rm -f $(GRX20ST) - rm -f $(UTILP) $(UTILPX) - -install: libst libsh - install -m 0755 -d $(DESTDIR)$(libdir) - install -m 0755 -d $(DESTDIR)$(includedir) - install -m 0644 $(GRX20ST) $(DESTDIR)$(libdir) -ifeq ($(INCLUDE_SHARED_SUPPORT),y) - install -m 0755 $(GRX20SHna) $(DESTDIR)$(libdir) - ln -sf $(notdir $(GRX20SHna)) $(DESTDIR)$(libdir)/$(notdir $(GRX20SHli)) - ln -sf $(notdir $(GRX20SHli)) $(DESTDIR)$(libdir)/$(notdir $(GRX20SH)) -endif - install -m 0644 ../include/grx20.h $(DESTDIR)$(includedir) - install -m 0644 ../include/grxkeys.h $(DESTDIR)$(includedir) - install -m 0644 ../include/libbcc.h $(DESTDIR)$(includedir) -ifeq ($(INCLUDE_PRINTING_CODE),y) - install -m 0644 ../addons/print/grxprint.h $(DESTDIR)$(includedir) -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - install -m 0755 -d $(DESTDIR)$(unitsdir) - install -m 0644 ../pascal/grx.pas $(DESTDIR)$(unitsdir) - install -m 0644 ../pascal/bgi/graph.pas $(DESTDIR)$(unitsdir) -endif - -uninstall: - rm -f $(DESTDIR)$(libdir)/$(notdir $(GRX20ST)) -ifeq ($(INCLUDE_SHARED_SUPPORT),y) - rm -f $(DESTDIR)$(libdir)/$(notdir $(GRX20SH)) - rm -f $(DESTDIR)$(libdir)/$(notdir $(GRX20SHli)) - rm -f $(DESTDIR)$(libdir)/$(notdir $(GRX20SHna)) -endif - rm -f $(DESTDIR)$(includedir)/grx20.h - rm -f $(DESTDIR)$(includedir)/grxkeys.h - rm -f $(DESTDIR)$(includedir)/libbcc.h -ifeq ($(INCLUDE_PRINTING_CODE),y) - rm -f $(DESTDIR)$(includedir)/grxprint.h -endif -ifeq ($(INCLUDE_GPC_SUPPORT),y) - rm -f $(DESTDIR)$(unitsdir)/grx.pas - rm -f $(DESTDIR)$(unitsdir)/graph.pas -endif - -setsuid: $(UTILPX) -ifeq ($(SET_XSUIDROOT),y) - chown root ../bin/modetest - chmod $(EXECBITS) ../bin/modetest -else - @echo "Nothing to do, SET_XSUIDROOT is not set to 'y' in makedefs.grx" -endif - -install-info: - install -m 0755 -d $(DESTDIR)$(infodir) - install -m 0644 ../doc/grx*um.inf $(DESTDIR)$(infodir)/grx.info - for info_dir_file in $(DESTDIR)$(infodir)/dir /etc/info-dir; do \ - if [ -w $$info_dir_file ]; then \ - install-info --dir-file=$$info_dir_file $(DESTDIR)$(infodir)/grx.info; \ - fi; \ - done - -uninstall-info: - for info_dir_file in $(DESTDIR)$(infodir)/dir /etc/info-dir; do \ - if [ -w $$info_dir_file ]; then \ - install-info --dir-file=$$info_dir_file -r grx; \ - fi; \ - done - rm -f $(DESTDIR)$(infodir)/grx.info - -install-bin: $(UTILP) $(UTILPX) - install -m 0755 -d $(DESTDIR)$(bindir) - install -m 0755 ../bin/bin2c $(DESTDIR)$(bindir) - install -m 0755 ../bin/fnt2c $(DESTDIR)$(bindir) - install -m $(EXECBITS) ../bin/xmodetest $(DESTDIR)$(bindir) - -uninstall-bin: - rm -f $(DESTDIR)$(bindir)/bin2c - rm -f $(DESTDIR)$(bindir)/fnt2c - rm -f $(DESTDIR)$(bindir)/xmodetest - -ifdef GRX_DEFAULT_FONT_PATH -install-fonts: - install -m 0755 -d $(DESTDIR)$(GRX_DEFAULT_FONT_PATH) - install -m 0644 ../fonts/* $(DESTDIR)$(GRX_DEFAULT_FONT_PATH) -uninstall-fonts: - rm -f $(DESTDIR)$(GRX_DEFAULT_FONT_PATH)/* -endif - -dep: - $(CC) -MM $(CCOPT) $(INCDIR) $(O:.o=.c) \ - | sed 's#^.*: \(.*\)\.c#\1.o: \1.c#g' >depend.x11 - -$(O): %.o : %.c - $(CC) -c $(CCOPT) -D__XWIN__ $(INCDIR) $*.c -o $*.o - -$(LO): %.lo : %.c - $(CC) -c $(CCOPT) $(SHCCOPT) -D__XWIN__ $(INCDIR) $*.c -o $*.lo - -.c.s: - $(CC) -S $(CCOPT) -D__XWIN__ $(INCDIR) $*.c -o $*.s - -.c.o: - $(CC) -c $(CCOPT) -D__XWIN__ $(INCDIR) $*.c -o $*.o - -include depend.x11 diff --git a/thirdparty/grx249/src/misc/dosmisc.c b/thirdparty/grx249/src/misc/dosmisc.c deleted file mode 100644 index bb4ec1a..0000000 --- a/thirdparty/grx249/src/misc/dosmisc.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** dosmisc.c - miscellaneous functions for DOS - ** - ** Copyright (C) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "libgrx.h" - -void GrSetWindowTitle( char *title ) -{ -} - -void GrSleep( int msec ) -{ - delay( msec ); -} - -void GrFlush( void) -{ -} diff --git a/thirdparty/grx249/src/misc/lnxmisc.c b/thirdparty/grx249/src/misc/lnxmisc.c deleted file mode 100644 index 5172f8c..0000000 --- a/thirdparty/grx249/src/misc/lnxmisc.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** lnxmisc.c - miscellaneous functions for Linux console - ** - ** Copyright (C) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "libgrx.h" - -void GrSetWindowTitle( char *title ) -{ -} - -void GrSleep( int msec ) -{ - usleep( msec*1000L ); -} - -void GrFlush( void) -{ -} diff --git a/thirdparty/grx249/src/misc/sdlmisc.c b/thirdparty/grx249/src/misc/sdlmisc.c deleted file mode 100644 index ef48602..0000000 --- a/thirdparty/grx249/src/misc/sdlmisc.c +++ /dev/null @@ -1,34 +0,0 @@ -/** - ** sdlmisc.c - miscellaneous functions for SDL - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include - -void GrSetWindowTitle(char *title) -{ - SDL_WM_SetCaption(title, NULL); -} - -void GrSleep(int msec) -{ - SDL_Delay(msec); -} - -void GrFlush( void) -{ -} diff --git a/thirdparty/grx249/src/misc/w32misc.c b/thirdparty/grx249/src/misc/w32misc.c deleted file mode 100644 index ae7ef8e..0000000 --- a/thirdparty/grx249/src/misc/w32misc.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** w32misc.c - miscellaneous functions for Win32 - ** - ** Copyright (C) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "libwin32.h" - -void GrSetWindowTitle( char *title ) -{ - SetWindowText( hGRXWnd,title ); -} - -void GrSleep( int msec ) -{ - Sleep( msec ); -} - -void GrFlush( void) -{ -} - diff --git a/thirdparty/grx249/src/misc/x11misc.c b/thirdparty/grx249/src/misc/x11misc.c deleted file mode 100644 index 00f08f2..0000000 --- a/thirdparty/grx249/src/misc/x11misc.c +++ /dev/null @@ -1,39 +0,0 @@ -/** - ** x11misc.c - miscellaneous functions for X11 - ** - ** Copyright (C) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "libgrx.h" -#include "libxwin.h" -#include "mouse/input.h" - -void GrSetWindowTitle( char *title ) -{ - XStoreName( _XGrDisplay,_XGrWindow,title ); - XSetIconName( _XGrDisplay,_XGrWindow,title ); -} - -void GrSleep( int msec ) -{ - usleep( msec*1000L ); -} - -void GrFlush( void ) -{ - _GrUpdateInputs(); - XFlush(_XGrDisplay); -} diff --git a/thirdparty/grx249/src/mouse/bldcurs.c b/thirdparty/grx249/src/mouse/bldcurs.c deleted file mode 100644 index 44001a2..0000000 --- a/thirdparty/grx249/src/mouse/bldcurs.c +++ /dev/null @@ -1,65 +0,0 @@ -/** - ** bldcurs.c ---- create and destroy cursor data structures - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "memfill.h" - -GrCursor *GrBuildCursor(char far *pixels,int pitch,int w,int h,int xo,int yo,const GrColorTableP C) -{ - GrCursor *curs; - GrContext save; - int wrkw2 = (w + 7) & ~7; - int workw = wrkw2 << 1; - int workh = ((h + 7) & ~7) << 1; - int xx,yy; - curs = malloc(sizeof(GrCursor)); - if(!curs) return(NULL); - sttzero(curs); - if(!GrCreateContext(workw,((workh << 1) + h),NULL,&curs->work)) { - free(curs); - return(NULL); - } - curs->xsize = w; - curs->ysize = h; - curs->xoffs = xo; - curs->yoffs = yo; - curs->xwork = workw; - curs->ywork = workh; - GrSaveContext(&save); - GrSetContext(&curs->work); - GrFilledBoxNC(0,0,(workw - 1),(h - 1),0L); - for(yy = 0; yy < h; yy++) { - unsigned char far *p = (unsigned char far *)pixels + (yy * pitch); - for(xx = 0; xx < w; xx++,p++) { - if(*p) GrPlotNC(xx,yy,GrColorValue(GR_CTABLE_COLOR(C,(*p - 1)))); - else GrPlotNC((xx + wrkw2),yy,GrColorValue(-1L)); - } - } - GrSetContext(&save); - return(curs); -} - -void GrDestroyCursor(GrCursor *cursor) -{ - if(cursor && (cursor != MOUINFO->cursor)) { - GrEraseCursor(cursor); - GrDestroyContext(&cursor->work); - free(cursor); - } -} diff --git a/thirdparty/grx249/src/mouse/dosinput.c b/thirdparty/grx249/src/mouse/dosinput.c deleted file mode 100644 index 3022bb8..0000000 --- a/thirdparty/grx249/src/mouse/dosinput.c +++ /dev/null @@ -1,212 +0,0 @@ -/** - ** dosinput.c ---- polled mode mouse and keyboard interface for DOS - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include - -#if defined(__TURBOC__) || defined(__WATCOMC__) /* GS - Watcom C++ 11.0 */ -#include -#endif - -#ifdef __DJGPP__ -#include -#endif - -#include "libgrx.h" -#include "grxkeys.h" -#include "allocate.h" -#include "arith.h" -#include "int86.h" -#include "memcopy.h" -#include "memfill.h" -#include "mouse/input.h" - -static int kbd_enabled = TRUE; -static int mou_enabled = TRUE; -static int mou_buttons = 0; -static long evt_lasttime; - -static void uninit(void) -{ - if(MOUINFO->msstatus > 1) MOUINFO->msstatus = 1; -} - -int GrMouseDetect(void) -{ - Int86Regs r; - if(MOUINFO->msstatus == 0) { - MOUINFO->msstatus = (-1); /* assume missing */ - sttzero(&r); - int33(&r); - if(IREG_AX(r) != 0) { - atexit(uninit); - MOUINFO->msstatus = 1; /* present, but not initted */ - } - } - return((MOUINFO->msstatus > 0) ? TRUE : FALSE); -} - -void GrMouseInitN(int queue_size) -{ - uninit(); - queue_size = umax(4,umin(256,queue_size)); - init_queue(queue_size); - if(GrMouseDetect()) { - GrMouseSetSpeed(1,1); - GrMouseSetAccel(100,1); - GrMouseSetLimits(0,0,SCRN->gc_xmax,SCRN->gc_ymax); - GrMouseWarp((SCRN->gc_xmax >> 1),(SCRN->gc_ymax >> 1)); - _GrInitMouseCursor(); - MOUINFO->msstatus = 2; - mou_buttons = 0; - } - GrMouseEventEnable(TRUE,TRUE); - real_time(evt_lasttime); - MOUINFO->uninit = uninit; -} - -void GrMouseSetSpeed(int spmult,int spdiv) -{ - MOUINFO->spmult = umin(16,umax(1,spmult)); - MOUINFO->spdiv = umin(16,umax(1,spdiv)); -} - -void GrMouseSetAccel(int thresh,int accel) -{ - MOUINFO->thresh = umin(64,umax(1,thresh)); - MOUINFO->accel = umin(16,umax(1,accel)); -} - -void GrMouseSetLimits(int x1,int y1,int x2,int y2) -{ - isort(x1,x2); - isort(y1,y2); - MOUINFO->xmin = imax(0,imin(x1,SCRN->gc_xmax)); - MOUINFO->ymin = imax(0,imin(y1,SCRN->gc_ymax)); - MOUINFO->xmax = imax(0,imin(x2,SCRN->gc_xmax)); - MOUINFO->ymax = imax(0,imin(y2,SCRN->gc_ymax)); -} - -void GrMouseWarp(int x,int y) -{ - MOUINFO->xpos = imax(MOUINFO->xmin,imin(MOUINFO->xmax,x)); - MOUINFO->ypos = imax(MOUINFO->ymin,imin(MOUINFO->ymax,y)); - GrMouseUpdateCursor(); -} - -void GrMouseEventEnable(int enable_kb,int enable_ms) -{ - kbd_enabled = enable_kb; - mou_enabled = enable_ms; -} - -void _GrUpdateInputs(void) -{ - for( ; ; ) { - Int86Regs r; - GrMouseEvent ev; - int gotevt = FALSE; - if(mou_enabled && (MOUINFO->msstatus == 2)) { - int mick,btn; - sttzero(&r); - IREG_AX(r) = 11; /* read mickey counters */ - int33(&r); - if((mick = (short)IREG_CX(r)) != 0) { - update_coord(x,mick); - } - if((mick = (short)IREG_DX(r)) != 0) { - update_coord(y,mick); - } - IREG_AX(r) = 3; /* read button state */ - int33(&r); - btn = IREG_BX(r); - if(btn != mou_buttons) { - fill_mouse_ev( - ev, - mou_buttons,btn, - GR_M_LEFT, - GR_M_MIDDLE, - GR_M_RIGHT, - GR_M_P4, - GR_M_P5, - GrKeyStat() - ); - real_dtime(ev.dtime,evt_lasttime); - enqueue_event(ev); - MOUINFO->moved = FALSE; - mou_buttons = btn; - gotevt = TRUE; - } - } - if(kbd_enabled && GrKeyPressed()) { - fill_keybd_ev(ev,GrKeyRead(),GrKeyStat()); - real_dtime(ev.dtime,evt_lasttime); - enqueue_event(ev); - MOUINFO->moved = FALSE; - gotevt = TRUE; - } - if(!gotevt) break; - } -} - -void GrMouseGetEventT(int flags,GrMouseEvent *ev,long tout) -{ - int msdraw; - long prevtime; - if(MOUINFO->msstatus == 0) GrMouseInit(); - msdraw = !MOUINFO->displayed && !(flags & GR_M_NOPAINT); - if(msdraw) GrMouseDisplayCursor(); - real_time(prevtime); - for( ; ; ) { - _GrUpdateInputs(); - GrMouseUpdateCursor(); - while(MOUINFO->qlength > 0) { - dequeue_event((*ev)); - if(ev->flags & flags) { - if(msdraw) GrMouseEraseCursor(); - return; - } - } - if((flags & GR_M_POLL) || - (tout == 0L) || - (MOUINFO->moved && (flags & GR_M_MOTION))) { - fill_mouse_ev( - (*ev), - mou_buttons,mou_buttons, - GR_M_LEFT, - GR_M_MIDDLE, - GR_M_RIGHT, - GR_M_P4, - GR_M_P5, - GrKeyStat() - ); - if ( ev->flags ) /* something happend */ - real_dtime(ev->dtime,evt_lasttime); - else - ev->dtime = -1; /* special time if nothing happend */ - MOUINFO->moved = FALSE; - if(msdraw) GrMouseEraseCursor(); - return; - } - if(tout > 0L) { - long dtime; - real_dtime(dtime,prevtime); - if((tout -= dtime) < 0L) tout = 0L; - } - } -} - diff --git a/thirdparty/grx249/src/mouse/doskeys.c b/thirdparty/grx249/src/mouse/doskeys.c deleted file mode 100644 index b390d47..0000000 --- a/thirdparty/grx249/src/mouse/doskeys.c +++ /dev/null @@ -1,121 +0,0 @@ -/** - ** doskeys.c ---- auxiliary DOS keyboard input functions - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#include "libgrx.h" -#include "grxkeys.h" -#include "int86.h" -#include "memfill.h" - -#ifdef __DJGPP__ -#include -#endif - -#if defined(__WATCOMC__) || defined(__TURBOC__) -#include -#endif - -#define USE_AT_BIOS - -#ifdef USE_AT_BIOS -#define KBD_BIOS_BASE 0x10 -#else -#define KBD_BIOS_BASE 0 -#endif - -#if defined(__TURBOC__) || defined(__WATCOMC__) /* GS - Watcom C++ 11.0 */ - -int getkey(void) -{ - Int86Regs r; - sttzero(&r); - IREG_AX(r) = (KBD_BIOS_BASE + 0) << 8; - int16(&r); - switch(IREG_AL(r)) { -#ifdef USE_AT_BIOS - case 0xe0: -#endif - case 0x00: - return(IREG_AH(r) + 0x100); - default: - return(IREG_AL(r)); - } -} - -int getxkey(void) -{ - Int86Regs r; - sttzero(&r); - IREG_AX(r) = (KBD_BIOS_BASE + 0) << 8; - int16(&r); - switch(IREG_AL(r)) { -#ifdef USE_AT_BIOS - case 0xe0: - return(IREG_AH(r) + 0x200); -#endif - case 0x00: - return(IREG_AH(r) + 0x100); - default: - return(IREG_AL(r)); - } -} - -#endif - -int getkbstat(void) -{ - Int86Regs r; - sttzero(&r); - IREG_AX(r) = (KBD_BIOS_BASE + 2) << 8; - int16(&r); - return(IREG_AL(r)); -} - - -/* -** new functions to replace the old style -** kbhit / getch / getkey / getxkey / getkbstat -** keyboard interface -*/ -int GrKeyPressed(void) { - return kbhit(); -} - -GrKeyType GrKeyRead(void) { - int key = getkey(); - - switch (key) { - case 0x197: key = GrKey_Alt_Home; break; - case 0x198: key = GrKey_Alt_Up; break; - case 0x199: key = GrKey_Alt_PageUp; break; - case 0x19b: key = GrKey_Alt_Left; break; - case 0x19d: key = GrKey_Alt_Right; break; - case 0x19f: key = GrKey_Alt_End; break; - case 0x1a0: key = GrKey_Alt_Down; break; - case 0x1a1: key = GrKey_Alt_PageDown; break; - case 0x1a2: key = GrKey_Alt_Insert; break; - case 0x1a3: key = GrKey_Alt_Delete; break; - } - return (GrKeyType) key; -} - -int GrKeyStat(void) { - return getkbstat(); -} diff --git a/thirdparty/grx249/src/mouse/drawcurs.c b/thirdparty/grx249/src/mouse/drawcurs.c deleted file mode 100644 index 5a3bbb0..0000000 --- a/thirdparty/grx249/src/mouse/drawcurs.c +++ /dev/null @@ -1,156 +0,0 @@ -/** - ** DRAWCURS.C ---- display, erase and move graphics cursors - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "mouse/input.h" -#include "libgrx.h" - -#define XORMASK(c,x,y) &(c)->work.gc_frame,(x),(y) -#define ANDMASK(c,x,y) &(c)->work.gc_frame,((x) + ((c)->xwork >> 1)),(y) -#define SAVECXT(c,x,y) &(c)->work.gc_frame,(x),((y) + (c)->ysize) -#define WORKCXT(c,x,y) &(c)->work.gc_frame,(x),((y) + (c)->ysize + (c)->ywork) - -void GrDisplayCursor(GrCursor *C) -{ - int xpos,ypos; - int xwrk,ywrk; - int xsiz,ysiz; - if(!C || !COMPATIBLE(C) || C->displayed) return; - C->displayed = TRUE; - xpos = C->xcord - C->xoffs; - ypos = C->ycord - C->yoffs; - xsiz = C->xwork; - ysiz = C->ywork; - xwrk = xpos & ~7; - ywrk = ypos & ~7; - if(xwrk < 0) xwrk = 0; - if(ywrk < 0) ywrk = 0; - if(xwrk > (GrVirtualX() - xsiz)) xwrk = GrVirtualX() - xsiz; - if(ywrk > (GrVirtualY() - ysiz)) ywrk = GrVirtualY() - ysiz; - C->xwpos = xwrk; - C->ywpos = ywrk; - mouse_block(SCRN,xwrk,ywrk,(xwrk + xsiz - 1),(ywrk + ysiz - 1)); - (*SDRV->bltv2r)( - SAVECXT(C,0,0), - &SCRN->gc_frame,xwrk,ywrk, - xsiz,ysiz, - GrWRITE - ); - (*C->work.gc_driver->bitblt)( - WORKCXT(C,0,0), - SAVECXT(C,0,0), - xsiz,ysiz, - GrWRITE - ); - xpos -= xwrk; - ypos -= ywrk; - xsiz = C->xsize; - ysiz = C->ysize; - xwrk = ywrk = 0; - if(xpos < 0) { xwrk -= xpos; xsiz += xpos; xpos = 0; } - if(ypos < 0) { ywrk -= ypos; ysiz += ypos; ypos = 0; } - if(xsiz > (C->xwork - xpos)) xsiz = C->xwork - xpos; - if(ysiz > (C->ywork - ypos)) ysiz = C->ywork - ypos; - if((xsiz <= 0) || (ysiz <= 0)) return; - (*C->work.gc_driver->bitblt)( - WORKCXT(C,xpos,ypos), - ANDMASK(C,xwrk,ywrk), - xsiz,ysiz, - GrAND - ); - (*C->work.gc_driver->bitblt)( - WORKCXT(C,xpos,ypos), - XORMASK(C,xwrk,ywrk), - xsiz,ysiz, - GrXOR - ); - (*SDRV->bltr2v)( - &SCRN->gc_frame,C->xwpos,C->ywpos, - WORKCXT(C,0,0), - C->xwork,C->ywork, - GrWRITE - ); - mouse_unblock(); -} - -void GrEraseCursor(GrCursor *C) -{ - if(C && COMPATIBLE(C) && C->displayed) { - mouse_block(SCRN, - C->xwpos, C->ywpos, - (C->xwpos + C->xwork - 1),(C->ywpos + C->ywork - 1) - ); - (*SDRV->bltr2v)( - &SCRN->gc_frame,C->xwpos,C->ywpos, - SAVECXT(C,0,0), - C->xwork,C->ywork, - GrWRITE - ); - C->displayed = FALSE; - mouse_unblock(); - } -} - -void GrMoveCursor(GrCursor *C,int x,int y) -{ - int xpos,ypos; - int xsiz,ysiz; - if(!C || ((C->xcord == x) && (C->ycord == y))) return; - C->xcord = x; - C->ycord = y; - if(!C->displayed || !COMPATIBLE(C)) return; - xpos = x - C->xoffs - C->xwpos; - ypos = y - C->yoffs - C->ywpos; - xsiz = C->xsize; - ysiz = C->ysize; - if((xpos >= 0) && ((xpos + xsiz) <= C->xwork) && - (ypos >= 0) && ((ypos + ysiz) <= C->ywork)) { - mouse_block(SCRN, - C->xwpos, C->ywpos, - (C->xwpos + C->xwork - 1),(C->ywpos + C->ywork - 1) - ); - (*C->work.gc_driver->bitblt)( - WORKCXT(C,0,0), - SAVECXT(C,0,0), - C->xwork,C->ywork, - GrWRITE - ); - (*C->work.gc_driver->bitblt)( - WORKCXT(C,xpos,ypos), - ANDMASK(C,0,0), - xsiz,ysiz, - GrAND - ); - (*C->work.gc_driver->bitblt)( - WORKCXT(C,xpos,ypos), - XORMASK(C,0,0), - xsiz,ysiz, - GrXOR - ); - (*SDRV->bltr2v)( - &SCRN->gc_frame,C->xwpos,C->ywpos, - WORKCXT(C,0,0), - C->xwork,C->ywork, - GrWRITE - ); - mouse_unblock(); - return; - } - GrEraseCursor(C); - GrDisplayCursor(C); -} - diff --git a/thirdparty/grx249/src/mouse/input.h b/thirdparty/grx249/src/mouse/input.h deleted file mode 100644 index 0fe5a45..0000000 --- a/thirdparty/grx249/src/mouse/input.h +++ /dev/null @@ -1,181 +0,0 @@ -/** - ** input.h ---- declarations and code pieces for input processing - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#define update_coord(WHICH,MICKEYS) do { \ - static int fract = 0; \ - int delta,ddelta,pos; \ - delta = (MICKEYS) * MOUINFO->spmult; \ - ddelta = (delta + fract) / MOUINFO->spdiv; \ - fract = (delta + fract) % MOUINFO->spdiv; \ - if(iabs(ddelta) >= MOUINFO->thresh) ddelta *= MOUINFO->accel; \ - pos = MOUINFO->WHICH##pos + ddelta; \ - if(pos < MOUINFO->WHICH##min) pos = MOUINFO->WHICH##min; \ - if(pos > MOUINFO->WHICH##max) pos = MOUINFO->WHICH##max; \ - if(pos != MOUINFO->WHICH##pos) { \ - MOUINFO->WHICH##pos = pos; \ - MOUINFO->moved = TRUE; \ - } \ -} while(0) - -#define fill_mouse_ev(EV,OLDBT,NEWBT,LB,MB,RB,P4,P5,KBSTAT) do { \ - int bdown = NEWBT & (~OLDBT); \ - int btnup = OLDBT & (~NEWBT); \ - EV.flags = MOUINFO->moved ? GR_M_MOTION : 0; \ - EV.x = MOUINFO->xpos; \ - EV.y = MOUINFO->ypos; \ - EV.kbstat = KBSTAT; \ - EV.key = 0; \ - EV.buttons = 0; \ - if(NEWBT & LB) EV.buttons |= GR_M_LEFT; \ - if(NEWBT & MB) EV.buttons |= GR_M_MIDDLE; \ - if(NEWBT & RB) EV.buttons |= GR_M_RIGHT; \ - if(NEWBT & P4) EV.buttons |= GR_M_P4; \ - if(NEWBT & P5) EV.buttons |= GR_M_P5; \ - if(bdown & LB) EV.flags |= GR_M_LEFT_DOWN; \ - if(bdown & MB) EV.flags |= GR_M_MIDDLE_DOWN; \ - if(bdown & RB) EV.flags |= GR_M_RIGHT_DOWN; \ - if(bdown & P4) EV.flags |= GR_M_P4_DOWN; \ - if(bdown & P5) EV.flags |= GR_M_P5_DOWN; \ - if(btnup & LB) EV.flags |= GR_M_LEFT_UP; \ - if(btnup & MB) EV.flags |= GR_M_MIDDLE_UP; \ - if(btnup & RB) EV.flags |= GR_M_RIGHT_UP; \ - if(btnup & P4) EV.flags |= GR_M_P4_UP; \ - if(btnup & P5) EV.flags |= GR_M_P5_UP; \ -} while(0) - -#define fill_keybd_ev(EV,KEY,KBSTAT) do { \ - EV.flags = GR_M_KEYPRESS | (MOUINFO->moved ? GR_M_MOTION : 0); \ - EV.x = MOUINFO->xpos; \ - EV.y = MOUINFO->ypos; \ - EV.key = KEY; \ - EV.kbstat = KBSTAT; \ - EV.buttons = 0; \ -} while(0) - -#define fill_cmd_ev(EV,CMD,KBSTAT) do { \ - EV.flags = GR_COMMAND | (MOUINFO->moved ? GR_M_MOTION : 0); \ - EV.x = MOUINFO->xpos; \ - EV.y = MOUINFO->ypos; \ - EV.key = CMD; \ - EV.kbstat = KBSTAT; \ - EV.buttons = 0; \ -} while(0) - -#define enqueue_event(EV) do { \ - sttcopy(&MOUINFO->queue[MOUINFO->qwrite],&EV); \ - if(++MOUINFO->qwrite == MOUINFO->qsize) MOUINFO->qwrite = 0; \ - if(++MOUINFO->qlength > MOUINFO->qsize) { \ - MOUINFO->qlength--; \ - if(++MOUINFO->qread == MOUINFO->qsize) MOUINFO->qread = 0; \ - } \ -} while(0) - -#define dequeue_event(EV) do { \ - if(MOUINFO->qlength > 0) { \ - sttcopy(&EV,&MOUINFO->queue[MOUINFO->qread]); \ - if(++MOUINFO->qread == MOUINFO->qsize) MOUINFO->qread = 0; \ - MOUINFO->qlength--; \ - } \ -} while(0) - -#define init_queue(N) do { \ - if(MOUINFO->qsize != N) { \ - if(MOUINFO->queue != NULL) free(MOUINFO->queue); \ - MOUINFO->queue = malloc(sizeof(MOUINFO->queue[0]) * N); \ - MOUINFO->qsize = MOUINFO->queue ? N : 0; \ - } \ - MOUINFO->qread = 0; \ - MOUINFO->qwrite = 0; \ - MOUINFO->qlength = 0; \ -} while(0); - - -#if defined(__TURBOC__) || defined(__WATCOMC__) /* GS - Watcom C++ 11.0 */ -#define real_time(tv) do { \ - (tv) = *(long far *)(MK_FP(0x40,0x6c)); \ -} while(0) -#define MS_PER_TICK 55 -#endif - -#ifdef __DJGPP__ -#ifdef NO_REPROGRAM_TIMER -#define real_time(tv) do { \ - setup_far_selector(LINP_SEL(0x0000046c)); \ - (tv) = peek_l_f(LINP_PTR(0x0000046c)); \ -} while(0) -#define MS_PER_TICK 55 -#else -#include -#define real_time(tv) do { \ - (tv) = uclock()/(UCLOCKS_PER_SEC/1000); \ -} while(0) -#define MS_PER_TICK 1 -#endif -#endif - -#ifdef __WIN32__ -#include -#define real_time(tv) do { \ - (tv) = clock(); \ -} while(0) -#define MS_PER_TICK (1000L / CLOCKS_PER_SEC) -#endif - -#if !defined(real_time) && defined(unix) -#include -#include -#define real_time(tv) do { \ - (tv) = times(NULL); \ -} while(0) -#define MS_PER_TICK (1000L / sysconf(_SC_CLK_TCK)) -#endif - -#define real_dtime(dt,oldtime) do { \ - long newtime; \ - real_time(newtime); \ - (dt) = (newtime - oldtime) * MS_PER_TICK; \ - oldtime = newtime; \ -} while(0) - -#ifdef __MSDOS__ -#define test_unblock(flag) do { \ - static long lastcheck = 0L; \ - long checktime; \ - real_time(checktime); \ - flag = (int)(checktime - lastcheck); \ - lastcheck = checktime; \ -} while(0) -#else -#define test_unblock(flag) do { \ - static int checkcnt = 1000; \ - (flag) = FALSE; \ - if(--checkcnt <= 0) { \ - checkcnt = 1000; \ - flag = (TRUE); \ - } \ -} while(0) -#endif - -#define COMPATIBLE(c) ((c)->work.gc_driver->mode == SDRV->rmode) - -void _GrUpdateInputs(void); -void _GrInitMouseCursor(void); -#ifndef __MSDOS__ -int _GrCheckKeyboardHit(void); -int _GrReadCharFromKeyboard(void); -#endif diff --git a/thirdparty/grx249/src/mouse/lnxinpu2.c b/thirdparty/grx249/src/mouse/lnxinpu2.c deleted file mode 100644 index fd195ae..0000000 --- a/thirdparty/grx249/src/mouse/lnxinpu2.c +++ /dev/null @@ -1,600 +0,0 @@ -/** - ** lnxinpu2.c ---- alternate mouse and keyboard interface for Linux - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Mauro Condarelli (mc5686@mclink.it) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andris Pavenis (pavenis@acad.latnet.lv) - ** - ** This version of lnxinput.c handles the mouse directly, not using - ** the svgalib. Changes: - ** - ** New mouse code. Try to open /dev/psaux. Only works with PS2 mice - ** (M.Alvarez 07/02/2002). - ** - ** Now works with PS2 and IMPS2 mice (the wheel is not used) - ** (M.Alvarez 29/12/2002). - ** - ** Now calls _LnxfbSwitchConsoleAndWait if _lnxfb_waiting_to_switch_console - ** is true (M.Alvarez 1/3/2003). - **/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "libgrx.h" -#include "input.h" -#include "arith.h" -#include "memcopy.h" -#include "memfill.h" - -#include "grxkeys.h" - -extern int _lnxfb_waiting_to_switch_console; -extern void _LnxfbSwitchConsoleAndWait(void); - -/* - * keyboard stuff - */ -static struct termio kbd_setup; -static struct termio kbd_reset; -static int kbd_initted = FALSE; -static int kbd_enabled = TRUE; -static int kbd_isatty; -static int kbd_lastchr; -static int kbd_filedsc; -static enum { normal, test, wait } kbd_mode; - -static void kbd_restore(void) -{ - if (kbd_initted && kbd_isatty && (kbd_mode != normal)) { - ioctl(kbd_filedsc, TCSETA, &kbd_reset); - kbd_mode = normal; - } -} - -static void kbd_init(void) -{ - if (!kbd_initted) { - kbd_initted = TRUE; - kbd_lastchr = EOF; - kbd_filedsc = fileno(stdin); - kbd_isatty = isatty(kbd_filedsc); - if (kbd_isatty) { - ioctl(kbd_filedsc, TCGETA, &kbd_setup); - ioctl(kbd_filedsc, TCGETA, &kbd_reset); - kbd_setup.c_lflag &= ~(ICANON | ECHO); - kbd_setup.c_iflag &= ~(INLCR | ICRNL); - atexit(kbd_restore); - kbd_mode = normal; - } - } -} - -static int n = 0; -static int getByte(int remove) -{ - static unsigned char keybuf[10]; - int ch, f; - - if (n < 0) - n = 0; - if (n <= 0) { - f = read(kbd_filedsc, keybuf + n, 10 - n); - if (f > 0) { - n += f; - } - } - if (n <= 0) - return EOF; - ch = keybuf[0]; - if (remove) { - --n; - memmove(&keybuf[0], &keybuf[1], n * sizeof(unsigned char)); - } - return ch; -} - -static const GrKeyType fnk[] = { - GrKey_F6, GrKey_F7, GrKey_F8, GrKey_F9, GrKey_F10, GrKey_Escape, - /* shift F1 == F11, shift F2 == F12 What code should be returned ?? */ - GrKey_Shift_F1, GrKey_Shift_F2, - GrKey_Shift_F3, GrKey_Shift_F4, - GrKey_Escape, GrKey_Shift_F5, GrKey_Shift_F6, GrKey_Escape, - GrKey_Shift_F7, GrKey_Shift_F8, GrKey_Shift_F9, GrKey_Shift_F10 -}; - -static const GrKeyType alt[] = { - GrKey_Escape, GrKey_Alt_Escape, - 0x7f, GrKey_Alt_Backspace, - 'q', GrKey_Alt_Q, - 'w', GrKey_Alt_W, - 'e', GrKey_Alt_E, - 'r', GrKey_Alt_R, - 't', GrKey_Alt_T, - 'y', GrKey_Alt_Y, - 'u', GrKey_Alt_U, - 'i', GrKey_Alt_I, - 'o', GrKey_Alt_O, - 'p', GrKey_Alt_P, - '[', GrKey_Alt_LBracket, - ']', GrKey_Alt_RBracket, - GrKey_Return, GrKey_Alt_Return, - 'a', GrKey_Alt_A, - 's', GrKey_Alt_S, - 'd', GrKey_Alt_D, - 'f', GrKey_Alt_F, - 'g', GrKey_Alt_G, - 'h', GrKey_Alt_H, - 'j', GrKey_Alt_J, - 'k', GrKey_Alt_K, - 'l', GrKey_Alt_L, - ';', GrKey_Alt_Semicolon, - '\'', GrKey_Alt_Quote, - '\x60', GrKey_Alt_Backquote, - '\\', GrKey_Alt_Backslash, - 'z', GrKey_Alt_Z, - 'x', GrKey_Alt_X, - 'c', GrKey_Alt_C, - 'v', GrKey_Alt_V, - 'b', GrKey_Alt_B, - 'n', GrKey_Alt_N, - 'm', GrKey_Alt_M, - ',', GrKey_Alt_Comma, - '.', GrKey_Alt_Period, - '/', GrKey_Alt_Slash, -/* GrKey_Alt_F1 */ -/* GrKey_Alt_F2 */ -/* GrKey_Alt_F3 */ -/* GrKey_Alt_F4 */ -/* GrKey_Alt_F5 */ -/* GrKey_Alt_F6 */ -/* GrKey_Alt_F7 */ -/* GrKey_Alt_F8 */ -/* GrKey_Alt_F9 */ -/* GrKey_Alt_F10 */ - '1', GrKey_Alt_1, - '2', GrKey_Alt_2, - '3', GrKey_Alt_3, - '4', GrKey_Alt_4, - '5', GrKey_Alt_5, - '6', GrKey_Alt_6, - '7', GrKey_Alt_7, - '8', GrKey_Alt_8, - '9', GrKey_Alt_9, - '0', GrKey_Alt_0, - '-', GrKey_Alt_Dash, - '=', GrKey_Alt_Equals, -/* GrKey_Alt_F11 */ -/* GrKey_Alt_F12 */ -/* GrKey_Alt_KPSlash */ - GrKey_Tab, GrKey_Alt_Tab, -/* GrKey_Alt_Enter */ - '<', GrKey_Alt_LAngle, - '>', GrKey_Alt_RAngle, - '@', GrKey_Alt_At, - '{', GrKey_Alt_LBrace, - '|', GrKey_Alt_Pipe, - '}', GrKey_Alt_RBrace, - 0x0000, GrKey_NoKey -}; - -static GrKeyType keytrans(GrKeyType k, const GrKeyType * t) -{ - while (t[0] != 0x0000 && t[1] != GrKey_NoKey) { - if (k == t[0]) - return t[1]; - t += 2; - } - return GrKey_OutsideValidRange; -} - -static int inkey(void) -{ - int Key, Key2; - - Restart: - Key = getByte(1); - if (Key != GrKey_Escape) { - if (Key == 0x7f) - return (GrKey_BackSpace); - return (Key); - } - if (n == 0) - return (GrKey_Escape); - /* We have ^[ and something more after that */ - - Key = getByte(1); - if (Key == EOF) - return (GrKey_Escape); - if (Key != '[') - return (keytrans(Key, alt)); /* Check for Alt+Key */ - - /* We have ^[[ */ - if (n == 0) - return (GrKey_Alt_LBracket); - - Key = getByte(1); - if (Key == EOF) - return (GrKey_Alt_LBracket);; - switch (Key) { - case 'A': - return (GrKey_Up); - case 'B': - return (GrKey_Down); - case 'C': - return (GrKey_Right); - case 'D': - return (GrKey_Left); - case 'G': - return (GrKey_Center); - case '[': - Key = getByte(1); - switch (Key) { - case 'A': - return (GrKey_F1); - case 'B': - return (GrKey_F2); - case 'C': - return (GrKey_F3); - case 'D': - return (GrKey_F4); - case 'E': - return (GrKey_F5); - default: - goto Restart; - } - default: - if (Key >= '1' && Key <= '6') { - Key2 = getByte(1); - if (Key2 == '~') - switch (Key) { - case '1': - return (GrKey_Home); - case '2': - return (GrKey_Insert); - case '3': - return (GrKey_Delete); - case '4': - return (GrKey_End); - case '5': - return (GrKey_PageUp); - case '6': - return (GrKey_PageDown); - } else if (Key2 >= '0' && Key2 <= '9') { - int index = 10 * (Key - '0') + (Key2 - '0'); - if (getByte(1) != '~') - goto Restart; - if (17 <= index && index <= 34) - return (fnk[index - 17]); - goto Restart; - } - } - goto Restart; - } -} - -static int validKey(int key, int valid) -{ - if (key < 0 || key > GrKey_LastDefinedKeycode || key == EOF) - return valid; - return key; -} - -int _GrCheckKeyboardHit(void) -{ - if (_lnxfb_waiting_to_switch_console) - _LnxfbSwitchConsoleAndWait(); - - if (!kbd_initted) { - kbd_init(); - } - if (!kbd_isatty) { - return (TRUE); - } - if (kbd_lastchr != EOF) { - return (TRUE); - } - if (kbd_mode != test) { - kbd_setup.c_cc[VMIN] = 0; - kbd_setup.c_cc[VTIME] = 0; - if (ioctl(kbd_filedsc, TCSETAW, &kbd_setup) == EOF) - return (FALSE); - kbd_mode = test; - } - kbd_lastchr = validKey(inkey(), EOF); - return (kbd_lastchr != EOF); -} - -int _GrReadCharFromKeyboard(void) -{ - int key = EOF; - - if (!kbd_initted) { - kbd_init(); - } - if (!kbd_isatty) { - return (getc(stdin)); - } - do { - if (_lnxfb_waiting_to_switch_console) - _LnxfbSwitchConsoleAndWait(); - - if (kbd_lastchr != EOF) { - key = kbd_lastchr; - kbd_lastchr = EOF; - break; - } - if (kbd_mode == test) { - /* we're in test mode. Look for key without mode switch ... */ - _GrCheckKeyboardHit(); - if (kbd_lastchr != EOF) { - key = kbd_lastchr; - kbd_lastchr = EOF; - break; - } - } - /* no key till now. Wait of it ... */ - if (kbd_mode != wait) { - kbd_setup.c_cc[VMIN] = 0; - kbd_setup.c_cc[VTIME] = 1; - if (ioctl(kbd_filedsc, TCSETAW, &kbd_setup) == EOF) - return (EOF); - kbd_mode = wait; - } - if ((key = inkey()) != EOF) break; - } while (1); - return validKey(key, GrKey_OutsideValidRange); -} - -/* - * Mouse stuff - */ - -#define PS2_LEFTBUTTON 1 -#define PS2_MIDDLEBUTTON 4 -#define PS2_RIGHTBUTTON 2 -#define PS2_FOURTHBUTTON 8 -#define PS2_FIFTHBUTTON 16 - -static int mou_filedsc; -static int mou_buttons; -static int mou_enabled = TRUE; -static long evt_lasttime; - -static void uninit(void) -{ - if (MOUINFO->msstatus > 1) - MOUINFO->msstatus = 1; -} - -int GrMouseDetect(void) -{ - if (MOUINFO->msstatus == 0) { - MOUINFO->msstatus = (-1); /* assume missing */ - mou_filedsc = open("/dev/psaux", O_RDONLY | O_NDELAY); - if (mou_filedsc >= 0) { - MOUINFO->msstatus = 1; /* present, but not initted */ - atexit(uninit); - } - } - return ((MOUINFO->msstatus > 0) ? TRUE : FALSE); -} - -void GrMouseInitN(int queue_size) -{ - uninit(); - queue_size = umax(4, umin(256, queue_size)); - init_queue(queue_size); - kbd_init(); - if (GrMouseDetect()) { - GrMouseSetSpeed(1, 1); - GrMouseSetAccel(100, 1); - GrMouseSetLimits(0, 0, SCRN->gc_xmax, SCRN->gc_ymax); - GrMouseWarp((SCRN->gc_xmax >> 1), (SCRN->gc_ymax >> 1)); - _GrInitMouseCursor(); - MOUINFO->msstatus = 2; - mou_buttons = 0; - } - GrMouseEventEnable(TRUE, TRUE); - real_time(evt_lasttime); - MOUINFO->uninit = uninit; -} - -void GrMouseSetSpeed(int spmult, int spdiv) -{ - MOUINFO->spmult = umin(16, umax(1, spmult)); - MOUINFO->spdiv = umin(16, umax(1, spdiv)); -} - -void GrMouseSetAccel(int thresh, int accel) -{ - MOUINFO->thresh = umin(64, umax(1, thresh)); - MOUINFO->accel = umin(16, umax(1, accel)); -} - -void GrMouseSetLimits(int x1, int y1, int x2, int y2) -{ - isort(x1, x2); - isort(y1, y2); - MOUINFO->xmin = imax(0, imin(x1, SCRN->gc_xmax)); - MOUINFO->ymin = imax(0, imin(y1, SCRN->gc_ymax)); - MOUINFO->xmax = imax(0, imin(x2, SCRN->gc_xmax)); - MOUINFO->ymax = imax(0, imin(y2, SCRN->gc_ymax)); -} - -void GrMouseWarp(int x, int y) -{ - MOUINFO->xpos = imax(MOUINFO->xmin, imin(MOUINFO->xmax, x)); - MOUINFO->ypos = imax(MOUINFO->ymin, imin(MOUINFO->ymax, y)); - GrMouseUpdateCursor(); -} - -void GrMouseEventEnable(int enable_kb, int enable_ms) -{ - kbd_enabled = enable_kb; - mou_enabled = enable_ms; -} - -/* works with PS2 and IMPS2 mice, but the wheel is not used */ -static int _GrReadPS2MouseData(int *mb, int *mx, int *my) -{ - static int imps2 = 0; - static int count_to_imps2 = 0; - static int last_packed_ok = 0; - unsigned char buf[4]; - int evr = 0; - - *mx = *my = 0; - do { - if (read(mou_filedsc, buf, 1) < 1) - return evr; - if (!(buf[0] & 0x08)) { /* sync lost */ - if (!imps2) { - if (last_packed_ok) { /* an IMPS2 mouse? */ - count_to_imps2++; - if (count_to_imps2 > 20) - imps2 = 1; - } else - count_to_imps2 = 0; - last_packed_ok = 0; - } - return evr; - } - while (read(mou_filedsc, buf + 1, 1) != 1); - while (read(mou_filedsc, buf + 2, 1) != 1); - if (imps2) /* the IMPS2 protocol is 4 bytes wide */ - while (read(mou_filedsc, buf + 3, 1) != 1); - *mb = buf[0] & 0x7; - *mx += (buf[0] & 0x10) ? buf[1] - 256 : buf[1]; - *my += (buf[0] & 0x20) ? -(buf[2] - 256) : -buf[2]; - last_packed_ok = 1; - evr = 1; - } while (*mb == mou_buttons); - return evr; -} - -void _GrUpdateInputs(void) -{ - GrMouseEvent ev; - int mb, mx, my, gotevt; - - for (;;) { - gotevt = FALSE; - if (_lnxfb_waiting_to_switch_console) - _LnxfbSwitchConsoleAndWait(); - if (mou_enabled && (MOUINFO->msstatus == 2)) { - if (_GrReadPS2MouseData(&mb, &mx, &my)) { - update_coord(x, mx); - update_coord(y, my); - if (mb != mou_buttons) { - fill_mouse_ev(ev, - mou_buttons, mb, - PS2_LEFTBUTTON, - PS2_MIDDLEBUTTON, PS2_RIGHTBUTTON, - PS2_FOURTHBUTTON, PS2_FIFTHBUTTON, 0); - real_dtime(ev.dtime, evt_lasttime); - enqueue_event(ev); - MOUINFO->moved = FALSE; - mou_buttons = mb; - gotevt = TRUE; - } - } - } - if (kbd_enabled && kbd_isatty && _GrCheckKeyboardHit()) { - int key = _GrReadCharFromKeyboard(); - fill_keybd_ev(ev, key, 0); - real_dtime(ev.dtime, evt_lasttime); - enqueue_event(ev); - MOUINFO->moved = FALSE; - gotevt = TRUE; - } - if (!gotevt) - break; - } -} - -void GrMouseGetEventT(int flags, GrMouseEvent * ev, long tout) -{ - int msdraw; - if (MOUINFO->msstatus == 0) - GrMouseInit(); - msdraw = !MOUINFO->displayed && !(flags & GR_M_NOPAINT); - if (msdraw) - GrMouseDisplayCursor(); - for (;;) { - fd_set readfds; - struct timeval wtime; - int N; - _GrUpdateInputs(); - GrMouseUpdateCursor(); - while (MOUINFO->qlength > 0) { - dequeue_event((*ev)); - if (ev->flags & flags) { - if (msdraw) - GrMouseEraseCursor(); - return; - } - } - if ((flags & GR_M_POLL) || - (tout == 0) || (MOUINFO->moved && (flags & GR_M_MOTION))) { - fill_mouse_ev((*ev), - mou_buttons, mou_buttons, - PS2_LEFTBUTTON, - PS2_MIDDLEBUTTON, PS2_RIGHTBUTTON, - PS2_FOURTHBUTTON, PS2_FIFTHBUTTON, 0); - if (ev->flags) /* something happend */ - real_dtime(ev->dtime, evt_lasttime); - else - ev->dtime = -1; /* special time is nothing happend */ - MOUINFO->moved = FALSE; - if (msdraw) - GrMouseEraseCursor(); - return; - } - FD_ZERO(&readfds); - N = 0; - if (kbd_enabled && kbd_isatty) { - FD_SET(kbd_filedsc, &readfds); - N = kbd_filedsc + 1; - } - if (mou_enabled && (MOUINFO->msstatus == 2)) { - FD_SET(mou_filedsc, &readfds); - N = umax(N, (mou_filedsc + 1)); - } - if (N == 0) { - if (tout > 0) - usleep(tout * 1000); - tout = 0; - continue; - } - if (tout > 0) { - wtime.tv_sec = (tout / 1000); - wtime.tv_usec = (tout % 1000) * 1000; - if (select(N, &readfds, NULL, NULL, &wtime) < 1) - tout = 0; - continue; - } - select(N, &readfds, NULL, NULL, NULL); - } -} diff --git a/thirdparty/grx249/src/mouse/lnxinput.c b/thirdparty/grx249/src/mouse/lnxinput.c deleted file mode 100644 index b18cefa..0000000 --- a/thirdparty/grx249/src/mouse/lnxinput.c +++ /dev/null @@ -1,526 +0,0 @@ -/** - ** lnxinput.c ---- mouse and keyboard interface for Linux - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Mauro Condarelli (mc5686@mclink.it) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andris Pavenis (pavenis@acad.latnet.lv) - ** - **/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "libgrx.h" -#include "input.h" -#include "arith.h" -#include "memcopy.h" -#include "memfill.h" - -#include "grxkeys.h" - -/* - * keyboard stuff - */ -static struct termio kbd_setup; -static struct termio kbd_reset; -static int kbd_initted = FALSE; -static int kbd_enabled = TRUE; -static int kbd_isatty; -static int kbd_lastchr; -static int kbd_filedsc; -static enum { normal, test, wait } kbd_mode; - -static void kbd_restore(void) -{ - if(kbd_initted && kbd_isatty && (kbd_mode != normal)) { - ioctl(kbd_filedsc,TCSETA,&kbd_reset); - kbd_mode = normal; - } -} - -static void kbd_init(void) -{ - if(!kbd_initted) { - kbd_initted = TRUE; - kbd_lastchr = EOF; - kbd_filedsc = fileno(stdin); - kbd_isatty = isatty(kbd_filedsc); - if(kbd_isatty) { - ioctl(kbd_filedsc,TCGETA,&kbd_setup); - ioctl(kbd_filedsc,TCGETA,&kbd_reset); - kbd_setup.c_lflag &= ~(ICANON | ECHO ); - kbd_setup.c_iflag &= ~(INLCR | ICRNL); - atexit(kbd_restore); - kbd_mode = normal; - } - } -} - -static int n = 0; -static int getByte(int remove) - { - static unsigned char keybuf[10]; - int ch, f; - - if (n < 0) n = 0; - if (n<=0) { - f = read(kbd_filedsc, keybuf+n, 10-n); - if (f>0) n += f; - } - if (n<=0) return EOF; - ch = keybuf[0]; - if (remove) { - --n; - memmove(&keybuf[0],&keybuf[1], n*sizeof(unsigned char)); - } - return ch; - } - - -static const GrKeyType fnk[] = { - GrKey_F6, GrKey_F7, GrKey_F8, GrKey_F9, GrKey_F10, GrKey_Escape, - /* shift F1 == F11, shift F2 == F12 What code should be returned ?? */ - GrKey_Shift_F1, GrKey_Shift_F2, - GrKey_Shift_F3, GrKey_Shift_F4, - GrKey_Escape, GrKey_Shift_F5, GrKey_Shift_F6, GrKey_Escape, - GrKey_Shift_F7, GrKey_Shift_F8, GrKey_Shift_F9, GrKey_Shift_F10 }; - -static const GrKeyType alt[] = { - GrKey_Escape, GrKey_Alt_Escape, - 0x7f, GrKey_Alt_Backspace, - 'q', GrKey_Alt_Q, - 'w', GrKey_Alt_W, - 'e', GrKey_Alt_E, - 'r', GrKey_Alt_R, - 't', GrKey_Alt_T, - 'y', GrKey_Alt_Y, - 'u', GrKey_Alt_U, - 'i', GrKey_Alt_I, - 'o', GrKey_Alt_O, - 'p', GrKey_Alt_P, - '[', GrKey_Alt_LBracket, - ']', GrKey_Alt_RBracket, - GrKey_Return, GrKey_Alt_Return, - 'a', GrKey_Alt_A, - 's', GrKey_Alt_S, - 'd', GrKey_Alt_D, - 'f', GrKey_Alt_F, - 'g', GrKey_Alt_G, - 'h', GrKey_Alt_H, - 'j', GrKey_Alt_J, - 'k', GrKey_Alt_K, - 'l', GrKey_Alt_L, - ';', GrKey_Alt_Semicolon, - '\'', GrKey_Alt_Quote, - '\x60', GrKey_Alt_Backquote, - '\\', GrKey_Alt_Backslash, - 'z', GrKey_Alt_Z, - 'x', GrKey_Alt_X, - 'c', GrKey_Alt_C, - 'v', GrKey_Alt_V, - 'b', GrKey_Alt_B, - 'n', GrKey_Alt_N, - 'm', GrKey_Alt_M, - ',', GrKey_Alt_Comma, - '.', GrKey_Alt_Period, - '/', GrKey_Alt_Slash, -/* GrKey_Alt_F1 */ -/* GrKey_Alt_F2 */ -/* GrKey_Alt_F3 */ -/* GrKey_Alt_F4 */ -/* GrKey_Alt_F5 */ -/* GrKey_Alt_F6 */ -/* GrKey_Alt_F7 */ -/* GrKey_Alt_F8 */ -/* GrKey_Alt_F9 */ -/* GrKey_Alt_F10 */ - '1', GrKey_Alt_1, - '2', GrKey_Alt_2, - '3', GrKey_Alt_3, - '4', GrKey_Alt_4, - '5', GrKey_Alt_5, - '6', GrKey_Alt_6, - '7', GrKey_Alt_7, - '8', GrKey_Alt_8, - '9', GrKey_Alt_9, - '0', GrKey_Alt_0, - '-', GrKey_Alt_Dash, - '=', GrKey_Alt_Equals, -/* GrKey_Alt_F11 */ -/* GrKey_Alt_F12 */ -/* GrKey_Alt_KPSlash */ - GrKey_Tab, GrKey_Alt_Tab, -/* GrKey_Alt_Enter */ - '<', GrKey_Alt_LAngle, - '>', GrKey_Alt_RAngle, - '@', GrKey_Alt_At, - '{', GrKey_Alt_LBrace, - '|', GrKey_Alt_Pipe, - '}', GrKey_Alt_RBrace, - 0x0000, GrKey_NoKey -}; - -static GrKeyType keytrans(GrKeyType k, const GrKeyType *t) { - while (t[0] != 0x0000 && t[1] != GrKey_NoKey) { - if (k == t[0]) return t[1]; - t += 2; - } - return GrKey_OutsideValidRange; -} - -static -int inkey(void) { - int Key, Key2; - -Restart: - Key = getByte(1); - if (Key!=GrKey_Escape) { - if (Key == 0x7f) return(GrKey_BackSpace); - return(Key); - } - if (n==0) return(GrKey_Escape); - /* We have ^[ and something more after that */ - - Key = getByte(1); - if (Key == EOF) return(GrKey_Escape); - if (Key!='[') return(keytrans(Key,alt)); /* Check for Alt+Key */ - - /* We have ^[[ */ - if (n==0) return(GrKey_Alt_LBracket); - - Key = getByte(1); - if (Key == EOF) return(GrKey_Alt_LBracket);; - switch (Key) - { - case 'A': return(GrKey_Up); - case 'B': return(GrKey_Down); - case 'C': return(GrKey_Right); - case 'D': return(GrKey_Left); - case 'G': return(GrKey_Center); - case '[': Key = getByte(1); - switch (Key) - { - case 'A': return(GrKey_F1); - case 'B': return(GrKey_F2); - case 'C': return(GrKey_F3); - case 'D': return(GrKey_F4); - case 'E': return(GrKey_F5); - default: goto Restart; - } - default: if (Key>='1' && Key<='6') - { - Key2 = getByte(1); - if (Key2=='~') switch (Key) - { - case '1': return(GrKey_Home); - case '2': return(GrKey_Insert); - case '3': return(GrKey_Delete); - case '4': return(GrKey_End); - case '5': return(GrKey_PageUp); - case '6': return(GrKey_PageDown); - } - else if (Key2>='0' && Key2<='9') - { - int index = 10*(Key-'0') + (Key2 - '0'); - if (getByte(1)!='~') goto Restart; - if (17 <= index && index <= 34) - return(fnk[index-17]); - goto Restart; - } - } - goto Restart; - } -} - -static int validKey(int key, int valid) { - if (key < 0 || key > GrKey_LastDefinedKeycode || key == EOF) - return valid; - return key; -} - -int _GrCheckKeyboardHit(void) -{ - if(!kbd_initted) { - kbd_init(); - } - if(!kbd_isatty) { - return(TRUE); - } - if(kbd_lastchr != EOF) { - return(TRUE); - } - if(kbd_mode != test) { - kbd_setup.c_cc[VMIN] = 0; - kbd_setup.c_cc[VTIME] = 0; - if(ioctl(kbd_filedsc,TCSETAW,&kbd_setup) == EOF) return(FALSE); - kbd_mode = test; - } - kbd_lastchr = validKey(inkey(), EOF); - return (kbd_lastchr != EOF); -} - -int _GrReadCharFromKeyboard(void) -{ - int key = EOF; - - if(!kbd_initted) { - kbd_init(); - } - if(!kbd_isatty) { - return(getc(stdin)); - } - do { - if(kbd_lastchr != EOF) { - key = kbd_lastchr; - kbd_lastchr = EOF; - break; - } - if(kbd_mode == test) { - /* we're in test mode. Look for key without mode switch ... */ - _GrCheckKeyboardHit(); - if(kbd_lastchr != EOF) { - key = kbd_lastchr; - kbd_lastchr = EOF; - break; - } - } - /* no key till now. Wait of it ... */ - if(kbd_mode != wait) { - kbd_setup.c_cc[VMIN] = 1; - kbd_setup.c_cc[VTIME] = 0; - if(ioctl(kbd_filedsc,TCSETAW,&kbd_setup) == EOF) return(EOF); - kbd_mode = wait; - } - key = inkey(); - } while (0); - return validKey(key, GrKey_OutsideValidRange); -} - -/* - * Mouse stuff - */ - -static int mou_filedsc; -static int mou_lastxpos; -static int mou_lastypos; -static int mou_buttons; -static int mou_enabled = TRUE; -static long evt_lasttime; - -int GrMouseDetect(void) -{ - if(MOUINFO->msstatus == 0) { - MOUINFO->msstatus = (-1); /* assume missing */ - mou_filedsc = mouse_init_return_fd( - "/dev/mouse", - vga_getmousetype(), - MOUSE_DEFAULTSAMPLERATE - ); - if(mou_filedsc >= 0) { - MOUINFO->msstatus = 1; /* present, but not initted */ - atexit(mouse_close); - mouse_setxrange(0,32767); - mouse_setyrange(0,32767); - mouse_setwrap(MOUSE_NOWRAP); - mouse_setscale(16); - } - } - return((MOUINFO->msstatus > 0) ? TRUE : FALSE); -} - -static void uninit(void) -{ - if(MOUINFO->msstatus > 1) MOUINFO->msstatus = 1; - kbd_restore(); -} - -void GrMouseInitN(int queue_size) -{ - uninit(); - queue_size = umax(4,umin(256,queue_size)); - init_queue(queue_size); - kbd_init(); - if(GrMouseDetect()) { - GrMouseSetSpeed(1,1); - GrMouseSetAccel(100,1); - GrMouseSetLimits(0,0,SCRN->gc_xmax,SCRN->gc_ymax); - GrMouseWarp((SCRN->gc_xmax >> 1),(SCRN->gc_ymax >> 1)); - _GrInitMouseCursor(); - MOUINFO->msstatus = 2; - } - GrMouseEventEnable(TRUE,TRUE); - real_time(evt_lasttime); - MOUINFO->uninit = uninit; -} - -void GrMouseSetSpeed(int spmult,int spdiv) -{ - MOUINFO->spmult = umin(16,umax(1,spmult)); - MOUINFO->spdiv = umin(16,umax(1,spdiv)); -} - -void GrMouseSetAccel(int thresh,int accel) -{ - MOUINFO->thresh = umin(64,umax(1,thresh)); - MOUINFO->accel = umin(16,umax(1,accel)); -} - -void GrMouseSetLimits(int x1,int y1,int x2,int y2) -{ - isort(x1,x2); - isort(y1,y2); - MOUINFO->xmin = imax(0,imin(x1,SCRN->gc_xmax)); - MOUINFO->ymin = imax(0,imin(y1,SCRN->gc_ymax)); - MOUINFO->xmax = imax(0,imin(x2,SCRN->gc_xmax)); - MOUINFO->ymax = imax(0,imin(y2,SCRN->gc_ymax)); -} - -void GrMouseWarp(int x,int y) -{ - MOUINFO->xpos = imax(MOUINFO->xmin,imin(MOUINFO->xmax,x)); - MOUINFO->ypos = imax(MOUINFO->ymin,imin(MOUINFO->ymax,y)); - mou_lastxpos = 16384; - mou_lastypos = 16384; - mouse_setposition(16384,16384); - GrMouseUpdateCursor(); -} - -void GrMouseEventEnable(int enable_kb,int enable_ms) -{ - if(!enable_kb) kbd_restore(); - kbd_enabled = enable_kb; - mou_enabled = enable_ms; -} - -void _GrUpdateInputs(void) -{ - for( ; ; ) { - GrMouseEvent ev; - int gotevt = FALSE; - if(mou_enabled && (MOUINFO->msstatus == 2) && mouse_update()) { - int mx = mouse_getx(); - int my = mouse_gety(); - int mb = mouse_getbutton(); - update_coord(x,(mx - mou_lastxpos)); - update_coord(y,(my - mou_lastypos)); - mou_lastxpos = mx; - mou_lastypos = my; - if(mb != mou_buttons) { - fill_mouse_ev( - ev, - mou_buttons,mb, - MOUSE_LEFTBUTTON, - MOUSE_MIDDLEBUTTON, - MOUSE_RIGHTBUTTON, - MOUSE_FOURTHBUTTON, - MOUSE_FIFTHBUTTON, - 0 - ); - real_dtime(ev.dtime,evt_lasttime); - enqueue_event(ev); - MOUINFO->moved = FALSE; - mou_buttons = mb; - } - gotevt = TRUE; - } - if(kbd_enabled && kbd_isatty && _GrCheckKeyboardHit()) { - int key = _GrReadCharFromKeyboard(); - fill_keybd_ev(ev,key,0); - real_dtime(ev.dtime,evt_lasttime); - enqueue_event(ev); - MOUINFO->moved = FALSE; - gotevt = TRUE; - } - if(!gotevt) break; - } -} - -void GrMouseGetEventT(int flags,GrMouseEvent *ev,long tout) -{ - int msdraw; - if(MOUINFO->msstatus == 0) GrMouseInit(); - msdraw = !MOUINFO->displayed && !(flags & GR_M_NOPAINT); - if(msdraw) GrMouseDisplayCursor(); - for( ; ; ) { - fd_set readfds; - struct timeval wtime; - int N; - _GrUpdateInputs(); - GrMouseUpdateCursor(); - while(MOUINFO->qlength > 0) { - dequeue_event((*ev)); - if(ev->flags & flags) { - if(msdraw) GrMouseEraseCursor(); - return; - } - } - if((flags & GR_M_POLL) || - (tout == 0) || - (MOUINFO->moved && (flags & GR_M_MOTION))) { - fill_mouse_ev( - (*ev), - mou_buttons,mou_buttons, - MOUSE_LEFTBUTTON, - MOUSE_MIDDLEBUTTON, - MOUSE_RIGHTBUTTON, - MOUSE_FOURTHBUTTON, - MOUSE_FIFTHBUTTON, - 0 - ); - if ( ev->flags ) /* something happend */ - real_dtime(ev->dtime,evt_lasttime); - else - ev->dtime = -1; /* special time is nothing happend */ - MOUINFO->moved = FALSE; - if(msdraw) GrMouseEraseCursor(); - return; - } - FD_ZERO(&readfds); - N = 0; - if(kbd_enabled && kbd_isatty) { - FD_SET(kbd_filedsc,&readfds); - N = kbd_filedsc + 1; - } - if(mou_enabled && (MOUINFO->msstatus == 2)) { - FD_SET(mou_filedsc,&readfds); - N = umax(N,(mou_filedsc + 1)); - } - if(N == 0) { - if(tout > 0) usleep(tout * 1000); - tout = 0; - continue; - } - if(tout > 0) { - wtime.tv_sec = (tout / 1000); - wtime.tv_usec = (tout % 1000) * 1000; - if(select(N,&readfds,NULL,NULL,&wtime) < 1) - tout = 0; - continue; - } - select(N,&readfds,NULL,NULL,NULL); - } -} - diff --git a/thirdparty/grx249/src/mouse/lnxkeys.c b/thirdparty/grx249/src/mouse/lnxkeys.c deleted file mode 100644 index bbb270f..0000000 --- a/thirdparty/grx249/src/mouse/lnxkeys.c +++ /dev/null @@ -1,63 +0,0 @@ -/** - ** lnxkeys.c ---- DOS (TCC/BCC/DJGPP: "conio.h") style keyboard utilities - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#include "libgrx.h" -#include "input.h" - -#include "grxkeys.h" - -int kbhit(void) -{ - return(_GrCheckKeyboardHit()); -} - -int getch(void) -{ - return(_GrReadCharFromKeyboard()); -} - -int getkey(void) -{ - return(_GrReadCharFromKeyboard()); -} - -int getkbstat(void) -{ - return(0); -} - - -/* -** new functions to replace the old style -** kbhit / getch / getkey / getxkey / getkbstat -** keyboard interface -*/ -int GrKeyPressed(void) { - return(_GrCheckKeyboardHit()); -} - -GrKeyType GrKeyRead(void) { - return (GrKeyType)_GrReadCharFromKeyboard(); -} - -int GrKeyStat(void) { - return(0); -} diff --git a/thirdparty/grx249/src/mouse/mouinfo.c b/thirdparty/grx249/src/mouse/mouinfo.c deleted file mode 100644 index 0d61a1f..0000000 --- a/thirdparty/grx249/src/mouse/mouinfo.c +++ /dev/null @@ -1,24 +0,0 @@ -/** - ** mouinfo.c ---- the mouse info data structure - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#undef GrMouseInfo - -const -struct _GR_mouseInfo * const GrMouseInfo = &_GrMouseInfo; -struct _GR_mouseInfo _GrMouseInfo = { 0 }; diff --git a/thirdparty/grx249/src/mouse/mouinlne.c b/thirdparty/grx249/src/mouse/mouinlne.c deleted file mode 100644 index ba33270..0000000 --- a/thirdparty/grx249/src/mouse/mouinlne.c +++ /dev/null @@ -1,70 +0,0 @@ -/** - ** mouinlne.c ---- the mouse inline functions - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -void (GrMouseEventMode)(int dummy) -{ - GrMouseEventMode(dummy); -} - -void (GrMouseInit)(void) -{ - GrMouseInit(); -} - -void (GrMouseUnInit)(void) -{ - GrMouseUnInit(); -} - -void (GrMouseGetEvent)(int flags,GrMouseEvent *event) -{ - GrMouseGetEvent(flags,event); -} - -int (GrMousePendingEvent)(void) -{ - return(GrMousePendingEvent()); -} - -GrCursor *(GrMouseGetCursor)(void) -{ - return(GrMouseGetCursor()); -} - -int (GrMouseCursorIsDisplayed)(void) -{ - return(GrMouseCursorIsDisplayed()); -} - -void (GrMouseGetLimits)(int *x1,int *y1,int *x2,int *y2) -{ - GrMouseGetLimits(x1,y1,x2,y2); -} - -int (GrMouseBlock)(GrContext *c,int x1,int y1,int x2,int y2) -{ - return(GrMouseBlock(c,x1,y1,x2,y2)); -} - -void (GrMouseUnBlock)(int flags) -{ - GrMouseUnBlock(flags); -} - diff --git a/thirdparty/grx249/src/mouse/mscursor.c b/thirdparty/grx249/src/mouse/mscursor.c deleted file mode 100644 index 152aafa..0000000 --- a/thirdparty/grx249/src/mouse/mscursor.c +++ /dev/null @@ -1,289 +0,0 @@ -/** - ** mscursor.c ---- the mouse cursor related stuff - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include - -#include "mouse/input.h" -#include "libgrx.h" -#include "clipping.h" -#include "mempeek.h" - -#define MSCURSOR (MOUINFO->cursor) -#define CURSORMODE (MOUINFO->cursmode) -#define SPECIALMODE (MOUINFO->cursmode != GR_M_CUR_NORMAL) -#define BLOCKED 1 -#define ERASED 2 - -static void draw_special(void) -{ - int xpos = MSCURSOR->xcord; - int ypos = MSCURSOR->ycord; - int check = MOUINFO->docheck; - GrContext csave; - MOUINFO->docheck = FALSE; - GrSaveContext(&csave); - GrSetContext(SCRN); - switch(CURSORMODE) { - case GR_M_CUR_RUBBER: - GrBox(xpos,ypos,MOUINFO->x1,MOUINFO->y1,MOUINFO->curscolor); - break; - case GR_M_CUR_LINE: - GrLine(xpos,ypos,MOUINFO->x1,MOUINFO->y1,MOUINFO->curscolor); - break; - case GR_M_CUR_BOX: - GrBox( - (xpos + MOUINFO->x1),(ypos + MOUINFO->y1), - (xpos + MOUINFO->x2),(ypos + MOUINFO->y2), - MOUINFO->curscolor - ); - break; - } - GrSetContext(&csave); - MOUINFO->docheck = check; -} - -static void move_mouse(void) -{ - if((MOUINFO->xpos != MSCURSOR->xcord) || - (MOUINFO->ypos != MSCURSOR->ycord)) { - int check = MOUINFO->docheck; - int dospec = SPECIALMODE && MSCURSOR->displayed; - MOUINFO->docheck = FALSE; - if(dospec) draw_special(); - GrMoveCursor(MSCURSOR,MOUINFO->xpos,MOUINFO->ypos); - if(dospec) draw_special(); - MOUINFO->docheck = check; - } -} - -static void draw_mouse(void) -{ - int check = MOUINFO->docheck; - MOUINFO->docheck = FALSE; - GrDisplayCursor(MSCURSOR); - if(SPECIALMODE) draw_special(); - MOUINFO->docheck = check; -} - -static void erase_mouse(void) -{ - int check = MOUINFO->docheck; - MOUINFO->docheck = FALSE; - if(SPECIALMODE) draw_special(); - GrEraseCursor(MSCURSOR); - MOUINFO->docheck = check; -} - -void GrMouseDisplayCursor(void) -{ - if(MOUINFO->msstatus != 2) GrMouseInit(); - if(MOUINFO->msstatus != 2) return; - if(MOUINFO->cursor == NULL) return; - if(MOUINFO->displayed != FALSE) return; - move_mouse(); - draw_mouse(); - MOUINFO->displayed = TRUE; - MOUINFO->docheck = TRUE; - MOUINFO->blockflag = 0; -} - -void GrMouseEraseCursor(void) -{ - if(MOUINFO->msstatus != 2) return; - if(MOUINFO->cursor == NULL) return; - if(MOUINFO->displayed == FALSE) return; - if(MOUINFO->blockflag != 0) return; - MOUINFO->displayed = FALSE; - MOUINFO->docheck = FALSE; - erase_mouse(); -} - -void GrMouseSetCursor(GrCursor *C) -{ - if(!MOUINFO->displayed && C && (C != MSCURSOR) && COMPATIBLE(C)) { - GrCursor *oldcursor = MSCURSOR; - if(C->displayed) GrEraseCursor(C); - MOUINFO->cursor = C; - if(MOUINFO->owncursor) GrDestroyCursor(oldcursor); - MOUINFO->owncursor = FALSE; - } -} - -void GrMouseSetColors(GrColor fg,GrColor bg) -{ - static char ptr12x16bits[] = { - 0,1,0,0,0,0,0,0,0,0,0,0, - 1,2,1,0,0,0,0,0,0,0,0,0, - 1,2,2,1,0,0,0,0,0,0,0,0, - 1,2,2,2,1,0,0,0,0,0,0,0, - 1,2,2,2,2,1,0,0,0,0,0,0, - 1,2,2,2,2,2,1,0,0,0,0,0, - 1,2,2,2,2,2,2,1,0,0,0,0, - 1,2,2,2,2,2,2,2,1,0,0,0, - 1,2,2,2,2,2,2,2,2,1,0,0, - 1,2,2,2,2,2,2,2,2,2,1,0, - 1,2,2,2,2,2,2,2,2,2,2,1, - 1,2,2,2,2,1,1,1,1,1,1,0, - 1,2,2,2,1,0,0,0,0,0,0,0, - 1,2,2,1,0,0,0,0,0,0,0,0, - 1,2,1,0,0,0,0,0,0,0,0,0, - 0,1,0,0,0,0,0,0,0,0,0,0, - }; - GrCursor *newc; - GrColor cols[3]; - if(MOUINFO->displayed) return; - cols[0] = 2; - cols[1] = bg; - cols[2] = fg; - newc = GrBuildCursor(ptr12x16bits,12,12,16,1,1,cols); - if(!newc) return; - GrMouseSetCursor(newc); - MOUINFO->owncursor = TRUE; -} - -void GrMouseSetCursorMode(int mode,...) -{ - va_list ap; - if(MOUINFO->displayed) return; - va_start(ap,mode); - switch(mode) { - case GR_M_CUR_BOX: - MOUINFO->x2 = va_arg(ap,int); - MOUINFO->y2 = va_arg(ap,int); - case GR_M_CUR_RUBBER: - case GR_M_CUR_LINE: - MOUINFO->cursmode = mode; - MOUINFO->x1 = va_arg(ap,int); - MOUINFO->y1 = va_arg(ap,int); - MOUINFO->curscolor = GrXorModeColor(va_arg(ap,GrColor)); - break; - default: - MOUINFO->cursmode = GR_M_CUR_NORMAL; - break; - } - va_end(ap); -} - -static int block(GrContext *c,int x1,int y1,int x2,int y2) -{ - int mx1,my1,mx2,my2,oldblock = MOUINFO->blockflag; - if(!c) c = CURC; - if(!MOUINFO->displayed) return(0); - if(!MOUINFO->docheck) return(0); - if(!c->gc_onscreen) return(0); - if(oldblock & ERASED) return(0); - MOUINFO->blockflag = BLOCKED; - isort(x1,x2); x1 += c->gc_xoffset; x2 += c->gc_xoffset; - isort(y1,y2); y1 += c->gc_yoffset; y2 += c->gc_yoffset; - mx1 = MSCURSOR->xwpos; - my1 = MSCURSOR->ywpos; - mx2 = MSCURSOR->xwork + mx1 - 1; - my2 = MSCURSOR->ywork + my1 - 1; - if(SPECIALMODE) { - int cx1,cy1,cx2,cy2; - switch(CURSORMODE) { - case GR_M_CUR_RUBBER: - case GR_M_CUR_LINE: - cx1 = MSCURSOR->xcord; - cy1 = MSCURSOR->ycord; - cx2 = MOUINFO->x1; - cy2 = MOUINFO->y1; - break; - case GR_M_CUR_BOX: - cx1 = MSCURSOR->xcord + MOUINFO->x1; - cy1 = MSCURSOR->ycord + MOUINFO->y1; - cx2 = MSCURSOR->xcord + MOUINFO->x2; - cy2 = MSCURSOR->ycord + MOUINFO->y2; - break; - default: - return(0); - } - isort(cx1,cx2); mx1 = imin(cx1,mx1); mx2 = imax(mx2,cx2); - isort(cy1,cy2); my1 = imin(cy1,my1); my2 = imax(my2,cy2); - } - x1 = imax(x1,mx1); y1 = imax(y1,my1); - x2 = imin(x2,mx2); y2 = imin(y2,my2); - if((x1 <= x2) && (y1 <= y2)) { - MOUINFO->blockflag = oldblock | ERASED; - MOUINFO->docheck = FALSE; - erase_mouse(); - return(ERASED); - } - return((oldblock & BLOCKED) ? 0 : BLOCKED); -} - -static void unblock(int flags) -{ - if(!MOUINFO->displayed) return; - if(flags & MOUINFO->blockflag & ERASED) { - if(!(MOUINFO->blockflag & BLOCKED) || (flags & BLOCKED)) { - _GrUpdateInputs(); - move_mouse(); - MOUINFO->blockflag &= ~BLOCKED; - } - draw_mouse(); - MOUINFO->blockflag &= ~ERASED; - MOUINFO->docheck = TRUE; - return; - } - if(flags & MOUINFO->blockflag & BLOCKED) { - if(!(MOUINFO->blockflag & ERASED)) { - int updflag; - test_unblock(updflag); - if(updflag) { - _GrUpdateInputs(); - move_mouse(); - } - } - MOUINFO->blockflag &= ~BLOCKED; - } -} - -void GrMouseUpdateCursor(void) -{ - if(MOUINFO->displayed && !MOUINFO->blockflag) { - _GrUpdateInputs(); - move_mouse(); - } -} - -void _GrInitMouseCursor(void) -{ - if(MSCURSOR && !COMPATIBLE(MSCURSOR)) { - if(MOUINFO->owncursor) { - GrCursor *obsolete = MSCURSOR; - MOUINFO->cursor = NULL; - MOUINFO->owncursor = FALSE; - GrDestroyCursor(obsolete); - } - MOUINFO->cursor = NULL; - } - if(MSCURSOR == NULL) { - GrMouseSetColors(GrAllocColor(255,0,0),GrBlack()); - } - if(MSCURSOR && MSCURSOR->displayed) { - GrEraseCursor(MSCURSOR); - } - MOUINFO->cursmode = GR_M_CUR_NORMAL; - MOUINFO->displayed = FALSE; - MOUINFO->blockflag = 0; - MOUINFO->docheck = FALSE; - MOUINFO->block = block; - MOUINFO->unblock = unblock; -} - diff --git a/thirdparty/grx249/src/mouse/mstime.c b/thirdparty/grx249/src/mouse/mstime.c deleted file mode 100644 index c76ea52..0000000 --- a/thirdparty/grx249/src/mouse/mstime.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - ** mstime.c ---- millisecond time - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "mouse/input.h" - -long GrMsecTime( void ) -{ - long tv; - real_time(tv); - return (tv * MS_PER_TICK); -} diff --git a/thirdparty/grx249/src/mouse/sdlinp.c b/thirdparty/grx249/src/mouse/sdlinp.c deleted file mode 100644 index cbdaf4d..0000000 --- a/thirdparty/grx249/src/mouse/sdlinp.c +++ /dev/null @@ -1,324 +0,0 @@ -/** - ** sdlinp.c ---- mouse and keyboard interface for SDL - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** FIXME: sdlinp/xwininp: the i18n (cyrillic etc.) keys don't work. - ** FIXME: win32: Alt-Tab-Alt-Shift-Tab nails the Alt state to unset. - ** - **/ - -#include "libsdl.h" -#include "libgrx.h" -#include "grxkeys.h" -#include "input.h" -#include "arith.h" -#include "memcopy.h" -#include "sdlinput.h" - -int _nkeyssdlpool = 0; -int _keyssdlpool[_MAXKEYSSDLPOOL]; - -static int kbd_enabled = TRUE; -static int kbd_hitcount = 0; -static int mou_enabled = TRUE; -static int mou_buttons = 0; -static long evt_lasttime; - -int _GrIsKbdEnabled(void) -{ - return kbd_enabled; -} - -int _GrKeyPressed(void) -{ - _GrUpdateInputs(); - if (kbd_enabled) - return (kbd_hitcount > 0); - else - return (_nkeyssdlpool > 0); -} - -static void uninit(void) -{ - if (MOUINFO->msstatus > 1) { - MOUINFO->msstatus = 1; - } -} - -int GrMouseDetect(void) -{ -#if defined(__WIN32__) - return(GetSystemMetrics(SM_MOUSEPRESENT)); -#else - return TRUE; -#endif -} - -void GrMouseInitN(int queue_size) -{ - uninit(); - queue_size = umax(4, umin(256, queue_size)); - init_queue(queue_size); - kbd_hitcount = 0; - if (GrMouseDetect()) { - GrMouseSetSpeed(1, 1); - GrMouseSetAccel(100, 1); - GrMouseSetLimits(0, 0, SCRN->gc_xmax, SCRN->gc_ymax); - GrMouseWarp((SCRN->gc_xmax >> 1), (SCRN->gc_ymax >> 1)); - _GrInitMouseCursor(); - MOUINFO->msstatus = 2; - mou_buttons = 0; - } - GrMouseEventEnable(TRUE, TRUE); - real_time(evt_lasttime); - MOUINFO->uninit = uninit; -} - -void GrMouseSetSpeed(int spmult, int spdiv) -{ - MOUINFO->spmult = umin(16, umax(1, spmult)); - MOUINFO->spdiv = umin(16, umax(1, spdiv)); -} - -void GrMouseSetAccel(int thresh, int accel) -{ - MOUINFO->thresh = umin(64, umax(1, thresh)); - MOUINFO->accel = umin(16, umax(1, accel)); -} - -void GrMouseSetLimits(int x1, int y1, int x2, int y2) -{ - isort(x1, x2); - isort(y1, y2); - MOUINFO->xmin = imax(0, imin(x1, SCRN->gc_xmax)); - MOUINFO->ymin = imax(0, imin(y1, SCRN->gc_ymax)); - MOUINFO->xmax = imax(0, imin(x2, SCRN->gc_xmax)); - MOUINFO->ymax = imax(0, imin(y2, SCRN->gc_ymax)); -} - -void GrMouseWarp(int x, int y) -{ - MOUINFO->xpos = imax(MOUINFO->xmin, imin(MOUINFO->xmax, x)); - MOUINFO->ypos = imax(MOUINFO->ymin, imin(MOUINFO->ymax, y)); - GrMouseUpdateCursor(); - SDL_WarpMouse(MOUINFO->xpos, MOUINFO->ypos); -} - -void GrMouseEventEnable(int enable_kb, int enable_ms) -{ - kbd_enabled = enable_kb; - mou_enabled = enable_ms; -} - -void GrMouseGetEventT(int flags, GrMouseEvent * ev, long tout) -{ - int msdraw; - - if (MOUINFO->msstatus == 0) GrMouseInit(); - - msdraw = !MOUINFO->displayed && !(flags & GR_M_NOPAINT); - if (msdraw) GrMouseDisplayCursor(); - - if (tout <= 0L) tout = 1L; - - for (;;) { - _GrUpdateInputs(); - GrMouseUpdateCursor(); - while (MOUINFO->qlength > 0) { - dequeue_event((*ev)); - if (ev->flags & GR_M_KEYPRESS) kbd_hitcount--; - if (ev->flags & flags) { - if (msdraw) GrMouseEraseCursor(); - return; - } - } - if ((flags & GR_M_POLL) || - (tout == 0L) || (MOUINFO->moved && (flags & GR_M_MOTION))) { - fill_mouse_ev((*ev), - mou_buttons, mou_buttons, - GR_M_LEFT, GR_M_MIDDLE, GR_M_RIGHT, GR_M_P4, GR_M_P5, GrKeyStat()); - if (ev->flags) /* something happend */ - real_dtime(ev->dtime, evt_lasttime); - else - ev->dtime = -1; /* special time if nothing happend */ - MOUINFO->moved = FALSE; - if (msdraw) { - GrMouseEraseCursor(); - } - return; - } - if (tout > 0L) { - SDL_Delay(10); - if ((tout -= 10) < 0L) tout = 0L; - } - } -} - -#if defined(__XWIN__) -#define DSC 0x08 -#else -#define DSC 0x00 -#endif - -static GrKeyType StdKeyTranslate(SDL_keysym *keysym) -{ - keytrans *k; - int i; - - /*printf("scancode = %x, unicode = %d , sym = %d, mod = %x\n", - keysym->scancode, keysym->unicode, keysym->sym, keysym->mod);*/ - - if (keysym->mod & KMOD_ALT) { - if(keysym->scancode >= 0x10+DSC && keysym->scancode <= 0x35+DSC) - return(keysym->scancode + 0x100-DSC); - if(keysym->scancode >= 0x02+DSC && keysym->scancode <= 0x0d+DSC) - return(keysym->scancode + 0x176-DSC); - k = altstdkeys; - } - else if (keysym->mod & KMOD_CTRL) k = controlstdkeys; - else if (keysym->mod & KMOD_SHIFT) k = shiftstdkeys; - else k = stdkeys; - - if(keysym->sym >= SDLK_KP0 && keysym->sym <= SDLK_KP_PERIOD) { - if(k == stdkeys && (keysym->mod & KMOD_NUM)) - return(numchars[keysym->sym - SDLK_KP0]); - keysym->sym = numkeys[keysym->sym - SDLK_KP0]; - } - - for (i = 0; i < NSTDKEYS; i++) - if (keysym->sym == k[i].sdlkey) return k[i].grkey; - - return(keysym->unicode & 0xFF); -} - -static int DequeueSDLEvent(GrMouseEvent *ev) -{ - SDL_Event event; - GrKeyType key; - int buttons; - static int quit = FALSE; - -#if defined(__WIN32__) - if(!_SGrActive) { - do SDL_WaitEvent(&event); while(!_SGrActive); - if(_SGrBackup != NULL) { - if(!SDL_LockSurface(_SGrScreen)) { - memcpy(_SGrScreen->pixels, _SGrBackup, _SGrLength); - SDL_UnlockSurface(_SGrScreen); - } - free(_SGrBackup); - _SGrBackup = NULL; - } - } -#endif - - if(SDL_PollEvent(&event) == 0) - return(0); - - switch(event.type) { - - case SDL_KEYDOWN : - if((key = StdKeyTranslate(&event.key.keysym)) != 0) { - fill_keybd_ev((*ev), key, event.key.keysym.mod); - return(1); - } - return(-1); - - case SDL_MOUSEBUTTONDOWN : - switch(event.button.button) { - case SDL_BUTTON_LEFT : buttons = GR_M_LEFT | mou_buttons; break; - case SDL_BUTTON_RIGHT : buttons = GR_M_RIGHT | mou_buttons; break; - case SDL_BUTTON_MIDDLE : buttons = GR_M_MIDDLE | mou_buttons; break; - case SDL_BUTTON_WHEELUP: buttons = GR_M_P4 | mou_buttons; break; - case SDL_BUTTON_WHEELDOWN : buttons = GR_M_P5 | mou_buttons; break; - default : return(-1); - } - fill_mouse_ev((*ev), mou_buttons, buttons, GR_M_LEFT, - GR_M_MIDDLE, GR_M_RIGHT, GR_M_P4, GR_M_P5, GrKeyStat()); - mou_buttons = buttons; - MOUINFO->moved = FALSE; - return(1); - - case SDL_MOUSEBUTTONUP : - switch(event.button.button) { - case SDL_BUTTON_LEFT : buttons = ~GR_M_LEFT & mou_buttons; break; - case SDL_BUTTON_RIGHT : buttons = ~GR_M_RIGHT & mou_buttons; break; - case SDL_BUTTON_MIDDLE : buttons = ~GR_M_MIDDLE & mou_buttons; break; - case SDL_BUTTON_WHEELUP: buttons = ~GR_M_P4 & mou_buttons; break; - case SDL_BUTTON_WHEELDOWN : buttons = ~GR_M_P5 & mou_buttons; break; - default : return(-1); - } - fill_mouse_ev((*ev), mou_buttons, buttons, GR_M_LEFT, - GR_M_MIDDLE, GR_M_RIGHT, GR_M_P4, GR_M_P5, GrKeyStat()); - mou_buttons = buttons; - MOUINFO->moved = FALSE; - return(1); - - case SDL_MOUSEMOTION : - MOUINFO->xpos = event.motion.x; - MOUINFO->ypos = event.motion.y; - MOUINFO->moved = TRUE; - return(-1); - - case SDL_QUIT : -#if defined(__WIN32__) - if((_SGrScreen->flags & SDL_HWSURFACE) == SDL_HWSURFACE) { - if(!quit) { - MessageBeep(0xFFFFFFFF); - quit = TRUE; - return(-1); - } - } - else if(MessageBox(NULL, "Abort the program?", "GRX", MB_APPLMODAL | - MB_ICONQUESTION | MB_YESNO) != IDYES) return(-1); -#elif defined(__XWIN__) - if(!quit) { - if(isatty(fileno(stderr))) - fputs("GRX: request quit again to abort the program.\a\n", - stderr); - quit = TRUE; - return(-1); - } -#endif - exit(1); - - default : - return(-1); - - } -} - -void _GrUpdateInputs(void) -{ - GrMouseEvent ev; - int r; - - if(SDL_MUSTLOCK(_SGrScreen)) SDL_UnlockSurface(_SGrScreen); - while ((r = DequeueSDLEvent(&ev)) != 0) { - if (r > 0) { - if (ev.flags & GR_M_KEYPRESS && !kbd_enabled){ - if (_nkeyssdlpool < _MAXKEYSSDLPOOL) - _keyssdlpool[_nkeyssdlpool++] = ev.key; - } - else{ - real_dtime(ev.dtime, evt_lasttime); - enqueue_event(ev); - if (ev.flags & GR_M_KEYPRESS) kbd_hitcount++; - } - } - } - if(SDL_MUSTLOCK(_SGrScreen)) SDL_LockSurface(_SGrScreen); -} - diff --git a/thirdparty/grx249/src/mouse/sdlinput.h b/thirdparty/grx249/src/mouse/sdlinput.h deleted file mode 100644 index 216c9e6..0000000 --- a/thirdparty/grx249/src/mouse/sdlinput.h +++ /dev/null @@ -1,189 +0,0 @@ -/** - ** sdlinput.h ---- SDL to GRX keys conversion tables - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef _SDLINPUT_H_ -#define _SDLINPUT_H_ - -typedef struct { - SDLKey sdlkey; - GrKeyType grkey; -} keytrans; - -#define NSTDKEYS 33 - -static keytrans stdkeys[NSTDKEYS] = { - { SDLK_PAGEUP, GrKey_PageUp }, - { SDLK_PAGEDOWN, GrKey_PageDown }, - { SDLK_END, GrKey_End }, - { SDLK_HOME, GrKey_Home }, - { SDLK_LEFT, GrKey_Left }, - { SDLK_UP, GrKey_Up }, - { SDLK_RIGHT, GrKey_Right }, - { SDLK_DOWN, GrKey_Down }, - { SDLK_INSERT, GrKey_Insert }, - { SDLK_DELETE, GrKey_Delete }, - { SDLK_F1, GrKey_F1 }, - { SDLK_F2, GrKey_F2 }, - { SDLK_F3, GrKey_F3 }, - { SDLK_F4, GrKey_F4 }, - { SDLK_F5, GrKey_F5 }, - { SDLK_F6, GrKey_F6 }, - { SDLK_F7, GrKey_F7 }, - { SDLK_F8, GrKey_F8 }, - { SDLK_F9, GrKey_F9 }, - { SDLK_F10, GrKey_F10 }, - { SDLK_F11, GrKey_F11 }, - { SDLK_F12, GrKey_F12 }, - { SDLK_KP5, GrKey_Center }, - { SDLK_KP_DIVIDE, GrKey_Slash }, - { SDLK_KP_MULTIPLY, GrKey_Star }, - { SDLK_KP_MINUS, GrKey_Dash }, - { SDLK_KP_PLUS, GrKey_Plus }, - { SDLK_KP_ENTER, GrKey_Return }, - { SDLK_KP_EQUALS, GrKey_Equals }, - { SDLK_BACKSPACE, GrKey_BackSpace }, - { SDLK_TAB, GrKey_Tab }, - { SDLK_RETURN, GrKey_Return }, - { SDLK_ESCAPE, GrKey_Escape } -}; - -static keytrans altstdkeys[NSTDKEYS] = { - { SDLK_PAGEUP, GrKey_Alt_PageUp }, - { SDLK_PAGEDOWN, GrKey_Alt_PageDown }, - { SDLK_END, GrKey_Alt_End }, - { SDLK_HOME, GrKey_Alt_Home }, - { SDLK_LEFT, GrKey_Alt_Left }, - { SDLK_UP, GrKey_Alt_Up }, - { SDLK_RIGHT, GrKey_Alt_Right }, - { SDLK_DOWN, GrKey_Alt_Down }, - { SDLK_INSERT, GrKey_Alt_Insert }, - { SDLK_DELETE, GrKey_Alt_Delete }, - { SDLK_F1, GrKey_Alt_F1 }, - { SDLK_F2, GrKey_Alt_F2 }, - { SDLK_F3, GrKey_Alt_F3 }, - { SDLK_F4, GrKey_Alt_F4 }, - { SDLK_F5, GrKey_Alt_F5 }, - { SDLK_F6, GrKey_Alt_F6 }, - { SDLK_F7, GrKey_Alt_F7 }, - { SDLK_F8, GrKey_Alt_F8 }, - { SDLK_F9, GrKey_Alt_F9 }, - { SDLK_F10, GrKey_Alt_F10 }, - { SDLK_F11, GrKey_Alt_F11 }, - { SDLK_F12, GrKey_Alt_F12 }, - { SDLK_KP5, GrKey_Alt_Center }, - { SDLK_KP_DIVIDE, GrKey_Alt_KPSlash }, - { SDLK_KP_MULTIPLY, GrKey_Alt_KPStar }, - { SDLK_KP_MINUS, GrKey_Alt_KPMinus }, - { SDLK_KP_PLUS, GrKey_Alt_KPPlus }, - { SDLK_KP_ENTER, GrKey_Alt_Enter }, - { SDLK_KP_EQUALS, GrKey_Alt_Equals }, - { SDLK_BACKSPACE, GrKey_Alt_Backspace }, - { SDLK_TAB, GrKey_Alt_Tab }, - { SDLK_RETURN, GrKey_Alt_Return }, - { SDLK_ESCAPE, GrKey_Alt_Escape } -}; - -static keytrans controlstdkeys[NSTDKEYS] = { - { SDLK_PAGEUP, GrKey_Control_PageUp }, - { SDLK_PAGEDOWN, GrKey_Control_PageDown }, - { SDLK_END, GrKey_Control_End }, - { SDLK_HOME, GrKey_Control_Home }, - { SDLK_LEFT, GrKey_Control_Left }, - { SDLK_UP, GrKey_Control_Up }, - { SDLK_RIGHT, GrKey_Control_Right }, - { SDLK_DOWN, GrKey_Control_Down }, - { SDLK_INSERT, GrKey_Control_Insert }, - { SDLK_DELETE, GrKey_Control_Delete }, - { SDLK_F1, GrKey_Control_F1 }, - { SDLK_F2, GrKey_Control_F2 }, - { SDLK_F3, GrKey_Control_F3 }, - { SDLK_F4, GrKey_Control_F4 }, - { SDLK_F5, GrKey_Control_F5 }, - { SDLK_F6, GrKey_Control_F6 }, - { SDLK_F7, GrKey_Control_F7 }, - { SDLK_F8, GrKey_Control_F8 }, - { SDLK_F9, GrKey_Control_F9 }, - { SDLK_F10, GrKey_Control_F10 }, - { SDLK_F11, GrKey_Control_F11 }, - { SDLK_F12, GrKey_Control_F12 }, - { SDLK_KP5, GrKey_Control_Center }, - { SDLK_KP_DIVIDE, GrKey_Control_KPSlash }, - { SDLK_KP_MULTIPLY, GrKey_Control_KPStar }, - { SDLK_KP_MINUS, GrKey_Control_KPDash }, - { SDLK_KP_PLUS, GrKey_Control_KPPlus }, - { SDLK_KP_ENTER, GrKey_LineFeed }, - { SDLK_KP_EQUALS, GrKey_NoKey }, - { SDLK_BACKSPACE, GrKey_Control_Backspace }, - { SDLK_TAB, GrKey_Control_Tab }, - { SDLK_RETURN, GrKey_LineFeed }, - { SDLK_ESCAPE, GrKey_NoKey } -}; - -static keytrans shiftstdkeys[NSTDKEYS] = { - { SDLK_PAGEUP, GrKey_Shift_PageUp }, - { SDLK_PAGEDOWN, GrKey_Shift_PageDown }, - { SDLK_END, GrKey_Shift_End }, - { SDLK_HOME, GrKey_Shift_Home }, - { SDLK_LEFT, GrKey_Shift_Left }, - { SDLK_UP, GrKey_Shift_Up }, - { SDLK_RIGHT, GrKey_Shift_Right }, - { SDLK_DOWN, GrKey_Shift_Down }, - { SDLK_INSERT, GrKey_Shift_Insert }, - { SDLK_DELETE, GrKey_NoKey }, - { SDLK_F1, GrKey_Shift_F1 }, - { SDLK_F2, GrKey_Shift_F2 }, - { SDLK_F3, GrKey_Shift_F3 }, - { SDLK_F4, GrKey_Shift_F4 }, - { SDLK_F5, GrKey_Shift_F5 }, - { SDLK_F6, GrKey_Shift_F6 }, - { SDLK_F7, GrKey_Shift_F7 }, - { SDLK_F8, GrKey_Shift_F8 }, - { SDLK_F9, GrKey_Shift_F9 }, - { SDLK_F10, GrKey_Shift_F10 }, - { SDLK_F11, GrKey_Shift_F11 }, - { SDLK_F12, GrKey_Shift_F12 }, - { SDLK_KP5, GrKey_NoKey }, - { SDLK_KP_DIVIDE, GrKey_Slash }, - { SDLK_KP_MULTIPLY, GrKey_Star }, - { SDLK_KP_MINUS, GrKey_Dash }, - { SDLK_KP_PLUS, GrKey_Plus }, - { SDLK_KP_ENTER, GrKey_Return }, - { SDLK_KP_EQUALS, GrKey_Equals }, - { SDLK_BACKSPACE, GrKey_BackSpace }, - { SDLK_TAB, GrKey_BackTab }, - { SDLK_RETURN, GrKey_Return }, - { SDLK_ESCAPE, GrKey_Escape } -}; - -static char *numchars = "0123456789."; - -static GrKeyType numkeys[] = { - SDLK_INSERT, - SDLK_END, - SDLK_DOWN, - SDLK_PAGEDOWN, - SDLK_LEFT, - SDLK_KP5, - SDLK_RIGHT, - SDLK_HOME, - SDLK_UP, - SDLK_PAGEUP, - SDLK_DELETE -}; - -#endif diff --git a/thirdparty/grx249/src/mouse/sdlkeys.c b/thirdparty/grx249/src/mouse/sdlkeys.c deleted file mode 100644 index 2975493..0000000 --- a/thirdparty/grx249/src/mouse/sdlkeys.c +++ /dev/null @@ -1,109 +0,0 @@ -/** - ** sdlkeys.c ---- DOS (TCC/BCC/DJGPP: "conio.h") style keyboard utilities - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libsdl.h" -#include "libgrx.h" -#include "input.h" -#include "grxkeys.h" - -int GrKeyPressed(void) -{ - if (MOUINFO->msstatus < 2) { - GrMouseInit(); - GrMouseEventEnable(1, 0); - } - return _GrKeyPressed(); -} - -GrKeyType GrKeyRead(void) -{ - GrMouseEvent ev; - int i, key; - - if (!_GrIsKbdEnabled()) { - while (_nkeyssdlpool < 1) - _GrUpdateInputs(); - key = _keyssdlpool[0]; - for (i = 0; i < _nkeyssdlpool; i++) - _keyssdlpool[i] = _keyssdlpool[i + 1]; - _nkeyssdlpool--; - return key; - } - - if (MOUINFO->msstatus < 2) { - GrMouseInit(); - GrMouseEventEnable(1, 0); - } - for (;;) { - GrMouseGetEvent((GR_M_EVENT | GR_M_NOPAINT), &ev); - if (ev.flags & GR_M_KEYPRESS) { - return (ev.key); - } - } -} - -int GrKeyStat(void) -{ - static SDLMod trans[8] = { - KMOD_RSHIFT, KMOD_LSHIFT, KMOD_CTRL, KMOD_ALT, - KMOD_SCROLL, KMOD_NUM, KMOD_CAPS, KMOD_INSERT - }; - - SDLMod mod = SDL_GetModState(); - int i, state = 0; - - for(i = 0; i < 8; i++) - if (mod & trans[i]) state |= 1 << i; - - return(state); -} - -int kbhit(void) -{ - return GrKeyPressed(); -} - -int getkey(void) -{ - return (int)GrKeyRead(); -} - -int getch(void) -{ - static int lastkey = (-1); - int key; - - if (lastkey != (-1)) { - key = lastkey; - lastkey = (-1); - return (key); - } - key = getkey(); - if (key < 0x100) { - return (key); - } - lastkey = key & 0xff; - - return (0); -} - -int getkbstat(void) -{ - return GrKeyStat(); -} - diff --git a/thirdparty/grx249/src/mouse/w32inp.c b/thirdparty/grx249/src/mouse/w32inp.c deleted file mode 100644 index 07e0263..0000000 --- a/thirdparty/grx249/src/mouse/w32inp.c +++ /dev/null @@ -1,391 +0,0 @@ -/** - ** w32inp.c ---- DOS (TCC/BCC/DJGPP: "conio.h") style keyboard utilities - ** - ** Author: Gernot Graeff - ** E-mail: gernot.graeff@t-online.de - ** Date: 02-11-99 - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by M.Alvarez (malfer@teleline.es) 18/11/2001 - ** - Better keys handling using translation tables (w32input.h). - ** - ** Contributions by M.Alvarez (malfer@teleline.es) 02/02/2002 - ** - The w32 imput queue implemented as a circular queue. - ** - All the input related code moved here from vd_win32.c - ** - ** Contribution by M. Lombardi 05/08/2007 - ** Do not treat WM_PAINT messages here. They are delt with in vd_win32.c. - ** This produced saturation of GRX event queue and gobbling of - ** keyboard/mouse events there (compare behavior of test/mousetst) - ** - ** Contribution by Richard Sanders (richard@dogcreek.ca) 02/04/2009 - ** Synchronisation of windows and grx mouse cursors - **/ - -#include "libwin32.h" -#include "libgrx.h" -#include "grxkeys.h" -#include "input.h" -#include "arith.h" -#include "memcopy.h" -#include "w32input.h" - -int _nkeysw32pool = 0; -int _keysw32pool[_MAXKEYSW32POOL]; - -static int kbd_enabled = TRUE; -static int kbd_lastmod = 0; -static int kbd_hitcount = 0; -static int mou_enabled = TRUE; -static int mou_buttons = 0; -static long evt_lasttime; - -int _GrIsKbdEnabled(void) -{ - return kbd_enabled; -} - -int _GrKeyPressed(void) -{ - _GrUpdateInputs(); - if (kbd_enabled) - return (kbd_hitcount > 0); - else - return (_nkeysw32pool > 0); -} - -int _GrKeyStat(void) -{ - return kbd_lastmod; -} - -static void uninit(void) -{ - if (MOUINFO->msstatus > 1) { - MOUINFO->msstatus = 1; - } -} - -int GrMouseDetect(void) -{ - return GetSystemMetrics(SM_MOUSEPRESENT); -} - -static void init_w32queue(int queue_size) -{ - EnterCriticalSection(&_csEventQueue); - if (_W32EventQueueSize != queue_size) { - if (_W32EventQueue != NULL) - free(_W32EventQueue); - _W32EventQueue = (W32Event *)malloc(sizeof(W32Event) * queue_size); - _W32EventQueueSize = _W32EventQueue ? queue_size : 0; - } - _W32EventQueueRead = 0; - _W32EventQueueWrite = 0; - _W32EventQueueLength = 0; - LeaveCriticalSection(&_csEventQueue); -} - -void GrMouseInitN(int queue_size) -{ - uninit(); - queue_size = umax(4, umin(256, queue_size)); - init_queue(queue_size); - init_w32queue(queue_size); - kbd_hitcount = 0; - if (GrMouseDetect()) { - GrMouseSetSpeed(1, 1); - GrMouseSetAccel(100, 1); - GrMouseSetLimits(0, 0, SCRN->gc_xmax, SCRN->gc_ymax); - GrMouseWarp((SCRN->gc_xmax >> 1), (SCRN->gc_ymax >> 1)); - _GrInitMouseCursor(); - MOUINFO->msstatus = 2; - mou_buttons = 0; - } - GrMouseEventEnable(TRUE, TRUE); - real_time(evt_lasttime); - MOUINFO->uninit = uninit; -} - -void GrMouseSetSpeed(int spmult, int spdiv) -{ - MOUINFO->spmult = umin(16, umax(1, spmult)); - MOUINFO->spdiv = umin(16, umax(1, spdiv)); -} - -void GrMouseSetAccel(int thresh, int accel) -{ - MOUINFO->thresh = umin(64, umax(1, thresh)); - MOUINFO->accel = umin(16, umax(1, accel)); -} - -void GrMouseSetLimits(int x1, int y1, int x2, int y2) -{ - isort(x1, x2); - isort(y1, y2); - MOUINFO->xmin = imax(0, imin(x1, SCRN->gc_xmax)); - MOUINFO->ymin = imax(0, imin(y1, SCRN->gc_ymax)); - MOUINFO->xmax = imax(0, imin(x2, SCRN->gc_xmax)); - MOUINFO->ymax = imax(0, imin(y2, SCRN->gc_ymax)); -} - -void GrMouseWarp(int x, int y) -{ - POINT point; - - MOUINFO->xpos = imax(MOUINFO->xmin, imin(MOUINFO->xmax, x)); - MOUINFO->ypos = imax(MOUINFO->ymin, imin(MOUINFO->ymax, y)); - GrMouseUpdateCursor(); - point.x = MOUINFO->xpos; - point.y = MOUINFO->ypos; - ClientToScreen(hGRXWnd, &point); - SetCursorPos(point.x, point.y); -} - -void GrMouseEventEnable(int enable_kb, int enable_ms) -{ - kbd_enabled = enable_kb; - mou_enabled = enable_ms; -} - -void GrMouseGetEventT(int flags, GrMouseEvent * ev, long tout) -{ - int msdraw; - - if (MOUINFO->msstatus == 0) GrMouseInit(); - - msdraw = !MOUINFO->displayed && !(flags & GR_M_NOPAINT); - if (msdraw) GrMouseDisplayCursor(); - - if (tout <= 0L) tout = 1L; - - for (;;) { - _GrUpdateInputs(); - GrMouseUpdateCursor(); - while (MOUINFO->qlength > 0) { - dequeue_event((*ev)); - if (ev->flags & GR_M_KEYPRESS) kbd_hitcount--; - if (ev->flags & flags) { - if (msdraw) GrMouseEraseCursor(); - return; - } - } - if ((flags & GR_M_POLL) || - (tout == 0L) || (MOUINFO->moved && (flags & GR_M_MOTION))) { - fill_mouse_ev((*ev), - mou_buttons, mou_buttons, - GR_M_LEFT, GR_M_MIDDLE, GR_M_RIGHT, GR_M_P4, GR_M_P5, kbd_lastmod); - if (ev->flags) /* something happend */ - real_dtime(ev->dtime, evt_lasttime); - else - ev->dtime = -1; /* special time if nothing happend */ - MOUINFO->moved = FALSE; - if (msdraw) { - GrMouseEraseCursor(); - } - return; - } - if (tout > 0L) { - Sleep(10); - if ((tout -= 10) < 0L) tout = 0L; - } - } -} - -static GrKeyType StdKeyTranslate(int winkey, int fkbState) -{ - keytrans *k; - int i; - - if (fkbState & GR_KB_ALT) - k = altstdkeys; - else if (fkbState & GR_KB_CTRL) - k = controlstdkeys; - else if (fkbState & GR_KB_SHIFT) - k = shiftstdkeys; - else - k = stdkeys; - - for (i = 0; i < NSTDKEYS; i++) { - if (winkey == k[i].winkey) - return k[i].grkey; - } - - return 0; -} - -static int DequeueW32Event(GrMouseEvent * ev) -{ - W32Event evaux; - int key; - int buttons; - - if (_W32EventQueueLength < 1){ - Sleep(1); /* yield */ - return 0; - } - - EnterCriticalSection(&_csEventQueue); -// if (!TryEnterCriticalSection(&_csEventQueue)) -// return 0; - - evaux = _W32EventQueue[_W32EventQueueRead]; - if (++_W32EventQueueRead == _W32EventQueueSize) - _W32EventQueueRead = 0; - _W32EventQueueLength--; - LeaveCriticalSection(&_csEventQueue); - - switch (evaux.uMsg) { - - case WM_CHAR: - fill_keybd_ev((*ev), evaux.wParam, evaux.kbstat); - kbd_lastmod = evaux.kbstat; - return 1; - - case WM_SYSCHAR: - key = 0; - if (evaux.wParam >= 'a' && evaux.wParam <= 'z') - key = altletters[evaux.wParam - 'a']; - if (evaux.wParam >= 'A' && evaux.wParam <= 'Z') - key = altletters[evaux.wParam - 'A']; - if (evaux.wParam >= '0' && evaux.wParam <= '9') - key = altnumbers[evaux.wParam - '0']; - if (key == 0) - return -1; - fill_keybd_ev((*ev), key, evaux.kbstat); - kbd_lastmod = evaux.kbstat; - return 1; - - case WM_KEYDOWN: - case WM_SYSKEYDOWN: - key = StdKeyTranslate(evaux.wParam, evaux.kbstat); - if (key == 0) - return -1; - fill_keybd_ev((*ev), key, evaux.kbstat); - kbd_lastmod = evaux.kbstat; - return 1; - - case WM_COMMAND: - fill_cmd_ev((*ev), evaux.wParam, evaux.kbstat); - return 1; - - case WM_LBUTTONDOWN: - buttons = GR_M_LEFT | mou_buttons; - MOUINFO->xpos = LOWORD(evaux.lParam); - MOUINFO->ypos = HIWORD(evaux.lParam); - fill_mouse_ev((*ev), mou_buttons, buttons, GR_M_LEFT, - GR_M_MIDDLE, GR_M_RIGHT, GR_M_P4, GR_M_P5, evaux.kbstat); - mou_buttons = buttons; - MOUINFO->moved = FALSE; - kbd_lastmod = evaux.kbstat; - return 1; - - case WM_MBUTTONDOWN: - buttons = GR_M_MIDDLE | mou_buttons; - MOUINFO->xpos = LOWORD(evaux.lParam); - MOUINFO->ypos = HIWORD(evaux.lParam); - fill_mouse_ev((*ev), mou_buttons, buttons, GR_M_LEFT, - GR_M_MIDDLE, GR_M_RIGHT, GR_M_P4, GR_M_P5, evaux.kbstat); - mou_buttons = buttons; - MOUINFO->moved = FALSE; - kbd_lastmod = evaux.kbstat; - return 1; - - case WM_RBUTTONDOWN: - buttons = GR_M_RIGHT | mou_buttons; - MOUINFO->xpos = LOWORD(evaux.lParam); - MOUINFO->ypos = HIWORD(evaux.lParam); - fill_mouse_ev((*ev), mou_buttons, buttons, GR_M_LEFT, - GR_M_MIDDLE, GR_M_RIGHT, GR_M_P4, GR_M_P5, evaux.kbstat); - mou_buttons = buttons; - MOUINFO->moved = FALSE; - kbd_lastmod = evaux.kbstat; - return 1; - - case WM_LBUTTONUP: - buttons = ~GR_M_LEFT & mou_buttons; - MOUINFO->xpos = LOWORD(evaux.lParam); - MOUINFO->ypos = HIWORD(evaux.lParam); - fill_mouse_ev((*ev), mou_buttons, buttons, GR_M_LEFT, - GR_M_MIDDLE, GR_M_RIGHT, GR_M_P4, GR_M_P5, evaux.kbstat); - mou_buttons = buttons; - MOUINFO->moved = FALSE; - kbd_lastmod = evaux.kbstat; - return 1; - - case WM_MBUTTONUP: - buttons = ~GR_M_MIDDLE & mou_buttons; - MOUINFO->xpos = LOWORD(evaux.lParam); - MOUINFO->ypos = HIWORD(evaux.lParam); - fill_mouse_ev((*ev), mou_buttons, buttons, GR_M_LEFT, - GR_M_MIDDLE, GR_M_RIGHT, GR_M_P4, GR_M_P5, evaux.kbstat); - mou_buttons = buttons; - MOUINFO->moved = FALSE; - kbd_lastmod = evaux.kbstat; - return 1; - - case WM_RBUTTONUP: - buttons = ~GR_M_RIGHT & mou_buttons; - MOUINFO->xpos = LOWORD(evaux.lParam); - MOUINFO->ypos = HIWORD(evaux.lParam); - fill_mouse_ev((*ev), mou_buttons, buttons, GR_M_LEFT, - GR_M_MIDDLE, GR_M_RIGHT, GR_M_P4, GR_M_P5, evaux.kbstat); - mou_buttons = buttons; - MOUINFO->moved = FALSE; - kbd_lastmod = evaux.kbstat; - return 1; - - case WM_MOUSEWHEEL: - buttons = mou_buttons ^ (((short)HIWORD(evaux.wParam) > 0) ? - GR_M_P4 : GR_M_P5); - MOUINFO->xpos = LOWORD(evaux.lParam); - MOUINFO->ypos = HIWORD(evaux.lParam); - fill_mouse_ev((*ev), mou_buttons, buttons, GR_M_LEFT, - GR_M_MIDDLE, GR_M_RIGHT, GR_M_P4, GR_M_P5, evaux.kbstat); - mou_buttons = buttons; - MOUINFO->moved = FALSE; - kbd_lastmod = evaux.kbstat; - return 1; - - case WM_MOUSEMOVE: - MOUINFO->xpos = LOWORD(evaux.lParam); - MOUINFO->ypos = HIWORD(evaux.lParam); - MOUINFO->moved = TRUE; - ev->kbstat = evaux.kbstat; - kbd_lastmod = evaux.kbstat; - return -1; - - default: - return -1; - - } -} - -void _GrUpdateInputs(void) -{ - GrMouseEvent ev; - int r; - - while ((r = DequeueW32Event(&ev)) != 0) { - if (r > 0) { - if (ev.flags & GR_M_KEYPRESS && !kbd_enabled){ - if (_nkeysw32pool < _MAXKEYSW32POOL) - _keysw32pool[_nkeysw32pool++] = ev.key; - } - else{ - real_dtime(ev.dtime, evt_lasttime); - enqueue_event(ev); - if (ev.flags & GR_M_KEYPRESS) kbd_hitcount++; - } - } - } -} diff --git a/thirdparty/grx249/src/mouse/w32input.h b/thirdparty/grx249/src/mouse/w32input.h deleted file mode 100644 index 41eabfe..0000000 --- a/thirdparty/grx249/src/mouse/w32input.h +++ /dev/null @@ -1,171 +0,0 @@ -/** - ** w32input.h ---- Win32 to GRX keys conversion tables - ** - ** Copyright (C) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef _W32INPUT_H_ -#define _W32INPUT_H_ - -typedef struct { - int winkey; - GrKeyType grkey; -} keytrans; - -#define NSTDKEYS 22 - -static keytrans stdkeys[NSTDKEYS] = { - {VK_PRIOR, GrKey_PageUp}, - {VK_NEXT, GrKey_PageDown}, - {VK_END, GrKey_End}, - {VK_HOME, GrKey_Home}, - {VK_LEFT, GrKey_Left}, - {VK_UP, GrKey_Up}, - {VK_RIGHT, GrKey_Right}, - {VK_DOWN, GrKey_Down}, - {VK_INSERT, GrKey_Insert}, - {VK_DELETE, GrKey_Delete}, - {VK_F1, GrKey_F1}, - {VK_F2, GrKey_F2}, - {VK_F3, GrKey_F3}, - {VK_F4, GrKey_F4}, - {VK_F5, GrKey_F5}, - {VK_F6, GrKey_F6}, - {VK_F7, GrKey_F7}, - {VK_F8, GrKey_F8}, - {VK_F9, GrKey_F9}, - {VK_F10, GrKey_F10}, - {VK_F11, GrKey_F11}, - {VK_F12, GrKey_F12} -}; - -static keytrans altstdkeys[NSTDKEYS] = { - {VK_PRIOR, GrKey_Alt_PageUp}, - {VK_NEXT, GrKey_Alt_PageDown}, - {VK_END, GrKey_Alt_End}, - {VK_HOME, GrKey_Alt_Home}, - {VK_LEFT, GrKey_Alt_Left}, - {VK_UP, GrKey_Alt_Up}, - {VK_RIGHT, GrKey_Alt_Right}, - {VK_DOWN, GrKey_Alt_Down}, - {VK_INSERT, GrKey_Alt_Insert}, - {VK_DELETE, GrKey_Alt_Delete}, - {VK_F1, GrKey_Alt_F1}, - {VK_F2, GrKey_Alt_F2}, - {VK_F3, GrKey_Alt_F3}, - {VK_F4, GrKey_Alt_F4}, - {VK_F5, GrKey_Alt_F5}, - {VK_F6, GrKey_Alt_F6}, - {VK_F7, GrKey_Alt_F7}, - {VK_F8, GrKey_Alt_F8}, - {VK_F9, GrKey_Alt_F9}, - {VK_F10, GrKey_Alt_F10}, - {VK_F11, GrKey_Alt_F11}, - {VK_F12, GrKey_Alt_F12} -}; - -static keytrans controlstdkeys[NSTDKEYS] = { - {VK_PRIOR, GrKey_Control_PageUp}, - {VK_NEXT, GrKey_Control_PageDown}, - {VK_END, GrKey_Control_End}, - {VK_HOME, GrKey_Control_Home}, - {VK_LEFT, GrKey_Control_Left}, - {VK_UP, GrKey_Control_Up}, - {VK_RIGHT, GrKey_Control_Right}, - {VK_DOWN, GrKey_Control_Down}, - {VK_INSERT, GrKey_Control_Insert}, - {VK_DELETE, GrKey_Control_Delete}, - {VK_F1, GrKey_Control_F1}, - {VK_F2, GrKey_Control_F2}, - {VK_F3, GrKey_Control_F3}, - {VK_F4, GrKey_Control_F4}, - {VK_F5, GrKey_Control_F5}, - {VK_F6, GrKey_Control_F6}, - {VK_F7, GrKey_Control_F7}, - {VK_F8, GrKey_Control_F8}, - {VK_F9, GrKey_Control_F9}, - {VK_F10, GrKey_Control_F10}, - {VK_F11, GrKey_Control_F11}, - {VK_F12, GrKey_Control_F12} -}; - -static keytrans shiftstdkeys[NSTDKEYS] = { - {VK_PRIOR, GrKey_Shift_PageUp}, - {VK_NEXT, GrKey_Shift_PageDown}, - {VK_END, GrKey_Shift_End}, - {VK_HOME, GrKey_Shift_Home}, - {VK_LEFT, GrKey_Shift_Left}, - {VK_UP, GrKey_Shift_Up}, - {VK_RIGHT, GrKey_Shift_Right}, - {VK_DOWN, GrKey_Shift_Down}, - {VK_INSERT, GrKey_Shift_Insert}, - {VK_DELETE, 0}, - {VK_F1, GrKey_Shift_F1}, - {VK_F2, GrKey_Shift_F2}, - {VK_F3, GrKey_Shift_F3}, - {VK_F4, GrKey_Shift_F4}, - {VK_F5, GrKey_Shift_F5}, - {VK_F6, GrKey_Shift_F6}, - {VK_F7, GrKey_Shift_F7}, - {VK_F8, GrKey_Shift_F8}, - {VK_F9, GrKey_Shift_F9}, - {VK_F10, GrKey_Shift_F10}, - {VK_F11, GrKey_Shift_F11}, - {VK_F12, GrKey_Shift_F12} -}; - -static GrKeyType altletters[] = { - GrKey_Alt_A, - GrKey_Alt_B, - GrKey_Alt_C, - GrKey_Alt_D, - GrKey_Alt_E, - GrKey_Alt_F, - GrKey_Alt_G, - GrKey_Alt_H, - GrKey_Alt_I, - GrKey_Alt_J, - GrKey_Alt_K, - GrKey_Alt_L, - GrKey_Alt_M, - GrKey_Alt_N, - GrKey_Alt_O, - GrKey_Alt_P, - GrKey_Alt_Q, - GrKey_Alt_R, - GrKey_Alt_S, - GrKey_Alt_T, - GrKey_Alt_U, - GrKey_Alt_V, - GrKey_Alt_W, - GrKey_Alt_X, - GrKey_Alt_Y, - GrKey_Alt_Z -}; - -static GrKeyType altnumbers[] = { - GrKey_Alt_0, - GrKey_Alt_1, - GrKey_Alt_2, - GrKey_Alt_3, - GrKey_Alt_4, - GrKey_Alt_5, - GrKey_Alt_6, - GrKey_Alt_7, - GrKey_Alt_8, - GrKey_Alt_9 -}; - -#endif diff --git a/thirdparty/grx249/src/mouse/w32keys.c b/thirdparty/grx249/src/mouse/w32keys.c deleted file mode 100644 index 55ab4ee..0000000 --- a/thirdparty/grx249/src/mouse/w32keys.c +++ /dev/null @@ -1,99 +0,0 @@ -/** - ** w32keys.c ---- DOS (TCC/BCC/DJGPP: "conio.h") style keyboard utilities - ** - ** Author: Gernot Graeff - ** E-mail: gernot.graeff@t-online.de - ** Date: 02-11-99 - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libwin32.h" -#include "libgrx.h" -#include "input.h" -#include "grxkeys.h" - -int GrKeyPressed(void) -{ - if (MOUINFO->msstatus < 2) { - GrMouseInit(); - GrMouseEventEnable(1, 0); - } - return _GrKeyPressed(); -} - -GrKeyType GrKeyRead(void) -{ - GrMouseEvent ev; - int i, key; - - if (!_GrIsKbdEnabled()) { - while (_nkeysw32pool < 1) - _GrUpdateInputs(); - key = _keysw32pool[0]; - for (i = 0; i < _nkeysw32pool; i++) - _keysw32pool[i] = _keysw32pool[i + 1]; - _nkeysw32pool--; - return key; - } - - if (MOUINFO->msstatus < 2) { - GrMouseInit(); - GrMouseEventEnable(1, 0); - } - for (;;) { - GrMouseGetEvent((GR_M_EVENT | GR_M_NOPAINT), &ev); - if (ev.flags & GR_M_KEYPRESS) { - return (ev.key); - } - } -} - -int GrKeyStat(void) -{ - return _GrKeyStat(); -} - -int kbhit(void) -{ - return GrKeyPressed(); -} - -int getkey(void) -{ - return (int)GrKeyRead(); -} - -int getch(void) -{ - static int lastkey = (-1); - int key; - - if (lastkey != (-1)) { - key = lastkey; - lastkey = (-1); - return (key); - } - key = getkey(); - if (key < 0x100) { - return (key); - } - lastkey = key & 0xff; - - return (0); -} - -int getkbstat(void) -{ - return _GrKeyStat(); -} - diff --git a/thirdparty/grx249/src/mouse/xwininp.c b/thirdparty/grx249/src/mouse/xwininp.c deleted file mode 100644 index 19dadff..0000000 --- a/thirdparty/grx249/src/mouse/xwininp.c +++ /dev/null @@ -1,791 +0,0 @@ -/** - ** xwininp.c ---- mouse and keyboard interface for X Windows - ** - ** Author: Ulrich Leodolter - ** E-mail: ulrich@lab1.psy.univie.ac.at - ** Date: Thu Sep 28 20:22:16 1995 - ** Comment: Implements the same GRX functions as dosinput.c - ** RCSId: $Id: xwininput.c 1.2 1995/11/19 19:32:30 ulrich Exp $ - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Small changes by Dimitar Zhekov to work in fullscreen mode (DGA2). - ** - ** Contributions by: - ** 070505 M.Alvarez, Using a Pixmap for BackingStore. - ** - **/ - -#include -#include /* for select() */ - -#include "libgrx.h" -#include "libxwin.h" -#include -#include "grxkeys.h" -#include "allocate.h" -#include "arith.h" -#include "memcopy.h" -#include "memfill.h" -#include "mouse/input.h" - -#ifdef _AIX -#include -#endif - -static int kbd_enabled = TRUE; -static int kbd_lastmod = 0; -static int mou_enabled = TRUE; -static int mou_buttons = 0; -static Time MouseMoveTime = 0; -static Time evt_lasttime; -static int evt_lasttime_ok = FALSE; - -#if 0 -long volatile _XGrTickValue = -1; -static void _XGrTickHandler (int signum) -{ - signal (signum, _XGrTickHandler); - _XGrTickValue++; -} -#endif - -static void uninit(void) -{ - if(MOUINFO->msstatus > 1) MOUINFO->msstatus = 1; -} - -int GrMouseDetect(void) -{ - if(MOUINFO->msstatus == 0) { - if (_XGrDisplay) MOUINFO->msstatus = 1; /* present, but not initted */ - } - return((MOUINFO->msstatus > 0) ? TRUE : FALSE); -} - -void GrMouseInitN(int queue_size) -{ - uninit(); - queue_size = umax(4,umin(256,queue_size)); - init_queue(queue_size); - if(GrMouseDetect()) { - GrMouseSetSpeed(1,1); - GrMouseSetAccel(100,1); - GrMouseSetLimits(0,0,SCRN->gc_xmax,SCRN->gc_ymax); - GrMouseWarp((SCRN->gc_xmax >> 1),(SCRN->gc_ymax >> 1)); - _GrInitMouseCursor(); - MOUINFO->msstatus = 2; - mou_buttons = 0; - /* - * Define an invisible X cursor for _XGrWindow - */ - if(_XGrWindowedMode) { - static char cbits[8] = { 0,0,0,0,0,0,0,0, }; - Pixmap csource, cmask; - XColor cfore, cback; - Cursor curs; - - csource = cmask = XCreateBitmapFromData (_XGrDisplay, - _XGrWindow, - cbits, - 8, - 8 - ); - cfore.red = cfore.green = cfore.blue = 0; - cback.red = cback.green = cback.blue = 0; - curs = XCreatePixmapCursor (_XGrDisplay, - csource, - cmask, - &cfore, - &cback, - 0, - 0 - ); - XDefineCursor (_XGrDisplay, _XGrWindow, curs); - } - } - GrMouseEventEnable(TRUE,TRUE); - evt_lasttime_ok = FALSE; - MouseMoveTime = 0; - MOUINFO->uninit = uninit; -} - -void GrMouseSetSpeed(int spmult,int spdiv) -{ - MOUINFO->spmult = umin(16,umax(1,spmult)); - MOUINFO->spdiv = umin(16,umax(1,spdiv)); -} - -void GrMouseSetAccel(int thresh,int accel) -{ - MOUINFO->thresh = umin(64,umax(1,thresh)); - MOUINFO->accel = umin(16,umax(1,accel)); -} - -void GrMouseSetLimits(int x1,int y1,int x2,int y2) -{ - isort(x1,x2); - isort(y1,y2); - MOUINFO->xmin = imax(0,imin(x1,SCRN->gc_xmax)); - MOUINFO->ymin = imax(0,imin(y1,SCRN->gc_ymax)); - MOUINFO->xmax = imax(0,imin(x2,SCRN->gc_xmax)); - MOUINFO->ymax = imax(0,imin(y2,SCRN->gc_ymax)); -} - -void GrMouseWarp(int x,int y) -{ - MOUINFO->xpos = imax(MOUINFO->xmin,imin(MOUINFO->xmax,x)); - MOUINFO->ypos = imax(MOUINFO->ymin,imin(MOUINFO->ymax,y)); - if (_XGrDisplay) { - GrMouseUpdateCursor(); - /* - * Move the X cursor only if inside _XGrWindow - */ - XWarpPointer (_XGrDisplay, - _XGrWindow, - _XGrWindow, - 0, - 0, - GrScreenX(), - GrScreenY(), - MOUINFO->xpos, - MOUINFO->ypos); - } -} - -void GrMouseEventEnable(int enable_kb,int enable_ms) -{ - kbd_enabled = enable_kb; - mou_enabled = enable_ms; -} - -/* Keyboard Translation Table */ - -typedef struct { - GrKeyType key; - unsigned short state; - KeySym keysym; -} KeyEntry; - -static KeyEntry _KeyTable[] = { - { GrKey_Alt_0 , Mod1Mask, XK_0 }, - { GrKey_Alt_1 , Mod1Mask, XK_1 }, - { GrKey_Alt_2 , Mod1Mask, XK_2 }, - { GrKey_Alt_3 , Mod1Mask, XK_3 }, - { GrKey_Alt_4 , Mod1Mask, XK_4 }, - { GrKey_Alt_5 , Mod1Mask, XK_5 }, - { GrKey_Alt_6 , Mod1Mask, XK_6 }, - { GrKey_Alt_7 , Mod1Mask, XK_7 }, - { GrKey_Alt_8 , Mod1Mask, XK_8 }, - { GrKey_Alt_9 , Mod1Mask, XK_9 }, - { GrKey_Alt_A , Mod1Mask, XK_a }, - { GrKey_Alt_At , Mod1Mask, XK_at }, - { GrKey_Alt_B , Mod1Mask, XK_b }, - { GrKey_Alt_Backquote , Mod1Mask, XK_quoteright }, - { GrKey_Alt_Backslash , Mod1Mask, XK_backslash }, - { GrKey_Alt_Backspace , Mod1Mask, XK_BackSpace }, - { GrKey_Alt_C , Mod1Mask, XK_c }, -#ifdef XK_KP_Begin - { GrKey_Alt_Center , Mod1Mask, XK_KP_Begin }, -#endif - { GrKey_Alt_Comma , Mod1Mask, XK_comma }, - { GrKey_Alt_D , Mod1Mask, XK_d }, - { GrKey_Alt_Dash , Mod1Mask, XK_minus }, -#ifdef XK_KP_Delete - { GrKey_Alt_Delete , Mod1Mask, XK_KP_Delete }, -#endif - { GrKey_Alt_Down , Mod1Mask, XK_Down }, -#ifdef XK_KP_Down - { GrKey_Alt_Down , Mod1Mask, XK_KP_Down }, -#endif - { GrKey_Alt_E , Mod1Mask, XK_e }, -#ifdef XK_KP_End - { GrKey_Alt_End , Mod1Mask, XK_KP_End }, -#endif -#ifdef XK_KP_Enter - { GrKey_Alt_Enter , Mod1Mask, XK_KP_Enter }, -#endif - { GrKey_Alt_Equals , Mod1Mask, XK_equal }, - { GrKey_Alt_Escape , Mod1Mask, XK_Escape }, - { GrKey_Alt_F , Mod1Mask, XK_f }, - { GrKey_Alt_F1 , Mod1Mask, XK_F1 }, - { GrKey_Alt_F2 , Mod1Mask, XK_F2 }, - { GrKey_Alt_F3 , Mod1Mask, XK_F3 }, - { GrKey_Alt_F4 , Mod1Mask, XK_F4 }, - { GrKey_Alt_F5 , Mod1Mask, XK_F5 }, - { GrKey_Alt_F6 , Mod1Mask, XK_F6 }, - { GrKey_Alt_F7 , Mod1Mask, XK_F7 }, - { GrKey_Alt_F8 , Mod1Mask, XK_F8 }, - { GrKey_Alt_F9 , Mod1Mask, XK_F9 }, - { GrKey_Alt_F10 , Mod1Mask, XK_F10 }, - { GrKey_Alt_F11 , Mod1Mask, XK_F11 }, - { GrKey_Alt_F12 , Mod1Mask, XK_F12 }, - { GrKey_Alt_G , Mod1Mask, XK_g }, - { GrKey_Alt_H , Mod1Mask, XK_h }, -#ifdef XK_KP_Home - { GrKey_Alt_Home , Mod1Mask, XK_KP_Home }, -#endif - { GrKey_Alt_I , Mod1Mask, XK_i }, -#ifdef XK_KP_Insert - { GrKey_Alt_Insert , Mod1Mask, XK_KP_Insert }, -#endif - { GrKey_Alt_J , Mod1Mask, XK_j }, - { GrKey_Alt_K , Mod1Mask, XK_k }, -#ifdef XK_KP_Subtract - { GrKey_Alt_KPMinus , Mod1Mask, XK_KP_Subtract }, -#endif -#ifdef XK_KP_Add - { GrKey_Alt_KPPlus , Mod1Mask, XK_KP_Add }, -#endif -#ifdef XK_KP_Divide - { GrKey_Alt_KPSlash , Mod1Mask, XK_KP_Divide }, -#endif -#ifdef XK_KP_Multiply - { GrKey_Alt_KPStar , Mod1Mask, XK_KP_Multiply }, -#endif - { GrKey_Alt_KPStar , Mod1Mask, XK_multiply }, - { GrKey_Alt_L , Mod1Mask, XK_l }, - { GrKey_Alt_LAngle , Mod1Mask, XK_less }, - { GrKey_Alt_LBrace , Mod1Mask, XK_braceleft }, - { GrKey_Alt_LBracket , Mod1Mask, XK_bracketleft }, -#ifdef XK_KP_Left - { GrKey_Alt_Left , Mod1Mask, XK_KP_Left }, -#endif - { GrKey_Alt_Left , Mod1Mask, XK_Left }, - { GrKey_Alt_M , Mod1Mask, XK_m }, - { GrKey_Alt_N , Mod1Mask, XK_n }, - { GrKey_Alt_O , Mod1Mask, XK_o }, - { GrKey_Alt_P , Mod1Mask, XK_p }, -#ifdef XK_KP_Next - { GrKey_Alt_PageDown , Mod1Mask, XK_KP_Next }, -#endif -#ifdef XK_KP_Page_Down - { GrKey_Alt_PageDown , Mod1Mask, XK_KP_Page_Down }, -#endif -#ifdef XK_KP_Page_Up - { GrKey_Alt_PageUp , Mod1Mask, XK_KP_Page_Up }, -#endif -#ifdef XK_KP_Prior - { GrKey_Alt_PageUp , Mod1Mask, XK_KP_Prior }, -#endif - { GrKey_Alt_Period , Mod1Mask, XK_period }, - { GrKey_Alt_Pipe , Mod1Mask, XK_bar }, - { GrKey_Alt_Q , Mod1Mask, XK_q }, - { GrKey_Alt_Quote , Mod1Mask, XK_quoteleft }, - { GrKey_Alt_R , Mod1Mask, XK_r }, - { GrKey_Alt_RAngle , Mod1Mask, XK_greater }, - { GrKey_Alt_RBrace , Mod1Mask, XK_braceright }, - { GrKey_Alt_RBracket , Mod1Mask, XK_bracketright }, - { GrKey_Alt_Return , Mod1Mask, XK_Return }, -#ifdef XK_KP_Right - { GrKey_Alt_Right , Mod1Mask, XK_KP_Right }, -#endif - { GrKey_Alt_Right , Mod1Mask, XK_Right }, - { GrKey_Alt_S , Mod1Mask, XK_s }, - { GrKey_Alt_Semicolon , Mod1Mask, XK_semicolon }, - { GrKey_Alt_Slash , Mod1Mask, XK_slash }, - { GrKey_Alt_T , Mod1Mask, XK_t }, - { GrKey_Alt_Tab , Mod1Mask, XK_Tab }, - { GrKey_Alt_U , Mod1Mask, XK_u }, -#ifdef XK_KP_Up - { GrKey_Alt_Up , Mod1Mask, XK_KP_Up }, -#endif - { GrKey_Alt_Up , Mod1Mask, XK_Up }, - { GrKey_Alt_V , Mod1Mask, XK_v }, - { GrKey_Alt_W , Mod1Mask, XK_w }, - { GrKey_Alt_X , Mod1Mask, XK_x }, - { GrKey_Alt_Y , Mod1Mask, XK_y }, - { GrKey_Alt_Z , Mod1Mask, XK_z }, -#ifdef XK_ISO_Left_Tab - { GrKey_BackTab , ShiftMask, XK_ISO_Left_Tab }, -#endif - { GrKey_Center , 0, XK_5 }, -#ifdef XK_KP_Begin - { GrKey_Center , 0, XK_KP_Begin }, -#endif - { GrKey_Control_At , ControlMask, XK_at }, - { GrKey_Control_Center , ControlMask, XK_5 }, -#ifdef XK_KP_Begin - { GrKey_Control_Center , ControlMask, XK_KP_Begin }, -#endif - { GrKey_Control_Delete , ControlMask, XK_Delete }, -#ifdef XK_KP_Delete - { GrKey_Control_Delete , ControlMask, XK_KP_Delete }, -#endif - { GrKey_Control_Down , ControlMask, XK_Down }, -#ifdef XK_KP_Down - { GrKey_Control_Down , ControlMask, XK_KP_Down }, -#endif - { GrKey_Control_End , ControlMask, XK_End }, -#ifdef XK_KP_End - { GrKey_Control_End , ControlMask, XK_KP_End }, -#endif - { GrKey_Control_F1 , ControlMask, XK_F1 }, - { GrKey_Control_F2 , ControlMask, XK_F2 }, - { GrKey_Control_F3 , ControlMask, XK_F3 }, - { GrKey_Control_F4 , ControlMask, XK_F4 }, - { GrKey_Control_F5 , ControlMask, XK_F5 }, - { GrKey_Control_F6 , ControlMask, XK_F6 }, - { GrKey_Control_F7 , ControlMask, XK_F7 }, - { GrKey_Control_F8 , ControlMask, XK_F8 }, - { GrKey_Control_F9 , ControlMask, XK_F9 }, - { GrKey_Control_F10 , ControlMask, XK_F10 }, - { GrKey_Control_F11 , ControlMask, XK_F11 }, - { GrKey_Control_F12 , ControlMask, XK_F12 }, - { GrKey_Control_Home , ControlMask, XK_Home }, -#ifdef XK_KP_Home - { GrKey_Control_Home , ControlMask, XK_KP_Home }, -#endif - { GrKey_Control_Insert , ControlMask, XK_Insert }, -#ifdef XK_KP_Insert - { GrKey_Control_Insert , ControlMask, XK_KP_Insert }, -#endif -#ifdef XK_KP_Subtract - { GrKey_Control_KPDash , ControlMask, XK_KP_Subtract }, -#endif -#ifdef XK_KP_Add - { GrKey_Control_KPPlus , ControlMask, XK_KP_Add }, -#endif - { GrKey_Control_KPSlash , ControlMask, XK_slash }, - { GrKey_Control_KPStar , ControlMask, XK_multiply }, - { GrKey_Control_Left , ControlMask, XK_Left }, -#ifdef XK_KP_Left - { GrKey_Control_Left , ControlMask, XK_KP_Left }, -#endif - { GrKey_Control_PageDown , ControlMask, XK_Next }, -#ifdef XK_KP_Next - { GrKey_Control_PageDown , ControlMask, XK_KP_Next }, -#endif - { GrKey_Control_PageUp , ControlMask, XK_Prior }, -#ifdef XK_KP_Prior - { GrKey_Control_PageUp , ControlMask, XK_KP_Prior }, -#endif - { GrKey_Control_Right , ControlMask, XK_Right }, -#ifdef XK_KP_Right - { GrKey_Control_Right , ControlMask, XK_KP_Right }, -#endif - { GrKey_Control_Up , ControlMask, XK_Up }, -#ifdef XK_KP_Up - { GrKey_Control_Up , ControlMask, XK_KP_Up }, -#endif -#ifdef XK_KP_Subtract - { GrKey_Dash , 0, XK_KP_Subtract }, -#endif - { GrKey_Delete , 0, XK_Delete }, -#ifdef XK_KP_Delete - { GrKey_Delete , 0, XK_KP_Delete }, -#endif - { GrKey_Down , 0, XK_Down }, -#ifdef XK_KP_Down - { GrKey_Down , 0, XK_KP_Down }, -#endif - { GrKey_End , 0, XK_End }, -#ifdef XK_KP_End - { GrKey_End , 0, XK_KP_End }, -#endif - { GrKey_F1 , 0, XK_F1 }, - { GrKey_F2 , 0, XK_F2 }, - { GrKey_F3 , 0, XK_F3 }, - { GrKey_F4 , 0, XK_F4 }, - { GrKey_F5 , 0, XK_F5 }, - { GrKey_F6 , 0, XK_F6 }, - { GrKey_F7 , 0, XK_F7 }, - { GrKey_F8 , 0, XK_F8 }, - { GrKey_F9 , 0, XK_F9 }, - { GrKey_F10 , 0, XK_F10 }, - { GrKey_F11 , 0, XK_F11 }, - { GrKey_F12 , 0, XK_F12 }, - { GrKey_Home , 0, XK_Home }, -#ifdef XK_KP_Home - { GrKey_Home , 0, XK_KP_Home }, -#endif - { GrKey_Insert , 0, XK_Insert }, -#ifdef XK_KP_Insert - { GrKey_Insert , 0, XK_KP_Insert }, -#endif - { GrKey_Left , 0, XK_Left }, -#ifdef XK_KP_Left - { GrKey_Left , 0, XK_KP_Left }, -#endif - { GrKey_PageDown , 0, XK_Next }, -#ifdef XK_KP_Next - { GrKey_PageDown , 0, XK_KP_Next }, -#endif - { GrKey_PageUp , 0, XK_Prior }, -#ifdef XK_KP_Prior - { GrKey_PageUp , 0, XK_KP_Prior }, -#endif -#ifdef XK_KP_Add - { GrKey_Plus , 0, XK_KP_Add }, -#endif - { GrKey_Print , 0, XK_Print }, - { GrKey_Right , 0, XK_Right }, -#ifdef XK_KP_Right - { GrKey_Right , 0, XK_KP_Right }, -#endif - { GrKey_Shift_Down , ShiftMask, XK_Down }, - { GrKey_Shift_End , ShiftMask, XK_End }, - { GrKey_Shift_F1 , ShiftMask, XK_F1 }, - { GrKey_Shift_F2 , ShiftMask, XK_F2 }, - { GrKey_Shift_F3 , ShiftMask, XK_F3 }, - { GrKey_Shift_F4 , ShiftMask, XK_F4 }, - { GrKey_Shift_F5 , ShiftMask, XK_F5 }, - { GrKey_Shift_F6 , ShiftMask, XK_F6 }, - { GrKey_Shift_F7 , ShiftMask, XK_F7 }, - { GrKey_Shift_F8 , ShiftMask, XK_F8 }, - { GrKey_Shift_F9 , ShiftMask, XK_F9 }, - { GrKey_Shift_F10 , ShiftMask, XK_F10 }, - { GrKey_Shift_F11 , ShiftMask, XK_F11 }, - { GrKey_Shift_F12 , ShiftMask, XK_F12 }, - { GrKey_Shift_Home , ShiftMask, XK_Home }, - { GrKey_Shift_Insert , ShiftMask, XK_Insert }, - { GrKey_Shift_Left , ShiftMask, XK_Left }, - { GrKey_Shift_PageDown , ShiftMask, XK_Next }, - { GrKey_Shift_PageUp , ShiftMask, XK_Prior }, - { GrKey_Shift_Right , ShiftMask, XK_Right }, - { GrKey_Shift_Up , ShiftMask, XK_Up }, - { GrKey_Up , 0, XK_Up }, -#ifdef XK_KP_Up - { GrKey_Up , 0, XK_KP_Up }, -#endif -}; - -static int _XKeyEventToGrKey (XKeyEvent *xkey) -{ - KeyEntry *kp; - unsigned int state; - char buffer[20]; - KeySym keysym; - int count; - - state = xkey->state & (ShiftMask | ControlMask | Mod1Mask); - count = XLookupString (xkey, - buffer, - sizeof(buffer), - &keysym, (XComposeStatus *) NULL); - - if ((count == 1) && ((state & Mod1Mask) == 0)) - return (unsigned char) buffer[0]; - - for (kp = _KeyTable; - kp < &_KeyTable[sizeof(_KeyTable)/sizeof(_KeyTable[0])]; - kp = kp + 1) - { - if (keysym == kp->keysym && state == kp->state) - return kp->key; - } - /* printf("Unknown: 0x%x\n", (unsigned) keysym); */ - return EOF; -} - -static INLINE -unsigned int _XButtonEventToGrButton (XButtonEvent *event) -{ - unsigned int state = event->state; - unsigned int mask = 0; - - switch (event->button) { - case Button1: mask = Button1Mask; break; - case Button2: mask = Button2Mask; break; - case Button3: mask = Button3Mask; break; - case Button4: mask = Button4Mask; break; - case Button5: mask = Button5Mask; break; - } - switch (event->type) { - case ButtonPress: state |= mask; break; - case ButtonRelease: state &= ~mask; break; - } - return ( ((state & Button1Mask) ? GR_M_LEFT : 0) - | ((state & Button2Mask) ? GR_M_MIDDLE : 0) - | ((state & Button3Mask) ? GR_M_RIGHT : 0) - | ((state & Button4Mask) ? GR_M_P4 : 0) - | ((state & Button5Mask) ? GR_M_P5 : 0)); -} - -static INLINE -unsigned int _XGrModifierKey (KeySym keysym, int type) -{ - if (type == KeyPress) { - switch (keysym) { - case XK_Shift_L: kbd_lastmod |= GR_KB_LEFTSHIFT; break; - case XK_Shift_R: kbd_lastmod |= GR_KB_RIGHTSHIFT; break; - case XK_Control_L: - case XK_Control_R: kbd_lastmod |= GR_KB_CTRL; break; - case XK_Alt_L: - case XK_Alt_R: - case XK_Meta_L: - case XK_Meta_R: kbd_lastmod |= GR_KB_ALT; break; - case XK_Num_Lock: kbd_lastmod |= GR_KB_NUMLOCK; break; - case XK_Caps_Lock: kbd_lastmod |= GR_KB_CAPSLOCK; break; - case XK_Insert: kbd_lastmod |= GR_KB_INSERT; break; - } - } - if (type == KeyRelease) { - switch (keysym) { - case XK_Shift_L: kbd_lastmod &= ~GR_KB_LEFTSHIFT; break; - case XK_Shift_R: kbd_lastmod &= ~GR_KB_RIGHTSHIFT; break; - case XK_Control_L: - case XK_Control_R: kbd_lastmod &= ~GR_KB_CTRL; break; - case XK_Alt_L: - case XK_Alt_R: - case XK_Meta_L: - case XK_Meta_R: kbd_lastmod &= ~GR_KB_ALT; break; - case XK_Num_Lock: kbd_lastmod &= ~GR_KB_NUMLOCK; break; - case XK_Caps_Lock: kbd_lastmod &= ~GR_KB_CAPSLOCK; break; - case XK_Insert: kbd_lastmod &= ~GR_KB_INSERT; break; - } - } - return kbd_lastmod; -} - -void _GrUpdateInputs(void) -{ - int count; - -#if 0 - if (_XGrTickValue == -1) { - struct itimerval it; - - _XGrTickHandler (SIGALRM); - it.it_interval.tv_sec = 0; - it.it_interval.tv_usec = MS_PER_TICK * 1000L; - it.it_value.tv_sec = 0; - it.it_value.tv_usec = MS_PER_TICK * 1000L; - setitimer (ITIMER_REAL, &it, NULL); - } -#endif - - if (_XGrDisplay) { - count = XEventsQueued (_XGrDisplay, QueuedAfterReading); - if (count <= 0) { - XFlush (_XGrDisplay); - return; - } - while (--count >= 0) { - GrMouseEvent ev; - XEvent xev; - KeySym keysym; - int btn; - - XNextEvent (_XGrDisplay, &xev); - switch (xev.type) { - case Expose: - _XGrCopyBStore(xev.xexpose.x, xev.xexpose.y, - xev.xexpose.width, xev.xexpose.height); - break; - - case MotionNotify: - if (mou_enabled && (MOUINFO->msstatus == 2)) { - if (_XGrWindowedMode) { - MOUINFO->xpos = xev.xmotion.x; - MOUINFO->ypos = xev.xmotion.y; - } - else { - MOUINFO->xpos += xev.xmotion.x; - MOUINFO->ypos += xev.xmotion.y; - } - MOUINFO->moved = TRUE; - MouseMoveTime = xev.xmotion.time; - } - break; - - case ButtonPress: - case ButtonRelease: - if (mou_enabled && (MOUINFO->msstatus == 2)) { - btn = _XButtonEventToGrButton (&xev.xbutton); - if(btn != mou_buttons) { - fill_mouse_ev( - ev, - mou_buttons,btn, - GR_M_LEFT, - GR_M_MIDDLE, - GR_M_RIGHT, - GR_M_P4, - GR_M_P5, - kbd_lastmod - ); - if (evt_lasttime_ok) - ev.dtime = xev.xbutton.time - evt_lasttime; - else { - ev.dtime = 1; - evt_lasttime_ok = TRUE; - } - evt_lasttime = xev.xbutton.time; - enqueue_event(ev); - MOUINFO->moved = FALSE; - mou_buttons = btn; - } - } - break; - - case KeyPress: - keysym = XKeycodeToKeysym (_XGrDisplay, xev.xkey.keycode, 0); - if (IsModifierKey (keysym)) { - _XGrModifierKey (keysym, xev.type); - } - else if (kbd_enabled) { - fill_keybd_ev( - ev, - _XKeyEventToGrKey (&xev.xkey), - kbd_lastmod - ); - if (evt_lasttime_ok) - ev.dtime = xev.xkey.time - evt_lasttime; - else { - ev.dtime = 1; - evt_lasttime_ok = TRUE; - } - evt_lasttime = xev.xkey.time; - enqueue_event(ev); - MOUINFO->moved = FALSE; - } - break; - - case KeyRelease: - keysym = XKeycodeToKeysym (_XGrDisplay, xev.xkey.keycode, 0); - if (IsModifierKey (keysym)) { - _XGrModifierKey (keysym, xev.type); - } - break; - } - } - } -} - -void GrMouseGetEventT(int flags,GrMouseEvent *ev,long tout) -{ - int msdraw; - ev->flags = 0; - if (MOUINFO->msstatus == 0) GrMouseInit(); - if (MOUINFO->msstatus == 0) return; - msdraw = !MOUINFO->displayed && !(flags & GR_M_NOPAINT); - if (msdraw) GrMouseDisplayCursor(); - /* Note: avoid zero timeout for select */ - /* I don't agree. Zero timeout is still needed when I want to display soft */ - /* real time data while looking for some keypress at the same time (A.Pavenis) */ - /* if (tout <= 0L) tout = 1L; */ - if (tout < 0L) tout = 0L; - for( ; _XGrDisplay ; ) { - struct timeval tval; - fd_set readfds; - int fd; - /* - * Note: The select call with nonzero timeout avoids CPU usage - * of nearly 100% - */ - fd = ConnectionNumber(_XGrDisplay); - FD_ZERO(&readfds); - FD_SET(fd, &readfds); - tval.tv_sec = tout / 1000L; - tval.tv_usec = (tout % 1000) * 1000L; - select (fd + 1, - &readfds, - (fd_set *) 0, - (fd_set *) 0, - &tval); - tout = tval.tv_sec * 1000L + tval.tv_usec / 1000L; - - _GrUpdateInputs(); - GrMouseUpdateCursor(); - while (MOUINFO->qlength > 0) { - dequeue_event((*ev)); - if (ev->flags & flags) { - if (msdraw) GrMouseEraseCursor(); - return; - } - } - if ((flags & GR_M_POLL) || - (tout == 0L) || - (MOUINFO->moved && (flags & GR_M_MOTION))) { - fill_mouse_ev( - (*ev), - mou_buttons,mou_buttons, - GR_M_LEFT, - GR_M_MIDDLE, - GR_M_RIGHT, - GR_M_P4, - GR_M_P5, - kbd_lastmod - ); - if ( ev->flags ) { - /* something happend */ - if (MOUINFO->moved) { - if (evt_lasttime_ok && MouseMoveTime) { - ev->dtime = MouseMoveTime - evt_lasttime; - evt_lasttime = MouseMoveTime; - } else - ev->dtime = 1; - } - /* otherwise the ev->dtime is ok */ - } else - ev->dtime = -1; /* special time if nothing happend */ - MOUINFO->moved = FALSE; - MouseMoveTime = 0; - if (msdraw) GrMouseEraseCursor(); - return; - } - /* Make sure we don't use all the CPU */ - /* Is this the right way, Andris? */ - if (tout == 0L) tout = 1L; - } -} - - -int _XGrKeyboardHit (void) -{ - XEvent xev; - KeySym keysym; - - if (_XGrDisplay) { - if (XEventsQueued (_XGrDisplay, QueuedAfterReading) <= 0) { - XFlush (_XGrDisplay); - return FALSE; - } - while (XCheckMaskEvent (_XGrDisplay, KeyPressMask|KeyReleaseMask, &xev)) { - keysym = XKeycodeToKeysym (_XGrDisplay, xev.xkey.keycode, 0); - if (IsModifierKey (keysym)) { - _XGrModifierKey (keysym, xev.type); - continue; - } - if (xev.type == KeyPress) { - XPutBackEvent (_XGrDisplay, &xev); - return TRUE; - } - } - } - return FALSE; -} - -int _XGrKeyboardGetKey (void) -{ - XEvent xev; - KeySym keysym; - - if (_XGrDisplay) { - while (XMaskEvent (_XGrDisplay, KeyPressMask|KeyReleaseMask, &xev)) { - keysym = XKeycodeToKeysym (_XGrDisplay, xev.xkey.keycode, 0); - if (IsModifierKey (keysym)) { - _XGrModifierKey (keysym, xev.type); - continue; - } - if (xev.type == KeyPress) { - return _XKeyEventToGrKey (&xev.xkey); - } - } - } - return 0; -} - -int _XGrKeyboardGetState (void) -{ - return kbd_lastmod; -} - diff --git a/thirdparty/grx249/src/mouse/xwinkeys.c b/thirdparty/grx249/src/mouse/xwinkeys.c deleted file mode 100644 index ff92788..0000000 --- a/thirdparty/grx249/src/mouse/xwinkeys.c +++ /dev/null @@ -1,134 +0,0 @@ -/** - ** xwinkeys.c ---- DOS (TCC/BCC/DJGPP: "conio.h") style keyboard utilities - ** - ** Author: Ulrich Leodolter - ** E-mail: ulrich@lab1.psy.univie.ac.at - ** Date: Sun Oct 1 08:10:30 1995 - ** RCSId: $Id: xwinkeys.c 1.1 1995/11/19 16:34:52 ulrich Exp $ - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "libxwin.h" -#include "input.h" -#include "grxkeys.h" - -#define _NOKEY_ (-1) -static int lastkey = _NOKEY_; -static int lastgetchkey = _NOKEY_; - -static int getkey_w (int delay) -{ - GrMouseEvent ev; - if(MOUINFO->msstatus < 2) { - GrMouseInit(); - GrMouseEventEnable(1,0); - } - GrMouseGetEventT((GR_M_EVENT | GR_M_NOPAINT),&ev,delay); - if(ev.flags & GR_M_KEYPRESS) - return(ev.key); - return _NOKEY_; -} - -int getkey(void) -{ - int key; - lastgetchkey = _NOKEY_; - if (lastkey != _NOKEY_) { - key = lastkey; - lastkey = _NOKEY_; - } - else do { - key = getkey_w (1L); - } while (key == _NOKEY_); - return key; -} - -int getch(void) -{ - int key; - if (lastgetchkey != _NOKEY_) { - key = lastgetchkey; - lastgetchkey = _NOKEY_; - return(key); - } - if (lastkey != _NOKEY_) { - key = lastkey; - lastkey = _NOKEY_; - } - else - key = getkey(); - if(key < 0x100) { - return(key); - } - lastgetchkey = key & 0xff; - return(0); -} - -int kbhit(void) -{ - int key; - if (lastkey != _NOKEY_ || lastgetchkey != _NOKEY_) - return TRUE; - key = getkey_w (0); - if (key != _NOKEY_) { - lastkey = key; - return TRUE; - } - return FALSE; -} - -int getkbstat(void) -{ - if(MOUINFO->msstatus < 2) { - GrMouseInit(); - GrMouseEventEnable(1,0); - } - return(_XGrKeyboardGetState()); -} - -/* -** new functions to replace the old style -** kbhit / getch / getkey / getxkey / getkbstat -** keyboard interface -*/ - -int GrKeyPressed(void) -{ - int key; - if (lastkey != _NOKEY_) - return TRUE; - key = getkey_w (0); - if (key==_NOKEY_) - return FALSE; - lastkey = key; - return TRUE; -} - -GrKeyType GrKeyRead(void) -{ - int key; - if (lastkey != _NOKEY_){ - key = lastkey; - lastkey = _NOKEY_; - return (GrKeyType) key; - } - do { - key = getkey_w (1); - } while (key == _NOKEY_); - return key; -} - -int GrKeyStat(void) { - return getkbstat(); -} diff --git a/thirdparty/grx249/src/pattern/fillpatt.c b/thirdparty/grx249/src/pattern/fillpatt.c deleted file mode 100644 index 68a9ee7..0000000 --- a/thirdparty/grx249/src/pattern/fillpatt.c +++ /dev/null @@ -1,94 +0,0 @@ -/** - ** fillpatt.c ---- draw a pattern filled horizontal line - ** - ** Copyright (C) 1997, Michael Goffioul - ** [e-mail : goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - **/ - -#include "libgrx.h" -#include "arith.h" -#include "shapes.h" - -void _GrFillPatternExt(int x, int y, int sx, int sy, int width, GrPattern *p) -{ - GRX_ENTER(); - if (p->gp_ispixmap) { - void (*bltfun)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor); - int pattwdt = p->gp_pxp_width; - int xdest = x; - int ydest = y; - int ypatt = (y-sy) % p->gp_pxp_height; - int xpatt = (x-sx) % pattwdt; - int cpysize = pattwdt - xpatt; - GrColor optype = p->gp_pxp_oper; - - if (CURC->gc_onscreen) bltfun = CURC->gc_driver->bltr2v; - else bltfun = CURC->gc_driver->bitblt; - while (width > 0) { - if (cpysize > width) cpysize = width; - (*bltfun)( - &CURC->gc_frame,xdest,ydest, - &p->gp_pxp_source,xpatt,ypatt,cpysize,1, - optype - ); - width -= cpysize; - xpatt = 0; - xdest += cpysize; - cpysize = pattwdt; - } - } - else { - - char bits = p->gp_bmp_data[y % p->gp_bmp_height]; - if (bits == 0) - (*CURC->gc_driver->drawhline)(x,y,width,p->gp_bmp_bgcolor); - else if ((GR_int8u)bits == 0xff) - (*CURC->gc_driver->drawhline)(x,y,width,p->gp_bmp_fgcolor); - else { - GrColor fg = p->gp_bmp_fgcolor; - GrColor bg = p->gp_bmp_bgcolor; - int xoffs = x & 7; -# if USE_FDR_DRAWPATTERN-0 - GR_int8u pp = replicate_b2w(bits) >> (8-xoffs); - (*CURC->gc_driver->drawpattern)(x,y,width,pp,fg,bg); -# else - unsigned char mask = 0x80; - mask >>= xoffs; - width += x; - do { - (*CURC->gc_driver->drawpixel)(x,y,(bits & mask) ? fg : bg); - if((mask >>= 1) == 0) mask = 0x80; - } while(++x != width); -# endif - } - } - GRX_LEAVE(); -} - -void _GrFillPattern(int x, int y, int width, GrPattern *p) -{ - GRX_ENTER(); - _GrFillPatternExt(x,y,0,0,width,p); - GRX_LEAVE(); -} - -void _GrFillPatternedScanLine(int x,int y,int w,GrFillArg arg) -{ - GRX_ENTER(); - _GrFillPatternExt(x,y,0,0,w,arg.p); - GRX_LEAVE(); -} diff --git a/thirdparty/grx249/src/pattern/makepat.c b/thirdparty/grx249/src/pattern/makepat.c deleted file mode 100644 index c4fe7a8..0000000 --- a/thirdparty/grx249/src/pattern/makepat.c +++ /dev/null @@ -1,170 +0,0 @@ -/** - ** makepat.c - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" - -#define BEST_MAX_LINE 128 -#define BEST_MAX_CONTEXT 2048L - -#define GCM_MYMEMORY 1 /* set if my context memory */ -#define GCM_MYCONTEXT 2 /* set if my context structure */ - -/* - * try to replicate a pixmap for faster bitblt-s - * in bitplane modes it is especially desirable to replicate until - * the width is a multiple of 8 - */ -static int _GrBestPixmapWidth(int wdt,int hgt) -{ - long total = GrContextSize(wdt,hgt); - int linelen = GrLineOffset(wdt); - int factor = 1; - int test; - - if(total == 0L) return(0); -#ifdef _MAXMEMPLANESIZE - if(total > _MAXMEMPLANESIZE) return(0); -#endif - if((test = (int)(BEST_MAX_CONTEXT / total)) > factor) - factor = test; - if((test = (BEST_MAX_LINE / linelen)) < factor) - factor = test; - while((factor >>= 1) != 0) - wdt <<= 1; - return(wdt); -} - -GrPattern *GrBuildPixmap(const char *pixels,int w,int h,const GrColorTableP ct) -{ - GrContext csave,cwork; - GrPixmap *result; - unsigned char *src; - int wdt,wdt2,fullw; - int hgt; - GrColor color; - - if((fullw = _GrBestPixmapWidth(w,h)) <= 0) return(NULL); - result = (GrPixmap *)malloc(sizeof(GrPixmap)); - if (result == NULL) return(NULL); - - if (!GrCreateContext(fullw,h,NULL,&cwork)) { - free(result); - return NULL; - } - csave = *CURC; - *CURC = cwork; - for(hgt = 0; hgt < h; hgt++) { - for(wdt2 = fullw; (wdt2 -= w) >= 0; ) { - src = (unsigned char *)pixels; - for(wdt = 0; wdt < w; wdt++) { - color = *src++; - if(ct != NULL) color = GR_CTABLE_COLOR(ct,color); - (*CURC->gc_driver->drawpixel)(wdt2+wdt,hgt,(color & C_COLOR)); - } - } - pixels += w; - } - *CURC = csave; - result->pxp_source = cwork.gc_frame; - result->pxp_source.gf_memflags = (GCM_MYCONTEXT | GCM_MYMEMORY); - result->pxp_ispixmap = TRUE; - result->pxp_width = fullw; - result->pxp_height = h; - result->pxp_oper = 0; - return((GrPattern *)result); -} - -GrPattern *GrBuildPixmapFromBits(const char *bits,int w,int h,GrColor fgc,GrColor bgc) -{ - GrContext csave,cwork; - GrPixmap *result; - unsigned char *src; - int wdt,wdt2,fullw; - int hgt,mask,byte; - - if((fullw = _GrBestPixmapWidth(w,h)) <= 0) return(NULL); - result = (GrPixmap *)malloc(sizeof(GrPixmap)); - if(result == NULL) return(NULL); - - if (!GrCreateContext(fullw,h,NULL,&cwork)) { - free(result); - return NULL; - } - csave = *CURC; - *CURC = cwork; - fgc &= C_COLOR; - bgc &= C_COLOR; - for(hgt = 0; hgt < h; hgt++) { - for(wdt2 = fullw; (wdt2 -= w) >= 0; ) { - src = (unsigned char *)bits; - mask = byte = 0; - for(wdt = w; --wdt >= 0; ) { - if((mask >>= 1) == 0) { mask = 0x80; byte = *src++; } - (*CURC->gc_driver->drawpixel)(wdt2+wdt,hgt,((byte & mask) ? fgc : bgc)); - } - } - bits += (w + 7) >> 3; - } - *CURC = csave; - result->pxp_source = cwork.gc_frame; - result->pxp_source.gf_memflags = (GCM_MYCONTEXT | GCM_MYMEMORY); - result->pxp_ispixmap = TRUE; - result->pxp_width = fullw; - result->pxp_height = h; - result->pxp_oper = 0; - return((GrPattern *)result); -} - -GrPattern *GrConvertToPixmap(GrContext *src) -{ - GrPixmap *result; - - if(src->gc_onscreen) return(NULL); - result = malloc(sizeof(GrPixmap)); - if(result == NULL) return(NULL); - result->pxp_source = src->gc_frame; - result->pxp_source.gf_memflags = GCM_MYCONTEXT; - result->pxp_ispixmap = TRUE; - result->pxp_width = src->gc_xmax + 1; - result->pxp_height = src->gc_ymax + 1; - result->pxp_oper = 0; - return((GrPattern *)result); -} - - -void GrDestroyPattern(GrPattern *p) -{ - if (!p) return; - if (p->gp_ispixmap) { - if ( p->gp_pxp_source.gf_memflags & GCM_MYMEMORY) { - int ii; - for ( ii = p->gp_pxp_source.gf_driver->num_planes; ii > 0; ii-- ) - farfree(p->gp_pxp_source.gf_baseaddr[ii - 1]); - } - if ( p->gp_pxp_source.gf_memflags & GCM_MYCONTEXT ) - free(p); - return; - } - if ( p->gp_bitmap.bmp_memflags ) free(p); -} - diff --git a/thirdparty/grx249/src/pattern/patfbits.c b/thirdparty/grx249/src/pattern/patfbits.c deleted file mode 100644 index ddfacd7..0000000 --- a/thirdparty/grx249/src/pattern/patfbits.c +++ /dev/null @@ -1,99 +0,0 @@ -/** - ** patfbits.c - ** - ** Author unknow - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "shapes.h" - -void _GrFillBitmapPatternExt(int x,int y,int w,int h, int sx, int sy, - char far *bmp,int pitch,int start, - GrPattern* p,GrColor bg) -{ - GR_int8u far *bits, *dptr; - GR_int8u mask; - int xx, width, oldx; - GRX_ENTER(); - bits = (GR_int8u far *)bmp + ((unsigned int)start >> 3); - if ( bg == GrNOCOLOR ) - { - w += x; - h += y; - do { - mask = 0x80; - dptr = bits; - oldx = xx = x; - width = 0; - do { - if ( *dptr & mask ) { - if ( width == 0 ) oldx = xx; - width++; - } - else if ( width ) { - _GrFillPatternExt(oldx, y, sx, sy, width, p); - width = 0; - } - if((mask >>= 1) == 0) { mask = 0x80; ++dptr; } - } while ( ++xx < w ); - if ( width ) _GrFillPatternExt(oldx, y, sx, sy, width, p); - bits += pitch; - } while ( ++y < h ); - } - else { - int widthbg; - w += x; h += y; - do { - mask = 0x80; - dptr = bits; - oldx = xx = x; - widthbg = width = 0; - do { - if ( *dptr & mask ) { - if ( widthbg ) - { - (*FDRV->drawhline)(oldx, y, widthbg, bg); - widthbg = 0; - oldx = xx; - } - width++; - } - else - { - if ( width ) - { - _GrFillPatternExt(oldx, y, sx, sy, width, p); - width = 0; - oldx = xx; - } - widthbg++; - } - if((mask >>= 1) == 0) { mask = 0x80; ++dptr; } - } while ( ++xx < w ); - if ( width ) _GrFillPatternExt(oldx, y, sx, sy, width, p); else - if ( widthbg ) (*FDRV->drawhline)(oldx, y, widthbg, bg); - bits += pitch; - } while ( ++y < h ); - } - GRX_LEAVE(); -} - -void _GrFillBitmapPattern(int x,int y,int w,int h,char far *bmp,int pitch,int start,GrPattern* p,GrColor bg) -{ - GRX_ENTER(); - _GrFillBitmapPatternExt(x, y, w, h, 0, 0, bmp, pitch, start, p, bg); - GRX_LEAVE(); -} - diff --git a/thirdparty/grx249/src/pattern/patfbox.c b/thirdparty/grx249/src/pattern/patfbox.c deleted file mode 100644 index 4d3353d..0000000 --- a/thirdparty/grx249/src/pattern/patfbox.c +++ /dev/null @@ -1,68 +0,0 @@ -/** - ** patfbox.c - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "arith.h" -#include "clipping.h" -#include "shapes.h" - -void GrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p) -{ - int width,height; - - clip_box(CURC,x1,y1,x2,y2); - mouse_block(CURC,x1,y1,x2,y2); - width = x2 - x1 + 1; - height = y2 - y1 + 1; - x1 += CURC->gc_xoffset; - y1 += CURC->gc_yoffset; - if(!p->gp_ispixmap) - while(--height >= 0) _GrFillPattern(x1,y1++,width,p); - else { - void (*bltfun)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor); - int pwdt = p->gp_pxp_width; - int phgt = p->gp_pxp_height; - int xoff = x1 % pwdt; - int ypos = y1; - int yoff = ypos % phgt; - if (CURC->gc_onscreen) bltfun = CURC->gc_driver->bltr2v; - else bltfun = CURC->gc_driver->bitblt; - while(height > 0) { - int fillh = min(height,(phgt - yoff)); - int linewdt = width; - int xpos = x1; - int xcuroff = xoff; - while(linewdt > 0) { - int fillw = min(linewdt,(pwdt - xcuroff)); - (*bltfun)( - &CURC->gc_frame,xpos,ypos, - &p->gp_pxp_source,xcuroff,yoff,fillw,fillh, - p->gp_pxp_oper - ); - linewdt -= fillw; - xpos += fillw; - xcuroff = 0; - } - height -= fillh; - ypos += fillh; - yoff = 0; - } - } - mouse_unblock(); -} - diff --git a/thirdparty/grx249/src/pattern/patfcvxp.c b/thirdparty/grx249/src/pattern/patfcvxp.c deleted file mode 100644 index a36462c..0000000 --- a/thirdparty/grx249/src/pattern/patfcvxp.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** patfcvxp.c - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrPatternFilledConvexPolygon(int n,int pt[][2],GrPattern *p) -{ - GrFillArg fa; - - fa.p = p; - _GrScanConvexPoly(n,pt,&_GrPatternFiller,fa); -} - diff --git a/thirdparty/grx249/src/pattern/patfline.c b/thirdparty/grx249/src/pattern/patfline.c deleted file mode 100644 index 25ed021..0000000 --- a/thirdparty/grx249/src/pattern/patfline.c +++ /dev/null @@ -1,107 +0,0 @@ -/** - ** patfline.c - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "shapes.h" - -void _GrPatternFilledLine(int x1,int y1,int dx,int dy,GrPattern *p) -{ - union { GrFrame *c; unsigned char *b; } src; - int sy,ymajor; - int pw,ph,px,py; - int ispixmap; - GrColor fgc = 0, bgc = 0; - int points,error; - - if (dx < 0) { - x1 += dx; dx = -dx; - y1 += dy; dy = -dy; - } - if(dy==0) { -/*int check_if_offsets_correct;*/ - _GrFillPattern(x1,y1,dx+1,p); - return; - } - if(dy >= 0) { - sy = 1; - } - else { - dy = (-dy); - sy = (-1); - } - if((ispixmap = p->gp_ispixmap) != FALSE) { - pw = p->gp_pxp_width; - ph = p->gp_pxp_height; - px = x1 % pw; - py = y1 % ph; - src.c = &p->gp_pxp_source; - } - else { - pw = 8; - ph = p->gp_bmp_height; - px = x1 & 7; - py = y1 % ph; - src.b = (unsigned char *) p->gp_bmp_data; - fgc = p->gp_bmp_fgcolor; - bgc = p->gp_bmp_bgcolor; - } - if(dy > dx) { - points = dy + 1; - error = dy >> 1; - ymajor = TRUE; - } - else { - points = dx + 1; - error = dx >> 1; - ymajor = FALSE; - } - while(--points >= 0) { - (*CURC->gc_driver->drawpixel)( - x1,y1, - ispixmap ? - (*src.c->gf_driver->readpixel)(src.c,px,py) : - (src.b[py] & (0x80U >> px)) ? fgc : bgc - ); - if(ymajor) { - if((error -= dx) < 0) error += dy,x1++,px++; - y1 += sy,py += sy; - } - else { - if((error -= dy) < 0) error += dx,y1 += sy,py += sy; - x1++,px++; - } - if((unsigned)py >= (unsigned)ph) { - if(py < 0) py += ph; - else py -= ph; - } - if(px >= pw) px = 0; - } -} - -void GrPatternFilledLine(int x1,int y1,int x2,int y2,GrPattern *p) -{ - clip_line(CURC,x1,y1,x2,y2); - mouse_block(CURC,x1,y1,x2,y2); - _GrPatternFilledLine(x1+CURC->gc_xoffset,y1+CURC->gc_xoffset,x2-x1,y2-y1,p); - mouse_unblock(); -} diff --git a/thirdparty/grx249/src/pattern/patfplot.c b/thirdparty/grx249/src/pattern/patfplot.c deleted file mode 100644 index 098b28c..0000000 --- a/thirdparty/grx249/src/pattern/patfplot.c +++ /dev/null @@ -1,53 +0,0 @@ -/** - ** patfplot.c - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void _GrPatternFilledPlot(int x,int y,GrPattern *p) -{ - int xp,yp; - - if(p->gp_ispixmap) { - xp = x % p->gp_pxp_width; - yp = y % p->gp_pxp_height; - (*CURC->gc_driver->drawpixel)(x,y, - (*p->gp_pxp_source.gf_driver->readpixel)(&p->gp_pxp_source,xp,yp) - ); - } - else { - xp = x & 7; - yp = y % p->gp_bmp_height; - (*CURC->gc_driver->drawpixel)(x,y, - (p->gp_bmp_data[yp] & (0x80U >> xp)) ? p->gp_bmp_fgcolor : p->gp_bmp_bgcolor - ); - } -} - -void GrPatternFilledPlot(int x,int y,GrPattern *p) -{ - clip_dot(CURC,x,y); - mouse_block(CURC,x,y,x,y); - _GrPatternFilledPlot(x+CURC->gc_xoffset,y+CURC->gc_yoffset, p); - mouse_unblock(); -} - diff --git a/thirdparty/grx249/src/pattern/patfpoly.c b/thirdparty/grx249/src/pattern/patfpoly.c deleted file mode 100644 index f7bbd07..0000000 --- a/thirdparty/grx249/src/pattern/patfpoly.c +++ /dev/null @@ -1,34 +0,0 @@ -/** - ** patfpoly.c - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrPatternFilledPolygon(int n,int pt[][2],GrPattern *p) -{ - GrFillArg fa; - - fa.p = p; - if(n <= 3) _GrScanConvexPoly(n,pt,&_GrPatternFiller,fa); - else _GrScanPolygon( n,pt,&_GrPatternFiller,fa); -} - diff --git a/thirdparty/grx249/src/pattern/patternf.c b/thirdparty/grx249/src/pattern/patternf.c deleted file mode 100644 index cbcb499..0000000 --- a/thirdparty/grx249/src/pattern/patternf.c +++ /dev/null @@ -1,25 +0,0 @@ -/** - ** patternf.c ---- data structure for standard pattern filler - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -GrFiller _GrPatternFiller = { - _GrDrawPatternedPixel, - _GrDrawPatternedLine, - _GrFillPatternedScanLine -}; diff --git a/thirdparty/grx249/src/pattern/pattfldf.c b/thirdparty/grx249/src/pattern/pattfldf.c deleted file mode 100644 index acd497c..0000000 --- a/thirdparty/grx249/src/pattern/pattfldf.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** pattfldf.c ---- fill an arbitrary area with a pattern - ** - ** Copyright (c) 1997 Hartmut Schirmer - ** [e-mail: hsc@techfak.uni-kiel.de] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "shapes.h" - -void GrPatternFloodFill(int x, int y, GrColor border, GrPattern *p) -{ - GrFillArg fval; - - fval.p = p; - _GrFloodFill(x,y,border,&_GrPatternFiller,fval); -} diff --git a/thirdparty/grx249/src/pattern/pattline.c b/thirdparty/grx249/src/pattern/pattline.c deleted file mode 100644 index b282e79..0000000 --- a/thirdparty/grx249/src/pattern/pattline.c +++ /dev/null @@ -1,40 +0,0 @@ -/** - ** pattline.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [e-mail : goffioul@emic.ucl.ac.be] - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp) -{ - GrFillArg fval; - int points[2][2]; - - points[0][0] = x1; - points[0][1] = y1; - points[1][0] = x2; - points[1][1] = y2; - fval.p = lp->lnp_pattern; - _GrDrawCustomPolygon(2,points,lp->lnp_option,&_GrPatternFiller,fval,FALSE,FALSE); -} diff --git a/thirdparty/grx249/src/pattern/pattpoly.c b/thirdparty/grx249/src/pattern/pattpoly.c deleted file mode 100644 index 95d709e..0000000 --- a/thirdparty/grx249/src/pattern/pattpoly.c +++ /dev/null @@ -1,59 +0,0 @@ -/** - ** pattpoly.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [e-mail : goffioul@emic.ucl.ac.be] - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp) -{ - GrFillArg fval; - - fval.p = lp->lnp_pattern; - _GrDrawCustomPolygon(numpts,points,lp->lnp_option, - &_GrPatternFiller,fval,FALSE,FALSE); -} - -void GrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp) -{ - GrFillArg fval; - - fval.p = lp->lnp_pattern; - _GrDrawCustomPolygon(numpts,points,lp->lnp_option, - &_GrPatternFiller,fval,TRUE,FALSE); -} - -void GrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp) -{ - GrFillArg fval; - int points[4][2]; - - points[0][0] = x1; points[0][1] = y1; - points[1][0] = x1; points[1][1] = y2; - points[2][0] = x2; points[2][1] = y2; - points[3][0] = x2; points[3][1] = y1; - fval.p = lp->lnp_pattern; - _GrDrawCustomPolygon(4,points,lp->lnp_option, - &_GrPatternFiller,fval,TRUE,FALSE); -} diff --git a/thirdparty/grx249/src/pattern/pfcirc.c b/thirdparty/grx249/src/pattern/pfcirc.c deleted file mode 100644 index 0ff85ed..0000000 --- a/thirdparty/grx249/src/pattern/pfcirc.c +++ /dev/null @@ -1,28 +0,0 @@ -/** - ** pfcirc.c - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -void GrPatternFilledCircle(int xc,int yc,int r,GrPattern *p) -{ - GrPatternFilledEllipse(xc,yc,r,r,p); -} diff --git a/thirdparty/grx249/src/pattern/pfcirca.c b/thirdparty/grx249/src/pattern/pfcirca.c deleted file mode 100644 index 623f2dc..0000000 --- a/thirdparty/grx249/src/pattern/pfcirca.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** pfcirca.c - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -void GrPatternFilledCircleArc(int xc,int yc,int r,int start,int end,int style,GrPattern *p) -{ - GrPatternFilledEllipseArc(xc,yc,r,r,start,end,style,p); -} - diff --git a/thirdparty/grx249/src/pattern/pfelli.c b/thirdparty/grx249/src/pattern/pfelli.c deleted file mode 100644 index f0deec4..0000000 --- a/thirdparty/grx249/src/pattern/pfelli.c +++ /dev/null @@ -1,32 +0,0 @@ -/** - ** pfelli.c - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p) -{ - GrFillArg fa; - - fa.p = p; - _GrScanEllipse(xc,yc,xa,ya,&_GrPatternFiller,fa,TRUE); -} diff --git a/thirdparty/grx249/src/pattern/pfellia.c b/thirdparty/grx249/src/pattern/pfellia.c deleted file mode 100644 index 121a9bf..0000000 --- a/thirdparty/grx249/src/pattern/pfellia.c +++ /dev/null @@ -1,48 +0,0 @@ -/** - ** pfellia.c - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "shapes.h" - -void GrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrPattern *p) -{ - int (*points)[2]; - setup_ALLOC(); - points = ALLOC(sizeof(int) * 2 * (GR_MAX_ELLIPSE_POINTS + 1)); - if (points != NULL) - { - int numpts = GrGenerateEllipseArc(xc,yc,xa,ya,start,end,points); - GrFillArg fa; - - if (style == GR_ARC_STYLE_CLOSE2) { - points[numpts][0] = xc; - points[numpts][1] = yc; - numpts++; - } - fa.p = p; - if(numpts < 0) _GrScanConvexPoly((-numpts),points,&_GrPatternFiller,fa); - else _GrScanPolygon( numpts, points,&_GrPatternFiller,fa); - FREE(points); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/pattern/ptcirc.c b/thirdparty/grx249/src/pattern/ptcirc.c deleted file mode 100644 index f16666b..0000000 --- a/thirdparty/grx249/src/pattern/ptcirc.c +++ /dev/null @@ -1,31 +0,0 @@ -/** - ** ptcirc.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [e-mail : goffioul@emic.ucl.ac.be] - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -void GrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp) -{ - GrPatternedEllipse(xc,yc,r,r,lp); -} diff --git a/thirdparty/grx249/src/pattern/ptcirca.c b/thirdparty/grx249/src/pattern/ptcirca.c deleted file mode 100644 index b7d91fa..0000000 --- a/thirdparty/grx249/src/pattern/ptcirca.c +++ /dev/null @@ -1,32 +0,0 @@ -/** - ** ptcirca.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [e-mail : goffioul@emic.ucl.ac.be] - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -void GrPatternedCircleArc(int xc,int yc,int r,int start,int end,int style,GrLinePattern *lp) -{ - GrPatternedEllipseArc(xc,yc,r,r,start,end,style,lp); -} - diff --git a/thirdparty/grx249/src/pattern/ptelli.c b/thirdparty/grx249/src/pattern/ptelli.c deleted file mode 100644 index 227e332..0000000 --- a/thirdparty/grx249/src/pattern/ptelli.c +++ /dev/null @@ -1,45 +0,0 @@ -/** - ** ptelli.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [e-mail : goffioul@emic.ucl.ac.be] - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "shapes.h" - -void GrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp) { - int (*points)[2]; - setup_ALLOC(); - points = ALLOC(sizeof(int) * 2 * GR_MAX_ELLIPSE_POINTS); - if (points != NULL) - { - int numpts = GrGenerateEllipse(xc,yc,xa,ya,points); - GrFillArg fval; - - fval.p = lp->lnp_pattern; - _GrDrawCustomPolygon(numpts,points,lp->lnp_option, - &_GrPatternFiller,fval,TRUE,TRUE); - FREE(points); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/pattern/ptellia.c b/thirdparty/grx249/src/pattern/ptellia.c deleted file mode 100644 index 3d046f5..0000000 --- a/thirdparty/grx249/src/pattern/ptellia.c +++ /dev/null @@ -1,63 +0,0 @@ -/** - ** ptellia.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [e-mail : goffioul@emic.ucl.ac.be] - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "shapes.h" - -void GrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrLinePattern *lp) -{ - int (*points)[2]; - setup_ALLOC(); - points = ALLOC(sizeof(int) * 2 * (GR_MAX_ELLIPSE_POINTS + 2)); - if (points != NULL) - { - int numpts = GrGenerateEllipseArc(xc,yc,xa,ya,start,end,points); - GrFillArg fval; - int close; - - close = FALSE; - if (style == GR_ARC_STYLE_CLOSE2) { - points[numpts][0] = xc; - points[numpts][1] = yc; - numpts++; - points[numpts][0] = points[0][0]; - points[numpts][1] = points[0][1]; - numpts++; - close = TRUE; - } - if (style == GR_ARC_STYLE_CLOSE1) { - points[numpts][0] = points[0][0]; - points[numpts][1] = points[0][1]; - numpts++; - close = TRUE; - } - fval.p = lp->lnp_pattern; - _GrDrawCustomPolygon(numpts,points,lp->lnp_option, - &_GrPatternFiller,fval,close,TRUE); - FREE(points); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/setup/clip.c b/thirdparty/grx249/src/setup/clip.c deleted file mode 100644 index f4098ca..0000000 --- a/thirdparty/grx249/src/setup/clip.c +++ /dev/null @@ -1,55 +0,0 @@ -/** - ** clip.c ---- clip box setting utilities - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" - -void GrSetClipBox(int x1,int y1,int x2,int y2) -{ - cxclip_box(CURC,x1,y1,x2,y2); - CURC->gc_xcliplo = x1; - CURC->gc_ycliplo = y1; - CURC->gc_xcliphi = x2; - CURC->gc_ycliphi = y2; -} - -void GrSetClipBoxC(GrContext *c,int x1,int y1,int x2,int y2) -{ - cxclip_box(c,x1,y1,x2,y2); - c->gc_xcliplo = x1; - c->gc_ycliplo = y1; - c->gc_xcliphi = x2; - c->gc_ycliphi = y2; -} - -void GrResetClipBox(void) -{ - CURC->gc_xcliplo = 0; - CURC->gc_ycliplo = 0; - CURC->gc_xcliphi = CURC->gc_xmax; - CURC->gc_ycliphi = CURC->gc_ymax; -} - -void GrResetClipBoxC(GrContext *c) -{ - c->gc_xcliplo = 0; - c->gc_ycliplo = 0; - c->gc_xcliphi = c->gc_xmax; - c->gc_ycliphi = c->gc_ymax; -} - diff --git a/thirdparty/grx249/src/setup/clrinfo.c b/thirdparty/grx249/src/setup/clrinfo.c deleted file mode 100644 index 7f284a2..0000000 --- a/thirdparty/grx249/src/setup/clrinfo.c +++ /dev/null @@ -1,55 +0,0 @@ -/** - ** clrinfo.c ---- the color info data structure - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#undef GrColorInfo - -const -struct _GR_colorInfo * const GrColorInfo = &_GrColorInfo; -struct _GR_colorInfo _GrColorInfo = { - 16, /* ncolors: initted for 16 color VGA modes */ - 0, /* nfree */ - 0, /* black */ - 15, /* white */ - FALSE, /* RBG */ - { 6, 6, 6 }, /* precision */ - { 5, 5, 5 }, /* bit position */ - { 0xfc, 0xfc, 0xfc }, /* mask */ - { 2, 2, 2 }, /* round */ - { 2, 2, 2 }, /* shift */ - 2, /* normalization */ - { /* first 16 EGA/VGA colors */ - { 0, 0, 0 }, /* black */ - { 0, 0, 170 }, /* blue */ - { 0, 170, 0 }, /* green */ - { 0, 170, 170 }, /* cyan */ - { 170, 0, 0 }, /* red */ - { 170, 0, 170 }, /* magenta */ - { 170, 85, 0 }, /* brown */ - { 170, 170, 170 }, /* light gray */ - { 85, 85, 85 }, /* dark gray */ - { 85, 85, 255 }, /* light blue */ - { 85, 255, 85 }, /* light green */ - { 85, 255, 255 }, /* light cyan */ - { 255, 85, 85 }, /* light red */ - { 255, 85, 255 }, /* light magenta */ - { 255, 255, 85 }, /* yellow */ - { 255, 255, 255 } /* white */ - } -}; - diff --git a/thirdparty/grx249/src/setup/clrinlne.c b/thirdparty/grx249/src/setup/clrinlne.c deleted file mode 100644 index 9f2766c..0000000 --- a/thirdparty/grx249/src/setup/clrinlne.c +++ /dev/null @@ -1,114 +0,0 @@ -/** - ** clrinlne.c ---- the color inline functions - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -GrColor (GrColorValue)(GrColor c) -{ - return(GrColorValue(c)); -} - -GrColor (GrColorMode)(GrColor c) -{ - return(GrColorMode(c)); -} - -GrColor (GrWriteModeColor)(GrColor c) -{ - return(GrWriteModeColor(c)); -} - -GrColor (GrXorModeColor)(GrColor c) -{ - return(GrXorModeColor(c)); -} - -GrColor (GrOrModeColor)(GrColor c) -{ - return(GrOrModeColor(c)); -} -GrColor (GrAndModeColor)(GrColor c) -{ - return(GrAndModeColor(c)); -} - -GrColor (GrImageModeColor)(GrColor c) -{ - return(GrImageModeColor(c)); -} - -GrColor (GrNumColors)(void) -{ - return(GrNumColors()); -} - -GrColor (GrNumFreeColors)(void) -{ - return(GrNumFreeColors()); -} - -GrColor (GrBuildRGBcolorT)(int r,int g,int b) -{ - return(GrBuildRGBcolorT(r,g,b)); -} - -GrColor (GrBuildRGBcolorR)(int r,int g,int b) -{ - return(GrBuildRGBcolorR(r,g,b)); -} - -int (GrRGBcolorRed)(GrColor c) -{ - return(GrRGBcolorRed(c)); -} - -int (GrRGBcolorGreen)(GrColor c) -{ - return(GrRGBcolorGreen(c)); -} - -int (GrRGBcolorBlue)(GrColor c) -{ - return(GrRGBcolorBlue(c)); -} - -GrColor (GrAllocColorID)(int r,int g,int b) -{ - return(GrAllocColorID(r,g,b)); -} - -GrColor (GrAllocColor2)(long hcolor) -{ - return(GrAllocColor2(hcolor)); -} - -GrColor (GrAllocColor2ID)(long hcolor) -{ - return(GrAllocColor2ID(hcolor)); -} - -void (GrQueryColorID)(GrColor c,int *r,int *g,int *b) -{ - GrQueryColorID(c,r,g,b); -} - -void (GrQueryColor2ID)(GrColor c,long *hcolor) -{ - GrQueryColor2ID(c,hcolor); -} - diff --git a/thirdparty/grx249/src/setup/colorbw.c b/thirdparty/grx249/src/setup/colorbw.c deleted file mode 100644 index 671c4ca..0000000 --- a/thirdparty/grx249/src/setup/colorbw.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** colorbw.c ---- standard colors: black and white - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -#ifdef GrBlack -#undef GrBlack -#endif -GrColor GrBlack(void) -{ - GRX_ENTER(); - if(CLRINFO->black == GrNOCOLOR) CLRINFO->black = GrAllocColor(0,0,0); - GRX_RETURN(CLRINFO->black); -} - -#ifdef GrWhite -#undef GrWhite -#endif -GrColor GrWhite(void) -{ - GRX_ENTER(); - if(CLRINFO->white == GrNOCOLOR) CLRINFO->white = GrAllocColor(255,255,255); - GRX_RETURN(CLRINFO->white); -} - diff --git a/thirdparty/grx249/src/setup/colorega.c b/thirdparty/grx249/src/setup/colorega.c deleted file mode 100644 index 34ac7fc..0000000 --- a/thirdparty/grx249/src/setup/colorega.c +++ /dev/null @@ -1,48 +0,0 @@ -/** - ** colorega.c ---- Alloc the standard EGA palette - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -static struct { - GR_int8u r, g, b; -} EGArgb[16] = { - { 0, 0, 0 }, /* black */ - { 0, 0, 170 }, /* blue */ - { 0, 170, 0 }, /* green */ - { 0, 170, 170 }, /* cyan */ - { 170, 0, 0 }, /* red */ - { 170, 0, 170 }, /* magenta */ - { 170, 85, 0 }, /* brown */ - { 170, 170, 170 }, /* light gray */ - { 85, 85, 85 }, /* dark gray */ - { 85, 85, 255 }, /* light blue */ - { 85, 255, 85 }, /* light green */ - { 85, 255, 255 }, /* light cyan */ - { 255, 85, 85 }, /* light red */ - { 255, 85, 255 }, /* light magenta */ - { 255, 255, 85 }, /* yellow */ - { 255, 255, 255 } /* white */ -}; - -GrColor *GrAllocEgaColors(void) { - static GrColor egapal[16]; - int i; - for (i=0; i < 16; ++i) - egapal[i] = GrAllocColor(EGArgb[i].r,EGArgb[i].g,EGArgb[i].b); - return egapal; -} - diff --git a/thirdparty/grx249/src/setup/colors.c b/thirdparty/grx249/src/setup/colors.c deleted file mode 100644 index 00ee80b..0000000 --- a/thirdparty/grx249/src/setup/colors.c +++ /dev/null @@ -1,368 +0,0 @@ -/** - ** colors.c ---- color management functions - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "memcopy.h" -#include "memfill.h" - -static void (*DACload)(int c,int r,int g,int b) = NULL; - -static void loadcolor(int c,int r,int g,int b) -{ - CLRINFO->ctable[c].r = (r &= CLRINFO->mask[0]); - CLRINFO->ctable[c].g = (g &= CLRINFO->mask[1]); - CLRINFO->ctable[c].b = (b &= CLRINFO->mask[2]); - if(DACload) (*DACload)(c,r,g,b); -} - -static void setbits(char *prec,char *pos) -{ - int i,tmp; - CLRINFO->norm = 0; - for(i = 0; i < 3; i++,prec++,pos++) { - CLRINFO->prec[i] = *prec; - CLRINFO->pos[i] = *prec + *pos - 1; - CLRINFO->mask[i] = (tmp = 0xff ^ (0xff >> *prec)); - CLRINFO->round[i] = (tmp >> 1) & ~tmp; - CLRINFO->shift[i] = (tmp = CLRINFO->pos[i] - 7); - CLRINFO->norm = imax(CLRINFO->norm,(-tmp)); - } - CLRINFO->shift[0] += CLRINFO->norm; - CLRINFO->shift[1] += CLRINFO->norm; - CLRINFO->shift[2] += CLRINFO->norm; -} - -void GrRefreshColors(void) -{ - int i; - for(i = 0; i < (int)CLRINFO->ncolors; i++) { - if(CLRINFO->ctable[i].defined) loadcolor( - (int)(i), - CLRINFO->ctable[i].r, - CLRINFO->ctable[i].g, - CLRINFO->ctable[i].b - ); - } -} - -/* _GR_firstFreeColor is normally zero but some systems may protect some -** colors for other programs (eg. X11). In this case we don't touch them. -** These variables are only used in palette modes -*/ -#ifdef __XWIN__ -int _GR_firstFreeColor = 0; -int _GR_lastFreeColor = -1; -#else -#define _GR_firstFreeColor 0 -#endif - -int _GrResetColors(void) -{ -# define NSAVED 16 - static char *infosave = NULL; - static int firsttime = TRUE; - int i; - if(firsttime) { - infosave = malloc(offsetof(struct _GR_colorInfo,ctable[NSAVED])); - if ( infosave ) { - memcpy(infosave,CLRINFO,offsetof(struct _GR_colorInfo,ctable[NSAVED])); - } - firsttime = FALSE; - } - sttzero(CLRINFO); - if(DRVINFO->actmode.extinfo->mode == GR_frameText) { - if ( infosave ) { - memcpy(CLRINFO,infosave,sizeof(infosave)); - return TRUE; - } - return FALSE; - } - DACload = DRVINFO->actmode.extinfo->loadcolor; - CLRINFO->black = GrNOCOLOR; - CLRINFO->white = GrNOCOLOR; - CLRINFO->ncolors = DRVINFO->actmode.bpp>=32 ? 0 : (1L << DRVINFO->actmode.bpp); - if ( ((CLRINFO->ncolors-1)&GrCVALUEMASK) != (CLRINFO->ncolors-1) ) { - /* can happen on 32bpp systems. */ - int cbpp = 0; - for(i=0; i < 3; ++i) - cbpp += DRVINFO->actmode.extinfo->cprec[i]; - CLRINFO->ncolors = 1L << cbpp; - } - setbits( - DRVINFO->actmode.extinfo->cprec, - DRVINFO->actmode.extinfo->cpos - ); - switch(DRVINFO->actmode.bpp) { - case 4: - case 8: -#ifdef __XWIN__ - if (_GR_lastFreeColor >= _GR_firstFreeColor) - CLRINFO->nfree = _GR_lastFreeColor - _GR_firstFreeColor + 1; - else -#endif - CLRINFO->nfree = CLRINFO->ncolors - _GR_firstFreeColor; - if ( infosave ) { - for(i = 0; i < NSAVED; i++) { - loadcolor( - (i + _GR_firstFreeColor), - ((struct _GR_colorInfo *)(infosave))->ctable[i].r, - ((struct _GR_colorInfo *)(infosave))->ctable[i].g, - ((struct _GR_colorInfo *)(infosave))->ctable[i].b - ); - CLRINFO->ctable[i].defined = TRUE; - } - } - break; - default: - CLRINFO->RGBmode = TRUE; - break; - } - return ((CLRINFO->ncolors-1)&GrCVALUEMASK) == CLRINFO->ncolors-1; -} - -void GrResetColors(void) -{ - _GrResetColors(); -} - -void GrSetRGBcolorMode(void) -{ - if(!CLRINFO->RGBmode) { - GrColor c; - switch(CLRINFO->ncolors) { - case 16L: setbits("\1\2\1","\3\1\0"); break; - case 256L: setbits("\3\3\2","\5\2\0"); break; - default: return; - } - CLRINFO->RGBmode = TRUE; - CLRINFO->nfree = 0L; - CLRINFO->black = 0L; - CLRINFO->white = CLRINFO->ncolors - 1L; - for(c = 0; c < CLRINFO->ncolors; c++) loadcolor( - (int)(c), - (int)GrRGBcolorRed(c), - (int)GrRGBcolorGreen(c), - (int)GrRGBcolorBlue(c) - ); - } -} - -#define ROUNDCOLORCOMP(x,n) ( \ - ((unsigned int)(x) >= CLRINFO->mask[n]) ? \ - CLRINFO->mask[n] : \ - (((x) + CLRINFO->round[n]) & CLRINFO->mask[n]) \ -) - -GrColor GrAllocColor(int r,int g,int b) -{ - GrColor res; - - GRX_ENTER(); - res = GrNOCOLOR; - r = ROUNDCOLORCOMP(r,0); - g = ROUNDCOLORCOMP(g,1); - b = ROUNDCOLORCOMP(b,2); - if(CLRINFO->RGBmode) { - res = GrBuildRGBcolorT(r,g,b); - } - else { - GR_int32u minerr = 1000; - int i; - int free_ = (-1),allfree = (-1),best = (-1); - int ndef = (int)CLRINFO->ncolors - (int)CLRINFO->nfree; - DBGPRINTF(DBG_COLOR,("Allocating color: r=%d, g=%d, b=%d\n",r,g,b)); - for(i = 0; i < (int)CLRINFO->ncolors; i++) { - if(CLRINFO->ctable[i].defined) { - if(!CLRINFO->ctable[i].writable) { - GR_int32u err = 0; - GR_int16u colerr; - colerr = iabs(r - CLRINFO->ctable[i].r); - colerr = colerr * colerr; - err += colerr; - colerr = iabs(g - CLRINFO->ctable[i].g); - colerr = colerr * colerr; - err += colerr; - colerr = iabs(b - CLRINFO->ctable[i].b); - colerr = colerr * colerr; - err += colerr; - if(err < minerr) { - DBGPRINTF(DBG_COLOR,("New best color %d (err=%ld): r=%d, g=%d, b=%d\n", i, err, \ - (int)CLRINFO->ctable[i].r,(int)CLRINFO->ctable[i].g,(int)CLRINFO->ctable[i].b)); - best = i; - if((minerr = err) == 0) goto foundbest; - } - if((free_ <= 0) && !CLRINFO->ctable[i].nused) { - DBGPRINTF(DBG_COLOR,("First free color: r=%d\n", i)); - free_ = i; - } - } - if(CLRINFO->ctable[i].nused) ndef--; - } - else { - if(allfree < 0) allfree = i; - } - if((allfree >= 0) && (ndef <= 0)) { - DBGPRINTF(DBG_COLOR,("Found a usable color: allfree = %d, ndef = %d\n", allfree, ndef)); - break; - } - } - if(allfree >= 0) { - DBGPRINTF(DBG_COLOR,("Using %d as free color (free=%d)\n", allfree, free_)); - free_ = allfree; - } - if(free_ >= 0) { - DBGPRINTF(DBG_COLOR,("Allocating %d\n", free_)); - CLRINFO->ctable[free_].defined = TRUE; - CLRINFO->ctable[free_].writable = FALSE; - CLRINFO->ctable[free_].nused = 1; - CLRINFO->nfree--; - loadcolor(free_,r,g,b); - res = free_; - goto done; - } - foundbest: - if(best >= 0) { - DBGPRINTF(DBG_COLOR,("Using best %d\n", best)); - if(!CLRINFO->ctable[best].nused) CLRINFO->nfree--; - CLRINFO->ctable[best].nused++; - res = best; - goto done; - } - } -done: GRX_RETURN(res); -} - -GrColor GrAllocCell(void) -{ - if(!CLRINFO->RGBmode && CLRINFO->nfree) { - int i,free_ = (-1); - for(i = 0; i < (int)CLRINFO->ncolors; i++) { - if(!CLRINFO->ctable[i].defined) { - free_ = i; - break; - } - if(!CLRINFO->ctable[i].nused) { - if(free_ < 0) free_ = i; - } - } - if(free_ >= 0) { - CLRINFO->ctable[free_].defined = TRUE; - CLRINFO->ctable[free_].writable = TRUE; - CLRINFO->ctable[free_].nused = 1; - CLRINFO->nfree--; - loadcolor(free_,0,0,0); - return((GrColor)(free_)); - } - } - return(GrNOCOLOR); -} - -void GrFreeColor(GrColor c) -{ - if(!CLRINFO->RGBmode && ((GrColor)(c) < CLRINFO->ncolors) && - !CLRINFO->ctable[(int)(c)].writable && - CLRINFO->ctable[(int)(c)].defined && - (--CLRINFO->ctable[(int)(c)].nused == 0)) { - CLRINFO->nfree++; - CLRINFO->ctable[(int)(c)].defined = FALSE; - CLRINFO->ctable[(int)(c)].writable = FALSE; - CLRINFO->ctable[(int)(c)].nused = 0; - } -} - -void GrFreeCell(GrColor c) -{ - GRX_ENTER(); - if(!CLRINFO->RGBmode && ((GrColor)(c) < CLRINFO->ncolors)) { - if(CLRINFO->ctable[(int)(c)].writable) { - CLRINFO->nfree++; - CLRINFO->ctable[(int)(c)].defined = FALSE; - CLRINFO->ctable[(int)(c)].writable = FALSE; - CLRINFO->ctable[(int)(c)].nused = 0; - } - } - GRX_LEAVE(); -} - -void GrSetColor(GrColor c,int r,int g,int b) -{ - GRX_ENTER(); - if(!CLRINFO->RGBmode && ((GrColor)(c) < CLRINFO->ncolors)) { - if(!CLRINFO->ctable[(int)(c)].defined) { - CLRINFO->ctable[(int)(c)].defined = TRUE; - CLRINFO->ctable[(int)(c)].nused = 0; - } - if(!CLRINFO->ctable[(int)(c)].nused) { - CLRINFO->ctable[(int)(c)].writable = TRUE; - CLRINFO->ctable[(int)(c)].nused = 1; - CLRINFO->nfree--; - } - if(CLRINFO->ctable[(int)(c)].writable) loadcolor( - (int)(c), - (int)ROUNDCOLORCOMP(r,0), - (int)ROUNDCOLORCOMP(g,1), - (int)ROUNDCOLORCOMP(b,2) - ); - } - GRX_LEAVE(); -} - -void GrQueryColor(GrColor c,int *r,int *g,int *b) -{ - GRX_ENTER(); - GrQueryColorID(c,r,g,b); - GRX_LEAVE(); -} - -void GrQueryColor2(GrColor c,long *hcolor) -{ - GRX_ENTER(); - GrQueryColor2ID(c,hcolor); - GRX_LEAVE(); -} - -#define CSAVE_MAGIC 0x7abf5698UL - -typedef struct { - GrColor magic; - GrColor nc; - struct _GR_colorInfo info; -} colorsave; - -int GrColorSaveBufferSize(void) -{ - return(sizeof(colorsave)); -} - -void GrSaveColors(void *buffer) -{ - colorsave *cp = (colorsave *)buffer; - cp->magic = CSAVE_MAGIC; - cp->nc = GrNumColors(); - sttcopy(&cp->info,CLRINFO); -} - -void GrRestoreColors(void *buffer) -{ - colorsave *cp = (colorsave *)buffer; - if((cp->magic == CSAVE_MAGIC) && (cp->nc == GrNumColors())) { - sttcopy(CLRINFO,&cp->info); - GrRefreshColors(); - } -} - diff --git a/thirdparty/grx249/src/setup/context.c b/thirdparty/grx249/src/setup/context.c deleted file mode 100644 index 010481b..0000000 --- a/thirdparty/grx249/src/setup/context.c +++ /dev/null @@ -1,156 +0,0 @@ -/** - ** context.c ----- context creation and manipulation functions - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include - -#include "libgrx.h" -#include "allocate.h" -#include "clipping.h" -#include "memcopy.h" -#include "memfill.h" - -#define MYCONTEXT 1 -#define MYFRAME 2 - -GrContext *GrCreateFrameContext(GrFrameMode md,int w,int h,char far *memory[4],GrContext *where) -{ - GrFrameDriver *fd = _GrFindRAMframeDriver(md); - int ii,offset,flags = 0; - char far *mymem[4]; - long psize; - - if(!fd) return(NULL); - offset = GrFrameLineOffset(md,w); - psize = GrFramePlaneSize(md,w,h); - if(psize <= 0L) return(NULL); - if(psize > fd->max_plane_size) return(NULL); - if(!where) { - where = malloc(sizeof(GrContext)); - if(!where) return(NULL); - flags = MYCONTEXT; - } - sttzero(where); - if(!memory) { - for(ii = 0; ii < fd->num_planes; ii++) { - mymem[ii] = farmalloc((size_t)psize); - if(!mymem[ii]) { - while(--ii >= 0) farfree(mymem[ii]); - if(flags) free(where); - return(NULL); - } - } - while(ii < 4) mymem[ii++] = NULL; - memory = mymem; - flags |= MYFRAME; - } - where->gc_driver = fd; - where->gc_baseaddr[0] = memory[0]; - where->gc_baseaddr[1] = memory[1]; - where->gc_baseaddr[2] = memory[2]; - where->gc_baseaddr[3] = memory[3]; - where->gc_lineoffset = offset; - where->gc_memflags = flags; - where->gc_xcliphi = where->gc_xmax = w - 1; - where->gc_ycliphi = where->gc_ymax = h - 1; - return(where); -} - -GrContext *GrCreateSubContext( - int x1,int y1,int x2,int y2, - const GrContext *parent, - GrContext *where -){ - int flags = 0; - - if(!parent) parent = SCRN; - if(parent->gc_root) { - x1 += parent->gc_xoffset; - y1 += parent->gc_yoffset; - x2 += parent->gc_xoffset; - y2 += parent->gc_yoffset; - parent = parent->gc_root; - } - cxclip_box_(parent,x1,y1,x2,y2,return(NULL),CLIP_EMPTY_MACRO_ARG); - if(!where) { - where = malloc(sizeof(GrContext)); - if(!where) return(NULL); - flags = MYCONTEXT; - } - sttzero(where); - sttcopy(&where->gc_frame,&parent->gc_frame); - where->gc_memflags = flags; - where->gc_xoffset = x1; - where->gc_yoffset = y1; - where->gc_xcliphi = where->gc_xmax = x2 - x1; - where->gc_ycliphi = where->gc_ymax = y2 - y1; - where->gc_root = (GrContext *)parent; - return(where); -} - -void GrResizeSubContext(GrContext *context,int x1,int y1,int x2,int y2) -{ - GrContext *parent = context->gc_root; - - if((parent = context->gc_root) == NULL) return; -/* - x1 += context->gc_xoffset; - y1 += context->gc_yoffset; - x2 += context->gc_xoffset; - y2 += context->gc_yoffset; -*/ - cxclip_box(parent,x1,y1,x2,y2); - context->gc_xoffset = x1; - context->gc_yoffset = y1; - context->gc_xcliphi = context->gc_xmax = x2 - x1; - context->gc_ycliphi = context->gc_ymax = y2 - y1; - context->gc_xcliplo = 0; - context->gc_ycliplo = 0; -} - -void GrDestroyContext(GrContext *cxt) -{ - if(cxt && (cxt != CURC) && (cxt != SCRN)) { - if(cxt->gc_memflags & MYFRAME) { - int ii = cxt->gc_driver->num_planes; - while(--ii >= 0) farfree(cxt->gc_baseaddr[ii]); - } - if(cxt->gc_memflags & MYCONTEXT) free(cxt); - } -} - -void GrSetContext(const GrContext *context) -{ - if(!context) context = SCRN; - sttcopy(CURC,context); - sttcopy(FDRV,context->gc_driver); -} - -GrContext *GrSaveContext(GrContext *where) -{ - int flags = 0; - - if(!where) { - where = malloc(sizeof(GrContext)); - if(!where) return(NULL); - flags = MYCONTEXT; - } - sttcopy(where,CURC); - where->gc_memflags = flags; - return(where); -} - diff --git a/thirdparty/grx249/src/setup/cxtinfo.c b/thirdparty/grx249/src/setup/cxtinfo.c deleted file mode 100644 index 6d8b506..0000000 --- a/thirdparty/grx249/src/setup/cxtinfo.c +++ /dev/null @@ -1,68 +0,0 @@ -/** - ** cxtinfo.c ---- the context info data structure - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "memmode.h" -#undef GrContextInfo - -const -struct _GR_contextInfo * const GrContextInfo = &_GrContextInfo; -struct _GR_contextInfo _GrContextInfo = { - { /* the current context */ - { /* frame */ - { /* frame start addresses */ -#ifdef __MSDOS__ - LINP_PTR(MK_FP(0xb800,0)), - LINP_PTR(MK_FP(0xb800,0)), - LINP_PTR(MK_FP(0xb800,0)), - LINP_PTR(MK_FP(0xb800,0)) -#else - NULL,NULL,NULL,NULL -#endif - }, - 0, /* selector */ - TRUE, /* onscreen */ - 0, /* memflags */ - 0, /* lineoffset */ - &DRVINFO->tdriver /* frame driver */ - }, - NULL /* root */ - }, - { /* the screen context */ - { /* frame */ - { /* frame start addresses */ -#ifdef __MSDOS__ - LINP_PTR(MK_FP(0xb800,0)), - LINP_PTR(MK_FP(0xb800,0)), - LINP_PTR(MK_FP(0xb800,0)), - LINP_PTR(MK_FP(0xb800,0)) -#else - NULL,NULL,NULL,NULL -#endif - }, - 0, /* selector */ - TRUE, /* onscreen */ - 0, /* memflags */ - 0, /* lineoffset */ - &DRVINFO->tdriver /* frame driver */ - }, - NULL /* root */ - } -}; - - diff --git a/thirdparty/grx249/src/setup/cxtinlne.c b/thirdparty/grx249/src/setup/cxtinlne.c deleted file mode 100644 index ecea6db..0000000 --- a/thirdparty/grx249/src/setup/cxtinlne.c +++ /dev/null @@ -1,85 +0,0 @@ -/** - ** ctcinlne.c ---- the context inline functions - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -GrContext *(GrCreateContext)(int w,int h,char far *memory[4],GrContext *where) -{ - return(GrCreateContext(w,h,memory,where)); -} - -GrContext *(GrCurrentContext)(void) -{ - return(GrCurrentContext()); -} - -GrContext *(GrScreenContext)(void) -{ - return(GrScreenContext()); -} - -void (GrGetClipBox)(int *x1p,int *y1p,int *x2p,int *y2p) -{ - GrGetClipBox(x1p,y1p,x2p,y2p); -} - -void (GrGetClipBoxC)(const GrContext *c,int *x1p,int *y1p,int *x2p,int *y2p) -{ - GrGetClipBoxC(c,x1p,y1p,x2p,y2p); -} - -int (GrMaxX)(void) -{ - return(GrMaxX()); -} - -int (GrMaxY)(void) -{ - return(GrMaxY()); -} - -int (GrSizeX)(void) -{ - return(GrSizeX()); -} - -int (GrSizeY)(void) -{ - return(GrSizeY()); -} - -int (GrLowX)(void) -{ - return(GrLowX()); -} - -int (GrLowY)(void) -{ - return(GrLowY()); -} - -int (GrHighX)(void) -{ - return(GrHighX()); -} - -int (GrHighY)(void) -{ - return(GrHighY()); -} - diff --git a/thirdparty/grx249/src/setup/drvinfo.c b/thirdparty/grx249/src/setup/drvinfo.c deleted file mode 100644 index 40a9788..0000000 --- a/thirdparty/grx249/src/setup/drvinfo.c +++ /dev/null @@ -1,138 +0,0 @@ -/** - ** drvinfo.c ---- the driver info data structure - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" - -#undef GrDriverInfo - -static GrColor dummyframefn(void); - -const -struct _GR_driverInfo * const GrDriverInfo = &_GrDriverInfo; -struct _GR_driverInfo _GrDriverInfo = { - NULL, /* video driver */ - &DRVINFO->actmode, /* current video mode pointer */ - { /* current video mode struct */ - FALSE, /* present */ - 4, /* bpp */ - 80,25, /* geometry */ - 3, /* BIOS mode */ - 160, /* lineoffset */ - 0, /* private */ -#ifdef __MSDOS__ - &_GrViDrvEGAVGAtextModeExt /* extended info */ -#else - NULL -#endif - }, - { /* current frame driver */ - GR_frameUndef, /* frame mode */ - GR_frameUndef, /* compatible RAM frame mode */ - FALSE, /* onscreen */ - 1, /* line width alignment */ - 1, /* number of planes */ - 0, /* bits per pixel */ - 0L, /* max plane size the code can handle */ - NULL, - (GrColor (*)(GrFrame*,int,int)) dummyframefn, - (void (*)(int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,int,char*,int,int,GrColor,GrColor)) dummyframefn, - (void (*)(int,int,int,char,GrColor,GrColor)) dummyframefn, - (void (*)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor)) dummyframefn, - (void (*)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor)) dummyframefn, - (void (*)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor)) dummyframefn - }, - { /* screen frame driver */ - GR_frameUndef, /* frame mode */ - GR_frameUndef, /* compatible RAM frame mode */ - FALSE, /* onscreen */ - 1, /* line width alignment */ - 1, /* number of planes */ - 0, /* bits per pixel */ - 0L, /* max plane size the code can handle */ - NULL, - (GrColor (*)(GrFrame*,int,int)) dummyframefn, - (void (*)(int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,int,char*,int,int,GrColor,GrColor)) dummyframefn, - (void (*)(int,int,int,char,GrColor,GrColor)) dummyframefn, - (void (*)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor)) dummyframefn, - (void (*)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor)) dummyframefn, - (void (*)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor)) dummyframefn - }, - { /* dummy text mode frame driver */ - GR_frameText, /* frame mode */ - GR_frameUndef, /* compatible RAM frame mode */ - TRUE, /* onscreen */ - 1, /* line width alignment */ - 1, /* number of planes */ - 16, /* bits per pixel */ - 0L, /* max plane size the code can handle */ - NULL, - (GrColor (*)(GrFrame*,int,int)) dummyframefn, - (void (*)(int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,int,GrColor)) dummyframefn, - (void (*)(int,int,int,int,char*,int,int,GrColor,GrColor)) dummyframefn, - (void (*)(int,int,int,char,GrColor,GrColor)) dummyframefn, - (void (*)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor)) dummyframefn, - (void (*)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor)) dummyframefn, - (void (*)(GrFrame*,int,int,GrFrame*,int,int,int,int,GrColor)) dummyframefn - }, - GR_default_text, /* current mode code */ - 80,25, /* default text size */ - 640,480, /* default graphics size */ - 16L,16L, /* default txt and gr colors */ - 0,0, /* virtual position */ - TRUE, /* exit upon errors */ - TRUE, /* restore startup mode */ - FALSE, /* split banks */ - (-1), /* current bank */ - NULL, /* mode set hook */ - (void (*)(int) )_GrDummyFunction, /* banking func */ - (void (*)(int,int))_GrDummyFunction /* split banking func */ -}; - -static GrColor dummyframefn(void) -{ - if(DRVINFO->errsfatal) { - _GrCloseVideoDriver(); - fprintf(stderr, - "GRX Error: graphics operation attempted %s\n", - (DRVINFO->fdriver.mode == GR_frameText) ? "in text mode" : "before mode set" - ); - exit(1); - } - return(GrNOCOLOR); -} - -void _GrDummyFunction(void) -{ - return; -} - diff --git a/thirdparty/grx249/src/setup/drvinlne.c b/thirdparty/grx249/src/setup/drvinlne.c deleted file mode 100644 index edeccc8..0000000 --- a/thirdparty/grx249/src/setup/drvinlne.c +++ /dev/null @@ -1,125 +0,0 @@ -/** - ** drvinlne.c ---- inline functions related to drivers - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -GrGraphicsMode (GrCurrentMode)(void) -{ - return(GrCurrentMode()); -} - -GrVideoAdapter (GrAdapterType)(void) -{ - return(GrAdapterType()); -} - -GrFrameMode (GrCurrentFrameMode)(void) -{ - return(GrCurrentFrameMode()); -} - -GrFrameMode (GrScreenFrameMode)(void) -{ - return(GrScreenFrameMode()); -} - -GrFrameMode (GrCoreFrameMode)(void) -{ - return(GrCoreFrameMode()); -} - -const GrVideoDriver *(GrCurrentVideoDriver)(void) -{ - return(GrCurrentVideoDriver()); -} - -const GrVideoMode *(GrCurrentVideoMode)(void) -{ - return(GrCurrentVideoMode()); -} - -const GrVideoMode *(GrVirtualVideoMode)(void) -{ - return(GrVirtualVideoMode()); -} - -const GrFrameDriver *(GrCurrentFrameDriver)(void) -{ - return(GrCurrentFrameDriver()); -} - -const GrFrameDriver *(GrScreenFrameDriver)(void) -{ - return(GrScreenFrameDriver()); -} - -int (GrScreenX)(void) -{ - return(GrScreenX()); -} - -int (GrScreenY)(void) -{ - return(GrScreenY()); -} - -int (GrVirtualX)(void) -{ - return(GrVirtualX()); -} - -int (GrVirtualY)(void) -{ - return(GrVirtualY()); -} - -int (GrViewportX)(void) -{ - return(GrViewportX()); -} - -int (GrViewportY)(void) -{ - return(GrViewportY()); -} - -int (GrScreenIsVirtual)(void) -{ - return(GrScreenIsVirtual()); -} - -int (GrNumPlanes)(void) -{ - return(GrNumPlanes()); -} - -int (GrLineOffset)(int width) -{ - return(GrLineOffset(width)); -} - -long (GrPlaneSize)(int w,int h) -{ - return(GrPlaneSize(w,h)); -} - -long (GrContextSize)(int w,int h) -{ - return(GrContextSize(w,h)); -} - diff --git a/thirdparty/grx249/src/setup/fframe.c b/thirdparty/grx249/src/setup/fframe.c deleted file mode 100644 index d4d2ff8..0000000 --- a/thirdparty/grx249/src/setup/fframe.c +++ /dev/null @@ -1,37 +0,0 @@ -/** - ** fframe.c ---- frame driver lookup functions - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" - -GrFrameDriver *_GrFindFrameDriver(GrFrameMode mode) -{ - int ii = 0; - while(_GrFrameDriverTable[ii] != NULL) { - if(_GrFrameDriverTable[ii]->mode == mode) break; - ii++; - } - return(_GrFrameDriverTable[ii]); -} - -GrFrameDriver *_GrFindRAMframeDriver(GrFrameMode mode) -{ - GrFrameDriver *dp = _GrFindFrameDriver(mode); - return((dp && dp->is_video) ? _GrFindFrameDriver(dp->rmode) : dp); -} - diff --git a/thirdparty/grx249/src/setup/fgeom.c b/thirdparty/grx249/src/setup/fgeom.c deleted file mode 100644 index f5b40e7..0000000 --- a/thirdparty/grx249/src/setup/fgeom.c +++ /dev/null @@ -1,50 +0,0 @@ -/** - ** fgeom.c ---- frame geometry and memory allocation utilities - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "arith.h" - -int GrFrameNumPlanes(GrFrameMode md) -{ - GrFrameDriver *dp = _GrFindRAMframeDriver(md); - return(dp ? dp->num_planes : 0); -} - -int GrFrameLineOffset(GrFrameMode md,int width) -{ - GrFrameDriver *dp = _GrFindRAMframeDriver(md); - if(dp) { - unsigned int w = (unsigned int)width - * (dp->bits_per_pixel / dp->num_planes); - w = ((w + 7) >> 3); - w = ((w + dp->row_align - 1) / dp->row_align) * dp->row_align; - return(w); - } - return(0); -} - -long GrFramePlaneSize(GrFrameMode md,int w,int h) -{ - return(umul32(GrFrameLineOffset(md,w),h)); -} - -long GrFrameContextSize(GrFrameMode md,int w,int h) -{ - return(umul32(GrFrameLineOffset(md,w),(GrFrameNumPlanes(md) * h))); -} - diff --git a/thirdparty/grx249/src/setup/hooks.c b/thirdparty/grx249/src/setup/hooks.c deleted file mode 100644 index e6b9374..0000000 --- a/thirdparty/grx249/src/setup/hooks.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** hooks.c ---- functions to set up some hooks and control flags - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -void GrSetModeRestore(int restoreFlag) -{ - DRVINFO->moderestore = restoreFlag; -} - -void GrSetErrorHandling(int exitIfError) -{ - DRVINFO->errsfatal = exitIfError; -} - -void GrSetModeHook(void (*hookfunc)(void)) -{ - DRVINFO->mdsethook = hookfunc; -} - diff --git a/thirdparty/grx249/src/setup/modewalk.c b/thirdparty/grx249/src/setup/modewalk.c deleted file mode 100644 index f286462..0000000 --- a/thirdparty/grx249/src/setup/modewalk.c +++ /dev/null @@ -1,64 +0,0 @@ -/** - ** modewalk.c ---- utilities to iterate over the available video modes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "grdriver.h" -#include "libgrx.h" - -static GrVideoMode *modewalk(GrVideoMode *pm,GrVideoMode *dup,GrFrameMode md) -{ - GrVideoDriver *vd; - GrVideoMode *vm; - int n,seen = TRUE; - if(pm && pm->extinfo) { - md = pm->extinfo->mode; - seen = FALSE; - } - for(vd = VDRV; vd != NULL; vd = vd->inherit) { - for(n = vd->nmodes,vm = vd->modes; --n >= 0; vm++) { - if(vm->present == FALSE) continue; - if(vm->extinfo == NULL) continue; - if(vm->extinfo->mode != md) continue; - if(dup) { - if(vm == dup) return(NULL); - if(vm->width != dup->width) continue; - if(vm->height != dup->height) continue; - if(vm->bpp != dup->bpp) continue; - return(vm); - } - if(seen) { - if(!modewalk(NULL,vm,md)) return(vm); - continue; - } - if(pm == vm) { - seen = TRUE; - } - } - } - return(NULL); -} - -const GrVideoMode *GrFirstVideoMode(GrFrameMode fmode) -{ - return(modewalk(NULL,NULL,fmode)); -} - -const GrVideoMode *GrNextVideoMode(const GrVideoMode *prev) -{ - return(modewalk((GrVideoMode *)prev,NULL,GR_frameUndef)); -} - diff --git a/thirdparty/grx249/src/setup/setdrvr.c b/thirdparty/grx249/src/setup/setdrvr.c deleted file mode 100644 index 6fab2d7..0000000 --- a/thirdparty/grx249/src/setup/setdrvr.c +++ /dev/null @@ -1,133 +0,0 @@ -/** - ** setdrvr.c ---- video driver setup - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "memcopy.h" -#include "memfill.h" - -static char *near nxtoken(char *p,char *token) -{ - while(*p == ' ') p++; - while(*p && (*p != ' ')) *token++ = *p++; - *token = '\0'; - return(p); -} - -int GrSetDriver(char *drvspec) -{ - static int firsttime = TRUE; - GrVideoDriver *drv = NULL; - char options[100]; - if(!drvspec) drvspec = getenv("GRX20DRV"); - options[0] = '\0'; - if(drvspec) { - char t[100],name[100],*p = drvspec; - name[0] = '\0'; - while(p = nxtoken(p,t),t[0] != '\0') { - if(strlen(t) == 2) { -# define CH16(c1,c2) (((c1) << 8) | (c2)) - void *oaddr = NULL; - int cf = FALSE; - switch(CH16(tolower(t[0]),tolower(t[1]))) { - case CH16('n','c'): - case CH16('g','c'): oaddr = &DRVINFO->defgc; cf = TRUE; break; - case CH16('t','c'): oaddr = &DRVINFO->deftc; cf = TRUE; break; - case CH16('g','w'): oaddr = &DRVINFO->defgw; break; - case CH16('t','w'): oaddr = &DRVINFO->deftw; break; - case CH16('g','h'): oaddr = &DRVINFO->defgh; break; - case CH16('t','h'): oaddr = &DRVINFO->defth; break; - } - if(oaddr) { - long optval; - p = nxtoken(p,t); - if(sscanf(t,"%ld",&optval) > 0) { - if(cf) { - switch(toupper(t[strlen(t) - 1])) { - case 'K': optval <<= 10; break; - case 'M': optval <<= 20; break; - } - *((long *)oaddr) = optval; - continue; - } - *((int *)oaddr) = (int)optval; - } - continue; - } - } - strcpy(name,t); - } - for(p = name; (p = strchr(p,':')) != NULL; p++) { - if(p[1] == ':') { - strcpy(options,&p[2]); - *p = '\0'; - break; - } - } - if(name[0] != '\0') { - int ii = 0,found = FALSE; - while(!found && ((drv = _GrVideoDriverTable[ii++]) != NULL)) { - char *n = name; - for(p = drv->name; ; p++,n++) { - if(tolower(*p) != tolower(*n)) break; - if(*p == '\0') { found = TRUE; break; } - } - } - if(!found) return(FALSE); - } - } - if(!drv) { - GrVideoDriver *dp; - int ii,maxmodes = 0; - for(ii = 0; (dp = _GrVideoDriverTable[ii]) != NULL; ii++) { - if(dp->detect && (*dp->detect)()) { - int nm = 0; - for( ; dp; dp = dp->inherit) nm += dp->nmodes; - if(nm > maxmodes) { - drv = _GrVideoDriverTable[ii]; - maxmodes = nm; - } - } - } - if(!drv) return(FALSE); - } - _GrCloseVideoDriver(); - if(firsttime) { - atexit(_GrCloseVideoDriver); - firsttime = FALSE; - } - if(!drv->init || drv->init(options)) { - DRVINFO->vdriver = drv; - return(TRUE); - } - return(FALSE); -} - -void _GrCloseVideoDriver(void) -{ - sttcopy(&DRVINFO->fdriver,&DRVINFO->tdriver); - if(DRVINFO->vdriver != NULL) { - if(DRVINFO->vdriver->reset) (*DRVINFO->vdriver->reset)(); - DRVINFO->vdriver = NULL; - } -} - diff --git a/thirdparty/grx249/src/setup/setmode.c b/thirdparty/grx249/src/setup/setmode.c deleted file mode 100644 index bb71b5a..0000000 --- a/thirdparty/grx249/src/setup/setmode.c +++ /dev/null @@ -1,444 +0,0 @@ -/** - ** setmode.c ---- video mode setup - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include - -#include "libgrx.h" -#include "arith.h" -#include "memfill.h" -#include "memcopy.h" -#include "grdriver.h" - -GrVideoMode * _gr_selectmode(GrVideoDriver *drv,int w,int h,int bpp, - int txt,unsigned int *ep) -{ -# define ERROR(des,act) ((des > act) ? ((des - act) + 20000) : (act - des)) - int n; - unsigned int cerr,serr,err[2]; - GrVideoMode *best,*mp; - GRX_ENTER(); - best = NULL; - mp = drv->modes; - for(n = drv->nmodes; --n >= 0; mp++) { - if(!mp->present) continue; - if(!mp->extinfo) continue; - if((mp->extinfo->mode != GR_frameText) ? txt : !txt) continue; - cerr = ERROR(bpp,mp->bpp); - serr = ERROR(w,mp->width) + ERROR(h,mp->height); - if(((ep) ? FALSE : ((ep = err),TRUE)) || - ((cerr < ep[0])) || - ((cerr == ep[0]) && (serr < ep[1]))) { - best = mp; - if (!cerr && !serr) break; - ep[0] = cerr; - ep[1] = serr; - } - } - if(drv->inherit) { - mp = (drv->inherit->selectmode) (drv->inherit,w,h,bpp,txt,ep); - if(mp) best = mp; - } - GRX_RETURN(best); -} - -static int buildframedriver(GrVideoMode *mp,GrFrameDriver *drv) -{ - GrFrameDriver *d1, *d2; - int res = TRUE; - GRX_ENTER(); - res = TRUE; - d1 = _GrFindFrameDriver(mp->extinfo->mode); - d2 = mp->extinfo->drv; - if(d1) sttcopy(drv,d1); - if(d2) { - int compl = TRUE; -# define MERGE(F) if(d2->F) drv->F = d2->F; else compl = FALSE; - MERGE(readpixel); - MERGE(drawpixel); - MERGE(drawhline); - MERGE(drawvline); - MERGE(drawblock); - MERGE(drawline); - MERGE(drawbitmap); - MERGE(drawpattern); - MERGE(bitblt); - MERGE(bltv2r); - MERGE(bltr2v); - MERGE(getindexedscanline); - MERGE(putscanline); - if(compl) { - memcpy(drv,d2,offsetof(GrFrameDriver,readpixel)); - goto done; /* TRUE */ - } - if(!d1) { res = FALSE; goto done; } - if((d2->mode == d1->mode) && - (d2->rmode == d1->rmode) && - (d1->is_video ? d2->is_video : !d2->is_video) && - (d2->row_align <= d1->row_align) && !(d1->row_align % d2->row_align) && - (d2->num_planes == d1->num_planes) && - (d2->max_plane_size >= d1->max_plane_size) && - (d2->bits_per_pixel == d1->bits_per_pixel)) { - drv->init = d2->init ? d2->init : d1->init; - goto done; /* TRUE */ - } - } - if(!d1) { res = FALSE; goto done; } - sttcopy(drv,d1); -done: GRX_RETURN(res); -} - -static int buildcontext(GrVideoMode *mp,GrFrameDriver *fdp,GrContext *cxt) -{ - long plsize; - int res; - GRX_ENTER(); - res = FALSE; - plsize = umul32(mp->lineoffset,mp->height); - DBGPRINTF(DBG_SETMD,("buildcontext - Mode Frame buffer = 0x%x\n",mp->extinfo->frame)); - DBGPRINTF(DBG_SETMD,("buildcontext - Mode Frame selector = 0x%x\n",mp->extinfo->LFB_Selector)); - sttzero(cxt); -#if !defined(__TURBOC__) \ - && !(defined(__WATCOMC__) && !defined(__386__)) \ - && !(defined(__XWIN__) && !defined(XF86DGA_FRAMEBUFFER) && !defined(__SDL__)) - if(mp->extinfo->flags&GR_VMODEF_LINEAR) - { - DBGPRINTF(DBG_SETMD,("buildcontext - Linear Mode\n")); - cxt->gc_baseaddr[0] = - cxt->gc_baseaddr[1] = - cxt->gc_baseaddr[2] = - cxt->gc_baseaddr[3] = LINP_PTR(mp->extinfo->frame); - cxt->gc_selector = mp->extinfo->LFB_Selector; - } else -#endif /* !__TURBOC__ && !( __WATCOMC__ && !__386__) && !(__XWIN__ && !XF86DGA_FRAMEBUFFER && !__SDL__) */ - if (mp->extinfo->flags&GR_VMODEF_MEMORY) - { - DBGPRINTF(DBG_SETMD,("buildcontext - Memory Mode\n")); - if(plsize > fdp->max_plane_size) goto done; /* FALSE */ - if(mp->lineoffset % fdp->row_align) goto done; /* FALSE */ - DBGPRINTF(DBG_SETMD,("buildcontext - mp->present = %d\n",mp->present)); - DBGPRINTF(DBG_SETMD,("buildcontext - mp->bpp = %d\n",mp->bpp)); - DBGPRINTF(DBG_SETMD,("buildcontext - mp->width = %d\n",mp->width)); - DBGPRINTF(DBG_SETMD,("buildcontext - mp->height = %d\n",mp->height)); - DBGPRINTF(DBG_SETMD,("buildcontext - mp->mode = %d\n",mp->mode)); - DBGPRINTF(DBG_SETMD,("buildcontext - mp->lineoffset = %d\n",mp->lineoffset)); - DBGPRINTF(DBG_SETMD,("buildcontext - mp->ext->mode = %d\n",mp->extinfo->mode)); - DBGPRINTF(DBG_SETMD,("buildcontext - mp->ext->flags = %x\n",mp->extinfo->flags)); -#ifdef GRX_USE_RAM3x8 - if (mp->bpp==24) - { - int m_incr = mp->lineoffset*mp->height; - cxt->gc_baseaddr[0] = mp->extinfo->frame; - cxt->gc_baseaddr[1] = cxt->gc_baseaddr[0] + m_incr; - cxt->gc_baseaddr[2] = cxt->gc_baseaddr[1] + m_incr; - cxt->gc_baseaddr[3] = NULL; - } - else -#endif - if (mp->bpp==4) - { - int m_incr = mp->lineoffset*mp->height; - cxt->gc_baseaddr[0] = mp->extinfo->frame; - cxt->gc_baseaddr[1] = cxt->gc_baseaddr[0] + m_incr; - cxt->gc_baseaddr[2] = cxt->gc_baseaddr[1] + m_incr; - cxt->gc_baseaddr[3] = cxt->gc_baseaddr[2] + m_incr; - } - else - { - cxt->gc_baseaddr[0] = - cxt->gc_baseaddr[1] = - cxt->gc_baseaddr[2] = - cxt->gc_baseaddr[3] = mp->extinfo->frame; - } -#if defined(__TURBOC__) || (defined(__WATCOMC__) && !defined(__386__)) - cxt->gc_selector = LINP_SEL(mp->extinfo->frame); -#endif - } - else - { - if(plsize > fdp->max_plane_size) goto done; /* FALSE */ - if(!mp->extinfo->setbank && (plsize > 0x10000L)) goto done; /* FALSE */ - if(mp->lineoffset % fdp->row_align) goto done; /* FALSE */ - cxt->gc_baseaddr[0] = - cxt->gc_baseaddr[1] = - cxt->gc_baseaddr[2] = - cxt->gc_baseaddr[3] = LINP_PTR(mp->extinfo->frame); - cxt->gc_selector = LINP_SEL(mp->extinfo->frame); - } - cxt->gc_onscreen = !(mp->extinfo->flags&GR_VMODEF_MEMORY); - /* Why do we default to screen driver ?? */ - cxt->gc_onscreen = TRUE; - cxt->gc_lineoffset = mp->lineoffset; - cxt->gc_xcliphi = cxt->gc_xmax = mp->width - 1; - cxt->gc_ycliphi = cxt->gc_ymax = mp->height - 1; - cxt->gc_driver = &DRVINFO->sdriver; - - res = TRUE; - - DBGPRINTF(DBG_SETMD,("buildcontext - context buffer 0 = 0x%x\n",cxt->gc_baseaddr[0])); - DBGPRINTF(DBG_SETMD,("buildcontext - context buffer 1 = 0x%x\n",cxt->gc_baseaddr[1])); - DBGPRINTF(DBG_SETMD,("buildcontext - context buffer 2 = 0x%x\n",cxt->gc_baseaddr[2])); - DBGPRINTF(DBG_SETMD,("buildcontext - context buffer 3 = 0x%x\n",cxt->gc_baseaddr[3])); -done: - GRX_RETURN(res); -} - -static int errhdlr(char *msg) -{ - if(DRVINFO->errsfatal) { - DRVINFO->moderestore = TRUE; - _GrCloseVideoDriver(); - fprintf(stderr,"GrSetMode: %s\n",msg); - exit(1); - } - return(FALSE); -} - -int GrSetMode(GrGraphicsMode which,...) -{ - int w,h,pl,vw,vh; - int t,noclear,res; - GrColor c; - va_list ap; - GRX_ENTER(); - pl = 0; - vw = 0; - vh = 0; - t = FALSE; - noclear = FALSE; - c = 0; - res = FALSE; - DBGPRINTF(DBG_SETMD,("Mode: %d\n",(int)which)); - if(DRVINFO->vdriver == NULL) { - GrSetDriver(NULL); - if(DRVINFO->vdriver == NULL) { - res = errhdlr("could not find suitable video driver"); - goto done; - } - } - va_start(ap,which); - switch(which) { - case GR_NC_80_25_text: - noclear = TRUE; - case GR_80_25_text: - w = 80; - h = 25; - c = DRVINFO->deftc; - t = TRUE; - break; - case GR_NC_default_text: - noclear = TRUE; - case GR_default_text: - w = DRVINFO->deftw; - h = DRVINFO->defth; - c = DRVINFO->deftc; - t = TRUE; - break; - case GR_NC_width_height_text: - noclear = TRUE; - case GR_width_height_text: - w = va_arg(ap,int); - h = va_arg(ap,int); - c = DRVINFO->deftc; - t = TRUE; - break; - case GR_NC_biggest_text: - noclear = TRUE; - case GR_biggest_text: - w = 200; - h = 80; - c = DRVINFO->deftc; - t = TRUE; - break; - case GR_NC_width_height_color_text: - noclear = TRUE; - case GR_width_height_color_text: - w = va_arg(ap,int); - h = va_arg(ap,int); - c = va_arg(ap,GrColor); - t = TRUE; - break; - case GR_NC_width_height_bpp_text: - noclear = TRUE; - case GR_width_height_bpp_text: - w = va_arg(ap,int); - h = va_arg(ap,int); - pl = va_arg(ap,int); - t = TRUE; - break; - case GR_NC_320_200_graphics: - noclear = TRUE; - case GR_320_200_graphics: - w = 320; - h = 200; - c = DRVINFO->defgc; - break; - case GR_NC_default_graphics: - noclear = TRUE; - case GR_default_graphics: - w = DRVINFO->defgw; - h = DRVINFO->defgh; - c = DRVINFO->defgc; - break; - case GR_NC_width_height_graphics: - noclear = TRUE; - case GR_width_height_graphics: - w = va_arg(ap,int); - h = va_arg(ap,int); - c = DRVINFO->defgc; - break; - case GR_NC_biggest_noninterlaced_graphics: - noclear = TRUE; - case GR_biggest_noninterlaced_graphics: - w = 800; - h = 600; - c = DRVINFO->defgc; - break; - case GR_NC_biggest_graphics: - noclear = TRUE; - case GR_biggest_graphics: - w = 4096; - h = 4096; - c = DRVINFO->defgc; - break; - case GR_NC_width_height_color_graphics: - noclear = TRUE; - case GR_width_height_color_graphics: - w = va_arg(ap,int); - h = va_arg(ap,int); - c = va_arg(ap,GrColor); - break; - case GR_NC_width_height_bpp_graphics: - noclear = TRUE; - case GR_width_height_bpp_graphics: - w = va_arg(ap,int); - h = va_arg(ap,int); - pl = va_arg(ap,int); - break; - case GR_NC_custom_graphics: - noclear = TRUE; - case GR_custom_graphics: - w = va_arg(ap,int); - h = va_arg(ap,int); - c = va_arg(ap,GrColor); - vw = va_arg(ap,int); - vh = va_arg(ap,int); - break; - case GR_NC_custom_bpp_graphics: - noclear = TRUE; - case GR_custom_bpp_graphics: - w = va_arg(ap,int); - h = va_arg(ap,int); - pl = va_arg(ap,int); - vw = va_arg(ap,int); - vh = va_arg(ap,int); - break; - default: - va_end(ap); - res = errhdlr("unknown video mode"); - goto done; - } - va_end(ap); - if (c) - for(pl = 1; (pl < 32) && ((1UL << pl) < (GrColor)c); pl++) ; - for( ; ; ) { - GrContext cxt; - GrFrameDriver fdr; - GrVideoMode *mdp,vmd; - mdp = (DRVINFO->vdriver->selectmode)(DRVINFO->vdriver,w,h,pl,t,NULL); - if(!mdp) { - res = errhdlr("could not find suitable video mode"); - goto done; - } - sttcopy(&vmd,mdp); - if((t || buildframedriver(&vmd,&fdr)) && - (*vmd.extinfo->setup)(&vmd,noclear) && - (t || buildcontext(&vmd,&fdr,&cxt))) { - if((!t) && - ((vw > vmd.width) || (vh > vmd.height)) && - (vmd.extinfo->setvsize != NULL) && - (vmd.extinfo->scroll != NULL)) { - int ww = vmd.width = imax(vw,vmd.width); - int hh = vmd.height = imax(vh,vmd.height); - if(!(*vmd.extinfo->setvsize)(&vmd,ww,hh,&vmd) || - !buildcontext(&vmd,&fdr,&cxt)) { - sttcopy(&vmd,mdp); - buildcontext(&vmd,&fdr,&cxt); - (*vmd.extinfo->setup)(&vmd,noclear); - } - } - DBGPRINTF(DBG_SETMD,("GrMouseUnInit ...\n")); - GrMouseUnInit(); - DBGPRINTF(DBG_SETMD,("GrMouseUnInit done\n")); - DRVINFO->setbank = (void (*)(int ))_GrDummyFunction; - DRVINFO->setrwbanks = (void (*)(int,int))_GrDummyFunction; - DRVINFO->curbank = (-1); - DRVINFO->splitbanks = FALSE; - if(!t) { - if(vmd.extinfo->setbank) { - DRVINFO->setbank = vmd.extinfo->setbank; - } - if(vmd.extinfo->setrwbanks) { - DRVINFO->setrwbanks = vmd.extinfo->setrwbanks; - DRVINFO->splitbanks = TRUE; - } - if(umul32(vmd.lineoffset,vmd.height) <= 0x10000L) { - DRVINFO->splitbanks = TRUE; - } - } - else { - sttzero(&cxt); - sttcopy(&fdr,&DRVINFO->tdriver); - cxt.gc_driver = &DRVINFO->tdriver; - } - sttcopy(&CXTINFO->current,&cxt); - sttcopy(&CXTINFO->screen, &cxt); - sttcopy(&DRVINFO->fdriver,&fdr); - sttcopy(&DRVINFO->sdriver,&fdr); - sttcopy(&DRVINFO->actmode,&vmd); - DRVINFO->curmode = mdp; - DRVINFO->mcode = which; - DRVINFO->vposx = 0; - DRVINFO->vposy = 0; - DBGPRINTF(DBG_SETMD,("GrResetColors ...\n")); - if ( !_GrResetColors() ) { - res = errhdlr("could not set color mode"); - goto done; - } - DBGPRINTF(DBG_SETMD,("GrResetColors done\n")); - if(fdr.init) { - DBGPRINTF(DBG_SETMD,("fdr.init ...\n")); - (*fdr.init)(&DRVINFO->actmode); - DBGPRINTF(DBG_SETMD,("fdr.init done\n")); - } - if(DRVINFO->mdsethook) { - DBGPRINTF(DBG_SETMD,("mdsethook ...\n")); - (*DRVINFO->mdsethook)(); - DBGPRINTF(DBG_SETMD,("mdsethook done\n")); - } - DBGPRINTF(DBG_SETMD,("GrSetMode complete\n")); - res = TRUE; - goto done; - } - mdp->present = FALSE; - } -done: GRX_RETURN(res); -} - diff --git a/thirdparty/grx249/src/setup/version.c b/thirdparty/grx249/src/setup/version.c deleted file mode 100644 index bfbff30..0000000 --- a/thirdparty/grx249/src/setup/version.c +++ /dev/null @@ -1,26 +0,0 @@ -/** - ** version.c ---- return GRX library version - ** - ** Copyright (c) 1997 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -unsigned GrGetLibraryVersion(void) { - return (unsigned)GRX_VERSION_API; -} - -unsigned GrGetLibrarySystem(void) { - return (unsigned)GRX_VERSION; -} diff --git a/thirdparty/grx249/src/setup/viewport.c b/thirdparty/grx249/src/setup/viewport.c deleted file mode 100644 index 922b81e..0000000 --- a/thirdparty/grx249/src/setup/viewport.c +++ /dev/null @@ -1,40 +0,0 @@ -/** - ** viewport.c ---- set display start address for virtual screen - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "arith.h" - -int GrSetViewport(int x,int y) -{ - int res[2]; - if(!GrScreenIsVirtual()) return(FALSE); - if(!DRVINFO->actmode.extinfo->scroll) return(FALSE); - x = imax(0,imin((GrVirtualX() - GrScreenX()),x)); - y = imax(0,imin((GrVirtualY() - GrScreenY()),y)); - if((x == GrViewportX()) && (y == GrViewportY())) return(TRUE); - if((*DRVINFO->actmode.extinfo->scroll)(&DRVINFO->actmode,x,y,res)) { - DRVINFO->vposx = res[0]; - DRVINFO->vposy = res[1]; - return(TRUE); - } - return(FALSE); -} - - - - diff --git a/thirdparty/grx249/src/shape/circle1.c b/thirdparty/grx249/src/shape/circle1.c deleted file mode 100644 index 9e484e1..0000000 --- a/thirdparty/grx249/src/shape/circle1.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - ** circle1.c ---- draw ellipse - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrEllipse(int xc,int yc,int xa,int ya,GrColor c) -{ - GrFillArg fval; - fval.color = c; - _GrScanEllipse(xc,yc,xa,ya,&_GrSolidFiller,fval,FALSE); -} diff --git a/thirdparty/grx249/src/shape/circle2.c b/thirdparty/grx249/src/shape/circle2.c deleted file mode 100644 index 12a1284..0000000 --- a/thirdparty/grx249/src/shape/circle2.c +++ /dev/null @@ -1,47 +0,0 @@ -/** - ** circle2.c ---- draw ellipse arc - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "shapes.h" - -void GrEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrColor c) -{ - int (*pnts)[2]; - setup_ALLOC(); - pnts = ALLOC(sizeof(int) * 2 * (GR_MAX_ELLIPSE_POINTS + 1)); - if (pnts != NULL) - { - GrFillArg fval; - int npts = GrGenerateEllipseArc(xc,yc,xa,ya,start,end,pnts); - int close = FALSE; - switch(style) { - case GR_ARC_STYLE_CLOSE2: - pnts[npts][0] = xc; - pnts[npts][1] = yc; - npts++; - case GR_ARC_STYLE_CLOSE1: - close = TRUE; - break; - } - fval.color = c; - _GrDrawPolygon(npts,pnts,&_GrSolidFiller,fval,close); - FREE(pnts); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/shape/circle3.c b/thirdparty/grx249/src/shape/circle3.c deleted file mode 100644 index 27ae0d7..0000000 --- a/thirdparty/grx249/src/shape/circle3.c +++ /dev/null @@ -1,25 +0,0 @@ -/** - ** circle3.c ---- draw circle - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrCircle(int xc,int yc,int r,GrColor c) -{ - GrEllipse(xc,yc,r,r,c); -} diff --git a/thirdparty/grx249/src/shape/circle4.c b/thirdparty/grx249/src/shape/circle4.c deleted file mode 100644 index cb92a15..0000000 --- a/thirdparty/grx249/src/shape/circle4.c +++ /dev/null @@ -1,26 +0,0 @@ -/** - ** circle4.c ---- draw circle arc - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrCircleArc(int xc,int yc,int r,int start,int end,int style,GrColor c) -{ - GrEllipseArc(xc,yc,r,r,start,end,style,c); -} - diff --git a/thirdparty/grx249/src/shape/drawpoly.c b/thirdparty/grx249/src/shape/drawpoly.c deleted file mode 100644 index f4d4bbe..0000000 --- a/thirdparty/grx249/src/shape/drawpoly.c +++ /dev/null @@ -1,64 +0,0 @@ -/** - ** drawpoly.c ---- draw the outline of a polygon - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" -#include "clipping.h" -#include "arith.h" - -void _GrDrawPolygon(int n,int pt[][2],GrFiller *f,GrFillArg c,int doClose) -{ - int i,px,py,x1,y1,x2,y2; - if(n <= 0) return; - if(n == 1) doClose = TRUE; - x1 = x2 = pt[0][0]; - y1 = y2 = pt[0][1]; - for(i = 1; i < n; i++) { - int *ppt = pt[i]; - if(x1 > ppt[0]) x1 = ppt[0]; - if(x2 < ppt[0]) x2 = ppt[0]; - if(y1 > ppt[1]) y1 = ppt[1]; - if(y2 < ppt[1]) y2 = ppt[1]; - } - clip_ordbox(CURC,x1,y1,x2,y2); - mouse_block(CURC,x1,y1,x2,y2); - px = pt[n - 1][0]; - py = pt[n - 1][1]; - for(i = 0; i < n; i++) { - x1 = px; - y1 = py; - x2 = px = pt[i][0]; - y2 = py = pt[i][1]; - if(i | doClose) { - if(y1 > y2) { - iswap(x1,x2); - iswap(y1,y2); - } - clip_line_(CURC,x1,y1,x2,y2,continue,CLIP_EMPTY_MACRO_ARG); - (*f->line)( - (x1 + CURC->gc_xoffset), - (y1 + CURC->gc_yoffset), - (x2 - x1), - (y2 - y1), - c - ); - } - } - mouse_unblock(); -} - diff --git a/thirdparty/grx249/src/shape/fillcir1.c b/thirdparty/grx249/src/shape/fillcir1.c deleted file mode 100644 index 82f6721..0000000 --- a/thirdparty/grx249/src/shape/fillcir1.c +++ /dev/null @@ -1,25 +0,0 @@ -/** - ** fillcir1.c ---- filled circle - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrFilledCircle(int xc,int yc,int r,GrColor c) -{ - GrFilledEllipse(xc,yc,r,r,c); -} diff --git a/thirdparty/grx249/src/shape/fillcir2.c b/thirdparty/grx249/src/shape/fillcir2.c deleted file mode 100644 index 3b2e89d..0000000 --- a/thirdparty/grx249/src/shape/fillcir2.c +++ /dev/null @@ -1,26 +0,0 @@ -/** - ** fillcir2.c ---- filled circle arc - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrFilledCircleArc(int xc,int yc,int r,int start,int end,int style,GrColor c) -{ - GrFilledEllipseArc(xc,yc,r,r,start,end,style,c); -} - diff --git a/thirdparty/grx249/src/shape/fillcnvx.c b/thirdparty/grx249/src/shape/fillcnvx.c deleted file mode 100644 index 0b87a96..0000000 --- a/thirdparty/grx249/src/shape/fillcnvx.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - ** fillcnvx.c ---- fill a convex polygon with a solid color - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrFilledConvexPolygon(int n,int pt[][2],GrColor c) -{ - GrFillArg fval; - fval.color = c; - _GrScanConvexPoly(n,pt,&_GrSolidFiller,fval); -} diff --git a/thirdparty/grx249/src/shape/fillell1.c b/thirdparty/grx249/src/shape/fillell1.c deleted file mode 100644 index 7b11403..0000000 --- a/thirdparty/grx249/src/shape/fillell1.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - ** fillell1.c ---- filled ellipse - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrFilledEllipse(int xc,int yc,int xa,int ya,GrColor c) -{ - GrFillArg fval; - fval.color = c; - _GrScanEllipse(xc,yc,xa,ya,&_GrSolidFiller,fval,TRUE); -} diff --git a/thirdparty/grx249/src/shape/fillell2.c b/thirdparty/grx249/src/shape/fillell2.c deleted file mode 100644 index 3ce041d..0000000 --- a/thirdparty/grx249/src/shape/fillell2.c +++ /dev/null @@ -1,42 +0,0 @@ -/** - ** fillell2.c ---- filled ellipse arc - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "shapes.h" - -void GrFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrColor c) -{ - int (*pnts)[2]; - setup_ALLOC(); - pnts = ALLOC(sizeof(int) * 2 * (GR_MAX_ELLIPSE_POINTS + 1)); - if (pnts != NULL) - { - GrFillArg fval; - int npts = GrGenerateEllipseArc(xc,yc,xa,ya,start,end,pnts); - if(style == GR_ARC_STYLE_CLOSE2) { - pnts[npts][0] = xc; - pnts[npts][1] = yc; - npts++; - } - fval.color = c; - _GrScanPolygon(npts,pnts,&_GrSolidFiller,fval); - FREE(pnts); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/shape/fillpoly.c b/thirdparty/grx249/src/shape/fillpoly.c deleted file mode 100644 index cd6d06c..0000000 --- a/thirdparty/grx249/src/shape/fillpoly.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - ** fillpoly.c ---- fill an arbitrary polygon with a solid color - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrFilledPolygon(int n,int pt[][2],GrColor c) -{ - GrFillArg fval; - fval.color = c; - _GrScanPolygon(n,pt,&_GrSolidFiller,fval); -} diff --git a/thirdparty/grx249/src/shape/flood.c b/thirdparty/grx249/src/shape/flood.c deleted file mode 100644 index c8eafe7..0000000 --- a/thirdparty/grx249/src/shape/flood.c +++ /dev/null @@ -1,251 +0,0 @@ -/** - ** flood.c ---- fill an arbitrary area - ** - ** Copyright (c) 1997 Hartmut Schirmer - ** [e-mail: hsc@techfak.uni-kiel.de] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include - -#include "libgrx.h" -#include "memfill.h" -#include "shapes.h" - -static ScanFillFunc _filler; -static GrFillArg _fa; -static int lx, ly, mx, my, lxo, lyo; -static GrColor _border; -static jmp_buf error; - -typedef unsigned char element; /* for 1bit/pixel images */ -typedef unsigned short line_index; /* start index table */ -static element **done = NULL; /* bitmap of already processed pixel */ -static element **start = NULL; /* pixel that need to be processed */ -static unsigned elements; /* no. bytes in each bitmap line */ -static line_index *start_flg = NULL; /* !=0: index+1 of first start element !=0 */ - /* ==0: nothing to do */ - -#define bits_per_element (sizeof(element)*8) -#define offset_div (bits_per_element) -#define calc_bit(x) ( ((element)1) << ((x)&(bits_per_element-1))) -#define calc_high_bits(x) ( (~((element)0)) << ((x)&(bits_per_element-1))) -#define calc_ofs(x) ((x) / offset_div) - -/* -------- internal line buffer functions -** -** (x,y) scaled to (0..mx,0..my) -*/ - -static INLINE -element *generate_line(element **buf, int y) { - if (buf[y] == NULL) - if ( (buf[y] = calloc(sizeof(element),elements)) == NULL) - longjmp(error,1); - return buf[y]; -} - -static INLINE -void mark_line( element **buf, int x1, int x2, int y) { - element *l = generate_line(buf,y); - element *anf, *ende; - int start_bit, stop_bit; - - anf = &l[calc_ofs(x1)]; - ende = &l[calc_ofs(x2)]; - start_bit = calc_high_bits(x1); - if (anf != ende) { - *(anf++) |= start_bit; - if (anf != ende) { - GR_repl cv = ~((GR_repl)0); - unsigned w = (ende-anf)*sizeof(element); - repfill_b(anf,cv,w); - } - start_bit = ~0; - } - /* start_bit rejects all invalid low bits, let stop_bit discard - all invalid high bits, but make sure stop_bit won't get zero */ - stop_bit = ~calc_high_bits(x2+1); - if (stop_bit) start_bit &= stop_bit; - *ende |= start_bit; -} - -static INLINE -void set_pix(element **buf, int x, int y) { - element *l = generate_line(buf,y); - l[calc_ofs(x)] |= calc_bit(x); -} - -static INLINE -int test_pix(element **buf, int x, int y) { - element *l = buf[y]; - if (l != NULL) - return (l[calc_ofs(x)] & calc_bit(x)) != 0; - return FALSE; -} - -static INLINE -int test_screen(int x, int y) { - return (GrPixelNC(x+lx,y+ly) == _border); -} - -static INLINE -int test_pixel(int x, int y) { - if (test_pix(done,x,y)) return TRUE; - if (test_screen(x,y)) { - set_pix(done,x,y); - return TRUE; - } - return FALSE; -} - -static INLINE -void SetStartFlag(int x, int y) { - int _x = calc_ofs(x); - if ( !start_flg[y] - || _x 0 && !test_pixel(sx-1,y)) - --sx; - while ( x < mx && !test_pixel(x+1,y)) - ++x; - (*_filler)(sx+lxo,y+lyo,x-sx+1,_fa); - mark_line( done, sx, x, y); - if (y>0) { mark_line( start, sx, x, y-1); - SetStartFlag(sx,y-1); } - if (y 1 here */ - s += i; d += i; - for ( ; i < elements ; ++i) - *(s++) &= ~*(d++); - s = start[top]; - } - i=start_flg[top]-1; start_flg[top] = 0; - for ( s += i; i < elements ; ++i, ++s) - if (*s) { - element b = 1; - int x = i*offset_div; - do { - while ( !(*s&b)) { ++x; b <<= 1; } - if (test_screen(x,top)) { - set_pix(done,x,top); - *s ^= b; - } else { - SetStartFlag(x,top); - fill(x,top); - rescan = 1; - goto ThisLine; - } - } while (*s); - } - } - top += dir; - } - dir = -dir; - top += dir; - } while (rescan); -} - -void _GrFloodFill(int x,int y,GrColor border,GrFiller *f,GrFillArg fa) { - int _x, _y; - - lx = CURC->gc_xcliplo; - mx = CURC->gc_xcliphi; - ly = CURC->gc_ycliplo; - my = CURC->gc_ycliphi; - lxo = lx + CURC->gc_xoffset; - lyo = ly + CURC->gc_yoffset; - - if ( x < lx || y < ly || x > mx || y > my || GrPixelNC(x,y) == border) - return; - - _border = border; - _filler = f->scan; - _fa = fa; - mx -= lx; _x = x - lx; - my -= ly; _y = y - ly; - done = calloc(sizeof(element *), (size_t)(my+1)); - start = calloc(sizeof(element *), (size_t)(my+1)); - start_flg = calloc(sizeof(line_index), (size_t)(my+1)); - if (done==NULL || start==NULL || start_flg==NULL) { -/* ERR = grNoFloodMem; */ - goto FreeMem; - } - - if (setjmp(error) == 0) { - elements = calc_ofs(mx + bits_per_element) + 1; - - mouse_block(CURC,lx,ly,mx,my); - set_pix(start, _x, _y); - SetStartFlag(_x,_y); - work(); - mouse_unblock(); - } else { - /* generate_line() called longjmp() : out of memory error */ -/* ERR = grNoFloodMem; */ - } - -FreeMem: - if (done != NULL) { - int i; - for (i=my; i >= 0; --i) - if (done[i] != NULL) - free(done[i]); - free(done); - done = NULL; - } - if (start != NULL) { - int i; - for (i=my; i >= 0; --i) - if (start[i] != NULL) - free(start[i]); - free(start); - start = NULL; - } - if (start_flg != NULL) { - free(start_flg); - start_flg = NULL; - } -} diff --git a/thirdparty/grx249/src/shape/floodfil.c b/thirdparty/grx249/src/shape/floodfil.c deleted file mode 100644 index dfa45e8..0000000 --- a/thirdparty/grx249/src/shape/floodfil.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - ** floodfil.c ---- fill an arbitrary area with a solid color - ** - ** Copyright (c) 1997 Hartmut Schirmer - ** [e-mail: hsc@techfak.uni-kiel.de] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrFloodFill(int x, int y, GrColor border, GrColor c) -{ - GrFillArg fval; - fval.color = c; - _GrFloodFill(x,y,border,&_GrSolidFiller,fval); -} diff --git a/thirdparty/grx249/src/shape/genellip.c b/thirdparty/grx249/src/shape/genellip.c deleted file mode 100644 index 8b93863..0000000 --- a/thirdparty/grx249/src/shape/genellip.c +++ /dev/null @@ -1,152 +0,0 @@ -/** - ** genellip.c ---- generate points for an ellipse or ellipse arc - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "arith.h" - -#define MAXPTS (GR_MAX_ELLIPSE_POINTS & (~15)) -#define SEGLEN 5 /* preferred lenght of line segments on arc */ -#define TRIGMGN 16384 /* scale factor for sine table */ -#define PERIOD 1024 /* number of points in sine table */ -#define PHALF (PERIOD / 2) -#define PQUART (PERIOD / 4) - -static int sintab[PQUART + 1] = { - 0, 101, 201, 302, 402, 503, 603, 704, - 804, 904, 1005, 1105, 1205, 1306, 1406, 1506, - 1606, 1706, 1806, 1906, 2006, 2105, 2205, 2305, - 2404, 2503, 2603, 2702, 2801, 2900, 2999, 3098, - 3196, 3295, 3393, 3492, 3590, 3688, 3786, 3883, - 3981, 4078, 4176, 4273, 4370, 4467, 4563, 4660, - 4756, 4852, 4948, 5044, 5139, 5235, 5330, 5425, - 5520, 5614, 5708, 5803, 5897, 5990, 6084, 6177, - 6270, 6363, 6455, 6547, 6639, 6731, 6823, 6914, - 7005, 7096, 7186, 7276, 7366, 7456, 7545, 7635, - 7723, 7812, 7900, 7988, 8076, 8163, 8250, 8337, - 8423, 8509, 8595, 8680, 8765, 8850, 8935, 9019, - 9102, 9186, 9269, 9352, 9434, 9516, 9598, 9679, - 9760, 9841, 9921, 10001, 10080, 10159, 10238, 10316, - 10394, 10471, 10549, 10625, 10702, 10778, 10853, 10928, - 11003, 11077, 11151, 11224, 11297, 11370, 11442, 11514, - 11585, 11656, 11727, 11797, 11866, 11935, 12004, 12072, - 12140, 12207, 12274, 12340, 12406, 12472, 12537, 12601, - 12665, 12729, 12792, 12854, 12916, 12978, 13039, 13100, - 13160, 13219, 13279, 13337, 13395, 13453, 13510, 13567, - 13623, 13678, 13733, 13788, 13842, 13896, 13949, 14001, - 14053, 14104, 14155, 14206, 14256, 14305, 14354, 14402, - 14449, 14497, 14543, 14589, 14635, 14680, 14724, 14768, - 14811, 14854, 14896, 14937, 14978, 15019, 15059, 15098, - 15137, 15175, 15213, 15250, 15286, 15322, 15357, 15392, - 15426, 15460, 15493, 15525, 15557, 15588, 15619, 15649, - 15679, 15707, 15736, 15763, 15791, 15817, 15843, 15868, - 15893, 15917, 15941, 15964, 15986, 16008, 16029, 16049, - 16069, 16088, 16107, 16125, 16143, 16160, 16176, 16192, - 16207, 16221, 16235, 16248, 16261, 16273, 16284, 16295, - 16305, 16315, 16324, 16332, 16340, 16347, 16353, 16359, - 16364, 16369, 16373, 16376, 16379, 16381, 16383, 16384, - 16384 -}; - -static int last_xs = 0,last_ys = 0; -static int last_xe = 0,last_ye = 0; -static int last_xc = 0,last_yc = 0; - -static void GrSinCos(int n,int cx,int cy,int rx,int ry,int *pt) -{ - int cval,sval; - switch((n &= (PERIOD - 1)) / PQUART) { - case 0: - sval = sintab[n]; - cval = sintab[PQUART - n]; - break; - case 1: - sval = sintab[PHALF - n]; - cval = -sintab[n - PQUART]; - break; - case 2: - sval = -sintab[n - PHALF]; - cval = -sintab[PERIOD - PQUART - n]; - break; - default: /* must be 3 */ - sval = -sintab[PERIOD - n]; - cval = sintab[n - PERIOD + PQUART]; - break; - } - pt[0] = cx; pt[0] += irscale(rx,cval,TRIGMGN); - pt[1] = cy; pt[1] -= irscale(ry,sval,TRIGMGN); -} - -int GrGenerateEllipseArc(int cx,int cy,int rx,int ry,int start,int end,int pt[][2]) -{ - int npts = urscale((iabs(rx) + iabs(ry)),314,(SEGLEN * 100)); - int step,closed; - start = irscale(start,PERIOD,GR_MAX_ANGLE_VALUE) & (PERIOD - 1); - end = irscale(end, PERIOD,GR_MAX_ANGLE_VALUE) & (PERIOD - 1); - if(start == end) { - closed = TRUE; - end += PERIOD; - } - else { - if(start > end) end += PERIOD; - closed = FALSE; - } - npts = urscale(npts,(end - start),PERIOD); - npts = umax(npts,16); - npts = umin(npts,MAXPTS); - if(closed) { - for(step = 1; (PERIOD / step) > npts; step <<= 1); - end -= step; - npts = 0; - } - else { - int start2 = end - start - 1; - step = umax(1,((end - start) / npts)); - while(((start2 + step) / step) >= MAXPTS) step++; - start2 = end - (((end - start) / step) * step); - npts = 0; - if(start2 > start) { - GrSinCos(start,cx,cy,rx,ry,pt[0]); - start = start2; - npts++; - } - } - while(start <= end) { - GrSinCos(start,cx,cy,rx,ry,pt[npts]); - start += step; - npts++; - } - last_xc = cx; - last_yc = cy; - last_xs = pt[0][0]; - last_ys = pt[0][1]; - last_xe = pt[npts - 1][0]; - last_ye = pt[npts - 1][1]; - return(npts); -} - -int GrGenerateEllipse(int xc,int yc,int rx,int ry,int pt[][2]) -{ - return(GrGenerateEllipseArc(xc,yc,rx,ry,0,0,pt)); -} - -void GrLastArcCoords(int *xs,int *ys,int *xe,int *ye,int *xc,int *yc) -{ - *xs = last_xs; *ys = last_ys; - *xe = last_xe; *ye = last_ye; - *xc = last_xc; *yc = last_yc; -} diff --git a/thirdparty/grx249/src/shape/polyedge.h b/thirdparty/grx249/src/shape/polyedge.h deleted file mode 100644 index 90e0267..0000000 --- a/thirdparty/grx249/src/shape/polyedge.h +++ /dev/null @@ -1,62 +0,0 @@ -/** - ** polyedge.h ---- polygon edge structures for scan routines - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -typedef struct { - int x,xlast; /* current and final X coordinates */ - int y,ylast; /* current and final Y coordinates */ - int dx,dy; /* line diagonals */ - int xmajor; /* flag for X major lines */ - int xstep; /* direction of X scan */ - int error; /* Bresenham error term */ -} polyedge; - -#define setup_edge(ep) { \ - (ep)->dy = (ep)->ylast - (ep)->y; \ - (ep)->dx = (ep)->xlast - (ep)->x; \ - if((ep)->dx < 0) { \ - (ep)->xstep = (-1); \ - (ep)->dx = (-(ep)->dx); \ - } \ - else { \ - (ep)->xstep = 1; \ - } \ - if((ep)->dx > (ep)->dy) { \ - (ep)->xmajor = TRUE; \ - (ep)->error = (ep)->dx >> 1; \ - } \ - else { \ - (ep)->xmajor = FALSE; \ - (ep)->error = ((ep)->dy - ((1 - (ep)->xstep) >> 1)) >> 1; \ - } \ -} - -#define xstep_edge(ep) for( ; ; ) { \ - (ep)->x += (ep)->xstep; \ - if(((ep)->error -= (ep)->dy) < 0) { \ - (ep)->error += (ep)->dx; \ - break; \ - } \ -} - -#define ystep_edge(ep) { \ - if(((ep)->error -= (ep)->dx) < 0) { \ - (ep)->x += (ep)->xstep; \ - (ep)->error += (ep)->dy; \ - } \ -} - diff --git a/thirdparty/grx249/src/shape/polygon.c b/thirdparty/grx249/src/shape/polygon.c deleted file mode 100644 index ce19d56..0000000 --- a/thirdparty/grx249/src/shape/polygon.c +++ /dev/null @@ -1,16 +0,0 @@ -/** - ** POLYGON.C ---- draw a closed polygon - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] See "doc/copying.cb" for details. - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrPolygon(int n,int pt[][2],GrColor c) -{ - GrFillArg fval; - fval.color = c; - _GrDrawPolygon(n,pt,&_GrSolidFiller,fval,TRUE); -} diff --git a/thirdparty/grx249/src/shape/polyline.c b/thirdparty/grx249/src/shape/polyline.c deleted file mode 100644 index b439aa5..0000000 --- a/thirdparty/grx249/src/shape/polyline.c +++ /dev/null @@ -1,16 +0,0 @@ -/** - ** POLYLINE.C ---- draw an open ended polygon - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] See "doc/copying.cb" for details. - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrPolyLine(int n,int pt[][2],GrColor c) -{ - GrFillArg fval; - fval.color = c; - _GrDrawPolygon(n,pt,&_GrSolidFiller,fval,FALSE); -} diff --git a/thirdparty/grx249/src/shape/scancnvx.c b/thirdparty/grx249/src/shape/scancnvx.c deleted file mode 100644 index 2d1a771..0000000 --- a/thirdparty/grx249/src/shape/scancnvx.c +++ /dev/null @@ -1,147 +0,0 @@ -/** - ** scancnvx.c ---- scan fill a convex polygon - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" -#include "clipping.h" -#include "arith.h" -#include "shape/polyedge.h" - -typedef struct { - unsigned int dir; /* which direction to go for next point */ - unsigned int index; /* index of the current point */ - polyedge e; -} edge; - -#define next_edge(ed,n,pt) { \ - ed.index = (ed.index + ed.dir) % (unsigned int)n; \ - ed.e.x = ed.e.xlast; \ - ed.e.y = ed.e.ylast; \ - ed.e.xlast = pt[ed.index][0]; \ - ed.e.ylast = pt[ed.index][1]; \ -} - -void _GrScanConvexPoly(int n,int pt[][2],GrFiller *f,GrFillArg c) -{ - edge L,R; - int xmin,xmax; - int ymin,ymax; - int ypos,i; - if((n > 1) && - (pt[0][0] == pt[n - 1][0]) && - (pt[0][1] == pt[n - 1][1])) { - n--; - } - if(n < 1) { - return; - } - xmin = xmax = pt[0][0]; - ymin = ymax = pt[0][1]; - ypos = 0; - for(i = 1; i < n; i++) { - int *ppt = pt[i]; - if(ymin > ppt[1]) ymin = ppt[1],ypos = i; - if(ymax < ppt[1]) ymax = ppt[1]; - if(xmin > ppt[0]) xmin = ppt[0]; - if(xmax < ppt[0]) xmax = ppt[0]; - } - clip_ordbox(CURC,xmin,ymin,xmax,ymax); - mouse_block(CURC,xmin,ymin,xmax,ymax); - L.dir = 1; - R.dir = n - 1; - L.index = R.index = ypos; - L.e.xlast = R.e.xlast = pt[ypos][0]; - L.e.ylast = R.e.ylast = pt[ypos][1]; - for( ; ; ) { - next_edge(L,n,pt); - if(L.e.ylast >= ymin) { - clip_line_ymin(CURC,L.e.x,L.e.y,L.e.xlast,L.e.ylast); - setup_edge(&L.e); - break; - } - } - for( ; ; ) { - next_edge(R,n,pt); - if(R.e.ylast >= ymin) { - clip_line_ymin(CURC,R.e.x,R.e.y,R.e.xlast,R.e.ylast); - setup_edge(&R.e); - break; - } - } - for(ypos = ymin; ypos <= ymax; ypos++) { - xmin = L.e.x; - xmax = L.e.x; - if(ypos == L.e.ylast) { - xmin = imin(xmin,L.e.xlast); - xmax = imax(xmax,L.e.xlast); - if(ypos < ymax) for( ; ; ) { - next_edge(L,n,pt); - if(L.e.ylast > ypos) { - setup_edge(&L.e); - break; - } - xmin = imin(xmin,L.e.xlast); - xmax = imax(xmax,L.e.xlast); - } - } - if(ypos != ymax) { - if(L.e.xmajor) { - xstep_edge(&L.e); - xmin = imin(xmin,(L.e.x - L.e.xstep)); - xmax = imax(xmax,(L.e.x - L.e.xstep)); - } - else { - ystep_edge(&L.e); - } - } - xmin = imin(xmin,R.e.x); - xmax = imax(xmax,R.e.x); - if(ypos == R.e.ylast) { - xmin = imin(xmin,R.e.xlast); - xmax = imax(xmax,R.e.xlast); - if(ypos < ymax) for( ; ; ) { - next_edge(R,n,pt); - if(R.e.ylast > ypos) { - setup_edge(&R.e); - break; - } - xmin = imin(xmin,R.e.xlast); - xmax = imax(xmax,R.e.xlast); - } - } - if(ypos != ymax) { - if(R.e.xmajor) { - xstep_edge(&R.e); - xmin = imin(xmin,(R.e.x - R.e.xstep)); - xmax = imax(xmax,(R.e.x - R.e.xstep)); - } - else { - ystep_edge(&R.e); - } - } - clip_ordxrange_(CURC,xmin,xmax,continue,CLIP_EMPTY_MACRO_ARG); - (*f->scan)( - (xmin + CURC->gc_xoffset), - (ypos + CURC->gc_yoffset), - (xmax - xmin + 1), - c - ); - } - mouse_unblock(); -} - diff --git a/thirdparty/grx249/src/shape/scanellp.c b/thirdparty/grx249/src/shape/scanellp.c deleted file mode 100644 index 7dd1e6d..0000000 --- a/thirdparty/grx249/src/shape/scanellp.c +++ /dev/null @@ -1,125 +0,0 @@ -/** - ** scanellp.c ---- draw the outline or scan fill an ellipse - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "arith.h" -#include "clipping.h" -#include "shapes.h" - -#define MAXR 120 /* max radius for which Bresenham works */ - -void _GrScanEllipse(int xc,int yc,int xa,int ya,GrFiller *f,GrFillArg c,int filled) -{ - int x1,x2,y1,y2; - if(xa < 0) xa = (-xa); - if(ya < 0) ya = (-ya); - x1 = xc - xa; y1 = yc - ya; - x2 = xc + xa; y2 = yc + ya; - clip_ordbox(CURC,x1,y1,x2,y2); - mouse_block(CURC,x1,y1,x2,y2); - setup_ALLOC(); - if((xa == 0) || (ya == 0)) (*f->line)( - (x1 + CURC->gc_xoffset), - (y1 + CURC->gc_yoffset), - (x2 - x1), - (y2 - y1), - c - ); - else if((xa > MAXR) || (ya > MAXR)) { /* Bresenham would overflow !! */ - int (*points)[2] = ALLOC(sizeof(int) * 2 * GR_MAX_ELLIPSE_POINTS); - if(points != NULL) { - int count = GrGenerateEllipse(xc,yc,xa,ya,points); - if(filled) _GrScanConvexPoly(count,points,f,c); - else _GrDrawPolygon(count,points,f,c,TRUE); - FREE(points); - } - } - else { - int *scans = ALLOC(sizeof(int) * (ya + 1)); - int row = ya; - int col = 0; - if(scans != NULL) { - long yasq = umul32(ya,ya); - long xasq = umul32(xa,xa); - long xasq2 = xasq + xasq; - long yasq2 = yasq + yasq; - long xasq4 = xasq2 + xasq2; - long yasq4 = yasq2 + yasq2; - long error = (xasq2 * (row - 1) * row) + - (yasq2 * (1 - xasq)) + - xasq; - while((xasq * row) > (yasq * col)) { - if(error >= 0) { - scans[row] = col; - row--; - error -= xasq4 * row; - } - error += yasq2 * (3 + (col << 1)); - col++; - } - error = (yasq2 * (col + 1) * col) + - (xasq2 * ((row * (row - 2)) + 1)) + - (yasq * (1 - xasq2)); - while(row >= 0) { - scans[row] = col; - if(error <= 0) { - col++; - error += yasq4 * col; - } - row--; - error += xasq2 * (2 - (row << 1)); - } - for(row = y1; row <= y2; row++) { - col = iabs(yc - row); - if(!filled && (col < ya)) { - x1 = xc - scans[col]; - x2 = xc - scans[col + 1]; - if(x1 < x2) x2--; - do { - clip_ordxrange_(CURC,x1,x2,break,CLIP_EMPTY_MACRO_ARG); - (*f->scan)( - (x1 + CURC->gc_xoffset), - (row + CURC->gc_yoffset), - (x2 - x1 + 1), - c - ); - } while (0); - x1 = xc + scans[col + 1]; - x2 = xc + scans[col]; - if(x1 < x2) x1++; - } - else { - x1 = xc - scans[col]; - x2 = xc + scans[col]; - } - clip_ordxrange_(CURC,x1,x2,continue,CLIP_EMPTY_MACRO_ARG); - (*f->scan)( - (x1 + CURC->gc_xoffset), - (row + CURC->gc_yoffset), - (x2 - x1 + 1), - c - ); - } - FREE(scans); - } - } - reset_ALLOC(); - mouse_unblock(); -} - diff --git a/thirdparty/grx249/src/shape/scanpoly.c b/thirdparty/grx249/src/shape/scanpoly.c deleted file mode 100644 index 15deae8..0000000 --- a/thirdparty/grx249/src/shape/scanpoly.c +++ /dev/null @@ -1,223 +0,0 @@ -/** - ** scanpoly.c ---- scan fill an arbitrary polygon - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" -#include "allocate.h" -#include "clipping.h" -#include "arith.h" -#include "shape/polyedge.h" - -typedef enum { - inactive, /* not reached yet */ - active, /* currently contributes point */ - passed /* above current scan line */ -} edgestat; - -typedef struct { - edgestat status; /* status of this edge */ - polyedge e; /* the edge data */ -} edge; - -typedef struct _scan { - struct _scan *next; /* next segment/point in the list */ - int x1,x2; /* endpoints of this filled segment */ -} scan; - -#define add_scanpoint(List,Scp,X1,X2) { \ - scan *prev = NULL; \ - scan *work = List; \ - while(work != NULL) { \ - if(work->x1 > X1) break; \ - prev = work; \ - work = work->next; \ - } \ - Scp->x1 = X1; \ - Scp->x2 = X2; \ - Scp->next = work; \ - if(prev) prev->next = Scp; \ - else List = Scp; \ -} - -#define add_scansegment(List,Scp,X1,X2) { \ - scan *prev = NULL; \ - scan *work = List; \ - int overlap = FALSE; \ - while(work != NULL) { \ - if((work->x1 <= X2) && (X1 <= work->x2)) { \ - overlap = TRUE; \ - if(X1 < work->x1) work->x1 = X1; \ - if(X2 > work->x2) { \ - prev = work; \ - while((work = work->next) != NULL) { \ - if(work->x1 > X2) break; \ - if(work->x2 > X2) X2 = work->x2; \ - } \ - prev->x2 = X2; \ - prev->next = work; \ - } \ - break; \ - } \ - if(work->x1 > X2) break; \ - prev = work; \ - work = work->next; \ - } \ - if(!overlap) { \ - Scp->x1 = X1; \ - Scp->x2 = X2; \ - Scp->next = work; \ - if(prev) prev->next = Scp; \ - else List = Scp; \ - } \ -} - -void _GrScanPolygon(int n,int pt[][2],GrFiller *f,GrFillArg c) -{ - edge *edges,*ep; - scan *scans,*sp,*points,*segments; - int xmin,xmax,ymin,ymax; - int ypos,nedges; - if((n > 1) && - (pt[0][0] == pt[n-1][0]) && - (pt[0][1] == pt[n-1][1])) { - n--; - } - if(n < 1) { - return; - } - setup_ALLOC(); - edges = (edge *)ALLOC(sizeof(edge) * (n + 2)); - scans = (scan *)ALLOC(sizeof(scan) * (n + 8)); - if(edges && scans) { - /* - * Build the edge table. Store only those edges which are in the - * valid Y region. Clip them in Y if necessary. Store them with - * the endpoints ordered by Y in the edge table. - */ - int prevx = xmin = xmax = pt[0][0]; - int prevy = ymin = ymax = pt[0][1]; - nedges = 0; - ep = edges; - while(--n >= 0) { - if(pt[n][1] >= prevy) { - ep->e.x = prevx; - ep->e.y = prevy; - ep->e.xlast = prevx = pt[n][0]; - ep->e.ylast = prevy = pt[n][1]; - } - else { - ep->e.xlast = prevx; - ep->e.ylast = prevy; - ep->e.x = prevx = pt[n][0]; - ep->e.y = prevy = pt[n][1]; - } - if((ep->e.y > GrHighY()) || (ep->e.ylast < GrLowY())) continue; - clip_line_ymin(CURC,ep->e.x,ep->e.y,ep->e.xlast,ep->e.ylast); - if(ymin > ep->e.y) ymin = ep->e.y; - if(ymax < ep->e.ylast) ymax = ep->e.ylast; - if(xmin > ep->e.x) xmin = ep->e.x; - if(xmax < ep->e.xlast) xmax = ep->e.xlast; - setup_edge(&ep->e); - ep->status = inactive; - nedges++; - ep++; - } - if((nedges > 0) && (xmin <= GrHighX()) && (xmax >= GrLowX())) { - if(xmin < GrLowX()) xmin = GrLowX(); - if(ymin < GrLowY()) ymin = GrLowY(); - if(xmax > GrHighX()) xmax = GrHighX(); - if(ymax > GrHighY()) ymax = GrHighY(); - mouse_block(CURC,xmin,ymin,xmax,ymax); - /* - * Scan for every row between ymin and ymax. - * Build a linked list of disjoint segments to fill. Rules: - * (1) a horizontal edge in the row contributes a segment - * (2) any other edge crossing the row contributes a point - * (3) every segment between even and odd points is filled - */ - for(ypos = ymin; ypos <= ymax; ypos++) { - sp = scans; - points = NULL; - segments = NULL; - for(n = nedges,ep = edges; --n >= 0; ep++) { - switch(ep->status) { - case inactive: - if(ep->e.y != ypos) break; - if(ep->e.dy == 0) { - ep->status = passed; - xmin = ep->e.x; - xmax = ep->e.xlast; - isort(xmin,xmax); - add_scansegment(segments,sp,xmin,xmax); - sp++; - break; - } - ep->status = active; - case active: - xmin = xmax = ep->e.x; - if(ep->e.ylast == ypos) { - ep->status = passed; - xmax = ep->e.xlast; - isort(xmin,xmax); - add_scanpoint(points,sp,xmin,xmax); - sp++; - } - else if(ep->e.xmajor) { - xstep_edge(&ep->e); - xmax = ep->e.x - ep->e.xstep; - isort(xmin,xmax); - } - else { - ystep_edge(&ep->e); - } - add_scanpoint(points,sp,xmin,xmax); - sp++; - break; - default: - break; - } - } - while(points != NULL) { - scan *nextpt = points->next; - if(!nextpt) break; - xmin = points->x1; - xmax = nextpt->x2; - points = nextpt->next; - add_scansegment(segments,nextpt,xmin,xmax); - } - while(segments != NULL) { - xmin = segments->x1; - xmax = segments->x2; - segments = segments->next; - clip_ordxrange_(CURC,xmin,xmax,continue,CLIP_EMPTY_MACRO_ARG); - (*f->scan)( - (xmin + CURC->gc_xoffset), - (ypos + CURC->gc_yoffset), - (xmax - xmin + 1), - c - ); - } - } - mouse_unblock(); - } - } - if (edges) FREE(edges); - if (scans) FREE(scans); - reset_ALLOC(); -} - diff --git a/thirdparty/grx249/src/shape/solidfil.c b/thirdparty/grx249/src/shape/solidfil.c deleted file mode 100644 index ef14ef6..0000000 --- a/thirdparty/grx249/src/shape/solidfil.c +++ /dev/null @@ -1,42 +0,0 @@ -/** - ** solidfil.c ---- wrapper for solid filling - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - */ - -#include "libgrx.h" -#include "shapes.h" - -static void pixel(int x,int y,GrFillArg fval) { - GRX_ENTER(); - FDRV->drawpixel(x,y,fval.color); - GRX_LEAVE(); -} - -static void line(int x,int y,int dx,int dy,GrFillArg fval) { - GRX_ENTER(); - FDRV->drawline(x,y,dx,dy,fval.color); - GRX_LEAVE(); -} - -static void scan(int x,int y,int w,GrFillArg fval) { - GRX_ENTER(); - FDRV->drawhline(x,y,w,fval.color); - GRX_LEAVE(); -} - -GrFiller _GrSolidFiller = { - pixel, line, scan -}; - diff --git a/thirdparty/grx249/src/stdobjs.mak b/thirdparty/grx249/src/stdobjs.mak deleted file mode 100644 index 85d7ae4..0000000 --- a/thirdparty/grx249/src/stdobjs.mak +++ /dev/null @@ -1,341 +0,0 @@ -# Standard object files - -STD_1 = $(OP)draw/bitblt$(OX) \ - $(OP)draw/bitbltnc$(OX) \ - $(OP)draw/bitblt1b$(OX) \ - $(OP)draw/box$(OX) \ - $(OP)draw/boxnc$(OX) \ - $(OP)draw/clearclp$(OX) \ - $(OP)draw/clearctx$(OX) \ - $(OP)draw/clearscr$(OX) \ - $(OP)draw/drwinlne$(OX) \ - $(OP)draw/fillbox$(OX) \ - $(OP)draw/fillboxn$(OX) \ - $(OP)draw/frambox$(OX) \ - $(OP)draw/framboxn$(OX) \ - $(OP)draw/getscl$(OX) \ - $(OP)draw/line$(OX) \ - $(OP)draw/linenc$(OX) \ - $(OP)draw/majorln1$(OX) \ - $(OP)draw/majorln2$(OX) \ - $(OP)draw/majorln3$(OX) \ - $(OP)draw/majorln4$(OX) \ - $(OP)draw/pixel$(OX) \ - $(OP)draw/pixelc$(OX) \ - $(OP)draw/plot$(OX) \ - $(OP)draw/putscl$(OX) \ - $(OP)draw/flodspil$(OX) - -STD_2 = $(OP)fdrivers/dotab8$(OX) \ - $(OP)fdrivers/ftable$(OX) \ - $(OP)fdrivers/genblit$(OX) \ - $(OP)fdrivers/gengiscl$(OX) \ - $(OP)fdrivers/genptscl$(OX) \ - $(OP)fdrivers/genstrch$(OX) \ - $(OP)fdrivers/pblitr2r$(OX) \ - $(OP)fdrivers/pblitr2v$(OX) \ - $(OP)fdrivers/pblitv2r$(OX) \ - $(OP)fdrivers/pblitv2v$(OX) \ - $(OP)fdrivers/ram1$(OX) \ - $(OP)fdrivers/ram16$(OX) \ - $(OP)fdrivers/ram4$(OX) \ - $(OP)fdrivers/ram8$(OX) \ - $(OP)fdrivers/rblit_14$(OX) - -STD_3 = $(OP)fonts/fdv_bgi$(OX) \ - $(OP)fonts/fdv_grx$(OX) \ - $(OP)fonts/fdv_raw$(OX) \ - $(OP)fonts/fdv_fna$(OX) \ - $(OP)fonts/fdv_win$(OX) \ - $(OP)fonts/fdtable$(OX) \ - $(OP)fonts/pc6x8$(OX) \ - $(OP)fonts/pc8x8$(OX) \ - $(OP)fonts/pc8x14$(OX) \ - $(OP)fonts/pc8x16$(OX) \ - $(OP)image/ialloc$(OX) \ - $(OP)image/ibuild$(OX) \ - $(OP)image/ifbox$(OX) \ - $(OP)image/ihline$(OX) \ - $(OP)image/iinverse$(OX) \ - $(OP)image/imginlne$(OX) \ - $(OP)image/iplot$(OX) \ - $(OP)image/istretch$(OX) \ - $(OP)gformats/ctx2pnm$(OX) \ - $(OP)gformats/pnm2ctx$(OX) - -STD_4 = $(OP)mouse/bldcurs$(OX) \ - $(OP)mouse/drawcurs$(OX) \ - $(OP)mouse/mouinfo$(OX) \ - $(OP)mouse/mouinlne$(OX) \ - $(OP)mouse/mscursor$(OX) \ - $(OP)mouse/mstime$(OX) - -STD_5 = $(OP)pattern/fillpatt$(OX) \ - $(OP)pattern/makepat$(OX) \ - $(OP)pattern/patfbits$(OX) \ - $(OP)pattern/patfbox$(OX) \ - $(OP)pattern/patfcvxp$(OX) \ - $(OP)pattern/patfline$(OX) \ - $(OP)pattern/patfplot$(OX) \ - $(OP)pattern/patfpoly$(OX) \ - $(OP)pattern/patternf$(OX) \ - $(OP)pattern/pattfldf$(OX) \ - $(OP)pattern/pattline$(OX) \ - $(OP)pattern/pattpoly$(OX) \ - $(OP)pattern/pfcirc$(OX) \ - $(OP)pattern/pfcirca$(OX) \ - $(OP)pattern/pfelli$(OX) \ - $(OP)pattern/pfellia$(OX) \ - $(OP)pattern/ptcirc$(OX) \ - $(OP)pattern/ptcirca$(OX) \ - $(OP)pattern/ptelli$(OX) \ - $(OP)pattern/ptellia$(OX) - -STD_6 = $(OP)setup/clip$(OX) \ - $(OP)setup/clrinfo$(OX) \ - $(OP)setup/clrinlne$(OX) \ - $(OP)setup/colorbw$(OX) \ - $(OP)setup/colorega$(OX) \ - $(OP)setup/colors$(OX) \ - $(OP)setup/context$(OX) \ - $(OP)setup/cxtinfo$(OX) \ - $(OP)setup/cxtinlne$(OX) \ - $(OP)setup/drvinfo$(OX) \ - $(OP)setup/drvinlne$(OX) \ - $(OP)setup/fframe$(OX) \ - $(OP)setup/fgeom$(OX) \ - $(OP)setup/hooks$(OX) \ - $(OP)setup/modewalk$(OX) \ - $(OP)setup/setdrvr$(OX) \ - $(OP)setup/setmode$(OX) \ - $(OP)setup/version$(OX) \ - $(OP)setup/viewport$(OX) \ - $(OP)shape/circle1$(OX) - -STD_7 = $(OP)shape/circle2$(OX) \ - $(OP)shape/circle3$(OX) \ - $(OP)shape/circle4$(OX) \ - $(OP)shape/drawpoly$(OX) \ - $(OP)shape/fillcir1$(OX) \ - $(OP)shape/fillcir2$(OX) \ - $(OP)shape/fillcnvx$(OX) \ - $(OP)shape/fillell1$(OX) \ - $(OP)shape/fillell2$(OX) \ - $(OP)shape/fillpoly$(OX) \ - $(OP)shape/flood$(OX) \ - $(OP)shape/floodfil$(OX) \ - $(OP)shape/genellip$(OX) \ - $(OP)shape/polygon$(OX) \ - $(OP)shape/polyline$(OX) \ - $(OP)shape/scancnvx$(OX) \ - $(OP)shape/scanellp$(OX) \ - $(OP)shape/scanpoly$(OX) \ - $(OP)shape/solidfil$(OX) - -STD_8 = $(OP)text/buildaux$(OX) \ - $(OP)text/buildfnt$(OX) \ - $(OP)text/convfont$(OX) \ - $(OP)text/drawstrg$(OX) \ - $(OP)text/drawtext$(OX) \ - $(OP)text/drwstrg$(OX) \ - $(OP)text/dumpfna$(OX) \ - $(OP)text/dumpfont$(OX) \ - $(OP)text/dumptext$(OX) \ - $(OP)text/epatstrg$(OX) \ - $(OP)text/fntinlne$(OX) \ - $(OP)text/fontinfo$(OX) \ - $(OP)text/fontpath$(OX) \ - $(OP)text/loadfont$(OX) \ - $(OP)text/pattstrg$(OX) \ - $(OP)text/propwdt$(OX) \ - $(OP)text/unloadfn$(OX) - -STD_9 = $(OP)user/ubox$(OX) \ - $(OP)user/ucbox$(OX) \ - $(OP)user/uccirc$(OX) \ - $(OP)user/uccirca$(OX) \ - $(OP)user/ucelli$(OX) \ - $(OP)user/ucellia$(OX) \ - $(OP)user/ucirc$(OX) \ - $(OP)user/ucirca$(OX) \ - $(OP)user/ucircf$(OX) \ - $(OP)user/ucircfa$(OX) \ - $(OP)user/ucline$(OX) \ - $(OP)user/ucpolyg$(OX) \ - $(OP)user/ucpolyl$(OX) \ - $(OP)user/udrwchar$(OX) \ - $(OP)user/udrwstrg$(OX) \ - $(OP)user/uelli$(OX) \ - $(OP)user/uellia$(OX) \ - $(OP)user/uellif$(OX) \ - $(OP)user/uellifa$(OX) \ - $(OP)user/ufcpolyg$(OX) \ - $(OP)user/ufillbox$(OX) \ - $(OP)user/uflood$(OX) \ - $(OP)user/ufpolyg$(OX) \ - $(OP)user/uframbox$(OX) \ - $(OP)user/ugetwin$(OX) \ - $(OP)user/uhline$(OX) \ - $(OP)user/uline$(OX) \ - $(OP)user/upbox$(OX) \ - $(OP)user/upcirc$(OX) - -STD_10= $(OP)user/upcirca$(OX) \ - $(OP)user/upelli$(OX) \ - $(OP)user/upellia$(OX) \ - $(OP)user/upfbox$(OX) \ - $(OP)user/upfcirc$(OX) \ - $(OP)user/upfcirca$(OX) \ - $(OP)user/upfcpoly$(OX) \ - $(OP)user/upfelli$(OX) \ - $(OP)user/upfellia$(OX) \ - $(OP)user/upfflood$(OX) \ - $(OP)user/upfline$(OX) \ - $(OP)user/upfplot$(OX) \ - $(OP)user/upfpolyg$(OX) \ - $(OP)user/upixel$(OX) \ - $(OP)user/upixelc$(OX) \ - $(OP)user/upline$(OX) \ - $(OP)user/uplot$(OX) \ - $(OP)user/upolygon$(OX) \ - $(OP)user/upolylin$(OX) \ - $(OP)user/uppolyg$(OX) \ - $(OP)user/uppolyl$(OX) \ - $(OP)user/usercord$(OX) \ - $(OP)user/usetwin$(OX) \ - $(OP)user/utextxy$(OX) \ - $(OP)user/uvline$(OX) - -STD_11= $(OP)utils/resize$(OX) \ - $(OP)utils/ordswap$(OX) \ - $(OP)utils/shiftscl$(OX) \ - $(OP)utils/strmatch$(OX) \ - $(OP)utils/tmpbuff$(OX) \ - $(OP)vdrivers/vd_mem$(OX) \ - $(OP)vdrivers/vtable$(OX) \ - $(OP)wideline/ccirc$(OX) \ - $(OP)wideline/ccirca$(OX) \ - $(OP)wideline/celli$(OX) \ - $(OP)wideline/cellia$(OX) \ - $(OP)wideline/custbox$(OX) \ - $(OP)wideline/custline$(OX) \ - $(OP)wideline/custplne$(OX) \ - $(OP)wideline/custpoly$(OX) \ - $(OP)wideline/drwcpoly$(OX) - -BGI_1 = $(OP)bgi/arc$(OX) \ - $(OP)bgi/aspectra$(OX) \ - $(OP)bgi/bar$(OX) \ - $(OP)bgi/bar3d$(OX) \ - $(OP)bgi/bccgrx$(OX) \ - $(OP)bgi/bgimode$(OX) \ - $(OP)bgi/circle$(OX) \ - $(OP)bgi/clearvp$(OX) \ - $(OP)bgi/closegra$(OX) \ - $(OP)bgi/clrdev$(OX) \ - $(OP)bgi/detectg$(OX) \ - $(OP)bgi/drvname$(OX) \ - $(OP)bgi/egacolor$(OX) \ - $(OP)bgi/ellipse$(OX) \ - $(OP)bgi/errmsg$(OX) - -BGI_2 = $(OP)bgi/fellipse$(OX) \ - $(OP)bgi/fillpatb$(OX) \ - $(OP)bgi/fillpolb$(OX) \ - $(OP)bgi/fillstyl$(OX) \ - $(OP)bgi/fldfill$(OX) \ - $(OP)bgi/getbkcol$(OX) \ - $(OP)bgi/getcol$(OX) \ - $(OP)bgi/getdefpa$(OX) \ - $(OP)bgi/getfillp$(OX) \ - $(OP)bgi/getfills$(OX) \ - $(OP)bgi/getgramo$(OX) \ - $(OP)bgi/getimage$(OX) \ - $(OP)bgi/getmaxmo$(OX) \ - $(OP)bgi/getmoran$(OX) \ - $(OP)bgi/getpixel$(OX) \ - $(OP)bgi/getviewp$(OX) - -BGI_3 = $(OP)bgi/getx$(OX) \ - $(OP)bgi/gety$(OX) \ - $(OP)bgi/gmaxcol$(OX) \ - $(OP)bgi/gmmaxcol$(OX) \ - $(OP)bgi/gmmaxx$(OX) \ - $(OP)bgi/gmmaxy$(OX) \ - $(OP)bgi/gpalsize$(OX) \ - $(OP)bgi/graphres$(OX) \ - $(OP)bgi/imagesze$(OX) \ - $(OP)bgi/instbgid$(OX) \ - $(OP)bgi/lineb$(OX) \ - $(OP)bgi/linerel$(OX) \ - $(OP)bgi/lineto$(OX) \ - $(OP)bgi/lnestyle$(OX) - -BGI_4 = $(OP)bgi/modename$(OX) \ - $(OP)bgi/moverel$(OX) \ - $(OP)bgi/moveto$(OX) \ - $(OP)bgi/page1$(OX) \ - $(OP)bgi/page2$(OX) \ - $(OP)bgi/page3$(OX) \ - $(OP)bgi/page4$(OX) \ - $(OP)bgi/page5$(OX) \ - $(OP)bgi/page6$(OX) \ - $(OP)bgi/palette$(OX) \ - $(OP)bgi/pieslice$(OX) \ - $(OP)bgi/polygonb$(OX) \ - $(OP)bgi/putimage$(OX) \ - $(OP)bgi/putpixel$(OX) \ - $(OP)bgi/rectang$(OX) \ - $(OP)bgi/regbgidr$(OX) - -BGI_5 = $(OP)bgi/rgbpal_g$(OX) \ - $(OP)bgi/rgbpal_s$(OX) \ - $(OP)bgi/rstcrtmd$(OX) \ - $(OP)bgi/sector$(OX) \ - $(OP)bgi/setbgiwh$(OX) \ - $(OP)bgi/setbkcol$(OX) \ - $(OP)bgi/setbusze$(OX) \ - $(OP)bgi/setcolor$(OX) \ - $(OP)bgi/setrgbc$(OX) \ - $(OP)bgi/setviewp$(OX) \ - $(OP)bgi/setwrmod$(OX) \ - $(OP)bgi/text$(OX) \ - $(OP)bgi/text1$(OX) \ - $(OP)bgi/text2$(OX) \ - $(OP)bgi/text3$(OX) - -BGI_6 = $(OP)bgi/text4$(OX) \ - $(OP)bgi/text5$(OX) \ - $(OP)bgi/text6$(OX) \ - $(OP)bgi/text7$(OX) \ - $(OP)bgi/text8$(OX) \ - $(OP)bgi/text9$(OX) \ - $(OP)bgi/texta$(OX) \ - $(OP)bgi/textb$(OX) \ - $(OP)bgi/textc$(OX) \ - $(OP)bgi/textd$(OX) \ - $(OP)bgi/txtlnest$(OX) \ - $(OP)bgi/bgiext01$(OX) \ - $(OP)bgi/bgiext02$(OX) - -DBG_1 = $(OP)utils/dbgprint$(OX) - -JPG_1 = $(OP)gformats/ctx2jpg$(OX) \ - $(OP)gformats/jpg2ctx$(OX) - -NOJPG_1 = $(OP)gformats/dummyjpg$(OX) - -BMP_1 = $(OP)../addons/bmp/bmp$(OX) - -TIF_1 = $(OP)../addons/ctx2tiff$(OX) - -PNG_1 = $(OP)gformats/ctx2png$(OX) \ - $(OP)gformats/png2ctx$(OX) - -NOPNG_1 = $(OP)gformats/dummypng$(OX) - -PRN_1 = $(OP)../addons/print/grxprint$(OX) \ - $(OP)../addons/print/prndata$(OX) - -PRNBGI_1 = $(OP)bgi/bgiprint$(OX) - diff --git a/thirdparty/grx249/src/text/buildaux.c b/thirdparty/grx249/src/text/buildaux.c deleted file mode 100644 index 24823ef..0000000 --- a/thirdparty/grx249/src/text/buildaux.c +++ /dev/null @@ -1,112 +0,0 @@ -/** - ** buildaux.c ---- generate and store a rotated character for a font - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "arith.h" -#include "memfill.h" - -char far *GrBuildAuxiliaryBitmap(GrFont *f,int chr,int dir,int ul) -{ - unsigned int idx = (unsigned int)chr - f->h.minchar; - unsigned int bpos,rbpos,size,rsize,w,h; - int boff,rboff,rbinc; - char far *stdmap,far *cvtmap; - if(idx >= f->h.numchars) return(NULL); - stdmap = &f->bitmap[f->chrinfo[idx].offset]; - dir = (dir & 3) + ((ul && (f->h.ulheight > 0)) ? 4 : 0); - if(dir == GR_TEXT_RIGHT) return(stdmap); - if(f->auxoffs[--dir] != NULL) { - unsigned int offs = f->auxoffs[dir][idx]; - if(offs > 0) return(&f->auxmap[offs - 1]); - } - else { - size = sizeof(f->auxoffs[0][0]) * f->h.numchars; - f->auxoffs[dir] = farmalloc(size); - if(f->auxoffs[dir] == NULL) return(NULL); - memzero(f->auxoffs[dir],size); - } - h = f->h.height; - w = f->chrinfo[idx].width; - size = h * (boff = (w + 7) & ~7); - rsize = w * (rboff = (h + 7) & ~7); - switch(dir) { - case (GR_TEXT_RIGHT - 1 + 4): - rboff = boff; - rsize = size; - rbpos = 0; - rbinc = 1; - break; - case (GR_TEXT_DOWN - 1): /* downward */ - case (GR_TEXT_DOWN - 1 + 4): - rbpos = h - 1; - rbinc = rboff; - rboff = -1; - break; - case (GR_TEXT_LEFT - 1): /* upside down, right to left */ - case (GR_TEXT_LEFT - 1 + 4): - rboff = boff; - rsize = size; - rbpos = rsize - rboff + w - 1; - rbinc = -1; - rboff = -rboff; - break; - case (GR_TEXT_UP - 1): /* upward */ - case (GR_TEXT_UP - 1 + 4): - rbpos = rsize - rboff; - rbinc = -rboff; - rboff = 1; - break; - default: - return(NULL); - } - if((rsize >>= 3) == 0) return(NULL); - if(rsize > (f->auxsize - f->auxnext)) { - /* add space for 32 (average) characters */ - unsigned int newsize = (((f->h.width + 7) >> 3) * f->h.height) << 6; - newsize = umax(newsize,(rsize << 2)); - newsize = umin(newsize,((unsigned int)(-4) - f->auxsize)); - newsize += f->auxsize; - if(rsize > (newsize - f->auxnext)) return(NULL); - cvtmap = farmalloc(newsize); - if(cvtmap == NULL) return(NULL); - if(f->auxsize > 0) { - memcpy(cvtmap,f->auxmap,f->auxsize); - farfree(f->auxmap); - } - f->auxmap = cvtmap; - f->auxsize = newsize; - } - cvtmap = &f->auxmap[f->auxnext]; - f->auxoffs[dir][idx] = f->auxnext + 1; - f->auxnext += rsize; - memfill_b(cvtmap,0,rsize); - for(h = bpos = 0; bpos < size; bpos += boff,rbpos += rboff,h++) { - unsigned int bp = bpos; - unsigned int bptop = bpos + w; - unsigned int rbp = rbpos; - unsigned int ulrow = ul && ((h - f->h.ulpos) < f->h.ulheight); - for( ; bp < bptop; bp++,rbp += rbinc) { - if(stdmap[bp >> 3] & (0x80 >> (bp & 7)) || ulrow) { - cvtmap[rbp >> 3] |= (0x80 >> (rbp & 7)); - } - } - } - return(cvtmap); -} - diff --git a/thirdparty/grx249/src/text/buildfnt.c b/thirdparty/grx249/src/text/buildfnt.c deleted file mode 100644 index 83ed4ec..0000000 --- a/thirdparty/grx249/src/text/buildfnt.c +++ /dev/null @@ -1,352 +0,0 @@ -/** - ** buildfnt.c ---- allocate and fill a font descriptor - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include - -#include "libgrx.h" -#include "grfontdv.h" -#include "allocate.h" -#include "arith.h" -#include "memfill.h" - -/* - * amounts for various font conversions - */ -#define BOLDWDT(width) (((width) + 3) / 10) -#define ITALWDT(height) (((height) + 1) / 7) -#define PROPGAP(width) (((width) / 6) ? ((width) / 6) : 1) - -/* - * Font conversion option structure - */ -typedef struct { - int oldhgt; /* height of the source font */ - int newhgt; /* height of the created font */ - int boldwdt; /* shift and OR in X dir by this much */ - int italwdt; /* tilt font by this much */ - int dofix; /* convert to fixed width */ - int fixwdt; /* width of the fixed cvt font */ - int doprop; /* convert to proportional width */ - int propgap; /* zero edge pixels for prop cvt */ -} conv; - -#ifdef DEBUG -static void bdump(char *hd,unsigned char *bmp,int w,int h,int pitch) -{ - char *s; - DBGPRINTF(DBG_FONT, ("%s (%dx%d):\n",hd,w,h)); - setup_ALLOC(); - s = ALLOC((size_t) (w + 1)); - if(s == NULL) DBGPRINTF(DBG_FONT, ("no memory to show the char\n")); - else { - while(--h >= 0) { - int x; - for(x = 0; x < w; x++) s[x] = bmp[x] ? '#' : '.'; - s[x] = '\0'; - DBGPRINTF(DBG_FONT, ("%s\n", s)); - bmp += pitch; - } - FREE(s); - } - reset_ALLOC(); -} -#define BDUMP(hd,bmp,w,h,pitch) bdump(hd,bmp,w,h,pitch) -#else -#define BDUMP(hd,bmp,w,h,pitch) -#endif - -static int cvtbitmap(int oldw,int neww,conv *c,char *bmp) -{ - int wofs,i,j,x,y,w,h; - unsigned char *work_base; - setup_ALLOC(); - wofs = umax(oldw,neww) + c->boldwdt + c->italwdt + c->propgap; - wofs = umax(wofs,c->fixwdt); - wofs = (wofs + 15) & ~3; - i = wofs * (umax(c->newhgt,c->oldhgt) + 2); - work_base = ALLOC((size_t)i); - if(work_base) { - unsigned char *work = work_base; - memzero(work,i); - work += wofs; - w = neww - c->boldwdt - c->italwdt; - h = c->newhgt; - if((w == oldw) && (h == c->oldhgt)) { - /* No resizing is needed */ - for(y = 0; y < h; y++) { - i = ((w + 7) & ~7) * y; - j = wofs * y; - for(x = 0; x < w; x++,i++,j++) { - work[j] = bmp[i >> 3] & (0x80 >> (i & 7)); - } - } - BDUMP("after unpacking",work,w,h,wofs); - } - else { - /* Resize the bitmap */ - /* The algorithm first looks for rectangles of '1' pixels */ - /* and then maps these onto the coordinate space of the */ - /* resized bitmap. This seems to work better than simple */ - /* pixel sampling. (No feature loss) */ - for(y = 0; y < c->oldhgt; y++) { - unsigned int pos = 0,ones = 0; - i = ((oldw + 7) & ~7) * y; - for(x = 0; x < oldw; x++,i++) { - if(bmp[i >> 3] & (0x80 >> (i & 7))) { - if(!ones) pos = x; - ones++; - if(x != (oldw - 1)) continue; - } - if(ones > 0) { - unsigned int x1 = urscale(pos,w,oldw); - unsigned int x2 = urscale((pos + ones),w,oldw); - unsigned int y1 = urscale(y,h,c->oldhgt); - unsigned int y2 = urscale((y + 1),h,c->oldhgt); - do { - unsigned int xx = x1; - j = (y1 * wofs) + xx; - do { - work[j++] = 1; - } while(++xx < x2); - } while(++y1 < y2); - ones = 0; - } - } - } - BDUMP("after resize",work,w,h,wofs); - } - /* bold conversion */ - if(c->boldwdt > 0) { - for(y = 0; y < h; y++) { - unsigned char *row = &work[wofs * y]; - unsigned char *p1 = &row[w]; - unsigned char *p2 = &row[w + c->boldwdt]; - while(p1 > row) *--p2 |= *--p1; - } - w += c->boldwdt; - BDUMP("after boldify",work,w,h,wofs); - } - /* italic conversion */ - if(c->italwdt > 0) { - int ymax = h - 1; - int yrnd = ymax >> 1; - for(y = 0; y < h; y++) { - int tilt = ((c->italwdt * (ymax - y)) + yrnd) / ymax; - unsigned char *row = &work[wofs * y]; - unsigned char *p1 = &row[w]; - unsigned char *p2 = &row[w + tilt]; - while(p1 > row) *--p2 = *--p1; - while(p2 > row) *--p2 = 0; - } - w += c->italwdt; - BDUMP("after italicize",work,w,h,wofs); - } - x = 0; - /* proportional or fixed width adjustment */ - if(c->dofix || c->doprop) { - int minx = w; - int maxx = 0; - for(y = 0; y < h; y++) { - i = y * wofs; - for(j = 0; j < w; j++,i++) { - if(work[i] && (j < minx)) minx = j; - if(work[i] && (j > maxx)) maxx = j; - } - } - if(minx > maxx) { - minx = 0; - maxx = w - 1; - } - if(c->dofix) { - neww = c->fixwdt; - w = maxx - minx + 1; - x = (neww - w) >> 1; - } - if(c->doprop) { - w = maxx - minx + 1; - x = minx - (c->propgap >> 1); - neww = w + c->propgap; - } - } - for(y = 0,i = (neww + 7) >> 3; y < h; y++) { - char *bp = &bmp[y * i]; - unsigned char *wp = &work[y * wofs]; - int xpos = x; - memfill_b(bp,0,i); - for(j = 0; j < neww; j++,xpos++) { - if(wp[xpos]) bp[j >> 3] |= (0x80 >> (j & 7)); - } - } - FREE(work_base); - } - reset_ALLOC(); - return(neww); -} - -GrFont *_GrBuildFont( - const GrFontHeader *h, - int cvt, - int wdt, - int hgt, - int cmin, - int cmax, - int (*charwdt)(int chr), - int (*bitmap)(int chr,int w,int h,char *buffer), - int scaled -){ - GrFont *f = NULL; - unsigned int fprop = h->proportional; - unsigned int chrcv = GR_FONTCVT_NONE; - unsigned int bmpcv = GR_FONTCVT_NONE; - unsigned long totwdt = 0L; - unsigned long bmplen = 0L; - unsigned int bmpofs = 0; - unsigned int numch,i,chr; - char *bmp = NULL; - conv cv; - setup_ALLOC(); - sttzero(&cv); - if(cvt & GR_FONTCVT_SKIPCHARS) { - unsigned int lastfntchr = h->minchar + h->numchars - 1; - cmin = umin(umax(cmin,h->minchar),lastfntchr); - cmax = umin(umax(cmax,h->minchar),lastfntchr); - if(cmin > cmax) goto error; - if((unsigned int)cmin > h->minchar) chrcv = GR_FONTCVT_SKIPCHARS; - if((unsigned int)cmax < lastfntchr) chrcv = GR_FONTCVT_SKIPCHARS; - } - else { - cmin = h->minchar; - cmax = h->minchar + h->numchars - 1; - } - if(cvt & GR_FONTCVT_RESIZE) { - if((unsigned int)(wdt = imax(2,wdt)) != h->width) bmpcv=GR_FONTCVT_RESIZE; - if((unsigned int)(hgt = imax(2,hgt)) != h->height) bmpcv=GR_FONTCVT_RESIZE; - } - else { - wdt = h->width; - hgt = h->height; - } - numch = cmax - cmin + 1; - i = sizeof(GrFont) + ((numch - 1) * sizeof(GrFontChrInfo)); - f = malloc(i); - if(!f) goto error; - memzero(f,i); - f->h.name = malloc(strlen(h->name) + 1); - f->h.family = malloc(strlen(h->family) + 1); - if(!f->h.name || !f->h.family) goto error; - strcpy(f->h.name ,h->name); - strcpy(f->h.family,h->family); - f->minwidth = 0x7fff; - f->maxwidth = 0; - for(chr = cmin,i = 0; i < numch; chr++,i++) { - int oldw = (*charwdt)(chr); - unsigned int neww = urscale(oldw,wdt,h->width); - if(oldw < 0) goto error; - if(f->minwidth > neww) f->minwidth = neww; - if(f->maxwidth < neww) f->maxwidth = neww; - f->chrinfo[i].width = oldw; - bmplen += ((neww + 7) >> 3) * hgt; - } - cv.oldhgt = scaled ? hgt : h->height; - cv.newhgt = hgt; - if(cvt & GR_FONTCVT_BOLDIFY) { - cv.boldwdt = BOLDWDT(wdt); - cv.boldwdt = imin(cv.boldwdt,(f->minwidth - 1)); - cv.boldwdt = imax(cv.boldwdt,0); - if(cv.boldwdt > 0) bmpcv |= GR_FONTCVT_BOLDIFY; - } - if(cvt & GR_FONTCVT_ITALICIZE) { - cv.italwdt = ITALWDT(hgt); - cv.italwdt = imin(cv.italwdt,(f->minwidth - cv.boldwdt - 1)); - cv.italwdt = imax(cv.italwdt,0); - if(cv.italwdt > 0) bmpcv |= GR_FONTCVT_ITALICIZE; - } - if((cvt & GR_FONTCVT_FIXIFY) && fprop) { - bmpcv |= GR_FONTCVT_FIXIFY; - cv.fixwdt = f->maxwidth; - bmplen = umul32((hgt * ((cv.fixwdt + 7) >> 3)),numch); - cv.dofix = TRUE; - fprop = FALSE; - } - if((cvt & GR_FONTCVT_PROPORTION) && !fprop) { - bmpcv |= GR_FONTCVT_PROPORTION; - cv.propgap = imax(0,(PROPGAP(wdt) - cv.italwdt)); - bmplen = umul32((hgt * ((wdt + cv.propgap + 7) >> 3)),numch); - cv.doprop = TRUE; - fprop = TRUE; - } - if((unsigned long)(unsigned int)bmplen != bmplen) goto error; - f->bitmap = farmalloc(bmplen); - if(!f->bitmap) goto error; - memzero(f->bitmap,(unsigned int)bmplen); - i = f->maxwidth; - if(h->width > (unsigned int)wdt) i = urscale(i,h->width,wdt); - i = ((i + 31) >> 3) * umax(hgt,h->height); - bmp = ALLOC((size_t)i); - if(!bmp) goto error; - f->minwidth = 0x7fff; - f->maxwidth = 0; - for(chr = cmin,i = 0; i < numch; chr++,i++) { - unsigned int oldw = f->chrinfo[i].width; - unsigned int neww = imax(urscale(oldw,wdt,h->width),1); - unsigned int size; - if(scaled) { - unsigned int raww = neww - cv.boldwdt - cv.italwdt; - if(!(*bitmap)(chr,raww,hgt,bmp)) goto error; - if(bmpcv & ~GR_FONTCVT_RESIZE) neww = cvtbitmap(oldw,raww,&cv,bmp); - } - else { - if(!(*bitmap)(chr,oldw,h->height,bmp)) goto error; - if(bmpcv) neww = cvtbitmap(oldw,neww,&cv,bmp); - } - if(f->minwidth > neww) f->minwidth = neww; - if(f->maxwidth < neww) f->maxwidth = neww; - size = ((neww + 7) >> 3) * hgt; - memcpy(&f->bitmap[bmpofs],bmp,size); - f->chrinfo[i].width = neww; - f->chrinfo[i].offset = bmpofs; - bmpofs += size; - totwdt += neww; - } - f->h.proportional = fprop; - f->h.scalable = h->scalable; - f->h.preloaded = FALSE; - f->h.modified = h->modified | chrcv | bmpcv; - f->h.minchar = cmin; - f->h.numchars = numch; - f->h.width = (cv.dofix || cv.doprop) ? (unsigned int)(totwdt / numch) : wdt; - f->h.height = hgt; - f->h.baseline = urscale(h->baseline,hgt,h->height); - f->h.ulpos = urscale(h->ulpos, hgt,h->height); - f->h.ulheight = urscale(h->ulheight,hgt,h->height); - goto done; - error: - if(f) { - if(f->h.name) free(f->h.name); - if(f->h.family) free(f->h.family); - if(f->bitmap) farfree(f->bitmap); - free(f); - f = NULL; - } - done: - if (bmp) FREE(bmp); - reset_ALLOC(); - return(f); -} - diff --git a/thirdparty/grx249/src/text/convfont.c b/thirdparty/grx249/src/text/convfont.c deleted file mode 100644 index cc36e48..0000000 --- a/thirdparty/grx249/src/text/convfont.c +++ /dev/null @@ -1,52 +0,0 @@ -/** - ** convfont.c ---- build a converted font from an already loaded (linked) one - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grfontdv.h" -#include "arith.h" - -static const GrFont *cvfont; - -static int charwdt(int chr) -{ - chr -= cvfont->h.minchar; - if((unsigned int)chr >= cvfont->h.numchars) return(-1); - return(cvfont->chrinfo[chr].width); -} - -static int bitmap(int chr,int w,int h,char *buffer) -{ - chr -= cvfont->h.minchar; - if((unsigned int)chr >= cvfont->h.numchars) return(FALSE); - if((unsigned int)w != cvfont->chrinfo[chr].width) return(FALSE); - if((unsigned int)h != cvfont->h.height) return(FALSE); - memcpy( - buffer, - &cvfont->bitmap[cvfont->chrinfo[chr].offset], - ((w + 7) >> 3) * h - ); - return(TRUE); -} - -GrFont *GrBuildConvertedFont(const GrFont *from,int cvt,int w,int h,int minch,int maxch) -{ - cvfont = from; - if(!cvfont) return(NULL); - return(_GrBuildFont(&from->h,cvt,w,h,minch,maxch,charwdt,bitmap,FALSE)); -} - diff --git a/thirdparty/grx249/src/text/drawstrg.c b/thirdparty/grx249/src/text/drawstrg.c deleted file mode 100644 index 153eef7..0000000 --- a/thirdparty/grx249/src/text/drawstrg.c +++ /dev/null @@ -1,135 +0,0 @@ -/** - ** drawstrg.c ---- low level character string output - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "text/text.h" - -int _GR_textattrintensevideo = 0; - -void _GrDrawString(const void *text,int length,int x,int y, - const GrTextOption *opt, GrPattern *p, TextDrawBitmapFunc dbm) -{ - GrFont *f; - int x1; - GRX_ENTER(); - - if ( ((f = opt->txo_font) != NULL) - && (x1= GrFontStringWidth(f,text,length,opt->txo_chrtype))!=0 ) { - GrColorTableP fgcp = opt->txo_fgcolor.p; - GrColorTableP bgcp = opt->txo_bgcolor.p; - GrColor fgcv = opt->txo_fgcolor.v; - GrColor bgcv = opt->txo_bgcolor.v; - int undl = (fgcv & GR_UNDERLINE_TEXT) ? 1 : 0; - int rotat = GR_TEXT_IS_VERTICAL(opt->txo_direct) ? ~0 : 0; - int dxpre = 0; - int dypre = 0; - int dxpost= 0; - int dypost= 0; - int oldx = x; - int oldy = y; - int y1 = f->h.height; - int ww = (x1 & ~rotat) | (y1 & rotat); - int hh = (x1 & rotat) | (y1 & ~rotat); - int type, step, x2, y2; - switch(opt->txo_xalign) { - case GR_ALIGN_RIGHT: - x -= ww - 1; - break; - case GR_ALIGN_CENTER: - x -= (ww >> 1); - break; - } - switch(opt->txo_yalign) { - case GR_ALIGN_BASELINE: - if(opt->txo_direct == GR_TEXT_DEFAULT) y -= f->h.baseline; - break; - case GR_ALIGN_BOTTOM: - y -= hh - 1; - break; - case GR_ALIGN_CENTER: - y -= (hh >> 1); - break; - } - mouse_block(CURC,x,y,(x + ww - 1),(y + hh - 1)); - switch(opt->txo_direct) { - case GR_TEXT_DOWN: - dypost = ~0; - break; - case GR_TEXT_LEFT: - dxpre = ~0; - x += ww; - break; - case GR_TEXT_UP: - dypre = ~0; - y += hh; - break; - default: - dxpost = ~0; - break; - } - type = opt->txo_chrtype; - step = GR_TEXTCHR_SIZE(type); - while(--length >= 0) { - int chr = GR_TEXTSTR_CODE(text,type); - int attr,xx,yy,cw,ch; - char far *bmp; - if(type == GR_ATTR_TEXT) { - attr = GR_TEXTSTR_ATTR(text,GR_ATTR_TEXT); - fgcv = GR_CTABLE_COLOR(fgcp,GR_ATTR_FGCOLOR(attr)); - bgcv = GR_CTABLE_COLOR(bgcp,GR_ATTR_BGCOLOR(attr)); - undl = GR_ATTR_UNDERLINE(attr); - } - text = (void *)((char *)(text) + step); - x1 = GrFontCharWidth(f,chr); - y1 = f->h.height; - cw = (x1 & ~rotat) | (y1 & rotat); - ch = (x1 & rotat) | (y1 & ~rotat); - x1 = (x -= (cw & dxpre)); - y1 = (y -= (ch & dypre)); - x2 = (xx = x1) + cw - 1; - y2 = (yy = y1) + ch - 1; - x += (cw & dxpost); - y += (ch & dypost); - clip_ordbox_(CURC,x1,y1,x2,y2,continue,CLIP_EMPTY_MACRO_ARG); - bmp = GrFontCharAuxBmp(f,chr,opt->txo_direct,undl); - if(bmp) (*dbm)( - (x1 + CURC->gc_xoffset), - (y1 + CURC->gc_yoffset), - (x2 - x1 + 1), - (y2 - y1 + 1), - oldx, oldy, - bmp, - ((cw + 7) >> 3), - ((x1 - xx) + ((y1 - yy) * ((cw + 7) & ~7))), - fgcv,bgcv, - p - ); - else (*FDRV->drawblock)( - (x1 + CURC->gc_xoffset), - (y1 + CURC->gc_yoffset), - (x2 - x1 + 1), - (y2 - y1 + 1), - bgcv - ); - } - mouse_unblock(); - } - GRX_LEAVE(); -} diff --git a/thirdparty/grx249/src/text/drawtext.c b/thirdparty/grx249/src/text/drawtext.c deleted file mode 100644 index 0125146..0000000 --- a/thirdparty/grx249/src/text/drawtext.c +++ /dev/null @@ -1,34 +0,0 @@ -/** - ** drawtext.c ---- draw a character string with the default font - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "libgrx.h" - -void GrTextXY(int x,int y,char *text,GrColor fg,GrColor bg) -{ - GrTextOption opt; - opt.txo_font = &GrDefaultFont; - opt.txo_fgcolor.v = fg; - opt.txo_bgcolor.v = bg; - opt.txo_chrtype = GR_BYTE_TEXT; - opt.txo_direct = GR_TEXT_RIGHT; - opt.txo_xalign = GR_ALIGN_LEFT; - opt.txo_yalign = GR_ALIGN_TOP; - GrDrawString(text,(int)strlen(text),x,y,&opt); -} - diff --git a/thirdparty/grx249/src/text/drwstrg.c b/thirdparty/grx249/src/text/drwstrg.c deleted file mode 100644 index f857391..0000000 --- a/thirdparty/grx249/src/text/drwstrg.c +++ /dev/null @@ -1,57 +0,0 @@ -/** - ** drwstrg.c ---- draw a character string - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "text/text.h" - -static void FdrvDrawBitmap(int x,int y,int w,int h,int ox, int oy, - char far *bmp,int pitch,int start, - GrColor fg,GrColor bg,GrPattern *p) -{ - GRX_ENTER(); - (*FDRV->drawbitmap)(x,y,w,h,bmp,pitch,start,fg,bg); - GRX_LEAVE(); -} - -void GrDrawString(void *text,int length,int x,int y,const GrTextOption *opt) -{ - GRX_ENTER(); - _GrDrawString(text,length,x,y,opt,NULL,FdrvDrawBitmap); - GRX_LEAVE(); -} - -void GrDrawChar(int chr,int x,int y,const GrTextOption *opt) -{ - char cbuff[2]; - short sbuff[2]; - - GRX_ENTER(); - switch(opt->txo_chrtype) { - case GR_WORD_TEXT: - case GR_ATTR_TEXT: - sbuff[0] = chr; - GrDrawString(sbuff,1,x,y,opt); - break; - default: - cbuff[0] = chr; - GrDrawString(cbuff,1,x,y,opt); - break; - } - GRX_LEAVE(); -} diff --git a/thirdparty/grx249/src/text/dumpfna.c b/thirdparty/grx249/src/text/dumpfna.c deleted file mode 100644 index 5fcc194..0000000 --- a/thirdparty/grx249/src/text/dumpfna.c +++ /dev/null @@ -1,64 +0,0 @@ -/** - ** dumpfna.c ---- write an ascii font file from a font in memory - ** - ** Copyright (C) 2002 Dimitar Zhekov - ** E-Mail: jimmy@is-vn.bg - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include - -#include "libgrx.h" - -void GrDumpFnaFont(const GrFont *f, char *fileName) -{ - int chr; - int x, y, width, bytes; - char *buffer; - FILE *fp = fopen(fileName, "w"); - if(!fp) return; - /* write header */ - fprintf(fp, "name %s\n", f->h.name); - fprintf(fp, "family %s\n", f->h.family); - fprintf(fp, "isfixed %d\n", !f->h.proportional); - if(f->h.proportional) { - fprintf(fp, "minwidth %d\n", f->minwidth); - fprintf(fp, "maxwidth %d\n", f->maxwidth); - fprintf(fp, "avg"); - } - fprintf(fp, "width %d\n", f->h.width); - fprintf(fp, "height %d\n", f->h.height); - fprintf(fp, "minchar %d\n", f->h.minchar); - fprintf(fp, "maxchar %d\n", f->h.minchar + f->h.numchars - 1); - fprintf(fp, "baseline %d\n", f->h.baseline); - fprintf(fp, "undwidth %d\n", f->h.ulheight); - /* write characters */ - for(chr = f->h.minchar; chr < f->h.minchar + f->h.numchars; chr++) { - width = GrFontCharWidth(f, chr); - bytes = (width - 1) / 8 + 1; - buffer = GrFontCharBitmap(f, chr); - /* write character header */ - fprintf(fp, "\n; character %d", chr); - if(isgraph(chr)) fprintf(fp, " (%c)", chr); - fprintf(fp, " width = %d\n", width); - /* write character data */ - for(y = 0; y < f->h.height; y++) { - for(x = 0; x < width; x++) - putc(buffer[x >> 3] & (1 << (7 - (x & 7))) ? '#' : '.', fp); - putc('\n', fp); - buffer += bytes; - } - } - fclose(fp); -} diff --git a/thirdparty/grx249/src/text/dumpfont.c b/thirdparty/grx249/src/text/dumpfont.c deleted file mode 100644 index 6feee77..0000000 --- a/thirdparty/grx249/src/text/dumpfont.c +++ /dev/null @@ -1,167 +0,0 @@ -/** - ** dumpfont.c ---- write a C source file from a font in memory - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include - -#include "libgrx.h" - -/* ----------------------------------------------------------------------- */ -static char bitmaphdr[] = - -"/**\n" -" ** %s ---- GRX 2.0 font converted to C by 'GrDumpFont()'\n" -" **/\n" -"\n" -"#define %s FONTNAME_TEMPORARY_REDIRECTION\n" -"#include \"grx20.h\"\n" -"#undef %s\n" -"\n" -"static unsigned char far %s[] = {\n"; - -/* ----------------------------------------------------------------------- */ -static char fonthdr[] = - -"};\n" -"\n" -"struct {\n" -" GrFont theFont;\n" -" GrFontChrInfo rest[%d];\n" -"} %s = {\n" -" {\n" -" { /* font header */\n" -" %-24s" "/* font name */\n" -" %-24s" "/* font family name */\n" -" %d, \t\t " "/* characters have varying width */\n" -" 0, /* derived from a scalable font */\n" -" 1, /* font permanently linked into program */\n" -" GR_FONTCVT_NONE, /* 'tweaked' font (resized, etc..) */\n" -" %d, \t\t " "/* width (average when proportional) */\n" -" %d, \t\t " "/* font height */\n" -" %d, \t\t " "/* baseline pixel pos (from top) */\n" -" %d, \t\t " "/* underline pixel pos (from top) */\n" -" %d, \t\t " "/* underline width */\n" -" %d, \t\t " "/* lowest character code in font */\n" -" %d \t\t " "/* number of characters in font */\n" -" },\n" -" (char *)%-20s" "/* character bitmap array */\n" -" 0, /* auxiliary bitmap */\n" -" %d,\t\t\t " "/* width of narrowest character */\n" -" %d,\t\t\t " "/* width of widest character */\n" -" 0, /* allocated size of auxiliary bitmap */\n" -" 0, /* free space in auxiliary bitmap */\n" -" { 0\t\t" "}, /* converted character bitmap offsets */\n" -" {{ %d,\t0\t" "}} /* first character info */\n" -" },\n" -" {\n"; - -/* ----------------------------------------------------------------------- */ -static char charinfo[] = - -" { %d,\t%d\t" "}%c /* info for character %-3d */\n"; - -/* ----------------------------------------------------------------------- */ -static char fontend[] = - -" }\n" -"};\n\n"; - -/* ----------------------------------------------------------------------- */ - -void GrDumpFont(const GrFont *f,char *CsymbolName,char *fileName) -{ - unsigned int i; - int offset; - char filname[200]; - char fntname[200]; - char famname[200]; - char bitname[200]; - char *p; - FILE *fp = fopen(fileName,"w"); - if(!fp) return; - strcpy(filname,fileName); - for(p = filname; *p; p++) *p = toupper(*p); - sprintf(fntname,"\"%s",f->h.name); - if((p = strrchr(fntname,'.')) != 0) *p = '\0'; - strcat(fntname,"\","); - sprintf(famname,"\"%s\",",f->h.family); - sprintf(bitname,"%s_bits",CsymbolName); - fprintf( - fp, - bitmaphdr, - filname, - CsymbolName, - CsymbolName, - bitname - ); - for(i = 0; i < f->h.numchars; i++) { - int chr = i + f->h.minchar; - int len = GrFontCharBitmapSize(f,chr); - int pos = 0,j; - char far *bmp = GrFontCharBitmap(f,chr); - fprintf(fp,"\t/* character %d */\n\t",chr); - for(j = 0; j < len; j++) { - fprintf(fp,"0x%02x",(bmp[j] & 0xff)); - if((j + 1) != len) { - putc(',',fp); - if(++pos != 12) continue; - fputs("\n\t",fp); - pos = 0; - } - } - if((i + 1) != f->h.numchars) { - fputs(",\n",fp); - } - } - fprintf(fp, - fonthdr, - f->h.numchars - 1, - CsymbolName, - fntname, - famname, - f->h.proportional, - f->h.width, - f->h.height, - f->h.baseline, - f->h.ulpos, - f->h.ulheight, - f->h.minchar, - f->h.numchars, - (strcat(bitname,","),bitname), - f->minwidth, - f->maxwidth, - GrFontCharWidth(f,f->h.minchar) - ); - offset = GrFontCharBitmapSize(f,f->h.minchar); - for(i = 1; i < f->h.numchars; i++) { - int chr = i + f->h.minchar; - fprintf( - fp, - charinfo, - GrFontCharWidth(f,chr), - offset, - ((i == (f->h.numchars - 1)) ? ' ' : ','), - chr - ); - offset += GrFontCharBitmapSize(f,chr); - } - fputs(fontend,fp); - fclose(fp); -} - diff --git a/thirdparty/grx249/src/text/dumptext.c b/thirdparty/grx249/src/text/dumptext.c deleted file mode 100644 index 5ec7990..0000000 --- a/thirdparty/grx249/src/text/dumptext.c +++ /dev/null @@ -1,156 +0,0 @@ -/** - ** dumptext.c ---- optimized fixed font text drawing - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "arith.h" - -void GrDumpText(int col,int row,int wdt,int hgt,const GrTextRegion *r) -{ - GrColorTableP fgcp = r->txr_fgcolor.p; - GrColorTableP bgcp = r->txr_bgcolor.p; - GrColor fgcv = r->txr_fgcolor.v; - GrColor bgcv = r->txr_bgcolor.v; - int undl = (fgcv & GR_UNDERLINE_TEXT) ? 1 : 0; - GrFont *f = r->txr_font; - char *ptr = r->txr_buffer; - char *bpt = r->txr_backup; - int cofs = GR_TEXTCHR_SIZE(r->txr_chrtype); - int offs = r->txr_lineoffset; - int fast = bpt ? TRUE : FALSE; - int chrw,chrh,bmpw; - int xpos,ypos; - if((f == NULL) || f->h.proportional) return; - if((unsigned int)col >= (unsigned int)r->txr_width) return; - if((unsigned int)row >= (unsigned int)r->txr_height) return; - wdt = umin(wdt,(r->txr_width - col)); - hgt = umin(hgt,(r->txr_height - row)); - if((wdt <= 0) || (hgt <= 0)) return; - chrw = f->h.width; - chrh = f->h.height; - bmpw = (chrw + 7) >> 3; - xpos = r->txr_xpos + (chrw * col); - ypos = r->txr_ypos + (chrh * row); - if(xpos < GrLowX()) { - int clip = (GrLowX() - xpos + chrw - 1) / chrw; - if((wdt -= clip) <= 0) return; - col += clip; - } - if(ypos < GrLowY()) { - int clip = (GrLowY() - ypos + chrh - 1) / chrh; - if((hgt -= clip) <= 0) return; - row += clip; - } - xpos = r->txr_xpos + (chrw * (col + wdt)) - 1; - ypos = r->txr_ypos + (chrh * (row + hgt)) - 1; - if(xpos > GrHighX()) { - int clip = (xpos - GrHighX() + chrw - 1) / chrw; - if((wdt -= clip) <= 0) return; - } - if(ypos > GrHighY()) { - int clip = (ypos - GrHighY() + chrh - 1) / chrh; - if((hgt -= clip) <= 0) return; - } - ptr += (row * offs) + (col * cofs); - bpt += (row * offs) + (col * cofs); - xpos = r->txr_xpos + (col * chrw); - ypos = r->txr_ypos + (row * chrh); - mouse_block( - CURC, - xpos,ypos, - (xpos + (wdt * chrw) - 1), - (ypos + (hgt * chrh) - 1) - ); - for( ; --hgt >= 0; ptr += offs,bpt += offs,ypos += chrh) { - char *pt2 = ptr; - char *bp2 = bpt; - int wd2 = wdt; - int xp2 = xpos; - for( ; --wd2 >= 0; pt2 += cofs,bp2 += cofs,xp2 += chrw) { - int chr,attr; - char far *bmp; - switch(r->txr_chrtype) { - case GR_WORD_TEXT: - chr = *((unsigned short *)(pt2)); - if(fast) { - if(*((unsigned short *)(bp2)) == chr) continue; - *((unsigned short *)(bp2)) = chr; - } - break; - case GR_ATTR_TEXT: - chr = *((unsigned short *)(pt2)); - if(fast) { - if(*((unsigned short *)(bp2)) == chr) continue; - *((unsigned short *)(bp2)) = chr; - } - attr = GR_TEXTCHR_ATTR(chr,GR_ATTR_TEXT); - chr = GR_TEXTCHR_CODE(chr,GR_ATTR_TEXT); - fgcv = GR_CTABLE_COLOR(fgcp,GR_ATTR_FGCOLOR(attr)); - bgcv = GR_CTABLE_COLOR(bgcp,GR_ATTR_BGCOLOR(attr)); - undl = GR_ATTR_UNDERLINE(attr); - break; - default: - chr = *((unsigned char *)(pt2)); - if(fast) { - if(*((unsigned char *)(bp2)) == chr) continue; - *((unsigned char *)(bp2)) = chr; - } - break; - } - bmp = GrFontCharAuxBmp(f,chr,GR_TEXT_RIGHT,undl); - if(bmp) (*FDRV->drawbitmap)( - (xp2 + CURC->gc_xoffset), - (ypos + CURC->gc_yoffset), - chrw,chrh, - bmp,bmpw,0, - fgcv,bgcv - ); - else (*FDRV->drawblock)( - (xp2 + CURC->gc_xoffset), - (ypos + CURC->gc_yoffset), - chrw,chrh, - bgcv - ); - } - } - mouse_unblock(); -} - -void GrDumpTextRegion(const GrTextRegion *r) -{ - GrDumpText(0,0,r->txr_width,r->txr_height,r); -} - -void GrDumpChar(int chr,int col,int row,const GrTextRegion *r) -{ - int offs; - if((unsigned int)col >= (unsigned int)r->txr_width) return; - if((unsigned int)row >= (unsigned int)r->txr_height) return; - switch(r->txr_chrtype) { - case GR_WORD_TEXT: - case GR_ATTR_TEXT: - offs = (row * r->txr_lineoffset) + (col * sizeof(short)); - *((short *)((char *)r->txr_buffer + offs)) = chr; - break; - default: - offs = (row * r->txr_lineoffset) + (col * sizeof(char)); - *((char *)((char *)r->txr_buffer + offs)) = chr; - break; - } - GrDumpText(col,row,1,1,r); -} - diff --git a/thirdparty/grx249/src/text/epatstrg.c b/thirdparty/grx249/src/text/epatstrg.c deleted file mode 100644 index 9c25436..0000000 --- a/thirdparty/grx249/src/text/epatstrg.c +++ /dev/null @@ -1,40 +0,0 @@ -/** - ** epatstrg.c ---- extended patterned draw character string - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "shapes.h" -#include "text/text.h" - -static void ExtPatternFilledBmp(int x,int y,int w,int h,int ox, int oy, - char far *bmp,int pitch,int start, - GrColor fg,GrColor bg,GrPattern *p) -{ - GRX_ENTER(); - _GrFillBitmapPatternExt(x,y,w,h,ox,oy,bmp,pitch,start,p,bg); - GRX_LEAVE(); -} - -void GrPatternDrawStringExt(void *text,int length,int x,int y, - const GrTextOption *opt,GrPattern *p) -{ - GRX_ENTER(); - _GrDrawString(text,length,x,y,opt,p,ExtPatternFilledBmp); - GRX_LEAVE(); -} diff --git a/thirdparty/grx249/src/text/fntinlne.c b/thirdparty/grx249/src/text/fntinlne.c deleted file mode 100644 index c42fb1e..0000000 --- a/thirdparty/grx249/src/text/fntinlne.c +++ /dev/null @@ -1,95 +0,0 @@ -/** - ** fntinlne.c ---- the font inline functions - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -int (GrFontCharPresent)(const GrFont *font,int chr) -{ - return(GrFontCharPresent(font,chr)); -} - -int (GrFontCharWidth)(const GrFont *font,int chr) -{ - return(GrFontCharWidth(font,chr)); -} - -int (GrFontCharHeight)(const GrFont *font,int chr) -{ - return(GrFontCharHeight(font,chr)); -} - -int (GrFontCharBmpRowSize)(const GrFont *font,int chr) -{ - return(GrFontCharBmpRowSize(font,chr)); -} - -int (GrFontCharBitmapSize)(const GrFont *font,int chr) -{ - return(GrFontCharBitmapSize(font,chr)); -} - -int (GrFontStringWidth)(const GrFont *font,void *text,int len,int type) -{ - return(GrFontStringWidth(font,text,len,type)); -} - -int (GrFontStringHeight)(const GrFont *font,void *text,int len,int type) -{ - return(GrFontStringHeight(font,text,len,type)); -} - -char far *(GrFontCharBitmap)(const GrFont *font,int chr) -{ - return(GrFontCharBitmap(font,chr)); -} - -char far *(GrFontCharAuxBmp)(GrFont *font,int chr,int dir,int ul) -{ - return(GrFontCharAuxBmp(font,chr,dir,ul)); -} - -int (GrCharWidth)(int chr,const GrTextOption *opt) -{ - return(GrCharWidth(chr,opt)); -} - -int (GrCharHeight)(int chr,const GrTextOption *opt) -{ - return(GrCharHeight(chr,opt)); -} - -void (GrCharSize)(int chr,const GrTextOption *opt,int *w,int *h) -{ - GrCharSize(chr,opt,w,h); -} - -int (GrStringWidth)(void *text,int length,const GrTextOption *opt) -{ - return(GrStringWidth(text,length,opt)); -} - -int (GrStringHeight)(void *text,int length,const GrTextOption *opt) -{ - return(GrStringHeight(text,length,opt)); -} - -void (GrStringSize)(void *text,int length,const GrTextOption *opt,int *w,int *h) -{ - GrStringSize(text,length,opt,w,h); -} - diff --git a/thirdparty/grx249/src/text/fontinfo.c b/thirdparty/grx249/src/text/fontinfo.c deleted file mode 100644 index a0bb888..0000000 --- a/thirdparty/grx249/src/text/fontinfo.c +++ /dev/null @@ -1,26 +0,0 @@ -/** - ** fontinfo.c ---- font path global data - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grfontdv.h" - -struct _GR_fontFileInfo _GrFontFileInfo = { - (-1), /* number of path entries */ - NULL /* the path entries */ -}; - diff --git a/thirdparty/grx249/src/text/fontpath.c b/thirdparty/grx249/src/text/fontpath.c deleted file mode 100644 index 5882d3f..0000000 --- a/thirdparty/grx249/src/text/fontpath.c +++ /dev/null @@ -1,107 +0,0 @@ -/** - ** fontpath.c ---- set up the font search path - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ -#include -#include - -#include "libgrx.h" -#include "grfontdv.h" -#include "allocate.h" -#include "arith.h" - -void GrSetFontPath(char *p) -{ - int chr,totlen = 0,npath,plen = 0,dc = TRUE; - char path[200],*plist[100]; - if(!p || (*p == '\0')) return; - for (npath = 0; npath < itemsof(plist); ++npath) - plist[npath] = NULL; - npath = 0; - setup_ALLOC(); - path[0] = '\0'; - while(((chr = *p++) != '\0') || (plen > 0)) { - int pathchr = TRUE; - switch(chr) { - case ':': -#if defined(__MSDOS__) || defined(__WIN32__) - if((plen == 1) && isalpha(path[0])) break; -#endif - case ';': - pathchr = FALSE; - break; - case '\0': - p--; - pathchr = FALSE; - break; -#if defined(__MSDOS__) || defined(__WIN32__) - case '\\': - chr = '/'; - case '/': - dc = TRUE; - break; -#endif - default: -#ifdef __DJGPP__ - /* allow syntax /dev/env/DJDIR */ - if ((plen == 9) && (strncmp(path,"/dev/env/",9)==0)) - dc = FALSE; - if (dc) -#endif -#if defined(__MSDOS__) || defined(__WIN32__) - chr = tolower(chr); -#endif - if(isspace(chr)) pathchr = FALSE; - break; - } - if(pathchr) { - path[plen++] = chr; - continue; - } - if(plen > 0) { - if(path[plen - 1] != '/') path[plen++] = '/'; - path[plen++] = '\0'; - plist[npath] = ALLOC((size_t)plen); - if(plist[npath] == NULL) goto error; - strcpy(plist[npath],path); - totlen += plen; - plen = 0; - if(++npath == itemsof(plist)) break; - } - } - if(_GrFontFileInfo.path != NULL) free(_GrFontFileInfo.path); - _GrFontFileInfo.path = NULL; - _GrFontFileInfo.npath = npath; - if(npath > 0) { - _GrFontFileInfo.path = malloc((sizeof(char *) * npath) + totlen); - if(_GrFontFileInfo.path == NULL) goto error; - p = (char *)(&_GrFontFileInfo.path[npath]); - for(plen = 0; plen < npath; plen++) { - _GrFontFileInfo.path[plen] = p; - strcpy(p,plist[plen]); - p += strlen(p) + 1; - } - } - goto done; - error: - if(_GrFontFileInfo.path != NULL) free(_GrFontFileInfo.path); - _GrFontFileInfo.path = NULL; - _GrFontFileInfo.npath = 0; - done: - for (npath = 0; npath < itemsof(plist); ++npath) - FREE(plist[npath]); - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/text/loadfont.c b/thirdparty/grx249/src/text/loadfont.c deleted file mode 100644 index e90c35c..0000000 --- a/thirdparty/grx249/src/text/loadfont.c +++ /dev/null @@ -1,138 +0,0 @@ -/** - ** loadfont.c ---- load a font from a disk file - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include - -#include "libgrx.h" -#include "grfontdv.h" - -static GrFont *doit(char *fname,char *path,int cvt,int w,int h,int lo,int hi) -{ - GrFontDriver **fd; - GrFontHeader hdr; - GrFont *f, *res; - char pathname[200]; - char tempstring[200]; - int plen; - GRX_ENTER(); - res = NULL; - strcpy(pathname,path); - strcat(pathname,fname); - DBGPRINTF(DBG_FONT,("searching font %s\n", pathname)); - plen = strlen(pathname); - hdr.name = &tempstring[0]; - hdr.family = &tempstring[100]; - for(fd = _GrFontDriverTable; (*fd) != NULL; fd++) { - DBGPRINTF(DBG_FONT,("Driver \"%s\", extension \"%s\"\n", (*fd)->name, (*fd)->ext)); - pathname[plen] = '\0'; - if(!((*fd)->openfile)(pathname)) { - strcpy(&pathname[plen],(*fd)->ext); - if(!((*fd)->openfile)(pathname)) continue; - } - if(!((*fd)->header)(&hdr)) { - DBGPRINTF(DBG_FONT,("fd->header failed for %s\n", pathname)); - (*fd)->cleanup(); - continue; - } - f = _GrBuildFont( - &hdr, - cvt, - w,h, - lo,hi, - (*fd)->charwdt, - (*fd)->bitmap, - (*fd)->scalable - ); - if(!f) { - DBGPRINTF(DBG_FONT,("_GrBuildFont failed for %s\n", pathname)); - (*fd)->cleanup(); - continue; - } - (*fd)->cleanup(); - res = f; - break; - } - GRX_RETURN(res); -} - -GrFont *GrLoadConvertedFont(char *name,int cvt,int w,int h,int minc,int maxc) -{ - GrFont *f; - int chr,len,abspath,dc; - char fname[200]; - GRX_ENTER(); - len = 0; - abspath = FALSE; - dc = TRUE; - while((chr = *name++) != '\0') { - switch(chr) { -#if defined(__MSDOS__) || defined(__WIN32__) - case ':': - abspath = TRUE; - break; - case '\\': - chr = '/'; -#endif - case '/': - dc = TRUE; - if(len == 0) abspath = TRUE; - break; - default: - if(isspace(chr)) { - if(len == 0) continue; - name = ""; - chr = '\0'; - } -#ifdef __DJGPP__ - /* allow syntax /dev/env/DJDIR */ - if ((len == 9) && (strncmp(fname,"/dev/env/",9)==0)) - dc = FALSE; - if (dc) -#endif -#if defined(__MSDOS__) || defined(__WIN32__) - chr = tolower(chr); -#endif - break; - } - fname[len++] = chr; - } - fname[len] = '\0'; - f = doit(fname,"",cvt,w,h,minc,maxc); - if((f == NULL) && !abspath) { - if(_GrFontFileInfo.npath < 0) { - char *fPath = getenv("GRXFONT"); -#ifdef GRX_DEFAULT_FONT_PATH - if (!fPath) fPath = GRX_DEFAULT_FONT_PATH; -#endif - GrSetFontPath(fPath); - } - for(len = 0; len < _GrFontFileInfo.npath; len++) { - f = doit(fname,_GrFontFileInfo.path[len],cvt,w,h,minc,maxc); - if(f != NULL) break; - } - } - GRX_RETURN(f); -} - -GrFont *GrLoadFont(char *name) -{ - return(GrLoadConvertedFont(name,GR_FONTCVT_NONE,0,0,0,0)); -} - diff --git a/thirdparty/grx249/src/text/pattstrg.c b/thirdparty/grx249/src/text/pattstrg.c deleted file mode 100644 index 4053d2c..0000000 --- a/thirdparty/grx249/src/text/pattstrg.c +++ /dev/null @@ -1,62 +0,0 @@ -/** - ** pattstrg.c ---- patterned character string output - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "clipping.h" -#include "shapes.h" -#include "text/text.h" - -static void PatternFilledBmp(int x,int y,int w,int h,int ox, int oy, - char far *bmp,int pitch,int start, - GrColor fg,GrColor bg,GrPattern *p) -{ - GRX_ENTER(); - _GrFillBitmapPattern(x,y,w,h,bmp,pitch,start,p,bg); - GRX_LEAVE(); -} - -void GrPatternDrawString(void *text,int length,int x,int y, - const GrTextOption *opt,GrPattern *p) -{ - GRX_ENTER(); - _GrDrawString(text,length,x,y,opt,p,PatternFilledBmp); - GRX_LEAVE(); -} - -void GrPatternDrawChar(int chr,int x,int y,const GrTextOption *opt,GrPattern *p) -{ - char cbuff[2]; - short sbuff[2]; - - GRX_ENTER(); - switch(opt->txo_chrtype) { - case GR_WORD_TEXT: - case GR_ATTR_TEXT: - sbuff[0] = chr; - GrPatternDrawString(sbuff,1,x,y,opt,p); - break; - default: - cbuff[0] = chr; - GrPatternDrawString(cbuff,1,x,y,opt,p); - break; - } - GRX_LEAVE(); -} - - diff --git a/thirdparty/grx249/src/text/propwdt.c b/thirdparty/grx249/src/text/propwdt.c deleted file mode 100644 index 728f0ff..0000000 --- a/thirdparty/grx249/src/text/propwdt.c +++ /dev/null @@ -1,34 +0,0 @@ -/** - ** propwdt.c ---- calculate the width of a string using a proportional font - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -int GrProportionalTextWidth(const GrFont *font,const void *text,int len,int type) -{ - char *txp = (char *)text; - int wdt = 0; - while(--len >= 0) { - wdt += GrFontCharWidth(font,GR_TEXTSTR_CODE(txp,type)); - txp += GR_TEXTCHR_SIZE(type); - } - return(wdt); -} - - - - diff --git a/thirdparty/grx249/src/text/text.h b/thirdparty/grx249/src/text/text.h deleted file mode 100644 index 74fc26a..0000000 --- a/thirdparty/grx249/src/text/text.h +++ /dev/null @@ -1,23 +0,0 @@ -/** - ** text.h ---- some shared definitions - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - */ - -typedef void (*TextDrawBitmapFunc)(int x,int y,int w,int h,int ox, int oy, - char far *bmp,int pitch,int start, - GrColor fg,GrColor bg,GrPattern *p); - -void _GrDrawString(const void *text,int length,int x,int y, - const GrTextOption *opt, GrPattern *p, TextDrawBitmapFunc dbm); diff --git a/thirdparty/grx249/src/text/unloadfn.c b/thirdparty/grx249/src/text/unloadfn.c deleted file mode 100644 index 72d31f5..0000000 --- a/thirdparty/grx249/src/text/unloadfn.c +++ /dev/null @@ -1,37 +0,0 @@ -/** - ** unloadfn.c ---- remove a font from memory - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "arith.h" - -void GrUnloadFont(GrFont *f) -{ - if((f != NULL) && !f->h.preloaded) { - unsigned int i; - free(f->h.name); - free(f->h.family); - farfree(f->bitmap); - if(f->auxmap) farfree(f->auxmap); - for(i = 0; i < itemsof(f->auxoffs); i++) { - if(f->auxoffs[i]) free(f->auxoffs[i]); - } - free(f); - } -} - diff --git a/thirdparty/grx249/src/user/ubox.c b/thirdparty/grx249/src/user/ubox.c deleted file mode 100644 index 8a59a58..0000000 --- a/thirdparty/grx249/src/user/ubox.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** ubox.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrBox(int x1,int y1,int x2,int y2,GrColor c) -{ - U2SX(x1,CURC); - U2SY(y1,CURC); - U2SX(x2,CURC); - U2SY(y2,CURC); - GrBox(x1,y1,x2,y2,c); -} diff --git a/thirdparty/grx249/src/user/ucbox.c b/thirdparty/grx249/src/user/ucbox.c deleted file mode 100644 index 186269c..0000000 --- a/thirdparty/grx249/src/user/ucbox.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** ucbox.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - - -void GrUsrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *lo) -{ - U2SX(x1,CURC); - U2SX(x2,CURC); - U2SY(y1,CURC); - U2SY(y2,CURC); - GrCustomBox(x1,y1,x2,y2,lo); -} diff --git a/thirdparty/grx249/src/user/uccirc.c b/thirdparty/grx249/src/user/uccirc.c deleted file mode 100644 index d83f37d..0000000 --- a/thirdparty/grx249/src/user/uccirc.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** uccirc.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Note : compiling the library with -DUSR_KEEP_SHAPE makes a circle - ** looks like a circle on the screen - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrCustomCircle(int xc,int yc,int r,const GrLineOption *lo) -{ -#ifdef USR_KEEP_SHAPE - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(r,r,CURC->gc_xmax,CURC->gc_usrwidth); - GrCustomCircle(xc,yc,r,lo); -#else - GrUsrCustomEllipse(xc,yc,r,r,lo); -#endif /* USR_KEEP_SHAPE */ -} diff --git a/thirdparty/grx249/src/user/uccirca.c b/thirdparty/grx249/src/user/uccirca.c deleted file mode 100644 index 142b7b8..0000000 --- a/thirdparty/grx249/src/user/uccirca.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** uccirca.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Note : compiling the library with -DUSR_KEEP_SHAPE makes a circle - ** looks like a circle on the screen - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrCustomCircleArc(int xc,int yc,int r,int start,int end,int style,const GrLineOption *lo) -{ -#ifdef USR_KEEP_SHAPE - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(r,r,CURC->gc_xmax,CURC->gc_usrwidth); - GrCustomCircleArc(xc,yc,r,start,end,style,lo); -#else - GrUsrCustomEllipseArc(xc,yc,r,r,start,end,style,lo); -#endif /* USR_KEEP_SHAPE */ -} diff --git a/thirdparty/grx249/src/user/ucelli.c b/thirdparty/grx249/src/user/ucelli.c deleted file mode 100644 index 79a5cb3..0000000 --- a/thirdparty/grx249/src/user/ucelli.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** ucelli.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *lo) -{ - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(xa,xa,CURC->gc_xmax,CURC->gc_usrwidth); - SCALE(ya,ya,CURC->gc_ymax,CURC->gc_usrheight); - GrCustomEllipse(xc,yc,xa,ya,lo); -} - diff --git a/thirdparty/grx249/src/user/ucellia.c b/thirdparty/grx249/src/user/ucellia.c deleted file mode 100644 index 2137694..0000000 --- a/thirdparty/grx249/src/user/ucellia.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** ucellia.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrCustomEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,const GrLineOption *lo) -{ - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(xa,xa,CURC->gc_xmax,CURC->gc_usrwidth); - SCALE(ya,ya,CURC->gc_ymax,CURC->gc_usrheight); - GrCustomEllipseArc(xc,yc,xa,ya,start,end,style,lo); -} diff --git a/thirdparty/grx249/src/user/ucirc.c b/thirdparty/grx249/src/user/ucirc.c deleted file mode 100644 index da5adbf..0000000 --- a/thirdparty/grx249/src/user/ucirc.c +++ /dev/null @@ -1,39 +0,0 @@ -/** - ** ucirc.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Note : compiling the library with -DUSR_KEEP_SHAPE makes a circle - ** looks like a circle on the screen - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrCircle(int xc,int yc,int r,GrColor c) -{ -#ifdef USR_KEEP_SHAPE - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(r,r,CURC->gc_xmax,CURC->gc_usrwidth); - GrCircle(xc,yc,r,c); -#else - GrUsrEllipse(xc,yc,r,r,c); -#endif -} diff --git a/thirdparty/grx249/src/user/ucirca.c b/thirdparty/grx249/src/user/ucirca.c deleted file mode 100644 index b0fbe41..0000000 --- a/thirdparty/grx249/src/user/ucirca.c +++ /dev/null @@ -1,34 +0,0 @@ -/** - ** ucirca.c - ** - ** Copyright (C), Michael Goffioul - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Note : compiling the library with -DUSR_KEEP_SHAPE makes a circle - ** looks like a circle on the screen - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrCircleArc(int xc,int yc,int r,int start,int end,int style,GrColor c) -{ -#ifdef USR_KEEP_SHAPE - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(r,r,CURC->gc_xmax,CURC->gc_usrwidth); - GrCircleArc(xc,yc,r,start,end,style,c); -#else - GrUsrEllipseArc(xc,yc,r,r,start,end,style,c); -#endif /* USR_KEEP_SHAPE */ -} diff --git a/thirdparty/grx249/src/user/ucircf.c b/thirdparty/grx249/src/user/ucircf.c deleted file mode 100644 index 9c309ff..0000000 --- a/thirdparty/grx249/src/user/ucircf.c +++ /dev/null @@ -1,46 +0,0 @@ -/** - ** UCIRCF.C - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is distributed under the terms listed in the document - ** "copying.cb", available from the author at the address above. - ** A copy of "copying.cb" should accompany this file; if not, a copy - ** should be available from where this file was obtained. This file - ** may not be distributed without a verbatim copy of "copying.cb". - ** You should also have received a copy of the GNU General Public - ** License along with this program (it is in the file "copying"); - ** if not, write to the Free Software Foundation, Inc., 675 Mass Ave, - ** Cambridge, MA 02139, USA. - ** - ** This program is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** - ** Copyright (C) 1997, Michael Goffioul - ** - ** goffioul@emic.ucl.ac.be - ** - ** - ** Note : compiling the library with -DUSR_KEEP_SHAPE makes a circle - ** looks like a circle on the screen - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrFilledCircle(int xc,int yc,int r,GrColor c) -{ -#ifdef USR_KEEP_SHAPE - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(r,r,CURC->gc_xmax,CURC->gc_usrwidth); - GrFilledCircle(xc,yc,r,c); -#else - GrUsrFilledEllipse(xc,yc,r,r,c); -#endif -} diff --git a/thirdparty/grx249/src/user/ucircfa.c b/thirdparty/grx249/src/user/ucircfa.c deleted file mode 100644 index 96ced85..0000000 --- a/thirdparty/grx249/src/user/ucircfa.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** ucircfa.c - ** - ** Copyright (C), Michael Goffioul - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Note : compiling the library with -DUSR_KEEP_SHAPE makes a circle - ** looks like a circle on the screen - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrFilledCircleArc(int xc,int yc,int r,int start,int end,int style,GrColor c) -{ -#ifdef USR_KEEP_SHAPE - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(r,r,CURC->gc_xmax,CURC->gc_usrwidth); - GrFilledCircleArc(xc,yc,r,start,end,style,c); -#else - GrUsrFilledEllipseArc(xc,yc,r,r,start,end,style,c); -#endif /* USR_KEEP_SHAPE */ -} - diff --git a/thirdparty/grx249/src/user/ucline.c b/thirdparty/grx249/src/user/ucline.c deleted file mode 100644 index 8d9825a..0000000 --- a/thirdparty/grx249/src/user/ucline.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** ucline.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - - -void GrUsrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *lo) -{ - U2SX(x1,CURC); - U2SX(x2,CURC); - U2SY(y1,CURC); - U2SY(y2,CURC); - GrCustomLine(x1,y1,x2,y2,lo); -} diff --git a/thirdparty/grx249/src/user/ucpolyg.c b/thirdparty/grx249/src/user/ucpolyg.c deleted file mode 100644 index 1d43152..0000000 --- a/thirdparty/grx249/src/user/ucpolyg.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** ucpolyg.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "usercord.h" - -void GrUsrCustomPolygon(int numpts,int points[][2],const GrLineOption *lo) -{ - int pt; - int (*tmp)[2]; - setup_ALLOC(); - tmp = ALLOC(sizeof(int) * 2 * numpts); - - if (tmp != NULL) { - for ( pt = 0;pt < numpts;pt++) { - tmp[pt][0] = points[pt][0]; - tmp[pt][1] = points[pt][1]; - U2SX(tmp[pt][0],CURC); - U2SY(tmp[pt][1],CURC); - } - GrCustomPolygon(numpts,tmp,lo); - FREE(tmp); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/user/ucpolyl.c b/thirdparty/grx249/src/user/ucpolyl.c deleted file mode 100644 index 01cb76a..0000000 --- a/thirdparty/grx249/src/user/ucpolyl.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** ucpolyl.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "usercord.h" - -void GrUsrCustomPolyLine(int numpts,int points[][2],const GrLineOption *lo) -{ - int pt; - int (*tmp)[2]; - setup_ALLOC(); - tmp = ALLOC(sizeof(int) * 2 * numpts); - - if (tmp != NULL) { - for ( pt = 0;pt < numpts;pt++) { - tmp[pt][0] = points[pt][0]; - tmp[pt][1] = points[pt][1]; - U2SX(tmp[pt][0],CURC); - U2SY(tmp[pt][1],CURC); - } - GrCustomPolyLine(numpts,tmp,lo); - FREE(tmp); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/user/udrwchar.c b/thirdparty/grx249/src/user/udrwchar.c deleted file mode 100644 index 821e8c4..0000000 --- a/thirdparty/grx249/src/user/udrwchar.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** udrwchar.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrDrawChar(int chr,int x,int y,const GrTextOption *opt) -{ - U2SX(x,CURC); - U2SY(y,CURC); - GrDrawChar(chr,x,y,opt); -} - diff --git a/thirdparty/grx249/src/user/udrwstrg.c b/thirdparty/grx249/src/user/udrwstrg.c deleted file mode 100644 index 8ad25e4..0000000 --- a/thirdparty/grx249/src/user/udrwstrg.c +++ /dev/null @@ -1,28 +0,0 @@ -/** - ** udrwstrg.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrDrawString(char *text,int length,int x,int y,const GrTextOption *opt) -{ - U2SX(x,CURC); - U2SY(y,CURC); - GrDrawString(text,length,x,y,opt); -} diff --git a/thirdparty/grx249/src/user/uelli.c b/thirdparty/grx249/src/user/uelli.c deleted file mode 100644 index 6099c81..0000000 --- a/thirdparty/grx249/src/user/uelli.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** uelli.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrEllipse(int xc,int yc,int xa,int ya,GrColor c) -{ - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(xa,xa,CURC->gc_xmax,CURC->gc_usrwidth); - SCALE(ya,ya,CURC->gc_ymax,CURC->gc_usrheight); - GrEllipse(xc,yc,xa,ya,c); -} diff --git a/thirdparty/grx249/src/user/uellia.c b/thirdparty/grx249/src/user/uellia.c deleted file mode 100644 index b2bd07a..0000000 --- a/thirdparty/grx249/src/user/uellia.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** uellia.c - ** - ** Copyright (C), Michael Goffioul - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrColor c) -{ - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(xa,xa,CURC->gc_xmax,CURC->gc_usrwidth); - SCALE(ya,ya,CURC->gc_ymax,CURC->gc_usrheight); - GrEllipseArc(xc,yc,xa,ya,start,end,style,c); -} - diff --git a/thirdparty/grx249/src/user/uellif.c b/thirdparty/grx249/src/user/uellif.c deleted file mode 100644 index 34d634c..0000000 --- a/thirdparty/grx249/src/user/uellif.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** uellif.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrFilledEllipse(int xc,int yc,int xa,int ya,GrColor c) -{ - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(xa,xa,CURC->gc_xmax,CURC->gc_usrwidth); - SCALE(ya,ya,CURC->gc_ymax,CURC->gc_usrheight); - GrFilledEllipse(xc,yc,xa,ya,c); -} diff --git a/thirdparty/grx249/src/user/uellifa.c b/thirdparty/grx249/src/user/uellifa.c deleted file mode 100644 index 51be194..0000000 --- a/thirdparty/grx249/src/user/uellifa.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** uellifa.c - ** - ** Copyright (C), Michael Goffioul - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrColor c) -{ - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(xa,xa,CURC->gc_xmax,CURC->gc_usrwidth); - SCALE(ya,ya,CURC->gc_ymax,CURC->gc_usrheight); - GrFilledEllipseArc(xc,yc,xa,ya,start,end,style,c); -} - diff --git a/thirdparty/grx249/src/user/ufcpolyg.c b/thirdparty/grx249/src/user/ufcpolyg.c deleted file mode 100644 index 603ee64..0000000 --- a/thirdparty/grx249/src/user/ufcpolyg.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** ufcpolyg.c - ** - ** Copyright (C), Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "usercord.h" - -void GrUsrFilledConvexPolygon(int numpts,int points[][2],GrColor c) -{ - int pt; - int (*tmp)[2]; - setup_ALLOC(); - tmp = ALLOC(sizeof(int) * 2 * numpts); - - if (tmp != NULL) { - for ( pt = 0; pt < numpts; pt++) { - tmp[pt][0] = points[pt][0]; - tmp[pt][1] = points[pt][1]; - U2SX(tmp[pt][0],CURC); - U2SY(tmp[pt][1],CURC); - } - GrFilledConvexPolygon(numpts,tmp,c); - FREE(tmp); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/user/ufillbox.c b/thirdparty/grx249/src/user/ufillbox.c deleted file mode 100644 index f6cc641..0000000 --- a/thirdparty/grx249/src/user/ufillbox.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** ufillbox.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrFilledBox(int x1,int y1,int x2,int y2,GrColor c) -{ - U2SX(x1,CURC); - U2SY(y1,CURC); - U2SX(x2,CURC); - U2SY(y2,CURC); - GrFilledBox(x1,y1,x2,y2,c); -} diff --git a/thirdparty/grx249/src/user/uflood.c b/thirdparty/grx249/src/user/uflood.c deleted file mode 100644 index 4d89ab9..0000000 --- a/thirdparty/grx249/src/user/uflood.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - ** uflood.c ---- fill an arbitrary area in user coordinates - ** - ** Copyright (c) 1997 Hartmut Schirmer - ** [e-mail: hsc@techfak.uni-kiel.de] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrFloodFill(int x, int y, GrColor border, GrColor c) -{ - U2SX(x,CURC); - U2SY(y,CURC); - GrFloodFill(x,y,border,c); -} diff --git a/thirdparty/grx249/src/user/ufpolyg.c b/thirdparty/grx249/src/user/ufpolyg.c deleted file mode 100644 index 1249862..0000000 --- a/thirdparty/grx249/src/user/ufpolyg.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** ufpolyg.c - ** - ** Copyright (C), Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "usercord.h" - -void GrUsrFilledPolygon(int numpts,int points[][2],GrColor c) -{ - int pt; - int (*tmp)[2]; - setup_ALLOC(); - tmp = ALLOC(sizeof(int) * 2 * numpts); - - if (tmp != NULL) { - for ( pt = 0; pt < numpts; pt++) { - tmp[pt][0] = points[pt][0]; - tmp[pt][1] = points[pt][1]; - U2SX(tmp[pt][0],CURC); - U2SY(tmp[pt][1],CURC); - } - GrFilledPolygon(numpts,tmp,c); - FREE(tmp); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/user/uframbox.c b/thirdparty/grx249/src/user/uframbox.c deleted file mode 100644 index 93eb0bf..0000000 --- a/thirdparty/grx249/src/user/uframbox.c +++ /dev/null @@ -1,38 +0,0 @@ -/** - ** uframbox.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "arith.h" -#include "usercord.h" - -void GrUsrFramedBox(int x1,int y1,int x2,int y2,int wdt,GrFBoxColors *c) -{ - int w1,w2; - - U2SX(x1,CURC); - U2SY(y1,CURC); - U2SX(x2,CURC); - U2SY(y2,CURC); - SCALE(w1,wdt,CURC->gc_xmax,CURC->gc_usrwidth); - SCALE(w2,wdt,CURC->gc_ymax,CURC->gc_usrheight); - wdt = (iabs((int)w1) + iabs((int)w2)) >> 1; - if(wdt == 0) - GrFilledBox(x1,y1,x2,y2,c->fbx_intcolor); - else GrFramedBox(x1,y1,x2,y2,wdt,c); -} diff --git a/thirdparty/grx249/src/user/ugetwin.c b/thirdparty/grx249/src/user/ugetwin.c deleted file mode 100644 index d52b38a..0000000 --- a/thirdparty/grx249/src/user/ugetwin.c +++ /dev/null @@ -1,28 +0,0 @@ -/** - ** ugetwin.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -void GrGetUserWindow(int *x1,int *y1,int *x2,int *y2) -{ - *x1 = CURC->gc_usrxbase; - *y1 = CURC->gc_usrybase; - *x2 = CURC->gc_usrxbase + CURC->gc_usrwidth; - *y2 = CURC->gc_usrybase + CURC->gc_usrheight; -} diff --git a/thirdparty/grx249/src/user/uhline.c b/thirdparty/grx249/src/user/uhline.c deleted file mode 100644 index 390634e..0000000 --- a/thirdparty/grx249/src/user/uhline.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** uhline.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrHLine(int x1,int x2,int y,GrColor c) -{ - U2SX(x1,CURC); - U2SX(x2,CURC); - U2SY(y,CURC); - GrHLine(x1,x2,y,c); -} diff --git a/thirdparty/grx249/src/user/uline.c b/thirdparty/grx249/src/user/uline.c deleted file mode 100644 index 77b0b84..0000000 --- a/thirdparty/grx249/src/user/uline.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** uline.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrLine(int x1,int y1,int x2,int y2,GrColor c) -{ - U2SX(x1,CURC); - U2SY(y1,CURC); - U2SX(x2,CURC); - U2SY(y2,CURC); - GrLine(x1,y1,x2,y2,c); -} diff --git a/thirdparty/grx249/src/user/upbox.c b/thirdparty/grx249/src/user/upbox.c deleted file mode 100644 index 34a4569..0000000 --- a/thirdparty/grx249/src/user/upbox.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** upbox.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternedBox(int x1,int y1,int x2,int y2,GrLinePattern *lp) -{ - U2SX(x1,CURC); - U2SX(x2,CURC); - U2SY(y1,CURC); - U2SY(y2,CURC); - GrPatternedBox(x1,y1,x2,y2,lp); -} diff --git a/thirdparty/grx249/src/user/upcirc.c b/thirdparty/grx249/src/user/upcirc.c deleted file mode 100644 index e2cb621..0000000 --- a/thirdparty/grx249/src/user/upcirc.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** upcirc.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Note : compiling the library with -DUSR_KEEP_SHAPE makes a circle - ** looks like a circle on the screen - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternedCircle(int xc,int yc,int r,GrLinePattern *lp) -{ -#ifdef USR_KEEP_SHAPE - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(r,r,CURC->gc_xmax,CURC->gc_usrwidth); - GrPatternedCircle(xc,yc,r,lp); -#else - GrUsrPatternedEllipse(xc,yc,r,r,lp); -#endif /* USR_KEEP_SHAPE */ -} diff --git a/thirdparty/grx249/src/user/upcirca.c b/thirdparty/grx249/src/user/upcirca.c deleted file mode 100644 index 8d0ab82..0000000 --- a/thirdparty/grx249/src/user/upcirca.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - ** upcirca.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Note : compiling the library with -DUSR_KEEP_SHAPE makes a circle - ** looks like a circle on the screen - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternedCircleArc(int xc,int yc,int r,int start,int end,int style,GrLinePattern *lp) -{ -#ifdef USR_KEEP_SHAPE - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(r,r,CURC->gc_xmax,CURC->gc_usrwidth); - GrPatternedCircleArc(xc,yc,r,start,end,style,lp); -#else - GrUsrPatternedEllipseArc(xc,yc,r,r,start,end,style,lp); -#endif /* USR_KEEP_SHAPE */ -} - diff --git a/thirdparty/grx249/src/user/upelli.c b/thirdparty/grx249/src/user/upelli.c deleted file mode 100644 index c16dbed..0000000 --- a/thirdparty/grx249/src/user/upelli.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** upelli.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternedEllipse(int xc,int yc,int xa,int ya,GrLinePattern *lp) -{ - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(xa,xa,CURC->gc_xmax,CURC->gc_usrwidth); - SCALE(ya,ya,CURC->gc_ymax,CURC->gc_usrheight); - GrPatternedEllipse(xc,yc,xa,ya,lp); -} diff --git a/thirdparty/grx249/src/user/upellia.c b/thirdparty/grx249/src/user/upellia.c deleted file mode 100644 index 1d57ee5..0000000 --- a/thirdparty/grx249/src/user/upellia.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - ** upellia.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - - -void GrUsrPatternedEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrLinePattern *lp) -{ - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(xa,xa,CURC->gc_xmax,CURC->gc_usrwidth); - SCALE(ya,ya,CURC->gc_ymax,CURC->gc_usrheight); - GrPatternedEllipseArc(xc,yc,xa,ya,start,end,style,lp); -} diff --git a/thirdparty/grx249/src/user/upfbox.c b/thirdparty/grx249/src/user/upfbox.c deleted file mode 100644 index ad720d0..0000000 --- a/thirdparty/grx249/src/user/upfbox.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** upfbox.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternFilledBox(int x1,int y1,int x2,int y2,GrPattern *p) -{ - U2SX(x1,CURC); - U2SX(x2,CURC); - U2SY(y1,CURC); - U2SY(y2,CURC); - GrPatternFilledBox(x1,y1,x2,y2,p); -} diff --git a/thirdparty/grx249/src/user/upfcirc.c b/thirdparty/grx249/src/user/upfcirc.c deleted file mode 100644 index 6039116..0000000 --- a/thirdparty/grx249/src/user/upfcirc.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - ** upfcirc.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Note : compiling the library with -DUSR_KEEP_SHAPE makes a circle - ** looks like a circle on the screen - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternFilledCircle(int xc,int yc,int r,GrPattern *p) -{ -#ifdef USR_KEEP_SHAPE - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(r,r,CURC->gc_xmax,CURC->gc_usrwidth); - GrPatternFilledCircle(xc,yc,r,p); -#else - GrUsrPatternFilledEllipse(xc,yc,r,r,p); -#endif /* USR_KEEP_SHAPE */ -} - diff --git a/thirdparty/grx249/src/user/upfcirca.c b/thirdparty/grx249/src/user/upfcirca.c deleted file mode 100644 index 2ac9df9..0000000 --- a/thirdparty/grx249/src/user/upfcirca.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - ** upfcirca.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Note : compiling the library with -DUSR_KEEP_SHAPE makes a circle - ** looks like a circle on the screen - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternFilledCircleArc(int xc,int yc,int r,int start,int end,int style,GrPattern *p) -{ -#ifdef USR_KEEP_SHAPE - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(r,r,CURC->gc_xmax,CURC->gc_usrwidth); - GrPatternFilledCircleArc(xc,yc,r,start,end,style,p); -#else - GrUsrPatternFilledEllipseArc(xc,yc,r,r,start,end,style,p); -#endif /* USR_KEEP_SHAPE */ -} diff --git a/thirdparty/grx249/src/user/upfcpoly.c b/thirdparty/grx249/src/user/upfcpoly.c deleted file mode 100644 index eb90a45..0000000 --- a/thirdparty/grx249/src/user/upfcpoly.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** upfcpoly.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "usercord.h" - -void GrUsrPatternFilledConvexPolygon(int numpts,int points[][2],GrPattern *p) -{ - int pt; - int (*tmp)[2]; - setup_ALLOC(); - tmp = ALLOC(sizeof(int) * 2 * numpts); - - if (tmp != NULL) { - for ( pt = 0;pt < numpts;pt++) { - tmp[pt][0] = points[pt][0]; - tmp[pt][1] = points[pt][1]; - U2SX(tmp[pt][0],CURC); - U2SY(tmp[pt][1],CURC); - } - GrPatternFilledConvexPolygon(numpts,tmp,p); - FREE(tmp); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/user/upfelli.c b/thirdparty/grx249/src/user/upfelli.c deleted file mode 100644 index 8023f3d..0000000 --- a/thirdparty/grx249/src/user/upfelli.c +++ /dev/null @@ -1,19 +0,0 @@ -/** - ** upfelli.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternFilledEllipse(int xc,int yc,int xa,int ya,GrPattern *p) -{ - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(xa,xa,CURC->gc_xmax,CURC->gc_usrwidth); - SCALE(ya,ya,CURC->gc_ymax,CURC->gc_usrheight); - GrPatternFilledEllipse(xc,yc,xa,ya,p); -} diff --git a/thirdparty/grx249/src/user/upfellia.c b/thirdparty/grx249/src/user/upfellia.c deleted file mode 100644 index d635601..0000000 --- a/thirdparty/grx249/src/user/upfellia.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** upfellia.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternFilledEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,GrPattern *p) -{ - U2SX(xc,CURC); - U2SY(yc,CURC); - SCALE(xa,xa,CURC->gc_xmax,CURC->gc_usrwidth); - SCALE(ya,ya,CURC->gc_ymax,CURC->gc_usrheight); - GrPatternFilledEllipseArc(xc,yc,xa,ya,start,end,style,p); -} diff --git a/thirdparty/grx249/src/user/upfflood.c b/thirdparty/grx249/src/user/upfflood.c deleted file mode 100644 index b67d117..0000000 --- a/thirdparty/grx249/src/user/upfflood.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - ** upfflood.c ---- pattern fill an arbitrary area in user coordinates - ** - ** Copyright (c) 1997 Hartmut Schirmer - ** [e-mail: hsc@techfak.uni-kiel.de] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternFloodFill(int x, int y, GrColor border, GrPattern *p) -{ - U2SX(x,CURC); - U2SY(y,CURC); - GrPatternFloodFill(x,y,border,p); -} diff --git a/thirdparty/grx249/src/user/upfline.c b/thirdparty/grx249/src/user/upfline.c deleted file mode 100644 index 7780e06..0000000 --- a/thirdparty/grx249/src/user/upfline.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** upfline.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternFilledLine(int x1,int y1,int x2,int y2,GrPattern *p) -{ - U2SX(x1,CURC); - U2SX(x2,CURC); - U2SY(y1,CURC); - U2SY(y2,CURC); - GrPatternFilledLine(x1,y1,x2,y2,p); -} diff --git a/thirdparty/grx249/src/user/upfplot.c b/thirdparty/grx249/src/user/upfplot.c deleted file mode 100644 index d6046de..0000000 --- a/thirdparty/grx249/src/user/upfplot.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - ** upfplot.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternFilledPlot(int x,int y,GrPattern *p) -{ - U2SX(x,CURC); - U2SY(y,CURC); - GrPatternFilledPlot(x,y,p); -} diff --git a/thirdparty/grx249/src/user/upfpolyg.c b/thirdparty/grx249/src/user/upfpolyg.c deleted file mode 100644 index e894358..0000000 --- a/thirdparty/grx249/src/user/upfpolyg.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** upfpolyg.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "usercord.h" - -void GrUsrPatternFilledPolygon(int numpts,int points[][2],GrPattern *p) -{ - int pt; - int (*tmp)[2]; - setup_ALLOC(); - tmp = ALLOC(sizeof(int) * 2 * numpts); - - if (tmp != NULL) { - for ( pt = 0;pt < numpts;pt++) { - tmp[pt][0] = points[pt][0]; - tmp[pt][1] = points[pt][1]; - U2SX(tmp[pt][0],CURC); - U2SY(tmp[pt][1],CURC); - } - GrPatternFilledPolygon(numpts,tmp,p); - FREE(tmp); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/user/upixel.c b/thirdparty/grx249/src/user/upixel.c deleted file mode 100644 index fb58396..0000000 --- a/thirdparty/grx249/src/user/upixel.c +++ /dev/null @@ -1,28 +0,0 @@ -/** - ** upixel.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -GrColor GrUsrPixel(int x,int y) -{ - U2SX(x,CURC); - U2SY(y,CURC); - return(GrPixel(x,y)); -} diff --git a/thirdparty/grx249/src/user/upixelc.c b/thirdparty/grx249/src/user/upixelc.c deleted file mode 100644 index 5e4e79c..0000000 --- a/thirdparty/grx249/src/user/upixelc.c +++ /dev/null @@ -1,28 +0,0 @@ -/** - ** upixelc.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -GrColor GrUsrPixelC(GrContext *c,int x,int y) -{ - U2SX(x,c); - U2SY(y,c); - return(GrPixelC(c,x,y)); -} diff --git a/thirdparty/grx249/src/user/upline.c b/thirdparty/grx249/src/user/upline.c deleted file mode 100644 index 0f04d35..0000000 --- a/thirdparty/grx249/src/user/upline.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** upline.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPatternedLine(int x1,int y1,int x2,int y2,GrLinePattern *lp) -{ - U2SX(x1,CURC); - U2SX(x2,CURC); - U2SY(y1,CURC); - U2SY(y2,CURC); - GrPatternedLine(x1,y1,x2,y2,lp); -} diff --git a/thirdparty/grx249/src/user/uplot.c b/thirdparty/grx249/src/user/uplot.c deleted file mode 100644 index 8c19345..0000000 --- a/thirdparty/grx249/src/user/uplot.c +++ /dev/null @@ -1,28 +0,0 @@ -/** - ** uplot.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrPlot(int x,int y,GrColor c) -{ - U2SX(x,CURC); - U2SY(y,CURC); - GrPlot(x,y,c); -} diff --git a/thirdparty/grx249/src/user/upolygon.c b/thirdparty/grx249/src/user/upolygon.c deleted file mode 100644 index 90d1ec7..0000000 --- a/thirdparty/grx249/src/user/upolygon.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** upolygon.c - ** - ** Copyright (C), Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "usercord.h" - -void GrUsrPolygon(int numpts,int points[][2],GrColor c) -{ - int pt; - int (*tmp)[2]; - setup_ALLOC(); - tmp = ALLOC(sizeof(int) * 2 * numpts); - - if (tmp != NULL) { - for ( pt = 0; pt < numpts; pt++) { - tmp[pt][0] = points[pt][0]; - tmp[pt][1] = points[pt][1]; - U2SX(tmp[pt][0],CURC); - U2SY(tmp[pt][1],CURC); - } - GrPolygon(numpts,tmp,c); - FREE(tmp); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/user/upolylin.c b/thirdparty/grx249/src/user/upolylin.c deleted file mode 100644 index 1369d47..0000000 --- a/thirdparty/grx249/src/user/upolylin.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** upolylin.c - ** - ** Copyright (C), Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "usercord.h" - -void GrUsrPolyLine(int numpts,int points[][2],GrColor c) -{ - int pt; - int (*tmp)[2]; - setup_ALLOC(); - tmp = ALLOC(sizeof(int) * 2 * numpts); - - if (tmp != NULL) { - for ( pt = 0; pt < numpts; pt++) { - tmp[pt][0] = points[pt][0]; - tmp[pt][1] = points[pt][1]; - U2SX(tmp[pt][0],CURC); - U2SY(tmp[pt][1],CURC); - } - GrPolyLine(numpts,tmp,c); - FREE(tmp); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/user/uppolyg.c b/thirdparty/grx249/src/user/uppolyg.c deleted file mode 100644 index ed256b2..0000000 --- a/thirdparty/grx249/src/user/uppolyg.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** uppolyg.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "usercord.h" - -void GrUsrPatternedPolygon(int numpts,int points[][2],GrLinePattern *lp) -{ - int pt; - int (*tmp)[2]; - setup_ALLOC(); - tmp = ALLOC(sizeof(int) * 2 * numpts); - - if (tmp != NULL) { - for ( pt = 0;pt < numpts;pt++) { - tmp[pt][0] = points[pt][0]; - tmp[pt][1] = points[pt][1]; - U2SX(tmp[pt][0],CURC); - U2SY(tmp[pt][1],CURC); - } - GrPatternedPolygon(numpts,tmp,lp); - FREE(tmp); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/user/uppolyl.c b/thirdparty/grx249/src/user/uppolyl.c deleted file mode 100644 index ffae856..0000000 --- a/thirdparty/grx249/src/user/uppolyl.c +++ /dev/null @@ -1,42 +0,0 @@ -/** - ** uppolyl.c - ** - ** Copyright (C) 1997, Michael Goffioul - ** [goffioul@emic.ucl.ac.be] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "usercord.h" - -void GrUsrPatternedPolyLine(int numpts,int points[][2],GrLinePattern *lp) -{ - int pt; - int (*tmp)[2]; - setup_ALLOC(); - tmp = ALLOC(sizeof(int) * 2 * numpts); - - if (tmp != NULL) { - for ( pt = 0;pt < numpts;pt++) { - tmp[pt][0] = points[pt][0]; - tmp[pt][1] = points[pt][1]; - U2SX(tmp[pt][0],CURC); - U2SY(tmp[pt][1],CURC); - } - GrPatternedPolyLine(numpts,tmp,lp); - FREE(tmp); - } - reset_ALLOC(); -} - diff --git a/thirdparty/grx249/src/user/usercord.c b/thirdparty/grx249/src/user/usercord.c deleted file mode 100644 index 89f1d6e..0000000 --- a/thirdparty/grx249/src/user/usercord.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** usercord.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrGetScreenCoord(int *x,int *y) -{ - U2SX(*x,CURC); - U2SY(*y,CURC); -} - -void GrGetUserCoord(int *x,int *y) -{ - S2UX(*x,CURC); - S2UY(*y,CURC); -} diff --git a/thirdparty/grx249/src/user/usetwin.c b/thirdparty/grx249/src/user/usetwin.c deleted file mode 100644 index 8a9c33d..0000000 --- a/thirdparty/grx249/src/user/usetwin.c +++ /dev/null @@ -1,28 +0,0 @@ -/** - ** usetwin.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" - -void GrSetUserWindow(int x1,int y1,int x2,int y2) -{ - CURC->gc_usrxbase = x1; - CURC->gc_usrybase = y1; - CURC->gc_usrwidth = x2 - x1; - CURC->gc_usrheight = y2 - y1; -} diff --git a/thirdparty/grx249/src/user/utextxy.c b/thirdparty/grx249/src/user/utextxy.c deleted file mode 100644 index 964aa62..0000000 --- a/thirdparty/grx249/src/user/utextxy.c +++ /dev/null @@ -1,28 +0,0 @@ -/** - ** utextxy.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrTextXY(int x,int y,char *text,GrColor fg,GrColor bg) -{ - U2SX(x,CURC); - U2SY(y,CURC); - GrTextXY(x,y,text,fg,bg); -} diff --git a/thirdparty/grx249/src/user/uvline.c b/thirdparty/grx249/src/user/uvline.c deleted file mode 100644 index d9c8c3e..0000000 --- a/thirdparty/grx249/src/user/uvline.c +++ /dev/null @@ -1,29 +0,0 @@ -/** - ** uvline.c - ** - ** Copyright (C) 1992, Csaba Biegl - ** 820 Stirrup Dr, Nashville, TN, 37221 - ** csaba@vuse.vanderbilt.edu - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "usercord.h" - -void GrUsrVLine(int x,int y1,int y2,GrColor c) -{ - U2SX(x,CURC); - U2SY(y1,CURC); - U2SY(y2,CURC); - GrVLine(x,y1,y2,c); -} diff --git a/thirdparty/grx249/src/utilprog/bin2c.c b/thirdparty/grx249/src/utilprog/bin2c.c deleted file mode 100644 index 6b7fd55..0000000 --- a/thirdparty/grx249/src/utilprog/bin2c.c +++ /dev/null @@ -1,110 +0,0 @@ -/** - ** BCC2GRX - Interfacing Borland based graphics programs to LIBGRX - ** Copyright (C) 1993-97 by Hartmut Schirmer - ** - ** - ** Contact : Hartmut Schirmer - ** Feldstrasse 118 - ** D-24105 Kiel - ** Germany - ** - ** e-mail : hsc@techfak.uni-kiel.de - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include -#include -#include - -#define TRUE (1==1) -#define FALSE (!TRUE) - -void usage(char *err) -{ - puts("bin2c -- convert binary files into C source\n"); - puts("Usage:\n"); - puts(" bin2c []"); - if (err != NULL) - printf("\n\nError: %s\n", err); - exit(1); -} - -char *timestr(void) -{ - struct tm *lt; - time_t t; - - t = time(NULL); - lt = localtime(&t); - return asctime(lt); -} - -long filesize(FILE *f) -{ - long posi, res; - - posi = ftell(f); - fseek(f, 0, SEEK_END); - res = ftell(f); - fseek(f, posi, SEEK_SET); - return res; -} - -int main(int argc, char *argv[]) -{ - FILE *inp, *outp; - char name[1000]; - long length, count; - int linec; - unsigned char *buffer, *komma; - - if (argc < 3 || argc > 4) usage("Incorrect command line"); - - strcpy(name,"binary_data_field"); - inp = fopen( argv[1], "rb"); - if (inp == NULL) usage("Couldn't opem input file"); - - strcpy( name, argv[2]); - if (argc > 3) { - outp = fopen(argv[3], "w"); - if (outp == NULL) usage("Couldn't open output file"); - } else - outp = stdout; - - length = filesize(inp); - buffer = (unsigned char *)malloc( length); - if (buffer == NULL) usage("Out of memory"); - if (fread( buffer, length, 1, inp) != 1) usage("read error"); - fclose(inp); - - fprintf(outp, "unsigned char %s[] = {\n", name); - count = 0; - linec = 0; - komma = " "; - while (count != length) { - linec += fprintf(outp, "%s", komma); - if (linec > 75) { - fprintf(outp, "\n "); - linec = 1; - } - linec += fprintf(outp, "%d", *buffer); - komma = ","; - ++count; - ++buffer; - } - fprintf(outp, "\n};\n"); - fclose( outp); - return 0; -} diff --git a/thirdparty/grx249/src/utilprog/fnt2c.c b/thirdparty/grx249/src/utilprog/fnt2c.c deleted file mode 100644 index 1c03a8b..0000000 --- a/thirdparty/grx249/src/utilprog/fnt2c.c +++ /dev/null @@ -1,47 +0,0 @@ -/** - ** font2c.c ---- convert a font to C source code - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "grx20.h" - -int main(int argc,char **argv) -{ - GrFont *f; - if(argc < 4) { - fprintf( - stderr, - "%s: too few arguments\n" - "usage: font2c fontFile outputFile CfontSymbolName\n", - argv[0] - ); - return(1); - } - f = GrLoadFont(argv[1]); - if(!f) { - fprintf( - stderr, - "%s: could not load font \"%s\"\n", - argv[0], - argv[1] - ); - return(1); - } - GrDumpFont(f,argv[3],argv[2]); - return(0); -} - diff --git a/thirdparty/grx249/src/utilprog/fnt2text.c b/thirdparty/grx249/src/utilprog/fnt2text.c deleted file mode 100644 index 3faee87..0000000 --- a/thirdparty/grx249/src/utilprog/fnt2text.c +++ /dev/null @@ -1,56 +0,0 @@ -/** - ** font2txt.c ---- make an ASCII dump of a font - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "grx20.h" - -void dumpf(GrFont *f) -{ - int chr,wdt,hgt,xpos,ypos; - char far *bmp; - hgt = f->h.height; - for(chr = f->h.minchar; chr < (f->h.minchar + f->h.numchars); chr++) { - wdt = GrFontCharWidth(f,chr); - bmp = GrFontCharBitmap(f,chr); - printf("char '%c', code = 0x%04x\n",chr,chr); - for(ypos = 0; ypos < hgt; ypos++) { - for(xpos = 0; xpos < wdt; xpos++) { - putchar((bmp[xpos >> 3] & (0x80 >> (xpos & 7))) ? '#' : '.'); - } - putchar('\n'); - bmp += ((wdt + 7) >> 3); - } - putchar('\n'); - } -} - -int main() -{ - dumpf(GrLoadFont("pc8x16")); - dumpf(GrBuildConvertedFont( - &GrDefaultFont, - (GR_FONTCVT_SKIPCHARS | GR_FONTCVT_RESIZE | GR_FONTCVT_PROPORTION), - 10, - 20, - ' ', - 'z' - )); - return(0); -} - diff --git a/thirdparty/grx249/src/utilprog/lfbinfo.c b/thirdparty/grx249/src/utilprog/lfbinfo.c deleted file mode 100644 index 4a655dc..0000000 --- a/thirdparty/grx249/src/utilprog/lfbinfo.c +++ /dev/null @@ -1,76 +0,0 @@ -/** - ** lfbinfo.c ---- print linux framebuffer information - ** - ** Copyright (c) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include -#include -#include - -int main() -{ - struct fb_fix_screeninfo refix; - struct fb_var_screeninfo resul; - int fd; - char *fbname; - char *default_fbname = "/dev/fb0"; - - fbname = getenv( "FRAMEBUFFER" ); - if( fbname == NULL ) fbname = default_fbname; - fd = open( fbname,O_RDWR ); - if( fd == -1 ){ - printf( "can't open %s\n",fbname ); - return 1; - } - - printf( "Device file: %s\n",fbname ); - - printf( "Fixed data\n" ); - printf( "----------\n" ); - ioctl( fd,FBIOGET_FSCREENINFO,&refix ); - printf( "smem_start: %d\n",(int)refix.smem_start ); - printf( "smem_len: %d\n",(int)refix.smem_len ); - printf( "type: %d\n",(int)refix.type ); - printf( "type_aux: %d\n",(int)refix.type_aux ); - printf( "visual: %d\n",(int)refix.visual ); - printf( "xpanstep: %d ypanstep: %d ywrapstep: %d \n", - refix.xpanstep,refix.ypanstep,refix.ywrapstep ); - printf( "line_length: %d\n",(int)refix.line_length ); - printf( "mmio_start: %d\n",(int)refix.mmio_start ); - printf( "mmio_len: %d\n",(int)refix.mmio_len ); - printf( "accel: %d\n",(int)refix.accel ); - ioctl( fd,FBIOGET_VSCREENINFO,&resul ); - printf( "Variable data\n" ); - printf( "-------------\n" ); - printf( "xres: %d\n",(int)resul.xres ); - printf( "yres: %d\n",(int)resul.yres ); - printf( "xres_virtual: %d\n",(int)resul.xres_virtual ); - printf( "yres_virtual: %d\n",(int)resul.yres_virtual ); - printf( "xoffset: %d\n",(int)resul.xoffset ); - printf( "yoffset: %d\n",(int)resul.yoffset ); - printf( "bpp: %d\n",(int)resul.bits_per_pixel ); - printf( "red offset: %d length: %d msb_right: %d\n", - resul.red.offset,resul.red.length,resul.red.msb_right ); - printf( "green offset: %d length: %d msb_right: %d\n", - resul.green.offset,resul.green.length,resul.green.msb_right ); - printf( "blue offset: %d length: %d msb_right: %d\n", - resul.blue.offset,resul.blue.length,resul.blue.msb_right ); - printf( "transp offset: %d length: %d msb_right: %d\n", - resul.transp.offset,resul.transp.length,resul.transp.msb_right ); - return 0; -} diff --git a/thirdparty/grx249/src/utilprog/modetest.c b/thirdparty/grx249/src/utilprog/modetest.c deleted file mode 100644 index 0056722..0000000 --- a/thirdparty/grx249/src/utilprog/modetest.c +++ /dev/null @@ -1,235 +0,0 @@ -/** - ** modetest.c ---- test all available graphics modes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include -#include - -#include "grx20.h" -#include "grxkeys.h" - -#include "../../test/drawing.h" - -static void PrintInfo(void) -{ - char aux[81]; - int x, y; - - sprintf(aux, " Mode: %dx%d %d bpp ", GrCurrentVideoMode()->width, - GrCurrentVideoMode()->height, GrCurrentVideoMode()->bpp); - x = (GrMaxX() - - GrFontStringWidth(&GrDefaultFont, aux, strlen(aux), GR_BYTE_TEXT)) / 2; - y = (GrMaxY() - - GrFontStringHeight(&GrDefaultFont, aux, strlen(aux), GR_BYTE_TEXT)) / 2; - GrTextXY(x, y, aux, GrWhite(), GrBlack()); -} - -typedef struct { - int w,h,bpp; -} gvmode; - -gvmode grmodes[200]; -int nmodes = 0; - -gvmode *collectmodes(const GrVideoDriver *drv,gvmode *gp) -{ - GrFrameMode fm; - const GrVideoMode *mp; - for(fm =GR_firstGraphicsFrameMode; - fm <= GR_lastGraphicsFrameMode; fm++) { - for(mp = GrFirstVideoMode(fm); mp; mp = GrNextVideoMode(mp)) { - gp->w = mp->width; - gp->h = mp->height; - gp->bpp = mp->bpp; - gp++; - } - } - return(gp); -} - -int vmcmp(const void *m1,const void *m2) -{ - gvmode *md1 = (gvmode *)m1; - gvmode *md2 = (gvmode *)m2; - if(md1->bpp != md2->bpp) return(md1->bpp - md2->bpp); - if(md1->w != md2->w ) return(md1->w - md2->w ); - if(md1->h != md2->h ) return(md1->h - md2->h ); - return(0); -} - -#define LINES 18 -#define COLUMNS 80 -void ModeText(int i, int shrt,char *mdtxt) { - switch (shrt) { - case 2 : sprintf(mdtxt,"%2d) %dx%d ", i+1, grmodes[i].w, grmodes[i].h); - break; - case 1 : sprintf(mdtxt,"%2d) %4dx%-4d ", i+1, grmodes[i].w, grmodes[i].h); - break; - default: sprintf(mdtxt," %2d) %4dx%-4d ", i+1, grmodes[i].w, grmodes[i].h); - break; - } - mdtxt += strlen(mdtxt); - - if (grmodes[i].bpp > 20) - sprintf(mdtxt, "%ldM", 1L << (grmodes[i].bpp-20)); - else if (grmodes[i].bpp > 10) - sprintf(mdtxt, "%ldk", 1L << (grmodes[i].bpp-10)); - else - sprintf(mdtxt, "%ld", 1L << grmodes[i].bpp); - switch (shrt) { - case 2 : break; - case 1 : strcat(mdtxt, " col"); break; - default: strcat(mdtxt, " colors"); break; - } -} - -int ColsCheck(int cols, int ml, int sep) { - int len; - - len = ml * cols + (cols-1) * sep + 1; - return len <= COLUMNS; -} - -void PrintModes(void) { - char mdtxt[100]; - unsigned int maxlen; - int i, n, shrt, c, cols; - - cols = (nmodes+LINES-1) / LINES; - do { - for (shrt = 0; shrt <= 2; ++shrt) { - maxlen = 0; - for (i = 0; i < nmodes; ++i) { - ModeText(i,shrt,mdtxt); - if (strlen(mdtxt) > maxlen) maxlen = strlen(mdtxt); - } - n = 2; - if (cols>1 || shrt<2) { - if (!ColsCheck(cols, maxlen, n)) continue; - while (ColsCheck(cols, maxlen, n+1) && n < 4) ++n; - } - c = 0; - for (i = 0; i < nmodes; ++i) { - if (++c == cols) c = 0; - ModeText(i,shrt,mdtxt); - printf("%*s%s", (c ? -((int)(maxlen+n)) : -((int)maxlen)), mdtxt, (c ? "" : "\n") ); - } - if (!c) printf("\n"); - return; - } - --cols; - } while (1); -} - -int main(void) -{ - static int firstgr = 1; - GrSetDriver(NULL); - if(GrCurrentVideoDriver() == NULL) { - printf("No graphics driver found\n"); - exit(1); - } - for( ; ; ) { - int i,w,h,px,py; - char m1[41]; - nmodes = (int)(collectmodes(GrCurrentVideoDriver(),grmodes) - grmodes); - GrSetMode(GR_default_text); - if(nmodes == 0) { - printf("No graphics modes found\n"); - exit(1); - } - qsort(grmodes,nmodes,sizeof(grmodes[0]),vmcmp); - printf( - "Graphics driver: \"%s\"\n" - " graphics defaults: %dx%d %ld colors\n" - " text defaults: %dx%d %ld colors\n\n", - GrCurrentVideoDriver()->name, - GrDriverInfo->defgw, - GrDriverInfo->defgh, - (long)GrDriverInfo->defgc, - GrDriverInfo->deftw, - GrDriverInfo->defth, - (long)GrDriverInfo->deftc - ); - PrintModes(); - printf("\nEnter choice #, or anything else to quit> "); - fflush(stdout); - if(!fgets(m1,40,stdin) || - (sscanf(m1,"%d",&i) != 1) || (i < 1) || (i > nmodes)) { - exit(0); - } - if(firstgr) { - printf( - "When in graphics mode, press any key to return to menu.\n" - "Now press to continue..." - ); - fflush(stdout); - fgets(m1,40,stdin); - firstgr = 0; - } - i--; - GrSetMode( - GR_width_height_bpp_graphics, - grmodes[i].w, - grmodes[i].h, - grmodes[i].bpp - ); - if(grmodes[i].bpp<15) { - w = GrScreenX() >> 1; - h = GrScreenY() >> 1; - px = w + 5; - py = h + 5; - w -= 10; - h -= 10; - drawing( - 5,5,w,h, - GrBlack(), - GrWhite() - ); - drawing( - px,5,w,h, - GrAllocColor(255,0,0), - GrAllocColor(0,255,0) - ); - drawing( - 5,py,w,h, - GrAllocColor(0,0,255), - GrAllocColor(255,255,0) - ); - drawing( - px,py,w,h, - GrAllocColor(255,0,255), - GrAllocColor(0,255,255) - ); - } else { - int y,sx; - sx=GrScreenX()>>2; - for(y=0;ybit != 0) { - if(value & def->bit) { - if(prev) printf(" | "); - printf(def->name); - prev = 1; - } - def++; - } - if(!prev) printf("0"); - printf("\n"); -} - -void printinfo(VESAvgaInfoBlock *vgainfo) -{ - char far *sp = vgainfo->OEMstringPtr; - short far *mp = vgainfo->VideoModePtr; - - printf("VESASignature:\t\"%c%c%c%c\"\n", - vgainfo->VESAsignature[0], - vgainfo->VESAsignature[1], - vgainfo->VESAsignature[2], - vgainfo->VESAsignature[3] - ); - printf("VESAVersion:\t%d.%d\n", - VESA_VERSION_MAJOR(vgainfo->VESAversion), - VESA_VERSION_MINOR(vgainfo->VESAversion) - ); - printf("OEMStringPtr:\t\""); - while(*sp != '\0') putchar(*sp++); - printf("\"\nCapabilities:\t"), - printbits((int)vgainfo->Capabilities,capabilitiesbits); - printf("VideoModePtr:\t0x%08lx\n",(long)mp); - printf("Video Modes:\t"); - while(*mp != (short)(-1)) printf("0x%x ",(unsigned short)(*mp++)); - printf("\n"); - if(vgainfo->VESAversion >= VESA_VERSION(1,2)) { - printf("Memory Size:\t%d*64KBytes\n",vgainfo->MemorySize); - } - printf("\n"); - -} - -char *getmodelname(int model) -{ - static char temp[50]; - - if(model < 0) return(sprintf(temp,"Invalid model [%d]",model),temp); - if(model <= MODEL_DIRECT) return(memorymodels[model].name); - if(model <= 15) return(sprintf(temp,"VESA model [0x%02x]",model),temp); - return(sprintf(temp,"OEM model [%0x2x]",model),temp); -} - -void printmodeinfo(int mode,int version,VESAmodeInfoBlock *modeinfo) -{ - printf("Mode 0x%x is supported\n",mode); - printf(" ModeAttributes: "); - printbits(modeinfo->ModeAttributes,modeattrbits); - printf(" WinAAttributes: "); - printbits(modeinfo->WinAAttributes,winattrbits); - printf(" WinBAttributes: "); - printbits(modeinfo->WinBAttributes,winattrbits); - printf(" WinGranularity: %d\n",modeinfo->WinGranularity); - printf(" WinSize: %d\n",modeinfo->WinSize); - printf(" WinASegment: 0x%04x\n",(unsigned short)modeinfo->WinASegment); - printf(" WinBSegment: 0x%04x\n",(unsigned short)modeinfo->WinBSegment); - printf(" WinFuncPtr: 0x%08lx\n",(long)modeinfo->WinFuncPtr); - printf(" BytesPerScanLine: %d\n",modeinfo->BytesPerScanLine); - if(!(modeinfo->ModeAttributes & MODE_EXTINFO)) return; - printf(" XResolution: %d\n",modeinfo->XResolution); - printf(" YResolution: %d\n",modeinfo->YResolution); - printf(" XCharSize: %d\n",modeinfo->XCharSize); - printf(" YCharSize: %d\n",modeinfo->YCharSize); - printf(" NumberOfPlanes: %d\n",modeinfo->NumberOfPlanes); - printf(" BitsPerPixel: %d\n",modeinfo->BitsPerPixel); - printf(" NumberOfBanks: %d\n",modeinfo->NumberOfBanks); - printf(" MemoryModel: %d (%s)\n",modeinfo->MemoryModel,getmodelname(modeinfo->MemoryModel)); - printf(" BankSize: %d\n",modeinfo->BankSize); - printf(" NumImagePages %d\n",modeinfo->NumImagePages); - if(version < VESA_VERSION(1,2)) return; - printf(" RedMaskSize: %d\n",modeinfo->RedMaskSize); - printf(" RedMaskPos: %d\n",modeinfo->RedMaskPos); - printf(" GreenMaskSize: %d\n",modeinfo->GreenMaskSize); - printf(" GreenMaskPos: %d\n",modeinfo->GreenMaskPos); - printf(" BlueMaskSize: %d\n",modeinfo->BlueMaskSize); - printf(" BlueMaskPos: %d\n",modeinfo->BlueMaskPos); - printf(" ReservedMaskSize: %d\n",modeinfo->ReservedMaskSize); - printf(" ReservedMaskPos: %d\n",modeinfo->ReservedMaskPos); - printf(" DirectScreenMode: %d\n",modeinfo->DirectScreenMode); - if(version < VESA_VERSION(2,0)) return; - printf(" LinearFrameBuffer:0x%08lx\n", modeinfo->LinearFrameBuffer); - printf(" StartOffScreenMem:0x%08lx\n", modeinfo->StartOffScreenMem); - printf(" OffScreenMemSize: %d kb\n", modeinfo->OffScreenMemSize); -} - -#define PTR_ADD(p,o) ((void *) ((char*)(p)+(o)) ) - -void printpminfo(VESApmInfoBlock *pb) { - unsigned short *st = (unsigned short *) PTR_ADD(pb,pb->SubTable_off+VESApmInfoBlock_BASEOFF); - - printf("VESA bios includes protected mode support:\n"); - printf(" PM info table start:\t\t%04x:%04x\n", pb->RealMode_SEG, pb->RealMode_OFF); - printf(" PM info table length:\t\t0x%04x\n", pb->PhysicalLength); - printf(" set window offset:\t\t%04x (%04x:%04x)\n", pb->SetWindow_off, pb->RealMode_SEG, pb->RealMode_OFF+pb->SetWindow_off); - printf(" set display start offset:\t%04x (%04x:%04x)\n", pb->DisplStart_off, pb->RealMode_SEG, pb->RealMode_OFF+pb->DisplStart_off); - printf(" set primary palette offset:\t%04x (%04x:%04x)\n", pb->PPalette_off, pb->RealMode_SEG, pb->RealMode_OFF+pb->PPalette_off); - printf(" resource table offset:\t%04x (%04x:%04x)\n", pb->SubTable_off, pb->RealMode_SEG, pb->RealMode_OFF+pb->SubTable_off); - if (pb->SubTable_off != 0) { - int first; - printf(" required ports:\t\t"); - first = 1; - while (*st != 0xffff) { - printf("%s%04x", (first?"":", "), *st); - ++st; - } - printf("\n required memory areas:\t"); - first = 1; - while (*st != 0xffff) { - unsigned long start = *st++; - unsigned long end = *st++; - start <<= 4; - end += start; - printf("%s%06lx-%06lx", (first?"":", "), start, end-1); - } - printf("\n"); - } - printf("\n"); -} - -int main(void) -{ - VESApmInfoBlock *pb; - VESAvgaInfoBlock vb; - VESAmodeInfoBlock mb; - if(_GrViDrvVESAgetVGAinfo(&vb)) { - short far *mp = vb.VideoModePtr; - printinfo(&vb); - if((pb=_GrViDrvVESAgetPMinfo()) != NULL) - printpminfo(pb); - while(*mp != (short)(-1)) { - if(_GrViDrvVESAgetModeInfo(*mp,&mb)) { - printmodeinfo(*mp,vb.VESAversion,&mb); - } - else { - printf("Mode 0x%x IS NOT SUPPORTED!\n",*mp); - } - mp++; - } - } - else printf("VESA BIOS extensions not found\n"); - return 0; -} - - diff --git a/thirdparty/grx249/src/utils/bccarith.c b/thirdparty/grx249/src/utils/bccarith.c deleted file mode 100644 index 850af82..0000000 --- a/thirdparty/grx249/src/utils/bccarith.c +++ /dev/null @@ -1,189 +0,0 @@ -/** - ** bccarith.c ---- some common integer arithmetic functions - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Intel CPU specific support is provided for the Turbo C and GNU C. May - ** work with other compilers and CPU-s, but is not optimized for them. - ** - **/ - -#include "libgrx.h" -#include "arith.h" - -#ifdef __TURBOC__ -/* prototype for __emit__() */ -#include -#endif - -#ifdef _MSC_VER -#define __emit__(x) __asm{ __emit (x) } -#endif - -/* - * [i|u]mul32(x,y) - * multiply two int-s for a long result - */ -long _GR_imul32(int x, int y) { - _DX = (int)(x); - _AX = (int)(y); - __emit__((char)(0xf7)); /* imul dx */ - __emit__((char)(0xea)); - return (long)((void _seg *)_DX + (void near *)_AX); -} - -unsigned long _GR_umul32(int x, int y) { - _DX = (int)(x); - _AX = (int)(y); - __emit__((char)(0xf7)); /* mul dx */ - __emit__((char)(0xe2)); - return (unsigned long)((void _seg *)_DX + (void near *)_AX); -} - -/* - * umuladd32(x,y,z) - * multiply two int-s for a long result and add - */ -unsigned long _GR_umuladd32(unsigned x, unsigned y, unsigned z) { - _DX = x; - _AX = y; - _BX = z; - __emit__((char)(0xf7)); /* mul dx */ - __emit__((char)(0xe2)); - - __emit__((char)(0x01)); /* add ax,bx */ - __emit__((char)(0xd8)); - - __emit__((char)(0x83)); /* adc dx,0 */ - __emit__((char)(0xd2)); - __emit__((char)(0x00)); - return (unsigned long)((void _seg *)_DX + (void near *)_AX); -} - -/* - * [i|u]scale(X,N,D) - * scale an integer with long intermediate result but without using long - * arithmetic all the way - */ -int _GR_iscale(int x,int n,int d) { - _CX = (int)(d); - _DX = (int)(n); - _AX = (int)(x); - __emit__((char)(0xf7)); /* imul dx */ - __emit__((char)(0xea)); - __emit__((char)(0xf7)); /* idiv cx */ - __emit__((char)(0xf9)); - return (int)_AX; -} - -unsigned int _GR_uscale(int x,int n,int d) { - _CX = (int)(d); - _DX = (int)(n); - _AX = (int)(x); - __emit__((char)(0xf7)); /* mul dx */ - __emit__((char)(0xe2)); - __emit__((char)(0xf7)); /* div cx */ - __emit__((char)(0xf1)); - return (unsigned int)_AX; -} - -int _GR_irscale(int x, int n, int d) { - _AX = (int)(x<<1); - _CX = (int)(d); - _DX = (int)(n); - __emit__((char)(0xf7)); /* imul dx */ - __emit__((char)(0xea)); - __emit__((char)(0xf7)); /* idiv cx */ - __emit__((char)(0xf9)); - - _DX = _AX; - __emit__((char)(0x03)); /* add dx,dx */ - __emit__((char)(0xd2)); - __emit__((char)(0x1d)); /* sbc ax,0xffff */ - __emit__((char)(-1)); - __emit__((char)(-1)); - __emit__((char)(0xd1)); /* sar ax,1 */ - __emit__((char)(0xf8)); - - return (int)_AX; -} - -#if 0 -These are Csaba's inline macros. -The _?X register loading fails in some cases. - -#define imul32(X,Y) ( \ - _AX = (int)(X), \ - __emit__((char)(0x50)), /* push ax */ \ - _AX = (int)(Y), \ - __emit__((char)(0x5a)), /* pop dx */ \ - __emit__((char)(0xf7)), /* imul dx */ \ - __emit__((char)(0xea)), \ - _BX = _AX, \ - _CX = _DX, \ - (long)((void _seg *)_CX + (void near *)_BX) \ -) -#define umul32(X,Y) ( \ - _AX = (int)(X), \ - __emit__((char)(0x50)), /* push ax */ \ - _AX = (int)(Y), \ - __emit__((char)(0x5a)), /* pop dx */ \ - __emit__((char)(0xf7)), /* mul dx */ \ - __emit__((char)(0xe2)), \ - _BX = _AX, \ - _CX = _DX, \ - (unsigned long)((void _seg *)_CX + (void near *)_BX) \ -) - -#define iscale(X,N,D) ( \ - _AX = (int)(D), \ - __emit__((char)(0x50)), /* push ax */ \ - _AX = (int)(N), \ - __emit__((char)(0x50)), /* push ax */ \ - _AX = (int)(X), \ - __emit__((char)(0x5a)), /* pop dx */ \ - __emit__((char)(0x59)), /* pop cx */ \ - __emit__((char)(0xf7)), /* imul dx */ \ - __emit__((char)(0xea)), \ - __emit__((char)(0xf7)), /* idiv cx */ \ - __emit__((char)(0xf9)), \ - (int)_AX \ -) -#define uscale(X,N,D) ( \ - _AX = (int)(D), \ - __emit__((char)(0x50)), /* push ax */ \ - _AX = (int)(N), \ - __emit__((char)(0x50)), /* push ax */ \ - _AX = (int)(X), \ - __emit__((char)(0x5a)), /* pop dx */ \ - __emit__((char)(0x59)), /* pop cx */ \ - __emit__((char)(0xf7)), /* mul dx */ \ - __emit__((char)(0xe2)), \ - __emit__((char)(0xf7)), /* div cx */ \ - __emit__((char)(0xf1)), \ - (unsigned int)_AX \ -) -#define irscale(X,N,D) ( \ - _DX = iscale(((int)(X) << 1),N,D), \ - __emit__((char)(0x03)), /* add dx,dx */ \ - __emit__((char)(0xd2)), \ - __emit__((char)(0x1d)), /* sbc ax,0xffff */ \ - __emit__((char)(-1)), \ - __emit__((char)(-1)), \ - __emit__((char)(0xd1)), /* sar ax,1 */ \ - __emit__((char)(0xf8)), \ - (int)_AX \ -) - -#endif diff --git a/thirdparty/grx249/src/utils/bcccopy.c b/thirdparty/grx249/src/utils/bcccopy.c deleted file mode 100644 index c41c948..0000000 --- a/thirdparty/grx249/src/utils/bcccopy.c +++ /dev/null @@ -1,103 +0,0 @@ -/** - ** bcccopy.c ---- optimized BCC memory copy operations - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "mempeek.h" -#include "memcopy.h" - -#pragma inline -#pragma warn -rvl - -void far *_GR_fwdcopy_set(void near *ap, void far *d, void far *s, unsigned cnt) -{ - asm push ds - asm mov cx, cnt - asm mov ax, ap - asm les di, d - asm lds si, s - asm or cx,cx - asm jz short done - asm cld - asm test al,1 - asm jz short noalign - asm movsb - asm dec cx - asm jz short done - noalign: - asm shr cx, 1 - asm jz short noword - asm rep movsw - noword: - asm jnc short done - asm movsb - done: - asm mov dx, es - asm mov ax, di - asm pop ds -} - -#define COPYOPR(FN,INS) \ - void far * FN (void near *ap, void far *d, void far *s, unsigned cnt) \ - { \ - asm push ds ; \ - asm mov cx, cnt ; \ - asm mov ax, ap ; \ - asm les di, d ; \ - asm lds si, s ; \ - asm or cx,cx ; \ - asm jz short done ; \ - asm cld ; \ - asm test al,1 ; \ - asm jz short noalign ; \ - asm lodsb ; \ - asm INS es:[di], al ; \ - asm inc di ; \ - asm dec cx ; \ - asm jz short done ; \ - noalign: \ - asm shr cx, 1 ; \ - asm jz short noword ; \ - asm pushf ; \ - asm mov bx,2 ; \ - asm inc cx ; \ - asm shr cx, 1 ; \ - asm jnc short odd ; \ - loop: \ - asm lodsw ; \ - asm INS es:[di], ax ; \ - asm add di, bx ; \ - odd: \ - asm lodsw ; \ - asm INS es:[di], ax ; \ - asm add di, bx ; \ - asm dec cx ; \ - asm jnz short loop ; \ - asm popf ; \ - noword: \ - asm jnc short done ; \ - asm lodsb ; \ - asm INS es:[di], al ; \ - asm inc di ; \ - done: \ - asm mov dx, es ; \ - asm mov ax, di ; \ - asm pop ds ; \ - } - -COPYOPR(_GR_fwdcopy_xor,xor) -COPYOPR(_GR_fwdcopy_or,or) -COPYOPR(_GR_fwdcopy_and,and) diff --git a/thirdparty/grx249/src/utils/bccfil08.c b/thirdparty/grx249/src/utils/bccfil08.c deleted file mode 100644 index 321e719..0000000 --- a/thirdparty/grx249/src/utils/bccfil08.c +++ /dev/null @@ -1,126 +0,0 @@ -/** - ** bccfil08.c ---- optimized BCC memory fill operations (8bit) - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "mempeek.h" -#include "memfill.h" - -#pragma inline -#pragma warn -rvl - -#define COLFL(FN,INS) \ - void far * FN (void far *P, int O, unsigned char V, unsigned C) { \ - asm les di, P ; \ - asm mov cx, C ; \ - asm or cx,cx ; \ - asm jz short _##FN##3 ; \ - asm mov bx, O ; \ - asm mov al, V ; \ - asm inc cx ; \ - asm shr cx,1 ; \ - asm jnc short _##FN##2 ; \ - _##FN##1: \ - asm INS es:[di],al ; \ - asm add di,bx ; \ - _##FN##2: \ - asm INS es:[di],al ; \ - asm add di,bx ; \ - asm dec cx ; \ - asm jnz short _##FN##1 ; \ - _##FN##3: \ - asm mov dx,es ; \ - asm mov ax,di ; \ - } - -COLFL(_GR_colfill_b_mov,MOV_INS) -COLFL(_GR_colfill_b_xor,XOR_INS) -COLFL(_GR_colfill_b_or,OR_INS) -COLFL(_GR_colfill_b_and,AND_INS) - - -void far *_GR_repfill_b(void far *P,unsigned int V, unsigned int C) { - asm les di, P - asm mov cx, C - asm or cx,cx - asm jz short _rpfb3 - asm cld - asm mov ax, V - asm test di,1 - asm jz short _rpfb1 - asm stosb - asm dec cx - _rpfb1: - asm shr cx,1 - asm jz _rpfb2 - asm pushf - asm cld - asm rep stosw - asm popf - _rpfb2: - asm jnc _rpfb3 - asm stosb - _rpfb3: - asm mov dx,es - asm mov ax,di -} - -#define REPFB_OP(FN,INS) \ - void far * FN (void far *P,unsigned int V, unsigned int C) { \ - asm mov cx, C ; \ - asm push ds ; \ - asm lds di, P ; \ - asm or cx,cx ; \ - asm jz short _##FN##4 ; \ - asm cld ; \ - asm mov ax, V ; \ - asm test di,1 ; \ - asm jz short _##FN##1 ; \ - asm INS [di],al ; \ - asm inc di ; \ - asm dec cx ; \ - _##FN##1: \ - asm shr cx,1 ; \ - asm jz short _##FN##3 ; \ - asm pushf ; \ - asm inc cx ; \ - asm shr cx,1 ; \ - asm jnc short _##FN##5 ; \ - _##FN##2: \ - asm INS [di],ax ; \ - asm inc di ; \ - asm inc di ; \ - _##FN##5: \ - asm INS [di],ax ; \ - asm inc di ; \ - asm inc di ; \ - asm dec cx ; \ - asm jnz short _##FN##2 ; \ - asm popf ; \ - _##FN##3: \ - asm jnc _##FN##4 ; \ - asm INS [di],al ; \ - asm inc di ; \ - _##FN##4: \ - asm mov dx,ds ; \ - asm mov ax,di ; \ - asm pop ds ; \ - } - -REPFB_OP(_GR_repfill_b_xor,XOR_INS) -REPFB_OP(_GR_repfill_b_or,OR_INS) -REPFB_OP(_GR_repfill_b_and,AND_INS) - diff --git a/thirdparty/grx249/src/utils/bccfil16.c b/thirdparty/grx249/src/utils/bccfil16.c deleted file mode 100644 index b4e8005..0000000 --- a/thirdparty/grx249/src/utils/bccfil16.c +++ /dev/null @@ -1,52 +0,0 @@ -/** - ** bccfil16.c ---- BCC memory fill operations (16bit) - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "mempeek.h" -#include "memfill.h" - -#pragma inline -#pragma warn -rvl - -#define COLFL(FN,INS) \ - void far * FN (void far *P,int O, unsigned V, unsigned C) { \ - asm les di, P ; \ - asm mov cx, C ; \ - asm or cx,cx ; \ - asm jz short _##FN##3 ; \ - asm mov bx, O ; \ - asm mov ax, V ; \ - asm inc cx ; \ - asm shr cx,1 ; \ - asm jnc short _##FN##2 ; \ - _##FN##1: \ - asm INS es:[di],ax ; \ - asm add di,bx ; \ - _##FN##2: \ - asm INS es:[di],ax ; \ - asm add di,bx ; \ - asm dec cx ; \ - asm jnz short _##FN##1 ; \ - _##FN##3: \ - asm mov dx,es ; \ - asm mov ax,di ; \ - } - -COLFL(_GR_colfill_w_mov,MOV_INS) -COLFL(_GR_colfill_w_xor,XOR_INS) -COLFL(_GR_colfill_w_or,OR_INS) -COLFL(_GR_colfill_w_and,AND_INS) diff --git a/thirdparty/grx249/src/utils/bccfil24.c b/thirdparty/grx249/src/utils/bccfil24.c deleted file mode 100644 index 0d4757c..0000000 --- a/thirdparty/grx249/src/utils/bccfil24.c +++ /dev/null @@ -1,89 +0,0 @@ -/** - ** bccfil24.c ---- optimized BCC memory fill operations for 24bpp - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "mempeek.h" -#include "memfill.h" -#include "access24.h" - -#pragma inline -#pragma warn -rvl - -#define REPF24_OP(FN,INS) \ - void far * FN (void far *P,unsigned long V, unsigned int B) { \ - _CX = (unsigned)B; \ - _AX = (unsigned)(V); \ - _DL = RD24BYTE(V,2); \ - /* least sig byte: al, mid byte : ah, most sig byte : dl */ \ - asm push ds ; \ - asm lds di, P ; \ - asm or cx,cx ; \ - asm jz short _##FN##done ; \ - asm test di,1 ; \ - asm jz short _##FN##1 ; \ - asm INS [di],al ; \ - asm inc di ; \ - asm dec cx ; \ - asm xchg ah,al /* rotate dl/ah/al */ ; \ - asm xchg dl,ah ; \ - _##FN##1: \ - asm mov dh,al /* ax/dx/bx: 2 pix */ ; \ - asm mov bl,ah ; \ - asm mov bh,dl ; \ - asm mov si,6 ; \ - asm sub cx,si ; \ - asm jb short _##FN##3 ; \ - _##FN##2: \ - asm INS [di],ax ; \ - asm INS [di+2],dx ; \ - asm INS [di+4],bx ; \ - asm add di,si ; \ - asm sub cx,si ; \ - asm jnb short _##FN##2 ; \ - _##FN##3: \ - asm add cx,si ; \ - asm je short _##FN##done ; \ - /* 1..5 bytes left */ \ - asm INS [di],al ; \ - asm inc di ; \ - asm dec cx ; \ - asm je short _##FN##done ; \ - asm INS [di],ah ; \ - asm inc di ; \ - asm dec cx ; \ - asm je short _##FN##done ; \ - asm INS [di],dl ; \ - asm inc di ; \ - asm dec cx ; \ - asm je short _##FN##done ; \ - asm INS [di],dh ; \ - asm inc di ; \ - asm dec cx ; \ - asm je short _##FN##done ; \ - asm INS [di],bl ; \ - asm inc di ; \ - _##FN##done: \ - asm mov dx, ds ; \ - asm mov ax, di ; \ - asm pop ds ; \ - } - -REPF24_OP(_GR_repfill_24_set,MOV_INS) -REPF24_OP(_GR_repfill_24_xor,XOR_INS) -REPF24_OP(_GR_repfill_24_or,OR_INS) -REPF24_OP(_GR_repfill_24_and,AND_INS) - diff --git a/thirdparty/grx249/src/utils/bccfil32.c b/thirdparty/grx249/src/utils/bccfil32.c deleted file mode 100644 index 8560f0c..0000000 --- a/thirdparty/grx249/src/utils/bccfil32.c +++ /dev/null @@ -1,55 +0,0 @@ -/** - ** bccfil32.c ---- optimized BCC memory fill operations (32bit) - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "mempeek.h" -#include "memfill.h" - -#pragma inline -#pragma warn -rvl - -#define COLFL(FN,INS) \ - void far * FN (void far *P,int O, unsigned long V, unsigned C) { \ - asm les di, P ; \ - asm mov cx, C ; \ - asm or cx,cx ; \ - asm jz short _##FN##3 ; \ - asm mov bx, O ; \ - _DX = ((GR_int16u *)&V)[1]; \ - _AX = ((GR_int16u *)&V)[0]; \ - asm inc cx ; \ - asm shr cx,1 ; \ - asm jnc short _##FN##2 ; \ - _##FN##1: \ - asm INS es:[di],ax ; \ - asm INS es:[di+2],dx ; \ - asm add di,bx ; \ - _##FN##2: \ - asm INS es:[di],ax ; \ - asm INS es:[di+2],dx ; \ - asm add di,bx ; \ - asm dec cx ; \ - asm jnz short _##FN##1 ; \ - _##FN##3: \ - asm mov dx,es ; \ - asm mov ax,di ; \ - } - -COLFL(_GR_colfill_l_mov,MOV_INS) -COLFL(_GR_colfill_l_xor,XOR_INS) -COLFL(_GR_colfill_l_or,OR_INS) -COLFL(_GR_colfill_l_and,AND_INS) diff --git a/thirdparty/grx249/src/utils/dbgprint.c b/thirdparty/grx249/src/utils/dbgprint.c deleted file mode 100644 index 6d28d39..0000000 --- a/thirdparty/grx249/src/utils/dbgprint.c +++ /dev/null @@ -1,54 +0,0 @@ -/** - ** dbgprint.c ---- GRX debug support - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifdef DEBUG -#include -#include -#include - -#include "grxdebug.h" - -#ifndef DBG_LOGFILE -#define DBG_LOGFILE "grxdebug.log" -#endif - -char *_GR_debug_file; -int _GR_debug_line; -#ifdef __GNUC__ -char *_GR_debug_function; -# endif -int _GR_debug_flags = DEBUG-0; - -void _GR_debug_printf(char *fmt,...) -{ - FILE *dfp = NULL; - va_list ap; - dfp = fopen(DBG_LOGFILE,"at"); - if(!dfp) return; -#ifdef __GNUC__ - fprintf(dfp,"%s|%s|%d: ", - _GR_debug_file, _GR_debug_function, _GR_debug_line); -#else - fprintf(dfp,"%s/%d: ", _GR_debug_file, _GR_debug_line); -#endif - va_start(ap,fmt); - vfprintf(dfp,fmt,ap); - va_end(ap); - fclose(dfp); -} - -#endif diff --git a/thirdparty/grx249/src/utils/ordswap.c b/thirdparty/grx249/src/utils/ordswap.c deleted file mode 100644 index 14bf26a..0000000 --- a/thirdparty/grx249/src/utils/ordswap.c +++ /dev/null @@ -1,101 +0,0 @@ -/** - ** ordswap.c ---- multibyte value order swaping - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - - -#include "libgrx.h" -#include "mempeek.h" -#include "ordswap.h" - -#if 1 -#define SWAPBYTE(ty,mb,src,dst) (((ty)((GR_int8u)((mb) >> (8*(src)))) << (8*(dst)))) - -void _GR_swap16(GR_int16 far *w) { - GR_int16 res; - GRX_ENTER(); - res = SWAPBYTE(GR_int16,*w,1,0); - res |= SWAPBYTE(GR_int16,*w,0,1); - *w = res; - GRX_LEAVE(); -} - -void _GR_swap32(GR_int32 far *l) { - GR_int32 res; - GRX_ENTER(); - res = SWAPBYTE(GR_int32,*l,3,0); - res |= SWAPBYTE(GR_int16,*l,0,3); - res |= SWAPBYTE(GR_int16,*l,2,1); - res |= SWAPBYTE(GR_int16,*l,1,2); - *l = res; - GRX_LEAVE(); -} - -#ifdef GR_int64 - -void _GR_swap64(GR_int64 far *h) { - GR_int64 res; - GRX_ENTER(); - res = SWAPBYTE(GR_int64,*h,7,0); - res |= SWAPBYTE(GR_int64,*h,0,7); - res |= SWAPBYTE(GR_int64,*h,6,1); - res |= SWAPBYTE(GR_int64,*h,1,6); - res |= SWAPBYTE(GR_int64,*h,5,2); - res |= SWAPBYTE(GR_int64,*h,2,5); - res |= SWAPBYTE(GR_int64,*h,4,3); - res |= SWAPBYTE(GR_int64,*h,3,4); - *h = res; - GRX_LEAVE(); -} -#endif - -#else -static void swapbytes(GR_int8 far *b1, GR_int8 far *b2) { - GR_int8 b; - GRX_ENTER(); - b = peek_b(b1); - poke_b(b1, peek_b(b2)); - poke_b(b2, b); - GRX_LEAVE(); -} - -void _GR_swap16(GR_int16 far *w) { - GRX_ENTER(); - swapbytes((GR_int8 far *)w, ((GR_int8 far *)w)+1); - GRX_LEAVE(); -} - -void _GR_swap32(GR_int32 far *l) { - GRX_ENTER(); - swapbytes(((GR_int8 far *)l) , ((GR_int8 far *)l)+3); - swapbytes(((GR_int8 far *)l)+1, ((GR_int8 far *)l)+2); - GRX_LEAVE(); -} - -#ifdef GR_int64 - -void _GR_swap64(GR_int64 far *h) { - GRX_ENTER(); - swapbytes(((GR_int8 far *)h) , ((GR_int8 far *)h)+7); - swapbytes(((GR_int8 far *)h)+1, ((GR_int8 far *)h)+6); - swapbytes(((GR_int8 far *)h)+2, ((GR_int8 far *)h)+5); - swapbytes(((GR_int8 far *)h)+3, ((GR_int8 far *)h)+4); - GRX_LEAVE(); -} - -#endif - - -#endif diff --git a/thirdparty/grx249/src/utils/resize.c b/thirdparty/grx249/src/utils/resize.c deleted file mode 100644 index 5cff00e..0000000 --- a/thirdparty/grx249/src/utils/resize.c +++ /dev/null @@ -1,110 +0,0 @@ -/** - ** resize.c ---- function to resize a two-D map of gray (0..255) pixels - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include - -#include "libgrx.h" - -static void near shrink(unsigned char far *ptr,int pitch,unsigned int oldlen,unsigned int newlen) -{ - register unsigned char far *dst = ptr; - register unsigned char far *src = ptr; - int count = newlen; - unsigned int weight = newlen; - do { - unsigned int collect = oldlen; - unsigned int pixsum = 0; - do { - unsigned int factor; - if(weight == 0) weight = newlen,src += pitch; - if((factor = weight) > collect) factor = collect; - pixsum += factor * (*src); - weight -= factor; - collect -= factor; - } while(collect > 0); - *dst = pixsum / oldlen; - dst += pitch; - } while(--count > 0); -#ifdef DEBUG - if(dst != (ptr + (newlen * pitch))) { - fprintf(stderr,"resize: dst error (shrink)\n"); - exit(1); - } - if(src != (ptr + ((oldlen - 1) * pitch))) { - fprintf(stderr,"resize: src error (shrink)\n"); - exit(1); - } -#endif -} - -static void grow(unsigned char far *ptr,int pitch,unsigned int oldlen,unsigned int newlen) -{ - register unsigned char far *dst = ptr + (--newlen * pitch); - register unsigned char far *src = ptr + (--oldlen * pitch); - unsigned int rpix = *src; - unsigned int lpix = rpix; - int count = newlen; - int scale = oldlen; - do { - if((scale -= oldlen) < 0) { - rpix = lpix; - lpix = *(src -= pitch); - scale += newlen; - } - *dst = ((lpix * (newlen - scale)) + (rpix * scale)) / newlen; - dst -= pitch; - } while(--count >= 0); -#ifdef DEBUG - if(dst != (ptr - pitch)) { - fprintf(stderr,"resize: dst error (grow)\n"); - exit(1); - } - if(src != ptr) { - fprintf(stderr,"resize: src error (grow)\n"); - exit(1); - } -#endif -} - -void GrResizeGrayMap(unsigned char far *map,int pitch,int ow,int oh,int nw,int nh) -{ - if(ow != nw) { - unsigned char far *ptr = map; - int cnt = oh; - if((unsigned int)ow > (unsigned int)nw) do { - shrink(ptr,1,ow,nw); - ptr += pitch; - } while(--cnt > 0); - else do { - grow(ptr,1,ow,nw); - ptr += pitch; - } while(--cnt > 0); - } - if(oh != nh) { - int cnt = nw; - if((unsigned int)oh > (unsigned int)nh) do { - shrink(map,pitch,oh,nh); - map++; - } while(--cnt > 0); - else do { - grow(map,pitch,oh,nh); - map++; - } while(--cnt > 0); - } -} diff --git a/thirdparty/grx249/src/utils/shiftscl.c b/thirdparty/grx249/src/utils/shiftscl.c deleted file mode 100644 index f5224ed..0000000 --- a/thirdparty/grx249/src/utils/shiftscl.c +++ /dev/null @@ -1,142 +0,0 @@ -/** - ** shiftscl.c ---- shift and copy an array (scanline) - ** for 1bpp and 4bpp frame driver blit operations - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "highlow.h" - -#ifdef __TURBOC__ -#pragma inline -#endif - -void _GR_shift_scanline(GR_int8u far **dst, - GR_int8u far **src, - int ws, int shift, int planes) { - int plane; - - GRX_ENTER(); - if (shift <= 0) { - shift = -shift; - for (plane = 0; plane < planes; ++plane) { - GR_int8u far *s = *(src++) + ws; - GR_int8u far *d = *(dst++) + ws; -# if defined(__GNUC__) && defined(__i386__) - int _dummy_, w = ws; - /* sad but true: the x86 bytesex forces this inefficient code :( */ - asm volatile ("\n" - " movb (%0),%%ch \n" - " jmp 1f \n" - " .align 4,0x90 \n" - "1: decl %0 \n" - " movb %%ch,%%al \n" - " movb (%0),%%ah \n" - " movb %%ah,%%ch \n" - " shrl %%cl,%%eax \n" - " movb %%al,(%1) \n" - " decl %1 \n" - " decl %2 \n" - " jne 1b \n" - " shrb %%cl,%%ch \n" - " movb %%ch,(%1) " - : "=r" ((void *)s), "=r" ((void *)d), "=r" ((int)w), "=c" (_dummy_) - : "0" ((void *)s), "1" ((void *)d), "2" ((int)w), "3" ((int)shift) - : "ax" - ); -# elif defined(__TURBOC__) - asm push ds ; - asm mov bx, ws ; - asm mov cl, shift ; - asm les di, d ; - asm lds si, s ; - asm mov ch,[si] ; - asm std ; - looprv: - asm dec si ; - asm mov al, ch ; - asm mov ah, [si] ; - asm mov ch, ah ; - asm shr ax, cl ; - asm stosb ; - asm dec bx ; - asm jnz short looprv ; - asm mov al, ch ; - asm shr al, cl ; - asm stosb ; - asm pop ds ; -# else - int w = ws; - do { - --s; - *(d--) = highlowP(s)>>shift; - } while (--w); - *d = *s >> shift; -# endif - } - } else { - shift = 8-shift; - for (plane = 0; plane < planes; ++plane) { - GR_int8u far *s = *(src++); - GR_int8u far *d = *(dst++); -# if defined(__GNUC__) && defined(__i386__) - int _dummy_, w = ws; - asm volatile ("\n" - " movb (%0),%%ch \n" - " jmp 1f \n" - " .align 4,0x90 \n" - "1: incl %0 \n" - " movb %%ch,%%ah \n" - " movb (%0),%%al \n" - " movb %%al,%%ch \n" - " shrl %%cl,%%eax \n" - " movb %%al,(%1) \n" - " incl %1 \n" - " decl %2 \n" - " jne 1b " - : "=r" ((void *)s), "=r" ((void *)d), "=r" ((int)w), "=c" (_dummy_) - : "0" ((void *)s), "1" ((void *)d), "2" ((int)w), "3" ((int)shift) - : "ax" - ); -# elif defined(__TURBOC__) - asm push ds ; - asm mov bx, ws ; - asm mov cl, shift ; - asm les di, d ; - asm lds si, s ; - asm mov ch,[si] ; - asm cld ; - loopfw: - asm inc si ; - asm mov ah, ch ; - asm mov al, [si] ; - asm mov ch, al ; - asm shr ax, cl ; - asm stosb ; - asm dec bx ; - asm jnz short loopfw ; - asm pop ds ; -# else - int w = ws; - do { - *(d++) = highlowP(s)>>shift /* sh */; - s++; - } while (--w); -# endif - } - } - GRX_LEAVE(); -} - diff --git a/thirdparty/grx249/src/utils/strmatch.c b/thirdparty/grx249/src/utils/strmatch.c deleted file mode 100644 index 8b6337b..0000000 --- a/thirdparty/grx249/src/utils/strmatch.c +++ /dev/null @@ -1,131 +0,0 @@ -/** - ** strmatch.c ---- a string matcher. Similar to UNIX filename matching - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "libgrx.h" - -int GrMatchString(const char *pat,const char *str) -{ - int i,n,escape = FALSE; - union { - struct { const char *s; int l; } str[20]; - struct { unsigned char loc; unsigned char hic; } chr[50]; - } m; - for( ; ; ) { - if(*pat == '\0') { - return((*str == '\0') ? TRUE : FALSE); - } - if(!escape) switch(*pat) { - case '\\': - escape = TRUE; - pat++; - continue; - case '?': - if(*str == '\0') return(FALSE); - pat++; - str++; - continue; - case '*': - if(*(++pat) == '\0') { - return(TRUE); - } - while(*str != '\0') { - if(GrMatchString(pat,str)) return(TRUE); - str++; - } - return(FALSE); - case '[': - for(i = FALSE, n = 0; ; ) { - switch(*(++pat)) { - case '\0': - return(FALSE); - case '\\': - escape = TRUE; - continue; - case ']': - if(!escape) { - pat++; - break; - } - case '-': - if(!escape) { - i = TRUE; - continue; - } - default: - if(i && (n > 0)) { - m.chr[n - 1].hic = *pat; - } - else { - m.chr[n].loc = m.chr[n].hic = *pat; - n++; - } - i = escape = FALSE; - continue; - } - break; - } - for(i = 0; ; i++) { - if(i == n) return(FALSE); - if((unsigned char)(*str) < m.chr[i].loc) continue; - if((unsigned char)(*str) > m.chr[i].hic) continue; - str++; - break; - } - continue; - case '{': - for(m.str[n = i = 0].s = pat + 1; ; ) { - switch(*(++pat)) { - case '\0': - return(FALSE); - case '\\': - escape = TRUE; - continue; - case '}': - if(!escape) { - m.str[n++].l = i; - pat++; - break; - } - case ',': - if(!escape) { - m.str[n++].l = i; - m.str[n ].s = pat + 1; - i = 0; - continue; - } - default: - i++; - continue; - } - break; - } - for(i = 0; i < n; i++) { - if(strncmp(str,m.str[i].s,(size_t)m.str[i].l)!=0) continue; - if(GrMatchString(pat,&str[m.str[i].l]) == 0) continue; - return(TRUE); - } - return(FALSE); - } - if(*pat != *str) return(FALSE); - escape = FALSE; - pat++; - str++; - } -} - diff --git a/thirdparty/grx249/src/utils/tmpbuff.c b/thirdparty/grx249/src/utils/tmpbuff.c deleted file mode 100644 index 0d99ad3..0000000 --- a/thirdparty/grx249/src/utils/tmpbuff.c +++ /dev/null @@ -1,41 +0,0 @@ -/** - ** tmpbuff.c ---- temporary buffer support - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" - -void far *_GrTempBuffer = NULL; -unsigned _GrTempBufferBytes = 0; - -void far *_GrTempBufferAlloc_(size_t bytes) { - GRX_ENTER(); - if (bytes > _GrTempBufferBytes || _GrTempBuffer == NULL) { - void far *neu = farrealloc(_GrTempBuffer, bytes); - if (neu) { - _GrTempBuffer = neu; - _GrTempBufferBytes = bytes; - } - } - GRX_RETURN( (bytes<=_GrTempBufferBytes && _GrTempBuffer) - ? _GrTempBuffer : NULL); -} - -void _GrTempBufferFree(void) { - if (_GrTempBuffer) farfree(_GrTempBuffer); - _GrTempBuffer = NULL; - _GrTempBufferBytes = 0; -} diff --git a/thirdparty/grx249/src/utils/watcom32.c b/thirdparty/grx249/src/utils/watcom32.c deleted file mode 100644 index 9308f51..0000000 --- a/thirdparty/grx249/src/utils/watcom32.c +++ /dev/null @@ -1,62 +0,0 @@ -/** - ** watcom32.c ---- Watcom32 support functions - ** - ** Copyright (c) 1998 Hartmut Schirmer & Gary Sands - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "int86.h" -#include "memfill.h" - -void wc32_int10x(Int86Regs *iregp, int nSeg) { - static struct rminfo { - long EDI; - long ESI; - long EBP; - long reserved_by_system; - long EBX; - long EDX; - long ECX; - long EAX; - short flags; - short ES,DS,FS,GS,IP,CS,SP,SS; - } RMI; - _fmemset ( &RMI,0,sizeof(RMI) ); - RMI.EDI = IREG_DI(*iregp); - RMI.ESI = IREG_SI(*iregp); - RMI.EBX = IREG_BX(*iregp); - RMI.EDX = IREG_DX(*iregp); - RMI.ECX = IREG_CX(*iregp); - RMI.EAX = IREG_AX(*iregp); - /* RMI.ES = IREG_ES(iregp); */ - RMI.ES = nSeg; - RMI.DS = IREG_DS(*iregp); - sttzero(iregp); - IREG_AX(*iregp) = 0x300; - IREG_BL(*iregp) = 0x10; - IREG_BH(*iregp) = 0; - IREG_CX(*iregp) = 0; - IREG_ES(*iregp) = FP_SEG(&RMI); - IREG_EDI(*iregp) = FP_OFF(&RMI); - int386x( 0x31, &(iregp->Normal), &(iregp->Normal), &(iregp->Extended) ); - sttzero(iregp); - IREG_DI(*iregp) = RMI.EDI; - IREG_SI(*iregp) = RMI.ESI; - IREG_BX(*iregp) = RMI.EBX; - IREG_DX(*iregp) = RMI.EDX; - IREG_CX(*iregp) = RMI.ECX; - IREG_AX(*iregp) = RMI.EAX; - IREG_ES(*iregp) = RMI.ES; - IREG_DS(*iregp) = RMI.DS; -} diff --git a/thirdparty/grx249/src/utils/watmake.c b/thirdparty/grx249/src/utils/watmake.c deleted file mode 100644 index 771f438..0000000 --- a/thirdparty/grx249/src/utils/watmake.c +++ /dev/null @@ -1,246 +0,0 @@ -/** - ** watmake.c ---- generates makefile.wat from depend.dj2 - ** - ** Copyright (c) 1998 Hartmut Schirmer & Gary Sands - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* -** NOTE: The src/depend.dj2 file in the GRX v2.3 archive is -** a dummy file -- If you want to use this utility, run -** -** ...\SRC> make -f makefile.dj2 dep -** -** to create a real dependency file for DJGPP v2 -*/ - - -#include -#include -#include -#include - -#define DJGPP_DEP "depend.dj2" -#define WATC_MAKE "makefile.wat" - -#define DBGPRINT "dbgprint.obj" - -typedef struct _objs { - char *name; - struct _objs *next; -} OBJLIST; - -char *WatcomFiles[] = { - "utils\\watcom32", - NULL -}; - -char *IgnoredFiles[] = { - NULL -}; - -OBJLIST *objs = NULL; - -char *strgsave(char *s) { - int len = strlen(s); - char *ns = malloc(sizeof(char)*(len+1)); - assert(ns != NULL); - strcpy(ns,s); - return ns; -} - -void double_entry(char *name) { - fprintf(stderr, "object file %s multiple defined !\n", name); - exit(1); -} - -void add2objlist(OBJLIST **root, char *ns, char **ignore) { - OBJLIST *p, *q, *neu = NULL; - int scmp; - - if (ignore) { - while (*ignore) { - if (strcmp(*ignore, ns) == 0) return; - ++ignore; - } - } - neu = malloc(sizeof(OBJLIST)); - assert(neu != NULL); - neu->name = strgsave(ns); - neu->next = NULL; - if (*root == NULL) { - *root = neu; - return; - } else - scmp = strcmp(ns, (*root)->name); - if (scmp < 0) { - neu ->next = *root; - *root = neu; - return; - } - if (scmp == 0) double_entry(ns); - p = *root; - q = p->next; - while (q) { - scmp = strcmp(ns, q->name); - if (scmp < 0) { - neu->next = q; - p->next = neu; - return; - } - if (scmp == 0) double_entry(ns); - p = q; - q = q->next; - } - p->next = neu; -} - -void print_rule(FILE *makefile, char *n) { - char *cp; - - cp = strrchr(n, '\\'); - if (!cp) cp = n; else ++cp; - fprintf(makefile, ".\\%s.obj : .\\",cp); - cp = n; - if (strncmp("..\\",cp,3) == 0) { - cp += 3; - } else { - fprintf(makefile, "src\\"); - } - fprintf(makefile, "%s.c .AUTODEPEND\n", cp); - fprintf(makefile, "\t$(CC) $[@ $(CC_OPTS)\n\n"); -} - -int main(void) { - FILE *makefile, *depend; - OBJLIST *olp; - char *cp, **cpp; - int len, first, nlen; - - cpp = WatcomFiles; - while (*cpp) { - add2objlist(&objs, *cpp, NULL); - cpp++; - } - - depend = fopen(DJGPP_DEP, "rt"); - assert(depend != NULL); - while (!feof(depend)) { - char line[150]; - if (fgets(line, 150-4, depend) != line) break; - cp = strchr(line, ':'); - if (cp) { - *cp = '\0'; - cp = strrchr(line, '.'); - if (cp) - *cp = '\0'; - cp = strchr(line, '/'); - while (cp) { - *cp = '\\'; - cp = strchr(cp, '/'); - } - add2objlist(&objs, line, IgnoredFiles); - } - } - fclose(depend); - makefile = fopen(WATC_MAKE, "wt"); - assert(makefile != NULL); - fprintf(makefile, "!define BLANK \"\"\n\n" - "## Object Files\n"); - len = fprintf(makefile, "OBJS ="); - olp = objs; - while (olp != NULL) { - cp = strrchr(olp->name, '\\'); - if (!cp) cp = olp->name; else ++cp; - nlen = 3 + strlen(cp) + 4; - if (nlen+len > 75) { - fprintf(makefile, " &\n"); - len = 0; - } - len += fprintf(makefile, " .\\%s.obj", cp); - olp = olp->next; - } - fprintf(makefile, "\n"); - fprintf(makefile, "!ifdef DEBUG\n" - "OBJS += .\\" DBGPRINT "\n" - "!endif\n" - "OBJS += .AUTODEPEND\n\n"); - fprintf(makefile, "## implicit rules do not seem to work with wmake - it complains about\n"); - fprintf(makefile, "## no default action???\n"); - fprintf(makefile, ".c.obj:\n"); - fprintf(makefile, "\t$(CC) $[@ $(CC_OPTS)\n\n"); - fprintf(makefile, "## Rules\n"); - olp = objs; - while (olp != NULL) { - print_rule(makefile, olp->name); - olp = olp->next; - } - print_rule(makefile, DBGPRINT); - - fprintf(makefile, "## wat32mak.lb1 is a text file with the names of all the object files\n"); - fprintf(makefile, "## this gets around DOS command line length limit\n\n"); - fprintf(makefile, "$(GRXLIB) : $(OBJS)\n" - " %%create wat32mak.lb1\n"); - len = fprintf(makefile, "!ifneq BLANK \""); - olp = objs; - first = 1; - while (olp != NULL) { - cp = strrchr(olp->name, '\\'); - if (!cp) cp = olp->name; else ++cp; - if (!first) { - fprintf(makefile, " "); - ++len; - } - first = 0; - nlen = strlen(cp) + 4; - if (len+nlen > 75) { - fprintf(makefile, "&\n"); - len = 0; - } - len += fprintf(makefile, "%s.obj", cp); - olp = olp->next; - } - fprintf(makefile, "\"\n"); - len = fprintf(makefile, " @for %%i in ("); - olp = objs; - first = 1; - while (olp != NULL) { - cp = strrchr(olp->name, '\\'); - if (!cp) cp = olp->name; else ++cp; - if (!first) { - fprintf(makefile, " "); - ++len; - } - first = 0; - nlen = strlen(cp) + 4; - if (len+nlen > 75) { - fprintf(makefile, "&\n"); - len = 0; - } - len += fprintf(makefile, "%s.obj", cp); - olp = olp->next; - } - if (len > 40) fprintf(makefile, "&\n"); - fprintf(makefile, ") do @%%append wat32mak.lb1 +'%%i'\n"); - fprintf(makefile, "!endif\n"); - fprintf(makefile, "!ifdef DEBUG\n"); - fprintf(makefile, "@for %%i in (" DBGPRINT ") do @%%append wat32mak.lb1 +'%%i'\n"); - fprintf(makefile, "!endif\n"); - fprintf(makefile, "!ifneq BLANK \"\"\n"); - fprintf(makefile, " @for %%i in () do @%%append wat32mak.lb1 +'%%i'\n"); - fprintf(makefile, "!endif\n"); - fprintf(makefile, " $(LIB) $(LIB_OPTS) $(GRXLIB) @wat32mak.lb1\n"); - - fclose(makefile); - return 0; -} diff --git a/thirdparty/grx249/src/vdrivers/ati28800.c b/thirdparty/grx249/src/vdrivers/ati28800.c deleted file mode 100644 index b753f99..0000000 --- a/thirdparty/grx249/src/vdrivers/ati28800.c +++ /dev/null @@ -1,89 +0,0 @@ -/** - ** ati2880.c ---- ATI 28800 VGA (The SVGA part on MACH8, etc..) driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "ioport.h" -#include "memmode.h" - -static void setbank(int bk) -{ - outport_w(0x1ce,(((bk & 7) << 13) | ((bk & 7) << 9) | 0xb2)); -} - -static void setrwbanks(int rb,int wb) -{ - outport_w(0x1ce,(((rb & 7) << 13) | ((wb & 7) << 9) | 0xb2)); -} - -static GrVideoModeExt gr4ext = { - GR_frameSVGA4, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - _GrViDrvLoadColorVGA4 /* color loader */ -}; - -static GrVideoModeExt gr8ext = { - GR_frameSVGA8, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - GR_VMODEF_FAST_SVGA8, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - _GrViDrvLoadColorVGA8 /* color loader */ -}; - -static GrVideoMode modes[] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - { TRUE, 4, 132, 25, 0x23, 264, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 132, 28, 0x23, 264, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 132, 44, 0x33, 264, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 132, 50, 0x23, 264, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 800, 600, 0x54, 100, 0, &gr4ext }, - { TRUE, 4, 1024, 768, 0x55, 128, 0, &gr4ext }, - { TRUE, 8, 640, 480, 0x62, 640, 0, &gr8ext }, - { TRUE, 8, 800, 600, 0x63, 800, 0, &gr8ext } -}; - -GrVideoDriver _GrVideoDriverATI28800 = { - "ati28800", /* name */ - GR_VGA, /* adapter type */ - &_GrVideoDriverSTDVGA, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - NULL, /* detection routine */ - _GrViDrvInitEGAVGA, /* initialization routine */ - _GrViDrvResetEGAVGA, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/cl5426.c b/thirdparty/grx249/src/vdrivers/cl5426.c deleted file mode 100644 index 4fb894b..0000000 --- a/thirdparty/grx249/src/vdrivers/cl5426.c +++ /dev/null @@ -1,136 +0,0 @@ -/** - ** cl5426.c ---- Cirrus 5426 (or higher) driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "ioport.h" -#include "memmode.h" - -static void setbank(int bk) -{ - outport_w(0x3ce,((bk << 12) | 9)); -} - -static GrVideoModeExt gr4ext = { - GR_frameSVGA4, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - NULL, /* double bank set function */ - _GrViDrvLoadColorVGA4 /* color loader */ -}; - -static GrVideoModeExt gr8ext = { - GR_frameSVGA8, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - GR_VMODEF_FAST_SVGA8, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - NULL, /* double bank set function */ - _GrViDrvLoadColorVGA8 /* color loader */ -}; - -static GrVideoModeExt gr15ext = { - GR_frameSVGA16, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 5, 5, 5 }, /* color precisions */ - { 10, 5, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoModeExt gr16ext = { - GR_frameSVGA16, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 5, 6, 5 }, /* color precisions */ - { 11, 5, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoModeExt gr24ext = { - GR_frameSVGA24, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 8, 8, 8 }, /* color precisions */ - { 16, 8, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoMode modes[] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - { TRUE, 4, 132, 25, 0x14, 264, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 132, 28, 0x14, 264, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 132, 43, 0x54, 264, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 132, 50, 0x14, 264, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 800, 600, 0x102, 100, 0, &gr4ext }, - { TRUE, 4, 1024, 768, 0x104, 128, 0, &gr4ext }, - { TRUE, 4, 1280, 1024, 0x6c, 160, 0, &gr4ext /* ????? */ }, - { TRUE, 8, 640, 480, 0x101, 640, 0, &gr8ext }, - { TRUE, 8, 800, 600, 0x103, 800, 0, &gr8ext }, - { TRUE, 8, 1024, 768, 0x105, 1024, 0, &gr8ext }, - { TRUE, 15, 640, 480, 0x110, 1280, 0, &gr15ext }, - { TRUE, 15, 800, 600, 0x113, 1600, 0, &gr15ext }, - { TRUE, 16, 640, 480, 0x111, 1280, 0, &gr16ext }, - { TRUE, 16, 800, 600, 0x114, 1600, 0, &gr16ext }, - { TRUE, 24, 640, 480, 0x112, 2048, 0, &gr24ext } -}; - -GrVideoDriver _GrVideoDriverCL5426 = { - "cl5426", /* name */ - GR_VGA, /* adapter type */ - &_GrVideoDriverSTDVGA, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - NULL, /* detection routine */ - _GrViDrvInitEGAVGA, /* initialization routine */ - _GrViDrvResetEGAVGA, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/et4000.c b/thirdparty/grx249/src/vdrivers/et4000.c deleted file mode 100644 index c8c382e..0000000 --- a/thirdparty/grx249/src/vdrivers/et4000.c +++ /dev/null @@ -1,222 +0,0 @@ -/** - ** et400.cC ---- Tseng ET4000 video driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Christian Domp (alma.student.uni-kl.de) - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "int86.h" -#include "ioport.h" -#include "memfill.h" - -static void setbank(int bk) -{ - outport_b(0x3cd,((bk & 15) | ((bk & 15) << 4))); -} - -static void setrwbanks(int rb,int wb) -{ - outport_b(0x3cd,((wb & 15) | ((rb & 15) << 4))); -} - -static GrVideoModeExt gr4ext = { - GR_frameSVGA4, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - _GrViDrvLoadColorVGA4 /* color loader */ -}; - -static GrVideoModeExt gr8ext = { - GR_frameSVGA8, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - GR_VMODEF_FAST_SVGA8, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - _GrViDrvLoadColorVGA8 /* color loader */ -}; - -static int setmode15(GrVideoMode *mp,int noclear) -{ - if(_GrViDrvSetEGAVGAmode(mp,noclear)) { - Int86Regs r; - sttzero(&r); - IREG_AX(r) = 0x10f0; - IREG_BX(r) = mp->mode; - int10(&r); - if(IREG_AX(r) == 0x10) return(TRUE); - } - return(FALSE); -} - -static GrVideoModeExt gr15ext = { - GR_frameSVGA16, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 5, 5, 5 }, /* color precisions */ - { 10, 5, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - setmode15, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - NULL /* color loader */ -}; - -static int setmode16(GrVideoMode *mp,int noclear) -{ - if(setmode15(mp,noclear)) { /* set 15-bit mode */ - Int86Regs r; - sttzero(&r); - IREG_AX(r) = 0x10f2; - IREG_BX(r) = 2; - int10(&r); /* switch to 16-bit mode */ - if(IREG_AX(r) == 0x10) return(TRUE); - } - return(FALSE); -} - -static GrVideoModeExt gr16ext = { - GR_frameSVGA16, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 5, 6, 5 }, /* color precisions */ - { 11, 5, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - setmode16, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - NULL /* color loader */ -}; - -static int setmode24(GrVideoMode *mp,int noclear) -{ - if(_GrViDrvSetEGAVGAmode(mp,noclear)) { - Int86Regs r; - sttzero(&r); - IREG_AX(r) = 0x10f0; - IREG_BX(r) = (mp->mode<<8)|0xff; - int10(&r); - if(IREG_AX(r) == 0x10) return(TRUE); - } - return(FALSE); -} - -static GrVideoModeExt gr24ext = { - GR_frameSVGA24, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 8, 8, 8 }, /* color precisions */ - { 16, 8, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - setmode24, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoMode modes[] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - { TRUE, 4, 80, 60, 0x26, 160, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 100, 40, 0x2a, 200, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 132, 25, 0x23, 264, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 132, 28, 0x24, 264, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 132, 44, 0x22, 264, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 132, 50, 0x61, 264, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 132, 60, 0x21, 264, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 800, 600, 0x29, 100, 0, &gr4ext }, - { TRUE, 4, 1024, 768, 0x37, 128, 0, &gr4ext }, - { TRUE, 4, 1280, 1024, 0x3d, 160, 0, &gr4ext }, - { TRUE, 8, 640, 350, 0x2d, 640, 0, &gr8ext }, - { TRUE, 8, 640, 400, 0x2f, 640, 0, &gr8ext }, - { TRUE, 8, 640, 480, 0x2e, 640, 0, &gr8ext }, - { TRUE, 8, 800, 600, 0x30, 800, 0, &gr8ext }, - { TRUE, 8, 1024, 768, 0x38, 1024, 0, &gr8ext }, - { FALSE, 15, 320, 200, 0x13, 640, 0, &gr15ext }, - { FALSE, 15, 640, 350, 0x2d, 1280, 0, &gr15ext }, - { FALSE, 15, 640, 400, 0x2f, 1280, 0, &gr15ext }, - { FALSE, 15, 640, 480, 0x2e, 1280, 0, &gr15ext }, - { FALSE, 15, 800, 600, 0x30, 1600, 0, &gr15ext }, - { FALSE, 16, 320, 200, 0x13, 640, 0, &gr16ext }, - { FALSE, 16, 640, 350, 0x2d, 1280, 0, &gr16ext }, - { FALSE, 16, 640, 400, 0x2f, 1280, 0, &gr16ext }, - { FALSE, 16, 640, 480, 0x2e, 1280, 0, &gr16ext }, - { FALSE, 16, 800, 600, 0x30, 1600, 0, &gr16ext }, - { FALSE, 24, 640, 350, 0x2d, 1920, 0, &gr24ext }, - { FALSE, 24, 640, 400, 0x2f, 1920, 0, &gr24ext }, - { FALSE, 24, 640, 480, 0x2e, 1920, 0, &gr24ext } -}; - -static int init(char *options) -{ - if(_GrViDrvInitEGAVGA(options)) { - Int86Regs r; - sttzero(&r); - IREG_AX(r) = 0x10f1; - int10(&r); - if((IREG_AX(r) == 0x10) && (IREG_BX(r) >= 1)) { - GrVideoMode *mp = &modes[itemsof(modes)]; - while(--mp >= modes) { - switch(mp->bpp) { - case 24: - if(IREG_BX(r) < 3) break; - case 16: - if(IREG_BX(r) < 2) break; - case 15: - mp->present = TRUE; - } - } - } - return(TRUE); - } - return(FALSE); -} - -GrVideoDriver _GrVideoDriverET4000 = { - "et4000", /* name */ - GR_VGA, /* adapter type */ - &_GrVideoDriverSTDVGA, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - NULL, /* detection routine */ - init, /* initialization routine */ - _GrViDrvResetEGAVGA, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/herc.c b/thirdparty/grx249/src/vdrivers/herc.c deleted file mode 100644 index da8e9c0..0000000 --- a/thirdparty/grx249/src/vdrivers/herc.c +++ /dev/null @@ -1,194 +0,0 @@ -/** - ** herc.c ---- Hercules video driver - ** - ** Author: Ulrich Leodolter - ** E-mail: ulrich@lab1.psy.univie.ac.at - ** Date: Tue Nov 14 15:55:56 1995 - ** Comment: Driver code partly from X11R6/XFree86 (see below) - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* $XFree86: xc/programs/Xserver/hw/xfree86/mono/drivers/hercules/hercules.c,v 3.2 1994/09/23 10:18:52 dawes Exp $ */ -/* - * MONO: Driver family for interlaced and banked monochrome video adaptors - * Pascal Haible 8/93, 3/94, 4/94 haible@IZFM.Uni-Stuttgart.DE - * - * mono/drivers/hercules - * - * original: - * hga2/drivers/hga6845.c - * - * Author: Davor Matic, dmatic@athena.mit.edu - * - * heavily edited for R6 by - * Pascal Haible 4/94 haible@IZFM.Uni-Stuttgart.DE - * - */ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "int86.h" -#include "ioport.h" -#include "memfill.h" - -/* - * Define the generic HGA I/O Ports - */ -#define HGA_INDEX 0x3B4 -#define HGA_DATA 0x3B5 -#define HGA_MODE 0x3B8 -#define HGA_STATUS 0x3BA -#define HGA_CONFIG 0x3BF - -/* - * Since the conf and mode registers are write only, we need to keep - * a local copy of the state here. The initial state is assumed to be: - * conf: enable setting of graphics mode, and disable page one - * (allows coexistence with a color graphics board) - * mode: text, deactivate screen, enable text blink, and page zero at 0xB0000 - */ -static unsigned char static_config = 0x01; -static unsigned char static_mode = 0x20; - -/* - * Since the table of 6845 registers is write only, we need to keep - * a local copy of the state here. The initial state is assumed to - * be 80x25 text mode. - */ -static unsigned char - static_tbl[] = {0x61, 0x50, 0x52, 0x0F, 0x19, 0x06, 0x19, 0x19, - 0x02, 0x0D, 0x0B, 0x0C, 0x00, 0x00, 0x00, 0x28}; - -static unsigned char init_config = 0x03; -static unsigned char init_mode = 0x0A; -static unsigned char /* 720x348 graphics mode parameters */ - init_tbl[] = {0x35, 0x2D, 0x2E, 0x07, 0x5B, 0x02, 0x57, 0x57, - 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A}; -/* - * Video ram size in Kbytes - */ -static int videoRam = 64; - -static int setmode(GrVideoMode *mp,int noclear) -{ - int i; - - if (noclear == FALSE) { - long far *p; - long far *q; - - p = (long far *)LINP_PTR(mp->extinfo->frame); - q = p + (videoRam * 1024) / sizeof(*p); - setup_far_selector (LINP_SEL(mp->extinfo->frame)); - for (; p < q; p++) poke_l_f(p,0L); - } - outport_b (HGA_CONFIG, static_config = init_config); - outport_b (HGA_MODE, static_mode = init_mode); - for (i = 0; i < 16; i++) { - outport_b (HGA_INDEX, i); - outport_b (HGA_DATA, static_tbl[i] = init_tbl[i]); - } - return(TRUE); -} - -static void setbank(int bk) -{ -} - -static void setrwbanks(int rb,int wb) -{ -} - -static void loadcolor (int c,int r,int g,int b) -{ -} - -static GrVideoModeExt grherc1ext = { - GR_frameHERC1, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xb000,0), /* frame buffer address */ - { 1, 1, 1 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - loadcolor, /* color loader */ -}; - -static GrVideoMode modes[] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - { TRUE, 1, 80, 25, 0x07, 160, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 1, 720, 348, 0x00, 92, 0, &grherc1ext } -}; - -static int detect (void) -{ -#define DSP_VSYNC_MASK 0x80 -#define DSP_ID_MASK 0x70 - unsigned char dsp, dsp_old; - int i, cnt; - - /* - * Checks if there is a HGA 6845 based bard in the system. - * The following loop tries to see if the Hercules display - * status port register is counting vertical syncs (50Hz). - */ - cnt = 0; - dsp_old = inport_b(HGA_STATUS) & DSP_VSYNC_MASK; - for (i = 0; i < 0x100; i++) { - int j; - for(j = 0; j < 0x100; j++) { - dsp = inport_b(HGA_STATUS) & DSP_VSYNC_MASK; - if (dsp != dsp_old) - cnt++; - dsp_old = dsp; - } - } - - /* If there are active sync changes, we found a Hercules board. */ - if (cnt) { - videoRam = 64; - - /* The Plus and InColor versions have an ID code as well. */ - dsp = inport_b(HGA_STATUS) & DSP_ID_MASK; - switch(dsp) { - case 0x10: /* Plus */ - videoRam = 64; - break; - case 0x50: /* InColor */ - videoRam = 256; - break; - } - } else { /* there is no hga card */ - return(FALSE); - } - return(TRUE); -} - -GrVideoDriver _GrVideoDriverHERC = { - "herc", /* name */ - GR_HERC, /* adapter type */ - NULL, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - detect, /* detection routine */ - NULL, /* initialization routine */ - _GrViDrvResetEGAVGA, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/mach64.c b/thirdparty/grx249/src/vdrivers/mach64.c deleted file mode 100644 index 3e947e2..0000000 --- a/thirdparty/grx249/src/vdrivers/mach64.c +++ /dev/null @@ -1,172 +0,0 @@ -/** - ** mach64.c ---- ATI MACH64 driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "highlow.h" -#include "ioport.h" -#include "memmode.h" - -static void setbank(int bk) -{ - register unsigned b1; - if(inport_b(0x6aec) & 4) { - bk <<= 1; - b1 = bk+1; - outport_b(0x56ec,bk); - outport_b(0x56ee,b1); - outport_b(0x5aec,bk); - outport_b(0x5aee,b1); - } else { - b1 = (GR_int16u)(bk&7); - b1 = ( ((b1<<4)+b1) << 9) + 0xb2; - outport_w(0x1ce,b1); - } -} - -static void setrwbanks(int rb,int wb) -{ - if(inport_b(0x6aec) & 4) { - wb <<= 1; - outport_b(0x56ec,(wb + 0)); - outport_b(0x56ee,(wb + 1)); - rb <<= 1; - outport_b(0x5aec,(rb + 0)); - outport_b(0x5aee,(rb + 1)); - } else { - register unsigned b = ((((rb&7) << 4) + (wb&7)) << 9) + 0xb2; - outport_w(0x1ce,b); - } -} - -static GrVideoModeExt gr4ext = { - GR_frameSVGA4, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - _GrViDrvLoadColorVGA4 /* color loader */ -}; - -static GrVideoModeExt gr8ext = { - GR_frameSVGA8, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - GR_VMODEF_FAST_SVGA8, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - _GrViDrvLoadColorVGA8 /* color loader */ -}; - -static GrVideoModeExt gr15ext = { - GR_frameSVGA16, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 5, 5, 5 }, /* color precisions */ - { 10, 5, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoModeExt gr16ext = { - GR_frameSVGA16, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 5, 6, 5 }, /* color precisions */ - { 11, 5, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoModeExt gr24ext = { - GR_frameSVGA24, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 8, 8, 8 }, /* color precisions */ - { 16, 8, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoMode modes[] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - { TRUE, 4, 100, 25, 0x21, 200, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 100, 28, 0x21, 200, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 100, 30, 0x22, 200, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 100, 34, 0x22, 200, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 100, 50, 0x21, 200, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 132, 25, 0x23, 264, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 132, 28, 0x23, 264, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 132, 44, 0x33, 264, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 132, 50, 0x23, 264, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 800, 600, 0x102, 100, 0, &gr4ext }, - { TRUE, 4, 1024, 768, 0x104, 128, 0, &gr4ext }, - { TRUE, 8, 640, 480, 0x101, 640, 0, &gr8ext }, - { TRUE, 8, 800, 600, 0x103, 800, 0, &gr8ext }, - { TRUE, 8, 1024, 768, 0x105, 1024, 0, &gr8ext }, - { TRUE, 8, 1280, 1024, 0x107, 1280, 0, &gr8ext }, - { TRUE, 15, 640, 480, 0x110, 1280, 0, &gr15ext }, - { TRUE, 15, 800, 600, 0x113, 1600, 0, &gr15ext }, - { TRUE, 15, 1024, 768, 0x116, 2048, 0, &gr15ext }, - { TRUE, 16, 640, 480, 0x111, 1280, 0, &gr16ext }, - { TRUE, 16, 800, 600, 0x114, 1600, 0, &gr16ext }, - { TRUE, 16, 1024, 768, 0x117, 2048, 0, &gr16ext }, - { TRUE, 24, 640, 480, 0x112, 1920, 0, &gr24ext }, - { TRUE, 24, 800, 600, 0x115, 2400, 0, &gr24ext } -}; - -GrVideoDriver _GrVideoDriverMACH64 = { - "mach64", /* name */ - GR_VGA, /* adapter type */ - &_GrVideoDriverSTDVGA, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - NULL, /* detection routine */ - _GrViDrvInitEGAVGA, /* initialization routine */ - _GrViDrvResetEGAVGA, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/s3.c b/thirdparty/grx249/src/vdrivers/s3.c deleted file mode 100644 index 5c1407c..0000000 --- a/thirdparty/grx249/src/vdrivers/s3.c +++ /dev/null @@ -1,197 +0,0 @@ -/** - ** s3.c ---- the GRX 2.0 S3 driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - **/ - -#include - -#include "libgrx.h" -#include "grdriver.h" -#include "memcopy.h" -#include "ioport.h" -#include "highlow.h" - -extern int _GrVidDrvVESAbanksft; - -/* -------------------------------------------------------------------- */ -/* direct register access banking. Adopted from code written by Finn */ -/* Thoegersen (finth@datashopper.dk) and taken from whatvga v2.20 */ - -#define CRTC 0x3d4 - -#define WriteIndexed(pt,inx,val) outport_w((pt),highlow((val),(inx))) - -#ifdef __GNUC__ -/* read register PT index INX */ -#define ReadIndexed(pt,inx) ({ \ - outport_b((pt),(inx)); \ - (unsigned char) inport_b((pt)+1); \ -}) -#else -static INLINE -unsigned char ReadIndexed(unsigned short pt, unsigned char inx) { - /* read register PT index INX */ - outport_b(pt,inx); - return (unsigned char) inport_b(pt+1); -} -#endif - -/* In register PT index INX sets the bits set in VAL */ -#define SetIndexed(pt,inx,val) do { \ - register unsigned char _temp_val_ = ReadIndexed((pt),(inx)); \ - _temp_val_ |= (val); \ - WriteIndexed((pt), (inx), _temp_val_); \ - } while (0) - -/* In register PT index INX sets -** the bits in MASK as in NWV the other are left unchanged */ -#define ModifyIndexed(pt,inx,mask,nwv) do { \ - register unsigned char _temp_val_ = ReadIndexed((pt),(inx)); \ - _temp_val_ = (_temp_val_ & ~(mask)) | ( (nwv) & (mask) ); \ - WriteIndexed((pt), (inx), _temp_val_); \ - } while (0) - -static int TestIndexed(unsigned short pt, unsigned char rg, unsigned char msk) -{ /* Returns TRUE if the bits in MSK of register PT index RG are read/writable */ - unsigned char old,nw1,nw2; - - old = ReadIndexed(pt,rg); - WriteIndexed(pt,rg,old & ~msk); - nw1 = ReadIndexed(pt,rg) & msk; - WriteIndexed(pt,rg,old | msk); - nw2 = ReadIndexed(pt,rg) & msk; - WriteIndexed(pt,rg,old); - return (nw1==0) && (nw2==msk); -} - -static unsigned char s3_revision(void) { - unsigned char res = 0; - WriteIndexed(CRTC,0x38,0); - if (!TestIndexed(CRTC,0x35,0x0F)) { - WriteIndexed(CRTC,0x38,0x48); - if (TestIndexed(CRTC,0x35,0x0F)) { - res = ReadIndexed(CRTC,0x30); - } - } - return res; -} - -typedef void (*BANKINGFUNC)(int bk); - -/* no shift required */ -static void setbank_864_0(int bk) { - WriteIndexed(CRTC,0x39,0xA5); - WriteIndexed(CRTC,0x6A, bk); - WriteIndexed(CRTC,0x39,0x5A); -} -/* general bank shift */ -static void setbank_864(int bk) { - WriteIndexed(CRTC,0x39,0xA5); - bk <<= _GrVidDrvVESAbanksft; - WriteIndexed(CRTC,0x6A, bk); - WriteIndexed(CRTC,0x39,0x5A); -} - -static void setbank_801_0(int bk) { - WriteIndexed(CRTC,0x39,0xA5); - WriteIndexed(CRTC,0x38,0x48); - /* SetIndexed(CRTC,0x31,9); memory interface should be set by bios */ - ModifyIndexed(CRTC,0x35,0x0F,bk); - ModifyIndexed(CRTC,0x51,0x0C,bk>>2); - WriteIndexed(CRTC,0x38,0); - WriteIndexed(CRTC,0x39,0x5A); -} -static void setbank_801(int bk) { - WriteIndexed(CRTC,0x39,0xA5); - WriteIndexed(CRTC,0x38,0x48); - /* SetIndexed(CRTC,0x31,9); memory interface should be set by bios */ - bk <<= _GrVidDrvVESAbanksft; - ModifyIndexed(CRTC,0x35,0x0F,bk); - ModifyIndexed(CRTC,0x51,0x0C,bk>>2); - WriteIndexed(CRTC,0x38,0); - WriteIndexed(CRTC,0x39,0x5A); -} - -static void setbank_911_0(int bk) { - WriteIndexed(CRTC,0x39,0xA5); - WriteIndexed(CRTC,0x38,0x48); - /* SetIndexed(CRTC,0x31,9); memory interface should be set by bios */ - bk <<= _GrVidDrvVESAbanksft; - ModifyIndexed(CRTC,0x35,0x0F, bk); - WriteIndexed(CRTC,0x38,0); - WriteIndexed(CRTC,0x39,0x5A); -} -static void setbank_911(int bk) { - WriteIndexed(CRTC,0x39,0xA5); - WriteIndexed(CRTC,0x38,0x48); - /* SetIndexed(CRTC,0x31,9); memory interface should be set by bios */ - bk <<= _GrVidDrvVESAbanksft; - ModifyIndexed(CRTC,0x35,0x0F, bk); - WriteIndexed(CRTC,0x38,0); - WriteIndexed(CRTC,0x39,0x5A); -} - -static BANKINGFUNC banktab[6] = { - /* _GrVidDrvVESAbanksft == 0 */ /* _GrVidDrvVESAbanksft != 0*/ - setbank_864_0, setbank_864, - setbank_801_0, setbank_801, - setbank_911_0, setbank_911 -}; - -static int init(char *options) { - int res, s3, i, bf; - - res = _GrVideoDriverVESA.init(options); - _GrVideoDriverS3.modes = _GrVideoDriverVESA.modes; - _GrVideoDriverS3.nmodes = _GrVideoDriverVESA.nmodes; - s3 = s3_revision(); - if (s3 >= 0xc0) bf = 0; /* 864 or newer */ else - if (s3 >= 0x90) bf = 2; /* 801 or newer */ else - if (s3 >= 0x80) bf = 4; /* 911 or newer */ else { - sttcopy(&_GrVideoDriverS3, &_GrVideoDriverVESA); - return res; - } - if (_GrVidDrvVESAbanksft) ++bf; - - /* step through all modes and select S3 banking */ - for (i=0; i < _GrVideoDriverS3.nmodes; ++i) { - GrVideoMode *mp = &_GrVideoDriverS3.modes[i]; - if (mp->bpp >= 8 && mp->extinfo) { - mp->extinfo->setbank = banktab[bf]; - mp->extinfo->setrwbanks = NULL; - } - } - return res; -} - -static void reset(void) { - _GrVideoDriverVESA.reset(); -} - -GrVideoDriver _GrVideoDriverS3 = { - "S3", /* name */ - GR_VGA, /* adapter type */ - &_GrVideoDriverSTDVGA, /* inherit modes from this driver */ - NULL, /* mode table */ - 0, /* # of modes */ - NULL, /* detection routine */ - init, /* initialization routine */ - reset, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; diff --git a/thirdparty/grx249/src/vdrivers/stdega.c b/thirdparty/grx249/src/vdrivers/stdega.c deleted file mode 100644 index 9a9949c..0000000 --- a/thirdparty/grx249/src/vdrivers/stdega.c +++ /dev/null @@ -1,94 +0,0 @@ -/** - ** stdega.c ---- the standard EGA driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "int86.h" -#include "memfill.h" - -void _GrViDrvLoadColorEGA4(int c,int r,int g,int b) -{ - Int86Regs rg; - sttzero(&rg); - IREG_AX(rg) = 0x1000; - IREG_BX(rg) = c & 0x0f; - IREG_BX(rg) |= ((r & 0x40) << 7) | ((r & 0x80) << 3); - IREG_BX(rg) |= ((g & 0x40) << 6) | ((g & 0x80) << 2); - IREG_BX(rg) |= ((b & 0x40) << 5) | ((b & 0x80) << 1); - int10(&rg); -} - -static GrVideoModeExt gr1ext = { - GR_frameEGAVGA1, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 1, 1, 1 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - _GrViDrvLoadColorEGA4 /* color loader */ -}; - -static GrVideoModeExt gr4ext = { - GR_frameEGA4, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 2, 2, 2 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - _GrViDrvLoadColorEGA4 /* color loader */ -}; - -static GrVideoMode modes[] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - { TRUE, 1, 80, 25, 0x07, 160, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 1, 80, 43, 0x07, 160, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 40, 25, 0x01, 80, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 80, 25, 0x03, 160, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 80, 43, 0x03, 160, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 1, 320, 200, 0x0d, 40, 0, &gr1ext }, - { TRUE, 1, 640, 200, 0x0e, 80, 0, &gr1ext }, - { TRUE, 1, 640, 350, 0x10, 80, 0, &gr1ext }, - { TRUE, 4, 320, 200, 0x0d, 40, 0, &gr4ext }, - { TRUE, 4, 640, 200, 0x0e, 80, 0, &gr4ext }, - { TRUE, 4, 640, 350, 0x10, 80, 0, &gr4ext } -}; - -GrVideoDriver _GrVideoDriverSTDEGA = { - "stdega", /* name */ - GR_EGA, /* adapter type */ - NULL, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - _GrViDrvDetectEGA, /* detection routine */ - _GrViDrvInitEGAVGA, /* initialization routine */ - _GrViDrvResetEGAVGA, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/stdvga.c b/thirdparty/grx249/src/vdrivers/stdvga.c deleted file mode 100644 index cebd336..0000000 --- a/thirdparty/grx249/src/vdrivers/stdvga.c +++ /dev/null @@ -1,350 +0,0 @@ -/** - ** stdvga.c ---- the standard VGA driver - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Christian Domp (alma.student.uni-kl.de) - **/ - -#include - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "int86.h" -#include "memfill.h" -#include "mempeek.h" -#include "ioport.h" - -/* so that GCC in its infinite wisdom does not optimize things away.. */ -static volatile unsigned char junk; - -static int DACshift = 2; - -void _GrViDrvSetDACshift(int shift) { - GRX_ENTER(); - DACshift = shift; - GRX_LEAVE(); -} - -void _GrViDrvLoadColorVGA8(int c,int r,int g,int b) { - GRX_ENTER(); - int_disable(); - outport_b(0x3c8,c); - junk += inport_b(0x80); - outport_b(0x3c9,((unsigned char)r >> DACshift)); - junk += inport_b(0x80); - outport_b(0x3c9,((unsigned char)g >> DACshift)); - junk += inport_b(0x80); - outport_b(0x3c9,((unsigned char)b >> DACshift)); - int_enable(); - GRX_LEAVE(); -} - -void _GrViDrvLoadColorVGA4(int c,int r,int g,int b) -{ - Int86Regs rg; - GRX_ENTER(); - sttzero(&rg); - IREG_AX(rg) = 0x1000; - IREG_BX(rg) = (c & 0x0f) | ((c & 0x0f) << 8); - int10(&rg); - _GrViDrvLoadColorVGA8(c,r,g,b); - GRX_LEAVE(); -} - -static GrVideoModeExt gr1ext = { - GR_frameEGAVGA1, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 1, 1, 1 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - _GrViDrvLoadColorVGA4 /* color loader */ -}; - -static GrVideoModeExt gr4ext = { - GR_frameSVGA4, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - _GrViDrvLoadColorVGA4 /* color loader */ -}; - -static GrVideoModeExt gr8ext = { - GR_frameSVGA8, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - _GrViDrvVESAsetVirtualSize, /* virtual size set */ - _GrViDrvVESAvirtualScroll, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - _GrViDrvLoadColorVGA8 /* color loader */ -}; - -/* ==== tweaked planar 256 color graphics modes (MODE X) ==== */ - -static struct xtweakdef { - unsigned char miscreg; - unsigned char crtc_regs[24]; -} xtweaks[] = { - { /* 320x240 */ - 0xe3, - { - 0x5f, 0x4f, 0x50, 0x82, - 0x54, 0x80, 0x0d, 0x3e, - 0x00, 0x41, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xea, 0xac, 0xdf, 0x28, - 0x00, 0xe7, 0x06, 0xe3 - } - }, - { /* 320x400 */ - 0, /* don't need to set it */ - { - 0x5f, 0x4f, 0x50, 0x82, - 0x54, 0x80, 0xbf, 0x1f, - 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x9c, 0x8e, 0x8f, 0x28, - 0x00, 0x96, 0xb9, 0xe3 - } - }, - { /* 360x480 */ - 0xe7, - { - 0x6b, 0x59, 0x5a, 0x8e, - 0x5e, 0x8a, 0x0d, 0x3e, - 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x31, - 0xea, 0xac, 0xdf, 0x2d, - 0x00, 0xe7, 0x06, 0xe3 - } - } -}; - -static int setmodex(GrVideoMode *mp,int noclear) -{ - int res = FALSE; - GRX_ENTER(); - if(((unsigned int)mp->privdata < itemsof(xtweaks)) && - (_GrViDrvSetEGAVGAmode(mp,noclear) != FALSE)) { - struct xtweakdef *tp = &xtweaks[mp->privdata]; - unsigned int i; - /* turn off chain4 */ - outport_w(0x3c4,0x604); - if(!noclear) { - char far *ptr = LINP_PTR(mp->extinfo->frame); - int size = 0x8000U; - /* enable all planes */ - outport_w(0x3c4,((0x0f << 8) | 2)); - setup_far_selector(LINP_SEL(mp->extinfo->frame)); - rowfill_w_f(ptr,0,size); - } - /* wait for vertical retrace */ - while((inport_b(0x3da) & 8) != 0); - while((inport_b(0x3da) & 8) == 0); - int_disable(); - if(tp->miscreg) { - outport_w(0x3c4,0x100); - outport_b(0x3c2,tp->miscreg); - outport_w(0x3c4,0x300); - } - outport_w(0x3d4,(((tp->crtc_regs[17] & 0x7f) << 8) | 17)); - for(i = 0; i < itemsof(tp->crtc_regs); i++) { - outport_w(0x3d4,((tp->crtc_regs[i] << 8) | i)); - } - int_enable(); - res = TRUE; - } - GRX_LEAVE(); - return(res); -} - -static GrVideoModeExt gr8xext = { - GR_frameVGA8X, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xa000,0), /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - setmodex, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - _GrViDrvLoadColorVGA8 /* color loader */ -}; - -/* ==== tweaked text modes: 90x30, 90x34, 94x30, 94x34 ==== */ - -static unsigned short ttweaks[][16] = { - { /* 90x30 */ - 0x0c11,0x6d00,0x5901,0x5a02,0x9003,0x6004,0x8b05,0x0b06, - 0x3e07,0x4f09,0xea10,0x8c11,0xdf12,0x2d13,0xe715,0x0416 - }, - { /* 90x34 */ - 0x0c11,0x6d00,0x5901,0x5a02,0x9003,0x6004,0x8b05,0x0b06, - 0x3e07,0x4d09,0xea10,0x8c11,0xdf12,0x2d13,0xe715,0x0416 - }, - { /* 94x30 */ - 0x0c11,0x6c00,0x5d01,0x5e02,0x8f03,0x6204,0x8e05,0x0b06, - 0x3e07,0x4f09,0xea10,0x8c11,0xdf12,0x2f13,0xe715,0x0416 - }, - { /* 94x34 */ - 0x0c11,0x6c00,0x5d01,0x5e02,0x8f03,0x6204,0x8e05,0x0b06, - 0x3e07,0x4d09,0xea10,0x8c11,0xdf12,0x2f13,0xe715,0x0416 - } -}; - -static int set_tweaked_text(GrVideoMode *mp,int noclear) -{ - int res = FALSE; - GRX_ENTER(); - if(((unsigned int)mp->privdata < itemsof(ttweaks)) && - (_GrViDrvSetEGAVGAmode(mp,noclear) != FALSE)) { - unsigned int i; - /* load 8x14 font for 34 line modes */ - if(mp->height == 34) { - Int86Regs r; - sttzero(&r); - IREG_AX(r) = 0x1111; - int10(&r); - } - /* wait for vertical retrace */ - while((inport_b(0x3da) & 8) != 0); - while((inport_b(0x3da) & 8) == 0); - int_disable(); - outport_b(0x3c2,0xe7); - /* set sequencer clocking mode */ - outport_w(0x3c4,0x101); - /* reset data flip-flop to address mode */ - junk = inport_w(0x3da); - outport_b(0x3c0,0x30); - /* set mode control register */ - outport_b(0x3c0,0x04); - outport_b(0x3c0,0x33); - /* set horizontal pixel pan */ - outport_b(0x3c0,0x00); - for(i = 0; i < itemsof(ttweaks[0]); i++) { - outport_w(0x3d4,ttweaks[mp->privdata][i]); - } - setup_far_selector(LINP_SEL(0)); - /* update BIOS data area */ - poke_w_f(0x44a,mp->width); - poke_b_f(0x484,(mp->height - 1)); - poke_w_f(0x44c,(mp->width * mp->height * 2)); - int_enable(); - res = TRUE; - } - GRX_LEAVE(); - return res; -} - -static GrVideoModeExt twtext = { - GR_frameText, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xb800,0), /* frame buffer address */ - { 0, 0, 0 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - set_tweaked_text, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoMode modes[] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - { TRUE, 1, 80, 25, 0x07, 160, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 1, 80, 28, 0x07, 160, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 1, 80, 50, 0x07, 160, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 40, 25, 0x01, 80, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 80, 25, 0x03, 160, 0, &_GrViDrvEGAVGAtextModeExt }, - { TRUE, 4, 80, 28, 0x03, 160, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 80, 50, 0x03, 160, 0, &_GrViDrvEGAVGAcustomTextModeExt }, - { TRUE, 4, 90, 30, 0x03, 180, 0, &twtext }, - { TRUE, 4, 90, 34, 0x03, 180, 1, &twtext }, - { TRUE, 4, 94, 30, 0x03, 188, 2, &twtext }, - { TRUE, 4, 94, 34, 0x03, 188, 3, &twtext }, - { TRUE, 1, 320, 200, 0x0d, 40, 0, &gr1ext }, - { TRUE, 1, 640, 200, 0x0e, 80, 0, &gr1ext }, - { TRUE, 1, 640, 350, 0x10, 80, 0, &gr1ext }, - { TRUE, 1, 640, 480, 0x12, 80, 0, &gr1ext }, - { FALSE, 1, 800, 600, 0x6a, 100, 0, &gr1ext }, - { TRUE, 4, 320, 200, 0x0d, 40, 0, &gr4ext }, - { TRUE, 4, 640, 200, 0x0e, 80, 0, &gr4ext }, - { TRUE, 4, 640, 350, 0x10, 80, 0, &gr4ext }, - { TRUE, 4, 640, 480, 0x12, 80, 0, &gr4ext }, - { FALSE, 4, 800, 600, 0x6a, 100, 0, &gr4ext }, - { TRUE, 8, 320, 200, 0x13, 320, 0, &gr8ext }, - { TRUE, 8, 320, 240, 0x13, 80, 0, &gr8xext }, - { TRUE, 8, 320, 400, 0x13, 80, 1, &gr8xext }, - { TRUE, 8, 360, 480, 0x13, 90, 2, &gr8xext } -}; - -static int init(char *options) -{ - int res = FALSE; - GRX_ENTER(); - if(_GrViDrvInitEGAVGA(options)) { - if(options && (strncmp(options,"svga",4) == 0)) { - int svgamode; - GrVideoMode *mp; - if(sscanf(options,"svga=%x",&svgamode) != 1) svgamode = 0; - for(mp = modes; mp < &modes[itemsof(modes)]; mp++) { - if(mp->width == 800) { - mp->present = TRUE; - mp->mode = ((svgamode > 0x13) && (svgamode <= 0x110)) ? svgamode : 0x6a; - } - } - } - res = TRUE; - } - GRX_LEAVE(); - return res; -} - -GrVideoDriver _GrVideoDriverSTDVGA = { - "stdvga", /* name */ - GR_VGA, /* adapter type */ - NULL, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - _GrViDrvDetectVGA, /* detection routine */ - init, /* initialization routine */ - _GrViDrvResetEGAVGA, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/svgalib.c b/thirdparty/grx249/src/vdrivers/svgalib.c deleted file mode 100644 index 0fb61a3..0000000 --- a/thirdparty/grx249/src/vdrivers/svgalib.c +++ /dev/null @@ -1,295 +0,0 @@ -/** - ** svgalib.c ---- Linux driver, i.e. an interface to SVGALIB - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "memcopy.h" -#include "memfill.h" - -#define NUM_MODES 80 /* max # of supported modes */ -#define NUM_EXTS 15 /* max # of mode extensions */ - -static int initted = (-1); -static int initmode = 0; -static int isEGA; - -static int detect(void) -{ - if(initted < 0) { -#if 0 - /* make sure VGA will map to 64K boundary ... */ - long endmem = (long)(sbrk(0)); - if((endmem & 0xffffL) != 0) { - brk((void *)((endmem + 0xffffL) & ~0xffffL)); - } -#endif - if(vga_init() >= 0) { - initted = 1; - isEGA = (vga_getcurrentchipset() == EGA); - initmode = vga_getcurrentmode(); - } - else initted = 0; - } - return((initted > 0) ? TRUE : FALSE); -} - -static void reset(void) -{ - if(initted > 0 && vga_getcurrentmode() != initmode) - vga_setmode(initmode); -} - -static void setrwbanks(int rb,int wb) -{ - vga_setreadpage(rb); - vga_setwritepage(wb); -} - -static void loadcolor(int c,int r,int g,int b) -{ - vga_setpalette(c,(r >> 2),(g >> 2),(b >> 2)); -} - -static int setmode(GrVideoMode *mp,int noclear) -{ - vga_setmode(mp->mode); - if (mp->extinfo->flags & GR_VMODEF_LINEAR) { - if (vga_setlinearaddressing() == -1) - return(FALSE); - } - mp->extinfo->frame = (char *)vga_getgraphmem(); - return(TRUE); -} - -static int settext(GrVideoMode *mp,int noclear) -{ - vga_setmode(mp->mode); - return(TRUE); -} - -GrVideoModeExt _GrViDrvEGAVGAtextModeExt = { - GR_frameText, /* frame driver */ - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - { 6, 6, 6 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - settext, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL, /* color loader */ -}; - -static GrVideoModeExt exts[NUM_EXTS]; -static GrVideoMode modes[NUM_MODES] = { - /* pres. bpp wdt hgt mode scan priv. &ext */ - { TRUE, 4, 80, 25, TEXT, 160, 0, &_GrViDrvEGAVGAtextModeExt }, - { 0 } -}; - -static int build_video_mode( - vga_modeinfo *ip, - GrVideoMode *mp, - GrVideoModeExt *ep -){ - mp->present = TRUE; - mp->width = ip->width; - mp->height = ip->height; - mp->lineoffset = ip->linewidth; - mp->extinfo = NULL; - mp->privdata = 0; - ep->drv = NULL; - ep->frame = NULL; /* filled in after mode set */ - ep->flags = 0; - ep->setup = setmode; - ep->setvsize = NULL; /* tbd */ - ep->scroll = NULL; /* tbd */ - ep->setbank = isEGA ? NULL : vga_setpage; - ep->setrwbanks = (ip->flags & HAVE_RWPAGE) ? setrwbanks : NULL; - ep->loadcolor = NULL; - switch(ip->colors) { -#ifdef INOUTP_FRAMEDRIVERS - case 2: - mp->bpp = 1; - ep->mode = GR_frameEGAVGA1; - ep->cprec[0] = - ep->cprec[1] = - ep->cprec[2] = 1; - ep->cpos[0] = - ep->cpos[1] = - ep->cpos[2] = 0; - break; - case 16: - mp->bpp = 4; - ep->mode = isEGA ? GR_frameEGA4 : GR_frameSVGA4; - ep->cprec[0] = - ep->cprec[1] = - ep->cprec[2] = isEGA ? 2 : 6; - ep->cpos[0] = - ep->cpos[1] = - ep->cpos[2] = 0; - ep->loadcolor = loadcolor; - break; -#endif - case 256: - mp->bpp = 8; - if (ip->flags & IS_MODEX) -#ifdef INOUTP_FRAMEDRIVERS - ep->mode = GR_frameVGA8X; -#else - return(FALSE); -#endif - else - if (ip->flags & CAPABLE_LINEAR) { - ep->mode = GR_frameSVGA8_LFB; - ep->flags|= GR_VMODEF_LINEAR; - } else - ep->mode = GR_frameSVGA8; - ep->cprec[0] = - ep->cprec[1] = - ep->cprec[2] = 6; - ep->cpos[0] = - ep->cpos[1] = - ep->cpos[2] = 0; - ep->loadcolor = loadcolor; - break; - case 32*1024: - mp->bpp = 15; - if (ip->flags & CAPABLE_LINEAR) { - ep->mode = GR_frameSVGA16_LFB; - ep->flags|= GR_VMODEF_LINEAR; - } else - ep->mode = GR_frameSVGA16; - ep->cprec[0] = - ep->cprec[1] = - ep->cprec[2] = 5; - ep->cpos[0] = 10; - ep->cpos[1] = 5; - ep->cpos[2] = 0; - break; - case 64*1024: - mp->bpp = 16; - if (ip->flags & CAPABLE_LINEAR) { - ep->mode = GR_frameSVGA16_LFB; - ep->flags|= GR_VMODEF_LINEAR; - } else - ep->mode = GR_frameSVGA16; - ep->cprec[0] = 5; - ep->cprec[1] = 6; - ep->cprec[2] = 5; - ep->cpos[0] = 11; - ep->cpos[1] = 5; - ep->cpos[2] = 0; - break; - case 16*1024*1024: - mp->bpp = 24; - if (ip->flags & CAPABLE_LINEAR) { - ep->mode = GR_frameSVGA24_LFB; - ep->flags|= GR_VMODEF_LINEAR; - } else - ep->mode = GR_frameSVGA24; - ep->cprec[0] = - ep->cprec[1] = - ep->cprec[2] = 8; - ep->cpos[0] = 16; - ep->cpos[1] = 8; - ep->cpos[2] = 0; - if(ip->bytesperpixel == 3) break; - mp->bpp = 32; - ep->mode = (ip->flags & CAPABLE_LINEAR) ? GR_frameSVGA32L_LFB - : GR_frameSVGA32L; - if(!(ip->flags & RGB_MISORDERED)) break; - ep->cpos[0] = 24; - ep->cpos[1] = 16; - ep->cpos[2] = 8; - ep->mode = (ip->flags & CAPABLE_LINEAR) ? GR_frameSVGA32H_LFB - : GR_frameSVGA32H; - break; - default: - return(FALSE); - } - return(TRUE); -} - -static void add_video_mode( - GrVideoMode *mp, GrVideoModeExt *ep, - GrVideoMode **mpp,GrVideoModeExt **epp -){ - if(*mpp < &modes[NUM_MODES]) { - if(!mp->extinfo) { - GrVideoModeExt *etp = &exts[0]; - while(etp < *epp) { - if(memcmp(etp,ep,sizeof(GrVideoModeExt)) == 0) { - mp->extinfo = etp; - break; - } - etp++; - } - if(!mp->extinfo) { - if(etp >= &exts[NUM_EXTS]) return; - sttcopy(etp,ep); - mp->extinfo = etp; - *epp = ++etp; - } - } - sttcopy(*mpp,mp); - (*mpp)++; - } -} - -static int init(char *options) -{ - if(detect()) { - vga_modeinfo *mdinfo; - GrVideoMode mode,*modep = &modes[1]; - GrVideoModeExt ext, *extp = &exts[0]; - int mindex; - memzero(modep,(sizeof(modes) - sizeof(modes[0]))); - for(mindex = G320x200x16; mindex <= GLASTMODE; mindex++) { - if(!(vga_hasmode(mindex))) continue; - if(!(mdinfo = vga_getmodeinfo(mindex))) continue; - if(!(build_video_mode(mdinfo,&mode,&ext))) continue; - mode.mode = mindex; - add_video_mode(&mode,&ext,&modep,&extp); - } - _GrVideoDriverSVGALIB.adapter = isEGA ? GR_EGA : GR_VGA; - return(TRUE); - } - return(FALSE); -} - -GrVideoDriver _GrVideoDriverSVGALIB = { - "svgalib", /* name */ - GR_VGA, /* adapter type */ - NULL, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - detect, /* detection routine */ - init, /* initialization routine */ - reset, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/u_egavga.c b/thirdparty/grx249/src/vdrivers/u_egavga.c deleted file mode 100644 index 3c8df25..0000000 --- a/thirdparty/grx249/src/vdrivers/u_egavga.c +++ /dev/null @@ -1,153 +0,0 @@ -/** - ** u_egavga.c ---- common EGA/VGA utilities for video drivers - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "int86.h" -#include "vesa.h" -#include "memfill.h" - -int _GrViDrvDetectEGAVGA(void) -{ - Int86Regs r; - sttzero(&r); - /* check for EGA/VGA by trying to read a palette register */ - IREG_AX(r) = 0x1007; - IREG_BX(r) = 0xff00; - int10(&r); - return ( (unsigned char)IREG_BH(r) != (unsigned char)0xff ); -} - -static int detectvga(void) -{ - Int86Regs r; - sttzero(&r); - /* check for VGA by trying to read a DAC register */ - IREG_AX(r) = 0x1015; - IREG_BX(r) = 0; - IREG_CX(r) = 0xffff; - IREG_DX(r) = 0xffff; - int10(&r); - return( ( (unsigned short)(IREG_CX(r) & IREG_DX(r)) - != (unsigned short)0xffff ) ? TRUE : FALSE); -} - -int _GrViDrvDetectEGA(void) -{ - return((_GrViDrvDetectEGAVGA() && !detectvga()) ? TRUE : FALSE); -} - -int _GrViDrvDetectVGA(void) -{ - return((_GrViDrvDetectEGAVGA() && detectvga()) ? TRUE : FALSE); -} - -int _GrViDrvGetCurrentEGAVGAmode(void) -{ - Int86Regs r; - sttzero(&r); - IREG_AX(r) = VESA_FUNC + VESA_GET_MODE; - int10(&r); - if(IREG_AX(r) == VESA_SUCCESS) { - int mode = IREG_BX(r) & 0x7fff; - if(mode > 0x13) return(mode); - } - IREG_AX(r) = 0x0f00; - int10(&r); - return(IREG_AL(r) & 0x7f); -} - -static int setmode(int mode,int noclear) -{ - Int86Regs r; - sttzero(&r); - IREG_AX(r) = VESA_FUNC + VESA_SET_MODE; - IREG_BX(r) = (mode & 0x7fff) | (noclear ? 0x8000U : 0); - int10(&r); - if(IREG_AX(r) == VESA_SUCCESS) return(TRUE); - IREG_AX(r) = (mode & 0x7f) | (noclear ? 0x80U : 0); - int10(&r); - return((_GrViDrvGetCurrentEGAVGAmode() == mode) ? TRUE : FALSE); -} - -int _GrViDrvSetEGAVGAmode(GrVideoMode *mp,int noclear) -{ - return(setmode(mp->mode,noclear)); -} - -int _GrViDrvSetEGAVGAcustomTextMode(GrVideoMode *mp,int noclear) -{ - if(_GrViDrvSetEGAVGAmode(mp,noclear)) { - Int86Regs r; - sttzero(&r); - /* load 8x8 or 8x14 font */ - IREG_AX(r) = (mp->height >= 50) ? 0x1112 : 0x1111; - int10(&r); - return(TRUE); - } - return(FALSE); -} - -static int origmode = (-1); - -int _GrViDrvInitEGAVGA(char *options) -{ - if(_GrViDrvDetectEGAVGA()) { - origmode = _GrViDrvGetCurrentEGAVGAmode(); - return(TRUE); - } - return(FALSE); -} - -void _GrViDrvResetEGAVGA(void) -{ - if((origmode != (-1)) && DRVINFO->moderestore) { - setmode(origmode,FALSE); - } -} - -GrVideoModeExt _GrViDrvEGAVGAtextModeExt = { - GR_frameText, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xb800,0), /* frame buffer address */ - { 0, 0, 0 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -GrVideoModeExt _GrViDrvEGAVGAcustomTextModeExt = { - GR_frameText, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xb800,0), /* frame buffer address */ - { 0, 0, 0 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - _GrViDrvSetEGAVGAcustomTextMode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/u_vesa.c b/thirdparty/grx249/src/vdrivers/u_vesa.c deleted file mode 100644 index 38ef50b..0000000 --- a/thirdparty/grx249/src/vdrivers/u_vesa.c +++ /dev/null @@ -1,225 +0,0 @@ -/** - ** u_vesa.c ---- interface utility functions to VESA BIOS inquiry calls - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@xaphod.techfak.uni-kiel.d400.de) - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "vesa.h" -#include "mempeek.h" -#include "memfill.h" -#include "int86.h" - -#ifndef IREG_AX - -int _GrViDrvVESAgetVGAinfo(VESAvgaInfoBlock *ib) -{ - return(FALSE); -} -int _GrViDrvVESAgetModeInfo(int mode,VESAmodeInfoBlock *ib) -{ - return(FALSE); -} - -VESApmInfoBlock * _GrViDrvVESAgetPMinfo(void) -{ - return(NULL); -} - -#else - -#if defined(__WATCOMC__) && defined(__386__) -#define FAR _far -#else -#define FAR far -#endif /* __WATCOMC__ && __386__*/ - -int _GrViDrvVESAgetVGAinfo(VESAvgaInfoBlock *ib) -{ - static char *nmcopy = NULL; - static short *mdcopy = NULL; - Int86Regs regs; - short FAR *mp; - short *modes; - char FAR *p1; - char *p2; - int ii; - DECLARE_XFER_BUFFER(1000); - /* - * copy VBE 2.0 tag into XFER buffer - */ - setup_far_selector(LINP_SEL(XFER_BUFFER)); - p1 = (char FAR *)LINP_PTR(XFER_BUFFER); - poke_b_f(p1,'V'); ++p1; - poke_b_f(p1,'B'); ++p1; - poke_b_f(p1,'E'); ++p1; - poke_b_f(p1,'2'); ++p1; - /* - * set up registers and call interrupt - */ - sttzero(®s); - IREG_AX(regs) = VESA_FUNC + VESA_VGA_INFO; - IREG_ES(regs) = FP_SEG(XFER_BUFFER); - IREG_DI(regs) = FP_OFF(XFER_BUFFER); - int10x(®s); - if(IREG_AX(regs) != VESA_SUCCESS) { - DELETE_XFER_BUFFER; - return(FALSE); - } - /* - * copy VESA info block into accessible memory - */ - setup_far_selector(LINP_SEL(XFER_BUFFER)); - p1 = (char FAR *)LINP_PTR(XFER_BUFFER); - p2 = (char *)ib; - for(ii = sizeof(*ib); --ii >= 0; p1++,p2++) *p2 = peek_b_f(p1); - - if ( ib->VESAsignature[0] != 'V' || - ib->VESAsignature[1] != 'E' || - ib->VESAsignature[2] != 'S' || - ib->VESAsignature[3] != 'A' ) { - DELETE_XFER_BUFFER; - return(FALSE); - } - /* - * allocate space and copy mode list into accessible memory - */ - mp = LINP_PTR(MK_FP(FP86_SEG(ib->VideoModePtr),FP86_OFF(ib->VideoModePtr))); - p1 = (char FAR *)mp; - for(ii = 1; (short)peek_w_f(mp) != (short)(-1); mp++,ii++); - modes = mdcopy = realloc(mdcopy,ii * sizeof(short)); - if(!modes) { DELETE_XFER_BUFFER; return(FALSE); } - ib->VideoModePtr = modes; - mp = (short far *)p1; - for( ; --ii >= 0; mp++,modes++) *modes = peek_w_f(mp); - /* - * allocate space and copy ID string into accessible memory - */ - p1 = LINP_PTR(MK_FP(FP86_SEG(ib->OEMstringPtr),FP86_OFF(ib->OEMstringPtr))); - mp = (short FAR *)p1; - for(ii = 1; (char)peek_b_f(p1) != (char)(0); p1++,ii++); - p2 = nmcopy = realloc(nmcopy,ii * sizeof(char)); - if(!p2) { DELETE_XFER_BUFFER; return(FALSE); } - ib->OEMstringPtr = p2; - p1 = (char FAR *)mp; - for( ; --ii >= 0; p1++,p2++) *p2 = peek_b_f(p1); - DELETE_XFER_BUFFER; - return(TRUE); -} - -VESApmInfoBlock * _GrViDrvVESAgetPMinfo(void) { - Int86Regs r; - static VESApmInfoBlock *ib = NULL; - unsigned Length, ii; - char FAR *p1; - char *p2; - - sttzero(&r); - IREG_AX(r) = VESA_FUNC + VESA_PM_INTERF; - IREG_BX(r) = 0x0000; - DBGPRINTF(DBG_DRIVER,("Getting protected mode interface\n")); - int10x(&r); - if(IREG_AX(r) != VESA_SUCCESS) - return(NULL); - /* Now we have : CX = length of table and routines (bytes) - ES:DI = pointer to table - ES_DI+00: offset PM set window routine - +02: offset PM set display start - +04: offset PM set primary palette - +06: offset PM description table */ - Length = (unsigned)IREG_CX(r); - if( Length == 0) return(NULL); - ib = realloc(ib, Length + VESApmInfoBlock_BASEOFF); - if (ib == NULL) return(NULL); - - ib->RealMode_SEG = IREG_ES(r); - ib->RealMode_OFF = IREG_DI(r); - ib->PhysicalLength = IREG_CX(r); - - setup_far_selector(LINP_SEL(MK_FP( IREG_ES(r),IREG_DI(r)))); - p1 = LINP_PTR( MK_FP( IREG_ES(r),IREG_DI(r) ) ); - p2 = (char *) &(ib->SetWindow_off); - for(ii = 0; ii < Length; p1++,ii++) *(p2++) = peek_b_f(p1); - DBGPRINTF(DBG_DRIVER,("Protected Mode Interface :-\n" )); - DBGPRINTF(DBG_DRIVER,(" Real mode address = 0x%04x:0x%04x\n",ib->RealMode_SEG,ib->RealMode_OFF)); - DBGPRINTF(DBG_DRIVER,(" Length = 0x%08x\n",ib->PhysicalLength)); - DBGPRINTF(DBG_DRIVER,(" SetWindow function offset = 0x%08x\n",ib->SetWindow_off)); - DBGPRINTF(DBG_DRIVER,(" SetDisplayStart function offset = 0x%08x\n",ib->DisplStart_off)); - DBGPRINTF(DBG_DRIVER,(" Primary Palette function offset = 0x%08x\n",ib->PPalette_off)); - DBGPRINTF(DBG_DRIVER,(" Resource Sub-Table offset = 0x%08x\n",ib->SubTable_off)); -#ifdef DUMP_PM_TABLE - { - static int once = 0; - if (!once) { - int len; - FILE *dump = fopen("vesapm.s", "wt"); - once = 1; - if (dump) { - p2 = (char *) &(ib->SetWindow_off); - fprintf(dump, ".text\n_vesa_pm_table:\n"); - for (len=0; len < Length; ++len) { - fprintf(dump, "\t.byte %u\n", *(unsigned char *)p2); - ++p2; - } - fclose(dump); - } - dump = fopen("vesapm.dmp", "wb"); - if (dump) { - p2 = (char *) &(ib->SetWindow_off); - fwrite(p2,Length,1,dump); - fclose(dump); - } - } - } -#endif - return(ib); -} - -int _GrViDrvVESAgetModeInfo(int mode,VESAmodeInfoBlock *ib) -{ - Int86Regs regs; - char FAR *p1; - char *p2; - int ii; - DECLARE_XFER_BUFFER(1000); - /* - * set up registers and call interrupt - */ - sttzero(®s); - IREG_AX(regs) = VESA_FUNC + VESA_MODE_INFO; - IREG_CX(regs) = mode; - IREG_ES(regs) = FP_SEG(XFER_BUFFER); - IREG_DI(regs) = FP_OFF(XFER_BUFFER); - int10x(®s); - if(IREG_AX(regs) != VESA_SUCCESS) { - DELETE_XFER_BUFFER; - return(FALSE); - } - /* - * copy VESA info block into accessible memory - */ - setup_far_selector(LINP_SEL(XFER_BUFFER)); - p1 = (char FAR *)LINP_PTR(XFER_BUFFER); - p2 = (char *)ib; - for(ii = sizeof(*ib); --ii >= 0; p1++,p2++) *p2 = peek_b_f(p1); - DELETE_XFER_BUFFER; - return((ib->ModeAttributes & MODE_SUPPORTED) ? TRUE : FALSE); -} - -#endif - diff --git a/thirdparty/grx249/src/vdrivers/u_vsvirt.c b/thirdparty/grx249/src/vdrivers/u_vsvirt.c deleted file mode 100644 index e242ae4..0000000 --- a/thirdparty/grx249/src/vdrivers/u_vsvirt.c +++ /dev/null @@ -1,80 +0,0 @@ -/** - ** u_vsvirt.c ---- virtual screen utility functions using VESA BIOS calls - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" -#include "vesa.h" -#include "arith.h" -#include "mempeek.h" -#include "memfill.h" -#include "int86.h" - -int _GrViDrvVESAsetVirtualSize(GrVideoMode *md,int w,int h,GrVideoMode *result) -{ - Int86Regs r; - sttzero(&r); - IREG_AX(r) = VESA_FUNC + VESA_SCAN_LNLEN; - IREG_BX(r) = 0; - IREG_CX(r) = w; -#ifdef __WATCOMC__ - int10x(&r); -#else - int10(&r); -#endif - if(IREG_AX(r) == VESA_SUCCESS) { - result->lineoffset = IREG_BX(r); - result->width = IREG_CX(r); - result->height = umin(IREG_DX(r),h); - return(TRUE); - } - return(FALSE); -} - -/* -** VESA 2.0 has a PM function for VESA_DISP_START -** Bad news: register values are incompatible with -** real mode function. PM adaption should be done -*/ -int _GrViDrvVESAvirtualScroll(GrVideoMode *md,int x,int y,int result[2]) -{ - Int86Regs r; - sttzero(&r); - IREG_AX(r) = VESA_FUNC + VESA_DISP_START; - IREG_BX(r) = 0; - IREG_CX(r) = x; - IREG_DX(r) = y; -#ifdef __WATCOMC__ - int10x(&r); -#else - int10(&r); -#endif - if(IREG_AX(r) == VESA_SUCCESS) { - IREG_AX(r) = VESA_FUNC + VESA_DISP_START; - IREG_BX(r) = 1; -#ifdef __WATCOMC__ - int10x(&r); -#else - int10(&r); -#endif - result[0] = IREG_CX(r); - result[1] = IREG_DX(r); - return(TRUE); - } - return(FALSE); -} - diff --git a/thirdparty/grx249/src/vdrivers/vd_lnxfb.c b/thirdparty/grx249/src/vdrivers/vd_lnxfb.c deleted file mode 100644 index 35c5792..0000000 --- a/thirdparty/grx249/src/vdrivers/vd_lnxfb.c +++ /dev/null @@ -1,389 +0,0 @@ -/** - ** vd_lnxfb.c ---- Linux framebuffer driver - ** - ** Copyright (c) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@telefonica.net] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by Josu Onandia (jonandia@fagorautomation.es) 13/12/2002 - ** - Added the 8bpp paletted mode. - ** Modifications by Mariano Alvarez Fernandez 21/12/2002 - ** - Added function to change virtual terminals, _SwitchConsoleLnxfbDriver - ** to be called from the input driver. - ** - Some cleanups, now the text screen shows ok on exit. - ** Modifications by Mariano Alvarez Fernandez 1/3/2002 - ** - Added code to catch a signal when user wants to change virtual - ** terminals. The driver sets _lnxfb_waiting_to_switch_console and the - ** input driver must calls _LnxfbSwitchConsoleAndWait then. - ** - _SwitchConsoleLnxfbDriver renamed to _LnxfbSwitchConsoleVt, not used, - ** is here only for possible future use. - **/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "memcopy.h" -#include "memfill.h" - -#define NUM_MODES 80 /* max # of supported modes */ -#define NUM_EXTS 15 /* max # of mode extensions */ - -static int initted = -1; -static int fbfd = -1; -static int ttyfd = -1; -static struct fb_fix_screeninfo fbfix; -static struct fb_var_screeninfo fbvar; -static char *fbuffer = NULL; -static int ingraphicsmode = 0; - -int _lnxfb_waiting_to_switch_console = 0; - -static int detect(void) -{ - char *fbname; - char *default_fbname = "/dev/fb0"; - - if (initted < 0) { - initted = 0; - fbname = getenv("FRAMEBUFFER"); - if (fbname == NULL) - fbname = default_fbname; - fbfd = open(fbname, O_RDWR); - if (fbfd == -1) - return FALSE; - ioctl(fbfd, FBIOGET_FSCREENINFO, &fbfix); - ioctl(fbfd, FBIOGET_VSCREENINFO, &fbvar); - if (fbfix.type != FB_TYPE_PACKED_PIXELS) - return FALSE; - ttyfd = open("/dev/tty", O_RDONLY); - initted = 1; - } - return ((initted > 0) ? TRUE : FALSE); -} - -static void reset(void) -{ - struct vt_mode vtm; - - if (fbuffer) { - memzero(fbuffer, fbvar.yres * fbfix.line_length); - munmap(fbuffer, fbfix.smem_len); - fbuffer = NULL; - } - if (fbfd != -1) { - close(fbfd); - fbfd = -1; - } - if (ttyfd > -1) { - ioctl(ttyfd, KDSETMODE, KD_TEXT); - vtm.mode = VT_AUTO; - vtm.relsig = 0; - vtm.acqsig = 0; - ioctl(ttyfd, VT_SETMODE, &vtm); - signal(SIGUSR1, SIG_IGN); - close(ttyfd); - ttyfd = -1; - ingraphicsmode = 0; - } - initted = -1; -} - -void _LnxfbSwitchToConsoleVt(unsigned short vt) -{ - struct vt_stat vtst; - unsigned short myvt; - GrContext *grc; - - if (!ingraphicsmode) return; - if (ttyfd < 0) return; - if (ioctl(ttyfd, VT_GETSTATE, &vtst) < 0) return; - myvt = vtst.v_active; - if (vt == myvt) return; - - grc = GrCreateContext(GrScreenX(), GrScreenY(), NULL, NULL); - if (grc != NULL) { - GrBitBlt(grc, 0, 0, GrScreenContext(), 0, 0, - GrScreenX()-1, GrScreenY()-1, GrWRITE); - } - ioctl(ttyfd, KDSETMODE, KD_TEXT); - if (ioctl(ttyfd, VT_ACTIVATE, vt) == 0) { - ioctl(ttyfd, VT_WAITACTIVE, vt); - ioctl(ttyfd, VT_WAITACTIVE, myvt); - } - ioctl(ttyfd, KDSETMODE, KD_GRAPHICS); - if (grc != NULL) { - GrBitBlt(GrScreenContext(), 0, 0, grc, 0, 0, - GrScreenX()-1, GrScreenY()-1, GrWRITE); - GrDestroyContext(grc); - } -} - -void _LnxfbSwitchConsoleAndWait(void) -{ - struct vt_stat vtst; - unsigned short myvt; - GrContext *grc; - - _lnxfb_waiting_to_switch_console = 0; - if (!ingraphicsmode) return; - if (ttyfd < 0) return; - if (ioctl(ttyfd, VT_GETSTATE, &vtst) < 0) return; - myvt = vtst.v_active; - - grc = GrCreateContext(GrScreenX(), GrScreenY(), NULL, NULL); - if (grc != NULL) { - GrBitBlt(grc, 0, 0, GrScreenContext(), 0, 0, - GrScreenX()-1, GrScreenY()-1, GrWRITE); - } - - ioctl(ttyfd, KDSETMODE, KD_TEXT); - - ioctl(ttyfd, VT_RELDISP, 1); - ioctl(ttyfd, VT_WAITACTIVE, myvt); - - ioctl(ttyfd, KDSETMODE, KD_GRAPHICS); - - if (grc != NULL) { - GrBitBlt(GrScreenContext(), 0, 0, grc, 0, 0, - GrScreenX()-1, GrScreenY()-1, GrWRITE); - GrDestroyContext(grc); - } -} - -void _LnxfbRelsigHandle(int sig) -{ - _lnxfb_waiting_to_switch_console = 1; - signal(SIGUSR1, _LnxfbRelsigHandle); -} - -static void loadcolor(int c, int r, int g, int b) -{ - __u16 red, green, blue, transp; - struct fb_cmap cmap; - - red = (r << 8); - green = (g << 8); - blue = (b << 8); - transp = 0; - cmap.start = c; - cmap.len = 1; - cmap.red = &red; - cmap.green = &green; - cmap.blue = &blue; - cmap.transp = &transp; - ioctl(fbfd, FBIOPUTCMAP, &cmap); -} - -static int setmode(GrVideoMode * mp, int noclear) -{ - struct vt_mode vtm; - - fbuffer = mp->extinfo->frame = mmap(0, - fbfix.smem_len, - PROT_READ | PROT_WRITE, - MAP_SHARED, fbfd, 0); - if (mp->extinfo->frame && ttyfd > -1) { - ioctl(ttyfd, KDSETMODE, KD_GRAPHICS); - vtm.mode = VT_PROCESS; - vtm.relsig = SIGUSR1; - vtm.acqsig = 0; - ioctl(ttyfd, VT_SETMODE, &vtm); - signal(SIGUSR1, _LnxfbRelsigHandle); - ingraphicsmode = 1; - } - if (mp->extinfo->frame && !noclear) - memzero(mp->extinfo->frame, fbvar.yres * fbfix.line_length); - return ((mp->extinfo->frame) ? TRUE : FALSE); -} - -static int settext(GrVideoMode * mp, int noclear) -{ - struct vt_mode vtm; - - if (fbuffer) { - memzero(fbuffer, fbvar.yres * fbfix.line_length); - munmap(fbuffer, fbfix.smem_len); - fbuffer = NULL; - } - if (ttyfd > -1) { - ioctl(ttyfd, KDSETMODE, KD_TEXT); - vtm.mode = VT_AUTO; - vtm.relsig = 0; - vtm.acqsig = 0; - ioctl(ttyfd, VT_SETMODE, &vtm); - signal(SIGUSR1, SIG_IGN); - ingraphicsmode = 0; - } - return TRUE; -} - -GrVideoModeExt grtextextfb = { - GR_frameText, /* frame driver */ - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - {6, 6, 6}, /* color precisions */ - {0, 0, 0}, /* color component bit positions */ - 0, /* mode flag bits */ - settext, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL, /* color loader */ -}; - -static GrVideoModeExt exts[NUM_EXTS]; -static GrVideoMode modes[NUM_MODES] = { - /* pres. bpp wdt hgt mode scan priv. &ext */ - {TRUE, 4, 80, 25, 0, 160, 0, &grtextextfb}, - {0} -}; - -static int build_video_mode(GrVideoMode * mp, GrVideoModeExt * ep) -{ - mp->present = TRUE; - mp->width = fbvar.xres; - mp->height = fbvar.yres; - mp->lineoffset = fbfix.line_length; - mp->extinfo = NULL; - mp->privdata = 0; - ep->drv = NULL; - ep->frame = NULL; /* filled in after mode set */ - ep->flags = 0; - ep->setup = setmode; - ep->setvsize = NULL; /* tbd */ - ep->scroll = NULL; /* tbd */ - ep->setbank = NULL; - ep->setrwbanks = NULL; - ep->loadcolor = NULL; - switch (fbvar.bits_per_pixel) { - case 8: - if (fbfix.visual != FB_VISUAL_PSEUDOCOLOR) - return FALSE; - mp->bpp = 8; - ep->mode = GR_frameSVGA8_LFB; - ep->flags |= GR_VMODEF_LINEAR; - ep->cprec[0] = fbvar.red.length; - ep->cprec[1] = fbvar.green.length; - ep->cprec[2] = fbvar.blue.length; - ep->cpos[0] = fbvar.red.offset; - ep->cpos[1] = fbvar.green.offset; - ep->cpos[2] = fbvar.blue.offset; - ep->loadcolor = loadcolor; - break; - case 15: - if (fbfix.visual != FB_VISUAL_TRUECOLOR) - return FALSE; - mp->bpp = 15; - ep->mode = GR_frameSVGA16_LFB; - ep->flags |= GR_VMODEF_LINEAR; - ep->cprec[0] = fbvar.red.length; - ep->cprec[1] = fbvar.green.length; - ep->cprec[2] = fbvar.blue.length; - ep->cpos[0] = fbvar.red.offset; - ep->cpos[1] = fbvar.green.offset; - ep->cpos[2] = fbvar.blue.offset; - break; - case 16: - if (fbfix.visual != FB_VISUAL_TRUECOLOR) - return FALSE; - mp->bpp = 16; - ep->mode = GR_frameSVGA16_LFB; - ep->flags |= GR_VMODEF_LINEAR; - ep->cprec[0] = fbvar.red.length; - ep->cprec[1] = fbvar.green.length; - ep->cprec[2] = fbvar.blue.length; - ep->cpos[0] = fbvar.red.offset; - ep->cpos[1] = fbvar.green.offset; - ep->cpos[2] = fbvar.blue.offset; - break; - case 24: - if (fbfix.visual != FB_VISUAL_TRUECOLOR) - return FALSE; - mp->bpp = 24; - ep->mode = GR_frameSVGA24_LFB; - ep->flags |= GR_VMODEF_LINEAR; - ep->cprec[0] = fbvar.red.length; - ep->cprec[1] = fbvar.green.length; - ep->cprec[2] = fbvar.blue.length; - ep->cpos[0] = fbvar.red.offset; - ep->cpos[1] = fbvar.green.offset; - ep->cpos[2] = fbvar.blue.offset; - break; - default: - return (FALSE); - } - return (TRUE); -} - -static void add_video_mode(GrVideoMode * mp, GrVideoModeExt * ep, - GrVideoMode ** mpp, GrVideoModeExt ** epp) -{ - if (*mpp < &modes[NUM_MODES]) { - if (!mp->extinfo) { - GrVideoModeExt *etp = &exts[0]; - while (etp < *epp) { - if (memcmp(etp, ep, sizeof(GrVideoModeExt)) == 0) { - mp->extinfo = etp; - break; - } - etp++; - } - if (!mp->extinfo) { - if (etp >= &exts[NUM_EXTS]) - return; - sttcopy(etp, ep); - mp->extinfo = etp; - *epp = ++etp; - } - } - sttcopy(*mpp, mp); - (*mpp)++; - } -} - -static int init(char *options) -{ - if (detect()) { - GrVideoMode mode, *modep = &modes[1]; - GrVideoModeExt ext, *extp = &exts[0]; - memzero(modep, (sizeof(modes) - sizeof(modes[0]))); - if ((build_video_mode(&mode, &ext))) { - add_video_mode(&mode, &ext, &modep, &extp); - } - return (TRUE); - } - return (FALSE); -} - -GrVideoDriver _GrVideoDriverLINUXFB = { - "linuxfb", /* name */ - GR_LNXFB, /* adapter type */ - NULL, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - detect, /* detection routine */ - init, /* initialization routine */ - reset, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; diff --git a/thirdparty/grx249/src/vdrivers/vd_mem.c b/thirdparty/grx249/src/vdrivers/vd_mem.c deleted file mode 100644 index 61d4845..0000000 --- a/thirdparty/grx249/src/vdrivers/vd_mem.c +++ /dev/null @@ -1,252 +0,0 @@ -/** - ** vd_mem.c ---- driver for creating image in memory for later exporting - ** - ** Author: Andris Pavenis - ** [e-mail: pavenis@acad.latnet.lv] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include - -#include "libgrx.h" -#include "grdriver.h" -#include "allocate.h" -#include "arith.h" -#include "int86.h" -#include "memfill.h" - - -static char far * MemBuf = NULL; -static unsigned long MemBufSze = 0; - -static void FreeMemBuf(void) { - if (MemBuf) farfree(MemBuf); - MemBuf = NULL; - MemBufSze = 0; -} - -static int AllocMemBuf(unsigned long sze) { - int clear = 1; - if (!MemBuf) { - MemBuf = farcalloc(1,(size_t)sze); - if (!MemBuf) return 0; - MemBufSze = sze; - clear = 0; - } - if (MemBufSze < sze) { - MemBuf = farrealloc(MemBuf,(size_t)sze); - if (!MemBuf) return 0; - MemBufSze = sze; - } - if (clear) memzero(MemBuf,sze); - return 1; -} - -static int mem_setmode (GrVideoMode *mp,int noclear); - - -static GrVideoModeExt gr1ext = { - GR_frameRAM1, /* frame driver */ - NULL, /* frame driver override */ - 0, /* frame buffer address */ - { 1, 1, 1 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - GR_VMODEF_MEMORY, /* mode flag bits */ - mem_setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoModeExt gr4ext = { - GR_frameRAM4, /* frame driver */ - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - { 8, 8, 8 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - GR_VMODEF_MEMORY, /* mode flag bits */ - mem_setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoModeExt gr8ext = { - GR_frameRAM8, /* frame driver */ - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - { 8, 8, 8 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - GR_VMODEF_MEMORY, /* mode flag bits */ - mem_setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoModeExt gr24ext = { -#ifdef GRX_USE_RAM3x8 - GR_frameRAM3x8, /* frame driver */ -#else - GR_frameRAM24, /* frame driver */ -#endif - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - { 8, 8, 8 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - GR_VMODEF_MEMORY, /* mode flag bits */ - mem_setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - - -static int dummymode (GrVideoMode * mp , int noclear ) -{ - FreeMemBuf(); - return TRUE; -} - - -GrVideoModeExt dummyExt = { - GR_frameText, /* frame driver */ - NULL, /* frame driver override */ - MK_FP(0xb800,0), /* frame buffer address */ - { 0, 0, 0 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - dummymode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - - - - -static GrVideoMode modes[] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - { TRUE, 1, 640, 480, 0x00, 80, 0, &gr1ext }, - { TRUE, 4, 640, 480, 0x00, 320, 0, &gr4ext }, - { TRUE, 8, 640, 480, 0x00, 640, 0, &gr8ext }, - { TRUE, 24, 640, 480, 0x00, 1920, 0, &gr24ext }, - { TRUE, 1, 80, 25, 0x00, 160, 0, &dummyExt } -}; - - - -static int mem_setmode (GrVideoMode *mp,int noclear) -{ - return MemBuf ? TRUE : FALSE; -} - - - -static GrVideoMode * mem_selectmode ( GrVideoDriver * drv, int w, int h, - int bpp, int txt, unsigned int * ep ) -{ - int index; - unsigned long size; - int LineOffset; - - if (txt) return _gr_selectmode (drv,w,h,bpp,txt,ep); -/* why ??? - if (w<320) w=320; - if (h<240) h=240; -*/ - if (w < 1 || h < 1) return NULL; - - switch (bpp) - { - case 1: index = 0; - LineOffset = (w + 7) >> 3; - size = h; - break; - case 4: index = 1; - LineOffset = (w + 7) >> 3; - size = 4*h; - break; - case 8: index = 2; - LineOffset = w; - size = h; - break; - case 24: index = 3; -#ifdef GRX_USE_RAM3x8 - LineOffset = w; - size = 3*h; -#else - LineOffset = 3*w; - size = h; -#endif - break; - default: return NULL; - } - - LineOffset = (LineOffset+7) & (~7); /* align rows to 64bit boundary */ - size *= LineOffset; - - if (((size_t)size) != size) return NULL; - - /* why ??? */ - modes[index].width = /* w<320 ? 320 : */ w; - modes[index].height = /* h<200 ? 200 : */ h; - modes[index].bpp = bpp; - modes[index].lineoffset = LineOffset; - - if ( AllocMemBuf(size) ) { - modes[index].extinfo->frame = MemBuf; - return _gr_selectmode (drv,w,h,bpp,txt,ep); - } - return FALSE; -} - - -/* -static int detect (void) -{ - return TRUE; -} -*/ - -static void mem_reset (void) -{ - if(DRVINFO->moderestore) { - FreeMemBuf(); - } -} - - -GrVideoDriver _GrDriverMEM = { - "memory", /* name */ - GR_MEM, /* adapter type */ - NULL, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - NULL, /* detect, */ /* detection routine */ - NULL, /* initialization routine */ - mem_reset, /* reset routine */ - mem_selectmode, /* special mode select routine */ - GR_DRIVERF_USER_RESOLUTION /* arbitrary resolution possible */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/vd_sdl.c b/thirdparty/grx249/src/vdrivers/vd_sdl.c deleted file mode 100644 index 72e38ae..0000000 --- a/thirdparty/grx249/src/vdrivers/vd_sdl.c +++ /dev/null @@ -1,468 +0,0 @@ -/** - ** vd_sdl.c -- SDL driver (interface to SDL) - ** - ** Copyright (C) 2004 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Passing SDL_SWSURFACE or SDL_HWSURFACE is a good wish only, the - ** real value is only available in the flags of a surface returned - ** from SDL_SetVideoMode(). - ** - ** We assume that any SDL_FULLSCREEN | SDL_HWSURFACE screen surface - ** has pixels pointing to the screen and a dummy SDL_UpdateRect(). - ** This is true for WIN32 and DGA2. - ** - ** We also assume that such pixels value, once locked, will remain - ** valid after any number of subsequent unlocks-&-locks (sdlinp.c). - ** FIXME: update frame after unlock? - ** - **/ - -#include "libsdl.h" -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "memcopy.h" -#include "memfill.h" - -SDL_Surface *_SGrScreen = NULL; -#if defined(__WIN32__) -void *_SGrBackup = NULL; -int _SGrLength; -int _SGrActive = TRUE; -static HWND window; -static WNDPROC wndproc; -static int fullscreen = TRUE; -#else -static int fullscreen = FALSE; -#endif - -#if defined(__WIN32__) -static int MaxWidth, MaxHeight; -#elif defined(__XWIN__) -static int MaxWidth, MaxHeight; -#else -#define MaxWidth 9600 -#define MaxHeight 7200 -#endif - -static void reset(void); -static int detect(void); -static void loadcolor(int c, int r, int g, int b); - -static int filter(const SDL_Event *event) -{ - if(event->type == SDL_KEYDOWN) { - if(event->key.keysym.sym == SDLK_SCROLLOCK) - SDL_SetModState(SDL_GetModState() ^ KMOD_SCROLL); - else if(event->key.keysym.sym == SDLK_INSERT) - SDL_SetModState(SDL_GetModState() ^ KMOD_INSERT); - } - - if((event->type == SDL_KEYDOWN || event->type == SDL_KEYUP) - && event->key.keysym.sym >= SDLK_NUMLOCK) return(0); - - return(1); -} - -#if defined(__WIN32__) -LONG CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) { - case WM_KILLFOCUS : - SDL_EnableKeyRepeat(0, 0); - _SGrActive = FALSE; - break; - case WM_SYSCOMMAND : if (wParam != SC_RESTORE) break; - case WM_SETFOCUS : - SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, - SDL_DEFAULT_REPEAT_INTERVAL); - _SGrActive = TRUE; - break; - case WM_ACTIVATEAPP : - if(_SGrActive && !SDL_LockSurface(_SGrScreen)) { - if(_SGrBackup != NULL) free(_SGrBackup); - _SGrLength = _SGrScreen->pitch * _SGrScreen->h; - _SGrBackup = malloc(_SGrLength); - if(_SGrBackup != NULL) - memcpy(_SGrBackup, _SGrScreen->pixels, _SGrLength); - SDL_UnlockSurface(_SGrScreen); - } - } - - return (CallWindowProc(wndproc, hwnd, msg, wParam, lParam)); -} -#endif - -static int setmode(GrVideoMode *mp,int noclear) -{ - int res; - GrVideoModeExt *ep = mp->extinfo; - int fullscreen = mp->privdata & SDL_FULLSCREEN; -#if defined (__WIN32__) - SDL_SysWMinfo info; -#endif - SDL_PixelFormat *vfmt; - GRX_ENTER(); - res = FALSE; - if(mp->mode != 0) { - if(!detect()) { - DBGPRINTF(DBG_DRIVER, ("SDL re-detect() failed\n")); - goto done; - } - - _SGrScreen = SDL_SetVideoMode(mp->width, mp->height, mp->bpp, - mp->privdata); - if(_SGrScreen == NULL) { - DBGPRINTF(DBG_DRIVER, ("SDL_SetVideoMode() failed\n")); - goto done; - } - if((_SGrScreen->flags & SDL_FULLSCREEN) != fullscreen) { - DBGPRINTF(DBG_DRIVER, ("SDL_FULLSCREEN mismatch\n")); - goto done; - } - - SDL_ShowCursor(SDL_DISABLE); - SDL_EnableUNICODE(1); - SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, - SDL_DEFAULT_REPEAT_INTERVAL); - SDL_SetEventFilter(filter); - - if(SDL_MUSTLOCK(_SGrScreen)) { - if(!fullscreen) { - DBGPRINTF(DBG_DRIVER, ("hardware windows not supported\n")); - goto done; - } - if(SDL_LockSurface(_SGrScreen)) { - DBGPRINTF(DBG_DRIVER, ("SDL_LockSurface() failed\n")); - goto done; - } -#if defined(__WIN32__) - SDL_VERSION(&info.version); - if(!SDL_GetWMInfo(&info)) { - DBGPRINTF(DBG_DRIVER, ("SDL_GetWMInfo() failed\n")); - goto done; - } - window = info.window; - wndproc = (WNDPROC)GetWindowLong(window, GWL_WNDPROC); - SetWindowLong(window, GWL_WNDPROC, (LONG) WndProc); - _SGrActive = TRUE; -#endif - } - - mp->lineoffset = _SGrScreen->pitch; - ep->frame = _SGrScreen->pixels; - - if(mp->bpp >= 15 && fullscreen) { - vfmt = _SGrScreen->format; - ep->cprec[0] = 8 - vfmt->Rloss; - ep->cprec[1] = 8 - vfmt->Gloss; - ep->cprec[2] = 8 - vfmt->Bloss; - ep->cpos[0] = vfmt->Rshift; - ep->cpos[1] = vfmt->Gshift; - ep->cpos[2] = vfmt->Bshift; - if(mp->bpp == 32 && vfmt->Rshift == 24) - ep->mode = GR_frameSVGA32H_LFB; - } - - if(!noclear) { - if(mp->bpp == 8) loadcolor(0, 0, 0, 0); - SDL_FillRect(_SGrScreen, NULL, 0); - SDL_UpdateRect(_SGrScreen, 0, 0, 0, 0); - } - - res = TRUE; - } -done: if (res != TRUE) { - reset(); - res = mp->mode == 0; - } - GRX_RETURN(res); -} - -static void reset(void) -{ - GRX_ENTER(); -#if defined(__WIN32__) - _SGrActive = TRUE; - if(_SGrBackup != NULL) free(_SGrBackup); - _SGrBackup = NULL; -#endif - if(_SGrScreen != NULL) - if(SDL_MUSTLOCK(_SGrScreen)) SDL_UnlockSurface(_SGrScreen); - if(SDL_WasInit(SDL_INIT_VIDEO)) SDL_Quit(); - _SGrScreen = NULL; - GRX_LEAVE(); -} - -static int detect(void) -{ - int res; - GRX_ENTER(); - res = SDL_WasInit(SDL_INIT_VIDEO) || SDL_Init(SDL_INIT_VIDEO) == 0; - GRX_RETURN(res); -} - -static void loadcolor(int c, int r, int g, int b) -{ - SDL_Color color; - - if(_SGrScreen != NULL) { - color.r = r; - color.g = g; - color.b = b; - SDL_SetPalette(_SGrScreen, SDL_PHYSPAL, &color, c, 1); - } -} - -static int build_video_mode(int mode, int flags, SDL_Rect *rect, - SDL_PixelFormat *vfmt, GrVideoMode *mp, - GrVideoModeExt *ep) -{ - mp->present = TRUE; - mp->bpp = vfmt->BitsPerPixel; - mp->width = rect->w; - mp->height = rect->h; - mp->mode = mode; - mp->lineoffset = 0; - mp->privdata = flags | SDL_HWPALETTE; - mp->extinfo = NULL; - - ep->drv = NULL; - ep->frame = NULL; - ep->flags = GR_VMODEF_LINEAR; - ep->setup = setmode; - ep->setvsize = NULL; - ep->scroll = NULL; - ep->setbank = NULL; - ep->setrwbanks = NULL; - ep->loadcolor = NULL; - - switch(mp->bpp) { - case 8 : - ep->cprec[0] = - ep->cprec[1] = - ep->cprec[2] = 6; - ep->cpos[0] = - ep->cpos[1] = - ep->cpos[2] = 0; - ep->mode = GR_frameSDL8; - ep->loadcolor = loadcolor; - break; - case 15 : - case 16 : ep->mode = GR_frameSDL16; break; - case 24 : ep->mode = GR_frameSDL24; break; - case 32 : ep->mode = GR_frameSDL32L; break; - default : return(FALSE); - } - - if(mp->width == MaxWidth && mp->height == MaxHeight) - mp->privdata |= SDL_NOFRAME; - - if(mp->bpp >= 15) { - if(flags & SDL_FULLSCREEN) { - ep->cprec[0] = - ep->cprec[1] = - ep->cprec[2] = 0; - ep->cpos[0] = - ep->cpos[1] = - ep->cpos[2] = 0; - } - else { - ep->cprec[0] = 8 - vfmt->Rloss; - ep->cprec[1] = 8 - vfmt->Gloss; - ep->cprec[2] = 8 - vfmt->Bloss; - ep->cpos[0] = vfmt->Rshift; - ep->cpos[1] = vfmt->Gshift; - ep->cpos[2] = vfmt->Bshift; - if(mp->bpp == 32 && vfmt->Rshift == 24) - ep->mode = GR_frameSDL32H; - } - } - - return(TRUE); -} - -GrVideoModeExt grtextextsdl = { - GR_frameText, /* frame driver */ - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - { 0, 0, 0 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -#define NUM_MODES 200 /* max # of supported modes */ -#define NUM_EXTS 10 /* max # of mode extensions */ - -static GrVideoModeExt exts[NUM_EXTS]; -static GrVideoMode modes[NUM_MODES] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - { TRUE, 8, 80, 25, 0x00, 80, 1, &grtextextsdl }, - { 0 } -}; - -/* from svgalib.c, unmodified */ -static void add_video_mode( - GrVideoMode *mp, GrVideoModeExt *ep, - GrVideoMode **mpp,GrVideoModeExt **epp -) { - if(*mpp < &modes[NUM_MODES]) { - if(!mp->extinfo) { - GrVideoModeExt *etp = &exts[0]; - while(etp < *epp) { - if(memcmp(etp,ep,sizeof(GrVideoModeExt)) == 0) { - mp->extinfo = etp; - break; - } - etp++; - } - if(!mp->extinfo) { - if(etp >= &exts[NUM_EXTS]) return; - sttcopy(etp,ep); - mp->extinfo = etp; - *epp = ++etp; - } - } - sttcopy(*mpp,mp); - (*mpp)++; - } -} - -#define NUM_RESOS 7 - -struct { - int w, h; -} -resos[NUM_RESOS] = { - { 320, 240 }, - { 640, 480 }, - { 800, 600 }, - { 1024, 768 }, - { 1280, 1024 }, - { 1600, 1200 }, - { 9999, 9999 } -}; - -static int init(char *options) -{ - int res; - SDL_Rect **rects; - int *bpp, n; - int bpps[] = { 8, 15, 16, 24, 32, 0 }; - SDL_PixelFormat fmt; - const SDL_VideoInfo *vi; -#if defined(__XWIN__) - Display *dsp; -#endif - SDL_Rect rect = { 0, 0, 0, 0 }; - int i; - GrVideoMode mode, *modep = &modes[1]; - GrVideoModeExt ext, *extp = &exts[0]; - GRX_ENTER(); - res = FALSE; - if(detect()) { - if(options) { - if(!strncmp(options, "fs", 2)) fullscreen = TRUE; - else if(!strncmp(options, "ww", 2)) fullscreen = FALSE; - } - memzero(modep,(sizeof(modes) - sizeof(modes[0]))); - if(fullscreen) { - memzero(&fmt, sizeof fmt); - for(bpp = bpps; *bpp; bpp++) { - fmt.BitsPerPixel = *bpp; - rects = SDL_ListModes(&fmt, SDL_HWSURFACE|SDL_FULLSCREEN); - if(rects != NULL && rects != (SDL_Rect **) -1) { - for(n = 0; rects[n] != NULL; n++); - for(i = n - 1; i >= 0; i--) { - if(!build_video_mode(n-i, - SDL_HWSURFACE|SDL_FULLSCREEN, - rects[i], &fmt, &mode, &ext)) - continue; - add_video_mode(&mode,&ext,&modep,&extp); - } - } - } - } - if(modep == &modes[1]) { - if((vi = SDL_GetVideoInfo()) == NULL) { - DBGPRINTF(DBG_DRIVER, ("SDL_GetVideoInfo() failed\n")); - goto done; - } -#if defined(__WIN32__) - MaxWidth = GetSystemMetrics(SM_CXSCREEN); - MaxHeight = GetSystemMetrics(SM_CYSCREEN); -#elif defined(__XWIN__) - if((dsp = XOpenDisplay("")) != NULL) { - MaxWidth = DisplayWidth(dsp, DefaultScreen(dsp)); - MaxHeight = DisplayHeight(dsp, DefaultScreen(dsp)); - XCloseDisplay(dsp); - } - else { - MaxWidth = 9600; - MaxHeight = 7200; - } -#endif - for(i = 0; i < NUM_RESOS; i++) { - rect.w = resos[i].w; - rect.h = resos[i].h; - if(!build_video_mode(i+1, SDL_SWSURFACE, &rect, vi->vfmt, - &mode, &ext)) - continue; - mode.present = rect.w <= MaxWidth && rect.h <= MaxHeight; - add_video_mode(&mode,&ext,&modep,&extp); - } - } - res = TRUE; - } -done: if(!res) reset(); - GRX_RETURN(res); -} - -static GrVideoMode *selectmode(GrVideoDriver *drv, int w, int h, - int bpp, int txt, unsigned int *ep) -{ - int i; - - if(!txt && !(modes[1].privdata & SDL_FULLSCREEN)) { - for(i = 1; i < NUM_RESOS; i++) - if(modes[i].width == w && modes[i].height == h) goto done; - if(w <= MaxWidth && h <= MaxHeight) { - modes[i].present = TRUE; - modes[i].width = w; - modes[i].height = h; - } - else modes[i].present = FALSE; - } -done: return(_gr_selectmode(drv, w, h, bpp, txt, ep)); -} - -GrVideoDriver _GrVideoDriverSDL = { - "sdl", /* name */ - GR_SDL, /* adapter type */ - NULL, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - detect, /* detection routine */ - init, /* initialization routine */ - reset, /* reset routine */ - selectmode, /* special mode select routine */ - 0 /* no additional capabilities */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/vd_win32.c b/thirdparty/grx249/src/vdrivers/vd_win32.c deleted file mode 100644 index 905e768..0000000 --- a/thirdparty/grx249/src/vdrivers/vd_win32.c +++ /dev/null @@ -1,713 +0,0 @@ -/** - ** vd_win32.c ---- the standard Win32-API driver - ** - ** Author: Gernot Graeff - ** E-mail: gernot.graeff@t-online.de - ** Date: 13.11.98 - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Changes by Josu Onandia (jonandia@fagorautomation.es) 21/02/2001 - ** - The colors loaded in the ColorList are guaranteed to be actually used - ** by Windows (GetNearestColor), for the GR_frameWin32 to work. - ** - When the window is created, it gets the maximum size allowed by the - ** current mode. Indeed this size is stored (maxWindowWidth/ - ** maxWindowHeight). - ** When the window is going to be resized (WM_GETMINMAXINFO) it's not - ** allowed to grow bigger than this maximum size (it makes nosense). - ** - Added some modes for 24bpp colors. - ** - When changed to text-mode, the graphics window is hidden. If the - ** application has a console (linked with -mconsole) it can use - ** printf/scanf and the like. - ** When changed again into graphics mode, the window reappears. - ** - Inter-task synchronization. In some cases the two threads are - ** manipulating at the same time the main window, and the on-memory - ** bitmap. I guess this is causing trouble, so in some cases the main - ** thread suspends the worker thread, make its operation, and then - ** resumes it. - ** - The window title is selectable with a define, at compile time. - ** If not defined, it defaults to "GRX". - ** - ** Changes by M.Alvarez (malfer@telefonica.net) 02/01/2002 - ** - Go to full screen if the framemode dimensions are equal to - ** the screen dimensions (setting the client start area at 0,0). - ** - ** Changes by M.Alvarez (malfer@telefonica.net) 02/02/2002 - ** - The w32 imput queue implemented as a circular queue. - ** - All the input related code moved to w32inp.c - ** - The main window is created in WinMain, so the grx program - ** can use other videodrivers like the memory one. - ** - ** Changes by M.Alvarez (malfer@telefonica.net) 11/02/2002 - ** - Now the GRX window is properly closed, so the previous app - ** gets the focus. - ** - ** Changes by M.Alvarez (malfer@telefonica.net) 31/03/2002 - ** - Accepts arbitrary (user defined) resolution. - ** - ** Changes by Thomas Demmer (TDemmer@krafteurope.com) - ** - Instead of begin with WinMain and start a thread with the main - ** GRX program, do it backward: begin in main and start a thread to - ** handle the Windows window. With this change we get rid of the - ** awful GRXMain special entry point. - ** - ** Changes by M.Alvarez (malfer@telefonica.net) 12/02/2003 - ** - Sanitize the Thomas changes. - ** - ** Changes by Thomas Demmer (TDemmer@krafteurope.com) 18/03/2003 - ** - Use a DIB for the hDCMem. - ** - ** Changes by Josu Onandia (jonandia@fagorautomation.es) 19/03/2003 - ** - With the Thomas idea of using a DIB, we can now use the DIB like - ** a linear frame buffer, so the new win32 framedrivers can take - ** advantage of the standard GRX frame drivers. - ** - ** Changes by Peter Gerwinski 19/06/2004 - ** - more W32 events handling - ** - ** Changes by Maurice Lombardi 21/08/2007 - ** - Corrections to WM_PAINT - ** 1 - revert the previous change: was saturating GrMouseInfo->queue - ** for fast paintings - ** 2 - GetUpdateRect() gave wrong UpdateRect !!! - ** - ** Changes by Peter Schauer 12/05/2008 - ** - vdrivers/vd_win32.c has a race condition with the loadcolor - ** SetDIBColorTable function call, which happens sometimes on - ** fast multiprocessor machines. This affects only 8 bpp modes, - ** as loadcolor is not called in 32 bpp modes. - ** If the WndThread is currently executing its BitBlt during WM_PAINT - ** processing and the GRX user thread is calling GrAllocColor, the - ** SetDIBColorTable function call fails, as the DC is locked by the BitBlt. - ** This results in the color not being set, which could also happen - ** during the initial setting of the VGA colors in _GrResetColors. - ** My proposed fix delays the SetDIBColorTable call and moves it to - ** the WM_PAINT processing, making it synchronous with the BitBlt call. - ** - ** Changes by M.Alvarez (malfer@telefonica.net) 01/12/2007 - ** - Added videomodes for wide monitors - ** - **/ - -#include "libwin32.h" -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" - -#ifndef GRXWINDOW_TITLE -#define GRXWINDOW_TITLE "GRX" -#endif - -HWND hGRXWnd = NULL; -HWND hPrvWnd = NULL; -HDC hDCMem = NULL; - -CRITICAL_SECTION _csEventQueue; -W32Event *_W32EventQueue = NULL; -volatile int _W32EventQueueSize = 0; -volatile int _W32EventQueueRead = 0; -volatile int _W32EventQueueWrite = 0; -volatile int _W32EventQueueLength = 0; - -static HBITMAP hBmpDIB = NULL; - -static int maxScreenWidth, maxScreenHeight; -static int maxWindowWidth, maxWindowHeight; - -HANDLE windowThread = INVALID_HANDLE_VALUE; -static HANDLE mainThread = INVALID_HANDLE_VALUE; - -static volatile int isWindowThreadRunning = 0; -static volatile int isMainWaitingTermination = 0; - -struct _GR_modifiedColors { - int modified; - RGBQUAD color; -}; -static struct _GR_modifiedColors modifiedColors[256]; -static volatile int isColorModified = 0; - -static DWORD WINAPI WndThread(void *param); -static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, - LPARAM lParam); - -static void loadcolor(int c, int r, int g, int b) -{ - RGBQUAD color; - color.rgbBlue = b; - color.rgbGreen = g; - color.rgbRed = r; - color.rgbReserved = 0; - if (c >= 0 && c <= 256) { - modifiedColors[c].color = color; - modifiedColors[c].modified = 1; - isColorModified = 1; - InvalidateRect(hGRXWnd, NULL, FALSE); - } -} - -static HBITMAP CreateDIB8(HDC hdc, int w, int h, char **pBits) -{ - BITMAPINFO *pbmInfo; - HBITMAP hBmp; - - pbmInfo = malloc(sizeof(BITMAPINFO) +256*sizeof(RGBQUAD)); - pbmInfo->bmiHeader.biSize = sizeof (BITMAPINFOHEADER); - pbmInfo->bmiHeader.biWidth = w; - pbmInfo->bmiHeader.biHeight = -h; - pbmInfo->bmiHeader.biPlanes = 1; - pbmInfo->bmiHeader.biBitCount = 8; - pbmInfo->bmiHeader.biCompression = BI_RGB; - pbmInfo->bmiHeader.biSizeImage = 0; - pbmInfo->bmiHeader.biXPelsPerMeter = 0; - pbmInfo->bmiHeader.biYPelsPerMeter = 0; - pbmInfo->bmiHeader.biClrUsed = 0; - pbmInfo->bmiHeader.biClrImportant = 0; - hBmp = CreateDIBSection(0, pbmInfo, DIB_RGB_COLORS, (void*)pBits, 0, 0); - free(pbmInfo); - return(hBmp); -} - -static HBITMAP CreateDIB24(HDC hdc, int w, int h, char **pBits) -{ - BITMAPINFO *pbmInfo; - HBITMAP hBmp; - - pbmInfo = malloc(sizeof(BITMAPINFO)); - pbmInfo->bmiHeader.biSize = sizeof (BITMAPINFOHEADER); - pbmInfo->bmiHeader.biWidth = w; - pbmInfo->bmiHeader.biHeight = -h; - pbmInfo->bmiHeader.biPlanes = 1; - pbmInfo->bmiHeader.biBitCount = 24; - pbmInfo->bmiHeader.biCompression = BI_RGB; - pbmInfo->bmiHeader.biSizeImage = 0; - pbmInfo->bmiHeader.biXPelsPerMeter = 0; - pbmInfo->bmiHeader.biYPelsPerMeter = 0; - pbmInfo->bmiHeader.biClrUsed = 0; - pbmInfo->bmiHeader.biClrImportant = 0; - hBmp = CreateDIBSection(0, pbmInfo, DIB_RGB_COLORS, (void*)pBits, 0, 0); - free(pbmInfo); - return(hBmp); -} - -static int setmode(GrVideoMode * mp, int noclear) -{ - RECT Rect; - HDC hDC; - HBRUSH hBrush; - RGBQUAD color; - int inipos; - - if (mp->extinfo->mode != GR_frameText) { - inipos = 50; - if (mp->width == maxScreenWidth && mp->height == maxScreenHeight) - inipos = 0; - Rect.left = inipos; - Rect.top = inipos; - Rect.right = mp->width + inipos; - Rect.bottom = mp->height + inipos; - AdjustWindowRect(&Rect, WS_OVERLAPPEDWINDOW, FALSE); - maxWindowWidth = Rect.right - Rect.left; - maxWindowHeight = Rect.bottom - Rect.top; - SetWindowPos(hGRXWnd, NULL, - Rect.left, Rect.top, - maxWindowWidth, maxWindowHeight, - SWP_DRAWFRAME | SWP_NOZORDER | SWP_SHOWWINDOW); - - if (hBmpDIB != NULL) { - DeleteObject(hBmpDIB); - hBmpDIB = NULL; - } - hDC = GetDC(hGRXWnd); - if (hDCMem == NULL) - hDCMem = CreateCompatibleDC(hDC); - if (mp->bpp == 8) { - hBmpDIB = CreateDIB8(hDC, mp->width, mp->height, - &mp->extinfo->frame); - } else { - hBmpDIB = CreateDIB24(hDC, mp->width, mp->height, - &mp->extinfo->frame); - } - SelectObject(hDCMem, hBmpDIB); - if (mp->bpp == 8) { - color.rgbBlue = color.rgbGreen = color.rgbRed = - color.rgbReserved = 0; - SetDIBColorTable(hDCMem, 0, 1, &color); - } - SetRect(&Rect, 0, 0, mp->width, mp->height); - hBrush = CreateSolidBrush(0); - FillRect(hDCMem, &Rect, hBrush); - if (mp->bpp == 8) - BitBlt(hDC, 0, 0, mp->width, mp->height, hDCMem, 0, 0, SRCCOPY); - else - FillRect(hDC, &Rect, hBrush); - ReleaseDC(hGRXWnd, hDC); - DeleteObject(hBrush); - UpdateWindow(hGRXWnd); - SetForegroundWindow(hGRXWnd); - } else { - /* If changing to text-mode, hide the graphics window. */ - if (hGRXWnd != NULL) { - ShowWindow(hGRXWnd, SW_HIDE); - SetForegroundWindow(hPrvWnd); - } - } - return (TRUE); -} - -static void setbank_dummy(int bk) -{ - bk = bk; -} - -GrVideoModeExt grtextext = { - GR_frameText, /* frame driver */ - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - {0, 0, 0}, /* color precisions */ - {0, 0, 0}, /* color component bit positions */ - 0, /* mode flag bits */ - setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoModeExt grxwinext8 = { - GR_frameWIN32_8, /* frame driver */ - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - {8, 8, 8}, /* color precisions */ - {0, 8, 16}, /* color component bit positions */ - 0, /* mode flag bits */ - setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - setbank_dummy, /* bank set function */ - NULL, /* double bank set function */ - loadcolor /* color loader */ -}; - -static GrVideoModeExt grxwinext24 = { - GR_frameWIN32_24, /* frame driver */ - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - {8, 8, 8}, /* color precisions */ - {16, 8, 0}, /* color component bit positions */ - 0, /* mode flag bits */ - setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - setbank_dummy, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoMode modes[] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - {TRUE, 8, 80, 25, 0x00, 80, 1, &grtextext}, - - {TRUE, 8, 320, 240, 0x00, 320, 0, &grxwinext8}, - {TRUE, 8, 640, 480, 0x00, 640, 0, &grxwinext8}, - {TRUE, 8, 800, 600, 0x00, 800, 0, &grxwinext8}, - {TRUE, 8, 1024, 768, 0x00, 1024, 0, &grxwinext8}, - {TRUE, 8, 1280, 1024, 0x00, 1280, 0, &grxwinext8}, - {TRUE, 8, 1600, 1200, 0x00, 1600, 0, &grxwinext8}, - {TRUE, 8, 1440, 900, 0x00, 1440, 0, &grxwinext8}, - {TRUE, 8, 1680, 1050, 0x00, 1680, 0, &grxwinext8}, - {TRUE, 8, 1920, 1200, 0x00, 1920, 0, &grxwinext8}, - {TRUE, 8, 2560, 1600, 0x00, 2560, 0, &grxwinext8}, - - {TRUE, 24, 320, 240, 0x00, 960, 0, &grxwinext24}, - {TRUE, 24, 640, 480, 0x00, 1920, 0, &grxwinext24}, - {TRUE, 24, 800, 600, 0x00, 2400, 0, &grxwinext24}, - {TRUE, 24, 1024, 768, 0x00, 3072, 0, &grxwinext24}, - {TRUE, 24, 1280, 1024, 0x00, 3840, 0, &grxwinext24}, - {TRUE, 24, 1600, 1200, 0x00, 4800, 0, &grxwinext24}, - {TRUE, 24, 1440, 900, 0x00, 4320, 0, &grxwinext24}, - {TRUE, 24, 1680, 1050, 0x00, 5040, 0, &grxwinext24}, - {TRUE, 24, 1920, 1200, 0x00, 5760, 0, &grxwinext24}, - {TRUE, 24, 2560, 1600, 0x00, 7680, 0, &grxwinext24}, - - {FALSE, 0, 9999, 9999, 0x00, 0, 0, NULL} -}; - -static int detect(void) -{ - static int inited = 0; - WNDCLASSEX wndclass; - - if (!inited) { - wndclass.cbSize = sizeof(wndclass); - wndclass.style = CS_HREDRAW | CS_VREDRAW; - wndclass.lpfnWndProc = WndProc; - wndclass.cbClsExtra = 0; - wndclass.cbWndExtra = 0; - wndclass.hInstance = GetModuleHandle(NULL); - wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); - wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); - wndclass.lpszMenuName = NULL; - wndclass.lpszClassName = "GRXCLASS"; - wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); - if (RegisterClassEx(&wndclass)== 0) return FALSE; - inited = 1; - } - - return TRUE; -} - -static int init(char *options) -{ - int i; - DWORD thread_id; - - if (!detect()) return FALSE; - - /* WARNING: mainThread can not be used in the windowThread */ - mainThread = GetCurrentThread(); - - hPrvWnd = GetForegroundWindow(); - - InitializeCriticalSection(&_csEventQueue); - - /* The modes not compatible width the configuration */ - /* of Windows are made 'non-present' */ - maxScreenWidth = GetSystemMetrics(SM_CXSCREEN); - for (i = 1; i < itemsof(modes); i++) { - if (modes[i].width > maxScreenWidth) - modes[i].present = FALSE; - } - maxScreenHeight = GetSystemMetrics(SM_CYSCREEN); - for (i = 1; i < itemsof(modes); i++) { - if (modes[i].height > maxScreenHeight) - modes[i].present = FALSE; - } - - windowThread = CreateThread(NULL, 0, WndThread, NULL, 0, &thread_id); - - /* Wait for thread creating the window. This is a busy */ - /* waiting loop (bad), but we Sleep to yield (good) */ - while (isWindowThreadRunning == 0) - Sleep(1); - - return TRUE; -} - -static void reset(void) -{ - isMainWaitingTermination = 1; - PostMessage(hGRXWnd, WM_CLOSE, 0, 0); - - while (isWindowThreadRunning == 1) - Sleep(1); - - isMainWaitingTermination = 0; - DeleteCriticalSection(&_csEventQueue); - - if(hBmpDIB != NULL) - { - DeleteObject(hBmpDIB); - hBmpDIB = NULL; - } - if (hDCMem != NULL) { - DeleteDC(hDCMem); - hDCMem = NULL; - } -} - -static GrVideoMode * _w32_selectmode(GrVideoDriver * drv, int w, int h, - int bpp, int txt, unsigned int * ep) -{ - GrVideoMode *mp, *res; - long resto; - - if (txt) { - res = _gr_selectmode(drv, w, h, bpp, txt, ep); - goto done; - } - for (mp = &modes[1]; mp < &modes[itemsof(modes)-1]; mp++) { - if (mp->present && mp->width == w && mp->height == h) { - res = _gr_selectmode(drv, w, h, bpp, txt, ep); - goto done; - } - } - /* no predefined mode found. Create a new mode if we can*/ - if (w <= maxScreenWidth && h <= maxScreenHeight) { - mp->present = TRUE; - mp->width = w; - mp->height = h; - if (bpp <= 8) { - mp->bpp = 8; - mp->extinfo = &grxwinext8; - resto = mp->width % 4; - if (resto) resto = 4 - resto; - mp->lineoffset = mp->width + resto; - } - else { - mp->bpp = 24; - mp->extinfo = &grxwinext24; - resto = (mp->width * 3) % 4; - if (resto) resto = 4 - resto; - mp->lineoffset = mp->width * 3 + resto; - } - } - res = _gr_selectmode(drv, w, h, bpp, txt, ep); -done: - return res; -} - -GrVideoDriver _GrVideoDriverWIN32 = { - "win32", /* name */ - GR_WIN32, /* adapter type */ - NULL, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - detect, /* detection routine */ - init, /* initialization routine */ - reset, /* reset routine */ - _w32_selectmode, /* special mode select routine */ - GR_DRIVERF_USER_RESOLUTION /* arbitrary resolution possible */ -}; - -static DWORD WINAPI WndThread(void *param) -{ - MSG msg; - - hGRXWnd = CreateWindow("GRXCLASS", GRXWINDOW_TITLE, - WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU - | WS_THICKFRAME | WS_MINIMIZEBOX, 0, 0, - CW_USEDEFAULT, CW_USEDEFAULT, NULL, - NULL, GetModuleHandle(NULL), NULL); - ShowWindow(hGRXWnd, SW_HIDE); - - isWindowThreadRunning = 1; - - while (GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - isWindowThreadRunning = 0; - - ExitThread(0); - return 0; -} - -static int convertwin32keystate(void) -{ - int fkbState = 0; - - if (GetKeyState(VK_SHIFT) < 0) - fkbState |= GR_KB_SHIFT; - if (GetKeyState(VK_CONTROL) < 0) - fkbState |= GR_KB_CTRL; - if (GetKeyState(VK_MENU) < 0) - fkbState |= GR_KB_ALT; - if (GetKeyState(VK_SCROLL) < 0) - fkbState |= GR_KB_SCROLLOCK; - if (GetKeyState(VK_NUMLOCK) < 0) - fkbState |= GR_KB_NUMLOCK; - if (GetKeyState(VK_CAPITAL) < 0) - fkbState |= GR_KB_CAPSLOCK; - if (GetKeyState(VK_INSERT) < 0) - fkbState |= GR_KB_INSERT; - return fkbState; -} - -static void EnqueueW32Event(UINT uMsg, WPARAM wParam, LPARAM lParam, - int kbstat) -{ - if (_W32EventQueue == NULL) - return; - - EnterCriticalSection(&_csEventQueue); - _W32EventQueue[_W32EventQueueWrite].uMsg = uMsg; - _W32EventQueue[_W32EventQueueWrite].wParam = wParam; - _W32EventQueue[_W32EventQueueWrite].lParam = lParam; - _W32EventQueue[_W32EventQueueWrite].kbstat = kbstat; - if (++_W32EventQueueWrite == _W32EventQueueSize) - _W32EventQueueWrite = 0; - if (++_W32EventQueueLength > _W32EventQueueSize) { - _W32EventQueueLength--; - if (++_W32EventQueueRead == _W32EventQueueSize) - _W32EventQueueRead = 0; - } - LeaveCriticalSection(&_csEventQueue); -} - -static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, - LPARAM lParam) -{ - static int cursorOn = 1; - int kbstat; - BOOL fInsert; - - switch (uMsg) { - - case WM_NCHITTEST: - { - LRESULT res = DefWindowProc(hWnd, uMsg, wParam, lParam); - if (res == HTCLIENT) { - if (cursorOn) { - ShowCursor(FALSE); - cursorOn = 0; - } - } else { - if (!cursorOn) { - ShowCursor(TRUE); - cursorOn = 1; - } - } - return res; - } - - case WM_CLOSE: - if (!isMainWaitingTermination && MessageBox(hWnd, - "This will abort the program\nare you sure?", "Abort", - MB_APPLMODAL | MB_ICONQUESTION | MB_YESNO ) != IDYES) - return 0; - DestroyWindow(hWnd); - if (!isMainWaitingTermination) - { - isWindowThreadRunning = 0; - ExitProcess(1); - } - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - case WM_GETMINMAXINFO: - { - LPMINMAXINFO lpmmi = (LPMINMAXINFO) lParam; - - lpmmi->ptMaxSize.x = lpmmi->ptMaxTrackSize.x = maxWindowWidth; - lpmmi->ptMaxSize.y = lpmmi->ptMaxTrackSize.y = maxWindowHeight; - } - return 0; - - case WM_SYSCHAR: - fInsert = FALSE; - kbstat = convertwin32keystate(); - if (kbstat & GR_KB_ALT) { - if (wParam >= 'a' && wParam <= 'z') - fInsert = TRUE; - if (wParam >= 'A' && wParam <= 'Z') - fInsert = TRUE; - if (wParam >= '0' && wParam <= '9') - fInsert = TRUE; - } - if (!fInsert) - break; - EnqueueW32Event(uMsg, wParam, lParam, kbstat); - return 0; - - case WM_COMMAND: - case WM_CHAR: - case WM_KEYDOWN: - case WM_SYSKEYDOWN: - case WM_LBUTTONDOWN: - case WM_MBUTTONDOWN: - case WM_RBUTTONDOWN: - case WM_LBUTTONUP: - case WM_MBUTTONUP: - case WM_RBUTTONUP: - case WM_MOUSEMOVE: - { - kbstat = convertwin32keystate(); - EnqueueW32Event(uMsg, wParam, lParam, kbstat); - } - return 0; - - case WM_MOUSEWHEEL: - { - kbstat = convertwin32keystate(); - /* twice to simulate down up */ - EnqueueW32Event(uMsg, wParam, lParam, kbstat); - EnqueueW32Event(uMsg, wParam, lParam, kbstat); - } - return 0; - - - case WM_PAINT: - { - HDC hDC; - PAINTSTRUCT ps; - - if (isColorModified) { - int c; - - isColorModified = 0; - for (c = 0; c < 256; c++) { - if (modifiedColors[c].modified) { - int res; - - modifiedColors[c].modified = 0; - if ((res = SetDIBColorTable(hDCMem, c, 1, &modifiedColors[c].color)) != 1) - DBGPRINTF(DBG_DRIVER,("SetDIBColorTable returned %d (%ld) color %d\n", res, GetLastError(), c)); - } - } - } - - hDC = BeginPaint(hWnd, &ps); - BitBlt(hDC, - ps.rcPaint.left, ps.rcPaint.top, - ps.rcPaint.right - ps.rcPaint.left + 1, - ps.rcPaint.bottom - ps.rcPaint.top + 1, - hDCMem, ps.rcPaint.left, ps.rcPaint.top, SRCCOPY); - EndPaint(hWnd, &ps); - } - return 0; - - case WM_SYSCOMMAND: - case WM_NCCREATE: - case WM_NCPAINT: - case WM_NCMOUSEMOVE: - case WM_PALETTEISCHANGING: - case WM_ACTIVATEAPP: - case WM_NCCALCSIZE: - case WM_ACTIVATE: - case WM_NCACTIVATE: - case WM_SHOWWINDOW: - case WM_WINDOWPOSCHANGING: - case WM_GETTEXT: - case WM_SETFOCUS: - case WM_KILLFOCUS: - case WM_GETICON: - case WM_ERASEBKGND: - case WM_QUERYNEWPALETTE: - case WM_WINDOWPOSCHANGED: - case WM_GETDLGCODE: - case WM_MOVE: - case WM_SIZE: - case WM_SETCURSOR: - case WM_HELP: - case WM_KEYUP: - case WM_SYSKEYUP: - break; - - default: -/* - char szMsg[255]; - sprintf(szMsg, "Msg %x, wParam %d, lParam %d", - uMsg, wParam, lParam); - MessageBox(NULL, szMsg, "Msg", MB_OK); -*/ - break; - - } - - return DefWindowProc(hWnd, uMsg, wParam, lParam); -} diff --git a/thirdparty/grx249/src/vdrivers/vd_xfdga.c b/thirdparty/grx249/src/vdrivers/vd_xfdga.c deleted file mode 100644 index cb272ce..0000000 --- a/thirdparty/grx249/src/vdrivers/vd_xfdga.c +++ /dev/null @@ -1,396 +0,0 @@ -/** - ** vd_xfdga.c -- DGA2 driver (interface to X11 DGA2) - ** - ** Copyright (C) 2003 Dimitar Zhekov - ** [e-mail: jimmy@is-vn.bg] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Changes by Dimitar Zhekov (jimmy@is-vn.bg) Aug 27 2003 - ** - use Xlib for rendering unless defined XF86DGA_FRAMEBUFFER - ** - **/ - -#include "libgrx.h" -#include "libxwin.h" -#include "grdriver.h" -#include "arith.h" -#include "memcopy.h" -#include "memfill.h" - -int _XGrWindowedMode = 1; - -static int setmode(GrVideoMode *mp,int noclear) -{ - int res; - XDGADevice *dev; - GRX_ENTER(); - res = FALSE; - DBGPRINTF(DBG_DRIVER, ("attempting to set DGA mode %d\n", mp->mode)); -#ifndef XF86DGA_FRAMEBUFFER - if(_XGrPatternGC != None) XFreeGC(_XGrDisplay, _XGrPatternGC); - if(_XGrPattern != None) XFreePixmap(_XGrDisplay, _XGrPattern); - if(_XGrBitmapGC != None) XFreeGC(_XGrDisplay, _XGrBitmapGC); - if(_XGrBitmap != None) XFreePixmap(_XGrDisplay, _XGrBitmap); - if(_XGrGC != None) XFreeGC(_XGrDisplay, _XGrGC); - _XGrGC = _XGrBitmapGC = _XGrPatternGC = None; - _XGrBitmap = _XGrPattern = None; -#endif - XUngrabPointer(_XGrDisplay, CurrentTime); - XUngrabKeyboard(_XGrDisplay, CurrentTime); - dev = XDGASetMode(_XGrDisplay, _XGrScreen, mp->mode); - if(mp->mode != 0) { - if(dev == NULL) { - DBGPRINTF(DBG_DRIVER, ("can't set DGA mode\n")); - goto done; - } -#ifdef XF86DGA_FRAMEBUFFER - mp->extinfo->frame = dev->data; -#else - mp->extinfo->frame = (char *) dev->pixmap; -#endif - XDGASync(_XGrDisplay, _XGrScreen); - XDGASetViewport(_XGrDisplay, _XGrScreen, 0, 0, XDGAFlipRetrace); - XGrabKeyboard(_XGrDisplay, _XGrWindow, True, GrabModeAsync, - GrabModeAsync, CurrentTime); - XGrabPointer(_XGrDisplay, _XGrWindow, True, StructureNotifyMask | - ButtonPressMask | ButtonReleaseMask | - ButtonMotionMask | PointerMotionMask, GrabModeAsync, - GrabModeAsync, None, None, CurrentTime); - if(mp->bpp == 8) { - if(_XGrColormap == None) { - /* one colormap for all modes, XFreeColormap() problems */ - _XGrColormap = XDGACreateColormap(_XGrDisplay, _XGrScreen, - dev, AllocAll); - } - if(_XGrColormap != None) { - XDGAInstallColormap(_XGrDisplay, _XGrScreen, _XGrColormap); - _GR_lastFreeColor = 255; - } - } -#ifdef XF86DGA_FRAMEBUFFER - if(!noclear) memzero(dev->data, mp->lineoffset * mp->height); -#else - _XGrDepth = _XGrBitsPerPixel = mp->bpp; - if(_XGrDepth == 32) _XGrDepth = 24; - _XGrForeColor = GrNOCOLOR; /* force XSetForeground */ - _XGrBackColor = GrNOCOLOR; /* force XSetBackground */ - _XGrColorOper = C_WRITE; - _XGrGC = XCreateGC(_XGrDisplay, dev->pixmap, 0L, NULL); - _XGrBitmap = XCreatePixmap(_XGrDisplay, dev->pixmap, 128, 128, 1); - _XGrBitmapGC = XCreateGC(_XGrDisplay, _XGrBitmap, 0L, NULL); - _XGrPattern = XCreatePixmap(_XGrDisplay, dev->pixmap, 8, 1, 1); - _XGrPatternGC = XCreateGC(_XGrDisplay, _XGrPattern, 0L, NULL); - if(!noclear) { - XSetForeground(_XGrDisplay, _XGrGC, 0); - XSetFunction(_XGrDisplay, _XGrGC, GXcopy); - XFillRectangle(_XGrDisplay, dev->pixmap, _XGrGC, 0, 0, - mp->width, mp->height); - } -#endif - } - res = TRUE; -done: if(dev != NULL) XFree(dev); - GRX_RETURN(res); -} - -static void reset(void) -{ - XDGADevice *dev; - GRX_ENTER(); - if(_XGrDisplay != NULL) { - XUngrabPointer(_XGrDisplay, CurrentTime); - XUngrabKeyboard(_XGrDisplay, CurrentTime); -#ifdef XF86DGA_FRAMEBUFFER - XDGACloseFramebuffer(_XGrDisplay, _XGrScreen); -#endif - dev = XDGASetMode(_XGrDisplay, _XGrScreen, 0); - if(dev != NULL) XFree(dev); - XCloseDisplay(_XGrDisplay); - } - _XGrDisplay = NULL; - _XGrColormap = None; - _GR_firstFreeColor = 0; - _GR_lastFreeColor = -1; - GRX_LEAVE(); -} - -static int detect(void) -{ - int res; - int event, error; - int major, minor; - GRX_ENTER(); - if(_XGrDisplay == NULL) { - res = FALSE; -#ifdef XF86DGA_FRAMEBUFFER - if(geteuid()) { - DBGPRINTF(DBG_DRIVER, ("root priviledges required\n")); - goto done; - } -#endif - if((_XGrDisplay = XOpenDisplay("")) == NULL) { - DBGPRINTF(DBG_DRIVER, ("can't connect to X server\n")); - goto done; - } - if(!XDGAQueryExtension(_XGrDisplay, &event, &error)) { - DBGPRINTF(DBG_DRIVER, ("can't query DGA extension\n")); - goto done; - } - if(!XDGAQueryVersion(_XGrDisplay, &major, &minor)) { - DBGPRINTF(DBG_DRIVER, ("can't query DGA version\n")); - goto done; - } - if(major < 2) { - DBGPRINTF(DBG_DRIVER, - ("required DGA version 2.0, detected %d.%d\n", - major, minor)); - goto done; - } - } - res = TRUE; -done: if(!res) reset(); - GRX_RETURN(res); -} - -#ifndef XF86DGA_FRAMEBUFFER -static void setbank(int bk) -{} - -static void setrwbanks(int rb,int wb) -{} -#endif - -static void loadcolor(int c,int r,int g,int b) -{ - XColor xcolor; - - if(_XGrColormap != None) { - xcolor.pixel = c; - xcolor.red = r * 257; - xcolor.green = g * 257; - xcolor.blue = b * 257; - xcolor.flags = DoRed | DoGreen | DoBlue; - XStoreColor(_XGrDisplay, _XGrColormap, &xcolor); - } -} - -#ifdef XF86DGA_FRAMEBUFFER -#define GRFRAMEDRIVER(bpp) GR_frameSVGA##bpp##_LFB -#else -#define GRFRAMEDRIVER(bpp) GR_frameXWIN##bpp -#endif - -static int build_video_mode(XDGAMode *ip, GrVideoMode *mp, GrVideoModeExt *ep) -{ - mp->present = TRUE; - mp->bpp = ip->depth; - mp->width = ip->viewportWidth; - mp->height = ip->viewportHeight; - mp->mode = ip->num; - mp->lineoffset = ip->bytesPerScanline; - mp->privdata = 0; - mp->extinfo = NULL; - - ep->drv = NULL; - ep->frame = NULL; -#ifdef XF86DGA_FRAMEBUFFER - ep->flags = GR_VMODEF_LINEAR; -#else - ep->flags = 0; -#endif - ep->setup = setmode; - ep->setvsize = NULL; - ep->scroll = NULL; -#ifdef XF86DGA_FRAMEBUFFER - ep->setbank = NULL; - ep->setrwbanks = NULL; -#else - ep->setbank = setbank; - ep->setrwbanks = setrwbanks; -#endif - ep->loadcolor = NULL; - - if(ip->visualClass != (mp->bpp == 8 ? PseudoColor : TrueColor)) { - DBGPRINTF(DBG_DRIVER, ("%d: visual class %s depth %d unsupported\n", - ip->num, _XGrClassNames[ip->visualClass], - mp->bpp)); - return(FALSE); - } - -#ifndef XF86DGA_FRAMEBUFFER - if(!(ip->flags & XDGAPixmap)) { - DBGPRINTF(DBG_DRIVER, ("%d: rendering with XLib impossible\n", - ip->num)); - return(FALSE); - } -#endif - - switch(mp->bpp) { - case 8 : - ep->mode = GRFRAMEDRIVER(8); - ep->cprec[0] = - ep->cprec[1] = - ep->cprec[2] = 6; - ep->cpos[0] = - ep->cpos[1] = - ep->cpos[2] = 0; - ep->loadcolor = loadcolor; - break; - case 15 : - ep->mode = GRFRAMEDRIVER(16); - ep->cprec[0] = - ep->cprec[1] = - ep->cprec[2] = 5; - ep->cpos[0] = 10; - ep->cpos[1] = 5; - ep->cpos[2] = 0; - break; - case 16 : - ep->mode = GRFRAMEDRIVER(16); - ep->cprec[0] = 5; - ep->cprec[1] = 6; - ep->cprec[2] = 5; - ep->cpos[0] = 11; - ep->cpos[1] = 5; - ep->cpos[2] = 0; - break; - case 24 : - ep->cprec[0] = - ep->cprec[1] = - ep->cprec[2] = 8; - ep->cpos[0] = 16; - ep->cpos[1] = 8; - ep->cpos[2] = 0; - ep->mode = GRFRAMEDRIVER(24); - if(ip->bitsPerPixel == 32) { - mp->bpp = 32; - ep->mode = GRFRAMEDRIVER(32L); - if(ip->redMask == 0xFF000000) { - ep->cpos[0] = 24; - ep->cpos[1] = 16; - ep->cpos[2] = 8; - ep->mode = GRFRAMEDRIVER(32H); - } - } - break; - default: - return(FALSE); - } - - return(TRUE); -} - -GrVideoModeExt grtextextdga = { - GR_frameText, /* frame driver */ - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - { 0, 0, 0 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -#define NUM_MODES 200 /* max # of supported modes */ -#define NUM_EXTS 10 /* max # of mode extensions */ - -static GrVideoModeExt exts[NUM_EXTS]; -static GrVideoMode modes[NUM_MODES] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - { TRUE, 8, 80, 25, 0x00, 80, 1, &grtextextdga }, - { 0 } -}; - -/* from svgalib.c, unmodified */ -static void add_video_mode( - GrVideoMode *mp, GrVideoModeExt *ep, - GrVideoMode **mpp,GrVideoModeExt **epp -) { - if(*mpp < &modes[NUM_MODES]) { - if(!mp->extinfo) { - GrVideoModeExt *etp = &exts[0]; - while(etp < *epp) { - if(memcmp(etp,ep,sizeof(GrVideoModeExt)) == 0) { - mp->extinfo = etp; - break; - } - etp++; - } - if(!mp->extinfo) { - if(etp >= &exts[NUM_EXTS]) return; - sttcopy(etp,ep); - mp->extinfo = etp; - *epp = ++etp; - } - } - sttcopy(*mpp,mp); - (*mpp)++; - } -} - -static int init(char *options) -{ - int res; - XDGAMode *modev = NULL; - int modec, mindex; - GrVideoMode mode, *modep = &modes[1]; - GrVideoModeExt ext, *extp = &exts[0]; - GRX_ENTER(); - res = FALSE; - if(detect()) { - _XGrScreen = DefaultScreen(_XGrDisplay); - _XGrWindow = DefaultRootWindow(_XGrDisplay); -#ifdef XF86DGA_FRAMEBUFFER - if(!XDGAOpenFramebuffer(_XGrDisplay, _XGrScreen)) { - DBGPRINTF(DBG_DRIVER, ("can't open framebuffer\n")); - goto done; - } -#endif - modev = XDGAQueryModes(_XGrDisplay, _XGrScreen, &modec); - if(modev == NULL) { - DBGPRINTF(DBG_DRIVER, ("can't query DGA modes")); - goto done; - } - memzero(modep,(sizeof(modes) - sizeof(modes[0]))); - for(mindex = 0; mindex < modec; mindex++) { - if(!build_video_mode(&modev[mindex], &mode, &ext)) continue; - add_video_mode(&mode,&ext,&modep,&extp); - } - _XGrWindowedMode = 0; - _XGrColormap = None; -#ifndef XF86DGA_FRAMEBUFFER - _XGrColorNumPixels = 0; -#endif - res = TRUE; - } -done: if(modev != NULL) XFree(modev); - if(!res) reset(); - GRX_RETURN(res); -} - -GrVideoDriver _GrVideoDriverXF86DGA = { - "xf86dga", /* name */ - GR_XWIN, /* adapter type */ - NULL, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - detect, /* detection routine */ - init, /* initialization routine */ - reset, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/vd_xwin.c b/thirdparty/grx249/src/vdrivers/vd_xwin.c deleted file mode 100644 index f73652e..0000000 --- a/thirdparty/grx249/src/vdrivers/vd_xwin.c +++ /dev/null @@ -1,547 +0,0 @@ -/** - ** vd_xwin.c ---- the standard X Window driver - ** - ** Author: Ulrich Leodolter - ** E-mail: ulrich@lab1.psy.univie.ac.at - ** Date: Thu Sep 28 09:29:26 1995 - ** RCSId: $Id: vd_xwin.c 1.2 1995/11/19 19:28:12 ulrich Exp $ - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: - ** 070505 M.Alvarez, Using a Pixmap for BackingStore - ** 071201 M.Alvarez, Added videomodes for wide monitors - ** 071201 M.Alvarez, The modes higher than the X resolution - ** are made 'non-present' - ** 071201 M.Alvarez, go to fullscreen if w,h == X resolution - ** GR_biggest_graphics is honored - **/ - -#include "libgrx.h" -#include "libxwin.h" -#include "grdriver.h" -#include "arith.h" - -Display * _XGrDisplay; -int _XGrScreen; -Window _XGrWindow; -Pixmap _XGrBitmap; -Pixmap _XGrPattern; -Pixmap _XGrBStore; -Colormap _XGrColormap; -GC _XGrGC; -GC _XGrBitmapGC; -GC _XGrPatternGC; -XIM _XGrXim = NULL; -XIC _XGrXic = NULL; -unsigned long _XGrForeColor; -unsigned long _XGrBackColor; -unsigned int _XGrColorOper; -unsigned int _XGrDepth; -unsigned int _XGrBitsPerPixel; -unsigned int _XGrScanlinePad; -unsigned int _XGrMaxWidth; -unsigned int _XGrMaxHeight; -int _XGrBStoreInited = 0; -int _XGrFullScreen = 0; - -unsigned long _XGrColorPlanes[8]; -unsigned int _XGrColorNumPlanes; -unsigned long _XGrColorPixels[2]; -unsigned int _XGrColorNumPixels; - -char *_XGrClassNames[6] = { - "StaticGray", - "GrayScale", - "StaticColor", - "PseudoColor", - "TrueColor", - "DirectColor" -}; - -static void setbank(int bk); -static void setrwbanks(int rb,int wb); -static void loadcolor(int c,int r,int g,int b); -static int setmode(GrVideoMode *mp,int noclear); - -GrVideoModeExt grtextext = { - GR_frameText, /* frame driver */ - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - { 0, 0, 0 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - NULL, /* bank set function */ - NULL, /* double bank set function */ - NULL /* color loader */ -}; - -static GrVideoModeExt grxwinext = { - GR_frameUndef, /* frame driver */ - NULL, /* frame driver override */ - NULL, /* frame buffer address */ - { 0, 0, 0 }, /* color precisions */ - { 0, 0, 0 }, /* color component bit positions */ - 0, /* mode flag bits */ - setmode, /* mode set */ - NULL, /* virtual size set */ - NULL, /* virtual scroll */ - setbank, /* bank set function */ - setrwbanks, /* double bank set */ - loadcolor /* color loader */ -}; - -static GrVideoMode modes[] = { - /* pres. bpp wdt hgt BIOS scan priv. &ext */ - { TRUE, 8, 80, 25, 0x00, 80, 1, &grtextext }, - { FALSE, 0, 320, 240, 0x00, 0, 0, &grxwinext }, - { FALSE, 0, 640, 480, 0x00, 0, 0, &grxwinext }, - { FALSE, 0, 800, 600, 0x00, 0, 0, &grxwinext }, - { FALSE, 0, 1024, 768, 0x00, 0, 0, &grxwinext }, - { FALSE, 0, 1280, 1024, 0x00, 0, 0, &grxwinext }, - { FALSE, 0, 1600, 1200, 0x00, 0, 0, &grxwinext }, - { FALSE, 0, 1440, 900, 0x00, 0, 0, &grxwinext }, - { FALSE, 0, 1680, 1050, 0x00, 0, 0, &grxwinext }, - { FALSE, 0, 1920, 1200, 0x00, 0, 0, &grxwinext }, - { FALSE, 0, 2560, 1600, 0x00, 0, 0, &grxwinext }, - { FALSE, 0, 9999, 9999, 0x00, 0, 0, &grxwinext } -}; - -static void goto_fullscreen(Display *dsp, Window win) -{ - XEvent xev; - Atom wm_state = XInternAtom(dsp, "_NET_WM_STATE", False); - Atom fullscreen = XInternAtom(dsp, "_NET_WM_STATE_FULLSCREEN", False); - memset(&xev, 0, sizeof(xev)); - xev.type = ClientMessage; - xev.xclient.window = win; - xev.xclient.message_type = wm_state; - xev.xclient.format = 32; - xev.xclient.data.l[0] = 1; // _NET_WM_STATE_ADD - xev.xclient.data.l[1] = fullscreen; - xev.xclient.data.l[2] = 0; - XSendEvent(dsp, DefaultRootWindow(dsp), False, - SubstructureNotifyMask, &xev); -} - -static void returnfrom_fullscreen(Display *dsp, Window win) -{ - XEvent xev; - Atom wm_state = XInternAtom(dsp, "_NET_WM_STATE", False); - Atom fullscreen = XInternAtom(dsp, "_NET_WM_STATE_FULLSCREEN", False); - memset(&xev, 0, sizeof(xev)); - xev.type = ClientMessage; - xev.xclient.window = win; - xev.xclient.message_type = wm_state; - xev.xclient.format = 32; - xev.xclient.data.l[0] = 0; // _NET_WM_STATE_REMOVE - xev.xclient.data.l[1] = fullscreen; - xev.xclient.data.l[2] = 0; - XSendEvent(dsp, DefaultRootWindow(dsp), False, - SubstructureNotifyMask, &xev); -} - -static void setbank(int bk) -{} - -static void setrwbanks(int rb,int wb) -{} - -static void loadcolor(int c,int r,int g,int b) -{ - GRX_ENTER(); - if ( _XGrDisplay != NULL - && _XGrColormap != None - && ! ( _XGrColorNumPixels == 1 - && (c < _XGrColorPixels[0] || c > _XGrColorPixels[1])) ) { - XColor xcolor; - - DBGPRINTF(DBG_DRIVER,("Setting X11 color %d to r=%d, g=%d, b=%d\n",c,r,g,b)); - xcolor.pixel = c; - xcolor.red = r * 257; - xcolor.green = g * 257; - xcolor.blue = b * 257; - xcolor.flags = DoRed|DoGreen|DoBlue; - XStoreColor (_XGrDisplay, _XGrColormap, &xcolor); - } - GRX_LEAVE(); -} - -static int setmode(GrVideoMode *mp,int noclear) -{ - char name[100], *window_name, *icon_name; - int res; - - GRX_ENTER(); - res = FALSE; - if (_XGrWindow != None) { - - if (_XGrFullScreen) { - returnfrom_fullscreen(_XGrDisplay, _XGrWindow); - _XGrFullScreen = 0; - } - XUnmapWindow (_XGrDisplay, _XGrWindow); - if (_XGrBStoreInited) { - XFreePixmap(_XGrDisplay, _XGrBStore); - XFreeGC(_XGrDisplay, _XGrGC); - _XGrBStoreInited = 0; - } - - if (mp->extinfo->mode != GR_frameText) { - XSizeHints hints; - - XResizeWindow (_XGrDisplay, _XGrWindow, mp->width, mp->height); - if (USE_PIXMAP_FOR_BS ) { - _XGrBStore = XCreatePixmap (_XGrDisplay, _XGrWindow, mp->width, mp->height, _XGrDepth); - _XGrGC = XCreateGC (_XGrDisplay, _XGrBStore, 0L, NULL); - _XGrBStoreInited = 1; - XFillRectangle (_XGrDisplay, _XGrBStore, _XGrGC, 0, 0, mp->width, mp->height); - grxwinext.frame = (char *) _XGrBStore; - } - - sprintf (name, "grx %dx%dx%d", mp->width, mp->height, mp->bpp); - window_name = name; - icon_name = name; - - hints.min_width = mp->width; - hints.max_width = mp->width; - hints.min_height = mp->height; - hints.max_height = mp->height; - hints.flags = PMaxSize | PMinSize; - - XSetStandardProperties (_XGrDisplay, /* display */ - _XGrWindow, /* w */ - window_name, /* window_name */ - icon_name, /* icon_name */ - None, /* icon_pixmap */ - NULL, /* argv */ - 0, /* argc */ - &hints); /* hints */ - - XMapRaised (_XGrDisplay, _XGrWindow); - - /* Wait until window appears on screen */ - { - XEvent xevent; - - while (1) { - XNextEvent (_XGrDisplay, &xevent); - if (xevent.type == MapNotify) - break; - } - } - - /* Go to fullscreen if w,h == X resolution */ - if ((mp->width == _XGrMaxWidth) && (mp->height == _XGrMaxHeight)) { - goto_fullscreen(_XGrDisplay, _XGrWindow); - _XGrFullScreen = 1; - } - } - res = TRUE; - } - GRX_RETURN(res); -} - -static int (*previous_error_handler) (Display *dpy, XErrorEvent *ev); - -static int error_handler (Display *dpy, XErrorEvent *ev) -{ - char buffer[200]; - - /* - * This error is triggerd in fd_xwin.c:bltv2r() if the source rectangle - * is not fully contained in the root window - */ - if (ev->request_code == X_GetImage && ev->error_code == BadMatch) - return 0; - - if (previous_error_handler) - return (*previous_error_handler) (dpy, ev); - - XGetErrorText (dpy, ev->error_code, buffer, sizeof(buffer)), - fprintf (stderr, "GRX: XError: %s XID=%ld request_code=%d serial=%lu\n", - buffer, - ev->resourceid, - ev->request_code, - ev->serial); - return 0; -} - -static GrVideoMode * _xw_selectmode ( GrVideoDriver * drv, int w, int h, int bpp, - int txt, unsigned int * ep ) -{ - GrVideoMode *mp, *res; - GRX_ENTER(); - if (txt) { - res = _gr_selectmode(drv,w,h,bpp,txt,ep); - goto done; - } - for (mp = &modes[1]; mp < &modes[itemsof(modes)-1]; mp++) { - if ( mp->present && mp->width == w && mp->height == h) { - res = _gr_selectmode (drv,w,h,bpp,txt,ep); - goto done; - } - } - /* no predefined mode found. Create a new mode */ - mp->present = TRUE; - mp->width = (w > _XGrMaxWidth) ? _XGrMaxWidth : w; - mp->height = (h > _XGrMaxHeight) ? _XGrMaxHeight : h; - mp->lineoffset = (mp->width * mp->bpp) / 8; - res = _gr_selectmode (drv,w,h,bpp,txt,ep); -done: - GRX_RETURN(res); -} - -static int detect(void) -{ - int res; - GRX_ENTER(); - res = (getenv("DISPLAY") ? TRUE : FALSE); - GRX_RETURN(res); -} - -static int init(char *options) -{ - Window root; - XSetWindowAttributes attr; - unsigned long mask; - Visual *visual; - XPixmapFormatValues *pfmt; - int pfmt_count; - GrVideoMode *mp; - unsigned int depth, bpp, pad; - int private_colormap; - int i, j, res; - - - GRX_ENTER(); - res = FALSE; - private_colormap = FALSE; - _XGrDisplay = XOpenDisplay (""); - if (_XGrDisplay == NULL) - goto done; /* FALSE */ - - previous_error_handler = XSetErrorHandler (error_handler); - - _XGrScreen = DefaultScreen (_XGrDisplay); - _XGrDepth = depth = DefaultDepth (_XGrDisplay, _XGrScreen); - _XGrMaxWidth = DisplayWidth(_XGrDisplay, _XGrScreen); - _XGrMaxHeight = DisplayHeight(_XGrDisplay, _XGrScreen); - - visual = DefaultVisual (_XGrDisplay, _XGrScreen); - root = RootWindow (_XGrDisplay, _XGrScreen); - - if (options && (strncmp ("privcmap", options, 8) == 0)) { - private_colormap = TRUE; - } - - _XGrColorNumPlanes = 0; - _XGrColorNumPixels = 0; - - if (visual->class == PseudoColor - && (depth == 4 || depth == 8)) { - if (! private_colormap) { - /* - * Allocate at least 4 planes (= 16 colors) of writable cells - */ - _XGrColormap = DefaultColormap (_XGrDisplay, _XGrScreen); - for (i = depth - 1; i >= 4; i--) { - if (XAllocColorCells (_XGrDisplay, - _XGrColormap, - True, /* contiguous */ - _XGrColorPlanes, - i, - _XGrColorPixels, - 1)) { - _XGrColorNumPlanes = i; - _XGrColorNumPixels = 1; - _GR_firstFreeColor = _XGrColorPixels[0]; - _XGrColorPixels[1] = _XGrColorPixels[0]; - for (j = 0; j < _XGrColorNumPlanes; j++) { - _XGrColorPixels[1] |= _XGrColorPlanes[j]; - } - _GR_lastFreeColor = _XGrColorPixels[1]-1; - break; - } - } - if (_XGrColorNumPlanes == 0) - private_colormap = TRUE; - } - if (private_colormap) { - _XGrColormap = XCreateColormap (_XGrDisplay, root, visual, AllocAll); - } - grxwinext.cprec[0] = visual->bits_per_rgb; - grxwinext.cprec[1] = visual->bits_per_rgb; - grxwinext.cprec[2] = visual->bits_per_rgb; - grxwinext.cpos[0] = 0; - grxwinext.cpos[1] = 0; - grxwinext.cpos[2] = 0; - /* loadcolor (0, 0, 0, 0); */ /* load black */ - } - else if (visual->class == TrueColor - && (depth == 8 || depth == 15 || depth == 16 || depth == 24)) { - int i, pos, prec; - unsigned long mask[3]; - - _XGrColormap = (Colormap) 0; - mask[0] = visual->red_mask; - mask[1] = visual->green_mask; - mask[2] = visual->blue_mask; - for (i = 0; i < 3; i++) { - for (pos = 0; !(mask[i] & 1); pos++, mask[i]>>=1); - for (prec = 0; (mask[i] & 1); prec++, mask[i]>>=1); - grxwinext.cprec[i] = prec; - grxwinext.cpos[i] = pos; - } - } - else { - XCloseDisplay (_XGrDisplay); - fprintf (stderr, "GRX init: Visual class=%s depth=%d not supported\n", - _XGrClassNames[visual->class], depth); - exit (1); - } - _XGrForeColor = GrNOCOLOR; /* force XSetForeground */ - _XGrBackColor = GrNOCOLOR; /* force XSetBackground */ - _XGrColorOper = C_WRITE; - - mask = 0L; - attr.backing_store = NotUseful; - mask |= CWBackingStore; - if (_XGrColormap) { - attr.colormap = _XGrColormap; - mask |= CWColormap; - } - attr.background_pixel = 0L; - mask |= CWBackPixel; - attr.border_pixel = 0L; - mask |= CWBorderPixel; - attr.event_mask = (StructureNotifyMask - | KeyPressMask - | KeyReleaseMask - | ButtonPressMask - | ButtonReleaseMask - | ButtonMotionMask - | ExposureMask - | PointerMotionMask); - mask |= CWEventMask; - _XGrWindow = XCreateWindow (_XGrDisplay, - root, /* parent */ - 0, /* x */ - 0, /* y */ - 1, /* width */ - 1, /* height */ - 0, /* border_width */ - depth, /* depth */ - InputOutput, /* class */ - visual, /* visual */ - mask, /* valuemask */ - &attr); /* attributes */ - _XGrBitmap = XCreatePixmap (_XGrDisplay, root, 128, 128, 1); - _XGrBitmapGC = XCreateGC (_XGrDisplay, _XGrBitmap, 0L, NULL); - _XGrPattern = XCreatePixmap (_XGrDisplay, root, 8, 1, 1); - _XGrPatternGC = XCreateGC (_XGrDisplay, _XGrPattern, 0L, NULL); - - if (!USE_PIXMAP_FOR_BS) { - _XGrGC = XCreateGC (_XGrDisplay, _XGrWindow, 0L, NULL); - grxwinext.frame = (char *) _XGrWindow; - } - - /* is this required ?? */ - if (_XGrColormap) { - XInstallColormap(_XGrDisplay, _XGrColormap); - XSetWindowColormap(_XGrDisplay, _XGrWindow, _XGrColormap); - } - - pfmt = XListPixmapFormats (_XGrDisplay, &pfmt_count); - if (!pfmt || pfmt_count <= 0) { - XCloseDisplay (_XGrDisplay); - fprintf (stderr, "GRX init: cannot list pixmap formats\n"); - exit (1); - } - - bpp = 0; - pad = 0; - for (i = 0; i < pfmt_count; i++) { - if (pfmt[i].depth == depth) - { - bpp = pfmt[i].bits_per_pixel; - pad = pfmt[i].scanline_pad; - break; - } - } - XFree (pfmt); - if (!bpp) { - XCloseDisplay (_XGrDisplay); - fprintf (stderr, "GRX init: cannot find pixmap format\n"); - exit (1); - } - - switch (depth) { - case 1: grxwinext.mode = GR_frameXWIN1; break; - case 4: grxwinext.mode = GR_frameXWIN4; break; - case 8: grxwinext.mode = GR_frameXWIN8; break; - case 15: - case 16: grxwinext.mode = GR_frameXWIN16; break; - case 24: - switch (bpp) { - case 24: grxwinext.mode = GR_frameXWIN24; break; - case 32: grxwinext.mode = - (visual->red_mask & 0xff000000) ? GR_frameXWIN32H : GR_frameXWIN32L; break; - } - break; - } - - _XGrBitsPerPixel = bpp; - _XGrScanlinePad = pad; - - /* fixed size modes */ - for (mp = &modes[1]; mp < &modes[itemsof(modes)-1]; mp++) { - mp->present = TRUE; - mp->bpp = bpp; - mp->lineoffset = (mp->width * bpp) / 8; - if (mp->width > _XGrMaxWidth) mp->present = FALSE; - if (mp->height > _XGrMaxHeight) mp->present = FALSE; - } - /* this is the variable size mode */ - mp->present = FALSE; - mp->bpp = bpp; - mp->lineoffset = 0; - res = TRUE; -done: - GRX_RETURN( res ); -} - -static void reset(void) -{ - GRX_ENTER(); - if (_XGrDisplay) XCloseDisplay (_XGrDisplay); - _XGrDisplay = NULL; - _GR_firstFreeColor = 0; - _GR_lastFreeColor = -1; - GRX_LEAVE(); -} - -GrVideoDriver _GrVideoDriverXWIN = { - "xwin", /* name */ - GR_XWIN, /* adapter type */ - NULL, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - detect, /* detection routine */ - init, /* initialization routine */ - reset, /* reset routine */ - _xw_selectmode, /* special mode select routine */ - GR_DRIVERF_USER_RESOLUTION /* arbitrary resolution possible */ -}; - diff --git a/thirdparty/grx249/src/vdrivers/vesa.c b/thirdparty/grx249/src/vdrivers/vesa.c deleted file mode 100644 index c0c4252..0000000 --- a/thirdparty/grx249/src/vdrivers/vesa.c +++ /dev/null @@ -1,458 +0,0 @@ -/** - ** vesa.c ---- the GRX 2.0 VESA BIOS interface - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - **/ - -#include - -#include "libgrx.h" -#include "grdriver.h" -#include "arith.h" -#include "int86.h" -#include "ioport.h" -#include "memcopy.h" -#include "memfill.h" -#include "vesa.h" - -#if defined(__GNUC__) || (defined(__WATCOMC__) && defined(__386__)) -#define NUM_MODES 100 /* max # of supported modes */ -#define NUM_EXTS 25 /* max # of mode extensions */ -#else -#define NUM_MODES 40 /* max # of supported modes */ -#define NUM_EXTS 12 /* max # of mode extensions */ -#endif - -static GrVideoMode modes[NUM_MODES]; -static GrVideoModeExt exts[NUM_EXTS]; - -static unsigned char _GrVidDrvVESAflags = 0; -#define HICOLOR32K 0x01 -#define PROTBANKING 0x02 -#define USE_REALMODE 0x04 -#define NOT_LINEAR 0x08 -#define NO_8BIT_DAC 0x10 - -static char fast256 = 0; -static char varDAC = FALSE; -static unsigned long VRAMsize = 0; -static int VESAversion; -static int nexts; - -/* VESA driver (and others) need this information for paging */ -int _GrVidDrvVESAbanksft = (-1); -int _GrVidDrvVESArdbank; -int _GrVidDrvVESAwrbank; - -/* these variables hold the correct paging functions: -** -** Turbo-C : normal bios access or direct function call -** GNU-C : normal real mode bios access or protected mode banking -*/ -static void (*_SETRWBANKS)(int rb, int wb); -static void (*_SETBANK)(int bk); - - -/* get the real mode stuff ... */ -#include "vesa_rm.c" - -#if (defined(__WATCOMC__) && defined (__386__)) \ - || (defined(DJGPP) && defined(DJGPP_MINOR)) -#define HAVE_VBE2 -/* get the VBE2 protected mode stuff ... */ -#include "vesa_pm.c" - -# define MC(a,b) a##b -# define MODE(md) ((ep->flags & GR_VMODEF_LINEAR) ? MC(md,_LFB) : md) - -#else /* no protected mode support */ -# define _SETUP _GrViDrvSetEGAVGAmode -# define reset _GrViDrvResetEGAVGA -# define MODE(md) (md) -#endif - - -static int detect(void) -{ - if(_GrViDrvDetectVGA()) { - VESAvgaInfoBlock blk; - if(_GrViDrvVESAgetVGAinfo(&blk)) return(TRUE); - } - return(FALSE); -} - - -/* special setup: check for 8bit DAC in palette modes */ -static int setup48(GrVideoMode *mp,int noclear) { - int res = _SETUP(mp, noclear); - DBGPRINTF(DBG_DRIVER,("setup48 called\n")); - if (res) { - mp->extinfo->cprec[0] = - mp->extinfo->cprec[1] = - mp->extinfo->cprec[2] = 6; - _GrViDrvSetDACshift(8-6); - if (varDAC) { - /* have variable DAC, try setting 8bit per color component */ - Int86Regs r; - sttzero(&r); - IREG_AX(r) = VESA_FUNC + VESA_PAL_CNTRL; - IREG_BX(r) = 0x0800; /* BL = 0 -> set DAC width, BH=8 -> req. width */ - DBGPRINTF(DBG_DRIVER,("Variable DAC\n")); -#ifdef __WATCOMC__ - int10x(&r); -#else - int10(&r); -#endif - if(IREG_AX(r) == VESA_SUCCESS) { - DBGPRINTF(DBG_DRIVER,("Variable DAC initialised\n")); - _GrViDrvSetDACshift(8-IREG_BH(r)); - mp->extinfo->cprec[0] = - mp->extinfo->cprec[1] = - mp->extinfo->cprec[2] = IREG_BH(r); - } - } - } - DBGPRINTF(DBG_DRIVER,("setup48 complete\n")); - return res; -} - - -static int build_video_mode( VESAmodeInfoBlock *ip, - GrVideoMode *mp, GrVideoModeExt *ep) -{ - int banksft = 0; - int rdbank = (-1); - int wrbank = (-1); - mp->present = TRUE; - mp->width = ip->XResolution; - mp->height = ip->YResolution; - mp->bpp = ip->BitsPerPixel; - mp->lineoffset = ip->BytesPerScanLine; - mp->extinfo = NULL; - mp->privdata = 0; - if(!(ip->ModeAttributes & MODE_ISGRAPHICS)) { - mp->extinfo = &_GrViDrvEGAVGAtextModeExt; - return(TRUE); - } - if(ip->WinSize != 64) return(FALSE); - while((ip->WinGranularity << banksft) < 64) banksft++; - if((ip->WinGranularity << banksft) != 64) return(FALSE); - if(ip->WinAAttributes & WIN_SUPPORTED) { - if(ip->WinAAttributes & WIN_WRITABLE) wrbank = 0; - if(ip->WinAAttributes & WIN_READABLE) rdbank = 0; - } - if(ip->WinBAttributes & WIN_SUPPORTED) { - if(ip->WinBAttributes & WIN_WRITABLE) wrbank = 1; - if(ip->WinBAttributes & WIN_READABLE) rdbank = 1; - } - if(wrbank < 0) return(FALSE); - if(rdbank >= 0) { - if(rdbank == wrbank) rdbank = (-1); - if(ip->WinASegment != ip->WinBSegment) rdbank = (-1); - } - if(_GrVidDrvVESAbanksft >= 0) { - if(banksft != _GrVidDrvVESAbanksft) return(FALSE); - if(wrbank != _GrVidDrvVESAwrbank) return(FALSE); - if(rdbank != _GrVidDrvVESArdbank) return(FALSE); - } - _GrVidDrvVESAbanksft = banksft; - _GrVidDrvVESAwrbank = wrbank; - _GrVidDrvVESArdbank = rdbank; - - ep->mode = GR_frameUndef; - ep->drv = NULL; - ep->frame = MK_FP((wrbank ? ip->WinBSegment : ip->WinASegment),0); - ep->flags = 0; - ep->cprec[0] = ep->cprec[1] = ep->cprec[2] = 6; - ep->cpos[0] = ep->cpos[1] = ep->cpos[2] = 0; - -#ifdef __TURBOC__ - if ( _GrVidDrvVESAflags & PROTBANKING) { - if(VESAbankfn && (VESAbankfn != ip->WinFuncPtr)) { - _GrVidDrvVESAflags &= ~PROTBANKING; - _SETRWBANKS = RM_setrwbanks; - _SETBANK = RM_setbank; - } else { - VESAbankfn = ip->WinFuncPtr; - _SETRWBANKS = RM_protsetrwbanks; - _SETBANK = RM_protsetbank; - } - } -#endif -#ifdef HAVE_VBE2 - if(!(_GrVidDrvVESAflags&NOT_LINEAR) && VESAversion>=VESA_VERSION(2,0)) { - /* check for linear frame buffer */ - if (ip->ModeAttributes&MODE_LIN_FRAME) { - DBGPRINTF(DBG_DRIVER,("Linear mode at 0x%08x\n", ip->LinearFrameBuffer)); - map_linear(ip->LinearFrameBuffer,VRAMsize, - &LFB_Selector, &LFB_LinearAddress); - DBGPRINTF(DBG_DRIVER,("Linear mode mapped to selector 0x%08x, linear address 0x%08x\n", LFB_Selector, LFB_LinearAddress)); - ep->LFB_Selector=LFB_Selector; - if (LFB_Selector >= 0 && LFB_LinearAddress) { - /* every thing went well: allow linear frame buffer access */ - ep->flags |= GR_VMODEF_LINEAR; - ep->frame = LFB_virtualAddr(); - } - } - } -#endif - ep->setup = _SETUP; - ep->setvsize = _GrViDrvVESAsetVirtualSize; - ep->scroll = _GrViDrvVESAvirtualScroll; - ep->setbank = _SETBANK; - ep->setrwbanks = (rdbank >= 0) ? _SETRWBANKS : NULL; - ep->loadcolor = NULL; - switch(ip->BitsPerPixel) { - case 4: - if(ip->MemoryModel != MODEL_4PLANE) return(FALSE); - if(ip->NumberOfPlanes != 4) return(FALSE); - ep->mode = GR_frameSVGA4; - ep->loadcolor = _GrViDrvLoadColorVGA4; - ep->flags = 0; /* no LFB with 4bit modes */ - ep->setup = setup48; - break; - case 8: - if(ip->MemoryModel != MODEL_PACKED) return(FALSE); - if(ip->NumberOfPlanes != 1) return(FALSE); - ep->mode = MODE(GR_frameSVGA8); - ep->loadcolor = _GrViDrvLoadColorVGA8; - ep->flags |= fast256; - ep->setup = setup48; - break; - case 15: - case 16: - case 24: - case 32: - if((ip->MemoryModel != MODEL_PACKED) && - (ip->MemoryModel != MODEL_DIRECT)) return(FALSE); - if(ip->NumberOfPlanes != 1) return(FALSE); - mp->bpp = ip->BitsPerPixel; - switch (ip->BitsPerPixel) { - case 32: if(VESAversion < VESA_VERSION(1,2)) - return(FALSE); - if (ip->ReservedMaskSize != 8) - return(FALSE); - switch (ip->ReservedMaskPos) { - case 24: ep->mode = MODE(GR_frameSVGA32L); - break; - case 0: ep->mode = MODE(GR_frameSVGA32H); - break; - default: return(FALSE); - } - mp->bpp = 24; - break; - case 24: ep->mode = MODE(GR_frameSVGA24); - break; - case 16: if (ip->ReservedMaskSize == 1) mp->bpp = 15; - goto Default; - default: - Default: ep->mode = MODE(GR_frameSVGA16); - break; - } - if(VESAversion < VESA_VERSION(1,2)) { - if(ip->BitsPerPixel == 24 || ip->BitsPerPixel == 32) { - ep->cprec[0] = 8; ep->cpos[0] = 16; - ep->cprec[1] = 8; ep->cpos[1] = 8; - ep->cprec[2] = 8; ep->cpos[2] = 0; - break; - } - if((ip->BitsPerPixel==15) || (_GrVidDrvVESAflags&HICOLOR32K)) { - mp->bpp = 15; - ep->cprec[0] = 5; ep->cpos[0] = 10; - ep->cprec[1] = 5; ep->cpos[1] = 5; - ep->cprec[2] = 5; ep->cpos[2] = 0; - break; - } - mp->bpp = 16; - ep->cprec[0] = 5; ep->cpos[0] = 11; - ep->cprec[1] = 6; ep->cpos[1] = 5; - ep->cprec[2] = 5; ep->cpos[2] = 0; - break; - } - ep->cprec[0] = ip->RedMaskSize; ep->cpos[0] = ip->RedMaskPos; - ep->cprec[1] = ip->GreenMaskSize; ep->cpos[1] = ip->GreenMaskPos; - ep->cprec[2] = ip->BlueMaskSize; ep->cpos[2] = ip->BlueMaskPos; - break; - default: - return(FALSE); - } - DBGPRINTF(DBG_DRIVER,("build_video_mode complete\n" )); - return(TRUE); -} - -static void add_video_mode( - GrVideoMode *mp, GrVideoModeExt *ep, - GrVideoMode **mpp,GrVideoModeExt **epp -){ - if(*mpp < &modes[NUM_MODES]) { - if(!mp->extinfo) { - GrVideoModeExt *etp = &exts[0]; - while(etp < *epp) { - if(memcmp(etp,ep,sizeof(GrVideoModeExt)) == 0) { - mp->extinfo = etp; - break; - } - etp++; - } - if(!mp->extinfo) { - if(etp >= &exts[NUM_EXTS]) return; - sttcopy(etp,ep); - mp->extinfo = etp; - *epp = ++etp; - } - } - sttcopy(*mpp,mp); - (*mpp)++; - } -} - -static int get_tweaked_text_mode(GrVideoMode *mp,GrVideoMode *etable) -{ - if(etable < &modes[NUM_MODES]) { - GrVideoMode *m1,*m2; - for(m1 = modes; m1 < etable; m1++) { - if((m1->present) && - (m1->extinfo) && - (m1->extinfo->mode == GR_frameText) && - (m1->height == 25) && - (m1->width > 80)) { - VESAmodeInfoBlock mdinfo; - if((_GrViDrvVESAgetModeInfo(m1->mode,&mdinfo)) && - (mdinfo.ModeAttributes & MODE_EXTINFO) && - (mdinfo.YCharSize == 16)) { - int h,exists = FALSE; - for(h = 28; h <= 50; h += (50 - 28)) { - for(m2 = modes; m2 < etable; m2++) { - if((m2->present) && - (m2->extinfo) && - (m2->extinfo->mode == GR_frameText) && - (m2->height == h) && - (m2->width == m1->width) && - (m2->bpp == m1->bpp)) { - exists = TRUE; - break; - } - } - if(!exists) { - sttcopy(mp,m1); - mp->height = h; - mp->extinfo = &_GrViDrvEGAVGAcustomTextModeExt; - return(TRUE); - } - } - } - } - } - } - return(FALSE); -} - -/* This code will fail if the controller is not VGA compatible. -** One should get the VESA info first and check the Capability -** flags for VGA base controller. If not VGA based all functions -** must use BIOS calls (eg. DAC programming), no tweaked modes, -** don't inherit EGA/VGA modes -** Don't know if (and how) this should be done (hsc 970710) */ -static int init(char *options) -{ - DBGPRINTF(DBG_DRIVER,("options: \"%s\"\n",options)); - if(_GrViDrvInitEGAVGA(options)) { - VESAvgaInfoBlock blk; - memzero(modes,sizeof(modes)); - memzero(exts,sizeof(exts)); - nexts = 0; - if(_GrViDrvVESAgetVGAinfo(&blk)) { - VESAmodeInfoBlock mdinfo; - GrVideoMode mode,*modep = &modes[0]; - GrVideoModeExt ext, *extp = &exts[0]; - short far *mp; - VRAMsize = blk.MemorySize; - VRAMsize <<= 16; - _GrVidDrvVESAflags = 0; - _GrVidDrvVESAbanksft = (-1); - VESAversion = blk.VESAversion; - DBGPRINTF(DBG_DRIVER,("VESAversion = %d.%d\n", - VESA_VERSION_MAJOR(VESAversion), - VESA_VERSION_MINOR(VESAversion) )); - DBGPRINTF(DBG_DRIVER,("VRAMsize = %lu bytes\n", VRAMsize)); - if(options) while(*options != '\0') { - switch(*options) { - case '5': - _GrVidDrvVESAflags |= HICOLOR32K; - DBGPRINTF(DBG_DRIVER,("option '5': setting HICOLOR32K\n")); - break; - case 'p': - case 'P': - DBGPRINTF(DBG_DRIVER,("option 'p': setting PROTBANKING\n")); - _GrVidDrvVESAflags |= PROTBANKING; - break; - case 'f': - case 'F': - fast256 = GR_VMODEF_FAST_SVGA8; - break; - case 'r': - case 'R': - _GrVidDrvVESAflags |= USE_REALMODE; - break; - case 'b': - case 'B': - _GrVidDrvVESAflags |= NOT_LINEAR; - break; - } - options++; - } - /* set up default banking function */ - _SETRWBANKS = RM_setrwbanks; - _SETBANK = RM_setbank; -#ifdef HAVE_VBE2 - /* Check out and set up VBE 2+ portected mode banking */ - if ( !(_GrVidDrvVESAflags & USE_REALMODE) ) - VBE2ProtMode(); -#endif - /* Check for variable width DAC */ - varDAC = (_GrVidDrvVESAflags & NO_8BIT_DAC) == 0 - && (blk.Capabilities & CAP_DAC_WIDTH) != 0; - for(mp = blk.VideoModePtr; *mp != (-1); mp++) { - mode.mode = *mp; - if(!_GrViDrvVESAgetModeInfo(*mp,&mdinfo)) continue; - if(!(mdinfo.ModeAttributes & MODE_EXTINFO)) continue; - if(!build_video_mode(&mdinfo,&mode,&ext)) continue; - add_video_mode(&mode,&ext,&modep,&extp); - } - while(get_tweaked_text_mode(&mode,modep)) { - add_video_mode(&mode,&ext,&modep,&extp); - } - nexts = (int)(extp-exts); - } - return(TRUE); - } - return(FALSE); -} - -GrVideoDriver _GrVideoDriverVESA = { - "VESA", /* name */ - GR_VGA, /* adapter type */ - &_GrVideoDriverSTDVGA, /* inherit modes from this driver */ - modes, /* mode table */ - itemsof(modes), /* # of modes */ - detect, /* detection routine */ - init, /* initialization routine */ - reset, /* reset routine */ - _gr_selectmode, /* standard mode select routine */ - 0 /* no additional capabilities */ -}; diff --git a/thirdparty/grx249/src/vdrivers/vesa.txt b/thirdparty/grx249/src/vdrivers/vesa.txt deleted file mode 100644 index db3e5ee..0000000 --- a/thirdparty/grx249/src/vdrivers/vesa.txt +++ /dev/null @@ -1,336 +0,0 @@ -This is from VGADOC 4b - -I changed the 104F0A description hsc@techfak.uni-kiel.de -******************************************************** - -The VESA BIOS interface is a software interface for detection capabilities, -setting modes and setting the bank register. - -VESA 1.0 VESA Standard #VS891001 -VESA 1.1 VESA Standard #VS900602 -VESA 1.2 VESA Standard #VS911022 -VESA 2.0 VESA Standard - -----------104F00----------------------------- -INT 10 - VESA SuperVGA BIOS - GET SuperVGA INFORMATION - AX = 4F00h - ES:DI -> 256-byte buffer for SuperVGA information (see below) -Return: AL = 4Fh function supported - AH = status - 00h successful - 01h failed - 02h (VBE 2) function not supported by current hardware config - 03h (VBE 2) function invalid in current mode - -Format of SuperVGA information: -Offset Size Description - 00h 4 BYTEs Signature ('VESA'). For VBE 2.0 this field must be set to - "VBE2" before the call to fill in the version 2.0 fields - 04h WORD VESA version number - 06h DWORD pointer to OEM name - 0Ah 4 BYTEs capabilities. - Bit 0 Set if the DAC can switch width, clear if it is - fixed 6bits per primary color - 1 (VBE2) non-VGA controller - 2 (VBE2) Programmed DAC with blank bit - 0Eh DWORD pointer to list of supported VESA and OEM video modes - Terminated with 0FFFFh. - 12h WORD Video memory in 64k blocks ---- VBE v2.0 --- - 14h WORD OEM software version - 16h DWORD Pointer to vendor name - 1Ah DWORD Pointer to product name - 1Eh DWORD Pointer to product revision string -100h 256 BYTEs OEM scratchpad -The buffer is defined as 256bytes for version 1.0 & 1.2, 262 bytes for version - 1.1 and 512 bytes for version 2.0. Note: Some VESA drivers have been known to - write beoynd the end of the official buffer. -----------104F01----------------------------- -INT 10 - VESA SuperVGA BIOS - GET SuperVGA MODE INFORMATION - AX = 4F01h - CX = SuperVGA video mode - ES:DI -> 256-byte buffer mode information (see below) -Return: AL = 4Fh function supported - AH = status - 00h successful - 01h failed - -Format of mode information: -Offset Size Description - 00h WORD mode attributes - bit 0: mode supported if set - 1: optional information available if set - 2: BIOS output supported if set - 3: set if color, clear if monochrome - 4: set if graphics mode, clear if text mode - 5: (VBE2) non-VGA mode - 6: (VBE2) No bank swiotching supported - 7: (VBE2) Linear framebuffer mode supported - 02h BYTE window A attributes - bit 0: exists if set - 1: readable if set - 2: writable if set - bits 3-7 reserved - 03h BYTE window B attributes (as for window A) - 04h WORD window granularity in K - 06h WORD window size in K - 08h WORD start segment of window A - 0Ah WORD start segment of window B - 0Ch DWORD -> FAR window positioning function (equivalent to AX=4F05h) - 10h WORD bytes per scan line ----remainder is optional for VESA modes, needed for OEM modes--- - 12h WORD width in pixels - 14h WORD height in pixels - 16h BYTE width of character cell in pixels - 17h BYTE height of character cell in pixels - 18h BYTE number of memory planes - 19h BYTE number of bits per pixel - 1Ah BYTE number of banks - 1Bh BYTE memory model type - 0 Text - 1 CGA graphics - 2 Hercules Graphics - 3 EGA 16 color - 4 Packed pixels - 5 Non chain 4 256 color modes - 6 Direct 15/16/24 bit - 7 YUV (luminance-chrominance, alos called YIQ) - 8-0Fh Reserved for VESA - 10h-0FFh Reserved for OEM - 1Ch BYTE size of bank in K - 1Dh BYTE number of image pages - 1Eh BYTE reserved(1) -------VBE v1.2+ -------------------------- - 1Fh BYTE Red mask size - 20h BYTE Red mask position - 21h BYTE Green mask size - 22h BYTE Green mask position - 23h BYTE Blue mask size - 24h BYTE Blue mask position - 25h BYTE Reserved mask size - 26h BYTE Reserved mask position - 27h BYTE Direct Screen mode info - Bit 0 If set the color ramp is programmable, if clear fixed - 1 If set the reserved field (as defined by Bytes 25-26h) - can be used by the application, if clear the field is - truly reserved. ---- VBE v2.0 --- - 28h DWORD Physical address of linear video buffer - 2Ch DWORD Pointer to start of offscreen memory - 30h WORD Offscreen memory in Kbytes -The buffer is defined as 256bytes -----------104F02----------------------------- -INT 10 - VESA SuperVGA BIOS - SET SuperVGA VIDEO MODE - AX = 4F02h - BX = mode - bit 15 set means don't clear video memory - bit 14 (VBE2) set to enable linear framebuffer mode -Return: AL = 4Fh function supported - AH = status - 00h successful - 01h failed - -Values for VESA video mode: - 00h-FFh OEM video modes (see AH=00h) - 100h 640x400x256 - 101h 640x480x256 - 102h 800x600x16 - 103h 800x600x256 - 104h 1024x768x16 - 105h 1024x768x256 - 106h 1280x1024x16 - 107h 1280x1024x256 - 108h 80x60 text - 109h 132x25 text - 10Ah 132x43 text - 10Bh 132x50 text - 10Ch 132x60 text - ------------ VBE v1.2+ ------------------ - 10Dh 320x200 32k - 10Eh 320x200 64k - 10Fh 320x200 16M - 110h 640x480 32k - 111h 640x480 64k - 112h 640x480 16M - 113h 800x600 32k - 114h 800x600 64k - 115h 800x600 16M - 116h 1024x768 32k - 117h 1024x768 64k - 118h 1024x768 16M - 119h 1280x1024 32k - 11Ah 1280x1024 64k - 11Bh 1280x1024 16M - ------------ VBE 2.0 -------------------- -81FFh Special full-memory access mode - Mode 81FFh preserves the contents of video memory and gives access to - the entire video memory. It is recommanded that mode 81FFh should be a - packed pixel mode. - -----------104F03----------------------------- -INT 10 - VESA SuperVGA BIOS - GET CURRENT VIDEO MODE - AX = 4F03h -Return: AL = 4Fh function supported - AH = status - 00h successful - 01h failed - BX = video mode (see AX=4F02h) -----------104F04----------------------------- -INT 10 - VESA SuperVGA BIOS - SAVE/RESTORE SuperVGA VIDEO STATE - AX = 4F04h - DL = subfunction - 00h get state buffer size - Return: BX = number of 64-byte blocks needed - 01h save video states - ES:BX -> buffer - 02h restore video states - ES:BX -> buffer - CX = flags for states to save/restore - bit 0: video hardware state - bit 1: video BIOS data state - bit 2: video DAC state - bit 3: SuperVGA state -Return: AL = 4Fh function supported - AH = status - 00h successful - 01h failed -----------104F05----------------------------- -INT 10 - VESA SuperVGA BIOS - CPU VIDEO MEMORY CONTROL - AX = 4F05h - BH = subfunction - 00h select video memory window - DX = window address in video memory (in granularity units) - 01h get video memory window - Return: DX = window address in video memory (in gran. units) - BL = window number - 00h window A - 01h window B -Return: AL = 4Fh function supported - AH = status - 00h successful - 01h failed -----------104F06----------------------------- -INT 10 - VESA SuperVGA BIOS 1.1+ - GET/SET LOGICAL SCAN LINE LENGTH - AX = 4F06h - BL = function - 00h set scan line length - CX = desired width in pixels - 01h get scan line length - 02h (VBE 2) set scan line length - CX = desired width in bytes - 03h (VBE 2) get maximum scan line length -Return: AL = 4Fh if function supported - AH = status - 00h successful - 01h failed - BX = bytes per scan line - Maximum bytes per scan line for function 03h - CX = number of pixels per scan line - Maximum pixels per scan line for function 03h - DX = maximum number of scan lines - Unchaqnged for function 03h -Notes: if the desired width is not achievable, the next larger width will be - set. The scan line may be wider than the visible area of the screen - this function is valid in text modes, provided that values are - multiplied by the character cell width/height -----------104F07BH00------------------------- -INT 10 - VESA SuperVGA BIOS 1.1+ - GET/SET DISPLAY START - AX = 4F07h - BH = 00h (reserved) - BL = 00h (or 80h) set display start - CX = leftmost displayed pixel in scan line - DX = first displayed scan line - = 01h get display start - Return: BH = 00h - CX = leftmost displayed pixel in scan line - DX = first displayed scan line -Return: AL = 4Fh if function supported - AH = status - 00h successful - 01h failed -Note: this function is valid in text modes, provided that values are - multiplied by the character cell width/height -----------104F08----------------------------- -INT 10 - VESA SuperVGA BIOS v1.2+ - GET/SET DAC PALETTE CONTROL - AX = 4F08h - BL = function - 00h Set DAC palette width - BH = desired number of bits per primary color. - 01h Get DAC palette width -Return: AL = 4Fh if function supported - AH = status - BH = Current number of bits per primary color (6 = Standard VGA) -----------104F09----------------------------- -INT 10 - VESA SuperVGA BIOS v2.0+ - GET/SET PALETTE ENTRIES - AX = 4F09h - BL = function - 00h set palette - 01h get palette - 02h set secondary palette data - 03h get secondary palette data - 80h set palette during vertical retrace - CX = number of entries to change - DX = starting palette index - ES:DI -> palette buffer (array of 4 bytes per entry) - Offset Size Description - 00h BYTE Red byte - 01h BYTE Green byte - 02h BYTE Blue byte - 03h BYTE Alpha or alignment byte -Return: AL = 4Fh if function supported - AH = status - 00h successful - 01h failed -----------104F0A----------------------------- -INT 10 - VESA SuperVGA BIOS v2.0+ - GET PROTECTED-MODE CODE - AX = 4F0Ah - BX = subfunction code - 0000h Return protected mode table - -Return: AL = 4Fh if function supported - AH = status - 00h successful - BX=0000h - CX = total number of bytes in table - ES:DI -> base address of PM info table : - +00 word off. to PM set window func, see 104F05 - +02 word off. to PM set display start func, see 104F07 - +04 word off. to PM set primary palette func, see 104F09 - +06 word off. to PM resource table (word,word,...): - ,...,<0xFFFF>, - ,,...,<0xFFFF> - 01h failed -----------104F10----------------------------- -INT 10 - VESA DPMS - Display Power Management Extensions - AX = 4F10h - BL = 00h Report VBE/PM Capabilities - ES:DI = 0000h:0000h - Return: BH = Power saving state signals supported: - Bit 0 STAND BY supported if set - 1 SUSPEND supported if set - 2 OFF supported if set - 3 REDUCED On supported if set - (Not supported in DPMS 1.0) - BL = VBE/PM Version number: - Bit 0-3 Minor version - 4-7 Major version - 01h Set Display Power State - BH = Requested Power State: - 00h ON - 01h STAND BY - 02h SUSPEND - 04h OFF - 08h REDUCED ON (for flat screens) - 02h Get Display Power State - Return: BH = Display Power State - 00h ON - 01h STAND BY - 02h SUSPEND - 04h OFF - 08h REDUCED ON (for flat screens) -Return: AL = 4Fh if function supported - AH = status -----------104FFF----------------------------- -INT 10 - VESA SuperVGA BIOS - Everex - TURN VESA ON/OFF - AX = 4FFFh - DL = new state (00h off, 01h on) diff --git a/thirdparty/grx249/src/vdrivers/vesa_pm.c b/thirdparty/grx249/src/vdrivers/vesa_pm.c deleted file mode 100644 index d1a4129..0000000 --- a/thirdparty/grx249/src/vdrivers/vesa_pm.c +++ /dev/null @@ -1,548 +0,0 @@ -/** - ** vesa_pm.c ---- the GRX 2.0 VBE2 BIOS interface: protected mode stuff - ** - ** Watcom C++ 11.0 DOS4GW by Gary Sands [gsands@stbni.co.uk] - ** DJGPP v2 by Andrzej Lawa [FidoNet: Andrzej Lawa 2:480/19.77] - ** and Hartmut Schirmer (hsc@techfak.uni-kiel.de) - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -/* memory information for linear frame buffer access */ -static int LFB_Selector = -1; -static unsigned long LFB_LinearAddress = 0; - -/* memory information for protected mode ** -** (VESA 2.0) banking with memory mapped i/o */ -int MEM_IO_sel = -1; -unsigned long MEM_IO_la = 0; - -/* memory for portected mode banking, virtual ** -** screen handling and palette manipulation */ -static void *PM_base = NULL; -static int PM_base_len = 0; -static void *PM_banking_ptr = NULL; -/* -static void *PM_dstart_ptr = NULL; -static void *PM_palette_ptr = NULL; -*/ - -/* ----------------------------------------------------------- DPMI stuff -- */ - -#ifdef __DJGPP__ -#define WHO_AM_I "DJGPP" -#include - -/* we do selector based video access with DJGPP. ** -** The selector gives access to full video ram ** -** starting at offset 0 */ -#define LFB_virtualAddr() ((void *) 0) - -#endif - -/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ - -#if defined(__WATCOMC__) && defined(__386__) - -#define WHO_AM_I "WATCOM" - -#ifndef MAKELONG -#define MAKELONG(a, b) ((long) (((unsigned short) (a)) \ - | ((unsigned long) ((unsigned short) (b))) << 16)) -#endif - -#ifndef LOWORD -#define LOWORD(l) ((unsigned short) (l & 0xffff)) -#endif - -#ifndef HIWORD -#define HIWORD(l) ((unsigned short) (((unsigned long) (l) >> 16) & 0xffff)) -#endif - -/* DPMI structures */ -typedef struct { - unsigned long handle; /* 0, 2 */ - unsigned long size; /* or count */ /* 4, 6 */ - unsigned long address; /* 8, 10 */ -} __dpmi_meminfo; - - -/* DPMI functions */ -unsigned short __dpmi_error; - -int __dpmi_allocate_ldt_descriptors( int _count ) -{ - /* variables */ - auto Int86Regs DpmiRegs; - /* code */ - DBGPRINTF(DBG_DRIVER, ("WATCOM __dpmi_allocate_ldt_descriptors\n")); - sttzero((&DpmiRegs)); - IREG_AX(DpmiRegs) = 0x0; /*function code*/ - IREG_CX(DpmiRegs) = _count; - int386 ( 0x31, &(DpmiRegs.Normal), &(DpmiRegs.Normal) ); - if ( DpmiRegs.Normal.w.cflag ) - { - __dpmi_error = IREG_AX(DpmiRegs); - return -1; - } - return IREG_AX(DpmiRegs); -} - -int __dpmi_free_ldt_descriptor ( int _descriptor ) -{ - /* variables */ - auto Int86Regs DpmiRegs; - /* code */ - DBGPRINTF(DBG_DRIVER, ("WATCOM __dpmi_free_ldt_descriptors\n")); - sttzero((&DpmiRegs)); - IREG_AX(DpmiRegs) = 0x1; /*function code*/ - IREG_BX(DpmiRegs) = _descriptor; - int386 ( 0x31, &(DpmiRegs.Normal), &(DpmiRegs.Normal) ); - if ( DpmiRegs.Normal.w.cflag ) - { - __dpmi_error = IREG_AX(DpmiRegs); - return -1; - } - return 0; -} - -int __dpmi_get_segment_base_address ( int _selector, unsigned long *_addr ) -{ - /* variables */ - auto Int86Regs DpmiRegs; - /* code */ - DBGPRINTF(DBG_DRIVER, ("WATCOM __dpmi_get_segment_base_address\n")); - sttzero((&DpmiRegs)); - IREG_AX(DpmiRegs) = 0x6; /* function code */ - IREG_BX(DpmiRegs) = _selector; - int386 ( 0x31, &(DpmiRegs.Normal), &(DpmiRegs.Normal) ); - if ( DpmiRegs.Normal.w.cflag ) - { - __dpmi_error = IREG_AX(DpmiRegs); - return -1; - } - *_addr = MAKELONG( IREG_DX(DpmiRegs), IREG_CX(DpmiRegs) ); - return 0; -} - -int __dpmi_set_segment_base_address ( int _selector, unsigned long _address ) -{ - /* variables */ - auto Int86Regs DpmiRegs; - /* code */ - DBGPRINTF(DBG_DRIVER, ("WATCOM __dpmi_set_segment_base_address\n")); - sttzero((&DpmiRegs)); - IREG_AX(DpmiRegs) = 0x7; /*function code*/ - IREG_BX(DpmiRegs) = _selector; - IREG_CX(DpmiRegs) = HIWORD(_address); - IREG_DX(DpmiRegs) = LOWORD(_address); - int386 ( 0x31, &(DpmiRegs.Normal), &(DpmiRegs.Normal) ); - if ( DpmiRegs.Normal.w.cflag ) - { - __dpmi_error = IREG_AX(DpmiRegs); - return -1; - } - return 0; -} - -int __dpmi_set_segment_limit ( int _selector, unsigned long _limit ) -{ - /* variables */ - auto Int86Regs DpmiRegs; - /* code */ - DBGPRINTF(DBG_DRIVER, ("WATCOM __dpmi_set_segment_limit\n")); - sttzero((&DpmiRegs)); - IREG_AX(DpmiRegs) = 0x9; /*function code*/ - IREG_BX(DpmiRegs) = _selector; - IREG_CX(DpmiRegs) = HIWORD(_limit); - IREG_DX(DpmiRegs) = LOWORD(_limit); - int386 ( 0x31, &(DpmiRegs.Normal), &(DpmiRegs.Normal) ); - if ( DpmiRegs.Normal.w.cflag ) - { - __dpmi_error = IREG_AX(DpmiRegs); - return -1; - } - return 0; -} - -int __dpmi_lock_linear_region ( __dpmi_meminfo *_info ) -{ - /* variables */ - auto Int86Regs DpmiRegs; - /* code */ - DBGPRINTF(DBG_DRIVER, ("WATCOM __dpmi_lock_linear_region\n")); - sttzero((&DpmiRegs)); - IREG_AX(DpmiRegs) = 0x600; /*function code*/ - IREG_BX(DpmiRegs) = HIWORD(_info->address); - IREG_CX(DpmiRegs) = LOWORD(_info->address); - IREG_SI(DpmiRegs) = HIWORD(_info->size); - IREG_DI(DpmiRegs) = LOWORD(_info->size); - int386 ( 0x31, &(DpmiRegs.Normal), &(DpmiRegs.Normal) ); - if ( DpmiRegs.Normal.w.cflag ) - { - __dpmi_error = IREG_AX(DpmiRegs); - return -1; - } - return 0; -} - -int __dpmi_unlock_linear_region ( __dpmi_meminfo *_info ) -{ - /* variables */ - auto Int86Regs DpmiRegs; - /* code */ - DBGPRINTF(DBG_DRIVER, ("WATCOM __dpmi_unlock_linear_region\n")); - sttzero((&DpmiRegs)); - IREG_AX(DpmiRegs) = 0x601; /*function code*/ - IREG_BX(DpmiRegs) = HIWORD(_info->address); - IREG_CX(DpmiRegs) = LOWORD(_info->address); - IREG_SI(DpmiRegs) = HIWORD(_info->size); - IREG_DI(DpmiRegs) = LOWORD(_info->size); - int386 ( 0x31, &(DpmiRegs.Normal), &(DpmiRegs.Normal) ); - if ( DpmiRegs.Normal.w.cflag ) - { - __dpmi_error = IREG_AX(DpmiRegs); - return -1; - } - return 0; -} - -int __dpmi_physical_address_mapping ( __dpmi_meminfo *_info ) -{ - /* variables */ - auto Int86Regs DpmiRegs; - /* code */ - DBGPRINTF(DBG_DRIVER, ("WATCOM __dpmi_physical_address_mapping\n")); - sttzero((&DpmiRegs)); - IREG_AX(DpmiRegs) = 0x800; /*function code*/ - IREG_BX(DpmiRegs) = HIWORD(_info->address); - IREG_CX(DpmiRegs) = LOWORD(_info->address); - IREG_SI(DpmiRegs) = HIWORD(_info->size); - IREG_DI(DpmiRegs) = LOWORD(_info->size); - int386 ( 0x31, &(DpmiRegs.Normal), &(DpmiRegs.Normal) ); - if ( DpmiRegs.Normal.w.cflag ) - { - __dpmi_error = IREG_AX(DpmiRegs); - return -1; - } - _info->address = MAKELONG( IREG_CX(DpmiRegs), IREG_BX(DpmiRegs) ); - return 0; -} - -int __dpmi_free_physical_address_mapping ( __dpmi_meminfo *_info ) -{ - /* variables */ - auto Int86Regs DpmiRegs; - /* code */ - DBGPRINTF(DBG_DRIVER, ("WATCOM __dpmi_free_physical_address_mapping\n")); - sttzero((&DpmiRegs)); - IREG_AX(DpmiRegs) = 0x801; /*function code*/ - IREG_BX(DpmiRegs) = HIWORD(_info->address); - IREG_CX(DpmiRegs) = LOWORD(_info->address); - int386 ( 0x31, &(DpmiRegs.Normal), &(DpmiRegs.Normal) ); - if ( DpmiRegs.Normal.w.cflag ) - { - __dpmi_error = IREG_AX(DpmiRegs); - return -1; - } - return 0; -} - -int _go32_dpmi_lock_data ( void *_lockaddr, unsigned long _locksize ) -{ - /* variables */ - auto __dpmi_meminfo _lockme; - /* code */ - DBGPRINTF(DBG_DRIVER, ("WATCOM _go32_dpmi_lock_data\n")); - _lockme.address = (unsigned long)_lockaddr; - _lockme.size = _locksize; - return __dpmi_lock_linear_region ( &_lockme ); -} - -int _go32_my_ds ( void ) -{ - /* variables */ - short my_ds = 0; - /* code */ - DBGPRINTF(DBG_DRIVER, ("WATCOM _go32_my_ds\n")); - _asm - { - mov my_ds, ds - } - return ( (int)my_ds ); -} - -/* Watcom C++ maps the physical video memory to a ** -** virtual address in linear address space */ -#define LFB_virtualAddr() ((void *) LFB_LinearAddress) - -#endif /* __WATCOMC__ && __386__ */ - -/* ------------------------------------------------------------- */ -/* memory access helper functions */ -static int map_linear(unsigned long adr, unsigned long len, - int *sel, unsigned long *la ) { - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " map_linear\n")); - if(*sel<0) { - *sel = __dpmi_allocate_ldt_descriptors(1); - if (*sel<0) return FALSE; - } - if(!*la) { - __dpmi_meminfo meminfo; - meminfo.address = adr; - meminfo.size = len; - if(__dpmi_physical_address_mapping(&meminfo)==-1) { - return FALSE; - } - if(__dpmi_set_segment_base_address(*sel,meminfo.address)==-1) { - return FALSE; - } - if(__dpmi_set_segment_limit(*sel,len-1)==-1) { - return FALSE; - } - *la=meminfo.address; - } - return TRUE; -} - -static void free_linear(int *sel, unsigned long *la) { - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " free_linear\n")); - if(*la) { - __dpmi_meminfo meminfo; - meminfo.address = *la; - __dpmi_free_physical_address_mapping(&meminfo); - *la = 0; - } - if(*sel >= 0) { - __dpmi_free_ldt_descriptor(*sel); - *sel = -1; - } -} - -/* ------------------------------------------------------------- */ - -static void PM_free(void) { - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " PM_free\n")); - free_linear(&MEM_IO_sel, &MEM_IO_la); - if (PM_base != NULL) { - unsigned long baseaddr; - __dpmi_meminfo mem; - __dpmi_get_segment_base_address(_go32_my_ds(), &baseaddr); - mem.address = baseaddr + (unsigned long)PM_base; - mem.size = PM_base_len; - __dpmi_unlock_linear_region(&mem); - free(PM_base); - } - PM_base = NULL; -} - -static int PM_alloc(int len) { - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " PM_alloc\n")); - PM_base_len = len; - PM_base = malloc(PM_base_len); - if (PM_base == NULL) return 0; - _go32_dpmi_lock_data(PM_base, PM_base_len); - return 1; -} - -/* ------------------------------------------------------------- */ -/* protected mode banking */ - -#if defined(__GNUC__) && defined(__i386__) -static INLINE void PM_banking(short BX, short DX) { - __asm__ volatile ( - " pushal \n" - " call *%3 \n" - " popal " - : /* no output */ - : "a" (0x4F05), "b" (BX), "d" (DX), - "r" (PM_banking_ptr) - ); -} - -static INLINE void PM_es_banking(short es, short BX, short DX) { - __asm__ volatile ( - " pushal \n" - " movw %%ax, %%es \n" - " movw $0x4f05, %%ax \n" - " call *%3 \n" - " popal " - : /* no output */ - : "a" (es), "b" (BX), "d" (DX), - "r" (PM_banking_ptr) - ); -} -#endif /* __GNUC__ && __i386__ */ - -#if defined(__WATCOMC__) && defined(__386__) -static void PM_banking(short myBX, short myDX) { - _asm - { - pusha - mov ax, 4f05h - mov bx, myBX - mov dx, myDX - call PM_banking_ptr - popa - } -} - -static void PM_es_banking(short myES, short myBX, short myDX) { - _asm - { - pusha - mov ax, myES - mov es, ax - mov ax, 4f05h - mov bx, myBX - mov dx, myDX - call PM_banking_ptr - popa - } -} -#endif /* __WATCOMC__ && __386__ */ - -static void PM_setrwbanks(int rb,int wb) { - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " PM_setrwbanks\n")); - PM_banking( _GrVidDrvVESAwrbank, wb << _GrVidDrvVESAbanksft); - PM_banking( _GrVidDrvVESArdbank, rb << _GrVidDrvVESAbanksft); - setup_far_selector(SCRN->gc_selector); -} - -static void PM_setbank(int bk) { - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " PM_setbank\n")); - PM_banking( _GrVidDrvVESAwrbank, bk << _GrVidDrvVESAbanksft); - if(_GrVidDrvVESArdbank >= 0) - PM_banking( _GrVidDrvVESArdbank, bk << _GrVidDrvVESAbanksft); - setup_far_selector(SCRN->gc_selector); -} - - -static void PM_es_setrwbanks(int rb,int wb) { - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " PM_es_setrwbanks\n")); - PM_es_banking(MEM_IO_sel, _GrVidDrvVESAwrbank, wb << _GrVidDrvVESAbanksft); - PM_es_banking(MEM_IO_sel, _GrVidDrvVESArdbank, rb << _GrVidDrvVESAbanksft); - setup_far_selector(SCRN->gc_selector); -} - -static void PM_es_setbank(int bk) { - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " PM_es_setbank\n")); - PM_es_banking(MEM_IO_sel, _GrVidDrvVESAwrbank, bk << _GrVidDrvVESAbanksft); - if(_GrVidDrvVESArdbank >= 0) - PM_es_banking(MEM_IO_sel, _GrVidDrvVESArdbank, bk << _GrVidDrvVESAbanksft); - setup_far_selector(SCRN->gc_selector); -} - - -static void VBE2ProtMode(void) { - /* VBE 2.0+ may provide protected mode banking functions */ - VESApmInfoBlock *PMinfo; - unsigned long MS_ptr = 0; - unsigned short MS_len = 0; - - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " VBE2ProtMode\n")); - if (PM_base != NULL) return; - - /* Default: INT 10H based bank switching */ - _SETRWBANKS = RM_setrwbanks; - _SETBANK = RM_setbank; - - if ( (PMinfo=_GrViDrvVESAgetPMinfo()) == NULL) return; - if (PMinfo->SubTable_off != 0x0000) { - GR_int16u *subtab = ptradd(&PMinfo->SetWindow_off,PMinfo->SubTable_off); - long bytes_left = (long)PMinfo->PhysicalLength - - (long)PMinfo->SubTable_off; - /* Skip over port info but don't leave VBE2PM data */ - while (bytes_left >= 2 && peek_w(subtab) != 0xffff) { - ptrinc(subtab,2); - bytes_left -= 2; - } - /* skip 0xffff end marker */ - ptrinc(subtab,2); - bytes_left -= 2; - /* check for memory mapped IO: ** - ** 4 bytes for memory mapped IO base ** - ** 2 bytes for memory mapped IO length */ - if (bytes_left >= 4+2 && peek_w(subtab) != 0xffff) { - /* The memory location area isn't empty. The VESA bios - * bios requires an additional memory selector set up in ES */ - MS_ptr = peek_l(subtab); - ptrinc(subtab,4); - MS_len = peek_w(subtab); - /* MS_ptr == 0 -> no mem area */ - } - } - if (!PM_alloc(PMinfo->PhysicalLength)) return; - memcpy(PM_base, &PMinfo->SetWindow_off, PMinfo->PhysicalLength); - PM_banking_ptr = ptradd(PM_base, PMinfo->SetWindow_off); -/* - PM_dstart_ptr = ptradd(PM_base, PMinfo->DisplStart_off); - PM_palette_ptr = ptradd(PM_base, PMinfo->PPalette_off); -*/ - if (MS_ptr && MS_len) { - if (!map_linear(MS_ptr, MS_len, &MEM_IO_sel, &MEM_IO_la)) return; - _SETRWBANKS = PM_es_setrwbanks; - _SETBANK = PM_es_setbank; - } else { - _SETRWBANKS = PM_setrwbanks; - _SETBANK = PM_setbank; - } -} - - -static int _SETUP(GrVideoMode *mp,int noclear) { - int res = 0; - - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " _SETUP\n")); - if ( mp->extinfo->flags&GR_VMODEF_LINEAR && - mp->extinfo->mode != GR_frameText ) { - Int86Regs r; - sttzero(&r); - IREG_AX(r) = VESA_FUNC + VESA_SET_MODE; - IREG_BX(r) = (mp->mode & 0x7fff) - | (noclear ? 0x8000U : 0) - | 0x4000U; - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " _SETUP calling int10\n")); -# if defined(__WATCOMC__) - int10x(&r); -# else - int10(&r); -# endif - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " _SETUP int10 called\n")); - res = IREG_AX(r) == VESA_SUCCESS; - } else - res = _GrViDrvSetEGAVGAmode(mp,noclear); - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " _SETUP finished\n")); - return res; -} - -static void reset(void) { - int i; - - _SETRWBANKS = RM_setrwbanks; - _SETBANK = RM_setbank; - - DBGPRINTF(DBG_DRIVER, (WHO_AM_I " reset\n")); - for (i=0; i < nexts; ++i) { - exts[i].setbank = NULL; - exts[i].setrwbanks = NULL; - } - - PM_free(); - PM_banking_ptr = NULL; -/* - PM_dstart_ptr = NULL; - PM_palette_ptr = NULL; -*/ - free_linear(&LFB_Selector, &LFB_LinearAddress); - _GrViDrvResetEGAVGA(); -} diff --git a/thirdparty/grx249/src/vdrivers/vesa_rm.c b/thirdparty/grx249/src/vdrivers/vesa_rm.c deleted file mode 100644 index c42a5e6..0000000 --- a/thirdparty/grx249/src/vdrivers/vesa_rm.c +++ /dev/null @@ -1,85 +0,0 @@ -/** - ** vesa_rm.c ---- the GRX 2.0 VESA BIOS interface: real mode banking code - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Contributions by: (See "doc/credits.doc" for details) - ** Hartmut Schirmer (hsc@techfak.uni-kiel.de) - **/ - -static void RM_setbank(int bk) -{ - Int86Regs r; - - sttzero(&r); - IREG_AX(r) = VESA_FUNC + VESA_PAGE_CTL; - IREG_BX(r) = _GrVidDrvVESAwrbank; - IREG_DX(r) = bk << _GrVidDrvVESAbanksft; - int10(&r); - if(_GrVidDrvVESArdbank >= 0) { - IREG_AX(r) = VESA_FUNC + VESA_PAGE_CTL; - IREG_BX(r) = _GrVidDrvVESArdbank; - IREG_DX(r) = bk << _GrVidDrvVESAbanksft; - int10(&r); - } - setup_far_selector(SCRN->gc_selector); -} - -static void RM_setrwbanks(int rb,int wb) -{ - Int86Regs r; - - sttzero(&r); - IREG_AX(r) = VESA_FUNC + VESA_PAGE_CTL; - IREG_BX(r) = _GrVidDrvVESAwrbank; - IREG_DX(r) = wb << _GrVidDrvVESAbanksft; - int10(&r); - IREG_AX(r) = VESA_FUNC + VESA_PAGE_CTL; - IREG_BX(r) = _GrVidDrvVESArdbank; - IREG_DX(r) = rb << _GrVidDrvVESAbanksft; - int10(&r); - setup_far_selector(SCRN->gc_selector); -} - -#ifdef __TURBOC__ - -static void far (*VESAbankfn)(void); - -static void RM_protsetbank(int bk) -{ - _DX = bk << _GrVidDrvVESAbanksft; - _BX = _GrVidDrvVESAwrbank; - _AX = VESA_FUNC + VESA_PAGE_CTL; - (*VESAbankfn)(); - if(_GrVidDrvVESArdbank >= 0) { - _DX = bk << _GrVidDrvVESAbanksft; - _BX = _GrVidDrvVESArdbank; - _AX = VESA_FUNC + VESA_PAGE_CTL; - (*VESAbankfn)(); - } -} - -static void RM_protsetrwbanks(int rb,int wb) -{ - _DX = wb << _GrVidDrvVESAbanksft; - _BX = _GrVidDrvVESAwrbank; - _AX = VESA_FUNC + VESA_PAGE_CTL; - (*VESAbankfn)(); - _DX = rb << _GrVidDrvVESAbanksft; - _BX = _GrVidDrvVESArdbank; - _AX = VESA_FUNC + VESA_PAGE_CTL; - (*VESAbankfn)(); -} - -#endif diff --git a/thirdparty/grx249/src/vdrivers/vtable.c b/thirdparty/grx249/src/vdrivers/vtable.c deleted file mode 100644 index 76aabe0..0000000 --- a/thirdparty/grx249/src/vdrivers/vtable.c +++ /dev/null @@ -1,57 +0,0 @@ -/** - ** vtable.c ---- a table of available video drivers - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "grdriver.h" - -GrVideoDriver *_GrVideoDriverTable[] = { -#if defined(__MSDOS__) - &_GrVideoDriverHERC, - &_GrVideoDriverSTDEGA, - &_GrVideoDriverSTDVGA, - &_GrVideoDriverVESA, - &_GrVideoDriverATI28800, - &_GrVideoDriverET4000, - &_GrVideoDriverCL5426, - &_GrVideoDriverMACH64, - &_GrVideoDriverS3, -#endif -#if defined(__XWIN__) && !defined(__SDL__) -#if defined(XF86DGA_DRIVER) - &_GrVideoDriverXF86DGA, -#endif - &_GrVideoDriverXWIN, -#endif -#if defined(__linux__) && !defined(__XWIN__) && !defined(__SDL__) -#ifdef SVGALIB_DRIVER - &_GrVideoDriverSVGALIB, -#endif -#ifdef FRAMEBUFFER_DRIVER - &_GrVideoDriverLINUXFB, -#endif -#endif -#if defined(__WIN32__) && !defined(__SDL__) - &_GrVideoDriverWIN32, -#endif -#if defined(__SDL__) - &_GrVideoDriverSDL, -#endif - &_GrDriverMEM, - NULL -}; - diff --git a/thirdparty/grx249/src/wideline/ccirc.c b/thirdparty/grx249/src/wideline/ccirc.c deleted file mode 100644 index d3cdd4b..0000000 --- a/thirdparty/grx249/src/wideline/ccirc.c +++ /dev/null @@ -1,25 +0,0 @@ -/** - ** ccirc.c ---- draw dashed and/or wide circles - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrCustomCircle(int xc,int yc,int r,const GrLineOption *o) -{ - GrCustomEllipse(xc,yc,r,r,o); -} diff --git a/thirdparty/grx249/src/wideline/ccirca.c b/thirdparty/grx249/src/wideline/ccirca.c deleted file mode 100644 index d7caae6..0000000 --- a/thirdparty/grx249/src/wideline/ccirca.c +++ /dev/null @@ -1,26 +0,0 @@ -/** - ** ccirca.c ---- draw dashed and/or wide circle arcs - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrCustomCircleArc(int xc,int yc,int r,int start,int end,int style,const GrLineOption *o) -{ - GrCustomEllipseArc(xc,yc,r,r,start,end,style,o); -} - diff --git a/thirdparty/grx249/src/wideline/celli.c b/thirdparty/grx249/src/wideline/celli.c deleted file mode 100644 index ce5241f..0000000 --- a/thirdparty/grx249/src/wideline/celli.c +++ /dev/null @@ -1,37 +0,0 @@ -/** - ** celli.c ---- draw dashed and/or wide ellipses - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "shapes.h" - -void GrCustomEllipse(int xc,int yc,int xa,int ya,const GrLineOption *o) -{ - int (*pnts)[2]; - setup_ALLOC(); - pnts = ALLOC(sizeof(int) * 2 * GR_MAX_ELLIPSE_POINTS); - if (pnts != NULL) - { - GrFillArg fval; - int npts = GrGenerateEllipse(xc,yc,xa,ya,pnts); - fval.color = o->lno_color; - _GrDrawCustomPolygon(npts,pnts,o,&_GrSolidFiller,fval,TRUE,TRUE); - FREE(pnts); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/wideline/cellia.c b/thirdparty/grx249/src/wideline/cellia.c deleted file mode 100644 index 4f5fff6..0000000 --- a/thirdparty/grx249/src/wideline/cellia.c +++ /dev/null @@ -1,47 +0,0 @@ -/** - ** cellia.c ---- draw dashed and/or wide ellipse arcs - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "allocate.h" -#include "shapes.h" - -void GrCustomEllipseArc(int xc,int yc,int xa,int ya,int start,int end,int style,const GrLineOption *o) -{ - int (*pnts)[2]; - setup_ALLOC(); - pnts = ALLOC(sizeof(int) * 2 * (GR_MAX_ELLIPSE_POINTS+1)); - if (pnts != NULL) - { - GrFillArg fval; - int npts = GrGenerateEllipseArc(xc,yc,xa,ya,start,end,pnts); - int close = FALSE; - switch(style) { - case GR_ARC_STYLE_CLOSE2: - pnts[npts][0] = xc; - pnts[npts][1] = yc; - npts++; - case GR_ARC_STYLE_CLOSE1: - close = TRUE; - break; - } - fval.color = o->lno_color; - _GrDrawCustomPolygon(npts,pnts,o,&_GrSolidFiller,fval,close,TRUE); - FREE(pnts); - } - reset_ALLOC(); -} diff --git a/thirdparty/grx249/src/wideline/custbox.c b/thirdparty/grx249/src/wideline/custbox.c deleted file mode 100644 index 0006526..0000000 --- a/thirdparty/grx249/src/wideline/custbox.c +++ /dev/null @@ -1,33 +0,0 @@ -/** - ** custbox.c ---- wide and/or dashed box outline - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrCustomBox(int x1,int y1,int x2,int y2,const GrLineOption *o) -{ - GrFillArg fval; - int pt[4][2]; - pt[0][0] = x1; pt[0][1] = y1; - pt[1][0] = x2; pt[1][1] = y1; - pt[2][0] = x2; pt[2][1] = y2; - pt[3][0] = x1; pt[3][1] = y2; - fval.color = o->lno_color; - _GrDrawCustomPolygon(4,pt,o,&_GrSolidFiller,fval,TRUE,FALSE); -} - diff --git a/thirdparty/grx249/src/wideline/custline.c b/thirdparty/grx249/src/wideline/custline.c deleted file mode 100644 index 3a9b088..0000000 --- a/thirdparty/grx249/src/wideline/custline.c +++ /dev/null @@ -1,31 +0,0 @@ -/** - ** custline.c ---- wide and/or dashed line - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrCustomLine(int x1,int y1,int x2,int y2,const GrLineOption *o) -{ - GrFillArg fval; - int pt[2][2]; - pt[0][0] = x1; pt[0][1] = y1; - pt[1][0] = x2; pt[1][1] = y2; - fval.color = o->lno_color; - _GrDrawCustomPolygon(2,pt,o,&_GrSolidFiller,fval,FALSE,FALSE); -} - diff --git a/thirdparty/grx249/src/wideline/custplne.c b/thirdparty/grx249/src/wideline/custplne.c deleted file mode 100644 index daefdfb..0000000 --- a/thirdparty/grx249/src/wideline/custplne.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - ** custplne.c ---- draw an open ended dashed and/or wide polygon - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrCustomPolyLine(int n,int pt[][2],const GrLineOption *o) -{ - GrFillArg fval; - fval.color = o->lno_color; - _GrDrawCustomPolygon(n,pt,o,&_GrSolidFiller,fval,FALSE,FALSE); -} diff --git a/thirdparty/grx249/src/wideline/custpoly.c b/thirdparty/grx249/src/wideline/custpoly.c deleted file mode 100644 index 36275dc..0000000 --- a/thirdparty/grx249/src/wideline/custpoly.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - ** custpoly.c ---- draw a closed dashed and/or wide polygon - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" - -void GrCustomPolygon(int n,int pt[][2],const GrLineOption *o) -{ - GrFillArg fval; - fval.color = o->lno_color; - _GrDrawCustomPolygon(n,pt,o,&_GrSolidFiller,fval,TRUE,FALSE); -} diff --git a/thirdparty/grx249/src/wideline/drwcpoly.c b/thirdparty/grx249/src/wideline/drwcpoly.c deleted file mode 100644 index 7cd55ca..0000000 --- a/thirdparty/grx249/src/wideline/drwcpoly.c +++ /dev/null @@ -1,437 +0,0 @@ -/** - ** drwcpoly.c ---- draw the outline of a custom (wide and/or dashed) polygon - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This file is part of the GRX graphics library. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "libgrx.h" -#include "shapes.h" -#include "clipping.h" -#include "arith.h" -#include "memcopy.h" - -/* - * update the end point of line #1 and the starting point of line #2 - * so that they intersect - */ -static void intersect(int l1s[2],int l1e[2],int l2s[2],int l2e[2]) -{ -# define x11 l1s[0] -# define y11 l1s[1] -# define x12 l1e[0] -# define y12 l1e[1] -# define x21 l2s[0] -# define y21 l2s[1] -# define x22 l2e[0] -# define y22 l2e[1] - if(x12 != x21 || y12 != y21) { - int dx1 = x12 - x11; - int dy1 = y12 - y11; - int dx2 = x22 - x21; - int dy2 = y22 - y21; - long det = imul32(dx2,dy1) - imul32(dx1,dy2); - if( det != 0 ) { - /* Compute t for the parametric equation of line #2 */ - /* then: x = x21 + dx2 * t2, and y = y21 + dy2 * t2 */ - /* but do this with integer arithmetic */ - /* and do rounding instead of truncation */ - long det_t2 = imul32(dx1,(y21 - y11)) - imul32(dy1,(x21 - x11)); - long ldet = labs(det); - /* make sure we're still near old start point of line #2 */ - if( labs(det_t2) < (((ldet<<1) + ldet)>>1) ) { - int xdif2 = (int)(((long)(dx2 << 1) * det_t2) / det); - int ydif2 = (int)(((long)(dy2 << 1) * det_t2) / det); - if(xdif2 > 0) xdif2++; - if(ydif2 > 0) ydif2++; - xdif2 = x21 + (xdif2 >> 1); - ydif2 = y21 + (ydif2 >> 1); - /* don't create triangles */ - if ( xdif2 != x11 && xdif2 != x22 && - ydif2 != y11 && ydif2 != y22 ) { - l1e[0] = l2s[0] = xdif2; - l1e[1] = l2s[1] = ydif2; - return; - } - } - } - { /* - ** no good intersection point till now - ** Check mean point and its eight neighbours for - ** best compromise intersection point - ** - ** y-y11 y12-y11 y-y21 y22-y21 - ** ----- - ------- = 0 and ----- - ------- = 0 - ** x-x11 x12-x11 x-x21 x22-x21 - ** - ** should hold for intersection point (x,y) - ** Measuring the errors for both lines: - ** - ** e1 = (x12-x11)(y-y11)-(x-x11)(y12-y11) = dx1(y-y11)-(x-x11)dy1 - ** e2 = (x22-x21)(y-y21)-(x-x21)(y22-y21) = dx2(y-y21)-(x-x21)dy2 - ** - ** search minimal err = |e1| + |e2| - */ - static int xr[9] = { 0, -1, 0, 1, 0, -1, 1, 1, -1}; - static int yr[9] = { 0, 0, 1, 0, -1, 1, 1, -1, -1}; - int xc = (x12+x21) >> 1; - int yc = (y12+y21) >> 1; - int xb = 0, yb = 0; - int i; - long minerr=0, err; - for (i = 0; i < 9; ++i) { - int x = xc+xr[i]; - int y = yc+yr[i]; - long e1 = imul32(dx1,(y-y11)) - imul32(dy1,(x-x11)); - long e2 = imul32(dx2,(y-y21)) - imul32(dy2,(x-x21)); - err = labs(e1) + labs(e2); - if ( i==0 || err < minerr) { - minerr = err; - xb = xr[i]; yb = yr[i]; - if (minerr == 0) break; - } - } - l1e[0] = l2s[0] = xc + xb; - l1e[1] = l2s[1] = yc + yb; - } - } -# undef x11 -# undef y11 -# undef x12 -# undef y12 -# undef x21 -# undef y21 -# undef x22 -# undef y22 -} - -/* - * generate the four corner points of a wide line segment - * - * p1 end : rect[0] rect[1] - * p2 end : rect[2] rect[3] - * - */ -static void genrect(int p1[2],int p2[2],int w,int rect[4][2]) -{ - int dx = p2[0] - p1[0]; - int dy = p2[1] - p1[1]; - int wx,wy,wx1,wy1,wx2,wy2; - - if(dx == 0) { - wx = w; - wy = 0; - } - else if (dy == 0) { - wx = 0; - wy = w; - } - else { - unsigned long minerr,error = ~0UL,w2 = imul32(w,w); - int mindelta = umin(iabs(dx),iabs(dy)); - int maxdelta = umax(iabs(dx),iabs(dy)); - wx1 = w/2; - if (wx1 <= 0) wx1 = 1; - if (wx1+wx1 < w) ++wx1; - wy1 = 0; - do { - wx = wx1++; - wy = wy1; - wy1 = urscale(wx1,mindelta,maxdelta); - minerr = error; - error = imul32(wx1,wx1) + imul32(wy1,wy1) - w2; - error = labs(error); - } while(error <= minerr); - if(iabs(dx) > iabs(dy)) iswap(wx,wy); - } - if(dx < 0) wy = (-wy); - if(dy >= 0) wx = (-wx); - wx1 = -(wx >> 1); - wy1 = -(wy >> 1); - wx2 = wx + wx1; - wy2 = wy + wy1; - if((wx1 + wx2) < 0) wx1++,wx2++; - if((wy1 + wy2) < 0) wy1++,wy2++; - rect[0][0] = p1[0] + wx1; - rect[0][1] = p1[1] + wy1; - rect[1][0] = p1[0] + wx2; - rect[1][1] = p1[1] + wy2; - rect[2][0] = p2[0] + wx2; - rect[2][1] = p2[1] + wy2; - rect[3][0] = p2[0] + wx1; - rect[3][1] = p2[1] + wy1; -} - -/* - * working version of the line pattern and fill argument structures - */ -typedef struct { - int w; /* line width */ - int psegs; /* number of pattern segments */ - int plength; /* total length of pattern in pixels */ - int ppos; /* current pattern position (modulo plength) */ - int on; /* is the pattern currently on ? */ - unsigned char *patt; /* the pattern bits */ - GrFiller *f; /* the filler functions */ - GrFillArg c; /* the filler argument */ -} linepatt; - -static void solidsegment1( - int p1[2], int p2[2], - int prev[2],int next[2], - linepatt *p -){ - int x1 = p1[0], y1 = p1[1]; - int x2 = p2[0], y2 = p2[1]; - (*p->f->line)( - (x1 + CURC->gc_xoffset), - (y1 + CURC->gc_yoffset), - (x2 - x1), - (y2 - y1), - p->c - ); -} - -static void solidsegmentw( - int p1[2], int p2[2], - int prev[2],int next[2], - linepatt *p -){ - int rect[4][2], prect[4][2], nrect[4][2]; - genrect(p1,p2,p->w,rect); - if(prev) genrect(prev,p1,p->w,prect); - if(next) genrect(p2,next,p->w,nrect); - if(prev && next) { - int points[2]; - points[0] = rect[1][0]; points[1] = rect[1][1]; - intersect(prect[1],prect[2],rect[1],rect[2]); - intersect(points,rect[2],nrect[1],nrect[2]); - points[0] = rect[0][0]; points[1] = rect[0][1]; - intersect(prect[0],prect[3],rect[0],rect[3]); - intersect(points,rect[3],nrect[0],nrect[3]); - } else - if(prev) { - intersect(prect[1],prect[2],rect[1],rect[2]); - intersect(prect[0],prect[3],rect[0],rect[3]); - } else - if(next) { - intersect(rect[1],rect[2],nrect[1],nrect[2]); - intersect(rect[0],rect[3],nrect[0],nrect[3]); - } - _GrScanConvexPoly(4,rect,p->f,p->c); -} - -static void dashedsegment( - int p1[2], int p2[2], - int prev[2],int next[2], - linepatt *p, - void (*doseg)(int[2],int[2],int[2],int[2],linepatt*) -){ - int on,pos,len,seg; - int x,y,dx,dy; - int error,erradd,errsub,count; - int xinc1,xinc2,yinc1,yinc2; - int start[2],end[2], se_init; - - /* find the current starting segment for the pattern */ - pos = (p->ppos %= p->plength); - for(on = 1,seg = 0; ; ) { - len = p->patt[seg]; - if(pos < len) { len -= pos; break; } - if(++seg >= p->psegs) seg = 0; - on ^= 1; - pos -= len; - } - /* Can't have a zero length element here */ - - /* set up line drawing */ - x = p1[0]; dx = p2[0] - x; - y = p1[1]; dy = p2[1] - y; - if(dx >= 0) { xinc2 = 1; } - else { xinc2 = -1; dx = -dx; } - if(dy >= 0) { yinc2 = 1; } - else { yinc2 = -1; dy = -dy; } - if(dx >= dy) { - count = dx + 1; - error = dx >> 1; - errsub = dy; - erradd = dx; - xinc1 = xinc2; - yinc1 = 0; - } - else { - count = dy + 1; - error = dy >> 1; - errsub = dx; - erradd = dy; - yinc1 = yinc2; - xinc1 = 0; - } - se_init = 0; - if(on) { - start[0] = x; - start[1] = y; - se_init = 1; - } - else { - prev = NULL; - } - /* go */ - while(--count >= 0) { - if(on) { - end[0] = x; - end[1] = y; - se_init |= 2; - } - if((error -= errsub) < 0) { - error += erradd; - x += xinc2; - y += yinc2; - } - else { - x += xinc1; - y += yinc1; - } - if(--len <= 0) { - /* end of current segment */ - int old_state = on; - do { - if(++seg >= p->psegs) seg = 0; - len = p->patt[seg]; - on ^= 1; - } while (len == 0); - if ( !old_state && on && count > 0) { - start[0] = x; - start[1] = y; - se_init = 1; - } else - if ( old_state && !on) { - (*doseg)(start,end,prev,NULL,p); - prev = NULL; - se_init = 0; - } - /* else: zero length element(s), continue current segment */ - } - } - if(on && se_init==3) { - (*doseg)(start,end,prev,next,p); - } - p->on = on; -} - -static void dashedsegment1( - int p1[2], int p2[2], - int prev[2],int next[2], - linepatt *p -){ - dashedsegment(p1,p2,prev,next,p,solidsegment1); -} - -static void dashedsegmentw( - int p1[2], int p2[2], - int prev[2],int next[2], - linepatt *p -){ - dashedsegment(p1,p2,prev,next,p,solidsegmentw); -} - -void _GrDrawCustomPolygon( - int n,int pt[][2], - const GrLineOption *lp, - GrFiller *f,GrFillArg c, - int doClose,int circle -){ -# define x1 start[0] -# define y1 start[1] -# define x2 end[0] -# define y2 end[1] - int i,start[2],end[2]; - void (*doseg)(int[2],int[2],int[2],int[2],linepatt*); - linepatt p; - GrContext preclip; - if(n < 2) return; - /* set up working pattern */ - p.f = f; - p.c = c; - p.w = imax((lp->lno_width - 1),0); - p.ppos = 0; - p.patt = lp->lno_dashpat; - p.psegs = p.patt ? imax(lp->lno_pattlen,0) : 0; - p.plength = 0; - for(i = 0; i < p.psegs; i++) { -/* if(!p.patt[i]) { p.plength = 0; break; } */ - p.plength += p.patt[i]; - } - if(p.plength) - doseg = p.w ? dashedsegmentw : dashedsegment1; - else { - if (p.psegs && p.patt[0]==0 ) return; /* nothing to do */ - doseg = p.w ? solidsegmentw : solidsegment1; - } - /* preclip */ - x1 = x2 = pt[0][0]; - y1 = y2 = pt[0][1]; - for(i = 1; i < n; i++) { - int *ppt = pt[i]; - if(x1 > ppt[0]) x1 = ppt[0]; - if(x2 < ppt[0]) x2 = ppt[0]; - if(y1 > ppt[1]) y1 = ppt[1]; - if(y2 < ppt[1]) y2 = ppt[1]; - } - sttcopy(&preclip,CURC); - preclip.gc_xcliplo -= p.w; preclip.gc_ycliplo -= p.w; - preclip.gc_xcliphi += p.w; preclip.gc_ycliphi += p.w; - clip_ordbox((&preclip),x1,y1,x2,y2); - mouse_block(CURC,x1,y1,x2,y2); - /* do the polygon segments */ - if(doClose) { - int *p1 = pt[0], *p2 = pt[n - 1]; - if((n > 1) && (p1[0] == p2[0]) && (p1[1] == p2[1])) n--; - if(n < 3) doClose = FALSE; - } - for(i = 0; i < n; i++) { - int clipped,xmajor,length; - int *p1,*p2,*prev,*next; - if(!(i + doClose)) continue; - p1 = pt[(i + n - 1) % n]; - p2 = pt[i]; - prev = ((i > 1) || doClose) ? pt[(i + n - 2) % n] : NULL; - next = ((i < (n - 1)) || doClose) ? pt[(i + 1) % n] : NULL; - x1 = p1[0]; - y1 = p1[1]; - x2 = p2[0]; - y2 = p2[1]; - clipped = 0; - xmajor = iabs(x1 - x2); - length = iabs(y1 - y2); - if(xmajor > length) { length = xmajor; xmajor = 1; } - else xmajor = 0; - clip_line_((&preclip),x1,y1,x2,y2,goto outside,clipped = p.plength); - if(clipped) { - clipped = xmajor ? iabs(p1[0] - x1) : iabs(p1[1] - y1); - p.ppos += clipped; - length -= clipped; - } - (*doseg)(start,end,prev,next,&p); - outside: - p.ppos += length; - } - mouse_unblock(); -# undef x1 -# undef y1 -# undef x2 -# undef y2 -} - - diff --git a/thirdparty/grx249/test/arctest.c b/thirdparty/grx249/test/arctest.c deleted file mode 100644 index 7c6b772..0000000 --- a/thirdparty/grx249/test/arctest.c +++ /dev/null @@ -1,61 +0,0 @@ -/** - ** arctest.c ---- test arc outline and filled arc drawing - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "test.h" - -TESTFUNC(arctest) -{ - char buff[300]; - int xc,yc,xa,ya,start,end; - FILE *fp; - GrColor red = GrAllocColor(255,0,0); - GrColor green = GrAllocColor(0,255,0); - GrColor blue = GrAllocColor(0,0,255); - - fp = fopen("arctest.dat","r"); - if(fp == NULL) return; - while(fgets(buff,299,fp) != NULL) { - int len = strlen(buff); - while(--len >= 0) { - if(buff[len] == '\n') { buff[len] = '\0'; continue; } - if(buff[len] == '\r') { buff[len] = '\0'; continue; } - break; - } - if(sscanf(buff, - "arc xc=%d yc=%d xa=%d ya=%d start=%d end=%d", - &xc,&yc,&xa,&ya,&start,&end) == 6) { - GrClearScreen(GrBlack()); - GrEllipse(xc,yc,xa,ya,red); - GrFilledEllipse(xc,yc,xa,ya,blue); - GrEllipseArc(xc,yc,xa,ya,start,end,GR_ARC_STYLE_CLOSE2,GrWhite()); - GrTextXY(0,0,buff,GrWhite(),GrNOCOLOR); - GrTextXY(0,20,"press any key to continue",GrWhite(),GrNOCOLOR); - GrKeyRead(); - GrClearScreen(GrBlack()); - GrEllipseArc(xc,yc,xa,ya,start,end,GR_ARC_STYLE_CLOSE2,red); - GrFilledEllipseArc(xc,yc,xa,ya,start,end,GR_ARC_STYLE_CLOSE2,green); - GrTextXY(0,0,buff,GrWhite(),GrNOCOLOR); - GrTextXY(0,20,"press any key to continue",GrWhite(),GrNOCOLOR); - GrKeyRead(); - } - } - fclose(fp); -} - diff --git a/thirdparty/grx249/test/arctest.dat b/thirdparty/grx249/test/arctest.dat deleted file mode 100644 index 6e0b2fb..0000000 --- a/thirdparty/grx249/test/arctest.dat +++ /dev/null @@ -1,9 +0,0 @@ -arc xc=300 yc=200 xa=50 ya=50 start=10 end=40 -arc xc=300 yc=200 xa=250 ya=150 start=10 end=200 -arc xc=300 yc=200 xa=250 ya=150 start=10 end=2000 -arc xc=300 yc=200 xa=250 ya=150 start=1000 end=200 -arc xc=300 yc=200 xa=25 ya=15 start=3500 end=800 -arc xc=300 yc=200 xa=25 ya=15 start=10 end=100 -arc xc=300 yc=200 xa=25 ya=15 start=3500 end=10 -arc xc=300 yc=200 xa=25 ya=15 start=0 end=900 - diff --git a/thirdparty/grx249/test/bb1test.c b/thirdparty/grx249/test/bb1test.c deleted file mode 100644 index 7ffe8af..0000000 --- a/thirdparty/grx249/test/bb1test.c +++ /dev/null @@ -1,84 +0,0 @@ -/** - ** bb1test.c ---- test the GrBitBlt1bpp routine - ** - ** Copyright (c) 2001 Josu Onandia - ** [e-mail: jonandia@fagorautomation.es]. - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - **/ - -#include -#include "grx20.h" -#include "grxkeys.h" - -int main(void) -{ - GrContext *pContext; - int sizex = 40; - int sizey = 40; - int x = 0; - int y = 40; - GrColor fcolor, bcolor; - GrKeyType k; - - GrSetMode( GR_default_graphics ); - /* Create a 1bpp bitmap */ - pContext = GrCreateFrameContext(GR_frameRAM1, sizex, sizey, NULL, NULL); - /* draw something (black and white) into the bitmap */ - GrSetContext(pContext); - GrClearContext( GrBlack() ); - GrLine(0, 0, sizex-1, sizey-1, GrWhite()); - GrLine(0, sizey-1, sizex-1, 0, GrWhite()); - - GrSetContext(NULL); - fcolor = GrAllocColor( 255,0,0 ); - bcolor = GrAllocColor( 0,0,255 ); - GrTextXY(0,0,"Type u d l r U D L R to move, 1 2 to change color, q to quit", - GrWhite(),GrNOCOLOR); - GrSetClipBox(0, 40, GrScreenX(), GrScreenY()); - - /* Put the bitmap into the screen */ - GrBitBlt1bpp(NULL,x,y,pContext,0,0,sizex-1,sizey-1,fcolor,bcolor); - - while( 1 ){ - k = GrKeyRead(); - if( k == 'q' ) break; - switch( k ) { - case 'u': y--; break; - case 'd': y++; break; - case 'l': x--; break; - case 'r': x++; break; - case 'U': y -= 10; break; - case 'D': y += 10; break; - case 'L': x -= 10; break; - case 'R': x += 10; break; - case '1': fcolor = GrAllocColor( 255,0,0 ); - bcolor = GrAllocColor( 0,0,255 ); - break; - case '2': fcolor = GrAllocColor( 0,255,255 ); - bcolor = GrAllocColor( 255,255,0 ); - break; - default: continue; - } - if(x < -40) x = -40; - if(x > GrScreenX()) x = GrScreenX(); - if(y < 0) y = 0; - if(y > GrScreenY()) y = GrScreenY(); - GrBitBlt1bpp(NULL,x,y,pContext,0,0,sizex-1,sizey-1,fcolor,bcolor); - } - - /* Destroy */ - GrDestroyContext(pContext); - - GrSetMode(GR_default_text); - return 0; -} diff --git a/thirdparty/grx249/test/bgi/bccbgi.c b/thirdparty/grx249/test/bgi/bccbgi.c deleted file mode 100644 index 86eaf45..0000000 --- a/thirdparty/grx249/test/bgi/bccbgi.c +++ /dev/null @@ -1,2214 +0,0 @@ -/* - GRAPHICS DEMO FOR Borland C++ - - Copyright (c) 1987,88,91 Borland International. All rights reserved. -*/ - -/* Partially copyrighted (c) 1993-97 by Hartmut Schirmer */ - -#ifdef __TINY__ -#error BGIDEMO will not run in the tiny model. -#endif - -#include -#include -#include -#include -#include -#include "libbcc.h" -#include "bgiext.h" -#include "stdfun.h" - -#include "../rand.h" -#define Random(r) ((unsigned) (((RND() % (r)) + 1))) -#define Seed(s) SRND(s) - -#if defined(__MSDOS__) || defined(__WIN32__) -#define BGI_PATH "..\\..\\chr" -#else -#define BGI_PATH "../../chr" -#endif - -#define itoa(value,str,radix) sprintf((str),"%d",(value)) -#define getch() getkey() - -#define ESC 0x1b /* Define the escape key */ -#ifndef TRUE -# define TRUE 1 /* Define some handy constants */ -#endif -#ifndef FALSE -# define FALSE 0 /* Define some handy constants */ -#endif -#ifndef PI -# define PI 3.14159 /* Define a value for PI */ -#endif -#define ON 1 /* Define some handy constants */ -#define OFF 0 /* Define some handy constants */ - -#define NFONTS 11 - -char *Fonts[] = { - "DefaultFont", "TriplexFont", "SmallFont", - "SansSerifFont", "GothicFont", "ScriptFont", "SimplexFont", "TriplexScriptFont", - "ComplexFont", "EuropeanFont", "BoldFont" -}; - -char *LineStyles[] = { - "SolidLn", "DottedLn", "CenterLn", "DashedLn", "UserBitLn" -}; - -char *FillStyles[] = { - "EmptyFill", "SolidFill", "LineFill", "LtSlashFill", - "SlashFill", "BkSlashFill", "LtBkSlashFill", "HatchFill", - "XHatchFill", "InterleaveFill", "WideDotFill", "CloseDotFill" -}; - -char *TextDirect[] = { - "HorizDir", "VertDir" -}; - -char *HorizJust[] = { - "LeftText", "CenterText", "RightText" -}; - -char *VertJust[] = { - "BottomText", "CenterText", "TopText" -}; - -struct PTS { - int x, y; -}; /* Structure to hold vertex points */ - -int GraphDriver; /* The Graphics device driver */ -int GraphMode; /* The Graphics mode value */ -double AspectRatio; /* Aspect ratio of a pixel on the screen*/ -int MaxX, MaxY; /* The maximum resolution of the screen */ -int MaxColors; /* The maximum # of colors available */ -int ErrorCode; /* Reports any graphics errors */ -struct palettetype palette; /* Used to read palette info */ -static char PauseMsg[] = "Esc aborts or press a key..."; -static char StopMsg[] = "ESC Aborts - Press a Key to stop"; - -/* */ -/* GPRINTF: Used like PRINTF except the output is sent to the */ -/* screen in graphics mode at the specified co-ordinate. */ -/* */ - -int gprintf( int *xloc, int *yloc, char *fmt, ... ) -{ - va_list argptr; /* Argument list pointer */ - char str[140]; /* Buffer to build sting into */ - int cnt; /* Result of SPRINTF for return */ - - va_start( argptr, fmt ); /* Initialize va_ functions */ - - cnt = vsprintf( str, fmt, argptr ); /* prints string to buffer */ - outtextxy( *xloc, *yloc, str ); /* Send string in graphics mode */ - *yloc += textheight( "H" ) + 2; /* Advance to next line */ - - va_end( argptr ); /* Close va_ functions */ - - return( cnt ); /* Return the conversion count */ - -} - -/* */ -/* CHANGETEXTSTYLE: similar to settextstyle, but checks for */ -/* errors that might occur whil loading the font file. */ -/* */ - -void changetextstyle(int font, int direction, int charsize) -{ - int ErrorCode; - - graphresult(); /* clear error code */ - settextstyle(font, direction, charsize); - ErrorCode = graphresult(); /* check result */ - if( ErrorCode != grOk ){ /* if error occured */ -#if 0 - closegraph(); - printf(" Graphics System Error: %s\n", grapherrormsg( ErrorCode ) ); - exit( 1 ); -#else - settextstyle(DEFAULT_FONT, direction, charsize); -#endif - } -} - -/* */ -/* DRAWBORDER: Draw a solid single line around the current */ -/* viewport. */ -/* */ - -void DrawBorder(int color) -{ - struct viewporttype vp; - - setcolor( color); - - setlinestyle( SOLID_LINE, 0, NORM_WIDTH ); - - getviewsettings( &vp ); - rectangle( 0, 0, vp.right-vp.left, vp.bottom-vp.top); - -} - -/* */ -/* STATUSLINE: Display a status line at the bottom of the screen. */ -/* */ - -void StatusLineColor( char *msg, int color ) -{ - int height; - - setviewport( 0, 0, MaxX, MaxY, 1 ); /* Open port to full screen */ - setcolor( color); /* Set requested color */ - - changetextstyle( DEFAULT_FONT, HORIZ_DIR, 1 ); - settextjustify( CENTER_TEXT, TOP_TEXT ); - setlinestyle( SOLID_LINE, 0, NORM_WIDTH ); - setfillstyle( EMPTY_FILL, 0 ); - - height = textheight( "H" ); /* Detemine current height */ - bar( 0, MaxY-(height+4), MaxX, MaxY ); - rectangle( 0, MaxY-(height+4), MaxX, MaxY ); - outtextxy( MaxX/2, MaxY-(height+2), msg ); - setviewport( 1, height+5, MaxX-1, MaxY-(height+5), 1 ); -} - -void StatusLine( char *msg ) -{ - StatusLineColor(msg, WHITE); -} - -/* */ -/* MAINWINDOW: Establish the main window for the demo and set */ -/* a viewport for the demo code. */ -/* */ - -void DisplayTitle(char *header, int color) { - struct viewporttype vp; - - getviewsettings( &vp ); - setcolor( color); /* Set current requested color */ - setviewport( 0, 0, MaxX, MaxY, 1 ); /* Open port to full screen */ - changetextstyle( DEFAULT_FONT, HORIZ_DIR, 1 ); - settextjustify( CENTER_TEXT, TOP_TEXT ); - outtextxy( MaxX/2, 2, header ); - setviewport(vp.left, vp.top, vp.right, vp.bottom, vp.clip); -} - -void MainWindowColor( char *header, int color) -{ - int height; - - cleardevice(); /* Clear graphics screen */ - setcolor( color); /* Set current requested color */ - setviewport( 0, 0, MaxX, MaxY, 1 ); /* Open port to full screen */ - - height = textheight( "H" ); /* Get basic text height */ - - DisplayTitle(header, color); - setviewport( 0, height+4, MaxX, MaxY-(height+4), 1 ); - DrawBorder(color); - setviewport( 1, height+5, MaxX-1, MaxY-(height+5), 1 ); - -} - -void MainWindow( char *header ) -{ - MainWindowColor( header, WHITE); -} - -/* */ -/* PAUSE: Pause until the user enters a keystroke. If the */ -/* key is an ESC, then exit program, else simply return. */ -/* */ - - -void NewPause(int clear) -{ - int c; - - StatusLine( PauseMsg ); /* Put msg at bottom of screen */ - - c = getch(); /* Read a character from kbd */ - - if( ESC == c ){ /* Does user wish to leave? */ - closegraph(); /* Change to text mode */ - exit( 1 ); /* Return to OS */ - } - - if( 0 == c ){ /* Did use hit a non-ASCII key? */ - c = getch(); /* Read scan code for keyboard */ - } - - if (clear) - cleardevice(); /* Clear the screen */ -} - -#define Pause() NewPause(TRUE) - -/* */ -/* INITIALIZE: Initializes the graphics system and reports */ -/* any errors which occured. */ -/* */ - -void Initialize(void) -{ - int xasp, yasp; - - GraphDriver = DETECT; /* Request auto-detection */ -#ifdef __GNUC__ -/* set_BGI_mode_whc(&GraphDriver, &GraphMode, 640, 480, 16); */ - set_BGI_mode_pages(2); -#endif - initgraph( &GraphDriver, &GraphMode, BGI_PATH ); - ErrorCode = graphresult(); /* Read result of initialization*/ - if( ErrorCode != grOk ){ /* Error occured during init */ - printf(" Graphics System Error: %s\n", grapherrormsg( ErrorCode ) ); - exit( 1 ); - } - - getpalette( &palette ); /* Read the palette from board */ - MaxColors = getmaxcolor() + 1; /* Read maximum number of colors*/ - if (MaxColors == 256) - setrgbdefaults(); - - MaxX = getmaxx(); - MaxY = getmaxy(); /* Read size of screen */ - - getaspectratio( &xasp, &yasp ); /* read the hardware aspect */ - AspectRatio = (double)xasp / (double)yasp; /* Get correction factor */ - -} - - -/* */ -/* REPORTSTATUS: Report the current configuration of the system */ -/* after the auto-detect initialization. */ -/* */ - -void ReportStatus(void) -{ - struct viewporttype viewinfo; /* Params for inquiry procedures*/ - struct linesettingstype lineinfo; - struct fillsettingstype fillinfo; - struct textsettingstype textinfo; - struct palettetype palette; - - char *driver, *mode, *fmt; /* Strings for driver and mode */ - int x, y, mno; - - getviewsettings( &viewinfo ); - getlinesettings( &lineinfo ); - getfillsettings( &fillinfo ); - gettextsettings( &textinfo ); - getpalette( &palette ); - - x = 5; - y = 4; - - MainWindow( "Status report after InitGraph" ); - settextjustify( LEFT_TEXT, TOP_TEXT ); - - driver = getdrivername(); - mode = getmodename(GraphMode); /* get current setting */ - - gprintf( &x, &y, "Graphics device : %-20s (%d)", driver, GraphDriver ); - gprintf( &x, &y, "Graphics mode : %-20s (%d)", mode, GraphMode ); -#ifdef __GNUC__ - gprintf( &x, &y, "Available pages : %d", get_BGI_mode_pages() ); -#endif - gprintf( &x, &y, "Screen resolution : ( 0, 0, %d, %d )", getmaxx(), getmaxy() ); - gprintf( &x, &y, "Current view port : ( %d, %d, %d, %d )", - viewinfo.left, viewinfo.top, viewinfo.right, viewinfo.bottom ); - gprintf( &x, &y, "Clipping : %s", viewinfo.clip ? "ON" : "OFF" ); - - gprintf( &x, &y, "Current position : ( %d, %d )", getx(), gety() ); - gprintf( &x, &y, "Colors available : %d", MaxColors ); - gprintf( &x, &y, "Current color : %d", getcolor() ); - - gprintf( &x, &y, "Line style : %s", LineStyles[ lineinfo.linestyle ] ); - gprintf( &x, &y, "Line thickness : %d", lineinfo.thickness ); - - gprintf( &x, &y, "Current fill style : %s", FillStyles[ fillinfo.pattern ] ); - gprintf( &x, &y, "Current fill color : %d", fillinfo.color ); - - gprintf( &x, &y, "Current font : %s", Fonts[ textinfo.font ] ); - gprintf( &x, &y, "Text direction : %s", TextDirect[ textinfo.direction ] ); - gprintf( &x, &y, "Character size : %d", textinfo.charsize ); - gprintf( &x, &y, "Horizontal justify : %s", HorizJust[ textinfo.horiz ] ); - gprintf( &x, &y, "Vertical justify : %s", VertJust[ textinfo.vert ] ); - - gprintf( &x, &y, "Aspect ratio : %lf", AspectRatio); - - getviewsettings( &viewinfo ); - { - int ybase; - setfillstyle(SOLID_FILL, BLACK); - if (MaxY<350-1) { - x = 400; - y = 4; - fmt = "#%-3d: %s"; - } else { - y += 5; - fmt = " Mode #%-3d : %s"; - } - gprintf( &x, &y, "Available modes :"); - y += 5; - ybase = y; - for (mno = 0; mno <= getmaxmode(); ++mno) { - char sp[100]; - sprintf(sp, fmt, mno, getmodename(mno)); - bar(x-4, y + textheight(sp), x+textwidth(sp)+4, y); - gprintf( &x, &y, "%s", sp); - if (y+viewinfo.top>viewinfo.bottom-8) { - y = ybase; - x += (viewinfo.right-viewinfo.left) / 2; - } - } - } - - Pause(); /* Pause for user to read screen*/ - -} - -/* */ -/* TEXTDUMP: Display the all the characters in each of the */ -/* available fonts. */ -/* */ - -void TextDump(void) -{ - static int CGASizes[] = { - 1, 3, 7, 3, 3, 2, 2, 2, 2, 2, 2 }; - static int NormSizes[] = { - 1, 4, 7, 4, 4, 2, 2, 2, 2, 2, 2 }; - - char buffer[80]; - int font, ch, wwidth, lwidth, size; - struct viewporttype vp; - - for( font=0 ; font wwidth-3) - moveto( 5, gety() + textheight("H") + 3 ); - outtext( buffer ); /* send string to screen */ - ++ch; /* Goto the next character */ - } - } - else{ - - size = (MaxY < 200) ? CGASizes[font] : NormSizes[font]; - changetextstyle( font, HORIZ_DIR, size ); - - ch = '!'; /* Begin at 1st printable */ - while( ch < 256 ){ /* For each printable character */ - buffer[0] = ch; /* Put character into a string */ - lwidth = textwidth( buffer); /* Get letter width */ - if( (lwidth+getx()) > wwidth-3) /* Are we still in window? */ - moveto( 5, gety()+textheight("H")+3 ); - outtext( buffer ); /* send string to screen */ - ++ch; /* Goto the next character */ - } - - } - - Pause(); /* Pause until user acks */ - - } /* End of FONT loop */ - -} - -/* */ -/* BAR3DDEMO: Display a 3-D bar chart on the screen. */ -/* */ - -void Bar3DDemo(void) -{ - static int barheight[] = { - 1, 3, 5, 4, 3, 2, 1, 5, 4, 2, 3 }; - struct viewporttype vp; - int xstep, ystep, deepth; - int i, j, h, color, bheight; - char buffer[10]; - - MainWindow( "Bar 3-D / Rectangle Demonstration" ); - - h = 3 * textheight( "H" ); - getviewsettings( &vp ); - settextjustify( CENTER_TEXT, TOP_TEXT ); - changetextstyle( TRIPLEX_FONT, HORIZ_DIR, 4 ); - outtextxy( MaxX/2, 6, "These are 3-D Bars" ); - changetextstyle( DEFAULT_FONT, HORIZ_DIR, 1 ); - setviewport( vp.left+50, vp.top+40, vp.right-50, vp.bottom-10, 1 ); - getviewsettings( &vp ); - - line( h, h, h, vp.bottom-vp.top-h ); - line( h, (vp.bottom-vp.top)-h, (vp.right-vp.left)-h, (vp.bottom-vp.top)-h ); - xstep = ((vp.right-vp.left) - (2*h)) / 10; - ystep = ((vp.bottom-vp.top) - (2*h)) / 5; - j = (vp.bottom-vp.top) - h; - deepth = (getmaxx() <= 400) ? 7 : 15; - settextjustify( LEFT_TEXT, CENTER_TEXT ); - - for( i=0 ; i<6 ; ++i ){ - line( h/2, j, h, j ); - itoa( i, buffer, 10 ); - outtextxy( 0, j, buffer ); - j -= ystep; - } - - j = h; - settextjustify( CENTER_TEXT, TOP_TEXT ); - - for( i=0 ; i<11 ; ++i ){ - color = Random( MaxColors-1 ) + 1; - setfillstyle( i+1, color ); - line( j, (vp.bottom-vp.top)-h, j, (vp.bottom-vp.top-3)-(h/2) ); - itoa( i, buffer, 10 ); - outtextxy( j, (vp.bottom-vp.top)-(h/2), buffer ); - if( i != 10 ){ - bheight = (vp.bottom-vp.top) - h - 1; - bar3d( j, (vp.bottom-vp.top-h)-(barheight[i]*ystep), j+xstep-deepth, bheight, deepth, 1 ); - } - j += xstep; - } - - Pause(); /* Pause for user's response */ - -} - -/* */ -/* RandomBARS: Display random bars */ -/* */ - -void RandomBars(void) -{ - int color; - - MainWindow( "Random Bars" ); - StatusLine( PauseMsg ); /* Put msg at bottom of screen */ - while( !kbhit() ){ /* Until user enters a key... */ - color = Random( MaxColors-1 )+1; - setcolor( color ); - setfillstyle( Random(11)+1, color ); - bar3d( Random( getmaxx() ), Random( getmaxy() ), - Random( getmaxx() ), Random( getmaxy() ), 0, OFF); - } - - Pause(); /* Pause for user's response */ - -} - - -/* */ -/* TEXTDEMO: Show each font in several sizes to the user. */ -/* */ - -void TextDemo(void) -{ - int charsize[] = { - 1, 3, 7, 3, 4, 2, 2, 2, 2, 2, 2 }; - int font, size; - int h, x, y, i; - struct viewporttype vp; - char buffer[80]; - - for( font=0 ; font= 1.0) - radius = (int)(radius / AspectRatio); - while( (AspectRatio*radius) < piesize ) ++radius; - - lradius = radius + ( radius / 5 ); /* Labels placed 20% farther */ - - changetextstyle( TRIPLEX_FONT, HORIZ_DIR, 4 ); - settextjustify( CENTER_TEXT, TOP_TEXT ); - outtextxy( MaxX/2, 6, "This is a Pie Chart" ); - changetextstyle( TRIPLEX_FONT, HORIZ_DIR, 1 ); - settextjustify( CENTER_TEXT, TOP_TEXT ); - - setfillstyle( SOLID_FILL, _ega_color(RED) ); - pieslice( xcenter+10, ycenter-adjasp(10), 0, 90, radius ); - radians = torad( 45 ); - x = xcenter + (int)( cos( radians ) * (double)lradius ); - y = ycenter - (int)( sin( radians ) * (double)lradius * AspectRatio ); - settextjustify( LEFT_TEXT, BOTTOM_TEXT ); - outtextxy( x, y, "25 %" ); - - setfillstyle( WIDE_DOT_FILL, _ega_color(GREEN) ); - pieslice( xcenter, ycenter, 90, 135, radius ); - radians = torad( 113 ); - x = xcenter + (int)( cos( radians ) * (double)lradius ); - y = ycenter - (int)( sin( radians ) * (double)lradius * AspectRatio ); - settextjustify( RIGHT_TEXT, BOTTOM_TEXT ); - outtextxy( x, y, "12.5 %" ); - - setfillstyle( INTERLEAVE_FILL, _ega_color(YELLOW) ); - settextjustify( RIGHT_TEXT, CENTER_TEXT ); - pieslice( xcenter-10, ycenter, 135, 225, radius ); - radians = torad( 180 ); - x = xcenter + (int)( cos( radians ) * (double)lradius ); - y = ycenter - (int)( sin( radians ) * (double)lradius * AspectRatio ); - settextjustify( RIGHT_TEXT, CENTER_TEXT ); - outtextxy( x, y, "25 %" ); - - setfillstyle( HATCH_FILL, _ega_color(BLUE) ); - pieslice( xcenter, ycenter, 225, 360, radius ); - radians = torad( 293 ); - x = xcenter + (int)( cos( radians ) * (double)lradius ); - y = ycenter - (int)( sin( radians ) * (double)lradius * AspectRatio ); - settextjustify( LEFT_TEXT, TOP_TEXT ); - outtextxy( x, y, "37.5 %" ); - - Pause(); /* Pause for user's response */ - -} - -/* */ -/* BARDEMO: Draw a 2-D bar chart using Bar and Rectangle. */ -/* */ - -void BarDemo(void) -{ - int barheight[] = { - 1, 3, 5, 2, 4 }; - int styles[] = { - 1, 3, 10, 5, 9, 1 }; - int xstep, ystep; - int sheight, swidth; - int i, j, h; - struct viewporttype vp; - char buffer[40]; - - MainWindow( "Bar / Rectangle demonstration" ); - h = 3 * textheight( "H" ); - getviewsettings( &vp ); - settextjustify( CENTER_TEXT, TOP_TEXT ); - changetextstyle( TRIPLEX_FONT, HORIZ_DIR, 4 ); - outtextxy( MaxX /2, 6, "These are 2-D Bars" ); - changetextstyle( DEFAULT_FONT, HORIZ_DIR, 1 ); - setviewport( vp.left+50, vp.top+30, vp.right-50, vp.bottom-10, 1 ); - - getviewsettings( &vp ); - sheight = vp.bottom - vp.top; - swidth = vp.right - vp.left; - - line( h, h, h, sheight-h ); - line( h, sheight-h, sheight-h, sheight-h ); - ystep = (sheight - (2*h) ) / 5; - xstep = (swidth - (2*h) ) / 5; - j = sheight - h; - settextjustify( LEFT_TEXT, CENTER_TEXT ); - - for( i=0 ; i<6 ; ++i ){ - line( h/2, j, h, j ); - itoa( i, buffer, 10 ); - outtextxy( 0, j, buffer ); - j -= ystep; - } - - j = h; - settextjustify( CENTER_TEXT, TOP_TEXT ); - for( i=0 ; i<6 ; ++i ){ - setfillstyle( styles[i], Random(MaxColors-1)+1 ); - line( j, sheight - h, j, sheight- 3 - (h/2) ); - itoa( i, buffer, 10 ); - outtextxy( j, sheight - (h/2), buffer ); - if( i != 5 ){ - bar( j, (sheight-h)-(barheight[i] * ystep), j+xstep, sheight-h-1 ); - rectangle( j, (sheight-h)-(barheight[i] * ystep), j+xstep, sheight-h); - } - j += xstep; - } - - Pause(); - -} - -/* */ -/* LINERELDEMO: Display pattern using moverel and linerel cmds. */ -/* */ - -void LineRelDemo(void) -{ - struct viewporttype vp; - int h, w, dx, dy, cx, cy; - struct PTS outs[7]; - - - MainWindow( "MoveRel / LineRel Demonstration" ); - StatusLine( StopMsg); - - getviewsettings( &vp ); - cx = (vp.right - vp.left) / 2; /* Center of the screen coords */ - cy = (vp.bottom - vp.top ) / 2; - - h = (vp.bottom - vp.top ) / 8; - w = (vp.right - vp.left) / 9; - - dx = 2 * w; - dy = 2 * h; - - setcolor( BLACK ); - - setfillstyle( SOLID_FILL, _ega_color(BLUE) ); - bar( 0, 0, vp.right-vp.left, vp.bottom-vp.top ); /* Draw backgnd */ - - outs[0].x = cx - dx; - outs[0].y = cy - dy; - outs[1].x = cx - (dx-w); - outs[1].y = cy - (dy+h); - outs[2].x = cx + dx; - outs[2].y = cy - (dy+h); - outs[3].x = cx + dx; - outs[3].y = cy + dy; - outs[4].x = cx + (dx-w); - outs[4].y = cy + (dy+h); - outs[5].x = cx - dx; - outs[5].y = cy + (dy+h); - outs[6].x = cx - dx; - outs[6].y = cy - dy; - - setfillstyle( SOLID_FILL, WHITE ); - fillpoly( 7, (int far *)outs ); - - outs[0].x = cx - (w/2); - outs[0].y = cy + h; - outs[1].x = cx + (w/2); - outs[1].y = cy + h; - outs[2].x = cx + (w/2); - outs[2].y = cy - h; - outs[3].x = cx - (w/2); - outs[3].y = cy - h; - outs[4].x = cx - (w/2); - outs[4].y = cy + h; - - setfillstyle( SOLID_FILL, _ega_color(BLUE) ); - fillpoly( 5, (int far *)outs ); - - /* Draw a Tesseract object on the screen using the LineRel and */ - /* MoveRel drawing commands. */ - - moveto( cx-dx, cy-dy ); - linerel( w, -h ); - linerel( 3*w, 0 ); - linerel( 0, 5*h ); - linerel( -w, h ); - linerel( -3*w, 0 ); - linerel( 0, -5*h ); - - moverel( w, -h ); - linerel( 0, 5*h ); - linerel( w+(w/2), 0 ); - linerel( 0, -3*h ); - linerel( w/2, -h ); - linerel( 0, 5*h ); - - moverel( 0, -5*h ); - linerel( -(w+(w/2)), 0 ); - linerel( 0, 3*h ); - linerel( -w/2, h ); - - moverel( w/2, -h ); - linerel( w, 0 ); - - moverel( 0, -2*h ); - linerel( -w, 0 ); - - Pause(); /* Wait for user's response */ - -} - -/* */ -/* PUTPIXELDEMO: Display a pattern of random dots on the screen */ -/* and pick them back up again. */ -/* */ - -void PutPixelDemo(void) -{ - int seed = 1958; - int i, x, y, h, w, color; - struct viewporttype vp; - - MainWindow( "PutPixel / GetPixel Demonstration" ); - StatusLine( PauseMsg); /* Put msg at bottom of screen */ - - getviewsettings( &vp ); - h = vp.bottom - vp.top; - w = vp.right - vp.left; - - do { - Seed( seed ); /* Restart random # function */ - - for( i=0 ; i<5000 ; ++i ){ /* Put 5000 pixels on screen */ - x = 1 + Random( w - 1 ); /* Generate a random location */ - y = 1 + Random( h - 1 ); - color = Random( MaxColors-1 ) + 1; - putpixel( x, y, color ); - } - - Seed( seed ); /* Restart random # at same # */ - for( i=0 ; i<5000 ; ++i ){ /* Take the 5000 pixels off */ - x = 1 + Random( w - 1 ); /* Generate a random location */ - y = 1 + Random( h - 1 ); - color = getpixel( x, y ); /* Read the color pixel */ - if( color==Random(MaxColors-1)+1 ) /* Used to keep random in sync */ - putpixel( x, y, BLACK ); /* Write pixel to BLACK */ - } - if (!kbhit()) - delay(400); - } while ( !kbhit()); - - Pause(); /* Wait for user's response */ - -} - -/* */ -/* PUTIMAGEDEMO */ -/* */ -#define PAUSETIME 20 -#define PID_r 20 -#define StartX 100 -#define StartY 50 -#define MAXXSTEP (2*PID_r/3) -#define MAXYSTEP (PID_r/2) -#define PID_STEPS 250 - -int SaucerMoveX(int *dx, int x) { -// *dx += (Random( 2*MAXXSTEP+1) - MAXXSTEP + (MAXXSTEP*(MaxX/2-x))/MaxX) / 10; - *dx += Random( 2*MAXXSTEP) - MAXXSTEP; - if ( *dx > MAXXSTEP) *dx = MAXXSTEP; else - if ( *dx < -MAXXSTEP) *dx = -MAXXSTEP; - return *dx; -} -int SaucerMoveY(int *dy, int y) { -// *dy += (Random( 2*MAXYSTEP+1) - MAXYSTEP + (MAXYSTEP*(MaxY/2-y))/MaxY) / 10; - *dy += Random( 2*MAXYSTEP) - MAXYSTEP; - if ( *dy > MAXYSTEP) *dy = MAXYSTEP; else - if ( *dy < -MAXYSTEP) *dy = -MAXYSTEP; - return *dy; -} - -#define SaucerLimitX() do { \ - if (vp.left + nx + width - 1 > vp.right) \ - nx = vp.right-vp.left-width + 1; \ - else \ - if (nx < 0) \ - nx = 0; \ -} while (0) - -#define SaucerLimitY() do { \ - if (vp.top + ny + height - 1 > vp.bottom) \ - ny = vp.bottom-vp.top-height + 1; \ - else \ - if (ny < 0) \ - ny = 0; \ -} while (0) - -void PutImageDemo(void) -{ - struct viewporttype vp; - int x, y, ulx, uly, lrx, lry, size, i, width, height; - int nx, ny, dx, dy; - void *Saucer; - int old_xasp, old_yasp; - - MainWindow("GetImage / PutImage Demonstration"); - getviewsettings( &vp ); - - /* DrawSaucer */ - getaspectratio(&old_xasp, &old_yasp); - setaspectratio(1, 1); - ellipse(StartX, StartY, 0, 360, PID_r, PID_r / 3 + 2); - ellipse(StartX, StartY - 4, 190, 357, PID_r, PID_r / 3); - line(StartX + 7, StartY - 6, StartX + 10, StartY - 12); - circle(StartX + 10, StartY - 12, 2); - line(StartX - 7, StartY - 6, StartX - 10, StartY - 12); - circle(StartX - 10, StartY - 12, 2); - setfillstyle(SOLID_FILL, WHITE); - floodfill(StartX + 1, StartY + 4, getcolor()); - setaspectratio(old_xasp, old_yasp); - - /* Read saucer image */ - ulx = StartX-(PID_r+1); - uly = StartY-14; - lrx = StartX+(PID_r+1); - lry = StartY+(PID_r/3)+3; - width = lrx - ulx + 1; - height = lry - uly + 1; - size = imagesize(ulx, uly, lrx, lry); - Saucer = malloc( size ); - if (Saucer == NULL) return; - getimage(ulx, uly, lrx, lry, Saucer); - putimage(ulx, uly, Saucer, XOR_PUT); - - /* Plot some "stars" */ - for ( i=0 ; i<1000; ++i ) - putpixel(Random(MaxX), Random(MaxY), Random( MaxColors-1 )+1); - x = MaxX / 2; - y = MaxY / 2; - dx = 1; - dy = 0; - - StatusLine( PauseMsg); /* Put msg at bottom of screen */ - - /* until a key is hit */ - while ( !kbhit() ) { - - /* Draw the Saucer */ - if (dx != 0 || dy != 0) - putimage(x, y, Saucer, XOR_PUT); /* draw image */ - delay(PAUSETIME); - nx = x + SaucerMoveX(&dx,x); - ny = y + SaucerMoveY(&dy,y); - SaucerLimitX(); - SaucerLimitY(); - dx = nx-x; - dy = ny-y; - if (dx != 0 || dy != 0) - putimage(x, y, Saucer, XOR_PUT); /* erase image */ - x = nx; - y = ny; - } - -#ifdef __GNUC__ - if (get_BGI_mode_pages()>1) { - int ActPage = 0; - void *Screen = NULL; - - size = imagesize(0, 0, MaxX, MaxY); - Screen = malloc( size ); - if (Screen != NULL) { - if ( getch() == ESC) { - closegraph(); - exit(1); - } - setviewport(0, 0, MaxX, MaxY, 1); - getimage(0, 0, MaxX, MaxY, Screen); - while ( !kbhit() ) { - ActPage = (ActPage+1)&1; - setactivepage(ActPage); - putimage(0, 0, Screen, COPY_PUT); - putimage(vp.left+x, vp.top+y, Saucer, XOR_PUT ); - setvisualpage(ActPage); - nx = x + SaucerMoveX(&dx, x); - ny = y + SaucerMoveY(&dy, y); - SaucerLimitX(); - SaucerLimitY(); - dx = nx-x; - dy = ny-y; - x = nx; - y = ny; - } - setactivepage(0); - putimage(0, 0, Screen, COPY_PUT); - setvisualpage(0); - setactivepage(1); - cleardevice(); - setactivepage(0); - setviewport(vp.left, vp.top, vp.right, vp.bottom, vp.clip); - free(Screen); - } - } -#endif - - free( Saucer ); - Pause(); -} -#undef PAUSETIME -#undef PID_r -#undef StartX -#undef StartY -#undef MAXXSTEP -#undef MAXYSTEP -#undef PID_STEPS - -/* */ -/* LINETODEMO: Display a pattern using moveto and lineto commands. */ -/* */ - -#define MAXPTS 15 - -void LineToDemo(void) -{ - struct viewporttype vp; - struct PTS points[MAXPTS]; - int i, j, h, w, xcenter, ycenter; - int radius, angle, step; - double rads; - - MainWindow( "MoveTo / LineTo Demonstration" ); - - getviewsettings( &vp ); - h = vp.bottom - vp.top; - w = vp.right - vp.left; - - xcenter = w / 2; /* Determine the center of circle */ - ycenter = h / 2; - radius = (int)( (h-30) / (AspectRatio*2) ); - step = 360 / MAXPTS; /* Determine # of increments */ - - angle = 0; /* Begin at zero degrees */ - for( i=0 ; i to go back to graphics..." ); - fflush(stdout); - fgets(m,40,stdin); - - setgraphmode( mode ); - MainWindow( "SetGraphMode / RestoreCRTMode demo" ); - settextjustify( CENTER_TEXT, CENTER_TEXT ); - outtextxy( (vp.right-vp.left)/2, (vp.bottom-vp.top)/2, - "Back in Graphics Mode..." ); - - Pause(); /* Wait for user's response */ - -} - -/* */ -/* USERLINESTYLEDEMO: Display line styles showing the user */ -/* defined line style functions. */ -/* */ - -void UserLineStyleDemo(void) -{ - static unsigned msk_or[3] = { 0x0000, 0x0000, 0x8001 }; - static unsigned msk_and[3] = { 0xFFFF, 0x7FFE, 0xFFFF }; - int x, y, i, h, flag; - unsigned int style, msk_cnt; - struct viewporttype vp; - - MainWindow( "User defined line styles" ); - - getviewsettings( &vp ); - h = vp.bottom - vp.top; - - x = 4; - y = 10; - style = 0; - msk_cnt = 0; - i = 0; - - settextjustify( CENTER_TEXT, TOP_TEXT ); - flag = TRUE; /* Set the bits in this pass */ - - while( x < vp.right-2 ){ /* Draw lines across the screen */ - - if( flag ) /* If flag, set bits... */ - style |= (1 << i); /* Set the Ith bit in word */ - else /* If no flag, clear bits */ - style &= ~(1<= 3) msk_cnt = 0; - } - } - } - - settextjustify( LEFT_TEXT, TOP_TEXT ); - - Pause(); /* Wait for user's response */ - -} - -/* */ -/* FILLSTYLEDEMO: Display the standard fill patterns available. */ -/* */ - -void FillStyleDemo(void) -{ - int h, w, style; - int i, j, x, y; - struct viewporttype vp; - char buffer[40]; - - MainWindow( "Pre-defined Fill Styles" ); - - getviewsettings( &vp ); - w = 2 * ((vp.right + 1) / 13); - h = 2 * ((vp.bottom - 10) / 10); - - x = w / 2; - y = h / 2; /* Leave 1/2 blk margin */ - style = 0; - - for( j=0 ; j<3 ; ++j ){ /* Three rows of boxes */ - for( i=0 ; i<4 ; ++i ){ /* Four column of boxes */ - setfillstyle(style, WHITE); /* Set the fill style and WHITE */ - bar( x, y, x+w, y+h ); /* Draw the actual box */ - rectangle( x, y, x+w, y+h ); /* Outline the box */ - itoa( style, buffer, 10 ); /* Convert style 3 to ASCII */ - outtextxy( x+(w / 2), y+h+4, buffer ); - ++style; /* Go on to next style # */ - x += (w / 2) * 3; /* Go to next column */ - } /* End of coulmn loop */ - x = w / 2; /* Put base back to 1st column */ - y += (h / 2) * 3; /* Advance to next row */ - } /* End of Row loop */ - - settextjustify( LEFT_TEXT, TOP_TEXT ); - - Pause(); /* Wait for user's response */ - -} - -/* */ -/* FILLPATTERNDEMO: Demonstrate how to use the user definable */ -/* fill patterns. */ -/* */ - -void FillPatternDemo(void) -{ - int style; - int h, w; - int x, y, i, j; - char buffer[40]; - struct viewporttype vp; - static char patterns[][8] = { - { 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55 }, - { 0x33, 0x33, 0xCC, 0xCC, 0x33, 0x33, 0xCC, 0xCC }, - { 0xF0, 0xF0, 0xF0, 0xF0, 0x0F, 0x0F, 0x0F, 0x0F }, - { 0x00, 0x10, 0x28, 0x44, 0x28, 0x10, 0x00, 0x00 }, - { 0x00, 0x70, 0x20, 0x27, 0x24, 0x24, 0x07, 0x00 }, - { 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00 }, - { 0x00, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x00 }, - { 0x00, 0x00, 0x22, 0x08, 0x00, 0x22, 0x1C, 0x00 }, - { 0xFF, 0x7E, 0x3C, 0x18, 0x18, 0x3C, 0x7E, 0xFF }, - { 0x00, 0x10, 0x10, 0x7C, 0x10, 0x10, 0x00, 0x00 }, - { 0x00, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x00 } - }; - - MainWindow( "User Defined Fill Styles" ); - - getviewsettings( &vp ); - w = 2 * ((vp.right + 1) / 13); - h = 2 * ((vp.bottom - 10) / 10); - - x = w / 2; - y = h / 2; /* Leave 1/2 blk margin */ - style = 0; - - for( j=0 ; j<3 ; ++j ){ /* Three rows of boxes */ - for( i=0 ; i<4 ; ++i ){ /* Four column of boxes */ - setfillpattern( &patterns[style][0], WHITE); - bar( x, y, x+w, y+h ); /* Draw the actual box */ - rectangle( x, y, x+w, y+h ); /* Outline the box */ - itoa( style, buffer, 10 ); /* Convert style 3 to ASCII */ - outtextxy( x+(w / 2), y+h+4, buffer ); - ++style; /* Go on to next style # */ - x += (w / 2) * 3; /* Go to next column */ - } /* End of coulmn loop */ - x = w / 2; /* Put base back to 1st column */ - y += (h / 2) * 3; /* Advance to next row */ - } /* End of Row loop */ - - settextjustify( LEFT_TEXT, TOP_TEXT ); - - Pause(); /* Wait for user's response */ - -} - -/* */ -/* POLYDEMO: Display a random pattern of polygons on the screen */ -/* until the user says enough. */ -/* */ -void PaletteDemo(void) -{ - int i, j, x, y, color, cols; - struct viewporttype vp; - int height, width; - - if (MaxColors > 16) - return; - MainWindow( "Palette Demonstration" ); - StatusLine( StopMsg); - - getviewsettings( &vp ); - width = (vp.right - vp.left) / 15; /* get width of the box */ - height = (vp.bottom - vp.top) / 10; /* Get the height of the box */ - - x = y = 0; /* Start in upper corner */ - color = 1; /* Begin at 1st color */ - cols = 16; - if (MaxColors < cols) cols = MaxColors; - - for( j=0 ; j<10 ; ++j ){ /* For 10 rows of boxes */ - for( i=0 ; i<15 ; ++i ){ /* For 15 columns of boxes */ - setfillstyle( SOLID_FILL, color++ ); /* Set the color of box */ - bar( x, y, x+width, y+height ); /* Draw the box */ - x += width + 1; /* Advance to next col */ - color = 1 + (color % (cols- 2)); /* Set new color */ - } /* End of COLUMN loop */ - x = 0; /* Goto 1st column */ - y += height + 1; /* Goto next row */ - } /* End of ROW loop */ - - while( !kbhit() ){ /* Until user enters a key... */ - setpalette( 1+Random(cols - 2), Random(64) ); - } - - setallpalette( &palette ); - - Pause(); /* Wait for user's response */ - -} - -/* */ -/* POLYDEMO: Display a random pattern of polygons on the screen */ -/* until the user says enough. */ -/* */ - -#define MaxPts 6 /* Maximum # of pts in polygon */ - -void PolyDemo(void) -{ - struct PTS poly[ MaxPts ]; /* Space to hold datapoints */ - int color; /* Current drawing color */ - int i; - - MainWindow( "DrawPoly / FillPoly Demonstration" ); - StatusLine( StopMsg); - - while( !kbhit() ){ /* Repeat until a key is hit */ - - color = 1 + Random( MaxColors-1 ); /* Get a random color # (no blk)*/ - setfillstyle( Random(10), color ); /* Set a random line style */ - setcolor( color ); /* Set the desired color */ - - for( i=0 ; i<(MaxPts-1) ; i++ ){ /* Determine a random polygon */ - poly[i].x = Random( MaxX ); /* Set the x coord of point */ - poly[i].y = Random( MaxY ); /* Set the y coord of point */ - } - - poly[i].x = poly[0].x; /* last point = first point */ - poly[i].y = poly[1].y; - - fillpoly( MaxPts, (int far *)poly ); /* Draw the actual polygon */ - } /* End of WHILE not KBHIT */ - - Pause(); /* Wait for user's response */ - -} - - -/* */ -/* SAYGOODBYE: Give a closing screen to the user before leaving. */ -/* */ - -void SayGoodbye(void) -{ - struct viewporttype viewinfo; /* Structure to read viewport */ - int h, w; - - MainWindow( "== Finale ==" ); - - getviewsettings( &viewinfo ); /* Read viewport settings */ - changetextstyle( TRIPLEX_FONT, HORIZ_DIR, 4 ); - settextjustify( CENTER_TEXT, CENTER_TEXT ); - - h = viewinfo.bottom - viewinfo.top; - w = viewinfo.right - viewinfo.left; - outtextxy( w/2, h/2, "That's all, folks!" ); - - StatusLine( "Press any key to EXIT" ); - getch(); - - cleardevice(); /* Clear the graphics screen */ - -} - -/* ------------------------------------------------------------------- */ -/* ---- New demo routines ---- */ -/* ------------------------------------------------------------------- */ - -#ifdef __GNUC__ -#define rgb2col(r,g,b) setrgbcolor((r),(g),(b)) -#else -unsigned long rgb2color_15(int r, int g, int b) { - return ((r&0xf8)<<7) - | ((g&0xf8)<<2) - | ((b&0xf8)>>3); -} -unsigned long rgb2color_16(int r, int g, int b) { - return ((r&0xf8)<<8) - | ((g&0xfc)<<3) - | ((b&0xf8)>>3); -} -unsigned long rgb2color_24(int r, int g, int b) { - return ((r&0xff)<<16) - | ((g&0xff)<< 8) - | ((b&0xff) ); -} -#endif - -void BigColorDemo(void) { - struct viewporttype vp; - unsigned long tc; - int color, height, width; - int x, y; - -#ifdef __GNUC__ - MainWindow("High Color/True Color demonstration"); - - getviewsettings( &vp ); /* Get the current window size */ - height = (vp.bottom-vp.top)/4 - 1; - width = vp.right-vp.left; - if (width < 1) width = 1; - - y = 1; - for (x=width-1; x > 0; --x) { - color = (x-1)*256/(width-1); - /* red */ - tc = rgb2col(color,0,0); - setcolor((int)tc); - line(x,y,x,y+height-1); - /* green */ - tc = rgb2col(0,color,0); - setcolor((int)tc); - line(x,y+height,x,y+2*height-1); - /* blue */ - tc = rgb2col(0,0,color); - setcolor((int)tc); - line(x,y+2*height,x,y+3*height-1); - /* gray */ - tc = rgb2col(color,color,color); - setcolor((int)tc); - line(x,y+3*height,x,y+4*height-1); - } - setcolor(WHITE); - - Pause(); /* Pause for user's response */ -#endif -} - -int _max(int a, int b) -{ - return ( a>b ? a : b ); -} - -int _min(int a, int b) -{ - return ( a=1;l--) { - pal[l][0]=pal[l-1][0]; - pal[l][1]=pal[l-1][1]; - pal[l][2]=pal[l-1][2]; - } - pal[1][0]=r; - pal[1][1]=g; - pal[1][2]=b; - } - for (k=0;k<=255;k++) - setrgbpalette(k,pal[k][0],pal[k][1],pal[k][2]); -} - -void PlayRGBpalette(void) -/* This is partially copyrighted by COPYRIGHT(C) 1990 by H+BEDV */ -{ - typedef char _PAL[256][3]; - - int x,c, m, maxx, maxy, radius, height, ycenter; - double pc; - _PAL cpal; - struct viewporttype viewinfo; - - if ( getmaxcolor() != 255) return; - - for (c=1;c<=254;c++) { - m= (c*3)>>1; - if ((m<64)) { - cpal[c][0]=63; - cpal[c][1]=m; - cpal[c][2]=0; - } - if ((m>63) && (m<128)) { - cpal[c][0]=127-m; - cpal[c][1]=63; - cpal[c][2]=0; - } - if ((m>127) && (m<192)) { - cpal[c][0]=0; - cpal[c][1]=63; - cpal[c][2]=m-128; - } - if ((m>191) && (m<256)) { - cpal[c][0]=0; - cpal[c][1]=255-m; - cpal[c][2]=63; - } - if ((m>255) && (m<320)) { - cpal[c][0]=m-256; - cpal[c][1]=0; - cpal[c][2]=63; - } - if ((m>319)) { - cpal[c][0]=63; - cpal[c][1]=0; - cpal[c][2]=383-m; - } - } - cpal[0][0]=0; - cpal[0][1]=0; - cpal[0][2]=0; - cpal[255][0]=63; - cpal[255][1]=63; - cpal[255][2]=63; - ShiftDac( cpal); - - MainWindowColor( "Play RGB palette", 255); - getviewsettings( &viewinfo ); - maxx = abs(viewinfo.right-viewinfo.left)-1; - maxy = abs(viewinfo.top-viewinfo.bottom)-1; - setcolor(255); - - height = maxy/8; - c=1; - for (x=5; x <= maxx+1-5; ++x) { - setcolor(c); - if (++c > 254) c = 1; - line(x,maxy-5,x,maxy-5-height); - } - - pc=1.0; - ycenter = (maxy-5-height) / 2; - radius = _min((int)((maxy-5-height)/AspectRatio), maxx)*9/20; - for (x=0;x<=356;x++) { - setcolor((int)pc); - setfillstyle(SOLID_FILL,(int)pc); - pieslice(maxx/2,ycenter,x,x+4,radius); - pc=pc+254.0/360.0; - } - - StatusLineColor( StopMsg, 255); - - do { - ShiftDac(cpal); - } while (!(kbhit())); - if ( getch() == ESC) { - closegraph(); - exit(1); - } - for (c=1; c < 255; ++c) { - cpal[c][0] = _dac_g256[c][0]; - cpal[c][1] = _dac_g256[c][1]; - cpal[c][2] = _dac_g256[c][2]; - } - - StatusLineColor( PauseMsg, 255); - do { - ShiftDac(cpal); - } while (!(kbhit())); - - setbkcolor(BLACK); - clearviewport(); - setrgbdefaults(); - Pause(); /* Pause for user to read screen*/ -} - -/* The Sierpinski demo was mainly taken from - N. Wirth: Algorithmen und Datenstrukturen */ -#define SIRP_N 4 -#define SIRP_H0 320 - -static int SIRP_x, SIRP_y, h; - -static void SIRP_a(int i); -static void SIRP_b(int i); -static void SIRP_c(int i); -static void SIRP_d(int i); - -static void SIRP_a(int i) -{ - if (i>0) { - SIRP_a(i-1); SIRP_x += h; SIRP_y -= h; lineto( SIRP_x, SIRP_y); - SIRP_b(i-1); SIRP_x += 2*h; lineto( SIRP_x, SIRP_y); - SIRP_d(i-1); SIRP_x += h; SIRP_y += h; lineto( SIRP_x, SIRP_y); - SIRP_a(i-1); - } -} - -static void SIRP_b(int i) -{ - if (i>0) { - SIRP_b(i-1); SIRP_x -= h; SIRP_y -= h; lineto( SIRP_x, SIRP_y); - SIRP_c(i-1); SIRP_y -= 2*h; lineto( SIRP_x, SIRP_y); - SIRP_a(i-1); SIRP_x += h; SIRP_y -= h; lineto( SIRP_x, SIRP_y); - SIRP_b(i-1); - } -} - -static void SIRP_c(int i) -{ - if (i>0) { - SIRP_c(i-1); SIRP_x -= h; SIRP_y += h; lineto( SIRP_x, SIRP_y); - SIRP_d(i-1); SIRP_x -= 2*h; lineto( SIRP_x, SIRP_y); - SIRP_b(i-1); SIRP_x -= h; SIRP_y -= h; lineto( SIRP_x, SIRP_y); - SIRP_c(i-1); - } -} - -static void SIRP_d(int i) -{ - if (i>0) { - SIRP_d(i-1); SIRP_x += h; SIRP_y += h; lineto( SIRP_x, SIRP_y); - SIRP_a(i-1); SIRP_y += 2*h; lineto( SIRP_x, SIRP_y); - SIRP_c(i-1); SIRP_x -= h; SIRP_y += h; lineto( SIRP_x, SIRP_y); - SIRP_d(i-1); - } -} - -void sierpinski(void) -{ - int i, h0, x0, y0, bx, by; - int color, border; - struct viewporttype vp; - struct fillsettingstype fs; - - if (MaxColors < 16) - return; - - MainWindow( "Floodfill demo"); - StatusLine(PauseMsg); - getviewsettings( &vp); - getfillsettings( &fs); - - setviewport( (bx=_max((getmaxx() - SIRP_H0) / 2, vp.left)), - (by=_max((getmaxy() - SIRP_H0) / 2, vp.top)), - _min((getmaxx() + SIRP_H0) / 2 + 5, vp.right), - _min((getmaxy() + SIRP_H0) / 2 + 5, vp.bottom), - TRUE ); - - border = _ega_color(YELLOW); - setcolor( border); - h0 = SIRP_H0; - h = h0 / 4; - x0 = 2*h; - y0 = 3*h; - for (i=1; i <= SIRP_N; ++i) { - x0 -= h; - h /= 2; - y0 += h; - SIRP_x = x0; SIRP_y = y0; - moveto( SIRP_x, SIRP_y); - SIRP_a(i); SIRP_x += h; SIRP_y -= h; lineto(SIRP_x,SIRP_y); - SIRP_b(i); SIRP_x -= h; SIRP_y -= h; lineto(SIRP_x,SIRP_y); - SIRP_c(i); SIRP_x -= h; SIRP_y += h; lineto(SIRP_x,SIRP_y); - SIRP_d(i); SIRP_x += h; SIRP_y += h; lineto(SIRP_x,SIRP_y); - } - setviewport( vp.left, vp.top, vp.right, vp.bottom, vp.clip); - bx += h0/2 - vp.left; - by += h0/2 - vp.top; - color = BLUE-1; - do { - if (++color >= YELLOW) color = BLUE; - setfillstyle(Random(USER_FILL-1)+1, _ega_color(color)); - floodfill( bx, by, border); - if (kbhit()) break; - floodfill( 1, 1, border); - } while ( !kbhit()); - setfillstyle( fs.pattern, fs.color); - - Pause(); /* Pause for user to read screen*/ -} - -#ifdef __GNUC__ -/* Borland C died frequently on this demo */ -void snake(void) -{ - int i, x0, y0, x1, y1, x, y; - int color, border; - struct viewporttype vp; - struct fillsettingstype fs; - int dx, dy; - - if (MaxColors < 16) - return; - - MainWindow( "Floodfill demo 2"); - StatusLine(PauseMsg); - getviewsettings( &vp); - getfillsettings( &fs); - - x0 = 0; y0 = 0; - x1 = getmaxx(); y1 = getmaxy(); - if (x1-x0 < y1-y0) { - dx = (x1-x0) / 24; - dy = (int)(dx*AspectRatio + 0.5); - } else { - dy = (y1-y0) / 24; - dx = (int)(dy/AspectRatio + 0.5); - } - - border = _ega_color(YELLOW); - setcolor( border); - - moveto(x=(x1-x0)/2, y=(y1-y0)/2); - i = 0; - while (x0= YELLOW) color = BLUE; - setfillstyle(Random(USER_FILL-1)+1, _ega_color(color)); - floodfill( x, y, border); - delay(500); - } while ( !kbhit()); - setfillstyle( fs.pattern, fs.color); - - Pause(); /* Pause for user to read screen*/ -} -#endif - -void RandomSolidBars(void) -{ - int color; - - MainWindow( "Random Solid/Line Bars" ); - StatusLine( PauseMsg ); /* Put msg at bottom of screen */ - while( !kbhit() ){ /* Until user enters a key... */ - color = Random( MaxColors-1 )+1; - setcolor( color ); - /* SOLID_FILL && LINE_FILL are much faster */ - setfillstyle( SOLID_FILL+Random(2), color ); - bar3d( Random( getmaxx() ), Random( getmaxy() ), - Random( getmaxx() ), Random( getmaxy() ), 0, OFF); - } - - Pause(); /* Pause for user's response */ - -} - -#define Memory 100 -#define Windows 4 - -typedef int ColorList[Windows]; - - -typedef struct _REC_Line { - int LX1, LY1, LX2, LY2; - ColorList LColor; -} _REC_Line; - -/* Local variables for LinePlay: */ -struct LOC_LinePlay { - int ViewXmax, ViewYmax; - _REC_Line Line[Memory]; - int X1, X2, Y1, Y2, CurrentLine, ColorCount, IncrementCount, DeltaX1, - DeltaY1, DeltaX2, DeltaY2; - ColorList Colors; - int MaxDelta; -} ; - -void AdjustX(int *X, int *DeltaX, struct LOC_LinePlay *LINK) -{ - int TestX; - - TestX = *X + *DeltaX; - if (TestX < 1 || TestX > LINK->ViewXmax) { - TestX = *X; - *DeltaX = -*DeltaX; - } - *X = TestX; -} - -void AdjustY(int *Y, int *DeltaY, struct LOC_LinePlay *LINK) -{ - int TestY; - - TestY = *Y + *DeltaY; - if (TestY < 1 || TestY > LINK->ViewYmax) { - TestY = *Y; - *DeltaY = -*DeltaY; - } - *Y = TestY; -} - -int RandColor(void) -{ - return Random(MaxColors-1) + 1; -} - -void SelectNewColors(struct LOC_LinePlay *LINK) -{ - LINK->Colors[0] = RandColor(); - LINK->Colors[1] = RandColor(); - LINK->Colors[2] = RandColor(); - LINK->Colors[3] = RandColor(); - LINK->ColorCount = (Random(5) + 1) * 3; -} - -void SelectNewDeltaValues(struct LOC_LinePlay *LINK) -{ - LINK->DeltaX1 = Random(LINK->MaxDelta) - LINK->MaxDelta / 2; - LINK->DeltaX2 = Random(LINK->MaxDelta) - LINK->MaxDelta / 2; - LINK->DeltaY1 = Random(LINK->MaxDelta) - LINK->MaxDelta / 2; - LINK->DeltaY2 = Random(LINK->MaxDelta) - LINK->MaxDelta / 2; - LINK->IncrementCount = (Random(4) + 1) * 2; -} - -void SaveCurrentLine(int *CurrentColors, struct LOC_LinePlay *LINK) -{ - _REC_Line *WITH; - - WITH = &LINK->Line[LINK->CurrentLine - 1]; - WITH->LX1 = LINK->X1; - WITH->LY1 = LINK->Y1; - WITH->LX2 = LINK->X2; - WITH->LY2 = LINK->Y2; - memcpy(WITH->LColor, CurrentColors, sizeof(ColorList)); -} - -void Draw(unsigned short x1, unsigned short y1, unsigned short x2, - unsigned short y2, unsigned short color) -{ - setcolor(color); - line(x1, y1, x2, y2); -} - -void Updateline(struct LOC_LinePlay *LINK) -{ - LINK->CurrentLine++; - if (LINK->CurrentLine > Memory) - LINK->CurrentLine = 1; - LINK->ColorCount--; - LINK->IncrementCount--; -} - -void DrawCurrentLine(struct LOC_LinePlay *LINK) -{ - Draw(LINK->X1, LINK->Y1, LINK->X2, LINK->Y2, LINK->Colors[0]); - Draw(LINK->ViewXmax - LINK->X1, LINK->Y1, LINK->ViewXmax - LINK->X2, - LINK->Y2, LINK->Colors[1]); - Draw(LINK->X1, LINK->ViewYmax - LINK->Y1, LINK->X2, - LINK->ViewYmax - LINK->Y2, LINK->Colors[2]); - Draw(LINK->ViewXmax - LINK->X1, LINK->ViewYmax - LINK->Y1, - LINK->ViewXmax - LINK->X2, LINK->ViewYmax - LINK->Y2, LINK->Colors[3]); - SaveCurrentLine(LINK->Colors, LINK); -} - -void EraseCurrentLine(struct LOC_LinePlay *LINK) -{ - _REC_Line *WITH; - - WITH = &LINK->Line[LINK->CurrentLine - 1]; - Draw(WITH->LX1, WITH->LY1, WITH->LX2, WITH->LY2, 0); - Draw(LINK->ViewXmax - WITH->LX1, WITH->LY1, LINK->ViewXmax - WITH->LX2, - WITH->LY2, 0); - Draw(WITH->LX1, LINK->ViewYmax - WITH->LY1, WITH->LX2, - LINK->ViewYmax - WITH->LY2, 0); - Draw(LINK->ViewXmax - WITH->LX1, LINK->ViewYmax - WITH->LY1, - LINK->ViewXmax - WITH->LX2, LINK->ViewYmax - WITH->LY2, 0); -} - -void DoArt(struct LOC_LinePlay *LINK) -{ - SelectNewColors(LINK); - do { - EraseCurrentLine(LINK); - if (LINK->ColorCount == 0) - SelectNewColors(LINK); - if (LINK->IncrementCount == 0) - SelectNewDeltaValues(LINK); - AdjustX(&LINK->X1, &LINK->DeltaX1, LINK); - AdjustX(&LINK->X2, &LINK->DeltaX2, LINK); - AdjustY(&LINK->Y1, &LINK->DeltaY1, LINK); - AdjustY(&LINK->Y2, &LINK->DeltaY2, LINK); - if (Random(5) == 3) { - LINK->X1 = (LINK->X1 + LINK->X2) / 2; /* shorten the lines */ - LINK->Y2 = (LINK->Y1 + LINK->Y2) / 2; - } - DrawCurrentLine(LINK); - Updateline(LINK); - } while (!kbhit()); -} - - -void LinePlay(void) -{ - struct LOC_LinePlay V; - struct viewporttype ViewInfo; - int StartX, StartY, I; - _REC_Line *WITH; - - MainWindow("Line demonstration"); - StatusLine("Esc aborts or press a key ..."); - getviewsettings(&ViewInfo); - V.CurrentLine = 1; - V.ColorCount = 0; - V.IncrementCount = 0; - V.MaxDelta = 16; - V.ViewXmax = ViewInfo.right - 1; - V.ViewYmax = ViewInfo.bottom - 3; - StartX = ViewInfo.right / 2; - StartY = ViewInfo.bottom / 2; - for (I = 0; I < Memory; I++) { - WITH = &V.Line[I]; - WITH->LX1 = StartX; - WITH->LX2 = StartX; - WITH->LY1 = StartY; - WITH->LY2 = StartY; - } - V.X1 = StartX; - V.X2 = StartX; - V.Y1 = StartY; - V.Y2 = StartY; - DoArt(&V); - Pause(); -} - -#undef Memory -#undef Windows - -/* Local variables for ColorPlay: */ -struct LOC_ColorPlay { - unsigned short Color, Width, Height; - struct viewporttype ViewInfo; -} ; - -char *Int2Str(char *Result, long L) -{ - /* Converts an integer to a string for use with OutText, OutTextXY */ - char S[256]; - - sprintf(S, "%ld", L); - return strcpy(Result, S); -} /* Int2Str */ - - -void DrawBox__(unsigned short X, unsigned short Y, - struct LOC_ColorPlay *LINK) -{ - int bottom; - char STR1[256]; - - setfillstyle(SOLID_FILL, LINK->Color); - setcolor(LINK->Color); - if (LINK->Height / 2 >= textheight("M") + 4) - bottom = Y + LINK->Height; - else - bottom = Y + LINK->Height / 2 * 3 - textheight("M") - 5; - bar(X, Y, X + LINK->Width, bottom); - rectangle(X, Y, X + LINK->Width, bottom); - LINK->Color = getcolor(); - if (LINK->Color == 0) { - setcolor(MaxColors); - rectangle(X, Y, X + LINK->Width, bottom); - } - setcolor(WHITE); - outtextxy(X + LINK->Width / 2, bottom + 3, Int2Str(STR1, LINK->Color)); - LINK->Color = (LINK->Color + 1) % (MaxColors + 1); -} /* DrawBox */ - - -void ColorPlay(void) -{ - /* Display all of the colors available for the current driver and mode */ - struct LOC_ColorPlay V; - unsigned short X, Y, I, J; - - if (MaxColors != 256) { - ColorDemo(); - if (MaxColors < 256) - return; - } - if (MaxColors > 256) { - BigColorDemo(); - return; - } - MainWindow("Color demonstration"); - V.Color = 1; - getviewsettings(&V.ViewInfo); - V.Width = (V.ViewInfo.right + 1) / 53 * 2; - V.Height = (V.ViewInfo.bottom - 10) / 47 * 2; - if (V.Height < textheight("M") + 4) - V.Height = textheight("M") + 4; - if (V.Width < textwidth("M") * 2) - V.Width = textwidth("M") * 2; - X = V.Width / 2; - Y = V.Height / 2; - for (J = 1; J <= 15; J++) { - for (I = 1; I <= 17; I++) { - if (!kbhit()) - DrawBox__(X, Y, &V); - X += V.Width / 2 * 3; - } - X = V.Width / 2; - Y += V.Height / 2 * 3; - } - Pause(); -} /* ColorPlay */ - - - - -/* */ -/* Begin main function */ -/* */ - -int main(void) -{ - -#if 0 && defined(__GNUC__) - registerbgifont( &_bold_font); - registerbgifont( &_euro_font); - registerbgifont( &_goth_font); - registerbgifont( &_lcom_font); - registerbgifont( &_litt_font); - registerbgifont( &_sans_font); - registerbgifont( &_scri_font); - registerbgifont( &_simp_font); - registerbgifont( &_trip_font); - registerbgifont( &_tscr_font); -#endif - Initialize(); /* Set system into Graphics mode */ - ReportStatus(); /* Report results of the initialization */ - ColorPlay(); /* Begin actual demonstration */ - if( GraphDriver==EGA || GraphDriver==EGA64 || GraphDriver==VGA ) - PaletteDemo(); - PutPixelDemo(); - PutImageDemo(); - Bar3DDemo(); - BarDemo(); - RandomBars(); - RandomSolidBars(); - sierpinski(); -#ifdef __GNUC__ - snake(); -#endif - ArcDemo(); - CircleDemo(); - PieDemo(); - PlayRGBpalette(); - LinePlay(); - LineRelDemo(); - LineToDemo(); - LineStyleDemo(); - UserLineStyleDemo(); - TextDump(); - TextDemo(); - CRTModeDemo(); - FillStyleDemo(); - FillPatternDemo(); - PolyDemo(); - SayGoodbye(); /* Give user the closing screen */ - closegraph(); /* Return the system to text mode */ - return(0); -} - diff --git a/thirdparty/grx249/test/bgi/bgilink.c b/thirdparty/grx249/test/bgi/bgilink.c deleted file mode 100644 index 696da28..0000000 --- a/thirdparty/grx249/test/bgi/bgilink.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 1993-97 by Hartmut Schirmer - */ - -#include /* NULL, exit() */ -#include -#include "libbcc.h" - -static void check_linked( void *ptr ) -{ - if ( ptr == NULL ) - { - exit(1); - } -} - -int main(void) -{ - check_linked(restorecrtmode); - check_linked(closegraph); - check_linked(getgraphmode); - check_linked(getmaxmode); - check_linked(getmoderange); - check_linked(graphresult); - check_linked(getx); - check_linked(gety); - check_linked(moveto); - check_linked(moverel); - check_linked(getbkcolor); - check_linked(getcolor); - check_linked(cleardevice); - check_linked(setbkcolor); - check_linked(setcolor); - check_linked(line); - check_linked(linerel); - check_linked(lineto); - check_linked(drawpoly); - check_linked(bar); - check_linked(circle); - check_linked(ellipse); - check_linked(arc); - check_linked(getaspectratio); - check_linked(setaspectratio); - check_linked(getfillsettings); - check_linked(getfillpattern); - check_linked(sector); - check_linked(pieslice); - check_linked(setgraphbufsize); - check_linked(getdefaultpalette); - check_linked(installbgidriver); - check_linked(registerfarbgidriver); - check_linked(registerfarbgifont); - check_linked(textlinestyle); - check_linked(setpalette); - check_linked(set_BGI_mode_whc); - check_linked(set_BGI_mode_pages); - check_linked(get_BGI_mode_pages); - check_linked(getmodemaxcolor); - check_linked(getmodemaxx); - check_linked(getmodemaxy); - check_linked(setrgbcolor); - check_linked(setactivepage); - check_linked(getactivepage); - check_linked(setvisualpage); - check_linked(getvisualpage); - return 0; -} diff --git a/thirdparty/grx249/test/bgi/colortst.c b/thirdparty/grx249/test/bgi/colortst.c deleted file mode 100644 index c5f1ba0..0000000 --- a/thirdparty/grx249/test/bgi/colortst.c +++ /dev/null @@ -1,124 +0,0 @@ -/* From VGAlib, changed for svgalib */ -/* partially copyrighted (C) 1993,1995 by Hartmut Schirmer */ - - -#include -#include -#include "libbcc.h" -#include "stdfun.h" - -static void testmode(int mode) { - int xmax, ymax; - int i, oldmode; - int x, y, yw; - int c; - - if (graphresult() == grNoInitGraph) - return; -#ifdef __GNUC__ - if (getmodemaxcolor(mode)+1 < 256) - return; -#endif - oldmode = getgraphmode(); - if (mode != oldmode) { - graphresult(); - setgraphmode(mode); - if (graphresult() != grOk) - return; - } - if (getmaxcolor() < 255) { - if (oldmode != mode) - setgraphmode(oldmode); - return; - } - xmax = getmaxx(); - ymax = getmaxy(); - - yw = (ymax - 0) / 4; - switch (getmaxcolor()+1) { - case 256: - #define std_c (16) - #define free_c (256-std_c) - #define avail (free_c / 4) - #define nrval (256/4) - for (i = 0; i < avail; ++i) { - c = (i * nrval) / avail; - setrgbpalette(i + std_c + (0 * avail), c, c, c); - setrgbpalette(i + std_c + (1 * avail), c, 0, 0); - setrgbpalette(i + std_c + (2 * avail), 0, c, 0); - setrgbpalette(i + std_c + (3 * avail), 0, 0, c); - } - for (x = 2; x < xmax - 1; ++x) { - c = (((x-2)*avail) / (xmax-3)) + std_c; - for (i=0; i < 4; ++i) { - setcolor(c+(avail*i)); - line( x, i*yw, x, (i+1)*yw); - } - } - break; -#ifdef __GNUC__ - case 1 << 15: - case 1 << 16: - case 1 << 24: - for (x = 2; x < xmax - 1; ++x) { - c = ((x - 2) * 256) / (xmax - 3); - y = 0; - setrgbcolor(c, c, c); - line(x, y, x, y + yw - 1); - y += yw; - setrgbcolor(c, 0, 0); - line(x, y, x, y + yw - 1); - y += yw; - setrgbcolor(0, c, 0); - line(x, y, x, y + yw - 1); - y += yw; - setrgbcolor(0, 0, c); - line(x, y, x, y + yw - 1); - } - break; -#endif - default: - if (oldmode != mode) - setgraphmode(oldmode); - return; - } - { - char *mn = getmodename(mode); - setcolor(WHITE); - settextjustify( CENTER_TEXT, BOTTOM_TEXT ); - outtextxy(getmaxx()/2, getmaxy(), mn); - } - getch(); - - if (oldmode != mode) - setgraphmode(oldmode); -} - -int main(void) -{ - int gd, gm; - int err; - int lomode, himode; - - gd = DETECT; -#if defined(__MSDOS__) || defined(__WIN32__) - initgraph(&gd,&gm,"..\\..\\chr"); -#else - initgraph(&gd,&gm,"../../chr"); -#endif - err = graphresult(); - if (err != grOk) { - fprintf(stderr, "Couldn't initialize graphics\n"); - return 1; - } - getmoderange(gd, &lomode, &himode); - gm = lomode; -#ifdef __GNUC__ - if (gm < __FIRST_DRIVER_SPECIFIC_MODE) - gm = __FIRST_DRIVER_SPECIFIC_MODE; -#endif - for ( ; gm <= himode; ++gm) - testmode(gm); - closegraph(); - return 0; -} diff --git a/thirdparty/grx249/test/bgi/fontplay.c b/thirdparty/grx249/test/bgi/fontplay.c deleted file mode 100644 index 453994f..0000000 --- a/thirdparty/grx249/test/bgi/fontplay.c +++ /dev/null @@ -1,65 +0,0 @@ -#include -#include -#include -#include -#include -#include "stdfun.h" - -#ifdef __GNUC__ -# define getch() getkey() -#else -# error fontplay requires DJGPP/GRX based compiler -#endif - - -long long Time(void) { - struct timeval tm; - - gettimeofday(&tm,NULL); - return ((long long)tm.tv_sec)*1000+(tm.tv_usec/1000); -} - -int main(int argc, char *argv[]) -{ - int gd, gm, i, font; - int err; - long long start, stop; - -#if defined(__MSDOS__) || defined(__WIN32__) - initgraph(&gd,&gm,"..\\..\\chr"); -#else - initgraph(&gd,&gm,"../../chr"); -#endif - err = graphresult(); - if (err != grOk) { - fprintf(stderr, "Couldn't initialize graphics\n"); - exit(1); - } - -#if 0 - registerbgifont( &_bold_font); - registerbgifont( &_euro_font); - registerbgifont( &_goth_font); - registerbgifont( &_lcom_font); - registerbgifont( &_litt_font); - registerbgifont( &_sans_font); - registerbgifont( &_scri_font); - registerbgifont( &_simp_font); - registerbgifont( &_trip_font); - registerbgifont( &_tscr_font); -#endif - - start = Time(); - for (i=0; i < 2500; ++i) { - setcolor(i&15); - for (font=TRIPLEX_FONT; font <= BOLD_FONT; ++font) { - settextstyle(font, HORIZ_DIR, 1); - outtextxy( 10, 10, "M"); - } - } - stop = Time(); - closegraph(); - printf("Time : %1.3fs\n", (stop-start)/1000.0); - return 0; -} - diff --git a/thirdparty/grx249/test/bgi/makefile.bcc b/thirdparty/grx249/test/bgi/makefile.bcc deleted file mode 100644 index f160191..0000000 --- a/thirdparty/grx249/test/bgi/makefile.bcc +++ /dev/null @@ -1,35 +0,0 @@ -# -# GRX 2.0 test programs makefile for Turbo C. Uses Turbo C make. -# -.AUTODEPEND - -!include "../../makedefs.bcc" - -INCDIR= -I../../include -I$(BCCROOT)\include -LIBDIR= -L$(BCCROOT)/lib - -GRX20ST = ../../lib/$(GRX_LIB_SUBDIR)/grx20$(MODEL).lib - -PROGS= \ - bgilink.exe \ - bccbgi.exe \ - colortst.exe \ - small.exe \ - tellipse.exe \ - tfill.exe \ - tmodes.exe \ - tpoly.exe \ - ttext.exe - -all: $(PROGS) - -clean: - if exist *.obj del *.obj - if exist *.exe del *.exe - -.obj.exe: - $(BCC) $(LIBDIR) $(LDOPT) -n. -e$* $*.obj $(GRX20ST) - -.c.obj: - $(BCC) -c $(CCOPT) $(INCDIR) -o$*.obj $*.c - diff --git a/thirdparty/grx249/test/bgi/makefile.dj2 b/thirdparty/grx249/test/bgi/makefile.dj2 deleted file mode 100644 index 9b7501a..0000000 --- a/thirdparty/grx249/test/bgi/makefile.dj2 +++ /dev/null @@ -1,65 +0,0 @@ -# -# GRX test programs makefile for DJGPP v2. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean install uninstall - -GRXVDJ2=y - -include ../../makedefs.grx - -INCDIR= -I../../include -GRX20 = ../../lib/$(GRX_LIB_SUBDIR)/libgrx20.a - -ADDON_LIBS=-lpc - -#ifeq ($(HAVE_LIBTIFF),y) -# ADDON_LIBS += -ltiff -#endif -# -#ifeq ($(HAVE_LIBJPEG),y) -# ADDON_LIBS += -ljpeg -#endif -# -#ifeq ($(NEED_ZLIB),y) -# ADDON_LIBS += -lz -#endif - -LIBS= $(GRX20) $(ADDON_LIBS) - -PROGS= \ - bgilink.exe \ - bccbgi.exe \ - colortst.exe \ - fontplay.exe \ - small.exe \ - tellipse.exe \ - tfill.exe \ - tmodes.exe \ - tpoly.exe \ - ttext.exe - -all: $(PROGS) - -$(PROGS): %.exe : %.o $(GRX20) - $(CC) $(LDOPT) -o $*.exe $*.o $(LIBS) -lm - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c - -clean: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f *.o *.exe -else - if exist *.o del *.o - if exist *.exe del *.exe -endif - -depend.new: - $(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:.exe=.c) >depend.new - -#include depend.gnu diff --git a/thirdparty/grx249/test/bgi/makefile.lnx b/thirdparty/grx249/test/bgi/makefile.lnx deleted file mode 100644 index 38ab5b7..0000000 --- a/thirdparty/grx249/test/bgi/makefile.lnx +++ /dev/null @@ -1,87 +0,0 @@ -# -# GRX test programs makefile for LINUX/console. Uses GNU make. -# -.PHONY : clean setsuid - -GRXVLNX=y - -include ../../makedefs.grx - -INCDIR= -I../../include - -CCOPT += -pipe - -# Enable this line for static linked test progs (default) -GRX20 = ../../lib/$(GRX_LIB_SUBDIR)/libgrx20.a -# or this if you've already installed the shared libs -#GRX20 = -L../../lib/$(GRX_LIB_SUBDIR) -lgrx20 - -ifeq ($(USE_SVGALIB_DRIVER),y) - ADDON_LIBS= -lvga -endif - -#ifeq ($(HAVE_LIBTIFF),y) -# ADDON_LIBS += -ltiff -#endif -# -#ifeq ($(HAVE_LIBJPEG),y) -# ADDON_LIBS += -ljpeg -#endif -# -#ifeq ($(NEED_ZLIB),y) -# ADDON_LIBS += -lz -#endif - -ifeq ($(SET_SUIDROOT),y) -EXECBITS = 4755 -else -EXECBITS = 0755 -endif - -LIBS= $(GRX20) $(ADDON_LIBS) -lm - -PROGS= \ - bgilink \ - bccbgi \ - colortst \ - fontplay \ - small \ - tellipse \ - tfill \ - tmodes \ - tpoly \ - ttext - -all: $(PROGS) - -$(PROGS): % : %.o $(GRX20) - -clean: - rm -f *.o $(PROGS) - -setsuid: $(PROGS) -ifeq ($(SET_SUIDROOT),y) - chown root $(PROGS) - chmod $(EXECBITS) $(PROGS) -else - @echo "Nothing to do, SET_SUIDROOT is not set to 'y' in makedefs.grx" -endif - -.o: - $(CC) $(LDOPT) -o $* $*.o $(LIBS) - chmod $(EXECBITS) $* - -.oo: - $(CC) $(LDOPT) -o $* $*.o $(LIBS) - $(STRIP) $* - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c - -depend.new: - $(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:=.c) >depend.new - -#include depend.gnu diff --git a/thirdparty/grx249/test/bgi/makefile.sdl b/thirdparty/grx249/test/bgi/makefile.sdl deleted file mode 100644 index 8122252..0000000 --- a/thirdparty/grx249/test/bgi/makefile.sdl +++ /dev/null @@ -1,73 +0,0 @@ -# -# GRX test programs makefile for SDL. Uses GNU make. -# -.PHONY : clean - -GRXVSDL=y - -include ../../makedefs.grx - -INCDIR= -I. -I../../include - -GRX20ST = ../../lib/$(GRX_LIB_SUBDIR)/libgrx20S.a - -ifeq ($(EP),x) - INCDIR += $(X11INCS) - SDLDEFS = -D__XWIN__ - SDLLIBS = -lSDL -lpthread $(X11LIBS) -else - EX = .exe - SDLDEFS = - SDLLIBS = -lSDL -endif - -#ifeq ($(HAVE_LIBTIFF),y) -# ADDON_LIBS += -ltiff -#endif - -#ifeq ($(HAVE_LIBJPEG),y) -# ADDON_LIBS += -ljpeg -#endif - -#ifeq ($(HAVE_LIBPNG),y) -# ADDON_LIBS += -lpng -#endif - -#ifeq ($(NEED_ZLIB),y) -# ADDON_LIBS += -lz -#endif - -LIBS= $(GRX20ST) $(ADDON_LIBS) $(SDLLIBS) -lm - -CCOPT += $(SDLDEFS) - -PROGS= \ - $(EP)bgilink$(EX) \ - $(EP)bccbgi$(EX) \ - $(EP)colortst$(EX) \ - $(EP)fontplay$(EX) \ - $(EP)small$(EX) \ - $(EP)tellipse$(EX) \ - $(EP)tfill$(EX) \ - $(EP)tmodes$(EX) \ - $(EP)tpoly$(EX) \ - $(EP)ttext$(EX) - -all: $(PROGS) - -$(PROGS): $(EP)%$(EX) : %.o $(GRX20ST) - $(CC) $(LDOPT) -o $@ $*.o $(LIBS) - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c - -clean: - rm -f *.o $(PROGS) - -depend.new: - $(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:$(EP)%$(EX)=%.c) > depend.new - -#include depend.gnu diff --git a/thirdparty/grx249/test/bgi/makefile.w32 b/thirdparty/grx249/test/bgi/makefile.w32 deleted file mode 100644 index 3bb3097..0000000 --- a/thirdparty/grx249/test/bgi/makefile.w32 +++ /dev/null @@ -1,63 +0,0 @@ -# -# GRX test programs makefile for Mingw -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean install uninstall - -GRXVW32=y - -include ../../makedefs.grx - -INCDIR= -I../../include -GRX20 = ../../lib/$(GRX_LIB_SUBDIR)/libgrx20.a - -#ifeq ($(HAVE_LIBTIFF),y) -# ADDON_LIBS += -ltiff -#endif - -#ifeq ($(HAVE_LIBJPEG),y) -# ADDON_LIBS += -ljpeg -#endif - -#ifeq ($(NEED_ZLIB),y) -# ADDON_LIBS += -lz -#endif - -LIBS= $(GRX20) $(ADDON_LIBS) - -PROGS= \ - bgilink.exe \ - bccbgi.exe \ - colortst.exe \ - fontplay.exe \ - small.exe \ - tellipse.exe \ - tfill.exe \ - tmodes.exe \ - tpoly.exe \ - ttext.exe - -all: $(PROGS) \ - -$(PROGS): %.exe : %.o $(GRX20) - $(CC) $(LDOPT) -o $*.exe $*.o $(LIBS) -lm -mwindows -mconsole - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c - -clean: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f *.o *.exe -else - if exist *.o del *.o - if exist *.exe del *.exe -endif - -#depend.new: -# $(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:.exe=.c) >depend.new - -#include depend.gnu diff --git a/thirdparty/grx249/test/bgi/makefile.wat b/thirdparty/grx249/test/bgi/makefile.wat deleted file mode 100644 index 51f8a61..0000000 --- a/thirdparty/grx249/test/bgi/makefile.wat +++ /dev/null @@ -1,87 +0,0 @@ -!define BLANK "" - -############## -# Object Files - -.\bgilink.obj : .\test\bgilink.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bccbgi.obj : .\test\bccbgi.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\colortst.obj : .\test\colortst.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fontplay.obj : .\test\fontplay.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\small.obj : .\test\small.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\tellipse.obj : .\test\tellipse.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\tfill.obj : .\test\tfill.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\tmodes.obj : .\test\tmodes.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\tpoly.obj : .\test\tpoly.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ttext.obj : .\test\ttext.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -############## -# Executables - -$(GRX_BIN_SUBDIR)\bccbgi.exe : .\bccbgi.obj $(GRXLIB) .AUTODEPEND - @%write bccbgi.lk1 FIL bccbgi.obj - @%append bccbgi.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\bccbgi $(LINK_OPTS) @bccbgi.lk1 - -$(GRX_BIN_SUBDIR)\colortst.exe : .\colortst.obj $(GRXLIB) .AUTODEPEND - @%write colortst.lk1 FIL colortst.obj - @%append colortst.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\ $(LINK_OPTS) @colortst.lk1 - -$(GRX_BIN_SUBDIR)\fontplay.exe : .\fontplay.obj $(GRXLIB) .AUTODEPEND - @%write fontplay.lk1 FIL fontplay.obj - @%append fontplay.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\ $(LINK_OPTS) @fontplay.lk1 - -$(GRX_BIN_SUBDIR)\small.exe : .\small.obj $(GRXLIB) .AUTODEPEND - @%write small.lk1 FIL small.obj - @%append .lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\small $(LINK_OPTS) @small.lk1 - -$(GRX_BIN_SUBDIR)\tellipse.exe : .\tellipse.obj $(GRXLIB) .AUTODEPEND - @%write tellipse.lk1 FIL tellipse.obj - @%append tellipse.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\tellipse $(LINK_OPTS) @tellipse.lk1 - -$(GRX_BIN_SUBDIR)\tfill.exe : .\tfill.obj $(GRXLIB) .AUTODEPEND - @%write tfill.lk1 FIL tfill.obj - @%append tfill.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\tfill $(LINK_OPTS) @tfill.lk1 - -$(GRX_BIN_SUBDIR)\tmodes.exe : .\tmodes.obj $(GRXLIB) .AUTODEPEND - @%write tmodes.lk1 FIL tmodes.obj - @%append tmodes.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\tmodes $(LINK_OPTS) @tmodes.lk1 - -$(GRX_BIN_SUBDIR)\tpoly.exe : .\tpoly.obj $(GRXLIB) .AUTODEPEND - @%write tpoly.lk1 FIL tpoly.obj - @%append tpoly.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\tpoly $(LINK_OPTS) @.tpolylk1 - -$(GRX_BIN_SUBDIR)\ttext.exe : .\ttext.obj $(GRXLIB) .AUTODEPEND - @%write ttext.lk1 FIL ttext.obj - @%append ttext.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\ttext $(LINK_OPTS) @ttext.lk1 - -$(GRX_BIN_SUBDIR)\bgilink.exe : .\bgilink.obj $(GRXLIB) .AUTODEPEND - @%write bgilink.lk1 FIL bgilink.obj - @%append bgilink.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\bgilink $(LINK_OPTS) @bgilink.lk1 diff --git a/thirdparty/grx249/test/bgi/makefile.x11 b/thirdparty/grx249/test/bgi/makefile.x11 deleted file mode 100644 index 22866aa..0000000 --- a/thirdparty/grx249/test/bgi/makefile.x11 +++ /dev/null @@ -1,81 +0,0 @@ -# -# GRX test programs makefile for LINUX/X11. Uses GNU make. -# -.PHONY : clean setsuid - -GRXVX11=y - -include ../../makedefs.grx - -INCDIR= -I../../include - -# Enable this line for static linked test progs (default) -GRX20X = ../../lib/$(GRX_LIB_SUBDIR)/libgrx20X.a -# or this if you've already installed the shared libs -#GRX20X = -L./../lib/$(GRX_LIB_SUBDIR) -lgrx20X - -ifeq ($(SET_XSUIDROOT),y) -EXECBITS = 4755 -else -EXECBITS = 0755 -endif - -ADDON_LIBS= - -ifeq ($(USE_XF86DGA_DRIVER),y) - ADDON_LIBS += -lXxf86dga -lXext -endif - -#ifeq ($(HAVE_LIBTIFF),y) -# ADDON_LIBS += -ltiff -#endif -# -#ifeq ($(HAVE_LIBJPEG),y) -# ADDON_LIBS += -ljpeg -#endif -# -#ifeq ($(NEED_ZLIB),y) -# ADDON_LIBS += -lz -#endif - -LIBS= $(GRX20X) $(ADDON_LIBS) $(X11LIBS) -lm - -PROGS= \ - xbgilink \ - xbccbgi \ - xcolortst \ - xfontplay \ - xsmall \ - xtellipse \ - xtfill \ - xtmodes \ - xtpoly \ - xttext - -all: $(PROGS) - -$(PROGS): x%: %.o $(GRX20X) - $(CC) $(LDOPT) -o $@ $*.o $(LIBS) - chmod $(EXECBITS) $@ - -$(PROGS:x%=%.o): %.o : %.c - $(CC) -c $(CCOPT) -D__XWIN__ $(INCDIR) $*.c -o $*.o - -setsuid: $(PROGS) -ifeq ($(SET_XSUIDROOT),y) - chown root $(PROGS) - chmod $(EXECBITS) $(PROGS) -else - @echo "Nothing to do, SET_XSUIDROOT is not set to 'y' in makedefs.grx" -endif - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c - -clean: - rm -f *.o $(PROGS) - -depend.new: - $(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:x%=%.c) > depend.new - -#include depend.gnu diff --git a/thirdparty/grx249/test/bgi/small.c b/thirdparty/grx249/test/bgi/small.c deleted file mode 100644 index e721f48..0000000 --- a/thirdparty/grx249/test/bgi/small.c +++ /dev/null @@ -1,16 +0,0 @@ -#include - -int main(void) -{ - int gd, gm, err; - - gd = DETECT; -#if defined(__MSDOS__) || defined(__WIN32__) - initgraph(&gd,&gm,"..\\..\\chr"); -#else - initgraph(&gd,&gm,"../../chr"); -#endif - err = graphresult(); - closegraph(); - return 0; -} diff --git a/thirdparty/grx249/test/bgi/stdfun.h b/thirdparty/grx249/test/bgi/stdfun.h deleted file mode 100644 index 927c887..0000000 --- a/thirdparty/grx249/test/bgi/stdfun.h +++ /dev/null @@ -1,19 +0,0 @@ -/* -** Delay -*/ - -#if defined(__MSDOS__) -# include /* for delay() */ -#else - extern void GrSleep(int msec); -# define delay(ms) GrSleep(ms) -#endif - -/* -** Versions of getch, getkey and kbhit are defined in -** the libgrx for Linux X11 and Win32 -*/ - -extern int getch(void); -extern int getkey(void); -extern int kbhit(void); diff --git a/thirdparty/grx249/test/bgi/tellipse.c b/thirdparty/grx249/test/bgi/tellipse.c deleted file mode 100644 index 06b9ec8..0000000 --- a/thirdparty/grx249/test/bgi/tellipse.c +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include - -#include -#include "stdfun.h" - -int main(void) -{ - int gd, gm; - int err; - int x, y, xr, i; - - gd = DETECT; -#if defined(__MSDOS__) || defined(__WIN32__) - initgraph(&gd,&gm,"..\\..\\chr"); -#else - initgraph(&gd,&gm,"../../chr"); -#endif - err = graphresult(); - if (err != grOk) { - fprintf(stderr, "Couldn't initialize graphics\n"); - exit(1); - } - x = getmaxx()/2; - y = getmaxy()/2; - for (i=-10; i <= 10; i+=2) { - cleardevice(); - for (xr=1; xr <= x && xr < y ; xr += x/16) - ellipse(x,y,0,360+i,xr,xr*y/x); - getch(); - } - for (i=1; i <= 10; i++) { - cleardevice(); - for (xr=1; xr <= x && xr < y ; xr += x/16) - ellipse(x,y,0,360*i,xr,xr*y/x); - getch(); - } - closegraph(); - return 0; -} diff --git a/thirdparty/grx249/test/bgi/tfill.c b/thirdparty/grx249/test/bgi/tfill.c deleted file mode 100644 index 9774edd..0000000 --- a/thirdparty/grx249/test/bgi/tfill.c +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include - -#include -#include "stdfun.h" - -int main(void) -{ - int gd, gm; - int err; - - gd = DETECT; -#if defined(__MSDOS__) || defined(__WIN32__) - initgraph(&gd,&gm,"..\\..\\chr"); -#else - initgraph(&gd,&gm,"../../chr"); -#endif - err = graphresult(); - if (err != grOk) { - fprintf(stderr, "Couldn't initialize graphics\n"); - exit(1); - } - setviewport( 100, 100, 200, 200, 1); - floodfill( 10, 10, WHITE); - getch(); - setfillstyle( SOLID_FILL, DARKGRAY); - cleardevice(); - setviewport( 100, 100, 200, 200, 0); - floodfill( 10, 10, WHITE); - getch(); - closegraph(); - return 0; -} diff --git a/thirdparty/grx249/test/bgi/tmodes.c b/thirdparty/grx249/test/bgi/tmodes.c deleted file mode 100644 index 826f648..0000000 --- a/thirdparty/grx249/test/bgi/tmodes.c +++ /dev/null @@ -1,102 +0,0 @@ -#include -#include - -void test(char *dn, char *mn, int gd, int gm) -{ - int ogd = gd; - int ogm = gm; - - __gr_Result = grOk; - set_BGI_mode(&gd, &gm); - printf("%-12s %-12s : ", dn, mn); - if (__gr_Result == grOk) { - printf("%4dx%4dx%3d", __gr_BGI_w, __gr_BGI_h, __gr_BGI_c); - if (gd != ogd || gm != ogm) - printf( " gd: %2d -> %2d, gm: %2d -> %2d", ogd, gd, ogm, gm); - } else - printf("No translation available !"); - printf("\n"); -} - -#define TEST(drv,mode) test(#drv,#mode,drv,mode) -#define ETEST(drv,drvn,mode) test(drvn,#mode,drv,mode) -#define extended(drv) ETEST(drv,#drv,RES640x350); \ - ETEST(drv,#drv,RES640x480); \ - ETEST(drv,#drv,RES800x600); \ - ETEST(drv,#drv,RES1024x768); \ - ETEST(drv,#drv,RES1280x1024) - -int main(void) -{ - int i; - - printf( "Available modes :\n"); - for (i = 0; i <= getmaxmode(); ++i) - printf( "\tgraphics mode %2d : %s\n" , i, getmodename(i)); - printf("\n"); - - TEST(VGA , VGALO ); - TEST(VGA , VGAMED ); - TEST(VGA , VGAHI ); - TEST(IBM8514 , IBM8514LO ); - TEST(IBM8514 , IBM8514HI ); - TEST(HERCMONO, HERCMONOHI); - TEST(CGA , CGAC0 ); - TEST(CGA , CGAC1 ); - TEST(CGA , CGAC2 ); - TEST(CGA , CGAC3 ); - TEST(CGA , CGAHI ); - TEST(MCGA , MCGAC0 ); - TEST(MCGA , MCGAC1 ); - TEST(MCGA , MCGAC2 ); - TEST(MCGA , MCGAC3 ); - TEST(MCGA , MCGAMED ); - TEST(MCGA , MCGAHI ); - TEST(ATT400 , ATT400C0 ); - TEST(ATT400 , ATT400C1 ); - TEST(ATT400 , ATT400C2 ); - TEST(ATT400 , ATT400C3 ); - TEST(ATT400 , ATT400MED ); - TEST(ATT400 , ATT400HI ); - TEST(EGA64 , EGA64LO ); - TEST(EGA64 , EGA64HI ); - TEST(EGA , EGALO ); - TEST(EGA , EGAHI ); - TEST(EGAMONO , EGAMONOHI ); - TEST(PC3270 , PC3270HI ); - /* Extended modes from BC++ 4.5 */ - extended(VGA256); - extended(ATTDEB); - extended(TOSHIBA); - extended(SVGA16); - extended(SVGA256); - extended(SVGA32K); - extended(SVGA64K); - extended(VESA16); - extended(VESA256); - extended(VESA32K); - extended(VESA64K); - extended(VESA16M); - extended(ATI16); - extended(ATI256); - extended(ATI32K); - extended(COMPAQ); - extended(TSENG316); - extended(TSENG3256); - extended(TSENG416); - extended(TSENG4256); - extended(TSENG432K); - extended(GENOA5); - extended(GENOA6); - extended(OAK); - extended(PARADIS16); - extended(PARADIS256); - extended(TECMAR); - extended(TRIDENT16); - extended(TRIDENT256); - extended(VIDEO7); - extended(VIDEO7II); - extended(S3); - extended(ATIGUP); - return 0; -} diff --git a/thirdparty/grx249/test/bgi/tpoly.c b/thirdparty/grx249/test/bgi/tpoly.c deleted file mode 100644 index 10c1648..0000000 --- a/thirdparty/grx249/test/bgi/tpoly.c +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include - -#include -#include "stdfun.h" - -int main(void) -{ - int gd, gm; - int err; - int poly[50]; - - gd = DETECT; -#if defined(__MSDOS__) || defined(__WIN32__) - initgraph(&gd,&gm,"..\\..\\chr"); -#else - initgraph(&gd,&gm,"../../chr"); -#endif - err = graphresult(); - if (err != grOk) { - fprintf(stderr, "Couldn't initialize graphics\n"); - exit(1); - } - setfillstyle( SOLID_FILL, GREEN); - poly[ 0] = 10; poly[ 1] = 10; - poly[ 2] = 20; poly[ 3] = 20; - poly[ 4] = 20; poly[ 5] = getmaxy()-20; - poly[ 6] = getmaxx()-20; poly[ 7] = getmaxy()-20; - poly[ 8] = getmaxx()-20; poly[ 9] = 20; - poly[10] = 20; poly[11] = 20; - poly[12] = 75; poly[13] = 35; - poly[14] = 75; poly[15] = getmaxy()-50; - poly[16] = getmaxx()-60; poly[17] = getmaxy()-50; - poly[18] = getmaxx()-60; poly[19] = 35; - poly[20] = 75; poly[21] = 35; - drawpoly( 11, poly); - getch(); - cleardevice(); - fillpoly( 11, poly); - getch(); - cleardevice(); - drawpoly( 10, &poly[2]); - getch(); - cleardevice(); - fillpoly( 10, &poly[2]); - getch(); - closegraph(); - return 0; -} diff --git a/thirdparty/grx249/test/bgi/ttext.c b/thirdparty/grx249/test/bgi/ttext.c deleted file mode 100644 index 3c10736..0000000 --- a/thirdparty/grx249/test/bgi/ttext.c +++ /dev/null @@ -1,148 +0,0 @@ -#include -#include - -#include -#include "stdfun.h" - -void play_font(char *name, char *file, int *x, int *y) -{ - int font; - - if (*file != '\0') - font = installuserfont(file); - else { - font = DEFAULT_FONT; - file = "DEFAULT_FONT"; - } - if (font >= 0) { - settextstyle(font, HORIZ_DIR, 1); - outtextxy( *x, *y, file); - outtextxy( *x+textwidth(file), *y, ": "); - outtextxy( *x+textwidth(file)+textwidth(": "), *y, name); - } else { - settextstyle(DEFAULT_FONT, HORIZ_DIR, 1); - outtextxy( *x, *y, "Couldn't install "); - outtextxy( *x+textwidth("Couldn't install "), *y, file); - } - *y += textheight( "M"); -} - -int Max(int a, int b) { - if (a>b) return a; - return b; -} - -void user_test(char *txt, int mx, int dx, int my, int dy) { - graphresult(); - setusercharsize(mx, dx, my, dy); -/* if (graphresult() == grOk) */{ - moveto(0, gety()+Max(textheight(txt), 8)+8); - outtext( txt); - } -} - -void user_info(int fnt, int sze) { - char info[20]; - int w = textwidth("H"); - int h = textheight("H"); -int x = getx(); int y = gety(); - settextstyle(DEFAULT_FONT, HORIZ_DIR, 1); - sprintf(info, " H:%dx%d", w, h); - outtextxy(x,y, info); - settextstyle(fnt, HORIZ_DIR, sze); -} - -void all_user_tests(int fnt, int sze) { - graphresult(); - settextstyle(fnt, HORIZ_DIR, sze); - settextjustify(LEFT_TEXT, BOTTOM_TEXT); - if (graphresult() != grOk) - return; - user_test("Norm", 1, 1, 1, 1); - user_info(fnt, sze); - user_test("Short", 1, 2, 1, 1); - user_info(fnt, sze); - user_test("Wide", 2, 1, 1, 1); - user_info(fnt, sze); - user_test("no width", 0, 1, 1, 1); - user_info(fnt, sze); - user_test("no height", 1, 1, 0, 1); - user_info(fnt, sze); - user_test("neg x", -1, 1, 1, 1); - user_info(fnt, sze); - user_test("neg y", 1, 1,-1, 1); - user_info(fnt, sze); -} - -int main(void) -{ - int gd, gm, x, y; - int err; - char ch[2]; - - gd = DETECT; -#if defined(__MSDOS__) || defined(__WIN32__) - initgraph(&gd,&gm,"..\\..\\chr"); -#else - initgraph(&gd,&gm,"../../chr"); -#endif - err = graphresult(); - if (err != grOk) { - fprintf(stderr, "Couldn't initialize graphics\n"); - exit(1); - } - setviewport( 50, 100, 150, 200, 1); - rectangle( 0, 0, 100, 100); - outtextxy( -20, 20, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); - outtextxy( -15, 40, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); - outtextxy( -10, 60, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); - outtextxy( -05, 80, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); - setviewport( getmaxx()-150, 100, getmaxx()-50, 200, 1); - settextstyle(DEFAULT_FONT, VERT_DIR, 1); - rectangle( 0, 0, 100, 100); - outtextxy( 5, -5, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); - outtextxy( 15, 5, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); - outtextxy( 95, -5, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); - outtextxy(105, 5, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); - x = 50; y = 105; - ch[0] = 'A'; ch[1] = '\0'; - while (y > 0) { - outtextxy(x,y,ch); - y -= textwidth(ch); - ++ch[0]; - } - settextstyle(DEFAULT_FONT, HORIZ_DIR, 1); - setviewport( 0, 0, getmaxx(), getmaxy(), 1); -#ifdef __TURBOC__ - outtextxy( 10, 10, "Turbo-C cuts text"); -#else - outtextxy( 10, 10, "BCC2GRX clips text"); -#endif -#ifdef __GNUC__ - setviewport( 100, 250, getmaxx()-100, getmaxy(), 1); - rectangle( 0, 0, getmaxx()-200, getmaxy()-250); - x = 5; y = 5; - play_font( "8x8 bit mapped characters", "", &x, &y); - play_font( "8x14 bit mapped characters", "pc8x14.fnt", &x, &y); - play_font( "8x14 bit mapped characters thin", "pc8x14t.fnt", &x, &y); - play_font( "8x16 bit mapped characters", "pc8x16.fnt", &x, &y); - play_font( "courier 16 pixel high", "cour16.fnt", &x, &y); - play_font( "helvetica 17 pixel high italic", "helv17i.fnt", &x, &y); - play_font( "helvetica 29 pixel bold italic", "helv29bi.fnt", &x, &y); - setviewport( 0, 0, getmaxx(), getmaxy(), 1); -#endif - getch(); - cleardevice(); - -#if 0 && defined(__GNUC__) - registerbgifont(&_sans_font); -#endif - - moveto(0, 0); - all_user_tests(SANS_SERIF_FONT, 4); - all_user_tests(DEFAULT_FONT, 1); - - getch(); - closegraph(); - return 0; -} diff --git a/thirdparty/grx249/test/blittest.c b/thirdparty/grx249/test/blittest.c deleted file mode 100644 index b476b93..0000000 --- a/thirdparty/grx249/test/blittest.c +++ /dev/null @@ -1,293 +0,0 @@ -/** - ** blittest.c ---- test various bitblt-s - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include - -#include "test.h" - -#define BHH (GrScreenY() / 10) -int BWW = 83; - -void drbox(GrContext *src,int x,int y) -{ - GrColor c1 = GrAllocColor(0,0,255); - GrColor c2 = GrAllocColor(255,0,0); - int xx; - - GrClearScreen(c1); - GrSetContext(src); - GrSetClipBox(x-10,y-10,x+BWW-1+10,y+BHH-1+10); - GrClearClipBox(c2); - GrSetClipBox(x,y,x+BWW-1,y+BHH-1); - GrClearClipBox(GrBlack()); - GrBox(x,y,x+BWW-1,y+BHH-1,GrWhite()); - for(xx = x; xx < x+BWW; xx += 5) { - GrLine(xx,y,xx+BHH,y+BHH,GrWhite()); - GrLine(xx,y,xx-BHH,y+BHH,GrWhite()); - } - GrSetContext(NULL); - GrResetClipBox(); -} - -void doblits(GrContext *src,int x,int y) -{ - int xx = (GrSizeX() - BWW)/ 2; - int yy = 2; - int ii; - - for(ii = 0; ii < 8; ii++) { - GrBitBlt(NULL,xx,yy,src,x,y,x+BWW-1,y+BHH-1,GrWRITE); - xx++; - yy += (BHH + 2); - } -/* - { - GrColor xc = GrAllocColor(255,255,255) | GrXOR; - GrKeyRead(); - xx = (GrSizeX() - BWW)/ 2; - yy = 2; - for(ii = 0; ii < 8; ii++) { - GrFilledBox(xx,yy,xx+BWW-1,yy+BHH-1,xc); - xx++; - yy += (BHH + 2); - } - } -*/ -} - -void bltest(GrContext *src,int x,int y) -{ - int ii; - - for(ii = 0; ii < 8; ii++) { - drbox(src,x,y); - doblits(src,x,y); - GrKeyRead(); - x++; - } -} - -void blxtest(void) -{ - GrContext memc; - int cw = (BWW + 28) & ~7; - int ch = BHH + 20; - - bltest(NULL,GrScreenX()-BWW-8,GrScreenY()-BHH); - bltest(NULL,0,0); - GrCreateContext(cw,ch,NULL,&memc); - bltest(&memc,cw-BWW-8,ch-BHH); -} - -TESTFUNC(blittest) -{ - GrFBoxColors bcolors,ocolors,icolors; - GrColor c,bg; - int x = GrSizeX(); - int y = GrSizeY(); - int ww = (x * 2) / 3; - int wh = (y * 2) / 3; - int ii,jj; - int wdt = ww / 150; - int bw = x / 17; - int bh = y / 17; - int bx,by; - int cnt; - - GrContext *save = GrCreateSubContext(0,0,GrMaxX(),GrMaxY(),NULL,NULL); - GrContext *tile = GrCreateContext(bw,bh,NULL,NULL); - - blxtest(); - GrKeyRead(); - - BWW = 3; - blxtest(); - GrKeyRead(); - - bcolors.fbx_intcolor = GrAllocColor(160,100,30); - bcolors.fbx_topcolor = GrAllocColor(240,150,45); - bcolors.fbx_leftcolor = GrAllocColor(240,150,45); - bcolors.fbx_rightcolor = GrAllocColor(80,50,15); - bcolors.fbx_bottomcolor = GrAllocColor(80,50,15); - - ocolors.fbx_intcolor = GrAllocColor(0,120,100); - ocolors.fbx_topcolor = GrAllocColor(0,180,150); - ocolors.fbx_leftcolor = GrAllocColor(0,180,150); - ocolors.fbx_rightcolor = GrAllocColor(0,90,60); - ocolors.fbx_bottomcolor = GrAllocColor(0,90,60); - - icolors.fbx_intcolor = bg = GrAllocColor(30,30,30); - icolors.fbx_bottomcolor = GrAllocColor(0,180,150); - icolors.fbx_rightcolor = GrAllocColor(0,180,150); - icolors.fbx_leftcolor = GrAllocColor(0,90,60); - icolors.fbx_topcolor = GrAllocColor(0,90,60); - - c = GrAllocColor(250,250,0); - - for(ii = 0,by = -(bh/3); ii < 19; ii++) { - for(jj = 0,bx = -(bw/2); jj < 19; jj++) { - GrFramedBox(bx+2*wdt,by+2*wdt,bx+bw-2*wdt-1,by+bh-2*wdt-1,2*wdt,&bcolors); - bx += bw; - } - by += bh; - } - - GrFramedBox(ww/4-5*wdt-1,wh/4-5*wdt-1,ww/4+5*wdt+ww+1,wh/4+5*wdt+wh+1,wdt,&ocolors); - GrFramedBox(ww/4-1,wh/4-1,ww/4+ww+1,wh/4+wh+1,wdt,&icolors); - - GrSetClipBox(ww/4,wh/4,ww/4+ww,wh/4+wh); - drawing(ww/4,wh/4,ww,wh,c,bg); - GrKeyRead(); - - GrClearScreen(0); - GrSetContext(save); - - bx = -(bw/2) + 15*bw; - by = -(bh/3) + 15*bh; - - GrFramedBox(bx+2*wdt,by+2*wdt,bx+bw-2*wdt-1,by+bh-2*wdt-1,2*wdt,&bcolors); - - for (cnt=0; cnt<3; cnt++) { - for(ii = 0,by = -(bh/3); ii < 19; ii++) { - for(jj = 0,bx = -(bw/2); jj < 19; jj++) { - if((ii != 15) || (jj != 15)) { - GrBitBlt(save, - bx,by, - save, - -(bw/2) + 15*bw, - -(bh/3) + 15*bh, - -(bw/2) + 15*bw + bw - 1, - -(bh/3) + 15*bh + bh - 1, - cnt==1 ? GrXOR : GrWRITE - ); - } - bx += bw; - } - by += bh; - } - } - - GrFramedBox(ww/4-5*wdt-1,wh/4-5*wdt-1,ww/4+5*wdt+ww+1,wh/4+5*wdt+wh+1,wdt,&ocolors); - GrFramedBox(ww/4-1,wh/4-1,ww/4+ww+1,wh/4+wh+1,wdt,&icolors); - - GrSetClipBox(ww/4,wh/4,ww/4+ww,wh/4+wh); - drawing(ww/4,wh/4,ww,wh,c,bg); - GrKeyRead(); - - - GrBitBlt(tile, - 0,0, - save, - -(bw/2) + 15*bw, - -(bh/3) + 15*bh, - -(bw/2) + 15*bw + bw - 1, - -(bh/3) + 15*bh + bh - 1, - GrWRITE - ); - GrSetContext(tile); - GrFramedBox(2*wdt,2*wdt,bw-2*wdt-1,bh-2*wdt-1,2*wdt,&bcolors); - - GrClearScreen(0); - GrSetContext(save); - - for(ii = 0,by = -(bh/3); ii < 19; ii++) { - for(jj = 0,bx = -(bw/2); jj < 19; jj++) { - GrBitBlt(save, - bx,by, - tile, - 0,0, - bw-1,bh-1, - GrWRITE - ); - bx += bw; - } - by += bh; - } - - GrFramedBox(ww/4-5*wdt-1,wh/4-5*wdt-1,ww/4+5*wdt+ww+1,wh/4+5*wdt+wh+1,wdt,&ocolors); - GrFramedBox(ww/4-1,wh/4-1,ww/4+ww+1,wh/4+wh+1,wdt,&icolors); - - GrSetClipBox(ww/4,wh/4,ww/4+ww,wh/4+wh); - drawing(ww/4,wh/4,ww,wh,c,bg); - - GrKeyRead(); - GrResetClipBox(); - GrBitBlt(NULL, - 60,60, - NULL, - 20,20, - GrSizeX() - 40, - GrSizeY() - 40, - GrWRITE - ); - - GrKeyRead(); - - GrBitBlt(NULL, - 10,10, - NULL, - 60,60, - GrSizeX() - 40, - GrSizeY() - 40, - GrWRITE - ); - - GrKeyRead(); - - GrSetContext(tile); - GrClearContext(0); - - GrBitBlt(tile, - 0,0, - save, - -(bw/2), - -(bh/3), - -(bw/2) + 15*bw + bw - 1, - -(bh/3) + 15*bh + bh - 1, - GrWRITE - ); - - GrSetContext(save); - GrClearScreen(0); - - for(ii = 0,by = -(bh/3); ii < 18; ii++) { - for(jj = 0,bx = -(bw/2); jj < 18; jj++) { - GrBitBlt(save, - bx,by, - tile, - 0,0, - bw-1,bh-1, - GrWRITE - ); - bx += bw; - } - by += bh; - } - - GrFramedBox(ww/4-5*wdt-1,wh/4-5*wdt-1,ww/4+5*wdt+ww+1,wh/4+5*wdt+wh+1,wdt,&ocolors); - GrFramedBox(ww/4-1,wh/4-1,ww/4+ww+1,wh/4+wh+1,wdt,&icolors); - - GrSetClipBox(ww/4,wh/4,ww/4+ww,wh/4+wh); - drawing(ww/4,wh/4,ww,wh,c,bg); - - GrKeyRead(); - -} - diff --git a/thirdparty/grx249/test/circtest.c b/thirdparty/grx249/test/circtest.c deleted file mode 100644 index 9430664..0000000 --- a/thirdparty/grx249/test/circtest.c +++ /dev/null @@ -1,93 +0,0 @@ -/** - ** circtest.c ---- test circle and ellipse rendering - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" -#include - -void drawellip(int xc,int yc,int xa,int ya,GrColor c1,GrColor c2,GrColor c3) -{ - double ddx = (double)xa; - double ddy = (double)ya; - double R2 = ddx*ddx*ddy*ddy; - double SQ; - int x1,x2,y1,y2; - int dx,dy; - - GrFilledBox(xc-xa,yc-ya,xc+xa,yc+ya,c1); - dx = xa; - dy = 0; - GrPlot(xc-dx,yc,c3); - GrPlot(xc+dx,yc,c3); - while(++dy <= ya) { - SQ = R2 - (double)dy * (double)dy * ddx * ddx; - dx = (int)(sqrt(SQ)/ddy + 0.5); - x1 = xc - dx; - x2 = xc + dx; - y1 = yc - dy; - y2 = yc + dy; - GrPlot(x1,y1,c3); - GrPlot(x2,y1,c3); - GrPlot(x1,y2,c3); - GrPlot(x2,y2,c3); - } - GrEllipse(xc,yc,xa,ya,c2); -} - -TESTFUNC(circtest) -{ - int xc,yc; - int xr,yr; - GrColor c1,c2,c3; - - c1 = GrAllocColor(64,64,255); - c2 = GrAllocColor(255,255,64); - c3 = GrAllocColor(255,64,64); - xc = GrSizeX() / 2; - yc = GrSizeY() / 2; - xr = 1; - yr = 1; - while((xr < 1000) || (yr < 1000)) { - drawellip(xc,yc,xr,yr,c1,c2,c3); - xr += xr/4+1; - yr += yr/4+1; - GrSleep(200); - } - c1 = GrAllocColor(64,64,128); - xr = 4; - yr = 1; - while((xr < 1000) || (yr < 1000)) { - drawellip(xc,yc,xr,yr,c1,c2,c3); - yr += yr/4+1; - xr = yr * 4; - GrSleep(200); - } - c1 = GrAllocColor(64,64,64); - xr = 1; - yr = 4; - while((xr < 1000) || (yr < 1000)) { - drawellip(xc,yc,xr,yr,c1,c2,c3); - xr += xr/4+1; - yr = xr * 4; - GrSleep(200); - } - - GrTextXY(0,0,"press any key to continue",GrWhite(),GrBlack()); - GrKeyRead(); -} - diff --git a/thirdparty/grx249/test/cliptest.c b/thirdparty/grx249/test/cliptest.c deleted file mode 100644 index d305582..0000000 --- a/thirdparty/grx249/test/cliptest.c +++ /dev/null @@ -1,52 +0,0 @@ -/** - ** cliptest.c ---- test clipping - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" -#include "rand.h" - -TESTFUNC(cliptest) -{ - long delay; - int x = GrSizeX(); - int y = GrSizeY(); - int ww = (x * 2) / 3; - int wh = (y * 2) / 3; - GrColor c; - - c = GrAllocColor(200,100,100); - GrBox(ww/4-1,wh/4-1,ww/4+ww+1,wh/4+wh+1,GrWhite()); - GrSetClipBox(ww/4,wh/4,ww/4+ww,wh/4+wh); - - drawing(0,0,ww,wh,c,GrBlack()); - GrKeyRead(); - - while(!GrKeyPressed()) { - GrFilledBox(0,0,x,y,GrBlack()); - drawing(-(RND()%(2*ww))+ww/2, - -(RND()%(2*wh))+wh/2, - RND()%(3*ww)+10, - RND()%(3*wh)+10, - c, - GrNOCOLOR - ); - for(delay = 200000L; delay > 0L; delay--); - } - GrKeyRead(); -} - diff --git a/thirdparty/grx249/test/colorops.c b/thirdparty/grx249/test/colorops.c deleted file mode 100644 index a4a032e..0000000 --- a/thirdparty/grx249/test/colorops.c +++ /dev/null @@ -1,124 +0,0 @@ -/** - ** colorops.c ---- test WRITE, XOR, OR, and AND draw modes - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" -#include "rand.h" - -TESTFUNC(colorops) -{ - GrFBoxColors bcolors,ocolors,icolors; - GrColor bg,c; - int x = GrSizeX(); - int y = GrSizeY(); - int ww = (x * 2) / 3; - int wh = (y * 2) / 3; - int ii,jj; - int wdt = ww / 150; - int bw = x / 16; - int bh = y / 16; - int bx,by; - - /* This won't work very well under X11 in pseudocolor - ** mode (256 colors or less) if not using a private - ** color map. The missing colors break RGB mode */ - GrSetRGBcolorMode(); - - bcolors.fbx_intcolor = GrAllocColor(160,100,30); - bcolors.fbx_topcolor = GrAllocColor(240,150,45); - bcolors.fbx_leftcolor = GrAllocColor(240,150,45); - bcolors.fbx_rightcolor = GrAllocColor(80,50,15); - bcolors.fbx_bottomcolor = GrAllocColor(80,50,15); - - ocolors.fbx_intcolor = GrAllocColor(0,120,100); - ocolors.fbx_topcolor = GrAllocColor(0,180,150); - ocolors.fbx_leftcolor = GrAllocColor(0,180,150); - ocolors.fbx_rightcolor = GrAllocColor(0,90,60); - ocolors.fbx_bottomcolor = GrAllocColor(0,90,60); - - icolors.fbx_intcolor = GrAllocColor(30,30,30); - icolors.fbx_bottomcolor = GrAllocColor(0,180,150); - icolors.fbx_rightcolor = GrAllocColor(0,180,150); - icolors.fbx_leftcolor = GrAllocColor(0,90,60); - icolors.fbx_topcolor = GrAllocColor(0,90,60); - - c = GrAllocColor(250,250,0); - bg = GrNOCOLOR; - - for(ii = 0,by = -(bh / 3); ii < 17; ii++) { - for(jj = 0,bx = (-bw / 2); jj < 17; jj++) { - GrFramedBox(bx+2*wdt,by+2*wdt,bx+bw-2*wdt-1,by+bh-2*wdt-1,2*wdt,&bcolors); - bx += bw; - } - by += bh; - } - - GrFramedBox(ww/4-5*wdt-1,wh/4-5*wdt-1,ww/4+5*wdt+ww+1,wh/4+5*wdt+wh+1,wdt,&ocolors); - GrFramedBox(ww/4-1,wh/4-1,ww/4+ww+1,wh/4+wh+1,wdt,&icolors); - - GrSetClipBox(ww/4,wh/4,ww/4+ww,wh/4+wh); - - drawing(ww/4,wh/4,ww,wh,c,bg); - while(!GrKeyPressed()) { - drawing(ww/4+(RND()%100), - wh/4+(RND()%100), - ww, - wh, - ((RND() / 16) & (GrNumColors() - 1)), - bg - ); - } - GrKeyRead(); - GrFramedBox(ww/4-1,wh/4-1,ww/4+ww+1,wh/4+wh+1,wdt,&icolors); - drawing(ww/4,wh/4,ww,wh,c,bg); - while(!GrKeyPressed()) { - drawing(ww/4+(RND()%100), - wh/4+(RND()%100), - ww, - wh, - ((RND() / 16) & (GrNumColors() - 1)) | GrXOR, - bg - ); - } - GrKeyRead(); - GrFramedBox(ww/4-1,wh/4-1,ww/4+ww+1,wh/4+wh+1,wdt,&icolors); - drawing(ww/4,wh/4,ww,wh,c,bg); - while(!GrKeyPressed()) { - drawing(ww/4+(RND()%100), - wh/4+(RND()%100), - ww, - wh, - ((RND() / 16) & (GrNumColors() - 1)) | GrOR, - bg - ); - } - GrKeyRead(); - GrFramedBox(ww/4-1,wh/4-1,ww/4+ww+1,wh/4+wh+1,wdt,&icolors); - drawing(ww/4,wh/4,ww,wh,c,bg); - while(!GrKeyPressed()) { - drawing(ww/4+(RND()%100), - wh/4+(RND()%100), - ww, - wh, - ((RND() / 16) & (GrNumColors() - 1)) | GrAND, - bg - ); - } - GrKeyRead(); -} - diff --git a/thirdparty/grx249/test/curstest.c b/thirdparty/grx249/test/curstest.c deleted file mode 100644 index 8463d91..0000000 --- a/thirdparty/grx249/test/curstest.c +++ /dev/null @@ -1,106 +0,0 @@ -/** - ** curstest.c ---- test cursors - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" - -char p16d[] = { - 0,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0, - 1,2,1,0,0,0,0,0,0,0,0,1,2,2,1,0, - 1,2,2,1,0,0,0,0,0,0,1,2,0,0,2,1, - 1,2,2,2,1,0,0,0,0,0,1,2,0,0,2,1, - 1,2,2,2,2,1,0,0,0,0,0,1,2,2,1,0, - 1,2,2,2,2,2,1,0,0,0,0,0,1,1,0,0, - 1,2,2,2,2,2,2,1,0,0,0,0,0,0,0,0, - 1,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0, - 1,2,2,2,2,2,2,2,2,1,0,0,0,0,0,0, - 1,2,2,2,2,2,2,2,2,2,1,0,0,0,0,0, - 1,2,2,2,2,2,2,2,2,2,2,1,0,0,0,0, - 1,2,2,2,2,1,1,1,1,1,1,0,0,0,0,0, - 1,2,2,2,1,0,0,0,0,0,0,0,0,0,0,0, - 1,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0, - 1,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -}; - -TESTFUNC(cursortest) -{ - GrColor bgc = GrAllocColor(0,0,128); - GrColor fgc = GrAllocColor(255,255,0); - GrColor msc[3]; - GrCursor *cur; - int x,y; - - msc[0] = 2; - msc[1] = GrWhite(); - msc[2] = GrAllocColor(255,0,0); - cur = GrBuildCursor(p16d,16,16,16,1,1,msc); - x = GrScreenX() / 2; - y = GrScreenY() / 2; - GrMoveCursor(cur,x,y); - GrClearScreen(bgc); - GrSetColor((GrNumColors() - 1),255,255,255); - drawing(0,0,GrSizeX(),GrSizeY(),fgc,GrNOCOLOR); - GrFilledBox(0,0,320,120,GrAllocColor(0,255,255)); - GrTextXY( 10,90,"ANDmask",GrBlack(),GrNOCOLOR); - GrTextXY( 90,90,"ORmask", GrBlack(),GrNOCOLOR); - GrTextXY(170,90,"Save", GrBlack(),GrNOCOLOR); - GrTextXY(250,90,"Work", GrBlack(),GrNOCOLOR); - GrDisplayCursor(cur); - for( ; ; ) { - GrBitBlt( - NULL,10,10, - &cur->work,cur->xwork/2,0,cur->xwork/2+cur->xsize-1,cur->ysize-1, - GrWRITE - ); - GrBitBlt( - NULL,90,10, - &cur->work,0,0,cur->xsize-1,cur->ysize-1, - GrWRITE - ); - GrBitBlt( - NULL,170,10, - &cur->work,0,cur->ysize,cur->xwork-1,cur->ysize+cur->ywork-1, - GrWRITE - ); - GrBitBlt( - NULL,250,10, - &cur->work,0,cur->ysize+cur->ywork,cur->xwork-1,cur->ysize+2*cur->ywork-1, - GrWRITE - ); - GrTextXY(0,GrMaxY()-20,"Type u d l r U D L R or q to quit",GrWhite(),GrNOCOLOR); - switch(GrKeyRead()) { - case 'u': y--; break; - case 'd': y++; break; - case 'l': x--; break; - case 'r': x++; break; - case 'U': y -= 10; break; - case 'D': y += 10; break; - case 'L': x -= 10; break; - case 'R': x += 10; break; - case 'q': return; - default: continue; - } - if(x < 0) x = 0; - if(x > GrScreenX()) x = GrScreenX(); - if(y < 100) y = 100; - if(y > GrScreenY()) y = GrScreenY(); - GrMoveCursor(cur,x,y); - } -} - diff --git a/thirdparty/grx249/test/demogrx.c b/thirdparty/grx249/test/demogrx.c deleted file mode 100644 index 3228170..0000000 --- a/thirdparty/grx249/test/demogrx.c +++ /dev/null @@ -1,524 +0,0 @@ -/** - ** demogrx.c ---- GRX Test programs launcher - ** - ** Copyright (C) 2000,2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include -#include "grx20.h" -#include "grxkeys.h" -#include "gfaz.h" -#include "drawing.h" - -/* default mode */ - -static int gwidth = 640; -static int gheight = 480; -static int gbpp = 16; - -char *wintitle = - "GRX 2.4.9, the graphics library"; - -char *animatedtext = - "GRX 2.4.9, the graphics library for DJGPPv2, Linux, X11 and Win32"; - -#define NDEMOS 33 - -#define ID_ARCTEST 1 -#define ID_BB1TEST 2 -#define ID_BLITTEST 3 -#define ID_CIRCTEST 4 -#define ID_CLIPTEST 5 -#define ID_COLOROPS 6 -#define ID_CURSTEST 7 -#define ID_FONTTEST 8 -#define ID_IMGTEST 9 -#define ID_JPGTEST 10 -#define ID_KEYS 11 -#define ID_LIFE 12 -#define ID_LINETEST 13 -#define ID_MOUSETST 14 -#define ID_PCIRCTST 15 -#define ID_PNMTEST 16 -#define ID_PNGTEST 17 -#define ID_POLYTEST 18 -#define ID_RGBTEST 19 -#define ID_SCROLTST 20 -#define ID_SBCTEST 21 -#define ID_SPEEDTST 22 -#define ID_TEXTPATT 23 -#define ID_WINCLIP 24 -#define ID_WINTEST 25 -#define ID_FNTDEMO1 26 -#define ID_FNTDEMO2 27 -#define ID_FNTDEMO3 28 -#define ID_FNTDEMO4 29 -#define ID_MODETEST 50 -#define ID_PAGE1 81 -#define ID_PAGE2 82 -#define ID_EXIT 99 - -typedef struct { - int cid; - char *prog; - char *text; -} ProgTable; - -static ProgTable ptable[NDEMOS] = { - {ID_ARCTEST, "arctest", "arctest.c -> test arc outline and filled arc drawing"}, - {ID_BB1TEST, "bb1test", "bb1test.c -> test GrBitBlt1bpp routine"}, - {ID_BLITTEST, "blittest", "blittest.c -> test various bitblt-s"}, - {ID_CIRCTEST, "circtest", "circtest.c -> test circle and ellipse rendering"}, - {ID_CLIPTEST, "cliptest", "cliptest.c -> test clipping"}, - {ID_COLOROPS, "colorops", "colorops.c -> test WRITE, XOR, OR, and AND draw modes"}, - {ID_CURSTEST, "curstest", "curstest.c -> test cursors"}, - {ID_FONTTEST, "fonttest", "fonttest.c -> test text drawing"}, - {ID_IMGTEST, "imgtest", "imgtest.c -> test image functions mapping"}, - {ID_JPGTEST, "jpgtest", "jpgtext.c -> text context to jpeg functions"}, - {ID_KEYS, "keys", "keys.c -> test keyboard input"}, - {ID_LIFE, "life", "life.c -> Conway's life program"}, - {ID_LINETEST, "linetest", "linetest.c -> test wide and patterned lines"}, - {ID_MOUSETST, "mousetst", "mousetst.c -> test mouse cursor and mouse/keyboard input"}, - {ID_PCIRCTST, "pcirctst", "pcirctst.c -> test custom circle and ellipse rendering"}, - {ID_PNMTEST, "pnmtest", "pnmtext.c -> text context to pnm functions"}, - {ID_PNGTEST, "pngtest", "pngtext.c -> text context to png functions"}, - {ID_POLYTEST, "polytest", "polytest.c -> test polygon rendering"}, - {ID_RGBTEST, "rgbtest", "rgbtest.c -> show 256 color RGB palette"}, - {ID_SBCTEST, "sbctest", "sbctest.c -> test subcontext operations"}, - {ID_SCROLTST, "scroltst", "scroltst.c -> test virtual screen set/scroll"}, - {ID_SPEEDTST, "speedtst", "speedtst.c -> check all available frame drivers speed"}, - {ID_TEXTPATT, "textpatt", "textpatt.c -> test patterned text"}, - {ID_WINCLIP, "winclip", "winclip.c -> clip a drawing to various windows (contexts)"}, - {ID_WINTEST, "wintest", "wintest.c -> test window (context) mapping"}, - {ID_FNTDEMO1, "fontdemo ncen22b.fnt", "fontdemo ncen22b.fnt -> test a GRX font"}, - {ID_FNTDEMO2, "fontdemo ter-114b.res", "fontdemo ter-114b.res -> test a RES font"}, - {ID_FNTDEMO3, "fontdemo ter-114n.fna", "fontdemo ter-114n.fna -> test a FNA font"}, - {ID_FNTDEMO4, "fontdemo ter-114v.psf", "fontdemo ter-114v.psf -> test a PSF font"}, - {ID_MODETEST, "modetest", "modetest.c -> test all available graphics modes"}, - {ID_PAGE1, "", "Change to page 1"}, - {ID_PAGE2, "", "Change to page 2"}, - {ID_EXIT, "", "Exit GRX test programs launcher"} -}; - -#define PX0 10 -#define PX1 115 -#define PX2 220 -#define PY0 10 -#define PY1 54 -#define PY2 98 -#define PY3 142 -#define PY4 186 -#define PY5 230 -#define PY6 274 -#define PY7 318 -#define PY8 362 - -#define NBUTTONSP1 26 - -static Button bp1[NBUTTONSP1] = { - {PX0, PY0, 100, 40, IND_BLUE, IND_YELLOW, "ArcTest", BSTATUS_SELECTED, ID_ARCTEST}, - {PX0, PY1, 100, 40, IND_BLUE, IND_YELLOW, "Bb1Test", 0, ID_BB1TEST}, - {PX0, PY2, 100, 40, IND_BLUE, IND_YELLOW, "BlitTest", 0, ID_BLITTEST}, - {PX0, PY3, 100, 40, IND_BLUE, IND_YELLOW, "CircTest", 0, ID_CIRCTEST}, - {PX0, PY4, 100, 40, IND_BLUE, IND_YELLOW, "ClipTest", 0, ID_CLIPTEST}, - {PX0, PY5, 100, 40, IND_BLUE, IND_YELLOW, "Colorops", 0, ID_COLOROPS}, - {PX0, PY6, 100, 40, IND_BLUE, IND_YELLOW, "CursTest", 0, ID_CURSTEST}, - {PX0, PY7, 100, 40, IND_BLUE, IND_YELLOW, "ImgTest", 0, ID_IMGTEST}, - {PX0, PY8, 100, 40, IND_BLUE, IND_YELLOW, "JpgTest", 0, ID_JPGTEST}, - {PX1, PY0, 100, 40, IND_BLUE, IND_YELLOW, "Keys", 0, ID_KEYS}, - {PX1, PY1, 100, 40, IND_BLUE, IND_YELLOW, "Life", 0, ID_LIFE}, - {PX1, PY2, 100, 40, IND_BLUE, IND_YELLOW, "LineTest", 0, ID_LINETEST}, - {PX1, PY3, 100, 40, IND_BLUE, IND_YELLOW, "MouseTst", 0, ID_MOUSETST}, - {PX1, PY4, 100, 40, IND_BLUE, IND_YELLOW, "PcircTst", 0, ID_PCIRCTST}, - {PX1, PY5, 100, 40, IND_BLUE, IND_YELLOW, "PnmTest", 0, ID_PNMTEST}, - {PX1, PY6, 100, 40, IND_BLUE, IND_YELLOW, "PngTest", 0, ID_PNGTEST}, - {PX1, PY7, 100, 40, IND_BLUE, IND_YELLOW, "PolyTest", 0, ID_POLYTEST}, - {PX1, PY8, 100, 40, IND_BLUE, IND_YELLOW, "RgbTest", 0, ID_RGBTEST}, - {PX2, PY0, 100, 40, IND_BLUE, IND_YELLOW, "SbcTest", 0, ID_SBCTEST}, - {PX2, PY1, 100, 40, IND_BLUE, IND_YELLOW, "ScrolTst", 0, ID_SCROLTST}, - {PX2, PY2, 100, 40, IND_BLUE, IND_YELLOW, "SpeedTst", 0, ID_SPEEDTST}, - {PX2, PY3, 100, 40, IND_BLUE, IND_YELLOW, "WinClip", 0, ID_WINCLIP}, - {PX2, PY4, 100, 40, IND_BLUE, IND_YELLOW, "WinTest", 0, ID_WINTEST}, - {PX2, PY6, 100, 40, IND_GREEN, IND_WHITE, "Page 2", 0, ID_PAGE2}, - {PX2, PY7, 100, 40, IND_BROWN, IND_WHITE, "ModeTest", 0, ID_MODETEST}, - {PX2, PY8, 100, 40, IND_RED, IND_WHITE, "Exit", 0, ID_EXIT} -}; - -#define NBUTTONSP2 9 - -static Button bp2[NBUTTONSP2] = { - {PX0, PY0, 100, 40, IND_BLUE, IND_YELLOW, "FontTest", BSTATUS_SELECTED, ID_FONTTEST}, - {PX0, PY1, 100, 40, IND_BLUE, IND_YELLOW, "TextPatt", 0, ID_TEXTPATT}, - {PX0, PY2, 100, 40, IND_BLUE, IND_YELLOW, "FontDemo1", 0, ID_FNTDEMO1}, - {PX0, PY3, 100, 40, IND_BLUE, IND_YELLOW, "FontDemo2", 0, ID_FNTDEMO2}, - {PX0, PY4, 100, 40, IND_BLUE, IND_YELLOW, "FontDemo3", 0, ID_FNTDEMO3}, - {PX0, PY5, 100, 40, IND_BLUE, IND_YELLOW, "FontDemo4", 0, ID_FNTDEMO4}, - {PX2, PY6, 100, 40, IND_GREEN, IND_WHITE, "Page 1", 0, ID_PAGE1}, - {PX2, PY7, 100, 40, IND_BROWN, IND_WHITE, "ModeTest", 0, ID_MODETEST}, - {PX2, PY8, 100, 40, IND_RED, IND_WHITE, "Exit", 0, ID_EXIT} -}; - -static Button_Group bgp1 = { 20, 30, bp1, NBUTTONSP1, 0, 0 }; -static Button_Group bgp2 = { 20, 30, bp2, NBUTTONSP2, 0, 0 }; -static Button_Group *bgact = &bgp1; - -static Board brd = - { 0, 0, 640, 480, IND_BLACK, IND_CYAN, IND_DARKGRAY, 1 }; -static Board brdimg = - { 384, 46, 235, 157, IND_BLACK, IND_CYAN, IND_DARKGRAY, 1 }; - -static GrFont *grf_std; -static GrFont *grf_big; -GrTextOption grt_centered; -GrTextOption grt_left; - -static GrContext *grcglob = NULL; -static int worg = 0, horg = 0; - -/* Internal routines */ - -static void ini_graphics(void); -static void ini_objects(void); -static void paint_screen(void); -static void the_title(int x, int y); -static void the_info(int x, int y); -static int pev_command(Event * ev); -static int pev_select(Event * ev); -static void paint_foot(char *s); -static void paint_animation(void); -static void disaster(char *s); - -/************************************************************************/ - -int main(int argc, char **argv) -{ - Event ev; - char buffer[100]; - - if (argc >= 4) { - gwidth = atoi(argv[1]); - gheight = atoi(argv[2]); - gbpp = atoi(argv[3]); - } - - ini_graphics(); - GrSetWindowTitle(wintitle); - ini_objects(); - paint_screen(); - - while (1) { - event_read(&ev); - if (ev.type == EV_MOUSE) { - ev.p2 -= worg; - ev.p3 -= horg; - } - if (ev.type == EV_END) - break; - if ((ev.type == EV_KEY) && (ev.p1 == GrKey_Escape)) - break; - if ((ev.type == EV_KEY) && (ev.p1 == 's')) { - GrSaveContextToPpm(NULL, "demogrx.ppm", "DemoGRX"); - continue; - } - if (pev_button_group(&ev, bgact)) - continue; - if (pev_command(&ev)) - continue; - if (pev_select(&ev)) - continue; - if (ev.type == EV_MOUSE) { - if (ev.p1 == MOUSE_LB_PRESSED) { - sprintf(buffer, "%ld %ld over a button, please",ev.p2,ev.p3); - paint_foot(buffer); - } - else if (ev.p1 == MOUSE_LB_RELEASED) - paint_foot("Hold down left mouse buttom to see a comment"); - } - if (ev.type == EV_NULL) - paint_animation(); - } - - gfaz_fin(); - return 0; -} - -/************************************************************************/ - -static void ini_graphics(void) -{ - gfaz_ini(gwidth, gheight, gbpp); - gwidth = GrScreenX(); - gheight = GrScreenY(); - grcglob = NULL; - if (gwidth > 640 || gheight > 480) { - GrClearScreen(GrAllocColor(120, 90, 60)); - worg = (gwidth - 640) / 2; - horg = (gheight - 480) / 2; - grcglob = GrCreateSubContext(worg, horg, worg + 639, horg + 479, - NULL, NULL); - GrSetContext(grcglob); - } -} - -/************************************************************************/ - -static void ini_objects(void) -{ - grf_std = GrLoadFont("lucb21.fnt"); - if (grf_std == NULL) { -#if defined(__MSDOS__) || defined(__WIN32__) - grf_std = GrLoadFont("..\\fonts\\lucb21.fnt"); -#else - grf_std = GrLoadFont("../fonts/lucb21.fnt"); -#endif - if (grf_std == NULL) - disaster("lucb21.fnt not found"); - } - - grf_big = GrLoadFont("lucb40b.fnt"); - if (grf_big == NULL) { -#if defined(__MSDOS__) || defined(__WIN32__) - grf_big = GrLoadFont("..\\fonts\\lucb40b.fnt"); -#else - grf_big = GrLoadFont("../fonts/lucb40b.fnt"); -#endif - if (grf_big == NULL) - disaster("lucb40b.fnt not found"); - } - - grt_centered.txo_bgcolor.v = GrNOCOLOR; - grt_centered.txo_direct = GR_TEXT_RIGHT; - grt_centered.txo_xalign = GR_ALIGN_CENTER; - grt_centered.txo_yalign = GR_ALIGN_CENTER; - grt_centered.txo_chrtype = GR_BYTE_TEXT; - - grt_left.txo_bgcolor.v = GrNOCOLOR; - grt_left.txo_direct = GR_TEXT_RIGHT; - grt_left.txo_xalign = GR_ALIGN_LEFT; - grt_left.txo_yalign = GR_ALIGN_CENTER; - grt_left.txo_chrtype = GR_BYTE_TEXT; -} - -/************************************************************************/ - -static void paint_screen(void) -{ - GrContext *grc; - - paint_board(&brd); - paint_button_group(bgact); - paint_board(&brdimg); - grc = GrCreateSubContext(brdimg.x + 4, brdimg.y + 4, - brdimg.x + brdimg.wide - 5, - brdimg.y + brdimg.high - 5, grcglob, NULL); - if (bgact == &bgp1) - GrLoadContextFromPnm(grc, "pnmtest.ppm"); - else - GrLoadContextFromPnm(grc, "pnmtest2.ppm"); - GrDestroyContext(grc); - the_info(500, 215); - drawing(400, 280, 200, 150, BROWN, DARKGRAY); - the_title(500, 330); - paint_foot("Hold down left mouse buttom to see a comment"); -} - -/************************************************************************/ - -static void the_title(int x, int y) -{ - char *t1 = "GRX 2.4.9"; - char *t2 = "test programs launcher"; - - grt_centered.txo_fgcolor.v = LIGHTGREEN; - - grt_centered.txo_font = grf_big; - GrDrawString(t1, strlen(t1), 0 + x, 0 + y, &grt_centered); - - grt_centered.txo_font = grf_std; - GrDrawString(t2, strlen(t2), 0 + x, 40 + y, &grt_centered); -} - -/************************************************************************/ - -static void the_info(int x, int y) -{ - char aux[81], sys[4] = "?"; - int nsys; - - grt_centered.txo_fgcolor.v = CYAN; - grt_centered.txo_font = grf_std; - - nsys = GrGetLibrarySystem(); - if (nsys == GRX_VERSION_TCC_8086_DOS) - strcpy(sys, "TCC"); - if (nsys == GRX_VERSION_GCC_386_DJGPP) - strcpy(sys, "DJ2"); - if (nsys == GRX_VERSION_GCC_386_LINUX) - strcpy(sys, "LNX"); - if (nsys == GRX_VERSION_GCC_386_X11) - strcpy(sys, "X11"); - if (nsys == GRX_VERSION_GCC_X86_64_LINUX) - strcpy(sys, "L64"); - if (nsys == GRX_VERSION_GCC_X86_64_X11) - strcpy(sys, "X64"); - if (nsys == GRX_VERSION_GENERIC_X11) - strcpy(sys, "X11"); - if (nsys == GRX_VERSION_WATCOM_DOS4GW) - strcpy(sys, "WAT"); - if (nsys == GRX_VERSION_GCC_386_WIN32) - strcpy(sys, "W32"); - - sprintf(aux, "Version:%x System:%s", GrGetLibraryVersion(), sys); - GrDrawString(aux, strlen(aux), 0 + x, 0 + y, &grt_centered); - - sprintf(aux, "VideoDriver: %s", GrCurrentVideoDriver()->name); - GrDrawString(aux, strlen(aux), 0 + x, 25 + y, &grt_centered); - - sprintf(aux, "Mode: %dx%d %d bpp", GrCurrentVideoMode()->width, - GrCurrentVideoMode()->height, GrCurrentVideoMode()->bpp); - GrDrawString(aux, strlen(aux), 0 + x, 50 + y, &grt_centered); -} - -/************************************************************************/ - -static int pev_command(Event * ev) -{ - int i; - char nprog[81]; - - if (ev->type == EV_COMMAND) { - if (ev->p1 == ID_EXIT) { - par_event_queue(EV_END, 0, 0, 0); - return 1; - } - if (ev->p1 == ID_PAGE1) { - bgact = &bgp1; - paint_screen(); - return 1; - } - if (ev->p1 == ID_PAGE2) { - bgact = &bgp2; - paint_screen(); - return 1; - } - for (i = 0; i < NDEMOS; i++) { - if (ev->p1 == ptable[i].cid) { - gfaz_fin(); -#if defined(__MSDOS__) || defined(__WIN32__) - if (ev->p1 == ID_MODETEST) - strcpy(nprog, "..\\bin\\"); - else - strcpy(nprog, ".\\"); -#else - if (ev->p1 == ID_MODETEST) - strcpy(nprog, "../bin/"); - else - strcpy(nprog, "./"); -#endif -#if defined(__XWIN__) - strcat(nprog, "x"); -#endif - strcat(nprog, ptable[i].prog); - system(nprog); - ini_graphics(); - GrSetWindowTitle(wintitle); - paint_screen(); - return 1; - } - } - } - return 0; -} - -/************************************************************************/ - -static int pev_select(Event * ev) -{ - int i; - - if (ev->type == EV_SELECT) { - for (i = 0; i < NDEMOS; i++) { - if (ev->p1 == ptable[i].cid) { - paint_foot(ptable[i].text); - return 1; - } - } - } - return 0; -} - -/************************************************************************/ - -static void paint_foot(char *s) -{ - grt_centered.txo_fgcolor.v = LIGHTGREEN; - grt_centered.txo_font = grf_std; - - GrSetClipBox(10, 440, 630, 470); - GrClearClipBox(CYAN); - GrDrawString(s, strlen(s), 320, 455, &grt_centered); - GrResetClipBox(); -} - -/************************************************************************/ - -static void paint_animation(void) -{ - static int pos = 620; - static int ini = 0; - static GrContext *grc; - int ltext, wtext; - - if (!ini) { - grc = GrCreateContext(620, 30, NULL, NULL); - if (grc == NULL) - return; - ini = 1; - } - - grt_left.txo_fgcolor.v = CYAN; - grt_left.txo_font = grf_std; - ltext = strlen(animatedtext); - wtext = GrStringWidth(animatedtext, ltext, &grt_left); - - GrSetContext(grc); - GrClearContext(DARKGRAY); - GrDrawString(animatedtext, ltext, pos, 15, &grt_left); - GrSetContext(grcglob); - GrBitBlt(NULL, 10, 8, grc, 0, 0, 629, 29, GrWRITE); - - pos -= 1; - if (pos <= -wtext) - pos = 620; -} - -/************************************************************************/ - -static void disaster(char *s) -{ - void _GrCloseVideoDriver(void); - - char aux[81]; - - gfaz_fin(); - _GrCloseVideoDriver(); - printf("DemoGRX: %s\n", s); - printf("press Return to continue\n"); - fgets(aux, 80, stdin); - exit(1); -} diff --git a/thirdparty/grx249/test/depend.gnu b/thirdparty/grx249/test/depend.gnu deleted file mode 100644 index 2814d96..0000000 --- a/thirdparty/grx249/test/depend.gnu +++ /dev/null @@ -1,22 +0,0 @@ -arctest.o: arctest.c test.h ../include/grx20.h drawing.h rand.h -blittest.o: blittest.c test.h ../include/grx20.h drawing.h rand.h -circtest.o: circtest.c test.h ../include/grx20.h drawing.h rand.h -cliptest.o: cliptest.c test.h ../include/grx20.h drawing.h rand.h -colorops.o: colorops.c test.h ../include/grx20.h drawing.h rand.h -curstest.o: curstest.c test.h ../include/grx20.h drawing.h rand.h -fnt2c.o: fnt2c.c ../include/grx20.h -fonttest.o: fonttest.c test.h ../include/grx20.h drawing.h rand.h -imgtest.o: imgtest.c test.h ../include/grx20.h drawing.h rand.h -keys.o: keys.c ../include/grx20.h ../include/grxkeys.h -life.o: life.c test.h ../include/grx20.h drawing.h rand.h -linetest.o: linetest.c test.h ../include/grx20.h drawing.h rand.h -modetest.o: modetest.c ../include/grx20.h drawing.h rand.h -mousetst.o: mousetst.c test.h ../include/grx20.h drawing.h rand.h -pcirctst.o: pcirctst.c test.h ../include/grx20.h drawing.h rand.h -polytest.o: polytest.c test.h ../include/grx20.h drawing.h rand.h -rgbtest.o: rgbtest.c test.h ../include/grx20.h drawing.h rand.h -scroltst.o: scroltst.c test.h ../include/grx20.h drawing.h rand.h -speedtst.o: speedtst.c rand.h ../include/grx20.h -textpatt.o: textpatt.c ../include/grx20.h ../include/grxkeys.h -winclip.o: winclip.c test.h ../include/grx20.h drawing.h rand.h -wintest.o: wintest.c test.h ../include/grx20.h drawing.h rand.h diff --git a/thirdparty/grx249/test/drawing.h b/thirdparty/grx249/test/drawing.h deleted file mode 100644 index c6ac1cf..0000000 --- a/thirdparty/grx249/test/drawing.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - ** DRAWING.H ---- a stupid little drawing used all over in test programs - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] See "doc/copying.cb" for details. - **/ - -#include "rand.h" - -void drawing(int xpos,int ypos,int xsize,int ysize,long fg,long bg) -{ -# define XP(x) (int)((((long)(x) * (long)xsize) / 100L) + xpos) -# define YP(y) (int)((((long)(y) * (long)ysize) / 100L) + ypos) - int ii; - if(bg != GrNOCOLOR) { - GrFilledBox(xpos,ypos,xpos+xsize-1,ypos+ysize-1,bg); - } - GrLine(XP(10),YP(10),XP(40),YP(40),fg); - GrLine(XP(40),YP(10),XP(10),YP(40),fg); - GrLine(XP(35),YP(10),XP(65),YP(40),fg); - GrLine(XP(35),YP(40),XP(65),YP(10),fg); - GrLine(XP(70),YP(10),XP(90),YP(40),fg); - GrLine(XP(70),YP(40),XP(90),YP(10),fg); - for(ii = 0; ii < 5; ii++) { - GrBox(XP(70+2*ii),YP(10+3*ii),XP(90-2*ii),YP(40-3*ii),fg); - } - GrFilledBox(XP(10),YP(50),XP(60),YP(90),fg); - GrBox(XP(70),YP(50),XP(90),YP(90),fg); - for(ii = 0; ii < 100; ii++) { - GrPlot(XP((RND() % 20U) + 70),YP((RND() % 40U) + 50),fg); - } -} - -#undef XP -#undef YP - diff --git a/thirdparty/grx249/test/fontdemo.c b/thirdparty/grx249/test/fontdemo.c deleted file mode 100644 index 6d0a0b6..0000000 --- a/thirdparty/grx249/test/fontdemo.c +++ /dev/null @@ -1,223 +0,0 @@ -/** - ** fontdemo.c ---- demonstrate a font - ** - ** Copyright (C) 2002 Dimitar Zhekov - ** E-Mail: jimmy@is-vn.bg - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include - -#include "grx20.h" -#include "grxkeys.h" - -static GrTextOption opt; -static int curx = 0, cury = 0; -/* deltax and deltay are the additional columns/lines between characters */ -static int deltax = 0, deltay = 0; - -static void gnewl(void) -{ - cury += GrCharHeight('A', &opt) + deltay; - curx = 0; - if(cury + GrCharHeight('A', &opt) > GrSizeY() + deltay) { - if(GrKeyRead() == GrKey_F10) { - GrUnloadFont(opt.txo_font); - exit(0); - } - GrClearScreen(opt.txo_bgcolor.v); - cury = 0; - } -} - -/* all control characters are displayed 1:1 */ -static void gputc(int c) -{ - if(curx + GrCharWidth(c, &opt) + deltax > GrSizeX()) gnewl(); - GrDrawChar(c, curx, cury, &opt); - curx += GrCharWidth(c, &opt) + deltax; -} - -static void gputs(const char *s) -{ - while(*s != '\0') gputc((unsigned char) *s++); - gnewl(); -} - -static void revert(void) -{ - GrColor color; - - color = opt.txo_fgcolor.v; - opt.txo_fgcolor.v = opt.txo_bgcolor.v | (color & GR_UNDERLINE_TEXT); - opt.txo_bgcolor.v = color & ~GR_UNDERLINE_TEXT; - GrClearScreen(color); - curx = cury = 0; -} - -int main(int argc, char **argv) -{ - int i, n; - char *s; - char *bad = NULL; - int c; - - int width = 0, height = 0, bpp = 8, gray = 192, attributes = 0; - - char *name, *testname; - GrFontHeader *hdr; - FILE *f; - char buffer[0x20]; - GrKeyType key; - - /* unfortunately not all systems support getopt() */ - for(i = 1; i < argc; i++) { - s = argv[i]; - if(*s != '-' || ((c = *++s) == '\0') || *++s != '\0') break; - if(c == '-') { - i++; - break; - } - if(++i == argc) { - fprintf(stderr, "-%c: argument required\n", c); - return(1); - } - if(sscanf(argv[i], "%d", &n) != 1 || n < 0) { - fprintf(stderr, "%s: invalid argument\n", argv[i]); - exit(1); - } - switch(c) { - case 'x' : width = n; break; - case 'y' : height = n; break; - case 'b' : if((bpp = n) < 2 || bpp > 32) bad = "bpp"; break; - case 'g' : if((gray = n) > 255) bad = "gray"; break; - case 'X' : if((deltax = n) > 31) bad = "deltax"; break; - case 'Y' : if((deltay = n) > 31) bad = "deltay"; break; - case 'a' : if((attributes = n) > 3) bad = "attributes"; break; - default : { - fprintf(stderr, "-%c: invalid option\n", c); - return(1); - } - } - if(bad) { - fprintf(stderr, "%d: %s out of range\n", n, bad); - return(1); - } - } - - if(i == argc) { - printf( - "usage:\tfontdemo [-x WIDTH] [-y HEIGHT] [-b BPP] [-g COMPONENT]\n" - "\t[-X DELTAX] [-Y DELTAY] [-a ATTRIBUTES] FONT [FILE...]\n" - ); - return(0); - } - - name = argv[i++]; - opt.txo_font = GrLoadFont(name); - if(opt.txo_font == NULL && (testname = malloc(strlen(name) + 10)) != NULL) { - /* try again, this is a test and the path can not been set yet */ -#if defined(__MSDOS__) || defined(__WIN32__) - sprintf( testname,"..\\fonts\\%s",name ); -#else - sprintf( testname,"../fonts/%s",name ); -#endif - opt.txo_font = GrLoadFont(testname); - free(testname); - } - if(opt.txo_font == NULL) { - fprintf(stderr, "%s: load error\n", name); - return(1); - } - hdr = &opt.txo_font->h; - - if(height == 0) { - if(width == 0) { - switch(hdr->height) { - case 8 : - case 14 : height = 400; break; - case 24 : height = 768; break; - default : height = hdr->height * 30; - } - } - else height = width * 3 / 4; - } - if(width == 0) width = height == 400 ? 640 : height * 4 / 3; - - GrSetMode(GR_width_height_bpp_graphics, width, height, bpp); - if(!gray || (opt.txo_fgcolor.v = GrAllocColor(gray, gray, gray)) == GrNOCOLOR) opt.txo_fgcolor.v = GrWhite(); - if(attributes & 0x02) opt.txo_fgcolor.v |= GR_UNDERLINE_TEXT; - opt.txo_bgcolor.v = GrBlack(); - if(attributes & 0x01) revert(); - opt.txo_chrtype = GR_BYTE_TEXT; - opt.txo_direct = GR_TEXT_RIGHT; - opt.txo_xalign = GR_ALIGN_LEFT; - opt.txo_yalign = GR_ALIGN_TOP; - - sprintf(buffer, "%s %dx%d", hdr->name, GrCharWidth('A', &opt), GrCharHeight('A', &opt)); - gputs(buffer); - sprintf(buffer, "%dx%d@%lu", GrSizeX(), GrSizeY(), (unsigned long) GrNumColors()); - gputs(buffer); - gnewl(); - - gputs("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"); - gputs("the quick brown fox jumps over the lazy dog"); - gnewl(); - - if(hdr->minchar <= 0xC0 && hdr->minchar + hdr->numchars >= 0x100) { - gputs("ÁÚÐÇÀÒÀ ÊÀÔßÂÀ ËÈÑÈÖÀ ÏÐÅÑÊÀ×À ËÅÍÈÂÎÒÎ ÊÓ×Å"); - gputs("áúðçàòà êàôÿâà ëèñèöà ïðåñêà÷à ëåíèâîòî êó÷å"); - gnewl(); - } - - /* ascii table, or to be precise, a full table of the current font */ - opt.txo_chrtype = GR_WORD_TEXT; - for(c = 0; c < hdr->numchars; c++) { - gputc(hdr->minchar + c); - if(c % 0x20 == 0x1F) gnewl(); - } - gnewl(); - if(c % 0x20 != 0) gnewl(); - opt.txo_chrtype = GR_BYTE_TEXT; - - while(i < argc) { - name = argv[i++]; - if((f = fopen(name, "r")) == NULL) { - perror(name); - return(1); - } - while((c = getc(f)) != EOF) if(c != '\n') gputc(c); else gnewl(); - if(ferror(f) != 0 || fclose(f) != 0) { - perror(name); - return(1); - } - } - - /* enter and esc are < 0x100 and displayed 1:1 */ - gputs("F1-new line F5-toggle reverse F7-toggle underline F10-exit"); - gnewl(); - - while((key = GrKeyRead()) != GrKey_F10) { - if(key == GrKey_F1) gnewl(); - else if(key == GrKey_F5) revert(); - else if(key == GrKey_F7) opt.txo_fgcolor.v ^= GR_UNDERLINE_TEXT; - else if(key < 0x100) gputc(key); - } - - GrUnloadFont(opt.txo_font); - - return(0); -} diff --git a/thirdparty/grx249/test/fonttest.c b/thirdparty/grx249/test/fonttest.c deleted file mode 100644 index cadf7b1..0000000 --- a/thirdparty/grx249/test/fonttest.c +++ /dev/null @@ -1,192 +0,0 @@ -/** - ** fonttest.c ---- test text drawing - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "test.h" - -int cx; -int cy; -GrColor c1; -GrColor c2; -GrColor c3; -GrColor c4; - -char test_text[] = { - "QUICK BROWN FOX JUMPS OVER THE LAZY DOG, " - "quick brown fox jumps over the lazy dog !@#$%^&*()1234567890" -}; - -void displayfont(GrFont *font,char *text,int len) -{ - GrTextOption opt; - int ww,hh; - int bx,by; - int bw,bh; - - memset(&opt,0,sizeof(opt)); - opt.txo_font = font; - opt.txo_xalign = GR_ALIGN_LEFT; - opt.txo_yalign = GR_ALIGN_TOP; - GrFilledBox(0,0,GrSizeX(),GrSizeY(),GrBlack()); - opt.txo_direct = GR_TEXT_RIGHT; - opt.txo_fgcolor.v = GrBlack(); - opt.txo_bgcolor.v = c1; - ww = GrStringWidth(text,len,&opt); - hh = GrStringHeight(text,len,&opt); - bw = ww+2*hh; - bh = ww; - bx = cx - bw/2; - by = cy - bh/2; - GrDrawString(text,len,bx+hh,by,&opt); - opt.txo_direct = GR_TEXT_DOWN; - opt.txo_bgcolor.v = c2; - GrDrawString(text,len,bx+bw-hh,by,&opt); - opt.txo_direct = GR_TEXT_LEFT; - opt.txo_bgcolor.v = c3; - GrDrawString(text,len,bx+bw-ww-hh,by+bh-hh,&opt); - opt.txo_direct = GR_TEXT_UP; - opt.txo_bgcolor.v = c4; - GrDrawString(text,len,bx,by+bh-ww,&opt); - GrKeyRead(); - GrClearClipBox(GrBlack()); - opt.txo_direct = GR_TEXT_RIGHT; - opt.txo_fgcolor.v = c1; - opt.txo_bgcolor.v = GrBlack(); - bx = GrSizeX() / 16; - by = GrSizeY() / 16; - bx = (bx + 7) & ~7; - while(by < GrSizeY()) { - GrDrawString(test_text,strlen(test_text),bx,by,&opt); - opt.txo_fgcolor.v ^= GR_UNDERLINE_TEXT; - by += hh; - } - GrKeyRead(); -} - -TESTFUNC(fonttest) -{ - GrFont *f; - int i; - char buff[100]; - cx = GrSizeX() / 2; - cy = GrSizeY() / 2; - c1 = GrAllocColor(100,200,100); - c2 = GrAllocColor(150,150,100); - c3 = GrAllocColor(100,100,200); - c4 = GrAllocColor(100,180,180); - GrBox(GrSizeX()/16 - 2, - GrSizeY()/16 - 2, - GrSizeX() - GrSizeX()/16 + 1, - GrSizeY() - GrSizeY()/16 + 1, - GrAllocColor(250,100,100) - ); - GrSetClipBox(GrSizeX()/16, - GrSizeY()/16, - GrSizeX() - GrSizeX()/16 - 1, - GrSizeY() - GrSizeY()/16 - 1 - ); - strcpy(buff,"Default GRX font"); - displayfont(&GrDefaultFont,buff,strlen(buff)); - strcpy(buff,"Default font scaled to 6x10"); - displayfont( - GrBuildConvertedFont( - &GrDefaultFont, - (GR_FONTCVT_SKIPCHARS | GR_FONTCVT_RESIZE), - 6, - 10, - ' ', - 'z' - ), - buff, - strlen(buff) - ); - strcpy(buff,"Default font scaled to 12x24"); - displayfont( - GrBuildConvertedFont( - &GrDefaultFont, - (GR_FONTCVT_SKIPCHARS | GR_FONTCVT_RESIZE), - 12, - 24, - ' ', - 'z' - ), - buff, - strlen(buff) - ); - strcpy(buff,"Default font scaled to 18x36"); - displayfont( - GrBuildConvertedFont( - &GrDefaultFont, - (GR_FONTCVT_SKIPCHARS | GR_FONTCVT_RESIZE), - 18, - 36, - ' ', - 'z' - ), - buff, - strlen(buff) - ); - strcpy(buff,"Default font scaled to 10x20 proportional"); - displayfont( - GrBuildConvertedFont( - &GrDefaultFont, - (GR_FONTCVT_SKIPCHARS | GR_FONTCVT_RESIZE | GR_FONTCVT_PROPORTION), - 10, - 20, - ' ', - 'z' - ), - buff, - strlen(buff) - ); - strcpy(buff,"Default font scaled to 10x20 bold"); - displayfont( - GrBuildConvertedFont( - &GrDefaultFont, - (GR_FONTCVT_SKIPCHARS | GR_FONTCVT_RESIZE | GR_FONTCVT_BOLDIFY), - 10, - 20, - ' ', - 'z' - ), - buff, - strlen(buff) - ); - strcpy(buff,"Default font scaled to 10x20 italic"); - displayfont( - GrBuildConvertedFont( - &GrDefaultFont, - (GR_FONTCVT_SKIPCHARS | GR_FONTCVT_RESIZE | GR_FONTCVT_ITALICIZE), - 10, - 20, - ' ', - 'z' - ), - buff, - strlen(buff) - ); - for(i = 0; i < Argc; i++) { - f = GrLoadFont(Argv[i]); - if(f) { - sprintf(buff,"This is font %s",Argv[i]); - displayfont(f,buff,strlen(buff)); - } - } -} - diff --git a/thirdparty/grx249/test/fswwtest.c b/thirdparty/grx249/test/fswwtest.c deleted file mode 100644 index 0264d65..0000000 --- a/thirdparty/grx249/test/fswwtest.c +++ /dev/null @@ -1,75 +0,0 @@ -/** - ** fswwtest.c ---- test programmed switching - ** between full screen and windowed modes - ** for the sdl driver - ** - ** Copyright (C) 2007 Maurice Lombardi - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "grx20.h" -#include "grxkeys.h" -#include "drawing.h" - -int main() -{ - int x, y, ww, wh, i = 0; - GrColor c; - GrContext *w1, *w2, *w3, *w4; - - do { - - if( i ) GrSetDriver( "sdl::ww gw 600 gh 600 nc 256" ); - else GrSetDriver( "sdl::fs gw 600 gh 600 nc 256" ); - i = ! i; - - GrSetMode( GR_default_graphics ); - - x = GrSizeX(); - y = GrSizeY(); - ww = (x / 2) - 10; - wh = (y / 2) - 10; - w1 = GrCreateSubContext(5,5,ww+4,wh+4,NULL,NULL); - w2 = GrCreateSubContext(15+ww,5,ww+ww+14,wh+4,NULL,NULL); - w3 = GrCreateSubContext(5,15+wh,ww+4,wh+wh+14,NULL,NULL); - w4 = GrCreateSubContext(15+ww,15+wh,ww+ww+14,wh+wh+14,NULL,NULL); - - GrSetContext(w1); - c = GrAllocColor(200,100,100); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w2); - c = GrAllocColor(100,200,200); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w3); - c = GrAllocColor(200,200,0); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w4); - c = GrAllocColor(0,100,200); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext( NULL ); - - GrTextXY(10,wh,"press any key to toggle full screen / windowed modes, escape to end",GrWhite(),GrBlack()); - - } while ( GrKeyRead() != GrKey_Escape ); - return 0; -} diff --git a/thirdparty/grx249/test/gfaz.c b/thirdparty/grx249/test/gfaz.c deleted file mode 100644 index 7e1f3cb..0000000 --- a/thirdparty/grx249/test/gfaz.c +++ /dev/null @@ -1,398 +0,0 @@ -/** - ** gfaz.c ---- Mini GUI for GRX - ** - ** Copyright (C) 2000,2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include -#include -#include "gfaz.h" - -GrColor *egacolors; - -static int mouse_found = 0; -static int mouse_count = 0; - -#define MAX_EVQUEUE 10 - -static Event evqueue[MAX_EVQUEUE]; -static int num_evqueue = 0; - -static void (*hook_input_event)( Event * ) = NULL; - -/* Internal routines */ - -static int read_input( void ); -static void input_event_queue( Event *ev ); -static int coord_into( int x, int y, int xo, int yo, int xl, int yl ); - -/**************************************************************************/ - -int gfaz_ini( int width, int height, int bpp ) -{ -/* __djgpp_set_ctrl_c( 0 );*/ -/* _go32_want_ctrl_break( 1 );*/ -/* GrSetMode( GR_default_graphics );*/ - - GrSetMode( GR_width_height_bpp_graphics,width,height,bpp ); - - egacolors = GrAllocEgaColors(); - - if( GrMouseDetect() ){ - mouse_found = 1; - GrMouseInit(); - GrMouseSetColors( GrWhite(),GrBlack() ); - show_mouse(); - } - GrMouseEventEnable( 1,mouse_found ); - - return 0; -} - -/**************************************************************************/ - -int gfaz_fin( void ) -{ - if( mouse_found ){ - hide_mouse(); - GrMouseUnInit(); - } - - GrSetMode( GR_default_text ); - - return 0; -} - -/**************************************************************************/ - -void event_read( Event *ev ) -{ - while( 1 ){ - if( num_evqueue > 0 ){ - num_evqueue--; - *ev = evqueue[num_evqueue]; - return; - } - if( read_input() ){ - continue; - } - ev->type = EV_NULL; - ev->p1 = 0; - ev->p2 = 0; - ev->p3 = 0; - return; - } -} - -/**************************************************************************/ - -void event_wait( Event *ev ) -{ - while( 1 ){ - event_read( ev ); - if( ev->type != EV_NULL ) - return; - } -} - -/**************************************************************************/ - -void event_queue( Event *ev ) -{ - if( num_evqueue < MAX_EVQUEUE ) - evqueue[num_evqueue++] = *ev; -} - -/**************************************************************************/ - -void par_event_queue( int type, long p1, long p2, long p3 ) -{ - Event ev; - - ev.type = type; - ev.p1 = p1; - ev.p2 = p2; - ev.p3 = p3; - event_queue( &ev ); -} - -/**************************************************************************/ - -void set_hook_input_event( void (*fn)( Event * ) ) -{ - hook_input_event = fn; -} - -/**************************************************************************/ - -static void input_event_queue( Event *ev ) -{ - if( hook_input_event != NULL ) - hook_input_event( ev ); - else - event_queue( ev ); -} - -/************************************************************************/ - -static int read_input( void ) -{ - GrMouseEvent evt; - Event evaux; - - GrMouseGetEventT( GR_M_EVENT,&evt,10L ); - if( evt.dtime == -1 ) return 0; - - if( evt.flags & GR_M_KEYPRESS ){ - evaux.type = EV_KEY; - evaux.p1 = evt.key; - evaux.p2 = 0; - evaux.p3 = 0; - input_event_queue( &evaux ); - } - evaux.type = EV_MOUSE; - evaux.p2 = evt.x; - evaux.p3 = evt.y; - if( evt.flags & GR_M_LEFT_DOWN ){ - evaux.p1 = MOUSE_LB_PRESSED; - input_event_queue( &evaux ); - } - if( evt.flags & GR_M_RIGHT_DOWN ){ - evaux.p1 = MOUSE_RB_PRESSED; - input_event_queue( &evaux ); - } - if( evt.flags & GR_M_LEFT_UP ){ - evaux.p1 = MOUSE_LB_RELEASED; - input_event_queue( &evaux ); - } - if( evt.flags & GR_M_RIGHT_UP ){ - evaux.p1 = MOUSE_RB_RELEASED; - input_event_queue( &evaux ); - } - return 1; -} - -/**************************************************************************/ - -void show_mouse( void ) -{ - if( (mouse_count == 0) && mouse_found ) - GrMouseDisplayCursor(); - - mouse_count++; -} - -/************************************************************************/ - -void hide_mouse( void ) -{ - mouse_count--; - - if( (mouse_count == 0) && mouse_found ) - GrMouseEraseCursor(); -} - -/**************************************************************************/ - -void dboton( int x, int y, int an, int al, - GrColor c, GrColor ct, char * s, int t ) - -// x, y posici¢n de la esquina izquierda -// an, al ancho y alto -// c, ct color del fondo y del texto -// t, tipo bit 0 0=normal, 1=apretado -// bit 1 0=no selec, 1=seleccionado - -{ - int pol[7][2], prof, pulsd, selec, despl; - GrTextOption grt; - GrLineOption glo; - int mouseblock; - - prof = (t & 0x1) ? 2 : 4; - pulsd = (t & 0x1) ? 1 : 0; - selec = (t & 0x2) ? 1 : 0; - despl = (t & 0x1) ? 1 : 0; - - mouseblock = GrMouseBlock( NULL,x,y,x+an-1,y+al-1 ); - GrBox( x,y,x+an-1,y+al-1,BLACK ); - x = x + 1; y = y + 1; - an = an - 2; al = al - 2; - - pol[0][0] = x; pol[0][1] = y; - pol[1][0] = x + an - 1; pol[1][1] = y; - pol[2][0] = x + an - 2 - prof; pol[2][1] = y + 1 + prof; - pol[3][0] = x + 1 + prof; pol[3][1] = y + 1 + prof; - pol[4][0] = x + 1 + prof; pol[4][1] = y + al - 2 - prof; - pol[5][0] = x; pol[5][1] = y + al - 1; - pol[6][0] = pol[0][0]; pol[6][1] = pol[0][1]; - GrFilledPolygon( 7,pol,pulsd ? DARKGRAY : LIGHTGRAY ); - GrPolygon( 7,pol,BLACK ); - GrLine( pol[0][0],pol[0][1],pol[3][0],pol[3][1],BLACK ); - pol[0][0] = x + an - 1; pol[0][1] = y + al - 1; - pol[3][0] = x + an - 2 - prof; pol[3][1] = y + al - 2 - prof; - pol[6][0] = pol[0][0]; pol[6][1] = pol[0][1]; - GrFilledPolygon( 7,pol,pulsd ? LIGHTGRAY : DARKGRAY ); - GrPolygon( 7,pol,BLACK ); - GrLine( pol[0][0],pol[0][1],pol[3][0],pol[3][1],BLACK ); - GrFilledBox( x+2+prof,y+2+prof,x+an-3-prof,y+al-3-prof,c ); - - grt.txo_font = &GrFont_PC8x14; - grt.txo_fgcolor.v = ct; - grt.txo_bgcolor.v = GrNOCOLOR; - grt.txo_direct = GR_TEXT_RIGHT; - grt.txo_xalign = GR_ALIGN_CENTER; - grt.txo_yalign = GR_ALIGN_CENTER; - grt.txo_chrtype = GR_BYTE_TEXT; - if( despl ) - GrDrawString( s,strlen( s ),x+an/2+1,y+al/2+1,&grt ); - else - GrDrawString( s,strlen( s ),x+an/2,y+al/2,&grt ); - - if( selec ){ - glo.lno_color = ct; - glo.lno_width = 1; - glo.lno_pattlen = 2; - glo.lno_dashpat = "\2\1"; - GrCustomBox( x+8,y+al/2-6,x+an-8,y+al/2+5,&glo ); - } - - GrMouseUnBlock( mouseblock ); -} - -/**************************************************************************/ - -void paint_button( int x, int y, Button *b ) -{ - dboton( x+b->x,y+b->y,b->wide,b->high, - egacolors[b->tbcolor],egacolors[b->tfcolor], - b->text,b->status ); -} - -/**************************************************************************/ - -void paint_button_group( Button_Group *bg ) -{ - int i; - - for( i=0; inb; i++ ) - paint_button( bg->x,bg->y,&(bg->b[i]) ); -} - -/**************************************************************************/ - -int pev_button_group( Event *ev, Button_Group *bg ) -{ - int i; - - if( ev->type == EV_MOUSE ){ - if( ev->p1 == MOUSE_LB_PRESSED ){ - for( i=0; inb; i++ ) - if( coord_into( ev->p2,ev->p3, - bg->x+bg->b[i].x,bg->y+bg->b[i].y, - bg->b[i].wide,bg->b[i].high ) ){ - bg->b[bg->pb].status &= ~BSTATUS_SELECTED; - paint_button( bg->x,bg->y,&(bg->b[bg->pb]) ); - bg->b[i].status |= BSTATUS_PRESSED | BSTATUS_SELECTED; - paint_button( bg->x,bg->y,&(bg->b[i]) ); - bg->pb = i; - bg->abp = 1; - par_event_queue( EV_SELECT,bg->b[i].bid,0,0 ); - return 1; - } - } - if( ev->p1 == MOUSE_LB_RELEASED ){ - if( bg->abp ){ - i = bg->pb; - bg->b[i].status &= ~BSTATUS_PRESSED; - paint_button( bg->x,bg->y,&(bg->b[i]) ); - bg->abp = 0; - if( coord_into( ev->p2,ev->p3, - bg->x+bg->b[i].x,bg->y+bg->b[i].y, - bg->b[i].wide,bg->b[i].high ) ){ - par_event_queue( EV_COMMAND,bg->b[i].bid,0,0 ); - } - return 1; - } - } - } - else if( ev->type == EV_KEY ){ - if( ev->p1 == GrKey_Right || - ev->p1 == GrKey_Down || - ev->p1 == GrKey_Tab ){ - if( bg->pb < bg->nb-1 ){ - bg->b[bg->pb].status &= ~BSTATUS_SELECTED; - paint_button( bg->x,bg->y,&(bg->b[bg->pb]) ); - bg->pb++; - bg->b[bg->pb].status |= BSTATUS_SELECTED; - paint_button( bg->x,bg->y,&(bg->b[bg->pb]) ); - par_event_queue( EV_SELECT,bg->b[bg->pb].bid,0,0 ); - } - return 1; - } - else if( ev->p1 == GrKey_Left || - ev->p1 == GrKey_Up || - ev->p1 == GrKey_BackTab ){ - if( bg->pb > 0 ){ - bg->b[bg->pb].status &= ~BSTATUS_SELECTED; - paint_button( bg->x,bg->y,&(bg->b[bg->pb]) ); - bg->pb--; - bg->b[bg->pb].status |= BSTATUS_SELECTED; - paint_button( bg->x,bg->y,&(bg->b[bg->pb]) ); - par_event_queue( EV_SELECT,bg->b[bg->pb].bid,0,0 ); - } - return 1; - } - else if( ev->p1 == GrKey_Return ){ - par_event_queue( EV_COMMAND,bg->b[bg->pb].bid,0,0 ); - return 1; - } - } - - return 0; -} - -/**************************************************************************/ - -static int coord_into( int x, int y, int xo, int yo, int xl, int yl ) -{ - if( x < xo ) return 0; - if( x >= xo+xl ) return 0; - if( y < yo ) return 0; - if( y >= yo+yl ) return 0; - return 1; -} - -/**************************************************************************/ - -void paint_board( Board *b ) -{ - int x1, y1, x2, y2; - - x1 = b->x; - y1 = b->y; - x2 = b->x + b->wide - 1; - y2 = b->y + b->high - 1; - - GrBox( x1,y1,x2,y2,egacolors[b->lcolor] ); - GrBox( x1+1,y1+1,x2-1,y2-1,egacolors[b->bcolor] ); - GrBox( x1+2,y1+2,x2-2,y2-2,egacolors[b->bcolor] ); - GrBox( x1+3,y1+3,x2-3,y2-3,egacolors[b->lcolor] ); - GrFilledBox( x1+4,y1+4,x2-4,y2-4,egacolors[b->color] ); -} - diff --git a/thirdparty/grx249/test/gfaz.h b/thirdparty/grx249/test/gfaz.h deleted file mode 100644 index 4bffa8c..0000000 --- a/thirdparty/grx249/test/gfaz.h +++ /dev/null @@ -1,137 +0,0 @@ -/** - ** gfaz.h ---- gfaz headers - ** - ** Copyright (C) 2000,2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -extern GrColor *egacolors; - -#define BLACK egacolors[0] -#define BLUE egacolors[1] -#define GREEN egacolors[2] -#define CYAN egacolors[3] -#define RED egacolors[4] -#define MAGENTA egacolors[5] -#define BROWN egacolors[6] -#define LIGHTGRAY egacolors[7] -#define DARKGRAY egacolors[8] -#define LIGHTBLUE egacolors[9] -#define LIGHTGREEN egacolors[10] -#define LIGHTCYAN egacolors[11] -#define LIGHTRED egacolors[12] -#define LIGHTMAGENTA egacolors[13] -#define YELLOW egacolors[14] -#define WHITE egacolors[15] - -#define IND_BLACK 0 -#define IND_BLUE 1 -#define IND_GREEN 2 -#define IND_CYAN 3 -#define IND_RED 4 -#define IND_MAGENTA 5 -#define IND_BROWN 6 -#define IND_LIGHTGRAY 7 -#define IND_DARKGRAY 8 -#define IND_LIGHTBLUE 9 -#define IND_LIGHTGREEN 10 -#define IND_LIGHTCYAN 11 -#define IND_LIGHTRED 12 -#define IND_LIGHTMAGENTA 13 -#define IND_YELLOW 14 -#define IND_WHITE 15 - -#define EV_NULL 0 -#define EV_KEY 1 -#define EV_MOUSE 2 -#define EV_COMMAND 3 -#define EV_SELECT 4 -#define EV_END 5 - -#define MOUSE_LB_PRESSED 1 -#define MOUSE_RB_PRESSED 2 -#define MOUSE_LB_RELEASED 3 -#define MOUSE_RB_RELEASED 4 - -typedef struct{ - int type; - long p1; - long p2; - long p3; - } Event; - -int gfaz_ini( int width, int height, int bpp ); -int gfaz_fin( void ); - -void event_read( Event *ev ); -void event_wait( Event *ev ); -void event_queue( Event *ev ); -void par_event_queue( int type, long p1, long p2, long p3 ); -void set_hook_input_event( void (*fn)( Event * ) ); - -void show_mouse( void ); -void hide_mouse( void ); - -#define BSTATUS_PRESSED 1 -#define BSTATUS_SELECTED 2 - -typedef struct{ - int x, y; // left upper coordinates - int wide, high; // what do you mean - int tbcolor, tfcolor; // text background, foreground, ind colors - char *text; // the text - int status; // see BSTATUS defs - int bid; // button id - } Button; - -void paint_button( int x, int y, Button *b ); - -typedef struct{ - int x, y; // left upper coordinates - Button *b; // button array - int nb; // button number - int pb; // point actual button - int abp; // actual button pressed - } Button_Group; - -void paint_button_group( Button_Group *bg ); -int pev_button_group( Event *ev, Button_Group *bg ); - -typedef struct{ - int x, y; // left upper coordinates - int wide, high; // what do you mean - int aid; // area id - int divx, divy; // x, y divisors - int inip1, inip2; // par1, par2 initial values - int incrp1, incrp2; // par1, par2 increments - int invert; // x,y -> par1,par2 or inverted if 1 - } Area; - -typedef struct{ - int x, y; // left upper coordinates - Area *a; // area array - } Area_Group; - -int pev_area_group( Event *ev, Area_Group *ag ); - -typedef struct{ - int x, y; // left upper coordinates - int wide, high; // what do you mean - int lcolor, bcolor, color; // line, border, normal ind color - int border; // - } Board; - -void paint_board( Board *b ); - diff --git a/thirdparty/grx249/test/imgtest.c b/thirdparty/grx249/test/imgtest.c deleted file mode 100644 index 6b62bf5..0000000 --- a/thirdparty/grx249/test/imgtest.c +++ /dev/null @@ -1,85 +0,0 @@ -/** - ** imgtest.c ---- test image functions mapping - ** - ** Copyright (c) 1998 Hartmut Schirmer - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" - -#define PARTS 4 - -TESTFUNC(imgtest) -{ - int x = GrSizeX(); - int y = GrSizeY(); - int ww = (x / PARTS)-1; - int wh = (y / PARTS)-1; - int m1, m2, d1, d2; - GrColor c1, c2, c3; - GrContext ctx; - GrImage *img1; - GrImage *img2; - if (! GrCreateContext(ww,wh,NULL,&ctx)) return; - - GrSetContext(&ctx); - c1 = GrAllocColor(255,100,0); - c2 = GrAllocColor(0,0,(GrNumColors() >= 16 ? 180 : 63)); - c3 = GrAllocColor(0,255,0); - drawing(0,0,ww,wh,c1,c2); - GrBox(0,0,ww-1,wh-1,c1); - - GrSetContext(NULL); - - img1 = GrImageFromContext(&ctx); - if (!img1) return; - - GrFilledBox(0,0,ww+1,wh+1,c3); - GrFilledBox(ww+15,0,2*ww+16,wh+1,c3); - - GrBitBlt(NULL,1,1,&ctx,0,0,ww-1,wh-1,0); - GrImageDisplay(ww+16,1,img1); - GrImageDisplayExt(0,wh+4,x-1,y-1, img1); - - GrKeyRead(); - - for (m1=1; m1 <= PARTS ; m1<<=1) { - for (d1=1; d1 <= PARTS; d1 <<= 1) { - for (m2=1; m2 <= PARTS ; m2<<=1) { - for (d2=1; d2 <= PARTS; d2 <<= 1) { - img2 = GrImageStretch(img1,(m1*ww)/d1, (m2*wh)/d2); - if (img2) { - GrImageDisplayExt(0,0,x-1,y-1,img2); - GrImageDestroy(img2); - } - } - } - } - } - GrKeyRead(); - - /* let's finish with some GrGetScanline / GrPutScanline tests */ - for (d1 = 1; d1 < 32; ++d1) { - for (m1 = wh; m1 < y-wh-d1-1; ++m1) { - const GrColor *cp; - cp = GrGetScanline(ww+1,x-ww-d1,m1+1); - if (cp) { - GrPutScanline(ww,x-ww-d1-1,m1,cp,GrIMAGE|c2); - } - } - } - - GrKeyRead(); -} - diff --git a/thirdparty/grx249/test/jpeg1.jpg b/thirdparty/grx249/test/jpeg1.jpg deleted file mode 100644 index 1037977..0000000 --- a/thirdparty/grx249/test/jpeg1.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea8f8daade06a65a95bf353af0abc97014a07168a9701ed1d9dcf8097b629a2d -size 95770 diff --git a/thirdparty/grx249/test/jpeg2.jpg b/thirdparty/grx249/test/jpeg2.jpg deleted file mode 100644 index ceb3839..0000000 --- a/thirdparty/grx249/test/jpeg2.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5269a62b392a89191a85770af18d7243c6b4098c6485ce1d74e3f3fc9ae78e6d -size 62576 diff --git a/thirdparty/grx249/test/jpgtest.c b/thirdparty/grx249/test/jpgtest.c deleted file mode 100644 index 16b8074..0000000 --- a/thirdparty/grx249/test/jpgtest.c +++ /dev/null @@ -1,118 +0,0 @@ -/** - ** jpgtest.c ---- test the ctx2jpeg routines - ** - ** Copyright (c) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - **/ - -#include -#include -#include "grx20.h" -#include "grxkeys.h" - -void imagen( char *nf, int scale ) -{ - GrContext *grc; - int wide, high; - char s[81]; - int w, h; - - GrQueryJpeg( nf,&w,&h ); - sprintf( s,"%s %dx%d scale 1/%d",nf,w,h,scale ); - wide = (w/scale > 600) ? 600 : w/scale; - high = (h/scale > 400) ? 400 : h/scale; - GrClearScreen( GrAllocColor( 0,0,200 ) ); - - GrBox( 10,40,10+wide+1,40+high+1,GrWhite() ); - grc = GrCreateSubContext( 11,41,11+wide-1,41+high-1,NULL,NULL ); - GrLoadContextFromJpeg( grc,nf,scale ); - GrDestroyContext( grc ); - - GrTextXY( 10,10,s,GrBlack(),GrWhite() ); - GrTextXY( 10,50+high,"Press any key to continue",GrBlack(),GrWhite() ); - GrKeyRead(); -} - -void nojpegsupport( void ) -{ - char *s[6] = { - "Warning!", - "You need libjpeg (http://www.ijg.org) and enable", - "jpeg support in the GRX lib (edit makedefs.grx)", - "to run this demo", - " ", - "Press any key to continue..." }; - int i; - - GrClearScreen( GrAllocColor( 0,0,100 ) ); - for( i=0; i<6; i++ ) - GrTextXY( 90,160+i*18,s[i],GrWhite(),GrNOCOLOR ); - GrKeyRead(); -} - -int main() -{ - GrContext *grc; - - GrSetMode( GR_width_height_bpp_graphics,640,480,24 ); - - if( !GrJpegSupport() ){ - nojpegsupport(); - GrSetMode(GR_default_text); - exit( 1 ); - } - - imagen( "jpeg1.jpg",1 ); - imagen( "jpeg1.jpg",2 ); - imagen( "jpeg1.jpg",4 ); - imagen( "jpeg1.jpg",8 ); - imagen( "jpeg2.jpg",1 ); - imagen( "jpeg2.jpg",2 ); - imagen( "jpeg2.jpg",4 ); - imagen( "jpeg2.jpg",8 ); - - GrClearScreen( GrAllocColor( 0,100,0 ) ); - grc = GrCreateSubContext( 10,40,10+400-1,40+300-1,NULL,NULL ); - GrLoadContextFromJpeg( grc,"jpeg1.jpg",2 ); - GrDestroyContext( grc ); - grc = GrCreateSubContext( 210,150,210+400-1,150+300-1,NULL,NULL ); - GrLoadContextFromJpeg( grc,"jpeg2.jpg",2 ); - GrDestroyContext( grc ); - - GrTextXY( 10,10,"Press any key to save color and gray screen", - GrBlack(),GrWhite() ); - GrKeyRead(); - - GrSaveContextToJpeg( NULL,"p.jpg",75 ); - GrSaveContextToGrayJpeg( NULL,"pgray.jpg",75 ); - - GrClearScreen( GrBlack() ); - GrTextXY( 10,10,"Press any key to reload color screen ", - GrBlack(),GrWhite() ); - GrKeyRead(); - GrLoadContextFromJpeg( NULL,"p.jpg",1 ); - - GrTextXY( 10,10,"Press any key to reload gray screen ", - GrBlack(),GrWhite() ); - GrKeyRead(); - GrClearScreen( GrBlack() ); - GrLoadContextFromJpeg( NULL,"pgray.jpg",1 ); - - GrTextXY( 10,10,"Press any key to end ", - GrBlack(),GrWhite() ); - GrKeyRead(); - - GrSetMode(GR_default_text); - return 0; -} diff --git a/thirdparty/grx249/test/keys.c b/thirdparty/grx249/test/keys.c deleted file mode 100644 index a6167da..0000000 --- a/thirdparty/grx249/test/keys.c +++ /dev/null @@ -1,465 +0,0 @@ -/** - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** Changes by D.Zhekov (jimmy@is-vn.bg) 16/02/2004 - ** - converted to a standard test program [GRX I/O only]. - ** - **/ - -#include -#include -#include -#include -#include "test.h" -#include "grxkeys.h" - -#if defined(PENTIUM_CLOCK) && (!defined(__GNUC__) || !defined(__i386__)) -#undef PENTIUM_CLOCK -#endif - -#ifdef PENTIUM_CLOCK -/****************************************************************************** -** This is modified version of keys.c that checks also work of GrKeyPressed() -** and measures time spent in this procedure (at first set divider to clock -** frequency of Your CPU (I have 90MHz): gcc -DPENTIUM_CLOCK=90. -** A.Pavenis (pavenis@acad.latnet.lv) -******************* Some time measurements stuff *************************** -** Macrodefinition RDTSC reads Pentium CPU timestamp counter. It is counting -** CPU clocks. Attempt to use it under 386 or 486 will cause an invalid -** instruction -*/ -#define RDTSC(h,l) __asm__ ("rdtsc" : "=a"(l) , "=d"(h)) -inline long rdtsc(void) { long h,l; RDTSC(h,l); return l; } -/* ***************************************************************************/ -#endif /* PENTIUM_CLOCK */ - -#ifdef __DJGPP__ -#include -#include -#else -extern int getch(void); -extern int getkey(void); -extern int kbhit(void); -#endif - -#define ISPRINT(k) (((unsigned int)(k)) <= 255 && isprint(k)) - -typedef struct { GrKeyType key; - char *name; } KeyEntry; - -static KeyEntry Keys[] = { - { GrKey_NoKey , "GrKey_NoKey" }, - { GrKey_OutsideValidRange , "GrKey_OutsideValidRange" }, - { GrKey_Control_A , "GrKey_Control_A" }, - { GrKey_Control_B , "GrKey_Control_B" }, - { GrKey_Control_C , "GrKey_Control_C" }, - { GrKey_Control_D , "GrKey_Control_D" }, - { GrKey_Control_E , "GrKey_Control_E" }, - { GrKey_Control_F , "GrKey_Control_F" }, - { GrKey_Control_G , "GrKey_Control_G" }, - { GrKey_Control_H , "GrKey_Control_H" }, - { GrKey_Control_I , "GrKey_Control_I" }, - { GrKey_Control_J , "GrKey_Control_J" }, - { GrKey_Control_K , "GrKey_Control_K" }, - { GrKey_Control_L , "GrKey_Control_L" }, - { GrKey_Control_M , "GrKey_Control_M" }, - { GrKey_Control_N , "GrKey_Control_N" }, - { GrKey_Control_O , "GrKey_Control_O" }, - { GrKey_Control_P , "GrKey_Control_P" }, - { GrKey_Control_Q , "GrKey_Control_Q" }, - { GrKey_Control_R , "GrKey_Control_R" }, - { GrKey_Control_S , "GrKey_Control_S" }, - { GrKey_Control_T , "GrKey_Control_T" }, - { GrKey_Control_U , "GrKey_Control_U" }, - { GrKey_Control_V , "GrKey_Control_V" }, - { GrKey_Control_W , "GrKey_Control_W" }, - { GrKey_Control_X , "GrKey_Control_X" }, - { GrKey_Control_Y , "GrKey_Control_Y" }, - { GrKey_Control_Z , "GrKey_Control_Z" }, - { GrKey_Control_LBracket , "GrKey_Control_LBracket" }, - { GrKey_Control_BackSlash , "GrKey_Control_BackSlash" }, - { GrKey_Control_RBracket , "GrKey_Control_RBracket" }, - { GrKey_Control_Caret , "GrKey_Control_Caret" }, - { GrKey_Control_Underscore , "GrKey_Control_Underscore" }, - { GrKey_Space , "GrKey_Space" }, - { GrKey_ExclamationPoint , "GrKey_ExclamationPoint" }, - { GrKey_DoubleQuote , "GrKey_DoubleQuote" }, - { GrKey_Hash , "GrKey_Hash" }, - { GrKey_Dollar , "GrKey_Dollar" }, - { GrKey_Percent , "GrKey_Percent" }, - { GrKey_Ampersand , "GrKey_Ampersand" }, - { GrKey_Quote , "GrKey_Quote" }, - { GrKey_LParen , "GrKey_LParen" }, - { GrKey_RParen , "GrKey_RParen" }, - { GrKey_Star , "GrKey_Star" }, - { GrKey_Plus , "GrKey_Plus" }, - { GrKey_Comma , "GrKey_Comma" }, - { GrKey_Dash , "GrKey_Dash" }, - { GrKey_Period , "GrKey_Period" }, - { GrKey_Slash , "GrKey_Slash" }, - { GrKey_0 , "GrKey_0" }, - { GrKey_1 , "GrKey_1" }, - { GrKey_2 , "GrKey_2" }, - { GrKey_3 , "GrKey_3" }, - { GrKey_4 , "GrKey_4" }, - { GrKey_5 , "GrKey_5" }, - { GrKey_6 , "GrKey_6" }, - { GrKey_7 , "GrKey_7" }, - { GrKey_8 , "GrKey_8" }, - { GrKey_9 , "GrKey_9" }, - { GrKey_Colon , "GrKey_Colon" }, - { GrKey_SemiColon , "GrKey_SemiColon" }, - { GrKey_LAngle , "GrKey_LAngle" }, - { GrKey_Equals , "GrKey_Equals" }, - { GrKey_RAngle , "GrKey_RAngle" }, - { GrKey_QuestionMark , "GrKey_QuestionMark" }, - { GrKey_At , "GrKey_At" }, - { GrKey_A , "GrKey_A" }, - { GrKey_B , "GrKey_B" }, - { GrKey_C , "GrKey_C" }, - { GrKey_D , "GrKey_D" }, - { GrKey_E , "GrKey_E" }, - { GrKey_F , "GrKey_F" }, - { GrKey_G , "GrKey_G" }, - { GrKey_H , "GrKey_H" }, - { GrKey_I , "GrKey_I" }, - { GrKey_J , "GrKey_J" }, - { GrKey_K , "GrKey_K" }, - { GrKey_L , "GrKey_L" }, - { GrKey_M , "GrKey_M" }, - { GrKey_N , "GrKey_N" }, - { GrKey_O , "GrKey_O" }, - { GrKey_P , "GrKey_P" }, - { GrKey_Q , "GrKey_Q" }, - { GrKey_R , "GrKey_R" }, - { GrKey_S , "GrKey_S" }, - { GrKey_T , "GrKey_T" }, - { GrKey_U , "GrKey_U" }, - { GrKey_V , "GrKey_V" }, - { GrKey_W , "GrKey_W" }, - { GrKey_X , "GrKey_X" }, - { GrKey_Y , "GrKey_Y" }, - { GrKey_Z , "GrKey_Z" }, - { GrKey_LBracket , "GrKey_LBracket" }, - { GrKey_BackSlash , "GrKey_BackSlash" }, - { GrKey_RBracket , "GrKey_RBracket" }, - { GrKey_Caret , "GrKey_Caret" }, - { GrKey_UnderScore , "GrKey_UnderScore" }, - { GrKey_BackQuote , "GrKey_BackQuote" }, - { GrKey_a , "GrKey_a" }, - { GrKey_b , "GrKey_b" }, - { GrKey_c , "GrKey_c" }, - { GrKey_d , "GrKey_d" }, - { GrKey_e , "GrKey_e" }, - { GrKey_f , "GrKey_f" }, - { GrKey_g , "GrKey_g" }, - { GrKey_h , "GrKey_h" }, - { GrKey_i , "GrKey_i" }, - { GrKey_j , "GrKey_j" }, - { GrKey_k , "GrKey_k" }, - { GrKey_l , "GrKey_l" }, - { GrKey_m , "GrKey_m" }, - { GrKey_n , "GrKey_n" }, - { GrKey_o , "GrKey_o" }, - { GrKey_p , "GrKey_p" }, - { GrKey_q , "GrKey_q" }, - { GrKey_r , "GrKey_r" }, - { GrKey_s , "GrKey_s" }, - { GrKey_t , "GrKey_t" }, - { GrKey_u , "GrKey_u" }, - { GrKey_v , "GrKey_v" }, - { GrKey_w , "GrKey_w" }, - { GrKey_x , "GrKey_x" }, - { GrKey_y , "GrKey_y" }, - { GrKey_z , "GrKey_z" }, - { GrKey_LBrace , "GrKey_LBrace" }, - { GrKey_Pipe , "GrKey_Pipe" }, - { GrKey_RBrace , "GrKey_RBrace" }, - { GrKey_Tilde , "GrKey_Tilde" }, - { GrKey_Control_Backspace , "GrKey_Control_Backspace" }, - { GrKey_Alt_Escape , "GrKey_Alt_Escape" }, - { GrKey_Control_At , "GrKey_Control_At" }, - { GrKey_Alt_Backspace , "GrKey_Alt_Backspace" }, - { GrKey_BackTab , "GrKey_BackTab" }, - { GrKey_Alt_Q , "GrKey_Alt_Q" }, - { GrKey_Alt_W , "GrKey_Alt_W" }, - { GrKey_Alt_E , "GrKey_Alt_E" }, - { GrKey_Alt_R , "GrKey_Alt_R" }, - { GrKey_Alt_T , "GrKey_Alt_T" }, - { GrKey_Alt_Y , "GrKey_Alt_Y" }, - { GrKey_Alt_U , "GrKey_Alt_U" }, - { GrKey_Alt_I , "GrKey_Alt_I" }, - { GrKey_Alt_O , "GrKey_Alt_O" }, - { GrKey_Alt_P , "GrKey_Alt_P" }, - { GrKey_Alt_LBracket , "GrKey_Alt_LBracket" }, - { GrKey_Alt_RBracket , "GrKey_Alt_RBracket" }, - { GrKey_Alt_Return , "GrKey_Alt_Return" }, - { GrKey_Alt_A , "GrKey_Alt_A" }, - { GrKey_Alt_S , "GrKey_Alt_S" }, - { GrKey_Alt_D , "GrKey_Alt_D" }, - { GrKey_Alt_F , "GrKey_Alt_F" }, - { GrKey_Alt_G , "GrKey_Alt_G" }, - { GrKey_Alt_H , "GrKey_Alt_H" }, - { GrKey_Alt_J , "GrKey_Alt_J" }, - { GrKey_Alt_K , "GrKey_Alt_K" }, - { GrKey_Alt_L , "GrKey_Alt_L" }, - { GrKey_Alt_Semicolon , "GrKey_Alt_Semicolon" }, - { GrKey_Alt_Quote , "GrKey_Alt_Quote" }, - { GrKey_Alt_Backquote , "GrKey_Alt_Backquote" }, - { GrKey_Alt_Backslash , "GrKey_Alt_Backslash" }, - { GrKey_Alt_Z , "GrKey_Alt_Z" }, - { GrKey_Alt_X , "GrKey_Alt_X" }, - { GrKey_Alt_C , "GrKey_Alt_C" }, - { GrKey_Alt_V , "GrKey_Alt_V" }, - { GrKey_Alt_B , "GrKey_Alt_B" }, - { GrKey_Alt_N , "GrKey_Alt_N" }, - { GrKey_Alt_M , "GrKey_Alt_M" }, - { GrKey_Alt_Comma , "GrKey_Alt_Comma" }, - { GrKey_Alt_Period , "GrKey_Alt_Period" }, - { GrKey_Alt_Slash , "GrKey_Alt_Slash" }, - { GrKey_Alt_KPStar , "GrKey_Alt_KPStar" }, - { GrKey_F1 , "GrKey_F1" }, - { GrKey_F2 , "GrKey_F2" }, - { GrKey_F3 , "GrKey_F3" }, - { GrKey_F4 , "GrKey_F4" }, - { GrKey_F5 , "GrKey_F5" }, - { GrKey_F6 , "GrKey_F6" }, - { GrKey_F7 , "GrKey_F7" }, - { GrKey_F8 , "GrKey_F8" }, - { GrKey_F9 , "GrKey_F9" }, - { GrKey_F10 , "GrKey_F10" }, - { GrKey_Home , "GrKey_Home" }, - { GrKey_Up , "GrKey_Up" }, - { GrKey_PageUp , "GrKey_PageUp" }, - { GrKey_Alt_KPMinus , "GrKey_Alt_KPMinus" }, - { GrKey_Left , "GrKey_Left" }, - { GrKey_Center , "GrKey_Center" }, - { GrKey_Right , "GrKey_Right" }, - { GrKey_Alt_KPPlus , "GrKey_Alt_KPPlus" }, - { GrKey_End , "GrKey_End" }, - { GrKey_Down , "GrKey_Down" }, - { GrKey_PageDown , "GrKey_PageDown" }, - { GrKey_Insert , "GrKey_Insert" }, - { GrKey_Delete , "GrKey_Delete" }, - { GrKey_Shift_F1 , "GrKey_Shift_F1" }, - { GrKey_Shift_F2 , "GrKey_Shift_F2" }, - { GrKey_Shift_F3 , "GrKey_Shift_F3" }, - { GrKey_Shift_F4 , "GrKey_Shift_F4" }, - { GrKey_Shift_F5 , "GrKey_Shift_F5" }, - { GrKey_Shift_F6 , "GrKey_Shift_F6" }, - { GrKey_Shift_F7 , "GrKey_Shift_F7" }, - { GrKey_Shift_F8 , "GrKey_Shift_F8" }, - { GrKey_Shift_F9 , "GrKey_Shift_F9" }, - { GrKey_Shift_F10 , "GrKey_Shift_F10" }, - { GrKey_Control_F1 , "GrKey_Control_F1" }, - { GrKey_Control_F2 , "GrKey_Control_F2" }, - { GrKey_Control_F3 , "GrKey_Control_F3" }, - { GrKey_Control_F4 , "GrKey_Control_F4" }, - { GrKey_Control_F5 , "GrKey_Control_F5" }, - { GrKey_Control_F6 , "GrKey_Control_F6" }, - { GrKey_Control_F7 , "GrKey_Control_F7" }, - { GrKey_Control_F8 , "GrKey_Control_F8" }, - { GrKey_Control_F9 , "GrKey_Control_F9" }, - { GrKey_Control_F10 , "GrKey_Control_F10" }, - { GrKey_Alt_F1 , "GrKey_Alt_F1" }, - { GrKey_Alt_F2 , "GrKey_Alt_F2" }, - { GrKey_Alt_F3 , "GrKey_Alt_F3" }, - { GrKey_Alt_F4 , "GrKey_Alt_F4" }, - { GrKey_Alt_F5 , "GrKey_Alt_F5" }, - { GrKey_Alt_F6 , "GrKey_Alt_F6" }, - { GrKey_Alt_F7 , "GrKey_Alt_F7" }, - { GrKey_Alt_F8 , "GrKey_Alt_F8" }, - { GrKey_Alt_F9 , "GrKey_Alt_F9" }, - { GrKey_Alt_F10 , "GrKey_Alt_F10" }, - { GrKey_Control_Print , "GrKey_Control_Print" }, - { GrKey_Control_Left , "GrKey_Control_Left" }, - { GrKey_Control_Right , "GrKey_Control_Right" }, - { GrKey_Control_End , "GrKey_Control_End" }, - { GrKey_Control_PageDown , "GrKey_Control_PageDown" }, - { GrKey_Control_Home , "GrKey_Control_Home" }, - { GrKey_Alt_1 , "GrKey_Alt_1" }, - { GrKey_Alt_2 , "GrKey_Alt_2" }, - { GrKey_Alt_3 , "GrKey_Alt_3" }, - { GrKey_Alt_4 , "GrKey_Alt_4" }, - { GrKey_Alt_5 , "GrKey_Alt_5" }, - { GrKey_Alt_6 , "GrKey_Alt_6" }, - { GrKey_Alt_7 , "GrKey_Alt_7" }, - { GrKey_Alt_8 , "GrKey_Alt_8" }, - { GrKey_Alt_9 , "GrKey_Alt_9" }, - { GrKey_Alt_0 , "GrKey_Alt_0" }, - { GrKey_Alt_Dash , "GrKey_Alt_Dash" }, - { GrKey_Alt_Equals , "GrKey_Alt_Equals" }, - { GrKey_Control_PageUp , "GrKey_Control_PageUp" }, - { GrKey_F11 , "GrKey_F11" }, - { GrKey_F12 , "GrKey_F12" }, - { GrKey_Shift_F11 , "GrKey_Shift_F11" }, - { GrKey_Shift_F12 , "GrKey_Shift_F12" }, - { GrKey_Control_F11 , "GrKey_Control_F11" }, - { GrKey_Control_F12 , "GrKey_Control_F12" }, - { GrKey_Alt_F11 , "GrKey_Alt_F11" }, - { GrKey_Alt_F12 , "GrKey_Alt_F12" }, - { GrKey_Control_Up , "GrKey_Control_Up" }, - { GrKey_Control_KPDash , "GrKey_Control_KPDash" }, - { GrKey_Control_Center , "GrKey_Control_Center" }, - { GrKey_Control_KPPlus , "GrKey_Control_KPPlus" }, - { GrKey_Control_Down , "GrKey_Control_Down" }, - { GrKey_Control_Insert , "GrKey_Control_Insert" }, - { GrKey_Control_Delete , "GrKey_Control_Delete" }, - { GrKey_Control_Tab , "GrKey_Control_Tab" }, - { GrKey_Control_KPSlash , "GrKey_Control_KPSlash" }, - { GrKey_Control_KPStar , "GrKey_Control_KPStar" }, - { GrKey_Alt_KPSlash , "GrKey_Alt_KPSlash" }, - { GrKey_Alt_Tab , "GrKey_Alt_Tab" }, - { GrKey_Alt_Enter , "GrKey_Alt_Enter" }, - { GrKey_Alt_LAngle , "GrKey_Alt_LAngle" }, - { GrKey_Alt_RAngle , "GrKey_Alt_RAngle" }, - { GrKey_Alt_At , "GrKey_Alt_At" }, - { GrKey_Alt_LBrace , "GrKey_Alt_LBrace" }, - { GrKey_Alt_Pipe , "GrKey_Alt_Pipe" }, - { GrKey_Alt_RBrace , "GrKey_Alt_RBrace" }, - { GrKey_Print , "GrKey_Print" }, - { GrKey_Shift_Insert , "GrKey_Shift_Insert" }, - { GrKey_Shift_Home , "GrKey_Shift_Home" }, - { GrKey_Shift_End , "GrKey_Shift_End" }, - { GrKey_Shift_PageUp , "GrKey_Shift_PageUp" }, - { GrKey_Shift_PageDown , "GrKey_Shift_PageDown" }, - { GrKey_Alt_Up , "GrKey_Alt_Up" }, - { GrKey_Alt_Left , "GrKey_Alt_Left" }, - { GrKey_Alt_Center , "GrKey_Alt_Center" }, - { GrKey_Alt_Right , "GrKey_Alt_Right" }, - { GrKey_Alt_Down , "GrKey_Alt_Down" }, - { GrKey_Alt_Insert , "GrKey_Alt_Insert" }, - { GrKey_Alt_Delete , "GrKey_Alt_Delete" }, - { GrKey_Alt_Home , "GrKey_Alt_Home" }, - { GrKey_Alt_End , "GrKey_Alt_End" }, - { GrKey_Alt_PageUp , "GrKey_Alt_PageUp" }, - { GrKey_Alt_PageDown , "GrKey_Alt_PageDown" }, - { GrKey_Shift_Up , "GrKey_Shift_Up" }, - { GrKey_Shift_Down , "GrKey_Shift_Down" }, - { GrKey_Shift_Right , "GrKey_Shift_Right" }, - { GrKey_Shift_Left , "GrKey_Shift_Left" } -}; - -#define KEYS (sizeof(Keys)/sizeof(Keys[0])) - -static GrTextOption opt; -static int curx = 0, cury = 0; - -static void gputc(int c) -{ - if(c == '\n' || curx + GrCharWidth(c, &opt) > GrSizeX()) { - cury += GrCharHeight('A', &opt); - curx = 0; - if(cury + GrCharHeight('A', &opt) > GrSizeY()) { - GrClearScreen(opt.txo_bgcolor.v); - cury = 0; - } - } - - if(c != '\n') { - GrDrawChar(c, curx, cury, &opt); - curx += GrCharWidth(c, &opt); - } -} - -static void gprintf(const char *format, ...) -{ - va_list ap; - char buffer[0x100], *s; - - va_start(ap, format); - vsprintf(buffer, format, ap); - va_end(ap); - - for(s = buffer; *s; s++) gputc(*s); -} - -TESTFUNC(keys) { - int spaces_count = 0; - KeyEntry *kp; - GrKeyType k; - int ok; - - opt.txo_font = &GrFont_PC8x16; - opt.txo_fgcolor.v = GrWhite(); - opt.txo_bgcolor.v = GrBlack(); - opt.txo_chrtype = GR_BYTE_TEXT; - opt.txo_direct = GR_TEXT_RIGHT; - opt.txo_xalign = GR_ALIGN_LEFT; - opt.txo_yalign = GR_ALIGN_TOP; - - gprintf("\n\n Checking GrKey... style interface" - "\n Type 3 spaces to quit the test\n\n"); - while (spaces_count < 3) { -#ifdef PENTIUM_CLOCK - int keyPressed=0; - do - { - static double old_tm = -1.0; - double tm; - unsigned s,e; - s = rdtsc(); - keyPressed = GrKeyPressed(); - e = rdtsc(); - tm = ((double) (e-s))/(1000.0*PENTIUM_CLOCK); - if (fabs(tm-old_tm) > 0.01) { - gprintf ("%5.2f ",tm); - fflush (stdout); - old_tm = tm; - } - } while (!keyPressed); -#endif /* PENTIUM_CLOCK */ - k = GrKeyRead(); - if (k == ' ') ++spaces_count; else spaces_count = 0; - - ok = 0; - for ( kp = Keys; kp < &Keys[KEYS]; ++kp ) { - if (k == kp->key) { - gprintf("code 0x%04x symbol %s\n", (unsigned)k, kp->name); - ok = 1; - break; - } - } - if (!ok) - gprintf("code 0x%04x symbol UNKNOWN\n", (unsigned)k); - } - - gprintf("\n\n Now checking getch()" - "\n Type 3 spaces to quit the test\n\n"); - spaces_count = 0; - while (spaces_count < 3) { - k = getch(); - if (k == ' ') ++spaces_count; else spaces_count = 0; - - gprintf("code 0x%02x char ", (unsigned)k); - if (ISPRINT(k)) - gprintf("'%c'\n", (char)k); - else - gprintf("not printable\n"); - - } - - gprintf("\n\n Now checking getkey()" - "\n Type 3 spaces to quit the test\n\n"); - spaces_count = 0; - while (spaces_count < 3) { - k = getkey(); - if (k == ' ') ++spaces_count; else spaces_count = 0; - - gprintf("code 0x%04x char ", (unsigned)k); - if (ISPRINT(k)) - gprintf("'%c'\n", (char)k); - else - gprintf("not printable\n"); - } -} diff --git a/thirdparty/grx249/test/life.c b/thirdparty/grx249/test/life.c deleted file mode 100644 index 95feca5..0000000 --- a/thirdparty/grx249/test/life.c +++ /dev/null @@ -1,112 +0,0 @@ -/** - ** life.c ---- Conway's life program - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" -#include "rand.h" - -#include -#include -#include - -TESTFUNC(life) -{ - int W = GrSizeX(); - int H = GrSizeY(); - char **map[2],**old,**cur; - int *xp,*xn,*yp,*yn; - int which,x,y,gen; - GrColor c[2]; - long thresh; - for(which = 0; which < 2; which++) { - cur = malloc(H * sizeof(char *)); - if(!cur) return; - map[which] = cur; - for(y = 0; y < H; y++) { - cur[y] = malloc(W); - if(!cur[y]) return; - } - } - xp = malloc(W * sizeof(int)); - xn = malloc(W * sizeof(int)); - yp = malloc(H * sizeof(int)); - yn = malloc(H * sizeof(int)); - if(!xp || !xn || !yp || !yn) return; - for(x = 0; x < W; x++) { - xp[x] = (x + W - 1) % W; - xn[x] = (x + W + 1) % W; - } - for(y = 0; y < H; y++) { - yp[y] = (y + H - 1) % H; - yn[y] = (y + H + 1) % H; - } - c[0] = GrBlack(); - c[1] = GrWhite(); - which = 0; - old = map[which]; - cur = map[1 - which]; - SRND((int)time(NULL)); - for(y = 0; y < H; y++) { - for(x = 0; x < W; x++) { - int ii = RND() % 53; - while(--ii >= 0) RND(); - old[y][x] = (((RND() % 131) > 107) ? 1 : 0); - GrPlotNC(x,y,c[(int)old[y][x]]); - } - } - thresh = (((unsigned long)RND() << 16) + RND()) % 1003567UL; - gen = (Argc > 0) ? 1 : 0; - do { - for(y = 0; y < H; y++) { - char *prow = old[yp[y]]; - char *crow = old[y]; - char *nrow = old[yn[y]]; - char *curr = cur[y]; - for(x = 0; x < W; x++) { - int xprev = xp[x]; - int xnext = xn[x]; - char live = prow[xprev] + - prow[x] + - prow[xnext] + - crow[xprev] + - crow[xnext] + - nrow[xprev] + - nrow[x] + - nrow[xnext]; - live = ((live | crow[x]) == 3) ? 1 : 0; - if(--thresh <= 0) { - live ^= gen; - thresh = (((unsigned long)RND() << 16) + RND()) % 1483567UL; - } - curr[x] = live; - } - } - for(y = 0; y < H; y++) { - char *curr = cur[y]; - char *oldr = old[y]; - for(x = 0; x < W; x++) { - if(curr[x] != oldr[x]) GrPlotNC(x,y,c[(int)curr[x]]); - } - } - which = 1 - which; - old = map[which]; - cur = map[1 - which]; - } while(!GrKeyPressed()); - while(GrKeyPressed()) GrKeyRead(); -} - diff --git a/thirdparty/grx249/test/linetest.c b/thirdparty/grx249/test/linetest.c deleted file mode 100644 index c32b4d7..0000000 --- a/thirdparty/grx249/test/linetest.c +++ /dev/null @@ -1,67 +0,0 @@ -/** - ** linetest.c ---- test wide and patterned lines - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" - -TESTFUNC(test1) -{ - GrLineOption o1,o2,o3,o4; - int i; - for(i = 0; i < 2; i++) { - o1.lno_color = GrAllocColor(255,0,0); - o1.lno_width = 1; - o1.lno_pattlen = 4 * i; - o1.lno_dashpat = "\5\5\24\24"; - o2.lno_color = GrAllocColor(255,255,0); - o2.lno_width = 2; - o2.lno_pattlen = 6 * i; - o2.lno_dashpat = "\5\5\24\24\2\2"; - o3.lno_color = GrAllocColor(0,255,255); - o3.lno_width = 30; - o3.lno_pattlen = 8 * i; - o3.lno_dashpat = "\5\5\24\24\2\2\40\40"; - o4.lno_color = GrAllocColor(255,0,255); - o4.lno_width = 4; - o4.lno_pattlen = 6 * i; - o4.lno_dashpat = "\2\2\2\2\10\10"; - GrClearScreen(GrBlack()); - GrCustomLine(10,10,100,100,&o1); - GrCustomLine(10,50,100,140,&o1); - GrCustomLine(10,90,100,180,&o1); - GrCustomLine(110,10,200,100,&o2); - GrCustomLine(110,50,200,140,&o2); - GrCustomLine(110,90,200,180,&o2); - GrCustomLine(210,10,300,100,&o3); - GrCustomLine(210,50,300,140,&o3); - GrCustomLine(210,90,300,180,&o3); - GrCustomLine(20,300,600,300,&o4); - GrCustomLine(20,320,600,340,&o4); - GrCustomLine(20,380,600,360,&o4); - GrCustomLine(400,100,400,300,&o4); - GrCustomLine(420,100,440,300,&o4); - GrCustomLine(480,100,460,300,&o4); - GrCustomLine(600,200,500,300,&o4); - GrKeyRead(); - GrClearScreen(GrBlack()); - GrCustomBox(50,50,550,350,&o3); - GrCustomCircle(300,200,50,&o2); - GrKeyRead(); - } -} - diff --git a/thirdparty/grx249/test/makefile.bcc b/thirdparty/grx249/test/makefile.bcc deleted file mode 100644 index 5df14c4..0000000 --- a/thirdparty/grx249/test/makefile.bcc +++ /dev/null @@ -1,51 +0,0 @@ -# -# GRX 2.0 test programs makefile for Turbo C. Uses Turbo C make. -# -.AUTODEPEND - -!include "../makedefs.bcc" - -INCDIR= -I../include -I$(BCCROOT)\include -LIBDIR= -L$(BCCROOT)/lib - -GRX20ST = ../lib/$(GRX_LIB_SUBDIR)/grx20$(MODEL).lib - -PROGS= \ - arctest.exe \ - blittest.exe \ - circtest.exe \ - cliptest.exe \ - colorops.exe \ - curstest.exe \ - fontdemo.exe \ - fonttest.exe \ - imgtest.exe \ - life.exe \ - linetest.exe \ - mousetst.exe \ - pcirctst.exe \ - pnmtest.exe \ - polytest.exe \ - rgbtest.exe \ - sbctest.exe \ - scroltst.exe \ - spdtst16.exe \ - textpatt.exe \ - winclip.exe \ - wintest.exe - -all: $(PROGS) - -clean: - if exist *.obj del *.obj - if exist *.exe del *.exe - -spdtst16.exe: speedtst.obj - $(BCC) $(LIBDIR) $(LDOPT) -n. -espdtst16 speedtst.obj $(GRX20ST) - -.obj.exe: - $(BCC) $(LIBDIR) $(LDOPT) -n. -e$* $*.obj $(GRX20ST) - -.c.obj: - $(BCC) -c $(CCOPT) $(INCDIR) -o$*.obj $*.c - diff --git a/thirdparty/grx249/test/makefile.dj2 b/thirdparty/grx249/test/makefile.dj2 deleted file mode 100644 index 5a35e04..0000000 --- a/thirdparty/grx249/test/makefile.dj2 +++ /dev/null @@ -1,87 +0,0 @@ -# -# GRX test programs makefile for DJGPP v2. -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean install uninstall - -GRXVDJ2=y - -include ../makedefs.grx - -INCDIR= -I../include -GRX20 = ../lib/$(GRX_LIB_SUBDIR)/libgrx20.a - -ADDON_LIBS=-lpc -ifeq ($(HAVE_LIBTIFF),y) - ADDON_LIBS += -ltiff -endif - -ifeq ($(HAVE_LIBJPEG),y) - ADDON_LIBS += -ljpeg -endif - -ifeq ($(HAVE_LIBPNG),y) - ADDON_LIBS += -lpng -endif - -ifeq ($(NEED_ZLIB),y) - ADDON_LIBS += -lz -endif - -LIBS= $(GRX20) $(ADDON_LIBS) - -PROGS= arctest.exe \ - bb1test.exe \ - blittest.exe \ - circtest.exe \ - cliptest.exe \ - colorops.exe \ - curstest.exe \ - fontdemo.exe \ - fonttest.exe \ - imgtest.exe \ - jpgtest.exe \ - keys.exe \ - life.exe \ - linetest.exe \ - memtest.exe \ - mousetst.exe \ - pcirctst.exe \ - pnmtest.exe \ - pngtest.exe \ - polytest.exe \ - rgbtest.exe \ - sbctest.exe \ - scroltst.exe \ - speedtst.exe \ - textpatt.exe \ - winclip.exe \ - wintest.exe - -all: $(PROGS) demogrx.exe - -demogrx.exe: demogrx.o gfaz.o $(GRX20) - $(CC) $(LDOPT) -o demogrx.exe demogrx.o gfaz.o $(LIBS) -lm - -$(PROGS): %.exe : %.o $(GRX20) - $(CC) $(LDOPT) -o $*.exe $*.o $(LIBS) -lm - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c - -clean: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f *.o *.exe -else - if exist *.o del *.o - if exist *.exe del *.exe -endif - -depend.new: - $(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:.exe=.c) >depend.new - -include depend.gnu diff --git a/thirdparty/grx249/test/makefile.lnx b/thirdparty/grx249/test/makefile.lnx deleted file mode 100644 index edcd46f..0000000 --- a/thirdparty/grx249/test/makefile.lnx +++ /dev/null @@ -1,113 +0,0 @@ -# -# GRX test programs makefile for LINUX/console. Uses GNU make. -# -.PHONY : clean setsuid - -GRXVLNX=y - -include ../makedefs.grx - -INCDIR= -I../include - -CCOPT += -pipe - -# Enable this line for static linked test progs (default) -GRX20 = ../lib/$(GRX_LIB_SUBDIR)/libgrx20.a -# or this if you've already installed the shared libs -#GRX20 = -L../lib/$(GRX_LIB_SUBDIR) -lgrx20 - -ifeq ($(SET_SUIDROOT),y) -EXECBITS = 4755 -else -EXECBITS = 0755 -endif - -ADDON_LIBS = - -ifeq ($(USE_SVGALIB_DRIVER),y) - ADDON_LIBS += -lvga -endif - -ifeq ($(HAVE_LIBTIFF),y) - ADDON_LIBS += -ltiff -endif - -ifeq ($(HAVE_LIBJPEG),y) - ADDON_LIBS += -ljpeg -endif - -ifeq ($(HAVE_LIBPNG),y) - ADDON_LIBS += -lpng -endif - -ifeq ($(NEED_ZLIB),y) - ADDON_LIBS += -lz -endif - -LIBS= $(GRX20) $(ADDON_LIBS) -lm - -PROGS= arctest \ - bb1test \ - blittest \ - circtest \ - cliptest \ - colorops \ - curstest \ - fontdemo \ - fonttest \ - imgtest \ - jpgtest \ - keys \ - life \ - linetest \ - memtest \ - mousetst \ - pcirctst \ - pnmtest \ - pngtest \ - polytest \ - rgbtest \ - sbctest \ - scroltst \ - speedtst \ - textpatt \ - winclip \ - wintest - -all: $(PROGS) demogrx - -demogrx: demogrx.o gfaz.o $(GRX20) - $(CC) $(LDOPT) -o demogrx demogrx.o gfaz.o $(LIBS) - chmod $(EXECBITS) demogrx - -$(PROGS): % : %.o $(GRX20) - -clean: - rm -f *.o $(PROGS) demogrx - -setsuid: $(PROGS) demogrx -ifeq ($(SET_SUIDROOT),y) - chown root $(PROGS) demogrx - chmod $(EXECBITS) $(PROGS) demogrx -else - @echo "Nothing to do, SET_SUIDROOT is not set to 'y' in makedefs.grx" -endif - -.o: - $(CC) $(LDOPT) -o $* $*.o $(LIBS) - chmod $(EXECBITS) $* - -.oo: - $(CC) $(LDOPT) -o $* $*.o $(LIBS) - $(STRIP) $* - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c - -depend.new: - $(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:=.c) >depend.new - -include depend.gnu diff --git a/thirdparty/grx249/test/makefile.sdl b/thirdparty/grx249/test/makefile.sdl deleted file mode 100644 index 108c9ea..0000000 --- a/thirdparty/grx249/test/makefile.sdl +++ /dev/null @@ -1,96 +0,0 @@ -# -# GRX test programs makefile for SDL. Uses GNU make. -# -.PHONY : clean - -GRXVSDL=y - -include ../makedefs.grx - -INCDIR= -I. -I../include - -GRX20ST = ../lib/$(GRX_LIB_SUBDIR)/libgrx20S.a - -ifeq ($(EP),x) - INCDIR += $(X11INCS) - SDLDEFS = -D__XWIN__ - SDLLIBS = -lSDL -lpthread $(X11LIBS) -else - EX = .exe - SDLDEFS = - SDLLIBS = -lSDL -endif - -ifeq ($(HAVE_LIBTIFF),y) - ADDON_LIBS += -ltiff -endif - -ifeq ($(HAVE_LIBJPEG),y) - ADDON_LIBS += -ljpeg -endif - -ifeq ($(HAVE_LIBPNG),y) - ADDON_LIBS += -lpng -endif - -ifeq ($(NEED_ZLIB),y) - ADDON_LIBS += -lz -endif - -LIBS= $(GRX20ST) $(ADDON_LIBS) $(SDLLIBS) -lm - -CCOPT += $(SDLDEFS) - -PROGS= $(EP)arctest$(EX) \ - $(EP)bb1test$(EX) \ - $(EP)blittest$(EX) \ - $(EP)circtest$(EX) \ - $(EP)cliptest$(EX) \ - $(EP)colorops$(EX) \ - $(EP)curstest$(EX) \ - $(EP)fontdemo$(EX) \ - $(EP)fonttest$(EX) \ - $(EP)imgtest$(EX) \ - $(EP)jpgtest$(EX) \ - $(EP)keys$(EX) \ - $(EP)linetest$(EX) \ - $(EP)mousetst$(EX) \ - $(EP)pcirctst$(EX) \ - $(EP)pnmtest$(EX) \ - $(EP)pngtest$(EX) \ - $(EP)polytest$(EX) \ - $(EP)rgbtest$(EX) \ - $(EP)sbctest$(EX) \ - $(EP)scroltst$(EX) \ - $(EP)textpatt$(EX) \ - $(EP)winclip$(EX) \ - $(EP)wintest$(EX) \ - $(EP)fswwtest$(EX) - -all: $(PROGS) $(EP)demogrx$(EX) $(EP)speedtst$(EX) $(EP)memtest$(EX) - -$(EP)demogrx$(EX): demogrx.o gfaz.o $(GRX20ST) - $(CC) $(LDOPT) -o $(EP)demogrx$(EX) demogrx.o gfaz.o $(LIBS) - -$(EP)speedtst$(EX): speedtst.o $(GRX20ST) - $(CC) $(LDOPT) -o $(EP)speedtst$(EX) speedtst.o $(LIBS) - -$(EP)memtest$(EX): memtest.o $(GRX20ST) - $(CC) $(LDOPT) -o $(EP)memtest$(EX) memtest.o $(LIBS) - -$(PROGS): $(EP)%$(EX) : %.o $(GRX20ST) - $(CC) $(LDOPT) -o $@ $*.o $(LIBS) - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c - -clean: - rm -f *.o $(PROGS) $(EP)demogrx$(EX) $(EP)speedtst$(EX) $(EP)memtest$(EX) - -depend.new: - $(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:$(EP)%$(EX)=%.c) >depend.new - -include depend.gnu diff --git a/thirdparty/grx249/test/makefile.w32 b/thirdparty/grx249/test/makefile.w32 deleted file mode 100644 index 044953d..0000000 --- a/thirdparty/grx249/test/makefile.w32 +++ /dev/null @@ -1,97 +0,0 @@ -# -# GRX test programs makefile for Mingw -# Uses GNU make. -# -.SUFFIXES: .exe -.PHONY: clean install uninstall - -GRXVW32=y - -include ../makedefs.grx - -INCDIR= -I../include -GRX20 = ../lib/$(GRX_LIB_SUBDIR)/libgrx20.a - -ifeq ($(HAVE_LIBTIFF),y) - ADDON_LIBS += -ltiff -endif - -ifeq ($(HAVE_LIBJPEG),y) - ADDON_LIBS += -ljpeg -endif - -ifeq ($(HAVE_LIBPNG),y) - ADDON_LIBS += -lpng -endif - -ifeq ($(NEED_ZLIB),y) - ADDON_LIBS += -lz -endif - -LIBS= $(GRX20) $(ADDON_LIBS) - -PROGS= arctest.exe \ - bb1test.exe \ - blittest.exe \ - circtest.exe \ - cliptest.exe \ - colorops.exe \ - curstest.exe \ - fontdemo.exe \ - fonttest.exe \ - imgtest.exe \ - jpgtest.exe \ - keys.exe \ - life.exe \ - linetest.exe \ - mousetst.exe \ - pcirctst.exe \ - pnmtest.exe \ - pngtest.exe \ - rgbtest.exe \ - sbctest.exe \ - scroltst.exe \ - textpatt.exe \ - winclip.exe \ - wintest.exe - -all: $(PROGS) \ - demogrx.exe \ - speedtst.exe \ - polytest.exe \ - memtest.exe - - -demogrx.exe: demogrx.o gfaz.o $(GRX20) - $(CC) $(LDOPT) -o demogrx.exe demogrx.o gfaz.o $(LIBS) -lm -mwindows - -speedtst.exe: speedtst.o $(GRX20) - $(CC) $(LDOPT) -o speedtst.exe speedtst.o $(LIBS) -lm -mwindows -mconsole - -memtest.exe: memtest.o $(GRX20) - $(CC) $(LDOPT) -o memtest.exe memtest.o $(LIBS) -lm -mwindows -mconsole - -polytest.exe: polytest.o $(GRX20) - $(CC) $(LDOPT) -o polytest.exe polytest.o $(LIBS) -lm -mwindows -mconsole - -$(PROGS): %.exe : %.o $(GRX20) - $(CC) $(LDOPT) -o $*.exe $*.o $(LIBS) -lm -mwindows - -.c.o: - $(CC) -c $(CCOPT) $(INCDIR) $*.c -o $*.o - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c - -clean: -ifeq ($(HAVE_UNIX_TOOLS),y) - rm -f *.o *.exe -else - if exist *.o del *.o - if exist *.exe del *.exe -endif - -depend.new: - $(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:.exe=.c) >depend.new - -include depend.gnu diff --git a/thirdparty/grx249/test/makefile.wat b/thirdparty/grx249/test/makefile.wat deleted file mode 100644 index a73f7e2..0000000 --- a/thirdparty/grx249/test/makefile.wat +++ /dev/null @@ -1,288 +0,0 @@ -!define BLANK "" - -############## -# Object Files - -.\life.obj : .\test\life.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bgilink.obj : .\test\bgilink.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\blittest.obj : .\test\blittest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\circtest.obj : .\test\circtest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\cliptest.obj : .\test\cliptest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\colorops.obj : .\test\colorops.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\curstest.obj : .\test\curstest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fnt2c.obj : .\test\fnt2c.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fnt2text.obj : .\test\fnt2text.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fonttest.obj : .\test\fonttest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\imgtest.obj : .\test\imgtest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\keys.obj : .\test\keys.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\arctest.obj : .\test\arctest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\linetest.obj : .\test\linetest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\modetest.obj : .\test\modetest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\mousetst.obj : .\test\mousetst.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\pcirctst.obj : .\test\pcirctst.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\polytest.obj : .\test\polytest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\rgbtest.obj : .\test\rgbtest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\speedtst.obj : .\test\speedtst.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\textpatt.obj : .\test\textpatt.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\winclip.obj : .\test\winclip.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\wintest.obj : .\test\wintest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\scroltst.obj : .\test\scroltst.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\sbctest.obj : .\test\sbctest.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\bccbgi.obj : .\test\bccbgi.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\colortst.obj : .\test\colortst.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\fontplay.obj : .\test\fontplay.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\small.obj : .\test\small.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\tellipse.obj : .\test\tellipse.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\tfill.obj : .\test\tfill.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\tmodes.obj : .\test\tmodes.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\tpoly.obj : .\test\tpoly.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -.\ttext.obj : .\test\ttext.c .AUTODEPEND - $(CC) $[@ $(CC_OPTS) - -############## -# Executables - -$(GRX_BIN_SUBDIR)\bccbgi.exe : .\bccbgi.obj $(GRXLIB) .AUTODEPEND - @%write bccbgi.lk1 FIL bccbgi.obj - @%append bccbgi.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\bccbgi $(LINK_OPTS) @bccbgi.lk1 - -$(GRX_BIN_SUBDIR)\colortst.exe : .\colortst.obj $(GRXLIB) .AUTODEPEND - @%write colortst.lk1 FIL colortst.obj - @%append colortst.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\ $(LINK_OPTS) @colortst.lk1 - -$(GRX_BIN_SUBDIR)\fontplay.exe : .\fontplay.obj $(GRXLIB) .AUTODEPEND - @%write fontplay.lk1 FIL fontplay.obj - @%append fontplay.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\ $(LINK_OPTS) @fontplay.lk1 - -$(GRX_BIN_SUBDIR)\small.exe : .\small.obj $(GRXLIB) .AUTODEPEND - @%write small.lk1 FIL small.obj - @%append .lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\small $(LINK_OPTS) @small.lk1 - -$(GRX_BIN_SUBDIR)\tellipse.exe : .\tellipse.obj $(GRXLIB) .AUTODEPEND - @%write tellipse.lk1 FIL tellipse.obj - @%append tellipse.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\tellipse $(LINK_OPTS) @tellipse.lk1 - -$(GRX_BIN_SUBDIR)\tfill.exe : .\tfill.obj $(GRXLIB) .AUTODEPEND - @%write tfill.lk1 FIL tfill.obj - @%append tfill.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\tfill $(LINK_OPTS) @tfill.lk1 - -$(GRX_BIN_SUBDIR)\tmodes.exe : .\tmodes.obj $(GRXLIB) .AUTODEPEND - @%write tmodes.lk1 FIL tmodes.obj - @%append tmodes.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\tmodes $(LINK_OPTS) @tmodes.lk1 - -$(GRX_BIN_SUBDIR)\tpoly.exe : .\tpoly.obj $(GRXLIB) .AUTODEPEND - @%write tpoly.lk1 FIL tpoly.obj - @%append tpoly.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\tpoly $(LINK_OPTS) @.tpolylk1 - -$(GRX_BIN_SUBDIR)\ttext.exe : .\ttext.obj $(GRXLIB) .AUTODEPEND - @%write ttext.lk1 FIL ttext.obj - @%append ttext.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\ttext $(LINK_OPTS) @ttext.lk1 - -$(GRX_BIN_SUBDIR)\life.exe : .\life.obj $(GRXLIB) .AUTODEPEND - @%write life.lk1 FIL life.obj - @%append life.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\life $(LINK_OPTS) @life.lk1 - -$(GRX_BIN_SUBDIR)\bgilink.exe : .\bgilink.obj $(GRXLIB) .AUTODEPEND - @%write bgilink.lk1 FIL bgilink.obj - @%append bgilink.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\bgilink $(LINK_OPTS) @bgilink.lk1 - - -$(GRX_BIN_SUBDIR)\blittest.exe : .\blittest.obj $(GRXLIB) .AUTODEPEND - @%write blittest.lk1 FIL blittest.obj - @%append blittest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\blittest $(LINK_OPTS) @blittest.lk1 - - -$(GRX_BIN_SUBDIR)\circtest.exe : .\circtest.obj $(GRXLIB) .AUTODEPEND - @%write circtest.lk1 FIL circtest.obj - @%append circtest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\circtest $(LINK_OPTS) @circtest.lk1 - - -$(GRX_BIN_SUBDIR)\cliptest.exe : .\cliptest.obj $(GRXLIB) .AUTODEPEND - @%write cliptest.lk1 FIL cliptest.obj - @%append cliptest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\cliptest $(LINK_OPTS) @cliptest.lk1 - -$(GRX_BIN_SUBDIR)\colorops.exe : .\colorops.obj $(GRXLIB) .AUTODEPEND - @%write colorops.lk1 FIL colorops.obj - @%append colorops.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\colorops $(LINK_OPTS) @colorops.lk1 - -$(GRX_BIN_SUBDIR)\curstest.exe : .\curstest.obj $(GRXLIB) .AUTODEPEND - @%write curstest.lk1 FIL curstest.obj - @%append curstest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\curstest $(LINK_OPTS) @curstest.lk1 - -$(GRX_BIN_SUBDIR)\fnt2c.exe : .\fnt2c.obj $(GRXLIB) .AUTODEPEND - @%write fnt2c.lk1 FIL fnt2c.obj - @%append fnt2c.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\fnt2c $(LINK_OPTS) @fnt2c.lk1 - -$(GRX_BIN_SUBDIR)\fnt2text.exe : .\fnt2text.obj $(GRXLIB) .AUTODEPEND - @%write fnt2text.lk1 FIL fnt2text.obj - @%append fnt2text.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\fnt2text $(LINK_OPTS) @fnt2text.lk1 - -$(GRX_BIN_SUBDIR)\fonttest.exe : .\fonttest.obj $(GRXLIB) .AUTODEPEND - @%write fonttest.lk1 FIL fonttest.obj - @%append fonttest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\fonttest $(LINK_OPTS) @fonttest.lk1 - -$(GRX_BIN_SUBDIR)\imgtest.exe : .\imgtest.obj $(GRXLIB) .AUTODEPEND - @%write imgtest.lk1 FIL imgtest.obj - @%append imgtest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\imgtest $(LINK_OPTS) @imgtest.lk1 - -$(GRX_BIN_SUBDIR)\keys.exe : .\keys.obj $(GRXLIB) .AUTODEPEND - @%write keys.lk1 FIL keys.obj - @%append keys.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\keys $(LINK_OPTS) @keys.lk1 - -$(GRX_BIN_SUBDIR)\arctest.exe : .\arctest.obj $(GRXLIB) .AUTODEPEND - @%write arctest.lk1 FIL arctest.obj - @%append arctest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\arctest $(LINK_OPTS) @arctest.lk1 - -$(GRX_BIN_SUBDIR)\linetest.exe : .\linetest.obj $(GRXLIB) .AUTODEPEND - @%write linetest.lk1 FIL linetest.obj - @%append linetest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\linetest $(LINK_OPTS) @linetest.lk1 - -$(GRX_BIN_SUBDIR)\modetest.exe : .\modetest.obj $(GRXLIB) .AUTODEPEND - @%write modetest.lk1 FIL modetest.obj - @%append modetest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\modetest $(LINK_OPTS) @modetest.lk1 - -$(GRX_BIN_SUBDIR)\mousetst.exe : .\mousetst.obj $(GRXLIB) .AUTODEPEND - @%write mousetst.lk1 FIL mousetst.obj - @%append mousetst.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\mousetst $(LINK_OPTS) @mousetst.lk1 - -$(GRX_BIN_SUBDIR)\pcirctst.exe : .\pcirctst.obj $(GRXLIB) .AUTODEPEND - @%write pcirctst.lk1 FIL pcirctst.obj - @%append pcirctst.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\pcirctst $(LINK_OPTS) @pcirctst.lk1 - -$(GRX_BIN_SUBDIR)\polytest.exe : .\polytest.obj $(GRXLIB) .AUTODEPEND - @%write polytest.lk1 FIL polytest.obj - @%append polytest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\polytest $(LINK_OPTS) @polytest.lk1 - -$(GRX_BIN_SUBDIR)\rgbtest.exe : .\rgbtest.obj $(GRXLIB) .AUTODEPEND - @%write rgbtest.lk1 FIL rgbtest.obj - @%append rgbtest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\rgbtest $(LINK_OPTS) @rgbtest.lk1 - -$(GRX_BIN_SUBDIR)\speedtst.exe : .\speedtst.obj $(GRXLIB) .AUTODEPEND - @%write speedtst.lk1 FIL speedtst.obj - @%append speedtst.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\speedtst $(LINK_OPTS) @speedtst.lk1 - -$(GRX_BIN_SUBDIR)\sbctest.exe : .\sbctest.obj $(GRXLIB) .AUTODEPEND - @%write sbctest.lk1 FIL sbctest.obj - @%append sbctest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\sbctest $(LINK_OPTS) @sbctest.lk1 - -$(GRX_BIN_SUBDIR)\textpatt.exe : .\textpatt.obj $(GRXLIB) .AUTODEPEND - @%write textpatt.lk1 FIL textpatt.obj - @%append textpatt.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\textpatt $(LINK_OPTS) @textpatt.lk1 - -$(GRX_BIN_SUBDIR)\winclip.exe : .\winclip.obj $(GRXLIB) .AUTODEPEND - @%write winclip.lk1 FIL winclip.obj - @%append winclip.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\winclip $(LINK_OPTS) @winclip.lk1 - -$(GRX_BIN_SUBDIR)\wintest.exe : .\wintest.obj $(GRXLIB) .AUTODEPEND - @%write wintest.lk1 FIL wintest.obj - @%append wintest.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\wintest $(LINK_OPTS) @wintest.lk1 - -$(GRX_BIN_SUBDIR)\scroltst.exe : .\scroltst.obj $(GRXLIB) .AUTODEPEND - @%write scroltst.lk1 FIL scroltst.obj - @%append scroltst.lk1 LIBR $(GRXLIB) - $(LINK) name $(GRX_BIN_SUBDIR)\scroltst $(LINK_OPTS) @scroltst.lk1 - -$(GRX_BIN_SUBDIR)\arctest.dat : .\test\arctest.dat - @copy .\test\arctest.dat $(GRX_BIN_SUBDIR)\arctest.dat - -$(GRX_BIN_SUBDIR)\polytest.dat : .\test\polytest.dat - @copy .\test\polytest.dat $(GRX_BIN_SUBDIR)\polytest.dat diff --git a/thirdparty/grx249/test/makefile.x11 b/thirdparty/grx249/test/makefile.x11 deleted file mode 100644 index ce9e23a..0000000 --- a/thirdparty/grx249/test/makefile.x11 +++ /dev/null @@ -1,108 +0,0 @@ -# -# GRX test programs makefile for LINUX/X11. Uses GNU make. -# -.PHONY : clean setsuid - -GRXVX11=y - -include ../makedefs.grx - -INCDIR= -I../include - -# Enable this line for static linked test progs (default) -GRX20X = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X.a -# or this if you've already installed the shared libs -#GRX20X = -L../lib/$(GRX_LIB_SUBDIR) -lgrx20X - -ifeq ($(SET_XSUIDROOT),y) -EXECBITS = 4755 -else -EXECBITS = 0755 -endif - -ADDON_LIBS= - -ifeq ($(USE_XF86DGA_DRIVER),y) - ADDON_LIBS += -lXxf86dga -lXext -endif - -ifeq ($(HAVE_LIBTIFF),y) - ADDON_LIBS += -ltiff -endif - -ifeq ($(HAVE_LIBJPEG),y) - ADDON_LIBS += -ljpeg -endif - -ifeq ($(HAVE_LIBPNG),y) - ADDON_LIBS += -lpng -endif - -ifeq ($(NEED_ZLIB),y) - ADDON_LIBS += -lz -endif - -LIBS= $(GRX20X) $(ADDON_LIBS) $(X11LIBS) -lm - -PROGS= xarctest \ - xbb1test \ - xblittest \ - xcirctest \ - xcliptest \ - xcolorops \ - xcurstest \ - xfontdemo \ - xfonttest \ - ximgtest \ - xjpgtest \ - xkeys \ - xlife \ - xlinetest \ - xmemtest \ - xmousetst \ - xpcirctst \ - xpnmtest \ - xpngtest \ - xpolytest \ - xrgbtest \ - xsbctest \ - xscroltst \ - xspeedtst \ - xtextpatt \ - xwinclip \ - xwintest - -all: $(PROGS) xdemogrx - -xdemogrx: demogrx.o gfaz.o $(GRX20X) - $(CC) $(LDOPT) -o xdemogrx demogrx.o gfaz.o $(LIBS) - chmod $(EXECBITS) xdemogrx - -$(PROGS): x%: %.o $(GRX20X) - $(CC) $(LDOPT) -o $@ $*.o $(LIBS) - chmod $(EXECBITS) $@ - -$(PROGS:x%=%.o): %.o : %.c - $(CC) -c $(CCOPT) -D__XWIN__ $(INCDIR) $*.c -o $*.o - -.c.o: - $(CC) -c $(CCOPT) -D__XWIN__ $(INCDIR) $*.c - -.c.s: - $(CC) -S $(CCOPT) $(INCDIR) $*.c - -clean: - rm -f *.o $(PROGS) xdemogrx - -setsuid: $(PROGS) xdemogrx -ifeq ($(SET_XSUIDROOT),y) - chown root $(PROGS) xdemogrx - chmod $(EXECBITS) $(PROGS) xdemogrx -else - @echo "Nothing to do, SET_XSUIDROOT is not set to 'y' in makedefs.grx" -endif - -depend.new: - $(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:x%=%.c) > depend.new - -include depend.gnu diff --git a/thirdparty/grx249/test/memtest.c b/thirdparty/grx249/test/memtest.c deleted file mode 100644 index 008af03..0000000 --- a/thirdparty/grx249/test/memtest.c +++ /dev/null @@ -1,67 +0,0 @@ -/** - ** memtest.c ---- test memory driver - ** - ** Copyright (C) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "grx20.h" -#include "drawing.h" - -int main() -{ - int x, y, ww, wh; - GrColor c; - GrContext *w1, *w2, *w3, *w4; - - GrSetDriver( "memory gw 400 gh 400 nc 256" ); - GrSetMode( GR_default_graphics ); - - x = GrSizeX(); - y = GrSizeY(); - ww = (x / 2) - 10; - wh = (y / 2) - 10; - w1 = GrCreateSubContext(5,5,ww+4,wh+4,NULL,NULL); - w2 = GrCreateSubContext(15+ww,5,ww+ww+14,wh+4,NULL,NULL); - w3 = GrCreateSubContext(5,15+wh,ww+4,wh+wh+14,NULL,NULL); - w4 = GrCreateSubContext(15+ww,15+wh,ww+ww+14,wh+wh+14,NULL,NULL); - - GrSetContext(w1); - c = GrAllocColor(200,100,100); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w2); - c = GrAllocColor(100,200,200); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w3); - c = GrAllocColor(200,200,0); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w4); - c = GrAllocColor(0,100,200); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext( NULL ); -// GrSaveBmpImage( "memtest.bmp",NULL,0,0,639,479 ); - GrSaveContextToPpm( NULL,"memtest.ppm","GRX MemTest" ); - - return 0; -} diff --git a/thirdparty/grx249/test/mousetst.c b/thirdparty/grx249/test/mousetst.c deleted file mode 100644 index 508c65a..0000000 --- a/thirdparty/grx249/test/mousetst.c +++ /dev/null @@ -1,113 +0,0 @@ -/** - ** mousetst.c ---- test mouse cursor and mouse/keyboard input - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include -#include "test.h" - -TESTFUNC(mousetest) -{ - GrMouseEvent evt; - GrColor bgc = GrAllocColor(0,0,128); - GrColor fgc = GrAllocColor(255,255,0); - int testmotion = 0; - int ii,mode; - - if(GrMouseDetect()) { - GrMouseEventMode(1); - GrMouseInit(); - GrMouseSetColors(GrAllocColor(255,0,0),GrBlack()); - GrMouseDisplayCursor(); - GrClearScreen(bgc); - ii = 0; - mode = GR_M_CUR_NORMAL; - GrTextXY( - 10,(GrScreenY() - 20), - "Commands: 'N' -- next mouse mode, 'Q' -- exit", - GrWhite(), - bgc - ); - for( ; ; ) { - char msg[200]; - drawing(ii,ii,(GrSizeX() - 20),(GrSizeY() - 20),((fgc ^ bgc) | GrXOR),GrNOCOLOR); - GrMouseGetEventT(GR_M_EVENT,&evt,0L); - if(evt.flags & (GR_M_KEYPRESS | GR_M_BUTTON_CHANGE | testmotion)) { - strcpy(msg,"Got event(s): "); -# define mend (&msg[strlen(msg)]) - if(evt.flags & GR_M_MOTION) strcpy( mend,"[moved] "); - if(evt.flags & GR_M_LEFT_DOWN) strcpy( mend,"[left down] "); - if(evt.flags & GR_M_MIDDLE_DOWN) strcpy( mend,"[middle down] "); - if(evt.flags & GR_M_RIGHT_DOWN) strcpy( mend,"[right down] "); - if(evt.flags & GR_M_P4_DOWN) strcpy( mend,"[p4 down] "); - if(evt.flags & GR_M_P5_DOWN) strcpy( mend,"[p5 down] "); - if(evt.flags & GR_M_LEFT_UP) strcpy( mend,"[left up] "); - if(evt.flags & GR_M_MIDDLE_UP) strcpy( mend,"[middle up] "); - if(evt.flags & GR_M_RIGHT_UP) strcpy( mend,"[right up] "); - if(evt.flags & GR_M_P4_UP) strcpy( mend,"[p4 up] "); - if(evt.flags & GR_M_P5_UP) strcpy( mend,"[p5 up] "); - if(evt.flags & GR_M_KEYPRESS) sprintf(mend,"[key (0x%03x)] ",evt.key); - sprintf(mend,"at X=%d, Y=%d, ",evt.x,evt.y); - sprintf(mend, - "buttons=%c%c%c, ", - (evt.buttons & GR_M_LEFT) ? 'L' : 'l', - (evt.buttons & GR_M_MIDDLE) ? 'M' : 'm', - (evt.buttons & GR_M_RIGHT) ? 'R' : 'r' - ); - sprintf(mend,"deltaT=%ld (ms)",evt.dtime); - strcpy (mend," "); - GrTextXY(10,(GrScreenY() - 40),msg,GrWhite(),bgc); - testmotion = evt.buttons ? GR_M_MOTION : 0; - } - if(evt.flags & GR_M_KEYPRESS) { - int key = evt.key; - if((key == 'Q') || (key == 'q')) break; - if((key != 'N') && (key != 'n')) continue; - GrMouseEraseCursor(); - switch(mode = (mode + 1) & 3) { - case GR_M_CUR_RUBBER: - GrMouseSetCursorMode(GR_M_CUR_RUBBER,evt.x,evt.y,GrWhite() ^ bgc); - break; - case GR_M_CUR_LINE: - GrMouseSetCursorMode(GR_M_CUR_LINE,evt.x,evt.y,GrWhite() ^ bgc); - break; - case GR_M_CUR_BOX: - GrMouseSetCursorMode(GR_M_CUR_BOX,-20,-10,20,10,GrWhite() ^ bgc); - break; - default: - GrMouseSetCursorMode(GR_M_CUR_NORMAL); - break; - } - GrMouseDisplayCursor(); - } - if((ii += 7) > 20) ii -= 20; - } - GrMouseUnInit(); - } else { - GrClearScreen(bgc); - ii = 0; - mode = GR_M_CUR_NORMAL; - GrTextXY( - (GrScreenX()/3),(GrScreenY() - 20), - "Sorry, no mouse found !", - GrWhite(), - bgc - ); - } -} diff --git a/thirdparty/grx249/test/pcirctst.c b/thirdparty/grx249/test/pcirctst.c deleted file mode 100644 index f282ef3..0000000 --- a/thirdparty/grx249/test/pcirctst.c +++ /dev/null @@ -1,109 +0,0 @@ -/** - ** pcirctst.c ---- test custom circle and ellipse rendering - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" -#include - -static int stop = 0; - -static int widths[] = { 1, 2, 5, 10, 20, 50, 0 }; - -static GrLineOption Solid = { 0, 1, 0, NULL }; /* normal solid */ - -static GrLineOption *Patterns[] = { - &Solid, NULL -}; - -void drawellip(int xc,int yc,int xa,int ya,GrColor c1,GrColor c2,GrColor c3) -{ - double ddx = (double)xa; - double ddy = (double)ya; - double R2 = ddx*ddx*ddy*ddy; - double SQ; - int x1,x2,y1,y2; - int dx,dy; - int *wdt, idx; - GrLineOption *l; - - for (idx = 0, l = *Patterns; l != NULL; l = Patterns[++idx]) - for (wdt=widths; *wdt != 0; ++wdt) { - GrClearScreen(GrBlack()); - - GrFilledBox(xc-xa,yc-ya,xc+xa,yc+ya,c1); - dx = xa; - dy = 0; - GrPlot(xc-dx,yc,c3); - GrPlot(xc+dx,yc,c3); - while(++dy <= ya) { - SQ = R2 - (double)dy * (double)dy * ddx * ddx; - dx = (int)(sqrt(SQ)/ddy + 0.5); - x1 = xc - dx; - x2 = xc + dx; - y1 = yc - dy; - y2 = yc + dy; - GrPlot(x1,y1,c3); - GrPlot(x2,y1,c3); - GrPlot(x1,y2,c3); - GrPlot(x2,y2,c3); - } - - l->lno_color = c2; - l->lno_width = *wdt; - GrCustomEllipse(xc,yc,xa,ya,l); - if(GrKeyRead() == 'q') { - stop = 1; - return; - } - } -} - -TESTFUNC(circtest) -{ - int xc,yc; - int xr,yr; - GrColor c1,c2,c3; - - c1 = GrAllocColor(64,64,255); - c2 = GrAllocColor(255,255,64); - c3 = GrAllocColor(255,64,64); - xc = GrSizeX() / 2; - yc = GrSizeY() / 2; - xr = 1; - yr = 1; - while(!stop && ((xr < 1000) || (yr < 1000))) { - drawellip(xc,yc,xr,yr,c1,c2,c3); - xr += xr/4+1; - yr += yr/4+1; - } - xr = 4; - yr = 1; - while(!stop && ((xr < 1000) || (yr < 1000))) { - drawellip(xc,yc,xr,yr,c1,c2,c3); - yr += yr/4+1; - xr = yr * 4; - } - xr = 1; - yr = 4; - while(!stop && ((xr < 1000) || (yr < 1000))) { - drawellip(xc,yc,xr,yr,c1,c2,c3); - xr += xr/4+1; - yr = xr * 4; - } -} - diff --git a/thirdparty/grx249/test/pngcompo.png b/thirdparty/grx249/test/pngcompo.png deleted file mode 100644 index 1c85d44..0000000 --- a/thirdparty/grx249/test/pngcompo.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5b1c7d9d5a2180bc559ccfea2919c65a4d542c502ff23c4e7b5a06721cb65ba7 -size 15787 diff --git a/thirdparty/grx249/test/pngowl.png b/thirdparty/grx249/test/pngowl.png deleted file mode 100644 index 61dca1b..0000000 --- a/thirdparty/grx249/test/pngowl.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0205081fcc0f706836d42aeab0aa3677a0f18ac5d273ae4896c9589534525796 -size 59535 diff --git a/thirdparty/grx249/test/pngred.png b/thirdparty/grx249/test/pngred.png deleted file mode 100644 index 0fed116..0000000 --- a/thirdparty/grx249/test/pngred.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b53d61b233ffd1b4147f89ad91dc8c75140ba0f9a8a390a7fb1972db73579ef4 -size 35945 diff --git a/thirdparty/grx249/test/pngtest.c b/thirdparty/grx249/test/pngtest.c deleted file mode 100644 index b8b3fb1..0000000 --- a/thirdparty/grx249/test/pngtest.c +++ /dev/null @@ -1,107 +0,0 @@ -/** - ** pngtest.c ---- test the ctx2png routines - ** - ** Copyright (c) 2001 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - **/ - -#include -#include -#include "grx20.h" -#include "grxkeys.h" - -void imagen( char *nf ) -{ - GrContext *grc; - int wide, high; - char s[81]; - int w, h; - - GrQueryPng( nf,&w,&h ); - sprintf( s,"%s %dx%d",nf,w,h ); - wide = (w > 300) ? 300 : w; - high = (h > 400) ? 400 : h; - GrClearScreen( GrAllocColor( 0,0,200 ) ); - - GrBox( 10,40,10+wide+1,40+high+1,GrWhite() ); - grc = GrCreateSubContext( 11,41,11+wide-1,41+high-1,NULL,NULL ); - GrLoadContextFromPng( grc,nf,0 ); - GrDestroyContext( grc ); - - GrBox( 320,40,320+wide+1,40+high+1,GrWhite() ); - grc = GrCreateSubContext( 321,41,321+wide-1,41+high-1,NULL,NULL ); - GrLoadContextFromPng( grc,nf,1 ); - GrDestroyContext( grc ); - - GrTextXY( 10,10,s,GrBlack(),GrWhite() ); - GrTextXY( 10,50+high,"Press any key to continue",GrBlack(),GrWhite() ); - GrKeyRead(); -} - -void nopngsupport( void ) -{ - char *s[6] = { - "Warning!", - "You need libpng (http://www.libpng.org/pub/png/libpng.html)", - "and enable png support in the GRX lib (edit makedefs.grx)", - "to run this demo", - " ", - "Press any key to continue..." }; - int i; - - GrClearScreen( GrAllocColor( 0,0,100 ) ); - for( i=0; i<6; i++ ) - GrTextXY( 90,160+i*18,s[i],GrWhite(),GrNOCOLOR ); - GrKeyRead(); -} - - -int main() -{ - GrContext *grc; - - GrSetMode( GR_width_height_bpp_graphics,640,480,24 ); - - if( !GrPngSupport() ){ - nopngsupport(); - GrSetMode(GR_default_text); - exit( 1 ); - } - - imagen( "pngcompo.png" ); - imagen( "pngowl.png" ); - imagen( "pngred.png" ); - - GrClearScreen( GrAllocColor( 0,100,0 ) ); - grc = GrCreateSubContext( 191,121,191+256-1,121+240-1,NULL,NULL ); - GrLoadContextFromPng( grc,"pngred.png",1 ); - GrDestroyContext( grc ); - grc = GrCreateSubContext( 181,241,181+289-1,241+80-1,NULL,NULL ); - GrLoadContextFromPng( grc,"pngcompo.png",1 ); - GrDestroyContext( grc ); - - GrTextXY( 10,10,"Press any key to save screen",GrBlack(),GrWhite() ); - GrKeyRead(); - GrSaveContextToPng( NULL,"output.png" ); - - GrClearScreen( GrBlack() ); - GrTextXY( 10,10,"Press any key to reload screen",GrBlack(),GrWhite() ); - GrKeyRead(); - GrLoadContextFromPng( NULL,"output.png",0 ); - - GrTextXY( 10,10,"Press any key to end ",GrBlack(),GrWhite() ); - GrKeyRead(); - GrSetMode(GR_default_text); - return 0; -} diff --git a/thirdparty/grx249/test/pnmtest.c b/thirdparty/grx249/test/pnmtest.c deleted file mode 100644 index a1cfdff..0000000 --- a/thirdparty/grx249/test/pnmtest.c +++ /dev/null @@ -1,103 +0,0 @@ -/** - ** pnmtest.c ---- test the ctx2pnm routines - ** - ** Copyright (c) 2000 Mariano Alvarez Fernandez - ** [e-mail: malfer@teleline.es] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - **/ - -#include -#include -#include "grx20.h" -#include "grxkeys.h" - -#define FIMAGEPPM "pnmtest.ppm" -#define FIMAGEPBM "pnmtest.pbm" - -#define FIMAGEPGM "prueba.pgm" -#define FIMAGEPBM2 "prueba.pbm" -#define FSCREEN "output.ppm" - -int main(void) -{ - GrContext *grc; - int wide, high, maxval; - char s[81]; - -/* GrSetMode( GR_default_graphics ); */ - GrSetMode( GR_width_height_color_graphics,640,480,32768 ); - GrQueryPnm( FIMAGEPPM, &wide, &high, &maxval ); - sprintf( s,"%s %d x %d pixels",FIMAGEPPM,wide,high ); - GrTextXY( 10,20,s,GrBlack(),GrWhite() ); - GrBox( 10,40,10+wide+1,40+high+1,GrWhite() ); - grc = GrCreateSubContext( 11,41,11+wide-1,41+high-1,NULL,NULL ); - GrLoadContextFromPnm( grc,FIMAGEPPM ); - GrSaveContextToPgm( grc,FIMAGEPGM,"TestPnm" ); - GrDestroyContext( grc ); - GrTextXY( 10,50+high,"Press any key to continue",GrBlack(),GrWhite() ); - GrKeyRead(); - - GrClearScreen( GrBlack() ); - GrQueryPnm( FIMAGEPGM, &wide, &high, &maxval ); - sprintf( s,"%s %d x %d pixels",FIMAGEPGM,wide,high ); - GrTextXY( 10,20,s,GrBlack(),GrWhite() ); - GrBox( 10,40,10+wide+1,40+high+1,GrWhite() ); - grc = GrCreateSubContext( 11,41,11+wide-1,41+high-1,NULL,NULL ); - GrLoadContextFromPnm( grc,FIMAGEPGM ); - GrDestroyContext( grc ); - GrTextXY( 10,50+high,"Press any key to continue",GrBlack(),GrWhite() ); - GrKeyRead(); - - GrClearScreen( GrBlack() ); - GrQueryPnm( FIMAGEPBM, &wide, &high, &maxval ); - sprintf( s,"%s %d x %d pixels",FIMAGEPBM,wide,high ); - GrTextXY( 10,20,s,GrBlack(),GrWhite() ); - GrBox( 10,40,10+wide+1,40+high+1,GrWhite() ); - grc = GrCreateSubContext( 11,41,11+wide-1,41+high-1,NULL,NULL ); - GrLoadContextFromPnm( grc,FIMAGEPBM ); - GrSaveContextToPbm( grc,FIMAGEPBM2,"TestPnm" ); - GrDestroyContext( grc ); - GrTextXY( 10,50+high,"Press any key to continue",GrBlack(),GrWhite() ); - GrKeyRead(); - - GrClearScreen( GrBlack() ); - GrQueryPnm( FIMAGEPPM, &wide, &high, &maxval ); - GrBox( 10,40,10+wide+1,40+high+1,GrWhite() ); - grc = GrCreateSubContext( 11,41,11+wide-1,41+high-1,NULL,NULL ); - GrLoadContextFromPnm( grc,FIMAGEPPM ); - GrDestroyContext( grc ); - GrQueryPnm( FIMAGEPGM, &wide, &high, &maxval ); - GrBox( 110,140,110+wide+1,140+high+1,GrWhite() ); - grc = GrCreateSubContext( 111,141,111+wide-1,141+high-1,NULL,NULL ); - GrLoadContextFromPnm( grc,FIMAGEPGM ); - GrDestroyContext( grc ); - GrQueryPnm( FIMAGEPBM, &wide, &high, &maxval ); - GrBox( 210,240,210+wide+1,240+high+1,GrWhite() ); - grc = GrCreateSubContext( 211,241,211+wide-1,241+high-1,NULL,NULL ); - GrLoadContextFromPnm( grc,FIMAGEPBM2 ); - GrDestroyContext( grc ); - GrTextXY( 10,20,"Press any key to save screen",GrBlack(),GrWhite() ); - GrKeyRead(); - - GrSaveContextToPpm( NULL,FSCREEN,"TestPnm" ); - GrClearScreen( GrWhite() ); - GrTextXY( 10,20,"Press any key to reload screen",GrWhite(),GrBlack() ); - GrKeyRead(); - - GrLoadContextFromPnm( NULL,FSCREEN ); - GrTextXY( 10,20,"Press any key to end ",GrBlack(),GrWhite() ); - GrKeyRead(); - - GrSetMode(GR_default_text); - return 0; -} diff --git a/thirdparty/grx249/test/pnmtest.pbm b/thirdparty/grx249/test/pnmtest.pbm deleted file mode 100644 index 02760f2ac1d2d4f4a1ce193877e590735b4e08c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5088 zcmeI#y=vS*5C`!8FrWn^ORXRxmq(c75-ji$zd{~Ck03~MMab=uLX9D9ia=gvA#iRM z`xO*iq)Bmb%@soOtj@yVHiesA5QzOr!)o+3^XdKh*}J8@d3*8U{0wo#4E%QnQg_Hx zIrKhXrQS2AawYvT_bx<^7?Tj6g!nqdZ$kVq#=k@SMaDWI7E7@xjFs`rwg(~q)9~{S zKP_mU!gK7knPI#(qjj63r|tM>pf3NN`SD21?QJwL4sr?J^Enf_C&XYc3~DNO1|&B}1_Q zwfrNgUp*l!RwiHt{?-=Hv0EpyvHrp`-IiH6^X7;tEQ8$FOg5dr>J0kygoC2hC4;TD zeAwg5K0%*p@$cbsKY+ty>&1122_<2m9?BT>t<8 diff --git a/thirdparty/grx249/test/pnmtest.ppm b/thirdparty/grx249/test/pnmtest.ppm deleted file mode 100644 index 9d81ce2..0000000 --- a/thirdparty/grx249/test/pnmtest.ppm +++ /dev/null @@ -1,4 +0,0 @@ -P6 -227 149 -255 -0/-0/-10.21/51.51.62/62/83/83/:3-:3-:3-:3-:3-:3-:2/91.91.80-80-91.91.:2/80-80-80-80-80-80-80-80-6.+6.+6.+5-*5-*4,)4,)4,)4,)4,)4,)4,)4,)4,)4,)2-)/*$/,%/,%0-&1.'2/(30)30)63,63,74-85.85.96/:70:7.A:0B<0D>2F@4IA4JB5KC6KC6MD5MD5OC3NB2OC3OC3PD4RE5R?1Y?2b@4nB5}E6‹H8™G9£F7¯G:¸G9¾E:ÅG;ÇG>ÊG?ËH@ÐE@çFLíCLëDKëEIîCIïBDñ>Bô=Aø;A÷:@ô:?ð×?<ËA7»=/µ@.µ@.´?-´?-³@-²?-¯@-­@,ªA,¦A-¢B,Ÿ@*›A)˜@*–A,”>-’?/’?/‘>.‘>,=+’<+’<+”?+”?+”=*”=*”=*•>+–?,–@/–?6•>5—=2Ÿ?1©B3³D3¼D4¿D4¹?0µA2¬F8žH;‡H9oA2T8*C3&=5295495473271160050-50-72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-5,-4+,4*+3)*7(+=.1E69P:0U?1^A3jC4xD6„E4’E5œC3§C4¯A4µA4¼B7ÀD:ÄE<ÅF=ÍC@áEIçBIèCIêDHíDGïBDó@Cö?Cø;A÷:@ô:?ðÕ@<Ê@6¹>/µ@.´?-´?-´?-²?,°?-¯@-­@,©@+¦A-¡A+Ÿ@*›A)˜@*–A,”>-’?/‘>.‘>.‘>,=+’<+’<+”?+“>*”=*”=*”=*•>+–?,–@/”@5•>5˜>3 >1«A3µD4½C4¿D5»A2·C6¬F8œI;…G:l@3S9*B4)>63:6595484382271161.61.72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-3--5,-4*+3)*5)+<-0C47N8:d>=vEA†JINLšTV¤aj¥l}rŽ‘{¢†€®…¹{„»ou©[[QHuOCiOFeOG_PH_RN_[Yfnotƒ‡ˆ”™•™ž—š ”™‘ƒ~ojkY][LVSJXSZVRaXQa/.,/.,0/-10.40-40-51.51.72.72.72.72.92,92,92,92,91.80.7/-7/-7/-7/-80.91/80.80.80.80.80.80.80.80.6.,5-+5-+5-+4,*4,*4,*4,*5-+5-+5-+5-+5-+5-+5-+3.*2-'1.'2/(30)30)41*41*52+63,63,63,74-85.96/96/:7.?8.@:.B<0D>2G?4H@5H@3H@3I@1I@1K?1K?1K?/L@0MA1NB2MA1QA1YB2dC2qC3|C2‡B2’A0˜<- :+§;.¯=2µ@6ºD:¿F=ÅD>ÙCEá@FãBGçBFêDFðCEôADø?Dú;@ù:?õ;@ð=@è@@ÜA=Ñ@;Æ@5·=.³@-³@-²?,²?-°?-¯>,­@,ª?-§@-¥@,¡A+A,š?*˜@*•@+”>-‘>.‘>.‘>.=+=+=+=+‘>,‘>,’<+’<+“=,“=,”?+•?.•A6–?5š>3£>2¯A4¹C5¿D5ÁC5ÀD8¸F;®I=™J=G;h@4Q:,B5,?74=77<66:4494183072/72/62/62/62/51.52-41,41,21,.0-,1-.0-.0-//-//-0/-2.-5//4..5,-4*+4*+9-/>24I56[97l?9|E@†IDOM˜[`›fv”mˆŒwžƒ}­}‚¹u~·fm¤TV‰MEvLAkMAeOFcQHcMH^NK\[[eqty…‰ˆ‡Œ†Šˆ…†Š|xzlfiXZ[MVSLZU[ZT`[S`.-+/.,/.,0/-3/,40-40-40-61-61-61-61-81+81+81+81+7/-7/-6.,6.,6.,6.,7/-7/-80.80.80.80.80.80.80.80.5-+5-+5-+4,*4,*4,*3+)3+)6.,6.,6.,6.,6.,6.,6.,4/,30+30)30)41*41*52+52+52+52+52+63,74-85.85.96/96->7-?9-@:.B<0E=2E=2F>1F>1G=1G>/H<.I=/I=/J>.L@0JA0KD2NE4UD4^D3iD2sB1~A/†?-Œ9)”9'9*£<-¬@3³E8¸H<ÁF>ÒDCÚACÞBCâDCçCDìBCó@C÷?Aú;@ù:?õ;@î>@åA@ÚB=Í@9Â@3µ=-°@,°@,°@,¯>,®?,®?,¬?+©@-¦?,£@+ @*œ@+˜@*–@)”?*‘>,‘>.‘>.=-=+=+<*<*=+=+<*<*’<+‘>,”>-’?-•A6–?5œ>2¦@4²B6¼C8ÁC7ÂB7ÂF<ºJ?¬L@—K>|F:b@4L:.A7-@85>96=77<74:5294183083062/62/62/32.52-21,21,12--2.-2./1./1.00.00.10.10.5106005//5,-4+,6,-:01D22T71c;3qA7{E;‚HD‰RU_l‹i‚ƒs˜}y«x}µowµ`f¢QR‹LEyL@pL@hPEgQFfLC^GBVMLZ^^fjnquyxx}wz€vwzokoa`bTWYLTTL]WY]V]]V^------.-+/.,0/-10.3/,40-3/,3/,4/+4/+4/+4/+6/)6/)4/,4/,3.+3.+3.+3.+4/,4/,50-50-50-50-50-50-50-50-3.+3.+2-*2-*2-*1,)1,)1,)4/,4/,4/,4/,4/,4/,4/,4/,41,41,41,41,41,52-52-52-52-52-63.63.74/85096196/<5-=6,?8.@9/B:/C;0C;0C;.D:.D:.F:.G;-H<.I=/J>0I@1JG6MH5RG5YF5bE3jD1uB/}>,‚;)‹:)“:*š=,£B2¬F8²J=»I?ÌGBÔDCØDBÝEBâBBéAAð=@ô<>ù:?ø:<ô<>í?>áB>ÓC:ÅA5¹?0²?-®?,®?,®?,­>-¬>-¬>-ª?-¨>.¤?- ?,ž?+š?,—?+•>*“>*‘>,?.>->->-Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,<,>-‘>.?.”B4—A4@1¨@3¶A7¿C9ÅB8ÄA7¾C;·H?¦LCJ@tE;Z>2E9-<5+@93@85?75>63=52<4194083/62/43/43/23.32.12-12-02--2.,2.-2.-2./1./1.00.10.3205105104..2,,4+,7./=/.N5.Y9.e=1n@3sB;yKK€Zeƒg€p—zxªu{·ks´_d¦TT”OGƒLBwNAmNBhMAeJA`GBYGFXKKWMPU]cc`fbbia`f\Z`TW[MUXMXXP^YV`WX`WZ,,,,,,.-+.-+/.,0/-3/,3/,2.+2.+3.*3.*3.*3.*5.(5-*3.+3.+2-*1,)1,)2-*3.+3.+3.+3.+3.+3.+3.+3.+3.+3.+2-*2-*2-*2-*1,)1,)1,)0+(3.+3.+3.+3.+3.+3.+3.+3.+41,41,41,41,41,41,41,41,41,52-52-63.74/85085085.;4,<5+=6,>7-@7.A9.A9.A9.C9/C9-E9-F:.G;/H<.J>0HA1JG6IH6NG5VF6\E3dC2n@0v>-{<+‚;)Œ;*”=,œ@1£F5ªJ:´J=ÄH@ÌEAÑFAÖE@ÞCAä@>ì>?ñ:<÷;<ô:;ð<=é@=ÜC=ÍC8¾@2±>,®?,«@,ª?+ª?+ª?-©>,©>,¨?,¥>-¢?, ?,›>,—?+•>*“>)‘?*>+>->->-Ž=,Ž=,Ž=,<+Ž=,‹<+<+‹<+‹<-Œ=,>/Ž?.”B4—A2 @2¬B5¹C9ÂC:ÅB:ÂA;ºA9±I@£NGNEoG=S?4A;/96-@93A75?74>63<4194083/74/43/43/34/23.23.02-02-.3--3/-3/.3/.3/02/02/11/11/21/32032040/2.-1-,4..8.,G4-O4)X8+`<0e?6mGFyYd‚k…€uŸ||²w|¼nu»dh¯[[¡RMLB~OArL@hI=cH>`HB^ECX@BO;@FBGJDMJJQJJQIIQFKQEOUIVWO^YS`YS`XU++++++,,,---/.,/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-)2-*2,,1++1++1++1++2,,2,,1++1++1++1++1++1++1++1++2,,2,,2,,1++1++1++0**0**3--3--3--3--3--3--3--3.+41,41,41,30+30+30+30+30+41,41,52-63.74/74/85085.:3+;4,<5-=6.?6/?6-?6-?7,B8.B8.E8/E9-G;/H<0J>2H@3HE6GF4KE5QD4XC2_B2f?.n=,v=,|:*…9)Œ;*“=.›B2¢F7¬F8»F<ÂF>ÉF>ÐE>ÙD@âC?ê@@ð>>ò::ñ;:ì<<äA<ÖC;ÆD6µ@/ª=)ª?-©@-©@-¨?,¨>.¨>.§=-¥>-£=. ?.ž?-š?-–?,“>*‘?*>)>+>->-Œ=,Œ=.Œ=.‹<-‹<-‹<-Š=-Š;,‰<,Š.‹=0Œ?/’C2˜B1¡A1®B6¼C:ÂC<ÄC=ÀC=¹FA²QJ¥XRXQsRIWI>CC793@72>71=60:5/94.83/63.43.43.34/13.13..3-.3-.3--3/-3/-3/-3/.3/.3/02/02/00.11/22021/0/-/.,2.-4/,?0+D0)K3)T8-Z<4dFFu]jƒs‰€«…„¾~ƒÇtzÆmp½ce¯VSšLC‚K?qI_FB]DBW?AN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êBAæDAÚE>ÈD8·B1ªA.¢B,¢A.¡@-¢?,¢>.¡=-¡=-¢>. ?/œ<,š=,˜<-•>-“=,=+Ž=*Œ>*‹<+‹<+Š=-‰<,‰<,‰<,ˆ:-‡;-‰=/†3ˆ@2‰A5‹A4‘E5—D4£E9±I>ºG@»D>»EA¸MG´ZR¯f_£qf‘sh~rdjj^V^SIQFLLBJF=B>5<8/95,74+63,33+43.34.14-14-02-/1,,1+,1+-2.-2.-2.-2./1./1./1./1.02/02/11/11/11/11/11/40/4+0;/3A32C4/J;6]OOymy‹…Ÿ“»”–ϕك‰ÓtzÆjn·_b§Z[”LItHBdA>]>>X?BUAIVLU\U`bbqnn}xv†|rulyoguh_k_W_P]\Hb\Fc]G,-/,-/,-/,-/------.,-.-+/.,.-+0,)0,)/+(/+(/+(/+(.*).*).*).*)/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+0,+1-,1-,1-,1-,1-,1-,1-,1-,1-,1-,0,+0,)1-*2.+3/,3/,2.+2.+2.+2.+2.+2.+3/,40-51.62/80.91.:2/;4.=4/>50>50=4-?4.?4.A4.B5-C6.E80G:2H;3H>5H>5L=6O>6Q=4V;2Z90_7/h70p7.w7-9-‰9.<1–<1›=1¢@3§A3¬B5´D8¾E:ÉF<ÔE=ÛD=ßD@àE@ÞFAÔG>ÄF8²C2¥B-žB-ŸC.žB-Ÿ@.ž?-ž?-ž?-ž>.ž>.š=,™>,–=-”=,=+>+Œ>*Œ=,‹<+Š=+‰<,‰<,‰<,‡;+‡;-…<-†2†@6‡A7ˆB6“G9—E7£G<¯J@¸IB¸GA·LF³TN±d\ªqfŸ~oo|mmseZfZNXMLNAKI=EC7@=4=:188.44,11)23-23-03,/2+/1,.0+.0+.0+/1.-2./1./1./1./1./1./1.02/02/11/11/11/11/11/2015+49-7<23?53H?:^VTxr|Šˆž““¹”—Ê–Ô„‹ÏyÂqy¸kt­hnž\_€XZqSUjRWjT^hZgmfvvr‚tˆ~’‡ƒ•‰~Žv†yr€qfteZeT[ZE`Z@b\D,-/,-/,-/,-/,-/,.-------.-+.-+.-+-,*/+(.*'.*'.*',+),*+,*+,*++)*+)*+)*+)*-+,-+,-+,-+,-+,-+,-+,-+,,*+,*+-+,-+,-+,.,-.,-.,-.,-.,-.,-/-./-./-./-./.,0,+0,+1-,2.-2.-2.-2.-1-,1-,1-,1-,1-,2.-3/.40/51.80.91.:2/;30=31=4/=4/=4/?40?4.A4.A4.C60D71F93G:4H;5J;6K<7N=6P;6S:5V72[6.c60k6.t5,}7/‡9/;0”<0–<1?3 @4¢@3¨@3±C6ºD8ÅE:ÍD:ÕF@×H@ÔIBÌI?¾E:®C3¡B.œA.B/œA.œ?.›>-›>-›>-›>/›?0˜<-–=-”<.“=.>-Œ=,‹<+Š=+‰<*‰<*‰<,‡;+‡;-…<-„:-ƒ;-„<0‚<0‚<2‚>3ƒ?4…A8‡C:ˆD9”J=—H; H>¬KD²KF³LG²SM®`V­sg¦qŒz‘Ž{‚‰ws€ocqbXcUNRDMN@HI;DD8@@49;.46+/1&01)01)/0*/0*./*./*//-//-//-.0-//-//-//-//-//-//-00.00.00.00.00.00.00.1/26+97+98/4;63HE>_^Yzz|‹š”±’—¿•Ç„ŽÃ}‰»{‰¶|‹²}Œ«}ˆšwƒq~‡n}‚n~~o‚~yŽ…ƒ™‹¡”‘¨˜¥”ˆŠƒ–ƒ|{j{i\hTXX@]Y<_[@-.0-.0-.0-.0-.0-.0.......-+.-+-,*-,*.*'.*'.*'.*),*++)*+)*+)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+-+,-+,-+,-+,.,-.,-.,-.,-/-./-./-./+*0,+1-,1-,1-,1-,0,+0,+0,+0,+0,+0,+1-,2.-3/.40/91/:20;31<41=31=31=31=4/>3/>3/@2/@3-A4.C60D71E82F93H94I:5J;6L:6N94Q83T50^72e60o6/x8/‚90Š:/<1”>1™?4›?4›?2Ÿ?1¥A2®B5¸D7¿E:ÇG>ËH@ÊJAÃI>¶F:ªB5žA0™@.™A-™A-˜?-—>,—>,™>,™=.—>.•<,”=,“=.=-Ž=,Š=+Š=-‰<,ˆ;)ˆ;)‡;+‡;+„;,„;,ƒ;-€;,;/€<1€<1>5ƒ@7ƒC:‡D<ˆE<”L@–H<žG>§JC®LI®QL­]Vªj^§€o¡yšš‚›ƒ†•€z‹xm{jbm]SZJQUFKO@EI:@D6;=057,13(01)/0(./).-(.-).-)/.,0/-/.,/.,/.,/.,/.,..,/.,..,0/-//-0/-//-//-//-//-2-17,:6*83-1961HJ?bfX{€z‹““£–°Œ•¶ƒ²¯…™²¤¶’¨³“¨«¤£Œ ž‡ž˜‚™}˜‰œ‹ˆ£”°š˜±›”­—‹£…›„’|k|iXfOSV;ZV9^Z=+/2+/2+/2+/2-.0-.0......------.-+-,*-,*,+),+),+),*+,*+,*++)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*++)*+)*+)*,*+-+,-+,.,-.,-/-./-./-./+*0,+0,+0,+0,+0,+/+*.*)/+*/+*/+*/+*0,+1-,3/.40/901:20;31<42=32=31<20<20=20=2.?1.?1.@2/A30B5/C60D63C84D95E:6G96H94K84N50X72_60i70r7/}:1†<1Œ>2>2—@6—?5—?5—?3œ@3£C5«C6³E8ºE;½G=¾H>¹G=°D8¦A5›?0—@/—@-—@-–?.•>-”=,•<,–=/–=/•<.“;-’0->0-?1.@2/A4.?4.@51@72@93A:4B94C84F74H5/Q51X5/a6/l8-u9.€0‹=1“?5•>5“?5“?4•B4šB4 C4¥D4¬B5°D8´E:±E;ªB7¡?4š>1–>0•?.”?+“=,“=,“<+“<+”<.”<.“;-’<-<.;-Š;,‰<,‡;+‡;+†:*†:*…9)ƒ:)ƒ:+9*9-9-€<1<3?6€A8‚C<…F?ˆIBŠICŽJAG>—HCŸNJ§VR§`Z©pe¤ƒrœ”}–¡ƒ¨Šˆ§ˆƒ „~–~yˆup{jdp\]iSR^JJS@BK:>E5:@29<134,22*1.)/,'/))0**1++2,,1++1++1++1++1++0,+0,+0,+1-,1-,1-,1-,/.,/.,/.,2,.8*75(13+(56&EK1\gGu‚d†“yޛБž”Ÿš‹ž˜¥——´ž¢Å¥©Î­¥É­¦Ê°§Ë±¤È¬—¾Ÿ‹³‘ˆ°²Ž²Ž²¬Š„¡‚€™{wŽrdx]Q_ENR7QQ5SR6,03,03,03,03./1./1./1./1/////////////.,/.,.-+.-+/-..,-.,--+,,*++)*+)**()+)*+)*+)*+)*+)*+)*+)*+)*+)*+)*+)**()*()*())'()'(+)*+)*,*+-+,.,-.,-/-./-./+*/+*/+*/+*/+*.*)-)(,('0,+0,+0,+0,+1-,2.-40/40/:12;23;23<34=32<21<21;10<1/<1/>0/=/.>0->0-?1.>3/=60;60;83<94=:5>93@72C60G4.O4+Y4+d5+n8,x:-;.…;.<4‘<5>3@3A2“B1—A2™@0 >1¦@4ªB7ªB9¥@6Ÿ>5—=2•?2’?-’?-‘>,=+‘;*‘;*’<-’<-‘;.‘;.Ž;-;-Š;.ˆ:-†:,„;,…9)…9)ƒ:)‚9(‚9*9*~8,~8,€<1€=4€@7B9„E>…IAˆKFŒMFŒIAŽH@˜JF¡SO¨]X©hb©{n¤Žy™œ’§†‰¬‹‚ªˆ€¡„™€~‹wxnjxadr[ZhQQ]IITCCL;>D60-?1.=2.=4-=6.;819919:29:2;81?6/C2+J1,T2)^3*g7+o9-u=.z2¢B6¡C7žB7™?4–>2”>1”>/“=.=-<,Ž=,Œ=,Œ=.>/Ž<.Ž<.‹2>5€@6‚C:ƒG=…JB‡NE‹OGŒICŽID“PJ˜\Tžg`uiž‡už˜€”¡…ª‰‰¬‹ƒ¨‡€¡„~›zytˆoi}bby]\pUUgOO\HGRAAH8=A388.85.7/,3+)2()2()3)*4*+0*,/+*0*,0**0*,0*,2),2),3*-1+-1+-1+-0,-0,-0,-1+/4)/4*+4-%46!?F%T`8m|Qg‰™tžz¡~ˆ¡zЧ{‘¶‚›ÄˆŸËŸÉ™žÇÆš˜Á•Œ·Š‚­€…®‚Œµ‰„«‰®…‰©‚~œxvolƒfZnSJZ?GM3FJ1DF./0+.0+/0+01,01,01,12-21-32.43/43/62/51.41,3/,4/,50-50-4/,3.+2,,1-,0,+0,+.,-.,---/--/,,.++-*).))+.)/.)-/(/.)-/)-.)-.*+.*+/+*/+*-,*.-)--+-.)./*./*------.,-/-./.,0/-2.+2.+2-*4,)5-*6.+8/*:1,:1*;2+=4-=4->50>50>50=4/<3.;2-=2.<1-<1/;0.=/.>0/>0/@1.A0)@2);4*77-39-28.56.:3-?-)F*'L)'S*&Z/(`5,d<0k@0yA0@/†A1‹B3@3“=0“;/’8-“;/“=.”A1•B2”C2’A0‘>.‘;,—;0—:2’;1Œ=0ˆ?0„?/‚?.ƒ>.ˆ@1ˆ?0Š>1Š<0‰;/ˆ:.†:-ƒ;-{9+~@3w<.q7)w>-w>-v;-}?2{;/‚@4‡E9‰I?ˆLA†MB„PC‡NE‘KI—SP”bY‘paŒ}j‰‰q‰–|Šž‚¤‡¦‰Ž§Š§Œ‡¤ˆ~Ÿ‚uš{o—uiib„_[zXZsUZnSWeNPWEJK=C?6@93;0.6**3')3'+3'+1&*,*-)+***,*(),'+.(,1(-2'-3(.3(.3(02(00)10)1/*1/*0/)-1++0-(//#5,>5,>5.>5.>5.=4-<3.<3.=2.<1-;0.;0.=/.=/.>0/@1.C0*C0)A2+>4+:6-95,:3-<1-?-+D*)I*(N+'T/)Z5-_:1e>/pA/xA-€A0ˆ@2?4‘=3“:2“;19.‹.Œ@0A1A1ŽA/‘?1•;2•;2<2‹=0†>0ƒ@/?/‚?.…@1†>/‰=0ˆ<.‡;.„;,‚:,€;,x8,x<1s9-n9+s>.s>.r8*u:,}=1ƒA5‰E:‹I=‰K@†NA„PC‡NE‘JH—SR’f]Œwf„†p€“wž„¥†ˆ§ˆ§Š§§Š¤‰Ÿƒwœ}o˜ve’i`‹`Y‚ZY{X\wXZnSSaJNUCFH;C@7<737/-3*+2)*1(+.(*,*+**,+),+),-(,/)-2(02(02(02(02(10)1/*1-*3-*3-*12-12.-0,)--%8:,SXBox]€‹i‡–o†™l†žnˆ£p†¤p„¥pŠ­w“¶€™¹‡–¶„“³Œ®{†«x‚¨w‚¨yƒ¨|ƒ¦|‚¤{x’uqˆnh{eYjWMZHEL<@D5;=/12,12,12,12,23-23-43.43.54/54/85085085074/72.61-80-80-7/,6.+4/,3.+2,,1-,1-./-.0.1/-0--/,,.+*/+)./(/1'//)-/)-/)-/)-.*+.*+0,+0,+/.*/.*/.)0/*0/*0/+//-///0./0./0/-/.,1-*2-*6.+70*90+:1*<1+=3*>4+?5,?6-?6-@7.@7.?6/>5.=4-=4-=2.<1-;0.;0.;0.;0.<1/?1.C2+E0+H/+K--L,/K+.I*/E+.A-,@.*A.(E.(M.)X1*b3-g5,j:,o;-w;0=4‡<6Œ<5:4:4Š<2‡=2†>2…?3†A2‰A3ŒB5C5Ž?2=/Œ>1Š>.‡>/…>,†=.ˆ<,‰;.‰<,ˆ:-†:*ƒ;,<)~=+{<+}=1z<1v:/u;/x@1x@1v<.v;-?5‚B8‰F=‹H?‰JA‡KA‡NCŠNF‘JH˜TQ–f\ve‡…n‚‘t{¤ƒ…¨‡ˆª‰ªŒ©ŒŽ¥‰ˆŸƒš}y˜xi–ma’e\‹a\†`]‚`[|]UrVPhPFYEBP?:D93:2.3,*/)*,)**(0'(1&*1&*1&*0'*1(+0*.0+//*.-+.,+0+,0)-0(-1(-1)-01/23/..*'**"57*PUAmv[|Ši€k~“j™jƒŸn€ n~ m€¥q‡¬x¯|‹­zˆªx„©v§v§u¦w¦y¤y€¢}}›yw‘tp‡mh|cYkUMZHDH9=?299-23-23-34.34.34.45/54/54/650761961:72:72961940940:2/91.91.80-50-4/,4..4..3/03/01/01/20.1..0--/-+.0)02).0*.0*.0*.0*,/+,/+*1-,1-,0/+0/+10+10+10+10,11/1111/010.10.2.+3.+3.*92,92,;2+<3,>4+@6-@6-A7.B8/A8/B90A8/A81@70>5.>5.=2.=2.<1/;0.;0.<1/=20=2.B3.E2.L..R+0V'/U&.P'/I).C/.<1+;2)?2)G0(R/)_.*d/)i9/k;/u<3}<6…;8‰;9Š;7ˆ:6‰>8†@8†B9…B9…C7†B7‡A7‰A5ˆ@1ˆA/‡@.‡@.‡>-ˆ<,ˆ;+‰:+Š8*ˆ9*‡:*ƒ:)<){=(x>(x>*‚>1{7.z7.z<1v;-w=/|A3{@2€B7ƒE:†H=ˆJ?†J@‡MBˆODŠQHŒSJŽ\QŽh[‹tb…g€‹m~–vž|ƒ§ƒ„©‡‡ª‰‹ªŠ‹¦‡‡ ‚ƒš~}˜yq•oi”ifgfŒeg‹gd†e_~_Zw[PhPK^JBP?8D62:/.4*,/(+*%2&&5%(4%(2&(1'(/)+/+,.,-+++*+-*+-(,-(,/',/',/*+-.*+1++0+'.+"88,PUAiqYv„c{Œhyh|–iœl}Ÿmyžkz m¥r‚§t€¥q}£p}£p}¥s~¥v~¥x}¤x|¡x}Ÿzz™wuqn‡je|bWkRN[GDF9?=1:8,45/45/45/560560560761761872872;83<94<94<94<73<73<41<41;30;3083072/61.61.5106216213122011/00./1-.2,04+.4+.4+.2,.2,,2,,2,,3/.3/,3/,3/,21,21,32-32.32032032032051051.61.61-;4.<5/=4-?6-A7.B8/E8/C9/D:1D:1E;2D:1C90B8/@5/@5/>3/>3/=2.=2.=20=20>31>31@51E31M02T,4X)3W(2R)1K,1B30:6-77+:6*B4)M2)X/)^/)f:1j;3s<7z=:‚<:†<;‡;;†::‚;7>8A8B9ƒC:ƒC:…@9„@7‚C2‚C1ƒB0„?/†=.ˆ<.‰:-‹9-‰7+‡8+…9+‚:+~=+x>*v?*x>*9-|/'‚8/„>4w4+s5*}A6}C7E:€G<‚I>ƒJ?„KB†MD‡QG…WJ|aNzjQ€pYu]‚|bƒ†i†“uˆ|ƒ£~§‚‚ª…‚¬†©„¥€{ž}z™wz’pzlxlwŒkumr‰lm„gkd`rX[iRR[HHL=@@4;7,70&5*$6('5''3''1'&.)&+*(++)+-*',('+*)+*)+***,+),+),-)*,#$2*'50*86*BC5UZFfpWn}^tˆeqŠbuex˜iw›ks™htšiwŸkz¢nx lwŸmx ny£s{¥u{¥w|£wyžuzœww–tsŽom†hd{_WkPN[GCC7>:195,560560671671782782872872983:94=:5>;6>;6>;6>95>95?74?74>63=52;63:5294194184184395484373243151240/6-06-.6-06-.4..4..4..4/,40-40-40-51.32-32-43.43.43/431542540841850940:5/=60>7/@7.A8/C90D:0G:1H;2F<3F<3F<3F<3E;2C90B71A60@51@51?40>3/>31?42@53?53@72C52I35P16T/6S.5P05J22C52=90<:-=:+C7)I6(Q3)W2)]2+d3,l50v64}77‚87ƒ77‚66~75}:4}<6}>5€?9ƒ@8†?9…A8€B3€C1B1ƒ@0…=/‡;.ˆ:.‡9-…9,ƒ9,‚:,<,|=,y>,x?,|=,‡5*‹2,¡LE§XQ‹A8|90‚F;€K=yH:zJ<{M>|N?}OBQE‡UJ‚_LrkOosR|uX‡w]yb˜iŸ‹s ”z––z|‹£ˆ¨…§‚€¤~{Ÿy~™vƒ‘p…ŽoƒŽp€pp{ŽpwŒms‡kj~bfv\_hSV[GOM>GA3@6*=0';,'9+(6+'3+(/,',-'+.').().(+-(-,*/+*3)*4(*7'*7'(3($<3,E>4IG8QR@]bKgqVjyZn‚]k„\l‰]p‘bq•eo•do—eršfuŸmrœjq›itžnx¢rz¤vy¢vyŸvvštw™vu”rokj…fc|^UlON\ECC7@91;4,671782782782893893983:94:94;:5>;6?<7?<7?<7@;7@;7B:7B:7A96@85=84=84<73<73<73<74<74<74;639529338308/09/.8/080.80.80.61.61-61-61-52-52-63.63.74/74/540540841952:63<94=84@93@70A8/C90D:0G:1H<0I=1I=1J=4J=4J=4I<3F<3D:1B8/A7.A81@70@72?61?61@72@72A83?74@85B86D97G96H96H96H94E80E8/E9-E9+G9,I9*K9+Q7*Z/&d/'n3-z63ƒ98‰;9‹;:‹=;‹A>‡@:‚=6<3:3‚<4ˆ=7‰@7ƒA5B3‚@2ƒ?2ƒ=1„<0;/€/|>/}>/=/†9/1+¢<8ÍlfÙ~y­ZTŒC<ˆLAN@tJ(+C&+E$+C&(F5-LC4VQ>[YD`bJgmQiwVj{Wl‚[g‚Wf†WlŽ\o”an”an–bršfsko›jo™irœnw ty¢xxžwu›vs—su—vs’rn‹li„cb{[TmMM]CGH:E<5@707827828938938939:4:94:94;:5<;6?<7@=8@=8@=8A<8A<8C;8C;8C;8B:7?:6>95>95=84>95>95>95>95=85<73:51;30:0.:0.91.91.91/91.91.72.61-61-63.63.63.74/74/74/540651952;83<94?:4B;5B;3A8/B:/C9/E;/H<0I=1J>2J>2K>5K>5J=4J=4F<3E;2C90B8/B92B92A83@72@72A83B94A:4?82@93B;5D=7F=6G<6K<5N;4M6.N6,Q6+Q6+Q7*P9+P9)V6'f6*r6,~;3‰@9•D@›HDŸJGŸLF QJ™LDŽD;…;0„7-…7-Œ91=4ˆ>5‡>7†=6…<5…<5=4}=3z>3x@3vA3x@3z>3<3ƒ:3ˆ73‘31˜(&³=;ì|zý•’Åhc–G@‰K@xH:nMhV>lX@t[E`L€hPysQ„wUžt\´l^É__ÓV\ÙQ[×T\äouÙzx̆|À~µ•€«•}£’xŸvœŠrœŠt™u•u‘‘u‹’s†‘s‚‘r|‹ny†ju{amoWgbN_TBUE5R/(9/&7.'6/'81):/)=.+A,+F)+H(+K'+H)'TB4YQ9B?:D?;D?;E@8E>8D=7B;5B;5B;5B;5B:7B;5A:4A:4A83A83A83@72@64>71>71>71<71<71;60:5/85.85.74/74/961961961:70<71=82A:2B;1C:1D<1F<2J>2K?3L@2N@3N@5N@7N@7L?6K>5I<3H;2E;2E;2B90A8/@91?80?80?80@93@93<5/MD=M@:K:3T@9R62O0+a<6\3-`5.`4+^/'^/%f6,m=1q=0‰I=G;—I?ŸKAŸF>›>7š=6žD;¦ND¤PE¨VJ«YK¥OB™A5—;0›>6“98‘98Œ65†52†84„?8|@6r>1rB4oA2q=0v:0‚72Œ43’-1š',ÈHIèbaÅEDÍWUáyv«VO†F<„VFmR=i[AibFjeHj`En^D|dLjT’bL²m]ÑnhÛX]à;Lç-Eò+Hõ0Lö@YìI\ä[eånrâ{|Û€}Ûƒ؉‚Ãv½wº„x¶†x²ˆx­Šw¨‹y¥Œxš€o™~m˜xi“oabY„UM{IBxA>u:9:49:49:49:4:;5;<6>=8?>9>=8>=8A>9A>9B?:C@;D?;D?;FA=E@8E>8E>8E>8E>8D=5C<6C<4D;4C:1B92B92B92B92A83A83@93@93>71<71;60;6096/85.74/74/96196/96/:70<71>:1A:0B<0C;0E;/I=1J>0L@2L@2N@3N@3N@5N@7M?6J=4I<3H;2E;2E;2C:1B90@91@91@91@91A:4B92D93I81L/+V.,j76u99{;;…ECƒD?„H@…IA†G>ŽIB™NH¡PL¢OG“D7”B4šB6ŸC8 >3œ7-œ7-Ÿ=0£C5›?0™@0 E3¤G6§F6®H:¶NE´LM¯HL¥@D™9;‘98>:ƒ@8x>3o>0zI;…LA„?8„,+’).³9DÒLWÜKNßMMÊ>=À@?Ð`\³YQ„@5‚TDyaIe[@^]?ihIslOvgJ~dK–cN¼dXÖ_[æUZëANò,Eþ%Dÿ&Hÿ'Iÿ.Nù3Nò6UE8[O5cZ9gaAifEnrOz‚]z‰bt†^r‰_p‰_p‹`qŽ`u’dw”dw”dw”fs’ix–rz—xy–x~˜}ƒ„…‡ƒ›…™ƒz’zr‰om„hhd`y[TmMNaERSAVPBUOC8938938939:4;<6<=7?>9@?:@?:@?:C@;C@;C@;C@;D?;D?;FA;FA;FA;E@:E@:E@:G@8F?7JA:I@9H?8G>5F=6E<3F<3E;1D:1D:1D:1D:1D;4D;4D;4C<4?80?80<71;60:5/:5/94.94.96/96/:5/;7.>7/@9/B90C;0E;1F<0I=1K?1M?2M@0NA1M@0P?5M?4L>3K=2I<3H;2E;1D:0C:1C:1A:0A:0?;2@<3@<3D;4UD—I?–LAœNB¬RJ¾URÌOSÄLK¥@4B0 @0¥?1¥;.£7+¤8+§=/«E6¡>+˜7$:'¥>-¬A/²C2¶D:§02¯:B¹DL½LRºMR­KL–A>‚71{8/v6,x2*„1-œ37¹=GÕGWèM[âFIÏ53Ð:9½31ÈNKÆc]”J?Œ[J}cLj_CgdEtoOpQhJhN°hYäbbõQZôDQö7Iý1Jÿ2Nÿ/Mÿ*Hÿ2Oü0K÷1Jõ5Lò4Mð2Kó3Ló7Pò@XïC[îF]íIaëNcêQeèUhèVkåSjäRiãOiäNiçNlëPoòSsóVuþh…ña|å[tÕUlÍYlÉdr¨R]r-2^&'Y0,W:4Q?5B:-:8)>B1LN9VO3aV6e_?heDquT†e~ŒiwˆdxŒiu‹er‹dr‹cvŒeyhzizj€•v„›~Šž… Š’£—¨–˜©™–¦™‘¢’‡˜†zypƒmg~b^wYTmMPcGSXDXUDYVG7827828939:4;<6=>8@?:A@;BA5G=3F<2E;1D:0D:0E;1E;2D;2E<3E<5E<5@91?80=82<71;60:5/:5/:5/96/96-;7.;7,?8.@:.C;0D0K?/M@0M@0M@/M@0O?2O>4L>3K=2J<3G:1E;1D:0D;2D;2B;1@<1@<3A=4B>5F<3S81[*&‰:?¾T`ÙTeæUfãUcËJOŸ30–:/‘>0™A3®F=ÅIGÕBHÍ>@±B7§F5©B3¬@3¯?3°>3³B4´D6²G5©B/£<)¤;(©<(«:(®6&­3(¶97º9=½7>¼7<¿^õ@aøCfö@fõ?eõ?gø?hüCmÿErÿIsÿOuÿQuþUvòSqçTnåaxÖfv·Wb}15j0/X1*P8,G>/>A.;D/?G/PK._T8g`CokN||`ˆŽr‡‘v}‹qzq|s|szozŠm}Œoƒ’uˆ—z•£Šœ©•£®¦±¡¬´§±¹®°·°«µ­¡«¢” ”ƒ‘‚s„qh|c]tXSlNPdHRZCWYDYZH671671782893:;5<=7?>9@?:BA/K?1M@0M@0NA0O?/O?0O?2N=3N=3J<1I;0G;/D:0D:0D<1D<1B;1@<1A=2A?3B?6K=4\5.w32­LSÛ]iæM_å@Q×6E·&+¨1)7(’:&—<)¬@3ÃD=Ô>?Í;;±?5¨B4ª@2­?2²@5¸C9¼H;»J<¬>/ª?/¨=+¦;)ª9)°:,·;/¼<1ÊFAÎDAÐ>?Ð79Ö7<ÞBEâLNÝROÄC>ÆKCÍTLÔSMÙKJÛ?Bà5>á27Û4.Ú7.Ð1+Ï:4¿84³@9µ[P–UC{N9‚bI†kP„`F’[F­fTËrdçmhêEKò:Dê9Cç=8@?:@?:C@;DAGB>GD=GD=HC=ID>IE2I=1G=1G=1F<0F<0E;1E;1D;2C:1A:0A:0@91@91=82<71;60;60;7.;7.;7,<8-?9-A;/D0L?/M@0NA0NA0O?/O?/O?2N=3M<2L;1I;0G;/F90C9/C;0B<0B;1@<1@>2A?3B?6N;4m84—FEÄY_ÛWbßCQÞ8FÔ3;½++­1'¡8%˜:!—9 ¤;&¶>.Ã:2¾71§7,¢:-¥9-§7,¯:1¸B8ºE;·E:®>2­?0§<,¤6'ª6)¶>0ÃD;ÊG=¾8-Î@6áD?ìBBô=Aó9>ë27Þ.0Û75âGBèSLåNGÜ=9Ù10ã/2ê67Ù1(ÞÒA>ÒGBÝOMëWWíNRïDMð:Gö5F÷2Fø.Dû1Gþ7Nþ8Sý8Tý8Vþ9Wÿ;\ÿ>aÿAeÿCkþ;eýjý?mú>nø>oô=mö:jÿHrÿ;aÿ?dÿKnÿKn÷NmïUoãZnèr‚Âaj˜ILt:8\6-P9+PC2UM:^QAreUˆ|n•‚Ÿ‘¦§Ÿ¡¦Ÿ–œ˜•ž›ž§¤¦¯¬¦¬¨¢§£¦¨£µ´°ÂÁ¼ÌÉÀÑÎÅÕÐÌÕÐÍÔÎÎÕÏÑÑËÏËÆÊ¿½À°²¯˜Ÿ˜€Œ~m~k`t[WnRVjNS`FV`EX`H560560560560671893:94;:5=<7>=8A>9C@;DAHC?HC?GD=HE>ID>ID>JF=JF=MF2@@4P91r1/¨JKÁSV»>D½06Â03Á//º1)©1!£9#œ=!™;›< ¡=#¥;%¤6%ž6) 8-¢6,¥4,­81·@:¸C<²@6±B7­A4¨-Ï>-Ù5+á*&í"%ú%+ÿ*1ÿ.4í)*ç.+á3,ß4,à3,ã2,é0-ç2+Ú2%Ö6&Ð2&Ï7,Å6.½>7È`UÒq¦eSVBŠM:£WIÈf[ßd_çRTèCIõFMí@Dß??Ô@<É@8Æ@7ÑFAãMLïJNô@Kù9Hý7Hü5Hø3E÷6Gú;Mú8Pü7Rû6Rý6Uÿ6Xÿ9]ÿ;aÿkÿ?mÿ@qÿBtÿBuþBuüBtùBpÿFmúAaþEeÿKjþKkÿVtÿ_zõ]tòj~æp~Óow®^aƒCAg6/hB7sUJye\Œ}v£–­£¡²®«¶¶¶²¶¹ª¯³°·½¶½Å½ÁÊÀÃÊÃÂÊÉÆÍÕÎÖÝ×ÛâÚØçÝÛéÝÝæÚÜåØßä×ààÔÞÙÏØÊÅ˺ºº¢§£ˆ’‡t‚qexb\sW[oS[jM\iK]gL561561561560561671872983<;6=<7@=8B?:DAHE>HE>HE2G=1E=2D;2C:1C:3A:2A:4@93?74<73<71>7/>7/<8/=90>:1A:2C<2D=3H@5I?3L@2MA1NA0P@0O@-O@-L?/L>1M=0L;1J91I81E80C90@9/>:/;;/<<0=>0>?1A?0S8-‡<7Ä\[ÊZY®86«.*²1+®.%­2#¬9&¬B*ªF,¦D'£A&£A&¢<#Ÿ9# 9*£;0¦:0¦7.­<4¶C<·E;°@5«=0¨Dá;=Ö<<Í@9Á>4¶8,¹6.Ä94âHHé@Eð;Dö:Hú:Iø8G÷;Iû?NþAUÿ?Vþiÿ>lÿ>oÿ>pý>qú@rø@t÷Aq÷CjÿMmÿSs÷Jhë@`ýTsÿg…ÿe‚÷]wï_xçh{Üp}Æqx§gg^X{ZQ—~wª™’¾°­Ä¼ºÆÂÃÈÇÌÇÇÏÃÃÏËÊØÌÊØÑÊÚ×ÎßßÔäæÛéêàëíãëïåæòèæôèèðäæîáèíàéêÝçäØâÑÊÑÁ¿Â««©‘–z†xl{hbu_`rXbpVboScmT21/320431651875984984984;:5<;6==5??7AA9CC9EE;EE;HH@HH>HHLC4J@4KA5MC9LB8F=4B90E<5C:5@93?74@85?75<74<42C:5B94A96>95?:7>:7?;8@<9B?:D@7G@6J@4L@0O@-O@+L?,G@.F?/I;0K81M53K65J88F;9B?:6904,«=,­<,³=/½C4ÄF8À>1º2&Ç9+Ì8*Ð8+Ö8-Û7-â5.é3/î1-ñ.,ô.-ó0,ñ1,ê5*ã7)Ý:)Û:(Ü9&Ô3Ð3 Ï8'Æ7'¾6(ÂB5ÏSIÈNCÏSKá\Wî]ZðPRí>Cò9?÷?GêAFßCDÕAAÈ?9»<3±;/°HH>HH9H?:F=8B;5D:8A96?74?74@85@85=85;62=4/=4/=52<74=96>:9=<:>=9B?:D?9G@6J@4M@0O@-P?+L@*B?,B?.F<0H:1J65I56F35@65@<9:=6;>5@@4E<-J9)^B4€L>®QB«;- 2#¡6&£:'ž7$ž9%£>*¡;%§<(®?+³@-¶=,·9*¸6(µ7)ª9)¥:*¤9)¥;+¨>.«A1«B/«@.®?,«:(±<+¿E6ÆH9Á?1¼8+À6)Ë7+Ï7,Ð9.Ñ;-Ô8·;1®:-ª<-«=.¶E5ÆL?ÔNEÜGCã?>ï?Bú?Fþ@JøCJ÷CLúDPÿFTýBSù>Sü>XÿBaÿFhÿCiü?iù@jùBpüFvþJzÿK{ÿJzÿHtõKpñQsõ\zù_{ûXwüNqýEkúDlïEiÚKgÈ_p±nukLI~t°–‰Ì²¥äÓÉìãÜëçæêéîêçòíâóöãùûáúÿâýÿçÿÿìÿÿòþÿöþÿùûþú÷ýúõü÷ôúõòøïðôëîñèíïæëæÝàÜÖØÊÆÅ³²®ž¡šŽ“Œ‰…ˆƒ•‡‰€†Œ~/.,0/-10.21/43/540762761:94::2<<4>>6@@6BB8CC9DD:IF=IG;JH;LI8MJ7NL7NL7OL9KI:NKBTRS_^fihxmm…lkŠkhƒ`YiYQ\OGRH@KH>GG=EE93>:1=9083-94.;60<92=:3>;4?<5@<3E>4G?4I?3L@0O?0P?/P?-L?,<;&:=(?<+A;-B71A62>42;30=84B;5H94N2.Y,)l/.‡;= FE£;0¢2$Ÿ1 ¤9'¥<)ž7$ž8"¢<&¤;&ª=)±A-¶A/¹>.»<-¾:-¾-­>-­<,²?-°8(¹>.ËL=ËG:¼6*º2&É9.Ð6,Ô6+Ô8,Ö:.Ø:/Ü8.ã6/è3,ð0-ô.+ô.+ð1)ç2'Ý6&Ô8"Ò7!Ý8$Ü5#Ú9'Ú>/Ó=.È6)Å9,ËA7É<5Í>8ÙEAåKIêJJéCCì?AëCCÞCAÕD?ÍB=Â=4¶:.®8*«:*¬;+¬8)ÀD8ÔNEÝIEà@@è>A÷BIÿHPôAGô@IùCOýGTþEUú@Uû?XþA_ÿDfÿCiÿCkÿFpÿIwÿK{ÿL|ÿJzÿFxÿHwÿKtúNtÿZ|ÿa€ýUvñCdûIkÿTvÜ?\ÍI`Ø{…¸||aC;|n®ŽÕ³§óÛÑûìåúòðù÷ú÷ôýôìûúëÿÿêÿÿìÿÿîÿÿóÿÿ÷ÿÿûÿÿýüÿþûÿýùÿúøÿøöÿõöýóôûðôùðóðçêåßáÓÏξ½¹­®¨¢¥ž£™£—£«žž¦—›£–/.,/.,0/-10,21-32.54/650880991;;3==5??5AA7BB8CC9HEQPL^]bmlzzz’‚¡€‚¨€€¦{u—rkŠe_{YSmTLdMEZG@PB;2?=1@<1?;/A;-F?/H?.K?/M@/O?0O?/P>0L?/@=*?>,@=.?;/?;2>93=:5:94<94D95M51V-+j)-„28ž8C«>C¦7.¥7(¥:(ª?-¨?, 9&¡8#¤;&¥:&«<)³>,¹@/½>/Á=0Å=1Ä>2½?3¶=2²9.®8*¯9+°:,²:,³9*¶;,¹;-ÄB4ËE9È>3¾1'À2(Í9/Ö5+Ø4*Ú6-Û7-Þ7.á6,æ3,ì1*ó0,ô.+ô/)ï0(ä2&Û4$Ò6 Ð5×2Ú0Ú4$Ü<.Ö=/Ð9.Í=2ÒD:Ä5-Å60Ê;5ØD@âMIåKIÞC?Ö=8Ó@9ÎA8Ç>4¾VádtþŸ§ÓŽd92lJ>¥ynÐ¥œõÔËÿéãÿôòÿýÿÿüÿùóÿüïÿÿïÿÿðÿÿòÿÿôÿÿ÷ÿÿûýÿüûÿýúÿüøÿúøÿù÷ÿö÷ÿõöÿôøþó÷öëïìãäÚÕÒÉÆÁº¹´³´¬±´©°¶ª¶¾³°¸­¬´©10,10,0/+0/+10,21,43.54/77/880991;;3==3??5AA7DA8IE:LF:NH:PJ:RK9RM:SL:QK=OJDVTUfdqwx††¨¹“ÃÆŽ‹À‡ƒ¶{w©pmšid_[~UPnNJaKGXEBM?=B;7895296/85,85,671783891;;1>5L?6K>5F<3B92=82:946;47<59<5>:1H4-Y2-w78”?D¦>E§9<ª;0ª<+«@.¬A/©@-¥<)¦;'«>*§8$­:'µ<+¼=.Á<-Å;.Ê<0Ê=3Å?6¾>3º:/·7,·7,¸8+º8+º8+»7+ÇA5ÍC8Å8.Á1&Æ3)Ë7-Ï5+Û4+ß3)á4-â6,ã5,ç5+ì1*ð/*õ/,ö/*ò/)ì0'â2#Ù4!Ð5Ï4Ö1Ù/Ø2"Ø6)×9-Ô:0Ö?6ØE=ÖF>Í@7É<5Ë@9ÖKDÙNGÒE>Å;1Å=1Â<0ÀCòBLûIUÿJYýFXúCYûC]û@_ûBdÿElÿJsÿNzÿO|ÿLyþIvÿJwÿTÿT}ýJqùImÿStÿVtøNiëD^äF]êXkÿ–¢ÿµ¼óžŽHFk.)¦kcÍ–óÈÁÿãÞÿñðÿüýÿýÿü÷þþöÿÿöÿÿ÷ÿÿøÿÿúÿÿüÿÿýýÿýúÿüøÿûøÿùøÿø÷ÿöøÿõ÷ÿôøÿôøýñóóéêäÜÚÖÑÍÍÊÃÉÉ¿ÊÊÀÊÍÂÉÐȾȿ·Á¸65143.32.10+10+21,32-43.66.77/880::2<<2>>4@@6B@4JD8ME8OH8RK;TK:TM;SL*F@*G?*H@+IA,IB0IA4HB6HA9G@:K=?ž51§;/ª<+ª?-ª?-©>,©>*¬?+°?-«8%²9(¹:+¿9-Ã9,È:.Í:0Ï<4Ë>5Æ;4Â91Á8.Á8.Â9/Â8.Ã6,Å7-ÑC9Ð@7Ã0&Ã,#Ð7/Ö<4Ó2*à3,ä2(ç2+è3*ê3+í2+ð/*ó-*ö/*õ.)ñ0)ì1(á4$Ú5"Ñ6 Ð5Ø7#Ù3#Ö3$Õ3&Õ5)Ô8,Ô<1Ö?6ìYQáRJÓHAÌC;ÊE<ÌI?ÈE;À>1¼:*¼;(¼:*¹:)·:(¸:+¼>0¿A3ÁA6Á<3Å<6ÏA=×EEÝGHäIMëLPèBFê@CðCIùKTþNYüJZüF\üF_øA_ùBaýEiÿJpÿNwÿOzÿNxÿLvÿQ{ÿRyþOvýOtÿVyÿ]{ÿSoîD^úTlîQd÷dtÿ’žÿ‹•ôƒ‰Ç`d§MMµjgΊXÿÞÙÿïîÿúùÿüþýûÿýúÿþûÿÿûÿÿûÿÿüÿÿûýÿûûÿûøÿûøÿüùÿûúÿûúÿøúÿöøÿó÷ýñóùíïòææçÝÛߨÒÛ×ÎÝÛÏàÞÒßáÖÜãÛÏØÓÅÎÉ<94;8185052+41*41*52+63,74-85.96/;81=:1?<3A>5C?4JB7MC7PG8SJ;WK;UL=UK?SJCSJK]Wcnl‚‚‚¦‘•Åš ÚŸ¦ê¢©ñ¡¥ïž ë™›å•˜Ý”•֑ʉ‰½‚ƒ±zy¡rq‘fc~XVkPN\IGRFCLCBJ??K==G;:@;9:<94?;/C=-E@,F@*FA+EB/EC4CC7BC;AC>@ACBLCANEEOCHNAIL>HI>GDCHAA=2L:.gF7ƒOAI<Ž?2”8)¥>/©>,«>*¬?+­@,¯@-°?-±<*±8'¶8)½9*Ã9,È8-Ì8.Ò91Ô;5Ï:4Í:3Ë81Ë81Ì92Í:2Ì70Ë6/Ó<5Õ>5Ò91Ì2(Î4*Ø;2Ú<3×3*ä1*é1'ì1*î2)ð1)ò/)ô-(ö,(÷-)ô/)ð1)é3(â5'Ù6%Ò7!Ï7 Ô9%Õ8%Ó6%Ñ4%Ò4(Ó7+Ò8.Ð7/ãNGèXPçZSÚQIÌG>ÄD9¿@7¹>/¹<*¹<&¹<(¹:'¸9(º;*À>0ÃA4ÉD;Æ@7É@:ÑFCÕIHÖHGØGJßIKæFHèBDíDIõLSüQZûO]ûL]ûK`öD^÷DaùFfýIlÿNuÿOxÿOxÿPw÷VxóUvôTvüYxÿ]{ÿZwûQkòI`ýWköUgêM^ö^mâKZæTaåTa×XaÁefȃ~å«§ÿÔÑÿëèÿóòÿøùÿþÿûüÿûüÿûüÿüüþüúýýùúý÷÷ü÷ôÿú÷ÿûøÿüûÿûúÿøøÿóóýîñúëîðáäéÝÝäÙÕâÙÒæßÕëçÛñíáññåìóìÛæâÎÙÕ@=6=:3:7074-52+52+52+63,74-74-96/;81=:1?<3@=4B>3JB7MC7RF8VJ:WK;XL?:6@<1A>/C@/CB0BC3BD7?D=>D@CVCIaLRhU\o\br`dobbjd`afXWaJDlG>ƒSE•XF“J7‘@+™>+¨A.®@/®A-¯@-°A.´A/²=+°7&µ7(¼8+Â8+È8-Í6-Ñ7/Õ81Ø;4Ò72Ð72Ð72Ñ82Ô94Ô94Ó83Ó6/ÞA:Õ8/Ñ3*Ö8/Þ=5Þ=5Ú91Ü5,ç2)ë0'ï0(ñ0)ô/)÷-)÷,(÷,(÷-)ô/)î2)é4)á5'Ú7&Ô7$Ï8#Î7"Ï8%Î7$Ï6&Ð7)Ò9+Ñ7+Î4*Ë4+ãNGód\ë`YÕOFÄA7º;2µ9-¸>)¸>'¹<&¹;%º9&½9*À2ÊD9ÊA9ÎE?ÕKHÓLIÎGDÍEEÖHGãIIæCDèEHòMSøSZùR\÷O^úOaôH^õG`øGdûIiÿNrÿQxÿRyÿTzðUuïZwù^}ý^|ùUpõMgùOiÿYnÿ[mÿctðM^÷TeôO`üUgõL_äR_À^_»vqל˜úÉÅÿåãÿíëÿôôÿÿýüÿÿûÿÿûÿÿûÿþýýýýüúþùöýøõÿøõÿùöÿúùÿúùÿööüððøéìôææëÝÝèÚÙäÙÓèÞÕðèÝùóåÿúìþþòôúöáëêÓÝÜB>5A=4@<3>:1<8/:6-84+73*62)62)73*84+;60>93A<6E>6I@7MC7RF8UI9WJ:XK;ZLA[NHTIMXR`gd|~§’Ê— ãžªö¥°ÿª³ÿ«²ÿ¬´ÿ¬²üª±ùª¯ó¨¬ì©«èŸ¡Ú™šÒÁ±tr¡he’]Z‡XR~XQzYQvVOnMH_C?M?:@?;:B?8>>4@B5BE:?D=:CB>FH?LUDVnQfƒarŽisŽtvx„o€€^lŠ[c’WYžWU¦VM¦M?Ÿ@.œ9$ :$§<(¬=*®?,±@.³@-´?-¶=,¹;,º6'¾6(Ä6*Ë7-Ñ7-Ö8/Ú91Ú83×84Ø95Ù:6Ø93Ø61Ø61Ú83Ý:3æC<à=6Ú70ã@7þ[Rÿlcÿ]Tç?6å3)í2)ñ2*ô/)ô*&õ(%ø(&ø+(÷-+ó0,í2+ã1'Ú0#Ô1"Ô4$Ó:(Ì;&Ê<(Í<)Ï<*Ò:,Ò9+Ò8,Ñ7-Ú@8Ï81ÜGAôc^åXQËB<Å@;·4*·:&¶<$¹<&º<&½:(¿:+Ä<0Æ>2Ç>4ÌC;ÙPJßXRÔOJÃ?:À?:ÏHDÞHGâGEæJKïPTñRWïNVíKXñL\ùRføOf÷Ke÷JfüMlÿQsÿRvýRvôWvîXuõXuû[wÿ\xÿZsÿWnÿVkÿbuýVgÿ\mÿ[lñFXôDXÿQeîVeÆfgªieʋ網øÒÏÿëçýïîüø÷ùýüùÿÿùÿÿúÿþüþýÿþüÿûøþöôþùõÿû÷ÿùöÿöôÿööÿõõöèèæØØãÕÔÞÐÍáÖÐñçÞüôçþøèÿüéÿÿóúÿùèñðØáàC?6B>3A=4?;2=90;7.:6-95,73*73*73*84+:5/=82@;5D=5H?6LB6QE7TH8VI8WJ9YK>ZMEUJNWQ_eby{¤ŠÉ”⛦õ£®þ«´ÿ¬µÿ®¶ÿ¯·ÿ°·ÿ¯¶ü¯´ø¯²õ©ªë¢£ã˜˜ØŒŠÉ€»uq®ie c^˜`WŽ`Vˆ]TVPtMIbFCTBAIAAC<<:AB=FEACD?A?@DBEOMRWVdch†quš}¢‡}Ÿ’}œ {š¥pФ`u¬Yi¶VaºQU¸HF°@4¬;)¬<&­='¨8$¨7%«8&®9(°8'²9(µ7(¸6(»3%Â4(Ê7-Ó:2Ù<3Þ=5ß<5ß<5á>9ß<7ß<7á>9åB=èC=çB<æA;å@:æB9ä@7Ü8/Õ1(Ø6+ëI>ÿ[Oñ@6î6,ê+#î)#ø-)ÿ/-þ,+ö((ú0.õ4/ï61ç6.Þ3)Ö2&Ô2%Ï6&Ë:'È;'Ê<(Í:(Ï9*Ð7)Ñ5)Ð4(Ó9/Ï5-Ô=6åPJåTQÛLHÍB?·1(¼;(»=&½<'¾;'¾9(À8(Â:,Ä:/È>4ËB8ÕOFÜWPÒRIÃD=¿C;ÌHCÛLHßJFåMLëSRíTWëPVéNVìOZ÷VføUhùSiúRküRmÿSqÿStÿRuòMmøUtÿ\zÿ_{ÿ\vÿUoûRiûReüUf÷RbÿZhÿZhóN^øScþYißS^¶`_—^W¶}Ù©¥îÈÅýáÞùééýøõúüùùÿÿøÿÿ÷ÿýúþýÿÿýÿûûÿ÷õýøôþùõþùõþöóÿ÷öÿõõöêêêÜÛäÖÓÝÐÊßÕÌïåÛüõåÿùçÿýéÿÿïúÿøèñîÛáßEA6EA5C?4A=2?;0=9.<8-;7,84+84+73*84+:5/=82?:4C<4G>5JB7ND8RF6TG6WG7YIBZEJpW]‚cs˜r—¥z§®«²{£¸vœÀp“ÂcƒÀTnÂG\ÐK\ÑHPÄ<<º5.¸9*µ<'°<%°;'°;)²:)´;*·<,»<-À<-Ä<.Ä6*Ë8.Ó<1Ù?5ßA8á>7à<3ß:4Ü71Ù4.Ø3-Þ93æA;ìE?éB<ä=5ã<4Û4,Ø4+Û7-Ô2'Ì, Ö6*éG:õK>ò@6ï4-ð-)ö,*ú,,ü,,ø*,ð*)ì/+è2.ã5.Ü4+Ø1(Õ1'Ñ3'Í7(Ë:)Í:(Ð:)Ò;*Ó:*Ô8+Ô8,Ñ4+Ö<4Õ:5Õ<7åONíYWÙEEÂ3/À;,¿<(À;*¿:)Á9)À8(À8*À8,Æ=3ÇA6ÏJAØUKÒRGÆG>ÀD:ÇG>ÖKDØICÝLIäSPåSTâPSâMSåNWòXdöZhý[pþZrüVnúRlûQlÿQpýGmÿPvÿZ}ÿ[{ÿVrýTkþWkÿ\mûYhøZhûamö`kí]gïfnìfmÉ\_ ]W{OF˜mfÁ˜”ݺ¶ðÔÑôàßÿõôùù÷ùÿýùÿÿ÷ÿýúþýÿÿÿÿýÿÿøùüùôüùòüùôýøôÿùöÿøöùîìïäâåÚÖÛÐÊÜÒÈîäØýöäÿûèÿýçÿÿíúýôêðìÞãßIE9HD8FB6D@4B>3@<1?;0>:/:6-95,95,95,:5/<71>93@;5E>6I@7LD7OF5RE4UE5WG8WI>XMKXNW^Zqpp–€†ºŒ–Ô•¡é©õ¨°ù©±ù­³ý°·ÿ±·ÿ²¹ÿ´¸ÿ´¸ÿ¯±ü«­ø¥§òŸžê—–⌋ׂÍ}yÅum¶pgªf`ž_ZYX„QQuGGcA>Q=5DH8BT=C`@EnCJ€OU–]d«fx¿kÉnšËo˜ÉiÈ`ƒÉWxÆIgÄ;UÆ2HÙAPàEMÑ;<Æ71Ä?0½@,±:$­6"­5$®5$³5&¶7(¼8+Ã;-È/Û?0Ü@3Ü@3Ò6*æLBåJEÎ50ßGFóZ\ßIKÕA?È2ÈF9ÏOBÎPDÆH<¿C7ÁC7ÎH?ÑF?ÕJEÛPKÝROÙMLÚKMÜKPëX`ó[güaqÿauúXmõOgõMgÿNkÿOuÿRyÿUwÿTqüTmý[pÿcuÿjxÿguúboõamídlãflÙhjÎghµfa^TeG<^U©ˆÍ«©åÇÅïÚÙÿóóùøöùýüøÿÿ÷ÿÿûÿÿÿþÿÿüÿÿùúþûöûûóûúõþûöÿýùÿûøþôòøíéêßÙÞÔËÝÓÉíæÖÿøåÿþèÿÿæÿÿëøúïêïèãæßNH:MG9LF8JD6HB6F@4D=3C<2?80>7/=6.=6.=60>71@93?:4C>8EA8KC8NE6QD3RE2VF6VH;ZMGVMR[Whlk‹~‚±Š“Î’Ÿãš¦î¦®÷©¯ù­°ý¯³ý°³ÿ°´þ°³ÿ¯³ý«®û¨«ø¤§ô ¢ïšœé“•⊌ن…уÉ{u»mk¬dež_a’Y[„RQsNHbWFY_CQmBLEM˜MT¬U]¼[bÊZhÙRpâRußTuÙPlÒJbÍBWÇ8JÅ.?Ô8EãCKæGKØ>>Í>6ÌF:ÃH6¶?+·>-¸=-º<-½>/Ã?0ÊB4ÐD7ÕE:ÙE9ÚB7Û>5Ù;2Ù6-Ù5,Ú3+×3*Ô1*×4-Ú7.Ý90ß80Þ7/Ý6.Ü5,Ö/&Ù5+×7+Ï2#Í1"Ò9)Õ>-Ô;)Ø<-æD7øJAýD?ù64õ*-ö*-÷/2÷67í55â30Ú1,×0*×/,Ù0-Ù0+ã81ä91â:1â;2à<0ß=0Ü?0Ú>1Ñ7+ïWLøaZÓ;6Ñ;:æPQÜFHæPQÏ<4Ê:/Æ8,Å9,Ä:-Ä<.Ã;-À;,¾:-¾<.ÃA3ÇH9ÇI;ÂD6¾@2¼>0ÉF<ÊE<ÎIBÕPI×RMÕNKÓKK×LOéZ`ð^hüfrÿhxü]qòPeóMeýNkÿVzÿTxÿRrøTmö]qûhxûjw÷erüetó_mì`kêkrßruÃjfªd\žla}fVXH9kXJ”|r½ œÞÂÁîÖÖþîïûõõûûûûÿÿùÿÿýþÿÿþÿÿûÿÿúýÿþùûþõûüöÿþùÿÿúÿþúÿûõÿ÷òñèáäÜÑáÙÌðé×ÿúäÿÿæÿþåÿÿê÷ùëíðçèéáQK=PJ1ÃE6ÃE6ÅF7ÉE8ÎF8ÑG:×G<ÚG=Ö>3Õ;1Ö8/Õ4,Ö3*Ø4+Û4,Ú6-Û81Ý<4à=4ß<3Ý90Ü5-Ü5,Û7-Ò.$Ý;0Ú=.Í1"Æ-Î7&Ò=)Í:&Ì9'Ô8)â:/ó=9ÿ@@ÿ<>þ37ó,/ê,.á+*Ø*)Ô+(×/,Þ44ä88é99ï75ð74î73è71ã7-Ü6*×5(Ñ5&Í5(çPEÿmcÛHAÈ42×CCÓ>BêVVÙA<Ò>4Ë8.Æ6+Æ:-Æ/Á=.»9+»<-¾?0ÀA2¿A2½@.¼=.»<-ÃC6ÄD9ÈH?ÐPGÓRLÐOIÒNLÕONé^cîagûitÿnzÿduõVjõQiÿUoÿWvÿVtúXpñ^pônyöw€íksÞXañ`mñ`mìboïs}숊Ì|ªth™yjskXON:_VGƒqg¯–’ÜÀ¿ïÕØüéëþôõýûüýþÿúþÿþýÿÿýÿÿûÿÿùþÿÿûùÿõúýöÿÿúÿÿúÿÿøÿý÷ÿþöùðçíåÚéáÔôïÜÿûåÿþåÿÿãÿÿèùúêòôçîðåSM=RL4D=3B;3A:2@93A:4A96@;7A@;CC;IE9MG7OG2RF0UF1UH5WK?RHFXR^jg‚}§‰“Ä’žÚ˜¢ç¤§ö¦§ú«©ü«¬þ¬­ÿ­®þ¬®û¬®û¨¬ö¦ªô¤¨ñ£§ð¡¨î §í¤è›¢æ™žâ’šÛ‹“҆ʃ„ˆ·ƒ¨ˆyšmˆšcz©Xi»Q_ÏMYàIRèAIê=Aé=;ã>8ÝC9ÖH:ÎI8ÅF3ÂC0Å@1äTIàG?Ú;7Ø64Ø88Ø:;Ñ98È74À:/¾<.¿;.À:.Â8+Ã7*Æ4'Æ2&Î4*Ð3*Ñ3(Ô3)Ö3*Ù5,Ý6.Ü8/Þ=3Û=2Ü;1Û8/Û7-Ú6,Ø4*×3)Õ3&Ó3%Ð4%Ï6&Ò=)Ñ>*Ê9$À2È:&Ê4%Õ1'ç51ú<<ÿ=@ÿ7=÷37ê-1á-.Ù--×/.Ü43ã9:é;=ð9=ö26ø03ô01í1/ä1*Þ2(Õ1%Ï3$É1$Ñ=1új_äTLÈ95Ð@?Ë:=äRSäJHÜC=Ñ:3É6.Æ8.Å;0Â<0¿=/º;*¼?-½@.¼?-º;*º;(½;+¾<,¼>0¼>2ÀD8ÈLBÌPHÊNFÌLIÐNLèaeìaføhrÿo{ÿhx÷Zk÷UjþZrÿYsû]tîaræjtë}€ñ‡‰èwyÚ_dñgtþm|óeuëlwö‘•ì¢ŸÄ”Š¢|hjUHQSK>PJ>êDFå@DÙ8=Î65ÍB;ÈD8ÉC8ÇA5Æ>2Ã9,Â6)Â2'Æ2(Ë3(Î4*Ó5,Ø5.Ù4.Û4.Û4,äB7Ý=1Ù7,Ú6,ß9-ß9-Û5)Õ1%Ø8(Í2 Ê1!Ï9(Î8'Ç4"Ê7%ÔC0È7&Î8*×6,Þ5.æ3/î53ö:9û?>ÿLKúHFòBBì>=ê<=ç7:å26æ,1ô+1ø)/ô,.ï/.è1+à4*Ù5)Ó7(Æ0!À.ôdYë]SÏ@:ÔDCË;;ßMMêRQàHEÓ;6É6/Æ8.Æ9/Ã;-¾:+¾<,Á@-ÀA.»<)·8%¸9&½<)¾?.µ7)³7+¸>1ÁG:ÅK@ÅIAÈIBËJEåa_æ^`ñdjþnwþkuó]iðXeø]mú^sõbtèdoãlrì~ù‹ö†…éqsøryÿy†õaqàXföˆ‘ÿ´´Ð®¢ ›‡]jPDR9QT?jbU›ˆÚÀ¿òØÙöàãÿô÷ÿúýÿþÿýüÿþüÿÿýÿÿûÿþùýûÿúôÿòòþòùÿôüÿöûýòÿýôÿÿôÿÿóûõç÷ñáþùåÿýçþüãþýáÿÿêÿÿñýýóüüòXO@WP@WN?UN>TK2G?2H>2F@4GC:GE9JG8NI6RJ5UJ4UJ4VK9XNDULMZTbkhƒ{~§‰Ã‘™×˜Ÿç£¤ö¥¢ù¢¢ü¡¢ü ¤ÿ¢¨ÿ£«ÿ¤­ü¡ªõ¡©ñ¡¨ì¥¨íª©ï­©ó±©ö¬©ø ©ø—§ò’¡â–ŸÖ¦£Î¶ž¾¹…œ¸gz¿L]ÑERß>Mç;Gç?ß<=ÝEBÉ:4ÊD9ÊF:º1)ÛJEèJIéCEë>Bè;?æÚ<=Ô<;ÏB;È?7ÊD;ÑMAÍK>¿=0¸6)½9,¿7+Ã6,È5-Ë2*Ñ/*Ô/+Û2/Þ5.çA5ß9+Ù1$Ý3&å9+ç;-ß8&Õ2Ï2Ì4Ê5!Ç4"Ç4"Ê4%Í5'Ï5)Ê0&Ï2)Ñ5)Ò6*Ò4(Õ3&×3'Ü4)à2)æ3.ë52ë33é/2ç-2è-4í.5ö-3ö+/ï+,ì/-ê5.ã9,Ù7(Ð4%Ã-Ä3"çXHéYNË;3ßNIÅ41ÚHHáOPÜJJÔC@Ì;6È80Æ8,Ç9+È<+Å<*Â;(¾9&¼;(»<)º=)º=+·<,´8,µ;0¹=1»?3»?3¾@4À@5ÄA7ïjaõpiêc_ômjûqqìadôgmÿpyÿlzûhxðdoébiëdjîlnîqoîqoûy{ÿ}…ùZlücwßbpû¬¯¶ªš}‘u]rQJY:LR8snZ¥•ˆË·°íÕÓÿîðÿö÷ÿ÷ûýøüüüþþÿÿþÿÿÿþÿûÿþðÿôåþéæûêïÿîøÿöüÿôþÿóÿþñÿýñÿûîÿúêÿùæÿùãÿùáÿùáüúåÿÿõÿÿûÿÿûYPAXO@XO@VM>UL=TKÌLAÁC5¸:,·9+¹7*¿7+Æ6-Ë4-Ñ2.Ø3/á53ä84ä>2á;-Þ6)ß5&á5'á5'Ú5"Ó4Ñ9$Ë9"Ç9%Ç:&É<+Ë<,Ì8,Î4*Õ3.Ö5-Ó7+Ï7)É6&Ç4"Ë4!Ï4"Ø2$Þ2&ã0+æ.,æ,-æ,/æ-2è.3ì+.í,-ì0.è2.à4*Û5'Õ8'Ò9'Õ?.»*ÖD5Ð>1ÙF>ëVPÚB?ØBAçUVâRRÜKHÔC>Í=5É9.È9+Ç8(È;*Ä;(¿:'½<)½>+º?-¹@/¶>.²:,´;0·=0¸>1º?0½?1ÁB3ÅC5ëi\òmdçb[ðkfõolèbañklütxÿq~ÿo|öirí]fêY`ñbf÷qpþzxûvwÿx~ùRdþ[pä]nö¦©©¦“jŒkZtON_;SZ;us\©ÖĸöáÜÿõñÿúúÿúûÿûüüüüúþýûÿþúþÿõÿúíÿóáÿéáýæéÿëóÿñøÿòýÿòÿÿñÿýïÿýíÿúéÿöåûóàúòÝüôßü÷äýúóüüúÿÿý\PB[OA[OAYM?XL>WK=VJDã=?å==åAá>CàBè;?ã9<Ü68Ö66Ñ96Ì;6ÕHAÄ;1¾5+ÅA5ÍK>ÆH:»=/·8)º6)¿7)Ç7,Ï6.×50Þ71æ95é=9×3*×5*Ú6*Ü6*Ý5*Ý7)Ú:*×>,Å4!¿4¹4!¹6"¼8)½8)½3(À-%ã@;å>8Þ=3Õ<.Ì9)È7$È7"Ì7#Ò7%Õ3$×/&Ù.'Û.*Ü.-Û//Ü./Û,)ß0+à5-Ü5,Õ3&Ð4%Ð9&Ñ>*ÔA/Â1 çSEÒ;0ÚA;ÞC?èJIðTUíUTçSQãOMÝJCÖC;Ï<2Ê8+Å6&Ä7&À7%¼7&¹:'¹<*·>-µ=,²=,°:,±;/´<.µ=/·=.¹?0¾C4ÃE7Ü\Qêg]äaYðlgöpmça`ìfgójqàR^ï^kõhqòemñ`gôeiùqqþxwútuÿnuóJ]øRhä[mñœ¡£œŠa€`UoHOd=W`Aww]­¥’áÑÂÿîæÿøñÿüøÿþúþÿúûÿüûÿýûÿýùÿûóÿöèÿîÜþãÚøÞáùáèûåïüèöýëýþìýúéÿúêÿ÷æúñàôèØòçÕöëÙøñáþúñýüøÿþû\PB\PB[OAZN@YM?YM?XL>XL>UI;TH:SG9RF8RF8RF8RF8PF:LE;KGEç=Fã?FÖ:>Ñ?@ÑEDÆA<º61Å>:êZYÝABã@Cæ=@ã:=Û89Ó97Ð<8ÎA8ÏE;Â:.»2(À/¸9(½8)Â9)Ë8.Ò:/Ù80à91è;7ë>8Ø1+Ù2*Ü3,Ý5,à5-ß7.Û9.Ö=/É7(Æ:)Á<+¾<,¿;.Á;0Å<6Î95ëC@í@<ä@7Ù=1Ï9*Ç9%È:&É;%Ï<(Ð7'Ï1%Ñ1%Ô1(Ö3,Ô1,Ñ/*Ó2*Ó5,Ó7+Ð7)Í5'Ê7%Ì;(Ì>*Ì;(Ï<,ô^PàF<Ò3/Ò.,æ@@ûWXÿusÿroÿjgö^YçPGÕA7Ç5(½. Ä8'À8(»8&¸;)·<,µ=-²=,°<-¯;.­<.°.¼B3ÀF7ËMAß`Wâa[ôpløtræ`aä]aæ]dÖHTçYeógrôgoöelükpþsvþvvûpsûenñDXôKbåXkë’– •ƒ_zYQlCSh?\gEy|_°ª”çÜÊÿõèÿùðÿûñþþôýÿ÷ûÿúùÿúöÿøòüóêûëÚøÞÎóÒÊëÌÏìÎ×îÒàðÖéóÛò÷áöõáûöãüõãõìÛíáÑéÝÍíáÑñèÙüõíü÷ñþùó\PB\PB[OA[OAZN@YM?YM?YM?WK=VJ@Ð@?ÐIE¿>8³2,ÈC<àUPÜDCáACã?@á>?Ú?=Ô@<ÑD;ÏF<Ç=2À8*½5)½9*¿=-¿=-½;+½<)Â:*Ç;*Ï;/Õ;/Û8/à8/ç83é:5æ95ä52ä20æ21ç32æ40Ý2+Ô0'Ë1'Ë7-È:0Ä7.Á4-Ã40Ì:;Ý?@ë8;í76ä71Ø5,Ì4&Æ5"Ä7#Å:%Ë=)Ë8&Ì4&Î5'Ô8,Ô:0Ó9/Ð8-Ð>1Ê;-Å8'Ä7%Æ9'Ç<)Ç<)Ç:(Í>-Í:*Ø>2áC:Ô/-ä::à24ß56×53Ö;6ÞC>åKCêQIêSHèTHäUGË?0Ä?.¾<,¸=-·>-´?.°?/®>0¬<.¬<.¬<.¬=,­<,±=.·A3ºD6ÆLAÞbXâc]ðnlôrrå`cå`eç`g÷kvûoz÷kví`hð_fýlqÿx{ÿy|úmsø^jóAWôC]èUh懣“ƒg]YtI^uIhwPˆf³²–èâÌÿúéÿýíÿþïýÿòûÿôøÿôôÿñíûêäòáØî×Åèǻ伺޺¿Þ¼ÇàÀÍâÃØæÌãëÓìîØôñÞ÷òßóêÙìàÒèÚÍêÜÏïáÖòèßñèáòéâ[OA[OA[OAZN@ZN@YM?YM?YM?XL>XL>WK=VJQI>QI>SK>UL;XM9XM7YL9XM;WK?ULGYSWe^nnjƒut–~}¥„…±†‰´‡‰¹Š‹Á‹ÈŽÏŽŽÔÕӔӋʃˆÀ|¸u|²ov­io«ljœ€lˆ“cy®YvËPoãBdð7Vö4L÷8Hï@EåFBÝJCÛJEáGGèCJò=Nð>LäCI×CCÌA>ÎIDº;4°4,ÉI@ÕLFØBAÚ?=Û;;Ú<;Ø@=ÔE?ÍG<ËG:À8*Á8(À8*¾9(¼9'»8&½:(À;(Ä;)Ê=,Ò<.×;.Ü8.á6.ä6/è50é32è./é,0î02õ47õ77î45æ21Ú.*×4/Õ62Ñ32Ï/1Ò/4Û6=ê:Dí06î02æ3/Ü3,Ñ5)Ê7'È9(É<(Æ8$É6$Î6(Ó:,Ú>2ÝA5ÝA5ØA6ÓG8ÉA1Â;(À9&Ã<)Æ=*Å<*Å8&Ì:+Í7)Í0'æC<Û2/ï?Aã/2Ú*,Õ1/Ò5.Õ81Ö90Ò8.Ì5*Æ2&À1#ÎE5ÆA2¼=.µ:*±9)¯9+«:,ª:,«;/«=0¬>/¬<.«<+­<,²>/µA2ÉSGàg^àc_êjiînoæchðjqõoxúq{ýt~ömuîbködnÿrzÿx~ÿquúipøWfùAYô@[êQfá~ƒ¬—†ykmˆ]o‰ZyŠ`—r¶·˜ßÞÂùôÞüúåÿÿïûÿïõÿïïÿëçúäÜïÙÐãÍÅÞÁ°Ö­¨Ó¦ªÐ§°Ó«¶Ô®¼Ö±ÇÚºÒßÁàæÌèêÔòíÚòéØîâÔìÛÑêÙÏìÛÓéÚÓæÙÑåØÐ[N>[N>[N>[N>ZM=ZM=ZM=ZM=YLUL=XLNÝAEÔFDÈA=ÉHB´:/±7,ÎOFÉB<Î=8Ð64Ï10Ð51Ó>8ÏE;ÈF9ÃD5¾9(Ã:(Â:*¿:'½8%¾9&¿:'Á:&Ä9&Ë:)Ó:,Ù9+Ý7+á5+ä3+ê3-ë*+ñ*-ø-3ü/4ÿ17ÿ37ÿ38ý58ù8;õ8<ò9>ò9Aô9D÷7Fû6Hþ5Eô+5ô-2í12ã4/Ù6-Ð8*Î;+Î=,Ë5&Ñ8*Ù;/ß=2â>4ä=4å>5ßA6ÙJ<ÏG7ÉA1Ä<,Â9)Â9'Æ8*È9)É2'Ó9/á@8ëD>Þ0/à..ë46è66Ø3-Õ7.×90×:1Õ;1Ò;0Í:0É;/ÖL?ÌF:¿@1´9*°6)¬6(«7*©8*¬;-­=/®>0­=/«<+«<+­<.±=0ÀKAÚdZÞc^èkiðosêinõrzüvîfp÷oyùryöjsþlvÿwÿv}ùhoùcn÷RbþB[÷ZM=ZM=ZM=ZM=ZM=YLVJ>XL>YN5É83Ç/,Å*&È/*Í:3ÌC9ÃC6¼>/À;*Ä;)Ã<)Á:'Â;(Ã<)Â;'Ã8%Ä5$Ê7%Ô8)Ù7*Ý5*á3*å3)ê2*õ33ÿ58ÿ8<ÿ4:ÿ-2ÿ(-ÿ(-þ+1ü-3ö)0ò&1÷)6ÿ,?ÿ*Aü 9ó/ö"0ó(.í,1æ0/Ú1,Ô3+Ñ5)Ð6*Ô6+Ý90æ=6ë>7ë:4è71è50â92ßH=×K<ÓE7Ë=/Ä6(Â3%È6)Ï8-Î4*Ô6-æC<ß82à21Ò ì89å63Õ1(Ò4)Ò4)Ï5)Î6+Ê6*È5+Å7+ãYNØRFÊH;¾@2·;/µ;.µ<1µ<1¯9-±;/±=0±=.¯;,­9*­9,®:-±<2ÐYQÜb]ìppôvyîmrõq|ör}ÿzƒÿ‰ÿy€ôhq÷epÿq|ÿuÿktø^jöOaÿA^÷8WéG^Ûntº‹™©„‚žn~šg—hœq¡©‚´º–ÈÍ­ÕܽÌÙ»ÁÔ´²Ì©§ÂŸž¼˜š¶–²Œ±†‰³†µ~¹„•À‹œÂŸÄ‘¨Å™²È¡¾ÎªÉÒµÚÙÄæßÍêÞÒéÖÏáÌÉÛÆÃÔÁ»Î½µÈ·°ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YLYM=WMCWLHXNOZPX]Ub`Yia\rjfokŽsp›vq§{u³ƒ~ÁŠƒÉŠƒÇˆÀŠ~¼ˆy²ƒr¨†r§t«‡l£†\„HL¤B9¶A:ÍC@Þ@?è:;ô<>ÿDE÷><ó=<ì>=ê@AëBIêCMëANãALÐ>>Å@9¾?6·>3°,º7%Á:'Ã<)Â;(À9%Â9&Å:'Ç:(Ë:'Ð9(Ö6(Ø2$Ú."à/%ì7.õ=5õ82÷40÷0-ø**û&(û%'û%'û%'û&*÷!)ø".ÿ'7ÿ(>ÿ!;ÿ6ý1ÿ'8ï#,æ#+ã+-Ý--Ô+(Ò-)Ü41â62è64î66ò65ò12ï./î,,å/,Ü92Ñ:1Ò91ìSK»"Ä+#ßF>È.&Í.(Þ<7èE@â:7Ø/*Ú.*â51å<7ß>4Õ<.Ï5)Ë3&Ì5*Í;.Ë;0Å8.ìbXàZOÈC:¹6,º:/¸8-±3'´6*°0%°2&®2&¯4%°6'²:*´<.³=1°:0ºC;Ö\Wìppñsvöx|ûyƒõq|ÿ|„ýw€út}üs{ÿr~ÿr}ÿmxÿgsü`nôI\ÿ>\ÿ>[äAVÔek´•€’¡zƒm}™f~”c‡—j”Ÿwž¦ ¨ƒœ¨„’£Š£|€Ÿvzšqyšo|r vƒ¤u‚­wƒ³y‹¸‘¼„“¾†—¾‡œ¾Œ¢½§¼“¯½š¾Â§Ï̹ßÓÇãÒÊÜÇÄÔ¿¼Ìº¶Á²«¹ª¥ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YL]P@[OC[NFYNJZPQ\SX_U^_Wfd\tibƒng‘qjxp¬€y¼‡€ÄŠÄ€Á~ºt«Œn¢—q¤¡u¨šjž™W{=Aª5+±5+Â<3Ó@8Ý>8è?:óA=õ=;õ;<ô;@ñ>Bî@IèAIâ@KÚAFÇ<9½=4¶<1±;/«:,®:+½A5ÐJAÚG@ÜA=Ô63Ð51Õ@9ÍC8»9+²5#½8'Â;(Ä=*Ä=*Ä;(Æ;(Ç:(Ê9(Ï9(Ï6&Ô2%Ú2%ã5*ê8.ï80ð91ç1&ç/%ê.%ï,&ö+'û+)þ,+ÿ-.ü*-ú%+ú$.ÿ'7ÿ$;ÿ7ÿ3ü0õ0ö.9õ3<å*1Û(,Ü.0Þ02Û+.ñ:>ô7=÷4:ö26ö/4ø03ù25ô87Û2-Ú;5×82äE?äE?Î/+Ñ2.Á"Ô51á?:èE@à=8Ø3-Ù2,Ý60Ý:1Ô:.Ï9*É5'Ç5(È9+Ê<0Ê<2Æ9/ícYáXNÉ@8º4+Â91Ã:0¿6,Â9/¿5+¾4*½4*»5)¸6)µ5(´6(°6)´;0»B9ÓYTèljïqtöx|þ|„øv€þ|„üyùv~þuÿsÿp}ÿkwüdqý_nöI]ÿ>\ÿ>\éCYÓeh®Žw‰˜oz•bu’\xŽ]cŠ•k˜p‹•p…”mp‡]l‰]h‰\g^k_q•ey›izŸk¬t„±vŠ·|»}¼“¼‚–½†›»‰›µ†¡³‹­¶—¾½¨ÏÆ·ØÇ¿ÖÁ¼Ï¼¸Æ·´º¬©²¤£\L<\L<\L<\L<\L<\L<\L<\Lù:Aö=Eï@GæAHÙ@EÏ@BÀ;6¸90±9+­9*©8(­9*»?3ÏF<ÙD>×96Ù74Ú;7ÜC=ÝOEÎH<µ3#¾9(Á:'Ä;)Æ=+É=,È<+É:)Ì9)Ï7)Ï2#Ó/#ß4*î=3ô?6ñ91é4+à4&ß5&â2%å/$ë,$î+%ñ+(ò+(ó+-ð(+ò&/ø(6þ%:ý7ü3ø3ô%7ò0;ó5Aò8Cð;Dðä,6ð2<ó/;ö.9ö-7õ.3õ.1ó/1í42Ü0,â=9Ú64ß;9ÿmjåCAÑ/-Î/,Ù:7ß@<àA;Û<6Õ7.Ö5-Ö5+Ò6*È6'Ã6%Â6'Ä8)Å;.Æ<1Æ<1Å;1ë`YáTMÉ<3¿0(Ë;3Ñ>6Î;3Ò=6Ø=8×<7Ô=6Ï<2É;1Ã9.¼6*¶6)¹;/¼@6ÏTMãgeíorøz~ÿˆû|ƒû|ƒûyûx€ÿwÿsÿn}ÿgvû`pü[mõG^ÿ\ìFZÎ`až~ev…Zi„Qh…OmƒRt…X{ˆ]}ˆ^x„\q‚X`zM_Pa…UeYn•`uœg} j~£mƒ¬r„²tˆ¶x‹¹y‹¹y¹z‘º~”º“±•¬€›©†©­’ºµ¢Ç¹®Ë¸²È¶´¸¬¬ª¡¢ —š[K;[K;[K;[K;[K;[K;[K;[K;ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<]K=]K=]L<^M=^M;^O<^O<^O<^Q@^Q@]OB[OC\NE[NF\OI]OO^P_bTmdY{i^‰pgœ|t­…{·ˆ{³™…º¥…´¯€ª¸z¡ÆxŸÑuœÌcŒÈMlÜFRßA@ÕA=ÏE;ÌH;ÍG;ÓE9ÞA:î@Aõ0ÎD:Õ<7Õ31à;9åA?áD?èSLßUJ¿:+Á9)¾7$À7%Ä;)É=,Ê=,Ë9*Î8)Í4&Ò2&Ù2)å9/ñ>7õ>6ð5.ä/&à6)Þ6)à4*ã1'ç.)ê-)ì*(ì**ê),è',ë'1ò)9ö&<÷!;û=û%Aû6Hä(6ç.<ÿP\ÿ`lÿP\ò;åGDÛ=:Ú<9Õ:5Ò80Ñ7-Ð6*Í4&Æ3#¾5#¹6$»8&¿;,À9é=9æ?9á@8Ù?5Ð<2È:.Á9-»9,»=1ËNHàc_ìnoú|ÿ„ˆý~…øy€øy€üyÿx‚ÿt‚ÿn}ýetù^n÷VhóE\ý8Vÿ^N>\O?^NA]OB^PE^OJbNYbQdcTqdZ}le‘xr¢w¨ƒv¤”}§¬†«Â‰©Î‚žÚw”ál‰ÛXwÚD_óBTúDPïJPáIHÐE>ËE<ÐF<ÙD>èBBð@Cõ@GõBHíDGßCDÏA=Â?7¿@7µ=/®:+«:*ª9)®8*»;.Ì?6áFAâ=;îBBëAAÞ;6ãJBæXLÕK>È@2À8(¼3#Á8(È<-É:*Ë7)Ð8+Î0%×3)à8/é;4í:5í60ë0+å,'ã0,ã1-ç10ì31ó25ö37÷48÷6;ì-5ê,6í.=ñ0Có-Fö)Gý+Nÿ3Rô9Lå3?ð@Mÿ_lÿlzÿWfõCSõ>Pî3Dí3Aí3>é6<ã99Û83Î4*Ç/$Ë2*Ç.(Ð72òYTö\ZòXVÛA?âHFÜB@Ô<7Î70Í6-Ï8-Ï9+Ê7'Â5#¹8#³9$µ:(¸=-¹;,¶6)¼7.Æ=5ÛNGÙEAÎ50Ð1-á>9ç@:ã81ç51ë20î21ë52ç83á:2Ø:/Ð9.È:.¾6*º8+ÈIBÜ_Yënlû}€ÿ…‰ýƒõv}öw~üyÿx‚ÿsƒÿk}ýdvù^pôSeôF]ý8Vþ=ZïL]ÀTRz_BWhÑC?ÖEBãEFèBDîAEíCFçDEÚEAËB:¿?4»?3±;-©8(¨9(ª9)°8*¼:-Ê;3èIEé??ë=>å78Ú2/ÞA:îZPôh[ÚPCÉA3¾5%Â6'Ç9+È9+Ë7+Ò8,Ñ0&Ú6-æ;4é;4ê40è/,ê-+ë--ó49õ3;ø3=ü3=ÿ1>þ0=ý1=ù1>õ0Aò1Bô4Kõ5Nõ0Nö-Oÿ1Xÿ>_æ3HùO\ÿanÿ_nÿWfûP`ôDXé8JóAQê:GÝ2:Ò/2Ê2-Â8-½;+¼:*Ä:/À2(ÙJBúkcÝLGáPKÏ;9Ï;9àLJÔ@<Ê70Ê7-Î-±9)¯3'º:/ÊD;ÖGAØC=Ô72×2.ç;7ì:6è2.í2-ò,-ô,,ò./ï31è71â:1Ú<1Ò>2Â6)º4)ÅB:×XRçjhú|}ÿ†‰þ€„õv}÷xýz‚ÿx‚ÿqÿi{ûbtø]oòQc÷I`ÿ:Xý?[ðO_ºQNqX:Sf8]uEa|InSv†Y{ˆ]~‹`g‚—l€œl}Ÿm|¤o}¨p€©o‚ªnƒ©l…©lˆ«qˆ®qˆ°r†³r„³oƒµp…·r‰¸t‹µv‰¬tŽ¥wš¨„°´™ÈïØÌ¾ÚÑÌÂÂÌ«±Á›¡±ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8[L9[L9\M:\M:]L:^K<`J<^K<_L=^M;_N<^O<^O<^O:_P;`O;aP>aP>aP>aPÉ@8¾>3¸>1¯9+¨7'©:)­<*´<,Á=1Ï?7ß=:å99ã03â/2à42Û94æMEülaòh[ÙQCÆÍD>Á63É;7äUQÕF@É91È8-É:,È9(È9(Ä=)±?'¦<&¨;&¬=*«7(¬3(¼=4ÓLFÖGAÝE@Û96Ü30é73ì51ë0+ô1-ý,/ÿ+-ú./ô1/í4/æ81ß;1Ø>2É9.½3(À;2ÏNHáa^÷yzÿˆŠÿƒ‡ùzû|ƒÿ{†ÿx„ÿn~þew÷^põZlëL`õIaü9Wû=YîM]²JGhQ1Qd6\tDf~Nuˆ[Žc„h†’jˆ—n‰žsˆ¤t„¦t§r}¨p¨n©mƒ©l…©l…¨n‡«n…­o…¯o°l€²k‚¶n…·r‡³t‡­t§wœ¬…²¹šÈƯ×νÙÒÌ»¿Ê¤¬¿’š­[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8[L9\K9\M:]L:]L:^K<^K<^K<^M=^M=^O<^O<\O<`Q>aR=aR?bQ?bQ?aP>aO;bL>hOKgNRbP\cWkjfuv”}|œx—‘z–«•Æ„’Ú}…ðuzþlmÿY[ýDLþ/Iÿ5Rÿ4½=0µ?1¬;+©8(­<,´?.»@1ÊA7ØC=Ù74á85Þ..â30æ:6Ó0'Ï5)ëUGÿwjë[PÑC7Ê<0Ë;0É7*Í6+Ô:0Ú70ß82å63ç32ê01í12ô36ý4<þ%6ÿ#9ÿ"9ÿ"9ÿ!8ÿ6ý5ø6ï2î9ð%Bï(Gî&Jñ'Mÿ3\ÿEhÿbuÿ`l÷WcñQ]òP]ïMZâ@MÔ2=Ú=FÌ7;»/.®/(¦5'¢;(›?&œ>%ª9'²8+ÒVJ»;2Ä?8¾41½2/ÎC@åWSÕHAÈ91Ä6*Å6(Ä5%Æ5$Ã:(±<(§:&¨7%­9*¬4&¯1%Â?5ÛRJÙIAáHBÞ;6Þ2.ê41í1/ï-+ü22þ,/ý+.ù+-ó++í-*æ1*ß4,Ö8,Ñ=1¿2(¼7.ÈIBÙ\Xówwÿ‰‹ÿ‡Šû€…þ†ÿ}ˆÿv„ÿj|þ_s÷XlöTiêD\õD^õ6Uñ:VàLZ¥HC^K-Mc5Uo?b}JtŒ\€–g‡˜lˆ›nŠ r‹¥vŒ¬z†«wªr~§m|¥i}¥g¥g‚¦i‚¥k‚¨mƒ«m‚¬l®h~°i³j„¶o‰¶s‰¯rެx™°„­»˜¿Å©ËʵËͶ½Åžªº‹—§]K7\K7]K7\K7]K7\K7]K7\K7^L8]L8^L8]L8^L8]L8^L8]L:]J<]K=^L>\L<\L<[N=]P?^SA`SB_R?`P@bQAcRBdQBdNAdLBjMIhKMdPYf[lnk†w{ž€…­‰ˆ²ƒ©¥‡©¾ˆ Ð‚’ây~ðsqújbÿa^ùJWñ>Që:Lî?NïCQê@Kæ9Ê=4Á;0¸:,§6&¯A0­<,¬6(¿A5ÌF=Ì=5Ð72Ú85Ü71Þ5.Þ6-Þ8*Ý<*×:'Ó6%Ù;0ðSLòZOÙE9Ç8*Í>.ÔB3Ò:-Ô3+ðGBá//î5:ó6=î,7ÿBMñ'3ú&2ÿ)2ÿ(2ù'ý"*ÿ'/þ'/ð&ð)ù+7ê .ì&7ñ-Aç#;ÿXrç-Dÿ]lÿ_iþZcùU\õPWëHMÝ?@Í84Ë>7ÄA7·?1¦7&™2!™6#š;'Ÿ<)§8-®7/ÂE?¿;7½31Ä64Å54ÔDCÛLHÚKEÑD;È:0Ä4)Ç5(Ë4)Å5*¼1¹=3Ö_Yésqÿû„†û‡Šÿ„Œÿxˆÿh}ÿ_wÿ[uÿUoøLføEcñ:Yô;[æ?YÛ]i‹@;VF-L^6YuBg†Mw–]}œcg€¡jƒ¦n‚¨o€§n¦m~¥l}¥i|¤h}£f£e£f¥l¦m«l¬k~­g®f±gƒ³i‡µm‹´r°vŽ®|™´‰§½™±Á¤²Á®¦²°˜žz…‹]K7]K7]K7]K7]K7]K7]K7]K7^L8^L8^L8^L8^L8^L8^L8^K:\K;^L>_M?^N>[N=[N=\Q?^RB_SC]QA]OB_OB`NDbPFcOHeNHiMJgNQeS_g_tnny~¨€‡»‡ŠÁž•Ê£‹»«£¹xÓyƒê|{ôvjöi`ø]aóOZìFRòHSøIVõEPï?Jë;Eä9?à:<Ú::Õ=8Î?7Ç>4À/Ç8(Ê8)Ó;.Þ;4öJFä01ð6;ö6Añ.<ÿ@Nï'4ó$,÷%(û),ý+,ü*+ø((ö((÷+,ï$'í%(ê%,ý;DÙ'ð4CüARØ&6ÿjuÿbjþZaüW]ôOSåBC×<8Ñ>6¾8,¿D5¹H6©>,™/)(’(ž-%°:6ÑTPÎHGÃ54Æ45Ñ==ëWUØGBÖG?ÐA9Ç9/Æ3)Ê6,Ð7/Î70Ç=3Â91Â5.Ã2-É4.Ñ83Ø?9ÞE=äJ@ÞA8Ú6-Ý0*ç0,ò21û03û03ô02ó12ô01ó/0ó0.î1-ç4-ß9-×=1¿3$¾aP@`P@]P?\O>[O?[RC[QE[QG\OG\OI_PMcQOfTTgUUgUUgV\h]nli†sv£|ƒº‚ŠËŠÔ˜‘× ŠÊª‚´¹}ŸÏ€“䄆îvósjûeg÷S\íGQðFOöHR÷EQòAKî=Eä7=à7:Ù99Ô<7Í@7ÅA4¾?0¶>-­>-ª<+«:,¸B6ÇH?À;2»0)Ê:2Í6/Ð6.Õ7,Ø8,Ù7(Ù8&Ü9&à:*Ý4-Û4.âA9éOCÞH:È5%È2#Ù@2â>5õHDè13ò5;ù7@ø4@ÿESø2?ð)0ë#&ì$'ù13õ-/ï''ì&%õ12ë)*ö8:è+1â)1ë3=ÿR^ï=Kÿ[gþ^fñV\îOTðMRêEIÝ:;Õ74Ô?9À6,Á?2¼B5³=1¬7-¥3)¡,#œ' š%©/*ÇECÂ::¼,,È35×ABô^]Ð?:ÒC;ÐA9Ë=3Ì9/Ô=4Ú@8Û@;Û@<Ø=;Ý>;ãA?ä>>à::ã?=ëIDàB9Ý<4Ù5,Ý2+ç1-ð31õ12ø02ô02ô02ô01ó/0ó0.î1-ç4-ß9-Ø>2À4%º8+µ;0Ð[Tízwÿ“’û‡Šúƒ‰ý~‰ÿr‚ÿdyÿ[tÿTqÿNmÿFgû=_ô=\îEbßTg¢AHp;3SH2Qa<]xEf‡Nr“Zu˜^tš_xžc{£g{£gy¢fy¢fy¡cx byŸby a| bz cz¢f{¤h{§h{¨e{©a{©`}«`®`‡²jеn‹²s‰¬t†¦w‚žuy“no†lSeYAPM2A>^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^L8`N:aP<`Q>]P?ZN>YOCXPEXOH[QO_UTbXYeX_iYcl\fk^glaildqok‚rtšy~µ†Ê…ŒÚŒŽáŽ‡×Ÿ‹Ó­ŠÄ³€©½yŽÌ{Þzò‚wÿsrÿcgùU\ôMTõGPôCMò>Gï-±=0¼F:ÌRGÇH?º5.º1)È91Í81Ó;0Ù=1Û;-Ù6'Ü6&à8+à5-Û2+à=4ìNBãK=Ò:,Ñ8*àB6ß7.ð>:é/0ð16÷4<ü8BÿNZÿLUý>Eò38â$&í/1ê,,ð22è**ë/.ò::Ñæ37Ý,2è9@ðEMÿXcóMWØ=CÚADáBFá>AÞ9=Ü89Ø88Ó97É83Â91½:2ÀA:ÍNHÖVSÐNNÃC@²72¶95ÏKIÙMLãQRïYZêRQñYVÉ51Î>6ÒB9Ð@7Ó?5ÙB9àC<â@;é?@ç8=ì9=ò?Cï:?è58ì>=öMJÞ93Û60Ú3+Þ3,å4.ì30ò21ô01ô02ö/2ö01õ/0õ/.ð0-é4-à8-Ù?3Â6'·5(³9.ËVOï|yÿ“’üˆ‹ý‰þz‡ýoücwÿXqÿOlÿFhÿ@cû9\ô?^éKdØZh…35g;0WO8WgCa{Kj‰Ps’Yt•\u˜^wby¡ez¢fw dv awŸavž`xŸ`xŸ`{Ÿaz cz¢fz£gz§fz§bz¨`z¨]|«]~­_†²g‹´nŒ³tŠ­s†¦u€qtŽii€dQcUDSL8G@^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M9]K5_M5`P9_P;\O>ZN@XOFXQKYPQ`W\g`hnfsshysg{sg}qh}ol}pq†rw—v}«z‚Á‡Ò„ŠàŠ‹å“ãŒÚ „¿žuŸ l‚¬nq¼vlÒviòsmÿllÿgiþ^`ûRWõFMï3Û=1Ú6*Ü4'â6*à3,â70ä=5åE9âF9ÞB3ÞA2â>2Û0&ê72ì0/ï.1ñ.4ú7?ÿPXÿ]dÿZ_ÿOSá.1ã03à,-÷EEè66Ü,,Û-.ë>@Ü25Ù37ÿbhà=BË*2Ê-4Á&*Õ;=á@EÛ6:Ù37ß9=Ü7;Í/0Ì43Í;;ÕGFÞRSì`cõilôekê^aÄ@>ÆE@å^[øhgÿopÿjjåKK×=;É40Ñ>7×D<ÖC;Õ>5Õ<4Ø:1Ü41î5;ñ-7ð,6ò.8ï,4ë,3ó9<þJKß3/Ü3.Ú3+Ü3,ã5.ê40ï4/ò21ô02ö/2÷/1ö.0õ/.ð0-ê3-â7-Ù?3Æ8*´2%²8-ÃNGï|yÿ’‘ÿˆŒÿ‰ÿw…úl|øatûTnýHgÿ>bÿ:_ú6\óAaàNeÂWap/+_?0[W>^lIe}Mk‰St’\u–_v™_xžcy¡cx buŸ`uŸ`u_vž_wž_xŸ`{Ÿaz¡bz¢d{¥e|¦d|§`y§^y¨Z{ª\}¬^€¬a…¯g‡®m‡ªp…¥sƒ r{•nrŠjexe[k^RbU_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N:^L4_N4`N8^O:[N>YOEZSMZTT_ZahbprmzuŒ{u‘{q“zp“vp’qt“rxšt}¨w¶zƒÄ~†Ï„‰Ú‹ŒÞ–Ü™ŠÍ›…¶¢ƒ£ª„‘«~yŸl[šQ>¼MBÔQIâWRëWUñSRñKMí>Cå4:é9<æ9;à;9Ø=8Ó@8ÊB6ÀA0º?/³9,ºA6«5+£.$¾I?Ùg\ÙdZËUI¸<2¸6)À3)Î:0Ù;0Ú6,Þ3)ä6-ß1*ä71ã;2Ý9/Þ>0ãF5äB3ß9+ß1(é4-ð31ï-.í*.ô17ÿEJÿV[ÿ]bÿ\aâ9<ã9<Õ+,ôJKâ89×//Û57Ì()Ì'+øXZÝ>BÕ9=Ñ6:º#Ä(+Ü<>æAEÝ49Ù,2Þ17Ù05Í(.Ò37äKNöaeûhnùcl÷`iú`løbkÖLLÕNJê\ZêVTçMMãHFÏ42Î3/ÙA<àKDäOHßJCÙ@8×:3×6.Ü.-õ2:û-:ø*7õ'4õ)4ø0:ÿ>CÿJJà1.Þ3,Ü3,Ý5,á4-ç4/í4/ð3/ô02÷/2ù.1ø-0ö..ñ/-ë2-â7-Ù=1É;-³1$±7,ºC=ìyvÿÿˆÿ|ˆÿqöhxö_rùRlûDcÿ9^ÿ6]ú6\ðFcÑN`¢IMe5+VD0[Y@^lIe|NkˆRt‘[w•_x™`{ždz cvž`s›]rœ\s›\tœ]v^wž_{Ÿaz¡by¡bz¤b|§b{¦_x¦[x§Yz©Y{ªZ~ª_ƒ­e…¬k‡©m‰§s‰¥u„s|”ru‰pnlfwe_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:aP6aP6aO9^O<[OA[RK\VV_Zakgvso†}z—‚~¡|¥}w£{u¥xv§sy©s}°x¸{„¿~†Ä„‰ÉŽÎ”“Íš“Ç •½«›µ¼¦²É­©Å¦”ªˆmœfJœE2¯A4¶@4ÂB9ÖHDèNNîJKì?Cë=?é;=ä<;ß=:Ù@8Ð@5È>1Á=0½:0¾?6¯4,§1'»I?ÑcVÖh[ÕeWÃOBº>2º4)Ç7,Ö90Ù5,ß2+ç60â0,ã4/â7/Þ7.à>1åC4ä>0Þ4%æ4*é0+ð3/ð..ï-.ò14ó78öBEöMRüY^éFKöQWØ37ëFJÝ8<æAEÚ7:Î.0Ñ05äHKÒ7;Ð7:¹#%Õ;=Û8;å;>ëÿ0=ú*7ü.:ÿ;EÿCHûABã1/ß4-Ý4-Ý5,â4-æ3,í4/ñ40ô02÷/2ù.1ø-0ö..ñ/-ë2-ã7-Ø:/Í>0µ1%±7,²;5ésqÿŠŠÿ‡ÿv†þi}óató[p÷PjúCbÿ7`ÿ7aù;_ìLf¿O[~86]=0NF1VX@ZeEcxMj…RrŽ[v”^yša{ždxžas›]p˜Yp™WqšXqšXt›\uœ]y_xŸ`x¡_y¢^z¥^y¤\x¤Yx¤Wy¥V{§X©_‚¬d„«h†¨l‡¥o†¢q€šmx‘jq…ij~cbv]_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:cQ9cQ9aP<]P@ZPG\TR_Zaa_mtrŠyx˜€¨ƒ°~~°yy¯yu°wwµw|¾x€Á}…Ä‚ˆÄ…ŠÁ¿—–¾ ¼¬§»¶¬µ¾³±È¸«Ð¾¦ÖÁ¢Ñ»–Ьˆ¯oT®\G¤G5¨>0ÂG?àWQïWVñNOé@Cê=?æ<=â=;ß=:×=5Ñ:1É90Á80Á<5¹:3¸=5ÁOEÇXMÇ]OÑeXÓcUÂL>¼:-Å8.Ò91×4-ß2,ç60æ40á2-à5.ã<3çC7æC4â:-ß3%ê5,æ.&ð0-ï/,ð31ñ54ç-.â24çBF÷X]öW\ÿouåDJëHMà@Æ02Ö:=òHKî9>ð7?ø=Fò7Bè-8ô>Jÿ]gÿmwÿjrÿcn÷]gú^kÿaoÿ]nùYeò\]ãPIâJGÕ74Ò/0Ù54Ò0.Ø95ßD?ãJDâIAÙ@8Ó6/Ö4/Ü71è66ê'/ü0<þ2=÷+6ù0:ÿ>Eý?Aì44â3.à5.Þ6-ß4,á3*è3,ï4/ô41ö01÷/2ù.1ø-0ø..ò/-ë2-ã7-×9.Ñ?2¶0%²6,°61èpoÿ‡ˆÿ†Žÿp‚ücxñ\pôXn÷OiûBbÿ9aÿ`P@`P@_O?_O?_O?aQAbRB_O?]M=]M=aQAcSCbRB`Q>dS?aP>]P@^QI[QPZSZeapsq‰yxšz|¥~€±€¹}ºxz·rs´lo¶twÈv{Ì€ƒÊ‹Æ–—䤾²°»¼¹´ËƳÓ̰ÙϬÛϧÜÏ£ÝУÙ˜٘Ѩˆ¸€g ^FËzgÖue½H?×QN÷ccéKLå?Aâ89ä::â:9Ü75Ù61Ö;6Ë81À5.ÇB;»<3¿I?ÆXK¹OAÎdVÑcTÌXIÅG9Ä:/Í6-Ø7/á6/ã4/ß0-ß2,à70ä=4à<0Ý7)ß5(å7,ä/$ê/&ì/)î1-î20ë40è51â64×79æJNõY]íNS×8=×6<ùX`ÿ~„ÿ~†ÿouÿgoÿipÿflõ\añX[ûZ_ÿUZÿDKü8Bû7Aö2>î+9ì0>ñ=HÿS_ÿ`iÿgrÿepþbmÿcnÿ`oý]gíSSßF@Ö85Ö41×11×/.Ø31Û94áD=ÜB:Ù?7Ö<4×90Û81à93æ66ð7<ó4;ó4;ö4<õ6;ò59ë33ã1/Þ3,Þ5.ß7.à5+ä3+é2,ï2,õ20÷12ø03ú/2ù.1ù//ó0.ì3.å7.à?5Ì8,¿6,¯/&¸;7ÒXWÿ˜šþ{ƒÿm€ÿe|ø\rðPhôGeüCeÿ;dù9`õNlÓRd‰=?P, C;&CG.KM5Y_CZjEcxMqˆZx’bx–`t•\r–Yq˜Yl•Sm–Rn—So˜Tr™Xt›Zuœ]uœ[t›XtWv Xw¡Wv¢Wv¢Uu¡Tt S{¥[{£]zž^u—[m‹Ub~MXrCSj>AW0?U/`P@`P@`P@_O?`P@aQAbRB`P@_O?`P@bRBcSCbRB`P@fVG_QF\OG^TSaZad`omkƒvw–wy¢{}®}¸x|¹quµkp´lo¶nq¾uvÐ|~Õ‰‰Ó˜˜Î¨§Ç¸¶ÁÉźÓαÛתâÛ¥çÞ¥æÝ¢äÛ¤âØ£ÛÑ ÔÇ›Ó¼š»œ€©}dÅ‹wÊ}m´VJÒa[örpìZ[çKLã?@ç=>ë>@ç;;â66Û64Ö=8É83Ê?8¹6.¸>3½K@¶H;È]MÝo`Ô`QÆH:½5)Ä0&Ô6-Ü5-Û0)â51å95ä=7à<3Ü8.Û5)ß4*ã5*ì7.í5+í2+ë0+ç0,ã2,á4.Ý52Ö87Ø>@äJLóW[ú^bü\dþ]eÿaiôS[ïNVñQYÿ_gÿjqÿflõZ`óNTí4:ñ,5ô*6÷-9ñ'5å!-æ'6í7CþPZÿZdÿblÿdmÿenÿcmý[hõQZåEEÞ<7Û64Þ63ß55Ü30Ú2/Û62à>9Û>7Ø;4×:3Û81ß82å95ç:6é9;ê7:ë7:î79î79ì65å31ß2,Ü3,Ý6-ß7,â6,å2+ê1,ò1,õ20÷12÷03ú/2ù.1÷//ó0.ì3.å7.ß<3Ô=2Â8.¶1*·74ØZ[ÿ“ûs}ÿfzÿ^vùWo÷OiùFfû?bü^QA^QA^QA^QA_RB`SCaTD`SC_RB`SCaTDaTD`SC^PCbUM\QM[QRcYbkdtqm„vu•y{¤y{¬y~¶x|»nsµei°`g¯jn¸ruÆ}}ׇ„Ý—”Û©§Ø»¹ÏËÊÈÜØ¿åá´éäªíè¦ðé¥íå¤çá§âÛ§×Ï¡Ëܸ¯©››ƒk¨ƒp§o`œRGº]UÝmi÷uuï__äJLå@DëADì>@è8:â66ß=:Ô;6ÔA:Â70·7,·>3®=/¶F8Ûj\ßi[Ù[MÊB6Å2(Ñ4+Ù6-Ù2,Þ52éA>ìGCà=6Õ2)Õ1'Ú2'Þ0%æ4*è1)ç.)æ/)ã2,â7/á=4àB9Æ-(Ê43ÜDCðVXú^b÷ZaóS[ñQ[èFQêHSïOYü\fÿmvÿntôY_ã>Dé.5ô-4û2<ü2>õ+9í'4ö6EÿKW÷ISõPWøW_þ^fÿckÿ`i÷RYéBIÞ97Þ71ã75é<8ë;;æ95á51Ý60Ý:3Ù;2×90×90Ü71á83ç:6é<8ã99ã99å97ç98è88æ74á40Û2+Ú6-Û7-Þ8,â6,ç2)ë0)ó0,÷10õ12õ13ø02÷/1÷//ò0.î3.ç6.Ý90ÜD9Ç80»4.µ/.ä_bÿƒˆølwþbxþWsúPmþLlÿCfö:]ó;_ìIfÔSgDJl;4O>,=<':?(ED/FH0Q\U'B\/E_2Ic6WJ:ZM=\O?^QA]P@^QA_RBaTD`SC`SC`SCaTDaTD`SC_RB\PDZOMZQVbXcjcsqm†vu•xz£z|­w|´sy·mr´bi¯]d¬ag±lr¾x{ʉ‰ß•‘夡䶵áÇÄÙÕÑÎáÝÄçä¹ëæ¯îê­îè¬éâ«ãÛªÚÓ©Ë¡»¶™¥¥›™„“ˆv˜q™rc›bW³i`Ïrmû‹‰õutê[]æLNèCGí@Dìô@?ï=;æ95à72Ý82Ú91Ù80Ù80Ü71ã73è96é:7â:7à;9ã:7æ:8ç:6å84à5.Ú3+Ú6,Û7-Þ8,â6,ç2)ë0)ò/+ö0/ô22ô23÷12ö01ö0/ò0.î3.ç6.Ü8/àF<É91¾3.¶,,îfjÿy€øgtÿbyýTqþKkÿGjÿ>cò6Yë=^ãQhÄXeˆBBgC7[N;GF1AC-JH3EE-LU6Sc>btLlƒUp‹XnRkPiŽKgIhJh‘Kj“Mk”Pm–To–Wp—Vt›Xs›Uq™So—Pj“MgJeŽHdG`‡D]AWy=Rq8Mi6Lf6Ne7Of8Lf7Oi9Sm>UH8WJ:[N>\O?]P@]P@_RBaTD_RB`SCaTDaTD`SC_RB_RB^QIVMR_Xhnf{tp‰xt—xw¡xz«y{´sy·jr³`g­[c«_g°jr»v|Æ€„Γ•àžžä­®ç»½æËÉßÔÓØÝÛÎá߯åá¾æâ¼äß¹à×¶ÚÐµÎÆ±¾µ¦­§›˜šŒŒŽ€‰…yŠ|q‘vk›si¨meºoi扄î~ósrñedñWYðMNîDEì@@ã:7à;7äB=ÞE?Ì<3Æ=3ÄB5¯1#®0"ÇI;ÜXKÖN@Ì=/Î8*Ð6*Ñ3*Ö42õUUÿkhú]XãD>Ü;3ß;2ã80â4-ã2,â1+Ý0)Ô0'Í/$Æ/$Â0#Å9,À4'Á3)Ë:5×CAÛEGÛBGÚ@HàDOëOZòVaòVaú^iÿgoóYaáBGê:<í57í38ï28ñ3=÷9CÿHSÿV_ä6?Ý4;ß6;ëADùJOüIMô;Aé13è51ë95ï<8ò<9ó;9ð:7é73â70ß;2Ü;1Û:0Ü90ß82ä73è64é75æ:8ä;8æ:8è:9è;7æ95á6/Ü3,Û7-Ü8.ß9-á7*å3)é1)ñ0)ô1-ó32ñ33ô22ô01ô1/ò0.î3.ç6.Þ7/àC:Ê70À1-À13÷jpÿqzúftû]túPmÿCfÿ=dÿ9cõ8^æEdÙZm«V[wE>dJ=aYFTO;KI4PI6GE.GP3L\8ZlFf|Nm…SmŠRlŒMhJfŽHgHg‘Ii’Lj“Ol•Sn•Vo–Ut™Vs˜Un•Rj’LfKcŒHaŠF_ˆFZBX|?St;Pn8Ok:Rl=Wn@ZqCUo?Vq>WqARE5UH8XK;ZM=[N>\O?^QA`SC`SCaTDaTDaTD`SC`SCbUEaVP^Vcje|yu}yšzy¡xy©vy°sw´jr³cj°[c«]e®hp¹v~LJшŒÓ™Ý£¥à¯³ã»¿åÆÇãÏÎÞÔÓØ×ÖÑÙ×ËÙÖÇ×ÑÅÒÉÀÌþʹ´¨¬£šŠ‹†x{tyvquleleogŽa[`[ÀsmØyuð{ü|yÿrpýccöSTðHGïC?ê>:á<6àA;Ñ:1ÓC:ÝTJÂ>2¸6)½9,Â=.È?/ÏB1×C5Ö@1Ñ7-Ð2/êLMú_]òWSßD?Ù:4Û81à70æ93ç92ç92â:1Ú9/Ñ9,Ê8+Ä8)°(¸3"È@2ÓI>ÒD@Ë;:Ì7;Ï:@Ñ7AâHRíV_ðYbõ^g÷`iêU[ÜAEå@>ì?;ñACúGJÿLTÿQYÿT]ÿV^á4:Ú/5Ü/3ç7:ô=Aø;?÷48ó12í42ï95ð86í42ë20ê20ç40á4.ã<4à=4ß<3Þ;2á83ä73è43è43è88ç98è88ë99ë97é75â5/Þ3,Û7-Ü8,Ý:+ß7*ã2(ç0(ï0(ò1,ñ42ð43ó32ó11ó1/ñ1.ì3.ç6.à91Ù<3Ì71Á0-Ñ@CÿnuýkuùbqðRiõHfÿ;aÿ4^ÿ6bû>däNiÊ\i‹GFjF:]L<]VCXQ>RJ7OG4ID.DJ.GU2Sc>^sHgMj‡OjŠKgŒGgŒFfŽGfHgJi’Nk”Rm”Um”Uq•Uo”Qj‘NgŽKcŒH`‰E_ˆF^†G\‚E[~DWxAVr?Uo@YpB]rG^uG[sCYtAXs@NB2QE5UI9WK;XL\P@^RBaUEbVFbVFaUE_SCaUEfZJh]YngwupŽ|x™{y wx¦vw­pu¯jo¯ah¬^f®_g°em¶pxÀ}…ؙ͉ؗ Ö¡¨Öª±Û´¹ßº¿ßÀÁÝÃÃÛÇÆØÆÃÔÅÁÐÁ»É¼³Ä»°Áµ¨¼¦˜¯–‹œˆ…Œqqqtpopfewhe†nj„_Y•d_›ZT¹f`Ùsnðzvÿ{wÿwsÿhfüZWþRNõHBæ=6çD=Ø;4ÛG=ê\RÅ;0Ä<0½7+¾6(Ç>.ÑD3ÔB3ÔA1×A3Ò86Ø>>ÝCCÜB@Ö=7Õ81Ø7/Þ7/å:3æ93å:3â;3Û>5ÕA5ÑE8ÌG6®-¼;%ÍJ8ÑL=Æ=5»0+À00Ê9>×AJáKTëU`ðZeð]eìYaßLRÔ>@Ï4/Ø7/à;9ê@@òCHõDJñBIî?Fâ5;ß26ã36ï8<õ79ø14û/2ü14ï20ð95ð74ì0.è,*ç0,æ3.à3,ä=5à=4à=4à<3ã:5æ95ê65ì65ì57ì57í57î68î66ë54ä2.Þ1+Þ7.Ý9-Ý:+ß7*á4&æ1&í1(ñ1,ð42î53ñ42ò21ó1/ñ1.ì3.ç6.â;3Ò4+Ò:5Æ20çUXÿpxùcnòZiçI`óEfÿ8bÿ/]ÿ5bÿBhÜLe±PYj5/^G7XK:UN;[P>VI8M@0JC0@F,AO.K[6Xj@bxGfJhˆIf‹FeŠDc‹BcEeŽHgLh‘Oi‘Rk’Sn’RlPhNd‹JaŠH_ˆF_‡H_‡H_…H_‚H]~G]yF]wH`wKcxOczN]uC[vAZu@JC3MF6QH9TK.ÑE6Ë>-Á2"Ê7'ÛE7ÞE?Ó97Ì3.Í50Ô;5×=5Ý<4á=4ä;4ä92Þ5.×4+Ï5)Ê8+Å<,Â?-ÔS>ÈG2½<)¾:-Ã=2Ä;5Â74Â43ÜKNÞMRáPUåTYèY]åVXÜMOÓD@É5+Ñ7+Ø7/Ý52â24å26æ18æ.6ì4>ì3;ó5?û9Bý4>ú+5ÿ(3ÿ/9ø-3ù57ù59ð./ë*+é0.è51â5/ã<4à=4à=4á=4ä;6ç:6ë76î66ì46ë35ì25í34í55ê41ã1-Û0(Þ8,Ý:+Ý:+Þ8(à4&ã3$é3&ì4*î50î52ð42ð3/ò2/ï2,ì4,ç6.ä=4Í/&×>9Ì35ùbgÿoy÷[iðNcêC]ùEhÿ:eÿ0]ÿ6aöGhÉJ]“CFR,#VI8SL:OH6[O?UI9F?-HF1>B'@J(IU1Sd:_rEe}Ig„JeˆHcˆCa‰BbŠCcEeŽHfMhPiQlPkMfJcŠIaˆG`‡F`‡H`†I^G^F_}G`|Ia{Kd{Mf|Nf~N]xC]z@^{CDB6FD8JF;PG>RH>WI>]M>_O?`Q>aR?`SB_VGbYRgb_ojnso~wq“zt |y¨yw©pp¦gg£`a¢\_¤`b­fhµopÀyzÌ„‚Ö‹ß–’眙栞ݡ¡×££Ù¤¤Ú¦£Ø¥¢×¥¡Ô¤ Ó¥žÑ£Í¢šÉ¢™ÈŸ–Ù»Ž‚°ƒ|žrn}igld^`fZZkYUrWP}WNŒWO•RI¨ZPµXPÁZSØkdìyrù‚|ÿ‹†ùuqÿusí_]ßPLÙEAïZTÌ71Å2*Ä6*Ã7(À7'Ã7&Æ9(Ê;+Ð<.Õ?1Ò8.Ö<2×?4Ó;0Í5(Í3'Ø:/â@5à90á90Þ7.×7+Ï7)É:*Æ?,ÄA/Â=.Æ@4ËE:ÍG<ÌC;Å<4»2,¶+&Ç<7ÐEBÙOLàVSãYVáXRØOIÐC:Ì;*Ó:(Ü8,â5.è./ì*2ð(3ô'6ú->ú+?û*?ý)?ÿ(?ÿ&?ÿ$<ÿ$<ÿ$8ÿ'9ÿ+<þ,9ó+5í.5è45ç;9Ý84Ý:3Þ;4à;5ã:5æ95é73ë54ë35ì46ë54é54ç53â5/Ý5,Û5)Ü8,Û9*Ü9(Þ9&ß8&â7%ã6%æ4&ì5-í4/ð50ñ4.ñ5,í5+ê5*å7,à90Ø7/Õ:6Û?BÿmwÿbsûSjõIcÿKjö6[ÿ6_ÿcçNj¯IV^$"D, ?:'HE4PMC/?G/BH&EK%KS.S]8[kDavKd~NdƒJb†F`ˆBa‰@c‹BeFhJlPm‘Ql‘LiŽHgŒGf‹HfŠJe‰Ic…HaƒGdƒJdIbGc~GdJdHe~Ga}C[{<\=_‚B=?4?A6FC[K>]M=`O;`Q<^SA^VIc[Xhcinlyso†tp•vpžtp¢pm¢gfŸaaŸ]^¡\\¤ed°kjºtrÅ}{φ‚Ù‰à”Žæ˜“å›–Ùœ˜Õ™Öžš×ž˜Ö—Õœ–Ô›•Ñž–Ñœ”Íœ“Ê›’ǚ牻ˆ®‚xtk|mdif]^f[YiZSoWM{UJŠVKšVK°\RºYRÁXRÓfaàqjãvoí~wý‡…ÿ‡…÷usîgdãUSëZUÇ2,Â/%Å7)Ã7&À7%Á8&Ä8'È;*Ï;-Ó=/Õ9,Õ9,Ó:,Ò:,Ñ9+Ñ9+Ô8+Ø8,ß;1à90Ü8.Ö8,Ï9*È9(Á:&¾9&¾6*Á80Æ=5É@8ÊA9È?7Å<4Â91¿4-Ç>6ÑH@ØOGÚQI×NFÌC;Ã7*Ê7%Ó8$Ý7)å4,í//ô+3ù)7ý(:ÿ+@ÿ*Aÿ)Aÿ&Aÿ#@ÿ!<ÿ=ÿ:ÿ:ÿ 9ÿ%;ÿ);÷-9ð19ê7:å;;Ü94Ü:5Þ;4à;5ã:5æ95é73ë52ë35ì46ë54è64ä71ß6/Ü5,Ù5)Û9*Û9*Ü9(Ü9&Þ9&ß8%á8%ã6%ç5+ê3+ë4,ë5*ë5*ê6(ä7)á7*ß;1Õ4,Ó54óTYÿesÿ[põGbÿIhÿAdÿ;`ý3[ù;aòMmÍLb‰8?S*$A5'69(;<,B@1DA0@?-=B.>G,=CKP'\b_„?b‡B69.:<1??7DA:KB;OE/Ô>/Î6(Ë/"Ú:.Ú8-Ù7,Ö8,Ð:+É:)Â9&¾7$½5)À6,Â8.Ä:0Ç=3Ê@6ËA7ÌB8Ç:1Ê@6ÏE;ÐF<ÒH>ÑG=Ê@6Å7+Ì6%Ö6&ß7,ç4/ñ03ö-5û+9ÿ*<ü';ü'=û%=ù#;û!:ú7ü7þ6ÿ8ÿ6ÿ$8ý*;÷2<ñ6=ë8;ä::Ü94Ü:5Þ;4à;5å95ç85é73ë52í36î47í55ê65å61á6/Ü5,Ø4(Ú8)Ù9)Ú9'Û8%Ý8%Þ7$à7$á6%á5'â4)ã5*ã6(ã6(á7(Þ6)Û7+Ý<2Ð1+Ø88ÿkrÿ]nþPiñ<[ÿHlÿ7]ÿ>eù5[î>bæVqª?Qa#(L/);7+07'37&9<)@=*A<(@>)BB&?FXa4s~T€Œdw‡`hSa}La€G`ƒC`…?a‰@cŒ@hŽEjJkMl‘Nn“Mk‘HhHgŒGh‹Kh‹KfˆLd†Je„KdƒJc€FdGf‚Hf‚GeFb€Bc†DeŠEhH25*58-;<4A>7G@:KB;RE.Ñ>.Ë8(Ç/!Ò6)Ó5)Ò4(Ò6)Ñ9+Í<+È=*Ä;)Ä:-Ä:/Æ90Æ9/Ç:1È;1É<3Ë=3ÓD<ÓE;ÐA9Ë=3Ë<4ÏA7Ï@8Î;1Î5'Ù5)â5.ë31ò/5÷+6ù)7ü):ù&9÷&;÷&;ø'<û&<ý%:ÿ$:ÿ#:ÿ"7þ#7ú%7ù,;÷5>ò9?è8:à87Ü94Ü:5Þ;4à;5å95ç85é73ë54î47î47î66ê65æ72á6/Ü5,×5*Ø8*Ø8(Ø8(Ù8&Ú7&Ü7$Ý6$Ý6$Û5%Ü6(Ý7'Ü9(Ü9(Û:(Ù9)×:+×:1Ð3.ëHKÿoyÿVjøD_ø<_ÿAgÿ3\ÿ8bø>cèMlÅOe€0=J C1-11'.6'4=,=B.B@+B<$E>$HE$U\0p~MŸr—¨|ƒ˜mj„W_{J]~E_ƒCa†@bŠAfCkJl‘Lm’Om’Oo”Nl’IiŽIhHiŒLiŒLhŠNg‰Mf…LdƒJdGe‚HgƒHh„If‚Gd‚DgŠHiŽIl‘L-3'36+891<;6B=9G@:MD=QG=SI=SK>UNDZUQa^eigumklkŠjhb`XVˆPP†QQXYš`cªfj´orÁuxÉ|Ђ…Ö†‡Ù‡ˆØŠ‰Ù‹ŠÖ‹ŒÏ‹ŠÌŠ‰Í‰‡Ð‰…ш„ÑŠƒÑ‰‚ÐŒ„Ï‹„È…Á†º†°‡¥~w–m…„Yj€SZnVTc\RZaOZ_HeZDxUB’LD¸TRÐSWÛRYå^dèejãklæuqäunâoh÷~vÿ‚{ÿ‡~ôl`É?2Á8(À;(¿='¿='À<'Â;'Å:'Ç8(Í7)Ø:/Ù8.Ò8,Ï9+Ì:+É:*È9)É7(Ï9+Ñ7+Ò8,Ñ7+Ï7*Ì8*Ë<,Ë>-Ê<0É=0Ê<2É;/È:0Æ8,Å7-Å5*Ð@7Ð@5Í=4É9.Ë80Î;1Í:2Ì5,Ð/%Ù0)ä20ì25ô/8ù-9û+;ü,<ü-?û.?ü/@ü/@þ/Aÿ/?ÿ-?ÿ.@ÿ)9ü)8÷+7õ0:ñ6=í8=ã77Ü43Ü94Ü:5Þ;6â:7å95ç85ê65ì44ñ48ñ48ï56í76æ72á6/Ú6,×5*Ø8*Ö9(Ö9(Ø9&Ø9&Ù8&Ú7&Ù8&Õ8%Õ:&Ö;'Õ=(Ô=(Ô=*Ô=,Ô<.Ñ7/Ú;8ÿ^eÿaqÿPi÷<[ÿAiÿ4_ÿ4`û1YôKlÛYq•>NZ%-C),:2/-0)08+7@/:B+<<"A<UH(`[5{…S£lª¾‹¨¾Ž¥wo‹[aK^F`„DcˆBeDj“Go”Np•Po“So“So”Nl’IiŽIgŒGiŒLiŒLi‹OhŠNf…Je„IdƒHe„Ig…Ih†Hg…Ge…DiŽIi‘Kl”N+1%.4*470893>:7B=:HA;KD1Î8*È4&Ê8)Ë<,É:,È:,É;/É;-Ê:/È9+È5+Ç5(Ê6,Ï;/Ò>4Ó?3Ö?6Õ>3Î7.É,#Ò+%Ü-*ç02ð39ö1;ú0<ý0?ý0?ù0@÷1@÷1@ö0=÷/<÷-9ú,9ú*7ý/<ù/;õ0:ð3:í6;æ69ß55Ù42Ü94Ý:5ß:6â:7å95ç85ê65ì44ò59ò59ð67í76æ74ß6/Ú6-Ö6*Õ7+Ô8)Ô8)Ô9'Õ8'Õ8%×7'Ô9%Ð9$Î<%Ï=&Ï?'Î@(Î@*Ð?.Ò;0Ñ61ëHIÿfrÿOdÿHfû7[ÿAmý/]ÿ7aò4XãPj¼Ufm19E(*E697325406906=-3;#38CCja:…TŸ®w©Á‡µÎ—¯Ç“’®}v”be†Q`‚F`…BcˆBgFm–Jr˜Or—Rq•Up”To”Nl‘KhHf‹Fh‹KiŒLi‹Ni‹Og†Kf…Je„If…IhˆIi‰Hi‡Gf†CjJk“Mn–P(0#+1'/4-350764<85@=8C>8IEù4>ù1>ú0@ø/?ò.<ï/<í/9í07ï-5ï,2ò+2ñ*1õ2:õ3;ò5;ì59å57á55Þ65Ü75Ü86Ý97ß:6ã:7æ87é77ê67ì46ô5:ô5:ñ7:î87æ74à70Ú6-Ô6*Ó7*Ñ8*Ð8*Ð9(Ð9(Ð9&Ñ8(Ð9&Ë9"È:"È>$Ç?%È@(È@*Ì=-Ï;1×96üU\ÿ^qÿGcÿ?aÿ:aÿ7gþ3bû8`íFdÅNa‰@IS12A64@:<:46?56<7179+4="9CSZ.‚‚P¢§q±ÅŠ¯ËŽ°Ì’¦Ã’®}{™egˆQ_E^ƒ@c‰@iDo•Js™Ps˜Sq•Uo“Sn“NkJgŒGeŠEgŠJh‹Ki‹Ni‹NfˆKd†Id†IeˆHgŠJh‹Ii‰Hf‰Ej’Ll–No™Q&.!(0%-2+13.331764:95<;6GD=DD*¾;'¼7$À4#ÑB2ãOAäN@ØB4Ë7)Ë7)Ð>/Ê;+É:*Ç8(Æ7'È6'Ê6(Î8*Ð8+Ó;.Õ;/Õ9-Ò6*Õ7,Ú<1Ý<2Ü71è88ñ8=÷:Aû9Bú4Aõ/<ò,;ï,:í/;ê19ê38ë48í57ñ56ô36ó57ð37ï6;í9<é69â45Ý33ß76à;9Ý86Þ97á96ã:7æ87é77ê67ì46ô5:ô5:ñ7:ì89æ95ß82Ø7/Ó7+Ð8+Í:*Í9+Ì;*Í:*Í:(Í:*Ì;(Å9"Â:"Ã=$Â>%Ã?(Æ?+Ê<.Ï81ß<89?48E26C41=:)>E&FU*bs?›a­½±ËŒ«É‹¦Ã‹º„ެz{™ef‡PZ|@^?a‡>hŽCo•Jr˜Or—Rp”Tn’Rn“NjIf‹Fd‰Df‰Ih‹Ki‹Ni‹NfˆKe‡Jd‡GeˆFgŠHh‹Gh‹GeŠDk“Lm—OpšR(0!'/"(-&).(.0-3317839:4==5?@8DE@JLKORYVXeZ\s]^}YX‚[Y‹^]–ee£nn¶wxÈØ„…⌌ðŠŠì†‡ä‚‚Ü€€Ö‚€Óƒ‚΀ƒÈ„ǃƒË„„ΆƒÐˆƒÓ‹„ÒŒ„ÏŠ€ÅŠ€¼‰€¯‡}Ÿ€xwozkegf]Xm[Qm[Mi\Lf^Kd_IeaHhaGo_FoP;…UA¥]O¿aYÑYXÝQTîS[ø\`ùheæYPÔD<Î70Ñ7/×:1Ö=/Ô;+Ï9(Í:&Ï9(Ñ:)Ô8)Ø8*Ü5,Ü5,Ð/%Í3)Ì8,Ê>/Å@/Á@-¾=*¼9'Â9)¾0"éWJßK?Ã/#Ñ=1Î2Ü<0Ù7,Ú8-â>4ìC<õBEò9?ð2<ö4?ö2@ñ-;í-:í2=ì7>æ5;ä68å78ë99ð:9ñ78ï77ò;=î<<ê::æ87á85ß74Ü75Ü75Þ97á98ã99æ::é9;ì9<í9<ï8<ô7;ó6:ð8:í9:ç;9à;5×90Ï7,Ê8+È9)Ç9+Æ:)Ç:)Ç:(È;*Ç<)Á9#Ä='¾:#¶4¼9%ÉD3Ï?6Ê1,ÿ^eÿVgÿIbÿ<\ø1X÷0Yû6cõBiçYo¬FQo33N3,B?6>C<@78@-1L/3K2.A9&DJ(Zn=~š_ž¸w¨Å‚¬ÊŒŸ¾‚˜¶€”²~‚ nf„RXvBY{?]€>c‡AiDn”Im•Ll”Nk’Ol‘NiŽIfŠDc†Bc†Bf‰Ih‹KfŠLdˆJg‹MhŒNg‹Kf‹HeŠEf‹EjIk“Jq›QržSt U*0")/#).').(-/,130561782;<4>?7AD=HJGOPTSUaXYkZ\u\Z^]‰db”kj¤utº~·‡ß‹Œéð‰‰ë…„ ؀~Ҁς‚Ì…†É†‡È‡ˆË‰ˆÎ‹ˆÏŒ†Î†ÌŽ…ÈŠ€¼‰±†|¡‚x‘{s€tknlb`e]Re`Me^Kf^Kh]Ki\Ij^Hk_Gn^Ew_G[C’YF­ZLÇVPÞRSõQXÿX_ðUSãLEÙ>9Õ60Ù6/Ü90Û9,Ö9(Ó8&Ñ8&Ñ8(Ô8)×7)Ü6*ß4,Ý5,Î0'É5)È9+Æ=-ÄA/Á@-¿<*¾9(Ä8)Ë<.äREÜH<È4(Ì:-È:,Â4&Ê=,Ë<+Ê;*Ê;*Ë:)Ì9)Î8)Ï6(Ó7*Ö8,Ù7,×3)Õ1'Ø1(Þ7.ç<5øDGñ8>í/9ï/:ð0=î.;ë1<ë6?ä5:Ü36Ø22ß:8îEBøIFøDCó?>é:7ç98å97â96á85à85á98á98à87â88å99ç9:é9;ì9<í9<î7;ó6:ò59î68ê88ä;8Ü:5Ó9/Ë7+Æ8*Ã:*Â:*À;*À;*Á<)Á<+Á<)½9$Á?)»:%³5¹:'Á;/Ê:2Ø<=ÿ^gÿPdÿA[ù8Wö6[õ;`ô>dãIe«?Lƒ?>_:2G;/:>08>2F<:R>=N0.S8/VK5ciEx[°pÂ}¡Æš¹}š¹€š¶ƒ©xrŽ^YuETp=\{B_@b†@iCm“Hl”Kk“LiMiMgŒGe‰Cc†Bc†DgŠJiŒLhŒNg‹MiOiMiŽKgŒGgŒFfŽEl’Im•LpœQoRt U-1"-1#,/&,.)//-11/34/45-9;0<>1@B7EHAKMLQRWUUaVWi\Yt^]fdŒpn zx·…ƒÎ‹ßêŽïŽŒíŠ‰ç‡„ßÓ|Ë}ȀƅLjˆÆŠŠÊŒŠÉŒŠÉŒˆÅŒ„¿‹‚·‰€­†|¡€v{p€ujpndbi_Vc]M_aL_aKc^Jg\Jl[In\Ho]Gq]EwaIxX?‡S=£VDÇXOãUSøOTþMSâ><Þ<7Ý84Þ71á6/á6.Ý7+Ú7(Ô7&Ó8$Ó8&Õ8'Ø6)Ý5*à3,Ý5,Ë3(Ä6(Â9)Á<+Â?-Â?-Á<+À8(Ã5'ÜJ=ÚF:ÕA5Îå84â62à72à72à72á85â96ä;8ä;8á77ä88æ8:è8;ë8<ë8<ë8<ì8;ï58î47ì57ç77â:7Ù:4Ï8/Ç7,Â8+¿:+½;+»<+»<+»<)»<+»<)¸9&½@*³9$±6$¶;+µ0'Ã40ìPTÿ[iÿJ`õ:Uð7Vñ@]ïHfçHdÍNa‚89e?6R@2DA09=,57)>6+K9/E-#R=,g]Bˆ_’«t—»{–Áz–¿{”³xœ¸…š´…€šm\uKHb5Nh8[xB_}?cƒ@hŒDl’Gj’Ih’JgLfKd‰Dd‡Cc†DeˆFh‹KkŽNkOjŽNiOiOiMhJgHh’Hl”Ko™Ms¡Vs£Wv¤Y24&04&01)01+12-23.34.46+9;-;>-?A3DF9IJDMONRQWSS]XVd\Zoda~nl”zw¬„‚ÃŒ‰Ö‘㔑ê“뎋≅قÌ|Ã|¿€~½„‚Á†…Á‰ˆÂŠÃ‹ˆ¿‰…¸‡®…}¤…{€vŽyn~rgmmaak^Vi[Pc\J]`K]aJc^Jh[JmZKqZJtZIv[FsWAxR;ŠQ=ªYFÍ[PãTPðFIñ>AÛ2/Ü5/á51ã60ã5.á5+à6)Û8)Ö7$Ó8$Ñ8&Ô9'Ø6)Ü6*à3,Ú6-È6)½8'¼7&½:(¿>+Â?-Ã;+Ä8)Æ4'éUIÓ<1Ì8,ÑB4¾5%À=+À=+À8(Ä8'Å9(Ç:)È9)Ë7)Ì6(Í3'Ò6*Ô3)Õ2)Û4,ã:3é>7ì?9ì=:è45ì59ï6;î5;ê2:æ39ä7=â<@óUVübbÿmjÿidóVQäA<ß63Ý4/ß61Þ71Þ71ß82á85â96å97æ:8å78æ89è8;é9<ë8<ë8<ë8<ì7<î5:î68ê67å97ß<7Ö<4Ì9/Å9,¾9*º;*¶;)µ<)µ<+´=)³;*³<(³:'·@,­8&­8'³;-«+"Ã54ý`gÿTdúG\ð-=@-@C.DG4IK>MNFQPNRRRVUSYX]a_lkius›€}²ˆ†ÇŒŠÓ•’ᔑâÜ‹‡Ó„Ä}º|µ|³~·„º‡„¹‰…·Š„²†¨z›€xs‡znzrfjm_^j[Ti[PjZKfZJb_Lb_Le^Li\Kn[Lr[Kw\K{ZG~UA†R=›RA¶VFÎRHÚG@â88å33Ý1-ß3/â5/ã5.á3,ß3)Ý5(Ü9(Ó8$Ð9$Ï:&Ñ:'Ô8)Ù7*Ý5,Ø7-Ä;+¹:)µ6%·8'½;+Â=.Ç;.Ç7,Ð90õ\TÖ=5É5+ÏA5¸3$·:(¼?+¿:)Ã:*Æ:+È:,Ê;-Ì:-Ï8-Ñ7-Ð3*Ò1)Ö1+Þ71å<7ê>:è;7æ74é75ï;<ðë8>è7=ê7;î7;î79ê7:ä::ß=:Ö=7Ë;2Ã;/º8*µ:*³;*¯<)¯<*¬<(¬;)¬;)ª;(¬=*¦8'§9*ª8-¬/)Ë@CÿhrôM^óH[íDYåH[ÙO^ÉT]·TWœXUdM?OL9LG4JE1FD-?B'=D#>H#KV.\g.==1==3==5;<4;=2;=/?B/@D-CG.FJ3KL:NOAQQIRRHYWJZZN_^\gerqn‰{y¡ƒ€·‡…Čьӊϊ…ǃº~y¯zw¦yv¥{v¬|y®€|®ƒ}©ƒ}£x—|t‹zrvksrffm_\j\Sk[NlZLl[Kk[Ki]Mg^Mi]Mj]Mn]Ms^Mz]MZI“`O›VG§N@¸J=Å@7Ï6.Ø1+Þ1+á51á6/â5.â4-à2)Þ4'Ü6&Ú;(Ñ9$Í;$Ì;&Î;'Ñ:)Õ9*Ù7,Ó9-Á>,´;(°5#²5#»9)Ä<.É;/Ë7-Ù?7ø[TãIAÎ:0Ì@3¸6&¬3 µ<)¼9'¿7'À7'Ã7(Å7)É7*Î7,Ñ7-Ù<3Û:2Þ93å<7ê>:ê=9ç85ã41è96ë<9ì::è8:ì>@øPPÿbcÿppùheâTPÊ=6À1+É40Ö;7ß=:à;7â;5á:2â94á83ã73ä73å55æ66é69é69ê7;ë8<ë8>ê7=è7=é6:ï8<ì89è8:ã;:Ý>:Ó>7É<2À8ÛTXûepîK\ïI]éJ\ÛM[ÉQZ´VV ZRŠ`RPI7HM9NI5H@+;567>O%Lf6lŠTw”\„›e‰šd›f£k”­t˜°|ƒ•mn}\Q`Cg{HiƒFl‹Gm‘Gj“Gf’GbGcŽGhJlMo’Pn“PlMiŽKjJj’Ls›TsUsSržQržOs¢Rw¦Uz«Zv¦Zu¥[s£YRK;RK;RJ=RJ=RJ=RJ=RJ=RK;UNXQ?YR@[TD\UE\UEb[HaZHaYLbYRe][kaiqftuj{zn„|pˆs‹s‰|p„uj{mbre]jc`k`_g_\c_Z^^ZY^YUaZRbZOe[Og[Ki\Kk\Ik\Gm]Fm]Fj^HicMqfTqZJuOB‹WJœ\P£YL¬ZL¥N=¦E4§<,±7(Â8-Ñ80Ü41Ý1-ß6/Þ7.Þ7.Þ7.Þ7.Û7+Ø6)×7)Õ8)Ô8)Ò9)Ò9)Ò9+Ò9+Ô8+Í;,½;+¶>-®9(©1 «2!·9*ÀÔH9Â=,·2#ÝPFØJ@ÔF<ÔD;ÚG?ÞG@àC>à<:à74æ87ì::ì::ç77â64à93Ü=7ÙF>ÏB9Ä:/¼4(·1&¹5)¿;/Ã?3Ã:0É<3Ò?7Ú?:â=;ç;9ì89í9:ç7:å8:å8:å99å97å97å95å95à40á51ä65å76æ89ç9:ç9:ç9;ë;>æ9;ß99Ü=:ÖA=ÍB;ÁA6·?1©:)£<+ =*›<(™:&–:%—8&‘8&A0‹<-‡/#‘/&¼LJämoçloÍVZ½LNµNOªQM¢UO›XO—]R•aTŠjSWZ/:M7FTa)~ŽP›°oŸ¼yœ½x’µs~ah€L\mCYdBT]BHP9?D0:=,@C2<@1:>0]sBgƒHpKo“Kl’Gj’Ii“KgJlPm‘So“Sl“Pm’Mk“Jm–Jm˜IqœLqžMrŸNr¡Pt£Rv§UyªYzª^y¦cm™ZbŽOWN?WN?WN?WN?WN?WN?WN?WN?XO@YPAYPA[RC\SD]TE^UF_VGd[JcZIcYMcYOf[Uj_]nbdpdhreltgpvirvirsfmm`gg[_bXY^[VZZRYVOWTKXTIXTH\VH^WGcZKcZIf[Ig\Hi]Gj^Fk_Gh`IcbMngTv\MSFšVM«VO°RJ·QE¯H9¬C0¬=,±9)¾8,Ë80Õ62Ù40Ý6.Ü8.Ü8.Ü8.Û7-Ú8-Ù7,×7+×7+Õ7+Õ7+Õ7+Ô8+Ô8+Ô8+Î:,¾<.¶>.®9(¦1 §2 ²:)¹>.¾<.Æ:-Ç4*Ë4)Ò;0ÜE:áOBßQCÝOCÛF?Ø@;Ó<5Ò;4Ö=7Ú=8Ü86Ý33ç77ë78î79ë78ç77å97â=9ÛB:ÊA7¿?4¸:,±6'¯5&²8)¸=-¿@1ÅA4Í@6×@7ß=8ã:7é77ï56ñ7:é6:ç6<ç7:æ89æ87å95å95ã:5â92ã:3ã:5ä;6ä;8ä;8å99å99ä:;ã;;ß<=Ù?=ÐA;Ä?6·=2¬;-¥;+ =*œ=+—<)–;(’:&“8%Œ:%€9'€8)‰5*<5¿QP×eeÑ^a·MM¬NL¤TMYP˜\Q—^S—^S˜_VŒfQ`_/Sg*^r3zO™¯n¥¾|™²pˆ bj‚HauBTe;JX7FP7?H59?158-:^tEgƒHqMp”Ln’Hk”Hk“Lh‘Km‘Qn’Tm”Sm”Qk“Lk”Hl—Hm˜HpJpJp Ls¢Qu¦Tx©Xx©Xx¨^m—Xb‹QY‚H]TE]TE]TE]TE]TE]TE]TE]TE[RC\SD]TE^UF_VG`WHaXIaXGe]Je]Hd[Jd[Le[Qf[Uh]Yh][i]]j^^k__k__i^\f[YbWS_VQZVMWTKUQHRNCQMBSOCWQCXRB^WG^WEaYFc[Fg\Hi^Hk`JhbLbaMngUy_PˆXN¢[U±VQ²IE¸E@¹@7¸>1·;/¸8+¼8+Ã9,É;/Ñ:/Ù8.Û7-Û7-Û9.Ú8-Ù7,Ù7,×7+×7+Õ7+Õ7+Ô8+Ô8+Ô8+Ò9+Í;,À>0¶>.­:(£2 £3ª:&³>,¹>.Ä?0Ä8+Å2(È4*Ð<0ØF9ÜM?âNDÙ:6Ø43Ô20Ö42Û97á=<æ<<é;<í9<î5:ë27é26è58å99á<:Ù@:¾8-µ:+±6'®4%­5%°8(µ<+»=.ÈD5ÏC6ÖB8Ü=7â94è64í55ï79ê69é69é69ç77ç77æ95å95å:3ã:3ä;4ä;6ã<6ã;8â:9á99Þ88Ý9:Ü<<Ú@>ÓB=È?9¹:1­7+¥7(¡;,<+™<+”;)“:(9&7%Š9&z6#y6%ˆ9, F=¹SOÀWT¸PO«IF¢MHœSL™YP—^S—aW—aW˜_V‹ePsrFzV“¦n¤¹€«À‡ž³{|[[oaXIaXIaXIaXIaXIaXIaXIaXI_VG`WH`WHaXIbYJcZKd[Ld[Je]Hf^Gf^Ig_Lg^Of\Pf\Rf\Sh]Wh]Wh]Wh^Ug]Te[QdZPc[N]YMZVJVRFRNBPL@PM>TN@UO?WQAYTA[VC]XDaZGd]Jf_LfaMdcQleUv\OŠ[Q©b\¸ZX¶FD¹<:Ã<8Æ;6Ä:0Â8-½8)¼:*¾?.Ç?/Ó9-Ù7,Ú8-Ù9-Ú8-Ø8,Ø8,Õ7+Õ7+Ô8+Ô8+Ô8+Ô8+Ô8+Ò9+Í;,Á?1¶>.¬9'¢3 3¢8"¬=)µ@.¼?-¿:+Ã7*Å5*Ë7+Î:.Îî7<ì38é06æ25å58á77Ú65Î61·5(¯7'®6&¬7&¬7&®9(²:)µ:*ÃA1ÊB4ÔA7Ü?8â;5æ95ë76î87í68ë78ë78ê86ê86è94ç:4æ;4â92á:2ß:4à;7Þ:8Ü:8Û97Ù99Ö<:Õ@<ÒC=ÊA;»;2¯6+¤6'ž7(œ;*˜;)”;)’;(:&8$Œ7#‡9%€=*v5#5'™E:ªPH¬MG©LG¦QLPJ˜UL”ZO”^R•aV•aV—aWgT‰…_™©x­½Ž¦¸ˆ¡ts†YN`8/A->3B%:F.=F3;A3:=2:=4<=599-?@2<>39<1<@29B/?L2PbNK:NK:NK:PMTQ@VS@XWC[ZF]\H^]Kb`Qf^QmWJ†[R¬ic¾c`ÁMMÈBCÐ;=Ô89Ó84Ì70Á9+º=)µC+¼B+Î;+×7)Ø8*×:+Ù9+Ö9*Ö9*Ô8)Ô8)Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Í;,Á?1¶>0«:(¡6"š4›7 £=&¯B-³;*º;,Â:,Ç9-Ë8.Î:0Ð<0Ù:4é9<ì4<æ39ã28â38á48â38â25é6<é49ç4:ç7:ã9<Û76Ð21À0(´6(­:(­:(«:(«:(«:(¬9&¯7&¸:+Á;/Î>3Ø?7à=8ä;8è96ì87î66î66î66í74ê84è:3ç:3ä<3á:2ß;2ß<5Ü=7Û=:Ù><×=;Ô>=Ï@<ËB<ÅB:¹=5­7-£5(ž7(š:*–;)“<)‘;*:(Š9&‰8%ˆ7$ƒ8%ƒ@-u4"{3%“G:¤QI¡NFžNG¡WN˜UL’XLZN\N]R”`U—aWhW‰f˜¥z©€Žj]kHDS42@&$2-:&0;*5=.9?3?1;=28;0;?18A.>K1PbÜ87Ô70Ç;.¼?+±C*µA(Ê;*Ô7(Õ8)Õ9*Ö9*Õ9*Õ9*Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Ò9)Ò9)Í;,Á?1µ=/«<)¢9$™6•5›;"§A*²B.¹@/¿;,Ã7*Å2(Ë4+Ò;0ß=8ê5:î3<ë6=é8>ç:>ä;>ã:=â9<ß58á7:â9>á=>Û=>Ñ96Ã2/¶0'¯9+«>*«>*©>*ª=)©<(©:'«8%¯6%¹7)Å;0Ð=3Ù<5ß<7ä;8è;7î87ï75ï75î85ë:4é;4ç<4ä=4â>5à?7ÞA:ÚA;ÙA>ÕA?Ñ@=ÍB?Ã?:»@8³=3ª8-¡5(›5'˜8(•<*‘<(<)Š<(ˆ:&†9'„7%ƒ6$6%}:)t3!~9*—OA£YNœRG•OE˜VJ•YN[MŽZMŒ[MŽ\Q“_T™`W‘gW~xXyƒ^r|ZU`B;E,/;%0;*0<.3=24<16<2?1:<17:/:>07@-=J0Oa;bxIk‡Lu”Qu™Qt˜NqšNršSpšRršQsœPr›Op™Kn™Jp›LsžOv¡Ry¥X{§Zz¨]x¦]qŸWg”O]ŠEX‚B`‡NY€ISzCg^Og^Og^Og^Og^Og^Og^Og^Og^Og^Og^Oh_Ph_Ph_Ph_Pi`OjaPjbOjbOjbOi`Oi`OiaNiaNiaNh`Kh`Kh`Ih`IhaGhaGhaGf_Le^Kb[I\WDWR?PM:LI8IH6IH6GH6GJ9GK:HL;IMì;Aê@CæAEàBCÜ@AÙ??Í12Ð66Ó:<Ñ=;É;9¾71µ4.­4)ª<-¥>+¥>+¥@,¥>+¤>(¦;'©:'ª7%²7'¼8+Å8.Ì70Ô94Ü=9æ>;é:7ì95ì95ë:4é;4è;4å=4â>4àB7ÝC9ÚC<ÕB;ÏA=Ê?<Ç=;¿>9±<3©:/¢8+œ6(˜7'”8)‘:):(‹=)‰<*‡<)ƒ:'‚9(€7&6%}6$x3#x5%…B2˜UEWK”PCPD•ZL“YMZN\Q\Q’[T•\U˜[VŽbUkbEV`=JS4=G,6?*2=,4>35?66=68?8=B;CF=EG/;9*78*=>0:<17:/:>06?,=J0N`:awHk‡Lu”Qu™Qt˜Nr›OršSpšPq›OrNqœMp›LošKrNu¡Ty¥X«`~©az¥]qœUf‘L_‰G]‡E^ˆIb‰PY€ISzCh_Ph_Ph_Ph_Ph_Ph_Ph_Ph_Pg^Oh_Ph_Ph_Ph_Ph_Pi`Qi`QmdUlcTjaRi`Qh_Pg^Og^Mh`MiaNiaLiaLiaLh`Ih`IhaGh`IgaKf_Le^Kb[H\WDUR?PMSQDSPAXLÂYSÙROàDEà::Ü75Õ;3Ê>/º=)µ8"É:)Ï8'Ð9(Ò;*Ò;*Ò;*Ò;*Ò;*Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Í;,Á;0¶:.­<,§>+™9#3“7Ÿ?'£9#°;)À>0Æ<1Ì8.Ð7/Ù<5ã?=ì=Bî?DéCEâDCØ@?Ê;7À50»1.¹/,¼51¾:6»<6³:2ª8.¤8,¡:+¡=-Ÿ>+ ?,¡@-¡@-¡A+£>*¦=*©;*­:(²7(¹5)¿5+É90Ô?9àC>ä=7è;5è;5ç<4å<5ä=4á>5Þ@5ÜD9ØD:ÒC;ÊA9Ä?:¼;6¸85°93¢7-™8(•5'“6'‘:)<*‹:)…8&ˆ=*…<+ƒ<*€<)~:'|8%{6&{6&y1#€8*ŒG8–SC’PB‹L=RE™_S‘WL’YN”[R–]T–]V—\V–YTŒ^QaX;EM(6@8A&>G26BE*;:&78(=>09;069.:>06?,F7GK=IK=AE4KJ6\Q;aE/ƒJ9Àj]Üg`ãUSäFEåA@àA=Õ>5É=0Æ=-Æ4%Ë5&Ì6'Í7(Í7(Î8)Ñ;,Ó=.Ò<-Ò<-Ò<-Ò<-Ñ;,Ñ;,Ñ;,Î<-»2(¶7.±;/¨:)š7"”5•7œ9"®A-³;+º6)Á4*Í6/×<7âC?êHEèDEèEHÝCCÉ:6»61´80®8.©4+«9/©9.¤8. 8-›9,–:+“<+’<+–=+˜=*™>+š?,›@-A, A-£@-¢;*¥:(«7(°6)¶6+¾8-Ä;3Ì<4Ú=6à=6â?8âA7âA9ÞB6Ú@6×@5ØH=ÒE;ÇA8»;2²5/ª3-¦1*Ÿ2+™9-’;*‘9+:*‹:)ˆ;)‡;+…<+€9'}8(|9(|9(|9({8'y6&x3$w- ‹A4—OC“MAŽL@‘QE“UJŽRG˜\R˜\R‘UMTL—ZU•XS”WT“gZ]T5IQ*AK(BK,>H/7@+2=-4?14<1HPCZ^PW[JMO:DF.AA'==%:;)>?1;=2:=2;?14=*;H.PbF7>F7=E6@F8>E5>F1HL5MI0U?'Q:¼sbËcXà_ZëUTçGGâ@>àA=Ø?9Î:0Í9+Î=,Ï=.Ï>-Ï;-Î;+Í9+Í:*Î:,Ð:+Ð:,Ð:+Ð:,Ð:+Ð:,Í;.É?5ÅB:¼B7®=/Ÿ6#–1–1›2¨5#´6(Ã;/ÑA8ÞE?æIDéJFêKHÞCAÛEDÐB>¼<3¯9/©=0¥?1Ÿ=0Ÿ?1œ>2—>0”>/=/Š>.‡@.ˆ?,Ž=*‘;*’<+“=,”?+•>+—>,™>,Ÿ@.¡=-¤:,¨8,¬8+±8-¶:0¼9/Ê<2Ð<2Ó?5ÕA7×C9ÖC9ÔD9ÑE8ÊB6ÃA4¹=3°:0©6/¤5.Ÿ4,™7,’:.Œ=,Š;,ˆ;+†:*„;*ƒ<*<,~;*|;){9)y:)x9(w8'u6'w4$€4'D7˜NC‘K?ŒJ>QD’TIRG“SJ˜XO˜UO—VPœ]X”WRŽSOŠcT]W5Xc9_jBZfBIT66C)4@*0:<19<1<@25>+;H.PbMKD63Å?3ÅA4ÃA3ÁA4¶;,²:,ª8-£7+ž6+›6,˜7.”:/;/ˆ<,‡;-„;,‚:+€;+€;+<,};+z;*z;,w9*v8)u7(t6)v4&ˆ;1”F<–NBŽJ=ˆHEI0?C(=@#:<$89';<.8:/9<1=A36?,MK4Ñ>4Ò>4Ò>4Ó?5Ó?5Ó?5Ó>7Ó?;ÑB>ËD>ÆF=ÂF<ÃI>ÇM@ÎPDÙSHÝPGâMGäIEäGBâC?àA=ÛB=ÕFBÉD?º?7«=0Ÿ>.šC0•G3”I6F4ŒE3ˆC3…B1€A0}@.zA.|?-‚:,†8,…9+†:,†:,‡;-‡;+ˆ;+‰:+‹:)Ž8)8*•9,™;/=/¢<0ª:/­8.¯9/°:.°:.°:,¯9+®8*¨7)¥7(ž6)›6*•7+’8-‘9/Ž<0ˆ<.…<-ƒ;,9*:*~9*}:*};+|:,z;,y;,w9*s8*q6(r7)u5)ŒD8’H=‘K?ŠH:‡I<‹OD“TK—TL–QL›TP˜QO”SO–\X_Xh^—~j””p…’fu‚WYh?CR+?O*P`B)=A(;='78(:;-79.9<1=A37@-NKB1=I1?G/LG1S>+g=-•ZL­_Sœ>4ž3+¶?9ØXUóigödeëRUæJNèNPÙIAÓF<Í@6Ë>4Î@6ÒD:ÕG=×G>ÚJAÚJAÝJBÝJBÞKCÞKCàKDàKEëSRèTTãSRÜROØSLØSLÛULàUNàLHáIFãEBâC@äB@âC@äEBàFDÙJFÊE@¹>7¬=2¡?2˜B1’E3G4ŒE3ˆC3‡B3ƒ@0?1~?0z?/|>/€:.ƒ9.ƒ9.ƒ9.ƒ;-ƒ;-ƒ;-ƒ;-9*‚9*…9+‡:*‰:+;-<.“;/›;/ž9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5>-9B1G4:F2:C25@/3>-1<,3:33954954928919;.;>-;@*CL/O^7]sDi„Mp“SwŸYy£Yw¡Yq˜Yf‰OZ}CX{A\E]€F]€F^G`ƒI`ƒI`ƒI`ƒI`ƒI_‚H^G]€JV{HJn@Ae7haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVj`VjaXkdZkg^upjˆ…€Ÿžš°°®ÃÂÀÓÒÐâáßçæäçãàãÞÚÞÖÓÙÎÈμ²¸¥——‡zym]_YIKL:@E1;D/>J6=H7=F5;C4;>5:;3983880==3C<2N71a84ˆHH¯]_Å`dÊWZÍQSÓNO×MKÛKJÞHGáFDãDAâBBßCDÞDFÞDFÝCEÝCEÜBDÜBBÛCBÚDCØD@ÕD?ÓF?ÒE<ÐF<ÐG=ÔE=Ù@:Ù@:ÑB:ÈC:¼C:¬@4™;/Œ9+‰=/ƒ>.>-€=,<,ƒ;,ƒ;,„<-‚:,‚:,‚:,9+9-9-~8.}9.~:/~:/}:1}:1}:1}:1}:1}:1z:1y:1x90x90w8/t8.s7-r8-t8.s9.r8-q8-r8-p7,p7,p7,o6-o6-n5,n5,m4+l3*k2)i3)g1'k7,h4)e1&h4)b0%f4)zA8MG’MH‘PJŽULˆXNYOxZOr\Nk^N^WGRPAKN=CJ:9B12:+08)17+17-06,/5+/5)08+2:+4<-9D4;F5=H7-.800621622717829;0:<.:?)?H+KY5[qChƒLq“Vwž[w¡YsœVgP^IUx@WzB[~F[~F[~F]€H_‚J_‚J_‚J_‚J^I^I]€H]€JUvIJk@@a6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVpg^ng_lgatqj‡„¡ œ¼¼ºÎÐÏÏÏÏàààòòòúøùû÷ö÷óðñìéðâßèÐÆÝÁµÁ«¢‘}ub^\GKM7CH2AI2AI4@G5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@×A@ÖB>ÓB=ÒA<Ó@9ÜA<Û@;Ó@9ËB:¿C;±A6 ;1’8-Œ=0‡>/ƒ>.>-€=,<+<,<,:+9-9-~8,}9.|8-|8-|8-|90|90|90|90z:1{;2{;2z;2w<4u<3u:2s:1r90n8.o6-m7-m7-l8-l8-l8-l8-j8-l8-l8-k6.n70o81n91l7/i4,g2*e3*c1(d4*_/%^.$b2(^.$`0&p>5JE‡RL‡XR~XOrVKdRDQJ:>?/:A16A05@03>04<14<15;17:379477577557246116//6./7,.9+1<.4A08E49H58G44E24B1.8/.5..3--2+23+46+8:-9=,7?(DQ3WlEh‚Ut•`wbp˜YgPY|DWxCTu@Tu@VwBYzEYzEYzE[|G_€K_€K\}H[|G^J^J^{MSnKF_A9R4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUneVneVlfZed_y{x—™˜²¶·ÍÑÒäéìôùüúÿÿûÿÿüÿÿýþÿþþþÿþüÿÿûÿÿúÿÿôþüçúùÝïðÑáåÄÒØ´¼ÄŸ ¨ƒ‡‘l`gEQX7DG,DC.JD4LD7KA8I>:C;9SJKia_wvœ’¾³¯ÙÎÈêÜÓþèÝÿóéÿäÛð©£ÃecµBEÇDIÚRVÛUTÑMKÊDAÍCAÔFE×EFØDDÙCDÖ=?×>@Ø@?Ö@?ÖB@ÓB?ÓB=ÔA:Ù@:Ù@:ÒB:ËE<ÀD<²B7¡<2“9.Ž<0‰=0ƒ>/>.=-~<,€=-€=-9-9-~:/}9.}9.|8-{8/{8/}:1}:1{;2{;2{;2{;2z;4x<4t;2q;1r90o9/n8.l8-l6,k7,l8-j8-j8-j8-j8-i9-j8-j8-n91m80m80m80m80i7.f4+c1(d2)a1']-#_0&c4*\-#_0&sD<}PJVP~YQpTI^J?OC7?<-46(2;*0;+1<.2=/4<14<15;17:379479668357257227007/08-.9+0;-2?.6C27E48G48G49F54>33:2/4-,2(/0(13(57*6:)6>'DQ5Y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U?6D7(6)gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXpgXng]lnmz‚…“š «µ·ÄÎÐÜæèí÷ùôþÿõþýöÿüúÿúûÿùûþóøúíõöèñôãôýêôýèôüåóùßòöÛéìÍØ×¹ÅÄ¥±°’ŽregOMP;GK:FM=GOBKQG{{sŸš”ž¸ØÎÌßÓÓçÛÛóëéü÷ôðïêüüôÿÿöÿýóÿùïÿóêÿçÞÿ×ËØ“ƒ¸eS£J:´TF½WIµF;·@8ÈKEÇC>ÊC?ÌB?ÎC@ÎC>ÎC>ÍD>ÍB=ÑB<ÒC?ÎDAÅD?¸A=ª=8ž;5•<4Ž;3‰<2ƒ=3=2=1~<0=1=/~:/~:/~:/}9.|90{8/{8/{8/|<3{;2{;2z:1y:3x92w81u91n70l7/l7/j8/i7.i7.h6-g7-g7-g7-f7-f7-f7-f7-f7-f7-h70h6/g5.g5.g6/h70g6/f5.a2*e6.^2)\0'`4+a5,i=4uSJXG@E>6<5/95,;8/8:/57,36+69.5;/7:/69.69.58-57,36+28,19,28.19,19.19,19,19,.9+.9+.9+/:,0;+3>.6A17B2ex\umt’lf‰_RwKBh9KkVsCZwG]zJ^{K_|L_|LVsCNg@ÉD=ÈC<ÉB<ÑC?ÐE@ÌEAÂC=³=9¦;5œ;5•<6Œ<3‡=4…<5=4<3~<0=1=1~:/~:/~:/}9.|90{8/{8/{8/{;2{;2y:3x92w81v70v70s7/n70j8/j8/j8/j8/h8.h8.h8.g7-f7-f7-f7-d8-d8-d8-f7-g6/h70i81i81h70i81j;3l=5g80k<4b6-a5,oC:xLCtI@nMDC9056.45/8918;247.14+25,58-58-57,46+46+46+46)37)/7(.9)08+.9).9+.9)08)08)19*08)08+/7*08+19,3;.4<-9B1:C0;B0:A1:<.68*24&/3$29'IU?cu[m„gf„bWyTInE?d8Hg;Li;Nk=Nk=Li;Li;Mj
    UrDYvH[xJ]zL^{M\yKQn@G_;6B4+4/#)%gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSjcSjbUlbVlbVmcWmdUmdUmdUleUmfVngWogZnh\oh^mjekormtzƒŠ¥®³ÃÌÑÕßáæîñôüþôýú÷ýùùþ÷úÿôüÿòüÿñüÿîýþðûøïþúñÿùïÿúíÿùéÿòßïàËÝηÁ²›¢—|ubb_NXZL]cWmwn|†}¦¬¢¾ÀµÚÕÏîäâüîîÿôôÿô÷þôõÿùùûúøûýøüÿúøÿõôüñ÷ýñÿÿñÿùèÿôãÿÌ»½p›QD©SFµSH²C:ÀJ@ÄH@ÇG>ÉF>ÈE=ÇD<ÆC;ÆC;ÍG>ÌG>ÇG>¼C;­>5Ÿ:2—:3‘>6Š=5†=4ƒ=5=4€<3;0;1;1~:/~:/~:1}90|90{8/{8/{8/z:1z:1x92w81v70u6/u6/q6.m80k90j8/j8/i9/i9/i9/h8.g7-f7-g7-f7-f7-f7-f7-f7-f5.j81m;4k:3j92j:0m>4oC8l@5oD;d<2c=2zVJ†dZyWMbLA>:13814927<54:0/5+25,9<336+25*24)03(13(25*46+47,.6),7)/7*-8*/7*/7*/7*/7*19,08+08-/7,/7,/7,08-08+7?09B14*00!''heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjdXldYlcZmeZmeXmfVg`NjeRnkXol]he\feasqr‚†Š“–ž¡«³¶ÃÈËØÝàêîïö÷ùùûúüþýþþüÿÿúýþöúýòùüñúýòûþóùúòúúòùùíüúëþüçù÷ÞéåÊÕÔ¶º¹›˜˜|qtY_dMbkXr}l„‚‘›´¹²ËÌÇãâÞòîë÷óòû÷öýùøüø÷ÿþüþþüþþüýÿúýÿúýÿúýÿúýÿúúü÷ÿÿúÿûöÿê娧 £`X›D=µNE¿MCÂF<ÄD9ÊE<ÎI@ÎKAËH@ÇG<ÆG8ÃH8½J8³H8¦E5šB4‘B5‹C5†B5„B6‚@4‚>3‚<2„:1†91†9191~:1|91{80z7/z7/w7.v6-w7.w7.w8/w8/v7.u6-q5+n3+l7/i81i81h70h70g6/g6/g6/f5.g6/i70i81h70g6/e4-e3,h3-j5/m80k90j:0i;.i=0kA3gB2jI:dH:v_O~k\ŠxjŒoRJ=79.4:04:039/39/39/28.28.17-17-36-06,25,/5+14+/5+/4-.5-/4-.5-/4-/4-/4-/4-05./4-/4-.3,.3,/4-/4-/6.1;23=26@58B79D67B45@03>-4?.DQ=WeN[kQPbHEX<@T8BW6Ic>Ke>Kf=Kf=JeOj?UpGYtK\vO]wP]wRWqNHb?;O6&1+&+.$),heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVidQjhSmjWjk[gg_lll~„“š¨¯µ¸ÂÄÑÖÙâçêòóõûüþÿþÿÿþÿþýûÿþúÿÿúþÿùûüôøûòöüò÷ýó÷úñøúïøúí÷úéùûåòõÚßâÃÌЯ´¸—‘–vkqUYaI_kUtoŒ˜Š§œ¿Á¼ÓÓÑççåóóñ÷÷õûûùüüúûûùþþüþþüþþüþþüþþüþþüþþüûÿþõÿÿõÿÿþÿÿÿûúÿíêð¿ºÂ~uŸKA¯M@¹K>ÂL@ÅK>ÃE9¼=4¾?6ÃE9ÄF7ÃJ7½L:³J7¦F6™C2‘C6E7…C7‚B8A7>5‚<4ƒ:3†91„93~92}:2z:1z:1y90x8/v7.v7.u6-v7.t8.t8.t8.r6,o5*m4+l7/i81j81h70i70h70g6/g6/e3,e3,g5.h6/j81j81j81k92k60l71k90k;1k;/j>1j@0iD2gH6kP=gRAufSueŒ…s†ƒrKL<69.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4.05//4..3-.3-.3-.3-/4./6/.80/:21=34@66B66B66B45B16C1CP>P]IR`IIW@AO6BP7EU:Jb@Jd?Ke@Ke>Ic6I5&1-',0$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVmhUkiTmjWjk[kkcwww‘’—§¬²¿ÆÌÒÜÞìñô÷üÿþÿÿþÿÿÿþÿÿþÿþýûÿþúÿÿúýþøúûóõøïñ÷ëñ÷ëô÷ìõùëöøêõøåõ÷áîîÔÛÛ¿ÉÊ«°±’“–yuy`kpZt{iˆŸ§œ®µ­ÍÏÊÞÞÜïïíøøöûûùþþüþþüýýûþþüþþüþþüþþüþþüþþüþþüýÿþûÿÿûÿÿÿÿÿÿûùÿúôÿ÷íýÑÆØž”L=¥RB©L;§@1·G;ÏYMÏUJ¼@4ÄD7ÆH:ÃK=¹I;ªB7?3—@7“E;‰@9„A9A8?6~>5}=4<4}=4z;4x<4w;3w;3u:2t91t91t91r90r90r90r90o9/n8.l6,k5+l7/j81l71j81k60i70i70h6/g5.g5.f5.g6/h70i81k:3k:3l;4j;3i:0h<1k?2jC4iD2fE2fI7lVAjYGujV†m‘Ž{€mEF658-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4./4./4..3--2,-2,.3-/4..5.+5-+6.-9//;12>24@46B47D38E3?L:ER>CQ:;I28F->L3DT9J_@Jb@LdBKc?Ia=G`9F_8G`9RkDXpL]uS^vVZqTPgK=T8.A.&1-',0%*.heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVniVljUlkWlm]pqi€‚ž¡¦¹¾ÄÄËÑÛåçõúýûÿÿüýÿüýÿþüýüûùÿþüÿÿûÿþùûüôõöîîñæéïãçíßíñâðôåñôãñôßòñÜêêÐØØ¼ÇÇ«²±•¡¡‰‘“}“€œž‘ª­¢¶»´ÀÅ¿ÜÜÚééçööôûûùýýûÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüþþþûûýÿþÿÿþÿ÷òïüóìÿüóÿûíÿôäìñ¹p•P@¢O?¸XJ·M?µE9ÀG<ÁA6ÈE;ÅI?½G=¯@9¡<4š=6–A4e=1f>2hC3iE5fG3cG2cJ6hV@i\IskV…‚oŽzpq_9=,47,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3-.3-.3--2,-2,-2,-2,.3--4-*4,)4,*6,+7-.:.1=14@25A36C2:G5N4DX¿@7ÆC;ÅF?¿D=±>;¦:7ž:8™>;‘=;Š?<„@=}@=xA6s>6r=5r=5r=5p>5o=4n>4m=3l<2k;1j;1i:0i:0j:0n72p62p62m61m61l71i70i70l;4k:3h91e90e90e90e:1d<2fB6cA5cC4dD5dG5dI6bI3_I2^L6eV?jbMrmW„ƒo„‡r[`L3:(28,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3--2,-2,,1+,1+,1+,1+-2,,3,,6.+5-*4+*4++5,.8-0;-2=/2=-5@/6A05A-1=)1=)5A-8F/=O5@T8FY=H\@J]?I^=K^>K`?TgG[pQcvZauZYkSJ]G6G4&4%$-*$),"'*heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZlfVjgTkjUlnYorasvm…„Ÿ¤¨¸¿ÇÖßäí÷ùûÿÿûÿÿûüÿþÿÿÿþÿþýûÿÿûÿÿúüüôóõêëíâãçÙÝãÕÜãÑäéÓçìÕéíÖêìÔëëÓèæÏßÚÄÓθÓÎºÌÆ¶ËøÐÉÁ×ÒÎàÛØêæåðïíóòðùù÷ýýûýýûýýûÿÿýþþüüüúþþüþþüþþüþþüþþüþþüþþüÿýüÿûüÿøùÿþýþÿýùÿýôÿøïÿõ÷ÿöð÷çÿÿíÿîÛͧ”¤kX¢[GªWE­L;¹D:ÀD<ÀE>¼E?´A>ª=:¢:9š;9•=5o?5o?5o@6n?5m>4k<2h<1h<1h<1l<2o83q62p62p62m61l71j81i81h70g80e90e:1d<2e?4f@5dB6^B4aG8cL:dM;cM8`K6]K3]M4]Q9bX?mhRss[€ƒnv{eFO:4=*39-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0*+0*+0*,1+,3,.5.,6.*4+*4+*4++5,-7,.9+-8*0;+4?/5@/4?.3?+3>-3@,7F/9K3@O8BT:GW¸J=¹I>¸I@´G@¯D>¥=:œ:7–=9>:ˆ?9€A:xA:tD:pF:pE5j>5n=6o83r73p62p62n72l71j81i81d8/d90c;1d>3d@4cA5cA5_C5ZE4_NnlUtv^|kcmU2>(6B.3;.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1+,1++0**/)*/)+0*,1++2+-4-+5-*4,*4,+5,+5,,6+-7,,6+/:,2=/6A17B27B15@04?.2?-4C.:G3=L5AO8DT:JX?L\BTbI\kTcqZ^mXUbPDRA2>0#/%&/,&,,$**heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjcYkdZlc\md[lfZlfVolYmlWjlWgkZflbr{xŽ˜š¨±¸ÊÓØãìñøýÿ÷üÿúûÿþÿÿÿþÿúùõÿÿúýýõøøîðòåéëÝåéØãêØåíÖæìÒéíÒêíÒèèÎèæÏèãÏáÚÈØÐÃØÎÄÝÒÌêßÛøíëÿôöÿõùÿõûÿùüþüýÿÿýÿÿýþþüþþüÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüÿþúÿýûÿýûýüúùýüøÿÿõÿÿóÿÿíýúóÿûûÿúÿÿôÿöæÿóßÿãÍ×­•©oY¨WD®Q@¬O>¯OA±OB­K@¤C<™<5•>7?6ˆ?8A7{B7uD6qE8qE8p?8q?8s>8q?8q?8q?8q?8p?8sB;qB:o@8m>6l=5j>5m>6o>7o83q73o83m82m82i81h91f:1f;2d>3d@4bB5`C5]A3\@2WB1TG4[S>f^Gi^HbX?ZS9ZS7\W:ZV;XW;kmUsw^u}fUaI&28D03;.4:04:039/39/39/28.28.17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0**/)*/)+0*+0*,1++2+)3+*4,+5-+5,,6--7.-7,,6+.8-2<16A39D69D47B46A10;+2?-5B09F22=/x=/t?/sB3tD6r=5r=7t=8s>8u@:u@:t?9q?8sA:q@9q@9q@9p?8n?7o>7o>7k92m82l:3l;4l;4h<3g<3c=2c?3^>1dG9cG9T=-N9(M8'@1WQ;PN7KI0OK2]Y>ieJeaDVU7XX<]`CosZz€fdlU=I1-9#2>*4-1=)2>*9E/BN8IU?O[GVbN]hWYdTLWI/u@8s>8u>9u@:t?9o=6p>7sA:q?8p?8p?8n?7o>7m>6n=6m>6k<4l=5m>6k?6j?6gA6eA5bB5dG9[A2^G7^I8N=+F7$G8%>6!LL4GK2DG,DD*MM1\[?baC`aBYY=dgJsw^sy_X`I:D,/;%7C/6>16<26<26<25;15;15;15;15;15;15;14:04:039/39/39/27127127116016016005/05/.3-.3--2,-2,,1+,1++0*+0**1**1*)0))0))0)*1*+2*,3+.5--4,.5-07/4;39A6?F>BJ?;F8:E57B14?.3?+6B.)r>)s@+tD0vE4q?4n<3q<4tB9sA8o?5qA7xH>n>4m>4m>4k?4l=3j>3l=3j>3g?5gA6gA6gC7eC7cC6`C5^D5bK;UB1ZI7`S@RG3C;&E=(FA+AE,BH.AE*<@%?B%NN2_`AijKaaEnqTvzagmSJO94<%4=(=F38>28>48>48>47=37=37=36<28>48>47=37=37=36<26<26<25:449349349338238238227105/05//4..3--2,,1++0*+0*).().().().().(*/)+0*,1+160/4.,1+,1+/4.6;4=BK:4.8/-4--4-,3,gdUgdUheVheVheVheVifWifWifWifWifWifWifWifWifWifWkeWkeWlcZmd[md]mf\mg[jiWkmXimVjoYjs`hthm|wˆ˜˜¦³¹¿ÊÐÓÜãëðööûÿüýÿýÿþÿÿýÿþùþþöýýñúûí÷úçô÷âîóÜåíÕâèÎÛàÀ×Ú»ÖÖ¼Ù×ÂÝ×ÇÞ×ÍåÛÙìààøìðûðöÿõûÿùþÿúýÿûûÿûûÿýüÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüøÿþøÿþûÿþþþþÿüþÿúÿÿùÿÿøþÿúýÿùüÿùùÿýúÿÿøÿÿøûÿõüþðÿÿíÿüéÿñßÿðÝÿïÚñÒ½´z{R>tJ4uH3vI4zM8}P;yL7nA.e7'{M@sD:qB8sD:oC8g;0d8-g=1i?3i?3i?3g?3f>2f>2f>2e?2b@4bB5`C5_C5_C5[D4ZE4WD3XI6OB/\T?oiSc^HMK4IG0IK3>D*?H-@F*48>47=37=37=39?58>48>48>48>48>48>48>47<67<67<66;56;56;55:45:438238216005//4.-2,,1+,1++0*+0**/)*/)+0*,1+-2,-2,05/.3-+0*+0*-2.2718=9;B:@K=@M;@M;=J68E13@,1?(0>'4.:0,6..5.-4-gdUgdUgdUheVheVifWifWifWifWifWifWifWifWifWifWifWkeWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_drejyt…••£²·½ÈÎÒÛâêïõôùýûüÿýÿþÿÿýÿÿúÿÿøÿÿóþÿñûþë÷úåðõÞæîÖâèÌÙÜ¿ÕÕ¹ÒйÔѾÚÔÈàÙÑêàßôéíþóùÿ÷üÿûÿÿýÿÿþÿÿþüÿþúÿþúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿþúÿÿúÿÿûÿÿþþþÿýþÿüüÿûüÿûúÿúøÿù÷ÿú÷ÿýøÿÿûÿÿûýÿúýþùùôîÿþöÿýôÿüóÿûîÿ÷çûæÕéÒÀÏ´¡¶š…”uawVCjI6lI6rM;uP>mF7iB3gB2jE5nI9nJ:oK;oK;eA1cB1cB1cB1cB1cB1bC1`C3]F6\G6\G6ZG6ZG6WH5TG4RG3PH3NH2fdM~~frrZVX@JL4GM3A.:>-;>39?59?58>48>47=37=37=38>48>48>48>48>48>48>48>49>89>89>88=78=78=77<67<66;55:449338227105//4./4.-2.-2.,1-+0,+0,,1--2.-2.,1-,1-,1-,1-.210513764;4;G9=L9@O<@O:8F71?2-9-,6--4,,3+fcTfcTgdUheVheVifWjgXjgXifWifWifWifWifWifWifWifWldWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_bpcgxr‚””£²·ÀËÑÔÝäëðöõúþûüÿýÿþÿÿýÿÿúÿÿøÿÿôÿÿóÿÿïúýèò÷àçðÕâèÌ×Ú½ÑѵÍË´Î˺ÖÏÅÞ×Ñìâã÷îóÿöþÿúÿÿýÿÿþÿÿÿýþÿúþÿùþÿúþÿúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþþýþÿýþÿýþÿýÿþýÿüþÿúþÿùÿÿ÷ýýóýýõþýøþýùÿþüþþþÿýÿÿþÿþùÿÿüÿÿûüûöóÿøòÿýôÿþñÿýíÿúéÿòà÷äÓçÒ¿Ò»©¹ŸŽŸ„srb|]K}^LtUCaD2W:(Y<*[>,X=*`E2`E2`E2_F2`G3`G3`G3]H3\K7\M:\M:YL9XM9UM8RL6QL6NL5QQ9ikS|€gmqXSY?FL2>G,48>48>48>47=37=38>48>48>48>49?59?5:?9:?9:?9:?99>89>89>88=78=78=77<66;55:4493382382/40.3/-2.,1-+0,+0,+0,+0,+0,,1--10.21/32/32/32-4-3?17F3=L7@O:?N7M:MJ9BC3=@5;A7;A7;A7:@6:@6:@69?58>48>48>49?59?5:@6:@6:@6;@:;@:;@::?9:?99>89>89>8:?9:?99>89>88=78=77<67<6495273162/40-2.,1-+/.+/.,0/,0/-10.21.23.23-12+1-+9*/@-6H2;M7=O7A6>A6>A6=@7=@79?59?59?5:@6:@6:B7:B7:B7;@9;@9;@::?8:?99>79>89>7;@:;@9;@:;@9:?9:?8:?9:?98?87=94;4382160/4..3/.3/.21.21,2.,2.+2++2*,4))6%$6)=!2F+8L1;O6;M5;M5;M58J29K3;M5H&DK*FM+EL*PV4PT3KN/HK,TT8bbFccIZZ@[Y@\ZA][B][B[Y@XV=US:SQ8HF1GD1DA0A?0@>1>>2??5>@5;>59?59?59A69A48C58C58C5:B79A69@88@58?79A69@8:B7:A9:B79@8:B7;B:E=8B:8B:7A88@56>14O<>P::L6@R8EW=FY=DX=@T;5H2+<),6+,3++2*ZgM[hN\hP]iQbjSckTglXhkXghVghVifWifWkeWlfXmeZmgYmgYkhYkg[kg\jf]jf[hfZefVhiWglVfo\erajwnzЉœ«²ºÈÑÐÙàáéìò÷ûøþþùþúúÿøûþóùýïøùë÷øæõôâíìØéæÓåâÏÜ×ÄÒ˹ʿ­Á´¤¹­¡¼¯¦Á¶²ËÁÀÛÐÖæßæûóþý÷ÿþûÿÿþÿþýÿüýÿüýÿüýÿþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüÿýúÿüùÿüùÿýúÿýùÿþúÿþýÿýüÿüýÿýþÿþÿÿþÿÿýþýûüÿþýÿþûÿüúÿøóøíçòåÝöèßûðêÿúýÿüÿÿýþÿÿýÿÿûýÿüýÿþüýÿýþÿýþÿÿýÿÿþüÿþõÿÿîÿþèÿÿäúöÝýûâäàÇ‹‡lRM0SN0QK+QK+UO/UO/TO1TO1SO2SO2QP4QP4QM2PO3PN5NQ6MO7JP6HM6EM5HQ6EN1BK.?I'BI(FM+JP,KQ-NR/PT1VZ7^bA_bCY\?TWWU>XV=YW>XV=XW;WV:XT9QK3OI3LG4ID1DA2B@3A?3>@5<=59?59?59A67B48C57D37D3:B79A69A68@58@59A69A6:B7:B7:B7:B7:B7;C874>63=40>-3C)9M*BY/Ga1Op;Ln;Li=Fa>BY?F;J@?I>>I9?G8>F7>D8=B;>E>9C;6@74B19I/BV3Pg=XrB^J[}JXuIMhECZ@9O:6G54E2XR6:@6:@69A67B47B46C26C2;C8:B79A69A69A69A6:B7;C8;C8:B7:B7;C8;C8=E:>F;=G<=G?>H=>I9?G8>F7>D8=B;=D=9C;6@74B19I/DX5Ri?[uEZ{FWyFTqEIdA=T:2H3/@.->+6H2@R8L_CReGSgKOcG@W=6I30:/07/-4,YgMZhN\hP^jRblTemVinZjo[mn\lm[mk\mj[nhZnhZoi]oi[liZkhYjfZieZie\ieZig[ghXghVchRajWerao|s{‹ŠŸ¦¢°¹ÁËÔÔÝäéñôòúüôúøñöðíðçèìÞâãÕÚÛÉÒÑ¿ÌɶÉıþ«¿¸¦¼³¢Ê¾®ÓŸÜÐÄæÙÑíâàöìíÿôúÿùÿÿ÷ÿÿúÿÿüÿþýÿýüÿûüþüþýþÿÿþþþþþþþþþþþþþþþþþþÿþüÿþüþýûþýûÿýúÿýúÿýúÿûøÿúöþùõÿýüÿûúýùúþúûþüýÿýþÿþÿÿýþÿüûÿýúÿüúÿøó÷ìæòåÝøêáÿôîÿúýÿüÿÿýþÿÿýÿÿûýÿúýÿþüýÿüýÿýþÿÿþÿÿÿýÿþõÿýìÿûãþúßÿüæÿÿéçâÌŒˆoRL2TO2TM0UN1TN.UO/VQ3VQ3UQ4SO2ON2NM1PL1NM1NL3KN3LN6KQ7KP9JR:LU:IR5JS6OY7SZ9T[9]c?fnG‚’c’¦sŸ±›ª’¡zˆ”pr{\\bFLP7KM5LK6KI4LJ5PK5TN8VP:WQ;VP:SN;QL9LI:IG:GE9CE:=>6:@6:@69A67B47B46C26C2;C8;C8:B79A69A6:B7;C8;C8;C8;C8;C8;C8F;=G<=G?=G<=H8>F7=E6=C7=B;:A:7A95?64B19I/BV3Ne;Uo?Tu@RtAPmAE`=9P6-C.+<*+<)1C-Ew(`$=Ta9vY{IwMLS%AfyB&EMzRmi|cAGC0vBNfUryUfv%brYd)bAUGyINs9m^WZp=PMOu{^@LbuMwNN&It@;QA!nS2g@5-7}L zE<}DR>KpB{3)yZRyu+Frx6Q=}g>JVF+d=&R_%Xt^%n8~s6T&27>)b0_=8*3gvSk*& zFHy+WnL(Rp1Z(HS=3D-Dj1V@7ftY zYb<Dk&tHZP>;Kz;AAautUH_kc_^Mw& zt@>g9Rlje){rZRRzZyFDt3UtvX7bn{j3*DU)F13%K61(2iR&DuZLpu>;i$9AS%0sy z!9EwmgDysYxtbkyH~)8`$q{#b=;UIP(@RZGE;KwgPxl|!X-6F=|Kl{}sLRwN&Ql;v zj=E0MyfyWh%hcn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;vMnYKK1_#5>z>2QIX8|C8#nk z7< zP|OFZPDd%)R3_})h)o7$Bpke1&8wAcpltY2DG8!Xf~c7AV;*y11*M}(Dk4DD)G;VU zaa}Qz?tJ#n*qTXCG3C$cZeBylh&`^_!@)6dWvf&nt70)qu?0Nin%}8=98pSzCv+ax1-sSPy z)!XiMf93saQ3WyRFa2}>Q$Q6hmtTMSYwwn&@9j@t)PlbaW1oLt&0a1*P!Gh;DYtmFnn*4bxvy`rT&j zasyVI2!AaZV;mwk`lZ0niVfszGH@O8IW(%m%Ugog5nSi~%l5qhRrF!AekUB_6a4^* znXh&_f7z^^trWNK$3L0!6{5DV$L5{1`2u4x&5_IcOGUL_jW#Q>W?9EC8!=ZR;!0_r zRNN<&@E~1tgt?Yowc*5}F0DBWMxcd`5obQ?GGnex z%$bTQ*iyvZ#OaiWqW5gZ$48<9)9_|=S4LOz33oB&1^$v5C}h03q=&E};UIu^p8J8$iVn&D48^Iii(N2VU2?-oLJ#p z)g7o-lT|BV091NXT|IApyIKE3w{-Bx>~^$P%Bgv6E~=6go6E~BD&v?+di>VwLAEtn z)dZ4k!W$1ewVDdssURlV1t|x2h~*ta?+7Ww&sDeZN^(Uy^~MeDR{2G(@DPZk6Ay5I%)dUG?yQD9)40?T&O&xtJ{O>gSqnj{Sp^& zx2LnEdNfxIq^A6&SD}Q%9ke;QZeAU8V6^=<#Z7Iq&EXc?NKTG5g(f1p8-OF4g3=jZ z=U(=+mFeeOkM{Rg&JKIO@Av+A`0VTB^}iplebZmPe!G72<@x|z`%4s?-BKgL+1{gv zgD>XUK>tY`j#&6`^ngZoWU?egvWk+1Hh6Q%Ctpha8d`}cPsNIp#iYoLEHaruBR*X^ xeQfNgc!#+3$GtX={&tV_ -#include - -#include "test.h" - -static GrColor *EGA; -#define black EGA[0] -#define red EGA[12] -#define blue EGA[1] -#define white EGA[15] - -static void testpoly(int n,int points[][2],int convex) -{ - GrClearScreen(black); - GrPolygon(n,points,white); - GrFilledPolygon(n,points,(red | GrXOR)); - GrKeyRead(); - if(convex || (n <= 3)) { - GrClearScreen(black); - GrFilledPolygon(n,points,white); - GrFilledConvexPolygon(n,points,(red | GrXOR)); - GrKeyRead(); - } -} - -static void speedtest(void) -{ - int pts[4][2]; - int ww = GrSizeX() / 10; - int hh = GrSizeY() / 10; - int sx = (GrSizeX() - 2*ww) / 32; - int sy = (GrSizeY() - 2*hh) / 32; - int ii,jj; - GrColor color; - long t1,t2,t3; - char msg[81]; - - GrClearScreen(black); - t1 = GrMsecTime(); - pts[0][1] = 0; - pts[1][1] = hh; - pts[2][1] = 2*hh; - pts[3][1] = hh; - color = 0; - for(ii = 0; ii < 32; ii++) { - pts[0][0] = ww; - pts[1][0] = 2*ww; - pts[2][0] = ww; - pts[3][0] = 0; - for(jj = 0; jj < 32; jj++) { - GrFilledPolygon(4,pts, EGA[color] | GrXOR); - color = (color + 1) & 15; - pts[0][0] += sx; - pts[1][0] += sx; - pts[2][0] += sx; - pts[3][0] += sx; - } - pts[0][1] += sy; - pts[1][1] += sy; - pts[2][1] += sy; - pts[3][1] += sy; - } - t2 = GrMsecTime(); - pts[0][1] = 0; - pts[1][1] = hh; - pts[2][1] = 2*hh; - pts[3][1] = hh; - color = 0; - for(ii = 0; ii < 32; ii++) { - pts[0][0] = ww; - pts[1][0] = 2*ww; - pts[2][0] = ww; - pts[3][0] = 0; - for(jj = 0; jj < 32; jj++) { - GrFilledConvexPolygon(4,pts, EGA[color] | GrXOR); - color = (color + 1) & 15; - pts[0][0] += sx; - pts[1][0] += sx; - pts[2][0] += sx; - pts[3][0] += sx; - } - pts[0][1] += sy; - pts[1][1] += sy; - pts[2][1] += sy; - pts[3][1] += sy; - } - t3 = GrMsecTime(); - GrTextXY(0, 0, "Times to scan 1024 polygons", white, black); - sprintf(msg, " with 'GrFilledPolygon': %.2f (s)", - (double)(t2 - t1) / (double)1000); - GrTextXY(0, 18, msg, white, black); - sprintf(msg, " with 'GrFilledConvexPolygon': %.2f (s)", - (double)(t3 - t2) / (double)1000); - GrTextXY(0, 36, msg, white, black); -} - -TESTFUNC(ptest) -{ - char buff[300]; - int pts[300][2]; - int ii,collect; - int convex; - FILE *fp; - - fp = fopen("polytest.dat","r"); - if(fp == NULL) return; - EGA = GrAllocEgaColors(); - ii = collect = convex = 0; - while(fgets(buff,299,fp) != NULL) { - if(!collect) { - if(strncmp(buff,"begin",5) == 0) { - convex = (buff[5] == 'c'); - collect = 1; - ii = 0; - } - continue; - } - if(strncmp(buff,"end",3) == 0) { - testpoly(ii,pts,convex); - collect = 0; - continue; - } - if(sscanf(buff,"%d %d",&pts[ii][0],&pts[ii][1]) == 2) ii++; - } - fclose(fp); - speedtest(); - GrKeyRead(); -} - diff --git a/thirdparty/grx249/test/polytest.dat b/thirdparty/grx249/test/polytest.dat deleted file mode 100644 index 0ebde62..0000000 --- a/thirdparty/grx249/test/polytest.dat +++ /dev/null @@ -1,87 +0,0 @@ -beginc -300 200 -400 400 -200 400 -end - -beginc -300 200 -400 400 -150 470 -200 400 -end - -beginc -300 200 -400 400 -150 470 -120 330 -end - -beginc -300 200 -400 400 -050 470 -020 330 -end - -beginc -300 -100 -400 400 -050 870 -020 330 -end - -beginc -300 20 -400 100 -050 100 -end - -beginc -400 500 -050 500 -200 560 -end - -beginc -400 500 -250 495 -050 500 -200 560 -end - -beginc -100 500 -400 500 -300 550 -end - -beginc -150 150 -300 150 -250 250 -300 400 -120 444 -end - -begin -250 150 -200 450 -350 250 -150 250 -400 450 -end - -beginc -150 150 -400 200 -400 202 -end - -begin --10 0 -100 -10 -200 200 --10 200 -end diff --git a/thirdparty/grx249/test/rand.h b/thirdparty/grx249/test/rand.h deleted file mode 100644 index ce7cf04..0000000 --- a/thirdparty/grx249/test/rand.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - ** rand.h ---- a very simple random number generator - ** (from "Numerical recipies") - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __RAND_H_INCLUDED -#define __RAND_H_INCLUDED - -#define _IA 16807 -#define _IM 2147483647L -#define _IQ 127773L -#define _IR 2836 -#define _MASK 123459876UL - -static long _idum = 0; - -unsigned long ran0(void) { - long k; - _idum ^= _MASK; - k = _idum / _IQ; - _idum = _IA * (_idum - k * _IQ) - _IR * k; - if (_idum < 0) _idum += _IM; - return (unsigned long) _idum; -} - -#define sran0(x) do _idum = (x); while(0) - -#define RND() ran0() -#define SRND(x) sran0(x) -#define RND_MAX (_MASK) - -#endif diff --git a/thirdparty/grx249/test/rgbtest.c b/thirdparty/grx249/test/rgbtest.c deleted file mode 100644 index d318a58..0000000 --- a/thirdparty/grx249/test/rgbtest.c +++ /dev/null @@ -1,38 +0,0 @@ -/** - ** rgbtest.c ---- show 256 color RGB palette - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" - -TESTFUNC(rgbtest) -{ - int x = GrSizeX(); - int y = GrSizeY(); - int ww = (x-10)/32; - int wh = (y-10)/8; - int ii,jj; - - GrSetRGBcolorMode(); - for(ii = 0; ii < 8; ii++) { - for(jj = 0; jj < 32; jj++) { - GrFilledBox(5+jj*ww,5+ii*wh,5+jj*ww+ww-1,5+ii*wh+wh-1,ii*32+jj); - } - } - GrKeyRead(); -} - diff --git a/thirdparty/grx249/test/sbctest.c b/thirdparty/grx249/test/sbctest.c deleted file mode 100644 index 72718cc..0000000 --- a/thirdparty/grx249/test/sbctest.c +++ /dev/null @@ -1,197 +0,0 @@ -/** - ** sbctest.c ---- test subcontext - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include "test.h" - -static void drawpf( int border, GrPattern *pat ); -static void drawp( int border, GrLinePattern *grlp ); - -TESTFUNC(sbctest) -{ - char bits[] = {0, 76, 50, 0, 0, 76, 60, 0}; - GrContext *grc, *grsc; - GrPattern *pat1, *pat2; - GrLineOption grl; - GrLinePattern grlp; - GrFont *grf; - GrTextOption grt; - - grc = GrCreateContext( 300,300,NULL,NULL ); - if( grc == NULL ) return; - grsc = GrCreateSubContext( 10,10,290,290,grc,NULL ); - if( grsc == NULL ) return; - pat1 = GrBuildPixmapFromBits( bits,8,8,GrWhite(),GrBlack() ); - if( pat1 == NULL ) return; - pat2 = GrBuildPixmapFromBits( bits,8,8,GrBlack(),GrWhite() ); - if( pat2 == NULL ) return; - grf = GrLoadFont( "lucb40.fnt" ); - if( grf == NULL ){ - grf = GrLoadFont( "../fonts/lucb40.fnt" ); - if( grf == NULL ) return; - } - - GrBox( 19,19,320,320,GrWhite() ); - - GrTextXY( 0,0,"White drawing on context ",GrWhite(),GrBlack() ); - GrSetContext( grc ); - GrClearContext( GrBlack() ); - drawing( 10,10,280,280,GrWhite(),GrNOCOLOR ); - GrSetContext( NULL ); - GrBitBlt( NULL,20,20,grc,0,0,299,299,GrWRITE ); - GrKeyRead(); - - GrTextXY( 0,0,"Black drawing on subcontext ",GrWhite(),GrBlack() ); - GrSetContext( grsc ); - drawing( 0,0,280,280,GrBlack(),GrNOCOLOR ); - GrSetContext( NULL ); - GrBitBlt( NULL,20,20,grc,0,0,299,299,GrWRITE ); - GrKeyRead(); - - GrTextXY( 0,0,"Pattern drawing on context ",GrWhite(),GrBlack() ); - GrSetContext( grc ); - GrClearContext( GrBlack() ); - drawpf( 10,pat1 ); - GrSetContext( NULL ); - GrBitBlt( NULL,20,20,grc,0,0,299,299,GrWRITE ); - GrKeyRead(); - - GrTextXY( 0,0,"Pattern drawing on subcontext ",GrWhite(),GrBlack() ); - GrSetContext( grsc ); - GrClearContext( GrBlack() ); - drawpf( 0,pat2 ); - GrSetContext( NULL ); - GrBitBlt( NULL,20,20,grc,0,0,299,299,GrXOR ); - GrKeyRead(); - - grl.lno_color = GrWhite(); - grl.lno_width = 3; - grl.lno_pattlen = 0; - grlp.lnp_pattern = pat1; - grlp.lnp_option = &grl; - - GrTextXY( 0,0,"Patterned drawing on context ",GrWhite(),GrBlack() ); - GrSetContext( grc ); - GrClearContext( GrBlack() ); - grlp.lnp_pattern = pat1; - drawp( 10,&grlp ); - GrSetContext( NULL ); - GrBitBlt( NULL,20,20,grc,0,0,299,299,GrWRITE ); - GrKeyRead(); - - GrTextXY( 0,0,"Patterned drawing on subcontext",GrWhite(),GrBlack() ); - GrSetContext( grsc ); - GrClearContext( GrBlack() ); - grlp.lnp_pattern = pat2; - drawp( 0,&grlp ); - GrSetContext( NULL ); - GrBitBlt( NULL,20,20,grc,0,0,299,299,GrXOR ); - GrKeyRead(); - - grt.txo_fgcolor.v = GrWhite(); - grt.txo_bgcolor.v = GrBlack() | GrOR; - grt.txo_font = grf; - grt.txo_direct = GR_TEXT_RIGHT; - grt.txo_xalign = GR_ALIGN_LEFT; - grt.txo_yalign = GR_ALIGN_CENTER; - grt.txo_chrtype = GR_BYTE_TEXT; - - GrTextXY( 0,0,"Patterned text on context ",GrWhite(),GrBlack() ); - GrSetContext( grc ); - GrClearContext( GrBlack() ); - GrPatternDrawString( "Hello all",9,20,60,&grt,pat1 ); - GrPatternDrawChar( 'G',20,120,&grt,pat1 ); - GrPatternDrawStringExt( "Hola a todos",12,20,180,&grt,pat1 ); - GrSetContext( NULL ); - GrBitBlt( NULL,20,20,grc,0,0,299,299,GrWRITE ); - GrKeyRead(); - - GrTextXY( 0,0,"Patterned text on subcontext ",GrWhite(),GrBlack() ); - GrSetContext( grsc ); - GrClearContext( GrBlack() ); - GrPatternDrawString( "Hello all",9,10,50,&grt,pat2 ); - GrPatternDrawChar( 'G',10,110,&grt,pat2 ); - GrPatternDrawStringExt( "Hola a todos",12,10,170,&grt,pat2 ); - GrSetContext( NULL ); - GrBitBlt( NULL,20,20,grc,0,0,299,299,GrXOR ); - GrKeyRead(); - - GrUnloadFont( grf ); - GrDestroyPattern( pat2 ); - GrDestroyPattern( pat1 ); - GrDestroyContext( grsc ); - GrDestroyContext( grc ); -} - -/***/ - -static void drawpf( int border, GrPattern *pat ) -{ - int pt1[4][2] = {{130,200},{140,240},{150,250},{160,180}}; - int pt2[4][2] = {{230,200},{235,240},{246,250},{258,180}}; - int ptaux[4][2]; - int i,j; - - GrPatternFilledBox( 0+border,0+border,93+border,93+border,pat ); - GrPatternFilledCircle( 139+border,46+border,45,pat ); - GrPatternFilledEllipse( 232+border,46+border,45,35,pat ); - GrPatternFilledCircleArc( 46+border,139+border,45,-300,600, - GR_ARC_STYLE_CLOSE2,pat ); - GrPatternFilledEllipseArc( 139+border,139+border,45,35,-700,400, - GR_ARC_STYLE_CLOSE2,pat ); - GrPatternFilledLine( 188+border,139+border,278+border,139+border,pat ); - GrPatternFilledPlot( 47+border,228+border,pat ); - GrPatternFilledPlot( 47+border,229+border,pat ); - GrPatternFilledPlot( 47+border,230+border,pat ); - GrPatternFilledPlot( 47+border,231+border,pat ); - GrPatternFilledPlot( 47+border,232+border,pat ); - for( i=0; i<4; i++ ) - for( j=0; j<2; j++ ) - ptaux[i][j] = pt1[i][j] + border; - GrPatternFilledPolygon( 4,ptaux,pat ); - for( i=0; i<4; i++ ) - for( j=0; j<2; j++ ) - ptaux[i][j] = pt2[i][j] + border; - GrPatternFilledConvexPolygon( 4,ptaux,pat ); -} - -/***/ - -static void drawp( int border, GrLinePattern *grlp ) -{ - int pt1[4][2] = {{130,200},{140,240},{150,250},{160,180}}; - int pt2[4][2] = {{230,200},{235,240},{246,250},{258,180}}; - int ptaux[4][2]; - int i,j; - - GrPatternedBox( 0+border,0+border,93+border,93+border,grlp ); - GrPatternedCircle( 139+border,46+border,45,grlp ); - GrPatternedEllipse( 232+border,46+border,45,35,grlp ); - GrPatternedCircleArc( 46+border,139+border,45,-300,600, - GR_ARC_STYLE_CLOSE2,grlp ); - GrPatternedEllipseArc( 139+border,139+border,45,35,-700,400, - GR_ARC_STYLE_CLOSE2,grlp ); - GrPatternedLine( 188+border,139+border,278+border,139+border,grlp ); - for( i=0; i<4; i++ ) - for( j=0; j<2; j++ ) - ptaux[i][j] = pt1[i][j] + border; - GrPatternedPolygon( 4,ptaux,grlp ); - for( i=0; i<4; i++ ) - for( j=0; j<2; j++ ) - ptaux[i][j] = pt2[i][j] + border; - GrPatternedPolyLine( 4,ptaux,grlp ); -} - diff --git a/thirdparty/grx249/test/scroltst.c b/thirdparty/grx249/test/scroltst.c deleted file mode 100644 index 3a7c7b8..0000000 --- a/thirdparty/grx249/test/scroltst.c +++ /dev/null @@ -1,75 +0,0 @@ -/** - ** scroltst.c ---- test virtual screen set/scroll - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" - -TESTFUNC(scrolltest) -{ - int wdt = GrScreenX(); - int hgt = GrScreenY(); - GrColor nc = GrNumColors(); - int txh = GrDefaultFont.h.height + 2; - for( ; ; ) { - char buff[100]; - char *l1 = "Screen resolution: %dx%d"; - char *l2 = "Virtual resolution: %dx%d"; - char *l3 = "Current screen start: x=%-4d y=%-4d"; - char *l4 = "Commands: q -- exit program,"; - char *l5 = "w W h H -- shrink/GROW screen width or height,"; - char *l6 = "x X y Y -- decrease/INCREASE screen start position"; - GrColor bgc = GrAllocColor(0,0,128); - GrColor fgc = GrAllocColor(200,200,0); - GrColor txc = GrAllocColor(255,0,255); - int vw = GrVirtualX(); - int vh = GrVirtualY(); - int vx = GrViewportX(); - int vy = GrViewportY(); - int x = (vw / 3) - (strlen(l6) * GrDefaultFont.h.width / 2); - int y = (vh / 3) - (3 * txh); - GrClearScreen(bgc); - drawing(0,0,vw,vh,fgc,bgc); - sprintf(buff,l1,wdt,hgt); GrTextXY(x,y,buff,txc,bgc); y += txh; - sprintf(buff,l2,vw, vh ); GrTextXY(x,y,buff,txc,bgc); y += txh; - for( ; ; GrSetViewport(vx,vy)) { - int yy = y; - vx = GrViewportX(); - vy = GrViewportY(); - sprintf(buff,l3,vx,vy); GrTextXY(x,yy,buff,txc,bgc); yy += txh; - GrTextXY(x,yy,l4,txc,bgc); yy += txh; - GrTextXY(x,yy,l5,txc,bgc); yy += txh; - GrTextXY(x,yy,l6,txc,bgc); yy += txh; - switch(GrKeyRead()) { - case 'w': vw -= 8; break; - case 'W': vw += 8; break; - case 'h': vh -= 8; break; - case 'H': vh += 8; break; - case 'x': vx--; continue; - case 'X': vx++; continue; - case 'y': vy--; continue; - case 'Y': vy++; continue; - case 'q': return; - case 'Q': return; - default: continue; - } - GrSetMode(GR_custom_graphics,wdt,hgt,nc,vw,vh); - break; - } - } -} - diff --git a/thirdparty/grx249/test/speedtst.c b/thirdparty/grx249/test/speedtst.c deleted file mode 100644 index 127d5d4..0000000 --- a/thirdparty/grx249/test/speedtst.c +++ /dev/null @@ -1,888 +0,0 @@ -/** - ** speedtst.c ---- check all available frame drivers speed - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - ** 070512 M.Alvarez, new version more accurate, but still had problems - ** in X11, because functions returns before the paint - ** is done. - **/ - -#include -#include -#include -#include -#include -#ifdef __WATCOMC__ -/*#include */ -#include -#else -#include -#endif -#include -#include "rand.h" - -#include "grx20.h" - -#if GRX_VERSION_API-0 <= 0x0220 -#define GrColor unsigned long -#define BLIT_FAIL(gp) ((gp)->fm!=GR_frameVGA8X) -#else -#define BLIT_FAIL(gp) 0 -#endif - -#define MEASURE_RAM_MODES 1 - -#define READPIX_loops (384*1) -#define READPIX_X11_loops (4*1) -#define DRAWPIX_loops (256*1) -#define DRAWLIN_loops (12*1) -#define DRAWHLIN_loops (16*1) -#define DRAWVLIN_loops (12*1) -#define DRAWBLK_loops (1*1) -#define BLIT_loops (1*1) - -typedef struct { - double rate, count; -} perfm; - -typedef struct { - GrFrameMode fm; - int w,h,bpp; - int flags; - perfm readpix; - perfm drawpix; - perfm drawlin; - perfm drawhlin; - perfm drawvlin; - perfm drawblk; - perfm blitv2v; - perfm blitv2r; - perfm blitr2v; -} gvmode; -#define FLG_measured 0x0001 -#define FLG_tagged 0x0002 -#define FLG_rammode 0x0004 -#define MEASURED(g) (((g)->flags&FLG_measured)!=0) -#define TAGGED(g) (((g)->flags&FLG_tagged)!=0) -#define RAMMODE(g) (((g)->flags&FLG_rammode)!=0) -#define SET_MEASURED(g) (g)->flags |= FLG_measured -#define SET_TAGGED(g) (g)->flags |= FLG_tagged -#define SET_RAMMODE(g) (g)->flags |= FLG_rammode -#define TOGGLE_TAGGED(g) (g)->flags ^= FLG_tagged - -int nmodes = 0; -#define MAX_MODES 256 -gvmode *grmodes = NULL; -#if MEASURE_RAM_MODES -gvmode *rammodes = NULL; -#endif - -/* No of Points [(x,y) pairs]. Must be multiple of 2*3=6 */ -#define PAIRS 4200 - -#define UL(x) ((unsigned long)(x)) -#define DBL(x) ((double)(x)) -#define INT(x) ((int)(x)) - -#ifndef min -#define min(a,b) ((a)<(b) ? (a) : (b)) -#endif -#ifndef max -#define max(a,b) ((a)>(b) ? (a) : (b)) -#endif - -typedef struct XYpairs { - int x[PAIRS]; - int y[PAIRS]; - int w, h; - struct XYpairs *nxt; -} XY_PAIRS; - -XY_PAIRS *xyp = NULL; -int *xb = NULL, *yb = NULL; /* need sorted pairs for block operations */ -int measured_any = 0; - -XY_PAIRS *checkpairs(int w, int h) { - XY_PAIRS *res = xyp; - int i; - - if (xb == NULL) { - xb = malloc(sizeof(int) * PAIRS); - yb = malloc(sizeof(int) * PAIRS); - } - - while (res != NULL) { - if (res->w == w && res->h == h) - return res; - res = res->nxt; - } - - SRND(12345); - - res = malloc(sizeof(XY_PAIRS)); - assert(res != NULL); - res->w = w; - res->h = h; - res->nxt = xyp; - xyp = res; - for (i=0; i < PAIRS; ++i) { - int x = RND() % w; - int y = RND() % h; - if (x < 0) x = 0; else - if (x >=w) x = w-1; - if (y < 0) y = 0; else - if (y >=h) y = h-1; - res->x[i] = x; - res->y[i] = y; - } - return res; -} - -double SQR(int a, int b) { - double r = DBL(a-b); - return r*r; -} - -double ABS(int a, int b) { - double r = DBL(a-b); - return fabs(r); -} - -char *FrameDriverName(GrFrameMode m) { - -#if GRX_VERSION_API-0 >= 0x0229 - unsigned sys = GrGetLibrarySystem(); -#else - unsigned sys = (unsigned) GRX_VERSION; -#endif - - int x11 = ( (sys == GRX_VERSION_GENERIC_X11) || - (sys == GRX_VERSION_GCC_386_X11) || - (sys == GRX_VERSION_GCC_X86_64_X11) ); - int w32 = ( (sys == GRX_VERSION_GCC_386_WIN32) || - (sys == GRX_VERSION_MSC_386_WIN32) || - (sys == GRX_VERSION_GCC_386_CYG32) ); - int sdl = strcmp( GrCurrentVideoDriver()->name , "sdl") == 0; - - switch(m) { - case GR_frameUndef: return "Undef"; - case GR_frameText : return "Text"; - case GR_frameHERC1: return "HERC1"; - case GR_frameEGAVGA1: return x11 ? "XWIN1" : w32 ? "WIN32_1" : "EGAVGA1"; - case GR_frameEGA4: return "EGA4"; - case GR_frameSVGA4: return x11 ? "XWIN4" : w32 ? "WIN32_4" : "SVGA4"; - case GR_frameSVGA8: return sdl ? "SDL8" : x11 ? "XWIN8" : w32 ? "WIN32_8" : "SVGA8"; - case GR_frameVGA8X: return "VGA8X"; - case GR_frameSVGA16: return sdl ? "SDL16" : x11 ? "XWIN16" : w32 ? "WIN32_16" : "SVGA16"; - case GR_frameSVGA24: return sdl ? "SDL24" : x11 ? "XWIN24" : w32 ? "WIN32_24" : "SVGA24"; - case GR_frameSVGA32L: return sdl ? "SDL32L" : x11 ? "XWIN32L" : w32 ? "WIN32_32L" : "SVGA32L"; - case GR_frameSVGA32H: return sdl ? "SDL32H" : x11 ? "XWIN32H" : w32 ? "WIN32_32H" : "SVGA32H"; - case GR_frameSVGA8_LFB: return "LFB8"; - case GR_frameSVGA16_LFB: return "LFB16"; - case GR_frameSVGA24_LFB: return "LFB24"; - case GR_frameSVGA32L_LFB: return "LFB32L"; - case GR_frameSVGA32H_LFB: return "LFB32H"; - case GR_frameRAM1: return "RAM1"; - case GR_frameRAM4: return "RAM4"; - case GR_frameRAM8: return "RAM8"; - case GR_frameRAM16: return "RAM16"; - case GR_frameRAM24: return "RAM24"; - case GR_frameRAM32L: return "RAM32L"; - case GR_frameRAM32H: return "RAM32H"; - case GR_frameRAM3x8: return "RAM3x8"; - default: return "UNKNOWN"; - } - return "UNKNOWN"; -} - -void Message(int disp, char *txt, gvmode *gp) { - char msg[200]; - sprintf(msg, "%s: %d x %d x %dbpp", - FrameDriverName(gp->fm), gp->w, gp->h, gp->bpp); -#if GRX_VERSION_API-0 >= 0x0229 - unsigned sys = GrGetLibrarySystem(); -#else - unsigned sys = (unsigned) GRX_VERSION; -#endif - if ( (sys == GRX_VERSION_GENERIC_X11) || - (sys == GRX_VERSION_GCC_386_X11) || - (sys == GRX_VERSION_GCC_X86_64_X11) ) - fprintf(stderr,"%s\t%s\n", msg, txt); - if (disp) { - GrTextOption to; - GrContext save; - GrSaveContext(&save); - GrSetContext(NULL); - to.txo_font = &GrFont_PC6x8; - to.txo_fgcolor.v = GrWhite(); - to.txo_bgcolor.v = GrBlack(); - to.txo_chrtype = GR_BYTE_TEXT; - to.txo_direct = GR_TEXT_RIGHT; - to.txo_xalign = GR_ALIGN_LEFT; - to.txo_yalign = GR_ALIGN_TOP; - GrDrawString(msg,strlen(msg),0,0,&to); - GrDrawString(txt,strlen(txt),0,10,&to); - GrSetContext(&save); - } -} - -void printresultheader(FILE *f) { - fprintf(f, "Driver readp drawp line hline vline block v2v v2r r2v\n"); -} - -void printresultline(FILE *f, gvmode * gp) { - fprintf(f, "%-9s %4dx%4d ", FrameDriverName(gp->fm), gp->w, gp->h); - fprintf(f, "%6.2f", gp->readpix.rate / (1024.0 * 1024.0)); - fprintf(f, "%6.2f", gp->drawpix.rate / (1024.0 * 1024.0)); - fprintf(f, "%6.2f", gp->drawlin.rate / (1024.0 * 1024.0)); - fprintf(f, "%7.2f", gp->drawhlin.rate / (1024.0 * 1024.0)); - fprintf(f, "%6.2f", gp->drawvlin.rate / (1024.0 * 1024.0)); - fprintf(f, "%7.2f", gp->drawblk.rate / (1024.0 * 1024.0)); - fprintf(f, "%7.2f", gp->blitv2v.rate / (1024.0 * 1024.0)); - fprintf(f, "%7.2f", gp->blitv2r.rate / (1024.0 * 1024.0)); - fprintf(f, "%7.2f", gp->blitr2v.rate / (1024.0 * 1024.0)); - fprintf(f, "\n"); -} - -void readpixeltest(gvmode *gp, XY_PAIRS *pairs,int loops) { - int i, j; - long t1,t2; - double seconds; - int *x = pairs->x; - int *y = pairs->y; - - if (!MEASURED(gp)) { - gp->readpix.rate = 0.0; - gp->readpix.count = DBL(PAIRS) * DBL(loops); - } - - t1 = GrMsecTime(); - for (i=loops; i > 0; --i) { - for (j=PAIRS-1; j >= 0; j--) - GrPixelNC(x[j],y[j]); - } - t2 = GrMsecTime(); - seconds = (double)(t2 - t1) / 1000.0; - if (seconds > 0) - gp->readpix.rate = gp->readpix.count / seconds; -} - -void drawpixeltest(gvmode *gp, XY_PAIRS *pairs) { - int i, j; - GrColor c1 = GrWhite(); - GrColor c2 = GrWhite() | GrXOR; - GrColor c3 = GrWhite() | GrOR; - GrColor c4 = GrBlack() | GrAND; - long t1,t2; - double seconds; - int *x = pairs->x; - int *y = pairs->y; - - if (!MEASURED(gp)) { - gp->drawpix.rate = 0.0; - gp->drawpix.count = DBL(PAIRS) * DBL(DRAWPIX_loops) * 4.0; - } - - t1 = GrMsecTime(); - for (i=0; i < DRAWPIX_loops; ++i) { - for (j=PAIRS-1; j >= 0; j--) GrPlotNC(x[j],y[j],c1); - for (j=PAIRS-1; j >= 0; j--) GrPlotNC(x[j],y[j],c2); - for (j=PAIRS-1; j >= 0; j--) GrPlotNC(x[j],y[j],c3); - for (j=PAIRS-1; j >= 0; j--) GrPlotNC(x[j],y[j],c4); - } - t2 = GrMsecTime(); - seconds = (double)(t2 - t1) / 1000.0; - if (seconds > 0) - gp->drawpix.rate = gp->drawpix.count / seconds; -} - -void drawlinetest(gvmode *gp, XY_PAIRS *pairs) { - int i, j; - int *x = pairs->x; - int *y = pairs->y; - GrColor c1 = GrWhite(); - GrColor c2 = GrWhite() | GrXOR; - GrColor c3 = GrWhite() | GrOR; - GrColor c4 = GrBlack() | GrAND; - long t1,t2; - double seconds; - - if (!MEASURED(gp)) { - gp->drawlin.rate = 0.0; - gp->drawlin.count = 0.0; - for (j=0; j < PAIRS; j+=2) - gp->drawlin.count += sqrt(SQR(x[j],x[j+1])+SQR(y[j],y[j+1])); - gp->drawlin.count *= 4.0 * DRAWLIN_loops; - } - - t1 = GrMsecTime(); - for (i=0; i < DRAWLIN_loops; ++i) { - for (j=PAIRS-2; j >= 0; j-=2) - GrLineNC(x[j],y[j],x[j+1],y[j+1],c1); - for (j=PAIRS-2; j >= 0; j-=2) - GrLineNC(x[j],y[j],x[j+1],y[j+1],c2); - for (j=PAIRS-2; j >= 0; j-=2) - GrLineNC(x[j],y[j],x[j+1],y[j+1],c3); - for (j=PAIRS-2; j >= 0; j-=2) - GrLineNC(x[j],y[j],x[j+1],y[j+1],c4); - } - t2 = GrMsecTime(); - seconds = (double)(t2 - t1) / 1000.0; - if (seconds > 0) - gp->drawlin.rate = gp->drawlin.count / seconds; -} - -void drawhlinetest(gvmode *gp, XY_PAIRS *pairs) { - int i, j; - int *x = pairs->x; - int *y = pairs->y; - GrColor c1 = GrWhite(); - GrColor c2 = GrWhite() | GrXOR; - GrColor c3 = GrWhite() | GrOR; - GrColor c4 = GrBlack() | GrAND; - long t1,t2; - double seconds; - - if (!MEASURED(gp)) { - gp->drawhlin.rate = 0.0; - gp->drawhlin.count = 0.0; - for (j=0; j < PAIRS; j+=2) - gp->drawhlin.count += ABS(x[j],x[j+1]); - gp->drawhlin.count *= 4.0 * DRAWHLIN_loops; - } - - t1 = GrMsecTime(); - for (i=0; i < DRAWHLIN_loops; ++i) { - for (j=PAIRS-2; j >= 0; j-=2) - GrHLineNC(x[j],x[j+1],y[j],c1); - for (j=PAIRS-2; j >= 0; j-=2) - GrHLineNC(x[j],x[j+1],y[j],c2); - for (j=PAIRS-2; j >= 0; j-=2) - GrHLineNC(x[j],x[j+1],y[j],c3); - for (j=PAIRS-2; j >= 0; j-=2) - GrHLineNC(x[j],x[j+1],y[j],c4); - } - t2 = GrMsecTime(); - seconds = (double)(t2 - t1) / 1000.0; - if (seconds > 0) - gp->drawhlin.rate = gp->drawhlin.count / seconds; -} - -void drawvlinetest(gvmode *gp, XY_PAIRS *pairs) { - int i, j; - int *x = pairs->x; - int *y = pairs->y; - GrColor c1 = GrWhite(); - GrColor c2 = GrWhite() | GrXOR; - GrColor c3 = GrWhite() | GrOR; - GrColor c4 = GrBlack() | GrAND; - long t1,t2; - double seconds; - - if (!MEASURED(gp)) { - gp->drawvlin.rate = 0.0; - gp->drawvlin.count = 0.0; - for (j=0; j < PAIRS; j+=2) - gp->drawvlin.count += ABS(y[j],y[j+1]); - gp->drawvlin.count *= 4.0 * DRAWVLIN_loops; - } - - t1 = GrMsecTime(); - for (i=0; i < DRAWVLIN_loops; ++i) { - for (j=PAIRS-2; j >= 0; j-=2) - GrVLineNC(x[j],y[j],y[j+1],c1); - for (j=PAIRS-2; j >= 0; j-=2) - GrVLineNC(x[j],y[j],y[j+1],c2); - for (j=PAIRS-2; j >= 0; j-=2) - GrVLineNC(x[j],y[j],y[j+1],c3); - for (j=PAIRS-2; j >= 0; j-=2) - GrVLineNC(x[j],y[j],y[j+1],c4); - } - t2 = GrMsecTime(); - seconds = (double)(t2 - t1) / 1000.0; - if (seconds > 0) - gp->drawvlin.rate = gp->drawvlin.count / seconds; -} - -void drawblocktest(gvmode *gp, XY_PAIRS *pairs) { - int i, j; - GrColor c1 = GrWhite(); - GrColor c2 = GrWhite() | GrXOR; - GrColor c3 = GrWhite() | GrOR; - GrColor c4 = GrBlack() | GrAND; - long t1,t2; - double seconds; - - if (xb == NULL || yb == NULL) return; - - for (j=0; j < PAIRS; j+=2) { - xb[j] = min(pairs->x[j],pairs->x[j+1]); - xb[j+1] = max(pairs->x[j],pairs->x[j+1]); - yb[j] = min(pairs->y[j],pairs->y[j+1]); - yb[j+1] = max(pairs->y[j],pairs->y[j+1]); - } - - if (!MEASURED(gp)) { - gp->drawblk.rate = 0.0; - gp->drawblk.count = 0.0; - for (j=0; j < PAIRS; j+=2) - gp->drawblk.count += ABS(xb[j],xb[j+1]) * ABS(yb[j],yb[j+1]); - gp->drawblk.count *= 4.0 * DRAWBLK_loops; - } - - t1 = GrMsecTime(); - for (i=0; i < DRAWBLK_loops; ++i) { - for (j=PAIRS-2; j >= 0; j-=2) - GrFilledBoxNC(xb[j],yb[j],xb[j+1],yb[j+1],c1); - for (j=PAIRS-2; j >= 0; j-=2) - GrFilledBoxNC(xb[j],yb[j],xb[j+1],yb[j+1],c2); - for (j=PAIRS-2; j >= 0; j-=2) - GrFilledBoxNC(xb[j],yb[j],xb[j+1],yb[j+1],c3); - for (j=PAIRS-2; j >= 0; j-=2) - GrFilledBoxNC(xb[j],yb[j],xb[j+1],yb[j+1],c4); - } - t2 = GrMsecTime(); - seconds = (double)(t2 - t1) / 1000.0; - if (seconds > 0) - gp->drawblk.rate = gp->drawblk.count / seconds; -} - -void xor_draw_blocks(GrContext *c) { - GrContext save; - int i; - - GrSaveContext(&save); - GrSetContext(c); - GrClearContext(GrBlack()); - for (i=28; i > 1; --i) - GrFilledBox(GrMaxX()/i,GrMaxY()/i, - (i-1)*GrMaxX()/i,(i-1)*GrMaxY()/i,GrWhite()|GrXOR); - GrSetContext(&save); -} - -void blit_measure(gvmode *gp, perfm *p, - int *xb, int *yb, - GrContext *dst,GrContext *src) { - int i, j; - long t1,t2; - double seconds; - GrContext save; - - GrSaveContext(&save); - if (dst != src) { - GrSetContext(dst); - GrClearContext(GrBlack()); - } - xor_draw_blocks(src); - GrSetContext(&save); - - if (dst != NULL) { - char *s = src != NULL ? "ram" : "video"; - char *d = dst != NULL ? "ram" : "video"; - char txt[50]; - sprintf(txt, "blit test: %s -> %s", s, d); - Message(1,txt, gp); - } - - t1 = GrMsecTime(); - for (i=0; i < BLIT_loops; ++i) { - for (j=PAIRS-3; j >= 0; j-=3) - GrBitBlt(dst,xb[j+2],yb[j+2],src,xb[j+1],yb[j+1],xb[j],yb[j],GrWRITE); - for (j=PAIRS-3; j >= 0; j-=3) - GrBitBlt(dst,xb[j+2],yb[j+2],src,xb[j+1],yb[j+1],xb[j],yb[j],GrXOR); - for (j=PAIRS-3; j >= 0; j-=3) - GrBitBlt(dst,xb[j+2],yb[j+2],src,xb[j+1],yb[j+1],xb[j],yb[j],GrOR); - for (j=PAIRS-3; j >= 0; j-=3) - GrBitBlt(dst,xb[j+2],yb[j+2],src,xb[j+1],yb[j+1],xb[j],yb[j],GrAND); - } - t2 = GrMsecTime(); - seconds = (double)(t2 - t1) / 1000.0; - if (seconds > 0) - p->rate = p->count / seconds; -} - -void blittest(gvmode *gp, XY_PAIRS *pairs, int ram) { - int j; - - if (xb == NULL || yb == NULL) return; - - for (j=0; j < PAIRS; j+=3) { - int wh; - xb[j] = max(pairs->x[j],pairs->x[j+1]); - xb[j+1] = min(pairs->x[j],pairs->x[j+1]); - xb[j+2] = pairs->x[j+2]; - wh = xb[j]-xb[j+1]; - if (xb[j+2]+wh >= gp->w) xb[j+2] = gp->w - wh - 1; - yb[j] = max(pairs->y[j],pairs->y[j+1]); - yb[j+1] = min(pairs->y[j],pairs->y[j+1]); - yb[j+2] = pairs->y[j+2]; - wh = yb[j]-yb[j+1]; - if (yb[j+2]+wh >= gp->h) yb[j+2] = gp->h - wh - 1; - } - - if (!MEASURED(gp)) { - double count = 0.0; - for (j=0; j < PAIRS; j+=3) - count += ABS(xb[j],xb[j+1]) * ABS(yb[j],yb[j+1]); - gp->blitv2v.count = - gp->blitr2v.count = - gp->blitv2r.count = count * 4.0 * BLIT_loops; - gp->blitv2v.rate = - gp->blitr2v.rate = - gp->blitv2r.rate = 0.0; - } - -#if BLIT_loops-0 - blit_measure(gp, &gp->blitv2v, xb, yb, - (GrContext *)(RAMMODE(gp) ? GrCurrentContext() : NULL), - (GrContext *)(RAMMODE(gp) ? GrCurrentContext() : NULL)); - if (!BLIT_FAIL(gp) && !ram) { - GrContext rc; - GrContext *rcp = GrCreateContext(gp->w,gp->h,NULL,&rc); - if (rcp) { - blit_measure(gp, &gp->blitv2r, xb, yb, rcp, NULL); - blit_measure(gp, &gp->blitr2v, xb, yb, NULL, rcp); - GrDestroyContext(rcp); - } - } -#endif -} - -void measure_one(gvmode *gp, int ram) { - XY_PAIRS *pairs; - - if (MEASURED(gp)) return; - pairs = checkpairs(gp->w, gp->h); - GrFilledBox( 0, 0, gp->w-1, gp->h-1, GrBlack()); - Message(RAMMODE(gp),"read pixel test", gp); - { int rd_loops = READPIX_loops; -#if GRX_VERSION_API-0 >= 0x0229 - unsigned sys = GrGetLibrarySystem(); -#else - unsigned sys = (unsigned) GRX_VERSION; -#endif - if ( (sys == GRX_VERSION_GENERIC_X11) || - (sys == GRX_VERSION_GCC_386_X11) || - (sys == GRX_VERSION_GCC_X86_64_X11) ) - if (!RAMMODE(gp)) rd_loops = READPIX_X11_loops; - readpixeltest(gp,pairs,rd_loops); - } - GrFilledBox( 0, 0, gp->w-1, gp->h-1, GrBlack()); - Message(RAMMODE(gp),"draw pixel test", gp); - drawpixeltest(gp,pairs); - GrFilledBox( 0, 0, gp->w-1, gp->h-1, GrBlack()); - Message(RAMMODE(gp),"draw line test ", gp); - drawlinetest(gp,pairs); - GrFilledBox( 0, 0, gp->w-1, gp->h-1, GrBlack()); - Message(RAMMODE(gp),"draw hline test", gp); - drawhlinetest(gp,pairs); - GrFilledBox( 0, 0, gp->w-1, gp->h-1, GrBlack()); - Message(RAMMODE(gp),"draw vline test", gp); - drawvlinetest(gp,pairs); - GrFilledBox( 0, 0, gp->w-1, gp->h-1, GrBlack()); - Message(RAMMODE(gp),"draw block test", gp); - drawblocktest(gp,pairs); - GrFilledBox( 0, 0, gp->w-1, gp->h-1, GrBlack()); - blittest(gp, pairs, ram); - GrFilledBox( 0, 0, gp->w-1, gp->h-1, GrBlack()); - SET_MEASURED(gp); - measured_any = 1; -} - -#if MEASURE_RAM_MODES -int identical_measured(gvmode *tm) { - int i; - for (i=0; i < nmodes; ++i) { - if (tm != &rammodes[i] && - tm->fm == rammodes[i].fm && - tm->w == rammodes[i].w && - tm->h == rammodes[i].h && - tm->bpp == rammodes[i].bpp && - MEASURED(&rammodes[i]) ) return (1); - } - return 0; -} -#endif - -static int first = 0; - -void speedcheck(gvmode *gp, int print, int wait) { - char m[41]; - gvmode *rp = NULL; - - if (first) { - printf( - "speedtest may take some time to process.\n" - "Now press to continue..." - ); - fflush(stdout); - fgets(m,40,stdin); - } - - GrSetMode( - GR_width_height_bpp_graphics, - gp->w, gp->h, gp->bpp - ); - - if (first) { - /* xor_draw_blocks(NULL); - getch(); */ - first = 0; - } - - if ( GrScreenFrameMode() != gp->fm) { - GrFrameMode act = GrScreenFrameMode(); - GrSetMode(GR_default_text); - printf("Setup failed : %s != %s\n", - FrameDriverName(act), - FrameDriverName(gp->fm)); - fgets(m,40,stdin); - return; - } - - if (!MEASURED(gp)) - measure_one(gp, 0); - -#if MEASURE_RAM_MODES - rp = &rammodes[(unsigned)(gp-grmodes)]; - rp->fm = GrCoreFrameMode(); - if (!MEASURED(rp) && !identical_measured(rp)) { - GrContext rc; - if (GrCreateFrameContext(rp->fm,gp->w,gp->h,NULL,&rc)) { - GrSetContext(&rc); - measure_one(rp, 1); - GrDestroyContext(&rc); - GrSetContext(NULL); - } - } -#endif - - GrSetMode(GR_default_text); - if (print) { - printf("Results: \n"); - printresultheader(stdout); - printresultline(stdout, gp); - if (rp) - printresultline(stdout, rp); - } - if (wait) - fgets(m,40,stdin); -} - -int collectmodes(const GrVideoDriver *drv) -{ - gvmode *gp = grmodes; - GrFrameMode fm; - const GrVideoMode *mp; - for(fm =GR_firstGraphicsFrameMode; - fm <= GR_lastGraphicsFrameMode; fm++) { - for(mp = GrFirstVideoMode(fm); mp; mp = GrNextVideoMode(mp)) { - gp->fm = fm; - gp->w = mp->width; - gp->h = mp->height; - gp->bpp = mp->bpp; - gp->flags = 0; - gp++; - if (gp-grmodes >= MAX_MODES) return MAX_MODES; - } - } - return(int)(gp-grmodes); -} - -int vmcmp(const void *m1,const void *m2) -{ - gvmode *md1 = (gvmode *)m1; - gvmode *md2 = (gvmode *)m2; - if(md1->bpp != md2->bpp) return(md1->bpp - md2->bpp); - if(md1->w != md2->w ) return(md1->w - md2->w ); - if(md1->h != md2->h ) return(md1->h - md2->h ); - return(0); -} - -#define LINES 20 -#define COLUMNS 80 - -void ModeText(int i, int shrt,char *mdtxt) { - char *flg; - - if (MEASURED(&grmodes[i])) flg = " #"; else - if (TAGGED(&grmodes[i])) flg = " *"; else - flg = ") "; - switch (shrt) { - case 2 : sprintf(mdtxt,"%2d%s %dx%d ", i+1, flg, grmodes[i].w, grmodes[i].h); - break; - case 1 : sprintf(mdtxt,"%2d%s %4dx%-4d ", i+1, flg, grmodes[i].w, grmodes[i].h); - break; - default: sprintf(mdtxt," %2d%s %4dx%-4d ", i+1, flg, grmodes[i].w, grmodes[i].h); - break; - } - mdtxt += strlen(mdtxt); - - if (grmodes[i].bpp > 20) - sprintf(mdtxt, "%ldM", 1L << (grmodes[i].bpp-20)); - else if (grmodes[i].bpp > 10) - sprintf(mdtxt, "%ldk", 1L << (grmodes[i].bpp-10)); - else - sprintf(mdtxt, "%ld", 1L << grmodes[i].bpp); - switch (shrt) { - case 2 : break; - case 1 : strcat(mdtxt, " col"); break; - default: strcat(mdtxt, " colors"); break; - } -} - -int ColsCheck(int cols, int ml, int sep) { - int len; - - len = ml * cols + (cols-1) * sep + 1; - return len <= COLUMNS; -} - -void PrintModes(void) { - char mdtxt[100]; - unsigned int maxlen; - int i, n, shrt, c, cols; - - cols = (nmodes+LINES-1) / LINES; - do { - for (shrt = 0; shrt <= 2; ++shrt) { - maxlen = 0; - for (i = 0; i < nmodes; ++i) { - ModeText(i,shrt,mdtxt); - if (strlen(mdtxt) > maxlen) maxlen = strlen(mdtxt); - } - n = 2; - if (cols>1 || shrt<2) { - if (!ColsCheck(cols, maxlen, n)) continue; - while (ColsCheck(cols, maxlen, n+1) && n < 4) ++n; - } - c = 0; - for (i = 0; i < nmodes; ++i) { - if (++c == cols) c = 0; - ModeText(i,shrt,mdtxt); - printf("%*s%s", (c ? -((int)(maxlen+n)) : -((int)maxlen)), mdtxt, (c || (i+1==nmodes) ? "" : "\n") ); - } - return; - } - --cols; - } while (1); -} - -int main(int argc, char **argv) -{ - int i; - - grmodes = malloc(MAX_MODES*sizeof(gvmode)); - assert(grmodes!=NULL); -#if MEASURE_RAM_MODES - rammodes = malloc(MAX_MODES*sizeof(gvmode)); - assert(rammodes!=NULL); -#endif - - GrSetDriver(NULL); - if(GrCurrentVideoDriver() == NULL) { - printf("No graphics driver found\n"); - exit(1); - } - - nmodes = collectmodes(GrCurrentVideoDriver()); - if(nmodes == 0) { - printf("No graphics modes found\n"); - exit(1); - } - qsort(grmodes,nmodes,sizeof(grmodes[0]),vmcmp); -#if MEASURE_RAM_MODES - for (i=0; i < nmodes; ++i) { - rammodes[i].fm = GR_frameUndef; /* filled in later */ - rammodes[i].w = grmodes[i].w; - rammodes[i].h = grmodes[i].h; - rammodes[i].bpp = grmodes[i].bpp; - rammodes[i].flags = FLG_rammode; - } -#endif - - if(argc >= 2 && (i = atoi(argv[1])) >= 1 && i <= nmodes) { - speedcheck(&grmodes[i - 1], 1, 0); - goto done; - } - - first = 1; - for( ; ; ) { - char mb[41], *m = mb; - int tflag = 0; - GrSetMode(GR_default_text); - printf( - "Graphics driver: \"%s\"\t" - "graphics defaults: %dx%d %ld colors\n", - GrCurrentVideoDriver()->name, - GrDriverInfo->defgw, - GrDriverInfo->defgh, - (long)GrDriverInfo->defgc - ); - PrintModes(); - printf("\nEnter #, 't#' toggels tag, 'm' measure tagged and 'q' to quit> "); - fflush(stdout); - if(!fgets(m,40,stdin)) break; - switch (*m) { - case 't': - case 'T': tflag = 1; - ++m; - break; - case 'A': - case 'a': for (i=0; i < nmodes; ++i) - SET_TAGGED(&grmodes[i]); - break; - case 'M': - case 'm': for (i=0; i < nmodes; ++i) - if (TAGGED(&grmodes[i])) { - speedcheck(&grmodes[i], 0, 0); - TOGGLE_TAGGED(&grmodes[i]); - } - break; - case 'Q': - case 'q': goto done; - } - if ((sscanf(m,"%d",&i) != 1) || (i < 1) || (i > nmodes)) - continue; - i--; - if (tflag) TOGGLE_TAGGED(&grmodes[i]); - else speedcheck(&grmodes[i], 1, 1); - } -done: - if (measured_any) { - int i; - FILE *log = fopen("speedtst.log", "a"); - - if (!log) exit(1); - - fprintf( log, "\nGraphics driver: \"%s\"\n\n", - GrCurrentVideoDriver()->name); - printf("Results: \n"); - printresultheader(log); - - for (i=0; i < nmodes; ++i) - if (MEASURED(&grmodes[i])) - printresultline(log, &grmodes[i]); -#if MEASURE_RAM_MODES - for (i=0; i < nmodes; ++i) - if (MEASURED(&rammodes[i])) - printresultline(log, &rammodes[i]); -#endif - fclose(log); - } - return(0); -} - diff --git a/thirdparty/grx249/test/test.h b/thirdparty/grx249/test/test.h deleted file mode 100644 index e7be295..0000000 --- a/thirdparty/grx249/test/test.h +++ /dev/null @@ -1,91 +0,0 @@ -/** - ** test.h ---- common declarations for test programs - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#ifndef __TEST_H_INCLUDED__ -#define __TEST_H_INCLUDED__ - -#include -#include -#include - -#include "grx20.h" -#include "grxkeys.h" -#include "drawing.h" - -extern void (*testfunc)(void); -char exit_message[2000] = { "" }; -int Argc; -char **Argv; - -#define TESTFUNC(name) \ -void name(void); \ -void (*testfunc)(void) = name; \ -void name(void) - -int main(int argc,char **argv) -{ - int x = 0; - int y = 0; - long c = 0; - int xv = 0; - int yv = 0; - - Argc = argc - 1; - Argv = argv + 1; - if((Argc >= 2) && - (sscanf(Argv[0],"%d",&x) == 1) && (x >= 320) && - (sscanf(Argv[1],"%d",&y) == 1) && (y >= 200)) { - Argc -= 2; - Argv += 2; - if (Argc > 0) { - char *endp; - c = strtol(Argv[0], &endp, 0); - switch (*endp) { - case 'k': - case 'K': c <<= 10; break; - case 'm': - case 'M': c <<= 20; break; - } - Argc--; - Argv++; - } - } - if((Argc >= 2) && - (sscanf(Argv[0],"%d",&xv) == 1) && (xv >= x) && - (sscanf(Argv[1],"%d",&yv) == 1) && (yv >= y)) { - Argc -= 2; - Argv += 2; - } - if((xv >= x) && (yv >= y) && (c >= 2)) - GrSetMode(GR_custom_graphics,x,y,c,xv,yv); - else if(c >= 2) - GrSetMode(GR_width_height_color_graphics,x,y,c); - else if((x >= 320) && (y >= 200)) - GrSetMode(GR_width_height_graphics,x,y); - else GrSetMode(GR_default_graphics); - (*testfunc)(); - GrSetMode(GR_default_text); - if(strlen(exit_message) > 0) { - puts(exit_message); - } - return(0); -} - -#endif /* _TEST_H_ */ - diff --git a/thirdparty/grx249/test/textpatt.c b/thirdparty/grx249/test/textpatt.c deleted file mode 100644 index 92544e0..0000000 --- a/thirdparty/grx249/test/textpatt.c +++ /dev/null @@ -1,67 +0,0 @@ -/** - ** textpatt.c - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include -#include -#include "grx20.h" -#include "grxkeys.h" - -#define FONT "../fonts/tms38b.fnt" - -int main(void) -{ - char bits[] = {0, 76, 50, 0, 0, 76, 60, 0}; - GrPattern *p1, *p2; - GrFont *font; - GrTextOption opt; - - GrSetMode(GR_width_height_color_graphics, 320, 200, (GrColor)256); - p1 = GrBuildPixmapFromBits(bits, 8, 8, 11, 3); - p2 = GrBuildPixmapFromBits(bits, 8, 8, 3, 11); - font = GrLoadFont(FONT); - if (font && p1 && p2) { - memset(&opt, 0, sizeof(GrTextOption)); - opt.txo_font = font; - opt.txo_xalign = 0; - opt.txo_yalign = 0; - opt.txo_direct = GR_TEXT_RIGHT; - opt.txo_fgcolor.v = GrNOCOLOR; - opt.txo_bgcolor.v = GrNOCOLOR; - GrPatternFilledBox(0, 0, GrMaxX(), GrMaxY(), p1); - GrKeyRead(); - GrPatternDrawString(" Hello world !", 15, 40, 10, &opt, p1); - GrPatternDrawString(" Hello world !", 15, 44, 50, &opt, p2); - GrPatternDrawStringExt(" Hello world !!", 16, 40, 100, &opt, p1); - GrPatternDrawStringExt(" Hello world !!", 16, 44, 140, &opt, p2); - GrKeyRead(); - opt.txo_bgcolor.v = GrBlack(); - GrPatternDrawString(" Hello world !", 15, 40, 10, &opt, p1); - GrPatternDrawString(" Hello world !", 15, 44, 50, &opt, p2); - GrPatternDrawStringExt(" Hello world !!", 16, 40, 100, &opt, p1); - GrPatternDrawStringExt(" Hello world !!", 16, 44, 140, &opt, p2); - GrKeyRead(); - } - if (p1) GrDestroyPattern(p1); - if (p2) GrDestroyPattern(p2); - if (font) GrUnloadFont(font); - GrSetMode(GR_default_text); - if (!p1) fprintf(stderr, "Couldn't create first pattern\n"); - if (!p2) fprintf(stderr, "Couldn't create second pattern\n"); - if (!font) fprintf(stderr, "Couldn't load font %s\n", FONT); - - return 0; -} - diff --git a/thirdparty/grx249/test/winclip.c b/thirdparty/grx249/test/winclip.c deleted file mode 100644 index b2dc3dd..0000000 --- a/thirdparty/grx249/test/winclip.c +++ /dev/null @@ -1,56 +0,0 @@ -/** - ** winclip.c ---- clip a drawing to various windows (contexts) - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" - -TESTFUNC(winclip) -{ - int x = GrSizeX(); - int y = GrSizeY(); - int ww = (x / 2) - 10; - int wh = (y / 2) - 10; - GrColor c; - GrContext *w1 = GrCreateSubContext(5,5,ww+4,wh+4,NULL,NULL); - GrContext *w2 = GrCreateSubContext(15+ww,5,ww+ww+14,wh+4,NULL,NULL); - GrContext *w3 = GrCreateSubContext(5,15+wh,ww+4,wh+wh+14,NULL,NULL); - GrContext *w4 = GrCreateSubContext(15+ww,15+wh,ww+ww+14,wh+wh+14,NULL,NULL); - - GrSetContext(w1); - c = GrAllocColor(200,100,100); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w2); - c = GrAllocColor(100,200,200); - drawing(-ww/4,ww/3,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w3); - c = GrAllocColor(200,200,0); - drawing(ww/2,-wh/2,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w4); - c = GrAllocColor(0,100,200); - drawing(-ww/2,-wh/2,ww*2,wh*2,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrKeyRead(); -} - diff --git a/thirdparty/grx249/test/wintest.c b/thirdparty/grx249/test/wintest.c deleted file mode 100644 index 5e7da7e..0000000 --- a/thirdparty/grx249/test/wintest.c +++ /dev/null @@ -1,56 +0,0 @@ -/** - ** wintest.c ---- test window (context) mapping - ** - ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 - ** [e-mail: csaba@vuse.vanderbilt.edu] - ** - ** This is a test/demo file of the GRX graphics library. - ** You can use GRX test/demo files as you want. - ** - ** The GRX graphics library is free software; you can redistribute it - ** and/or modify it under some conditions; see the "copying.grx" file - ** for details. - ** - ** This library is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ** - **/ - -#include "test.h" - -TESTFUNC(wintest) -{ - int x = GrSizeX(); - int y = GrSizeY(); - int ww = (x / 2) - 10; - int wh = (y / 2) - 10; - GrColor c; - GrContext *w1 = GrCreateSubContext(5,5,ww+4,wh+4,NULL,NULL); - GrContext *w2 = GrCreateSubContext(15+ww,5,ww+ww+14,wh+4,NULL,NULL); - GrContext *w3 = GrCreateSubContext(5,15+wh,ww+4,wh+wh+14,NULL,NULL); - GrContext *w4 = GrCreateSubContext(15+ww,15+wh,ww+ww+14,wh+wh+14,NULL,NULL); - - GrSetContext(w1); - c = GrAllocColor(200,100,100); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w2); - c = GrAllocColor(100,200,200); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w3); - c = GrAllocColor(200,200,0); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrSetContext(w4); - c = GrAllocColor(0,100,200); - drawing(0,0,ww,wh,c,GrBlack()); - GrBox(0,0,ww-1,wh-1,c); - - GrKeyRead(); -} - diff --git a/thirdparty/jpeg-9e/Makefile b/thirdparty/jpeg-9e/Makefile deleted file mode 100644 index 9119f62..0000000 --- a/thirdparty/jpeg-9e/Makefile +++ /dev/null @@ -1,1249 +0,0 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. -# Makefile. Generated from Makefile.in by configure. - -# Copyright (C) 1994-2021 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - - -# -# Automake Makefile for the JPEG library -# -# This file is written by Bob Friesenhahn, Guido Vollbeding -# - - - - - -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/libjpeg -pkgincludedir = $(includedir)/libjpeg -pkglibdir = $(libdir)/libjpeg -pkglibexecdir = $(libexecdir)/libjpeg -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = x86_64-pc-linux-gnu -host_triplet = x86_64-pc-linux-gnu -target_triplet = x86_64-pc-linux-gnu -am__append_1 = -Wl,--version-script=$(srcdir)/libjpeg.map -bin_PROGRAMS = cjpeg$(EXEEXT) djpeg$(EXEEXT) jpegtran$(EXEEXT) \ - rdjpgcom$(EXEEXT) wrjpgcom$(EXEEXT) -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(include_HEADERS) $(noinst_HEADERS) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = jconfig.h -CONFIG_CLEAN_FILES = libjpeg.pc -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(includedir)" -PROGRAMS = $(bin_PROGRAMS) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -LTLIBRARIES = $(lib_LTLIBRARIES) -libjpeg_la_LIBADD = -am__objects_1 = jaricom.lo jcapimin.lo jcapistd.lo jcarith.lo \ - jccoefct.lo jccolor.lo jcdctmgr.lo jchuff.lo jcinit.lo \ - jcmainct.lo jcmarker.lo jcmaster.lo jcomapi.lo jcparam.lo \ - jcprepct.lo jcsample.lo jctrans.lo jdapimin.lo jdapistd.lo \ - jdarith.lo jdatadst.lo jdatasrc.lo jdcoefct.lo jdcolor.lo \ - jddctmgr.lo jdhuff.lo jdinput.lo jdmainct.lo jdmarker.lo \ - jdmaster.lo jdmerge.lo jdpostct.lo jdsample.lo jdtrans.lo \ - jerror.lo jfdctflt.lo jfdctfst.lo jfdctint.lo jidctflt.lo \ - jidctfst.lo jidctint.lo jquant1.lo jquant2.lo jutils.lo \ - jmemmgr.lo jmemnobs.lo -am_libjpeg_la_OBJECTS = $(am__objects_1) -libjpeg_la_OBJECTS = $(am_libjpeg_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -am__v_lt_1 = -libjpeg_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libjpeg_la_LDFLAGS) $(LDFLAGS) -o $@ -am_cjpeg_OBJECTS = cjpeg.$(OBJEXT) rdppm.$(OBJEXT) rdgif.$(OBJEXT) \ - rdtarga.$(OBJEXT) rdrle.$(OBJEXT) rdbmp.$(OBJEXT) \ - rdswitch.$(OBJEXT) cdjpeg.$(OBJEXT) -cjpeg_OBJECTS = $(am_cjpeg_OBJECTS) -cjpeg_DEPENDENCIES = libjpeg.la -am_djpeg_OBJECTS = djpeg.$(OBJEXT) wrppm.$(OBJEXT) wrgif.$(OBJEXT) \ - wrtarga.$(OBJEXT) wrrle.$(OBJEXT) wrbmp.$(OBJEXT) \ - rdcolmap.$(OBJEXT) cdjpeg.$(OBJEXT) -djpeg_OBJECTS = $(am_djpeg_OBJECTS) -djpeg_DEPENDENCIES = libjpeg.la -am_jpegtran_OBJECTS = jpegtran.$(OBJEXT) rdswitch.$(OBJEXT) \ - cdjpeg.$(OBJEXT) transupp.$(OBJEXT) -jpegtran_OBJECTS = $(am_jpegtran_OBJECTS) -jpegtran_DEPENDENCIES = libjpeg.la -am_rdjpgcom_OBJECTS = rdjpgcom.$(OBJEXT) -rdjpgcom_OBJECTS = $(am_rdjpgcom_OBJECTS) -rdjpgcom_LDADD = $(LDADD) -am_wrjpgcom_OBJECTS = wrjpgcom.$(OBJEXT) -wrjpgcom_OBJECTS = $(am_wrjpgcom_OBJECTS) -wrjpgcom_LDADD = $(LDADD) -AM_V_P = $(am__v_P_$(V)) -am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I. -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/jmemnobs.Plo \ - ./$(DEPDIR)/cdjpeg.Po ./$(DEPDIR)/cjpeg.Po \ - ./$(DEPDIR)/djpeg.Po ./$(DEPDIR)/jaricom.Plo \ - ./$(DEPDIR)/jcapimin.Plo ./$(DEPDIR)/jcapistd.Plo \ - ./$(DEPDIR)/jcarith.Plo ./$(DEPDIR)/jccoefct.Plo \ - ./$(DEPDIR)/jccolor.Plo ./$(DEPDIR)/jcdctmgr.Plo \ - ./$(DEPDIR)/jchuff.Plo ./$(DEPDIR)/jcinit.Plo \ - ./$(DEPDIR)/jcmainct.Plo ./$(DEPDIR)/jcmarker.Plo \ - ./$(DEPDIR)/jcmaster.Plo ./$(DEPDIR)/jcomapi.Plo \ - ./$(DEPDIR)/jcparam.Plo ./$(DEPDIR)/jcprepct.Plo \ - ./$(DEPDIR)/jcsample.Plo ./$(DEPDIR)/jctrans.Plo \ - ./$(DEPDIR)/jdapimin.Plo ./$(DEPDIR)/jdapistd.Plo \ - ./$(DEPDIR)/jdarith.Plo ./$(DEPDIR)/jdatadst.Plo \ - ./$(DEPDIR)/jdatasrc.Plo ./$(DEPDIR)/jdcoefct.Plo \ - ./$(DEPDIR)/jdcolor.Plo ./$(DEPDIR)/jddctmgr.Plo \ - ./$(DEPDIR)/jdhuff.Plo ./$(DEPDIR)/jdinput.Plo \ - ./$(DEPDIR)/jdmainct.Plo ./$(DEPDIR)/jdmarker.Plo \ - ./$(DEPDIR)/jdmaster.Plo ./$(DEPDIR)/jdmerge.Plo \ - ./$(DEPDIR)/jdpostct.Plo ./$(DEPDIR)/jdsample.Plo \ - ./$(DEPDIR)/jdtrans.Plo ./$(DEPDIR)/jerror.Plo \ - ./$(DEPDIR)/jfdctflt.Plo ./$(DEPDIR)/jfdctfst.Plo \ - ./$(DEPDIR)/jfdctint.Plo ./$(DEPDIR)/jidctflt.Plo \ - ./$(DEPDIR)/jidctfst.Plo ./$(DEPDIR)/jidctint.Plo \ - ./$(DEPDIR)/jmemmgr.Plo ./$(DEPDIR)/jpegtran.Po \ - ./$(DEPDIR)/jquant1.Plo ./$(DEPDIR)/jquant2.Plo \ - ./$(DEPDIR)/jutils.Plo ./$(DEPDIR)/rdbmp.Po \ - ./$(DEPDIR)/rdcolmap.Po ./$(DEPDIR)/rdgif.Po \ - ./$(DEPDIR)/rdjpgcom.Po ./$(DEPDIR)/rdppm.Po \ - ./$(DEPDIR)/rdrle.Po ./$(DEPDIR)/rdswitch.Po \ - ./$(DEPDIR)/rdtarga.Po ./$(DEPDIR)/transupp.Po \ - ./$(DEPDIR)/wrbmp.Po ./$(DEPDIR)/wrgif.Po \ - ./$(DEPDIR)/wrjpgcom.Po ./$(DEPDIR)/wrppm.Po \ - ./$(DEPDIR)/wrrle.Po ./$(DEPDIR)/wrtarga.Po -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libjpeg_la_SOURCES) $(cjpeg_SOURCES) $(djpeg_SOURCES) \ - $(jpegtran_SOURCES) $(rdjpgcom_SOURCES) $(wrjpgcom_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(man_MANS) -DATA = $(nodist_pkgconfig_DATA) -HEADERS = $(include_HEADERS) $(noinst_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ - jconfig.cfg -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -AM_RECURSIVE_TARGETS = cscope -ACLOCAL = ${SHELL} '/home/scott/code/gui/thirdparty/jpeg-9e/missing' aclocal-1.16 -AMTAR = $${TAR-tar} -AM_DEFAULT_VERBOSITY = 0 -AR = ar -AS = as -AUTOCONF = ${SHELL} '/home/scott/code/gui/thirdparty/jpeg-9e/missing' autoconf -AUTOHEADER = echo autoheader ignored -AUTOMAKE = ${SHELL} '/home/scott/code/gui/thirdparty/jpeg-9e/missing' automake-1.16 -AWK = gawk -CC = gcc -CCDEPMODE = depmode=gcc3 -CFLAGS = -g -O2 -CPP = gcc -E -CPPFLAGS = -CSCOPE = cscope -CTAGS = ctags -CYGPATH_W = echo -DEFS = -DHAVE_CONFIG_H -DEPDIR = .deps -DLLTOOL = false -DSYMUTIL = -DUMPBIN = -ECHO_C = -ECHO_N = -n -ECHO_T = -EGREP = /usr/bin/grep -E -ETAGS = etags -EXEEXT = -FGREP = /usr/bin/grep -F -GREP = /usr/bin/grep -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -JPEG_LIB_VERSION = 14:0:5 -JPEG_LIB_VERSION_MAJOR = 9 -JPEG_LIB_VERSION_MINOR = 5 -LD = /usr/bin/ld -m elf_x86_64 -LDFLAGS = -LIBOBJS = -LIBS = -LIBTOOL = $(SHELL) $(top_builddir)/libtool -LIPO = -LN_S = ln -s -LTLIBOBJS = -LT_SYS_LIBRARY_PATH = -MAINT = # -MAKEINFO = ${SHELL} '/home/scott/code/gui/thirdparty/jpeg-9e/missing' makeinfo -MANIFEST_TOOL = : -MEMORYMGR = jmemnobs -MKDIR_P = /usr/bin/mkdir -p -NM = /usr/bin/nm -B -NMEDIT = -OBJDUMP = objdump -OBJEXT = o -OTOOL = -OTOOL64 = -PACKAGE = libjpeg -PACKAGE_BUGREPORT = -PACKAGE_NAME = libjpeg -PACKAGE_STRING = libjpeg 9.5.0 -PACKAGE_TARNAME = libjpeg -PACKAGE_URL = -PACKAGE_VERSION = 9.5.0 -PATH_SEPARATOR = : -RANLIB = ranlib -SED = /usr/bin/sed -SET_MAKE = -SHELL = /bin/bash -STRIP = strip -VERSION = 9.5.0 -abs_builddir = /home/scott/code/gui/thirdparty/jpeg-9e -abs_srcdir = /home/scott/code/gui/thirdparty/jpeg-9e -abs_top_builddir = /home/scott/code/gui/thirdparty/jpeg-9e -abs_top_srcdir = /home/scott/code/gui/thirdparty/jpeg-9e -ac_ct_AR = ar -ac_ct_CC = gcc -ac_ct_DUMPBIN = -am__include = include -am__leading_dot = . -am__quote = -am__tar = $${TAR-tar} chof - "$$tardir" -am__untar = $${TAR-tar} xf - -bindir = ${exec_prefix}/bin -build = x86_64-pc-linux-gnu -build_alias = -build_cpu = x86_64 -build_os = linux-gnu -build_vendor = pc -builddir = . -datadir = ${datarootdir} -datarootdir = ${prefix}/share -docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} -dvidir = ${docdir} -exec_prefix = ${prefix} -host = x86_64-pc-linux-gnu -host_alias = -host_cpu = x86_64 -host_os = linux-gnu -host_vendor = pc -htmldir = ${docdir} -includedir = ${prefix}/include -infodir = ${datarootdir}/info -install_sh = ${SHELL} /home/scott/code/gui/thirdparty/jpeg-9e/install-sh -libdir = ${exec_prefix}/lib -libexecdir = ${exec_prefix}/libexec -localedir = ${datarootdir}/locale -localstatedir = ${prefix}/var -mandir = ${datarootdir}/man -mkdir_p = $(MKDIR_P) -oldincludedir = /usr/include -pdfdir = ${docdir} -prefix = /home/scott/code/gui/installed/linux -program_transform_name = s,x,x, -psdir = ${docdir} -runstatedir = ${localstatedir}/run -sbindir = ${exec_prefix}/sbin -sharedstatedir = ${prefix}/com -srcdir = . -sysconfdir = ${prefix}/etc -target = x86_64-pc-linux-gnu -target_alias = -target_cpu = x86_64 -target_os = linux-gnu -target_vendor = pc -top_build_prefix = -top_builddir = . -top_srcdir = . - -# Sources to build library -LIBSOURCES = jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c jmemnobs.c - - -# System dependent sources -SYSDEPSOURCES = jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c - -# Headers which are installed to support the library -INSTINCLUDES = jerror.h jmorecfg.h jpeglib.h - -# Headers which are not installed -OTHERINCLUDES = cderror.h cdjpeg.h jdct.h jinclude.h jmemsys.h jpegint.h \ - jversion.h transupp.h - - -# Manual pages (Automake uses 'MANS' for itself) -DISTMANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1 - -# Other documentation files -DOCS = README install.txt usage.txt wizard.txt example.c libjpeg.txt \ - structure.txt coderules.txt filelist.txt cdaltui.txt change.log - - -# Makefiles for various systems -MKFILES = configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt - - -# Configuration files -CONFIGFILES = jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms - - -# Support scripts for configure -CONFIGUREFILES = config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib - - -# Miscellaneous support files -OTHERFILES = jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c - - -# Test support files -TESTFILES = testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg - - -# libtool libraries to build -lib_LTLIBRARIES = libjpeg.la - -# Library sources for libjpeg.la -libjpeg_la_SOURCES = $(LIBSOURCES) - -# LDFLAGS for libjpeg.la -libjpeg_la_LDFLAGS = -no-undefined -version-info $(JPEG_LIB_VERSION) \ - $(am__append_1) - -# Executable sources & libs -cjpeg_SOURCES = cjpeg.c rdppm.c rdgif.c rdtarga.c rdrle.c rdbmp.c \ - rdswitch.c cdjpeg.c - -cjpeg_LDADD = libjpeg.la -djpeg_SOURCES = djpeg.c wrppm.c wrgif.c wrtarga.c wrrle.c wrbmp.c \ - rdcolmap.c cdjpeg.c - -djpeg_LDADD = libjpeg.la -jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c -jpegtran_LDADD = libjpeg.la -rdjpgcom_SOURCES = rdjpgcom.c -wrjpgcom_SOURCES = wrjpgcom.c - -# Manual pages to install -man_MANS = $(DISTMANS) - -# Headers to install -include_HEADERS = $(INSTINCLUDES) - -# Other distributed headers -noinst_HEADERS = $(OTHERINCLUDES) - -# Other distributed files -EXTRA_DIST = $(DOCS) $(DISTMANS) $(MKFILES) $(CONFIGFILES) $(SYSDEPSOURCES) \ - $(OTHERFILES) $(TESTFILES) - - -# pkg-config file -pkgconfigdir = $(libdir)/pkgconfig -nodist_pkgconfig_DATA = libjpeg.pc - -# Files to be cleaned -CLEANFILES = testout.ppm testout.gif testout.bmp testout.jpg testoutp.ppm \ - testoutp.jpg testoutt.jpg - -all: jconfig.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: # $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): # $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -jconfig.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 - -stamp-h1: $(srcdir)/jconfig.cfg $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status jconfig.h -$(srcdir)/jconfig.cfg: # $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f jconfig.h stamp-h1 -libjpeg.pc: $(top_builddir)/config.status $(srcdir)/libjpeg.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -libjpeg.la: $(libjpeg_la_OBJECTS) $(libjpeg_la_DEPENDENCIES) $(EXTRA_libjpeg_la_DEPENDENCIES) - $(AM_V_CCLD)$(libjpeg_la_LINK) -rpath $(libdir) $(libjpeg_la_OBJECTS) $(libjpeg_la_LIBADD) $(LIBS) - -cjpeg$(EXEEXT): $(cjpeg_OBJECTS) $(cjpeg_DEPENDENCIES) $(EXTRA_cjpeg_DEPENDENCIES) - @rm -f cjpeg$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(cjpeg_OBJECTS) $(cjpeg_LDADD) $(LIBS) - -djpeg$(EXEEXT): $(djpeg_OBJECTS) $(djpeg_DEPENDENCIES) $(EXTRA_djpeg_DEPENDENCIES) - @rm -f djpeg$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(djpeg_OBJECTS) $(djpeg_LDADD) $(LIBS) - -jpegtran$(EXEEXT): $(jpegtran_OBJECTS) $(jpegtran_DEPENDENCIES) $(EXTRA_jpegtran_DEPENDENCIES) - @rm -f jpegtran$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(jpegtran_OBJECTS) $(jpegtran_LDADD) $(LIBS) - -rdjpgcom$(EXEEXT): $(rdjpgcom_OBJECTS) $(rdjpgcom_DEPENDENCIES) $(EXTRA_rdjpgcom_DEPENDENCIES) - @rm -f rdjpgcom$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(rdjpgcom_OBJECTS) $(rdjpgcom_LDADD) $(LIBS) - -wrjpgcom$(EXEEXT): $(wrjpgcom_OBJECTS) $(wrjpgcom_DEPENDENCIES) $(EXTRA_wrjpgcom_DEPENDENCIES) - @rm -f wrjpgcom$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(wrjpgcom_OBJECTS) $(wrjpgcom_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -include ./$(DEPDIR)/jmemnobs.Plo # am--include-marker -include ./$(DEPDIR)/cdjpeg.Po # am--include-marker -include ./$(DEPDIR)/cjpeg.Po # am--include-marker -include ./$(DEPDIR)/djpeg.Po # am--include-marker -include ./$(DEPDIR)/jaricom.Plo # am--include-marker -include ./$(DEPDIR)/jcapimin.Plo # am--include-marker -include ./$(DEPDIR)/jcapistd.Plo # am--include-marker -include ./$(DEPDIR)/jcarith.Plo # am--include-marker -include ./$(DEPDIR)/jccoefct.Plo # am--include-marker -include ./$(DEPDIR)/jccolor.Plo # am--include-marker -include ./$(DEPDIR)/jcdctmgr.Plo # am--include-marker -include ./$(DEPDIR)/jchuff.Plo # am--include-marker -include ./$(DEPDIR)/jcinit.Plo # am--include-marker -include ./$(DEPDIR)/jcmainct.Plo # am--include-marker -include ./$(DEPDIR)/jcmarker.Plo # am--include-marker -include ./$(DEPDIR)/jcmaster.Plo # am--include-marker -include ./$(DEPDIR)/jcomapi.Plo # am--include-marker -include ./$(DEPDIR)/jcparam.Plo # am--include-marker -include ./$(DEPDIR)/jcprepct.Plo # am--include-marker -include ./$(DEPDIR)/jcsample.Plo # am--include-marker -include ./$(DEPDIR)/jctrans.Plo # am--include-marker -include ./$(DEPDIR)/jdapimin.Plo # am--include-marker -include ./$(DEPDIR)/jdapistd.Plo # am--include-marker -include ./$(DEPDIR)/jdarith.Plo # am--include-marker -include ./$(DEPDIR)/jdatadst.Plo # am--include-marker -include ./$(DEPDIR)/jdatasrc.Plo # am--include-marker -include ./$(DEPDIR)/jdcoefct.Plo # am--include-marker -include ./$(DEPDIR)/jdcolor.Plo # am--include-marker -include ./$(DEPDIR)/jddctmgr.Plo # am--include-marker -include ./$(DEPDIR)/jdhuff.Plo # am--include-marker -include ./$(DEPDIR)/jdinput.Plo # am--include-marker -include ./$(DEPDIR)/jdmainct.Plo # am--include-marker -include ./$(DEPDIR)/jdmarker.Plo # am--include-marker -include ./$(DEPDIR)/jdmaster.Plo # am--include-marker -include ./$(DEPDIR)/jdmerge.Plo # am--include-marker -include ./$(DEPDIR)/jdpostct.Plo # am--include-marker -include ./$(DEPDIR)/jdsample.Plo # am--include-marker -include ./$(DEPDIR)/jdtrans.Plo # am--include-marker -include ./$(DEPDIR)/jerror.Plo # am--include-marker -include ./$(DEPDIR)/jfdctflt.Plo # am--include-marker -include ./$(DEPDIR)/jfdctfst.Plo # am--include-marker -include ./$(DEPDIR)/jfdctint.Plo # am--include-marker -include ./$(DEPDIR)/jidctflt.Plo # am--include-marker -include ./$(DEPDIR)/jidctfst.Plo # am--include-marker -include ./$(DEPDIR)/jidctint.Plo # am--include-marker -include ./$(DEPDIR)/jmemmgr.Plo # am--include-marker -include ./$(DEPDIR)/jpegtran.Po # am--include-marker -include ./$(DEPDIR)/jquant1.Plo # am--include-marker -include ./$(DEPDIR)/jquant2.Plo # am--include-marker -include ./$(DEPDIR)/jutils.Plo # am--include-marker -include ./$(DEPDIR)/rdbmp.Po # am--include-marker -include ./$(DEPDIR)/rdcolmap.Po # am--include-marker -include ./$(DEPDIR)/rdgif.Po # am--include-marker -include ./$(DEPDIR)/rdjpgcom.Po # am--include-marker -include ./$(DEPDIR)/rdppm.Po # am--include-marker -include ./$(DEPDIR)/rdrle.Po # am--include-marker -include ./$(DEPDIR)/rdswitch.Po # am--include-marker -include ./$(DEPDIR)/rdtarga.Po # am--include-marker -include ./$(DEPDIR)/transupp.Po # am--include-marker -include ./$(DEPDIR)/wrbmp.Po # am--include-marker -include ./$(DEPDIR)/wrgif.Po # am--include-marker -include ./$(DEPDIR)/wrjpgcom.Po # am--include-marker -include ./$(DEPDIR)/wrppm.Po # am--include-marker -include ./$(DEPDIR)/wrrle.Po # am--include-marker -include ./$(DEPDIR)/wrtarga.Po # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: - $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< - $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -# $(AM_V_CC)source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` - $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -# $(AM_V_CC)source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< - $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -# $(AM_V_CC)source='$<' object='$@' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(man_MANS)'; \ - test -n "$(man1dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.1[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) -install-nodist_pkgconfigDATA: $(nodist_pkgconfig_DATA) - @$(NORMAL_INSTALL) - @list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - -uninstall-nodist_pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscope: cscope.files - test ! -s cscope.files \ - || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) -clean-cscope: - -rm -f cscope.files -cscope.files: clean-cscope cscopelist -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(MANS) $(DATA) $(HEADERS) \ - jconfig.h -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f ./$(DEPDIR)/jmemnobs.Plo - -rm -f ./$(DEPDIR)/cdjpeg.Po - -rm -f ./$(DEPDIR)/cjpeg.Po - -rm -f ./$(DEPDIR)/djpeg.Po - -rm -f ./$(DEPDIR)/jaricom.Plo - -rm -f ./$(DEPDIR)/jcapimin.Plo - -rm -f ./$(DEPDIR)/jcapistd.Plo - -rm -f ./$(DEPDIR)/jcarith.Plo - -rm -f ./$(DEPDIR)/jccoefct.Plo - -rm -f ./$(DEPDIR)/jccolor.Plo - -rm -f ./$(DEPDIR)/jcdctmgr.Plo - -rm -f ./$(DEPDIR)/jchuff.Plo - -rm -f ./$(DEPDIR)/jcinit.Plo - -rm -f ./$(DEPDIR)/jcmainct.Plo - -rm -f ./$(DEPDIR)/jcmarker.Plo - -rm -f ./$(DEPDIR)/jcmaster.Plo - -rm -f ./$(DEPDIR)/jcomapi.Plo - -rm -f ./$(DEPDIR)/jcparam.Plo - -rm -f ./$(DEPDIR)/jcprepct.Plo - -rm -f ./$(DEPDIR)/jcsample.Plo - -rm -f ./$(DEPDIR)/jctrans.Plo - -rm -f ./$(DEPDIR)/jdapimin.Plo - -rm -f ./$(DEPDIR)/jdapistd.Plo - -rm -f ./$(DEPDIR)/jdarith.Plo - -rm -f ./$(DEPDIR)/jdatadst.Plo - -rm -f ./$(DEPDIR)/jdatasrc.Plo - -rm -f ./$(DEPDIR)/jdcoefct.Plo - -rm -f ./$(DEPDIR)/jdcolor.Plo - -rm -f ./$(DEPDIR)/jddctmgr.Plo - -rm -f ./$(DEPDIR)/jdhuff.Plo - -rm -f ./$(DEPDIR)/jdinput.Plo - -rm -f ./$(DEPDIR)/jdmainct.Plo - -rm -f ./$(DEPDIR)/jdmarker.Plo - -rm -f ./$(DEPDIR)/jdmaster.Plo - -rm -f ./$(DEPDIR)/jdmerge.Plo - -rm -f ./$(DEPDIR)/jdpostct.Plo - -rm -f ./$(DEPDIR)/jdsample.Plo - -rm -f ./$(DEPDIR)/jdtrans.Plo - -rm -f ./$(DEPDIR)/jerror.Plo - -rm -f ./$(DEPDIR)/jfdctflt.Plo - -rm -f ./$(DEPDIR)/jfdctfst.Plo - -rm -f ./$(DEPDIR)/jfdctint.Plo - -rm -f ./$(DEPDIR)/jidctflt.Plo - -rm -f ./$(DEPDIR)/jidctfst.Plo - -rm -f ./$(DEPDIR)/jidctint.Plo - -rm -f ./$(DEPDIR)/jmemmgr.Plo - -rm -f ./$(DEPDIR)/jpegtran.Po - -rm -f ./$(DEPDIR)/jquant1.Plo - -rm -f ./$(DEPDIR)/jquant2.Plo - -rm -f ./$(DEPDIR)/jutils.Plo - -rm -f ./$(DEPDIR)/rdbmp.Po - -rm -f ./$(DEPDIR)/rdcolmap.Po - -rm -f ./$(DEPDIR)/rdgif.Po - -rm -f ./$(DEPDIR)/rdjpgcom.Po - -rm -f ./$(DEPDIR)/rdppm.Po - -rm -f ./$(DEPDIR)/rdrle.Po - -rm -f ./$(DEPDIR)/rdswitch.Po - -rm -f ./$(DEPDIR)/rdtarga.Po - -rm -f ./$(DEPDIR)/transupp.Po - -rm -f ./$(DEPDIR)/wrbmp.Po - -rm -f ./$(DEPDIR)/wrgif.Po - -rm -f ./$(DEPDIR)/wrjpgcom.Po - -rm -f ./$(DEPDIR)/wrppm.Po - -rm -f ./$(DEPDIR)/wrrle.Po - -rm -f ./$(DEPDIR)/wrtarga.Po - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-data-local install-includeHEADERS install-man \ - install-nodist_pkgconfigDATA - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f ./$(DEPDIR)/jmemnobs.Plo - -rm -f ./$(DEPDIR)/cdjpeg.Po - -rm -f ./$(DEPDIR)/cjpeg.Po - -rm -f ./$(DEPDIR)/djpeg.Po - -rm -f ./$(DEPDIR)/jaricom.Plo - -rm -f ./$(DEPDIR)/jcapimin.Plo - -rm -f ./$(DEPDIR)/jcapistd.Plo - -rm -f ./$(DEPDIR)/jcarith.Plo - -rm -f ./$(DEPDIR)/jccoefct.Plo - -rm -f ./$(DEPDIR)/jccolor.Plo - -rm -f ./$(DEPDIR)/jcdctmgr.Plo - -rm -f ./$(DEPDIR)/jchuff.Plo - -rm -f ./$(DEPDIR)/jcinit.Plo - -rm -f ./$(DEPDIR)/jcmainct.Plo - -rm -f ./$(DEPDIR)/jcmarker.Plo - -rm -f ./$(DEPDIR)/jcmaster.Plo - -rm -f ./$(DEPDIR)/jcomapi.Plo - -rm -f ./$(DEPDIR)/jcparam.Plo - -rm -f ./$(DEPDIR)/jcprepct.Plo - -rm -f ./$(DEPDIR)/jcsample.Plo - -rm -f ./$(DEPDIR)/jctrans.Plo - -rm -f ./$(DEPDIR)/jdapimin.Plo - -rm -f ./$(DEPDIR)/jdapistd.Plo - -rm -f ./$(DEPDIR)/jdarith.Plo - -rm -f ./$(DEPDIR)/jdatadst.Plo - -rm -f ./$(DEPDIR)/jdatasrc.Plo - -rm -f ./$(DEPDIR)/jdcoefct.Plo - -rm -f ./$(DEPDIR)/jdcolor.Plo - -rm -f ./$(DEPDIR)/jddctmgr.Plo - -rm -f ./$(DEPDIR)/jdhuff.Plo - -rm -f ./$(DEPDIR)/jdinput.Plo - -rm -f ./$(DEPDIR)/jdmainct.Plo - -rm -f ./$(DEPDIR)/jdmarker.Plo - -rm -f ./$(DEPDIR)/jdmaster.Plo - -rm -f ./$(DEPDIR)/jdmerge.Plo - -rm -f ./$(DEPDIR)/jdpostct.Plo - -rm -f ./$(DEPDIR)/jdsample.Plo - -rm -f ./$(DEPDIR)/jdtrans.Plo - -rm -f ./$(DEPDIR)/jerror.Plo - -rm -f ./$(DEPDIR)/jfdctflt.Plo - -rm -f ./$(DEPDIR)/jfdctfst.Plo - -rm -f ./$(DEPDIR)/jfdctint.Plo - -rm -f ./$(DEPDIR)/jidctflt.Plo - -rm -f ./$(DEPDIR)/jidctfst.Plo - -rm -f ./$(DEPDIR)/jidctint.Plo - -rm -f ./$(DEPDIR)/jmemmgr.Plo - -rm -f ./$(DEPDIR)/jpegtran.Po - -rm -f ./$(DEPDIR)/jquant1.Plo - -rm -f ./$(DEPDIR)/jquant2.Plo - -rm -f ./$(DEPDIR)/jutils.Plo - -rm -f ./$(DEPDIR)/rdbmp.Po - -rm -f ./$(DEPDIR)/rdcolmap.Po - -rm -f ./$(DEPDIR)/rdgif.Po - -rm -f ./$(DEPDIR)/rdjpgcom.Po - -rm -f ./$(DEPDIR)/rdppm.Po - -rm -f ./$(DEPDIR)/rdrle.Po - -rm -f ./$(DEPDIR)/rdswitch.Po - -rm -f ./$(DEPDIR)/rdtarga.Po - -rm -f ./$(DEPDIR)/transupp.Po - -rm -f ./$(DEPDIR)/wrbmp.Po - -rm -f ./$(DEPDIR)/wrgif.Po - -rm -f ./$(DEPDIR)/wrjpgcom.Po - -rm -f ./$(DEPDIR)/wrppm.Po - -rm -f ./$(DEPDIR)/wrrle.Po - -rm -f ./$(DEPDIR)/wrtarga.Po - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-local uninstall-man \ - uninstall-nodist_pkgconfigDATA - -uninstall-man: uninstall-man1 - -.MAKE: all check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \ - check-am check-local clean clean-binPROGRAMS clean-cscope \ - clean-generic clean-libLTLIBRARIES clean-libtool cscope \ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags dvi dvi-am html html-am info info-am install \ - install-am install-binPROGRAMS install-data install-data-am \ - install-data-local install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am \ - install-includeHEADERS install-info install-info-am \ - install-libLTLIBRARIES install-man install-man1 \ - install-nodist_pkgconfigDATA install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-local uninstall-man uninstall-man1 \ - uninstall-nodist_pkgconfigDATA - -.PRECIOUS: Makefile - - -# Install jconfig.h -install-data-local: - $(mkinstalldirs) $(DESTDIR)$(includedir) - $(INSTALL_HEADER) jconfig.h $(DESTDIR)$(includedir)/jconfig.h - -# Uninstall jconfig.h -uninstall-local: - rm -f $(DESTDIR)$(includedir)/jconfig.h - -# Run tests -test: check-local -check-local: - rm -f testout* - ./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)/testorig.jpg - ./djpeg -dct int -gif -outfile testout.gif $(srcdir)/testorig.jpg - ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg - ./cjpeg -dct int -outfile testout.jpg $(srcdir)/testimg.ppm - ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg - ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm - ./jpegtran -outfile testoutt.jpg $(srcdir)/testprog.jpg - cmp $(srcdir)/testimg.ppm testout.ppm - cmp $(srcdir)/testimg.gif testout.gif - cmp $(srcdir)/testimg.bmp testout.bmp - cmp $(srcdir)/testimg.jpg testout.jpg - cmp $(srcdir)/testimg.ppm testoutp.ppm - cmp $(srcdir)/testimgp.jpg testoutp.jpg - cmp $(srcdir)/testorig.jpg testoutt.jpg - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/thirdparty/jpeg-9e/Makefile.am b/thirdparty/jpeg-9e/Makefile.am deleted file mode 100644 index 2ccb592..0000000 --- a/thirdparty/jpeg-9e/Makefile.am +++ /dev/null @@ -1,143 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# Automake Makefile for the JPEG library -# -# This file is written by Bob Friesenhahn, Guido Vollbeding -# - -# Sources to build library -LIBSOURCES = jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c @MEMORYMGR@.c - -# System dependent sources -SYSDEPSOURCES = jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c - -# Headers which are installed to support the library -INSTINCLUDES = jerror.h jmorecfg.h jpeglib.h - -# Headers which are not installed -OTHERINCLUDES = cderror.h cdjpeg.h jdct.h jinclude.h jmemsys.h jpegint.h \ - jversion.h transupp.h - -# Manual pages (Automake uses 'MANS' for itself) -DISTMANS= cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1 - -# Other documentation files -DOCS= README install.txt usage.txt wizard.txt example.c libjpeg.txt \ - structure.txt coderules.txt filelist.txt cdaltui.txt change.log - -# Makefiles for various systems -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt - -# Configuration files -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms - -# Support scripts for configure -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib - -# Miscellaneous support files -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c - -# Test support files -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg - -# libtool libraries to build -lib_LTLIBRARIES = libjpeg.la - -# Library sources for libjpeg.la -libjpeg_la_SOURCES = $(LIBSOURCES) - -# LDFLAGS for libjpeg.la -libjpeg_la_LDFLAGS = -no-undefined \ - -version-info $(JPEG_LIB_VERSION) - -if HAVE_LD_VERSION_SCRIPT - libjpeg_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libjpeg.map -endif - -# Executables to build -bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom - -# Executable sources & libs -cjpeg_SOURCES = cjpeg.c rdppm.c rdgif.c rdtarga.c rdrle.c rdbmp.c \ - rdswitch.c cdjpeg.c -cjpeg_LDADD = libjpeg.la -djpeg_SOURCES = djpeg.c wrppm.c wrgif.c wrtarga.c wrrle.c wrbmp.c \ - rdcolmap.c cdjpeg.c -djpeg_LDADD = libjpeg.la -jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c -jpegtran_LDADD = libjpeg.la -rdjpgcom_SOURCES = rdjpgcom.c -wrjpgcom_SOURCES = wrjpgcom.c - -# Manual pages to install -man_MANS = $(DISTMANS) - -# Headers to install -include_HEADERS = $(INSTINCLUDES) - -# Other distributed headers -noinst_HEADERS = $(OTHERINCLUDES) - -# Other distributed files -EXTRA_DIST = $(DOCS) $(DISTMANS) $(MKFILES) $(CONFIGFILES) $(SYSDEPSOURCES) \ - $(OTHERFILES) $(TESTFILES) - -# pkg-config file -pkgconfigdir = $(libdir)/pkgconfig -nodist_pkgconfig_DATA = libjpeg.pc - -# Files to be cleaned -CLEANFILES = testout.ppm testout.gif testout.bmp testout.jpg testoutp.ppm \ - testoutp.jpg testoutt.jpg - -# Install jconfig.h -install-data-local: - $(mkinstalldirs) $(DESTDIR)$(includedir) - $(INSTALL_HEADER) jconfig.h $(DESTDIR)$(includedir)/jconfig.h - -# Uninstall jconfig.h -uninstall-local: - rm -f $(DESTDIR)$(includedir)/jconfig.h - -# Run tests -test: check-local -check-local: - rm -f testout* - ./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)/testorig.jpg - ./djpeg -dct int -gif -outfile testout.gif $(srcdir)/testorig.jpg - ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg - ./cjpeg -dct int -outfile testout.jpg $(srcdir)/testimg.ppm - ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg - ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm - ./jpegtran -outfile testoutt.jpg $(srcdir)/testprog.jpg - cmp $(srcdir)/testimg.ppm testout.ppm - cmp $(srcdir)/testimg.gif testout.gif - cmp $(srcdir)/testimg.bmp testout.bmp - cmp $(srcdir)/testimg.jpg testout.jpg - cmp $(srcdir)/testimg.ppm testoutp.ppm - cmp $(srcdir)/testimgp.jpg testoutp.jpg - cmp $(srcdir)/testorig.jpg testoutt.jpg diff --git a/thirdparty/jpeg-9e/Makefile.in b/thirdparty/jpeg-9e/Makefile.in deleted file mode 100644 index 7cfc261..0000000 --- a/thirdparty/jpeg-9e/Makefile.in +++ /dev/null @@ -1,1249 +0,0 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2021 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Automake Makefile for the JPEG library -# -# This file is written by Bob Friesenhahn, Guido Vollbeding -# - - - - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@HAVE_LD_VERSION_SCRIPT_TRUE@am__append_1 = -Wl,--version-script=$(srcdir)/libjpeg.map -bin_PROGRAMS = cjpeg$(EXEEXT) djpeg$(EXEEXT) jpegtran$(EXEEXT) \ - rdjpgcom$(EXEEXT) wrjpgcom$(EXEEXT) -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(include_HEADERS) $(noinst_HEADERS) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = jconfig.h -CONFIG_CLEAN_FILES = libjpeg.pc -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(includedir)" -PROGRAMS = $(bin_PROGRAMS) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -LTLIBRARIES = $(lib_LTLIBRARIES) -libjpeg_la_LIBADD = -am__objects_1 = jaricom.lo jcapimin.lo jcapistd.lo jcarith.lo \ - jccoefct.lo jccolor.lo jcdctmgr.lo jchuff.lo jcinit.lo \ - jcmainct.lo jcmarker.lo jcmaster.lo jcomapi.lo jcparam.lo \ - jcprepct.lo jcsample.lo jctrans.lo jdapimin.lo jdapistd.lo \ - jdarith.lo jdatadst.lo jdatasrc.lo jdcoefct.lo jdcolor.lo \ - jddctmgr.lo jdhuff.lo jdinput.lo jdmainct.lo jdmarker.lo \ - jdmaster.lo jdmerge.lo jdpostct.lo jdsample.lo jdtrans.lo \ - jerror.lo jfdctflt.lo jfdctfst.lo jfdctint.lo jidctflt.lo \ - jidctfst.lo jidctint.lo jquant1.lo jquant2.lo jutils.lo \ - jmemmgr.lo @MEMORYMGR@.lo -am_libjpeg_la_OBJECTS = $(am__objects_1) -libjpeg_la_OBJECTS = $(am_libjpeg_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -libjpeg_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libjpeg_la_LDFLAGS) $(LDFLAGS) -o $@ -am_cjpeg_OBJECTS = cjpeg.$(OBJEXT) rdppm.$(OBJEXT) rdgif.$(OBJEXT) \ - rdtarga.$(OBJEXT) rdrle.$(OBJEXT) rdbmp.$(OBJEXT) \ - rdswitch.$(OBJEXT) cdjpeg.$(OBJEXT) -cjpeg_OBJECTS = $(am_cjpeg_OBJECTS) -cjpeg_DEPENDENCIES = libjpeg.la -am_djpeg_OBJECTS = djpeg.$(OBJEXT) wrppm.$(OBJEXT) wrgif.$(OBJEXT) \ - wrtarga.$(OBJEXT) wrrle.$(OBJEXT) wrbmp.$(OBJEXT) \ - rdcolmap.$(OBJEXT) cdjpeg.$(OBJEXT) -djpeg_OBJECTS = $(am_djpeg_OBJECTS) -djpeg_DEPENDENCIES = libjpeg.la -am_jpegtran_OBJECTS = jpegtran.$(OBJEXT) rdswitch.$(OBJEXT) \ - cdjpeg.$(OBJEXT) transupp.$(OBJEXT) -jpegtran_OBJECTS = $(am_jpegtran_OBJECTS) -jpegtran_DEPENDENCIES = libjpeg.la -am_rdjpgcom_OBJECTS = rdjpgcom.$(OBJEXT) -rdjpgcom_OBJECTS = $(am_rdjpgcom_OBJECTS) -rdjpgcom_LDADD = $(LDADD) -am_wrjpgcom_OBJECTS = wrjpgcom.$(OBJEXT) -wrjpgcom_OBJECTS = $(am_wrjpgcom_OBJECTS) -wrjpgcom_LDADD = $(LDADD) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/@MEMORYMGR@.Plo \ - ./$(DEPDIR)/cdjpeg.Po ./$(DEPDIR)/cjpeg.Po \ - ./$(DEPDIR)/djpeg.Po ./$(DEPDIR)/jaricom.Plo \ - ./$(DEPDIR)/jcapimin.Plo ./$(DEPDIR)/jcapistd.Plo \ - ./$(DEPDIR)/jcarith.Plo ./$(DEPDIR)/jccoefct.Plo \ - ./$(DEPDIR)/jccolor.Plo ./$(DEPDIR)/jcdctmgr.Plo \ - ./$(DEPDIR)/jchuff.Plo ./$(DEPDIR)/jcinit.Plo \ - ./$(DEPDIR)/jcmainct.Plo ./$(DEPDIR)/jcmarker.Plo \ - ./$(DEPDIR)/jcmaster.Plo ./$(DEPDIR)/jcomapi.Plo \ - ./$(DEPDIR)/jcparam.Plo ./$(DEPDIR)/jcprepct.Plo \ - ./$(DEPDIR)/jcsample.Plo ./$(DEPDIR)/jctrans.Plo \ - ./$(DEPDIR)/jdapimin.Plo ./$(DEPDIR)/jdapistd.Plo \ - ./$(DEPDIR)/jdarith.Plo ./$(DEPDIR)/jdatadst.Plo \ - ./$(DEPDIR)/jdatasrc.Plo ./$(DEPDIR)/jdcoefct.Plo \ - ./$(DEPDIR)/jdcolor.Plo ./$(DEPDIR)/jddctmgr.Plo \ - ./$(DEPDIR)/jdhuff.Plo ./$(DEPDIR)/jdinput.Plo \ - ./$(DEPDIR)/jdmainct.Plo ./$(DEPDIR)/jdmarker.Plo \ - ./$(DEPDIR)/jdmaster.Plo ./$(DEPDIR)/jdmerge.Plo \ - ./$(DEPDIR)/jdpostct.Plo ./$(DEPDIR)/jdsample.Plo \ - ./$(DEPDIR)/jdtrans.Plo ./$(DEPDIR)/jerror.Plo \ - ./$(DEPDIR)/jfdctflt.Plo ./$(DEPDIR)/jfdctfst.Plo \ - ./$(DEPDIR)/jfdctint.Plo ./$(DEPDIR)/jidctflt.Plo \ - ./$(DEPDIR)/jidctfst.Plo ./$(DEPDIR)/jidctint.Plo \ - ./$(DEPDIR)/jmemmgr.Plo ./$(DEPDIR)/jpegtran.Po \ - ./$(DEPDIR)/jquant1.Plo ./$(DEPDIR)/jquant2.Plo \ - ./$(DEPDIR)/jutils.Plo ./$(DEPDIR)/rdbmp.Po \ - ./$(DEPDIR)/rdcolmap.Po ./$(DEPDIR)/rdgif.Po \ - ./$(DEPDIR)/rdjpgcom.Po ./$(DEPDIR)/rdppm.Po \ - ./$(DEPDIR)/rdrle.Po ./$(DEPDIR)/rdswitch.Po \ - ./$(DEPDIR)/rdtarga.Po ./$(DEPDIR)/transupp.Po \ - ./$(DEPDIR)/wrbmp.Po ./$(DEPDIR)/wrgif.Po \ - ./$(DEPDIR)/wrjpgcom.Po ./$(DEPDIR)/wrppm.Po \ - ./$(DEPDIR)/wrrle.Po ./$(DEPDIR)/wrtarga.Po -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libjpeg_la_SOURCES) $(cjpeg_SOURCES) $(djpeg_SOURCES) \ - $(jpegtran_SOURCES) $(rdjpgcom_SOURCES) $(wrjpgcom_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(man_MANS) -DATA = $(nodist_pkgconfig_DATA) -HEADERS = $(include_HEADERS) $(noinst_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ - jconfig.cfg -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -AM_RECURSIVE_TARGETS = cscope -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ETAGS = @ETAGS@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -JPEG_LIB_VERSION = @JPEG_LIB_VERSION@ -JPEG_LIB_VERSION_MAJOR = @JPEG_LIB_VERSION_MAJOR@ -JPEG_LIB_VERSION_MINOR = @JPEG_LIB_VERSION_MINOR@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MEMORYMGR = @MEMORYMGR@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Sources to build library -LIBSOURCES = jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c @MEMORYMGR@.c - - -# System dependent sources -SYSDEPSOURCES = jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c - -# Headers which are installed to support the library -INSTINCLUDES = jerror.h jmorecfg.h jpeglib.h - -# Headers which are not installed -OTHERINCLUDES = cderror.h cdjpeg.h jdct.h jinclude.h jmemsys.h jpegint.h \ - jversion.h transupp.h - - -# Manual pages (Automake uses 'MANS' for itself) -DISTMANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1 - -# Other documentation files -DOCS = README install.txt usage.txt wizard.txt example.c libjpeg.txt \ - structure.txt coderules.txt filelist.txt cdaltui.txt change.log - - -# Makefiles for various systems -MKFILES = configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt - - -# Configuration files -CONFIGFILES = jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms - - -# Support scripts for configure -CONFIGUREFILES = config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib - - -# Miscellaneous support files -OTHERFILES = jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c - - -# Test support files -TESTFILES = testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg - - -# libtool libraries to build -lib_LTLIBRARIES = libjpeg.la - -# Library sources for libjpeg.la -libjpeg_la_SOURCES = $(LIBSOURCES) - -# LDFLAGS for libjpeg.la -libjpeg_la_LDFLAGS = -no-undefined -version-info $(JPEG_LIB_VERSION) \ - $(am__append_1) - -# Executable sources & libs -cjpeg_SOURCES = cjpeg.c rdppm.c rdgif.c rdtarga.c rdrle.c rdbmp.c \ - rdswitch.c cdjpeg.c - -cjpeg_LDADD = libjpeg.la -djpeg_SOURCES = djpeg.c wrppm.c wrgif.c wrtarga.c wrrle.c wrbmp.c \ - rdcolmap.c cdjpeg.c - -djpeg_LDADD = libjpeg.la -jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c -jpegtran_LDADD = libjpeg.la -rdjpgcom_SOURCES = rdjpgcom.c -wrjpgcom_SOURCES = wrjpgcom.c - -# Manual pages to install -man_MANS = $(DISTMANS) - -# Headers to install -include_HEADERS = $(INSTINCLUDES) - -# Other distributed headers -noinst_HEADERS = $(OTHERINCLUDES) - -# Other distributed files -EXTRA_DIST = $(DOCS) $(DISTMANS) $(MKFILES) $(CONFIGFILES) $(SYSDEPSOURCES) \ - $(OTHERFILES) $(TESTFILES) - - -# pkg-config file -pkgconfigdir = $(libdir)/pkgconfig -nodist_pkgconfig_DATA = libjpeg.pc - -# Files to be cleaned -CLEANFILES = testout.ppm testout.gif testout.bmp testout.jpg testoutp.ppm \ - testoutp.jpg testoutt.jpg - -all: jconfig.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -jconfig.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 - -stamp-h1: $(srcdir)/jconfig.cfg $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status jconfig.h -$(srcdir)/jconfig.cfg: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f jconfig.h stamp-h1 -libjpeg.pc: $(top_builddir)/config.status $(srcdir)/libjpeg.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -libjpeg.la: $(libjpeg_la_OBJECTS) $(libjpeg_la_DEPENDENCIES) $(EXTRA_libjpeg_la_DEPENDENCIES) - $(AM_V_CCLD)$(libjpeg_la_LINK) -rpath $(libdir) $(libjpeg_la_OBJECTS) $(libjpeg_la_LIBADD) $(LIBS) - -cjpeg$(EXEEXT): $(cjpeg_OBJECTS) $(cjpeg_DEPENDENCIES) $(EXTRA_cjpeg_DEPENDENCIES) - @rm -f cjpeg$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(cjpeg_OBJECTS) $(cjpeg_LDADD) $(LIBS) - -djpeg$(EXEEXT): $(djpeg_OBJECTS) $(djpeg_DEPENDENCIES) $(EXTRA_djpeg_DEPENDENCIES) - @rm -f djpeg$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(djpeg_OBJECTS) $(djpeg_LDADD) $(LIBS) - -jpegtran$(EXEEXT): $(jpegtran_OBJECTS) $(jpegtran_DEPENDENCIES) $(EXTRA_jpegtran_DEPENDENCIES) - @rm -f jpegtran$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(jpegtran_OBJECTS) $(jpegtran_LDADD) $(LIBS) - -rdjpgcom$(EXEEXT): $(rdjpgcom_OBJECTS) $(rdjpgcom_DEPENDENCIES) $(EXTRA_rdjpgcom_DEPENDENCIES) - @rm -f rdjpgcom$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(rdjpgcom_OBJECTS) $(rdjpgcom_LDADD) $(LIBS) - -wrjpgcom$(EXEEXT): $(wrjpgcom_OBJECTS) $(wrjpgcom_DEPENDENCIES) $(EXTRA_wrjpgcom_DEPENDENCIES) - @rm -f wrjpgcom$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(wrjpgcom_OBJECTS) $(wrjpgcom_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/@MEMORYMGR@.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdjpeg.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cjpeg.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/djpeg.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jaricom.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcapimin.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcapistd.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcarith.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jccoefct.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jccolor.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcdctmgr.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jchuff.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcinit.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcmainct.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcmarker.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcmaster.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcomapi.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcparam.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcprepct.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcsample.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jctrans.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdapimin.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdapistd.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdarith.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdatadst.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdatasrc.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdcoefct.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdcolor.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jddctmgr.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdhuff.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdinput.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdmainct.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdmarker.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdmaster.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdmerge.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdpostct.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdsample.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jdtrans.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jerror.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfdctflt.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfdctfst.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfdctint.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jidctflt.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jidctfst.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jidctint.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jmemmgr.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpegtran.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jquant1.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jquant2.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jutils.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdbmp.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdcolmap.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdgif.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdjpgcom.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdppm.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdrle.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdswitch.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdtarga.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transupp.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrbmp.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrgif.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrjpgcom.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrppm.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrrle.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrtarga.Po@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(man_MANS)'; \ - test -n "$(man1dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.1[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) -install-nodist_pkgconfigDATA: $(nodist_pkgconfig_DATA) - @$(NORMAL_INSTALL) - @list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - -uninstall-nodist_pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscope: cscope.files - test ! -s cscope.files \ - || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) -clean-cscope: - -rm -f cscope.files -cscope.files: clean-cscope cscopelist -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(MANS) $(DATA) $(HEADERS) \ - jconfig.h -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f ./$(DEPDIR)/@MEMORYMGR@.Plo - -rm -f ./$(DEPDIR)/cdjpeg.Po - -rm -f ./$(DEPDIR)/cjpeg.Po - -rm -f ./$(DEPDIR)/djpeg.Po - -rm -f ./$(DEPDIR)/jaricom.Plo - -rm -f ./$(DEPDIR)/jcapimin.Plo - -rm -f ./$(DEPDIR)/jcapistd.Plo - -rm -f ./$(DEPDIR)/jcarith.Plo - -rm -f ./$(DEPDIR)/jccoefct.Plo - -rm -f ./$(DEPDIR)/jccolor.Plo - -rm -f ./$(DEPDIR)/jcdctmgr.Plo - -rm -f ./$(DEPDIR)/jchuff.Plo - -rm -f ./$(DEPDIR)/jcinit.Plo - -rm -f ./$(DEPDIR)/jcmainct.Plo - -rm -f ./$(DEPDIR)/jcmarker.Plo - -rm -f ./$(DEPDIR)/jcmaster.Plo - -rm -f ./$(DEPDIR)/jcomapi.Plo - -rm -f ./$(DEPDIR)/jcparam.Plo - -rm -f ./$(DEPDIR)/jcprepct.Plo - -rm -f ./$(DEPDIR)/jcsample.Plo - -rm -f ./$(DEPDIR)/jctrans.Plo - -rm -f ./$(DEPDIR)/jdapimin.Plo - -rm -f ./$(DEPDIR)/jdapistd.Plo - -rm -f ./$(DEPDIR)/jdarith.Plo - -rm -f ./$(DEPDIR)/jdatadst.Plo - -rm -f ./$(DEPDIR)/jdatasrc.Plo - -rm -f ./$(DEPDIR)/jdcoefct.Plo - -rm -f ./$(DEPDIR)/jdcolor.Plo - -rm -f ./$(DEPDIR)/jddctmgr.Plo - -rm -f ./$(DEPDIR)/jdhuff.Plo - -rm -f ./$(DEPDIR)/jdinput.Plo - -rm -f ./$(DEPDIR)/jdmainct.Plo - -rm -f ./$(DEPDIR)/jdmarker.Plo - -rm -f ./$(DEPDIR)/jdmaster.Plo - -rm -f ./$(DEPDIR)/jdmerge.Plo - -rm -f ./$(DEPDIR)/jdpostct.Plo - -rm -f ./$(DEPDIR)/jdsample.Plo - -rm -f ./$(DEPDIR)/jdtrans.Plo - -rm -f ./$(DEPDIR)/jerror.Plo - -rm -f ./$(DEPDIR)/jfdctflt.Plo - -rm -f ./$(DEPDIR)/jfdctfst.Plo - -rm -f ./$(DEPDIR)/jfdctint.Plo - -rm -f ./$(DEPDIR)/jidctflt.Plo - -rm -f ./$(DEPDIR)/jidctfst.Plo - -rm -f ./$(DEPDIR)/jidctint.Plo - -rm -f ./$(DEPDIR)/jmemmgr.Plo - -rm -f ./$(DEPDIR)/jpegtran.Po - -rm -f ./$(DEPDIR)/jquant1.Plo - -rm -f ./$(DEPDIR)/jquant2.Plo - -rm -f ./$(DEPDIR)/jutils.Plo - -rm -f ./$(DEPDIR)/rdbmp.Po - -rm -f ./$(DEPDIR)/rdcolmap.Po - -rm -f ./$(DEPDIR)/rdgif.Po - -rm -f ./$(DEPDIR)/rdjpgcom.Po - -rm -f ./$(DEPDIR)/rdppm.Po - -rm -f ./$(DEPDIR)/rdrle.Po - -rm -f ./$(DEPDIR)/rdswitch.Po - -rm -f ./$(DEPDIR)/rdtarga.Po - -rm -f ./$(DEPDIR)/transupp.Po - -rm -f ./$(DEPDIR)/wrbmp.Po - -rm -f ./$(DEPDIR)/wrgif.Po - -rm -f ./$(DEPDIR)/wrjpgcom.Po - -rm -f ./$(DEPDIR)/wrppm.Po - -rm -f ./$(DEPDIR)/wrrle.Po - -rm -f ./$(DEPDIR)/wrtarga.Po - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-data-local install-includeHEADERS install-man \ - install-nodist_pkgconfigDATA - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f ./$(DEPDIR)/@MEMORYMGR@.Plo - -rm -f ./$(DEPDIR)/cdjpeg.Po - -rm -f ./$(DEPDIR)/cjpeg.Po - -rm -f ./$(DEPDIR)/djpeg.Po - -rm -f ./$(DEPDIR)/jaricom.Plo - -rm -f ./$(DEPDIR)/jcapimin.Plo - -rm -f ./$(DEPDIR)/jcapistd.Plo - -rm -f ./$(DEPDIR)/jcarith.Plo - -rm -f ./$(DEPDIR)/jccoefct.Plo - -rm -f ./$(DEPDIR)/jccolor.Plo - -rm -f ./$(DEPDIR)/jcdctmgr.Plo - -rm -f ./$(DEPDIR)/jchuff.Plo - -rm -f ./$(DEPDIR)/jcinit.Plo - -rm -f ./$(DEPDIR)/jcmainct.Plo - -rm -f ./$(DEPDIR)/jcmarker.Plo - -rm -f ./$(DEPDIR)/jcmaster.Plo - -rm -f ./$(DEPDIR)/jcomapi.Plo - -rm -f ./$(DEPDIR)/jcparam.Plo - -rm -f ./$(DEPDIR)/jcprepct.Plo - -rm -f ./$(DEPDIR)/jcsample.Plo - -rm -f ./$(DEPDIR)/jctrans.Plo - -rm -f ./$(DEPDIR)/jdapimin.Plo - -rm -f ./$(DEPDIR)/jdapistd.Plo - -rm -f ./$(DEPDIR)/jdarith.Plo - -rm -f ./$(DEPDIR)/jdatadst.Plo - -rm -f ./$(DEPDIR)/jdatasrc.Plo - -rm -f ./$(DEPDIR)/jdcoefct.Plo - -rm -f ./$(DEPDIR)/jdcolor.Plo - -rm -f ./$(DEPDIR)/jddctmgr.Plo - -rm -f ./$(DEPDIR)/jdhuff.Plo - -rm -f ./$(DEPDIR)/jdinput.Plo - -rm -f ./$(DEPDIR)/jdmainct.Plo - -rm -f ./$(DEPDIR)/jdmarker.Plo - -rm -f ./$(DEPDIR)/jdmaster.Plo - -rm -f ./$(DEPDIR)/jdmerge.Plo - -rm -f ./$(DEPDIR)/jdpostct.Plo - -rm -f ./$(DEPDIR)/jdsample.Plo - -rm -f ./$(DEPDIR)/jdtrans.Plo - -rm -f ./$(DEPDIR)/jerror.Plo - -rm -f ./$(DEPDIR)/jfdctflt.Plo - -rm -f ./$(DEPDIR)/jfdctfst.Plo - -rm -f ./$(DEPDIR)/jfdctint.Plo - -rm -f ./$(DEPDIR)/jidctflt.Plo - -rm -f ./$(DEPDIR)/jidctfst.Plo - -rm -f ./$(DEPDIR)/jidctint.Plo - -rm -f ./$(DEPDIR)/jmemmgr.Plo - -rm -f ./$(DEPDIR)/jpegtran.Po - -rm -f ./$(DEPDIR)/jquant1.Plo - -rm -f ./$(DEPDIR)/jquant2.Plo - -rm -f ./$(DEPDIR)/jutils.Plo - -rm -f ./$(DEPDIR)/rdbmp.Po - -rm -f ./$(DEPDIR)/rdcolmap.Po - -rm -f ./$(DEPDIR)/rdgif.Po - -rm -f ./$(DEPDIR)/rdjpgcom.Po - -rm -f ./$(DEPDIR)/rdppm.Po - -rm -f ./$(DEPDIR)/rdrle.Po - -rm -f ./$(DEPDIR)/rdswitch.Po - -rm -f ./$(DEPDIR)/rdtarga.Po - -rm -f ./$(DEPDIR)/transupp.Po - -rm -f ./$(DEPDIR)/wrbmp.Po - -rm -f ./$(DEPDIR)/wrgif.Po - -rm -f ./$(DEPDIR)/wrjpgcom.Po - -rm -f ./$(DEPDIR)/wrppm.Po - -rm -f ./$(DEPDIR)/wrrle.Po - -rm -f ./$(DEPDIR)/wrtarga.Po - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-local uninstall-man \ - uninstall-nodist_pkgconfigDATA - -uninstall-man: uninstall-man1 - -.MAKE: all check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \ - check-am check-local clean clean-binPROGRAMS clean-cscope \ - clean-generic clean-libLTLIBRARIES clean-libtool cscope \ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags dvi dvi-am html html-am info info-am install \ - install-am install-binPROGRAMS install-data install-data-am \ - install-data-local install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am \ - install-includeHEADERS install-info install-info-am \ - install-libLTLIBRARIES install-man install-man1 \ - install-nodist_pkgconfigDATA install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-local uninstall-man uninstall-man1 \ - uninstall-nodist_pkgconfigDATA - -.PRECIOUS: Makefile - - -# Install jconfig.h -install-data-local: - $(mkinstalldirs) $(DESTDIR)$(includedir) - $(INSTALL_HEADER) jconfig.h $(DESTDIR)$(includedir)/jconfig.h - -# Uninstall jconfig.h -uninstall-local: - rm -f $(DESTDIR)$(includedir)/jconfig.h - -# Run tests -test: check-local -check-local: - rm -f testout* - ./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)/testorig.jpg - ./djpeg -dct int -gif -outfile testout.gif $(srcdir)/testorig.jpg - ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg - ./cjpeg -dct int -outfile testout.jpg $(srcdir)/testimg.ppm - ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg - ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm - ./jpegtran -outfile testoutt.jpg $(srcdir)/testprog.jpg - cmp $(srcdir)/testimg.ppm testout.ppm - cmp $(srcdir)/testimg.gif testout.gif - cmp $(srcdir)/testimg.bmp testout.bmp - cmp $(srcdir)/testimg.jpg testout.jpg - cmp $(srcdir)/testimg.ppm testoutp.ppm - cmp $(srcdir)/testimgp.jpg testoutp.jpg - cmp $(srcdir)/testorig.jpg testoutt.jpg - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/thirdparty/jpeg-9e/README b/thirdparty/jpeg-9e/README deleted file mode 100644 index d288f41..0000000 --- a/thirdparty/jpeg-9e/README +++ /dev/null @@ -1,374 +0,0 @@ -The Independent JPEG Group's JPEG software -========================================== - -README for release 9e of 16-Jan-2022 -==================================== - -This distribution contains the ninth public release of the Independent JPEG -Group's free JPEG software. You are welcome to redistribute this software and -to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. - -This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone, -Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson, -John Korejwa, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, -Ge' Weijers, and other members of the Independent JPEG Group. - -IJG is not affiliated with the ISO/IEC JTC1/SC29/WG1 standards committee -(previously known as JPEG, together with ITU-T SG16). - - -DOCUMENTATION ROADMAP -===================== - -This file contains the following sections: - -OVERVIEW General description of JPEG and the IJG software. -LEGAL ISSUES Copyright, lack of warranty, terms of distribution. -REFERENCES Where to learn more about JPEG. -ARCHIVE LOCATIONS Where to find newer versions of this software. -ACKNOWLEDGMENTS Special thanks. -FILE FORMAT WARS Software *not* to get. -TO DO Plans for future IJG releases. - -Other documentation files in the distribution are: - -User documentation: - install.txt How to configure and install the IJG software. - usage.txt Usage instructions for cjpeg, djpeg, jpegtran, - rdjpgcom, and wrjpgcom. - *.1 Unix-style man pages for programs (same info as usage.txt). - wizard.txt Advanced usage instructions for JPEG wizards only. - cdaltui.txt Description of alternate user interface for cjpeg/djpeg. - change.log Version-to-version change highlights. -Programmer and internal documentation: - libjpeg.txt How to use the JPEG library in your own programs. - example.c Sample code for calling the JPEG library. - structure.txt Overview of the JPEG library's internal structure. - filelist.txt Road map of IJG files. - coderules.txt Coding style rules --- please read if you contribute code. - -Please read at least the files install.txt and usage.txt. Some information -can also be found in the JPEG FAQ (Frequently Asked Questions) article. See -ARCHIVE LOCATIONS below to find out where to obtain the FAQ article. - -If you want to understand how the JPEG code works, we suggest reading one or -more of the REFERENCES, then looking at the documentation files (in roughly -the order listed) before diving into the code. - - -OVERVIEW -======== - -This package contains C software to implement JPEG image encoding, decoding, -and transcoding. JPEG (pronounced "jay-peg") is a standardized compression -method for full-color and grayscale images. - -This software implements JPEG baseline, extended-sequential, and progressive -compression processes. Provision is made for supporting all variants of these -processes, although some uncommon parameter settings aren't implemented yet. -We have made no provision for supporting the hierarchical or lossless -processes defined in the standard. - -We provide a set of library routines for reading and writing JPEG image files, -plus two sample applications "cjpeg" and "djpeg", which use the library to -perform conversion between JPEG and some other popular image file formats. -The library is intended to be reused in other applications. - -In order to support file conversion and viewing software, we have included -considerable functionality beyond the bare JPEG coding/decoding capability; -for example, the color quantization modules are not strictly part of JPEG -decoding, but they are essential for output to colormapped file formats or -colormapped displays. These extra functions can be compiled out of the -library if not required for a particular application. - -We have also included "jpegtran", a utility for lossless transcoding between -different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple -applications for inserting and extracting textual comments in JFIF files. - -The emphasis in designing this software has been on achieving portability and -flexibility, while also making it fast enough to be useful. In particular, -the software is not intended to be read as a tutorial on JPEG. (See the -REFERENCES section for introductory material.) Rather, it is intended to -be reliable, portable, industrial-strength code. We do not claim to have -achieved that goal in every aspect of the software, but we strive for it. - -We welcome the use of this software as a component of commercial products. -No royalty is required, but we do ask for an acknowledgement in product -documentation, as described under LEGAL ISSUES. - - -LEGAL ISSUES -============ - -In plain English: - -1. We don't promise that this software works. (But if you find any bugs, - please let us know!) -2. You can use this software for whatever you want. You don't have to pay us. -3. You may not pretend that you wrote this software. If you use it in a - program, you must acknowledge somewhere in your documentation that - you've used the IJG code. - -In legalese: - -The authors make NO WARRANTY or representation, either express or implied, -with respect to this software, its quality, accuracy, merchantability, or -fitness for a particular purpose. This software is provided "AS IS", and you, -its user, assume the entire risk as to its quality and accuracy. - -This software is copyright (C) 1991-2022, Thomas G. Lane, Guido Vollbeding. -All Rights Reserved except as specified below. - -Permission is hereby granted to use, copy, modify, and distribute this -software (or portions thereof) for any purpose, without fee, subject to these -conditions: -(1) If any part of the source code for this software is distributed, then this -README file must be included, with this copyright and no-warranty notice -unaltered; and any additions, deletions, or changes to the original files -must be clearly indicated in accompanying documentation. -(2) If only executable code is distributed, then the accompanying -documentation must state that "this software is based in part on the work of -the Independent JPEG Group". -(3) Permission for use of this software is granted only if the user accepts -full responsibility for any undesirable consequences; the authors accept -NO LIABILITY for damages of any kind. - -These conditions apply to any software derived from or based on the IJG code, -not just to the unmodified library. If you use our work, you ought to -acknowledge us. - -Permission is NOT granted for the use of any IJG author's name or company name -in advertising or publicity relating to this software or products derived from -it. This software may be referred to only as "the Independent JPEG Group's -software". - -We specifically permit and encourage the use of this software as the basis of -commercial products, provided that all warranty or liability claims are -assumed by the product vendor. - - -The Unix configuration script "configure" was produced with GNU Autoconf. -It is copyright by the Free Software Foundation but is freely distributable. -The same holds for its supporting scripts (config.guess, config.sub, -ltmain.sh). Another support script, install-sh, is copyright by X Consortium -but is also freely distributable. - - -REFERENCES -========== - -We recommend reading one or more of these references before trying to -understand the innards of the JPEG software. - -The best short technical introduction to the JPEG compression algorithm is - Wallace, Gregory K. "The JPEG Still Picture Compression Standard", - Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44. -(Adjacent articles in that issue discuss MPEG motion picture compression, -applications of JPEG, and related topics.) If you don't have the CACM issue -handy, a PDF file containing a revised version of Wallace's article is -available at https://www.ijg.org/files/Wallace.JPEG.pdf. The file (actually -a preprint for an article that appeared in IEEE Trans. Consumer Electronics) -omits the sample images that appeared in CACM, but it includes corrections -and some added material. Note: the Wallace article is copyright ACM and IEEE, -and it may not be used for commercial purposes. - -A somewhat less technical, more leisurely introduction to JPEG can be found in -"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by -M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides -good explanations and example C code for a multitude of compression methods -including JPEG. It is an excellent source if you are comfortable reading C -code but don't know much about data compression in general. The book's JPEG -sample code is far from industrial-strength, but when you are ready to look -at a full implementation, you've got one here... - -The best currently available description of JPEG is the textbook "JPEG Still -Image Data Compression Standard" by William B. Pennebaker and Joan L. -Mitchell, published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. -Price US$59.95, 638 pp. The book includes the complete text of the ISO JPEG -standards (DIS 10918-1 and draft DIS 10918-2). -Although this is by far the most detailed and comprehensive exposition of -JPEG publicly available, we point out that it is still missing an explanation -of the most essential properties and algorithms of the underlying DCT -technology. -If you think that you know about DCT-based JPEG after reading this book, -then you are in delusion. The real fundamentals and corresponding potential -of DCT-based JPEG are not publicly known so far, and that is the reason for -all the mistaken developments taking place in the image coding domain. - -The original JPEG standard is divided into two parts, Part 1 being the actual -specification, while Part 2 covers compliance testing methods. Part 1 is -titled "Digital Compression and Coding of Continuous-tone Still Images, -Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS -10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of -Continuous-tone Still Images, Part 2: Compliance testing" and has document -numbers ISO/IEC IS 10918-2, ITU-T T.83. -IJG JPEG 8 introduced an implementation of the JPEG SmartScale extension -which is specified in two documents: A contributed document at ITU and ISO -with title "ITU-T JPEG-Plus Proposal for Extending ITU-T T.81 for Advanced -Image Coding", April 2006, Geneva, Switzerland. The latest version of this -document is Revision 3. And a contributed document ISO/IEC JTC1/SC29/WG1 N -5799 with title "Evolution of JPEG", June/July 2011, Berlin, Germany. -IJG JPEG 9 introduces a reversible color transform for improved lossless -compression which is described in a contributed document ISO/IEC JTC1/SC29/ -WG1 N 6080 with title "JPEG 9 Lossless Coding", June/July 2012, Paris, France. - -The JPEG standard does not specify all details of an interchangeable file -format. For the omitted details we follow the "JFIF" conventions, version 2. -JFIF version 1 has been adopted as Recommendation ITU-T T.871 (05/2011) : -Information technology - Digital compression and coding of continuous-tone -still images: JPEG File Interchange Format (JFIF). It is available as a -free download in PDF file format from https://www.itu.int/rec/T-REC-T.871. -A PDF file of the older JFIF document is available at -https://www.w3.org/Graphics/JPEG/jfif3.pdf. - -The TIFF 6.0 file format specification can be obtained by FTP from -ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme -found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems. -IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6). -Instead, we recommend the JPEG design proposed by TIFF Technical Note #2 -(Compression tag 7). Copies of this Note can be obtained from -https://www.ijg.org/files/. It is expected that the next revision -of the TIFF spec will replace the 6.0 JPEG design with the Note's design. -Although IJG's own code does not support TIFF/JPEG, the free libtiff library -uses our library to implement TIFF/JPEG per the Note. - - -ARCHIVE LOCATIONS -================= - -The "official" archive site for this software is www.ijg.org. -The most recent released version can always be found there in -directory "files". This particular version will be archived -in Windows-compatible "zip" archive format as -https://www.ijg.org/files/jpegsr9e.zip, and -in Unix-compatible "tar.gz" archive format as -https://www.ijg.org/files/jpegsrc.v9e.tar.gz. - -The JPEG FAQ (Frequently Asked Questions) article is a source of some -general information about JPEG. -It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/ -and other news.answers archive sites, including the official news.answers -archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/. -If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu -with body - send usenet/news.answers/jpeg-faq/part1 - send usenet/news.answers/jpeg-faq/part2 - - -ACKNOWLEDGMENTS -=============== - -Thank to Juergen Bruder for providing me with a copy of the common DCT -algorithm article, only to find out that I had come to the same result -in a more direct and comprehensible way with a more generative approach. - -Thank to Istvan Sebestyen and Joan L. Mitchell for inviting me to the -ITU JPEG (Study Group 16) meeting in Geneva, Switzerland. - -Thank to Thomas Wiegand and Gary Sullivan for inviting me to the -Joint Video Team (MPEG & ITU) meeting in Geneva, Switzerland. - -Thank to Thomas Richter and Daniel Lee for inviting me to the -ISO/IEC JTC1/SC29/WG1 (previously known as JPEG, together with ITU-T SG16) -meeting in Berlin, Germany. - -Thank to John Korejwa and Massimo Ballerini for inviting me to -fruitful consultations in Boston, MA and Milan, Italy. - -Thank to Hendrik Elstner, Roland Fassauer, Simone Zuck, Guenther -Maier-Gerber, Walter Stoeber, Fred Schmitz, and Norbert Braunagel -for corresponding business development. - -Thank to Nico Zschach and Dirk Stelling of the technical support team -at the Digital Images company in Halle for providing me with extra -equipment for configuration tests. - -Thank to Richard F. Lyon (then of Foveon Inc.) for fruitful -communication about JPEG configuration in Sigma Photo Pro software. - -Thank to Andrew Finkenstadt for hosting the ijg.org site. - -Thank to Thomas G. Lane for the original design and development -of this singular software package. - -Thank to Lars Goehler, Andreas Heinecke, Sebastian Fuss, -Yvonne Roebert, Andrej Werner, Ulf-Dietrich Braumann, -and Nina Ssymank for support and public relations. - - -FILE FORMAT WARS -================ - -The ISO/IEC JTC1/SC29/WG1 standards committee (previously known as JPEG, -together with ITU-T SG16) currently promotes different formats containing -the name "JPEG" which is misleading because these formats are incompatible -with original DCT-based JPEG and are based on faulty technologies. -IJG therefore does not and will not support such momentary mistakes -(see REFERENCES). -There exist also distributions under the name "OpenJPEG" promoting such -kind of formats which is misleading because they don't support original -JPEG images. -We have no sympathy for the promotion of inferior formats. Indeed, one of -the original reasons for developing this free software was to help force -convergence on common, interoperable format standards for JPEG files. -Don't use an incompatible file format! -(In any case, our decoder will remain capable of reading existing JPEG -image files indefinitely.) - -The ISO committee pretends to be "responsible for the popular JPEG" in their -public reports which is not true because they don't respond to actual -requirements for the maintenance of the original JPEG specification. -Furthermore, the ISO committee pretends to "ensure interoperability" with -their standards which is not true because their "standards" support only -application-specific and proprietary use cases and contain mathematically -incorrect code. - -There are currently different distributions in circulation containing the -name "libjpeg" which is misleading because they don't have the features and -are incompatible with formats supported by actual IJG libjpeg distributions. -One of those fakes is released by members of the ISO committee and just uses -the name of libjpeg for misdirection of people, similar to the abuse of the -name JPEG as described above, while having nothing in common with actual IJG -libjpeg distributions and containing mathematically incorrect code. -The other one claims to be a "derivative" or "fork" of the original libjpeg, -but violates the license conditions as described under LEGAL ISSUES above -and violates basic C programming properties. -We have no sympathy for the release of misleading, incorrect and illegal -distributions derived from obsolete code bases. -Don't use an obsolete code base! - -According to the UCC (Uniform Commercial Code) law, IJG has the lawful and -legal right to foreclose on certain standardization bodies and other -institutions or corporations that knowingly perform substantial and -systematic deceptive acts and practices, fraud, theft, and damaging of the -value of the people of this planet without their knowing, willing and -intentional consent. -The titles, ownership, and rights of these institutions and all their assets -are now duly secured and held in trust for the free people of this planet. -People of the planet, on every country, may have a financial interest in -the assets of these former principals, agents, and beneficiaries of the -foreclosed institutions and corporations. -IJG asserts what is: that each man, woman, and child has unalienable value -and rights granted and deposited in them by the Creator and not any one of -the people is subordinate to any artificial principality, corporate fiction -or the special interest of another without their appropriate knowing, -willing and intentional consent made by contract or accommodation agreement. -IJG expresses that which already was. -The people have already determined and demanded that public administration -entities, national governments, and their supporting judicial systems must -be fully transparent, accountable, and liable. -IJG has secured the value for all concerned free people of the planet. - -A partial list of foreclosed institutions and corporations ("Hall of Shame") -is currently prepared and will be published later. - - -TO DO -===== - -Version 9 is the second release of a new generation JPEG standard -to overcome the limitations of the original JPEG specification, -and is the first true source reference JPEG codec. -More features are being prepared for coming releases... - -Please send bug reports, offers of help, etc. to jpeg-info@jpegclub.org. diff --git a/thirdparty/jpeg-9e/aclocal.m4 b/thirdparty/jpeg-9e/aclocal.m4 deleted file mode 100644 index d9cdb41..0000000 --- a/thirdparty/jpeg-9e/aclocal.m4 +++ /dev/null @@ -1,10275 +0,0 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- - -# Copyright (C) 1996-2021 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, -[m4_warning([this file was generated for autoconf 2.71. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically 'autoreconf'.])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -]) - -# serial 58 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_PREPARE_CC_BASENAME -# ----------------------- -m4_defun([_LT_PREPARE_CC_BASENAME], [ -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in @S|@*""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} -])# _LT_PREPARE_CC_BASENAME - - -# _LT_CC_BASENAME(CC) -# ------------------- -# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, -# but that macro is also expanded into generated libtool script, which -# arranges for $SED and $ECHO to be set by different means. -m4_defun([_LT_CC_BASENAME], -[m4_require([_LT_PREPARE_CC_BASENAME])dnl -AC_REQUIRE([_LT_DECL_SED])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl -func_cc_basename $1 -cc_basename=$func_cc_basename_result -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl -m4_require([_LT_CMD_TRUNCATE])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from 'configure', and 'config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# 'config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain=$ac_aux_dir/ltmain.sh -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the 'libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to 'config.status' so that its -# declaration there will have the same value as in 'configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags='_LT_TAGS'dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into 'config.status', and then the shell code to quote escape them in -# for loops in 'config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# '#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test 0 = "$lt_write_fail" && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -'$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test 0 != $[#] -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try '$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try '$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test yes = "$silent" && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -_LT_COPYING -_LT_LIBTOOL_TAGS - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -_LT_PREPARE_MUNGE_PATH_LIST -_LT_PREPARE_CC_BASENAME - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Go], [_LT_LANG(GO)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -m4_ifndef([AC_PROG_GO], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -m4_defun([AC_PROG_GO], -[AC_LANG_PUSH(Go)dnl -AC_ARG_VAR([GOC], [Go compiler command])dnl -AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -AC_CHECK_TOOL(GOC, gccgo) -if test -z "$GOC"; then - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) - fi -fi -if test -z "$GOC"; then - AC_CHECK_PROG(GOC, gccgo, gccgo, false) -fi -])#m4_defun -])#m4_ifndef - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([AC_PROG_GO], - [LT_LANG(GO)], - [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS=$save_LDFLAGS - ]) - - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test yes = "$lt_cv_ld_force_load"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], - [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - m4_if([$1], [CXX], -[ if test yes != "$lt_cv_apple_cc_single_mod"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script that will find a shell with a builtin -# printf (that we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case $ECHO in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], - [Search for dependent libraries within DIR (or the compiler's sysroot - if not specified).])], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([$with_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and where our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test yes = "[$]$2"; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS -]) - -if test yes = "[$]$2"; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n "$lt_cv_sys_max_cmd_len"; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes = "$cross_compiling"; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen=shl_load], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen=dlopen], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links=nottested -if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test no = "$hard_links"; then - AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", - [Define to the sub-directory where libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then - - # We can hardcode non-existent directories. - if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && - test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || - test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_PREPARE_MUNGE_PATH_LIST -# --------------------------- -# Make sure func_munge_path_list() is defined correctly. -m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], -[[# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x@S|@2 in - x) - ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" - ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" - ;; - *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - esac -} -]])# _LT_PREPARE_PATH_LIST - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -AC_ARG_VAR([LT_SYS_LIBRARY_PATH], -[User-defined run-time library search path.]) - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a[(]lib.so.V[)]' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], - [Detected run-time system search path for libraries]) -_LT_DECL([], [configure_time_lt_sys_library_path], [2], - [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program that can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$1"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac]) -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program that can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test no = "$withval" || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], -[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi]) -rm -f conftest.i conftest2.i conftest.out]) -])# _LT_PATH_DD - - -# _LT_CMD_TRUNCATE -# ---------------- -# find command to truncate a binary pipe -m4_defun([_LT_CMD_TRUNCATE], -[m4_require([_LT_PATH_DD]) -AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], -[printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) -_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], - [Command to truncate a binary pipe]) -])# _LT_CMD_TRUNCATE - - -# _LT_CHECK_MAGIC_METHOD -# ---------------------- -# how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_MAGIC_METHOD], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -AC_CACHE_CHECK([how to recognize dependent libraries], -lt_cv_deplibs_check_method, -[lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[[4-9]]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[[45]]*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi]) -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# _LT_DLL_DEF_P([FILE]) -# --------------------- -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with func_dll_def_p in the libtool script -AC_DEFUN([_LT_DLL_DEF_P], -[dnl - test DEF = "`$SED -n dnl - -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace - -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments - -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl - -e q dnl Only consider the first "real" line - $1`" dnl -])# _LT_DLL_DEF_P - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM=-lm) - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], - [Transform the output of nm into a list of symbols to manually relocate]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], - [The name lister interface]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test yes = "$GCC"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ F* | *Sun*Fortran*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Intel*\ [[CF]]*Compiler*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - *Portland\ Group*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS=$save_LDFLAGS]) - if test yes = "$lt_cv_irix_exported_symbol"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(ld_shlibs, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - osf3*) - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting $shlibpath_var if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC=$CC -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report what library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC=$lt_save_CC -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GXX"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - - _LT_TAGVAR(GCC, $1)=$GXX - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case @S|@2 in - .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; - *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF -package foo -func foo() { -} -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)=$prev$p - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)=$p - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)=$p - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test no = "$F77"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_F77"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$G77 - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_F77" - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test no = "$FC"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_FC"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_FC" - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_GO_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Go compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_GO_CONFIG], -[AC_REQUIRE([LT_PROG_GO])dnl -AC_LANG_SAVE - -# Source file extension for Go test sources. -ac_ext=go - -# Object file extension for compiled Go test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="package main; func main() { }" - -# Code to be used in simple link tests -lt_simple_link_test_code='package main; func main() { }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GOC-"gccgo"} -CFLAGS=$GOFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -# Go did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GO_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code=$lt_simple_compile_test_code - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_GO -# ---------- -AC_DEFUN([LT_PROG_GO], -[AC_CHECK_TOOL(GOC, gccgo,) -]) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f "$lt_ac_sed" && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test 10 -lt "$lt_ac_count" && break - lt_ac_count=`expr $lt_ac_count + 1` - if test "$lt_ac_count" -gt "$lt_ac_max"; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine what file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 8 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option '$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl 'shared' nor 'disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], - [_LT_WITH_AIX_SONAME([aix])]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the 'shared' and -# 'disable-shared' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the 'static' and -# 'disable-static' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the 'fast-install' -# and 'disable-fast-install' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_AIX_SONAME([DEFAULT]) -# ---------------------------------- -# implement the --with-aix-soname flag, and support the `aix-soname=aix' -# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT -# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. -m4_define([_LT_WITH_AIX_SONAME], -[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl -shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[[5-9]]*,yes) - AC_MSG_CHECKING([which variant of shared library versioning to provide]) - AC_ARG_WITH([aix-soname], - [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], - [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], - [case $withval in - aix|svr4|both) - ;; - *) - AC_MSG_ERROR([Unknown argument to --with-aix-soname]) - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname], - [AC_CACHE_VAL([lt_cv_with_aix_soname], - [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) - with_aix_soname=$lt_cv_with_aix_soname]) - AC_MSG_RESULT([$with_aix_soname]) - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - -_LT_DECL([], [shared_archive_member_spec], [0], - [Shared archive member basename, for filename based shared library versioning on AIX])dnl -])# _LT_WITH_AIX_SONAME - -LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' -# LT_INIT options. -# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [pic_mode=m4_default([$1], [default])]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59, which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# @configure_input@ - -# serial 4179 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) - -# Copyright (C) 2002-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.16' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.5], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.5])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# Copyright (C) 2011-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_AR([ACT-IF-FAIL]) -# ------------------------- -# Try to determine the archiver interface, and trigger the ar-lib wrapper -# if it is needed. If the detection of archiver interface fails, run -# ACT-IF-FAIL (default is to abort configure with a proper error message). -AC_DEFUN([AM_PROG_AR], -[AC_BEFORE([$0], [LT_INIT])dnl -AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([ar-lib])dnl -AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) -: ${AR=ar} - -AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], - [AC_LANG_PUSH([C]) - am_cv_ar_interface=ar - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], - [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([am_ar_try]) - if test "$ac_status" -eq 0; then - am_cv_ar_interface=ar - else - am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([am_ar_try]) - if test "$ac_status" -eq 0; then - am_cv_ar_interface=lib - else - am_cv_ar_interface=unknown - fi - fi - rm -f conftest.lib libconftest.a - ]) - AC_LANG_POP([C])]) - -case $am_cv_ar_interface in -ar) - ;; -lib) - # Microsoft lib, so override with the ar-lib wrapper script. - # FIXME: It is wrong to rewrite AR. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__AR in this case, - # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something - # similar. - AR="$am_aux_dir/ar-lib $AR" - ;; -unknown) - m4_default([$1], - [AC_MSG_ERROR([could not determine $AR interface])]) - ;; -esac -AC_SUBST([AR])dnl -]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to -# '$srcdir', '$srcdir/..', or '$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is '.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - - -# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES. -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - AS_CASE([$CONFIG_FILES], - [*\'*], [eval set x "$CONFIG_FILES"], - [*], [set x $CONFIG_FILES]) - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`AS_DIRNAME(["$am_mf"])` - am_filepart=`AS_BASENAME(["$am_mf"])` - AM_RUN_LOG([cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles]) || am_rc=$? - done - if test $am_rc -ne 0; then - AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE="gmake" (or whatever is - necessary). You can also try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking).]) - fi - AS_UNSET([am_dirpart]) - AS_UNSET([am_filepart]) - AS_UNSET([am_mf]) - AS_UNSET([am_rc]) - rm -f conftest-deps.mk -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking is enabled. -# This creates each '.Po' and '.Plo' makefile fragment that we'll need in -# order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -m4_define([AC_PROG_CC], -m4_defn([AC_PROG_CC]) -[_AM_PROG_CC_C_O -]) - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.65])dnl -m4_ifdef([_$0_ALREADY_INIT], - [m4_fatal([$0 expanded multiple times -]m4_defn([_$0_ALREADY_INIT]))], - [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[AC_DIAGNOSE([obsolete], - [$0: two- and three-arguments forms are deprecated.]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if( - m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), - [ok:ok],, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -AM_MISSING_PROG([AUTOCONF], [autoconf]) -AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -AM_MISSING_PROG([AUTOHEADER], [autoheader]) -AM_MISSING_PROG([MAKEINFO], [makeinfo]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -# Variables for tags utilities; see am/tags.am -if test -z "$CTAGS"; then - CTAGS=ctags -fi -AC_SUBST([CTAGS]) -if test -z "$ETAGS"; then - ETAGS=etags -fi -AC_SUBST([ETAGS]) -if test -z "$CSCOPE"; then - CSCOPE=cscope -fi -AC_SUBST([CSCOPE]) - -AC_REQUIRE([AM_SILENT_RULES])dnl -dnl The testsuite driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This -dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. -]) - -dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) - -# Copyright (C) 2003-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless 'enable' is passed literally. -# For symmetry, 'disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], - [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], - am_maintainer_other[ make rules and dependencies not useful - (and sometimes confusing) to the casual installer])], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAKE_INCLUDE() -# ----------------- -# Check whether make has an 'include' directive that can support all -# the idioms we need for our automatic dependency tracking code. -AC_DEFUN([AM_MAKE_INCLUDE], -[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) -cat > confinc.mk << 'END' -am__doit: - @echo this is the am__doit target >confinc.out -.PHONY: am__doit -END -am__include="#" -am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) - AS_CASE([$?:`cat confinc.out 2>/dev/null`], - ['0:this is the am__doit target'], - [AS_CASE([$s], - [BSD], [am__include='.include' am__quote='"'], - [am__include='include' am__quote=''])]) - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -AC_MSG_RESULT([${_am_result}]) -AC_SUBST([am__include])]) -AC_SUBST([am__quote])]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it is modern enough. -# If it is, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# -------------------- -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) - -# _AM_SET_OPTIONS(OPTIONS) -# ------------------------ -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Copyright (C) 1999-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_CC_C_O -# --------------- -# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -# to automatically call this. -AC_DEFUN([_AM_PROG_CC_C_O], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) - -# For backward compatibility. -AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) - -# Copyright (C) 2001-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT([yes]) -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi -AC_CONFIG_COMMANDS_PRE( - [AC_MSG_CHECKING([that generated files are newer than configure]) - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - AC_MSG_RESULT([done])]) -rm -f conftest.file -]) - -# Copyright (C) 2009-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], [dnl -AS_HELP_STRING( - [--enable-silent-rules], - [less verbose build output (undo: "make V=1")]) -AS_HELP_STRING( - [--disable-silent-rules], - [verbose build output (undo: "make V=0")])dnl -]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -dnl -dnl A few 'make' implementations (e.g., NonStop OS and NextStep) -dnl do not support nested variable expansions. -dnl See automake bug#9928 and bug#10237. -am_make=${MAKE-make} -AC_CACHE_CHECK([whether $am_make supports nested variables], - [am_cv_make_support_nested_variables], - [if AS_ECHO([['TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor 'install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in "make install-strip", and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of 'v7', 'ustar', or 'pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -# -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' - -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff --git a/thirdparty/jpeg-9e/ar-lib b/thirdparty/jpeg-9e/ar-lib deleted file mode 100755 index c349042..0000000 --- a/thirdparty/jpeg-9e/ar-lib +++ /dev/null @@ -1,271 +0,0 @@ -#! /bin/sh -# Wrapper for Microsoft lib.exe - -me=ar-lib -scriptversion=2019-07-04.01; # UTC - -# Copyright (C) 2010-2021 Free Software Foundation, Inc. -# Written by Peter Rosin . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - - -# func_error message -func_error () -{ - echo "$me: $1" 1>&2 - exit 1 -} - -file_conv= - -# func_file_conv build_file -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN* | MSYS*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv in - mingw) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin | msys) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_at_file at_file operation archive -# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE -# for each of them. -# When interpreting the content of the @FILE, do NOT use func_file_conv, -# since the user would need to supply preconverted file names to -# binutils ar, at least for MinGW. -func_at_file () -{ - operation=$2 - archive=$3 - at_file_contents=`cat "$1"` - eval set x "$at_file_contents" - shift - - for member - do - $AR -NOLOGO $operation:"$member" "$archive" || exit $? - done -} - -case $1 in - '') - func_error "no command. Try '$0 --help' for more information." - ;; - -h | --h*) - cat < /* to declare isupper(), tolower() */ -#ifdef NEED_SIGNAL_CATCHER -#include /* to declare signal() */ -#endif -#ifdef USE_SETMODE -#include /* to declare setmode()'s parameter macros */ -/* If you have setmode() but not , just delete this line: */ -#include /* to declare setmode() */ -#endif - - -/* - * Signal catcher to ensure that temporary files are removed before aborting. - * NB: for Amiga Manx C this is actually a global routine named _abort(); - * we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus... - */ - -#ifdef NEED_SIGNAL_CATCHER - -static j_common_ptr sig_cinfo; - -void /* must be global for Manx C */ -signal_catcher (int signum) -{ - if (sig_cinfo != NULL) { - if (sig_cinfo->err != NULL) /* turn off trace output */ - sig_cinfo->err->trace_level = 0; - jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */ - } - exit(EXIT_FAILURE); -} - - -GLOBAL(void) -enable_signal_catcher (j_common_ptr cinfo) -{ - sig_cinfo = cinfo; -#ifdef SIGINT /* not all systems have SIGINT */ - signal(SIGINT, signal_catcher); -#endif -#ifdef SIGTERM /* not all systems have SIGTERM */ - signal(SIGTERM, signal_catcher); -#endif -} - -#endif - - -/* - * Optional progress monitor: display a percent-done figure on stderr. - */ - -#ifdef PROGRESS_REPORT - -METHODDEF(void) -progress_monitor (j_common_ptr cinfo) -{ - cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress; - int total_passes = prog->pub.total_passes + prog->total_extra_passes; - int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit); - - if (percent_done != prog->percent_done) { - prog->percent_done = percent_done; - if (total_passes > 1) { - fprintf(stderr, "\rPass %d/%d: %3d%% ", - prog->pub.completed_passes + prog->completed_extra_passes + 1, - total_passes, percent_done); - } else { - fprintf(stderr, "\r %3d%% ", percent_done); - } - fflush(stderr); - } -} - - -GLOBAL(void) -start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress) -{ - /* Enable progress display, unless trace output is on */ - if (cinfo->err->trace_level == 0) { - progress->pub.progress_monitor = progress_monitor; - progress->completed_extra_passes = 0; - progress->total_extra_passes = 0; - progress->percent_done = -1; - cinfo->progress = &progress->pub; - } -} - - -GLOBAL(void) -end_progress_monitor (j_common_ptr cinfo) -{ - /* Clear away progress display */ - if (cinfo->err->trace_level == 0) { - fprintf(stderr, "\r \r"); - fflush(stderr); - } -} - -#endif - - -/* - * Case-insensitive matching of possibly-abbreviated keyword switches. - * keyword is the constant keyword (must be lower case already), - * minchars is length of minimum legal abbreviation. - */ - -GLOBAL(boolean) -keymatch (char * arg, const char * keyword, int minchars) -{ - register int ca, ck; - register int nmatched = 0; - - while ((ca = *arg++) != '\0') { - if ((ck = *keyword++) == '\0') - return FALSE; /* arg longer than keyword, no good */ - if (isupper(ca)) /* force arg to lcase (assume ck is already) */ - ca = tolower(ca); - if (ca != ck) - return FALSE; /* no good */ - nmatched++; /* count matched characters */ - } - /* reached end of argument; fail if it's too short for unique abbrev */ - if (nmatched < minchars) - return FALSE; - return TRUE; /* A-OK */ -} - - -/* - * Routines to establish binary I/O mode for stdin and stdout. - * Non-Unix systems often require some hacking to get out of text mode. - */ - -GLOBAL(FILE *) -read_stdin (void) -{ - FILE * input_file = stdin; - -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdin), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) { - fprintf(stderr, "Cannot reopen stdin\n"); - exit(EXIT_FAILURE); - } -#endif - return input_file; -} - - -GLOBAL(FILE *) -write_stdout (void) -{ - FILE * output_file = stdout; - -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdout), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { - fprintf(stderr, "Cannot reopen stdout\n"); - exit(EXIT_FAILURE); - } -#endif - return output_file; -} diff --git a/thirdparty/jpeg-9e/cdjpeg.h b/thirdparty/jpeg-9e/cdjpeg.h deleted file mode 100644 index 524ab3a..0000000 --- a/thirdparty/jpeg-9e/cdjpeg.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * cdjpeg.h - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains common declarations for the sample applications - * cjpeg and djpeg. It is NOT used by the core JPEG library. - */ - -#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ -#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ -#include "jinclude.h" -#include "jpeglib.h" -#include "jerror.h" /* get library error codes too */ -#include "cderror.h" /* get application-specific error codes */ - - -/* - * Object interface for cjpeg's source file decoding modules - */ - -typedef struct cjpeg_source_struct * cjpeg_source_ptr; - -struct cjpeg_source_struct { - JMETHOD(void, start_input, (j_compress_ptr cinfo, - cjpeg_source_ptr sinfo)); - JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, - cjpeg_source_ptr sinfo)); - JMETHOD(void, finish_input, (j_compress_ptr cinfo, - cjpeg_source_ptr sinfo)); - - FILE *input_file; - - JSAMPARRAY buffer; - JDIMENSION buffer_height; -}; - - -/* - * Object interface for djpeg's output file encoding modules - */ - -typedef struct djpeg_dest_struct * djpeg_dest_ptr; - -struct djpeg_dest_struct { - /* start_output is called after jpeg_start_decompress finishes. - * The color map will be ready at this time, if one is needed. - */ - JMETHOD(void, start_output, (j_decompress_ptr cinfo, - djpeg_dest_ptr dinfo)); - /* Emit the specified number of pixel rows from the buffer. */ - JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, - djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied)); - /* Finish up at the end of the image. */ - JMETHOD(void, finish_output, (j_decompress_ptr cinfo, - djpeg_dest_ptr dinfo)); - - /* Target file spec; filled in by djpeg.c after object is created. */ - FILE * output_file; - - /* Output pixel-row buffer. Created by module init or start_output. - * Width is cinfo->output_width * cinfo->output_components; - * height is buffer_height. - */ - JSAMPARRAY buffer; - JDIMENSION buffer_height; -}; - - -/* - * cjpeg/djpeg may need to perform extra passes to convert to or from - * the source/destination file format. The JPEG library does not know - * about these passes, but we'd like them to be counted by the progress - * monitor. We use an expanded progress monitor object to hold the - * additional pass count. - */ - -struct cdjpeg_progress_mgr { - struct jpeg_progress_mgr pub; /* fields known to JPEG library */ - int completed_extra_passes; /* extra passes completed */ - int total_extra_passes; /* total extra */ - /* last printed percentage stored here to avoid multiple printouts */ - int percent_done; -}; - -typedef struct cdjpeg_progress_mgr * cd_progress_ptr; - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jinit_read_bmp jIRdBMP -#define jinit_write_bmp jIWrBMP -#define jinit_read_gif jIRdGIF -#define jinit_write_gif jIWrGIF -#define jinit_read_ppm jIRdPPM -#define jinit_write_ppm jIWrPPM -#define jinit_read_rle jIRdRLE -#define jinit_write_rle jIWrRLE -#define jinit_read_targa jIRdTarga -#define jinit_write_targa jIWrTarga -#define read_quant_tables RdQTables -#define read_scan_script RdScnScript -#define set_quality_ratings SetQRates -#define set_quant_slots SetQSlots -#define set_sample_factors SetSFacts -#define read_color_map RdCMap -#define enable_signal_catcher EnSigCatcher -#define start_progress_monitor StProgMon -#define end_progress_monitor EnProgMon -#define read_stdin RdStdin -#define write_stdout WrStdout -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - -/* Module selection routines for I/O modules. */ - -EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo, - boolean is_os2)); -EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo, - boolean is_lzw)); -EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo)); -EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo)); -EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo)); - -/* cjpeg support routines (in rdswitch.c) */ - -EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename, - boolean force_baseline)); -EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename)); -EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg, - boolean force_baseline)); -EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg)); -EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg)); - -/* djpeg support routines (in rdcolmap.c) */ - -EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile)); - -/* common support routines (in cdjpeg.c) */ - -EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo)); -EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo, - cd_progress_ptr progress)); -EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo)); -EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars)); -EXTERN(FILE *) read_stdin JPP((void)); -EXTERN(FILE *) write_stdout JPP((void)); - -/* miscellaneous useful macros */ - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define WRITE_BINARY "w" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#define WRITE_BINARY "wb", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#define WRITE_BINARY "wb" -#endif -#endif - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif -#ifndef EXIT_SUCCESS -#ifdef VMS -#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ -#else -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef EXIT_WARNING -#ifdef VMS -#define EXIT_WARNING 1 /* VMS is very nonstandard */ -#else -#define EXIT_WARNING 2 -#endif -#endif diff --git a/thirdparty/jpeg-9e/change.log b/thirdparty/jpeg-9e/change.log deleted file mode 100644 index 7d45931..0000000 --- a/thirdparty/jpeg-9e/change.log +++ /dev/null @@ -1,516 +0,0 @@ -CHANGE LOG for Independent JPEG Group's JPEG software - - -Version 9e 16-Jan-2022 ------------------------ - -Include alternate user interface files for cjpeg/djpeg. - -jcparam.c: change default chrominance DC quantization factor -for lossless support. Note: Requires rebuild of test images. - -rdgif.c, cderror.h: add sanity check for GIF image dimensions. -Thank to Casper Sun for cjpeg potential vulnerability report. - -Add ARM and ARM64 platform support in the Visual Studio build. - - -Version 9d 12-Jan-2020 ------------------------ - -Optimize the optimal Huffman code table generation to produce -slightly smaller files. Thank to John Korejwa for suggestion. -Note: Requires rebuild of testimgp.jpg. - -Decoding Huffman: Use default tables if tables are not defined. -Thank to Simone Azzalin for report (Motion JPEG), -and to Martin Strunz for hint. - -Add sanity check in optimal Huffman code table generation. -Thank to Adam Farley for suggestion. - -rdtarga.c: use read_byte(), with EOF check, instead of getc() -in read_*_pixel(). -Thank to Chijin Zhou for cjpeg potential vulnerability report. - -jmemnobs.c: respect the max_memory_to_use setting in -jpeg_mem_available() computation. Thank to Sheng Shu and -Dongdong She for djpeg potential vulnerability report. - -jdarith.c, jdhuff.c: avoid left shift of negative value -compiler warning in decode_mcu_AC_refine(). -Thank to Indu Bhagat for suggestion. - -Add x64 (64-bit) platform support, avoid compiler warnings. -Thank to Jonathan Potter, Feiyun Wang, and Sheng Shu for suggestion. - -Adjust libjpeg version specification for pkg-config file. -Thank to Chen Chen for suggestion. - -Restore GIF read and write support from libjpeg version 6a. -Thank to Wolfgang Werner (W.W.) Heinz for suggestion. - -Improve consistency in raw (downsampled) image data processing mode. -Thank to Zhongyuan Zhou for hint. - -Avoid out of bounds array read (AC derived table pointers) -in start pass in jdhuff.c. Thank to Peng Li for report. - -Improve code sanity (jdhuff.c). -Thank to Reza Mirzazade farkhani for reports. - -Add jpegtran -drop option; add options to the crop extension and wipe -to fill the extra area with content from the source image region, -instead of gray out. - - -Version 9c 14-Jan-2018 ------------------------ - -jpegtran: add an option to the -wipe switch to fill the region -with the average of adjacent blocks, instead of gray out. -Thank to Caitlyn Feddock and Maddie Ziegler for inspiration. - -Make range extension bits adjustable (in jpegint.h). -Thank to Robin Watts for suggestion. - -Provide macros for fflush() and ferror() in jinclude.h in order -to facilitate adaption by applications using an own FILE class. -Thank to Gerhard Huber for suggestion. - -Add libjpeg pkg-config file. Thank to Mark Lavi, Vincent Torri, -Patrick McMunn, and Huw Davies for suggestion. - -Add sanity checks in cjpeg image reader modules. -Thank to Bingchang, Liu for reports. - - -Version 9b 17-Jan-2016 ------------------------ - -Improvements and optimizations in DCT and color calculations. -Normalize range limit array composition and access pattern. -Thank to Sia Furler and Maddie Ziegler for inspiration. - -Use merged upsample with scaled DCT sizes larger than 8. -Thank to Taylor Hatala for inspiration. - -Check for excessive comment lengths in argument parsing in wrjpgcom.c. -Thank to Julian Cohen for hint. - -Add makefile.b32 for use with Borland C++ 32-bit (bcc32). -Thank to Joe Slater for contribution. - -Document 'f' specifier for jpegtran -crop specification. -Thank to Michele Martone for suggestion. - -Use defined value from header instead of hardwired number in rdswitch.c. -Thank to Robert Sprowson for hint. - - -Version 9a 19-Jan-2014 ------------------------ - -Add support for wide gamut color spaces (JFIF version 2). -Improve clarity and accuracy in color conversion modules. -Note: Requires rebuild of test images. - -Extend the bit depth support to all values from 8 to 12 -(BITS_IN_JSAMPLE configuration option in jmorecfg.h). -jpegtran now supports N bits sample data precision with all N from 8 to 12 -in a single instance. Thank to Roland Fassauer for inspiration. - -Try to resolve issues with new boolean type definition. -Thank also to v4hn for suggestion. - -Enable option to use default Huffman tables for lossless compression -(for hardware solution), and in this case improve lossless RGB compression -with reversible color transform. Thank to Benny Alexandar for hint. - -Extend the entropy decoding structure, so that extraneous bytes between -compressed scan data and following marker can be reported correctly. -Thank to Nigel Tao for hint. - -Add jpegtran -wipe option and extension for -crop. -Thank to Andrew Senior, David Clunie, and Josef Schmid for suggestion. - - -Version 9 13-Jan-2013 ----------------------- - -Add cjpeg -rgb1 option to create an RGB JPEG file, and insert -a simple reversible color transform into the processing which -significantly improves the compression. -The recommended command for lossless coding of RGB images is now -cjpeg -rgb1 -block 1 -arithmetic. -As said, this option improves the compression significantly, but -the files are not compatible with JPEG decoders prior to IJG v9 -due to the included color transform. -The used color transform and marker signaling is compatible with -other JPEG standards (e.g., JPEG-LS part 2). - -Remove the automatic de-ANSI-fication support (Automake 1.12). -Thank also to Nitin A Kamble for suggestion. - -Add remark for jpeg_mem_dest() in jdatadst.c. -Thank to Elie-Gregoire Khoury for the hint. - -Support files with invalid component identifiers (created -by Adobe PDF). Thank to Robin Watts for the suggestion. - -Adapt full buffer case in jcmainct.c for use with scaled DCT. -Thank to Sergii Biloshytskyi for the suggestion. - -Add type identifier for declaration of noreturn functions. -Thank to Brett L. Moore for the suggestion. - -Correct argument type in format string, avoid compiler warnings. -Thank to Vincent Torri for hint. - -Add missing #include directives in configuration checks, avoid -configuration errors. Thank to John Spencer for the hint. - - -Version 8d 15-Jan-2012 ------------------------ - -Add cjpeg -rgb option to create RGB JPEG files. -Using this switch suppresses the conversion from RGB -colorspace input to the default YCbCr JPEG colorspace. -This feature allows true lossless JPEG coding of RGB color images. -The recommended command for this purpose is currently -cjpeg -rgb -block 1 -arithmetic. -SmartScale capable decoder (introduced with IJG JPEG 8) required. -Thank to Michael Koch for the initial suggestion. - -Add option to disable the region adjustment in the transupp crop code. -Thank to Jeffrey Friedl for the suggestion. - -Thank to Richard Jones and Edd Dawson for various minor corrections. - -Thank to Akim Demaille for configure.ac cleanup. - - -Version 8c 16-Jan-2011 ------------------------ - -Add option to compression library and cjpeg (-block N) to use -different DCT block size. -All N from 1 to 16 are possible. Default is 8 (baseline format). -Larger values produce higher compression, -smaller values produce higher quality. -SmartScale capable decoder (introduced with IJG JPEG 8) required. - - -Version 8b 16-May-2010 ------------------------ - -Repair problem in new memory source manager with corrupt JPEG data. -Thank to Ted Campbell and Samuel Chun for the report. - -Repair problem in Makefile.am test target. -Thank to anonymous user for the report. - -Support MinGW installation with automatic configure. -Thank to Volker Grabsch for the suggestion. - - -Version 8a 28-Feb-2010 ------------------------ - -Writing tables-only datastreams via jpeg_write_tables works again. - -Support 32-bit BMPs (RGB image with Alpha channel) for read in cjpeg. -Thank to Brett Blackham for the suggestion. - -Improve accuracy in floating point IDCT calculation. -Thank to Robert Hooke for the hint. - - -Version 8 10-Jan-2010 ----------------------- - -jpegtran now supports the same -scale option as djpeg for "lossless" resize. -An implementation of the JPEG SmartScale extension is required for this -feature. A (draft) specification of the JPEG SmartScale extension is -available as a contributed document at ITU and ISO. Revision 2 or later -of the document is required (latest document version is Revision 3). -The SmartScale extension will enable more features beside lossless resize -in future implementations, as described in the document (new compression -options). - -Add sanity check in BMP reader module to avoid cjpeg crash for empty input -image (thank to Isaev Ildar of ISP RAS, Moscow, RU for reporting this error). - -Add data source and destination managers for read from and write to -memory buffers. New API functions jpeg_mem_src and jpeg_mem_dest. -Thank to Roberto Boni from Italy for the suggestion. - - -Version 7 27-Jun-2009 ----------------------- - -New scaled DCTs implemented. -djpeg now supports scalings N/8 with all N from 1 to 16. -cjpeg now supports scalings 8/N with all N from 1 to 16. -Scaled DCTs with size larger than 8 are now also used for resolving the -common 2x2 chroma subsampling case without additional spatial resampling. -Separate spatial resampling for those kind of files is now only necessary -for N>8 scaling cases. -Furthermore, separate scaled DCT functions are provided for direct resolving -of the common asymmetric subsampling cases (2x1 and 1x2) without additional -spatial resampling. - -cjpeg -quality option has been extended for support of separate quality -settings for luminance and chrominance (or in general, for every provided -quantization table slot). -New API function jpeg_default_qtables() and q_scale_factor array in library. - -Added -nosmooth option to cjpeg, complementary to djpeg. -New variable "do_fancy_downsampling" in library, complement to fancy -upsampling. Fancy upsampling now uses direct DCT scaling with sizes -larger than 8. The old method is not reversible and has been removed. - -Support arithmetic entropy encoding and decoding. -Added files jaricom.c, jcarith.c, jdarith.c. - -Straighten the file structure: -Removed files jidctred.c, jcphuff.c, jchuff.h, jdphuff.c, jdhuff.h. - -jpegtran has a new "lossless" cropping feature. - -Implement -perfect option in jpegtran, new API function -jtransform_perfect_transform() in transupp. (DP 204_perfect.dpatch) - -Better error messages for jpegtran fopen failure. -(DP 203_jpegtran_errmsg.dpatch) - -Fix byte order issue with 16bit PPM/PGM files in rdppm.c/wrppm.c: -according to Netpbm, the de facto standard implementation of the PNM formats, -the most significant byte is first. (DP 203_rdppm.dpatch) - -Add -raw option to rdjpgcom not to mangle the output. -(DP 205_rdjpgcom_raw.dpatch) - -Make rdjpgcom locale aware. (DP 201_rdjpgcom_locale.dpatch) - -Add extern "C" to jpeglib.h. -This avoids the need to put extern "C" { ... } around #include "jpeglib.h" -in your C++ application. Defining the symbol DONT_USE_EXTERN_C in the -configuration prevents this. (DP 202_jpeglib.h_c++.dpatch) - - -Version 6b 27-Mar-1998 ------------------------ - -jpegtran has new features for lossless image transformations (rotation -and flipping) as well as "lossless" reduction to grayscale. - -jpegtran now copies comments by default; it has a -copy switch to enable -copying all APPn blocks as well, or to suppress comments. (Formerly it -always suppressed comments and APPn blocks.) jpegtran now also preserves -JFIF version and resolution information. - -New decompressor library feature: COM and APPn markers found in the input -file can be saved in memory for later use by the application. (Before, -you had to code this up yourself with a custom marker processor.) - -There is an unused field "void * client_data" now in compress and decompress -parameter structs; this may be useful in some applications. - -JFIF version number information is now saved by the decoder and accepted by -the encoder. jpegtran uses this to copy the source file's version number, -to ensure "jpegtran -copy all" won't create bogus files that contain JFXX -extensions but claim to be version 1.01. Applications that generate their -own JFXX extension markers also (finally) have a supported way to cause the -encoder to emit JFIF version number 1.02. - -djpeg's trace mode reports JFIF 1.02 thumbnail images as such, rather -than as unknown APP0 markers. - -In -verbose mode, djpeg and rdjpgcom will try to print the contents of -APP12 markers as text. Some digital cameras store useful text information -in APP12 markers. - -Handling of truncated data streams is more robust: blocks beyond the one in -which the error occurs will be output as uniform gray, or left unchanged -if decoding a progressive JPEG. The appearance no longer depends on the -Huffman tables being used. - -Huffman tables are checked for validity much more carefully than before. - -To avoid the Unisys LZW patent, djpeg's GIF output capability has been -changed to produce "uncompressed GIFs", and cjpeg's GIF input capability -has been removed altogether. We're not happy about it either, but there -seems to be no good alternative. - -The configure script now supports building libjpeg as a shared library -on many flavors of Unix (all the ones that GNU libtool knows how to -build shared libraries for). Use "./configure --enable-shared" to -try this out. - -New jconfig file and makefiles for Microsoft Visual C++ and Developer Studio. -Also, a jconfig file and a build script for Metrowerks CodeWarrior -on Apple Macintosh. makefile.dj has been updated for DJGPP v2, and there -are miscellaneous other minor improvements in the makefiles. - -jmemmac.c now knows how to create temporary files following Mac System 7 -conventions. - -djpeg's -map switch is now able to read raw-format PPM files reliably. - -cjpeg -progressive -restart no longer generates any unnecessary DRI markers. - -Multiple calls to jpeg_simple_progression for a single JPEG object -no longer leak memory. - - -Version 6a 7-Feb-96 --------------------- - -Library initialization sequence modified to detect version mismatches -and struct field packing mismatches between library and calling application. -This change requires applications to be recompiled, but does not require -any application source code change. - -All routine declarations changed to the style "GLOBAL(type) name ...", -that is, GLOBAL, LOCAL, METHODDEF, EXTERN are now macros taking the -routine's return type as an argument. This makes it possible to add -Microsoft-style linkage keywords to all the routines by changing just -these macros. Note that any application code that was using these macros -will have to be changed. - -DCT coefficient quantization tables are now stored in normal array order -rather than zigzag order. Application code that calls jpeg_add_quant_table, -or otherwise manipulates quantization tables directly, will need to be -changed. If you need to make such code work with either older or newer -versions of the library, a test like "#if JPEG_LIB_VERSION >= 61" is -recommended. - -djpeg's trace capability now dumps DQT tables in natural order, not zigzag -order. This allows the trace output to be made into a "-qtables" file -more easily. - -New system-dependent memory manager module for use on Apple Macintosh. - -Fix bug in cjpeg's -smooth option: last one or two scanlines would be -duplicates of the prior line unless the image height mod 16 was 1 or 2. - -Repair minor problems in VMS, BCC, MC6 makefiles. - -New configure script based on latest GNU Autoconf. - -Correct the list of include files needed by MetroWerks C for ccommand(). - -Numerous small documentation updates. - - -Version 6 2-Aug-95 -------------------- - -Progressive JPEG support: library can read and write full progressive JPEG -files. A "buffered image" mode supports incremental decoding for on-the-fly -display of progressive images. Simply recompiling an existing IJG-v5-based -decoder with v6 should allow it to read progressive files, though of course -without any special progressive display. - -New "jpegtran" application performs lossless transcoding between different -JPEG formats; primarily, it can be used to convert baseline to progressive -JPEG and vice versa. In support of jpegtran, the library now allows lossless -reading and writing of JPEG files as DCT coefficient arrays. This ability -may be of use in other applications. - -Notes for programmers: -* We changed jpeg_start_decompress() to be able to suspend; this makes all -decoding modes available to suspending-input applications. However, -existing applications that use suspending input will need to be changed -to check the return value from jpeg_start_decompress(). You don't need to -do anything if you don't use a suspending data source. -* We changed the interface to the virtual array routines: access_virt_array -routines now take a count of the number of rows to access this time. The -last parameter to request_virt_array routines is now interpreted as the -maximum number of rows that may be accessed at once, but not necessarily -the height of every access. - - -Version 5b 15-Mar-95 ---------------------- - -Correct bugs with grayscale images having v_samp_factor > 1. - -jpeg_write_raw_data() now supports output suspension. - -Correct bugs in "configure" script for case of compiling in -a directory other than the one containing the source files. - -Repair bug in jquant1.c: sometimes didn't use as many colors as it could. - -Borland C makefile and jconfig file work under either MS-DOS or OS/2. - -Miscellaneous improvements to documentation. - - -Version 5a 7-Dec-94 --------------------- - -Changed color conversion roundoff behavior so that grayscale values are -represented exactly. (This causes test image files to change.) - -Make ordered dither use 16x16 instead of 4x4 pattern for a small quality -improvement. - -New configure script based on latest GNU Autoconf. -Fix configure script to handle CFLAGS correctly. -Rename *.auto files to *.cfg, so that configure script still works if -file names have been truncated for DOS. - -Fix bug in rdbmp.c: didn't allow for extra data between header and image. - -Modify rdppm.c/wrppm.c to handle 2-byte raw PPM/PGM formats for 12-bit data. - -Fix several bugs in rdrle.c. - -NEED_SHORT_EXTERNAL_NAMES option was broken. - -Revise jerror.h/jerror.c for more flexibility in message table. - -Repair oversight in jmemname.c NO_MKTEMP case: file could be there -but unreadable. - - -Version 5 24-Sep-94 --------------------- - -Version 5 represents a nearly complete redesign and rewrite of the IJG -software. Major user-visible changes include: - * Automatic configuration simplifies installation for most Unix systems. - * A range of speed vs. image quality tradeoffs are supported. - This includes resizing of an image during decompression: scaling down - by a factor of 1/2, 1/4, or 1/8 is handled very efficiently. - * New programs rdjpgcom and wrjpgcom allow insertion and extraction - of text comments in a JPEG file. - -The application programmer's interface to the library has changed completely. -Notable improvements include: - * We have eliminated the use of callback routines for handling the - uncompressed image data. The application now sees the library as a - set of routines that it calls to read or write image data on a - scanline-by-scanline basis. - * The application image data is represented in a conventional interleaved- - pixel format, rather than as a separate array for each color channel. - This can save a copying step in many programs. - * The handling of compressed data has been cleaned up: the application can - supply routines to source or sink the compressed data. It is possible to - suspend processing on source/sink buffer overrun, although this is not - supported in all operating modes. - * All static state has been eliminated from the library, so that multiple - instances of compression or decompression can be active concurrently. - * JPEG abbreviated datastream formats are supported, ie, quantization and - Huffman tables can be stored separately from the image data. - * And not only that, but the documentation of the library has improved - considerably! - - -The last widely used release before the version 5 rewrite was version 4A of -18-Feb-93. Change logs before that point have been discarded, since they -are not of much interest after the rewrite. diff --git a/thirdparty/jpeg-9e/cjpeg.1 b/thirdparty/jpeg-9e/cjpeg.1 deleted file mode 100644 index 355d340..0000000 --- a/thirdparty/jpeg-9e/cjpeg.1 +++ /dev/null @@ -1,384 +0,0 @@ -.TH CJPEG 1 "28 April 2019" -.SH NAME -cjpeg \- compress an image file to a JPEG file -.SH SYNOPSIS -.B cjpeg -[ -.I options -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B cjpeg -compresses the named image file, or the standard input if no file is -named, and produces a JPEG/JFIF file on the standard output. -The currently supported input file formats are: PPM (PBMPLUS color -format), PGM (PBMPLUS grayscale format), BMP, GIF, Targa, and RLE (Utah Raster -Toolkit format). (RLE is supported only if the URT library is available, -which it isn't on most non-Unix systems.) -.SH OPTIONS -All switch names may be abbreviated; for example, -.B \-grayscale -may be written -.B \-gray -or -.BR \-gr . -Most of the "basic" switches can be abbreviated to as little as one letter. -Upper and lower case are equivalent (thus -.B \-BMP -is the same as -.BR \-bmp ). -British spellings are also accepted (e.g., -.BR \-greyscale ), -though for brevity these are not mentioned below. -.PP -The basic switches are: -.TP -.BI \-quality " N[,...]" -Scale quantization tables to adjust image quality. Quality is 0 (worst) to -100 (best); default is 75. (See below for more info.) -.TP -.B \-grayscale -Create monochrome JPEG file from color input. Be sure to use this switch when -compressing a grayscale BMP or GIF file, because -.B cjpeg -isn't bright enough to notice whether a BMP or GIF file uses only shades of -gray. By saying -.BR \-grayscale , -you'll get a smaller JPEG file that takes less time to process. -.TP -.B \-rgb -Create RGB JPEG file. -Using this switch suppresses the conversion from RGB -colorspace input to the default YCbCr JPEG colorspace. -You can use this switch in combination with the -.BI \-block " N" -switch (see below) for lossless JPEG coding. -See also the -.B \-rgb1 -switch below. -.TP -.B \-optimize -Perform optimization of entropy encoding parameters. Without this, default -encoding parameters are used. -.B \-optimize -usually makes the JPEG file a little smaller, but -.B cjpeg -runs somewhat slower and needs much more memory. Image quality and speed of -decompression are unaffected by -.BR \-optimize . -.TP -.B \-progressive -Create progressive JPEG file (see below). -.TP -.BI \-scale " M/N" -Scale the output image by a factor M/N. Currently supported scale factors are -M/N with all N from 1 to 16, where M is the destination DCT size, which is 8 -by default (see -.BI \-block " N" -switch below). -.TP -.B \-targa -Input file is Targa format. Targa files that contain an "identification" -field will not be automatically recognized by -.BR cjpeg ; -for such files you must specify -.B \-targa -to make -.B cjpeg -treat the input as Targa format. -For most Targa files, you won't need this switch. -.PP -The -.B \-quality -switch lets you trade off compressed file size against quality of the -reconstructed image: the higher the quality setting, the larger the JPEG file, -and the closer the output image will be to the original input. Normally you -want to use the lowest quality setting (smallest file) that decompresses into -something visually indistinguishable from the original image. For this -purpose the quality setting should be between 50 and 95; the default of 75 is -often about right. If you see defects at -.B \-quality -75, then go up 5 or 10 counts at a time until you are happy with the output -image. (The optimal setting will vary from one image to another.) -.PP -.B \-quality -100 will generate a quantization table of all 1's, minimizing loss in the -quantization step (but there is still information loss in subsampling, as well -as roundoff error). This setting is mainly of interest for experimental -purposes. Quality values above about 95 are -.B not -recommended for normal use; the compressed file size goes up dramatically for -hardly any gain in output image quality. -.PP -In the other direction, quality values below 50 will produce very small files -of low image quality. Settings around 5 to 10 might be useful in preparing an -index of a large image library, for example. Try -.B \-quality -2 (or so) for some amusing Cubist effects. (Note: quality -values below about 25 generate 2-byte quantization tables, which are -considered optional in the JPEG standard. -.B cjpeg -emits a warning message when you give such a quality value, because some -other JPEG programs may be unable to decode the resulting file. Use -.B \-baseline -if you need to ensure compatibility at low quality values.) -.PP -The -.B \-quality -option has been extended in IJG version 7 for support of separate quality -settings for luminance and chrominance (or in general, for every provided -quantization table slot). This feature is useful for high-quality -applications which cannot accept the damage of color data by coarse -subsampling settings. You can now easily reduce the color data amount more -smoothly with finer control without separate subsampling. The resulting file -is fully compliant with standard JPEG decoders. -Note that the -.B \-quality -ratings refer to the quantization table slots, and that the last value is -replicated if there are more q-table slots than parameters. The default -q-table slots are 0 for luminance and 1 for chrominance with default tables as -given in the JPEG standard. This is compatible with the old behaviour in case -that only one parameter is given, which is then used for both luminance and -chrominance (slots 0 and 1). More or custom quantization tables can be set -with -.B \-qtables -and assigned to components with -.B \-qslots -parameter (see the "wizard" switches below). -.B Caution: -You must explicitly add -.BI \-sample " 1x1" -for efficient separate color -quality selection, since the default value used by library is 2x2! -.PP -The -.B \-progressive -switch creates a "progressive JPEG" file. In this type of JPEG file, the data -is stored in multiple scans of increasing quality. If the file is being -transmitted over a slow communications link, the decoder can use the first -scan to display a low-quality image very quickly, and can then improve the -display with each subsequent scan. The final image is exactly equivalent to a -standard JPEG file of the same quality setting, and the total file size is -about the same --- often a little smaller. -.PP -Switches for advanced users: -.TP -.B \-arithmetic -Use arithmetic coding. -.B Caution: -arithmetic coded JPEG is not yet widely implemented, so many decoders will -be unable to view an arithmetic coded JPEG file at all. -.TP -.BI \-block " N" -Set DCT block size. All N from 1 to 16 are possible. -Default is 8 (baseline format). -Larger values produce higher compression, -smaller values produce higher quality -(exact DCT stage possible with 1 or 2; with the default quality of 75 and -default Luminance qtable the DCT+Quantization stage is lossless for N=1). -.B Caution: -An implementation of the JPEG SmartScale extension is required for this -feature. SmartScale enabled JPEG is not yet widely implemented, so many -decoders will be unable to view a SmartScale extended JPEG file at all. -.TP -.B \-rgb1 -Create RGB JPEG file with reversible color transform. -Works like the -.B \-rgb -switch (see above) and inserts a simple reversible color transform -into the processing which significantly improves the compression. -Use this switch in combination with the -.BI \-block " N" -switch (see above) for lossless JPEG coding. -.B Caution: -A decoder with inverse color transform support is required for -this feature. Reversible color transform support is not yet -widely implemented, so many decoders will be unable to view -a reversible color transformed JPEG file at all. -.TP -.B \-bgycc -Create big gamut YCC JPEG file. -In this type of encoding the color difference components are quantized -further by a factor of 2 compared to the normal Cb/Cr values, thus creating -space to allow larger color values with higher saturation than the normal -gamut limits to be encoded. In order to compensate for the loss of color -fidelity compared to a normal YCC encoded file, the color quantization -tables can be adjusted accordingly. For example, -.B cjpeg \-bgycc \-quality -80,90 will give similar results as -.B cjpeg \-quality -80. -.B Caution: -For correct decompression a decoder with big gamut YCC support (JFIF -version 2) is required. An old decoder may or may not display a big -gamut YCC encoded JPEG file, depending on JFIF version check and -corresponding warning/error configuration. In case of a granted -decompression the old decoder will display the image with half -saturated colors. -.TP -.B \-dct int -Use integer DCT method (default). -.TP -.B \-dct fast -Use fast integer DCT (less accurate). -.TP -.B \-dct float -Use floating-point DCT method. -The float method is very slightly more accurate than the int method, but is -much slower unless your machine has very fast floating-point hardware. Also -note that results of the floating-point method may vary slightly across -machines, while the integer methods should give the same results everywhere. -The fast integer method is much less accurate than the other two. -.TP -.B \-nosmooth -Don't use high-quality downsampling. -.TP -.BI \-restart " N" -Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is -attached to the number. -.B \-restart 0 -(the default) means no restart markers. -.TP -.BI \-smooth " N" -Smooth the input image to eliminate dithering noise. N, ranging from 1 to -100, indicates the strength of smoothing. 0 (the default) means no smoothing. -.TP -.BI \-maxmemory " N" -Set limit for amount of memory to use in processing large images. Value is -in thousands of bytes, or millions of bytes if "M" is attached to the -number. For example, -.B \-max 4m -selects 4000000 bytes. If more space is needed, temporary files will be used. -.TP -.BI \-outfile " name" -Send output image to the named file, not to standard output. -.TP -.B \-verbose -Enable debug printout. More -.BR \-v 's -give more output. Also, version information is printed at startup. -.TP -.B \-debug -Same as -.BR \-verbose . -.PP -The -.B \-restart -option inserts extra markers that allow a JPEG decoder to resynchronize after -a transmission error. Without restart markers, any damage to a compressed -file will usually ruin the image from the point of the error to the end of the -image; with restart markers, the damage is usually confined to the portion of -the image up to the next restart marker. Of course, the restart markers -occupy extra space. We recommend -.B \-restart 1 -for images that will be transmitted across unreliable networks such as Usenet. -.PP -The -.B \-smooth -option filters the input to eliminate fine-scale noise. This is often useful -when converting dithered images to JPEG: a moderate smoothing factor of 10 to -50 gets rid of dithering patterns in the input file, resulting in a smaller -JPEG file and a better-looking image. Too large a smoothing factor will -visibly blur the image, however. -.PP -Switches for wizards: -.TP -.B \-baseline -Force baseline-compatible quantization tables to be generated. This clamps -quantization values to 8 bits even at low quality settings. (This switch is -poorly named, since it does not ensure that the output is actually baseline -JPEG. For example, you can use -.B \-baseline -and -.B \-progressive -together.) -.TP -.BI \-qtables " file" -Use the quantization tables given in the specified text file. -.TP -.BI \-qslots " N[,...]" -Select which quantization table to use for each color component. -.TP -.BI \-sample " HxV[,...]" -Set JPEG sampling factors for each color component. -.TP -.BI \-scans " file" -Use the scan script given in the specified text file. -.PP -The "wizard" switches are intended for experimentation with JPEG. If you -don't know what you are doing, \fBdon't use them\fR. These switches are -documented further in the file wizard.txt. -.SH EXAMPLES -.LP -This example compresses the PPM file foo.ppm with a quality factor of -60 and saves the output as foo.jpg: -.IP -.B cjpeg \-quality -.I 60 foo.ppm -.B > -.I foo.jpg -.SH HINTS -Color GIF files are not the ideal input for JPEG; JPEG is really intended for -compressing full-color (24-bit) images. In particular, don't try to convert -cartoons, line drawings, and other images that have only a few distinct -colors. GIF works great on these, JPEG does not. If you want to convert a -GIF to JPEG, you should experiment with -.BR cjpeg 's -.B \-quality -and -.B \-smooth -options to get a satisfactory conversion. -.B \-smooth 10 -or so is often helpful. -.PP -Avoid running an image through a series of JPEG compression/decompression -cycles. Image quality loss will accumulate; after ten or so cycles the image -may be noticeably worse than it was after one cycle. It's best to use a -lossless format while manipulating an image, then convert to JPEG format when -you are ready to file the image away. -.PP -The -.B \-optimize -option to -.B cjpeg -is worth using when you are making a "final" version for posting or archiving. -It's also a win when you are using low quality settings to make very small -JPEG files; the percentage improvement is often a lot more than it is on -larger files. (At present, -.B \-optimize -mode is always selected when generating progressive JPEG files.) -.SH ENVIRONMENT -.TP -.B JPEGMEM -If this environment variable is set, its value is the default memory limit. -The value is specified as described for the -.B \-maxmemory -switch. -.B JPEGMEM -overrides the default value specified when the program was compiled, and -itself is overridden by an explicit -.BR \-maxmemory . -.SH SEE ALSO -.BR djpeg (1), -.BR jpegtran (1), -.BR rdjpgcom (1), -.BR wrjpgcom (1) -.br -.BR ppm (5), -.BR pgm (5) -.br -Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. -.SH AUTHOR -Independent JPEG Group -.SH BUGS -Not all variants of BMP and Targa file formats are supported. -.PP -The -.B \-targa -switch is not a bug, it's a feature. (It would be a bug if the Targa format -designers had not been clueless.) diff --git a/thirdparty/jpeg-9e/cjpeg.c b/thirdparty/jpeg-9e/cjpeg.c deleted file mode 100644 index 3cb07fa..0000000 --- a/thirdparty/jpeg-9e/cjpeg.c +++ /dev/null @@ -1,664 +0,0 @@ -/* - * cjpeg.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2003-2013 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a command-line user interface for the JPEG compressor. - * It should work on any system with Unix- or MS-DOS-style command lines. - * - * Two different command line styles are permitted, depending on the - * compile-time switch TWO_FILE_COMMANDLINE: - * cjpeg [options] inputfile outputfile - * cjpeg [options] [inputfile] - * In the second style, output is always to standard output, which you'd - * normally redirect to a file or pipe to some other program. Input is - * either from a named file or from standard input (typically redirected). - * The second style is convenient on Unix but is unhelpful on systems that - * don't support pipes. Also, you MUST use the first style if your system - * doesn't do binary I/O to stdin/stdout. - * To simplify script writing, the "-outfile" switch is provided. The syntax - * cjpeg [options] -outfile outputfile inputfile - * works regardless of which command line style is used. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include "jversion.h" /* for version message */ - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - - -/* Create the add-on message string table. */ - -#define JMESSAGE(code,string) string , - -static const char * const cdjpeg_message_table[] = { -#include "cderror.h" - NULL -}; - - -/* - * This routine determines what format the input file is, - * and selects the appropriate input-reading module. - * - * To determine which family of input formats the file belongs to, - * we may look only at the first byte of the file, since C does not - * guarantee that more than one character can be pushed back with ungetc. - * Looking at additional bytes would require one of these approaches: - * 1) assume we can fseek() the input file (fails for piped input); - * 2) assume we can push back more than one character (works in - * some C implementations, but unportable); - * 3) provide our own buffering (breaks input readers that want to use - * stdio directly, such as the RLE library); - * or 4) don't put back the data, and modify the input_init methods to assume - * they start reading after the start of file (also breaks RLE library). - * #1 is attractive for MS-DOS but is untenable on Unix. - * - * The most portable solution for file types that can't be identified by their - * first byte is to make the user tell us what they are. This is also the - * only approach for "raw" file types that contain only arbitrary values. - * We presently apply this method for Targa files. Most of the time Targa - * files start with 0x00, so we recognize that case. Potentially, however, - * a Targa file could start with any byte value (byte 0 is the length of the - * seldom-used ID field), so we provide a switch to force Targa input mode. - */ - -static boolean is_targa; /* records user -targa switch */ - - -LOCAL(cjpeg_source_ptr) -select_file_type (j_compress_ptr cinfo, FILE * infile) -{ - int c; - - if (is_targa) { -#ifdef TARGA_SUPPORTED - return jinit_read_targa(cinfo); -#else - ERREXIT(cinfo, JERR_TGA_NOTCOMP); -#endif - } - - if ((c = getc(infile)) == EOF) - ERREXIT(cinfo, JERR_INPUT_EMPTY); - if (ungetc(c, infile) == EOF) - ERREXIT(cinfo, JERR_UNGETC_FAILED); - - switch (c) { -#ifdef BMP_SUPPORTED - case 'B': - return jinit_read_bmp(cinfo); -#endif -#ifdef GIF_SUPPORTED - case 'G': - return jinit_read_gif(cinfo); -#endif -#ifdef PPM_SUPPORTED - case 'P': - return jinit_read_ppm(cinfo); -#endif -#ifdef RLE_SUPPORTED - case 'R': - return jinit_read_rle(cinfo); -#endif -#ifdef TARGA_SUPPORTED - case 0x00: - return jinit_read_targa(cinfo); -#endif - default: - ERREXIT(cinfo, JERR_UNKNOWN_FORMAT); - break; - } - - return NULL; /* suppress compiler warnings */ -} - - -/* - * Argument-parsing code. - * The switch parser is designed to be useful with DOS-style command line - * syntax, ie, intermixed switches and file names, where only the switches - * to the left of a given file name affect processing of that file. - * The main program in this file doesn't actually use this capability... - */ - - -static const char * progname; /* program name for error messages */ -static char * outfilename; /* for -outfile switch */ - - -LOCAL(void) -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -quality N[,...] Compression quality (0..100; 5-95 is useful range)\n"); - fprintf(stderr, " -grayscale Create monochrome JPEG file\n"); - fprintf(stderr, " -rgb Create RGB JPEG file\n"); -#ifdef ENTROPY_OPT_SUPPORTED - fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); -#endif -#ifdef C_PROGRESSIVE_SUPPORTED - fprintf(stderr, " -progressive Create progressive JPEG file\n"); -#endif -#ifdef DCT_SCALING_SUPPORTED - fprintf(stderr, " -scale M/N Scale image by fraction M/N, eg, 1/2\n"); -#endif -#ifdef TARGA_SUPPORTED - fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n"); -#endif - fprintf(stderr, "Switches for advanced users:\n"); -#ifdef C_ARITH_CODING_SUPPORTED - fprintf(stderr, " -arithmetic Use arithmetic coding\n"); -#endif -#ifdef DCT_SCALING_SUPPORTED - fprintf(stderr, " -block N DCT block size (1..16; default is 8)\n"); -#endif -#if JPEG_LIB_VERSION_MAJOR >= 9 - fprintf(stderr, " -rgb1 Create RGB JPEG file with reversible color transform\n"); - fprintf(stderr, " -bgycc Create big gamut YCC JPEG file\n"); -#endif -#ifdef DCT_ISLOW_SUPPORTED - fprintf(stderr, " -dct int Use integer DCT method%s\n", - (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); -#endif -#ifdef DCT_IFAST_SUPPORTED - fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", - (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); -#endif -#ifdef DCT_FLOAT_SUPPORTED - fprintf(stderr, " -dct float Use floating-point DCT method%s\n", - (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); -#endif - fprintf(stderr, " -nosmooth Don't use high-quality downsampling\n"); - fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); -#ifdef INPUT_SMOOTHING_SUPPORTED - fprintf(stderr, " -smooth N Smooth dithered input (N=1..100 is strength)\n"); -#endif - fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); - fprintf(stderr, " -outfile name Specify name for output file\n"); - fprintf(stderr, " -verbose or -debug Emit debug output\n"); - fprintf(stderr, "Switches for wizards:\n"); - fprintf(stderr, " -baseline Force baseline quantization tables\n"); - fprintf(stderr, " -qtables file Use quantization tables given in file\n"); - fprintf(stderr, " -qslots N[,...] Set component quantization tables\n"); - fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n"); -#ifdef C_MULTISCAN_FILES_SUPPORTED - fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); -#endif - exit(EXIT_FAILURE); -} - - -LOCAL(int) -parse_switches (j_compress_ptr cinfo, int argc, char **argv, - int last_file_arg_seen, boolean for_real) -/* Parse optional switches. - * Returns argv[] index of first file-name argument (== argc if none). - * Any file names with indexes <= last_file_arg_seen are ignored; - * they have presumably been processed in a previous iteration. - * (Pass 0 for last_file_arg_seen on the first or only iteration.) - * for_real is FALSE on the first (dummy) pass; we may skip any expensive - * processing. - */ -{ - int argn; - char * arg; - boolean force_baseline; - boolean simple_progressive; - char * qualityarg = NULL; /* saves -quality parm if any */ - char * qtablefile = NULL; /* saves -qtables filename if any */ - char * qslotsarg = NULL; /* saves -qslots parm if any */ - char * samplearg = NULL; /* saves -sample parm if any */ - char * scansarg = NULL; /* saves -scans parm if any */ - - /* Set up default JPEG parameters. */ - - force_baseline = FALSE; /* by default, allow 16-bit quantizers */ - simple_progressive = FALSE; - is_targa = FALSE; - outfilename = NULL; - cinfo->err->trace_level = 0; - - /* Scan command line options, adjust parameters */ - - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (*arg != '-') { - /* Not a switch, must be a file name argument */ - if (argn <= last_file_arg_seen) { - outfilename = NULL; /* -outfile applies to just one input file */ - continue; /* ignore this name if previously processed */ - } - break; /* else done parsing switches */ - } - arg++; /* advance past switch marker character */ - - if (keymatch(arg, "arithmetic", 1)) { - /* Use arithmetic coding. */ -#ifdef C_ARITH_CODING_SUPPORTED - cinfo->arith_code = TRUE; -#else - fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "baseline", 2)) { - /* Force baseline-compatible output (8-bit quantizer values). */ - force_baseline = TRUE; - - } else if (keymatch(arg, "block", 2)) { - /* Set DCT block size. */ -#if defined DCT_SCALING_SUPPORTED && JPEG_LIB_VERSION_MAJOR >= 8 && \ - (JPEG_LIB_VERSION_MAJOR > 8 || JPEG_LIB_VERSION_MINOR >= 3) - int val; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &val) != 1) - usage(); - if (val < 1 || val > 16) - usage(); - cinfo->block_size = val; -#else - fprintf(stderr, "%s: sorry, block size setting not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "dct", 2)) { - /* Select DCT algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "int", 1)) { - cinfo->dct_method = JDCT_ISLOW; - } else if (keymatch(argv[argn], "fast", 2)) { - cinfo->dct_method = JDCT_IFAST; - } else if (keymatch(argv[argn], "float", 2)) { - cinfo->dct_method = JDCT_FLOAT; - } else - usage(); - - } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { - /* Enable debug printouts. */ - /* On first -d, print version identification */ - static boolean printed_version = FALSE; - - if (! printed_version) { - fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n", - JVERSION, JCOPYRIGHT); - printed_version = TRUE; - } - cinfo->err->trace_level++; - - } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { - /* Force a monochrome JPEG file to be generated. */ - jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); - - } else if (keymatch(arg, "rgb", 3) || keymatch(arg, "rgb1", 4)) { - /* Force an RGB JPEG file to be generated. */ -#if JPEG_LIB_VERSION_MAJOR >= 9 - /* Note: Entropy table assignment in jpeg_set_colorspace depends - * on color_transform. - */ - cinfo->color_transform = arg[3] ? JCT_SUBTRACT_GREEN : JCT_NONE; -#endif - jpeg_set_colorspace(cinfo, JCS_RGB); - - } else if (keymatch(arg, "bgycc", 5)) { - /* Force a big gamut YCC JPEG file to be generated. */ -#if JPEG_LIB_VERSION_MAJOR >= 9 && \ - (JPEG_LIB_VERSION_MAJOR > 9 || JPEG_LIB_VERSION_MINOR >= 1) - jpeg_set_colorspace(cinfo, JCS_BG_YCC); -#else - fprintf(stderr, "%s: sorry, BG_YCC colorspace not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "maxmemory", 3)) { - /* Maximum memory in Kb (or Mb with 'm'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (ch == 'm' || ch == 'M') - lval *= 1000L; - cinfo->mem->max_memory_to_use = lval * 1000L; - - } else if (keymatch(arg, "nosmooth", 3)) { - /* Suppress fancy downsampling. */ - cinfo->do_fancy_downsampling = FALSE; - - } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { - /* Enable entropy parm optimization. */ -#ifdef ENTROPY_OPT_SUPPORTED - cinfo->optimize_coding = TRUE; -#else - fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "outfile", 4)) { - /* Set output file name. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - outfilename = argv[argn]; /* save it away for later use */ - - } else if (keymatch(arg, "progressive", 1)) { - /* Select simple progressive mode. */ -#ifdef C_PROGRESSIVE_SUPPORTED - simple_progressive = TRUE; - /* We must postpone execution until num_components is known. */ -#else - fprintf(stderr, "%s: sorry, progressive output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "quality", 1)) { - /* Quality ratings (quantization table scaling factors). */ - if (++argn >= argc) /* advance to next argument */ - usage(); - qualityarg = argv[argn]; - - } else if (keymatch(arg, "qslots", 2)) { - /* Quantization table slot numbers. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - qslotsarg = argv[argn]; - /* Must delay setting qslots until after we have processed any - * colorspace-determining switches, since jpeg_set_colorspace sets - * default quant table numbers. - */ - - } else if (keymatch(arg, "qtables", 2)) { - /* Quantization tables fetched from file. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - qtablefile = argv[argn]; - /* We postpone actually reading the file in case -quality comes later. */ - - } else if (keymatch(arg, "restart", 1)) { - /* Restart interval in MCU rows (or in MCUs with 'b'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (lval < 0 || lval > 65535L) - usage(); - if (ch == 'b' || ch == 'B') { - cinfo->restart_interval = (unsigned int) lval; - cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ - } else { - cinfo->restart_in_rows = (int) lval; - /* restart_interval will be computed during startup */ - } - - } else if (keymatch(arg, "sample", 2)) { - /* Set sampling factors. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - samplearg = argv[argn]; - /* Must delay setting sample factors until after we have processed any - * colorspace-determining switches, since jpeg_set_colorspace sets - * default sampling factors. - */ - - } else if (keymatch(arg, "scale", 4)) { - /* Scale the image by a fraction M/N. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%u/%u", - &cinfo->scale_num, &cinfo->scale_denom) != 2) - usage(); - - } else if (keymatch(arg, "scans", 4)) { - /* Set scan script. */ -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - scansarg = argv[argn]; - /* We must postpone reading the file in case -progressive appears. */ -#else - fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "smooth", 2)) { - /* Set input smoothing factor. */ - int val; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &val) != 1) - usage(); - if (val < 0 || val > 100) - usage(); - cinfo->smoothing_factor = val; - - } else if (keymatch(arg, "targa", 1)) { - /* Input file is Targa format. */ - is_targa = TRUE; - - } else { - usage(); /* bogus switch */ - } - } - - /* Post-switch-scanning cleanup */ - - if (for_real) { - - /* Set quantization tables for selected quality. */ - /* Some or all may be overridden if -qtables is present. */ - if (qualityarg != NULL) /* process -quality if it was present */ - if (! set_quality_ratings(cinfo, qualityarg, force_baseline)) - usage(); - - if (qtablefile != NULL) /* process -qtables if it was present */ - if (! read_quant_tables(cinfo, qtablefile, force_baseline)) - usage(); - - if (qslotsarg != NULL) /* process -qslots if it was present */ - if (! set_quant_slots(cinfo, qslotsarg)) - usage(); - - if (samplearg != NULL) /* process -sample if it was present */ - if (! set_sample_factors(cinfo, samplearg)) - usage(); - -#ifdef C_PROGRESSIVE_SUPPORTED - if (simple_progressive) /* process -progressive; -scans can override */ - jpeg_simple_progression(cinfo); -#endif - -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (scansarg != NULL) /* process -scans if it was present */ - if (! read_scan_script(cinfo, scansarg)) - usage(); -#endif - } - - return argn; /* return index of next arg (file name) */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; -#ifdef PROGRESS_REPORT - struct cdjpeg_progress_mgr progress; -#endif - int file_index; - cjpeg_source_ptr src_mgr; - FILE * input_file; - FILE * output_file; - JDIMENSION num_scanlines; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "cjpeg"; /* in case C library doesn't provide it */ - - /* Initialize the JPEG compression object with default error handling. */ - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_compress(&cinfo); - /* Add some application-specific error messages (from cderror.h) */ - jerr.addon_message_table = cdjpeg_message_table; - jerr.first_addon_message = JMSG_FIRSTADDONCODE; - jerr.last_addon_message = JMSG_LASTADDONCODE; - - /* Now safe to enable signal catcher. */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) &cinfo); -#endif - - /* Initialize JPEG parameters. - * Much of this may be overridden later. - * In particular, we don't yet know the input file's color space, - * but we need to provide some value for jpeg_set_defaults() to work. - */ - - cinfo.in_color_space = JCS_RGB; /* arbitrary guess */ - jpeg_set_defaults(&cinfo); - - /* Scan command line to find file names. - * It is convenient to use just one switch-parsing routine, but the switch - * values read here are ignored; we will rescan the switches after opening - * the input file. - */ - - file_index = parse_switches(&cinfo, argc, argv, 0, FALSE); - -#ifdef TWO_FILE_COMMANDLINE - /* Must have either -outfile switch or explicit output file name */ - if (outfilename == NULL) { - if (file_index != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - outfilename = argv[file_index+1]; - } else { - if (file_index != argc-1) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - } -#else - /* Unix style: expect zero or one file name */ - if (file_index < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } -#endif /* TWO_FILE_COMMANDLINE */ - - /* Open the input file. */ - if (file_index < argc) { - if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ - input_file = read_stdin(); - } - - /* Open the output file. */ - if (outfilename != NULL) { - if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, outfilename); - exit(EXIT_FAILURE); - } - } else { - /* default output file is stdout */ - output_file = write_stdout(); - } - -#ifdef PROGRESS_REPORT - start_progress_monitor((j_common_ptr) &cinfo, &progress); -#endif - - /* Figure out the input file format, and set up to read it. */ - src_mgr = select_file_type(&cinfo, input_file); - src_mgr->input_file = input_file; - - /* Read the input file header to obtain file size & colorspace. */ - (*src_mgr->start_input) (&cinfo, src_mgr); - - /* Now that we know input colorspace, fix colorspace-dependent defaults */ - jpeg_default_colorspace(&cinfo); - - /* Adjust default compression parameters by re-parsing the options */ - file_index = parse_switches(&cinfo, argc, argv, 0, TRUE); - - /* Specify data destination for compression */ - jpeg_stdio_dest(&cinfo, output_file); - - /* Start compressor */ - jpeg_start_compress(&cinfo, TRUE); - - /* Process data */ - while (cinfo.next_scanline < cinfo.image_height) { - num_scanlines = (*src_mgr->get_pixel_rows) (&cinfo, src_mgr); - (void) jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines); - } - - /* Finish compression and release memory */ - (*src_mgr->finish_input) (&cinfo, src_mgr); - jpeg_finish_compress(&cinfo); - jpeg_destroy_compress(&cinfo); - - /* Close files, if we opened them */ - if (input_file != stdin) - fclose(input_file); - if (output_file != stdout) - fclose(output_file); - -#ifdef PROGRESS_REPORT - end_progress_monitor((j_common_ptr) &cinfo); -#endif - - /* All done. */ - exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/thirdparty/jpeg-9e/cjpegalt.c b/thirdparty/jpeg-9e/cjpegalt.c deleted file mode 100644 index 4f35b04..0000000 --- a/thirdparty/jpeg-9e/cjpegalt.c +++ /dev/null @@ -1,791 +0,0 @@ -/* - * alternate cjpeg.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2009-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains an alternate user interface for the JPEG compressor. - * One or more input files are named on the command line, and output file - * names are created by substituting ".jpg" for the input file's extension. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include "jversion.h" /* for version message */ - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - -#ifndef PATH_MAX /* ANSI maximum-pathname-length constant */ -#define PATH_MAX 256 -#endif - - -/* Create the add-on message string table. */ - -#define JMESSAGE(code,string) string , - -static const char * const cdjpeg_message_table[] = { -#include "cderror.h" - NULL -}; - - -/* - * Automatic determination of available memory. - */ - -static long default_maxmem; /* saves value determined at startup, or 0 */ - -#ifndef FREE_MEM_ESTIMATE /* may be defined from command line */ - -#ifdef MSDOS /* For MS-DOS (unless flat-memory model) */ - -#include /* for access to intdos() call */ - -LOCAL(long) -unused_dos_memory (void) -/* Obtain total amount of unallocated DOS memory */ -{ - union REGS regs; - long nparas; - - regs.h.ah = 0x48; /* DOS function Allocate Memory Block */ - regs.x.bx = 0xFFFF; /* Ask for more memory than DOS can have */ - (void) intdos(®s, ®s); - /* DOS will fail and return # of paragraphs actually available in BX. */ - nparas = (unsigned int) regs.x.bx; - /* Times 16 to convert to bytes. */ - return nparas << 4; -} - -/* The default memory setting is 95% of the available space. */ -#define FREE_MEM_ESTIMATE ((unused_dos_memory() * 95L) / 100L) - -#endif /* MSDOS */ - -#ifdef ATARI /* For Atari ST/STE/TT, Pure C or Turbo C */ - -#include - -/* The default memory setting is 90% of the available space. */ -#define FREE_MEM_ESTIMATE (((long) coreleft() * 90L) / 100L) - -#endif /* ATARI */ - -/* Add memory-estimation procedures for other operating systems here, - * with appropriate #ifdef's around them. - */ - -#endif /* !FREE_MEM_ESTIMATE */ - - -/* - * This routine determines what format the input file is, - * and selects the appropriate input-reading module. - * - * To determine which family of input formats the file belongs to, - * we may look only at the first byte of the file, since C does not - * guarantee that more than one character can be pushed back with ungetc. - * Looking at additional bytes would require one of these approaches: - * 1) assume we can fseek() the input file (fails for piped input); - * 2) assume we can push back more than one character (works in - * some C implementations, but unportable); - * 3) provide our own buffering (breaks input readers that want to use - * stdio directly, such as the RLE library); - * or 4) don't put back the data, and modify the input_init methods to assume - * they start reading after the start of file (also breaks RLE library). - * #1 is attractive for MS-DOS but is untenable on Unix. - * - * The most portable solution for file types that can't be identified by their - * first byte is to make the user tell us what they are. This is also the - * only approach for "raw" file types that contain only arbitrary values. - * We presently apply this method for Targa files. Most of the time Targa - * files start with 0x00, so we recognize that case. Potentially, however, - * a Targa file could start with any byte value (byte 0 is the length of the - * seldom-used ID field), so we provide a switch to force Targa input mode. - */ - -static boolean is_targa; /* records user -targa switch */ - - -LOCAL(cjpeg_source_ptr) -select_file_type (j_compress_ptr cinfo, FILE * infile) -{ - int c; - - if (is_targa) { -#ifdef TARGA_SUPPORTED - return jinit_read_targa(cinfo); -#else - ERREXIT(cinfo, JERR_TGA_NOTCOMP); -#endif - } - - if ((c = getc(infile)) == EOF) - ERREXIT(cinfo, JERR_INPUT_EMPTY); - if (ungetc(c, infile) == EOF) - ERREXIT(cinfo, JERR_UNGETC_FAILED); - - switch (c) { -#ifdef BMP_SUPPORTED - case 'B': - return jinit_read_bmp(cinfo); -#endif -#ifdef GIF_SUPPORTED - case 'G': - return jinit_read_gif(cinfo); -#endif -#ifdef PPM_SUPPORTED - case 'P': - return jinit_read_ppm(cinfo); -#endif -#ifdef RLE_SUPPORTED - case 'R': - return jinit_read_rle(cinfo); -#endif -#ifdef TARGA_SUPPORTED - case 0x00: - return jinit_read_targa(cinfo); -#endif - default: - ERREXIT(cinfo, JERR_UNKNOWN_FORMAT); - break; - } - - return NULL; /* suppress compiler warnings */ -} - - -/* - * Argument-parsing code. - * The switch parser is designed to be useful with DOS-style command line - * syntax, ie, intermixed switches and file names, where only the switches - * to the left of a given file name affect processing of that file. - */ - - -static const char * progname; /* program name for error messages */ -static char * outfilename; /* for -outfile switch */ - - -LOCAL(void) -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "usage: %s [switches] inputfile(s)\n", progname); - fprintf(stderr, "List of input files may use wildcards (* and ?)\n"); - fprintf(stderr, "Output filename is same as input filename, but extension .jpg\n"); - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -quality N[,...] Compression quality (0..100; 5-95 is useful range)\n"); - fprintf(stderr, " -grayscale Create monochrome JPEG file\n"); - fprintf(stderr, " -rgb Create RGB JPEG file\n"); -#ifdef ENTROPY_OPT_SUPPORTED - fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); -#endif -#ifdef C_PROGRESSIVE_SUPPORTED - fprintf(stderr, " -progressive Create progressive JPEG file\n"); -#endif -#ifdef DCT_SCALING_SUPPORTED - fprintf(stderr, " -scale M/N Scale image by fraction M/N, eg, 1/2\n"); -#endif -#ifdef TARGA_SUPPORTED - fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n"); -#endif - fprintf(stderr, "Switches for advanced users:\n"); -#ifdef C_ARITH_CODING_SUPPORTED - fprintf(stderr, " -arithmetic Use arithmetic coding\n"); -#endif -#ifdef DCT_SCALING_SUPPORTED - fprintf(stderr, " -block N DCT block size (1..16; default is 8)\n"); -#endif -#if JPEG_LIB_VERSION_MAJOR >= 9 - fprintf(stderr, " -rgb1 Create RGB JPEG file with reversible color transform\n"); - fprintf(stderr, " -bgycc Create big gamut YCC JPEG file\n"); -#endif -#ifdef DCT_ISLOW_SUPPORTED - fprintf(stderr, " -dct int Use integer DCT method%s\n", - (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); -#endif -#ifdef DCT_IFAST_SUPPORTED - fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", - (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); -#endif -#ifdef DCT_FLOAT_SUPPORTED - fprintf(stderr, " -dct float Use floating-point DCT method%s\n", - (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); -#endif - fprintf(stderr, " -nosmooth Don't use high-quality downsampling\n"); - fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); -#ifdef INPUT_SMOOTHING_SUPPORTED - fprintf(stderr, " -smooth N Smooth dithered input (N=1..100 is strength)\n"); -#endif -#ifndef FREE_MEM_ESTIMATE - fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); -#endif - fprintf(stderr, " -outfile name Specify name for output file\n"); - fprintf(stderr, " -verbose or -debug Emit debug output\n"); - fprintf(stderr, "Switches for wizards:\n"); - fprintf(stderr, " -baseline Force baseline quantization tables\n"); - fprintf(stderr, " -qtables file Use quantization tables given in file\n"); - fprintf(stderr, " -qslots N[,...] Set component quantization tables\n"); - fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n"); -#ifdef C_MULTISCAN_FILES_SUPPORTED - fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); -#endif - exit(EXIT_FAILURE); -} - - -LOCAL(int) -parse_switches (j_compress_ptr cinfo, int argc, char **argv, - int last_file_arg_seen, boolean for_real) -/* Parse optional switches. - * Returns argv[] index of first file-name argument (== argc if none). - * Any file names with indexes <= last_file_arg_seen are ignored; - * they have presumably been processed in a previous iteration. - * (Pass 0 for last_file_arg_seen on the first or only iteration.) - * for_real is FALSE on the first (dummy) pass; we may skip any expensive - * processing. - */ -{ - int argn; - char * arg; - boolean force_baseline; - boolean simple_progressive; - char * qualityarg = NULL; /* saves -quality parm if any */ - char * qtablefile = NULL; /* saves -qtables filename if any */ - char * qslotsarg = NULL; /* saves -qslots parm if any */ - char * samplearg = NULL; /* saves -sample parm if any */ - char * scansarg = NULL; /* saves -scans parm if any */ - - /* Set up default JPEG parameters. */ - - force_baseline = FALSE; /* by default, allow 16-bit quantizers */ - simple_progressive = FALSE; - is_targa = FALSE; - outfilename = NULL; - cinfo->err->trace_level = 0; - if (default_maxmem > 0) /* override library's default value */ - cinfo->mem->max_memory_to_use = default_maxmem; - - /* Scan command line options, adjust parameters */ - - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (*arg != '-') { - /* Not a switch, must be a file name argument */ - if (argn <= last_file_arg_seen) { - outfilename = NULL; /* -outfile applies to just one input file */ - continue; /* ignore this name if previously processed */ - } - break; /* else done parsing switches */ - } - arg++; /* advance past switch marker character */ - - if (keymatch(arg, "arithmetic", 1)) { - /* Use arithmetic coding. */ -#ifdef C_ARITH_CODING_SUPPORTED - cinfo->arith_code = TRUE; -#else - fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "baseline", 2)) { - /* Force baseline-compatible output (8-bit quantizer values). */ - force_baseline = TRUE; - - } else if (keymatch(arg, "block", 2)) { - /* Set DCT block size. */ -#if defined DCT_SCALING_SUPPORTED && JPEG_LIB_VERSION_MAJOR >= 8 && \ - (JPEG_LIB_VERSION_MAJOR > 8 || JPEG_LIB_VERSION_MINOR >= 3) - int val; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &val) != 1) - usage(); - if (val < 1 || val > 16) - usage(); - cinfo->block_size = val; -#else - fprintf(stderr, "%s: sorry, block size setting not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "dct", 2)) { - /* Select DCT algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "int", 1)) { - cinfo->dct_method = JDCT_ISLOW; - } else if (keymatch(argv[argn], "fast", 2)) { - cinfo->dct_method = JDCT_IFAST; - } else if (keymatch(argv[argn], "float", 2)) { - cinfo->dct_method = JDCT_FLOAT; - } else - usage(); - - } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { - /* Enable debug printouts. */ - /* On first -d, print version identification */ - static boolean printed_version = FALSE; - - if (! printed_version) { - fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n", - JVERSION, JCOPYRIGHT); - printed_version = TRUE; - } - cinfo->err->trace_level++; - - } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { - /* Force a monochrome JPEG file to be generated. */ - jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); - - } else if (keymatch(arg, "rgb", 3) || keymatch(arg, "rgb1", 4)) { - /* Force an RGB JPEG file to be generated. */ -#if JPEG_LIB_VERSION_MAJOR >= 9 - /* Note: Entropy table assignment in jpeg_set_colorspace depends - * on color_transform. - */ - cinfo->color_transform = arg[3] ? JCT_SUBTRACT_GREEN : JCT_NONE; -#endif - jpeg_set_colorspace(cinfo, JCS_RGB); - - } else if (keymatch(arg, "bgycc", 5)) { - /* Force a big gamut YCC JPEG file to be generated. */ -#if JPEG_LIB_VERSION_MAJOR >= 9 && \ - (JPEG_LIB_VERSION_MAJOR > 9 || JPEG_LIB_VERSION_MINOR >= 1) - jpeg_set_colorspace(cinfo, JCS_BG_YCC); -#else - fprintf(stderr, "%s: sorry, BG_YCC colorspace not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "maxmemory", 3)) { - /* Maximum memory in Kb (or Mb with 'm'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (ch == 'm' || ch == 'M') - lval *= 1000L; - cinfo->mem->max_memory_to_use = lval * 1000L; - - } else if (keymatch(arg, "nosmooth", 3)) { - /* Suppress fancy downsampling. */ - cinfo->do_fancy_downsampling = FALSE; - - } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { - /* Enable entropy parm optimization. */ -#ifdef ENTROPY_OPT_SUPPORTED - cinfo->optimize_coding = TRUE; -#else - fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "outfile", 4)) { - /* Set output file name. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - outfilename = argv[argn]; /* save it away for later use */ - - } else if (keymatch(arg, "progressive", 1)) { - /* Select simple progressive mode. */ -#ifdef C_PROGRESSIVE_SUPPORTED - simple_progressive = TRUE; - /* We must postpone execution until num_components is known. */ -#else - fprintf(stderr, "%s: sorry, progressive output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "quality", 1)) { - /* Quality ratings (quantization table scaling factors). */ - if (++argn >= argc) /* advance to next argument */ - usage(); - qualityarg = argv[argn]; - - } else if (keymatch(arg, "qslots", 2)) { - /* Quantization table slot numbers. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - qslotsarg = argv[argn]; - /* Must delay setting qslots until after we have processed any - * colorspace-determining switches, since jpeg_set_colorspace sets - * default quant table numbers. - */ - - } else if (keymatch(arg, "qtables", 2)) { - /* Quantization tables fetched from file. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - qtablefile = argv[argn]; - /* We postpone actually reading the file in case -quality comes later. */ - - } else if (keymatch(arg, "restart", 1)) { - /* Restart interval in MCU rows (or in MCUs with 'b'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (lval < 0 || lval > 65535L) - usage(); - if (ch == 'b' || ch == 'B') { - cinfo->restart_interval = (unsigned int) lval; - cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ - } else { - cinfo->restart_in_rows = (int) lval; - /* restart_interval will be computed during startup */ - } - - } else if (keymatch(arg, "sample", 2)) { - /* Set sampling factors. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - samplearg = argv[argn]; - /* Must delay setting sample factors until after we have processed any - * colorspace-determining switches, since jpeg_set_colorspace sets - * default sampling factors. - */ - - } else if (keymatch(arg, "scale", 4)) { - /* Scale the image by a fraction M/N. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d/%d", - &cinfo->scale_num, &cinfo->scale_denom) != 2) - usage(); - - } else if (keymatch(arg, "scans", 4)) { - /* Set scan script. */ -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - scansarg = argv[argn]; - /* We must postpone reading the file in case -progressive appears. */ -#else - fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "smooth", 2)) { - /* Set input smoothing factor. */ - int val; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &val) != 1) - usage(); - if (val < 0 || val > 100) - usage(); - cinfo->smoothing_factor = val; - - } else if (keymatch(arg, "targa", 1)) { - /* Input file is Targa format. */ - is_targa = TRUE; - - } else { - usage(); /* bogus switch */ - } - } - - /* Post-switch-scanning cleanup */ - - if (for_real) { - - /* Set quantization tables for selected quality. */ - /* Some or all may be overridden if -qtables is present. */ - if (qualityarg != NULL) /* process -quality if it was present */ - if (! set_quality_ratings(cinfo, qualityarg, force_baseline)) - usage(); - - if (qtablefile != NULL) /* process -qtables if it was present */ - if (! read_quant_tables(cinfo, qtablefile, force_baseline)) - usage(); - - if (qslotsarg != NULL) /* process -qslots if it was present */ - if (! set_quant_slots(cinfo, qslotsarg)) - usage(); - - if (samplearg != NULL) /* process -sample if it was present */ - if (! set_sample_factors(cinfo, samplearg)) - usage(); - -#ifdef C_PROGRESSIVE_SUPPORTED - if (simple_progressive) /* process -progressive; -scans can override */ - jpeg_simple_progression(cinfo); -#endif - -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (scansarg != NULL) /* process -scans if it was present */ - if (! read_scan_script(cinfo, scansarg)) - usage(); -#endif - } - - return argn; /* return index of next arg (file name) */ -} - - -/* - * Check for overwrite of an existing file; clear it with user - */ - -#ifndef NO_OVERWRITE_CHECK - -LOCAL(boolean) -is_write_ok (char * outfname) -{ - FILE * ofile; - int ch; - - ofile = fopen(outfname, READ_BINARY); - if (ofile == NULL) - return TRUE; /* not present */ - fclose(ofile); /* oops, it is present */ - - for (;;) { - fprintf(stderr, "%s already exists, overwrite it? [y/n] ", - outfname); - fflush(stderr); - ch = getc(stdin); - if (ch != '\n') /* flush rest of line */ - while (getc(stdin) != '\n') - /* nothing */; - - switch (ch) { - case 'Y': - case 'y': - return TRUE; - case 'N': - case 'n': - return FALSE; - /* otherwise, ask again */ - } - } -} - -#endif - - -/* - * Process a single input file name, and return its index in argv[]. - * File names at or to left of old_file_index have been processed already. - */ - -LOCAL(int) -process_one_file (int argc, char **argv, int old_file_index) -{ - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; - char *infilename; - char workfilename[PATH_MAX]; -#ifdef PROGRESS_REPORT - struct cdjpeg_progress_mgr progress; -#endif - int file_index; - cjpeg_source_ptr src_mgr; - FILE * input_file = NULL; - FILE * output_file = NULL; - JDIMENSION num_scanlines; - - /* Initialize the JPEG compression object with default error handling. */ - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_compress(&cinfo); - /* Add some application-specific error messages (from cderror.h) */ - jerr.addon_message_table = cdjpeg_message_table; - jerr.first_addon_message = JMSG_FIRSTADDONCODE; - jerr.last_addon_message = JMSG_LASTADDONCODE; - - /* Now safe to enable signal catcher. */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) &cinfo); -#endif - - /* Initialize JPEG parameters. - * Much of this may be overridden later. - * In particular, we don't yet know the input file's color space, - * but we need to provide some value for jpeg_set_defaults() to work. - */ - - cinfo.in_color_space = JCS_RGB; /* arbitrary guess */ - jpeg_set_defaults(&cinfo); - - /* Scan command line to find next file name. - * It is convenient to use just one switch-parsing routine, but the switch - * values read here are ignored; we will rescan the switches after opening - * the input file. - */ - - file_index = parse_switches(&cinfo, argc, argv, old_file_index, FALSE); - if (file_index >= argc) { - fprintf(stderr, "%s: missing input file name\n", progname); - usage(); - } - - /* Open the input file. */ - infilename = argv[file_index]; - if ((input_file = fopen(infilename, READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, infilename); - goto fail; - } - -#ifdef PROGRESS_REPORT - start_progress_monitor((j_common_ptr) &cinfo, &progress); -#endif - - /* Figure out the input file format, and set up to read it. */ - src_mgr = select_file_type(&cinfo, input_file); - src_mgr->input_file = input_file; - - /* Read the input file header to obtain file size & colorspace. */ - (*src_mgr->start_input) (&cinfo, src_mgr); - - /* Now that we know input colorspace, fix colorspace-dependent defaults */ - jpeg_default_colorspace(&cinfo); - - /* Adjust default compression parameters by re-parsing the options */ - file_index = parse_switches(&cinfo, argc, argv, old_file_index, TRUE); - - /* If user didn't supply -outfile switch, select output file name. */ - if (outfilename == NULL) { - int i; - - outfilename = workfilename; - /* Make outfilename be infilename with .jpg substituted for extension */ - strcpy(outfilename, infilename); - for (i = (int)strlen(outfilename)-1; i >= 0; i--) { - switch (outfilename[i]) { - case ':': - case '/': - case '\\': - i = 0; /* stop scanning */ - break; - case '.': - outfilename[i] = '\0'; /* lop off existing extension */ - i = 0; /* stop scanning */ - break; - default: - break; /* keep scanning */ - } - } - strcat(outfilename, ".jpg"); - } - - fprintf(stderr, "Compressing %s => %s\n", infilename, outfilename); -#ifndef NO_OVERWRITE_CHECK - if (! is_write_ok(outfilename)) - goto fail; -#endif - - /* Open the output file. */ - if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't create %s\n", progname, outfilename); - goto fail; - } - - /* Specify data destination for compression */ - jpeg_stdio_dest(&cinfo, output_file); - - /* Start compressor */ - jpeg_start_compress(&cinfo, TRUE); - - /* Process data */ - while (cinfo.next_scanline < cinfo.image_height) { - num_scanlines = (*src_mgr->get_pixel_rows) (&cinfo, src_mgr); - (void) jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines); - } - - /* Finish compression and release memory */ - (*src_mgr->finish_input) (&cinfo, src_mgr); - jpeg_finish_compress(&cinfo); - - /* Clean up and exit */ -fail: - jpeg_destroy_compress(&cinfo); - - if (input_file != NULL) fclose(input_file); - if (output_file != NULL) fclose(output_file); - -#ifdef PROGRESS_REPORT - end_progress_monitor((j_common_ptr) &cinfo); -#endif - - /* Disable signal catcher. */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) NULL); -#endif - - return file_index; -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - int file_index; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - -#ifdef MSDOS - progname = "cjpeg"; /* DOS tends to be too verbose about argv[0] */ -#else - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "cjpeg"; /* in case C library doesn't provide it */ -#endif - - /* The default maxmem must be computed only once at program startup, - * since releasing memory with free() won't give it back to the OS. - */ -#ifdef FREE_MEM_ESTIMATE - default_maxmem = FREE_MEM_ESTIMATE; -#else - default_maxmem = 0; -#endif - - /* Scan command line, parse switches and locate input file names */ - - if (argc < 2) - usage(); /* nothing on the command line?? */ - - file_index = 0; - - while (file_index < argc-1) - file_index = process_one_file(argc, argv, file_index); - - /* All done. */ - exit(EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/thirdparty/jpeg-9e/ckconfig.c b/thirdparty/jpeg-9e/ckconfig.c deleted file mode 100644 index e658623..0000000 --- a/thirdparty/jpeg-9e/ckconfig.c +++ /dev/null @@ -1,402 +0,0 @@ -/* - * ckconfig.c - * - * Copyright (C) 1991-1994, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - */ - -/* - * This program is intended to help you determine how to configure the JPEG - * software for installation on a particular system. The idea is to try to - * compile and execute this program. If your compiler fails to compile the - * program, make changes as indicated in the comments below. Once you can - * compile the program, run it, and it will produce a "jconfig.h" file for - * your system. - * - * As a general rule, each time you try to compile this program, - * pay attention only to the *first* error message you get from the compiler. - * Many C compilers will issue lots of spurious error messages once they - * have gotten confused. Go to the line indicated in the first error message, - * and read the comments preceding that line to see what to change. - * - * Almost all of the edits you may need to make to this program consist of - * changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL", - * or vice versa. This is called defining or undefining that symbol. - */ - - -/* First we must see if your system has the include files we need. - * We start out with the assumption that your system has all the ANSI-standard - * include files. If you get any error trying to include one of these files, - * undefine the corresponding HAVE_xxx symbol. - */ - -#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */ -#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */ -#include -#endif - -#define HAVE_STDLIB_H /* same thing for stdlib.h */ -#ifdef HAVE_STDLIB_H -#include -#endif - -#include /* If you ain't got this, you ain't got C. */ - -/* We have to see if your string functions are defined by - * strings.h (old BSD convention) or string.h (everybody else). - * We try the non-BSD convention first; define NEED_BSD_STRINGS - * if the compiler says it can't find string.h. - */ - -#undef NEED_BSD_STRINGS - -#ifdef NEED_BSD_STRINGS -#include -#else -#include -#endif - -/* On some systems (especially older Unix machines), type size_t is - * defined only in the include file . If you get a failure - * on the size_t test below, try defining NEED_SYS_TYPES_H. - */ - -#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */ -#ifdef NEED_SYS_TYPES_H -#include -#endif - - -/* Usually type size_t is defined in one of the include files we've included - * above. If not, you'll get an error on the "typedef size_t my_size_t;" line. - * In that case, first try defining NEED_SYS_TYPES_H just above. - * If that doesn't work, you'll have to search through your system library - * to figure out which include file defines "size_t". Look for a line that - * says "typedef something-or-other size_t;". Then, change the line below - * that says "#include " to instead include the file - * you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find - * type size_t anywhere, try replacing "#include " with - * "typedef unsigned int size_t;". - */ - -#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */ - -#ifdef NEED_SPECIAL_INCLUDE -#include -#endif - -typedef size_t my_size_t; /* The payoff: do we have size_t now? */ - - -/* The next question is whether your compiler supports ANSI-style function - * prototypes. You need to know this in order to choose between using - * makefile.ansi and using makefile.unix. - * The #define line below is set to assume you have ANSI function prototypes. - * If you get an error in this group of lines, undefine HAVE_PROTOTYPES. - */ - -#define HAVE_PROTOTYPES - -#ifdef HAVE_PROTOTYPES -int testfunction (int arg1, int * arg2); /* check prototypes */ - -struct methods_struct { /* check method-pointer declarations */ - int (*error_exit) (char *msgtext); - int (*trace_message) (char *msgtext); - int (*another_method) (void); -}; - -int testfunction (int arg1, int * arg2) /* check definitions */ -{ - return arg2[arg1]; -} - -int test2function (void) /* check void arg list */ -{ - return 0; -} -#endif - - -/* Now we want to find out if your compiler knows what "unsigned char" means. - * If you get an error on the "unsigned char un_char;" line, - * then undefine HAVE_UNSIGNED_CHAR. - */ - -#define HAVE_UNSIGNED_CHAR - -#ifdef HAVE_UNSIGNED_CHAR -unsigned char un_char; -#endif - - -/* Now we want to find out if your compiler knows what "unsigned short" means. - * If you get an error on the "unsigned short un_short;" line, - * then undefine HAVE_UNSIGNED_SHORT. - */ - -#define HAVE_UNSIGNED_SHORT - -#ifdef HAVE_UNSIGNED_SHORT -unsigned short un_short; -#endif - - -/* Now we want to find out if your compiler understands type "void". - * If you get an error anywhere in here, undefine HAVE_VOID. - */ - -#define HAVE_VOID - -#ifdef HAVE_VOID -/* Caution: a C++ compiler will insist on complete prototypes */ -typedef void * void_ptr; /* check void * */ -#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */ -typedef void (*void_func) (int a, int b); -#else -typedef void (*void_func) (); -#endif - -#ifdef HAVE_PROTOTYPES /* check void function result */ -void test3function (void_ptr arg1, void_func arg2) -#else -void test3function (arg1, arg2) - void_ptr arg1; - void_func arg2; -#endif -{ - char * locptr = (char *) arg1; /* check casting to and from void * */ - arg1 = (void *) locptr; - (*arg2) (1, 2); /* check call of fcn returning void */ -} -#endif - - -/* Now we want to find out if your compiler knows what "const" means. - * If you get an error here, undefine HAVE_CONST. - */ - -#define HAVE_CONST - -#ifdef HAVE_CONST -static const int carray[3] = {1, 2, 3}; - -#ifdef HAVE_PROTOTYPES -int test4function (const int arg1) -#else -int test4function (arg1) - const int arg1; -#endif -{ - return carray[arg1]; -} -#endif - - -/* If you get an error or warning about this structure definition, - * define INCOMPLETE_TYPES_BROKEN. - */ - -#undef INCOMPLETE_TYPES_BROKEN - -#ifndef INCOMPLETE_TYPES_BROKEN -typedef struct undefined_structure * undef_struct_ptr; -#endif - - -/* If you get an error about duplicate names, - * define NEED_SHORT_EXTERNAL_NAMES. - */ - -#undef NEED_SHORT_EXTERNAL_NAMES - -#ifndef NEED_SHORT_EXTERNAL_NAMES - -int possibly_duplicate_function () -{ - return 0; -} - -int possibly_dupli_function () -{ - return 1; -} - -#endif - - - -/************************************************************************ - * OK, that's it. You should not have to change anything beyond this - * point in order to compile and execute this program. (You might get - * some warnings, but you can ignore them.) - * When you run the program, it will make a couple more tests that it - * can do automatically, and then it will create jconfig.h and print out - * any additional suggestions it has. - ************************************************************************ - */ - - -#ifdef HAVE_PROTOTYPES -int is_char_signed (int arg) -#else -int is_char_signed (arg) - int arg; -#endif -{ - if (arg == 189) { /* expected result for unsigned char */ - return 0; /* type char is unsigned */ - } - else if (arg != -67) { /* expected result for signed char */ - printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n"); - printf("I fear the JPEG software will not work at all.\n\n"); - } - return 1; /* assume char is signed otherwise */ -} - - -#ifdef HAVE_PROTOTYPES -int is_shifting_signed (long arg) -#else -int is_shifting_signed (arg) - long arg; -#endif -/* See whether right-shift on a long is signed or not. */ -{ - long res = arg >> 4; - - if (res == -0x7F7E80CL) { /* expected result for signed shift */ - return 1; /* right shift is signed */ - } - /* see if unsigned-shift hack will fix it. */ - /* we can't just test exact value since it depends on width of long... */ - res |= (~0L) << (32-4); - if (res == -0x7F7E80CL) { /* expected result now? */ - return 0; /* right shift is unsigned */ - } - printf("Right shift isn't acting as I expect it to.\n"); - printf("I fear the JPEG software will not work at all.\n\n"); - return 0; /* try it with unsigned anyway */ -} - - -#ifdef HAVE_PROTOTYPES -int main (int argc, char ** argv) -#else -int main (argc, argv) - int argc; - char ** argv; -#endif -{ - char signed_char_check = (char) (-67); - FILE *outfile; - - /* Attempt to write jconfig.h */ - if ((outfile = fopen("jconfig.h", "w")) == NULL) { - printf("Failed to write jconfig.h\n"); - return 1; - } - - /* Write out all the info */ - fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n"); - fprintf(outfile, "/* see jconfig.txt for explanations */\n\n"); -#ifdef HAVE_PROTOTYPES - fprintf(outfile, "#define HAVE_PROTOTYPES\n"); -#else - fprintf(outfile, "#undef HAVE_PROTOTYPES\n"); -#endif -#ifdef HAVE_UNSIGNED_CHAR - fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n"); -#else - fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n"); -#endif -#ifdef HAVE_UNSIGNED_SHORT - fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n"); -#else - fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n"); -#endif -#ifdef HAVE_VOID - fprintf(outfile, "/* #define void char */\n"); -#else - fprintf(outfile, "#define void char\n"); -#endif -#ifdef HAVE_CONST - fprintf(outfile, "/* #define const */\n"); -#else - fprintf(outfile, "#define const\n"); -#endif - if (is_char_signed((int) signed_char_check)) - fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n"); - else - fprintf(outfile, "#define CHAR_IS_UNSIGNED\n"); -#ifdef HAVE_STDDEF_H - fprintf(outfile, "#define HAVE_STDDEF_H\n"); -#else - fprintf(outfile, "#undef HAVE_STDDEF_H\n"); -#endif -#ifdef HAVE_STDLIB_H - fprintf(outfile, "#define HAVE_STDLIB_H\n"); -#else - fprintf(outfile, "#undef HAVE_STDLIB_H\n"); -#endif -#ifdef NEED_BSD_STRINGS - fprintf(outfile, "#define NEED_BSD_STRINGS\n"); -#else - fprintf(outfile, "#undef NEED_BSD_STRINGS\n"); -#endif -#ifdef NEED_SYS_TYPES_H - fprintf(outfile, "#define NEED_SYS_TYPES_H\n"); -#else - fprintf(outfile, "#undef NEED_SYS_TYPES_H\n"); -#endif - fprintf(outfile, "#undef NEED_FAR_POINTERS\n"); -#ifdef NEED_SHORT_EXTERNAL_NAMES - fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n"); -#else - fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n"); -#endif -#ifdef INCOMPLETE_TYPES_BROKEN - fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n"); -#else - fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n"); -#endif - fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n"); - if (is_shifting_signed(-0x7F7E80B1L)) - fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n"); - else - fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n"); - fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n"); - fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n"); - fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n"); - fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n"); - fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n"); - fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n"); - fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n"); - fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n"); - fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n"); - fprintf(outfile, "#undef DONT_USE_B_MODE\n"); - fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n"); - fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n"); - - /* Close the jconfig.h file */ - fclose(outfile); - - /* User report */ - printf("Configuration check for Independent JPEG Group's software done.\n"); - printf("\nI have written the jconfig.h file for you.\n\n"); -#ifdef HAVE_PROTOTYPES - printf("You should use makefile.ansi as the starting point for your Makefile.\n"); -#else - printf("You should use makefile.unix as the starting point for your Makefile.\n"); -#endif - -#ifdef NEED_SPECIAL_INCLUDE - printf("\nYou'll need to change jconfig.h to include the system include file\n"); - printf("that you found type size_t in, or add a direct definition of type\n"); - printf("size_t if that's what you used. Just add it to the end.\n"); -#endif - - return 0; -} diff --git a/thirdparty/jpeg-9e/coderules.txt b/thirdparty/jpeg-9e/coderules.txt deleted file mode 100644 index 357929f..0000000 --- a/thirdparty/jpeg-9e/coderules.txt +++ /dev/null @@ -1,118 +0,0 @@ -IJG JPEG LIBRARY: CODING RULES - -Copyright (C) 1991-1996, Thomas G. Lane. -This file is part of the Independent JPEG Group's software. -For conditions of distribution and use, see the accompanying README file. - - -Since numerous people will be contributing code and bug fixes, it's important -to establish a common coding style. The goal of using similar coding styles -is much more important than the details of just what that style is. - -In general we follow the recommendations of "Recommended C Style and Coding -Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and -Brader). This document is available in the IJG FTP archive (see -jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl). - -Block comments should be laid out thusly: - -/* - * Block comments in this style. - */ - -We indent statements in K&R style, e.g., - if (test) { - then-part; - } else { - else-part; - } -with two spaces per indentation level. (This indentation convention is -handled automatically by GNU Emacs and many other text editors.) - -Multi-word names should be written in lower case with underscores, e.g., -multi_word_name (not multiWordName). Preprocessor symbols and enum constants -are similar but upper case (MULTI_WORD_NAME). Names should be unique within -the first fifteen characters. (On some older systems, global names must be -unique within six characters. We accommodate this without cluttering the -source code by using macros to substitute shorter names.) - -We use function prototypes everywhere; we rely on automatic source code -transformation to feed prototype-less C compilers. Transformation is done -by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript). -ansi2knr is not very bright, so it imposes a format requirement on function -declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions -should be written in the following style: - -LOCAL(int *) -function_name (int a, char *b) -{ - code... -} - -Note that each function definition must begin with GLOBAL(type), LOCAL(type), -or METHODDEF(type). These macros expand to "static type" or just "type" as -appropriate. They provide a readable indication of the routine's usage and -can readily be changed for special needs. (For instance, special linkage -keywords can be inserted for use in Windows DLLs.) - -ansi2knr does not transform method declarations (function pointers in -structs). We handle these with a macro JMETHOD, defined as - #ifdef HAVE_PROTOTYPES - #define JMETHOD(type,methodname,arglist) type (*methodname) arglist - #else - #define JMETHOD(type,methodname,arglist) type (*methodname) () - #endif -which is used like this: - struct function_pointers { - JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp)); - JMETHOD(void, term_entropy_encoder, (void)); - }; -Note the set of parentheses surrounding the parameter list. - -A similar solution is used for forward and external function declarations -(see the EXTERN and JPP macros). - -If the code is to work on non-ANSI compilers, we cannot rely on a prototype -declaration to coerce actual parameters into the right types. Therefore, use -explicit casts on actual parameters whenever the actual parameter type is not -identical to the formal parameter. Beware of implicit conversions to "int". - -It seems there are some non-ANSI compilers in which the sizeof() operator -is defined to return int, yet size_t is defined as long. Needless to say, -this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(), -so that the result is guaranteed to be of type size_t. - - -The JPEG library is intended to be used within larger programs. Furthermore, -we want it to be reentrant so that it can be used by applications that process -multiple images concurrently. The following rules support these requirements: - -1. Avoid direct use of file I/O, "malloc", error report printouts, etc; -pass these through the common routines provided. - -2. Minimize global namespace pollution. Functions should be declared static -wherever possible. (Note that our method-based calling conventions help this -a lot: in many modules only the initialization function will ever need to be -called directly, so only that function need be externally visible.) All -global function names should begin with "jpeg_", and should have an -abbreviated name (unique in the first six characters) substituted by macro -when NEED_SHORT_EXTERNAL_NAMES is set. - -3. Don't use global variables; anything that must be used in another module -should be in the common data structures. - -4. Don't use static variables except for read-only constant tables. Variables -that should be private to a module can be placed into private structures (see -the system architecture document, structure.txt). - -5. Source file names should begin with "j" for files that are part of the -library proper; source files that are not part of the library, such as cjpeg.c -and djpeg.c, do not begin with "j". Keep source file names to eight -characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep -compression and decompression code in separate source files --- some -applications may want only one half of the library. - -Note: these rules (particularly #4) are not followed religiously in the -modules that are used in cjpeg/djpeg but are not part of the JPEG library -proper. Those modules are not really intended to be used in other -applications. diff --git a/thirdparty/jpeg-9e/compile b/thirdparty/jpeg-9e/compile deleted file mode 100755 index df363c8..0000000 --- a/thirdparty/jpeg-9e/compile +++ /dev/null @@ -1,348 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand '-c -o'. - -scriptversion=2018-03-07.03; # UTC - -# Copyright (C) 1999-2021 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' - -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent tools from complaining about whitespace usage. -IFS=" "" $nl" - -file_conv= - -# func_file_conv build_file lazy -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. If the determined conversion -# type is listed in (the comma separated) LAZY, no conversion will -# take place. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN* | MSYS*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv/,$2, in - *,$file_conv,*) - ;; - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin/* | msys/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_cl_dashL linkdir -# Make cl look for libraries in LINKDIR -func_cl_dashL () -{ - func_file_conv "$1" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" -} - -# func_cl_dashl library -# Do a library search-path lookup for cl -func_cl_dashl () -{ - lib=$1 - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - lib=$dir/$lib.dll.lib - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - lib=$dir/$lib.lib - break - fi - if test -f "$dir/lib$lib.a"; then - found=yes - lib=$dir/lib$lib.a - break - fi - done - IFS=$save_IFS - - if test "$found" != yes; then - lib=$lib.lib - fi -} - -# func_cl_wrapper cl arg... -# Adjust compile command to suit cl -func_cl_wrapper () -{ - # Assume a capable shell - lib_path= - shared=: - linker_opts= - for arg - do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - eat=1 - case $2 in - *.o | *.[oO][bB][jJ]) - func_file_conv "$2" - set x "$@" -Fo"$file" - shift - ;; - *) - func_file_conv "$2" - set x "$@" -Fe"$file" - shift - ;; - esac - ;; - -I) - eat=1 - func_file_conv "$2" mingw - set x "$@" -I"$file" - shift - ;; - -I*) - func_file_conv "${1#-I}" mingw - set x "$@" -I"$file" - shift - ;; - -l) - eat=1 - func_cl_dashl "$2" - set x "$@" "$lib" - shift - ;; - -l*) - func_cl_dashl "${1#-l}" - set x "$@" "$lib" - shift - ;; - -L) - eat=1 - func_cl_dashL "$2" - ;; - -L*) - func_cl_dashL "${1#-L}" - ;; - -static) - shared=false - ;; - -Wl,*) - arg=${1#-Wl,} - save_ifs="$IFS"; IFS=',' - for flag in $arg; do - IFS="$save_ifs" - linker_opts="$linker_opts $flag" - done - IFS="$save_ifs" - ;; - -Xlinker) - eat=1 - linker_opts="$linker_opts $2" - ;; - -*) - set x "$@" "$1" - shift - ;; - *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) - func_file_conv "$1" - set x "$@" -Tp"$file" - shift - ;; - *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) - func_file_conv "$1" mingw - set x "$@" "$file" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift - done - if test -n "$linker_opts"; then - linker_opts="-link$linker_opts" - fi - exec "$@" $linker_opts - exit 1 -} - -eat= - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand '-c -o'. -Remove '-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file 'INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ - icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) - func_cl_wrapper "$@" # Doesn't return... - ;; -esac - -ofile= -cfile= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - # So we strip '-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no '-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # '.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use '[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/thirdparty/jpeg-9e/config.guess b/thirdparty/jpeg-9e/config.guess deleted file mode 100755 index e81d3ae..0000000 --- a/thirdparty/jpeg-9e/config.guess +++ /dev/null @@ -1,1748 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2021 Free Software Foundation, Inc. - -# shellcheck disable=SC2006,SC2268 # see below for rationale - -timestamp='2021-06-03' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. -# -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess -# -# Please send patches to . - - -# The "shellcheck disable" line above the timestamp inhibits complaints -# about features and limitations of the classic Bourne shell that were -# superseded or lifted in POSIX. However, this script identifies a wide -# variety of pre-POSIX systems that do not have POSIX shells at all, and -# even some reasonably current systems (Solaris 10 as case-in-point) still -# have a pre-POSIX /bin/sh. - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2021 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -# Just in case it came from the environment. -GUESS= - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -tmp= -# shellcheck disable=SC2172 -trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 - -set_cc_for_build() { - # prevent multiple calls if $tmp is already set - test "$tmp" && return 0 - : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039,SC3028 - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } - dummy=$tmp/dummy - case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in - ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c89 c99 ; do - if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD=$driver - break - fi - done - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; - esac -} - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if test -f /.attbin/uname ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case $UNAME_SYSTEM in -Linux|GNU|GNU/*) - LIBC=unknown - - set_cc_for_build - cat <<-EOF > "$dummy.c" - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #elif defined(__GLIBC__) - LIBC=gnu - #else - #include - /* First heuristic to detect musl libc. */ - #ifdef __DEFINED_va_list - LIBC=musl - #endif - #endif - EOF - cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` - eval "$cc_set_libc" - - # Second heuristic to detect musl libc. - if [ "$LIBC" = unknown ] && - command -v ldd >/dev/null && - ldd --version 2>&1 | grep -q ^musl; then - LIBC=musl - fi - - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - if [ "$LIBC" = unknown ]; then - LIBC=gnu - fi - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ - /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ - echo unknown)` - case $UNAME_MACHINE_ARCH in - aarch64eb) machine=aarch64_be-unknown ;; - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown - ;; - *) machine=$UNAME_MACHINE_ARCH-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently (or will in the future) and ABI. - case $UNAME_MACHINE_ARCH in - earm*) - os=netbsdelf - ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # Determine ABI tags. - case $UNAME_MACHINE_ARCH in - earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case $UNAME_VERSION in - Debian*) - release='-gnu' - ;; - *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - GUESS=$machine-${os}${release}${abi-} - ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE - ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE - ;; - *:SecBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE - ;; - *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE - ;; - *:MidnightBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE - ;; - *:ekkoBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE - ;; - *:SolidBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE - ;; - *:OS108:*:*) - GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE - ;; - macppc:MirBSD:*:*) - GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE - ;; - *:MirBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE - ;; - *:Sortix:*:*) - GUESS=$UNAME_MACHINE-unknown-sortix - ;; - *:Twizzler:*:*) - GUESS=$UNAME_MACHINE-unknown-twizzler - ;; - *:Redox:*:*) - GUESS=$UNAME_MACHINE-unknown-redox - ;; - mips:OSF1:*.*) - GUESS=mips-dec-osf1 - ;; - alpha:OSF1:*:*) - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - trap '' 0 - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case $ALPHA_CPU_TYPE in - "EV4 (21064)") - UNAME_MACHINE=alpha ;; - "EV4.5 (21064)") - UNAME_MACHINE=alpha ;; - "LCA4 (21066/21068)") - UNAME_MACHINE=alpha ;; - "EV5 (21164)") - UNAME_MACHINE=alphaev5 ;; - "EV5.6 (21164A)") - UNAME_MACHINE=alphaev56 ;; - "EV5.6 (21164PC)") - UNAME_MACHINE=alphapca56 ;; - "EV5.7 (21164PC)") - UNAME_MACHINE=alphapca57 ;; - "EV6 (21264)") - UNAME_MACHINE=alphaev6 ;; - "EV6.7 (21264A)") - UNAME_MACHINE=alphaev67 ;; - "EV6.8CB (21264C)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8AL (21264B)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8CX (21264D)") - UNAME_MACHINE=alphaev68 ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE=alphaev69 ;; - "EV7 (21364)") - UNAME_MACHINE=alphaev7 ;; - "EV7.9 (21364A)") - UNAME_MACHINE=alphaev79 ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - GUESS=$UNAME_MACHINE-dec-osf$OSF_REL - ;; - Amiga*:UNIX_System_V:4.0:*) - GUESS=m68k-unknown-sysv4 - ;; - *:[Aa]miga[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-amigaos - ;; - *:[Mm]orph[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-morphos - ;; - *:OS/390:*:*) - GUESS=i370-ibm-openedition - ;; - *:z/VM:*:*) - GUESS=s390-ibm-zvmoe - ;; - *:OS400:*:*) - GUESS=powerpc-ibm-os400 - ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - GUESS=arm-acorn-riscix$UNAME_RELEASE - ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - GUESS=arm-unknown-riscos - ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - GUESS=hppa1.1-hitachi-hiuxmpp - ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - case `(/bin/universe) 2>/dev/null` in - att) GUESS=pyramid-pyramid-sysv3 ;; - *) GUESS=pyramid-pyramid-bsd ;; - esac - ;; - NILE*:*:*:dcosx) - GUESS=pyramid-pyramid-svr4 - ;; - DRS?6000:unix:4.0:6*) - GUESS=sparc-icl-nx6 - ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) GUESS=sparc-icl-nx7 ;; - esac - ;; - s390x:SunOS:*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL - ;; - sun4H:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-hal-solaris2$SUN_REL - ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-sun-solaris2$SUN_REL - ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - GUESS=i386-pc-auroraux$UNAME_RELEASE - ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - set_cc_for_build - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=$SUN_ARCH-pc-solaris2$SUN_REL - ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-sun-solaris3$SUN_REL - ;; - sun4*:SunOS:*:*) - case `/usr/bin/arch -k` in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` - GUESS=sparc-sun-sunos$SUN_REL - ;; - sun3*:SunOS:*:*) - GUESS=m68k-sun-sunos$UNAME_RELEASE - ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case `/bin/arch` in - sun3) - GUESS=m68k-sun-sunos$UNAME_RELEASE - ;; - sun4) - GUESS=sparc-sun-sunos$UNAME_RELEASE - ;; - esac - ;; - aushp:SunOS:*:*) - GUESS=sparc-auspex-sunos$UNAME_RELEASE - ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - GUESS=m68k-milan-mint$UNAME_RELEASE - ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - GUESS=m68k-hades-mint$UNAME_RELEASE - ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - GUESS=m68k-unknown-mint$UNAME_RELEASE - ;; - m68k:machten:*:*) - GUESS=m68k-apple-machten$UNAME_RELEASE - ;; - powerpc:machten:*:*) - GUESS=powerpc-apple-machten$UNAME_RELEASE - ;; - RISC*:Mach:*:*) - GUESS=mips-dec-mach_bsd4.3 - ;; - RISC*:ULTRIX:*:*) - GUESS=mips-dec-ultrix$UNAME_RELEASE - ;; - VAX*:ULTRIX*:*:*) - GUESS=vax-dec-ultrix$UNAME_RELEASE - ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - GUESS=clipper-intergraph-clix$UNAME_RELEASE - ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && - { echo "$SYSTEM_NAME"; exit; } - GUESS=mips-mips-riscos$UNAME_RELEASE - ;; - Motorola:PowerMAX_OS:*:*) - GUESS=powerpc-motorola-powermax - ;; - Motorola:*:4.3:PL8-*) - GUESS=powerpc-harris-powermax - ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - GUESS=powerpc-harris-powermax - ;; - Night_Hawk:Power_UNIX:*:*) - GUESS=powerpc-harris-powerunix - ;; - m88k:CX/UX:7*:*) - GUESS=m88k-harris-cxux7 - ;; - m88k:*:4*:R4*) - GUESS=m88k-motorola-sysv4 - ;; - m88k:*:3*:R3*) - GUESS=m88k-motorola-sysv3 - ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 - then - if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ - test "$TARGET_BINARY_INTERFACE"x = x - then - GUESS=m88k-dg-dgux$UNAME_RELEASE - else - GUESS=m88k-dg-dguxbcs$UNAME_RELEASE - fi - else - GUESS=i586-dg-dgux$UNAME_RELEASE - fi - ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - GUESS=m88k-dolphin-sysv3 - ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - GUESS=m88k-motorola-sysv3 - ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - GUESS=m88k-tektronix-sysv3 - ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - GUESS=m68k-tektronix-bsd - ;; - *:IRIX*:*:*) - IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` - GUESS=mips-sgi-irix$IRIX_REL - ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id - ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - GUESS=i386-ibm-aix - ;; - ia64:AIX:*:*) - if test -x /usr/bin/oslevel ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=$UNAME_VERSION.$UNAME_RELEASE - fi - GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV - ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` - then - GUESS=$SYSTEM_NAME - else - GUESS=rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - GUESS=rs6000-ibm-aix3.2.4 - else - GUESS=rs6000-ibm-aix3.2 - fi - ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if test -x /usr/bin/lslpp ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` - else - IBM_REV=$UNAME_VERSION.$UNAME_RELEASE - fi - GUESS=$IBM_ARCH-ibm-aix$IBM_REV - ;; - *:AIX:*:*) - GUESS=rs6000-ibm-aix - ;; - ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - GUESS=romp-ibm-bsd4.4 - ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to - ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - GUESS=rs6000-bull-bosx - ;; - DPX/2?00:B.O.S.:*:*) - GUESS=m68k-bull-sysv3 - ;; - 9000/[34]??:4.3bsd:1.*:*) - GUESS=m68k-hp-bsd - ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - GUESS=m68k-hp-bsd4.4 - ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` - case $UNAME_MACHINE in - 9000/31?) HP_ARCH=m68000 ;; - 9000/[34]??) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if test -x /usr/bin/getconf; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case $sc_cpu_version in - 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 - 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case $sc_kernel_bits in - 32) HP_ARCH=hppa2.0n ;; - 64) HP_ARCH=hppa2.0w ;; - '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 - esac ;; - esac - fi - if test "$HP_ARCH" = ""; then - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if test "$HP_ARCH" = hppa2.0w - then - set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH=hppa2.0w - else - HP_ARCH=hppa64 - fi - fi - GUESS=$HP_ARCH-hp-hpux$HPUX_REV - ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` - GUESS=ia64-hp-hpux$HPUX_REV - ;; - 3050*:HI-UX:*:*) - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - GUESS=unknown-hitachi-hiuxwe2 - ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - GUESS=hppa1.1-hp-bsd - ;; - 9000/8??:4.3bsd:*:*) - GUESS=hppa1.0-hp-bsd - ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - GUESS=hppa1.0-hp-mpeix - ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - GUESS=hppa1.1-hp-osf - ;; - hp8??:OSF1:*:*) - GUESS=hppa1.0-hp-osf - ;; - i*86:OSF1:*:*) - if test -x /usr/sbin/sysversion ; then - GUESS=$UNAME_MACHINE-unknown-osf1mk - else - GUESS=$UNAME_MACHINE-unknown-osf1 - fi - ;; - parisc*:Lites*:*:*) - GUESS=hppa1.1-hp-lites - ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - GUESS=c1-convex-bsd - ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - GUESS=c34-convex-bsd - ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - GUESS=c38-convex-bsd - ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - GUESS=c4-convex-bsd - ;; - CRAY*Y-MP:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=ymp-cray-unicos$CRAY_REL - ;; - CRAY*[A-Z]90:*:*:*) - echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=t90-cray-unicos$CRAY_REL - ;; - CRAY*T3E:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=alphaev5-cray-unicosmk$CRAY_REL - ;; - CRAY*SV1:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=sv1-cray-unicos$CRAY_REL - ;; - *:UNICOS/mp:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=craynv-cray-unicosmp$CRAY_REL - ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} - ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} - ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE - ;; - sparc*:BSD/OS:*:*) - GUESS=sparc-unknown-bsdi$UNAME_RELEASE - ;; - *:BSD/OS:*:*) - GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE - ;; - arm:FreeBSD:*:*) - UNAME_PROCESSOR=`uname -p` - set_cc_for_build - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi - else - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf - fi - ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case $UNAME_PROCESSOR in - amd64) - UNAME_PROCESSOR=x86_64 ;; - i386) - UNAME_PROCESSOR=i586 ;; - esac - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL - ;; - i*:CYGWIN*:*) - GUESS=$UNAME_MACHINE-pc-cygwin - ;; - *:MINGW64*:*) - GUESS=$UNAME_MACHINE-pc-mingw64 - ;; - *:MINGW*:*) - GUESS=$UNAME_MACHINE-pc-mingw32 - ;; - *:MSYS*:*) - GUESS=$UNAME_MACHINE-pc-msys - ;; - i*:PW*:*) - GUESS=$UNAME_MACHINE-pc-pw32 - ;; - *:Interix*:*) - case $UNAME_MACHINE in - x86) - GUESS=i586-pc-interix$UNAME_RELEASE - ;; - authenticamd | genuineintel | EM64T) - GUESS=x86_64-unknown-interix$UNAME_RELEASE - ;; - IA64) - GUESS=ia64-unknown-interix$UNAME_RELEASE - ;; - esac ;; - i*:UWIN*:*) - GUESS=$UNAME_MACHINE-pc-uwin - ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - GUESS=x86_64-pc-cygwin - ;; - prep*:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=powerpcle-unknown-solaris2$SUN_REL - ;; - *:GNU:*:*) - # the GNU system - GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` - GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` - GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL - ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` - GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC - ;; - *:Minix:*:*) - GUESS=$UNAME_MACHINE-unknown-minix - ;; - aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - arm*:Linux:*:*) - set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi - else - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf - fi - fi - ;; - avr32*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - cris:Linux:*:*) - GUESS=$UNAME_MACHINE-axis-linux-$LIBC - ;; - crisv32:Linux:*:*) - GUESS=$UNAME_MACHINE-axis-linux-$LIBC - ;; - e2k:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - frv:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - hexagon:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - i*86:Linux:*:*) - GUESS=$UNAME_MACHINE-pc-linux-$LIBC - ;; - ia64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - k1om:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - m32r*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - m68*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - mips:Linux:*:* | mips64:Linux:*:*) - set_cc_for_build - IS_GLIBC=0 - test x"${LIBC}" = xgnu && IS_GLIBC=1 - sed 's/^ //' << EOF > "$dummy.c" - #undef CPU - #undef mips - #undef mipsel - #undef mips64 - #undef mips64el - #if ${IS_GLIBC} && defined(_ABI64) - LIBCABI=gnuabi64 - #else - #if ${IS_GLIBC} && defined(_ABIN32) - LIBCABI=gnuabin32 - #else - LIBCABI=${LIBC} - #endif - #endif - - #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa64r6 - #else - #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa32r6 - #else - #if defined(__mips64) - CPU=mips64 - #else - CPU=mips - #endif - #endif - #endif - - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - MIPS_ENDIAN=el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - MIPS_ENDIAN= - #else - MIPS_ENDIAN= - #endif - #endif -EOF - cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` - eval "$cc_set_vars" - test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } - ;; - mips64el:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - openrisc*:Linux:*:*) - GUESS=or1k-unknown-linux-$LIBC - ;; - or32:Linux:*:* | or1k*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - padre:Linux:*:*) - GUESS=sparc-unknown-linux-$LIBC - ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - GUESS=hppa64-unknown-linux-$LIBC - ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; - PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; - *) GUESS=hppa-unknown-linux-$LIBC ;; - esac - ;; - ppc64:Linux:*:*) - GUESS=powerpc64-unknown-linux-$LIBC - ;; - ppc:Linux:*:*) - GUESS=powerpc-unknown-linux-$LIBC - ;; - ppc64le:Linux:*:*) - GUESS=powerpc64le-unknown-linux-$LIBC - ;; - ppcle:Linux:*:*) - GUESS=powerpcle-unknown-linux-$LIBC - ;; - riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - s390:Linux:*:* | s390x:Linux:*:*) - GUESS=$UNAME_MACHINE-ibm-linux-$LIBC - ;; - sh64*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - sh*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - tile*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - vax:Linux:*:*) - GUESS=$UNAME_MACHINE-dec-linux-$LIBC - ;; - x86_64:Linux:*:*) - set_cc_for_build - LIBCABI=$LIBC - if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_X32 >/dev/null - then - LIBCABI=${LIBC}x32 - fi - fi - GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI - ;; - xtensa*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - GUESS=i386-sequent-sysv4 - ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION - ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - GUESS=$UNAME_MACHINE-pc-os2-emx - ;; - i*86:XTS-300:*:STOP) - GUESS=$UNAME_MACHINE-unknown-stop - ;; - i*86:atheos:*:*) - GUESS=$UNAME_MACHINE-unknown-atheos - ;; - i*86:syllable:*:*) - GUESS=$UNAME_MACHINE-pc-syllable - ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - GUESS=i386-unknown-lynxos$UNAME_RELEASE - ;; - i*86:*DOS:*:*) - GUESS=$UNAME_MACHINE-pc-msdosdjgpp - ;; - i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL - else - GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL - fi - ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL - else - GUESS=$UNAME_MACHINE-pc-sysv32 - fi - ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configure will decide that - # this is a cross-build. - GUESS=i586-pc-msdosdjgpp - ;; - Intel:Mach:3*:*) - GUESS=i386-pc-mach3 - ;; - paragon:*:*:*) - GUESS=i860-intel-osf1 - ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 - fi - ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - GUESS=m68010-convergent-sysv - ;; - mc68k:UNIX:SYSTEM5:3.51m) - GUESS=m68k-convergent-sysv - ;; - M680?0:D-NIX:5.3:*) - GUESS=m68k-diab-dnix - ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - GUESS=m68k-unknown-lynxos$UNAME_RELEASE - ;; - mc68030:UNIX_System_V:4.*:*) - GUESS=m68k-atari-sysv4 - ;; - TSUNAMI:LynxOS:2.*:*) - GUESS=sparc-unknown-lynxos$UNAME_RELEASE - ;; - rs6000:LynxOS:2.*:*) - GUESS=rs6000-unknown-lynxos$UNAME_RELEASE - ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - GUESS=powerpc-unknown-lynxos$UNAME_RELEASE - ;; - SM[BE]S:UNIX_SV:*:*) - GUESS=mips-dde-sysv$UNAME_RELEASE - ;; - RM*:ReliantUNIX-*:*:*) - GUESS=mips-sni-sysv4 - ;; - RM*:SINIX-*:*:*) - GUESS=mips-sni-sysv4 - ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - GUESS=$UNAME_MACHINE-sni-sysv4 - else - GUESS=ns32k-sni-sysv - fi - ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - GUESS=i586-unisys-sysv4 - ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - GUESS=hppa1.1-stratus-sysv4 - ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - GUESS=i860-stratus-sysv4 - ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - GUESS=$UNAME_MACHINE-stratus-vos - ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - GUESS=hppa1.1-stratus-vos - ;; - mc68*:A/UX:*:*) - GUESS=m68k-apple-aux$UNAME_RELEASE - ;; - news*:NEWS-OS:6*:*) - GUESS=mips-sony-newsos6 - ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if test -d /usr/nec; then - GUESS=mips-nec-sysv$UNAME_RELEASE - else - GUESS=mips-unknown-sysv$UNAME_RELEASE - fi - ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - GUESS=powerpc-be-beos - ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - GUESS=powerpc-apple-beos - ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - GUESS=i586-pc-beos - ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - GUESS=i586-pc-haiku - ;; - x86_64:Haiku:*:*) - GUESS=x86_64-unknown-haiku - ;; - SX-4:SUPER-UX:*:*) - GUESS=sx4-nec-superux$UNAME_RELEASE - ;; - SX-5:SUPER-UX:*:*) - GUESS=sx5-nec-superux$UNAME_RELEASE - ;; - SX-6:SUPER-UX:*:*) - GUESS=sx6-nec-superux$UNAME_RELEASE - ;; - SX-7:SUPER-UX:*:*) - GUESS=sx7-nec-superux$UNAME_RELEASE - ;; - SX-8:SUPER-UX:*:*) - GUESS=sx8-nec-superux$UNAME_RELEASE - ;; - SX-8R:SUPER-UX:*:*) - GUESS=sx8r-nec-superux$UNAME_RELEASE - ;; - SX-ACE:SUPER-UX:*:*) - GUESS=sxace-nec-superux$UNAME_RELEASE - ;; - Power*:Rhapsody:*:*) - GUESS=powerpc-apple-rhapsody$UNAME_RELEASE - ;; - *:Rhapsody:*:*) - GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE - ;; - arm64:Darwin:*:*) - GUESS=aarch64-apple-darwin$UNAME_RELEASE - ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - if command -v xcode-select > /dev/null 2> /dev/null && \ - ! xcode-select --print-path > /dev/null 2> /dev/null ; then - # Avoid executing cc if there is no toolchain installed as - # cc will be a stub that puts up a graphical alert - # prompting the user to install developer tools. - CC_FOR_BUILD=no_compiler_found - else - set_cc_for_build - fi - if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # uname -m returns i386 or x86_64 - UNAME_PROCESSOR=$UNAME_MACHINE - fi - GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE - ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = x86; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE - ;; - *:QNX:*:4*) - GUESS=i386-pc-qnx - ;; - NEO-*:NONSTOP_KERNEL:*:*) - GUESS=neo-tandem-nsk$UNAME_RELEASE - ;; - NSE-*:NONSTOP_KERNEL:*:*) - GUESS=nse-tandem-nsk$UNAME_RELEASE - ;; - NSR-*:NONSTOP_KERNEL:*:*) - GUESS=nsr-tandem-nsk$UNAME_RELEASE - ;; - NSV-*:NONSTOP_KERNEL:*:*) - GUESS=nsv-tandem-nsk$UNAME_RELEASE - ;; - NSX-*:NONSTOP_KERNEL:*:*) - GUESS=nsx-tandem-nsk$UNAME_RELEASE - ;; - *:NonStop-UX:*:*) - GUESS=mips-compaq-nonstopux - ;; - BS2000:POSIX*:*:*) - GUESS=bs2000-siemens-sysv - ;; - DS/*:UNIX_System_V:*:*) - GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE - ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "${cputype-}" = 386; then - UNAME_MACHINE=i386 - elif test "x${cputype-}" != x; then - UNAME_MACHINE=$cputype - fi - GUESS=$UNAME_MACHINE-unknown-plan9 - ;; - *:TOPS-10:*:*) - GUESS=pdp10-unknown-tops10 - ;; - *:TENEX:*:*) - GUESS=pdp10-unknown-tenex - ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - GUESS=pdp10-dec-tops20 - ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - GUESS=pdp10-xkl-tops20 - ;; - *:TOPS-20:*:*) - GUESS=pdp10-unknown-tops20 - ;; - *:ITS:*:*) - GUESS=pdp10-unknown-its - ;; - SEI:*:*:SEIUX) - GUESS=mips-sei-seiux$UNAME_RELEASE - ;; - *:DragonFly:*:*) - DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL - ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case $UNAME_MACHINE in - A*) GUESS=alpha-dec-vms ;; - I*) GUESS=ia64-dec-vms ;; - V*) GUESS=vax-dec-vms ;; - esac ;; - *:XENIX:*:SysV) - GUESS=i386-pc-xenix - ;; - i*86:skyos:*:*) - SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` - GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL - ;; - i*86:rdos:*:*) - GUESS=$UNAME_MACHINE-pc-rdos - ;; - *:AROS:*:*) - GUESS=$UNAME_MACHINE-unknown-aros - ;; - x86_64:VMkernel:*:*) - GUESS=$UNAME_MACHINE-unknown-esx - ;; - amd64:Isilon\ OneFS:*:*) - GUESS=x86_64-unknown-onefs - ;; - *:Unleashed:*:*) - GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE - ;; -esac - -# Do we have a guess based on uname results? -if test "x$GUESS" != x; then - echo "$GUESS" - exit -fi - -# No uname command or uname output not recognized. -set_cc_for_build -cat > "$dummy.c" < -#include -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#include -#if defined(_SIZE_T_) || defined(SIGLOST) -#include -#endif -#endif -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); -#endif - -#if defined (vax) -#if !defined (ultrix) -#include -#if defined (BSD) -#if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -#else -#if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#endif -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#else -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname un; - uname (&un); - printf ("vax-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname *un; - uname (&un); - printf ("mips-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("mips-dec-ultrix\n"); exit (0); -#endif -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. -test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } - -echo "$0: unable to guess system type" >&2 - -case $UNAME_MACHINE:$UNAME_SYSTEM in - mips:Linux | mips64:Linux) - # If we got here on MIPS GNU/Linux, output extra information. - cat >&2 <&2 <&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = "$UNAME_MACHINE" -UNAME_RELEASE = "$UNAME_RELEASE" -UNAME_SYSTEM = "$UNAME_SYSTEM" -UNAME_VERSION = "$UNAME_VERSION" -EOF -fi - -exit 1 - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/thirdparty/jpeg-9e/config.log b/thirdparty/jpeg-9e/config.log deleted file mode 100644 index cb44440..0000000 --- a/thirdparty/jpeg-9e/config.log +++ /dev/null @@ -1,856 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by libjpeg configure 9.5.0, which was -generated by GNU Autoconf 2.71. Invocation command line was - - $ ./configure --prefix=/home/scott/code/gui/installed/linux --disable-shared - -## --------- ## -## Platform. ## -## --------- ## - -hostname = kpdev -uname -m = x86_64 -uname -r = 5.14.0-1032-oem -uname -s = Linux -uname -v = #35-Ubuntu SMP Thu Mar 31 12:49:29 UTC 2022 - -/usr/bin/uname -p = x86_64 -/bin/uname -X = unknown - -/bin/arch = x86_64 -/usr/bin/arch -k = unknown -/usr/convex/getsysinfo = unknown -/usr/bin/hostinfo = unknown -/bin/machine = unknown -/usr/bin/oslevel = unknown -/bin/universe = unknown - -PATH: /home/scott/opt/bin/ -PATH: /home/scott/joey/sdks/IIgs/ -PATH: /home/scott/.local/bin/ -PATH: /home/scott/bin/ -PATH: /usr/local/sbin/ -PATH: /usr/local/bin/ -PATH: /usr/sbin/ -PATH: /usr/bin/ -PATH: /sbin/ -PATH: /bin/ -PATH: /usr/games/ -PATH: /usr/local/games/ -PATH: /snap/bin/ - - -## ----------- ## -## Core tests. ## -## ----------- ## - -configure:2455: looking for aux files: ltmain.sh ar-lib compile missing install-sh config.guess config.sub -configure:2468: trying ././ -configure:2497: ././ltmain.sh found -configure:2497: ././ar-lib found -configure:2497: ././compile found -configure:2497: ././missing found -configure:2479: ././install-sh found -configure:2497: ././config.guess found -configure:2497: ././config.sub found -configure:2627: checking build system type -configure:2642: result: x86_64-pc-linux-gnu -configure:2662: checking host system type -configure:2676: result: x86_64-pc-linux-gnu -configure:2696: checking target system type -configure:2710: result: x86_64-pc-linux-gnu -configure:2756: checking for a BSD-compatible install -configure:2829: result: /usr/bin/install -c -configure:2840: checking whether build environment is sane -configure:2895: result: yes -configure:3052: checking for a race-free mkdir -p -configure:3096: result: /usr/bin/mkdir -p -configure:3103: checking for gawk -configure:3124: found /usr/bin/gawk -configure:3135: result: gawk -configure:3146: checking whether make sets $(MAKE) -configure:3169: result: yes -configure:3199: checking whether make supports nested variables -configure:3217: result: yes -configure:3369: checking whether make supports nested variables -configure:3387: result: yes -configure:3403: checking whether to enable maintainer-specific portions of Makefiles -configure:3413: result: no -configure:3490: checking for gcc -configure:3511: found /usr/bin/gcc -configure:3522: result: gcc -configure:3875: checking for C compiler version -configure:3884: gcc --version >&5 -gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 -Copyright (C) 2019 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -configure:3895: $? = 0 -configure:3884: gcc -v >&5 -Using built-in specs. -COLLECT_GCC=gcc -COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -OFFLOAD_TARGET_NAMES=nvptx-none:hsa -OFFLOAD_TARGET_DEFAULT=1 -Target: x86_64-linux-gnu -Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu -Thread model: posix -gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) -configure:3895: $? = 0 -configure:3884: gcc -V >&5 -gcc: error: unrecognized command line option '-V' -gcc: fatal error: no input files -compilation terminated. -configure:3895: $? = 1 -configure:3884: gcc -qversion >&5 -gcc: error: unrecognized command line option '-qversion'; did you mean '--version'? -gcc: fatal error: no input files -compilation terminated. -configure:3895: $? = 1 -configure:3884: gcc -version >&5 -gcc: error: unrecognized command line option '-version' -gcc: fatal error: no input files -compilation terminated. -configure:3895: $? = 1 -configure:3915: checking whether the C compiler works -configure:3937: gcc conftest.c >&5 -configure:3941: $? = 0 -configure:3991: result: yes -configure:3994: checking for C compiler default output file name -configure:3996: result: a.out -configure:4002: checking for suffix of executables -configure:4009: gcc -o conftest conftest.c >&5 -configure:4013: $? = 0 -configure:4036: result: -configure:4058: checking whether we are cross compiling -configure:4066: gcc -o conftest conftest.c >&5 -configure:4070: $? = 0 -configure:4077: ./conftest -configure:4081: $? = 0 -configure:4069: result: no -configure:4074: checking for suffix of object files -configure:4097: gcc -c conftest.c >&5 -configure:4101: $? = 0 -configure:4123: result: o -configure:4127: checking whether the compiler supports GNU C -configure:4147: gcc -c conftest.c >&5 -configure:4147: $? = 0 -configure:4157: result: yes -configure:4168: checking whether gcc accepts -g -configure:4189: gcc -c -g conftest.c >&5 -configure:4189: $? = 0 -configure:4233: result: yes -configure:4253: checking for gcc option to enable C11 features -configure:4268: gcc -c -g -O2 conftest.c >&5 -configure:4268: $? = 0 -configure:4286: result: none needed -configure:4402: checking whether gcc understands -c and -o together -configure:4425: gcc -c conftest.c -o conftest2.o -configure:4428: $? = 0 -configure:4425: gcc -c conftest.c -o conftest2.o -configure:4428: $? = 0 -configure:4440: result: yes -configure:4460: checking whether make supports the include directive -configure:4475: make -f confmf.GNU && cat confinc.out -this is the am__doit target -configure:4478: $? = 0 -configure:4497: result: yes (GNU style) -configure:4523: checking dependency style of gcc -configure:4635: result: gcc3 -configure:4655: checking how to run the C preprocessor -configure:4681: gcc -E conftest.c -configure:4681: $? = 0 -configure:4696: gcc -E conftest.c -conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory - 11 | #include - | ^~~~~~~~~~~~~~~~~~ -compilation terminated. -configure:4696: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "libjpeg" -| #define PACKAGE_TARNAME "libjpeg" -| #define PACKAGE_VERSION "9.5.0" -| #define PACKAGE_STRING "libjpeg 9.5.0" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE_URL "" -| #define PACKAGE "libjpeg" -| #define VERSION "9.5.0" -| /* end confdefs.h. */ -| #include -configure:4723: result: gcc -E -configure:4737: gcc -E conftest.c -configure:4737: $? = 0 -configure:4752: gcc -E conftest.c -conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory - 11 | #include - | ^~~~~~~~~~~~~~~~~~ -compilation terminated. -configure:4752: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "libjpeg" -| #define PACKAGE_TARNAME "libjpeg" -| #define PACKAGE_VERSION "9.5.0" -| #define PACKAGE_STRING "libjpeg 9.5.0" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE_URL "" -| #define PACKAGE "libjpeg" -| #define VERSION "9.5.0" -| /* end confdefs.h. */ -| #include -configure:4783: checking whether make sets $(MAKE) -configure:4806: result: yes -configure:4815: checking whether ln -s works -configure:4819: result: yes -configure:4826: checking for grep that handles long lines and -e -configure:4890: result: /usr/bin/grep -configure:4895: checking for egrep -configure:4963: result: /usr/bin/grep -E -configure:5024: checking for ar -configure:5045: found /usr/bin/ar -configure:5056: result: ar -configure:5082: checking the archiver (ar) interface -configure:5099: gcc -c -g -O2 conftest.c >&5 -configure:5099: $? = 0 -configure:5102: ar cru libconftest.a conftest.o >&5 -ar: `u' modifier ignored since `D' is the default (see `U') -configure:5105: $? = 0 -configure:5104: result: ar -configure:5134: checking if LD -Wl,--version-script works -configure:5158: gcc -o conftest -g -O2 -Wl,--version-script=conftest.map conftest.c >&5 -configure:5158: $? = 0 -configure:5168: result: yes -configure:5181: checking for function prototypes -configure:5202: gcc -c -g -O2 conftest.c >&5 -configure:5202: $? = 0 -configure:5211: result: yes -configure:5235: checking for stdio.h -configure:5235: gcc -c -g -O2 conftest.c >&5 -configure:5235: $? = 0 -configure:5235: result: yes -configure:5235: checking for stdlib.h -configure:5235: gcc -c -g -O2 conftest.c >&5 -configure:5235: $? = 0 -configure:5235: result: yes -configure:5235: checking for string.h -configure:5235: gcc -c -g -O2 conftest.c >&5 -configure:5235: $? = 0 -configure:5235: result: yes -configure:5235: checking for inttypes.h -configure:5235: gcc -c -g -O2 conftest.c >&5 -configure:5235: $? = 0 -configure:5235: result: yes -configure:5235: checking for stdint.h -configure:5235: gcc -c -g -O2 conftest.c >&5 -configure:5235: $? = 0 -configure:5235: result: yes -configure:5235: checking for strings.h -configure:5235: gcc -c -g -O2 conftest.c >&5 -configure:5235: $? = 0 -configure:5235: result: yes -configure:5235: checking for sys/stat.h -configure:5235: gcc -c -g -O2 conftest.c >&5 -configure:5235: $? = 0 -configure:5235: result: yes -configure:5235: checking for sys/types.h -configure:5235: gcc -c -g -O2 conftest.c >&5 -configure:5235: $? = 0 -configure:5235: result: yes -configure:5235: checking for unistd.h -configure:5235: gcc -c -g -O2 conftest.c >&5 -configure:5235: $? = 0 -configure:5235: result: yes -configure:5260: checking for stddef.h -configure:5260: gcc -c -g -O2 conftest.c >&5 -configure:5260: $? = 0 -configure:5260: result: yes -configure:5266: checking for stdlib.h -configure:5266: result: yes -configure:5272: checking for locale.h -configure:5272: gcc -c -g -O2 conftest.c >&5 -configure:5272: $? = 0 -configure:5272: result: yes -configure:5279: checking for string.h -configure:5279: result: yes -configure:5292: checking for size_t -configure:5319: gcc -c -g -O2 conftest.c >&5 -configure:5319: $? = 0 -configure:5326: result: yes -configure:5364: checking for type unsigned char -configure:5377: gcc -c -g -O2 conftest.c >&5 -configure:5377: $? = 0 -configure:5379: result: yes -configure:5390: checking for type unsigned short -configure:5403: gcc -c -g -O2 conftest.c >&5 -configure:5403: $? = 0 -configure:5405: result: yes -configure:5416: checking for type void -configure:5450: gcc -c -g -O2 conftest.c >&5 -configure:5450: $? = 0 -configure:5452: result: yes -configure:5462: checking for an ANSI C-conforming const -configure:5529: gcc -c -g -O2 conftest.c >&5 -configure:5529: $? = 0 -configure:5537: result: yes -configure:5547: checking for inline -configure:5562: gcc -c -g -O2 conftest.c >&5 -configure:5562: $? = 0 -configure:5603: result: __inline__ -configure:5610: checking for broken incomplete types -configure:5625: gcc -c -g -O2 conftest.c >&5 -configure:5625: $? = 0 -configure:5627: result: ok -configure:5639: checking for short external names -configure:5655: gcc -o conftest -g -O2 conftest.c >&5 -configure:5655: $? = 0 -configure:5657: result: ok -configure:5670: checking to see if char is signed -configure:5708: gcc -o conftest -g -O2 conftest.c >&5 -configure:5708: $? = 0 -configure:5708: ./conftest -configure:5708: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "libjpeg" -| #define PACKAGE_TARNAME "libjpeg" -| #define PACKAGE_VERSION "9.5.0" -| #define PACKAGE_STRING "libjpeg 9.5.0" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE_URL "" -| #define PACKAGE "libjpeg" -| #define VERSION "9.5.0" -| #define HAVE_PROTOTYPES 1 -| #define HAVE_STDIO_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define STDC_HEADERS 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_UNSIGNED_CHAR 1 -| #define HAVE_UNSIGNED_SHORT 1 -| #define INLINE __inline__ -| /* end confdefs.h. */ -| -| #ifdef HAVE_STDLIB_H -| #include -| #endif -| #include -| #ifdef HAVE_PROTOTYPES -| int is_char_signed (int arg) -| #else -| int is_char_signed (arg) -| int arg; -| #endif -| { -| if (arg == 189) { /* expected result for unsigned char */ -| return 0; /* type char is unsigned */ -| } -| else if (arg != -67) { /* expected result for signed char */ -| printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n"); -| printf("I fear the JPEG software will not work at all.\n\n"); -| } -| return 1; /* assume char is signed otherwise */ -| } -| char signed_char_check = (char) (-67); -| int main() { -| exit(is_char_signed((int) signed_char_check)); -| } -configure:5716: result: yes -configure:5724: checking to see if right shift is signed -configure:5765: gcc -o conftest -g -O2 conftest.c >&5 -configure:5765: $? = 0 -configure:5765: ./conftest -configure:5765: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "libjpeg" -| #define PACKAGE_TARNAME "libjpeg" -| #define PACKAGE_VERSION "9.5.0" -| #define PACKAGE_STRING "libjpeg 9.5.0" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE_URL "" -| #define PACKAGE "libjpeg" -| #define VERSION "9.5.0" -| #define HAVE_PROTOTYPES 1 -| #define HAVE_STDIO_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define STDC_HEADERS 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_UNSIGNED_CHAR 1 -| #define HAVE_UNSIGNED_SHORT 1 -| #define INLINE __inline__ -| /* end confdefs.h. */ -| -| #ifdef HAVE_STDLIB_H -| #include -| #endif -| #include -| #ifdef HAVE_PROTOTYPES -| int is_shifting_signed (long arg) -| #else -| int is_shifting_signed (arg) -| long arg; -| #endif -| /* See whether right-shift on a long is signed or not. */ -| { -| long res = arg >> 4; -| -| if (res == -0x7F7E80CL) { /* expected result for signed shift */ -| return 1; /* right shift is signed */ -| } -| /* see if unsigned-shift hack will fix it. */ -| /* we can't just test exact value since it depends on width of long... */ -| res |= (~0L) << (32-4); -| if (res == -0x7F7E80CL) { /* expected result now? */ -| return 0; /* right shift is unsigned */ -| } -| printf("Right shift isn't acting as I expect it to.\n"); -| printf("I fear the JPEG software will not work at all.\n\n"); -| return 0; /* try it with unsigned anyway */ -| } -| int main() { -| exit(is_shifting_signed(-0x7F7E80B1L)); -| } -configure:5773: result: yes -configure:5781: checking to see if fopen accepts b spec -configure:5801: gcc -o conftest -g -O2 conftest.c >&5 -configure:5801: $? = 0 -configure:5801: ./conftest -configure:5801: $? = 0 -configure:5803: result: yes -configure:5865: checking how to print strings -configure:5892: result: printf -configure:5913: checking for a sed that does not truncate output -configure:5983: result: /usr/bin/sed -configure:6001: checking for fgrep -configure:6069: result: /usr/bin/grep -F -configure:6105: checking for ld used by gcc -configure:6173: result: /usr/bin/ld -configure:6180: checking if the linker (/usr/bin/ld) is GNU ld -configure:6196: result: yes -configure:6208: checking for BSD- or MS-compatible name lister (nm) -configure:6263: result: /usr/bin/nm -B -configure:6403: checking the name lister (/usr/bin/nm -B) interface -configure:6411: gcc -c -g -O2 conftest.c >&5 -configure:6414: /usr/bin/nm -B "conftest.o" -configure:6417: output -0000000000000000 B some_variable -configure:6418: result: BSD nm -configure:6422: checking the maximum length of command line arguments -configure:6554: result: 1572864 -configure:6602: checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format -configure:6643: result: func_convert_file_noop -configure:6650: checking how to convert x86_64-pc-linux-gnu file names to toolchain format -configure:6671: result: func_convert_file_noop -configure:6678: checking for /usr/bin/ld option to reload object files -configure:6686: result: -r -configure:6765: checking for objdump -configure:6786: found /usr/bin/objdump -configure:6797: result: objdump -configure:6826: checking how to recognize dependent libraries -configure:7027: result: pass_all -configure:7117: checking for dlltool -configure:7152: result: no -configure:7179: checking how to associate runtime and link libraries -configure:7207: result: printf %s\n -configure:7341: checking for archiver @FILE support -configure:7359: gcc -c -g -O2 conftest.c >&5 -configure:7359: $? = 0 -configure:7363: ar cru libconftest.a @conftest.lst >&5 -ar: `u' modifier ignored since `D' is the default (see `U') -configure:7366: $? = 0 -configure:7371: ar cru libconftest.a @conftest.lst >&5 -ar: `u' modifier ignored since `D' is the default (see `U') -ar: conftest.o: No such file or directory -configure:7374: $? = 1 -configure:7373: result: @ -configure:7436: checking for strip -configure:7457: found /usr/bin/strip -configure:7468: result: strip -configure:7545: checking for ranlib -configure:7566: found /usr/bin/ranlib -configure:7577: result: ranlib -configure:7679: checking command to parse /usr/bin/nm -B output from gcc object -configure:7833: gcc -c -g -O2 conftest.c >&5 -configure:7836: $? = 0 -configure:7840: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm -configure:7843: $? = 0 -configure:7909: gcc -o conftest -g -O2 conftest.c conftstm.o >&5 -configure:7912: $? = 0 -configure:7950: result: ok -configure:7997: checking for sysroot -configure:8028: result: no -configure:8035: checking for a working dd -configure:8079: result: /usr/bin/dd -configure:8083: checking how to truncate binary pipes -configure:8099: result: /usr/bin/dd bs=4096 count=1 -configure:8236: gcc -c -g -O2 conftest.c >&5 -configure:8239: $? = 0 -configure:8436: checking for mt -configure:8457: found /usr/bin/mt -configure:8468: result: mt -configure:8491: checking if mt is a manifest tool -configure:8498: mt '-?' -configure:8506: result: no -configure:9232: checking for dlfcn.h -configure:9232: gcc -c -g -O2 conftest.c >&5 -configure:9232: $? = 0 -configure:9232: result: yes -configure:9819: checking for objdir -configure:9835: result: .libs -configure:10095: checking if gcc supports -fno-rtti -fno-exceptions -configure:10114: gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5 -cc1: warning: command line option '-fno-rtti' is valid for C++/D/ObjC++ but not for C -configure:10118: $? = 0 -configure:10131: result: no -configure:10489: checking for gcc option to produce PIC -configure:10497: result: -fPIC -DPIC -configure:10505: checking if gcc PIC flag -fPIC -DPIC works -configure:10524: gcc -c -g -O2 -fPIC -DPIC -DPIC conftest.c >&5 -configure:10528: $? = 0 -configure:10541: result: yes -configure:10570: checking if gcc static flag -static works -configure:10599: result: yes -configure:10614: checking if gcc supports -c -o file.o -configure:10636: gcc -c -g -O2 -o out/conftest2.o conftest.c >&5 -configure:10640: $? = 0 -configure:10662: result: yes -configure:10670: checking if gcc supports -c -o file.o -configure:10718: result: yes -configure:10751: checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries -configure:12017: result: yes -configure:12258: checking dynamic linker characteristics -configure:12840: gcc -o conftest -g -O2 -Wl,-rpath -Wl,/foo conftest.c >&5 -configure:12840: $? = 0 -configure:13079: result: GNU/Linux ld.so -configure:13201: checking how to hardcode library paths into programs -configure:13226: result: immediate -configure:13778: checking whether stripping libraries is possible -configure:13783: result: yes -configure:13818: checking if libtool supports shared libraries -configure:13820: result: yes -configure:13823: checking whether to build shared libraries -configure:13848: result: no -configure:13851: checking whether to build static libraries -configure:13855: result: yes -configure:10751: checking libjpeg version number -configure:10761: result: 9.5.0 -configure:10867: checking that generated files are newer than configure -configure:10873: result: done -configure:10904: creating ./config.status - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by libjpeg config.status 9.5.0, which was -generated by GNU Autoconf 2.71. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status - -on kpdev - -config.status:1099: creating Makefile -config.status:1099: creating libjpeg.pc -config.status:1099: creating jconfig.h -config.status:1328: executing depfiles commands -config.status:1405: cd . && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles -make: Nothing to be done for 'am--depfiles'. -config.status:1410: $? = 0 -config.status:1328: executing libtool commands - -## ---------------- ## -## Cache variables. ## -## ---------------- ## - -ac_cv_build=x86_64-pc-linux-gnu -ac_cv_c_compiler_gnu=yes -ac_cv_c_const=yes -ac_cv_env_CC_set= -ac_cv_env_CC_value= -ac_cv_env_CFLAGS_set= -ac_cv_env_CFLAGS_value= -ac_cv_env_CPPFLAGS_set= -ac_cv_env_CPPFLAGS_value= -ac_cv_env_CPP_set= -ac_cv_env_CPP_value= -ac_cv_env_LDFLAGS_set= -ac_cv_env_LDFLAGS_value= -ac_cv_env_LIBS_set= -ac_cv_env_LIBS_value= -ac_cv_env_LT_SYS_LIBRARY_PATH_set= -ac_cv_env_LT_SYS_LIBRARY_PATH_value= -ac_cv_env_build_alias_set= -ac_cv_env_build_alias_value= -ac_cv_env_host_alias_set= -ac_cv_env_host_alias_value= -ac_cv_env_target_alias_set= -ac_cv_env_target_alias_value= -ac_cv_header_dlfcn_h=yes -ac_cv_header_inttypes_h=yes -ac_cv_header_locale_h=yes -ac_cv_header_stddef_h=yes -ac_cv_header_stdint_h=yes -ac_cv_header_stdio_h=yes -ac_cv_header_stdlib_h=yes -ac_cv_header_string_h=yes -ac_cv_header_strings_h=yes -ac_cv_header_sys_stat_h=yes -ac_cv_header_sys_types_h=yes -ac_cv_header_unistd_h=yes -ac_cv_host=x86_64-pc-linux-gnu -ac_cv_objext=o -ac_cv_path_EGREP='/usr/bin/grep -E' -ac_cv_path_FGREP='/usr/bin/grep -F' -ac_cv_path_GREP=/usr/bin/grep -ac_cv_path_SED=/usr/bin/sed -ac_cv_path_install='/usr/bin/install -c' -ac_cv_path_lt_DD=/usr/bin/dd -ac_cv_path_mkdir=/usr/bin/mkdir -ac_cv_prog_AWK=gawk -ac_cv_prog_CPP='gcc -E' -ac_cv_prog_ac_ct_AR=ar -ac_cv_prog_ac_ct_CC=gcc -ac_cv_prog_ac_ct_MANIFEST_TOOL=mt -ac_cv_prog_ac_ct_OBJDUMP=objdump -ac_cv_prog_ac_ct_RANLIB=ranlib -ac_cv_prog_ac_ct_STRIP=strip -ac_cv_prog_cc_c11= -ac_cv_prog_cc_g=yes -ac_cv_prog_cc_stdc= -ac_cv_prog_make_make_set=yes -ac_cv_target=x86_64-pc-linux-gnu -am_cv_CC_dependencies_compiler_type=gcc3 -am_cv_ar_interface=ar -am_cv_make_support_nested_variables=yes -am_cv_prog_cc_c_o=yes -ijg_cv_have_prototypes=yes -ijg_cv_inline=__inline__ -lt_cv_ar_at_file=@ -lt_cv_deplibs_check_method=pass_all -lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_ld_reload_flag=-r -lt_cv_nm_interface='BSD nm' -lt_cv_objdir=.libs -lt_cv_path_LD=/usr/bin/ld -lt_cv_path_NM='/usr/bin/nm -B' -lt_cv_path_mainfest_tool=no -lt_cv_prog_compiler_c_o=yes -lt_cv_prog_compiler_pic='-fPIC -DPIC' -lt_cv_prog_compiler_pic_works=yes -lt_cv_prog_compiler_rtti_exceptions=no -lt_cv_prog_compiler_static_works=yes -lt_cv_prog_gnu_ld=yes -lt_cv_sharedlib_from_linklib_cmd='printf %s\n' -lt_cv_shlibpath_overrides_runpath=yes -lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' -lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\''' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\''' -lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' -lt_cv_sys_global_symbol_to_import= -lt_cv_sys_max_cmd_len=1572864 -lt_cv_to_host_file_cmd=func_convert_file_noop -lt_cv_to_tool_file_cmd=func_convert_file_noop -lt_cv_truncate_bin='/usr/bin/dd bs=4096 count=1' - -## ----------------- ## -## Output variables. ## -## ----------------- ## - -ACLOCAL='${SHELL} '\''/home/scott/code/gui/thirdparty/jpeg-9e/missing'\'' aclocal-1.16' -AMDEPBACKSLASH='\' -AMDEP_FALSE='#' -AMDEP_TRUE='' -AMTAR='$${TAR-tar}' -AM_BACKSLASH='\' -AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -AM_DEFAULT_VERBOSITY='0' -AM_V='$(V)' -AR='ar' -AS='as' -AUTOCONF='${SHELL} '\''/home/scott/code/gui/thirdparty/jpeg-9e/missing'\'' autoconf' -AUTOHEADER='echo autoheader ignored' -AUTOMAKE='${SHELL} '\''/home/scott/code/gui/thirdparty/jpeg-9e/missing'\'' automake-1.16' -AWK='gawk' -CC='gcc' -CCDEPMODE='depmode=gcc3' -CFLAGS='-g -O2' -CPP='gcc -E' -CPPFLAGS='' -CSCOPE='cscope' -CTAGS='ctags' -CYGPATH_W='echo' -DEFS='-DHAVE_CONFIG_H' -DEPDIR='.deps' -DLLTOOL='false' -DSYMUTIL='' -DUMPBIN='' -ECHO_C='' -ECHO_N='-n' -ECHO_T='' -EGREP='/usr/bin/grep -E' -ETAGS='etags' -EXEEXT='' -FGREP='/usr/bin/grep -F' -GREP='/usr/bin/grep' -HAVE_LD_VERSION_SCRIPT_FALSE='#' -HAVE_LD_VERSION_SCRIPT_TRUE='' -INSTALL_DATA='${INSTALL} -m 644' -INSTALL_PROGRAM='${INSTALL}' -INSTALL_SCRIPT='${INSTALL}' -INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' -JPEG_LIB_VERSION='14:0:5' -JPEG_LIB_VERSION_MAJOR='9' -JPEG_LIB_VERSION_MINOR='5' -LD='/usr/bin/ld -m elf_x86_64' -LDFLAGS='' -LIBOBJS='' -LIBS='' -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -LIPO='' -LN_S='ln -s' -LTLIBOBJS='' -LT_SYS_LIBRARY_PATH='' -MAINT='#' -MAINTAINER_MODE_FALSE='' -MAINTAINER_MODE_TRUE='#' -MAKEINFO='${SHELL} '\''/home/scott/code/gui/thirdparty/jpeg-9e/missing'\'' makeinfo' -MANIFEST_TOOL=':' -MEMORYMGR='jmemnobs' -MKDIR_P='/usr/bin/mkdir -p' -NM='/usr/bin/nm -B' -NMEDIT='' -OBJDUMP='objdump' -OBJEXT='o' -OTOOL64='' -OTOOL='' -PACKAGE='libjpeg' -PACKAGE_BUGREPORT='' -PACKAGE_NAME='libjpeg' -PACKAGE_STRING='libjpeg 9.5.0' -PACKAGE_TARNAME='libjpeg' -PACKAGE_URL='' -PACKAGE_VERSION='9.5.0' -PATH_SEPARATOR=':' -RANLIB='ranlib' -SED='/usr/bin/sed' -SET_MAKE='' -SHELL='/bin/bash' -STRIP='strip' -VERSION='9.5.0' -ac_ct_AR='ar' -ac_ct_CC='gcc' -ac_ct_DUMPBIN='' -am__EXEEXT_FALSE='' -am__EXEEXT_TRUE='#' -am__fastdepCC_FALSE='#' -am__fastdepCC_TRUE='' -am__include='include' -am__isrc='' -am__leading_dot='.' -am__nodep='_no' -am__quote='' -am__tar='$${TAR-tar} chof - "$$tardir"' -am__untar='$${TAR-tar} xf -' -bindir='${exec_prefix}/bin' -build='x86_64-pc-linux-gnu' -build_alias='' -build_cpu='x86_64' -build_os='linux-gnu' -build_vendor='pc' -datadir='${datarootdir}' -datarootdir='${prefix}/share' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -dvidir='${docdir}' -exec_prefix='${prefix}' -host='x86_64-pc-linux-gnu' -host_alias='' -host_cpu='x86_64' -host_os='linux-gnu' -host_vendor='pc' -htmldir='${docdir}' -includedir='${prefix}/include' -infodir='${datarootdir}/info' -install_sh='${SHELL} /home/scott/code/gui/thirdparty/jpeg-9e/install-sh' -libdir='${exec_prefix}/lib' -libexecdir='${exec_prefix}/libexec' -localedir='${datarootdir}/locale' -localstatedir='${prefix}/var' -mandir='${datarootdir}/man' -mkdir_p='$(MKDIR_P)' -oldincludedir='/usr/include' -pdfdir='${docdir}' -prefix='/home/scott/code/gui/installed/linux' -program_transform_name='s,x,x,' -psdir='${docdir}' -runstatedir='${localstatedir}/run' -sbindir='${exec_prefix}/sbin' -sharedstatedir='${prefix}/com' -sysconfdir='${prefix}/etc' -target='x86_64-pc-linux-gnu' -target_alias='' -target_cpu='x86_64' -target_os='linux-gnu' -target_vendor='pc' - -## ----------- ## -## confdefs.h. ## -## ----------- ## - -/* confdefs.h */ -#define PACKAGE_NAME "libjpeg" -#define PACKAGE_TARNAME "libjpeg" -#define PACKAGE_VERSION "9.5.0" -#define PACKAGE_STRING "libjpeg 9.5.0" -#define PACKAGE_BUGREPORT "" -#define PACKAGE_URL "" -#define PACKAGE "libjpeg" -#define VERSION "9.5.0" -#define HAVE_PROTOTYPES 1 -#define HAVE_STDIO_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_UNISTD_H 1 -#define STDC_HEADERS 1 -#define HAVE_STDDEF_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_LOCALE_H 1 -#define HAVE_UNSIGNED_CHAR 1 -#define HAVE_UNSIGNED_SHORT 1 -#define INLINE __inline__ -#define HAVE_DLFCN_H 1 -#define LT_OBJDIR ".libs/" - -configure: exit 0 diff --git a/thirdparty/jpeg-9e/config.status b/thirdparty/jpeg-9e/config.status deleted file mode 100755 index 174b950..0000000 --- a/thirdparty/jpeg-9e/config.status +++ /dev/null @@ -1,1987 +0,0 @@ -#! /bin/bash -# Generated by configure. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=${CONFIG_SHELL-/bin/bash} -export SHELL -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. -as_nl=' -' -export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi - -# The user is always right. -if ${PATH_SEPARATOR+false} :; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - printf "%s\n" "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else $as_nop - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else $as_nop - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by libjpeg $as_me 9.5.0, which was -generated by GNU Autoconf 2.71. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -# Files that config.status was made for. -config_files=" Makefile libjpeg.pc" -config_headers=" jconfig.h:jconfig.cfg" -config_commands=" depfiles libtool" - -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to the package provider." - -ac_cs_config='--prefix=/home/scott/code/gui/installed/linux --disable-shared' -ac_cs_version="\ -libjpeg config.status 9.5.0 -configured by ./configure, generated by GNU Autoconf 2.71, - with options \"$ac_cs_config\" - -Copyright (C) 2021 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='/home/scott/code/gui/thirdparty/jpeg-9e' -srcdir='.' -INSTALL='/usr/bin/install -c' -MKDIR_P='/usr/bin/mkdir -p' -AWK='gawk' -test -n "$AWK" || AWK=awk -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -if $ac_cs_recheck; then - set X /bin/bash './configure' '--prefix=/home/scott/code/gui/installed/linux' '--disable-shared' $ac_configure_extra_args --no-create --no-recursion - shift - \printf "%s\n" "running CONFIG_SHELL=/bin/bash $*" >&6 - CONFIG_SHELL='/bin/bash' - export CONFIG_SHELL - exec "$@" -fi - -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - printf "%s\n" "$ac_log" -} >&5 - -# -# INIT-COMMANDS -# -AMDEP_TRUE="" MAKE="make" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -double_quote_subst='s/\(["`\\]\)/\\\1/g' -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -macro_version='2.4.6' -macro_revision='2.4.6' -AS='as' -DLLTOOL='false' -OBJDUMP='objdump' -enable_shared='no' -enable_static='yes' -pic_mode='default' -enable_fast_install='needless' -shared_archive_member_spec='' -SHELL='/bin/bash' -ECHO='printf %s\n' -PATH_SEPARATOR=':' -host_alias='' -host='x86_64-pc-linux-gnu' -host_os='linux-gnu' -build_alias='' -build='x86_64-pc-linux-gnu' -build_os='linux-gnu' -SED='/usr/bin/sed' -Xsed='/usr/bin/sed -e 1s/^X//' -GREP='/usr/bin/grep' -EGREP='/usr/bin/grep -E' -FGREP='/usr/bin/grep -F' -LD='/usr/bin/ld -m elf_x86_64' -NM='/usr/bin/nm -B' -LN_S='ln -s' -max_cmd_len='1572864' -ac_objext='o' -exeext='' -lt_unset='unset' -lt_SP2NL='tr \040 \012' -lt_NL2SP='tr \015\012 \040\040' -lt_cv_to_host_file_cmd='func_convert_file_noop' -lt_cv_to_tool_file_cmd='func_convert_file_noop' -reload_flag=' -r' -reload_cmds='$LD$reload_flag -o $output$reload_objs' -deplibs_check_method='pass_all' -file_magic_cmd='$MAGIC_CMD' -file_magic_glob='' -want_nocaseglob='no' -sharedlib_from_linklib_cmd='printf %s\n' -AR='ar' -AR_FLAGS='cru' -archiver_list_spec='@' -STRIP='strip' -RANLIB='ranlib' -old_postinstall_cmds='chmod 644 $oldlib~$RANLIB $tool_oldlib' -old_postuninstall_cmds='' -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib' -lock_old_archive_extraction='no' -CC='gcc' -CFLAGS='-g -O2' -compiler='gcc' -GCC='yes' -lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' -lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' -lt_cv_sys_global_symbol_to_import='' -lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\''' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\''' -lt_cv_nm_interface='BSD nm' -nm_file_list_spec='@' -lt_sysroot='' -lt_cv_truncate_bin='/usr/bin/dd bs=4096 count=1' -objdir='.libs' -MAGIC_CMD='file' -lt_prog_compiler_no_builtin_flag=' -fno-builtin' -lt_prog_compiler_pic=' -fPIC -DPIC' -lt_prog_compiler_wl='-Wl,' -lt_prog_compiler_static='-static' -lt_cv_prog_compiler_c_o='yes' -need_locks='no' -MANIFEST_TOOL=':' -DSYMUTIL='' -NMEDIT='' -LIPO='' -OTOOL='' -OTOOL64='' -libext='a' -shrext_cmds='.so' -extract_expsyms_cmds='' -archive_cmds_need_lc='yes' -enable_shared_with_static_runtimes='no' -export_dynamic_flag_spec='$wl--export-dynamic' -whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' -compiler_needs_object='no' -old_archive_from_new_cmds='' -old_archive_from_expsyms_cmds='' -archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' -module_cmds='' -module_expsym_cmds='' -with_gnu_ld='yes' -allow_undefined_flag='' -no_undefined_flag='' -hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' -hardcode_libdir_separator='' -hardcode_direct='no' -hardcode_direct_absolute='no' -hardcode_minus_L='no' -hardcode_shlibpath_var='unsupported' -hardcode_automatic='no' -inherit_rpath='no' -link_all_deplibs='unknown' -always_export_symbols='no' -export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' -include_expsyms='' -prelink_cmds='' -postlink_cmds='' -file_list_spec='' -variables_saved_for_relink='PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH' -need_lib_prefix='no' -need_version='no' -version_type='linux' -runpath_var='LD_RUN_PATH' -shlibpath_var='LD_LIBRARY_PATH' -shlibpath_overrides_runpath='yes' -libname_spec='lib$name' -library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -soname_spec='$libname$release$shared_ext$major' -install_override_mode='' -postinstall_cmds='' -postuninstall_cmds='' -finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -finish_eval='' -hardcode_into_libs='yes' -sys_lib_search_path_spec='/usr/lib/gcc/x86_64-linux-gnu/9 /usr/lib/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib ' -configure_time_dlsearch_path='/lib /usr/lib /usr/lib/x86_64-linux-gnu/libfakeroot /usr/local/lib/i386-linux-gnu /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /usr/local/lib/i686-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/local/lib /usr/local/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu /lib32 /usr/lib32 /libx32 /usr/libx32 ' -configure_time_lt_sys_library_path='' -hardcode_action='immediate' -enable_dlopen='unknown' -enable_dlopen_self='unknown' -enable_dlopen_self_static='unknown' -old_striplib='strip --strip-debug' -striplib='strip --strip-unneeded' - -LTCC='gcc' -LTCFLAGS='-g -O2' -compiler='gcc' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in AS DLLTOOL OBJDUMP SHELL ECHO PATH_SEPARATOR SED GREP EGREP FGREP LD NM LN_S lt_SP2NL lt_NL2SP reload_flag deplibs_check_method file_magic_cmd file_magic_glob want_nocaseglob sharedlib_from_linklib_cmd AR AR_FLAGS archiver_list_spec STRIP RANLIB CC CFLAGS compiler lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl lt_cv_sys_global_symbol_to_import lt_cv_sys_global_symbol_to_c_name_address lt_cv_sys_global_symbol_to_c_name_address_lib_prefix lt_cv_nm_interface nm_file_list_spec lt_cv_truncate_bin lt_prog_compiler_no_builtin_flag lt_prog_compiler_pic lt_prog_compiler_wl lt_prog_compiler_static lt_cv_prog_compiler_c_o need_locks MANIFEST_TOOL DSYMUTIL NMEDIT LIPO OTOOL OTOOL64 shrext_cmds export_dynamic_flag_spec whole_archive_flag_spec compiler_needs_object with_gnu_ld allow_undefined_flag no_undefined_flag hardcode_libdir_flag_spec hardcode_libdir_separator exclude_expsyms include_expsyms file_list_spec variables_saved_for_relink libname_spec library_names_spec soname_spec install_override_mode finish_eval old_striplib striplib; do - case `eval \\$ECHO \\""\\$$var"\\"` in - *[\\\`\"\$]*) - eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED \"\$sed_quote_subst\"\`\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_$var=\\\"\$$var\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds old_postinstall_cmds old_postuninstall_cmds old_archive_cmds extract_expsyms_cmds old_archive_from_new_cmds old_archive_from_expsyms_cmds archive_cmds archive_expsym_cmds module_cmds module_expsym_cmds export_symbols_cmds prelink_cmds postlink_cmds postinstall_cmds postuninstall_cmds finish_cmds sys_lib_search_path_spec configure_time_dlsearch_path configure_time_lt_sys_library_path; do - case `eval \\$ECHO \\""\\$$var"\\"` in - *[\\\`\"\$]*) - eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_$var=\\\"\$$var\\\"" - ;; - esac -done - -ac_aux_dir='././' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='libjpeg' - VERSION='9.5.0' - RM='rm -f' - ofile='libtool' - - - - - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "jconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS jconfig.h:jconfig.cfg" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "libjpeg.pc") CONFIG_FILES="$CONFIG_FILES libjpeg.pc" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers - test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && -S["am__EXEEXT_FALSE"]="" -S["am__EXEEXT_TRUE"]="#" -S["LTLIBOBJS"]="" -S["LIBOBJS"]="" -S["JPEG_LIB_VERSION_MINOR"]="5" -S["JPEG_LIB_VERSION_MAJOR"]="9" -S["JPEG_LIB_VERSION"]="14:0:5" -S["MEMORYMGR"]="jmemnobs" -S["LT_SYS_LIBRARY_PATH"]="" -S["OTOOL64"]="" -S["OTOOL"]="" -S["LIPO"]="" -S["NMEDIT"]="" -S["DSYMUTIL"]="" -S["MANIFEST_TOOL"]=":" -S["RANLIB"]="ranlib" -S["NM"]="/usr/bin/nm -B" -S["ac_ct_DUMPBIN"]="" -S["DUMPBIN"]="" -S["LD"]="/usr/bin/ld -m elf_x86_64" -S["FGREP"]="/usr/bin/grep -F" -S["SED"]="/usr/bin/sed" -S["LIBTOOL"]="$(SHELL) $(top_builddir)/libtool" -S["OBJDUMP"]="objdump" -S["DLLTOOL"]="false" -S["AS"]="as" -S["HAVE_LD_VERSION_SCRIPT_FALSE"]="#" -S["HAVE_LD_VERSION_SCRIPT_TRUE"]="" -S["ac_ct_AR"]="ar" -S["AR"]="ar" -S["EGREP"]="/usr/bin/grep -E" -S["GREP"]="/usr/bin/grep" -S["LN_S"]="ln -s" -S["CPP"]="gcc -E" -S["am__fastdepCC_FALSE"]="#" -S["am__fastdepCC_TRUE"]="" -S["CCDEPMODE"]="depmode=gcc3" -S["am__nodep"]="_no" -S["AMDEPBACKSLASH"]="\\" -S["AMDEP_FALSE"]="#" -S["AMDEP_TRUE"]="" -S["am__include"]="include" -S["DEPDIR"]=".deps" -S["OBJEXT"]="o" -S["EXEEXT"]="" -S["ac_ct_CC"]="gcc" -S["CPPFLAGS"]="" -S["LDFLAGS"]="" -S["CFLAGS"]="-g -O2" -S["CC"]="gcc" -S["MAINT"]="#" -S["MAINTAINER_MODE_FALSE"]="" -S["MAINTAINER_MODE_TRUE"]="#" -S["AM_BACKSLASH"]="\\" -S["AM_DEFAULT_VERBOSITY"]="0" -S["AM_DEFAULT_V"]="$(AM_DEFAULT_VERBOSITY)" -S["AM_V"]="$(V)" -S["CSCOPE"]="cscope" -S["ETAGS"]="etags" -S["CTAGS"]="ctags" -S["am__untar"]="$${TAR-tar} xf -" -S["am__tar"]="$${TAR-tar} chof - \"$$tardir\"" -S["AMTAR"]="$${TAR-tar}" -S["am__leading_dot"]="." -S["SET_MAKE"]="" -S["AWK"]="gawk" -S["mkdir_p"]="$(MKDIR_P)" -S["MKDIR_P"]="/usr/bin/mkdir -p" -S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s" -S["STRIP"]="strip" -S["install_sh"]="${SHELL} /home/scott/code/gui/thirdparty/jpeg-9e/install-sh" -S["MAKEINFO"]="${SHELL} '/home/scott/code/gui/thirdparty/jpeg-9e/missing' makeinfo" -S["AUTOHEADER"]="echo autoheader ignored" -S["AUTOMAKE"]="${SHELL} '/home/scott/code/gui/thirdparty/jpeg-9e/missing' automake-1.16" -S["AUTOCONF"]="${SHELL} '/home/scott/code/gui/thirdparty/jpeg-9e/missing' autoconf" -S["ACLOCAL"]="${SHELL} '/home/scott/code/gui/thirdparty/jpeg-9e/missing' aclocal-1.16" -S["VERSION"]="9.5.0" -S["PACKAGE"]="libjpeg" -S["CYGPATH_W"]="echo" -S["am__isrc"]="" -S["INSTALL_DATA"]="${INSTALL} -m 644" -S["INSTALL_SCRIPT"]="${INSTALL}" -S["INSTALL_PROGRAM"]="${INSTALL}" -S["target_os"]="linux-gnu" -S["target_vendor"]="pc" -S["target_cpu"]="x86_64" -S["target"]="x86_64-pc-linux-gnu" -S["host_os"]="linux-gnu" -S["host_vendor"]="pc" -S["host_cpu"]="x86_64" -S["host"]="x86_64-pc-linux-gnu" -S["build_os"]="linux-gnu" -S["build_vendor"]="pc" -S["build_cpu"]="x86_64" -S["build"]="x86_64-pc-linux-gnu" -S["target_alias"]="" -S["host_alias"]="" -S["build_alias"]="" -S["LIBS"]="" -S["ECHO_T"]="" -S["ECHO_N"]="-n" -S["ECHO_C"]="" -S["DEFS"]="-DHAVE_CONFIG_H" -S["mandir"]="${datarootdir}/man" -S["localedir"]="${datarootdir}/locale" -S["libdir"]="${exec_prefix}/lib" -S["psdir"]="${docdir}" -S["pdfdir"]="${docdir}" -S["dvidir"]="${docdir}" -S["htmldir"]="${docdir}" -S["infodir"]="${datarootdir}/info" -S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" -S["oldincludedir"]="/usr/include" -S["includedir"]="${prefix}/include" -S["runstatedir"]="${localstatedir}/run" -S["localstatedir"]="${prefix}/var" -S["sharedstatedir"]="${prefix}/com" -S["sysconfdir"]="${prefix}/etc" -S["datadir"]="${datarootdir}" -S["datarootdir"]="${prefix}/share" -S["libexecdir"]="${exec_prefix}/libexec" -S["sbindir"]="${exec_prefix}/sbin" -S["bindir"]="${exec_prefix}/bin" -S["program_transform_name"]="s,x,x," -S["prefix"]="/home/scott/code/gui/installed/linux" -S["exec_prefix"]="${prefix}" -S["PACKAGE_URL"]="" -S["PACKAGE_BUGREPORT"]="" -S["PACKAGE_STRING"]="libjpeg 9.5.0" -S["PACKAGE_VERSION"]="9.5.0" -S["PACKAGE_TARNAME"]="libjpeg" -S["PACKAGE_NAME"]="libjpeg" -S["PATH_SEPARATOR"]=":" -S["SHELL"]="/bin/bash" -S["am__quote"]="" -_ACAWK -cat >>"$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -D["PACKAGE_NAME"]=" \"libjpeg\"" -D["PACKAGE_TARNAME"]=" \"libjpeg\"" -D["PACKAGE_VERSION"]=" \"9.5.0\"" -D["PACKAGE_STRING"]=" \"libjpeg 9.5.0\"" -D["PACKAGE_BUGREPORT"]=" \"\"" -D["PACKAGE_URL"]=" \"\"" -D["PACKAGE"]=" \"libjpeg\"" -D["VERSION"]=" \"9.5.0\"" -D["HAVE_PROTOTYPES"]=" 1" -D["HAVE_STDIO_H"]=" 1" -D["HAVE_STDLIB_H"]=" 1" -D["HAVE_STRING_H"]=" 1" -D["HAVE_INTTYPES_H"]=" 1" -D["HAVE_STDINT_H"]=" 1" -D["HAVE_STRINGS_H"]=" 1" -D["HAVE_SYS_STAT_H"]=" 1" -D["HAVE_SYS_TYPES_H"]=" 1" -D["HAVE_UNISTD_H"]=" 1" -D["STDC_HEADERS"]=" 1" -D["HAVE_STDDEF_H"]=" 1" -D["HAVE_STDLIB_H"]=" 1" -D["HAVE_LOCALE_H"]=" 1" -D["HAVE_UNSIGNED_CHAR"]=" 1" -D["HAVE_UNSIGNED_SHORT"]=" 1" -D["INLINE"]=" __inline__" -D["HAVE_DLFCN_H"]=" 1" -D["LT_OBJDIR"]=" \".libs/\"" - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { - line = $ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} - ac_datarootdir_hack=' - s&@datadir@&${datarootdir}&g - s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g - s&@infodir@&${datarootdir}/info&g - s&@localedir@&${datarootdir}/locale&g - s&@mandir@&${datarootdir}/man&g - s&\${datarootdir}&${prefix}/share&g' ;; -esac -ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -} - -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - printf "%s\n" "/* $configure_input */" >&1 \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - printf "%s\n" "/* $configure_input */" >&1 \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -printf "%s\n" "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - case $CONFIG_FILES in #( - *\'*) : - eval set x "$CONFIG_FILES" ;; #( - *) : - set x $CONFIG_FILES ;; #( - *) : - ;; -esac - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`$as_dirname -- "$am_mf" || -$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$am_mf" : 'X\(//\)[^/]' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$am_mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - am_filepart=`$as_basename -- "$am_mf" || -$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$am_mf" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { echo "$as_me:$LINENO: cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles" >&5 - (cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } || am_rc=$? - done - if test $am_rc -ne 0; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE=\"gmake\" (or whatever is - necessary). You can also try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). -See \`config.log' for more details" "$LINENO" 5; } - fi - { am_dirpart=; unset am_dirpart;} - { am_filepart=; unset am_filepart;} - { am_mf=; unset am_mf;} - { am_rc=; unset am_rc;} - rm -f conftest-deps.mk -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# The names of the tagged configurations supported by this script. -available_tags='' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Assembler program. -AS=$lt_AS - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Object dumper program. -OBJDUMP=$lt_OBJDUMP - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 diff --git a/thirdparty/jpeg-9e/config.sub b/thirdparty/jpeg-9e/config.sub deleted file mode 100755 index d74fb6d..0000000 --- a/thirdparty/jpeg-9e/config.sub +++ /dev/null @@ -1,1884 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2021 Free Software Foundation, Inc. - -# shellcheck disable=SC2006,SC2268 # see below for rationale - -timestamp='2021-08-14' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -# The "shellcheck disable" line above the timestamp inhibits complaints -# about features and limitations of the classic Bourne shell that were -# superseded or lifted in POSIX. However, this script identifies a wide -# variety of pre-POSIX systems that do not have POSIX shells at all, and -# even some reasonably current systems (Solaris 10 as case-in-point) still -# have a pre-POSIX /bin/sh. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - -Canonicalize a configuration name. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2021 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo "$1" - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Split fields of configuration type -# shellcheck disable=SC2162 -saved_IFS=$IFS -IFS="-" read field1 field2 field3 field4 <&2 - exit 1 - ;; - *-*-*-*) - basic_machine=$field1-$field2 - basic_os=$field3-$field4 - ;; - *-*-*) - # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two - # parts - maybe_os=$field2-$field3 - case $maybe_os in - nto-qnx* | linux-* | uclinux-uclibc* \ - | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ - | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) - basic_machine=$field1 - basic_os=$maybe_os - ;; - android-linux) - basic_machine=$field1-unknown - basic_os=linux-android - ;; - *) - basic_machine=$field1-$field2 - basic_os=$field3 - ;; - esac - ;; - *-*) - # A lone config we happen to match not fitting any pattern - case $field1-$field2 in - decstation-3100) - basic_machine=mips-dec - basic_os= - ;; - *-*) - # Second component is usually, but not always the OS - case $field2 in - # Prevent following clause from handling this valid os - sun*os*) - basic_machine=$field1 - basic_os=$field2 - ;; - zephyr*) - basic_machine=$field1-unknown - basic_os=$field2 - ;; - # Manufacturers - dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ - | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ - | unicom* | ibm* | next | hp | isi* | apollo | altos* \ - | convergent* | ncr* | news | 32* | 3600* | 3100* \ - | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ - | ultra | tti* | harris | dolphin | highlevel | gould \ - | cbm | ns | masscomp | apple | axis | knuth | cray \ - | microblaze* | sim | cisco \ - | oki | wec | wrs | winbond) - basic_machine=$field1-$field2 - basic_os= - ;; - *) - basic_machine=$field1 - basic_os=$field2 - ;; - esac - ;; - esac - ;; - *) - # Convert single-component short-hands not valid as part of - # multi-component configurations. - case $field1 in - 386bsd) - basic_machine=i386-pc - basic_os=bsd - ;; - a29khif) - basic_machine=a29k-amd - basic_os=udi - ;; - adobe68k) - basic_machine=m68010-adobe - basic_os=scout - ;; - alliant) - basic_machine=fx80-alliant - basic_os= - ;; - altos | altos3068) - basic_machine=m68k-altos - basic_os= - ;; - am29k) - basic_machine=a29k-none - basic_os=bsd - ;; - amdahl) - basic_machine=580-amdahl - basic_os=sysv - ;; - amiga) - basic_machine=m68k-unknown - basic_os= - ;; - amigaos | amigados) - basic_machine=m68k-unknown - basic_os=amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - basic_os=sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - basic_os=sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - basic_os=bsd - ;; - aros) - basic_machine=i386-pc - basic_os=aros - ;; - aux) - basic_machine=m68k-apple - basic_os=aux - ;; - balance) - basic_machine=ns32k-sequent - basic_os=dynix - ;; - blackfin) - basic_machine=bfin-unknown - basic_os=linux - ;; - cegcc) - basic_machine=arm-unknown - basic_os=cegcc - ;; - convex-c1) - basic_machine=c1-convex - basic_os=bsd - ;; - convex-c2) - basic_machine=c2-convex - basic_os=bsd - ;; - convex-c32) - basic_machine=c32-convex - basic_os=bsd - ;; - convex-c34) - basic_machine=c34-convex - basic_os=bsd - ;; - convex-c38) - basic_machine=c38-convex - basic_os=bsd - ;; - cray) - basic_machine=j90-cray - basic_os=unicos - ;; - crds | unos) - basic_machine=m68k-crds - basic_os= - ;; - da30) - basic_machine=m68k-da30 - basic_os= - ;; - decstation | pmax | pmin | dec3100 | decstatn) - basic_machine=mips-dec - basic_os= - ;; - delta88) - basic_machine=m88k-motorola - basic_os=sysv3 - ;; - dicos) - basic_machine=i686-pc - basic_os=dicos - ;; - djgpp) - basic_machine=i586-pc - basic_os=msdosdjgpp - ;; - ebmon29k) - basic_machine=a29k-amd - basic_os=ebmon - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - basic_os=ose - ;; - gmicro) - basic_machine=tron-gmicro - basic_os=sysv - ;; - go32) - basic_machine=i386-pc - basic_os=go32 - ;; - h8300hms) - basic_machine=h8300-hitachi - basic_os=hms - ;; - h8300xray) - basic_machine=h8300-hitachi - basic_os=xray - ;; - h8500hms) - basic_machine=h8500-hitachi - basic_os=hms - ;; - harris) - basic_machine=m88k-harris - basic_os=sysv3 - ;; - hp300 | hp300hpux) - basic_machine=m68k-hp - basic_os=hpux - ;; - hp300bsd) - basic_machine=m68k-hp - basic_os=bsd - ;; - hppaosf) - basic_machine=hppa1.1-hp - basic_os=osf - ;; - hppro) - basic_machine=hppa1.1-hp - basic_os=proelf - ;; - i386mach) - basic_machine=i386-mach - basic_os=mach - ;; - isi68 | isi) - basic_machine=m68k-isi - basic_os=sysv - ;; - m68knommu) - basic_machine=m68k-unknown - basic_os=linux - ;; - magnum | m3230) - basic_machine=mips-mips - basic_os=sysv - ;; - merlin) - basic_machine=ns32k-utek - basic_os=sysv - ;; - mingw64) - basic_machine=x86_64-pc - basic_os=mingw64 - ;; - mingw32) - basic_machine=i686-pc - basic_os=mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - basic_os=mingw32ce - ;; - monitor) - basic_machine=m68k-rom68k - basic_os=coff - ;; - morphos) - basic_machine=powerpc-unknown - basic_os=morphos - ;; - moxiebox) - basic_machine=moxie-unknown - basic_os=moxiebox - ;; - msdos) - basic_machine=i386-pc - basic_os=msdos - ;; - msys) - basic_machine=i686-pc - basic_os=msys - ;; - mvs) - basic_machine=i370-ibm - basic_os=mvs - ;; - nacl) - basic_machine=le32-unknown - basic_os=nacl - ;; - ncr3000) - basic_machine=i486-ncr - basic_os=sysv4 - ;; - netbsd386) - basic_machine=i386-pc - basic_os=netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - basic_os=linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - basic_os=newsos - ;; - news1000) - basic_machine=m68030-sony - basic_os=newsos - ;; - necv70) - basic_machine=v70-nec - basic_os=sysv - ;; - nh3000) - basic_machine=m68k-harris - basic_os=cxux - ;; - nh[45]000) - basic_machine=m88k-harris - basic_os=cxux - ;; - nindy960) - basic_machine=i960-intel - basic_os=nindy - ;; - mon960) - basic_machine=i960-intel - basic_os=mon960 - ;; - nonstopux) - basic_machine=mips-compaq - basic_os=nonstopux - ;; - os400) - basic_machine=powerpc-ibm - basic_os=os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - basic_os=ose - ;; - os68k) - basic_machine=m68k-none - basic_os=os68k - ;; - paragon) - basic_machine=i860-intel - basic_os=osf - ;; - parisc) - basic_machine=hppa-unknown - basic_os=linux - ;; - psp) - basic_machine=mipsallegrexel-sony - basic_os=psp - ;; - pw32) - basic_machine=i586-unknown - basic_os=pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - basic_os=rdos - ;; - rdos32) - basic_machine=i386-pc - basic_os=rdos - ;; - rom68k) - basic_machine=m68k-rom68k - basic_os=coff - ;; - sa29200) - basic_machine=a29k-amd - basic_os=udi - ;; - sei) - basic_machine=mips-sei - basic_os=seiux - ;; - sequent) - basic_machine=i386-sequent - basic_os= - ;; - sps7) - basic_machine=m68k-bull - basic_os=sysv2 - ;; - st2000) - basic_machine=m68k-tandem - basic_os= - ;; - stratus) - basic_machine=i860-stratus - basic_os=sysv4 - ;; - sun2) - basic_machine=m68000-sun - basic_os= - ;; - sun2os3) - basic_machine=m68000-sun - basic_os=sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - basic_os=sunos4 - ;; - sun3) - basic_machine=m68k-sun - basic_os= - ;; - sun3os3) - basic_machine=m68k-sun - basic_os=sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - basic_os=sunos4 - ;; - sun4) - basic_machine=sparc-sun - basic_os= - ;; - sun4os3) - basic_machine=sparc-sun - basic_os=sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - basic_os=sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - basic_os=solaris2 - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - basic_os= - ;; - sv1) - basic_machine=sv1-cray - basic_os=unicos - ;; - symmetry) - basic_machine=i386-sequent - basic_os=dynix - ;; - t3e) - basic_machine=alphaev5-cray - basic_os=unicos - ;; - t90) - basic_machine=t90-cray - basic_os=unicos - ;; - toad1) - basic_machine=pdp10-xkl - basic_os=tops20 - ;; - tpf) - basic_machine=s390x-ibm - basic_os=tpf - ;; - udi29k) - basic_machine=a29k-amd - basic_os=udi - ;; - ultra3) - basic_machine=a29k-nyu - basic_os=sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - basic_os=none - ;; - vaxv) - basic_machine=vax-dec - basic_os=sysv - ;; - vms) - basic_machine=vax-dec - basic_os=vms - ;; - vsta) - basic_machine=i386-pc - basic_os=vsta - ;; - vxworks960) - basic_machine=i960-wrs - basic_os=vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - basic_os=vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - basic_os=vxworks - ;; - xbox) - basic_machine=i686-pc - basic_os=mingw32 - ;; - ymp) - basic_machine=ymp-cray - basic_os=unicos - ;; - *) - basic_machine=$1 - basic_os= - ;; - esac - ;; -esac - -# Decode 1-component or ad-hoc basic machines -case $basic_machine in - # Here we handle the default manufacturer of certain CPU types. It is in - # some cases the only manufacturer, in others, it is the most popular. - w89k) - cpu=hppa1.1 - vendor=winbond - ;; - op50n) - cpu=hppa1.1 - vendor=oki - ;; - op60c) - cpu=hppa1.1 - vendor=oki - ;; - ibm*) - cpu=i370 - vendor=ibm - ;; - orion105) - cpu=clipper - vendor=highlevel - ;; - mac | mpw | mac-mpw) - cpu=m68k - vendor=apple - ;; - pmac | pmac-mpw) - cpu=powerpc - vendor=apple - ;; - - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - cpu=m68000 - vendor=att - ;; - 3b*) - cpu=we32k - vendor=att - ;; - bluegene*) - cpu=powerpc - vendor=ibm - basic_os=cnk - ;; - decsystem10* | dec10*) - cpu=pdp10 - vendor=dec - basic_os=tops10 - ;; - decsystem20* | dec20*) - cpu=pdp10 - vendor=dec - basic_os=tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - cpu=m68k - vendor=motorola - ;; - dpx2*) - cpu=m68k - vendor=bull - basic_os=sysv3 - ;; - encore | umax | mmax) - cpu=ns32k - vendor=encore - ;; - elxsi) - cpu=elxsi - vendor=elxsi - basic_os=${basic_os:-bsd} - ;; - fx2800) - cpu=i860 - vendor=alliant - ;; - genix) - cpu=ns32k - vendor=ns - ;; - h3050r* | hiux*) - cpu=hppa1.1 - vendor=hitachi - basic_os=hiuxwe2 - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - cpu=m68000 - vendor=hp - ;; - hp9k3[2-9][0-9]) - cpu=m68k - vendor=hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - i*86v32) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv32 - ;; - i*86v4*) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv4 - ;; - i*86v) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv - ;; - i*86sol2) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=solaris2 - ;; - j90 | j90-cray) - cpu=j90 - vendor=cray - basic_os=${basic_os:-unicos} - ;; - iris | iris4d) - cpu=mips - vendor=sgi - case $basic_os in - irix*) - ;; - *) - basic_os=irix4 - ;; - esac - ;; - miniframe) - cpu=m68000 - vendor=convergent - ;; - *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) - cpu=m68k - vendor=atari - basic_os=mint - ;; - news-3600 | risc-news) - cpu=mips - vendor=sony - basic_os=newsos - ;; - next | m*-next) - cpu=m68k - vendor=next - case $basic_os in - openstep*) - ;; - nextstep*) - ;; - ns2*) - basic_os=nextstep2 - ;; - *) - basic_os=nextstep3 - ;; - esac - ;; - np1) - cpu=np1 - vendor=gould - ;; - op50n-* | op60c-*) - cpu=hppa1.1 - vendor=oki - basic_os=proelf - ;; - pa-hitachi) - cpu=hppa1.1 - vendor=hitachi - basic_os=hiuxwe2 - ;; - pbd) - cpu=sparc - vendor=tti - ;; - pbb) - cpu=m68k - vendor=tti - ;; - pc532) - cpu=ns32k - vendor=pc532 - ;; - pn) - cpu=pn - vendor=gould - ;; - power) - cpu=power - vendor=ibm - ;; - ps2) - cpu=i386 - vendor=ibm - ;; - rm[46]00) - cpu=mips - vendor=siemens - ;; - rtpc | rtpc-*) - cpu=romp - vendor=ibm - ;; - sde) - cpu=mipsisa32 - vendor=sde - basic_os=${basic_os:-elf} - ;; - simso-wrs) - cpu=sparclite - vendor=wrs - basic_os=vxworks - ;; - tower | tower-32) - cpu=m68k - vendor=ncr - ;; - vpp*|vx|vx-*) - cpu=f301 - vendor=fujitsu - ;; - w65) - cpu=w65 - vendor=wdc - ;; - w89k-*) - cpu=hppa1.1 - vendor=winbond - basic_os=proelf - ;; - none) - cpu=none - vendor=none - ;; - leon|leon[3-9]) - cpu=sparc - vendor=$basic_machine - ;; - leon-*|leon[3-9]-*) - cpu=sparc - vendor=`echo "$basic_machine" | sed 's/-.*//'` - ;; - - *-*) - # shellcheck disable=SC2162 - saved_IFS=$IFS - IFS="-" read cpu vendor <&2 - exit 1 - ;; - esac - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $vendor in - digital*) - vendor=dec - ;; - commodore*) - vendor=cbm - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if test x$basic_os != x -then - -# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just -# set os. -case $basic_os in - gnu/linux*) - kernel=linux - os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` - ;; - os2-emx) - kernel=os2 - os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` - ;; - nto-qnx*) - kernel=nto - os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` - ;; - *-*) - # shellcheck disable=SC2162 - saved_IFS=$IFS - IFS="-" read kernel os <&2 - exit 1 - ;; -esac - -# As a final step for OS-related things, validate the OS-kernel combination -# (given a valid OS), if there is a kernel. -case $kernel-$os in - linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ - | linux-musl* | linux-relibc* | linux-uclibc* ) - ;; - uclinux-uclibc* ) - ;; - -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) - # These are just libc implementations, not actual OSes, and thus - # require a kernel. - echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 - exit 1 - ;; - kfreebsd*-gnu* | kopensolaris*-gnu*) - ;; - vxworks-simlinux | vxworks-simwindows | vxworks-spe) - ;; - nto-qnx*) - ;; - os2-emx) - ;; - *-eabi* | *-gnueabi*) - ;; - -*) - # Blank kernel with real OS is always fine. - ;; - *-*) - echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 - exit 1 - ;; -esac - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -case $vendor in - unknown) - case $cpu-$os in - *-riscix*) - vendor=acorn - ;; - *-sunos*) - vendor=sun - ;; - *-cnk* | *-aix*) - vendor=ibm - ;; - *-beos*) - vendor=be - ;; - *-hpux*) - vendor=hp - ;; - *-mpeix*) - vendor=hp - ;; - *-hiux*) - vendor=hitachi - ;; - *-unos*) - vendor=crds - ;; - *-dgux*) - vendor=dg - ;; - *-luna*) - vendor=omron - ;; - *-genix*) - vendor=ns - ;; - *-clix*) - vendor=intergraph - ;; - *-mvs* | *-opened*) - vendor=ibm - ;; - *-os400*) - vendor=ibm - ;; - s390-* | s390x-*) - vendor=ibm - ;; - *-ptx*) - vendor=sequent - ;; - *-tpf*) - vendor=ibm - ;; - *-vxsim* | *-vxworks* | *-windiss*) - vendor=wrs - ;; - *-aux*) - vendor=apple - ;; - *-hms*) - vendor=hitachi - ;; - *-mpw* | *-macos*) - vendor=apple - ;; - *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) - vendor=atari - ;; - *-vos*) - vendor=stratus - ;; - esac - ;; -esac - -echo "$cpu-$vendor-${kernel:+$kernel-}$os" -exit - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/thirdparty/jpeg-9e/configure b/thirdparty/jpeg-9e/configure deleted file mode 100755 index 9e1d1fc..0000000 --- a/thirdparty/jpeg-9e/configure +++ /dev/null @@ -1,16365 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for libjpeg 9.5.0. -# -# -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. -as_nl=' -' -export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi - -# The user is always right. -if ${PATH_SEPARATOR+false} :; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : - -else \$as_nop - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null -then : - as_have_required=yes -else $as_nop - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : - -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : - CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : - break 2 -fi -fi - done;; - esac - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi - - - if test "x$CONFIG_SHELL" != x -then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." - else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else $as_nop - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else $as_nop - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - printf "%s\n" "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='libjpeg' -PACKAGE_TARNAME='libjpeg' -PACKAGE_VERSION='9.5.0' -PACKAGE_STRING='libjpeg 9.5.0' -PACKAGE_BUGREPORT='' -PACKAGE_URL='' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include -#endif -#ifdef HAVE_STDLIB_H -# include -#endif -#ifdef HAVE_STRING_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_header_c_list= -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -JPEG_LIB_VERSION_MINOR -JPEG_LIB_VERSION_MAJOR -JPEG_LIB_VERSION -MEMORYMGR -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -SED -LIBTOOL -OBJDUMP -DLLTOOL -AS -HAVE_LD_VERSION_SCRIPT_FALSE -HAVE_LD_VERSION_SCRIPT_TRUE -ac_ct_AR -AR -EGREP -GREP -LN_S -CPP -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -CSCOPE -ETAGS -CTAGS -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -runstatedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL -am__quote' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_maintainer_mode -enable_dependency_tracking -enable_ld_version_script -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_gnu_ld -with_sysroot -enable_libtool_lock -enable_maxmem -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -LT_SYS_LIBRARY_PATH' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures libjpeg 9.5.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/libjpeg] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of libjpeg 9.5.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-maintainer-mode - enable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - --enable-ld-version-script - enable linker version script (default is enabled - when possible) - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-maxmem=N enable use of temp files, set max mem usage to N MB - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -libjpeg configure 9.5.0 -generated by GNU Autoconf 2.71 - -Copyright (C) 2021 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ - -#include -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main (void) -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by libjpeg $as_me 9.5.0, which was -generated by GNU Autoconf 2.71. Invocation command line was - - $ $0$ac_configure_args_raw - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" - # Save into config.log some information that might help in debugging. - { - echo - - printf "%s\n" "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - printf "%s\n" "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - printf "%s\n" "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - printf "%s\n" "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - printf "%s\n" "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -printf "%s\n" "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h - -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h - -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h - -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h - -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h - -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" -else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" -fi - -for ac_site_file in $ac_site_files -do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif - -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" - -# Auxiliary files required by this configure script. -ac_aux_files="ltmain.sh ar-lib compile missing install-sh config.guess config.sub" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}/." - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# Directory where autotools helper scripts lives. - - -# Generate configuration headers. -ac_config_headers="$ac_config_headers jconfig.h:jconfig.cfg" - - -# Hack: disable autoheader so that it doesn't overwrite our cfg template. -AUTOHEADER="echo autoheader ignored" - -# Check system type - - - - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -printf %s "checking target system type... " >&6; } -if test ${ac_cv_target+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -printf "%s\n" "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - -# Initialize Automake -# Don't require all the GNU mandated files -am__api_version='1.16' - - - # Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -printf %s "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test ${ac_cv_path_install+y} -then : - printf %s "(cached) " >&6 -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - # Account for fact that we put trailing slashes in our PATH walk. -case $as_dir in #(( - ./ | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test ${ac_cv_path_install+y}; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -printf "%s\n" "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -printf %s "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` - - -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - - - if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 -printf %s "checking for a race-free mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test ${ac_cv_path_mkdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue - case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir ('*'coreutils) '* | \ - 'BusyBox '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test ${ac_cv_path_mkdir+y}; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -printf "%s\n" "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AWK+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -printf "%s\n" "$AWK" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - SET_MAKE= -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# Check whether --enable-silent-rules was given. -if test ${enable_silent_rules+y} -then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -printf %s "checking whether $am_make supports nested variables... " >&6; } -if test ${am_cv_make_support_nested_variables+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if printf "%s\n" 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='libjpeg' - VERSION='9.5.0' - - -printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h - - -printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar pax cpio none' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - -# Variables for tags utilities; see am/tags.am -if test -z "$CTAGS"; then - CTAGS=ctags -fi - -if test -z "$ETAGS"; then - ETAGS=etags -fi - -if test -z "$CSCOPE"; then - CSCOPE=cscope -fi - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - - -# Make --enable-silent-rules the default. -# To get verbose build output you may configure -# with --disable-silent-rules or use "make V=1". -# Check whether --enable-silent-rules was given. -if test ${enable_silent_rules+y} -then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=0;; -esac -am_make=${MAKE-make} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -printf %s "checking whether $am_make supports nested variables... " >&6; } -if test ${am_cv_make_support_nested_variables+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if printf "%s\n" 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - - -# Add configure option --enable-maintainer-mode which enables -# dependency checking and generation useful to package maintainers. -# This is made an option to avoid confusing end users. - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test ${enable_maintainer_mode+y} -then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else $as_nop - USE_MAINTAINER_MODE=no -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -printf "%s\n" "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - -# Check for programs - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -fi - - -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else $as_nop - ac_file='' -fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+y} -ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi - -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi - -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi - -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 -fi -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -printf %s "checking whether $CC understands -c and -o together... " >&6; } -if test ${am_cv_prog_cc_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } -cat > confinc.mk << 'END' -am__doit: - @echo this is the am__doit target >confinc.out -.PHONY: am__doit -END -am__include="#" -am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 - (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - case $?:`cat confinc.out 2>/dev/null` in #( - '0:this is the am__doit target') : - case $s in #( - BSD) : - am__include='.include' am__quote='"' ;; #( - *) : - am__include='include' am__quote='' ;; -esac ;; #( - *) : - ;; -esac - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -printf "%s\n" "${_am_result}" >&6; } - -# Check whether --enable-dependency-tracking was given. -if test ${enable_dependency_tracking+y} -then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CC_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test ${ac_cv_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - SET_MAKE= -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -printf %s "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -printf "%s\n" "no, using $LN_S" >&6; } -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - - - - if test -n "$ac_tool_prefix"; then - for ac_prog in ar lib "link -lib" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar lib "link -lib" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 -printf %s "checking the archiver ($AR) interface... " >&6; } -if test ${am_cv_ar_interface+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - am_cv_ar_interface=ar - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int some_variable = 0; -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 - (eval $am_ar_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - am_cv_ar_interface=ar - else - am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 - (eval $am_ar_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - am_cv_ar_interface=lib - else - am_cv_ar_interface=unknown - fi - fi - rm -f conftest.lib libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 -printf "%s\n" "$am_cv_ar_interface" >&6; } - -case $am_cv_ar_interface in -ar) - ;; -lib) - # Microsoft lib, so override with the ar-lib wrapper script. - # FIXME: It is wrong to rewrite AR. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__AR in this case, - # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something - # similar. - AR="$am_aux_dir/ar-lib $AR" - ;; -unknown) - as_fn_error $? "could not determine $AR interface" "$LINENO" 5 - ;; -esac - - -# Check if LD supports linker scripts, -# and define automake conditional HAVE_LD_VERSION_SCRIPT if so. -# Check whether --enable-ld-version-script was given. -if test ${enable_ld_version_script+y} -then : - enableval=$enable_ld_version_script; have_ld_version_script=$enableval -fi - -if test -z "$have_ld_version_script"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if LD -Wl,--version-script works" >&5 -printf %s "checking if LD -Wl,--version-script works... " >&6; } - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" - cat > conftest.map <conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - have_ld_version_script=yes -else $as_nop - have_ld_version_script=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - rm -f conftest.map - LDFLAGS="$save_LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_ld_version_script" >&5 -printf "%s\n" "$have_ld_version_script" >&6; } -fi - if test "$have_ld_version_script" = "yes"; then - HAVE_LD_VERSION_SCRIPT_TRUE= - HAVE_LD_VERSION_SCRIPT_FALSE='#' -else - HAVE_LD_VERSION_SCRIPT_TRUE='#' - HAVE_LD_VERSION_SCRIPT_FALSE= -fi - - -# See if compiler supports prototypes. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 -printf %s "checking for function prototypes... " >&6; } -if test ${ijg_cv_have_prototypes+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int testfunction (int arg1, int * arg2); /* check prototypes */ -struct methods_struct { /* check method-pointer declarations */ - int (*error_exit) (char *msgtext); - int (*trace_message) (char *msgtext); - int (*another_method) (void); -}; -int testfunction (int arg1, int * arg2) /* check definitions */ -{ return arg2[arg1]; } -int test2function (void) /* check void arg list */ -{ return 0; } - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ijg_cv_have_prototypes=yes -else $as_nop - ijg_cv_have_prototypes=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ijg_cv_have_prototypes" >&5 -printf "%s\n" "$ijg_cv_have_prototypes" >&6; } -if test $ijg_cv_have_prototypes = yes; then - -printf "%s\n" "#define HAVE_PROTOTYPES 1" >>confdefs.h - -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Your compiler does not seem to know about function prototypes. - Perhaps it needs a special switch to enable ANSI C mode. - If so, we recommend running configure like this: - ./configure CC='cc -switch' - where -switch is the proper switch." >&5 -printf "%s\n" "$as_me: WARNING: Your compiler does not seem to know about function prototypes. - Perhaps it needs a special switch to enable ANSI C mode. - If so, we recommend running configure like this: - ./configure CC='cc -switch' - where -switch is the proper switch." >&2;} -fi - -# Check header files -ac_header= ac_cache= -for ac_item in $ac_header_c_list -do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi -done - - - - - - - - -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : - -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" -if test "x$ac_cv_header_stddef_h" = xyes -then : - printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes -then : - printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" -if test "x$ac_cv_header_locale_h" = xyes -then : - printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h - -fi - -ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = xyes -then : - -else $as_nop - -printf "%s\n" "#define NEED_BSD_STRINGS 1" >>confdefs.h - -fi - - -# See whether type size_t is defined in any ANSI-standard places; -# if not, perhaps it is defined in . -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5 -printf %s "checking for size_t... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_STDDEF_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#include -#ifdef NEED_BSD_STRINGS -#include -#else -#include -#endif -typedef size_t my_size_t; - -int -main (void) -{ - my_size_t foovar; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ijg_size_t_ok=yes -else $as_nop - ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ijg_size_t_ok" >&5 -printf "%s\n" "$ijg_size_t_ok" >&6; } -if test "$ijg_size_t_ok" != yes; then - -ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_types_h" = xyes -then : - -printf "%s\n" "#define NEED_SYS_TYPES_H 1" >>confdefs.h - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "size_t" >/dev/null 2>&1 -then : - ijg_size_t_ok="size_t is in sys/types.h" -else $as_nop - ijg_size_t_ok=no -fi -rm -rf conftest* - -else $as_nop - ijg_size_t_ok=no -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ijg_size_t_ok" >&5 -printf "%s\n" "$ijg_size_t_ok" >&6; } - if test "$ijg_size_t_ok" = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Type size_t is not defined in any of the usual places. - Try putting '\"typedef unsigned int size_t;\"' in jconfig.h." >&5 -printf "%s\n" "$as_me: WARNING: Type size_t is not defined in any of the usual places. - Try putting '\"typedef unsigned int size_t;\"' in jconfig.h." >&2;} - fi -fi - -# Check compiler characteristics -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type unsigned char" >&5 -printf %s "checking for type unsigned char... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - unsigned char un_char; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_UNSIGNED_CHAR 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type unsigned short" >&5 -printf %s "checking for type unsigned short... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - unsigned short un_short; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_UNSIGNED_SHORT 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type void" >&5 -printf %s "checking for type void... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Caution: a C++ compiler will insist on valid prototypes */ -typedef void * void_ptr; /* check void * */ -#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */ -typedef void (*void_func) (int a, int b); -#else -typedef void (*void_func) (); -#endif - -#ifdef HAVE_PROTOTYPES /* check void function result */ -void test3function (void_ptr arg1, void_func arg2) -#else -void test3function (arg1, arg2) - void_ptr arg1; - void_func arg2; -#endif -{ - char * locptr = (char *) arg1; /* check casting to and from void * */ - arg1 = (void *) locptr; - (*arg2) (1, 2); /* check call of fcn returning void */ -} - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -printf "%s\n" "#define void char" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -printf %s "checking for an ANSI C-conforming const... " >&6; } -if test ${ac_cv_c_const+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* IBM XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_c_const=yes -else $as_nop - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -printf "%s\n" "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -printf "%s\n" "#define const /**/" >>confdefs.h - -fi - - -# Check for non-broken inline under various spellings -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -printf %s "checking for inline... " >&6; } -ijg_cv_inline="" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -} __inline__ int foo() { return 0; } -int bar() { return foo(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ijg_cv_inline="__inline__" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -} __inline int foo() { return 0; } -int bar() { return foo(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ijg_cv_inline="__inline" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -} inline int foo() { return 0; } -int bar() { return foo(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ijg_cv_inline="inline" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ijg_cv_inline" >&5 -printf "%s\n" "$ijg_cv_inline" >&6; } - -printf "%s\n" "#define INLINE $ijg_cv_inline" >>confdefs.h - - -# We cannot check for bogus warnings, but at least we can check for errors -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken incomplete types" >&5 -printf %s "checking for broken incomplete types... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -typedef struct undefined_structure * undef_struct_ptr; - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -printf "%s\n" "ok" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5 -printf "%s\n" "broken" >&6; } - -printf "%s\n" "#define INCOMPLETE_TYPES_BROKEN 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -# Test whether global names are unique to at least 15 chars -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for short external names" >&5 -printf %s "checking for short external names... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int possibly_duplicate_function () { return 0; } -int possibly_dupli_function () { return 1; } - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -printf "%s\n" "ok" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: short" >&5 -printf "%s\n" "short" >&6; } - -printf "%s\n" "#define NEED_SHORT_EXTERNAL_NAMES 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -# Run-time checks -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if char is signed" >&5 -printf %s "checking to see if char is signed... " >&6; } -if test "$cross_compiling" = yes -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Assuming that char is signed on target machine. - If it is unsigned, this will be a little bit inefficient." >&5 -printf "%s\n" "$as_me: WARNING: Assuming that char is signed on target machine. - If it is unsigned, this will be a little bit inefficient." >&2;} - -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_STDLIB_H -#include -#endif -#include -#ifdef HAVE_PROTOTYPES -int is_char_signed (int arg) -#else -int is_char_signed (arg) - int arg; -#endif -{ - if (arg == 189) { /* expected result for unsigned char */ - return 0; /* type char is unsigned */ - } - else if (arg != -67) { /* expected result for signed char */ - printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n"); - printf("I fear the JPEG software will not work at all.\n\n"); - } - return 1; /* assume char is signed otherwise */ -} -char signed_char_check = (char) (-67); -int main() { - exit(is_char_signed((int) signed_char_check)); -} -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -printf "%s\n" "#define CHAR_IS_UNSIGNED 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if right shift is signed" >&5 -printf %s "checking to see if right shift is signed... " >&6; } -if test "$cross_compiling" = yes -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Assuming that right shift is signed on target machine." >&5 -printf "%s\n" "Assuming that right shift is signed on target machine." >&6; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_STDLIB_H -#include -#endif -#include -#ifdef HAVE_PROTOTYPES -int is_shifting_signed (long arg) -#else -int is_shifting_signed (arg) - long arg; -#endif -/* See whether right-shift on a long is signed or not. */ -{ - long res = arg >> 4; - - if (res == -0x7F7E80CL) { /* expected result for signed shift */ - return 1; /* right shift is signed */ - } - /* see if unsigned-shift hack will fix it. */ - /* we can't just test exact value since it depends on width of long... */ - res |= (~0L) << (32-4); - if (res == -0x7F7E80CL) { /* expected result now? */ - return 0; /* right shift is unsigned */ - } - printf("Right shift isn't acting as I expect it to.\n"); - printf("I fear the JPEG software will not work at all.\n\n"); - return 0; /* try it with unsigned anyway */ -} -int main() { - exit(is_shifting_signed(-0x7F7E80B1L)); -} -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -printf "%s\n" "#define RIGHT_SHIFT_IS_UNSIGNED 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if fopen accepts b spec" >&5 -printf %s "checking to see if fopen accepts b spec... " >&6; } -if test "$cross_compiling" = yes -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Assuming that it does." >&5 -printf "%s\n" "Assuming that it does." >&6; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_STDLIB_H -#include -#endif -#include -int main() { - if (fopen("conftestdata", "wb") != NULL) - exit(0); - exit(1); -} -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -printf "%s\n" "#define DONT_USE_B_MODE 1" >>confdefs.h - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -# Configure libtool -case `pwd` in - *\ * | *\ *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -printf %s "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -printf "%s\n" "printf" >&6; } ;; - print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -printf "%s\n" "print -r" >&6; } ;; - *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -printf "%s\n" "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -printf %s "checking for fgrep... " >&6; } -if test ${ac_cv_path_FGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in fgrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -printf "%s\n" "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else $as_nop - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } -fi -if test ${lt_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -printf "%s\n" "$LD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test ${lt_cv_path_NM+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -printf "%s\n" "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -printf "%s\n" "$DUMPBIN" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -printf "%s\n" "$ac_ct_DUMPBIN" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -printf %s "checking the name lister ($NM) interface... " >&6; } -if test ${lt_cv_nm_interface+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -printf "%s\n" "$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -printf %s "checking the maximum length of command line arguments... " >&6; } -if test ${lt_cv_sys_max_cmd_len+y} -then : - printf %s "(cached) " >&6 -else $as_nop - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n "$lt_cv_sys_max_cmd_len"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -printf %s "checking how to convert $build file names to $host format... " >&6; } -if test ${lt_cv_to_host_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -printf %s "checking how to convert $build file names to toolchain format... " >&6; } -if test ${lt_cv_to_tool_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -printf %s "checking for $LD option to reload object files... " >&6; } -if test ${lt_cv_ld_reload_flag+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_ld_reload_flag='-r' -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -printf "%s\n" "$OBJDUMP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -printf "%s\n" "$ac_ct_OBJDUMP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -printf %s "checking how to recognize dependent libraries... " >&6; } -if test ${lt_cv_deplibs_check_method+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -printf "%s\n" "$DLLTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -printf "%s\n" "$ac_ct_DLLTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -printf %s "checking how to associate runtime and link libraries... " >&6; } -if test ${lt_cv_sharedlib_from_linklib_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -printf %s "checking for archiver @FILE support... " >&6; } -if test ${lt_cv_ar_at_file+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -printf "%s\n" "$lt_cv_ar_at_file" >&6; } - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -printf "%s\n" "$RANLIB" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -printf "%s\n" "$ac_ct_RANLIB" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -printf %s "checking command to parse $NM output from $compiler object... " >&6; } -if test ${lt_cv_sys_global_symbol_pipe+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -printf "%s\n" "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -printf %s "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test ${with_sysroot+y} -then : - withval=$with_sysroot; -else $as_nop - with_sysroot=no -fi - - -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -printf "%s\n" "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -printf "%s\n" "${lt_sysroot:-no}" >&6; } - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -printf %s "checking for a working dd... " >&6; } -if test ${ac_cv_path_lt_DD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in dd - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -printf "%s\n" "$ac_cv_path_lt_DD" >&6; } - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -printf %s "checking how to truncate binary pipes... " >&6; } -if test ${lt_cv_truncate_bin+y} -then : - printf %s "(cached) " >&6 -else $as_nop - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -printf "%s\n" "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - -# Check whether --enable-libtool-lock was given. -if test ${enable_libtool_lock+y} -then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -printf %s "checking whether the C compiler needs -belf... " >&6; } -if test ${lt_cv_cc_needs_belf+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - lt_cv_cc_needs_belf=yes -else $as_nop - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -printf "%s\n" "$MANIFEST_TOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test ${lt_cv_path_mainfest_tool+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -printf "%s\n" "$DSYMUTIL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -printf "%s\n" "$NMEDIT" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -printf "%s\n" "$ac_ct_NMEDIT" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -printf "%s\n" "$LIPO" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -printf "%s\n" "$ac_ct_LIPO" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -printf "%s\n" "$OTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -printf "%s\n" "$ac_ct_OTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -printf "%s\n" "$OTOOL64" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -printf "%s\n" "$ac_ct_OTOOL64" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -printf %s "checking for -single_module linker flag... " >&6; } -if test ${lt_cv_apple_cc_single_mod+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -printf %s "checking for -exported_symbols_list linker flag... " >&6; } -if test ${lt_cv_ld_exported_symbols_list+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - lt_cv_ld_exported_symbols_list=yes -else $as_nop - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -printf %s "checking for -force_load linker flag... " >&6; } -if test ${lt_cv_ld_force_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -printf "%s\n" "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - -ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes -then : - printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h - -fi - - - - - -# Set options -enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AS+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_AS="${ac_tool_prefix}as" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -printf "%s\n" "$AS" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AS+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AS="as" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -printf "%s\n" "$ac_ct_AS" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -printf "%s\n" "$DLLTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -printf "%s\n" "$ac_ct_DLLTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -printf "%s\n" "$OBJDUMP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -printf "%s\n" "$ac_ct_OBJDUMP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; -esac - -test -z "$AS" && AS=as - - - - - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - enable_dlopen=no - - - - # Check whether --enable-shared was given. -if test ${enable_shared+y} -then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else $as_nop - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test ${enable_static+y} -then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else $as_nop - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test ${with_pic+y} -then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else $as_nop - pic_mode=default -fi - - - - - - - - - # Check whether --enable-fast-install was given. -if test ${enable_fast_install+y} -then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else $as_nop - enable_fast_install=yes -fi - - - - - - - - - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -printf %s "checking which variant of shared library versioning to provide... " >&6; } - -# Check whether --with-aix-soname was given. -if test ${with_aix_soname+y} -then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else $as_nop - if test ${lt_cv_with_aix_soname+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -printf "%s\n" "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -printf %s "checking for objdir... " >&6; } -if test ${lt_cv_objdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -printf "%s\n" "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -printf %s "checking for ${ac_tool_prefix}file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -printf %s "checking for file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test ${lt_cv_prog_compiler_rtti_exceptions+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } - if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -printf %s "checking if $CC understands -b... " >&6; } -if test ${lt_cv_prog_compiler__b+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } - -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test ${lt_cv_irix_exported_symbol+y} -then : - printf %s "(cached) " >&6 -else $as_nop - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - lt_cv_irix_exported_symbol=yes -else $as_nop - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -printf "%s\n" "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc+y} -then : - printf %s "(cached) " >&6 -else $as_nop - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -printf "%s\n" "$hardcode_action" >&6; } - -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dl_dlopen=yes -else $as_nop - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop - - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes -then : - lt_cv_dlopen=shl_load -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -printf %s "checking for shl_load in -ldld... " >&6; } -if test ${ac_cv_lib_dld_shl_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main (void) -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dld_shl_load=yes -else $as_nop - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes -then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else $as_nop - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes -then : - lt_cv_dlopen=dlopen -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dl_dlopen=yes -else $as_nop - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -printf %s "checking for dlopen in -lsvld... " >&6; } -if test ${ac_cv_lib_svld_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_svld_dlopen=yes -else $as_nop - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes -then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -printf %s "checking for dld_link in -ldld... " >&6; } -if test ${ac_cv_lib_dld_dld_link+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main (void) -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dld_dld_link=yes -else $as_nop - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes -then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -printf %s "checking whether a program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -printf "%s\n" "$lt_cv_dlopen_self" >&6; } - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -printf %s "checking whether a statically linked program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self_static+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -printf %s "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi - ;; - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report what library types will actually be built - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -printf %s "checking if libtool supports shared libraries... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -printf "%s\n" "$can_build_shared" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -printf %s "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -printf %s "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -printf "%s\n" "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - -# Select memory manager depending on user input. -# If no "-enable-maxmem", use jmemnobs -MEMORYMGR='jmemnobs' -MAXMEM="no" -# Check whether --enable-maxmem was given. -if test ${enable_maxmem+y} -then : - enableval=$enable_maxmem; MAXMEM="$enableval" -fi - -if test "x$MAXMEM" = xyes; then - MAXMEM=1 -fi -if test "x$MAXMEM" != xno; then - if test -n "`echo $MAXMEM | sed 's/[0-9]//g'`"; then - as_fn_error $? "non-numeric argument to --enable-maxmem" "$LINENO" 5 - fi - DEFAULTMAXMEM=`expr $MAXMEM \* 1048576` - -printf "%s\n" "#define DEFAULT_MAX_MEM ${DEFAULTMAXMEM}" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 'tmpfile()'" >&5 -printf %s "checking for 'tmpfile()'... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ - FILE * tfile = tmpfile(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - MEMORYMGR='jmemansi' -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - MEMORYMGR='jmemname' - - # Test for the need to remove temporary files using a signal handler - # (for cjpeg/djpeg) - -printf "%s\n" "#define NEED_SIGNAL_CATCHER 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 'mktemp()'" >&5 -printf %s "checking for 'mktemp()'... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - char fname[80]; mktemp(fname); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -printf "%s\n" "#define NO_MKTEMP 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi - - -# Extract the library version IDs from jpeglib.h. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking libjpeg version number" >&5 -printf %s "checking libjpeg version number... " >&6; } -major=`sed -ne 's/^#define JPEG_LIB_VERSION_MAJOR *\([0-9][0-9]*\).*$/\1/p' $srcdir/jpeglib.h` -minor=`sed -ne 's/^#define JPEG_LIB_VERSION_MINOR *\([0-9][0-9]*\).*$/\1/p' $srcdir/jpeglib.h` -JPEG_LIB_VERSION=`expr $major + $minor`:0:$minor - -JPEG_LIB_VERSION_MAJOR=$major - -JPEG_LIB_VERSION_MINOR=$minor - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $major.$minor.0" >&5 -printf "%s\n" "$major.$minor.0" >&6; } - -ac_config_files="$ac_config_files Makefile libjpeg.pc" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -printf %s "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT_FALSE}"; then - as_fn_error $? "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. -as_nl=' -' -export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi - -# The user is always right. -if ${PATH_SEPARATOR+false} :; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - printf "%s\n" "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else $as_nop - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else $as_nop - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by libjpeg $as_me 9.5.0, which was -generated by GNU Autoconf 2.71. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to the package provider." - -_ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' -ac_cs_version="\\ -libjpeg config.status 9.5.0 -configured by $0, generated by GNU Autoconf 2.71, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2021 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - printf "%s\n" "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in AS \ -DLLTOOL \ -OBJDUMP \ -SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "jconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS jconfig.h:jconfig.cfg" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "libjpeg.pc") CONFIG_FILES="$CONFIG_FILES libjpeg.pc" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers - test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - printf "%s\n" "/* $configure_input */" >&1 \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - printf "%s\n" "/* $configure_input */" >&1 \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -printf "%s\n" "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - case $CONFIG_FILES in #( - *\'*) : - eval set x "$CONFIG_FILES" ;; #( - *) : - set x $CONFIG_FILES ;; #( - *) : - ;; -esac - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`$as_dirname -- "$am_mf" || -$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$am_mf" : 'X\(//\)[^/]' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$am_mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - am_filepart=`$as_basename -- "$am_mf" || -$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$am_mf" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { echo "$as_me:$LINENO: cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles" >&5 - (cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } || am_rc=$? - done - if test $am_rc -ne 0; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE=\"gmake\" (or whatever is - necessary). You can also try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). -See \`config.log' for more details" "$LINENO" 5; } - fi - { am_dirpart=; unset am_dirpart;} - { am_filepart=; unset am_filepart;} - { am_mf=; unset am_mf;} - { am_rc=; unset am_rc;} - rm -f conftest-deps.mk -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# The names of the tagged configurations supported by this script. -available_tags='' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Assembler program. -AS=$lt_AS - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Object dumper program. -OBJDUMP=$lt_OBJDUMP - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - diff --git a/thirdparty/jpeg-9e/configure.ac b/thirdparty/jpeg-9e/configure.ac deleted file mode 100644 index f7d4035..0000000 --- a/thirdparty/jpeg-9e/configure.ac +++ /dev/null @@ -1,365 +0,0 @@ -# IJG auto-configuration source file. -# Process this file with autoconf to produce a configure script. - -# -# Configure script for IJG libjpeg -# - -AC_INIT([libjpeg], [9.5.0]) - -# Directory where autotools helper scripts lives. -AC_CONFIG_AUX_DIR([.]) - -# Generate configuration headers. -AC_CONFIG_HEADERS([jconfig.h:jconfig.cfg]) - -# Hack: disable autoheader so that it doesn't overwrite our cfg template. -AUTOHEADER="echo autoheader ignored" - -# Check system type -AC_CANONICAL_TARGET - -# Initialize Automake -# Don't require all the GNU mandated files -AM_INIT_AUTOMAKE([-Wall -Werror no-dist foreign]) - -# Make --enable-silent-rules the default. -# To get verbose build output you may configure -# with --disable-silent-rules or use "make V=1". -AM_SILENT_RULES([yes]) - -# Add configure option --enable-maintainer-mode which enables -# dependency checking and generation useful to package maintainers. -# This is made an option to avoid confusing end users. -AM_MAINTAINER_MODE - -# Check for programs -AC_PROG_CC -AC_PROG_CPP -AC_PROG_INSTALL -AC_PROG_MAKE_SET -AC_PROG_LN_S -AC_PROG_EGREP -AM_PROG_AR - -# Check if LD supports linker scripts, -# and define automake conditional HAVE_LD_VERSION_SCRIPT if so. -AC_ARG_ENABLE([ld-version-script], - AS_HELP_STRING([--enable-ld-version-script], - [enable linker version script (default is enabled when possible)]), - [have_ld_version_script=$enableval], []) -if test -z "$have_ld_version_script"; then - AC_MSG_CHECKING([if LD -Wl,--version-script works]) - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" - cat > conftest.map < rather than standard .])]) - -# See whether type size_t is defined in any ANSI-standard places; -# if not, perhaps it is defined in . -AC_MSG_CHECKING([for size_t]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#ifdef HAVE_STDDEF_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#include -#ifdef NEED_BSD_STRINGS -#include -#else -#include -#endif -typedef size_t my_size_t; -]], [[ my_size_t foovar; ]])], - [ijg_size_t_ok=yes], - [ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h"]) -AC_MSG_RESULT([$ijg_size_t_ok]) -if test "$ijg_size_t_ok" != yes; then - AC_CHECK_HEADER([sys/types.h], - [AC_DEFINE([NEED_SYS_TYPES_H], [1], - [Need to include in order to obtain size_t.]) - AC_EGREP_CPP([size_t], [#include ], - [ijg_size_t_ok="size_t is in sys/types.h"], - [ijg_size_t_ok=no])], - [ijg_size_t_ok=no]) - AC_MSG_RESULT([$ijg_size_t_ok]) - if test "$ijg_size_t_ok" = no; then - AC_MSG_WARN([Type size_t is not defined in any of the usual places. - Try putting '"typedef unsigned int size_t;"' in jconfig.h.]) - fi -fi - -# Check compiler characteristics -AC_MSG_CHECKING([for type unsigned char]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ unsigned char un_char; ]])], - [AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_UNSIGNED_CHAR], [1], - [Compiler supports 'unsigned char'.])], - [AC_MSG_RESULT(no)]) - -AC_MSG_CHECKING([for type unsigned short]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ unsigned short un_short; ]])], - [AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_UNSIGNED_SHORT], [1], - [Compiler supports 'unsigned short'.])], - [AC_MSG_RESULT(no)]) - -AC_MSG_CHECKING([for type void]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -/* Caution: a C++ compiler will insist on valid prototypes */ -typedef void * void_ptr; /* check void * */ -#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */ -typedef void (*void_func) (int a, int b); -#else -typedef void (*void_func) (); -#endif - -#ifdef HAVE_PROTOTYPES /* check void function result */ -void test3function (void_ptr arg1, void_func arg2) -#else -void test3function (arg1, arg2) - void_ptr arg1; - void_func arg2; -#endif -{ - char * locptr = (char *) arg1; /* check casting to and from void * */ - arg1 = (void *) locptr; - (*arg2) (1, 2); /* check call of fcn returning void */ -} -]], [[ ]])], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no) - AC_DEFINE([void], [char], - [Define 'void' as 'char' for archaic compilers - that don't understand it.])]) -AC_C_CONST - -# Check for non-broken inline under various spellings -AC_MSG_CHECKING([for inline]) -ijg_cv_inline="" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[} __inline__ int foo() { return 0; } -int bar() { return foo();]])], ijg_cv_inline="__inline__", -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[} __inline int foo() { return 0; } -int bar() { return foo();]])], ijg_cv_inline="__inline", -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[} inline int foo() { return 0; } -int bar() { return foo();]])], ijg_cv_inline="inline")])]) -AC_MSG_RESULT($ijg_cv_inline) -AC_DEFINE_UNQUOTED([INLINE], [$ijg_cv_inline], - [How to obtain function inlining.]) - -# We cannot check for bogus warnings, but at least we can check for errors -AC_MSG_CHECKING([for broken incomplete types]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -typedef struct undefined_structure * undef_struct_ptr; -]], [[]])], - [AC_MSG_RESULT(ok)], - [AC_MSG_RESULT(broken) - AC_DEFINE([INCOMPLETE_TYPES_BROKEN], [1], - [Compiler does not support pointers to unspecified - structures.])]) - -# Test whether global names are unique to at least 15 chars -AC_MSG_CHECKING([for short external names]) -AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -int possibly_duplicate_function () { return 0; } -int possibly_dupli_function () { return 1; } -]], [[]])], - [AC_MSG_RESULT(ok)], - [AC_MSG_RESULT(short) - AC_DEFINE([NEED_SHORT_EXTERNAL_NAMES], [1], - [Linker requires that global names be unique in - first 15 characters.])]) - -# Run-time checks -AC_MSG_CHECKING([to see if char is signed]) -AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#ifdef HAVE_STDLIB_H -#include -#endif -#include -#ifdef HAVE_PROTOTYPES -int is_char_signed (int arg) -#else -int is_char_signed (arg) - int arg; -#endif -{ - if (arg == 189) { /* expected result for unsigned char */ - return 0; /* type char is unsigned */ - } - else if (arg != -67) { /* expected result for signed char */ - printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n"); - printf("I fear the JPEG software will not work at all.\n\n"); - } - return 1; /* assume char is signed otherwise */ -} -char signed_char_check = (char) (-67); -int main() { - exit(is_char_signed((int) signed_char_check)); -}]])], [AC_MSG_RESULT(no) - AC_DEFINE([CHAR_IS_UNSIGNED], [1], - [Characters are unsigned])], - [AC_MSG_RESULT(yes)], -[AC_MSG_WARN([Assuming that char is signed on target machine. - If it is unsigned, this will be a little bit inefficient.]) -]) - -AC_MSG_CHECKING([to see if right shift is signed]) -AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#ifdef HAVE_STDLIB_H -#include -#endif -#include -#ifdef HAVE_PROTOTYPES -int is_shifting_signed (long arg) -#else -int is_shifting_signed (arg) - long arg; -#endif -/* See whether right-shift on a long is signed or not. */ -{ - long res = arg >> 4; - - if (res == -0x7F7E80CL) { /* expected result for signed shift */ - return 1; /* right shift is signed */ - } - /* see if unsigned-shift hack will fix it. */ - /* we can't just test exact value since it depends on width of long... */ - res |= (~0L) << (32-4); - if (res == -0x7F7E80CL) { /* expected result now? */ - return 0; /* right shift is unsigned */ - } - printf("Right shift isn't acting as I expect it to.\n"); - printf("I fear the JPEG software will not work at all.\n\n"); - return 0; /* try it with unsigned anyway */ -} -int main() { - exit(is_shifting_signed(-0x7F7E80B1L)); -}]])], - [AC_MSG_RESULT(no) - AC_DEFINE([RIGHT_SHIFT_IS_UNSIGNED], [1], - [Broken compiler shifts signed values as an unsigned shift.])], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(Assuming that right shift is signed on target machine.)]) - -AC_MSG_CHECKING([to see if fopen accepts b spec]) -AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#ifdef HAVE_STDLIB_H -#include -#endif -#include -int main() { - if (fopen("conftestdata", "wb") != NULL) - exit(0); - exit(1); -}]])], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no) - AC_DEFINE([DONT_USE_B_MODE], [1], - [Don't open files in binary mode.])], - [AC_MSG_RESULT(Assuming that it does.)]) - -# Configure libtool -LT_INIT([win32-dll]) - -# Select memory manager depending on user input. -# If no "-enable-maxmem", use jmemnobs -MEMORYMGR='jmemnobs' -MAXMEM="no" -AC_ARG_ENABLE([maxmem], -[ --enable-maxmem[=N] enable use of temp files, set max mem usage to N MB], -[MAXMEM="$enableval"]) -dnl [# support --with-maxmem for backwards compatibility with IJG V5.] -dnl AC_ARG_WITH(maxmem, , MAXMEM="$withval") -if test "x$MAXMEM" = xyes; then - MAXMEM=1 -fi -if test "x$MAXMEM" != xno; then - if test -n "`echo $MAXMEM | sed 's/[[0-9]]//g'`"; then - AC_MSG_ERROR(non-numeric argument to --enable-maxmem) - fi - DEFAULTMAXMEM=`expr $MAXMEM \* 1048576` - AC_DEFINE_UNQUOTED([DEFAULT_MAX_MEM], [${DEFAULTMAXMEM}], - [Maximum data space library will allocate.]) - AC_MSG_CHECKING([for 'tmpfile()']) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ FILE * tfile = tmpfile(); ]])], - [AC_MSG_RESULT(yes) - MEMORYMGR='jmemansi'], - [AC_MSG_RESULT(no) - dnl if tmpfile is not present, must use jmemname. - MEMORYMGR='jmemname' - - # Test for the need to remove temporary files using a signal handler - # (for cjpeg/djpeg) - AC_DEFINE([NEED_SIGNAL_CATCHER], [1], - [Need signal handler to clean up temporary files.]) - AC_MSG_CHECKING([for 'mktemp()']) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ char fname[80]; mktemp(fname); ]])], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no) - AC_DEFINE([NO_MKTEMP], [1], - [The mktemp() function is not available.])])]) -fi -AC_SUBST([MEMORYMGR]) - -# Extract the library version IDs from jpeglib.h. -AC_MSG_CHECKING([libjpeg version number]) -[major=`sed -ne 's/^#define JPEG_LIB_VERSION_MAJOR *\([0-9][0-9]*\).*$/\1/p' $srcdir/jpeglib.h` -minor=`sed -ne 's/^#define JPEG_LIB_VERSION_MINOR *\([0-9][0-9]*\).*$/\1/p' $srcdir/jpeglib.h`] -AC_SUBST([JPEG_LIB_VERSION], [`expr $major + $minor`:0:$minor]) -AC_SUBST([JPEG_LIB_VERSION_MAJOR], [$major]) -AC_SUBST([JPEG_LIB_VERSION_MINOR], [$minor]) -AC_MSG_RESULT([$major.$minor.0]) - -AC_CONFIG_FILES([Makefile libjpeg.pc]) -AC_OUTPUT diff --git a/thirdparty/jpeg-9e/depcomp b/thirdparty/jpeg-9e/depcomp deleted file mode 100755 index 715e343..0000000 --- a/thirdparty/jpeg-9e/depcomp +++ /dev/null @@ -1,791 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2018-03-07.03; # UTC - -# Copyright (C) 1999-2021 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by 'PROGRAMS ARGS'. - object Object file output by 'PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputting dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -# Get the directory component of the given path, and save it in the -# global variables '$dir'. Note that this directory component will -# be either empty or ending with a '/' character. This is deliberate. -set_dir_from () -{ - case $1 in - */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; - *) dir=;; - esac -} - -# Get the suffix-stripped basename of the given path, and save it the -# global variable '$base'. -set_base_from () -{ - base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` -} - -# If no dependency file was actually created by the compiler invocation, -# we still have to create a dummy depfile, to avoid errors with the -# Makefile "include basename.Plo" scheme. -make_dummy_depfile () -{ - echo "#dummy" > "$depfile" -} - -# Factor out some common post-processing of the generated depfile. -# Requires the auxiliary global variable '$tmpdepfile' to be set. -aix_post_process_depfile () -{ - # If the compiler actually managed to produce a dependency file, - # post-process it. - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependency.h'. - # Do two passes, one to just change these to - # $object: dependency.h - # and one to simply output - # dependency.h: - # which is needed to avoid the deleted-header problem. - { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" - sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" - } > "$depfile" - rm -f "$tmpdepfile" - else - make_dummy_depfile - fi -} - -# A tabulation character. -tab=' ' -# A newline character. -nl=' -' -# Character ranges might be problematic outside the C locale. -# These definitions help. -upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ -lower=abcdefghijklmnopqrstuvwxyz -digits=0123456789 -alpha=${upper}${lower} - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Avoid interferences from the environment. -gccflag= dashmflag= - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp -fi - -if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 -fi - -if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. - gccflag=-qmakedep=gcc,-MF - depmode=gcc -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. -## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. -## (see the conditional assignment to $gccflag above). -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). Also, it might not be -## supported by the other compilers which use the 'gcc' depmode. -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The second -e expression handles DOS-style file names with drive - # letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the "deleted header file" problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. -## Some versions of gcc put a space before the ':'. On the theory -## that the space means something, we add a space to the output as -## well. hp depmode also adds that space, but also prefixes the VPATH -## to the object. Take care to not repeat it in the output. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like '#:fec' to the end of the - # dependency line. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ - | tr "$nl" ' ' >> "$depfile" - echo >> "$depfile" - # The second pass generates a dummy entry for each header file. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" - ;; - -xlc) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts '$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - aix_post_process_depfile - ;; - -tcc) - # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 - # FIXME: That version still under development at the moment of writing. - # Make that this statement remains true also for stable, released - # versions. - # It will wrap lines (doesn't matter whether long or short) with a - # trailing '\', as in: - # - # foo.o : \ - # foo.c \ - # foo.h \ - # - # It will put a trailing '\' even on the last line, and will use leading - # spaces rather than leading tabs (at least since its commit 0394caf7 - # "Emit spaces for -MD"). - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. - # We have to change lines of the first kind to '$object: \'. - sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" - # And for each line of the second kind, we have to emit a 'dep.h:' - # dummy dependency, to avoid the deleted-header problem. - sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" - rm -f "$tmpdepfile" - ;; - -## The order of this option in the case statement is important, since the -## shell code in configure will try each of these formats in the order -## listed in this file. A plain '-MD' option would be understood by many -## compilers, so we must ensure this comes after the gcc and icc options. -pgcc) - # Portland's C compiler understands '-MD'. - # Will always output deps to 'file.d' where file is the root name of the - # source file under compilation, even if file resides in a subdirectory. - # The object file name does not affect the name of the '.d' file. - # pgcc 10.2 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\' : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - set_dir_from "$object" - # Use the source, not the object, to determine the base name, since - # that's sadly what pgcc will do too. - set_base_from "$source" - tmpdepfile=$base.d - - # For projects that build the same source file twice into different object - # files, the pgcc approach of using the *source* file root name can cause - # problems in parallel builds. Use a locking strategy to avoid stomping on - # the same $tmpdepfile. - lockdir=$base.d-lock - trap " - echo '$0: caught signal, cleaning up...' >&2 - rmdir '$lockdir' - exit 1 - " 1 2 13 15 - numtries=100 - i=$numtries - while test $i -gt 0; do - # mkdir is a portable test-and-set. - if mkdir "$lockdir" 2>/dev/null; then - # This process acquired the lock. - "$@" -MD - stat=$? - # Release the lock. - rmdir "$lockdir" - break - else - # If the lock is being held by a different process, wait - # until the winning process is done or we timeout. - while test -d "$lockdir" && test $i -gt 0; do - sleep 1 - i=`expr $i - 1` - done - fi - i=`expr $i - 1` - done - trap - 1 2 13 15 - if test $i -le 0; then - echo "$0: failed to acquire lock after $numtries attempts" >&2 - echo "$0: check lockdir '$lockdir'" >&2 - exit 1 - fi - - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" - # Add 'dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - set_dir_from "$object" - set_base_from "$object" - - if test "$libtool" = yes; then - # Libtool generates 2 separate objects for the 2 libraries. These - # two compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir$base.o.d # libtool 1.5 - tmpdepfile2=$dir.libs/$base.o.d # Likewise. - tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - # Same post-processing that is required for AIX mode. - aix_post_process_depfile - ;; - -msvc7) - if test "$libtool" = yes; then - showIncludes=-Wc,-showIncludes - else - showIncludes=-showIncludes - fi - "$@" $showIncludes > "$tmpdepfile" - stat=$? - grep -v '^Note: including file: ' "$tmpdepfile" - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The first sed program below extracts the file names and escapes - # backslashes for cygpath. The second sed program outputs the file - # name when reading, but also accumulates all include files in the - # hold buffer in order to output them again at the end. This only - # works with sed implementations that can handle large buffers. - sed < "$tmpdepfile" -n ' -/^Note: including file: *\(.*\)/ { - s//\1/ - s/\\/\\\\/g - p -}' | $cygpath_u | sort -u | sed -n ' -s/ /\\ /g -s/\(.*\)/'"$tab"'\1 \\/p -s/.\(.*\) \\/\1:/ -H -$ { - s/.*/'"$tab"'/ - G - p -}' >> "$depfile" - echo >> "$depfile" # make sure the fragment doesn't end with a backslash - rm -f "$tmpdepfile" - ;; - -msvc7msys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for ':' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. - "$@" $dashmflag | - sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this sed invocation - # correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - # makedepend may prepend the VPATH from the source file name to the object. - # No need to regex-escape $object, excess matching of '.' is harmless. - sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process the last invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed '1,2d' "$tmpdepfile" \ - | tr ' ' "$nl" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E \ - | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - | sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" - echo "$tab" >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/thirdparty/jpeg-9e/djpeg.1 b/thirdparty/jpeg-9e/djpeg.1 deleted file mode 100644 index 1cb364f..0000000 --- a/thirdparty/jpeg-9e/djpeg.1 +++ /dev/null @@ -1,264 +0,0 @@ -.TH DJPEG 1 "28 April 2019" -.SH NAME -djpeg \- decompress a JPEG file to an image file -.SH SYNOPSIS -.B djpeg -[ -.I options -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B djpeg -decompresses the named JPEG file, or the standard input if no file is named, -and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP, -GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected. -(RLE is supported only if the URT library is available, which it isn't -on most non-Unix systems.) -.SH OPTIONS -All switch names may be abbreviated; for example, -.B \-grayscale -may be written -.B \-gray -or -.BR \-gr . -Most of the "basic" switches can be abbreviated to as little as one letter. -Upper and lower case are equivalent (thus -.B \-BMP -is the same as -.BR \-bmp ). -British spellings are also accepted (e.g., -.BR \-greyscale ), -though for brevity these are not mentioned below. -.PP -The basic switches are: -.TP -.BI \-colors " N" -Reduce image to at most N colors. This reduces the number of colors used in -the output image, so that it can be displayed on a colormapped display or -stored in a colormapped file format. For example, if you have an 8-bit -display, you'd need to reduce to 256 or fewer colors. -.TP -.BI \-quantize " N" -Same as -.BR \-colors . -.B \-colors -is the recommended name, -.B \-quantize -is provided only for backwards compatibility. -.TP -.B \-fast -Select recommended processing options for fast, low quality output. (The -default options are chosen for highest quality output.) Currently, this is -equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR. -.TP -.B \-grayscale -Force grayscale output even if JPEG file is color. -Useful for viewing on monochrome displays; also, -.B djpeg -runs noticeably faster in this mode. -.TP -.B \-rgb -Force RGB output even if JPEG file is grayscale. -This is provided to support applications that don't -want to cope with grayscale as a separate case. -.TP -.BI \-scale " M/N" -Scale the output image by a factor M/N. Currently supported scale factors are -M/N with all M from 1 to 16, where N is the source DCT size, which is 8 for -baseline JPEG. If the /N part is omitted, then M specifies the DCT scaled -size to be applied on the given input. For baseline JPEG this is equivalent -to M/8 scaling, since the source DCT size for baseline JPEG is 8. -Scaling is handy if the image is larger than your screen; also, -.B djpeg -runs much faster when scaling down the output. -.TP -.B \-bmp -Select BMP output format (Windows flavor). -8-bit colormapped format is emitted if -.B \-colors -or -.B \-grayscale -is specified, or if the JPEG file is grayscale; otherwise, 24-bit full-color -format is emitted. -.TP -.B \-gif -Select GIF output format (LZW compressed). -Since GIF does not support more than 256 colors, -.B \-colors 256 -is assumed (unless you specify a smaller number of colors). If you specify -.BR \-fast , -the default number of colors is 216. -.TP -.B \-gif0 -Select GIF output format (uncompressed). -Since GIF does not support more than 256 colors, -.B \-colors 256 -is assumed (unless you specify a smaller number of colors). If you specify -.BR \-fast , -the default number of colors is 216. -.TP -.B \-os2 -Select BMP output format (OS/2 1.x flavor). -8-bit colormapped format is emitted if -.B \-colors -or -.B \-grayscale -is specified, or if the JPEG file is grayscale; otherwise, 24-bit full-color -format is emitted. -.TP -.B \-pnm -Select PBMPLUS (PPM/PGM) output format (this is the default format). -PGM is emitted if the JPEG file is grayscale or if -.B \-grayscale -is specified; otherwise PPM is emitted. -.TP -.B \-rle -Select RLE output format. (Requires URT library.) -.TP -.B \-targa -Select Targa output format. Grayscale format is emitted if the JPEG file is -grayscale or if -.B \-grayscale -is specified; otherwise, colormapped format is emitted if -.B \-colors -is specified; otherwise, 24-bit full-color format is emitted. -.PP -Switches for advanced users: -.TP -.B \-dct int -Use integer DCT method (default). -.TP -.B \-dct fast -Use fast integer DCT (less accurate). -.TP -.B \-dct float -Use floating-point DCT method. -The float method is very slightly more accurate than the int method, but is -much slower unless your machine has very fast floating-point hardware. Also -note that results of the floating-point method may vary slightly across -machines, while the integer methods should give the same results everywhere. -The fast integer method is much less accurate than the other two. -.TP -.B \-dither fs -Use Floyd-Steinberg dithering in color quantization. -.TP -.B \-dither ordered -Use ordered dithering in color quantization. -.TP -.B \-dither none -Do not use dithering in color quantization. -By default, Floyd-Steinberg dithering is applied when quantizing colors; this -is slow but usually produces the best results. Ordered dither is a compromise -between speed and quality; no dithering is fast but usually looks awful. Note -that these switches have no effect unless color quantization is being done. -Ordered dither is only available in -.B \-onepass -mode. -.TP -.BI \-map " file" -Quantize to the colors used in the specified image file. This is useful for -producing multiple files with identical color maps, or for forcing a -predefined set of colors to be used. The -.I file -must be a GIF or PPM file. This option overrides -.B \-colors -and -.BR \-onepass . -.TP -.B \-nosmooth -Don't use high-quality upsampling. -.TP -.B \-onepass -Use one-pass instead of two-pass color quantization. The one-pass method is -faster and needs less memory, but it produces a lower-quality image. -.B \-onepass -is ignored unless you also say -.B \-colors -.IR N . -Also, the one-pass method is always used for grayscale output (the two-pass -method is no improvement then). -.TP -.BI \-maxmemory " N" -Set limit for amount of memory to use in processing large images. Value is -in thousands of bytes, or millions of bytes if "M" is attached to the -number. For example, -.B \-max 4m -selects 4000000 bytes. If more space is needed, temporary files will be used. -.TP -.BI \-outfile " name" -Send output image to the named file, not to standard output. -.TP -.B \-verbose -Enable debug printout. More -.BR \-v 's -give more output. Also, version information is printed at startup. -.TP -.B \-debug -Same as -.BR \-verbose . -.SH EXAMPLES -.LP -This example decompresses the JPEG file foo.jpg, quantizes it to -256 colors, and saves the output in 8-bit BMP format in foo.bmp: -.IP -.B djpeg \-colors 256 \-bmp -.I foo.jpg -.B > -.I foo.bmp -.SH HINTS -To get a quick preview of an image, use the -.B \-grayscale -and/or -.B \-scale -switches. -.B \-grayscale \-scale 1/8 -is the fastest case. -.PP -Several options are available that trade off image quality to gain speed. -.B \-fast -turns on the recommended settings. -.PP -.B \-dct fast -and/or -.B \-nosmooth -gain speed at a small sacrifice in quality. -When producing a color-quantized image, -.B \-onepass \-dither ordered -is fast but much lower quality than the default behavior. -.B \-dither none -may give acceptable results in two-pass mode, but is seldom tolerable in -one-pass mode. -.PP -If you are fortunate enough to have very fast floating point hardware, -\fB\-dct float\fR may be even faster than \fB\-dct fast\fR. But on most -machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is -not worth using, because its theoretical accuracy advantage is too small to be -significant in practice. -.SH ENVIRONMENT -.TP -.B JPEGMEM -If this environment variable is set, its value is the default memory limit. -The value is specified as described for the -.B \-maxmemory -switch. -.B JPEGMEM -overrides the default value specified when the program was compiled, and -itself is overridden by an explicit -.BR \-maxmemory . -.SH SEE ALSO -.BR cjpeg (1), -.BR jpegtran (1), -.BR rdjpgcom (1), -.BR wrjpgcom (1) -.br -.BR ppm (5), -.BR pgm (5) -.br -Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. -.SH AUTHOR -Independent JPEG Group diff --git a/thirdparty/jpeg-9e/djpeg.c b/thirdparty/jpeg-9e/djpeg.c deleted file mode 100644 index a01b396..0000000 --- a/thirdparty/jpeg-9e/djpeg.c +++ /dev/null @@ -1,631 +0,0 @@ -/* - * djpeg.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2009-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a command-line user interface for the JPEG decompressor. - * It should work on any system with Unix- or MS-DOS-style command lines. - * - * Two different command line styles are permitted, depending on the - * compile-time switch TWO_FILE_COMMANDLINE: - * djpeg [options] inputfile outputfile - * djpeg [options] [inputfile] - * In the second style, output is always to standard output, which you'd - * normally redirect to a file or pipe to some other program. Input is - * either from a named file or from standard input (typically redirected). - * The second style is convenient on Unix but is unhelpful on systems that - * don't support pipes. Also, you MUST use the first style if your system - * doesn't do binary I/O to stdin/stdout. - * To simplify script writing, the "-outfile" switch is provided. The syntax - * djpeg [options] -outfile outputfile inputfile - * works regardless of which command line style is used. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include "jversion.h" /* for version message */ - -#include /* to declare isprint() */ - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - - -/* Create the add-on message string table. */ - -#define JMESSAGE(code,string) string , - -static const char * const cdjpeg_message_table[] = { -#include "cderror.h" - NULL -}; - - -/* - * This list defines the known output image formats - * (not all of which need be supported by a given version). - * You can change the default output format by defining DEFAULT_FMT; - * indeed, you had better do so if you undefine PPM_SUPPORTED. - */ - -typedef enum { - FMT_BMP, /* BMP format (Windows flavor) */ - FMT_GIF, /* GIF format (LZW compressed) */ - FMT_GIF0, /* GIF format (uncompressed) */ - FMT_OS2, /* BMP format (OS/2 flavor) */ - FMT_PPM, /* PPM/PGM (PBMPLUS formats) */ - FMT_RLE, /* RLE format */ - FMT_TARGA, /* Targa format */ - FMT_TIFF /* TIFF format */ -} IMAGE_FORMATS; - -#ifndef DEFAULT_FMT /* so can override from CFLAGS in Makefile */ -#define DEFAULT_FMT FMT_PPM -#endif - -static IMAGE_FORMATS requested_fmt; - - -/* - * Argument-parsing code. - * The switch parser is designed to be useful with DOS-style command line - * syntax, ie, intermixed switches and file names, where only the switches - * to the left of a given file name affect processing of that file. - * The main program in this file doesn't actually use this capability... - */ - - -static const char * progname; /* program name for error messages */ -static char * outfilename; /* for -outfile switch */ - - -LOCAL(void) -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -colors N Reduce image to no more than N colors\n"); - fprintf(stderr, " -fast Fast, low-quality processing\n"); - fprintf(stderr, " -grayscale Force grayscale output\n"); - fprintf(stderr, " -rgb Force RGB output\n"); -#ifdef IDCT_SCALING_SUPPORTED - fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n"); -#endif -#ifdef BMP_SUPPORTED - fprintf(stderr, " -bmp Select BMP output format (Windows style)%s\n", - (DEFAULT_FMT == FMT_BMP ? " (default)" : "")); -#endif -#ifdef GIF_SUPPORTED - fprintf(stderr, " -gif Select GIF output format (LZW compressed)%s\n", - (DEFAULT_FMT == FMT_GIF ? " (default)" : "")); - fprintf(stderr, " -gif0 Select GIF output format (uncompressed)%s\n", - (DEFAULT_FMT == FMT_GIF0 ? " (default)" : "")); -#endif -#ifdef BMP_SUPPORTED - fprintf(stderr, " -os2 Select BMP output format (OS/2 style)%s\n", - (DEFAULT_FMT == FMT_OS2 ? " (default)" : "")); -#endif -#ifdef PPM_SUPPORTED - fprintf(stderr, " -pnm Select PBMPLUS (PPM/PGM) output format%s\n", - (DEFAULT_FMT == FMT_PPM ? " (default)" : "")); -#endif -#ifdef RLE_SUPPORTED - fprintf(stderr, " -rle Select Utah RLE output format%s\n", - (DEFAULT_FMT == FMT_RLE ? " (default)" : "")); -#endif -#ifdef TARGA_SUPPORTED - fprintf(stderr, " -targa Select Targa output format%s\n", - (DEFAULT_FMT == FMT_TARGA ? " (default)" : "")); -#endif - fprintf(stderr, "Switches for advanced users:\n"); -#ifdef DCT_ISLOW_SUPPORTED - fprintf(stderr, " -dct int Use integer DCT method%s\n", - (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); -#endif -#ifdef DCT_IFAST_SUPPORTED - fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", - (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); -#endif -#ifdef DCT_FLOAT_SUPPORTED - fprintf(stderr, " -dct float Use floating-point DCT method%s\n", - (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); -#endif - fprintf(stderr, " -dither fs Use F-S dithering (default)\n"); - fprintf(stderr, " -dither none Don't use dithering in quantization\n"); - fprintf(stderr, " -dither ordered Use ordered dither (medium speed, quality)\n"); -#ifdef QUANT_2PASS_SUPPORTED - fprintf(stderr, " -map FILE Map to colors used in named image file\n"); -#endif - fprintf(stderr, " -nosmooth Don't use high-quality upsampling\n"); -#ifdef QUANT_1PASS_SUPPORTED - fprintf(stderr, " -onepass Use 1-pass quantization (fast, low quality)\n"); -#endif - fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); - fprintf(stderr, " -outfile name Specify name for output file\n"); - fprintf(stderr, " -verbose or -debug Emit debug output\n"); - exit(EXIT_FAILURE); -} - - -LOCAL(int) -parse_switches (j_decompress_ptr cinfo, int argc, char **argv, - int last_file_arg_seen, boolean for_real) -/* Parse optional switches. - * Returns argv[] index of first file-name argument (== argc if none). - * Any file names with indexes <= last_file_arg_seen are ignored; - * they have presumably been processed in a previous iteration. - * (Pass 0 for last_file_arg_seen on the first or only iteration.) - * for_real is FALSE on the first (dummy) pass; we may skip any expensive - * processing. - */ -{ - int argn; - char * arg; - - /* Set up default JPEG parameters. */ - requested_fmt = DEFAULT_FMT; /* set default output file format */ - outfilename = NULL; - cinfo->err->trace_level = 0; - - /* Scan command line options, adjust parameters */ - - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (*arg != '-') { - /* Not a switch, must be a file name argument */ - if (argn <= last_file_arg_seen) { - outfilename = NULL; /* -outfile applies to just one input file */ - continue; /* ignore this name if previously processed */ - } - break; /* else done parsing switches */ - } - arg++; /* advance past switch marker character */ - - if (keymatch(arg, "bmp", 1)) { - /* BMP output format (Windows flavor). */ - requested_fmt = FMT_BMP; - - } else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) || - keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) { - /* Do color quantization. */ - int val; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &val) != 1) - usage(); - cinfo->desired_number_of_colors = val; - cinfo->quantize_colors = TRUE; - - } else if (keymatch(arg, "dct", 2)) { - /* Select IDCT algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "int", 1)) { - cinfo->dct_method = JDCT_ISLOW; - } else if (keymatch(argv[argn], "fast", 2)) { - cinfo->dct_method = JDCT_IFAST; - } else if (keymatch(argv[argn], "float", 2)) { - cinfo->dct_method = JDCT_FLOAT; - } else - usage(); - - } else if (keymatch(arg, "dither", 2)) { - /* Select dithering algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "fs", 2)) { - cinfo->dither_mode = JDITHER_FS; - } else if (keymatch(argv[argn], "none", 2)) { - cinfo->dither_mode = JDITHER_NONE; - } else if (keymatch(argv[argn], "ordered", 2)) { - cinfo->dither_mode = JDITHER_ORDERED; - } else - usage(); - - } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { - /* Enable debug printouts. */ - /* On first -d, print version identification */ - static boolean printed_version = FALSE; - - if (! printed_version) { - fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n", - JVERSION, JCOPYRIGHT); - printed_version = TRUE; - } - cinfo->err->trace_level++; - - } else if (keymatch(arg, "fast", 1)) { - /* Select recommended processing options for quick-and-dirty output. */ - cinfo->two_pass_quantize = FALSE; - cinfo->dither_mode = JDITHER_ORDERED; - if (! cinfo->quantize_colors) /* don't override an earlier -colors */ - cinfo->desired_number_of_colors = 216; - cinfo->dct_method = JDCT_FASTEST; - cinfo->do_fancy_upsampling = FALSE; - - } else if (keymatch(arg, "gif", 1)) { - /* GIF output format (LZW compressed). */ - requested_fmt = FMT_GIF; - - } else if (keymatch(arg, "gif0", 4)) { - /* GIF output format (uncompressed). */ - requested_fmt = FMT_GIF0; - - } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { - /* Force monochrome output. */ - cinfo->out_color_space = JCS_GRAYSCALE; - - } else if (keymatch(arg, "rgb", 3)) { - /* Force RGB output. */ - cinfo->out_color_space = JCS_RGB; - - } else if (keymatch(arg, "map", 3)) { - /* Quantize to a color map taken from an input file. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (for_real) { /* too expensive to do twice! */ -#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ - FILE * mapfile; - - if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - read_color_map(cinfo, mapfile); - fclose(mapfile); - cinfo->quantize_colors = TRUE; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } - - } else if (keymatch(arg, "maxmemory", 3)) { - /* Maximum memory in Kb (or Mb with 'm'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (ch == 'm' || ch == 'M') - lval *= 1000L; - cinfo->mem->max_memory_to_use = lval * 1000L; - - } else if (keymatch(arg, "nosmooth", 3)) { - /* Suppress fancy upsampling. */ - cinfo->do_fancy_upsampling = FALSE; - - } else if (keymatch(arg, "onepass", 3)) { - /* Use fast one-pass quantization. */ - cinfo->two_pass_quantize = FALSE; - - } else if (keymatch(arg, "os2", 3)) { - /* BMP output format (OS/2 flavor). */ - requested_fmt = FMT_OS2; - - } else if (keymatch(arg, "outfile", 4)) { - /* Set output file name. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - outfilename = argv[argn]; /* save it away for later use */ - - } else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) { - /* PPM/PGM output format. */ - requested_fmt = FMT_PPM; - - } else if (keymatch(arg, "rle", 1)) { - /* RLE output format. */ - requested_fmt = FMT_RLE; - - } else if (keymatch(arg, "scale", 1)) { - /* Scale the output image by a fraction M/N. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%u/%u", - &cinfo->scale_num, &cinfo->scale_denom) < 1) - usage(); - - } else if (keymatch(arg, "targa", 1)) { - /* Targa output format. */ - requested_fmt = FMT_TARGA; - - } else { - usage(); /* bogus switch */ - } - } - - return argn; /* return index of next arg (file name) */ -} - - -/* - * Marker processor for COM and interesting APPn markers. - * This replaces the library's built-in processor, which just skips the marker. - * We want to print out the marker as text, to the extent possible. - * Note this code relies on a non-suspending data source. - */ - -LOCAL(unsigned int) -jpeg_getc (j_decompress_ptr cinfo) -/* Read next byte */ -{ - struct jpeg_source_mgr * datasrc = cinfo->src; - - if (datasrc->bytes_in_buffer == 0) { - if (! (*datasrc->fill_input_buffer) (cinfo)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - } - datasrc->bytes_in_buffer--; - return GETJOCTET(*datasrc->next_input_byte++); -} - - -METHODDEF(boolean) -print_text_marker (j_decompress_ptr cinfo) -{ - boolean traceit = (cinfo->err->trace_level >= 1); - INT32 length; - unsigned int ch; - unsigned int lastch = 0; - - length = jpeg_getc(cinfo) << 8; - length += jpeg_getc(cinfo); - length -= 2; /* discount the length word itself */ - - if (traceit) { - if (cinfo->unread_marker == JPEG_COM) - fprintf(stderr, "Comment, length %ld:\n", (long) length); - else /* assume it is an APPn otherwise */ - fprintf(stderr, "APP%d, length %ld:\n", - cinfo->unread_marker - JPEG_APP0, (long) length); - } - - while (--length >= 0) { - ch = jpeg_getc(cinfo); - if (traceit) { - /* Emit the character in a readable form. - * Nonprintables are converted to \nnn form, - * while \ is converted to \\. - * Newlines in CR, CR/LF, or LF form will be printed as one newline. - */ - if (ch == '\r') { - fprintf(stderr, "\n"); - } else if (ch == '\n') { - if (lastch != '\r') - fprintf(stderr, "\n"); - } else if (ch == '\\') { - fprintf(stderr, "\\\\"); - } else if (isprint(ch)) { - putc(ch, stderr); - } else { - fprintf(stderr, "\\%03o", ch); - } - lastch = ch; - } - } - - if (traceit) - fprintf(stderr, "\n"); - - return TRUE; -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; -#ifdef PROGRESS_REPORT - struct cdjpeg_progress_mgr progress; -#endif - int file_index; - djpeg_dest_ptr dest_mgr = NULL; - FILE * input_file; - FILE * output_file; - JDIMENSION num_scanlines; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "djpeg"; /* in case C library doesn't provide it */ - - /* Initialize the JPEG decompression object with default error handling. */ - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_decompress(&cinfo); - /* Add some application-specific error messages (from cderror.h) */ - jerr.addon_message_table = cdjpeg_message_table; - jerr.first_addon_message = JMSG_FIRSTADDONCODE; - jerr.last_addon_message = JMSG_LASTADDONCODE; - - /* Insert custom marker processor for COM and APP12. - * APP12 is used by some digital camera makers for textual info, - * so we provide the ability to display it as text. - * If you like, additional APPn marker types can be selected for display, - * but don't try to override APP0 or APP14 this way (see libjpeg.txt). - */ - jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker); - jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker); - - /* Now safe to enable signal catcher. */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) &cinfo); -#endif - - /* Scan command line to find file names. */ - /* It is convenient to use just one switch-parsing routine, but the switch - * values read here are ignored; we will rescan the switches after opening - * the input file. - * (Exception: tracing level set here controls verbosity for COM markers - * found during jpeg_read_header...) - */ - - file_index = parse_switches(&cinfo, argc, argv, 0, FALSE); - -#ifdef TWO_FILE_COMMANDLINE - /* Must have either -outfile switch or explicit output file name */ - if (outfilename == NULL) { - if (file_index != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - outfilename = argv[file_index+1]; - } else { - if (file_index != argc-1) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - } -#else - /* Unix style: expect zero or one file name */ - if (file_index < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } -#endif /* TWO_FILE_COMMANDLINE */ - - /* Open the input file. */ - if (file_index < argc) { - if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ - input_file = read_stdin(); - } - - /* Open the output file. */ - if (outfilename != NULL) { - if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, outfilename); - exit(EXIT_FAILURE); - } - } else { - /* default output file is stdout */ - output_file = write_stdout(); - } - -#ifdef PROGRESS_REPORT - start_progress_monitor((j_common_ptr) &cinfo, &progress); -#endif - - /* Specify data source for decompression */ - jpeg_stdio_src(&cinfo, input_file); - - /* Read file header, set default decompression parameters */ - (void) jpeg_read_header(&cinfo, TRUE); - - /* Adjust default decompression parameters by re-parsing the options */ - file_index = parse_switches(&cinfo, argc, argv, 0, TRUE); - - /* Initialize the output module now to let it override any crucial - * option settings (for instance, GIF wants to force color quantization). - */ - switch (requested_fmt) { -#ifdef BMP_SUPPORTED - case FMT_BMP: - dest_mgr = jinit_write_bmp(&cinfo, FALSE); - break; - case FMT_OS2: - dest_mgr = jinit_write_bmp(&cinfo, TRUE); - break; -#endif -#ifdef GIF_SUPPORTED - case FMT_GIF: - dest_mgr = jinit_write_gif(&cinfo, TRUE); - break; - case FMT_GIF0: - dest_mgr = jinit_write_gif(&cinfo, FALSE); - break; -#endif -#ifdef PPM_SUPPORTED - case FMT_PPM: - dest_mgr = jinit_write_ppm(&cinfo); - break; -#endif -#ifdef RLE_SUPPORTED - case FMT_RLE: - dest_mgr = jinit_write_rle(&cinfo); - break; -#endif -#ifdef TARGA_SUPPORTED - case FMT_TARGA: - dest_mgr = jinit_write_targa(&cinfo); - break; -#endif - default: - ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT); - } - dest_mgr->output_file = output_file; - - /* Start decompressor */ - (void) jpeg_start_decompress(&cinfo); - - /* Write output file header */ - (*dest_mgr->start_output) (&cinfo, dest_mgr); - - /* Process data */ - while (cinfo.output_scanline < cinfo.output_height) { - num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer, - dest_mgr->buffer_height); - (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines); - } - -#ifdef PROGRESS_REPORT - /* Hack: count final pass as done in case finish_output does an extra pass. - * The library won't have updated completed_passes. - */ - progress.pub.completed_passes = progress.pub.total_passes; -#endif - - /* Finish decompression and release memory. - * I must do it in this order because output module has allocated memory - * of lifespan JPOOL_IMAGE; it needs to finish before releasing memory. - */ - (*dest_mgr->finish_output) (&cinfo, dest_mgr); - (void) jpeg_finish_decompress(&cinfo); - jpeg_destroy_decompress(&cinfo); - - /* Close files, if we opened them */ - if (input_file != stdin) - fclose(input_file); - if (output_file != stdout) - fclose(output_file); - -#ifdef PROGRESS_REPORT - end_progress_monitor((j_common_ptr) &cinfo); -#endif - - /* All done. */ - exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/thirdparty/jpeg-9e/djpegalt.c b/thirdparty/jpeg-9e/djpegalt.c deleted file mode 100644 index da809ae..0000000 --- a/thirdparty/jpeg-9e/djpegalt.c +++ /dev/null @@ -1,766 +0,0 @@ -/* - * alternate djpeg.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2009-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains an alternate user interface for the JPEG decompressor. - * One or more input files are named on the command line, and output file - * names are created by substituting an appropriate extension. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include "jversion.h" /* for version message */ - -#include /* to declare isprint() */ - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - -#ifndef PATH_MAX /* ANSI maximum-pathname-length constant */ -#define PATH_MAX 256 -#endif - - -/* Create the add-on message string table. */ - -#define JMESSAGE(code,string) string , - -static const char * const cdjpeg_message_table[] = { -#include "cderror.h" - NULL -}; - - -/* - * Automatic determination of available memory. - */ - -static long default_maxmem; /* saves value determined at startup, or 0 */ - -#ifndef FREE_MEM_ESTIMATE /* may be defined from command line */ - -#ifdef MSDOS /* For MS-DOS (unless flat-memory model) */ - -#include /* for access to intdos() call */ - -LOCAL(long) -unused_dos_memory (void) -/* Obtain total amount of unallocated DOS memory */ -{ - union REGS regs; - long nparas; - - regs.h.ah = 0x48; /* DOS function Allocate Memory Block */ - regs.x.bx = 0xFFFF; /* Ask for more memory than DOS can have */ - (void) intdos(®s, ®s); - /* DOS will fail and return # of paragraphs actually available in BX. */ - nparas = (unsigned int) regs.x.bx; - /* Times 16 to convert to bytes. */ - return nparas << 4; -} - -/* The default memory setting is 95% of the available space. */ -#define FREE_MEM_ESTIMATE ((unused_dos_memory() * 95L) / 100L) - -#endif /* MSDOS */ - -#ifdef ATARI /* For Atari ST/STE/TT, Pure C or Turbo C */ - -#include - -/* The default memory setting is 90% of the available space. */ -#define FREE_MEM_ESTIMATE (((long) coreleft() * 90L) / 100L) - -#endif /* ATARI */ - -/* Add memory-estimation procedures for other operating systems here, - * with appropriate #ifdef's around them. - */ - -#endif /* !FREE_MEM_ESTIMATE */ - - -/* - * This list defines the known output image formats - * (not all of which need be supported by a given version). - * You can change the default output format by defining DEFAULT_FMT; - * indeed, you had better do so if you undefine PPM_SUPPORTED. - */ - -typedef enum { - FMT_BMP, /* BMP format (Windows flavor) */ - FMT_GIF, /* GIF format (LZW compressed) */ - FMT_GIF0, /* GIF format (uncompressed) */ - FMT_OS2, /* BMP format (OS/2 flavor) */ - FMT_PPM, /* PPM/PGM (PBMPLUS formats) */ - FMT_RLE, /* RLE format */ - FMT_TARGA, /* Targa format */ - FMT_TIFF /* TIFF format */ -} IMAGE_FORMATS; - -#ifndef DEFAULT_FMT /* so can override from CFLAGS in Makefile */ -#define DEFAULT_FMT FMT_BMP -#endif - -static IMAGE_FORMATS requested_fmt; - - -/* - * Argument-parsing code. - * The switch parser is designed to be useful with DOS-style command line - * syntax, ie, intermixed switches and file names, where only the switches - * to the left of a given file name affect processing of that file. - */ - - -static const char * progname; /* program name for error messages */ -static char * outfilename; /* for -outfile switch */ - - -LOCAL(void) -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "usage: %s [switches] inputfile(s)\n", progname); - fprintf(stderr, "List of input files may use wildcards (* and ?)\n"); - fprintf(stderr, "Output filename is same as input filename except for extension\n"); - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -colors N Reduce image to no more than N colors\n"); - fprintf(stderr, " -fast Fast, low-quality processing\n"); - fprintf(stderr, " -grayscale Force grayscale output\n"); - fprintf(stderr, " -rgb Force RGB output\n"); -#ifdef IDCT_SCALING_SUPPORTED - fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n"); -#endif -#ifdef BMP_SUPPORTED - fprintf(stderr, " -bmp Select BMP output format (Windows style)%s\n", - (DEFAULT_FMT == FMT_BMP ? " (default)" : "")); -#endif -#ifdef GIF_SUPPORTED - fprintf(stderr, " -gif Select GIF output format (LZW compressed)%s\n", - (DEFAULT_FMT == FMT_GIF ? " (default)" : "")); - fprintf(stderr, " -gif0 Select GIF output format (uncompressed)%s\n", - (DEFAULT_FMT == FMT_GIF0 ? " (default)" : "")); -#endif -#ifdef BMP_SUPPORTED - fprintf(stderr, " -os2 Select BMP output format (OS/2 style)%s\n", - (DEFAULT_FMT == FMT_OS2 ? " (default)" : "")); -#endif -#ifdef PPM_SUPPORTED - fprintf(stderr, " -pnm Select PBMPLUS (PPM/PGM) output format%s\n", - (DEFAULT_FMT == FMT_PPM ? " (default)" : "")); -#endif -#ifdef RLE_SUPPORTED - fprintf(stderr, " -rle Select Utah RLE output format%s\n", - (DEFAULT_FMT == FMT_RLE ? " (default)" : "")); -#endif -#ifdef TARGA_SUPPORTED - fprintf(stderr, " -targa Select Targa output format%s\n", - (DEFAULT_FMT == FMT_TARGA ? " (default)" : "")); -#endif - fprintf(stderr, "Switches for advanced users:\n"); -#ifdef DCT_ISLOW_SUPPORTED - fprintf(stderr, " -dct int Use integer DCT method%s\n", - (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); -#endif -#ifdef DCT_IFAST_SUPPORTED - fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", - (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); -#endif -#ifdef DCT_FLOAT_SUPPORTED - fprintf(stderr, " -dct float Use floating-point DCT method%s\n", - (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); -#endif - fprintf(stderr, " -dither fs Use F-S dithering (default)\n"); - fprintf(stderr, " -dither none Don't use dithering in quantization\n"); - fprintf(stderr, " -dither ordered Use ordered dither (medium speed, quality)\n"); -#ifdef QUANT_2PASS_SUPPORTED - fprintf(stderr, " -map FILE Map to colors used in named image file\n"); -#endif - fprintf(stderr, " -nosmooth Don't use high-quality upsampling\n"); -#ifdef QUANT_1PASS_SUPPORTED - fprintf(stderr, " -onepass Use 1-pass quantization (fast, low quality)\n"); -#endif -#ifndef FREE_MEM_ESTIMATE - fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); -#endif - fprintf(stderr, " -outfile name Specify name for output file\n"); - fprintf(stderr, " -verbose or -debug Emit debug output\n"); - exit(EXIT_FAILURE); -} - - -LOCAL(int) -parse_switches (j_decompress_ptr cinfo, int argc, char **argv, - int last_file_arg_seen, boolean for_real) -/* Parse optional switches. - * Returns argv[] index of first file-name argument (== argc if none). - * Any file names with indexes <= last_file_arg_seen are ignored; - * they have presumably been processed in a previous iteration. - * (Pass 0 for last_file_arg_seen on the first or only iteration.) - * for_real is FALSE on the first (dummy) pass; we may skip any expensive - * processing. - */ -{ - int argn; - char * arg; - - /* Set up default JPEG parameters. */ - requested_fmt = DEFAULT_FMT; /* set default output file format */ - outfilename = NULL; - cinfo->err->trace_level = 0; - if (default_maxmem > 0) /* override library's default value */ - cinfo->mem->max_memory_to_use = default_maxmem; - - /* Scan command line options, adjust parameters */ - - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (*arg != '-') { - /* Not a switch, must be a file name argument */ - if (argn <= last_file_arg_seen) { - outfilename = NULL; /* -outfile applies to just one input file */ - continue; /* ignore this name if previously processed */ - } - break; /* else done parsing switches */ - } - arg++; /* advance past switch marker character */ - - if (keymatch(arg, "bmp", 1)) { - /* BMP output format (Windows flavor). */ - requested_fmt = FMT_BMP; - - } else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) || - keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) { - /* Do color quantization. */ - int val; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &val) != 1) - usage(); - cinfo->desired_number_of_colors = val; - cinfo->quantize_colors = TRUE; - - } else if (keymatch(arg, "dct", 2)) { - /* Select IDCT algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "int", 1)) { - cinfo->dct_method = JDCT_ISLOW; - } else if (keymatch(argv[argn], "fast", 2)) { - cinfo->dct_method = JDCT_IFAST; - } else if (keymatch(argv[argn], "float", 2)) { - cinfo->dct_method = JDCT_FLOAT; - } else - usage(); - - } else if (keymatch(arg, "dither", 2)) { - /* Select dithering algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "fs", 2)) { - cinfo->dither_mode = JDITHER_FS; - } else if (keymatch(argv[argn], "none", 2)) { - cinfo->dither_mode = JDITHER_NONE; - } else if (keymatch(argv[argn], "ordered", 2)) { - cinfo->dither_mode = JDITHER_ORDERED; - } else - usage(); - - } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { - /* Enable debug printouts. */ - /* On first -d, print version identification */ - static boolean printed_version = FALSE; - - if (! printed_version) { - fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n", - JVERSION, JCOPYRIGHT); - printed_version = TRUE; - } - cinfo->err->trace_level++; - - } else if (keymatch(arg, "fast", 1)) { - /* Select recommended processing options for quick-and-dirty output. */ - cinfo->two_pass_quantize = FALSE; - cinfo->dither_mode = JDITHER_ORDERED; - if (! cinfo->quantize_colors) /* don't override an earlier -colors */ - cinfo->desired_number_of_colors = 216; - cinfo->dct_method = JDCT_FASTEST; - cinfo->do_fancy_upsampling = FALSE; - - } else if (keymatch(arg, "gif", 1)) { - /* GIF output format (LZW compressed). */ - requested_fmt = FMT_GIF; - - } else if (keymatch(arg, "gif0", 4)) { - /* GIF output format (uncompressed). */ - requested_fmt = FMT_GIF0; - - } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { - /* Force monochrome output. */ - cinfo->out_color_space = JCS_GRAYSCALE; - - } else if (keymatch(arg, "rgb", 3)) { - /* Force RGB output. */ - cinfo->out_color_space = JCS_RGB; - - } else if (keymatch(arg, "map", 3)) { - /* Quantize to a color map taken from an input file. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (for_real) { /* too expensive to do twice! */ -#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ - FILE * mapfile; - - if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - read_color_map(cinfo, mapfile); - fclose(mapfile); - cinfo->quantize_colors = TRUE; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } - - } else if (keymatch(arg, "maxmemory", 3)) { - /* Maximum memory in Kb (or Mb with 'm'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (ch == 'm' || ch == 'M') - lval *= 1000L; - cinfo->mem->max_memory_to_use = lval * 1000L; - - } else if (keymatch(arg, "nosmooth", 3)) { - /* Suppress fancy upsampling. */ - cinfo->do_fancy_upsampling = FALSE; - - } else if (keymatch(arg, "onepass", 3)) { - /* Use fast one-pass quantization. */ - cinfo->two_pass_quantize = FALSE; - - } else if (keymatch(arg, "os2", 3)) { - /* BMP output format (OS/2 flavor). */ - requested_fmt = FMT_OS2; - - } else if (keymatch(arg, "outfile", 4)) { - /* Set output file name. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - outfilename = argv[argn]; /* save it away for later use */ - - } else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) { - /* PPM/PGM output format. */ - requested_fmt = FMT_PPM; - - } else if (keymatch(arg, "rle", 1)) { - /* RLE output format. */ - requested_fmt = FMT_RLE; - - } else if (keymatch(arg, "scale", 1)) { - /* Scale the output image by a fraction M/N. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%u/%u", - &cinfo->scale_num, &cinfo->scale_denom) < 1) - usage(); - - } else if (keymatch(arg, "targa", 1)) { - /* Targa output format. */ - requested_fmt = FMT_TARGA; - - } else { - usage(); /* bogus switch */ - } - } - - return argn; /* return index of next arg (file name) */ -} - - -/* - * Marker processor for COM and interesting APPn markers. - * This replaces the library's built-in processor, which just skips the marker. - * We want to print out the marker as text, to the extent possible. - * Note this code relies on a non-suspending data source. - */ - -LOCAL(unsigned int) -jpeg_getc (j_decompress_ptr cinfo) -/* Read next byte */ -{ - struct jpeg_source_mgr * datasrc = cinfo->src; - - if (datasrc->bytes_in_buffer == 0) { - if (! (*datasrc->fill_input_buffer) (cinfo)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - } - datasrc->bytes_in_buffer--; - return GETJOCTET(*datasrc->next_input_byte++); -} - - -METHODDEF(boolean) -print_text_marker (j_decompress_ptr cinfo) -{ - boolean traceit = (cinfo->err->trace_level >= 1); - INT32 length; - unsigned int ch; - unsigned int lastch = 0; - - length = jpeg_getc(cinfo) << 8; - length += jpeg_getc(cinfo); - length -= 2; /* discount the length word itself */ - - if (traceit) { - if (cinfo->unread_marker == JPEG_COM) - fprintf(stderr, "Comment, length %ld:\n", (long) length); - else /* assume it is an APPn otherwise */ - fprintf(stderr, "APP%d, length %ld:\n", - cinfo->unread_marker - JPEG_APP0, (long) length); - } - - while (--length >= 0) { - ch = jpeg_getc(cinfo); - if (traceit) { - /* Emit the character in a readable form. - * Nonprintables are converted to \nnn form, - * while \ is converted to \\. - * Newlines in CR, CR/LF, or LF form will be printed as one newline. - */ - if (ch == '\r') { - fprintf(stderr, "\n"); - } else if (ch == '\n') { - if (lastch != '\r') - fprintf(stderr, "\n"); - } else if (ch == '\\') { - fprintf(stderr, "\\\\"); - } else if (isprint(ch)) { - putc(ch, stderr); - } else { - fprintf(stderr, "\\%03o", ch); - } - lastch = ch; - } - } - - if (traceit) - fprintf(stderr, "\n"); - - return TRUE; -} - - -/* - * Check for overwrite of an existing file; clear it with user - */ - -#ifndef NO_OVERWRITE_CHECK - -LOCAL(boolean) -is_write_ok (char * outfname) -{ - FILE * ofile; - int ch; - - ofile = fopen(outfname, READ_BINARY); - if (ofile == NULL) - return TRUE; /* not present */ - fclose(ofile); /* oops, it is present */ - - for (;;) { - fprintf(stderr, "%s already exists, overwrite it? [y/n] ", - outfname); - fflush(stderr); - ch = getc(stdin); - if (ch != '\n') /* flush rest of line */ - while (getc(stdin) != '\n') - /* nothing */; - - switch (ch) { - case 'Y': - case 'y': - return TRUE; - case 'N': - case 'n': - return FALSE; - /* otherwise, ask again */ - } - } -} - -#endif - - -/* - * Process a single input file name, and return its index in argv[]. - * File names at or to left of old_file_index have been processed already. - */ - -LOCAL(int) -process_one_file (int argc, char **argv, int old_file_index) -{ - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; - char *infilename; - char workfilename[PATH_MAX]; - const char *default_extension = NULL; -#ifdef PROGRESS_REPORT - struct cdjpeg_progress_mgr progress; -#endif - int file_index; - djpeg_dest_ptr dest_mgr = NULL; - FILE * input_file = NULL; - FILE * output_file = NULL; - JDIMENSION num_scanlines; - - /* Initialize the JPEG decompression object with default error handling. */ - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_decompress(&cinfo); - /* Add some application-specific error messages (from cderror.h) */ - jerr.addon_message_table = cdjpeg_message_table; - jerr.first_addon_message = JMSG_FIRSTADDONCODE; - jerr.last_addon_message = JMSG_LASTADDONCODE; - - /* Insert custom marker processor for COM and APP12. - * APP12 is used by some digital camera makers for textual info, - * so we provide the ability to display it as text. - * If you like, additional APPn marker types can be selected for display, - * but don't try to override APP0 or APP14 this way (see libjpeg.txt). - */ - jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker); - jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker); - - /* Now safe to enable signal catcher. */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) &cinfo); -#endif - - /* Scan command line to find next file name. - * It is convenient to use just one switch-parsing routine, but the switch - * values read here are ignored; we will rescan the switches after opening - * the input file. - * (Exception: tracing level set here controls verbosity for COM markers - * found during jpeg_read_header...) - */ - - file_index = parse_switches(&cinfo, argc, argv, old_file_index, FALSE); - if (file_index >= argc) { - fprintf(stderr, "%s: missing input file name\n", progname); - usage(); - } - - /* Open the input file. */ - infilename = argv[file_index]; - if ((input_file = fopen(infilename, READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, infilename); - goto fail; - } - -#ifdef PROGRESS_REPORT - start_progress_monitor((j_common_ptr) &cinfo, &progress); -#endif - - /* Specify data source for decompression */ - jpeg_stdio_src(&cinfo, input_file); - - /* Read file header, set default decompression parameters */ - (void) jpeg_read_header(&cinfo, TRUE); - - /* Adjust default decompression parameters by re-parsing the options */ - file_index = parse_switches(&cinfo, argc, argv, old_file_index, TRUE); - - /* Initialize the output module now to let it override any crucial - * option settings (for instance, GIF wants to force color quantization). - */ - switch (requested_fmt) { -#ifdef BMP_SUPPORTED - case FMT_BMP: - dest_mgr = jinit_write_bmp(&cinfo, FALSE); - default_extension = ".bmp"; - break; - case FMT_OS2: - dest_mgr = jinit_write_bmp(&cinfo, TRUE); - default_extension = ".bmp"; - break; -#endif -#ifdef GIF_SUPPORTED - case FMT_GIF: - dest_mgr = jinit_write_gif(&cinfo, TRUE); - default_extension = ".gif"; - break; - case FMT_GIF0: - dest_mgr = jinit_write_gif(&cinfo, FALSE); - default_extension = ".gif"; - break; -#endif -#ifdef PPM_SUPPORTED - case FMT_PPM: - dest_mgr = jinit_write_ppm(&cinfo); - default_extension = ".ppm"; - break; -#endif -#ifdef RLE_SUPPORTED - case FMT_RLE: - dest_mgr = jinit_write_rle(&cinfo); - default_extension = ".rle"; - break; -#endif -#ifdef TARGA_SUPPORTED - case FMT_TARGA: - dest_mgr = jinit_write_targa(&cinfo); - default_extension = ".tga"; - break; -#endif - default: - ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT); - } - - /* If user didn't supply -outfile switch, select output file name. */ - if (outfilename == NULL) { - int i; - - outfilename = workfilename; - /* Make outfilename be infilename with appropriate extension */ - strcpy(outfilename, infilename); - for (i = (int)strlen(outfilename)-1; i >= 0; i--) { - switch (outfilename[i]) { - case ':': - case '/': - case '\\': - i = 0; /* stop scanning */ - break; - case '.': - outfilename[i] = '\0'; /* lop off existing extension */ - i = 0; /* stop scanning */ - break; - default: - break; /* keep scanning */ - } - } - strcat(outfilename, default_extension); - } - - fprintf(stderr, "Decompressing %s => %s\n", infilename, outfilename); -#ifndef NO_OVERWRITE_CHECK - if (! is_write_ok(outfilename)) - goto fail; -#endif - - /* Open the output file. */ - if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't create %s\n", progname, outfilename); - goto fail; - } - dest_mgr->output_file = output_file; - - /* Start decompressor */ - (void) jpeg_start_decompress(&cinfo); - - /* Write output file header */ - (*dest_mgr->start_output) (&cinfo, dest_mgr); - - /* Process data */ - while (cinfo.output_scanline < cinfo.output_height) { - num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer, - dest_mgr->buffer_height); - (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines); - } - -#ifdef PROGRESS_REPORT - /* Hack: count final pass as done in case finish_output does an extra pass. - * The library won't have updated completed_passes. - */ - progress.pub.completed_passes = progress.pub.total_passes; -#endif - - /* Finish decompression and release memory. - * I must do it in this order because output module has allocated memory - * of lifespan JPOOL_IMAGE; it needs to finish before releasing memory. - */ - (*dest_mgr->finish_output) (&cinfo, dest_mgr); - (void) jpeg_finish_decompress(&cinfo); - - /* Clean up and exit */ -fail: - jpeg_destroy_decompress(&cinfo); - - if (input_file != NULL) fclose(input_file); - if (output_file != NULL) fclose(output_file); - -#ifdef PROGRESS_REPORT - end_progress_monitor((j_common_ptr) &cinfo); -#endif - - /* Disable signal catcher. */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) NULL); -#endif - - return file_index; -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - int file_index; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - -#ifdef MSDOS - progname = "djpeg"; /* DOS tends to be too verbose about argv[0] */ -#else - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "djpeg"; /* in case C library doesn't provide it */ -#endif - - /* The default maxmem must be computed only once at program startup, - * since releasing memory with free() won't give it back to the OS. - */ -#ifdef FREE_MEM_ESTIMATE - default_maxmem = FREE_MEM_ESTIMATE; -#else - default_maxmem = 0; -#endif - - /* Scan command line, parse switches and locate input file names */ - - if (argc < 2) - usage(); /* nothing on the command line?? */ - - file_index = 0; - - while (file_index < argc-1) - file_index = process_one_file(argc, argv, file_index); - - /* All done. */ - exit(EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/thirdparty/jpeg-9e/example.c b/thirdparty/jpeg-9e/example.c deleted file mode 100644 index 1d6f6cc..0000000 --- a/thirdparty/jpeg-9e/example.c +++ /dev/null @@ -1,433 +0,0 @@ -/* - * example.c - * - * This file illustrates how to use the IJG code as a subroutine library - * to read or write JPEG image files. You should look at this code in - * conjunction with the documentation file libjpeg.txt. - * - * This code will not do anything useful as-is, but it may be helpful as a - * skeleton for constructing routines that call the JPEG library. - * - * We present these routines in the same coding style used in the JPEG code - * (ANSI function definitions, etc); but you are of course free to code your - * routines in a different style if you prefer. - */ - -#include - -/* - * Include file for users of JPEG library. - * You will need to have included system headers that define at least - * the typedefs FILE and size_t before you can include jpeglib.h. - * (stdio.h is sufficient on ANSI-conforming systems.) - * You may also wish to include "jerror.h". - */ - -#include "jpeglib.h" - -/* - * is used for the optional error recovery mechanism shown in - * the second part of the example. - */ - -#include - - - -/******************** JPEG COMPRESSION SAMPLE INTERFACE *******************/ - -/* This half of the example shows how to feed data into the JPEG compressor. - * We present a minimal version that does not worry about refinements such - * as error recovery (the JPEG code will just exit() if it gets an error). - */ - - -/* - * IMAGE DATA FORMATS: - * - * The standard input image format is a rectangular array of pixels, with - * each pixel having the same number of "component" values (color channels). - * Each pixel row is an array of JSAMPLEs (which typically are unsigned chars). - * If you are working with color data, then the color values for each pixel - * must be adjacent in the row; for example, R,G,B,R,G,B,R,G,B,... for 24-bit - * RGB color. - * - * For this example, we'll assume that this data structure matches the way - * our application has stored the image in memory, so we can just pass a - * pointer to our image buffer. In particular, let's say that the image is - * RGB color and is described by: - */ - -extern JSAMPLE * image_buffer; /* Points to large array of R,G,B-order data */ -extern int image_height; /* Number of rows in image */ -extern int image_width; /* Number of columns in image */ - - -/* - * Sample routine for JPEG compression. We assume that the target file name - * and a compression quality factor are passed in. - */ - -GLOBAL(void) -write_JPEG_file (char * filename, int quality) -{ - /* This struct contains the JPEG compression parameters and pointers to - * working space (which is allocated as needed by the JPEG library). - * It is possible to have several such structures, representing multiple - * compression/decompression processes, in existence at once. We refer - * to any one struct (and its associated working data) as a "JPEG object". - */ - struct jpeg_compress_struct cinfo; - /* This struct represents a JPEG error handler. It is declared separately - * because applications often want to supply a specialized error handler - * (see the second half of this file for an example). But here we just - * take the easy way out and use the standard error handler, which will - * print a message on stderr and call exit() if compression fails. - * Note that this struct must live as long as the main JPEG parameter - * struct, to avoid dangling-pointer problems. - */ - struct jpeg_error_mgr jerr; - /* More stuff */ - FILE * outfile; /* target file */ - JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ - int row_stride; /* physical row width in image buffer */ - - /* Step 1: allocate and initialize JPEG compression object */ - - /* We have to set up the error handler first, in case the initialization - * step fails. (Unlikely, but it could happen if you are out of memory.) - * This routine fills in the contents of struct jerr, and returns jerr's - * address which we place into the link field in cinfo. - */ - cinfo.err = jpeg_std_error(&jerr); - /* Now we can initialize the JPEG compression object. */ - jpeg_create_compress(&cinfo); - - /* Step 2: specify data destination (eg, a file) */ - /* Note: steps 2 and 3 can be done in either order. */ - - /* Here we use the library-supplied code to send compressed data to a - * stdio stream. You can also write your own code to do something else. - * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that - * requires it in order to write binary files. - */ - if ((outfile = fopen(filename, "wb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - exit(1); - } - jpeg_stdio_dest(&cinfo, outfile); - - /* Step 3: set parameters for compression */ - - /* First we supply a description of the input image. - * Four fields of the cinfo struct must be filled in: - */ - cinfo.image_width = image_width; /* image width and height, in pixels */ - cinfo.image_height = image_height; - cinfo.input_components = 3; /* # of color components per pixel */ - cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ - /* Now use the library's routine to set default compression parameters. - * (You must set at least cinfo.in_color_space before calling this, - * since the defaults depend on the source color space.) - */ - jpeg_set_defaults(&cinfo); - /* Now you can set any non-default parameters you wish to. - * Here we just illustrate the use of quality (quantization table) scaling: - */ - jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */); - - /* Step 4: Start compressor */ - - /* TRUE ensures that we will write a complete interchange-JPEG file. - * Pass TRUE unless you are very sure of what you're doing. - */ - jpeg_start_compress(&cinfo, TRUE); - - /* Step 5: while (scan lines remain to be written) */ - /* jpeg_write_scanlines(...); */ - - /* Here we use the library's state variable cinfo.next_scanline as the - * loop counter, so that we don't have to keep track ourselves. - * To keep things simple, we pass one scanline per call; you can pass - * more if you wish, though. - */ - row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */ - - while (cinfo.next_scanline < cinfo.image_height) { - /* jpeg_write_scanlines expects an array of pointers to scanlines. - * Here the array is only one element long, but you could pass - * more than one scanline at a time if that's more convenient. - */ - row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; - (void) jpeg_write_scanlines(&cinfo, row_pointer, 1); - } - - /* Step 6: Finish compression */ - - jpeg_finish_compress(&cinfo); - /* After finish_compress, we can close the output file. */ - fclose(outfile); - - /* Step 7: release JPEG compression object */ - - /* This is an important step since it will release a good deal of memory. */ - jpeg_destroy_compress(&cinfo); - - /* And we're done! */ -} - - -/* - * SOME FINE POINTS: - * - * In the above loop, we ignored the return value of jpeg_write_scanlines, - * which is the number of scanlines actually written. We could get away - * with this because we were only relying on the value of cinfo.next_scanline, - * which will be incremented correctly. If you maintain additional loop - * variables then you should be careful to increment them properly. - * Actually, for output to a stdio stream you needn't worry, because - * then jpeg_write_scanlines will write all the lines passed (or else exit - * with a fatal error). Partial writes can only occur if you use a data - * destination module that can demand suspension of the compressor. - * (If you don't know what that's for, you don't need it.) - * - * If the compressor requires full-image buffers (for entropy-coding - * optimization or a multi-scan JPEG file), it will create temporary - * files for anything that doesn't fit within the maximum-memory setting. - * (Note that temp files are NOT needed if you use the default parameters.) - * On some systems you may need to set up a signal handler to ensure that - * temporary files are deleted if the program is interrupted. See libjpeg.txt. - * - * Scanlines MUST be supplied in top-to-bottom order if you want your JPEG - * files to be compatible with everyone else's. If you cannot readily read - * your data in that order, you'll need an intermediate array to hold the - * image. See rdtarga.c or rdbmp.c for examples of handling bottom-to-top - * source data using the JPEG code's internal virtual-array mechanisms. - */ - - - -/******************** JPEG DECOMPRESSION SAMPLE INTERFACE *******************/ - -/* This half of the example shows how to read data from the JPEG decompressor. - * It's a bit more refined than the above, in that we show: - * (a) how to modify the JPEG library's standard error-reporting behavior; - * (b) how to allocate workspace using the library's memory manager. - * - * Just to make this example a little different from the first one, we'll - * assume that we do not intend to put the whole image into an in-memory - * buffer, but to send it line-by-line someplace else. We need a one- - * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG - * memory manager allocate it for us. This approach is actually quite useful - * because we don't need to remember to deallocate the buffer separately: it - * will go away automatically when the JPEG object is cleaned up. - */ - - -/* - * ERROR HANDLING: - * - * The JPEG library's standard error handler (jerror.c) is divided into - * several "methods" which you can override individually. This lets you - * adjust the behavior without duplicating a lot of code, which you might - * have to update with each future release. - * - * Our example here shows how to override the "error_exit" method so that - * control is returned to the library's caller when a fatal error occurs, - * rather than calling exit() as the standard error_exit method does. - * - * We use C's setjmp/longjmp facility to return control. This means that the - * routine which calls the JPEG library must first execute a setjmp() call to - * establish the return point. We want the replacement error_exit to do a - * longjmp(). But we need to make the setjmp buffer accessible to the - * error_exit routine. To do this, we make a private extension of the - * standard JPEG error handler object. (If we were using C++, we'd say we - * were making a subclass of the regular error handler.) - * - * Here's the extended error handler struct: - */ - -struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - - jmp_buf setjmp_buffer; /* for return to caller */ -}; - -typedef struct my_error_mgr * my_error_ptr; - -/* - * Here's the routine that will replace the standard error_exit method: - */ - -METHODDEF(void) -my_error_exit (j_common_ptr cinfo) -{ - /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ - my_error_ptr myerr = (my_error_ptr) cinfo->err; - - /* Always display the message. */ - /* We could postpone this until after returning, if we chose. */ - (*cinfo->err->output_message) (cinfo); - - /* Return control to the setjmp point */ - longjmp(myerr->setjmp_buffer, 1); -} - - -/* - * Sample routine for JPEG decompression. We assume that the source file name - * is passed in. We want to return 1 on success, 0 on error. - */ - - -GLOBAL(int) -read_JPEG_file (char * filename) -{ - /* This struct contains the JPEG decompression parameters and pointers to - * working space (which is allocated as needed by the JPEG library). - */ - struct jpeg_decompress_struct cinfo; - /* We use our private extension JPEG error handler. - * Note that this struct must live as long as the main JPEG parameter - * struct, to avoid dangling-pointer problems. - */ - struct my_error_mgr jerr; - /* More stuff */ - FILE * infile; /* source file */ - JSAMPARRAY buffer; /* Output row buffer */ - int row_stride; /* physical row width in output buffer */ - - /* In this example we want to open the input file before doing anything else, - * so that the setjmp() error recovery below can assume the file is open. - * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that - * requires it in order to read binary files. - */ - - if ((infile = fopen(filename, "rb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - return 0; - } - - /* Step 1: allocate and initialize JPEG decompression object */ - - /* We set up the normal JPEG error routines, then override error_exit. */ - cinfo.err = jpeg_std_error(&jerr.pub); - jerr.pub.error_exit = my_error_exit; - /* Establish the setjmp return context for my_error_exit to use. */ - if (setjmp(jerr.setjmp_buffer)) { - /* If we get here, the JPEG code has signaled an error. - * We need to clean up the JPEG object, close the input file, and return. - */ - jpeg_destroy_decompress(&cinfo); - fclose(infile); - return 0; - } - /* Now we can initialize the JPEG decompression object. */ - jpeg_create_decompress(&cinfo); - - /* Step 2: specify data source (eg, a file) */ - - jpeg_stdio_src(&cinfo, infile); - - /* Step 3: read file parameters with jpeg_read_header() */ - - (void) jpeg_read_header(&cinfo, TRUE); - /* We can ignore the return value from jpeg_read_header since - * (a) suspension is not possible with the stdio data source, and - * (b) we passed TRUE to reject a tables-only JPEG file as an error. - * See libjpeg.txt for more info. - */ - - /* Step 4: set parameters for decompression */ - - /* In this example, we don't need to change any of the defaults set by - * jpeg_read_header(), so we do nothing here. - */ - - /* Step 5: Start decompressor */ - - (void) jpeg_start_decompress(&cinfo); - /* We can ignore the return value since suspension is not possible - * with the stdio data source. - */ - - /* We may need to do some setup of our own at this point before reading - * the data. After jpeg_start_decompress() we have the correct scaled - * output image dimensions available, as well as the output colormap - * if we asked for color quantization. - * In this example, we need to make an output work buffer of the right size. - */ - /* JSAMPLEs per row in output buffer */ - row_stride = cinfo.output_width * cinfo.output_components; - /* Make a one-row-high sample array that will go away when done with image */ - buffer = (*cinfo.mem->alloc_sarray) - ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); - - /* Step 6: while (scan lines remain to be read) */ - /* jpeg_read_scanlines(...); */ - - /* Here we use the library's state variable cinfo.output_scanline as the - * loop counter, so that we don't have to keep track ourselves. - */ - while (cinfo.output_scanline < cinfo.output_height) { - /* jpeg_read_scanlines expects an array of pointers to scanlines. - * Here the array is only one element long, but you could ask for - * more than one scanline at a time if that's more convenient. - */ - (void) jpeg_read_scanlines(&cinfo, buffer, 1); - /* Assume put_scanline_someplace wants a pointer and sample count. */ - put_scanline_someplace(buffer[0], row_stride); - } - - /* Step 7: Finish decompression */ - - (void) jpeg_finish_decompress(&cinfo); - /* We can ignore the return value since suspension is not possible - * with the stdio data source. - */ - - /* Step 8: Release JPEG decompression object */ - - /* This is an important step since it will release a good deal of memory. */ - jpeg_destroy_decompress(&cinfo); - - /* After finish_decompress, we can close the input file. - * Here we postpone it until after no more JPEG errors are possible, - * so as to simplify the setjmp error logic above. (Actually, I don't - * think that jpeg_destroy can do an error exit, but why assume anything...) - */ - fclose(infile); - - /* At this point you may want to check to see whether any corrupt-data - * warnings occurred (test whether jerr.pub.num_warnings is nonzero). - */ - - /* And we're done! */ - return 1; -} - - -/* - * SOME FINE POINTS: - * - * In the above code, we ignored the return value of jpeg_read_scanlines, - * which is the number of scanlines actually read. We could get away with - * this because we asked for only one line at a time and we weren't using - * a suspending data source. See libjpeg.txt for more info. - * - * We cheated a bit by calling alloc_sarray() after jpeg_start_decompress(); - * we should have done it beforehand to ensure that the space would be - * counted against the JPEG max_memory setting. In some systems the above - * code would risk an out-of-memory error. However, in general we don't - * know the output image dimensions before jpeg_start_decompress(), unless we - * call jpeg_calc_output_dimensions(). See libjpeg.txt for more about this. - * - * Scanlines are returned in the same order as they appear in the JPEG file, - * which is standardly top-to-bottom. If you must emit data bottom-to-top, - * you can use one of the virtual arrays provided by the JPEG memory manager - * to invert the data. See wrbmp.c for an example. - * - * As with compression, some operating modes may require temporary files. - * On some systems you may need to set up a signal handler to ensure that - * temporary files are deleted if the program is interrupted. See libjpeg.txt. - */ diff --git a/thirdparty/jpeg-9e/filelist.txt b/thirdparty/jpeg-9e/filelist.txt deleted file mode 100644 index ddd681b..0000000 --- a/thirdparty/jpeg-9e/filelist.txt +++ /dev/null @@ -1,218 +0,0 @@ -IJG JPEG LIBRARY: FILE LIST - -Copyright (C) 1994-2020, Thomas G. Lane, Guido Vollbeding. -This file is part of the Independent JPEG Group's software. -For conditions of distribution and use, see the accompanying README file. - - -Here is a road map to the files in the IJG JPEG distribution. The -distribution includes the JPEG library proper, plus two application -programs ("cjpeg" and "djpeg") which use the library to convert JPEG -files to and from some other popular image formats. A third application -"jpegtran" uses the library to do lossless conversion between different -variants of JPEG. There are also two stand-alone applications, -"rdjpgcom" and "wrjpgcom". - - -THE JPEG LIBRARY -================ - -Include files: - -jpeglib.h JPEG library's exported data and function declarations. -jconfig.h Configuration declarations. Note: this file is not present - in the distribution; it is generated during installation. -jmorecfg.h Additional configuration declarations; need not be changed - for a standard installation. -jerror.h Declares JPEG library's error and trace message codes. -jinclude.h Central include file used by all IJG .c files to reference - system include files. -jpegint.h JPEG library's internal data structures. -jdct.h Private declarations for forward & reverse DCT subsystems. -jmemsys.h Private declarations for memory management subsystem. -jversion.h Version information. - -Applications using the library should include jpeglib.h (which in turn -includes jconfig.h and jmorecfg.h). Optionally, jerror.h may be included -if the application needs to reference individual JPEG error codes. The -other include files are intended for internal use and would not normally -be included by an application program. (cjpeg/djpeg/etc do use jinclude.h, -since its function is to improve portability of the whole IJG distribution. -Most other applications will directly include the system include files they -want, and hence won't need jinclude.h.) - - -C source code files: - -These files contain most of the functions intended to be called directly by -an application program: - -jcapimin.c Application program interface: core routines for compression. -jcapistd.c Application program interface: standard compression. -jdapimin.c Application program interface: core routines for decompression. -jdapistd.c Application program interface: standard decompression. -jcomapi.c Application program interface routines common to compression - and decompression. -jcparam.c Compression parameter setting helper routines. -jctrans.c API and library routines for transcoding compression. -jdtrans.c API and library routines for transcoding decompression. - -Compression side of the library: - -jcinit.c Initialization: determines which other modules to use. -jcmaster.c Master control: setup and inter-pass sequencing logic. -jcmainct.c Main buffer controller (preprocessor => JPEG compressor). -jcprepct.c Preprocessor buffer controller. -jccoefct.c Buffer controller for DCT coefficient buffer. -jccolor.c Color space conversion. -jcsample.c Downsampling. -jcdctmgr.c DCT manager (DCT implementation selection & control). -jfdctint.c Forward DCT using slow-but-accurate integer method. -jfdctfst.c Forward DCT using faster, less accurate integer method. -jfdctflt.c Forward DCT using floating-point arithmetic. -jchuff.c Huffman entropy coding. -jcarith.c Arithmetic entropy coding. -jcmarker.c JPEG marker writing. -jdatadst.c Data destination managers for memory and stdio output. - -Decompression side of the library: - -jdmaster.c Master control: determines which other modules to use. -jdinput.c Input controller: controls input processing modules. -jdmainct.c Main buffer controller (JPEG decompressor => postprocessor). -jdcoefct.c Buffer controller for DCT coefficient buffer. -jdpostct.c Postprocessor buffer controller. -jdmarker.c JPEG marker reading. -jdhuff.c Huffman entropy decoding. -jdarith.c Arithmetic entropy decoding. -jddctmgr.c IDCT manager (IDCT implementation selection & control). -jidctint.c Inverse DCT using slow-but-accurate integer method. -jidctfst.c Inverse DCT using faster, less accurate integer method. -jidctflt.c Inverse DCT using floating-point arithmetic. -jdsample.c Upsampling. -jdcolor.c Color space conversion. -jdmerge.c Merged upsampling/color conversion (faster, lower quality). -jquant1.c One-pass color quantization using a fixed-spacing colormap. -jquant2.c Two-pass color quantization using a custom-generated colormap. - Also handles one-pass quantization to an externally given map. -jdatasrc.c Data source managers for memory and stdio input. - -Support files for both compression and decompression: - -jaricom.c Tables for common use in arithmetic entropy encoding and - decoding routines. -jerror.c Standard error handling routines (application replaceable). -jmemmgr.c System-independent (more or less) memory management code. -jutils.c Miscellaneous utility routines. - -jmemmgr.c relies on a system-dependent memory management module. The IJG -distribution includes the following implementations of the system-dependent -module: - -jmemnobs.c "No backing store": assumes adequate virtual memory exists. -jmemansi.c Makes temporary files with ANSI-standard routine tmpfile(). -jmemname.c Makes temporary files with program-generated file names. -jmemdos.c Custom implementation for MS-DOS (16-bit environment only): - can use extended and expanded memory as well as temp files. -jmemmac.c Custom implementation for Apple Macintosh. - -Exactly one of the system-dependent modules should be configured into an -installed JPEG library (see install.txt for hints about which one to use). -On unusual systems you may find it worthwhile to make a special -system-dependent memory manager. - - -Non-C source code files: - -jmemdosa.asm 80x86 assembly code support for jmemdos.c; used only in - MS-DOS-specific configurations of the JPEG library. - - -CJPEG/DJPEG/JPEGTRAN -==================== - -Include files: - -cdjpeg.h Declarations shared by cjpeg/djpeg/jpegtran modules. -cderror.h Additional error and trace message codes for cjpeg et al. -transupp.h Declarations for jpegtran support routines in transupp.c. - -C source code files: - -cjpeg.c Main program for cjpeg. -cjpegalt.c Main program for cjpeg with alternate user interface. -djpeg.c Main program for djpeg. -djpegalt.c Main program for djpeg with alternate user interface. -jpegtran.c Main program for jpegtran. -cdjpeg.c Utility routines used by all three programs. -rdcolmap.c Code to read a colormap file for djpeg's "-map" switch. -rdswitch.c Code to process some of cjpeg's more complex switches. - Also used by jpegtran. -transupp.c Support code for jpegtran: lossless image manipulations. - -Image file reader modules for cjpeg: - -rdbmp.c BMP file input. -rdgif.c GIF file input. -rdppm.c PPM/PGM file input. -rdrle.c Utah RLE file input. -rdtarga.c Targa file input. - -Image file writer modules for djpeg: - -wrbmp.c BMP file output. -wrgif.c GIF file output. -wrppm.c PPM/PGM file output. -wrrle.c Utah RLE file output. -wrtarga.c Targa file output. - - -RDJPGCOM/WRJPGCOM -================= - -C source code files: - -rdjpgcom.c Stand-alone rdjpgcom application. -wrjpgcom.c Stand-alone wrjpgcom application. - -These programs do not depend on the IJG library. They do use -jconfig.h and jinclude.h, only to improve portability. - - -ADDITIONAL FILES -================ - -Documentation (see README for a guide to the documentation files): - -README Master documentation file. -*.txt Other documentation files. -*.1 Documentation in Unix man page format. -change.log Version-to-version change highlights. -example.c Sample code for calling JPEG library. - -Configuration/installation files and programs (see install.txt for more info): - -configure Unix shell script to perform automatic configuration. -configure.ac Source file for use with Autoconf to generate configure. -ltmain.sh Support scripts for configure (from GNU libtool). -config.guess -config.sub -depcomp -missing -ar-lib -compile -install-sh Install shell script for those Unix systems lacking one. -Makefile.in Makefile input for configure. -Makefile.am Source file for use with Automake to generate Makefile.in. -ckconfig.c Program to generate jconfig.h on non-Unix systems. -jconfig.txt Template for making jconfig.h by hand. -mak*.* Sample makefiles for particular systems. -jconfig.* Sample jconfig.h for particular systems. -libjpeg.map Script to generate shared library with versioned symbols. -libjpeg.pc.in libjpeg.pc pkg-config file input for configure. -aclocal.m4 M4 macro definitions for use with Autoconf. - -Test files (see install.txt for test procedure): - -test*.* Source and comparison files for confidence test. - These are binary image files, NOT text files. diff --git a/thirdparty/jpeg-9e/install-sh b/thirdparty/jpeg-9e/install-sh deleted file mode 100755 index ec298b5..0000000 --- a/thirdparty/jpeg-9e/install-sh +++ /dev/null @@ -1,541 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2020-11-14.01; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# 'make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -tab=' ' -nl=' -' -IFS=" $tab$nl" - -# Set DOITPROG to "echo" to test this script. - -doit=${DOITPROG-} -doit_exec=${doit:-exec} - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -# Create dirs (including intermediate dirs) using mode 755. -# This is like GNU 'install' as of coreutils 8.32 (2020). -mkdir_umask=22 - -backupsuffix= -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -is_target_a_directory=possibly - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -p pass -p to $cpprog. - -s $stripprog installed files. - -S SUFFIX attempt to back up existing files, with suffix SUFFIX. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG - -By default, rm is invoked with -f; when overridden with RMPROG, -it's up to you to specify -f if you want it. - -If -S is not specified, no backups are attempted. - -Email bug reports to bug-automake@gnu.org. -Automake home page: https://www.gnu.org/software/automake/ -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -p) cpprog="$cpprog -p";; - - -s) stripcmd=$stripprog;; - - -S) backupsuffix="$2" - shift;; - - -t) - is_target_a_directory=always - dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; - - -T) is_target_a_directory=never;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -# We allow the use of options -d and -T together, by making -d -# take the precedence; this is for compatibility with GNU install. - -if test -n "$dir_arg"; then - if test -n "$dst_arg"; then - echo "$0: target directory not allowed when installing a directory." >&2 - exit 1 - fi -fi - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call 'install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - if test $# -gt 1 || test "$is_target_a_directory" = always; then - if test ! -d "$dst_arg"; then - echo "$0: $dst_arg: Is not a directory." >&2 - exit 1 - fi - fi -fi - -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names problematic for 'test' and other utilities. - case $src in - -* | [=\(\)!]) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - # Don't chown directories that already exist. - if test $dstdir_status = 0; then - chowncmd="" - fi - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - dst=$dst_arg - - # If destination is a directory, append the input filename. - if test -d "$dst"; then - if test "$is_target_a_directory" = never; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dstbase=`basename "$src"` - case $dst in - */) dst=$dst$dstbase;; - *) dst=$dst/$dstbase;; - esac - dstdir_status=0 - else - dstdir=`dirname "$dst"` - test -d "$dstdir" - dstdir_status=$? - fi - fi - - case $dstdir in - */) dstdirslash=$dstdir;; - *) dstdirslash=$dstdir/;; - esac - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - # The $RANDOM variable is not portable (e.g., dash). Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap ' - ret=$? - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null - exit $ret - ' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p'. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; - esac - - oIFS=$IFS - IFS=/ - set -f - set fnord $dstdir - shift - set +f - IFS=$oIFS - - prefixes= - - for d - do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=${dstdirslash}_inst.$$_ - rmtmp=${dstdirslash}_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && - { test -z "$stripcmd" || { - # Create $dsttmp read-write so that cp doesn't create it read-only, - # which would cause strip to fail. - if test -z "$doit"; then - : >"$dsttmp" # No need to fork-exec 'touch'. - else - $doit touch "$dsttmp" - fi - } - } && - $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - set +f && - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # If $backupsuffix is set, and the file being installed - # already exists, attempt a backup. Don't worry if it fails, - # e.g., if mv doesn't support -f. - if test -n "$backupsuffix" && test -f "$dst"; then - $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null - fi - - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/thirdparty/jpeg-9e/install.txt b/thirdparty/jpeg-9e/install.txt deleted file mode 100644 index 6420513..0000000 --- a/thirdparty/jpeg-9e/install.txt +++ /dev/null @@ -1,1198 +0,0 @@ -INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software - -Copyright (C) 1991-2021, Thomas G. Lane, Guido Vollbeding. -This file is part of the Independent JPEG Group's software. -For conditions of distribution and use, see the accompanying README file. - - -This file explains how to configure and install the IJG software. We have -tried to make this software extremely portable and flexible, so that it can be -adapted to almost any environment. The downside of this decision is that the -installation process is complicated. We have provided shortcuts to simplify -the task on common systems. But in any case, you will need at least a little -familiarity with C programming and program build procedures for your system. - -If you are only using this software as part of a larger program, the larger -program's installation procedure may take care of configuring the IJG code. -For example, Ghostscript's installation script will configure the IJG code. -You don't need to read this file if you just want to compile Ghostscript. - -If you are on a Unix machine, you may not need to read this file at all. -Try doing - ./configure - make - make test -If that doesn't complain, do - make install -(better do "make -n install" first to see if the makefile will put the files -where you want them). Read further if you run into snags or want to customize -the code for your system. - - -TABLE OF CONTENTS ------------------ - -Before you start -Configuring the software: - using the automatic "configure" script - using one of the supplied jconfig and makefile files - by hand -Building the software -Testing the software -Installing the software -Optional stuff -Optimization -Hints for specific systems - - -BEFORE YOU START -================ - -Before installing the software you must unpack the distributed source code. -Since you are reading this file, you have probably already succeeded in this -task. However, there is a potential for error if you needed to convert the -files to the local standard text file format (for example, if you are on -MS-DOS you may have converted LF end-of-line to CR/LF). You must apply -such conversion to all the files EXCEPT those whose names begin with "test". -The test files contain binary data; if you change them in any way then the -self-test will give bad results. - -Please check the last section of this file to see if there are hints for the -specific machine or compiler you are using. - - -CONFIGURING THE SOFTWARE -======================== - -To configure the IJG code for your system, you need to create two files: - * jconfig.h: contains values for system-dependent #define symbols. - * Makefile: controls the compilation process. -(On a non-Unix machine, you may create "project files" or some other -substitute for a Makefile. jconfig.h is needed in any environment.) - -We provide three different ways to generate these files: - * On a Unix system, you can just run the "configure" script. - * We provide sample jconfig files and makefiles for popular machines; - if your machine matches one of the samples, just copy the right sample - files to jconfig.h and Makefile. - * If all else fails, read the instructions below and make your own files. - - -Configuring the software using the automatic "configure" script ---------------------------------------------------------------- - -If you are on a Unix machine, you can just type - ./configure -and let the configure script construct appropriate configuration files. -If you're using "csh" on an old version of System V, you might need to type - sh configure -instead to prevent csh from trying to execute configure itself. -Expect configure to run for a few minutes, particularly on slower machines; -it works by compiling a series of test programs. - -Configure was created with GNU Autoconf and it follows the usual conventions -for GNU configure scripts. It makes a few assumptions that you may want to -override. You can do this by providing optional switches to configure: - -* Configure will build both static and shared libraries, if possible. -If you want to build libjpeg only as a static library, say - ./configure --disable-shared -If you want to build libjpeg only as a shared library, say - ./configure --disable-static -Configure uses GNU libtool to take care of system-dependent shared library -building methods. - -* Configure will use gcc (GNU C compiler) if it's available, otherwise cc. -To force a particular compiler to be selected, use the CC option, for example - ./configure CC='cc' -The same method can be used to include any unusual compiler switches. -For example, on HP-UX you probably want to say - ./configure CC='cc -Aa' -to get HP's compiler to run in ANSI mode. - -* The default CFLAGS setting is "-g" for non-gcc compilers, "-g -O2" for gcc. -You can override this by saying, for example, - ./configure CFLAGS='-O2' -if you want to compile without debugging support. - -* Configure will set up the makefile so that "make install" will install files -into /usr/local/bin, /usr/local/man, etc. You can specify an installation -prefix other than "/usr/local" by giving configure the option "--prefix=PATH". - -* If you don't have a lot of swap space, you may need to enable the IJG -software's internal virtual memory mechanism. To do this, give the option -"--enable-maxmem=N" where N is the default maxmemory limit in megabytes. -This is discussed in more detail under "Selecting a memory manager", below. -You probably don't need to worry about this on reasonably-sized Unix machines, -unless you plan to process very large images. - -Configure has some other features that are useful if you are cross-compiling -or working in a network of multiple machine types; but if you need those -features, you probably already know how to use them. - - -Configuring the software using one of the supplied jconfig and makefile files ------------------------------------------------------------------------------ - -If you have one of these systems, you can just use the provided configuration -files: - -Makefile jconfig file System and/or compiler - -makefile.manx jconfig.manx Amiga, Manx Aztec C -makefile.sas jconfig.sas Amiga, SAS C -makeproj.mac jconfig.mac Apple Macintosh, Metrowerks CodeWarrior -mak*jpeg.st jconfig.st Atari ST/STE/TT, Pure C or Turbo C -makefile.bcc jconfig.bcc MS-DOS or OS/2, Borland C -makefile.dj jconfig.dj MS-DOS, DJGPP (Delorie's port of GNU C) -makefile.mc6 jconfig.mc6 MS-DOS, Microsoft C (16-bit only) -makefile.wat jconfig.wat MS-DOS, OS/2, or Windows NT, Watcom C -makefile.vc jconfig.vc Windows, MS Visual C++ -makefile.vs jconfig.vc Windows, MS Visual C++ 6 Developer Studio -make*.vc6 -makefile.vs jconfig.vc Windows, Visual Studio 2019 Version 16 -make*.v16 -makefile.vs jconfig.vc Windows, Visual Studio 2022 Version 17 -make*.v16 -make*.v17 -makefile.b32 jconfig.vc Windows, Borland C++ 32-bit (bcc32) -makefile.mms jconfig.vms Digital VMS, with MMS software -makefile.vms jconfig.vms Digital VMS, without MMS software - -Copy the proper jconfig file to jconfig.h and the makefile to Makefile (or -whatever your system uses as the standard makefile name). For more info see -the appropriate system-specific hints section near the end of this file. - - -Configuring the software by hand --------------------------------- - -First, generate a jconfig.h file. If you are moderately familiar with C, -the comments in jconfig.txt should be enough information to do this; just -copy jconfig.txt to jconfig.h and edit it appropriately. Otherwise, you may -prefer to use the ckconfig.c program. You will need to compile and execute -ckconfig.c by hand --- we hope you know at least enough to do that. -ckconfig.c may not compile the first try (in fact, the whole idea is for it -to fail if anything is going to). If you get compile errors, fix them by -editing ckconfig.c according to the directions given in ckconfig.c. Once -you get it to run, it will write a suitable jconfig.h file, and will also -print out some advice about which makefile to use. - -You may also want to look at the canned jconfig files, if there is one for a -system similar to yours. - -Second, select a makefile and copy it to Makefile (or whatever your system -uses as the standard makefile name). The most generic makefiles we provide -are - makefile.ansi: if your C compiler supports function prototypes - makefile.unix: if not. -(You have function prototypes if ckconfig.c put "#define HAVE_PROTOTYPES" -in jconfig.h.) You may want to start from one of the other makefiles if -there is one for a system similar to yours. - -Look over the selected Makefile and adjust options as needed. In particular -you may want to change the CC and CFLAGS definitions. For instance, if you -are using GCC, set CC=gcc. If you had to use any compiler switches to get -ckconfig.c to work, make sure the same switches are in CFLAGS. - -If you are on a system that doesn't use makefiles, you'll need to set up -project files (or whatever you do use) to compile all the source files and -link them into executable files cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom. -See the file lists in any of the makefiles to find out which files go into -each program. Note that the provided makefiles all make a "library" file -libjpeg first, but you don't have to do that if you don't want to; the file -lists identify which source files are actually needed for compression, -decompression, or both. As a last resort, you can make a batch script that -just compiles everything and links it all together; makefile.vms is an example -of this (it's for VMS systems that have no make-like utility). - -Here are comments about some specific configuration decisions you'll -need to make: - -Command line style ------------------- - -These programs can use a Unix-like command line style which supports -redirection and piping, like this: - cjpeg inputfile >outputfile - cjpeg outputfile - source program | cjpeg >outputfile -The simpler "two file" command line style is just - cjpeg inputfile outputfile -You may prefer the two-file style, particularly if you don't have pipes. - -You MUST use two-file style on any system that doesn't cope well with binary -data fed through stdin/stdout; this is true for some MS-DOS compilers, for -example. If you're not on a Unix system, it's safest to assume you need -two-file style. (But if your compiler provides either the Posix-standard -fdopen() library routine or a Microsoft-compatible setmode() routine, you -can safely use the Unix command line style, by defining USE_FDOPEN or -USE_SETMODE respectively.) - -To use the two-file style, make jconfig.h say "#define TWO_FILE_COMMANDLINE". - -Selecting a memory manager --------------------------- - -The IJG code is capable of working on images that are too big to fit in main -memory; data is swapped out to temporary files as necessary. However, the -code to do this is rather system-dependent. We provide five different -memory managers: - -* jmemansi.c This version uses the ANSI-standard library routine tmpfile(), - which not all non-ANSI systems have. On some systems - tmpfile() may put the temporary file in a non-optimal - location; if you don't like what it does, use jmemname.c. - -* jmemname.c This version creates named temporary files. For anything - except a Unix machine, you'll need to configure the - select_file_name() routine appropriately; see the comments - near the head of jmemname.c. If you use this version, define - NEED_SIGNAL_CATCHER in jconfig.h to make sure the temp files - are removed if the program is aborted. - -* jmemnobs.c (That stands for No Backing Store :-).) This will compile on - almost any system, but it assumes you have enough main memory - or virtual memory to hold the biggest images you work with. - -* jmemdos.c This should be used with most 16-bit MS-DOS compilers. - See the system-specific notes about MS-DOS for more info. - IMPORTANT: if you use this, define USE_MSDOS_MEMMGR in - jconfig.h, and include the assembly file jmemdosa.asm in the - programs. The supplied makefiles and jconfig files for - 16-bit MS-DOS compilers already do both. - -* jmemmac.c Custom version for Apple Macintosh; see the system-specific - notes for Macintosh for more info. - -To use a particular memory manager, change the SYSDEPMEM variable in your -makefile to equal the corresponding object file name (for example, jmemansi.o -or jmemansi.obj for jmemansi.c). - -If you have plenty of (real or virtual) main memory, just use jmemnobs.c. -"Plenty" means about ten bytes for every pixel in the largest images -you plan to process, so a lot of systems don't meet this criterion. -If yours doesn't, try jmemansi.c first. If that doesn't compile, you'll have -to use jmemname.c; be sure to adjust select_file_name() for local conditions. -You may also need to change unlink() to remove() in close_backing_store(). - -Except with jmemnobs.c or jmemmac.c, you need to adjust the DEFAULT_MAX_MEM -setting to a reasonable value for your system (either by adding a #define for -DEFAULT_MAX_MEM to jconfig.h, or by adding a -D switch to the Makefile). -This value limits the amount of data space the program will attempt to -allocate. Code and static data space isn't counted, so the actual memory -needs for cjpeg or djpeg are typically 100 to 150Kb more than the max-memory -setting. Larger max-memory settings reduce the amount of I/O needed to -process a large image, but too large a value can result in "insufficient -memory" failures. On most Unix machines (and other systems with virtual -memory), just set DEFAULT_MAX_MEM to several million and forget it. At the -other end of the spectrum, for MS-DOS machines you probably can't go much -above 300K to 400K. (On MS-DOS the value refers to conventional memory only. -Extended/expanded memory is handled separately by jmemdos.c.) - - -BUILDING THE SOFTWARE -===================== - -Now you should be able to compile the software. Just say "make" (or -whatever's necessary to start the compilation). Have a cup of coffee. - -Here are some things that could go wrong: - -If your compiler complains about undefined structures, you should be able to -shut it up by putting "#define INCOMPLETE_TYPES_BROKEN" in jconfig.h. - -If you have trouble with missing system include files or inclusion of the -wrong ones, read jinclude.h. This shouldn't happen if you used configure -or ckconfig.c to set up jconfig.h. - -There are a fair number of routines that do not use all of their parameters; -some compilers will issue warnings about this, which you can ignore. There -are also a few configuration checks that may give "unreachable code" warnings. -Any other warning deserves investigation. - -If you don't have a getenv() library routine, define NO_GETENV. - -Also see the system-specific hints, below. - - -TESTING THE SOFTWARE -==================== - -As a quick test of functionality we've included a small sample image in -several forms: - testorig.jpg Starting point for the djpeg tests. - testimg.ppm The output of djpeg testorig.jpg - testimg.gif The output of djpeg -gif testorig.jpg - testimg.bmp The output of djpeg -bmp -colors 256 testorig.jpg - testimg.jpg The output of cjpeg testimg.ppm - testprog.jpg Progressive-mode equivalent of testorig.jpg. - testimgp.jpg The output of cjpeg -progressive -optimize testimg.ppm -(The first- and second-generation .jpg files aren't identical since the -default compression parameters are lossy.) If you can generate duplicates -of the testimg* files then you probably have working programs. - -With most of the makefiles, "make test" will perform the necessary -comparisons. - -If you're using a makefile that doesn't provide the test option, run djpeg -and cjpeg by hand and compare the output files to testimg* with whatever -binary file comparison tool you have. The files should be bit-for-bit -identical. - -If the programs complain "MAX_ALLOC_CHUNK is wrong, please fix", then you -need to reduce MAX_ALLOC_CHUNK to a value that fits in type size_t. -Try adding "#define MAX_ALLOC_CHUNK 65520L" to jconfig.h. A less likely -configuration error is "ALIGN_TYPE is wrong, please fix": defining ALIGN_TYPE -as long should take care of that one. - -If the cjpeg test run fails with "Missing Huffman code table entry", it's a -good bet that you needed to define RIGHT_SHIFT_IS_UNSIGNED. Go back to the -configuration step and run ckconfig.c. (This is a good plan for any other -test failure, too.) - -If you are using Unix (one-file) command line style on a non-Unix system, -it's a good idea to check that binary I/O through stdin/stdout actually -works. You should get the same results from "djpeg out.ppm" -as from "djpeg -outfile out.ppm testorig.jpg". Note that the makefiles all -use the latter style and therefore do not exercise stdin/stdout! If this -check fails, try recompiling with USE_SETMODE or USE_FDOPEN defined. -If it still doesn't work, better use two-file style. - -If you chose a memory manager other than jmemnobs.c, you should test that -temporary-file usage works. Try "djpeg -bmp -colors 256 -max 0 testorig.jpg" -and make sure its output matches testimg.bmp. If you have any really large -images handy, try compressing them with -optimize and/or decompressing with --colors 256 to make sure your DEFAULT_MAX_MEM setting is not too large. - -NOTE: this is far from an exhaustive test of the JPEG software; some modules, -such as 1-pass color quantization, are not exercised at all. It's just a -quick test to give you some confidence that you haven't missed something -major. - - -INSTALLING THE SOFTWARE -======================= - -Once you're done with the above steps, you can install the software by -copying the executable files (cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom) -to wherever you normally install programs. On Unix systems, you'll also want -to put the man pages (cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1) -in the man-page directory. The pre-fab makefiles don't support this step -since there's such a wide variety of installation procedures on different -systems. - -If you generated a Makefile with the "configure" script, you can just say - make install -to install the programs and their man pages into the standard places. -(You'll probably need to be root to do this.) We recommend first saying - make -n install -to see where configure thought the files should go. You may need to edit -the Makefile, particularly if your system's conventions for man page -filenames don't match what configure expects. - -If you want to install the IJG library itself, for use in compiling other -programs besides ours, then you need to put the four include files - jpeglib.h jerror.h jconfig.h jmorecfg.h -into your include-file directory, and put the library file libjpeg.a -(extension may vary depending on system) wherever library files go. -If you generated a Makefile with "configure", it will do what it thinks -is the right thing if you say - make install-lib - - -OPTIONAL STUFF -============== - -Progress monitor: - -If you like, you can #define PROGRESS_REPORT (in jconfig.h) to enable display -of percent-done progress reports. The routine provided in cdjpeg.c merely -prints percentages to stderr, but you can customize it to do something -fancier. - -Utah RLE file format support: - -We distribute the software with support for RLE image files (Utah Raster -Toolkit format) disabled, because the RLE support won't compile without the -Utah library. If you have URT version 3.1 or later, you can enable RLE -support as follows: - 1. #define RLE_SUPPORTED in jconfig.h. - 2. Add a -I option to CFLAGS in the Makefile for the directory - containing the URT .h files (typically the "include" - subdirectory of the URT distribution). - 3. Add -L... -lrle to LDLIBS in the Makefile, where ... specifies - the directory containing the URT "librle.a" file (typically the - "lib" subdirectory of the URT distribution). - -Support for 9-bit to 12-bit deep pixel data: - -The IJG code currently allows 8, 9, 10, 11, or 12 bits sample data precision. -(For color, this means 8 to 12 bits per channel, of course.) If you need to -work with deeper than 8-bit data, you can compile the IJG code for 9-bit to -12-bit operation. -To do so: - 1. In jmorecfg.h, define BITS_IN_JSAMPLE as 9, 10, 11, or 12 rather than 8. - 2. In jconfig.h, undefine BMP_SUPPORTED, RLE_SUPPORTED, and TARGA_SUPPORTED, - because the code for those formats doesn't handle deeper than 8-bit data - and won't even compile. (The PPM code does work, as explained below. - The GIF code works too; it scales 8-bit GIF data to and from 12-bit - depth automatically.) - 3. Compile. Don't expect "make test" to pass, since the supplied test - files are for 8-bit data. - -Currently, 9-bit to 12-bit support does not work on 16-bit-int machines. - -Run-time selection and conversion of data precision are currently not -supported and may be added later. -Exception: The transcoding part (jpegtran) supports all settings in a -single instance, since it operates on the level of DCT coefficients and -not sample values. - -The PPM reader (rdppm.c) can read deeper than 8-bit data from either -text-format or binary-format PPM and PGM files. Binary-format PPM/PGM files -which have a maxval greater than 255 are assumed to use 2 bytes per sample, -MSB first (big-endian order). As of early 1995, 2-byte binary format is not -officially supported by the PBMPLUS library, but it is expected that a -future release of PBMPLUS will support it. Note that the PPM reader will -read files of any maxval regardless of the BITS_IN_JSAMPLE setting; incoming -data is automatically rescaled to maxval=MAXJSAMPLE as appropriate for the -cjpeg bit depth. - -The PPM writer (wrppm.c) will normally write 2-byte binary PPM or PGM -format, maxval=MAXJSAMPLE, when compiled with BITS_IN_JSAMPLE>8. Since this -format is not yet widely supported, you can disable it by compiling wrppm.c -with PPM_NORAWWORD defined; then the data is scaled down to 8 bits to make a -standard 1-byte/sample PPM or PGM file. (Yes, this means still another copy -of djpeg to keep around. But hopefully you won't need it for very long. -Poskanzer's supposed to get that new PBMPLUS release out Real Soon Now.) - -Of course, if you are working with 9-bit to 12-bit data, you probably have -it stored in some other, nonstandard format. In that case you'll probably -want to write your own I/O modules to read and write your format. - -Note: -The standard Huffman tables are only valid for 8-bit data precision. If -you selected more than 8-bit data precision, cjpeg uses arithmetic coding -by default. The Huffman encoder normally uses entropy optimization to -compute usable tables for higher precision. Otherwise, you'll have to -supply different default Huffman tables. - -Removing code: - -If you need to make a smaller version of the JPEG software, some optional -functions can be removed at compile time. See the xxx_SUPPORTED #defines in -jconfig.h and jmorecfg.h. If at all possible, we recommend that you leave in -decoder support for all valid JPEG files, to ensure that you can read anyone's -output. Taking out support for image file formats that you don't use is the -most painless way to make the programs smaller. Another possibility is to -remove some of the DCT methods: in particular, the "IFAST" method may not be -enough faster than the others to be worth keeping on your machine. (If you -do remove ISLOW or IFAST, be sure to redefine JDCT_DEFAULT or JDCT_FASTEST -to a supported method, by adding a #define in jconfig.h.) - - -OPTIMIZATION -============ - -Unless you own a Cray, you'll probably be interested in making the JPEG -software go as fast as possible. This section covers some machine-dependent -optimizations you may want to try. We suggest that before trying any of -this, you first get the basic installation to pass the self-test step. -Repeat the self-test after any optimization to make sure that you haven't -broken anything. - -The integer DCT routines perform a lot of multiplications. These -multiplications must yield 32-bit results, but none of their input values -are more than 16 bits wide. On many machines, notably the 680x0 and 80x86 -CPUs, a 16x16=>32 bit multiply instruction is faster than a full 32x32=>32 -bit multiply. Unfortunately there is no portable way to specify such a -multiplication in C, but some compilers can generate one when you use the -right combination of casts. See the MULTIPLYxxx macro definitions in -jdct.h. If your compiler makes "int" be 32 bits and "short" be 16 bits, -defining SHORTxSHORT_32 is fairly likely to work. When experimenting with -alternate definitions, be sure to test not only whether the code still works -(use the self-test), but also whether it is actually faster --- on some -compilers, alternate definitions may compute the right answer, yet be slower -than the default. Timing cjpeg on a large PGM (grayscale) input file is the -best way to check this, as the DCT will be the largest fraction of the runtime -in that mode. (Note: some of the distributed compiler-specific jconfig files -already contain #define switches to select appropriate MULTIPLYxxx -definitions.) - -If your machine has sufficiently fast floating point hardware, you may find -that the float DCT method is faster than the integer DCT methods, even -after tweaking the integer multiply macros. In that case you may want to -make the float DCT be the default method. (The only objection to this is -that float DCT results may vary slightly across machines.) To do that, add -"#define JDCT_DEFAULT JDCT_FLOAT" to jconfig.h. Even if you don't change -the default, you should redefine JDCT_FASTEST, which is the method selected -by djpeg's -fast switch. Don't forget to update the documentation files -(usage.txt and/or cjpeg.1, djpeg.1) to agree with what you've done. - -If access to "short" arrays is slow on your machine, it may be a win to -define type JCOEF as int rather than short. This will cost a good deal of -memory though, particularly in some multi-pass modes, so don't do it unless -you have memory to burn and short is REALLY slow. - -If your compiler can compile function calls in-line, make sure the INLINE -macro in jmorecfg.h is defined as the keyword that marks a function -inline-able. Some compilers have a switch that tells the compiler to inline -any function it thinks is profitable (e.g., -finline-functions for gcc). -Enabling such a switch is likely to make the compiled code bigger but faster. - -In general, it's worth trying the maximum optimization level of your compiler, -and experimenting with any optional optimizations such as loop unrolling. -(Unfortunately, far too many compilers have optimizer bugs ... be prepared to -back off if the code fails self-test.) If you do any experimentation along -these lines, please report the optimal settings to jpeg-info@jpegclub.org so -we can mention them in future releases. Be sure to specify your machine and -compiler version. - - -HINTS FOR SPECIFIC SYSTEMS -========================== - -We welcome reports on changes needed for systems not mentioned here. Submit -'em to jpeg-info@jpegclub.org. Also, if configure or ckconfig.c is wrong -about how to configure the JPEG software for your system, please let us know. - - -Acorn RISC OS: - -(Thanks to Simon Middleton for these hints on compiling with Desktop C.) -After renaming the files according to Acorn conventions, take a copy of -makefile.ansi, change all occurrences of 'libjpeg.a' to 'libjpeg.o' and -change these definitions as indicated: - -CFLAGS= -throwback -IC: -Wn -LDLIBS=C:o.Stubs -SYSDEPMEM=jmemansi.o -LN=Link -AR=LibFile -c -o - -Also add a new line '.c.o:; $(cc) $< $(cflags) -c -o $@'. Remove the -lines '$(RM) libjpeg.o' and '$(AR2) libjpeg.o' and the 'jconfig.h' -dependency section. - -Copy jconfig.txt to jconfig.h. Edit jconfig.h to define TWO_FILE_COMMANDLINE -and CHAR_IS_UNSIGNED. - -Run the makefile using !AMU not !Make. If you want to use the 'clean' and -'test' makefile entries then you will have to fiddle with the syntax a bit -and rename the test files. - - -Amiga: - -SAS C 6.50 reportedly is too buggy to compile the IJG code properly. -A patch to update to 6.51 is available from SAS or AmiNet FTP sites. - -The supplied config files are set up to use jmemname.c as the memory -manager, with temporary files being created on the device named by -"JPEGTMP:". - - -Atari ST/STE/TT: - -Copy the project files makcjpeg.st, makdjpeg.st, maktjpeg.st, and makljpeg.st -to cjpeg.prj, djpeg.prj, jpegtran.prj, and libjpeg.prj respectively. The -project files should work as-is with Pure C. For Turbo C, change library -filenames "pc..." to "tc..." in each project file. Note that libjpeg.prj -selects jmemansi.c as the recommended memory manager. You'll probably want to -adjust the DEFAULT_MAX_MEM setting --- you want it to be a couple hundred K -less than your normal free memory. Put "#define DEFAULT_MAX_MEM nnnn" into -jconfig.h to do this. - -To use the 68881/68882 coprocessor for the floating point DCT, add the -compiler option "-8" to the project files and replace pcfltlib.lib with -pc881lib.lib in cjpeg.prj and djpeg.prj. Or if you don't have a -coprocessor, you may prefer to remove the float DCT code by undefining -DCT_FLOAT_SUPPORTED in jmorecfg.h (since without a coprocessor, the float -code will be too slow to be useful). In that case, you can delete -pcfltlib.lib from the project files. - -Note that you must make libjpeg.lib before making cjpeg.ttp, djpeg.ttp, -or jpegtran.ttp. You'll have to perform the self-test by hand. - -We haven't bothered to include project files for rdjpgcom and wrjpgcom. -Those source files should just be compiled by themselves; they don't -depend on the JPEG library. You can use the default.prj project file -of the Pure C distribution to make the programs. - -There is a bug in some older versions of the Turbo C library which causes the -space used by temporary files created with "tmpfile()" not to be freed after -an abnormal program exit. If you check your disk afterwards, you will find -cluster chains that are allocated but not used by a file. This should not -happen in cjpeg/djpeg/jpegtran, since we enable a signal catcher to explicitly -close temp files before exiting. But if you use the JPEG library with your -own code, be sure to supply a signal catcher, or else use a different -system-dependent memory manager. - - -Cray: - -Should you be so fortunate as to be running JPEG on a Cray YMP, there is a -compiler bug in old versions of Cray's Standard C (prior to 3.1). If you -still have an old compiler, you'll need to insert a line reading -"#pragma novector" just before the loop - for (i = 1; i <= (int) htbl->bits[l]; i++) - huffsize[p++] = (char) l; -in fix_huff_tbl (in V5beta1, line 204 of jchuff.c and line 176 of jdhuff.c). -[This bug may or may not still occur with the current IJG code, but it's -probably a dead issue anyway...] - - -HP-UX: - -If you have HP-UX 7.05 or later with the "software development" C compiler, -you should run the compiler in ANSI mode. If using the configure script, -say - ./configure CC='cc -Aa' -(or -Ae if you prefer). If configuring by hand, use makefile.ansi and add -"-Aa" to the CFLAGS line in the makefile. - -If you have a pre-7.05 system, or if you are using the non-ANSI C compiler -delivered with a minimum HP-UX system, then you must use makefile.unix -(and do NOT add -Aa); or just run configure without the CC option. - -On HP 9000 series 800 machines, the HP C compiler is buggy in revisions prior -to A.08.07. If you get complaints about "not a typedef name", you'll have to -use makefile.unix, or run configure without the CC option. - - -Macintosh, generic comments: - -The supplied user-interface files (cjpeg.c, djpeg.c, etc) are set up to -provide a Unix-style command line interface. You can use this interface on -the Mac by means of the ccommand() library routine provided by Metrowerks -CodeWarrior or Think C. This is only appropriate for testing the library, -however; to make a user-friendly equivalent of cjpeg/djpeg you'd really want -to develop a Mac-style user interface. There isn't a complete example -available at the moment, but there are some helpful starting points: -1. Sam Bushell's free "To JPEG" applet provides drag-and-drop conversion to -JPEG under System 7 and later. This only illustrates how to use the -compression half of the library, but it does a very nice job of that part. -The CodeWarrior source code is available from http://www.pobox.com/~jsam. -2. Jim Brunner prepared a Mac-style user interface for both compression and -decompression. Unfortunately, it hasn't been updated since IJG v4, and -the library's API has changed considerably since then. Still it may be of -some help, particularly as a guide to compiling the IJG code under Think C. -Jim's code is available from the Info-Mac archives, at sumex-aim.stanford.edu -or mirrors thereof; see file /info-mac/dev/src/jpeg-convert-c.hqx. - -jmemmac.c is the recommended memory manager back end for Macintosh. It uses -NewPtr/DisposePtr instead of malloc/free, and has a Mac-specific -implementation of jpeg_mem_available(). It also creates temporary files that -follow Mac conventions. (That part of the code relies on System-7-or-later OS -functions. See the comments in jmemmac.c if you need to run it on System 6.) -NOTE that USE_MAC_MEMMGR must be defined in jconfig.h to use jmemmac.c. - -You can also use jmemnobs.c, if you don't care about handling images larger -than available memory. If you use any memory manager back end other than -jmemmac.c, we recommend replacing "malloc" and "free" by "NewPtr" and -"DisposePtr", because Mac C libraries often have peculiar implementations of -malloc/free. (For instance, free() may not return the freed space to the -Mac Memory Manager. This is undesirable for the IJG code because jmemmgr.c -already clumps space requests.) - - -Macintosh, Metrowerks CodeWarrior: - -The Unix-command-line-style interface can be used by defining USE_CCOMMAND. -You'll also need to define TWO_FILE_COMMANDLINE to avoid stdin/stdout. -This means that when using the cjpeg/djpeg programs, you'll have to type the -input and output file names in the "Arguments" text-edit box, rather than -using the file radio buttons. (Perhaps USE_FDOPEN or USE_SETMODE would -eliminate the problem, but I haven't heard from anyone who's tried it.) - -On 680x0 Macs, Metrowerks defines type "double" as a 10-byte IEEE extended -float. jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power -of 2. Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint. - -The supplied configuration file jconfig.mac can be used for your jconfig.h; -it includes all the recommended symbol definitions. If you have AppleScript -installed, you can run the supplied script makeproj.mac to create CodeWarrior -project files for the library and the testbed applications, then build the -library and applications. (Thanks to Dan Sears and Don Agro for this nifty -hack, which saves us from trying to maintain CodeWarrior project files as part -of the IJG distribution...) - - -Macintosh, Think C: - -The documentation in Jim Brunner's "JPEG Convert" source code (see above) -includes detailed build instructions for Think C; it's probably somewhat -out of date for the current release, but may be helpful. - -If you want to build the minimal command line version, proceed as follows. -You'll have to prepare project files for the programs; we don't include any -in the distribution since they are not text files. Use the file lists in -any of the supplied makefiles as a guide. Also add the ANSI and Unix C -libraries in a separate segment. You may need to divide the JPEG files into -more than one segment; we recommend dividing compression and decompression -modules. Define USE_CCOMMAND in jconfig.h so that the ccommand() routine is -called. You must also define TWO_FILE_COMMANDLINE because stdin/stdout -don't handle binary data correctly. - -On 680x0 Macs, Think C defines type "double" as a 12-byte IEEE extended float. -jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power of 2. -Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint. - -jconfig.mac should work as a jconfig.h configuration file for Think C, -but the makeproj.mac AppleScript script is specific to CodeWarrior. Sorry. - - -MIPS R3000: - -MIPS's cc version 1.31 has a rather nasty optimization bug. Don't use -O -if you have that compiler version. (Use "cc -V" to check the version.) -Note that the R3000 chip is found in workstations from DEC and others. - - -MS-DOS, generic comments for 16-bit compilers: - -The IJG code is designed to work well in 80x86 "small" or "medium" memory -models (i.e., data pointers are 16 bits unless explicitly declared "far"; -code pointers can be either size). You may be able to use small model to -compile cjpeg or djpeg by itself, but you will probably have to use medium -model for any larger application. This won't make much difference in -performance. You *will* take a noticeable performance hit if you use a -large-data memory model, and you should avoid "huge" model if at all -possible. Be sure that NEED_FAR_POINTERS is defined in jconfig.h if you use -a small-data memory model; be sure it is NOT defined if you use a large-data -model. (The supplied makefiles and jconfig files for Borland and Microsoft C -compile in medium model and define NEED_FAR_POINTERS.) - -The DOS-specific memory manager, jmemdos.c, should be used if possible. -It needs some assembly-code routines which are in jmemdosa.asm; make sure -your makefile assembles that file and includes it in the library. If you -don't have a suitable assembler, you can get pre-assembled object files for -jmemdosa by FTP from ftp.uu.net:/graphics/jpeg/jdosaobj.zip. (DOS-oriented -distributions of the IJG source code often include these object files.) - -When using jmemdos.c, jconfig.h must define USE_MSDOS_MEMMGR and must set -MAX_ALLOC_CHUNK to less than 64K (65520L is a typical value). If your -C library's far-heap malloc() can't allocate blocks that large, reduce -MAX_ALLOC_CHUNK to whatever it can handle. - -If you can't use jmemdos.c for some reason --- for example, because you -don't have an assembler to assemble jmemdosa.asm --- you'll have to fall -back to jmemansi.c or jmemname.c. You'll probably still need to set -MAX_ALLOC_CHUNK in jconfig.h, because most DOS C libraries won't malloc() -more than 64K at a time. IMPORTANT: if you use jmemansi.c or jmemname.c, -you will have to compile in a large-data memory model in order to get the -right stdio library. Too bad. - -wrjpgcom needs to be compiled in large model, because it malloc()s a 64KB -work area to hold the comment text. If your C library's malloc can't -handle that, reduce MAX_COM_LENGTH as necessary in wrjpgcom.c. - -Most MS-DOS compilers treat stdin/stdout as text files, so you must use -two-file command line style. But if your compiler has either fdopen() or -setmode(), you can use one-file style if you like. To do this, define -USE_SETMODE or USE_FDOPEN so that stdin/stdout will be set to binary mode. -(USE_SETMODE seems to work with more DOS compilers than USE_FDOPEN.) You -should test that I/O through stdin/stdout produces the same results as I/O -to explicitly named files... the "make test" procedures in the supplied -makefiles do NOT use stdin/stdout. - - -MS-DOS, generic comments for 32-bit compilers: - -None of the above comments about memory models apply if you are using a -32-bit flat-memory-space environment, such as DJGPP or Watcom C. (And you -should use one if you have it, as performance will be much better than -8086-compatible code!) For flat-memory-space compilers, do NOT define -NEED_FAR_POINTERS, and do NOT use jmemdos.c. Use jmemnobs.c if the -environment supplies adequate virtual memory, otherwise use jmemansi.c or -jmemname.c. - -You'll still need to be careful about binary I/O through stdin/stdout. -See the last paragraph of the previous section. - - -MS-DOS, Borland C: - -Be sure to convert all the source files to DOS text format (CR/LF newlines). -Although Borland C will often work OK with unmodified Unix (LF newlines) -source files, sometimes it will give bogus compile errors. -"Illegal character '#'" is the most common such error. (This is true with -Borland C 3.1, but perhaps is fixed in newer releases.) - -If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE. -jconfig.bcc already includes #define USE_SETMODE to make this work. -(fdopen does not work correctly.) - - -MS-DOS, Microsoft C: - -makefile.mc6 works with Microsoft C, DOS Visual C++, etc. It should only -be used if you want to build a 16-bit (small or medium memory model) program. - -If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE. -jconfig.mc6 already includes #define USE_SETMODE to make this work. -(fdopen does not work correctly.) - -Note that this makefile assumes that the working copy of itself is called -"makefile". If you want to call it something else, say "makefile.mak", -be sure to adjust the dependency line that reads "$(RFILE) : makefile". -Otherwise the make will fail because it doesn't know how to create "makefile". -Worse, some releases of Microsoft's make utilities give an incorrect error -message in this situation. - -Old versions of MS C fail with an "out of macro expansion space" error -because they can't cope with the macro TRACEMS8 (defined in jerror.h). -If this happens to you, the easiest solution is to change TRACEMS8 to -expand to nothing. You'll lose the ability to dump out JPEG coefficient -tables with djpeg -debug -debug, but at least you can compile. - -Original MS C 6.0 is very buggy; it compiles incorrect code unless you turn -off optimization entirely (remove -O from CFLAGS). 6.00A is better, but it -still generates bad code if you enable loop optimizations (-Ol or -Ox). - -MS C 8.0 crashes when compiling jquant1.c with optimization switch /Oo ... -which is on by default. To work around this bug, compile that one file -with /Oo-. - - -Microsoft Windows (all versions), generic comments: - -Some Windows system include files define typedef boolean as "unsigned char". -The IJG code also defines typedef boolean, but we make it an "enum" by default. -This doesn't affect the IJG programs because we don't import those Windows -include files. But if you use the JPEG library in your own program, and some -of your program's files import one definition of boolean while some import the -other, you can get all sorts of mysterious problems. A good preventive step -is to make the IJG library use "unsigned char" for boolean. To do that, -add something like this to your jconfig.h file: - /* Define "boolean" as unsigned char, not enum, per Windows custom */ - #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ - typedef unsigned char boolean; - #endif - #ifndef FALSE /* in case these macros already exist */ - #define FALSE 0 /* values of boolean */ - #endif - #ifndef TRUE - #define TRUE 1 - #endif - #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -(This is already in jconfig.vc, by the way.) - -windef.h contains the declarations - #define far - #define FAR far -Since jmorecfg.h tries to define FAR as empty, you may get a compiler -warning if you include both jpeglib.h and windef.h (which windows.h -includes). To suppress the warning, you can put "#ifndef FAR"/"#endif" -around the line "#define FAR" in jmorecfg.h. -(Something like this is already in jmorecfg.h, by the way.) - -When using the library in a Windows application, you will almost certainly -want to modify or replace the error handler module jerror.c, since our -default error handler does a couple of inappropriate things: - 1. it tries to write error and warning messages on stderr; - 2. in event of a fatal error, it exits by calling exit(). - -A simple stopgap solution for problem 1 is to replace the line - fprintf(stderr, "%s\n", buffer); -(in output_message in jerror.c) with - MessageBox(GetActiveWindow(),buffer,"JPEG Error",MB_OK|MB_ICONERROR); -It's highly recommended that you at least do that much, since otherwise -error messages will disappear into nowhere. (Beginning with IJG v6b, this -code is already present in jerror.c; just define USE_WINDOWS_MESSAGEBOX in -jconfig.h to enable it.) - -The proper solution for problem 2 is to return control to your calling -application after a library error. This can be done with the setjmp/longjmp -technique discussed in libjpeg.txt and illustrated in example.c. (NOTE: -some older Windows C compilers provide versions of setjmp/longjmp that -don't actually work under Windows. You may need to use the Windows system -functions Catch and Throw instead.) - -The recommended memory manager under Windows is jmemnobs.c; in other words, -let Windows do any virtual memory management needed. You should NOT use -jmemdos.c nor jmemdosa.asm under Windows. - -For Windows 3.1, we recommend compiling in medium or large memory model; -for newer Windows versions, use a 32-bit flat memory model. (See the MS-DOS -sections above for more info about memory models.) In the 16-bit memory -models only, you'll need to put - #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ -into jconfig.h to limit allocation chunks to 64Kb. (Without that, you'd -have to use huge memory model, which slows things down unnecessarily.) -jmemnobs.c works without modification in large or flat memory models, but to -use medium model, you need to modify its jpeg_get_large and jpeg_free_large -routines to allocate far memory. In any case, you might like to replace -its calls to malloc and free with direct calls on Windows memory allocation -functions. - -You may also want to modify jdatasrc.c and jdatadst.c to use Windows file -operations rather than fread/fwrite. This is only necessary if your C -compiler doesn't provide a competent implementation of C stdio functions. - -You might want to tweak the RGB_xxx macros in jmorecfg.h so that the library -will accept or deliver color pixels in BGR sample order, not RGB; BGR order -is usually more convenient under Windows. Note that this change will break -the sample applications cjpeg/djpeg, but the library itself works fine. - - -Many people want to convert the IJG library into a DLL. This is reasonably -straightforward, but watch out for the following: - - 1. Don't try to compile as a DLL in small or medium memory model; use -large model, or even better, 32-bit flat model. Many places in the IJG code -assume the address of a local variable is an ordinary (not FAR) pointer; -that isn't true in a medium-model DLL. - - 2. Microsoft C cannot pass file pointers between applications and DLLs. -(See Microsoft Knowledge Base, PSS ID Number Q50336.) So jdatasrc.c and -jdatadst.c don't work if you open a file in your application and then pass -the pointer to the DLL. One workaround is to make jdatasrc.c/jdatadst.c -part of your main application rather than part of the DLL. - - 3. You'll probably need to modify the macros GLOBAL() and EXTERN() to -attach suitable linkage keywords to the exported routine names. Similarly, -you'll want to modify METHODDEF() and JMETHOD() to ensure function pointers -are declared in a way that lets application routines be called back through -the function pointers. These macros are in jmorecfg.h. Typical definitions -for a 16-bit DLL are: - #define GLOBAL(type) type _far _pascal _loadds _export - #define EXTERN(type) extern type _far _pascal _loadds - #define METHODDEF(type) static type _far _pascal - #define JMETHOD(type,methodname,arglist) \ - type (_far _pascal *methodname) arglist -For a 32-bit DLL you may want something like - #define GLOBAL(type) __declspec(dllexport) type - #define EXTERN(type) extern __declspec(dllexport) type -Although not all the GLOBAL routines are actually intended to be called by -the application, the performance cost of making them all DLL entry points is -negligible. - -The unmodified IJG library presents a very C-specific application interface, -so the resulting DLL is only usable from C or C++ applications. There has -been some talk of writing wrapper code that would present a simpler interface -usable from other languages, such as Visual Basic. This is on our to-do list -but hasn't been very high priority --- any volunteers out there? - - -Microsoft Windows, Borland C: - -The provided jconfig.bcc should work OK in a 32-bit Windows environment, -but you'll need to tweak it in a 16-bit environment (you'd need to define -NEED_FAR_POINTERS and MAX_ALLOC_CHUNK). Beware that makefile.bcc will need -alteration if you want to use it for Windows --- in particular, you should -use jmemnobs.c not jmemdos.c under Windows. - -Borland C++ 4.5 fails with an internal compiler error when trying to compile -jdmerge.c in 32-bit mode. If enough people complain, perhaps Borland will fix -it. In the meantime, the simplest known workaround is to add a redundant -definition of the variable range_limit in h2v1_merged_upsample(), at the head -of the block that handles odd image width (about line 268 in v6 jdmerge.c): - /* If image width is odd, do the last output column separately */ - if (cinfo->output_width & 1) { - register JSAMPLE * range_limit = cinfo->sample_range_limit; /* ADD THIS */ - cb = GETJSAMPLE(*inptr1); -Pretty bizarre, especially since the very similar routine h2v2_merged_upsample -doesn't trigger the bug. -Recent reports suggest that this bug does not occur with "bcc32a" (the -Pentium-optimized version of the compiler). - -Another report from a user of Borland C 4.5 was that incorrect code (leading -to a color shift in processed images) was produced if any of the following -optimization switch combinations were used: - -Ot -Og - -Ot -Op - -Ot -Om -So try backing off on optimization if you see such a problem. (Are there -several different releases all numbered "4.5"??) - - -Microsoft Windows, Microsoft Visual C++: - -jconfig.vc should work OK with any Microsoft compiler for a 32-bit memory -model. makefile.vc is intended for command-line use. (If you are using -the Developer Studio environment, you may prefer the DevStudio project -files; see below.) - -IJG JPEG 7 adds extern "C" to jpeglib.h. This avoids the need to put -extern "C" { ... } around #include "jpeglib.h" in your C++ application. -You can also force VC++ to treat the library as C++ code by renaming -all the *.c files to *.cpp (and adjusting the makefile to match). -In this case you also need to define the symbol DONT_USE_EXTERN_C in -the configuration to prevent jpeglib.h from using extern "C". - - -Microsoft Windows, Microsoft Visual C++ 6 Developer Studio: - -We include makefiles that should work as project files in Developer Studio -6.0 or later. There is a library makefile that builds the IJG library as -a static Win32 library, and application makefiles that build the sample -applications as Win32 console applications. (Even if you only want the -library, we recommend building the applications so that you can run the -self-test.) - -To use: -1. Open the Windows Command Prompt, change to the source directory and - execute the command line - nmake /f makefile.vs setup-vc6 - If you get an error message saying that the "nmake" command could - not be found, execute the command - "%ProgramFiles%\Microsoft Visual Studio\VC98\Bin\VCVARS32" - to set the environment for using Microsoft Visual C++ tools, - and repeat the nmake call. - This will move jconfig.vc to jconfig.h and makefiles to project files. - (Note that the renaming is critical!) - Alternatively you can use - nmake /f makefile.vs setupcopy-vc6 - This will create renamed copies of the files, which allows to repeat - the setup later. -2. Open the workspace file jpeg.dsw, build the library project. - (If you are using Developer Studio more recent than 6.0, you'll - probably get a message saying that the project files are being updated.) -3. Open the workspace file apps.dsw, build the application projects. -4. To perform the self-test, execute the command line - nmake /f makefile.vs test-build -5. Move the application .exe files from the Release folder to an - appropriate location on your path. - - -Microsoft Windows, Visual Studio 2019 Version 16: - -We include makefiles that should work as project files in Visual Studio -2019 Version 16 or later. There is a library makefile that builds the -IJG library as a static Win32/x64/ARM/ARM64 library, and application -makefiles that build the sample applications as Win32/x64/ARM/ARM64 -console applications. (Even if you only want the library, we recommend -building the applications so that you can run the self-test.) - -To use: -1. Ensure you’ve checked the item "Desktop development with C++" in the - Workloads tab of Visual Studio Installer. - Open the Developer Command Prompt for VS 2019, change to the source - directory and execute the command line - nmake /f makefile.vs setup-v16 - This will move jconfig.vc to jconfig.h and makefiles to project files. - (Note that the renaming is critical!) - Alternatively you can use - nmake /f makefile.vs setupcopy-v16 - This will create renamed copies of the files, which allows to repeat - the setup later. -2. Open the solution file jpeg.sln, build the library project. - a) If you are using Visual Studio more recent than - 2019 Version 16, you'll probably get a message - saying that the project files are being updated. - b) If necessary, open the project properties and - adapt the Windows Target Platform Version in - the Configuration Properties, General section; - we support the latest version at the time of release. - c) If you get a warning saying that a platform cannot be found, - you can either - * forgo the platform and ignore the warning, or - * remove the platform in the Configuration Manager, or - * install the corresponding platform Buildtools in - Visual Studio Installer (Workloads tab Optional components - or Individual components tab). - d) If you want to build x64 code, change the platform setting from - Win32 to x64. You can build Win32 and x64 versions side by side. - e) If you want to build ARM/ARM64 code, change the platform setting - to ARM/ARM64. Ensure you've installed the ARM/ARM64-Buildtools - in Visual Studio Installer (Workloads tab Optional components - or Individual components tab). - You can build Win32/x64/ARM/ARM64 versions side by side. -3. Open the solution file apps.sln, build the application projects. -4. To perform the self-test, execute the command line - nmake /f makefile.vs test-32 - for the Win32 build, or on a 64-bit system - nmake /f makefile.vs test-64 - for the x64 build. -5. Move the application .exe files from the Release folder to an - appropriate location on your path. - - -Microsoft Windows, Visual Studio 2022 Version 17: - -We include makefiles that should work as project files in Visual Studio -2022 Version 17 or later. There is a library makefile that builds the -IJG library as a static Win32/x64/ARM/ARM64 library, and application -makefiles that build the sample applications as Win32/x64/ARM/ARM64 -console applications. (Even if you only want the library, we recommend -building the applications so that you can run the self-test.) - -To use: -1. Ensure you’ve checked the item "Desktop development with C++" in the - Workloads tab of Visual Studio Installer. - Open the Developer Command Prompt for VS 2022, change to the source - directory and execute the command line - nmake /f makefile.vs setup-v17 - This will move jconfig.vc to jconfig.h and makefiles to project files. - (Note that the renaming is critical!) - Alternatively you can use - nmake /f makefile.vs setupcopy-v17 - This will create renamed copies of the files, which allows to repeat - the setup later. -2. Open the solution file jpeg.sln, build the library project. - a) If you are using Visual Studio more recent than - 2022 Version 17, you'll probably get a message - saying that the project files are being updated. - b) If necessary, open the project properties and - adapt the Windows Target Platform Version in - the Configuration Properties, General section; - we support the latest version at the time of release. - c) If you get a warning saying that a platform cannot be found, - you can either - * forgo the platform and ignore the warning, or - * remove the platform in the Configuration Manager, or - * install the corresponding platform Buildtools in - Visual Studio Installer (Workloads tab Optional components - or Individual components tab). - d) If you want to build x64 code, change the platform setting from - Win32 to x64. You can build Win32 and x64 versions side by side. - e) If you want to build ARM/ARM64 code, change the platform setting - to ARM/ARM64. Ensure you've installed the ARM/ARM64-Buildtools - in Visual Studio Installer (Workloads tab Optional components - or Individual components tab). - You can build Win32/x64/ARM/ARM64 versions side by side. -3. Open the solution file apps.sln, build the application projects. -4. To perform the self-test, execute the command line - nmake /f makefile.vs test-32 - for the Win32 build, or on a 64-bit system - nmake /f makefile.vs test-64 - for the x64 build. -5. Move the application .exe files from the Release folder to an - appropriate location on your path. - - -OS/2, Borland C++: - -Watch out for optimization bugs in older Borland compilers; you may need -to back off the optimization switch settings. See the comments in -makefile.bcc. - - -SGI: - -On some SGI systems, you may need to set "AR2= ar -ts" in the Makefile. -If you are using configure, you can do this by saying - ./configure RANLIB='ar -ts' -This change is not needed on all SGIs. Use it only if the make fails at the -stage of linking the completed programs. - -On the MIPS R4000 architecture (Indy, etc.), the compiler option "-mips2" -reportedly speeds up the float DCT method substantially, enough to make it -faster than the default int method (but still slower than the fast int -method). If you use -mips2, you may want to alter the default DCT method to -be float. To do this, put "#define JDCT_DEFAULT JDCT_FLOAT" in jconfig.h. - - -VMS: - -On an Alpha/VMS system with MMS, be sure to use the "/Marco=Alpha=1" -qualifier with MMS when building the JPEG package. - -VAX/VMS v5.5-1 may have problems with the test step of the build procedure -reporting differences when it compares the original and test images. If the -error points to the last block of the files, it is most likely bogus and may -be safely ignored. It seems to be because the files are Stream_LF and -Backup/Compare has difficulty with the (presumably) null padded files. -This problem was not observed on VAX/VMS v6.1 or AXP/VMS v6.1. diff --git a/thirdparty/jpeg-9e/jaricom.c b/thirdparty/jpeg-9e/jaricom.c deleted file mode 100644 index 6900688..0000000 --- a/thirdparty/jpeg-9e/jaricom.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * jaricom.c - * - * Developed 1997-2011 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains probability estimation tables for common use in - * arithmetic entropy encoding and decoding routines. - * - * This data represents Table D.3 in the JPEG spec (D.2 in the draft), - * ISO/IEC IS 10918-1 and CCITT Recommendation ITU-T T.81, and Table 24 - * in the JBIG spec, ISO/IEC IS 11544 and CCITT Recommendation ITU-T T.82. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - -/* The following #define specifies the packing of the four components - * into the compact INT32 representation. - * Note that this formula must match the actual arithmetic encoder - * and decoder implementation. The implementation has to be changed - * if this formula is changed. - * The current organization is leaned on Markus Kuhn's JBIG - * implementation (jbig_tab.c). - */ - -#define V(i,a,b,c,d) (((INT32)a << 16) | ((INT32)c << 8) | ((INT32)d << 7) | b) - -const INT32 jpeg_aritab[113+1] = { -/* - * Index, Qe_Value, Next_Index_LPS, Next_Index_MPS, Switch_MPS - */ - V( 0, 0x5a1d, 1, 1, 1 ), - V( 1, 0x2586, 14, 2, 0 ), - V( 2, 0x1114, 16, 3, 0 ), - V( 3, 0x080b, 18, 4, 0 ), - V( 4, 0x03d8, 20, 5, 0 ), - V( 5, 0x01da, 23, 6, 0 ), - V( 6, 0x00e5, 25, 7, 0 ), - V( 7, 0x006f, 28, 8, 0 ), - V( 8, 0x0036, 30, 9, 0 ), - V( 9, 0x001a, 33, 10, 0 ), - V( 10, 0x000d, 35, 11, 0 ), - V( 11, 0x0006, 9, 12, 0 ), - V( 12, 0x0003, 10, 13, 0 ), - V( 13, 0x0001, 12, 13, 0 ), - V( 14, 0x5a7f, 15, 15, 1 ), - V( 15, 0x3f25, 36, 16, 0 ), - V( 16, 0x2cf2, 38, 17, 0 ), - V( 17, 0x207c, 39, 18, 0 ), - V( 18, 0x17b9, 40, 19, 0 ), - V( 19, 0x1182, 42, 20, 0 ), - V( 20, 0x0cef, 43, 21, 0 ), - V( 21, 0x09a1, 45, 22, 0 ), - V( 22, 0x072f, 46, 23, 0 ), - V( 23, 0x055c, 48, 24, 0 ), - V( 24, 0x0406, 49, 25, 0 ), - V( 25, 0x0303, 51, 26, 0 ), - V( 26, 0x0240, 52, 27, 0 ), - V( 27, 0x01b1, 54, 28, 0 ), - V( 28, 0x0144, 56, 29, 0 ), - V( 29, 0x00f5, 57, 30, 0 ), - V( 30, 0x00b7, 59, 31, 0 ), - V( 31, 0x008a, 60, 32, 0 ), - V( 32, 0x0068, 62, 33, 0 ), - V( 33, 0x004e, 63, 34, 0 ), - V( 34, 0x003b, 32, 35, 0 ), - V( 35, 0x002c, 33, 9, 0 ), - V( 36, 0x5ae1, 37, 37, 1 ), - V( 37, 0x484c, 64, 38, 0 ), - V( 38, 0x3a0d, 65, 39, 0 ), - V( 39, 0x2ef1, 67, 40, 0 ), - V( 40, 0x261f, 68, 41, 0 ), - V( 41, 0x1f33, 69, 42, 0 ), - V( 42, 0x19a8, 70, 43, 0 ), - V( 43, 0x1518, 72, 44, 0 ), - V( 44, 0x1177, 73, 45, 0 ), - V( 45, 0x0e74, 74, 46, 0 ), - V( 46, 0x0bfb, 75, 47, 0 ), - V( 47, 0x09f8, 77, 48, 0 ), - V( 48, 0x0861, 78, 49, 0 ), - V( 49, 0x0706, 79, 50, 0 ), - V( 50, 0x05cd, 48, 51, 0 ), - V( 51, 0x04de, 50, 52, 0 ), - V( 52, 0x040f, 50, 53, 0 ), - V( 53, 0x0363, 51, 54, 0 ), - V( 54, 0x02d4, 52, 55, 0 ), - V( 55, 0x025c, 53, 56, 0 ), - V( 56, 0x01f8, 54, 57, 0 ), - V( 57, 0x01a4, 55, 58, 0 ), - V( 58, 0x0160, 56, 59, 0 ), - V( 59, 0x0125, 57, 60, 0 ), - V( 60, 0x00f6, 58, 61, 0 ), - V( 61, 0x00cb, 59, 62, 0 ), - V( 62, 0x00ab, 61, 63, 0 ), - V( 63, 0x008f, 61, 32, 0 ), - V( 64, 0x5b12, 65, 65, 1 ), - V( 65, 0x4d04, 80, 66, 0 ), - V( 66, 0x412c, 81, 67, 0 ), - V( 67, 0x37d8, 82, 68, 0 ), - V( 68, 0x2fe8, 83, 69, 0 ), - V( 69, 0x293c, 84, 70, 0 ), - V( 70, 0x2379, 86, 71, 0 ), - V( 71, 0x1edf, 87, 72, 0 ), - V( 72, 0x1aa9, 87, 73, 0 ), - V( 73, 0x174e, 72, 74, 0 ), - V( 74, 0x1424, 72, 75, 0 ), - V( 75, 0x119c, 74, 76, 0 ), - V( 76, 0x0f6b, 74, 77, 0 ), - V( 77, 0x0d51, 75, 78, 0 ), - V( 78, 0x0bb6, 77, 79, 0 ), - V( 79, 0x0a40, 77, 48, 0 ), - V( 80, 0x5832, 80, 81, 1 ), - V( 81, 0x4d1c, 88, 82, 0 ), - V( 82, 0x438e, 89, 83, 0 ), - V( 83, 0x3bdd, 90, 84, 0 ), - V( 84, 0x34ee, 91, 85, 0 ), - V( 85, 0x2eae, 92, 86, 0 ), - V( 86, 0x299a, 93, 87, 0 ), - V( 87, 0x2516, 86, 71, 0 ), - V( 88, 0x5570, 88, 89, 1 ), - V( 89, 0x4ca9, 95, 90, 0 ), - V( 90, 0x44d9, 96, 91, 0 ), - V( 91, 0x3e22, 97, 92, 0 ), - V( 92, 0x3824, 99, 93, 0 ), - V( 93, 0x32b4, 99, 94, 0 ), - V( 94, 0x2e17, 93, 86, 0 ), - V( 95, 0x56a8, 95, 96, 1 ), - V( 96, 0x4f46, 101, 97, 0 ), - V( 97, 0x47e5, 102, 98, 0 ), - V( 98, 0x41cf, 103, 99, 0 ), - V( 99, 0x3c3d, 104, 100, 0 ), - V( 100, 0x375e, 99, 93, 0 ), - V( 101, 0x5231, 105, 102, 0 ), - V( 102, 0x4c0f, 106, 103, 0 ), - V( 103, 0x4639, 107, 104, 0 ), - V( 104, 0x415e, 103, 99, 0 ), - V( 105, 0x5627, 105, 106, 1 ), - V( 106, 0x50e7, 108, 107, 0 ), - V( 107, 0x4b85, 109, 103, 0 ), - V( 108, 0x5597, 110, 109, 0 ), - V( 109, 0x504f, 111, 107, 0 ), - V( 110, 0x5a10, 110, 111, 1 ), - V( 111, 0x5522, 112, 109, 0 ), - V( 112, 0x59eb, 112, 111, 1 ), -/* - * This last entry is used for fixed probability estimate of 0.5 - * as suggested in Section 10.3 Table 5 of ITU-T Rec. T.851. - */ - V( 113, 0x5a1d, 113, 113, 0 ) -}; diff --git a/thirdparty/jpeg-9e/jcapimin.c b/thirdparty/jpeg-9e/jcapimin.c deleted file mode 100644 index 639ce86..0000000 --- a/thirdparty/jpeg-9e/jcapimin.c +++ /dev/null @@ -1,288 +0,0 @@ -/* - * jcapimin.c - * - * Copyright (C) 1994-1998, Thomas G. Lane. - * Modified 2003-2010 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains application interface code for the compression half - * of the JPEG library. These are the "minimum" API routines that may be - * needed in either the normal full-compression case or the transcoding-only - * case. - * - * Most of the routines intended to be called directly by an application - * are in this file or in jcapistd.c. But also see jcparam.c for - * parameter-setup helper routines, jcomapi.c for routines shared by - * compression and decompression, and jctrans.c for the transcoding case. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Initialization of a JPEG compression object. - * The error manager must already be set up (in case memory manager fails). - */ - -GLOBAL(void) -jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) -{ - int i; - - /* Guard against version mismatches between library and caller. */ - cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ - if (version != JPEG_LIB_VERSION) - ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); - if (structsize != SIZEOF(struct jpeg_compress_struct)) - ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, - (int) SIZEOF(struct jpeg_compress_struct), (int) structsize); - - /* For debugging purposes, we zero the whole master structure. - * But the application has already set the err pointer, and may have set - * client_data, so we have to save and restore those fields. - * Note: if application hasn't set client_data, tools like Purify may - * complain here. - */ - { - struct jpeg_error_mgr * err = cinfo->err; - void * client_data = cinfo->client_data; /* ignore Purify complaint here */ - MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct)); - cinfo->err = err; - cinfo->client_data = client_data; - } - cinfo->is_decompressor = FALSE; - - /* Initialize a memory manager instance for this object */ - jinit_memory_mgr((j_common_ptr) cinfo); - - /* Zero out pointers to permanent structures. */ - cinfo->progress = NULL; - cinfo->dest = NULL; - - cinfo->comp_info = NULL; - - for (i = 0; i < NUM_QUANT_TBLS; i++) { - cinfo->quant_tbl_ptrs[i] = NULL; - cinfo->q_scale_factor[i] = 100; - } - - for (i = 0; i < NUM_HUFF_TBLS; i++) { - cinfo->dc_huff_tbl_ptrs[i] = NULL; - cinfo->ac_huff_tbl_ptrs[i] = NULL; - } - - /* Must do it here for emit_dqt in case jpeg_write_tables is used */ - cinfo->block_size = DCTSIZE; - cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; - - cinfo->script_space = NULL; - - cinfo->input_gamma = 1.0; /* in case application forgets */ - - /* OK, I'm ready */ - cinfo->global_state = CSTATE_START; -} - - -/* - * Destruction of a JPEG compression object - */ - -GLOBAL(void) -jpeg_destroy_compress (j_compress_ptr cinfo) -{ - jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ -} - - -/* - * Abort processing of a JPEG compression operation, - * but don't destroy the object itself. - */ - -GLOBAL(void) -jpeg_abort_compress (j_compress_ptr cinfo) -{ - jpeg_abort((j_common_ptr) cinfo); /* use common routine */ -} - - -/* - * Forcibly suppress or un-suppress all quantization and Huffman tables. - * Marks all currently defined tables as already written (if suppress) - * or not written (if !suppress). This will control whether they get emitted - * by a subsequent jpeg_start_compress call. - * - * This routine is exported for use by applications that want to produce - * abbreviated JPEG datastreams. It logically belongs in jcparam.c, but - * since it is called by jpeg_start_compress, we put it here --- otherwise - * jcparam.o would be linked whether the application used it or not. - */ - -GLOBAL(void) -jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress) -{ - int i; - JQUANT_TBL * qtbl; - JHUFF_TBL * htbl; - - for (i = 0; i < NUM_QUANT_TBLS; i++) { - if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL) - qtbl->sent_table = suppress; - } - - for (i = 0; i < NUM_HUFF_TBLS; i++) { - if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL) - htbl->sent_table = suppress; - if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL) - htbl->sent_table = suppress; - } -} - - -/* - * Finish JPEG compression. - * - * If a multipass operating mode was selected, this may do a great deal of - * work including most of the actual output. - */ - -GLOBAL(void) -jpeg_finish_compress (j_compress_ptr cinfo) -{ - JDIMENSION iMCU_row; - - if (cinfo->global_state == CSTATE_SCANNING || - cinfo->global_state == CSTATE_RAW_OK) { - /* Terminate first pass */ - if (cinfo->next_scanline < cinfo->image_height) - ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); - (*cinfo->master->finish_pass) (cinfo); - } else if (cinfo->global_state != CSTATE_WRCOEFS) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - /* Perform any remaining passes */ - while (! cinfo->master->is_last_pass) { - (*cinfo->master->prepare_for_pass) (cinfo); - for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) { - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) iMCU_row; - cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - /* We bypass the main controller and invoke coef controller directly; - * all work is being done from the coefficient buffer. - */ - if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - } - (*cinfo->master->finish_pass) (cinfo); - } - /* Write EOI, do final cleanup */ - (*cinfo->marker->write_file_trailer) (cinfo); - (*cinfo->dest->term_destination) (cinfo); - /* We can use jpeg_abort to release memory and reset global_state */ - jpeg_abort((j_common_ptr) cinfo); -} - - -/* - * Write a special marker. - * This is only recommended for writing COM or APPn markers. - * Must be called after jpeg_start_compress() and before - * first call to jpeg_write_scanlines() or jpeg_write_raw_data(). - */ - -GLOBAL(void) -jpeg_write_marker (j_compress_ptr cinfo, int marker, - const JOCTET *dataptr, unsigned int datalen) -{ - JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val)); - - if (cinfo->next_scanline != 0 || - (cinfo->global_state != CSTATE_SCANNING && - cinfo->global_state != CSTATE_RAW_OK && - cinfo->global_state != CSTATE_WRCOEFS)) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); - write_marker_byte = cinfo->marker->write_marker_byte; /* copy for speed */ - while (datalen--) { - (*write_marker_byte) (cinfo, *dataptr); - dataptr++; - } -} - -/* Same, but piecemeal. */ - -GLOBAL(void) -jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen) -{ - if (cinfo->next_scanline != 0 || - (cinfo->global_state != CSTATE_SCANNING && - cinfo->global_state != CSTATE_RAW_OK && - cinfo->global_state != CSTATE_WRCOEFS)) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); -} - -GLOBAL(void) -jpeg_write_m_byte (j_compress_ptr cinfo, int val) -{ - (*cinfo->marker->write_marker_byte) (cinfo, val); -} - - -/* - * Alternate compression function: just write an abbreviated table file. - * Before calling this, all parameters and a data destination must be set up. - * - * To produce a pair of files containing abbreviated tables and abbreviated - * image data, one would proceed as follows: - * - * initialize JPEG object - * set JPEG parameters - * set destination to table file - * jpeg_write_tables(cinfo); - * set destination to image file - * jpeg_start_compress(cinfo, FALSE); - * write data... - * jpeg_finish_compress(cinfo); - * - * jpeg_write_tables has the side effect of marking all tables written - * (same as jpeg_suppress_tables(..., TRUE)). Thus a subsequent start_compress - * will not re-emit the tables unless it is passed write_all_tables=TRUE. - */ - -GLOBAL(void) -jpeg_write_tables (j_compress_ptr cinfo) -{ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - /* (Re)initialize error mgr and destination modules */ - (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); - (*cinfo->dest->init_destination) (cinfo); - /* Initialize the marker writer ... bit of a crock to do it here. */ - jinit_marker_writer(cinfo); - /* Write them tables! */ - (*cinfo->marker->write_tables_only) (cinfo); - /* And clean up. */ - (*cinfo->dest->term_destination) (cinfo); - /* - * In library releases up through v6a, we called jpeg_abort() here to free - * any working memory allocated by the destination manager and marker - * writer. Some applications had a problem with that: they allocated space - * of their own from the library memory manager, and didn't want it to go - * away during write_tables. So now we do nothing. This will cause a - * memory leak if an app calls write_tables repeatedly without doing a full - * compression cycle or otherwise resetting the JPEG object. However, that - * seems less bad than unexpectedly freeing memory in the normal case. - * An app that prefers the old behavior can call jpeg_abort for itself after - * each call to jpeg_write_tables(). - */ -} diff --git a/thirdparty/jpeg-9e/jcapistd.c b/thirdparty/jpeg-9e/jcapistd.c deleted file mode 100644 index 0917afa..0000000 --- a/thirdparty/jpeg-9e/jcapistd.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - * jcapistd.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2013 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains application interface code for the compression half - * of the JPEG library. These are the "standard" API routines that are - * used in the normal full-compression case. They are not used by a - * transcoding-only application. Note that if an application links in - * jpeg_start_compress, it will end up linking in the entire compressor. - * We thus must separate this file from jcapimin.c to avoid linking the - * whole compression library into a transcoder. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Compression initialization. - * Before calling this, all parameters and a data destination must be set up. - * - * We require a write_all_tables parameter as a failsafe check when writing - * multiple datastreams from the same compression object. Since prior runs - * will have left all the tables marked sent_table=TRUE, a subsequent run - * would emit an abbreviated stream (no tables) by default. This may be what - * is wanted, but for safety's sake it should not be the default behavior: - * programmers should have to make a deliberate choice to emit abbreviated - * images. Therefore the documentation and examples should encourage people - * to pass write_all_tables=TRUE; then it will take active thought to do the - * wrong thing. - */ - -GLOBAL(void) -jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables) -{ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - if (write_all_tables) - jpeg_suppress_tables(cinfo, FALSE); /* mark all tables to be written */ - - /* (Re)initialize error mgr and destination modules */ - (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); - (*cinfo->dest->init_destination) (cinfo); - /* Perform master selection of active modules */ - jinit_compress_master(cinfo); - /* Set up for the first pass */ - (*cinfo->master->prepare_for_pass) (cinfo); - /* Ready for application to drive first pass through jpeg_write_scanlines - * or jpeg_write_raw_data. - */ - cinfo->next_scanline = 0; - cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING); -} - - -/* - * Write some scanlines of data to the JPEG compressor. - * - * The return value will be the number of lines actually written. - * This should be less than the supplied num_lines only in case that - * the data destination module has requested suspension of the compressor, - * or if more than image_height scanlines are passed in. - * - * Note: we warn about excess calls to jpeg_write_scanlines() since - * this likely signals an application programmer error. However, - * excess scanlines passed in the last valid call are *silently* ignored, - * so that the application need not adjust num_lines for end-of-image - * when using a multiple-scanline buffer. - */ - -GLOBAL(JDIMENSION) -jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines, - JDIMENSION num_lines) -{ - JDIMENSION row_ctr, rows_left; - - if (cinfo->global_state != CSTATE_SCANNING) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - if (cinfo->next_scanline >= cinfo->image_height) - WARNMS(cinfo, JWRN_TOO_MUCH_DATA); - - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) cinfo->next_scanline; - cinfo->progress->pass_limit = (long) cinfo->image_height; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - - /* Give master control module another chance if this is first call to - * jpeg_write_scanlines. This lets output of the frame/scan headers be - * delayed so that application can write COM, etc, markers between - * jpeg_start_compress and jpeg_write_scanlines. - */ - if (cinfo->master->call_pass_startup) - (*cinfo->master->pass_startup) (cinfo); - - /* Ignore any extra scanlines at bottom of image. */ - rows_left = cinfo->image_height - cinfo->next_scanline; - if (num_lines > rows_left) - num_lines = rows_left; - - row_ctr = 0; - (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, num_lines); - cinfo->next_scanline += row_ctr; - return row_ctr; -} - - -/* - * Alternate entry point to write raw data. - * Processes exactly one iMCU row per call, unless suspended. - */ - -GLOBAL(JDIMENSION) -jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data, - JDIMENSION num_lines) -{ - JDIMENSION lines_per_iMCU_row; - - if (cinfo->global_state != CSTATE_RAW_OK) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - if (cinfo->next_scanline >= cinfo->image_height) { - WARNMS(cinfo, JWRN_TOO_MUCH_DATA); - return 0; - } - - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) cinfo->next_scanline; - cinfo->progress->pass_limit = (long) cinfo->image_height; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - - /* Give master control module another chance if this is first call to - * jpeg_write_raw_data. This lets output of the frame/scan headers be - * delayed so that application can write COM, etc, markers between - * jpeg_start_compress and jpeg_write_raw_data. - */ - if (cinfo->master->call_pass_startup) - (*cinfo->master->pass_startup) (cinfo); - - /* Verify that at least one iMCU row has been passed. */ - lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_v_scaled_size; - if (num_lines < lines_per_iMCU_row) - ERREXIT(cinfo, JERR_BUFFER_SIZE); - - /* Directly compress the row. */ - if (! (*cinfo->coef->compress_data) (cinfo, data)) { - /* If compressor did not consume the whole row, suspend processing. */ - return 0; - } - - /* OK, we processed one iMCU row. */ - cinfo->next_scanline += lines_per_iMCU_row; - return lines_per_iMCU_row; -} diff --git a/thirdparty/jpeg-9e/jcarith.c b/thirdparty/jpeg-9e/jcarith.c deleted file mode 100644 index 1b45089..0000000 --- a/thirdparty/jpeg-9e/jcarith.c +++ /dev/null @@ -1,945 +0,0 @@ -/* - * jcarith.c - * - * Developed 1997-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains portable arithmetic entropy encoding routines for JPEG - * (implementing the ISO/IEC IS 10918-1 and CCITT Recommendation ITU-T T.81). - * - * Both sequential and progressive modes are supported in this single module. - * - * Suspension is not currently supported in this module. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Expanded entropy encoder object for arithmetic encoding. */ - -typedef struct { - struct jpeg_entropy_encoder pub; /* public fields */ - - INT32 c; /* C register, base of coding interval, layout as in sec. D.1.3 */ - INT32 a; /* A register, normalized size of coding interval */ - INT32 sc; /* counter for stacked 0xFF values which might overflow */ - INT32 zc; /* counter for pending 0x00 output values which might * - * be discarded at the end ("Pacman" termination) */ - int ct; /* bit shift counter, determines when next byte will be written */ - int buffer; /* buffer for most recent output byte != 0xFF */ - - int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ - int dc_context[MAX_COMPS_IN_SCAN]; /* context index for DC conditioning */ - - unsigned int restarts_to_go; /* MCUs left in this restart interval */ - int next_restart_num; /* next restart number to write (0-7) */ - - /* Pointers to statistics areas (these workspaces have image lifespan) */ - unsigned char * dc_stats[NUM_ARITH_TBLS]; - unsigned char * ac_stats[NUM_ARITH_TBLS]; - - /* Statistics bin for coding with fixed probability 0.5 */ - unsigned char fixed_bin[4]; -} arith_entropy_encoder; - -typedef arith_entropy_encoder * arith_entropy_ptr; - -/* The following two definitions specify the allocation chunk size - * for the statistics area. - * According to sections F.1.4.4.1.3 and F.1.4.4.2, we need at least - * 49 statistics bins for DC, and 245 statistics bins for AC coding. - * - * We use a compact representation with 1 byte per statistics bin, - * thus the numbers directly represent byte sizes. - * This 1 byte per statistics bin contains the meaning of the MPS - * (more probable symbol) in the highest bit (mask 0x80), and the - * index into the probability estimation state machine table - * in the lower bits (mask 0x7F). - */ - -#define DC_STAT_BINS 64 -#define AC_STAT_BINS 256 - -/* NOTE: Uncomment the following #define if you want to use the - * given formula for calculating the AC conditioning parameter Kx - * for spectral selection progressive coding in section G.1.3.2 - * of the spec (Kx = Kmin + SRL (8 + Se - Kmin) 4). - * Although the spec and P&M authors claim that this "has proven - * to give good results for 8 bit precision samples", I'm not - * convinced yet that this is really beneficial. - * Early tests gave only very marginal compression enhancements - * (a few - around 5 or so - bytes even for very large files), - * which would turn out rather negative if we'd suppress the - * DAC (Define Arithmetic Conditioning) marker segments for - * the default parameters in the future. - * Note that currently the marker writing module emits 12-byte - * DAC segments for a full-component scan in a color image. - * This is not worth worrying about IMHO. However, since the - * spec defines the default values to be used if the tables - * are omitted (unlike Huffman tables, which are required - * anyway), one might optimize this behaviour in the future, - * and then it would be disadvantageous to use custom tables if - * they don't provide sufficient gain to exceed the DAC size. - * - * On the other hand, I'd consider it as a reasonable result - * that the conditioning has no significant influence on the - * compression performance. This means that the basic - * statistical model is already rather stable. - * - * Thus, at the moment, we use the default conditioning values - * anyway, and do not use the custom formula. - * -#define CALCULATE_SPECTRAL_CONDITIONING - */ - -/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32. - * We assume that int right shift is unsigned if INT32 right shift is, - * which should be safe. - */ - -#ifdef RIGHT_SHIFT_IS_UNSIGNED -#define ISHIFT_TEMPS int ishift_temp; -#define IRIGHT_SHIFT(x,shft) \ - ((ishift_temp = (x)) < 0 ? \ - (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \ - (ishift_temp >> (shft))) -#else -#define ISHIFT_TEMPS -#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) -#endif - - -LOCAL(void) -emit_byte (int val, j_compress_ptr cinfo) -/* Write next output byte; we do not support suspension in this module. */ -{ - struct jpeg_destination_mgr * dest = cinfo->dest; - - *dest->next_output_byte++ = (JOCTET) val; - if (--dest->free_in_buffer == 0) - if (! (*dest->empty_output_buffer) (cinfo)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); -} - - -/* - * Finish up at the end of an arithmetic-compressed scan. - */ - -METHODDEF(void) -finish_pass (j_compress_ptr cinfo) -{ - arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy; - INT32 temp; - - /* Section D.1.8: Termination of encoding */ - - /* Find the e->c in the coding interval with the largest - * number of trailing zero bits */ - if ((temp = (e->a - 1 + e->c) & 0xFFFF0000L) < e->c) - e->c = temp + 0x8000L; - else - e->c = temp; - /* Send remaining bytes to output */ - e->c <<= e->ct; - if (e->c & 0xF8000000L) { - /* One final overflow has to be handled */ - if (e->buffer >= 0) { - if (e->zc) - do emit_byte(0x00, cinfo); - while (--e->zc); - emit_byte(e->buffer + 1, cinfo); - if (e->buffer + 1 == 0xFF) - emit_byte(0x00, cinfo); - } - e->zc += e->sc; /* carry-over converts stacked 0xFF bytes to 0x00 */ - e->sc = 0; - } else { - if (e->buffer == 0) - ++e->zc; - else if (e->buffer >= 0) { - if (e->zc) - do emit_byte(0x00, cinfo); - while (--e->zc); - emit_byte(e->buffer, cinfo); - } - if (e->sc) { - if (e->zc) - do emit_byte(0x00, cinfo); - while (--e->zc); - do { - emit_byte(0xFF, cinfo); - emit_byte(0x00, cinfo); - } while (--e->sc); - } - } - /* Output final bytes only if they are not 0x00 */ - if (e->c & 0x7FFF800L) { - if (e->zc) /* output final pending zero bytes */ - do emit_byte(0x00, cinfo); - while (--e->zc); - emit_byte((int) ((e->c >> 19) & 0xFF), cinfo); - if (((e->c >> 19) & 0xFF) == 0xFF) - emit_byte(0x00, cinfo); - if (e->c & 0x7F800L) { - emit_byte((int) ((e->c >> 11) & 0xFF), cinfo); - if (((e->c >> 11) & 0xFF) == 0xFF) - emit_byte(0x00, cinfo); - } - } -} - - -/* - * The core arithmetic encoding routine (common in JPEG and JBIG). - * This needs to go as fast as possible. - * Machine-dependent optimization facilities - * are not utilized in this portable implementation. - * However, this code should be fairly efficient and - * may be a good base for further optimizations anyway. - * - * Parameter 'val' to be encoded may be 0 or 1 (binary decision). - * - * Note: I've added full "Pacman" termination support to the - * byte output routines, which is equivalent to the optional - * Discard_final_zeros procedure (Figure D.15) in the spec. - * Thus, we always produce the shortest possible output - * stream compliant to the spec (no trailing zero bytes, - * except for FF stuffing). - * - * I've also introduced a new scheme for accessing - * the probability estimation state machine table, - * derived from Markus Kuhn's JBIG implementation. - */ - -LOCAL(void) -arith_encode (j_compress_ptr cinfo, unsigned char *st, int val) -{ - register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy; - register unsigned char nl, nm; - register INT32 qe, temp; - register int sv; - - /* Fetch values from our compact representation of Table D.3(D.2): - * Qe values and probability estimation state machine - */ - sv = *st; - qe = jpeg_aritab[sv & 0x7F]; /* => Qe_Value */ - nl = qe & 0xFF; qe >>= 8; /* Next_Index_LPS + Switch_MPS */ - nm = qe & 0xFF; qe >>= 8; /* Next_Index_MPS */ - - /* Encode & estimation procedures per sections D.1.4 & D.1.5 */ - e->a -= qe; - if (val != (sv >> 7)) { - /* Encode the less probable symbol */ - if (e->a >= qe) { - /* If the interval size (qe) for the less probable symbol (LPS) - * is larger than the interval size for the MPS, then exchange - * the two symbols for coding efficiency, otherwise code the LPS - * as usual: */ - e->c += e->a; - e->a = qe; - } - *st = (sv & 0x80) ^ nl; /* Estimate_after_LPS */ - } else { - /* Encode the more probable symbol */ - if (e->a >= 0x8000L) - return; /* A >= 0x8000 -> ready, no renormalization required */ - if (e->a < qe) { - /* If the interval size (qe) for the less probable symbol (LPS) - * is larger than the interval size for the MPS, then exchange - * the two symbols for coding efficiency: */ - e->c += e->a; - e->a = qe; - } - *st = (sv & 0x80) ^ nm; /* Estimate_after_MPS */ - } - - /* Renormalization & data output per section D.1.6 */ - do { - e->a <<= 1; - e->c <<= 1; - if (--e->ct == 0) { - /* Another byte is ready for output */ - temp = e->c >> 19; - if (temp > 0xFF) { - /* Handle overflow over all stacked 0xFF bytes */ - if (e->buffer >= 0) { - if (e->zc) - do emit_byte(0x00, cinfo); - while (--e->zc); - emit_byte(e->buffer + 1, cinfo); - if (e->buffer + 1 == 0xFF) - emit_byte(0x00, cinfo); - } - e->zc += e->sc; /* carry-over converts stacked 0xFF bytes to 0x00 */ - e->sc = 0; - /* Note: The 3 spacer bits in the C register guarantee - * that the new buffer byte can't be 0xFF here - * (see page 160 in the P&M JPEG book). */ - /* New output byte, might overflow later */ - e->buffer = (int) (temp & 0xFF); - } else if (temp == 0xFF) { - ++e->sc; /* stack 0xFF byte (which might overflow later) */ - } else { - /* Output all stacked 0xFF bytes, they will not overflow any more */ - if (e->buffer == 0) - ++e->zc; - else if (e->buffer >= 0) { - if (e->zc) - do emit_byte(0x00, cinfo); - while (--e->zc); - emit_byte(e->buffer, cinfo); - } - if (e->sc) { - if (e->zc) - do emit_byte(0x00, cinfo); - while (--e->zc); - do { - emit_byte(0xFF, cinfo); - emit_byte(0x00, cinfo); - } while (--e->sc); - } - /* New output byte (can still overflow) */ - e->buffer = (int) (temp & 0xFF); - } - e->c &= 0x7FFFFL; - e->ct += 8; - } - } while (e->a < 0x8000L); -} - - -/* - * Emit a restart marker & resynchronize predictions. - */ - -LOCAL(void) -emit_restart (j_compress_ptr cinfo, int restart_num) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - int ci; - jpeg_component_info * compptr; - - finish_pass(cinfo); - - emit_byte(0xFF, cinfo); - emit_byte(JPEG_RST0 + restart_num, cinfo); - - /* Re-initialize statistics areas */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* DC needs no table for refinement scan */ - if (cinfo->Ss == 0 && cinfo->Ah == 0) { - MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS); - /* Reset DC predictions to 0 */ - entropy->last_dc_val[ci] = 0; - entropy->dc_context[ci] = 0; - } - /* AC needs no table when not present */ - if (cinfo->Se) { - MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS); - } - } - - /* Reset arithmetic encoding variables */ - entropy->c = 0; - entropy->a = 0x10000L; - entropy->sc = 0; - entropy->zc = 0; - entropy->ct = 11; - entropy->buffer = -1; /* empty */ -} - - -/* - * MCU encoding for DC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - unsigned char *st; - int blkn, ci, tbl; - int v, v2, m; - ISHIFT_TEMPS - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - emit_restart(cinfo, entropy->next_restart_num); - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - /* Encode the MCU data blocks */ - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - ci = cinfo->MCU_membership[blkn]; - tbl = cinfo->cur_comp_info[ci]->dc_tbl_no; - - /* Compute the DC value after the required point transform by Al. - * This is simply an arithmetic right shift. - */ - m = IRIGHT_SHIFT((int) (MCU_data[blkn][0][0]), cinfo->Al); - - /* Sections F.1.4.1 & F.1.4.4.1: Encoding of DC coefficients */ - - /* Table F.4: Point to statistics bin S0 for DC coefficient coding */ - st = entropy->dc_stats[tbl] + entropy->dc_context[ci]; - - /* Figure F.4: Encode_DC_DIFF */ - if ((v = m - entropy->last_dc_val[ci]) == 0) { - arith_encode(cinfo, st, 0); - entropy->dc_context[ci] = 0; /* zero diff category */ - } else { - entropy->last_dc_val[ci] = m; - arith_encode(cinfo, st, 1); - /* Figure F.6: Encoding nonzero value v */ - /* Figure F.7: Encoding the sign of v */ - if (v > 0) { - arith_encode(cinfo, st + 1, 0); /* Table F.4: SS = S0 + 1 */ - st += 2; /* Table F.4: SP = S0 + 2 */ - entropy->dc_context[ci] = 4; /* small positive diff category */ - } else { - v = -v; - arith_encode(cinfo, st + 1, 1); /* Table F.4: SS = S0 + 1 */ - st += 3; /* Table F.4: SN = S0 + 3 */ - entropy->dc_context[ci] = 8; /* small negative diff category */ - } - /* Figure F.8: Encoding the magnitude category of v */ - m = 0; - if (v -= 1) { - arith_encode(cinfo, st, 1); - m = 1; - v2 = v; - st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */ - while (v2 >>= 1) { - arith_encode(cinfo, st, 1); - m <<= 1; - st += 1; - } - } - arith_encode(cinfo, st, 0); - /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ - if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) - entropy->dc_context[ci] = 0; /* zero diff category */ - else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) - entropy->dc_context[ci] += 8; /* large diff category */ - /* Figure F.9: Encoding the magnitude bit pattern of v */ - st += 14; - while (m >>= 1) - arith_encode(cinfo, st, (m & v) ? 1 : 0); - } - } - - return TRUE; -} - - -/* - * MCU encoding for AC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - const int * natural_order; - JBLOCKROW block; - unsigned char *st; - int tbl, k, ke; - int v, v2, m; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - emit_restart(cinfo, entropy->next_restart_num); - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - natural_order = cinfo->natural_order; - - /* Encode the MCU data block */ - block = MCU_data[0]; - tbl = cinfo->cur_comp_info[0]->ac_tbl_no; - - /* Sections F.1.4.2 & F.1.4.4.2: Encoding of AC coefficients */ - - /* Establish EOB (end-of-block) index */ - ke = cinfo->Se; - do { - /* We must apply the point transform by Al. For AC coefficients this - * is an integer division with rounding towards 0. To do this portably - * in C, we shift after obtaining the absolute value. - */ - if ((v = (*block)[natural_order[ke]]) >= 0) { - if (v >>= cinfo->Al) break; - } else { - v = -v; - if (v >>= cinfo->Al) break; - } - } while (--ke); - - /* Figure F.5: Encode_AC_Coefficients */ - for (k = cinfo->Ss - 1; k < ke;) { - st = entropy->ac_stats[tbl] + 3 * k; - arith_encode(cinfo, st, 0); /* EOB decision */ - for (;;) { - if ((v = (*block)[natural_order[++k]]) >= 0) { - if (v >>= cinfo->Al) { - arith_encode(cinfo, st + 1, 1); - arith_encode(cinfo, entropy->fixed_bin, 0); - break; - } - } else { - v = -v; - if (v >>= cinfo->Al) { - arith_encode(cinfo, st + 1, 1); - arith_encode(cinfo, entropy->fixed_bin, 1); - break; - } - } - arith_encode(cinfo, st + 1, 0); - st += 3; - } - st += 2; - /* Figure F.8: Encoding the magnitude category of v */ - m = 0; - if (v -= 1) { - arith_encode(cinfo, st, 1); - m = 1; - v2 = v; - if (v2 >>= 1) { - arith_encode(cinfo, st, 1); - m <<= 1; - st = entropy->ac_stats[tbl] + - (k <= cinfo->arith_ac_K[tbl] ? 189 : 217); - while (v2 >>= 1) { - arith_encode(cinfo, st, 1); - m <<= 1; - st += 1; - } - } - } - arith_encode(cinfo, st, 0); - /* Figure F.9: Encoding the magnitude bit pattern of v */ - st += 14; - while (m >>= 1) - arith_encode(cinfo, st, (m & v) ? 1 : 0); - } - /* Encode EOB decision only if k < cinfo->Se */ - if (k < cinfo->Se) { - st = entropy->ac_stats[tbl] + 3 * k; - arith_encode(cinfo, st, 1); - } - - return TRUE; -} - - -/* - * MCU encoding for DC successive approximation refinement scan. - * Note: we assume such scans can be multi-component, - * although the spec is not very clear on the point. - */ - -METHODDEF(boolean) -encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - unsigned char *st; - int Al, blkn; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - emit_restart(cinfo, entropy->next_restart_num); - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - st = entropy->fixed_bin; /* use fixed probability estimation */ - Al = cinfo->Al; - - /* Encode the MCU data blocks */ - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - /* We simply emit the Al'th bit of the DC coefficient value. */ - arith_encode(cinfo, st, (MCU_data[blkn][0][0] >> Al) & 1); - } - - return TRUE; -} - - -/* - * MCU encoding for AC successive approximation refinement scan. - */ - -METHODDEF(boolean) -encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - const int * natural_order; - JBLOCKROW block; - unsigned char *st; - int tbl, k, ke, kex; - int v; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - emit_restart(cinfo, entropy->next_restart_num); - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - natural_order = cinfo->natural_order; - - /* Encode the MCU data block */ - block = MCU_data[0]; - tbl = cinfo->cur_comp_info[0]->ac_tbl_no; - - /* Section G.1.3.3: Encoding of AC coefficients */ - - /* Establish EOB (end-of-block) index */ - ke = cinfo->Se; - do { - /* We must apply the point transform by Al. For AC coefficients this - * is an integer division with rounding towards 0. To do this portably - * in C, we shift after obtaining the absolute value. - */ - if ((v = (*block)[natural_order[ke]]) >= 0) { - if (v >>= cinfo->Al) break; - } else { - v = -v; - if (v >>= cinfo->Al) break; - } - } while (--ke); - - /* Establish EOBx (previous stage end-of-block) index */ - for (kex = ke; kex > 0; kex--) - if ((v = (*block)[natural_order[kex]]) >= 0) { - if (v >>= cinfo->Ah) break; - } else { - v = -v; - if (v >>= cinfo->Ah) break; - } - - /* Figure G.10: Encode_AC_Coefficients_SA */ - for (k = cinfo->Ss - 1; k < ke;) { - st = entropy->ac_stats[tbl] + 3 * k; - if (k >= kex) - arith_encode(cinfo, st, 0); /* EOB decision */ - for (;;) { - if ((v = (*block)[natural_order[++k]]) >= 0) { - if (v >>= cinfo->Al) { - if (v >> 1) /* previously nonzero coef */ - arith_encode(cinfo, st + 2, (v & 1)); - else { /* newly nonzero coef */ - arith_encode(cinfo, st + 1, 1); - arith_encode(cinfo, entropy->fixed_bin, 0); - } - break; - } - } else { - v = -v; - if (v >>= cinfo->Al) { - if (v >> 1) /* previously nonzero coef */ - arith_encode(cinfo, st + 2, (v & 1)); - else { /* newly nonzero coef */ - arith_encode(cinfo, st + 1, 1); - arith_encode(cinfo, entropy->fixed_bin, 1); - } - break; - } - } - arith_encode(cinfo, st + 1, 0); - st += 3; - } - } - /* Encode EOB decision only if k < cinfo->Se */ - if (k < cinfo->Se) { - st = entropy->ac_stats[tbl] + 3 * k; - arith_encode(cinfo, st, 1); - } - - return TRUE; -} - - -/* - * Encode and output one MCU's worth of arithmetic-compressed coefficients. - */ - -METHODDEF(boolean) -encode_mcu (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - const int * natural_order; - JBLOCKROW block; - unsigned char *st; - int tbl, k, ke; - int v, v2, m; - int blkn, ci; - jpeg_component_info * compptr; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - emit_restart(cinfo, entropy->next_restart_num); - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - natural_order = cinfo->natural_order; - - /* Encode the MCU data blocks */ - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - block = MCU_data[blkn]; - ci = cinfo->MCU_membership[blkn]; - compptr = cinfo->cur_comp_info[ci]; - - /* Sections F.1.4.1 & F.1.4.4.1: Encoding of DC coefficients */ - - tbl = compptr->dc_tbl_no; - - /* Table F.4: Point to statistics bin S0 for DC coefficient coding */ - st = entropy->dc_stats[tbl] + entropy->dc_context[ci]; - - /* Figure F.4: Encode_DC_DIFF */ - if ((v = (*block)[0] - entropy->last_dc_val[ci]) == 0) { - arith_encode(cinfo, st, 0); - entropy->dc_context[ci] = 0; /* zero diff category */ - } else { - entropy->last_dc_val[ci] = (*block)[0]; - arith_encode(cinfo, st, 1); - /* Figure F.6: Encoding nonzero value v */ - /* Figure F.7: Encoding the sign of v */ - if (v > 0) { - arith_encode(cinfo, st + 1, 0); /* Table F.4: SS = S0 + 1 */ - st += 2; /* Table F.4: SP = S0 + 2 */ - entropy->dc_context[ci] = 4; /* small positive diff category */ - } else { - v = -v; - arith_encode(cinfo, st + 1, 1); /* Table F.4: SS = S0 + 1 */ - st += 3; /* Table F.4: SN = S0 + 3 */ - entropy->dc_context[ci] = 8; /* small negative diff category */ - } - /* Figure F.8: Encoding the magnitude category of v */ - m = 0; - if (v -= 1) { - arith_encode(cinfo, st, 1); - m = 1; - v2 = v; - st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */ - while (v2 >>= 1) { - arith_encode(cinfo, st, 1); - m <<= 1; - st += 1; - } - } - arith_encode(cinfo, st, 0); - /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ - if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) - entropy->dc_context[ci] = 0; /* zero diff category */ - else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) - entropy->dc_context[ci] += 8; /* large diff category */ - /* Figure F.9: Encoding the magnitude bit pattern of v */ - st += 14; - while (m >>= 1) - arith_encode(cinfo, st, (m & v) ? 1 : 0); - } - - /* Sections F.1.4.2 & F.1.4.4.2: Encoding of AC coefficients */ - - if ((ke = cinfo->lim_Se) == 0) continue; - tbl = compptr->ac_tbl_no; - - /* Establish EOB (end-of-block) index */ - do { - if ((*block)[natural_order[ke]]) break; - } while (--ke); - - /* Figure F.5: Encode_AC_Coefficients */ - for (k = 0; k < ke;) { - st = entropy->ac_stats[tbl] + 3 * k; - arith_encode(cinfo, st, 0); /* EOB decision */ - while ((v = (*block)[natural_order[++k]]) == 0) { - arith_encode(cinfo, st + 1, 0); - st += 3; - } - arith_encode(cinfo, st + 1, 1); - /* Figure F.6: Encoding nonzero value v */ - /* Figure F.7: Encoding the sign of v */ - if (v > 0) { - arith_encode(cinfo, entropy->fixed_bin, 0); - } else { - v = -v; - arith_encode(cinfo, entropy->fixed_bin, 1); - } - st += 2; - /* Figure F.8: Encoding the magnitude category of v */ - m = 0; - if (v -= 1) { - arith_encode(cinfo, st, 1); - m = 1; - v2 = v; - if (v2 >>= 1) { - arith_encode(cinfo, st, 1); - m <<= 1; - st = entropy->ac_stats[tbl] + - (k <= cinfo->arith_ac_K[tbl] ? 189 : 217); - while (v2 >>= 1) { - arith_encode(cinfo, st, 1); - m <<= 1; - st += 1; - } - } - } - arith_encode(cinfo, st, 0); - /* Figure F.9: Encoding the magnitude bit pattern of v */ - st += 14; - while (m >>= 1) - arith_encode(cinfo, st, (m & v) ? 1 : 0); - } - /* Encode EOB decision only if k < cinfo->lim_Se */ - if (k < cinfo->lim_Se) { - st = entropy->ac_stats[tbl] + 3 * k; - arith_encode(cinfo, st, 1); - } - } - - return TRUE; -} - - -/* - * Initialize for an arithmetic-compressed scan. - */ - -METHODDEF(void) -start_pass (j_compress_ptr cinfo, boolean gather_statistics) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - int ci, tbl; - jpeg_component_info * compptr; - - if (gather_statistics) - /* Make sure to avoid that in the master control logic! - * We are fully adaptive here and need no extra - * statistics gathering pass! - */ - ERREXIT(cinfo, JERR_NOT_COMPILED); - - /* We assume jcmaster.c already validated the progressive scan parameters. */ - - /* Select execution routines */ - if (cinfo->progressive_mode) { - if (cinfo->Ah == 0) { - if (cinfo->Ss == 0) - entropy->pub.encode_mcu = encode_mcu_DC_first; - else - entropy->pub.encode_mcu = encode_mcu_AC_first; - } else { - if (cinfo->Ss == 0) - entropy->pub.encode_mcu = encode_mcu_DC_refine; - else - entropy->pub.encode_mcu = encode_mcu_AC_refine; - } - } else - entropy->pub.encode_mcu = encode_mcu; - - /* Allocate & initialize requested statistics areas */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* DC needs no table for refinement scan */ - if (cinfo->Ss == 0 && cinfo->Ah == 0) { - tbl = compptr->dc_tbl_no; - if (tbl < 0 || tbl >= NUM_ARITH_TBLS) - ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); - if (entropy->dc_stats[tbl] == NULL) - entropy->dc_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, DC_STAT_BINS); - MEMZERO(entropy->dc_stats[tbl], DC_STAT_BINS); - /* Initialize DC predictions to 0 */ - entropy->last_dc_val[ci] = 0; - entropy->dc_context[ci] = 0; - } - /* AC needs no table when not present */ - if (cinfo->Se) { - tbl = compptr->ac_tbl_no; - if (tbl < 0 || tbl >= NUM_ARITH_TBLS) - ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); - if (entropy->ac_stats[tbl] == NULL) - entropy->ac_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, AC_STAT_BINS); - MEMZERO(entropy->ac_stats[tbl], AC_STAT_BINS); -#ifdef CALCULATE_SPECTRAL_CONDITIONING - if (cinfo->progressive_mode) - /* Section G.1.3.2: Set appropriate arithmetic conditioning value Kx */ - cinfo->arith_ac_K[tbl] = cinfo->Ss + ((8 + cinfo->Se - cinfo->Ss) >> 4); -#endif - } - } - - /* Initialize arithmetic encoding variables */ - entropy->c = 0; - entropy->a = 0x10000L; - entropy->sc = 0; - entropy->zc = 0; - entropy->ct = 11; - entropy->buffer = -1; /* empty */ - - /* Initialize restart stuff */ - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num = 0; -} - - -/* - * Module initialization routine for arithmetic entropy encoding. - */ - -GLOBAL(void) -jinit_arith_encoder (j_compress_ptr cinfo) -{ - arith_entropy_ptr entropy; - int i; - - entropy = (arith_entropy_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(arith_entropy_encoder)); - cinfo->entropy = &entropy->pub; - entropy->pub.start_pass = start_pass; - entropy->pub.finish_pass = finish_pass; - - /* Mark tables unallocated */ - for (i = 0; i < NUM_ARITH_TBLS; i++) { - entropy->dc_stats[i] = NULL; - entropy->ac_stats[i] = NULL; - } - - /* Initialize index for fixed probability estimation */ - entropy->fixed_bin[0] = 113; -} diff --git a/thirdparty/jpeg-9e/jccoefct.c b/thirdparty/jpeg-9e/jccoefct.c deleted file mode 100644 index 77851f3..0000000 --- a/thirdparty/jpeg-9e/jccoefct.c +++ /dev/null @@ -1,456 +0,0 @@ -/* - * jccoefct.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2003-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the coefficient buffer controller for compression. - * This controller is the top level of the JPEG compressor proper. - * The coefficient buffer lies between forward-DCT and entropy encoding steps. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* We use a full-image coefficient buffer when doing Huffman optimization, - * and also for writing multiple-scan JPEG files. In all cases, the DCT - * step is run during the first pass, and subsequent passes need only read - * the buffered coefficients. - */ -#ifdef ENTROPY_OPT_SUPPORTED -#define FULL_COEF_BUFFER_SUPPORTED -#else -#ifdef C_MULTISCAN_FILES_SUPPORTED -#define FULL_COEF_BUFFER_SUPPORTED -#endif -#endif - - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_c_coef_controller pub; /* public fields */ - - JDIMENSION iMCU_row_num; /* iMCU row # within image */ - JDIMENSION MCU_ctr; /* counts MCUs processed in current row */ - int MCU_vert_offset; /* counts MCU rows within iMCU row */ - int MCU_rows_per_iMCU_row; /* number of such rows needed */ - - /* For single-pass compression, it's sufficient to buffer just one MCU - * (although this may prove a bit slow in practice). We append a - * workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it - * for each MCU constructed and sent. - * In multi-pass modes, this array points to the current MCU's blocks - * within the virtual arrays. - */ - JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; - - /* In multi-pass modes, we need a virtual block array for each component. */ - jvirt_barray_ptr whole_image[MAX_COMPONENTS]; - - /* Workspace for single-pass compression (omitted otherwise). */ - JBLOCK blk_buffer[C_MAX_BLOCKS_IN_MCU]; -} my_coef_controller; - -typedef my_coef_controller * my_coef_ptr; - - -/* Forward declarations */ -METHODDEF(boolean) compress_data - JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); -#ifdef FULL_COEF_BUFFER_SUPPORTED -METHODDEF(boolean) compress_first_pass - JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); -METHODDEF(boolean) compress_output - JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); -#endif - - -LOCAL(void) -start_iMCU_row (j_compress_ptr cinfo) -/* Reset within-iMCU-row counters for a new row */ -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - /* In an interleaved scan, an MCU row is the same as an iMCU row. - * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. - * But at the bottom of the image, process only what's left. - */ - if (cinfo->comps_in_scan > 1) { - coef->MCU_rows_per_iMCU_row = 1; - } else { - if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; - else - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; - } - - coef->MCU_ctr = 0; - coef->MCU_vert_offset = 0; -} - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - coef->iMCU_row_num = 0; - start_iMCU_row(cinfo); - - switch (pass_mode) { - case JBUF_PASS_THRU: - if (coef->whole_image[0] != NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - coef->pub.compress_data = compress_data; - break; -#ifdef FULL_COEF_BUFFER_SUPPORTED - case JBUF_SAVE_AND_PASS: - if (coef->whole_image[0] == NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - coef->pub.compress_data = compress_first_pass; - break; - case JBUF_CRANK_DEST: - if (coef->whole_image[0] == NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - coef->pub.compress_data = compress_output; - break; -#endif - default: - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - } -} - - -/* - * Process some data in the single-pass case. - * We process the equivalent of one fully interleaved MCU row ("iMCU" row) - * per call, ie, v_samp_factor block rows for each component in the image. - * Returns TRUE if the iMCU row is completed, FALSE if suspended. - * - * NB: input_buf contains a plane for each component in image, - * which we index according to the component's SOF position. - */ - -METHODDEF(boolean) -compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION MCU_col_num; /* index of current MCU within row */ - JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - int ci, xindex, yindex, yoffset, blockcnt; - JBLOCKROW blkp; - JSAMPARRAY input_ptr; - JDIMENSION xpos; - jpeg_component_info *compptr; - forward_DCT_ptr forward_DCT; - - /* Loop to write as much as one whole iMCU row */ - for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; - yoffset++) { - for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col; - MCU_col_num++) { - /* Determine where data comes from in input_buf and do the DCT thing. - * Each call on forward_DCT processes a horizontal row of DCT blocks as - * wide as an MCU. Dummy blocks at the right or bottom edge are filled in - * specially. The data in them does not matter for image reconstruction, - * so we fill them with values that will encode to the smallest amount of - * data, viz: all zeroes in the AC entries, DC entries equal to previous - * block's DC value. (Thanks to Thomas Kinsman for this idea.) - */ - blkp = coef->blk_buffer; /* pointer to current DCT block within MCU */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - forward_DCT = cinfo->fdct->forward_DCT[compptr->component_index]; - input_ptr = input_buf[compptr->component_index] + - yoffset * compptr->DCT_v_scaled_size; - /* ypos == (yoffset + yindex) * compptr->DCT_v_scaled_size */ - blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width - : compptr->last_col_width; - xpos = MCU_col_num * compptr->MCU_sample_width; - for (yindex = 0; yindex < compptr->MCU_height; yindex++) { - if (coef->iMCU_row_num < last_iMCU_row || - yoffset + yindex < compptr->last_row_height) { - (*forward_DCT) (cinfo, compptr, input_ptr, blkp, - xpos, (JDIMENSION) blockcnt); - input_ptr += compptr->DCT_v_scaled_size; - blkp += blockcnt; - /* Dummy blocks at right edge */ - if ((xindex = compptr->MCU_width - blockcnt) == 0) - continue; - } else { - /* At bottom of image, need a whole row of dummy blocks */ - xindex = compptr->MCU_width; - } - /* Fill in any dummy blocks needed in this row */ - MEMZERO(blkp, xindex * SIZEOF(JBLOCK)); - do { - blkp[0][0] = blkp[-1][0]; - blkp++; - } while (--xindex); - } - } - /* Try to write the MCU. In event of a suspension failure, we will - * re-DCT the MCU on restart (a bit inefficient, could be fixed...) - */ - if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { - /* Suspension forced; update state counters and exit */ - coef->MCU_vert_offset = yoffset; - coef->MCU_ctr = MCU_col_num; - return FALSE; - } - } - /* Completed an MCU row, but perhaps not an iMCU row */ - coef->MCU_ctr = 0; - } - /* Completed the iMCU row, advance counters for next one */ - coef->iMCU_row_num++; - start_iMCU_row(cinfo); - return TRUE; -} - - -#ifdef FULL_COEF_BUFFER_SUPPORTED - -/* - * Process some data in the first pass of a multi-pass case. - * We process the equivalent of one fully interleaved MCU row ("iMCU" row) - * per call, ie, v_samp_factor block rows for each component in the image. - * This amount of data is read from the source buffer, DCT'd and quantized, - * and saved into the virtual arrays. We also generate suitable dummy blocks - * as needed at the right and lower edges. (The dummy blocks are constructed - * in the virtual arrays, which have been padded appropriately.) This makes - * it possible for subsequent passes not to worry about real vs. dummy blocks. - * - * We must also emit the data to the entropy encoder. This is conveniently - * done by calling compress_output() after we've loaded the current strip - * of the virtual arrays. - * - * NB: input_buf contains a plane for each component in image. All - * components are DCT'd and loaded into the virtual arrays in this pass. - * However, it may be that only a subset of the components are emitted to - * the entropy encoder during this first pass; be careful about looking - * at the scan-dependent variables (MCU dimensions, etc). - */ - -METHODDEF(boolean) -compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - JDIMENSION blocks_across, MCUs_across, MCUindex; - int bi, ci, h_samp_factor, block_row, block_rows, ndummy; - JCOEF lastDC; - jpeg_component_info *compptr; - JBLOCKARRAY buffer; - JBLOCKROW thisblockrow, lastblockrow; - JSAMPARRAY input_ptr; - forward_DCT_ptr forward_DCT; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Align the virtual buffer for this component. */ - buffer = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[ci], - coef->iMCU_row_num * compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, TRUE); - /* Count non-dummy DCT block rows in this iMCU row. */ - if (coef->iMCU_row_num < last_iMCU_row) - block_rows = compptr->v_samp_factor; - else { - /* NB: can't use last_row_height here, since may not be set! */ - block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); - if (block_rows == 0) block_rows = compptr->v_samp_factor; - } - blocks_across = compptr->width_in_blocks; - h_samp_factor = compptr->h_samp_factor; - /* Count number of dummy blocks to be added at the right margin. */ - ndummy = (int) (blocks_across % h_samp_factor); - if (ndummy > 0) - ndummy = h_samp_factor - ndummy; - forward_DCT = cinfo->fdct->forward_DCT[ci]; - input_ptr = input_buf[ci]; - /* Perform DCT for all non-dummy blocks in this iMCU row. Each call - * on forward_DCT processes a complete horizontal row of DCT blocks. - */ - for (block_row = 0; block_row < block_rows; block_row++) { - thisblockrow = buffer[block_row]; - (*forward_DCT) (cinfo, compptr, input_ptr, thisblockrow, - (JDIMENSION) 0, blocks_across); - input_ptr += compptr->DCT_v_scaled_size; - if (ndummy > 0) { - /* Create dummy blocks at the right edge of the image. */ - thisblockrow += blocks_across; /* => first dummy block */ - FMEMZERO((void FAR *) thisblockrow, ndummy * SIZEOF(JBLOCK)); - lastDC = thisblockrow[-1][0]; - for (bi = 0; bi < ndummy; bi++) { - thisblockrow[bi][0] = lastDC; - } - } - } - /* If at end of image, create dummy block rows as needed. - * The tricky part here is that within each MCU, we want the DC values - * of the dummy blocks to match the last real block's DC value. - * This squeezes a few more bytes out of the resulting file... - */ - if (block_row < compptr->v_samp_factor) { - blocks_across += ndummy; /* include lower right corner */ - MCUs_across = blocks_across / h_samp_factor; - do { - thisblockrow = buffer[block_row]; - lastblockrow = buffer[block_row-1]; - FMEMZERO((void FAR *) thisblockrow, - (size_t) blocks_across * SIZEOF(JBLOCK)); - for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) { - lastDC = lastblockrow[h_samp_factor-1][0]; - for (bi = 0; bi < h_samp_factor; bi++) { - thisblockrow[bi][0] = lastDC; - } - thisblockrow += h_samp_factor; /* advance to next MCU in row */ - lastblockrow += h_samp_factor; - } - } while (++block_row < compptr->v_samp_factor); - } - } - /* NB: compress_output will increment iMCU_row_num if successful. - * A suspension return will result in redoing all the work above next time. - */ - - /* Emit data to the entropy encoder, sharing code with subsequent passes */ - return compress_output(cinfo, input_buf); -} - - -/* - * Process some data in subsequent passes of a multi-pass case. - * We process the equivalent of one fully interleaved MCU row ("iMCU" row) - * per call, ie, v_samp_factor block rows for each component in the scan. - * The data is obtained from the virtual arrays and fed to the entropy coder. - * Returns TRUE if the iMCU row is completed, FALSE if suspended. - * - * NB: input_buf is ignored; it is likely to be a NULL pointer. - */ - -METHODDEF(boolean) -compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION MCU_col_num; /* index of current MCU within row */ - int ci, xindex, yindex, yoffset; - JDIMENSION start_col; - JBLOCKARRAY blkp; - JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; - JBLOCKROW buffer_ptr; - jpeg_component_info *compptr; - - /* Align the virtual buffers for the components used in this scan. - * NB: during first pass, this is safe only because the buffers will - * already be aligned properly, so jmemmgr.c won't need to do any I/O. - */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - buffer[ci] = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], - coef->iMCU_row_num * compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } - - /* Loop to process one whole iMCU row */ - for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; - yoffset++) { - for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row; - MCU_col_num++) { - /* Construct list of pointers to DCT blocks belonging to this MCU */ - blkp = coef->MCU_buffer; /* pointer to current DCT block within MCU */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - start_col = MCU_col_num * compptr->MCU_width; - for (yindex = 0; yindex < compptr->MCU_height; yindex++) { - buffer_ptr = buffer[ci][yoffset + yindex] + start_col; - xindex = compptr->MCU_width; - do { - *blkp++ = buffer_ptr++; - } while (--xindex); - } - } - /* Try to write the MCU. */ - if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { - /* Suspension forced; update state counters and exit */ - coef->MCU_vert_offset = yoffset; - coef->MCU_ctr = MCU_col_num; - return FALSE; - } - } - /* Completed an MCU row, but perhaps not an iMCU row */ - coef->MCU_ctr = 0; - } - /* Completed the iMCU row, advance counters for next one */ - coef->iMCU_row_num++; - start_iMCU_row(cinfo); - return TRUE; -} - -#endif /* FULL_COEF_BUFFER_SUPPORTED */ - - -/* - * Initialize coefficient buffer controller. - */ - -GLOBAL(void) -jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer) -{ - my_coef_ptr coef; - - if (need_full_buffer) { -#ifdef FULL_COEF_BUFFER_SUPPORTED - /* Allocate a full-image virtual array for each component, */ - /* padded to a multiple of samp_factor DCT blocks in each direction. */ - int ci; - jpeg_component_info *compptr; - - coef = (my_coef_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_coef_controller) - SIZEOF(coef->blk_buffer)); - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - (JDIMENSION) jround_up((long) compptr->width_in_blocks, - (long) compptr->h_samp_factor), - (JDIMENSION) jround_up((long) compptr->height_in_blocks, - (long) compptr->v_samp_factor), - (JDIMENSION) compptr->v_samp_factor); - } -#else - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); -#endif - } else { - /* We only need a single-MCU buffer. */ - JBLOCKARRAY blkp; - JBLOCKROW buffer_ptr; - int bi; - - coef = (my_coef_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_coef_controller)); - blkp = coef->MCU_buffer; - buffer_ptr = coef->blk_buffer; - bi = C_MAX_BLOCKS_IN_MCU; - do { - *blkp++ = buffer_ptr++; - } while (--bi); - coef->whole_image[0] = NULL; /* flag for no virtual arrays */ - } - - coef->pub.start_pass = start_pass_coef; - cinfo->coef = &coef->pub; -} diff --git a/thirdparty/jpeg-9e/jccolor.c b/thirdparty/jpeg-9e/jccolor.c deleted file mode 100644 index db2ca42..0000000 --- a/thirdparty/jpeg-9e/jccolor.c +++ /dev/null @@ -1,601 +0,0 @@ -/* - * jccolor.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2011-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains input colorspace conversion routines. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Private subobject */ - -typedef struct { - struct jpeg_color_converter pub; /* public fields */ - - /* Private state for RGB->YCC conversion */ - INT32 * rgb_ycc_tab; /* => table for RGB to YCbCr conversion */ -} my_color_converter; - -typedef my_color_converter * my_cconvert_ptr; - - -/**************** RGB -> YCbCr conversion: most common case **************/ - -/* - * YCbCr is defined per Recommendation ITU-R BT.601-7 (03/2011), - * previously known as Recommendation CCIR 601-1, except that Cb and Cr - * are normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. - * sRGB (standard RGB color space) is defined per IEC 61966-2-1:1999. - * sYCC (standard luma-chroma-chroma color space with extended gamut) - * is defined per IEC 61966-2-1:1999 Amendment A1:2003 Annex F. - * bg-sRGB and bg-sYCC (big gamut standard color spaces) - * are defined per IEC 61966-2-1:1999 Amendment A1:2003 Annex G. - * Note that the derived conversion coefficients given in some of these - * documents are imprecise. The general conversion equations are - * Y = Kr * R + (1 - Kr - Kb) * G + Kb * B - * Cb = 0.5 * (B - Y) / (1 - Kb) - * Cr = 0.5 * (R - Y) / (1 - Kr) - * With Kr = 0.299 and Kb = 0.114 (derived according to SMPTE RP 177-1993 - * from the 1953 FCC NTSC primaries and CIE Illuminant C), - * the conversion equations to be implemented are therefore - * Y = 0.299 * R + 0.587 * G + 0.114 * B - * Cb = -0.168735892 * R - 0.331264108 * G + 0.5 * B + CENTERJSAMPLE - * Cr = 0.5 * R - 0.418687589 * G - 0.081312411 * B + CENTERJSAMPLE - * Note: older versions of the IJG code used a zero offset of MAXJSAMPLE/2, - * rather than CENTERJSAMPLE, for Cb and Cr. This gave equal positive and - * negative swings for Cb/Cr, but meant that grayscale values (Cb=Cr=0) - * were not represented exactly. Now we sacrifice exact representation of - * maximum red and maximum blue in order to get exact grayscales. - * - * To avoid floating-point arithmetic, we represent the fractional constants - * as integers scaled up by 2^16 (about 4 digits precision); we have to divide - * the products by 2^16, with appropriate rounding, to get the correct answer. - * - * For even more speed, we avoid doing any multiplications in the inner loop - * by precalculating the constants times R,G,B for all possible values. - * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); - * for 9-bit to 12-bit samples it is still acceptable. It's not very - * reasonable for 16-bit samples, but if you want lossless storage you - * shouldn't be changing colorspace anyway. - * The CENTERJSAMPLE offsets and the rounding fudge-factor of 0.5 are included - * in the tables to save adding them separately in the inner loop. - */ - -#define SCALEBITS 16 /* speediest right-shift on some machines */ -#define CBCR_OFFSET ((INT32) CENTERJSAMPLE << SCALEBITS) -#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) -#define FIX(x) ((INT32) ((x) * (1L< Y section */ -#define G_Y_OFF (1*(MAXJSAMPLE+1)) /* offset to G => Y section */ -#define B_Y_OFF (2*(MAXJSAMPLE+1)) /* etc. */ -#define R_CB_OFF (3*(MAXJSAMPLE+1)) -#define G_CB_OFF (4*(MAXJSAMPLE+1)) -#define B_CB_OFF (5*(MAXJSAMPLE+1)) -#define R_CR_OFF B_CB_OFF /* B=>Cb, R=>Cr are the same */ -#define G_CR_OFF (6*(MAXJSAMPLE+1)) -#define B_CR_OFF (7*(MAXJSAMPLE+1)) -#define TABLE_SIZE (8*(MAXJSAMPLE+1)) - - -/* - * Initialize for RGB->YCC colorspace conversion. - */ - -METHODDEF(void) -rgb_ycc_start (j_compress_ptr cinfo) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - INT32 * rgb_ycc_tab; - INT32 i; - - /* Allocate and fill in the conversion tables. */ - cconvert->rgb_ycc_tab = rgb_ycc_tab = (INT32 *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - TABLE_SIZE * SIZEOF(INT32)); - - for (i = 0; i <= MAXJSAMPLE; i++) { - rgb_ycc_tab[i+R_Y_OFF] = FIX(0.299) * i; - rgb_ycc_tab[i+G_Y_OFF] = FIX(0.587) * i; - rgb_ycc_tab[i+B_Y_OFF] = FIX(0.114) * i + ONE_HALF; - rgb_ycc_tab[i+R_CB_OFF] = (- FIX(0.168735892)) * i; - rgb_ycc_tab[i+G_CB_OFF] = (- FIX(0.331264108)) * i; - /* We use a rounding fudge-factor of 0.5-epsilon for Cb and Cr. - * This ensures that the maximum output will round to MAXJSAMPLE - * not MAXJSAMPLE+1, and thus that we don't have to range-limit. - */ - rgb_ycc_tab[i+B_CB_OFF] = FIX(0.5) * i + CBCR_OFFSET + ONE_HALF-1; -/* B=>Cb and R=>Cr tables are the same - rgb_ycc_tab[i+R_CR_OFF] = FIX(0.5) * i + CBCR_OFFSET + ONE_HALF-1; -*/ - rgb_ycc_tab[i+G_CR_OFF] = (- FIX(0.418687589)) * i; - rgb_ycc_tab[i+B_CR_OFF] = (- FIX(0.081312411)) * i; - } -} - - -/* - * Convert some rows of samples to the JPEG colorspace. - * - * Note that we change from the application's interleaved-pixel format - * to our internal noninterleaved, one-plane-per-component format. The - * input buffer is therefore three times as wide as the output buffer. - * - * A starting row offset is provided only for the output buffer. The - * caller can easily adjust the passed input_buf value to accommodate - * any row offset required on that side. - */ - -METHODDEF(void) -rgb_ycc_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int r, g, b; - register INT32 * ctab = cconvert->rgb_ycc_tab; - register JSAMPROW inptr; - register JSAMPROW outptr0, outptr1, outptr2; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->image_width; - - while (--num_rows >= 0) { - inptr = *input_buf++; - outptr0 = output_buf[0][output_row]; - outptr1 = output_buf[1][output_row]; - outptr2 = output_buf[2][output_row]; - output_row++; - for (col = 0; col < num_cols; col++) { - r = GETJSAMPLE(inptr[RGB_RED]); - g = GETJSAMPLE(inptr[RGB_GREEN]); - b = GETJSAMPLE(inptr[RGB_BLUE]); - inptr += RGB_PIXELSIZE; - /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations - * must be too; we do not need an explicit range-limiting operation. - * Hence the value being shifted is never negative, and we don't - * need the general RIGHT_SHIFT macro. - */ - /* Y */ - outptr0[col] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - /* Cb */ - outptr1[col] = (JSAMPLE) - ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) - >> SCALEBITS); - /* Cr */ - outptr2[col] = (JSAMPLE) - ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) - >> SCALEBITS); - } - } -} - - -/**************** Cases other than RGB -> YCbCr **************/ - - -/* - * Convert some rows of samples to the JPEG colorspace. - * This version handles RGB->grayscale conversion, which is the same - * as the RGB->Y portion of RGB->YCbCr. - * We assume rgb_ycc_start has been called (we only use the Y tables). - */ - -METHODDEF(void) -rgb_gray_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int r, g, b; - register INT32 * ctab = cconvert->rgb_ycc_tab; - register JSAMPROW inptr; - register JSAMPROW outptr; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->image_width; - - while (--num_rows >= 0) { - inptr = *input_buf++; - outptr = output_buf[0][output_row++]; - for (col = 0; col < num_cols; col++) { - r = GETJSAMPLE(inptr[RGB_RED]); - g = GETJSAMPLE(inptr[RGB_GREEN]); - b = GETJSAMPLE(inptr[RGB_BLUE]); - inptr += RGB_PIXELSIZE; - /* Y */ - outptr[col] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - } - } -} - - -/* - * Convert some rows of samples to the JPEG colorspace. - * This version handles Adobe-style CMYK->YCCK conversion, - * where we convert R=1-C, G=1-M, and B=1-Y to YCbCr using the - * same conversion as above, while passing K (black) unchanged. - * We assume rgb_ycc_start has been called. - */ - -METHODDEF(void) -cmyk_ycck_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int r, g, b; - register INT32 * ctab = cconvert->rgb_ycc_tab; - register JSAMPROW inptr; - register JSAMPROW outptr0, outptr1, outptr2, outptr3; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->image_width; - - while (--num_rows >= 0) { - inptr = *input_buf++; - outptr0 = output_buf[0][output_row]; - outptr1 = output_buf[1][output_row]; - outptr2 = output_buf[2][output_row]; - outptr3 = output_buf[3][output_row]; - output_row++; - for (col = 0; col < num_cols; col++) { - r = MAXJSAMPLE - GETJSAMPLE(inptr[0]); - g = MAXJSAMPLE - GETJSAMPLE(inptr[1]); - b = MAXJSAMPLE - GETJSAMPLE(inptr[2]); - /* K passes through as-is */ - outptr3[col] = inptr[3]; /* don't need GETJSAMPLE here */ - inptr += 4; - /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations - * must be too; we do not need an explicit range-limiting operation. - * Hence the value being shifted is never negative, and we don't - * need the general RIGHT_SHIFT macro. - */ - /* Y */ - outptr0[col] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - /* Cb */ - outptr1[col] = (JSAMPLE) - ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) - >> SCALEBITS); - /* Cr */ - outptr2[col] = (JSAMPLE) - ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) - >> SCALEBITS); - } - } -} - - -/* - * Convert some rows of samples to the JPEG colorspace. - * [R,G,B] to [R-G,G,B-G] conversion with modulo calculation - * (forward reversible color transform). - * This can be seen as an adaption of the general RGB->YCbCr - * conversion equation with Kr = Kb = 0, while replacing the - * normalization by modulo calculation. - */ - -METHODDEF(void) -rgb_rgb1_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - register int r, g, b; - register JSAMPROW inptr; - register JSAMPROW outptr0, outptr1, outptr2; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->image_width; - - while (--num_rows >= 0) { - inptr = *input_buf++; - outptr0 = output_buf[0][output_row]; - outptr1 = output_buf[1][output_row]; - outptr2 = output_buf[2][output_row]; - output_row++; - for (col = 0; col < num_cols; col++) { - r = GETJSAMPLE(inptr[RGB_RED]); - g = GETJSAMPLE(inptr[RGB_GREEN]); - b = GETJSAMPLE(inptr[RGB_BLUE]); - inptr += RGB_PIXELSIZE; - /* Assume that MAXJSAMPLE+1 is a power of 2, so that the MOD - * (modulo) operator is equivalent to the bitmask operator AND. - */ - outptr0[col] = (JSAMPLE) ((r - g + CENTERJSAMPLE) & MAXJSAMPLE); - outptr1[col] = (JSAMPLE) g; - outptr2[col] = (JSAMPLE) ((b - g + CENTERJSAMPLE) & MAXJSAMPLE); - } - } -} - - -/* - * Convert some rows of samples to the JPEG colorspace. - * This version handles grayscale output with no conversion. - * The source can be either plain grayscale or YCC (since Y == gray). - */ - -METHODDEF(void) -grayscale_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - register JSAMPROW inptr; - register JSAMPROW outptr; - register JDIMENSION count; - register int instride = cinfo->input_components; - JDIMENSION num_cols = cinfo->image_width; - - while (--num_rows >= 0) { - inptr = *input_buf++; - outptr = output_buf[0][output_row++]; - for (count = num_cols; count > 0; count--) { - *outptr++ = *inptr; /* don't need GETJSAMPLE() here */ - inptr += instride; - } - } -} - - -/* - * Convert some rows of samples to the JPEG colorspace. - * No colorspace conversion, but change from interleaved - * to separate-planes representation. - */ - -METHODDEF(void) -rgb_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - register JSAMPROW inptr; - register JSAMPROW outptr0, outptr1, outptr2; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->image_width; - - while (--num_rows >= 0) { - inptr = *input_buf++; - outptr0 = output_buf[0][output_row]; - outptr1 = output_buf[1][output_row]; - outptr2 = output_buf[2][output_row]; - output_row++; - for (col = 0; col < num_cols; col++) { - /* We can dispense with GETJSAMPLE() here */ - outptr0[col] = inptr[RGB_RED]; - outptr1[col] = inptr[RGB_GREEN]; - outptr2[col] = inptr[RGB_BLUE]; - inptr += RGB_PIXELSIZE; - } - } -} - - -/* - * Convert some rows of samples to the JPEG colorspace. - * This version handles multi-component colorspaces without conversion. - * We assume input_components == num_components. - */ - -METHODDEF(void) -null_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - register JSAMPROW inptr; - register JSAMPROW outptr; - register JDIMENSION count; - register int num_comps = cinfo->num_components; - JDIMENSION num_cols = cinfo->image_width; - int ci; - - while (--num_rows >= 0) { - /* It seems fastest to make a separate pass for each component. */ - for (ci = 0; ci < num_comps; ci++) { - inptr = input_buf[0] + ci; - outptr = output_buf[ci][output_row]; - for (count = num_cols; count > 0; count--) { - *outptr++ = *inptr; /* don't need GETJSAMPLE() here */ - inptr += num_comps; - } - } - input_buf++; - output_row++; - } -} - - -/* - * Empty method for start_pass. - */ - -METHODDEF(void) -null_method (j_compress_ptr cinfo) -{ - /* no work needed */ -} - - -/* - * Module initialization routine for input colorspace conversion. - */ - -GLOBAL(void) -jinit_color_converter (j_compress_ptr cinfo) -{ - my_cconvert_ptr cconvert; - - cconvert = (my_cconvert_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_color_converter)); - cinfo->cconvert = &cconvert->pub; - /* set start_pass to null method until we find out differently */ - cconvert->pub.start_pass = null_method; - - /* Make sure input_components agrees with in_color_space */ - switch (cinfo->in_color_space) { - case JCS_GRAYSCALE: - if (cinfo->input_components != 1) - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - break; - - case JCS_RGB: - case JCS_BG_RGB: -#if RGB_PIXELSIZE != 3 - if (cinfo->input_components != RGB_PIXELSIZE) - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - break; -#endif /* else share code with YCbCr */ - - case JCS_YCbCr: - case JCS_BG_YCC: - if (cinfo->input_components != 3) - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - break; - - case JCS_CMYK: - case JCS_YCCK: - if (cinfo->input_components != 4) - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - break; - - default: /* JCS_UNKNOWN can be anything */ - if (cinfo->input_components < 1) - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - } - - /* Support color transform only for RGB colorspaces */ - if (cinfo->color_transform && - cinfo->jpeg_color_space != JCS_RGB && - cinfo->jpeg_color_space != JCS_BG_RGB) - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - - /* Check num_components, set conversion method based on requested space */ - switch (cinfo->jpeg_color_space) { - case JCS_GRAYSCALE: - if (cinfo->num_components != 1) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - switch (cinfo->in_color_space) { - case JCS_GRAYSCALE: - case JCS_YCbCr: - case JCS_BG_YCC: - cconvert->pub.color_convert = grayscale_convert; - break; - case JCS_RGB: - cconvert->pub.start_pass = rgb_ycc_start; - cconvert->pub.color_convert = rgb_gray_convert; - break; - default: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - break; - - case JCS_RGB: - case JCS_BG_RGB: - if (cinfo->num_components != 3) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - if (cinfo->in_color_space != cinfo->jpeg_color_space) - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - switch (cinfo->color_transform) { - case JCT_NONE: - cconvert->pub.color_convert = rgb_convert; - break; - case JCT_SUBTRACT_GREEN: - cconvert->pub.color_convert = rgb_rgb1_convert; - break; - default: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - break; - - case JCS_YCbCr: - if (cinfo->num_components != 3) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - switch (cinfo->in_color_space) { - case JCS_RGB: - cconvert->pub.start_pass = rgb_ycc_start; - cconvert->pub.color_convert = rgb_ycc_convert; - break; - case JCS_YCbCr: - cconvert->pub.color_convert = null_convert; - break; - default: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - break; - - case JCS_BG_YCC: - if (cinfo->num_components != 3) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - switch (cinfo->in_color_space) { - case JCS_RGB: - /* For conversion from normal RGB input to BG_YCC representation, - * the Cb/Cr values are first computed as usual, and then - * quantized further after DCT processing by a factor of - * 2 in reference to the nominal quantization factor. - */ - /* need quantization scale by factor of 2 after DCT */ - cinfo->comp_info[1].component_needed = TRUE; - cinfo->comp_info[2].component_needed = TRUE; - /* compute normal YCC first */ - cconvert->pub.start_pass = rgb_ycc_start; - cconvert->pub.color_convert = rgb_ycc_convert; - break; - case JCS_YCbCr: - /* need quantization scale by factor of 2 after DCT */ - cinfo->comp_info[1].component_needed = TRUE; - cinfo->comp_info[2].component_needed = TRUE; - /*FALLTHROUGH*/ - case JCS_BG_YCC: - /* Pass through for BG_YCC input */ - cconvert->pub.color_convert = null_convert; - break; - default: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - break; - - case JCS_CMYK: - if (cinfo->num_components != 4) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - if (cinfo->in_color_space != JCS_CMYK) - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - cconvert->pub.color_convert = null_convert; - break; - - case JCS_YCCK: - if (cinfo->num_components != 4) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - switch (cinfo->in_color_space) { - case JCS_CMYK: - cconvert->pub.start_pass = rgb_ycc_start; - cconvert->pub.color_convert = cmyk_ycck_convert; - break; - case JCS_YCCK: - cconvert->pub.color_convert = null_convert; - break; - default: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - break; - - default: /* allow null conversion of JCS_UNKNOWN */ - if (cinfo->jpeg_color_space != cinfo->in_color_space || - cinfo->num_components != cinfo->input_components) - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - cconvert->pub.color_convert = null_convert; - } -} diff --git a/thirdparty/jpeg-9e/jcdctmgr.c b/thirdparty/jpeg-9e/jcdctmgr.c deleted file mode 100644 index a48ccd8..0000000 --- a/thirdparty/jpeg-9e/jcdctmgr.c +++ /dev/null @@ -1,466 +0,0 @@ -/* - * jcdctmgr.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2003-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the forward-DCT management logic. - * This code selects a particular DCT implementation to be used, - * and it performs related housekeeping chores including coefficient - * quantization. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - - -/* Private subobject for this module */ - -typedef struct { - struct jpeg_forward_dct pub; /* public fields */ - - /* Pointer to the DCT routine actually in use */ - forward_DCT_method_ptr do_dct[MAX_COMPONENTS]; - -#ifdef DCT_FLOAT_SUPPORTED - /* Same as above for the floating-point case. */ - float_DCT_method_ptr do_float_dct[MAX_COMPONENTS]; -#endif -} my_fdct_controller; - -typedef my_fdct_controller * my_fdct_ptr; - - -/* The allocated post-DCT divisor tables -- big enough for any - * supported variant and not identical to the quant table entries, - * because of scaling (especially for an unnormalized DCT) -- - * are pointed to by dct_table in the per-component comp_info - * structures. Each table is given in normal array order. - */ - -typedef union { - DCTELEM int_array[DCTSIZE2]; -#ifdef DCT_FLOAT_SUPPORTED - FAST_FLOAT float_array[DCTSIZE2]; -#endif -} divisor_table; - - -/* The current scaled-DCT routines require ISLOW-style divisor tables, - * so be sure to compile that code if either ISLOW or SCALING is requested. - */ -#ifdef DCT_ISLOW_SUPPORTED -#define PROVIDE_ISLOW_TABLES -#else -#ifdef DCT_SCALING_SUPPORTED -#define PROVIDE_ISLOW_TABLES -#endif -#endif - - -/* - * Perform forward DCT on one or more blocks of a component. - * - * The input samples are taken from the sample_data[] array starting at - * position start_col, and moving to the right for any additional blocks. - * The quantized coefficients are returned in coef_blocks[]. - */ - -METHODDEF(void) -forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY sample_data, JBLOCKROW coef_blocks, - JDIMENSION start_col, JDIMENSION num_blocks) -/* This version is used for integer DCT implementations. */ -{ - /* This routine is heavily used, so it's worth coding it tightly. */ - my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; - forward_DCT_method_ptr do_dct = fdct->do_dct[compptr->component_index]; - DCTELEM * divisors = (DCTELEM *) compptr->dct_table; - DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */ - JDIMENSION bi; - - for (bi = 0; bi < num_blocks; bi++, start_col += compptr->DCT_h_scaled_size) { - /* Perform the DCT */ - (*do_dct) (workspace, sample_data, start_col); - - /* Quantize/descale the coefficients, and store into coef_blocks[] */ - { register DCTELEM temp, qval; - register int i; - register JCOEFPTR output_ptr = coef_blocks[bi]; - - for (i = 0; i < DCTSIZE2; i++) { - qval = divisors[i]; - temp = workspace[i]; - /* Divide the coefficient value by qval, ensuring proper rounding. - * Since C does not specify the direction of rounding for negative - * quotients, we have to force the dividend positive for portability. - * - * In most files, at least half of the output values will be zero - * (at default quantization settings, more like three-quarters...) - * so we should ensure that this case is fast. On many machines, - * a comparison is enough cheaper than a divide to make a special test - * a win. Since both inputs will be nonnegative, we need only test - * for a < b to discover whether a/b is 0. - * If your machine's division is fast enough, define FAST_DIVIDE. - */ -#ifdef FAST_DIVIDE -#define DIVIDE_BY(a,b) a /= b -#else -#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0 -#endif - if (temp < 0) { - temp = -temp; - temp += qval>>1; /* for rounding */ - DIVIDE_BY(temp, qval); - temp = -temp; - } else { - temp += qval>>1; /* for rounding */ - DIVIDE_BY(temp, qval); - } - output_ptr[i] = (JCOEF) temp; - } - } - } -} - - -#ifdef DCT_FLOAT_SUPPORTED - -METHODDEF(void) -forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY sample_data, JBLOCKROW coef_blocks, - JDIMENSION start_col, JDIMENSION num_blocks) -/* This version is used for floating-point DCT implementations. */ -{ - /* This routine is heavily used, so it's worth coding it tightly. */ - my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; - float_DCT_method_ptr do_dct = fdct->do_float_dct[compptr->component_index]; - FAST_FLOAT * divisors = (FAST_FLOAT *) compptr->dct_table; - FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */ - JDIMENSION bi; - - for (bi = 0; bi < num_blocks; bi++, start_col += compptr->DCT_h_scaled_size) { - /* Perform the DCT */ - (*do_dct) (workspace, sample_data, start_col); - - /* Quantize/descale the coefficients, and store into coef_blocks[] */ - { register FAST_FLOAT temp; - register int i; - register JCOEFPTR output_ptr = coef_blocks[bi]; - - for (i = 0; i < DCTSIZE2; i++) { - /* Apply the quantization and scaling factor */ - temp = workspace[i] * divisors[i]; - /* Round to nearest integer. - * Since C does not specify the direction of rounding for negative - * quotients, we have to force the dividend positive for portability. - * The maximum coefficient size is +-16K (for 12-bit data), so this - * code should work for either 16-bit or 32-bit ints. - */ - output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384); - } - } - } -} - -#endif /* DCT_FLOAT_SUPPORTED */ - - -/* - * Initialize for a processing pass. - * Verify that all referenced Q-tables are present, and set up - * the divisor table for each one. - * In the current implementation, DCT of all components is done during - * the first pass, even if only some components will be output in the - * first scan. Hence all components should be examined here. - */ - -METHODDEF(void) -start_pass_fdctmgr (j_compress_ptr cinfo) -{ - my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; - int ci, qtblno, i; - jpeg_component_info *compptr; - int method = 0; - JQUANT_TBL * qtbl; - DCTELEM * dtbl; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Select the proper DCT routine for this component's scaling */ - switch ((compptr->DCT_h_scaled_size << 8) + compptr->DCT_v_scaled_size) { -#ifdef DCT_SCALING_SUPPORTED - case ((1 << 8) + 1): - fdct->do_dct[ci] = jpeg_fdct_1x1; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((2 << 8) + 2): - fdct->do_dct[ci] = jpeg_fdct_2x2; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((3 << 8) + 3): - fdct->do_dct[ci] = jpeg_fdct_3x3; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((4 << 8) + 4): - fdct->do_dct[ci] = jpeg_fdct_4x4; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((5 << 8) + 5): - fdct->do_dct[ci] = jpeg_fdct_5x5; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((6 << 8) + 6): - fdct->do_dct[ci] = jpeg_fdct_6x6; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((7 << 8) + 7): - fdct->do_dct[ci] = jpeg_fdct_7x7; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((9 << 8) + 9): - fdct->do_dct[ci] = jpeg_fdct_9x9; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((10 << 8) + 10): - fdct->do_dct[ci] = jpeg_fdct_10x10; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((11 << 8) + 11): - fdct->do_dct[ci] = jpeg_fdct_11x11; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((12 << 8) + 12): - fdct->do_dct[ci] = jpeg_fdct_12x12; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((13 << 8) + 13): - fdct->do_dct[ci] = jpeg_fdct_13x13; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((14 << 8) + 14): - fdct->do_dct[ci] = jpeg_fdct_14x14; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((15 << 8) + 15): - fdct->do_dct[ci] = jpeg_fdct_15x15; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((16 << 8) + 16): - fdct->do_dct[ci] = jpeg_fdct_16x16; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((16 << 8) + 8): - fdct->do_dct[ci] = jpeg_fdct_16x8; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((14 << 8) + 7): - fdct->do_dct[ci] = jpeg_fdct_14x7; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((12 << 8) + 6): - fdct->do_dct[ci] = jpeg_fdct_12x6; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((10 << 8) + 5): - fdct->do_dct[ci] = jpeg_fdct_10x5; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((8 << 8) + 4): - fdct->do_dct[ci] = jpeg_fdct_8x4; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((6 << 8) + 3): - fdct->do_dct[ci] = jpeg_fdct_6x3; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((4 << 8) + 2): - fdct->do_dct[ci] = jpeg_fdct_4x2; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((2 << 8) + 1): - fdct->do_dct[ci] = jpeg_fdct_2x1; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((8 << 8) + 16): - fdct->do_dct[ci] = jpeg_fdct_8x16; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((7 << 8) + 14): - fdct->do_dct[ci] = jpeg_fdct_7x14; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((6 << 8) + 12): - fdct->do_dct[ci] = jpeg_fdct_6x12; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((5 << 8) + 10): - fdct->do_dct[ci] = jpeg_fdct_5x10; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((4 << 8) + 8): - fdct->do_dct[ci] = jpeg_fdct_4x8; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((3 << 8) + 6): - fdct->do_dct[ci] = jpeg_fdct_3x6; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((2 << 8) + 4): - fdct->do_dct[ci] = jpeg_fdct_2x4; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; - case ((1 << 8) + 2): - fdct->do_dct[ci] = jpeg_fdct_1x2; - method = JDCT_ISLOW; /* jfdctint uses islow-style table */ - break; -#endif - case ((DCTSIZE << 8) + DCTSIZE): - switch (cinfo->dct_method) { -#ifdef DCT_ISLOW_SUPPORTED - case JDCT_ISLOW: - fdct->do_dct[ci] = jpeg_fdct_islow; - method = JDCT_ISLOW; - break; -#endif -#ifdef DCT_IFAST_SUPPORTED - case JDCT_IFAST: - fdct->do_dct[ci] = jpeg_fdct_ifast; - method = JDCT_IFAST; - break; -#endif -#ifdef DCT_FLOAT_SUPPORTED - case JDCT_FLOAT: - fdct->do_float_dct[ci] = jpeg_fdct_float; - method = JDCT_FLOAT; - break; -#endif - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - } - break; - default: - ERREXIT2(cinfo, JERR_BAD_DCTSIZE, - compptr->DCT_h_scaled_size, compptr->DCT_v_scaled_size); - } - qtblno = compptr->quant_tbl_no; - /* Make sure specified quantization table is present */ - if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || - cinfo->quant_tbl_ptrs[qtblno] == NULL) - ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); - qtbl = cinfo->quant_tbl_ptrs[qtblno]; - /* Create divisor table from quant table */ - switch (method) { -#ifdef PROVIDE_ISLOW_TABLES - case JDCT_ISLOW: - /* For LL&M IDCT method, divisors are equal to raw quantization - * coefficients multiplied by 8 (to counteract scaling). - */ - dtbl = (DCTELEM *) compptr->dct_table; - for (i = 0; i < DCTSIZE2; i++) { - dtbl[i] = - ((DCTELEM) qtbl->quantval[i]) << (compptr->component_needed ? 4 : 3); - } - fdct->pub.forward_DCT[ci] = forward_DCT; - break; -#endif -#ifdef DCT_IFAST_SUPPORTED - case JDCT_IFAST: - { - /* For AA&N IDCT method, divisors are equal to quantization - * coefficients scaled by scalefactor[row]*scalefactor[col], where - * scalefactor[0] = 1 - * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 - * We apply a further scale factor of 8. - */ -#define CONST_BITS 14 - static const INT16 aanscales[DCTSIZE2] = { - /* precomputed values scaled up by 14 bits */ - 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, - 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, - 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, - 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, - 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, - 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, - 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, - 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 - }; - SHIFT_TEMPS - - dtbl = (DCTELEM *) compptr->dct_table; - for (i = 0; i < DCTSIZE2; i++) { - dtbl[i] = (DCTELEM) - DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i], - (INT32) aanscales[i]), - compptr->component_needed ? CONST_BITS-4 : CONST_BITS-3); - } - } - fdct->pub.forward_DCT[ci] = forward_DCT; - break; -#endif -#ifdef DCT_FLOAT_SUPPORTED - case JDCT_FLOAT: - { - /* For float AA&N IDCT method, divisors are equal to quantization - * coefficients scaled by scalefactor[row]*scalefactor[col], where - * scalefactor[0] = 1 - * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 - * We apply a further scale factor of 8. - * What's actually stored is 1/divisor so that the inner loop can - * use a multiplication rather than a division. - */ - FAST_FLOAT * fdtbl = (FAST_FLOAT *) compptr->dct_table; - int row, col; - static const double aanscalefactor[DCTSIZE] = { - 1.0, 1.387039845, 1.306562965, 1.175875602, - 1.0, 0.785694958, 0.541196100, 0.275899379 - }; - - i = 0; - for (row = 0; row < DCTSIZE; row++) { - for (col = 0; col < DCTSIZE; col++) { - fdtbl[i] = (FAST_FLOAT) - (1.0 / ((double) qtbl->quantval[i] * - aanscalefactor[row] * aanscalefactor[col] * - (compptr->component_needed ? 16.0 : 8.0))); - i++; - } - } - } - fdct->pub.forward_DCT[ci] = forward_DCT_float; - break; -#endif - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - } - } -} - - -/* - * Initialize FDCT manager. - */ - -GLOBAL(void) -jinit_forward_dct (j_compress_ptr cinfo) -{ - my_fdct_ptr fdct; - int ci; - jpeg_component_info *compptr; - - fdct = (my_fdct_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_fdct_controller)); - cinfo->fdct = &fdct->pub; - fdct->pub.start_pass = start_pass_fdctmgr; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Allocate a divisor table for each component */ - compptr->dct_table = (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(divisor_table)); - } -} diff --git a/thirdparty/jpeg-9e/jchuff.c b/thirdparty/jpeg-9e/jchuff.c deleted file mode 100644 index f3272c9..0000000 --- a/thirdparty/jpeg-9e/jchuff.c +++ /dev/null @@ -1,1640 +0,0 @@ -/* - * jchuff.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2006-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains Huffman entropy encoding routines. - * Both sequential and progressive modes are supported in this single module. - * - * Much of the complexity here has to do with supporting output suspension. - * If the data destination module demands suspension, we want to be able to - * back up to the start of the current MCU. To do this, we copy state - * variables into local working storage, and update them back to the - * permanent JPEG objects only upon successful completion of an MCU. - * - * We do not support output suspension for the progressive JPEG mode, since - * the library currently does not allow multiple-scan files to be written - * with output suspension. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* The legal range of a DCT coefficient is - * -1024 .. +1023 for 8-bit data; - * -16384 .. +16383 for 12-bit data. - * Hence the magnitude should always fit in 10 or 14 bits respectively. - */ - -#if BITS_IN_JSAMPLE == 8 -#define MAX_COEF_BITS 10 -#else -#define MAX_COEF_BITS 14 -#endif - -/* Derived data constructed for each Huffman table */ - -typedef struct { - unsigned int ehufco[256]; /* code for each symbol */ - char ehufsi[256]; /* length of code for each symbol */ - /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ -} c_derived_tbl; - - -/* Expanded entropy encoder object for Huffman encoding. - * - * The savable_state subrecord contains fields that change within an MCU, - * but must not be updated permanently until we complete the MCU. - */ - -typedef struct { - INT32 put_buffer; /* current bit-accumulation buffer */ - int put_bits; /* # of bits now in it */ - int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ -} savable_state; - -/* This macro is to work around compilers with missing or broken - * structure assignment. You'll need to fix this code if you have - * such a compiler and you change MAX_COMPS_IN_SCAN. - */ - -#ifndef NO_STRUCT_ASSIGN -#define ASSIGN_STATE(dest,src) ((dest) = (src)) -#else -#if MAX_COMPS_IN_SCAN == 4 -#define ASSIGN_STATE(dest,src) \ - ((dest).put_buffer = (src).put_buffer, \ - (dest).put_bits = (src).put_bits, \ - (dest).last_dc_val[0] = (src).last_dc_val[0], \ - (dest).last_dc_val[1] = (src).last_dc_val[1], \ - (dest).last_dc_val[2] = (src).last_dc_val[2], \ - (dest).last_dc_val[3] = (src).last_dc_val[3]) -#endif -#endif - - -typedef struct { - struct jpeg_entropy_encoder pub; /* public fields */ - - savable_state saved; /* Bit buffer & DC state at start of MCU */ - - /* These fields are NOT loaded into local working state. */ - unsigned int restarts_to_go; /* MCUs left in this restart interval */ - int next_restart_num; /* next restart number to write (0-7) */ - - /* Pointers to derived tables (these workspaces have image lifespan) */ - c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; - c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; - - /* Statistics tables for optimization */ - long * dc_count_ptrs[NUM_HUFF_TBLS]; - long * ac_count_ptrs[NUM_HUFF_TBLS]; - - /* Following fields used only in progressive mode */ - - /* Mode flag: TRUE for optimization, FALSE for actual data output */ - boolean gather_statistics; - - /* next_output_byte/free_in_buffer are local copies of cinfo->dest fields. - */ - JOCTET * next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - j_compress_ptr cinfo; /* link to cinfo (needed for dump_buffer) */ - - /* Coding status for AC components */ - int ac_tbl_no; /* the table number of the single component */ - unsigned int EOBRUN; /* run length of EOBs */ - unsigned int BE; /* # of buffered correction bits before MCU */ - char * bit_buffer; /* buffer for correction bits (1 per char) */ - /* packing correction bits tightly would save some space but cost time... */ -} huff_entropy_encoder; - -typedef huff_entropy_encoder * huff_entropy_ptr; - -/* Working state while writing an MCU (sequential mode). - * This struct contains all the fields that are needed by subroutines. - */ - -typedef struct { - JOCTET * next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - savable_state cur; /* Current bit buffer & DC state */ - j_compress_ptr cinfo; /* dump_buffer needs access to this */ -} working_state; - -/* MAX_CORR_BITS is the number of bits the AC refinement correction-bit - * buffer can hold. Larger sizes may slightly improve compression, but - * 1000 is already well into the realm of overkill. - * The minimum safe size is 64 bits. - */ - -#define MAX_CORR_BITS 1000 /* Max # of correction bits I can buffer */ - -/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32. - * We assume that int right shift is unsigned if INT32 right shift is, - * which should be safe. - */ - -#ifdef RIGHT_SHIFT_IS_UNSIGNED -#define ISHIFT_TEMPS int ishift_temp; -#define IRIGHT_SHIFT(x,shft) \ - ((ishift_temp = (x)) < 0 ? \ - (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \ - (ishift_temp >> (shft))) -#else -#define ISHIFT_TEMPS -#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) -#endif - - -/* - * Compute the derived values for a Huffman table. - * This routine also performs some validation checks on the table. - */ - -LOCAL(void) -jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno, - c_derived_tbl ** pdtbl) -{ - JHUFF_TBL *htbl; - c_derived_tbl *dtbl; - int p, i, l, lastp, si, maxsymbol; - char huffsize[257]; - unsigned int huffcode[257]; - unsigned int code; - - /* Note that huffsize[] and huffcode[] are filled in code-length order, - * paralleling the order of the symbols themselves in htbl->huffval[]. - */ - - /* Find the input Huffman table */ - if (tblno < 0 || tblno >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); - htbl = - isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno]; - if (htbl == NULL) - htbl = jpeg_std_huff_table((j_common_ptr) cinfo, isDC, tblno); - - /* Allocate a workspace if we haven't already done so. */ - if (*pdtbl == NULL) - *pdtbl = (c_derived_tbl *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(c_derived_tbl)); - dtbl = *pdtbl; - - /* Figure C.1: make table of Huffman code length for each symbol */ - - p = 0; - for (l = 1; l <= 16; l++) { - i = (int) htbl->bits[l]; - if (i < 0 || p + i > 256) /* protect against table overrun */ - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - while (i--) - huffsize[p++] = (char) l; - } - huffsize[p] = 0; - lastp = p; - - /* Figure C.2: generate the codes themselves */ - /* We also validate that the counts represent a legal Huffman code tree. */ - - code = 0; - si = huffsize[0]; - p = 0; - while (huffsize[p]) { - while (((int) huffsize[p]) == si) { - huffcode[p++] = code; - code++; - } - /* code is now 1 more than the last code used for codelength si; but - * it must still fit in si bits, since no code is allowed to be all ones. - */ - if (((INT32) code) >= (((INT32) 1) << si)) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - code <<= 1; - si++; - } - - /* Figure C.3: generate encoding tables */ - /* These are code and size indexed by symbol value */ - - /* Set all codeless symbols to have code length 0; - * this lets us detect duplicate VAL entries here, and later - * allows emit_bits to detect any attempt to emit such symbols. - */ - MEMZERO(dtbl->ehufsi, SIZEOF(dtbl->ehufsi)); - - /* This is also a convenient place to check for out-of-range - * and duplicated VAL entries. We allow 0..255 for AC symbols - * but only 0..15 for DC. (We could constrain them further - * based on data depth and mode, but this seems enough.) - */ - maxsymbol = isDC ? 15 : 255; - - for (p = 0; p < lastp; p++) { - i = htbl->huffval[p]; - if (i < 0 || i > maxsymbol || dtbl->ehufsi[i]) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - dtbl->ehufco[i] = huffcode[p]; - dtbl->ehufsi[i] = huffsize[p]; - } -} - - -/* Outputting bytes to the file. - * NB: these must be called only when actually outputting, - * that is, entropy->gather_statistics == FALSE. - */ - -/* Emit a byte, taking 'action' if must suspend. */ -#define emit_byte_s(state,val,action) \ - { *(state)->next_output_byte++ = (JOCTET) (val); \ - if (--(state)->free_in_buffer == 0) \ - if (! dump_buffer_s(state)) \ - { action; } } - -/* Emit a byte */ -#define emit_byte_e(entropy,val) \ - { *(entropy)->next_output_byte++ = (JOCTET) (val); \ - if (--(entropy)->free_in_buffer == 0) \ - dump_buffer_e(entropy); } - - -LOCAL(boolean) -dump_buffer_s (working_state * state) -/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */ -{ - struct jpeg_destination_mgr * dest = state->cinfo->dest; - - if (! (*dest->empty_output_buffer) (state->cinfo)) - return FALSE; - /* After a successful buffer dump, must reset buffer pointers */ - state->next_output_byte = dest->next_output_byte; - state->free_in_buffer = dest->free_in_buffer; - return TRUE; -} - - -LOCAL(void) -dump_buffer_e (huff_entropy_ptr entropy) -/* Empty the output buffer; we do not support suspension in this case. */ -{ - struct jpeg_destination_mgr * dest = entropy->cinfo->dest; - - if (! (*dest->empty_output_buffer) (entropy->cinfo)) - ERREXIT(entropy->cinfo, JERR_CANT_SUSPEND); - /* After a successful buffer dump, must reset buffer pointers */ - entropy->next_output_byte = dest->next_output_byte; - entropy->free_in_buffer = dest->free_in_buffer; -} - - -/* Outputting bits to the file */ - -/* Only the right 24 bits of put_buffer are used; the valid bits are - * left-justified in this part. At most 16 bits can be passed to emit_bits - * in one call, and we never retain more than 7 bits in put_buffer - * between calls, so 24 bits are sufficient. - */ - -INLINE -LOCAL(boolean) -emit_bits_s (working_state * state, unsigned int code, int size) -/* Emit some bits; return TRUE if successful, FALSE if must suspend */ -{ - /* This routine is heavily used, so it's worth coding tightly. */ - register INT32 put_buffer; - register int put_bits; - - /* if size is 0, caller used an invalid Huffman table entry */ - if (size == 0) - ERREXIT(state->cinfo, JERR_HUFF_MISSING_CODE); - - /* mask off any extra bits in code */ - put_buffer = ((INT32) code) & ((((INT32) 1) << size) - 1); - - /* new number of bits in buffer */ - put_bits = size + state->cur.put_bits; - - put_buffer <<= 24 - put_bits; /* align incoming bits */ - - /* and merge with old buffer contents */ - put_buffer |= state->cur.put_buffer; - - while (put_bits >= 8) { - int c = (int) ((put_buffer >> 16) & 0xFF); - - emit_byte_s(state, c, return FALSE); - if (c == 0xFF) { /* need to stuff a zero byte? */ - emit_byte_s(state, 0, return FALSE); - } - put_buffer <<= 8; - put_bits -= 8; - } - - state->cur.put_buffer = put_buffer; /* update state variables */ - state->cur.put_bits = put_bits; - - return TRUE; -} - - -INLINE -LOCAL(void) -emit_bits_e (huff_entropy_ptr entropy, unsigned int code, int size) -/* Emit some bits, unless we are in gather mode */ -{ - /* This routine is heavily used, so it's worth coding tightly. */ - register INT32 put_buffer; - register int put_bits; - - /* if size is 0, caller used an invalid Huffman table entry */ - if (size == 0) - ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); - - if (entropy->gather_statistics) - return; /* do nothing if we're only getting stats */ - - /* mask off any extra bits in code */ - put_buffer = ((INT32) code) & ((((INT32) 1) << size) - 1); - - /* new number of bits in buffer */ - put_bits = size + entropy->saved.put_bits; - - put_buffer <<= 24 - put_bits; /* align incoming bits */ - - /* and merge with old buffer contents */ - put_buffer |= entropy->saved.put_buffer; - - while (put_bits >= 8) { - int c = (int) ((put_buffer >> 16) & 0xFF); - - emit_byte_e(entropy, c); - if (c == 0xFF) { /* need to stuff a zero byte? */ - emit_byte_e(entropy, 0); - } - put_buffer <<= 8; - put_bits -= 8; - } - - entropy->saved.put_buffer = put_buffer; /* update variables */ - entropy->saved.put_bits = put_bits; -} - - -LOCAL(boolean) -flush_bits_s (working_state * state) -{ - if (! emit_bits_s(state, 0x7F, 7)) /* fill any partial byte with ones */ - return FALSE; - state->cur.put_buffer = 0; /* and reset bit-buffer to empty */ - state->cur.put_bits = 0; - return TRUE; -} - - -LOCAL(void) -flush_bits_e (huff_entropy_ptr entropy) -{ - emit_bits_e(entropy, 0x7F, 7); /* fill any partial byte with ones */ - entropy->saved.put_buffer = 0; /* and reset bit-buffer to empty */ - entropy->saved.put_bits = 0; -} - - -/* - * Emit (or just count) a Huffman symbol. - */ - -INLINE -LOCAL(void) -emit_dc_symbol (huff_entropy_ptr entropy, int tbl_no, int symbol) -{ - if (entropy->gather_statistics) - entropy->dc_count_ptrs[tbl_no][symbol]++; - else { - c_derived_tbl * tbl = entropy->dc_derived_tbls[tbl_no]; - emit_bits_e(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]); - } -} - - -INLINE -LOCAL(void) -emit_ac_symbol (huff_entropy_ptr entropy, int tbl_no, int symbol) -{ - if (entropy->gather_statistics) - entropy->ac_count_ptrs[tbl_no][symbol]++; - else { - c_derived_tbl * tbl = entropy->ac_derived_tbls[tbl_no]; - emit_bits_e(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]); - } -} - - -/* - * Emit bits from a correction bit buffer. - */ - -LOCAL(void) -emit_buffered_bits (huff_entropy_ptr entropy, char * bufstart, - unsigned int nbits) -{ - if (entropy->gather_statistics) - return; /* no real work */ - - while (nbits > 0) { - emit_bits_e(entropy, (unsigned int) (*bufstart), 1); - bufstart++; - nbits--; - } -} - - -/* - * Emit any pending EOBRUN symbol. - */ - -LOCAL(void) -emit_eobrun (huff_entropy_ptr entropy) -{ - register int temp, nbits; - - if (entropy->EOBRUN > 0) { /* if there is any pending EOBRUN */ - temp = entropy->EOBRUN; - nbits = 0; - while ((temp >>= 1)) - nbits++; - /* safety check: shouldn't happen given limited correction-bit buffer */ - if (nbits > 14) - ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); - - emit_ac_symbol(entropy, entropy->ac_tbl_no, nbits << 4); - if (nbits) - emit_bits_e(entropy, entropy->EOBRUN, nbits); - - entropy->EOBRUN = 0; - - /* Emit any buffered correction bits */ - emit_buffered_bits(entropy, entropy->bit_buffer, entropy->BE); - entropy->BE = 0; - } -} - - -/* - * Emit a restart marker & resynchronize predictions. - */ - -LOCAL(boolean) -emit_restart_s (working_state * state, int restart_num) -{ - int ci; - - if (! flush_bits_s(state)) - return FALSE; - - emit_byte_s(state, 0xFF, return FALSE); - emit_byte_s(state, JPEG_RST0 + restart_num, return FALSE); - - /* Re-initialize DC predictions to 0 */ - for (ci = 0; ci < state->cinfo->comps_in_scan; ci++) - state->cur.last_dc_val[ci] = 0; - - /* The restart counter is not updated until we successfully write the MCU. */ - - return TRUE; -} - - -LOCAL(void) -emit_restart_e (huff_entropy_ptr entropy, int restart_num) -{ - int ci; - - emit_eobrun(entropy); - - if (! entropy->gather_statistics) { - flush_bits_e(entropy); - emit_byte_e(entropy, 0xFF); - emit_byte_e(entropy, JPEG_RST0 + restart_num); - } - - if (entropy->cinfo->Ss == 0) { - /* Re-initialize DC predictions to 0 */ - for (ci = 0; ci < entropy->cinfo->comps_in_scan; ci++) - entropy->saved.last_dc_val[ci] = 0; - } else { - /* Re-initialize all AC-related fields to 0 */ - entropy->EOBRUN = 0; - entropy->BE = 0; - } -} - - -/* - * MCU encoding for DC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - register int temp, temp2; - register int nbits; - int blkn, ci, tbl; - ISHIFT_TEMPS - - entropy->next_output_byte = cinfo->dest->next_output_byte; - entropy->free_in_buffer = cinfo->dest->free_in_buffer; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) - if (entropy->restarts_to_go == 0) - emit_restart_e(entropy, entropy->next_restart_num); - - /* Encode the MCU data blocks */ - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - ci = cinfo->MCU_membership[blkn]; - tbl = cinfo->cur_comp_info[ci]->dc_tbl_no; - - /* Compute the DC value after the required point transform by Al. - * This is simply an arithmetic right shift. - */ - temp = IRIGHT_SHIFT((int) (MCU_data[blkn][0][0]), cinfo->Al); - - /* DC differences are figured on the point-transformed values. */ - temp2 = temp - entropy->saved.last_dc_val[ci]; - entropy->saved.last_dc_val[ci] = temp; - - /* Encode the DC coefficient difference per section G.1.2.1 */ - temp = temp2; - if (temp < 0) { - temp = -temp; /* temp is abs value of input */ - /* For a negative input, want temp2 = bitwise complement of abs(input) */ - /* This code assumes we are on a two's complement machine */ - temp2--; - } - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 0; - while (temp) { - nbits++; - temp >>= 1; - } - /* Check for out-of-range coefficient values. - * Since we're encoding a difference, the range limit is twice as much. - */ - if (nbits > MAX_COEF_BITS+1) - ERREXIT(cinfo, JERR_BAD_DCT_COEF); - - /* Count/emit the Huffman-coded symbol for the number of bits */ - emit_dc_symbol(entropy, tbl, nbits); - - /* Emit that number of bits of the value, if positive, */ - /* or the complement of its magnitude, if negative. */ - if (nbits) /* emit_bits rejects calls with size 0 */ - emit_bits_e(entropy, (unsigned int) temp2, nbits); - } - - cinfo->dest->next_output_byte = entropy->next_output_byte; - cinfo->dest->free_in_buffer = entropy->free_in_buffer; - - /* Update restart-interval state too */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - return TRUE; -} - - -/* - * MCU encoding for AC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - const int * natural_order; - JBLOCKROW block; - register int temp, temp2; - register int nbits; - register int r, k; - int Se, Al; - - entropy->next_output_byte = cinfo->dest->next_output_byte; - entropy->free_in_buffer = cinfo->dest->free_in_buffer; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) - if (entropy->restarts_to_go == 0) - emit_restart_e(entropy, entropy->next_restart_num); - - Se = cinfo->Se; - Al = cinfo->Al; - natural_order = cinfo->natural_order; - - /* Encode the MCU data block */ - block = MCU_data[0]; - - /* Encode the AC coefficients per section G.1.2.2, fig. G.3 */ - - r = 0; /* r = run length of zeros */ - - for (k = cinfo->Ss; k <= Se; k++) { - if ((temp = (*block)[natural_order[k]]) == 0) { - r++; - continue; - } - /* We must apply the point transform by Al. For AC coefficients this - * is an integer division with rounding towards 0. To do this portably - * in C, we shift after obtaining the absolute value; so the code is - * interwoven with finding the abs value (temp) and output bits (temp2). - */ - if (temp < 0) { - temp = -temp; /* temp is abs value of input */ - temp >>= Al; /* apply the point transform */ - /* For a negative coef, want temp2 = bitwise complement of abs(coef) */ - temp2 = ~temp; - } else { - temp >>= Al; /* apply the point transform */ - temp2 = temp; - } - /* Watch out for case that nonzero coef is zero after point transform */ - if (temp == 0) { - r++; - continue; - } - - /* Emit any pending EOBRUN */ - if (entropy->EOBRUN > 0) - emit_eobrun(entropy); - /* if run length > 15, must emit special run-length-16 codes (0xF0) */ - while (r > 15) { - emit_ac_symbol(entropy, entropy->ac_tbl_no, 0xF0); - r -= 16; - } - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 1; /* there must be at least one 1 bit */ - while ((temp >>= 1)) - nbits++; - /* Check for out-of-range coefficient values */ - if (nbits > MAX_COEF_BITS) - ERREXIT(cinfo, JERR_BAD_DCT_COEF); - - /* Count/emit Huffman symbol for run length / number of bits */ - emit_ac_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits); - - /* Emit that number of bits of the value, if positive, */ - /* or the complement of its magnitude, if negative. */ - emit_bits_e(entropy, (unsigned int) temp2, nbits); - - r = 0; /* reset zero run length */ - } - - if (r > 0) { /* If there are trailing zeroes, */ - entropy->EOBRUN++; /* count an EOB */ - if (entropy->EOBRUN == 0x7FFF) - emit_eobrun(entropy); /* force it out to avoid overflow */ - } - - cinfo->dest->next_output_byte = entropy->next_output_byte; - cinfo->dest->free_in_buffer = entropy->free_in_buffer; - - /* Update restart-interval state too */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - return TRUE; -} - - -/* - * MCU encoding for DC successive approximation refinement scan. - * Note: we assume such scans can be multi-component, - * although the spec is not very clear on the point. - */ - -METHODDEF(boolean) -encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int Al, blkn; - - entropy->next_output_byte = cinfo->dest->next_output_byte; - entropy->free_in_buffer = cinfo->dest->free_in_buffer; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) - if (entropy->restarts_to_go == 0) - emit_restart_e(entropy, entropy->next_restart_num); - - Al = cinfo->Al; - - /* Encode the MCU data blocks */ - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - /* We simply emit the Al'th bit of the DC coefficient value. */ - emit_bits_e(entropy, (unsigned int) (MCU_data[blkn][0][0] >> Al), 1); - } - - cinfo->dest->next_output_byte = entropy->next_output_byte; - cinfo->dest->free_in_buffer = entropy->free_in_buffer; - - /* Update restart-interval state too */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - return TRUE; -} - - -/* - * MCU encoding for AC successive approximation refinement scan. - */ - -METHODDEF(boolean) -encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - const int * natural_order; - JBLOCKROW block; - register int temp; - register int r, k; - int Se, Al; - int EOB; - char *BR_buffer; - unsigned int BR; - int absvalues[DCTSIZE2]; - - entropy->next_output_byte = cinfo->dest->next_output_byte; - entropy->free_in_buffer = cinfo->dest->free_in_buffer; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) - if (entropy->restarts_to_go == 0) - emit_restart_e(entropy, entropy->next_restart_num); - - Se = cinfo->Se; - Al = cinfo->Al; - natural_order = cinfo->natural_order; - - /* Encode the MCU data block */ - block = MCU_data[0]; - - /* It is convenient to make a pre-pass to determine the transformed - * coefficients' absolute values and the EOB position. - */ - EOB = 0; - for (k = cinfo->Ss; k <= Se; k++) { - temp = (*block)[natural_order[k]]; - /* We must apply the point transform by Al. For AC coefficients this - * is an integer division with rounding towards 0. To do this portably - * in C, we shift after obtaining the absolute value. - */ - if (temp < 0) - temp = -temp; /* temp is abs value of input */ - temp >>= Al; /* apply the point transform */ - absvalues[k] = temp; /* save abs value for main pass */ - if (temp == 1) - EOB = k; /* EOB = index of last newly-nonzero coef */ - } - - /* Encode the AC coefficients per section G.1.2.3, fig. G.7 */ - - r = 0; /* r = run length of zeros */ - BR = 0; /* BR = count of buffered bits added now */ - BR_buffer = entropy->bit_buffer + entropy->BE; /* Append bits to buffer */ - - for (k = cinfo->Ss; k <= Se; k++) { - if ((temp = absvalues[k]) == 0) { - r++; - continue; - } - - /* Emit any required ZRLs, but not if they can be folded into EOB */ - while (r > 15 && k <= EOB) { - /* emit any pending EOBRUN and the BE correction bits */ - emit_eobrun(entropy); - /* Emit ZRL */ - emit_ac_symbol(entropy, entropy->ac_tbl_no, 0xF0); - r -= 16; - /* Emit buffered correction bits that must be associated with ZRL */ - emit_buffered_bits(entropy, BR_buffer, BR); - BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ - BR = 0; - } - - /* If the coef was previously nonzero, it only needs a correction bit. - * NOTE: a straight translation of the spec's figure G.7 would suggest - * that we also need to test r > 15. But if r > 15, we can only get here - * if k > EOB, which implies that this coefficient is not 1. - */ - if (temp > 1) { - /* The correction bit is the next bit of the absolute value. */ - BR_buffer[BR++] = (char) (temp & 1); - continue; - } - - /* Emit any pending EOBRUN and the BE correction bits */ - emit_eobrun(entropy); - - /* Count/emit Huffman symbol for run length / number of bits */ - emit_ac_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1); - - /* Emit output bit for newly-nonzero coef */ - temp = ((*block)[natural_order[k]] < 0) ? 0 : 1; - emit_bits_e(entropy, (unsigned int) temp, 1); - - /* Emit buffered correction bits that must be associated with this code */ - emit_buffered_bits(entropy, BR_buffer, BR); - BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ - BR = 0; - r = 0; /* reset zero run length */ - } - - if (r > 0 || BR > 0) { /* If there are trailing zeroes, */ - entropy->EOBRUN++; /* count an EOB */ - entropy->BE += BR; /* concat my correction bits to older ones */ - /* We force out the EOB if we risk either: - * 1. overflow of the EOB counter; - * 2. overflow of the correction bit buffer during the next MCU. - */ - if (entropy->EOBRUN == 0x7FFF || entropy->BE > (MAX_CORR_BITS-DCTSIZE2+1)) - emit_eobrun(entropy); - } - - cinfo->dest->next_output_byte = entropy->next_output_byte; - cinfo->dest->free_in_buffer = entropy->free_in_buffer; - - /* Update restart-interval state too */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - return TRUE; -} - - -/* Encode a single block's worth of coefficients */ - -LOCAL(boolean) -encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val, - c_derived_tbl *dctbl, c_derived_tbl *actbl) -{ - register int temp, temp2; - register int nbits; - register int r, k; - int Se = state->cinfo->lim_Se; - const int * natural_order = state->cinfo->natural_order; - - /* Encode the DC coefficient difference per section F.1.2.1 */ - - temp = temp2 = block[0] - last_dc_val; - - if (temp < 0) { - temp = -temp; /* temp is abs value of input */ - /* For a negative input, want temp2 = bitwise complement of abs(input) */ - /* This code assumes we are on a two's complement machine */ - temp2--; - } - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 0; - while (temp) { - nbits++; - temp >>= 1; - } - /* Check for out-of-range coefficient values. - * Since we're encoding a difference, the range limit is twice as much. - */ - if (nbits > MAX_COEF_BITS+1) - ERREXIT(state->cinfo, JERR_BAD_DCT_COEF); - - /* Emit the Huffman-coded symbol for the number of bits */ - if (! emit_bits_s(state, dctbl->ehufco[nbits], dctbl->ehufsi[nbits])) - return FALSE; - - /* Emit that number of bits of the value, if positive, */ - /* or the complement of its magnitude, if negative. */ - if (nbits) /* emit_bits rejects calls with size 0 */ - if (! emit_bits_s(state, (unsigned int) temp2, nbits)) - return FALSE; - - /* Encode the AC coefficients per section F.1.2.2 */ - - r = 0; /* r = run length of zeros */ - - for (k = 1; k <= Se; k++) { - if ((temp2 = block[natural_order[k]]) == 0) { - r++; - } else { - /* if run length > 15, must emit special run-length-16 codes (0xF0) */ - while (r > 15) { - if (! emit_bits_s(state, actbl->ehufco[0xF0], actbl->ehufsi[0xF0])) - return FALSE; - r -= 16; - } - - temp = temp2; - if (temp < 0) { - temp = -temp; /* temp is abs value of input */ - /* This code assumes we are on a two's complement machine */ - temp2--; - } - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 1; /* there must be at least one 1 bit */ - while ((temp >>= 1)) - nbits++; - /* Check for out-of-range coefficient values */ - if (nbits > MAX_COEF_BITS) - ERREXIT(state->cinfo, JERR_BAD_DCT_COEF); - - /* Emit Huffman symbol for run length / number of bits */ - temp = (r << 4) + nbits; - if (! emit_bits_s(state, actbl->ehufco[temp], actbl->ehufsi[temp])) - return FALSE; - - /* Emit that number of bits of the value, if positive, */ - /* or the complement of its magnitude, if negative. */ - if (! emit_bits_s(state, (unsigned int) temp2, nbits)) - return FALSE; - - r = 0; - } - } - - /* If the last coef(s) were zero, emit an end-of-block code */ - if (r > 0) - if (! emit_bits_s(state, actbl->ehufco[0], actbl->ehufsi[0])) - return FALSE; - - return TRUE; -} - - -/* - * Encode and output one MCU's worth of Huffman-compressed coefficients. - */ - -METHODDEF(boolean) -encode_mcu_huff (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - working_state state; - int blkn, ci; - jpeg_component_info * compptr; - - /* Load up working state */ - state.next_output_byte = cinfo->dest->next_output_byte; - state.free_in_buffer = cinfo->dest->free_in_buffer; - ASSIGN_STATE(state.cur, entropy->saved); - state.cinfo = cinfo; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! emit_restart_s(&state, entropy->next_restart_num)) - return FALSE; - } - - /* Encode the MCU data blocks */ - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - ci = cinfo->MCU_membership[blkn]; - compptr = cinfo->cur_comp_info[ci]; - if (! encode_one_block(&state, - MCU_data[blkn][0], state.cur.last_dc_val[ci], - entropy->dc_derived_tbls[compptr->dc_tbl_no], - entropy->ac_derived_tbls[compptr->ac_tbl_no])) - return FALSE; - /* Update last_dc_val */ - state.cur.last_dc_val[ci] = MCU_data[blkn][0][0]; - } - - /* Completed MCU, so update state */ - cinfo->dest->next_output_byte = state.next_output_byte; - cinfo->dest->free_in_buffer = state.free_in_buffer; - ASSIGN_STATE(entropy->saved, state.cur); - - /* Update restart-interval state too */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - return TRUE; -} - - -/* - * Finish up at the end of a Huffman-compressed scan. - */ - -METHODDEF(void) -finish_pass_huff (j_compress_ptr cinfo) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - working_state state; - - if (cinfo->progressive_mode) { - entropy->next_output_byte = cinfo->dest->next_output_byte; - entropy->free_in_buffer = cinfo->dest->free_in_buffer; - - /* Flush out any buffered data */ - emit_eobrun(entropy); - flush_bits_e(entropy); - - cinfo->dest->next_output_byte = entropy->next_output_byte; - cinfo->dest->free_in_buffer = entropy->free_in_buffer; - } else { - /* Load up working state ... flush_bits needs it */ - state.next_output_byte = cinfo->dest->next_output_byte; - state.free_in_buffer = cinfo->dest->free_in_buffer; - ASSIGN_STATE(state.cur, entropy->saved); - state.cinfo = cinfo; - - /* Flush out the last data */ - if (! flush_bits_s(&state)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - - /* Update state */ - cinfo->dest->next_output_byte = state.next_output_byte; - cinfo->dest->free_in_buffer = state.free_in_buffer; - ASSIGN_STATE(entropy->saved, state.cur); - } -} - - -/* - * Huffman coding optimization. - * - * We first scan the supplied data and count the number of uses of each symbol - * that is to be Huffman-coded. (This process MUST agree with the code above.) - * Then we build a Huffman coding tree for the observed counts. - * Symbols which are not needed at all for the particular image are not - * assigned any code, which saves space in the DHT marker as well as in - * the compressed data. - */ - - -/* Process a single block's worth of coefficients */ - -LOCAL(void) -htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val, - long dc_counts[], long ac_counts[]) -{ - register int temp; - register int nbits; - register int r, k; - int Se = cinfo->lim_Se; - const int * natural_order = cinfo->natural_order; - - /* Encode the DC coefficient difference per section F.1.2.1 */ - - temp = block[0] - last_dc_val; - if (temp < 0) - temp = -temp; - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 0; - while (temp) { - nbits++; - temp >>= 1; - } - /* Check for out-of-range coefficient values. - * Since we're encoding a difference, the range limit is twice as much. - */ - if (nbits > MAX_COEF_BITS+1) - ERREXIT(cinfo, JERR_BAD_DCT_COEF); - - /* Count the Huffman symbol for the number of bits */ - dc_counts[nbits]++; - - /* Encode the AC coefficients per section F.1.2.2 */ - - r = 0; /* r = run length of zeros */ - - for (k = 1; k <= Se; k++) { - if ((temp = block[natural_order[k]]) == 0) { - r++; - } else { - /* if run length > 15, must emit special run-length-16 codes (0xF0) */ - while (r > 15) { - ac_counts[0xF0]++; - r -= 16; - } - - /* Find the number of bits needed for the magnitude of the coefficient */ - if (temp < 0) - temp = -temp; - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 1; /* there must be at least one 1 bit */ - while ((temp >>= 1)) - nbits++; - /* Check for out-of-range coefficient values */ - if (nbits > MAX_COEF_BITS) - ERREXIT(cinfo, JERR_BAD_DCT_COEF); - - /* Count Huffman symbol for run length / number of bits */ - ac_counts[(r << 4) + nbits]++; - - r = 0; - } - } - - /* If the last coef(s) were zero, emit an end-of-block code */ - if (r > 0) - ac_counts[0]++; -} - - -/* - * Trial-encode one MCU's worth of Huffman-compressed coefficients. - * No data is actually output, so no suspension return is possible. - */ - -METHODDEF(boolean) -encode_mcu_gather (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int blkn, ci; - jpeg_component_info * compptr; - - /* Take care of restart intervals if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - /* Re-initialize DC predictions to 0 */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) - entropy->saved.last_dc_val[ci] = 0; - /* Update restart state */ - entropy->restarts_to_go = cinfo->restart_interval; - } - entropy->restarts_to_go--; - } - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - ci = cinfo->MCU_membership[blkn]; - compptr = cinfo->cur_comp_info[ci]; - htest_one_block(cinfo, MCU_data[blkn][0], entropy->saved.last_dc_val[ci], - entropy->dc_count_ptrs[compptr->dc_tbl_no], - entropy->ac_count_ptrs[compptr->ac_tbl_no]); - entropy->saved.last_dc_val[ci] = MCU_data[blkn][0][0]; - } - - return TRUE; -} - - -/* - * Generate the best Huffman code table for the given counts, fill htbl. - * - * The JPEG standard requires that no symbol be assigned a codeword of all - * one bits (so that padding bits added at the end of a compressed segment - * can't look like a valid code). Because of the canonical ordering of - * codewords, this just means that there must be an unused slot in the - * longest codeword length category. Section K.2 of the JPEG spec suggests - * reserving such a slot by pretending that symbol 256 is a valid symbol - * with count 1. In theory that's not optimal; giving it count zero but - * including it in the symbol set anyway should give a better Huffman code. - * But the theoretically better code actually seems to come out worse in - * practice, because it produces more all-ones bytes (which incur stuffed - * zero bytes in the final file). In any case the difference is tiny. - * - * The JPEG standard requires Huffman codes to be no more than 16 bits long. - * If some symbols have a very small but nonzero probability, the Huffman tree - * must be adjusted to meet the code length restriction. We currently use - * the adjustment method suggested in JPEG section K.2. This method is *not* - * optimal; it may not choose the best possible limited-length code. But - * typically only very-low-frequency symbols will be given less-than-optimal - * lengths, so the code is almost optimal. Experimental comparisons against - * an optimal limited-length-code algorithm indicate that the difference is - * microscopic --- usually less than a hundredth of a percent of total size. - * So the extra complexity of an optimal algorithm doesn't seem worthwhile. - */ - -LOCAL(void) -jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]) -{ -#define MAX_CLEN 32 /* assumed maximum initial code length */ - UINT8 bits[MAX_CLEN+1]; /* bits[k] = # of symbols with code length k */ - int codesize[257]; /* codesize[k] = code length of symbol k */ - int others[257]; /* next symbol in current branch of tree */ - int c1, c2, i, j; - UINT8 *p; - long v; - - freq[256] = 1; /* make sure 256 has a nonzero count */ - /* Including the pseudo-symbol 256 in the Huffman procedure guarantees - * that no real symbol is given code-value of all ones, because 256 - * will be placed last in the largest codeword category. - * In the symbol list build procedure this element serves as sentinel - * for the zero run loop. - */ - -#ifndef DONT_USE_FANCY_HUFF_OPT - - /* Build list of symbols sorted in order of descending frequency */ - /* This approach has several benefits (thank to John Korejwa for the idea): - * 1. - * If a codelength category is split during the length limiting procedure - * below, the feature that more frequent symbols are assigned shorter - * codewords remains valid for the adjusted code. - * 2. - * To reduce consecutive ones in a Huffman data stream (thus reducing the - * number of stuff bytes in JPEG) it is preferable to follow 0 branches - * (and avoid 1 branches) as much as possible. This is easily done by - * assigning symbols to leaves of the Huffman tree in order of decreasing - * frequency, with no secondary sort based on codelengths. - * 3. - * The symbol list can be built independently from the assignment of code - * lengths by the Huffman procedure below. - * Note: The symbol list build procedure must be performed first, because - * the Huffman procedure assigning the codelengths clobbers the frequency - * counts! - */ - - /* Here we use the others array as a linked list of nonzero frequencies - * to be sorted. Already sorted elements are removed from the list. - */ - - /* Building list */ - - /* This item does not correspond to a valid symbol frequency and is used - * as starting index. - */ - j = 256; - - for (i = 0;; i++) { - if (freq[i] == 0) /* skip zero frequencies */ - continue; - if (i > 255) - break; - others[j] = i; /* this symbol value */ - j = i; /* previous symbol value */ - } - others[j] = -1; /* mark end of list */ - - /* Sorting list */ - - p = htbl->huffval; - while ((c1 = others[256]) >= 0) { - v = freq[c1]; - i = c1; /* first symbol value */ - j = 256; /* pseudo symbol value for starting index */ - while ((c2 = others[c1]) >= 0) { - if (freq[c2] > v) { - v = freq[c2]; - i = c2; /* this symbol value */ - j = c1; /* previous symbol value */ - } - c1 = c2; - } - others[j] = others[i]; /* remove this symbol i from list */ - *p++ = (UINT8) i; - } - -#endif /* DONT_USE_FANCY_HUFF_OPT */ - - /* This algorithm is explained in section K.2 of the JPEG standard */ - - MEMZERO(bits, SIZEOF(bits)); - MEMZERO(codesize, SIZEOF(codesize)); - for (i = 0; i < 257; i++) - others[i] = -1; /* init links to empty */ - - /* Huffman's basic algorithm to assign optimal code lengths to symbols */ - - for (;;) { - /* Find the smallest nonzero frequency, set c1 = its symbol */ - /* In case of ties, take the larger symbol number */ - c1 = -1; - v = 1000000000L; - for (i = 0; i <= 256; i++) { - if (freq[i] && freq[i] <= v) { - v = freq[i]; - c1 = i; - } - } - - /* Find the next smallest nonzero frequency, set c2 = its symbol */ - /* In case of ties, take the larger symbol number */ - c2 = -1; - v = 1000000000L; - for (i = 0; i <= 256; i++) { - if (freq[i] && freq[i] <= v && i != c1) { - v = freq[i]; - c2 = i; - } - } - - /* Done if we've merged everything into one frequency */ - if (c2 < 0) - break; - - /* Else merge the two counts/trees */ - freq[c1] += freq[c2]; - freq[c2] = 0; - - /* Increment the codesize of everything in c1's tree branch */ - codesize[c1]++; - while (others[c1] >= 0) { - c1 = others[c1]; - codesize[c1]++; - } - - others[c1] = c2; /* chain c2 onto c1's tree branch */ - - /* Increment the codesize of everything in c2's tree branch */ - codesize[c2]++; - while (others[c2] >= 0) { - c2 = others[c2]; - codesize[c2]++; - } - } - - /* Now count the number of symbols of each code length */ - for (i = 0; i <= 256; i++) { - if (codesize[i]) { - /* The JPEG standard seems to think that this can't happen, */ - /* but I'm paranoid... */ - if (codesize[i] > MAX_CLEN) - ERREXIT(cinfo, JERR_HUFF_CLEN_OUTOFBOUNDS); - - bits[codesize[i]]++; - } - } - - /* JPEG doesn't allow symbols with code lengths over 16 bits, so if the pure - * Huffman procedure assigned any such lengths, we must adjust the coding. - * Here is what the JPEG spec says about how this next bit works: - * Since symbols are paired for the longest Huffman code, the symbols are - * removed from this length category two at a time. The prefix for the pair - * (which is one bit shorter) is allocated to one of the pair; then, - * skipping the BITS entry for that prefix length, a code word from the next - * shortest nonzero BITS entry is converted into a prefix for two code words - * one bit longer. - */ - - for (i = MAX_CLEN; i > 16; i--) { - while (bits[i] > 0) { - j = i - 2; /* find length of new prefix to be used */ - while (bits[j] == 0) { - if (j == 0) - ERREXIT(cinfo, JERR_HUFF_CLEN_OUTOFBOUNDS); - j--; - } - - bits[i] -= 2; /* remove two symbols */ - bits[i-1]++; /* one goes in this length */ - bits[j+1] += 2; /* two new symbols in this length */ - bits[j]--; /* symbol of this length is now a prefix */ - } - } - - /* Remove the count for the pseudo-symbol 256 from the largest codelength */ - while (bits[i] == 0) /* find largest codelength still in use */ - i--; - bits[i]--; - - /* Return final symbol counts (only for lengths 0..16) */ - MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits)); - -#ifdef DONT_USE_FANCY_HUFF_OPT - - /* Return a list of the symbols sorted by code length */ - /* Note: Due to the codelength changes made above, it can happen - * that more frequent symbols are assigned longer codewords. - */ - p = htbl->huffval; - for (i = 1; i <= MAX_CLEN; i++) { - for (j = 0; j <= 255; j++) { - if (codesize[j] == i) { - *p++ = (UINT8) j; - } - } - } - -#endif /* DONT_USE_FANCY_HUFF_OPT */ - - /* Set sent_table FALSE so updated table will be written to JPEG file. */ - htbl->sent_table = FALSE; -} - - -/* - * Finish up a statistics-gathering pass and create the new Huffman tables. - */ - -METHODDEF(void) -finish_pass_gather (j_compress_ptr cinfo) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int ci, tbl; - jpeg_component_info * compptr; - JHUFF_TBL **htblptr; - boolean did_dc[NUM_HUFF_TBLS]; - boolean did_ac[NUM_HUFF_TBLS]; - - if (cinfo->progressive_mode) - /* Flush out buffered data (all we care about is counting the EOB symbol) */ - emit_eobrun(entropy); - - /* It's important not to apply jpeg_gen_optimal_table more than once - * per table, because it clobbers the input frequency counts! - */ - MEMZERO(did_dc, SIZEOF(did_dc)); - MEMZERO(did_ac, SIZEOF(did_ac)); - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* DC needs no table for refinement scan */ - if (cinfo->Ss == 0 && cinfo->Ah == 0) { - tbl = compptr->dc_tbl_no; - if (! did_dc[tbl]) { - htblptr = & cinfo->dc_huff_tbl_ptrs[tbl]; - if (*htblptr == NULL) - *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[tbl]); - did_dc[tbl] = TRUE; - } - } - /* AC needs no table when not present */ - if (cinfo->Se) { - tbl = compptr->ac_tbl_no; - if (! did_ac[tbl]) { - htblptr = & cinfo->ac_huff_tbl_ptrs[tbl]; - if (*htblptr == NULL) - *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[tbl]); - did_ac[tbl] = TRUE; - } - } - } -} - - -/* - * Initialize for a Huffman-compressed scan. - * If gather_statistics is TRUE, we do not output anything during the scan, - * just count the Huffman symbols used and generate Huffman code tables. - */ - -METHODDEF(void) -start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int ci, tbl; - jpeg_component_info * compptr; - - if (gather_statistics) - entropy->pub.finish_pass = finish_pass_gather; - else - entropy->pub.finish_pass = finish_pass_huff; - - if (cinfo->progressive_mode) { - entropy->cinfo = cinfo; - entropy->gather_statistics = gather_statistics; - - /* We assume jcmaster.c already validated the scan parameters. */ - - /* Select execution routine */ - if (cinfo->Ah == 0) { - if (cinfo->Ss == 0) - entropy->pub.encode_mcu = encode_mcu_DC_first; - else - entropy->pub.encode_mcu = encode_mcu_AC_first; - } else { - if (cinfo->Ss == 0) - entropy->pub.encode_mcu = encode_mcu_DC_refine; - else { - entropy->pub.encode_mcu = encode_mcu_AC_refine; - /* AC refinement needs a correction bit buffer */ - if (entropy->bit_buffer == NULL) - entropy->bit_buffer = (char *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, MAX_CORR_BITS * SIZEOF(char)); - } - } - - /* Initialize AC stuff */ - entropy->ac_tbl_no = cinfo->cur_comp_info[0]->ac_tbl_no; - entropy->EOBRUN = 0; - entropy->BE = 0; - } else { - if (gather_statistics) - entropy->pub.encode_mcu = encode_mcu_gather; - else - entropy->pub.encode_mcu = encode_mcu_huff; - } - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* DC needs no table for refinement scan */ - if (cinfo->Ss == 0 && cinfo->Ah == 0) { - tbl = compptr->dc_tbl_no; - if (gather_statistics) { - /* Check for invalid table index */ - /* (make_c_derived_tbl does this in the other path) */ - if (tbl < 0 || tbl >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); - /* Allocate and zero the statistics tables */ - /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ - if (entropy->dc_count_ptrs[tbl] == NULL) - entropy->dc_count_ptrs[tbl] = (long *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, 257 * SIZEOF(long)); - MEMZERO(entropy->dc_count_ptrs[tbl], 257 * SIZEOF(long)); - } else { - /* Compute derived values for Huffman tables */ - /* We may do this more than once for a table, but it's not expensive */ - jpeg_make_c_derived_tbl(cinfo, TRUE, tbl, - & entropy->dc_derived_tbls[tbl]); - } - /* Initialize DC predictions to 0 */ - entropy->saved.last_dc_val[ci] = 0; - } - /* AC needs no table when not present */ - if (cinfo->Se) { - tbl = compptr->ac_tbl_no; - if (gather_statistics) { - if (tbl < 0 || tbl >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); - if (entropy->ac_count_ptrs[tbl] == NULL) - entropy->ac_count_ptrs[tbl] = (long *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, 257 * SIZEOF(long)); - MEMZERO(entropy->ac_count_ptrs[tbl], 257 * SIZEOF(long)); - } else { - jpeg_make_c_derived_tbl(cinfo, FALSE, tbl, - & entropy->ac_derived_tbls[tbl]); - } - } - } - - /* Initialize bit buffer to empty */ - entropy->saved.put_buffer = 0; - entropy->saved.put_bits = 0; - - /* Initialize restart stuff */ - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num = 0; -} - - -/* - * Module initialization routine for Huffman entropy encoding. - */ - -GLOBAL(void) -jinit_huff_encoder (j_compress_ptr cinfo) -{ - huff_entropy_ptr entropy; - int i; - - entropy = (huff_entropy_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(huff_entropy_encoder)); - cinfo->entropy = &entropy->pub; - entropy->pub.start_pass = start_pass_huff; - - /* Mark tables unallocated */ - for (i = 0; i < NUM_HUFF_TBLS; i++) { - entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; - entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL; - } - - if (cinfo->progressive_mode) - entropy->bit_buffer = NULL; /* needed only in AC refinement scan */ -} diff --git a/thirdparty/jpeg-9e/jcinit.c b/thirdparty/jpeg-9e/jcinit.c deleted file mode 100644 index 2aea7ca..0000000 --- a/thirdparty/jpeg-9e/jcinit.c +++ /dev/null @@ -1,249 +0,0 @@ -/* - * jcinit.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2003-2017 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains initialization logic for the JPEG compressor. - * This routine is in charge of selecting the modules to be executed and - * making an initialization call to each one. - * - * Logically, this code belongs in jcmaster.c. It's split out because - * linking this routine implies linking the entire compression library. - * For a transcoding-only application, we want to be able to use jcmaster.c - * without linking in the whole library. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Compute JPEG image dimensions and related values. - * NOTE: this is exported for possible use by application. - * Hence it mustn't do anything that can't be done twice. - */ - -GLOBAL(void) -jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo) -/* Do computations that are needed before master selection phase */ -{ - /* Sanity check on input image dimensions to prevent overflow in - * following calculations. - * We do check jpeg_width and jpeg_height in initial_setup in jcmaster.c, - * but image_width and image_height can come from arbitrary data, - * and we need some space for multiplication by block_size. - */ - if (((long) cinfo->image_width >> 24) || ((long) cinfo->image_height >> 24)) - ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); - -#ifdef DCT_SCALING_SUPPORTED - - /* Compute actual JPEG image dimensions and DCT scaling choices. */ - if (cinfo->scale_num >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/1 scaling */ - cinfo->jpeg_width = cinfo->image_width * cinfo->block_size; - cinfo->jpeg_height = cinfo->image_height * cinfo->block_size; - cinfo->min_DCT_h_scaled_size = 1; - cinfo->min_DCT_v_scaled_size = 1; - } else if (cinfo->scale_num * 2 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/2 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 2L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 2L); - cinfo->min_DCT_h_scaled_size = 2; - cinfo->min_DCT_v_scaled_size = 2; - } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/3 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 3L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 3L); - cinfo->min_DCT_h_scaled_size = 3; - cinfo->min_DCT_v_scaled_size = 3; - } else if (cinfo->scale_num * 4 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/4 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 4L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 4L); - cinfo->min_DCT_h_scaled_size = 4; - cinfo->min_DCT_v_scaled_size = 4; - } else if (cinfo->scale_num * 5 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/5 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 5L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 5L); - cinfo->min_DCT_h_scaled_size = 5; - cinfo->min_DCT_v_scaled_size = 5; - } else if (cinfo->scale_num * 6 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/6 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 6L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 6L); - cinfo->min_DCT_h_scaled_size = 6; - cinfo->min_DCT_v_scaled_size = 6; - } else if (cinfo->scale_num * 7 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/7 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 7L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 7L); - cinfo->min_DCT_h_scaled_size = 7; - cinfo->min_DCT_v_scaled_size = 7; - } else if (cinfo->scale_num * 8 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/8 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 8L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 8L); - cinfo->min_DCT_h_scaled_size = 8; - cinfo->min_DCT_v_scaled_size = 8; - } else if (cinfo->scale_num * 9 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/9 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 9L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 9L); - cinfo->min_DCT_h_scaled_size = 9; - cinfo->min_DCT_v_scaled_size = 9; - } else if (cinfo->scale_num * 10 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/10 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 10L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 10L); - cinfo->min_DCT_h_scaled_size = 10; - cinfo->min_DCT_v_scaled_size = 10; - } else if (cinfo->scale_num * 11 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/11 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 11L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 11L); - cinfo->min_DCT_h_scaled_size = 11; - cinfo->min_DCT_v_scaled_size = 11; - } else if (cinfo->scale_num * 12 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/12 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 12L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 12L); - cinfo->min_DCT_h_scaled_size = 12; - cinfo->min_DCT_v_scaled_size = 12; - } else if (cinfo->scale_num * 13 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/13 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 13L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 13L); - cinfo->min_DCT_h_scaled_size = 13; - cinfo->min_DCT_v_scaled_size = 13; - } else if (cinfo->scale_num * 14 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/14 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 14L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 14L); - cinfo->min_DCT_h_scaled_size = 14; - cinfo->min_DCT_v_scaled_size = 14; - } else if (cinfo->scale_num * 15 >= cinfo->scale_denom * cinfo->block_size) { - /* Provide block_size/15 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 15L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 15L); - cinfo->min_DCT_h_scaled_size = 15; - cinfo->min_DCT_v_scaled_size = 15; - } else { - /* Provide block_size/16 scaling */ - cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 16L); - cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 16L); - cinfo->min_DCT_h_scaled_size = 16; - cinfo->min_DCT_v_scaled_size = 16; - } - -#else /* !DCT_SCALING_SUPPORTED */ - - /* Hardwire it to "no scaling" */ - cinfo->jpeg_width = cinfo->image_width; - cinfo->jpeg_height = cinfo->image_height; - cinfo->min_DCT_h_scaled_size = DCTSIZE; - cinfo->min_DCT_v_scaled_size = DCTSIZE; - -#endif /* DCT_SCALING_SUPPORTED */ -} - - -/* - * Master selection of compression modules. - * This is done once at the start of processing an image. We determine - * which modules will be used and give them appropriate initialization calls. - */ - -GLOBAL(void) -jinit_compress_master (j_compress_ptr cinfo) -{ - long samplesperrow; - JDIMENSION jd_samplesperrow; - - /* For now, precision must match compiled-in value... */ - if (cinfo->data_precision != BITS_IN_JSAMPLE) - ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); - - /* Sanity check on input image dimensions */ - if (cinfo->image_height <= 0 || cinfo->image_width <= 0 || - cinfo->input_components <= 0) - ERREXIT(cinfo, JERR_EMPTY_IMAGE); - - /* Width of an input scanline must be representable as JDIMENSION. */ - samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components; - jd_samplesperrow = (JDIMENSION) samplesperrow; - if ((long) jd_samplesperrow != samplesperrow) - ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); - - /* Compute JPEG image dimensions and related values. */ - jpeg_calc_jpeg_dimensions(cinfo); - - /* Initialize master control (includes parameter checking/processing) */ - jinit_c_master_control(cinfo, FALSE /* full compression */); - - /* Preprocessing */ - if (! cinfo->raw_data_in) { - jinit_color_converter(cinfo); - jinit_downsampler(cinfo); - jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */); - } - /* Forward DCT */ - jinit_forward_dct(cinfo); - /* Entropy encoding: either Huffman or arithmetic coding. */ - if (cinfo->arith_code) - jinit_arith_encoder(cinfo); - else { - jinit_huff_encoder(cinfo); - } - - /* Need a full-image coefficient buffer in any multi-pass mode. */ - jinit_c_coef_controller(cinfo, - (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); - jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); - - jinit_marker_writer(cinfo); - - /* We can now tell the memory manager to allocate virtual arrays. */ - (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); - - /* Write the datastream header (SOI) immediately. - * Frame and scan headers are postponed till later. - * This lets application insert special markers after the SOI. - */ - (*cinfo->marker->write_file_header) (cinfo); -} diff --git a/thirdparty/jpeg-9e/jcmainct.c b/thirdparty/jpeg-9e/jcmainct.c deleted file mode 100644 index 39b9790..0000000 --- a/thirdparty/jpeg-9e/jcmainct.c +++ /dev/null @@ -1,297 +0,0 @@ -/* - * jcmainct.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2003-2012 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the main buffer controller for compression. - * The main buffer lies between the pre-processor and the JPEG - * compressor proper; it holds downsampled data in the JPEG colorspace. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Note: currently, there is no operating mode in which a full-image buffer - * is needed at this step. If there were, that mode could not be used with - * "raw data" input, since this module is bypassed in that case. However, - * we've left the code here for possible use in special applications. - */ -#undef FULL_MAIN_BUFFER_SUPPORTED - - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_c_main_controller pub; /* public fields */ - - JDIMENSION cur_iMCU_row; /* number of current iMCU row */ - JDIMENSION rowgroup_ctr; /* counts row groups received in iMCU row */ - boolean suspended; /* remember if we suspended output */ - J_BUF_MODE pass_mode; /* current operating mode */ - - /* If using just a strip buffer, this points to the entire set of buffers - * (we allocate one for each component). In the full-image case, this - * points to the currently accessible strips of the virtual arrays. - */ - JSAMPARRAY buffer[MAX_COMPONENTS]; - -#ifdef FULL_MAIN_BUFFER_SUPPORTED - /* If using full-image storage, this array holds pointers to virtual-array - * control blocks for each component. Unused if not full-image storage. - */ - jvirt_sarray_ptr whole_image[MAX_COMPONENTS]; -#endif -} my_main_controller; - -typedef my_main_controller * my_main_ptr; - - -/* Forward declarations */ -METHODDEF(void) process_data_simple_main - JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, - JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); -#ifdef FULL_MAIN_BUFFER_SUPPORTED -METHODDEF(void) process_data_buffer_main - JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, - JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); -#endif - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_main_ptr mainp = (my_main_ptr) cinfo->main; - - /* Do nothing in raw-data mode. */ - if (cinfo->raw_data_in) - return; - - mainp->cur_iMCU_row = 0; /* initialize counters */ - mainp->rowgroup_ctr = 0; - mainp->suspended = FALSE; - mainp->pass_mode = pass_mode; /* save mode for use by process_data */ - - switch (pass_mode) { - case JBUF_PASS_THRU: -#ifdef FULL_MAIN_BUFFER_SUPPORTED - if (mainp->whole_image[0] != NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); -#endif - mainp->pub.process_data = process_data_simple_main; - break; -#ifdef FULL_MAIN_BUFFER_SUPPORTED - case JBUF_SAVE_SOURCE: - case JBUF_CRANK_DEST: - case JBUF_SAVE_AND_PASS: - if (mainp->whole_image[0] == NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - mainp->pub.process_data = process_data_buffer_main; - break; -#endif - default: - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - break; - } -} - - -/* - * Process some data. - * This routine handles the simple pass-through mode, - * where we have only a strip buffer. - */ - -METHODDEF(void) -process_data_simple_main (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail) -{ - my_main_ptr mainp = (my_main_ptr) cinfo->main; - - while (mainp->cur_iMCU_row < cinfo->total_iMCU_rows) { - /* Read input data if we haven't filled the main buffer yet */ - if (mainp->rowgroup_ctr < (JDIMENSION) cinfo->min_DCT_v_scaled_size) - (*cinfo->prep->pre_process_data) (cinfo, - input_buf, in_row_ctr, in_rows_avail, - mainp->buffer, &mainp->rowgroup_ctr, - (JDIMENSION) cinfo->min_DCT_v_scaled_size); - - /* If we don't have a full iMCU row buffered, return to application for - * more data. Note that preprocessor will always pad to fill the iMCU row - * at the bottom of the image. - */ - if (mainp->rowgroup_ctr != (JDIMENSION) cinfo->min_DCT_v_scaled_size) - return; - - /* Send the completed row to the compressor */ - if (! (*cinfo->coef->compress_data) (cinfo, mainp->buffer)) { - /* If compressor did not consume the whole row, then we must need to - * suspend processing and return to the application. In this situation - * we pretend we didn't yet consume the last input row; otherwise, if - * it happened to be the last row of the image, the application would - * think we were done. - */ - if (! mainp->suspended) { - (*in_row_ctr)--; - mainp->suspended = TRUE; - } - return; - } - /* We did finish the row. Undo our little suspension hack if a previous - * call suspended; then mark the main buffer empty. - */ - if (mainp->suspended) { - (*in_row_ctr)++; - mainp->suspended = FALSE; - } - mainp->rowgroup_ctr = 0; - mainp->cur_iMCU_row++; - } -} - - -#ifdef FULL_MAIN_BUFFER_SUPPORTED - -/* - * Process some data. - * This routine handles all of the modes that use a full-size buffer. - */ - -METHODDEF(void) -process_data_buffer_main (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail) -{ - my_main_ptr mainp = (my_main_ptr) cinfo->main; - int ci; - jpeg_component_info *compptr; - boolean writing = (mainp->pass_mode != JBUF_CRANK_DEST); - - while (mainp->cur_iMCU_row < cinfo->total_iMCU_rows) { - /* Realign the virtual buffers if at the start of an iMCU row. */ - if (mainp->rowgroup_ctr == 0) { - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - mainp->buffer[ci] = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, mainp->whole_image[ci], mainp->cur_iMCU_row * - ((JDIMENSION) (compptr->v_samp_factor * cinfo->min_DCT_v_scaled_size)), - (JDIMENSION) (compptr->v_samp_factor * cinfo->min_DCT_v_scaled_size), - writing); - } - /* In a read pass, pretend we just read some source data. */ - if (! writing) { - *in_row_ctr += (JDIMENSION) - (cinfo->max_v_samp_factor * cinfo->min_DCT_v_scaled_size); - mainp->rowgroup_ctr = (JDIMENSION) cinfo->min_DCT_v_scaled_size; - } - } - - /* If a write pass, read input data until the current iMCU row is full. */ - /* Note: preprocessor will pad if necessary to fill the last iMCU row. */ - if (writing) { - (*cinfo->prep->pre_process_data) (cinfo, - input_buf, in_row_ctr, in_rows_avail, - mainp->buffer, &mainp->rowgroup_ctr, - (JDIMENSION) cinfo->min_DCT_v_scaled_size); - /* Return to application if we need more data to fill the iMCU row. */ - if (mainp->rowgroup_ctr < (JDIMENSION) cinfo->min_DCT_v_scaled_size) - return; - } - - /* Emit data, unless this is a sink-only pass. */ - if (mainp->pass_mode != JBUF_SAVE_SOURCE) { - if (! (*cinfo->coef->compress_data) (cinfo, mainp->buffer)) { - /* If compressor did not consume the whole row, then we must need to - * suspend processing and return to the application. In this situation - * we pretend we didn't yet consume the last input row; otherwise, if - * it happened to be the last row of the image, the application would - * think we were done. - */ - if (! mainp->suspended) { - (*in_row_ctr)--; - mainp->suspended = TRUE; - } - return; - } - /* We did finish the row. Undo our little suspension hack if a previous - * call suspended; then mark the main buffer empty. - */ - if (mainp->suspended) { - (*in_row_ctr)++; - mainp->suspended = FALSE; - } - } - - /* If get here, we are done with this iMCU row. Mark buffer empty. */ - mainp->rowgroup_ctr = 0; - mainp->cur_iMCU_row++; - } -} - -#endif /* FULL_MAIN_BUFFER_SUPPORTED */ - - -/* - * Initialize main buffer controller. - */ - -GLOBAL(void) -jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) -{ - my_main_ptr mainp; - int ci; - jpeg_component_info *compptr; - - mainp = (my_main_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_main_controller)); - cinfo->main = &mainp->pub; - mainp->pub.start_pass = start_pass_main; - - /* We don't need to create a buffer in raw-data mode. */ - if (cinfo->raw_data_in) - return; - - /* Create the buffer. It holds downsampled data, so each component - * may be of a different size. - */ - if (need_full_buffer) { -#ifdef FULL_MAIN_BUFFER_SUPPORTED - /* Allocate a full-image virtual array for each component */ - /* Note we pad the bottom to a multiple of the iMCU height */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - mainp->whole_image[ci] = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - compptr->width_in_blocks * ((JDIMENSION) compptr->DCT_h_scaled_size), - ((JDIMENSION) jround_up((long) compptr->height_in_blocks, - (long) compptr->v_samp_factor)) * - ((JDIMENSION) cinfo->min_DCT_v_scaled_size), - (JDIMENSION) (compptr->v_samp_factor * compptr->DCT_v_scaled_size)); - } -#else - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); -#endif - } else { -#ifdef FULL_MAIN_BUFFER_SUPPORTED - mainp->whole_image[0] = NULL; /* flag for no virtual arrays */ -#endif - /* Allocate a strip buffer for each component */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - mainp->buffer[ci] = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - compptr->width_in_blocks * ((JDIMENSION) compptr->DCT_h_scaled_size), - (JDIMENSION) (compptr->v_samp_factor * compptr->DCT_v_scaled_size)); - } - } -} diff --git a/thirdparty/jpeg-9e/jcmarker.c b/thirdparty/jpeg-9e/jcmarker.c deleted file mode 100644 index 8874cd8..0000000 --- a/thirdparty/jpeg-9e/jcmarker.c +++ /dev/null @@ -1,717 +0,0 @@ -/* - * jcmarker.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2003-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write JPEG datastream markers. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -typedef enum { /* JPEG marker codes */ - M_SOF0 = 0xc0, - M_SOF1 = 0xc1, - M_SOF2 = 0xc2, - M_SOF3 = 0xc3, - - M_SOF5 = 0xc5, - M_SOF6 = 0xc6, - M_SOF7 = 0xc7, - - M_JPG = 0xc8, - M_SOF9 = 0xc9, - M_SOF10 = 0xca, - M_SOF11 = 0xcb, - - M_SOF13 = 0xcd, - M_SOF14 = 0xce, - M_SOF15 = 0xcf, - - M_DHT = 0xc4, - - M_DAC = 0xcc, - - M_RST0 = 0xd0, - M_RST1 = 0xd1, - M_RST2 = 0xd2, - M_RST3 = 0xd3, - M_RST4 = 0xd4, - M_RST5 = 0xd5, - M_RST6 = 0xd6, - M_RST7 = 0xd7, - - M_SOI = 0xd8, - M_EOI = 0xd9, - M_SOS = 0xda, - M_DQT = 0xdb, - M_DNL = 0xdc, - M_DRI = 0xdd, - M_DHP = 0xde, - M_EXP = 0xdf, - - M_APP0 = 0xe0, - M_APP1 = 0xe1, - M_APP2 = 0xe2, - M_APP3 = 0xe3, - M_APP4 = 0xe4, - M_APP5 = 0xe5, - M_APP6 = 0xe6, - M_APP7 = 0xe7, - M_APP8 = 0xe8, - M_APP9 = 0xe9, - M_APP10 = 0xea, - M_APP11 = 0xeb, - M_APP12 = 0xec, - M_APP13 = 0xed, - M_APP14 = 0xee, - M_APP15 = 0xef, - - M_JPG0 = 0xf0, - M_JPG8 = 0xf8, - M_JPG13 = 0xfd, - M_COM = 0xfe, - - M_TEM = 0x01, - - M_ERROR = 0x100 -} JPEG_MARKER; - - -/* Private state */ - -typedef struct { - struct jpeg_marker_writer pub; /* public fields */ - - unsigned int last_restart_interval; /* last DRI value emitted; 0 after SOI */ -} my_marker_writer; - -typedef my_marker_writer * my_marker_ptr; - - -/* - * Basic output routines. - * - * Note that we do not support suspension while writing a marker. - * Therefore, an application using suspension must ensure that there is - * enough buffer space for the initial markers (typ. 600-700 bytes) before - * calling jpeg_start_compress, and enough space to write the trailing EOI - * (a few bytes) before calling jpeg_finish_compress. Multipass compression - * modes are not supported at all with suspension, so those two are the only - * points where markers will be written. - */ - -LOCAL(void) -emit_byte (j_compress_ptr cinfo, int val) -/* Emit a byte */ -{ - struct jpeg_destination_mgr * dest = cinfo->dest; - - *(dest->next_output_byte)++ = (JOCTET) val; - if (--dest->free_in_buffer == 0) { - if (! (*dest->empty_output_buffer) (cinfo)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - } -} - - -LOCAL(void) -emit_marker (j_compress_ptr cinfo, JPEG_MARKER mark) -/* Emit a marker code */ -{ - emit_byte(cinfo, 0xFF); - emit_byte(cinfo, (int) mark); -} - - -LOCAL(void) -emit_2bytes (j_compress_ptr cinfo, int value) -/* Emit a 2-byte integer; these are always MSB first in JPEG files */ -{ - emit_byte(cinfo, (value >> 8) & 0xFF); - emit_byte(cinfo, value & 0xFF); -} - - -/* - * Routines to write specific marker types. - */ - -LOCAL(int) -emit_dqt (j_compress_ptr cinfo, int index) -/* Emit a DQT marker */ -/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */ -{ - JQUANT_TBL * qtbl = cinfo->quant_tbl_ptrs[index]; - int prec; - int i; - - if (qtbl == NULL) - ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index); - - prec = 0; - for (i = 0; i <= cinfo->lim_Se; i++) { - if (qtbl->quantval[cinfo->natural_order[i]] > 255) - prec = 1; - } - - if (! qtbl->sent_table) { - emit_marker(cinfo, M_DQT); - - emit_2bytes(cinfo, - prec ? cinfo->lim_Se * 2 + 2 + 1 + 2 : cinfo->lim_Se + 1 + 1 + 2); - - emit_byte(cinfo, index + (prec<<4)); - - for (i = 0; i <= cinfo->lim_Se; i++) { - /* The table entries must be emitted in zigzag order. */ - unsigned int qval = qtbl->quantval[cinfo->natural_order[i]]; - if (prec) - emit_byte(cinfo, (int) (qval >> 8)); - emit_byte(cinfo, (int) (qval & 0xFF)); - } - - qtbl->sent_table = TRUE; - } - - return prec; -} - - -LOCAL(void) -emit_dht (j_compress_ptr cinfo, int index, boolean is_ac) -/* Emit a DHT marker */ -{ - JHUFF_TBL * htbl; - int length, i; - - if (is_ac) { - htbl = cinfo->ac_huff_tbl_ptrs[index]; - index += 0x10; /* output index has AC bit set */ - } else { - htbl = cinfo->dc_huff_tbl_ptrs[index]; - } - - if (htbl == NULL) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index); - - if (! htbl->sent_table) { - emit_marker(cinfo, M_DHT); - - length = 0; - for (i = 1; i <= 16; i++) - length += htbl->bits[i]; - - emit_2bytes(cinfo, length + 2 + 1 + 16); - emit_byte(cinfo, index); - - for (i = 1; i <= 16; i++) - emit_byte(cinfo, htbl->bits[i]); - - for (i = 0; i < length; i++) - emit_byte(cinfo, htbl->huffval[i]); - - htbl->sent_table = TRUE; - } -} - - -LOCAL(void) -emit_dac (j_compress_ptr cinfo) -/* Emit a DAC marker */ -/* Since the useful info is so small, we want to emit all the tables in */ -/* one DAC marker. Therefore this routine does its own scan of the table. */ -{ -#ifdef C_ARITH_CODING_SUPPORTED - char dc_in_use[NUM_ARITH_TBLS]; - char ac_in_use[NUM_ARITH_TBLS]; - int length, i; - jpeg_component_info *compptr; - - for (i = 0; i < NUM_ARITH_TBLS; i++) - dc_in_use[i] = ac_in_use[i] = 0; - - for (i = 0; i < cinfo->comps_in_scan; i++) { - compptr = cinfo->cur_comp_info[i]; - /* DC needs no table for refinement scan */ - if (cinfo->Ss == 0 && cinfo->Ah == 0) - dc_in_use[compptr->dc_tbl_no] = 1; - /* AC needs no table when not present */ - if (cinfo->Se) - ac_in_use[compptr->ac_tbl_no] = 1; - } - - length = 0; - for (i = 0; i < NUM_ARITH_TBLS; i++) - length += dc_in_use[i] + ac_in_use[i]; - - if (length) { - emit_marker(cinfo, M_DAC); - - emit_2bytes(cinfo, length*2 + 2); - - for (i = 0; i < NUM_ARITH_TBLS; i++) { - if (dc_in_use[i]) { - emit_byte(cinfo, i); - emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4)); - } - if (ac_in_use[i]) { - emit_byte(cinfo, i + 0x10); - emit_byte(cinfo, cinfo->arith_ac_K[i]); - } - } - } -#endif /* C_ARITH_CODING_SUPPORTED */ -} - - -LOCAL(void) -emit_dri (j_compress_ptr cinfo) -/* Emit a DRI marker */ -{ - emit_marker(cinfo, M_DRI); - - emit_2bytes(cinfo, 4); /* fixed length */ - - emit_2bytes(cinfo, (int) cinfo->restart_interval); -} - - -LOCAL(void) -emit_lse_ict (j_compress_ptr cinfo) -/* Emit an LSE inverse color transform specification marker */ -{ - /* Support only 1 transform */ - if (cinfo->color_transform != JCT_SUBTRACT_GREEN || - cinfo->num_components < 3) - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - - emit_marker(cinfo, M_JPG8); - - emit_2bytes(cinfo, 24); /* fixed length */ - - emit_byte(cinfo, 0x0D); /* ID inverse transform specification */ - emit_2bytes(cinfo, MAXJSAMPLE); /* MAXTRANS */ - emit_byte(cinfo, 3); /* Nt=3 */ - emit_byte(cinfo, cinfo->comp_info[1].component_id); - emit_byte(cinfo, cinfo->comp_info[0].component_id); - emit_byte(cinfo, cinfo->comp_info[2].component_id); - emit_byte(cinfo, 0x80); /* F1: CENTER1=1, NORM1=0 */ - emit_2bytes(cinfo, 0); /* A(1,1)=0 */ - emit_2bytes(cinfo, 0); /* A(1,2)=0 */ - emit_byte(cinfo, 0); /* F2: CENTER2=0, NORM2=0 */ - emit_2bytes(cinfo, 1); /* A(2,1)=1 */ - emit_2bytes(cinfo, 0); /* A(2,2)=0 */ - emit_byte(cinfo, 0); /* F3: CENTER3=0, NORM3=0 */ - emit_2bytes(cinfo, 1); /* A(3,1)=1 */ - emit_2bytes(cinfo, 0); /* A(3,2)=0 */ -} - - -LOCAL(void) -emit_sof (j_compress_ptr cinfo, JPEG_MARKER code) -/* Emit a SOF marker */ -{ - int ci; - jpeg_component_info *compptr; - - emit_marker(cinfo, code); - - emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */ - - /* Make sure image isn't bigger than SOF field can handle */ - if ((long) cinfo->jpeg_height > 65535L || - (long) cinfo->jpeg_width > 65535L) - ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535); - - emit_byte(cinfo, cinfo->data_precision); - emit_2bytes(cinfo, (int) cinfo->jpeg_height); - emit_2bytes(cinfo, (int) cinfo->jpeg_width); - - emit_byte(cinfo, cinfo->num_components); - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - emit_byte(cinfo, compptr->component_id); - emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor); - emit_byte(cinfo, compptr->quant_tbl_no); - } -} - - -LOCAL(void) -emit_sos (j_compress_ptr cinfo) -/* Emit a SOS marker */ -{ - int i, td, ta; - jpeg_component_info *compptr; - - emit_marker(cinfo, M_SOS); - - emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */ - - emit_byte(cinfo, cinfo->comps_in_scan); - - for (i = 0; i < cinfo->comps_in_scan; i++) { - compptr = cinfo->cur_comp_info[i]; - emit_byte(cinfo, compptr->component_id); - - /* We emit 0 for unused field(s); this is recommended by the P&M text - * but does not seem to be specified in the standard. - */ - - /* DC needs no table for refinement scan */ - td = cinfo->Ss == 0 && cinfo->Ah == 0 ? compptr->dc_tbl_no : 0; - /* AC needs no table when not present */ - ta = cinfo->Se ? compptr->ac_tbl_no : 0; - - emit_byte(cinfo, (td << 4) + ta); - } - - emit_byte(cinfo, cinfo->Ss); - emit_byte(cinfo, cinfo->Se); - emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al); -} - - -LOCAL(void) -emit_pseudo_sos (j_compress_ptr cinfo) -/* Emit a pseudo SOS marker */ -{ - emit_marker(cinfo, M_SOS); - - emit_2bytes(cinfo, 2 + 1 + 3); /* length */ - - emit_byte(cinfo, 0); /* Ns */ - - emit_byte(cinfo, 0); /* Ss */ - emit_byte(cinfo, cinfo->block_size * cinfo->block_size - 1); /* Se */ - emit_byte(cinfo, 0); /* Ah/Al */ -} - - -LOCAL(void) -emit_jfif_app0 (j_compress_ptr cinfo) -/* Emit a JFIF-compliant APP0 marker */ -{ - /* - * Length of APP0 block (2 bytes) - * Block ID (4 bytes - ASCII "JFIF") - * Zero byte (1 byte to terminate the ID string) - * Version Major, Minor (2 bytes - major first) - * Units (1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm) - * Xdpu (2 bytes - dots per unit horizontal) - * Ydpu (2 bytes - dots per unit vertical) - * Thumbnail X size (1 byte) - * Thumbnail Y size (1 byte) - */ - - emit_marker(cinfo, M_APP0); - - emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */ - - emit_byte(cinfo, 0x4A); /* Identifier: ASCII "JFIF" */ - emit_byte(cinfo, 0x46); - emit_byte(cinfo, 0x49); - emit_byte(cinfo, 0x46); - emit_byte(cinfo, 0); - emit_byte(cinfo, cinfo->JFIF_major_version); /* Version fields */ - emit_byte(cinfo, cinfo->JFIF_minor_version); - emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */ - emit_2bytes(cinfo, (int) cinfo->X_density); - emit_2bytes(cinfo, (int) cinfo->Y_density); - emit_byte(cinfo, 0); /* No thumbnail image */ - emit_byte(cinfo, 0); -} - - -LOCAL(void) -emit_adobe_app14 (j_compress_ptr cinfo) -/* Emit an Adobe APP14 marker */ -{ - /* - * Length of APP14 block (2 bytes) - * Block ID (5 bytes - ASCII "Adobe") - * Version Number (2 bytes - currently 100) - * Flags0 (2 bytes - currently 0) - * Flags1 (2 bytes - currently 0) - * Color transform (1 byte) - * - * Although Adobe TN 5116 mentions Version = 101, all the Adobe files - * now in circulation seem to use Version = 100, so that's what we write. - * - * We write the color transform byte as 1 if the JPEG color space is - * YCbCr, 2 if it's YCCK, 0 otherwise. Adobe's definition has to do with - * whether the encoder performed a transformation, which is pretty useless. - */ - - emit_marker(cinfo, M_APP14); - - emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */ - - emit_byte(cinfo, 0x41); /* Identifier: ASCII "Adobe" */ - emit_byte(cinfo, 0x64); - emit_byte(cinfo, 0x6F); - emit_byte(cinfo, 0x62); - emit_byte(cinfo, 0x65); - emit_2bytes(cinfo, 100); /* Version */ - emit_2bytes(cinfo, 0); /* Flags0 */ - emit_2bytes(cinfo, 0); /* Flags1 */ - switch (cinfo->jpeg_color_space) { - case JCS_YCbCr: - emit_byte(cinfo, 1); /* Color transform = 1 */ - break; - case JCS_YCCK: - emit_byte(cinfo, 2); /* Color transform = 2 */ - break; - default: - emit_byte(cinfo, 0); /* Color transform = 0 */ - } -} - - -/* - * These routines allow writing an arbitrary marker with parameters. - * The only intended use is to emit COM or APPn markers after calling - * write_file_header and before calling write_frame_header. - * Other uses are not guaranteed to produce desirable results. - * Counting the parameter bytes properly is the caller's responsibility. - */ - -METHODDEF(void) -write_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen) -/* Emit an arbitrary marker header */ -{ - if (datalen > (unsigned int) 65533) /* safety check */ - ERREXIT(cinfo, JERR_BAD_LENGTH); - - emit_marker(cinfo, (JPEG_MARKER) marker); - - emit_2bytes(cinfo, (int) (datalen + 2)); /* total length */ -} - -METHODDEF(void) -write_marker_byte (j_compress_ptr cinfo, int val) -/* Emit one byte of marker parameters following write_marker_header */ -{ - emit_byte(cinfo, val); -} - - -/* - * Write datastream header. - * This consists of an SOI and optional APPn markers. - * We recommend use of the JFIF marker, but not the Adobe marker, - * when using YCbCr or grayscale data. The JFIF marker is also used - * for other standard JPEG colorspaces. The Adobe marker is helpful - * to distinguish RGB, CMYK, and YCCK colorspaces. - * Note that an application can write additional header markers after - * jpeg_start_compress returns. - */ - -METHODDEF(void) -write_file_header (j_compress_ptr cinfo) -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - - emit_marker(cinfo, M_SOI); /* first the SOI */ - - /* SOI is defined to reset restart interval to 0 */ - marker->last_restart_interval = 0; - - if (cinfo->write_JFIF_header) /* next an optional JFIF APP0 */ - emit_jfif_app0(cinfo); - if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */ - emit_adobe_app14(cinfo); -} - - -/* - * Write frame header. - * This consists of DQT and SOFn markers, - * a conditional LSE marker and a conditional pseudo SOS marker. - * Note that we do not emit the SOF until we have emitted the DQT(s). - * This avoids compatibility problems with incorrect implementations that - * try to error-check the quant table numbers as soon as they see the SOF. - */ - -METHODDEF(void) -write_frame_header (j_compress_ptr cinfo) -{ - int ci, prec; - boolean is_baseline; - jpeg_component_info *compptr; - - /* Emit DQT for each quantization table. - * Note that emit_dqt() suppresses any duplicate tables. - */ - prec = 0; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - prec += emit_dqt(cinfo, compptr->quant_tbl_no); - } - /* now prec is nonzero iff there are any 16-bit quant tables. */ - - /* Check for a non-baseline specification. - * Note we assume that Huffman table numbers won't be changed later. - */ - if (cinfo->arith_code || cinfo->progressive_mode || - cinfo->data_precision != 8 || cinfo->block_size != DCTSIZE) { - is_baseline = FALSE; - } else { - is_baseline = TRUE; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1) - is_baseline = FALSE; - } - if (prec && is_baseline) { - is_baseline = FALSE; - /* If it's baseline except for quantizer size, warn the user */ - TRACEMS(cinfo, 0, JTRC_16BIT_TABLES); - } - } - - /* Emit the proper SOF marker */ - if (cinfo->arith_code) { - if (cinfo->progressive_mode) - emit_sof(cinfo, M_SOF10); /* SOF code for progressive arithmetic */ - else - emit_sof(cinfo, M_SOF9); /* SOF code for sequential arithmetic */ - } else { - if (cinfo->progressive_mode) - emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */ - else if (is_baseline) - emit_sof(cinfo, M_SOF0); /* SOF code for baseline implementation */ - else - emit_sof(cinfo, M_SOF1); /* SOF code for non-baseline Huffman file */ - } - - /* Check to emit LSE inverse color transform specification marker */ - if (cinfo->color_transform) - emit_lse_ict(cinfo); - - /* Check to emit pseudo SOS marker */ - if (cinfo->progressive_mode && cinfo->block_size != DCTSIZE) - emit_pseudo_sos(cinfo); -} - - -/* - * Write scan header. - * This consists of DHT or DAC markers, optional DRI, and SOS. - * Compressed data will be written following the SOS. - */ - -METHODDEF(void) -write_scan_header (j_compress_ptr cinfo) -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - int i; - jpeg_component_info *compptr; - - if (cinfo->arith_code) { - /* Emit arith conditioning info. We may have some duplication - * if the file has multiple scans, but it's so small it's hardly - * worth worrying about. - */ - emit_dac(cinfo); - } else { - /* Emit Huffman tables. - * Note that emit_dht() suppresses any duplicate tables. - */ - for (i = 0; i < cinfo->comps_in_scan; i++) { - compptr = cinfo->cur_comp_info[i]; - /* DC needs no table for refinement scan */ - if (cinfo->Ss == 0 && cinfo->Ah == 0) - emit_dht(cinfo, compptr->dc_tbl_no, FALSE); - /* AC needs no table when not present */ - if (cinfo->Se) - emit_dht(cinfo, compptr->ac_tbl_no, TRUE); - } - } - - /* Emit DRI if required --- note that DRI value could change for each scan. - * We avoid wasting space with unnecessary DRIs, however. - */ - if (cinfo->restart_interval != marker->last_restart_interval) { - emit_dri(cinfo); - marker->last_restart_interval = cinfo->restart_interval; - } - - emit_sos(cinfo); -} - - -/* - * Write datastream trailer. - */ - -METHODDEF(void) -write_file_trailer (j_compress_ptr cinfo) -{ - emit_marker(cinfo, M_EOI); -} - - -/* - * Write an abbreviated table-specification datastream. - * This consists of SOI, DQT and DHT tables, and EOI. - * Any table that is defined and not marked sent_table = TRUE will be - * emitted. Note that all tables will be marked sent_table = TRUE at exit. - */ - -METHODDEF(void) -write_tables_only (j_compress_ptr cinfo) -{ - int i; - - emit_marker(cinfo, M_SOI); - - for (i = 0; i < NUM_QUANT_TBLS; i++) { - if (cinfo->quant_tbl_ptrs[i] != NULL) - (void) emit_dqt(cinfo, i); - } - - if (! cinfo->arith_code) { - for (i = 0; i < NUM_HUFF_TBLS; i++) { - if (cinfo->dc_huff_tbl_ptrs[i] != NULL) - emit_dht(cinfo, i, FALSE); - if (cinfo->ac_huff_tbl_ptrs[i] != NULL) - emit_dht(cinfo, i, TRUE); - } - } - - emit_marker(cinfo, M_EOI); -} - - -/* - * Initialize the marker writer module. - */ - -GLOBAL(void) -jinit_marker_writer (j_compress_ptr cinfo) -{ - my_marker_ptr marker; - - /* Create the subobject */ - marker = (my_marker_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_marker_writer)); - cinfo->marker = &marker->pub; - /* Initialize method pointers */ - marker->pub.write_file_header = write_file_header; - marker->pub.write_frame_header = write_frame_header; - marker->pub.write_scan_header = write_scan_header; - marker->pub.write_file_trailer = write_file_trailer; - marker->pub.write_tables_only = write_tables_only; - marker->pub.write_marker_header = write_marker_header; - marker->pub.write_marker_byte = write_marker_byte; - /* Initialize private state */ - marker->last_restart_interval = 0; -} diff --git a/thirdparty/jpeg-9e/jcmaster.c b/thirdparty/jpeg-9e/jcmaster.c deleted file mode 100644 index a70af0c..0000000 --- a/thirdparty/jpeg-9e/jcmaster.c +++ /dev/null @@ -1,675 +0,0 @@ -/* - * jcmaster.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2003-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains master control logic for the JPEG compressor. - * These routines are concerned with parameter validation, initial setup, - * and inter-pass control (determining the number of passes and the work - * to be done in each pass). - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Private state */ - -typedef enum { - main_pass, /* input data, also do first output step */ - huff_opt_pass, /* Huffman code optimization pass */ - output_pass /* data output pass */ -} c_pass_type; - -typedef struct { - struct jpeg_comp_master pub; /* public fields */ - - c_pass_type pass_type; /* the type of the current pass */ - - int pass_number; /* # of passes completed */ - int total_passes; /* total # of passes needed */ - - int scan_number; /* current index in scan_info[] */ -} my_comp_master; - -typedef my_comp_master * my_master_ptr; - - -/* - * Support routines that do various essential calculations. - */ - -LOCAL(void) -initial_setup (j_compress_ptr cinfo) -/* Do computations that are needed before master selection phase */ -{ - int ci, ssize; - jpeg_component_info *compptr; - - /* Sanity check on block_size */ - if (cinfo->block_size < 1 || cinfo->block_size > 16) - ERREXIT2(cinfo, JERR_BAD_DCTSIZE, cinfo->block_size, cinfo->block_size); - - /* Derive natural_order from block_size */ - switch (cinfo->block_size) { - case 2: cinfo->natural_order = jpeg_natural_order2; break; - case 3: cinfo->natural_order = jpeg_natural_order3; break; - case 4: cinfo->natural_order = jpeg_natural_order4; break; - case 5: cinfo->natural_order = jpeg_natural_order5; break; - case 6: cinfo->natural_order = jpeg_natural_order6; break; - case 7: cinfo->natural_order = jpeg_natural_order7; break; - default: cinfo->natural_order = jpeg_natural_order; - } - - /* Derive lim_Se from block_size */ - cinfo->lim_Se = cinfo->block_size < DCTSIZE ? - cinfo->block_size * cinfo->block_size - 1 : DCTSIZE2-1; - - /* Sanity check on image dimensions */ - if (cinfo->jpeg_height <= 0 || cinfo->jpeg_width <= 0 || - cinfo->num_components <= 0) - ERREXIT(cinfo, JERR_EMPTY_IMAGE); - - /* Make sure image isn't bigger than I can handle */ - if ((long) cinfo->jpeg_height > (long) JPEG_MAX_DIMENSION || - (long) cinfo->jpeg_width > (long) JPEG_MAX_DIMENSION) - ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); - - /* Only 8 to 12 bits data precision are supported for DCT based JPEG */ - if (cinfo->data_precision < 8 || cinfo->data_precision > 12) - ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); - - /* Check that number of components won't exceed internal array sizes */ - if (cinfo->num_components > MAX_COMPONENTS) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, - MAX_COMPONENTS); - - /* Compute maximum sampling factors; check factor validity */ - cinfo->max_h_samp_factor = 1; - cinfo->max_v_samp_factor = 1; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || - compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) - ERREXIT(cinfo, JERR_BAD_SAMPLING); - cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, - compptr->h_samp_factor); - cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, - compptr->v_samp_factor); - } - - /* Compute dimensions of components */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Fill in the correct component_index value; don't rely on application */ - compptr->component_index = ci; - /* In selecting the actual DCT scaling for each component, we try to - * scale down the chroma components via DCT scaling rather than downsampling. - * This saves time if the downsampler gets to use 1:1 scaling. - * Note this code adapts subsampling ratios which are powers of 2. - */ - ssize = 1; -#ifdef DCT_SCALING_SUPPORTED - if (! cinfo->raw_data_in) - while (cinfo->min_DCT_h_scaled_size * ssize <= - (cinfo->do_fancy_downsampling ? DCTSIZE : DCTSIZE / 2) && - (cinfo->max_h_samp_factor % (compptr->h_samp_factor * ssize * 2)) == - 0) { - ssize = ssize * 2; - } -#endif - compptr->DCT_h_scaled_size = cinfo->min_DCT_h_scaled_size * ssize; - ssize = 1; -#ifdef DCT_SCALING_SUPPORTED - if (! cinfo->raw_data_in) - while (cinfo->min_DCT_v_scaled_size * ssize <= - (cinfo->do_fancy_downsampling ? DCTSIZE : DCTSIZE / 2) && - (cinfo->max_v_samp_factor % (compptr->v_samp_factor * ssize * 2)) == - 0) { - ssize = ssize * 2; - } -#endif - compptr->DCT_v_scaled_size = cinfo->min_DCT_v_scaled_size * ssize; - - /* We don't support DCT ratios larger than 2. */ - if (compptr->DCT_h_scaled_size > compptr->DCT_v_scaled_size * 2) - compptr->DCT_h_scaled_size = compptr->DCT_v_scaled_size * 2; - else if (compptr->DCT_v_scaled_size > compptr->DCT_h_scaled_size * 2) - compptr->DCT_v_scaled_size = compptr->DCT_h_scaled_size * 2; - - /* Size in DCT blocks */ - compptr->width_in_blocks = (JDIMENSION) - jdiv_round_up((long) cinfo->jpeg_width * (long) compptr->h_samp_factor, - (long) (cinfo->max_h_samp_factor * cinfo->block_size)); - compptr->height_in_blocks = (JDIMENSION) - jdiv_round_up((long) cinfo->jpeg_height * (long) compptr->v_samp_factor, - (long) (cinfo->max_v_samp_factor * cinfo->block_size)); - /* Size in samples */ - compptr->downsampled_width = (JDIMENSION) - jdiv_round_up((long) cinfo->jpeg_width * - (long) (compptr->h_samp_factor * compptr->DCT_h_scaled_size), - (long) (cinfo->max_h_samp_factor * cinfo->block_size)); - compptr->downsampled_height = (JDIMENSION) - jdiv_round_up((long) cinfo->jpeg_height * - (long) (compptr->v_samp_factor * compptr->DCT_v_scaled_size), - (long) (cinfo->max_v_samp_factor * cinfo->block_size)); - /* Don't need quantization scale after DCT, - * until color conversion says otherwise. - */ - compptr->component_needed = FALSE; - } - - /* Compute number of fully interleaved MCU rows (number of times that - * main controller will call coefficient controller). - */ - cinfo->total_iMCU_rows = (JDIMENSION) - jdiv_round_up((long) cinfo->jpeg_height, - (long) (cinfo->max_v_samp_factor * cinfo->block_size)); -} - - -#ifdef C_MULTISCAN_FILES_SUPPORTED - -LOCAL(void) -validate_script (j_compress_ptr cinfo) -/* Verify that the scan script in cinfo->scan_info[] is valid; also - * determine whether it uses progressive JPEG, and set cinfo->progressive_mode. - */ -{ - const jpeg_scan_info * scanptr; - int scanno, ncomps, ci, coefi, thisi; - int Ss, Se, Ah, Al; - boolean component_sent[MAX_COMPONENTS]; -#ifdef C_PROGRESSIVE_SUPPORTED - int * last_bitpos_ptr; - int last_bitpos[MAX_COMPONENTS][DCTSIZE2]; - /* -1 until that coefficient has been seen; then last Al for it */ -#endif - - if (cinfo->num_scans <= 0) - ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0); - - /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1; - * for progressive JPEG, no scan can have this. - */ - scanptr = cinfo->scan_info; - if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) { -#ifdef C_PROGRESSIVE_SUPPORTED - cinfo->progressive_mode = TRUE; - last_bitpos_ptr = & last_bitpos[0][0]; - for (ci = 0; ci < cinfo->num_components; ci++) - for (coefi = 0; coefi < DCTSIZE2; coefi++) - *last_bitpos_ptr++ = -1; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else { - cinfo->progressive_mode = FALSE; - for (ci = 0; ci < cinfo->num_components; ci++) - component_sent[ci] = FALSE; - } - - for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) { - /* Validate component indexes */ - ncomps = scanptr->comps_in_scan; - if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN); - for (ci = 0; ci < ncomps; ci++) { - thisi = scanptr->component_index[ci]; - if (thisi < 0 || thisi >= cinfo->num_components) - ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); - /* Components must appear in SOF order within each scan */ - if (ci > 0 && thisi <= scanptr->component_index[ci-1]) - ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); - } - /* Validate progression parameters */ - Ss = scanptr->Ss; - Se = scanptr->Se; - Ah = scanptr->Ah; - Al = scanptr->Al; - if (cinfo->progressive_mode) { -#ifdef C_PROGRESSIVE_SUPPORTED - /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that - * seems wrong: the upper bound ought to depend on data precision. - * Perhaps they really meant 0..N+1 for N-bit precision. - * Here we allow 0..10 for 8-bit data; Al larger than 10 results in - * out-of-range reconstructed DC values during the first DC scan, - * which might cause problems for some decoders. - */ - if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 || - Ah < 0 || Ah > (cinfo->data_precision > 8 ? 13 : 10) || - Al < 0 || Al > (cinfo->data_precision > 8 ? 13 : 10)) - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - if (Ss == 0) { - if (Se != 0) /* DC and AC together not OK */ - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - } else { - if (ncomps != 1) /* AC scans must be for only one component */ - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - } - for (ci = 0; ci < ncomps; ci++) { - last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0]; - if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */ - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - for (coefi = Ss; coefi <= Se; coefi++) { - if (last_bitpos_ptr[coefi] < 0) { - /* first scan of this coefficient */ - if (Ah != 0) - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - } else { - /* not first scan */ - if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1) - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - } - last_bitpos_ptr[coefi] = Al; - } - } -#endif - } else { - /* For sequential JPEG, all progression parameters must be these: */ - if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0) - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - /* Make sure components are not sent twice */ - for (ci = 0; ci < ncomps; ci++) { - thisi = scanptr->component_index[ci]; - if (component_sent[thisi]) - ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); - component_sent[thisi] = TRUE; - } - } - } - - /* Now verify that everything got sent. */ - if (cinfo->progressive_mode) { -#ifdef C_PROGRESSIVE_SUPPORTED - /* For progressive mode, we only check that at least some DC data - * got sent for each component; the spec does not require that all bits - * of all coefficients be transmitted. Would it be wiser to enforce - * transmission of all coefficient bits?? - */ - for (ci = 0; ci < cinfo->num_components; ci++) { - if (last_bitpos[ci][0] < 0) - ERREXIT(cinfo, JERR_MISSING_DATA); - } -#endif - } else { - for (ci = 0; ci < cinfo->num_components; ci++) { - if (! component_sent[ci]) - ERREXIT(cinfo, JERR_MISSING_DATA); - } - } -} - - -LOCAL(void) -reduce_script (j_compress_ptr cinfo) -/* Adapt scan script for use with reduced block size; - * assume that script has been validated before. - */ -{ - jpeg_scan_info * scanptr; - int idxout, idxin; - - /* Circumvent const declaration for this function */ - scanptr = (jpeg_scan_info *) cinfo->scan_info; - idxout = 0; - - for (idxin = 0; idxin < cinfo->num_scans; idxin++) { - /* After skipping, idxout becomes smaller than idxin */ - if (idxin != idxout) - /* Copy rest of data; - * note we stay in given chunk of allocated memory. - */ - scanptr[idxout] = scanptr[idxin]; - if (scanptr[idxout].Ss > cinfo->lim_Se) - /* Entire scan out of range - skip this entry */ - continue; - if (scanptr[idxout].Se > cinfo->lim_Se) - /* Limit scan to end of block */ - scanptr[idxout].Se = cinfo->lim_Se; - idxout++; - } - - cinfo->num_scans = idxout; -} - -#endif /* C_MULTISCAN_FILES_SUPPORTED */ - - -LOCAL(void) -select_scan_parameters (j_compress_ptr cinfo) -/* Set up the scan parameters for the current scan */ -{ - int ci; - -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (cinfo->scan_info != NULL) { - /* Prepare for current scan --- the script is already validated */ - my_master_ptr master = (my_master_ptr) cinfo->master; - const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number; - - cinfo->comps_in_scan = scanptr->comps_in_scan; - for (ci = 0; ci < scanptr->comps_in_scan; ci++) { - cinfo->cur_comp_info[ci] = - &cinfo->comp_info[scanptr->component_index[ci]]; - } - if (cinfo->progressive_mode) { - cinfo->Ss = scanptr->Ss; - cinfo->Se = scanptr->Se; - cinfo->Ah = scanptr->Ah; - cinfo->Al = scanptr->Al; - return; - } - } - else -#endif - { - /* Prepare for single sequential-JPEG scan containing all components */ - if (cinfo->num_components > MAX_COMPS_IN_SCAN) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, - MAX_COMPS_IN_SCAN); - cinfo->comps_in_scan = cinfo->num_components; - for (ci = 0; ci < cinfo->num_components; ci++) { - cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci]; - } - } - cinfo->Ss = 0; - cinfo->Se = cinfo->block_size * cinfo->block_size - 1; - cinfo->Ah = 0; - cinfo->Al = 0; -} - - -LOCAL(void) -per_scan_setup (j_compress_ptr cinfo) -/* Do computations that are needed before processing a JPEG scan */ -/* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */ -{ - int ci, mcublks, tmp; - jpeg_component_info *compptr; - - if (cinfo->comps_in_scan == 1) { - - /* Noninterleaved (single-component) scan */ - compptr = cinfo->cur_comp_info[0]; - - /* Overall image size in MCUs */ - cinfo->MCUs_per_row = compptr->width_in_blocks; - cinfo->MCU_rows_in_scan = compptr->height_in_blocks; - - /* For noninterleaved scan, always one block per MCU */ - compptr->MCU_width = 1; - compptr->MCU_height = 1; - compptr->MCU_blocks = 1; - compptr->MCU_sample_width = compptr->DCT_h_scaled_size; - compptr->last_col_width = 1; - /* For noninterleaved scans, it is convenient to define last_row_height - * as the number of block rows present in the last iMCU row. - */ - tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); - if (tmp == 0) tmp = compptr->v_samp_factor; - compptr->last_row_height = tmp; - - /* Prepare array describing MCU composition */ - cinfo->blocks_in_MCU = 1; - cinfo->MCU_membership[0] = 0; - - } else { - - /* Interleaved (multi-component) scan */ - if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, - MAX_COMPS_IN_SCAN); - - /* Overall image size in MCUs */ - cinfo->MCUs_per_row = (JDIMENSION) - jdiv_round_up((long) cinfo->jpeg_width, - (long) (cinfo->max_h_samp_factor * cinfo->block_size)); - cinfo->MCU_rows_in_scan = cinfo->total_iMCU_rows; - - cinfo->blocks_in_MCU = 0; - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* Sampling factors give # of blocks of component in each MCU */ - compptr->MCU_width = compptr->h_samp_factor; - compptr->MCU_height = compptr->v_samp_factor; - compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; - compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_h_scaled_size; - /* Figure number of non-dummy blocks in last MCU column & row */ - tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); - if (tmp == 0) tmp = compptr->MCU_width; - compptr->last_col_width = tmp; - tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); - if (tmp == 0) tmp = compptr->MCU_height; - compptr->last_row_height = tmp; - /* Prepare array describing MCU composition */ - mcublks = compptr->MCU_blocks; - if (cinfo->blocks_in_MCU + mcublks > C_MAX_BLOCKS_IN_MCU) - ERREXIT(cinfo, JERR_BAD_MCU_SIZE); - while (mcublks-- > 0) { - cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; - } - } - - } - - /* Convert restart specified in rows to actual MCU count. */ - /* Note that count must fit in 16 bits, so we provide limiting. */ - if (cinfo->restart_in_rows > 0) { - long nominal = (long) cinfo->restart_in_rows * (long) cinfo->MCUs_per_row; - cinfo->restart_interval = (unsigned int) MIN(nominal, 65535L); - } -} - - -/* - * Per-pass setup. - * This is called at the beginning of each pass. We determine which modules - * will be active during this pass and give them appropriate start_pass calls. - * We also set is_last_pass to indicate whether any more passes will be - * required. - */ - -METHODDEF(void) -prepare_for_pass (j_compress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - - switch (master->pass_type) { - case main_pass: - /* Initial pass: will collect input data, and do either Huffman - * optimization or data output for the first scan. - */ - select_scan_parameters(cinfo); - per_scan_setup(cinfo); - if (! cinfo->raw_data_in) { - (*cinfo->cconvert->start_pass) (cinfo); - (*cinfo->downsample->start_pass) (cinfo); - (*cinfo->prep->start_pass) (cinfo, JBUF_PASS_THRU); - } - (*cinfo->fdct->start_pass) (cinfo); - (*cinfo->entropy->start_pass) (cinfo, cinfo->optimize_coding); - (*cinfo->coef->start_pass) (cinfo, - (master->total_passes > 1 ? - JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); - (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); - if (cinfo->optimize_coding) { - /* No immediate data output; postpone writing frame/scan headers */ - master->pub.call_pass_startup = FALSE; - } else { - /* Will write frame/scan headers at first jpeg_write_scanlines call */ - master->pub.call_pass_startup = TRUE; - } - break; -#ifdef ENTROPY_OPT_SUPPORTED - case huff_opt_pass: - /* Do Huffman optimization for a scan after the first one. */ - select_scan_parameters(cinfo); - per_scan_setup(cinfo); - if (cinfo->Ss != 0 || cinfo->Ah == 0) { - (*cinfo->entropy->start_pass) (cinfo, TRUE); - (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); - master->pub.call_pass_startup = FALSE; - break; - } - /* Special case: Huffman DC refinement scans need no Huffman table - * and therefore we can skip the optimization pass for them. - */ - master->pass_type = output_pass; - master->pass_number++; - /*FALLTHROUGH*/ -#endif - case output_pass: - /* Do a data-output pass. */ - /* We need not repeat per-scan setup if prior optimization pass did it. */ - if (! cinfo->optimize_coding) { - select_scan_parameters(cinfo); - per_scan_setup(cinfo); - } - (*cinfo->entropy->start_pass) (cinfo, FALSE); - (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); - /* We emit frame/scan headers now */ - if (master->scan_number == 0) - (*cinfo->marker->write_frame_header) (cinfo); - (*cinfo->marker->write_scan_header) (cinfo); - master->pub.call_pass_startup = FALSE; - break; - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - } - - master->pub.is_last_pass = (master->pass_number == master->total_passes-1); - - /* Set up progress monitor's pass info if present */ - if (cinfo->progress != NULL) { - cinfo->progress->completed_passes = master->pass_number; - cinfo->progress->total_passes = master->total_passes; - } -} - - -/* - * Special start-of-pass hook. - * This is called by jpeg_write_scanlines if call_pass_startup is TRUE. - * In single-pass processing, we need this hook because we don't want to - * write frame/scan headers during jpeg_start_compress; we want to let the - * application write COM markers etc. between jpeg_start_compress and the - * jpeg_write_scanlines loop. - * In multi-pass processing, this routine is not used. - */ - -METHODDEF(void) -pass_startup (j_compress_ptr cinfo) -{ - cinfo->master->call_pass_startup = FALSE; /* reset flag so call only once */ - - (*cinfo->marker->write_frame_header) (cinfo); - (*cinfo->marker->write_scan_header) (cinfo); -} - - -/* - * Finish up at end of pass. - */ - -METHODDEF(void) -finish_pass_master (j_compress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - - /* The entropy coder always needs an end-of-pass call, - * either to analyze statistics or to flush its output buffer. - */ - (*cinfo->entropy->finish_pass) (cinfo); - - /* Update state for next pass */ - switch (master->pass_type) { - case main_pass: - /* next pass is either output of scan 0 (after optimization) - * or output of scan 1 (if no optimization). - */ - master->pass_type = output_pass; - if (! cinfo->optimize_coding) - master->scan_number++; - break; - case huff_opt_pass: - /* next pass is always output of current scan */ - master->pass_type = output_pass; - break; - case output_pass: - /* next pass is either optimization or output of next scan */ - if (cinfo->optimize_coding) - master->pass_type = huff_opt_pass; - master->scan_number++; - break; - } - - master->pass_number++; -} - - -/* - * Initialize master compression control. - */ - -GLOBAL(void) -jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only) -{ - my_master_ptr master; - - master = (my_master_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_comp_master)); - cinfo->master = &master->pub; - master->pub.prepare_for_pass = prepare_for_pass; - master->pub.pass_startup = pass_startup; - master->pub.finish_pass = finish_pass_master; - master->pub.is_last_pass = FALSE; - - /* Validate parameters, determine derived values */ - initial_setup(cinfo); - - if (cinfo->scan_info != NULL) { -#ifdef C_MULTISCAN_FILES_SUPPORTED - validate_script(cinfo); - if (cinfo->block_size < DCTSIZE) - reduce_script(cinfo); -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else { - cinfo->progressive_mode = FALSE; - cinfo->num_scans = 1; - } - - if (cinfo->optimize_coding) - cinfo->arith_code = FALSE; /* disable arithmetic coding */ - else if (! cinfo->arith_code && - (cinfo->progressive_mode || - (cinfo->block_size > 1 && cinfo->block_size < DCTSIZE))) - /* TEMPORARY HACK ??? */ - /* assume default tables no good for progressive or reduced AC mode */ - cinfo->optimize_coding = TRUE; /* force Huffman optimization */ - - /* Initialize my private state */ - if (transcode_only) { - /* no main pass in transcoding */ - if (cinfo->optimize_coding) - master->pass_type = huff_opt_pass; - else - master->pass_type = output_pass; - } else { - /* for normal compression, first pass is always this type: */ - master->pass_type = main_pass; - } - master->scan_number = 0; - master->pass_number = 0; - if (cinfo->optimize_coding) - master->total_passes = cinfo->num_scans * 2; - else - master->total_passes = cinfo->num_scans; -} diff --git a/thirdparty/jpeg-9e/jcomapi.c b/thirdparty/jpeg-9e/jcomapi.c deleted file mode 100644 index 678c5d1..0000000 --- a/thirdparty/jpeg-9e/jcomapi.c +++ /dev/null @@ -1,244 +0,0 @@ -/* - * jcomapi.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains application interface routines that are used for both - * compression and decompression. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Abort processing of a JPEG compression or decompression operation, - * but don't destroy the object itself. - * - * For this, we merely clean up all the nonpermanent memory pools. - * Note that temp files (virtual arrays) are not allowed to belong to - * the permanent pool, so we will be able to close all temp files here. - * Closing a data source or destination, if necessary, is the application's - * responsibility. - */ - -GLOBAL(void) -jpeg_abort (j_common_ptr cinfo) -{ - int pool; - - /* Do nothing if called on a not-initialized or destroyed JPEG object. */ - if (cinfo->mem == NULL) - return; - - /* Releasing pools in reverse order might help avoid fragmentation - * with some (brain-damaged) malloc libraries. - */ - for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) { - (*cinfo->mem->free_pool) (cinfo, pool); - } - - /* Reset overall state for possible reuse of object */ - if (cinfo->is_decompressor) { - cinfo->global_state = DSTATE_START; - /* Try to keep application from accessing now-deleted marker list. - * A bit kludgy to do it here, but this is the most central place. - */ - ((j_decompress_ptr) cinfo)->marker_list = NULL; - } else { - cinfo->global_state = CSTATE_START; - } -} - - -/* - * Destruction of a JPEG object. - * - * Everything gets deallocated except the master jpeg_compress_struct itself - * and the error manager struct. Both of these are supplied by the application - * and must be freed, if necessary, by the application. (Often they are on - * the stack and so don't need to be freed anyway.) - * Closing a data source or destination, if necessary, is the application's - * responsibility. - */ - -GLOBAL(void) -jpeg_destroy (j_common_ptr cinfo) -{ - /* We need only tell the memory manager to release everything. */ - /* NB: mem pointer is NULL if memory mgr failed to initialize. */ - if (cinfo->mem != NULL) - (*cinfo->mem->self_destruct) (cinfo); - cinfo->mem = NULL; /* be safe if jpeg_destroy is called twice */ - cinfo->global_state = 0; /* mark it destroyed */ -} - - -/* - * Convenience routines for allocating quantization and Huffman tables. - * (Would jutils.c be a more reasonable place to put these?) - */ - -GLOBAL(JQUANT_TBL *) -jpeg_alloc_quant_table (j_common_ptr cinfo) -{ - JQUANT_TBL *tbl; - - tbl = (JQUANT_TBL *) - (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL)); - tbl->sent_table = FALSE; /* make sure this is false in any new table */ - return tbl; -} - - -GLOBAL(JHUFF_TBL *) -jpeg_alloc_huff_table (j_common_ptr cinfo) -{ - JHUFF_TBL *tbl; - - tbl = (JHUFF_TBL *) - (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL)); - tbl->sent_table = FALSE; /* make sure this is false in any new table */ - return tbl; -} - - -/* - * Set up the standard Huffman tables (cf. JPEG standard section K.3). - * IMPORTANT: these are only valid for 8-bit data precision! - * (Would jutils.c be a more reasonable place to put this?) - */ - -GLOBAL(JHUFF_TBL *) -jpeg_std_huff_table (j_common_ptr cinfo, boolean isDC, int tblno) -{ - JHUFF_TBL **htblptr, *htbl; - const UINT8 *bits, *val; - int nsymbols, len; - - static const UINT8 bits_dc_luminance[17] = - { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; - static const UINT8 val_dc_luminance[] = - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; - - static const UINT8 bits_dc_chrominance[17] = - { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; - static const UINT8 val_dc_chrominance[] = - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; - - static const UINT8 bits_ac_luminance[17] = - { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d }; - static const UINT8 val_ac_luminance[] = - { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, - 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, - 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, - 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, - 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, - 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, - 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, - 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, - 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, - 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, - 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, - 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, - 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, - 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, - 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, - 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0xfa }; - - static const UINT8 bits_ac_chrominance[17] = - { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 }; - static const UINT8 val_ac_chrominance[] = - { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, - 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, - 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, - 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, - 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, - 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, - 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, - 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, - 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, - 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, - 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, - 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, - 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, - 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, - 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0xfa }; - - if (cinfo->is_decompressor) { - if (isDC) - htblptr = ((j_decompress_ptr) cinfo)->dc_huff_tbl_ptrs; - else - htblptr = ((j_decompress_ptr) cinfo)->ac_huff_tbl_ptrs; - } else { - if (isDC) - htblptr = ((j_compress_ptr) cinfo)->dc_huff_tbl_ptrs; - else - htblptr = ((j_compress_ptr) cinfo)->ac_huff_tbl_ptrs; - } - - switch (tblno) { - case 0: - if (isDC) { - bits = bits_dc_luminance; - val = val_dc_luminance; - } else { - bits = bits_ac_luminance; - val = val_ac_luminance; - } - break; - case 1: - if (isDC) { - bits = bits_dc_chrominance; - val = val_dc_chrominance; - } else { - bits = bits_ac_chrominance; - val = val_ac_chrominance; - } - break; - default: - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); - return NULL; /* avoid compiler warnings for uninitialized variables */ - } - - if (htblptr[tblno] == NULL) - htblptr[tblno] = jpeg_alloc_huff_table(cinfo); - - htbl = htblptr[tblno]; - - /* Copy the number-of-symbols-of-each-code-length counts */ - MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits)); - - /* Validate the counts. We do this here mainly so we can copy the right - * number of symbols from the val[] array, without risking marching off - * the end of memory. jxhuff.c will do a more thorough test later. - */ - nsymbols = 0; - for (len = 1; len <= 16; len++) - nsymbols += bits[len]; - if (nsymbols > 256) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - - if (nsymbols > 0) - MEMCOPY(htbl->huffval, val, nsymbols * SIZEOF(UINT8)); - - /* Initialize sent_table FALSE so table will be written to JPEG file. */ - htbl->sent_table = FALSE; - - return htbl; -} diff --git a/thirdparty/jpeg-9e/jconfig.bcc b/thirdparty/jpeg-9e/jconfig.bcc deleted file mode 100644 index e4da3d7..0000000 --- a/thirdparty/jpeg-9e/jconfig.bcc +++ /dev/null @@ -1,48 +0,0 @@ -/* jconfig.bcc --- jconfig.h for Borland C (Turbo C) on MS-DOS or OS/2. */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#ifdef __MSDOS__ -#define NEED_FAR_POINTERS /* for small or medium memory model */ -#endif -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN /* this assumes you have -w-stu in CFLAGS */ - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#ifdef __MSDOS__ -#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ -#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ -#define USE_FMEM /* Borland has _fmemcpy() and _fmemset() */ -#endif - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE -#define USE_SETMODE /* Borland has setmode() */ -#ifdef __MSDOS__ -#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ -#endif -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.cfg b/thirdparty/jpeg-9e/jconfig.cfg deleted file mode 100644 index c4548fc..0000000 --- a/thirdparty/jpeg-9e/jconfig.cfg +++ /dev/null @@ -1,59 +0,0 @@ -/* jconfig.cfg --- source file edited by configure script */ -/* see jconfig.txt for explanations */ - -#undef HAVE_PROTOTYPES -#undef HAVE_UNSIGNED_CHAR -#undef HAVE_UNSIGNED_SHORT -#undef void -#undef const -#undef CHAR_IS_UNSIGNED -#undef HAVE_STDDEF_H -#undef HAVE_STDLIB_H -#undef HAVE_LOCALE_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -/* Define this if you get warnings about undefined structures. */ -#undef INCOMPLETE_TYPES_BROKEN - -/* Define "boolean" as unsigned char, not enum, on Windows systems. */ -#ifdef _WIN32 -#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -typedef unsigned char boolean; -#endif -#ifndef FALSE /* in case these macros already exist */ -#define FALSE 0 /* values of boolean */ -#endif -#ifndef TRUE -#define TRUE 1 -#endif -#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -#endif - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED -#undef INLINE -/* These are for configuring the JPEG memory manager. */ -#undef DEFAULT_MAX_MEM -#undef NO_MKTEMP - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#undef TWO_FILE_COMMANDLINE -#undef NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE - -/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ -#undef PROGRESS_REPORT - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.dj b/thirdparty/jpeg-9e/jconfig.dj deleted file mode 100644 index a0d4092..0000000 --- a/thirdparty/jpeg-9e/jconfig.dj +++ /dev/null @@ -1,38 +0,0 @@ -/* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS /* DJGPP uses flat 32-bit addressing */ -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#undef TWO_FILE_COMMANDLINE /* optional */ -#define USE_SETMODE /* Needed to make one-file style work in DJGPP */ -#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.h b/thirdparty/jpeg-9e/jconfig.h deleted file mode 100644 index 2d05a3b..0000000 --- a/thirdparty/jpeg-9e/jconfig.h +++ /dev/null @@ -1,60 +0,0 @@ -/* jconfig.h. Generated from jconfig.cfg by configure. */ -/* jconfig.cfg --- source file edited by configure script */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES 1 -#define HAVE_UNSIGNED_CHAR 1 -#define HAVE_UNSIGNED_SHORT 1 -/* #undef void */ -/* #undef const */ -/* #undef CHAR_IS_UNSIGNED */ -#define HAVE_STDDEF_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_LOCALE_H 1 -/* #undef NEED_BSD_STRINGS */ -/* #undef NEED_SYS_TYPES_H */ -/* #undef NEED_FAR_POINTERS */ -/* #undef NEED_SHORT_EXTERNAL_NAMES */ -/* Define this if you get warnings about undefined structures. */ -/* #undef INCOMPLETE_TYPES_BROKEN */ - -/* Define "boolean" as unsigned char, not enum, on Windows systems. */ -#ifdef _WIN32 -#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -typedef unsigned char boolean; -#endif -#ifndef FALSE /* in case these macros already exist */ -#define FALSE 0 /* values of boolean */ -#endif -#ifndef TRUE -#define TRUE 1 -#endif -#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -#endif - -#ifdef JPEG_INTERNALS - -/* #undef RIGHT_SHIFT_IS_UNSIGNED */ -#define INLINE __inline__ -/* These are for configuring the JPEG memory manager. */ -/* #undef DEFAULT_MAX_MEM */ -/* #undef NO_MKTEMP */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -/* #undef RLE_SUPPORTED */ -#define TARGA_SUPPORTED /* Targa image file format */ - -/* #undef TWO_FILE_COMMANDLINE */ -/* #undef NEED_SIGNAL_CATCHER */ -/* #undef DONT_USE_B_MODE */ - -/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ -/* #undef PROGRESS_REPORT */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.mac b/thirdparty/jpeg-9e/jconfig.mac deleted file mode 100644 index 70ed66c..0000000 --- a/thirdparty/jpeg-9e/jconfig.mac +++ /dev/null @@ -1,43 +0,0 @@ -/* jconfig.mac --- jconfig.h for CodeWarrior on Apple Macintosh */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#define USE_MAC_MEMMGR /* Define this if you use jmemmac.c */ - -#define ALIGN_TYPE long /* Needed for 680x0 Macs */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define USE_CCOMMAND /* Command line reader for Macintosh */ -#define TWO_FILE_COMMANDLINE /* Binary I/O thru stdin/stdout doesn't work */ - -#undef NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.manx b/thirdparty/jpeg-9e/jconfig.manx deleted file mode 100644 index cd529d7..0000000 --- a/thirdparty/jpeg-9e/jconfig.manx +++ /dev/null @@ -1,43 +0,0 @@ -/* jconfig.manx --- jconfig.h for Amiga systems using Manx Aztec C ver 5.x. */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ - -#define SHORTxSHORT_32 /* produces better DCT code with Aztec C */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE -#define NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#define signal_catcher _abort /* hack for Aztec C naming requirements */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.mc6 b/thirdparty/jpeg-9e/jconfig.mc6 deleted file mode 100644 index 6b05e81..0000000 --- a/thirdparty/jpeg-9e/jconfig.mc6 +++ /dev/null @@ -1,52 +0,0 @@ -/* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#define NEED_FAR_POINTERS /* for small or medium memory model */ -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ - -#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ - -#define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */ - -#define NEED_FHEAPMIN /* far heap management routines are broken */ - -#define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */ -/* Note: the above define is known to improve the code with Microsoft C 6.00A. - * I do not know whether it is good for later compiler versions. - * Please report any info on this point to jpeg-info@jpegclub.org. - */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE -#define USE_SETMODE /* Microsoft has setmode() */ -#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.sas b/thirdparty/jpeg-9e/jconfig.sas deleted file mode 100644 index b8a1819..0000000 --- a/thirdparty/jpeg-9e/jconfig.sas +++ /dev/null @@ -1,43 +0,0 @@ -/* jconfig.sas --- jconfig.h for Amiga systems using SAS C 6.0 and up. */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ - -#define NO_MKTEMP /* SAS C doesn't have mktemp() */ - -#define SHORTxSHORT_32 /* produces better DCT code with SAS C */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE -#define NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.st b/thirdparty/jpeg-9e/jconfig.st deleted file mode 100644 index 5afa0b6..0000000 --- a/thirdparty/jpeg-9e/jconfig.st +++ /dev/null @@ -1,42 +0,0 @@ -/* jconfig.st --- jconfig.h for Atari ST/STE/TT using Pure C or Turbo C. */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -#define INCOMPLETE_TYPES_BROKEN /* suppress undefined-structure warnings */ - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#define ALIGN_TYPE long /* apparently double is a weird size? */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE /* optional -- undef if you like Unix style */ -/* Note: if you undef TWO_FILE_COMMANDLINE, you may need to define - * USE_SETMODE. Some Atari compilers require it, some do not. - */ -#define NEED_SIGNAL_CATCHER /* needed if you use jmemname.c */ -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.txt b/thirdparty/jpeg-9e/jconfig.txt deleted file mode 100644 index d1710ae..0000000 --- a/thirdparty/jpeg-9e/jconfig.txt +++ /dev/null @@ -1,171 +0,0 @@ -/* - * jconfig.txt - * - * Copyright (C) 1991-1994, Thomas G. Lane. - * Modified 2009-2013 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file documents the configuration options that are required to - * customize the JPEG software for a particular system. - * - * The actual configuration options for a particular installation are stored - * in jconfig.h. On many machines, jconfig.h can be generated automatically - * or copied from one of the "canned" jconfig files that we supply. But if - * you need to generate a jconfig.h file by hand, this file tells you how. - * - * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING. - * EDIT A COPY NAMED JCONFIG.H. - */ - - -/* - * These symbols indicate the properties of your machine or compiler. - * #define the symbol if yes, #undef it if no. - */ - -/* Does your compiler support function prototypes? - * (If not, you also need to use ansi2knr, see install.txt) - */ -#define HAVE_PROTOTYPES - -/* Does your compiler support the declaration "unsigned char" ? - * How about "unsigned short" ? - */ -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT - -/* Define "void" as "char" if your compiler doesn't know about type void. - * NOTE: be sure to define void such that "void *" represents the most general - * pointer type, e.g., that returned by malloc(). - */ -/* #define void char */ - -/* Define "const" as empty if your compiler doesn't know the "const" keyword. - */ -/* #define const */ - -/* Define this if an ordinary "char" type is unsigned. - * If you're not sure, leaving it undefined will work at some cost in speed. - * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal. - */ -#undef CHAR_IS_UNSIGNED - -/* Define this if your system has an ANSI-conforming file. - */ -#define HAVE_STDDEF_H - -/* Define this if your system has an ANSI-conforming file. - */ -#define HAVE_STDLIB_H - -/* Define this if your system does not have an ANSI/SysV , - * but does have a BSD-style . - */ -#undef NEED_BSD_STRINGS - -/* Define this if your system does not provide typedef size_t in any of the - * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in - * instead. - */ -#undef NEED_SYS_TYPES_H - -/* For 80x86 machines, you need to define NEED_FAR_POINTERS, - * unless you are using a large-data memory model or 80386 flat-memory mode. - * On less brain-damaged CPUs this symbol must not be defined. - * (Defining this symbol causes large data structures to be referenced through - * "far" pointers and to be allocated with a special version of malloc.) - */ -#undef NEED_FAR_POINTERS - -/* Define this if your linker needs global names to be unique in less - * than the first 15 characters. - */ -#undef NEED_SHORT_EXTERNAL_NAMES - -/* Although a real ANSI C compiler can deal perfectly well with pointers to - * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI - * and pseudo-ANSI compilers get confused. To keep one of these bozos happy, - * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you - * actually get "missing structure definition" warnings or errors while - * compiling the JPEG code. - */ -#undef INCOMPLETE_TYPES_BROKEN - -/* Define "boolean" as unsigned char, not enum, on Windows systems. - */ -#ifdef _WIN32 -#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -typedef unsigned char boolean; -#endif -#ifndef FALSE /* in case these macros already exist */ -#define FALSE 0 /* values of boolean */ -#endif -#ifndef TRUE -#define TRUE 1 -#endif -#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -#endif - - -/* - * The following options affect code selection within the JPEG library, - * but they don't need to be visible to applications using the library. - * To minimize application namespace pollution, the symbols won't be - * defined unless JPEG_INTERNALS has been defined. - */ - -#ifdef JPEG_INTERNALS - -/* Define this if your compiler implements ">>" on signed values as a logical - * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift, - * which is the normal and rational definition. - */ -#undef RIGHT_SHIFT_IS_UNSIGNED - - -#endif /* JPEG_INTERNALS */ - - -/* - * The remaining options do not affect the JPEG library proper, - * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c). - * Other applications can ignore these. - */ - -#ifdef JPEG_CJPEG_DJPEG - -/* These defines indicate which image (non-JPEG) file formats are allowed. */ - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -/* Define this if you want to name both input and output files on the command - * line, rather than using stdout and optionally stdin. You MUST do this if - * your system can't cope with binary I/O to stdin/stdout. See comments at - * head of cjpeg.c or djpeg.c. - */ -#undef TWO_FILE_COMMANDLINE - -/* Define this if your system needs explicit cleanup of temporary files. - * This is crucial under MS-DOS, where the temporary "files" may be areas - * of extended memory; on most other systems it's not as important. - */ -#undef NEED_SIGNAL_CATCHER - -/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb"). - * This is necessary on systems that distinguish text files from binary files, - * and is harmless on most systems that don't. If you have one of the rare - * systems that complains about the "b" spec, define this symbol. - */ -#undef DONT_USE_B_MODE - -/* Define this if you want percent-done progress reports from cjpeg/djpeg. - */ -#undef PROGRESS_REPORT - - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.vc b/thirdparty/jpeg-9e/jconfig.vc deleted file mode 100644 index e9d33e5..0000000 --- a/thirdparty/jpeg-9e/jconfig.vc +++ /dev/null @@ -1,52 +0,0 @@ -/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 9x or NT. */ -/* This file also works for Borland C++ 32-bit (bcc32) on Windows 9x or NT. */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -/* Define "boolean" as unsigned char, not enum, per Windows custom */ -#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -typedef unsigned char boolean; -#endif -#ifndef FALSE /* in case these macros already exist */ -#define FALSE 0 /* values of boolean */ -#endif -#ifndef TRUE -#define TRUE 1 -#endif -#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ - - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE /* optional */ -#define USE_SETMODE /* Microsoft has setmode() */ -#undef NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.vms b/thirdparty/jpeg-9e/jconfig.vms deleted file mode 100644 index 8337b0b..0000000 --- a/thirdparty/jpeg-9e/jconfig.vms +++ /dev/null @@ -1,37 +0,0 @@ -/* jconfig.vms --- jconfig.h for use on Digital VMS. */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE /* Needed on VMS */ -#undef NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jconfig.wat b/thirdparty/jpeg-9e/jconfig.wat deleted file mode 100644 index 190cc75..0000000 --- a/thirdparty/jpeg-9e/jconfig.wat +++ /dev/null @@ -1,38 +0,0 @@ -/* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */ -/* see jconfig.txt for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#define CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS /* Watcom uses flat 32-bit addressing */ -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#undef TWO_FILE_COMMANDLINE /* optional */ -#define USE_SETMODE /* Needed to make one-file style work in Watcom */ -#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/thirdparty/jpeg-9e/jcparam.c b/thirdparty/jpeg-9e/jcparam.c deleted file mode 100644 index 261ae86..0000000 --- a/thirdparty/jpeg-9e/jcparam.c +++ /dev/null @@ -1,591 +0,0 @@ -/* - * jcparam.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2003-2022 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains optional default-setting code for the JPEG compressor. - * Applications do not have to use this file, but those that don't use it - * must know a lot more about the innards of the JPEG code. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Quantization table setup routines - */ - -GLOBAL(void) -jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, - const unsigned int *basic_table, - int scale_factor, boolean force_baseline) -/* Define a quantization table equal to the basic_table times - * a scale factor (given as a percentage). - * If force_baseline is TRUE, the computed quantization table entries - * are limited to 1..255 for JPEG baseline compatibility. - */ -{ - JQUANT_TBL ** qtblptr; - int i; - long temp; - - /* Safety check to ensure start_compress not called yet. */ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - if (which_tbl < 0 || which_tbl >= NUM_QUANT_TBLS) - ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl); - - qtblptr = & cinfo->quant_tbl_ptrs[which_tbl]; - - if (*qtblptr == NULL) - *qtblptr = jpeg_alloc_quant_table((j_common_ptr) cinfo); - - for (i = 0; i < DCTSIZE2; i++) { - temp = ((long) basic_table[i] * scale_factor + 50L) / 100L; - /* limit the values to the valid range */ - if (temp <= 0L) temp = 1L; - if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */ - if (force_baseline && temp > 255L) - temp = 255L; /* limit to baseline range if requested */ - (*qtblptr)->quantval[i] = (UINT16) temp; - } - - /* Initialize sent_table FALSE so table will be written to JPEG file. */ - (*qtblptr)->sent_table = FALSE; -} - - -/* These are the sample quantization tables given in JPEG spec section K.1. - * NOTE: chrominance DC value is changed from 17 to 16 for lossless support. - * The spec says that the values given produce "good" quality, - * and when divided by 2, "very good" quality. - */ -static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = { - 16, 11, 10, 16, 24, 40, 51, 61, - 12, 12, 14, 19, 26, 58, 60, 55, - 14, 13, 16, 24, 40, 57, 69, 56, - 14, 17, 22, 29, 51, 87, 80, 62, - 18, 22, 37, 56, 68, 109, 103, 77, - 24, 35, 55, 64, 81, 104, 113, 92, - 49, 64, 78, 87, 103, 121, 120, 101, - 72, 92, 95, 98, 112, 100, 103, 99 -}; -static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = { - 16, 18, 24, 47, 99, 99, 99, 99, - 18, 21, 26, 66, 99, 99, 99, 99, - 24, 26, 56, 99, 99, 99, 99, 99, - 47, 66, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 -}; - - -GLOBAL(void) -jpeg_default_qtables (j_compress_ptr cinfo, boolean force_baseline) -/* Set or change the 'quality' (quantization) setting, using default tables - * and straight percentage-scaling quality scales. - * This entry point allows different scalings for luminance and chrominance. - */ -{ - /* Set up two quantization tables using the specified scaling */ - jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl, - cinfo->q_scale_factor[0], force_baseline); - jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl, - cinfo->q_scale_factor[1], force_baseline); -} - - -GLOBAL(void) -jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, - boolean force_baseline) -/* Set or change the 'quality' (quantization) setting, using default tables - * and a straight percentage-scaling quality scale. In most cases it's better - * to use jpeg_set_quality (below); this entry point is provided for - * applications that insist on a linear percentage scaling. - */ -{ - /* Set up two quantization tables using the specified scaling */ - jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl, - scale_factor, force_baseline); - jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl, - scale_factor, force_baseline); -} - - -GLOBAL(int) -jpeg_quality_scaling (int quality) -/* Convert a user-specified quality rating to a percentage scaling factor - * for an underlying quantization table, using our recommended scaling curve. - * The input 'quality' factor should be 0 (terrible) to 100 (very good). - */ -{ - /* Safety limit on quality factor. Convert 0 to 1 to avoid zero divide. */ - if (quality <= 0) quality = 1; - if (quality > 100) quality = 100; - - /* The basic table is used as-is (scaling 100) for a quality of 50. - * Qualities 50..100 are converted to scaling percentage 200 - 2*Q; - * note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table - * to make all the table entries 1 (hence, minimum quantization loss). - * Qualities 1..50 are converted to scaling percentage 5000/Q. - */ - if (quality < 50) - quality = 5000 / quality; - else - quality = 200 - quality*2; - - return quality; -} - - -GLOBAL(void) -jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline) -/* Set or change the 'quality' (quantization) setting, using default tables. - * This is the standard quality-adjusting entry point for typical user - * interfaces; only those who want detailed control over quantization tables - * would use the preceding routines directly. - */ -{ - /* Convert user 0-100 rating to percentage scaling */ - quality = jpeg_quality_scaling(quality); - - /* Set up standard quality tables */ - jpeg_set_linear_quality(cinfo, quality, force_baseline); -} - - -/* - * Reset standard Huffman tables - */ - -LOCAL(void) -std_huff_tables (j_compress_ptr cinfo) -{ - if (cinfo->dc_huff_tbl_ptrs[0] != NULL) - (void) jpeg_std_huff_table((j_common_ptr) cinfo, TRUE, 0); - - if (cinfo->ac_huff_tbl_ptrs[0] != NULL) - (void) jpeg_std_huff_table((j_common_ptr) cinfo, FALSE, 0); - - if (cinfo->dc_huff_tbl_ptrs[1] != NULL) - (void) jpeg_std_huff_table((j_common_ptr) cinfo, TRUE, 1); - - if (cinfo->ac_huff_tbl_ptrs[1] != NULL) - (void) jpeg_std_huff_table((j_common_ptr) cinfo, FALSE, 1); -} - - -/* - * Default parameter setup for compression. - * - * Applications that don't choose to use this routine must do their - * own setup of all these parameters. Alternately, you can call this - * to establish defaults and then alter parameters selectively. This - * is the recommended approach since, if we add any new parameters, - * your code will still work (they'll be set to reasonable defaults). - */ - -GLOBAL(void) -jpeg_set_defaults (j_compress_ptr cinfo) -{ - int i; - - /* Safety check to ensure start_compress not called yet. */ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - /* Allocate comp_info array large enough for maximum component count. - * Array is made permanent in case application wants to compress - * multiple images at same param settings. - */ - if (cinfo->comp_info == NULL) - cinfo->comp_info = (jpeg_component_info *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - MAX_COMPONENTS * SIZEOF(jpeg_component_info)); - - /* Initialize everything not dependent on the color space */ - - cinfo->scale_num = 1; /* 1:1 scaling */ - cinfo->scale_denom = 1; - cinfo->data_precision = BITS_IN_JSAMPLE; - /* Set up two quantization tables using default quality of 75 */ - jpeg_set_quality(cinfo, 75, TRUE); - /* Reset standard Huffman tables */ - std_huff_tables(cinfo); - - /* Initialize default arithmetic coding conditioning */ - for (i = 0; i < NUM_ARITH_TBLS; i++) { - cinfo->arith_dc_L[i] = 0; - cinfo->arith_dc_U[i] = 1; - cinfo->arith_ac_K[i] = 5; - } - - /* Default is no multiple-scan output */ - cinfo->scan_info = NULL; - cinfo->num_scans = 0; - - /* Expect normal source image, not raw downsampled data */ - cinfo->raw_data_in = FALSE; - - /* The standard Huffman tables are only valid for 8-bit data precision. - * If the precision is higher, use arithmetic coding. - * (Alternatively, using Huffman coding would be possible with forcing - * optimization on so that usable tables will be computed, or by - * supplying default tables that are valid for the desired precision.) - * Otherwise, use Huffman coding by default. - */ - cinfo->arith_code = cinfo->data_precision > 8 ? TRUE : FALSE; - - /* By default, don't do extra passes to optimize entropy coding */ - cinfo->optimize_coding = FALSE; - - /* By default, use the simpler non-cosited sampling alignment */ - cinfo->CCIR601_sampling = FALSE; - - /* By default, apply fancy downsampling */ - cinfo->do_fancy_downsampling = TRUE; - - /* No input smoothing */ - cinfo->smoothing_factor = 0; - - /* DCT algorithm preference */ - cinfo->dct_method = JDCT_DEFAULT; - - /* No restart markers */ - cinfo->restart_interval = 0; - cinfo->restart_in_rows = 0; - - /* Fill in default JFIF marker parameters. Note that whether the marker - * will actually be written is determined by jpeg_set_colorspace. - * - * By default, the library emits JFIF version code 1.01. - * An application that wants to emit JFIF 1.02 extension markers should set - * JFIF_minor_version to 2. We could probably get away with just defaulting - * to 1.02, but there may still be some decoders in use that will complain - * about that; saying 1.01 should minimize compatibility problems. - * - * For wide gamut colorspaces (BG_RGB and BG_YCC), the major version will be - * overridden by jpeg_set_colorspace and set to 2. - */ - cinfo->JFIF_major_version = 1; /* Default JFIF version = 1.01 */ - cinfo->JFIF_minor_version = 1; - cinfo->density_unit = 0; /* Pixel size is unknown by default */ - cinfo->X_density = 1; /* Pixel aspect ratio is square by default */ - cinfo->Y_density = 1; - - /* No color transform */ - cinfo->color_transform = JCT_NONE; - - /* Choose JPEG colorspace based on input space, set defaults accordingly */ - - jpeg_default_colorspace(cinfo); -} - - -/* - * Select an appropriate JPEG colorspace for in_color_space. - */ - -GLOBAL(void) -jpeg_default_colorspace (j_compress_ptr cinfo) -{ - switch (cinfo->in_color_space) { - case JCS_UNKNOWN: - jpeg_set_colorspace(cinfo, JCS_UNKNOWN); - break; - case JCS_GRAYSCALE: - jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); - break; - case JCS_RGB: - jpeg_set_colorspace(cinfo, JCS_YCbCr); - break; - case JCS_YCbCr: - jpeg_set_colorspace(cinfo, JCS_YCbCr); - break; - case JCS_CMYK: - jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */ - break; - case JCS_YCCK: - jpeg_set_colorspace(cinfo, JCS_YCCK); - break; - case JCS_BG_RGB: - /* No translation for now -- conversion to BG_YCC not yet supportet */ - jpeg_set_colorspace(cinfo, JCS_BG_RGB); - break; - case JCS_BG_YCC: - jpeg_set_colorspace(cinfo, JCS_BG_YCC); - break; - default: - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - } -} - - -/* - * Set the JPEG colorspace, and choose colorspace-dependent default values. - */ - -GLOBAL(void) -jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) -{ - jpeg_component_info * compptr; - int ci; - -#define SET_COMP(index,id,hsamp,vsamp,quant,dctbl,actbl) \ - (compptr = &cinfo->comp_info[index], \ - compptr->component_id = (id), \ - compptr->h_samp_factor = (hsamp), \ - compptr->v_samp_factor = (vsamp), \ - compptr->quant_tbl_no = (quant), \ - compptr->dc_tbl_no = (dctbl), \ - compptr->ac_tbl_no = (actbl) ) - - /* Safety check to ensure start_compress not called yet. */ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - /* For all colorspaces, we use Q and Huff tables 0 for luminance components, - * tables 1 for chrominance components. - */ - - cinfo->jpeg_color_space = colorspace; - - cinfo->write_JFIF_header = FALSE; /* No marker for non-JFIF colorspaces */ - cinfo->write_Adobe_marker = FALSE; /* write no Adobe marker by default */ - - switch (colorspace) { - case JCS_UNKNOWN: - cinfo->num_components = cinfo->input_components; - if (cinfo->num_components < 1 || cinfo->num_components > MAX_COMPONENTS) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, - MAX_COMPONENTS); - for (ci = 0; ci < cinfo->num_components; ci++) { - SET_COMP(ci, ci, 1,1, 0, 0,0); - } - break; - case JCS_GRAYSCALE: - cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ - cinfo->num_components = 1; - /* JFIF specifies component ID 1 */ - SET_COMP(0, 0x01, 1,1, 0, 0,0); - break; - case JCS_RGB: - cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */ - cinfo->num_components = 3; - SET_COMP(0, 0x52 /* 'R' */, 1,1, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0); - SET_COMP(1, 0x47 /* 'G' */, 1,1, 0, 0,0); - SET_COMP(2, 0x42 /* 'B' */, 1,1, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0); - break; - case JCS_YCbCr: - cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ - cinfo->num_components = 3; - /* JFIF specifies component IDs 1,2,3 */ - /* We default to 2x2 subsamples of chrominance */ - SET_COMP(0, 0x01, 2,2, 0, 0,0); - SET_COMP(1, 0x02, 1,1, 1, 1,1); - SET_COMP(2, 0x03, 1,1, 1, 1,1); - break; - case JCS_CMYK: - cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag CMYK */ - cinfo->num_components = 4; - SET_COMP(0, 0x43 /* 'C' */, 1,1, 0, 0,0); - SET_COMP(1, 0x4D /* 'M' */, 1,1, 0, 0,0); - SET_COMP(2, 0x59 /* 'Y' */, 1,1, 0, 0,0); - SET_COMP(3, 0x4B /* 'K' */, 1,1, 0, 0,0); - break; - case JCS_YCCK: - cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag YCCK */ - cinfo->num_components = 4; - SET_COMP(0, 0x01, 2,2, 0, 0,0); - SET_COMP(1, 0x02, 1,1, 1, 1,1); - SET_COMP(2, 0x03, 1,1, 1, 1,1); - SET_COMP(3, 0x04, 2,2, 0, 0,0); - break; - case JCS_BG_RGB: - cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ - cinfo->JFIF_major_version = 2; /* Set JFIF major version = 2 */ - cinfo->num_components = 3; - /* Add offset 0x20 to the normal R/G/B component IDs */ - SET_COMP(0, 0x72 /* 'r' */, 1,1, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0); - SET_COMP(1, 0x67 /* 'g' */, 1,1, 0, 0,0); - SET_COMP(2, 0x62 /* 'b' */, 1,1, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, - cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0); - break; - case JCS_BG_YCC: - cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ - cinfo->JFIF_major_version = 2; /* Set JFIF major version = 2 */ - cinfo->num_components = 3; - /* Add offset 0x20 to the normal Cb/Cr component IDs */ - /* We default to 2x2 subsamples of chrominance */ - SET_COMP(0, 0x01, 2,2, 0, 0,0); - SET_COMP(1, 0x22, 1,1, 1, 1,1); - SET_COMP(2, 0x23, 1,1, 1, 1,1); - break; - default: - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - } -} - - -#ifdef C_PROGRESSIVE_SUPPORTED - -LOCAL(jpeg_scan_info *) -fill_a_scan (jpeg_scan_info * scanptr, int ci, - int Ss, int Se, int Ah, int Al) -/* Support routine: generate one scan for specified component */ -{ - scanptr->comps_in_scan = 1; - scanptr->component_index[0] = ci; - scanptr->Ss = Ss; - scanptr->Se = Se; - scanptr->Ah = Ah; - scanptr->Al = Al; - scanptr++; - return scanptr; -} - -LOCAL(jpeg_scan_info *) -fill_scans (jpeg_scan_info * scanptr, int ncomps, - int Ss, int Se, int Ah, int Al) -/* Support routine: generate one scan for each component */ -{ - int ci; - - for (ci = 0; ci < ncomps; ci++) { - scanptr->comps_in_scan = 1; - scanptr->component_index[0] = ci; - scanptr->Ss = Ss; - scanptr->Se = Se; - scanptr->Ah = Ah; - scanptr->Al = Al; - scanptr++; - } - return scanptr; -} - -LOCAL(jpeg_scan_info *) -fill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al) -/* Support routine: generate interleaved DC scan if possible, else N scans */ -{ - int ci; - - if (ncomps <= MAX_COMPS_IN_SCAN) { - /* Single interleaved DC scan */ - scanptr->comps_in_scan = ncomps; - for (ci = 0; ci < ncomps; ci++) - scanptr->component_index[ci] = ci; - scanptr->Ss = scanptr->Se = 0; - scanptr->Ah = Ah; - scanptr->Al = Al; - scanptr++; - } else { - /* Noninterleaved DC scan for each component */ - scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al); - } - return scanptr; -} - - -/* - * Create a recommended progressive-JPEG script. - * cinfo->num_components and cinfo->jpeg_color_space must be correct. - */ - -GLOBAL(void) -jpeg_simple_progression (j_compress_ptr cinfo) -{ - int ncomps = cinfo->num_components; - int nscans; - jpeg_scan_info * scanptr; - - /* Safety check to ensure start_compress not called yet. */ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - /* Figure space needed for script. Calculation must match code below! */ - if (ncomps == 3 && - (cinfo->jpeg_color_space == JCS_YCbCr || - cinfo->jpeg_color_space == JCS_BG_YCC)) { - /* Custom script for YCC color images. */ - nscans = 10; - } else { - /* All-purpose script for other color spaces. */ - if (ncomps > MAX_COMPS_IN_SCAN) - nscans = 6 * ncomps; /* 2 DC + 4 AC scans per component */ - else - nscans = 2 + 4 * ncomps; /* 2 DC scans; 4 AC scans per component */ - } - - /* Allocate space for script. - * We need to put it in the permanent pool in case the application performs - * multiple compressions without changing the settings. To avoid a memory - * leak if jpeg_simple_progression is called repeatedly for the same JPEG - * object, we try to re-use previously allocated space, and we allocate - * enough space to handle YCC even if initially asked for grayscale. - */ - if (cinfo->script_space == NULL || cinfo->script_space_size < nscans) { - cinfo->script_space_size = MAX(nscans, 10); - cinfo->script_space = (jpeg_scan_info *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - cinfo->script_space_size * SIZEOF(jpeg_scan_info)); - } - scanptr = cinfo->script_space; - cinfo->scan_info = scanptr; - cinfo->num_scans = nscans; - - if (ncomps == 3 && - (cinfo->jpeg_color_space == JCS_YCbCr || - cinfo->jpeg_color_space == JCS_BG_YCC)) { - /* Custom script for YCC color images. */ - /* Initial DC scan */ - scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); - /* Initial AC scan: get some luma data out in a hurry */ - scanptr = fill_a_scan(scanptr, 0, 1, 5, 0, 2); - /* Chroma data is too small to be worth expending many scans on */ - scanptr = fill_a_scan(scanptr, 2, 1, 63, 0, 1); - scanptr = fill_a_scan(scanptr, 1, 1, 63, 0, 1); - /* Complete spectral selection for luma AC */ - scanptr = fill_a_scan(scanptr, 0, 6, 63, 0, 2); - /* Refine next bit of luma AC */ - scanptr = fill_a_scan(scanptr, 0, 1, 63, 2, 1); - /* Finish DC successive approximation */ - scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); - /* Finish AC successive approximation */ - scanptr = fill_a_scan(scanptr, 2, 1, 63, 1, 0); - scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0); - /* Luma bottom bit comes last since it's usually largest scan */ - scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0); - } else { - /* All-purpose script for other color spaces. */ - /* Successive approximation first pass */ - scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); - scanptr = fill_scans(scanptr, ncomps, 1, 5, 0, 2); - scanptr = fill_scans(scanptr, ncomps, 6, 63, 0, 2); - /* Successive approximation second pass */ - scanptr = fill_scans(scanptr, ncomps, 1, 63, 2, 1); - /* Successive approximation final pass */ - scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); - scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0); - } -} - -#endif /* C_PROGRESSIVE_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/jcprepct.c b/thirdparty/jpeg-9e/jcprepct.c deleted file mode 100644 index 586964b..0000000 --- a/thirdparty/jpeg-9e/jcprepct.c +++ /dev/null @@ -1,358 +0,0 @@ -/* - * jcprepct.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2003-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the compression preprocessing controller. - * This controller manages the color conversion, downsampling, - * and edge expansion steps. - * - * Most of the complexity here is associated with buffering input rows - * as required by the downsampler. See the comments at the head of - * jcsample.c for the downsampler's needs. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* At present, jcsample.c can request context rows only for smoothing. - * In the future, we might also need context rows for CCIR601 sampling - * or other more-complex downsampling procedures. The code to support - * context rows should be compiled only if needed. - */ -#ifdef INPUT_SMOOTHING_SUPPORTED -#define CONTEXT_ROWS_SUPPORTED -#endif - - -/* - * For the simple (no-context-row) case, we just need to buffer one - * row group's worth of pixels for the downsampling step. At the bottom of - * the image, we pad to a full row group by replicating the last pixel row. - * The downsampler's last output row is then replicated if needed to pad - * out to a full iMCU row. - * - * When providing context rows, we must buffer three row groups' worth of - * pixels. Three row groups are physically allocated, but the row pointer - * arrays are made five row groups high, with the extra pointers above and - * below "wrapping around" to point to the last and first real row groups. - * This allows the downsampler to access the proper context rows. - * At the top and bottom of the image, we create dummy context rows by - * copying the first or last real pixel row. This copying could be avoided - * by pointer hacking as is done in jdmainct.c, but it doesn't seem worth the - * trouble on the compression side. - */ - - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_c_prep_controller pub; /* public fields */ - - /* Downsampling input buffer. This buffer holds color-converted data - * until we have enough to do a downsample step. - */ - JSAMPARRAY color_buf[MAX_COMPONENTS]; - - JDIMENSION rows_to_go; /* counts rows remaining in source image */ - int next_buf_row; /* index of next row to store in color_buf */ - -#ifdef CONTEXT_ROWS_SUPPORTED /* only needed for context case */ - int this_row_group; /* starting row index of group to process */ - int next_buf_stop; /* downsample when we reach this index */ -#endif -} my_prep_controller; - -typedef my_prep_controller * my_prep_ptr; - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_prep (j_compress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_prep_ptr prep = (my_prep_ptr) cinfo->prep; - - if (pass_mode != JBUF_PASS_THRU) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - - /* Initialize total-height counter for detecting bottom of image */ - prep->rows_to_go = cinfo->image_height; - /* Mark the conversion buffer empty */ - prep->next_buf_row = 0; -#ifdef CONTEXT_ROWS_SUPPORTED - /* Preset additional state variables for context mode. - * These aren't used in non-context mode, so we needn't test which mode. - */ - prep->this_row_group = 0; - /* Set next_buf_stop to stop after two row groups have been read in. */ - prep->next_buf_stop = 2 * cinfo->max_v_samp_factor; -#endif -} - - -/* - * Expand an image vertically from height input_rows to height output_rows, - * by duplicating the bottom row. - */ - -LOCAL(void) -expand_bottom_edge (JSAMPARRAY image_data, JDIMENSION num_cols, - int input_rows, int output_rows) -{ - register int row; - - for (row = input_rows; row < output_rows; row++) { - jcopy_sample_rows(image_data + input_rows - 1, - image_data + row, - 1, num_cols); - } -} - - -/* - * Process some data in the simple no-context case. - * - * Preprocessor output data is counted in "row groups". A row group - * is defined to be v_samp_factor sample rows of each component. - * Downsampling will produce this much data from each max_v_samp_factor - * input rows. - */ - -METHODDEF(void) -pre_process_data (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail, - JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, - JDIMENSION out_row_groups_avail) -{ - my_prep_ptr prep = (my_prep_ptr) cinfo->prep; - int numrows, ci; - JDIMENSION inrows; - jpeg_component_info * compptr; - - while (*in_row_ctr < in_rows_avail && - *out_row_group_ctr < out_row_groups_avail) { - /* Do color conversion to fill the conversion buffer. */ - inrows = in_rows_avail - *in_row_ctr; - numrows = cinfo->max_v_samp_factor - prep->next_buf_row; - numrows = (int) MIN((JDIMENSION) numrows, inrows); - (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, - prep->color_buf, - (JDIMENSION) prep->next_buf_row, - numrows); - *in_row_ctr += numrows; - prep->next_buf_row += numrows; - prep->rows_to_go -= numrows; - /* If at bottom of image, pad to fill the conversion buffer. */ - if (prep->rows_to_go == 0 && - prep->next_buf_row < cinfo->max_v_samp_factor) { - for (ci = 0; ci < cinfo->num_components; ci++) { - expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, - prep->next_buf_row, cinfo->max_v_samp_factor); - } - prep->next_buf_row = cinfo->max_v_samp_factor; - } - /* If we've filled the conversion buffer, empty it. */ - if (prep->next_buf_row == cinfo->max_v_samp_factor) { - (*cinfo->downsample->downsample) (cinfo, - prep->color_buf, (JDIMENSION) 0, - output_buf, *out_row_group_ctr); - prep->next_buf_row = 0; - (*out_row_group_ctr)++; - } - /* If at bottom of image, pad the output to a full iMCU height. - * Note we assume the caller is providing a one-iMCU-height output buffer! - */ - if (prep->rows_to_go == 0 && - *out_row_group_ctr < out_row_groups_avail) { - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - numrows = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / - cinfo->min_DCT_v_scaled_size; - expand_bottom_edge(output_buf[ci], - compptr->width_in_blocks * compptr->DCT_h_scaled_size, - (int) (*out_row_group_ctr * numrows), - (int) (out_row_groups_avail * numrows)); - } - *out_row_group_ctr = out_row_groups_avail; - break; /* can exit outer loop without test */ - } - } -} - - -#ifdef CONTEXT_ROWS_SUPPORTED - -/* - * Process some data in the context case. - */ - -METHODDEF(void) -pre_process_context (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail, - JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, - JDIMENSION out_row_groups_avail) -{ - my_prep_ptr prep = (my_prep_ptr) cinfo->prep; - int numrows, ci; - int buf_height = cinfo->max_v_samp_factor * 3; - JDIMENSION inrows; - - while (*out_row_group_ctr < out_row_groups_avail) { - if (*in_row_ctr < in_rows_avail) { - /* Do color conversion to fill the conversion buffer. */ - inrows = in_rows_avail - *in_row_ctr; - numrows = prep->next_buf_stop - prep->next_buf_row; - numrows = (int) MIN((JDIMENSION) numrows, inrows); - (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, - prep->color_buf, - (JDIMENSION) prep->next_buf_row, - numrows); - /* Pad at top of image, if first time through */ - if (prep->rows_to_go == cinfo->image_height) { - for (ci = 0; ci < cinfo->num_components; ci++) { - int row; - for (row = 1; row <= cinfo->max_v_samp_factor; row++) { - jcopy_sample_rows(prep->color_buf[ci], - prep->color_buf[ci] - row, - 1, cinfo->image_width); - } - } - } - *in_row_ctr += numrows; - prep->next_buf_row += numrows; - prep->rows_to_go -= numrows; - } else { - /* Return for more data, unless we are at the bottom of the image. */ - if (prep->rows_to_go != 0) - break; - /* When at bottom of image, pad to fill the conversion buffer. */ - if (prep->next_buf_row < prep->next_buf_stop) { - for (ci = 0; ci < cinfo->num_components; ci++) { - expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, - prep->next_buf_row, prep->next_buf_stop); - } - prep->next_buf_row = prep->next_buf_stop; - } - } - /* If we've gotten enough data, downsample a row group. */ - if (prep->next_buf_row == prep->next_buf_stop) { - (*cinfo->downsample->downsample) (cinfo, - prep->color_buf, - (JDIMENSION) prep->this_row_group, - output_buf, *out_row_group_ctr); - (*out_row_group_ctr)++; - /* Advance pointers with wraparound as necessary. */ - prep->this_row_group += cinfo->max_v_samp_factor; - if (prep->this_row_group >= buf_height) - prep->this_row_group = 0; - if (prep->next_buf_row >= buf_height) - prep->next_buf_row = 0; - prep->next_buf_stop = prep->next_buf_row + cinfo->max_v_samp_factor; - } - } -} - - -/* - * Create the wrapped-around downsampling input buffer needed for context mode. - */ - -LOCAL(void) -create_context_buffer (j_compress_ptr cinfo) -{ - my_prep_ptr prep = (my_prep_ptr) cinfo->prep; - int rgroup_height = cinfo->max_v_samp_factor; - int ci, i; - jpeg_component_info * compptr; - JSAMPARRAY true_buffer, fake_buffer; - - /* Grab enough space for fake row pointers for all the components; - * we need five row groups' worth of pointers for each component. - */ - fake_buffer = (JSAMPARRAY) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (cinfo->num_components * 5 * rgroup_height) * SIZEOF(JSAMPROW)); - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Allocate the actual buffer space (3 row groups) for this component. - * We make the buffer wide enough to allow the downsampler to edge-expand - * horizontally within the buffer, if it so chooses. - */ - true_buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) (((long) compptr->width_in_blocks * - cinfo->min_DCT_h_scaled_size * - cinfo->max_h_samp_factor) / compptr->h_samp_factor), - (JDIMENSION) (3 * rgroup_height)); - /* Copy true buffer row pointers into the middle of the fake row array */ - MEMCOPY(fake_buffer + rgroup_height, true_buffer, - 3 * rgroup_height * SIZEOF(JSAMPROW)); - /* Fill in the above and below wraparound pointers */ - for (i = 0; i < rgroup_height; i++) { - fake_buffer[i] = true_buffer[2 * rgroup_height + i]; - fake_buffer[4 * rgroup_height + i] = true_buffer[i]; - } - prep->color_buf[ci] = fake_buffer + rgroup_height; - fake_buffer += 5 * rgroup_height; /* point to space for next component */ - } -} - -#endif /* CONTEXT_ROWS_SUPPORTED */ - - -/* - * Initialize preprocessing controller. - */ - -GLOBAL(void) -jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer) -{ - my_prep_ptr prep; - int ci; - jpeg_component_info * compptr; - - if (need_full_buffer) /* safety check */ - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - - prep = (my_prep_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_prep_controller)); - cinfo->prep = &prep->pub; - prep->pub.start_pass = start_pass_prep; - - /* Allocate the color conversion buffer. - * We make the buffer wide enough to allow the downsampler to edge-expand - * horizontally within the buffer, if it so chooses. - */ - if (cinfo->downsample->need_context_rows) { - /* Set up to provide context rows */ -#ifdef CONTEXT_ROWS_SUPPORTED - prep->pub.pre_process_data = pre_process_context; - create_context_buffer(cinfo); -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else { - /* No context, just make it tall enough for one row group */ - prep->pub.pre_process_data = pre_process_data; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - prep->color_buf[ci] = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) (((long) compptr->width_in_blocks * - cinfo->min_DCT_h_scaled_size * - cinfo->max_h_samp_factor) / compptr->h_samp_factor), - (JDIMENSION) cinfo->max_v_samp_factor); - } - } -} diff --git a/thirdparty/jpeg-9e/jcsample.c b/thirdparty/jpeg-9e/jcsample.c deleted file mode 100644 index 2372c41..0000000 --- a/thirdparty/jpeg-9e/jcsample.c +++ /dev/null @@ -1,545 +0,0 @@ -/* - * jcsample.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2003-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains downsampling routines. - * - * Downsampling input data is counted in "row groups". A row group - * is defined to be max_v_samp_factor pixel rows of each component, - * from which the downsampler produces v_samp_factor sample rows. - * A single row group is processed in each call to the downsampler module. - * - * The downsampler is responsible for edge-expansion of its output data - * to fill an integral number of DCT blocks horizontally. The source buffer - * may be modified if it is helpful for this purpose (the source buffer is - * allocated wide enough to correspond to the desired output width). - * The caller (the prep controller) is responsible for vertical padding. - * - * The downsampler may request "context rows" by setting need_context_rows - * during startup. In this case, the input arrays will contain at least - * one row group's worth of pixels above and below the passed-in data; - * the caller will create dummy rows at image top and bottom by replicating - * the first or last real pixel row. - * - * An excellent reference for image resampling is - * Digital Image Warping, George Wolberg, 1990. - * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. - * - * The downsampling algorithm used here is a simple average of the source - * pixels covered by the output pixel. The hi-falutin sampling literature - * refers to this as a "box filter". In general the characteristics of a box - * filter are not very good, but for the specific cases we normally use (1:1 - * and 2:1 ratios) the box is equivalent to a "triangle filter" which is not - * nearly so bad. If you intend to use other sampling ratios, you'd be well - * advised to improve this code. - * - * A simple input-smoothing capability is provided. This is mainly intended - * for cleaning up color-dithered GIF input files (if you find it inadequate, - * we suggest using an external filtering program such as pnmconvol). When - * enabled, each input pixel P is replaced by a weighted sum of itself and its - * eight neighbors. P's weight is 1-8*SF and each neighbor's weight is SF, - * where SF = (smoothing_factor / 1024). - * Currently, smoothing is only supported for 2h2v sampling factors. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Pointer to routine to downsample a single component */ -typedef JMETHOD(void, downsample1_ptr, - (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data)); - -/* Private subobject */ - -typedef struct { - struct jpeg_downsampler pub; /* public fields */ - - /* Downsampling method pointers, one per component */ - downsample1_ptr methods[MAX_COMPONENTS]; - - /* Height of an output row group for each component. */ - int rowgroup_height[MAX_COMPONENTS]; - - /* These arrays save pixel expansion factors so that int_downsample need not - * recompute them each time. They are unused for other downsampling methods. - */ - UINT8 h_expand[MAX_COMPONENTS]; - UINT8 v_expand[MAX_COMPONENTS]; -} my_downsampler; - -typedef my_downsampler * my_downsample_ptr; - - -/* - * Initialize for a downsampling pass. - */ - -METHODDEF(void) -start_pass_downsample (j_compress_ptr cinfo) -{ - /* no work for now */ -} - - -/* - * Expand a component horizontally from width input_cols to width output_cols, - * by duplicating the rightmost samples. - */ - -LOCAL(void) -expand_right_edge (JSAMPARRAY image_data, int num_rows, - JDIMENSION input_cols, JDIMENSION output_cols) -{ - register JSAMPROW ptr; - register JSAMPLE pixval; - register int count; - int row; - int numcols = (int) (output_cols - input_cols); - - if (numcols > 0) { - for (row = 0; row < num_rows; row++) { - ptr = image_data[row] + input_cols; - pixval = ptr[-1]; /* don't need GETJSAMPLE() here */ - for (count = numcols; count > 0; count--) - *ptr++ = pixval; - } - } -} - - -/* - * Do downsampling for a whole row group (all components). - * - * In this version we simply downsample each component independently. - */ - -METHODDEF(void) -sep_downsample (j_compress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION in_row_index, - JSAMPIMAGE output_buf, JDIMENSION out_row_group_index) -{ - my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample; - int ci; - jpeg_component_info * compptr; - JSAMPARRAY in_ptr, out_ptr; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - in_ptr = input_buf[ci] + in_row_index; - out_ptr = output_buf[ci] + - (out_row_group_index * downsample->rowgroup_height[ci]); - (*downsample->methods[ci]) (cinfo, compptr, in_ptr, out_ptr); - } -} - - -/* - * Downsample pixel values of a single component. - * One row group is processed per call. - * This version handles arbitrary integral sampling ratios, without smoothing. - * Note that this version is not actually used for customary sampling ratios. - */ - -METHODDEF(void) -int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample; - int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v; - JDIMENSION outcol, outcol_h; /* outcol_h == outcol*h_expand */ - JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size; - JSAMPROW inptr, outptr; - INT32 outvalue; - - h_expand = downsample->h_expand[compptr->component_index]; - v_expand = downsample->v_expand[compptr->component_index]; - numpix = h_expand * v_expand; - numpix2 = numpix/2; - - /* Expand input data enough to let all the output samples be generated - * by the standard loop. Special-casing padded output would be more - * efficient. - */ - expand_right_edge(input_data, cinfo->max_v_samp_factor, - cinfo->image_width, output_cols * h_expand); - - inrow = outrow = 0; - while (inrow < cinfo->max_v_samp_factor) { - outptr = output_data[outrow]; - for (outcol = 0, outcol_h = 0; outcol < output_cols; - outcol++, outcol_h += h_expand) { - outvalue = 0; - for (v = 0; v < v_expand; v++) { - inptr = input_data[inrow+v] + outcol_h; - for (h = 0; h < h_expand; h++) { - outvalue += (INT32) GETJSAMPLE(*inptr++); - } - } - *outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix); - } - inrow += v_expand; - outrow++; - } -} - - -/* - * Downsample pixel values of a single component. - * This version handles the special case of a full-size component, - * without smoothing. - */ - -METHODDEF(void) -fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - /* Copy the data */ - jcopy_sample_rows(input_data, output_data, - cinfo->max_v_samp_factor, cinfo->image_width); - /* Edge-expand */ - expand_right_edge(output_data, cinfo->max_v_samp_factor, cinfo->image_width, - compptr->width_in_blocks * compptr->DCT_h_scaled_size); -} - - -/* - * Downsample pixel values of a single component. - * This version handles the common case of 2:1 horizontal and 1:1 vertical, - * without smoothing. - * - * A note about the "bias" calculations: when rounding fractional values to - * integer, we do not want to always round 0.5 up to the next integer. - * If we did that, we'd introduce a noticeable bias towards larger values. - * Instead, this code is arranged so that 0.5 will be rounded up or down at - * alternate pixel locations (a simple ordered dither pattern). - */ - -METHODDEF(void) -h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - int inrow; - JDIMENSION outcol; - JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size; - register JSAMPROW inptr, outptr; - register int bias; - - /* Expand input data enough to let all the output samples be generated - * by the standard loop. Special-casing padded output would be more - * efficient. - */ - expand_right_edge(input_data, cinfo->max_v_samp_factor, - cinfo->image_width, output_cols * 2); - - for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { - outptr = output_data[inrow]; - inptr = input_data[inrow]; - bias = 0; /* bias = 0,1,0,1,... for successive samples */ - for (outcol = 0; outcol < output_cols; outcol++) { - *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr) + GETJSAMPLE(inptr[1]) - + bias) >> 1); - bias ^= 1; /* 0=>1, 1=>0 */ - inptr += 2; - } - } -} - - -/* - * Downsample pixel values of a single component. - * This version handles the standard case of 2:1 horizontal and 2:1 vertical, - * without smoothing. - */ - -METHODDEF(void) -h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - int inrow, outrow; - JDIMENSION outcol; - JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size; - register JSAMPROW inptr0, inptr1, outptr; - register int bias; - - /* Expand input data enough to let all the output samples be generated - * by the standard loop. Special-casing padded output would be more - * efficient. - */ - expand_right_edge(input_data, cinfo->max_v_samp_factor, - cinfo->image_width, output_cols * 2); - - inrow = outrow = 0; - while (inrow < cinfo->max_v_samp_factor) { - outptr = output_data[outrow]; - inptr0 = input_data[inrow]; - inptr1 = input_data[inrow+1]; - bias = 1; /* bias = 1,2,1,2,... for successive samples */ - for (outcol = 0; outcol < output_cols; outcol++) { - *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + - GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]) - + bias) >> 2); - bias ^= 3; /* 1=>2, 2=>1 */ - inptr0 += 2; inptr1 += 2; - } - inrow += 2; - outrow++; - } -} - - -#ifdef INPUT_SMOOTHING_SUPPORTED - -/* - * Downsample pixel values of a single component. - * This version handles the standard case of 2:1 horizontal and 2:1 vertical, - * with smoothing. One row of context is required. - */ - -METHODDEF(void) -h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - int inrow, outrow; - JDIMENSION colctr; - JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size; - register JSAMPROW inptr0, inptr1, above_ptr, below_ptr, outptr; - INT32 membersum, neighsum, memberscale, neighscale; - - /* Expand input data enough to let all the output samples be generated - * by the standard loop. Special-casing padded output would be more - * efficient. - */ - expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, - cinfo->image_width, output_cols * 2); - - /* We don't bother to form the individual "smoothed" input pixel values; - * we can directly compute the output which is the average of the four - * smoothed values. Each of the four member pixels contributes a fraction - * (1-8*SF) to its own smoothed image and a fraction SF to each of the three - * other smoothed pixels, therefore a total fraction (1-5*SF)/4 to the final - * output. The four corner-adjacent neighbor pixels contribute a fraction - * SF to just one smoothed pixel, or SF/4 to the final output; while the - * eight edge-adjacent neighbors contribute SF to each of two smoothed - * pixels, or SF/2 overall. In order to use integer arithmetic, these - * factors are scaled by 2^16 = 65536. - * Also recall that SF = smoothing_factor / 1024. - */ - - memberscale = 16384 - cinfo->smoothing_factor * 80; /* scaled (1-5*SF)/4 */ - neighscale = cinfo->smoothing_factor * 16; /* scaled SF/4 */ - - inrow = outrow = 0; - while (inrow < cinfo->max_v_samp_factor) { - outptr = output_data[outrow]; - inptr0 = input_data[inrow]; - inptr1 = input_data[inrow+1]; - above_ptr = input_data[inrow-1]; - below_ptr = input_data[inrow+2]; - - /* Special case for first column: pretend column -1 is same as column 0 */ - membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + - GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); - neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + - GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + - GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[2]) + - GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[2]); - neighsum += neighsum; - neighsum += GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[2]) + - GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[2]); - membersum = membersum * memberscale + neighsum * neighscale; - *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); - inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; - - for (colctr = output_cols - 2; colctr > 0; colctr--) { - /* sum of pixels directly mapped to this output element */ - membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + - GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); - /* sum of edge-neighbor pixels */ - neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + - GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + - GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[2]) + - GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[2]); - /* The edge-neighbors count twice as much as corner-neighbors */ - neighsum += neighsum; - /* Add in the corner-neighbors */ - neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[2]) + - GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[2]); - /* form final output scaled up by 2^16 */ - membersum = membersum * memberscale + neighsum * neighscale; - /* round, descale and output it */ - *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); - inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; - } - - /* Special case for last column */ - membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + - GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); - neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + - GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + - GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[1]) + - GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[1]); - neighsum += neighsum; - neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[1]) + - GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[1]); - membersum = membersum * memberscale + neighsum * neighscale; - *outptr = (JSAMPLE) ((membersum + 32768) >> 16); - - inrow += 2; - outrow++; - } -} - - -/* - * Downsample pixel values of a single component. - * This version handles the special case of a full-size component, - * with smoothing. One row of context is required. - */ - -METHODDEF(void) -fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - int inrow; - JDIMENSION colctr; - JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size; - register JSAMPROW inptr, above_ptr, below_ptr, outptr; - INT32 membersum, neighsum, memberscale, neighscale; - int colsum, lastcolsum, nextcolsum; - - /* Expand input data enough to let all the output samples be generated - * by the standard loop. Special-casing padded output would be more - * efficient. - */ - expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, - cinfo->image_width, output_cols); - - /* Each of the eight neighbor pixels contributes a fraction SF to the - * smoothed pixel, while the main pixel contributes (1-8*SF). In order - * to use integer arithmetic, these factors are multiplied by 2^16 = 65536. - * Also recall that SF = smoothing_factor / 1024. - */ - - memberscale = 65536L - cinfo->smoothing_factor * 512L; /* scaled 1-8*SF */ - neighscale = cinfo->smoothing_factor * 64; /* scaled SF */ - - for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { - outptr = output_data[inrow]; - inptr = input_data[inrow]; - above_ptr = input_data[inrow-1]; - below_ptr = input_data[inrow+1]; - - /* Special case for first column */ - colsum = GETJSAMPLE(*above_ptr++) + GETJSAMPLE(*below_ptr++) + - GETJSAMPLE(*inptr); - membersum = GETJSAMPLE(*inptr++); - nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + - GETJSAMPLE(*inptr); - neighsum = colsum + (colsum - membersum) + nextcolsum; - membersum = membersum * memberscale + neighsum * neighscale; - *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); - lastcolsum = colsum; colsum = nextcolsum; - - for (colctr = output_cols - 2; colctr > 0; colctr--) { - membersum = GETJSAMPLE(*inptr++); - above_ptr++; below_ptr++; - nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + - GETJSAMPLE(*inptr); - neighsum = lastcolsum + (colsum - membersum) + nextcolsum; - membersum = membersum * memberscale + neighsum * neighscale; - *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); - lastcolsum = colsum; colsum = nextcolsum; - } - - /* Special case for last column */ - membersum = GETJSAMPLE(*inptr); - neighsum = lastcolsum + (colsum - membersum) + colsum; - membersum = membersum * memberscale + neighsum * neighscale; - *outptr = (JSAMPLE) ((membersum + 32768) >> 16); - - } -} - -#endif /* INPUT_SMOOTHING_SUPPORTED */ - - -/* - * Module initialization routine for downsampling. - * Note that we must select a routine for each component. - */ - -GLOBAL(void) -jinit_downsampler (j_compress_ptr cinfo) -{ - my_downsample_ptr downsample; - int ci; - jpeg_component_info * compptr; - boolean smoothok = TRUE; - int h_in_group, v_in_group, h_out_group, v_out_group; - - downsample = (my_downsample_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_downsampler)); - cinfo->downsample = &downsample->pub; - downsample->pub.start_pass = start_pass_downsample; - downsample->pub.downsample = sep_downsample; - downsample->pub.need_context_rows = FALSE; - - if (cinfo->CCIR601_sampling) - ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); - - /* Verify we can handle the sampling factors, and set up method pointers */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Compute size of an "output group" for DCT scaling. This many samples - * are to be converted from max_h_samp_factor * max_v_samp_factor pixels. - */ - h_out_group = (compptr->h_samp_factor * compptr->DCT_h_scaled_size) / - cinfo->min_DCT_h_scaled_size; - v_out_group = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / - cinfo->min_DCT_v_scaled_size; - h_in_group = cinfo->max_h_samp_factor; - v_in_group = cinfo->max_v_samp_factor; - downsample->rowgroup_height[ci] = v_out_group; /* save for use later */ - if (h_in_group == h_out_group && v_in_group == v_out_group) { -#ifdef INPUT_SMOOTHING_SUPPORTED - if (cinfo->smoothing_factor) { - downsample->methods[ci] = fullsize_smooth_downsample; - downsample->pub.need_context_rows = TRUE; - } else -#endif - downsample->methods[ci] = fullsize_downsample; - } else if (h_in_group == h_out_group * 2 && - v_in_group == v_out_group) { - smoothok = FALSE; - downsample->methods[ci] = h2v1_downsample; - } else if (h_in_group == h_out_group * 2 && - v_in_group == v_out_group * 2) { -#ifdef INPUT_SMOOTHING_SUPPORTED - if (cinfo->smoothing_factor) { - downsample->methods[ci] = h2v2_smooth_downsample; - downsample->pub.need_context_rows = TRUE; - } else -#endif - downsample->methods[ci] = h2v2_downsample; - } else if ((h_in_group % h_out_group) == 0 && - (v_in_group % v_out_group) == 0) { - smoothok = FALSE; - downsample->methods[ci] = int_downsample; - downsample->h_expand[ci] = (UINT8) (h_in_group / h_out_group); - downsample->v_expand[ci] = (UINT8) (v_in_group / v_out_group); - } else - ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); - } - -#ifdef INPUT_SMOOTHING_SUPPORTED - if (cinfo->smoothing_factor && !smoothok) - TRACEMS(cinfo, 0, JTRC_SMOOTH_NOTIMPL); -#endif -} diff --git a/thirdparty/jpeg-9e/jctrans.c b/thirdparty/jpeg-9e/jctrans.c deleted file mode 100644 index 261dd29..0000000 --- a/thirdparty/jpeg-9e/jctrans.c +++ /dev/null @@ -1,399 +0,0 @@ -/* - * jctrans.c - * - * Copyright (C) 1995-1998, Thomas G. Lane. - * Modified 2000-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains library routines for transcoding compression, - * that is, writing raw DCT coefficient arrays to an output JPEG file. - * The routines in jcapimin.c will also be needed by a transcoder. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Forward declarations */ -LOCAL(void) transencode_master_selection - JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); -LOCAL(void) transencode_coef_controller - JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); - - -/* - * Compression initialization for writing raw-coefficient data. - * Before calling this, all parameters and a data destination must be set up. - * Call jpeg_finish_compress() to actually write the data. - * - * The number of passed virtual arrays must match cinfo->num_components. - * Note that the virtual arrays need not be filled or even realized at - * the time write_coefficients is called; indeed, if the virtual arrays - * were requested from this compression object's memory manager, they - * typically will be realized during this routine and filled afterwards. - */ - -GLOBAL(void) -jpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays) -{ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - /* Mark all tables to be written */ - jpeg_suppress_tables(cinfo, FALSE); - /* (Re)initialize error mgr and destination modules */ - (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); - (*cinfo->dest->init_destination) (cinfo); - /* Perform master selection of active modules */ - transencode_master_selection(cinfo, coef_arrays); - /* Wait for jpeg_finish_compress() call */ - cinfo->next_scanline = 0; /* so jpeg_write_marker works */ - cinfo->global_state = CSTATE_WRCOEFS; -} - - -/* - * Initialize the compression object with default parameters, - * then copy from the source object all parameters needed for lossless - * transcoding. Parameters that can be varied without loss (such as - * scan script and Huffman optimization) are left in their default states. - */ - -GLOBAL(void) -jpeg_copy_critical_parameters (j_decompress_ptr srcinfo, - j_compress_ptr dstinfo) -{ - JQUANT_TBL ** qtblptr; - jpeg_component_info *incomp, *outcomp; - JQUANT_TBL *c_quant, *slot_quant; - int tblno, ci, coefi; - - /* Safety check to ensure start_compress not called yet. */ - if (dstinfo->global_state != CSTATE_START) - ERREXIT1(dstinfo, JERR_BAD_STATE, dstinfo->global_state); - /* Copy fundamental image dimensions */ - dstinfo->image_width = srcinfo->image_width; - dstinfo->image_height = srcinfo->image_height; - dstinfo->input_components = srcinfo->num_components; - dstinfo->in_color_space = srcinfo->jpeg_color_space; - dstinfo->jpeg_width = srcinfo->output_width; - dstinfo->jpeg_height = srcinfo->output_height; - dstinfo->min_DCT_h_scaled_size = srcinfo->min_DCT_h_scaled_size; - dstinfo->min_DCT_v_scaled_size = srcinfo->min_DCT_v_scaled_size; - /* Initialize all parameters to default values */ - jpeg_set_defaults(dstinfo); - /* jpeg_set_defaults may choose wrong colorspace, eg YCbCr if input is RGB. - * Fix it to get the right header markers for the image colorspace. - * Note: Entropy table assignment in jpeg_set_colorspace - * depends on color_transform. - * Adaption is also required for setting the appropriate - * entropy coding mode dependent on image data precision. - */ - dstinfo->color_transform = srcinfo->color_transform; - jpeg_set_colorspace(dstinfo, srcinfo->jpeg_color_space); - dstinfo->data_precision = srcinfo->data_precision; - dstinfo->arith_code = srcinfo->data_precision > 8 ? TRUE : FALSE; - dstinfo->CCIR601_sampling = srcinfo->CCIR601_sampling; - /* Copy the source's quantization tables. */ - for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { - if (srcinfo->quant_tbl_ptrs[tblno] != NULL) { - qtblptr = & dstinfo->quant_tbl_ptrs[tblno]; - if (*qtblptr == NULL) - *qtblptr = jpeg_alloc_quant_table((j_common_ptr) dstinfo); - MEMCOPY((*qtblptr)->quantval, - srcinfo->quant_tbl_ptrs[tblno]->quantval, - SIZEOF((*qtblptr)->quantval)); - (*qtblptr)->sent_table = FALSE; - } - } - /* Copy the source's per-component info. - * Note we assume jpeg_set_defaults has allocated the dest comp_info array. - */ - dstinfo->num_components = srcinfo->num_components; - if (dstinfo->num_components < 1 || dstinfo->num_components > MAX_COMPONENTS) - ERREXIT2(dstinfo, JERR_COMPONENT_COUNT, dstinfo->num_components, - MAX_COMPONENTS); - for (ci = 0, incomp = srcinfo->comp_info, outcomp = dstinfo->comp_info; - ci < dstinfo->num_components; ci++, incomp++, outcomp++) { - outcomp->component_id = incomp->component_id; - outcomp->h_samp_factor = incomp->h_samp_factor; - outcomp->v_samp_factor = incomp->v_samp_factor; - outcomp->quant_tbl_no = incomp->quant_tbl_no; - /* Make sure saved quantization table for component matches the qtable - * slot. If not, the input file re-used this qtable slot. - * IJG encoder currently cannot duplicate this. - */ - tblno = outcomp->quant_tbl_no; - if (tblno < 0 || tblno >= NUM_QUANT_TBLS || - srcinfo->quant_tbl_ptrs[tblno] == NULL) - ERREXIT1(dstinfo, JERR_NO_QUANT_TABLE, tblno); - slot_quant = srcinfo->quant_tbl_ptrs[tblno]; - c_quant = incomp->quant_table; - if (c_quant != NULL) { - for (coefi = 0; coefi < DCTSIZE2; coefi++) { - if (c_quant->quantval[coefi] != slot_quant->quantval[coefi]) - ERREXIT1(dstinfo, JERR_MISMATCHED_QUANT_TABLE, tblno); - } - } - /* Note: we do not copy the source's entropy table assignments; - * instead we rely on jpeg_set_colorspace to have made a suitable choice. - */ - } - /* Also copy JFIF version and resolution information, if available. - * Strictly speaking this isn't "critical" info, but it's nearly - * always appropriate to copy it if available. In particular, - * if the application chooses to copy JFIF 1.02 extension markers from - * the source file, we need to copy the version to make sure we don't - * emit a file that has 1.02 extensions but a claimed version of 1.01. - */ - if (srcinfo->saw_JFIF_marker) { - if (srcinfo->JFIF_major_version == 1 || - srcinfo->JFIF_major_version == 2) { - dstinfo->JFIF_major_version = srcinfo->JFIF_major_version; - dstinfo->JFIF_minor_version = srcinfo->JFIF_minor_version; - } - dstinfo->density_unit = srcinfo->density_unit; - dstinfo->X_density = srcinfo->X_density; - dstinfo->Y_density = srcinfo->Y_density; - } -} - - -LOCAL(void) -jpeg_calc_trans_dimensions (j_compress_ptr cinfo) -/* Do computations that are needed before master selection phase */ -{ - if (cinfo->min_DCT_h_scaled_size != cinfo->min_DCT_v_scaled_size) - ERREXIT2(cinfo, JERR_BAD_DCTSIZE, - cinfo->min_DCT_h_scaled_size, cinfo->min_DCT_v_scaled_size); - - cinfo->block_size = cinfo->min_DCT_h_scaled_size; -} - - -/* - * Master selection of compression modules for transcoding. - * This substitutes for jcinit.c's initialization of the full compressor. - */ - -LOCAL(void) -transencode_master_selection (j_compress_ptr cinfo, - jvirt_barray_ptr * coef_arrays) -{ - /* Do computations that are needed before master selection phase */ - jpeg_calc_trans_dimensions(cinfo); - - /* Initialize master control (includes parameter checking/processing) */ - jinit_c_master_control(cinfo, TRUE /* transcode only */); - - /* Entropy encoding: either Huffman or arithmetic coding. */ - if (cinfo->arith_code) - jinit_arith_encoder(cinfo); - else { - jinit_huff_encoder(cinfo); - } - - /* We need a special coefficient buffer controller. */ - transencode_coef_controller(cinfo, coef_arrays); - - jinit_marker_writer(cinfo); - - /* We can now tell the memory manager to allocate virtual arrays. */ - (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); - - /* Write the datastream header (SOI, JFIF) immediately. - * Frame and scan headers are postponed till later. - * This lets application insert special markers after the SOI. - */ - (*cinfo->marker->write_file_header) (cinfo); -} - - -/* - * The rest of this file is a special implementation of the coefficient - * buffer controller. This is similar to jccoefct.c, but it handles only - * output from presupplied virtual arrays. Furthermore, we generate any - * dummy padding blocks on-the-fly rather than expecting them to be present - * in the arrays. - */ - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_c_coef_controller pub; /* public fields */ - - JDIMENSION iMCU_row_num; /* iMCU row # within image */ - JDIMENSION MCU_ctr; /* counts MCUs processed in current row */ - int MCU_vert_offset; /* counts MCU rows within iMCU row */ - int MCU_rows_per_iMCU_row; /* number of such rows needed */ - - /* Virtual block array for each component. */ - jvirt_barray_ptr * whole_image; - - /* Workspace for constructing dummy blocks at right/bottom edges. */ - JBLOCK dummy_buffer[C_MAX_BLOCKS_IN_MCU]; -} my_coef_controller; - -typedef my_coef_controller * my_coef_ptr; - - -LOCAL(void) -start_iMCU_row (j_compress_ptr cinfo) -/* Reset within-iMCU-row counters for a new row */ -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - /* In an interleaved scan, an MCU row is the same as an iMCU row. - * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. - * But at the bottom of the image, process only what's left. - */ - if (cinfo->comps_in_scan > 1) { - coef->MCU_rows_per_iMCU_row = 1; - } else { - if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; - else - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; - } - - coef->MCU_ctr = 0; - coef->MCU_vert_offset = 0; -} - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - if (pass_mode != JBUF_CRANK_DEST) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - - coef->iMCU_row_num = 0; - start_iMCU_row(cinfo); -} - - -/* - * Process some data. - * We process the equivalent of one fully interleaved MCU row ("iMCU" row) - * per call, ie, v_samp_factor block rows for each component in the scan. - * The data is obtained from the virtual arrays and fed to the entropy coder. - * Returns TRUE if the iMCU row is completed, FALSE if suspended. - * - * NB: input_buf is ignored; it is likely to be a NULL pointer. - */ - -METHODDEF(boolean) -compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION MCU_col_num; /* index of current MCU within row */ - JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - int blkn, ci, xindex, yindex, yoffset, blockcnt; - JDIMENSION start_col; - JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; - JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; - JBLOCKROW buffer_ptr; - jpeg_component_info *compptr; - - /* Align the virtual buffers for the components used in this scan. */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - buffer[ci] = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], - coef->iMCU_row_num * compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } - - /* Loop to process one whole iMCU row */ - for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; - yoffset++) { - for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col; - MCU_col_num++) { - /* Construct list of pointers to DCT blocks belonging to this MCU */ - blkn = 0; /* index of current DCT block within MCU */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width - : compptr->last_col_width; - start_col = MCU_col_num * compptr->MCU_width; - for (yindex = 0; yindex < compptr->MCU_height; yindex++) { - if (coef->iMCU_row_num < last_iMCU_row || - yoffset + yindex < compptr->last_row_height) { - /* Fill in pointers to real blocks in this row */ - buffer_ptr = buffer[ci][yoffset + yindex] + start_col; - xindex = blockcnt; - do { - MCU_buffer[blkn++] = buffer_ptr++; - } while (--xindex); - /* Dummy blocks at right edge */ - if ((xindex = compptr->MCU_width - blockcnt) == 0) - continue; - } else { - /* At bottom of image, need a whole row of dummy blocks */ - xindex = compptr->MCU_width; - } - /* Fill in any dummy blocks needed in this row. - * Dummy blocks are filled in the same way as in jccoefct.c: - * all zeroes in the AC entries, DC entries equal to previous - * block's DC value. The init routine has already zeroed the - * AC entries, so we need only set the DC entries correctly. - */ - buffer_ptr = coef->dummy_buffer + blkn; - do { - buffer_ptr[0][0] = MCU_buffer[blkn-1][0][0]; - MCU_buffer[blkn++] = buffer_ptr++; - } while (--xindex); - } - } - /* Try to write the MCU. */ - if (! (*cinfo->entropy->encode_mcu) (cinfo, MCU_buffer)) { - /* Suspension forced; update state counters and exit */ - coef->MCU_vert_offset = yoffset; - coef->MCU_ctr = MCU_col_num; - return FALSE; - } - } - /* Completed an MCU row, but perhaps not an iMCU row */ - coef->MCU_ctr = 0; - } - /* Completed the iMCU row, advance counters for next one */ - coef->iMCU_row_num++; - start_iMCU_row(cinfo); - return TRUE; -} - - -/* - * Initialize coefficient buffer controller. - * - * Each passed coefficient array must be the right size for that - * coefficient: width_in_blocks wide and height_in_blocks high, - * with unitheight at least v_samp_factor. - */ - -LOCAL(void) -transencode_coef_controller (j_compress_ptr cinfo, - jvirt_barray_ptr * coef_arrays) -{ - my_coef_ptr coef; - - coef = (my_coef_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_coef_controller)); - cinfo->coef = &coef->pub; - coef->pub.start_pass = start_pass_coef; - coef->pub.compress_data = compress_output; - - /* Save pointer to virtual arrays */ - coef->whole_image = coef_arrays; - - /* Pre-zero space for dummy DCT blocks */ - MEMZERO(coef->dummy_buffer, SIZEOF(coef->dummy_buffer)); -} diff --git a/thirdparty/jpeg-9e/jdapimin.c b/thirdparty/jpeg-9e/jdapimin.c deleted file mode 100644 index 785e527..0000000 --- a/thirdparty/jpeg-9e/jdapimin.c +++ /dev/null @@ -1,412 +0,0 @@ -/* - * jdapimin.c - * - * Copyright (C) 1994-1998, Thomas G. Lane. - * Modified 2009-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains application interface code for the decompression half - * of the JPEG library. These are the "minimum" API routines that may be - * needed in either the normal full-decompression case or the - * transcoding-only case. - * - * Most of the routines intended to be called directly by an application - * are in this file or in jdapistd.c. But also see jcomapi.c for routines - * shared by compression and decompression, and jdtrans.c for the transcoding - * case. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Initialization of a JPEG decompression object. - * The error manager must already be set up (in case memory manager fails). - */ - -GLOBAL(void) -jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize) -{ - int i; - - /* Guard against version mismatches between library and caller. */ - cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ - if (version != JPEG_LIB_VERSION) - ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); - if (structsize != SIZEOF(struct jpeg_decompress_struct)) - ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, - (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize); - - /* For debugging purposes, we zero the whole master structure. - * But the application has already set the err pointer, and may have set - * client_data, so we have to save and restore those fields. - * Note: if application hasn't set client_data, tools like Purify may - * complain here. - */ - { - struct jpeg_error_mgr * err = cinfo->err; - void * client_data = cinfo->client_data; /* ignore Purify complaint here */ - MEMZERO(cinfo, SIZEOF(struct jpeg_decompress_struct)); - cinfo->err = err; - cinfo->client_data = client_data; - } - cinfo->is_decompressor = TRUE; - - /* Initialize a memory manager instance for this object */ - jinit_memory_mgr((j_common_ptr) cinfo); - - /* Zero out pointers to permanent structures. */ - cinfo->progress = NULL; - cinfo->src = NULL; - - for (i = 0; i < NUM_QUANT_TBLS; i++) - cinfo->quant_tbl_ptrs[i] = NULL; - - for (i = 0; i < NUM_HUFF_TBLS; i++) { - cinfo->dc_huff_tbl_ptrs[i] = NULL; - cinfo->ac_huff_tbl_ptrs[i] = NULL; - } - - /* Initialize marker processor so application can override methods - * for COM, APPn markers before calling jpeg_read_header. - */ - cinfo->marker_list = NULL; - jinit_marker_reader(cinfo); - - /* And initialize the overall input controller. */ - jinit_input_controller(cinfo); - - /* OK, I'm ready */ - cinfo->global_state = DSTATE_START; -} - - -/* - * Destruction of a JPEG decompression object - */ - -GLOBAL(void) -jpeg_destroy_decompress (j_decompress_ptr cinfo) -{ - jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ -} - - -/* - * Abort processing of a JPEG decompression operation, - * but don't destroy the object itself. - */ - -GLOBAL(void) -jpeg_abort_decompress (j_decompress_ptr cinfo) -{ - jpeg_abort((j_common_ptr) cinfo); /* use common routine */ -} - - -/* - * Set default decompression parameters. - */ - -LOCAL(void) -default_decompress_parms (j_decompress_ptr cinfo) -{ - int cid0, cid1, cid2, cid3; - - /* Guess the input colorspace, and set output colorspace accordingly. */ - /* Note application may override our guesses. */ - switch (cinfo->num_components) { - case 1: - cinfo->jpeg_color_space = JCS_GRAYSCALE; - cinfo->out_color_space = JCS_GRAYSCALE; - break; - - case 3: - cid0 = cinfo->comp_info[0].component_id; - cid1 = cinfo->comp_info[1].component_id; - cid2 = cinfo->comp_info[2].component_id; - - /* For robust detection of standard colorspaces - * regardless of the presence of special markers, - * check component IDs from SOF marker first. - */ - if (cid0 == 0x01 && cid1 == 0x02 && cid2 == 0x03) - cinfo->jpeg_color_space = JCS_YCbCr; - else if (cid0 == 0x01 && cid1 == 0x22 && cid2 == 0x23) - cinfo->jpeg_color_space = JCS_BG_YCC; - else if (cid0 == 0x52 && cid1 == 0x47 && cid2 == 0x42) - cinfo->jpeg_color_space = JCS_RGB; /* ASCII 'R', 'G', 'B' */ - else if (cid0 == 0x72 && cid1 == 0x67 && cid2 == 0x62) - cinfo->jpeg_color_space = JCS_BG_RGB; /* ASCII 'r', 'g', 'b' */ - else if (cinfo->saw_JFIF_marker) - cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ - else if (cinfo->saw_Adobe_marker) { - switch (cinfo->Adobe_transform) { - case 0: - cinfo->jpeg_color_space = JCS_RGB; - break; - case 1: - cinfo->jpeg_color_space = JCS_YCbCr; - break; - default: - WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); - cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ - } - } else { - TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2); - cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ - } - /* Always guess RGB is proper output colorspace. */ - cinfo->out_color_space = JCS_RGB; - break; - - case 4: - cid0 = cinfo->comp_info[0].component_id; - cid1 = cinfo->comp_info[1].component_id; - cid2 = cinfo->comp_info[2].component_id; - cid3 = cinfo->comp_info[3].component_id; - - /* For robust detection of standard colorspaces - * regardless of the presence of special markers, - * check component IDs from SOF marker first. - */ - if (cid0 == 0x01 && cid1 == 0x02 && cid2 == 0x03 && cid3 == 0x04) - cinfo->jpeg_color_space = JCS_YCCK; - else if (cid0 == 0x43 && cid1 == 0x4D && cid2 == 0x59 && cid3 == 0x4B) - cinfo->jpeg_color_space = JCS_CMYK; /* ASCII 'C', 'M', 'Y', 'K' */ - else if (cinfo->saw_Adobe_marker) { - switch (cinfo->Adobe_transform) { - case 0: - cinfo->jpeg_color_space = JCS_CMYK; - break; - case 2: - cinfo->jpeg_color_space = JCS_YCCK; - break; - default: - WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); - cinfo->jpeg_color_space = JCS_YCCK; /* assume it's YCCK */ - } - } else { - /* Unknown IDs and no special markers, assume straight CMYK. */ - cinfo->jpeg_color_space = JCS_CMYK; - } - cinfo->out_color_space = JCS_CMYK; - break; - - default: - cinfo->jpeg_color_space = JCS_UNKNOWN; - cinfo->out_color_space = JCS_UNKNOWN; - } - - /* Set defaults for other decompression parameters. */ - cinfo->scale_num = cinfo->block_size; /* 1:1 scaling */ - cinfo->scale_denom = cinfo->block_size; - cinfo->output_gamma = 1.0; - cinfo->buffered_image = FALSE; - cinfo->raw_data_out = FALSE; - cinfo->dct_method = JDCT_DEFAULT; - cinfo->do_fancy_upsampling = TRUE; - cinfo->do_block_smoothing = TRUE; - cinfo->quantize_colors = FALSE; - /* We set these in case application only sets quantize_colors. */ - cinfo->dither_mode = JDITHER_FS; -#ifdef QUANT_2PASS_SUPPORTED - cinfo->two_pass_quantize = TRUE; -#else - cinfo->two_pass_quantize = FALSE; -#endif - cinfo->desired_number_of_colors = 256; - cinfo->colormap = NULL; - /* Initialize for no mode change in buffered-image mode. */ - cinfo->enable_1pass_quant = FALSE; - cinfo->enable_external_quant = FALSE; - cinfo->enable_2pass_quant = FALSE; -} - - -/* - * Decompression startup: read start of JPEG datastream to see what's there. - * Need only initialize JPEG object and supply a data source before calling. - * - * This routine will read as far as the first SOS marker (ie, actual start of - * compressed data), and will save all tables and parameters in the JPEG - * object. It will also initialize the decompression parameters to default - * values, and finally return JPEG_HEADER_OK. On return, the application may - * adjust the decompression parameters and then call jpeg_start_decompress. - * (Or, if the application only wanted to determine the image parameters, - * the data need not be decompressed. In that case, call jpeg_abort or - * jpeg_destroy to release any temporary space.) - * If an abbreviated (tables only) datastream is presented, the routine will - * return JPEG_HEADER_TABLES_ONLY upon reaching EOI. The application may then - * re-use the JPEG object to read the abbreviated image datastream(s). - * It is unnecessary (but OK) to call jpeg_abort in this case. - * The JPEG_SUSPENDED return code only occurs if the data source module - * requests suspension of the decompressor. In this case the application - * should load more source data and then re-call jpeg_read_header to resume - * processing. - * If a non-suspending data source is used and require_image is TRUE, then the - * return code need not be inspected since only JPEG_HEADER_OK is possible. - * - * This routine is now just a front end to jpeg_consume_input, with some - * extra error checking. - */ - -GLOBAL(int) -jpeg_read_header (j_decompress_ptr cinfo, boolean require_image) -{ - int retcode; - - if (cinfo->global_state != DSTATE_START && - cinfo->global_state != DSTATE_INHEADER) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - retcode = jpeg_consume_input(cinfo); - - switch (retcode) { - case JPEG_REACHED_SOS: - retcode = JPEG_HEADER_OK; - break; - case JPEG_REACHED_EOI: - if (require_image) /* Complain if application wanted an image */ - ERREXIT(cinfo, JERR_NO_IMAGE); - /* Reset to start state; it would be safer to require the application to - * call jpeg_abort, but we can't change it now for compatibility reasons. - * A side effect is to free any temporary memory (there shouldn't be any). - */ - jpeg_abort((j_common_ptr) cinfo); /* sets state = DSTATE_START */ - retcode = JPEG_HEADER_TABLES_ONLY; - break; - case JPEG_SUSPENDED: - /* no work */ - break; - } - - return retcode; -} - - -/* - * Consume data in advance of what the decompressor requires. - * This can be called at any time once the decompressor object has - * been created and a data source has been set up. - * - * This routine is essentially a state machine that handles a couple - * of critical state-transition actions, namely initial setup and - * transition from header scanning to ready-for-start_decompress. - * All the actual input is done via the input controller's consume_input - * method. - */ - -GLOBAL(int) -jpeg_consume_input (j_decompress_ptr cinfo) -{ - int retcode = JPEG_SUSPENDED; - - /* NB: every possible DSTATE value should be listed in this switch */ - switch (cinfo->global_state) { - case DSTATE_START: - /* Start-of-datastream actions: reset appropriate modules */ - (*cinfo->inputctl->reset_input_controller) (cinfo); - /* Initialize application's data source module */ - (*cinfo->src->init_source) (cinfo); - cinfo->global_state = DSTATE_INHEADER; - /*FALLTHROUGH*/ - case DSTATE_INHEADER: - retcode = (*cinfo->inputctl->consume_input) (cinfo); - if (retcode == JPEG_REACHED_SOS) { /* Found SOS, prepare to decompress */ - /* Set up default parameters based on header data */ - default_decompress_parms(cinfo); - /* Set global state: ready for start_decompress */ - cinfo->global_state = DSTATE_READY; - } - break; - case DSTATE_READY: - /* Can't advance past first SOS until start_decompress is called */ - retcode = JPEG_REACHED_SOS; - break; - case DSTATE_PRELOAD: - case DSTATE_PRESCAN: - case DSTATE_SCANNING: - case DSTATE_RAW_OK: - case DSTATE_BUFIMAGE: - case DSTATE_BUFPOST: - case DSTATE_STOPPING: - retcode = (*cinfo->inputctl->consume_input) (cinfo); - break; - default: - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - } - return retcode; -} - - -/* - * Have we finished reading the input file? - */ - -GLOBAL(boolean) -jpeg_input_complete (j_decompress_ptr cinfo) -{ - /* Check for valid jpeg object */ - if (cinfo->global_state < DSTATE_START || - cinfo->global_state > DSTATE_STOPPING) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - return cinfo->inputctl->eoi_reached; -} - - -/* - * Is there more than one scan? - */ - -GLOBAL(boolean) -jpeg_has_multiple_scans (j_decompress_ptr cinfo) -{ - /* Only valid after jpeg_read_header completes */ - if (cinfo->global_state < DSTATE_READY || - cinfo->global_state > DSTATE_STOPPING) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - return cinfo->inputctl->has_multiple_scans; -} - - -/* - * Finish JPEG decompression. - * - * This will normally just verify the file trailer and release temp storage. - * - * Returns FALSE if suspended. The return value need be inspected only if - * a suspending data source is used. - */ - -GLOBAL(boolean) -jpeg_finish_decompress (j_decompress_ptr cinfo) -{ - if ((cinfo->global_state == DSTATE_SCANNING || - cinfo->global_state == DSTATE_RAW_OK) && ! cinfo->buffered_image) { - /* Terminate final pass of non-buffered mode */ - if (cinfo->output_scanline < cinfo->output_height) - ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); - (*cinfo->master->finish_output_pass) (cinfo); - cinfo->global_state = DSTATE_STOPPING; - } else if (cinfo->global_state == DSTATE_BUFIMAGE) { - /* Finishing after a buffered-image operation */ - cinfo->global_state = DSTATE_STOPPING; - } else if (cinfo->global_state != DSTATE_STOPPING) { - /* STOPPING = repeat call after a suspension, anything else is error */ - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - } - /* Read until EOI */ - while (! cinfo->inputctl->eoi_reached) { - if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) - return FALSE; /* Suspend, come back later */ - } - /* Do final cleanup */ - (*cinfo->src->term_source) (cinfo); - /* We can use jpeg_abort to release memory and reset global_state */ - jpeg_abort((j_common_ptr) cinfo); - return TRUE; -} diff --git a/thirdparty/jpeg-9e/jdapistd.c b/thirdparty/jpeg-9e/jdapistd.c deleted file mode 100644 index 7f3a78b..0000000 --- a/thirdparty/jpeg-9e/jdapistd.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - * jdapistd.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2002-2013 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains application interface code for the decompression half - * of the JPEG library. These are the "standard" API routines that are - * used in the normal full-decompression case. They are not used by a - * transcoding-only application. Note that if an application links in - * jpeg_start_decompress, it will end up linking in the entire decompressor. - * We thus must separate this file from jdapimin.c to avoid linking the - * whole decompression library into a transcoder. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Forward declarations */ -LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo)); - - -/* - * Decompression initialization. - * jpeg_read_header must be completed before calling this. - * - * If a multipass operating mode was selected, this will do all but the - * last pass, and thus may take a great deal of time. - * - * Returns FALSE if suspended. The return value need be inspected only if - * a suspending data source is used. - */ - -GLOBAL(boolean) -jpeg_start_decompress (j_decompress_ptr cinfo) -{ - if (cinfo->global_state == DSTATE_READY) { - /* First call: initialize master control, select active modules */ - jinit_master_decompress(cinfo); - if (cinfo->buffered_image) { - /* No more work here; expecting jpeg_start_output next */ - cinfo->global_state = DSTATE_BUFIMAGE; - return TRUE; - } - cinfo->global_state = DSTATE_PRELOAD; - } - if (cinfo->global_state == DSTATE_PRELOAD) { - /* If file has multiple scans, absorb them all into the coef buffer */ - if (cinfo->inputctl->has_multiple_scans) { -#ifdef D_MULTISCAN_FILES_SUPPORTED - for (;;) { - int retcode; - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - /* Absorb some more input */ - retcode = (*cinfo->inputctl->consume_input) (cinfo); - if (retcode == JPEG_SUSPENDED) - return FALSE; - if (retcode == JPEG_REACHED_EOI) - break; - /* Advance progress counter if appropriate */ - if (cinfo->progress != NULL && - (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { - if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { - /* jdmaster underestimated number of scans; ratchet up one scan */ - cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; - } - } - } -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif /* D_MULTISCAN_FILES_SUPPORTED */ - } - cinfo->output_scan_number = cinfo->input_scan_number; - } else if (cinfo->global_state != DSTATE_PRESCAN) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - /* Perform any dummy output passes, and set up for the final pass */ - return output_pass_setup(cinfo); -} - - -/* - * Set up for an output pass, and perform any dummy pass(es) needed. - * Common subroutine for jpeg_start_decompress and jpeg_start_output. - * Entry: global_state = DSTATE_PRESCAN only if previously suspended. - * Exit: If done, returns TRUE and sets global_state for proper output mode. - * If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN. - */ - -LOCAL(boolean) -output_pass_setup (j_decompress_ptr cinfo) -{ - if (cinfo->global_state != DSTATE_PRESCAN) { - /* First call: do pass setup */ - (*cinfo->master->prepare_for_output_pass) (cinfo); - cinfo->output_scanline = 0; - cinfo->global_state = DSTATE_PRESCAN; - } - /* Loop over any required dummy passes */ - while (cinfo->master->is_dummy_pass) { -#ifdef QUANT_2PASS_SUPPORTED - /* Crank through the dummy pass */ - while (cinfo->output_scanline < cinfo->output_height) { - JDIMENSION last_scanline; - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) cinfo->output_scanline; - cinfo->progress->pass_limit = (long) cinfo->output_height; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - /* Process some data */ - last_scanline = cinfo->output_scanline; - (*cinfo->main->process_data) (cinfo, (JSAMPARRAY) NULL, - &cinfo->output_scanline, (JDIMENSION) 0); - if (cinfo->output_scanline == last_scanline) - return FALSE; /* No progress made, must suspend */ - } - /* Finish up dummy pass, and set up for another one */ - (*cinfo->master->finish_output_pass) (cinfo); - (*cinfo->master->prepare_for_output_pass) (cinfo); - cinfo->output_scanline = 0; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif /* QUANT_2PASS_SUPPORTED */ - } - /* Ready for application to drive output pass through - * jpeg_read_scanlines or jpeg_read_raw_data. - */ - cinfo->global_state = cinfo->raw_data_out ? DSTATE_RAW_OK : DSTATE_SCANNING; - return TRUE; -} - - -/* - * Read some scanlines of data from the JPEG decompressor. - * - * The return value will be the number of lines actually read. - * This may be less than the number requested in several cases, - * including bottom of image, data source suspension, and operating - * modes that emit multiple scanlines at a time. - * - * Note: we warn about excess calls to jpeg_read_scanlines() since - * this likely signals an application programmer error. However, - * an oversize buffer (max_lines > scanlines remaining) is not an error. - */ - -GLOBAL(JDIMENSION) -jpeg_read_scanlines (j_decompress_ptr cinfo, JSAMPARRAY scanlines, - JDIMENSION max_lines) -{ - JDIMENSION row_ctr; - - if (cinfo->global_state != DSTATE_SCANNING) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - if (cinfo->output_scanline >= cinfo->output_height) { - WARNMS(cinfo, JWRN_TOO_MUCH_DATA); - return 0; - } - - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) cinfo->output_scanline; - cinfo->progress->pass_limit = (long) cinfo->output_height; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - - /* Process some data */ - row_ctr = 0; - (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, max_lines); - cinfo->output_scanline += row_ctr; - return row_ctr; -} - - -/* - * Alternate entry point to read raw data. - * Processes exactly one iMCU row per call, unless suspended. - */ - -GLOBAL(JDIMENSION) -jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data, - JDIMENSION max_lines) -{ - JDIMENSION lines_per_iMCU_row; - - if (cinfo->global_state != DSTATE_RAW_OK) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - if (cinfo->output_scanline >= cinfo->output_height) { - WARNMS(cinfo, JWRN_TOO_MUCH_DATA); - return 0; - } - - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) cinfo->output_scanline; - cinfo->progress->pass_limit = (long) cinfo->output_height; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - - /* Verify that at least one iMCU row can be returned. */ - lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_v_scaled_size; - if (max_lines < lines_per_iMCU_row) - ERREXIT(cinfo, JERR_BUFFER_SIZE); - - /* Decompress directly into user's buffer. */ - if (! (*cinfo->coef->decompress_data) (cinfo, data)) - return 0; /* suspension forced, can do nothing more */ - - /* OK, we processed one iMCU row. */ - cinfo->output_scanline += lines_per_iMCU_row; - return lines_per_iMCU_row; -} - - -/* Additional entry points for buffered-image mode. */ - -#ifdef D_MULTISCAN_FILES_SUPPORTED - -/* - * Initialize for an output pass in buffered-image mode. - */ - -GLOBAL(boolean) -jpeg_start_output (j_decompress_ptr cinfo, int scan_number) -{ - if (cinfo->global_state != DSTATE_BUFIMAGE && - cinfo->global_state != DSTATE_PRESCAN) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - /* Limit scan number to valid range */ - if (scan_number <= 0) - scan_number = 1; - if (cinfo->inputctl->eoi_reached && - scan_number > cinfo->input_scan_number) - scan_number = cinfo->input_scan_number; - cinfo->output_scan_number = scan_number; - /* Perform any dummy output passes, and set up for the real pass */ - return output_pass_setup(cinfo); -} - - -/* - * Finish up after an output pass in buffered-image mode. - * - * Returns FALSE if suspended. The return value need be inspected only if - * a suspending data source is used. - */ - -GLOBAL(boolean) -jpeg_finish_output (j_decompress_ptr cinfo) -{ - if ((cinfo->global_state == DSTATE_SCANNING || - cinfo->global_state == DSTATE_RAW_OK) && cinfo->buffered_image) { - /* Terminate this pass. */ - /* We do not require the whole pass to have been completed. */ - (*cinfo->master->finish_output_pass) (cinfo); - cinfo->global_state = DSTATE_BUFPOST; - } else if (cinfo->global_state != DSTATE_BUFPOST) { - /* BUFPOST = repeat call after a suspension, anything else is error */ - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - } - /* Read markers looking for SOS or EOI */ - while (cinfo->input_scan_number <= cinfo->output_scan_number && - ! cinfo->inputctl->eoi_reached) { - if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) - return FALSE; /* Suspend, come back later */ - } - cinfo->global_state = DSTATE_BUFIMAGE; - return TRUE; -} - -#endif /* D_MULTISCAN_FILES_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/jdarith.c b/thirdparty/jpeg-9e/jdarith.c deleted file mode 100644 index 2c9abe2..0000000 --- a/thirdparty/jpeg-9e/jdarith.c +++ /dev/null @@ -1,796 +0,0 @@ -/* - * jdarith.c - * - * Developed 1997-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains portable arithmetic entropy decoding routines for JPEG - * (implementing the ISO/IEC IS 10918-1 and CCITT Recommendation ITU-T T.81). - * - * Both sequential and progressive modes are supported in this single module. - * - * Suspension is not currently supported in this module. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Expanded entropy decoder object for arithmetic decoding. */ - -typedef struct { - struct jpeg_entropy_decoder pub; /* public fields */ - - INT32 c; /* C register, base of coding interval + input bit buffer */ - INT32 a; /* A register, normalized size of coding interval */ - int ct; /* bit shift counter, # of bits left in bit buffer part of C */ - /* init: ct = -16 */ - /* run: ct = 0..7 */ - /* error: ct = -1 */ - int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ - int dc_context[MAX_COMPS_IN_SCAN]; /* context index for DC conditioning */ - - unsigned int restarts_to_go; /* MCUs left in this restart interval */ - - /* Pointers to statistics areas (these workspaces have image lifespan) */ - unsigned char * dc_stats[NUM_ARITH_TBLS]; - unsigned char * ac_stats[NUM_ARITH_TBLS]; - - /* Statistics bin for coding with fixed probability 0.5 */ - unsigned char fixed_bin[4]; -} arith_entropy_decoder; - -typedef arith_entropy_decoder * arith_entropy_ptr; - -/* The following two definitions specify the allocation chunk size - * for the statistics area. - * According to sections F.1.4.4.1.3 and F.1.4.4.2, we need at least - * 49 statistics bins for DC, and 245 statistics bins for AC coding. - * - * We use a compact representation with 1 byte per statistics bin, - * thus the numbers directly represent byte sizes. - * This 1 byte per statistics bin contains the meaning of the MPS - * (more probable symbol) in the highest bit (mask 0x80), and the - * index into the probability estimation state machine table - * in the lower bits (mask 0x7F). - */ - -#define DC_STAT_BINS 64 -#define AC_STAT_BINS 256 - - -LOCAL(int) -get_byte (j_decompress_ptr cinfo) -/* Read next input byte; we do not support suspension in this module. */ -{ - struct jpeg_source_mgr * src = cinfo->src; - - if (src->bytes_in_buffer == 0) - if (! (*src->fill_input_buffer) (cinfo)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - src->bytes_in_buffer--; - return GETJOCTET(*src->next_input_byte++); -} - - -/* - * The core arithmetic decoding routine (common in JPEG and JBIG). - * This needs to go as fast as possible. - * Machine-dependent optimization facilities - * are not utilized in this portable implementation. - * However, this code should be fairly efficient and - * may be a good base for further optimizations anyway. - * - * Return value is 0 or 1 (binary decision). - * - * Note: I've changed the handling of the code base & bit - * buffer register C compared to other implementations - * based on the standards layout & procedures. - * While it also contains both the actual base of the - * coding interval (16 bits) and the next-bits buffer, - * the cut-point between these two parts is floating - * (instead of fixed) with the bit shift counter CT. - * Thus, we also need only one (variable instead of - * fixed size) shift for the LPS/MPS decision, and - * we can do away with any renormalization update - * of C (except for new data insertion, of course). - * - * I've also introduced a new scheme for accessing - * the probability estimation state machine table, - * derived from Markus Kuhn's JBIG implementation. - */ - -LOCAL(int) -arith_decode (j_decompress_ptr cinfo, unsigned char *st) -{ - register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy; - register unsigned char nl, nm; - register INT32 qe, temp; - register int sv, data; - - /* Renormalization & data input per section D.2.6 */ - while (e->a < 0x8000L) { - if (--e->ct < 0) { - /* Need to fetch next data byte */ - if (cinfo->unread_marker) - data = 0; /* stuff zero data */ - else { - data = get_byte(cinfo); /* read next input byte */ - if (data == 0xFF) { /* zero stuff or marker code */ - do data = get_byte(cinfo); - while (data == 0xFF); /* swallow extra 0xFF bytes */ - if (data == 0) - data = 0xFF; /* discard stuffed zero byte */ - else { - /* Note: Different from the Huffman decoder, hitting - * a marker while processing the compressed data - * segment is legal in arithmetic coding. - * The convention is to supply zero data - * then until decoding is complete. - */ - cinfo->unread_marker = data; - data = 0; - } - } - } - e->c = (e->c << 8) | data; /* insert data into C register */ - if ((e->ct += 8) < 0) /* update bit shift counter */ - /* Need more initial bytes */ - if (++e->ct == 0) - /* Got 2 initial bytes -> re-init A and exit loop */ - e->a = 0x8000L; /* => e->a = 0x10000L after loop exit */ - } - e->a <<= 1; - } - - /* Fetch values from our compact representation of Table D.3(D.2): - * Qe values and probability estimation state machine - */ - sv = *st; - qe = jpeg_aritab[sv & 0x7F]; /* => Qe_Value */ - nl = qe & 0xFF; qe >>= 8; /* Next_Index_LPS + Switch_MPS */ - nm = qe & 0xFF; qe >>= 8; /* Next_Index_MPS */ - - /* Decode & estimation procedures per sections D.2.4 & D.2.5 */ - temp = e->a - qe; - e->a = temp; - temp <<= e->ct; - if (e->c >= temp) { - e->c -= temp; - /* Conditional LPS (less probable symbol) exchange */ - if (e->a < qe) { - e->a = qe; - *st = (sv & 0x80) ^ nm; /* Estimate_after_MPS */ - } else { - e->a = qe; - *st = (sv & 0x80) ^ nl; /* Estimate_after_LPS */ - sv ^= 0x80; /* Exchange LPS/MPS */ - } - } else if (e->a < 0x8000L) { - /* Conditional MPS (more probable symbol) exchange */ - if (e->a < qe) { - *st = (sv & 0x80) ^ nl; /* Estimate_after_LPS */ - sv ^= 0x80; /* Exchange LPS/MPS */ - } else { - *st = (sv & 0x80) ^ nm; /* Estimate_after_MPS */ - } - } - - return sv >> 7; -} - - -/* - * Check for a restart marker & resynchronize decoder. - */ - -LOCAL(void) -process_restart (j_decompress_ptr cinfo) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - int ci; - jpeg_component_info * compptr; - - /* Advance past the RSTn marker */ - if (! (*cinfo->marker->read_restart_marker) (cinfo)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - - /* Re-initialize statistics areas */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - if (! cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) { - MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS); - /* Reset DC predictions to 0 */ - entropy->last_dc_val[ci] = 0; - entropy->dc_context[ci] = 0; - } - if ((! cinfo->progressive_mode && cinfo->lim_Se) || - (cinfo->progressive_mode && cinfo->Ss)) { - MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS); - } - } - - /* Reset arithmetic decoding variables */ - entropy->c = 0; - entropy->a = 0; - entropy->ct = -16; /* force reading 2 initial bytes to fill C */ - - /* Reset restart counter */ - entropy->restarts_to_go = cinfo->restart_interval; -} - - -/* - * Arithmetic MCU decoding. - * Each of these routines decodes and returns one MCU's worth of - * arithmetic-compressed coefficients. - * The coefficients are reordered from zigzag order into natural array order, - * but are not dequantized. - * - * The i'th block of the MCU is stored into the block pointed to by - * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER. - */ - -/* - * MCU decoding for DC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - JBLOCKROW block; - unsigned char *st; - int blkn, ci, tbl, sign; - int v, m; - - /* Process restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - process_restart(cinfo); - entropy->restarts_to_go--; - } - - if (entropy->ct == -1) return TRUE; /* if error do nothing */ - - /* Outer loop handles each block in the MCU */ - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - block = MCU_data[blkn]; - ci = cinfo->MCU_membership[blkn]; - tbl = cinfo->cur_comp_info[ci]->dc_tbl_no; - - /* Sections F.2.4.1 & F.1.4.4.1: Decoding of DC coefficients */ - - /* Table F.4: Point to statistics bin S0 for DC coefficient coding */ - st = entropy->dc_stats[tbl] + entropy->dc_context[ci]; - - /* Figure F.19: Decode_DC_DIFF */ - if (arith_decode(cinfo, st) == 0) - entropy->dc_context[ci] = 0; - else { - /* Figure F.21: Decoding nonzero value v */ - /* Figure F.22: Decoding the sign of v */ - sign = arith_decode(cinfo, st + 1); - st += 2; st += sign; - /* Figure F.23: Decoding the magnitude category of v */ - if ((m = arith_decode(cinfo, st)) != 0) { - st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */ - while (arith_decode(cinfo, st)) { - if ((m <<= 1) == (int) 0x8000U) { - WARNMS(cinfo, JWRN_ARITH_BAD_CODE); - entropy->ct = -1; /* magnitude overflow */ - return TRUE; - } - st += 1; - } - } - /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ - if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) - entropy->dc_context[ci] = 0; /* zero diff category */ - else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) - entropy->dc_context[ci] = 12 + (sign * 4); /* large diff category */ - else - entropy->dc_context[ci] = 4 + (sign * 4); /* small diff category */ - v = m; - /* Figure F.24: Decoding the magnitude bit pattern of v */ - st += 14; - while (m >>= 1) - if (arith_decode(cinfo, st)) v |= m; - v += 1; if (sign) v = -v; - entropy->last_dc_val[ci] += v; - } - - /* Scale and output the DC coefficient (assumes jpeg_natural_order[0]=0) */ - (*block)[0] = (JCOEF) (entropy->last_dc_val[ci] << cinfo->Al); - } - - return TRUE; -} - - -/* - * MCU decoding for AC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - JBLOCKROW block; - unsigned char *st; - int tbl, sign, k; - int v, m; - const int * natural_order; - - /* Process restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - process_restart(cinfo); - entropy->restarts_to_go--; - } - - if (entropy->ct == -1) return TRUE; /* if error do nothing */ - - natural_order = cinfo->natural_order; - - /* There is always only one block per MCU */ - block = MCU_data[0]; - tbl = cinfo->cur_comp_info[0]->ac_tbl_no; - - /* Sections F.2.4.2 & F.1.4.4.2: Decoding of AC coefficients */ - - /* Figure F.20: Decode_AC_coefficients */ - k = cinfo->Ss - 1; - do { - st = entropy->ac_stats[tbl] + 3 * k; - if (arith_decode(cinfo, st)) break; /* EOB flag */ - for (;;) { - k++; - if (arith_decode(cinfo, st + 1)) break; - st += 3; - if (k >= cinfo->Se) { - WARNMS(cinfo, JWRN_ARITH_BAD_CODE); - entropy->ct = -1; /* spectral overflow */ - return TRUE; - } - } - /* Figure F.21: Decoding nonzero value v */ - /* Figure F.22: Decoding the sign of v */ - sign = arith_decode(cinfo, entropy->fixed_bin); - st += 2; - /* Figure F.23: Decoding the magnitude category of v */ - if ((m = arith_decode(cinfo, st)) != 0) { - if (arith_decode(cinfo, st)) { - m <<= 1; - st = entropy->ac_stats[tbl] + - (k <= cinfo->arith_ac_K[tbl] ? 189 : 217); - while (arith_decode(cinfo, st)) { - if ((m <<= 1) == (int) 0x8000U) { - WARNMS(cinfo, JWRN_ARITH_BAD_CODE); - entropy->ct = -1; /* magnitude overflow */ - return TRUE; - } - st += 1; - } - } - } - v = m; - /* Figure F.24: Decoding the magnitude bit pattern of v */ - st += 14; - while (m >>= 1) - if (arith_decode(cinfo, st)) v |= m; - v += 1; if (sign) v = -v; - /* Scale and output coefficient in natural (dezigzagged) order */ - (*block)[natural_order[k]] = (JCOEF) (v << cinfo->Al); - } while (k < cinfo->Se); - - return TRUE; -} - - -/* - * MCU decoding for DC successive approximation refinement scan. - * Note: we assume such scans can be multi-component, - * although the spec is not very clear on the point. - */ - -METHODDEF(boolean) -decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - unsigned char *st; - JCOEF p1; - int blkn; - - /* Process restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - process_restart(cinfo); - entropy->restarts_to_go--; - } - - st = entropy->fixed_bin; /* use fixed probability estimation */ - p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ - - /* Outer loop handles each block in the MCU */ - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - /* Encoded data is simply the next bit of the two's-complement DC value */ - if (arith_decode(cinfo, st)) - MCU_data[blkn][0][0] |= p1; - } - - return TRUE; -} - - -/* - * MCU decoding for AC successive approximation refinement scan. - */ - -METHODDEF(boolean) -decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - JBLOCKROW block; - JCOEFPTR thiscoef; - unsigned char *st; - int tbl, k, kex; - JCOEF p1, m1; - const int * natural_order; - - /* Process restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - process_restart(cinfo); - entropy->restarts_to_go--; - } - - if (entropy->ct == -1) return TRUE; /* if error do nothing */ - - natural_order = cinfo->natural_order; - - /* There is always only one block per MCU */ - block = MCU_data[0]; - tbl = cinfo->cur_comp_info[0]->ac_tbl_no; - - p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ - m1 = -p1; /* -1 in the bit position being coded */ - - /* Establish EOBx (previous stage end-of-block) index */ - kex = cinfo->Se; - do { - if ((*block)[natural_order[kex]]) break; - } while (--kex); - - k = cinfo->Ss - 1; - do { - st = entropy->ac_stats[tbl] + 3 * k; - if (k >= kex) - if (arith_decode(cinfo, st)) break; /* EOB flag */ - for (;;) { - thiscoef = *block + natural_order[++k]; - if (*thiscoef) { /* previously nonzero coef */ - if (arith_decode(cinfo, st + 2)) { - if (*thiscoef < 0) - *thiscoef += m1; - else - *thiscoef += p1; - } - break; - } - if (arith_decode(cinfo, st + 1)) { /* newly nonzero coef */ - if (arith_decode(cinfo, entropy->fixed_bin)) - *thiscoef = m1; - else - *thiscoef = p1; - break; - } - st += 3; - if (k >= cinfo->Se) { - WARNMS(cinfo, JWRN_ARITH_BAD_CODE); - entropy->ct = -1; /* spectral overflow */ - return TRUE; - } - } - } while (k < cinfo->Se); - - return TRUE; -} - - -/* - * Decode one MCU's worth of arithmetic-compressed coefficients. - */ - -METHODDEF(boolean) -decode_mcu (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - jpeg_component_info * compptr; - JBLOCKROW block; - unsigned char *st; - int blkn, ci, tbl, sign, k; - int v, m; - const int * natural_order; - - /* Process restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - process_restart(cinfo); - entropy->restarts_to_go--; - } - - if (entropy->ct == -1) return TRUE; /* if error do nothing */ - - natural_order = cinfo->natural_order; - - /* Outer loop handles each block in the MCU */ - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - block = MCU_data[blkn]; - ci = cinfo->MCU_membership[blkn]; - compptr = cinfo->cur_comp_info[ci]; - - /* Sections F.2.4.1 & F.1.4.4.1: Decoding of DC coefficients */ - - tbl = compptr->dc_tbl_no; - - /* Table F.4: Point to statistics bin S0 for DC coefficient coding */ - st = entropy->dc_stats[tbl] + entropy->dc_context[ci]; - - /* Figure F.19: Decode_DC_DIFF */ - if (arith_decode(cinfo, st) == 0) - entropy->dc_context[ci] = 0; - else { - /* Figure F.21: Decoding nonzero value v */ - /* Figure F.22: Decoding the sign of v */ - sign = arith_decode(cinfo, st + 1); - st += 2; st += sign; - /* Figure F.23: Decoding the magnitude category of v */ - if ((m = arith_decode(cinfo, st)) != 0) { - st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */ - while (arith_decode(cinfo, st)) { - if ((m <<= 1) == (int) 0x8000U) { - WARNMS(cinfo, JWRN_ARITH_BAD_CODE); - entropy->ct = -1; /* magnitude overflow */ - return TRUE; - } - st += 1; - } - } - /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ - if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) - entropy->dc_context[ci] = 0; /* zero diff category */ - else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) - entropy->dc_context[ci] = 12 + (sign * 4); /* large diff category */ - else - entropy->dc_context[ci] = 4 + (sign * 4); /* small diff category */ - v = m; - /* Figure F.24: Decoding the magnitude bit pattern of v */ - st += 14; - while (m >>= 1) - if (arith_decode(cinfo, st)) v |= m; - v += 1; if (sign) v = -v; - entropy->last_dc_val[ci] += v; - } - - (*block)[0] = (JCOEF) entropy->last_dc_val[ci]; - - /* Sections F.2.4.2 & F.1.4.4.2: Decoding of AC coefficients */ - - if (cinfo->lim_Se == 0) continue; - tbl = compptr->ac_tbl_no; - k = 0; - - /* Figure F.20: Decode_AC_coefficients */ - do { - st = entropy->ac_stats[tbl] + 3 * k; - if (arith_decode(cinfo, st)) break; /* EOB flag */ - for (;;) { - k++; - if (arith_decode(cinfo, st + 1)) break; - st += 3; - if (k >= cinfo->lim_Se) { - WARNMS(cinfo, JWRN_ARITH_BAD_CODE); - entropy->ct = -1; /* spectral overflow */ - return TRUE; - } - } - /* Figure F.21: Decoding nonzero value v */ - /* Figure F.22: Decoding the sign of v */ - sign = arith_decode(cinfo, entropy->fixed_bin); - st += 2; - /* Figure F.23: Decoding the magnitude category of v */ - if ((m = arith_decode(cinfo, st)) != 0) { - if (arith_decode(cinfo, st)) { - m <<= 1; - st = entropy->ac_stats[tbl] + - (k <= cinfo->arith_ac_K[tbl] ? 189 : 217); - while (arith_decode(cinfo, st)) { - if ((m <<= 1) == (int) 0x8000U) { - WARNMS(cinfo, JWRN_ARITH_BAD_CODE); - entropy->ct = -1; /* magnitude overflow */ - return TRUE; - } - st += 1; - } - } - } - v = m; - /* Figure F.24: Decoding the magnitude bit pattern of v */ - st += 14; - while (m >>= 1) - if (arith_decode(cinfo, st)) v |= m; - v += 1; if (sign) v = -v; - (*block)[natural_order[k]] = (JCOEF) v; - } while (k < cinfo->lim_Se); - } - - return TRUE; -} - - -/* - * Initialize for an arithmetic-compressed scan. - */ - -METHODDEF(void) -start_pass (j_decompress_ptr cinfo) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - int ci, tbl; - jpeg_component_info * compptr; - - if (cinfo->progressive_mode) { - /* Validate progressive scan parameters */ - if (cinfo->Ss == 0) { - if (cinfo->Se != 0) - goto bad; - } else { - /* need not check Ss/Se < 0 since they came from unsigned bytes */ - if (cinfo->Se < cinfo->Ss || cinfo->Se > cinfo->lim_Se) - goto bad; - /* AC scans may have only one component */ - if (cinfo->comps_in_scan != 1) - goto bad; - } - if (cinfo->Ah != 0) { - /* Successive approximation refinement scan: must have Al = Ah-1. */ - if (cinfo->Ah-1 != cinfo->Al) - goto bad; - } - if (cinfo->Al > 13) { /* need not check for < 0 */ - bad: - ERREXIT4(cinfo, JERR_BAD_PROGRESSION, - cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); - } - /* Update progression status, and verify that scan order is legal. - * Note that inter-scan inconsistencies are treated as warnings - * not fatal errors ... not clear if this is right way to behave. - */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - int coefi, cindex = cinfo->cur_comp_info[ci]->component_index; - int *coef_bit_ptr = & cinfo->coef_bits[cindex][0]; - if (cinfo->Ss && coef_bit_ptr[0] < 0) /* AC without prior DC scan */ - WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0); - for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) { - int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi]; - if (cinfo->Ah != expected) - WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi); - coef_bit_ptr[coefi] = cinfo->Al; - } - } - /* Select MCU decoding routine */ - if (cinfo->Ah == 0) { - if (cinfo->Ss == 0) - entropy->pub.decode_mcu = decode_mcu_DC_first; - else - entropy->pub.decode_mcu = decode_mcu_AC_first; - } else { - if (cinfo->Ss == 0) - entropy->pub.decode_mcu = decode_mcu_DC_refine; - else - entropy->pub.decode_mcu = decode_mcu_AC_refine; - } - } else { - /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG. - * This ought to be an error condition, but we make it a warning. - */ - if (cinfo->Ss != 0 || cinfo->Ah != 0 || cinfo->Al != 0 || - (cinfo->Se < DCTSIZE2 && cinfo->Se != cinfo->lim_Se)) - WARNMS(cinfo, JWRN_NOT_SEQUENTIAL); - /* Select MCU decoding routine */ - entropy->pub.decode_mcu = decode_mcu; - } - - /* Allocate & initialize requested statistics areas */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - if (! cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) { - tbl = compptr->dc_tbl_no; - if (tbl < 0 || tbl >= NUM_ARITH_TBLS) - ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); - if (entropy->dc_stats[tbl] == NULL) - entropy->dc_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, DC_STAT_BINS); - MEMZERO(entropy->dc_stats[tbl], DC_STAT_BINS); - /* Initialize DC predictions to 0 */ - entropy->last_dc_val[ci] = 0; - entropy->dc_context[ci] = 0; - } - if ((! cinfo->progressive_mode && cinfo->lim_Se) || - (cinfo->progressive_mode && cinfo->Ss)) { - tbl = compptr->ac_tbl_no; - if (tbl < 0 || tbl >= NUM_ARITH_TBLS) - ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); - if (entropy->ac_stats[tbl] == NULL) - entropy->ac_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, AC_STAT_BINS); - MEMZERO(entropy->ac_stats[tbl], AC_STAT_BINS); - } - } - - /* Initialize arithmetic decoding variables */ - entropy->c = 0; - entropy->a = 0; - entropy->ct = -16; /* force reading 2 initial bytes to fill C */ - - /* Initialize restart counter */ - entropy->restarts_to_go = cinfo->restart_interval; -} - - -/* - * Finish up at the end of an arithmetic-compressed scan. - */ - -METHODDEF(void) -finish_pass (j_decompress_ptr cinfo) -{ - /* no work necessary here */ -} - - -/* - * Module initialization routine for arithmetic entropy decoding. - */ - -GLOBAL(void) -jinit_arith_decoder (j_decompress_ptr cinfo) -{ - arith_entropy_ptr entropy; - int i; - - entropy = (arith_entropy_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(arith_entropy_decoder)); - cinfo->entropy = &entropy->pub; - entropy->pub.start_pass = start_pass; - entropy->pub.finish_pass = finish_pass; - - /* Mark tables unallocated */ - for (i = 0; i < NUM_ARITH_TBLS; i++) { - entropy->dc_stats[i] = NULL; - entropy->ac_stats[i] = NULL; - } - - /* Initialize index for fixed probability estimation */ - entropy->fixed_bin[0] = 113; - - if (cinfo->progressive_mode) { - /* Create progression status table */ - int *coef_bit_ptr, ci; - cinfo->coef_bits = (int (*)[DCTSIZE2]) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->num_components * DCTSIZE2 * SIZEOF(int)); - coef_bit_ptr = & cinfo->coef_bits[0][0]; - for (ci = 0; ci < cinfo->num_components; ci++) - for (i = 0; i < DCTSIZE2; i++) - *coef_bit_ptr++ = -1; - } -} diff --git a/thirdparty/jpeg-9e/jdatadst.c b/thirdparty/jpeg-9e/jdatadst.c deleted file mode 100644 index 75ebd7c..0000000 --- a/thirdparty/jpeg-9e/jdatadst.c +++ /dev/null @@ -1,267 +0,0 @@ -/* - * jdatadst.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2009-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains compression data destination routines for the case of - * emitting JPEG data to memory or to a file (or any stdio stream). - * While these routines are sufficient for most applications, - * some will want to use a different destination manager. - * IMPORTANT: we assume that fwrite() will correctly transcribe an array of - * JOCTETs into 8-bit-wide elements on external storage. If char is wider - * than 8 bits on your machine, you may need to do some tweaking. - */ - -/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ -#include "jinclude.h" -#include "jpeglib.h" -#include "jerror.h" - -#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ -extern void * malloc JPP((size_t size)); -extern void free JPP((void *ptr)); -#endif - - -/* Expanded data destination object for stdio output */ - -typedef struct { - struct jpeg_destination_mgr pub; /* public fields */ - - FILE * outfile; /* target stream */ - JOCTET * buffer; /* start of buffer */ -} my_destination_mgr; - -typedef my_destination_mgr * my_dest_ptr; - -#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */ - - -/* Expanded data destination object for memory output */ - -typedef struct { - struct jpeg_destination_mgr pub; /* public fields */ - - unsigned char ** outbuffer; /* target buffer */ - size_t * outsize; - unsigned char * newbuffer; /* newly allocated buffer */ - JOCTET * buffer; /* start of buffer */ - size_t bufsize; -} my_mem_destination_mgr; - -typedef my_mem_destination_mgr * my_mem_dest_ptr; - - -/* - * Initialize destination --- called by jpeg_start_compress - * before any data is actually written. - */ - -METHODDEF(void) -init_destination (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - - /* Allocate the output buffer --- it will be released when done with image */ - dest->buffer = (JOCTET *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, OUTPUT_BUF_SIZE * SIZEOF(JOCTET)); - - dest->pub.next_output_byte = dest->buffer; - dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; -} - -METHODDEF(void) -init_mem_destination (j_compress_ptr cinfo) -{ - /* no work necessary here */ -} - - -/* - * Empty the output buffer --- called whenever buffer fills up. - * - * In typical applications, this should write the entire output buffer - * (ignoring the current state of next_output_byte & free_in_buffer), - * reset the pointer & count to the start of the buffer, and return TRUE - * indicating that the buffer has been dumped. - * - * In applications that need to be able to suspend compression due to output - * overrun, a FALSE return indicates that the buffer cannot be emptied now. - * In this situation, the compressor will return to its caller (possibly with - * an indication that it has not accepted all the supplied scanlines). The - * application should resume compression after it has made more room in the - * output buffer. Note that there are substantial restrictions on the use of - * suspension --- see the documentation. - * - * When suspending, the compressor will back up to a convenient restart point - * (typically the start of the current MCU). next_output_byte & free_in_buffer - * indicate where the restart point will be if the current call returns FALSE. - * Data beyond this point will be regenerated after resumption, so do not - * write it out when emptying the buffer externally. - */ - -METHODDEF(boolean) -empty_output_buffer (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - - if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) != - (size_t) OUTPUT_BUF_SIZE) - ERREXIT(cinfo, JERR_FILE_WRITE); - - dest->pub.next_output_byte = dest->buffer; - dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; - - return TRUE; -} - -METHODDEF(boolean) -empty_mem_output_buffer (j_compress_ptr cinfo) -{ - size_t nextsize; - JOCTET * nextbuffer; - my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest; - - /* Try to allocate new buffer with double size */ - nextsize = dest->bufsize * 2; - nextbuffer = (JOCTET *) malloc(nextsize); - - if (nextbuffer == NULL) - ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 11); - - MEMCOPY(nextbuffer, dest->buffer, dest->bufsize); - - if (dest->newbuffer != NULL) - free(dest->newbuffer); - - dest->newbuffer = nextbuffer; - - dest->pub.next_output_byte = nextbuffer + dest->bufsize; - dest->pub.free_in_buffer = dest->bufsize; - - dest->buffer = nextbuffer; - dest->bufsize = nextsize; - - return TRUE; -} - - -/* - * Terminate destination --- called by jpeg_finish_compress - * after all data has been written. Usually needs to flush buffer. - * - * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding - * application must deal with any cleanup that should happen even - * for error exit. - */ - -METHODDEF(void) -term_destination (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer; - - /* Write any data remaining in the buffer */ - if (datacount > 0) { - if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount) - ERREXIT(cinfo, JERR_FILE_WRITE); - } - JFFLUSH(dest->outfile); - /* Make sure we wrote the output file OK */ - if (JFERROR(dest->outfile)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - -METHODDEF(void) -term_mem_destination (j_compress_ptr cinfo) -{ - my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest; - - *dest->outbuffer = dest->buffer; - *dest->outsize = dest->bufsize - dest->pub.free_in_buffer; -} - - -/* - * Prepare for output to a stdio stream. - * The caller must have already opened the stream, and is responsible - * for closing it after finishing compression. - */ - -GLOBAL(void) -jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile) -{ - my_dest_ptr dest; - - /* The destination object is made permanent so that multiple JPEG images - * can be written to the same file without re-executing jpeg_stdio_dest. - * This makes it dangerous to use this manager and a different destination - * manager serially with the same JPEG object, because their private object - * sizes may be different. Caveat programmer. - */ - if (cinfo->dest == NULL) { /* first time for this JPEG object? */ - cinfo->dest = (struct jpeg_destination_mgr *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(my_destination_mgr)); - } - - dest = (my_dest_ptr) cinfo->dest; - dest->pub.init_destination = init_destination; - dest->pub.empty_output_buffer = empty_output_buffer; - dest->pub.term_destination = term_destination; - dest->outfile = outfile; -} - - -/* - * Prepare for output to a memory buffer. - * The caller may supply an own initial buffer with appropriate size. - * Otherwise, or when the actual data output exceeds the given size, - * the library adapts the buffer size as necessary. - * The standard library functions malloc/free are used for allocating - * larger memory, so the buffer is available to the application after - * finishing compression, and then the application is responsible for - * freeing the requested memory. - * Note: An initial buffer supplied by the caller is expected to be - * managed by the application. The library does not free such buffer - * when allocating a larger buffer. - */ - -GLOBAL(void) -jpeg_mem_dest (j_compress_ptr cinfo, - unsigned char ** outbuffer, size_t * outsize) -{ - my_mem_dest_ptr dest; - - if (outbuffer == NULL || outsize == NULL) /* sanity check */ - ERREXIT(cinfo, JERR_BUFFER_SIZE); - - /* The destination object is made permanent so that multiple JPEG images - * can be written to the same buffer without re-executing jpeg_mem_dest. - */ - if (cinfo->dest == NULL) { /* first time for this JPEG object? */ - cinfo->dest = (struct jpeg_destination_mgr *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(my_mem_destination_mgr)); - } - - dest = (my_mem_dest_ptr) cinfo->dest; - dest->pub.init_destination = init_mem_destination; - dest->pub.empty_output_buffer = empty_mem_output_buffer; - dest->pub.term_destination = term_mem_destination; - dest->outbuffer = outbuffer; - dest->outsize = outsize; - dest->newbuffer = NULL; - - if (*outbuffer == NULL || *outsize == 0) { - /* Allocate initial buffer */ - dest->newbuffer = *outbuffer = (unsigned char *) malloc(OUTPUT_BUF_SIZE); - if (dest->newbuffer == NULL) - ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10); - *outsize = OUTPUT_BUF_SIZE; - } - - dest->pub.next_output_byte = dest->buffer = *outbuffer; - dest->pub.free_in_buffer = dest->bufsize = *outsize; -} diff --git a/thirdparty/jpeg-9e/jdatasrc.c b/thirdparty/jpeg-9e/jdatasrc.c deleted file mode 100644 index 606ae11..0000000 --- a/thirdparty/jpeg-9e/jdatasrc.c +++ /dev/null @@ -1,274 +0,0 @@ -/* - * jdatasrc.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2009-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains decompression data source routines for the case of - * reading JPEG data from memory or from a file (or any stdio stream). - * While these routines are sufficient for most applications, - * some will want to use a different source manager. - * IMPORTANT: we assume that fread() will correctly transcribe an array of - * JOCTETs from 8-bit-wide elements on external storage. If char is wider - * than 8 bits on your machine, you may need to do some tweaking. - */ - -/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ -#include "jinclude.h" -#include "jpeglib.h" -#include "jerror.h" - - -/* Expanded data source object for stdio input */ - -typedef struct { - struct jpeg_source_mgr pub; /* public fields */ - - FILE * infile; /* source stream */ - JOCTET * buffer; /* start of buffer */ - boolean start_of_file; /* have we gotten any data yet? */ -} my_source_mgr; - -typedef my_source_mgr * my_src_ptr; - -#define INPUT_BUF_SIZE 4096 /* choose an efficiently fread'able size */ - - -/* - * Initialize source --- called by jpeg_read_header - * before any data is actually read. - */ - -METHODDEF(void) -init_source (j_decompress_ptr cinfo) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - - /* We reset the empty-input-file flag for each image, - * but we don't clear the input buffer. - * This is correct behavior for reading a series of images from one source. - */ - src->start_of_file = TRUE; -} - -METHODDEF(void) -init_mem_source (j_decompress_ptr cinfo) -{ - /* no work necessary here */ -} - - -/* - * Fill the input buffer --- called whenever buffer is emptied. - * - * In typical applications, this should read fresh data into the buffer - * (ignoring the current state of next_input_byte & bytes_in_buffer), - * reset the pointer & count to the start of the buffer, and return TRUE - * indicating that the buffer has been reloaded. It is not necessary to - * fill the buffer entirely, only to obtain at least one more byte. - * - * There is no such thing as an EOF return. If the end of the file has been - * reached, the routine has a choice of ERREXIT() or inserting fake data into - * the buffer. In most cases, generating a warning message and inserting a - * fake EOI marker is the best course of action --- this will allow the - * decompressor to output however much of the image is there. However, - * the resulting error message is misleading if the real problem is an empty - * input file, so we handle that case specially. - * - * In applications that need to be able to suspend compression due to input - * not being available yet, a FALSE return indicates that no more data can be - * obtained right now, but more may be forthcoming later. In this situation, - * the decompressor will return to its caller (with an indication of the - * number of scanlines it has read, if any). The application should resume - * decompression after it has loaded more data into the input buffer. Note - * that there are substantial restrictions on the use of suspension --- see - * the documentation. - * - * When suspending, the decompressor will back up to a convenient restart point - * (typically the start of the current MCU). next_input_byte & bytes_in_buffer - * indicate where the restart point will be if the current call returns FALSE. - * Data beyond this point must be rescanned after resumption, so move it to - * the front of the buffer rather than discarding it. - */ - -METHODDEF(boolean) -fill_input_buffer (j_decompress_ptr cinfo) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - size_t nbytes; - - nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE); - - if (nbytes <= 0) { - if (src->start_of_file) /* Treat empty input file as fatal error */ - ERREXIT(cinfo, JERR_INPUT_EMPTY); - WARNMS(cinfo, JWRN_JPEG_EOF); - /* Insert a fake EOI marker */ - src->buffer[0] = (JOCTET) 0xFF; - src->buffer[1] = (JOCTET) JPEG_EOI; - nbytes = 2; - } - - src->pub.next_input_byte = src->buffer; - src->pub.bytes_in_buffer = nbytes; - src->start_of_file = FALSE; - - return TRUE; -} - -METHODDEF(boolean) -fill_mem_input_buffer (j_decompress_ptr cinfo) -{ - static const JOCTET mybuffer[4] = { - (JOCTET) 0xFF, (JOCTET) JPEG_EOI, 0, 0 - }; - - /* The whole JPEG data is expected to reside in the supplied memory - * buffer, so any request for more data beyond the given buffer size - * is treated as an error. - */ - WARNMS(cinfo, JWRN_JPEG_EOF); - - /* Insert a fake EOI marker */ - - cinfo->src->next_input_byte = mybuffer; - cinfo->src->bytes_in_buffer = 2; - - return TRUE; -} - - -/* - * Skip data --- used to skip over a potentially large amount of - * uninteresting data (such as an APPn marker). - * - * Writers of suspendable-input applications must note that skip_input_data - * is not granted the right to give a suspension return. If the skip extends - * beyond the data currently in the buffer, the buffer can be marked empty so - * that the next read will cause a fill_input_buffer call that can suspend. - * Arranging for additional bytes to be discarded before reloading the input - * buffer is the application writer's problem. - */ - -METHODDEF(void) -skip_input_data (j_decompress_ptr cinfo, long num_bytes) -{ - struct jpeg_source_mgr * src = cinfo->src; - size_t nbytes; - - /* Just a dumb implementation for now. Could use fseek() except - * it doesn't work on pipes. Not clear that being smart is worth - * any trouble anyway --- large skips are infrequent. - */ - if (num_bytes > 0) { - nbytes = (size_t) num_bytes; - while (nbytes > src->bytes_in_buffer) { - nbytes -= src->bytes_in_buffer; - (void) (*src->fill_input_buffer) (cinfo); - /* note we assume that fill_input_buffer will never return FALSE, - * so suspension need not be handled. - */ - } - src->next_input_byte += nbytes; - src->bytes_in_buffer -= nbytes; - } -} - - -/* - * An additional method that can be provided by data source modules is the - * resync_to_restart method for error recovery in the presence of RST markers. - * For the moment, this source module just uses the default resync method - * provided by the JPEG library. That method assumes that no backtracking - * is possible. - */ - - -/* - * Terminate source --- called by jpeg_finish_decompress - * after all data has been read. Often a no-op. - * - * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding - * application must deal with any cleanup that should happen even - * for error exit. - */ - -METHODDEF(void) -term_source (j_decompress_ptr cinfo) -{ - /* no work necessary here */ -} - - -/* - * Prepare for input from a stdio stream. - * The caller must have already opened the stream, and is responsible - * for closing it after finishing decompression. - */ - -GLOBAL(void) -jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) -{ - my_src_ptr src; - - /* The source object and input buffer are made permanent so that a series - * of JPEG images can be read from the same file by calling jpeg_stdio_src - * only before the first one. (If we discarded the buffer at the end of - * one image, we'd likely lose the start of the next one.) - * This makes it unsafe to use this manager and a different source - * manager serially with the same JPEG object. Caveat programmer. - */ - if (cinfo->src == NULL) { /* first time for this JPEG object? */ - cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(my_source_mgr)); - src = (my_src_ptr) cinfo->src; - src->buffer = (JOCTET *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_PERMANENT, INPUT_BUF_SIZE * SIZEOF(JOCTET)); - } - - src = (my_src_ptr) cinfo->src; - src->pub.init_source = init_source; - src->pub.fill_input_buffer = fill_input_buffer; - src->pub.skip_input_data = skip_input_data; - src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ - src->pub.term_source = term_source; - src->infile = infile; - src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ - src->pub.next_input_byte = NULL; /* until buffer loaded */ -} - - -/* - * Prepare for input from a supplied memory buffer. - * The buffer must contain the whole JPEG data. - */ - -GLOBAL(void) -jpeg_mem_src (j_decompress_ptr cinfo, - const unsigned char * inbuffer, size_t insize) -{ - struct jpeg_source_mgr * src; - - if (inbuffer == NULL || insize == 0) /* Treat empty input as fatal error */ - ERREXIT(cinfo, JERR_INPUT_EMPTY); - - /* The source object is made permanent so that a series of JPEG images - * can be read from the same buffer by calling jpeg_mem_src only before - * the first one. - */ - if (cinfo->src == NULL) { /* first time for this JPEG object? */ - cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(struct jpeg_source_mgr)); - } - - src = cinfo->src; - src->init_source = init_mem_source; - src->fill_input_buffer = fill_mem_input_buffer; - src->skip_input_data = skip_input_data; - src->resync_to_restart = jpeg_resync_to_restart; /* use default method */ - src->term_source = term_source; - src->bytes_in_buffer = insize; - src->next_input_byte = (const JOCTET *) inbuffer; -} diff --git a/thirdparty/jpeg-9e/jdcoefct.c b/thirdparty/jpeg-9e/jdcoefct.c deleted file mode 100644 index 79ba420..0000000 --- a/thirdparty/jpeg-9e/jdcoefct.c +++ /dev/null @@ -1,744 +0,0 @@ -/* - * jdcoefct.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2002-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the coefficient buffer controller for decompression. - * This controller is the top level of the JPEG decompressor proper. - * The coefficient buffer lies between entropy decoding and inverse-DCT steps. - * - * In buffered-image mode, this controller is the interface between - * input-oriented processing and output-oriented processing. - * Also, the input side (only) is used when reading a file for transcoding. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Block smoothing is only applicable for progressive JPEG, so: */ -#ifndef D_PROGRESSIVE_SUPPORTED -#undef BLOCK_SMOOTHING_SUPPORTED -#endif - - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_d_coef_controller pub; /* public fields */ - - /* These variables keep track of the current location of the input side. */ - /* cinfo->input_iMCU_row is also used for this. */ - JDIMENSION MCU_ctr; /* counts MCUs processed in current row */ - int MCU_vert_offset; /* counts MCU rows within iMCU row */ - int MCU_rows_per_iMCU_row; /* number of such rows needed */ - - /* The output side's location is represented by cinfo->output_iMCU_row. */ - - /* In single-pass modes, it's sufficient to buffer just one MCU. - * We append a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks, - * and let the entropy decoder write into that workspace each time. - * In multi-pass modes, this array points to the current MCU's blocks - * within the virtual arrays; it is used only by the input side. - */ - JBLOCKROW MCU_buffer[D_MAX_BLOCKS_IN_MCU]; - -#ifdef D_MULTISCAN_FILES_SUPPORTED - /* In multi-pass modes, we need a virtual block array for each component. */ - jvirt_barray_ptr whole_image[MAX_COMPONENTS]; -#endif - -#ifdef BLOCK_SMOOTHING_SUPPORTED - /* When doing block smoothing, we latch coefficient Al values here */ - int * coef_bits_latch; -#define SAVED_COEFS 6 /* we save coef_bits[0..5] */ -#endif - - /* Workspace for single-pass modes (omitted otherwise). */ - JBLOCK blk_buffer[D_MAX_BLOCKS_IN_MCU]; -} my_coef_controller; - -typedef my_coef_controller * my_coef_ptr; - - -/* Forward declarations */ -METHODDEF(int) decompress_onepass - JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); -#ifdef D_MULTISCAN_FILES_SUPPORTED -METHODDEF(int) decompress_data - JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); -#endif -#ifdef BLOCK_SMOOTHING_SUPPORTED -LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo)); -METHODDEF(int) decompress_smooth_data - JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); -#endif - - -LOCAL(void) -start_iMCU_row (j_decompress_ptr cinfo) -/* Reset within-iMCU-row counters for a new row (input side) */ -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - /* In an interleaved scan, an MCU row is the same as an iMCU row. - * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. - * But at the bottom of the image, process only what's left. - */ - if (cinfo->comps_in_scan > 1) { - coef->MCU_rows_per_iMCU_row = 1; - } else { - if (cinfo->input_iMCU_row < (cinfo->total_iMCU_rows-1)) - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; - else - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; - } - - coef->MCU_ctr = 0; - coef->MCU_vert_offset = 0; -} - - -/* - * Initialize for an input processing pass. - */ - -METHODDEF(void) -start_input_pass (j_decompress_ptr cinfo) -{ - cinfo->input_iMCU_row = 0; - start_iMCU_row(cinfo); -} - - -/* - * Initialize for an output processing pass. - */ - -METHODDEF(void) -start_output_pass (j_decompress_ptr cinfo) -{ -#ifdef BLOCK_SMOOTHING_SUPPORTED - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - /* If multipass, check to see whether to use block smoothing on this pass */ - if (coef->pub.coef_arrays != NULL) { - if (cinfo->do_block_smoothing && smoothing_ok(cinfo)) - coef->pub.decompress_data = decompress_smooth_data; - else - coef->pub.decompress_data = decompress_data; - } -#endif - cinfo->output_iMCU_row = 0; -} - - -/* - * Decompress and return some data in the single-pass case. - * Always attempts to emit one fully interleaved MCU row ("iMCU" row). - * Input and output must run in lockstep since we have only a one-MCU buffer. - * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. - * - * NB: output_buf contains a plane for each component in image, - * which we index according to the component's SOF position. - */ - -METHODDEF(int) -decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION MCU_col_num; /* index of current MCU within row */ - JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - int ci, xindex, yindex, yoffset, useful_width; - JBLOCKROW blkp; - JSAMPARRAY output_ptr; - JDIMENSION start_col, output_col; - jpeg_component_info *compptr; - inverse_DCT_method_ptr inverse_DCT; - - /* Loop to process as much as one whole iMCU row */ - for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; - yoffset++) { - for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col; - MCU_col_num++) { - blkp = coef->blk_buffer; /* pointer to current DCT block within MCU */ - /* Try to fetch an MCU. Entropy decoder expects buffer to be zeroed. */ - if (cinfo->lim_Se) /* can bypass in DC only case */ - MEMZERO(blkp, cinfo->blocks_in_MCU * SIZEOF(JBLOCK)); - if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { - /* Suspension forced; update state counters and exit */ - coef->MCU_vert_offset = yoffset; - coef->MCU_ctr = MCU_col_num; - return JPEG_SUSPENDED; - } - /* Determine where data should go in output_buf and do the IDCT thing. - * We skip dummy blocks at the right and bottom edges (but blkp gets - * incremented past them!). - */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* Don't bother to IDCT an uninteresting component. */ - if (! compptr->component_needed) { - blkp += compptr->MCU_blocks; - continue; - } - inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index]; - output_ptr = output_buf[compptr->component_index] + - yoffset * compptr->DCT_v_scaled_size; - useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width - : compptr->last_col_width; - start_col = MCU_col_num * compptr->MCU_sample_width; - for (yindex = 0; yindex < compptr->MCU_height; yindex++) { - if (cinfo->input_iMCU_row < last_iMCU_row || - yoffset + yindex < compptr->last_row_height) { - output_col = start_col; - for (xindex = 0; xindex < useful_width; xindex++) { - (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) (blkp + xindex), - output_ptr, output_col); - output_col += compptr->DCT_h_scaled_size; - } - output_ptr += compptr->DCT_v_scaled_size; - } - blkp += compptr->MCU_width; - } - } - } - /* Completed an MCU row, but perhaps not an iMCU row */ - coef->MCU_ctr = 0; - } - /* Completed the iMCU row, advance counters for next one */ - cinfo->output_iMCU_row++; - if (++(cinfo->input_iMCU_row) <= last_iMCU_row) { - start_iMCU_row(cinfo); - return JPEG_ROW_COMPLETED; - } - /* Completed the scan */ - (*cinfo->inputctl->finish_input_pass) (cinfo); - return JPEG_SCAN_COMPLETED; -} - - -/* - * Dummy consume-input routine for single-pass operation. - */ - -METHODDEF(int) -dummy_consume_data (j_decompress_ptr cinfo) -{ - return JPEG_SUSPENDED; /* Always indicate nothing was done */ -} - - -#ifdef D_MULTISCAN_FILES_SUPPORTED - -/* - * Consume input data and store it in the full-image coefficient buffer. - * We read as much as one fully interleaved MCU row ("iMCU" row) per call, - * ie, v_samp_factor block rows for each component in the scan. - * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. - */ - -METHODDEF(int) -consume_data (j_decompress_ptr cinfo) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION MCU_col_num; /* index of current MCU within row */ - int ci, xindex, yindex, yoffset; - JDIMENSION start_col; - JBLOCKARRAY blkp; - JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; - JBLOCKROW buffer_ptr; - jpeg_component_info *compptr; - - /* Align the virtual buffers for the components used in this scan. */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - buffer[ci] = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], - cinfo->input_iMCU_row * compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, TRUE); - /* Note: entropy decoder expects buffer to be zeroed, - * but this is handled automatically by the memory manager - * because we requested a pre-zeroed array. - */ - } - - /* Loop to process one whole iMCU row */ - for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; - yoffset++) { - for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row; - MCU_col_num++) { - /* Construct list of pointers to DCT blocks belonging to this MCU */ - blkp = coef->MCU_buffer; /* pointer to current DCT block within MCU */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - start_col = MCU_col_num * compptr->MCU_width; - for (yindex = 0; yindex < compptr->MCU_height; yindex++) { - buffer_ptr = buffer[ci][yoffset + yindex] + start_col; - xindex = compptr->MCU_width; - do { - *blkp++ = buffer_ptr++; - } while (--xindex); - } - } - /* Try to fetch the MCU. */ - if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { - /* Suspension forced; update state counters and exit */ - coef->MCU_vert_offset = yoffset; - coef->MCU_ctr = MCU_col_num; - return JPEG_SUSPENDED; - } - } - /* Completed an MCU row, but perhaps not an iMCU row */ - coef->MCU_ctr = 0; - } - /* Completed the iMCU row, advance counters for next one */ - if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) { - start_iMCU_row(cinfo); - return JPEG_ROW_COMPLETED; - } - /* Completed the scan */ - (*cinfo->inputctl->finish_input_pass) (cinfo); - return JPEG_SCAN_COMPLETED; -} - - -/* - * Decompress and return some data in the multi-pass case. - * Always attempts to emit one fully interleaved MCU row ("iMCU" row). - * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. - * - * NB: output_buf contains a plane for each component in image. - */ - -METHODDEF(int) -decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - JDIMENSION block_num; - int ci, block_row, block_rows; - JBLOCKARRAY buffer; - JBLOCKROW buffer_ptr; - JSAMPARRAY output_ptr; - JDIMENSION output_col; - jpeg_component_info *compptr; - inverse_DCT_method_ptr inverse_DCT; - - /* Force some input to be done if we are getting ahead of the input. */ - while (cinfo->input_scan_number < cinfo->output_scan_number || - (cinfo->input_scan_number == cinfo->output_scan_number && - cinfo->input_iMCU_row <= cinfo->output_iMCU_row)) { - if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) - return JPEG_SUSPENDED; - } - - /* OK, output from the virtual arrays. */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Don't bother to IDCT an uninteresting component. */ - if (! compptr->component_needed) - continue; - /* Align the virtual buffer for this component. */ - buffer = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[ci], - cinfo->output_iMCU_row * compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, FALSE); - /* Count non-dummy DCT block rows in this iMCU row. */ - if (cinfo->output_iMCU_row < last_iMCU_row) - block_rows = compptr->v_samp_factor; - else { - /* NB: can't use last_row_height here; it is input-side-dependent! */ - block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); - if (block_rows == 0) block_rows = compptr->v_samp_factor; - } - inverse_DCT = cinfo->idct->inverse_DCT[ci]; - output_ptr = output_buf[ci]; - /* Loop over all DCT blocks to be processed. */ - for (block_row = 0; block_row < block_rows; block_row++) { - buffer_ptr = buffer[block_row]; - output_col = 0; - for (block_num = 0; block_num < compptr->width_in_blocks; block_num++) { - (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr, - output_ptr, output_col); - buffer_ptr++; - output_col += compptr->DCT_h_scaled_size; - } - output_ptr += compptr->DCT_v_scaled_size; - } - } - - if (++(cinfo->output_iMCU_row) <= last_iMCU_row) - return JPEG_ROW_COMPLETED; - return JPEG_SCAN_COMPLETED; -} - -#endif /* D_MULTISCAN_FILES_SUPPORTED */ - - -#ifdef BLOCK_SMOOTHING_SUPPORTED - -/* - * This code applies interblock smoothing as described by section K.8 - * of the JPEG standard: the first 5 AC coefficients are estimated from - * the DC values of a DCT block and its 8 neighboring blocks. - * We apply smoothing only for progressive JPEG decoding, and only if - * the coefficients it can estimate are not yet known to full precision. - */ - -/* Natural-order array positions of the first 5 zigzag-order coefficients */ -#define Q01_POS 1 -#define Q10_POS 8 -#define Q20_POS 16 -#define Q11_POS 9 -#define Q02_POS 2 - -/* - * Determine whether block smoothing is applicable and safe. - * We also latch the current states of the coef_bits[] entries for the - * AC coefficients; otherwise, if the input side of the decompressor - * advances into a new scan, we might think the coefficients are known - * more accurately than they really are. - */ - -LOCAL(boolean) -smoothing_ok (j_decompress_ptr cinfo) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - boolean smoothing_useful = FALSE; - int ci, coefi; - jpeg_component_info *compptr; - JQUANT_TBL * qtable; - int * coef_bits; - int * coef_bits_latch; - - if (! cinfo->progressive_mode || cinfo->coef_bits == NULL) - return FALSE; - - /* Allocate latch area if not already done */ - if (coef->coef_bits_latch == NULL) - coef->coef_bits_latch = (int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->num_components * (SAVED_COEFS * SIZEOF(int))); - coef_bits_latch = coef->coef_bits_latch; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* All components' quantization values must already be latched. */ - if ((qtable = compptr->quant_table) == NULL) - return FALSE; - /* Verify DC & first 5 AC quantizers are nonzero to avoid zero-divide. */ - if (qtable->quantval[0] == 0 || - qtable->quantval[Q01_POS] == 0 || - qtable->quantval[Q10_POS] == 0 || - qtable->quantval[Q20_POS] == 0 || - qtable->quantval[Q11_POS] == 0 || - qtable->quantval[Q02_POS] == 0) - return FALSE; - /* DC values must be at least partly known for all components. */ - coef_bits = cinfo->coef_bits[ci]; - if (coef_bits[0] < 0) - return FALSE; - /* Block smoothing is helpful if some AC coefficients remain inaccurate. */ - for (coefi = 1; coefi <= 5; coefi++) { - coef_bits_latch[coefi] = coef_bits[coefi]; - if (coef_bits[coefi] != 0) - smoothing_useful = TRUE; - } - coef_bits_latch += SAVED_COEFS; - } - - return smoothing_useful; -} - - -/* - * Variant of decompress_data for use when doing block smoothing. - */ - -METHODDEF(int) -decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - JDIMENSION block_num, last_block_column; - int ci, block_row, block_rows, access_rows; - JBLOCKARRAY buffer; - JBLOCKROW buffer_ptr, prev_block_row, next_block_row; - JSAMPARRAY output_ptr; - JDIMENSION output_col; - jpeg_component_info *compptr; - inverse_DCT_method_ptr inverse_DCT; - boolean first_row, last_row; - JBLOCK workspace; - int *coef_bits; - JQUANT_TBL *quanttbl; - INT32 Q00,Q01,Q02,Q10,Q11,Q20, num; - int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9; - int Al, pred; - - /* Force some input to be done if we are getting ahead of the input. */ - while (cinfo->input_scan_number <= cinfo->output_scan_number && - ! cinfo->inputctl->eoi_reached) { - if (cinfo->input_scan_number == cinfo->output_scan_number) { - /* If input is working on current scan, we ordinarily want it to - * have completed the current row. But if input scan is DC, - * we want it to keep one row ahead so that next block row's DC - * values are up to date. - */ - JDIMENSION delta = (cinfo->Ss == 0) ? 1 : 0; - if (cinfo->input_iMCU_row > cinfo->output_iMCU_row+delta) - break; - } - if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) - return JPEG_SUSPENDED; - } - - /* OK, output from the virtual arrays. */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Don't bother to IDCT an uninteresting component. */ - if (! compptr->component_needed) - continue; - /* Count non-dummy DCT block rows in this iMCU row. */ - if (cinfo->output_iMCU_row < last_iMCU_row) { - block_rows = compptr->v_samp_factor; - access_rows = block_rows * 2; /* this and next iMCU row */ - last_row = FALSE; - } else { - /* NB: can't use last_row_height here; it is input-side-dependent! */ - block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); - if (block_rows == 0) block_rows = compptr->v_samp_factor; - access_rows = block_rows; /* this iMCU row only */ - last_row = TRUE; - } - /* Align the virtual buffer for this component. */ - if (cinfo->output_iMCU_row > 0) { - access_rows += compptr->v_samp_factor; /* prior iMCU row too */ - buffer = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[ci], - (cinfo->output_iMCU_row - 1) * compptr->v_samp_factor, - (JDIMENSION) access_rows, FALSE); - buffer += compptr->v_samp_factor; /* point to current iMCU row */ - first_row = FALSE; - } else { - buffer = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[ci], - (JDIMENSION) 0, (JDIMENSION) access_rows, FALSE); - first_row = TRUE; - } - /* Fetch component-dependent info */ - coef_bits = coef->coef_bits_latch + (ci * SAVED_COEFS); - quanttbl = compptr->quant_table; - Q00 = quanttbl->quantval[0]; - Q01 = quanttbl->quantval[Q01_POS]; - Q10 = quanttbl->quantval[Q10_POS]; - Q20 = quanttbl->quantval[Q20_POS]; - Q11 = quanttbl->quantval[Q11_POS]; - Q02 = quanttbl->quantval[Q02_POS]; - inverse_DCT = cinfo->idct->inverse_DCT[ci]; - output_ptr = output_buf[ci]; - /* Loop over all DCT blocks to be processed. */ - for (block_row = 0; block_row < block_rows; block_row++) { - buffer_ptr = buffer[block_row]; - if (first_row && block_row == 0) - prev_block_row = buffer_ptr; - else - prev_block_row = buffer[block_row-1]; - if (last_row && block_row == block_rows-1) - next_block_row = buffer_ptr; - else - next_block_row = buffer[block_row+1]; - /* We fetch the surrounding DC values using a sliding-register approach. - * Initialize all nine here so as to do the right thing on narrow pics. - */ - DC1 = DC2 = DC3 = (int) prev_block_row[0][0]; - DC4 = DC5 = DC6 = (int) buffer_ptr[0][0]; - DC7 = DC8 = DC9 = (int) next_block_row[0][0]; - output_col = 0; - last_block_column = compptr->width_in_blocks - 1; - for (block_num = 0; block_num <= last_block_column; block_num++) { - /* Fetch current DCT block into workspace so we can modify it. */ - jcopy_block_row(buffer_ptr, (JBLOCKROW) workspace, (JDIMENSION) 1); - /* Update DC values */ - if (block_num < last_block_column) { - DC3 = (int) prev_block_row[1][0]; - DC6 = (int) buffer_ptr[1][0]; - DC9 = (int) next_block_row[1][0]; - } - /* Compute coefficient estimates per K.8. - * An estimate is applied only if coefficient is still zero, - * and is not known to be fully accurate. - */ - /* AC01 */ - if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) { - num = 36 * Q00 * (DC4 - DC6); - if (num >= 0) { - pred = (int) (((Q01<<7) + num) / (Q01<<8)); - if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { - pred = (int) (((Q10<<7) + num) / (Q10<<8)); - if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { - pred = (int) (((Q20<<7) + num) / (Q20<<8)); - if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { - pred = (int) (((Q11<<7) + num) / (Q11<<8)); - if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { - pred = (int) (((Q02<<7) + num) / (Q02<<8)); - if (Al > 0 && pred >= (1< 0 && pred >= (1<DCT_h_scaled_size; - } - output_ptr += compptr->DCT_v_scaled_size; - } - } - - if (++(cinfo->output_iMCU_row) <= last_iMCU_row) - return JPEG_ROW_COMPLETED; - return JPEG_SCAN_COMPLETED; -} - -#endif /* BLOCK_SMOOTHING_SUPPORTED */ - - -/* - * Initialize coefficient buffer controller. - */ - -GLOBAL(void) -jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer) -{ - my_coef_ptr coef; - - if (need_full_buffer) { -#ifdef D_MULTISCAN_FILES_SUPPORTED - /* Allocate a full-image virtual array for each component, */ - /* padded to a multiple of samp_factor DCT blocks in each direction. */ - /* Note we ask for a pre-zeroed array. */ - int ci, access_rows; - jpeg_component_info *compptr; - - coef = (my_coef_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_coef_controller) - SIZEOF(coef->blk_buffer)); - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - access_rows = compptr->v_samp_factor; -#ifdef BLOCK_SMOOTHING_SUPPORTED - /* If block smoothing could be used, need a bigger window */ - if (cinfo->progressive_mode) - access_rows *= 3; -#endif - coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, TRUE, - (JDIMENSION) jround_up((long) compptr->width_in_blocks, - (long) compptr->h_samp_factor), - (JDIMENSION) jround_up((long) compptr->height_in_blocks, - (long) compptr->v_samp_factor), - (JDIMENSION) access_rows); - } - coef->pub.consume_data = consume_data; - coef->pub.decompress_data = decompress_data; - coef->pub.coef_arrays = coef->whole_image; /* link to virtual arrays */ -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else { - /* We only need a single-MCU buffer. */ - JBLOCKARRAY blkp; - JBLOCKROW buffer_ptr; - int bi; - - coef = (my_coef_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_coef_controller)); - buffer_ptr = coef->blk_buffer; - if (cinfo->lim_Se == 0) /* DC only case: want to bypass later */ - MEMZERO(buffer_ptr, SIZEOF(coef->blk_buffer)); - blkp = coef->MCU_buffer; - bi = D_MAX_BLOCKS_IN_MCU; - do { - *blkp++ = buffer_ptr++; - } while (--bi); - coef->pub.consume_data = dummy_consume_data; - coef->pub.decompress_data = decompress_onepass; - coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */ - } - - coef->pub.start_input_pass = start_input_pass; - coef->pub.start_output_pass = start_output_pass; -#ifdef BLOCK_SMOOTHING_SUPPORTED - coef->coef_bits_latch = NULL; -#endif - cinfo->coef = &coef->pub; -} diff --git a/thirdparty/jpeg-9e/jdcolor.c b/thirdparty/jpeg-9e/jdcolor.c deleted file mode 100644 index 7750df1..0000000 --- a/thirdparty/jpeg-9e/jdcolor.c +++ /dev/null @@ -1,778 +0,0 @@ -/* - * jdcolor.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2011-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains output colorspace conversion routines. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -#if RANGE_BITS < 2 - /* Deliberate syntax err */ - Sorry, this code requires 2 or more range extension bits. -#endif - - -/* Private subobject */ - -typedef struct { - struct jpeg_color_deconverter pub; /* public fields */ - - /* Private state for YCbCr->RGB and BG_YCC->RGB conversion */ - int * Cr_r_tab; /* => table for Cr to R conversion */ - int * Cb_b_tab; /* => table for Cb to B conversion */ - INT32 * Cr_g_tab; /* => table for Cr to G conversion */ - INT32 * Cb_g_tab; /* => table for Cb to G conversion */ - - /* Private state for RGB->Y conversion */ - INT32 * rgb_y_tab; /* => table for RGB to Y conversion */ -} my_color_deconverter; - -typedef my_color_deconverter * my_cconvert_ptr; - - -/*************** YCbCr -> RGB conversion: most common case **************/ -/*************** BG_YCC -> RGB conversion: less common case **************/ -/*************** RGB -> Y conversion: less common case **************/ - -/* - * YCbCr is defined per Recommendation ITU-R BT.601-7 (03/2011), - * previously known as Recommendation CCIR 601-1, except that Cb and Cr - * are normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. - * sRGB (standard RGB color space) is defined per IEC 61966-2-1:1999. - * sYCC (standard luma-chroma-chroma color space with extended gamut) - * is defined per IEC 61966-2-1:1999 Amendment A1:2003 Annex F. - * bg-sRGB and bg-sYCC (big gamut standard color spaces) - * are defined per IEC 61966-2-1:1999 Amendment A1:2003 Annex G. - * Note that the derived conversion coefficients given in some of these - * documents are imprecise. The general conversion equations are - * - * R = Y + K * (1 - Kr) * Cr - * G = Y - K * (Kb * (1 - Kb) * Cb + Kr * (1 - Kr) * Cr) / (1 - Kr - Kb) - * B = Y + K * (1 - Kb) * Cb - * - * Y = Kr * R + (1 - Kr - Kb) * G + Kb * B - * - * With Kr = 0.299 and Kb = 0.114 (derived according to SMPTE RP 177-1993 - * from the 1953 FCC NTSC primaries and CIE Illuminant C), K = 2 for sYCC, - * the conversion equations to be implemented are therefore - * - * R = Y + 1.402 * Cr - * G = Y - 0.344136286 * Cb - 0.714136286 * Cr - * B = Y + 1.772 * Cb - * - * Y = 0.299 * R + 0.587 * G + 0.114 * B - * - * where Cb and Cr represent the incoming values less CENTERJSAMPLE. - * For bg-sYCC, with K = 4, the equations are - * - * R = Y + 2.804 * Cr - * G = Y - 0.688272572 * Cb - 1.428272572 * Cr - * B = Y + 3.544 * Cb - * - * To avoid floating-point arithmetic, we represent the fractional constants - * as integers scaled up by 2^16 (about 4 digits precision); we have to divide - * the products by 2^16, with appropriate rounding, to get the correct answer. - * Notice that Y, being an integral input, does not contribute any fraction - * so it need not participate in the rounding. - * - * For even more speed, we avoid doing any multiplications in the inner loop - * by precalculating the constants times Cb and Cr for all possible values. - * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); - * for 9-bit to 12-bit samples it is still acceptable. It's not very - * reasonable for 16-bit samples, but if you want lossless storage you - * shouldn't be changing colorspace anyway. - * The Cr=>R and Cb=>B values can be rounded to integers in advance; the - * values for the G calculation are left scaled up, since we must add them - * together before rounding. - */ - -#define SCALEBITS 16 /* speediest right-shift on some machines */ -#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) -#define FIX(x) ((INT32) ((x) * (1L<Y conversion and divide it up into - * three parts, instead of doing three alloc_small requests. This lets us - * use a single table base address, which can be held in a register in the - * inner loops on many machines (more than can hold all three addresses, - * anyway). - */ - -#define R_Y_OFF 0 /* offset to R => Y section */ -#define G_Y_OFF (1*(MAXJSAMPLE+1)) /* offset to G => Y section */ -#define B_Y_OFF (2*(MAXJSAMPLE+1)) /* etc. */ -#define TABLE_SIZE (3*(MAXJSAMPLE+1)) - - -/* - * Initialize tables for YCbCr->RGB and BG_YCC->RGB colorspace conversion. - */ - -LOCAL(void) -build_ycc_rgb_table (j_decompress_ptr cinfo) -/* Normal case, sYCC */ -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - int i; - INT32 x; - SHIFT_TEMPS - - cconvert->Cr_r_tab = (int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); - cconvert->Cb_b_tab = (int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); - cconvert->Cr_g_tab = (INT32 *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); - cconvert->Cb_g_tab = (INT32 *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); - - for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { - /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ - /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ - /* Cr=>R value is nearest int to 1.402 * x */ - cconvert->Cr_r_tab[i] = (int) DESCALE(FIX(1.402) * x, SCALEBITS); - /* Cb=>B value is nearest int to 1.772 * x */ - cconvert->Cb_b_tab[i] = (int) DESCALE(FIX(1.772) * x, SCALEBITS); - /* Cr=>G value is scaled-up -0.714136286 * x */ - cconvert->Cr_g_tab[i] = (- FIX(0.714136286)) * x; - /* Cb=>G value is scaled-up -0.344136286 * x */ - /* We also add in ONE_HALF so that need not do it in inner loop */ - cconvert->Cb_g_tab[i] = (- FIX(0.344136286)) * x + ONE_HALF; - } -} - - -LOCAL(void) -build_bg_ycc_rgb_table (j_decompress_ptr cinfo) -/* Wide gamut case, bg-sYCC */ -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - int i; - INT32 x; - SHIFT_TEMPS - - cconvert->Cr_r_tab = (int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); - cconvert->Cb_b_tab = (int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); - cconvert->Cr_g_tab = (INT32 *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); - cconvert->Cb_g_tab = (INT32 *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); - - for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { - /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ - /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ - /* Cr=>R value is nearest int to 2.804 * x */ - cconvert->Cr_r_tab[i] = (int) DESCALE(FIX(2.804) * x, SCALEBITS); - /* Cb=>B value is nearest int to 3.544 * x */ - cconvert->Cb_b_tab[i] = (int) DESCALE(FIX(3.544) * x, SCALEBITS); - /* Cr=>G value is scaled-up -1.428272572 * x */ - cconvert->Cr_g_tab[i] = (- FIX(1.428272572)) * x; - /* Cb=>G value is scaled-up -0.688272572 * x */ - /* We also add in ONE_HALF so that need not do it in inner loop */ - cconvert->Cb_g_tab[i] = (- FIX(0.688272572)) * x + ONE_HALF; - } -} - - -/* - * Convert some rows of samples to the output colorspace. - * - * Note that we change from noninterleaved, one-plane-per-component format - * to interleaved-pixel format. The output buffer is therefore three times - * as wide as the input buffer. - * - * A starting row offset is provided only for the input buffer. The caller - * can easily adjust the passed output_buf value to accommodate any row - * offset required on that side. - */ - -METHODDEF(void) -ycc_rgb_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int y, cb, cr; - register JSAMPROW outptr; - register JSAMPROW inptr0, inptr1, inptr2; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - /* copy these pointers into registers if possible */ - register JSAMPLE * range_limit = cinfo->sample_range_limit; - register int * Crrtab = cconvert->Cr_r_tab; - register int * Cbbtab = cconvert->Cb_b_tab; - register INT32 * Crgtab = cconvert->Cr_g_tab; - register INT32 * Cbgtab = cconvert->Cb_g_tab; - SHIFT_TEMPS - - while (--num_rows >= 0) { - inptr0 = input_buf[0][input_row]; - inptr1 = input_buf[1][input_row]; - inptr2 = input_buf[2][input_row]; - input_row++; - outptr = *output_buf++; - for (col = 0; col < num_cols; col++) { - y = GETJSAMPLE(inptr0[col]); - cb = GETJSAMPLE(inptr1[col]); - cr = GETJSAMPLE(inptr2[col]); - /* Range-limiting is essential due to noise introduced by DCT losses, - * for extended gamut (sYCC) and wide gamut (bg-sYCC) encodings. - */ - outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; - outptr[RGB_GREEN] = range_limit[y + - ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], - SCALEBITS))]; - outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]]; - outptr += RGB_PIXELSIZE; - } - } -} - - -/**************** Cases other than YCC -> RGB ****************/ - - -/* - * Initialize for RGB->grayscale colorspace conversion. - */ - -LOCAL(void) -build_rgb_y_table (j_decompress_ptr cinfo) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - INT32 * rgb_y_tab; - INT32 i; - - /* Allocate and fill in the conversion tables. */ - cconvert->rgb_y_tab = rgb_y_tab = (INT32 *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, TABLE_SIZE * SIZEOF(INT32)); - - for (i = 0; i <= MAXJSAMPLE; i++) { - rgb_y_tab[i+R_Y_OFF] = FIX(0.299) * i; - rgb_y_tab[i+G_Y_OFF] = FIX(0.587) * i; - rgb_y_tab[i+B_Y_OFF] = FIX(0.114) * i + ONE_HALF; - } -} - - -/* - * Convert RGB to grayscale. - */ - -METHODDEF(void) -rgb_gray_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int r, g, b; - register INT32 * ctab = cconvert->rgb_y_tab; - register JSAMPROW outptr; - register JSAMPROW inptr0, inptr1, inptr2; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - - while (--num_rows >= 0) { - inptr0 = input_buf[0][input_row]; - inptr1 = input_buf[1][input_row]; - inptr2 = input_buf[2][input_row]; - input_row++; - outptr = *output_buf++; - for (col = 0; col < num_cols; col++) { - r = GETJSAMPLE(inptr0[col]); - g = GETJSAMPLE(inptr1[col]); - b = GETJSAMPLE(inptr2[col]); - /* Y */ - outptr[col] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - } - } -} - - -/* - * Convert some rows of samples to the output colorspace. - * [R-G,G,B-G] to [R,G,B] conversion with modulo calculation - * (inverse color transform). - * This can be seen as an adaption of the general YCbCr->RGB - * conversion equation with Kr = Kb = 0, while replacing the - * normalization by modulo calculation. - */ - -METHODDEF(void) -rgb1_rgb_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - register int r, g, b; - register JSAMPROW outptr; - register JSAMPROW inptr0, inptr1, inptr2; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - - while (--num_rows >= 0) { - inptr0 = input_buf[0][input_row]; - inptr1 = input_buf[1][input_row]; - inptr2 = input_buf[2][input_row]; - input_row++; - outptr = *output_buf++; - for (col = 0; col < num_cols; col++) { - r = GETJSAMPLE(inptr0[col]); - g = GETJSAMPLE(inptr1[col]); - b = GETJSAMPLE(inptr2[col]); - /* Assume that MAXJSAMPLE+1 is a power of 2, so that the MOD - * (modulo) operator is equivalent to the bitmask operator AND. - */ - outptr[RGB_RED] = (JSAMPLE) ((r + g - CENTERJSAMPLE) & MAXJSAMPLE); - outptr[RGB_GREEN] = (JSAMPLE) g; - outptr[RGB_BLUE] = (JSAMPLE) ((b + g - CENTERJSAMPLE) & MAXJSAMPLE); - outptr += RGB_PIXELSIZE; - } - } -} - - -/* - * [R-G,G,B-G] to grayscale conversion with modulo calculation - * (inverse color transform). - */ - -METHODDEF(void) -rgb1_gray_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int r, g, b; - register INT32 * ctab = cconvert->rgb_y_tab; - register JSAMPROW outptr; - register JSAMPROW inptr0, inptr1, inptr2; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - - while (--num_rows >= 0) { - inptr0 = input_buf[0][input_row]; - inptr1 = input_buf[1][input_row]; - inptr2 = input_buf[2][input_row]; - input_row++; - outptr = *output_buf++; - for (col = 0; col < num_cols; col++) { - r = GETJSAMPLE(inptr0[col]); - g = GETJSAMPLE(inptr1[col]); - b = GETJSAMPLE(inptr2[col]); - /* Assume that MAXJSAMPLE+1 is a power of 2, so that the MOD - * (modulo) operator is equivalent to the bitmask operator AND. - */ - r = (r + g - CENTERJSAMPLE) & MAXJSAMPLE; - b = (b + g - CENTERJSAMPLE) & MAXJSAMPLE; - /* Y */ - outptr[col] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - } - } -} - - -/* - * Convert some rows of samples to the output colorspace. - * No colorspace change, but conversion from separate-planes - * to interleaved representation. - */ - -METHODDEF(void) -rgb_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - register JSAMPROW outptr; - register JSAMPROW inptr0, inptr1, inptr2; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - - while (--num_rows >= 0) { - inptr0 = input_buf[0][input_row]; - inptr1 = input_buf[1][input_row]; - inptr2 = input_buf[2][input_row]; - input_row++; - outptr = *output_buf++; - for (col = 0; col < num_cols; col++) { - /* We can dispense with GETJSAMPLE() here */ - outptr[RGB_RED] = inptr0[col]; - outptr[RGB_GREEN] = inptr1[col]; - outptr[RGB_BLUE] = inptr2[col]; - outptr += RGB_PIXELSIZE; - } - } -} - - -/* - * Color conversion for no colorspace change: just copy the data, - * converting from separate-planes to interleaved representation. - * Note: Omit uninteresting components in output buffer. - */ - -METHODDEF(void) -null_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - register JSAMPROW outptr; - register JSAMPROW inptr; - register JDIMENSION count; - register int out_comps = cinfo->out_color_components; - JDIMENSION num_cols = cinfo->output_width; - JSAMPROW startptr; - int ci; - jpeg_component_info *compptr; - - while (--num_rows >= 0) { - /* It seems fastest to make a separate pass for each component. */ - startptr = *output_buf++; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (! compptr->component_needed) - continue; /* skip uninteresting component */ - inptr = input_buf[ci][input_row]; - outptr = startptr++; - for (count = num_cols; count > 0; count--) { - *outptr = *inptr++; /* don't need GETJSAMPLE() here */ - outptr += out_comps; - } - } - input_row++; - } -} - - -/* - * Color conversion for grayscale: just copy the data. - * This also works for YCC -> grayscale conversion, in which - * we just copy the Y (luminance) component and ignore chrominance. - */ - -METHODDEF(void) -grayscale_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - jcopy_sample_rows(input_buf[0] + input_row, output_buf, - num_rows, cinfo->output_width); -} - - -/* - * Convert grayscale to RGB: just duplicate the graylevel three times. - * This is provided to support applications that don't want to cope - * with grayscale as a separate case. - */ - -METHODDEF(void) -gray_rgb_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - register JSAMPROW outptr; - register JSAMPROW inptr; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - - while (--num_rows >= 0) { - inptr = input_buf[0][input_row++]; - outptr = *output_buf++; - for (col = 0; col < num_cols; col++) { - /* We can dispense with GETJSAMPLE() here */ - outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; - outptr += RGB_PIXELSIZE; - } - } -} - - -/* - * Convert some rows of samples to the output colorspace. - * This version handles Adobe-style YCCK->CMYK conversion, - * where we convert YCbCr to R=1-C, G=1-M, and B=1-Y using the - * same conversion as above, while passing K (black) unchanged. - * We assume build_ycc_rgb_table has been called. - */ - -METHODDEF(void) -ycck_cmyk_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int y, cb, cr; - register JSAMPROW outptr; - register JSAMPROW inptr0, inptr1, inptr2, inptr3; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - /* copy these pointers into registers if possible */ - register JSAMPLE * range_limit = cinfo->sample_range_limit; - register int * Crrtab = cconvert->Cr_r_tab; - register int * Cbbtab = cconvert->Cb_b_tab; - register INT32 * Crgtab = cconvert->Cr_g_tab; - register INT32 * Cbgtab = cconvert->Cb_g_tab; - SHIFT_TEMPS - - while (--num_rows >= 0) { - inptr0 = input_buf[0][input_row]; - inptr1 = input_buf[1][input_row]; - inptr2 = input_buf[2][input_row]; - inptr3 = input_buf[3][input_row]; - input_row++; - outptr = *output_buf++; - for (col = 0; col < num_cols; col++) { - y = GETJSAMPLE(inptr0[col]); - cb = GETJSAMPLE(inptr1[col]); - cr = GETJSAMPLE(inptr2[col]); - /* Range-limiting is essential due to noise introduced by DCT losses, - * and for extended gamut encodings (sYCC). - */ - outptr[0] = range_limit[MAXJSAMPLE - (y + Crrtab[cr])]; /* red */ - outptr[1] = range_limit[MAXJSAMPLE - (y + /* green */ - ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], - SCALEBITS)))]; - outptr[2] = range_limit[MAXJSAMPLE - (y + Cbbtab[cb])]; /* blue */ - /* K passes through unchanged */ - outptr[3] = inptr3[col]; /* don't need GETJSAMPLE here */ - outptr += 4; - } - } -} - - -/* - * Convert CMYK to YK part of YCCK for colorless output. - * We assume build_rgb_y_table has been called. - */ - -METHODDEF(void) -cmyk_yk_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int r, g, b; - register INT32 * ctab = cconvert->rgb_y_tab; - register JSAMPROW outptr; - register JSAMPROW inptr0, inptr1, inptr2, inptr3; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - - while (--num_rows >= 0) { - inptr0 = input_buf[0][input_row]; - inptr1 = input_buf[1][input_row]; - inptr2 = input_buf[2][input_row]; - inptr3 = input_buf[3][input_row]; - input_row++; - outptr = *output_buf++; - for (col = 0; col < num_cols; col++) { - r = MAXJSAMPLE - GETJSAMPLE(inptr0[col]); - g = MAXJSAMPLE - GETJSAMPLE(inptr1[col]); - b = MAXJSAMPLE - GETJSAMPLE(inptr2[col]); - /* Y */ - outptr[0] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - /* K passes through unchanged */ - outptr[1] = inptr3[col]; /* don't need GETJSAMPLE here */ - outptr += 2; - } - } -} - - -/* - * Empty method for start_pass. - */ - -METHODDEF(void) -start_pass_dcolor (j_decompress_ptr cinfo) -{ - /* no work needed */ -} - - -/* - * Module initialization routine for output colorspace conversion. - */ - -GLOBAL(void) -jinit_color_deconverter (j_decompress_ptr cinfo) -{ - my_cconvert_ptr cconvert; - int ci, i; - - cconvert = (my_cconvert_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_color_deconverter)); - cinfo->cconvert = &cconvert->pub; - cconvert->pub.start_pass = start_pass_dcolor; - - /* Make sure num_components agrees with jpeg_color_space */ - switch (cinfo->jpeg_color_space) { - case JCS_GRAYSCALE: - if (cinfo->num_components != 1) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - break; - - case JCS_RGB: - case JCS_YCbCr: - case JCS_BG_RGB: - case JCS_BG_YCC: - if (cinfo->num_components != 3) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - break; - - case JCS_CMYK: - case JCS_YCCK: - if (cinfo->num_components != 4) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - break; - - default: /* JCS_UNKNOWN can be anything */ - if (cinfo->num_components < 1) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - } - - /* Support color transform only for RGB colorspaces */ - if (cinfo->color_transform && - cinfo->jpeg_color_space != JCS_RGB && - cinfo->jpeg_color_space != JCS_BG_RGB) - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - - /* Set out_color_components and conversion method based on requested space. - * Also adjust the component_needed flags for any unused components, - * so that earlier pipeline stages can avoid useless computation. - */ - - switch (cinfo->out_color_space) { - case JCS_GRAYSCALE: - cinfo->out_color_components = 1; - switch (cinfo->jpeg_color_space) { - case JCS_GRAYSCALE: - case JCS_YCbCr: - case JCS_BG_YCC: - cconvert->pub.color_convert = grayscale_convert; - /* For color->grayscale conversion, only the Y (0) component is needed */ - for (ci = 1; ci < cinfo->num_components; ci++) - cinfo->comp_info[ci].component_needed = FALSE; - break; - case JCS_RGB: - switch (cinfo->color_transform) { - case JCT_NONE: - cconvert->pub.color_convert = rgb_gray_convert; - break; - case JCT_SUBTRACT_GREEN: - cconvert->pub.color_convert = rgb1_gray_convert; - break; - default: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - build_rgb_y_table(cinfo); - break; - default: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - break; - - case JCS_RGB: - cinfo->out_color_components = RGB_PIXELSIZE; - switch (cinfo->jpeg_color_space) { - case JCS_GRAYSCALE: - cconvert->pub.color_convert = gray_rgb_convert; - break; - case JCS_YCbCr: - cconvert->pub.color_convert = ycc_rgb_convert; - build_ycc_rgb_table(cinfo); - break; - case JCS_BG_YCC: - cconvert->pub.color_convert = ycc_rgb_convert; - build_bg_ycc_rgb_table(cinfo); - break; - case JCS_RGB: - switch (cinfo->color_transform) { - case JCT_NONE: - cconvert->pub.color_convert = rgb_convert; - break; - case JCT_SUBTRACT_GREEN: - cconvert->pub.color_convert = rgb1_rgb_convert; - break; - default: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - break; - default: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - break; - - case JCS_BG_RGB: - if (cinfo->jpeg_color_space != JCS_BG_RGB) - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - cinfo->out_color_components = RGB_PIXELSIZE; - switch (cinfo->color_transform) { - case JCT_NONE: - cconvert->pub.color_convert = rgb_convert; - break; - case JCT_SUBTRACT_GREEN: - cconvert->pub.color_convert = rgb1_rgb_convert; - break; - default: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - break; - - case JCS_CMYK: - if (cinfo->jpeg_color_space != JCS_YCCK) - goto def_label; - cinfo->out_color_components = 4; - cconvert->pub.color_convert = ycck_cmyk_convert; - build_ycc_rgb_table(cinfo); - break; - - case JCS_YCCK: - if (cinfo->jpeg_color_space != JCS_CMYK || - /* Support only YK part of YCCK for colorless output */ - ! cinfo->comp_info[0].component_needed || - cinfo->comp_info[1].component_needed || - cinfo->comp_info[2].component_needed || - ! cinfo->comp_info[3].component_needed) - goto def_label; - cinfo->out_color_components = 2; - /* Need all components on input side */ - cinfo->comp_info[1].component_needed = TRUE; - cinfo->comp_info[2].component_needed = TRUE; - cconvert->pub.color_convert = cmyk_yk_convert; - build_rgb_y_table(cinfo); - break; - - default: def_label: /* permit null conversion to same output space */ - if (cinfo->out_color_space != cinfo->jpeg_color_space) - /* unsupported non-null conversion */ - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - i = 0; - for (ci = 0; ci < cinfo->num_components; ci++) - if (cinfo->comp_info[ci].component_needed) - i++; /* count output color components */ - cinfo->out_color_components = i; - cconvert->pub.color_convert = null_convert; - } - - if (cinfo->quantize_colors) - cinfo->output_components = 1; /* single colormapped output component */ - else - cinfo->output_components = cinfo->out_color_components; -} diff --git a/thirdparty/jpeg-9e/jdct.h b/thirdparty/jpeg-9e/jdct.h deleted file mode 100644 index c8ec6cd..0000000 --- a/thirdparty/jpeg-9e/jdct.h +++ /dev/null @@ -1,409 +0,0 @@ -/* - * jdct.h - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2002-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This include file contains common declarations for the forward and - * inverse DCT modules. These declarations are private to the DCT managers - * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. - * The individual DCT algorithms are kept in separate files to ease - * machine-dependent tuning (e.g., assembly coding). - */ - - -/* - * A forward DCT routine is given a pointer to an input sample array and - * a pointer to a work area of type DCTELEM[]; the DCT is to be performed - * in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32 - * for 12-bit samples. (NOTE: Floating-point DCT implementations use an - * array of type FAST_FLOAT, instead.) - * The input data is to be fetched from the sample array starting at a - * specified column. (Any row offset needed will be applied to the array - * pointer before it is passed to the FDCT code.) - * Note that the number of samples fetched by the FDCT routine is - * DCT_h_scaled_size * DCT_v_scaled_size. - * The DCT outputs are returned scaled up by a factor of 8; they therefore - * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This - * convention improves accuracy in integer implementations and saves some - * work in floating-point ones. - * Quantization of the output coefficients is done by jcdctmgr.c. - */ - -#if BITS_IN_JSAMPLE == 8 -typedef int DCTELEM; /* 16 or 32 bits is fine */ -#else -typedef INT32 DCTELEM; /* must have 32 bits */ -#endif - -typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data, - JSAMPARRAY sample_data, - JDIMENSION start_col)); -typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data, - JSAMPARRAY sample_data, - JDIMENSION start_col)); - - -/* - * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer - * to an output sample array. The routine must dequantize the input data as - * well as perform the IDCT; for dequantization, it uses the multiplier table - * pointed to by compptr->dct_table. The output data is to be placed into the - * sample array starting at a specified column. (Any row offset needed will - * be applied to the array pointer before it is passed to the IDCT code.) - * Note that the number of samples emitted by the IDCT routine is - * DCT_h_scaled_size * DCT_v_scaled_size. - */ - -/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ - -/* - * Each IDCT routine has its own ideas about the best dct_table element type. - */ - -typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ -#if BITS_IN_JSAMPLE == 8 -typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ -#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ -#else -typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ -#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ -#endif -typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ - - -/* - * Each IDCT routine is responsible for range-limiting its results and - * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could - * be quite far out of range if the input data is corrupt, so a bulletproof - * range-limiting step is required. We use a mask-and-table-lookup method - * to do the combined operations quickly, assuming that RANGE_CENTER - * (defined in jpegint.h) is a power of 2. See the comments with - * prepare_range_limit_table (in jdmaster.c) for more info. - */ - -#define RANGE_MASK (RANGE_CENTER * 2 - 1) -#define RANGE_SUBSET (RANGE_CENTER - CENTERJSAMPLE) - -#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit - RANGE_SUBSET) - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_fdct_islow jFDislow -#define jpeg_fdct_ifast jFDifast -#define jpeg_fdct_float jFDfloat -#define jpeg_fdct_7x7 jFD7x7 -#define jpeg_fdct_6x6 jFD6x6 -#define jpeg_fdct_5x5 jFD5x5 -#define jpeg_fdct_4x4 jFD4x4 -#define jpeg_fdct_3x3 jFD3x3 -#define jpeg_fdct_2x2 jFD2x2 -#define jpeg_fdct_1x1 jFD1x1 -#define jpeg_fdct_9x9 jFD9x9 -#define jpeg_fdct_10x10 jFD10x10 -#define jpeg_fdct_11x11 jFD11x11 -#define jpeg_fdct_12x12 jFD12x12 -#define jpeg_fdct_13x13 jFD13x13 -#define jpeg_fdct_14x14 jFD14x14 -#define jpeg_fdct_15x15 jFD15x15 -#define jpeg_fdct_16x16 jFD16x16 -#define jpeg_fdct_16x8 jFD16x8 -#define jpeg_fdct_14x7 jFD14x7 -#define jpeg_fdct_12x6 jFD12x6 -#define jpeg_fdct_10x5 jFD10x5 -#define jpeg_fdct_8x4 jFD8x4 -#define jpeg_fdct_6x3 jFD6x3 -#define jpeg_fdct_4x2 jFD4x2 -#define jpeg_fdct_2x1 jFD2x1 -#define jpeg_fdct_8x16 jFD8x16 -#define jpeg_fdct_7x14 jFD7x14 -#define jpeg_fdct_6x12 jFD6x12 -#define jpeg_fdct_5x10 jFD5x10 -#define jpeg_fdct_4x8 jFD4x8 -#define jpeg_fdct_3x6 jFD3x6 -#define jpeg_fdct_2x4 jFD2x4 -#define jpeg_fdct_1x2 jFD1x2 -#define jpeg_idct_islow jRDislow -#define jpeg_idct_ifast jRDifast -#define jpeg_idct_float jRDfloat -#define jpeg_idct_7x7 jRD7x7 -#define jpeg_idct_6x6 jRD6x6 -#define jpeg_idct_5x5 jRD5x5 -#define jpeg_idct_4x4 jRD4x4 -#define jpeg_idct_3x3 jRD3x3 -#define jpeg_idct_2x2 jRD2x2 -#define jpeg_idct_1x1 jRD1x1 -#define jpeg_idct_9x9 jRD9x9 -#define jpeg_idct_10x10 jRD10x10 -#define jpeg_idct_11x11 jRD11x11 -#define jpeg_idct_12x12 jRD12x12 -#define jpeg_idct_13x13 jRD13x13 -#define jpeg_idct_14x14 jRD14x14 -#define jpeg_idct_15x15 jRD15x15 -#define jpeg_idct_16x16 jRD16x16 -#define jpeg_idct_16x8 jRD16x8 -#define jpeg_idct_14x7 jRD14x7 -#define jpeg_idct_12x6 jRD12x6 -#define jpeg_idct_10x5 jRD10x5 -#define jpeg_idct_8x4 jRD8x4 -#define jpeg_idct_6x3 jRD6x3 -#define jpeg_idct_4x2 jRD4x2 -#define jpeg_idct_2x1 jRD2x1 -#define jpeg_idct_8x16 jRD8x16 -#define jpeg_idct_7x14 jRD7x14 -#define jpeg_idct_6x12 jRD6x12 -#define jpeg_idct_5x10 jRD5x10 -#define jpeg_idct_4x8 jRD4x8 -#define jpeg_idct_3x6 jRD3x8 -#define jpeg_idct_2x4 jRD2x4 -#define jpeg_idct_1x2 jRD1x2 -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - -/* Extern declarations for the forward and inverse DCT routines. */ - -EXTERN(void) jpeg_fdct_islow - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_ifast - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_float - JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_7x7 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_6x6 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_5x5 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_4x4 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_3x3 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_2x2 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_1x1 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_9x9 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_10x10 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_11x11 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_12x12 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_13x13 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_14x14 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_15x15 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_16x16 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_16x8 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_14x7 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_12x6 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_10x5 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_8x4 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_6x3 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_4x2 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_2x1 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_8x16 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_7x14 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_6x12 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_5x10 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_4x8 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_3x6 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_2x4 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); -EXTERN(void) jpeg_fdct_1x2 - JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); - -EXTERN(void) jpeg_idct_islow - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_ifast - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_float - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_7x7 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_6x6 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_5x5 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_4x4 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_3x3 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_2x2 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_1x1 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_9x9 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_10x10 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_11x11 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_12x12 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_13x13 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_14x14 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_15x15 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_16x16 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_16x8 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_14x7 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_12x6 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_10x5 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_8x4 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_6x3 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_4x2 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_2x1 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_8x16 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_7x14 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_6x12 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_5x10 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_4x8 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_3x6 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_2x4 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_1x2 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); - - -/* - * Macros for handling fixed-point arithmetic; these are used by many - * but not all of the DCT/IDCT modules. - * - * All values are expected to be of type INT32. - * Fractional constants are scaled left by CONST_BITS bits. - * CONST_BITS is defined within each module using these macros, - * and may differ from one module to the next. - */ - -#define ONE ((INT32) 1) -#define CONST_SCALE (ONE << CONST_BITS) - -/* Convert a positive real constant to an integer scaled by CONST_SCALE. - * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, - * thus causing a lot of useless floating-point operations at run time. - */ - -#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) - -/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. - * This macro is used only when the two inputs will actually be no more than - * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a - * full 32x32 multiply. This provides a useful speedup on many machines. - * Unfortunately there is no way to specify a 16x16->32 multiply portably - * in C, but some C compilers will do the right thing if you provide the - * correct combination of casts. - */ - -#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ -#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) -#endif -#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ -#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) -#endif - -#ifndef MULTIPLY16C16 /* default definition */ -#define MULTIPLY16C16(var,const) ((var) * (const)) -#endif - -/* Same except both inputs are variables. */ - -#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ -#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) -#endif - -#ifndef MULTIPLY16V16 /* default definition */ -#define MULTIPLY16V16(var1,var2) ((var1) * (var2)) -#endif - -/* Like RIGHT_SHIFT, but applies to a DCTELEM. - * We assume that int right shift is unsigned if INT32 right shift is. - */ - -#ifdef RIGHT_SHIFT_IS_UNSIGNED -#define ISHIFT_TEMPS DCTELEM ishift_temp; -#if BITS_IN_JSAMPLE == 8 -#define DCTELEMBITS 16 /* DCTELEM may be 16 or 32 bits */ -#else -#define DCTELEMBITS 32 /* DCTELEM must be 32 bits */ -#endif -#define IRIGHT_SHIFT(x,shft) \ - ((ishift_temp = (x)) < 0 ? \ - (ishift_temp >> (shft)) | ((~((DCTELEM) 0)) << (DCTELEMBITS-(shft))) : \ - (ishift_temp >> (shft))) -#else -#define ISHIFT_TEMPS -#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) -#endif diff --git a/thirdparty/jpeg-9e/jddctmgr.c b/thirdparty/jpeg-9e/jddctmgr.c deleted file mode 100644 index 9ecfbb5..0000000 --- a/thirdparty/jpeg-9e/jddctmgr.c +++ /dev/null @@ -1,384 +0,0 @@ -/* - * jddctmgr.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2002-2013 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the inverse-DCT management logic. - * This code selects a particular IDCT implementation to be used, - * and it performs related housekeeping chores. No code in this file - * is executed per IDCT step, only during output pass setup. - * - * Note that the IDCT routines are responsible for performing coefficient - * dequantization as well as the IDCT proper. This module sets up the - * dequantization multiplier table needed by the IDCT routine. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - - -/* - * The decompressor input side (jdinput.c) saves away the appropriate - * quantization table for each component at the start of the first scan - * involving that component. (This is necessary in order to correctly - * decode files that reuse Q-table slots.) - * When we are ready to make an output pass, the saved Q-table is converted - * to a multiplier table that will actually be used by the IDCT routine. - * The multiplier table contents are IDCT-method-dependent. To support - * application changes in IDCT method between scans, we can remake the - * multiplier tables if necessary. - * In buffered-image mode, the first output pass may occur before any data - * has been seen for some components, and thus before their Q-tables have - * been saved away. To handle this case, multiplier tables are preset - * to zeroes; the result of the IDCT will be a neutral gray level. - */ - - -/* Private subobject for this module */ - -typedef struct { - struct jpeg_inverse_dct pub; /* public fields */ - - /* This array contains the IDCT method code that each multiplier table - * is currently set up for, or -1 if it's not yet set up. - * The actual multiplier tables are pointed to by dct_table in the - * per-component comp_info structures. - */ - int cur_method[MAX_COMPONENTS]; -} my_idct_controller; - -typedef my_idct_controller * my_idct_ptr; - - -/* Allocated multiplier tables: big enough for any supported variant */ - -typedef union { - ISLOW_MULT_TYPE islow_array[DCTSIZE2]; -#ifdef DCT_IFAST_SUPPORTED - IFAST_MULT_TYPE ifast_array[DCTSIZE2]; -#endif -#ifdef DCT_FLOAT_SUPPORTED - FLOAT_MULT_TYPE float_array[DCTSIZE2]; -#endif -} multiplier_table; - - -/* The current scaled-IDCT routines require ISLOW-style multiplier tables, - * so be sure to compile that code if either ISLOW or SCALING is requested. - */ -#ifdef DCT_ISLOW_SUPPORTED -#define PROVIDE_ISLOW_TABLES -#else -#ifdef IDCT_SCALING_SUPPORTED -#define PROVIDE_ISLOW_TABLES -#endif -#endif - - -/* - * Prepare for an output pass. - * Here we select the proper IDCT routine for each component and build - * a matching multiplier table. - */ - -METHODDEF(void) -start_pass (j_decompress_ptr cinfo) -{ - my_idct_ptr idct = (my_idct_ptr) cinfo->idct; - int ci, i; - jpeg_component_info *compptr; - int method = 0; - inverse_DCT_method_ptr method_ptr = NULL; - JQUANT_TBL * qtbl; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Select the proper IDCT routine for this component's scaling */ - switch ((compptr->DCT_h_scaled_size << 8) + compptr->DCT_v_scaled_size) { -#ifdef IDCT_SCALING_SUPPORTED - case ((1 << 8) + 1): - method_ptr = jpeg_idct_1x1; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((2 << 8) + 2): - method_ptr = jpeg_idct_2x2; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((3 << 8) + 3): - method_ptr = jpeg_idct_3x3; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((4 << 8) + 4): - method_ptr = jpeg_idct_4x4; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((5 << 8) + 5): - method_ptr = jpeg_idct_5x5; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((6 << 8) + 6): - method_ptr = jpeg_idct_6x6; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((7 << 8) + 7): - method_ptr = jpeg_idct_7x7; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((9 << 8) + 9): - method_ptr = jpeg_idct_9x9; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((10 << 8) + 10): - method_ptr = jpeg_idct_10x10; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((11 << 8) + 11): - method_ptr = jpeg_idct_11x11; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((12 << 8) + 12): - method_ptr = jpeg_idct_12x12; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((13 << 8) + 13): - method_ptr = jpeg_idct_13x13; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((14 << 8) + 14): - method_ptr = jpeg_idct_14x14; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((15 << 8) + 15): - method_ptr = jpeg_idct_15x15; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((16 << 8) + 16): - method_ptr = jpeg_idct_16x16; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((16 << 8) + 8): - method_ptr = jpeg_idct_16x8; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((14 << 8) + 7): - method_ptr = jpeg_idct_14x7; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((12 << 8) + 6): - method_ptr = jpeg_idct_12x6; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((10 << 8) + 5): - method_ptr = jpeg_idct_10x5; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((8 << 8) + 4): - method_ptr = jpeg_idct_8x4; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((6 << 8) + 3): - method_ptr = jpeg_idct_6x3; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((4 << 8) + 2): - method_ptr = jpeg_idct_4x2; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((2 << 8) + 1): - method_ptr = jpeg_idct_2x1; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((8 << 8) + 16): - method_ptr = jpeg_idct_8x16; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((7 << 8) + 14): - method_ptr = jpeg_idct_7x14; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((6 << 8) + 12): - method_ptr = jpeg_idct_6x12; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((5 << 8) + 10): - method_ptr = jpeg_idct_5x10; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((4 << 8) + 8): - method_ptr = jpeg_idct_4x8; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((3 << 8) + 6): - method_ptr = jpeg_idct_3x6; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((2 << 8) + 4): - method_ptr = jpeg_idct_2x4; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; - case ((1 << 8) + 2): - method_ptr = jpeg_idct_1x2; - method = JDCT_ISLOW; /* jidctint uses islow-style table */ - break; -#endif - case ((DCTSIZE << 8) + DCTSIZE): - switch (cinfo->dct_method) { -#ifdef DCT_ISLOW_SUPPORTED - case JDCT_ISLOW: - method_ptr = jpeg_idct_islow; - method = JDCT_ISLOW; - break; -#endif -#ifdef DCT_IFAST_SUPPORTED - case JDCT_IFAST: - method_ptr = jpeg_idct_ifast; - method = JDCT_IFAST; - break; -#endif -#ifdef DCT_FLOAT_SUPPORTED - case JDCT_FLOAT: - method_ptr = jpeg_idct_float; - method = JDCT_FLOAT; - break; -#endif - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - break; - } - break; - default: - ERREXIT2(cinfo, JERR_BAD_DCTSIZE, - compptr->DCT_h_scaled_size, compptr->DCT_v_scaled_size); - break; - } - idct->pub.inverse_DCT[ci] = method_ptr; - /* Create multiplier table from quant table. - * However, we can skip this if the component is uninteresting - * or if we already built the table. Also, if no quant table - * has yet been saved for the component, we leave the - * multiplier table all-zero; we'll be reading zeroes from the - * coefficient controller's buffer anyway. - */ - if (! compptr->component_needed || idct->cur_method[ci] == method) - continue; - qtbl = compptr->quant_table; - if (qtbl == NULL) /* happens if no data yet for component */ - continue; - idct->cur_method[ci] = method; - switch (method) { -#ifdef PROVIDE_ISLOW_TABLES - case JDCT_ISLOW: - { - /* For LL&M IDCT method, multipliers are equal to raw quantization - * coefficients, but are stored as ints to ensure access efficiency. - */ - ISLOW_MULT_TYPE * ismtbl = (ISLOW_MULT_TYPE *) compptr->dct_table; - for (i = 0; i < DCTSIZE2; i++) { - ismtbl[i] = (ISLOW_MULT_TYPE) qtbl->quantval[i]; - } - } - break; -#endif -#ifdef DCT_IFAST_SUPPORTED - case JDCT_IFAST: - { - /* For AA&N IDCT method, multipliers are equal to quantization - * coefficients scaled by scalefactor[row]*scalefactor[col], where - * scalefactor[0] = 1 - * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 - * For integer operation, the multiplier table is to be scaled by - * IFAST_SCALE_BITS. - */ - IFAST_MULT_TYPE * ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table; -#define CONST_BITS 14 - static const INT16 aanscales[DCTSIZE2] = { - /* precomputed values scaled up by 14 bits */ - 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, - 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, - 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, - 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, - 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, - 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, - 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, - 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 - }; - SHIFT_TEMPS - - for (i = 0; i < DCTSIZE2; i++) { - ifmtbl[i] = (IFAST_MULT_TYPE) - DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i], - (INT32) aanscales[i]), - CONST_BITS-IFAST_SCALE_BITS); - } - } - break; -#endif -#ifdef DCT_FLOAT_SUPPORTED - case JDCT_FLOAT: - { - /* For float AA&N IDCT method, multipliers are equal to quantization - * coefficients scaled by scalefactor[row]*scalefactor[col], where - * scalefactor[0] = 1 - * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 - * We apply a further scale factor of 1/8. - */ - FLOAT_MULT_TYPE * fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table; - int row, col; - static const double aanscalefactor[DCTSIZE] = { - 1.0, 1.387039845, 1.306562965, 1.175875602, - 1.0, 0.785694958, 0.541196100, 0.275899379 - }; - - i = 0; - for (row = 0; row < DCTSIZE; row++) { - for (col = 0; col < DCTSIZE; col++) { - fmtbl[i] = (FLOAT_MULT_TYPE) - ((double) qtbl->quantval[i] * - aanscalefactor[row] * aanscalefactor[col] * 0.125); - i++; - } - } - } - break; -#endif - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - break; - } - } -} - - -/* - * Initialize IDCT manager. - */ - -GLOBAL(void) -jinit_inverse_dct (j_decompress_ptr cinfo) -{ - my_idct_ptr idct; - int ci; - jpeg_component_info *compptr; - - idct = (my_idct_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_idct_controller)); - cinfo->idct = &idct->pub; - idct->pub.start_pass = start_pass; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Allocate and pre-zero a multiplier table for each component */ - compptr->dct_table = - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(multiplier_table)); - MEMZERO(compptr->dct_table, SIZEOF(multiplier_table)); - /* Mark multiplier table not yet set up for any method */ - idct->cur_method[ci] = -1; - } -} diff --git a/thirdparty/jpeg-9e/jdhuff.c b/thirdparty/jpeg-9e/jdhuff.c deleted file mode 100644 index f175f0c..0000000 --- a/thirdparty/jpeg-9e/jdhuff.c +++ /dev/null @@ -1,1559 +0,0 @@ -/* - * jdhuff.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2006-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains Huffman entropy decoding routines. - * Both sequential and progressive modes are supported in this single module. - * - * Much of the complexity here has to do with supporting input suspension. - * If the data source module demands suspension, we want to be able to back - * up to the start of the current MCU. To do this, we copy state variables - * into local working storage, and update them back to the permanent - * storage only upon successful completion of an MCU. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Derived data constructed for each Huffman table */ - -#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */ - -typedef struct { - /* Basic tables: (element [0] of each array is unused) */ - INT32 maxcode[18]; /* largest code of length k (-1 if none) */ - /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */ - INT32 valoffset[17]; /* huffval[] offset for codes of length k */ - /* valoffset[k] = huffval[] index of 1st symbol of code length k, less - * the smallest code of length k; so given a code of length k, the - * corresponding symbol is huffval[code + valoffset[k]] - */ - - /* Link to public Huffman table (needed only in jpeg_huff_decode) */ - JHUFF_TBL *pub; - - /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of - * the input data stream. If the next Huffman code is no more - * than HUFF_LOOKAHEAD bits long, we can obtain its length and - * the corresponding symbol directly from these tables. - */ - int look_nbits[1< 32 bits on your machine, and shifting/masking longs is - * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE - * appropriately should be a win. Unfortunately we can't define the size - * with something like #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8) - * because not all machines measure sizeof in 8-bit bytes. - */ - -typedef struct { /* Bitreading state saved across MCUs */ - bit_buf_type get_buffer; /* current bit-extraction buffer */ - int bits_left; /* # of unused bits in it */ -} bitread_perm_state; - -typedef struct { /* Bitreading working state within an MCU */ - /* Current data source location */ - /* We need a copy, rather than munging the original, in case of suspension */ - const JOCTET * next_input_byte; /* => next byte to read from source */ - size_t bytes_in_buffer; /* # of bytes remaining in source buffer */ - /* Bit input buffer --- note these values are kept in register variables, - * not in this struct, inside the inner loops. - */ - bit_buf_type get_buffer; /* current bit-extraction buffer */ - int bits_left; /* # of unused bits in it */ - /* Pointer needed by jpeg_fill_bit_buffer. */ - j_decompress_ptr cinfo; /* back link to decompress master record */ -} bitread_working_state; - -/* Macros to declare and load/save bitread local variables. */ -#define BITREAD_STATE_VARS \ - register bit_buf_type get_buffer; \ - register int bits_left; \ - bitread_working_state br_state - -#define BITREAD_LOAD_STATE(cinfop,permstate) \ - br_state.cinfo = cinfop; \ - br_state.next_input_byte = cinfop->src->next_input_byte; \ - br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \ - get_buffer = permstate.get_buffer; \ - bits_left = permstate.bits_left; - -#define BITREAD_SAVE_STATE(cinfop,permstate) \ - cinfop->src->next_input_byte = br_state.next_input_byte; \ - cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \ - permstate.get_buffer = get_buffer; \ - permstate.bits_left = bits_left - -/* - * These macros provide the in-line portion of bit fetching. - * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer - * before using GET_BITS, PEEK_BITS, or DROP_BITS. - * The variables get_buffer and bits_left are assumed to be locals, - * but the state struct might not be (jpeg_huff_decode needs this). - * CHECK_BIT_BUFFER(state,n,action); - * Ensure there are N bits in get_buffer; if suspend, take action. - * val = GET_BITS(n); - * Fetch next N bits. - * val = PEEK_BITS(n); - * Fetch next N bits without removing them from the buffer. - * DROP_BITS(n); - * Discard next N bits. - * The value N should be a simple variable, not an expression, because it - * is evaluated multiple times. - */ - -#define CHECK_BIT_BUFFER(state,nbits,action) \ - { if (bits_left < (nbits)) { \ - if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \ - { action; } \ - get_buffer = (state).get_buffer; bits_left = (state).bits_left; } } - -#define GET_BITS(nbits) \ - (((int) (get_buffer >> (bits_left -= (nbits)))) & BIT_MASK(nbits)) - -#define PEEK_BITS(nbits) \ - (((int) (get_buffer >> (bits_left - (nbits)))) & BIT_MASK(nbits)) - -#define DROP_BITS(nbits) \ - (bits_left -= (nbits)) - - -/* - * Code for extracting next Huffman-coded symbol from input bit stream. - * Again, this is time-critical and we make the main paths be macros. - * - * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits - * without looping. Usually, more than 95% of the Huffman codes will be 8 - * or fewer bits long. The few overlength codes are handled with a loop, - * which need not be inline code. - * - * Notes about the HUFF_DECODE macro: - * 1. Near the end of the data segment, we may fail to get enough bits - * for a lookahead. In that case, we do it the hard way. - * 2. If the lookahead table contains no entry, the next code must be - * more than HUFF_LOOKAHEAD bits long. - * 3. jpeg_huff_decode returns -1 if forced to suspend. - */ - -#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \ -{ register int nb, look; \ - if (bits_left < HUFF_LOOKAHEAD) { \ - if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \ - get_buffer = state.get_buffer; bits_left = state.bits_left; \ - if (bits_left < HUFF_LOOKAHEAD) { \ - nb = 1; goto slowlabel; \ - } \ - } \ - look = PEEK_BITS(HUFF_LOOKAHEAD); \ - if ((nb = htbl->look_nbits[look]) != 0) { \ - DROP_BITS(nb); \ - result = htbl->look_sym[look]; \ - } else { \ - nb = HUFF_LOOKAHEAD+1; \ -slowlabel: \ - if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \ - { failaction; } \ - get_buffer = state.get_buffer; bits_left = state.bits_left; \ - } \ -} - - -/* - * Expanded entropy decoder object for Huffman decoding. - * - * The savable_state subrecord contains fields that change within an MCU, - * but must not be updated permanently until we complete the MCU. - */ - -typedef struct { - unsigned int EOBRUN; /* remaining EOBs in EOBRUN */ - int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ -} savable_state; - -/* This macro is to work around compilers with missing or broken - * structure assignment. You'll need to fix this code if you have - * such a compiler and you change MAX_COMPS_IN_SCAN. - */ - -#ifndef NO_STRUCT_ASSIGN -#define ASSIGN_STATE(dest,src) ((dest) = (src)) -#else -#if MAX_COMPS_IN_SCAN == 4 -#define ASSIGN_STATE(dest,src) \ - ((dest).EOBRUN = (src).EOBRUN, \ - (dest).last_dc_val[0] = (src).last_dc_val[0], \ - (dest).last_dc_val[1] = (src).last_dc_val[1], \ - (dest).last_dc_val[2] = (src).last_dc_val[2], \ - (dest).last_dc_val[3] = (src).last_dc_val[3]) -#endif -#endif - - -typedef struct { - struct jpeg_entropy_decoder pub; /* public fields */ - - /* These fields are loaded into local variables at start of each MCU. - * In case of suspension, we exit WITHOUT updating them. - */ - bitread_perm_state bitstate; /* Bit buffer at start of MCU */ - savable_state saved; /* Other state at start of MCU */ - - /* These fields are NOT loaded into local working state. */ - boolean insufficient_data; /* set TRUE after emitting warning */ - unsigned int restarts_to_go; /* MCUs left in this restart interval */ - - /* Following two fields used only in progressive mode */ - - /* Pointers to derived tables (these workspaces have image lifespan) */ - d_derived_tbl * derived_tbls[NUM_HUFF_TBLS]; - - d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */ - - /* Following fields used only in sequential mode */ - - /* Pointers to derived tables (these workspaces have image lifespan) */ - d_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; - d_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; - - /* Precalculated info set up by start_pass for use in decode_mcu: */ - - /* Pointers to derived tables to be used for each block within an MCU */ - d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU]; - d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU]; - /* Whether we care about the DC and AC coefficient values for each block */ - int coef_limit[D_MAX_BLOCKS_IN_MCU]; -} huff_entropy_decoder; - -typedef huff_entropy_decoder * huff_entropy_ptr; - - -static const int jpeg_zigzag_order[8][8] = { - { 0, 1, 5, 6, 14, 15, 27, 28 }, - { 2, 4, 7, 13, 16, 26, 29, 42 }, - { 3, 8, 12, 17, 25, 30, 41, 43 }, - { 9, 11, 18, 24, 31, 40, 44, 53 }, - { 10, 19, 23, 32, 39, 45, 52, 54 }, - { 20, 22, 33, 38, 46, 51, 55, 60 }, - { 21, 34, 37, 47, 50, 56, 59, 61 }, - { 35, 36, 48, 49, 57, 58, 62, 63 } -}; - -static const int jpeg_zigzag_order7[7][7] = { - { 0, 1, 5, 6, 14, 15, 27 }, - { 2, 4, 7, 13, 16, 26, 28 }, - { 3, 8, 12, 17, 25, 29, 38 }, - { 9, 11, 18, 24, 30, 37, 39 }, - { 10, 19, 23, 31, 36, 40, 45 }, - { 20, 22, 32, 35, 41, 44, 46 }, - { 21, 33, 34, 42, 43, 47, 48 } -}; - -static const int jpeg_zigzag_order6[6][6] = { - { 0, 1, 5, 6, 14, 15 }, - { 2, 4, 7, 13, 16, 25 }, - { 3, 8, 12, 17, 24, 26 }, - { 9, 11, 18, 23, 27, 32 }, - { 10, 19, 22, 28, 31, 33 }, - { 20, 21, 29, 30, 34, 35 } -}; - -static const int jpeg_zigzag_order5[5][5] = { - { 0, 1, 5, 6, 14 }, - { 2, 4, 7, 13, 15 }, - { 3, 8, 12, 16, 21 }, - { 9, 11, 17, 20, 22 }, - { 10, 18, 19, 23, 24 } -}; - -static const int jpeg_zigzag_order4[4][4] = { - { 0, 1, 5, 6 }, - { 2, 4, 7, 12 }, - { 3, 8, 11, 13 }, - { 9, 10, 14, 15 } -}; - -static const int jpeg_zigzag_order3[3][3] = { - { 0, 1, 5 }, - { 2, 4, 6 }, - { 3, 7, 8 } -}; - -static const int jpeg_zigzag_order2[2][2] = { - { 0, 1 }, - { 2, 3 } -}; - - -/* - * Compute the derived values for a Huffman table. - * This routine also performs some validation checks on the table. - */ - -LOCAL(void) -jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno, - d_derived_tbl ** pdtbl) -{ - JHUFF_TBL *htbl; - d_derived_tbl *dtbl; - int p, i, l, si, numsymbols; - int lookbits, ctr; - char huffsize[257]; - unsigned int huffcode[257]; - unsigned int code; - - /* Note that huffsize[] and huffcode[] are filled in code-length order, - * paralleling the order of the symbols themselves in htbl->huffval[]. - */ - - /* Find the input Huffman table */ - if (tblno < 0 || tblno >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); - htbl = - isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno]; - if (htbl == NULL) - htbl = jpeg_std_huff_table((j_common_ptr) cinfo, isDC, tblno); - - /* Allocate a workspace if we haven't already done so. */ - if (*pdtbl == NULL) - *pdtbl = (d_derived_tbl *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(d_derived_tbl)); - dtbl = *pdtbl; - dtbl->pub = htbl; /* fill in back link */ - - /* Figure C.1: make table of Huffman code length for each symbol */ - - p = 0; - for (l = 1; l <= 16; l++) { - i = (int) htbl->bits[l]; - if (i < 0 || p + i > 256) /* protect against table overrun */ - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - while (i--) - huffsize[p++] = (char) l; - } - huffsize[p] = 0; - numsymbols = p; - - /* Figure C.2: generate the codes themselves */ - /* We also validate that the counts represent a legal Huffman code tree. */ - - code = 0; - si = huffsize[0]; - p = 0; - while (huffsize[p]) { - while (((int) huffsize[p]) == si) { - huffcode[p++] = code; - code++; - } - /* code is now 1 more than the last code used for codelength si; but - * it must still fit in si bits, since no code is allowed to be all ones. - */ - if (((INT32) code) >= (((INT32) 1) << si)) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - code <<= 1; - si++; - } - - /* Figure F.15: generate decoding tables for bit-sequential decoding */ - - p = 0; - for (l = 1; l <= 16; l++) { - if (htbl->bits[l]) { - /* valoffset[l] = huffval[] index of 1st symbol of code length l, - * minus the minimum code of length l - */ - dtbl->valoffset[l] = (INT32) p - (INT32) huffcode[p]; - p += htbl->bits[l]; - dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */ - } else { - dtbl->maxcode[l] = -1; /* -1 if no codes of this length */ - } - } - dtbl->maxcode[17] = 0xFFFFFL; /* ensures jpeg_huff_decode terminates */ - - /* Compute lookahead tables to speed up decoding. - * First we set all the table entries to 0, indicating "too long"; - * then we iterate through the Huffman codes that are short enough and - * fill in all the entries that correspond to bit sequences starting - * with that code. - */ - - MEMZERO(dtbl->look_nbits, SIZEOF(dtbl->look_nbits)); - - p = 0; - for (l = 1; l <= HUFF_LOOKAHEAD; l++) { - for (i = 1; i <= (int) htbl->bits[l]; i++, p++) { - /* l = current code's length, p = its index in huffcode[] & huffval[]. */ - /* Generate left-justified code followed by all possible bit sequences */ - lookbits = huffcode[p] << (HUFF_LOOKAHEAD-l); - for (ctr = 1 << (HUFF_LOOKAHEAD-l); ctr > 0; ctr--) { - dtbl->look_nbits[lookbits] = l; - dtbl->look_sym[lookbits] = htbl->huffval[p]; - lookbits++; - } - } - } - - /* Validate symbols as being reasonable. - * For AC tables, we make no check, but accept all byte values 0..255. - * For DC tables, we require the symbols to be in range 0..15. - * (Tighter bounds could be applied depending on the data depth and mode, - * but this is sufficient to ensure safe decoding.) - */ - if (isDC) { - for (i = 0; i < numsymbols; i++) { - int sym = htbl->huffval[i]; - if (sym < 0 || sym > 15) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - } - } -} - - -/* - * Out-of-line code for bit fetching. - * Note: current values of get_buffer and bits_left are passed as parameters, - * but are returned in the corresponding fields of the state struct. - * - * On most machines MIN_GET_BITS should be 25 to allow the full 32-bit width - * of get_buffer to be used. (On machines with wider words, an even larger - * buffer could be used.) However, on some machines 32-bit shifts are - * quite slow and take time proportional to the number of places shifted. - * (This is true with most PC compilers, for instance.) In this case it may - * be a win to set MIN_GET_BITS to the minimum value of 15. This reduces the - * average shift distance at the cost of more calls to jpeg_fill_bit_buffer. - */ - -#ifdef SLOW_SHIFT_32 -#define MIN_GET_BITS 15 /* minimum allowable value */ -#else -#define MIN_GET_BITS (BIT_BUF_SIZE-7) -#endif - - -LOCAL(boolean) -jpeg_fill_bit_buffer (bitread_working_state * state, - register bit_buf_type get_buffer, register int bits_left, - int nbits) -/* Load up the bit buffer to a depth of at least nbits */ -{ - /* Copy heavily used state fields into locals (hopefully registers) */ - register const JOCTET * next_input_byte = state->next_input_byte; - register size_t bytes_in_buffer = state->bytes_in_buffer; - j_decompress_ptr cinfo = state->cinfo; - - /* Attempt to load at least MIN_GET_BITS bits into get_buffer. */ - /* (It is assumed that no request will be for more than that many bits.) */ - /* We fail to do so only if we hit a marker or are forced to suspend. */ - - if (cinfo->unread_marker == 0) { /* cannot advance past a marker */ - while (bits_left < MIN_GET_BITS) { - register int c; - - /* Attempt to read a byte */ - if (bytes_in_buffer == 0) { - if (! (*cinfo->src->fill_input_buffer) (cinfo)) - return FALSE; - next_input_byte = cinfo->src->next_input_byte; - bytes_in_buffer = cinfo->src->bytes_in_buffer; - } - bytes_in_buffer--; - c = GETJOCTET(*next_input_byte++); - - /* If it's 0xFF, check and discard stuffed zero byte */ - if (c == 0xFF) { - /* Loop here to discard any padding FF's on terminating marker, - * so that we can save a valid unread_marker value. NOTE: we will - * accept multiple FF's followed by a 0 as meaning a single FF data - * byte. This data pattern is not valid according to the standard. - */ - do { - if (bytes_in_buffer == 0) { - if (! (*cinfo->src->fill_input_buffer) (cinfo)) - return FALSE; - next_input_byte = cinfo->src->next_input_byte; - bytes_in_buffer = cinfo->src->bytes_in_buffer; - } - bytes_in_buffer--; - c = GETJOCTET(*next_input_byte++); - } while (c == 0xFF); - - if (c == 0) { - /* Found FF/00, which represents an FF data byte */ - c = 0xFF; - } else { - /* Oops, it's actually a marker indicating end of compressed data. - * Save the marker code for later use. - * Fine point: it might appear that we should save the marker into - * bitread working state, not straight into permanent state. But - * once we have hit a marker, we cannot need to suspend within the - * current MCU, because we will read no more bytes from the data - * source. So it is OK to update permanent state right away. - */ - cinfo->unread_marker = c; - /* See if we need to insert some fake zero bits. */ - goto no_more_bytes; - } - } - - /* OK, load c into get_buffer */ - get_buffer = (get_buffer << 8) | c; - bits_left += 8; - } /* end while */ - } else { - no_more_bytes: - /* We get here if we've read the marker that terminates the compressed - * data segment. There should be enough bits in the buffer register - * to satisfy the request; if so, no problem. - */ - if (nbits > bits_left) { - /* Uh-oh. Report corrupted data to user and stuff zeroes into - * the data stream, so that we can produce some kind of image. - * We use a nonvolatile flag to ensure that only one warning message - * appears per data segment. - */ - if (! ((huff_entropy_ptr) cinfo->entropy)->insufficient_data) { - WARNMS(cinfo, JWRN_HIT_MARKER); - ((huff_entropy_ptr) cinfo->entropy)->insufficient_data = TRUE; - } - /* Fill the buffer with zero bits */ - get_buffer <<= MIN_GET_BITS - bits_left; - bits_left = MIN_GET_BITS; - } - } - - /* Unload the local registers */ - state->next_input_byte = next_input_byte; - state->bytes_in_buffer = bytes_in_buffer; - state->get_buffer = get_buffer; - state->bits_left = bits_left; - - return TRUE; -} - - -/* - * Figure F.12: extend sign bit. - * On some machines, a shift and sub will be faster than a table lookup. - */ - -#ifdef AVOID_TABLES - -#define BIT_MASK(nbits) ((1<<(nbits))-1) -#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) - ((1<<(s))-1) : (x)) - -#else - -#define BIT_MASK(nbits) bmask[nbits] -#define HUFF_EXTEND(x,s) ((x) <= bmask[(s) - 1] ? (x) - bmask[s] : (x)) - -static const int bmask[16] = /* bmask[n] is mask for n rightmost bits */ - { 0, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, - 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF }; - -#endif /* AVOID_TABLES */ - - -/* - * Out-of-line code for Huffman code decoding. - */ - -LOCAL(int) -jpeg_huff_decode (bitread_working_state * state, - register bit_buf_type get_buffer, register int bits_left, - d_derived_tbl * htbl, int min_bits) -{ - register int l = min_bits; - register INT32 code; - - /* HUFF_DECODE has determined that the code is at least min_bits */ - /* bits long, so fetch that many bits in one swoop. */ - - CHECK_BIT_BUFFER(*state, l, return -1); - code = GET_BITS(l); - - /* Collect the rest of the Huffman code one bit at a time. */ - /* This is per Figure F.16 in the JPEG spec. */ - - while (code > htbl->maxcode[l]) { - code <<= 1; - CHECK_BIT_BUFFER(*state, 1, return -1); - code |= GET_BITS(1); - l++; - } - - /* Unload the local registers */ - state->get_buffer = get_buffer; - state->bits_left = bits_left; - - /* With garbage input we may reach the sentinel value l = 17. */ - - if (l > 16) { - WARNMS(state->cinfo, JWRN_HUFF_BAD_CODE); - return 0; /* fake a zero as the safest result */ - } - - return htbl->pub->huffval[ (int) (code + htbl->valoffset[l]) ]; -} - - -/* - * Finish up at the end of a Huffman-compressed scan. - */ - -METHODDEF(void) -finish_pass_huff (j_decompress_ptr cinfo) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - - /* Throw away any unused bits remaining in bit buffer; */ - /* include any full bytes in next_marker's count of discarded bytes */ - cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8; - entropy->bitstate.bits_left = 0; -} - - -/* - * Check for a restart marker & resynchronize decoder. - * Returns FALSE if must suspend. - */ - -LOCAL(boolean) -process_restart (j_decompress_ptr cinfo) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int ci; - - finish_pass_huff(cinfo); - - /* Advance past the RSTn marker */ - if (! (*cinfo->marker->read_restart_marker) (cinfo)) - return FALSE; - - /* Re-initialize DC predictions to 0 */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) - entropy->saved.last_dc_val[ci] = 0; - /* Re-init EOB run count, too */ - entropy->saved.EOBRUN = 0; - - /* Reset restart counter */ - entropy->restarts_to_go = cinfo->restart_interval; - - /* Reset out-of-data flag, unless read_restart_marker left us smack up - * against a marker. In that case we will end up treating the next data - * segment as empty, and we can avoid producing bogus output pixels by - * leaving the flag set. - */ - if (cinfo->unread_marker == 0) - entropy->insufficient_data = FALSE; - - return TRUE; -} - - -/* - * Huffman MCU decoding. - * Each of these routines decodes and returns one MCU's worth of - * Huffman-compressed coefficients. - * The coefficients are reordered from zigzag order into natural array order, - * but are not dequantized. - * - * The i'th block of the MCU is stored into the block pointed to by - * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER. - * (Wholesale zeroing is usually a little faster than retail...) - * - * We return FALSE if data source requested suspension. In that case no - * changes have been made to permanent state. (Exception: some output - * coefficients may already have been assigned. This is harmless for - * spectral selection, since we'll just re-assign them on the next call. - * Successive approximation AC refinement has to be more careful, however.) - */ - -/* - * MCU decoding for DC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int Al = cinfo->Al; - register int s, r; - int blkn, ci; - JBLOCKROW block; - BITREAD_STATE_VARS; - savable_state state; - d_derived_tbl * tbl; - jpeg_component_info * compptr; - - /* Process restart marker if needed; may have to suspend */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! process_restart(cinfo)) - return FALSE; - } - - /* If we've run out of data, just leave the MCU set to zeroes. - * This way, we return uniform gray for the remainder of the segment. - */ - if (! entropy->insufficient_data) { - - /* Load up working state */ - BITREAD_LOAD_STATE(cinfo, entropy->bitstate); - ASSIGN_STATE(state, entropy->saved); - - /* Outer loop handles each block in the MCU */ - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - block = MCU_data[blkn]; - ci = cinfo->MCU_membership[blkn]; - compptr = cinfo->cur_comp_info[ci]; - tbl = entropy->derived_tbls[compptr->dc_tbl_no]; - - /* Decode a single block's worth of coefficients */ - - /* Section F.2.2.1: decode the DC coefficient difference */ - HUFF_DECODE(s, br_state, tbl, return FALSE, label1); - if (s) { - CHECK_BIT_BUFFER(br_state, s, return FALSE); - r = GET_BITS(s); - s = HUFF_EXTEND(r, s); - } - - /* Convert DC difference to actual value, update last_dc_val */ - s += state.last_dc_val[ci]; - state.last_dc_val[ci] = s; - /* Scale and output the coefficient (assumes jpeg_natural_order[0]=0) */ - (*block)[0] = (JCOEF) (s << Al); - } - - /* Completed MCU, so update state */ - BITREAD_SAVE_STATE(cinfo, entropy->bitstate); - ASSIGN_STATE(entropy->saved, state); - } - - /* Account for restart interval if using restarts */ - if (cinfo->restart_interval) - entropy->restarts_to_go--; - - return TRUE; -} - - -/* - * MCU decoding for AC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - register int s, k, r; - unsigned int EOBRUN; - int Se, Al; - const int * natural_order; - JBLOCKROW block; - BITREAD_STATE_VARS; - d_derived_tbl * tbl; - - /* Process restart marker if needed; may have to suspend */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! process_restart(cinfo)) - return FALSE; - } - - /* If we've run out of data, just leave the MCU set to zeroes. - * This way, we return uniform gray for the remainder of the segment. - */ - if (! entropy->insufficient_data) { - - /* Load up working state. - * We can avoid loading/saving bitread state if in an EOB run. - */ - EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */ - - /* There is always only one block per MCU */ - - if (EOBRUN) /* if it's a band of zeroes... */ - EOBRUN--; /* ...process it now (we do nothing) */ - else { - BITREAD_LOAD_STATE(cinfo, entropy->bitstate); - Se = cinfo->Se; - Al = cinfo->Al; - natural_order = cinfo->natural_order; - block = MCU_data[0]; - tbl = entropy->ac_derived_tbl; - - for (k = cinfo->Ss; k <= Se; k++) { - HUFF_DECODE(s, br_state, tbl, return FALSE, label2); - r = s >> 4; - s &= 15; - if (s) { - k += r; - CHECK_BIT_BUFFER(br_state, s, return FALSE); - r = GET_BITS(s); - s = HUFF_EXTEND(r, s); - /* Scale and output coefficient in natural (dezigzagged) order */ - (*block)[natural_order[k]] = (JCOEF) (s << Al); - } else { - if (r != 15) { /* EOBr, run length is 2^r + appended bits */ - if (r) { /* EOBr, r > 0 */ - EOBRUN = 1 << r; - CHECK_BIT_BUFFER(br_state, r, return FALSE); - r = GET_BITS(r); - EOBRUN += r; - EOBRUN--; /* this band is processed at this moment */ - } - break; /* force end-of-band */ - } - k += 15; /* ZRL: skip 15 zeroes in band */ - } - } - - BITREAD_SAVE_STATE(cinfo, entropy->bitstate); - } - - /* Completed MCU, so update state */ - entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */ - } - - /* Account for restart interval if using restarts */ - if (cinfo->restart_interval) - entropy->restarts_to_go--; - - return TRUE; -} - - -/* - * MCU decoding for DC successive approximation refinement scan. - * Note: we assume such scans can be multi-component, - * although the spec is not very clear on the point. - */ - -METHODDEF(boolean) -decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - JCOEF p1; - int blkn; - BITREAD_STATE_VARS; - - /* Process restart marker if needed; may have to suspend */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! process_restart(cinfo)) - return FALSE; - } - - /* Not worth the cycles to check insufficient_data here, - * since we will not change the data anyway if we read zeroes. - */ - - /* Load up working state */ - BITREAD_LOAD_STATE(cinfo, entropy->bitstate); - - p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ - - /* Outer loop handles each block in the MCU */ - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - /* Encoded data is simply the next bit of the two's-complement DC value */ - CHECK_BIT_BUFFER(br_state, 1, return FALSE); - if (GET_BITS(1)) - MCU_data[blkn][0][0] |= p1; - /* Note: since we use |=, repeating the assignment later is safe */ - } - - /* Completed MCU, so update state */ - BITREAD_SAVE_STATE(cinfo, entropy->bitstate); - - /* Account for restart interval if using restarts */ - if (cinfo->restart_interval) - entropy->restarts_to_go--; - - return TRUE; -} - - -/* - * MCU decoding for AC successive approximation refinement scan. - */ - -METHODDEF(boolean) -decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - register int s, k, r; - unsigned int EOBRUN; - int Se; - JCOEF p1, m1; - const int * natural_order; - JBLOCKROW block; - JCOEFPTR thiscoef; - BITREAD_STATE_VARS; - d_derived_tbl * tbl; - int num_newnz; - int newnz_pos[DCTSIZE2]; - - /* Process restart marker if needed; may have to suspend */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! process_restart(cinfo)) - return FALSE; - } - - /* If we've run out of data, don't modify the MCU. - */ - if (! entropy->insufficient_data) { - - Se = cinfo->Se; - p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ - m1 = -p1; /* -1 in the bit position being coded */ - natural_order = cinfo->natural_order; - - /* Load up working state */ - BITREAD_LOAD_STATE(cinfo, entropy->bitstate); - EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */ - - /* There is always only one block per MCU */ - block = MCU_data[0]; - tbl = entropy->ac_derived_tbl; - - /* If we are forced to suspend, we must undo the assignments to any newly - * nonzero coefficients in the block, because otherwise we'd get confused - * next time about which coefficients were already nonzero. - * But we need not undo addition of bits to already-nonzero coefficients; - * instead, we can test the current bit to see if we already did it. - */ - num_newnz = 0; - - /* initialize coefficient loop counter to start of band */ - k = cinfo->Ss; - - if (EOBRUN == 0) { - do { - HUFF_DECODE(s, br_state, tbl, goto undoit, label3); - r = s >> 4; - s &= 15; - if (s) { - if (s != 1) /* size of new coef should always be 1 */ - WARNMS(cinfo, JWRN_HUFF_BAD_CODE); - CHECK_BIT_BUFFER(br_state, 1, goto undoit); - if (GET_BITS(1)) - s = p1; /* newly nonzero coef is positive */ - else - s = m1; /* newly nonzero coef is negative */ - } else { - if (r != 15) { - EOBRUN = 1 << r; /* EOBr, run length is 2^r + appended bits */ - if (r) { - CHECK_BIT_BUFFER(br_state, r, goto undoit); - r = GET_BITS(r); - EOBRUN += r; - } - break; /* rest of block is handled by EOB logic */ - } - /* note s = 0 for processing ZRL */ - } - /* Advance over already-nonzero coefs and r still-zero coefs, - * appending correction bits to the nonzeroes. A correction bit is 1 - * if the absolute value of the coefficient must be increased. - */ - do { - thiscoef = *block + natural_order[k]; - if (*thiscoef) { - CHECK_BIT_BUFFER(br_state, 1, goto undoit); - if (GET_BITS(1)) { - if ((*thiscoef & p1) == 0) { /* do nothing if already set it */ - if (*thiscoef >= 0) - *thiscoef += p1; - else - *thiscoef += m1; - } - } - } else { - if (--r < 0) - break; /* reached target zero coefficient */ - } - k++; - } while (k <= Se); - if (s) { - int pos = natural_order[k]; - /* Output newly nonzero coefficient */ - (*block)[pos] = (JCOEF) s; - /* Remember its position in case we have to suspend */ - newnz_pos[num_newnz++] = pos; - } - k++; - } while (k <= Se); - } - - if (EOBRUN) { - /* Scan any remaining coefficient positions after the end-of-band - * (the last newly nonzero coefficient, if any). Append a correction - * bit to each already-nonzero coefficient. A correction bit is 1 - * if the absolute value of the coefficient must be increased. - */ - do { - thiscoef = *block + natural_order[k]; - if (*thiscoef) { - CHECK_BIT_BUFFER(br_state, 1, goto undoit); - if (GET_BITS(1)) { - if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */ - if (*thiscoef >= 0) - *thiscoef += p1; - else - *thiscoef += m1; - } - } - } - k++; - } while (k <= Se); - /* Count one block completed in EOB run */ - EOBRUN--; - } - - /* Completed MCU, so update state */ - BITREAD_SAVE_STATE(cinfo, entropy->bitstate); - entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */ - } - - /* Account for restart interval if using restarts */ - if (cinfo->restart_interval) - entropy->restarts_to_go--; - - return TRUE; - -undoit: - /* Re-zero any output coefficients that we made newly nonzero */ - while (num_newnz) - (*block)[newnz_pos[--num_newnz]] = 0; - - return FALSE; -} - - -/* - * Decode one MCU's worth of Huffman-compressed coefficients, - * partial blocks. - */ - -METHODDEF(boolean) -decode_mcu_sub (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - const int * natural_order; - int Se, blkn; - BITREAD_STATE_VARS; - savable_state state; - - /* Process restart marker if needed; may have to suspend */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! process_restart(cinfo)) - return FALSE; - } - - /* If we've run out of data, just leave the MCU set to zeroes. - * This way, we return uniform gray for the remainder of the segment. - */ - if (! entropy->insufficient_data) { - - natural_order = cinfo->natural_order; - Se = cinfo->lim_Se; - - /* Load up working state */ - BITREAD_LOAD_STATE(cinfo, entropy->bitstate); - ASSIGN_STATE(state, entropy->saved); - - /* Outer loop handles each block in the MCU */ - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - JBLOCKROW block = MCU_data[blkn]; - d_derived_tbl * htbl; - register int s, k, r; - int coef_limit, ci; - - /* Decode a single block's worth of coefficients */ - - /* Section F.2.2.1: decode the DC coefficient difference */ - htbl = entropy->dc_cur_tbls[blkn]; - HUFF_DECODE(s, br_state, htbl, return FALSE, label1); - - htbl = entropy->ac_cur_tbls[blkn]; - k = 1; - coef_limit = entropy->coef_limit[blkn]; - if (coef_limit) { - /* Convert DC difference to actual value, update last_dc_val */ - if (s) { - CHECK_BIT_BUFFER(br_state, s, return FALSE); - r = GET_BITS(s); - s = HUFF_EXTEND(r, s); - } - ci = cinfo->MCU_membership[blkn]; - s += state.last_dc_val[ci]; - state.last_dc_val[ci] = s; - /* Output the DC coefficient */ - (*block)[0] = (JCOEF) s; - - /* Section F.2.2.2: decode the AC coefficients */ - /* Since zeroes are skipped, output area must be cleared beforehand */ - for (; k < coef_limit; k++) { - HUFF_DECODE(s, br_state, htbl, return FALSE, label2); - - r = s >> 4; - s &= 15; - - if (s) { - k += r; - CHECK_BIT_BUFFER(br_state, s, return FALSE); - r = GET_BITS(s); - s = HUFF_EXTEND(r, s); - /* Output coefficient in natural (dezigzagged) order. - * Note: the extra entries in natural_order[] will save us - * if k > Se, which could happen if the data is corrupted. - */ - (*block)[natural_order[k]] = (JCOEF) s; - } else { - if (r != 15) - goto EndOfBlock; - k += 15; - } - } - } else { - if (s) { - CHECK_BIT_BUFFER(br_state, s, return FALSE); - DROP_BITS(s); - } - } - - /* Section F.2.2.2: decode the AC coefficients */ - /* In this path we just discard the values */ - for (; k <= Se; k++) { - HUFF_DECODE(s, br_state, htbl, return FALSE, label3); - - r = s >> 4; - s &= 15; - - if (s) { - k += r; - CHECK_BIT_BUFFER(br_state, s, return FALSE); - DROP_BITS(s); - } else { - if (r != 15) - break; - k += 15; - } - } - - EndOfBlock: ; - } - - /* Completed MCU, so update state */ - BITREAD_SAVE_STATE(cinfo, entropy->bitstate); - ASSIGN_STATE(entropy->saved, state); - } - - /* Account for restart interval if using restarts */ - if (cinfo->restart_interval) - entropy->restarts_to_go--; - - return TRUE; -} - - -/* - * Decode one MCU's worth of Huffman-compressed coefficients, - * full-size blocks. - */ - -METHODDEF(boolean) -decode_mcu (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int blkn; - BITREAD_STATE_VARS; - savable_state state; - - /* Process restart marker if needed; may have to suspend */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! process_restart(cinfo)) - return FALSE; - } - - /* If we've run out of data, just leave the MCU set to zeroes. - * This way, we return uniform gray for the remainder of the segment. - */ - if (! entropy->insufficient_data) { - - /* Load up working state */ - BITREAD_LOAD_STATE(cinfo, entropy->bitstate); - ASSIGN_STATE(state, entropy->saved); - - /* Outer loop handles each block in the MCU */ - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - JBLOCKROW block = MCU_data[blkn]; - d_derived_tbl * htbl; - register int s, k, r; - int coef_limit, ci; - - /* Decode a single block's worth of coefficients */ - - /* Section F.2.2.1: decode the DC coefficient difference */ - htbl = entropy->dc_cur_tbls[blkn]; - HUFF_DECODE(s, br_state, htbl, return FALSE, label1); - - htbl = entropy->ac_cur_tbls[blkn]; - k = 1; - coef_limit = entropy->coef_limit[blkn]; - if (coef_limit) { - /* Convert DC difference to actual value, update last_dc_val */ - if (s) { - CHECK_BIT_BUFFER(br_state, s, return FALSE); - r = GET_BITS(s); - s = HUFF_EXTEND(r, s); - } - ci = cinfo->MCU_membership[blkn]; - s += state.last_dc_val[ci]; - state.last_dc_val[ci] = s; - /* Output the DC coefficient */ - (*block)[0] = (JCOEF) s; - - /* Section F.2.2.2: decode the AC coefficients */ - /* Since zeroes are skipped, output area must be cleared beforehand */ - for (; k < coef_limit; k++) { - HUFF_DECODE(s, br_state, htbl, return FALSE, label2); - - r = s >> 4; - s &= 15; - - if (s) { - k += r; - CHECK_BIT_BUFFER(br_state, s, return FALSE); - r = GET_BITS(s); - s = HUFF_EXTEND(r, s); - /* Output coefficient in natural (dezigzagged) order. - * Note: the extra entries in jpeg_natural_order[] will save us - * if k >= DCTSIZE2, which could happen if the data is corrupted. - */ - (*block)[jpeg_natural_order[k]] = (JCOEF) s; - } else { - if (r != 15) - goto EndOfBlock; - k += 15; - } - } - } else { - if (s) { - CHECK_BIT_BUFFER(br_state, s, return FALSE); - DROP_BITS(s); - } - } - - /* Section F.2.2.2: decode the AC coefficients */ - /* In this path we just discard the values */ - for (; k < DCTSIZE2; k++) { - HUFF_DECODE(s, br_state, htbl, return FALSE, label3); - - r = s >> 4; - s &= 15; - - if (s) { - k += r; - CHECK_BIT_BUFFER(br_state, s, return FALSE); - DROP_BITS(s); - } else { - if (r != 15) - break; - k += 15; - } - } - - EndOfBlock: ; - } - - /* Completed MCU, so update state */ - BITREAD_SAVE_STATE(cinfo, entropy->bitstate); - ASSIGN_STATE(entropy->saved, state); - } - - /* Account for restart interval if using restarts */ - if (cinfo->restart_interval) - entropy->restarts_to_go--; - - return TRUE; -} - - -/* - * Initialize for a Huffman-compressed scan. - */ - -METHODDEF(void) -start_pass_huff_decoder (j_decompress_ptr cinfo) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int ci, blkn, tbl, i; - jpeg_component_info * compptr; - - if (cinfo->progressive_mode) { - /* Validate progressive scan parameters */ - if (cinfo->Ss == 0) { - if (cinfo->Se != 0) - goto bad; - } else { - /* need not check Ss/Se < 0 since they came from unsigned bytes */ - if (cinfo->Se < cinfo->Ss || cinfo->Se > cinfo->lim_Se) - goto bad; - /* AC scans may have only one component */ - if (cinfo->comps_in_scan != 1) - goto bad; - } - if (cinfo->Ah != 0) { - /* Successive approximation refinement scan: must have Al = Ah-1. */ - if (cinfo->Ah-1 != cinfo->Al) - goto bad; - } - if (cinfo->Al > 13) { /* need not check for < 0 */ - /* Arguably the maximum Al value should be less than 13 for 8-bit - * precision, but the spec doesn't say so, and we try to be liberal - * about what we accept. Note: large Al values could result in - * out-of-range DC coefficients during early scans, leading to bizarre - * displays due to overflows in the IDCT math. But we won't crash. - */ - bad: - ERREXIT4(cinfo, JERR_BAD_PROGRESSION, - cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); - } - /* Update progression status, and verify that scan order is legal. - * Note that inter-scan inconsistencies are treated as warnings - * not fatal errors ... not clear if this is right way to behave. - */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - int coefi, cindex = cinfo->cur_comp_info[ci]->component_index; - int *coef_bit_ptr = & cinfo->coef_bits[cindex][0]; - if (cinfo->Ss && coef_bit_ptr[0] < 0) /* AC without prior DC scan */ - WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0); - for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) { - int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi]; - if (cinfo->Ah != expected) - WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi); - coef_bit_ptr[coefi] = cinfo->Al; - } - } - - /* Select MCU decoding routine */ - if (cinfo->Ah == 0) { - if (cinfo->Ss == 0) - entropy->pub.decode_mcu = decode_mcu_DC_first; - else - entropy->pub.decode_mcu = decode_mcu_AC_first; - } else { - if (cinfo->Ss == 0) - entropy->pub.decode_mcu = decode_mcu_DC_refine; - else - entropy->pub.decode_mcu = decode_mcu_AC_refine; - } - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* Make sure requested tables are present, and compute derived tables. - * We may build same derived table more than once, but it's not expensive. - */ - if (cinfo->Ss == 0) { - if (cinfo->Ah == 0) { /* DC refinement needs no table */ - tbl = compptr->dc_tbl_no; - jpeg_make_d_derived_tbl(cinfo, TRUE, tbl, - & entropy->derived_tbls[tbl]); - } - } else { - tbl = compptr->ac_tbl_no; - jpeg_make_d_derived_tbl(cinfo, FALSE, tbl, - & entropy->derived_tbls[tbl]); - /* remember the single active table */ - entropy->ac_derived_tbl = entropy->derived_tbls[tbl]; - } - /* Initialize DC predictions to 0 */ - entropy->saved.last_dc_val[ci] = 0; - } - - /* Initialize private state variables */ - entropy->saved.EOBRUN = 0; - } else { - /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG. - * This ought to be an error condition, but we make it a warning because - * there are some baseline files out there with all zeroes in these bytes. - */ - if (cinfo->Ss != 0 || cinfo->Ah != 0 || cinfo->Al != 0 || - ((cinfo->is_baseline || cinfo->Se < DCTSIZE2) && - cinfo->Se != cinfo->lim_Se)) - WARNMS(cinfo, JWRN_NOT_SEQUENTIAL); - - /* Select MCU decoding routine */ - /* We retain the hard-coded case for full-size blocks. - * This is not necessary, but it appears that this version is slightly - * more performant in the given implementation. - * With an improved implementation we would prefer a single optimized - * function. - */ - if (cinfo->lim_Se != DCTSIZE2-1) - entropy->pub.decode_mcu = decode_mcu_sub; - else - entropy->pub.decode_mcu = decode_mcu; - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* Compute derived values for Huffman tables */ - /* We may do this more than once for a table, but it's not expensive */ - tbl = compptr->dc_tbl_no; - jpeg_make_d_derived_tbl(cinfo, TRUE, tbl, - & entropy->dc_derived_tbls[tbl]); - if (cinfo->lim_Se) { /* AC needs no table when not present */ - tbl = compptr->ac_tbl_no; - jpeg_make_d_derived_tbl(cinfo, FALSE, tbl, - & entropy->ac_derived_tbls[tbl]); - } - /* Initialize DC predictions to 0 */ - entropy->saved.last_dc_val[ci] = 0; - } - - /* Precalculate decoding info for each block in an MCU of this scan */ - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - ci = cinfo->MCU_membership[blkn]; - compptr = cinfo->cur_comp_info[ci]; - /* Precalculate which table to use for each block */ - entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no]; - entropy->ac_cur_tbls[blkn] = /* AC needs no table when not present */ - cinfo->lim_Se ? entropy->ac_derived_tbls[compptr->ac_tbl_no] : NULL; - /* Decide whether we really care about the coefficient values */ - if (compptr->component_needed) { - ci = compptr->DCT_v_scaled_size; - i = compptr->DCT_h_scaled_size; - switch (cinfo->lim_Se) { - case (1*1-1): - entropy->coef_limit[blkn] = 1; - break; - case (2*2-1): - if (ci <= 0 || ci > 2) ci = 2; - if (i <= 0 || i > 2) i = 2; - entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order2[ci - 1][i - 1]; - break; - case (3*3-1): - if (ci <= 0 || ci > 3) ci = 3; - if (i <= 0 || i > 3) i = 3; - entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order3[ci - 1][i - 1]; - break; - case (4*4-1): - if (ci <= 0 || ci > 4) ci = 4; - if (i <= 0 || i > 4) i = 4; - entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order4[ci - 1][i - 1]; - break; - case (5*5-1): - if (ci <= 0 || ci > 5) ci = 5; - if (i <= 0 || i > 5) i = 5; - entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order5[ci - 1][i - 1]; - break; - case (6*6-1): - if (ci <= 0 || ci > 6) ci = 6; - if (i <= 0 || i > 6) i = 6; - entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order6[ci - 1][i - 1]; - break; - case (7*7-1): - if (ci <= 0 || ci > 7) ci = 7; - if (i <= 0 || i > 7) i = 7; - entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order7[ci - 1][i - 1]; - break; - default: - if (ci <= 0 || ci > 8) ci = 8; - if (i <= 0 || i > 8) i = 8; - entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order[ci - 1][i - 1]; - } - } else { - entropy->coef_limit[blkn] = 0; - } - } - } - - /* Initialize bitread state variables */ - entropy->bitstate.bits_left = 0; - entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */ - entropy->insufficient_data = FALSE; - - /* Initialize restart counter */ - entropy->restarts_to_go = cinfo->restart_interval; -} - - -/* - * Module initialization routine for Huffman entropy decoding. - */ - -GLOBAL(void) -jinit_huff_decoder (j_decompress_ptr cinfo) -{ - huff_entropy_ptr entropy; - int i; - - entropy = (huff_entropy_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(huff_entropy_decoder)); - cinfo->entropy = &entropy->pub; - entropy->pub.start_pass = start_pass_huff_decoder; - entropy->pub.finish_pass = finish_pass_huff; - - if (cinfo->progressive_mode) { - /* Create progression status table */ - int *coef_bit_ptr, ci; - cinfo->coef_bits = (int (*)[DCTSIZE2]) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->num_components * DCTSIZE2 * SIZEOF(int)); - coef_bit_ptr = & cinfo->coef_bits[0][0]; - for (ci = 0; ci < cinfo->num_components; ci++) - for (i = 0; i < DCTSIZE2; i++) - *coef_bit_ptr++ = -1; - - /* Mark derived tables unallocated */ - for (i = 0; i < NUM_HUFF_TBLS; i++) { - entropy->derived_tbls[i] = NULL; - } - } else { - /* Mark derived tables unallocated */ - for (i = 0; i < NUM_HUFF_TBLS; i++) { - entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; - } - } -} diff --git a/thirdparty/jpeg-9e/jdinput.c b/thirdparty/jpeg-9e/jdinput.c deleted file mode 100644 index 29fbef9..0000000 --- a/thirdparty/jpeg-9e/jdinput.c +++ /dev/null @@ -1,657 +0,0 @@ -/* - * jdinput.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2002-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains input control logic for the JPEG decompressor. - * These routines are concerned with controlling the decompressor's input - * processing (marker reading and coefficient decoding). The actual input - * reading is done in jdmarker.c, jdhuff.c, and jdarith.c. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Private state */ - -typedef struct { - struct jpeg_input_controller pub; /* public fields */ - - int inheaders; /* Nonzero until first SOS is reached */ -} my_input_controller; - -typedef my_input_controller * my_inputctl_ptr; - - -/* Forward declarations */ -METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo)); - - -/* - * Routines to calculate various quantities related to the size of the image. - */ - - -/* - * Compute output image dimensions and related values. - * NOTE: this is exported for possible use by application. - * Hence it mustn't do anything that can't be done twice. - */ - -GLOBAL(void) -jpeg_core_output_dimensions (j_decompress_ptr cinfo) -/* Do computations that are needed before master selection phase. - * This function is used for transcoding and full decompression. - */ -{ -#ifdef IDCT_SCALING_SUPPORTED - int ci; - jpeg_component_info *compptr; - - /* Compute actual output image dimensions and DCT scaling choices. */ - if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom) { - /* Provide 1/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 1; - cinfo->min_DCT_v_scaled_size = 1; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 2) { - /* Provide 2/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 2L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 2L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 2; - cinfo->min_DCT_v_scaled_size = 2; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 3) { - /* Provide 3/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 3L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 3L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 3; - cinfo->min_DCT_v_scaled_size = 3; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 4) { - /* Provide 4/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 4L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 4L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 4; - cinfo->min_DCT_v_scaled_size = 4; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 5) { - /* Provide 5/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 5L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 5L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 5; - cinfo->min_DCT_v_scaled_size = 5; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 6) { - /* Provide 6/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 6L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 6L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 6; - cinfo->min_DCT_v_scaled_size = 6; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 7) { - /* Provide 7/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 7L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 7L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 7; - cinfo->min_DCT_v_scaled_size = 7; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 8) { - /* Provide 8/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 8L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 8L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 8; - cinfo->min_DCT_v_scaled_size = 8; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 9) { - /* Provide 9/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 9L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 9L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 9; - cinfo->min_DCT_v_scaled_size = 9; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 10) { - /* Provide 10/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 10L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 10L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 10; - cinfo->min_DCT_v_scaled_size = 10; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 11) { - /* Provide 11/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 11L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 11L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 11; - cinfo->min_DCT_v_scaled_size = 11; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 12) { - /* Provide 12/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 12L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 12L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 12; - cinfo->min_DCT_v_scaled_size = 12; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 13) { - /* Provide 13/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 13L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 13L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 13; - cinfo->min_DCT_v_scaled_size = 13; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 14) { - /* Provide 14/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 14L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 14L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 14; - cinfo->min_DCT_v_scaled_size = 14; - } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 15) { - /* Provide 15/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 15L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 15L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 15; - cinfo->min_DCT_v_scaled_size = 15; - } else { - /* Provide 16/block_size scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 16L, (long) cinfo->block_size); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 16L, (long) cinfo->block_size); - cinfo->min_DCT_h_scaled_size = 16; - cinfo->min_DCT_v_scaled_size = 16; - } - - /* Recompute dimensions of components */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - compptr->DCT_h_scaled_size = cinfo->min_DCT_h_scaled_size; - compptr->DCT_v_scaled_size = cinfo->min_DCT_v_scaled_size; - } - -#else /* !IDCT_SCALING_SUPPORTED */ - - /* Hardwire it to "no scaling" */ - cinfo->output_width = cinfo->image_width; - cinfo->output_height = cinfo->image_height; - /* initial_setup has already initialized DCT_scaled_size, - * and has computed unscaled downsampled_width and downsampled_height. - */ - -#endif /* IDCT_SCALING_SUPPORTED */ -} - - -LOCAL(void) -initial_setup (j_decompress_ptr cinfo) -/* Called once, when first SOS marker is reached */ -{ - int ci; - jpeg_component_info *compptr; - - /* Make sure image isn't bigger than I can handle */ - if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION || - (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION) - ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); - - /* Only 8 to 12 bits data precision are supported for DCT based JPEG */ - if (cinfo->data_precision < 8 || cinfo->data_precision > 12) - ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); - - /* Check that number of components won't exceed internal array sizes */ - if (cinfo->num_components > MAX_COMPONENTS) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, - MAX_COMPONENTS); - - /* Compute maximum sampling factors; check factor validity */ - cinfo->max_h_samp_factor = 1; - cinfo->max_v_samp_factor = 1; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || - compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) - ERREXIT(cinfo, JERR_BAD_SAMPLING); - cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, - compptr->h_samp_factor); - cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, - compptr->v_samp_factor); - } - - /* Derive block_size, natural_order, and lim_Se */ - if (cinfo->is_baseline || (cinfo->progressive_mode && - cinfo->comps_in_scan)) { /* no pseudo SOS marker */ - cinfo->block_size = DCTSIZE; - cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; - } else - switch (cinfo->Se) { - case (1*1-1): - cinfo->block_size = 1; - cinfo->natural_order = jpeg_natural_order; /* not needed */ - cinfo->lim_Se = cinfo->Se; - break; - case (2*2-1): - cinfo->block_size = 2; - cinfo->natural_order = jpeg_natural_order2; - cinfo->lim_Se = cinfo->Se; - break; - case (3*3-1): - cinfo->block_size = 3; - cinfo->natural_order = jpeg_natural_order3; - cinfo->lim_Se = cinfo->Se; - break; - case (4*4-1): - cinfo->block_size = 4; - cinfo->natural_order = jpeg_natural_order4; - cinfo->lim_Se = cinfo->Se; - break; - case (5*5-1): - cinfo->block_size = 5; - cinfo->natural_order = jpeg_natural_order5; - cinfo->lim_Se = cinfo->Se; - break; - case (6*6-1): - cinfo->block_size = 6; - cinfo->natural_order = jpeg_natural_order6; - cinfo->lim_Se = cinfo->Se; - break; - case (7*7-1): - cinfo->block_size = 7; - cinfo->natural_order = jpeg_natural_order7; - cinfo->lim_Se = cinfo->Se; - break; - case (8*8-1): - cinfo->block_size = 8; - cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; - break; - case (9*9-1): - cinfo->block_size = 9; - cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; - break; - case (10*10-1): - cinfo->block_size = 10; - cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; - break; - case (11*11-1): - cinfo->block_size = 11; - cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; - break; - case (12*12-1): - cinfo->block_size = 12; - cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; - break; - case (13*13-1): - cinfo->block_size = 13; - cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; - break; - case (14*14-1): - cinfo->block_size = 14; - cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; - break; - case (15*15-1): - cinfo->block_size = 15; - cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; - break; - case (16*16-1): - cinfo->block_size = 16; - cinfo->natural_order = jpeg_natural_order; - cinfo->lim_Se = DCTSIZE2-1; - break; - default: - ERREXIT4(cinfo, JERR_BAD_PROGRESSION, - cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); - } - - /* We initialize DCT_scaled_size and min_DCT_scaled_size to block_size. - * In the full decompressor, - * this will be overridden by jpeg_calc_output_dimensions in jdmaster.c; - * but in the transcoder, - * jpeg_calc_output_dimensions is not used, so we must do it here. - */ - cinfo->min_DCT_h_scaled_size = cinfo->block_size; - cinfo->min_DCT_v_scaled_size = cinfo->block_size; - - /* Compute dimensions of components */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - compptr->DCT_h_scaled_size = cinfo->block_size; - compptr->DCT_v_scaled_size = cinfo->block_size; - /* Size in DCT blocks */ - compptr->width_in_blocks = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, - (long) (cinfo->max_h_samp_factor * cinfo->block_size)); - compptr->height_in_blocks = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, - (long) (cinfo->max_v_samp_factor * cinfo->block_size)); - /* downsampled_width and downsampled_height will also be overridden by - * jdmaster.c if we are doing full decompression. The transcoder library - * doesn't use these values, but the calling application might. - */ - /* Size in samples */ - compptr->downsampled_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, - (long) cinfo->max_h_samp_factor); - compptr->downsampled_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, - (long) cinfo->max_v_samp_factor); - /* Mark component needed, until color conversion says otherwise */ - compptr->component_needed = TRUE; - /* Mark no quantization table yet saved for component */ - compptr->quant_table = NULL; - } - - /* Compute number of fully interleaved MCU rows. */ - cinfo->total_iMCU_rows = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, - (long) (cinfo->max_v_samp_factor * cinfo->block_size)); - - /* Decide whether file contains multiple scans */ - if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode) - cinfo->inputctl->has_multiple_scans = TRUE; - else - cinfo->inputctl->has_multiple_scans = FALSE; -} - - -LOCAL(void) -per_scan_setup (j_decompress_ptr cinfo) -/* Do computations that are needed before processing a JPEG scan */ -/* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */ -{ - int ci, mcublks, tmp; - jpeg_component_info *compptr; - - if (cinfo->comps_in_scan == 1) { - - /* Noninterleaved (single-component) scan */ - compptr = cinfo->cur_comp_info[0]; - - /* Overall image size in MCUs */ - cinfo->MCUs_per_row = compptr->width_in_blocks; - cinfo->MCU_rows_in_scan = compptr->height_in_blocks; - - /* For noninterleaved scan, always one block per MCU */ - compptr->MCU_width = 1; - compptr->MCU_height = 1; - compptr->MCU_blocks = 1; - compptr->MCU_sample_width = compptr->DCT_h_scaled_size; - compptr->last_col_width = 1; - /* For noninterleaved scans, it is convenient to define last_row_height - * as the number of block rows present in the last iMCU row. - */ - tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); - if (tmp == 0) tmp = compptr->v_samp_factor; - compptr->last_row_height = tmp; - - /* Prepare array describing MCU composition */ - cinfo->blocks_in_MCU = 1; - cinfo->MCU_membership[0] = 0; - - } else { - - /* Interleaved (multi-component) scan */ - if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, - MAX_COMPS_IN_SCAN); - - /* Overall image size in MCUs */ - cinfo->MCUs_per_row = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, - (long) (cinfo->max_h_samp_factor * cinfo->block_size)); - cinfo->MCU_rows_in_scan = cinfo->total_iMCU_rows; - - cinfo->blocks_in_MCU = 0; - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* Sampling factors give # of blocks of component in each MCU */ - compptr->MCU_width = compptr->h_samp_factor; - compptr->MCU_height = compptr->v_samp_factor; - compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; - compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_h_scaled_size; - /* Figure number of non-dummy blocks in last MCU column & row */ - tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); - if (tmp == 0) tmp = compptr->MCU_width; - compptr->last_col_width = tmp; - tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); - if (tmp == 0) tmp = compptr->MCU_height; - compptr->last_row_height = tmp; - /* Prepare array describing MCU composition */ - mcublks = compptr->MCU_blocks; - if (cinfo->blocks_in_MCU + mcublks > D_MAX_BLOCKS_IN_MCU) - ERREXIT(cinfo, JERR_BAD_MCU_SIZE); - while (mcublks-- > 0) { - cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; - } - } - - } -} - - -/* - * Save away a copy of the Q-table referenced by each component present - * in the current scan, unless already saved during a prior scan. - * - * In a multiple-scan JPEG file, the encoder could assign different components - * the same Q-table slot number, but change table definitions between scans - * so that each component uses a different Q-table. (The IJG encoder is not - * currently capable of doing this, but other encoders might.) Since we want - * to be able to dequantize all the components at the end of the file, this - * means that we have to save away the table actually used for each component. - * We do this by copying the table at the start of the first scan containing - * the component. - * The JPEG spec prohibits the encoder from changing the contents of a Q-table - * slot between scans of a component using that slot. If the encoder does so - * anyway, this decoder will simply use the Q-table values that were current - * at the start of the first scan for the component. - * - * The decompressor output side looks only at the saved quant tables, - * not at the current Q-table slots. - */ - -LOCAL(void) -latch_quant_tables (j_decompress_ptr cinfo) -{ - int ci, qtblno; - jpeg_component_info *compptr; - JQUANT_TBL * qtbl; - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* No work if we already saved Q-table for this component */ - if (compptr->quant_table != NULL) - continue; - /* Make sure specified quantization table is present */ - qtblno = compptr->quant_tbl_no; - if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || - cinfo->quant_tbl_ptrs[qtblno] == NULL) - ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); - /* OK, save away the quantization table */ - qtbl = (JQUANT_TBL *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(JQUANT_TBL)); - MEMCOPY(qtbl, cinfo->quant_tbl_ptrs[qtblno], SIZEOF(JQUANT_TBL)); - compptr->quant_table = qtbl; - } -} - - -/* - * Initialize the input modules to read a scan of compressed data. - * The first call to this is done by jdmaster.c after initializing - * the entire decompressor (during jpeg_start_decompress). - * Subsequent calls come from consume_markers, below. - */ - -METHODDEF(void) -start_input_pass (j_decompress_ptr cinfo) -{ - per_scan_setup(cinfo); - latch_quant_tables(cinfo); - (*cinfo->entropy->start_pass) (cinfo); - (*cinfo->coef->start_input_pass) (cinfo); - cinfo->inputctl->consume_input = cinfo->coef->consume_data; -} - - -/* - * Finish up after inputting a compressed-data scan. - * This is called by the coefficient controller after it's read all - * the expected data of the scan. - */ - -METHODDEF(void) -finish_input_pass (j_decompress_ptr cinfo) -{ - (*cinfo->entropy->finish_pass) (cinfo); - cinfo->inputctl->consume_input = consume_markers; -} - - -/* - * Read JPEG markers before, between, or after compressed-data scans. - * Change state as necessary when a new scan is reached. - * Return value is JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. - * - * The consume_input method pointer points either here or to the - * coefficient controller's consume_data routine, depending on whether - * we are reading a compressed data segment or inter-segment markers. - * - * Note: This function should NOT return a pseudo SOS marker (with zero - * component number) to the caller. A pseudo marker received by - * read_markers is processed and then skipped for other markers. - */ - -METHODDEF(int) -consume_markers (j_decompress_ptr cinfo) -{ - my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; - int val; - - if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */ - return JPEG_REACHED_EOI; - - for (;;) { /* Loop to pass pseudo SOS marker */ - val = (*cinfo->marker->read_markers) (cinfo); - - switch (val) { - case JPEG_REACHED_SOS: /* Found SOS */ - if (inputctl->inheaders) { /* 1st SOS */ - if (inputctl->inheaders == 1) - initial_setup(cinfo); - if (cinfo->comps_in_scan == 0) { /* pseudo SOS marker */ - inputctl->inheaders = 2; - break; - } - inputctl->inheaders = 0; - /* Note: start_input_pass must be called by jdmaster.c - * before any more input can be consumed. jdapimin.c is - * responsible for enforcing this sequencing. - */ - } else { /* 2nd or later SOS marker */ - if (! inputctl->pub.has_multiple_scans) - ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */ - if (cinfo->comps_in_scan == 0) /* unexpected pseudo SOS marker */ - break; - start_input_pass(cinfo); - } - return val; - case JPEG_REACHED_EOI: /* Found EOI */ - inputctl->pub.eoi_reached = TRUE; - if (inputctl->inheaders) { /* Tables-only datastream, apparently */ - if (cinfo->marker->saw_SOF) - ERREXIT(cinfo, JERR_SOF_NO_SOS); - } else { - /* Prevent infinite loop in coef ctlr's decompress_data routine - * if user set output_scan_number larger than number of scans. - */ - if (cinfo->output_scan_number > cinfo->input_scan_number) - cinfo->output_scan_number = cinfo->input_scan_number; - } - return val; - case JPEG_SUSPENDED: - return val; - default: - return val; - } - } -} - - -/* - * Reset state to begin a fresh datastream. - */ - -METHODDEF(void) -reset_input_controller (j_decompress_ptr cinfo) -{ - my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; - - inputctl->pub.consume_input = consume_markers; - inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ - inputctl->pub.eoi_reached = FALSE; - inputctl->inheaders = 1; - /* Reset other modules */ - (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); - (*cinfo->marker->reset_marker_reader) (cinfo); - /* Reset progression state -- would be cleaner if entropy decoder did this */ - cinfo->coef_bits = NULL; -} - - -/* - * Initialize the input controller module. - * This is called only once, when the decompression object is created. - */ - -GLOBAL(void) -jinit_input_controller (j_decompress_ptr cinfo) -{ - my_inputctl_ptr inputctl; - - /* Create subobject in permanent pool */ - inputctl = (my_inputctl_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(my_input_controller)); - cinfo->inputctl = &inputctl->pub; - /* Initialize method pointers */ - inputctl->pub.consume_input = consume_markers; - inputctl->pub.reset_input_controller = reset_input_controller; - inputctl->pub.start_input_pass = start_input_pass; - inputctl->pub.finish_input_pass = finish_input_pass; - /* Initialize state: can't use reset_input_controller since we don't - * want to try to reset other modules yet. - */ - inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ - inputctl->pub.eoi_reached = FALSE; - inputctl->inheaders = 1; -} diff --git a/thirdparty/jpeg-9e/jdmainct.c b/thirdparty/jpeg-9e/jdmainct.c deleted file mode 100644 index 1cd66d8..0000000 --- a/thirdparty/jpeg-9e/jdmainct.c +++ /dev/null @@ -1,511 +0,0 @@ -/* - * jdmainct.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2002-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the main buffer controller for decompression. - * The main buffer lies between the JPEG decompressor proper and the - * post-processor; it holds downsampled data in the JPEG colorspace. - * - * Note that this code is bypassed in raw-data mode, since the application - * supplies the equivalent of the main buffer in that case. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * In the current system design, the main buffer need never be a full-image - * buffer; any full-height buffers will be found inside the coefficient or - * postprocessing controllers. Nonetheless, the main controller is not - * trivial. Its responsibility is to provide context rows for upsampling/ - * rescaling, and doing this in an efficient fashion is a bit tricky. - * - * Postprocessor input data is counted in "row groups". A row group is - * defined to be (v_samp_factor * DCT_v_scaled_size / min_DCT_v_scaled_size) - * sample rows of each component. (We require DCT_scaled_size values to be - * chosen such that these numbers are integers. In practice DCT_scaled_size - * values will likely be powers of two, so we actually have the stronger - * condition that DCT_scaled_size / min_DCT_scaled_size is an integer.) - * Upsampling will typically produce max_v_samp_factor pixel rows from each - * row group (times any additional scale factor that the upsampler is - * applying). - * - * The coefficient controller will deliver data to us one iMCU row at a time; - * each iMCU row contains v_samp_factor * DCT_v_scaled_size sample rows, or - * exactly min_DCT_v_scaled_size row groups. (This amount of data corresponds - * to one row of MCUs when the image is fully interleaved.) Note that the - * number of sample rows varies across components, but the number of row - * groups does not. Some garbage sample rows may be included in the last iMCU - * row at the bottom of the image. - * - * Depending on the vertical scaling algorithm used, the upsampler may need - * access to the sample row(s) above and below its current input row group. - * The upsampler is required to set need_context_rows TRUE at global selection - * time if so. When need_context_rows is FALSE, this controller can simply - * obtain one iMCU row at a time from the coefficient controller and dole it - * out as row groups to the postprocessor. - * - * When need_context_rows is TRUE, this controller guarantees that the buffer - * passed to postprocessing contains at least one row group's worth of samples - * above and below the row group(s) being processed. Note that the context - * rows "above" the first passed row group appear at negative row offsets in - * the passed buffer. At the top and bottom of the image, the required - * context rows are manufactured by duplicating the first or last real sample - * row; this avoids having special cases in the upsampling inner loops. - * - * The amount of context is fixed at one row group just because that's a - * convenient number for this controller to work with. The existing - * upsamplers really only need one sample row of context. An upsampler - * supporting arbitrary output rescaling might wish for more than one row - * group of context when shrinking the image; tough, we don't handle that. - * (This is justified by the assumption that downsizing will be handled mostly - * by adjusting the DCT_scaled_size values, so that the actual scale factor at - * the upsample step needn't be much less than one.) - * - * To provide the desired context, we have to retain the last two row groups - * of one iMCU row while reading in the next iMCU row. (The last row group - * can't be processed until we have another row group for its below-context, - * and so we have to save the next-to-last group too for its above-context.) - * We could do this most simply by copying data around in our buffer, but - * that'd be very slow. We can avoid copying any data by creating a rather - * strange pointer structure. Here's how it works. We allocate a workspace - * consisting of M+2 row groups (where M = min_DCT_v_scaled_size is the number - * of row groups per iMCU row). We create two sets of redundant pointers to - * the workspace. Labeling the physical row groups 0 to M+1, the synthesized - * pointer lists look like this: - * M+1 M-1 - * master pointer --> 0 master pointer --> 0 - * 1 1 - * ... ... - * M-3 M-3 - * M-2 M - * M-1 M+1 - * M M-2 - * M+1 M-1 - * 0 0 - * We read alternate iMCU rows using each master pointer; thus the last two - * row groups of the previous iMCU row remain un-overwritten in the workspace. - * The pointer lists are set up so that the required context rows appear to - * be adjacent to the proper places when we pass the pointer lists to the - * upsampler. - * - * The above pictures describe the normal state of the pointer lists. - * At top and bottom of the image, we diddle the pointer lists to duplicate - * the first or last sample row as necessary (this is cheaper than copying - * sample rows around). - * - * This scheme breaks down if M < 2, ie, min_DCT_v_scaled_size is 1. In that - * situation each iMCU row provides only one row group so the buffering logic - * must be different (eg, we must read two iMCU rows before we can emit the - * first row group). For now, we simply do not support providing context - * rows when min_DCT_v_scaled_size is 1. That combination seems unlikely to - * be worth providing --- if someone wants a 1/8th-size preview, they probably - * want it quick and dirty, so a context-free upsampler is sufficient. - */ - - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_d_main_controller pub; /* public fields */ - - /* Pointer to allocated workspace (M or M+2 row groups). */ - JSAMPARRAY buffer[MAX_COMPONENTS]; - - JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */ - JDIMENSION rowgroups_avail; /* row groups available to postprocessor */ - - /* Remaining fields are only used in the context case. */ - - boolean buffer_full; /* Have we gotten an iMCU row from decoder? */ - - /* These are the master pointers to the funny-order pointer lists. */ - JSAMPIMAGE xbuffer[2]; /* pointers to weird pointer lists */ - - int whichptr; /* indicates which pointer set is now in use */ - int context_state; /* process_data state machine status */ - JDIMENSION iMCU_row_ctr; /* counts iMCU rows to detect image top/bot */ -} my_main_controller; - -typedef my_main_controller * my_main_ptr; - -/* context_state values: */ -#define CTX_PREPARE_FOR_IMCU 0 /* need to prepare for MCU row */ -#define CTX_PROCESS_IMCU 1 /* feeding iMCU to postprocessor */ -#define CTX_POSTPONED_ROW 2 /* feeding postponed row group */ - - -/* Forward declarations */ -METHODDEF(void) process_data_simple_main - JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); -METHODDEF(void) process_data_context_main - JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); -#ifdef QUANT_2PASS_SUPPORTED -METHODDEF(void) process_data_crank_post - JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); -#endif - - -LOCAL(void) -alloc_funny_pointers (j_decompress_ptr cinfo) -/* Allocate space for the funny pointer lists. - * This is done only once, not once per pass. - */ -{ - my_main_ptr mainp = (my_main_ptr) cinfo->main; - int ci, rgroup; - int M = cinfo->min_DCT_v_scaled_size; - jpeg_component_info *compptr; - JSAMPARRAY xbuf; - - /* Get top-level space for component array pointers. - * We alloc both arrays with one call to save a few cycles. - */ - mainp->xbuffer[0] = (JSAMPIMAGE) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->num_components * 2 * SIZEOF(JSAMPARRAY)); - mainp->xbuffer[1] = mainp->xbuffer[0] + cinfo->num_components; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (! compptr->component_needed) - continue; /* skip uninteresting component */ - rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / - cinfo->min_DCT_v_scaled_size; /* height of a row group of component */ - /* Get space for pointer lists --- M+4 row groups in each list. - * We alloc both pointer lists with one call to save a few cycles. - */ - xbuf = (JSAMPARRAY) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, - JPOOL_IMAGE, 2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW)); - xbuf += rgroup; /* want one row group at negative offsets */ - mainp->xbuffer[0][ci] = xbuf; - xbuf += rgroup * (M + 4); - mainp->xbuffer[1][ci] = xbuf; - } -} - - -LOCAL(void) -make_funny_pointers (j_decompress_ptr cinfo) -/* Create the funny pointer lists discussed in the comments above. - * The actual workspace is already allocated (in mainp->buffer), - * and the space for the pointer lists is allocated too. - * This routine just fills in the curiously ordered lists. - * This will be repeated at the beginning of each pass. - */ -{ - my_main_ptr mainp = (my_main_ptr) cinfo->main; - int ci, i, rgroup; - int M = cinfo->min_DCT_v_scaled_size; - jpeg_component_info *compptr; - JSAMPARRAY buf, xbuf0, xbuf1; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (! compptr->component_needed) - continue; /* skip uninteresting component */ - rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / - cinfo->min_DCT_v_scaled_size; /* height of a row group of component */ - xbuf0 = mainp->xbuffer[0][ci]; - xbuf1 = mainp->xbuffer[1][ci]; - /* First copy the workspace pointers as-is */ - buf = mainp->buffer[ci]; - for (i = 0; i < rgroup * (M + 2); i++) { - xbuf0[i] = xbuf1[i] = buf[i]; - } - /* In the second list, put the last four row groups in swapped order */ - for (i = 0; i < rgroup * 2; i++) { - xbuf1[rgroup*(M-2) + i] = buf[rgroup*M + i]; - xbuf1[rgroup*M + i] = buf[rgroup*(M-2) + i]; - } - /* The wraparound pointers at top and bottom will be filled later - * (see set_wraparound_pointers, below). Initially we want the "above" - * pointers to duplicate the first actual data line. This only needs - * to happen in xbuffer[0]. - */ - for (i = 0; i < rgroup; i++) { - xbuf0[i - rgroup] = xbuf0[0]; - } - } -} - - -LOCAL(void) -set_wraparound_pointers (j_decompress_ptr cinfo) -/* Set up the "wraparound" pointers at top and bottom of the pointer lists. - * This changes the pointer list state from top-of-image to the normal state. - */ -{ - my_main_ptr mainp = (my_main_ptr) cinfo->main; - int ci, i, rgroup; - int M = cinfo->min_DCT_v_scaled_size; - jpeg_component_info *compptr; - JSAMPARRAY xbuf0, xbuf1; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (! compptr->component_needed) - continue; /* skip uninteresting component */ - rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / - cinfo->min_DCT_v_scaled_size; /* height of a row group of component */ - xbuf0 = mainp->xbuffer[0][ci]; - xbuf1 = mainp->xbuffer[1][ci]; - for (i = 0; i < rgroup; i++) { - xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i]; - xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i]; - xbuf0[rgroup*(M+2) + i] = xbuf0[i]; - xbuf1[rgroup*(M+2) + i] = xbuf1[i]; - } - } -} - - -LOCAL(void) -set_bottom_pointers (j_decompress_ptr cinfo) -/* Change the pointer lists to duplicate the last sample row at the bottom - * of the image. whichptr indicates which xbuffer holds the final iMCU row. - * Also sets rowgroups_avail to indicate number of nondummy row groups in row. - */ -{ - my_main_ptr mainp = (my_main_ptr) cinfo->main; - int ci, i, rgroup, iMCUheight, rows_left; - jpeg_component_info *compptr; - JSAMPARRAY xbuf; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (! compptr->component_needed) - continue; /* skip uninteresting component */ - /* Count sample rows in one iMCU row and in one row group */ - iMCUheight = compptr->v_samp_factor * compptr->DCT_v_scaled_size; - rgroup = iMCUheight / cinfo->min_DCT_v_scaled_size; - /* Count nondummy sample rows remaining for this component */ - rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight); - if (rows_left == 0) rows_left = iMCUheight; - /* Count nondummy row groups. Should get same answer for each component, - * so we need only do it once. - */ - if (ci == 0) { - mainp->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1); - } - /* Duplicate the last real sample row rgroup*2 times; this pads out the - * last partial rowgroup and ensures at least one full rowgroup of context. - */ - xbuf = mainp->xbuffer[mainp->whichptr][ci]; - for (i = 0; i < rgroup * 2; i++) { - xbuf[rows_left + i] = xbuf[rows_left-1]; - } - } -} - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_main_ptr mainp = (my_main_ptr) cinfo->main; - - switch (pass_mode) { - case JBUF_PASS_THRU: - if (cinfo->upsample->need_context_rows) { - mainp->pub.process_data = process_data_context_main; - make_funny_pointers(cinfo); /* Create the xbuffer[] lists */ - mainp->whichptr = 0; /* Read first iMCU row into xbuffer[0] */ - mainp->context_state = CTX_PREPARE_FOR_IMCU; - mainp->iMCU_row_ctr = 0; - mainp->buffer_full = FALSE; /* Mark buffer empty */ - } else { - /* Simple case with no context needed */ - mainp->pub.process_data = process_data_simple_main; - mainp->rowgroup_ctr = mainp->rowgroups_avail; /* Mark buffer empty */ - } - break; -#ifdef QUANT_2PASS_SUPPORTED - case JBUF_CRANK_DEST: - /* For last pass of 2-pass quantization, just crank the postprocessor */ - mainp->pub.process_data = process_data_crank_post; - break; -#endif - default: - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - } -} - - -/* - * Process some data. - * This handles the simple case where no context is required. - */ - -METHODDEF(void) -process_data_simple_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) -{ - my_main_ptr mainp = (my_main_ptr) cinfo->main; - - /* Read input data if we haven't filled the main buffer yet */ - if (mainp->rowgroup_ctr >= mainp->rowgroups_avail) { - if (! (*cinfo->coef->decompress_data) (cinfo, mainp->buffer)) - return; /* suspension forced, can do nothing more */ - mainp->rowgroup_ctr = 0; /* OK, we have an iMCU row to work with */ - } - - /* Note: at the bottom of the image, we may pass extra garbage row groups - * to the postprocessor. The postprocessor has to check for bottom - * of image anyway (at row resolution), so no point in us doing it too. - */ - - /* Feed the postprocessor */ - (*cinfo->post->post_process_data) (cinfo, mainp->buffer, - &mainp->rowgroup_ctr, mainp->rowgroups_avail, - output_buf, out_row_ctr, out_rows_avail); -} - - -/* - * Process some data. - * This handles the case where context rows must be provided. - */ - -METHODDEF(void) -process_data_context_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) -{ - my_main_ptr mainp = (my_main_ptr) cinfo->main; - - /* Read input data if we haven't filled the main buffer yet */ - if (! mainp->buffer_full) { - if (! (*cinfo->coef->decompress_data) (cinfo, - mainp->xbuffer[mainp->whichptr])) - return; /* suspension forced, can do nothing more */ - mainp->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ - mainp->iMCU_row_ctr++; /* count rows received */ - } - - /* Postprocessor typically will not swallow all the input data it is handed - * in one call (due to filling the output buffer first). Must be prepared - * to exit and restart. This switch lets us keep track of how far we got. - * Note that each case falls through to the next on successful completion. - */ - switch (mainp->context_state) { - case CTX_POSTPONED_ROW: - /* Call postprocessor using previously set pointers for postponed row */ - (*cinfo->post->post_process_data) (cinfo, mainp->xbuffer[mainp->whichptr], - &mainp->rowgroup_ctr, mainp->rowgroups_avail, - output_buf, out_row_ctr, out_rows_avail); - if (mainp->rowgroup_ctr < mainp->rowgroups_avail) - return; /* Need to suspend */ - mainp->context_state = CTX_PREPARE_FOR_IMCU; - if (*out_row_ctr >= out_rows_avail) - return; /* Postprocessor exactly filled output buf */ - /*FALLTHROUGH*/ - case CTX_PREPARE_FOR_IMCU: - /* Prepare to process first M-1 row groups of this iMCU row */ - mainp->rowgroup_ctr = 0; - mainp->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_v_scaled_size - 1); - /* Check for bottom of image: if so, tweak pointers to "duplicate" - * the last sample row, and adjust rowgroups_avail to ignore padding rows. - */ - if (mainp->iMCU_row_ctr == cinfo->total_iMCU_rows) - set_bottom_pointers(cinfo); - mainp->context_state = CTX_PROCESS_IMCU; - /*FALLTHROUGH*/ - case CTX_PROCESS_IMCU: - /* Call postprocessor using previously set pointers */ - (*cinfo->post->post_process_data) (cinfo, mainp->xbuffer[mainp->whichptr], - &mainp->rowgroup_ctr, mainp->rowgroups_avail, - output_buf, out_row_ctr, out_rows_avail); - if (mainp->rowgroup_ctr < mainp->rowgroups_avail) - return; /* Need to suspend */ - /* After the first iMCU, change wraparound pointers to normal state */ - if (mainp->iMCU_row_ctr == 1) - set_wraparound_pointers(cinfo); - /* Prepare to load new iMCU row using other xbuffer list */ - mainp->whichptr ^= 1; /* 0=>1 or 1=>0 */ - mainp->buffer_full = FALSE; - /* Still need to process last row group of this iMCU row, */ - /* which is saved at index M+1 of the other xbuffer */ - mainp->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_v_scaled_size + 1); - mainp->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_v_scaled_size + 2); - mainp->context_state = CTX_POSTPONED_ROW; - } -} - - -/* - * Process some data. - * Final pass of two-pass quantization: just call the postprocessor. - * Source data will be the postprocessor controller's internal buffer. - */ - -#ifdef QUANT_2PASS_SUPPORTED - -METHODDEF(void) -process_data_crank_post (j_decompress_ptr cinfo, JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) -{ - (*cinfo->post->post_process_data) (cinfo, (JSAMPIMAGE) NULL, - (JDIMENSION *) NULL, (JDIMENSION) 0, - output_buf, out_row_ctr, out_rows_avail); -} - -#endif /* QUANT_2PASS_SUPPORTED */ - - -/* - * Initialize main buffer controller. - */ - -GLOBAL(void) -jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer) -{ - my_main_ptr mainp; - int ci, rgroup, ngroups; - jpeg_component_info *compptr; - - mainp = (my_main_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_main_controller)); - cinfo->main = &mainp->pub; - mainp->pub.start_pass = start_pass_main; - - if (need_full_buffer) /* shouldn't happen */ - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - - /* Allocate the workspace. - * ngroups is the number of row groups we need. - */ - if (cinfo->upsample->need_context_rows) { - if (cinfo->min_DCT_v_scaled_size < 2) /* unsupported, see comments above */ - ERREXIT(cinfo, JERR_NOTIMPL); - alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */ - ngroups = cinfo->min_DCT_v_scaled_size + 2; - } else { - /* There are always min_DCT_v_scaled_size row groups in an iMCU row. */ - ngroups = cinfo->min_DCT_v_scaled_size; - mainp->rowgroups_avail = (JDIMENSION) ngroups; - } - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (! compptr->component_needed) - continue; /* skip uninteresting component */ - rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / - cinfo->min_DCT_v_scaled_size; /* height of a row group of component */ - mainp->buffer[ci] = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - compptr->width_in_blocks * ((JDIMENSION) compptr->DCT_h_scaled_size), - (JDIMENSION) (rgroup * ngroups)); - } -} diff --git a/thirdparty/jpeg-9e/jdmarker.c b/thirdparty/jpeg-9e/jdmarker.c deleted file mode 100644 index c10fde6..0000000 --- a/thirdparty/jpeg-9e/jdmarker.c +++ /dev/null @@ -1,1505 +0,0 @@ -/* - * jdmarker.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2009-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to decode JPEG datastream markers. - * Most of the complexity arises from our desire to support input - * suspension: if not all of the data for a marker is available, - * we must exit back to the application. On resumption, we reprocess - * the marker. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -typedef enum { /* JPEG marker codes */ - M_SOF0 = 0xc0, - M_SOF1 = 0xc1, - M_SOF2 = 0xc2, - M_SOF3 = 0xc3, - - M_SOF5 = 0xc5, - M_SOF6 = 0xc6, - M_SOF7 = 0xc7, - - M_JPG = 0xc8, - M_SOF9 = 0xc9, - M_SOF10 = 0xca, - M_SOF11 = 0xcb, - - M_SOF13 = 0xcd, - M_SOF14 = 0xce, - M_SOF15 = 0xcf, - - M_DHT = 0xc4, - - M_DAC = 0xcc, - - M_RST0 = 0xd0, - M_RST1 = 0xd1, - M_RST2 = 0xd2, - M_RST3 = 0xd3, - M_RST4 = 0xd4, - M_RST5 = 0xd5, - M_RST6 = 0xd6, - M_RST7 = 0xd7, - - M_SOI = 0xd8, - M_EOI = 0xd9, - M_SOS = 0xda, - M_DQT = 0xdb, - M_DNL = 0xdc, - M_DRI = 0xdd, - M_DHP = 0xde, - M_EXP = 0xdf, - - M_APP0 = 0xe0, - M_APP1 = 0xe1, - M_APP2 = 0xe2, - M_APP3 = 0xe3, - M_APP4 = 0xe4, - M_APP5 = 0xe5, - M_APP6 = 0xe6, - M_APP7 = 0xe7, - M_APP8 = 0xe8, - M_APP9 = 0xe9, - M_APP10 = 0xea, - M_APP11 = 0xeb, - M_APP12 = 0xec, - M_APP13 = 0xed, - M_APP14 = 0xee, - M_APP15 = 0xef, - - M_JPG0 = 0xf0, - M_JPG8 = 0xf8, - M_JPG13 = 0xfd, - M_COM = 0xfe, - - M_TEM = 0x01, - - M_ERROR = 0x100 -} JPEG_MARKER; - - -/* Private state */ - -typedef struct { - struct jpeg_marker_reader pub; /* public fields */ - - /* Application-overridable marker processing methods */ - jpeg_marker_parser_method process_COM; - jpeg_marker_parser_method process_APPn[16]; - - /* Limit on marker data length to save for each marker type */ - unsigned int length_limit_COM; - unsigned int length_limit_APPn[16]; - - /* Status of COM/APPn marker saving */ - jpeg_saved_marker_ptr cur_marker; /* NULL if not processing a marker */ - unsigned int bytes_read; /* data bytes read so far in marker */ - /* Note: cur_marker is not linked into marker_list until it's all read. */ -} my_marker_reader; - -typedef my_marker_reader * my_marker_ptr; - - -/* - * Macros for fetching data from the data source module. - * - * At all times, cinfo->src->next_input_byte and ->bytes_in_buffer reflect - * the current restart point; we update them only when we have reached a - * suitable place to restart if a suspension occurs. - */ - -/* Declare and initialize local copies of input pointer/count */ -#define INPUT_VARS(cinfo) \ - struct jpeg_source_mgr * datasrc = (cinfo)->src; \ - const JOCTET * next_input_byte = datasrc->next_input_byte; \ - size_t bytes_in_buffer = datasrc->bytes_in_buffer - -/* Unload the local copies --- do this only at a restart boundary */ -#define INPUT_SYNC(cinfo) \ - ( datasrc->next_input_byte = next_input_byte, \ - datasrc->bytes_in_buffer = bytes_in_buffer ) - -/* Reload the local copies --- used only in MAKE_BYTE_AVAIL */ -#define INPUT_RELOAD(cinfo) \ - ( next_input_byte = datasrc->next_input_byte, \ - bytes_in_buffer = datasrc->bytes_in_buffer ) - -/* Internal macro for INPUT_BYTE and INPUT_2BYTES: make a byte available. - * Note we do *not* do INPUT_SYNC before calling fill_input_buffer, - * but we must reload the local copies after a successful fill. - */ -#define MAKE_BYTE_AVAIL(cinfo,action) \ - if (bytes_in_buffer == 0) { \ - if (! (*datasrc->fill_input_buffer) (cinfo)) \ - { action; } \ - INPUT_RELOAD(cinfo); \ - } - -/* Read a byte into variable V. - * If must suspend, take the specified action (typically "return FALSE"). - */ -#define INPUT_BYTE(cinfo,V,action) \ - MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ - bytes_in_buffer--; \ - V = GETJOCTET(*next_input_byte++); ) - -/* As above, but read two bytes interpreted as an unsigned 16-bit integer. - * V should be declared unsigned int or perhaps INT32. - */ -#define INPUT_2BYTES(cinfo,V,action) \ - MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ - bytes_in_buffer--; \ - V = ((unsigned int) GETJOCTET(*next_input_byte++)) << 8; \ - MAKE_BYTE_AVAIL(cinfo,action); \ - bytes_in_buffer--; \ - V += GETJOCTET(*next_input_byte++); ) - - -/* - * Routines to process JPEG markers. - * - * Entry condition: JPEG marker itself has been read and its code saved - * in cinfo->unread_marker; input restart point is just after the marker. - * - * Exit: if return TRUE, have read and processed any parameters, and have - * updated the restart point to point after the parameters. - * If return FALSE, was forced to suspend before reaching end of - * marker parameters; restart point has not been moved. Same routine - * will be called again after application supplies more input data. - * - * This approach to suspension assumes that all of a marker's parameters - * can fit into a single input bufferload. This should hold for "normal" - * markers. Some COM/APPn markers might have large parameter segments - * that might not fit. If we are simply dropping such a marker, we use - * skip_input_data to get past it, and thereby put the problem on the - * source manager's shoulders. If we are saving the marker's contents - * into memory, we use a slightly different convention: when forced to - * suspend, the marker processor updates the restart point to the end of - * what it's consumed (ie, the end of the buffer) before returning FALSE. - * On resumption, cinfo->unread_marker still contains the marker code, - * but the data source will point to the next chunk of marker data. - * The marker processor must retain internal state to deal with this. - * - * Note that we don't bother to avoid duplicate trace messages if a - * suspension occurs within marker parameters. Other side effects - * require more care. - */ - - -LOCAL(boolean) -get_soi (j_decompress_ptr cinfo) -/* Process an SOI marker */ -{ - int i; - - TRACEMS(cinfo, 1, JTRC_SOI); - - if (cinfo->marker->saw_SOI) - ERREXIT(cinfo, JERR_SOI_DUPLICATE); - - /* Reset all parameters that are defined to be reset by SOI */ - - for (i = 0; i < NUM_ARITH_TBLS; i++) { - cinfo->arith_dc_L[i] = 0; - cinfo->arith_dc_U[i] = 1; - cinfo->arith_ac_K[i] = 5; - } - cinfo->restart_interval = 0; - - /* Set initial assumptions for colorspace etc */ - - cinfo->jpeg_color_space = JCS_UNKNOWN; - cinfo->color_transform = JCT_NONE; - cinfo->CCIR601_sampling = FALSE; /* Assume non-CCIR sampling??? */ - - cinfo->saw_JFIF_marker = FALSE; - cinfo->JFIF_major_version = 1; /* set default JFIF APP0 values */ - cinfo->JFIF_minor_version = 1; - cinfo->density_unit = 0; - cinfo->X_density = 1; - cinfo->Y_density = 1; - cinfo->saw_Adobe_marker = FALSE; - cinfo->Adobe_transform = 0; - - cinfo->marker->saw_SOI = TRUE; - - return TRUE; -} - - -LOCAL(boolean) -get_sof (j_decompress_ptr cinfo, boolean is_baseline, boolean is_prog, - boolean is_arith) -/* Process a SOFn marker */ -{ - INT32 length; - int c, ci, i; - jpeg_component_info * compptr; - INPUT_VARS(cinfo); - - cinfo->is_baseline = is_baseline; - cinfo->progressive_mode = is_prog; - cinfo->arith_code = is_arith; - - INPUT_2BYTES(cinfo, length, return FALSE); - - INPUT_BYTE(cinfo, cinfo->data_precision, return FALSE); - INPUT_2BYTES(cinfo, cinfo->image_height, return FALSE); - INPUT_2BYTES(cinfo, cinfo->image_width, return FALSE); - INPUT_BYTE(cinfo, cinfo->num_components, return FALSE); - - length -= 8; - - TRACEMS4(cinfo, 1, JTRC_SOF, cinfo->unread_marker, - (int) cinfo->image_width, (int) cinfo->image_height, - cinfo->num_components); - - if (cinfo->marker->saw_SOF) - ERREXIT(cinfo, JERR_SOF_DUPLICATE); - - /* We don't support files in which the image height is initially specified */ - /* as 0 and is later redefined by DNL. As long as we have to check that, */ - /* might as well have a general sanity check. */ - if (cinfo->image_height <= 0 || cinfo->image_width <= 0 || - cinfo->num_components <= 0) - ERREXIT(cinfo, JERR_EMPTY_IMAGE); - - if (length != (cinfo->num_components * 3)) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - if (cinfo->comp_info == NULL) /* do only once, even if suspend */ - cinfo->comp_info = (jpeg_component_info *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->num_components * SIZEOF(jpeg_component_info)); - - for (ci = 0; ci < cinfo->num_components; ci++) { - INPUT_BYTE(cinfo, c, return FALSE); - /* Check to see whether component id has already been seen */ - /* (in violation of the spec, but unfortunately seen in some */ - /* files). If so, create "fake" component id equal to the */ - /* max id seen so far + 1. */ - for (i = 0, compptr = cinfo->comp_info; i < ci; i++, compptr++) { - if (c == compptr->component_id) { - compptr = cinfo->comp_info; - c = compptr->component_id; - compptr++; - for (i = 1; i < ci; i++, compptr++) { - if (compptr->component_id > c) c = compptr->component_id; - } - c++; - break; - } - } - compptr->component_id = c; - compptr->component_index = ci; - INPUT_BYTE(cinfo, c, return FALSE); - compptr->h_samp_factor = (c >> 4) & 15; - compptr->v_samp_factor = (c ) & 15; - INPUT_BYTE(cinfo, compptr->quant_tbl_no, return FALSE); - - TRACEMS4(cinfo, 1, JTRC_SOF_COMPONENT, - compptr->component_id, compptr->h_samp_factor, - compptr->v_samp_factor, compptr->quant_tbl_no); - } - - cinfo->marker->saw_SOF = TRUE; - - INPUT_SYNC(cinfo); - return TRUE; -} - - -LOCAL(boolean) -get_sos (j_decompress_ptr cinfo) -/* Process a SOS marker */ -{ - INT32 length; - int c, ci, i, n; - jpeg_component_info * compptr; - INPUT_VARS(cinfo); - - if (! cinfo->marker->saw_SOF) - ERREXITS(cinfo, JERR_SOF_BEFORE, "SOS"); - - INPUT_2BYTES(cinfo, length, return FALSE); - - INPUT_BYTE(cinfo, n, return FALSE); /* Number of components */ - - TRACEMS1(cinfo, 1, JTRC_SOS, n); - - if (length != (n * 2 + 6) || n > MAX_COMPS_IN_SCAN || - (n == 0 && !cinfo->progressive_mode)) - /* pseudo SOS marker only allowed in progressive mode */ - ERREXIT(cinfo, JERR_BAD_LENGTH); - - cinfo->comps_in_scan = n; - - /* Collect the component-spec parameters */ - - for (i = 0; i < n; i++) { - INPUT_BYTE(cinfo, c, return FALSE); - - /* Detect the case where component id's are not unique, and, if so, */ - /* create a fake component id using the same logic as in get_sof. */ - /* Note: This also ensures that all of the SOF components are */ - /* referenced in the single scan case, which prevents access to */ - /* uninitialized memory in later decoding stages. */ - for (ci = 0; ci < i; ci++) { - if (c == cinfo->cur_comp_info[ci]->component_id) { - c = cinfo->cur_comp_info[0]->component_id; - for (ci = 1; ci < i; ci++) { - compptr = cinfo->cur_comp_info[ci]; - if (compptr->component_id > c) c = compptr->component_id; - } - c++; - break; - } - } - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (c == compptr->component_id) - goto id_found; - } - - ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, c); - - id_found: - - cinfo->cur_comp_info[i] = compptr; - INPUT_BYTE(cinfo, c, return FALSE); - compptr->dc_tbl_no = (c >> 4) & 15; - compptr->ac_tbl_no = (c ) & 15; - - TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, compptr->component_id, - compptr->dc_tbl_no, compptr->ac_tbl_no); - } - - /* Collect the additional scan parameters Ss, Se, Ah/Al. */ - INPUT_BYTE(cinfo, c, return FALSE); - cinfo->Ss = c; - INPUT_BYTE(cinfo, c, return FALSE); - cinfo->Se = c; - INPUT_BYTE(cinfo, c, return FALSE); - cinfo->Ah = (c >> 4) & 15; - cinfo->Al = (c ) & 15; - - TRACEMS4(cinfo, 1, JTRC_SOS_PARAMS, cinfo->Ss, cinfo->Se, - cinfo->Ah, cinfo->Al); - - /* Prepare to scan data & restart markers */ - cinfo->marker->next_restart_num = 0; - - /* Count another (non-pseudo) SOS marker */ - if (n) cinfo->input_scan_number++; - - INPUT_SYNC(cinfo); - return TRUE; -} - - -#ifdef D_ARITH_CODING_SUPPORTED - -LOCAL(boolean) -get_dac (j_decompress_ptr cinfo) -/* Process a DAC marker */ -{ - INT32 length; - int index, val; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - - while (length > 0) { - INPUT_BYTE(cinfo, index, return FALSE); - INPUT_BYTE(cinfo, val, return FALSE); - - length -= 2; - - TRACEMS2(cinfo, 1, JTRC_DAC, index, val); - - if (index < 0 || index >= (2*NUM_ARITH_TBLS)) - ERREXIT1(cinfo, JERR_DAC_INDEX, index); - - if (index >= NUM_ARITH_TBLS) { /* define AC table */ - cinfo->arith_ac_K[index-NUM_ARITH_TBLS] = (UINT8) val; - } else { /* define DC table */ - cinfo->arith_dc_L[index] = (UINT8) (val & 0x0F); - cinfo->arith_dc_U[index] = (UINT8) (val >> 4); - if (cinfo->arith_dc_L[index] > cinfo->arith_dc_U[index]) - ERREXIT1(cinfo, JERR_DAC_VALUE, val); - } - } - - if (length != 0) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - INPUT_SYNC(cinfo); - return TRUE; -} - -#else /* ! D_ARITH_CODING_SUPPORTED */ - -#define get_dac(cinfo) skip_variable(cinfo) - -#endif /* D_ARITH_CODING_SUPPORTED */ - - -LOCAL(boolean) -get_dht (j_decompress_ptr cinfo) -/* Process a DHT marker */ -{ - INT32 length; - UINT8 bits[17]; - UINT8 huffval[256]; - int i, index, count; - JHUFF_TBL **htblptr; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - - while (length > 16) { - INPUT_BYTE(cinfo, index, return FALSE); - - TRACEMS1(cinfo, 1, JTRC_DHT, index); - - bits[0] = 0; - count = 0; - for (i = 1; i <= 16; i++) { - INPUT_BYTE(cinfo, bits[i], return FALSE); - count += bits[i]; - } - - length -= 1 + 16; - - TRACEMS8(cinfo, 2, JTRC_HUFFBITS, - bits[1], bits[2], bits[3], bits[4], - bits[5], bits[6], bits[7], bits[8]); - TRACEMS8(cinfo, 2, JTRC_HUFFBITS, - bits[9], bits[10], bits[11], bits[12], - bits[13], bits[14], bits[15], bits[16]); - - /* Here we just do minimal validation of the counts to avoid walking - * off the end of our table space. jdhuff.c will check more carefully. - */ - if (count > 256 || ((INT32) count) > length) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - - for (i = 0; i < count; i++) - INPUT_BYTE(cinfo, huffval[i], return FALSE); - - length -= count; - - if (index & 0x10) { /* AC table definition */ - index -= 0x10; - htblptr = &cinfo->ac_huff_tbl_ptrs[index]; - } else { /* DC table definition */ - htblptr = &cinfo->dc_huff_tbl_ptrs[index]; - } - - if (index < 0 || index >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_DHT_INDEX, index); - - if (*htblptr == NULL) - *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - - MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits)); - if (count > 0) - MEMCOPY((*htblptr)->huffval, huffval, count * SIZEOF(UINT8)); - } - - if (length != 0) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - INPUT_SYNC(cinfo); - return TRUE; -} - - -LOCAL(boolean) -get_dqt (j_decompress_ptr cinfo) -/* Process a DQT marker */ -{ - INT32 length, count, i; - int n, prec; - unsigned int tmp; - JQUANT_TBL *quant_ptr; - const int *natural_order; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - - while (length > 0) { - length--; - INPUT_BYTE(cinfo, n, return FALSE); - prec = n >> 4; - n &= 0x0F; - - TRACEMS2(cinfo, 1, JTRC_DQT, n, prec); - - if (n >= NUM_QUANT_TBLS) - ERREXIT1(cinfo, JERR_DQT_INDEX, n); - - if (cinfo->quant_tbl_ptrs[n] == NULL) - cinfo->quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) cinfo); - quant_ptr = cinfo->quant_tbl_ptrs[n]; - - if (prec) { - if (length < DCTSIZE2 * 2) { - /* Initialize full table for safety. */ - for (i = 0; i < DCTSIZE2; i++) { - quant_ptr->quantval[i] = 1; - } - count = length >> 1; - } else - count = DCTSIZE2; - } else { - if (length < DCTSIZE2) { - /* Initialize full table for safety. */ - for (i = 0; i < DCTSIZE2; i++) { - quant_ptr->quantval[i] = 1; - } - count = length; - } else - count = DCTSIZE2; - } - - switch ((int) count) { - case (2*2): natural_order = jpeg_natural_order2; break; - case (3*3): natural_order = jpeg_natural_order3; break; - case (4*4): natural_order = jpeg_natural_order4; break; - case (5*5): natural_order = jpeg_natural_order5; break; - case (6*6): natural_order = jpeg_natural_order6; break; - case (7*7): natural_order = jpeg_natural_order7; break; - default: natural_order = jpeg_natural_order; - } - - for (i = 0; i < count; i++) { - if (prec) - INPUT_2BYTES(cinfo, tmp, return FALSE); - else - INPUT_BYTE(cinfo, tmp, return FALSE); - /* We convert the zigzag-order table to natural array order. */ - quant_ptr->quantval[natural_order[i]] = (UINT16) tmp; - } - - if (cinfo->err->trace_level >= 2) { - for (i = 0; i < DCTSIZE2; i += 8) { - TRACEMS8(cinfo, 2, JTRC_QUANTVALS, - quant_ptr->quantval[i], quant_ptr->quantval[i+1], - quant_ptr->quantval[i+2], quant_ptr->quantval[i+3], - quant_ptr->quantval[i+4], quant_ptr->quantval[i+5], - quant_ptr->quantval[i+6], quant_ptr->quantval[i+7]); - } - } - - length -= count; - if (prec) length -= count; - } - - if (length != 0) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - INPUT_SYNC(cinfo); - return TRUE; -} - - -LOCAL(boolean) -get_dri (j_decompress_ptr cinfo) -/* Process a DRI marker */ -{ - INT32 length; - unsigned int tmp; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - - if (length != 4) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - INPUT_2BYTES(cinfo, tmp, return FALSE); - - TRACEMS1(cinfo, 1, JTRC_DRI, tmp); - - cinfo->restart_interval = tmp; - - INPUT_SYNC(cinfo); - return TRUE; -} - - -LOCAL(boolean) -get_lse (j_decompress_ptr cinfo) -/* Process an LSE marker */ -{ - INT32 length; - unsigned int tmp; - int cid; - INPUT_VARS(cinfo); - - if (! cinfo->marker->saw_SOF) - ERREXITS(cinfo, JERR_SOF_BEFORE, "LSE"); - - if (cinfo->num_components < 3) goto bad; - - INPUT_2BYTES(cinfo, length, return FALSE); - - if (length != 24) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - INPUT_BYTE(cinfo, tmp, return FALSE); - if (tmp != 0x0D) /* ID inverse transform specification */ - ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); - INPUT_2BYTES(cinfo, tmp, return FALSE); - if (tmp != MAXJSAMPLE) goto bad; /* MAXTRANS */ - INPUT_BYTE(cinfo, tmp, return FALSE); - if (tmp != 3) goto bad; /* Nt=3 */ - INPUT_BYTE(cinfo, cid, return FALSE); - if (cid != cinfo->comp_info[1].component_id) goto bad; - INPUT_BYTE(cinfo, cid, return FALSE); - if (cid != cinfo->comp_info[0].component_id) goto bad; - INPUT_BYTE(cinfo, cid, return FALSE); - if (cid != cinfo->comp_info[2].component_id) goto bad; - INPUT_BYTE(cinfo, tmp, return FALSE); - if (tmp != 0x80) goto bad; /* F1: CENTER1=1, NORM1=0 */ - INPUT_2BYTES(cinfo, tmp, return FALSE); - if (tmp != 0) goto bad; /* A(1,1)=0 */ - INPUT_2BYTES(cinfo, tmp, return FALSE); - if (tmp != 0) goto bad; /* A(1,2)=0 */ - INPUT_BYTE(cinfo, tmp, return FALSE); - if (tmp != 0) goto bad; /* F2: CENTER2=0, NORM2=0 */ - INPUT_2BYTES(cinfo, tmp, return FALSE); - if (tmp != 1) goto bad; /* A(2,1)=1 */ - INPUT_2BYTES(cinfo, tmp, return FALSE); - if (tmp != 0) goto bad; /* A(2,2)=0 */ - INPUT_BYTE(cinfo, tmp, return FALSE); - if (tmp != 0) goto bad; /* F3: CENTER3=0, NORM3=0 */ - INPUT_2BYTES(cinfo, tmp, return FALSE); - if (tmp != 1) goto bad; /* A(3,1)=1 */ - INPUT_2BYTES(cinfo, tmp, return FALSE); - if (tmp != 0) { /* A(3,2)=0 */ - bad: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - - /* OK, valid transform that we can handle. */ - cinfo->color_transform = JCT_SUBTRACT_GREEN; - - INPUT_SYNC(cinfo); - return TRUE; -} - - -/* - * Routines for processing APPn and COM markers. - * These are either saved in memory or discarded, per application request. - * APP0 and APP14 are specially checked to see if they are - * JFIF and Adobe markers, respectively. - */ - -#define APP0_DATA_LEN 14 /* Length of interesting data in APP0 */ -#define APP14_DATA_LEN 12 /* Length of interesting data in APP14 */ -#define APPN_DATA_LEN 14 /* Must be the largest of the above!! */ - - -LOCAL(void) -examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data, - unsigned int datalen, INT32 remaining) -/* Examine first few bytes from an APP0. - * Take appropriate action if it is a JFIF marker. - * datalen is # of bytes at data[], remaining is length of rest of marker data. - */ -{ - INT32 totallen = (INT32) datalen + remaining; - - if (datalen >= APP0_DATA_LEN && - GETJOCTET(data[0]) == 0x4A && - GETJOCTET(data[1]) == 0x46 && - GETJOCTET(data[2]) == 0x49 && - GETJOCTET(data[3]) == 0x46 && - GETJOCTET(data[4]) == 0) { - /* Found JFIF APP0 marker: save info */ - cinfo->saw_JFIF_marker = TRUE; - cinfo->JFIF_major_version = GETJOCTET(data[5]); - cinfo->JFIF_minor_version = GETJOCTET(data[6]); - cinfo->density_unit = GETJOCTET(data[7]); - cinfo->X_density = (GETJOCTET(data[8]) << 8) + GETJOCTET(data[9]); - cinfo->Y_density = (GETJOCTET(data[10]) << 8) + GETJOCTET(data[11]); - /* Check version. - * Major version must be 1 or 2, anything else signals an incompatible - * change. - * (We used to treat this as an error, but now it's a nonfatal warning, - * because some bozo at Hijaak couldn't read the spec.) - * Minor version should be 0..2, but process anyway if newer. - */ - if (cinfo->JFIF_major_version != 1 && cinfo->JFIF_major_version != 2) - WARNMS2(cinfo, JWRN_JFIF_MAJOR, - cinfo->JFIF_major_version, cinfo->JFIF_minor_version); - /* Generate trace messages */ - TRACEMS5(cinfo, 1, JTRC_JFIF, - cinfo->JFIF_major_version, cinfo->JFIF_minor_version, - cinfo->X_density, cinfo->Y_density, cinfo->density_unit); - /* Validate thumbnail dimensions and issue appropriate messages */ - if (GETJOCTET(data[12]) | GETJOCTET(data[13])) - TRACEMS2(cinfo, 1, JTRC_JFIF_THUMBNAIL, - GETJOCTET(data[12]), GETJOCTET(data[13])); - totallen -= APP0_DATA_LEN; - if (totallen != - ((INT32)GETJOCTET(data[12]) * (INT32)GETJOCTET(data[13]) * (INT32) 3)) - TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, (int) totallen); - } else if (datalen >= 6 && - GETJOCTET(data[0]) == 0x4A && - GETJOCTET(data[1]) == 0x46 && - GETJOCTET(data[2]) == 0x58 && - GETJOCTET(data[3]) == 0x58 && - GETJOCTET(data[4]) == 0) { - /* Found JFIF "JFXX" extension APP0 marker */ - /* The library doesn't actually do anything with these, - * but we try to produce a helpful trace message. - */ - switch (GETJOCTET(data[5])) { - case 0x10: - TRACEMS1(cinfo, 1, JTRC_THUMB_JPEG, (int) totallen); - break; - case 0x11: - TRACEMS1(cinfo, 1, JTRC_THUMB_PALETTE, (int) totallen); - break; - case 0x13: - TRACEMS1(cinfo, 1, JTRC_THUMB_RGB, (int) totallen); - break; - default: - TRACEMS2(cinfo, 1, JTRC_JFIF_EXTENSION, - GETJOCTET(data[5]), (int) totallen); - } - } else { - /* Start of APP0 does not match "JFIF" or "JFXX", or too short */ - TRACEMS1(cinfo, 1, JTRC_APP0, (int) totallen); - } -} - - -LOCAL(void) -examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data, - unsigned int datalen, INT32 remaining) -/* Examine first few bytes from an APP14. - * Take appropriate action if it is an Adobe marker. - * datalen is # of bytes at data[], remaining is length of rest of marker data. - */ -{ - unsigned int version, flags0, flags1, transform; - - if (datalen >= APP14_DATA_LEN && - GETJOCTET(data[0]) == 0x41 && - GETJOCTET(data[1]) == 0x64 && - GETJOCTET(data[2]) == 0x6F && - GETJOCTET(data[3]) == 0x62 && - GETJOCTET(data[4]) == 0x65) { - /* Found Adobe APP14 marker */ - version = (GETJOCTET(data[5]) << 8) + GETJOCTET(data[6]); - flags0 = (GETJOCTET(data[7]) << 8) + GETJOCTET(data[8]); - flags1 = (GETJOCTET(data[9]) << 8) + GETJOCTET(data[10]); - transform = GETJOCTET(data[11]); - TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform); - cinfo->saw_Adobe_marker = TRUE; - cinfo->Adobe_transform = (UINT8) transform; - } else { - /* Start of APP14 does not match "Adobe", or too short */ - TRACEMS1(cinfo, 1, JTRC_APP14, (int) (datalen + remaining)); - } -} - - -METHODDEF(boolean) -get_interesting_appn (j_decompress_ptr cinfo) -/* Process an APP0 or APP14 marker without saving it */ -{ - INT32 length; - JOCTET b[APPN_DATA_LEN]; - unsigned int i, numtoread; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - - /* get the interesting part of the marker data */ - if (length >= APPN_DATA_LEN) - numtoread = APPN_DATA_LEN; - else if (length > 0) - numtoread = (unsigned int) length; - else - numtoread = 0; - for (i = 0; i < numtoread; i++) - INPUT_BYTE(cinfo, b[i], return FALSE); - length -= numtoread; - - /* process it */ - switch (cinfo->unread_marker) { - case M_APP0: - examine_app0(cinfo, (JOCTET FAR *) b, numtoread, length); - break; - case M_APP14: - examine_app14(cinfo, (JOCTET FAR *) b, numtoread, length); - break; - default: - /* can't get here unless jpeg_save_markers chooses wrong processor */ - ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); - } - - /* skip any remaining data -- could be lots */ - INPUT_SYNC(cinfo); - if (length > 0) - (*cinfo->src->skip_input_data) (cinfo, (long) length); - - return TRUE; -} - - -#ifdef SAVE_MARKERS_SUPPORTED - -METHODDEF(boolean) -save_marker (j_decompress_ptr cinfo) -/* Save an APPn or COM marker into the marker list */ -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - jpeg_saved_marker_ptr cur_marker = marker->cur_marker; - unsigned int bytes_read, data_length; - JOCTET FAR * data; - INT32 length = 0; - INPUT_VARS(cinfo); - - if (cur_marker == NULL) { - /* begin reading a marker */ - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - if (length >= 0) { /* watch out for bogus length word */ - /* figure out how much we want to save */ - unsigned int limit; - if (cinfo->unread_marker == (int) M_COM) - limit = marker->length_limit_COM; - else - limit = marker->length_limit_APPn[cinfo->unread_marker - (int) M_APP0]; - if ((unsigned int) length < limit) - limit = (unsigned int) length; - /* allocate and initialize the marker item */ - cur_marker = (jpeg_saved_marker_ptr) - (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(struct jpeg_marker_struct) + limit); - cur_marker->next = NULL; - cur_marker->marker = (UINT8) cinfo->unread_marker; - cur_marker->original_length = (unsigned int) length; - cur_marker->data_length = limit; - /* data area is just beyond the jpeg_marker_struct */ - data = cur_marker->data = (JOCTET FAR *) (cur_marker + 1); - marker->cur_marker = cur_marker; - marker->bytes_read = 0; - bytes_read = 0; - data_length = limit; - } else { - /* deal with bogus length word */ - bytes_read = data_length = 0; - data = NULL; - } - } else { - /* resume reading a marker */ - bytes_read = marker->bytes_read; - data_length = cur_marker->data_length; - data = cur_marker->data + bytes_read; - } - - while (bytes_read < data_length) { - INPUT_SYNC(cinfo); /* move the restart point to here */ - marker->bytes_read = bytes_read; - /* If there's not at least one byte in buffer, suspend */ - MAKE_BYTE_AVAIL(cinfo, return FALSE); - /* Copy bytes with reasonable rapidity */ - while (bytes_read < data_length && bytes_in_buffer > 0) { - *data++ = *next_input_byte++; - bytes_in_buffer--; - bytes_read++; - } - } - - /* Done reading what we want to read */ - if (cur_marker != NULL) { /* will be NULL if bogus length word */ - /* Add new marker to end of list */ - if (cinfo->marker_list == NULL) { - cinfo->marker_list = cur_marker; - } else { - jpeg_saved_marker_ptr prev = cinfo->marker_list; - while (prev->next != NULL) - prev = prev->next; - prev->next = cur_marker; - } - /* Reset pointer & calc remaining data length */ - data = cur_marker->data; - length = cur_marker->original_length - data_length; - } - /* Reset to initial state for next marker */ - marker->cur_marker = NULL; - - /* Process the marker if interesting; else just make a generic trace msg */ - switch (cinfo->unread_marker) { - case M_APP0: - examine_app0(cinfo, data, data_length, length); - break; - case M_APP14: - examine_app14(cinfo, data, data_length, length); - break; - default: - TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, - (int) (data_length + length)); - } - - /* skip any remaining data -- could be lots */ - INPUT_SYNC(cinfo); /* do before skip_input_data */ - if (length > 0) - (*cinfo->src->skip_input_data) (cinfo, (long) length); - - return TRUE; -} - -#endif /* SAVE_MARKERS_SUPPORTED */ - - -METHODDEF(boolean) -skip_variable (j_decompress_ptr cinfo) -/* Skip over an unknown or uninteresting variable-length marker */ -{ - INT32 length; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - - TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, (int) length); - - INPUT_SYNC(cinfo); /* do before skip_input_data */ - if (length > 0) - (*cinfo->src->skip_input_data) (cinfo, (long) length); - - return TRUE; -} - - -/* - * Find the next JPEG marker, save it in cinfo->unread_marker. - * Returns FALSE if had to suspend before reaching a marker; - * in that case cinfo->unread_marker is unchanged. - * - * Note that the result might not be a valid marker code, - * but it will never be 0 or FF. - */ - -LOCAL(boolean) -next_marker (j_decompress_ptr cinfo) -{ - int c; - INPUT_VARS(cinfo); - - for (;;) { - INPUT_BYTE(cinfo, c, return FALSE); - /* Skip any non-FF bytes. - * This may look a bit inefficient, but it will not occur in a valid file. - * We sync after each discarded byte so that a suspending data source - * can discard the byte from its buffer. - */ - while (c != 0xFF) { - cinfo->marker->discarded_bytes++; - INPUT_SYNC(cinfo); - INPUT_BYTE(cinfo, c, return FALSE); - } - /* This loop swallows any duplicate FF bytes. Extra FFs are legal as - * pad bytes, so don't count them in discarded_bytes. We assume there - * will not be so many consecutive FF bytes as to overflow a suspending - * data source's input buffer. - */ - do { - INPUT_BYTE(cinfo, c, return FALSE); - } while (c == 0xFF); - if (c != 0) - break; /* found a valid marker, exit loop */ - /* Reach here if we found a stuffed-zero data sequence (FF/00). - * Discard it and loop back to try again. - */ - cinfo->marker->discarded_bytes += 2; - INPUT_SYNC(cinfo); - } - - if (cinfo->marker->discarded_bytes != 0) { - WARNMS2(cinfo, JWRN_EXTRANEOUS_DATA, cinfo->marker->discarded_bytes, c); - cinfo->marker->discarded_bytes = 0; - } - - cinfo->unread_marker = c; - - INPUT_SYNC(cinfo); - return TRUE; -} - - -LOCAL(boolean) -first_marker (j_decompress_ptr cinfo) -/* Like next_marker, but used to obtain the initial SOI marker. */ -/* For this marker, we do not allow preceding garbage or fill; otherwise, - * we might well scan an entire input file before realizing it ain't JPEG. - * If an application wants to process non-JFIF files, it must seek to the - * SOI before calling the JPEG library. - */ -{ - int c, c2; - INPUT_VARS(cinfo); - - INPUT_BYTE(cinfo, c, return FALSE); - INPUT_BYTE(cinfo, c2, return FALSE); - if (c != 0xFF || c2 != (int) M_SOI) - ERREXIT2(cinfo, JERR_NO_SOI, c, c2); - - cinfo->unread_marker = c2; - - INPUT_SYNC(cinfo); - return TRUE; -} - - -/* - * Read markers until SOS or EOI. - * - * Returns same codes as are defined for jpeg_consume_input: - * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. - * - * Note: This function may return a pseudo SOS marker (with zero - * component number) for treat by input controller's consume_input. - * consume_input itself should filter out (skip) the pseudo marker - * after processing for the caller. - */ - -METHODDEF(int) -read_markers (j_decompress_ptr cinfo) -{ - /* Outer loop repeats once for each marker. */ - for (;;) { - /* Collect the marker proper, unless we already did. */ - /* NB: first_marker() enforces the requirement that SOI appear first. */ - if (cinfo->unread_marker == 0) { - if (! cinfo->marker->saw_SOI) { - if (! first_marker(cinfo)) - return JPEG_SUSPENDED; - } else { - if (! next_marker(cinfo)) - return JPEG_SUSPENDED; - } - } - /* At this point cinfo->unread_marker contains the marker code and the - * input point is just past the marker proper, but before any parameters. - * A suspension will cause us to return with this state still true. - */ - switch (cinfo->unread_marker) { - case M_SOI: - if (! get_soi(cinfo)) - return JPEG_SUSPENDED; - break; - - case M_SOF0: /* Baseline */ - if (! get_sof(cinfo, TRUE, FALSE, FALSE)) - return JPEG_SUSPENDED; - break; - - case M_SOF1: /* Extended sequential, Huffman */ - if (! get_sof(cinfo, FALSE, FALSE, FALSE)) - return JPEG_SUSPENDED; - break; - - case M_SOF2: /* Progressive, Huffman */ - if (! get_sof(cinfo, FALSE, TRUE, FALSE)) - return JPEG_SUSPENDED; - break; - - case M_SOF9: /* Extended sequential, arithmetic */ - if (! get_sof(cinfo, FALSE, FALSE, TRUE)) - return JPEG_SUSPENDED; - break; - - case M_SOF10: /* Progressive, arithmetic */ - if (! get_sof(cinfo, FALSE, TRUE, TRUE)) - return JPEG_SUSPENDED; - break; - - /* Currently unsupported SOFn types */ - case M_SOF3: /* Lossless, Huffman */ - case M_SOF5: /* Differential sequential, Huffman */ - case M_SOF6: /* Differential progressive, Huffman */ - case M_SOF7: /* Differential lossless, Huffman */ - case M_JPG: /* Reserved for JPEG extensions */ - case M_SOF11: /* Lossless, arithmetic */ - case M_SOF13: /* Differential sequential, arithmetic */ - case M_SOF14: /* Differential progressive, arithmetic */ - case M_SOF15: /* Differential lossless, arithmetic */ - ERREXIT1(cinfo, JERR_SOF_UNSUPPORTED, cinfo->unread_marker); - break; - - case M_SOS: - if (! get_sos(cinfo)) - return JPEG_SUSPENDED; - cinfo->unread_marker = 0; /* processed the marker */ - return JPEG_REACHED_SOS; - - case M_EOI: - TRACEMS(cinfo, 1, JTRC_EOI); - cinfo->unread_marker = 0; /* processed the marker */ - return JPEG_REACHED_EOI; - - case M_DAC: - if (! get_dac(cinfo)) - return JPEG_SUSPENDED; - break; - - case M_DHT: - if (! get_dht(cinfo)) - return JPEG_SUSPENDED; - break; - - case M_DQT: - if (! get_dqt(cinfo)) - return JPEG_SUSPENDED; - break; - - case M_DRI: - if (! get_dri(cinfo)) - return JPEG_SUSPENDED; - break; - - case M_JPG8: - if (! get_lse(cinfo)) - return JPEG_SUSPENDED; - break; - - case M_APP0: - case M_APP1: - case M_APP2: - case M_APP3: - case M_APP4: - case M_APP5: - case M_APP6: - case M_APP7: - case M_APP8: - case M_APP9: - case M_APP10: - case M_APP11: - case M_APP12: - case M_APP13: - case M_APP14: - case M_APP15: - if (! (*((my_marker_ptr) cinfo->marker)->process_APPn[ - cinfo->unread_marker - (int) M_APP0]) (cinfo)) - return JPEG_SUSPENDED; - break; - - case M_COM: - if (! (*((my_marker_ptr) cinfo->marker)->process_COM) (cinfo)) - return JPEG_SUSPENDED; - break; - - case M_RST0: /* these are all parameterless */ - case M_RST1: - case M_RST2: - case M_RST3: - case M_RST4: - case M_RST5: - case M_RST6: - case M_RST7: - case M_TEM: - TRACEMS1(cinfo, 1, JTRC_PARMLESS_MARKER, cinfo->unread_marker); - break; - - case M_DNL: /* Ignore DNL ... perhaps the wrong thing */ - if (! skip_variable(cinfo)) - return JPEG_SUSPENDED; - break; - - default: /* must be DHP, EXP, JPGn, or RESn */ - /* For now, we treat the reserved markers as fatal errors since they are - * likely to be used to signal incompatible JPEG Part 3 extensions. - * Once the JPEG 3 version-number marker is well defined, this code - * ought to change! - */ - ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); - } - /* Successfully processed marker, so reset state variable */ - cinfo->unread_marker = 0; - } /* end loop */ -} - - -/* - * Read a restart marker, which is expected to appear next in the datastream; - * if the marker is not there, take appropriate recovery action. - * Returns FALSE if suspension is required. - * - * This is called by the entropy decoder after it has read an appropriate - * number of MCUs. cinfo->unread_marker may be nonzero if the entropy decoder - * has already read a marker from the data source. Under normal conditions - * cinfo->unread_marker will be reset to 0 before returning; if not reset, - * it holds a marker which the decoder will be unable to read past. - */ - -METHODDEF(boolean) -read_restart_marker (j_decompress_ptr cinfo) -{ - /* Obtain a marker unless we already did. */ - /* Note that next_marker will complain if it skips any data. */ - if (cinfo->unread_marker == 0) { - if (! next_marker(cinfo)) - return FALSE; - } - - if (cinfo->unread_marker == - ((int) M_RST0 + cinfo->marker->next_restart_num)) { - /* Normal case --- swallow the marker and let entropy decoder continue */ - TRACEMS1(cinfo, 3, JTRC_RST, cinfo->marker->next_restart_num); - cinfo->unread_marker = 0; - } else { - /* Uh-oh, the restart markers have been messed up. */ - /* Let the data source manager determine how to resync. */ - if (! (*cinfo->src->resync_to_restart) (cinfo, - cinfo->marker->next_restart_num)) - return FALSE; - } - - /* Update next-restart state */ - cinfo->marker->next_restart_num = (cinfo->marker->next_restart_num + 1) & 7; - - return TRUE; -} - - -/* - * This is the default resync_to_restart method for data source managers - * to use if they don't have any better approach. Some data source managers - * may be able to back up, or may have additional knowledge about the data - * which permits a more intelligent recovery strategy; such managers would - * presumably supply their own resync method. - * - * read_restart_marker calls resync_to_restart if it finds a marker other than - * the restart marker it was expecting. (This code is *not* used unless - * a nonzero restart interval has been declared.) cinfo->unread_marker is - * the marker code actually found (might be anything, except 0 or FF). - * The desired restart marker number (0..7) is passed as a parameter. - * This routine is supposed to apply whatever error recovery strategy seems - * appropriate in order to position the input stream to the next data segment. - * Note that cinfo->unread_marker is treated as a marker appearing before - * the current data-source input point; usually it should be reset to zero - * before returning. - * Returns FALSE if suspension is required. - * - * This implementation is substantially constrained by wanting to treat the - * input as a data stream; this means we can't back up. Therefore, we have - * only the following actions to work with: - * 1. Simply discard the marker and let the entropy decoder resume at next - * byte of file. - * 2. Read forward until we find another marker, discarding intervening - * data. (In theory we could look ahead within the current bufferload, - * without having to discard data if we don't find the desired marker. - * This idea is not implemented here, in part because it makes behavior - * dependent on buffer size and chance buffer-boundary positions.) - * 3. Leave the marker unread (by failing to zero cinfo->unread_marker). - * This will cause the entropy decoder to process an empty data segment, - * inserting dummy zeroes, and then we will reprocess the marker. - * - * #2 is appropriate if we think the desired marker lies ahead, while #3 is - * appropriate if the found marker is a future restart marker (indicating - * that we have missed the desired restart marker, probably because it got - * corrupted). - * We apply #2 or #3 if the found marker is a restart marker no more than - * two counts behind or ahead of the expected one. We also apply #2 if the - * found marker is not a legal JPEG marker code (it's certainly bogus data). - * If the found marker is a restart marker more than 2 counts away, we do #1 - * (too much risk that the marker is erroneous; with luck we will be able to - * resync at some future point). - * For any valid non-restart JPEG marker, we apply #3. This keeps us from - * overrunning the end of a scan. An implementation limited to single-scan - * files might find it better to apply #2 for markers other than EOI, since - * any other marker would have to be bogus data in that case. - */ - -GLOBAL(boolean) -jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired) -{ - int marker = cinfo->unread_marker; - int action = 1; - - /* Always put up a warning. */ - WARNMS2(cinfo, JWRN_MUST_RESYNC, marker, desired); - - /* Outer loop handles repeated decision after scanning forward. */ - for (;;) { - if (marker < (int) M_SOF0) - action = 2; /* invalid marker */ - else if (marker < (int) M_RST0 || marker > (int) M_RST7) - action = 3; /* valid non-restart marker */ - else { - if (marker == ((int) M_RST0 + ((desired+1) & 7)) || - marker == ((int) M_RST0 + ((desired+2) & 7))) - action = 3; /* one of the next two expected restarts */ - else if (marker == ((int) M_RST0 + ((desired-1) & 7)) || - marker == ((int) M_RST0 + ((desired-2) & 7))) - action = 2; /* a prior restart, so advance */ - else - action = 1; /* desired restart or too far away */ - } - TRACEMS2(cinfo, 4, JTRC_RECOVERY_ACTION, marker, action); - switch (action) { - case 1: - /* Discard marker and let entropy decoder resume processing. */ - cinfo->unread_marker = 0; - return TRUE; - case 2: - /* Scan to the next marker, and repeat the decision loop. */ - if (! next_marker(cinfo)) - return FALSE; - marker = cinfo->unread_marker; - break; - case 3: - /* Return without advancing past this marker. */ - /* Entropy decoder will be forced to process an empty segment. */ - return TRUE; - } - } /* end loop */ -} - - -/* - * Reset marker processing state to begin a fresh datastream. - */ - -METHODDEF(void) -reset_marker_reader (j_decompress_ptr cinfo) -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - - cinfo->comp_info = NULL; /* until allocated by get_sof */ - cinfo->input_scan_number = 0; /* no SOS seen yet */ - cinfo->unread_marker = 0; /* no pending marker */ - marker->pub.saw_SOI = FALSE; /* set internal state too */ - marker->pub.saw_SOF = FALSE; - marker->pub.discarded_bytes = 0; - marker->cur_marker = NULL; -} - - -/* - * Initialize the marker reader module. - * This is called only once, when the decompression object is created. - */ - -GLOBAL(void) -jinit_marker_reader (j_decompress_ptr cinfo) -{ - my_marker_ptr marker; - int i; - - /* Create subobject in permanent pool */ - marker = (my_marker_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(my_marker_reader)); - cinfo->marker = &marker->pub; - /* Initialize public method pointers */ - marker->pub.reset_marker_reader = reset_marker_reader; - marker->pub.read_markers = read_markers; - marker->pub.read_restart_marker = read_restart_marker; - /* Initialize COM/APPn processing. - * By default, we examine and then discard APP0 and APP14, - * but simply discard COM and all other APPn. - */ - marker->process_COM = skip_variable; - marker->length_limit_COM = 0; - for (i = 0; i < 16; i++) { - marker->process_APPn[i] = skip_variable; - marker->length_limit_APPn[i] = 0; - } - marker->process_APPn[0] = get_interesting_appn; - marker->process_APPn[14] = get_interesting_appn; - /* Reset marker processing state */ - reset_marker_reader(cinfo); -} - - -/* - * Control saving of COM and APPn markers into marker_list. - */ - -#ifdef SAVE_MARKERS_SUPPORTED - -GLOBAL(void) -jpeg_save_markers (j_decompress_ptr cinfo, int marker_code, - unsigned int length_limit) -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - long maxlength; - jpeg_marker_parser_method processor; - - /* Length limit mustn't be larger than what we can allocate - * (should only be a concern in a 16-bit environment). - */ - maxlength = cinfo->mem->max_alloc_chunk - SIZEOF(struct jpeg_marker_struct); - if (((long) length_limit) > maxlength) - length_limit = (unsigned int) maxlength; - - /* Choose processor routine to use. - * APP0/APP14 have special requirements. - */ - if (length_limit) { - processor = save_marker; - /* If saving APP0/APP14, save at least enough for our internal use. */ - if (marker_code == (int) M_APP0 && length_limit < APP0_DATA_LEN) - length_limit = APP0_DATA_LEN; - else if (marker_code == (int) M_APP14 && length_limit < APP14_DATA_LEN) - length_limit = APP14_DATA_LEN; - } else { - processor = skip_variable; - /* If discarding APP0/APP14, use our regular on-the-fly processor. */ - if (marker_code == (int) M_APP0 || marker_code == (int) M_APP14) - processor = get_interesting_appn; - } - - if (marker_code == (int) M_COM) { - marker->process_COM = processor; - marker->length_limit_COM = length_limit; - } else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) { - marker->process_APPn[marker_code - (int) M_APP0] = processor; - marker->length_limit_APPn[marker_code - (int) M_APP0] = length_limit; - } else - ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); -} - -#endif /* SAVE_MARKERS_SUPPORTED */ - - -/* - * Install a special processing method for COM or APPn markers. - */ - -GLOBAL(void) -jpeg_set_marker_processor (j_decompress_ptr cinfo, int marker_code, - jpeg_marker_parser_method routine) -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - - if (marker_code == (int) M_COM) - marker->process_COM = routine; - else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) - marker->process_APPn[marker_code - (int) M_APP0] = routine; - else - ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); -} diff --git a/thirdparty/jpeg-9e/jdmaster.c b/thirdparty/jpeg-9e/jdmaster.c deleted file mode 100644 index 3070b7b..0000000 --- a/thirdparty/jpeg-9e/jdmaster.c +++ /dev/null @@ -1,532 +0,0 @@ -/* - * jdmaster.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2002-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains master control logic for the JPEG decompressor. - * These routines are concerned with selecting the modules to be executed - * and with determining the number of passes and the work to be done in each - * pass. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Private state */ - -typedef struct { - struct jpeg_decomp_master pub; /* public fields */ - - int pass_number; /* # of passes completed */ - - boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */ - - /* Saved references to initialized quantizer modules, - * in case we need to switch modes. - */ - struct jpeg_color_quantizer * quantizer_1pass; - struct jpeg_color_quantizer * quantizer_2pass; -} my_decomp_master; - -typedef my_decomp_master * my_master_ptr; - - -/* - * Determine whether merged upsample/color conversion should be used. - * CRUCIAL: this must match the actual capabilities of jdmerge.c! - */ - -LOCAL(boolean) -use_merged_upsample (j_decompress_ptr cinfo) -{ -#ifdef UPSAMPLE_MERGING_SUPPORTED - /* Merging is the equivalent of plain box-filter upsampling. */ - /* The following condition is only needed if fancy shall select - * a different upsampling method. In our current implementation - * fancy only affects the DCT scaling, thus we can use fancy - * upsampling and merged upsample simultaneously, in particular - * with scaled DCT sizes larger than the default DCTSIZE. - */ -#if 0 - if (cinfo->do_fancy_upsampling) - return FALSE; -#endif - if (cinfo->CCIR601_sampling) - return FALSE; - /* jdmerge.c only supports YCC=>RGB color conversion */ - if ((cinfo->jpeg_color_space != JCS_YCbCr && - cinfo->jpeg_color_space != JCS_BG_YCC) || - cinfo->num_components != 3 || - cinfo->out_color_space != JCS_RGB || - cinfo->out_color_components != RGB_PIXELSIZE || - cinfo->color_transform) - return FALSE; - /* and it only handles 2h1v or 2h2v sampling ratios */ - if (cinfo->comp_info[0].h_samp_factor != 2 || - cinfo->comp_info[1].h_samp_factor != 1 || - cinfo->comp_info[2].h_samp_factor != 1 || - cinfo->comp_info[0].v_samp_factor > 2 || - cinfo->comp_info[1].v_samp_factor != 1 || - cinfo->comp_info[2].v_samp_factor != 1) - return FALSE; - /* furthermore, it doesn't work if we've scaled the IDCTs differently */ - if (cinfo->comp_info[0].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size || - cinfo->comp_info[1].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size || - cinfo->comp_info[2].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size || - cinfo->comp_info[0].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size || - cinfo->comp_info[1].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size || - cinfo->comp_info[2].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size) - return FALSE; - /* ??? also need to test for upsample-time rescaling, when & if supported */ - return TRUE; /* by golly, it'll work... */ -#else - return FALSE; -#endif -} - - -/* - * Compute output image dimensions and related values. - * NOTE: this is exported for possible use by application. - * Hence it mustn't do anything that can't be done twice. - * Also note that it may be called before the master module is initialized! - */ - -GLOBAL(void) -jpeg_calc_output_dimensions (j_decompress_ptr cinfo) -/* Do computations that are needed before master selection phase. - * This function is used for full decompression. - */ -{ - int ci, i; - jpeg_component_info *compptr; - - /* Prevent application from calling me at wrong times */ - if (cinfo->global_state != DSTATE_READY) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - /* Compute core output image dimensions and DCT scaling choices. */ - jpeg_core_output_dimensions(cinfo); - -#ifdef IDCT_SCALING_SUPPORTED - - /* In selecting the actual DCT scaling for each component, we try to - * scale up the chroma components via IDCT scaling rather than upsampling. - * This saves time if the upsampler gets to use 1:1 scaling. - * Note this code adapts subsampling ratios which are powers of 2. - */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - int ssize = 1; - if (! cinfo->raw_data_out) - while (cinfo->min_DCT_h_scaled_size * ssize <= - (cinfo->do_fancy_upsampling ? DCTSIZE : DCTSIZE / 2) && - (cinfo->max_h_samp_factor % (compptr->h_samp_factor * ssize * 2)) == - 0) { - ssize = ssize * 2; - } - compptr->DCT_h_scaled_size = cinfo->min_DCT_h_scaled_size * ssize; - ssize = 1; - if (! cinfo->raw_data_out) - while (cinfo->min_DCT_v_scaled_size * ssize <= - (cinfo->do_fancy_upsampling ? DCTSIZE : DCTSIZE / 2) && - (cinfo->max_v_samp_factor % (compptr->v_samp_factor * ssize * 2)) == - 0) { - ssize = ssize * 2; - } - compptr->DCT_v_scaled_size = cinfo->min_DCT_v_scaled_size * ssize; - - /* We don't support IDCT ratios larger than 2. */ - if (compptr->DCT_h_scaled_size > compptr->DCT_v_scaled_size * 2) - compptr->DCT_h_scaled_size = compptr->DCT_v_scaled_size * 2; - else if (compptr->DCT_v_scaled_size > compptr->DCT_h_scaled_size * 2) - compptr->DCT_v_scaled_size = compptr->DCT_h_scaled_size * 2; - - /* Recompute downsampled dimensions of components; - * application needs to know these if using raw downsampled data. - */ - /* Size in samples, after IDCT scaling */ - compptr->downsampled_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * - (long) (compptr->h_samp_factor * compptr->DCT_h_scaled_size), - (long) (cinfo->max_h_samp_factor * cinfo->block_size)); - compptr->downsampled_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * - (long) (compptr->v_samp_factor * compptr->DCT_v_scaled_size), - (long) (cinfo->max_v_samp_factor * cinfo->block_size)); - } - -#endif /* IDCT_SCALING_SUPPORTED */ - - /* Report number of components in selected colorspace. */ - /* This should correspond to the actual code in the color conversion module. */ - switch (cinfo->out_color_space) { - case JCS_GRAYSCALE: - cinfo->out_color_components = 1; - break; - case JCS_RGB: - case JCS_BG_RGB: - cinfo->out_color_components = RGB_PIXELSIZE; - break; - default: /* YCCK <=> CMYK conversion or same colorspace as in file */ - i = 0; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) - if (compptr->component_needed) - i++; /* count output color components */ - cinfo->out_color_components = i; - } - cinfo->output_components = (cinfo->quantize_colors ? 1 : - cinfo->out_color_components); - - /* See if upsampler will want to emit more than one row at a time */ - if (use_merged_upsample(cinfo)) - cinfo->rec_outbuf_height = cinfo->max_v_samp_factor; - else - cinfo->rec_outbuf_height = 1; -} - - -/* - * Several decompression processes need to range-limit values to the range - * 0..MAXJSAMPLE; the input value may fall somewhat outside this range - * due to noise introduced by quantization, roundoff error, etc. These - * processes are inner loops and need to be as fast as possible. On most - * machines, particularly CPUs with pipelines or instruction prefetch, - * a (subscript-check-less) C table lookup - * x = sample_range_limit[x]; - * is faster than explicit tests - * if (x < 0) x = 0; - * else if (x > MAXJSAMPLE) x = MAXJSAMPLE; - * These processes all use a common table prepared by the routine below. - * - * For most steps we can mathematically guarantee that the initial value - * of x is within 2*(MAXJSAMPLE+1) of the legal range, so a table running - * from -2*(MAXJSAMPLE+1) to 3*MAXJSAMPLE+2 is sufficient. But for the - * initial limiting step (just after the IDCT), a wildly out-of-range value - * is possible if the input data is corrupt. To avoid any chance of indexing - * off the end of memory and getting a bad-pointer trap, we perform the - * post-IDCT limiting thus: - * x = (sample_range_limit - SUBSET)[(x + CENTER) & MASK]; - * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit - * samples. Under normal circumstances this is more than enough range and - * a correct output will be generated; with bogus input data the mask will - * cause wraparound, and we will safely generate a bogus-but-in-range output. - * For the post-IDCT step, we want to convert the data from signed to unsigned - * representation by adding CENTERJSAMPLE at the same time that we limit it. - * This is accomplished with SUBSET = CENTER - CENTERJSAMPLE. - * - * Note that the table is allocated in near data space on PCs; it's small - * enough and used often enough to justify this. - */ - -LOCAL(void) -prepare_range_limit_table (j_decompress_ptr cinfo) -/* Allocate and fill in the sample_range_limit table */ -{ - JSAMPLE * table; - int i; - - table = (JSAMPLE *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, - JPOOL_IMAGE, (RANGE_CENTER * 2 + MAXJSAMPLE + 1) * SIZEOF(JSAMPLE)); - /* First segment of range limit table: limit[x] = 0 for x < 0 */ - MEMZERO(table, RANGE_CENTER * SIZEOF(JSAMPLE)); - table += RANGE_CENTER; /* allow negative subscripts of table */ - cinfo->sample_range_limit = table; - /* Main part of range limit table: limit[x] = x */ - for (i = 0; i <= MAXJSAMPLE; i++) - table[i] = (JSAMPLE) i; - /* End of range limit table: limit[x] = MAXJSAMPLE for x > MAXJSAMPLE */ - for (; i <= MAXJSAMPLE + RANGE_CENTER; i++) - table[i] = MAXJSAMPLE; -} - - -/* - * Master selection of decompression modules. - * This is done once at jpeg_start_decompress time. We determine - * which modules will be used and give them appropriate initialization calls. - * We also initialize the decompressor input side to begin consuming data. - * - * Since jpeg_read_header has finished, we know what is in the SOF - * and (first) SOS markers. We also have all the application parameter - * settings. - */ - -LOCAL(void) -master_selection (j_decompress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - boolean use_c_buffer; - long samplesperrow; - JDIMENSION jd_samplesperrow; - - /* For now, precision must match compiled-in value... */ - if (cinfo->data_precision != BITS_IN_JSAMPLE) - ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); - - /* Initialize dimensions and other stuff */ - jpeg_calc_output_dimensions(cinfo); - prepare_range_limit_table(cinfo); - - /* Sanity check on image dimensions */ - if (cinfo->output_height <= 0 || cinfo->output_width <= 0 || - cinfo->out_color_components <= 0) - ERREXIT(cinfo, JERR_EMPTY_IMAGE); - - /* Width of an output scanline must be representable as JDIMENSION. */ - samplesperrow = (long) cinfo->output_width * (long) cinfo->out_color_components; - jd_samplesperrow = (JDIMENSION) samplesperrow; - if ((long) jd_samplesperrow != samplesperrow) - ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); - - /* Initialize my private state */ - master->pass_number = 0; - master->using_merged_upsample = use_merged_upsample(cinfo); - - /* Color quantizer selection */ - master->quantizer_1pass = NULL; - master->quantizer_2pass = NULL; - /* No mode changes if not using buffered-image mode. */ - if (! cinfo->quantize_colors || ! cinfo->buffered_image) { - cinfo->enable_1pass_quant = FALSE; - cinfo->enable_external_quant = FALSE; - cinfo->enable_2pass_quant = FALSE; - } - if (cinfo->quantize_colors) { - if (cinfo->raw_data_out) - ERREXIT(cinfo, JERR_NOTIMPL); - /* 2-pass quantizer only works in 3-component color space. */ - if (cinfo->out_color_components != 3) { - cinfo->enable_1pass_quant = TRUE; - cinfo->enable_external_quant = FALSE; - cinfo->enable_2pass_quant = FALSE; - cinfo->colormap = NULL; - } else if (cinfo->colormap != NULL) { - cinfo->enable_external_quant = TRUE; - } else if (cinfo->two_pass_quantize) { - cinfo->enable_2pass_quant = TRUE; - } else { - cinfo->enable_1pass_quant = TRUE; - } - - if (cinfo->enable_1pass_quant) { -#ifdef QUANT_1PASS_SUPPORTED - jinit_1pass_quantizer(cinfo); - master->quantizer_1pass = cinfo->cquantize; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } - - /* We use the 2-pass code to map to external colormaps. */ - if (cinfo->enable_2pass_quant || cinfo->enable_external_quant) { -#ifdef QUANT_2PASS_SUPPORTED - jinit_2pass_quantizer(cinfo); - master->quantizer_2pass = cinfo->cquantize; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } - /* If both quantizers are initialized, the 2-pass one is left active; - * this is necessary for starting with quantization to an external map. - */ - } - - /* Post-processing: in particular, color conversion first */ - if (! cinfo->raw_data_out) { - if (master->using_merged_upsample) { -#ifdef UPSAMPLE_MERGING_SUPPORTED - jinit_merged_upsampler(cinfo); /* does color conversion too */ -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else { - jinit_color_deconverter(cinfo); - jinit_upsampler(cinfo); - } - jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant); - } - /* Inverse DCT */ - jinit_inverse_dct(cinfo); - /* Entropy decoding: either Huffman or arithmetic coding. */ - if (cinfo->arith_code) - jinit_arith_decoder(cinfo); - else { - jinit_huff_decoder(cinfo); - } - - /* Initialize principal buffer controllers. */ - use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image; - jinit_d_coef_controller(cinfo, use_c_buffer); - - if (! cinfo->raw_data_out) - jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */); - - /* We can now tell the memory manager to allocate virtual arrays. */ - (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); - - /* Initialize input side of decompressor to consume first scan. */ - (*cinfo->inputctl->start_input_pass) (cinfo); - -#ifdef D_MULTISCAN_FILES_SUPPORTED - /* If jpeg_start_decompress will read the whole file, initialize - * progress monitoring appropriately. The input step is counted - * as one pass. - */ - if (cinfo->progress != NULL && ! cinfo->buffered_image && - cinfo->inputctl->has_multiple_scans) { - int nscans; - /* Estimate number of scans to set pass_limit. */ - if (cinfo->progressive_mode) { - /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ - nscans = 2 + 3 * cinfo->num_components; - } else { - /* For a nonprogressive multiscan file, estimate 1 scan per component. */ - nscans = cinfo->num_components; - } - cinfo->progress->pass_counter = 0L; - cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; - cinfo->progress->completed_passes = 0; - cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2); - /* Count the input pass as done */ - master->pass_number++; - } -#endif /* D_MULTISCAN_FILES_SUPPORTED */ -} - - -/* - * Per-pass setup. - * This is called at the beginning of each output pass. We determine which - * modules will be active during this pass and give them appropriate - * start_pass calls. We also set is_dummy_pass to indicate whether this - * is a "real" output pass or a dummy pass for color quantization. - * (In the latter case, jdapistd.c will crank the pass to completion.) - */ - -METHODDEF(void) -prepare_for_output_pass (j_decompress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - - if (master->pub.is_dummy_pass) { -#ifdef QUANT_2PASS_SUPPORTED - /* Final pass of 2-pass quantization */ - master->pub.is_dummy_pass = FALSE; - (*cinfo->cquantize->start_pass) (cinfo, FALSE); - (*cinfo->post->start_pass) (cinfo, JBUF_CRANK_DEST); - (*cinfo->main->start_pass) (cinfo, JBUF_CRANK_DEST); -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif /* QUANT_2PASS_SUPPORTED */ - } else { - if (cinfo->quantize_colors && cinfo->colormap == NULL) { - /* Select new quantization method */ - if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant) { - cinfo->cquantize = master->quantizer_2pass; - master->pub.is_dummy_pass = TRUE; - } else if (cinfo->enable_1pass_quant) { - cinfo->cquantize = master->quantizer_1pass; - } else { - ERREXIT(cinfo, JERR_MODE_CHANGE); - } - } - (*cinfo->idct->start_pass) (cinfo); - (*cinfo->coef->start_output_pass) (cinfo); - if (! cinfo->raw_data_out) { - if (! master->using_merged_upsample) - (*cinfo->cconvert->start_pass) (cinfo); - (*cinfo->upsample->start_pass) (cinfo); - if (cinfo->quantize_colors) - (*cinfo->cquantize->start_pass) (cinfo, master->pub.is_dummy_pass); - (*cinfo->post->start_pass) (cinfo, - (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); - (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); - } - } - - /* Set up progress monitor's pass info if present */ - if (cinfo->progress != NULL) { - cinfo->progress->completed_passes = master->pass_number; - cinfo->progress->total_passes = master->pass_number + - (master->pub.is_dummy_pass ? 2 : 1); - /* In buffered-image mode, we assume one more output pass if EOI not - * yet reached, but no more passes if EOI has been reached. - */ - if (cinfo->buffered_image && ! cinfo->inputctl->eoi_reached) { - cinfo->progress->total_passes += (cinfo->enable_2pass_quant ? 2 : 1); - } - } -} - - -/* - * Finish up at end of an output pass. - */ - -METHODDEF(void) -finish_output_pass (j_decompress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - - if (cinfo->quantize_colors) - (*cinfo->cquantize->finish_pass) (cinfo); - master->pass_number++; -} - - -#ifdef D_MULTISCAN_FILES_SUPPORTED - -/* - * Switch to a new external colormap between output passes. - */ - -GLOBAL(void) -jpeg_new_colormap (j_decompress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - - /* Prevent application from calling me at wrong times */ - if (cinfo->global_state != DSTATE_BUFIMAGE) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - if (cinfo->quantize_colors && cinfo->enable_external_quant && - cinfo->colormap != NULL) { - /* Select 2-pass quantizer for external colormap use */ - cinfo->cquantize = master->quantizer_2pass; - /* Notify quantizer of colormap change */ - (*cinfo->cquantize->new_color_map) (cinfo); - master->pub.is_dummy_pass = FALSE; /* just in case */ - } else - ERREXIT(cinfo, JERR_MODE_CHANGE); -} - -#endif /* D_MULTISCAN_FILES_SUPPORTED */ - - -/* - * Initialize master decompression control and select active modules. - * This is performed at the start of jpeg_start_decompress. - */ - -GLOBAL(void) -jinit_master_decompress (j_decompress_ptr cinfo) -{ - my_master_ptr master; - - master = (my_master_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_decomp_master)); - cinfo->master = &master->pub; - master->pub.prepare_for_output_pass = prepare_for_output_pass; - master->pub.finish_output_pass = finish_output_pass; - - master->pub.is_dummy_pass = FALSE; - - master_selection(cinfo); -} diff --git a/thirdparty/jpeg-9e/jdmerge.c b/thirdparty/jpeg-9e/jdmerge.c deleted file mode 100644 index 8ff1314..0000000 --- a/thirdparty/jpeg-9e/jdmerge.c +++ /dev/null @@ -1,438 +0,0 @@ -/* - * jdmerge.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2013-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains code for merged upsampling/color conversion. - * - * This file combines functions from jdsample.c and jdcolor.c; - * read those files first to understand what's going on. - * - * When the chroma components are to be upsampled by simple replication - * (ie, box filtering), we can save some work in color conversion by - * calculating all the output pixels corresponding to a pair of chroma - * samples at one time. In the conversion equations - * R = Y + K1 * Cr - * G = Y + K2 * Cb + K3 * Cr - * B = Y + K4 * Cb - * only the Y term varies among the group of pixels corresponding to a pair - * of chroma samples, so the rest of the terms can be calculated just once. - * At typical sampling ratios, this eliminates half or three-quarters of the - * multiplications needed for color conversion. - * - * This file currently provides implementations for the following cases: - * YCC => RGB color conversion only (YCbCr or BG_YCC). - * Sampling ratios of 2h1v or 2h2v. - * No scaling needed at upsample time. - * Corner-aligned (non-CCIR601) sampling alignment. - * Other special cases could be added, but in most applications these are - * the only common cases. (For uncommon cases we fall back on the more - * general code in jdsample.c and jdcolor.c.) - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - -#ifdef UPSAMPLE_MERGING_SUPPORTED - - -#if RANGE_BITS < 2 - /* Deliberate syntax err */ - Sorry, this code requires 2 or more range extension bits. -#endif - - -/* Private subobject */ - -typedef struct { - struct jpeg_upsampler pub; /* public fields */ - - /* Pointer to routine to do actual upsampling/conversion of one row group */ - JMETHOD(void, upmethod, (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, - JSAMPARRAY output_buf)); - - /* Private state for YCC->RGB conversion */ - int * Cr_r_tab; /* => table for Cr to R conversion */ - int * Cb_b_tab; /* => table for Cb to B conversion */ - INT32 * Cr_g_tab; /* => table for Cr to G conversion */ - INT32 * Cb_g_tab; /* => table for Cb to G conversion */ - - /* For 2:1 vertical sampling, we produce two output rows at a time. - * We need a "spare" row buffer to hold the second output row if the - * application provides just a one-row buffer; we also use the spare - * to discard the dummy last row if the image height is odd. - */ - JSAMPROW spare_row; - boolean spare_full; /* T if spare buffer is occupied */ - - JDIMENSION out_row_width; /* samples per output row */ - JDIMENSION rows_to_go; /* counts rows remaining in image */ -} my_upsampler; - -typedef my_upsampler * my_upsample_ptr; - -#define SCALEBITS 16 /* speediest right-shift on some machines */ -#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) -#define FIX(x) ((INT32) ((x) * (1L<RGB and BG_YCC->RGB colorspace conversion. - * This is taken directly from jdcolor.c; see that file for more info. - */ - -LOCAL(void) -build_ycc_rgb_table (j_decompress_ptr cinfo) -/* Normal case, sYCC */ -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - int i; - INT32 x; - SHIFT_TEMPS - - upsample->Cr_r_tab = (int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); - upsample->Cb_b_tab = (int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); - upsample->Cr_g_tab = (INT32 *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); - upsample->Cb_g_tab = (INT32 *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); - - for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { - /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ - /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ - /* Cr=>R value is nearest int to 1.402 * x */ - upsample->Cr_r_tab[i] = (int) DESCALE(FIX(1.402) * x, SCALEBITS); - /* Cb=>B value is nearest int to 1.772 * x */ - upsample->Cb_b_tab[i] = (int) DESCALE(FIX(1.772) * x, SCALEBITS); - /* Cr=>G value is scaled-up -0.714136286 * x */ - upsample->Cr_g_tab[i] = (- FIX(0.714136286)) * x; - /* Cb=>G value is scaled-up -0.344136286 * x */ - /* We also add in ONE_HALF so that need not do it in inner loop */ - upsample->Cb_g_tab[i] = (- FIX(0.344136286)) * x + ONE_HALF; - } -} - - -LOCAL(void) -build_bg_ycc_rgb_table (j_decompress_ptr cinfo) -/* Wide gamut case, bg-sYCC */ -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - int i; - INT32 x; - SHIFT_TEMPS - - upsample->Cr_r_tab = (int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); - upsample->Cb_b_tab = (int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); - upsample->Cr_g_tab = (INT32 *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); - upsample->Cb_g_tab = (INT32 *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); - - for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { - /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ - /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ - /* Cr=>R value is nearest int to 2.804 * x */ - upsample->Cr_r_tab[i] = (int) DESCALE(FIX(2.804) * x, SCALEBITS); - /* Cb=>B value is nearest int to 3.544 * x */ - upsample->Cb_b_tab[i] = (int) DESCALE(FIX(3.544) * x, SCALEBITS); - /* Cr=>G value is scaled-up -1.428272572 * x */ - upsample->Cr_g_tab[i] = (- FIX(1.428272572)) * x; - /* Cb=>G value is scaled-up -0.688272572 * x */ - /* We also add in ONE_HALF so that need not do it in inner loop */ - upsample->Cb_g_tab[i] = (- FIX(0.688272572)) * x + ONE_HALF; - } -} - - -/* - * Initialize for an upsampling pass. - */ - -METHODDEF(void) -start_pass_merged_upsample (j_decompress_ptr cinfo) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - - /* Mark the spare buffer empty */ - upsample->spare_full = FALSE; - /* Initialize total-height counter for detecting bottom of image */ - upsample->rows_to_go = cinfo->output_height; -} - - -/* - * Control routine to do upsampling (and color conversion). - * - * The control routine just handles the row buffering considerations. - */ - -METHODDEF(void) -merged_2v_upsample (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -/* 2:1 vertical sampling case: may need a spare row. */ -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - JSAMPROW work_ptrs[2]; - JDIMENSION num_rows; /* number of rows returned to caller */ - - if (upsample->spare_full) { - /* If we have a spare row saved from a previous cycle, just return it. */ - jcopy_sample_rows(& upsample->spare_row, output_buf + *out_row_ctr, - 1, upsample->out_row_width); - num_rows = 1; - upsample->spare_full = FALSE; - } else { - /* Figure number of rows to return to caller. */ - num_rows = 2; - /* Not more than the distance to the end of the image. */ - if (num_rows > upsample->rows_to_go) - num_rows = upsample->rows_to_go; - /* And not more than what the client can accept: */ - out_rows_avail -= *out_row_ctr; - if (num_rows > out_rows_avail) - num_rows = out_rows_avail; - /* Create output pointer array for upsampler. */ - work_ptrs[0] = output_buf[*out_row_ctr]; - if (num_rows > 1) { - work_ptrs[1] = output_buf[*out_row_ctr + 1]; - } else { - work_ptrs[1] = upsample->spare_row; - upsample->spare_full = TRUE; - } - /* Now do the upsampling. */ - (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, work_ptrs); - } - - /* Adjust counts */ - *out_row_ctr += num_rows; - upsample->rows_to_go -= num_rows; - /* When the buffer is emptied, declare this input row group consumed */ - if (! upsample->spare_full) - (*in_row_group_ctr)++; -} - - -METHODDEF(void) -merged_1v_upsample (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -/* 1:1 vertical sampling case: much easier, never need a spare row. */ -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - - /* Just do the upsampling. */ - (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, - output_buf + *out_row_ctr); - /* Adjust counts */ - (*out_row_ctr)++; - (*in_row_group_ctr)++; -} - - -/* - * These are the routines invoked by the control routines to do - * the actual upsampling/conversion. One row group is processed per call. - * - * Note: since we may be writing directly into application-supplied buffers, - * we have to be honest about the output width; we can't assume the buffer - * has been rounded up to an even width. - */ - - -/* - * Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. - */ - -METHODDEF(void) -h2v1_merged_upsample (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, - JSAMPARRAY output_buf) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - register int y, cred, cgreen, cblue; - int cb, cr; - register JSAMPROW outptr; - JSAMPROW inptr0, inptr1, inptr2; - JDIMENSION col; - /* copy these pointers into registers if possible */ - register JSAMPLE * range_limit = cinfo->sample_range_limit; - int * Crrtab = upsample->Cr_r_tab; - int * Cbbtab = upsample->Cb_b_tab; - INT32 * Crgtab = upsample->Cr_g_tab; - INT32 * Cbgtab = upsample->Cb_g_tab; - SHIFT_TEMPS - - inptr0 = input_buf[0][in_row_group_ctr]; - inptr1 = input_buf[1][in_row_group_ctr]; - inptr2 = input_buf[2][in_row_group_ctr]; - outptr = output_buf[0]; - /* Loop for each pair of output pixels */ - for (col = cinfo->output_width >> 1; col > 0; col--) { - /* Do the chroma part of the calculation */ - cb = GETJSAMPLE(*inptr1++); - cr = GETJSAMPLE(*inptr2++); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - /* Fetch 2 Y values and emit 2 pixels */ - y = GETJSAMPLE(*inptr0++); - outptr[RGB_RED] = range_limit[y + cred]; - outptr[RGB_GREEN] = range_limit[y + cgreen]; - outptr[RGB_BLUE] = range_limit[y + cblue]; - outptr += RGB_PIXELSIZE; - y = GETJSAMPLE(*inptr0++); - outptr[RGB_RED] = range_limit[y + cred]; - outptr[RGB_GREEN] = range_limit[y + cgreen]; - outptr[RGB_BLUE] = range_limit[y + cblue]; - outptr += RGB_PIXELSIZE; - } - /* If image width is odd, do the last output column separately */ - if (cinfo->output_width & 1) { - cb = GETJSAMPLE(*inptr1); - cr = GETJSAMPLE(*inptr2); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - y = GETJSAMPLE(*inptr0); - outptr[RGB_RED] = range_limit[y + cred]; - outptr[RGB_GREEN] = range_limit[y + cgreen]; - outptr[RGB_BLUE] = range_limit[y + cblue]; - } -} - - -/* - * Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical. - */ - -METHODDEF(void) -h2v2_merged_upsample (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, - JSAMPARRAY output_buf) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - register int y, cred, cgreen, cblue; - int cb, cr; - register JSAMPROW outptr0, outptr1; - JSAMPROW inptr00, inptr01, inptr1, inptr2; - JDIMENSION col; - /* copy these pointers into registers if possible */ - register JSAMPLE * range_limit = cinfo->sample_range_limit; - int * Crrtab = upsample->Cr_r_tab; - int * Cbbtab = upsample->Cb_b_tab; - INT32 * Crgtab = upsample->Cr_g_tab; - INT32 * Cbgtab = upsample->Cb_g_tab; - SHIFT_TEMPS - - inptr00 = input_buf[0][in_row_group_ctr*2]; - inptr01 = input_buf[0][in_row_group_ctr*2 + 1]; - inptr1 = input_buf[1][in_row_group_ctr]; - inptr2 = input_buf[2][in_row_group_ctr]; - outptr0 = output_buf[0]; - outptr1 = output_buf[1]; - /* Loop for each group of output pixels */ - for (col = cinfo->output_width >> 1; col > 0; col--) { - /* Do the chroma part of the calculation */ - cb = GETJSAMPLE(*inptr1++); - cr = GETJSAMPLE(*inptr2++); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - /* Fetch 4 Y values and emit 4 pixels */ - y = GETJSAMPLE(*inptr00++); - outptr0[RGB_RED] = range_limit[y + cred]; - outptr0[RGB_GREEN] = range_limit[y + cgreen]; - outptr0[RGB_BLUE] = range_limit[y + cblue]; - outptr0 += RGB_PIXELSIZE; - y = GETJSAMPLE(*inptr00++); - outptr0[RGB_RED] = range_limit[y + cred]; - outptr0[RGB_GREEN] = range_limit[y + cgreen]; - outptr0[RGB_BLUE] = range_limit[y + cblue]; - outptr0 += RGB_PIXELSIZE; - y = GETJSAMPLE(*inptr01++); - outptr1[RGB_RED] = range_limit[y + cred]; - outptr1[RGB_GREEN] = range_limit[y + cgreen]; - outptr1[RGB_BLUE] = range_limit[y + cblue]; - outptr1 += RGB_PIXELSIZE; - y = GETJSAMPLE(*inptr01++); - outptr1[RGB_RED] = range_limit[y + cred]; - outptr1[RGB_GREEN] = range_limit[y + cgreen]; - outptr1[RGB_BLUE] = range_limit[y + cblue]; - outptr1 += RGB_PIXELSIZE; - } - /* If image width is odd, do the last output column separately */ - if (cinfo->output_width & 1) { - cb = GETJSAMPLE(*inptr1); - cr = GETJSAMPLE(*inptr2); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - y = GETJSAMPLE(*inptr00); - outptr0[RGB_RED] = range_limit[y + cred]; - outptr0[RGB_GREEN] = range_limit[y + cgreen]; - outptr0[RGB_BLUE] = range_limit[y + cblue]; - y = GETJSAMPLE(*inptr01); - outptr1[RGB_RED] = range_limit[y + cred]; - outptr1[RGB_GREEN] = range_limit[y + cgreen]; - outptr1[RGB_BLUE] = range_limit[y + cblue]; - } -} - - -/* - * Module initialization routine for merged upsampling/color conversion. - * - * NB: this is called under the conditions determined by use_merged_upsample() - * in jdmaster.c. That routine MUST correspond to the actual capabilities - * of this module; no safety checks are made here. - */ - -GLOBAL(void) -jinit_merged_upsampler (j_decompress_ptr cinfo) -{ - my_upsample_ptr upsample; - - upsample = (my_upsample_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_upsampler)); - cinfo->upsample = &upsample->pub; - upsample->pub.start_pass = start_pass_merged_upsample; - upsample->pub.need_context_rows = FALSE; - - upsample->out_row_width = cinfo->output_width * cinfo->out_color_components; - - if (cinfo->max_v_samp_factor == 2) { - upsample->pub.upsample = merged_2v_upsample; - upsample->upmethod = h2v2_merged_upsample; - /* Allocate a spare row buffer */ - upsample->spare_row = (JSAMPROW) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (size_t) upsample->out_row_width * SIZEOF(JSAMPLE)); - } else { - upsample->pub.upsample = merged_1v_upsample; - upsample->upmethod = h2v1_merged_upsample; - /* No spare row needed */ - upsample->spare_row = NULL; - } - - if (cinfo->jpeg_color_space == JCS_BG_YCC) - build_bg_ycc_rgb_table(cinfo); - else - build_ycc_rgb_table(cinfo); -} - -#endif /* UPSAMPLE_MERGING_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/jdpostct.c b/thirdparty/jpeg-9e/jdpostct.c deleted file mode 100644 index 571563d..0000000 --- a/thirdparty/jpeg-9e/jdpostct.c +++ /dev/null @@ -1,290 +0,0 @@ -/* - * jdpostct.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the decompression postprocessing controller. - * This controller manages the upsampling, color conversion, and color - * quantization/reduction steps; specifically, it controls the buffering - * between upsample/color conversion and color quantization/reduction. - * - * If no color quantization/reduction is required, then this module has no - * work to do, and it just hands off to the upsample/color conversion code. - * An integrated upsample/convert/quantize process would replace this module - * entirely. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_d_post_controller pub; /* public fields */ - - /* Color quantization source buffer: this holds output data from - * the upsample/color conversion step to be passed to the quantizer. - * For two-pass color quantization, we need a full-image buffer; - * for one-pass operation, a strip buffer is sufficient. - */ - jvirt_sarray_ptr whole_image; /* virtual array, or NULL if one-pass */ - JSAMPARRAY buffer; /* strip buffer, or current strip of virtual */ - JDIMENSION strip_height; /* buffer size in rows */ - /* for two-pass mode only: */ - JDIMENSION starting_row; /* row # of first row in current strip */ - JDIMENSION next_row; /* index of next row to fill/empty in strip */ -} my_post_controller; - -typedef my_post_controller * my_post_ptr; - - -/* Forward declarations */ -METHODDEF(void) post_process_1pass - JPP((j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -#ifdef QUANT_2PASS_SUPPORTED -METHODDEF(void) post_process_prepass - JPP((j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -METHODDEF(void) post_process_2pass - JPP((j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -#endif - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_post_ptr post = (my_post_ptr) cinfo->post; - - switch (pass_mode) { - case JBUF_PASS_THRU: - if (cinfo->quantize_colors) { - /* Single-pass processing with color quantization. */ - post->pub.post_process_data = post_process_1pass; - /* We could be doing buffered-image output before starting a 2-pass - * color quantization; in that case, jinit_d_post_controller did not - * allocate a strip buffer. Use the virtual-array buffer as workspace. - */ - if (post->buffer == NULL) { - post->buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, post->whole_image, - (JDIMENSION) 0, post->strip_height, TRUE); - } - } else { - /* For single-pass processing without color quantization, - * I have no work to do; just call the upsampler directly. - */ - post->pub.post_process_data = cinfo->upsample->upsample; - } - break; -#ifdef QUANT_2PASS_SUPPORTED - case JBUF_SAVE_AND_PASS: - /* First pass of 2-pass quantization */ - if (post->whole_image == NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - post->pub.post_process_data = post_process_prepass; - break; - case JBUF_CRANK_DEST: - /* Second pass of 2-pass quantization */ - if (post->whole_image == NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - post->pub.post_process_data = post_process_2pass; - break; -#endif /* QUANT_2PASS_SUPPORTED */ - default: - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - break; - } - post->starting_row = post->next_row = 0; -} - - -/* - * Process some data in the one-pass (strip buffer) case. - * This is used for color precision reduction as well as one-pass quantization. - */ - -METHODDEF(void) -post_process_1pass (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -{ - my_post_ptr post = (my_post_ptr) cinfo->post; - JDIMENSION num_rows, max_rows; - - /* Fill the buffer, but not more than what we can dump out in one go. */ - /* Note we rely on the upsampler to detect bottom of image. */ - max_rows = out_rows_avail - *out_row_ctr; - if (max_rows > post->strip_height) - max_rows = post->strip_height; - num_rows = 0; - (*cinfo->upsample->upsample) (cinfo, - input_buf, in_row_group_ctr, in_row_groups_avail, - post->buffer, &num_rows, max_rows); - /* Quantize and emit data. */ - (*cinfo->cquantize->color_quantize) (cinfo, - post->buffer, output_buf + *out_row_ctr, (int) num_rows); - *out_row_ctr += num_rows; -} - - -#ifdef QUANT_2PASS_SUPPORTED - -/* - * Process some data in the first pass of 2-pass quantization. - */ - -METHODDEF(void) -post_process_prepass (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -{ - my_post_ptr post = (my_post_ptr) cinfo->post; - JDIMENSION old_next_row, num_rows; - - /* Reposition virtual buffer if at start of strip. */ - if (post->next_row == 0) { - post->buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, post->whole_image, - post->starting_row, post->strip_height, TRUE); - } - - /* Upsample some data (up to a strip height's worth). */ - old_next_row = post->next_row; - (*cinfo->upsample->upsample) (cinfo, - input_buf, in_row_group_ctr, in_row_groups_avail, - post->buffer, &post->next_row, post->strip_height); - - /* Allow quantizer to scan new data. No data is emitted, */ - /* but we advance out_row_ctr so outer loop can tell when we're done. */ - if (post->next_row > old_next_row) { - num_rows = post->next_row - old_next_row; - (*cinfo->cquantize->color_quantize) (cinfo, post->buffer + old_next_row, - (JSAMPARRAY) NULL, (int) num_rows); - *out_row_ctr += num_rows; - } - - /* Advance if we filled the strip. */ - if (post->next_row >= post->strip_height) { - post->starting_row += post->strip_height; - post->next_row = 0; - } -} - - -/* - * Process some data in the second pass of 2-pass quantization. - */ - -METHODDEF(void) -post_process_2pass (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -{ - my_post_ptr post = (my_post_ptr) cinfo->post; - JDIMENSION num_rows, max_rows; - - /* Reposition virtual buffer if at start of strip. */ - if (post->next_row == 0) { - post->buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, post->whole_image, - post->starting_row, post->strip_height, FALSE); - } - - /* Determine number of rows to emit. */ - num_rows = post->strip_height - post->next_row; /* available in strip */ - max_rows = out_rows_avail - *out_row_ctr; /* available in output area */ - if (num_rows > max_rows) - num_rows = max_rows; - /* We have to check bottom of image here, can't depend on upsampler. */ - max_rows = cinfo->output_height - post->starting_row; - if (num_rows > max_rows) - num_rows = max_rows; - - /* Quantize and emit data. */ - (*cinfo->cquantize->color_quantize) (cinfo, - post->buffer + post->next_row, output_buf + *out_row_ctr, - (int) num_rows); - *out_row_ctr += num_rows; - - /* Advance if we filled the strip. */ - post->next_row += num_rows; - if (post->next_row >= post->strip_height) { - post->starting_row += post->strip_height; - post->next_row = 0; - } -} - -#endif /* QUANT_2PASS_SUPPORTED */ - - -/* - * Initialize postprocessing controller. - */ - -GLOBAL(void) -jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer) -{ - my_post_ptr post; - - post = (my_post_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_post_controller)); - cinfo->post = (struct jpeg_d_post_controller *) post; - post->pub.start_pass = start_pass_dpost; - post->whole_image = NULL; /* flag for no virtual arrays */ - post->buffer = NULL; /* flag for no strip buffer */ - - /* Create the quantization buffer, if needed */ - if (cinfo->quantize_colors) { - /* The buffer strip height is max_v_samp_factor, which is typically - * an efficient number of rows for upsampling to return. - * (In the presence of output rescaling, we might want to be smarter?) - */ - post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor; - if (need_full_buffer) { - /* Two-pass color quantization: need full-image storage. */ - /* We round up the number of rows to a multiple of the strip height. */ -#ifdef QUANT_2PASS_SUPPORTED - post->whole_image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - cinfo->output_width * cinfo->out_color_components, - (JDIMENSION) jround_up((long) cinfo->output_height, - (long) post->strip_height), - post->strip_height); -#else - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); -#endif /* QUANT_2PASS_SUPPORTED */ - } else { - /* One-pass color quantization: just make a strip buffer. */ - post->buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->output_width * cinfo->out_color_components, - post->strip_height); - } - } -} diff --git a/thirdparty/jpeg-9e/jdsample.c b/thirdparty/jpeg-9e/jdsample.c deleted file mode 100644 index 15afeaf..0000000 --- a/thirdparty/jpeg-9e/jdsample.c +++ /dev/null @@ -1,341 +0,0 @@ -/* - * jdsample.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2002-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains upsampling routines. - * - * Upsampling input data is counted in "row groups". A row group - * is defined to be (v_samp_factor * DCT_v_scaled_size / min_DCT_v_scaled_size) - * sample rows of each component. Upsampling will normally produce - * max_v_samp_factor pixel rows from each row group (but this could vary - * if the upsampler is applying a scale factor of its own). - * - * An excellent reference for image resampling is - * Digital Image Warping, George Wolberg, 1990. - * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Pointer to routine to upsample a single component */ -typedef JMETHOD(void, upsample1_ptr, - (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr)); - -/* Private subobject */ - -typedef struct { - struct jpeg_upsampler pub; /* public fields */ - - /* Color conversion buffer. When using separate upsampling and color - * conversion steps, this buffer holds one upsampled row group until it - * has been color converted and output. - * Note: we do not allocate any storage for component(s) which are full-size, - * ie do not need rescaling. The corresponding entry of color_buf[] is - * simply set to point to the input data array, thereby avoiding copying. - */ - JSAMPARRAY color_buf[MAX_COMPONENTS]; - - /* Per-component upsampling method pointers */ - upsample1_ptr methods[MAX_COMPONENTS]; - - int next_row_out; /* counts rows emitted from color_buf */ - JDIMENSION rows_to_go; /* counts rows remaining in image */ - - /* Height of an input row group for each component. */ - int rowgroup_height[MAX_COMPONENTS]; - - /* These arrays save pixel expansion factors so that int_expand need not - * recompute them each time. They are unused for other upsampling methods. - */ - UINT8 h_expand[MAX_COMPONENTS]; - UINT8 v_expand[MAX_COMPONENTS]; -} my_upsampler; - -typedef my_upsampler * my_upsample_ptr; - - -/* - * Initialize for an upsampling pass. - */ - -METHODDEF(void) -start_pass_upsample (j_decompress_ptr cinfo) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - - /* Mark the conversion buffer empty */ - upsample->next_row_out = cinfo->max_v_samp_factor; - /* Initialize total-height counter for detecting bottom of image */ - upsample->rows_to_go = cinfo->output_height; -} - - -/* - * Control routine to do upsampling (and color conversion). - * - * In this version we upsample each component independently. - * We upsample one row group into the conversion buffer, then apply - * color conversion a row at a time. - */ - -METHODDEF(void) -sep_upsample (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - int ci; - jpeg_component_info * compptr; - JDIMENSION num_rows; - - /* Fill the conversion buffer, if it's empty */ - if (upsample->next_row_out >= cinfo->max_v_samp_factor) { - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Don't bother to upsample an uninteresting component. */ - if (! compptr->component_needed) - continue; - /* Invoke per-component upsample method. Notice we pass a POINTER - * to color_buf[ci], so that fullsize_upsample can change it. - */ - (*upsample->methods[ci]) (cinfo, compptr, - input_buf[ci] + (*in_row_group_ctr * upsample->rowgroup_height[ci]), - upsample->color_buf + ci); - } - upsample->next_row_out = 0; - } - - /* Color-convert and emit rows */ - - /* How many we have in the buffer: */ - num_rows = (JDIMENSION) (cinfo->max_v_samp_factor - upsample->next_row_out); - /* Not more than the distance to the end of the image. Need this test - * in case the image height is not a multiple of max_v_samp_factor: - */ - if (num_rows > upsample->rows_to_go) - num_rows = upsample->rows_to_go; - /* And not more than what the client can accept: */ - out_rows_avail -= *out_row_ctr; - if (num_rows > out_rows_avail) - num_rows = out_rows_avail; - - (*cinfo->cconvert->color_convert) (cinfo, upsample->color_buf, - (JDIMENSION) upsample->next_row_out, - output_buf + *out_row_ctr, - (int) num_rows); - - /* Adjust counts */ - *out_row_ctr += num_rows; - upsample->rows_to_go -= num_rows; - upsample->next_row_out += num_rows; - /* When the buffer is emptied, declare this input row group consumed */ - if (upsample->next_row_out >= cinfo->max_v_samp_factor) - (*in_row_group_ctr)++; -} - - -/* - * These are the routines invoked by sep_upsample to upsample pixel values - * of a single component. One row group is processed per call. - */ - - -/* - * For full-size components, we just make color_buf[ci] point at the - * input buffer, and thus avoid copying any data. Note that this is - * safe only because sep_upsample doesn't declare the input row group - * "consumed" until we are done color converting and emitting it. - */ - -METHODDEF(void) -fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr) -{ - *output_data_ptr = input_data; -} - - -/* - * This version handles any integral sampling ratios. - * This is not used for typical JPEG files, so it need not be fast. - * Nor, for that matter, is it particularly accurate: the algorithm is - * simple replication of the input pixel onto the corresponding output - * pixels. The hi-falutin sampling literature refers to this as a - * "box filter". A box filter tends to introduce visible artifacts, - * so if you are actually going to use 3:1 or 4:1 sampling ratios - * you would be well advised to improve this code. - */ - -METHODDEF(void) -int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - JSAMPARRAY output_data, output_end; - register JSAMPROW inptr, outptr; - register JSAMPLE invalue; - register int h; - JSAMPROW outend; - int h_expand, v_expand; - - h_expand = upsample->h_expand[compptr->component_index]; - v_expand = upsample->v_expand[compptr->component_index]; - - output_data = *output_data_ptr; - output_end = output_data + cinfo->max_v_samp_factor; - for (; output_data < output_end; output_data += v_expand) { - /* Generate one output row with proper horizontal expansion */ - inptr = *input_data++; - outptr = *output_data; - outend = outptr + cinfo->output_width; - while (outptr < outend) { - invalue = *inptr++; /* don't need GETJSAMPLE() here */ - for (h = h_expand; h > 0; h--) { - *outptr++ = invalue; - } - } - /* Generate any additional output rows by duplicating the first one */ - if (v_expand > 1) { - jcopy_sample_rows(output_data, output_data + 1, - v_expand - 1, cinfo->output_width); - } - } -} - - -/* - * Fast processing for the common case of 2:1 horizontal and 1:1 vertical. - * It's still a box filter. - */ - -METHODDEF(void) -h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr) -{ - JSAMPARRAY output_data = *output_data_ptr; - register JSAMPROW inptr, outptr; - register JSAMPLE invalue; - JSAMPROW outend; - int outrow; - - for (outrow = 0; outrow < cinfo->max_v_samp_factor; outrow++) { - inptr = input_data[outrow]; - outptr = output_data[outrow]; - outend = outptr + cinfo->output_width; - while (outptr < outend) { - invalue = *inptr++; /* don't need GETJSAMPLE() here */ - *outptr++ = invalue; - *outptr++ = invalue; - } - } -} - - -/* - * Fast processing for the common case of 2:1 horizontal and 2:1 vertical. - * It's still a box filter. - */ - -METHODDEF(void) -h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr) -{ - JSAMPARRAY output_data, output_end; - register JSAMPROW inptr, outptr; - register JSAMPLE invalue; - JSAMPROW outend; - - output_data = *output_data_ptr; - output_end = output_data + cinfo->max_v_samp_factor; - for (; output_data < output_end; output_data += 2) { - inptr = *input_data++; - outptr = *output_data; - outend = outptr + cinfo->output_width; - while (outptr < outend) { - invalue = *inptr++; /* don't need GETJSAMPLE() here */ - *outptr++ = invalue; - *outptr++ = invalue; - } - jcopy_sample_rows(output_data, output_data + 1, - 1, cinfo->output_width); - } -} - - -/* - * Module initialization routine for upsampling. - */ - -GLOBAL(void) -jinit_upsampler (j_decompress_ptr cinfo) -{ - my_upsample_ptr upsample; - int ci; - jpeg_component_info * compptr; - int h_in_group, v_in_group, h_out_group, v_out_group; - - upsample = (my_upsample_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_upsampler)); - cinfo->upsample = &upsample->pub; - upsample->pub.start_pass = start_pass_upsample; - upsample->pub.upsample = sep_upsample; - upsample->pub.need_context_rows = FALSE; /* until we find out differently */ - - if (cinfo->CCIR601_sampling) /* this isn't supported */ - ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); - - /* Verify we can handle the sampling factors, select per-component methods, - * and create storage as needed. - */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Don't bother to upsample an uninteresting component. */ - if (! compptr->component_needed) - continue; - /* Compute size of an "input group" after IDCT scaling. This many samples - * are to be converted to max_h_samp_factor * max_v_samp_factor pixels. - */ - h_in_group = (compptr->h_samp_factor * compptr->DCT_h_scaled_size) / - cinfo->min_DCT_h_scaled_size; - v_in_group = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / - cinfo->min_DCT_v_scaled_size; - h_out_group = cinfo->max_h_samp_factor; - v_out_group = cinfo->max_v_samp_factor; - upsample->rowgroup_height[ci] = v_in_group; /* save for use later */ - if (h_in_group == h_out_group && v_in_group == v_out_group) { - /* Fullsize components can be processed without any work. */ - upsample->methods[ci] = fullsize_upsample; - continue; /* don't need to allocate buffer */ - } - if (h_in_group * 2 == h_out_group && v_in_group == v_out_group) { - /* Special case for 2h1v upsampling */ - upsample->methods[ci] = h2v1_upsample; - } else if (h_in_group * 2 == h_out_group && - v_in_group * 2 == v_out_group) { - /* Special case for 2h2v upsampling */ - upsample->methods[ci] = h2v2_upsample; - } else if ((h_out_group % h_in_group) == 0 && - (v_out_group % v_in_group) == 0) { - /* Generic integral-factors upsampling method */ - upsample->methods[ci] = int_upsample; - upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group); - upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group); - } else - ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); - upsample->color_buf[ci] = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) jround_up((long) cinfo->output_width, - (long) cinfo->max_h_samp_factor), - (JDIMENSION) cinfo->max_v_samp_factor); - } -} diff --git a/thirdparty/jpeg-9e/jdtrans.c b/thirdparty/jpeg-9e/jdtrans.c deleted file mode 100644 index 22dd47f..0000000 --- a/thirdparty/jpeg-9e/jdtrans.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * jdtrans.c - * - * Copyright (C) 1995-1997, Thomas G. Lane. - * Modified 2000-2009 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains library routines for transcoding decompression, - * that is, reading raw DCT coefficient arrays from an input JPEG file. - * The routines in jdapimin.c will also be needed by a transcoder. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Forward declarations */ -LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo)); - - -/* - * Read the coefficient arrays from a JPEG file. - * jpeg_read_header must be completed before calling this. - * - * The entire image is read into a set of virtual coefficient-block arrays, - * one per component. The return value is a pointer to the array of - * virtual-array descriptors. These can be manipulated directly via the - * JPEG memory manager, or handed off to jpeg_write_coefficients(). - * To release the memory occupied by the virtual arrays, call - * jpeg_finish_decompress() when done with the data. - * - * An alternative usage is to simply obtain access to the coefficient arrays - * during a buffered-image-mode decompression operation. This is allowed - * after any jpeg_finish_output() call. The arrays can be accessed until - * jpeg_finish_decompress() is called. (Note that any call to the library - * may reposition the arrays, so don't rely on access_virt_barray() results - * to stay valid across library calls.) - * - * Returns NULL if suspended. This case need be checked only if - * a suspending data source is used. - */ - -GLOBAL(jvirt_barray_ptr *) -jpeg_read_coefficients (j_decompress_ptr cinfo) -{ - if (cinfo->global_state == DSTATE_READY) { - /* First call: initialize active modules */ - transdecode_master_selection(cinfo); - cinfo->global_state = DSTATE_RDCOEFS; - } - if (cinfo->global_state == DSTATE_RDCOEFS) { - /* Absorb whole file into the coef buffer */ - for (;;) { - int retcode; - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - /* Absorb some more input */ - retcode = (*cinfo->inputctl->consume_input) (cinfo); - if (retcode == JPEG_SUSPENDED) - return NULL; - if (retcode == JPEG_REACHED_EOI) - break; - /* Advance progress counter if appropriate */ - if (cinfo->progress != NULL && - (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { - if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { - /* startup underestimated number of scans; ratchet up one scan */ - cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; - } - } - } - /* Set state so that jpeg_finish_decompress does the right thing */ - cinfo->global_state = DSTATE_STOPPING; - } - /* At this point we should be in state DSTATE_STOPPING if being used - * standalone, or in state DSTATE_BUFIMAGE if being invoked to get access - * to the coefficients during a full buffered-image-mode decompression. - */ - if ((cinfo->global_state == DSTATE_STOPPING || - cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) { - return cinfo->coef->coef_arrays; - } - /* Oops, improper usage */ - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - return NULL; /* keep compiler happy */ -} - - -/* - * Master selection of decompression modules for transcoding. - * This substitutes for jdmaster.c's initialization of the full decompressor. - */ - -LOCAL(void) -transdecode_master_selection (j_decompress_ptr cinfo) -{ - /* This is effectively a buffered-image operation. */ - cinfo->buffered_image = TRUE; - - /* Compute output image dimensions and related values. */ - jpeg_core_output_dimensions(cinfo); - - /* Entropy decoding: either Huffman or arithmetic coding. */ - if (cinfo->arith_code) - jinit_arith_decoder(cinfo); - else { - jinit_huff_decoder(cinfo); - } - - /* Always get a full-image coefficient buffer. */ - jinit_d_coef_controller(cinfo, TRUE); - - /* We can now tell the memory manager to allocate virtual arrays. */ - (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); - - /* Initialize input side of decompressor to consume first scan. */ - (*cinfo->inputctl->start_input_pass) (cinfo); - - /* Initialize progress monitoring. */ - if (cinfo->progress != NULL) { - int nscans; - /* Estimate number of scans to set pass_limit. */ - if (cinfo->progressive_mode) { - /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ - nscans = 2 + 3 * cinfo->num_components; - } else if (cinfo->inputctl->has_multiple_scans) { - /* For a nonprogressive multiscan file, estimate 1 scan per component. */ - nscans = cinfo->num_components; - } else { - nscans = 1; - } - cinfo->progress->pass_counter = 0L; - cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; - cinfo->progress->completed_passes = 0; - cinfo->progress->total_passes = 1; - } -} diff --git a/thirdparty/jpeg-9e/jerror.c b/thirdparty/jpeg-9e/jerror.c deleted file mode 100644 index 7163af6..0000000 --- a/thirdparty/jpeg-9e/jerror.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - * jerror.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2012-2015 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains simple error-reporting and trace-message routines. - * These are suitable for Unix-like systems and others where writing to - * stderr is the right thing to do. Many applications will want to replace - * some or all of these routines. - * - * If you define USE_WINDOWS_MESSAGEBOX in jconfig.h or in the makefile, - * you get a Windows-specific hack to display error messages in a dialog box. - * It ain't much, but it beats dropping error messages into the bit bucket, - * which is what happens to output to stderr under most Windows C compilers. - * - * These routines are used by both the compression and decompression code. - */ - -#ifdef USE_WINDOWS_MESSAGEBOX -#include -#endif - -/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ -#include "jinclude.h" -#include "jpeglib.h" -#include "jversion.h" -#include "jerror.h" - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif - - -/* - * Create the message string table. - * We do this from the master message list in jerror.h by re-reading - * jerror.h with a suitable definition for macro JMESSAGE. - * The message table is made an external symbol just in case any applications - * want to refer to it directly. - */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_std_message_table jMsgTable -#endif - -#define JMESSAGE(code,string) string , - -const char * const jpeg_std_message_table[] = { -#include "jerror.h" - NULL -}; - - -/* - * Error exit handler: must not return to caller. - * - * Applications may override this if they want to get control back after - * an error. Typically one would longjmp somewhere instead of exiting. - * The setjmp buffer can be made a private field within an expanded error - * handler object. Note that the info needed to generate an error message - * is stored in the error object, so you can generate the message now or - * later, at your convenience. - * You should make sure that the JPEG object is cleaned up (with jpeg_abort - * or jpeg_destroy) at some point. - */ - -METHODDEF(noreturn_t) -error_exit (j_common_ptr cinfo) -{ - /* Always display the message */ - (*cinfo->err->output_message) (cinfo); - - /* Let the memory manager delete any temp files before we die */ - jpeg_destroy(cinfo); - - exit(EXIT_FAILURE); -} - - -/* - * Actual output of an error or trace message. - * Applications may override this method to send JPEG messages somewhere - * other than stderr. - * - * On Windows, printing to stderr is generally completely useless, - * so we provide optional code to produce an error-dialog popup. - * Most Windows applications will still prefer to override this routine, - * but if they don't, it'll do something at least marginally useful. - * - * NOTE: to use the library in an environment that doesn't support the - * C stdio library, you may have to delete the call to fprintf() entirely, - * not just not use this routine. - */ - -METHODDEF(void) -output_message (j_common_ptr cinfo) -{ - char buffer[JMSG_LENGTH_MAX]; - - /* Create the message */ - (*cinfo->err->format_message) (cinfo, buffer); - -#ifdef USE_WINDOWS_MESSAGEBOX - /* Display it in a message dialog box */ - MessageBox(GetActiveWindow(), buffer, "JPEG Library Error", - MB_OK | MB_ICONERROR); -#else - /* Send it to stderr, adding a newline */ - fprintf(stderr, "%s\n", buffer); -#endif -} - - -/* - * Decide whether to emit a trace or warning message. - * msg_level is one of: - * -1: recoverable corrupt-data warning, may want to abort. - * 0: important advisory messages (always display to user). - * 1: first level of tracing detail. - * 2,3,...: successively more detailed tracing messages. - * An application might override this method if it wanted to abort on warnings - * or change the policy about which messages to display. - */ - -METHODDEF(void) -emit_message (j_common_ptr cinfo, int msg_level) -{ - struct jpeg_error_mgr * err = cinfo->err; - - if (msg_level < 0) { - /* It's a warning message. Since corrupt files may generate many warnings, - * the policy implemented here is to show only the first warning, - * unless trace_level >= 3. - */ - if (err->num_warnings == 0 || err->trace_level >= 3) - (*err->output_message) (cinfo); - /* Always count warnings in num_warnings. */ - err->num_warnings++; - } else { - /* It's a trace message. Show it if trace_level >= msg_level. */ - if (err->trace_level >= msg_level) - (*err->output_message) (cinfo); - } -} - - -/* - * Format a message string for the most recent JPEG error or message. - * The message is stored into buffer, which should be at least JMSG_LENGTH_MAX - * characters. Note that no '\n' character is added to the string. - * Few applications should need to override this method. - */ - -METHODDEF(void) -format_message (j_common_ptr cinfo, char * buffer) -{ - struct jpeg_error_mgr * err = cinfo->err; - int msg_code = err->msg_code; - const char * msgtext = NULL; - const char * msgptr; - char ch; - boolean isstring; - - /* Look up message string in proper table */ - if (msg_code > 0 && msg_code <= err->last_jpeg_message) { - msgtext = err->jpeg_message_table[msg_code]; - } else if (err->addon_message_table != NULL && - msg_code >= err->first_addon_message && - msg_code <= err->last_addon_message) { - msgtext = err->addon_message_table[msg_code - err->first_addon_message]; - } - - /* Defend against bogus message number */ - if (msgtext == NULL) { - err->msg_parm.i[0] = msg_code; - msgtext = err->jpeg_message_table[0]; - } - - /* Check for string parameter, as indicated by %s in the message text */ - isstring = FALSE; - msgptr = msgtext; - while ((ch = *msgptr++) != '\0') { - if (ch == '%') { - if (*msgptr == 's') isstring = TRUE; - break; - } - } - - /* Format the message into the passed buffer */ - if (isstring) - sprintf(buffer, msgtext, err->msg_parm.s); - else - sprintf(buffer, msgtext, - err->msg_parm.i[0], err->msg_parm.i[1], - err->msg_parm.i[2], err->msg_parm.i[3], - err->msg_parm.i[4], err->msg_parm.i[5], - err->msg_parm.i[6], err->msg_parm.i[7]); -} - - -/* - * Reset error state variables at start of a new image. - * This is called during compression startup to reset trace/error - * processing to default state, without losing any application-specific - * method pointers. An application might possibly want to override - * this method if it has additional error processing state. - */ - -METHODDEF(void) -reset_error_mgr (j_common_ptr cinfo) -{ - cinfo->err->num_warnings = 0; - /* trace_level is not reset since it is an application-supplied parameter */ - cinfo->err->msg_code = 0; /* may be useful as a flag for "no error" */ -} - - -/* - * Fill in the standard error-handling methods in a jpeg_error_mgr object. - * Typical call is: - * struct jpeg_compress_struct cinfo; - * struct jpeg_error_mgr err; - * - * cinfo.err = jpeg_std_error(&err); - * after which the application may override some of the methods. - */ - -GLOBAL(struct jpeg_error_mgr *) -jpeg_std_error (struct jpeg_error_mgr * err) -{ - err->error_exit = error_exit; - err->emit_message = emit_message; - err->output_message = output_message; - err->format_message = format_message; - err->reset_error_mgr = reset_error_mgr; - - err->trace_level = 0; /* default = no tracing */ - err->num_warnings = 0; /* no warnings emitted yet */ - err->msg_code = 0; /* may be useful as a flag for "no error" */ - - /* Initialize message table pointers */ - err->jpeg_message_table = jpeg_std_message_table; - err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; - - err->addon_message_table = NULL; - err->first_addon_message = 0; /* for safety */ - err->last_addon_message = 0; - - return err; -} diff --git a/thirdparty/jpeg-9e/jerror.h b/thirdparty/jpeg-9e/jerror.h deleted file mode 100644 index db608b9..0000000 --- a/thirdparty/jpeg-9e/jerror.h +++ /dev/null @@ -1,304 +0,0 @@ -/* - * jerror.h - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 1997-2018 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file defines the error and message codes for the JPEG library. - * Edit this file to add new codes, or to translate the message strings to - * some other language. - * A set of error-reporting macros are defined too. Some applications using - * the JPEG library may wish to include this file to get the error codes - * and/or the macros. - */ - -/* - * To define the enum list of message codes, include this file without - * defining macro JMESSAGE. To create a message string table, include it - * again with a suitable JMESSAGE definition (see jerror.c for an example). - */ -#ifndef JMESSAGE -#ifndef JERROR_H -/* First time through, define the enum list */ -#define JMAKE_ENUM_LIST -#else -/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ -#define JMESSAGE(code,string) -#endif /* JERROR_H */ -#endif /* JMESSAGE */ - -#ifdef JMAKE_ENUM_LIST - -typedef enum { - -#define JMESSAGE(code,string) code , - -#endif /* JMAKE_ENUM_LIST */ - -JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ - -/* For maintenance convenience, list is alphabetical by message code name */ -JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") -JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") -JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") -JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") -JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") -JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") -JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported") -JMESSAGE(JERR_BAD_DROP_SAMPLING, - "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") -JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") -JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") -JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") -JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") -JMESSAGE(JERR_BAD_LIB_VERSION, - "Wrong JPEG library version: library is %d, caller expects %d") -JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") -JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") -JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") -JMESSAGE(JERR_BAD_PROGRESSION, - "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") -JMESSAGE(JERR_BAD_PROG_SCRIPT, - "Invalid progressive parameters at scan script entry %d") -JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") -JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") -JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") -JMESSAGE(JERR_BAD_STRUCT_SIZE, - "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") -JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") -JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") -JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") -JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") -JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") -JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") -JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") -JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") -JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") -JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") -JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") -JMESSAGE(JERR_EMS_READ, "Read from EMS failed") -JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") -JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") -JMESSAGE(JERR_FILE_READ, "Input file read error") -JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") -JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") -JMESSAGE(JERR_HUFF_CLEN_OUTOFBOUNDS, "Huffman code size table out of bounds") -JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") -JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") -JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") -JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") -JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, - "Cannot transcode due to multiple use of quantization table %d") -JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") -JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") -JMESSAGE(JERR_NOTIMPL, "Not implemented yet") -JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") -JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") -JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") -JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") -JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") -JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") -JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") -JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") -JMESSAGE(JERR_QUANT_COMPONENTS, - "Cannot quantize more than %d color components") -JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") -JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") -JMESSAGE(JERR_SOF_BEFORE, "Invalid JPEG file structure: %s before SOF") -JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") -JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") -JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") -JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") -JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") -JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") -JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") -JMESSAGE(JERR_TFILE_WRITE, - "Write failed on temporary file --- out of disk space?") -JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") -JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") -JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") -JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") -JMESSAGE(JERR_XMS_READ, "Read from XMS failed") -JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") -JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) -JMESSAGE(JMSG_VERSION, JVERSION) -JMESSAGE(JTRC_16BIT_TABLES, - "Caution: quantization tables are too coarse for baseline JPEG") -JMESSAGE(JTRC_ADOBE, - "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") -JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") -JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") -JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") -JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") -JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") -JMESSAGE(JTRC_DRI, "Define Restart Interval %u") -JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") -JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") -JMESSAGE(JTRC_EOI, "End Of Image") -JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") -JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") -JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, - "Warning: thumbnail image size does not match data length %u") -JMESSAGE(JTRC_JFIF_EXTENSION, - "JFIF extension marker: type 0x%02x, length %u") -JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") -JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") -JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") -JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") -JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") -JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") -JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") -JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") -JMESSAGE(JTRC_RST, "RST%d") -JMESSAGE(JTRC_SMOOTH_NOTIMPL, - "Smoothing not supported with nonstandard sampling ratios") -JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") -JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") -JMESSAGE(JTRC_SOI, "Start of Image") -JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") -JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") -JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") -JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") -JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") -JMESSAGE(JTRC_THUMB_JPEG, - "JFIF extension marker: JPEG-compressed thumbnail image, length %u") -JMESSAGE(JTRC_THUMB_PALETTE, - "JFIF extension marker: palette thumbnail image, length %u") -JMESSAGE(JTRC_THUMB_RGB, - "JFIF extension marker: RGB thumbnail image, length %u") -JMESSAGE(JTRC_UNKNOWN_IDS, - "Unrecognized component IDs %d %d %d, assuming YCbCr") -JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") -JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") -JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") -JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") -JMESSAGE(JWRN_BOGUS_PROGRESSION, - "Inconsistent progression sequence for component %d coefficient %d") -JMESSAGE(JWRN_EXTRANEOUS_DATA, - "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") -JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") -JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") -JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") -JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") -JMESSAGE(JWRN_MUST_RESYNC, - "Corrupt JPEG data: found marker 0x%02x instead of RST%d") -JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") -JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") - -#ifdef JMAKE_ENUM_LIST - - JMSG_LASTMSGCODE -} J_MESSAGE_CODE; - -#undef JMAKE_ENUM_LIST -#endif /* JMAKE_ENUM_LIST */ - -/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ -#undef JMESSAGE - - -#ifndef JERROR_H -#define JERROR_H - -/* Macros to simplify using the error and trace message stuff */ -/* The first parameter is either type of cinfo pointer */ - -/* Fatal errors (print message and exit) */ -#define ERREXIT(cinfo,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT1(cinfo,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT2(cinfo,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT3(cinfo,code,p1,p2,p3) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (cinfo)->err->msg_parm.i[2] = (p3), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (cinfo)->err->msg_parm.i[2] = (p3), \ - (cinfo)->err->msg_parm.i[3] = (p4), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (cinfo)->err->msg_parm.i[2] = (p3), \ - (cinfo)->err->msg_parm.i[3] = (p4), \ - (cinfo)->err->msg_parm.i[4] = (p5), \ - (cinfo)->err->msg_parm.i[5] = (p6), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXITS(cinfo,code,str) \ - ((cinfo)->err->msg_code = (code), \ - strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) - -#define MAKESTMT(stuff) do { stuff } while (0) - -/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ -#define WARNMS(cinfo,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) -#define WARNMS1(cinfo,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) -#define WARNMS2(cinfo,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) - -/* Informational/debugging messages */ -#define TRACEMS(cinfo,lvl,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS1(cinfo,lvl,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS2(cinfo,lvl,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - _mp[4] = (p5); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMSS(cinfo,lvl,code,str) \ - ((cinfo)->err->msg_code = (code), \ - strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) - -#endif /* JERROR_H */ diff --git a/thirdparty/jpeg-9e/jfdctflt.c b/thirdparty/jpeg-9e/jfdctflt.c deleted file mode 100644 index 013f29e..0000000 --- a/thirdparty/jpeg-9e/jfdctflt.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - * jfdctflt.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2003-2017 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a floating-point implementation of the - * forward DCT (Discrete Cosine Transform). - * - * This implementation should be more accurate than either of the integer - * DCT implementations. However, it may not give the same results on all - * machines because of differences in roundoff behavior. Speed will depend - * on the hardware's floating point capacity. - * - * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT - * on each column. Direct algorithms are also available, but they are - * much more complex and seem not to be any faster when reduced to code. - * - * This implementation is based on Arai, Agui, and Nakajima's algorithm for - * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in - * Japanese, but the algorithm is described in the Pennebaker & Mitchell - * JPEG textbook (see REFERENCES section in file README). The following code - * is based directly on figure 4-8 in P&M. - * While an 8-point DCT cannot be done in less than 11 multiplies, it is - * possible to arrange the computation so that many of the multiplies are - * simple scalings of the final outputs. These multiplies can then be - * folded into the multiplications or divisions by the JPEG quantization - * table entries. The AA&N method leaves only 5 multiplies and 29 adds - * to be done in the DCT itself. - * The primary disadvantage of this method is that with a fixed-point - * implementation, accuracy is lost due to imprecise representation of the - * scaled quantization values. However, that problem does not arise if - * we use floating point arithmetic. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_FLOAT_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ -#endif - - -/* - * Perform the forward DCT on one block of samples. - * - * cK represents cos(K*pi/16). - */ - -GLOBAL(void) -jpeg_fdct_float (FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - FAST_FLOAT tmp10, tmp11, tmp12, tmp13; - FAST_FLOAT z1, z2, z3, z4, z5, z11, z13; - FAST_FLOAT *dataptr; - JSAMPROW elemptr; - int ctr; - - /* Pass 1: process rows. */ - - dataptr = data; - for (ctr = 0; ctr < DCTSIZE; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Load data into workspace */ - tmp0 = (FAST_FLOAT) (GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7])); - tmp7 = (FAST_FLOAT) (GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7])); - tmp1 = (FAST_FLOAT) (GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6])); - tmp6 = (FAST_FLOAT) (GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6])); - tmp2 = (FAST_FLOAT) (GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5])); - tmp5 = (FAST_FLOAT) (GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5])); - tmp3 = (FAST_FLOAT) (GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4])); - tmp4 = (FAST_FLOAT) (GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4])); - - /* Even part */ - - tmp10 = tmp0 + tmp3; /* phase 2 */ - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - /* Apply unsigned->signed conversion. */ - dataptr[0] = tmp10 + tmp11 - 8 * CENTERJSAMPLE; /* phase 3 */ - dataptr[4] = tmp10 - tmp11; - - z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ - dataptr[2] = tmp13 + z1; /* phase 5 */ - dataptr[6] = tmp13 - z1; - - /* Odd part */ - - tmp10 = tmp4 + tmp5; /* phase 2 */ - tmp11 = tmp5 + tmp6; - tmp12 = tmp6 + tmp7; - - /* The rotator is modified from fig 4-8 to avoid extra negations. */ - z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ - z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ - z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ - z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ - - z11 = tmp7 + z3; /* phase 5 */ - z13 = tmp7 - z3; - - dataptr[5] = z13 + z2; /* phase 6 */ - dataptr[3] = z13 - z2; - dataptr[1] = z11 + z4; - dataptr[7] = z11 - z4; - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; - tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; - tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; - tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; - tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; - - /* Even part */ - - tmp10 = tmp0 + tmp3; /* phase 2 */ - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ - dataptr[DCTSIZE*4] = tmp10 - tmp11; - - z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ - dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ - dataptr[DCTSIZE*6] = tmp13 - z1; - - /* Odd part */ - - tmp10 = tmp4 + tmp5; /* phase 2 */ - tmp11 = tmp5 + tmp6; - tmp12 = tmp6 + tmp7; - - /* The rotator is modified from fig 4-8 to avoid extra negations. */ - z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ - z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ - z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ - z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ - - z11 = tmp7 + z3; /* phase 5 */ - z13 = tmp7 - z3; - - dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ - dataptr[DCTSIZE*3] = z13 - z2; - dataptr[DCTSIZE*1] = z11 + z4; - dataptr[DCTSIZE*7] = z11 - z4; - - dataptr++; /* advance pointer to next column */ - } -} - -#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/jfdctfst.c b/thirdparty/jpeg-9e/jfdctfst.c deleted file mode 100644 index 5e4e017..0000000 --- a/thirdparty/jpeg-9e/jfdctfst.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * jfdctfst.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2003-2017 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a fast, not so accurate integer implementation of the - * forward DCT (Discrete Cosine Transform). - * - * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT - * on each column. Direct algorithms are also available, but they are - * much more complex and seem not to be any faster when reduced to code. - * - * This implementation is based on Arai, Agui, and Nakajima's algorithm for - * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in - * Japanese, but the algorithm is described in the Pennebaker & Mitchell - * JPEG textbook (see REFERENCES section in file README). The following code - * is based directly on figure 4-8 in P&M. - * While an 8-point DCT cannot be done in less than 11 multiplies, it is - * possible to arrange the computation so that many of the multiplies are - * simple scalings of the final outputs. These multiplies can then be - * folded into the multiplications or divisions by the JPEG quantization - * table entries. The AA&N method leaves only 5 multiplies and 29 adds - * to be done in the DCT itself. - * The primary disadvantage of this method is that with fixed-point math, - * accuracy is lost due to imprecise representation of the scaled - * quantization values. The smaller the quantization table entry, the less - * precise the scaled value, so this implementation does worse with high- - * quality-setting files than with low-quality ones. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_IFAST_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ -#endif - - -/* Scaling decisions are generally the same as in the LL&M algorithm; - * see jfdctint.c for more details. However, we choose to descale - * (right shift) multiplication products as soon as they are formed, - * rather than carrying additional fractional bits into subsequent additions. - * This compromises accuracy slightly, but it lets us save a few shifts. - * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) - * everywhere except in the multiplications proper; this saves a good deal - * of work on 16-bit-int machines. - * - * Again to save a few shifts, the intermediate results between pass 1 and - * pass 2 are not upscaled, but are represented only to integral precision. - * - * A final compromise is to represent the multiplicative constants to only - * 8 fractional bits, rather than 13. This saves some shifting work on some - * machines, and may also reduce the cost of multiplication (since there - * are fewer one-bits in the constants). - */ - -#define CONST_BITS 8 - - -/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus - * causing a lot of useless floating-point operations at run time. - * To get around this we use the following pre-calculated constants. - * If you change CONST_BITS you may want to add appropriate values. - * (With a reasonable C compiler, you can just rely on the FIX() macro...) - */ - -#if CONST_BITS == 8 -#define FIX_0_382683433 ((INT32) 98) /* FIX(0.382683433) */ -#define FIX_0_541196100 ((INT32) 139) /* FIX(0.541196100) */ -#define FIX_0_707106781 ((INT32) 181) /* FIX(0.707106781) */ -#define FIX_1_306562965 ((INT32) 334) /* FIX(1.306562965) */ -#else -#define FIX_0_382683433 FIX(0.382683433) -#define FIX_0_541196100 FIX(0.541196100) -#define FIX_0_707106781 FIX(0.707106781) -#define FIX_1_306562965 FIX(1.306562965) -#endif - - -/* We can gain a little more speed, with a further compromise in accuracy, - * by omitting the addition in a descaling shift. This yields an incorrectly - * rounded result half the time... - */ - -#ifndef USE_ACCURATE_ROUNDING -#undef DESCALE -#define DESCALE(x,n) RIGHT_SHIFT(x, n) -#endif - - -/* Multiply a DCTELEM variable by an INT32 constant, and immediately - * descale to yield a DCTELEM result. - */ - -#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) - - -/* - * Perform the forward DCT on one block of samples. - * - * cK represents cos(K*pi/16). - */ - -GLOBAL(void) -jpeg_fdct_ifast (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - DCTELEM tmp10, tmp11, tmp12, tmp13; - DCTELEM z1, z2, z3, z4, z5, z11, z13; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. */ - - dataptr = data; - for (ctr = 0; ctr < DCTSIZE; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Load data into workspace */ - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]); - tmp7 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]); - tmp6 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]); - tmp5 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]); - tmp4 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]); - - /* Even part */ - - tmp10 = tmp0 + tmp3; /* phase 2 */ - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - /* Apply unsigned->signed conversion. */ - dataptr[0] = tmp10 + tmp11 - 8 * CENTERJSAMPLE; /* phase 3 */ - dataptr[4] = tmp10 - tmp11; - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ - dataptr[2] = tmp13 + z1; /* phase 5 */ - dataptr[6] = tmp13 - z1; - - /* Odd part */ - - tmp10 = tmp4 + tmp5; /* phase 2 */ - tmp11 = tmp5 + tmp6; - tmp12 = tmp6 + tmp7; - - /* The rotator is modified from fig 4-8 to avoid extra negations. */ - z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ - z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ - z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ - z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ - - z11 = tmp7 + z3; /* phase 5 */ - z13 = tmp7 - z3; - - dataptr[5] = z13 + z2; /* phase 6 */ - dataptr[3] = z13 - z2; - dataptr[1] = z11 + z4; - dataptr[7] = z11 - z4; - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; - tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; - tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; - tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; - tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; - - /* Even part */ - - tmp10 = tmp0 + tmp3; /* phase 2 */ - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ - dataptr[DCTSIZE*4] = tmp10 - tmp11; - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ - dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ - dataptr[DCTSIZE*6] = tmp13 - z1; - - /* Odd part */ - - tmp10 = tmp4 + tmp5; /* phase 2 */ - tmp11 = tmp5 + tmp6; - tmp12 = tmp6 + tmp7; - - /* The rotator is modified from fig 4-8 to avoid extra negations. */ - z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ - z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ - z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ - z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ - - z11 = tmp7 + z3; /* phase 5 */ - z13 = tmp7 - z3; - - dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ - dataptr[DCTSIZE*3] = z13 - z2; - dataptr[DCTSIZE*1] = z11 + z4; - dataptr[DCTSIZE*7] = z11 - z4; - - dataptr++; /* advance pointer to next column */ - } -} - -#endif /* DCT_IFAST_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/jfdctint.c b/thirdparty/jpeg-9e/jfdctint.c deleted file mode 100644 index 05df475..0000000 --- a/thirdparty/jpeg-9e/jfdctint.c +++ /dev/null @@ -1,4415 +0,0 @@ -/* - * jfdctint.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modification developed 2003-2018 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a slow-but-accurate integer implementation of the - * forward DCT (Discrete Cosine Transform). - * - * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT - * on each column. Direct algorithms are also available, but they are - * much more complex and seem not to be any faster when reduced to code. - * - * This implementation is based on an algorithm described in - * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT - * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, - * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. - * The primary algorithm described there uses 11 multiplies and 29 adds. - * We use their alternate method with 12 multiplies and 32 adds. - * The advantage of this method is that no data path contains more than one - * multiplication; this allows a very simple and accurate implementation in - * scaled fixed-point arithmetic, with a minimal number of shifts. - * - * We also provide FDCT routines with various input sample block sizes for - * direct resolution reduction or enlargement and for direct resolving the - * common 2x1 and 1x2 subsampling cases without additional resampling: NxN - * (N=1...16), 2NxN, and Nx2N (N=1...8) pixels for one 8x8 output DCT block. - * - * For N<8 we fill the remaining block coefficients with zero. - * For N>8 we apply a partial N-point FDCT on the input samples, computing - * just the lower 8 frequency coefficients and discarding the rest. - * - * We must scale the output coefficients of the N-point FDCT appropriately - * to the standard 8-point FDCT level by 8/N per 1-D pass. This scaling - * is folded into the constant multipliers (pass 2) and/or final/initial - * shifting. - * - * CAUTION: We rely on the FIX() macro except for the N=1,2,4,8 cases - * since there would be too many additional constants to pre-calculate. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_ISLOW_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ -#endif - - -/* - * The poop on this scaling stuff is as follows: - * - * Each 1-D DCT step produces outputs which are a factor of sqrt(N) - * larger than the true DCT outputs. The final outputs are therefore - * a factor of N larger than desired; since N=8 this can be cured by - * a simple right shift at the end of the algorithm. The advantage of - * this arrangement is that we save two multiplications per 1-D DCT, - * because the y0 and y4 outputs need not be divided by sqrt(N). - * In the IJG code, this factor of 8 is removed by the quantization step - * (in jcdctmgr.c), NOT in this module. - * - * We have to do addition and subtraction of the integer inputs, which - * is no problem, and multiplication by fractional constants, which is - * a problem to do in integer arithmetic. We multiply all the constants - * by CONST_SCALE and convert them to integer constants (thus retaining - * CONST_BITS bits of precision in the constants). After doing a - * multiplication we have to divide the product by CONST_SCALE, with proper - * rounding, to produce the correct output. This division can be done - * cheaply as a right shift of CONST_BITS bits. We postpone shifting - * as long as possible so that partial sums can be added together with - * full fractional precision. - * - * The outputs of the first pass are scaled up by PASS1_BITS bits so that - * they are represented to better-than-integral precision. These outputs - * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word - * with the recommended scaling. (For 12-bit sample data, the intermediate - * array is INT32 anyway.) - * - * To avoid overflow of the 32-bit intermediate results in pass 2, we must - * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis - * shows that the values given below are the most effective. - */ - -#if BITS_IN_JSAMPLE == 8 -#define CONST_BITS 13 -#define PASS1_BITS 2 -#else -#define CONST_BITS 13 -#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ -#endif - -/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus - * causing a lot of useless floating-point operations at run time. - * To get around this we use the following pre-calculated constants. - * If you change CONST_BITS you may want to add appropriate values. - * (With a reasonable C compiler, you can just rely on the FIX() macro...) - */ - -#if CONST_BITS == 13 -#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ -#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ -#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ -#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ -#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ -#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ -#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ -#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ -#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ -#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ -#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ -#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ -#else -#define FIX_0_298631336 FIX(0.298631336) -#define FIX_0_390180644 FIX(0.390180644) -#define FIX_0_541196100 FIX(0.541196100) -#define FIX_0_765366865 FIX(0.765366865) -#define FIX_0_899976223 FIX(0.899976223) -#define FIX_1_175875602 FIX(1.175875602) -#define FIX_1_501321110 FIX(1.501321110) -#define FIX_1_847759065 FIX(1.847759065) -#define FIX_1_961570560 FIX(1.961570560) -#define FIX_2_053119869 FIX(2.053119869) -#define FIX_2_562915447 FIX(2.562915447) -#define FIX_3_072711026 FIX(3.072711026) -#endif - - -/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. - * For 8-bit samples with the recommended scaling, all the variable - * and constant values involved are no more than 16 bits wide, so a - * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. - * For 12-bit samples, a full 32-bit multiplication will be needed. - */ - -#if BITS_IN_JSAMPLE == 8 -#define MULTIPLY(var,const) MULTIPLY16C16(var,const) -#else -#define MULTIPLY(var,const) ((var) * (const)) -#endif - - -/* - * Perform the forward DCT on one block of samples. - */ - -GLOBAL(void) -jpeg_fdct_islow (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * cK represents sqrt(2) * cos(K*pi/16). - */ - - dataptr = data; - for (ctr = 0; ctr < DCTSIZE; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part per LL&M figure 1 --- note that published figure is faulty; - * rotator "c1" should be "c6". - */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]); - - tmp10 = tmp0 + tmp3; - tmp12 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp13 = tmp1 - tmp2; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]); - tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) ((tmp10 + tmp11 - 8 * CENTERJSAMPLE) << PASS1_BITS); - dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS-PASS1_BITS-1); - - dataptr[2] = (DCTELEM) - RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ - CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) - RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ - CONST_BITS-PASS1_BITS); - - /* Odd part per figure 8 --- note paper omits factor of sqrt(2). - * i0..i3 in the paper are tmp0..tmp3 here. - */ - - tmp12 = tmp0 + tmp2; - tmp13 = tmp1 + tmp3; - - z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS-PASS1_BITS-1); - - tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ - tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ - tmp12 += z1; - tmp13 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp0 += z1 + tmp12; - tmp3 += z1 + tmp13; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp1 += z1 + tmp13; - tmp2 += z1 + tmp12; - - dataptr[1] = (DCTELEM) RIGHT_SHIFT(tmp0, CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) RIGHT_SHIFT(tmp1, CONST_BITS-PASS1_BITS); - dataptr[5] = (DCTELEM) RIGHT_SHIFT(tmp2, CONST_BITS-PASS1_BITS); - dataptr[7] = (DCTELEM) RIGHT_SHIFT(tmp3, CONST_BITS-PASS1_BITS); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * cK represents sqrt(2) * cos(K*pi/16). - */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part per LL&M figure 1 --- note that published figure is faulty; - * rotator "c1" should be "c6". - */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; - - /* Add fudge factor here for final descale. */ - tmp10 = tmp0 + tmp3 + (ONE << (PASS1_BITS-1)); - tmp12 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp13 = tmp1 - tmp2; - - tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; - - dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp10 + tmp11, PASS1_BITS); - dataptr[DCTSIZE*4] = (DCTELEM) RIGHT_SHIFT(tmp10 - tmp11, PASS1_BITS); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS+PASS1_BITS-1); - - dataptr[DCTSIZE*2] = (DCTELEM) - RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*6] = (DCTELEM) - RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ - CONST_BITS+PASS1_BITS); - - /* Odd part per figure 8 --- note paper omits factor of sqrt(2). - * i0..i3 in the paper are tmp0..tmp3 here. - */ - - tmp12 = tmp0 + tmp2; - tmp13 = tmp1 + tmp3; - - z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS+PASS1_BITS-1); - - tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ - tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ - tmp12 += z1; - tmp13 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp0 += z1 + tmp12; - tmp3 += z1 + tmp13; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp1 += z1 + tmp13; - tmp2 += z1 + tmp12; - - dataptr[DCTSIZE*1] = (DCTELEM) RIGHT_SHIFT(tmp0, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) RIGHT_SHIFT(tmp1, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*5] = (DCTELEM) RIGHT_SHIFT(tmp2, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*7] = (DCTELEM) RIGHT_SHIFT(tmp3, CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - -#ifdef DCT_SCALING_SUPPORTED - - -/* - * Perform the forward DCT on a 7x7 sample block. - */ - -GLOBAL(void) -jpeg_fdct_7x7 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12; - INT32 z1, z2, z3; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * cK represents sqrt(2) * cos(K*pi/14). - */ - - dataptr = data; - for (ctr = 0; ctr < 7; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[6]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[5]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[4]); - tmp3 = GETJSAMPLE(elemptr[3]); - - tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[6]); - tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[5]); - tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[4]); - - z1 = tmp0 + tmp2; - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((z1 + tmp1 + tmp3 - 7 * CENTERJSAMPLE) << PASS1_BITS); - tmp3 += tmp3; - z1 -= tmp3; - z1 -= tmp3; - z1 = MULTIPLY(z1, FIX(0.353553391)); /* (c2+c6-c4)/2 */ - z2 = MULTIPLY(tmp0 - tmp2, FIX(0.920609002)); /* (c2+c4-c6)/2 */ - z3 = MULTIPLY(tmp1 - tmp2, FIX(0.314692123)); /* c6 */ - dataptr[2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS-PASS1_BITS); - z1 -= z2; - z2 = MULTIPLY(tmp0 - tmp1, FIX(0.881747734)); /* c4 */ - dataptr[4] = (DCTELEM) - DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.707106781)), /* c2+c6-c4 */ - CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS-PASS1_BITS); - - /* Odd part */ - - tmp1 = MULTIPLY(tmp10 + tmp11, FIX(0.935414347)); /* (c3+c1-c5)/2 */ - tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.170262339)); /* (c3+c5-c1)/2 */ - tmp0 = tmp1 - tmp2; - tmp1 += tmp2; - tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.378756276)); /* -c1 */ - tmp1 += tmp2; - tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.613604268)); /* c5 */ - tmp0 += tmp3; - tmp2 += tmp3 + MULTIPLY(tmp12, FIX(1.870828693)); /* c3+c1-c5 */ - - dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS-PASS1_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS-PASS1_BITS); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/7)**2 = 64/49, which we fold - * into the constant multipliers: - * cK now represents sqrt(2) * cos(K*pi/14) * 64/49. - */ - - dataptr = data; - for (ctr = 0; ctr < 7; ctr++) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*6]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*5]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*4]; - tmp3 = dataptr[DCTSIZE*3]; - - tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*6]; - tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*5]; - tmp12 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*4]; - - z1 = tmp0 + tmp2; - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(z1 + tmp1 + tmp3, FIX(1.306122449)), /* 64/49 */ - CONST_BITS+PASS1_BITS); - tmp3 += tmp3; - z1 -= tmp3; - z1 -= tmp3; - z1 = MULTIPLY(z1, FIX(0.461784020)); /* (c2+c6-c4)/2 */ - z2 = MULTIPLY(tmp0 - tmp2, FIX(1.202428084)); /* (c2+c4-c6)/2 */ - z3 = MULTIPLY(tmp1 - tmp2, FIX(0.411026446)); /* c6 */ - dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS+PASS1_BITS); - z1 -= z2; - z2 = MULTIPLY(tmp0 - tmp1, FIX(1.151670509)); /* c4 */ - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.923568041)), /* c2+c6-c4 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS+PASS1_BITS); - - /* Odd part */ - - tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.221765677)); /* (c3+c1-c5)/2 */ - tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.222383464)); /* (c3+c5-c1)/2 */ - tmp0 = tmp1 - tmp2; - tmp1 += tmp2; - tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.800824523)); /* -c1 */ - tmp1 += tmp2; - tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.801442310)); /* c5 */ - tmp0 += tmp3; - tmp2 += tmp3 + MULTIPLY(tmp12, FIX(2.443531355)); /* c3+c1-c5 */ - - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 6x6 sample block. - */ - -GLOBAL(void) -jpeg_fdct_6x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2; - INT32 tmp10, tmp11, tmp12; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * cK represents sqrt(2) * cos(K*pi/12). - */ - - dataptr = data; - for (ctr = 0; ctr < 6; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[5]); - tmp11 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[4]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[3]); - - tmp10 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[5]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[4]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[3]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp11 - 6 * CENTERJSAMPLE) << PASS1_BITS); - dataptr[2] = (DCTELEM) - DESCALE(MULTIPLY(tmp12, FIX(1.224744871)), /* c2 */ - CONST_BITS-PASS1_BITS); - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(0.707106781)), /* c4 */ - CONST_BITS-PASS1_BITS); - - /* Odd part */ - - tmp10 = DESCALE(MULTIPLY(tmp0 + tmp2, FIX(0.366025404)), /* c5 */ - CONST_BITS-PASS1_BITS); - - dataptr[1] = (DCTELEM) (tmp10 + ((tmp0 + tmp1) << PASS1_BITS)); - dataptr[3] = (DCTELEM) ((tmp0 - tmp1 - tmp2) << PASS1_BITS); - dataptr[5] = (DCTELEM) (tmp10 + ((tmp2 - tmp1) << PASS1_BITS)); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/6)**2 = 16/9, which we fold - * into the constant multipliers: - * cK now represents sqrt(2) * cos(K*pi/12) * 16/9. - */ - - dataptr = data; - for (ctr = 0; ctr < 6; ctr++) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*5]; - tmp11 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*4]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3]; - - tmp10 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - - tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*5]; - tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*4]; - tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 + tmp11, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(MULTIPLY(tmp12, FIX(2.177324216)), /* c2 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(1.257078722)), /* c4 */ - CONST_BITS+PASS1_BITS); - - /* Odd part */ - - tmp10 = MULTIPLY(tmp0 + tmp2, FIX(0.650711829)); /* c5 */ - - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 - tmp1 - tmp2, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*5] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp2 - tmp1, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 5x5 sample block. - */ - -GLOBAL(void) -jpeg_fdct_5x5 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2; - INT32 tmp10, tmp11; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * We scale the results further by 2 as part of output adaption - * scaling for different DCT size. - * cK represents sqrt(2) * cos(K*pi/10). - */ - - dataptr = data; - for (ctr = 0; ctr < 5; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[4]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[3]); - tmp2 = GETJSAMPLE(elemptr[2]); - - tmp10 = tmp0 + tmp1; - tmp11 = tmp0 - tmp1; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[4]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[3]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp2 - 5 * CENTERJSAMPLE) << (PASS1_BITS+1)); - tmp11 = MULTIPLY(tmp11, FIX(0.790569415)); /* (c2+c4)/2 */ - tmp10 -= tmp2 << 2; - tmp10 = MULTIPLY(tmp10, FIX(0.353553391)); /* (c2-c4)/2 */ - dataptr[2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS-PASS1_BITS-1); - dataptr[4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS-PASS1_BITS-1); - - /* Odd part */ - - tmp10 = MULTIPLY(tmp0 + tmp1, FIX(0.831253876)); /* c3 */ - - dataptr[1] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.513743148)), /* c1-c3 */ - CONST_BITS-PASS1_BITS-1); - dataptr[3] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.176250899)), /* c1+c3 */ - CONST_BITS-PASS1_BITS-1); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/5)**2 = 64/25, which we partially - * fold into the constant multipliers (other part was done in pass 1): - * cK now represents sqrt(2) * cos(K*pi/10) * 32/25. - */ - - dataptr = data; - for (ctr = 0; ctr < 5; ctr++) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*4]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*3]; - tmp2 = dataptr[DCTSIZE*2]; - - tmp10 = tmp0 + tmp1; - tmp11 = tmp0 - tmp1; - - tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*4]; - tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*3]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 + tmp2, FIX(1.28)), /* 32/25 */ - CONST_BITS+PASS1_BITS); - tmp11 = MULTIPLY(tmp11, FIX(1.011928851)); /* (c2+c4)/2 */ - tmp10 -= tmp2 << 2; - tmp10 = MULTIPLY(tmp10, FIX(0.452548340)); /* (c2-c4)/2 */ - dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS+PASS1_BITS); - - /* Odd part */ - - tmp10 = MULTIPLY(tmp0 + tmp1, FIX(1.064004961)); /* c3 */ - - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.657591230)), /* c1-c3 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.785601151)), /* c1+c3 */ - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 4x4 sample block. - */ - -GLOBAL(void) -jpeg_fdct_4x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1; - INT32 tmp10, tmp11; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * We must also scale the output by (8/4)**2 = 2**2, which we add here. - * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. - */ - - dataptr = data; - for (ctr = 0; ctr < 4; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[3]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[2]); - - tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[3]); - tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[2]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp0 + tmp1 - 4 * CENTERJSAMPLE) << (PASS1_BITS+2)); - dataptr[2] = (DCTELEM) ((tmp0 - tmp1) << (PASS1_BITS+2)); - - /* Odd part */ - - tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-PASS1_BITS-3); - - dataptr[1] = (DCTELEM) - RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ - CONST_BITS-PASS1_BITS-2); - dataptr[3] = (DCTELEM) - RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ - CONST_BITS-PASS1_BITS-2); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. - */ - - dataptr = data; - for (ctr = 0; ctr < 4; ctr++) { - /* Even part */ - - /* Add fudge factor here for final descale. */ - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*3] + (ONE << (PASS1_BITS-1)); - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*2]; - - tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*3]; - tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*2]; - - dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp0 + tmp1, PASS1_BITS); - dataptr[DCTSIZE*2] = (DCTELEM) RIGHT_SHIFT(tmp0 - tmp1, PASS1_BITS); - - /* Odd part */ - - tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS+PASS1_BITS-1); - - dataptr[DCTSIZE*1] = (DCTELEM) - RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) - RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 3x3 sample block. - */ - -GLOBAL(void) -jpeg_fdct_3x3 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * We scale the results further by 2**2 as part of output adaption - * scaling for different DCT size. - * cK represents sqrt(2) * cos(K*pi/6). - */ - - dataptr = data; - for (ctr = 0; ctr < 3; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[2]); - tmp1 = GETJSAMPLE(elemptr[1]); - - tmp2 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[2]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp0 + tmp1 - 3 * CENTERJSAMPLE) << (PASS1_BITS+2)); - dataptr[2] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(0.707106781)), /* c2 */ - CONST_BITS-PASS1_BITS-2); - - /* Odd part */ - - dataptr[1] = (DCTELEM) - DESCALE(MULTIPLY(tmp2, FIX(1.224744871)), /* c1 */ - CONST_BITS-PASS1_BITS-2); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/3)**2 = 64/9, which we partially - * fold into the constant multipliers (other part was done in pass 1): - * cK now represents sqrt(2) * cos(K*pi/6) * 16/9. - */ - - dataptr = data; - for (ctr = 0; ctr < 3; ctr++) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*2]; - tmp1 = dataptr[DCTSIZE*1]; - - tmp2 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*2]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(1.257078722)), /* c2 */ - CONST_BITS+PASS1_BITS); - - /* Odd part */ - - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(MULTIPLY(tmp2, FIX(2.177324216)), /* c1 */ - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 2x2 sample block. - */ - -GLOBAL(void) -jpeg_fdct_2x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - DCTELEM tmp0, tmp1, tmp2, tmp3; - JSAMPROW elemptr; - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT. - */ - - /* Row 0 */ - elemptr = sample_data[0] + start_col; - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[1]); - tmp1 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[1]); - - /* Row 1 */ - elemptr = sample_data[1] + start_col; - - tmp2 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[1]); - tmp3 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[1]); - - /* Pass 2: process columns. - * We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/2)**2 = 2**4. - */ - - /* Column 0 */ - /* Apply unsigned->signed conversion. */ - data[DCTSIZE*0] = (tmp0 + tmp2 - 4 * CENTERJSAMPLE) << 4; - data[DCTSIZE*1] = (tmp0 - tmp2) << 4; - - /* Column 1 */ - data[DCTSIZE*0+1] = (tmp1 + tmp3) << 4; - data[DCTSIZE*1+1] = (tmp1 - tmp3) << 4; -} - - -/* - * Perform the forward DCT on a 1x1 sample block. - */ - -GLOBAL(void) -jpeg_fdct_1x1 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - DCTELEM dcval; - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - dcval = GETJSAMPLE(sample_data[0][start_col]); - - /* We leave the result scaled up by an overall factor of 8. */ - /* We must also scale the output by (8/1)**2 = 2**6. */ - /* Apply unsigned->signed conversion. */ - data[0] = (dcval - CENTERJSAMPLE) << 6; -} - - -/* - * Perform the forward DCT on a 9x9 sample block. - */ - -GLOBAL(void) -jpeg_fdct_9x9 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2; - DCTELEM workspace[8]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * we scale the results further by 2 as part of output adaption - * scaling for different DCT size. - * cK represents sqrt(2) * cos(K*pi/18). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[8]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[7]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[6]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[5]); - tmp4 = GETJSAMPLE(elemptr[4]); - - tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[8]); - tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[7]); - tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[6]); - tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[5]); - - z1 = tmp0 + tmp2 + tmp3; - z2 = tmp1 + tmp4; - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) ((z1 + z2 - 9 * CENTERJSAMPLE) << 1); - dataptr[6] = (DCTELEM) - DESCALE(MULTIPLY(z1 - z2 - z2, FIX(0.707106781)), /* c6 */ - CONST_BITS-1); - z1 = MULTIPLY(tmp0 - tmp2, FIX(1.328926049)); /* c2 */ - z2 = MULTIPLY(tmp1 - tmp4 - tmp4, FIX(0.707106781)); /* c6 */ - dataptr[2] = (DCTELEM) - DESCALE(MULTIPLY(tmp2 - tmp3, FIX(1.083350441)) /* c4 */ - + z1 + z2, CONST_BITS-1); - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp3 - tmp0, FIX(0.245575608)) /* c8 */ - + z1 - z2, CONST_BITS-1); - - /* Odd part */ - - dataptr[3] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp12 - tmp13, FIX(1.224744871)), /* c3 */ - CONST_BITS-1); - - tmp11 = MULTIPLY(tmp11, FIX(1.224744871)); /* c3 */ - tmp0 = MULTIPLY(tmp10 + tmp12, FIX(0.909038955)); /* c5 */ - tmp1 = MULTIPLY(tmp10 + tmp13, FIX(0.483689525)); /* c7 */ - - dataptr[1] = (DCTELEM) DESCALE(tmp11 + tmp0 + tmp1, CONST_BITS-1); - - tmp2 = MULTIPLY(tmp12 - tmp13, FIX(1.392728481)); /* c1 */ - - dataptr[5] = (DCTELEM) DESCALE(tmp0 - tmp11 - tmp2, CONST_BITS-1); - dataptr[7] = (DCTELEM) DESCALE(tmp1 - tmp11 + tmp2, CONST_BITS-1); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == 9) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/9)**2 = 64/81, which we partially - * fold into the constant multipliers and final/initial shifting: - * cK now represents sqrt(2) * cos(K*pi/18) * 128/81. - */ - - dataptr = data; - wsptr = workspace; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*0]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*7]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*6]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*5]; - tmp4 = dataptr[DCTSIZE*4]; - - tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*0]; - tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*7]; - tmp12 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*6]; - tmp13 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*5]; - - z1 = tmp0 + tmp2 + tmp3; - z2 = tmp1 + tmp4; - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(z1 + z2, FIX(1.580246914)), /* 128/81 */ - CONST_BITS+2); - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(MULTIPLY(z1 - z2 - z2, FIX(1.117403309)), /* c6 */ - CONST_BITS+2); - z1 = MULTIPLY(tmp0 - tmp2, FIX(2.100031287)); /* c2 */ - z2 = MULTIPLY(tmp1 - tmp4 - tmp4, FIX(1.117403309)); /* c6 */ - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(MULTIPLY(tmp2 - tmp3, FIX(1.711961190)) /* c4 */ - + z1 + z2, CONST_BITS+2); - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp3 - tmp0, FIX(0.388070096)) /* c8 */ - + z1 - z2, CONST_BITS+2); - - /* Odd part */ - - dataptr[DCTSIZE*3] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp12 - tmp13, FIX(1.935399303)), /* c3 */ - CONST_BITS+2); - - tmp11 = MULTIPLY(tmp11, FIX(1.935399303)); /* c3 */ - tmp0 = MULTIPLY(tmp10 + tmp12, FIX(1.436506004)); /* c5 */ - tmp1 = MULTIPLY(tmp10 + tmp13, FIX(0.764348879)); /* c7 */ - - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(tmp11 + tmp0 + tmp1, CONST_BITS+2); - - tmp2 = MULTIPLY(tmp12 - tmp13, FIX(2.200854883)); /* c1 */ - - dataptr[DCTSIZE*5] = (DCTELEM) - DESCALE(tmp0 - tmp11 - tmp2, CONST_BITS+2); - dataptr[DCTSIZE*7] = (DCTELEM) - DESCALE(tmp1 - tmp11 + tmp2, CONST_BITS+2); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 10x10 sample block. - */ - -GLOBAL(void) -jpeg_fdct_10x10 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14; - DCTELEM workspace[8*2]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * we scale the results further by 2 as part of output adaption - * scaling for different DCT size. - * cK represents sqrt(2) * cos(K*pi/20). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[9]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[8]); - tmp12 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[7]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[6]); - tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[5]); - - tmp10 = tmp0 + tmp4; - tmp13 = tmp0 - tmp4; - tmp11 = tmp1 + tmp3; - tmp14 = tmp1 - tmp3; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[9]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[8]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[7]); - tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[6]); - tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[5]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp11 + tmp12 - 10 * CENTERJSAMPLE) << 1); - tmp12 += tmp12; - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.144122806)) - /* c4 */ - MULTIPLY(tmp11 - tmp12, FIX(0.437016024)), /* c8 */ - CONST_BITS-1); - tmp10 = MULTIPLY(tmp13 + tmp14, FIX(0.831253876)); /* c6 */ - dataptr[2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.513743148)), /* c2-c6 */ - CONST_BITS-1); - dataptr[6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.176250899)), /* c2+c6 */ - CONST_BITS-1); - - /* Odd part */ - - tmp10 = tmp0 + tmp4; - tmp11 = tmp1 - tmp3; - dataptr[5] = (DCTELEM) ((tmp10 - tmp11 - tmp2) << 1); - tmp2 <<= CONST_BITS; - dataptr[1] = (DCTELEM) - DESCALE(MULTIPLY(tmp0, FIX(1.396802247)) + /* c1 */ - MULTIPLY(tmp1, FIX(1.260073511)) + tmp2 + /* c3 */ - MULTIPLY(tmp3, FIX(0.642039522)) + /* c7 */ - MULTIPLY(tmp4, FIX(0.221231742)), /* c9 */ - CONST_BITS-1); - tmp12 = MULTIPLY(tmp0 - tmp4, FIX(0.951056516)) - /* (c3+c7)/2 */ - MULTIPLY(tmp1 + tmp3, FIX(0.587785252)); /* (c1-c9)/2 */ - tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.309016994)) + /* (c3-c7)/2 */ - (tmp11 << (CONST_BITS - 1)) - tmp2; - dataptr[3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS-1); - dataptr[7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS-1); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == 10) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/10)**2 = 16/25, which we partially - * fold into the constant multipliers and final/initial shifting: - * cK now represents sqrt(2) * cos(K*pi/20) * 32/25. - */ - - dataptr = data; - wsptr = workspace; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*1]; - tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*0]; - tmp12 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*7]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*6]; - tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*5]; - - tmp10 = tmp0 + tmp4; - tmp13 = tmp0 - tmp4; - tmp11 = tmp1 + tmp3; - tmp14 = tmp1 - tmp3; - - tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*1]; - tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*0]; - tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*7]; - tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*6]; - tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(1.28)), /* 32/25 */ - CONST_BITS+2); - tmp12 += tmp12; - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.464477191)) - /* c4 */ - MULTIPLY(tmp11 - tmp12, FIX(0.559380511)), /* c8 */ - CONST_BITS+2); - tmp10 = MULTIPLY(tmp13 + tmp14, FIX(1.064004961)); /* c6 */ - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.657591230)), /* c2-c6 */ - CONST_BITS+2); - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.785601151)), /* c2+c6 */ - CONST_BITS+2); - - /* Odd part */ - - tmp10 = tmp0 + tmp4; - tmp11 = tmp1 - tmp3; - dataptr[DCTSIZE*5] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp11 - tmp2, FIX(1.28)), /* 32/25 */ - CONST_BITS+2); - tmp2 = MULTIPLY(tmp2, FIX(1.28)); /* 32/25 */ - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(MULTIPLY(tmp0, FIX(1.787906876)) + /* c1 */ - MULTIPLY(tmp1, FIX(1.612894094)) + tmp2 + /* c3 */ - MULTIPLY(tmp3, FIX(0.821810588)) + /* c7 */ - MULTIPLY(tmp4, FIX(0.283176630)), /* c9 */ - CONST_BITS+2); - tmp12 = MULTIPLY(tmp0 - tmp4, FIX(1.217352341)) - /* (c3+c7)/2 */ - MULTIPLY(tmp1 + tmp3, FIX(0.752365123)); /* (c1-c9)/2 */ - tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.395541753)) + /* (c3-c7)/2 */ - MULTIPLY(tmp11, FIX(0.64)) - tmp2; /* 16/25 */ - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS+2); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS+2); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on an 11x11 sample block. - */ - -GLOBAL(void) -jpeg_fdct_11x11 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14; - INT32 z1, z2, z3; - DCTELEM workspace[8*3]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * we scale the results further by 2 as part of output adaption - * scaling for different DCT size. - * cK represents sqrt(2) * cos(K*pi/22). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[10]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[9]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[8]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[7]); - tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[6]); - tmp5 = GETJSAMPLE(elemptr[5]); - - tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[10]); - tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[9]); - tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[8]); - tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[7]); - tmp14 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[6]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5 - 11 * CENTERJSAMPLE) << 1); - tmp5 += tmp5; - tmp0 -= tmp5; - tmp1 -= tmp5; - tmp2 -= tmp5; - tmp3 -= tmp5; - tmp4 -= tmp5; - z1 = MULTIPLY(tmp0 + tmp3, FIX(1.356927976)) + /* c2 */ - MULTIPLY(tmp2 + tmp4, FIX(0.201263574)); /* c10 */ - z2 = MULTIPLY(tmp1 - tmp3, FIX(0.926112931)); /* c6 */ - z3 = MULTIPLY(tmp0 - tmp1, FIX(1.189712156)); /* c4 */ - dataptr[2] = (DCTELEM) - DESCALE(z1 + z2 - MULTIPLY(tmp3, FIX(1.018300590)) /* c2+c8-c6 */ - - MULTIPLY(tmp4, FIX(1.390975730)), /* c4+c10 */ - CONST_BITS-1); - dataptr[4] = (DCTELEM) - DESCALE(z2 + z3 + MULTIPLY(tmp1, FIX(0.062335650)) /* c4-c6-c10 */ - - MULTIPLY(tmp2, FIX(1.356927976)) /* c2 */ - + MULTIPLY(tmp4, FIX(0.587485545)), /* c8 */ - CONST_BITS-1); - dataptr[6] = (DCTELEM) - DESCALE(z1 + z3 - MULTIPLY(tmp0, FIX(1.620527200)) /* c2+c4-c6 */ - - MULTIPLY(tmp2, FIX(0.788749120)), /* c8+c10 */ - CONST_BITS-1); - - /* Odd part */ - - tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.286413905)); /* c3 */ - tmp2 = MULTIPLY(tmp10 + tmp12, FIX(1.068791298)); /* c5 */ - tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.764581576)); /* c7 */ - tmp0 = tmp1 + tmp2 + tmp3 - MULTIPLY(tmp10, FIX(1.719967871)) /* c7+c5+c3-c1 */ - + MULTIPLY(tmp14, FIX(0.398430003)); /* c9 */ - tmp4 = MULTIPLY(tmp11 + tmp12, - FIX(0.764581576)); /* -c7 */ - tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(1.399818907)); /* -c1 */ - tmp1 += tmp4 + tmp5 + MULTIPLY(tmp11, FIX(1.276416582)) /* c9+c7+c1-c3 */ - - MULTIPLY(tmp14, FIX(1.068791298)); /* c5 */ - tmp10 = MULTIPLY(tmp12 + tmp13, FIX(0.398430003)); /* c9 */ - tmp2 += tmp4 + tmp10 - MULTIPLY(tmp12, FIX(1.989053629)) /* c9+c5+c3-c7 */ - + MULTIPLY(tmp14, FIX(1.399818907)); /* c1 */ - tmp3 += tmp5 + tmp10 + MULTIPLY(tmp13, FIX(1.305598626)) /* c1+c5-c9-c7 */ - - MULTIPLY(tmp14, FIX(1.286413905)); /* c3 */ - - dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS-1); - dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS-1); - dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS-1); - dataptr[7] = (DCTELEM) DESCALE(tmp3, CONST_BITS-1); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == 11) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/11)**2 = 64/121, which we partially - * fold into the constant multipliers and final/initial shifting: - * cK now represents sqrt(2) * cos(K*pi/22) * 128/121. - */ - - dataptr = data; - wsptr = workspace; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*2]; - tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*1]; - tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*0]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*7]; - tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*6]; - tmp5 = dataptr[DCTSIZE*5]; - - tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*2]; - tmp11 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*1]; - tmp12 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*0]; - tmp13 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*7]; - tmp14 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*6]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5, - FIX(1.057851240)), /* 128/121 */ - CONST_BITS+2); - tmp5 += tmp5; - tmp0 -= tmp5; - tmp1 -= tmp5; - tmp2 -= tmp5; - tmp3 -= tmp5; - tmp4 -= tmp5; - z1 = MULTIPLY(tmp0 + tmp3, FIX(1.435427942)) + /* c2 */ - MULTIPLY(tmp2 + tmp4, FIX(0.212906922)); /* c10 */ - z2 = MULTIPLY(tmp1 - tmp3, FIX(0.979689713)); /* c6 */ - z3 = MULTIPLY(tmp0 - tmp1, FIX(1.258538479)); /* c4 */ - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(z1 + z2 - MULTIPLY(tmp3, FIX(1.077210542)) /* c2+c8-c6 */ - - MULTIPLY(tmp4, FIX(1.471445400)), /* c4+c10 */ - CONST_BITS+2); - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(z2 + z3 + MULTIPLY(tmp1, FIX(0.065941844)) /* c4-c6-c10 */ - - MULTIPLY(tmp2, FIX(1.435427942)) /* c2 */ - + MULTIPLY(tmp4, FIX(0.621472312)), /* c8 */ - CONST_BITS+2); - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(z1 + z3 - MULTIPLY(tmp0, FIX(1.714276708)) /* c2+c4-c6 */ - - MULTIPLY(tmp2, FIX(0.834379234)), /* c8+c10 */ - CONST_BITS+2); - - /* Odd part */ - - tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.360834544)); /* c3 */ - tmp2 = MULTIPLY(tmp10 + tmp12, FIX(1.130622199)); /* c5 */ - tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.808813568)); /* c7 */ - tmp0 = tmp1 + tmp2 + tmp3 - MULTIPLY(tmp10, FIX(1.819470145)) /* c7+c5+c3-c1 */ - + MULTIPLY(tmp14, FIX(0.421479672)); /* c9 */ - tmp4 = MULTIPLY(tmp11 + tmp12, - FIX(0.808813568)); /* -c7 */ - tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(1.480800167)); /* -c1 */ - tmp1 += tmp4 + tmp5 + MULTIPLY(tmp11, FIX(1.350258864)) /* c9+c7+c1-c3 */ - - MULTIPLY(tmp14, FIX(1.130622199)); /* c5 */ - tmp10 = MULTIPLY(tmp12 + tmp13, FIX(0.421479672)); /* c9 */ - tmp2 += tmp4 + tmp10 - MULTIPLY(tmp12, FIX(2.104122847)) /* c9+c5+c3-c7 */ - + MULTIPLY(tmp14, FIX(1.480800167)); /* c1 */ - tmp3 += tmp5 + tmp10 + MULTIPLY(tmp13, FIX(1.381129125)) /* c1+c5-c9-c7 */ - - MULTIPLY(tmp14, FIX(1.360834544)); /* c3 */ - - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+2); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+2); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+2); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3, CONST_BITS+2); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 12x12 sample block. - */ - -GLOBAL(void) -jpeg_fdct_12x12 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; - DCTELEM workspace[8*4]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT. - * cK represents sqrt(2) * cos(K*pi/24). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[11]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[10]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[9]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[8]); - tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[7]); - tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[6]); - - tmp10 = tmp0 + tmp5; - tmp13 = tmp0 - tmp5; - tmp11 = tmp1 + tmp4; - tmp14 = tmp1 - tmp4; - tmp12 = tmp2 + tmp3; - tmp15 = tmp2 - tmp3; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[11]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[10]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[9]); - tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[8]); - tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[7]); - tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[6]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) (tmp10 + tmp11 + tmp12 - 12 * CENTERJSAMPLE); - dataptr[6] = (DCTELEM) (tmp13 - tmp14 - tmp15); - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.224744871)), /* c4 */ - CONST_BITS); - dataptr[2] = (DCTELEM) - DESCALE(tmp14 - tmp15 + MULTIPLY(tmp13 + tmp15, FIX(1.366025404)), /* c2 */ - CONST_BITS); - - /* Odd part */ - - tmp10 = MULTIPLY(tmp1 + tmp4, FIX_0_541196100); /* c9 */ - tmp14 = tmp10 + MULTIPLY(tmp1, FIX_0_765366865); /* c3-c9 */ - tmp15 = tmp10 - MULTIPLY(tmp4, FIX_1_847759065); /* c3+c9 */ - tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.121971054)); /* c5 */ - tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.860918669)); /* c7 */ - tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.580774953)) /* c5+c7-c1 */ - + MULTIPLY(tmp5, FIX(0.184591911)); /* c11 */ - tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.184591911)); /* -c11 */ - tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.339493912)) /* c1+c5-c11 */ - + MULTIPLY(tmp5, FIX(0.860918669)); /* c7 */ - tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.725788011)) /* c1+c11-c7 */ - - MULTIPLY(tmp5, FIX(1.121971054)); /* c5 */ - tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.306562965)) /* c3 */ - - MULTIPLY(tmp2 + tmp5, FIX_0_541196100); /* c9 */ - - dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS); - dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == 12) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/12)**2 = 4/9, which we partially - * fold into the constant multipliers and final shifting: - * cK now represents sqrt(2) * cos(K*pi/24) * 8/9. - */ - - dataptr = data; - wsptr = workspace; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*3]; - tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*2]; - tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*1]; - tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*0]; - tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*7]; - tmp5 = dataptr[DCTSIZE*5] + dataptr[DCTSIZE*6]; - - tmp10 = tmp0 + tmp5; - tmp13 = tmp0 - tmp5; - tmp11 = tmp1 + tmp4; - tmp14 = tmp1 - tmp4; - tmp12 = tmp2 + tmp3; - tmp15 = tmp2 - tmp3; - - tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*3]; - tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*2]; - tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*1]; - tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*0]; - tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*7]; - tmp5 = dataptr[DCTSIZE*5] - dataptr[DCTSIZE*6]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(0.888888889)), /* 8/9 */ - CONST_BITS+1); - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(MULTIPLY(tmp13 - tmp14 - tmp15, FIX(0.888888889)), /* 8/9 */ - CONST_BITS+1); - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.088662108)), /* c4 */ - CONST_BITS+1); - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(MULTIPLY(tmp14 - tmp15, FIX(0.888888889)) + /* 8/9 */ - MULTIPLY(tmp13 + tmp15, FIX(1.214244803)), /* c2 */ - CONST_BITS+1); - - /* Odd part */ - - tmp10 = MULTIPLY(tmp1 + tmp4, FIX(0.481063200)); /* c9 */ - tmp14 = tmp10 + MULTIPLY(tmp1, FIX(0.680326102)); /* c3-c9 */ - tmp15 = tmp10 - MULTIPLY(tmp4, FIX(1.642452502)); /* c3+c9 */ - tmp12 = MULTIPLY(tmp0 + tmp2, FIX(0.997307603)); /* c5 */ - tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.765261039)); /* c7 */ - tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.516244403)) /* c5+c7-c1 */ - + MULTIPLY(tmp5, FIX(0.164081699)); /* c11 */ - tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.164081699)); /* -c11 */ - tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.079550144)) /* c1+c5-c11 */ - + MULTIPLY(tmp5, FIX(0.765261039)); /* c7 */ - tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.645144899)) /* c1+c11-c7 */ - - MULTIPLY(tmp5, FIX(0.997307603)); /* c5 */ - tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.161389302)) /* c3 */ - - MULTIPLY(tmp2 + tmp5, FIX(0.481063200)); /* c9 */ - - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+1); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+1); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+1); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+1); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 13x13 sample block. - */ - -GLOBAL(void) -jpeg_fdct_13x13 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; - INT32 z1, z2; - DCTELEM workspace[8*5]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT. - * cK represents sqrt(2) * cos(K*pi/26). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[12]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[11]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[10]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[9]); - tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[8]); - tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[7]); - tmp6 = GETJSAMPLE(elemptr[6]); - - tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[12]); - tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[11]); - tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[10]); - tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[9]); - tmp14 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[8]); - tmp15 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[7]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - (tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5 + tmp6 - 13 * CENTERJSAMPLE); - tmp6 += tmp6; - tmp0 -= tmp6; - tmp1 -= tmp6; - tmp2 -= tmp6; - tmp3 -= tmp6; - tmp4 -= tmp6; - tmp5 -= tmp6; - dataptr[2] = (DCTELEM) - DESCALE(MULTIPLY(tmp0, FIX(1.373119086)) + /* c2 */ - MULTIPLY(tmp1, FIX(1.058554052)) + /* c6 */ - MULTIPLY(tmp2, FIX(0.501487041)) - /* c10 */ - MULTIPLY(tmp3, FIX(0.170464608)) - /* c12 */ - MULTIPLY(tmp4, FIX(0.803364869)) - /* c8 */ - MULTIPLY(tmp5, FIX(1.252223920)), /* c4 */ - CONST_BITS); - z1 = MULTIPLY(tmp0 - tmp2, FIX(1.155388986)) - /* (c4+c6)/2 */ - MULTIPLY(tmp3 - tmp4, FIX(0.435816023)) - /* (c2-c10)/2 */ - MULTIPLY(tmp1 - tmp5, FIX(0.316450131)); /* (c8-c12)/2 */ - z2 = MULTIPLY(tmp0 + tmp2, FIX(0.096834934)) - /* (c4-c6)/2 */ - MULTIPLY(tmp3 + tmp4, FIX(0.937303064)) + /* (c2+c10)/2 */ - MULTIPLY(tmp1 + tmp5, FIX(0.486914739)); /* (c8+c12)/2 */ - - dataptr[4] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS); - dataptr[6] = (DCTELEM) DESCALE(z1 - z2, CONST_BITS); - - /* Odd part */ - - tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.322312651)); /* c3 */ - tmp2 = MULTIPLY(tmp10 + tmp12, FIX(1.163874945)); /* c5 */ - tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.937797057)) + /* c7 */ - MULTIPLY(tmp14 + tmp15, FIX(0.338443458)); /* c11 */ - tmp0 = tmp1 + tmp2 + tmp3 - - MULTIPLY(tmp10, FIX(2.020082300)) + /* c3+c5+c7-c1 */ - MULTIPLY(tmp14, FIX(0.318774355)); /* c9-c11 */ - tmp4 = MULTIPLY(tmp14 - tmp15, FIX(0.937797057)) - /* c7 */ - MULTIPLY(tmp11 + tmp12, FIX(0.338443458)); /* c11 */ - tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(1.163874945)); /* -c5 */ - tmp1 += tmp4 + tmp5 + - MULTIPLY(tmp11, FIX(0.837223564)) - /* c5+c9+c11-c3 */ - MULTIPLY(tmp14, FIX(2.341699410)); /* c1+c7 */ - tmp6 = MULTIPLY(tmp12 + tmp13, - FIX(0.657217813)); /* -c9 */ - tmp2 += tmp4 + tmp6 - - MULTIPLY(tmp12, FIX(1.572116027)) + /* c1+c5-c9-c11 */ - MULTIPLY(tmp15, FIX(2.260109708)); /* c3+c7 */ - tmp3 += tmp5 + tmp6 + - MULTIPLY(tmp13, FIX(2.205608352)) - /* c3+c5+c9-c7 */ - MULTIPLY(tmp15, FIX(1.742345811)); /* c1+c11 */ - - dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS); - dataptr[7] = (DCTELEM) DESCALE(tmp3, CONST_BITS); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == 13) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/13)**2 = 64/169, which we partially - * fold into the constant multipliers and final shifting: - * cK now represents sqrt(2) * cos(K*pi/26) * 128/169. - */ - - dataptr = data; - wsptr = workspace; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*4]; - tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*3]; - tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*2]; - tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*1]; - tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*0]; - tmp5 = dataptr[DCTSIZE*5] + dataptr[DCTSIZE*7]; - tmp6 = dataptr[DCTSIZE*6]; - - tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*4]; - tmp11 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*3]; - tmp12 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*2]; - tmp13 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*1]; - tmp14 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*0]; - tmp15 = dataptr[DCTSIZE*5] - dataptr[DCTSIZE*7]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5 + tmp6, - FIX(0.757396450)), /* 128/169 */ - CONST_BITS+1); - tmp6 += tmp6; - tmp0 -= tmp6; - tmp1 -= tmp6; - tmp2 -= tmp6; - tmp3 -= tmp6; - tmp4 -= tmp6; - tmp5 -= tmp6; - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(MULTIPLY(tmp0, FIX(1.039995521)) + /* c2 */ - MULTIPLY(tmp1, FIX(0.801745081)) + /* c6 */ - MULTIPLY(tmp2, FIX(0.379824504)) - /* c10 */ - MULTIPLY(tmp3, FIX(0.129109289)) - /* c12 */ - MULTIPLY(tmp4, FIX(0.608465700)) - /* c8 */ - MULTIPLY(tmp5, FIX(0.948429952)), /* c4 */ - CONST_BITS+1); - z1 = MULTIPLY(tmp0 - tmp2, FIX(0.875087516)) - /* (c4+c6)/2 */ - MULTIPLY(tmp3 - tmp4, FIX(0.330085509)) - /* (c2-c10)/2 */ - MULTIPLY(tmp1 - tmp5, FIX(0.239678205)); /* (c8-c12)/2 */ - z2 = MULTIPLY(tmp0 + tmp2, FIX(0.073342435)) - /* (c4-c6)/2 */ - MULTIPLY(tmp3 + tmp4, FIX(0.709910013)) + /* (c2+c10)/2 */ - MULTIPLY(tmp1 + tmp5, FIX(0.368787494)); /* (c8+c12)/2 */ - - dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS+1); - dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 - z2, CONST_BITS+1); - - /* Odd part */ - - tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.001514908)); /* c3 */ - tmp2 = MULTIPLY(tmp10 + tmp12, FIX(0.881514751)); /* c5 */ - tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.710284161)) + /* c7 */ - MULTIPLY(tmp14 + tmp15, FIX(0.256335874)); /* c11 */ - tmp0 = tmp1 + tmp2 + tmp3 - - MULTIPLY(tmp10, FIX(1.530003162)) + /* c3+c5+c7-c1 */ - MULTIPLY(tmp14, FIX(0.241438564)); /* c9-c11 */ - tmp4 = MULTIPLY(tmp14 - tmp15, FIX(0.710284161)) - /* c7 */ - MULTIPLY(tmp11 + tmp12, FIX(0.256335874)); /* c11 */ - tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(0.881514751)); /* -c5 */ - tmp1 += tmp4 + tmp5 + - MULTIPLY(tmp11, FIX(0.634110155)) - /* c5+c9+c11-c3 */ - MULTIPLY(tmp14, FIX(1.773594819)); /* c1+c7 */ - tmp6 = MULTIPLY(tmp12 + tmp13, - FIX(0.497774438)); /* -c9 */ - tmp2 += tmp4 + tmp6 - - MULTIPLY(tmp12, FIX(1.190715098)) + /* c1+c5-c9-c11 */ - MULTIPLY(tmp15, FIX(1.711799069)); /* c3+c7 */ - tmp3 += tmp5 + tmp6 + - MULTIPLY(tmp13, FIX(1.670519935)) - /* c3+c5+c9-c7 */ - MULTIPLY(tmp15, FIX(1.319646532)); /* c1+c11 */ - - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+1); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+1); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+1); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3, CONST_BITS+1); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 14x14 sample block. - */ - -GLOBAL(void) -jpeg_fdct_14x14 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; - DCTELEM workspace[8*6]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT. - * cK represents sqrt(2) * cos(K*pi/28). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[13]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[12]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[11]); - tmp13 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[10]); - tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[9]); - tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[8]); - tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[7]); - - tmp10 = tmp0 + tmp6; - tmp14 = tmp0 - tmp6; - tmp11 = tmp1 + tmp5; - tmp15 = tmp1 - tmp5; - tmp12 = tmp2 + tmp4; - tmp16 = tmp2 - tmp4; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[13]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[12]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[11]); - tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[10]); - tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[9]); - tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[8]); - tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[7]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - (tmp10 + tmp11 + tmp12 + tmp13 - 14 * CENTERJSAMPLE); - tmp13 += tmp13; - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.274162392)) + /* c4 */ - MULTIPLY(tmp11 - tmp13, FIX(0.314692123)) - /* c12 */ - MULTIPLY(tmp12 - tmp13, FIX(0.881747734)), /* c8 */ - CONST_BITS); - - tmp10 = MULTIPLY(tmp14 + tmp15, FIX(1.105676686)); /* c6 */ - - dataptr[2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.273079590)) /* c2-c6 */ - + MULTIPLY(tmp16, FIX(0.613604268)), /* c10 */ - CONST_BITS); - dataptr[6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.719280954)) /* c6+c10 */ - - MULTIPLY(tmp16, FIX(1.378756276)), /* c2 */ - CONST_BITS); - - /* Odd part */ - - tmp10 = tmp1 + tmp2; - tmp11 = tmp5 - tmp4; - dataptr[7] = (DCTELEM) (tmp0 - tmp10 + tmp3 - tmp11 - tmp6); - tmp3 <<= CONST_BITS; - tmp10 = MULTIPLY(tmp10, - FIX(0.158341681)); /* -c13 */ - tmp11 = MULTIPLY(tmp11, FIX(1.405321284)); /* c1 */ - tmp10 += tmp11 - tmp3; - tmp11 = MULTIPLY(tmp0 + tmp2, FIX(1.197448846)) + /* c5 */ - MULTIPLY(tmp4 + tmp6, FIX(0.752406978)); /* c9 */ - dataptr[5] = (DCTELEM) - DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(2.373959773)) /* c3+c5-c13 */ - + MULTIPLY(tmp4, FIX(1.119999435)), /* c1+c11-c9 */ - CONST_BITS); - tmp12 = MULTIPLY(tmp0 + tmp1, FIX(1.334852607)) + /* c3 */ - MULTIPLY(tmp5 - tmp6, FIX(0.467085129)); /* c11 */ - dataptr[3] = (DCTELEM) - DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.424103948)) /* c3-c9-c13 */ - - MULTIPLY(tmp5, FIX(3.069855259)), /* c1+c5+c11 */ - CONST_BITS); - dataptr[1] = (DCTELEM) - DESCALE(tmp11 + tmp12 + tmp3 + tmp6 - - MULTIPLY(tmp0 + tmp6, FIX(1.126980169)), /* c3+c5-c1 */ - CONST_BITS); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == 14) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/14)**2 = 16/49, which we partially - * fold into the constant multipliers and final shifting: - * cK now represents sqrt(2) * cos(K*pi/28) * 32/49. - */ - - dataptr = data; - wsptr = workspace; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*5]; - tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*4]; - tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*3]; - tmp13 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*2]; - tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*1]; - tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*0]; - tmp6 = dataptr[DCTSIZE*6] + dataptr[DCTSIZE*7]; - - tmp10 = tmp0 + tmp6; - tmp14 = tmp0 - tmp6; - tmp11 = tmp1 + tmp5; - tmp15 = tmp1 - tmp5; - tmp12 = tmp2 + tmp4; - tmp16 = tmp2 - tmp4; - - tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*5]; - tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*4]; - tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*3]; - tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*2]; - tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*1]; - tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*0]; - tmp6 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12 + tmp13, - FIX(0.653061224)), /* 32/49 */ - CONST_BITS+1); - tmp13 += tmp13; - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp13, FIX(0.832106052)) + /* c4 */ - MULTIPLY(tmp11 - tmp13, FIX(0.205513223)) - /* c12 */ - MULTIPLY(tmp12 - tmp13, FIX(0.575835255)), /* c8 */ - CONST_BITS+1); - - tmp10 = MULTIPLY(tmp14 + tmp15, FIX(0.722074570)); /* c6 */ - - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.178337691)) /* c2-c6 */ - + MULTIPLY(tmp16, FIX(0.400721155)), /* c10 */ - CONST_BITS+1); - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.122795725)) /* c6+c10 */ - - MULTIPLY(tmp16, FIX(0.900412262)), /* c2 */ - CONST_BITS+1); - - /* Odd part */ - - tmp10 = tmp1 + tmp2; - tmp11 = tmp5 - tmp4; - dataptr[DCTSIZE*7] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 - tmp10 + tmp3 - tmp11 - tmp6, - FIX(0.653061224)), /* 32/49 */ - CONST_BITS+1); - tmp3 = MULTIPLY(tmp3 , FIX(0.653061224)); /* 32/49 */ - tmp10 = MULTIPLY(tmp10, - FIX(0.103406812)); /* -c13 */ - tmp11 = MULTIPLY(tmp11, FIX(0.917760839)); /* c1 */ - tmp10 += tmp11 - tmp3; - tmp11 = MULTIPLY(tmp0 + tmp2, FIX(0.782007410)) + /* c5 */ - MULTIPLY(tmp4 + tmp6, FIX(0.491367823)); /* c9 */ - dataptr[DCTSIZE*5] = (DCTELEM) - DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(1.550341076)) /* c3+c5-c13 */ - + MULTIPLY(tmp4, FIX(0.731428202)), /* c1+c11-c9 */ - CONST_BITS+1); - tmp12 = MULTIPLY(tmp0 + tmp1, FIX(0.871740478)) + /* c3 */ - MULTIPLY(tmp5 - tmp6, FIX(0.305035186)); /* c11 */ - dataptr[DCTSIZE*3] = (DCTELEM) - DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.276965844)) /* c3-c9-c13 */ - - MULTIPLY(tmp5, FIX(2.004803435)), /* c1+c5+c11 */ - CONST_BITS+1); - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(tmp11 + tmp12 + tmp3 - - MULTIPLY(tmp0, FIX(0.735987049)) /* c3+c5-c1 */ - - MULTIPLY(tmp6, FIX(0.082925825)), /* c9-c11-c13 */ - CONST_BITS+1); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 15x15 sample block. - */ - -GLOBAL(void) -jpeg_fdct_15x15 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; - INT32 z1, z2, z3; - DCTELEM workspace[8*7]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT. - * cK represents sqrt(2) * cos(K*pi/30). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[14]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[13]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[12]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[11]); - tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[10]); - tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[9]); - tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[8]); - tmp7 = GETJSAMPLE(elemptr[7]); - - tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[14]); - tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[13]); - tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[12]); - tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[11]); - tmp14 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[10]); - tmp15 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[9]); - tmp16 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[8]); - - z1 = tmp0 + tmp4 + tmp5; - z2 = tmp1 + tmp3 + tmp6; - z3 = tmp2 + tmp7; - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) (z1 + z2 + z3 - 15 * CENTERJSAMPLE); - z3 += z3; - dataptr[6] = (DCTELEM) - DESCALE(MULTIPLY(z1 - z3, FIX(1.144122806)) - /* c6 */ - MULTIPLY(z2 - z3, FIX(0.437016024)), /* c12 */ - CONST_BITS); - tmp2 += ((tmp1 + tmp4) >> 1) - tmp7 - tmp7; - z1 = MULTIPLY(tmp3 - tmp2, FIX(1.531135173)) - /* c2+c14 */ - MULTIPLY(tmp6 - tmp2, FIX(2.238241955)); /* c4+c8 */ - z2 = MULTIPLY(tmp5 - tmp2, FIX(0.798468008)) - /* c8-c14 */ - MULTIPLY(tmp0 - tmp2, FIX(0.091361227)); /* c2-c4 */ - z3 = MULTIPLY(tmp0 - tmp3, FIX(1.383309603)) + /* c2 */ - MULTIPLY(tmp6 - tmp5, FIX(0.946293579)) + /* c8 */ - MULTIPLY(tmp1 - tmp4, FIX(0.790569415)); /* (c6+c12)/2 */ - - dataptr[2] = (DCTELEM) DESCALE(z1 + z3, CONST_BITS); - dataptr[4] = (DCTELEM) DESCALE(z2 + z3, CONST_BITS); - - /* Odd part */ - - tmp2 = MULTIPLY(tmp10 - tmp12 - tmp13 + tmp15 + tmp16, - FIX(1.224744871)); /* c5 */ - tmp1 = MULTIPLY(tmp10 - tmp14 - tmp15, FIX(1.344997024)) + /* c3 */ - MULTIPLY(tmp11 - tmp13 - tmp16, FIX(0.831253876)); /* c9 */ - tmp12 = MULTIPLY(tmp12, FIX(1.224744871)); /* c5 */ - tmp4 = MULTIPLY(tmp10 - tmp16, FIX(1.406466353)) + /* c1 */ - MULTIPLY(tmp11 + tmp14, FIX(1.344997024)) + /* c3 */ - MULTIPLY(tmp13 + tmp15, FIX(0.575212477)); /* c11 */ - tmp0 = MULTIPLY(tmp13, FIX(0.475753014)) - /* c7-c11 */ - MULTIPLY(tmp14, FIX(0.513743148)) + /* c3-c9 */ - MULTIPLY(tmp16, FIX(1.700497885)) + tmp4 + tmp12; /* c1+c13 */ - tmp3 = MULTIPLY(tmp10, - FIX(0.355500862)) - /* -(c1-c7) */ - MULTIPLY(tmp11, FIX(2.176250899)) - /* c3+c9 */ - MULTIPLY(tmp15, FIX(0.869244010)) + tmp4 - tmp12; /* c11+c13 */ - - dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS); - dataptr[7] = (DCTELEM) DESCALE(tmp3, CONST_BITS); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == 15) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/15)**2 = 64/225, which we partially - * fold into the constant multipliers and final shifting: - * cK now represents sqrt(2) * cos(K*pi/30) * 256/225. - */ - - dataptr = data; - wsptr = workspace; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*6]; - tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*5]; - tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*4]; - tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*3]; - tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*2]; - tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*1]; - tmp6 = dataptr[DCTSIZE*6] + wsptr[DCTSIZE*0]; - tmp7 = dataptr[DCTSIZE*7]; - - tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*6]; - tmp11 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*5]; - tmp12 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*4]; - tmp13 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*3]; - tmp14 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*2]; - tmp15 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*1]; - tmp16 = dataptr[DCTSIZE*6] - wsptr[DCTSIZE*0]; - - z1 = tmp0 + tmp4 + tmp5; - z2 = tmp1 + tmp3 + tmp6; - z3 = tmp2 + tmp7; - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(z1 + z2 + z3, FIX(1.137777778)), /* 256/225 */ - CONST_BITS+2); - z3 += z3; - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(MULTIPLY(z1 - z3, FIX(1.301757503)) - /* c6 */ - MULTIPLY(z2 - z3, FIX(0.497227121)), /* c12 */ - CONST_BITS+2); - tmp2 += ((tmp1 + tmp4) >> 1) - tmp7 - tmp7; - z1 = MULTIPLY(tmp3 - tmp2, FIX(1.742091575)) - /* c2+c14 */ - MULTIPLY(tmp6 - tmp2, FIX(2.546621957)); /* c4+c8 */ - z2 = MULTIPLY(tmp5 - tmp2, FIX(0.908479156)) - /* c8-c14 */ - MULTIPLY(tmp0 - tmp2, FIX(0.103948774)); /* c2-c4 */ - z3 = MULTIPLY(tmp0 - tmp3, FIX(1.573898926)) + /* c2 */ - MULTIPLY(tmp6 - tmp5, FIX(1.076671805)) + /* c8 */ - MULTIPLY(tmp1 - tmp4, FIX(0.899492312)); /* (c6+c12)/2 */ - - dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + z3, CONST_BITS+2); - dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(z2 + z3, CONST_BITS+2); - - /* Odd part */ - - tmp2 = MULTIPLY(tmp10 - tmp12 - tmp13 + tmp15 + tmp16, - FIX(1.393487498)); /* c5 */ - tmp1 = MULTIPLY(tmp10 - tmp14 - tmp15, FIX(1.530307725)) + /* c3 */ - MULTIPLY(tmp11 - tmp13 - tmp16, FIX(0.945782187)); /* c9 */ - tmp12 = MULTIPLY(tmp12, FIX(1.393487498)); /* c5 */ - tmp4 = MULTIPLY(tmp10 - tmp16, FIX(1.600246161)) + /* c1 */ - MULTIPLY(tmp11 + tmp14, FIX(1.530307725)) + /* c3 */ - MULTIPLY(tmp13 + tmp15, FIX(0.654463974)); /* c11 */ - tmp0 = MULTIPLY(tmp13, FIX(0.541301207)) - /* c7-c11 */ - MULTIPLY(tmp14, FIX(0.584525538)) + /* c3-c9 */ - MULTIPLY(tmp16, FIX(1.934788705)) + tmp4 + tmp12; /* c1+c13 */ - tmp3 = MULTIPLY(tmp10, - FIX(0.404480980)) - /* -(c1-c7) */ - MULTIPLY(tmp11, FIX(2.476089912)) - /* c3+c9 */ - MULTIPLY(tmp15, FIX(0.989006518)) + tmp4 - tmp12; /* c11+c13 */ - - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+2); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+2); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+2); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3, CONST_BITS+2); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 16x16 sample block. - */ - -GLOBAL(void) -jpeg_fdct_16x16 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16, tmp17; - DCTELEM workspace[DCTSIZE2]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * cK represents sqrt(2) * cos(K*pi/32). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[15]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[14]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[13]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[12]); - tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[11]); - tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[10]); - tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[9]); - tmp7 = GETJSAMPLE(elemptr[7]) + GETJSAMPLE(elemptr[8]); - - tmp10 = tmp0 + tmp7; - tmp14 = tmp0 - tmp7; - tmp11 = tmp1 + tmp6; - tmp15 = tmp1 - tmp6; - tmp12 = tmp2 + tmp5; - tmp16 = tmp2 - tmp5; - tmp13 = tmp3 + tmp4; - tmp17 = tmp3 - tmp4; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[15]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[14]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[13]); - tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[12]); - tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[11]); - tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[10]); - tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[9]); - tmp7 = GETJSAMPLE(elemptr[7]) - GETJSAMPLE(elemptr[8]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp11 + tmp12 + tmp13 - 16 * CENTERJSAMPLE) << PASS1_BITS); - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */ - MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */ - CONST_BITS-PASS1_BITS); - - tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */ - MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */ - - dataptr[2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */ - + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+c10 */ - CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */ - - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */ - CONST_BITS-PASS1_BITS); - - /* Odd part */ - - tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */ - MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */ - tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */ - MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */ - tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */ - MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */ - tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */ - MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */ - tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */ - MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */ - tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */ - MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */ - tmp10 = tmp11 + tmp12 + tmp13 - - MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */ - MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */ - tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */ - - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */ - tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */ - + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */ - tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */ - + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */ - - dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS-PASS1_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS-PASS1_BITS); - dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS-PASS1_BITS); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == DCTSIZE * 2) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/16)**2 = 1/2**2. - * cK represents sqrt(2) * cos(K*pi/32). - */ - - dataptr = data; - wsptr = workspace; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*4]; - tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*3]; - tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*2]; - tmp6 = dataptr[DCTSIZE*6] + wsptr[DCTSIZE*1]; - tmp7 = dataptr[DCTSIZE*7] + wsptr[DCTSIZE*0]; - - tmp10 = tmp0 + tmp7; - tmp14 = tmp0 - tmp7; - tmp11 = tmp1 + tmp6; - tmp15 = tmp1 - tmp6; - tmp12 = tmp2 + tmp5; - tmp16 = tmp2 - tmp5; - tmp13 = tmp3 + tmp4; - tmp17 = tmp3 - tmp4; - - tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*4]; - tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*3]; - tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*2]; - tmp6 = dataptr[DCTSIZE*6] - wsptr[DCTSIZE*1]; - tmp7 = dataptr[DCTSIZE*7] - wsptr[DCTSIZE*0]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(tmp10 + tmp11 + tmp12 + tmp13, PASS1_BITS+2); - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */ - MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */ - CONST_BITS+PASS1_BITS+2); - - tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */ - MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */ - - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */ - + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+10 */ - CONST_BITS+PASS1_BITS+2); - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */ - - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */ - CONST_BITS+PASS1_BITS+2); - - /* Odd part */ - - tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */ - MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */ - tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */ - MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */ - tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */ - MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */ - tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */ - MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */ - tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */ - MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */ - tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */ - MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */ - tmp10 = tmp11 + tmp12 + tmp13 - - MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */ - MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */ - tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */ - - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */ - tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */ - + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */ - tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */ - + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */ - - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+PASS1_BITS+2); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+PASS1_BITS+2); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+PASS1_BITS+2); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+PASS1_BITS+2); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 16x8 sample block. - * - * 16-point FDCT in pass 1 (rows), 8-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_16x8 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16, tmp17; - INT32 z1; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * 16-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/32). - */ - - dataptr = data; - ctr = 0; - for (ctr = 0; ctr < DCTSIZE; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[15]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[14]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[13]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[12]); - tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[11]); - tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[10]); - tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[9]); - tmp7 = GETJSAMPLE(elemptr[7]) + GETJSAMPLE(elemptr[8]); - - tmp10 = tmp0 + tmp7; - tmp14 = tmp0 - tmp7; - tmp11 = tmp1 + tmp6; - tmp15 = tmp1 - tmp6; - tmp12 = tmp2 + tmp5; - tmp16 = tmp2 - tmp5; - tmp13 = tmp3 + tmp4; - tmp17 = tmp3 - tmp4; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[15]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[14]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[13]); - tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[12]); - tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[11]); - tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[10]); - tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[9]); - tmp7 = GETJSAMPLE(elemptr[7]) - GETJSAMPLE(elemptr[8]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp11 + tmp12 + tmp13 - 16 * CENTERJSAMPLE) << PASS1_BITS); - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */ - MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */ - CONST_BITS-PASS1_BITS); - - tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */ - MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */ - - dataptr[2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */ - + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+c10 */ - CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */ - - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */ - CONST_BITS-PASS1_BITS); - - /* Odd part */ - - tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */ - MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */ - tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */ - MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */ - tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */ - MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */ - tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */ - MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */ - tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */ - MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */ - tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */ - MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */ - tmp10 = tmp11 + tmp12 + tmp13 - - MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */ - MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */ - tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */ - - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */ - tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */ - + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */ - tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */ - + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */ - - dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS-PASS1_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS-PASS1_BITS); - dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS-PASS1_BITS); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by 8/16 = 1/2. - * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16). - */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part per LL&M figure 1 --- note that published figure is faulty; - * rotator "c1" should be "c6". - */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; - - tmp10 = tmp0 + tmp3; - tmp12 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp13 = tmp1 - tmp2; - - tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; - - dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS+1); - dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS+1); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ - CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ - CONST_BITS+PASS1_BITS+1); - - /* Odd part per figure 8 --- note paper omits factor of sqrt(2). - * i0..i3 in the paper are tmp0..tmp3 here. - */ - - tmp12 = tmp0 + tmp2; - tmp13 = tmp1 + tmp3; - - z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ - tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ - tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ - tmp12 += z1; - tmp13 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp0 += z1 + tmp12; - tmp3 += z1 + tmp13; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp1 += z1 + tmp13; - tmp2 += z1 + tmp12; - - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3, CONST_BITS+PASS1_BITS+1); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 14x7 sample block. - * - * 14-point FDCT in pass 1 (rows), 7-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_14x7 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; - INT32 z1, z2, z3; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Zero bottom row of output coefficient block. */ - MEMZERO(&data[DCTSIZE*7], SIZEOF(DCTELEM) * DCTSIZE); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * 14-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/28). - */ - - dataptr = data; - for (ctr = 0; ctr < 7; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[13]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[12]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[11]); - tmp13 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[10]); - tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[9]); - tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[8]); - tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[7]); - - tmp10 = tmp0 + tmp6; - tmp14 = tmp0 - tmp6; - tmp11 = tmp1 + tmp5; - tmp15 = tmp1 - tmp5; - tmp12 = tmp2 + tmp4; - tmp16 = tmp2 - tmp4; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[13]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[12]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[11]); - tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[10]); - tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[9]); - tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[8]); - tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[7]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp11 + tmp12 + tmp13 - 14 * CENTERJSAMPLE) << PASS1_BITS); - tmp13 += tmp13; - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.274162392)) + /* c4 */ - MULTIPLY(tmp11 - tmp13, FIX(0.314692123)) - /* c12 */ - MULTIPLY(tmp12 - tmp13, FIX(0.881747734)), /* c8 */ - CONST_BITS-PASS1_BITS); - - tmp10 = MULTIPLY(tmp14 + tmp15, FIX(1.105676686)); /* c6 */ - - dataptr[2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.273079590)) /* c2-c6 */ - + MULTIPLY(tmp16, FIX(0.613604268)), /* c10 */ - CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.719280954)) /* c6+c10 */ - - MULTIPLY(tmp16, FIX(1.378756276)), /* c2 */ - CONST_BITS-PASS1_BITS); - - /* Odd part */ - - tmp10 = tmp1 + tmp2; - tmp11 = tmp5 - tmp4; - dataptr[7] = (DCTELEM) ((tmp0 - tmp10 + tmp3 - tmp11 - tmp6) << PASS1_BITS); - tmp3 <<= CONST_BITS; - tmp10 = MULTIPLY(tmp10, - FIX(0.158341681)); /* -c13 */ - tmp11 = MULTIPLY(tmp11, FIX(1.405321284)); /* c1 */ - tmp10 += tmp11 - tmp3; - tmp11 = MULTIPLY(tmp0 + tmp2, FIX(1.197448846)) + /* c5 */ - MULTIPLY(tmp4 + tmp6, FIX(0.752406978)); /* c9 */ - dataptr[5] = (DCTELEM) - DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(2.373959773)) /* c3+c5-c13 */ - + MULTIPLY(tmp4, FIX(1.119999435)), /* c1+c11-c9 */ - CONST_BITS-PASS1_BITS); - tmp12 = MULTIPLY(tmp0 + tmp1, FIX(1.334852607)) + /* c3 */ - MULTIPLY(tmp5 - tmp6, FIX(0.467085129)); /* c11 */ - dataptr[3] = (DCTELEM) - DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.424103948)) /* c3-c9-c13 */ - - MULTIPLY(tmp5, FIX(3.069855259)), /* c1+c5+c11 */ - CONST_BITS-PASS1_BITS); - dataptr[1] = (DCTELEM) - DESCALE(tmp11 + tmp12 + tmp3 + tmp6 - - MULTIPLY(tmp0 + tmp6, FIX(1.126980169)), /* c3+c5-c1 */ - CONST_BITS-PASS1_BITS); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/14)*(8/7) = 32/49, which we - * partially fold into the constant multipliers and final shifting: - * 7-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/14) * 64/49. - */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*6]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*5]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*4]; - tmp3 = dataptr[DCTSIZE*3]; - - tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*6]; - tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*5]; - tmp12 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*4]; - - z1 = tmp0 + tmp2; - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(z1 + tmp1 + tmp3, FIX(1.306122449)), /* 64/49 */ - CONST_BITS+PASS1_BITS+1); - tmp3 += tmp3; - z1 -= tmp3; - z1 -= tmp3; - z1 = MULTIPLY(z1, FIX(0.461784020)); /* (c2+c6-c4)/2 */ - z2 = MULTIPLY(tmp0 - tmp2, FIX(1.202428084)); /* (c2+c4-c6)/2 */ - z3 = MULTIPLY(tmp1 - tmp2, FIX(0.411026446)); /* c6 */ - dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS+PASS1_BITS+1); - z1 -= z2; - z2 = MULTIPLY(tmp0 - tmp1, FIX(1.151670509)); /* c4 */ - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.923568041)), /* c2+c6-c4 */ - CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS+PASS1_BITS+1); - - /* Odd part */ - - tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.221765677)); /* (c3+c1-c5)/2 */ - tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.222383464)); /* (c3+c5-c1)/2 */ - tmp0 = tmp1 - tmp2; - tmp1 += tmp2; - tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.800824523)); /* -c1 */ - tmp1 += tmp2; - tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.801442310)); /* c5 */ - tmp0 += tmp3; - tmp2 += tmp3 + MULTIPLY(tmp12, FIX(2.443531355)); /* c3+c1-c5 */ - - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+PASS1_BITS+1); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 12x6 sample block. - * - * 12-point FDCT in pass 1 (rows), 6-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_12x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Zero 2 bottom rows of output coefficient block. */ - MEMZERO(&data[DCTSIZE*6], SIZEOF(DCTELEM) * DCTSIZE * 2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * 12-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/24). - */ - - dataptr = data; - for (ctr = 0; ctr < 6; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[11]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[10]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[9]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[8]); - tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[7]); - tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[6]); - - tmp10 = tmp0 + tmp5; - tmp13 = tmp0 - tmp5; - tmp11 = tmp1 + tmp4; - tmp14 = tmp1 - tmp4; - tmp12 = tmp2 + tmp3; - tmp15 = tmp2 - tmp3; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[11]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[10]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[9]); - tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[8]); - tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[7]); - tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[6]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp11 + tmp12 - 12 * CENTERJSAMPLE) << PASS1_BITS); - dataptr[6] = (DCTELEM) ((tmp13 - tmp14 - tmp15) << PASS1_BITS); - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.224744871)), /* c4 */ - CONST_BITS-PASS1_BITS); - dataptr[2] = (DCTELEM) - DESCALE(tmp14 - tmp15 + MULTIPLY(tmp13 + tmp15, FIX(1.366025404)), /* c2 */ - CONST_BITS-PASS1_BITS); - - /* Odd part */ - - tmp10 = MULTIPLY(tmp1 + tmp4, FIX_0_541196100); /* c9 */ - tmp14 = tmp10 + MULTIPLY(tmp1, FIX_0_765366865); /* c3-c9 */ - tmp15 = tmp10 - MULTIPLY(tmp4, FIX_1_847759065); /* c3+c9 */ - tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.121971054)); /* c5 */ - tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.860918669)); /* c7 */ - tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.580774953)) /* c5+c7-c1 */ - + MULTIPLY(tmp5, FIX(0.184591911)); /* c11 */ - tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.184591911)); /* -c11 */ - tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.339493912)) /* c1+c5-c11 */ - + MULTIPLY(tmp5, FIX(0.860918669)); /* c7 */ - tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.725788011)) /* c1+c11-c7 */ - - MULTIPLY(tmp5, FIX(1.121971054)); /* c5 */ - tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.306562965)) /* c3 */ - - MULTIPLY(tmp2 + tmp5, FIX_0_541196100); /* c9 */ - - dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS-PASS1_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS-PASS1_BITS); - dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS-PASS1_BITS); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/12)*(8/6) = 8/9, which we - * partially fold into the constant multipliers and final shifting: - * 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12) * 16/9. - */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*5]; - tmp11 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*4]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3]; - - tmp10 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - - tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*5]; - tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*4]; - tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 + tmp11, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(MULTIPLY(tmp12, FIX(2.177324216)), /* c2 */ - CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(1.257078722)), /* c4 */ - CONST_BITS+PASS1_BITS+1); - - /* Odd part */ - - tmp10 = MULTIPLY(tmp0 + tmp2, FIX(0.650711829)); /* c5 */ - - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*3] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 - tmp1 - tmp2, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*5] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp2 - tmp1, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS+1); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 10x5 sample block. - * - * 10-point FDCT in pass 1 (rows), 5-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_10x5 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Zero 3 bottom rows of output coefficient block. */ - MEMZERO(&data[DCTSIZE*5], SIZEOF(DCTELEM) * DCTSIZE * 3); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * 10-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/20). - */ - - dataptr = data; - for (ctr = 0; ctr < 5; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[9]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[8]); - tmp12 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[7]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[6]); - tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[5]); - - tmp10 = tmp0 + tmp4; - tmp13 = tmp0 - tmp4; - tmp11 = tmp1 + tmp3; - tmp14 = tmp1 - tmp3; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[9]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[8]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[7]); - tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[6]); - tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[5]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp11 + tmp12 - 10 * CENTERJSAMPLE) << PASS1_BITS); - tmp12 += tmp12; - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.144122806)) - /* c4 */ - MULTIPLY(tmp11 - tmp12, FIX(0.437016024)), /* c8 */ - CONST_BITS-PASS1_BITS); - tmp10 = MULTIPLY(tmp13 + tmp14, FIX(0.831253876)); /* c6 */ - dataptr[2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.513743148)), /* c2-c6 */ - CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.176250899)), /* c2+c6 */ - CONST_BITS-PASS1_BITS); - - /* Odd part */ - - tmp10 = tmp0 + tmp4; - tmp11 = tmp1 - tmp3; - dataptr[5] = (DCTELEM) ((tmp10 - tmp11 - tmp2) << PASS1_BITS); - tmp2 <<= CONST_BITS; - dataptr[1] = (DCTELEM) - DESCALE(MULTIPLY(tmp0, FIX(1.396802247)) + /* c1 */ - MULTIPLY(tmp1, FIX(1.260073511)) + tmp2 + /* c3 */ - MULTIPLY(tmp3, FIX(0.642039522)) + /* c7 */ - MULTIPLY(tmp4, FIX(0.221231742)), /* c9 */ - CONST_BITS-PASS1_BITS); - tmp12 = MULTIPLY(tmp0 - tmp4, FIX(0.951056516)) - /* (c3+c7)/2 */ - MULTIPLY(tmp1 + tmp3, FIX(0.587785252)); /* (c1-c9)/2 */ - tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.309016994)) + /* (c3-c7)/2 */ - (tmp11 << (CONST_BITS - 1)) - tmp2; - dataptr[3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS-PASS1_BITS); - dataptr[7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS-PASS1_BITS); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/10)*(8/5) = 32/25, which we - * fold into the constant multipliers: - * 5-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/10) * 32/25. - */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*4]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*3]; - tmp2 = dataptr[DCTSIZE*2]; - - tmp10 = tmp0 + tmp1; - tmp11 = tmp0 - tmp1; - - tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*4]; - tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*3]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 + tmp2, FIX(1.28)), /* 32/25 */ - CONST_BITS+PASS1_BITS); - tmp11 = MULTIPLY(tmp11, FIX(1.011928851)); /* (c2+c4)/2 */ - tmp10 -= tmp2 << 2; - tmp10 = MULTIPLY(tmp10, FIX(0.452548340)); /* (c2-c4)/2 */ - dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS+PASS1_BITS); - - /* Odd part */ - - tmp10 = MULTIPLY(tmp0 + tmp1, FIX(1.064004961)); /* c3 */ - - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.657591230)), /* c1-c3 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.785601151)), /* c1+c3 */ - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on an 8x4 sample block. - * - * 8-point FDCT in pass 1 (rows), 4-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_8x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Zero 4 bottom rows of output coefficient block. */ - MEMZERO(&data[DCTSIZE*4], SIZEOF(DCTELEM) * DCTSIZE * 4); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * We must also scale the output by 8/4 = 2, which we add here. - * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16). - */ - - dataptr = data; - for (ctr = 0; ctr < 4; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part per LL&M figure 1 --- note that published figure is faulty; - * rotator "c1" should be "c6". - */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]); - - tmp10 = tmp0 + tmp3; - tmp12 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp13 = tmp1 - tmp2; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]); - tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp11 - 8 * CENTERJSAMPLE) << (PASS1_BITS+1)); - dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << (PASS1_BITS+1)); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS-PASS1_BITS-2); - - dataptr[2] = (DCTELEM) - RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ - CONST_BITS-PASS1_BITS-1); - dataptr[6] = (DCTELEM) - RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ - CONST_BITS-PASS1_BITS-1); - - /* Odd part per figure 8 --- note paper omits factor of sqrt(2). - * i0..i3 in the paper are tmp0..tmp3 here. - */ - - tmp12 = tmp0 + tmp2; - tmp13 = tmp1 + tmp3; - - z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS-PASS1_BITS-2); - - tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ - tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ - tmp12 += z1; - tmp13 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp0 += z1 + tmp12; - tmp3 += z1 + tmp13; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp1 += z1 + tmp13; - tmp2 += z1 + tmp12; - - dataptr[1] = (DCTELEM) RIGHT_SHIFT(tmp0, CONST_BITS-PASS1_BITS-1); - dataptr[3] = (DCTELEM) RIGHT_SHIFT(tmp1, CONST_BITS-PASS1_BITS-1); - dataptr[5] = (DCTELEM) RIGHT_SHIFT(tmp2, CONST_BITS-PASS1_BITS-1); - dataptr[7] = (DCTELEM) RIGHT_SHIFT(tmp3, CONST_BITS-PASS1_BITS-1); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * 4-point FDCT kernel, - * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. - */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - /* Add fudge factor here for final descale. */ - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*3] + (ONE << (PASS1_BITS-1)); - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*2]; - - tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*3]; - tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*2]; - - dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp0 + tmp1, PASS1_BITS); - dataptr[DCTSIZE*2] = (DCTELEM) RIGHT_SHIFT(tmp0 - tmp1, PASS1_BITS); - - /* Odd part */ - - tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS+PASS1_BITS-1); - - dataptr[DCTSIZE*1] = (DCTELEM) - RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) - RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 6x3 sample block. - * - * 6-point FDCT in pass 1 (rows), 3-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_6x3 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2; - INT32 tmp10, tmp11, tmp12; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * We scale the results further by 2 as part of output adaption - * scaling for different DCT size. - * 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12). - */ - - dataptr = data; - for (ctr = 0; ctr < 3; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[5]); - tmp11 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[4]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[3]); - - tmp10 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[5]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[4]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[3]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp11 - 6 * CENTERJSAMPLE) << (PASS1_BITS+1)); - dataptr[2] = (DCTELEM) - DESCALE(MULTIPLY(tmp12, FIX(1.224744871)), /* c2 */ - CONST_BITS-PASS1_BITS-1); - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(0.707106781)), /* c4 */ - CONST_BITS-PASS1_BITS-1); - - /* Odd part */ - - tmp10 = DESCALE(MULTIPLY(tmp0 + tmp2, FIX(0.366025404)), /* c5 */ - CONST_BITS-PASS1_BITS-1); - - dataptr[1] = (DCTELEM) (tmp10 + ((tmp0 + tmp1) << (PASS1_BITS+1))); - dataptr[3] = (DCTELEM) ((tmp0 - tmp1 - tmp2) << (PASS1_BITS+1)); - dataptr[5] = (DCTELEM) (tmp10 + ((tmp2 - tmp1) << (PASS1_BITS+1))); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/6)*(8/3) = 32/9, which we partially - * fold into the constant multipliers (other part was done in pass 1): - * 3-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/6) * 16/9. - */ - - dataptr = data; - for (ctr = 0; ctr < 6; ctr++) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*2]; - tmp1 = dataptr[DCTSIZE*1]; - - tmp2 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*2]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(1.257078722)), /* c2 */ - CONST_BITS+PASS1_BITS); - - /* Odd part */ - - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(MULTIPLY(tmp2, FIX(2.177324216)), /* c1 */ - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 4x2 sample block. - * - * 4-point FDCT in pass 1 (rows), 2-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_4x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - DCTELEM tmp0, tmp2, tmp10, tmp12, tmp4, tmp5; - INT32 tmp1, tmp3, tmp11, tmp13; - INT32 z1, z2, z3; - JSAMPROW elemptr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT. - * 4-point FDCT kernel, - * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. - */ - - /* Row 0 */ - elemptr = sample_data[0] + start_col; - - /* Even part */ - - tmp4 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[3]); - tmp5 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[2]); - - tmp0 = tmp4 + tmp5; - tmp2 = tmp4 - tmp5; - - /* Odd part */ - - z2 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[3]); - z3 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[2]); - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS-3-1); - tmp1 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - /* Row 1 */ - elemptr = sample_data[1] + start_col; - - /* Even part */ - - tmp4 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[3]); - tmp5 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[2]); - - tmp10 = tmp4 + tmp5; - tmp12 = tmp4 - tmp5; - - /* Odd part */ - - z2 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[3]); - z3 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[2]); - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - tmp11 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp13 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - /* Pass 2: process columns. - * We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/4)*(8/2) = 2**3. - */ - - /* Column 0 */ - /* Apply unsigned->signed conversion. */ - data[DCTSIZE*0] = (tmp0 + tmp10 - 8 * CENTERJSAMPLE) << 3; - data[DCTSIZE*1] = (tmp0 - tmp10) << 3; - - /* Column 1 */ - data[DCTSIZE*0+1] = (DCTELEM) RIGHT_SHIFT(tmp1 + tmp11, CONST_BITS-3); - data[DCTSIZE*1+1] = (DCTELEM) RIGHT_SHIFT(tmp1 - tmp11, CONST_BITS-3); - - /* Column 2 */ - data[DCTSIZE*0+2] = (tmp2 + tmp12) << 3; - data[DCTSIZE*1+2] = (tmp2 - tmp12) << 3; - - /* Column 3 */ - data[DCTSIZE*0+3] = (DCTELEM) RIGHT_SHIFT(tmp3 + tmp13, CONST_BITS-3); - data[DCTSIZE*1+3] = (DCTELEM) RIGHT_SHIFT(tmp3 - tmp13, CONST_BITS-3); -} - - -/* - * Perform the forward DCT on a 2x1 sample block. - * - * 2-point FDCT in pass 1 (rows), 1-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_2x1 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - DCTELEM tmp0, tmp1; - JSAMPROW elemptr; - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - elemptr = sample_data[0] + start_col; - - tmp0 = GETJSAMPLE(elemptr[0]); - tmp1 = GETJSAMPLE(elemptr[1]); - - /* We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/2)*(8/1) = 2**5. - */ - - /* Even part */ - - /* Apply unsigned->signed conversion. */ - data[0] = (tmp0 + tmp1 - 2 * CENTERJSAMPLE) << 5; - - /* Odd part */ - - data[1] = (tmp0 - tmp1) << 5; -} - - -/* - * Perform the forward DCT on an 8x16 sample block. - * - * 8-point FDCT in pass 1 (rows), 16-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_8x16 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16, tmp17; - INT32 z1; - DCTELEM workspace[DCTSIZE2]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part per LL&M figure 1 --- note that published figure is faulty; - * rotator "c1" should be "c6". - */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]); - tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]); - - tmp10 = tmp0 + tmp3; - tmp12 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp13 = tmp1 - tmp2; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]); - tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) ((tmp10 + tmp11 - 8 * CENTERJSAMPLE) << PASS1_BITS); - dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ - dataptr[2] = (DCTELEM) - DESCALE(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ - CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) - DESCALE(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ - CONST_BITS-PASS1_BITS); - - /* Odd part per figure 8 --- note paper omits factor of sqrt(2). - * i0..i3 in the paper are tmp0..tmp3 here. - */ - - tmp12 = tmp0 + tmp2; - tmp13 = tmp1 + tmp3; - - z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ - tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ - tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ - tmp12 += z1; - tmp13 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp0 += z1 + tmp12; - tmp3 += z1 + tmp13; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp1 += z1 + tmp13; - tmp2 += z1 + tmp12; - - dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS-PASS1_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS-PASS1_BITS); - dataptr[7] = (DCTELEM) DESCALE(tmp3, CONST_BITS-PASS1_BITS); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == DCTSIZE * 2) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by 8/16 = 1/2. - * 16-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/32). - */ - - dataptr = data; - wsptr = workspace; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*4]; - tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*3]; - tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*2]; - tmp6 = dataptr[DCTSIZE*6] + wsptr[DCTSIZE*1]; - tmp7 = dataptr[DCTSIZE*7] + wsptr[DCTSIZE*0]; - - tmp10 = tmp0 + tmp7; - tmp14 = tmp0 - tmp7; - tmp11 = tmp1 + tmp6; - tmp15 = tmp1 - tmp6; - tmp12 = tmp2 + tmp5; - tmp16 = tmp2 - tmp5; - tmp13 = tmp3 + tmp4; - tmp17 = tmp3 - tmp4; - - tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*4]; - tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*3]; - tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*2]; - tmp6 = dataptr[DCTSIZE*6] - wsptr[DCTSIZE*1]; - tmp7 = dataptr[DCTSIZE*7] - wsptr[DCTSIZE*0]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(tmp10 + tmp11 + tmp12 + tmp13, PASS1_BITS+1); - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */ - MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */ - CONST_BITS+PASS1_BITS+1); - - tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */ - MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */ - - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */ - + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+c10 */ - CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */ - - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */ - CONST_BITS+PASS1_BITS+1); - - /* Odd part */ - - tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */ - MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */ - tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */ - MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */ - tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */ - MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */ - tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */ - MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */ - tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */ - MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */ - tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */ - MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */ - tmp10 = tmp11 + tmp12 + tmp13 - - MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */ - MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */ - tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */ - - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */ - tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */ - + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */ - tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */ - + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */ - - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+PASS1_BITS+1); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+PASS1_BITS+1); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 7x14 sample block. - * - * 7-point FDCT in pass 1 (rows), 14-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_7x14 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; - INT32 z1, z2, z3; - DCTELEM workspace[8*6]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * 7-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/14). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[6]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[5]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[4]); - tmp3 = GETJSAMPLE(elemptr[3]); - - tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[6]); - tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[5]); - tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[4]); - - z1 = tmp0 + tmp2; - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((z1 + tmp1 + tmp3 - 7 * CENTERJSAMPLE) << PASS1_BITS); - tmp3 += tmp3; - z1 -= tmp3; - z1 -= tmp3; - z1 = MULTIPLY(z1, FIX(0.353553391)); /* (c2+c6-c4)/2 */ - z2 = MULTIPLY(tmp0 - tmp2, FIX(0.920609002)); /* (c2+c4-c6)/2 */ - z3 = MULTIPLY(tmp1 - tmp2, FIX(0.314692123)); /* c6 */ - dataptr[2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS-PASS1_BITS); - z1 -= z2; - z2 = MULTIPLY(tmp0 - tmp1, FIX(0.881747734)); /* c4 */ - dataptr[4] = (DCTELEM) - DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.707106781)), /* c2+c6-c4 */ - CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS-PASS1_BITS); - - /* Odd part */ - - tmp1 = MULTIPLY(tmp10 + tmp11, FIX(0.935414347)); /* (c3+c1-c5)/2 */ - tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.170262339)); /* (c3+c5-c1)/2 */ - tmp0 = tmp1 - tmp2; - tmp1 += tmp2; - tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.378756276)); /* -c1 */ - tmp1 += tmp2; - tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.613604268)); /* c5 */ - tmp0 += tmp3; - tmp2 += tmp3 + MULTIPLY(tmp12, FIX(1.870828693)); /* c3+c1-c5 */ - - dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS-PASS1_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS-PASS1_BITS); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == 14) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/7)*(8/14) = 32/49, which we - * fold into the constant multipliers: - * 14-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/28) * 32/49. - */ - - dataptr = data; - wsptr = workspace; - for (ctr = 0; ctr < 7; ctr++) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*5]; - tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*4]; - tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*3]; - tmp13 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*2]; - tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*1]; - tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*0]; - tmp6 = dataptr[DCTSIZE*6] + dataptr[DCTSIZE*7]; - - tmp10 = tmp0 + tmp6; - tmp14 = tmp0 - tmp6; - tmp11 = tmp1 + tmp5; - tmp15 = tmp1 - tmp5; - tmp12 = tmp2 + tmp4; - tmp16 = tmp2 - tmp4; - - tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*5]; - tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*4]; - tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*3]; - tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*2]; - tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*1]; - tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*0]; - tmp6 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12 + tmp13, - FIX(0.653061224)), /* 32/49 */ - CONST_BITS+PASS1_BITS); - tmp13 += tmp13; - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp13, FIX(0.832106052)) + /* c4 */ - MULTIPLY(tmp11 - tmp13, FIX(0.205513223)) - /* c12 */ - MULTIPLY(tmp12 - tmp13, FIX(0.575835255)), /* c8 */ - CONST_BITS+PASS1_BITS); - - tmp10 = MULTIPLY(tmp14 + tmp15, FIX(0.722074570)); /* c6 */ - - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.178337691)) /* c2-c6 */ - + MULTIPLY(tmp16, FIX(0.400721155)), /* c10 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.122795725)) /* c6+c10 */ - - MULTIPLY(tmp16, FIX(0.900412262)), /* c2 */ - CONST_BITS+PASS1_BITS); - - /* Odd part */ - - tmp10 = tmp1 + tmp2; - tmp11 = tmp5 - tmp4; - dataptr[DCTSIZE*7] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 - tmp10 + tmp3 - tmp11 - tmp6, - FIX(0.653061224)), /* 32/49 */ - CONST_BITS+PASS1_BITS); - tmp3 = MULTIPLY(tmp3 , FIX(0.653061224)); /* 32/49 */ - tmp10 = MULTIPLY(tmp10, - FIX(0.103406812)); /* -c13 */ - tmp11 = MULTIPLY(tmp11, FIX(0.917760839)); /* c1 */ - tmp10 += tmp11 - tmp3; - tmp11 = MULTIPLY(tmp0 + tmp2, FIX(0.782007410)) + /* c5 */ - MULTIPLY(tmp4 + tmp6, FIX(0.491367823)); /* c9 */ - dataptr[DCTSIZE*5] = (DCTELEM) - DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(1.550341076)) /* c3+c5-c13 */ - + MULTIPLY(tmp4, FIX(0.731428202)), /* c1+c11-c9 */ - CONST_BITS+PASS1_BITS); - tmp12 = MULTIPLY(tmp0 + tmp1, FIX(0.871740478)) + /* c3 */ - MULTIPLY(tmp5 - tmp6, FIX(0.305035186)); /* c11 */ - dataptr[DCTSIZE*3] = (DCTELEM) - DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.276965844)) /* c3-c9-c13 */ - - MULTIPLY(tmp5, FIX(2.004803435)), /* c1+c5+c11 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(tmp11 + tmp12 + tmp3 - - MULTIPLY(tmp0, FIX(0.735987049)) /* c3+c5-c1 */ - - MULTIPLY(tmp6, FIX(0.082925825)), /* c9-c11-c13 */ - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 6x12 sample block. - * - * 6-point FDCT in pass 1 (rows), 12-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_6x12 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; - DCTELEM workspace[8*4]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[5]); - tmp11 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[4]); - tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[3]); - - tmp10 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[5]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[4]); - tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[3]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp11 - 6 * CENTERJSAMPLE) << PASS1_BITS); - dataptr[2] = (DCTELEM) - DESCALE(MULTIPLY(tmp12, FIX(1.224744871)), /* c2 */ - CONST_BITS-PASS1_BITS); - dataptr[4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(0.707106781)), /* c4 */ - CONST_BITS-PASS1_BITS); - - /* Odd part */ - - tmp10 = DESCALE(MULTIPLY(tmp0 + tmp2, FIX(0.366025404)), /* c5 */ - CONST_BITS-PASS1_BITS); - - dataptr[1] = (DCTELEM) (tmp10 + ((tmp0 + tmp1) << PASS1_BITS)); - dataptr[3] = (DCTELEM) ((tmp0 - tmp1 - tmp2) << PASS1_BITS); - dataptr[5] = (DCTELEM) (tmp10 + ((tmp2 - tmp1) << PASS1_BITS)); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == 12) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/6)*(8/12) = 8/9, which we - * fold into the constant multipliers: - * 12-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/24) * 8/9. - */ - - dataptr = data; - wsptr = workspace; - for (ctr = 0; ctr < 6; ctr++) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*3]; - tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*2]; - tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*1]; - tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*0]; - tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*7]; - tmp5 = dataptr[DCTSIZE*5] + dataptr[DCTSIZE*6]; - - tmp10 = tmp0 + tmp5; - tmp13 = tmp0 - tmp5; - tmp11 = tmp1 + tmp4; - tmp14 = tmp1 - tmp4; - tmp12 = tmp2 + tmp3; - tmp15 = tmp2 - tmp3; - - tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*3]; - tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*2]; - tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*1]; - tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*0]; - tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*7]; - tmp5 = dataptr[DCTSIZE*5] - dataptr[DCTSIZE*6]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(0.888888889)), /* 8/9 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(MULTIPLY(tmp13 - tmp14 - tmp15, FIX(0.888888889)), /* 8/9 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.088662108)), /* c4 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(MULTIPLY(tmp14 - tmp15, FIX(0.888888889)) + /* 8/9 */ - MULTIPLY(tmp13 + tmp15, FIX(1.214244803)), /* c2 */ - CONST_BITS+PASS1_BITS); - - /* Odd part */ - - tmp10 = MULTIPLY(tmp1 + tmp4, FIX(0.481063200)); /* c9 */ - tmp14 = tmp10 + MULTIPLY(tmp1, FIX(0.680326102)); /* c3-c9 */ - tmp15 = tmp10 - MULTIPLY(tmp4, FIX(1.642452502)); /* c3+c9 */ - tmp12 = MULTIPLY(tmp0 + tmp2, FIX(0.997307603)); /* c5 */ - tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.765261039)); /* c7 */ - tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.516244403)) /* c5+c7-c1 */ - + MULTIPLY(tmp5, FIX(0.164081699)); /* c11 */ - tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.164081699)); /* -c11 */ - tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.079550144)) /* c1+c5-c11 */ - + MULTIPLY(tmp5, FIX(0.765261039)); /* c7 */ - tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.645144899)) /* c1+c11-c7 */ - - MULTIPLY(tmp5, FIX(0.997307603)); /* c5 */ - tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.161389302)) /* c3 */ - - MULTIPLY(tmp2 + tmp5, FIX(0.481063200)); /* c9 */ - - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 5x10 sample block. - * - * 5-point FDCT in pass 1 (rows), 10-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_5x10 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4; - INT32 tmp10, tmp11, tmp12, tmp13, tmp14; - DCTELEM workspace[8*2]; - DCTELEM *dataptr; - DCTELEM *wsptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * 5-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/10). - */ - - dataptr = data; - ctr = 0; - for (;;) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[4]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[3]); - tmp2 = GETJSAMPLE(elemptr[2]); - - tmp10 = tmp0 + tmp1; - tmp11 = tmp0 - tmp1; - - tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[4]); - tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[3]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp10 + tmp2 - 5 * CENTERJSAMPLE) << PASS1_BITS); - tmp11 = MULTIPLY(tmp11, FIX(0.790569415)); /* (c2+c4)/2 */ - tmp10 -= tmp2 << 2; - tmp10 = MULTIPLY(tmp10, FIX(0.353553391)); /* (c2-c4)/2 */ - dataptr[2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS-PASS1_BITS); - dataptr[4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS-PASS1_BITS); - - /* Odd part */ - - tmp10 = MULTIPLY(tmp0 + tmp1, FIX(0.831253876)); /* c3 */ - - dataptr[1] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.513743148)), /* c1-c3 */ - CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.176250899)), /* c1+c3 */ - CONST_BITS-PASS1_BITS); - - ctr++; - - if (ctr != DCTSIZE) { - if (ctr == 10) - break; /* Done. */ - dataptr += DCTSIZE; /* advance pointer to next row */ - } else - dataptr = workspace; /* switch pointer to extended workspace */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/5)*(8/10) = 32/25, which we - * fold into the constant multipliers: - * 10-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/20) * 32/25. - */ - - dataptr = data; - wsptr = workspace; - for (ctr = 0; ctr < 5; ctr++) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*1]; - tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*0]; - tmp12 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*7]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*6]; - tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*5]; - - tmp10 = tmp0 + tmp4; - tmp13 = tmp0 - tmp4; - tmp11 = tmp1 + tmp3; - tmp14 = tmp1 - tmp3; - - tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*1]; - tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*0]; - tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*7]; - tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*6]; - tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(1.28)), /* 32/25 */ - CONST_BITS+PASS1_BITS); - tmp12 += tmp12; - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.464477191)) - /* c4 */ - MULTIPLY(tmp11 - tmp12, FIX(0.559380511)), /* c8 */ - CONST_BITS+PASS1_BITS); - tmp10 = MULTIPLY(tmp13 + tmp14, FIX(1.064004961)); /* c6 */ - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.657591230)), /* c2-c6 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*6] = (DCTELEM) - DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.785601151)), /* c2+c6 */ - CONST_BITS+PASS1_BITS); - - /* Odd part */ - - tmp10 = tmp0 + tmp4; - tmp11 = tmp1 - tmp3; - dataptr[DCTSIZE*5] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp11 - tmp2, FIX(1.28)), /* 32/25 */ - CONST_BITS+PASS1_BITS); - tmp2 = MULTIPLY(tmp2, FIX(1.28)); /* 32/25 */ - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(MULTIPLY(tmp0, FIX(1.787906876)) + /* c1 */ - MULTIPLY(tmp1, FIX(1.612894094)) + tmp2 + /* c3 */ - MULTIPLY(tmp3, FIX(0.821810588)) + /* c7 */ - MULTIPLY(tmp4, FIX(0.283176630)), /* c9 */ - CONST_BITS+PASS1_BITS); - tmp12 = MULTIPLY(tmp0 - tmp4, FIX(1.217352341)) - /* (c3+c7)/2 */ - MULTIPLY(tmp1 + tmp3, FIX(0.752365123)); /* (c1-c9)/2 */ - tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.395541753)) + /* (c3-c7)/2 */ - MULTIPLY(tmp11, FIX(0.64)) - tmp2; /* 16/25 */ - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - wsptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 4x8 sample block. - * - * 4-point FDCT in pass 1 (rows), 8-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_4x8 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * We must also scale the output by 8/4 = 2, which we add here. - * 4-point FDCT kernel, - * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. - */ - - dataptr = data; - for (ctr = 0; ctr < DCTSIZE; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[3]); - tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[2]); - - tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[3]); - tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[2]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp0 + tmp1 - 4 * CENTERJSAMPLE) << (PASS1_BITS+1)); - dataptr[2] = (DCTELEM) ((tmp0 - tmp1) << (PASS1_BITS+1)); - - /* Odd part */ - - tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-PASS1_BITS-2); - - dataptr[1] = (DCTELEM) - RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ - CONST_BITS-PASS1_BITS-1); - dataptr[3] = (DCTELEM) - RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ - CONST_BITS-PASS1_BITS-1); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16). - */ - - dataptr = data; - for (ctr = 0; ctr < 4; ctr++) { - /* Even part per LL&M figure 1 --- note that published figure is faulty; - * rotator "c1" should be "c6". - */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; - - /* Add fudge factor here for final descale. */ - tmp10 = tmp0 + tmp3 + (ONE << (PASS1_BITS-1)); - tmp12 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp13 = tmp1 - tmp2; - - tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; - - dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp10 + tmp11, PASS1_BITS); - dataptr[DCTSIZE*4] = (DCTELEM) RIGHT_SHIFT(tmp10 - tmp11, PASS1_BITS); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS+PASS1_BITS-1); - - dataptr[DCTSIZE*2] = (DCTELEM) - RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*6] = (DCTELEM) - RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ - CONST_BITS+PASS1_BITS); - - /* Odd part per figure 8 --- note paper omits factor of sqrt(2). - * i0..i3 in the paper are tmp0..tmp3 here. - */ - - tmp12 = tmp0 + tmp2; - tmp13 = tmp1 + tmp3; - - z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS+PASS1_BITS-1); - - tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ - tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ - tmp12 += z1; - tmp13 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp0 += z1 + tmp12; - tmp3 += z1 + tmp13; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp1 += z1 + tmp13; - tmp2 += z1 + tmp12; - - dataptr[DCTSIZE*1] = (DCTELEM) RIGHT_SHIFT(tmp0, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) RIGHT_SHIFT(tmp1, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*5] = (DCTELEM) RIGHT_SHIFT(tmp2, CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*7] = (DCTELEM) RIGHT_SHIFT(tmp3, CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 3x6 sample block. - * - * 3-point FDCT in pass 1 (rows), 6-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_3x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1, tmp2; - INT32 tmp10, tmp11, tmp12; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * We scale the results further by 2 as part of output adaption - * scaling for different DCT size. - * 3-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/6). - */ - - dataptr = data; - for (ctr = 0; ctr < 6; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[2]); - tmp1 = GETJSAMPLE(elemptr[1]); - - tmp2 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[2]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) - ((tmp0 + tmp1 - 3 * CENTERJSAMPLE) << (PASS1_BITS+1)); - dataptr[2] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(0.707106781)), /* c2 */ - CONST_BITS-PASS1_BITS-1); - - /* Odd part */ - - dataptr[1] = (DCTELEM) - DESCALE(MULTIPLY(tmp2, FIX(1.224744871)), /* c1 */ - CONST_BITS-PASS1_BITS-1); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - * We must also scale the output by (8/6)*(8/3) = 32/9, which we partially - * fold into the constant multipliers (other part was done in pass 1): - * 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12) * 16/9. - */ - - dataptr = data; - for (ctr = 0; ctr < 3; ctr++) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*5]; - tmp11 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*4]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3]; - - tmp10 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - - tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*5]; - tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*4]; - tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3]; - - dataptr[DCTSIZE*0] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 + tmp11, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*2] = (DCTELEM) - DESCALE(MULTIPLY(tmp12, FIX(2.177324216)), /* c2 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*4] = (DCTELEM) - DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(1.257078722)), /* c4 */ - CONST_BITS+PASS1_BITS); - - /* Odd part */ - - tmp10 = MULTIPLY(tmp0 + tmp2, FIX(0.650711829)); /* c5 */ - - dataptr[DCTSIZE*1] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) - DESCALE(MULTIPLY(tmp0 - tmp1 - tmp2, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*5] = (DCTELEM) - DESCALE(tmp10 + MULTIPLY(tmp2 - tmp1, FIX(1.777777778)), /* 16/9 */ - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 2x4 sample block. - * - * 2-point FDCT in pass 1 (rows), 4-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_2x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - INT32 tmp0, tmp1; - INT32 tmp10, tmp11; - DCTELEM *dataptr; - JSAMPROW elemptr; - int ctr; - SHIFT_TEMPS - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: process rows. - * Note results are scaled up by sqrt(8) compared to a true DCT. - */ - - dataptr = data; - for (ctr = 0; ctr < 4; ctr++) { - elemptr = sample_data[ctr] + start_col; - - /* Even part */ - - tmp0 = GETJSAMPLE(elemptr[0]); - tmp1 = GETJSAMPLE(elemptr[1]); - - /* Apply unsigned->signed conversion. */ - dataptr[0] = (DCTELEM) (tmp0 + tmp1 - 2 * CENTERJSAMPLE); - - /* Odd part */ - - dataptr[1] = (DCTELEM) (tmp0 - tmp1); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/2)*(8/4) = 2**3. - * 4-point FDCT kernel, - * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. - */ - - dataptr = data; - for (ctr = 0; ctr < 2; ctr++) { - /* Even part */ - - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*3]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*2]; - - tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*3]; - tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*2]; - - dataptr[DCTSIZE*0] = (DCTELEM) ((tmp0 + tmp1) << 3); - dataptr[DCTSIZE*2] = (DCTELEM) ((tmp0 - tmp1) << 3); - - /* Odd part */ - - tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-3-1); - - dataptr[DCTSIZE*1] = (DCTELEM) - RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ - CONST_BITS-3); - dataptr[DCTSIZE*3] = (DCTELEM) - RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ - CONST_BITS-3); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * Perform the forward DCT on a 1x2 sample block. - * - * 1-point FDCT in pass 1 (rows), 2-point in pass 2 (columns). - */ - -GLOBAL(void) -jpeg_fdct_1x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) -{ - DCTELEM tmp0, tmp1; - - /* Pre-zero output coefficient block. */ - MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); - - /* Pass 1: empty. */ - - /* Pass 2: process columns. - * We leave the results scaled up by an overall factor of 8. - * We must also scale the output by (8/1)*(8/2) = 2**5. - */ - - /* Even part */ - - tmp0 = GETJSAMPLE(sample_data[0][start_col]); - tmp1 = GETJSAMPLE(sample_data[1][start_col]); - - /* Apply unsigned->signed conversion. */ - data[DCTSIZE*0] = (tmp0 + tmp1 - 2 * CENTERJSAMPLE) << 5; - - /* Odd part */ - - data[DCTSIZE*1] = (tmp0 - tmp1) << 5; -} - -#endif /* DCT_SCALING_SUPPORTED */ -#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/jidctflt.c b/thirdparty/jpeg-9e/jidctflt.c deleted file mode 100644 index e33a2b5..0000000 --- a/thirdparty/jpeg-9e/jidctflt.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * jidctflt.c - * - * Copyright (C) 1994-1998, Thomas G. Lane. - * Modified 2010-2017 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a floating-point implementation of the - * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine - * must also perform dequantization of the input coefficients. - * - * This implementation should be more accurate than either of the integer - * IDCT implementations. However, it may not give the same results on all - * machines because of differences in roundoff behavior. Speed will depend - * on the hardware's floating point capacity. - * - * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT - * on each row (or vice versa, but it's more convenient to emit a row at - * a time). Direct algorithms are also available, but they are much more - * complex and seem not to be any faster when reduced to code. - * - * This implementation is based on Arai, Agui, and Nakajima's algorithm for - * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in - * Japanese, but the algorithm is described in the Pennebaker & Mitchell - * JPEG textbook (see REFERENCES section in file README). The following code - * is based directly on figure 4-8 in P&M. - * While an 8-point DCT cannot be done in less than 11 multiplies, it is - * possible to arrange the computation so that many of the multiplies are - * simple scalings of the final outputs. These multiplies can then be - * folded into the multiplications or divisions by the JPEG quantization - * table entries. The AA&N method leaves only 5 multiplies and 29 adds - * to be done in the DCT itself. - * The primary disadvantage of this method is that with a fixed-point - * implementation, accuracy is lost due to imprecise representation of the - * scaled quantization values. However, that problem does not arise if - * we use floating point arithmetic. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_FLOAT_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ -#endif - - -/* Dequantize a coefficient by multiplying it by the multiplier-table - * entry; produce a float result. - */ - -#define DEQUANTIZE(coef,quantval) (((FAST_FLOAT) (coef)) * (quantval)) - - -/* - * Perform dequantization and inverse DCT on one block of coefficients. - * - * cK represents cos(K*pi/16). - */ - -GLOBAL(void) -jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - FAST_FLOAT tmp10, tmp11, tmp12, tmp13; - FAST_FLOAT z5, z10, z11, z12, z13; - JCOEFPTR inptr; - FLOAT_MULT_TYPE * quantptr; - FAST_FLOAT * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - FAST_FLOAT workspace[DCTSIZE2]; /* buffers data between passes */ - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (FLOAT_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = DCTSIZE; ctr > 0; ctr--) { - /* Due to quantization, we will usually find that many of the input - * coefficients are zero, especially the AC terms. We can exploit this - * by short-circuiting the IDCT calculation for any column in which all - * the AC terms are zero. In that case each output is equal to the - * DC coefficient (with scale factor as needed). - * With typical images and quantization tables, half or more of the - * column DCT calculations can be simplified this way. - */ - - if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && - inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && - inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && - inptr[DCTSIZE*7] == 0) { - /* AC terms all zero */ - FAST_FLOAT dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - - wsptr[DCTSIZE*0] = dcval; - wsptr[DCTSIZE*1] = dcval; - wsptr[DCTSIZE*2] = dcval; - wsptr[DCTSIZE*3] = dcval; - wsptr[DCTSIZE*4] = dcval; - wsptr[DCTSIZE*5] = dcval; - wsptr[DCTSIZE*6] = dcval; - wsptr[DCTSIZE*7] = dcval; - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - continue; - } - - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - tmp10 = tmp0 + tmp2; /* phase 3 */ - tmp11 = tmp0 - tmp2; - - tmp13 = tmp1 + tmp3; /* phases 5-3 */ - tmp12 = (tmp1 - tmp3) * ((FAST_FLOAT) 1.414213562) - tmp13; /* 2*c4 */ - - tmp0 = tmp10 + tmp13; /* phase 2 */ - tmp3 = tmp10 - tmp13; - tmp1 = tmp11 + tmp12; - tmp2 = tmp11 - tmp12; - - /* Odd part */ - - tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - z13 = tmp6 + tmp5; /* phase 6 */ - z10 = tmp6 - tmp5; - z11 = tmp4 + tmp7; - z12 = tmp4 - tmp7; - - tmp7 = z11 + z13; /* phase 5 */ - tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */ - - z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ - tmp10 = z5 - z12 * ((FAST_FLOAT) 1.082392200); /* 2*(c2-c6) */ - tmp12 = z5 - z10 * ((FAST_FLOAT) 2.613125930); /* 2*(c2+c6) */ - - tmp6 = tmp12 - tmp7; /* phase 2 */ - tmp5 = tmp11 - tmp6; - tmp4 = tmp10 - tmp5; - - wsptr[DCTSIZE*0] = tmp0 + tmp7; - wsptr[DCTSIZE*7] = tmp0 - tmp7; - wsptr[DCTSIZE*1] = tmp1 + tmp6; - wsptr[DCTSIZE*6] = tmp1 - tmp6; - wsptr[DCTSIZE*2] = tmp2 + tmp5; - wsptr[DCTSIZE*5] = tmp2 - tmp5; - wsptr[DCTSIZE*3] = tmp3 + tmp4; - wsptr[DCTSIZE*4] = tmp3 - tmp4; - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - } - - /* Pass 2: process rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < DCTSIZE; ctr++) { - outptr = output_buf[ctr] + output_col; - /* Rows of zeroes can be exploited in the same way as we did with columns. - * However, the column calculation has created many nonzero AC terms, so - * the simplification applies less often (typically 5% to 10% of the time). - * And testing floats for zero is relatively expensive, so we don't bother. - */ - - /* Even part */ - - /* Prepare range-limit and float->int conversion */ - z5 = wsptr[0] + (((FAST_FLOAT) RANGE_CENTER) + ((FAST_FLOAT) 0.5)); - tmp10 = z5 + wsptr[4]; - tmp11 = z5 - wsptr[4]; - - tmp13 = wsptr[2] + wsptr[6]; - tmp12 = (wsptr[2] - wsptr[6]) * - ((FAST_FLOAT) 1.414213562) - tmp13; /* 2*c4 */ - - tmp0 = tmp10 + tmp13; - tmp3 = tmp10 - tmp13; - tmp1 = tmp11 + tmp12; - tmp2 = tmp11 - tmp12; - - /* Odd part */ - - z13 = wsptr[5] + wsptr[3]; - z10 = wsptr[5] - wsptr[3]; - z11 = wsptr[1] + wsptr[7]; - z12 = wsptr[1] - wsptr[7]; - - tmp7 = z11 + z13; /* phase 5 */ - tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */ - - z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ - tmp10 = z5 - z12 * ((FAST_FLOAT) 1.082392200); /* 2*(c2-c6) */ - tmp12 = z5 - z10 * ((FAST_FLOAT) 2.613125930); /* 2*(c2+c6) */ - - tmp6 = tmp12 - tmp7; /* phase 2 */ - tmp5 = tmp11 - tmp6; - tmp4 = tmp10 - tmp5; - - /* Final output stage: float->int conversion and range-limit */ - - outptr[0] = range_limit[(int) (tmp0 + tmp7) & RANGE_MASK]; - outptr[7] = range_limit[(int) (tmp0 - tmp7) & RANGE_MASK]; - outptr[1] = range_limit[(int) (tmp1 + tmp6) & RANGE_MASK]; - outptr[6] = range_limit[(int) (tmp1 - tmp6) & RANGE_MASK]; - outptr[2] = range_limit[(int) (tmp2 + tmp5) & RANGE_MASK]; - outptr[5] = range_limit[(int) (tmp2 - tmp5) & RANGE_MASK]; - outptr[3] = range_limit[(int) (tmp3 + tmp4) & RANGE_MASK]; - outptr[4] = range_limit[(int) (tmp3 - tmp4) & RANGE_MASK]; - - wsptr += DCTSIZE; /* advance pointer to next row */ - } -} - -#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/jidctfst.c b/thirdparty/jpeg-9e/jidctfst.c deleted file mode 100644 index 1ac3e39..0000000 --- a/thirdparty/jpeg-9e/jidctfst.c +++ /dev/null @@ -1,351 +0,0 @@ -/* - * jidctfst.c - * - * Copyright (C) 1994-1998, Thomas G. Lane. - * Modified 2015-2017 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a fast, not so accurate integer implementation of the - * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine - * must also perform dequantization of the input coefficients. - * - * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT - * on each row (or vice versa, but it's more convenient to emit a row at - * a time). Direct algorithms are also available, but they are much more - * complex and seem not to be any faster when reduced to code. - * - * This implementation is based on Arai, Agui, and Nakajima's algorithm for - * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in - * Japanese, but the algorithm is described in the Pennebaker & Mitchell - * JPEG textbook (see REFERENCES section in file README). The following code - * is based directly on figure 4-8 in P&M. - * While an 8-point DCT cannot be done in less than 11 multiplies, it is - * possible to arrange the computation so that many of the multiplies are - * simple scalings of the final outputs. These multiplies can then be - * folded into the multiplications or divisions by the JPEG quantization - * table entries. The AA&N method leaves only 5 multiplies and 29 adds - * to be done in the DCT itself. - * The primary disadvantage of this method is that with fixed-point math, - * accuracy is lost due to imprecise representation of the scaled - * quantization values. The smaller the quantization table entry, the less - * precise the scaled value, so this implementation does worse with high- - * quality-setting files than with low-quality ones. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_IFAST_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ -#endif - - -/* Scaling decisions are generally the same as in the LL&M algorithm; - * see jidctint.c for more details. However, we choose to descale - * (right shift) multiplication products as soon as they are formed, - * rather than carrying additional fractional bits into subsequent additions. - * This compromises accuracy slightly, but it lets us save a few shifts. - * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) - * everywhere except in the multiplications proper; this saves a good deal - * of work on 16-bit-int machines. - * - * The dequantized coefficients are not integers because the AA&N scaling - * factors have been incorporated. We represent them scaled up by PASS1_BITS, - * so that the first and second IDCT rounds have the same input scaling. - * For 8-bit JSAMPLEs, we choose IFAST_SCALE_BITS = PASS1_BITS so as to - * avoid a descaling shift; this compromises accuracy rather drastically - * for small quantization table entries, but it saves a lot of shifts. - * For 12-bit JSAMPLEs, there's no hope of using 16x16 multiplies anyway, - * so we use a much larger scaling factor to preserve accuracy. - * - * A final compromise is to represent the multiplicative constants to only - * 8 fractional bits, rather than 13. This saves some shifting work on some - * machines, and may also reduce the cost of multiplication (since there - * are fewer one-bits in the constants). - */ - -#if BITS_IN_JSAMPLE == 8 -#define CONST_BITS 8 -#define PASS1_BITS 2 -#else -#define CONST_BITS 8 -#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ -#endif - -/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus - * causing a lot of useless floating-point operations at run time. - * To get around this we use the following pre-calculated constants. - * If you change CONST_BITS you may want to add appropriate values. - * (With a reasonable C compiler, you can just rely on the FIX() macro...) - */ - -#if CONST_BITS == 8 -#define FIX_1_082392200 ((INT32) 277) /* FIX(1.082392200) */ -#define FIX_1_414213562 ((INT32) 362) /* FIX(1.414213562) */ -#define FIX_1_847759065 ((INT32) 473) /* FIX(1.847759065) */ -#define FIX_2_613125930 ((INT32) 669) /* FIX(2.613125930) */ -#else -#define FIX_1_082392200 FIX(1.082392200) -#define FIX_1_414213562 FIX(1.414213562) -#define FIX_1_847759065 FIX(1.847759065) -#define FIX_2_613125930 FIX(2.613125930) -#endif - - -/* We can gain a little more speed, with a further compromise in accuracy, - * by omitting the addition in a descaling shift. This yields an incorrectly - * rounded result half the time... - */ - -#ifndef USE_ACCURATE_ROUNDING -#undef DESCALE -#define DESCALE(x,n) RIGHT_SHIFT(x, n) -#endif - - -/* Multiply a DCTELEM variable by an INT32 constant, and immediately - * descale to yield a DCTELEM result. - */ - -#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) - - -/* Dequantize a coefficient by multiplying it by the multiplier-table - * entry; produce a DCTELEM result. For 8-bit data a 16x16->16 - * multiplication will do. For 12-bit data, the multiplier table is - * declared INT32, so a 32-bit multiply will be used. - */ - -#if BITS_IN_JSAMPLE == 8 -#define DEQUANTIZE(coef,quantval) (((IFAST_MULT_TYPE) (coef)) * (quantval)) -#else -#define DEQUANTIZE(coef,quantval) \ - DESCALE((coef)*(quantval), IFAST_SCALE_BITS-PASS1_BITS) -#endif - - -/* - * Perform dequantization and inverse DCT on one block of coefficients. - * - * cK represents cos(K*pi/16). - */ - -GLOBAL(void) -jpeg_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - DCTELEM tmp10, tmp11, tmp12, tmp13; - DCTELEM z5, z10, z11, z12, z13; - JCOEFPTR inptr; - IFAST_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[DCTSIZE2]; /* buffers data between passes */ - SHIFT_TEMPS /* for DESCALE */ - ISHIFT_TEMPS /* for IRIGHT_SHIFT */ - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (IFAST_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = DCTSIZE; ctr > 0; ctr--) { - /* Due to quantization, we will usually find that many of the input - * coefficients are zero, especially the AC terms. We can exploit this - * by short-circuiting the IDCT calculation for any column in which all - * the AC terms are zero. In that case each output is equal to the - * DC coefficient (with scale factor as needed). - * With typical images and quantization tables, half or more of the - * column DCT calculations can be simplified this way. - */ - - if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && - inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && - inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && - inptr[DCTSIZE*7] == 0) { - /* AC terms all zero */ - int dcval = (int) DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - - wsptr[DCTSIZE*0] = dcval; - wsptr[DCTSIZE*1] = dcval; - wsptr[DCTSIZE*2] = dcval; - wsptr[DCTSIZE*3] = dcval; - wsptr[DCTSIZE*4] = dcval; - wsptr[DCTSIZE*5] = dcval; - wsptr[DCTSIZE*6] = dcval; - wsptr[DCTSIZE*7] = dcval; - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - continue; - } - - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - tmp10 = tmp0 + tmp2; /* phase 3 */ - tmp11 = tmp0 - tmp2; - - tmp13 = tmp1 + tmp3; /* phases 5-3 */ - tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; /* 2*c4 */ - - tmp0 = tmp10 + tmp13; /* phase 2 */ - tmp3 = tmp10 - tmp13; - tmp1 = tmp11 + tmp12; - tmp2 = tmp11 - tmp12; - - /* Odd part */ - - tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - z13 = tmp6 + tmp5; /* phase 6 */ - z10 = tmp6 - tmp5; - z11 = tmp4 + tmp7; - z12 = tmp4 - tmp7; - - tmp7 = z11 + z13; /* phase 5 */ - tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ - - z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ - tmp10 = z5 - MULTIPLY(z12, FIX_1_082392200); /* 2*(c2-c6) */ - tmp12 = z5 - MULTIPLY(z10, FIX_2_613125930); /* 2*(c2+c6) */ - - tmp6 = tmp12 - tmp7; /* phase 2 */ - tmp5 = tmp11 - tmp6; - tmp4 = tmp10 - tmp5; - - wsptr[DCTSIZE*0] = (int) (tmp0 + tmp7); - wsptr[DCTSIZE*7] = (int) (tmp0 - tmp7); - wsptr[DCTSIZE*1] = (int) (tmp1 + tmp6); - wsptr[DCTSIZE*6] = (int) (tmp1 - tmp6); - wsptr[DCTSIZE*2] = (int) (tmp2 + tmp5); - wsptr[DCTSIZE*5] = (int) (tmp2 - tmp5); - wsptr[DCTSIZE*3] = (int) (tmp3 + tmp4); - wsptr[DCTSIZE*4] = (int) (tmp3 - tmp4); - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - } - - /* Pass 2: process rows from work array, store into output array. - * Note that we must descale the results by a factor of 8 == 2**3, - * and also undo the PASS1_BITS scaling. - */ - - wsptr = workspace; - for (ctr = 0; ctr < DCTSIZE; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Add range center and fudge factor for final descale and range-limit. */ - z5 = (DCTELEM) wsptr[0] + - ((((DCTELEM) RANGE_CENTER) << (PASS1_BITS+3)) + - (1 << (PASS1_BITS+2))); - - /* Rows of zeroes can be exploited in the same way as we did with columns. - * However, the column calculation has created many nonzero AC terms, so - * the simplification applies less often (typically 5% to 10% of the time). - * On machines with very fast multiplication, it's possible that the - * test takes more time than it's worth. In that case this section - * may be commented out. - */ - -#ifndef NO_ZERO_ROW_TEST - if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 && - wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { - /* AC terms all zero */ - JSAMPLE dcval = range_limit[(int) IRIGHT_SHIFT(z5, PASS1_BITS+3) - & RANGE_MASK]; - - outptr[0] = dcval; - outptr[1] = dcval; - outptr[2] = dcval; - outptr[3] = dcval; - outptr[4] = dcval; - outptr[5] = dcval; - outptr[6] = dcval; - outptr[7] = dcval; - - wsptr += DCTSIZE; /* advance pointer to next row */ - continue; - } -#endif - - /* Even part */ - - tmp10 = z5 + (DCTELEM) wsptr[4]; - tmp11 = z5 - (DCTELEM) wsptr[4]; - - tmp13 = (DCTELEM) wsptr[2] + (DCTELEM) wsptr[6]; - tmp12 = MULTIPLY((DCTELEM) wsptr[2] - (DCTELEM) wsptr[6], - FIX_1_414213562) - tmp13; /* 2*c4 */ - - tmp0 = tmp10 + tmp13; - tmp3 = tmp10 - tmp13; - tmp1 = tmp11 + tmp12; - tmp2 = tmp11 - tmp12; - - /* Odd part */ - - z13 = (DCTELEM) wsptr[5] + (DCTELEM) wsptr[3]; - z10 = (DCTELEM) wsptr[5] - (DCTELEM) wsptr[3]; - z11 = (DCTELEM) wsptr[1] + (DCTELEM) wsptr[7]; - z12 = (DCTELEM) wsptr[1] - (DCTELEM) wsptr[7]; - - tmp7 = z11 + z13; /* phase 5 */ - tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ - - z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ - tmp10 = z5 - MULTIPLY(z12, FIX_1_082392200); /* 2*(c2-c6) */ - tmp12 = z5 - MULTIPLY(z10, FIX_2_613125930); /* 2*(c2+c6) */ - - tmp6 = tmp12 - tmp7; /* phase 2 */ - tmp5 = tmp11 - tmp6; - tmp4 = tmp10 - tmp5; - - /* Final output stage: scale down by a factor of 8 and range-limit */ - - outptr[0] = range_limit[(int) IRIGHT_SHIFT(tmp0 + tmp7, PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) IRIGHT_SHIFT(tmp0 - tmp7, PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) IRIGHT_SHIFT(tmp1 + tmp6, PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) IRIGHT_SHIFT(tmp1 - tmp6, PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) IRIGHT_SHIFT(tmp2 + tmp5, PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) IRIGHT_SHIFT(tmp2 - tmp5, PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) IRIGHT_SHIFT(tmp3 + tmp4, PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) IRIGHT_SHIFT(tmp3 - tmp4, PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += DCTSIZE; /* advance pointer to next row */ - } -} - -#endif /* DCT_IFAST_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/jidctint.c b/thirdparty/jpeg-9e/jidctint.c deleted file mode 100644 index e30ec8c..0000000 --- a/thirdparty/jpeg-9e/jidctint.c +++ /dev/null @@ -1,5240 +0,0 @@ -/* - * jidctint.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modification developed 2002-2018 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a slow-but-accurate integer implementation of the - * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine - * must also perform dequantization of the input coefficients. - * - * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT - * on each row (or vice versa, but it's more convenient to emit a row at - * a time). Direct algorithms are also available, but they are much more - * complex and seem not to be any faster when reduced to code. - * - * This implementation is based on an algorithm described in - * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT - * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, - * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. - * The primary algorithm described there uses 11 multiplies and 29 adds. - * We use their alternate method with 12 multiplies and 32 adds. - * The advantage of this method is that no data path contains more than one - * multiplication; this allows a very simple and accurate implementation in - * scaled fixed-point arithmetic, with a minimal number of shifts. - * - * We also provide IDCT routines with various output sample block sizes for - * direct resolution reduction or enlargement and for direct resolving the - * common 2x1 and 1x2 subsampling cases without additional resampling: NxN - * (N=1...16), 2NxN, and Nx2N (N=1...8) pixels for one 8x8 input DCT block. - * - * For N<8 we simply take the corresponding low-frequency coefficients of - * the 8x8 input DCT block and apply an NxN point IDCT on the sub-block - * to yield the downscaled outputs. - * This can be seen as direct low-pass downsampling from the DCT domain - * point of view rather than the usual spatial domain point of view, - * yielding significant computational savings and results at least - * as good as common bilinear (averaging) spatial downsampling. - * - * For N>8 we apply a partial NxN IDCT on the 8 input coefficients as - * lower frequencies and higher frequencies assumed to be zero. - * It turns out that the computational effort is similar to the 8x8 IDCT - * regarding the output size. - * Furthermore, the scaling and descaling is the same for all IDCT sizes. - * - * CAUTION: We rely on the FIX() macro except for the N=1,2,4,8 cases - * since there would be too many additional constants to pre-calculate. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_ISLOW_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ -#endif - - -/* - * The poop on this scaling stuff is as follows: - * - * Each 1-D IDCT step produces outputs which are a factor of sqrt(N) - * larger than the true IDCT outputs. The final outputs are therefore - * a factor of N larger than desired; since N=8 this can be cured by - * a simple right shift at the end of the algorithm. The advantage of - * this arrangement is that we save two multiplications per 1-D IDCT, - * because the y0 and y4 inputs need not be divided by sqrt(N). - * - * We have to do addition and subtraction of the integer inputs, which - * is no problem, and multiplication by fractional constants, which is - * a problem to do in integer arithmetic. We multiply all the constants - * by CONST_SCALE and convert them to integer constants (thus retaining - * CONST_BITS bits of precision in the constants). After doing a - * multiplication we have to divide the product by CONST_SCALE, with proper - * rounding, to produce the correct output. This division can be done - * cheaply as a right shift of CONST_BITS bits. We postpone shifting - * as long as possible so that partial sums can be added together with - * full fractional precision. - * - * The outputs of the first pass are scaled up by PASS1_BITS bits so that - * they are represented to better-than-integral precision. These outputs - * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word - * with the recommended scaling. (To scale up 12-bit sample data further, an - * intermediate INT32 array would be needed.) - * - * To avoid overflow of the 32-bit intermediate results in pass 2, we must - * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis - * shows that the values given below are the most effective. - */ - -#if BITS_IN_JSAMPLE == 8 -#define CONST_BITS 13 -#define PASS1_BITS 2 -#else -#define CONST_BITS 13 -#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ -#endif - -/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus - * causing a lot of useless floating-point operations at run time. - * To get around this we use the following pre-calculated constants. - * If you change CONST_BITS you may want to add appropriate values. - * (With a reasonable C compiler, you can just rely on the FIX() macro...) - */ - -#if CONST_BITS == 13 -#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ -#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ -#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ -#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ -#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ -#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ -#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ -#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ -#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ -#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ -#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ -#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ -#else -#define FIX_0_298631336 FIX(0.298631336) -#define FIX_0_390180644 FIX(0.390180644) -#define FIX_0_541196100 FIX(0.541196100) -#define FIX_0_765366865 FIX(0.765366865) -#define FIX_0_899976223 FIX(0.899976223) -#define FIX_1_175875602 FIX(1.175875602) -#define FIX_1_501321110 FIX(1.501321110) -#define FIX_1_847759065 FIX(1.847759065) -#define FIX_1_961570560 FIX(1.961570560) -#define FIX_2_053119869 FIX(2.053119869) -#define FIX_2_562915447 FIX(2.562915447) -#define FIX_3_072711026 FIX(3.072711026) -#endif - - -/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. - * For 8-bit samples with the recommended scaling, all the variable - * and constant values involved are no more than 16 bits wide, so a - * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. - * For 12-bit samples, a full 32-bit multiplication will be needed. - */ - -#if BITS_IN_JSAMPLE == 8 -#define MULTIPLY(var,const) MULTIPLY16C16(var,const) -#else -#define MULTIPLY(var,const) ((var) * (const)) -#endif - - -/* Dequantize a coefficient by multiplying it by the multiplier-table - * entry; produce an int result. In this module, both inputs and result - * are 16 bits or less, so either int or short multiply will work. - */ - -#define DEQUANTIZE(coef,quantval) (((ISLOW_MULT_TYPE) (coef)) * (quantval)) - - -/* - * Perform dequantization and inverse DCT on one block of coefficients. - * - * Optimized algorithm with 12 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/16). - */ - -GLOBAL(void) -jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2, z3; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[DCTSIZE2]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * Note results are scaled up by sqrt(8) compared to a true IDCT; - * furthermore, we scale the results by 2**PASS1_BITS. - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = DCTSIZE; ctr > 0; ctr--) { - /* Due to quantization, we will usually find that many of the input - * coefficients are zero, especially the AC terms. We can exploit this - * by short-circuiting the IDCT calculation for any column in which all - * the AC terms are zero. In that case each output is equal to the - * DC coefficient (with scale factor as needed). - * With typical images and quantization tables, half or more of the - * column DCT calculations can be simplified this way. - */ - - if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && - inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && - inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && - inptr[DCTSIZE*7] == 0) { - /* AC terms all zero */ - int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; - - wsptr[DCTSIZE*0] = dcval; - wsptr[DCTSIZE*1] = dcval; - wsptr[DCTSIZE*2] = dcval; - wsptr[DCTSIZE*3] = dcval; - wsptr[DCTSIZE*4] = dcval; - wsptr[DCTSIZE*5] = dcval; - wsptr[DCTSIZE*6] = dcval; - wsptr[DCTSIZE*7] = dcval; - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - continue; - } - - /* Even part: reverse the even part of the forward DCT. - * The rotator is c(-6). - */ - - z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z2 <<= CONST_BITS; - z3 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - z2 += ONE << (CONST_BITS-PASS1_BITS-1); - - tmp0 = z2 + z3; - tmp1 = z2 - z3; - - z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - tmp10 = tmp0 + tmp2; - tmp13 = tmp0 - tmp2; - tmp11 = tmp1 + tmp3; - tmp12 = tmp1 - tmp3; - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - - z2 = tmp0 + tmp2; - z3 = tmp1 + tmp3; - - z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ - z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ - z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ - z2 += z1; - z3 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp0 += z1 + z2; - tmp3 += z1 + z3; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp1 += z1 + z3; - tmp2 += z1 + z2; - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - wsptr[DCTSIZE*0] = (int) RIGHT_SHIFT(tmp10 + tmp3, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*7] = (int) RIGHT_SHIFT(tmp10 - tmp3, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*1] = (int) RIGHT_SHIFT(tmp11 + tmp2, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*6] = (int) RIGHT_SHIFT(tmp11 - tmp2, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*2] = (int) RIGHT_SHIFT(tmp12 + tmp1, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*5] = (int) RIGHT_SHIFT(tmp12 - tmp1, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*3] = (int) RIGHT_SHIFT(tmp13 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*4] = (int) RIGHT_SHIFT(tmp13 - tmp0, CONST_BITS-PASS1_BITS); - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - } - - /* Pass 2: process rows from work array, store into output array. - * Note that we must descale the results by a factor of 8 == 2**3, - * and also undo the PASS1_BITS scaling. - */ - - wsptr = workspace; - for (ctr = 0; ctr < DCTSIZE; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Add range center and fudge factor for final descale and range-limit. */ - z2 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - - /* Rows of zeroes can be exploited in the same way as we did with columns. - * However, the column calculation has created many nonzero AC terms, so - * the simplification applies less often (typically 5% to 10% of the time). - * On machines with very fast multiplication, it's possible that the - * test takes more time than it's worth. In that case this section - * may be commented out. - */ - -#ifndef NO_ZERO_ROW_TEST - if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 && - wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { - /* AC terms all zero */ - JSAMPLE dcval = range_limit[(int) RIGHT_SHIFT(z2, PASS1_BITS+3) - & RANGE_MASK]; - - outptr[0] = dcval; - outptr[1] = dcval; - outptr[2] = dcval; - outptr[3] = dcval; - outptr[4] = dcval; - outptr[5] = dcval; - outptr[6] = dcval; - outptr[7] = dcval; - - wsptr += DCTSIZE; /* advance pointer to next row */ - continue; - } -#endif - - /* Even part: reverse the even part of the forward DCT. - * The rotator is c(-6). - */ - - z3 = (INT32) wsptr[4]; - - tmp0 = (z2 + z3) << CONST_BITS; - tmp1 = (z2 - z3) << CONST_BITS; - - z2 = (INT32) wsptr[2]; - z3 = (INT32) wsptr[6]; - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - tmp10 = tmp0 + tmp2; - tmp13 = tmp0 - tmp2; - tmp11 = tmp1 + tmp3; - tmp12 = tmp1 - tmp3; - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - - tmp0 = (INT32) wsptr[7]; - tmp1 = (INT32) wsptr[5]; - tmp2 = (INT32) wsptr[3]; - tmp3 = (INT32) wsptr[1]; - - z2 = tmp0 + tmp2; - z3 = tmp1 + tmp3; - - z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ - z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ - z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ - z2 += z1; - z3 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp0 += z1 + z2; - tmp3 += z1 + z3; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp1 += z1 + z3; - tmp2 += z1 + z2; - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += DCTSIZE; /* advance pointer to next row */ - } -} - -#ifdef IDCT_SCALING_SUPPORTED - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a reduced-size 7x7 output block. - * - * Optimized algorithm with 12 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/14). - */ - -GLOBAL(void) -jpeg_idct_7x7 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2, z3; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[7*7]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 7; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp13 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp13 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp13 += ONE << (CONST_BITS-PASS1_BITS-1); - - z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - tmp10 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */ - tmp12 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */ - tmp11 = tmp10 + tmp12 + tmp13 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */ - tmp0 = z1 + z3; - z2 -= tmp0; - tmp0 = MULTIPLY(tmp0, FIX(1.274162392)) + tmp13; /* c2 */ - tmp10 += tmp0 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */ - tmp12 += tmp0 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */ - tmp13 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */ - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - - tmp1 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */ - tmp2 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */ - tmp0 = tmp1 - tmp2; - tmp1 += tmp2; - tmp2 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */ - tmp1 += tmp2; - z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */ - tmp0 += z2; - tmp2 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */ - - /* Final output stage */ - - wsptr[7*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[7*6] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); - wsptr[7*1] = (int) RIGHT_SHIFT(tmp11 + tmp1, CONST_BITS-PASS1_BITS); - wsptr[7*5] = (int) RIGHT_SHIFT(tmp11 - tmp1, CONST_BITS-PASS1_BITS); - wsptr[7*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS); - wsptr[7*4] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS); - wsptr[7*3] = (int) RIGHT_SHIFT(tmp13, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 7 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 7; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp13 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp13 <<= CONST_BITS; - - z1 = (INT32) wsptr[2]; - z2 = (INT32) wsptr[4]; - z3 = (INT32) wsptr[6]; - - tmp10 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */ - tmp12 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */ - tmp11 = tmp10 + tmp12 + tmp13 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */ - tmp0 = z1 + z3; - z2 -= tmp0; - tmp0 = MULTIPLY(tmp0, FIX(1.274162392)) + tmp13; /* c2 */ - tmp10 += tmp0 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */ - tmp12 += tmp0 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */ - tmp13 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */ - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - - tmp1 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */ - tmp2 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */ - tmp0 = tmp1 - tmp2; - tmp1 += tmp2; - tmp2 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */ - tmp1 += tmp2; - z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */ - tmp0 += z2; - tmp2 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 7; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a reduced-size 6x6 output block. - * - * Optimized algorithm with 3 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/12). - */ - -GLOBAL(void) -jpeg_idct_6x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12; - INT32 z1, z2, z3; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[6*6]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 6; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp0 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */ - tmp1 = tmp0 + tmp10; - tmp11 = RIGHT_SHIFT(tmp0 - tmp10 - tmp10, CONST_BITS-PASS1_BITS); - tmp10 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */ - tmp10 = tmp1 + tmp0; - tmp12 = tmp1 - tmp0; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ - tmp0 = tmp1 + ((z1 + z2) << CONST_BITS); - tmp2 = tmp1 + ((z3 - z2) << CONST_BITS); - tmp1 = (z1 - z2 - z3) << PASS1_BITS; - - /* Final output stage */ - - wsptr[6*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[6*5] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); - wsptr[6*1] = (int) (tmp11 + tmp1); - wsptr[6*4] = (int) (tmp11 - tmp1); - wsptr[6*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS); - wsptr[6*3] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 6 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 6; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp0 <<= CONST_BITS; - tmp2 = (INT32) wsptr[4]; - tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */ - tmp1 = tmp0 + tmp10; - tmp11 = tmp0 - tmp10 - tmp10; - tmp10 = (INT32) wsptr[2]; - tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */ - tmp10 = tmp1 + tmp0; - tmp12 = tmp1 - tmp0; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ - tmp0 = tmp1 + ((z1 + z2) << CONST_BITS); - tmp2 = tmp1 + ((z3 - z2) << CONST_BITS); - tmp1 = (z1 - z2 - z3) << CONST_BITS; - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 6; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a reduced-size 5x5 output block. - * - * Optimized algorithm with 5 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/10). - */ - -GLOBAL(void) -jpeg_idct_5x5 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp10, tmp11, tmp12; - INT32 z1, z2, z3; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[5*5]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 5; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp12 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp12 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp12 += ONE << (CONST_BITS-PASS1_BITS-1); - tmp0 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - tmp1 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z1 = MULTIPLY(tmp0 + tmp1, FIX(0.790569415)); /* (c2+c4)/2 */ - z2 = MULTIPLY(tmp0 - tmp1, FIX(0.353553391)); /* (c2-c4)/2 */ - z3 = tmp12 + z2; - tmp10 = z3 + z1; - tmp11 = z3 - z1; - tmp12 -= z2 << 2; - - /* Odd part */ - - z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - - z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */ - tmp0 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */ - tmp1 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */ - - /* Final output stage */ - - wsptr[5*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[5*4] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); - wsptr[5*1] = (int) RIGHT_SHIFT(tmp11 + tmp1, CONST_BITS-PASS1_BITS); - wsptr[5*3] = (int) RIGHT_SHIFT(tmp11 - tmp1, CONST_BITS-PASS1_BITS); - wsptr[5*2] = (int) RIGHT_SHIFT(tmp12, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 5 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 5; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp12 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp12 <<= CONST_BITS; - tmp0 = (INT32) wsptr[2]; - tmp1 = (INT32) wsptr[4]; - z1 = MULTIPLY(tmp0 + tmp1, FIX(0.790569415)); /* (c2+c4)/2 */ - z2 = MULTIPLY(tmp0 - tmp1, FIX(0.353553391)); /* (c2-c4)/2 */ - z3 = tmp12 + z2; - tmp10 = z3 + z1; - tmp11 = z3 - z1; - tmp12 -= z2 << 2; - - /* Odd part */ - - z2 = (INT32) wsptr[1]; - z3 = (INT32) wsptr[3]; - - z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */ - tmp0 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */ - tmp1 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 5; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a reduced-size 4x4 output block. - * - * Optimized algorithm with 3 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT]. - */ - -GLOBAL(void) -jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp2, tmp10, tmp12; - INT32 z1, z2, z3; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[4*4]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 4; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - - tmp10 = (tmp0 + tmp2) << PASS1_BITS; - tmp12 = (tmp0 - tmp2) << PASS1_BITS; - - /* Odd part */ - /* Same rotation as in the even part of the 8x8 LL&M IDCT */ - - z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS-PASS1_BITS-1); - tmp0 = RIGHT_SHIFT(z1 + MULTIPLY(z2, FIX_0_765366865), /* c2-c6 */ - CONST_BITS-PASS1_BITS); - tmp2 = RIGHT_SHIFT(z1 - MULTIPLY(z3, FIX_1_847759065), /* c2+c6 */ - CONST_BITS-PASS1_BITS); - - /* Final output stage */ - - wsptr[4*0] = (int) (tmp10 + tmp0); - wsptr[4*3] = (int) (tmp10 - tmp0); - wsptr[4*1] = (int) (tmp12 + tmp2); - wsptr[4*2] = (int) (tmp12 - tmp2); - } - - /* Pass 2: process 4 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 4; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp2 = (INT32) wsptr[2]; - - tmp10 = (tmp0 + tmp2) << CONST_BITS; - tmp12 = (tmp0 - tmp2) << CONST_BITS; - - /* Odd part */ - /* Same rotation as in the even part of the 8x8 LL&M IDCT */ - - z2 = (INT32) wsptr[1]; - z3 = (INT32) wsptr[3]; - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 4; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a reduced-size 3x3 output block. - * - * Optimized algorithm with 2 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/6). - */ - -GLOBAL(void) -jpeg_idct_3x3 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp2, tmp10, tmp12; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[3*3]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 3; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp0 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */ - tmp10 = tmp0 + tmp12; - tmp2 = tmp0 - tmp12 - tmp12; - - /* Odd part */ - - tmp12 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */ - - /* Final output stage */ - - wsptr[3*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[3*2] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); - wsptr[3*1] = (int) RIGHT_SHIFT(tmp2, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 3 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 3; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp0 <<= CONST_BITS; - tmp2 = (INT32) wsptr[2]; - tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */ - tmp10 = tmp0 + tmp12; - tmp2 = tmp0 - tmp12 - tmp12; - - /* Odd part */ - - tmp12 = (INT32) wsptr[1]; - tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 3; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a reduced-size 2x2 output block. - * - * Multiplication-less algorithm. - */ - -GLOBAL(void) -jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; - ISLOW_MULT_TYPE * quantptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - ISHIFT_TEMPS - - /* Pass 1: process columns from input. */ - - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - - /* Column 0 */ - tmp4 = DEQUANTIZE(coef_block[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp5 = DEQUANTIZE(coef_block[DCTSIZE*1], quantptr[DCTSIZE*1]); - /* Add range center and fudge factor for final descale and range-limit. */ - tmp4 += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2); - - tmp0 = tmp4 + tmp5; - tmp2 = tmp4 - tmp5; - - /* Column 1 */ - tmp4 = DEQUANTIZE(coef_block[DCTSIZE*0+1], quantptr[DCTSIZE*0+1]); - tmp5 = DEQUANTIZE(coef_block[DCTSIZE*1+1], quantptr[DCTSIZE*1+1]); - - tmp1 = tmp4 + tmp5; - tmp3 = tmp4 - tmp5; - - /* Pass 2: process 2 rows, store into output array. */ - - /* Row 0 */ - outptr = output_buf[0] + output_col; - - outptr[0] = range_limit[(int) IRIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK]; - outptr[1] = range_limit[(int) IRIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK]; - - /* Row 1 */ - outptr = output_buf[1] + output_col; - - outptr[0] = range_limit[(int) IRIGHT_SHIFT(tmp2 + tmp3, 3) & RANGE_MASK]; - outptr[1] = range_limit[(int) IRIGHT_SHIFT(tmp2 - tmp3, 3) & RANGE_MASK]; -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a reduced-size 1x1 output block. - * - * We hardly need an inverse DCT routine for this: just take the - * average pixel value, which is one-eighth of the DC coefficient. - */ - -GLOBAL(void) -jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - DCTELEM dcval; - ISLOW_MULT_TYPE * quantptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - ISHIFT_TEMPS - - /* 1x1 is trivial: just take the DC coefficient divided by 8. */ - - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - - dcval = DEQUANTIZE(coef_block[0], quantptr[0]); - /* Add range center and fudge factor for descale and range-limit. */ - dcval += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2); - - output_buf[0][output_col] = - range_limit[(int) IRIGHT_SHIFT(dcval, 3) & RANGE_MASK]; -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 9x9 output block. - * - * Optimized algorithm with 10 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/18). - */ - -GLOBAL(void) -jpeg_idct_9x9 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13, tmp14; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*9]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp0 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); - - z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - tmp3 = MULTIPLY(z3, FIX(0.707106781)); /* c6 */ - tmp1 = tmp0 + tmp3; - tmp2 = tmp0 - tmp3 - tmp3; - - tmp0 = MULTIPLY(z1 - z2, FIX(0.707106781)); /* c6 */ - tmp11 = tmp2 + tmp0; - tmp14 = tmp2 - tmp0 - tmp0; - - tmp0 = MULTIPLY(z1 + z2, FIX(1.328926049)); /* c2 */ - tmp2 = MULTIPLY(z1, FIX(1.083350441)); /* c4 */ - tmp3 = MULTIPLY(z2, FIX(0.245575608)); /* c8 */ - - tmp10 = tmp1 + tmp0 - tmp3; - tmp12 = tmp1 - tmp0 + tmp2; - tmp13 = tmp1 - tmp2 + tmp3; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - z2 = MULTIPLY(z2, - FIX(1.224744871)); /* -c3 */ - - tmp2 = MULTIPLY(z1 + z3, FIX(0.909038955)); /* c5 */ - tmp3 = MULTIPLY(z1 + z4, FIX(0.483689525)); /* c7 */ - tmp0 = tmp2 + tmp3 - z2; - tmp1 = MULTIPLY(z3 - z4, FIX(1.392728481)); /* c1 */ - tmp2 += z2 - tmp1; - tmp3 += z2 + tmp1; - tmp1 = MULTIPLY(z1 - z3 - z4, FIX(1.224744871)); /* c3 */ - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[8*8] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) RIGHT_SHIFT(tmp11 + tmp1, CONST_BITS-PASS1_BITS); - wsptr[8*7] = (int) RIGHT_SHIFT(tmp11 - tmp1, CONST_BITS-PASS1_BITS); - wsptr[8*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS); - wsptr[8*6] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS); - wsptr[8*3] = (int) RIGHT_SHIFT(tmp13 + tmp3, CONST_BITS-PASS1_BITS); - wsptr[8*5] = (int) RIGHT_SHIFT(tmp13 - tmp3, CONST_BITS-PASS1_BITS); - wsptr[8*4] = (int) RIGHT_SHIFT(tmp14, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 9 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 9; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp0 <<= CONST_BITS; - - z1 = (INT32) wsptr[2]; - z2 = (INT32) wsptr[4]; - z3 = (INT32) wsptr[6]; - - tmp3 = MULTIPLY(z3, FIX(0.707106781)); /* c6 */ - tmp1 = tmp0 + tmp3; - tmp2 = tmp0 - tmp3 - tmp3; - - tmp0 = MULTIPLY(z1 - z2, FIX(0.707106781)); /* c6 */ - tmp11 = tmp2 + tmp0; - tmp14 = tmp2 - tmp0 - tmp0; - - tmp0 = MULTIPLY(z1 + z2, FIX(1.328926049)); /* c2 */ - tmp2 = MULTIPLY(z1, FIX(1.083350441)); /* c4 */ - tmp3 = MULTIPLY(z2, FIX(0.245575608)); /* c8 */ - - tmp10 = tmp1 + tmp0 - tmp3; - tmp12 = tmp1 - tmp0 + tmp2; - tmp13 = tmp1 - tmp2 + tmp3; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - z4 = (INT32) wsptr[7]; - - z2 = MULTIPLY(z2, - FIX(1.224744871)); /* -c3 */ - - tmp2 = MULTIPLY(z1 + z3, FIX(0.909038955)); /* c5 */ - tmp3 = MULTIPLY(z1 + z4, FIX(0.483689525)); /* c7 */ - tmp0 = tmp2 + tmp3 - z2; - tmp1 = MULTIPLY(z3 - z4, FIX(1.392728481)); /* c1 */ - tmp2 += z2 - tmp1; - tmp3 += z2 + tmp1; - tmp1 = MULTIPLY(z1 - z3 - z4, FIX(1.224744871)); /* c3 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 10x10 output block. - * - * Optimized algorithm with 12 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/20). - */ - -GLOBAL(void) -jpeg_idct_10x10 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24; - INT32 z1, z2, z3, z4, z5; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*10]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z3 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - z3 += ONE << (CONST_BITS-PASS1_BITS-1); - z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */ - z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */ - tmp10 = z3 + z1; - tmp11 = z3 - z2; - - tmp22 = RIGHT_SHIFT(z3 - ((z1 - z2) << 1), /* c0 = (c4-c8)*2 */ - CONST_BITS-PASS1_BITS); - - z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */ - tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */ - tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */ - - tmp20 = tmp10 + tmp12; - tmp24 = tmp10 - tmp12; - tmp21 = tmp11 + tmp13; - tmp23 = tmp11 - tmp13; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - tmp11 = z2 + z4; - tmp13 = z2 - z4; - - tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */ - z5 = z3 << CONST_BITS; - - z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */ - z4 = z5 + tmp12; - - tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */ - tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */ - - z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */ - z4 = z5 - tmp12 - (tmp13 << (CONST_BITS - 1)); - - tmp12 = (z1 - tmp13 - z3) << PASS1_BITS; - - tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */ - tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */ - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*9] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*8] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*2] = (int) (tmp22 + tmp12); - wsptr[8*7] = (int) (tmp22 - tmp12); - wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*6] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*5] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 10 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 10; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - z3 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - z3 <<= CONST_BITS; - z4 = (INT32) wsptr[4]; - z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */ - z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */ - tmp10 = z3 + z1; - tmp11 = z3 - z2; - - tmp22 = z3 - ((z1 - z2) << 1); /* c0 = (c4-c8)*2 */ - - z2 = (INT32) wsptr[2]; - z3 = (INT32) wsptr[6]; - - z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */ - tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */ - tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */ - - tmp20 = tmp10 + tmp12; - tmp24 = tmp10 - tmp12; - tmp21 = tmp11 + tmp13; - tmp23 = tmp11 - tmp13; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - z3 <<= CONST_BITS; - z4 = (INT32) wsptr[7]; - - tmp11 = z2 + z4; - tmp13 = z2 - z4; - - tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */ - - z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */ - z4 = z3 + tmp12; - - tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */ - tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */ - - z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */ - z4 = z3 - tmp12 - (tmp13 << (CONST_BITS - 1)); - - tmp12 = ((z1 - tmp13) << CONST_BITS) - z3; - - tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */ - tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing an 11x11 output block. - * - * Optimized algorithm with 24 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/22). - */ - -GLOBAL(void) -jpeg_idct_11x11 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*11]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp10 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp10 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp10 += ONE << (CONST_BITS-PASS1_BITS-1); - - z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - tmp20 = MULTIPLY(z2 - z3, FIX(2.546640132)); /* c2+c4 */ - tmp23 = MULTIPLY(z2 - z1, FIX(0.430815045)); /* c2-c6 */ - z4 = z1 + z3; - tmp24 = MULTIPLY(z4, - FIX(1.155664402)); /* -(c2-c10) */ - z4 -= z2; - tmp25 = tmp10 + MULTIPLY(z4, FIX(1.356927976)); /* c2 */ - tmp21 = tmp20 + tmp23 + tmp25 - - MULTIPLY(z2, FIX(1.821790775)); /* c2+c4+c10-c6 */ - tmp20 += tmp25 + MULTIPLY(z3, FIX(2.115825087)); /* c4+c6 */ - tmp23 += tmp25 - MULTIPLY(z1, FIX(1.513598477)); /* c6+c8 */ - tmp24 += tmp25; - tmp22 = tmp24 - MULTIPLY(z3, FIX(0.788749120)); /* c8+c10 */ - tmp24 += MULTIPLY(z2, FIX(1.944413522)) - /* c2+c8 */ - MULTIPLY(z1, FIX(1.390975730)); /* c4+c10 */ - tmp25 = tmp10 - MULTIPLY(z4, FIX(1.414213562)); /* c0 */ - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - tmp11 = z1 + z2; - tmp14 = MULTIPLY(tmp11 + z3 + z4, FIX(0.398430003)); /* c9 */ - tmp11 = MULTIPLY(tmp11, FIX(0.887983902)); /* c3-c9 */ - tmp12 = MULTIPLY(z1 + z3, FIX(0.670361295)); /* c5-c9 */ - tmp13 = tmp14 + MULTIPLY(z1 + z4, FIX(0.366151574)); /* c7-c9 */ - tmp10 = tmp11 + tmp12 + tmp13 - - MULTIPLY(z1, FIX(0.923107866)); /* c7+c5+c3-c1-2*c9 */ - z1 = tmp14 - MULTIPLY(z2 + z3, FIX(1.163011579)); /* c7+c9 */ - tmp11 += z1 + MULTIPLY(z2, FIX(2.073276588)); /* c1+c7+3*c9-c3 */ - tmp12 += z1 - MULTIPLY(z3, FIX(1.192193623)); /* c3+c5-c7-c9 */ - z1 = MULTIPLY(z2 + z4, - FIX(1.798248910)); /* -(c1+c9) */ - tmp11 += z1; - tmp13 += z1 + MULTIPLY(z4, FIX(2.102458632)); /* c1+c5+c9-c7 */ - tmp14 += MULTIPLY(z2, - FIX(1.467221301)) + /* -(c5+c9) */ - MULTIPLY(z3, FIX(1.001388905)) - /* c1-c9 */ - MULTIPLY(z4, FIX(1.684843907)); /* c3+c9 */ - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*10] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*9] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*8] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*7] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*6] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*5] = (int) RIGHT_SHIFT(tmp25, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 11 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 11; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp10 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp10 <<= CONST_BITS; - - z1 = (INT32) wsptr[2]; - z2 = (INT32) wsptr[4]; - z3 = (INT32) wsptr[6]; - - tmp20 = MULTIPLY(z2 - z3, FIX(2.546640132)); /* c2+c4 */ - tmp23 = MULTIPLY(z2 - z1, FIX(0.430815045)); /* c2-c6 */ - z4 = z1 + z3; - tmp24 = MULTIPLY(z4, - FIX(1.155664402)); /* -(c2-c10) */ - z4 -= z2; - tmp25 = tmp10 + MULTIPLY(z4, FIX(1.356927976)); /* c2 */ - tmp21 = tmp20 + tmp23 + tmp25 - - MULTIPLY(z2, FIX(1.821790775)); /* c2+c4+c10-c6 */ - tmp20 += tmp25 + MULTIPLY(z3, FIX(2.115825087)); /* c4+c6 */ - tmp23 += tmp25 - MULTIPLY(z1, FIX(1.513598477)); /* c6+c8 */ - tmp24 += tmp25; - tmp22 = tmp24 - MULTIPLY(z3, FIX(0.788749120)); /* c8+c10 */ - tmp24 += MULTIPLY(z2, FIX(1.944413522)) - /* c2+c8 */ - MULTIPLY(z1, FIX(1.390975730)); /* c4+c10 */ - tmp25 = tmp10 - MULTIPLY(z4, FIX(1.414213562)); /* c0 */ - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - z4 = (INT32) wsptr[7]; - - tmp11 = z1 + z2; - tmp14 = MULTIPLY(tmp11 + z3 + z4, FIX(0.398430003)); /* c9 */ - tmp11 = MULTIPLY(tmp11, FIX(0.887983902)); /* c3-c9 */ - tmp12 = MULTIPLY(z1 + z3, FIX(0.670361295)); /* c5-c9 */ - tmp13 = tmp14 + MULTIPLY(z1 + z4, FIX(0.366151574)); /* c7-c9 */ - tmp10 = tmp11 + tmp12 + tmp13 - - MULTIPLY(z1, FIX(0.923107866)); /* c7+c5+c3-c1-2*c9 */ - z1 = tmp14 - MULTIPLY(z2 + z3, FIX(1.163011579)); /* c7+c9 */ - tmp11 += z1 + MULTIPLY(z2, FIX(2.073276588)); /* c1+c7+3*c9-c3 */ - tmp12 += z1 - MULTIPLY(z3, FIX(1.192193623)); /* c3+c5-c7-c9 */ - z1 = MULTIPLY(z2 + z4, - FIX(1.798248910)); /* -(c1+c9) */ - tmp11 += z1; - tmp13 += z1 + MULTIPLY(z4, FIX(2.102458632)); /* c1+c5+c9-c7 */ - tmp14 += MULTIPLY(z2, - FIX(1.467221301)) + /* -(c5+c9) */ - MULTIPLY(z3, FIX(1.001388905)) - /* c1-c9 */ - MULTIPLY(z4, FIX(1.684843907)); /* c3+c9 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 12x12 output block. - * - * Optimized algorithm with 15 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/24). - */ - -GLOBAL(void) -jpeg_idct_12x12 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*12]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z3 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - z3 += ONE << (CONST_BITS-PASS1_BITS-1); - - z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */ - - tmp10 = z3 + z4; - tmp11 = z3 - z4; - - z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */ - z1 <<= CONST_BITS; - z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - z2 <<= CONST_BITS; - - tmp12 = z1 - z2; - - tmp21 = z3 + tmp12; - tmp24 = z3 - tmp12; - - tmp12 = z4 + z2; - - tmp20 = tmp10 + tmp12; - tmp25 = tmp10 - tmp12; - - tmp12 = z4 - z1 - z2; - - tmp22 = tmp11 + tmp12; - tmp23 = tmp11 - tmp12; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */ - tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */ - - tmp10 = z1 + z3; - tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */ - tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */ - tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */ - tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */ - tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */ - tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */ - tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */ - MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */ - - z1 -= z4; - z2 -= z3; - z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */ - tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */ - tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */ - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*11] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*10] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*9] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*8] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*7] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); - wsptr[8*6] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 12 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 12; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - z3 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - z3 <<= CONST_BITS; - - z4 = (INT32) wsptr[4]; - z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */ - - tmp10 = z3 + z4; - tmp11 = z3 - z4; - - z1 = (INT32) wsptr[2]; - z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */ - z1 <<= CONST_BITS; - z2 = (INT32) wsptr[6]; - z2 <<= CONST_BITS; - - tmp12 = z1 - z2; - - tmp21 = z3 + tmp12; - tmp24 = z3 - tmp12; - - tmp12 = z4 + z2; - - tmp20 = tmp10 + tmp12; - tmp25 = tmp10 - tmp12; - - tmp12 = z4 - z1 - z2; - - tmp22 = tmp11 + tmp12; - tmp23 = tmp11 - tmp12; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - z4 = (INT32) wsptr[7]; - - tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */ - tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */ - - tmp10 = z1 + z3; - tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */ - tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */ - tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */ - tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */ - tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */ - tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */ - tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */ - MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */ - - z1 -= z4; - z2 -= z3; - z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */ - tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */ - tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 13x13 output block. - * - * Optimized algorithm with 29 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/26). - */ - -GLOBAL(void) -jpeg_idct_13x13 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*13]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z1 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS-PASS1_BITS-1); - - z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z4 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - tmp10 = z3 + z4; - tmp11 = z3 - z4; - - tmp12 = MULTIPLY(tmp10, FIX(1.155388986)); /* (c4+c6)/2 */ - tmp13 = MULTIPLY(tmp11, FIX(0.096834934)) + z1; /* (c4-c6)/2 */ - - tmp20 = MULTIPLY(z2, FIX(1.373119086)) + tmp12 + tmp13; /* c2 */ - tmp22 = MULTIPLY(z2, FIX(0.501487041)) - tmp12 + tmp13; /* c10 */ - - tmp12 = MULTIPLY(tmp10, FIX(0.316450131)); /* (c8-c12)/2 */ - tmp13 = MULTIPLY(tmp11, FIX(0.486914739)) + z1; /* (c8+c12)/2 */ - - tmp21 = MULTIPLY(z2, FIX(1.058554052)) - tmp12 + tmp13; /* c6 */ - tmp25 = MULTIPLY(z2, - FIX(1.252223920)) + tmp12 + tmp13; /* c4 */ - - tmp12 = MULTIPLY(tmp10, FIX(0.435816023)); /* (c2-c10)/2 */ - tmp13 = MULTIPLY(tmp11, FIX(0.937303064)) - z1; /* (c2+c10)/2 */ - - tmp23 = MULTIPLY(z2, - FIX(0.170464608)) - tmp12 - tmp13; /* c12 */ - tmp24 = MULTIPLY(z2, - FIX(0.803364869)) + tmp12 - tmp13; /* c8 */ - - tmp26 = MULTIPLY(tmp11 - z2, FIX(1.414213562)) + z1; /* c0 */ - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - tmp11 = MULTIPLY(z1 + z2, FIX(1.322312651)); /* c3 */ - tmp12 = MULTIPLY(z1 + z3, FIX(1.163874945)); /* c5 */ - tmp15 = z1 + z4; - tmp13 = MULTIPLY(tmp15, FIX(0.937797057)); /* c7 */ - tmp10 = tmp11 + tmp12 + tmp13 - - MULTIPLY(z1, FIX(2.020082300)); /* c7+c5+c3-c1 */ - tmp14 = MULTIPLY(z2 + z3, - FIX(0.338443458)); /* -c11 */ - tmp11 += tmp14 + MULTIPLY(z2, FIX(0.837223564)); /* c5+c9+c11-c3 */ - tmp12 += tmp14 - MULTIPLY(z3, FIX(1.572116027)); /* c1+c5-c9-c11 */ - tmp14 = MULTIPLY(z2 + z4, - FIX(1.163874945)); /* -c5 */ - tmp11 += tmp14; - tmp13 += tmp14 + MULTIPLY(z4, FIX(2.205608352)); /* c3+c5+c9-c7 */ - tmp14 = MULTIPLY(z3 + z4, - FIX(0.657217813)); /* -c9 */ - tmp12 += tmp14; - tmp13 += tmp14; - tmp15 = MULTIPLY(tmp15, FIX(0.338443458)); /* c11 */ - tmp14 = tmp15 + MULTIPLY(z1, FIX(0.318774355)) - /* c9-c11 */ - MULTIPLY(z2, FIX(0.466105296)); /* c1-c7 */ - z1 = MULTIPLY(z3 - z2, FIX(0.937797057)); /* c7 */ - tmp14 += z1; - tmp15 += z1 + MULTIPLY(z3, FIX(0.384515595)) - /* c3-c7 */ - MULTIPLY(z4, FIX(1.742345811)); /* c1+c11 */ - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*12] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*11] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*10] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*9] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*8] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); - wsptr[8*7] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); - wsptr[8*6] = (int) RIGHT_SHIFT(tmp26, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 13 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 13; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - z1 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - z1 <<= CONST_BITS; - - z2 = (INT32) wsptr[2]; - z3 = (INT32) wsptr[4]; - z4 = (INT32) wsptr[6]; - - tmp10 = z3 + z4; - tmp11 = z3 - z4; - - tmp12 = MULTIPLY(tmp10, FIX(1.155388986)); /* (c4+c6)/2 */ - tmp13 = MULTIPLY(tmp11, FIX(0.096834934)) + z1; /* (c4-c6)/2 */ - - tmp20 = MULTIPLY(z2, FIX(1.373119086)) + tmp12 + tmp13; /* c2 */ - tmp22 = MULTIPLY(z2, FIX(0.501487041)) - tmp12 + tmp13; /* c10 */ - - tmp12 = MULTIPLY(tmp10, FIX(0.316450131)); /* (c8-c12)/2 */ - tmp13 = MULTIPLY(tmp11, FIX(0.486914739)) + z1; /* (c8+c12)/2 */ - - tmp21 = MULTIPLY(z2, FIX(1.058554052)) - tmp12 + tmp13; /* c6 */ - tmp25 = MULTIPLY(z2, - FIX(1.252223920)) + tmp12 + tmp13; /* c4 */ - - tmp12 = MULTIPLY(tmp10, FIX(0.435816023)); /* (c2-c10)/2 */ - tmp13 = MULTIPLY(tmp11, FIX(0.937303064)) - z1; /* (c2+c10)/2 */ - - tmp23 = MULTIPLY(z2, - FIX(0.170464608)) - tmp12 - tmp13; /* c12 */ - tmp24 = MULTIPLY(z2, - FIX(0.803364869)) + tmp12 - tmp13; /* c8 */ - - tmp26 = MULTIPLY(tmp11 - z2, FIX(1.414213562)) + z1; /* c0 */ - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - z4 = (INT32) wsptr[7]; - - tmp11 = MULTIPLY(z1 + z2, FIX(1.322312651)); /* c3 */ - tmp12 = MULTIPLY(z1 + z3, FIX(1.163874945)); /* c5 */ - tmp15 = z1 + z4; - tmp13 = MULTIPLY(tmp15, FIX(0.937797057)); /* c7 */ - tmp10 = tmp11 + tmp12 + tmp13 - - MULTIPLY(z1, FIX(2.020082300)); /* c7+c5+c3-c1 */ - tmp14 = MULTIPLY(z2 + z3, - FIX(0.338443458)); /* -c11 */ - tmp11 += tmp14 + MULTIPLY(z2, FIX(0.837223564)); /* c5+c9+c11-c3 */ - tmp12 += tmp14 - MULTIPLY(z3, FIX(1.572116027)); /* c1+c5-c9-c11 */ - tmp14 = MULTIPLY(z2 + z4, - FIX(1.163874945)); /* -c5 */ - tmp11 += tmp14; - tmp13 += tmp14 + MULTIPLY(z4, FIX(2.205608352)); /* c3+c5+c9-c7 */ - tmp14 = MULTIPLY(z3 + z4, - FIX(0.657217813)); /* -c9 */ - tmp12 += tmp14; - tmp13 += tmp14; - tmp15 = MULTIPLY(tmp15, FIX(0.338443458)); /* c11 */ - tmp14 = tmp15 + MULTIPLY(z1, FIX(0.318774355)) - /* c9-c11 */ - MULTIPLY(z2, FIX(0.466105296)); /* c1-c7 */ - z1 = MULTIPLY(z3 - z2, FIX(0.937797057)); /* c7 */ - tmp14 += z1; - tmp15 += z1 + MULTIPLY(z3, FIX(0.384515595)) - /* c3-c7 */ - MULTIPLY(z4, FIX(1.742345811)); /* c1+c11 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 14x14 output block. - * - * Optimized algorithm with 20 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/28). - */ - -GLOBAL(void) -jpeg_idct_14x14 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*14]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z1 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS-PASS1_BITS-1); - z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */ - z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */ - z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */ - - tmp10 = z1 + z2; - tmp11 = z1 + z3; - tmp12 = z1 - z4; - - tmp23 = RIGHT_SHIFT(z1 - ((z2 + z3 - z4) << 1), /* c0 = (c4+c12-c8)*2 */ - CONST_BITS-PASS1_BITS); - - z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */ - - tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */ - tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */ - tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */ - MULTIPLY(z2, FIX(1.378756276)); /* c2 */ - - tmp20 = tmp10 + tmp13; - tmp26 = tmp10 - tmp13; - tmp21 = tmp11 + tmp14; - tmp25 = tmp11 - tmp14; - tmp22 = tmp12 + tmp15; - tmp24 = tmp12 - tmp15; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - tmp13 = z4 << CONST_BITS; - - tmp14 = z1 + z3; - tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */ - tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */ - tmp10 = tmp11 + tmp12 + tmp13 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */ - tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */ - tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */ - z1 -= z2; - tmp15 = MULTIPLY(z1, FIX(0.467085129)) - tmp13; /* c11 */ - tmp16 += tmp15; - z1 += z4; - z4 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - tmp13; /* -c13 */ - tmp11 += z4 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */ - tmp12 += z4 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */ - z4 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */ - tmp14 += z4 + tmp13 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */ - tmp15 += z4 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */ - - tmp13 = (z1 - z3) << PASS1_BITS; - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*13] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*12] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*11] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*3] = (int) (tmp23 + tmp13); - wsptr[8*10] = (int) (tmp23 - tmp13); - wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*9] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); - wsptr[8*8] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); - wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp16, CONST_BITS-PASS1_BITS); - wsptr[8*7] = (int) RIGHT_SHIFT(tmp26 - tmp16, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 14 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 14; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - z1 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - z1 <<= CONST_BITS; - z4 = (INT32) wsptr[4]; - z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */ - z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */ - z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */ - - tmp10 = z1 + z2; - tmp11 = z1 + z3; - tmp12 = z1 - z4; - - tmp23 = z1 - ((z2 + z3 - z4) << 1); /* c0 = (c4+c12-c8)*2 */ - - z1 = (INT32) wsptr[2]; - z2 = (INT32) wsptr[6]; - - z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */ - - tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */ - tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */ - tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */ - MULTIPLY(z2, FIX(1.378756276)); /* c2 */ - - tmp20 = tmp10 + tmp13; - tmp26 = tmp10 - tmp13; - tmp21 = tmp11 + tmp14; - tmp25 = tmp11 - tmp14; - tmp22 = tmp12 + tmp15; - tmp24 = tmp12 - tmp15; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - z4 = (INT32) wsptr[7]; - z4 <<= CONST_BITS; - - tmp14 = z1 + z3; - tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */ - tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */ - tmp10 = tmp11 + tmp12 + z4 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */ - tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */ - tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */ - z1 -= z2; - tmp15 = MULTIPLY(z1, FIX(0.467085129)) - z4; /* c11 */ - tmp16 += tmp15; - tmp13 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - z4; /* -c13 */ - tmp11 += tmp13 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */ - tmp12 += tmp13 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */ - tmp13 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */ - tmp14 += tmp13 + z4 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */ - tmp15 += tmp13 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */ - - tmp13 = ((z1 - z3) << CONST_BITS) + z4; - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp16, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp16, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 15x15 output block. - * - * Optimized algorithm with 22 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/30). - */ - -GLOBAL(void) -jpeg_idct_15x15 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*15]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z1 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS-PASS1_BITS-1); - - z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z4 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - tmp10 = MULTIPLY(z4, FIX(0.437016024)); /* c12 */ - tmp11 = MULTIPLY(z4, FIX(1.144122806)); /* c6 */ - - tmp12 = z1 - tmp10; - tmp13 = z1 + tmp11; - z1 -= (tmp11 - tmp10) << 1; /* c0 = (c6-c12)*2 */ - - z4 = z2 - z3; - z3 += z2; - tmp10 = MULTIPLY(z3, FIX(1.337628990)); /* (c2+c4)/2 */ - tmp11 = MULTIPLY(z4, FIX(0.045680613)); /* (c2-c4)/2 */ - z2 = MULTIPLY(z2, FIX(1.439773946)); /* c4+c14 */ - - tmp20 = tmp13 + tmp10 + tmp11; - tmp23 = tmp12 - tmp10 + tmp11 + z2; - - tmp10 = MULTIPLY(z3, FIX(0.547059574)); /* (c8+c14)/2 */ - tmp11 = MULTIPLY(z4, FIX(0.399234004)); /* (c8-c14)/2 */ - - tmp25 = tmp13 - tmp10 - tmp11; - tmp26 = tmp12 + tmp10 - tmp11 - z2; - - tmp10 = MULTIPLY(z3, FIX(0.790569415)); /* (c6+c12)/2 */ - tmp11 = MULTIPLY(z4, FIX(0.353553391)); /* (c6-c12)/2 */ - - tmp21 = tmp12 + tmp10 + tmp11; - tmp24 = tmp13 - tmp10 + tmp11; - tmp11 += tmp11; - tmp22 = z1 + tmp11; /* c10 = c6-c12 */ - tmp27 = z1 - tmp11 - tmp11; /* c0 = (c6-c12)*2 */ - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z4 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z3 = MULTIPLY(z4, FIX(1.224744871)); /* c5 */ - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - tmp13 = z2 - z4; - tmp15 = MULTIPLY(z1 + tmp13, FIX(0.831253876)); /* c9 */ - tmp11 = tmp15 + MULTIPLY(z1, FIX(0.513743148)); /* c3-c9 */ - tmp14 = tmp15 - MULTIPLY(tmp13, FIX(2.176250899)); /* c3+c9 */ - - tmp13 = MULTIPLY(z2, - FIX(0.831253876)); /* -c9 */ - tmp15 = MULTIPLY(z2, - FIX(1.344997024)); /* -c3 */ - z2 = z1 - z4; - tmp12 = z3 + MULTIPLY(z2, FIX(1.406466353)); /* c1 */ - - tmp10 = tmp12 + MULTIPLY(z4, FIX(2.457431844)) - tmp15; /* c1+c7 */ - tmp16 = tmp12 - MULTIPLY(z1, FIX(1.112434820)) + tmp13; /* c1-c13 */ - tmp12 = MULTIPLY(z2, FIX(1.224744871)) - z3; /* c5 */ - z2 = MULTIPLY(z1 + z4, FIX(0.575212477)); /* c11 */ - tmp13 += z2 + MULTIPLY(z1, FIX(0.475753014)) - z3; /* c7-c11 */ - tmp15 += z2 - MULTIPLY(z4, FIX(0.869244010)) + z3; /* c11+c13 */ - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*14] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*13] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*12] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*11] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*10] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); - wsptr[8*9] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); - wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp16, CONST_BITS-PASS1_BITS); - wsptr[8*8] = (int) RIGHT_SHIFT(tmp26 - tmp16, CONST_BITS-PASS1_BITS); - wsptr[8*7] = (int) RIGHT_SHIFT(tmp27, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 15 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 15; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - z1 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - z1 <<= CONST_BITS; - - z2 = (INT32) wsptr[2]; - z3 = (INT32) wsptr[4]; - z4 = (INT32) wsptr[6]; - - tmp10 = MULTIPLY(z4, FIX(0.437016024)); /* c12 */ - tmp11 = MULTIPLY(z4, FIX(1.144122806)); /* c6 */ - - tmp12 = z1 - tmp10; - tmp13 = z1 + tmp11; - z1 -= (tmp11 - tmp10) << 1; /* c0 = (c6-c12)*2 */ - - z4 = z2 - z3; - z3 += z2; - tmp10 = MULTIPLY(z3, FIX(1.337628990)); /* (c2+c4)/2 */ - tmp11 = MULTIPLY(z4, FIX(0.045680613)); /* (c2-c4)/2 */ - z2 = MULTIPLY(z2, FIX(1.439773946)); /* c4+c14 */ - - tmp20 = tmp13 + tmp10 + tmp11; - tmp23 = tmp12 - tmp10 + tmp11 + z2; - - tmp10 = MULTIPLY(z3, FIX(0.547059574)); /* (c8+c14)/2 */ - tmp11 = MULTIPLY(z4, FIX(0.399234004)); /* (c8-c14)/2 */ - - tmp25 = tmp13 - tmp10 - tmp11; - tmp26 = tmp12 + tmp10 - tmp11 - z2; - - tmp10 = MULTIPLY(z3, FIX(0.790569415)); /* (c6+c12)/2 */ - tmp11 = MULTIPLY(z4, FIX(0.353553391)); /* (c6-c12)/2 */ - - tmp21 = tmp12 + tmp10 + tmp11; - tmp24 = tmp13 - tmp10 + tmp11; - tmp11 += tmp11; - tmp22 = z1 + tmp11; /* c10 = c6-c12 */ - tmp27 = z1 - tmp11 - tmp11; /* c0 = (c6-c12)*2 */ - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z4 = (INT32) wsptr[5]; - z3 = MULTIPLY(z4, FIX(1.224744871)); /* c5 */ - z4 = (INT32) wsptr[7]; - - tmp13 = z2 - z4; - tmp15 = MULTIPLY(z1 + tmp13, FIX(0.831253876)); /* c9 */ - tmp11 = tmp15 + MULTIPLY(z1, FIX(0.513743148)); /* c3-c9 */ - tmp14 = tmp15 - MULTIPLY(tmp13, FIX(2.176250899)); /* c3+c9 */ - - tmp13 = MULTIPLY(z2, - FIX(0.831253876)); /* -c9 */ - tmp15 = MULTIPLY(z2, - FIX(1.344997024)); /* -c3 */ - z2 = z1 - z4; - tmp12 = z3 + MULTIPLY(z2, FIX(1.406466353)); /* c1 */ - - tmp10 = tmp12 + MULTIPLY(z4, FIX(2.457431844)) - tmp15; /* c1+c7 */ - tmp16 = tmp12 - MULTIPLY(z1, FIX(1.112434820)) + tmp13; /* c1-c13 */ - tmp12 = MULTIPLY(z2, FIX(1.224744871)) - z3; /* c5 */ - z2 = MULTIPLY(z1 + z4, FIX(0.575212477)); /* c11 */ - tmp13 += z2 + MULTIPLY(z1, FIX(0.475753014)) - z3; /* c7-c11 */ - tmp15 += z2 - MULTIPLY(z4, FIX(0.869244010)) + z3; /* c11+c13 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[14] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp16, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp16, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp27, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 16x16 output block. - * - * Optimized algorithm with 28 multiplications in the 1-D kernel. - * cK represents sqrt(2) * cos(K*pi/32). - */ - -GLOBAL(void) -jpeg_idct_16x16 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*16]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp0 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); - - z1 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */ - tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */ - - tmp10 = tmp0 + tmp1; - tmp11 = tmp0 - tmp1; - tmp12 = tmp0 + tmp2; - tmp13 = tmp0 - tmp2; - - z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - z3 = z1 - z2; - z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */ - z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */ - - tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */ - tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */ - tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */ - tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */ - - tmp20 = tmp10 + tmp0; - tmp27 = tmp10 - tmp0; - tmp21 = tmp12 + tmp1; - tmp26 = tmp12 - tmp1; - tmp22 = tmp13 + tmp2; - tmp25 = tmp13 - tmp2; - tmp23 = tmp11 + tmp3; - tmp24 = tmp11 - tmp3; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - tmp11 = z1 + z3; - - tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */ - tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */ - tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */ - tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */ - tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */ - tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */ - tmp0 = tmp1 + tmp2 + tmp3 - - MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */ - tmp13 = tmp10 + tmp11 + tmp12 - - MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */ - z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */ - tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */ - tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */ - z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */ - tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */ - tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */ - z2 += z4; - z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */ - tmp1 += z1; - tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */ - z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */ - tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */ - tmp12 += z2; - z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */ - tmp2 += z2; - tmp3 += z2; - z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */ - tmp10 += z2; - tmp11 += z2; - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[8*15] = (int) RIGHT_SHIFT(tmp20 - tmp0, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp1, CONST_BITS-PASS1_BITS); - wsptr[8*14] = (int) RIGHT_SHIFT(tmp21 - tmp1, CONST_BITS-PASS1_BITS); - wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp2, CONST_BITS-PASS1_BITS); - wsptr[8*13] = (int) RIGHT_SHIFT(tmp22 - tmp2, CONST_BITS-PASS1_BITS); - wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp3, CONST_BITS-PASS1_BITS); - wsptr[8*12] = (int) RIGHT_SHIFT(tmp23 - tmp3, CONST_BITS-PASS1_BITS); - wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*11] = (int) RIGHT_SHIFT(tmp24 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*10] = (int) RIGHT_SHIFT(tmp25 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*9] = (int) RIGHT_SHIFT(tmp26 - tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*7] = (int) RIGHT_SHIFT(tmp27 + tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*8] = (int) RIGHT_SHIFT(tmp27 - tmp13, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 16 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 16; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp0 <<= CONST_BITS; - - z1 = (INT32) wsptr[4]; - tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */ - tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */ - - tmp10 = tmp0 + tmp1; - tmp11 = tmp0 - tmp1; - tmp12 = tmp0 + tmp2; - tmp13 = tmp0 - tmp2; - - z1 = (INT32) wsptr[2]; - z2 = (INT32) wsptr[6]; - z3 = z1 - z2; - z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */ - z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */ - - tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */ - tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */ - tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */ - tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */ - - tmp20 = tmp10 + tmp0; - tmp27 = tmp10 - tmp0; - tmp21 = tmp12 + tmp1; - tmp26 = tmp12 - tmp1; - tmp22 = tmp13 + tmp2; - tmp25 = tmp13 - tmp2; - tmp23 = tmp11 + tmp3; - tmp24 = tmp11 - tmp3; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - z4 = (INT32) wsptr[7]; - - tmp11 = z1 + z3; - - tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */ - tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */ - tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */ - tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */ - tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */ - tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */ - tmp0 = tmp1 + tmp2 + tmp3 - - MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */ - tmp13 = tmp10 + tmp11 + tmp12 - - MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */ - z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */ - tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */ - tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */ - z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */ - tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */ - tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */ - z2 += z4; - z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */ - tmp1 += z1; - tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */ - z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */ - tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */ - tmp12 += z2; - z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */ - tmp2 += z2; - tmp3 += z2; - z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */ - tmp10 += z2; - tmp11 += z2; - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[15] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[14] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp27 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp27 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 16x8 output block. - * - * 8-point IDCT in pass 1 (columns), 16-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_16x8 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*8]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * Note results are scaled up by sqrt(8) compared to a true IDCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * 8-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/16). - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = DCTSIZE; ctr > 0; ctr--) { - /* Due to quantization, we will usually find that many of the input - * coefficients are zero, especially the AC terms. We can exploit this - * by short-circuiting the IDCT calculation for any column in which all - * the AC terms are zero. In that case each output is equal to the - * DC coefficient (with scale factor as needed). - * With typical images and quantization tables, half or more of the - * column DCT calculations can be simplified this way. - */ - - if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && - inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && - inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && - inptr[DCTSIZE*7] == 0) { - /* AC terms all zero */ - int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; - - wsptr[DCTSIZE*0] = dcval; - wsptr[DCTSIZE*1] = dcval; - wsptr[DCTSIZE*2] = dcval; - wsptr[DCTSIZE*3] = dcval; - wsptr[DCTSIZE*4] = dcval; - wsptr[DCTSIZE*5] = dcval; - wsptr[DCTSIZE*6] = dcval; - wsptr[DCTSIZE*7] = dcval; - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - continue; - } - - /* Even part: reverse the even part of the forward DCT. - * The rotator is c(-6). - */ - - z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z2 <<= CONST_BITS; - z3 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - z2 += ONE << (CONST_BITS-PASS1_BITS-1); - - tmp0 = z2 + z3; - tmp1 = z2 - z3; - - z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - tmp10 = tmp0 + tmp2; - tmp13 = tmp0 - tmp2; - tmp11 = tmp1 + tmp3; - tmp12 = tmp1 - tmp3; - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - - z2 = tmp0 + tmp2; - z3 = tmp1 + tmp3; - - z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ - z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ - z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ - z2 += z1; - z3 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp0 += z1 + z2; - tmp3 += z1 + z3; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp1 += z1 + z3; - tmp2 += z1 + z2; - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - wsptr[DCTSIZE*0] = (int) RIGHT_SHIFT(tmp10 + tmp3, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*7] = (int) RIGHT_SHIFT(tmp10 - tmp3, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*1] = (int) RIGHT_SHIFT(tmp11 + tmp2, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*6] = (int) RIGHT_SHIFT(tmp11 - tmp2, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*2] = (int) RIGHT_SHIFT(tmp12 + tmp1, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*5] = (int) RIGHT_SHIFT(tmp12 - tmp1, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*3] = (int) RIGHT_SHIFT(tmp13 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*4] = (int) RIGHT_SHIFT(tmp13 - tmp0, CONST_BITS-PASS1_BITS); - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - } - - /* Pass 2: process 8 rows from work array, store into output array. - * 16-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/32). - */ - - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp0 <<= CONST_BITS; - - z1 = (INT32) wsptr[4]; - tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */ - tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */ - - tmp10 = tmp0 + tmp1; - tmp11 = tmp0 - tmp1; - tmp12 = tmp0 + tmp2; - tmp13 = tmp0 - tmp2; - - z1 = (INT32) wsptr[2]; - z2 = (INT32) wsptr[6]; - z3 = z1 - z2; - z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */ - z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */ - - tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */ - tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */ - tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */ - tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */ - - tmp20 = tmp10 + tmp0; - tmp27 = tmp10 - tmp0; - tmp21 = tmp12 + tmp1; - tmp26 = tmp12 - tmp1; - tmp22 = tmp13 + tmp2; - tmp25 = tmp13 - tmp2; - tmp23 = tmp11 + tmp3; - tmp24 = tmp11 - tmp3; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - z4 = (INT32) wsptr[7]; - - tmp11 = z1 + z3; - - tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */ - tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */ - tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */ - tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */ - tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */ - tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */ - tmp0 = tmp1 + tmp2 + tmp3 - - MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */ - tmp13 = tmp10 + tmp11 + tmp12 - - MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */ - z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */ - tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */ - tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */ - z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */ - tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */ - tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */ - z2 += z4; - z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */ - tmp1 += z1; - tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */ - z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */ - tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */ - tmp12 += z2; - z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */ - tmp2 += z2; - tmp3 += z2; - z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */ - tmp10 += z2; - tmp11 += z2; - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[15] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[14] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp27 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp27 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 14x7 output block. - * - * 7-point IDCT in pass 1 (columns), 14-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_14x7 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*7]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * 7-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/14). - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp23 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp23 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp23 += ONE << (CONST_BITS-PASS1_BITS-1); - - z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - tmp20 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */ - tmp22 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */ - tmp21 = tmp20 + tmp22 + tmp23 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */ - tmp10 = z1 + z3; - z2 -= tmp10; - tmp10 = MULTIPLY(tmp10, FIX(1.274162392)) + tmp23; /* c2 */ - tmp20 += tmp10 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */ - tmp22 += tmp10 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */ - tmp23 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */ - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - - tmp11 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */ - tmp12 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */ - tmp10 = tmp11 - tmp12; - tmp11 += tmp12; - tmp12 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */ - tmp11 += tmp12; - z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */ - tmp10 += z2; - tmp12 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */ - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*6] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*5] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*4] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*3] = (int) RIGHT_SHIFT(tmp23, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 7 rows from work array, store into output array. - * 14-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/28). - */ - - wsptr = workspace; - for (ctr = 0; ctr < 7; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - z1 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - z1 <<= CONST_BITS; - z4 = (INT32) wsptr[4]; - z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */ - z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */ - z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */ - - tmp10 = z1 + z2; - tmp11 = z1 + z3; - tmp12 = z1 - z4; - - tmp23 = z1 - ((z2 + z3 - z4) << 1); /* c0 = (c4+c12-c8)*2 */ - - z1 = (INT32) wsptr[2]; - z2 = (INT32) wsptr[6]; - - z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */ - - tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */ - tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */ - tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */ - MULTIPLY(z2, FIX(1.378756276)); /* c2 */ - - tmp20 = tmp10 + tmp13; - tmp26 = tmp10 - tmp13; - tmp21 = tmp11 + tmp14; - tmp25 = tmp11 - tmp14; - tmp22 = tmp12 + tmp15; - tmp24 = tmp12 - tmp15; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - z4 = (INT32) wsptr[7]; - z4 <<= CONST_BITS; - - tmp14 = z1 + z3; - tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */ - tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */ - tmp10 = tmp11 + tmp12 + z4 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */ - tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */ - tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */ - z1 -= z2; - tmp15 = MULTIPLY(z1, FIX(0.467085129)) - z4; /* c11 */ - tmp16 += tmp15; - tmp13 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - z4; /* -c13 */ - tmp11 += tmp13 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */ - tmp12 += tmp13 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */ - tmp13 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */ - tmp14 += tmp13 + z4 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */ - tmp15 += tmp13 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */ - - tmp13 = ((z1 - z3) << CONST_BITS) + z4; - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp16, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp16, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 12x6 output block. - * - * 6-point IDCT in pass 1 (columns), 12-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_12x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*6]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12). - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp10 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp10 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp10 += ONE << (CONST_BITS-PASS1_BITS-1); - tmp12 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - tmp20 = MULTIPLY(tmp12, FIX(0.707106781)); /* c4 */ - tmp11 = tmp10 + tmp20; - tmp21 = RIGHT_SHIFT(tmp10 - tmp20 - tmp20, CONST_BITS-PASS1_BITS); - tmp20 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - tmp10 = MULTIPLY(tmp20, FIX(1.224744871)); /* c2 */ - tmp20 = tmp11 + tmp10; - tmp22 = tmp11 - tmp10; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp11 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ - tmp10 = tmp11 + ((z1 + z2) << CONST_BITS); - tmp12 = tmp11 + ((z3 - z2) << CONST_BITS); - tmp11 = (z1 - z2 - z3) << PASS1_BITS; - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*5] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) (tmp21 + tmp11); - wsptr[8*4] = (int) (tmp21 - tmp11); - wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*3] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 6 rows from work array, store into output array. - * 12-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/24). - */ - - wsptr = workspace; - for (ctr = 0; ctr < 6; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - z3 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - z3 <<= CONST_BITS; - - z4 = (INT32) wsptr[4]; - z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */ - - tmp10 = z3 + z4; - tmp11 = z3 - z4; - - z1 = (INT32) wsptr[2]; - z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */ - z1 <<= CONST_BITS; - z2 = (INT32) wsptr[6]; - z2 <<= CONST_BITS; - - tmp12 = z1 - z2; - - tmp21 = z3 + tmp12; - tmp24 = z3 - tmp12; - - tmp12 = z4 + z2; - - tmp20 = tmp10 + tmp12; - tmp25 = tmp10 - tmp12; - - tmp12 = z4 - z1 - z2; - - tmp22 = tmp11 + tmp12; - tmp23 = tmp11 - tmp12; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - z4 = (INT32) wsptr[7]; - - tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */ - tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */ - - tmp10 = z1 + z3; - tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */ - tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */ - tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */ - tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */ - tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */ - tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */ - tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */ - MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */ - - z1 -= z4; - z2 -= z3; - z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */ - tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */ - tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 10x5 output block. - * - * 5-point IDCT in pass 1 (columns), 10-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_10x5 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*5]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * 5-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/10). - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp12 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp12 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp12 += ONE << (CONST_BITS-PASS1_BITS-1); - tmp13 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - tmp14 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z1 = MULTIPLY(tmp13 + tmp14, FIX(0.790569415)); /* (c2+c4)/2 */ - z2 = MULTIPLY(tmp13 - tmp14, FIX(0.353553391)); /* (c2-c4)/2 */ - z3 = tmp12 + z2; - tmp10 = z3 + z1; - tmp11 = z3 - z1; - tmp12 -= z2 << 2; - - /* Odd part */ - - z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - - z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */ - tmp13 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */ - tmp14 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */ - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp10 + tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*4] = (int) RIGHT_SHIFT(tmp10 - tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) RIGHT_SHIFT(tmp11 + tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*3] = (int) RIGHT_SHIFT(tmp11 - tmp14, CONST_BITS-PASS1_BITS); - wsptr[8*2] = (int) RIGHT_SHIFT(tmp12, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 5 rows from work array, store into output array. - * 10-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/20). - */ - - wsptr = workspace; - for (ctr = 0; ctr < 5; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - z3 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - z3 <<= CONST_BITS; - z4 = (INT32) wsptr[4]; - z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */ - z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */ - tmp10 = z3 + z1; - tmp11 = z3 - z2; - - tmp22 = z3 - ((z1 - z2) << 1); /* c0 = (c4-c8)*2 */ - - z2 = (INT32) wsptr[2]; - z3 = (INT32) wsptr[6]; - - z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */ - tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */ - tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */ - - tmp20 = tmp10 + tmp12; - tmp24 = tmp10 - tmp12; - tmp21 = tmp11 + tmp13; - tmp23 = tmp11 - tmp13; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - z3 <<= CONST_BITS; - z4 = (INT32) wsptr[7]; - - tmp11 = z2 + z4; - tmp13 = z2 - z4; - - tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */ - - z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */ - z4 = z3 + tmp12; - - tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */ - tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */ - - z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */ - z4 = z3 - tmp12 - (tmp13 << (CONST_BITS - 1)); - - tmp12 = ((z1 - tmp13) << CONST_BITS) - z3; - - tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */ - tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 8; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing an 8x4 output block. - * - * 4-point IDCT in pass 1 (columns), 8-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_8x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2, z3; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*4]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * 4-point IDCT kernel, - * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT]. - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - - tmp10 = (tmp0 + tmp2) << PASS1_BITS; - tmp12 = (tmp0 - tmp2) << PASS1_BITS; - - /* Odd part */ - /* Same rotation as in the even part of the 8x8 LL&M IDCT */ - - z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS-PASS1_BITS-1); - tmp0 = RIGHT_SHIFT(z1 + MULTIPLY(z2, FIX_0_765366865), /* c2-c6 */ - CONST_BITS-PASS1_BITS); - tmp2 = RIGHT_SHIFT(z1 - MULTIPLY(z3, FIX_1_847759065), /* c2+c6 */ - CONST_BITS-PASS1_BITS); - - /* Final output stage */ - - wsptr[8*0] = (int) (tmp10 + tmp0); - wsptr[8*3] = (int) (tmp10 - tmp0); - wsptr[8*1] = (int) (tmp12 + tmp2); - wsptr[8*2] = (int) (tmp12 - tmp2); - } - - /* Pass 2: process rows from work array, store into output array. - * Note that we must descale the results by a factor of 8 == 2**3, - * and also undo the PASS1_BITS scaling. - * 8-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/16). - */ - - wsptr = workspace; - for (ctr = 0; ctr < 4; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part: reverse the even part of the forward DCT. - * The rotator is c(-6). - */ - - /* Add range center and fudge factor for final descale and range-limit. */ - z2 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - z3 = (INT32) wsptr[4]; - - tmp0 = (z2 + z3) << CONST_BITS; - tmp1 = (z2 - z3) << CONST_BITS; - - z2 = (INT32) wsptr[2]; - z3 = (INT32) wsptr[6]; - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - tmp10 = tmp0 + tmp2; - tmp13 = tmp0 - tmp2; - tmp11 = tmp1 + tmp3; - tmp12 = tmp1 - tmp3; - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - - tmp0 = (INT32) wsptr[7]; - tmp1 = (INT32) wsptr[5]; - tmp2 = (INT32) wsptr[3]; - tmp3 = (INT32) wsptr[1]; - - z2 = tmp0 + tmp2; - z3 = tmp1 + tmp3; - - z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ - z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ - z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ - z2 += z1; - z3 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp0 += z1 + z2; - tmp3 += z1 + z3; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp1 += z1 + z3; - tmp2 += z1 + z2; - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += DCTSIZE; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 6x3 output block. - * - * 3-point IDCT in pass 1 (columns), 6-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_6x3 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12; - INT32 z1, z2, z3; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[6*3]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * 3-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/6). - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 6; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp0 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */ - tmp10 = tmp0 + tmp12; - tmp2 = tmp0 - tmp12 - tmp12; - - /* Odd part */ - - tmp12 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */ - - /* Final output stage */ - - wsptr[6*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[6*2] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); - wsptr[6*1] = (int) RIGHT_SHIFT(tmp2, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 3 rows from work array, store into output array. - * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12). - */ - - wsptr = workspace; - for (ctr = 0; ctr < 3; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp0 <<= CONST_BITS; - tmp2 = (INT32) wsptr[4]; - tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */ - tmp1 = tmp0 + tmp10; - tmp11 = tmp0 - tmp10 - tmp10; - tmp10 = (INT32) wsptr[2]; - tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */ - tmp10 = tmp1 + tmp0; - tmp12 = tmp1 - tmp0; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ - tmp0 = tmp1 + ((z1 + z2) << CONST_BITS); - tmp2 = tmp1 + ((z3 - z2) << CONST_BITS); - tmp1 = (z1 - z2 - z3) << CONST_BITS; - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 6; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 4x2 output block. - * - * 2-point IDCT in pass 1 (columns), 4-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_4x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp2, tmp10, tmp12; - INT32 z1, z2, z3; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - INT32 * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - INT32 workspace[4*2]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 4; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp10 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - - /* Odd part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - - /* Final output stage */ - - wsptr[4*0] = tmp10 + tmp0; - wsptr[4*1] = tmp10 - tmp0; - } - - /* Pass 2: process 2 rows from work array, store into output array. - * 4-point IDCT kernel, - * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT]. - */ - - wsptr = workspace; - for (ctr = 0; ctr < 2; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 = wsptr[0] + ((((INT32) RANGE_CENTER) << 3) + (ONE << 2)); - tmp2 = wsptr[2]; - - tmp10 = (tmp0 + tmp2) << CONST_BITS; - tmp12 = (tmp0 - tmp2) << CONST_BITS; - - /* Odd part */ - /* Same rotation as in the even part of the 8x8 LL&M IDCT */ - - z2 = wsptr[1]; - z3 = wsptr[3]; - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, - CONST_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, - CONST_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, - CONST_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, - CONST_BITS+3) - & RANGE_MASK]; - - wsptr += 4; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 2x1 output block. - * - * 1-point IDCT in pass 1 (columns), 2-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_2x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - DCTELEM tmp0, tmp1; - ISLOW_MULT_TYPE * quantptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - ISHIFT_TEMPS - - /* Pass 1: empty. */ - - /* Pass 2: process 1 row from input, store into output array. */ - - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - outptr = output_buf[0] + output_col; - - /* Even part */ - - tmp0 = DEQUANTIZE(coef_block[0], quantptr[0]); - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2); - - /* Odd part */ - - tmp1 = DEQUANTIZE(coef_block[1], quantptr[1]); - - /* Final output stage */ - - outptr[0] = range_limit[(int) IRIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK]; - outptr[1] = range_limit[(int) IRIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK]; -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing an 8x16 output block. - * - * 16-point IDCT in pass 1 (columns), 8-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_8x16 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[8*16]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * 16-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/32). - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp0 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); - - z1 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */ - tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */ - - tmp10 = tmp0 + tmp1; - tmp11 = tmp0 - tmp1; - tmp12 = tmp0 + tmp2; - tmp13 = tmp0 - tmp2; - - z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - z3 = z1 - z2; - z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */ - z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */ - - tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */ - tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */ - tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */ - tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */ - - tmp20 = tmp10 + tmp0; - tmp27 = tmp10 - tmp0; - tmp21 = tmp12 + tmp1; - tmp26 = tmp12 - tmp1; - tmp22 = tmp13 + tmp2; - tmp25 = tmp13 - tmp2; - tmp23 = tmp11 + tmp3; - tmp24 = tmp11 - tmp3; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - tmp11 = z1 + z3; - - tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */ - tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */ - tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */ - tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */ - tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */ - tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */ - tmp0 = tmp1 + tmp2 + tmp3 - - MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */ - tmp13 = tmp10 + tmp11 + tmp12 - - MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */ - z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */ - tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */ - tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */ - z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */ - tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */ - tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */ - z2 += z4; - z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */ - tmp1 += z1; - tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */ - z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */ - tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */ - tmp12 += z2; - z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */ - tmp2 += z2; - tmp3 += z2; - z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */ - tmp10 += z2; - tmp11 += z2; - - /* Final output stage */ - - wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[8*15] = (int) RIGHT_SHIFT(tmp20 - tmp0, CONST_BITS-PASS1_BITS); - wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp1, CONST_BITS-PASS1_BITS); - wsptr[8*14] = (int) RIGHT_SHIFT(tmp21 - tmp1, CONST_BITS-PASS1_BITS); - wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp2, CONST_BITS-PASS1_BITS); - wsptr[8*13] = (int) RIGHT_SHIFT(tmp22 - tmp2, CONST_BITS-PASS1_BITS); - wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp3, CONST_BITS-PASS1_BITS); - wsptr[8*12] = (int) RIGHT_SHIFT(tmp23 - tmp3, CONST_BITS-PASS1_BITS); - wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*11] = (int) RIGHT_SHIFT(tmp24 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*10] = (int) RIGHT_SHIFT(tmp25 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*9] = (int) RIGHT_SHIFT(tmp26 - tmp12, CONST_BITS-PASS1_BITS); - wsptr[8*7] = (int) RIGHT_SHIFT(tmp27 + tmp13, CONST_BITS-PASS1_BITS); - wsptr[8*8] = (int) RIGHT_SHIFT(tmp27 - tmp13, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process rows from work array, store into output array. - * Note that we must descale the results by a factor of 8 == 2**3, - * and also undo the PASS1_BITS scaling. - * 8-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/16). - */ - - wsptr = workspace; - for (ctr = 0; ctr < 16; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part: reverse the even part of the forward DCT. - * The rotator is c(-6). - */ - - /* Add range center and fudge factor for final descale and range-limit. */ - z2 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - z3 = (INT32) wsptr[4]; - - tmp0 = (z2 + z3) << CONST_BITS; - tmp1 = (z2 - z3) << CONST_BITS; - - z2 = (INT32) wsptr[2]; - z3 = (INT32) wsptr[6]; - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - tmp10 = tmp0 + tmp2; - tmp13 = tmp0 - tmp2; - tmp11 = tmp1 + tmp3; - tmp12 = tmp1 - tmp3; - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - - tmp0 = (INT32) wsptr[7]; - tmp1 = (INT32) wsptr[5]; - tmp2 = (INT32) wsptr[3]; - tmp3 = (INT32) wsptr[1]; - - z2 = tmp0 + tmp2; - z3 = tmp1 + tmp3; - - z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ - z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ - z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ - z2 += z1; - z3 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp0 += z1 + z2; - tmp3 += z1 + z3; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp1 += z1 + z3; - tmp2 += z1 + z2; - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += DCTSIZE; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 7x14 output block. - * - * 14-point IDCT in pass 1 (columns), 7-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_7x14 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[7*14]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * 14-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/28). - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 7; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z1 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - z1 += ONE << (CONST_BITS-PASS1_BITS-1); - z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */ - z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */ - z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */ - - tmp10 = z1 + z2; - tmp11 = z1 + z3; - tmp12 = z1 - z4; - - tmp23 = RIGHT_SHIFT(z1 - ((z2 + z3 - z4) << 1), /* c0 = (c4+c12-c8)*2 */ - CONST_BITS-PASS1_BITS); - - z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */ - - tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */ - tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */ - tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */ - MULTIPLY(z2, FIX(1.378756276)); /* c2 */ - - tmp20 = tmp10 + tmp13; - tmp26 = tmp10 - tmp13; - tmp21 = tmp11 + tmp14; - tmp25 = tmp11 - tmp14; - tmp22 = tmp12 + tmp15; - tmp24 = tmp12 - tmp15; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - tmp13 = z4 << CONST_BITS; - - tmp14 = z1 + z3; - tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */ - tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */ - tmp10 = tmp11 + tmp12 + tmp13 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */ - tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */ - tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */ - z1 -= z2; - tmp15 = MULTIPLY(z1, FIX(0.467085129)) - tmp13; /* c11 */ - tmp16 += tmp15; - z1 += z4; - z4 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - tmp13; /* -c13 */ - tmp11 += z4 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */ - tmp12 += z4 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */ - z4 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */ - tmp14 += z4 + tmp13 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */ - tmp15 += z4 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */ - - tmp13 = (z1 - z3) << PASS1_BITS; - - /* Final output stage */ - - wsptr[7*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[7*13] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[7*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[7*12] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[7*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); - wsptr[7*11] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); - wsptr[7*3] = (int) (tmp23 + tmp13); - wsptr[7*10] = (int) (tmp23 - tmp13); - wsptr[7*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); - wsptr[7*9] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); - wsptr[7*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); - wsptr[7*8] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); - wsptr[7*6] = (int) RIGHT_SHIFT(tmp26 + tmp16, CONST_BITS-PASS1_BITS); - wsptr[7*7] = (int) RIGHT_SHIFT(tmp26 - tmp16, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 14 rows from work array, store into output array. - * 7-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/14). - */ - - wsptr = workspace; - for (ctr = 0; ctr < 14; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp23 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp23 <<= CONST_BITS; - - z1 = (INT32) wsptr[2]; - z2 = (INT32) wsptr[4]; - z3 = (INT32) wsptr[6]; - - tmp20 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */ - tmp22 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */ - tmp21 = tmp20 + tmp22 + tmp23 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */ - tmp10 = z1 + z3; - z2 -= tmp10; - tmp10 = MULTIPLY(tmp10, FIX(1.274162392)) + tmp23; /* c2 */ - tmp20 += tmp10 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */ - tmp22 += tmp10 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */ - tmp23 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */ - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - - tmp11 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */ - tmp12 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */ - tmp10 = tmp11 - tmp12; - tmp11 += tmp12; - tmp12 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */ - tmp11 += tmp12; - z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */ - tmp10 += z2; - tmp12 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 7; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 6x12 output block. - * - * 12-point IDCT in pass 1 (columns), 6-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_6x12 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[6*12]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * 12-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/24). - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 6; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z3 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - z3 += ONE << (CONST_BITS-PASS1_BITS-1); - - z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */ - - tmp10 = z3 + z4; - tmp11 = z3 - z4; - - z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */ - z1 <<= CONST_BITS; - z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - z2 <<= CONST_BITS; - - tmp12 = z1 - z2; - - tmp21 = z3 + tmp12; - tmp24 = z3 - tmp12; - - tmp12 = z4 + z2; - - tmp20 = tmp10 + tmp12; - tmp25 = tmp10 - tmp12; - - tmp12 = z4 - z1 - z2; - - tmp22 = tmp11 + tmp12; - tmp23 = tmp11 - tmp12; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */ - tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */ - - tmp10 = z1 + z3; - tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */ - tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */ - tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */ - tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */ - tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */ - tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */ - tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */ - MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */ - - z1 -= z4; - z2 -= z3; - z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */ - tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */ - tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */ - - /* Final output stage */ - - wsptr[6*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[6*11] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[6*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[6*10] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[6*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); - wsptr[6*9] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); - wsptr[6*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); - wsptr[6*8] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); - wsptr[6*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); - wsptr[6*7] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); - wsptr[6*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); - wsptr[6*6] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 12 rows from work array, store into output array. - * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12). - */ - - wsptr = workspace; - for (ctr = 0; ctr < 12; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp10 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp10 <<= CONST_BITS; - tmp12 = (INT32) wsptr[4]; - tmp20 = MULTIPLY(tmp12, FIX(0.707106781)); /* c4 */ - tmp11 = tmp10 + tmp20; - tmp21 = tmp10 - tmp20 - tmp20; - tmp20 = (INT32) wsptr[2]; - tmp10 = MULTIPLY(tmp20, FIX(1.224744871)); /* c2 */ - tmp20 = tmp11 + tmp10; - tmp22 = tmp11 - tmp10; - - /* Odd part */ - - z1 = (INT32) wsptr[1]; - z2 = (INT32) wsptr[3]; - z3 = (INT32) wsptr[5]; - tmp11 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ - tmp10 = tmp11 + ((z1 + z2) << CONST_BITS); - tmp12 = tmp11 + ((z3 - z2) << CONST_BITS); - tmp11 = (z1 - z2 - z3) << CONST_BITS; - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 6; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 5x10 output block. - * - * 10-point IDCT in pass 1 (columns), 5-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_5x10 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp10, tmp11, tmp12, tmp13, tmp14; - INT32 tmp20, tmp21, tmp22, tmp23, tmp24; - INT32 z1, z2, z3, z4, z5; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[5*10]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * 10-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/20). - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 5; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z3 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - z3 += ONE << (CONST_BITS-PASS1_BITS-1); - z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */ - z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */ - tmp10 = z3 + z1; - tmp11 = z3 - z2; - - tmp22 = RIGHT_SHIFT(z3 - ((z1 - z2) << 1), /* c0 = (c4-c8)*2 */ - CONST_BITS-PASS1_BITS); - - z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */ - tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */ - tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */ - - tmp20 = tmp10 + tmp12; - tmp24 = tmp10 - tmp12; - tmp21 = tmp11 + tmp13; - tmp23 = tmp11 - tmp13; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - tmp11 = z2 + z4; - tmp13 = z2 - z4; - - tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */ - z5 = z3 << CONST_BITS; - - z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */ - z4 = z5 + tmp12; - - tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */ - tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */ - - z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */ - z4 = z5 - tmp12 - (tmp13 << (CONST_BITS - 1)); - - tmp12 = (z1 - tmp13 - z3) << PASS1_BITS; - - tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */ - tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */ - - /* Final output stage */ - - wsptr[5*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); - wsptr[5*9] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); - wsptr[5*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); - wsptr[5*8] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); - wsptr[5*2] = (int) (tmp22 + tmp12); - wsptr[5*7] = (int) (tmp22 - tmp12); - wsptr[5*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); - wsptr[5*6] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); - wsptr[5*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); - wsptr[5*5] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 10 rows from work array, store into output array. - * 5-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/10). - */ - - wsptr = workspace; - for (ctr = 0; ctr < 10; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp12 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp12 <<= CONST_BITS; - tmp13 = (INT32) wsptr[2]; - tmp14 = (INT32) wsptr[4]; - z1 = MULTIPLY(tmp13 + tmp14, FIX(0.790569415)); /* (c2+c4)/2 */ - z2 = MULTIPLY(tmp13 - tmp14, FIX(0.353553391)); /* (c2-c4)/2 */ - z3 = tmp12 + z2; - tmp10 = z3 + z1; - tmp11 = z3 - z1; - tmp12 -= z2 << 2; - - /* Odd part */ - - z2 = (INT32) wsptr[1]; - z3 = (INT32) wsptr[3]; - - z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */ - tmp13 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */ - tmp14 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp13, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp14, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 5; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 4x8 output block. - * - * 8-point IDCT in pass 1 (columns), 4-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_4x8 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2, z3; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[4*8]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * Note results are scaled up by sqrt(8) compared to a true IDCT; - * furthermore, we scale the results by 2**PASS1_BITS. - * 8-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/16). - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 4; ctr > 0; ctr--) { - /* Due to quantization, we will usually find that many of the input - * coefficients are zero, especially the AC terms. We can exploit this - * by short-circuiting the IDCT calculation for any column in which all - * the AC terms are zero. In that case each output is equal to the - * DC coefficient (with scale factor as needed). - * With typical images and quantization tables, half or more of the - * column DCT calculations can be simplified this way. - */ - - if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && - inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && - inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && - inptr[DCTSIZE*7] == 0) { - /* AC terms all zero */ - int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; - - wsptr[4*0] = dcval; - wsptr[4*1] = dcval; - wsptr[4*2] = dcval; - wsptr[4*3] = dcval; - wsptr[4*4] = dcval; - wsptr[4*5] = dcval; - wsptr[4*6] = dcval; - wsptr[4*7] = dcval; - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - continue; - } - - /* Even part: reverse the even part of the forward DCT. - * The rotator is c(-6). - */ - - z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - z2 <<= CONST_BITS; - z3 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - z2 += ONE << (CONST_BITS-PASS1_BITS-1); - - tmp0 = z2 + z3; - tmp1 = z2 - z3; - - z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - tmp10 = tmp0 + tmp2; - tmp13 = tmp0 - tmp2; - tmp11 = tmp1 + tmp3; - tmp12 = tmp1 - tmp3; - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - - z2 = tmp0 + tmp2; - z3 = tmp1 + tmp3; - - z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ - z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ - z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ - z2 += z1; - z3 += z1; - - z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ - tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ - tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ - tmp0 += z1 + z2; - tmp3 += z1 + z3; - - z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ - tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ - tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ - tmp1 += z1 + z3; - tmp2 += z1 + z2; - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - wsptr[4*0] = (int) RIGHT_SHIFT(tmp10 + tmp3, CONST_BITS-PASS1_BITS); - wsptr[4*7] = (int) RIGHT_SHIFT(tmp10 - tmp3, CONST_BITS-PASS1_BITS); - wsptr[4*1] = (int) RIGHT_SHIFT(tmp11 + tmp2, CONST_BITS-PASS1_BITS); - wsptr[4*6] = (int) RIGHT_SHIFT(tmp11 - tmp2, CONST_BITS-PASS1_BITS); - wsptr[4*2] = (int) RIGHT_SHIFT(tmp12 + tmp1, CONST_BITS-PASS1_BITS); - wsptr[4*5] = (int) RIGHT_SHIFT(tmp12 - tmp1, CONST_BITS-PASS1_BITS); - wsptr[4*3] = (int) RIGHT_SHIFT(tmp13 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[4*4] = (int) RIGHT_SHIFT(tmp13 - tmp0, CONST_BITS-PASS1_BITS); - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - } - - /* Pass 2: process 8 rows from work array, store into output array. - * 4-point IDCT kernel, - * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT]. - */ - - wsptr = workspace; - for (ctr = 0; ctr < 8; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp2 = (INT32) wsptr[2]; - - tmp10 = (tmp0 + tmp2) << CONST_BITS; - tmp12 = (tmp0 - tmp2) << CONST_BITS; - - /* Odd part */ - /* Same rotation as in the even part of the 8x8 LL&M IDCT */ - - z2 = (INT32) wsptr[1]; - z3 = (INT32) wsptr[3]; - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 4; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 3x6 output block. - * - * 6-point IDCT in pass 1 (columns), 3-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_3x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12; - INT32 z1, z2, z3; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[3*6]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12). - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 3; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp0 <<= CONST_BITS; - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */ - tmp1 = tmp0 + tmp10; - tmp11 = RIGHT_SHIFT(tmp0 - tmp10 - tmp10, CONST_BITS-PASS1_BITS); - tmp10 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */ - tmp10 = tmp1 + tmp0; - tmp12 = tmp1 - tmp0; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ - tmp0 = tmp1 + ((z1 + z2) << CONST_BITS); - tmp2 = tmp1 + ((z3 - z2) << CONST_BITS); - tmp1 = (z1 - z2 - z3) << PASS1_BITS; - - /* Final output stage */ - - wsptr[3*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[3*5] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); - wsptr[3*1] = (int) (tmp11 + tmp1); - wsptr[3*4] = (int) (tmp11 - tmp1); - wsptr[3*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS); - wsptr[3*3] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS); - } - - /* Pass 2: process 6 rows from work array, store into output array. - * 3-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/6). - */ - - wsptr = workspace; - for (ctr = 0; ctr < 6; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 = (INT32) wsptr[0] + - ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + - (ONE << (PASS1_BITS+2))); - tmp0 <<= CONST_BITS; - tmp2 = (INT32) wsptr[2]; - tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */ - tmp10 = tmp0 + tmp12; - tmp2 = tmp0 - tmp12 - tmp12; - - /* Odd part */ - - tmp12 = (INT32) wsptr[1]; - tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += 3; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 2x4 output block. - * - * 4-point IDCT in pass 1 (columns), 2-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_2x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp2, tmp10, tmp12; - INT32 z1, z2, z3; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - INT32 * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - INT32 workspace[2*4]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. - * 4-point IDCT kernel, - * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT]. - */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = 0; ctr < 2; ctr++, inptr++, quantptr++, wsptr++) { - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - - tmp10 = (tmp0 + tmp2) << CONST_BITS; - tmp12 = (tmp0 - tmp2) << CONST_BITS; - - /* Odd part */ - /* Same rotation as in the even part of the 8x8 LL&M IDCT */ - - z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ - tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ - tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ - - /* Final output stage */ - - wsptr[2*0] = tmp10 + tmp0; - wsptr[2*3] = tmp10 - tmp0; - wsptr[2*1] = tmp12 + tmp2; - wsptr[2*2] = tmp12 - tmp2; - } - - /* Pass 2: process 4 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 4; ctr++) { - outptr = output_buf[ctr] + output_col; - - /* Even part */ - - /* Add range center and fudge factor for final descale and range-limit. */ - tmp10 = wsptr[0] + - ((((INT32) RANGE_CENTER) << (CONST_BITS+3)) + - (ONE << (CONST_BITS+2))); - - /* Odd part */ - - tmp0 = wsptr[1]; - - /* Final output stage */ - - outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS+3) - & RANGE_MASK]; - - wsptr += 2; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a 1x2 output block. - * - * 2-point IDCT in pass 1 (columns), 1-point in pass 2 (rows). - */ - -GLOBAL(void) -jpeg_idct_1x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - DCTELEM tmp0, tmp1; - ISLOW_MULT_TYPE * quantptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - ISHIFT_TEMPS - - /* Process 1 column from input, store into output array. */ - - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - - /* Even part */ - - tmp0 = DEQUANTIZE(coef_block[DCTSIZE*0], quantptr[DCTSIZE*0]); - /* Add range center and fudge factor for final descale and range-limit. */ - tmp0 += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2); - - /* Odd part */ - - tmp1 = DEQUANTIZE(coef_block[DCTSIZE*1], quantptr[DCTSIZE*1]); - - /* Final output stage */ - - output_buf[0][output_col] = - range_limit[(int) IRIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK]; - output_buf[1][output_col] = - range_limit[(int) IRIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK]; -} - -#endif /* IDCT_SCALING_SUPPORTED */ -#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/jinclude.h b/thirdparty/jpeg-9e/jinclude.h deleted file mode 100644 index 20ed4ef..0000000 --- a/thirdparty/jpeg-9e/jinclude.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * jinclude.h - * - * Copyright (C) 1991-1994, Thomas G. Lane. - * Modified 2017 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file exists to provide a single place to fix any problems with - * including the wrong system include files. (Common problems are taken - * care of by the standard jconfig symbols, but on really weird systems - * you may have to edit this file.) - * - * NOTE: this file is NOT intended to be included by applications using the - * JPEG library. Most applications need only include jpeglib.h. - */ - - -/* Include auto-config file to find out which system include files we need. */ - -#include "jconfig.h" /* auto configuration options */ -#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ - -/* - * We need the NULL macro and size_t typedef. - * On an ANSI-conforming system it is sufficient to include . - * Otherwise, we get them from or ; we may have to - * pull in as well. - * Note that the core JPEG library does not require ; - * only the default error handler and data source/destination modules do. - * But we must pull it in because of the references to FILE in jpeglib.h. - * You can remove those references if you want to compile without . - */ - -#ifdef HAVE_STDDEF_H -#include -#endif - -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef NEED_SYS_TYPES_H -#include -#endif - -#include - -/* - * We need memory copying and zeroing functions, plus strncpy(). - * ANSI and System V implementations declare these in . - * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). - * Some systems may declare memset and memcpy in . - * - * NOTE: we assume the size parameters to these functions are of type size_t. - * Change the casts in these macros if not! - */ - -#ifdef NEED_BSD_STRINGS - -#include -#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) -#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) - -#else /* not BSD, assume ANSI/SysV string lib */ - -#include -#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) -#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) - -#endif - -/* - * In ANSI C, and indeed any rational implementation, size_t is also the - * type returned by sizeof(). However, it seems there are some irrational - * implementations out there, in which sizeof() returns an int even though - * size_t is defined as long or unsigned long. To ensure consistent results - * we always use this SIZEOF() macro in place of using sizeof() directly. - */ - -#define SIZEOF(object) ((size_t) sizeof(object)) - -/* - * The modules that use fread() and fwrite() always invoke them through - * these macros. On some systems you may need to twiddle the argument casts. - * CAUTION: argument order is different from underlying functions! - * - * Furthermore, macros are provided for fflush() and ferror() in order - * to facilitate adaption by applications using an own FILE class. - */ - -#define JFREAD(file,buf,sizeofbuf) \ - ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) -#define JFWRITE(file,buf,sizeofbuf) \ - ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) -#define JFFLUSH(file) fflush(file) -#define JFERROR(file) ferror(file) diff --git a/thirdparty/jpeg-9e/jmemansi.c b/thirdparty/jpeg-9e/jmemansi.c deleted file mode 100644 index 2d93e49..0000000 --- a/thirdparty/jpeg-9e/jmemansi.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * jmemansi.c - * - * Copyright (C) 1992-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file provides a simple generic implementation of the system- - * dependent portion of the JPEG memory manager. This implementation - * assumes that you have the ANSI-standard library routine tmpfile(). - * Also, the problem of determining the amount of memory available - * is shoved onto the user. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ -extern void * malloc JPP((size_t size)); -extern void free JPP((void *ptr)); -#endif - -#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ -#define SEEK_SET 0 /* if not, assume 0 is correct */ -#endif - - -/* - * Memory allocation and freeing are controlled by the regular library - * routines malloc() and free(). - */ - -GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * "Large" objects are treated the same as "small" ones. - * NB: although we include FAR keywords in the routine declarations, - * this file won't actually work in 80x86 small/medium model; at least, - * you probably won't be able to process useful-size images in only 64KB. - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * This routine computes the total memory space available for allocation. - * It's impossible to do this in a portable way; our current solution is - * to make the user tell us (with a default value set at compile time). - * If you can actually get the available space, it's a good idea to subtract - * a slop factor of 5% or so. - */ - -#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ -#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ -#endif - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - return cinfo->mem->max_memory_to_use - already_allocated; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - - -METHODDEF(void) -read_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFREAD(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFWRITE(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_backing_store (j_common_ptr cinfo, backing_store_ptr info) -{ - fclose(info->temp_file); - /* Since this implementation uses tmpfile() to create the file, - * no explicit file deletion is needed. - */ -} - - -/* - * Initial opening of a backing-store object. - * - * This version uses tmpfile(), which constructs a suitable file name - * behind the scenes. We don't have to use info->temp_name[] at all; - * indeed, we can't even find out the actual name of the temp file. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - if ((info->temp_file = tmpfile()) == NULL) - ERREXITS(cinfo, JERR_TFILE_CREATE, ""); - info->read_backing_store = read_backing_store; - info->write_backing_store = write_backing_store; - info->close_backing_store = close_backing_store; -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* no work */ -} diff --git a/thirdparty/jpeg-9e/jmemdos.c b/thirdparty/jpeg-9e/jmemdos.c deleted file mode 100644 index 60b45c6..0000000 --- a/thirdparty/jpeg-9e/jmemdos.c +++ /dev/null @@ -1,638 +0,0 @@ -/* - * jmemdos.c - * - * Copyright (C) 1992-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file provides an MS-DOS-compatible implementation of the system- - * dependent portion of the JPEG memory manager. Temporary data can be - * stored in extended or expanded memory as well as in regular DOS files. - * - * If you use this file, you must be sure that NEED_FAR_POINTERS is defined - * if you compile in a small-data memory model; it should NOT be defined if - * you use a large-data memory model. This file is not recommended if you - * are using a flat-memory-space 386 environment such as DJGCC or Watcom C. - * Also, this code will NOT work if struct fields are aligned on greater than - * 2-byte boundaries. - * - * Based on code contributed by Ge' Weijers. - */ - -/* - * If you have both extended and expanded memory, you may want to change the - * order in which they are tried in jopen_backing_store. On a 286 machine - * expanded memory is usually faster, since extended memory access involves - * an expensive protected-mode-and-back switch. On 386 and better, extended - * memory is usually faster. As distributed, the code tries extended memory - * first (what? not everyone has a 386? :-). - * - * You can disable use of extended/expanded memory entirely by altering these - * definitions or overriding them from the Makefile (eg, -DEMS_SUPPORTED=0). - */ - -#ifndef XMS_SUPPORTED -#define XMS_SUPPORTED 1 -#endif -#ifndef EMS_SUPPORTED -#define EMS_SUPPORTED 1 -#endif - - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef HAVE_STDLIB_H /* should declare these */ -extern void * malloc JPP((size_t size)); -extern void free JPP((void *ptr)); -extern char * getenv JPP((const char * name)); -#endif - -#ifdef NEED_FAR_POINTERS - -#ifdef __TURBOC__ -/* These definitions work for Borland C (Turbo C) */ -#include /* need farmalloc(), farfree() */ -#define far_malloc(x) farmalloc(x) -#define far_free(x) farfree(x) -#else -/* These definitions work for Microsoft C and compatible compilers */ -#include /* need _fmalloc(), _ffree() */ -#define far_malloc(x) _fmalloc(x) -#define far_free(x) _ffree(x) -#endif - -#else /* not NEED_FAR_POINTERS */ - -#define far_malloc(x) malloc(x) -#define far_free(x) free(x) - -#endif /* NEED_FAR_POINTERS */ - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#else -#define READ_BINARY "rb" -#endif - -#ifndef USE_MSDOS_MEMMGR /* make sure user got configuration right */ - You forgot to define USE_MSDOS_MEMMGR in jconfig.h. /* deliberate syntax error */ -#endif - -#if MAX_ALLOC_CHUNK >= 65535L /* make sure jconfig.h got this right */ - MAX_ALLOC_CHUNK should be less than 64K. /* deliberate syntax error */ -#endif - - -/* - * Declarations for assembly-language support routines (see jmemdosa.asm). - * - * The functions are declared "far" as are all their pointer arguments; - * this ensures the assembly source code will work regardless of the - * compiler memory model. We assume "short" is 16 bits, "long" is 32. - */ - -typedef void far * XMSDRIVER; /* actually a pointer to code */ -typedef struct { /* registers for calling XMS driver */ - unsigned short ax, dx, bx; - void far * ds_si; - } XMScontext; -typedef struct { /* registers for calling EMS driver */ - unsigned short ax, dx, bx; - void far * ds_si; - } EMScontext; - -extern short far jdos_open JPP((short far * handle, char far * filename)); -extern short far jdos_close JPP((short handle)); -extern short far jdos_seek JPP((short handle, long offset)); -extern short far jdos_read JPP((short handle, void far * buffer, - unsigned short count)); -extern short far jdos_write JPP((short handle, void far * buffer, - unsigned short count)); -extern void far jxms_getdriver JPP((XMSDRIVER far *)); -extern void far jxms_calldriver JPP((XMSDRIVER, XMScontext far *)); -extern short far jems_available JPP((void)); -extern void far jems_calldriver JPP((EMScontext far *)); - - -/* - * Selection of a file name for a temporary file. - * This is highly system-dependent, and you may want to customize it. - */ - -static int next_file_num; /* to distinguish among several temp files */ - -LOCAL(void) -select_file_name (char * fname) -{ - const char * env; - char * ptr; - FILE * tfile; - - /* Keep generating file names till we find one that's not in use */ - for (;;) { - /* Get temp directory name from environment TMP or TEMP variable; - * if none, use "." - */ - if ((env = (const char *) getenv("TMP")) == NULL) - if ((env = (const char *) getenv("TEMP")) == NULL) - env = "."; - if (*env == '\0') /* null string means "." */ - env = "."; - ptr = fname; /* copy name to fname */ - while (*env != '\0') - *ptr++ = *env++; - if (ptr[-1] != '\\' && ptr[-1] != '/') - *ptr++ = '\\'; /* append backslash if not in env variable */ - /* Append a suitable file name */ - next_file_num++; /* advance counter */ - sprintf(ptr, "JPG%03d.TMP", next_file_num); - /* Probe to see if file name is already in use */ - if ((tfile = fopen(fname, READ_BINARY)) == NULL) - break; - fclose(tfile); /* oops, it's there; close tfile & try again */ - } -} - - -/* - * Near-memory allocation and freeing are controlled by the regular library - * routines malloc() and free(). - */ - -GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * "Large" objects are allocated in far memory, if possible - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) far_malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - far_free(object); -} - - -/* - * This routine computes the total memory space available for allocation. - * It's impossible to do this in a portable way; our current solution is - * to make the user tell us (with a default value set at compile time). - * If you can actually get the available space, it's a good idea to subtract - * a slop factor of 5% or so. - */ - -#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ -#define DEFAULT_MAX_MEM 300000L /* for total usage about 450K */ -#endif - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - return cinfo->mem->max_memory_to_use - already_allocated; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - -/* - * For MS-DOS we support three types of backing storage: - * 1. Conventional DOS files. We access these by direct DOS calls rather - * than via the stdio package. This provides a bit better performance, - * but the real reason is that the buffers to be read or written are FAR. - * The stdio library for small-data memory models can't cope with that. - * 2. Extended memory, accessed per the XMS V2.0 specification. - * 3. Expanded memory, accessed per the LIM/EMS 4.0 specification. - * You'll need copies of those specs to make sense of the related code. - * The specs are available by Internet FTP from the SIMTEL archives - * (oak.oakland.edu and its various mirror sites). See files - * pub/msdos/microsoft/xms20.arc and pub/msdos/info/limems41.zip. - */ - - -/* - * Access methods for a DOS file. - */ - - -METHODDEF(void) -read_file_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (jdos_seek(info->handle.file_handle, file_offset)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ - if (byte_count > 65535L) /* safety check */ - ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); - if (jdos_read(info->handle.file_handle, buffer_address, - (unsigned short) byte_count)) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_file_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (jdos_seek(info->handle.file_handle, file_offset)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ - if (byte_count > 65535L) /* safety check */ - ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); - if (jdos_write(info->handle.file_handle, buffer_address, - (unsigned short) byte_count)) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_file_store (j_common_ptr cinfo, backing_store_ptr info) -{ - jdos_close(info->handle.file_handle); /* close the file */ - remove(info->temp_name); /* delete the file */ -/* If your system doesn't have remove(), try unlink() instead. - * remove() is the ANSI-standard name for this function, but - * unlink() was more common in pre-ANSI systems. - */ - TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); -} - - -LOCAL(boolean) -open_file_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - short handle; - - select_file_name(info->temp_name); - if (jdos_open((short far *) & handle, (char far *) info->temp_name)) { - /* might as well exit since jpeg_open_backing_store will fail anyway */ - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - return FALSE; - } - info->handle.file_handle = handle; - info->read_backing_store = read_file_store; - info->write_backing_store = write_file_store; - info->close_backing_store = close_file_store; - TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); - return TRUE; /* succeeded */ -} - - -/* - * Access methods for extended memory. - */ - -#if XMS_SUPPORTED - -static XMSDRIVER xms_driver; /* saved address of XMS driver */ - -typedef union { /* either long offset or real-mode pointer */ - long offset; - void far * ptr; - } XMSPTR; - -typedef struct { /* XMS move specification structure */ - long length; - XMSH src_handle; - XMSPTR src; - XMSH dst_handle; - XMSPTR dst; - } XMSspec; - -#define ODD(X) (((X) & 1L) != 0) - - -METHODDEF(void) -read_xms_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - XMScontext ctx; - XMSspec spec; - char endbuffer[2]; - - /* The XMS driver can't cope with an odd length, so handle the last byte - * specially if byte_count is odd. We don't expect this to be common. - */ - - spec.length = byte_count & (~ 1L); - spec.src_handle = info->handle.xms_handle; - spec.src.offset = file_offset; - spec.dst_handle = 0; - spec.dst.ptr = buffer_address; - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x0b00; /* EMB move */ - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax != 1) - ERREXIT(cinfo, JERR_XMS_READ); - - if (ODD(byte_count)) { - read_xms_store(cinfo, info, (void FAR *) endbuffer, - file_offset + byte_count - 1L, 2L); - ((char FAR *) buffer_address)[byte_count - 1L] = endbuffer[0]; - } -} - - -METHODDEF(void) -write_xms_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - XMScontext ctx; - XMSspec spec; - char endbuffer[2]; - - /* The XMS driver can't cope with an odd length, so handle the last byte - * specially if byte_count is odd. We don't expect this to be common. - */ - - spec.length = byte_count & (~ 1L); - spec.src_handle = 0; - spec.src.ptr = buffer_address; - spec.dst_handle = info->handle.xms_handle; - spec.dst.offset = file_offset; - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x0b00; /* EMB move */ - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax != 1) - ERREXIT(cinfo, JERR_XMS_WRITE); - - if (ODD(byte_count)) { - read_xms_store(cinfo, info, (void FAR *) endbuffer, - file_offset + byte_count - 1L, 2L); - endbuffer[0] = ((char FAR *) buffer_address)[byte_count - 1L]; - write_xms_store(cinfo, info, (void FAR *) endbuffer, - file_offset + byte_count - 1L, 2L); - } -} - - -METHODDEF(void) -close_xms_store (j_common_ptr cinfo, backing_store_ptr info) -{ - XMScontext ctx; - - ctx.dx = info->handle.xms_handle; - ctx.ax = 0x0a00; - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - TRACEMS1(cinfo, 1, JTRC_XMS_CLOSE, info->handle.xms_handle); - /* we ignore any error return from the driver */ -} - - -LOCAL(boolean) -open_xms_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - XMScontext ctx; - - /* Get address of XMS driver */ - jxms_getdriver((XMSDRIVER far *) & xms_driver); - if (xms_driver == NULL) - return FALSE; /* no driver to be had */ - - /* Get version number, must be >= 2.00 */ - ctx.ax = 0x0000; - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax < (unsigned short) 0x0200) - return FALSE; - - /* Try to get space (expressed in kilobytes) */ - ctx.dx = (unsigned short) ((total_bytes_needed + 1023L) >> 10); - ctx.ax = 0x0900; - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax != 1) - return FALSE; - - /* Succeeded, save the handle and away we go */ - info->handle.xms_handle = ctx.dx; - info->read_backing_store = read_xms_store; - info->write_backing_store = write_xms_store; - info->close_backing_store = close_xms_store; - TRACEMS1(cinfo, 1, JTRC_XMS_OPEN, ctx.dx); - return TRUE; /* succeeded */ -} - -#endif /* XMS_SUPPORTED */ - - -/* - * Access methods for expanded memory. - */ - -#if EMS_SUPPORTED - -/* The EMS move specification structure requires word and long fields aligned - * at odd byte boundaries. Some compilers will align struct fields at even - * byte boundaries. While it's usually possible to force byte alignment, - * that causes an overall performance penalty and may pose problems in merging - * JPEG into a larger application. Instead we accept some rather dirty code - * here. Note this code would fail if the hardware did not allow odd-byte - * word & long accesses, but all 80x86 CPUs do. - */ - -typedef void far * EMSPTR; - -typedef union { /* EMS move specification structure */ - long length; /* It's easy to access first 4 bytes */ - char bytes[18]; /* Misaligned fields in here! */ - } EMSspec; - -/* Macros for accessing misaligned fields */ -#define FIELD_AT(spec,offset,type) (*((type *) &(spec.bytes[offset]))) -#define SRC_TYPE(spec) FIELD_AT(spec,4,char) -#define SRC_HANDLE(spec) FIELD_AT(spec,5,EMSH) -#define SRC_OFFSET(spec) FIELD_AT(spec,7,unsigned short) -#define SRC_PAGE(spec) FIELD_AT(spec,9,unsigned short) -#define SRC_PTR(spec) FIELD_AT(spec,7,EMSPTR) -#define DST_TYPE(spec) FIELD_AT(spec,11,char) -#define DST_HANDLE(spec) FIELD_AT(spec,12,EMSH) -#define DST_OFFSET(spec) FIELD_AT(spec,14,unsigned short) -#define DST_PAGE(spec) FIELD_AT(spec,16,unsigned short) -#define DST_PTR(spec) FIELD_AT(spec,14,EMSPTR) - -#define EMSPAGESIZE 16384L /* gospel, see the EMS specs */ - -#define HIBYTE(W) (((W) >> 8) & 0xFF) -#define LOBYTE(W) ((W) & 0xFF) - - -METHODDEF(void) -read_ems_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - EMScontext ctx; - EMSspec spec; - - spec.length = byte_count; - SRC_TYPE(spec) = 1; - SRC_HANDLE(spec) = info->handle.ems_handle; - SRC_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); - SRC_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); - DST_TYPE(spec) = 0; - DST_HANDLE(spec) = 0; - DST_PTR(spec) = buffer_address; - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x5700; /* move memory region */ - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - ERREXIT(cinfo, JERR_EMS_READ); -} - - -METHODDEF(void) -write_ems_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - EMScontext ctx; - EMSspec spec; - - spec.length = byte_count; - SRC_TYPE(spec) = 0; - SRC_HANDLE(spec) = 0; - SRC_PTR(spec) = buffer_address; - DST_TYPE(spec) = 1; - DST_HANDLE(spec) = info->handle.ems_handle; - DST_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); - DST_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x5700; /* move memory region */ - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - ERREXIT(cinfo, JERR_EMS_WRITE); -} - - -METHODDEF(void) -close_ems_store (j_common_ptr cinfo, backing_store_ptr info) -{ - EMScontext ctx; - - ctx.ax = 0x4500; - ctx.dx = info->handle.ems_handle; - jems_calldriver((EMScontext far *) & ctx); - TRACEMS1(cinfo, 1, JTRC_EMS_CLOSE, info->handle.ems_handle); - /* we ignore any error return from the driver */ -} - - -LOCAL(boolean) -open_ems_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - EMScontext ctx; - - /* Is EMS driver there? */ - if (! jems_available()) - return FALSE; - - /* Get status, make sure EMS is OK */ - ctx.ax = 0x4000; - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - return FALSE; - - /* Get version, must be >= 4.0 */ - ctx.ax = 0x4600; - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0 || LOBYTE(ctx.ax) < 0x40) - return FALSE; - - /* Try to allocate requested space */ - ctx.ax = 0x4300; - ctx.bx = (unsigned short) ((total_bytes_needed + EMSPAGESIZE-1L) / EMSPAGESIZE); - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - return FALSE; - - /* Succeeded, save the handle and away we go */ - info->handle.ems_handle = ctx.dx; - info->read_backing_store = read_ems_store; - info->write_backing_store = write_ems_store; - info->close_backing_store = close_ems_store; - TRACEMS1(cinfo, 1, JTRC_EMS_OPEN, ctx.dx); - return TRUE; /* succeeded */ -} - -#endif /* EMS_SUPPORTED */ - - -/* - * Initial opening of a backing-store object. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - /* Try extended memory, then expanded memory, then regular file. */ -#if XMS_SUPPORTED - if (open_xms_store(cinfo, info, total_bytes_needed)) - return; -#endif -#if EMS_SUPPORTED - if (open_ems_store(cinfo, info, total_bytes_needed)) - return; -#endif - if (open_file_store(cinfo, info, total_bytes_needed)) - return; - ERREXITS(cinfo, JERR_TFILE_CREATE, ""); -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - next_file_num = 0; /* initialize temp file name generator */ - return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* Microsoft C, at least in v6.00A, will not successfully reclaim freed - * blocks of size > 32Kbytes unless we give it a kick in the rear, like so: - */ -#ifdef NEED_FHEAPMIN - _fheapmin(); -#endif -} diff --git a/thirdparty/jpeg-9e/jmemdosa.asm b/thirdparty/jpeg-9e/jmemdosa.asm deleted file mode 100644 index ecd4372..0000000 --- a/thirdparty/jpeg-9e/jmemdosa.asm +++ /dev/null @@ -1,379 +0,0 @@ -; -; jmemdosa.asm -; -; Copyright (C) 1992, Thomas G. Lane. -; This file is part of the Independent JPEG Group's software. -; For conditions of distribution and use, see the accompanying README file. -; -; This file contains low-level interface routines to support the MS-DOS -; backing store manager (jmemdos.c). Routines are provided to access disk -; files through direct DOS calls, and to access XMS and EMS drivers. -; -; This file should assemble with Microsoft's MASM or any compatible -; assembler (including Borland's Turbo Assembler). If you haven't got -; a compatible assembler, better fall back to jmemansi.c or jmemname.c. -; -; To minimize dependence on the C compiler's register usage conventions, -; we save and restore all 8086 registers, even though most compilers only -; require SI,DI,DS to be preserved. Also, we use only 16-bit-wide return -; values, which everybody returns in AX. -; -; Based on code contributed by Ge' Weijers. -; - -JMEMDOSA_TXT segment byte public 'CODE' - - assume cs:JMEMDOSA_TXT - - public _jdos_open - public _jdos_close - public _jdos_seek - public _jdos_read - public _jdos_write - public _jxms_getdriver - public _jxms_calldriver - public _jems_available - public _jems_calldriver - -; -; short far jdos_open (short far * handle, char far * filename) -; -; Create and open a temporary file -; -_jdos_open proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov cx,0 ; normal file attributes - lds dx,dword ptr [bp+10] ; get filename pointer - mov ah,3ch ; create file - int 21h - jc open_err ; if failed, return error code - lds bx,dword ptr [bp+6] ; get handle pointer - mov word ptr [bx],ax ; save the handle - xor ax,ax ; return zero for OK -open_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_open endp - - -; -; short far jdos_close (short handle) -; -; Close the file handle -; -_jdos_close proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - mov ah,3eh ; close file - int 21h - jc close_err ; if failed, return error code - xor ax,ax ; return zero for OK -close_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_close endp - - -; -; short far jdos_seek (short handle, long offset) -; -; Set file position -; -_jdos_seek proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - mov dx,word ptr [bp+8] ; LS offset - mov cx,word ptr [bp+10] ; MS offset - mov ax,4200h ; absolute seek - int 21h - jc seek_err ; if failed, return error code - xor ax,ax ; return zero for OK -seek_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_seek endp - - -; -; short far jdos_read (short handle, void far * buffer, unsigned short count) -; -; Read from file -; -_jdos_read proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - lds dx,dword ptr [bp+8] ; buffer address - mov cx,word ptr [bp+12] ; number of bytes - mov ah,3fh ; read file - int 21h - jc read_err ; if failed, return error code - cmp ax,word ptr [bp+12] ; make sure all bytes were read - je read_ok - mov ax,1 ; else return 1 for not OK - jmp short read_err -read_ok: xor ax,ax ; return zero for OK -read_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_read endp - - -; -; short far jdos_write (short handle, void far * buffer, unsigned short count) -; -; Write to file -; -_jdos_write proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - lds dx,dword ptr [bp+8] ; buffer address - mov cx,word ptr [bp+12] ; number of bytes - mov ah,40h ; write file - int 21h - jc write_err ; if failed, return error code - cmp ax,word ptr [bp+12] ; make sure all bytes written - je write_ok - mov ax,1 ; else return 1 for not OK - jmp short write_err -write_ok: xor ax,ax ; return zero for OK -write_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_write endp - - -; -; void far jxms_getdriver (XMSDRIVER far *) -; -; Get the address of the XMS driver, or NULL if not available -; -_jxms_getdriver proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov ax,4300h ; call multiplex interrupt with - int 2fh ; a magic cookie, hex 4300 - cmp al,80h ; AL should contain hex 80 - je xmsavail - xor dx,dx ; no XMS driver available - xor ax,ax ; return a nil pointer - jmp short xmsavail_done -xmsavail: mov ax,4310h ; fetch driver address with - int 2fh ; another magic cookie - mov dx,es ; copy address to dx:ax - mov ax,bx -xmsavail_done: les bx,dword ptr [bp+6] ; get pointer to return value - mov word ptr es:[bx],ax - mov word ptr es:[bx+2],dx - pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jxms_getdriver endp - - -; -; void far jxms_calldriver (XMSDRIVER, XMScontext far *) -; -; The XMScontext structure contains values for the AX,DX,BX,SI,DS registers. -; These are loaded, the XMS call is performed, and the new values of the -; AX,DX,BX registers are written back to the context structure. -; -_jxms_calldriver proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - les bx,dword ptr [bp+10] ; get XMScontext pointer - mov ax,word ptr es:[bx] ; load registers - mov dx,word ptr es:[bx+2] - mov si,word ptr es:[bx+6] - mov ds,word ptr es:[bx+8] - mov bx,word ptr es:[bx+4] - call dword ptr [bp+6] ; call the driver - mov cx,bx ; save returned BX for a sec - les bx,dword ptr [bp+10] ; get XMScontext pointer - mov word ptr es:[bx],ax ; put back ax,dx,bx - mov word ptr es:[bx+2],dx - mov word ptr es:[bx+4],cx - pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jxms_calldriver endp - - -; -; short far jems_available (void) -; -; Have we got an EMS driver? (this comes straight from the EMS 4.0 specs) -; -_jems_available proc far - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov ax,3567h ; get interrupt vector 67h - int 21h - push cs - pop ds - mov di,000ah ; check offs 10 in returned seg - lea si,ASCII_device_name ; against literal string - mov cx,8 - cld - repe cmpsb - jne no_ems - mov ax,1 ; match, it's there - jmp short avail_done -no_ems: xor ax,ax ; it's not there -avail_done: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - ret - -ASCII_device_name db "EMMXXXX0" - -_jems_available endp - - -; -; void far jems_calldriver (EMScontext far *) -; -; The EMScontext structure contains values for the AX,DX,BX,SI,DS registers. -; These are loaded, the EMS trap is performed, and the new values of the -; AX,DX,BX registers are written back to the context structure. -; -_jems_calldriver proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - les bx,dword ptr [bp+6] ; get EMScontext pointer - mov ax,word ptr es:[bx] ; load registers - mov dx,word ptr es:[bx+2] - mov si,word ptr es:[bx+6] - mov ds,word ptr es:[bx+8] - mov bx,word ptr es:[bx+4] - int 67h ; call the EMS driver - mov cx,bx ; save returned BX for a sec - les bx,dword ptr [bp+6] ; get EMScontext pointer - mov word ptr es:[bx],ax ; put back ax,dx,bx - mov word ptr es:[bx+2],dx - mov word ptr es:[bx+4],cx - pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jems_calldriver endp - -JMEMDOSA_TXT ends - - end diff --git a/thirdparty/jpeg-9e/jmemmac.c b/thirdparty/jpeg-9e/jmemmac.c deleted file mode 100644 index 106f9be..0000000 --- a/thirdparty/jpeg-9e/jmemmac.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * jmemmac.c - * - * Copyright (C) 1992-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * jmemmac.c provides an Apple Macintosh implementation of the system- - * dependent portion of the JPEG memory manager. - * - * If you use jmemmac.c, then you must define USE_MAC_MEMMGR in the - * JPEG_INTERNALS part of jconfig.h. - * - * jmemmac.c uses the Macintosh toolbox routines NewPtr and DisposePtr - * instead of malloc and free. It accurately determines the amount of - * memory available by using CompactMem. Notice that if left to its - * own devices, this code can chew up all available space in the - * application's zone, with the exception of the rather small "slop" - * factor computed in jpeg_mem_available(). The application can ensure - * that more space is left over by reducing max_memory_to_use. - * - * Large images are swapped to disk using temporary files and System 7.0+'s - * temporary folder functionality. - * - * Note that jmemmac.c depends on two features of MacOS that were first - * introduced in System 7: FindFolder and the FSSpec-based calls. - * If your application uses jmemmac.c and is run under System 6 or earlier, - * and the jpeg library decides it needs a temporary file, it will abort, - * printing error messages about requiring System 7. (If no temporary files - * are created, it will run fine.) - * - * If you want to use jmemmac.c in an application that might be used with - * System 6 or earlier, then you should remove dependencies on FindFolder - * and the FSSpec calls. You will need to replace FindFolder with some - * other mechanism for finding a place to put temporary files, and you - * should replace the FSSpec calls with their HFS equivalents: - * - * FSpDelete -> HDelete - * FSpGetFInfo -> HGetFInfo - * FSpCreate -> HCreate - * FSpOpenDF -> HOpen *** Note: not HOpenDF *** - * FSMakeFSSpec -> (fill in spec by hand.) - * - * (Use HOpen instead of HOpenDF. HOpen is just a glue-interface to PBHOpen, - * which is on all HFS macs. HOpenDF is a System 7 addition which avoids the - * ages-old problem of names starting with a period.) - * - * Contributed by Sam Bushell (jsam@iagu.on.net) and - * Dan Gildor (gyld@in-touch.com). - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef USE_MAC_MEMMGR /* make sure user got configuration right */ - You forgot to define USE_MAC_MEMMGR in jconfig.h. /* deliberate syntax error */ -#endif - -#include /* we use the MacOS memory manager */ -#include /* we use the MacOS File stuff */ -#include /* we use the MacOS HFS stuff */ -#include /* for smSystemScript */ -#include /* we use Gestalt to test for specific functionality */ - -#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ -#define TEMP_FILE_NAME "JPG%03d.TMP" -#endif - -static int next_file_num; /* to distinguish among several temp files */ - - -/* - * Memory allocation and freeing are controlled by the MacOS library - * routines NewPtr() and DisposePtr(), which allocate fixed-address - * storage. Unfortunately, the IJG library isn't smart enough to cope - * with relocatable storage. - */ - -GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void *) NewPtr(sizeofobject); -} - -GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) -{ - DisposePtr((Ptr) object); -} - - -/* - * "Large" objects are treated the same as "small" ones. - * NB: we include FAR keywords in the routine declarations simply for - * consistency with the rest of the IJG code; FAR should expand to empty - * on rational architectures like the Mac. - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) NewPtr(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - DisposePtr((Ptr) object); -} - - -/* - * This routine computes the total memory space available for allocation. - */ - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - long limit = cinfo->mem->max_memory_to_use - already_allocated; - long slop, mem; - - /* Don't ask for more than what application has told us we may use */ - if (max_bytes_needed > limit && limit > 0) - max_bytes_needed = limit; - /* Find whether there's a big enough free block in the heap. - * CompactMem tries to create a contiguous block of the requested size, - * and then returns the size of the largest free block (which could be - * much more or much less than we asked for). - * We add some slop to ensure we don't use up all available memory. - */ - slop = max_bytes_needed / 16 + 32768L; - mem = CompactMem(max_bytes_needed + slop) - slop; - if (mem < 0) - mem = 0; /* sigh, couldn't even get the slop */ - /* Don't take more than the application says we can have */ - if (mem > limit && limit > 0) - mem = limit; - return mem; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - - -METHODDEF(void) -read_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - long bytes = byte_count; - long retVal; - - if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr ) - ERREXIT(cinfo, JERR_TFILE_SEEK); - - retVal = FSRead ( info->temp_file, &bytes, - (unsigned char *) buffer_address ); - if ( retVal != noErr || bytes != byte_count ) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - long bytes = byte_count; - long retVal; - - if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr ) - ERREXIT(cinfo, JERR_TFILE_SEEK); - - retVal = FSWrite ( info->temp_file, &bytes, - (unsigned char *) buffer_address ); - if ( retVal != noErr || bytes != byte_count ) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_backing_store (j_common_ptr cinfo, backing_store_ptr info) -{ - FSClose ( info->temp_file ); - FSpDelete ( &(info->tempSpec) ); -} - - -/* - * Initial opening of a backing-store object. - * - * This version uses FindFolder to find the Temporary Items folder, - * and puts the temporary file in there. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - short tmpRef, vRefNum; - long dirID; - FInfo finderInfo; - FSSpec theSpec; - Str255 fName; - OSErr osErr; - long gestaltResponse = 0; - - /* Check that FSSpec calls are available. */ - osErr = Gestalt( gestaltFSAttr, &gestaltResponse ); - if ( ( osErr != noErr ) - || !( gestaltResponse & (1<temp_name, TEMP_FILE_NAME, next_file_num); - strcpy ( (Ptr)fName+1, info->temp_name ); - *fName = strlen (info->temp_name); - osErr = FSMakeFSSpec ( vRefNum, dirID, fName, &theSpec ); - - if ( (osErr = FSpGetFInfo ( &theSpec, &finderInfo ) ) != noErr ) - break; - } - - osErr = FSpCreate ( &theSpec, '????', '????', smSystemScript ); - if ( osErr != noErr ) - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - - osErr = FSpOpenDF ( &theSpec, fsRdWrPerm, &(info->temp_file) ); - if ( osErr != noErr ) - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - - info->tempSpec = theSpec; - - info->read_backing_store = read_backing_store; - info->write_backing_store = write_backing_store; - info->close_backing_store = close_backing_store; - TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - next_file_num = 0; - - /* max_memory_to_use will be initialized to FreeMem()'s result; - * the calling application might later reduce it, for example - * to leave room to invoke multiple JPEG objects. - * Note that FreeMem returns the total number of free bytes; - * it may not be possible to allocate a single block of this size. - */ - return FreeMem(); -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* no work */ -} diff --git a/thirdparty/jpeg-9e/jmemmgr.c b/thirdparty/jpeg-9e/jmemmgr.c deleted file mode 100644 index 40377de..0000000 --- a/thirdparty/jpeg-9e/jmemmgr.c +++ /dev/null @@ -1,1115 +0,0 @@ -/* - * jmemmgr.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2011-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the JPEG system-independent memory management - * routines. This code is usable across a wide variety of machines; most - * of the system dependencies have been isolated in a separate file. - * The major functions provided here are: - * * pool-based allocation and freeing of memory; - * * policy decisions about how to divide available memory among the - * virtual arrays; - * * control logic for swapping virtual arrays between main memory and - * backing storage. - * The separate system-dependent file provides the actual backing-storage - * access code, and it contains the policy decision about how much total - * main memory to use. - * This file is system-dependent in the sense that some of its functions - * are unnecessary in some systems. For example, if there is enough virtual - * memory so that backing storage will never be used, much of the virtual - * array control logic could be removed. (Of course, if you have that much - * memory then you shouldn't care about a little bit of unused code...) - */ - -#define JPEG_INTERNALS -#define AM_MEMORY_MANAGER /* we define jvirt_Xarray_control structs */ -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef NO_GETENV -#ifndef HAVE_STDLIB_H /* should declare getenv() */ -extern char * getenv JPP((const char * name)); -#endif -#endif - - -/* - * Some important notes: - * The allocation routines provided here must never return NULL. - * They should exit to error_exit if unsuccessful. - * - * It's not a good idea to try to merge the sarray and barray routines, - * even though they are textually almost the same, because samples are - * usually stored as bytes while coefficients are shorts or ints. Thus, - * in machines where byte pointers have a different representation from - * word pointers, the resulting machine code could not be the same. - */ - - -/* - * Many machines require storage alignment: longs must start on 4-byte - * boundaries, doubles on 8-byte boundaries, etc. On such machines, malloc() - * always returns pointers that are multiples of the worst-case alignment - * requirement, and we had better do so too. - * There isn't any really portable way to determine the worst-case alignment - * requirement. This module assumes that the alignment requirement is - * multiples of sizeof(ALIGN_TYPE). - * By default, we define ALIGN_TYPE as double. This is necessary on some - * workstations (where doubles really do need 8-byte alignment) and will work - * fine on nearly everything. If your machine has lesser alignment needs, - * you can save a few bytes by making ALIGN_TYPE smaller. - * The only place I know of where this will NOT work is certain Macintosh - * 680x0 compilers that define double as a 10-byte IEEE extended float. - * Doing 10-byte alignment is counterproductive because longwords won't be - * aligned well. Put "#define ALIGN_TYPE long" in jconfig.h if you have - * such a compiler. - */ - -#ifndef ALIGN_TYPE /* so can override from jconfig.h */ -#define ALIGN_TYPE double -#endif - - -/* - * We allocate objects from "pools", where each pool is gotten with a single - * request to jpeg_get_small() or jpeg_get_large(). There is no per-object - * overhead within a pool, except for alignment padding. Each pool has a - * header with a link to the next pool of the same class. - * Small and large pool headers are identical except that the latter's - * link pointer must be FAR on 80x86 machines. - * Notice that the "real" header fields are union'ed with a dummy ALIGN_TYPE - * field. This forces the compiler to make SIZEOF(small_pool_hdr) a multiple - * of the alignment requirement of ALIGN_TYPE. - */ - -typedef union small_pool_struct * small_pool_ptr; - -typedef union small_pool_struct { - struct { - small_pool_ptr next; /* next in list of pools */ - size_t bytes_used; /* how many bytes already used within pool */ - size_t bytes_left; /* bytes still available in this pool */ - } hdr; - ALIGN_TYPE dummy; /* included in union to ensure alignment */ -} small_pool_hdr; - -typedef union large_pool_struct FAR * large_pool_ptr; - -typedef union large_pool_struct { - struct { - large_pool_ptr next; /* next in list of pools */ - size_t bytes_used; /* how many bytes already used within pool */ - size_t bytes_left; /* bytes still available in this pool */ - } hdr; - ALIGN_TYPE dummy; /* included in union to ensure alignment */ -} large_pool_hdr; - - -/* - * Here is the full definition of a memory manager object. - */ - -typedef struct { - struct jpeg_memory_mgr pub; /* public fields */ - - /* Each pool identifier (lifetime class) names a linked list of pools. */ - small_pool_ptr small_list[JPOOL_NUMPOOLS]; - large_pool_ptr large_list[JPOOL_NUMPOOLS]; - - /* Since we only have one lifetime class of virtual arrays, only one - * linked list is necessary (for each datatype). Note that the virtual - * array control blocks being linked together are actually stored somewhere - * in the small-pool list. - */ - jvirt_sarray_ptr virt_sarray_list; - jvirt_barray_ptr virt_barray_list; - - /* This counts total space obtained from jpeg_get_small/large */ - size_t total_space_allocated; - - /* alloc_sarray and alloc_barray set this value for use by virtual - * array routines. - */ - JDIMENSION last_rowsperchunk; /* from most recent alloc_sarray/barray */ -} my_memory_mgr; - -typedef my_memory_mgr * my_mem_ptr; - - -/* - * The control blocks for virtual arrays. - * Note that these blocks are allocated in the "small" pool area. - * System-dependent info for the associated backing store (if any) is hidden - * inside the backing_store_info struct. - */ - -struct jvirt_sarray_control { - JSAMPARRAY mem_buffer; /* => the in-memory buffer */ - JDIMENSION rows_in_array; /* total virtual array height */ - JDIMENSION samplesperrow; /* width of array (and of memory buffer) */ - JDIMENSION maxaccess; /* max rows accessed by access_virt_sarray */ - JDIMENSION rows_in_mem; /* height of memory buffer */ - JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ - JDIMENSION cur_start_row; /* first logical row # in the buffer */ - JDIMENSION first_undef_row; /* row # of first uninitialized row */ - boolean pre_zero; /* pre-zero mode requested? */ - boolean dirty; /* do current buffer contents need written? */ - boolean b_s_open; /* is backing-store data valid? */ - jvirt_sarray_ptr next; /* link to next virtual sarray control block */ - backing_store_info b_s_info; /* System-dependent control info */ -}; - -struct jvirt_barray_control { - JBLOCKARRAY mem_buffer; /* => the in-memory buffer */ - JDIMENSION rows_in_array; /* total virtual array height */ - JDIMENSION blocksperrow; /* width of array (and of memory buffer) */ - JDIMENSION maxaccess; /* max rows accessed by access_virt_barray */ - JDIMENSION rows_in_mem; /* height of memory buffer */ - JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ - JDIMENSION cur_start_row; /* first logical row # in the buffer */ - JDIMENSION first_undef_row; /* row # of first uninitialized row */ - boolean pre_zero; /* pre-zero mode requested? */ - boolean dirty; /* do current buffer contents need written? */ - boolean b_s_open; /* is backing-store data valid? */ - jvirt_barray_ptr next; /* link to next virtual barray control block */ - backing_store_info b_s_info; /* System-dependent control info */ -}; - - -#ifdef MEM_STATS /* optional extra stuff for statistics */ - -LOCAL(void) -print_mem_stats (j_common_ptr cinfo, int pool_id) -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - small_pool_ptr shdr_ptr; - large_pool_ptr lhdr_ptr; - - /* Since this is only a debugging stub, we can cheat a little by using - * fprintf directly rather than going through the trace message code. - * This is helpful because message parm array can't handle longs. - */ - fprintf(stderr, "Freeing pool %d, total space = %ld\n", - pool_id, (long) mem->total_space_allocated); - - for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL; - lhdr_ptr = lhdr_ptr->hdr.next) { - fprintf(stderr, " Large chunk used %ld\n", - (long) lhdr_ptr->hdr.bytes_used); - } - - for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL; - shdr_ptr = shdr_ptr->hdr.next) { - fprintf(stderr, " Small chunk used %ld free %ld\n", - (long) shdr_ptr->hdr.bytes_used, - (long) shdr_ptr->hdr.bytes_left); - } -} - -#endif /* MEM_STATS */ - - -LOCAL(noreturn_t) -out_of_memory (j_common_ptr cinfo, int which) -/* Report an out-of-memory error and stop execution */ -/* If we compiled MEM_STATS support, report alloc requests before dying */ -{ -#ifdef MEM_STATS - cinfo->err->trace_level = 2; /* force self_destruct to report stats */ -#endif - ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, which); -} - - -/* - * Allocation of "small" objects. - * - * For these, we use pooled storage. When a new pool must be created, - * we try to get enough space for the current request plus a "slop" factor, - * where the slop will be the amount of leftover space in the new pool. - * The speed vs. space tradeoff is largely determined by the slop values. - * A different slop value is provided for each pool class (lifetime), - * and we also distinguish the first pool of a class from later ones. - * NOTE: the values given work fairly well on both 16- and 32-bit-int - * machines, but may be too small if longs are 64 bits or more. - */ - -static const size_t first_pool_slop[JPOOL_NUMPOOLS] = -{ - 1600, /* first PERMANENT pool */ - 16000 /* first IMAGE pool */ -}; - -static const size_t extra_pool_slop[JPOOL_NUMPOOLS] = -{ - 0, /* additional PERMANENT pools */ - 5000 /* additional IMAGE pools */ -}; - -#define MIN_SLOP 50 /* greater than 0 to avoid futile looping */ - - -METHODDEF(void *) -alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject) -/* Allocate a "small" object */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - small_pool_ptr hdr_ptr, prev_hdr_ptr; - size_t odd_bytes, min_request, slop; - char * data_ptr; - - /* Check for unsatisfiable request (do now to ensure no overflow below) */ - if (sizeofobject > (size_t) MAX_ALLOC_CHUNK - SIZEOF(small_pool_hdr)) - out_of_memory(cinfo, 1); /* request exceeds malloc's ability */ - - /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ - odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); - if (odd_bytes > 0) - sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; - - /* See if space is available in any existing pool */ - if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) - ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ - prev_hdr_ptr = NULL; - hdr_ptr = mem->small_list[pool_id]; - while (hdr_ptr != NULL) { - if (hdr_ptr->hdr.bytes_left >= sizeofobject) - break; /* found pool with enough space */ - prev_hdr_ptr = hdr_ptr; - hdr_ptr = hdr_ptr->hdr.next; - } - - /* Time to make a new pool? */ - if (hdr_ptr == NULL) { - /* min_request is what we need now, slop is what will be leftover */ - min_request = sizeofobject + SIZEOF(small_pool_hdr); - if (prev_hdr_ptr == NULL) /* first pool in class? */ - slop = first_pool_slop[pool_id]; - else - slop = extra_pool_slop[pool_id]; - /* Don't ask for more than MAX_ALLOC_CHUNK */ - if (slop > (size_t) MAX_ALLOC_CHUNK - min_request) - slop = (size_t) MAX_ALLOC_CHUNK - min_request; - /* Try to get space, if fail reduce slop and try again */ - for (;;) { - hdr_ptr = (small_pool_ptr) jpeg_get_small(cinfo, min_request + slop); - if (hdr_ptr != NULL) - break; - slop /= 2; - if (slop < MIN_SLOP) /* give up when it gets real small */ - out_of_memory(cinfo, 2); /* jpeg_get_small failed */ - } - mem->total_space_allocated += min_request + slop; - /* Success, initialize the new pool header and add to end of list */ - hdr_ptr->hdr.next = NULL; - hdr_ptr->hdr.bytes_used = 0; - hdr_ptr->hdr.bytes_left = sizeofobject + slop; - if (prev_hdr_ptr == NULL) /* first pool in class? */ - mem->small_list[pool_id] = hdr_ptr; - else - prev_hdr_ptr->hdr.next = hdr_ptr; - } - - /* OK, allocate the object from the current pool */ - data_ptr = (char *) (hdr_ptr + 1); /* point to first data byte in pool */ - data_ptr += hdr_ptr->hdr.bytes_used; /* point to place for object */ - hdr_ptr->hdr.bytes_used += sizeofobject; - hdr_ptr->hdr.bytes_left -= sizeofobject; - - return (void *) data_ptr; -} - - -/* - * Allocation of "large" objects. - * - * The external semantics of these are the same as "small" objects, - * except that FAR pointers are used on 80x86. However the pool - * management heuristics are quite different. We assume that each - * request is large enough that it may as well be passed directly to - * jpeg_get_large; the pool management just links everything together - * so that we can free it all on demand. - * Note: the major use of "large" objects is in JSAMPARRAY and JBLOCKARRAY - * structures. The routines that create these structures (see below) - * deliberately bunch rows together to ensure a large request size. - */ - -METHODDEF(void FAR *) -alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject) -/* Allocate a "large" object */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - large_pool_ptr hdr_ptr; - size_t odd_bytes; - - /* Check for unsatisfiable request (do now to ensure no overflow below) */ - if (sizeofobject > (size_t) MAX_ALLOC_CHUNK - SIZEOF(large_pool_hdr)) - out_of_memory(cinfo, 3); /* request exceeds malloc's ability */ - - /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ - odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); - if (odd_bytes > 0) - sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; - - /* Always make a new pool */ - if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) - ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ - - hdr_ptr = (large_pool_ptr) jpeg_get_large(cinfo, sizeofobject + - SIZEOF(large_pool_hdr)); - if (hdr_ptr == NULL) - out_of_memory(cinfo, 4); /* jpeg_get_large failed */ - mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr); - - /* Success, initialize the new pool header and add to list */ - hdr_ptr->hdr.next = mem->large_list[pool_id]; - /* We maintain space counts in each pool header for statistical purposes, - * even though they are not needed for allocation. - */ - hdr_ptr->hdr.bytes_used = sizeofobject; - hdr_ptr->hdr.bytes_left = 0; - mem->large_list[pool_id] = hdr_ptr; - - return (void FAR *) (hdr_ptr + 1); /* point to first data byte in pool */ -} - - -/* - * Creation of 2-D sample arrays. - * The pointers are in near heap, the samples themselves in FAR heap. - * - * To minimize allocation overhead and to allow I/O of large contiguous - * blocks, we allocate the sample rows in groups of as many rows as possible - * without exceeding MAX_ALLOC_CHUNK total bytes per allocation request. - * NB: the virtual array control routines, later in this file, know about - * this chunking of rows. The rowsperchunk value is left in the mem manager - * object so that it can be saved away if this sarray is the workspace for - * a virtual array. - */ - -METHODDEF(JSAMPARRAY) -alloc_sarray (j_common_ptr cinfo, int pool_id, - JDIMENSION samplesperrow, JDIMENSION numrows) -/* Allocate a 2-D sample array */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - JSAMPARRAY result; - JSAMPROW workspace; - JDIMENSION rowsperchunk, currow, i; - long ltemp; - - /* Calculate max # of rows allowed in one allocation chunk */ - ltemp = (MAX_ALLOC_CHUNK - SIZEOF(large_pool_hdr)) / - ((long) samplesperrow * SIZEOF(JSAMPLE)); - if (ltemp <= 0) - ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); - if (ltemp < (long) numrows) - rowsperchunk = (JDIMENSION) ltemp; - else - rowsperchunk = numrows; - mem->last_rowsperchunk = rowsperchunk; - - /* Get space for row pointers (small object) */ - result = (JSAMPARRAY) alloc_small(cinfo, pool_id, - (size_t) numrows * SIZEOF(JSAMPROW)); - - /* Get the rows themselves (large objects) */ - currow = 0; - while (currow < numrows) { - rowsperchunk = MIN(rowsperchunk, numrows - currow); - workspace = (JSAMPROW) alloc_large(cinfo, pool_id, - (size_t) rowsperchunk * (size_t) samplesperrow * SIZEOF(JSAMPLE)); - for (i = rowsperchunk; i > 0; i--) { - result[currow++] = workspace; - workspace += samplesperrow; - } - } - - return result; -} - - -/* - * Creation of 2-D coefficient-block arrays. - * This is essentially the same as the code for sample arrays, above. - */ - -METHODDEF(JBLOCKARRAY) -alloc_barray (j_common_ptr cinfo, int pool_id, - JDIMENSION blocksperrow, JDIMENSION numrows) -/* Allocate a 2-D coefficient-block array */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - JBLOCKARRAY result; - JBLOCKROW workspace; - JDIMENSION rowsperchunk, currow, i; - long ltemp; - - /* Calculate max # of rows allowed in one allocation chunk */ - ltemp = (MAX_ALLOC_CHUNK - SIZEOF(large_pool_hdr)) / - ((long) blocksperrow * SIZEOF(JBLOCK)); - if (ltemp <= 0) - ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); - if (ltemp < (long) numrows) - rowsperchunk = (JDIMENSION) ltemp; - else - rowsperchunk = numrows; - mem->last_rowsperchunk = rowsperchunk; - - /* Get space for row pointers (small object) */ - result = (JBLOCKARRAY) alloc_small(cinfo, pool_id, - (size_t) numrows * SIZEOF(JBLOCKROW)); - - /* Get the rows themselves (large objects) */ - currow = 0; - while (currow < numrows) { - rowsperchunk = MIN(rowsperchunk, numrows - currow); - workspace = (JBLOCKROW) alloc_large(cinfo, pool_id, - (size_t) rowsperchunk * (size_t) blocksperrow * SIZEOF(JBLOCK)); - for (i = rowsperchunk; i > 0; i--) { - result[currow++] = workspace; - workspace += blocksperrow; - } - } - - return result; -} - - -/* - * About virtual array management: - * - * The above "normal" array routines are only used to allocate strip buffers - * (as wide as the image, but just a few rows high). Full-image-sized buffers - * are handled as "virtual" arrays. The array is still accessed a strip at a - * time, but the memory manager must save the whole array for repeated - * accesses. The intended implementation is that there is a strip buffer in - * memory (as high as is possible given the desired memory limit), plus a - * backing file that holds the rest of the array. - * - * The request_virt_array routines are told the total size of the image and - * the maximum number of rows that will be accessed at once. The in-memory - * buffer must be at least as large as the maxaccess value. - * - * The request routines create control blocks but not the in-memory buffers. - * That is postponed until realize_virt_arrays is called. At that time the - * total amount of space needed is known (approximately, anyway), so free - * memory can be divided up fairly. - * - * The access_virt_array routines are responsible for making a specific strip - * area accessible (after reading or writing the backing file, if necessary). - * Note that the access routines are told whether the caller intends to modify - * the accessed strip; during a read-only pass this saves having to rewrite - * data to disk. The access routines are also responsible for pre-zeroing - * any newly accessed rows, if pre-zeroing was requested. - * - * In current usage, the access requests are usually for nonoverlapping - * strips; that is, successive access start_row numbers differ by exactly - * num_rows = maxaccess. This means we can get good performance with simple - * buffer dump/reload logic, by making the in-memory buffer be a multiple - * of the access height; then there will never be accesses across bufferload - * boundaries. The code will still work with overlapping access requests, - * but it doesn't handle bufferload overlaps very efficiently. - */ - - -METHODDEF(jvirt_sarray_ptr) -request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero, - JDIMENSION samplesperrow, JDIMENSION numrows, - JDIMENSION maxaccess) -/* Request a virtual 2-D sample array */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - jvirt_sarray_ptr result; - - /* Only IMAGE-lifetime virtual arrays are currently supported */ - if (pool_id != JPOOL_IMAGE) - ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ - - /* get control block */ - result = (jvirt_sarray_ptr) alloc_small(cinfo, pool_id, - SIZEOF(struct jvirt_sarray_control)); - - result->mem_buffer = NULL; /* marks array not yet realized */ - result->rows_in_array = numrows; - result->samplesperrow = samplesperrow; - result->maxaccess = maxaccess; - result->pre_zero = pre_zero; - result->b_s_open = FALSE; /* no associated backing-store object */ - result->next = mem->virt_sarray_list; /* add to list of virtual arrays */ - mem->virt_sarray_list = result; - - return result; -} - - -METHODDEF(jvirt_barray_ptr) -request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero, - JDIMENSION blocksperrow, JDIMENSION numrows, - JDIMENSION maxaccess) -/* Request a virtual 2-D coefficient-block array */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - jvirt_barray_ptr result; - - /* Only IMAGE-lifetime virtual arrays are currently supported */ - if (pool_id != JPOOL_IMAGE) - ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ - - /* get control block */ - result = (jvirt_barray_ptr) alloc_small(cinfo, pool_id, - SIZEOF(struct jvirt_barray_control)); - - result->mem_buffer = NULL; /* marks array not yet realized */ - result->rows_in_array = numrows; - result->blocksperrow = blocksperrow; - result->maxaccess = maxaccess; - result->pre_zero = pre_zero; - result->b_s_open = FALSE; /* no associated backing-store object */ - result->next = mem->virt_barray_list; /* add to list of virtual arrays */ - mem->virt_barray_list = result; - - return result; -} - - -METHODDEF(void) -realize_virt_arrays (j_common_ptr cinfo) -/* Allocate the in-memory buffers for any unrealized virtual arrays */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - long bytesperrow, space_per_minheight, maximum_space; - long avail_mem, minheights, max_minheights; - jvirt_sarray_ptr sptr; - jvirt_barray_ptr bptr; - - /* Compute the minimum space needed (maxaccess rows in each buffer) - * and the maximum space needed (full image height in each buffer). - * These may be of use to the system-dependent jpeg_mem_available routine. - */ - space_per_minheight = 0; - maximum_space = 0; - for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { - if (sptr->mem_buffer == NULL) { /* if not realized yet */ - bytesperrow = (long) sptr->samplesperrow * SIZEOF(JSAMPLE); - space_per_minheight += (long) sptr->maxaccess * bytesperrow; - maximum_space += (long) sptr->rows_in_array * bytesperrow; - } - } - for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { - if (bptr->mem_buffer == NULL) { /* if not realized yet */ - bytesperrow = (long) bptr->blocksperrow * SIZEOF(JBLOCK); - space_per_minheight += (long) bptr->maxaccess * bytesperrow; - maximum_space += (long) bptr->rows_in_array * bytesperrow; - } - } - - if (space_per_minheight <= 0) - return; /* no unrealized arrays, no work */ - - /* Determine amount of memory to actually use; this is system-dependent. */ - avail_mem = jpeg_mem_available(cinfo, space_per_minheight, maximum_space, - (long) mem->total_space_allocated); - - /* If the maximum space needed is available, make all the buffers full - * height; otherwise parcel it out with the same number of minheights - * in each buffer. - */ - if (avail_mem >= maximum_space) - max_minheights = 1000000000L; - else { - max_minheights = avail_mem / space_per_minheight; - /* If there doesn't seem to be enough space, try to get the minimum - * anyway. This allows a "stub" implementation of jpeg_mem_available(). - */ - if (max_minheights <= 0) - max_minheights = 1; - } - - /* Allocate the in-memory buffers and initialize backing store as needed. */ - - for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { - if (sptr->mem_buffer == NULL) { /* if not realized yet */ - minheights = ((long) sptr->rows_in_array - 1L) / sptr->maxaccess + 1L; - if (minheights <= max_minheights) { - /* This buffer fits in memory */ - sptr->rows_in_mem = sptr->rows_in_array; - } else { - /* It doesn't fit in memory, create backing store. */ - sptr->rows_in_mem = (JDIMENSION) (max_minheights * sptr->maxaccess); - jpeg_open_backing_store(cinfo, & sptr->b_s_info, - (long) sptr->rows_in_array * - (long) sptr->samplesperrow * - (long) SIZEOF(JSAMPLE)); - sptr->b_s_open = TRUE; - } - sptr->mem_buffer = alloc_sarray(cinfo, JPOOL_IMAGE, - sptr->samplesperrow, sptr->rows_in_mem); - sptr->rowsperchunk = mem->last_rowsperchunk; - sptr->cur_start_row = 0; - sptr->first_undef_row = 0; - sptr->dirty = FALSE; - } - } - - for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { - if (bptr->mem_buffer == NULL) { /* if not realized yet */ - minheights = ((long) bptr->rows_in_array - 1L) / bptr->maxaccess + 1L; - if (minheights <= max_minheights) { - /* This buffer fits in memory */ - bptr->rows_in_mem = bptr->rows_in_array; - } else { - /* It doesn't fit in memory, create backing store. */ - bptr->rows_in_mem = (JDIMENSION) (max_minheights * bptr->maxaccess); - jpeg_open_backing_store(cinfo, & bptr->b_s_info, - (long) bptr->rows_in_array * - (long) bptr->blocksperrow * - (long) SIZEOF(JBLOCK)); - bptr->b_s_open = TRUE; - } - bptr->mem_buffer = alloc_barray(cinfo, JPOOL_IMAGE, - bptr->blocksperrow, bptr->rows_in_mem); - bptr->rowsperchunk = mem->last_rowsperchunk; - bptr->cur_start_row = 0; - bptr->first_undef_row = 0; - bptr->dirty = FALSE; - } - } -} - - -LOCAL(void) -do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing) -/* Do backing store read or write of a virtual sample array */ -{ - long bytesperrow, file_offset, byte_count, rows, thisrow, i; - - bytesperrow = (long) ptr->samplesperrow * SIZEOF(JSAMPLE); - file_offset = (long) ptr->cur_start_row * bytesperrow; - /* Loop to read or write each allocation chunk in mem_buffer */ - for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { - /* One chunk, but check for short chunk at end of buffer */ - rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); - /* Transfer no more than is currently defined */ - thisrow = (long) ptr->cur_start_row + i; - rows = MIN(rows, (long) ptr->first_undef_row - thisrow); - /* Transfer no more than fits in file */ - rows = MIN(rows, (long) ptr->rows_in_array - thisrow); - if (rows <= 0) /* this chunk might be past end of file! */ - break; - byte_count = rows * bytesperrow; - if (writing) - (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, - (void FAR *) ptr->mem_buffer[i], - file_offset, byte_count); - else - (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, - (void FAR *) ptr->mem_buffer[i], - file_offset, byte_count); - file_offset += byte_count; - } -} - - -LOCAL(void) -do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing) -/* Do backing store read or write of a virtual coefficient-block array */ -{ - long bytesperrow, file_offset, byte_count, rows, thisrow, i; - - bytesperrow = (long) ptr->blocksperrow * SIZEOF(JBLOCK); - file_offset = (long) ptr->cur_start_row * bytesperrow; - /* Loop to read or write each allocation chunk in mem_buffer */ - for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { - /* One chunk, but check for short chunk at end of buffer */ - rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); - /* Transfer no more than is currently defined */ - thisrow = (long) ptr->cur_start_row + i; - rows = MIN(rows, (long) ptr->first_undef_row - thisrow); - /* Transfer no more than fits in file */ - rows = MIN(rows, (long) ptr->rows_in_array - thisrow); - if (rows <= 0) /* this chunk might be past end of file! */ - break; - byte_count = rows * bytesperrow; - if (writing) - (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, - (void FAR *) ptr->mem_buffer[i], - file_offset, byte_count); - else - (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, - (void FAR *) ptr->mem_buffer[i], - file_offset, byte_count); - file_offset += byte_count; - } -} - - -METHODDEF(JSAMPARRAY) -access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr, - JDIMENSION start_row, JDIMENSION num_rows, - boolean writable) -/* Access the part of a virtual sample array starting at start_row */ -/* and extending for num_rows rows. writable is true if */ -/* caller intends to modify the accessed area. */ -{ - JDIMENSION end_row = start_row + num_rows; - JDIMENSION undef_row; - - /* debugging check */ - if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || - ptr->mem_buffer == NULL) - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - - /* Make the desired part of the virtual array accessible */ - if (start_row < ptr->cur_start_row || - end_row > ptr->cur_start_row + ptr->rows_in_mem) { - if (! ptr->b_s_open) - ERREXIT(cinfo, JERR_VIRTUAL_BUG); - /* Flush old buffer contents if necessary */ - if (ptr->dirty) { - do_sarray_io(cinfo, ptr, TRUE); - ptr->dirty = FALSE; - } - /* Decide what part of virtual array to access. - * Algorithm: if target address > current window, assume forward scan, - * load starting at target address. If target address < current window, - * assume backward scan, load so that target area is top of window. - * Note that when switching from forward write to forward read, will have - * start_row = 0, so the limiting case applies and we load from 0 anyway. - */ - if (start_row > ptr->cur_start_row) { - ptr->cur_start_row = start_row; - } else { - /* use long arithmetic here to avoid overflow & unsigned problems */ - long ltemp; - - ltemp = (long) end_row - (long) ptr->rows_in_mem; - if (ltemp < 0) - ltemp = 0; /* don't fall off front end of file */ - ptr->cur_start_row = (JDIMENSION) ltemp; - } - /* Read in the selected part of the array. - * During the initial write pass, we will do no actual read - * because the selected part is all undefined. - */ - do_sarray_io(cinfo, ptr, FALSE); - } - /* Ensure the accessed part of the array is defined; prezero if needed. - * To improve locality of access, we only prezero the part of the array - * that the caller is about to access, not the entire in-memory array. - */ - if (ptr->first_undef_row < end_row) { - if (ptr->first_undef_row < start_row) { - if (writable) /* writer skipped over a section of array */ - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - undef_row = start_row; /* but reader is allowed to read ahead */ - } else { - undef_row = ptr->first_undef_row; - } - if (writable) - ptr->first_undef_row = end_row; - if (ptr->pre_zero) { - size_t bytesperrow = (size_t) ptr->samplesperrow * SIZEOF(JSAMPLE); - undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ - end_row -= ptr->cur_start_row; - while (undef_row < end_row) { - FMEMZERO((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); - undef_row++; - } - } else { - if (! writable) /* reader looking at undefined data */ - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - } - } - /* Flag the buffer dirty if caller will write in it */ - if (writable) - ptr->dirty = TRUE; - /* Return address of proper part of the buffer */ - return ptr->mem_buffer + (start_row - ptr->cur_start_row); -} - - -METHODDEF(JBLOCKARRAY) -access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr, - JDIMENSION start_row, JDIMENSION num_rows, - boolean writable) -/* Access the part of a virtual block array starting at start_row */ -/* and extending for num_rows rows. writable is true if */ -/* caller intends to modify the accessed area. */ -{ - JDIMENSION end_row = start_row + num_rows; - JDIMENSION undef_row; - - /* debugging check */ - if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || - ptr->mem_buffer == NULL) - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - - /* Make the desired part of the virtual array accessible */ - if (start_row < ptr->cur_start_row || - end_row > ptr->cur_start_row + ptr->rows_in_mem) { - if (! ptr->b_s_open) - ERREXIT(cinfo, JERR_VIRTUAL_BUG); - /* Flush old buffer contents if necessary */ - if (ptr->dirty) { - do_barray_io(cinfo, ptr, TRUE); - ptr->dirty = FALSE; - } - /* Decide what part of virtual array to access. - * Algorithm: if target address > current window, assume forward scan, - * load starting at target address. If target address < current window, - * assume backward scan, load so that target area is top of window. - * Note that when switching from forward write to forward read, will have - * start_row = 0, so the limiting case applies and we load from 0 anyway. - */ - if (start_row > ptr->cur_start_row) { - ptr->cur_start_row = start_row; - } else { - /* use long arithmetic here to avoid overflow & unsigned problems */ - long ltemp; - - ltemp = (long) end_row - (long) ptr->rows_in_mem; - if (ltemp < 0) - ltemp = 0; /* don't fall off front end of file */ - ptr->cur_start_row = (JDIMENSION) ltemp; - } - /* Read in the selected part of the array. - * During the initial write pass, we will do no actual read - * because the selected part is all undefined. - */ - do_barray_io(cinfo, ptr, FALSE); - } - /* Ensure the accessed part of the array is defined; prezero if needed. - * To improve locality of access, we only prezero the part of the array - * that the caller is about to access, not the entire in-memory array. - */ - if (ptr->first_undef_row < end_row) { - if (ptr->first_undef_row < start_row) { - if (writable) /* writer skipped over a section of array */ - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - undef_row = start_row; /* but reader is allowed to read ahead */ - } else { - undef_row = ptr->first_undef_row; - } - if (writable) - ptr->first_undef_row = end_row; - if (ptr->pre_zero) { - size_t bytesperrow = (size_t) ptr->blocksperrow * SIZEOF(JBLOCK); - undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ - end_row -= ptr->cur_start_row; - while (undef_row < end_row) { - FMEMZERO((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); - undef_row++; - } - } else { - if (! writable) /* reader looking at undefined data */ - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - } - } - /* Flag the buffer dirty if caller will write in it */ - if (writable) - ptr->dirty = TRUE; - /* Return address of proper part of the buffer */ - return ptr->mem_buffer + (start_row - ptr->cur_start_row); -} - - -/* - * Release all objects belonging to a specified pool. - */ - -METHODDEF(void) -free_pool (j_common_ptr cinfo, int pool_id) -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - small_pool_ptr shdr_ptr; - large_pool_ptr lhdr_ptr; - size_t space_freed; - - if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) - ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ - -#ifdef MEM_STATS - if (cinfo->err->trace_level > 1) - print_mem_stats(cinfo, pool_id); /* print pool's memory usage statistics */ -#endif - - /* If freeing IMAGE pool, close any virtual arrays first */ - if (pool_id == JPOOL_IMAGE) { - jvirt_sarray_ptr sptr; - jvirt_barray_ptr bptr; - - for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { - if (sptr->b_s_open) { /* there may be no backing store */ - sptr->b_s_open = FALSE; /* prevent recursive close if error */ - (*sptr->b_s_info.close_backing_store) (cinfo, & sptr->b_s_info); - } - } - mem->virt_sarray_list = NULL; - for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { - if (bptr->b_s_open) { /* there may be no backing store */ - bptr->b_s_open = FALSE; /* prevent recursive close if error */ - (*bptr->b_s_info.close_backing_store) (cinfo, & bptr->b_s_info); - } - } - mem->virt_barray_list = NULL; - } - - /* Release large objects */ - lhdr_ptr = mem->large_list[pool_id]; - mem->large_list[pool_id] = NULL; - - while (lhdr_ptr != NULL) { - large_pool_ptr next_lhdr_ptr = lhdr_ptr->hdr.next; - space_freed = lhdr_ptr->hdr.bytes_used + - lhdr_ptr->hdr.bytes_left + - SIZEOF(large_pool_hdr); - jpeg_free_large(cinfo, (void FAR *) lhdr_ptr, space_freed); - mem->total_space_allocated -= space_freed; - lhdr_ptr = next_lhdr_ptr; - } - - /* Release small objects */ - shdr_ptr = mem->small_list[pool_id]; - mem->small_list[pool_id] = NULL; - - while (shdr_ptr != NULL) { - small_pool_ptr next_shdr_ptr = shdr_ptr->hdr.next; - space_freed = shdr_ptr->hdr.bytes_used + - shdr_ptr->hdr.bytes_left + - SIZEOF(small_pool_hdr); - jpeg_free_small(cinfo, (void *) shdr_ptr, space_freed); - mem->total_space_allocated -= space_freed; - shdr_ptr = next_shdr_ptr; - } -} - - -/* - * Close up shop entirely. - * Note that this cannot be called unless cinfo->mem is non-NULL. - */ - -METHODDEF(void) -self_destruct (j_common_ptr cinfo) -{ - int pool; - - /* Close all backing store, release all memory. - * Releasing pools in reverse order might help avoid fragmentation - * with some (brain-damaged) malloc libraries. - */ - for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { - free_pool(cinfo, pool); - } - - /* Release the memory manager control block too. */ - jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr)); - cinfo->mem = NULL; /* ensures I will be called only once */ - - jpeg_mem_term(cinfo); /* system-dependent cleanup */ -} - - -/* - * Memory manager initialization. - * When this is called, only the error manager pointer is valid in cinfo! - */ - -GLOBAL(void) -jinit_memory_mgr (j_common_ptr cinfo) -{ - my_mem_ptr mem; - long max_to_use; - int pool; - size_t test_mac; - - cinfo->mem = NULL; /* for safety if init fails */ - - /* Check for configuration errors. - * SIZEOF(ALIGN_TYPE) should be a power of 2; otherwise, it probably - * doesn't reflect any real hardware alignment requirement. - * The test is a little tricky: for X>0, X and X-1 have no one-bits - * in common if and only if X is a power of 2, ie has only one one-bit. - * Some compilers may give an "unreachable code" warning here; ignore it. - */ - if ((SIZEOF(ALIGN_TYPE) & (SIZEOF(ALIGN_TYPE)-1)) != 0) - ERREXIT(cinfo, JERR_BAD_ALIGN_TYPE); - /* MAX_ALLOC_CHUNK must be representable as type size_t, and must be - * a multiple of SIZEOF(ALIGN_TYPE). - * Again, an "unreachable code" warning may be ignored here. - * But a "constant too large" warning means you need to fix MAX_ALLOC_CHUNK. - */ - test_mac = (size_t) MAX_ALLOC_CHUNK; - if ((long) test_mac != MAX_ALLOC_CHUNK || - (MAX_ALLOC_CHUNK % SIZEOF(ALIGN_TYPE)) != 0) - ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); - - max_to_use = jpeg_mem_init(cinfo); /* system-dependent initialization */ - - /* Attempt to allocate memory manager's control block */ - mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr)); - - if (mem == NULL) { - jpeg_mem_term(cinfo); /* system-dependent cleanup */ - ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0); - } - - /* OK, fill in the method pointers */ - mem->pub.alloc_small = alloc_small; - mem->pub.alloc_large = alloc_large; - mem->pub.alloc_sarray = alloc_sarray; - mem->pub.alloc_barray = alloc_barray; - mem->pub.request_virt_sarray = request_virt_sarray; - mem->pub.request_virt_barray = request_virt_barray; - mem->pub.realize_virt_arrays = realize_virt_arrays; - mem->pub.access_virt_sarray = access_virt_sarray; - mem->pub.access_virt_barray = access_virt_barray; - mem->pub.free_pool = free_pool; - mem->pub.self_destruct = self_destruct; - - /* Make MAX_ALLOC_CHUNK accessible to other modules */ - mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK; - - /* Initialize working state */ - mem->pub.max_memory_to_use = max_to_use; - - for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { - mem->small_list[pool] = NULL; - mem->large_list[pool] = NULL; - } - mem->virt_sarray_list = NULL; - mem->virt_barray_list = NULL; - - mem->total_space_allocated = SIZEOF(my_memory_mgr); - - /* Declare ourselves open for business */ - cinfo->mem = &mem->pub; - - /* Check for an environment variable JPEGMEM; if found, override the - * default max_memory setting from jpeg_mem_init. Note that the - * surrounding application may again override this value. - * If your system doesn't support getenv(), define NO_GETENV to disable - * this feature. - */ -#ifndef NO_GETENV - { char * memenv; - - if ((memenv = getenv("JPEGMEM")) != NULL) { - char ch = 'x'; - - if (sscanf(memenv, "%ld%c", &max_to_use, &ch) > 0) { - if (ch == 'm' || ch == 'M') - max_to_use *= 1000L; - mem->pub.max_memory_to_use = max_to_use * 1000L; - } - } - } -#endif - -} diff --git a/thirdparty/jpeg-9e/jmemname.c b/thirdparty/jpeg-9e/jmemname.c deleted file mode 100644 index ed96dee..0000000 --- a/thirdparty/jpeg-9e/jmemname.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - * jmemname.c - * - * Copyright (C) 1992-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file provides a generic implementation of the system-dependent - * portion of the JPEG memory manager. This implementation assumes that - * you must explicitly construct a name for each temp file. - * Also, the problem of determining the amount of memory available - * is shoved onto the user. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ -extern void * malloc JPP((size_t size)); -extern void free JPP((void *ptr)); -#endif - -#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ -#define SEEK_SET 0 /* if not, assume 0 is correct */ -#endif - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define RW_BINARY "w+" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#define RW_BINARY "w+b", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#define RW_BINARY "w+b" -#endif -#endif - - -/* - * Selection of a file name for a temporary file. - * This is system-dependent! - * - * The code as given is suitable for most Unix systems, and it is easily - * modified for most non-Unix systems. Some notes: - * 1. The temp file is created in the directory named by TEMP_DIRECTORY. - * The default value is /usr/tmp, which is the conventional place for - * creating large temp files on Unix. On other systems you'll probably - * want to change the file location. You can do this by editing the - * #define, or (preferred) by defining TEMP_DIRECTORY in jconfig.h. - * - * 2. If you need to change the file name as well as its location, - * you can override the TEMP_FILE_NAME macro. (Note that this is - * actually a printf format string; it must contain %s and %d.) - * Few people should need to do this. - * - * 3. mktemp() is used to ensure that multiple processes running - * simultaneously won't select the same file names. If your system - * doesn't have mktemp(), define NO_MKTEMP to do it the hard way. - * (If you don't have , also define NO_ERRNO_H.) - * - * 4. You probably want to define NEED_SIGNAL_CATCHER so that cjpeg.c/djpeg.c - * will cause the temp files to be removed if you stop the program early. - */ - -#ifndef TEMP_DIRECTORY /* can override from jconfig.h or Makefile */ -#define TEMP_DIRECTORY "/usr/tmp/" /* recommended setting for Unix */ -#endif - -static int next_file_num; /* to distinguish among several temp files */ - -#ifdef NO_MKTEMP - -#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ -#define TEMP_FILE_NAME "%sJPG%03d.TMP" -#endif - -#ifndef NO_ERRNO_H -#include /* to define ENOENT */ -#endif - -/* ANSI C specifies that errno is a macro, but on older systems it's more - * likely to be a plain int variable. And not all versions of errno.h - * bother to declare it, so we have to in order to be most portable. Thus: - */ -#ifndef errno -extern int errno; -#endif - - -LOCAL(void) -select_file_name (char * fname) -{ - FILE * tfile; - - /* Keep generating file names till we find one that's not in use */ - for (;;) { - next_file_num++; /* advance counter */ - sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); - if ((tfile = fopen(fname, READ_BINARY)) == NULL) { - /* fopen could have failed for a reason other than the file not - * being there; for example, file there but unreadable. - * If isn't available, then we cannot test the cause. - */ -#ifdef ENOENT - if (errno != ENOENT) - continue; -#endif - break; - } - fclose(tfile); /* oops, it's there; close tfile & try again */ - } -} - -#else /* ! NO_MKTEMP */ - -/* Note that mktemp() requires the initial filename to end in six X's */ -#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ -#define TEMP_FILE_NAME "%sJPG%dXXXXXX" -#endif - -LOCAL(void) -select_file_name (char * fname) -{ - next_file_num++; /* advance counter */ - sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); - mktemp(fname); /* make sure file name is unique */ - /* mktemp replaces the trailing XXXXXX with a unique string of characters */ -} - -#endif /* NO_MKTEMP */ - - -/* - * Memory allocation and freeing are controlled by the regular library - * routines malloc() and free(). - */ - -GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * "Large" objects are treated the same as "small" ones. - * NB: although we include FAR keywords in the routine declarations, - * this file won't actually work in 80x86 small/medium model; at least, - * you probably won't be able to process useful-size images in only 64KB. - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * This routine computes the total memory space available for allocation. - * It's impossible to do this in a portable way; our current solution is - * to make the user tell us (with a default value set at compile time). - * If you can actually get the available space, it's a good idea to subtract - * a slop factor of 5% or so. - */ - -#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ -#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ -#endif - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - return cinfo->mem->max_memory_to_use - already_allocated; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - - -METHODDEF(void) -read_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFREAD(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFWRITE(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_backing_store (j_common_ptr cinfo, backing_store_ptr info) -{ - fclose(info->temp_file); /* close the file */ - unlink(info->temp_name); /* delete the file */ -/* If your system doesn't have unlink(), use remove() instead. - * remove() is the ANSI-standard name for this function, but if - * your system was ANSI you'd be using jmemansi.c, right? - */ - TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); -} - - -/* - * Initial opening of a backing-store object. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - select_file_name(info->temp_name); - if ((info->temp_file = fopen(info->temp_name, RW_BINARY)) == NULL) - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - info->read_backing_store = read_backing_store; - info->write_backing_store = write_backing_store; - info->close_backing_store = close_backing_store; - TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - next_file_num = 0; /* initialize temp file name generator */ - return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* no work */ -} diff --git a/thirdparty/jpeg-9e/jmemnobs.c b/thirdparty/jpeg-9e/jmemnobs.c deleted file mode 100644 index a364cd8..0000000 --- a/thirdparty/jpeg-9e/jmemnobs.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * jmemnobs.c - * - * Copyright (C) 1992-1996, Thomas G. Lane. - * Modified 2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file provides a really simple implementation of the system- - * dependent portion of the JPEG memory manager. This implementation - * assumes that no backing-store files are needed: all required space - * can be obtained from malloc(). - * This is very portable in the sense that it'll compile on almost anything, - * but you'd better have lots of main memory (or virtual memory) if you want - * to process big images. - * Note that the max_memory_to_use option is respected by this implementation. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ -extern void * malloc JPP((size_t size)); -extern void free JPP((void *ptr)); -#endif - - -/* - * Memory allocation and freeing are controlled by the regular library - * routines malloc() and free(). - */ - -GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * "Large" objects are treated the same as "small" ones. - * NB: although we include FAR keywords in the routine declarations, - * this file won't actually work in 80x86 small/medium model; at least, - * you probably won't be able to process useful-size images in only 64KB. - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * This routine computes the total memory space available for allocation. - */ - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - if (cinfo->mem->max_memory_to_use) - return cinfo->mem->max_memory_to_use - already_allocated; - - /* Here we say, "we got all you want bud!" */ - return max_bytes_needed; -} - - -/* - * Backing store (temporary file) management. - * Since jpeg_mem_available always promised the moon, - * this should never be called and we can just error out. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - ERREXIT(cinfo, JERR_NO_BACKING_STORE); -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. Here, there isn't any. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - return 0; /* just set max_memory_to_use to 0 */ -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* no work */ -} diff --git a/thirdparty/jpeg-9e/jmemsys.h b/thirdparty/jpeg-9e/jmemsys.h deleted file mode 100644 index 6c3c6d3..0000000 --- a/thirdparty/jpeg-9e/jmemsys.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * jmemsys.h - * - * Copyright (C) 1992-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This include file defines the interface between the system-independent - * and system-dependent portions of the JPEG memory manager. No other - * modules need include it. (The system-independent portion is jmemmgr.c; - * there are several different versions of the system-dependent portion.) - * - * This file works as-is for the system-dependent memory managers supplied - * in the IJG distribution. You may need to modify it if you write a - * custom memory manager. If system-dependent changes are needed in - * this file, the best method is to #ifdef them based on a configuration - * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR - * and USE_MAC_MEMMGR. - */ - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_get_small jGetSmall -#define jpeg_free_small jFreeSmall -#define jpeg_get_large jGetLarge -#define jpeg_free_large jFreeLarge -#define jpeg_mem_available jMemAvail -#define jpeg_open_backing_store jOpenBackStore -#define jpeg_mem_init jMemInit -#define jpeg_mem_term jMemTerm -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* - * These two functions are used to allocate and release small chunks of - * memory. (Typically the total amount requested through jpeg_get_small is - * no more than 20K or so; this will be requested in chunks of a few K each.) - * Behavior should be the same as for the standard library functions malloc - * and free; in particular, jpeg_get_small must return NULL on failure. - * On most systems, these ARE malloc and free. jpeg_free_small is passed the - * size of the object being freed, just in case it's needed. - * On an 80x86 machine using small-data memory model, these manage near heap. - */ - -EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject)); -EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object, - size_t sizeofobject)); - -/* - * These two functions are used to allocate and release large chunks of - * memory (up to the total free space designated by jpeg_mem_available). - * The interface is the same as above, except that on an 80x86 machine, - * far pointers are used. On most other machines these are identical to - * the jpeg_get/free_small routines; but we keep them separate anyway, - * in case a different allocation strategy is desirable for large chunks. - */ - -EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo, - size_t sizeofobject)); -EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object, - size_t sizeofobject)); - -/* - * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may - * be requested in a single call to jpeg_get_large (and jpeg_get_small for that - * matter, but that case should never come into play). This macro is needed - * to model the 64Kb-segment-size limit of far addressing on 80x86 machines. - * On those machines, we expect that jconfig.h will provide a proper value. - * On machines with 32-bit flat address spaces, any large constant may be used. - * - * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type - * size_t and will be a multiple of sizeof(align_type). - */ - -#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */ -#define MAX_ALLOC_CHUNK 1000000000L -#endif - -/* - * This routine computes the total space still available for allocation by - * jpeg_get_large. If more space than this is needed, backing store will be - * used. NOTE: any memory already allocated must not be counted. - * - * There is a minimum space requirement, corresponding to the minimum - * feasible buffer sizes; jmemmgr.c will request that much space even if - * jpeg_mem_available returns zero. The maximum space needed, enough to hold - * all working storage in memory, is also passed in case it is useful. - * Finally, the total space already allocated is passed. If no better - * method is available, cinfo->mem->max_memory_to_use - already_allocated - * is often a suitable calculation. - * - * It is OK for jpeg_mem_available to underestimate the space available - * (that'll just lead to more backing-store access than is really necessary). - * However, an overestimate will lead to failure. Hence it's wise to subtract - * a slop factor from the true available space. 5% should be enough. - * - * On machines with lots of virtual memory, any large constant may be returned. - * Conversely, zero may be returned to always use the minimum amount of memory. - */ - -EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo, - long min_bytes_needed, - long max_bytes_needed, - long already_allocated)); - - -/* - * This structure holds whatever state is needed to access a single - * backing-store object. The read/write/close method pointers are called - * by jmemmgr.c to manipulate the backing-store object; all other fields - * are private to the system-dependent backing store routines. - */ - -#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */ - - -#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */ - -typedef unsigned short XMSH; /* type of extended-memory handles */ -typedef unsigned short EMSH; /* type of expanded-memory handles */ - -typedef union { - short file_handle; /* DOS file handle if it's a temp file */ - XMSH xms_handle; /* handle if it's a chunk of XMS */ - EMSH ems_handle; /* handle if it's a chunk of EMS */ -} handle_union; - -#endif /* USE_MSDOS_MEMMGR */ - -#ifdef USE_MAC_MEMMGR /* Mac-specific junk */ -#include -#endif /* USE_MAC_MEMMGR */ - - -typedef struct backing_store_struct * backing_store_ptr; - -typedef struct backing_store_struct { - /* Methods for reading/writing/closing this backing-store object */ - JMETHOD(void, read_backing_store, (j_common_ptr cinfo, - backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count)); - JMETHOD(void, write_backing_store, (j_common_ptr cinfo, - backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count)); - JMETHOD(void, close_backing_store, (j_common_ptr cinfo, - backing_store_ptr info)); - - /* Private fields for system-dependent backing-store management */ -#ifdef USE_MSDOS_MEMMGR - /* For the MS-DOS manager (jmemdos.c), we need: */ - handle_union handle; /* reference to backing-store storage object */ - char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ -#else -#ifdef USE_MAC_MEMMGR - /* For the Mac manager (jmemmac.c), we need: */ - short temp_file; /* file reference number to temp file */ - FSSpec tempSpec; /* the FSSpec for the temp file */ - char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ -#else - /* For a typical implementation with temp files, we need: */ - FILE * temp_file; /* stdio reference to temp file */ - char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */ -#endif -#endif -} backing_store_info; - - -/* - * Initial opening of a backing-store object. This must fill in the - * read/write/close pointers in the object. The read/write routines - * may take an error exit if the specified maximum file size is exceeded. - * (If jpeg_mem_available always returns a large value, this routine can - * just take an error exit.) - */ - -EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo, - backing_store_ptr info, - long total_bytes_needed)); - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. jpeg_mem_init will be called before anything is - * allocated (and, therefore, nothing in cinfo is of use except the error - * manager pointer). It should return a suitable default value for - * max_memory_to_use; this may subsequently be overridden by the surrounding - * application. (Note that max_memory_to_use is only important if - * jpeg_mem_available chooses to consult it ... no one else will.) - * jpeg_mem_term may assume that all requested memory has been freed and that - * all opened backing-store objects have been closed. - */ - -EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo)); -EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo)); diff --git a/thirdparty/jpeg-9e/jmorecfg.h b/thirdparty/jpeg-9e/jmorecfg.h deleted file mode 100644 index 679d68b..0000000 --- a/thirdparty/jpeg-9e/jmorecfg.h +++ /dev/null @@ -1,446 +0,0 @@ -/* - * jmorecfg.h - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 1997-2013 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains additional configuration options that customize the - * JPEG software for special applications or support machine-dependent - * optimizations. Most users will not need to touch this file. - */ - - -/* - * Define BITS_IN_JSAMPLE as either - * 8 for 8-bit sample values (the usual setting) - * 9 for 9-bit sample values - * 10 for 10-bit sample values - * 11 for 11-bit sample values - * 12 for 12-bit sample values - * Only 8, 9, 10, 11, and 12 bits sample data precision are supported for - * full-feature DCT processing. Further depths up to 16-bit may be added - * later for the lossless modes of operation. - * Run-time selection and conversion of data precision will be added later - * and are currently not supported, sorry. - * Exception: The transcoding part (jpegtran) supports all settings in a - * single instance, since it operates on the level of DCT coefficients and - * not sample values. The DCT coefficients are of the same type (16 bits) - * in all cases (see below). - */ - -#define BITS_IN_JSAMPLE 8 /* use 8, 9, 10, 11, or 12 */ - - -/* - * Maximum number of components (color channels) allowed in JPEG image. - * To meet the letter of the JPEG spec, set this to 255. However, darn - * few applications need more than 4 channels (maybe 5 for CMYK + alpha - * mask). We recommend 10 as a reasonable compromise; use 4 if you are - * really short on memory. (Each allowed component costs a hundred or so - * bytes of storage, whether actually used in an image or not.) - */ - -#define MAX_COMPONENTS 10 /* maximum number of image components */ - - -/* - * Basic data types. - * You may need to change these if you have a machine with unusual data - * type sizes; for example, "char" not 8 bits, "short" not 16 bits, - * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, - * but it had better be at least 16. - */ - -/* Representation of a single sample (pixel element value). - * We frequently allocate large arrays of these, so it's important to keep - * them small. But if you have memory to burn and access to char or short - * arrays is very slow on your hardware, you might want to change these. - */ - -#if BITS_IN_JSAMPLE == 8 -/* JSAMPLE should be the smallest type that will hold the values 0..255. - * You can use a signed char by having GETJSAMPLE mask it with 0xFF. - */ - -#ifdef HAVE_UNSIGNED_CHAR - -typedef unsigned char JSAMPLE; -#define GETJSAMPLE(value) ((int) (value)) - -#else /* not HAVE_UNSIGNED_CHAR */ - -typedef char JSAMPLE; -#ifdef CHAR_IS_UNSIGNED -#define GETJSAMPLE(value) ((int) (value)) -#else -#define GETJSAMPLE(value) ((int) (value) & 0xFF) -#endif /* CHAR_IS_UNSIGNED */ - -#endif /* HAVE_UNSIGNED_CHAR */ - -#define MAXJSAMPLE 255 -#define CENTERJSAMPLE 128 - -#endif /* BITS_IN_JSAMPLE == 8 */ - - -#if BITS_IN_JSAMPLE == 9 -/* JSAMPLE should be the smallest type that will hold the values 0..511. - * On nearly all machines "short" will do nicely. - */ - -typedef short JSAMPLE; -#define GETJSAMPLE(value) ((int) (value)) - -#define MAXJSAMPLE 511 -#define CENTERJSAMPLE 256 - -#endif /* BITS_IN_JSAMPLE == 9 */ - - -#if BITS_IN_JSAMPLE == 10 -/* JSAMPLE should be the smallest type that will hold the values 0..1023. - * On nearly all machines "short" will do nicely. - */ - -typedef short JSAMPLE; -#define GETJSAMPLE(value) ((int) (value)) - -#define MAXJSAMPLE 1023 -#define CENTERJSAMPLE 512 - -#endif /* BITS_IN_JSAMPLE == 10 */ - - -#if BITS_IN_JSAMPLE == 11 -/* JSAMPLE should be the smallest type that will hold the values 0..2047. - * On nearly all machines "short" will do nicely. - */ - -typedef short JSAMPLE; -#define GETJSAMPLE(value) ((int) (value)) - -#define MAXJSAMPLE 2047 -#define CENTERJSAMPLE 1024 - -#endif /* BITS_IN_JSAMPLE == 11 */ - - -#if BITS_IN_JSAMPLE == 12 -/* JSAMPLE should be the smallest type that will hold the values 0..4095. - * On nearly all machines "short" will do nicely. - */ - -typedef short JSAMPLE; -#define GETJSAMPLE(value) ((int) (value)) - -#define MAXJSAMPLE 4095 -#define CENTERJSAMPLE 2048 - -#endif /* BITS_IN_JSAMPLE == 12 */ - - -/* Representation of a DCT frequency coefficient. - * This should be a signed value of at least 16 bits; "short" is usually OK. - * Again, we allocate large arrays of these, but you can change to int - * if you have memory to burn and "short" is really slow. - */ - -typedef short JCOEF; - - -/* Compressed datastreams are represented as arrays of JOCTET. - * These must be EXACTLY 8 bits wide, at least once they are written to - * external storage. Note that when using the stdio data source/destination - * managers, this is also the data type passed to fread/fwrite. - */ - -#ifdef HAVE_UNSIGNED_CHAR - -typedef unsigned char JOCTET; -#define GETJOCTET(value) (value) - -#else /* not HAVE_UNSIGNED_CHAR */ - -typedef char JOCTET; -#ifdef CHAR_IS_UNSIGNED -#define GETJOCTET(value) (value) -#else -#define GETJOCTET(value) ((value) & 0xFF) -#endif /* CHAR_IS_UNSIGNED */ - -#endif /* HAVE_UNSIGNED_CHAR */ - - -/* These typedefs are used for various table entries and so forth. - * They must be at least as wide as specified; but making them too big - * won't cost a huge amount of memory, so we don't provide special - * extraction code like we did for JSAMPLE. (In other words, these - * typedefs live at a different point on the speed/space tradeoff curve.) - */ - -/* UINT8 must hold at least the values 0..255. */ - -#ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char UINT8; -#else /* not HAVE_UNSIGNED_CHAR */ -#ifdef CHAR_IS_UNSIGNED -typedef char UINT8; -#else /* not CHAR_IS_UNSIGNED */ -typedef short UINT8; -#endif /* CHAR_IS_UNSIGNED */ -#endif /* HAVE_UNSIGNED_CHAR */ - -/* UINT16 must hold at least the values 0..65535. */ - -#ifdef HAVE_UNSIGNED_SHORT -typedef unsigned short UINT16; -#else /* not HAVE_UNSIGNED_SHORT */ -typedef unsigned int UINT16; -#endif /* HAVE_UNSIGNED_SHORT */ - -/* INT16 must hold at least the values -32768..32767. */ - -#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ -typedef short INT16; -#endif - -/* INT32 must hold at least signed 32-bit values. */ - -#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ -#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ -#ifndef _BASETSD_H /* MinGW is slightly different */ -#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ -typedef long INT32; -#endif -#endif -#endif -#endif - -/* Datatype used for image dimensions. The JPEG standard only supports - * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore - * "unsigned int" is sufficient on all machines. However, if you need to - * handle larger images and you don't mind deviating from the spec, you - * can change this datatype. - */ - -typedef unsigned int JDIMENSION; - -#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ - - -/* These macros are used in all function definitions and extern declarations. - * You could modify them if you need to change function linkage conventions; - * in particular, you'll need to do that to make the library a Windows DLL. - * Another application is to make all functions global for use with debuggers - * or code profilers that require it. - */ - -/* a function called through method pointers: */ -#define METHODDEF(type) static type -/* a function used only in its module: */ -#define LOCAL(type) static type -/* a function referenced thru EXTERNs: */ -#define GLOBAL(type) type -/* a reference to a GLOBAL function: */ -#define EXTERN(type) extern type - - -/* This macro is used to declare a "method", that is, a function pointer. - * We want to supply prototype parameters if the compiler can cope. - * Note that the arglist parameter must be parenthesized! - * Again, you can customize this if you need special linkage keywords. - */ - -#ifdef HAVE_PROTOTYPES -#define JMETHOD(type,methodname,arglist) type (*methodname) arglist -#else -#define JMETHOD(type,methodname,arglist) type (*methodname) () -#endif - - -/* The noreturn type identifier is used to declare functions - * which cannot return. - * Compilers can thus create more optimized code and perform - * better checks for warnings and errors. - * Static analyzer tools can make improved inferences about - * execution paths and are prevented from giving false alerts. - * - * Unfortunately, the proposed specifications of corresponding - * extensions in the Dec 2011 ISO C standard revision (C11), - * GCC, MSVC, etc. are not viable. - * Thus we introduce a user defined type to declare noreturn - * functions at least for clarity. A proper compiler would - * have a suitable noreturn type to match in place of void. - */ - -#ifndef HAVE_NORETURN_T -typedef void noreturn_t; -#endif - - -/* Here is the pseudo-keyword for declaring pointers that must be "far" - * on 80x86 machines. Most of the specialized coding for 80x86 is handled - * by just saying "FAR *" where such a pointer is needed. In a few places - * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. - */ - -#ifndef FAR -#ifdef NEED_FAR_POINTERS -#define FAR far -#else -#define FAR -#endif -#endif - - -/* - * On a few systems, type boolean and/or its values FALSE, TRUE may appear - * in standard header files. Or you may have conflicts with application- - * specific header files that you want to include together with these files. - * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. - */ - -#ifndef HAVE_BOOLEAN -#if defined FALSE || defined TRUE || defined QGLOBAL_H -/* Qt3 defines FALSE and TRUE as "const" variables in qglobal.h */ -typedef int boolean; -#ifndef FALSE /* in case these macros already exist */ -#define FALSE 0 /* values of boolean */ -#endif -#ifndef TRUE -#define TRUE 1 -#endif -#else -typedef enum { FALSE = 0, TRUE = 1 } boolean; -#endif -#endif - - -/* - * The remaining options affect code selection within the JPEG library, - * but they don't need to be visible to most applications using the library. - * To minimize application namespace pollution, the symbols won't be - * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. - */ - -#ifdef JPEG_INTERNALS -#define JPEG_INTERNAL_OPTIONS -#endif - -#ifdef JPEG_INTERNAL_OPTIONS - - -/* - * These defines indicate whether to include various optional functions. - * Undefining some of these symbols will produce a smaller but less capable - * library. Note that you can leave certain source files out of the - * compilation/linking process if you've #undef'd the corresponding symbols. - * (You may HAVE to do that if your compiler doesn't like null source files.) - */ - -/* Capability options common to encoder and decoder: */ - -#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ -#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ -#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ - -/* Encoder capability options: */ - -#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ -#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ -#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ -#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/ -#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ -/* Note: if you selected more than 8-bit data precision, it is dangerous to - * turn off ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only - * good for 8-bit precision, so arithmetic coding is recommended for higher - * precision. The Huffman encoder normally uses entropy optimization to - * compute usable tables for higher precision. Otherwise, you'll have to - * supply different default Huffman tables. - * The exact same statements apply for progressive JPEG: the default tables - * don't work for progressive mode. (This may get fixed, however.) - */ -#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ - -/* Decoder capability options: */ - -#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ -#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ -#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ -#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? (Requires DCT_ISLOW)*/ -#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ -#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ -#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ -#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ -#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ -#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ - -/* more capability options later, no doubt */ - - -/* - * Ordering of RGB data in scanlines passed to or from the application. - * If your application wants to deal with data in the order B,G,R, just - * change these macros. You can also deal with formats such as R,G,B,X - * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing - * the offsets will also change the order in which colormap data is organized. - * RESTRICTIONS: - * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. - * 2. The color quantizer modules will not behave desirably if RGB_PIXELSIZE - * is not 3 (they don't understand about dummy color components!). So you - * can't use color quantization if you change that value. - */ - -#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ -#define RGB_GREEN 1 /* Offset of Green */ -#define RGB_BLUE 2 /* Offset of Blue */ -#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ - - -/* Definitions for speed-related optimizations. */ - - -/* If your compiler supports inline functions, define INLINE - * as the inline keyword; otherwise define it as empty. - */ - -#ifndef INLINE -#ifdef __GNUC__ /* for instance, GNU C knows about inline */ -#define INLINE __inline__ -#endif -#ifndef INLINE -#define INLINE /* default is to define it as empty */ -#endif -#endif - - -/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying - * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER - * as short on such a machine. MULTIPLIER must be at least 16 bits wide. - */ - -#ifndef MULTIPLIER -#define MULTIPLIER int /* type for fastest integer multiply */ -#endif - - -/* FAST_FLOAT should be either float or double, whichever is done faster - * by your compiler. (Note that this type is only used in the floating point - * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) - * Typically, float is faster in ANSI C compilers, while double is faster in - * pre-ANSI compilers (because they insist on converting to double anyway). - * The code below therefore chooses float if we have ANSI-style prototypes. - */ - -#ifndef FAST_FLOAT -#ifdef HAVE_PROTOTYPES -#define FAST_FLOAT float -#else -#define FAST_FLOAT double -#endif -#endif - -#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/thirdparty/jpeg-9e/jpegint.h b/thirdparty/jpeg-9e/jpegint.h deleted file mode 100644 index 3528bff..0000000 --- a/thirdparty/jpeg-9e/jpegint.h +++ /dev/null @@ -1,445 +0,0 @@ -/* - * jpegint.h - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 1997-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file provides common declarations for the various JPEG modules. - * These declarations are considered internal to the JPEG library; most - * applications using the library shouldn't need to include this file. - */ - - -/* Declarations for both compression & decompression */ - -typedef enum { /* Operating modes for buffer controllers */ - JBUF_PASS_THRU, /* Plain stripwise operation */ - /* Remaining modes require a full-image buffer to have been created */ - JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ - JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ - JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ -} J_BUF_MODE; - -/* Values of global_state field (jdapi.c has some dependencies on ordering!) */ -#define CSTATE_START 100 /* after create_compress */ -#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ -#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ -#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ -#define DSTATE_START 200 /* after create_decompress */ -#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ -#define DSTATE_READY 202 /* found SOS, ready for start_decompress */ -#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ -#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ -#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ -#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ -#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ -#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ -#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ -#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ - - -/* Declarations for compression modules */ - -/* Master control module */ -struct jpeg_comp_master { - JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); - JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); - JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); - - /* State variables made visible to other modules */ - boolean call_pass_startup; /* True if pass_startup must be called */ - boolean is_last_pass; /* True during last pass */ -}; - -/* Main buffer control (downsampled-data buffer) */ -struct jpeg_c_main_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, process_data, (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail)); -}; - -/* Compression preprocessing (downsampling input buffer control) */ -struct jpeg_c_prep_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, - JSAMPARRAY input_buf, - JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail, - JSAMPIMAGE output_buf, - JDIMENSION *out_row_group_ctr, - JDIMENSION out_row_groups_avail)); -}; - -/* Coefficient buffer control */ -struct jpeg_c_coef_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(boolean, compress_data, (j_compress_ptr cinfo, - JSAMPIMAGE input_buf)); -}; - -/* Colorspace conversion */ -struct jpeg_color_converter { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - JMETHOD(void, color_convert, (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows)); -}; - -/* Downsampling */ -struct jpeg_downsampler { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - JMETHOD(void, downsample, (j_compress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION in_row_index, - JSAMPIMAGE output_buf, - JDIMENSION out_row_group_index)); - - boolean need_context_rows; /* TRUE if need rows above & below */ -}; - -/* Forward DCT (also controls coefficient quantization) */ -typedef JMETHOD(void, forward_DCT_ptr, - (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY sample_data, JBLOCKROW coef_blocks, - JDIMENSION start_col, JDIMENSION num_blocks)); - -struct jpeg_forward_dct { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - /* It is useful to allow each component to have a separate FDCT method. */ - forward_DCT_ptr forward_DCT[MAX_COMPONENTS]; -}; - -/* Entropy encoding */ -struct jpeg_entropy_encoder { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); - JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)); - JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); -}; - -/* Marker writing */ -struct jpeg_marker_writer { - JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); - JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); - /* These routines are exported to allow insertion of extra markers */ - /* Probably only COM and APPn markers should be written this way */ - JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, - unsigned int datalen)); - JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); -}; - - -/* Declarations for decompression modules */ - -/* Master control module */ -struct jpeg_decomp_master { - JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); - - /* State variables made visible to other modules */ - boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ -}; - -/* Input control module */ -struct jpeg_input_controller { - JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); - JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); - JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); - - /* State variables made visible to other modules */ - boolean has_multiple_scans; /* True if file has multiple scans */ - boolean eoi_reached; /* True when EOI has been consumed */ -}; - -/* Main buffer control (downsampled-data buffer) */ -struct jpeg_d_main_controller { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, process_data, (j_decompress_ptr cinfo, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -}; - -/* Coefficient buffer control */ -struct jpeg_d_coef_controller { - JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); - JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); - JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); - JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, - JSAMPIMAGE output_buf)); - /* Pointer to array of coefficient virtual arrays, or NULL if none */ - jvirt_barray_ptr *coef_arrays; -}; - -/* Decompression postprocessing (color quantization buffer control) */ -struct jpeg_d_post_controller { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, - JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -}; - -/* Marker reading & parsing */ -struct jpeg_marker_reader { - JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); - /* Read markers until SOS or EOI. - * Returns same codes as are defined for jpeg_consume_input: - * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. - */ - JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); - /* Read a restart marker --- exported for use by entropy decoder only */ - jpeg_marker_parser_method read_restart_marker; - - /* State of marker reader --- nominally internal, but applications - * supplying COM or APPn handlers might like to know the state. - */ - boolean saw_SOI; /* found SOI? */ - boolean saw_SOF; /* found SOF? */ - int next_restart_num; /* next restart number expected (0-7) */ - unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ -}; - -/* Entropy decoding */ -struct jpeg_entropy_decoder { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)); - JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); -}; - -/* Inverse DCT (also performs dequantization) */ -typedef JMETHOD(void, inverse_DCT_method_ptr, - (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col)); - -struct jpeg_inverse_dct { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - /* It is useful to allow each component to have a separate IDCT method. */ - inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; -}; - -/* Upsampling (note that upsampler must also call color converter) */ -struct jpeg_upsampler { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, upsample, (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, - JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); - - boolean need_context_rows; /* TRUE if need rows above & below */ -}; - -/* Colorspace conversion */ -struct jpeg_color_deconverter { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, color_convert, (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows)); -}; - -/* Color quantization or color precision reduction */ -struct jpeg_color_quantizer { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); - JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPARRAY output_buf, - int num_rows)); - JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); -}; - - -/* Definition of range extension bits for decompression processes. - * See the comments with prepare_range_limit_table (in jdmaster.c) - * for more info. - * The recommended default value for normal applications is 2. - * Applications with special requirements may use a different value. - * For example, Ghostscript wants to use 3 for proper handling of - * wacky images with oversize coefficient values. - */ - -#define RANGE_BITS 2 -#define RANGE_CENTER (CENTERJSAMPLE << RANGE_BITS) - - -/* Miscellaneous useful macros */ - -#undef MAX -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#undef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) - - -/* We assume that right shift corresponds to signed division by 2 with - * rounding towards minus infinity. This is correct for typical "arithmetic - * shift" instructions that shift in copies of the sign bit. But some - * C compilers implement >> with an unsigned shift. For these machines you - * must define RIGHT_SHIFT_IS_UNSIGNED. - * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. - * It is only applied with constant shift counts. SHIFT_TEMPS must be - * included in the variables of any routine using RIGHT_SHIFT. - */ - -#ifdef RIGHT_SHIFT_IS_UNSIGNED -#define SHIFT_TEMPS INT32 shift_temp; -#define RIGHT_SHIFT(x,shft) \ - ((shift_temp = (x)) < 0 ? \ - (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ - (shift_temp >> (shft))) -#else -#define SHIFT_TEMPS -#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) -#endif - -/* Descale and correctly round an INT32 value that's scaled by N bits. - * We assume RIGHT_SHIFT rounds towards minus infinity, so adding - * the fudge factor is correct for either sign of X. - */ - -#define DESCALE(x,n) RIGHT_SHIFT((x) + ((INT32) 1 << ((n)-1)), n) - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jinit_compress_master jICompress -#define jinit_c_master_control jICMaster -#define jinit_c_main_controller jICMainC -#define jinit_c_prep_controller jICPrepC -#define jinit_c_coef_controller jICCoefC -#define jinit_color_converter jICColor -#define jinit_downsampler jIDownsampler -#define jinit_forward_dct jIFDCT -#define jinit_huff_encoder jIHEncoder -#define jinit_arith_encoder jIAEncoder -#define jinit_marker_writer jIMWriter -#define jinit_master_decompress jIDMaster -#define jinit_d_main_controller jIDMainC -#define jinit_d_coef_controller jIDCoefC -#define jinit_d_post_controller jIDPostC -#define jinit_input_controller jIInCtlr -#define jinit_marker_reader jIMReader -#define jinit_huff_decoder jIHDecoder -#define jinit_arith_decoder jIADecoder -#define jinit_inverse_dct jIIDCT -#define jinit_upsampler jIUpsampler -#define jinit_color_deconverter jIDColor -#define jinit_1pass_quantizer jI1Quant -#define jinit_2pass_quantizer jI2Quant -#define jinit_merged_upsampler jIMUpsampler -#define jinit_memory_mgr jIMemMgr -#define jdiv_round_up jDivRound -#define jround_up jRound -#define jzero_far jZeroFar -#define jcopy_sample_rows jCopySamples -#define jcopy_block_row jCopyBlocks -#define jpeg_zigzag_order jZIGTable -#define jpeg_natural_order jZAGTable -#define jpeg_natural_order7 jZAG7Table -#define jpeg_natural_order6 jZAG6Table -#define jpeg_natural_order5 jZAG5Table -#define jpeg_natural_order4 jZAG4Table -#define jpeg_natural_order3 jZAG3Table -#define jpeg_natural_order2 jZAG2Table -#define jpeg_aritab jAriTab -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays - * and coefficient-block arrays. This won't work on 80x86 because the arrays - * are FAR and we're assuming a small-pointer memory model. However, some - * DOS compilers provide far-pointer versions of memcpy() and memset() even - * in the small-model libraries. These will be used if USE_FMEM is defined. - * Otherwise, the routines in jutils.c do it the hard way. - */ - -#ifndef NEED_FAR_POINTERS /* normal case, same as regular macro */ -#define FMEMZERO(target,size) MEMZERO(target,size) -#else /* 80x86 case */ -#ifdef USE_FMEM -#define FMEMZERO(target,size) _fmemset((void FAR *)(target), 0, (size_t)(size)) -#else -EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); -#define FMEMZERO(target,size) jzero_far(target, size) -#endif -#endif - - -/* Compression module initialization routines */ -EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo, - boolean transcode_only)); -EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo)); -/* Decompression module initialization routines */ -EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo)); -/* Memory manager initialization */ -EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo)); - -/* Utility routines in jutils.c */ -EXTERN(long) jdiv_round_up JPP((long a, long b)); -EXTERN(long) jround_up JPP((long a, long b)); -EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, - JSAMPARRAY output_array, - int num_rows, JDIMENSION num_cols)); -EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row, - JDIMENSION num_blocks)); -/* Constant tables in jutils.c */ -#if 0 /* This table is not actually needed in v6a */ -extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ -#endif -extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ -extern const int jpeg_natural_order7[]; /* zz to natural order for 7x7 block */ -extern const int jpeg_natural_order6[]; /* zz to natural order for 6x6 block */ -extern const int jpeg_natural_order5[]; /* zz to natural order for 5x5 block */ -extern const int jpeg_natural_order4[]; /* zz to natural order for 4x4 block */ -extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */ -extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */ - -/* Arithmetic coding probability estimation tables in jaricom.c */ -extern const INT32 jpeg_aritab[]; - -/* Suppress undefined-structure complaints if necessary. */ - -#ifdef INCOMPLETE_TYPES_BROKEN -#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ -struct jvirt_sarray_control { long dummy; }; -struct jvirt_barray_control { long dummy; }; -#endif -#endif /* INCOMPLETE_TYPES_BROKEN */ diff --git a/thirdparty/jpeg-9e/jpeglib.h b/thirdparty/jpeg-9e/jpeglib.h deleted file mode 100644 index b1fa8ea..0000000 --- a/thirdparty/jpeg-9e/jpeglib.h +++ /dev/null @@ -1,1183 +0,0 @@ -/* - * jpeglib.h - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2002-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file defines the application interface for the JPEG library. - * Most applications using the library need only include this file, - * and perhaps jerror.h if they want to know the exact error codes. - */ - -#ifndef JPEGLIB_H -#define JPEGLIB_H - -/* - * First we include the configuration files that record how this - * installation of the JPEG library is set up. jconfig.h can be - * generated automatically for many systems. jmorecfg.h contains - * manual configuration options that most people need not worry about. - */ - -#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ -#include "jconfig.h" /* widely used configuration options */ -#endif -#include "jmorecfg.h" /* seldom changed options */ - - -#ifdef __cplusplus -#ifndef DONT_USE_EXTERN_C -extern "C" { -#endif -#endif - -/* Version IDs for the JPEG library. - * Might be useful for tests like "#if JPEG_LIB_VERSION >= 90". - */ - -#define JPEG_LIB_VERSION 90 /* Compatibility version 9.0 */ -#define JPEG_LIB_VERSION_MAJOR 9 -#define JPEG_LIB_VERSION_MINOR 5 - - -/* Various constants determining the sizes of things. - * All of these are specified by the JPEG standard, - * so don't change them if you want to be compatible. - */ - -#define DCTSIZE 8 /* The basic DCT block is 8x8 coefficients */ -#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ -#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ -#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ -#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ -#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ -#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ -/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; - * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. - * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU - * to handle it. We even let you do this from the jconfig.h file. However, - * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe - * sometimes emits noncompliant files doesn't mean you should too. - */ -#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ -#ifndef D_MAX_BLOCKS_IN_MCU -#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ -#endif - - -/* Data structures for images (arrays of samples and of DCT coefficients). - * On 80x86 machines, the image arrays are too big for near pointers, - * but the pointer arrays can fit in near memory. - */ - -typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */ -typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ -typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ - -typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ -typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */ -typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ -typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ - -typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */ - - -/* Types for JPEG compression parameters and working tables. */ - - -/* DCT coefficient quantization tables. */ - -typedef struct { - /* This array gives the coefficient quantizers in natural array order - * (not the zigzag order in which they are stored in a JPEG DQT marker). - * CAUTION: IJG versions prior to v6a kept this array in zigzag order. - */ - UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ - /* This field is used only during compression. It's initialized FALSE when - * the table is created, and set TRUE when it's been output to the file. - * You could suppress output of a table by setting this to TRUE. - * (See jpeg_suppress_tables for an example.) - */ - boolean sent_table; /* TRUE when table has been output */ -} JQUANT_TBL; - - -/* Huffman coding tables. */ - -typedef struct { - /* These two fields directly represent the contents of a JPEG DHT marker */ - UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ - /* length k bits; bits[0] is unused */ - UINT8 huffval[256]; /* The symbols, in order of incr code length */ - /* This field is used only during compression. It's initialized FALSE when - * the table is created, and set TRUE when it's been output to the file. - * You could suppress output of a table by setting this to TRUE. - * (See jpeg_suppress_tables for an example.) - */ - boolean sent_table; /* TRUE when table has been output */ -} JHUFF_TBL; - - -/* Basic info about one component (color channel). */ - -typedef struct { - /* These values are fixed over the whole image. */ - /* For compression, they must be supplied by parameter setup; */ - /* for decompression, they are read from the SOF marker. */ - int component_id; /* identifier for this component (0..255) */ - int component_index; /* its index in SOF or cinfo->comp_info[] */ - int h_samp_factor; /* horizontal sampling factor (1..4) */ - int v_samp_factor; /* vertical sampling factor (1..4) */ - int quant_tbl_no; /* quantization table selector (0..3) */ - /* These values may vary between scans. */ - /* For compression, they must be supplied by parameter setup; */ - /* for decompression, they are read from the SOS marker. */ - /* The decompressor output side may not use these variables. */ - int dc_tbl_no; /* DC entropy table selector (0..3) */ - int ac_tbl_no; /* AC entropy table selector (0..3) */ - - /* Remaining fields should be treated as private by applications. */ - - /* These values are computed during compression or decompression startup: */ - /* Component's size in DCT blocks. - * Any dummy blocks added to complete an MCU are not counted; therefore - * these values do not depend on whether a scan is interleaved or not. - */ - JDIMENSION width_in_blocks; - JDIMENSION height_in_blocks; - /* Size of a DCT block in samples, - * reflecting any scaling we choose to apply during the DCT step. - * Values from 1 to 16 are supported. - * Note that different components may receive different DCT scalings. - */ - int DCT_h_scaled_size; - int DCT_v_scaled_size; - /* The downsampled dimensions are the component's actual, unpadded number - * of samples at the main buffer (preprocessing/compression interface); - * DCT scaling is included, so - * downsampled_width = - * ceil(image_width * Hi/Hmax * DCT_h_scaled_size/block_size) - * and similarly for height. - */ - JDIMENSION downsampled_width; /* actual width in samples */ - JDIMENSION downsampled_height; /* actual height in samples */ - /* For decompression, in cases where some of the components will be - * ignored (eg grayscale output from YCbCr image), we can skip most - * computations for the unused components. - * For compression, some of the components will need further quantization - * scale by factor of 2 after DCT (eg BG_YCC output from normal RGB input). - * The field is first set TRUE for decompression, FALSE for compression - * in initial_setup, and then adapted in color conversion setup. - */ - boolean component_needed; - - /* These values are computed before starting a scan of the component. */ - /* The decompressor output side may not use these variables. */ - int MCU_width; /* number of blocks per MCU, horizontally */ - int MCU_height; /* number of blocks per MCU, vertically */ - int MCU_blocks; /* MCU_width * MCU_height */ - int MCU_sample_width; /* MCU width in samples: MCU_width * DCT_h_scaled_size */ - int last_col_width; /* # of non-dummy blocks across in last MCU */ - int last_row_height; /* # of non-dummy blocks down in last MCU */ - - /* Saved quantization table for component; NULL if none yet saved. - * See jdinput.c comments about the need for this information. - * This field is currently used only for decompression. - */ - JQUANT_TBL * quant_table; - - /* Private per-component storage for DCT or IDCT subsystem. */ - void * dct_table; -} jpeg_component_info; - - -/* The script for encoding a multiple-scan file is an array of these: */ - -typedef struct { - int comps_in_scan; /* number of components encoded in this scan */ - int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ - int Ss, Se; /* progressive JPEG spectral selection parms */ - int Ah, Al; /* progressive JPEG successive approx. parms */ -} jpeg_scan_info; - -/* The decompressor can save APPn and COM markers in a list of these: */ - -typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr; - -struct jpeg_marker_struct { - jpeg_saved_marker_ptr next; /* next in list, or NULL */ - UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ - unsigned int original_length; /* # bytes of data in the file */ - unsigned int data_length; /* # bytes of data saved at data[] */ - JOCTET FAR * data; /* the data contained in the marker */ - /* the marker length word is not counted in data_length or original_length */ -}; - -/* Known color spaces. */ - -typedef enum { - JCS_UNKNOWN, /* error/unspecified */ - JCS_GRAYSCALE, /* monochrome */ - JCS_RGB, /* red/green/blue, standard RGB (sRGB) */ - JCS_YCbCr, /* Y/Cb/Cr (also known as YUV), standard YCC */ - JCS_CMYK, /* C/M/Y/K */ - JCS_YCCK, /* Y/Cb/Cr/K */ - JCS_BG_RGB, /* big gamut red/green/blue, bg-sRGB */ - JCS_BG_YCC /* big gamut Y/Cb/Cr, bg-sYCC */ -} J_COLOR_SPACE; - -/* Supported color transforms. */ - -typedef enum { - JCT_NONE = 0, - JCT_SUBTRACT_GREEN = 1 -} J_COLOR_TRANSFORM; - -/* DCT/IDCT algorithm options. */ - -typedef enum { - JDCT_ISLOW, /* slow but accurate integer algorithm */ - JDCT_IFAST, /* faster, less accurate integer method */ - JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ -} J_DCT_METHOD; - -#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ -#define JDCT_DEFAULT JDCT_ISLOW -#endif -#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ -#define JDCT_FASTEST JDCT_IFAST -#endif - -/* Dithering options for decompression. */ - -typedef enum { - JDITHER_NONE, /* no dithering */ - JDITHER_ORDERED, /* simple ordered dither */ - JDITHER_FS /* Floyd-Steinberg error diffusion dither */ -} J_DITHER_MODE; - - -/* Common fields between JPEG compression and decompression master structs. */ - -#define jpeg_common_fields \ - struct jpeg_error_mgr * err; /* Error handler module */\ - struct jpeg_memory_mgr * mem; /* Memory manager module */\ - struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\ - void * client_data; /* Available for use by application */\ - boolean is_decompressor; /* So common code can tell which is which */\ - int global_state /* For checking call sequence validity */ - -/* Routines that are to be used by both halves of the library are declared - * to receive a pointer to this structure. There are no actual instances of - * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. - */ -struct jpeg_common_struct { - jpeg_common_fields; /* Fields common to both master struct types */ - /* Additional fields follow in an actual jpeg_compress_struct or - * jpeg_decompress_struct. All three structs must agree on these - * initial fields! (This would be a lot cleaner in C++.) - */ -}; - -typedef struct jpeg_common_struct * j_common_ptr; -typedef struct jpeg_compress_struct * j_compress_ptr; -typedef struct jpeg_decompress_struct * j_decompress_ptr; - - -/* Master record for a compression instance */ - -struct jpeg_compress_struct { - jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ - - /* Destination for compressed data */ - struct jpeg_destination_mgr * dest; - - /* Description of source image --- these fields must be filled in by - * outer application before starting compression. in_color_space must - * be correct before you can even call jpeg_set_defaults(). - */ - - JDIMENSION image_width; /* input image width */ - JDIMENSION image_height; /* input image height */ - int input_components; /* # of color components in input image */ - J_COLOR_SPACE in_color_space; /* colorspace of input image */ - - double input_gamma; /* image gamma of input image */ - - /* Compression parameters --- these fields must be set before calling - * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to - * initialize everything to reasonable defaults, then changing anything - * the application specifically wants to change. That way you won't get - * burnt when new parameters are added. Also note that there are several - * helper routines to simplify changing parameters. - */ - - unsigned int scale_num, scale_denom; /* fraction by which to scale image */ - - JDIMENSION jpeg_width; /* scaled JPEG image width */ - JDIMENSION jpeg_height; /* scaled JPEG image height */ - /* Dimensions of actual JPEG image that will be written to file, - * derived from input dimensions by scaling factors above. - * These fields are computed by jpeg_start_compress(). - * You can also use jpeg_calc_jpeg_dimensions() to determine these values - * in advance of calling jpeg_start_compress(). - */ - - int data_precision; /* bits of precision in image data */ - - int num_components; /* # of color components in JPEG image */ - J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ - - jpeg_component_info * comp_info; - /* comp_info[i] describes component that appears i'th in SOF */ - - JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; - int q_scale_factor[NUM_QUANT_TBLS]; - /* ptrs to coefficient quantization tables, or NULL if not defined, - * and corresponding scale factors (percentage, initialized 100). - */ - - JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; - JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; - /* ptrs to Huffman coding tables, or NULL if not defined */ - - UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ - UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ - UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ - - int num_scans; /* # of entries in scan_info array */ - const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */ - /* The default value of scan_info is NULL, which causes a single-scan - * sequential JPEG file to be emitted. To create a multi-scan file, - * set num_scans and scan_info to point to an array of scan definitions. - */ - - boolean raw_data_in; /* TRUE=caller supplies downsampled data */ - boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ - boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ - boolean CCIR601_sampling; /* TRUE=first samples are cosited */ - boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */ - int smoothing_factor; /* 1..100, or 0 for no input smoothing */ - J_DCT_METHOD dct_method; /* DCT algorithm selector */ - - /* The restart interval can be specified in absolute MCUs by setting - * restart_interval, or in MCU rows by setting restart_in_rows - * (in which case the correct restart_interval will be figured - * for each scan). - */ - unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ - int restart_in_rows; /* if > 0, MCU rows per restart interval */ - - /* Parameters controlling emission of special markers. */ - - boolean write_JFIF_header; /* should a JFIF marker be written? */ - UINT8 JFIF_major_version; /* What to write for the JFIF version number */ - UINT8 JFIF_minor_version; - /* These three values are not used by the JPEG code, merely copied */ - /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ - /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ - /* ratio is defined by X_density/Y_density even when density_unit=0. */ - UINT8 density_unit; /* JFIF code for pixel size units */ - UINT16 X_density; /* Horizontal pixel density */ - UINT16 Y_density; /* Vertical pixel density */ - boolean write_Adobe_marker; /* should an Adobe marker be written? */ - - J_COLOR_TRANSFORM color_transform; - /* Color transform identifier, writes LSE marker if nonzero */ - - /* State variable: index of next scanline to be written to - * jpeg_write_scanlines(). Application may use this to control its - * processing loop, e.g., "while (next_scanline < image_height)". - */ - - JDIMENSION next_scanline; /* 0 .. image_height-1 */ - - /* Remaining fields are known throughout compressor, but generally - * should not be touched by a surrounding application. - */ - - /* - * These fields are computed during compression startup - */ - boolean progressive_mode; /* TRUE if scan script uses progressive mode */ - int max_h_samp_factor; /* largest h_samp_factor */ - int max_v_samp_factor; /* largest v_samp_factor */ - - int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ - int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ - - JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ - /* The coefficient controller receives data in units of MCU rows as defined - * for fully interleaved scans (whether the JPEG file is interleaved or not). - * There are v_samp_factor * DCT_v_scaled_size sample rows of each component - * in an "iMCU" (interleaved MCU) row. - */ - - /* - * These fields are valid during any one scan. - * They describe the components and MCUs actually appearing in the scan. - */ - int comps_in_scan; /* # of JPEG components in this scan */ - jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; - /* *cur_comp_info[i] describes component that appears i'th in SOS */ - - JDIMENSION MCUs_per_row; /* # of MCUs across the image */ - JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - - int blocks_in_MCU; /* # of DCT blocks per MCU */ - int MCU_membership[C_MAX_BLOCKS_IN_MCU]; - /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ - - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ - - int block_size; /* the basic DCT block size: 1..16 */ - const int * natural_order; /* natural-order position array */ - int lim_Se; /* min( Se, DCTSIZE2-1 ) */ - - /* - * Links to compression subobjects (methods and private variables of modules) - */ - struct jpeg_comp_master * master; - struct jpeg_c_main_controller * main; - struct jpeg_c_prep_controller * prep; - struct jpeg_c_coef_controller * coef; - struct jpeg_marker_writer * marker; - struct jpeg_color_converter * cconvert; - struct jpeg_downsampler * downsample; - struct jpeg_forward_dct * fdct; - struct jpeg_entropy_encoder * entropy; - jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */ - int script_space_size; -}; - - -/* Master record for a decompression instance */ - -struct jpeg_decompress_struct { - jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ - - /* Source of compressed data */ - struct jpeg_source_mgr * src; - - /* Basic description of image --- filled in by jpeg_read_header(). */ - /* Application may inspect these values to decide how to process image. */ - - JDIMENSION image_width; /* nominal image width (from SOF marker) */ - JDIMENSION image_height; /* nominal image height */ - int num_components; /* # of color components in JPEG image */ - J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ - - /* Decompression processing parameters --- these fields must be set before - * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes - * them to default values. - */ - - J_COLOR_SPACE out_color_space; /* colorspace for output */ - - unsigned int scale_num, scale_denom; /* fraction by which to scale image */ - - double output_gamma; /* image gamma wanted in output */ - - boolean buffered_image; /* TRUE=multiple output passes */ - boolean raw_data_out; /* TRUE=downsampled data wanted */ - - J_DCT_METHOD dct_method; /* IDCT algorithm selector */ - boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ - boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ - - boolean quantize_colors; /* TRUE=colormapped output wanted */ - /* the following are ignored if not quantize_colors: */ - J_DITHER_MODE dither_mode; /* type of color dithering to use */ - boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ - int desired_number_of_colors; /* max # colors to use in created colormap */ - /* these are significant only in buffered-image mode: */ - boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ - boolean enable_external_quant;/* enable future use of external colormap */ - boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ - - /* Description of actual output image that will be returned to application. - * These fields are computed by jpeg_start_decompress(). - * You can also use jpeg_calc_output_dimensions() to determine these values - * in advance of calling jpeg_start_decompress(). - */ - - JDIMENSION output_width; /* scaled image width */ - JDIMENSION output_height; /* scaled image height */ - int out_color_components; /* # of color components in out_color_space */ - int output_components; /* # of color components returned */ - /* output_components is 1 (a colormap index) when quantizing colors; - * otherwise it equals out_color_components. - */ - int rec_outbuf_height; /* min recommended height of scanline buffer */ - /* If the buffer passed to jpeg_read_scanlines() is less than this many rows - * high, space and time will be wasted due to unnecessary data copying. - * Usually rec_outbuf_height will be 1 or 2, at most 4. - */ - - /* When quantizing colors, the output colormap is described by these fields. - * The application can supply a colormap by setting colormap non-NULL before - * calling jpeg_start_decompress; otherwise a colormap is created during - * jpeg_start_decompress or jpeg_start_output. - * The map has out_color_components rows and actual_number_of_colors columns. - */ - int actual_number_of_colors; /* number of entries in use */ - JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ - - /* State variables: these variables indicate the progress of decompression. - * The application may examine these but must not modify them. - */ - - /* Row index of next scanline to be read from jpeg_read_scanlines(). - * Application may use this to control its processing loop, e.g., - * "while (output_scanline < output_height)". - */ - JDIMENSION output_scanline; /* 0 .. output_height-1 */ - - /* Current input scan number and number of iMCU rows completed in scan. - * These indicate the progress of the decompressor input side. - */ - int input_scan_number; /* Number of SOS markers seen so far */ - JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ - - /* The "output scan number" is the notional scan being displayed by the - * output side. The decompressor will not allow output scan/row number - * to get ahead of input scan/row, but it can fall arbitrarily far behind. - */ - int output_scan_number; /* Nominal scan number being displayed */ - JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ - - /* Current progression status. coef_bits[c][i] indicates the precision - * with which component c's DCT coefficient i (in zigzag order) is known. - * It is -1 when no data has yet been received, otherwise it is the point - * transform (shift) value for the most recent scan of the coefficient - * (thus, 0 at completion of the progression). - * This pointer is NULL when reading a non-progressive file. - */ - int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ - - /* Internal JPEG parameters --- the application usually need not look at - * these fields. Note that the decompressor output side may not use - * any parameters that can change between scans. - */ - - /* Quantization and Huffman tables are carried forward across input - * datastreams when processing abbreviated JPEG datastreams. - */ - - JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; - /* ptrs to coefficient quantization tables, or NULL if not defined */ - - JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; - JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; - /* ptrs to Huffman coding tables, or NULL if not defined */ - - /* These parameters are never carried across datastreams, since they - * are given in SOF/SOS markers or defined to be reset by SOI. - */ - - int data_precision; /* bits of precision in image data */ - - jpeg_component_info * comp_info; - /* comp_info[i] describes component that appears i'th in SOF */ - - boolean is_baseline; /* TRUE if Baseline SOF0 encountered */ - boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ - boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ - - UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ - UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ - UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ - - unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ - - /* These fields record data obtained from optional markers recognized by - * the JPEG library. - */ - boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ - /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ - UINT8 JFIF_major_version; /* JFIF version number */ - UINT8 JFIF_minor_version; - UINT8 density_unit; /* JFIF code for pixel size units */ - UINT16 X_density; /* Horizontal pixel density */ - UINT16 Y_density; /* Vertical pixel density */ - boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ - UINT8 Adobe_transform; /* Color transform code from Adobe marker */ - - J_COLOR_TRANSFORM color_transform; - /* Color transform identifier derived from LSE marker, otherwise zero */ - - boolean CCIR601_sampling; /* TRUE=first samples are cosited */ - - /* Aside from the specific data retained from APPn markers known to the - * library, the uninterpreted contents of any or all APPn and COM markers - * can be saved in a list for examination by the application. - */ - jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ - - /* Remaining fields are known throughout decompressor, but generally - * should not be touched by a surrounding application. - */ - - /* - * These fields are computed during decompression startup - */ - int max_h_samp_factor; /* largest h_samp_factor */ - int max_v_samp_factor; /* largest v_samp_factor */ - - int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ - int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ - - JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ - /* The coefficient controller's input and output progress is measured in - * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows - * in fully interleaved JPEG scans, but are used whether the scan is - * interleaved or not. We define an iMCU row as v_samp_factor DCT block - * rows of each component. Therefore, the IDCT output contains - * v_samp_factor * DCT_v_scaled_size sample rows of a component per iMCU row. - */ - - JSAMPLE * sample_range_limit; /* table for fast range-limiting */ - - /* - * These fields are valid during any one scan. - * They describe the components and MCUs actually appearing in the scan. - * Note that the decompressor output side must not use these fields. - */ - int comps_in_scan; /* # of JPEG components in this scan */ - jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; - /* *cur_comp_info[i] describes component that appears i'th in SOS */ - - JDIMENSION MCUs_per_row; /* # of MCUs across the image */ - JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - - int blocks_in_MCU; /* # of DCT blocks per MCU */ - int MCU_membership[D_MAX_BLOCKS_IN_MCU]; - /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ - - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ - - /* These fields are derived from Se of first SOS marker. - */ - int block_size; /* the basic DCT block size: 1..16 */ - const int * natural_order; /* natural-order position array for entropy decode */ - int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */ - - /* This field is shared between entropy decoder and marker parser. - * It is either zero or the code of a JPEG marker that has been - * read from the data source, but has not yet been processed. - */ - int unread_marker; - - /* - * Links to decompression subobjects (methods, private variables of modules) - */ - struct jpeg_decomp_master * master; - struct jpeg_d_main_controller * main; - struct jpeg_d_coef_controller * coef; - struct jpeg_d_post_controller * post; - struct jpeg_input_controller * inputctl; - struct jpeg_marker_reader * marker; - struct jpeg_entropy_decoder * entropy; - struct jpeg_inverse_dct * idct; - struct jpeg_upsampler * upsample; - struct jpeg_color_deconverter * cconvert; - struct jpeg_color_quantizer * cquantize; -}; - - -/* "Object" declarations for JPEG modules that may be supplied or called - * directly by the surrounding application. - * As with all objects in the JPEG library, these structs only define the - * publicly visible methods and state variables of a module. Additional - * private fields may exist after the public ones. - */ - - -/* Error handler object */ - -struct jpeg_error_mgr { - /* Error exit handler: does not return to caller */ - JMETHOD(noreturn_t, error_exit, (j_common_ptr cinfo)); - /* Conditionally emit a trace or warning message */ - JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); - /* Routine that actually outputs a trace or error message */ - JMETHOD(void, output_message, (j_common_ptr cinfo)); - /* Format a message string for the most recent JPEG error or message */ - JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer)); -#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ - /* Reset error state variables at start of a new image */ - JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); - - /* The message ID code and any parameters are saved here. - * A message can have one string parameter or up to 8 int parameters. - */ - int msg_code; -#define JMSG_STR_PARM_MAX 80 - union { - int i[8]; - char s[JMSG_STR_PARM_MAX]; - } msg_parm; - - /* Standard state variables for error facility */ - - int trace_level; /* max msg_level that will be displayed */ - - /* For recoverable corrupt-data errors, we emit a warning message, - * but keep going unless emit_message chooses to abort. emit_message - * should count warnings in num_warnings. The surrounding application - * can check for bad data by seeing if num_warnings is nonzero at the - * end of processing. - */ - long num_warnings; /* number of corrupt-data warnings */ - - /* These fields point to the table(s) of error message strings. - * An application can change the table pointer to switch to a different - * message list (typically, to change the language in which errors are - * reported). Some applications may wish to add additional error codes - * that will be handled by the JPEG library error mechanism; the second - * table pointer is used for this purpose. - * - * First table includes all errors generated by JPEG library itself. - * Error code 0 is reserved for a "no such error string" message. - */ - const char * const * jpeg_message_table; /* Library errors */ - int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ - /* Second table can be added by application (see cjpeg/djpeg for example). - * It contains strings numbered first_addon_message..last_addon_message. - */ - const char * const * addon_message_table; /* Non-library errors */ - int first_addon_message; /* code for first string in addon table */ - int last_addon_message; /* code for last string in addon table */ -}; - - -/* Progress monitor object */ - -struct jpeg_progress_mgr { - JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); - - long pass_counter; /* work units completed in this pass */ - long pass_limit; /* total number of work units in this pass */ - int completed_passes; /* passes completed so far */ - int total_passes; /* total number of passes expected */ -}; - - -/* Data destination object for compression */ - -struct jpeg_destination_mgr { - JOCTET * next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - - JMETHOD(void, init_destination, (j_compress_ptr cinfo)); - JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); - JMETHOD(void, term_destination, (j_compress_ptr cinfo)); -}; - - -/* Data source object for decompression */ - -struct jpeg_source_mgr { - const JOCTET * next_input_byte; /* => next byte to read from buffer */ - size_t bytes_in_buffer; /* # of bytes remaining in buffer */ - - JMETHOD(void, init_source, (j_decompress_ptr cinfo)); - JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo)); - JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); - JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); - JMETHOD(void, term_source, (j_decompress_ptr cinfo)); -}; - - -/* Memory manager object. - * Allocates "small" objects (a few K total), "large" objects (tens of K), - * and "really big" objects (virtual arrays with backing store if needed). - * The memory manager does not allow individual objects to be freed; rather, - * each created object is assigned to a pool, and whole pools can be freed - * at once. This is faster and more convenient than remembering exactly what - * to free, especially where malloc()/free() are not too speedy. - * NB: alloc routines never return NULL. They exit to error_exit if not - * successful. - */ - -#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ -#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ -#define JPOOL_NUMPOOLS 2 - -typedef struct jvirt_sarray_control * jvirt_sarray_ptr; -typedef struct jvirt_barray_control * jvirt_barray_ptr; - - -struct jpeg_memory_mgr { - /* Method pointers */ - JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, - size_t sizeofobject)); - JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, - size_t sizeofobject)); - JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, - JDIMENSION samplesperrow, - JDIMENSION numrows)); - JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, - JDIMENSION blocksperrow, - JDIMENSION numrows)); - JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, - int pool_id, - boolean pre_zero, - JDIMENSION samplesperrow, - JDIMENSION numrows, - JDIMENSION maxaccess)); - JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, - int pool_id, - boolean pre_zero, - JDIMENSION blocksperrow, - JDIMENSION numrows, - JDIMENSION maxaccess)); - JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); - JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, - jvirt_sarray_ptr ptr, - JDIMENSION start_row, - JDIMENSION num_rows, - boolean writable)); - JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, - jvirt_barray_ptr ptr, - JDIMENSION start_row, - JDIMENSION num_rows, - boolean writable)); - JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); - JMETHOD(void, self_destruct, (j_common_ptr cinfo)); - - /* Limit on memory allocation for this JPEG object. (Note that this is - * merely advisory, not a guaranteed maximum; it only affects the space - * used for virtual-array buffers.) May be changed by outer application - * after creating the JPEG object. - */ - long max_memory_to_use; - - /* Maximum allocation request accepted by alloc_large. */ - long max_alloc_chunk; -}; - - -/* Routine signature for application-supplied marker processing methods. - * Need not pass marker code since it is stored in cinfo->unread_marker. - */ -typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); - - -/* Declarations for routines called by application. - * The JPP macro hides prototype parameters from compilers that can't cope. - * Note JPP requires double parentheses. - */ - -#ifdef HAVE_PROTOTYPES -#define JPP(arglist) arglist -#else -#define JPP(arglist) () -#endif - - -/* Short forms of external names for systems with brain-damaged linkers. - * We shorten external names to be unique in the first six letters, which - * is good enough for all known systems. - * (If your compiler itself needs names to be unique in less than 15 - * characters, you are out of luck. Get a better compiler.) - */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_std_error jStdError -#define jpeg_CreateCompress jCreaCompress -#define jpeg_CreateDecompress jCreaDecompress -#define jpeg_destroy_compress jDestCompress -#define jpeg_destroy_decompress jDestDecompress -#define jpeg_stdio_dest jStdDest -#define jpeg_stdio_src jStdSrc -#define jpeg_mem_dest jMemDest -#define jpeg_mem_src jMemSrc -#define jpeg_set_defaults jSetDefaults -#define jpeg_set_colorspace jSetColorspace -#define jpeg_default_colorspace jDefColorspace -#define jpeg_set_quality jSetQuality -#define jpeg_set_linear_quality jSetLQuality -#define jpeg_default_qtables jDefQTables -#define jpeg_add_quant_table jAddQuantTable -#define jpeg_quality_scaling jQualityScaling -#define jpeg_simple_progression jSimProgress -#define jpeg_suppress_tables jSuppressTables -#define jpeg_alloc_quant_table jAlcQTable -#define jpeg_alloc_huff_table jAlcHTable -#define jpeg_std_huff_table jStdHTable -#define jpeg_start_compress jStrtCompress -#define jpeg_write_scanlines jWrtScanlines -#define jpeg_finish_compress jFinCompress -#define jpeg_calc_jpeg_dimensions jCjpegDimensions -#define jpeg_write_raw_data jWrtRawData -#define jpeg_write_marker jWrtMarker -#define jpeg_write_m_header jWrtMHeader -#define jpeg_write_m_byte jWrtMByte -#define jpeg_write_tables jWrtTables -#define jpeg_read_header jReadHeader -#define jpeg_start_decompress jStrtDecompress -#define jpeg_read_scanlines jReadScanlines -#define jpeg_finish_decompress jFinDecompress -#define jpeg_read_raw_data jReadRawData -#define jpeg_has_multiple_scans jHasMultScn -#define jpeg_start_output jStrtOutput -#define jpeg_finish_output jFinOutput -#define jpeg_input_complete jInComplete -#define jpeg_new_colormap jNewCMap -#define jpeg_consume_input jConsumeInput -#define jpeg_core_output_dimensions jCoreDimensions -#define jpeg_calc_output_dimensions jCalcDimensions -#define jpeg_save_markers jSaveMarkers -#define jpeg_set_marker_processor jSetMarker -#define jpeg_read_coefficients jReadCoefs -#define jpeg_write_coefficients jWrtCoefs -#define jpeg_copy_critical_parameters jCopyCrit -#define jpeg_abort_compress jAbrtCompress -#define jpeg_abort_decompress jAbrtDecompress -#define jpeg_abort jAbort -#define jpeg_destroy jDestroy -#define jpeg_resync_to_restart jResyncRestart -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* Default error-management setup */ -EXTERN(struct jpeg_error_mgr *) jpeg_std_error - JPP((struct jpeg_error_mgr * err)); - -/* Initialization of JPEG compression objects. - * jpeg_create_compress() and jpeg_create_decompress() are the exported - * names that applications should call. These expand to calls on - * jpeg_CreateCompress and jpeg_CreateDecompress with additional information - * passed for version mismatch checking. - * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. - */ -#define jpeg_create_compress(cinfo) \ - jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ - (size_t) sizeof(struct jpeg_compress_struct)) -#define jpeg_create_decompress(cinfo) \ - jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ - (size_t) sizeof(struct jpeg_decompress_struct)) -EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, - int version, size_t structsize)); -EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, - int version, size_t structsize)); -/* Destruction of JPEG compression objects */ -EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); - -/* Standard data source and destination managers: stdio streams. */ -/* Caller is responsible for opening the file before and closing after. */ -EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); -EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); - -/* Data source and destination managers: memory buffers. */ -EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo, - unsigned char ** outbuffer, - size_t * outsize)); -EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo, - const unsigned char * inbuffer, - size_t insize)); - -/* Default parameter setup for compression */ -EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); -/* Compression parameter setup aids */ -EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, - J_COLOR_SPACE colorspace)); -EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, - boolean force_baseline)); -EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, - int scale_factor, - boolean force_baseline)); -EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo, - boolean force_baseline)); -EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, - const unsigned int *basic_table, - int scale_factor, - boolean force_baseline)); -EXTERN(int) jpeg_quality_scaling JPP((int quality)); -EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, - boolean suppress)); -EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); -EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo)); -EXTERN(JHUFF_TBL *) jpeg_std_huff_table JPP((j_common_ptr cinfo, - boolean isDC, int tblno)); - -/* Main entry points for compression */ -EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, - boolean write_all_tables)); -EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, - JSAMPARRAY scanlines, - JDIMENSION num_lines)); -EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); - -/* Precalculate JPEG dimensions for current compression parameters. */ -EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo)); - -/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ -EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, - JSAMPIMAGE data, - JDIMENSION num_lines)); - -/* Write a special marker. See libjpeg.txt concerning safe usage. */ -EXTERN(void) jpeg_write_marker - JPP((j_compress_ptr cinfo, int marker, - const JOCTET * dataptr, unsigned int datalen)); -/* Same, but piecemeal. */ -EXTERN(void) jpeg_write_m_header - JPP((j_compress_ptr cinfo, int marker, unsigned int datalen)); -EXTERN(void) jpeg_write_m_byte - JPP((j_compress_ptr cinfo, int val)); - -/* Alternate compression function: just write an abbreviated table file */ -EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo)); - -/* Decompression startup: read start of JPEG datastream to see what's there */ -EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, - boolean require_image)); -/* Return value is one of: */ -#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ -#define JPEG_HEADER_OK 1 /* Found valid image datastream */ -#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ -/* If you pass require_image = TRUE (normal case), you need not check for - * a TABLES_ONLY return code; an abbreviated file will cause an error exit. - * JPEG_SUSPENDED is only possible if you use a data source module that can - * give a suspension return (the stdio source module doesn't). - */ - -/* Main entry points for decompression */ -EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo)); -EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, - JSAMPARRAY scanlines, - JDIMENSION max_lines)); -EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo)); - -/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ -EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, - JSAMPIMAGE data, - JDIMENSION max_lines)); - -/* Additional entry points for buffered-image mode. */ -EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); -EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, - int scan_number)); -EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo)); -EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo)); -EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo)); -EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); -/* Return value is one of: */ -/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ -#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ -#define JPEG_REACHED_EOI 2 /* Reached end of image */ -#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ -#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ - -/* Precalculate output dimensions for current decompression parameters. */ -EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo)); -EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); - -/* Control saving of COM and APPn markers into marker_list. */ -EXTERN(void) jpeg_save_markers - JPP((j_decompress_ptr cinfo, int marker_code, - unsigned int length_limit)); - -/* Install a special processing method for COM or APPn markers. */ -EXTERN(void) jpeg_set_marker_processor - JPP((j_decompress_ptr cinfo, int marker_code, - jpeg_marker_parser_method routine)); - -/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ -EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo)); -EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, - jvirt_barray_ptr * coef_arrays)); -EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, - j_compress_ptr dstinfo)); - -/* If you choose to abort compression or decompression before completing - * jpeg_finish_(de)compress, then you need to clean up to release memory, - * temporary files, etc. You can just call jpeg_destroy_(de)compress - * if you're done with the JPEG object, but if you want to clean it up and - * reuse it, call this: - */ -EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); - -/* Generic versions of jpeg_abort and jpeg_destroy that work on either - * flavor of JPEG object. These may be more convenient in some places. - */ -EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo)); -EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo)); - -/* Default restart-marker-resync procedure for use by data source modules */ -EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, - int desired)); - - -/* These marker codes are exported since applications and data source modules - * are likely to want to use them. - */ - -#define JPEG_RST0 0xD0 /* RST0 marker code */ -#define JPEG_EOI 0xD9 /* EOI marker code */ -#define JPEG_APP0 0xE0 /* APP0 marker code */ -#define JPEG_COM 0xFE /* COM marker code */ - - -/* If we have a brain-damaged compiler that emits warnings (or worse, errors) - * for structure definitions that are never filled in, keep it quiet by - * supplying dummy definitions for the various substructures. - */ - -#ifdef INCOMPLETE_TYPES_BROKEN -#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ -struct jvirt_sarray_control { long dummy; }; -struct jvirt_barray_control { long dummy; }; -struct jpeg_comp_master { long dummy; }; -struct jpeg_c_main_controller { long dummy; }; -struct jpeg_c_prep_controller { long dummy; }; -struct jpeg_c_coef_controller { long dummy; }; -struct jpeg_marker_writer { long dummy; }; -struct jpeg_color_converter { long dummy; }; -struct jpeg_downsampler { long dummy; }; -struct jpeg_forward_dct { long dummy; }; -struct jpeg_entropy_encoder { long dummy; }; -struct jpeg_decomp_master { long dummy; }; -struct jpeg_d_main_controller { long dummy; }; -struct jpeg_d_coef_controller { long dummy; }; -struct jpeg_d_post_controller { long dummy; }; -struct jpeg_input_controller { long dummy; }; -struct jpeg_marker_reader { long dummy; }; -struct jpeg_entropy_decoder { long dummy; }; -struct jpeg_inverse_dct { long dummy; }; -struct jpeg_upsampler { long dummy; }; -struct jpeg_color_deconverter { long dummy; }; -struct jpeg_color_quantizer { long dummy; }; -#endif /* JPEG_INTERNALS */ -#endif /* INCOMPLETE_TYPES_BROKEN */ - - -/* - * The JPEG library modules define JPEG_INTERNALS before including this file. - * The internal structure declarations are read only when that is true. - * Applications using the library should not include jpegint.h, but may wish - * to include jerror.h. - */ - -#ifdef JPEG_INTERNALS -#include "jpegint.h" /* fetch private declarations */ -#include "jerror.h" /* fetch error codes too */ -#endif - -#ifdef __cplusplus -#ifndef DONT_USE_EXTERN_C -} -#endif -#endif - -#endif /* JPEGLIB_H */ diff --git a/thirdparty/jpeg-9e/jpegtran.1 b/thirdparty/jpeg-9e/jpegtran.1 deleted file mode 100644 index 7929afd..0000000 --- a/thirdparty/jpeg-9e/jpegtran.1 +++ /dev/null @@ -1,328 +0,0 @@ -.TH JPEGTRAN 1 "28 August 2019" -.SH NAME -jpegtran \- lossless transformation of JPEG files -.SH SYNOPSIS -.B jpegtran -[ -.I options -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B jpegtran -performs various useful transformations of JPEG files. -It can translate the coded representation from one variant of JPEG to another, -for example from baseline JPEG to progressive JPEG or vice versa. It can also -perform some rearrangements of the image data, for example turning an image -from landscape to portrait format by rotation. -.PP -For EXIF files and JPEG files containing Exif data, you may prefer to use -.B exiftran -instead. -.PP -.B jpegtran -works by rearranging the compressed data (DCT coefficients), without -ever fully decoding the image. Therefore, its transformations are lossless: -there is no image degradation at all, which would not be true if you used -.B djpeg -followed by -.B cjpeg -to accomplish the same conversion. But by the same token, -.B jpegtran -cannot perform lossy operations such as changing the image quality. However, -while the image data is losslessly transformed, metadata can be removed. See -the -.B \-copy -option for specifics. -.PP -.B jpegtran -reads the named JPEG/JFIF file, or the standard input if no file is -named, and produces a JPEG/JFIF file on the standard output. -.SH OPTIONS -All switch names may be abbreviated; for example, -.B \-optimize -may be written -.B \-opt -or -.BR \-o . -Upper and lower case are equivalent. -British spellings are also accepted (e.g., -.BR \-optimise ), -though for brevity these are not mentioned below. -.PP -To specify the coded JPEG representation used in the output file, -.B jpegtran -accepts a subset of the switches recognized by -.BR cjpeg : -.TP -.B \-optimize -Perform optimization of entropy encoding parameters. -.TP -.B \-progressive -Create progressive JPEG file. -.TP -.BI \-restart " N" -Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is -attached to the number. -.TP -.B \-arithmetic -Use arithmetic coding. -.TP -.BI \-scans " file" -Use the scan script given in the specified text file. -.PP -See -.BR cjpeg (1) -for more details about these switches. -If you specify none of these switches, you get a plain baseline-JPEG output -file. The quality setting and so forth are determined by the input file. -.PP -The image can be losslessly transformed by giving one of these switches: -.TP -.B \-flip horizontal -Mirror image horizontally (left-right). -.TP -.B \-flip vertical -Mirror image vertically (top-bottom). -.TP -.B \-rotate 90 -Rotate image 90 degrees clockwise. -.TP -.B \-rotate 180 -Rotate image 180 degrees. -.TP -.B \-rotate 270 -Rotate image 270 degrees clockwise (or 90 ccw). -.TP -.B \-transpose -Transpose image (across UL-to-LR axis). -.TP -.B \-transverse -Transverse transpose (across UR-to-LL axis). -.IP -The transpose transformation has no restrictions regarding image dimensions. -The other transformations operate rather oddly if the image dimensions are not -a multiple of the iMCU size (usually 8 or 16 pixels), because they can only -transform complete blocks of DCT coefficient data in the desired way. -.IP -.BR jpegtran 's -default behavior when transforming an odd-size image is designed -to preserve exact reversibility and mathematical consistency of the -transformation set. As stated, transpose is able to flip the entire image -area. Horizontal mirroring leaves any partial iMCU column at the right edge -untouched, but is able to flip all rows of the image. Similarly, vertical -mirroring leaves any partial iMCU row at the bottom edge untouched, but is -able to flip all columns. The other transforms can be built up as sequences -of transpose and flip operations; for consistency, their actions on edge -pixels are defined to be the same as the end result of the corresponding -transpose-and-flip sequence. -.IP -For practical use, you may prefer to discard any untransformable edge pixels -rather than having a strange-looking strip along the right and/or bottom edges -of a transformed image. To do this, add the -.B \-trim -switch: -.TP -.B \-trim -Drop non-transformable edge blocks. -.IP -Obviously, a transformation with -.B \-trim -is not reversible, so strictly speaking -.B jpegtran -with this switch is not lossless. Also, the expected mathematical -equivalences between the transformations no longer hold. For example, -.B \-rot 270 -trim -trims only the bottom edge, but -.B \-rot 90 -trim -followed by -.B \-rot 180 -trim -trims both edges. -.IP -If you are only interested in perfect transformation, add the -.B \-perfect -switch: -.TP -.B \-perfect -Fails with an error if the transformation is not perfect. -.IP -For example you may want to do -.IP -.B (jpegtran \-rot 90 -perfect -.I foo.jpg -.B || djpeg -.I foo.jpg -.B | pnmflip \-r90 | cjpeg) -.IP -to do a perfect rotation if available or an approximated one if not. -.PP -We also offer a lossless-crop option, which discards data outside a given -image region but losslessly preserves what is inside. Like the rotate and -flip transforms, lossless crop is restricted by the current JPEG format: the -upper left corner of the selected region must fall on an iMCU boundary. If -this does not hold for the given crop parameters, we silently move the upper -left corner up and/or left to make it so, simultaneously increasing the -region dimensions to keep the lower right crop corner unchanged. (Thus, the -output image covers at least the requested region, but may cover more.) -The adjustment of the region dimensions may be optionally disabled by -attaching an 'f' character ("force") to the width or height number. -.PP -The image can be losslessly cropped by giving the switch: -.TP -.B \-crop WxH+X+Y -Crop to a rectangular subarea of width W, height H starting at point X,Y. -.PP -Crop extension: The width or height parameters can be made larger than the -source image. In this case the extra area is filled in with zero (neutral -gray). A larger width parameter has two more options: Attaching an 'f' -character ("flatten") to the width number will fill in the extra area with -the DC of the adjacent block, instead of gray out. Attaching an 'r' -character ("reflect") to the width number will fill in the extra area with -repeated reflections of the source region, instead of gray out. -.PP -A complementary lossless-wipe option is provided to discard (gray out) data -inside a given image region while losslessly preserving what is outside: -.TP -.B \-wipe WxH+X+Y -Wipe (gray out) a rectangular subarea of width W, height H starting at point -X,Y. -.PP -Attaching an 'f' character ("flatten") to the width number will fill the -region with the average of adjacent blocks, instead of gray out. In case -the wipe region and outside area form two horizontally adjacent rectangles, -attaching an 'r' character ("reflect") to the width number will fill the -region with repeated reflections of the outside area, instead of gray out. -.PP -Another option is lossless-drop, which replaces data at a given image -position by another image: -.TP -.B \-drop +X+Y filename -Drop another image -.PP -Both source images must have the same subsampling values. It is best if -they also have the same quantization, otherwise quantization adaption occurs. -The trim option can be used with the drop option to requantize the drop file -to the source file. -.PP -Other not-strictly-lossless transformation switches are: -.TP -.B \-grayscale -Force grayscale output. -.IP -This option discards the chrominance channels if the input image is YCbCr -(ie, a standard color JPEG), resulting in a grayscale JPEG file. The -luminance channel is preserved exactly, so this is a better method of reducing -to grayscale than decompression, conversion, and recompression. This switch -is particularly handy for fixing a monochrome picture that was mistakenly -encoded as a color JPEG. (In such a case, the space savings from getting rid -of the near-empty chroma channels won't be large; but the decoding time for -a grayscale JPEG is substantially less than that for a color JPEG.) -.TP -.BI \-scale " M/N" -Scale the output image by a factor M/N. -.IP -Currently supported scale factors are M/N with all M from 1 to 16, where N is -the source DCT size, which is 8 for baseline JPEG. If the /N part is omitted, -then M specifies the DCT scaled size to be applied on the given input. For -baseline JPEG this is equivalent to M/8 scaling, since the source DCT size -for baseline JPEG is 8. -.B Caution: -An implementation of the JPEG SmartScale extension is required for this -feature. SmartScale enabled JPEG is not yet widely implemented, so many -decoders will be unable to view a SmartScale extended JPEG file at all. -.PP -.B jpegtran -also recognizes these switches that control what to do with "extra" markers, -such as comment blocks: -.TP -.B \-copy none -Copy no extra markers from source file. This setting suppresses all -comments and other metadata in the source file. -.TP -.B \-copy comments -Copy only comment markers. This setting copies comments from the source file, -but discards any other metadata. -.TP -.B \-copy all -Copy all extra markers. This setting preserves metadata -found in the source file, such as JFIF thumbnails, Exif data, and Photoshop -settings. In some files these extra markers can be sizable. Note that this -option will copy thumbnails as-is; they will not be transformed. -.IP -The default behavior is -.BR "\-copy comments" . -(Note: in IJG releases v6 and v6a, -.B jpegtran -always did the equivalent of -.BR "\-copy none" .) -.PP -Additional switches recognized by jpegtran are: -.TP -.BI \-maxmemory " N" -Set limit for amount of memory to use in processing large images. Value is -in thousands of bytes, or millions of bytes if "M" is attached to the -number. For example, -.B \-max 4m -selects 4000000 bytes. If more space is needed, temporary files will be used. -.TP -.BI \-outfile " name" -Send output image to the named file, not to standard output. -.TP -.B \-verbose -Enable debug printout. More -.BR \-v 's -give more output. Also, version information is printed at startup. -.TP -.B \-debug -Same as -.BR \-verbose . -.SH EXAMPLES -.LP -This example converts a baseline JPEG file to progressive form: -.IP -.B jpegtran \-progressive -.I foo.jpg -.B > -.I fooprog.jpg -.PP -This example rotates an image 90 degrees clockwise, discarding any -unrotatable edge pixels: -.IP -.B jpegtran \-rot 90 -trim -.I foo.jpg -.B > -.I foo90.jpg -.SH ENVIRONMENT -.TP -.B JPEGMEM -If this environment variable is set, its value is the default memory limit. -The value is specified as described for the -.B \-maxmemory -switch. -.B JPEGMEM -overrides the default value specified when the program was compiled, and -itself is overridden by an explicit -.BR \-maxmemory . -.SH SEE ALSO -.BR cjpeg (1), -.BR djpeg (1), -.BR rdjpgcom (1), -.BR wrjpgcom (1) -.br -Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. -.SH AUTHOR -Independent JPEG Group -.SH BUGS -The transform options can't transform odd-size images perfectly. Use -.B \-trim -or -.B \-perfect -if you don't like the results. -.PP -The entire image is read into memory and then written out again, even in -cases where this isn't really necessary. Expect swapping on large images, -especially when using the more complex transform options. diff --git a/thirdparty/jpeg-9e/jpegtran.c b/thirdparty/jpeg-9e/jpegtran.c deleted file mode 100644 index bfaa8ac..0000000 --- a/thirdparty/jpeg-9e/jpegtran.c +++ /dev/null @@ -1,654 +0,0 @@ -/* - * jpegtran.c - * - * Copyright (C) 1995-2019, Thomas G. Lane, Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a command-line user interface for JPEG transcoding. - * It is very similar to cjpeg.c, and partly to djpeg.c, but provides - * lossless transcoding between different JPEG file formats. It also - * provides some lossless and sort-of-lossless transformations of JPEG data. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include "transupp.h" /* Support routines for jpegtran */ -#include "jversion.h" /* for version message */ - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - - -/* - * Argument-parsing code. - * The switch parser is designed to be useful with DOS-style command line - * syntax, ie, intermixed switches and file names, where only the switches - * to the left of a given file name affect processing of that file. - * The main program in this file doesn't actually use this capability... - */ - - -static const char * progname; /* program name for error messages */ -static char * outfilename; /* for -outfile switch */ -static char * dropfilename; /* for -drop switch */ -static char * scaleoption; /* -scale switch */ -static JCOPY_OPTION copyoption; /* -copy switch */ -static jpeg_transform_info transformoption; /* image transformation options */ - - -LOCAL(void) -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -copy none Copy no extra markers from source file\n"); - fprintf(stderr, " -copy comments Copy only comment markers (default)\n"); - fprintf(stderr, " -copy all Copy all extra markers\n"); -#ifdef ENTROPY_OPT_SUPPORTED - fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); -#endif -#ifdef C_PROGRESSIVE_SUPPORTED - fprintf(stderr, " -progressive Create progressive JPEG file\n"); -#endif - fprintf(stderr, "Switches for modifying the image:\n"); -#if TRANSFORMS_SUPPORTED - fprintf(stderr, " -crop WxH+X+Y Crop to a rectangular subarea\n"); - fprintf(stderr, " -drop +X+Y filename Drop another image\n"); - fprintf(stderr, " -flip [horizontal|vertical] Mirror image (left-right or top-bottom)\n"); - fprintf(stderr, " -grayscale Reduce to grayscale (omit color data)\n"); - fprintf(stderr, " -perfect Fail if there is non-transformable edge blocks\n"); - fprintf(stderr, " -rotate [90|180|270] Rotate image (degrees clockwise)\n"); -#endif - fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n"); -#if TRANSFORMS_SUPPORTED - fprintf(stderr, " -transpose Transpose image\n"); - fprintf(stderr, " -transverse Transverse transpose image\n"); - fprintf(stderr, " -trim Drop non-transformable edge blocks\n"); - fprintf(stderr, " with -drop: Requantize drop file to source file\n"); - fprintf(stderr, " -wipe WxH+X+Y Wipe (gray out) a rectangular subarea\n"); -#endif - fprintf(stderr, "Switches for advanced users:\n"); -#ifdef C_ARITH_CODING_SUPPORTED - fprintf(stderr, " -arithmetic Use arithmetic coding\n"); -#endif - fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); - fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); - fprintf(stderr, " -outfile name Specify name for output file\n"); - fprintf(stderr, " -verbose or -debug Emit debug output\n"); - fprintf(stderr, "Switches for wizards:\n"); -#ifdef C_MULTISCAN_FILES_SUPPORTED - fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); -#endif - exit(EXIT_FAILURE); -} - - -LOCAL(void) -select_transform (JXFORM_CODE transform) -/* Silly little routine to detect multiple transform options, - * which we can't handle. - */ -{ -#if TRANSFORMS_SUPPORTED - if (transformoption.transform == JXFORM_NONE || - transformoption.transform == transform) { - transformoption.transform = transform; - } else { - fprintf(stderr, "%s: can only do one image transformation at a time\n", - progname); - usage(); - } -#else - fprintf(stderr, "%s: sorry, image transformation was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif -} - - -LOCAL(int) -parse_switches (j_compress_ptr cinfo, int argc, char **argv, - int last_file_arg_seen, boolean for_real) -/* Parse optional switches. - * Returns argv[] index of first file-name argument (== argc if none). - * Any file names with indexes <= last_file_arg_seen are ignored; - * they have presumably been processed in a previous iteration. - * (Pass 0 for last_file_arg_seen on the first or only iteration.) - * for_real is FALSE on the first (dummy) pass; we may skip any expensive - * processing. - */ -{ - int argn; - char * arg; - boolean simple_progressive; - char * scansarg = NULL; /* saves -scans parm if any */ - - /* Set up default JPEG parameters. */ - simple_progressive = FALSE; - outfilename = NULL; - scaleoption = NULL; - copyoption = JCOPYOPT_DEFAULT; - transformoption.transform = JXFORM_NONE; - transformoption.perfect = FALSE; - transformoption.trim = FALSE; - transformoption.force_grayscale = FALSE; - transformoption.crop = FALSE; - cinfo->err->trace_level = 0; - - /* Scan command line options, adjust parameters */ - - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (*arg != '-') { - /* Not a switch, must be a file name argument */ - if (argn <= last_file_arg_seen) { - outfilename = NULL; /* -outfile applies to just one input file */ - continue; /* ignore this name if previously processed */ - } - break; /* else done parsing switches */ - } - arg++; /* advance past switch marker character */ - - if (keymatch(arg, "arithmetic", 1)) { - /* Use arithmetic coding. */ -#ifdef C_ARITH_CODING_SUPPORTED - cinfo->arith_code = TRUE; -#else - fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "copy", 2)) { - /* Select which extra markers to copy. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "none", 1)) { - copyoption = JCOPYOPT_NONE; - } else if (keymatch(argv[argn], "comments", 1)) { - copyoption = JCOPYOPT_COMMENTS; - } else if (keymatch(argv[argn], "all", 1)) { - copyoption = JCOPYOPT_ALL; - } else - usage(); - - } else if (keymatch(arg, "crop", 2)) { - /* Perform lossless cropping. */ -#if TRANSFORMS_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - if (transformoption.crop /* reject multiple crop/drop/wipe requests */ || - ! jtransform_parse_crop_spec(&transformoption, argv[argn])) { - fprintf(stderr, "%s: bogus -crop argument '%s'\n", - progname, argv[argn]); - exit(EXIT_FAILURE); - } -#else - select_transform(JXFORM_NONE); /* force an error */ -#endif - - } else if (keymatch(arg, "drop", 2)) { -#if TRANSFORMS_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - if (transformoption.crop /* reject multiple crop/drop/wipe requests */ || - ! jtransform_parse_crop_spec(&transformoption, argv[argn]) || - transformoption.crop_width_set != JCROP_UNSET || - transformoption.crop_height_set != JCROP_UNSET) { - fprintf(stderr, "%s: bogus -drop argument '%s'\n", - progname, argv[argn]); - exit(EXIT_FAILURE); - } - if (++argn >= argc) /* advance to next argument */ - usage(); - dropfilename = argv[argn]; - select_transform(JXFORM_DROP); -#else - select_transform(JXFORM_NONE); /* force an error */ -#endif - - } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { - /* Enable debug printouts. */ - /* On first -d, print version identification */ - static boolean printed_version = FALSE; - - if (! printed_version) { - fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n", - JVERSION, JCOPYRIGHT); - printed_version = TRUE; - } - cinfo->err->trace_level++; - - } else if (keymatch(arg, "flip", 1)) { - /* Mirror left-right or top-bottom. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "horizontal", 1)) - select_transform(JXFORM_FLIP_H); - else if (keymatch(argv[argn], "vertical", 1)) - select_transform(JXFORM_FLIP_V); - else - usage(); - - } else if (keymatch(arg, "grayscale", 1) || keymatch(arg, "greyscale",1)) { - /* Force to grayscale. */ -#if TRANSFORMS_SUPPORTED - transformoption.force_grayscale = TRUE; -#else - select_transform(JXFORM_NONE); /* force an error */ -#endif - - } else if (keymatch(arg, "maxmemory", 3)) { - /* Maximum memory in Kb (or Mb with 'm'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (ch == 'm' || ch == 'M') - lval *= 1000L; - cinfo->mem->max_memory_to_use = lval * 1000L; - - } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { - /* Enable entropy parm optimization. */ -#ifdef ENTROPY_OPT_SUPPORTED - cinfo->optimize_coding = TRUE; -#else - fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "outfile", 4)) { - /* Set output file name. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - outfilename = argv[argn]; /* save it away for later use */ - - } else if (keymatch(arg, "perfect", 2)) { - /* Fail if there is any partial edge MCUs that the transform can't - * handle. */ - transformoption.perfect = TRUE; - - } else if (keymatch(arg, "progressive", 2)) { - /* Select simple progressive mode. */ -#ifdef C_PROGRESSIVE_SUPPORTED - simple_progressive = TRUE; - /* We must postpone execution until num_components is known. */ -#else - fprintf(stderr, "%s: sorry, progressive output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "restart", 1)) { - /* Restart interval in MCU rows (or in MCUs with 'b'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (lval < 0 || lval > 65535L) - usage(); - if (ch == 'b' || ch == 'B') { - cinfo->restart_interval = (unsigned int) lval; - cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ - } else { - cinfo->restart_in_rows = (int) lval; - /* restart_interval will be computed during startup */ - } - - } else if (keymatch(arg, "rotate", 2)) { - /* Rotate 90, 180, or 270 degrees (measured clockwise). */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "90", 2)) - select_transform(JXFORM_ROT_90); - else if (keymatch(argv[argn], "180", 3)) - select_transform(JXFORM_ROT_180); - else if (keymatch(argv[argn], "270", 3)) - select_transform(JXFORM_ROT_270); - else - usage(); - - } else if (keymatch(arg, "scale", 4)) { - /* Scale the output image by a fraction M/N. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - scaleoption = argv[argn]; - /* We must postpone processing until decompression startup. */ - - } else if (keymatch(arg, "scans", 1)) { - /* Set scan script. */ -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - scansarg = argv[argn]; - /* We must postpone reading the file in case -progressive appears. */ -#else - fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "transpose", 1)) { - /* Transpose (across UL-to-LR axis). */ - select_transform(JXFORM_TRANSPOSE); - - } else if (keymatch(arg, "transverse", 6)) { - /* Transverse transpose (across UR-to-LL axis). */ - select_transform(JXFORM_TRANSVERSE); - - } else if (keymatch(arg, "trim", 3)) { - /* Trim off any partial edge MCUs that the transform can't handle. */ - transformoption.trim = TRUE; - - } else if (keymatch(arg, "wipe", 1)) { -#if TRANSFORMS_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - if (transformoption.crop /* reject multiple crop/drop/wipe requests */ || - ! jtransform_parse_crop_spec(&transformoption, argv[argn])) { - fprintf(stderr, "%s: bogus -wipe argument '%s'\n", - progname, argv[argn]); - exit(EXIT_FAILURE); - } - select_transform(JXFORM_WIPE); -#else - select_transform(JXFORM_NONE); /* force an error */ -#endif - - } else { - usage(); /* bogus switch */ - } - } - - /* Post-switch-scanning cleanup */ - - if (for_real) { - -#ifdef C_PROGRESSIVE_SUPPORTED - if (simple_progressive) /* process -progressive; -scans can override */ - jpeg_simple_progression(cinfo); -#endif - -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (scansarg != NULL) /* process -scans if it was present */ - if (! read_scan_script(cinfo, scansarg)) - usage(); -#endif - } - - return argn; /* return index of next arg (file name) */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - struct jpeg_decompress_struct srcinfo; - struct jpeg_error_mgr jsrcerr; -#if TRANSFORMS_SUPPORTED - struct jpeg_decompress_struct dropinfo; - struct jpeg_error_mgr jdroperr; - FILE * drop_file; -#endif - struct jpeg_compress_struct dstinfo; - struct jpeg_error_mgr jdsterr; -#ifdef PROGRESS_REPORT - struct cdjpeg_progress_mgr progress; -#endif - jvirt_barray_ptr * src_coef_arrays; - jvirt_barray_ptr * dst_coef_arrays; - int file_index; - /* We assume all-in-memory processing and can therefore use only a - * single file pointer for sequential input and output operation. - */ - FILE * fp; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "jpegtran"; /* in case C library doesn't provide it */ - - /* Initialize the JPEG decompression object with default error handling. */ - srcinfo.err = jpeg_std_error(&jsrcerr); - jpeg_create_decompress(&srcinfo); - /* Initialize the JPEG compression object with default error handling. */ - dstinfo.err = jpeg_std_error(&jdsterr); - jpeg_create_compress(&dstinfo); - - /* Now safe to enable signal catcher. - * Note: we assume only the decompression object will have virtual arrays. - */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) &srcinfo); -#endif - - /* Scan command line to find file names. - * It is convenient to use just one switch-parsing routine, but the switch - * values read here are mostly ignored; we will rescan the switches after - * opening the input file. Also note that most of the switches affect the - * destination JPEG object, so we parse into that and then copy over what - * needs to affect the source too. - */ - - file_index = parse_switches(&dstinfo, argc, argv, 0, FALSE); - jsrcerr.trace_level = jdsterr.trace_level; - srcinfo.mem->max_memory_to_use = dstinfo.mem->max_memory_to_use; - -#ifdef TWO_FILE_COMMANDLINE - /* Must have either -outfile switch or explicit output file name */ - if (outfilename == NULL) { - if (file_index != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - outfilename = argv[file_index+1]; - } else { - if (file_index != argc-1) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - } -#else - /* Unix style: expect zero or one file name */ - if (file_index < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } -#endif /* TWO_FILE_COMMANDLINE */ - - /* Open the input file. */ - if (file_index < argc) { - if ((fp = fopen(argv[file_index], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s for reading\n", progname, argv[file_index]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ - fp = read_stdin(); - } - -#if TRANSFORMS_SUPPORTED - /* Open the drop file. */ - if (dropfilename != NULL) { - if ((drop_file = fopen(dropfilename, READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s for reading\n", progname, dropfilename); - exit(EXIT_FAILURE); - } - dropinfo.err = jpeg_std_error(&jdroperr); - jpeg_create_decompress(&dropinfo); - jpeg_stdio_src(&dropinfo, drop_file); - } else { - drop_file = NULL; - } -#endif - -#ifdef PROGRESS_REPORT - start_progress_monitor((j_common_ptr) &dstinfo, &progress); -#endif - - /* Specify data source for decompression */ - jpeg_stdio_src(&srcinfo, fp); - - /* Enable saving of extra markers that we want to copy */ - jcopy_markers_setup(&srcinfo, copyoption); - - /* Read file header */ - (void) jpeg_read_header(&srcinfo, TRUE); - - /* Adjust default decompression parameters */ - if (scaleoption != NULL) - if (sscanf(scaleoption, "%u/%u", - &srcinfo.scale_num, &srcinfo.scale_denom) < 1) - usage(); - -#if TRANSFORMS_SUPPORTED - if (dropfilename != NULL) { - (void) jpeg_read_header(&dropinfo, TRUE); - transformoption.crop_width = dropinfo.image_width; - transformoption.crop_width_set = JCROP_POS; - transformoption.crop_height = dropinfo.image_height; - transformoption.crop_height_set = JCROP_POS; - transformoption.drop_ptr = &dropinfo; - } -#endif - - /* Any space needed by a transform option must be requested before - * jpeg_read_coefficients so that memory allocation will be done right. - */ -#if TRANSFORMS_SUPPORTED - /* Fail right away if -perfect is given and transformation is not perfect. - */ - if (!jtransform_request_workspace(&srcinfo, &transformoption)) { - fprintf(stderr, "%s: transformation is not perfect\n", progname); - exit(EXIT_FAILURE); - } -#endif - - /* Read source file as DCT coefficients */ - src_coef_arrays = jpeg_read_coefficients(&srcinfo); - -#if TRANSFORMS_SUPPORTED - if (dropfilename != NULL) { - transformoption.drop_coef_arrays = jpeg_read_coefficients(&dropinfo); - } -#endif - - /* Initialize destination compression parameters from source values */ - jpeg_copy_critical_parameters(&srcinfo, &dstinfo); - - /* Adjust destination parameters if required by transform options; - * also find out which set of coefficient arrays will hold the output. - */ -#if TRANSFORMS_SUPPORTED - dst_coef_arrays = jtransform_adjust_parameters(&srcinfo, &dstinfo, - src_coef_arrays, - &transformoption); -#else - dst_coef_arrays = src_coef_arrays; -#endif - - /* Close input file, if we opened it. - * Note: we assume that jpeg_read_coefficients consumed all input - * until JPEG_REACHED_EOI, and that jpeg_finish_decompress will - * only consume more while (! cinfo->inputctl->eoi_reached). - * We cannot call jpeg_finish_decompress here since we still need the - * virtual arrays allocated from the source object for processing. - */ - if (fp != stdin) - fclose(fp); - - /* Open the output file. */ - if (outfilename != NULL) { - if ((fp = fopen(outfilename, WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s for writing\n", progname, outfilename); - exit(EXIT_FAILURE); - } - } else { - /* default output file is stdout */ - fp = write_stdout(); - } - - /* Adjust default compression parameters by re-parsing the options */ - file_index = parse_switches(&dstinfo, argc, argv, 0, TRUE); - - /* Specify data destination for compression */ - jpeg_stdio_dest(&dstinfo, fp); - - /* Start compressor (note no image data is actually written here) */ - jpeg_write_coefficients(&dstinfo, dst_coef_arrays); - - /* Copy to the output file any extra markers that we want to preserve */ - jcopy_markers_execute(&srcinfo, &dstinfo, copyoption); - - /* Execute image transformation, if any */ -#if TRANSFORMS_SUPPORTED - jtransform_execute_transformation(&srcinfo, &dstinfo, - src_coef_arrays, - &transformoption); -#endif - - /* Finish compression and release memory */ - jpeg_finish_compress(&dstinfo); - jpeg_destroy_compress(&dstinfo); -#if TRANSFORMS_SUPPORTED - if (dropfilename != NULL) { - (void) jpeg_finish_decompress(&dropinfo); - jpeg_destroy_decompress(&dropinfo); - } -#endif - (void) jpeg_finish_decompress(&srcinfo); - jpeg_destroy_decompress(&srcinfo); - - /* Close output file, if we opened it */ - if (fp != stdout) - fclose(fp); -#if TRANSFORMS_SUPPORTED - if (drop_file != NULL) - fclose(drop_file); -#endif - -#ifdef PROGRESS_REPORT - end_progress_monitor((j_common_ptr) &dstinfo); -#endif - - /* All done. */ -#if TRANSFORMS_SUPPORTED - if (dropfilename != NULL) - exit(jsrcerr.num_warnings + jdroperr.num_warnings + - jdsterr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS); -#endif - exit(jsrcerr.num_warnings + jdsterr.num_warnings ? - EXIT_WARNING : EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/thirdparty/jpeg-9e/jquant1.c b/thirdparty/jpeg-9e/jquant1.c deleted file mode 100644 index 60b1843..0000000 --- a/thirdparty/jpeg-9e/jquant1.c +++ /dev/null @@ -1,851 +0,0 @@ -/* - * jquant1.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2011-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains 1-pass color quantization (color mapping) routines. - * These routines provide mapping to a fixed color map using equally spaced - * color values. Optional Floyd-Steinberg or ordered dithering is available. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - -#ifdef QUANT_1PASS_SUPPORTED - - -/* - * The main purpose of 1-pass quantization is to provide a fast, if not very - * high quality, colormapped output capability. A 2-pass quantizer usually - * gives better visual quality; however, for quantized grayscale output this - * quantizer is perfectly adequate. Dithering is highly recommended with this - * quantizer, though you can turn it off if you really want to. - * - * In 1-pass quantization the colormap must be chosen in advance of seeing the - * image. We use a map consisting of all combinations of Ncolors[i] color - * values for the i'th component. The Ncolors[] values are chosen so that - * their product, the total number of colors, is no more than that requested. - * (In most cases, the product will be somewhat less.) - * - * Since the colormap is orthogonal, the representative value for each color - * component can be determined without considering the other components; - * then these indexes can be combined into a colormap index by a standard - * N-dimensional-array-subscript calculation. Most of the arithmetic involved - * can be precalculated and stored in the lookup table colorindex[]. - * colorindex[i][j] maps pixel value j in component i to the nearest - * representative value (grid plane) for that component; this index is - * multiplied by the array stride for component i, so that the - * index of the colormap entry closest to a given pixel value is just - * sum( colorindex[component-number][pixel-component-value] ) - * Aside from being fast, this scheme allows for variable spacing between - * representative values with no additional lookup cost. - * - * If gamma correction has been applied in color conversion, it might be wise - * to adjust the color grid spacing so that the representative colors are - * equidistant in linear space. At this writing, gamma correction is not - * implemented by jdcolor, so nothing is done here. - */ - - -/* Declarations for ordered dithering. - * - * We use a standard 16x16 ordered dither array. The basic concept of ordered - * dithering is described in many references, for instance Dale Schumacher's - * chapter II.2 of Graphics Gems II (James Arvo, ed. Academic Press, 1991). - * In place of Schumacher's comparisons against a "threshold" value, we add a - * "dither" value to the input pixel and then round the result to the nearest - * output value. The dither value is equivalent to (0.5 - threshold) times - * the distance between output values. For ordered dithering, we assume that - * the output colors are equally spaced; if not, results will probably be - * worse, since the dither may be too much or too little at a given point. - * - * The normal calculation would be to form pixel value + dither, range-limit - * this to 0..MAXJSAMPLE, and then index into the colorindex table as usual. - * We can skip the separate range-limiting step by extending the colorindex - * table in both directions. - */ - -#define ODITHER_SIZE 16 /* dimension of dither matrix */ -/* NB: if ODITHER_SIZE is not a power of 2, ODITHER_MASK uses will break */ -#define ODITHER_CELLS (ODITHER_SIZE*ODITHER_SIZE) /* # cells in matrix */ -#define ODITHER_MASK (ODITHER_SIZE-1) /* mask for wrapping around counters */ - -typedef int ODITHER_MATRIX[ODITHER_SIZE][ODITHER_SIZE]; -typedef int (*ODITHER_MATRIX_PTR)[ODITHER_SIZE]; - -static const UINT8 base_dither_matrix[ODITHER_SIZE][ODITHER_SIZE] = { - /* Bayer's order-4 dither array. Generated by the code given in - * Stephen Hawley's article "Ordered Dithering" in Graphics Gems I. - * The values in this array must range from 0 to ODITHER_CELLS-1. - */ - { 0,192, 48,240, 12,204, 60,252, 3,195, 51,243, 15,207, 63,255 }, - { 128, 64,176,112,140, 76,188,124,131, 67,179,115,143, 79,191,127 }, - { 32,224, 16,208, 44,236, 28,220, 35,227, 19,211, 47,239, 31,223 }, - { 160, 96,144, 80,172,108,156, 92,163, 99,147, 83,175,111,159, 95 }, - { 8,200, 56,248, 4,196, 52,244, 11,203, 59,251, 7,199, 55,247 }, - { 136, 72,184,120,132, 68,180,116,139, 75,187,123,135, 71,183,119 }, - { 40,232, 24,216, 36,228, 20,212, 43,235, 27,219, 39,231, 23,215 }, - { 168,104,152, 88,164,100,148, 84,171,107,155, 91,167,103,151, 87 }, - { 2,194, 50,242, 14,206, 62,254, 1,193, 49,241, 13,205, 61,253 }, - { 130, 66,178,114,142, 78,190,126,129, 65,177,113,141, 77,189,125 }, - { 34,226, 18,210, 46,238, 30,222, 33,225, 17,209, 45,237, 29,221 }, - { 162, 98,146, 82,174,110,158, 94,161, 97,145, 81,173,109,157, 93 }, - { 10,202, 58,250, 6,198, 54,246, 9,201, 57,249, 5,197, 53,245 }, - { 138, 74,186,122,134, 70,182,118,137, 73,185,121,133, 69,181,117 }, - { 42,234, 26,218, 38,230, 22,214, 41,233, 25,217, 37,229, 21,213 }, - { 170,106,154, 90,166,102,150, 86,169,105,153, 89,165,101,149, 85 } -}; - - -/* Declarations for Floyd-Steinberg dithering. - * - * Errors are accumulated into the array fserrors[], at a resolution of - * 1/16th of a pixel count. The error at a given pixel is propagated - * to its not-yet-processed neighbors using the standard F-S fractions, - * ... (here) 7/16 - * 3/16 5/16 1/16 - * We work left-to-right on even rows, right-to-left on odd rows. - * - * We can get away with a single array (holding one row's worth of errors) - * by using it to store the current row's errors at pixel columns not yet - * processed, but the next row's errors at columns already processed. We - * need only a few extra variables to hold the errors immediately around the - * current column. (If we are lucky, those variables are in registers, but - * even if not, they're probably cheaper to access than array elements are.) - * - * The fserrors[] array is indexed [component#][position]. - * We provide (#columns + 2) entries per component; the extra entry at each - * end saves us from special-casing the first and last pixels. - * - * Note: on a wide image, we might not have enough room in a PC's near data - * segment to hold the error array; so it is allocated with alloc_large. - */ - -#if BITS_IN_JSAMPLE == 8 -typedef INT16 FSERROR; /* 16 bits should be enough */ -typedef int LOCFSERROR; /* use 'int' for calculation temps */ -#else -typedef INT32 FSERROR; /* may need more than 16 bits */ -typedef INT32 LOCFSERROR; /* be sure calculation temps are big enough */ -#endif - -typedef FSERROR FAR *FSERRPTR; /* pointer to error array (in FAR storage!) */ - - -/* Private subobject */ - -#define MAX_Q_COMPS 4 /* max components I can handle */ - -typedef struct { - struct jpeg_color_quantizer pub; /* public fields */ - - /* Initially allocated colormap is saved here */ - JSAMPARRAY sv_colormap; /* The color map as a 2-D pixel array */ - int sv_actual; /* number of entries in use */ - - JSAMPARRAY colorindex; /* Precomputed mapping for speed */ - /* colorindex[i][j] = index of color closest to pixel value j in component i, - * premultiplied as described above. Since colormap indexes must fit into - * JSAMPLEs, the entries of this array will too. - */ - boolean is_padded; /* is the colorindex padded for odither? */ - - int Ncolors[MAX_Q_COMPS]; /* # of values alloced to each component */ - - /* Variables for ordered dithering */ - int row_index; /* cur row's vertical index in dither matrix */ - ODITHER_MATRIX_PTR odither[MAX_Q_COMPS]; /* one dither array per component */ - - /* Variables for Floyd-Steinberg dithering */ - FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */ - boolean on_odd_row; /* flag to remember which row we are on */ -} my_cquantizer; - -typedef my_cquantizer * my_cquantize_ptr; - - -/* - * Policy-making subroutines for create_colormap and create_colorindex. - * These routines determine the colormap to be used. The rest of the module - * only assumes that the colormap is orthogonal. - * - * * select_ncolors decides how to divvy up the available colors - * among the components. - * * output_value defines the set of representative values for a component. - * * largest_input_value defines the mapping from input values to - * representative values for a component. - * Note that the latter two routines may impose different policies for - * different components, though this is not currently done. - */ - - -LOCAL(int) -select_ncolors (j_decompress_ptr cinfo, int Ncolors[]) -/* Determine allocation of desired colors to components, */ -/* and fill in Ncolors[] array to indicate choice. */ -/* Return value is total number of colors (product of Ncolors[] values). */ -{ - int nc = cinfo->out_color_components; /* number of color components */ - int max_colors = cinfo->desired_number_of_colors; - int total_colors, iroot, i, j; - boolean changed; - long temp; - static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE }; - - /* We can allocate at least the nc'th root of max_colors per component. */ - /* Compute floor(nc'th root of max_colors). */ - iroot = 1; - do { - iroot++; - temp = iroot; /* set temp = iroot ** nc */ - for (i = 1; i < nc; i++) - temp *= iroot; - } while (temp <= (long) max_colors); /* repeat till iroot exceeds root */ - iroot--; /* now iroot = floor(root) */ - - /* Must have at least 2 color values per component */ - if (iroot < 2) - ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, (int) temp); - - /* Initialize to iroot color values for each component */ - total_colors = 1; - for (i = 0; i < nc; i++) { - Ncolors[i] = iroot; - total_colors *= iroot; - } - /* We may be able to increment the count for one or more components without - * exceeding max_colors, though we know not all can be incremented. - * Sometimes, the first component can be incremented more than once! - * (Example: for 16 colors, we start at 2*2*2, go to 3*2*2, then 4*2*2.) - * In RGB colorspace, try to increment G first, then R, then B. - */ - do { - changed = FALSE; - for (i = 0; i < nc; i++) { - j = (cinfo->out_color_space == JCS_RGB ? RGB_order[i] : i); - /* calculate new total_colors if Ncolors[j] is incremented */ - temp = total_colors / Ncolors[j]; - temp *= Ncolors[j]+1; /* done in long arith to avoid oflo */ - if (temp > (long) max_colors) - break; /* won't fit, done with this pass */ - Ncolors[j]++; /* OK, apply the increment */ - total_colors = (int) temp; - changed = TRUE; - } - } while (changed); - - return total_colors; -} - - -LOCAL(int) -output_value (j_decompress_ptr cinfo, int ci, int j, int maxj) -/* Return j'th output value, where j will range from 0 to maxj */ -/* The output values must fall in 0..MAXJSAMPLE in increasing order */ -{ - /* We always provide values 0 and MAXJSAMPLE for each component; - * any additional values are equally spaced between these limits. - * (Forcing the upper and lower values to the limits ensures that - * dithering can't produce a color outside the selected gamut.) - */ - return (int) (((INT32) j * MAXJSAMPLE + maxj/2) / maxj); -} - - -LOCAL(int) -largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj) -/* Return largest input value that should map to j'th output value */ -/* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ -{ - /* Breakpoints are halfway between values returned by output_value */ - return (int) (((INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); -} - - -/* - * Create the colormap. - */ - -LOCAL(void) -create_colormap (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - JSAMPARRAY colormap; /* Created colormap */ - int total_colors; /* Number of distinct output colors */ - int i,j,k, nci, blksize, blkdist, ptr, val; - - /* Select number of colors for each component */ - total_colors = select_ncolors(cinfo, cquantize->Ncolors); - - /* Report selected color counts */ - if (cinfo->out_color_components == 3) - TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS, - total_colors, cquantize->Ncolors[0], - cquantize->Ncolors[1], cquantize->Ncolors[2]); - else - TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors); - - /* Allocate and fill in the colormap. */ - /* The colors are ordered in the map in standard row-major order, */ - /* i.e. rightmost (highest-indexed) color changes most rapidly. */ - - colormap = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components); - - /* blksize is number of adjacent repeated entries for a component */ - /* blkdist is distance between groups of identical entries for a component */ - blkdist = total_colors; - - for (i = 0; i < cinfo->out_color_components; i++) { - /* fill in colormap entries for i'th color component */ - nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ - blksize = blkdist / nci; - for (j = 0; j < nci; j++) { - /* Compute j'th output value (out of nci) for component */ - val = output_value(cinfo, i, j, nci-1); - /* Fill in all colormap entries that have this value of this component */ - for (ptr = j * blksize; ptr < total_colors; ptr += blkdist) { - /* fill in blksize entries beginning at ptr */ - for (k = 0; k < blksize; k++) - colormap[i][ptr+k] = (JSAMPLE) val; - } - } - blkdist = blksize; /* blksize of this color is blkdist of next */ - } - - /* Save the colormap in private storage, - * where it will survive color quantization mode changes. - */ - cquantize->sv_colormap = colormap; - cquantize->sv_actual = total_colors; -} - - -/* - * Create the color index table. - */ - -LOCAL(void) -create_colorindex (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - JSAMPROW indexptr; - int i,j,k, nci, blksize, val, pad; - - /* For ordered dither, we pad the color index tables by MAXJSAMPLE in - * each direction (input index values can be -MAXJSAMPLE .. 2*MAXJSAMPLE). - * This is not necessary in the other dithering modes. However, we - * flag whether it was done in case user changes dithering mode. - */ - if (cinfo->dither_mode == JDITHER_ORDERED) { - pad = MAXJSAMPLE*2; - cquantize->is_padded = TRUE; - } else { - pad = 0; - cquantize->is_padded = FALSE; - } - - cquantize->colorindex = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) (MAXJSAMPLE+1 + pad), - (JDIMENSION) cinfo->out_color_components); - - /* blksize is number of adjacent repeated entries for a component */ - blksize = cquantize->sv_actual; - - for (i = 0; i < cinfo->out_color_components; i++) { - /* fill in colorindex entries for i'th color component */ - nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ - blksize = blksize / nci; - - /* adjust colorindex pointers to provide padding at negative indexes. */ - if (pad) - cquantize->colorindex[i] += MAXJSAMPLE; - - /* in loop, val = index of current output value, */ - /* and k = largest j that maps to current val */ - indexptr = cquantize->colorindex[i]; - val = 0; - k = largest_input_value(cinfo, i, 0, nci-1); - for (j = 0; j <= MAXJSAMPLE; j++) { - while (j > k) /* advance val if past boundary */ - k = largest_input_value(cinfo, i, ++val, nci-1); - /* premultiply so that no multiplication needed in main processing */ - indexptr[j] = (JSAMPLE) (val * blksize); - } - /* Pad at both ends if necessary */ - if (pad) - for (j = 1; j <= MAXJSAMPLE; j++) { - indexptr[-j] = indexptr[0]; - indexptr[MAXJSAMPLE+j] = indexptr[MAXJSAMPLE]; - } - } -} - - -/* - * Create an ordered-dither array for a component having ncolors - * distinct output values. - */ - -LOCAL(ODITHER_MATRIX_PTR) -make_odither_array (j_decompress_ptr cinfo, int ncolors) -{ - ODITHER_MATRIX_PTR odither; - int j,k; - INT32 num,den; - - odither = (ODITHER_MATRIX_PTR) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(ODITHER_MATRIX)); - /* The inter-value distance for this color is MAXJSAMPLE/(ncolors-1). - * Hence the dither value for the matrix cell with fill order f - * (f=0..N-1) should be (N-1-2*f)/(2*N) * MAXJSAMPLE/(ncolors-1). - * On 16-bit-int machine, be careful to avoid overflow. - */ - den = 2 * ODITHER_CELLS * ((INT32) (ncolors - 1)); - for (j = 0; j < ODITHER_SIZE; j++) { - for (k = 0; k < ODITHER_SIZE; k++) { - num = ((INT32) (ODITHER_CELLS-1 - 2*((int)base_dither_matrix[j][k]))) - * MAXJSAMPLE; - /* Ensure round towards zero despite C's lack of consistency - * about rounding negative values in integer division... - */ - odither[j][k] = (int) (num<0 ? -((-num)/den) : num/den); - } - } - return odither; -} - - -/* - * Create the ordered-dither tables. - * Components having the same number of representative colors may - * share a dither table. - */ - -LOCAL(void) -create_odither_tables (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - ODITHER_MATRIX_PTR odither; - int i, j, nci; - - for (i = 0; i < cinfo->out_color_components; i++) { - nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ - odither = NULL; /* search for matching prior component */ - for (j = 0; j < i; j++) { - if (nci == cquantize->Ncolors[j]) { - odither = cquantize->odither[j]; - break; - } - } - if (odither == NULL) /* need a new table? */ - odither = make_odither_array(cinfo, nci); - cquantize->odither[i] = odither; - } -} - - -/* - * Map some rows of pixels to the output colormapped representation. - */ - -METHODDEF(void) -color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, - JSAMPARRAY output_buf, int num_rows) -/* General case, no dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - JSAMPARRAY colorindex = cquantize->colorindex; - register int pixcode, ci; - register JSAMPROW ptrin, ptrout; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - register int nc = cinfo->out_color_components; - - for (row = 0; row < num_rows; row++) { - ptrin = input_buf[row]; - ptrout = output_buf[row]; - for (col = width; col > 0; col--) { - pixcode = 0; - for (ci = 0; ci < nc; ci++) { - pixcode += GETJSAMPLE(colorindex[ci][GETJSAMPLE(*ptrin++)]); - } - *ptrout++ = (JSAMPLE) pixcode; - } - } -} - - -METHODDEF(void) -color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf, - JSAMPARRAY output_buf, int num_rows) -/* Fast path for out_color_components==3, no dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - register int pixcode; - register JSAMPROW ptrin, ptrout; - JSAMPROW colorindex0 = cquantize->colorindex[0]; - JSAMPROW colorindex1 = cquantize->colorindex[1]; - JSAMPROW colorindex2 = cquantize->colorindex[2]; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - - for (row = 0; row < num_rows; row++) { - ptrin = input_buf[row]; - ptrout = output_buf[row]; - for (col = width; col > 0; col--) { - pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*ptrin++)]); - pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*ptrin++)]); - pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*ptrin++)]); - *ptrout++ = (JSAMPLE) pixcode; - } - } -} - - -METHODDEF(void) -quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, - JSAMPARRAY output_buf, int num_rows) -/* General case, with ordered dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - register JSAMPROW input_ptr; - register JSAMPROW output_ptr; - JSAMPROW colorindex_ci; - int * dither; /* points to active row of dither matrix */ - int row_index, col_index; /* current indexes into dither matrix */ - int nc = cinfo->out_color_components; - int ci; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - - for (row = 0; row < num_rows; row++) { - /* Initialize output values to 0 so can process components separately */ - FMEMZERO((void FAR *) output_buf[row], (size_t) width * SIZEOF(JSAMPLE)); - row_index = cquantize->row_index; - for (ci = 0; ci < nc; ci++) { - input_ptr = input_buf[row] + ci; - output_ptr = output_buf[row]; - colorindex_ci = cquantize->colorindex[ci]; - dither = cquantize->odither[ci][row_index]; - col_index = 0; - - for (col = width; col > 0; col--) { - /* Form pixel value + dither, range-limit to 0..MAXJSAMPLE, - * select output value, accumulate into output code for this pixel. - * Range-limiting need not be done explicitly, as we have extended - * the colorindex table to produce the right answers for out-of-range - * inputs. The maximum dither is +- MAXJSAMPLE; this sets the - * required amount of padding. - */ - *output_ptr += colorindex_ci[GETJSAMPLE(*input_ptr)+dither[col_index]]; - input_ptr += nc; - output_ptr++; - col_index = (col_index + 1) & ODITHER_MASK; - } - } - /* Advance row index for next row */ - row_index = (row_index + 1) & ODITHER_MASK; - cquantize->row_index = row_index; - } -} - - -METHODDEF(void) -quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, - JSAMPARRAY output_buf, int num_rows) -/* Fast path for out_color_components==3, with ordered dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - register int pixcode; - register JSAMPROW input_ptr; - register JSAMPROW output_ptr; - JSAMPROW colorindex0 = cquantize->colorindex[0]; - JSAMPROW colorindex1 = cquantize->colorindex[1]; - JSAMPROW colorindex2 = cquantize->colorindex[2]; - int * dither0; /* points to active row of dither matrix */ - int * dither1; - int * dither2; - int row_index, col_index; /* current indexes into dither matrix */ - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - - for (row = 0; row < num_rows; row++) { - row_index = cquantize->row_index; - input_ptr = input_buf[row]; - output_ptr = output_buf[row]; - dither0 = cquantize->odither[0][row_index]; - dither1 = cquantize->odither[1][row_index]; - dither2 = cquantize->odither[2][row_index]; - col_index = 0; - - for (col = width; col > 0; col--) { - pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*input_ptr++) + - dither0[col_index]]); - pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*input_ptr++) + - dither1[col_index]]); - pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*input_ptr++) + - dither2[col_index]]); - *output_ptr++ = (JSAMPLE) pixcode; - col_index = (col_index + 1) & ODITHER_MASK; - } - row_index = (row_index + 1) & ODITHER_MASK; - cquantize->row_index = row_index; - } -} - - -METHODDEF(void) -quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, - JSAMPARRAY output_buf, int num_rows) -/* General case, with Floyd-Steinberg dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - register LOCFSERROR cur; /* current error or pixel value */ - LOCFSERROR belowerr; /* error for pixel below cur */ - LOCFSERROR bpreverr; /* error for below/prev col */ - LOCFSERROR bnexterr; /* error for below/next col */ - LOCFSERROR delta; - register FSERRPTR errorptr; /* => fserrors[] at column before current */ - register JSAMPROW input_ptr; - register JSAMPROW output_ptr; - JSAMPROW colorindex_ci; - JSAMPROW colormap_ci; - int pixcode; - int nc = cinfo->out_color_components; - int dir; /* 1 for left-to-right, -1 for right-to-left */ - int dirnc; /* dir * nc */ - int ci; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - JSAMPLE *range_limit = cinfo->sample_range_limit; - SHIFT_TEMPS - - for (row = 0; row < num_rows; row++) { - /* Initialize output values to 0 so can process components separately */ - FMEMZERO((void FAR *) output_buf[row], (size_t) width * SIZEOF(JSAMPLE)); - for (ci = 0; ci < nc; ci++) { - input_ptr = input_buf[row] + ci; - output_ptr = output_buf[row]; - if (cquantize->on_odd_row) { - /* work right to left in this row */ - input_ptr += (width-1) * nc; /* so point to rightmost pixel */ - output_ptr += width-1; - dir = -1; - dirnc = -nc; - errorptr = cquantize->fserrors[ci] + (width+1); /* => entry after last column */ - } else { - /* work left to right in this row */ - dir = 1; - dirnc = nc; - errorptr = cquantize->fserrors[ci]; /* => entry before first column */ - } - colorindex_ci = cquantize->colorindex[ci]; - colormap_ci = cquantize->sv_colormap[ci]; - /* Preset error values: no error propagated to first pixel from left */ - cur = 0; - /* and no error propagated to row below yet */ - belowerr = bpreverr = 0; - - for (col = width; col > 0; col--) { - /* cur holds the error propagated from the previous pixel on the - * current line. Add the error propagated from the previous line - * to form the complete error correction term for this pixel, and - * round the error term (which is expressed * 16) to an integer. - * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct - * for either sign of the error value. - * Note: errorptr points to *previous* column's array entry. - */ - cur = RIGHT_SHIFT(cur + errorptr[dir] + 8, 4); - /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. - * The maximum error is +- MAXJSAMPLE; this sets the required size - * of the range_limit array. - */ - cur += GETJSAMPLE(*input_ptr); - cur = GETJSAMPLE(range_limit[cur]); - /* Select output value, accumulate into output code for this pixel */ - pixcode = GETJSAMPLE(colorindex_ci[cur]); - *output_ptr += (JSAMPLE) pixcode; - /* Compute actual representation error at this pixel */ - /* Note: we can do this even though we don't have the final */ - /* pixel code, because the colormap is orthogonal. */ - cur -= GETJSAMPLE(colormap_ci[pixcode]); - /* Compute error fractions to be propagated to adjacent pixels. - * Add these into the running sums, and simultaneously shift the - * next-line error sums left by 1 column. - */ - bnexterr = cur; - delta = cur * 2; - cur += delta; /* form error * 3 */ - errorptr[0] = (FSERROR) (bpreverr + cur); - cur += delta; /* form error * 5 */ - bpreverr = belowerr + cur; - belowerr = bnexterr; - cur += delta; /* form error * 7 */ - /* At this point cur contains the 7/16 error value to be propagated - * to the next pixel on the current line, and all the errors for the - * next line have been shifted over. We are therefore ready to move on. - */ - input_ptr += dirnc; /* advance input ptr to next column */ - output_ptr += dir; /* advance output ptr to next column */ - errorptr += dir; /* advance errorptr to current column */ - } - /* Post-loop cleanup: we must unload the final error value into the - * final fserrors[] entry. Note we need not unload belowerr because - * it is for the dummy column before or after the actual array. - */ - errorptr[0] = (FSERROR) bpreverr; /* unload prev err into array */ - } - cquantize->on_odd_row = (cquantize->on_odd_row ? FALSE : TRUE); - } -} - - -/* - * Allocate workspace for Floyd-Steinberg errors. - */ - -LOCAL(void) -alloc_fs_workspace (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - size_t arraysize; - int i; - - arraysize = ((size_t) cinfo->output_width + (size_t) 2) * SIZEOF(FSERROR); - for (i = 0; i < cinfo->out_color_components; i++) { - cquantize->fserrors[i] = (FSERRPTR) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); - } -} - - -/* - * Initialize for one-pass color quantization. - */ - -METHODDEF(void) -start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - size_t arraysize; - int i; - - /* Install my colormap. */ - cinfo->colormap = cquantize->sv_colormap; - cinfo->actual_number_of_colors = cquantize->sv_actual; - - /* Initialize for desired dithering mode. */ - switch (cinfo->dither_mode) { - case JDITHER_NONE: - if (cinfo->out_color_components == 3) - cquantize->pub.color_quantize = color_quantize3; - else - cquantize->pub.color_quantize = color_quantize; - break; - case JDITHER_ORDERED: - if (cinfo->out_color_components == 3) - cquantize->pub.color_quantize = quantize3_ord_dither; - else - cquantize->pub.color_quantize = quantize_ord_dither; - cquantize->row_index = 0; /* initialize state for ordered dither */ - /* If user changed to ordered dither from another mode, - * we must recreate the color index table with padding. - * This will cost extra space, but probably isn't very likely. - */ - if (! cquantize->is_padded) - create_colorindex(cinfo); - /* Create ordered-dither tables if we didn't already. */ - if (cquantize->odither[0] == NULL) - create_odither_tables(cinfo); - break; - case JDITHER_FS: - cquantize->pub.color_quantize = quantize_fs_dither; - cquantize->on_odd_row = FALSE; /* initialize state for F-S dither */ - /* Allocate Floyd-Steinberg workspace if didn't already. */ - if (cquantize->fserrors[0] == NULL) - alloc_fs_workspace(cinfo); - /* Initialize the propagated errors to zero. */ - arraysize = ((size_t) cinfo->output_width + (size_t) 2) * SIZEOF(FSERROR); - for (i = 0; i < cinfo->out_color_components; i++) - FMEMZERO((void FAR *) cquantize->fserrors[i], arraysize); - break; - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - } -} - - -/* - * Finish up at the end of the pass. - */ - -METHODDEF(void) -finish_pass_1_quant (j_decompress_ptr cinfo) -{ - /* no work in 1-pass case */ -} - - -/* - * Switch to a new external colormap between output passes. - * Shouldn't get to this module! - */ - -METHODDEF(void) -new_color_map_1_quant (j_decompress_ptr cinfo) -{ - ERREXIT(cinfo, JERR_MODE_CHANGE); -} - - -/* - * Module initialization routine for 1-pass color quantization. - */ - -GLOBAL(void) -jinit_1pass_quantizer (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize; - - cquantize = (my_cquantize_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_cquantizer)); - cinfo->cquantize = &cquantize->pub; - cquantize->pub.start_pass = start_pass_1_quant; - cquantize->pub.finish_pass = finish_pass_1_quant; - cquantize->pub.new_color_map = new_color_map_1_quant; - cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */ - cquantize->odither[0] = NULL; /* Also flag odither arrays not allocated */ - - /* Make sure my internal arrays won't overflow */ - if (cinfo->out_color_components > MAX_Q_COMPS) - ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS); - /* Make sure colormap indexes can be represented by JSAMPLEs */ - if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1)) - ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1); - - /* Create the colormap and color index table. */ - create_colormap(cinfo); - create_colorindex(cinfo); - - /* Allocate Floyd-Steinberg workspace now if requested. - * We do this now since it is FAR storage and may affect the memory - * manager's space calculations. If the user changes to FS dither - * mode in a later pass, we will allocate the space then, and will - * possibly overrun the max_memory_to_use setting. - */ - if (cinfo->dither_mode == JDITHER_FS) - alloc_fs_workspace(cinfo); -} - -#endif /* QUANT_1PASS_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/jquant2.c b/thirdparty/jpeg-9e/jquant2.c deleted file mode 100644 index 662b9bc..0000000 --- a/thirdparty/jpeg-9e/jquant2.c +++ /dev/null @@ -1,1311 +0,0 @@ -/* - * jquant2.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2011-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains 2-pass color quantization (color mapping) routines. - * These routines provide selection of a custom color map for an image, - * followed by mapping of the image to that color map, with optional - * Floyd-Steinberg dithering. - * It is also possible to use just the second pass to map to an arbitrary - * externally-given color map. - * - * Note: ordered dithering is not supported, since there isn't any fast - * way to compute intercolor distances; it's unclear that ordered dither's - * fundamental assumptions even hold with an irregularly spaced color map. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - -#ifdef QUANT_2PASS_SUPPORTED - - -/* - * This module implements the well-known Heckbert paradigm for color - * quantization. Most of the ideas used here can be traced back to - * Heckbert's seminal paper - * Heckbert, Paul. "Color Image Quantization for Frame Buffer Display", - * Proc. SIGGRAPH '82, Computer Graphics v.16 #3 (July 1982), pp 297-304. - * - * In the first pass over the image, we accumulate a histogram showing the - * usage count of each possible color. To keep the histogram to a reasonable - * size, we reduce the precision of the input; typical practice is to retain - * 5 or 6 bits per color, so that 8 or 4 different input values are counted - * in the same histogram cell. - * - * Next, the color-selection step begins with a box representing the whole - * color space, and repeatedly splits the "largest" remaining box until we - * have as many boxes as desired colors. Then the mean color in each - * remaining box becomes one of the possible output colors. - * - * The second pass over the image maps each input pixel to the closest output - * color (optionally after applying a Floyd-Steinberg dithering correction). - * This mapping is logically trivial, but making it go fast enough requires - * considerable care. - * - * Heckbert-style quantizers vary a good deal in their policies for choosing - * the "largest" box and deciding where to cut it. The particular policies - * used here have proved out well in experimental comparisons, but better ones - * may yet be found. - * - * In earlier versions of the IJG code, this module quantized in YCbCr color - * space, processing the raw upsampled data without a color conversion step. - * This allowed the color conversion math to be done only once per colormap - * entry, not once per pixel. However, that optimization precluded other - * useful optimizations (such as merging color conversion with upsampling) - * and it also interfered with desired capabilities such as quantizing to an - * externally-supplied colormap. We have therefore abandoned that approach. - * The present code works in the post-conversion color space, typically RGB. - * - * To improve the visual quality of the results, we actually work in scaled - * RGB space, giving G distances more weight than R, and R in turn more than - * B. To do everything in integer math, we must use integer scale factors. - * The 2/3/1 scale factors used here correspond loosely to the relative - * weights of the colors in the NTSC grayscale equation. - * If you want to use this code to quantize a non-RGB color space, you'll - * probably need to change these scale factors. - */ - -#define R_SCALE 2 /* scale R distances by this much */ -#define G_SCALE 3 /* scale G distances by this much */ -#define B_SCALE 1 /* and B by this much */ - -/* Relabel R/G/B as components 0/1/2, respecting the RGB ordering defined - * in jmorecfg.h. As the code stands, it will do the right thing for R,G,B - * and B,G,R orders. If you define some other weird order in jmorecfg.h, - * you'll get compile errors until you extend this logic. In that case - * you'll probably want to tweak the histogram sizes too. - */ - -#if RGB_RED == 0 -#define C0_SCALE R_SCALE -#endif -#if RGB_BLUE == 0 -#define C0_SCALE B_SCALE -#endif -#if RGB_GREEN == 1 -#define C1_SCALE G_SCALE -#endif -#if RGB_RED == 2 -#define C2_SCALE R_SCALE -#endif -#if RGB_BLUE == 2 -#define C2_SCALE B_SCALE -#endif - - -/* - * First we have the histogram data structure and routines for creating it. - * - * The number of bits of precision can be adjusted by changing these symbols. - * We recommend keeping 6 bits for G and 5 each for R and B. - * If you have plenty of memory and cycles, 6 bits all around gives marginally - * better results; if you are short of memory, 5 bits all around will save - * some space but degrade the results. - * To maintain a fully accurate histogram, we'd need to allocate a "long" - * (preferably unsigned long) for each cell. In practice this is overkill; - * we can get by with 16 bits per cell. Few of the cell counts will overflow, - * and clamping those that do overflow to the maximum value will give close- - * enough results. This reduces the recommended histogram size from 256Kb - * to 128Kb, which is a useful savings on PC-class machines. - * (In the second pass the histogram space is re-used for pixel mapping data; - * in that capacity, each cell must be able to store zero to the number of - * desired colors. 16 bits/cell is plenty for that too.) - * Since the JPEG code is intended to run in small memory model on 80x86 - * machines, we can't just allocate the histogram in one chunk. Instead - * of a true 3-D array, we use a row of pointers to 2-D arrays. Each - * pointer corresponds to a C0 value (typically 2^5 = 32 pointers) and - * each 2-D array has 2^6*2^5 = 2048 or 2^6*2^6 = 4096 entries. Note that - * on 80x86 machines, the pointer row is in near memory but the actual - * arrays are in far memory (same arrangement as we use for image arrays). - */ - -#define MAXNUMCOLORS (MAXJSAMPLE+1) /* maximum size of colormap */ - -/* These will do the right thing for either R,G,B or B,G,R color order, - * but you may not like the results for other color orders. - */ -#define HIST_C0_BITS 5 /* bits of precision in R/B histogram */ -#define HIST_C1_BITS 6 /* bits of precision in G histogram */ -#define HIST_C2_BITS 5 /* bits of precision in B/R histogram */ - -/* Number of elements along histogram axes. */ -#define HIST_C0_ELEMS (1<cquantize; - register JSAMPROW ptr; - register histptr histp; - register hist3d histogram = cquantize->histogram; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - - for (row = 0; row < num_rows; row++) { - ptr = input_buf[row]; - for (col = width; col > 0; col--) { - /* get pixel value and index into the histogram */ - histp = & histogram[GETJSAMPLE(ptr[0]) >> C0_SHIFT] - [GETJSAMPLE(ptr[1]) >> C1_SHIFT] - [GETJSAMPLE(ptr[2]) >> C2_SHIFT]; - /* increment, check for overflow and undo increment if so. */ - if (++(*histp) <= 0) - (*histp)--; - ptr += 3; - } - } -} - - -/* - * Next we have the really interesting routines: selection of a colormap - * given the completed histogram. - * These routines work with a list of "boxes", each representing a rectangular - * subset of the input color space (to histogram precision). - */ - -typedef struct { - /* The bounds of the box (inclusive); expressed as histogram indexes */ - int c0min, c0max; - int c1min, c1max; - int c2min, c2max; - /* The volume (actually 2-norm) of the box */ - INT32 volume; - /* The number of nonzero histogram cells within this box */ - long colorcount; -} box; - -typedef box * boxptr; - - -LOCAL(boxptr) -find_biggest_color_pop (boxptr boxlist, int numboxes) -/* Find the splittable box with the largest color population */ -/* Returns NULL if no splittable boxes remain */ -{ - register boxptr boxp; - register int i; - register long maxc = 0; - boxptr which = NULL; - - for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { - if (boxp->colorcount > maxc && boxp->volume > 0) { - which = boxp; - maxc = boxp->colorcount; - } - } - return which; -} - - -LOCAL(boxptr) -find_biggest_volume (boxptr boxlist, int numboxes) -/* Find the splittable box with the largest (scaled) volume */ -/* Returns NULL if no splittable boxes remain */ -{ - register boxptr boxp; - register int i; - register INT32 maxv = 0; - boxptr which = NULL; - - for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { - if (boxp->volume > maxv) { - which = boxp; - maxv = boxp->volume; - } - } - return which; -} - - -LOCAL(void) -update_box (j_decompress_ptr cinfo, boxptr boxp) -/* Shrink the min/max bounds of a box to enclose only nonzero elements, */ -/* and recompute its volume and population */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - histptr histp; - int c0,c1,c2; - int c0min,c0max,c1min,c1max,c2min,c2max; - INT32 dist0,dist1,dist2; - long ccount; - - c0min = boxp->c0min; c0max = boxp->c0max; - c1min = boxp->c1min; c1max = boxp->c1max; - c2min = boxp->c2min; c2max = boxp->c2max; - - if (c0max > c0min) - for (c0 = c0min; c0 <= c0max; c0++) - for (c1 = c1min; c1 <= c1max; c1++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++) - if (*histp++ != 0) { - boxp->c0min = c0min = c0; - goto have_c0min; - } - } - have_c0min: - if (c0max > c0min) - for (c0 = c0max; c0 >= c0min; c0--) - for (c1 = c1min; c1 <= c1max; c1++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++) - if (*histp++ != 0) { - boxp->c0max = c0max = c0; - goto have_c0max; - } - } - have_c0max: - if (c1max > c1min) - for (c1 = c1min; c1 <= c1max; c1++) - for (c0 = c0min; c0 <= c0max; c0++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++) - if (*histp++ != 0) { - boxp->c1min = c1min = c1; - goto have_c1min; - } - } - have_c1min: - if (c1max > c1min) - for (c1 = c1max; c1 >= c1min; c1--) - for (c0 = c0min; c0 <= c0max; c0++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++) - if (*histp++ != 0) { - boxp->c1max = c1max = c1; - goto have_c1max; - } - } - have_c1max: - if (c2max > c2min) - for (c2 = c2min; c2 <= c2max; c2++) - for (c0 = c0min; c0 <= c0max; c0++) { - histp = & histogram[c0][c1min][c2]; - for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) - if (*histp != 0) { - boxp->c2min = c2min = c2; - goto have_c2min; - } - } - have_c2min: - if (c2max > c2min) - for (c2 = c2max; c2 >= c2min; c2--) - for (c0 = c0min; c0 <= c0max; c0++) { - histp = & histogram[c0][c1min][c2]; - for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) - if (*histp != 0) { - boxp->c2max = c2max = c2; - goto have_c2max; - } - } - have_c2max: - - /* Update box volume. - * We use 2-norm rather than real volume here; this biases the method - * against making long narrow boxes, and it has the side benefit that - * a box is splittable iff norm > 0. - * Since the differences are expressed in histogram-cell units, - * we have to shift back to JSAMPLE units to get consistent distances; - * after which, we scale according to the selected distance scale factors. - */ - dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE; - dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE; - dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE; - boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2; - - /* Now scan remaining volume of box and compute population */ - ccount = 0; - for (c0 = c0min; c0 <= c0max; c0++) - for (c1 = c1min; c1 <= c1max; c1++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++, histp++) - if (*histp != 0) { - ccount++; - } - } - boxp->colorcount = ccount; -} - - -LOCAL(int) -median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes, - int desired_colors) -/* Repeatedly select and split the largest box until we have enough boxes */ -{ - int n,lb; - int c0,c1,c2,cmax; - register boxptr b1,b2; - - while (numboxes < desired_colors) { - /* Select box to split. - * Current algorithm: by population for first half, then by volume. - */ - if (numboxes*2 <= desired_colors) { - b1 = find_biggest_color_pop(boxlist, numboxes); - } else { - b1 = find_biggest_volume(boxlist, numboxes); - } - if (b1 == NULL) /* no splittable boxes left! */ - break; - b2 = &boxlist[numboxes]; /* where new box will go */ - /* Copy the color bounds to the new box. */ - b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max; - b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min; - /* Choose which axis to split the box on. - * Current algorithm: longest scaled axis. - * See notes in update_box about scaling distances. - */ - c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE; - c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE; - c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE; - /* We want to break any ties in favor of green, then red, blue last. - * This code does the right thing for R,G,B or B,G,R color orders only. - */ -#if RGB_RED == 0 - cmax = c1; n = 1; - if (c0 > cmax) { cmax = c0; n = 0; } - if (c2 > cmax) { n = 2; } -#else - cmax = c1; n = 1; - if (c2 > cmax) { cmax = c2; n = 2; } - if (c0 > cmax) { n = 0; } -#endif - /* Choose split point along selected axis, and update box bounds. - * Current algorithm: split at halfway point. - * (Since the box has been shrunk to minimum volume, - * any split will produce two nonempty subboxes.) - * Note that lb value is max for lower box, so must be < old max. - */ - switch (n) { - case 0: - lb = (b1->c0max + b1->c0min) / 2; - b1->c0max = lb; - b2->c0min = lb+1; - break; - case 1: - lb = (b1->c1max + b1->c1min) / 2; - b1->c1max = lb; - b2->c1min = lb+1; - break; - case 2: - lb = (b1->c2max + b1->c2min) / 2; - b1->c2max = lb; - b2->c2min = lb+1; - break; - } - /* Update stats for boxes */ - update_box(cinfo, b1); - update_box(cinfo, b2); - numboxes++; - } - return numboxes; -} - - -LOCAL(void) -compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor) -/* Compute representative color for a box, put it in colormap[icolor] */ -{ - /* Current algorithm: mean weighted by pixels (not colors) */ - /* Note it is important to get the rounding correct! */ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - histptr histp; - int c0,c1,c2; - int c0min,c0max,c1min,c1max,c2min,c2max; - long count; - long total = 0; - long c0total = 0; - long c1total = 0; - long c2total = 0; - - c0min = boxp->c0min; c0max = boxp->c0max; - c1min = boxp->c1min; c1max = boxp->c1max; - c2min = boxp->c2min; c2max = boxp->c2max; - - for (c0 = c0min; c0 <= c0max; c0++) - for (c1 = c1min; c1 <= c1max; c1++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++) { - if ((count = *histp++) != 0) { - total += count; - c0total += ((c0 << C0_SHIFT) + ((1<>1)) * count; - c1total += ((c1 << C1_SHIFT) + ((1<>1)) * count; - c2total += ((c2 << C2_SHIFT) + ((1<>1)) * count; - } - } - } - - cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total); - cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total); - cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total); -} - - -LOCAL(void) -select_colors (j_decompress_ptr cinfo, int desired_colors) -/* Master routine for color selection */ -{ - boxptr boxlist; - int numboxes; - int i; - - /* Allocate workspace for box list */ - boxlist = (boxptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(box)); - /* Initialize one box containing whole space */ - numboxes = 1; - boxlist[0].c0min = 0; - boxlist[0].c0max = MAXJSAMPLE >> C0_SHIFT; - boxlist[0].c1min = 0; - boxlist[0].c1max = MAXJSAMPLE >> C1_SHIFT; - boxlist[0].c2min = 0; - boxlist[0].c2max = MAXJSAMPLE >> C2_SHIFT; - /* Shrink it to actually-used volume and set its statistics */ - update_box(cinfo, & boxlist[0]); - /* Perform median-cut to produce final box list */ - numboxes = median_cut(cinfo, boxlist, numboxes, desired_colors); - /* Compute the representative color for each box, fill colormap */ - for (i = 0; i < numboxes; i++) - compute_color(cinfo, & boxlist[i], i); - cinfo->actual_number_of_colors = numboxes; - TRACEMS1(cinfo, 1, JTRC_QUANT_SELECTED, numboxes); -} - - -/* - * These routines are concerned with the time-critical task of mapping input - * colors to the nearest color in the selected colormap. - * - * We re-use the histogram space as an "inverse color map", essentially a - * cache for the results of nearest-color searches. All colors within a - * histogram cell will be mapped to the same colormap entry, namely the one - * closest to the cell's center. This may not be quite the closest entry to - * the actual input color, but it's almost as good. A zero in the cache - * indicates we haven't found the nearest color for that cell yet; the array - * is cleared to zeroes before starting the mapping pass. When we find the - * nearest color for a cell, its colormap index plus one is recorded in the - * cache for future use. The pass2 scanning routines call fill_inverse_cmap - * when they need to use an unfilled entry in the cache. - * - * Our method of efficiently finding nearest colors is based on the "locally - * sorted search" idea described by Heckbert and on the incremental distance - * calculation described by Spencer W. Thomas in chapter III.1 of Graphics - * Gems II (James Arvo, ed. Academic Press, 1991). Thomas points out that - * the distances from a given colormap entry to each cell of the histogram can - * be computed quickly using an incremental method: the differences between - * distances to adjacent cells themselves differ by a constant. This allows a - * fairly fast implementation of the "brute force" approach of computing the - * distance from every colormap entry to every histogram cell. Unfortunately, - * it needs a work array to hold the best-distance-so-far for each histogram - * cell (because the inner loop has to be over cells, not colormap entries). - * The work array elements have to be INT32s, so the work array would need - * 256Kb at our recommended precision. This is not feasible in DOS machines. - * - * To get around these problems, we apply Thomas' method to compute the - * nearest colors for only the cells within a small subbox of the histogram. - * The work array need be only as big as the subbox, so the memory usage - * problem is solved. Furthermore, we need not fill subboxes that are never - * referenced in pass2; many images use only part of the color gamut, so a - * fair amount of work is saved. An additional advantage of this - * approach is that we can apply Heckbert's locality criterion to quickly - * eliminate colormap entries that are far away from the subbox; typically - * three-fourths of the colormap entries are rejected by Heckbert's criterion, - * and we need not compute their distances to individual cells in the subbox. - * The speed of this approach is heavily influenced by the subbox size: too - * small means too much overhead, too big loses because Heckbert's criterion - * can't eliminate as many colormap entries. Empirically the best subbox - * size seems to be about 1/512th of the histogram (1/8th in each direction). - * - * Thomas' article also describes a refined method which is asymptotically - * faster than the brute-force method, but it is also far more complex and - * cannot efficiently be applied to small subboxes. It is therefore not - * useful for programs intended to be portable to DOS machines. On machines - * with plenty of memory, filling the whole histogram in one shot with Thomas' - * refined method might be faster than the present code --- but then again, - * it might not be any faster, and it's certainly more complicated. - */ - - -/* log2(histogram cells in update box) for each axis; this can be adjusted */ -#define BOX_C0_LOG (HIST_C0_BITS-3) -#define BOX_C1_LOG (HIST_C1_BITS-3) -#define BOX_C2_LOG (HIST_C2_BITS-3) - -#define BOX_C0_ELEMS (1<actual_number_of_colors; - int maxc0, maxc1, maxc2; - int centerc0, centerc1, centerc2; - int i, x, ncolors; - INT32 minmaxdist, min_dist, max_dist, tdist; - INT32 mindist[MAXNUMCOLORS]; /* min distance to colormap entry i */ - - /* Compute true coordinates of update box's upper corner and center. - * Actually we compute the coordinates of the center of the upper-corner - * histogram cell, which are the upper bounds of the volume we care about. - * Note that since ">>" rounds down, the "center" values may be closer to - * min than to max; hence comparisons to them must be "<=", not "<". - */ - maxc0 = minc0 + ((1 << BOX_C0_SHIFT) - (1 << C0_SHIFT)); - centerc0 = (minc0 + maxc0) >> 1; - maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT)); - centerc1 = (minc1 + maxc1) >> 1; - maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT)); - centerc2 = (minc2 + maxc2) >> 1; - - /* For each color in colormap, find: - * 1. its minimum squared-distance to any point in the update box - * (zero if color is within update box); - * 2. its maximum squared-distance to any point in the update box. - * Both of these can be found by considering only the corners of the box. - * We save the minimum distance for each color in mindist[]; - * only the smallest maximum distance is of interest. - */ - minmaxdist = 0x7FFFFFFFL; - - for (i = 0; i < numcolors; i++) { - /* We compute the squared-c0-distance term, then add in the other two. */ - x = GETJSAMPLE(cinfo->colormap[0][i]); - if (x < minc0) { - tdist = (x - minc0) * C0_SCALE; - min_dist = tdist*tdist; - tdist = (x - maxc0) * C0_SCALE; - max_dist = tdist*tdist; - } else if (x > maxc0) { - tdist = (x - maxc0) * C0_SCALE; - min_dist = tdist*tdist; - tdist = (x - minc0) * C0_SCALE; - max_dist = tdist*tdist; - } else { - /* within cell range so no contribution to min_dist */ - min_dist = 0; - if (x <= centerc0) { - tdist = (x - maxc0) * C0_SCALE; - max_dist = tdist*tdist; - } else { - tdist = (x - minc0) * C0_SCALE; - max_dist = tdist*tdist; - } - } - - x = GETJSAMPLE(cinfo->colormap[1][i]); - if (x < minc1) { - tdist = (x - minc1) * C1_SCALE; - min_dist += tdist*tdist; - tdist = (x - maxc1) * C1_SCALE; - max_dist += tdist*tdist; - } else if (x > maxc1) { - tdist = (x - maxc1) * C1_SCALE; - min_dist += tdist*tdist; - tdist = (x - minc1) * C1_SCALE; - max_dist += tdist*tdist; - } else { - /* within cell range so no contribution to min_dist */ - if (x <= centerc1) { - tdist = (x - maxc1) * C1_SCALE; - max_dist += tdist*tdist; - } else { - tdist = (x - minc1) * C1_SCALE; - max_dist += tdist*tdist; - } - } - - x = GETJSAMPLE(cinfo->colormap[2][i]); - if (x < minc2) { - tdist = (x - minc2) * C2_SCALE; - min_dist += tdist*tdist; - tdist = (x - maxc2) * C2_SCALE; - max_dist += tdist*tdist; - } else if (x > maxc2) { - tdist = (x - maxc2) * C2_SCALE; - min_dist += tdist*tdist; - tdist = (x - minc2) * C2_SCALE; - max_dist += tdist*tdist; - } else { - /* within cell range so no contribution to min_dist */ - if (x <= centerc2) { - tdist = (x - maxc2) * C2_SCALE; - max_dist += tdist*tdist; - } else { - tdist = (x - minc2) * C2_SCALE; - max_dist += tdist*tdist; - } - } - - mindist[i] = min_dist; /* save away the results */ - if (max_dist < minmaxdist) - minmaxdist = max_dist; - } - - /* Now we know that no cell in the update box is more than minmaxdist - * away from some colormap entry. Therefore, only colors that are - * within minmaxdist of some part of the box need be considered. - */ - ncolors = 0; - for (i = 0; i < numcolors; i++) { - if (mindist[i] <= minmaxdist) - colorlist[ncolors++] = (JSAMPLE) i; - } - return ncolors; -} - - -LOCAL(void) -find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, - int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[]) -/* Find the closest colormap entry for each cell in the update box, - * given the list of candidate colors prepared by find_nearby_colors. - * Return the indexes of the closest entries in the bestcolor[] array. - * This routine uses Thomas' incremental distance calculation method to - * find the distance from a colormap entry to successive cells in the box. - */ -{ - int ic0, ic1, ic2; - int i, icolor; - register INT32 * bptr; /* pointer into bestdist[] array */ - JSAMPLE * cptr; /* pointer into bestcolor[] array */ - INT32 dist0, dist1; /* initial distance values */ - register INT32 dist2; /* current distance in inner loop */ - INT32 xx0, xx1; /* distance increments */ - register INT32 xx2; - INT32 inc0, inc1, inc2; /* initial values for increments */ - /* This array holds the distance to the nearest-so-far color for each cell */ - INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; - - /* Initialize best-distance for each cell of the update box */ - bptr = bestdist; - for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--) - *bptr++ = 0x7FFFFFFFL; - - /* For each color selected by find_nearby_colors, - * compute its distance to the center of each cell in the box. - * If that's less than best-so-far, update best distance and color number. - */ - - /* Nominal steps between cell centers ("x" in Thomas article) */ -#define STEP_C0 ((1 << C0_SHIFT) * C0_SCALE) -#define STEP_C1 ((1 << C1_SHIFT) * C1_SCALE) -#define STEP_C2 ((1 << C2_SHIFT) * C2_SCALE) - - for (i = 0; i < numcolors; i++) { - icolor = GETJSAMPLE(colorlist[i]); - /* Compute (square of) distance from minc0/c1/c2 to this color */ - inc0 = (minc0 - GETJSAMPLE(cinfo->colormap[0][icolor])) * C0_SCALE; - dist0 = inc0*inc0; - inc1 = (minc1 - GETJSAMPLE(cinfo->colormap[1][icolor])) * C1_SCALE; - dist0 += inc1*inc1; - inc2 = (minc2 - GETJSAMPLE(cinfo->colormap[2][icolor])) * C2_SCALE; - dist0 += inc2*inc2; - /* Form the initial difference increments */ - inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0; - inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1; - inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2; - /* Now loop over all cells in box, updating distance per Thomas method */ - bptr = bestdist; - cptr = bestcolor; - xx0 = inc0; - for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) { - dist1 = dist0; - xx1 = inc1; - for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) { - dist2 = dist1; - xx2 = inc2; - for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) { - if (dist2 < *bptr) { - *bptr = dist2; - *cptr = (JSAMPLE) icolor; - } - dist2 += xx2; - xx2 += 2 * STEP_C2 * STEP_C2; - bptr++; - cptr++; - } - dist1 += xx1; - xx1 += 2 * STEP_C1 * STEP_C1; - } - dist0 += xx0; - xx0 += 2 * STEP_C0 * STEP_C0; - } - } -} - - -LOCAL(void) -fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2) -/* Fill the inverse-colormap entries in the update box that contains */ -/* histogram cell c0/c1/c2. (Only that one cell MUST be filled, but */ -/* we can fill as many others as we wish.) */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - int minc0, minc1, minc2; /* lower left corner of update box */ - int ic0, ic1, ic2; - register JSAMPLE * cptr; /* pointer into bestcolor[] array */ - register histptr cachep; /* pointer into main cache array */ - /* This array lists the candidate colormap indexes. */ - JSAMPLE colorlist[MAXNUMCOLORS]; - int numcolors; /* number of candidate colors */ - /* This array holds the actually closest colormap index for each cell. */ - JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; - - /* Convert cell coordinates to update box ID */ - c0 >>= BOX_C0_LOG; - c1 >>= BOX_C1_LOG; - c2 >>= BOX_C2_LOG; - - /* Compute true coordinates of update box's origin corner. - * Actually we compute the coordinates of the center of the corner - * histogram cell, which are the lower bounds of the volume we care about. - */ - minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1); - minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1); - minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1); - - /* Determine which colormap entries are close enough to be candidates - * for the nearest entry to some cell in the update box. - */ - numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist); - - /* Determine the actually nearest colors. */ - find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist, - bestcolor); - - /* Save the best color numbers (plus 1) in the main cache array */ - c0 <<= BOX_C0_LOG; /* convert ID back to base cell indexes */ - c1 <<= BOX_C1_LOG; - c2 <<= BOX_C2_LOG; - cptr = bestcolor; - for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) { - for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) { - cachep = & histogram[c0+ic0][c1+ic1][c2]; - for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) { - *cachep++ = (histcell) (GETJSAMPLE(*cptr++) + 1); - } - } - } -} - - -/* - * Map some rows of pixels to the output colormapped representation. - */ - -METHODDEF(void) -pass2_no_dither (j_decompress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) -/* This version performs no dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - register JSAMPROW inptr, outptr; - register histptr cachep; - register int c0, c1, c2; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - - for (row = 0; row < num_rows; row++) { - inptr = input_buf[row]; - outptr = output_buf[row]; - for (col = width; col > 0; col--) { - /* get pixel value and index into the cache */ - c0 = GETJSAMPLE(*inptr++) >> C0_SHIFT; - c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT; - c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT; - cachep = & histogram[c0][c1][c2]; - /* If we have not seen this color before, find nearest colormap entry */ - /* and update the cache */ - if (*cachep == 0) - fill_inverse_cmap(cinfo, c0,c1,c2); - /* Now emit the colormap index for this cell */ - *outptr++ = (JSAMPLE) (*cachep - 1); - } - } -} - - -METHODDEF(void) -pass2_fs_dither (j_decompress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) -/* This version performs Floyd-Steinberg dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - register LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */ - LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */ - LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */ - register FSERRPTR errorptr; /* => fserrors[] at column before current */ - JSAMPROW inptr; /* => current input pixel */ - JSAMPROW outptr; /* => current output pixel */ - histptr cachep; - int dir; /* +1 or -1 depending on direction */ - int dir3; /* 3*dir, for advancing inptr & errorptr */ - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - JSAMPLE *range_limit = cinfo->sample_range_limit; - int *error_limit = cquantize->error_limiter; - JSAMPROW colormap0 = cinfo->colormap[0]; - JSAMPROW colormap1 = cinfo->colormap[1]; - JSAMPROW colormap2 = cinfo->colormap[2]; - SHIFT_TEMPS - - for (row = 0; row < num_rows; row++) { - inptr = input_buf[row]; - outptr = output_buf[row]; - if (cquantize->on_odd_row) { - /* work right to left in this row */ - inptr += (width-1) * 3; /* so point to rightmost pixel */ - outptr += width-1; - dir = -1; - dir3 = -3; - errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */ - cquantize->on_odd_row = FALSE; /* flip for next time */ - } else { - /* work left to right in this row */ - dir = 1; - dir3 = 3; - errorptr = cquantize->fserrors; /* => entry before first real column */ - cquantize->on_odd_row = TRUE; /* flip for next time */ - } - /* Preset error values: no error propagated to first pixel from left */ - cur0 = cur1 = cur2 = 0; - /* and no error propagated to row below yet */ - belowerr0 = belowerr1 = belowerr2 = 0; - bpreverr0 = bpreverr1 = bpreverr2 = 0; - - for (col = width; col > 0; col--) { - /* curN holds the error propagated from the previous pixel on the - * current line. Add the error propagated from the previous line - * to form the complete error correction term for this pixel, and - * round the error term (which is expressed * 16) to an integer. - * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct - * for either sign of the error value. - * Note: errorptr points to *previous* column's array entry. - */ - cur0 = RIGHT_SHIFT(cur0 + errorptr[dir3+0] + 8, 4); - cur1 = RIGHT_SHIFT(cur1 + errorptr[dir3+1] + 8, 4); - cur2 = RIGHT_SHIFT(cur2 + errorptr[dir3+2] + 8, 4); - /* Limit the error using transfer function set by init_error_limit. - * See comments with init_error_limit for rationale. - */ - cur0 = error_limit[cur0]; - cur1 = error_limit[cur1]; - cur2 = error_limit[cur2]; - /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. - * The maximum error is +- MAXJSAMPLE (or less with error limiting); - * this sets the required size of the range_limit array. - */ - cur0 += GETJSAMPLE(inptr[0]); - cur1 += GETJSAMPLE(inptr[1]); - cur2 += GETJSAMPLE(inptr[2]); - cur0 = GETJSAMPLE(range_limit[cur0]); - cur1 = GETJSAMPLE(range_limit[cur1]); - cur2 = GETJSAMPLE(range_limit[cur2]); - /* Index into the cache with adjusted pixel value */ - cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT]; - /* If we have not seen this color before, find nearest colormap */ - /* entry and update the cache */ - if (*cachep == 0) - fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT); - /* Now emit the colormap index for this cell */ - { register int pixcode = *cachep - 1; - *outptr = (JSAMPLE) pixcode; - /* Compute representation error for this pixel */ - cur0 -= GETJSAMPLE(colormap0[pixcode]); - cur1 -= GETJSAMPLE(colormap1[pixcode]); - cur2 -= GETJSAMPLE(colormap2[pixcode]); - } - /* Compute error fractions to be propagated to adjacent pixels. - * Add these into the running sums, and simultaneously shift the - * next-line error sums left by 1 column. - */ - { register LOCFSERROR bnexterr, delta; - - bnexterr = cur0; /* Process component 0 */ - delta = cur0 * 2; - cur0 += delta; /* form error * 3 */ - errorptr[0] = (FSERROR) (bpreverr0 + cur0); - cur0 += delta; /* form error * 5 */ - bpreverr0 = belowerr0 + cur0; - belowerr0 = bnexterr; - cur0 += delta; /* form error * 7 */ - bnexterr = cur1; /* Process component 1 */ - delta = cur1 * 2; - cur1 += delta; /* form error * 3 */ - errorptr[1] = (FSERROR) (bpreverr1 + cur1); - cur1 += delta; /* form error * 5 */ - bpreverr1 = belowerr1 + cur1; - belowerr1 = bnexterr; - cur1 += delta; /* form error * 7 */ - bnexterr = cur2; /* Process component 2 */ - delta = cur2 * 2; - cur2 += delta; /* form error * 3 */ - errorptr[2] = (FSERROR) (bpreverr2 + cur2); - cur2 += delta; /* form error * 5 */ - bpreverr2 = belowerr2 + cur2; - belowerr2 = bnexterr; - cur2 += delta; /* form error * 7 */ - } - /* At this point curN contains the 7/16 error value to be propagated - * to the next pixel on the current line, and all the errors for the - * next line have been shifted over. We are therefore ready to move on. - */ - inptr += dir3; /* Advance pixel pointers to next column */ - outptr += dir; - errorptr += dir3; /* advance errorptr to current column */ - } - /* Post-loop cleanup: we must unload the final error values into the - * final fserrors[] entry. Note we need not unload belowerrN because - * it is for the dummy column before or after the actual array. - */ - errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */ - errorptr[1] = (FSERROR) bpreverr1; - errorptr[2] = (FSERROR) bpreverr2; - } -} - - -/* - * Initialize the error-limiting transfer function (lookup table). - * The raw F-S error computation can potentially compute error values of up to - * +- MAXJSAMPLE. But we want the maximum correction applied to a pixel to be - * much less, otherwise obviously wrong pixels will be created. (Typical - * effects include weird fringes at color-area boundaries, isolated bright - * pixels in a dark area, etc.) The standard advice for avoiding this problem - * is to ensure that the "corners" of the color cube are allocated as output - * colors; then repeated errors in the same direction cannot cause cascading - * error buildup. However, that only prevents the error from getting - * completely out of hand; Aaron Giles reports that error limiting improves - * the results even with corner colors allocated. - * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty - * well, but the smoother transfer function used below is even better. Thanks - * to Aaron Giles for this idea. - */ - -LOCAL(void) -init_error_limit (j_decompress_ptr cinfo) -/* Allocate and fill in the error_limiter table */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - int * table; - int in, out; - - table = (int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE*2+1) * SIZEOF(int)); - table += MAXJSAMPLE; /* so can index -MAXJSAMPLE .. +MAXJSAMPLE */ - cquantize->error_limiter = table; - -#define STEPSIZE ((MAXJSAMPLE+1)/16) - /* Map errors 1:1 up to +- MAXJSAMPLE/16 */ - out = 0; - for (in = 0; in < STEPSIZE; in++, out++) { - table[in] = out; table[-in] = -out; - } - /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */ - for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) { - table[in] = out; table[-in] = -out; - } - /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */ - for (; in <= MAXJSAMPLE; in++) { - table[in] = out; table[-in] = -out; - } -#undef STEPSIZE -} - - -/* - * Finish up at the end of each pass. - */ - -METHODDEF(void) -finish_pass1 (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - - /* Select the representative colors and fill in cinfo->colormap */ - cinfo->colormap = cquantize->sv_colormap; - select_colors(cinfo, cquantize->desired); - /* Force next pass to zero the color index table */ - cquantize->needs_zeroed = TRUE; -} - - -METHODDEF(void) -finish_pass2 (j_decompress_ptr cinfo) -{ - /* no work */ -} - - -/* - * Initialize for each processing pass. - */ - -METHODDEF(void) -start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - int i; - - /* Only F-S dithering or no dithering is supported. */ - /* If user asks for ordered dither, give him F-S. */ - if (cinfo->dither_mode != JDITHER_NONE) - cinfo->dither_mode = JDITHER_FS; - - if (is_pre_scan) { - /* Set up method pointers */ - cquantize->pub.color_quantize = prescan_quantize; - cquantize->pub.finish_pass = finish_pass1; - cquantize->needs_zeroed = TRUE; /* Always zero histogram */ - } else { - /* Set up method pointers */ - if (cinfo->dither_mode == JDITHER_FS) - cquantize->pub.color_quantize = pass2_fs_dither; - else - cquantize->pub.color_quantize = pass2_no_dither; - cquantize->pub.finish_pass = finish_pass2; - - /* Make sure color count is acceptable */ - i = cinfo->actual_number_of_colors; - if (i < 1) - ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 1); - if (i > MAXNUMCOLORS) - ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); - - if (cinfo->dither_mode == JDITHER_FS) { - size_t arraysize = ((size_t) cinfo->output_width + (size_t) 2) - * (3 * SIZEOF(FSERROR)); - /* Allocate Floyd-Steinberg workspace if we didn't already. */ - if (cquantize->fserrors == NULL) - cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); - /* Initialize the propagated errors to zero. */ - FMEMZERO((void FAR *) cquantize->fserrors, arraysize); - /* Make the error-limit table if we didn't already. */ - if (cquantize->error_limiter == NULL) - init_error_limit(cinfo); - cquantize->on_odd_row = FALSE; - } - - } - /* Zero the histogram or inverse color map, if necessary */ - if (cquantize->needs_zeroed) { - for (i = 0; i < HIST_C0_ELEMS; i++) { - FMEMZERO((void FAR *) histogram[i], - HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); - } - cquantize->needs_zeroed = FALSE; - } -} - - -/* - * Switch to a new external colormap between output passes. - */ - -METHODDEF(void) -new_color_map_2_quant (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - - /* Reset the inverse color map */ - cquantize->needs_zeroed = TRUE; -} - - -/* - * Module initialization routine for 2-pass color quantization. - */ - -GLOBAL(void) -jinit_2pass_quantizer (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize; - int i; - - cquantize = (my_cquantize_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_cquantizer)); - cinfo->cquantize = &cquantize->pub; - cquantize->pub.start_pass = start_pass_2_quant; - cquantize->pub.new_color_map = new_color_map_2_quant; - cquantize->fserrors = NULL; /* flag optional arrays not allocated */ - cquantize->error_limiter = NULL; - - /* Make sure jdmaster didn't give me a case I can't handle */ - if (cinfo->out_color_components != 3) - ERREXIT(cinfo, JERR_NOTIMPL); - - /* Allocate the histogram/inverse colormap storage */ - cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, HIST_C0_ELEMS * SIZEOF(hist2d)); - for (i = 0; i < HIST_C0_ELEMS; i++) { - cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); - } - cquantize->needs_zeroed = TRUE; /* histogram is garbage now */ - - /* Allocate storage for the completed colormap, if required. - * We do this now since it is FAR storage and may affect - * the memory manager's space calculations. - */ - if (cinfo->enable_2pass_quant) { - /* Make sure color count is acceptable */ - int desired = cinfo->desired_number_of_colors; - /* Lower bound on # of colors ... somewhat arbitrary as long as > 0 */ - if (desired < 8) - ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 8); - /* Make sure colormap indexes can be represented by JSAMPLEs */ - if (desired > MAXNUMCOLORS) - ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); - cquantize->sv_colormap = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) desired, (JDIMENSION) 3); - cquantize->desired = desired; - } else - cquantize->sv_colormap = NULL; - - /* Only F-S dithering or no dithering is supported. */ - /* If user asks for ordered dither, give him F-S. */ - if (cinfo->dither_mode != JDITHER_NONE) - cinfo->dither_mode = JDITHER_FS; - - /* Allocate Floyd-Steinberg workspace if necessary. - * This isn't really needed until pass 2, but again it is FAR storage. - * Although we will cope with a later change in dither_mode, - * we do not promise to honor max_memory_to_use if dither_mode changes. - */ - if (cinfo->dither_mode == JDITHER_FS) { - cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - ((size_t) cinfo->output_width + (size_t) 2) * (3 * SIZEOF(FSERROR))); - /* Might as well create the error-limiting table too. */ - init_error_limit(cinfo); - } -} - -#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/jutils.c b/thirdparty/jpeg-9e/jutils.c deleted file mode 100644 index 31e16df..0000000 --- a/thirdparty/jpeg-9e/jutils.c +++ /dev/null @@ -1,224 +0,0 @@ -/* - * jutils.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2009-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains tables and miscellaneous utility routines needed - * for both compression and decompression. - * Note we prefix all global names with "j" to minimize conflicts with - * a surrounding application. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * jpeg_zigzag_order[i] is the zigzag-order position of the i'th element - * of a DCT block read in natural order (left to right, top to bottom). - */ - -#if 0 /* This table is not actually needed in v6a */ - -const int jpeg_zigzag_order[DCTSIZE2] = { - 0, 1, 5, 6, 14, 15, 27, 28, - 2, 4, 7, 13, 16, 26, 29, 42, - 3, 8, 12, 17, 25, 30, 41, 43, - 9, 11, 18, 24, 31, 40, 44, 53, - 10, 19, 23, 32, 39, 45, 52, 54, - 20, 22, 33, 38, 46, 51, 55, 60, - 21, 34, 37, 47, 50, 56, 59, 61, - 35, 36, 48, 49, 57, 58, 62, 63 -}; - -#endif - -/* - * jpeg_natural_order[i] is the natural-order position of the i'th element - * of zigzag order. - * - * When reading corrupted data, the Huffman decoders could attempt - * to reference an entry beyond the end of this array (if the decoded - * zero run length reaches past the end of the block). To prevent - * wild stores without adding an inner-loop test, we put some extra - * "63"s after the real entries. This will cause the extra coefficient - * to be stored in location 63 of the block, not somewhere random. - * The worst case would be a run-length of 15, which means we need 16 - * fake entries. - */ - -const int jpeg_natural_order[DCTSIZE2+16] = { - 0, 1, 8, 16, 9, 2, 3, 10, - 17, 24, 32, 25, 18, 11, 4, 5, - 12, 19, 26, 33, 40, 48, 41, 34, - 27, 20, 13, 6, 7, 14, 21, 28, - 35, 42, 49, 56, 57, 50, 43, 36, - 29, 22, 15, 23, 30, 37, 44, 51, - 58, 59, 52, 45, 38, 31, 39, 46, - 53, 60, 61, 54, 47, 55, 62, 63, - 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ - 63, 63, 63, 63, 63, 63, 63, 63 -}; - -const int jpeg_natural_order7[7*7+16] = { - 0, 1, 8, 16, 9, 2, 3, 10, - 17, 24, 32, 25, 18, 11, 4, 5, - 12, 19, 26, 33, 40, 48, 41, 34, - 27, 20, 13, 6, 14, 21, 28, 35, - 42, 49, 50, 43, 36, 29, 22, 30, - 37, 44, 51, 52, 45, 38, 46, 53, - 54, - 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ - 63, 63, 63, 63, 63, 63, 63, 63 -}; - -const int jpeg_natural_order6[6*6+16] = { - 0, 1, 8, 16, 9, 2, 3, 10, - 17, 24, 32, 25, 18, 11, 4, 5, - 12, 19, 26, 33, 40, 41, 34, 27, - 20, 13, 21, 28, 35, 42, 43, 36, - 29, 37, 44, 45, - 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ - 63, 63, 63, 63, 63, 63, 63, 63 -}; - -const int jpeg_natural_order5[5*5+16] = { - 0, 1, 8, 16, 9, 2, 3, 10, - 17, 24, 32, 25, 18, 11, 4, 12, - 19, 26, 33, 34, 27, 20, 28, 35, - 36, - 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ - 63, 63, 63, 63, 63, 63, 63, 63 -}; - -const int jpeg_natural_order4[4*4+16] = { - 0, 1, 8, 16, 9, 2, 3, 10, - 17, 24, 25, 18, 11, 19, 26, 27, - 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ - 63, 63, 63, 63, 63, 63, 63, 63 -}; - -const int jpeg_natural_order3[3*3+16] = { - 0, 1, 8, 16, 9, 2, 10, 17, - 18, - 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ - 63, 63, 63, 63, 63, 63, 63, 63 -}; - -const int jpeg_natural_order2[2*2+16] = { - 0, 1, 8, 9, - 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ - 63, 63, 63, 63, 63, 63, 63, 63 -}; - - -/* - * Arithmetic utilities - */ - -GLOBAL(long) -jdiv_round_up (long a, long b) -/* Compute a/b rounded up to next integer, ie, ceil(a/b) */ -/* Assumes a >= 0, b > 0 */ -{ - return (a + b - 1L) / b; -} - - -GLOBAL(long) -jround_up (long a, long b) -/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */ -/* Assumes a >= 0, b > 0 */ -{ - a += b - 1L; - return a - (a % b); -} - - -/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays - * and coefficient-block arrays. This won't work on 80x86 because the arrays - * are FAR and we're assuming a small-pointer memory model. However, some - * DOS compilers provide far-pointer versions of memcpy() and memset() even - * in the small-model libraries. These will be used if USE_FMEM is defined. - * Otherwise, the routines below do it the hard way. (The performance cost - * is not all that great, because these routines aren't very heavily used.) - */ - -#ifndef NEED_FAR_POINTERS /* normal case, same as regular macro */ -#define FMEMCOPY(dest,src,size) MEMCOPY(dest,src,size) -#else /* 80x86 case, define if we can */ -#ifdef USE_FMEM -#define FMEMCOPY(dest,src,size) _fmemcpy((void FAR *)(dest), (const void FAR *)(src), (size_t)(size)) -#else -/* This function is for use by the FMEMZERO macro defined in jpegint.h. - * Do not call this function directly, use the FMEMZERO macro instead. - */ -GLOBAL(void) -jzero_far (void FAR * target, size_t bytestozero) -/* Zero out a chunk of FAR memory. */ -/* This might be sample-array data, block-array data, or alloc_large data. */ -{ - register char FAR * ptr = (char FAR *) target; - register size_t count; - - for (count = bytestozero; count > 0; count--) { - *ptr++ = 0; - } -} -#endif -#endif - - -GLOBAL(void) -jcopy_sample_rows (JSAMPARRAY input_array, - JSAMPARRAY output_array, - int num_rows, JDIMENSION num_cols) -/* Copy some rows of samples from one place to another. - * num_rows rows are copied from *input_array++ to *output_array++; - * these areas may overlap for duplication. - * The source and destination arrays must be at least as wide as num_cols. - */ -{ - register JSAMPROW inptr, outptr; -#ifdef FMEMCOPY - register size_t count = (size_t) num_cols * SIZEOF(JSAMPLE); -#else - register JDIMENSION count; -#endif - register int row; - - for (row = num_rows; row > 0; row--) { - inptr = *input_array++; - outptr = *output_array++; -#ifdef FMEMCOPY - FMEMCOPY(outptr, inptr, count); -#else - for (count = num_cols; count > 0; count--) - *outptr++ = *inptr++; /* needn't bother with GETJSAMPLE() here */ -#endif - } -} - - -GLOBAL(void) -jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row, - JDIMENSION num_blocks) -/* Copy a row of coefficient blocks from one place to another. */ -{ -#ifdef FMEMCOPY - FMEMCOPY(output_row, input_row, (size_t) num_blocks * (DCTSIZE2 * SIZEOF(JCOEF))); -#else - register JCOEFPTR inptr, outptr; - register long count; - - inptr = (JCOEFPTR) input_row; - outptr = (JCOEFPTR) output_row; - for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) { - *outptr++ = *inptr++; - } -#endif -} diff --git a/thirdparty/jpeg-9e/jversion.h b/thirdparty/jpeg-9e/jversion.h deleted file mode 100644 index 17134b7..0000000 --- a/thirdparty/jpeg-9e/jversion.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * jversion.h - * - * Copyright (C) 1991-2022, Thomas G. Lane, Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains software version identification. - */ - - -#define JVERSION "9e 16-Jan-2022" - -#define JCOPYRIGHT "Copyright (C) 2022, Thomas G. Lane, Guido Vollbeding" diff --git a/thirdparty/jpeg-9e/libjpeg.map b/thirdparty/jpeg-9e/libjpeg.map deleted file mode 100644 index fa70b1f..0000000 --- a/thirdparty/jpeg-9e/libjpeg.map +++ /dev/null @@ -1,4 +0,0 @@ -LIBJPEG_9.0 { - global: - *; -}; diff --git a/thirdparty/jpeg-9e/libjpeg.pc b/thirdparty/jpeg-9e/libjpeg.pc deleted file mode 100644 index 8057c1d..0000000 --- a/thirdparty/jpeg-9e/libjpeg.pc +++ /dev/null @@ -1,10 +0,0 @@ -prefix=/home/scott/code/gui/installed/linux -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: libjpeg -Description: Reads and writes JPEG files -Version: 9.5.0 -Libs: -L${libdir} -ljpeg -Cflags: -I${includedir} diff --git a/thirdparty/jpeg-9e/libjpeg.pc.in b/thirdparty/jpeg-9e/libjpeg.pc.in deleted file mode 100644 index d8e738f..0000000 --- a/thirdparty/jpeg-9e/libjpeg.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libjpeg -Description: Reads and writes JPEG files -Version: @JPEG_LIB_VERSION_MAJOR@.@JPEG_LIB_VERSION_MINOR@.0 -Libs: -L${libdir} -ljpeg -Cflags: -I${includedir} diff --git a/thirdparty/jpeg-9e/libjpeg.txt b/thirdparty/jpeg-9e/libjpeg.txt deleted file mode 100644 index 546a86e..0000000 --- a/thirdparty/jpeg-9e/libjpeg.txt +++ /dev/null @@ -1,3110 +0,0 @@ -USING THE IJG JPEG LIBRARY - -Copyright (C) 1994-2019, Thomas G. Lane, Guido Vollbeding. -This file is part of the Independent JPEG Group's software. -For conditions of distribution and use, see the accompanying README file. - - -This file describes how to use the IJG JPEG library within an application -program. Read it if you want to write a program that uses the library. - -The file example.c provides heavily commented skeleton code for calling the -JPEG library. Also see jpeglib.h (the include file to be used by application -programs) for full details about data structures and function parameter lists. -The library source code, of course, is the ultimate reference. - -Note that there have been *major* changes from the application interface -presented by IJG version 4 and earlier versions. The old design had several -inherent limitations, and it had accumulated a lot of cruft as we added -features while trying to minimize application-interface changes. We have -sacrificed backward compatibility in the version 5 rewrite, but we think the -improvements justify this. - - -TABLE OF CONTENTS ------------------ - -Overview: - Functions provided by the library - Outline of typical usage -Basic library usage: - Data formats - Compression details - Decompression details - Mechanics of usage: include files, linking, etc -Advanced features: - Compression parameter selection - Decompression parameter selection - Special color spaces - Error handling - Compressed data handling (source and destination managers) - I/O suspension - Progressive JPEG support - Buffered-image mode - Abbreviated datastreams and multiple images - Special markers - Raw (downsampled) image data - Really raw data: DCT coefficients - Progress monitoring - Memory management - Memory usage - Library compile-time options - Portability considerations - Notes for MS-DOS implementors - -You should read at least the overview and basic usage sections before trying -to program with the library. The sections on advanced features can be read -if and when you need them. - - -OVERVIEW -======== - -Functions provided by the library ---------------------------------- - -The IJG JPEG library provides C code to read and write JPEG-compressed image -files. The surrounding application program receives or supplies image data a -scanline at a time, using a straightforward uncompressed image format. All -details of color conversion and other preprocessing/postprocessing can be -handled by the library. - -The library includes a substantial amount of code that is not covered by the -JPEG standard but is necessary for typical applications of JPEG. These -functions preprocess the image before JPEG compression or postprocess it after -decompression. They include colorspace conversion, downsampling/upsampling, -and color quantization. The application indirectly selects use of this code -by specifying the format in which it wishes to supply or receive image data. -For example, if colormapped output is requested, then the decompression -library automatically invokes color quantization. - -A wide range of quality vs. speed tradeoffs are possible in JPEG processing, -and even more so in decompression postprocessing. The decompression library -provides multiple implementations that cover most of the useful tradeoffs, -ranging from very-high-quality down to fast-preview operation. On the -compression side we have generally not provided low-quality choices, since -compression is normally less time-critical. It should be understood that the -low-quality modes may not meet the JPEG standard's accuracy requirements; -nonetheless, they are useful for viewers. - -A word about functions *not* provided by the library. We handle a subset of -the ISO JPEG standard; most baseline, extended-sequential, and progressive -JPEG processes are supported. (Our subset includes all features now in common -use.) Unsupported ISO options include: - * Hierarchical storage - * Lossless JPEG - * DNL marker - * Nonintegral subsampling ratios -We support 8-bit to 12-bit data precision, but this is a compile-time choice -rather than a run-time choice; hence it is difficult to use different -precisions in a single application. - -By itself, the library handles only interchange JPEG datastreams --- in -particular the widely used JFIF file format. The library can be used by -surrounding code to process interchange or abbreviated JPEG datastreams that -are embedded in more complex file formats. (For example, this library is -used by the free LIBTIFF library to support JPEG compression in TIFF.) - - -Outline of typical usage ------------------------- - -The rough outline of a JPEG compression operation is: - - Allocate and initialize a JPEG compression object - Specify the destination for the compressed data (eg, a file) - Set parameters for compression, including image size & colorspace - jpeg_start_compress(...); - while (scan lines remain to be written) - jpeg_write_scanlines(...); - jpeg_finish_compress(...); - Release the JPEG compression object - -A JPEG compression object holds parameters and working state for the JPEG -library. We make creation/destruction of the object separate from starting -or finishing compression of an image; the same object can be re-used for a -series of image compression operations. This makes it easy to re-use the -same parameter settings for a sequence of images. Re-use of a JPEG object -also has important implications for processing abbreviated JPEG datastreams, -as discussed later. - -The image data to be compressed is supplied to jpeg_write_scanlines() from -in-memory buffers. If the application is doing file-to-file compression, -reading image data from the source file is the application's responsibility. -The library emits compressed data by calling a "data destination manager", -which typically will write the data into a file; but the application can -provide its own destination manager to do something else. - -Similarly, the rough outline of a JPEG decompression operation is: - - Allocate and initialize a JPEG decompression object - Specify the source of the compressed data (eg, a file) - Call jpeg_read_header() to obtain image info - Set parameters for decompression - jpeg_start_decompress(...); - while (scan lines remain to be read) - jpeg_read_scanlines(...); - jpeg_finish_decompress(...); - Release the JPEG decompression object - -This is comparable to the compression outline except that reading the -datastream header is a separate step. This is helpful because information -about the image's size, colorspace, etc is available when the application -selects decompression parameters. For example, the application can choose an -output scaling ratio that will fit the image into the available screen size. - -The decompression library obtains compressed data by calling a data source -manager, which typically will read the data from a file; but other behaviors -can be obtained with a custom source manager. Decompressed data is delivered -into in-memory buffers passed to jpeg_read_scanlines(). - -It is possible to abort an incomplete compression or decompression operation -by calling jpeg_abort(); or, if you do not need to retain the JPEG object, -simply release it by calling jpeg_destroy(). - -JPEG compression and decompression objects are two separate struct types. -However, they share some common fields, and certain routines such as -jpeg_destroy() can work on either type of object. - -The JPEG library has no static variables: all state is in the compression -or decompression object. Therefore it is possible to process multiple -compression and decompression operations concurrently, using multiple JPEG -objects. - -Both compression and decompression can be done in an incremental memory-to- -memory fashion, if suitable source/destination managers are used. See the -section on "I/O suspension" for more details. - - -BASIC LIBRARY USAGE -=================== - -Data formats ------------- - -Before diving into procedural details, it is helpful to understand the -image data format that the JPEG library expects or returns. - -The standard input image format is a rectangular array of pixels, with each -pixel having the same number of "component" or "sample" values (color -channels). You must specify how many components there are and the colorspace -interpretation of the components. Most applications will use RGB data -(three components per pixel) or grayscale data (one component per pixel). -PLEASE NOTE THAT RGB DATA IS THREE SAMPLES PER PIXEL, GRAYSCALE ONLY ONE. -A remarkable number of people manage to miss this, only to find that their -programs don't work with grayscale JPEG files. - -There is no provision for colormapped input. JPEG files are always full-color -or full grayscale (or sometimes another colorspace such as CMYK). You can -feed in a colormapped image by expanding it to full-color format. However -JPEG often doesn't work very well with source data that has been colormapped, -because of dithering noise. This is discussed in more detail in the JPEG FAQ -and the other references mentioned in the README file. - -Pixels are stored by scanlines, with each scanline running from left to -right. The component values for each pixel are adjacent in the row; for -example, R,G,B,R,G,B,R,G,B,... for 24-bit RGB color. Each scanline is an -array of data type JSAMPLE --- which is typically "unsigned char", unless -you've changed jmorecfg.h. (You can also change the RGB pixel layout, say -to B,G,R order, by modifying jmorecfg.h. But see the restrictions listed in -that file before doing so.) - -A 2-D array of pixels is formed by making a list of pointers to the starts of -scanlines; so the scanlines need not be physically adjacent in memory. Even -if you process just one scanline at a time, you must make a one-element -pointer array to conform to this structure. Pointers to JSAMPLE rows are of -type JSAMPROW, and the pointer to the pointer array is of type JSAMPARRAY. - -The library accepts or supplies one or more complete scanlines per call. -It is not possible to process part of a row at a time. Scanlines are always -processed top-to-bottom. You can process an entire image in one call if you -have it all in memory, but usually it's simplest to process one scanline at -a time. - -For best results, source data values should have the precision specified by -BITS_IN_JSAMPLE (normally 8 bits). For instance, if you choose to compress -data that's only 6 bits/channel, you should left-justify each value in a -byte before passing it to the compressor. If you need to compress data -that has more than 8 bits/channel, compile with BITS_IN_JSAMPLE = 9 to 12. -(See "Library compile-time options", later.) - - -The data format returned by the decompressor is the same in all details, -except that colormapped output is supported. (Again, a JPEG file is never -colormapped. But you can ask the decompressor to perform on-the-fly color -quantization to deliver colormapped output.) If you request colormapped -output then the returned data array contains a single JSAMPLE per pixel; -its value is an index into a color map. The color map is represented as -a 2-D JSAMPARRAY in which each row holds the values of one color component, -that is, colormap[i][j] is the value of the i'th color component for pixel -value (map index) j. Note that since the colormap indexes are stored in -JSAMPLEs, the maximum number of colors is limited by the size of JSAMPLE -(ie, at most 256 colors for an 8-bit JPEG library). - - -Compression details -------------------- - -Here we revisit the JPEG compression outline given in the overview. - -1. Allocate and initialize a JPEG compression object. - -A JPEG compression object is a "struct jpeg_compress_struct". (It also has -a bunch of subsidiary structures which are allocated via malloc(), but the -application doesn't control those directly.) This struct can be just a local -variable in the calling routine, if a single routine is going to execute the -whole JPEG compression sequence. Otherwise it can be static or allocated -from malloc(). - -You will also need a structure representing a JPEG error handler. The part -of this that the library cares about is a "struct jpeg_error_mgr". If you -are providing your own error handler, you'll typically want to embed the -jpeg_error_mgr struct in a larger structure; this is discussed later under -"Error handling". For now we'll assume you are just using the default error -handler. The default error handler will print JPEG error/warning messages -on stderr, and it will call exit() if a fatal error occurs. - -You must initialize the error handler structure, store a pointer to it into -the JPEG object's "err" field, and then call jpeg_create_compress() to -initialize the rest of the JPEG object. - -Typical code for this step, if you are using the default error handler, is - - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; - ... - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_compress(&cinfo); - -jpeg_create_compress allocates a small amount of memory, so it could fail -if you are out of memory. In that case it will exit via the error handler; -that's why the error handler must be initialized first. - - -2. Specify the destination for the compressed data (eg, a file). - -As previously mentioned, the JPEG library delivers compressed data to a -"data destination" module. The library includes one data destination -module which knows how to write to a stdio stream. You can use your own -destination module if you want to do something else, as discussed later. - -If you use the standard destination module, you must open the target stdio -stream beforehand. Typical code for this step looks like: - - FILE * outfile; - ... - if ((outfile = fopen(filename, "wb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - exit(1); - } - jpeg_stdio_dest(&cinfo, outfile); - -where the last line invokes the standard destination module. - -WARNING: it is critical that the binary compressed data be delivered to the -output file unchanged. On non-Unix systems the stdio library may perform -newline translation or otherwise corrupt binary data. To suppress this -behavior, you may need to use a "b" option to fopen (as shown above), or use -setmode() or another routine to put the stdio stream in binary mode. See -cjpeg.c and djpeg.c for code that has been found to work on many systems. - -You can select the data destination after setting other parameters (step 3), -if that's more convenient. You may not change the destination between -calling jpeg_start_compress() and jpeg_finish_compress(). - - -3. Set parameters for compression, including image size & colorspace. - -You must supply information about the source image by setting the following -fields in the JPEG object (cinfo structure): - - image_width Width of image, in pixels - image_height Height of image, in pixels - input_components Number of color channels (samples per pixel) - in_color_space Color space of source image - -The image dimensions are, hopefully, obvious. JPEG supports image dimensions -of 1 to 64K pixels in either direction. The input color space is typically -RGB or grayscale, and input_components is 3 or 1 accordingly. (See "Special -color spaces", later, for more info.) The in_color_space field must be -assigned one of the J_COLOR_SPACE enum constants, typically JCS_RGB or -JCS_GRAYSCALE. - -JPEG has a large number of compression parameters that determine how the -image is encoded. Most applications don't need or want to know about all -these parameters. You can set all the parameters to reasonable defaults by -calling jpeg_set_defaults(); then, if there are particular values you want -to change, you can do so after that. The "Compression parameter selection" -section tells about all the parameters. - -You must set in_color_space correctly before calling jpeg_set_defaults(), -because the defaults depend on the source image colorspace. However the -other three source image parameters need not be valid until you call -jpeg_start_compress(). There's no harm in calling jpeg_set_defaults() more -than once, if that happens to be convenient. - -Typical code for a 24-bit RGB source image is - - cinfo.image_width = Width; /* image width and height, in pixels */ - cinfo.image_height = Height; - cinfo.input_components = 3; /* # of color components per pixel */ - cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ - - jpeg_set_defaults(&cinfo); - /* Make optional parameter settings here */ - - -4. jpeg_start_compress(...); - -After you have established the data destination and set all the necessary -source image info and other parameters, call jpeg_start_compress() to begin -a compression cycle. This will initialize internal state, allocate working -storage, and emit the first few bytes of the JPEG datastream header. - -Typical code: - - jpeg_start_compress(&cinfo, TRUE); - -The "TRUE" parameter ensures that a complete JPEG interchange datastream -will be written. This is appropriate in most cases. If you think you might -want to use an abbreviated datastream, read the section on abbreviated -datastreams, below. - -Once you have called jpeg_start_compress(), you may not alter any JPEG -parameters or other fields of the JPEG object until you have completed -the compression cycle. - - -5. while (scan lines remain to be written) - jpeg_write_scanlines(...); - -Now write all the required image data by calling jpeg_write_scanlines() -one or more times. You can pass one or more scanlines in each call, up -to the total image height. In most applications it is convenient to pass -just one or a few scanlines at a time. The expected format for the passed -data is discussed under "Data formats", above. - -Image data should be written in top-to-bottom scanline order. The JPEG spec -contains some weasel wording about how top and bottom are application-defined -terms (a curious interpretation of the English language...) but if you want -your files to be compatible with everyone else's, you WILL use top-to-bottom -order. If the source data must be read in bottom-to-top order, you can use -the JPEG library's virtual array mechanism to invert the data efficiently. -Examples of this can be found in the sample application cjpeg. - -The library maintains a count of the number of scanlines written so far -in the next_scanline field of the JPEG object. Usually you can just use -this variable as the loop counter, so that the loop test looks like -"while (cinfo.next_scanline < cinfo.image_height)". - -Code for this step depends heavily on the way that you store the source data. -example.c shows the following code for the case of a full-size 2-D source -array containing 3-byte RGB pixels: - - JSAMPROW row_pointer[1]; /* pointer to a single row */ - int row_stride; /* physical row width in buffer */ - - row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */ - - while (cinfo.next_scanline < cinfo.image_height) { - row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; - jpeg_write_scanlines(&cinfo, row_pointer, 1); - } - -jpeg_write_scanlines() returns the number of scanlines actually written. -This will normally be equal to the number passed in, so you can usually -ignore the return value. It is different in just two cases: - * If you try to write more scanlines than the declared image height, - the additional scanlines are ignored. - * If you use a suspending data destination manager, output buffer overrun - will cause the compressor to return before accepting all the passed lines. - This feature is discussed under "I/O suspension", below. The normal - stdio destination manager will NOT cause this to happen. -In any case, the return value is the same as the change in the value of -next_scanline. - - -6. jpeg_finish_compress(...); - -After all the image data has been written, call jpeg_finish_compress() to -complete the compression cycle. This step is ESSENTIAL to ensure that the -last bufferload of data is written to the data destination. -jpeg_finish_compress() also releases working memory associated with the JPEG -object. - -Typical code: - - jpeg_finish_compress(&cinfo); - -If using the stdio destination manager, don't forget to close the output -stdio stream (if necessary) afterwards. - -If you have requested a multi-pass operating mode, such as Huffman code -optimization, jpeg_finish_compress() will perform the additional passes using -data buffered by the first pass. In this case jpeg_finish_compress() may take -quite a while to complete. With the default compression parameters, this will -not happen. - -It is an error to call jpeg_finish_compress() before writing the necessary -total number of scanlines. If you wish to abort compression, call -jpeg_abort() as discussed below. - -After completing a compression cycle, you may dispose of the JPEG object -as discussed next, or you may use it to compress another image. In that case -return to step 2, 3, or 4 as appropriate. If you do not change the -destination manager, the new datastream will be written to the same target. -If you do not change any JPEG parameters, the new datastream will be written -with the same parameters as before. Note that you can change the input image -dimensions freely between cycles, but if you change the input colorspace, you -should call jpeg_set_defaults() to adjust for the new colorspace; and then -you'll need to repeat all of step 3. - - -7. Release the JPEG compression object. - -When you are done with a JPEG compression object, destroy it by calling -jpeg_destroy_compress(). This will free all subsidiary memory (regardless of -the previous state of the object). Or you can call jpeg_destroy(), which -works for either compression or decompression objects --- this may be more -convenient if you are sharing code between compression and decompression -cases. (Actually, these routines are equivalent except for the declared type -of the passed pointer. To avoid gripes from ANSI C compilers, jpeg_destroy() -should be passed a j_common_ptr.) - -If you allocated the jpeg_compress_struct structure from malloc(), freeing -it is your responsibility --- jpeg_destroy() won't. Ditto for the error -handler structure. - -Typical code: - - jpeg_destroy_compress(&cinfo); - - -8. Aborting. - -If you decide to abort a compression cycle before finishing, you can clean up -in either of two ways: - -* If you don't need the JPEG object any more, just call - jpeg_destroy_compress() or jpeg_destroy() to release memory. This is - legitimate at any point after calling jpeg_create_compress() --- in fact, - it's safe even if jpeg_create_compress() fails. - -* If you want to re-use the JPEG object, call jpeg_abort_compress(), or call - jpeg_abort() which works on both compression and decompression objects. - This will return the object to an idle state, releasing any working memory. - jpeg_abort() is allowed at any time after successful object creation. - -Note that cleaning up the data destination, if required, is your -responsibility; neither of these routines will call term_destination(). -(See "Compressed data handling", below, for more about that.) - -jpeg_destroy() and jpeg_abort() are the only safe calls to make on a JPEG -object that has reported an error by calling error_exit (see "Error handling" -for more info). The internal state of such an object is likely to be out of -whack. Either of these two routines will return the object to a known state. - - -Decompression details ---------------------- - -Here we revisit the JPEG decompression outline given in the overview. - -1. Allocate and initialize a JPEG decompression object. - -This is just like initialization for compression, as discussed above, -except that the object is a "struct jpeg_decompress_struct" and you -call jpeg_create_decompress(). Error handling is exactly the same. - -Typical code: - - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; - ... - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_decompress(&cinfo); - -(Both here and in the IJG code, we usually use variable name "cinfo" for -both compression and decompression objects.) - - -2. Specify the source of the compressed data (eg, a file). - -As previously mentioned, the JPEG library reads compressed data from a "data -source" module. The library includes one data source module which knows how -to read from a stdio stream. You can use your own source module if you want -to do something else, as discussed later. - -If you use the standard source module, you must open the source stdio stream -beforehand. Typical code for this step looks like: - - FILE * infile; - ... - if ((infile = fopen(filename, "rb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - exit(1); - } - jpeg_stdio_src(&cinfo, infile); - -where the last line invokes the standard source module. - -WARNING: it is critical that the binary compressed data be read unchanged. -On non-Unix systems the stdio library may perform newline translation or -otherwise corrupt binary data. To suppress this behavior, you may need to use -a "b" option to fopen (as shown above), or use setmode() or another routine to -put the stdio stream in binary mode. See cjpeg.c and djpeg.c for code that -has been found to work on many systems. - -You may not change the data source between calling jpeg_read_header() and -jpeg_finish_decompress(). If you wish to read a series of JPEG images from -a single source file, you should repeat the jpeg_read_header() to -jpeg_finish_decompress() sequence without reinitializing either the JPEG -object or the data source module; this prevents buffered input data from -being discarded. - - -3. Call jpeg_read_header() to obtain image info. - -Typical code for this step is just - - jpeg_read_header(&cinfo, TRUE); - -This will read the source datastream header markers, up to the beginning -of the compressed data proper. On return, the image dimensions and other -info have been stored in the JPEG object. The application may wish to -consult this information before selecting decompression parameters. - -More complex code is necessary if - * A suspending data source is used --- in that case jpeg_read_header() - may return before it has read all the header data. See "I/O suspension", - below. The normal stdio source manager will NOT cause this to happen. - * Abbreviated JPEG files are to be processed --- see the section on - abbreviated datastreams. Standard applications that deal only in - interchange JPEG files need not be concerned with this case either. - -It is permissible to stop at this point if you just wanted to find out the -image dimensions and other header info for a JPEG file. In that case, -call jpeg_destroy() when you are done with the JPEG object, or call -jpeg_abort() to return it to an idle state before selecting a new data -source and reading another header. - - -4. Set parameters for decompression. - -jpeg_read_header() sets appropriate default decompression parameters based on -the properties of the image (in particular, its colorspace). However, you -may well want to alter these defaults before beginning the decompression. -For example, the default is to produce full color output from a color file. -If you want colormapped output you must ask for it. Other options allow the -returned image to be scaled and allow various speed/quality tradeoffs to be -selected. "Decompression parameter selection", below, gives details. - -If the defaults are appropriate, nothing need be done at this step. - -Note that all default values are set by each call to jpeg_read_header(). -If you reuse a decompression object, you cannot expect your parameter -settings to be preserved across cycles, as you can for compression. -You must set desired parameter values each time. - - -5. jpeg_start_decompress(...); - -Once the parameter values are satisfactory, call jpeg_start_decompress() to -begin decompression. This will initialize internal state, allocate working -memory, and prepare for returning data. - -Typical code is just - - jpeg_start_decompress(&cinfo); - -If you have requested a multi-pass operating mode, such as 2-pass color -quantization, jpeg_start_decompress() will do everything needed before data -output can begin. In this case jpeg_start_decompress() may take quite a while -to complete. With a single-scan (non progressive) JPEG file and default -decompression parameters, this will not happen; jpeg_start_decompress() will -return quickly. - -After this call, the final output image dimensions, including any requested -scaling, are available in the JPEG object; so is the selected colormap, if -colormapped output has been requested. Useful fields include - - output_width image width and height, as scaled - output_height - out_color_components # of color components in out_color_space - output_components # of color components returned per pixel - colormap the selected colormap, if any - actual_number_of_colors number of entries in colormap - -output_components is 1 (a colormap index) when quantizing colors; otherwise it -equals out_color_components. It is the number of JSAMPLE values that will be -emitted per pixel in the output arrays. - -Typically you will need to allocate data buffers to hold the incoming image. -You will need output_width * output_components JSAMPLEs per scanline in your -output buffer, and a total of output_height scanlines will be returned. - -Note: if you are using the JPEG library's internal memory manager to allocate -data buffers (as djpeg does), then the manager's protocol requires that you -request large buffers *before* calling jpeg_start_decompress(). This is a -little tricky since the output_XXX fields are not normally valid then. You -can make them valid by calling jpeg_calc_output_dimensions() after setting the -relevant parameters (scaling, output color space, and quantization flag). - - -6. while (scan lines remain to be read) - jpeg_read_scanlines(...); - -Now you can read the decompressed image data by calling jpeg_read_scanlines() -one or more times. At each call, you pass in the maximum number of scanlines -to be read (ie, the height of your working buffer); jpeg_read_scanlines() -will return up to that many lines. The return value is the number of lines -actually read. The format of the returned data is discussed under "Data -formats", above. Don't forget that grayscale and color JPEGs will return -different data formats! - -Image data is returned in top-to-bottom scanline order. If you must write -out the image in bottom-to-top order, you can use the JPEG library's virtual -array mechanism to invert the data efficiently. Examples of this can be -found in the sample application djpeg. - -The library maintains a count of the number of scanlines returned so far -in the output_scanline field of the JPEG object. Usually you can just use -this variable as the loop counter, so that the loop test looks like -"while (cinfo.output_scanline < cinfo.output_height)". (Note that the test -should NOT be against image_height, unless you never use scaling. The -image_height field is the height of the original unscaled image.) -The return value always equals the change in the value of output_scanline. - -If you don't use a suspending data source, it is safe to assume that -jpeg_read_scanlines() reads at least one scanline per call, until the -bottom of the image has been reached. - -If you use a buffer larger than one scanline, it is NOT safe to assume that -jpeg_read_scanlines() fills it. (The current implementation returns only a -few scanlines per call, no matter how large a buffer you pass.) So you must -always provide a loop that calls jpeg_read_scanlines() repeatedly until the -whole image has been read. - - -7. jpeg_finish_decompress(...); - -After all the image data has been read, call jpeg_finish_decompress() to -complete the decompression cycle. This causes working memory associated -with the JPEG object to be released. - -Typical code: - - jpeg_finish_decompress(&cinfo); - -If using the stdio source manager, don't forget to close the source stdio -stream if necessary. - -It is an error to call jpeg_finish_decompress() before reading the correct -total number of scanlines. If you wish to abort decompression, call -jpeg_abort() as discussed below. - -After completing a decompression cycle, you may dispose of the JPEG object as -discussed next, or you may use it to decompress another image. In that case -return to step 2 or 3 as appropriate. If you do not change the source -manager, the next image will be read from the same source. - - -8. Release the JPEG decompression object. - -When you are done with a JPEG decompression object, destroy it by calling -jpeg_destroy_decompress() or jpeg_destroy(). The previous discussion of -destroying compression objects applies here too. - -Typical code: - - jpeg_destroy_decompress(&cinfo); - - -9. Aborting. - -You can abort a decompression cycle by calling jpeg_destroy_decompress() or -jpeg_destroy() if you don't need the JPEG object any more, or -jpeg_abort_decompress() or jpeg_abort() if you want to reuse the object. -The previous discussion of aborting compression cycles applies here too. - - -Mechanics of usage: include files, linking, etc ------------------------------------------------ - -Applications using the JPEG library should include the header file jpeglib.h -to obtain declarations of data types and routines. Before including -jpeglib.h, include system headers that define at least the typedefs FILE and -size_t. On ANSI-conforming systems, including is sufficient; on -older Unix systems, you may need to define size_t. - -If the application needs to refer to individual JPEG library error codes, also -include jerror.h to define those symbols. - -jpeglib.h indirectly includes the files jconfig.h and jmorecfg.h. If you are -installing the JPEG header files in a system directory, you will want to -install all four files: jpeglib.h, jerror.h, jconfig.h, jmorecfg.h. - -The most convenient way to include the JPEG code into your executable program -is to prepare a library file ("libjpeg.a", or a corresponding name on non-Unix -machines) and reference it at your link step. If you use only half of the -library (only compression or only decompression), only that much code will be -included from the library, unless your linker is hopelessly brain-damaged. -The supplied makefiles build libjpeg.a automatically (see install.txt). - -While you can build the JPEG library as a shared library if the whim strikes -you, we don't really recommend it. The trouble with shared libraries is that -at some point you'll probably try to substitute a new version of the library -without recompiling the calling applications. That generally doesn't work -because the parameter struct declarations usually change with each new -version. In other words, the library's API is *not* guaranteed binary -compatible across versions; we only try to ensure source-code compatibility. -(In hindsight, it might have been smarter to hide the parameter structs from -applications and introduce a ton of access functions instead. Too late now, -however.) - -On some systems your application may need to set up a signal handler to ensure -that temporary files are deleted if the program is interrupted. This is most -critical if you are on MS-DOS and use the jmemdos.c memory manager back end; -it will try to grab extended memory for temp files, and that space will NOT be -freed automatically. See cjpeg.c or djpeg.c for an example signal handler. - -It may be worth pointing out that the core JPEG library does not actually -require the stdio library: only the default source/destination managers and -error handler need it. You can use the library in a stdio-less environment -if you replace those modules and use jmemnobs.c (or another memory manager of -your own devising). More info about the minimum system library requirements -may be found in jinclude.h. - - -ADVANCED FEATURES -================= - -Compression parameter selection -------------------------------- - -This section describes all the optional parameters you can set for JPEG -compression, as well as the "helper" routines provided to assist in this -task. Proper setting of some parameters requires detailed understanding -of the JPEG standard; if you don't know what a parameter is for, it's best -not to mess with it! See REFERENCES in the README file for pointers to -more info about JPEG. - -It's a good idea to call jpeg_set_defaults() first, even if you plan to set -all the parameters; that way your code is more likely to work with future JPEG -libraries that have additional parameters. For the same reason, we recommend -you use a helper routine where one is provided, in preference to twiddling -cinfo fields directly. - -The helper routines are: - -jpeg_set_defaults (j_compress_ptr cinfo) - This routine sets all JPEG parameters to reasonable defaults, using - only the input image's color space (field in_color_space, which must - already be set in cinfo). Many applications will only need to use - this routine and perhaps jpeg_set_quality(). - -jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) - Sets the JPEG file's colorspace (field jpeg_color_space) as specified, - and sets other color-space-dependent parameters appropriately. See - "Special color spaces", below, before using this. A large number of - parameters, including all per-component parameters, are set by this - routine; if you want to twiddle individual parameters you should call - jpeg_set_colorspace() before rather than after. - -jpeg_default_colorspace (j_compress_ptr cinfo) - Selects an appropriate JPEG colorspace based on cinfo->in_color_space, - and calls jpeg_set_colorspace(). This is actually a subroutine of - jpeg_set_defaults(). It's broken out in case you want to change - just the colorspace-dependent JPEG parameters. - -jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline) - Constructs JPEG quantization tables appropriate for the indicated - quality setting. The quality value is expressed on the 0..100 scale - recommended by IJG (cjpeg's "-quality" switch uses this routine). - Note that the exact mapping from quality values to tables may change - in future IJG releases as more is learned about DCT quantization. - If the force_baseline parameter is TRUE, then the quantization table - entries are constrained to the range 1..255 for full JPEG baseline - compatibility. In the current implementation, this only makes a - difference for quality settings below 25, and it effectively prevents - very small/low quality files from being generated. The IJG decoder - is capable of reading the non-baseline files generated at low quality - settings when force_baseline is FALSE, but other decoders may not be. - -jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, - boolean force_baseline) - Same as jpeg_set_quality() except that the generated tables are the - sample tables given in the JPEC spec section K.1, multiplied by the - specified scale factor (which is expressed as a percentage; thus - scale_factor = 100 reproduces the spec's tables). Note that larger - scale factors give lower quality. This entry point is useful for - conforming to the Adobe PostScript DCT conventions, but we do not - recommend linear scaling as a user-visible quality scale otherwise. - force_baseline again constrains the computed table entries to 1..255. - -int jpeg_quality_scaling (int quality) - Converts a value on the IJG-recommended quality scale to a linear - scaling percentage. Note that this routine may change or go away - in future releases --- IJG may choose to adopt a scaling method that - can't be expressed as a simple scalar multiplier, in which case the - premise of this routine collapses. Caveat user. - -jpeg_default_qtables (j_compress_ptr cinfo, boolean force_baseline) - Set default quantization tables with linear q_scale_factor[] values - (see below). - -jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, - const unsigned int *basic_table, - int scale_factor, boolean force_baseline) - Allows an arbitrary quantization table to be created. which_tbl - indicates which table slot to fill. basic_table points to an array - of 64 unsigned ints given in normal array order. These values are - multiplied by scale_factor/100 and then clamped to the range 1..65535 - (or to 1..255 if force_baseline is TRUE). - CAUTION: prior to library version 6a, jpeg_add_quant_table expected - the basic table to be given in JPEG zigzag order. If you need to - write code that works with either older or newer versions of this - routine, you must check the library version number. Something like - "#if JPEG_LIB_VERSION >= 61" is the right test. - -jpeg_simple_progression (j_compress_ptr cinfo) - Generates a default scan script for writing a progressive-JPEG file. - This is the recommended method of creating a progressive file, - unless you want to make a custom scan sequence. You must ensure that - the JPEG color space is set correctly before calling this routine. - - -Compression parameters (cinfo fields) include: - -boolean arith_code - If TRUE, use arithmetic coding. - If FALSE, use Huffman coding. - -int block_size - Set DCT block size. All N from 1 to 16 are possible. - Default is 8 (baseline format). - Larger values produce higher compression, - smaller values produce higher quality. - An exact DCT stage is possible with 1 or 2. - With the default quality of 75 and default Luminance qtable - the DCT+Quantization stage is lossless for value 1. - Note that values other than 8 require a SmartScale capable decoder, - introduced with IJG JPEG 8. Setting the block_size parameter for - compression works with version 8c and later. - -J_DCT_METHOD dct_method - Selects the algorithm used for the DCT step. Choices are: - JDCT_ISLOW: slow but accurate integer algorithm - JDCT_IFAST: faster, less accurate integer method - JDCT_FLOAT: floating-point method - JDCT_DEFAULT: default method (normally JDCT_ISLOW) - JDCT_FASTEST: fastest method (normally JDCT_IFAST) - The FLOAT method is very slightly more accurate than the ISLOW method, - but may give different results on different machines due to varying - roundoff behavior. The integer methods should give the same results - on all machines. On machines with sufficiently fast FP hardware, the - floating-point method may also be the fastest. The IFAST method is - considerably less accurate than the other two; its use is not - recommended if high quality is a concern. JDCT_DEFAULT and - JDCT_FASTEST are macros configurable by each installation. - -unsigned int scale_num, scale_denom - Scale the image by the fraction scale_num/scale_denom. Default is - 1/1, or no scaling. Currently, the supported scaling ratios are - M/N with all N from 1 to 16, where M is the destination DCT size, - which is 8 by default (see block_size parameter above). - (The library design allows for arbitrary scaling ratios but this - is not likely to be implemented any time soon.) - -J_COLOR_SPACE jpeg_color_space -int num_components - The JPEG color space and corresponding number of components; see - "Special color spaces", below, for more info. We recommend using - jpeg_set_colorspace() if you want to change these. - -J_COLOR_TRANSFORM color_transform - Internal color transform identifier, writes LSE marker if nonzero - (requires decoder with inverse color transform support, introduced - with IJG JPEG 9). - Two values are currently possible: JCT_NONE and JCT_SUBTRACT_GREEN. - Set this value for lossless RGB application *before* calling - jpeg_set_colorspace(), because entropy table assignment in - jpeg_set_colorspace() depends on color_transform. - -boolean optimize_coding - TRUE causes the compressor to compute optimal Huffman coding tables - for the image. This requires an extra pass over the data and - therefore costs a good deal of space and time. The default is - FALSE, which tells the compressor to use the supplied or default - Huffman tables. In most cases optimal tables save only a few percent - of file size compared to the default tables. Note that when this is - TRUE, you need not supply Huffman tables at all, and any you do - supply will be overwritten. - -unsigned int restart_interval -int restart_in_rows - To emit restart markers in the JPEG file, set one of these nonzero. - Set restart_interval to specify the exact interval in MCU blocks. - Set restart_in_rows to specify the interval in MCU rows. (If - restart_in_rows is not 0, then restart_interval is set after the - image width in MCUs is computed.) Defaults are zero (no restarts). - One restart marker per MCU row is often a good choice. - NOTE: the overhead of restart markers is higher in grayscale JPEG - files than in color files, and MUCH higher in progressive JPEGs. - If you use restarts, you may want to use larger intervals in those - cases. - -const jpeg_scan_info * scan_info -int num_scans - By default, scan_info is NULL; this causes the compressor to write a - single-scan sequential JPEG file. If not NULL, scan_info points to - an array of scan definition records of length num_scans. The - compressor will then write a JPEG file having one scan for each scan - definition record. This is used to generate noninterleaved or - progressive JPEG files. The library checks that the scan array - defines a valid JPEG scan sequence. (jpeg_simple_progression creates - a suitable scan definition array for progressive JPEG.) This is - discussed further under "Progressive JPEG support". - -boolean do_fancy_downsampling - If TRUE, use direct DCT scaling with DCT size > 8 for downsampling - of chroma components. - If FALSE, use only DCT size <= 8 and simple separate downsampling. - Default is TRUE. - For better image stability in multiple generation compression cycles - it is preferable that this value matches the corresponding - do_fancy_upsampling value in decompression. - -int smoothing_factor - If non-zero, the input image is smoothed; the value should be 1 for - minimal smoothing to 100 for maximum smoothing. Consult jcsample.c - for details of the smoothing algorithm. The default is zero. - -boolean write_JFIF_header - If TRUE, a JFIF APP0 marker is emitted. jpeg_set_defaults() and - jpeg_set_colorspace() set this TRUE if a JFIF-legal JPEG color space - (ie, YCbCr or grayscale) is selected, otherwise FALSE. - -UINT8 JFIF_major_version -UINT8 JFIF_minor_version - The version number to be written into the JFIF marker. - jpeg_set_defaults() initializes the version to 1.01 (major=minor=1). - You should set it to 1.02 (major=1, minor=2) if you plan to write - any JFIF 1.02 extension markers. - -UINT8 density_unit -UINT16 X_density -UINT16 Y_density - The resolution information to be written into the JFIF marker; - not used otherwise. density_unit may be 0 for unknown, - 1 for dots/inch, or 2 for dots/cm. The default values are 0,1,1 - indicating square pixels of unknown size. - -boolean write_Adobe_marker - If TRUE, an Adobe APP14 marker is emitted. jpeg_set_defaults() and - jpeg_set_colorspace() set this TRUE if JPEG color space RGB, CMYK, - or YCCK is selected, otherwise FALSE. It is generally a bad idea - to set both write_JFIF_header and write_Adobe_marker. In fact, - you probably shouldn't change the default settings at all --- the - default behavior ensures that the JPEG file's color space can be - recognized by the decoder. - -JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS] - Pointers to coefficient quantization tables, one per table slot, - or NULL if no table is defined for a slot. Usually these should - be set via one of the above helper routines; jpeg_add_quant_table() - is general enough to define any quantization table. The other - routines will set up table slot 0 for luminance quality and table - slot 1 for chrominance. - -int q_scale_factor[NUM_QUANT_TBLS] - Linear quantization scaling factors (percentage, initialized 100) - for use with jpeg_default_qtables(). - See rdswitch.c and cjpeg.c for an example of usage. - Note that the q_scale_factor[] fields are the "linear" scales, so you - have to convert from user-defined ratings via jpeg_quality_scaling(). - Here is an example code which corresponds to cjpeg -quality 90,70: - - jpeg_set_defaults(cinfo); - - /* Set luminance quality 90. */ - cinfo->q_scale_factor[0] = jpeg_quality_scaling(90); - /* Set chrominance quality 70. */ - cinfo->q_scale_factor[1] = jpeg_quality_scaling(70); - - jpeg_default_qtables(cinfo, force_baseline); - - CAUTION: You must also set 1x1 subsampling for efficient separate - color quality selection, since the default value used by library - is 2x2: - - cinfo->comp_info[0].v_samp_factor = 1; - cinfo->comp_info[0].h_samp_factor = 1; - -JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS] -JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS] - Pointers to Huffman coding tables, one per table slot, or NULL if - no table is defined for a slot. Slots 0 and 1 are filled with the - JPEG sample tables by jpeg_set_defaults(). If you need to allocate - more table structures, jpeg_alloc_huff_table() may be used. - Note that optimal Huffman tables can be computed for an image - by setting optimize_coding, as discussed above; there's seldom - any need to mess with providing your own Huffman tables. - - -The actual dimensions of the JPEG image that will be written to the file are -given by the following fields. These are computed from the input image -dimensions and the compression parameters by jpeg_start_compress(). You can -also call jpeg_calc_jpeg_dimensions() to obtain the values that will result -from the current parameter settings. This can be useful if you are trying -to pick a scaling ratio that will get close to a desired target size. - -JDIMENSION jpeg_width Actual dimensions of output image. -JDIMENSION jpeg_height - - -Per-component parameters are stored in the struct cinfo.comp_info[i] for -component number i. Note that components here refer to components of the -JPEG color space, *not* the source image color space. A suitably large -comp_info[] array is allocated by jpeg_set_defaults(); if you choose not -to use that routine, it's up to you to allocate the array. - -int component_id - The one-byte identifier code to be recorded in the JPEG file for - this component. For the standard color spaces, we recommend you - leave the default values alone. - -int h_samp_factor -int v_samp_factor - Horizontal and vertical sampling factors for the component; must - be 1..4 according to the JPEG standard. Note that larger sampling - factors indicate a higher-resolution component; many people find - this behavior quite unintuitive. The default values are 2,2 for - luminance components and 1,1 for chrominance components, except - for grayscale where 1,1 is used. - -int quant_tbl_no - Quantization table number for component. The default value is - 0 for luminance components and 1 for chrominance components. - -int dc_tbl_no -int ac_tbl_no - DC and AC entropy coding table numbers. The default values are - 0 for luminance components and 1 for chrominance components. - -int component_index - Must equal the component's index in comp_info[]. (Beginning in - release v6, the compressor library will fill this in automatically; - you don't have to.) - - -Decompression parameter selection ---------------------------------- - -Decompression parameter selection is somewhat simpler than compression -parameter selection, since all of the JPEG internal parameters are -recorded in the source file and need not be supplied by the application. -(Unless you are working with abbreviated files, in which case see -"Abbreviated datastreams", below.) Decompression parameters control -the postprocessing done on the image to deliver it in a format suitable -for the application's use. Many of the parameters control speed/quality -tradeoffs, in which faster decompression may be obtained at the price of -a poorer-quality image. The defaults select the highest quality (slowest) -processing. - -The following fields in the JPEG object are set by jpeg_read_header() and -may be useful to the application in choosing decompression parameters: - -JDIMENSION image_width Width and height of image -JDIMENSION image_height -int num_components Number of color components -J_COLOR_SPACE jpeg_color_space Colorspace of image -boolean saw_JFIF_marker TRUE if a JFIF APP0 marker was seen - UINT8 JFIF_major_version Version information from JFIF marker - UINT8 JFIF_minor_version - UINT8 density_unit Resolution data from JFIF marker - UINT16 X_density - UINT16 Y_density -boolean saw_Adobe_marker TRUE if an Adobe APP14 marker was seen - UINT8 Adobe_transform Color transform code from Adobe marker - -The JPEG color space, unfortunately, is something of a guess since the JPEG -standard proper does not provide a way to record it. In practice most files -adhere to the JFIF or Adobe conventions, and the decoder will recognize these -correctly. See "Special color spaces", below, for more info. - - -The decompression parameters that determine the basic properties of the -returned image are: - -J_COLOR_SPACE out_color_space - Output color space. jpeg_read_header() sets an appropriate default - based on jpeg_color_space; typically it will be RGB or grayscale. - The application can change this field to request output in a different - colorspace. For example, set it to JCS_GRAYSCALE to get grayscale - output from a color file. (This is useful for previewing: grayscale - output is faster than full color since the color components need not - be processed.) Note that not all possible color space transforms are - currently implemented; you may need to extend jdcolor.c if you want an - unusual conversion. - -unsigned int scale_num, scale_denom - Scale the image by the fraction scale_num/scale_denom. Currently, - the supported scaling ratios are M/N with all M from 1 to 16, where - N is the source DCT size, which is 8 for baseline JPEG. (The library - design allows for arbitrary scaling ratios but this is not likely - to be implemented any time soon.) The values are initialized by - jpeg_read_header() with the source DCT size. For baseline JPEG - this is 8/8. If you change only the scale_num value while leaving - the other unchanged, then this specifies the DCT scaled size to be - applied on the given input. For baseline JPEG this is equivalent - to M/8 scaling, since the source DCT size for baseline JPEG is 8. - Smaller scaling ratios permit significantly faster decoding since - fewer pixels need be processed and a simpler IDCT method can be used. - -boolean quantize_colors - If set TRUE, colormapped output will be delivered. Default is FALSE, - meaning that full-color output will be delivered. - -The next three parameters are relevant only if quantize_colors is TRUE. - -int desired_number_of_colors - Maximum number of colors to use in generating a library-supplied color - map (the actual number of colors is returned in a different field). - Default 256. Ignored when the application supplies its own color map. - -boolean two_pass_quantize - If TRUE, an extra pass over the image is made to select a custom color - map for the image. This usually looks a lot better than the one-size- - fits-all colormap that is used otherwise. Default is TRUE. Ignored - when the application supplies its own color map. - -J_DITHER_MODE dither_mode - Selects color dithering method. Supported values are: - JDITHER_NONE no dithering: fast, very low quality - JDITHER_ORDERED ordered dither: moderate speed and quality - JDITHER_FS Floyd-Steinberg dither: slow, high quality - Default is JDITHER_FS. (At present, ordered dither is implemented - only in the single-pass, standard-colormap case. If you ask for - ordered dither when two_pass_quantize is TRUE or when you supply - an external color map, you'll get F-S dithering.) - -When quantize_colors is TRUE, the target color map is described by the next -two fields. colormap is set to NULL by jpeg_read_header(). The application -can supply a color map by setting colormap non-NULL and setting -actual_number_of_colors to the map size. Otherwise, jpeg_start_decompress() -selects a suitable color map and sets these two fields itself. -[Implementation restriction: at present, an externally supplied colormap is -only accepted for 3-component output color spaces.] - -JSAMPARRAY colormap - The color map, represented as a 2-D pixel array of out_color_components - rows and actual_number_of_colors columns. Ignored if not quantizing. - CAUTION: if the JPEG library creates its own colormap, the storage - pointed to by this field is released by jpeg_finish_decompress(). - Copy the colormap somewhere else first, if you want to save it. - -int actual_number_of_colors - The number of colors in the color map. - -Additional decompression parameters that the application may set include: - -J_DCT_METHOD dct_method - Selects the algorithm used for the DCT step. Choices are the same - as described above for compression. - -boolean do_fancy_upsampling - If TRUE, use direct DCT scaling with DCT size > 8 for upsampling - of chroma components. - If FALSE, use only DCT size <= 8 and simple separate upsampling. - Default is TRUE. - For better image stability in multiple generation compression cycles - it is preferable that this value matches the corresponding - do_fancy_downsampling value in compression. - -boolean do_block_smoothing - If TRUE, interblock smoothing is applied in early stages of decoding - progressive JPEG files; if FALSE, not. Default is TRUE. Early - progression stages look "fuzzy" with smoothing, "blocky" without. - In any case, block smoothing ceases to be applied after the first few - AC coefficients are known to full accuracy, so it is relevant only - when using buffered-image mode for progressive images. - -boolean enable_1pass_quant -boolean enable_external_quant -boolean enable_2pass_quant - These are significant only in buffered-image mode, which is - described in its own section below. - - -The output image dimensions are given by the following fields. These are -computed from the source image dimensions and the decompression parameters -by jpeg_start_decompress(). You can also call jpeg_calc_output_dimensions() -to obtain the values that will result from the current parameter settings. -This can be useful if you are trying to pick a scaling ratio that will get -close to a desired target size. It's also important if you are using the -JPEG library's memory manager to allocate output buffer space, because you -are supposed to request such buffers *before* jpeg_start_decompress(). - -JDIMENSION output_width Actual dimensions of output image. -JDIMENSION output_height -int out_color_components Number of color components in out_color_space. -int output_components Number of color components returned. -int rec_outbuf_height Recommended height of scanline buffer. - -When quantizing colors, output_components is 1, indicating a single color map -index per pixel. Otherwise it equals out_color_components. The output arrays -are required to be output_width * output_components JSAMPLEs wide. - -rec_outbuf_height is the recommended minimum height (in scanlines) of the -buffer passed to jpeg_read_scanlines(). If the buffer is smaller, the -library will still work, but time will be wasted due to unnecessary data -copying. In high-quality modes, rec_outbuf_height is always 1, but some -faster, lower-quality modes set it to larger values (typically 2 to 4). -If you are going to ask for a high-speed processing mode, you may as well -go to the trouble of honoring rec_outbuf_height so as to avoid data copying. -(An output buffer larger than rec_outbuf_height lines is OK, but won't -provide any material speed improvement over that height.) - - -Special color spaces --------------------- - -The JPEG standard itself is "color blind" and doesn't specify any particular -color space. It is customary to convert color data to a luminance/chrominance -color space before compressing, since this permits greater compression. The -existing JPEG file interchange format standards specify YCbCr or GRAYSCALE -data (JFIF version 1), GRAYSCALE, RGB, YCbCr, CMYK, or YCCK (Adobe), or BG_RGB -or BG_YCC (big gamut color spaces, JFIF version 2). For special applications -such as multispectral images, other color spaces can be used, -but it must be understood that such files will be unportable. - -The JPEG library can handle the most common colorspace conversions (namely -RGB <=> YCbCr and CMYK <=> YCCK). It can also deal with data of an unknown -color space, passing it through without conversion. If you deal extensively -with an unusual color space, you can easily extend the library to understand -additional color spaces and perform appropriate conversions. - -For compression, the source data's color space is specified by field -in_color_space. This is transformed to the JPEG file's color space given -by jpeg_color_space. jpeg_set_defaults() chooses a reasonable JPEG color -space depending on in_color_space, but you can override this by calling -jpeg_set_colorspace(). Of course you must select a supported transformation. -jccolor.c currently supports the following transformations: - RGB => YCbCr - RGB => GRAYSCALE - RGB => BG_YCC - YCbCr => GRAYSCALE - YCbCr => BG_YCC - CMYK => YCCK -plus the null transforms: GRAYSCALE => GRAYSCALE, RGB => RGB, -BG_RGB => BG_RGB, YCbCr => YCbCr, BG_YCC => BG_YCC, CMYK => CMYK, -YCCK => YCCK, and UNKNOWN => UNKNOWN. - -The file interchange format standards (JFIF and Adobe) specify APPn markers -that indicate the color space of the JPEG file. It is important to ensure -that these are written correctly, or omitted if the JPEG file's color space -is not one of the ones supported by the interchange standards. -jpeg_set_colorspace() will set the compression parameters to include or omit -the APPn markers properly, so long as it is told the truth about the JPEG -color space. For example, if you are writing some random 3-component color -space without conversion, don't try to fake out the library by setting -in_color_space and jpeg_color_space to JCS_YCbCr; use JCS_UNKNOWN. -You may want to write an APPn marker of your own devising to identify -the colorspace --- see "Special markers", below. - -When told that the color space is UNKNOWN, the library will default to using -luminance-quality compression parameters for all color components. You may -well want to change these parameters. See the source code for -jpeg_set_colorspace(), in jcparam.c, for details. - -For decompression, the JPEG file's color space is given in jpeg_color_space, -and this is transformed to the output color space out_color_space. -jpeg_read_header's setting of jpeg_color_space can be relied on if the file -conforms to JFIF or Adobe conventions, but otherwise it is no better than a -guess. If you know the JPEG file's color space for certain, you can override -jpeg_read_header's guess by setting jpeg_color_space. jpeg_read_header also -selects a default output color space based on (its guess of) jpeg_color_space; -set out_color_space to override this. Again, you must select a supported -transformation. jdcolor.c currently supports - YCbCr => RGB - YCbCr => GRAYSCALE - BG_YCC => RGB - BG_YCC => GRAYSCALE - RGB => GRAYSCALE - GRAYSCALE => RGB - YCCK => CMYK -as well as the null transforms. (Since GRAYSCALE=>RGB is provided, an -application can force grayscale JPEGs to look like color JPEGs if it only -wants to handle one case.) - -The two-pass color quantizer, jquant2.c, is specialized to handle RGB data -(it weights distances appropriately for RGB colors). You'll need to modify -the code if you want to use it for non-RGB output color spaces. Note that -jquant2.c is used to map to an application-supplied colormap as well as for -the normal two-pass colormap selection process. - -CAUTION: it appears that Adobe Photoshop writes inverted data in CMYK JPEG -files: 0 represents 100% ink coverage, rather than 0% ink as you'd expect. -This is arguably a bug in Photoshop, but if you need to work with Photoshop -CMYK files, you will have to deal with it in your application. We cannot -"fix" this in the library by inverting the data during the CMYK<=>YCCK -transform, because that would break other applications, notably Ghostscript. -Photoshop versions prior to 3.0 write EPS files containing JPEG-encoded CMYK -data in the same inverted-YCCK representation used in bare JPEG files, but -the surrounding PostScript code performs an inversion using the PS image -operator. I am told that Photoshop 3.0 will write uninverted YCCK in -EPS/JPEG files, and will omit the PS-level inversion. (But the data -polarity used in bare JPEG files will not change in 3.0.) In either case, -the JPEG library must not invert the data itself, or else Ghostscript would -read these EPS files incorrectly. - - -Error handling --------------- - -When the default error handler is used, any error detected inside the JPEG -routines will cause a message to be printed on stderr, followed by exit(). -You can supply your own error handling routines to override this behavior -and to control the treatment of nonfatal warnings and trace/debug messages. -The file example.c illustrates the most common case, which is to have the -application regain control after an error rather than exiting. - -The JPEG library never writes any message directly; it always goes through -the error handling routines. Three classes of messages are recognized: - * Fatal errors: the library cannot continue. - * Warnings: the library can continue, but the data is corrupt, and a - damaged output image is likely to result. - * Trace/informational messages. These come with a trace level indicating - the importance of the message; you can control the verbosity of the - program by adjusting the maximum trace level that will be displayed. - -You may, if you wish, simply replace the entire JPEG error handling module -(jerror.c) with your own code. However, you can avoid code duplication by -only replacing some of the routines depending on the behavior you need. -This is accomplished by calling jpeg_std_error() as usual, but then overriding -some of the method pointers in the jpeg_error_mgr struct, as illustrated by -example.c. - -All of the error handling routines will receive a pointer to the JPEG object -(a j_common_ptr which points to either a jpeg_compress_struct or a -jpeg_decompress_struct; if you need to tell which, test the is_decompressor -field). This struct includes a pointer to the error manager struct in its -"err" field. Frequently, custom error handler routines will need to access -additional data which is not known to the JPEG library or the standard error -handler. The most convenient way to do this is to embed either the JPEG -object or the jpeg_error_mgr struct in a larger structure that contains -additional fields; then casting the passed pointer provides access to the -additional fields. Again, see example.c for one way to do it. (Beginning -with IJG version 6b, there is also a void pointer "client_data" in each -JPEG object, which the application can also use to find related data. -The library does not touch client_data at all.) - -The individual methods that you might wish to override are: - -error_exit (j_common_ptr cinfo) - Receives control for a fatal error. Information sufficient to - generate the error message has been stored in cinfo->err; call - output_message to display it. Control must NOT return to the caller; - generally this routine will exit() or longjmp() somewhere. - Typically you would override this routine to get rid of the exit() - default behavior. Note that if you continue processing, you should - clean up the JPEG object with jpeg_abort() or jpeg_destroy(). - -output_message (j_common_ptr cinfo) - Actual output of any JPEG message. Override this to send messages - somewhere other than stderr. Note that this method does not know - how to generate a message, only where to send it. - -format_message (j_common_ptr cinfo, char * buffer) - Constructs a readable error message string based on the error info - stored in cinfo->err. This method is called by output_message. Few - applications should need to override this method. One possible - reason for doing so is to implement dynamic switching of error message - language. - -emit_message (j_common_ptr cinfo, int msg_level) - Decide whether or not to emit a warning or trace message; if so, - calls output_message. The main reason for overriding this method - would be to abort on warnings. msg_level is -1 for warnings, - 0 and up for trace messages. - -Only error_exit() and emit_message() are called from the rest of the JPEG -library; the other two are internal to the error handler. - -The actual message texts are stored in an array of strings which is pointed to -by the field err->jpeg_message_table. The messages are numbered from 0 to -err->last_jpeg_message, and it is these code numbers that are used in the -JPEG library code. You could replace the message texts (for instance, with -messages in French or German) by changing the message table pointer. See -jerror.h for the default texts. CAUTION: this table will almost certainly -change or grow from one library version to the next. - -It may be useful for an application to add its own message texts that are -handled by the same mechanism. The error handler supports a second "add-on" -message table for this purpose. To define an addon table, set the pointer -err->addon_message_table and the message numbers err->first_addon_message and -err->last_addon_message. If you number the addon messages beginning at 1000 -or so, you won't have to worry about conflicts with the library's built-in -messages. See the sample applications cjpeg/djpeg for an example of using -addon messages (the addon messages are defined in cderror.h). - -Actual invocation of the error handler is done via macros defined in jerror.h: - ERREXITn(...) for fatal errors - WARNMSn(...) for corrupt-data warnings - TRACEMSn(...) for trace and informational messages. -These macros store the message code and any additional parameters into the -error handler struct, then invoke the error_exit() or emit_message() method. -The variants of each macro are for varying numbers of additional parameters. -The additional parameters are inserted into the generated message using -standard printf() format codes. - -See jerror.h and jerror.c for further details. - - -Compressed data handling (source and destination managers) ----------------------------------------------------------- - -The JPEG compression library sends its compressed data to a "destination -manager" module. The default destination manager just writes the data to a -memory buffer or to a stdio stream, but you can provide your own manager to -do something else. Similarly, the decompression library calls a "source -manager" to obtain the compressed data; you can provide your own source -manager if you want the data to come from somewhere other than a memory -buffer or a stdio stream. - -In both cases, compressed data is processed a bufferload at a time: the -destination or source manager provides a work buffer, and the library invokes -the manager only when the buffer is filled or emptied. (You could define a -one-character buffer to force the manager to be invoked for each byte, but -that would be rather inefficient.) The buffer's size and location are -controlled by the manager, not by the library. For example, the memory -source manager just makes the buffer pointer and length point to the original -data in memory. In this case the buffer-reload procedure will be invoked -only if the decompressor ran off the end of the datastream, which would -indicate an erroneous datastream. - -The work buffer is defined as an array of datatype JOCTET, which is generally -"char" or "unsigned char". On a machine where char is not exactly 8 bits -wide, you must define JOCTET as a wider data type and then modify the data -source and destination modules to transcribe the work arrays into 8-bit units -on external storage. - -A data destination manager struct contains a pointer and count defining the -next byte to write in the work buffer and the remaining free space: - - JOCTET * next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - -The library increments the pointer and decrements the count until the buffer -is filled. The manager's empty_output_buffer method must reset the pointer -and count. The manager is expected to remember the buffer's starting address -and total size in private fields not visible to the library. - -A data destination manager provides three methods: - -init_destination (j_compress_ptr cinfo) - Initialize destination. This is called by jpeg_start_compress() - before any data is actually written. It must initialize - next_output_byte and free_in_buffer. free_in_buffer must be - initialized to a positive value. - -empty_output_buffer (j_compress_ptr cinfo) - This is called whenever the buffer has filled (free_in_buffer - reaches zero). In typical applications, it should write out the - *entire* buffer (use the saved start address and buffer length; - ignore the current state of next_output_byte and free_in_buffer). - Then reset the pointer & count to the start of the buffer, and - return TRUE indicating that the buffer has been dumped. - free_in_buffer must be set to a positive value when TRUE is - returned. A FALSE return should only be used when I/O suspension is - desired (this operating mode is discussed in the next section). - -term_destination (j_compress_ptr cinfo) - Terminate destination --- called by jpeg_finish_compress() after all - data has been written. In most applications, this must flush any - data remaining in the buffer. Use either next_output_byte or - free_in_buffer to determine how much data is in the buffer. - -term_destination() is NOT called by jpeg_abort() or jpeg_destroy(). If you -want the destination manager to be cleaned up during an abort, you must do it -yourself. - -You will also need code to create a jpeg_destination_mgr struct, fill in its -method pointers, and insert a pointer to the struct into the "dest" field of -the JPEG compression object. This can be done in-line in your setup code if -you like, but it's probably cleaner to provide a separate routine similar to -the jpeg_stdio_dest() or jpeg_mem_dest() routines of the supplied destination -managers. - -Decompression source managers follow a parallel design, but with some -additional frammishes. The source manager struct contains a pointer and count -defining the next byte to read from the work buffer and the number of bytes -remaining: - - const JOCTET * next_input_byte; /* => next byte to read from buffer */ - size_t bytes_in_buffer; /* # of bytes remaining in buffer */ - -The library increments the pointer and decrements the count until the buffer -is emptied. The manager's fill_input_buffer method must reset the pointer and -count. In most applications, the manager must remember the buffer's starting -address and total size in private fields not visible to the library. - -A data source manager provides five methods: - -init_source (j_decompress_ptr cinfo) - Initialize source. This is called by jpeg_read_header() before any - data is actually read. Unlike init_destination(), it may leave - bytes_in_buffer set to 0 (in which case a fill_input_buffer() call - will occur immediately). - -fill_input_buffer (j_decompress_ptr cinfo) - This is called whenever bytes_in_buffer has reached zero and more - data is wanted. In typical applications, it should read fresh data - into the buffer (ignoring the current state of next_input_byte and - bytes_in_buffer), reset the pointer & count to the start of the - buffer, and return TRUE indicating that the buffer has been reloaded. - It is not necessary to fill the buffer entirely, only to obtain at - least one more byte. bytes_in_buffer MUST be set to a positive value - if TRUE is returned. A FALSE return should only be used when I/O - suspension is desired (this mode is discussed in the next section). - -skip_input_data (j_decompress_ptr cinfo, long num_bytes) - Skip num_bytes worth of data. The buffer pointer and count should - be advanced over num_bytes input bytes, refilling the buffer as - needed. This is used to skip over a potentially large amount of - uninteresting data (such as an APPn marker). In some applications - it may be possible to optimize away the reading of the skipped data, - but it's not clear that being smart is worth much trouble; large - skips are uncommon. bytes_in_buffer may be zero on return. - A zero or negative skip count should be treated as a no-op. - -resync_to_restart (j_decompress_ptr cinfo, int desired) - This routine is called only when the decompressor has failed to find - a restart (RSTn) marker where one is expected. Its mission is to - find a suitable point for resuming decompression. For most - applications, we recommend that you just use the default resync - procedure, jpeg_resync_to_restart(). However, if you are able to back - up in the input data stream, or if you have a-priori knowledge about - the likely location of restart markers, you may be able to do better. - Read the read_restart_marker() and jpeg_resync_to_restart() routines - in jdmarker.c if you think you'd like to implement your own resync - procedure. - -term_source (j_decompress_ptr cinfo) - Terminate source --- called by jpeg_finish_decompress() after all - data has been read. Often a no-op. - -For both fill_input_buffer() and skip_input_data(), there is no such thing -as an EOF return. If the end of the file has been reached, the routine has -a choice of exiting via ERREXIT() or inserting fake data into the buffer. -In most cases, generating a warning message and inserting a fake EOI marker -is the best course of action --- this will allow the decompressor to output -however much of the image is there. In pathological cases, the decompressor -may swallow the EOI and again demand data ... just keep feeding it fake EOIs. -jdatasrc.c illustrates the recommended error recovery behavior. - -term_source() is NOT called by jpeg_abort() or jpeg_destroy(). If you want -the source manager to be cleaned up during an abort, you must do it yourself. - -You will also need code to create a jpeg_source_mgr struct, fill in its method -pointers, and insert a pointer to the struct into the "src" field of the JPEG -decompression object. This can be done in-line in your setup code if you -like, but it's probably cleaner to provide a separate routine similar to the -jpeg_stdio_src() or jpeg_mem_src() routines of the supplied source managers. - -For more information, consult the memory and stdio source and destination -managers in jdatasrc.c and jdatadst.c. - - -I/O suspension --------------- - -Some applications need to use the JPEG library as an incremental memory-to- -memory filter: when the compressed data buffer is filled or emptied, they want -control to return to the outer loop, rather than expecting that the buffer can -be emptied or reloaded within the data source/destination manager subroutine. -The library supports this need by providing an "I/O suspension" mode, which we -describe in this section. - -The I/O suspension mode is not a panacea: nothing is guaranteed about the -maximum amount of time spent in any one call to the library, so it will not -eliminate response-time problems in single-threaded applications. If you -need guaranteed response time, we suggest you "bite the bullet" and implement -a real multi-tasking capability. - -To use I/O suspension, cooperation is needed between the calling application -and the data source or destination manager; you will always need a custom -source/destination manager. (Please read the previous section if you haven't -already.) The basic idea is that the empty_output_buffer() or -fill_input_buffer() routine is a no-op, merely returning FALSE to indicate -that it has done nothing. Upon seeing this, the JPEG library suspends -operation and returns to its caller. The surrounding application is -responsible for emptying or refilling the work buffer before calling the -JPEG library again. - -Compression suspension: - -For compression suspension, use an empty_output_buffer() routine that returns -FALSE; typically it will not do anything else. This will cause the -compressor to return to the caller of jpeg_write_scanlines(), with the return -value indicating that not all the supplied scanlines have been accepted. -The application must make more room in the output buffer, adjust the output -buffer pointer/count appropriately, and then call jpeg_write_scanlines() -again, pointing to the first unconsumed scanline. - -When forced to suspend, the compressor will backtrack to a convenient stopping -point (usually the start of the current MCU); it will regenerate some output -data when restarted. Therefore, although empty_output_buffer() is only -called when the buffer is filled, you should NOT write out the entire buffer -after a suspension. Write only the data up to the current position of -next_output_byte/free_in_buffer. The data beyond that point will be -regenerated after resumption. - -Because of the backtracking behavior, a good-size output buffer is essential -for efficiency; you don't want the compressor to suspend often. (In fact, an -overly small buffer could lead to infinite looping, if a single MCU required -more data than would fit in the buffer.) We recommend a buffer of at least -several Kbytes. You may want to insert explicit code to ensure that you don't -call jpeg_write_scanlines() unless there is a reasonable amount of space in -the output buffer; in other words, flush the buffer before trying to compress -more data. - -The compressor does not allow suspension while it is trying to write JPEG -markers at the beginning and end of the file. This means that: - * At the beginning of a compression operation, there must be enough free - space in the output buffer to hold the header markers (typically 600 or - so bytes). The recommended buffer size is bigger than this anyway, so - this is not a problem as long as you start with an empty buffer. However, - this restriction might catch you if you insert large special markers, such - as a JFIF thumbnail image, without flushing the buffer afterwards. - * When you call jpeg_finish_compress(), there must be enough space in the - output buffer to emit any buffered data and the final EOI marker. In the - current implementation, half a dozen bytes should suffice for this, but - for safety's sake we recommend ensuring that at least 100 bytes are free - before calling jpeg_finish_compress(). - -A more significant restriction is that jpeg_finish_compress() cannot suspend. -This means you cannot use suspension with multi-pass operating modes, namely -Huffman code optimization and multiple-scan output. Those modes write the -whole file during jpeg_finish_compress(), which will certainly result in -buffer overrun. (Note that this restriction applies only to compression, -not decompression. The decompressor supports input suspension in all of its -operating modes.) - -Decompression suspension: - -For decompression suspension, use a fill_input_buffer() routine that simply -returns FALSE (except perhaps during error recovery, as discussed below). -This will cause the decompressor to return to its caller with an indication -that suspension has occurred. This can happen at four places: - * jpeg_read_header(): will return JPEG_SUSPENDED. - * jpeg_start_decompress(): will return FALSE, rather than its usual TRUE. - * jpeg_read_scanlines(): will return the number of scanlines already - completed (possibly 0). - * jpeg_finish_decompress(): will return FALSE, rather than its usual TRUE. -The surrounding application must recognize these cases, load more data into -the input buffer, and repeat the call. In the case of jpeg_read_scanlines(), -increment the passed pointers past any scanlines successfully read. - -Just as with compression, the decompressor will typically backtrack to a -convenient restart point before suspending. When fill_input_buffer() is -called, next_input_byte/bytes_in_buffer point to the current restart point, -which is where the decompressor will backtrack to if FALSE is returned. -The data beyond that position must NOT be discarded if you suspend; it needs -to be re-read upon resumption. In most implementations, you'll need to shift -this data down to the start of your work buffer and then load more data after -it. Again, this behavior means that a several-Kbyte work buffer is essential -for decent performance; furthermore, you should load a reasonable amount of -new data before resuming decompression. (If you loaded, say, only one new -byte each time around, you could waste a LOT of cycles.) - -The skip_input_data() source manager routine requires special care in a -suspension scenario. This routine is NOT granted the ability to suspend the -decompressor; it can decrement bytes_in_buffer to zero, but no more. If the -requested skip distance exceeds the amount of data currently in the input -buffer, then skip_input_data() must set bytes_in_buffer to zero and record the -additional skip distance somewhere else. The decompressor will immediately -call fill_input_buffer(), which should return FALSE, which will cause a -suspension return. The surrounding application must then arrange to discard -the recorded number of bytes before it resumes loading the input buffer. -(Yes, this design is rather baroque, but it avoids complexity in the far more -common case where a non-suspending source manager is used.) - -If the input data has been exhausted, we recommend that you emit a warning -and insert dummy EOI markers just as a non-suspending data source manager -would do. This can be handled either in the surrounding application logic or -within fill_input_buffer(); the latter is probably more efficient. If -fill_input_buffer() knows that no more data is available, it can set the -pointer/count to point to a dummy EOI marker and then return TRUE just as -though it had read more data in a non-suspending situation. - -The decompressor does not attempt to suspend within standard JPEG markers; -instead it will backtrack to the start of the marker and reprocess the whole -marker next time. Hence the input buffer must be large enough to hold the -longest standard marker in the file. Standard JPEG markers should normally -not exceed a few hundred bytes each (DHT tables are typically the longest). -We recommend at least a 2K buffer for performance reasons, which is much -larger than any correct marker is likely to be. For robustness against -damaged marker length counts, you may wish to insert a test in your -application for the case that the input buffer is completely full and yet -the decoder has suspended without consuming any data --- otherwise, if this -situation did occur, it would lead to an endless loop. (The library can't -provide this test since it has no idea whether "the buffer is full", or -even whether there is a fixed-size input buffer.) - -The input buffer would need to be 64K to allow for arbitrary COM or APPn -markers, but these are handled specially: they are either saved into allocated -memory, or skipped over by calling skip_input_data(). In the former case, -suspension is handled correctly, and in the latter case, the problem of -buffer overrun is placed on skip_input_data's shoulders, as explained above. -Note that if you provide your own marker handling routine for large markers, -you should consider how to deal with buffer overflow. - -Multiple-buffer management: - -In some applications it is desirable to store the compressed data in a linked -list of buffer areas, so as to avoid data copying. This can be handled by -having empty_output_buffer() or fill_input_buffer() set the pointer and count -to reference the next available buffer; FALSE is returned only if no more -buffers are available. Although seemingly straightforward, there is a -pitfall in this approach: the backtrack that occurs when FALSE is returned -could back up into an earlier buffer. For example, when fill_input_buffer() -is called, the current pointer & count indicate the backtrack restart point. -Since fill_input_buffer() will set the pointer and count to refer to a new -buffer, the restart position must be saved somewhere else. Suppose a second -call to fill_input_buffer() occurs in the same library call, and no -additional input data is available, so fill_input_buffer must return FALSE. -If the JPEG library has not moved the pointer/count forward in the current -buffer, then *the correct restart point is the saved position in the prior -buffer*. Prior buffers may be discarded only after the library establishes -a restart point within a later buffer. Similar remarks apply for output into -a chain of buffers. - -The library will never attempt to backtrack over a skip_input_data() call, -so any skipped data can be permanently discarded. You still have to deal -with the case of skipping not-yet-received data, however. - -It's much simpler to use only a single buffer; when fill_input_buffer() is -called, move any unconsumed data (beyond the current pointer/count) down to -the beginning of this buffer and then load new data into the remaining buffer -space. This approach requires a little more data copying but is far easier -to get right. - - -Progressive JPEG support ------------------------- - -Progressive JPEG rearranges the stored data into a series of scans of -increasing quality. In situations where a JPEG file is transmitted across a -slow communications link, a decoder can generate a low-quality image very -quickly from the first scan, then gradually improve the displayed quality as -more scans are received. The final image after all scans are complete is -identical to that of a regular (sequential) JPEG file of the same quality -setting. Progressive JPEG files are often slightly smaller than equivalent -sequential JPEG files, but the possibility of incremental display is the main -reason for using progressive JPEG. - -The IJG encoder library generates progressive JPEG files when given a -suitable "scan script" defining how to divide the data into scans. -Creation of progressive JPEG files is otherwise transparent to the encoder. -Progressive JPEG files can also be read transparently by the decoder library. -If the decoding application simply uses the library as defined above, it -will receive a final decoded image without any indication that the file was -progressive. Of course, this approach does not allow incremental display. -To perform incremental display, an application needs to use the decoder -library's "buffered-image" mode, in which it receives a decoded image -multiple times. - -Each displayed scan requires about as much work to decode as a full JPEG -image of the same size, so the decoder must be fairly fast in relation to the -data transmission rate in order to make incremental display useful. However, -it is possible to skip displaying the image and simply add the incoming bits -to the decoder's coefficient buffer. This is fast because only Huffman -decoding need be done, not IDCT, upsampling, colorspace conversion, etc. -The IJG decoder library allows the application to switch dynamically between -displaying the image and simply absorbing the incoming bits. A properly -coded application can automatically adapt the number of display passes to -suit the time available as the image is received. Also, a final -higher-quality display cycle can be performed from the buffered data after -the end of the file is reached. - -Progressive compression: - -To create a progressive JPEG file (or a multiple-scan sequential JPEG file), -set the scan_info cinfo field to point to an array of scan descriptors, and -perform compression as usual. Instead of constructing your own scan list, -you can call the jpeg_simple_progression() helper routine to create a -recommended progression sequence; this method should be used by all -applications that don't want to get involved in the nitty-gritty of -progressive scan sequence design. (If you want to provide user control of -scan sequences, you may wish to borrow the scan script reading code found -in rdswitch.c, so that you can read scan script files just like cjpeg's.) -When scan_info is not NULL, the compression library will store DCT'd data -into a buffer array as jpeg_write_scanlines() is called, and will emit all -the requested scans during jpeg_finish_compress(). This implies that -multiple-scan output cannot be created with a suspending data destination -manager, since jpeg_finish_compress() does not support suspension. We -should also note that the compressor currently forces Huffman optimization -mode when creating a progressive JPEG file, because the default Huffman -tables are unsuitable for progressive files. - -Progressive decompression: - -When buffered-image mode is not used, the decoder library will read all of -a multi-scan file during jpeg_start_decompress(), so that it can provide a -final decoded image. (Here "multi-scan" means either progressive or -multi-scan sequential.) This makes multi-scan files transparent to the -decoding application. However, existing applications that used suspending -input with version 5 of the IJG library will need to be modified to check -for a suspension return from jpeg_start_decompress(). - -To perform incremental display, an application must use the library's -buffered-image mode. This is described in the next section. - - -Buffered-image mode -------------------- - -In buffered-image mode, the library stores the partially decoded image in a -coefficient buffer, from which it can be read out as many times as desired. -This mode is typically used for incremental display of progressive JPEG files, -but it can be used with any JPEG file. Each scan of a progressive JPEG file -adds more data (more detail) to the buffered image. The application can -display in lockstep with the source file (one display pass per input scan), -or it can allow input processing to outrun display processing. By making -input and display processing run independently, it is possible for the -application to adapt progressive display to a wide range of data transmission -rates. - -The basic control flow for buffered-image decoding is - - jpeg_create_decompress() - set data source - jpeg_read_header() - set overall decompression parameters - cinfo.buffered_image = TRUE; /* select buffered-image mode */ - jpeg_start_decompress() - for (each output pass) { - adjust output decompression parameters if required - jpeg_start_output() /* start a new output pass */ - for (all scanlines in image) { - jpeg_read_scanlines() - display scanlines - } - jpeg_finish_output() /* terminate output pass */ - } - jpeg_finish_decompress() - jpeg_destroy_decompress() - -This differs from ordinary unbuffered decoding in that there is an additional -level of looping. The application can choose how many output passes to make -and how to display each pass. - -The simplest approach to displaying progressive images is to do one display -pass for each scan appearing in the input file. In this case the outer loop -condition is typically - while (! jpeg_input_complete(&cinfo)) -and the start-output call should read - jpeg_start_output(&cinfo, cinfo.input_scan_number); -The second parameter to jpeg_start_output() indicates which scan of the input -file is to be displayed; the scans are numbered starting at 1 for this -purpose. (You can use a loop counter starting at 1 if you like, but using -the library's input scan counter is easier.) The library automatically reads -data as necessary to complete each requested scan, and jpeg_finish_output() -advances to the next scan or end-of-image marker (hence input_scan_number -will be incremented by the time control arrives back at jpeg_start_output()). -With this technique, data is read from the input file only as needed, and -input and output processing run in lockstep. - -After reading the final scan and reaching the end of the input file, the -buffered image remains available; it can be read additional times by -repeating the jpeg_start_output()/jpeg_read_scanlines()/jpeg_finish_output() -sequence. For example, a useful technique is to use fast one-pass color -quantization for display passes made while the image is arriving, followed by -a final display pass using two-pass quantization for highest quality. This -is done by changing the library parameters before the final output pass. -Changing parameters between passes is discussed in detail below. - -In general the last scan of a progressive file cannot be recognized as such -until after it is read, so a post-input display pass is the best approach if -you want special processing in the final pass. - -When done with the image, be sure to call jpeg_finish_decompress() to release -the buffered image (or just use jpeg_destroy_decompress()). - -If input data arrives faster than it can be displayed, the application can -cause the library to decode input data in advance of what's needed to produce -output. This is done by calling the routine jpeg_consume_input(). -The return value is one of the following: - JPEG_REACHED_SOS: reached an SOS marker (the start of a new scan) - JPEG_REACHED_EOI: reached the EOI marker (end of image) - JPEG_ROW_COMPLETED: completed reading one MCU row of compressed data - JPEG_SCAN_COMPLETED: completed reading last MCU row of current scan - JPEG_SUSPENDED: suspended before completing any of the above -(JPEG_SUSPENDED can occur only if a suspending data source is used.) This -routine can be called at any time after initializing the JPEG object. It -reads some additional data and returns when one of the indicated significant -events occurs. (If called after the EOI marker is reached, it will -immediately return JPEG_REACHED_EOI without attempting to read more data.) - -The library's output processing will automatically call jpeg_consume_input() -whenever the output processing overtakes the input; thus, simple lockstep -display requires no direct calls to jpeg_consume_input(). But by adding -calls to jpeg_consume_input(), you can absorb data in advance of what is -being displayed. This has two benefits: - * You can limit buildup of unprocessed data in your input buffer. - * You can eliminate extra display passes by paying attention to the - state of the library's input processing. - -The first of these benefits only requires interspersing calls to -jpeg_consume_input() with your display operations and any other processing -you may be doing. To avoid wasting cycles due to backtracking, it's best to -call jpeg_consume_input() only after a hundred or so new bytes have arrived. -This is discussed further under "I/O suspension", above. (Note: the JPEG -library currently is not thread-safe. You must not call jpeg_consume_input() -from one thread of control if a different library routine is working on the -same JPEG object in another thread.) - -When input arrives fast enough that more than one new scan is available -before you start a new output pass, you may as well skip the output pass -corresponding to the completed scan. This occurs for free if you pass -cinfo.input_scan_number as the target scan number to jpeg_start_output(). -The input_scan_number field is simply the index of the scan currently being -consumed by the input processor. You can ensure that this is up-to-date by -emptying the input buffer just before calling jpeg_start_output(): call -jpeg_consume_input() repeatedly until it returns JPEG_SUSPENDED or -JPEG_REACHED_EOI. - -The target scan number passed to jpeg_start_output() is saved in the -cinfo.output_scan_number field. The library's output processing calls -jpeg_consume_input() whenever the current input scan number and row within -that scan is less than or equal to the current output scan number and row. -Thus, input processing can "get ahead" of the output processing but is not -allowed to "fall behind". You can achieve several different effects by -manipulating this interlock rule. For example, if you pass a target scan -number greater than the current input scan number, the output processor will -wait until that scan starts to arrive before producing any output. (To avoid -an infinite loop, the target scan number is automatically reset to the last -scan number when the end of image is reached. Thus, if you specify a large -target scan number, the library will just absorb the entire input file and -then perform an output pass. This is effectively the same as what -jpeg_start_decompress() does when you don't select buffered-image mode.) -When you pass a target scan number equal to the current input scan number, -the image is displayed no faster than the current input scan arrives. The -final possibility is to pass a target scan number less than the current input -scan number; this disables the input/output interlock and causes the output -processor to simply display whatever it finds in the image buffer, without -waiting for input. (However, the library will not accept a target scan -number less than one, so you can't avoid waiting for the first scan.) - -When data is arriving faster than the output display processing can advance -through the image, jpeg_consume_input() will store data into the buffered -image beyond the point at which the output processing is reading data out -again. If the input arrives fast enough, it may "wrap around" the buffer to -the point where the input is more than one whole scan ahead of the output. -If the output processing simply proceeds through its display pass without -paying attention to the input, the effect seen on-screen is that the lower -part of the image is one or more scans better in quality than the upper part. -Then, when the next output scan is started, you have a choice of what target -scan number to use. The recommended choice is to use the current input scan -number at that time, which implies that you've skipped the output scans -corresponding to the input scans that were completed while you processed the -previous output scan. In this way, the decoder automatically adapts its -speed to the arriving data, by skipping output scans as necessary to keep up -with the arriving data. - -When using this strategy, you'll want to be sure that you perform a final -output pass after receiving all the data; otherwise your last display may not -be full quality across the whole screen. So the right outer loop logic is -something like this: - do { - absorb any waiting input by calling jpeg_consume_input() - final_pass = jpeg_input_complete(&cinfo); - adjust output decompression parameters if required - jpeg_start_output(&cinfo, cinfo.input_scan_number); - ... - jpeg_finish_output() - } while (! final_pass); -rather than quitting as soon as jpeg_input_complete() returns TRUE. This -arrangement makes it simple to use higher-quality decoding parameters -for the final pass. But if you don't want to use special parameters for -the final pass, the right loop logic is like this: - for (;;) { - absorb any waiting input by calling jpeg_consume_input() - jpeg_start_output(&cinfo, cinfo.input_scan_number); - ... - jpeg_finish_output() - if (jpeg_input_complete(&cinfo) && - cinfo.input_scan_number == cinfo.output_scan_number) - break; - } -In this case you don't need to know in advance whether an output pass is to -be the last one, so it's not necessary to have reached EOF before starting -the final output pass; rather, what you want to test is whether the output -pass was performed in sync with the final input scan. This form of the loop -will avoid an extra output pass whenever the decoder is able (or nearly able) -to keep up with the incoming data. - -When the data transmission speed is high, you might begin a display pass, -then find that much or all of the file has arrived before you can complete -the pass. (You can detect this by noting the JPEG_REACHED_EOI return code -from jpeg_consume_input(), or equivalently by testing jpeg_input_complete().) -In this situation you may wish to abort the current display pass and start a -new one using the newly arrived information. To do so, just call -jpeg_finish_output() and then start a new pass with jpeg_start_output(). - -A variant strategy is to abort and restart display if more than one complete -scan arrives during an output pass; this can be detected by noting -JPEG_REACHED_SOS returns and/or examining cinfo.input_scan_number. This -idea should be employed with caution, however, since the display process -might never get to the bottom of the image before being aborted, resulting -in the lower part of the screen being several passes worse than the upper. -In most cases it's probably best to abort an output pass only if the whole -file has arrived and you want to begin the final output pass immediately. - -When receiving data across a communication link, we recommend always using -the current input scan number for the output target scan number; if a -higher-quality final pass is to be done, it should be started (aborting any -incomplete output pass) as soon as the end of file is received. However, -many other strategies are possible. For example, the application can examine -the parameters of the current input scan and decide whether to display it or -not. If the scan contains only chroma data, one might choose not to use it -as the target scan, expecting that the scan will be small and will arrive -quickly. To skip to the next scan, call jpeg_consume_input() until it -returns JPEG_REACHED_SOS or JPEG_REACHED_EOI. Or just use the next higher -number as the target scan for jpeg_start_output(); but that method doesn't -let you inspect the next scan's parameters before deciding to display it. - - -In buffered-image mode, jpeg_start_decompress() never performs input and -thus never suspends. An application that uses input suspension with -buffered-image mode must be prepared for suspension returns from these -routines: -* jpeg_start_output() performs input only if you request 2-pass quantization - and the target scan isn't fully read yet. (This is discussed below.) -* jpeg_read_scanlines(), as always, returns the number of scanlines that it - was able to produce before suspending. -* jpeg_finish_output() will read any markers following the target scan, - up to the end of the file or the SOS marker that begins another scan. - (But it reads no input if jpeg_consume_input() has already reached the - end of the file or a SOS marker beyond the target output scan.) -* jpeg_finish_decompress() will read until the end of file, and thus can - suspend if the end hasn't already been reached (as can be tested by - calling jpeg_input_complete()). -jpeg_start_output(), jpeg_finish_output(), and jpeg_finish_decompress() -all return TRUE if they completed their tasks, FALSE if they had to suspend. -In the event of a FALSE return, the application must load more input data -and repeat the call. Applications that use non-suspending data sources need -not check the return values of these three routines. - - -It is possible to change decoding parameters between output passes in the -buffered-image mode. The decoder library currently supports only very -limited changes of parameters. ONLY THE FOLLOWING parameter changes are -allowed after jpeg_start_decompress() is called: -* dct_method can be changed before each call to jpeg_start_output(). - For example, one could use a fast DCT method for early scans, changing - to a higher quality method for the final scan. -* dither_mode can be changed before each call to jpeg_start_output(); - of course this has no impact if not using color quantization. Typically - one would use ordered dither for initial passes, then switch to - Floyd-Steinberg dither for the final pass. Caution: changing dither mode - can cause more memory to be allocated by the library. Although the amount - of memory involved is not large (a scanline or so), it may cause the - initial max_memory_to_use specification to be exceeded, which in the worst - case would result in an out-of-memory failure. -* do_block_smoothing can be changed before each call to jpeg_start_output(). - This setting is relevant only when decoding a progressive JPEG image. - During the first DC-only scan, block smoothing provides a very "fuzzy" look - instead of the very "blocky" look seen without it; which is better seems a - matter of personal taste. But block smoothing is nearly always a win - during later stages, especially when decoding a successive-approximation - image: smoothing helps to hide the slight blockiness that otherwise shows - up on smooth gradients until the lowest coefficient bits are sent. -* Color quantization mode can be changed under the rules described below. - You *cannot* change between full-color and quantized output (because that - would alter the required I/O buffer sizes), but you can change which - quantization method is used. - -When generating color-quantized output, changing quantization method is a -very useful way of switching between high-speed and high-quality display. -The library allows you to change among its three quantization methods: -1. Single-pass quantization to a fixed color cube. - Selected by cinfo.two_pass_quantize = FALSE and cinfo.colormap = NULL. -2. Single-pass quantization to an application-supplied colormap. - Selected by setting cinfo.colormap to point to the colormap (the value of - two_pass_quantize is ignored); also set cinfo.actual_number_of_colors. -3. Two-pass quantization to a colormap chosen specifically for the image. - Selected by cinfo.two_pass_quantize = TRUE and cinfo.colormap = NULL. - (This is the default setting selected by jpeg_read_header, but it is - probably NOT what you want for the first pass of progressive display!) -These methods offer successively better quality and lesser speed. However, -only the first method is available for quantizing in non-RGB color spaces. - -IMPORTANT: because the different quantizer methods have very different -working-storage requirements, the library requires you to indicate which -one(s) you intend to use before you call jpeg_start_decompress(). (If we did -not require this, the max_memory_to_use setting would be a complete fiction.) -You do this by setting one or more of these three cinfo fields to TRUE: - enable_1pass_quant Fixed color cube colormap - enable_external_quant Externally-supplied colormap - enable_2pass_quant Two-pass custom colormap -All three are initialized FALSE by jpeg_read_header(). But -jpeg_start_decompress() automatically sets TRUE the one selected by the -current two_pass_quantize and colormap settings, so you only need to set the -enable flags for any other quantization methods you plan to change to later. - -After setting the enable flags correctly at jpeg_start_decompress() time, you -can change to any enabled quantization method by setting two_pass_quantize -and colormap properly just before calling jpeg_start_output(). The following -special rules apply: -1. You must explicitly set cinfo.colormap to NULL when switching to 1-pass - or 2-pass mode from a different mode, or when you want the 2-pass - quantizer to be re-run to generate a new colormap. -2. To switch to an external colormap, or to change to a different external - colormap than was used on the prior pass, you must call - jpeg_new_colormap() after setting cinfo.colormap. -NOTE: if you want to use the same colormap as was used in the prior pass, -you should not do either of these things. This will save some nontrivial -switchover costs. -(These requirements exist because cinfo.colormap will always be non-NULL -after completing a prior output pass, since both the 1-pass and 2-pass -quantizers set it to point to their output colormaps. Thus you have to -do one of these two things to notify the library that something has changed. -Yup, it's a bit klugy, but it's necessary to do it this way for backwards -compatibility.) - -Note that in buffered-image mode, the library generates any requested colormap -during jpeg_start_output(), not during jpeg_start_decompress(). - -When using two-pass quantization, jpeg_start_output() makes a pass over the -buffered image to determine the optimum color map; it therefore may take a -significant amount of time, whereas ordinarily it does little work. The -progress monitor hook is called during this pass, if defined. It is also -important to realize that if the specified target scan number is greater than -or equal to the current input scan number, jpeg_start_output() will attempt -to consume input as it makes this pass. If you use a suspending data source, -you need to check for a FALSE return from jpeg_start_output() under these -conditions. The combination of 2-pass quantization and a not-yet-fully-read -target scan is the only case in which jpeg_start_output() will consume input. - - -Application authors who support buffered-image mode may be tempted to use it -for all JPEG images, even single-scan ones. This will work, but it is -inefficient: there is no need to create an image-sized coefficient buffer for -single-scan images. Requesting buffered-image mode for such an image wastes -memory. Worse, it can cost time on large images, since the buffered data has -to be swapped out or written to a temporary file. If you are concerned about -maximum performance on baseline JPEG files, you should use buffered-image -mode only when the incoming file actually has multiple scans. This can be -tested by calling jpeg_has_multiple_scans(), which will return a correct -result at any time after jpeg_read_header() completes. - -It is also worth noting that when you use jpeg_consume_input() to let input -processing get ahead of output processing, the resulting pattern of access to -the coefficient buffer is quite nonsequential. It's best to use the memory -manager jmemnobs.c if you can (ie, if you have enough real or virtual main -memory). If not, at least make sure that max_memory_to_use is set as high as -possible. If the JPEG memory manager has to use a temporary file, you will -probably see a lot of disk traffic and poor performance. (This could be -improved with additional work on the memory manager, but we haven't gotten -around to it yet.) - -In some applications it may be convenient to use jpeg_consume_input() for all -input processing, including reading the initial markers; that is, you may -wish to call jpeg_consume_input() instead of jpeg_read_header() during -startup. This works, but note that you must check for JPEG_REACHED_SOS and -JPEG_REACHED_EOI return codes as the equivalent of jpeg_read_header's codes. -Once the first SOS marker has been reached, you must call -jpeg_start_decompress() before jpeg_consume_input() will consume more input; -it'll just keep returning JPEG_REACHED_SOS until you do. If you read a -tables-only file this way, jpeg_consume_input() will return JPEG_REACHED_EOI -without ever returning JPEG_REACHED_SOS; be sure to check for this case. -If this happens, the decompressor will not read any more input until you call -jpeg_abort() to reset it. It is OK to call jpeg_consume_input() even when not -using buffered-image mode, but in that case it's basically a no-op after the -initial markers have been read: it will just return JPEG_SUSPENDED. - - -Abbreviated datastreams and multiple images -------------------------------------------- - -A JPEG compression or decompression object can be reused to process multiple -images. This saves a small amount of time per image by eliminating the -"create" and "destroy" operations, but that isn't the real purpose of the -feature. Rather, reuse of an object provides support for abbreviated JPEG -datastreams. Object reuse can also simplify processing a series of images in -a single input or output file. This section explains these features. - -A JPEG file normally contains several hundred bytes worth of quantization -and Huffman tables. In a situation where many images will be stored or -transmitted with identical tables, this may represent an annoying overhead. -The JPEG standard therefore permits tables to be omitted. The standard -defines three classes of JPEG datastreams: - * "Interchange" datastreams contain an image and all tables needed to decode - the image. These are the usual kind of JPEG file. - * "Abbreviated image" datastreams contain an image, but are missing some or - all of the tables needed to decode that image. - * "Abbreviated table specification" (henceforth "tables-only") datastreams - contain only table specifications. -To decode an abbreviated image, it is necessary to load the missing table(s) -into the decoder beforehand. This can be accomplished by reading a separate -tables-only file. A variant scheme uses a series of images in which the first -image is an interchange (complete) datastream, while subsequent ones are -abbreviated and rely on the tables loaded by the first image. It is assumed -that once the decoder has read a table, it will remember that table until a -new definition for the same table number is encountered. - -It is the application designer's responsibility to figure out how to associate -the correct tables with an abbreviated image. While abbreviated datastreams -can be useful in a closed environment, their use is strongly discouraged in -any situation where data exchange with other applications might be needed. -Caveat designer. - -The JPEG library provides support for reading and writing any combination of -tables-only datastreams and abbreviated images. In both compression and -decompression objects, a quantization or Huffman table will be retained for -the lifetime of the object, unless it is overwritten by a new table definition. - - -To create abbreviated image datastreams, it is only necessary to tell the -compressor not to emit some or all of the tables it is using. Each -quantization and Huffman table struct contains a boolean field "sent_table", -which normally is initialized to FALSE. For each table used by the image, the -header-writing process emits the table and sets sent_table = TRUE unless it is -already TRUE. (In normal usage, this prevents outputting the same table -definition multiple times, as would otherwise occur because the chroma -components typically share tables.) Thus, setting this field to TRUE before -calling jpeg_start_compress() will prevent the table from being written at -all. - -If you want to create a "pure" abbreviated image file containing no tables, -just call "jpeg_suppress_tables(&cinfo, TRUE)" after constructing all the -tables. If you want to emit some but not all tables, you'll need to set the -individual sent_table fields directly. - -To create an abbreviated image, you must also call jpeg_start_compress() -with a second parameter of FALSE, not TRUE. Otherwise jpeg_start_compress() -will force all the sent_table fields to FALSE. (This is a safety feature to -prevent abbreviated images from being created accidentally.) - -To create a tables-only file, perform the same parameter setup that you -normally would, but instead of calling jpeg_start_compress() and so on, call -jpeg_write_tables(&cinfo). This will write an abbreviated datastream -containing only SOI, DQT and/or DHT markers, and EOI. All the quantization -and Huffman tables that are currently defined in the compression object will -be emitted unless their sent_tables flag is already TRUE, and then all the -sent_tables flags will be set TRUE. - -A sure-fire way to create matching tables-only and abbreviated image files -is to proceed as follows: - - create JPEG compression object - set JPEG parameters - set destination to tables-only file - jpeg_write_tables(&cinfo); - set destination to image file - jpeg_start_compress(&cinfo, FALSE); - write data... - jpeg_finish_compress(&cinfo); - -Since the JPEG parameters are not altered between writing the table file and -the abbreviated image file, the same tables are sure to be used. Of course, -you can repeat the jpeg_start_compress() ... jpeg_finish_compress() sequence -many times to produce many abbreviated image files matching the table file. - -You cannot suppress output of the computed Huffman tables when Huffman -optimization is selected. (If you could, there'd be no way to decode the -image...) Generally, you don't want to set optimize_coding = TRUE when -you are trying to produce abbreviated files. - -In some cases you might want to compress an image using tables which are -not stored in the application, but are defined in an interchange or -tables-only file readable by the application. This can be done by setting up -a JPEG decompression object to read the specification file, then copying the -tables into your compression object. See jpeg_copy_critical_parameters() -for an example of copying quantization tables. - - -To read abbreviated image files, you simply need to load the proper tables -into the decompression object before trying to read the abbreviated image. -If the proper tables are stored in the application program, you can just -allocate the table structs and fill in their contents directly. For example, -to load a fixed quantization table into table slot "n": - - if (cinfo.quant_tbl_ptrs[n] == NULL) - cinfo.quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) &cinfo); - quant_ptr = cinfo.quant_tbl_ptrs[n]; /* quant_ptr is JQUANT_TBL* */ - for (i = 0; i < 64; i++) { - /* Qtable[] is desired quantization table, in natural array order */ - quant_ptr->quantval[i] = Qtable[i]; - } - -Code to load a fixed Huffman table is typically (for AC table "n"): - - if (cinfo.ac_huff_tbl_ptrs[n] == NULL) - cinfo.ac_huff_tbl_ptrs[n] = jpeg_alloc_huff_table((j_common_ptr) &cinfo); - huff_ptr = cinfo.ac_huff_tbl_ptrs[n]; /* huff_ptr is JHUFF_TBL* */ - for (i = 1; i <= 16; i++) { - /* counts[i] is number of Huffman codes of length i bits, i=1..16 */ - huff_ptr->bits[i] = counts[i]; - } - for (i = 0; i < 256; i++) { - /* symbols[] is the list of Huffman symbols, in code-length order */ - huff_ptr->huffval[i] = symbols[i]; - } - -(Note that trying to set cinfo.quant_tbl_ptrs[n] to point directly at a -constant JQUANT_TBL object is not safe. If the incoming file happened to -contain a quantization table definition, your master table would get -overwritten! Instead allocate a working table copy and copy the master table -into it, as illustrated above. Ditto for Huffman tables, of course.) - -You might want to read the tables from a tables-only file, rather than -hard-wiring them into your application. The jpeg_read_header() call is -sufficient to read a tables-only file. You must pass a second parameter of -FALSE to indicate that you do not require an image to be present. Thus, the -typical scenario is - - create JPEG decompression object - set source to tables-only file - jpeg_read_header(&cinfo, FALSE); - set source to abbreviated image file - jpeg_read_header(&cinfo, TRUE); - set decompression parameters - jpeg_start_decompress(&cinfo); - read data... - jpeg_finish_decompress(&cinfo); - -In some cases, you may want to read a file without knowing whether it contains -an image or just tables. In that case, pass FALSE and check the return value -from jpeg_read_header(): it will be JPEG_HEADER_OK if an image was found, -JPEG_HEADER_TABLES_ONLY if only tables were found. (A third return value, -JPEG_SUSPENDED, is possible when using a suspending data source manager.) -Note that jpeg_read_header() will not complain if you read an abbreviated -image for which you haven't loaded the missing tables; the missing-table check -occurs later, in jpeg_start_decompress(). - - -It is possible to read a series of images from a single source file by -repeating the jpeg_read_header() ... jpeg_finish_decompress() sequence, -without releasing/recreating the JPEG object or the data source module. -(If you did reinitialize, any partial bufferload left in the data source -buffer at the end of one image would be discarded, causing you to lose the -start of the next image.) When you use this method, stored tables are -automatically carried forward, so some of the images can be abbreviated images -that depend on tables from earlier images. - -If you intend to write a series of images into a single destination file, -you might want to make a specialized data destination module that doesn't -flush the output buffer at term_destination() time. This would speed things -up by some trifling amount. Of course, you'd need to remember to flush the -buffer after the last image. You can make the later images be abbreviated -ones by passing FALSE to jpeg_start_compress(). - - -Special markers ---------------- - -Some applications may need to insert or extract special data in the JPEG -datastream. The JPEG standard provides marker types "COM" (comment) and -"APP0" through "APP15" (application) to hold application-specific data. -Unfortunately, the use of these markers is not specified by the standard. -COM markers are fairly widely used to hold user-supplied text. The JFIF file -format spec uses APP0 markers with specified initial strings to hold certain -data. Adobe applications use APP14 markers beginning with the string "Adobe" -for miscellaneous data. Other APPn markers are rarely seen, but might -contain almost anything. - -If you wish to store user-supplied text, we recommend you use COM markers -and place readable 7-bit ASCII text in them. Newline conventions are not -standardized --- expect to find LF (Unix style), CR/LF (DOS style), or CR -(Mac style). A robust COM reader should be able to cope with random binary -garbage, including nulls, since some applications generate COM markers -containing non-ASCII junk. (But yours should not be one of them.) - -For program-supplied data, use an APPn marker, and be sure to begin it with an -identifying string so that you can tell whether the marker is actually yours. -It's probably best to avoid using APP0 or APP14 for any private markers. -(NOTE: the upcoming SPIFF standard will use APP8 markers; we recommend you -not use APP8 markers for any private purposes, either.) - -Keep in mind that at most 65533 bytes can be put into one marker, but you -can have as many markers as you like. - -By default, the IJG compression library will write a JFIF APP0 marker if the -selected JPEG colorspace is grayscale or YCbCr, or an Adobe APP14 marker if -the selected colorspace is RGB, CMYK, or YCCK. You can disable this, but -we don't recommend it. The decompression library will recognize JFIF and -Adobe markers and will set the JPEG colorspace properly when one is found. - - -You can write special markers immediately following the datastream header by -calling jpeg_write_marker() after jpeg_start_compress() and before the first -call to jpeg_write_scanlines(). When you do this, the markers appear after -the SOI and the JFIF APP0 and Adobe APP14 markers (if written), but before -all else. Specify the marker type parameter as "JPEG_COM" for COM or -"JPEG_APP0 + n" for APPn. (Actually, jpeg_write_marker will let you write -any marker type, but we don't recommend writing any other kinds of marker.) -For example, to write a user comment string pointed to by comment_text: - jpeg_write_marker(cinfo, JPEG_COM, comment_text, strlen(comment_text)); - -If it's not convenient to store all the marker data in memory at once, -you can instead call jpeg_write_m_header() followed by multiple calls to -jpeg_write_m_byte(). If you do it this way, it's your responsibility to -call jpeg_write_m_byte() exactly the number of times given in the length -parameter to jpeg_write_m_header(). (This method lets you empty the -output buffer partway through a marker, which might be important when -using a suspending data destination module. In any case, if you are using -a suspending destination, you should flush its buffer after inserting -any special markers. See "I/O suspension".) - -Or, if you prefer to synthesize the marker byte sequence yourself, -you can just cram it straight into the data destination module. - -If you are writing JFIF 1.02 extension markers (thumbnail images), don't -forget to set cinfo.JFIF_minor_version = 2 so that the encoder will write the -correct JFIF version number in the JFIF header marker. The library's default -is to write version 1.01, but that's wrong if you insert any 1.02 extension -markers. (We could probably get away with just defaulting to 1.02, but there -used to be broken decoders that would complain about unknown minor version -numbers. To reduce compatibility risks it's safest not to write 1.02 unless -you are actually using 1.02 extensions.) - - -When reading, two methods of handling special markers are available: -1. You can ask the library to save the contents of COM and/or APPn markers -into memory, and then examine them at your leisure afterwards. -2. You can supply your own routine to process COM and/or APPn markers -on-the-fly as they are read. -The first method is simpler to use, especially if you are using a suspending -data source; writing a marker processor that copes with input suspension is -not easy (consider what happens if the marker is longer than your available -input buffer). However, the second method conserves memory since the marker -data need not be kept around after it's been processed. - -For either method, you'd normally set up marker handling after creating a -decompression object and before calling jpeg_read_header(), because the -markers of interest will typically be near the head of the file and so will -be scanned by jpeg_read_header. Once you've established a marker handling -method, it will be used for the life of that decompression object -(potentially many datastreams), unless you change it. Marker handling is -determined separately for COM markers and for each APPn marker code. - - -To save the contents of special markers in memory, call - jpeg_save_markers(cinfo, marker_code, length_limit) -where marker_code is the marker type to save, JPEG_COM or JPEG_APP0+n. -(To arrange to save all the special marker types, you need to call this -routine 17 times, for COM and APP0-APP15.) If the incoming marker is longer -than length_limit data bytes, only length_limit bytes will be saved; this -parameter allows you to avoid chewing up memory when you only need to see the -first few bytes of a potentially large marker. If you want to save all the -data, set length_limit to 0xFFFF; that is enough since marker lengths are only -16 bits. As a special case, setting length_limit to 0 prevents that marker -type from being saved at all. (That is the default behavior, in fact.) - -After jpeg_read_header() completes, you can examine the special markers by -following the cinfo->marker_list pointer chain. All the special markers in -the file appear in this list, in order of their occurrence in the file (but -omitting any markers of types you didn't ask for). Both the original data -length and the saved data length are recorded for each list entry; the latter -will not exceed length_limit for the particular marker type. Note that these -lengths exclude the marker length word, whereas the stored representation -within the JPEG file includes it. (Hence the maximum data length is really -only 65533.) - -It is possible that additional special markers appear in the file beyond the -SOS marker at which jpeg_read_header stops; if so, the marker list will be -extended during reading of the rest of the file. This is not expected to be -common, however. If you are short on memory you may want to reset the length -limit to zero for all marker types after finishing jpeg_read_header, to -ensure that the max_memory_to_use setting cannot be exceeded due to addition -of later markers. - -The marker list remains stored until you call jpeg_finish_decompress or -jpeg_abort, at which point the memory is freed and the list is set to empty. -(jpeg_destroy also releases the storage, of course.) - -Note that the library is internally interested in APP0 and APP14 markers; -if you try to set a small nonzero length limit on these types, the library -will silently force the length up to the minimum it wants. (But you can set -a zero length limit to prevent them from being saved at all.) Also, in a -16-bit environment, the maximum length limit may be constrained to less than -65533 by malloc() limitations. It is therefore best not to assume that the -effective length limit is exactly what you set it to be. - - -If you want to supply your own marker-reading routine, you do it by calling -jpeg_set_marker_processor(). A marker processor routine must have the -signature - boolean jpeg_marker_parser_method (j_decompress_ptr cinfo) -Although the marker code is not explicitly passed, the routine can find it -in cinfo->unread_marker. At the time of call, the marker proper has been -read from the data source module. The processor routine is responsible for -reading the marker length word and the remaining parameter bytes, if any. -Return TRUE to indicate success. (FALSE should be returned only if you are -using a suspending data source and it tells you to suspend. See the standard -marker processors in jdmarker.c for appropriate coding methods if you need to -use a suspending data source.) - -If you override the default APP0 or APP14 processors, it is up to you to -recognize JFIF and Adobe markers if you want colorspace recognition to occur -properly. We recommend copying and extending the default processors if you -want to do that. (A better idea is to save these marker types for later -examination by calling jpeg_save_markers(); that method doesn't interfere -with the library's own processing of these markers.) - -jpeg_set_marker_processor() and jpeg_save_markers() are mutually exclusive ---- if you call one it overrides any previous call to the other, for the -particular marker type specified. - -A simple example of an external COM processor can be found in djpeg.c. -Also, see jpegtran.c for an example of using jpeg_save_markers. - - -Raw (downsampled) image data ----------------------------- - -Some applications need to supply already-downsampled image data to the JPEG -compressor, or to receive raw downsampled data from the decompressor. The -library supports this requirement by allowing the application to write or -read raw data, bypassing the normal preprocessing or postprocessing steps. -The interface is different from the standard one and is somewhat harder to -use. If your interest is merely in bypassing color conversion, we recommend -that you use the standard interface and simply set jpeg_color_space = -in_color_space (or jpeg_color_space = out_color_space for decompression). -The mechanism described in this section is necessary only to supply or -receive downsampled image data, in which not all components have the same -dimensions. - - -To compress raw data, you must supply the data in the colorspace to be used -in the JPEG file (please read the earlier section on Special color spaces) -and downsampled to the sampling factors specified in the JPEG parameters. -You must supply the data in the format used internally by the JPEG library, -namely a JSAMPIMAGE array. This is an array of pointers to two-dimensional -arrays, each of type JSAMPARRAY. Each 2-D array holds the values for one -color component. This structure is necessary since the components are of -different sizes. If the image dimensions are not a multiple of the MCU size, -you must also pad the data correctly (usually, this is done by replicating -the last column and/or row). The data must be padded to a multiple of a DCT -block in each component: that is, each downsampled row must contain a -multiple of DCT_h_scaled_size valid samples, and there must be a multiple of -DCT_v_scaled_size sample rows for each component. (For applications such as -conversion of digital TV images, the standard image size is usually a -multiple of the DCT block size, so that no padding need actually be done.) - -The procedure for compression of raw data is basically the same as normal -compression, except that you call jpeg_write_raw_data() in place of -jpeg_write_scanlines(). Before calling jpeg_start_compress(), you must do -the following: - * Set cinfo->raw_data_in to TRUE. (It is set FALSE by jpeg_set_defaults().) - This notifies the library that you will be supplying raw data. - * Ensure jpeg_color_space is correct --- an explicit jpeg_set_colorspace() - call is a good idea. Note that since color conversion is bypassed, - in_color_space is ignored, except that jpeg_set_defaults() uses it to - choose the default jpeg_color_space setting. - * Ensure the sampling factors, cinfo->comp_info[i].h_samp_factor and - cinfo->comp_info[i].v_samp_factor, are correct. Since these indicate the - dimensions of the data you are supplying, it's wise to set them - explicitly, rather than assuming the library's defaults are what you want. - -To pass raw data to the library, call jpeg_write_raw_data() in place of -jpeg_write_scanlines(). The two routines work similarly except that -jpeg_write_raw_data takes a JSAMPIMAGE data array rather than JSAMPARRAY. -The scanlines count passed to and returned from jpeg_write_raw_data is -measured in terms of the component with the largest v_samp_factor. - -jpeg_write_raw_data() processes one MCU row per call, which is to say -v_samp_factor*min_DCT_v_scaled_size sample rows of each component. The passed -num_lines value must be at least max_v_samp_factor*min_DCT_v_scaled_size, and -the return value will be exactly that amount (or possibly some multiple of -that amount, in future library versions). This is true even on the last call -at the bottom of the image; don't forget to pad your data as necessary. - -The required dimensions of the supplied data can be computed for each -component as - cinfo->comp_info[i].width_in_blocks * - cinfo->comp_info[i].DCT_h_scaled_size samples per row - cinfo->comp_info[i].height_in_blocks * - cinfo->comp_info[i].DCT_v_scaled_size rows in image -after jpeg_start_compress() has initialized those fields. If the valid data -is smaller than this, it must be padded appropriately. For some sampling -factors and image sizes, additional dummy DCT blocks are inserted to make -the image a multiple of the MCU dimensions. The library creates such dummy -blocks itself; it does not read them from your supplied data. Therefore you -need never pad by more than DCT_scaled_size samples. -An example may help here. Assume 2h2v downsampling of YCbCr data, that is - cinfo->comp_info[0].h_samp_factor = 2 for Y - cinfo->comp_info[0].v_samp_factor = 2 - cinfo->comp_info[1].h_samp_factor = 1 for Cb - cinfo->comp_info[1].v_samp_factor = 1 - cinfo->comp_info[2].h_samp_factor = 1 for Cr - cinfo->comp_info[2].v_samp_factor = 1 -and suppose that the nominal image dimensions (cinfo->image_width and -cinfo->image_height) are 101x101 pixels. Then jpeg_start_compress() will -compute downsampled_width = 101 and width_in_blocks = 13 for Y, -downsampled_width = 51 and width_in_blocks = 7 for Cb and Cr (and the same -for the height fields). You must pad the Y data to at least 13*8 = 104 -columns and rows, the Cb/Cr data to at least 7*8 = 56 columns and rows. The -MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16 -scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual -sample rows of Y and 8 each of Cb and Cr. A total of 7 MCU rows are needed, -so you must pass a total of 7*16 = 112 "scanlines". The last DCT block row -of Y data is dummy, so it doesn't matter what you pass for it in the data -arrays, but the scanlines count must total up to 112 so that all of the Cb -and Cr data gets passed. - -Output suspension is supported with raw-data compression: if the data -destination module suspends, jpeg_write_raw_data() will return 0. -In this case the same data rows must be passed again on the next call. - - -Decompression with raw data output implies bypassing all postprocessing: -you cannot ask for color quantization, for instance. More seriously, you -must deal with the color space and sampling factors present in the incoming -file. If your application only handles, say, 2h1v YCbCr data, you must -check for and fail on other color spaces or other sampling factors. -The library will not convert to a different color space for you. - -To obtain raw data output, set cinfo->raw_data_out = TRUE before -jpeg_start_decompress() (it is set FALSE by jpeg_read_header()). Be sure to -verify that the color space and sampling factors are ones you can handle. -Then call jpeg_read_raw_data() in place of jpeg_read_scanlines(). The -decompression process is otherwise the same as usual. - -jpeg_read_raw_data() returns one MCU row per call, and thus you must pass a -buffer of at least max_v_samp_factor*min_DCT_v_scaled_size scanlines (scanline -counting is the same as for raw-data compression). The buffer you pass must -be large enough to hold the actual data plus padding to DCT-block boundaries. -As with compression, any entirely dummy DCT blocks are not processed so you -need not allocate space for them, but the total scanline count includes them. -The above example of computing buffer dimensions for raw-data compression is -equally valid for decompression. - -Input suspension is supported with raw-data decompression: if the data source -module suspends, jpeg_read_raw_data() will return 0. You can also use -buffered-image mode to read raw data in multiple passes. - - -Really raw data: DCT coefficients ---------------------------------- - -It is possible to read or write the contents of a JPEG file as raw DCT -coefficients. This facility is mainly intended for use in lossless -transcoding between different JPEG file formats. Other possible applications -include lossless cropping of a JPEG image, lossless reassembly of a -multi-strip or multi-tile TIFF/JPEG file into a single JPEG datastream, etc. - -To read the contents of a JPEG file as DCT coefficients, open the file and do -jpeg_read_header() as usual. But instead of calling jpeg_start_decompress() -and jpeg_read_scanlines(), call jpeg_read_coefficients(). This will read the -entire image into a set of virtual coefficient-block arrays, one array per -component. The return value is a pointer to an array of virtual-array -descriptors. Each virtual array can be accessed directly using the JPEG -memory manager's access_virt_barray method (see Memory management, below, -and also read structure.txt's discussion of virtual array handling). Or, -for simple transcoding to a different JPEG file format, the array list can -just be handed directly to jpeg_write_coefficients(). - -Each block in the block arrays contains quantized coefficient values in -normal array order (not JPEG zigzag order). The block arrays contain only -DCT blocks containing real data; any entirely-dummy blocks added to fill out -interleaved MCUs at the right or bottom edges of the image are discarded -during reading and are not stored in the block arrays. (The size of each -block array can be determined from the width_in_blocks and height_in_blocks -fields of the component's comp_info entry.) This is also the data format -expected by jpeg_write_coefficients(). - -When you are done using the virtual arrays, call jpeg_finish_decompress() -to release the array storage and return the decompression object to an idle -state; or just call jpeg_destroy() if you don't need to reuse the object. - -If you use a suspending data source, jpeg_read_coefficients() will return -NULL if it is forced to suspend; a non-NULL return value indicates successful -completion. You need not test for a NULL return value when using a -non-suspending data source. - -It is also possible to call jpeg_read_coefficients() to obtain access to the -decoder's coefficient arrays during a normal decode cycle in buffered-image -mode. This frammish might be useful for progressively displaying an incoming -image and then re-encoding it without loss. To do this, decode in buffered- -image mode as discussed previously, then call jpeg_read_coefficients() after -the last jpeg_finish_output() call. The arrays will be available for your use -until you call jpeg_finish_decompress(). - - -To write the contents of a JPEG file as DCT coefficients, you must provide -the DCT coefficients stored in virtual block arrays. You can either pass -block arrays read from an input JPEG file by jpeg_read_coefficients(), or -allocate virtual arrays from the JPEG compression object and fill them -yourself. In either case, jpeg_write_coefficients() is substituted for -jpeg_start_compress() and jpeg_write_scanlines(). Thus the sequence is - * Create compression object - * Set all compression parameters as necessary - * Request virtual arrays if needed - * jpeg_write_coefficients() - * jpeg_finish_compress() - * Destroy or re-use compression object -jpeg_write_coefficients() is passed a pointer to an array of virtual block -array descriptors; the number of arrays is equal to cinfo.num_components. - -The virtual arrays need only have been requested, not realized, before -jpeg_write_coefficients() is called. A side-effect of -jpeg_write_coefficients() is to realize any virtual arrays that have been -requested from the compression object's memory manager. Thus, when obtaining -the virtual arrays from the compression object, you should fill the arrays -after calling jpeg_write_coefficients(). The data is actually written out -when you call jpeg_finish_compress(); jpeg_write_coefficients() only writes -the file header. - -When writing raw DCT coefficients, it is crucial that the JPEG quantization -tables and sampling factors match the way the data was encoded, or the -resulting file will be invalid. For transcoding from an existing JPEG file, -we recommend using jpeg_copy_critical_parameters(). This routine initializes -all the compression parameters to default values (like jpeg_set_defaults()), -then copies the critical information from a source decompression object. -The decompression object should have just been used to read the entire -JPEG input file --- that is, it should be awaiting jpeg_finish_decompress(). - -jpeg_write_coefficients() marks all tables stored in the compression object -as needing to be written to the output file (thus, it acts like -jpeg_start_compress(cinfo, TRUE)). This is for safety's sake, to avoid -emitting abbreviated JPEG files by accident. If you really want to emit an -abbreviated JPEG file, call jpeg_suppress_tables(), or set the tables' -individual sent_table flags, between calling jpeg_write_coefficients() and -jpeg_finish_compress(). - - -Progress monitoring -------------------- - -Some applications may need to regain control from the JPEG library every so -often. The typical use of this feature is to produce a percent-done bar or -other progress display. (For a simple example, see cjpeg.c or djpeg.c.) -Although you do get control back frequently during the data-transferring pass -(the jpeg_read_scanlines or jpeg_write_scanlines loop), any additional passes -will occur inside jpeg_finish_compress or jpeg_start_decompress; those -routines may take a long time to execute, and you don't get control back -until they are done. - -You can define a progress-monitor routine which will be called periodically -by the library. No guarantees are made about how often this call will occur, -so we don't recommend you use it for mouse tracking or anything like that. -At present, a call will occur once per MCU row, scanline, or sample row -group, whichever unit is convenient for the current processing mode; so the -wider the image, the longer the time between calls. During the data -transferring pass, only one call occurs per call of jpeg_read_scanlines or -jpeg_write_scanlines, so don't pass a large number of scanlines at once if -you want fine resolution in the progress count. (If you really need to use -the callback mechanism for time-critical tasks like mouse tracking, you could -insert additional calls inside some of the library's inner loops.) - -To establish a progress-monitor callback, create a struct jpeg_progress_mgr, -fill in its progress_monitor field with a pointer to your callback routine, -and set cinfo->progress to point to the struct. The callback will be called -whenever cinfo->progress is non-NULL. (This pointer is set to NULL by -jpeg_create_compress or jpeg_create_decompress; the library will not change -it thereafter. So if you allocate dynamic storage for the progress struct, -make sure it will live as long as the JPEG object does. Allocating from the -JPEG memory manager with lifetime JPOOL_PERMANENT will work nicely.) You -can use the same callback routine for both compression and decompression. - -The jpeg_progress_mgr struct contains four fields which are set by the library: - long pass_counter; /* work units completed in this pass */ - long pass_limit; /* total number of work units in this pass */ - int completed_passes; /* passes completed so far */ - int total_passes; /* total number of passes expected */ -During any one pass, pass_counter increases from 0 up to (not including) -pass_limit; the step size is usually but not necessarily 1. The pass_limit -value may change from one pass to another. The expected total number of -passes is in total_passes, and the number of passes already completed is in -completed_passes. Thus the fraction of work completed may be estimated as - completed_passes + (pass_counter/pass_limit) - -------------------------------------------- - total_passes -ignoring the fact that the passes may not be equal amounts of work. - -When decompressing, pass_limit can even change within a pass, because it -depends on the number of scans in the JPEG file, which isn't always known in -advance. The computed fraction-of-work-done may jump suddenly (if the library -discovers it has overestimated the number of scans) or even decrease (in the -opposite case). It is not wise to put great faith in the work estimate. - -When using the decompressor's buffered-image mode, the progress monitor work -estimate is likely to be completely unhelpful, because the library has no way -to know how many output passes will be demanded of it. Currently, the library -sets total_passes based on the assumption that there will be one more output -pass if the input file end hasn't yet been read (jpeg_input_complete() isn't -TRUE), but no more output passes if the file end has been reached when the -output pass is started. This means that total_passes will rise as additional -output passes are requested. If you have a way of determining the input file -size, estimating progress based on the fraction of the file that's been read -will probably be more useful than using the library's value. - - -Memory management ------------------ - -This section covers some key facts about the JPEG library's built-in memory -manager. For more info, please read structure.txt's section about the memory -manager, and consult the source code if necessary. - -All memory and temporary file allocation within the library is done via the -memory manager. If necessary, you can replace the "back end" of the memory -manager to control allocation yourself (for example, if you don't want the -library to use malloc() and free() for some reason). - -Some data is allocated "permanently" and will not be freed until the JPEG -object is destroyed. Most data is allocated "per image" and is freed by -jpeg_finish_compress, jpeg_finish_decompress, or jpeg_abort. You can call the -memory manager yourself to allocate structures that will automatically be -freed at these times. Typical code for this is - ptr = (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, size); -Use JPOOL_PERMANENT to get storage that lasts as long as the JPEG object. -Use alloc_large instead of alloc_small for anything bigger than a few Kbytes. -There are also alloc_sarray and alloc_barray routines that automatically -build 2-D sample or block arrays. - -The library's minimum space requirements to process an image depend on the -image's width, but not on its height, because the library ordinarily works -with "strip" buffers that are as wide as the image but just a few rows high. -Some operating modes (eg, two-pass color quantization) require full-image -buffers. Such buffers are treated as "virtual arrays": only the current strip -need be in memory, and the rest can be swapped out to a temporary file. - -If you use the simplest memory manager back end (jmemnobs.c), then no -temporary files are used; virtual arrays are simply malloc()'d. Images bigger -than memory can be processed only if your system supports virtual memory. -The other memory manager back ends support temporary files of various flavors -and thus work in machines without virtual memory. They may also be useful on -Unix machines if you need to process images that exceed available swap space. - -When using temporary files, the library will make the in-memory buffers for -its virtual arrays just big enough to stay within a "maximum memory" setting. -Your application can set this limit by setting cinfo->mem->max_memory_to_use -after creating the JPEG object. (Of course, there is still a minimum size for -the buffers, so the max-memory setting is effective only if it is bigger than -the minimum space needed.) If you allocate any large structures yourself, you -must allocate them before jpeg_start_compress() or jpeg_start_decompress() in -order to have them counted against the max memory limit. Also keep in mind -that space allocated with alloc_small() is ignored, on the assumption that -it's too small to be worth worrying about; so a reasonable safety margin -should be left when setting max_memory_to_use. - -If you use the jmemname.c or jmemdos.c memory manager back end, it is -important to clean up the JPEG object properly to ensure that the temporary -files get deleted. (This is especially crucial with jmemdos.c, where the -"temporary files" may be extended-memory segments; if they are not freed, -DOS will require a reboot to recover the memory.) Thus, with these memory -managers, it's a good idea to provide a signal handler that will trap any -early exit from your program. The handler should call either jpeg_abort() -or jpeg_destroy() for any active JPEG objects. A handler is not needed with -jmemnobs.c, and shouldn't be necessary with jmemansi.c or jmemmac.c either, -since the C library is supposed to take care of deleting files made with -tmpfile(). - - -Memory usage ------------- - -Working memory requirements while performing compression or decompression -depend on image dimensions, image characteristics (such as colorspace and -JPEG process), and operating mode (application-selected options). - -As of v6b, the decompressor requires: - 1. About 24K in more-or-less-fixed-size data. This varies a bit depending - on operating mode and image characteristics (particularly color vs. - grayscale), but it doesn't depend on image dimensions. - 2. Strip buffers (of size proportional to the image width) for IDCT and - upsampling results. The worst case for commonly used sampling factors - is about 34 bytes * width in pixels for a color image. A grayscale image - only needs about 8 bytes per pixel column. - 3. A full-image DCT coefficient buffer is needed to decode a multi-scan JPEG - file (including progressive JPEGs), or whenever you select buffered-image - mode. This takes 2 bytes/coefficient. At typical 2x2 sampling, that's - 3 bytes per pixel for a color image. Worst case (1x1 sampling) requires - 6 bytes/pixel. For grayscale, figure 2 bytes/pixel. - 4. To perform 2-pass color quantization, the decompressor also needs a - 128K color lookup table and a full-image pixel buffer (3 bytes/pixel). -This does not count any memory allocated by the application, such as a -buffer to hold the final output image. - -The above figures are valid for 8-bit JPEG data precision and a machine with -32-bit ints. For 9-bit to 12-bit JPEG data, double the size of the strip -buffers and quantization pixel buffer. The "fixed-size" data will be -somewhat smaller with 16-bit ints, larger with 64-bit ints. Also, CMYK -or other unusual color spaces will require different amounts of space. - -The full-image coefficient and pixel buffers, if needed at all, do not -have to be fully RAM resident; you can have the library use temporary -files instead when the total memory usage would exceed a limit you set. -(But if your OS supports virtual memory, it's probably better to just use -jmemnobs and let the OS do the swapping.) - -The compressor's memory requirements are similar, except that it has no need -for color quantization. Also, it needs a full-image DCT coefficient buffer -if Huffman-table optimization is asked for, even if progressive mode is not -requested. - -If you need more detailed information about memory usage in a particular -situation, you can enable the MEM_STATS code in jmemmgr.c. - - -Library compile-time options ----------------------------- - -A number of compile-time options are available by modifying jmorecfg.h. - -The IJG code currently supports 8-bit to 12-bit sample data precision by -defining BITS_IN_JSAMPLE as 8, 9, 10, 11, or 12. -Note that a value larger than 8 causes JSAMPLE to be larger than a char, -so it affects the surrounding application's image data. -The sample applications cjpeg and djpeg can support deeper than 8-bit data -only for PPM and GIF file formats; you must disable the other file formats -to compile a 9-bit to 12-bit cjpeg or djpeg. (install.txt has more -information about that.) -Run-time selection and conversion of data precision are currently not -supported and may be added later. -Exception: The transcoding part (jpegtran) supports all settings in a -single instance, since it operates on the level of DCT coefficients and -not sample values. -(If you need to include an 8-bit library and a 9-bit to 12-bit library for -compression or decompression in a single application, you could probably do -it by defining NEED_SHORT_EXTERNAL_NAMES for just one of the copies. You'd -have to access the 8-bit and the 9-bit to 12-bit copies from separate -application source files. This is untested ... if you try it, we'd like to -hear whether it works!) - -Note that the standard Huffman tables are only valid for 8-bit data precision. -If you selected more than 8-bit data precision, cjpeg uses arithmetic coding -by default. The Huffman encoder normally uses entropy optimization to -compute usable tables for higher precision. Otherwise, you'll have to -supply different default Huffman tables. You may also want to supply your -own DCT quantization tables; the existing quality-scaling code has been -developed for 8-bit use, and probably doesn't generate especially good tables -for 9-bit to 12-bit. - -The maximum number of components (color channels) in the image is determined -by MAX_COMPONENTS. The JPEG standard allows up to 255 components, but we -expect that few applications will need more than four or so. - -On machines with unusual data type sizes, you may be able to improve -performance or reduce memory space by tweaking the various typedefs in -jmorecfg.h. In particular, on some RISC CPUs, access to arrays of "short"s -is quite slow; consider trading memory for speed by making JCOEF, INT16, and -UINT16 be "int" or "unsigned int". UINT8 is also a candidate to become int. -You probably don't want to make JSAMPLE be int unless you have lots of memory -to burn. - -You can reduce the size of the library by compiling out various optional -functions. To do this, undefine xxx_SUPPORTED symbols as necessary. - -You can also save a few K by not having text error messages in the library; -the standard error message table occupies about 5Kb. This is particularly -reasonable for embedded applications where there's no good way to display -a message anyway. To do this, remove the creation of the message table -(jpeg_std_message_table[]) from jerror.c, and alter format_message to do -something reasonable without it. You could output the numeric value of the -message code number, for example. If you do this, you can also save a couple -more K by modifying the TRACEMSn() macros in jerror.h to expand to nothing; -you don't need trace capability anyway, right? - - -Portability considerations --------------------------- - -The JPEG library has been written to be extremely portable; the sample -applications cjpeg and djpeg are slightly less so. This section summarizes -the design goals in this area. (If you encounter any bugs that cause the -library to be less portable than is claimed here, we'd appreciate hearing -about them.) - -The code works fine on ANSI C, C++, and pre-ANSI C compilers, using any of -the popular system include file setups, and some not-so-popular ones too. -See install.txt for configuration procedures. - -The code is not dependent on the exact sizes of the C data types. As -distributed, we make the assumptions that - char is at least 8 bits wide - short is at least 16 bits wide - int is at least 16 bits wide - long is at least 32 bits wide -(These are the minimum requirements of the ANSI C standard.) Wider types will -work fine, although memory may be used inefficiently if char is much larger -than 8 bits or short is much bigger than 16 bits. The code should work -equally well with 16- or 32-bit ints. - -In a system where these assumptions are not met, you may be able to make the -code work by modifying the typedefs in jmorecfg.h. However, you will probably -have difficulty if int is less than 16 bits wide, since references to plain -int abound in the code. - -char can be either signed or unsigned, although the code runs faster if an -unsigned char type is available. If char is wider than 8 bits, you will need -to redefine JOCTET and/or provide custom data source/destination managers so -that JOCTET represents exactly 8 bits of data on external storage. - -The JPEG library proper does not assume ASCII representation of characters. -But some of the image file I/O modules in cjpeg/djpeg do have ASCII -dependencies in file-header manipulation; so does cjpeg's select_file_type() -routine. - -The JPEG library does not rely heavily on the C library. In particular, C -stdio is used only by the data source/destination modules and the error -handler, all of which are application-replaceable. (cjpeg/djpeg are more -heavily dependent on stdio.) malloc and free are called only from the memory -manager "back end" module, so you can use a different memory allocator by -replacing that one file. - -The code generally assumes that C names must be unique in the first 15 -characters. However, global function names can be made unique in the -first 6 characters by defining NEED_SHORT_EXTERNAL_NAMES. - -More info about porting the code may be gleaned by reading jconfig.txt, -jmorecfg.h, and jinclude.h. - - -Notes for MS-DOS implementors ------------------------------ - -The IJG code is designed to work efficiently in 80x86 "small" or "medium" -memory models (i.e., data pointers are 16 bits unless explicitly declared -"far"; code pointers can be either size). You may be able to use small -model to compile cjpeg or djpeg by itself, but you will probably have to use -medium model for any larger application. This won't make much difference in -performance. You *will* take a noticeable performance hit if you use a -large-data memory model (perhaps 10%-25%), and you should avoid "huge" model -if at all possible. - -The JPEG library typically needs 2Kb-3Kb of stack space. It will also -malloc about 20K-30K of near heap space while executing (and lots of far -heap, but that doesn't count in this calculation). This figure will vary -depending on selected operating mode, and to a lesser extent on image size. -There is also about 5Kb-6Kb of constant data which will be allocated in the -near data segment (about 4Kb of this is the error message table). -Thus you have perhaps 20K available for other modules' static data and near -heap space before you need to go to a larger memory model. The C library's -static data will account for several K of this, but that still leaves a good -deal for your needs. (If you are tight on space, you could reduce the sizes -of the I/O buffers allocated by jdatasrc.c and jdatadst.c, say from 4K to -1K. Another possibility is to move the error message table to far memory; -this should be doable with only localized hacking on jerror.c.) - -About 2K of the near heap space is "permanent" memory that will not be -released until you destroy the JPEG object. This is only an issue if you -save a JPEG object between compression or decompression operations. - -Far data space may also be a tight resource when you are dealing with large -images. The most memory-intensive case is decompression with two-pass color -quantization, or single-pass quantization to an externally supplied color -map. This requires a 128Kb color lookup table plus strip buffers amounting -to about 40 bytes per column for typical sampling ratios (eg, about 25600 -bytes for a 640-pixel-wide image). You may not be able to process wide -images if you have large data structures of your own. - -Of course, all of these concerns vanish if you use a 32-bit flat-memory-model -compiler, such as DJGPP or Watcom C. We highly recommend flat model if you -can use it; the JPEG library is significantly faster in flat model. diff --git a/thirdparty/jpeg-9e/libtool b/thirdparty/jpeg-9e/libtool deleted file mode 100755 index ea92550..0000000 --- a/thirdparty/jpeg-9e/libtool +++ /dev/null @@ -1,11648 +0,0 @@ -#! /bin/bash -# Generated automatically by config.status (libjpeg) 9.5.0 -# Libtool was configured on host kpdev: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# The names of the tagged configurations supported by this script. -available_tags='' - -# Configured defaults for sys_lib_dlsearch_path munging. -: ${LT_SYS_LIBRARY_PATH=""} - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=2.4.6 -macro_revision=2.4.6 - -# Assembler program. -AS="as" - -# DLL creation program. -DLLTOOL="false" - -# Object dumper program. -OBJDUMP="objdump" - -# Whether or not to build shared libraries. -build_libtool_libs=no - -# Whether or not to build static libraries. -build_old_libs=yes - -# What type of objects to build. -pic_mode=default - -# Whether or not to optimize for fast installation. -fast_install=needless - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec= - -# Shell to use when invoking shell scripts. -SHELL="/bin/bash" - -# An echo program that protects backslashes. -ECHO="printf %s\\n" - -# The PATH separator for the build system. -PATH_SEPARATOR=":" - -# The host system. -host_alias= -host=x86_64-pc-linux-gnu -host_os=linux-gnu - -# The build system. -build_alias= -build=x86_64-pc-linux-gnu -build_os=linux-gnu - -# A sed program that does not truncate output. -SED="/usr/bin/sed" - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP="/usr/bin/grep" - -# An ERE matcher. -EGREP="/usr/bin/grep -E" - -# A literal string matcher. -FGREP="/usr/bin/grep -F" - -# A BSD- or MS-compatible name lister. -NM="/usr/bin/nm -B" - -# Whether we need soft or hard links. -LN_S="ln -s" - -# What is the maximum length of a command? -max_cmd_len=1572864 - -# Object file suffix (normally "o"). -objext=o - -# Executable file suffix (normally ""). -exeext= - -# whether the shell understands "unset". -lt_unset=unset - -# turn spaces into newlines. -SP2NL="tr \\040 \\012" - -# turn newlines into spaces. -NL2SP="tr \\015\\012 \\040\\040" - -# convert $build file names to $host format. -to_host_file_cmd=func_convert_file_noop - -# convert $build files to toolchain format. -to_tool_file_cmd=func_convert_file_noop - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method="pass_all" - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd="\$MAGIC_CMD" - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob="" - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob="no" - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd="printf %s\\n" - -# The archiver. -AR="ar" - -# Flags to create an archive. -AR_FLAGS="cru" - -# How to feed a file listing to the archiver. -archiver_list_spec="@" - -# A symbol stripping program. -STRIP="strip" - -# Commands used to install an old-style archive. -RANLIB="ranlib" -old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$tool_oldlib" -old_postuninstall_cmds="" - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=no - -# A C compiler. -LTCC="gcc" - -# LTCC compiler flags. -LTCFLAGS="-g -O2" - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'" - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW][ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'" - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import="" - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address="sed -n -e 's/^: \\(.*\\) .*\$/ {\"\\1\", (void *) 0},/p' -e 's/^[ABCDGIRSTW][ABCDGIRSTW]* .* \\(.*\\)\$/ {\"\\1\", (void *) \\&\\1},/p'" - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\(.*\\) .*\$/ {\"\\1\", (void *) 0},/p' -e 's/^[ABCDGIRSTW][ABCDGIRSTW]* .* \\(lib.*\\)\$/ {\"\\1\", (void *) \\&\\1},/p' -e 's/^[ABCDGIRSTW][ABCDGIRSTW]* .* \\(.*\\)\$/ {\"lib\\1\", (void *) \\&\\1},/p'" - -# The name lister interface. -nm_interface="BSD nm" - -# Specify filename containing input files for $NM. -nm_file_list_spec="@" - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot= - -# Command to truncate a binary pipe. -lt_truncate_bin="/usr/bin/dd bs=4096 count=1" - -# The name of the directory that contains temporary libtool files. -objdir=.libs - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=file - -# Must we lock files when doing compilation? -need_locks="no" - -# Manifest tool. -MANIFEST_TOOL=":" - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL="" - -# Tool to change global to local symbols on Mac OS X. -NMEDIT="" - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO="" - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL="" - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64="" - -# Old archive suffix (normally "a"). -libext=a - -# Shared library suffix (normally ".so"). -shrext_cmds=".so" - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds="" - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" - -# Do we need the "lib" prefix for modules? -need_lib_prefix=no - -# Do we need a version for libraries? -need_version=no - -# Library versioning type. -version_type=linux - -# Shared library runtime path variable. -runpath_var=LD_RUN_PATH - -# Shared library path variable. -shlibpath_var=LD_LIBRARY_PATH - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=yes - -# Format of library name prefix. -libname_spec="lib\$name" - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec="\$libname\$release\$shared_ext\$versuffix \$libname\$release\$shared_ext\$major \$libname\$shared_ext" - -# The coded name of the library, if different from the real name. -soname_spec="\$libname\$release\$shared_ext\$major" - -# Permission mode override for installation of shared libraries. -install_override_mode="" - -# Command to use after installation of a shared archive. -postinstall_cmds="" - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds="" - -# Commands used to finish a libtool library installation in a directory. -finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval="" - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=yes - -# Compile-time system search path for libraries. -sys_lib_search_path_spec="/usr/lib/gcc/x86_64-linux-gnu/9 /usr/lib/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib " - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/x86_64-linux-gnu/libfakeroot /usr/local/lib/i386-linux-gnu /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /usr/local/lib/i686-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu /usr/local/lib /usr/local/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu /lib32 /usr/lib32 /libx32 /usr/libx32 " - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path="" - -# Whether dlopen is supported. -dlopen_support=unknown - -# Whether dlopen of programs is supported. -dlopen_self=unknown - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=unknown - -# Commands to strip libraries. -old_striplib="strip --strip-debug" -striplib="strip --strip-unneeded" - - -# The linker used to build libraries. -LD="/usr/bin/ld -m elf_x86_64" - -# How to create reloadable object files. -reload_flag=" -r" -reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" - -# Commands used to build an old-style archive. -old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" - -# A language specific compiler. -CC="gcc" - -# Is the compiler the GNU compiler? -with_gcc=yes - -# Compiler flag to turn off builtin functions. -no_builtin_flag=" -fno-builtin" - -# Additional compiler flags for building library objects. -pic_flag=" -fPIC -DPIC" - -# How to pass a linker flag through the compiler. -wl="-Wl," - -# Compiler flag to prevent dynamic linking. -link_static_flag="-static" - -# Does compiler simultaneously support -c and -o options? -compiler_c_o="yes" - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=yes - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=no - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="\$wl--export-dynamic" - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec="\$wl--whole-archive\$convenience \$wl--no-whole-archive" - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object="no" - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds="" - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds="" - -# Commands used to build a shared archive. -archive_cmds="\$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \$wl-soname \$wl\$soname -o \$lib" -archive_expsym_cmds="echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ - cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ - echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ - \$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \$wl-soname \$wl\$soname \$wl-version-script \$wl\$output_objdir/\$libname.ver -o \$lib" - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds="" -module_expsym_cmds="" - -# Whether we are building with GNU ld or not. -with_gnu_ld="yes" - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="" - -# Flag that enforces no undefined symbols. -no_undefined_flag="" - -# Flag to hardcode $libdir into a binary during linking. -# This must work even if $libdir does not exist -hardcode_libdir_flag_spec="\$wl-rpath \$wl\$libdir" - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator="" - -# Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=no - -# Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting $shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=no - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=no - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=unsupported - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=no - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=no - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=unknown - -# Set to "yes" if exported symbols are required. -always_export_symbols=no - -# The commands to list exported symbols. -export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*" - -# Symbols that must always be exported. -include_expsyms="" - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds="" - -# Commands necessary for finishing linking programs. -postlink_cmds="" - -# Specify filename containing input files. -file_list_spec="" - -# How to hardcode a shared library path into an executable. -hardcode_action=immediate - -# ### END LIBTOOL CONFIG - - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -#! /bin/sh -## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 - -# libtool (GNU libtool) 2.4.6 -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -PROGRAM=libtool -PACKAGE=libtool -VERSION=2.4.6 -package_revision=2.4.6 - - -## ------ ## -## Usage. ## -## ------ ## - -# Run './libtool --help' for help with using this script from the -# command line. - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# After configure completes, it has a better idea of some of the -# shell tools we need than the defaults used by the functions shared -# with bootstrap, so set those here where they can still be over- -# ridden by the user, but otherwise take precedence. - -: ${AUTOCONF="autoconf"} -: ${AUTOMAKE="automake"} - - -## -------------------------- ## -## Source external libraries. ## -## -------------------------- ## - -# Much of our low-level functionality needs to be sourced from external -# libraries, which are installed to $pkgauxdir. - -# Set a version string for this script. -scriptversion=2015-01-20.17; # UTC - -# General shell script boiler plate, and helper functions. -# Written by Gary V. Vaughan, 2004 - -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# Evaluate this file near the top of your script to gain access to -# the functions and variables defined here: -# -# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh -# -# If you need to override any of the default environment variable -# settings, do that before evaluating this file. - - -## -------------------- ## -## Shell normalisation. ## -## -------------------- ## - -# Some shells need a little help to be as Bourne compatible as possible. -# Before doing anything else, make sure all that help has been provided! - -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac -fi - -# NLS nuisances: We save the old values in case they are required later. -_G_user_locale= -_G_safe_locale= -for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test set = \"\${$_G_var+set}\"; then - save_$_G_var=\$$_G_var - $_G_var=C - export $_G_var - _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" - _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" - fi" -done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Make sure IFS has a sensible default -sp=' ' -nl=' -' -IFS="$sp $nl" - -# There are apparently some retarded systems that use ';' as a PATH separator! -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - - -## ------------------------- ## -## Locate command utilities. ## -## ------------------------- ## - - -# func_executable_p FILE -# ---------------------- -# Check that FILE is an executable regular file. -func_executable_p () -{ - test -f "$1" && test -x "$1" -} - - -# func_path_progs PROGS_LIST CHECK_FUNC [PATH] -# -------------------------------------------- -# Search for either a program that responds to --version with output -# containing "GNU", or else returned by CHECK_FUNC otherwise, by -# trying all the directories in PATH with each of the elements of -# PROGS_LIST. -# -# CHECK_FUNC should accept the path to a candidate program, and -# set $func_check_prog_result if it truncates its output less than -# $_G_path_prog_max characters. -func_path_progs () -{ - _G_progs_list=$1 - _G_check_func=$2 - _G_PATH=${3-"$PATH"} - - _G_path_prog_max=0 - _G_path_prog_found=false - _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} - for _G_dir in $_G_PATH; do - IFS=$_G_save_IFS - test -z "$_G_dir" && _G_dir=. - for _G_prog_name in $_G_progs_list; do - for _exeext in '' .EXE; do - _G_path_prog=$_G_dir/$_G_prog_name$_exeext - func_executable_p "$_G_path_prog" || continue - case `"$_G_path_prog" --version 2>&1` in - *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; - *) $_G_check_func $_G_path_prog - func_path_progs_result=$func_check_prog_result - ;; - esac - $_G_path_prog_found && break 3 - done - done - done - IFS=$_G_save_IFS - test -z "$func_path_progs_result" && { - echo "no acceptable sed could be found in \$PATH" >&2 - exit 1 - } -} - - -# We want to be able to use the functions in this file before configure -# has figured out where the best binaries are kept, which means we have -# to search for them ourselves - except when the results are already set -# where we skip the searches. - -# Unless the user overrides by setting SED, search the path for either GNU -# sed, or the sed that truncates its output the least. -test -z "$SED" && { - _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for _G_i in 1 2 3 4 5 6 7; do - _G_sed_script=$_G_sed_script$nl$_G_sed_script - done - echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed - _G_sed_script= - - func_check_prog_sed () - { - _G_path_prog=$1 - - _G_count=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo '' >> conftest.nl - "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin - rm -f conftest.sed - SED=$func_path_progs_result -} - - -# Unless the user overrides by setting GREP, search the path for either GNU -# grep, or the grep that truncates its output the least. -test -z "$GREP" && { - func_check_prog_grep () - { - _G_path_prog=$1 - - _G_count=0 - _G_path_prog_max=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo 'GREP' >> conftest.nl - "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin - GREP=$func_path_progs_result -} - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# All uppercase variable names are used for environment variables. These -# variables can be overridden by the user before calling a script that -# uses them if a suitable command of that name is not already available -# in the command search PATH. - -: ${CP="cp -f"} -: ${ECHO="printf %s\n"} -: ${EGREP="$GREP -E"} -: ${FGREP="$GREP -F"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} - - -## -------------------- ## -## Useful sed snippets. ## -## -------------------- ## - -sed_dirname='s|/[^/]*$||' -sed_basename='s|^.*/||' - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s|\([`"$\\]\)|\\\1|g' - -# Same as above, but do not quote variable references. -sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' - -# Sed substitution that converts a w32 file name or path -# that contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-'\' parameter expansions in output of sed_double_quote_subst that -# were '\'-ed in input to the same. If an odd number of '\' preceded a -# '$' in input to sed_double_quote_subst, that '$' was protected from -# expansion. Since each input '\' is now two '\'s, look for any number -# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. -_G_bs='\\' -_G_bs2='\\\\' -_G_bs4='\\\\\\\\' -_G_dollar='\$' -sed_double_backslash="\ - s/$_G_bs4/&\\ -/g - s/^$_G_bs2$_G_dollar/$_G_bs&/ - s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g - s/\n//g" - - -## ----------------- ## -## Global variables. ## -## ----------------- ## - -# Except for the global variables explicitly listed below, the following -# functions in the '^func_' namespace, and the '^require_' namespace -# variables initialised in the 'Resource management' section, sourcing -# this file will not pollute your global namespace with anything -# else. There's no portable way to scope variables in Bourne shell -# though, so actually running these functions will sometimes place -# results into a variable named after the function, and often use -# temporary variables in the '^_G_' namespace. If you are careful to -# avoid using those namespaces casually in your sourcing script, things -# should continue to work as you expect. And, of course, you can freely -# overwrite any of the functions or variables defined here before -# calling anything to customize them. - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -# Allow overriding, eg assuming that you follow the convention of -# putting '$debug_cmd' at the start of all your functions, you can get -# bash to show function call trace with: -# -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name -debug_cmd=${debug_cmd-":"} -exit_cmd=: - -# By convention, finish your script with: -# -# exit $exit_status -# -# so that you can set exit_status to non-zero if you want to indicate -# something went wrong during execution without actually bailing out at -# the point of failure. -exit_status=$EXIT_SUCCESS - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath=$0 - -# The name of this program. -progname=`$ECHO "$progpath" |$SED "$sed_basename"` - -# Make sure we have an absolute progpath for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` - progdir=`cd "$progdir" && pwd` - progpath=$progdir/$progname - ;; - *) - _G_IFS=$IFS - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS=$_G_IFS - test -x "$progdir/$progname" && break - done - IFS=$_G_IFS - test -n "$progdir" || progdir=`pwd` - progpath=$progdir/$progname - ;; -esac - - -## ----------------- ## -## Standard options. ## -## ----------------- ## - -# The following options affect the operation of the functions defined -# below, and should be set appropriately depending on run-time para- -# meters passed on the command line. - -opt_dry_run=false -opt_quiet=false -opt_verbose=false - -# Categories 'all' and 'none' are always available. Append any others -# you will pass as the first argument to func_warning from your own -# code. -warning_categories= - -# By default, display warnings according to 'opt_warning_types'. Set -# 'warning_func' to ':' to elide all warnings, or func_fatal_error to -# treat the next displayed warning as a fatal error. -warning_func=func_warn_and_continue - -# Set to 'all' to display all warnings, 'none' to suppress all -# warnings, or a space delimited list of some subset of -# 'warning_categories' to display only the listed warnings. -opt_warning_types=all - - -## -------------------- ## -## Resource management. ## -## -------------------- ## - -# This section contains definitions for functions that each ensure a -# particular resource (a file, or a non-empty configuration variable for -# example) is available, and if appropriate to extract default values -# from pertinent package files. Call them using their associated -# 'require_*' variable to ensure that they are executed, at most, once. -# -# It's entirely deliberate that calling these functions can set -# variables that don't obey the namespace limitations obeyed by the rest -# of this file, in order that that they be as useful as possible to -# callers. - - -# require_term_colors -# ------------------- -# Allow display of bold text on terminals that support it. -require_term_colors=func_require_term_colors -func_require_term_colors () -{ - $debug_cmd - - test -t 1 && { - # COLORTERM and USE_ANSI_COLORS environment variables take - # precedence, because most terminfo databases neglect to describe - # whether color sequences are supported. - test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} - - if test 1 = "$USE_ANSI_COLORS"; then - # Standard ANSI escape sequences - tc_reset='' - tc_bold=''; tc_standout='' - tc_red=''; tc_green='' - tc_blue=''; tc_cyan='' - else - # Otherwise trust the terminfo database after all. - test -n "`tput sgr0 2>/dev/null`" && { - tc_reset=`tput sgr0` - test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` - tc_standout=$tc_bold - test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` - test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` - test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` - test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` - test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` - } - fi - } - - require_term_colors=: -} - - -## ----------------- ## -## Function library. ## -## ----------------- ## - -# This section contains a variety of useful functions to call in your -# scripts. Take note of the portable wrappers for features provided by -# some modern shells, which will fall back to slower equivalents on -# less featureful shells. - - -# func_append VAR VALUE -# --------------------- -# Append VALUE onto the existing contents of VAR. - - # We should try to minimise forks, especially on Windows where they are - # unreasonably slow, so skip the feature probes when bash or zsh are - # being used: - if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then - : ${_G_HAVE_ARITH_OP="yes"} - : ${_G_HAVE_XSI_OPS="yes"} - # The += operator was introduced in bash 3.1 - case $BASH_VERSION in - [12].* | 3.0 | 3.0*) ;; - *) - : ${_G_HAVE_PLUSEQ_OP="yes"} - ;; - esac - fi - - # _G_HAVE_PLUSEQ_OP - # Can be empty, in which case the shell is probed, "yes" if += is - # useable or anything else if it does not work. - test -z "$_G_HAVE_PLUSEQ_OP" \ - && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ - && _G_HAVE_PLUSEQ_OP=yes - -if test yes = "$_G_HAVE_PLUSEQ_OP" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_append () - { - $debug_cmd - - eval "$1+=\$2" - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_append () - { - $debug_cmd - - eval "$1=\$$1\$2" - } -fi - - -# func_append_quoted VAR VALUE -# ---------------------------- -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -if test yes = "$_G_HAVE_PLUSEQ_OP"; then - eval 'func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" - }' -else - func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" - } -fi - - -# func_append_uniq VAR VALUE -# -------------------------- -# Append unique VALUE onto the existing contents of VAR, assuming -# entries are delimited by the first character of VALUE. For example: -# -# func_append_uniq options " --another-option option-argument" -# -# will only append to $options if " --another-option option-argument " -# is not already present somewhere in $options already (note spaces at -# each end implied by leading space in second argument). -func_append_uniq () -{ - $debug_cmd - - eval _G_current_value='`$ECHO $'$1'`' - _G_delim=`expr "$2" : '\(.\)'` - - case $_G_delim$_G_current_value$_G_delim in - *"$2$_G_delim"*) ;; - *) func_append "$@" ;; - esac -} - - -# func_arith TERM... -# ------------------ -# Set func_arith_result to the result of evaluating TERMs. - test -z "$_G_HAVE_ARITH_OP" \ - && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ - && _G_HAVE_ARITH_OP=yes - -if test yes = "$_G_HAVE_ARITH_OP"; then - eval 'func_arith () - { - $debug_cmd - - func_arith_result=$(( $* )) - }' -else - func_arith () - { - $debug_cmd - - func_arith_result=`expr "$@"` - } -fi - - -# func_basename FILE -# ------------------ -# Set func_basename_result to FILE with everything up to and including -# the last / stripped. -if test yes = "$_G_HAVE_XSI_OPS"; then - # If this shell supports suffix pattern removal, then use it to avoid - # forking. Hide the definitions single quotes in case the shell chokes - # on unsupported syntax... - _b='func_basename_result=${1##*/}' - _d='case $1 in - */*) func_dirname_result=${1%/*}$2 ;; - * ) func_dirname_result=$3 ;; - esac' - -else - # ...otherwise fall back to using sed. - _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' - _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` - if test "X$func_dirname_result" = "X$1"; then - func_dirname_result=$3 - else - func_append func_dirname_result "$2" - fi' -fi - -eval 'func_basename () -{ - $debug_cmd - - '"$_b"' -}' - - -# func_dirname FILE APPEND NONDIR_REPLACEMENT -# ------------------------------------------- -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -eval 'func_dirname () -{ - $debug_cmd - - '"$_d"' -}' - - -# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT -# -------------------------------------------------------- -# Perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# For efficiency, we do not delegate to the functions above but instead -# duplicate the functionality here. -eval 'func_dirname_and_basename () -{ - $debug_cmd - - '"$_b"' - '"$_d"' -}' - - -# func_echo ARG... -# ---------------- -# Echo program name prefixed message. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_echo_all ARG... -# -------------------- -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - - -# func_echo_infix_1 INFIX ARG... -# ------------------------------ -# Echo program name, followed by INFIX on the first line, with any -# additional lines not showing INFIX. -func_echo_infix_1 () -{ - $debug_cmd - - $require_term_colors - - _G_infix=$1; shift - _G_indent=$_G_infix - _G_prefix="$progname: $_G_infix: " - _G_message=$* - - # Strip color escape sequences before counting printable length - for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" - do - test -n "$_G_tc" && { - _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` - _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` - } - done - _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes - - func_echo_infix_1_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_infix_1_IFS - $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 - _G_prefix=$_G_indent - done - IFS=$func_echo_infix_1_IFS -} - - -# func_error ARG... -# ----------------- -# Echo program name prefixed message to standard error. -func_error () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 -} - - -# func_fatal_error ARG... -# ----------------------- -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - $debug_cmd - - func_error "$*" - exit $EXIT_FAILURE -} - - -# func_grep EXPRESSION FILENAME -# ----------------------------- -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $debug_cmd - - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_len STRING -# --------------- -# Set func_len_result to the length of STRING. STRING may not -# start with a hyphen. - test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_len () - { - $debug_cmd - - func_len_result=${#1} - }' -else - func_len () - { - $debug_cmd - - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` - } -fi - - -# func_mkdir_p DIRECTORY-PATH -# --------------------------- -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - $debug_cmd - - _G_directory_path=$1 - _G_dir_list= - - if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - - # Protect directory names starting with '-' - case $_G_directory_path in - -*) _G_directory_path=./$_G_directory_path ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$_G_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - _G_dir_list=$_G_directory_path:$_G_dir_list - - # If the last portion added has no slash in it, the list is done - case $_G_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` - done - _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - - func_mkdir_p_IFS=$IFS; IFS=: - for _G_dir in $_G_dir_list; do - IFS=$func_mkdir_p_IFS - # mkdir can fail with a 'File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$_G_dir" 2>/dev/null || : - done - IFS=$func_mkdir_p_IFS - - # Bail out if we (or some other process) failed to create a directory. - test -d "$_G_directory_path" || \ - func_fatal_error "Failed to create '$1'" - fi -} - - -# func_mktempdir [BASENAME] -# ------------------------- -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, BASENAME is the basename for that directory. -func_mktempdir () -{ - $debug_cmd - - _G_template=${TMPDIR-/tmp}/${1-$progname} - - if test : = "$opt_dry_run"; then - # Return a directory name, but don't create it in dry-run mode - _G_tmpdir=$_G_template-$$ - else - - # If mktemp works, use that first and foremost - _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - - if test ! -d "$_G_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - _G_tmpdir=$_G_template-${RANDOM-0}$$ - - func_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$_G_tmpdir" - umask $func_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$_G_tmpdir" || \ - func_fatal_error "cannot create temporary directory '$_G_tmpdir'" - fi - - $ECHO "$_G_tmpdir" -} - - -# func_normal_abspath PATH -# ------------------------ -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -func_normal_abspath () -{ - $debug_cmd - - # These SED scripts presuppose an absolute path with a trailing slash. - _G_pathcar='s|^/\([^/]*\).*$|\1|' - _G_pathcdr='s|^/[^/]*||' - _G_removedotparts=':dotsl - s|/\./|/|g - t dotsl - s|/\.$|/|' - _G_collapseslashes='s|/\{1,\}|/|g' - _G_finalslash='s|/*$|/|' - - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` - while :; do - # Processed it all yet? - if test / = "$func_normal_abspath_tpath"; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result"; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - - -# func_notquiet ARG... -# -------------------- -# Echo program name prefixed message only when not in quiet mode. -func_notquiet () -{ - $debug_cmd - - $opt_quiet || func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - - -# func_relative_path SRCDIR DSTDIR -# -------------------------------- -# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. -func_relative_path () -{ - $debug_cmd - - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=$func_dirname_result - if test -z "$func_relative_path_tlibdir"; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test -n "$func_stripname_result"; then - func_append func_relative_path_result "/$func_stripname_result" - fi - - # Normalisation. If bindir is libdir, return '.' else relative path. - if test -n "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - fi - - test -n "$func_relative_path_result" || func_relative_path_result=. - - : -} - - -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () -{ - $debug_cmd - - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" - fi - - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" - ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; - esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift - done -} - - -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd - - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; - esac - - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" - ;; - esac - - func_quote_for_expand_result=$_G_arg -} - - -# func_stripname PREFIX SUFFIX NAME -# --------------------------------- -# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_stripname () - { - $debug_cmd - - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary variable first. - func_stripname_result=$3 - func_stripname_result=${func_stripname_result#"$1"} - func_stripname_result=${func_stripname_result%"$2"} - }' -else - func_stripname () - { - $debug_cmd - - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; - esac - } -fi - - -# func_show_eval CMD [FAIL_EXP] -# ----------------------------- -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" - - $opt_dry_run || { - eval "$_G_cmd" - _G_status=$? - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_show_eval_locale CMD [FAIL_EXP] -# ------------------------------------ -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - $opt_dry_run || { - eval "$_G_user_locale - $_G_cmd" - _G_status=$? - eval "$_G_safe_locale" - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_tr_sh -# ---------- -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - $debug_cmd - - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_verbose ARG... -# ------------------- -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $debug_cmd - - $opt_verbose && func_echo "$*" - - : -} - - -# func_warn_and_continue ARG... -# ----------------------------- -# Echo program name prefixed warning message to standard error. -func_warn_and_continue () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 -} - - -# func_warning CATEGORY ARG... -# ---------------------------- -# Echo program name prefixed warning message to standard error. Warning -# messages can be filtered according to CATEGORY, where this function -# elides messages where CATEGORY is not listed in the global variable -# 'opt_warning_types'. -func_warning () -{ - $debug_cmd - - # CATEGORY must be in the warning_categories list! - case " $warning_categories " in - *" $1 "*) ;; - *) func_internal_error "invalid warning category '$1'" ;; - esac - - _G_category=$1 - shift - - case " $opt_warning_types " in - *" $_G_category "*) $warning_func ${1+"$@"} ;; - esac -} - - -# func_sort_ver VER1 VER2 -# ----------------------- -# 'sort -V' is not generally available. -# Note this deviates from the version comparison in automake -# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a -# but this should suffice as we won't be specifying old -# version formats or redundant trailing .0 in bootstrap.conf. -# If we did want full compatibility then we should probably -# use m4_version_compare from autoconf. -func_sort_ver () -{ - $debug_cmd - - printf '%s\n%s\n' "$1" "$2" \ - | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n -} - -# func_lt_ver PREV CURR -# --------------------- -# Return true if PREV and CURR are in the correct order according to -# func_sort_ver, otherwise false. Use it like this: -# -# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." -func_lt_ver () -{ - $debug_cmd - - test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: -#! /bin/sh - -# Set a version string for this script. -scriptversion=2014-01-07.03; # UTC - -# A portable, pluggable option parser for Bourne shell. -# Written by Gary V. Vaughan, 2010 - -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# This file is a library for parsing options in your shell scripts along -# with assorted other useful supporting features that you can make use -# of too. -# -# For the simplest scripts you might need only: -# -# #!/bin/sh -# . relative/path/to/funclib.sh -# . relative/path/to/options-parser -# scriptversion=1.0 -# func_options ${1+"$@"} -# eval set dummy "$func_options_result"; shift -# ...rest of your script... -# -# In order for the '--version' option to work, you will need to have a -# suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. -# -# For '-h' and '--help' to work, you will also need a one line -# description of your script's purpose in a comment directly above the -# '# Written by ' line, like the one at the top of this file. -# -# The default options also support '--debug', which will turn on shell -# execution tracing (see the comment above debug_cmd below for another -# use), and '--verbose' and the func_verbose function to allow your script -# to display verbose messages only when your user has specified -# '--verbose'. -# -# After sourcing this file, you can plug processing for additional -# options by amending the variables from the 'Configuration' section -# below, and following the instructions in the 'Option parsing' -# section further down. - -## -------------- ## -## Configuration. ## -## -------------- ## - -# You should override these variables in your script after sourcing this -# file so that they reflect the customisations you have added to the -# option parser. - -# The usage line for option parsing errors and the start of '-h' and -# '--help' output messages. You can embed shell variables for delayed -# expansion at the time the message is displayed, but you will need to -# quote other shell meta-characters carefully to prevent them being -# expanded when the contents are evaled. -usage='$progpath [OPTION]...' - -# Short help message in response to '-h' and '--help'. Add to this or -# override it after sourcing this library to reflect the full set of -# options your script accepts. -usage_message="\ - --debug enable verbose shell tracing - -W, --warnings=CATEGORY - report the warnings falling in CATEGORY [all] - -v, --verbose verbosely report processing - --version print version information and exit - -h, --help print short or long help message and exit -" - -# Additional text appended to 'usage_message' in response to '--help'. -long_help_message=" -Warning categories include: - 'all' show all warnings - 'none' turn off all the warnings - 'error' warnings are treated as fatal errors" - -# Help message printed before fatal option parsing errors. -fatal_help="Try '\$progname --help' for more information." - - - -## ------------------------- ## -## Hook function management. ## -## ------------------------- ## - -# This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. - -# func_hookable FUNC_NAME -# ----------------------- -# Declare that FUNC_NAME will run hooks added with -# 'func_add_hook FUNC_NAME ...'. -func_hookable () -{ - $debug_cmd - - func_append hookable_fns " $1" -} - - -# func_add_hook FUNC_NAME HOOK_FUNC -# --------------------------------- -# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must -# first have been declared "hookable" by a call to 'func_hookable'. -func_add_hook () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not accept hook functions." ;; - esac - - eval func_append ${1}_hooks '" $2"' -} - - -# func_remove_hook FUNC_NAME HOOK_FUNC -# ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. -func_remove_hook () -{ - $debug_cmd - - eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' -} - - -# func_run_hooks FUNC_NAME [ARG]... -# --------------------------------- -# Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more -# than a whitespace-delimited list of legal shell function names, and -# no effort is wasted trying to catch shell meta-characters or preserve -# whitespace. -func_run_hooks () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; - esac - - eval _G_hook_fns=\$$1_hooks; shift - - for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - done - - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result -} - - - -## --------------- ## -## Option parsing. ## -## --------------- ## - -# In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. Like this: -# -# my_options_prep () -# { -# $debug_cmd -# -# # Extend the existing usage message. -# usage_message=$usage_message' -# -s, --silent don'\''t print informational messages -# ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result -# } -# func_add_hook func_options_prep my_options_prep -# -# -# my_silent_option () -# { -# $debug_cmd -# -# # Note that for efficiency, we parse as many options as we can -# # recognise in a loop before passing the remainder back to the -# # caller on the first unrecognised argument we encounter. -# while test $# -gt 0; do -# opt=$1; shift -# case $opt in -# --silent|-s) opt_silent=: ;; -# # Separate non-argument short options: -# -s*) func_split_short_opt "$_G_opt" -# set dummy "$func_split_short_opt_name" \ -# "-$func_split_short_opt_arg" ${1+"$@"} -# shift -# ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; -# esac -# done -# -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result -# } -# func_add_hook func_parse_options my_silent_option -# -# -# my_option_validation () -# { -# $debug_cmd -# -# $opt_silent && $opt_verbose && func_fatal_help "\ -# '--silent' and '--verbose' options are mutually exclusive." -# -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result -# } -# func_add_hook func_validate_options my_option_validation -# -# You'll alse need to manually amend $usage_message to reflect the extra -# options you parse. It's preferable to append if you can, so that -# multiple option parsing hooks can be added safely. - - -# func_options [ARG]... -# --------------------- -# All the functions called inside func_options are hookable. See the -# individual implementations for details. -func_hookable func_options -func_options () -{ - $debug_cmd - - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} - - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} - - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result -} - - -# func_options_prep [ARG]... -# -------------------------- -# All initialisations required before starting the option parse loop. -# Note that when calling hook functions, we pass through the list of -# positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning. -func_hookable func_options_prep -func_options_prep () -{ - $debug_cmd - - # Option defaults: - opt_verbose=false - opt_warning_types= - - func_run_hooks func_options_prep ${1+"$@"} - - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result -} - - -# func_parse_options [ARG]... -# --------------------------- -# The main option parsing loop. -func_hookable func_parse_options -func_parse_options () -{ - $debug_cmd - - func_parse_options_result= - - # this just eases exit handling - while test $# -gt 0; do - # Defer to hook functions for initial option parsing, so they - # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift - - # Break out of the loop if we already parsed every option. - test $# -gt 0 || break - - _G_opt=$1 - shift - case $_G_opt in - --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" - $debug_cmd - ;; - - --no-warnings|--no-warning|--no-warn) - set dummy --warnings none ${1+"$@"} - shift - ;; - - --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break - case " $warning_categories $1" in - *" $1 "*) - # trailing space prevents matching last $1 above - func_append_uniq opt_warning_types " $1" - ;; - *all) - opt_warning_types=$warning_categories - ;; - *none) - opt_warning_types=none - warning_func=: - ;; - *error) - opt_warning_types=$warning_categories - warning_func=func_fatal_error - ;; - *) - func_fatal_error \ - "unsupported warning category: '$1'" - ;; - esac - shift - ;; - - --verbose|-v) opt_verbose=: ;; - --version) func_version ;; - -\?|-h) func_usage ;; - --help) func_help ;; - - # Separate optargs to long options (plugins may need this): - --*=*) func_split_equals "$_G_opt" - set dummy "$func_split_equals_lhs" \ - "$func_split_equals_rhs" ${1+"$@"} - shift - ;; - - # Separate optargs to short options: - -W*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-v*|-x*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result -} - - -# func_validate_options [ARG]... -# ------------------------------ -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -func_hookable func_validate_options -func_validate_options () -{ - $debug_cmd - - # Display all warnings if -W was not given. - test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - - func_run_hooks func_validate_options ${1+"$@"} - - # Bail if the options were screwed! - $exit_cmd $EXIT_FAILURE - - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result -} - - - -## ----------------- ## -## Helper functions. ## -## ----------------- ## - -# This section contains the helper functions used by the rest of the -# hookable option parser framework in ascii-betical order. - - -# func_fatal_help ARG... -# ---------------------- -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - eval \$ECHO \""$fatal_help"\" - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - - -# func_help -# --------- -# Echo long help message to standard output and exit. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message" - exit 0 -} - - -# func_missing_arg ARGNAME -# ------------------------ -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $debug_cmd - - func_error "Missing argument for '$1'." - exit_cmd=exit -} - - -# func_split_equals STRING -# ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. -test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=${1%%=*} - func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` - func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ - || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` - } -fi #func_split_equals - - -# func_split_short_opt SHORTOPT -# ----------------------------- -# Set func_split_short_opt_name and func_split_short_opt_arg shell -# variables after splitting SHORTOPT after the 2nd character. -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"} - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` - func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` - } -fi #func_split_short_opt - - -# func_usage -# ---------- -# Echo short help message to standard output and exit. -func_usage () -{ - $debug_cmd - - func_usage_message - $ECHO "Run '$progname --help |${PAGER-more}' for full usage" - exit 0 -} - - -# func_usage_message -# ------------------ -# Echo short help message to standard output. -func_usage_message () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - echo - $SED -n 's|^# || - /^Written by/{ - x;p;x - } - h - /^Written by/q' < "$progpath" - echo - eval \$ECHO \""$usage_message"\" -} - - -# func_version -# ------------ -# Echo version message to standard output and exit. -func_version () -{ - $debug_cmd - - printf '%s\n' "$progname $scriptversion" - $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p - } - /^# Written by / { - s|^# || - p - } - /^warranty; /q' < "$progpath" - - exit $? -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: - -# Set a version string. -scriptversion='(GNU libtool) 2.4.6' - - -# func_echo ARG... -# ---------------- -# Libtool also displays the current mode in messages, so override -# funclib.sh func_echo with this custom definition. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_warning ARG... -# ------------------- -# Libtool warnings are not categorized, so override funclib.sh -# func_warning with this simpler definition. -func_warning () -{ - $debug_cmd - - $warning_func ${1+"$@"} -} - - -## ---------------- ## -## Options parsing. ## -## ---------------- ## - -# Hook in the functions to make sure our own options are parsed during -# the option parsing loop. - -usage='$progpath [OPTION]... [MODE-ARG]...' - -# Short help message in response to '-h'. -usage_message="Options: - --config show all configuration variables - --debug enable verbose shell tracing - -n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --mode=MODE use operation mode MODE - --no-warnings equivalent to '-Wnone' - --preserve-dup-deps don't remove duplicate dependency libraries - --quiet, --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - -v, --verbose print more informational messages than default - --version print version information - -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] - -h, --help, --help-all print short, long, or detailed help message -" - -# Additional text appended to 'usage_message' in response to '--help'. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. When passed as first option, -'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. -Try '$progname --help --mode=MODE' for a more detailed description of MODE. - -When reporting a bug, please describe a test case to reproduce it and -include the following information: - - host-triplet: $host - shell: $SHELL - compiler: $LTCC - compiler flags: $LTCFLAGS - linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.6 - automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` - autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` - -Report bugs to . -GNU libtool home page: . -General help using GNU software: ." - exit 0 -} - - -# func_lo2o OBJECT-NAME -# --------------------- -# Transform OBJECT-NAME from a '.lo' suffix to the platform specific -# object suffix. - -lo2o=s/\\.lo\$/.$objext/ -o2lo=s/\\.$objext\$/.lo/ - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_lo2o () - { - case $1 in - *.lo) func_lo2o_result=${1%.lo}.$objext ;; - * ) func_lo2o_result=$1 ;; - esac - }' - - # func_xform LIBOBJ-OR-SOURCE - # --------------------------- - # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) - # suffix to a '.lo' libtool-object suffix. - eval 'func_xform () - { - func_xform_result=${1%.*}.lo - }' -else - # ...otherwise fall back to using sed. - func_lo2o () - { - func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` - } - - func_xform () - { - func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` - } -fi - - -# func_fatal_configuration ARG... -# ------------------------------- -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func__fatal_error ${1+"$@"} \ - "See the $PACKAGE documentation for more information." \ - "Fatal configuration error." -} - - -# func_config -# ----------- -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - - -# func_features -# ------------- -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test yes = "$build_libtool_libs"; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test yes = "$build_old_libs"; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - - -# func_enable_tag TAGNAME -# ----------------------- -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname=$1 - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf=/$re_begincf/,/$re_endcf/p - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - - -# func_check_version_match -# ------------------------ -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -# libtool_options_prep [ARG]... -# ----------------------------- -# Preparation for options parsed by libtool. -libtool_options_prep () -{ - $debug_mode - - # Option defaults: - opt_config=false - opt_dlopen= - opt_dry_run=false - opt_help=false - opt_mode= - opt_preserve_dup_deps=false - opt_quiet=false - - nonopt= - preserve_args= - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result -} -func_add_hook func_options_prep libtool_options_prep - - -# libtool_parse_options [ARG]... -# --------------------------------- -# Provide handling for libtool specific options. -libtool_parse_options () -{ - $debug_cmd - - # Perform our own loop to consume as many options as possible in - # each iteration. - while test $# -gt 0; do - _G_opt=$1 - shift - case $_G_opt in - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - - --config) func_config ;; - - --dlopen|-dlopen) - opt_dlopen="${opt_dlopen+$opt_dlopen -}$1" - shift - ;; - - --preserve-dup-deps) - opt_preserve_dup_deps=: ;; - - --features) func_features ;; - - --finish) set dummy --mode finish ${1+"$@"}; shift ;; - - --help) opt_help=: ;; - - --help-all) opt_help=': help-all' ;; - - --mode) test $# = 0 && func_missing_arg $_G_opt && break - opt_mode=$1 - case $1 in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $_G_opt" - exit_cmd=exit - break - ;; - esac - shift - ;; - - --no-silent|--no-quiet) - opt_quiet=false - func_append preserve_args " $_G_opt" - ;; - - --no-warnings|--no-warning|--no-warn) - opt_warning=false - func_append preserve_args " $_G_opt" - ;; - - --no-verbose) - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --silent|--quiet) - opt_quiet=: - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --tag) test $# = 0 && func_missing_arg $_G_opt && break - opt_tag=$1 - func_append preserve_args " $_G_opt $1" - func_enable_tag "$1" - shift - ;; - - --verbose|-v) opt_quiet=false - opt_verbose=: - func_append preserve_args " $_G_opt" - ;; - - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result -} -func_add_hook func_parse_options libtool_parse_options - - - -# libtool_validate_options [ARG]... -# --------------------------------- -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -libtool_validate_options () -{ - # save first non-option argument - if test 0 -lt $#; then - nonopt=$1 - shift - fi - - # preserve --debug - test : = "$debug_cmd" || func_append preserve_args " --debug" - - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - test yes != "$build_libtool_libs" \ - && test yes != "$build_old_libs" \ - && func_fatal_configuration "not configured to build any kind of library" - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test execute != "$opt_mode"; then - func_error "unrecognized option '-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help=$help - help="Try '$progname --help --mode=$opt_mode' for more information." - } - - # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result -} -func_add_hook func_validate_options libtool_validate_options - - -# Process options as early as possible so that --help and --version -# can return quickly. -func_options ${1+"$@"} -eval set dummy "$func_options_result"; shift - - - -## ----------- ## -## Main. ## -## ----------- ## - -magic='%%%MAGIC variable%%%' -magic_exe='%%%MAGIC EXE variable%%%' - -# Global variables. -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# func_generated_by_libtool -# True iff stdin has been generated by Libtool. This function is only -# a basic sanity check; it will hardly flush out determined imposters. -func_generated_by_libtool_p () -{ - $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if 'file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case $lalib_p_line in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test yes = "$lalib_p" -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - test -f "$1" && - $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $debug_cmd - - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# 'FILE.' does not work on cygwin managed mounts. -func_source () -{ - $debug_cmd - - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_resolve_sysroot PATH -# Replace a leading = in PATH with a sysroot. Store the result into -# func_resolve_sysroot_result -func_resolve_sysroot () -{ - func_resolve_sysroot_result=$1 - case $func_resolve_sysroot_result in - =*) - func_stripname '=' '' "$func_resolve_sysroot_result" - func_resolve_sysroot_result=$lt_sysroot$func_stripname_result - ;; - esac -} - -# func_replace_sysroot PATH -# If PATH begins with the sysroot, replace it with = and -# store the result into func_replace_sysroot_result. -func_replace_sysroot () -{ - case $lt_sysroot:$1 in - ?*:"$lt_sysroot"*) - func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result='='$func_stripname_result - ;; - *) - # Including no sysroot. - func_replace_sysroot_result=$1 - ;; - esac -} - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $debug_cmd - - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with '--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=$1 - if test yes = "$build_libtool_libs"; then - write_lobj=\'$2\' - else - write_lobj=none - fi - - if test yes = "$build_old_libs"; then - write_oldobj=\'$3\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then - func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$sed_naive_backslashify"` - else - func_convert_core_file_wine_to_w32_result= - fi - fi -} -# end: func_convert_core_file_wine_to_w32 - - -# func_convert_core_path_wine_to_w32 ARG -# Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. -# -# ARG is path to be converted from $build format to win32. -# Result is available in $func_convert_core_path_wine_to_w32_result. -# Unconvertible file (directory) names in ARG are skipped; if no directory names -# are convertible, then the result may be empty. -func_convert_core_path_wine_to_w32 () -{ - $debug_cmd - - # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result= - if test -n "$1"; then - oldIFS=$IFS - IFS=: - for func_convert_core_path_wine_to_w32_f in $1; do - IFS=$oldIFS - func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result"; then - if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result - else - func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" - fi - fi - done - IFS=$oldIFS - fi -} -# end: func_convert_core_path_wine_to_w32 - - -# func_cygpath ARGS... -# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -# (2), returns the Cygwin file name or path in func_cygpath_result (input -# file name or path is assumed to be in w32 format, as previously converted -# from $build's *nix or MSYS format). In case (3), returns the w32 file name -# or path in func_cygpath_result (input file name or path is assumed to be in -# Cygwin format). Returns an empty string on error. -# -# ARGS are passed to cygpath, with the last one being the file name or path to -# be converted. -# -# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -# environment variable; do not put it in $PATH. -func_cygpath () -{ - $debug_cmd - - if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then - func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_cygpath_result= - fi - else - func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" - fi -} -#end: func_cygpath - - -# func_convert_core_msys_to_w32 ARG -# Convert file name or path ARG from MSYS format to w32 format. Return -# result in func_convert_core_msys_to_w32_result. -func_convert_core_msys_to_w32 () -{ - $debug_cmd - - # awkward: cmd appends spaces to result - func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` -} -#end: func_convert_core_msys_to_w32 - - -# func_convert_file_check ARG1 ARG2 -# Verify that ARG1 (a file name in $build format) was converted to $host -# format in ARG2. Otherwise, emit an error message, but continue (resetting -# func_to_host_file_result to ARG1). -func_convert_file_check () -{ - $debug_cmd - - if test -z "$2" && test -n "$1"; then - func_error "Could not determine host file name corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_file_result=$1 - fi -} -# end func_convert_file_check - - -# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -# Verify that FROM_PATH (a path in $build format) was converted to $host -# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -# func_to_host_file_result to a simplistic fallback value (see below). -func_convert_path_check () -{ - $debug_cmd - - if test -z "$4" && test -n "$3"; then - func_error "Could not determine the host path corresponding to" - func_error " '$3'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This is a deliberately simplistic "conversion" and - # should not be "improved". See libtool.info. - if test "x$1" != "x$2"; then - lt_replace_pathsep_chars="s|$1|$2|g" - func_to_host_path_result=`echo "$3" | - $SED -e "$lt_replace_pathsep_chars"` - else - func_to_host_path_result=$3 - fi - fi -} -# end func_convert_path_check - - -# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -# and appending REPL if ORIG matches BACKPAT. -func_convert_path_front_back_pathsep () -{ - $debug_cmd - - case $4 in - $1 ) func_to_host_path_result=$3$func_to_host_path_result - ;; - esac - case $4 in - $2 ) func_append func_to_host_path_result "$3" - ;; - esac -} -# end func_convert_path_front_back_pathsep - - -################################################## -# $build to $host FILE NAME CONVERSION FUNCTIONS # -################################################## -# invoked via '$to_host_file_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# Result will be available in $func_to_host_file_result. - - -# func_to_host_file ARG -# Converts the file name ARG from $build format to $host format. Return result -# in func_to_host_file_result. -func_to_host_file () -{ - $debug_cmd - - $to_host_file_cmd "$1" -} -# end func_to_host_file - - -# func_to_tool_file ARG LAZY -# converts the file name ARG from $build format to toolchain format. Return -# result in func_to_tool_file_result. If the conversion in use is listed -# in (the comma separated) LAZY, no conversion takes place. -func_to_tool_file () -{ - $debug_cmd - - case ,$2, in - *,"$to_tool_file_cmd",*) - func_to_tool_file_result=$1 - ;; - *) - $to_tool_file_cmd "$1" - func_to_tool_file_result=$func_to_host_file_result - ;; - esac -} -# end func_to_tool_file - - -# func_convert_file_noop ARG -# Copy ARG to func_to_host_file_result. -func_convert_file_noop () -{ - func_to_host_file_result=$1 -} -# end func_convert_file_noop - - -# func_convert_file_msys_to_w32 ARG -# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_file_result. -func_convert_file_msys_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result=$func_convert_core_msys_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_w32 - - -# func_convert_file_cygwin_to_w32 ARG -# Convert file name ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_file_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # because $build is cygwin, we call "the" cygpath in $PATH; no need to use - # LT_CYGPATH in this case. - func_to_host_file_result=`cygpath -m "$1"` - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_cygwin_to_w32 - - -# func_convert_file_nix_to_w32 ARG -# Convert file name ARG from *nix to w32 format. Requires a wine environment -# and a working winepath. Returns result in func_to_host_file_result. -func_convert_file_nix_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result=$func_convert_core_file_wine_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_w32 - - -# func_convert_file_msys_to_cygwin ARG -# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_file_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_cygwin - - -# func_convert_file_nix_to_cygwin ARG -# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -# in func_to_host_file_result. -func_convert_file_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. - func_convert_core_file_wine_to_w32 "$1" - func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_cygwin - - -############################################# -# $build to $host PATH CONVERSION FUNCTIONS # -############################################# -# invoked via '$to_host_path_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# The result will be available in $func_to_host_path_result. -# -# Path separators are also converted from $build format to $host format. If -# ARG begins or ends with a path separator character, it is preserved (but -# converted to $host format) on output. -# -# All path conversion functions are named using the following convention: -# file name conversion function : func_convert_file_X_to_Y () -# path conversion function : func_convert_path_X_to_Y () -# where, for any given $build/$host combination the 'X_to_Y' value is the -# same. If conversion functions are added for new $build/$host combinations, -# the two new functions must follow this pattern, or func_init_to_host_path_cmd -# will break. - - -# func_init_to_host_path_cmd -# Ensures that function "pointer" variable $to_host_path_cmd is set to the -# appropriate value, based on the value of $to_host_file_cmd. -to_host_path_cmd= -func_init_to_host_path_cmd () -{ - $debug_cmd - - if test -z "$to_host_path_cmd"; then - func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd=func_convert_path_$func_stripname_result - fi -} - - -# func_to_host_path ARG -# Converts the path ARG from $build format to $host format. Return result -# in func_to_host_path_result. -func_to_host_path () -{ - $debug_cmd - - func_init_to_host_path_cmd - $to_host_path_cmd "$1" -} -# end func_to_host_path - - -# func_convert_path_noop ARG -# Copy ARG to func_to_host_path_result. -func_convert_path_noop () -{ - func_to_host_path_result=$1 -} -# end func_convert_path_noop - - -# func_convert_path_msys_to_w32 ARG -# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_path_result. -func_convert_path_msys_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from ARG. MSYS - # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; - # and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_msys_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_msys_to_w32 - - -# func_convert_path_cygwin_to_w32 ARG -# Convert path ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_path_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_cygwin_to_w32 - - -# func_convert_path_nix_to_w32 ARG -# Convert path ARG from *nix to w32 format. Requires a wine environment and -# a working winepath. Returns result in func_to_host_file_result. -func_convert_path_nix_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_path_wine_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_nix_to_w32 - - -# func_convert_path_msys_to_cygwin ARG -# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_path_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_msys_to_cygwin - - -# func_convert_path_nix_to_cygwin ARG -# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -# func_to_host_file_result. -func_convert_path_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_nix_to_cygwin - - -# func_dll_def_p FILE -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with _LT_DLL_DEF_P in libtool.m4 -func_dll_def_p () -{ - $debug_cmd - - func_dll_def_p_tmp=`$SED -n \ - -e 's/^[ ]*//' \ - -e '/^\(;.*\)*$/d' \ - -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ - -e q \ - "$1"` - test DEF = "$func_dll_def_p_tmp" -} - - -# func_mode_compile arg... -func_mode_compile () -{ - $debug_cmd - - # Get the compilation command and the source file. - base_compile= - srcfile=$nonopt # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg=$arg - arg_mode=normal - ;; - - target ) - libobj=$arg - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify '-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - func_append later " $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs=$IFS; IFS=, - for arg in $args; do - IFS=$save_ifs - func_append_quoted lastarg "$arg" - done - IFS=$save_ifs - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - func_append base_compile " $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg=$srcfile - srcfile=$arg - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with '-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj=$func_basename_result - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from '$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test yes = "$build_libtool_libs" \ - || func_fatal_configuration "cannot build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name '$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname=$func_basename_result - xdir=$func_dirname_result - lobj=$xdir$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test yes = "$build_old_libs"; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test no = "$compiler_c_o"; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext - lockfile=$output_obj.lock - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test yes = "$need_locks"; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test warn = "$need_locks"; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 - srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test yes = "$build_libtool_libs"; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test no != "$pic_mode"; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test yes = "$suppress_opt"; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test yes = "$build_old_libs"; then - if test yes != "$pic_mode"; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test yes = "$compiler_c_o"; then - func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test no != "$need_locks"; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test compile = "$opt_mode" && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a '.o' file suitable for static linking - -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a 'standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix '.c' with the -library object suffix, '.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to '-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the '--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the 'install' or 'cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE use a list of object files found in FILE to specify objects - -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with '-') are ignored. - -Every other argument is treated as a filename. Files ending in '.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in '.la', then a libtool library is created, -only library objects ('.lo' files) may be specified, and '-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created -using 'ar' and 'ranlib', or on Windows using 'lib'. - -If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode '$opt_mode'" - ;; - esac - - echo - $ECHO "Try '$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test : = "$opt_help"; then - func_mode_help - else - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | $SED -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - $SED '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $debug_cmd - - # The first argument is the command name. - cmd=$nonopt - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "'$file' is not a file" - - dir= - case $file in - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "'$file' was not linked with '-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir=$func_dirname_result - - if test -f "$dir/$objdir/$dlname"; then - func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir=$func_dirname_result - ;; - - *) - func_warning "'-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir=$absdir - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic=$magic - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file=$progdir/$program - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file=$progdir/$program - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if $opt_dry_run; then - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - else - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd=\$cmd$args - fi -} - -test execute = "$opt_mode" && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $debug_cmd - - libs= - libdirs= - admincmds= - - for opt in "$nonopt" ${1+"$@"} - do - if test -d "$opt"; then - func_append libdirs " $opt" - - elif test -f "$opt"; then - if func_lalib_unsafe_p "$opt"; then - func_append libs " $opt" - else - func_warning "'$opt' is not a valid libtool archive" - fi - - else - func_fatal_error "invalid argument '$opt'" - fi - done - - if test -n "$libs"; then - if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` - sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" - else - sysroot_cmd= - fi - - # Remove sysroot references - if $opt_dry_run; then - for lib in $libs; do - echo "removing references to $lt_sysroot and '=' prefixes from $lib" - done - else - tmpdir=`func_mktempdir` - for lib in $libs; do - $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ - > $tmpdir/tmp-la - mv -f $tmpdir/tmp-la $lib - done - ${RM}r "$tmpdir" - fi - fi - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_quiet && exit $EXIT_SUCCESS - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the '-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the '$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the '$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the '$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - fi - exit $EXIT_SUCCESS -} - -test finish = "$opt_mode" && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $debug_cmd - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac - then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=false - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - func_append files " $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=: ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test X-m = "X$prev" && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the '$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=: - if $isdir; then - destdir=$dest - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir=$func_dirname_result - destname=$func_basename_result - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "'$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "'$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - func_append staticlibs " $file" - ;; - - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir=$func_dirname_result - func_append dir "$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking '$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname=$1 - shift - - srcname=$realname - test -n "$relink_command" && srcname=${realname}T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme=$stripme - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme= - ;; - esac - ;; - os2*) - case $realname in - *_dll.a) - tstripme= - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try 'ln -sf' first, because the 'ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib=$destdir/$realname - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name=$func_basename_result - instname=$dir/${name}i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest=$destfile - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to '$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test yes = "$build_old_libs"; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext= - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=.exe - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script '$wrapper'" - - finalize=: - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "'$lib' has not been installed in '$libdir'" - finalize=false - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test no = "$fast_install" && test -n "$relink_command"; then - $opt_dry_run || { - if $finalize; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file=$func_basename_result - outputname=$tmpdir/$file - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink '$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file=$outputname - else - func_warning "cannot relink '$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name=$func_basename_result - - # Set up the ranlib parameters. - oldlib=$destdir/$name - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $tool_oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run '$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test install = "$opt_mode" && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $debug_cmd - - my_outputname=$1 - my_originator=$2 - my_pic_p=${3-false} - my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms=${my_outputname}S.c - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist=$output_objdir/$my_outputname.nm - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* External symbol declarations for the compiler. */\ -" - - if test yes = "$dlself"; then - func_verbose "generating symbol list for '$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from '$func_to_tool_file_result'" - $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols=$output_objdir/$outputname.exp - $opt_dry_run || { - $RM $export_symbols - eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from '$dlprefile'" - func_basename "$dlprefile" - name=$func_basename_result - case $host in - *cygwin* | *mingw* | *cegcc* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" - eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename= - if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then - # Use subshell, to avoid clobbering current variable values - dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname"; then - func_basename "$dlprefile_dlname" - dlprefile_dlbasename=$func_basename_result - else - # no lafile. user explicitly requested -dlpreopen . - $sharedlib_from_linklib_cmd "$dlprefile" - dlprefile_dlbasename=$sharedlib_from_linklib_result - fi - fi - $opt_dry_run || { - if test -n "$dlprefile_dlbasename"; then - eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' - else - func_warning "Could not compute DLL name from $name" - eval '$ECHO ": $name " >> "$nlist"' - fi - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - } - else # not an import lib - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - fi - ;; - *) - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - ;; - esac - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - func_show_eval '$RM "${nlist}I"' - if test -n "$global_symbol_to_import"; then - eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[];\ -" - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ -static void lt_syminit(void) -{ - LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; - for (; symbol->name; ++symbol) - {" - $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" - echo >> "$output_objdir/$my_dlsyms" "\ - } -}" - fi - echo >> "$output_objdir/$my_dlsyms" "\ -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{ {\"$my_originator\", (void *) 0}," - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ - {\"@INIT@\", (void *) <_syminit}," - fi - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - $my_pic_p && pic_flag_for_symtable=" $pic_flag" - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) func_append symtab_cflags " $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' - - # Transform the symbol file into the correct name. - symfileobj=$output_objdir/${my_outputname}S.$objext - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for '$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $debug_cmd - - win32_libid_type=unknown - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - case $nm_interface in - "MS dumpbin") - if func_cygming_ms_implib_p "$1" || - func_cygming_gnu_implib_p "$1" - then - win32_nmres=import - else - win32_nmres= - fi - ;; - *) - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ - s|.*|import| - p - q - } - }'` - ;; - esac - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - -# func_cygming_dll_for_implib ARG -# -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib () -{ - $debug_cmd - - sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -} - -# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -# -# The is the core of a fallback implementation of a -# platform-specific function to extract the name of the -# DLL associated with the specified import library LIBNAME. -# -# SECTION_NAME is either .idata$6 or .idata$7, depending -# on the platform and compiler that created the implib. -# -# Echos the name of the DLL associated with the -# specified import library. -func_cygming_dll_for_implib_fallback_core () -{ - $debug_cmd - - match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` - $OBJDUMP -s --section "$1" "$2" 2>/dev/null | - $SED '/^Contents of section '"$match_literal"':/{ - # Place marker at beginning of archive member dllname section - s/.*/====MARK====/ - p - d - } - # These lines can sometimes be longer than 43 characters, but - # are always uninteresting - /:[ ]*file format pe[i]\{,1\}-/d - /^In archive [^:]*:/d - # Ensure marker is printed - /^====MARK====/p - # Remove all lines with less than 43 characters - /^.\{43\}/!d - # From remaining lines, remove first 43 characters - s/^.\{43\}//' | - $SED -n ' - # Join marker and all lines until next marker into a single line - /^====MARK====/ b para - H - $ b para - b - :para - x - s/\n//g - # Remove the marker - s/^====MARK====// - # Remove trailing dots and whitespace - s/[\. \t]*$// - # Print - /./p' | - # we now have a list, one entry per line, of the stringified - # contents of the appropriate section of all members of the - # archive that possess that section. Heuristic: eliminate - # all those that have a first or second character that is - # a '.' (that is, objdump's representation of an unprintable - # character.) This should work for all archives with less than - # 0x302f exports -- but will fail for DLLs whose name actually - # begins with a literal '.' or a single character followed by - # a '.'. - # - # Of those that remain, print the first one. - $SED -e '/^\./d;/^.\./d;q' -} - -# func_cygming_dll_for_implib_fallback ARG -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# -# This fallback implementation is for use when $DLLTOOL -# does not support the --identify-strict option. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib_fallback () -{ - $debug_cmd - - if func_cygming_gnu_implib_p "$1"; then - # binutils import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1"; then - # ms-generated import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` - else - # unknown - sharedlib_from_linklib_result= - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $debug_cmd - - f_ex_an_ar_dir=$1; shift - f_ex_an_ar_oldlib=$1 - if test yes = "$lock_old_archive_extraction"; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test yes = "$lock_old_archive_extraction"; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $debug_cmd - - my_gentop=$1; shift - my_oldlibs=${1+"$@"} - my_oldobjs= - my_xlib= - my_xabs= - my_xdir= - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib=$func_basename_result - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir=$my_gentop/$my_xlib_u - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - func_basename "$darwin_archive" - darwin_base_archive=$func_basename_result - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches; do - func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" - $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" - cd "unfat-$$/$darwin_base_archive-$darwin_arch" - func_extract_an_archive "`pwd`" "$darwin_base_archive" - cd "$darwin_curdir" - $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result=$my_oldobjs -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory where it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ that is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options that match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case \" \$* \" in - *\\ --lt-*) - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done ;; - esac - func_exec_program_core \${1+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test yes = "$fast_install"; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - \$ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # fixup the dll searchpath if we need to. - # - # Fix the DLL searchpath if we need to. Do this before prepending - # to shlibpath, because on Windows, both are PATH and uninstalled - # libraries must come first. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - # Export our shlibpath_var if we have one. - if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* declarations of non-ANSI functions */ -#if defined __MINGW32__ -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined __CYGWIN__ -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined other_platform || defined ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined _MSC_VER -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -#elif defined __MINGW32__ -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined __CYGWIN__ -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined other platforms ... */ -#endif - -#if defined PATH_MAX -# define LT_PATHMAX PATH_MAX -#elif defined MAXPATHLEN -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ - defined __OS2__ -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free (stale); stale = 0; } \ -} while (0) - -#if defined LT_DEBUGWRAPPER -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - size_t tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined HAVE_DOS_BASED_FILE_SYSTEM - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined HAVE_DOS_BASED_FILE_SYSTEM - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = (size_t) (q - p); - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (STREQ (str, pat)) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - size_t len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - size_t orig_value_len = strlen (orig_value); - size_t add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - size_t len = strlen (new_value); - while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[--len] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -n -e ' -s/^\(.\{79\}\)\(..*\)/\1\ -\2/ -h -s/\([\\"]\)/\\\1/g -s/$/\\n/ -s/\([^\n]*\).*/ fputs ("\1", f);/p -g -D' - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $debug_cmd - - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_suncc_cstd_abi -# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! -# Several compiler flags select an ABI that is incompatible with the -# Cstd library. Avoid specifying it if any are in CXXFLAGS. -func_suncc_cstd_abi () -{ - $debug_cmd - - case " $compile_command " in - *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) - suncc_use_cstd_abi=no - ;; - *) - suncc_use_cstd_abi=yes - ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $debug_cmd - - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # what system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll that has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - os2dllname= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=false - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module=$wl-single_module - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test yes != "$build_libtool_libs" \ - && func_fatal_configuration "cannot build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg=$1 - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir=$arg - prev= - continue - ;; - dlfiles|dlprefiles) - $preload || { - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=: - } - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test no = "$dlself"; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test dlprefiles = "$prev"; then - dlself=yes - elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test dlfiles = "$prev"; then - func_append dlfiles " $arg" - else - func_append dlprefiles " $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols=$arg - test -f "$arg" \ - || func_fatal_error "symbol file '$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex=$arg - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir=$arg - prev= - continue - ;; - mllvm) - # Clang does not use LLVM to link, so we can simply discard any - # '-mllvm $arg' options when doing the link step. - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - if test none != "$pic_object"; then - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - fi - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file '$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - os2dllname) - os2dllname=$arg - prev= - continue - ;; - precious_regex) - precious_files_regex=$arg - prev= - continue - ;; - release) - release=-$arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test rpath = "$prev"; then - case "$rpath " in - *" $arg "*) ;; - *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) func_append xrpath " $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds=$arg - prev= - continue - ;; - weak) - func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg=$arg - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "'-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test X-export-symbols = "X$arg"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname "-L" '' "$arg" - if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between '-L' and '$1'" - else - func_fatal_error "need path for '-L' option" - fi - fi - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of '$dir'" - dir=$absdir - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # Preserve sysroot, but never include relative directories - case $dir in - [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; - *) func_append deplibs " -L$dir" ;; - esac - func_append lib_search_path " $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test X-lc = "X$arg" || test X-lm = "X$arg"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test X-lc = "X$arg" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc due to us having libc/libc_r. - test X-lc = "X$arg" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test X-lc = "X$arg" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test X-lc = "X$arg" && continue - ;; - esac - elif test X-lc_r = "X$arg"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - func_append deplibs " $arg" - continue - ;; - - -mllvm) - prev=mllvm - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; - - -multi_module) - single_module=$wl-multi_module - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "'-no-install' is ignored for $host" - func_warning "assuming '-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -os2dllname) - prev=os2dllname - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - =*) - func_stripname '=' '' "$dir" - dir=$lt_sysroot$func_stripname_result - ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # -fstack-protector* stack protector flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -stdlib=* select c++ std lib with clang - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" - func_append finalize_command " $arg" - func_append compiler_flags " $arg" - continue - ;; - - -Z*) - if test os2 = "`expr $host : '.*\(os2\)'`"; then - # OS/2 uses -Zxxx to specify OS/2-specific options - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case $arg in - -Zlinker | -Zstack) - prev=xcompiler - ;; - esac - continue - else - # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - fi - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - *.$objext) - # A standard object. - func_append objs " $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - test none = "$pic_object" || { - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - } - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - func_append deplibs " $arg" - func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - func_resolve_sysroot "$arg" - if test dlfiles = "$prev"; then - # This library was specified with -dlopen. - func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test dlprefiles = "$prev"; then - # The library was specified with -dlpreopen. - func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else - func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the '$prevarg' option requires an argument" - - if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname=$func_basename_result - libobjs_save=$libobjs - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - # Definition is injected by LT_CONFIG during libtool generation. - func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" - - func_dirname "$output" "/" "" - output_objdir=$func_dirname_result$objdir - func_to_tool_file "$output_objdir/" - tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_preserve_dup_deps; then - case "$libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append libs " $deplib" - done - - if test lib = "$linkmode"; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac - func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=false - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test lib,link = "$linkmode,$pass"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs=$tmp_deplibs - fi - - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass"; then - libs=$deplibs - deplibs= - fi - if test prog = "$linkmode"; then - case $pass in - dlopen) libs=$dlfiles ;; - dlpreopen) libs=$dlprefiles ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test lib,dlpreopen = "$linkmode,$pass"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) func_append deplibs " $deplib" ;; - esac - done - done - libs=$dlprefiles - fi - if test dlopen = "$pass"; then - # Collect dlpreopened libraries - save_deplibs=$deplibs - deplibs= - fi - - for deplib in $libs; do - lib= - found=false - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append compiler_flags " $deplib" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test lib != "$linkmode" && test prog != "$linkmode"; then - func_warning "'-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test lib = "$linkmode"; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib=$searchdir/lib$name$search_ext - if test -f "$lib"; then - if test .la = "$search_ext"; then - found=: - else - found=false - fi - break 2 - fi - done - done - if $found; then - # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll=$l - done - if test "X$ll" = "X$old_library"; then # only static version available - found=false - func_dirname "$lib" "" "." - ladir=$func_dirname_result - lib=$ladir/$old_library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - else - # deplib doesn't seem to be a libtool library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - ;; # -l - *.ltframework) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test conv = "$pass" && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - if test scan = "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "'-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test link = "$pass"; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=false - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=: - fi - ;; - pass_all) - valid_a_lib=: - ;; - esac - if $valid_a_lib; then - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - else - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - fi - ;; - esac - continue - ;; - prog) - if test link != "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - elif test prog = "$linkmode"; then - if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append newdlfiles " $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=: - continue - ;; - esac # case $deplib - - $found || test -f "$lib" \ - || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "'$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir=$func_dirname_result - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass" || - { test prog != "$linkmode" && test lib != "$linkmode"; }; then - test -n "$dlopen" && func_append dlfiles " $dlopen" - test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test conv = "$pass"; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - # It is a libtool convenience library, so add in its objects. - func_append convenience " $ladir/$objdir/$old_library" - func_append old_convenience " $ladir/$objdir/$old_library" - elif test prog != "$linkmode" && test lib != "$linkmode"; then - func_fatal_error "'$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - if test -n "$old_library" && - { test yes = "$prefer_static_libs" || - test built,no = "$prefer_static_libs,$installed"; }; then - linklib=$old_library - else - for l in $old_library $library_names; do - linklib=$l - done - fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - - # This library was specified with -dlopen. - if test dlopen = "$pass"; then - test -z "$libdir" \ - && func_fatal_error "cannot -dlopen a convenience library: '$lib'" - if test -z "$dlname" || - test yes != "$dlopen_support" || - test no = "$build_libtool_libs" - then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - func_append dlprefiles " $lib $dependency_libs" - else - func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of '$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir=$ladir - fi - ;; - esac - func_basename "$lib" - laname=$func_basename_result - - # Find the relevant object directory and library name. - if test yes = "$installed"; then - if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library '$lib' was moved." - dir=$ladir - absdir=$abs_ladir - libdir=$abs_ladir - else - dir=$lt_sysroot$libdir - absdir=$lt_sysroot$libdir - fi - test yes = "$hardcode_automatic" && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir=$ladir - absdir=$abs_ladir - # Remove this search path later - func_append notinst_path " $abs_ladir" - else - dir=$ladir/$objdir - absdir=$abs_ladir/$objdir - # Remove this search path later - func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test dlpreopen = "$pass"; then - if test -z "$libdir" && test prog = "$linkmode"; then - func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" - fi - case $host in - # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present - # (otherwise, the dlopen module name will be incorrect). We do - # this by putting the import library name into $newdlprefiles. - # We recover the dlopen module name by 'saving' the la file - # name in a special purpose variable, and (later) extracting the - # dlname from the la file. - if test -n "$dlname"; then - func_tr_sh "$dir/$linklib" - eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" - func_append newdlprefiles " $dir/$linklib" - else - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - fi - ;; - * ) - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - func_append newdlprefiles " $dir/$dlname" - else - func_append newdlprefiles " $dir/$linklib" - fi - ;; - esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test lib = "$linkmode"; then - deplibs="$dir/$old_library $deplibs" - elif test prog,link = "$linkmode,$pass"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test prog = "$linkmode" && test link != "$pass"; then - func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=false - if test no != "$link_all_deplibs" || test -z "$library_names" || - test no = "$build_libtool_libs"; then - linkalldeplibs=: - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if $linkalldeplibs; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test prog,link = "$linkmode,$pass"; then - if test -n "$library_names" && - { { test no = "$prefer_static_libs" || - test built,yes = "$prefer_static_libs,$installed"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then - # Make sure the rpath contains only unique directories. - case $temp_rpath: in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if $alldeplibs && - { test pass_all = "$deplibs_check_method" || - { test yes = "$build_libtool_libs" && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test built = "$use_static_libs" && test yes = "$installed"; then - use_static_libs=no - fi - if test -n "$library_names" && - { test no = "$use_static_libs" || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc* | *os2*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test no = "$installed"; then - func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule= - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule=$dlpremoduletest - break - fi - done - if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then - echo - if test prog = "$linkmode"; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test lib = "$linkmode" && - test yes = "$hardcode_into_libs"; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname=$1 - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname=$dlname - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc* | *os2*) - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - esac - eval soname=\"$soname_spec\" - else - soname=$realname - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot=$soname - func_basename "$soroot" - soname=$func_basename_result - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from '$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for '$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test prog = "$linkmode" || test relink != "$opt_mode"; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test no = "$hardcode_direct"; then - add=$dir/$linklib - case $host in - *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; - *-*-sysv4*uw2*) add_dir=-L$dir ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir=-L$dir ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we cannot - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library"; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add=$dir/$old_library - fi - elif test -n "$old_library"; then - add=$dir/$old_library - fi - fi - esac - elif test no = "$hardcode_minus_L"; then - case $host in - *-*-sunos*) add_shlibpath=$dir ;; - esac - add_dir=-L$dir - add=-l$name - elif test no = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - relink) - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$dir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$absdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test yes != "$lib_linked"; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test prog = "$linkmode"; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test yes != "$hardcode_direct" && - test yes != "$hardcode_minus_L" && - test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - - if test prog = "$linkmode" || test relink = "$opt_mode"; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$libdir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$libdir - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - add=-l$name - elif test yes = "$hardcode_automatic"; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib"; then - add=$inst_prefix_dir$libdir/$linklib - else - add=$libdir/$linklib - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir=-L$libdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - fi - - if test prog = "$linkmode"; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test prog = "$linkmode"; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test unsupported != "$hardcode_direct"; then - test -n "$old_library" && linklib=$old_library - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test yes = "$build_libtool_libs"; then - # Not a shared library - if test pass_all != "$deplibs_check_method"; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system cannot link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test yes = "$module"; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test lib = "$linkmode"; then - if test -n "$dependency_libs" && - { test yes != "$hardcode_into_libs" || - test yes = "$build_old_libs" || - test yes = "$link_static"; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) func_append xrpath " $temp_xrpath";; - esac;; - *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs=$temp_deplibs - fi - - func_append newlib_search_path " $absdir" - # Link against this library - test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result";; - *) func_resolve_sysroot "$deplib" ;; - esac - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $func_resolve_sysroot_result "*) - func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi - func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test no != "$link_all_deplibs"; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path=$deplib ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of '$dir'" - absdir=$dir - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names"; then - for tmp in $deplibrary_names; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl"; then - depdepl=$absdir/$objdir/$depdepl - darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" - func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" - path= - fi - fi - ;; - *) - path=-L$absdir/$objdir - ;; - esac - else - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "'$deplib' seems to be moved" - - path=-L$absdir - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test link = "$pass"; then - if test prog = "$linkmode"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs=$newdependency_libs - if test dlpreopen = "$pass"; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test dlopen != "$pass"; then - test conv = "$pass" || { - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= - } - - if test prog,link = "$linkmode,$pass"; then - vars="compile_deplibs finalize_deplibs" - else - vars=deplibs - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) func_append tmp_libs " $deplib" ;; - esac - ;; - *) func_append tmp_libs " $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - - # Add Sun CC postdeps if required: - test CXX = "$tagname" && { - case $host_os in - linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C++ 5.9 - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - - solaris*) - func_cc_basename "$CC" - case $func_cc_basename_result in - CC* | sunCC*) - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - esac - } - - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i= - ;; - esac - if test -n "$i"; then - func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test prog = "$linkmode"; then - dlfiles=$newdlfiles - fi - if test prog = "$linkmode" || test lib = "$linkmode"; then - dlprefiles=$newdlprefiles - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "'-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "'-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs=$output - func_append objs "$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form 'libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test no = "$module" \ - && func_fatal_help "libtool library '$output' must begin with 'lib'" - - if test no != "$need_lib_prefix"; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test pass_all != "$deplibs_check_method"; then - func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - func_append libobjs " $objs" - fi - fi - - test no = "$dlself" \ - || func_warning "'-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test 1 -lt "$#" \ - && func_warning "ignoring multiple '-rpath's for a libtool library" - - install_libdir=$1 - - oldlibs= - if test -z "$rpath"; then - if test yes = "$build_libtool_libs"; then - # Building a libtool convenience library. - # Some compilers have problems with a '.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "'-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs=$IFS; IFS=: - set dummy $vinfo 0 0 0 - shift - IFS=$save_ifs - - test -n "$7" && \ - func_fatal_help "too many parameters to '-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major=$1 - number_minor=$2 - number_revision=$3 - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # that has an extra 1 added just for fun - # - case $version_type in - # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_revision - ;; - freebsd-aout|qnx|sunos) - current=$number_major - revision=$number_minor - age=0 - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_minor - lt_irix_increment=no - ;; - esac - ;; - no) - current=$1 - revision=$2 - age=$3 - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT '$current' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION '$revision' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE '$age' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE '$age' is greater than the current interface number '$current'" - func_fatal_error "'$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - # On Darwin other compilers - case $CC in - nagfor*) - verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - ;; - *) - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - esac - ;; - - freebsd-aout) - major=.$current - versuffix=.$current.$revision - ;; - - freebsd-elf) - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - irix | nonstopux) - if test no = "$lt_irix_increment"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring=$verstring_prefix$major.$revision - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test 0 -ne "$loop"; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring_prefix$major.$iface:$verstring - done - - # Before this point, $major must not contain '.'. - major=.$major - versuffix=$major.$revision - ;; - - linux) # correct to gnu/linux during the next big refactor - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=.$current.$age.$revision - verstring=$current.$age.$revision - - # Add in all the interfaces that we are compatible with. - loop=$age - while test 0 -ne "$loop"; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring:$iface.0 - done - - # Make executables depend on our current version. - func_append verstring ":$current.0" - ;; - - qnx) - major=.$current - versuffix=.$current - ;; - - sco) - major=.$current - versuffix=.$current - ;; - - sunos) - major=.$current - versuffix=.$current.$revision - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 file systems. - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - - *) - func_fatal_configuration "unknown library version type '$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring=0.0 - ;; - esac - if test no = "$need_version"; then - versuffix= - else - versuffix=.0.0 - fi - fi - - # Remove version info from name if versioning should be avoided - if test yes,no = "$avoid_version,$need_version"; then - major= - versuffix= - verstring= - fi - - # Check to see if the archive will have undefined symbols. - if test yes = "$allow_undefined"; then - if test unsupported = "$allow_undefined_flag"; then - if test yes = "$build_old_libs"; then - func_warning "undefined symbols not allowed in $host shared libraries; building static only" - build_libtool_libs=no - else - func_fatal_error "can't build $host shared library unless -no-undefined is specified" - fi - fi - else - # Don't allow undefined symbols. - allow_undefined_flag=$no_undefined_flag - fi - - fi - - func_generate_dlsyms "$libname" "$libname" : - func_append libobjs " $symfileobj" - test " " = "$libobjs" && libobjs= - - if test relink != "$opt_mode"; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) - if test -n "$precious_files_regex"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - func_append removelist " $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then - func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles=$dlfiles - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) func_append dlfiles " $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles=$dlprefiles - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) func_append dlprefiles " $lib" ;; - esac - done - - if test yes = "$build_libtool_libs"; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test yes = "$build_libtool_need_lc"; then - func_append deplibs " -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release= - versuffix= - major= - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - $nocaseglob - else - potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` - fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib=$potent_lib - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | $SED 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; - *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $a_deplib "*) - func_append newdeplibs " $a_deplib" - a_deplib= - ;; - esac - fi - if test -n "$a_deplib"; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib=$potent_lib # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs= - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - for i in $predeps $postdeps; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test none = "$deplibs_check_method"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test yes = "$droppeddeps"; then - if test yes = "$module"; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test no = "$allow_undefined"; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - deplibs=$new_libs - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test yes = "$build_libtool_libs"; then - # Remove $wl instances when linking with ld. - # FIXME: should test the right _cmds variable. - case $archive_cmds in - *\$LD\ *) wl= ;; - esac - if test yes = "$hardcode_into_libs"; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath=$finalize_rpath - test relink = "$opt_mode" || rpath=$compile_rpath$rpath - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath=$finalize_shlibpath - test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname=$1 - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname=$realname - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib=$output_objdir/$realname - linknames= - for link - do - func_append linknames " $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols=$output_objdir/$libname.uexp - func_append delfiles " $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - func_dll_def_p "$export_symbols" || { - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols=$export_symbols - export_symbols= - always_export_symbols=yes - } - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs=$IFS; IFS='~' - for cmd1 in $cmds; do - IFS=$save_ifs - # Take the normal branch if the nm_file_list_spec branch - # doesn't work or if tool conversion is not needed. - case $nm_file_list_spec~$to_tool_file_cmd in - *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) - try_normal_branch=yes - eval cmd=\"$cmd1\" - func_len " $cmd" - len=$func_len_result - ;; - *) - try_normal_branch=no - ;; - esac - if test yes = "$try_normal_branch" \ - && { test "$len" -lt "$max_cmd_len" \ - || test "$max_cmd_len" -le -1; } - then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - elif test -n "$nm_file_list_spec"; then - func_basename "$output" - output_la=$func_basename_result - save_libobjs=$libobjs - save_output=$output - output=$output_objdir/$output_la.nm - func_to_tool_file "$output" - libobjs=$nm_file_list_spec$func_to_tool_file_result - func_append delfiles " $output" - func_verbose "creating $NM input file list: $output" - for obj in $save_libobjs; do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > "$output" - eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' - output=$save_output - libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS=$save_ifs - if test -n "$export_symbols_regex" && test : != "$skipped_export"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test : != "$skipped_export" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - func_append tmp_deplibs " $test_deplib" - ;; - esac - done - deplibs=$tmp_deplibs - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test yes = "$compiler_needs_object" && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test : != "$skipped_export" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then - output=$output_objdir/$output_la.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output - func_append delfiles " $output" - func_to_tool_file "$output" - output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then - output=$output_objdir/$output_la.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test yes = "$compiler_needs_object"; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - func_append delfiles " $output" - func_to_tool_file "$output" - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-$k.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test -z "$objlist" || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test 1 -eq "$k"; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-$k.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-$k.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - func_append delfiles " $output" - - else - output= - fi - - ${skipped_export-false} && { - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - } - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs=$IFS; IFS='~' - for cmd in $concat_cmds; do - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - ${skipped_export-false} && { - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - } - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs=$IFS; IFS='~' - for cmd in $cmds; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test yes = "$module" || test yes = "$export_dynamic"; then - # On all known operating systems, these are identical. - dlname=$soname - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "'-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object '$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj=$output - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # if reload_cmds runs $LD directly, get rid of -Wl from - # whole_archive_flag_spec and hope we can get by with turning comma - # into space. - case $reload_cmds in - *\$LD[\ \$]*) wl= ;; - esac - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags - else - gentop=$output_objdir/${obj}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # If we're not building shared, we need to use non_pic_objs - test yes = "$build_libtool_libs" || libobjs=$non_pic_objects - - # Create the old-style object. - reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - - output=$obj - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - test yes = "$build_libtool_libs" || { - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - } - - if test -n "$pic_flag" || test default != "$pic_mode"; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output=$libobj - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "'-release' is ignored for programs" - - $preload \ - && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ - && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test CXX = "$tagname"; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - func_append compile_command " $wl-bind_at_load" - func_append finalize_command " $wl-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs=$new_libs - - - func_append compile_command " $compile_deplibs" - func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath=$rpath - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath=$rpath - - if test -n "$libobjs" && test yes = "$build_old_libs"; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" false - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=: - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=false - ;; - *cygwin* | *mingw* ) - test yes = "$build_libtool_libs" || wrappers_required=false - ;; - *) - if test no = "$need_relink" || test yes != "$build_libtool_libs"; then - wrappers_required=false - fi - ;; - esac - $wrappers_required || { - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command=$compile_command$compile_rpath - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.$objext"; then - func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' - fi - - exit $exit_status - } - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test yes = "$no_install"; then - # We don't need to create a wrapper script. - link_command=$compile_var$compile_command$compile_rpath - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - exit $EXIT_SUCCESS - fi - - case $hardcode_action,$fast_install in - relink,*) - # Fast installation is not supported - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "'$output' will be relinked during installation" - ;; - *,yes) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - ;; - *,no) - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - ;; - *,needless) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command= - ;; - esac - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output_objdir/$outputname" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource=$output_path/$objdir/lt-$output_name.c - cwrapper=$output_path/$output_name.exe - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host"; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - case $build_libtool_libs in - convenience) - oldobjs="$libobjs_save $symfileobj" - addlibs=$convenience - build_libtool_libs=no - ;; - module) - oldobjs=$libobjs_save - addlibs=$old_convenience - build_libtool_libs=no - ;; - *) - oldobjs="$old_deplibs $non_pic_objects" - $preload && test -f "$symfileobj" \ - && func_append oldobjs " $symfileobj" - addlibs=$old_convenience - ;; - esac - - if test -n "$addlibs"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $addlibs - func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase=$func_basename_result - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - func_append oldobjs " $gentop/$newobj" - ;; - *) func_append oldobjs " $obj" ;; - esac - done - fi - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - elif test -n "$archiver_list_spec"; then - func_verbose "using command file archive linking..." - for obj in $oldobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > $output_objdir/$libname.libcmd - func_to_tool_file "$output_objdir/$libname.libcmd" - oldobjs=" $archiver_list_spec$func_to_tool_file_result" - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj"; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test -z "$oldobjs"; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test yes = "$build_old_libs" && old_library=$libname.$libext - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test yes = "$hardcode_automatic"; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test yes = "$installed"; then - if test -z "$install_libdir"; then - break - fi - output=$output_objdir/${outputname}i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name=$func_basename_result - func_resolve_sysroot "$deplib" - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" - ;; - -L*) - func_stripname -L '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; - -R*) - func_stripname -R '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -R$func_replace_sysroot_result" - ;; - *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs=$newdependency_libs - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; - *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles=$newdlprefiles - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlfiles " $abs" - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlprefiles " $abs" - done - dlprefiles=$newdlprefiles - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test -n "$bindir"; then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result/$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that cannot go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test no,yes = "$installed,$need_relink"; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -if test link = "$opt_mode" || test relink = "$opt_mode"; then - func_mode_link ${1+"$@"} -fi - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $debug_cmd - - RM=$nonopt - files= - rmforce=false - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - for arg - do - case $arg in - -f) func_append RM " $arg"; rmforce=: ;; - -*) func_append RM " $arg" ;; - *) func_append files " $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir=$func_dirname_result - if test . = "$dir"; then - odir=$objdir - else - odir=$dir/$objdir - fi - func_basename "$file" - name=$func_basename_result - test uninstall = "$opt_mode" && odir=$dir - - # Remember odir for removal later, being careful to avoid duplicates - if test clean = "$opt_mode"; then - case " $rmdirs " in - *" $odir "*) ;; - *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif $rmforce; then - continue - fi - - rmfiles=$file - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - func_append rmfiles " $odir/$n" - done - test -n "$old_library" && func_append rmfiles " $odir/$old_library" - - case $opt_mode in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac - test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && test none != "$pic_object"; then - func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && test none != "$non_pic_object"; then - func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) - if test clean = "$opt_mode"; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.$objext" - if test yes = "$fast_install" && test -n "$relink_command"; then - func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name"; then - func_append rmfiles " $odir/lt-$noexename.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the $objdir's in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then - func_mode_uninstall ${1+"$@"} -fi - -test -z "$opt_mode" && { - help=$generic_help - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode '$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# where we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/thirdparty/jpeg-9e/ltmain.sh b/thirdparty/jpeg-9e/ltmain.sh deleted file mode 100644 index 0f0a2da..0000000 --- a/thirdparty/jpeg-9e/ltmain.sh +++ /dev/null @@ -1,11147 +0,0 @@ -#! /bin/sh -## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 - -# libtool (GNU libtool) 2.4.6 -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -PROGRAM=libtool -PACKAGE=libtool -VERSION=2.4.6 -package_revision=2.4.6 - - -## ------ ## -## Usage. ## -## ------ ## - -# Run './libtool --help' for help with using this script from the -# command line. - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# After configure completes, it has a better idea of some of the -# shell tools we need than the defaults used by the functions shared -# with bootstrap, so set those here where they can still be over- -# ridden by the user, but otherwise take precedence. - -: ${AUTOCONF="autoconf"} -: ${AUTOMAKE="automake"} - - -## -------------------------- ## -## Source external libraries. ## -## -------------------------- ## - -# Much of our low-level functionality needs to be sourced from external -# libraries, which are installed to $pkgauxdir. - -# Set a version string for this script. -scriptversion=2015-01-20.17; # UTC - -# General shell script boiler plate, and helper functions. -# Written by Gary V. Vaughan, 2004 - -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# Evaluate this file near the top of your script to gain access to -# the functions and variables defined here: -# -# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh -# -# If you need to override any of the default environment variable -# settings, do that before evaluating this file. - - -## -------------------- ## -## Shell normalisation. ## -## -------------------- ## - -# Some shells need a little help to be as Bourne compatible as possible. -# Before doing anything else, make sure all that help has been provided! - -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac -fi - -# NLS nuisances: We save the old values in case they are required later. -_G_user_locale= -_G_safe_locale= -for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test set = \"\${$_G_var+set}\"; then - save_$_G_var=\$$_G_var - $_G_var=C - export $_G_var - _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" - _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" - fi" -done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Make sure IFS has a sensible default -sp=' ' -nl=' -' -IFS="$sp $nl" - -# There are apparently some retarded systems that use ';' as a PATH separator! -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - - -## ------------------------- ## -## Locate command utilities. ## -## ------------------------- ## - - -# func_executable_p FILE -# ---------------------- -# Check that FILE is an executable regular file. -func_executable_p () -{ - test -f "$1" && test -x "$1" -} - - -# func_path_progs PROGS_LIST CHECK_FUNC [PATH] -# -------------------------------------------- -# Search for either a program that responds to --version with output -# containing "GNU", or else returned by CHECK_FUNC otherwise, by -# trying all the directories in PATH with each of the elements of -# PROGS_LIST. -# -# CHECK_FUNC should accept the path to a candidate program, and -# set $func_check_prog_result if it truncates its output less than -# $_G_path_prog_max characters. -func_path_progs () -{ - _G_progs_list=$1 - _G_check_func=$2 - _G_PATH=${3-"$PATH"} - - _G_path_prog_max=0 - _G_path_prog_found=false - _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} - for _G_dir in $_G_PATH; do - IFS=$_G_save_IFS - test -z "$_G_dir" && _G_dir=. - for _G_prog_name in $_G_progs_list; do - for _exeext in '' .EXE; do - _G_path_prog=$_G_dir/$_G_prog_name$_exeext - func_executable_p "$_G_path_prog" || continue - case `"$_G_path_prog" --version 2>&1` in - *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; - *) $_G_check_func $_G_path_prog - func_path_progs_result=$func_check_prog_result - ;; - esac - $_G_path_prog_found && break 3 - done - done - done - IFS=$_G_save_IFS - test -z "$func_path_progs_result" && { - echo "no acceptable sed could be found in \$PATH" >&2 - exit 1 - } -} - - -# We want to be able to use the functions in this file before configure -# has figured out where the best binaries are kept, which means we have -# to search for them ourselves - except when the results are already set -# where we skip the searches. - -# Unless the user overrides by setting SED, search the path for either GNU -# sed, or the sed that truncates its output the least. -test -z "$SED" && { - _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for _G_i in 1 2 3 4 5 6 7; do - _G_sed_script=$_G_sed_script$nl$_G_sed_script - done - echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed - _G_sed_script= - - func_check_prog_sed () - { - _G_path_prog=$1 - - _G_count=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo '' >> conftest.nl - "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin - rm -f conftest.sed - SED=$func_path_progs_result -} - - -# Unless the user overrides by setting GREP, search the path for either GNU -# grep, or the grep that truncates its output the least. -test -z "$GREP" && { - func_check_prog_grep () - { - _G_path_prog=$1 - - _G_count=0 - _G_path_prog_max=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo 'GREP' >> conftest.nl - "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin - GREP=$func_path_progs_result -} - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# All uppercase variable names are used for environment variables. These -# variables can be overridden by the user before calling a script that -# uses them if a suitable command of that name is not already available -# in the command search PATH. - -: ${CP="cp -f"} -: ${ECHO="printf %s\n"} -: ${EGREP="$GREP -E"} -: ${FGREP="$GREP -F"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} - - -## -------------------- ## -## Useful sed snippets. ## -## -------------------- ## - -sed_dirname='s|/[^/]*$||' -sed_basename='s|^.*/||' - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s|\([`"$\\]\)|\\\1|g' - -# Same as above, but do not quote variable references. -sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' - -# Sed substitution that converts a w32 file name or path -# that contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-'\' parameter expansions in output of sed_double_quote_subst that -# were '\'-ed in input to the same. If an odd number of '\' preceded a -# '$' in input to sed_double_quote_subst, that '$' was protected from -# expansion. Since each input '\' is now two '\'s, look for any number -# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. -_G_bs='\\' -_G_bs2='\\\\' -_G_bs4='\\\\\\\\' -_G_dollar='\$' -sed_double_backslash="\ - s/$_G_bs4/&\\ -/g - s/^$_G_bs2$_G_dollar/$_G_bs&/ - s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g - s/\n//g" - - -## ----------------- ## -## Global variables. ## -## ----------------- ## - -# Except for the global variables explicitly listed below, the following -# functions in the '^func_' namespace, and the '^require_' namespace -# variables initialised in the 'Resource management' section, sourcing -# this file will not pollute your global namespace with anything -# else. There's no portable way to scope variables in Bourne shell -# though, so actually running these functions will sometimes place -# results into a variable named after the function, and often use -# temporary variables in the '^_G_' namespace. If you are careful to -# avoid using those namespaces casually in your sourcing script, things -# should continue to work as you expect. And, of course, you can freely -# overwrite any of the functions or variables defined here before -# calling anything to customize them. - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -# Allow overriding, eg assuming that you follow the convention of -# putting '$debug_cmd' at the start of all your functions, you can get -# bash to show function call trace with: -# -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name -debug_cmd=${debug_cmd-":"} -exit_cmd=: - -# By convention, finish your script with: -# -# exit $exit_status -# -# so that you can set exit_status to non-zero if you want to indicate -# something went wrong during execution without actually bailing out at -# the point of failure. -exit_status=$EXIT_SUCCESS - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath=$0 - -# The name of this program. -progname=`$ECHO "$progpath" |$SED "$sed_basename"` - -# Make sure we have an absolute progpath for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` - progdir=`cd "$progdir" && pwd` - progpath=$progdir/$progname - ;; - *) - _G_IFS=$IFS - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS=$_G_IFS - test -x "$progdir/$progname" && break - done - IFS=$_G_IFS - test -n "$progdir" || progdir=`pwd` - progpath=$progdir/$progname - ;; -esac - - -## ----------------- ## -## Standard options. ## -## ----------------- ## - -# The following options affect the operation of the functions defined -# below, and should be set appropriately depending on run-time para- -# meters passed on the command line. - -opt_dry_run=false -opt_quiet=false -opt_verbose=false - -# Categories 'all' and 'none' are always available. Append any others -# you will pass as the first argument to func_warning from your own -# code. -warning_categories= - -# By default, display warnings according to 'opt_warning_types'. Set -# 'warning_func' to ':' to elide all warnings, or func_fatal_error to -# treat the next displayed warning as a fatal error. -warning_func=func_warn_and_continue - -# Set to 'all' to display all warnings, 'none' to suppress all -# warnings, or a space delimited list of some subset of -# 'warning_categories' to display only the listed warnings. -opt_warning_types=all - - -## -------------------- ## -## Resource management. ## -## -------------------- ## - -# This section contains definitions for functions that each ensure a -# particular resource (a file, or a non-empty configuration variable for -# example) is available, and if appropriate to extract default values -# from pertinent package files. Call them using their associated -# 'require_*' variable to ensure that they are executed, at most, once. -# -# It's entirely deliberate that calling these functions can set -# variables that don't obey the namespace limitations obeyed by the rest -# of this file, in order that that they be as useful as possible to -# callers. - - -# require_term_colors -# ------------------- -# Allow display of bold text on terminals that support it. -require_term_colors=func_require_term_colors -func_require_term_colors () -{ - $debug_cmd - - test -t 1 && { - # COLORTERM and USE_ANSI_COLORS environment variables take - # precedence, because most terminfo databases neglect to describe - # whether color sequences are supported. - test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} - - if test 1 = "$USE_ANSI_COLORS"; then - # Standard ANSI escape sequences - tc_reset='' - tc_bold=''; tc_standout='' - tc_red=''; tc_green='' - tc_blue=''; tc_cyan='' - else - # Otherwise trust the terminfo database after all. - test -n "`tput sgr0 2>/dev/null`" && { - tc_reset=`tput sgr0` - test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` - tc_standout=$tc_bold - test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` - test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` - test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` - test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` - test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` - } - fi - } - - require_term_colors=: -} - - -## ----------------- ## -## Function library. ## -## ----------------- ## - -# This section contains a variety of useful functions to call in your -# scripts. Take note of the portable wrappers for features provided by -# some modern shells, which will fall back to slower equivalents on -# less featureful shells. - - -# func_append VAR VALUE -# --------------------- -# Append VALUE onto the existing contents of VAR. - - # We should try to minimise forks, especially on Windows where they are - # unreasonably slow, so skip the feature probes when bash or zsh are - # being used: - if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then - : ${_G_HAVE_ARITH_OP="yes"} - : ${_G_HAVE_XSI_OPS="yes"} - # The += operator was introduced in bash 3.1 - case $BASH_VERSION in - [12].* | 3.0 | 3.0*) ;; - *) - : ${_G_HAVE_PLUSEQ_OP="yes"} - ;; - esac - fi - - # _G_HAVE_PLUSEQ_OP - # Can be empty, in which case the shell is probed, "yes" if += is - # useable or anything else if it does not work. - test -z "$_G_HAVE_PLUSEQ_OP" \ - && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ - && _G_HAVE_PLUSEQ_OP=yes - -if test yes = "$_G_HAVE_PLUSEQ_OP" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_append () - { - $debug_cmd - - eval "$1+=\$2" - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_append () - { - $debug_cmd - - eval "$1=\$$1\$2" - } -fi - - -# func_append_quoted VAR VALUE -# ---------------------------- -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -if test yes = "$_G_HAVE_PLUSEQ_OP"; then - eval 'func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" - }' -else - func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" - } -fi - - -# func_append_uniq VAR VALUE -# -------------------------- -# Append unique VALUE onto the existing contents of VAR, assuming -# entries are delimited by the first character of VALUE. For example: -# -# func_append_uniq options " --another-option option-argument" -# -# will only append to $options if " --another-option option-argument " -# is not already present somewhere in $options already (note spaces at -# each end implied by leading space in second argument). -func_append_uniq () -{ - $debug_cmd - - eval _G_current_value='`$ECHO $'$1'`' - _G_delim=`expr "$2" : '\(.\)'` - - case $_G_delim$_G_current_value$_G_delim in - *"$2$_G_delim"*) ;; - *) func_append "$@" ;; - esac -} - - -# func_arith TERM... -# ------------------ -# Set func_arith_result to the result of evaluating TERMs. - test -z "$_G_HAVE_ARITH_OP" \ - && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ - && _G_HAVE_ARITH_OP=yes - -if test yes = "$_G_HAVE_ARITH_OP"; then - eval 'func_arith () - { - $debug_cmd - - func_arith_result=$(( $* )) - }' -else - func_arith () - { - $debug_cmd - - func_arith_result=`expr "$@"` - } -fi - - -# func_basename FILE -# ------------------ -# Set func_basename_result to FILE with everything up to and including -# the last / stripped. -if test yes = "$_G_HAVE_XSI_OPS"; then - # If this shell supports suffix pattern removal, then use it to avoid - # forking. Hide the definitions single quotes in case the shell chokes - # on unsupported syntax... - _b='func_basename_result=${1##*/}' - _d='case $1 in - */*) func_dirname_result=${1%/*}$2 ;; - * ) func_dirname_result=$3 ;; - esac' - -else - # ...otherwise fall back to using sed. - _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' - _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` - if test "X$func_dirname_result" = "X$1"; then - func_dirname_result=$3 - else - func_append func_dirname_result "$2" - fi' -fi - -eval 'func_basename () -{ - $debug_cmd - - '"$_b"' -}' - - -# func_dirname FILE APPEND NONDIR_REPLACEMENT -# ------------------------------------------- -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -eval 'func_dirname () -{ - $debug_cmd - - '"$_d"' -}' - - -# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT -# -------------------------------------------------------- -# Perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# For efficiency, we do not delegate to the functions above but instead -# duplicate the functionality here. -eval 'func_dirname_and_basename () -{ - $debug_cmd - - '"$_b"' - '"$_d"' -}' - - -# func_echo ARG... -# ---------------- -# Echo program name prefixed message. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_echo_all ARG... -# -------------------- -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - - -# func_echo_infix_1 INFIX ARG... -# ------------------------------ -# Echo program name, followed by INFIX on the first line, with any -# additional lines not showing INFIX. -func_echo_infix_1 () -{ - $debug_cmd - - $require_term_colors - - _G_infix=$1; shift - _G_indent=$_G_infix - _G_prefix="$progname: $_G_infix: " - _G_message=$* - - # Strip color escape sequences before counting printable length - for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" - do - test -n "$_G_tc" && { - _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` - _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` - } - done - _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes - - func_echo_infix_1_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_infix_1_IFS - $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 - _G_prefix=$_G_indent - done - IFS=$func_echo_infix_1_IFS -} - - -# func_error ARG... -# ----------------- -# Echo program name prefixed message to standard error. -func_error () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 -} - - -# func_fatal_error ARG... -# ----------------------- -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - $debug_cmd - - func_error "$*" - exit $EXIT_FAILURE -} - - -# func_grep EXPRESSION FILENAME -# ----------------------------- -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $debug_cmd - - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_len STRING -# --------------- -# Set func_len_result to the length of STRING. STRING may not -# start with a hyphen. - test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_len () - { - $debug_cmd - - func_len_result=${#1} - }' -else - func_len () - { - $debug_cmd - - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` - } -fi - - -# func_mkdir_p DIRECTORY-PATH -# --------------------------- -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - $debug_cmd - - _G_directory_path=$1 - _G_dir_list= - - if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - - # Protect directory names starting with '-' - case $_G_directory_path in - -*) _G_directory_path=./$_G_directory_path ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$_G_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - _G_dir_list=$_G_directory_path:$_G_dir_list - - # If the last portion added has no slash in it, the list is done - case $_G_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` - done - _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - - func_mkdir_p_IFS=$IFS; IFS=: - for _G_dir in $_G_dir_list; do - IFS=$func_mkdir_p_IFS - # mkdir can fail with a 'File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$_G_dir" 2>/dev/null || : - done - IFS=$func_mkdir_p_IFS - - # Bail out if we (or some other process) failed to create a directory. - test -d "$_G_directory_path" || \ - func_fatal_error "Failed to create '$1'" - fi -} - - -# func_mktempdir [BASENAME] -# ------------------------- -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, BASENAME is the basename for that directory. -func_mktempdir () -{ - $debug_cmd - - _G_template=${TMPDIR-/tmp}/${1-$progname} - - if test : = "$opt_dry_run"; then - # Return a directory name, but don't create it in dry-run mode - _G_tmpdir=$_G_template-$$ - else - - # If mktemp works, use that first and foremost - _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - - if test ! -d "$_G_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - _G_tmpdir=$_G_template-${RANDOM-0}$$ - - func_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$_G_tmpdir" - umask $func_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$_G_tmpdir" || \ - func_fatal_error "cannot create temporary directory '$_G_tmpdir'" - fi - - $ECHO "$_G_tmpdir" -} - - -# func_normal_abspath PATH -# ------------------------ -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -func_normal_abspath () -{ - $debug_cmd - - # These SED scripts presuppose an absolute path with a trailing slash. - _G_pathcar='s|^/\([^/]*\).*$|\1|' - _G_pathcdr='s|^/[^/]*||' - _G_removedotparts=':dotsl - s|/\./|/|g - t dotsl - s|/\.$|/|' - _G_collapseslashes='s|/\{1,\}|/|g' - _G_finalslash='s|/*$|/|' - - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` - while :; do - # Processed it all yet? - if test / = "$func_normal_abspath_tpath"; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result"; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - - -# func_notquiet ARG... -# -------------------- -# Echo program name prefixed message only when not in quiet mode. -func_notquiet () -{ - $debug_cmd - - $opt_quiet || func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - - -# func_relative_path SRCDIR DSTDIR -# -------------------------------- -# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. -func_relative_path () -{ - $debug_cmd - - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=$func_dirname_result - if test -z "$func_relative_path_tlibdir"; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test -n "$func_stripname_result"; then - func_append func_relative_path_result "/$func_stripname_result" - fi - - # Normalisation. If bindir is libdir, return '.' else relative path. - if test -n "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - fi - - test -n "$func_relative_path_result" || func_relative_path_result=. - - : -} - - -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () -{ - $debug_cmd - - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" - fi - - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" - ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; - esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift - done -} - - -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd - - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; - esac - - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" - ;; - esac - - func_quote_for_expand_result=$_G_arg -} - - -# func_stripname PREFIX SUFFIX NAME -# --------------------------------- -# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_stripname () - { - $debug_cmd - - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary variable first. - func_stripname_result=$3 - func_stripname_result=${func_stripname_result#"$1"} - func_stripname_result=${func_stripname_result%"$2"} - }' -else - func_stripname () - { - $debug_cmd - - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; - esac - } -fi - - -# func_show_eval CMD [FAIL_EXP] -# ----------------------------- -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" - - $opt_dry_run || { - eval "$_G_cmd" - _G_status=$? - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_show_eval_locale CMD [FAIL_EXP] -# ------------------------------------ -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - $opt_dry_run || { - eval "$_G_user_locale - $_G_cmd" - _G_status=$? - eval "$_G_safe_locale" - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_tr_sh -# ---------- -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - $debug_cmd - - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_verbose ARG... -# ------------------- -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $debug_cmd - - $opt_verbose && func_echo "$*" - - : -} - - -# func_warn_and_continue ARG... -# ----------------------------- -# Echo program name prefixed warning message to standard error. -func_warn_and_continue () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 -} - - -# func_warning CATEGORY ARG... -# ---------------------------- -# Echo program name prefixed warning message to standard error. Warning -# messages can be filtered according to CATEGORY, where this function -# elides messages where CATEGORY is not listed in the global variable -# 'opt_warning_types'. -func_warning () -{ - $debug_cmd - - # CATEGORY must be in the warning_categories list! - case " $warning_categories " in - *" $1 "*) ;; - *) func_internal_error "invalid warning category '$1'" ;; - esac - - _G_category=$1 - shift - - case " $opt_warning_types " in - *" $_G_category "*) $warning_func ${1+"$@"} ;; - esac -} - - -# func_sort_ver VER1 VER2 -# ----------------------- -# 'sort -V' is not generally available. -# Note this deviates from the version comparison in automake -# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a -# but this should suffice as we won't be specifying old -# version formats or redundant trailing .0 in bootstrap.conf. -# If we did want full compatibility then we should probably -# use m4_version_compare from autoconf. -func_sort_ver () -{ - $debug_cmd - - printf '%s\n%s\n' "$1" "$2" \ - | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n -} - -# func_lt_ver PREV CURR -# --------------------- -# Return true if PREV and CURR are in the correct order according to -# func_sort_ver, otherwise false. Use it like this: -# -# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." -func_lt_ver () -{ - $debug_cmd - - test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: -#! /bin/sh - -# Set a version string for this script. -scriptversion=2014-01-07.03; # UTC - -# A portable, pluggable option parser for Bourne shell. -# Written by Gary V. Vaughan, 2010 - -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# This file is a library for parsing options in your shell scripts along -# with assorted other useful supporting features that you can make use -# of too. -# -# For the simplest scripts you might need only: -# -# #!/bin/sh -# . relative/path/to/funclib.sh -# . relative/path/to/options-parser -# scriptversion=1.0 -# func_options ${1+"$@"} -# eval set dummy "$func_options_result"; shift -# ...rest of your script... -# -# In order for the '--version' option to work, you will need to have a -# suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. -# -# For '-h' and '--help' to work, you will also need a one line -# description of your script's purpose in a comment directly above the -# '# Written by ' line, like the one at the top of this file. -# -# The default options also support '--debug', which will turn on shell -# execution tracing (see the comment above debug_cmd below for another -# use), and '--verbose' and the func_verbose function to allow your script -# to display verbose messages only when your user has specified -# '--verbose'. -# -# After sourcing this file, you can plug processing for additional -# options by amending the variables from the 'Configuration' section -# below, and following the instructions in the 'Option parsing' -# section further down. - -## -------------- ## -## Configuration. ## -## -------------- ## - -# You should override these variables in your script after sourcing this -# file so that they reflect the customisations you have added to the -# option parser. - -# The usage line for option parsing errors and the start of '-h' and -# '--help' output messages. You can embed shell variables for delayed -# expansion at the time the message is displayed, but you will need to -# quote other shell meta-characters carefully to prevent them being -# expanded when the contents are evaled. -usage='$progpath [OPTION]...' - -# Short help message in response to '-h' and '--help'. Add to this or -# override it after sourcing this library to reflect the full set of -# options your script accepts. -usage_message="\ - --debug enable verbose shell tracing - -W, --warnings=CATEGORY - report the warnings falling in CATEGORY [all] - -v, --verbose verbosely report processing - --version print version information and exit - -h, --help print short or long help message and exit -" - -# Additional text appended to 'usage_message' in response to '--help'. -long_help_message=" -Warning categories include: - 'all' show all warnings - 'none' turn off all the warnings - 'error' warnings are treated as fatal errors" - -# Help message printed before fatal option parsing errors. -fatal_help="Try '\$progname --help' for more information." - - - -## ------------------------- ## -## Hook function management. ## -## ------------------------- ## - -# This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. - -# func_hookable FUNC_NAME -# ----------------------- -# Declare that FUNC_NAME will run hooks added with -# 'func_add_hook FUNC_NAME ...'. -func_hookable () -{ - $debug_cmd - - func_append hookable_fns " $1" -} - - -# func_add_hook FUNC_NAME HOOK_FUNC -# --------------------------------- -# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must -# first have been declared "hookable" by a call to 'func_hookable'. -func_add_hook () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not accept hook functions." ;; - esac - - eval func_append ${1}_hooks '" $2"' -} - - -# func_remove_hook FUNC_NAME HOOK_FUNC -# ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. -func_remove_hook () -{ - $debug_cmd - - eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' -} - - -# func_run_hooks FUNC_NAME [ARG]... -# --------------------------------- -# Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more -# than a whitespace-delimited list of legal shell function names, and -# no effort is wasted trying to catch shell meta-characters or preserve -# whitespace. -func_run_hooks () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; - esac - - eval _G_hook_fns=\$$1_hooks; shift - - for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - done - - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result -} - - - -## --------------- ## -## Option parsing. ## -## --------------- ## - -# In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. Like this: -# -# my_options_prep () -# { -# $debug_cmd -# -# # Extend the existing usage message. -# usage_message=$usage_message' -# -s, --silent don'\''t print informational messages -# ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result -# } -# func_add_hook func_options_prep my_options_prep -# -# -# my_silent_option () -# { -# $debug_cmd -# -# # Note that for efficiency, we parse as many options as we can -# # recognise in a loop before passing the remainder back to the -# # caller on the first unrecognised argument we encounter. -# while test $# -gt 0; do -# opt=$1; shift -# case $opt in -# --silent|-s) opt_silent=: ;; -# # Separate non-argument short options: -# -s*) func_split_short_opt "$_G_opt" -# set dummy "$func_split_short_opt_name" \ -# "-$func_split_short_opt_arg" ${1+"$@"} -# shift -# ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; -# esac -# done -# -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result -# } -# func_add_hook func_parse_options my_silent_option -# -# -# my_option_validation () -# { -# $debug_cmd -# -# $opt_silent && $opt_verbose && func_fatal_help "\ -# '--silent' and '--verbose' options are mutually exclusive." -# -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result -# } -# func_add_hook func_validate_options my_option_validation -# -# You'll alse need to manually amend $usage_message to reflect the extra -# options you parse. It's preferable to append if you can, so that -# multiple option parsing hooks can be added safely. - - -# func_options [ARG]... -# --------------------- -# All the functions called inside func_options are hookable. See the -# individual implementations for details. -func_hookable func_options -func_options () -{ - $debug_cmd - - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} - - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} - - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result -} - - -# func_options_prep [ARG]... -# -------------------------- -# All initialisations required before starting the option parse loop. -# Note that when calling hook functions, we pass through the list of -# positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning. -func_hookable func_options_prep -func_options_prep () -{ - $debug_cmd - - # Option defaults: - opt_verbose=false - opt_warning_types= - - func_run_hooks func_options_prep ${1+"$@"} - - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result -} - - -# func_parse_options [ARG]... -# --------------------------- -# The main option parsing loop. -func_hookable func_parse_options -func_parse_options () -{ - $debug_cmd - - func_parse_options_result= - - # this just eases exit handling - while test $# -gt 0; do - # Defer to hook functions for initial option parsing, so they - # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift - - # Break out of the loop if we already parsed every option. - test $# -gt 0 || break - - _G_opt=$1 - shift - case $_G_opt in - --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" - $debug_cmd - ;; - - --no-warnings|--no-warning|--no-warn) - set dummy --warnings none ${1+"$@"} - shift - ;; - - --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break - case " $warning_categories $1" in - *" $1 "*) - # trailing space prevents matching last $1 above - func_append_uniq opt_warning_types " $1" - ;; - *all) - opt_warning_types=$warning_categories - ;; - *none) - opt_warning_types=none - warning_func=: - ;; - *error) - opt_warning_types=$warning_categories - warning_func=func_fatal_error - ;; - *) - func_fatal_error \ - "unsupported warning category: '$1'" - ;; - esac - shift - ;; - - --verbose|-v) opt_verbose=: ;; - --version) func_version ;; - -\?|-h) func_usage ;; - --help) func_help ;; - - # Separate optargs to long options (plugins may need this): - --*=*) func_split_equals "$_G_opt" - set dummy "$func_split_equals_lhs" \ - "$func_split_equals_rhs" ${1+"$@"} - shift - ;; - - # Separate optargs to short options: - -W*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-v*|-x*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result -} - - -# func_validate_options [ARG]... -# ------------------------------ -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -func_hookable func_validate_options -func_validate_options () -{ - $debug_cmd - - # Display all warnings if -W was not given. - test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - - func_run_hooks func_validate_options ${1+"$@"} - - # Bail if the options were screwed! - $exit_cmd $EXIT_FAILURE - - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result -} - - - -## ----------------- ## -## Helper functions. ## -## ----------------- ## - -# This section contains the helper functions used by the rest of the -# hookable option parser framework in ascii-betical order. - - -# func_fatal_help ARG... -# ---------------------- -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - eval \$ECHO \""$fatal_help"\" - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - - -# func_help -# --------- -# Echo long help message to standard output and exit. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message" - exit 0 -} - - -# func_missing_arg ARGNAME -# ------------------------ -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $debug_cmd - - func_error "Missing argument for '$1'." - exit_cmd=exit -} - - -# func_split_equals STRING -# ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. -test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=${1%%=*} - func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` - func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ - || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` - } -fi #func_split_equals - - -# func_split_short_opt SHORTOPT -# ----------------------------- -# Set func_split_short_opt_name and func_split_short_opt_arg shell -# variables after splitting SHORTOPT after the 2nd character. -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"} - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` - func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` - } -fi #func_split_short_opt - - -# func_usage -# ---------- -# Echo short help message to standard output and exit. -func_usage () -{ - $debug_cmd - - func_usage_message - $ECHO "Run '$progname --help |${PAGER-more}' for full usage" - exit 0 -} - - -# func_usage_message -# ------------------ -# Echo short help message to standard output. -func_usage_message () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - echo - $SED -n 's|^# || - /^Written by/{ - x;p;x - } - h - /^Written by/q' < "$progpath" - echo - eval \$ECHO \""$usage_message"\" -} - - -# func_version -# ------------ -# Echo version message to standard output and exit. -func_version () -{ - $debug_cmd - - printf '%s\n' "$progname $scriptversion" - $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p - } - /^# Written by / { - s|^# || - p - } - /^warranty; /q' < "$progpath" - - exit $? -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: - -# Set a version string. -scriptversion='(GNU libtool) 2.4.6' - - -# func_echo ARG... -# ---------------- -# Libtool also displays the current mode in messages, so override -# funclib.sh func_echo with this custom definition. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_warning ARG... -# ------------------- -# Libtool warnings are not categorized, so override funclib.sh -# func_warning with this simpler definition. -func_warning () -{ - $debug_cmd - - $warning_func ${1+"$@"} -} - - -## ---------------- ## -## Options parsing. ## -## ---------------- ## - -# Hook in the functions to make sure our own options are parsed during -# the option parsing loop. - -usage='$progpath [OPTION]... [MODE-ARG]...' - -# Short help message in response to '-h'. -usage_message="Options: - --config show all configuration variables - --debug enable verbose shell tracing - -n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --mode=MODE use operation mode MODE - --no-warnings equivalent to '-Wnone' - --preserve-dup-deps don't remove duplicate dependency libraries - --quiet, --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - -v, --verbose print more informational messages than default - --version print version information - -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] - -h, --help, --help-all print short, long, or detailed help message -" - -# Additional text appended to 'usage_message' in response to '--help'. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. When passed as first option, -'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. -Try '$progname --help --mode=MODE' for a more detailed description of MODE. - -When reporting a bug, please describe a test case to reproduce it and -include the following information: - - host-triplet: $host - shell: $SHELL - compiler: $LTCC - compiler flags: $LTCFLAGS - linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.6 - automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` - autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` - -Report bugs to . -GNU libtool home page: . -General help using GNU software: ." - exit 0 -} - - -# func_lo2o OBJECT-NAME -# --------------------- -# Transform OBJECT-NAME from a '.lo' suffix to the platform specific -# object suffix. - -lo2o=s/\\.lo\$/.$objext/ -o2lo=s/\\.$objext\$/.lo/ - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_lo2o () - { - case $1 in - *.lo) func_lo2o_result=${1%.lo}.$objext ;; - * ) func_lo2o_result=$1 ;; - esac - }' - - # func_xform LIBOBJ-OR-SOURCE - # --------------------------- - # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) - # suffix to a '.lo' libtool-object suffix. - eval 'func_xform () - { - func_xform_result=${1%.*}.lo - }' -else - # ...otherwise fall back to using sed. - func_lo2o () - { - func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` - } - - func_xform () - { - func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` - } -fi - - -# func_fatal_configuration ARG... -# ------------------------------- -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func__fatal_error ${1+"$@"} \ - "See the $PACKAGE documentation for more information." \ - "Fatal configuration error." -} - - -# func_config -# ----------- -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - - -# func_features -# ------------- -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test yes = "$build_libtool_libs"; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test yes = "$build_old_libs"; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - - -# func_enable_tag TAGNAME -# ----------------------- -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname=$1 - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf=/$re_begincf/,/$re_endcf/p - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - - -# func_check_version_match -# ------------------------ -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -# libtool_options_prep [ARG]... -# ----------------------------- -# Preparation for options parsed by libtool. -libtool_options_prep () -{ - $debug_mode - - # Option defaults: - opt_config=false - opt_dlopen= - opt_dry_run=false - opt_help=false - opt_mode= - opt_preserve_dup_deps=false - opt_quiet=false - - nonopt= - preserve_args= - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result -} -func_add_hook func_options_prep libtool_options_prep - - -# libtool_parse_options [ARG]... -# --------------------------------- -# Provide handling for libtool specific options. -libtool_parse_options () -{ - $debug_cmd - - # Perform our own loop to consume as many options as possible in - # each iteration. - while test $# -gt 0; do - _G_opt=$1 - shift - case $_G_opt in - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - - --config) func_config ;; - - --dlopen|-dlopen) - opt_dlopen="${opt_dlopen+$opt_dlopen -}$1" - shift - ;; - - --preserve-dup-deps) - opt_preserve_dup_deps=: ;; - - --features) func_features ;; - - --finish) set dummy --mode finish ${1+"$@"}; shift ;; - - --help) opt_help=: ;; - - --help-all) opt_help=': help-all' ;; - - --mode) test $# = 0 && func_missing_arg $_G_opt && break - opt_mode=$1 - case $1 in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $_G_opt" - exit_cmd=exit - break - ;; - esac - shift - ;; - - --no-silent|--no-quiet) - opt_quiet=false - func_append preserve_args " $_G_opt" - ;; - - --no-warnings|--no-warning|--no-warn) - opt_warning=false - func_append preserve_args " $_G_opt" - ;; - - --no-verbose) - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --silent|--quiet) - opt_quiet=: - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --tag) test $# = 0 && func_missing_arg $_G_opt && break - opt_tag=$1 - func_append preserve_args " $_G_opt $1" - func_enable_tag "$1" - shift - ;; - - --verbose|-v) opt_quiet=false - opt_verbose=: - func_append preserve_args " $_G_opt" - ;; - - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result -} -func_add_hook func_parse_options libtool_parse_options - - - -# libtool_validate_options [ARG]... -# --------------------------------- -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -libtool_validate_options () -{ - # save first non-option argument - if test 0 -lt $#; then - nonopt=$1 - shift - fi - - # preserve --debug - test : = "$debug_cmd" || func_append preserve_args " --debug" - - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - test yes != "$build_libtool_libs" \ - && test yes != "$build_old_libs" \ - && func_fatal_configuration "not configured to build any kind of library" - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test execute != "$opt_mode"; then - func_error "unrecognized option '-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help=$help - help="Try '$progname --help --mode=$opt_mode' for more information." - } - - # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result -} -func_add_hook func_validate_options libtool_validate_options - - -# Process options as early as possible so that --help and --version -# can return quickly. -func_options ${1+"$@"} -eval set dummy "$func_options_result"; shift - - - -## ----------- ## -## Main. ## -## ----------- ## - -magic='%%%MAGIC variable%%%' -magic_exe='%%%MAGIC EXE variable%%%' - -# Global variables. -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# func_generated_by_libtool -# True iff stdin has been generated by Libtool. This function is only -# a basic sanity check; it will hardly flush out determined imposters. -func_generated_by_libtool_p () -{ - $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if 'file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case $lalib_p_line in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test yes = "$lalib_p" -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - test -f "$1" && - $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $debug_cmd - - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# 'FILE.' does not work on cygwin managed mounts. -func_source () -{ - $debug_cmd - - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_resolve_sysroot PATH -# Replace a leading = in PATH with a sysroot. Store the result into -# func_resolve_sysroot_result -func_resolve_sysroot () -{ - func_resolve_sysroot_result=$1 - case $func_resolve_sysroot_result in - =*) - func_stripname '=' '' "$func_resolve_sysroot_result" - func_resolve_sysroot_result=$lt_sysroot$func_stripname_result - ;; - esac -} - -# func_replace_sysroot PATH -# If PATH begins with the sysroot, replace it with = and -# store the result into func_replace_sysroot_result. -func_replace_sysroot () -{ - case $lt_sysroot:$1 in - ?*:"$lt_sysroot"*) - func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result='='$func_stripname_result - ;; - *) - # Including no sysroot. - func_replace_sysroot_result=$1 - ;; - esac -} - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $debug_cmd - - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with '--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=$1 - if test yes = "$build_libtool_libs"; then - write_lobj=\'$2\' - else - write_lobj=none - fi - - if test yes = "$build_old_libs"; then - write_oldobj=\'$3\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then - func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$sed_naive_backslashify"` - else - func_convert_core_file_wine_to_w32_result= - fi - fi -} -# end: func_convert_core_file_wine_to_w32 - - -# func_convert_core_path_wine_to_w32 ARG -# Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. -# -# ARG is path to be converted from $build format to win32. -# Result is available in $func_convert_core_path_wine_to_w32_result. -# Unconvertible file (directory) names in ARG are skipped; if no directory names -# are convertible, then the result may be empty. -func_convert_core_path_wine_to_w32 () -{ - $debug_cmd - - # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result= - if test -n "$1"; then - oldIFS=$IFS - IFS=: - for func_convert_core_path_wine_to_w32_f in $1; do - IFS=$oldIFS - func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result"; then - if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result - else - func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" - fi - fi - done - IFS=$oldIFS - fi -} -# end: func_convert_core_path_wine_to_w32 - - -# func_cygpath ARGS... -# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -# (2), returns the Cygwin file name or path in func_cygpath_result (input -# file name or path is assumed to be in w32 format, as previously converted -# from $build's *nix or MSYS format). In case (3), returns the w32 file name -# or path in func_cygpath_result (input file name or path is assumed to be in -# Cygwin format). Returns an empty string on error. -# -# ARGS are passed to cygpath, with the last one being the file name or path to -# be converted. -# -# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -# environment variable; do not put it in $PATH. -func_cygpath () -{ - $debug_cmd - - if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then - func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_cygpath_result= - fi - else - func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" - fi -} -#end: func_cygpath - - -# func_convert_core_msys_to_w32 ARG -# Convert file name or path ARG from MSYS format to w32 format. Return -# result in func_convert_core_msys_to_w32_result. -func_convert_core_msys_to_w32 () -{ - $debug_cmd - - # awkward: cmd appends spaces to result - func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` -} -#end: func_convert_core_msys_to_w32 - - -# func_convert_file_check ARG1 ARG2 -# Verify that ARG1 (a file name in $build format) was converted to $host -# format in ARG2. Otherwise, emit an error message, but continue (resetting -# func_to_host_file_result to ARG1). -func_convert_file_check () -{ - $debug_cmd - - if test -z "$2" && test -n "$1"; then - func_error "Could not determine host file name corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_file_result=$1 - fi -} -# end func_convert_file_check - - -# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -# Verify that FROM_PATH (a path in $build format) was converted to $host -# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -# func_to_host_file_result to a simplistic fallback value (see below). -func_convert_path_check () -{ - $debug_cmd - - if test -z "$4" && test -n "$3"; then - func_error "Could not determine the host path corresponding to" - func_error " '$3'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This is a deliberately simplistic "conversion" and - # should not be "improved". See libtool.info. - if test "x$1" != "x$2"; then - lt_replace_pathsep_chars="s|$1|$2|g" - func_to_host_path_result=`echo "$3" | - $SED -e "$lt_replace_pathsep_chars"` - else - func_to_host_path_result=$3 - fi - fi -} -# end func_convert_path_check - - -# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -# and appending REPL if ORIG matches BACKPAT. -func_convert_path_front_back_pathsep () -{ - $debug_cmd - - case $4 in - $1 ) func_to_host_path_result=$3$func_to_host_path_result - ;; - esac - case $4 in - $2 ) func_append func_to_host_path_result "$3" - ;; - esac -} -# end func_convert_path_front_back_pathsep - - -################################################## -# $build to $host FILE NAME CONVERSION FUNCTIONS # -################################################## -# invoked via '$to_host_file_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# Result will be available in $func_to_host_file_result. - - -# func_to_host_file ARG -# Converts the file name ARG from $build format to $host format. Return result -# in func_to_host_file_result. -func_to_host_file () -{ - $debug_cmd - - $to_host_file_cmd "$1" -} -# end func_to_host_file - - -# func_to_tool_file ARG LAZY -# converts the file name ARG from $build format to toolchain format. Return -# result in func_to_tool_file_result. If the conversion in use is listed -# in (the comma separated) LAZY, no conversion takes place. -func_to_tool_file () -{ - $debug_cmd - - case ,$2, in - *,"$to_tool_file_cmd",*) - func_to_tool_file_result=$1 - ;; - *) - $to_tool_file_cmd "$1" - func_to_tool_file_result=$func_to_host_file_result - ;; - esac -} -# end func_to_tool_file - - -# func_convert_file_noop ARG -# Copy ARG to func_to_host_file_result. -func_convert_file_noop () -{ - func_to_host_file_result=$1 -} -# end func_convert_file_noop - - -# func_convert_file_msys_to_w32 ARG -# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_file_result. -func_convert_file_msys_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result=$func_convert_core_msys_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_w32 - - -# func_convert_file_cygwin_to_w32 ARG -# Convert file name ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_file_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # because $build is cygwin, we call "the" cygpath in $PATH; no need to use - # LT_CYGPATH in this case. - func_to_host_file_result=`cygpath -m "$1"` - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_cygwin_to_w32 - - -# func_convert_file_nix_to_w32 ARG -# Convert file name ARG from *nix to w32 format. Requires a wine environment -# and a working winepath. Returns result in func_to_host_file_result. -func_convert_file_nix_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result=$func_convert_core_file_wine_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_w32 - - -# func_convert_file_msys_to_cygwin ARG -# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_file_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_cygwin - - -# func_convert_file_nix_to_cygwin ARG -# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -# in func_to_host_file_result. -func_convert_file_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. - func_convert_core_file_wine_to_w32 "$1" - func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_cygwin - - -############################################# -# $build to $host PATH CONVERSION FUNCTIONS # -############################################# -# invoked via '$to_host_path_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# The result will be available in $func_to_host_path_result. -# -# Path separators are also converted from $build format to $host format. If -# ARG begins or ends with a path separator character, it is preserved (but -# converted to $host format) on output. -# -# All path conversion functions are named using the following convention: -# file name conversion function : func_convert_file_X_to_Y () -# path conversion function : func_convert_path_X_to_Y () -# where, for any given $build/$host combination the 'X_to_Y' value is the -# same. If conversion functions are added for new $build/$host combinations, -# the two new functions must follow this pattern, or func_init_to_host_path_cmd -# will break. - - -# func_init_to_host_path_cmd -# Ensures that function "pointer" variable $to_host_path_cmd is set to the -# appropriate value, based on the value of $to_host_file_cmd. -to_host_path_cmd= -func_init_to_host_path_cmd () -{ - $debug_cmd - - if test -z "$to_host_path_cmd"; then - func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd=func_convert_path_$func_stripname_result - fi -} - - -# func_to_host_path ARG -# Converts the path ARG from $build format to $host format. Return result -# in func_to_host_path_result. -func_to_host_path () -{ - $debug_cmd - - func_init_to_host_path_cmd - $to_host_path_cmd "$1" -} -# end func_to_host_path - - -# func_convert_path_noop ARG -# Copy ARG to func_to_host_path_result. -func_convert_path_noop () -{ - func_to_host_path_result=$1 -} -# end func_convert_path_noop - - -# func_convert_path_msys_to_w32 ARG -# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_path_result. -func_convert_path_msys_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from ARG. MSYS - # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; - # and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_msys_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_msys_to_w32 - - -# func_convert_path_cygwin_to_w32 ARG -# Convert path ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_path_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_cygwin_to_w32 - - -# func_convert_path_nix_to_w32 ARG -# Convert path ARG from *nix to w32 format. Requires a wine environment and -# a working winepath. Returns result in func_to_host_file_result. -func_convert_path_nix_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_path_wine_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_nix_to_w32 - - -# func_convert_path_msys_to_cygwin ARG -# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_path_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_msys_to_cygwin - - -# func_convert_path_nix_to_cygwin ARG -# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -# func_to_host_file_result. -func_convert_path_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_nix_to_cygwin - - -# func_dll_def_p FILE -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with _LT_DLL_DEF_P in libtool.m4 -func_dll_def_p () -{ - $debug_cmd - - func_dll_def_p_tmp=`$SED -n \ - -e 's/^[ ]*//' \ - -e '/^\(;.*\)*$/d' \ - -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ - -e q \ - "$1"` - test DEF = "$func_dll_def_p_tmp" -} - - -# func_mode_compile arg... -func_mode_compile () -{ - $debug_cmd - - # Get the compilation command and the source file. - base_compile= - srcfile=$nonopt # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg=$arg - arg_mode=normal - ;; - - target ) - libobj=$arg - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify '-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - func_append later " $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs=$IFS; IFS=, - for arg in $args; do - IFS=$save_ifs - func_append_quoted lastarg "$arg" - done - IFS=$save_ifs - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - func_append base_compile " $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg=$srcfile - srcfile=$arg - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with '-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj=$func_basename_result - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from '$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test yes = "$build_libtool_libs" \ - || func_fatal_configuration "cannot build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name '$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname=$func_basename_result - xdir=$func_dirname_result - lobj=$xdir$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test yes = "$build_old_libs"; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test no = "$compiler_c_o"; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext - lockfile=$output_obj.lock - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test yes = "$need_locks"; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test warn = "$need_locks"; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 - srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test yes = "$build_libtool_libs"; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test no != "$pic_mode"; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test yes = "$suppress_opt"; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test yes = "$build_old_libs"; then - if test yes != "$pic_mode"; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test yes = "$compiler_c_o"; then - func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test no != "$need_locks"; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test compile = "$opt_mode" && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a '.o' file suitable for static linking - -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a 'standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix '.c' with the -library object suffix, '.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to '-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the '--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the 'install' or 'cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE use a list of object files found in FILE to specify objects - -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with '-') are ignored. - -Every other argument is treated as a filename. Files ending in '.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in '.la', then a libtool library is created, -only library objects ('.lo' files) may be specified, and '-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created -using 'ar' and 'ranlib', or on Windows using 'lib'. - -If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode '$opt_mode'" - ;; - esac - - echo - $ECHO "Try '$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test : = "$opt_help"; then - func_mode_help - else - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | $SED -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - $SED '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $debug_cmd - - # The first argument is the command name. - cmd=$nonopt - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "'$file' is not a file" - - dir= - case $file in - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "'$file' was not linked with '-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir=$func_dirname_result - - if test -f "$dir/$objdir/$dlname"; then - func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir=$func_dirname_result - ;; - - *) - func_warning "'-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir=$absdir - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic=$magic - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file=$progdir/$program - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file=$progdir/$program - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if $opt_dry_run; then - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - else - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd=\$cmd$args - fi -} - -test execute = "$opt_mode" && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $debug_cmd - - libs= - libdirs= - admincmds= - - for opt in "$nonopt" ${1+"$@"} - do - if test -d "$opt"; then - func_append libdirs " $opt" - - elif test -f "$opt"; then - if func_lalib_unsafe_p "$opt"; then - func_append libs " $opt" - else - func_warning "'$opt' is not a valid libtool archive" - fi - - else - func_fatal_error "invalid argument '$opt'" - fi - done - - if test -n "$libs"; then - if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` - sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" - else - sysroot_cmd= - fi - - # Remove sysroot references - if $opt_dry_run; then - for lib in $libs; do - echo "removing references to $lt_sysroot and '=' prefixes from $lib" - done - else - tmpdir=`func_mktempdir` - for lib in $libs; do - $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ - > $tmpdir/tmp-la - mv -f $tmpdir/tmp-la $lib - done - ${RM}r "$tmpdir" - fi - fi - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_quiet && exit $EXIT_SUCCESS - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the '-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the '$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the '$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the '$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - fi - exit $EXIT_SUCCESS -} - -test finish = "$opt_mode" && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $debug_cmd - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac - then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=false - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - func_append files " $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=: ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test X-m = "X$prev" && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the '$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=: - if $isdir; then - destdir=$dest - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir=$func_dirname_result - destname=$func_basename_result - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "'$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "'$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - func_append staticlibs " $file" - ;; - - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir=$func_dirname_result - func_append dir "$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking '$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname=$1 - shift - - srcname=$realname - test -n "$relink_command" && srcname=${realname}T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme=$stripme - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme= - ;; - esac - ;; - os2*) - case $realname in - *_dll.a) - tstripme= - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try 'ln -sf' first, because the 'ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib=$destdir/$realname - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name=$func_basename_result - instname=$dir/${name}i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest=$destfile - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to '$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test yes = "$build_old_libs"; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext= - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=.exe - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script '$wrapper'" - - finalize=: - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "'$lib' has not been installed in '$libdir'" - finalize=false - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test no = "$fast_install" && test -n "$relink_command"; then - $opt_dry_run || { - if $finalize; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file=$func_basename_result - outputname=$tmpdir/$file - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink '$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file=$outputname - else - func_warning "cannot relink '$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name=$func_basename_result - - # Set up the ranlib parameters. - oldlib=$destdir/$name - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $tool_oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run '$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test install = "$opt_mode" && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $debug_cmd - - my_outputname=$1 - my_originator=$2 - my_pic_p=${3-false} - my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms=${my_outputname}S.c - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist=$output_objdir/$my_outputname.nm - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* External symbol declarations for the compiler. */\ -" - - if test yes = "$dlself"; then - func_verbose "generating symbol list for '$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from '$func_to_tool_file_result'" - $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols=$output_objdir/$outputname.exp - $opt_dry_run || { - $RM $export_symbols - eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from '$dlprefile'" - func_basename "$dlprefile" - name=$func_basename_result - case $host in - *cygwin* | *mingw* | *cegcc* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" - eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename= - if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then - # Use subshell, to avoid clobbering current variable values - dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname"; then - func_basename "$dlprefile_dlname" - dlprefile_dlbasename=$func_basename_result - else - # no lafile. user explicitly requested -dlpreopen . - $sharedlib_from_linklib_cmd "$dlprefile" - dlprefile_dlbasename=$sharedlib_from_linklib_result - fi - fi - $opt_dry_run || { - if test -n "$dlprefile_dlbasename"; then - eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' - else - func_warning "Could not compute DLL name from $name" - eval '$ECHO ": $name " >> "$nlist"' - fi - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - } - else # not an import lib - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - fi - ;; - *) - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - ;; - esac - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - func_show_eval '$RM "${nlist}I"' - if test -n "$global_symbol_to_import"; then - eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[];\ -" - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ -static void lt_syminit(void) -{ - LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; - for (; symbol->name; ++symbol) - {" - $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" - echo >> "$output_objdir/$my_dlsyms" "\ - } -}" - fi - echo >> "$output_objdir/$my_dlsyms" "\ -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{ {\"$my_originator\", (void *) 0}," - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ - {\"@INIT@\", (void *) <_syminit}," - fi - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - $my_pic_p && pic_flag_for_symtable=" $pic_flag" - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) func_append symtab_cflags " $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' - - # Transform the symbol file into the correct name. - symfileobj=$output_objdir/${my_outputname}S.$objext - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for '$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $debug_cmd - - win32_libid_type=unknown - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - case $nm_interface in - "MS dumpbin") - if func_cygming_ms_implib_p "$1" || - func_cygming_gnu_implib_p "$1" - then - win32_nmres=import - else - win32_nmres= - fi - ;; - *) - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ - s|.*|import| - p - q - } - }'` - ;; - esac - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - -# func_cygming_dll_for_implib ARG -# -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib () -{ - $debug_cmd - - sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -} - -# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -# -# The is the core of a fallback implementation of a -# platform-specific function to extract the name of the -# DLL associated with the specified import library LIBNAME. -# -# SECTION_NAME is either .idata$6 or .idata$7, depending -# on the platform and compiler that created the implib. -# -# Echos the name of the DLL associated with the -# specified import library. -func_cygming_dll_for_implib_fallback_core () -{ - $debug_cmd - - match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` - $OBJDUMP -s --section "$1" "$2" 2>/dev/null | - $SED '/^Contents of section '"$match_literal"':/{ - # Place marker at beginning of archive member dllname section - s/.*/====MARK====/ - p - d - } - # These lines can sometimes be longer than 43 characters, but - # are always uninteresting - /:[ ]*file format pe[i]\{,1\}-/d - /^In archive [^:]*:/d - # Ensure marker is printed - /^====MARK====/p - # Remove all lines with less than 43 characters - /^.\{43\}/!d - # From remaining lines, remove first 43 characters - s/^.\{43\}//' | - $SED -n ' - # Join marker and all lines until next marker into a single line - /^====MARK====/ b para - H - $ b para - b - :para - x - s/\n//g - # Remove the marker - s/^====MARK====// - # Remove trailing dots and whitespace - s/[\. \t]*$// - # Print - /./p' | - # we now have a list, one entry per line, of the stringified - # contents of the appropriate section of all members of the - # archive that possess that section. Heuristic: eliminate - # all those that have a first or second character that is - # a '.' (that is, objdump's representation of an unprintable - # character.) This should work for all archives with less than - # 0x302f exports -- but will fail for DLLs whose name actually - # begins with a literal '.' or a single character followed by - # a '.'. - # - # Of those that remain, print the first one. - $SED -e '/^\./d;/^.\./d;q' -} - -# func_cygming_dll_for_implib_fallback ARG -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# -# This fallback implementation is for use when $DLLTOOL -# does not support the --identify-strict option. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib_fallback () -{ - $debug_cmd - - if func_cygming_gnu_implib_p "$1"; then - # binutils import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1"; then - # ms-generated import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` - else - # unknown - sharedlib_from_linklib_result= - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $debug_cmd - - f_ex_an_ar_dir=$1; shift - f_ex_an_ar_oldlib=$1 - if test yes = "$lock_old_archive_extraction"; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test yes = "$lock_old_archive_extraction"; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $debug_cmd - - my_gentop=$1; shift - my_oldlibs=${1+"$@"} - my_oldobjs= - my_xlib= - my_xabs= - my_xdir= - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib=$func_basename_result - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir=$my_gentop/$my_xlib_u - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - func_basename "$darwin_archive" - darwin_base_archive=$func_basename_result - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches; do - func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" - $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" - cd "unfat-$$/$darwin_base_archive-$darwin_arch" - func_extract_an_archive "`pwd`" "$darwin_base_archive" - cd "$darwin_curdir" - $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result=$my_oldobjs -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory where it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ that is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options that match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case \" \$* \" in - *\\ --lt-*) - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done ;; - esac - func_exec_program_core \${1+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test yes = "$fast_install"; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - \$ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # fixup the dll searchpath if we need to. - # - # Fix the DLL searchpath if we need to. Do this before prepending - # to shlibpath, because on Windows, both are PATH and uninstalled - # libraries must come first. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - # Export our shlibpath_var if we have one. - if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* declarations of non-ANSI functions */ -#if defined __MINGW32__ -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined __CYGWIN__ -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined other_platform || defined ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined _MSC_VER -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -#elif defined __MINGW32__ -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined __CYGWIN__ -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined other platforms ... */ -#endif - -#if defined PATH_MAX -# define LT_PATHMAX PATH_MAX -#elif defined MAXPATHLEN -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ - defined __OS2__ -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free (stale); stale = 0; } \ -} while (0) - -#if defined LT_DEBUGWRAPPER -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - size_t tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined HAVE_DOS_BASED_FILE_SYSTEM - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined HAVE_DOS_BASED_FILE_SYSTEM - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = (size_t) (q - p); - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (STREQ (str, pat)) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - size_t len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - size_t orig_value_len = strlen (orig_value); - size_t add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - size_t len = strlen (new_value); - while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[--len] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -n -e ' -s/^\(.\{79\}\)\(..*\)/\1\ -\2/ -h -s/\([\\"]\)/\\\1/g -s/$/\\n/ -s/\([^\n]*\).*/ fputs ("\1", f);/p -g -D' - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $debug_cmd - - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_suncc_cstd_abi -# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! -# Several compiler flags select an ABI that is incompatible with the -# Cstd library. Avoid specifying it if any are in CXXFLAGS. -func_suncc_cstd_abi () -{ - $debug_cmd - - case " $compile_command " in - *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) - suncc_use_cstd_abi=no - ;; - *) - suncc_use_cstd_abi=yes - ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $debug_cmd - - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # what system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll that has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - os2dllname= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=false - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module=$wl-single_module - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test yes != "$build_libtool_libs" \ - && func_fatal_configuration "cannot build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg=$1 - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir=$arg - prev= - continue - ;; - dlfiles|dlprefiles) - $preload || { - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=: - } - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test no = "$dlself"; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test dlprefiles = "$prev"; then - dlself=yes - elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test dlfiles = "$prev"; then - func_append dlfiles " $arg" - else - func_append dlprefiles " $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols=$arg - test -f "$arg" \ - || func_fatal_error "symbol file '$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex=$arg - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir=$arg - prev= - continue - ;; - mllvm) - # Clang does not use LLVM to link, so we can simply discard any - # '-mllvm $arg' options when doing the link step. - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - if test none != "$pic_object"; then - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - fi - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file '$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - os2dllname) - os2dllname=$arg - prev= - continue - ;; - precious_regex) - precious_files_regex=$arg - prev= - continue - ;; - release) - release=-$arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test rpath = "$prev"; then - case "$rpath " in - *" $arg "*) ;; - *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) func_append xrpath " $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds=$arg - prev= - continue - ;; - weak) - func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg=$arg - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "'-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test X-export-symbols = "X$arg"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname "-L" '' "$arg" - if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between '-L' and '$1'" - else - func_fatal_error "need path for '-L' option" - fi - fi - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of '$dir'" - dir=$absdir - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # Preserve sysroot, but never include relative directories - case $dir in - [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; - *) func_append deplibs " -L$dir" ;; - esac - func_append lib_search_path " $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test X-lc = "X$arg" || test X-lm = "X$arg"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test X-lc = "X$arg" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc due to us having libc/libc_r. - test X-lc = "X$arg" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test X-lc = "X$arg" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test X-lc = "X$arg" && continue - ;; - esac - elif test X-lc_r = "X$arg"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - func_append deplibs " $arg" - continue - ;; - - -mllvm) - prev=mllvm - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; - - -multi_module) - single_module=$wl-multi_module - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "'-no-install' is ignored for $host" - func_warning "assuming '-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -os2dllname) - prev=os2dllname - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - =*) - func_stripname '=' '' "$dir" - dir=$lt_sysroot$func_stripname_result - ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # -fstack-protector* stack protector flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -stdlib=* select c++ std lib with clang - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" - func_append finalize_command " $arg" - func_append compiler_flags " $arg" - continue - ;; - - -Z*) - if test os2 = "`expr $host : '.*\(os2\)'`"; then - # OS/2 uses -Zxxx to specify OS/2-specific options - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case $arg in - -Zlinker | -Zstack) - prev=xcompiler - ;; - esac - continue - else - # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - fi - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - *.$objext) - # A standard object. - func_append objs " $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - test none = "$pic_object" || { - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - } - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - func_append deplibs " $arg" - func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - func_resolve_sysroot "$arg" - if test dlfiles = "$prev"; then - # This library was specified with -dlopen. - func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test dlprefiles = "$prev"; then - # The library was specified with -dlpreopen. - func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else - func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the '$prevarg' option requires an argument" - - if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname=$func_basename_result - libobjs_save=$libobjs - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - # Definition is injected by LT_CONFIG during libtool generation. - func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" - - func_dirname "$output" "/" "" - output_objdir=$func_dirname_result$objdir - func_to_tool_file "$output_objdir/" - tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_preserve_dup_deps; then - case "$libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append libs " $deplib" - done - - if test lib = "$linkmode"; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac - func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=false - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test lib,link = "$linkmode,$pass"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs=$tmp_deplibs - fi - - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass"; then - libs=$deplibs - deplibs= - fi - if test prog = "$linkmode"; then - case $pass in - dlopen) libs=$dlfiles ;; - dlpreopen) libs=$dlprefiles ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test lib,dlpreopen = "$linkmode,$pass"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) func_append deplibs " $deplib" ;; - esac - done - done - libs=$dlprefiles - fi - if test dlopen = "$pass"; then - # Collect dlpreopened libraries - save_deplibs=$deplibs - deplibs= - fi - - for deplib in $libs; do - lib= - found=false - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append compiler_flags " $deplib" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test lib != "$linkmode" && test prog != "$linkmode"; then - func_warning "'-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test lib = "$linkmode"; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib=$searchdir/lib$name$search_ext - if test -f "$lib"; then - if test .la = "$search_ext"; then - found=: - else - found=false - fi - break 2 - fi - done - done - if $found; then - # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll=$l - done - if test "X$ll" = "X$old_library"; then # only static version available - found=false - func_dirname "$lib" "" "." - ladir=$func_dirname_result - lib=$ladir/$old_library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - else - # deplib doesn't seem to be a libtool library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - ;; # -l - *.ltframework) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test conv = "$pass" && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - if test scan = "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "'-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test link = "$pass"; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=false - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=: - fi - ;; - pass_all) - valid_a_lib=: - ;; - esac - if $valid_a_lib; then - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - else - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - fi - ;; - esac - continue - ;; - prog) - if test link != "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - elif test prog = "$linkmode"; then - if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append newdlfiles " $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=: - continue - ;; - esac # case $deplib - - $found || test -f "$lib" \ - || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "'$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir=$func_dirname_result - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass" || - { test prog != "$linkmode" && test lib != "$linkmode"; }; then - test -n "$dlopen" && func_append dlfiles " $dlopen" - test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test conv = "$pass"; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - # It is a libtool convenience library, so add in its objects. - func_append convenience " $ladir/$objdir/$old_library" - func_append old_convenience " $ladir/$objdir/$old_library" - elif test prog != "$linkmode" && test lib != "$linkmode"; then - func_fatal_error "'$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - if test -n "$old_library" && - { test yes = "$prefer_static_libs" || - test built,no = "$prefer_static_libs,$installed"; }; then - linklib=$old_library - else - for l in $old_library $library_names; do - linklib=$l - done - fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - - # This library was specified with -dlopen. - if test dlopen = "$pass"; then - test -z "$libdir" \ - && func_fatal_error "cannot -dlopen a convenience library: '$lib'" - if test -z "$dlname" || - test yes != "$dlopen_support" || - test no = "$build_libtool_libs" - then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - func_append dlprefiles " $lib $dependency_libs" - else - func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of '$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir=$ladir - fi - ;; - esac - func_basename "$lib" - laname=$func_basename_result - - # Find the relevant object directory and library name. - if test yes = "$installed"; then - if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library '$lib' was moved." - dir=$ladir - absdir=$abs_ladir - libdir=$abs_ladir - else - dir=$lt_sysroot$libdir - absdir=$lt_sysroot$libdir - fi - test yes = "$hardcode_automatic" && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir=$ladir - absdir=$abs_ladir - # Remove this search path later - func_append notinst_path " $abs_ladir" - else - dir=$ladir/$objdir - absdir=$abs_ladir/$objdir - # Remove this search path later - func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test dlpreopen = "$pass"; then - if test -z "$libdir" && test prog = "$linkmode"; then - func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" - fi - case $host in - # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present - # (otherwise, the dlopen module name will be incorrect). We do - # this by putting the import library name into $newdlprefiles. - # We recover the dlopen module name by 'saving' the la file - # name in a special purpose variable, and (later) extracting the - # dlname from the la file. - if test -n "$dlname"; then - func_tr_sh "$dir/$linklib" - eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" - func_append newdlprefiles " $dir/$linklib" - else - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - fi - ;; - * ) - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - func_append newdlprefiles " $dir/$dlname" - else - func_append newdlprefiles " $dir/$linklib" - fi - ;; - esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test lib = "$linkmode"; then - deplibs="$dir/$old_library $deplibs" - elif test prog,link = "$linkmode,$pass"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test prog = "$linkmode" && test link != "$pass"; then - func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=false - if test no != "$link_all_deplibs" || test -z "$library_names" || - test no = "$build_libtool_libs"; then - linkalldeplibs=: - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if $linkalldeplibs; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test prog,link = "$linkmode,$pass"; then - if test -n "$library_names" && - { { test no = "$prefer_static_libs" || - test built,yes = "$prefer_static_libs,$installed"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then - # Make sure the rpath contains only unique directories. - case $temp_rpath: in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if $alldeplibs && - { test pass_all = "$deplibs_check_method" || - { test yes = "$build_libtool_libs" && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test built = "$use_static_libs" && test yes = "$installed"; then - use_static_libs=no - fi - if test -n "$library_names" && - { test no = "$use_static_libs" || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc* | *os2*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test no = "$installed"; then - func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule= - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule=$dlpremoduletest - break - fi - done - if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then - echo - if test prog = "$linkmode"; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test lib = "$linkmode" && - test yes = "$hardcode_into_libs"; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname=$1 - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname=$dlname - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc* | *os2*) - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - esac - eval soname=\"$soname_spec\" - else - soname=$realname - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot=$soname - func_basename "$soroot" - soname=$func_basename_result - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from '$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for '$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test prog = "$linkmode" || test relink != "$opt_mode"; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test no = "$hardcode_direct"; then - add=$dir/$linklib - case $host in - *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; - *-*-sysv4*uw2*) add_dir=-L$dir ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir=-L$dir ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we cannot - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library"; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add=$dir/$old_library - fi - elif test -n "$old_library"; then - add=$dir/$old_library - fi - fi - esac - elif test no = "$hardcode_minus_L"; then - case $host in - *-*-sunos*) add_shlibpath=$dir ;; - esac - add_dir=-L$dir - add=-l$name - elif test no = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - relink) - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$dir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$absdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test yes != "$lib_linked"; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test prog = "$linkmode"; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test yes != "$hardcode_direct" && - test yes != "$hardcode_minus_L" && - test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - - if test prog = "$linkmode" || test relink = "$opt_mode"; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$libdir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$libdir - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - add=-l$name - elif test yes = "$hardcode_automatic"; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib"; then - add=$inst_prefix_dir$libdir/$linklib - else - add=$libdir/$linklib - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir=-L$libdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - fi - - if test prog = "$linkmode"; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test prog = "$linkmode"; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test unsupported != "$hardcode_direct"; then - test -n "$old_library" && linklib=$old_library - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test yes = "$build_libtool_libs"; then - # Not a shared library - if test pass_all != "$deplibs_check_method"; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system cannot link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test yes = "$module"; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test lib = "$linkmode"; then - if test -n "$dependency_libs" && - { test yes != "$hardcode_into_libs" || - test yes = "$build_old_libs" || - test yes = "$link_static"; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) func_append xrpath " $temp_xrpath";; - esac;; - *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs=$temp_deplibs - fi - - func_append newlib_search_path " $absdir" - # Link against this library - test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result";; - *) func_resolve_sysroot "$deplib" ;; - esac - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $func_resolve_sysroot_result "*) - func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi - func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test no != "$link_all_deplibs"; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path=$deplib ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of '$dir'" - absdir=$dir - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names"; then - for tmp in $deplibrary_names; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl"; then - depdepl=$absdir/$objdir/$depdepl - darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" - func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" - path= - fi - fi - ;; - *) - path=-L$absdir/$objdir - ;; - esac - else - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "'$deplib' seems to be moved" - - path=-L$absdir - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test link = "$pass"; then - if test prog = "$linkmode"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs=$newdependency_libs - if test dlpreopen = "$pass"; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test dlopen != "$pass"; then - test conv = "$pass" || { - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= - } - - if test prog,link = "$linkmode,$pass"; then - vars="compile_deplibs finalize_deplibs" - else - vars=deplibs - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) func_append tmp_libs " $deplib" ;; - esac - ;; - *) func_append tmp_libs " $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - - # Add Sun CC postdeps if required: - test CXX = "$tagname" && { - case $host_os in - linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C++ 5.9 - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - - solaris*) - func_cc_basename "$CC" - case $func_cc_basename_result in - CC* | sunCC*) - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - esac - } - - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i= - ;; - esac - if test -n "$i"; then - func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test prog = "$linkmode"; then - dlfiles=$newdlfiles - fi - if test prog = "$linkmode" || test lib = "$linkmode"; then - dlprefiles=$newdlprefiles - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "'-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "'-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs=$output - func_append objs "$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form 'libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test no = "$module" \ - && func_fatal_help "libtool library '$output' must begin with 'lib'" - - if test no != "$need_lib_prefix"; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test pass_all != "$deplibs_check_method"; then - func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - func_append libobjs " $objs" - fi - fi - - test no = "$dlself" \ - || func_warning "'-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test 1 -lt "$#" \ - && func_warning "ignoring multiple '-rpath's for a libtool library" - - install_libdir=$1 - - oldlibs= - if test -z "$rpath"; then - if test yes = "$build_libtool_libs"; then - # Building a libtool convenience library. - # Some compilers have problems with a '.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "'-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs=$IFS; IFS=: - set dummy $vinfo 0 0 0 - shift - IFS=$save_ifs - - test -n "$7" && \ - func_fatal_help "too many parameters to '-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major=$1 - number_minor=$2 - number_revision=$3 - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # that has an extra 1 added just for fun - # - case $version_type in - # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_revision - ;; - freebsd-aout|qnx|sunos) - current=$number_major - revision=$number_minor - age=0 - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_minor - lt_irix_increment=no - ;; - esac - ;; - no) - current=$1 - revision=$2 - age=$3 - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT '$current' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION '$revision' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE '$age' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE '$age' is greater than the current interface number '$current'" - func_fatal_error "'$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - # On Darwin other compilers - case $CC in - nagfor*) - verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - ;; - *) - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - esac - ;; - - freebsd-aout) - major=.$current - versuffix=.$current.$revision - ;; - - freebsd-elf) - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - irix | nonstopux) - if test no = "$lt_irix_increment"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring=$verstring_prefix$major.$revision - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test 0 -ne "$loop"; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring_prefix$major.$iface:$verstring - done - - # Before this point, $major must not contain '.'. - major=.$major - versuffix=$major.$revision - ;; - - linux) # correct to gnu/linux during the next big refactor - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=.$current.$age.$revision - verstring=$current.$age.$revision - - # Add in all the interfaces that we are compatible with. - loop=$age - while test 0 -ne "$loop"; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring:$iface.0 - done - - # Make executables depend on our current version. - func_append verstring ":$current.0" - ;; - - qnx) - major=.$current - versuffix=.$current - ;; - - sco) - major=.$current - versuffix=.$current - ;; - - sunos) - major=.$current - versuffix=.$current.$revision - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 file systems. - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - - *) - func_fatal_configuration "unknown library version type '$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring=0.0 - ;; - esac - if test no = "$need_version"; then - versuffix= - else - versuffix=.0.0 - fi - fi - - # Remove version info from name if versioning should be avoided - if test yes,no = "$avoid_version,$need_version"; then - major= - versuffix= - verstring= - fi - - # Check to see if the archive will have undefined symbols. - if test yes = "$allow_undefined"; then - if test unsupported = "$allow_undefined_flag"; then - if test yes = "$build_old_libs"; then - func_warning "undefined symbols not allowed in $host shared libraries; building static only" - build_libtool_libs=no - else - func_fatal_error "can't build $host shared library unless -no-undefined is specified" - fi - fi - else - # Don't allow undefined symbols. - allow_undefined_flag=$no_undefined_flag - fi - - fi - - func_generate_dlsyms "$libname" "$libname" : - func_append libobjs " $symfileobj" - test " " = "$libobjs" && libobjs= - - if test relink != "$opt_mode"; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) - if test -n "$precious_files_regex"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - func_append removelist " $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then - func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles=$dlfiles - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) func_append dlfiles " $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles=$dlprefiles - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) func_append dlprefiles " $lib" ;; - esac - done - - if test yes = "$build_libtool_libs"; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test yes = "$build_libtool_need_lc"; then - func_append deplibs " -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release= - versuffix= - major= - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - $nocaseglob - else - potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` - fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib=$potent_lib - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | $SED 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; - *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $a_deplib "*) - func_append newdeplibs " $a_deplib" - a_deplib= - ;; - esac - fi - if test -n "$a_deplib"; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib=$potent_lib # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs= - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - for i in $predeps $postdeps; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test none = "$deplibs_check_method"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test yes = "$droppeddeps"; then - if test yes = "$module"; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test no = "$allow_undefined"; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - deplibs=$new_libs - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test yes = "$build_libtool_libs"; then - # Remove $wl instances when linking with ld. - # FIXME: should test the right _cmds variable. - case $archive_cmds in - *\$LD\ *) wl= ;; - esac - if test yes = "$hardcode_into_libs"; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath=$finalize_rpath - test relink = "$opt_mode" || rpath=$compile_rpath$rpath - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath=$finalize_shlibpath - test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname=$1 - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname=$realname - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib=$output_objdir/$realname - linknames= - for link - do - func_append linknames " $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols=$output_objdir/$libname.uexp - func_append delfiles " $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - func_dll_def_p "$export_symbols" || { - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols=$export_symbols - export_symbols= - always_export_symbols=yes - } - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs=$IFS; IFS='~' - for cmd1 in $cmds; do - IFS=$save_ifs - # Take the normal branch if the nm_file_list_spec branch - # doesn't work or if tool conversion is not needed. - case $nm_file_list_spec~$to_tool_file_cmd in - *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) - try_normal_branch=yes - eval cmd=\"$cmd1\" - func_len " $cmd" - len=$func_len_result - ;; - *) - try_normal_branch=no - ;; - esac - if test yes = "$try_normal_branch" \ - && { test "$len" -lt "$max_cmd_len" \ - || test "$max_cmd_len" -le -1; } - then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - elif test -n "$nm_file_list_spec"; then - func_basename "$output" - output_la=$func_basename_result - save_libobjs=$libobjs - save_output=$output - output=$output_objdir/$output_la.nm - func_to_tool_file "$output" - libobjs=$nm_file_list_spec$func_to_tool_file_result - func_append delfiles " $output" - func_verbose "creating $NM input file list: $output" - for obj in $save_libobjs; do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > "$output" - eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' - output=$save_output - libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS=$save_ifs - if test -n "$export_symbols_regex" && test : != "$skipped_export"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test : != "$skipped_export" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - func_append tmp_deplibs " $test_deplib" - ;; - esac - done - deplibs=$tmp_deplibs - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test yes = "$compiler_needs_object" && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test : != "$skipped_export" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then - output=$output_objdir/$output_la.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output - func_append delfiles " $output" - func_to_tool_file "$output" - output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then - output=$output_objdir/$output_la.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test yes = "$compiler_needs_object"; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - func_append delfiles " $output" - func_to_tool_file "$output" - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-$k.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test -z "$objlist" || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test 1 -eq "$k"; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-$k.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-$k.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - func_append delfiles " $output" - - else - output= - fi - - ${skipped_export-false} && { - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - } - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs=$IFS; IFS='~' - for cmd in $concat_cmds; do - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - ${skipped_export-false} && { - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - } - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs=$IFS; IFS='~' - for cmd in $cmds; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test yes = "$module" || test yes = "$export_dynamic"; then - # On all known operating systems, these are identical. - dlname=$soname - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "'-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object '$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj=$output - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # if reload_cmds runs $LD directly, get rid of -Wl from - # whole_archive_flag_spec and hope we can get by with turning comma - # into space. - case $reload_cmds in - *\$LD[\ \$]*) wl= ;; - esac - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags - else - gentop=$output_objdir/${obj}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # If we're not building shared, we need to use non_pic_objs - test yes = "$build_libtool_libs" || libobjs=$non_pic_objects - - # Create the old-style object. - reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - - output=$obj - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - test yes = "$build_libtool_libs" || { - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - } - - if test -n "$pic_flag" || test default != "$pic_mode"; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output=$libobj - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "'-release' is ignored for programs" - - $preload \ - && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ - && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test CXX = "$tagname"; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - func_append compile_command " $wl-bind_at_load" - func_append finalize_command " $wl-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs=$new_libs - - - func_append compile_command " $compile_deplibs" - func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath=$rpath - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath=$rpath - - if test -n "$libobjs" && test yes = "$build_old_libs"; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" false - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=: - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=false - ;; - *cygwin* | *mingw* ) - test yes = "$build_libtool_libs" || wrappers_required=false - ;; - *) - if test no = "$need_relink" || test yes != "$build_libtool_libs"; then - wrappers_required=false - fi - ;; - esac - $wrappers_required || { - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command=$compile_command$compile_rpath - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.$objext"; then - func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' - fi - - exit $exit_status - } - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test yes = "$no_install"; then - # We don't need to create a wrapper script. - link_command=$compile_var$compile_command$compile_rpath - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - exit $EXIT_SUCCESS - fi - - case $hardcode_action,$fast_install in - relink,*) - # Fast installation is not supported - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "'$output' will be relinked during installation" - ;; - *,yes) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - ;; - *,no) - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - ;; - *,needless) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command= - ;; - esac - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output_objdir/$outputname" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource=$output_path/$objdir/lt-$output_name.c - cwrapper=$output_path/$output_name.exe - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host"; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - case $build_libtool_libs in - convenience) - oldobjs="$libobjs_save $symfileobj" - addlibs=$convenience - build_libtool_libs=no - ;; - module) - oldobjs=$libobjs_save - addlibs=$old_convenience - build_libtool_libs=no - ;; - *) - oldobjs="$old_deplibs $non_pic_objects" - $preload && test -f "$symfileobj" \ - && func_append oldobjs " $symfileobj" - addlibs=$old_convenience - ;; - esac - - if test -n "$addlibs"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $addlibs - func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase=$func_basename_result - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - func_append oldobjs " $gentop/$newobj" - ;; - *) func_append oldobjs " $obj" ;; - esac - done - fi - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - elif test -n "$archiver_list_spec"; then - func_verbose "using command file archive linking..." - for obj in $oldobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > $output_objdir/$libname.libcmd - func_to_tool_file "$output_objdir/$libname.libcmd" - oldobjs=" $archiver_list_spec$func_to_tool_file_result" - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj"; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test -z "$oldobjs"; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test yes = "$build_old_libs" && old_library=$libname.$libext - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test yes = "$hardcode_automatic"; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test yes = "$installed"; then - if test -z "$install_libdir"; then - break - fi - output=$output_objdir/${outputname}i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name=$func_basename_result - func_resolve_sysroot "$deplib" - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" - ;; - -L*) - func_stripname -L '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; - -R*) - func_stripname -R '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -R$func_replace_sysroot_result" - ;; - *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs=$newdependency_libs - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; - *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles=$newdlprefiles - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlfiles " $abs" - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlprefiles " $abs" - done - dlprefiles=$newdlprefiles - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test -n "$bindir"; then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result/$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that cannot go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test no,yes = "$installed,$need_relink"; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -if test link = "$opt_mode" || test relink = "$opt_mode"; then - func_mode_link ${1+"$@"} -fi - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $debug_cmd - - RM=$nonopt - files= - rmforce=false - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - for arg - do - case $arg in - -f) func_append RM " $arg"; rmforce=: ;; - -*) func_append RM " $arg" ;; - *) func_append files " $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir=$func_dirname_result - if test . = "$dir"; then - odir=$objdir - else - odir=$dir/$objdir - fi - func_basename "$file" - name=$func_basename_result - test uninstall = "$opt_mode" && odir=$dir - - # Remember odir for removal later, being careful to avoid duplicates - if test clean = "$opt_mode"; then - case " $rmdirs " in - *" $odir "*) ;; - *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif $rmforce; then - continue - fi - - rmfiles=$file - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - func_append rmfiles " $odir/$n" - done - test -n "$old_library" && func_append rmfiles " $odir/$old_library" - - case $opt_mode in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac - test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && test none != "$pic_object"; then - func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && test none != "$non_pic_object"; then - func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) - if test clean = "$opt_mode"; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.$objext" - if test yes = "$fast_install" && test -n "$relink_command"; then - func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name"; then - func_append rmfiles " $odir/lt-$noexename.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the $objdir's in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then - func_mode_uninstall ${1+"$@"} -fi - -test -z "$opt_mode" && { - help=$generic_help - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode '$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# where we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/thirdparty/jpeg-9e/makcjpeg.st b/thirdparty/jpeg-9e/makcjpeg.st deleted file mode 100644 index 628f533..0000000 --- a/thirdparty/jpeg-9e/makcjpeg.st +++ /dev/null @@ -1,36 +0,0 @@ -; Project file for Independent JPEG Group's software -; -; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. -; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding. -; -; To use this file, rename it to cjpeg.prj. -; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." -; Read installation instructions before trying to make the program! -; -; -; * * * Output file * * * -cjpeg.ttp -; -; * * * COMPILER OPTIONS * * * -.C[-P] ; absolute calls -.C[-M] ; and no string merging, folks -.C[-w-cln] ; no "constant is long" warnings -.C[-w-par] ; no "parameter xxxx unused" -.C[-w-rch] ; no "unreachable code" -.C[-wsig] ; warn if significant digits may be lost -= -; * * * * List of modules * * * * -pcstart.o -cjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) -cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -libjpeg.lib ; built by libjpeg.prj -pcfltlib.lib ; floating point library -; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED -pcstdlib.lib ; standard library -pcextlib.lib ; extended library diff --git a/thirdparty/jpeg-9e/makdjpeg.st b/thirdparty/jpeg-9e/makdjpeg.st deleted file mode 100644 index 4b61404..0000000 --- a/thirdparty/jpeg-9e/makdjpeg.st +++ /dev/null @@ -1,36 +0,0 @@ -; Project file for Independent JPEG Group's software -; -; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. -; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding. -; -; To use this file, rename it to djpeg.prj. -; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." -; Read installation instructions before trying to make the program! -; -; -; * * * Output file * * * -djpeg.ttp -; -; * * * COMPILER OPTIONS * * * -.C[-P] ; absolute calls -.C[-M] ; and no string merging, folks -.C[-w-cln] ; no "constant is long" warnings -.C[-w-par] ; no "parameter xxxx unused" -.C[-w-rch] ; no "unreachable code" -.C[-wsig] ; warn if significant digits may be lost -= -; * * * * List of modules * * * * -pcstart.o -djpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) -cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdcolmap.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -wrppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -wrgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -wrtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -wrbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -wrrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -libjpeg.lib ; built by libjpeg.prj -pcfltlib.lib ; floating point library -; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED -pcstdlib.lib ; standard library -pcextlib.lib ; extended library diff --git a/thirdparty/jpeg-9e/makeadsw.vc6 b/thirdparty/jpeg-9e/makeadsw.vc6 deleted file mode 100644 index 80459c5..0000000 --- a/thirdparty/jpeg-9e/makeadsw.vc6 +++ /dev/null @@ -1,77 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GEL™SCHT WERDEN! - -############################################################################### - -Project: "cjpeg"=".\cjpeg.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "djpeg"=".\djpeg.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "jpegtran"=".\jpegtran.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "rdjpgcom"=".\rdjpgcom.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "wrjpgcom"=".\wrjpgcom.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/thirdparty/jpeg-9e/makeasln.v16 b/thirdparty/jpeg-9e/makeasln.v16 deleted file mode 100644 index 3880c9f..0000000 --- a/thirdparty/jpeg-9e/makeasln.v16 +++ /dev/null @@ -1,71 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31402.337 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cjpeg", "cjpeg.vcxproj", "{2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "djpeg", "djpeg.vcxproj", "{11043137-B453-4DFA-9010-4D2B9DC1545C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpegtran", "jpegtran.vcxproj", "{025BAC50-51B5-4FFE-BC47-3F920BB4047E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rdjpgcom", "rdjpgcom.vcxproj", "{C81513DB-78DC-46BC-BC98-82E745203976}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wrjpgcom", "wrjpgcom.vcxproj", "{B57065D4-DDDA-4668-BAF5-2D49270C973C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Release|ARM = Release|ARM - Release|ARM64 = Release|ARM64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}.Release|ARM.ActiveCfg = Release|ARM - {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}.Release|ARM.Build.0 = Release|ARM - {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}.Release|ARM64.ActiveCfg = Release|ARM64 - {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}.Release|ARM64.Build.0 = Release|ARM64 - {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}.Release|Win32.ActiveCfg = Release|Win32 - {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}.Release|Win32.Build.0 = Release|Win32 - {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}.Release|x64.ActiveCfg = Release|x64 - {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57}.Release|x64.Build.0 = Release|x64 - {11043137-B453-4DFA-9010-4D2B9DC1545C}.Release|ARM.ActiveCfg = Release|ARM - {11043137-B453-4DFA-9010-4D2B9DC1545C}.Release|ARM.Build.0 = Release|ARM - {11043137-B453-4DFA-9010-4D2B9DC1545C}.Release|ARM64.ActiveCfg = Release|ARM64 - {11043137-B453-4DFA-9010-4D2B9DC1545C}.Release|ARM64.Build.0 = Release|ARM64 - {11043137-B453-4DFA-9010-4D2B9DC1545C}.Release|Win32.ActiveCfg = Release|Win32 - {11043137-B453-4DFA-9010-4D2B9DC1545C}.Release|Win32.Build.0 = Release|Win32 - {11043137-B453-4DFA-9010-4D2B9DC1545C}.Release|x64.ActiveCfg = Release|x64 - {11043137-B453-4DFA-9010-4D2B9DC1545C}.Release|x64.Build.0 = Release|x64 - {025BAC50-51B5-4FFE-BC47-3F920BB4047E}.Release|ARM.ActiveCfg = Release|ARM - {025BAC50-51B5-4FFE-BC47-3F920BB4047E}.Release|ARM.Build.0 = Release|ARM - {025BAC50-51B5-4FFE-BC47-3F920BB4047E}.Release|ARM64.ActiveCfg = Release|ARM64 - {025BAC50-51B5-4FFE-BC47-3F920BB4047E}.Release|ARM64.Build.0 = Release|ARM64 - {025BAC50-51B5-4FFE-BC47-3F920BB4047E}.Release|Win32.ActiveCfg = Release|Win32 - {025BAC50-51B5-4FFE-BC47-3F920BB4047E}.Release|Win32.Build.0 = Release|Win32 - {025BAC50-51B5-4FFE-BC47-3F920BB4047E}.Release|x64.ActiveCfg = Release|x64 - {025BAC50-51B5-4FFE-BC47-3F920BB4047E}.Release|x64.Build.0 = Release|x64 - {C81513DB-78DC-46BC-BC98-82E745203976}.Release|ARM.ActiveCfg = Release|ARM - {C81513DB-78DC-46BC-BC98-82E745203976}.Release|ARM.Build.0 = Release|ARM - {C81513DB-78DC-46BC-BC98-82E745203976}.Release|ARM64.ActiveCfg = Release|ARM64 - {C81513DB-78DC-46BC-BC98-82E745203976}.Release|ARM64.Build.0 = Release|ARM64 - {C81513DB-78DC-46BC-BC98-82E745203976}.Release|Win32.ActiveCfg = Release|Win32 - {C81513DB-78DC-46BC-BC98-82E745203976}.Release|Win32.Build.0 = Release|Win32 - {C81513DB-78DC-46BC-BC98-82E745203976}.Release|x64.ActiveCfg = Release|x64 - {C81513DB-78DC-46BC-BC98-82E745203976}.Release|x64.Build.0 = Release|x64 - {B57065D4-DDDA-4668-BAF5-2D49270C973C}.Release|ARM.ActiveCfg = Release|ARM - {B57065D4-DDDA-4668-BAF5-2D49270C973C}.Release|ARM.Build.0 = Release|ARM - {B57065D4-DDDA-4668-BAF5-2D49270C973C}.Release|ARM64.ActiveCfg = Release|ARM64 - {B57065D4-DDDA-4668-BAF5-2D49270C973C}.Release|ARM64.Build.0 = Release|ARM64 - {B57065D4-DDDA-4668-BAF5-2D49270C973C}.Release|Win32.ActiveCfg = Release|Win32 - {B57065D4-DDDA-4668-BAF5-2D49270C973C}.Release|Win32.Build.0 = Release|Win32 - {B57065D4-DDDA-4668-BAF5-2D49270C973C}.Release|x64.ActiveCfg = Release|x64 - {B57065D4-DDDA-4668-BAF5-2D49270C973C}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {2F6B4B1E-5D02-475F-B2FE-EA2D9E697E54} - EndGlobalSection -EndGlobal diff --git a/thirdparty/jpeg-9e/makecdep.vc6 b/thirdparty/jpeg-9e/makecdep.vc6 deleted file mode 100644 index 11dff77..0000000 --- a/thirdparty/jpeg-9e/makecdep.vc6 +++ /dev/null @@ -1,82 +0,0 @@ -# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von cjpeg.mak - -.\cdjpeg.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\cjpeg.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - ".\jversion.h"\ - - -.\rdbmp.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\rdgif.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\rdppm.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\rdrle.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\rdswitch.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\rdtarga.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - diff --git a/thirdparty/jpeg-9e/makecdsp.vc6 b/thirdparty/jpeg-9e/makecdsp.vc6 deleted file mode 100644 index 68fea83..0000000 --- a/thirdparty/jpeg-9e/makecdsp.vc6 +++ /dev/null @@ -1,130 +0,0 @@ -# Microsoft Developer Studio Project File - Name="cjpeg" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=cjpeg - Win32 -!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "cjpeg.mak". -!MESSAGE -!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "cjpeg.mak" CFG="cjpeg - Win32" -!MESSAGE -!MESSAGE Fr die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "cjpeg - Win32" (basierend auf "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir ".\cjpeg\Release" -# PROP BASE Intermediate_Dir ".\cjpeg\Release" -# PROP BASE Target_Dir ".\cjpeg" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\Release" -# PROP Intermediate_Dir ".\Release\cjpeg" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir ".\cjpeg" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# Begin Target - -# Name "cjpeg - Win32" -# Begin Group "Quellcodedateien" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" -# Begin Source File - -SOURCE=.\cdjpeg.c -# End Source File -# Begin Source File - -SOURCE=.\cjpeg.c -# End Source File -# Begin Source File - -SOURCE=.\rdbmp.c -# End Source File -# Begin Source File - -SOURCE=.\rdgif.c -# End Source File -# Begin Source File - -SOURCE=.\rdppm.c -# End Source File -# Begin Source File - -SOURCE=.\rdrle.c -# End Source File -# Begin Source File - -SOURCE=.\rdswitch.c -# End Source File -# Begin Source File - -SOURCE=.\rdtarga.c -# End Source File -# End Group -# Begin Group "Header-Dateien" - -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" -# Begin Source File - -SOURCE=.\cderror.h -# End Source File -# Begin Source File - -SOURCE=.\cdjpeg.h -# End Source File -# Begin Source File - -SOURCE=.\jconfig.h -# End Source File -# Begin Source File - -SOURCE=.\jerror.h -# End Source File -# Begin Source File - -SOURCE=.\jinclude.h -# End Source File -# Begin Source File - -SOURCE=.\jmorecfg.h -# End Source File -# Begin Source File - -SOURCE=.\jpeglib.h -# End Source File -# Begin Source File - -SOURCE=.\jversion.h -# End Source File -# End Group -# Begin Group "Ressourcendateien" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/thirdparty/jpeg-9e/makecfil.v16 b/thirdparty/jpeg-9e/makecfil.v16 deleted file mode 100644 index 2c00239..0000000 --- a/thirdparty/jpeg-9e/makecfil.v16 +++ /dev/null @@ -1,69 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makecmak.vc6 b/thirdparty/jpeg-9e/makecmak.vc6 deleted file mode 100644 index bee03bf..0000000 --- a/thirdparty/jpeg-9e/makecmak.vc6 +++ /dev/null @@ -1,159 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on cjpeg.dsp -!IF "$(CFG)" == "" -CFG=cjpeg - Win32 -!MESSAGE Keine Konfiguration angegeben. cjpeg - Win32 wird als Standard verwendet. -!ENDIF - -!IF "$(CFG)" != "cjpeg - Win32" -!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben. -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "cjpeg.mak" CFG="cjpeg - Win32" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "cjpeg - Win32" (basierend auf "Win32 (x86) Console Application") -!MESSAGE -!ERROR Eine ungültige Konfiguration wurde angegeben. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -RSC=rc.exe -OUTDIR=.\cjpeg\Release -INTDIR=.\cjpeg\Release -# Begin Custom Macros -OutDir=.\cjpeg\Release -# End Custom Macros - -ALL : "$(OUTDIR)\cjpeg.exe" - - -CLEAN : - -@erase "$(INTDIR)\cdjpeg.obj" - -@erase "$(INTDIR)\cjpeg.obj" - -@erase "$(INTDIR)\rdbmp.obj" - -@erase "$(INTDIR)\rdgif.obj" - -@erase "$(INTDIR)\rdppm.obj" - -@erase "$(INTDIR)\rdrle.obj" - -@erase "$(INTDIR)\rdswitch.obj" - -@erase "$(INTDIR)\rdtarga.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\cjpeg.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\cjpeg.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\cjpeg.pdb" /machine:I386 /out:"$(OUTDIR)\cjpeg.exe" -LINK32_OBJS= \ - "$(INTDIR)\cdjpeg.obj" \ - "$(INTDIR)\cjpeg.obj" \ - "$(INTDIR)\rdbmp.obj" \ - "$(INTDIR)\rdgif.obj" \ - "$(INTDIR)\rdppm.obj" \ - "$(INTDIR)\rdrle.obj" \ - "$(INTDIR)\rdswitch.obj" \ - "$(INTDIR)\rdtarga.obj" - -"$(OUTDIR)\cjpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\cjpeg.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("cjpeg.dep") -!INCLUDE "cjpeg.dep" -!ELSE -!MESSAGE Warning: cannot find "cjpeg.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "cjpeg - Win32" -SOURCE=.\cdjpeg.c - -"$(INTDIR)\cdjpeg.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\cjpeg.c - -"$(INTDIR)\cjpeg.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\rdbmp.c - -"$(INTDIR)\rdbmp.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\rdgif.c - -"$(INTDIR)\rdgif.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\rdppm.c - -"$(INTDIR)\rdppm.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\rdrle.c - -"$(INTDIR)\rdrle.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\rdswitch.c - -"$(INTDIR)\rdswitch.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\rdtarga.c - -"$(INTDIR)\rdtarga.obj" : $(SOURCE) "$(INTDIR)" - - - -!ENDIF - diff --git a/thirdparty/jpeg-9e/makecvcx.v16 b/thirdparty/jpeg-9e/makecvcx.v16 deleted file mode 100644 index ee6bd4e..0000000 --- a/thirdparty/jpeg-9e/makecvcx.v16 +++ /dev/null @@ -1,195 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57} - Win32Proj - cjpeg - 10.0 - - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makecvcx.v17 b/thirdparty/jpeg-9e/makecvcx.v17 deleted file mode 100644 index b55fd90..0000000 --- a/thirdparty/jpeg-9e/makecvcx.v17 +++ /dev/null @@ -1,195 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {2E7FAAD9-2F58-4BDE-81F2-1D6D3FB8BF57} - Win32Proj - cjpeg - 10.0 - - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - - - - - - - - - - - - - - - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makeddep.vc6 b/thirdparty/jpeg-9e/makeddep.vc6 deleted file mode 100644 index f911eba..0000000 --- a/thirdparty/jpeg-9e/makeddep.vc6 +++ /dev/null @@ -1,82 +0,0 @@ -# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von djpeg.mak - -.\cdjpeg.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\djpeg.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - ".\jversion.h"\ - - -.\rdcolmap.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\wrbmp.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\wrgif.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\wrppm.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\wrrle.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\wrtarga.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - diff --git a/thirdparty/jpeg-9e/makeddsp.vc6 b/thirdparty/jpeg-9e/makeddsp.vc6 deleted file mode 100644 index 5ff61ef..0000000 --- a/thirdparty/jpeg-9e/makeddsp.vc6 +++ /dev/null @@ -1,130 +0,0 @@ -# Microsoft Developer Studio Project File - Name="djpeg" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=djpeg - Win32 -!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "djpeg.mak". -!MESSAGE -!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "djpeg.mak" CFG="djpeg - Win32" -!MESSAGE -!MESSAGE Fr die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "djpeg - Win32" (basierend auf "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir ".\djpeg\Release" -# PROP BASE Intermediate_Dir ".\djpeg\Release" -# PROP BASE Target_Dir ".\djpeg" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\Release" -# PROP Intermediate_Dir ".\Release\djpeg" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir ".\djpeg" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# Begin Target - -# Name "djpeg - Win32" -# Begin Group "Quellcodedateien" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" -# Begin Source File - -SOURCE=.\cdjpeg.c -# End Source File -# Begin Source File - -SOURCE=.\djpeg.c -# End Source File -# Begin Source File - -SOURCE=.\rdcolmap.c -# End Source File -# Begin Source File - -SOURCE=.\wrbmp.c -# End Source File -# Begin Source File - -SOURCE=.\wrgif.c -# End Source File -# Begin Source File - -SOURCE=.\wrppm.c -# End Source File -# Begin Source File - -SOURCE=.\wrrle.c -# End Source File -# Begin Source File - -SOURCE=.\wrtarga.c -# End Source File -# End Group -# Begin Group "Header-Dateien" - -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" -# Begin Source File - -SOURCE=.\cderror.h -# End Source File -# Begin Source File - -SOURCE=.\cdjpeg.h -# End Source File -# Begin Source File - -SOURCE=.\jconfig.h -# End Source File -# Begin Source File - -SOURCE=.\jerror.h -# End Source File -# Begin Source File - -SOURCE=.\jinclude.h -# End Source File -# Begin Source File - -SOURCE=.\jmorecfg.h -# End Source File -# Begin Source File - -SOURCE=.\jpeglib.h -# End Source File -# Begin Source File - -SOURCE=.\jversion.h -# End Source File -# End Group -# Begin Group "Ressourcendateien" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/thirdparty/jpeg-9e/makedfil.v16 b/thirdparty/jpeg-9e/makedfil.v16 deleted file mode 100644 index d190e15..0000000 --- a/thirdparty/jpeg-9e/makedfil.v16 +++ /dev/null @@ -1,69 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makedmak.vc6 b/thirdparty/jpeg-9e/makedmak.vc6 deleted file mode 100644 index e16487f..0000000 --- a/thirdparty/jpeg-9e/makedmak.vc6 +++ /dev/null @@ -1,159 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on djpeg.dsp -!IF "$(CFG)" == "" -CFG=djpeg - Win32 -!MESSAGE Keine Konfiguration angegeben. djpeg - Win32 wird als Standard verwendet. -!ENDIF - -!IF "$(CFG)" != "djpeg - Win32" -!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben. -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "djpeg.mak" CFG="djpeg - Win32" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "djpeg - Win32" (basierend auf "Win32 (x86) Console Application") -!MESSAGE -!ERROR Eine ungültige Konfiguration wurde angegeben. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -RSC=rc.exe -OUTDIR=.\djpeg\Release -INTDIR=.\djpeg\Release -# Begin Custom Macros -OutDir=.\djpeg\Release -# End Custom Macros - -ALL : "$(OUTDIR)\djpeg.exe" - - -CLEAN : - -@erase "$(INTDIR)\cdjpeg.obj" - -@erase "$(INTDIR)\djpeg.obj" - -@erase "$(INTDIR)\rdcolmap.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\wrbmp.obj" - -@erase "$(INTDIR)\wrgif.obj" - -@erase "$(INTDIR)\wrppm.obj" - -@erase "$(INTDIR)\wrrle.obj" - -@erase "$(INTDIR)\wrtarga.obj" - -@erase "$(OUTDIR)\djpeg.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\djpeg.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\djpeg.pdb" /machine:I386 /out:"$(OUTDIR)\djpeg.exe" -LINK32_OBJS= \ - "$(INTDIR)\cdjpeg.obj" \ - "$(INTDIR)\djpeg.obj" \ - "$(INTDIR)\rdcolmap.obj" \ - "$(INTDIR)\wrbmp.obj" \ - "$(INTDIR)\wrgif.obj" \ - "$(INTDIR)\wrppm.obj" \ - "$(INTDIR)\wrrle.obj" \ - "$(INTDIR)\wrtarga.obj" - -"$(OUTDIR)\djpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\djpeg.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("djpeg.dep") -!INCLUDE "djpeg.dep" -!ELSE -!MESSAGE Warning: cannot find "djpeg.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "djpeg - Win32" -SOURCE=.\cdjpeg.c - -"$(INTDIR)\cdjpeg.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\djpeg.c - -"$(INTDIR)\djpeg.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\rdcolmap.c - -"$(INTDIR)\rdcolmap.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\wrbmp.c - -"$(INTDIR)\wrbmp.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\wrgif.c - -"$(INTDIR)\wrgif.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\wrppm.c - -"$(INTDIR)\wrppm.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\wrrle.c - -"$(INTDIR)\wrrle.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\wrtarga.c - -"$(INTDIR)\wrtarga.obj" : $(SOURCE) "$(INTDIR)" - - - -!ENDIF - diff --git a/thirdparty/jpeg-9e/makedvcx.v16 b/thirdparty/jpeg-9e/makedvcx.v16 deleted file mode 100644 index 199bbf3..0000000 --- a/thirdparty/jpeg-9e/makedvcx.v16 +++ /dev/null @@ -1,195 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {11043137-B453-4DFA-9010-4D2B9DC1545C} - Win32Proj - djpeg - 10.0 - - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makedvcx.v17 b/thirdparty/jpeg-9e/makedvcx.v17 deleted file mode 100644 index 3745536..0000000 --- a/thirdparty/jpeg-9e/makedvcx.v17 +++ /dev/null @@ -1,195 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {11043137-B453-4DFA-9010-4D2B9DC1545C} - Win32Proj - djpeg - 10.0 - - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - - - - - - - - - - - - - - - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makefile.ansi b/thirdparty/jpeg-9e/makefile.ansi deleted file mode 100644 index 703882c..0000000 --- a/thirdparty/jpeg-9e/makefile.ansi +++ /dev/null @@ -1,226 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is suitable for Unix-like systems with ANSI-capable compilers. -# If you have a non-ANSI compiler, makefile.unix is a better starting point. - -# Read installation instructions before saying "make" !! - -# The name of your C compiler: -CC= cc - -# You may need to adjust these cc options: -CFLAGS= -O -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time cc options: -LDFLAGS= - -# To link any special libraries, add the necessary -l commands here. -LDLIBS= - -# Put here the object file name for the correct system-dependent memory -# manager file. For Unix this is usually jmemnobs.o, but you may want -# to use jmemansi.o or jmemname.o if you have limited swap space. -SYSDEPMEM= jmemnobs.o - -# miscellaneous OS-dependent stuff -# linker -LN= $(CC) -# file deletion command -RM= rm -f -# library (.a) file creation command -AR= ar rc -# second step in .a creation (use "touch" if not needed) -AR2= ranlib - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ - jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \ - coderules.txt filelist.txt cdaltui.txt change.log -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \ - jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \ - jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \ - jfdctflt.o jfdctint.o -# decompression library object files -DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \ - jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \ - jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \ - jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o -# These objectfiles are included in libjpeg.a -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ - cdjpeg.o -DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ - cdjpeg.o -TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o - - -all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom - -libjpeg.a: $(LIBOBJECTS) - $(RM) libjpeg.a - $(AR) libjpeg.a $(LIBOBJECTS) - $(AR2) libjpeg.a - -cjpeg: $(COBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS) - -djpeg: $(DOBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS) - -jpegtran: $(TROBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS) - -rdjpgcom: rdjpgcom.o - $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) - -wrjpgcom: wrjpgcom.o - $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) - -jconfig.h: jconfig.txt - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.txt. - exit 1 - -clean: - $(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom - $(RM) core testout* - -test: cjpeg djpeg jpegtran - $(RM) testout* - ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - ./djpeg -dct int -gif -outfile testout.gif testorig.jpg - ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - ./cjpeg -dct int -outfile testout.jpg testimg.ppm - ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - ./jpegtran -outfile testoutt.jpg testprog.jpg - cmp testimg.ppm testout.ppm - cmp testimg.gif testout.gif - cmp testimg.bmp testout.bmp - cmp testimg.jpg testout.jpg - cmp testimg.ppm testoutp.ppm - cmp testimgp.jpg testoutp.jpg - cmp testorig.jpg testoutt.jpg - - -jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/thirdparty/jpeg-9e/makefile.b32 b/thirdparty/jpeg-9e/makefile.b32 deleted file mode 100644 index 9812aee..0000000 --- a/thirdparty/jpeg-9e/makefile.b32 +++ /dev/null @@ -1,248 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is suitable for Borland C on MS-DOS. -# It works with Borland C++ 32-bit for DOS, revision 5.0 or later. -# Thanks to Tom Wright and Ge' Weijers (original DOS) and -# Joe Slater for adding 32-bit additions (needed for Borland -# revision 5.5). - -# Read installation instructions before saying "make" !! - -# The name of your C compiler: -CC= bcc32 - -# You may need to adjust these cc options: -CFLAGS= -O2 -w-par -w-stu -w-ccc -w-rch -w-aus -# -w-par suppresses warnings about unused function parameters -# -w-stu suppresses warnings about incomplete structures -# -w-ccc suppresses warnings about compile-time-constant conditions -# -w-rch suppresses warnings about unreachable code -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time cc options: -LDFLAGS= -# -lc case-significant link - -# Put here the object file name for the correct system-dependent memory -# manager file. -# SYSDEPMEMLIB must list the same files with "+" signs for the librarian. -SYSDEPMEM= jmemnobs.obj -SYSDEPMEMLIB= +jmemnobs.obj - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ - jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \ - coderules.txt filelist.txt cdaltui.txt change.log -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \ - jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \ - jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \ - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \ - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \ - jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \ - jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \ - jdmerge.obj -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj - - -all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.lib: $(LIBOBJECTS) - - del libjpeg.lib - tlib libjpeg.lib /E /C @&&| -+jcapimin.obj +jcapistd.obj +jcarith.obj +jctrans.obj +jcparam.obj & -+jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj & -+jcprepct.obj +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj & -+jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj & -+jdapistd.obj +jdarith.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj & -+jdinput.obj +jdmarker.obj +jdhuff.obj +jdmainct.obj +jdcoefct.obj & -+jdpostct.obj +jddctmgr.obj +jidctfst.obj +jidctflt.obj +jidctint.obj & -+jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj +jdmerge.obj & -+jaricom.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj & -$(SYSDEPMEMLIB) -| - -cjpeg.exe: $(COBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib - -djpeg.exe: $(DOBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib - -jpegtran.exe: $(TROBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) -ejpegtran.exe $(TROBJECTS) libjpeg.lib - -rdjpgcom.exe: rdjpgcom.c - $(CC) $(CFLAGS) rdjpgcom.c - -wrjpgcom.exe: wrjpgcom.c - $(CC) $(CFLAGS) wrjpgcom.c - -# This "{}" syntax allows Borland Make to "batch" source files. -# In this way, each run of the compiler can build many modules. -.c.obj: - $(CC) $(CFLAGS) -c{ $<} - -jconfig.h: jconfig.txt - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.txt. - exit 1 - -clean: - - del *.obj - - del libjpeg.lib - - del cjpeg.exe - - del djpeg.exe - - del jpegtran.exe - - del rdjpgcom.exe - - del wrjpgcom.exe - - del testout*.* - -test: cjpeg.exe djpeg.exe jpegtran.exe - - del testout*.* - djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - djpeg -dct int -gif -outfile testout.gif testorig.jpg - djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - cjpeg -dct int -outfile testout.jpg testimg.ppm - djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - jpegtran -outfile testoutt.jpg testprog.jpg - echo n > n.tmp - comp testimg.ppm testout.ppm < n.tmp - comp testimg.gif testout.gif < n.tmp - comp testimg.bmp testout.bmp < n.tmp - comp testimg.jpg testout.jpg < n.tmp - comp testimg.ppm testoutp.ppm < n.tmp - comp testimgp.jpg testoutp.jpg < n.tmp - comp testorig.jpg testoutt.jpg < n.tmp - del n.tmp - - -jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -jmemdosa.obj: jmemdosa.asm - tasm /mx jmemdosa.asm diff --git a/thirdparty/jpeg-9e/makefile.bcc b/thirdparty/jpeg-9e/makefile.bcc deleted file mode 100644 index 237a3e6..0000000 --- a/thirdparty/jpeg-9e/makefile.bcc +++ /dev/null @@ -1,298 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is suitable for Borland C on MS-DOS or OS/2. -# It works with Borland C++ for DOS, revision 3.0 or later, -# and has been tested with Borland C++ for OS/2. -# Watch out for optimization bugs in the OS/2 compilers --- see notes below! -# Thanks to Tom Wright and Ge' Weijers (original DOS) and -# Ken Porter (OS/2) for this file. - -# Read installation instructions before saying "make" !! - -# Are we under DOS or OS/2? -!if !$d(DOS) && !$d(OS2) -!if $d(__OS2__) -OS2=1 -!else -DOS=1 -!endif -!endif - -# The name of your C compiler: -CC= bcc - -# You may need to adjust these cc options: -!if $d(DOS) -CFLAGS= -O2 -mm -w-par -w-stu -w-ccc -w-rch -!else -CFLAGS= -O1 -w-par -w-stu -w-ccc -w-rch -!endif -# -O2 enables full code optimization (for pre-3.0 Borland C++, use -O -G -Z). -# -O2 is buggy in Borland OS/2 C++ revision 2.0, so use -O1 there for now. -# If you have Borland OS/2 C++ revision 1.0, use -O or no optimization at all. -# -mm selects medium memory model (near data, far code pointers; DOS only!) -# -w-par suppresses warnings about unused function parameters -# -w-stu suppresses warnings about incomplete structures -# -w-ccc suppresses warnings about compile-time-constant conditions -# -w-rch suppresses warnings about unreachable code -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time cc options: -!if $d(DOS) -LDFLAGS= -mm -# memory model option here must match CFLAGS! -!else -LDFLAGS= -# -lai full-screen app -# -lc case-significant link -!endif - -# Put here the object file name for the correct system-dependent memory -# manager file. -# For DOS, we recommend jmemdos.c and jmemdosa.asm. -# For OS/2, we recommend jmemnobs.c (flat memory!) -# SYSDEPMEMLIB must list the same files with "+" signs for the librarian. -!if $d(DOS) -SYSDEPMEM= jmemdos.obj jmemdosa.obj -SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj -!else -SYSDEPMEM= jmemnobs.obj -SYSDEPMEMLIB= +jmemnobs.obj -!endif - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ - jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \ - coderules.txt filelist.txt cdaltui.txt change.log -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \ - jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \ - jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \ - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \ - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \ - jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \ - jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \ - jdmerge.obj -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj - - -all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.lib: $(LIBOBJECTS) - - del libjpeg.lib - tlib libjpeg.lib /E /C @&&| -+jcapimin.obj +jcapistd.obj +jcarith.obj +jctrans.obj +jcparam.obj & -+jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj & -+jcprepct.obj +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj & -+jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj & -+jdapistd.obj +jdarith.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj & -+jdinput.obj +jdmarker.obj +jdhuff.obj +jdmainct.obj +jdcoefct.obj & -+jdpostct.obj +jddctmgr.obj +jidctfst.obj +jidctflt.obj +jidctint.obj & -+jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj +jdmerge.obj & -+jaricom.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj & -$(SYSDEPMEMLIB) -| - -cjpeg.exe: $(COBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib - -djpeg.exe: $(DOBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib - -jpegtran.exe: $(TROBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) -ejpegtran.exe $(TROBJECTS) libjpeg.lib - -rdjpgcom.exe: rdjpgcom.c -!if $d(DOS) - $(CC) -ms -O rdjpgcom.c -!else - $(CC) $(CFLAGS) rdjpgcom.c -!endif - -# On DOS, wrjpgcom needs large model so it can malloc a 64K chunk -wrjpgcom.exe: wrjpgcom.c -!if $d(DOS) - $(CC) -ml -O wrjpgcom.c -!else - $(CC) $(CFLAGS) wrjpgcom.c -!endif - -# This "{}" syntax allows Borland Make to "batch" source files. -# In this way, each run of the compiler can build many modules. -.c.obj: - $(CC) $(CFLAGS) -c{ $<} - -jconfig.h: jconfig.txt - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.txt. - exit 1 - -clean: - - del *.obj - - del libjpeg.lib - - del cjpeg.exe - - del djpeg.exe - - del jpegtran.exe - - del rdjpgcom.exe - - del wrjpgcom.exe - - del testout*.* - -test: cjpeg.exe djpeg.exe jpegtran.exe - - del testout*.* - djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - djpeg -dct int -gif -outfile testout.gif testorig.jpg - djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - cjpeg -dct int -outfile testout.jpg testimg.ppm - djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - jpegtran -outfile testoutt.jpg testprog.jpg -!if $d(DOS) - fc /b testimg.ppm testout.ppm - fc /b testimg.gif testout.gif - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg -!else - echo n > n.tmp - comp testimg.ppm testout.ppm < n.tmp - comp testimg.gif testout.gif < n.tmp - comp testimg.bmp testout.bmp < n.tmp - comp testimg.jpg testout.jpg < n.tmp - comp testimg.ppm testoutp.ppm < n.tmp - comp testimgp.jpg testoutp.jpg < n.tmp - comp testorig.jpg testoutt.jpg < n.tmp - del n.tmp -!endif - - -jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -jmemdosa.obj: jmemdosa.asm - tasm /mx jmemdosa.asm diff --git a/thirdparty/jpeg-9e/makefile.dj b/thirdparty/jpeg-9e/makefile.dj deleted file mode 100644 index 9d205f0..0000000 --- a/thirdparty/jpeg-9e/makefile.dj +++ /dev/null @@ -1,232 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is for DJGPP (Delorie's GNU C port on MS-DOS), v2.0 or later. -# Thanks to Frank J. Donahoe for this version. - -# Read installation instructions before saying "make" !! - -# The name of your C compiler: -CC= gcc - -# You may need to adjust these cc options: -CFLAGS= -O2 -Wall -I. -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time cc options: -LDFLAGS= -s - -# To link any special libraries, add the necessary -l commands here. -LDLIBS= - -# Put here the object file name for the correct system-dependent memory -# manager file. For DJGPP this is usually jmemnobs.o, but you could -# use jmemname.o if you want to use named temp files instead of swap space. -SYSDEPMEM= jmemnobs.o - -# miscellaneous OS-dependent stuff -# linker -LN= $(CC) -# file deletion command -RM= rm -# library (.a) file creation command -AR= ar rc -# second step in .a creation (use "touch" if not needed) -AR2= ranlib - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ - jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \ - coderules.txt filelist.txt cdaltui.txt change.log -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \ - jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \ - jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \ - jfdctflt.o jfdctint.o -# decompression library object files -DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \ - jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \ - jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \ - jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o -# These objectfiles are included in libjpeg.a -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ - cdjpeg.o -DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ - cdjpeg.o -TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o - - -all: libjpeg.a cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.a: $(LIBOBJECTS) - $(RM) libjpeg.a - $(AR) libjpeg.a $(LIBOBJECTS) - $(AR2) libjpeg.a - -cjpeg.exe: $(COBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o cjpeg.exe $(COBJECTS) libjpeg.a $(LDLIBS) - -djpeg.exe: $(DOBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o djpeg.exe $(DOBJECTS) libjpeg.a $(LDLIBS) - -jpegtran.exe: $(TROBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o jpegtran.exe $(TROBJECTS) libjpeg.a $(LDLIBS) - -rdjpgcom.exe: rdjpgcom.o - $(LN) $(LDFLAGS) -o rdjpgcom.exe rdjpgcom.o $(LDLIBS) - -wrjpgcom.exe: wrjpgcom.o - $(LN) $(LDFLAGS) -o wrjpgcom.exe wrjpgcom.o $(LDLIBS) - -jconfig.h: jconfig.txt - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.txt. - exit 1 - -clean: - $(RM) *.o - $(RM) cjpeg.exe - $(RM) djpeg.exe - $(RM) jpegtran.exe - $(RM) rdjpgcom.exe - $(RM) wrjpgcom.exe - $(RM) libjpeg.a - $(RM) testout*.* - -test: cjpeg.exe djpeg.exe jpegtran.exe - $(RM) testout*.* - ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - ./djpeg -dct int -gif -outfile testout.gif testorig.jpg - ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - ./cjpeg -dct int -outfile testout.jpg testimg.ppm - ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - ./jpegtran -outfile testoutt.jpg testprog.jpg - fc /b testimg.ppm testout.ppm - fc /b testimg.gif testout.gif - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg - - -jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/thirdparty/jpeg-9e/makefile.manx b/thirdparty/jpeg-9e/makefile.manx deleted file mode 100644 index 87e92b1..0000000 --- a/thirdparty/jpeg-9e/makefile.manx +++ /dev/null @@ -1,226 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is for Amiga systems using Manx Aztec C ver 5.x. -# Thanks to D.J. James (djjames@cup.portal.com) for this version. - -# Read installation instructions before saying "make" !! - -# The name of your C compiler: -CC= cc - -# You may need to adjust these cc options: -# Uncomment for generic 68000 code (will work on any Amiga) -ARCHFLAGS= -sn - -# Uncomment for 68020/68030 code (faster, but won't run on 68000 CPU) -#ARCHFLAGS= -c2 - -CFLAGS= -MC -MD $(ARCHFLAGS) -spfam -r4 - -# Link-time cc options: -LDFLAGS= -g - -# To link any special libraries, add the necessary -l commands here. -LDLIBS= -lml -lcl - -# Put here the object file name for the correct system-dependent memory -# manager file. For Amiga we recommend jmemname.o. -SYSDEPMEM= jmemname.o - -# miscellaneous OS-dependent stuff -# linker -LN= ln -# file deletion command -RM= delete quiet -# library (.lib) file creation command -AR= lb - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ - jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \ - coderules.txt filelist.txt cdaltui.txt change.log -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \ - jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \ - jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \ - jfdctflt.o jfdctint.o -# decompression library object files -DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \ - jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \ - jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \ - jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ - cdjpeg.o -DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ - cdjpeg.o -TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o - - -all: libjpeg.lib cjpeg djpeg jpegtran rdjpgcom wrjpgcom - -libjpeg.lib: $(LIBOBJECTS) - -$(RM) libjpeg.lib - $(AR) libjpeg.lib $(LIBOBJECTS) - -cjpeg: $(COBJECTS) libjpeg.lib - $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.lib $(LDLIBS) - -djpeg: $(DOBJECTS) libjpeg.lib - $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.lib $(LDLIBS) - -jpegtran: $(TROBJECTS) libjpeg.lib - $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.lib $(LDLIBS) - -rdjpgcom: rdjpgcom.o - $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) - -wrjpgcom: wrjpgcom.o - $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) - -jconfig.h: jconfig.txt - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.txt. - exit 1 - -clean: - -$(RM) *.o cjpeg djpeg jpegtran libjpeg.lib rdjpgcom wrjpgcom - -$(RM) core testout*.* - -test: cjpeg djpeg jpegtran - -$(RM) testout*.* - djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - djpeg -dct int -gif -outfile testout.gif testorig.jpg - djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - cjpeg -dct int -outfile testout.jpg testimg.ppm - djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - jpegtran -outfile testoutt.jpg testprog.jpg - cmp testimg.ppm testout.ppm - cmp testimg.gif testout.gif - cmp testimg.bmp testout.bmp - cmp testimg.jpg testout.jpg - cmp testimg.ppm testoutp.ppm - cmp testimgp.jpg testoutp.jpg - cmp testorig.jpg testoutt.jpg - - -jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/thirdparty/jpeg-9e/makefile.mc6 b/thirdparty/jpeg-9e/makefile.mc6 deleted file mode 100644 index 0419134..0000000 --- a/thirdparty/jpeg-9e/makefile.mc6 +++ /dev/null @@ -1,261 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is for Microsoft C for MS-DOS, version 6.00A and up. -# Use NMAKE, not Microsoft's brain-damaged MAKE. -# Thanks to Alan Wright and Chris Turner of Olivetti Research Ltd. - -# Read installation instructions before saying "nmake" !! - -# You may need to adjust these compiler options: -CFLAGS = -AM -Oecigt -Gs -W3 -# -AM medium memory model (or use -AS for small model, if you remove features) -# -Oecigt -Gs maximum safe optimisation (-Ol has bugs in MSC 6.00A) -# -W3 warning level 3 -# You might also want to add -G2 if you have an 80286, etc. -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Jan-Herman Buining suggests the following switches for MS C 8.0 and a 486: -# CFLAGS = /AM /f- /FPi87 /G3 /Gs /Gy /Ob1 /Oc /Oe /Og /Oi /Ol /On /Oo /Ot \ -# /OV4 /W3 -# except for jquant1.c, which must be compiled with /Oo- to avoid a compiler -# crash. - -# Ingar Steinsland suggests the following switches when building -# a 16-bit Windows DLL: -# CFLAGS = -ALw -Gsw -Zpe -W3 -O2 -Zi -Zd - -# Put here the object file name for the correct system-dependent memory -# manager file. For DOS, we recommend jmemdos.c and jmemdosa.asm. -# (But not for Windows; see install.txt if you use this makefile for Windows.) -SYSDEPMEM= jmemdos.obj jmemdosa.obj -# SYSDEPMEMLIB must list the same files with "+" signs for the librarian. -SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ - jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \ - coderules.txt filelist.txt cdaltui.txt change.log -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \ - jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \ - jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \ - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \ - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \ - jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \ - jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \ - jdmerge.obj -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj - -# need linker response file because file list > 128 chars -RFILE = libjpeg.ans - - -all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.lib: $(LIBOBJECTS) $(RFILE) - del libjpeg.lib - lib @$(RFILE) - -# linker response file for building libjpeg.lib -$(RFILE) : makefile - del $(RFILE) - echo libjpeg.lib >$(RFILE) -# silly want-to-create-it prompt: - echo y >>$(RFILE) - echo +jcapimin.obj +jcapistd.obj +jcarith.obj +jctrans.obj & >>$(RFILE) - echo +jcparam.obj +jdatadst.obj +jcinit.obj +jcmaster.obj & >>$(RFILE) - echo +jcmarker.obj +jcmainct.obj +jcprepct.obj & >>$(RFILE) - echo +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj & >>$(RFILE) - echo +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj & >>$(RFILE) - echo +jfdctint.obj +jdapimin.obj +jdapistd.obj & >>$(RFILE) - echo +jdarith.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj & >>$(RFILE) - echo +jdinput.obj +jdmarker.obj +jdhuff.obj +jdmainct.obj & >>$(RFILE) - echo +jdcoefct.obj +jdpostct.obj +jddctmgr.obj & >>$(RFILE) - echo +jidctfst.obj +jidctflt.obj +jidctint.obj & >>$(RFILE) - echo +jdsample.obj +jdcolor.obj +jquant1.obj & >>$(RFILE) - echo +jquant2.obj +jdmerge.obj +jaricom.obj +jcomapi.obj & >>$(RFILE) - echo +jutils.obj +jerror.obj +jmemmgr.obj & >>$(RFILE) - echo $(SYSDEPMEMLIB) ; >>$(RFILE) - -cjpeg.exe: $(COBJECTS) libjpeg.lib - echo $(COBJECTS) >cjpeg.lst - link /STACK:4096 /EXEPACK @cjpeg.lst, cjpeg.exe, , libjpeg.lib, ; - del cjpeg.lst - -djpeg.exe: $(DOBJECTS) libjpeg.lib - echo $(DOBJECTS) >djpeg.lst - link /STACK:4096 /EXEPACK @djpeg.lst, djpeg.exe, , libjpeg.lib, ; - del djpeg.lst - -jpegtran.exe: $(TROBJECTS) libjpeg.lib - link /STACK:4096 /EXEPACK $(TROBJECTS), jpegtran.exe, , libjpeg.lib, ; - -rdjpgcom.exe: rdjpgcom.c - $(CC) -AS -O -W3 rdjpgcom.c - -# wrjpgcom needs large model so it can malloc a 64K chunk -wrjpgcom.exe: wrjpgcom.c - $(CC) -AL -O -W3 wrjpgcom.c - -jconfig.h: jconfig.txt - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.txt. - exit 1 - -clean: - del *.obj - del libjpeg.lib - del cjpeg.exe - del djpeg.exe - del jpegtran.exe - del rdjpgcom.exe - del wrjpgcom.exe - del testout*.* - -test: cjpeg.exe djpeg.exe jpegtran.exe - del testout*.* - djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - djpeg -dct int -gif -outfile testout.gif testorig.jpg - djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - cjpeg -dct int -outfile testout.jpg testimg.ppm - djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - jpegtran -outfile testoutt.jpg testprog.jpg - fc /b testimg.ppm testout.ppm - fc /b testimg.gif testout.gif - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg - - -jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -jmemdosa.obj : jmemdosa.asm - masm /mx $*; diff --git a/thirdparty/jpeg-9e/makefile.mms b/thirdparty/jpeg-9e/makefile.mms deleted file mode 100644 index 1a64028..0000000 --- a/thirdparty/jpeg-9e/makefile.mms +++ /dev/null @@ -1,230 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is for use with MMS on Digital VMS systems. -# Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu) -# and Tim Bell (tbell@netcom.com) for their help. - -# Read installation instructions before saying "MMS" !! - -# You may need to adjust these cc options: -CFLAGS= $(CFLAGS) /NoDebug /Optimize -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via /Define switches here. -.ifdef ALPHA -OPT= -.else -OPT= ,Sys$Disk:[]MAKVMS.OPT/Option -.endif - -# Put here the object file name for the correct system-dependent memory -# manager file. For Unix this is usually jmemnobs.o, but you may want -# to use jmemansi.o or jmemname.o if you have limited swap space. -SYSDEPMEM= jmemnobs.obj - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ - jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \ - coderules.txt filelist.txt cdaltui.txt change.log -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \ - jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \ - jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \ - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \ - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \ - jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \ - jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \ - jdmerge.obj -# These objectfiles are included in libjpeg.olb -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj -# objectfile lists with commas --- what a crock -COBJLIST= cjpeg.obj,rdppm.obj,rdgif.obj,rdtarga.obj,rdrle.obj,rdbmp.obj,\ - rdswitch.obj,cdjpeg.obj -DOBJLIST= djpeg.obj,wrppm.obj,wrgif.obj,wrtarga.obj,wrrle.obj,wrbmp.obj,\ - rdcolmap.obj,cdjpeg.obj -TROBJLIST= jpegtran.obj,rdswitch.obj,cdjpeg.obj,transupp.obj -LIBOBJLIST= jaricom.obj,jcapimin.obj,jcapistd.obj,jcarith.obj,jctrans.obj,\ - jcparam.obj,jdatadst.obj,jcinit.obj,jcmaster.obj,jcmarker.obj,\ - jcmainct.obj,jcprepct.obj,jccoefct.obj,jccolor.obj,jcsample.obj,\ - jchuff.obj,jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj,jfdctint.obj,\ - jdapimin.obj,jdapistd.obj,jdarith.obj,jdtrans.obj,jdatasrc.obj,\ - jdmaster.obj,jdinput.obj,jdmarker.obj,jdhuff.obj,jdmainct.obj,\ - jdcoefct.obj,jdpostct.obj,jddctmgr.obj,jidctfst.obj,jidctflt.obj,\ - jidctint.obj,jdsample.obj,jdcolor.obj,jquant1.obj,jquant2.obj,\ - jdmerge.obj,jcomapi.obj,jutils.obj,jerror.obj,jmemmgr.obj,$(SYSDEPMEM) - - -.first - @- Define /NoLog Sys Sys$Library - -ALL : libjpeg.olb cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - @ Continue - -libjpeg.olb : $(LIBOBJECTS) - Library /Create libjpeg.olb $(LIBOBJLIST) - -cjpeg.exe : $(COBJECTS) libjpeg.olb - $(LINK) $(LFLAGS) /Executable = cjpeg.exe $(COBJLIST),libjpeg.olb/Library$(OPT) - -djpeg.exe : $(DOBJECTS) libjpeg.olb - $(LINK) $(LFLAGS) /Executable = djpeg.exe $(DOBJLIST),libjpeg.olb/Library$(OPT) - -jpegtran.exe : $(TROBJECTS) libjpeg.olb - $(LINK) $(LFLAGS) /Executable = jpegtran.exe $(TROBJLIST),libjpeg.olb/Library$(OPT) - -rdjpgcom.exe : rdjpgcom.obj - $(LINK) $(LFLAGS) /Executable = rdjpgcom.exe rdjpgcom.obj$(OPT) - -wrjpgcom.exe : wrjpgcom.obj - $(LINK) $(LFLAGS) /Executable = wrjpgcom.exe wrjpgcom.obj$(OPT) - -jconfig.h : jconfig.vms - @- Copy jconfig.vms jconfig.h - -clean : - @- Set Protection = Owner:RWED *.*;-1 - @- Set Protection = Owner:RWED *.OBJ - - Purge /NoLog /NoConfirm *.* - - Delete /NoLog /NoConfirm *.OBJ; - -test : cjpeg.exe djpeg.exe jpegtran.exe - mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - mcr sys$disk:[]djpeg -dct int -gif -outfile testout.gif testorig.jpg - mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm - mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg - - Backup /Compare/Log testimg.ppm testout.ppm - - Backup /Compare/Log testimg.gif testout.gif - - Backup /Compare/Log testimg.bmp testout.bmp - - Backup /Compare/Log testimg.jpg testout.jpg - - Backup /Compare/Log testimg.ppm testoutp.ppm - - Backup /Compare/Log testimgp.jpg testoutp.jpg - - Backup /Compare/Log testorig.jpg testoutt.jpg - - -jaricom.obj : jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapimin.obj : jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj : jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcarith.obj : jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcinit.obj : jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcprepct.obj : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj : jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj : jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj : jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdarith.obj : jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdinput.obj : jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdpostct.obj : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj : jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj : jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj : jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj : rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj : wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj : cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj : rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj : transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/thirdparty/jpeg-9e/makefile.sas b/thirdparty/jpeg-9e/makefile.sas deleted file mode 100644 index f1a82cb..0000000 --- a/thirdparty/jpeg-9e/makefile.sas +++ /dev/null @@ -1,264 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is for Amiga systems using SAS C 6.0 and up. -# Thanks to Ed Hanway, Mark Rinfret, and Jim Zepeda. - -# Read installation instructions before saying "make" !! - -# The name of your C compiler: -CC= sc - -# You may need to adjust these cc options: -# Uncomment the following lines for generic 680x0 version -ARCHFLAGS= cpu=any -SUFFIX= - -# Uncomment the following lines for 68030-only version -#ARCHFLAGS= cpu=68030 -#SUFFIX=.030 - -CFLAGS= nostackcheck data=near parms=register optimize $(ARCHFLAGS) \ - ignore=104 ignore=304 ignore=306 -# ignore=104 disables warnings for mismatched const qualifiers -# ignore=304 disables warnings for variables being optimized out -# ignore=306 disables warnings for the inlining of functions -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via define switches here. - -# Link-time cc options: -LDFLAGS= SC SD ND BATCH - -# To link any special libraries, add the necessary commands here. -LDLIBS= LIB:scm.lib LIB:sc.lib - -# Put here the object file name for the correct system-dependent memory -# manager file. For Amiga we recommend jmemname.o. -SYSDEPMEM= jmemname.o - -# miscellaneous OS-dependent stuff -# linker -LN= slink -# file deletion command -RM= delete quiet -# library (.lib) file creation command -AR= oml - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ - jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \ - coderules.txt filelist.txt cdaltui.txt change.log -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \ - jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \ - jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \ - jfdctflt.o jfdctint.o -# decompression library object files -DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \ - jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \ - jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \ - jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ - cdjpeg.o -DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ - cdjpeg.o -TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o - - -all: libjpeg.lib cjpeg$(SUFFIX) djpeg$(SUFFIX) jpegtran$(SUFFIX) rdjpgcom$(SUFFIX) wrjpgcom$(SUFFIX) - -# note: do several AR steps to avoid command line length limitations - -libjpeg.lib: $(LIBOBJECTS) - -$(RM) libjpeg.lib - $(AR) libjpeg.lib r $(CLIBOBJECTS) - $(AR) libjpeg.lib r $(DLIBOBJECTS) - $(AR) libjpeg.lib r $(COMOBJECTS) - -cjpeg$(SUFFIX): $(COBJECTS) libjpeg.lib - $(LN) - -# You may want to adjust these compiler options: -CFLAGS= $(cflags) $(cdebug) $(cvars) -I. -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time options: -LDFLAGS= $(ldebug) $(conlflags) - -# To link any special libraries, add the necessary commands here. -LDLIBS= $(conlibs) - -# Put here the object file name for the correct system-dependent memory -# manager file. For NT we suggest jmemnobs.obj, which expects the OS to -# provide adequate virtual memory. -SYSDEPMEM= jmemnobs.obj - -# miscellaneous OS-dependent stuff -# file deletion command -RM= del - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ - jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \ - coderules.txt filelist.txt cdaltui.txt change.log -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \ - jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \ - jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \ - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \ - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \ - jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \ - jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \ - jdmerge.obj -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj - -# Template command for compiling .c to .obj -.c.obj: - $(cc) $(CFLAGS) $*.c - - -all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.lib: $(LIBOBJECTS) - $(RM) libjpeg.lib - lib -out:libjpeg.lib $(LIBOBJECTS) - -cjpeg.exe: $(COBJECTS) libjpeg.lib - $(link) $(LDFLAGS) -out:cjpeg.exe $(COBJECTS) libjpeg.lib $(LDLIBS) - -djpeg.exe: $(DOBJECTS) libjpeg.lib - $(link) $(LDFLAGS) -out:djpeg.exe $(DOBJECTS) libjpeg.lib $(LDLIBS) - -jpegtran.exe: $(TROBJECTS) libjpeg.lib - $(link) $(LDFLAGS) -out:jpegtran.exe $(TROBJECTS) libjpeg.lib $(LDLIBS) - -rdjpgcom.exe: rdjpgcom.obj - $(link) $(LDFLAGS) -out:rdjpgcom.exe rdjpgcom.obj $(LDLIBS) - -wrjpgcom.exe: wrjpgcom.obj - $(link) $(LDFLAGS) -out:wrjpgcom.exe wrjpgcom.obj $(LDLIBS) - - -clean: - $(RM) *.obj *.exe libjpeg.lib - $(RM) testout* - -setup-vc6: - ren jconfig.vc jconfig.h - ren makejdsw.vc6 jpeg.dsw - ren makeadsw.vc6 apps.dsw - ren makejmak.vc6 jpeg.mak - ren makejdep.vc6 jpeg.dep - ren makejdsp.vc6 jpeg.dsp - ren makecmak.vc6 cjpeg.mak - ren makecdep.vc6 cjpeg.dep - ren makecdsp.vc6 cjpeg.dsp - ren makedmak.vc6 djpeg.mak - ren makeddep.vc6 djpeg.dep - ren makeddsp.vc6 djpeg.dsp - ren maketmak.vc6 jpegtran.mak - ren maketdep.vc6 jpegtran.dep - ren maketdsp.vc6 jpegtran.dsp - ren makermak.vc6 rdjpgcom.mak - ren makerdep.vc6 rdjpgcom.dep - ren makerdsp.vc6 rdjpgcom.dsp - ren makewmak.vc6 wrjpgcom.mak - ren makewdep.vc6 wrjpgcom.dep - ren makewdsp.vc6 wrjpgcom.dsp - -setupcopy-vc6: - copy /y jconfig.vc jconfig.h - copy /y makejdsw.vc6 jpeg.dsw - copy /y makeadsw.vc6 apps.dsw - copy /y makejmak.vc6 jpeg.mak - copy /y makejdep.vc6 jpeg.dep - copy /y makejdsp.vc6 jpeg.dsp - copy /y makecmak.vc6 cjpeg.mak - copy /y makecdep.vc6 cjpeg.dep - copy /y makecdsp.vc6 cjpeg.dsp - copy /y makedmak.vc6 djpeg.mak - copy /y makeddep.vc6 djpeg.dep - copy /y makeddsp.vc6 djpeg.dsp - copy /y maketmak.vc6 jpegtran.mak - copy /y maketdep.vc6 jpegtran.dep - copy /y maketdsp.vc6 jpegtran.dsp - copy /y makermak.vc6 rdjpgcom.mak - copy /y makerdep.vc6 rdjpgcom.dep - copy /y makerdsp.vc6 rdjpgcom.dsp - copy /y makewmak.vc6 wrjpgcom.mak - copy /y makewdep.vc6 wrjpgcom.dep - copy /y makewdsp.vc6 wrjpgcom.dsp - -setup-v16: - ren jconfig.vc jconfig.h - ren makejsln.v16 jpeg.sln - ren makeasln.v16 apps.sln - ren makejvcx.v16 jpeg.vcxproj - ren makejfil.v16 jpeg.vcxproj.filters - ren makecvcx.v16 cjpeg.vcxproj - ren makecfil.v16 cjpeg.vcxproj.filters - ren makedvcx.v16 djpeg.vcxproj - ren makedfil.v16 djpeg.vcxproj.filters - ren maketvcx.v16 jpegtran.vcxproj - ren maketfil.v16 jpegtran.vcxproj.filters - ren makervcx.v16 rdjpgcom.vcxproj - ren makerfil.v16 rdjpgcom.vcxproj.filters - ren makewvcx.v16 wrjpgcom.vcxproj - ren makewfil.v16 wrjpgcom.vcxproj.filters - -setupcopy-v16: - copy /y jconfig.vc jconfig.h - copy /y makejsln.v16 jpeg.sln - copy /y makeasln.v16 apps.sln - copy /y makejvcx.v16 jpeg.vcxproj - copy /y makejfil.v16 jpeg.vcxproj.filters - copy /y makecvcx.v16 cjpeg.vcxproj - copy /y makecfil.v16 cjpeg.vcxproj.filters - copy /y makedvcx.v16 djpeg.vcxproj - copy /y makedfil.v16 djpeg.vcxproj.filters - copy /y maketvcx.v16 jpegtran.vcxproj - copy /y maketfil.v16 jpegtran.vcxproj.filters - copy /y makervcx.v16 rdjpgcom.vcxproj - copy /y makerfil.v16 rdjpgcom.vcxproj.filters - copy /y makewvcx.v16 wrjpgcom.vcxproj - copy /y makewfil.v16 wrjpgcom.vcxproj.filters - -setup-v17: - ren jconfig.vc jconfig.h - ren makejsln.v16 jpeg.sln - ren makeasln.v16 apps.sln - ren makejvcx.v17 jpeg.vcxproj - ren makejfil.v16 jpeg.vcxproj.filters - ren makecvcx.v17 cjpeg.vcxproj - ren makecfil.v16 cjpeg.vcxproj.filters - ren makedvcx.v17 djpeg.vcxproj - ren makedfil.v16 djpeg.vcxproj.filters - ren maketvcx.v17 jpegtran.vcxproj - ren maketfil.v16 jpegtran.vcxproj.filters - ren makervcx.v17 rdjpgcom.vcxproj - ren makerfil.v16 rdjpgcom.vcxproj.filters - ren makewvcx.v17 wrjpgcom.vcxproj - ren makewfil.v16 wrjpgcom.vcxproj.filters - -setupcopy-v17: - copy /y jconfig.vc jconfig.h - copy /y makejsln.v16 jpeg.sln - copy /y makeasln.v16 apps.sln - copy /y makejvcx.v17 jpeg.vcxproj - copy /y makejfil.v16 jpeg.vcxproj.filters - copy /y makecvcx.v17 cjpeg.vcxproj - copy /y makecfil.v16 cjpeg.vcxproj.filters - copy /y makedvcx.v17 djpeg.vcxproj - copy /y makedfil.v16 djpeg.vcxproj.filters - copy /y maketvcx.v17 jpegtran.vcxproj - copy /y maketfil.v16 jpegtran.vcxproj.filters - copy /y makervcx.v17 rdjpgcom.vcxproj - copy /y makerfil.v16 rdjpgcom.vcxproj.filters - copy /y makewvcx.v17 wrjpgcom.vcxproj - copy /y makewfil.v16 wrjpgcom.vcxproj.filters - -test: - IF EXIST testout* $(RM) testout* - .\djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - .\djpeg -dct int -gif -outfile testout.gif testorig.jpg - .\djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - .\cjpeg -dct int -outfile testout.jpg testimg.ppm - .\djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - .\cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - .\jpegtran -outfile testoutt.jpg testprog.jpg - fc /b testimg.ppm testout.ppm - fc /b testimg.gif testout.gif - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg - -test-build: - IF EXIST .\Release\testout* $(RM) .\Release\testout* - .\Release\djpeg -dct int -ppm -outfile .\Release\testout.ppm testorig.jpg - .\Release\djpeg -dct int -gif -outfile .\Release\testout.gif testorig.jpg - .\Release\djpeg -dct int -bmp -colors 256 -outfile .\Release\testout.bmp testorig.jpg - .\Release\cjpeg -dct int -outfile .\Release\testout.jpg testimg.ppm - .\Release\djpeg -dct int -ppm -outfile .\Release\testoutp.ppm testprog.jpg - .\Release\cjpeg -dct int -progressive -opt -outfile .\Release\testoutp.jpg testimg.ppm - .\Release\jpegtran -outfile .\Release\testoutt.jpg testprog.jpg - fc /b testimg.ppm .\Release\testout.ppm - fc /b testimg.gif .\Release\testout.gif - fc /b testimg.bmp .\Release\testout.bmp - fc /b testimg.jpg .\Release\testout.jpg - fc /b testimg.ppm .\Release\testoutp.ppm - fc /b testimgp.jpg .\Release\testoutp.jpg - fc /b testorig.jpg .\Release\testoutt.jpg - -test-32: - IF EXIST .\Release\testout* $(RM) .\Release\testout* - .\Release\Win32\djpeg -dct int -ppm -outfile .\Release\testout.ppm testorig.jpg - .\Release\Win32\djpeg -dct int -gif -outfile .\Release\testout.gif testorig.jpg - .\Release\Win32\djpeg -dct int -bmp -colors 256 -outfile .\Release\testout.bmp testorig.jpg - .\Release\Win32\cjpeg -dct int -outfile .\Release\testout.jpg testimg.ppm - .\Release\Win32\djpeg -dct int -ppm -outfile .\Release\testoutp.ppm testprog.jpg - .\Release\Win32\cjpeg -dct int -progressive -opt -outfile .\Release\testoutp.jpg testimg.ppm - .\Release\Win32\jpegtran -outfile .\Release\testoutt.jpg testprog.jpg - fc /b testimg.ppm .\Release\testout.ppm - fc /b testimg.gif .\Release\testout.gif - fc /b testimg.bmp .\Release\testout.bmp - fc /b testimg.jpg .\Release\testout.jpg - fc /b testimg.ppm .\Release\testoutp.ppm - fc /b testimgp.jpg .\Release\testoutp.jpg - fc /b testorig.jpg .\Release\testoutt.jpg - -test-64: - IF EXIST .\Release\testout* $(RM) .\Release\testout* - .\Release\x64\djpeg -dct int -ppm -outfile .\Release\testout.ppm testorig.jpg - .\Release\x64\djpeg -dct int -gif -outfile .\Release\testout.gif testorig.jpg - .\Release\x64\djpeg -dct int -bmp -colors 256 -outfile .\Release\testout.bmp testorig.jpg - .\Release\x64\cjpeg -dct int -outfile .\Release\testout.jpg testimg.ppm - .\Release\x64\djpeg -dct int -ppm -outfile .\Release\testoutp.ppm testprog.jpg - .\Release\x64\cjpeg -dct int -progressive -opt -outfile .\Release\testoutp.jpg testimg.ppm - .\Release\x64\jpegtran -outfile .\Release\testoutt.jpg testprog.jpg - fc /b testimg.ppm .\Release\testout.ppm - fc /b testimg.gif .\Release\testout.gif - fc /b testimg.bmp .\Release\testout.bmp - fc /b testimg.jpg .\Release\testout.jpg - fc /b testimg.ppm .\Release\testoutp.ppm - fc /b testimgp.jpg .\Release\testoutp.jpg - fc /b testorig.jpg .\Release\testoutt.jpg - - -jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/thirdparty/jpeg-9e/makefile.vms b/thirdparty/jpeg-9e/makefile.vms deleted file mode 100644 index fe0fb0e..0000000 --- a/thirdparty/jpeg-9e/makefile.vms +++ /dev/null @@ -1,144 +0,0 @@ -$! Makefile for Independent JPEG Group's software -$! -$! This is a command procedure for Digital VMS systems that do not have MMS. -$! It builds the JPEG software by brute force, recompiling everything whether -$! or not it is necessary. It then runs the basic self-test. -$! Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu) -$! and Tim Bell (tbell@netcom.com) for their help. -$! -$! Read installation instructions before running this!! -$! -$ If F$Mode () .eqs. "INTERACTIVE" -$ Then -$ VERIFY = F$Verify (0) -$ Else -$ VERIFY = F$Verify (1) -$ EndIf -$ On Control_Y Then GoTo End -$ On Error Then GoTo End -$ -$ If F$GetSyi ("HW_MODEL") .gt. 1023 -$ Then -$ OPT = "" -$ Else -$ OPT = ",Sys$Disk:[]makvms.opt/Option" -$ EndIf -$ -$ DoCompile := CC /NoDebug /Optimize /NoList -$! -$ DoCompile jaricom.c -$ DoCompile jcapimin.c -$ DoCompile jcapistd.c -$ DoCompile jcarith.c -$ DoCompile jctrans.c -$ DoCompile jcparam.c -$ DoCompile jdatadst.c -$ DoCompile jcinit.c -$ DoCompile jcmaster.c -$ DoCompile jcmarker.c -$ DoCompile jcmainct.c -$ DoCompile jcprepct.c -$ DoCompile jccoefct.c -$ DoCompile jccolor.c -$ DoCompile jcsample.c -$ DoCompile jchuff.c -$ DoCompile jcdctmgr.c -$ DoCompile jfdctfst.c -$ DoCompile jfdctflt.c -$ DoCompile jfdctint.c -$ DoCompile jdapimin.c -$ DoCompile jdapistd.c -$ DoCompile jdarith.c -$ DoCompile jdtrans.c -$ DoCompile jdatasrc.c -$ DoCompile jdmaster.c -$ DoCompile jdinput.c -$ DoCompile jdmarker.c -$ DoCompile jdhuff.c -$ DoCompile jdmainct.c -$ DoCompile jdcoefct.c -$ DoCompile jdpostct.c -$ DoCompile jddctmgr.c -$ DoCompile jidctfst.c -$ DoCompile jidctflt.c -$ DoCompile jidctint.c -$ DoCompile jdsample.c -$ DoCompile jdcolor.c -$ DoCompile jquant1.c -$ DoCompile jquant2.c -$ DoCompile jdmerge.c -$ DoCompile jcomapi.c -$ DoCompile jutils.c -$ DoCompile jerror.c -$ DoCompile jmemmgr.c -$ DoCompile jmemnobs.c -$! -$ Library /Create libjpeg.olb jaricom.obj,jcapimin.obj,jcapistd.obj, - - jcarith.obj,jctrans.obj,jcparam.obj,jdatadst.obj,jcinit.obj, - - jcmaster.obj,jcmarker.obj,jcmainct.obj,jcprepct.obj,jccoefct.obj, - - jccolor.obj,jcsample.obj,jchuff.obj,jcdctmgr.obj,jfdctfst.obj, - - jfdctflt.obj,jfdctint.obj,jdapimin.obj,jdapistd.obj,jdarith.obj, - - jdtrans.obj,jdatasrc.obj,jdmaster.obj,jdinput.obj,jdmarker.obj, - - jdhuff.obj,jdmainct.obj,jdcoefct.obj,jdpostct.obj,jddctmgr.obj, - - jidctfst.obj,jidctflt.obj,jidctint.obj,jdsample.obj,jdcolor.obj, - - jquant1.obj,jquant2.obj,jdmerge.obj,jcomapi.obj,jutils.obj, - - jerror.obj,jmemmgr.obj,jmemnobs.obj -$! -$ DoCompile cjpeg.c -$ DoCompile rdppm.c -$ DoCompile rdgif.c -$ DoCompile rdtarga.c -$ DoCompile rdrle.c -$ DoCompile rdbmp.c -$ DoCompile rdswitch.c -$ DoCompile cdjpeg.c -$! -$ Link /NoMap /Executable = cjpeg.exe cjpeg.obj,rdppm.obj,rdgif.obj, - - rdtarga.obj,rdrle.obj,rdbmp.obj,rdswitch.obj,cdjpeg.obj,libjpeg.olb/Library'OPT' -$! -$ DoCompile djpeg.c -$ DoCompile wrppm.c -$ DoCompile wrgif.c -$ DoCompile wrtarga.c -$ DoCompile wrrle.c -$ DoCompile wrbmp.c -$ DoCompile rdcolmap.c -$ DoCompile cdjpeg.c -$! -$ Link /NoMap /Executable = djpeg.exe djpeg.obj,wrppm.obj,wrgif.obj, - - wrtarga.obj,wrrle.obj,wrbmp.obj,rdcolmap.obj,cdjpeg.obj,libjpeg.olb/Library'OPT' -$! -$ DoCompile jpegtran.c -$ DoCompile rdswitch.c -$ DoCompile cdjpeg.c -$ DoCompile transupp.c -$! -$ Link /NoMap /Executable = jpegtran.exe jpegtran.obj,rdswitch.obj, - - cdjpeg.obj,transupp.obj,libjpeg.olb/Library'OPT' -$! -$ DoCompile rdjpgcom.c -$ Link /NoMap /Executable = rdjpgcom.exe rdjpgcom.obj'OPT' -$! -$ DoCompile wrjpgcom.c -$ Link /NoMap /Executable = wrjpgcom.exe wrjpgcom.obj'OPT' -$! -$! Run the self-test -$! -$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg -$ mcr sys$disk:[]djpeg -dct int -gif -outfile testout.gif testorig.jpg -$ mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg -$ mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm -$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg -$ mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm -$ mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg -$ Backup /Compare/Log testimg.ppm testout.ppm -$ Backup /Compare/Log testimg.gif testout.gif -$ Backup /Compare/Log testimg.bmp testout.bmp -$ Backup /Compare/Log testimg.jpg testout.jpg -$ Backup /Compare/Log testimg.ppm testoutp.ppm -$ Backup /Compare/Log testimgp.jpg testoutp.jpg -$ Backup /Compare/Log testorig.jpg testoutt.jpg -$! -$End: -$ If Verify Then Set Verify -$ Exit diff --git a/thirdparty/jpeg-9e/makefile.vs b/thirdparty/jpeg-9e/makefile.vs deleted file mode 100644 index 15419d5..0000000 --- a/thirdparty/jpeg-9e/makefile.vs +++ /dev/null @@ -1,388 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is for Microsoft Visual C++ on Windows NT (and 95?). -# It builds the IJG library as a statically linkable library (.LIB), -# and builds the sample applications as console-mode apps. -# Thanks to Xingong Chang, Raymond Everly and others. - -# Read installation instructions before saying "nmake" !! -# To build an optimized library without debug info, say "nmake nodebug=1". - -# Pull in standard variable definitions -#!include - -# You may want to adjust these compiler options: -CFLAGS= $(cflags) $(cdebug) $(cvars) -I. -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time options: -LDFLAGS= $(ldebug) $(conlflags) - -# To link any special libraries, add the necessary commands here. -LDLIBS= $(conlibs) - -# Put here the object file name for the correct system-dependent memory -# manager file. For NT we suggest jmemnobs.obj, which expects the OS to -# provide adequate virtual memory. -SYSDEPMEM= jmemnobs.obj - -# miscellaneous OS-dependent stuff -# file deletion command -RM= del - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ - jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \ - coderules.txt filelist.txt cdaltui.txt change.log -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \ - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \ - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 \ - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 \ - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 \ - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 \ - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 \ - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 \ - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 \ - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 \ - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ - missing ar-lib -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in \ - cjpegalt.c djpegalt.c -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg \ - testprog.jpg testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \ - jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \ - jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \ - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \ - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \ - jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \ - jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \ - jdmerge.obj -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj - -# Template command for compiling .c to .obj -.c.obj: - $(cc) $(CFLAGS) $*.c - - -all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.lib: $(LIBOBJECTS) - $(RM) libjpeg.lib - lib -out:libjpeg.lib $(LIBOBJECTS) - -cjpeg.exe: $(COBJECTS) libjpeg.lib - $(link) $(LDFLAGS) -out:cjpeg.exe $(COBJECTS) libjpeg.lib $(LDLIBS) - -djpeg.exe: $(DOBJECTS) libjpeg.lib - $(link) $(LDFLAGS) -out:djpeg.exe $(DOBJECTS) libjpeg.lib $(LDLIBS) - -jpegtran.exe: $(TROBJECTS) libjpeg.lib - $(link) $(LDFLAGS) -out:jpegtran.exe $(TROBJECTS) libjpeg.lib $(LDLIBS) - -rdjpgcom.exe: rdjpgcom.obj - $(link) $(LDFLAGS) -out:rdjpgcom.exe rdjpgcom.obj $(LDLIBS) - -wrjpgcom.exe: wrjpgcom.obj - $(link) $(LDFLAGS) -out:wrjpgcom.exe wrjpgcom.obj $(LDLIBS) - - -clean: - $(RM) *.obj *.exe libjpeg.lib - $(RM) testout* - -setup-vc6: - ren jconfig.vc jconfig.h - ren makejdsw.vc6 jpeg.dsw - ren makeadsw.vc6 apps.dsw - ren makejmak.vc6 jpeg.mak - ren makejdep.vc6 jpeg.dep - ren makejdsp.vc6 jpeg.dsp - ren makecmak.vc6 cjpeg.mak - ren makecdep.vc6 cjpeg.dep - ren makecdsp.vc6 cjpeg.dsp - ren makedmak.vc6 djpeg.mak - ren makeddep.vc6 djpeg.dep - ren makeddsp.vc6 djpeg.dsp - ren maketmak.vc6 jpegtran.mak - ren maketdep.vc6 jpegtran.dep - ren maketdsp.vc6 jpegtran.dsp - ren makermak.vc6 rdjpgcom.mak - ren makerdep.vc6 rdjpgcom.dep - ren makerdsp.vc6 rdjpgcom.dsp - ren makewmak.vc6 wrjpgcom.mak - ren makewdep.vc6 wrjpgcom.dep - ren makewdsp.vc6 wrjpgcom.dsp - -setupcopy-vc6: - copy /y jconfig.vc jconfig.h - copy /y makejdsw.vc6 jpeg.dsw - copy /y makeadsw.vc6 apps.dsw - copy /y makejmak.vc6 jpeg.mak - copy /y makejdep.vc6 jpeg.dep - copy /y makejdsp.vc6 jpeg.dsp - copy /y makecmak.vc6 cjpeg.mak - copy /y makecdep.vc6 cjpeg.dep - copy /y makecdsp.vc6 cjpeg.dsp - copy /y makedmak.vc6 djpeg.mak - copy /y makeddep.vc6 djpeg.dep - copy /y makeddsp.vc6 djpeg.dsp - copy /y maketmak.vc6 jpegtran.mak - copy /y maketdep.vc6 jpegtran.dep - copy /y maketdsp.vc6 jpegtran.dsp - copy /y makermak.vc6 rdjpgcom.mak - copy /y makerdep.vc6 rdjpgcom.dep - copy /y makerdsp.vc6 rdjpgcom.dsp - copy /y makewmak.vc6 wrjpgcom.mak - copy /y makewdep.vc6 wrjpgcom.dep - copy /y makewdsp.vc6 wrjpgcom.dsp - -setup-v16: - ren jconfig.vc jconfig.h - ren makejsln.v16 jpeg.sln - ren makeasln.v16 apps.sln - ren makejvcx.v16 jpeg.vcxproj - ren makejfil.v16 jpeg.vcxproj.filters - ren makecvcx.v16 cjpeg.vcxproj - ren makecfil.v16 cjpeg.vcxproj.filters - ren makedvcx.v16 djpeg.vcxproj - ren makedfil.v16 djpeg.vcxproj.filters - ren maketvcx.v16 jpegtran.vcxproj - ren maketfil.v16 jpegtran.vcxproj.filters - ren makervcx.v16 rdjpgcom.vcxproj - ren makerfil.v16 rdjpgcom.vcxproj.filters - ren makewvcx.v16 wrjpgcom.vcxproj - ren makewfil.v16 wrjpgcom.vcxproj.filters - -setupcopy-v16: - copy /y jconfig.vc jconfig.h - copy /y makejsln.v16 jpeg.sln - copy /y makeasln.v16 apps.sln - copy /y makejvcx.v16 jpeg.vcxproj - copy /y makejfil.v16 jpeg.vcxproj.filters - copy /y makecvcx.v16 cjpeg.vcxproj - copy /y makecfil.v16 cjpeg.vcxproj.filters - copy /y makedvcx.v16 djpeg.vcxproj - copy /y makedfil.v16 djpeg.vcxproj.filters - copy /y maketvcx.v16 jpegtran.vcxproj - copy /y maketfil.v16 jpegtran.vcxproj.filters - copy /y makervcx.v16 rdjpgcom.vcxproj - copy /y makerfil.v16 rdjpgcom.vcxproj.filters - copy /y makewvcx.v16 wrjpgcom.vcxproj - copy /y makewfil.v16 wrjpgcom.vcxproj.filters - -setup-v17: - ren jconfig.vc jconfig.h - ren makejsln.v16 jpeg.sln - ren makeasln.v16 apps.sln - ren makejvcx.v17 jpeg.vcxproj - ren makejfil.v16 jpeg.vcxproj.filters - ren makecvcx.v17 cjpeg.vcxproj - ren makecfil.v16 cjpeg.vcxproj.filters - ren makedvcx.v17 djpeg.vcxproj - ren makedfil.v16 djpeg.vcxproj.filters - ren maketvcx.v17 jpegtran.vcxproj - ren maketfil.v16 jpegtran.vcxproj.filters - ren makervcx.v17 rdjpgcom.vcxproj - ren makerfil.v16 rdjpgcom.vcxproj.filters - ren makewvcx.v17 wrjpgcom.vcxproj - ren makewfil.v16 wrjpgcom.vcxproj.filters - -setupcopy-v17: - copy /y jconfig.vc jconfig.h - copy /y makejsln.v16 jpeg.sln - copy /y makeasln.v16 apps.sln - copy /y makejvcx.v17 jpeg.vcxproj - copy /y makejfil.v16 jpeg.vcxproj.filters - copy /y makecvcx.v17 cjpeg.vcxproj - copy /y makecfil.v16 cjpeg.vcxproj.filters - copy /y makedvcx.v17 djpeg.vcxproj - copy /y makedfil.v16 djpeg.vcxproj.filters - copy /y maketvcx.v17 jpegtran.vcxproj - copy /y maketfil.v16 jpegtran.vcxproj.filters - copy /y makervcx.v17 rdjpgcom.vcxproj - copy /y makerfil.v16 rdjpgcom.vcxproj.filters - copy /y makewvcx.v17 wrjpgcom.vcxproj - copy /y makewfil.v16 wrjpgcom.vcxproj.filters - -test: - IF EXIST testout* $(RM) testout* - .\djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - .\djpeg -dct int -gif -outfile testout.gif testorig.jpg - .\djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - .\cjpeg -dct int -outfile testout.jpg testimg.ppm - .\djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - .\cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - .\jpegtran -outfile testoutt.jpg testprog.jpg - fc /b testimg.ppm testout.ppm - fc /b testimg.gif testout.gif - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg - -test-build: - IF EXIST .\Release\testout* $(RM) .\Release\testout* - .\Release\djpeg -dct int -ppm -outfile .\Release\testout.ppm testorig.jpg - .\Release\djpeg -dct int -gif -outfile .\Release\testout.gif testorig.jpg - .\Release\djpeg -dct int -bmp -colors 256 -outfile .\Release\testout.bmp testorig.jpg - .\Release\cjpeg -dct int -outfile .\Release\testout.jpg testimg.ppm - .\Release\djpeg -dct int -ppm -outfile .\Release\testoutp.ppm testprog.jpg - .\Release\cjpeg -dct int -progressive -opt -outfile .\Release\testoutp.jpg testimg.ppm - .\Release\jpegtran -outfile .\Release\testoutt.jpg testprog.jpg - fc /b testimg.ppm .\Release\testout.ppm - fc /b testimg.gif .\Release\testout.gif - fc /b testimg.bmp .\Release\testout.bmp - fc /b testimg.jpg .\Release\testout.jpg - fc /b testimg.ppm .\Release\testoutp.ppm - fc /b testimgp.jpg .\Release\testoutp.jpg - fc /b testorig.jpg .\Release\testoutt.jpg - -test-32: - IF EXIST .\Release\testout* $(RM) .\Release\testout* - .\Release\Win32\djpeg -dct int -ppm -outfile .\Release\testout.ppm testorig.jpg - .\Release\Win32\djpeg -dct int -gif -outfile .\Release\testout.gif testorig.jpg - .\Release\Win32\djpeg -dct int -bmp -colors 256 -outfile .\Release\testout.bmp testorig.jpg - .\Release\Win32\cjpeg -dct int -outfile .\Release\testout.jpg testimg.ppm - .\Release\Win32\djpeg -dct int -ppm -outfile .\Release\testoutp.ppm testprog.jpg - .\Release\Win32\cjpeg -dct int -progressive -opt -outfile .\Release\testoutp.jpg testimg.ppm - .\Release\Win32\jpegtran -outfile .\Release\testoutt.jpg testprog.jpg - fc /b testimg.ppm .\Release\testout.ppm - fc /b testimg.gif .\Release\testout.gif - fc /b testimg.bmp .\Release\testout.bmp - fc /b testimg.jpg .\Release\testout.jpg - fc /b testimg.ppm .\Release\testoutp.ppm - fc /b testimgp.jpg .\Release\testoutp.jpg - fc /b testorig.jpg .\Release\testoutt.jpg - -test-64: - IF EXIST .\Release\testout* $(RM) .\Release\testout* - .\Release\x64\djpeg -dct int -ppm -outfile .\Release\testout.ppm testorig.jpg - .\Release\x64\djpeg -dct int -gif -outfile .\Release\testout.gif testorig.jpg - .\Release\x64\djpeg -dct int -bmp -colors 256 -outfile .\Release\testout.bmp testorig.jpg - .\Release\x64\cjpeg -dct int -outfile .\Release\testout.jpg testimg.ppm - .\Release\x64\djpeg -dct int -ppm -outfile .\Release\testoutp.ppm testprog.jpg - .\Release\x64\cjpeg -dct int -progressive -opt -outfile .\Release\testoutp.jpg testimg.ppm - .\Release\x64\jpegtran -outfile .\Release\testoutt.jpg testprog.jpg - fc /b testimg.ppm .\Release\testout.ppm - fc /b testimg.gif .\Release\testout.gif - fc /b testimg.bmp .\Release\testout.bmp - fc /b testimg.jpg .\Release\testout.jpg - fc /b testimg.ppm .\Release\testoutp.ppm - fc /b testimgp.jpg .\Release\testoutp.jpg - fc /b testorig.jpg .\Release\testoutt.jpg - - -jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/thirdparty/jpeg-9e/makefile.wat b/thirdparty/jpeg-9e/makefile.wat deleted file mode 100644 index a04e96d..0000000 --- a/thirdparty/jpeg-9e/makefile.wat +++ /dev/null @@ -1,246 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is suitable for Watcom C/C++ 10.0 on MS-DOS (using -# dos4g extender), OS/2, and Windows NT console mode. -# Thanks to Janos Haide, jhaide@btrvtech.com. - -# Read installation instructions before saying "wmake" !! - -# Uncomment line for desired system -SYSTEM=DOS -#SYSTEM=OS2 -#SYSTEM=NT - -# The name of your C compiler: -CC= wcl386 - -# You may need to adjust these cc options: -CFLAGS= -4r -ort -wx -zq -bt=$(SYSTEM) -# Caution: avoid -ol or -ox; these generate bad code with 10.0 or 10.0a. -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time cc options: -!ifeq SYSTEM DOS -LDFLAGS= -zq -l=dos4g -!else ifeq SYSTEM OS2 -LDFLAGS= -zq -l=os2v2 -!else ifeq SYSTEM NT -LDFLAGS= -zq -l=nt -!endif - -# Put here the object file name for the correct system-dependent memory -# manager file. jmemnobs should work fine for dos4g or OS/2 environment. -SYSDEPMEM= jmemnobs.obj - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c & - jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c & - jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c & - jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c & - jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c & - jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c & - jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c & - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c & - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c & - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h & - jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 & - wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt & - coderules.txt filelist.txt cdaltui.txt change.log -MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 & - makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc & - makefile.vs makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 & - makejmak.vc6 makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 & - makeddsp.vc6 makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 & - makerdep.vc6 makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 & - makewmak.vc6 makejsln.v16 makeasln.v16 makejvcx.v16 makejfil.v16 & - makecvcx.v16 makecfil.v16 makedvcx.v16 makedfil.v16 maketvcx.v16 & - maketfil.v16 makervcx.v16 makerfil.v16 makewvcx.v16 makewfil.v16 & - makejvcx.v17 makecvcx.v17 makedvcx.v17 maketvcx.v17 makervcx.v17 & - makewvcx.v17 makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st & - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms & - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat & - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas & - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp & - missing ar-lib -OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map libjpeg.pc.in & - cjpegalt.c djpegalt.c -TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.bmp testimg.jpg & - testprog.jpg testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) & - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj & - jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj & - jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj & - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj & - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj & - jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj & - jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj & - jdmerge.obj -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj & - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj & - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj - - -all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.lib: $(LIBOBJECTS) - - del libjpeg.lib - * wlib -n libjpeg.lib $(LIBOBJECTS) - -cjpeg.exe: $(COBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) $(COBJECTS) libjpeg.lib - -djpeg.exe: $(DOBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) $(DOBJECTS) libjpeg.lib - -jpegtran.exe: $(TROBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) $(TROBJECTS) libjpeg.lib - -rdjpgcom.exe: rdjpgcom.c - $(CC) $(CFLAGS) $(LDFLAGS) rdjpgcom.c - -wrjpgcom.exe: wrjpgcom.c - $(CC) $(CFLAGS) $(LDFLAGS) wrjpgcom.c - -.c.obj: - $(CC) $(CFLAGS) -c $< - -jconfig.h: jconfig.txt - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.txt. - exit 1 - -clean: .SYMBOLIC - - del *.obj - - del libjpeg.lib - - del cjpeg.exe - - del djpeg.exe - - del jpegtran.exe - - del rdjpgcom.exe - - del wrjpgcom.exe - - del testout*.* - -test: cjpeg.exe djpeg.exe jpegtran.exe .SYMBOLIC - - del testout*.* - djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - djpeg -dct int -gif -outfile testout.gif testorig.jpg - djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - cjpeg -dct int -outfile testout.jpg testimg.ppm - djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - jpegtran -outfile testoutt.jpg testprog.jpg -!ifeq SYSTEM DOS - fc /b testimg.ppm testout.ppm - fc /b testimg.gif testout.gif - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg -!else - echo n > n.tmp - comp testimg.ppm testout.ppm < n.tmp - comp testimg.gif testout.gif < n.tmp - comp testimg.bmp testout.bmp < n.tmp - comp testimg.jpg testout.jpg < n.tmp - comp testimg.ppm testoutp.ppm < n.tmp - comp testimgp.jpg testoutp.jpg < n.tmp - comp testorig.jpg testoutt.jpg < n.tmp - del n.tmp -!endif - - -jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/thirdparty/jpeg-9e/makejdep.vc6 b/thirdparty/jpeg-9e/makejdep.vc6 deleted file mode 100644 index 1065b21..0000000 --- a/thirdparty/jpeg-9e/makejdep.vc6 +++ /dev/null @@ -1,423 +0,0 @@ -# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von jpeg.mak - -.\jaricom.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcapimin.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcapistd.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcarith.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jccoefct.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jccolor.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcdctmgr.c : \ - ".\jconfig.h"\ - ".\jdct.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jchuff.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcinit.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcmainct.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcmarker.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcmaster.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcomapi.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcparam.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcprepct.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jcsample.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jctrans.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdapimin.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdapistd.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdarith.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdatadst.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\jdatasrc.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\jdcoefct.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdcolor.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jddctmgr.c : \ - ".\jconfig.h"\ - ".\jdct.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdhuff.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdinput.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdmainct.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdmarker.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdmaster.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdmerge.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdpostct.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdsample.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jdtrans.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jerror.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - ".\jversion.h"\ - - -.\jfdctflt.c : \ - ".\jconfig.h"\ - ".\jdct.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jfdctfst.c : \ - ".\jconfig.h"\ - ".\jdct.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jfdctint.c : \ - ".\jconfig.h"\ - ".\jdct.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jidctflt.c : \ - ".\jconfig.h"\ - ".\jdct.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jidctfst.c : \ - ".\jconfig.h"\ - ".\jdct.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jidctint.c : \ - ".\jconfig.h"\ - ".\jdct.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jmemmgr.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmemsys.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jmemnobs.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmemsys.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jquant1.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jquant2.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - - -.\jutils.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - diff --git a/thirdparty/jpeg-9e/makejdsp.vc6 b/thirdparty/jpeg-9e/makejdsp.vc6 deleted file mode 100644 index 8cd27bd..0000000 --- a/thirdparty/jpeg-9e/makejdsp.vc6 +++ /dev/null @@ -1,285 +0,0 @@ -# Microsoft Developer Studio Project File - Name="jpeg" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=jpeg - Win32 -!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "jpeg.mak". -!MESSAGE -!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "jpeg.mak" CFG="jpeg - Win32" -!MESSAGE -!MESSAGE Fr die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "jpeg - Win32" (basierend auf "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir ".\Release" -# PROP BASE Intermediate_Dir ".\Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\Release" -# PROP Intermediate_Dir ".\Release\jpeg" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD BASE RSC /l 0x407 -# ADD RSC /l 0x407 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Target - -# Name "jpeg - Win32" -# Begin Group "Quellcodedateien" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" -# Begin Source File - -SOURCE=.\jaricom.c -# End Source File -# Begin Source File - -SOURCE=.\jcapimin.c -# End Source File -# Begin Source File - -SOURCE=.\jcapistd.c -# End Source File -# Begin Source File - -SOURCE=.\jcarith.c -# End Source File -# Begin Source File - -SOURCE=.\jccoefct.c -# End Source File -# Begin Source File - -SOURCE=.\jccolor.c -# End Source File -# Begin Source File - -SOURCE=.\jcdctmgr.c -# End Source File -# Begin Source File - -SOURCE=.\jchuff.c -# End Source File -# Begin Source File - -SOURCE=.\jcinit.c -# End Source File -# Begin Source File - -SOURCE=.\jcmainct.c -# End Source File -# Begin Source File - -SOURCE=.\jcmarker.c -# End Source File -# Begin Source File - -SOURCE=.\jcmaster.c -# End Source File -# Begin Source File - -SOURCE=.\jcomapi.c -# End Source File -# Begin Source File - -SOURCE=.\jcparam.c -# End Source File -# Begin Source File - -SOURCE=.\jcprepct.c -# End Source File -# Begin Source File - -SOURCE=.\jcsample.c -# End Source File -# Begin Source File - -SOURCE=.\jctrans.c -# End Source File -# Begin Source File - -SOURCE=.\jdapimin.c -# End Source File -# Begin Source File - -SOURCE=.\jdapistd.c -# End Source File -# Begin Source File - -SOURCE=.\jdarith.c -# End Source File -# Begin Source File - -SOURCE=.\jdatadst.c -# End Source File -# Begin Source File - -SOURCE=.\jdatasrc.c -# End Source File -# Begin Source File - -SOURCE=.\jdcoefct.c -# End Source File -# Begin Source File - -SOURCE=.\jdcolor.c -# End Source File -# Begin Source File - -SOURCE=.\jddctmgr.c -# End Source File -# Begin Source File - -SOURCE=.\jdhuff.c -# End Source File -# Begin Source File - -SOURCE=.\jdinput.c -# End Source File -# Begin Source File - -SOURCE=.\jdmainct.c -# End Source File -# Begin Source File - -SOURCE=.\jdmarker.c -# End Source File -# Begin Source File - -SOURCE=.\jdmaster.c -# End Source File -# Begin Source File - -SOURCE=.\jdmerge.c -# End Source File -# Begin Source File - -SOURCE=.\jdpostct.c -# End Source File -# Begin Source File - -SOURCE=.\jdsample.c -# End Source File -# Begin Source File - -SOURCE=.\jdtrans.c -# End Source File -# Begin Source File - -SOURCE=.\jerror.c -# End Source File -# Begin Source File - -SOURCE=.\jfdctflt.c -# End Source File -# Begin Source File - -SOURCE=.\jfdctfst.c -# End Source File -# Begin Source File - -SOURCE=.\jfdctint.c -# End Source File -# Begin Source File - -SOURCE=.\jidctflt.c -# End Source File -# Begin Source File - -SOURCE=.\jidctfst.c -# End Source File -# Begin Source File - -SOURCE=.\jidctint.c -# End Source File -# Begin Source File - -SOURCE=.\jmemmgr.c -# End Source File -# Begin Source File - -SOURCE=.\jmemnobs.c -# End Source File -# Begin Source File - -SOURCE=.\jquant1.c -# End Source File -# Begin Source File - -SOURCE=.\jquant2.c -# End Source File -# Begin Source File - -SOURCE=.\jutils.c -# End Source File -# End Group -# Begin Group "Header-Dateien" - -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" -# Begin Source File - -SOURCE=.\jconfig.h -# End Source File -# Begin Source File - -SOURCE=.\jdct.h -# End Source File -# Begin Source File - -SOURCE=.\jerror.h -# End Source File -# Begin Source File - -SOURCE=.\jinclude.h -# End Source File -# Begin Source File - -SOURCE=.\jmemsys.h -# End Source File -# Begin Source File - -SOURCE=.\jmorecfg.h -# End Source File -# Begin Source File - -SOURCE=.\jpegint.h -# End Source File -# Begin Source File - -SOURCE=.\jpeglib.h -# End Source File -# Begin Source File - -SOURCE=.\jversion.h -# End Source File -# End Group -# Begin Group "Ressourcendateien" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/thirdparty/jpeg-9e/makejdsw.vc6 b/thirdparty/jpeg-9e/makejdsw.vc6 deleted file mode 100644 index d11fab1..0000000 --- a/thirdparty/jpeg-9e/makejdsw.vc6 +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GEL™SCHT WERDEN! - -############################################################################### - -Project: "jpeg"=".\jpeg.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/thirdparty/jpeg-9e/makejfil.v16 b/thirdparty/jpeg-9e/makejfil.v16 deleted file mode 100644 index 4cd1d07..0000000 --- a/thirdparty/jpeg-9e/makejfil.v16 +++ /dev/null @@ -1,186 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makejmak.vc6 b/thirdparty/jpeg-9e/makejmak.vc6 deleted file mode 100644 index 1107336..0000000 --- a/thirdparty/jpeg-9e/makejmak.vc6 +++ /dev/null @@ -1,425 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on jpeg.dsp -!IF "$(CFG)" == "" -CFG=jpeg - Win32 -!MESSAGE Keine Konfiguration angegeben. jpeg - Win32 wird als Standard verwendet. -!ENDIF - -!IF "$(CFG)" != "jpeg - Win32" -!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben. -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "jpeg.mak" CFG="jpeg - Win32" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "jpeg - Win32" (basierend auf "Win32 (x86) Static Library") -!MESSAGE -!ERROR Eine ungültige Konfiguration wurde angegeben. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -ALL : "$(OUTDIR)\jpeg.lib" - - -CLEAN : - -@erase "$(INTDIR)\jaricom.obj" - -@erase "$(INTDIR)\jcapimin.obj" - -@erase "$(INTDIR)\jcapistd.obj" - -@erase "$(INTDIR)\jcarith.obj" - -@erase "$(INTDIR)\jccoefct.obj" - -@erase "$(INTDIR)\jccolor.obj" - -@erase "$(INTDIR)\jcdctmgr.obj" - -@erase "$(INTDIR)\jchuff.obj" - -@erase "$(INTDIR)\jcinit.obj" - -@erase "$(INTDIR)\jcmainct.obj" - -@erase "$(INTDIR)\jcmarker.obj" - -@erase "$(INTDIR)\jcmaster.obj" - -@erase "$(INTDIR)\jcomapi.obj" - -@erase "$(INTDIR)\jcparam.obj" - -@erase "$(INTDIR)\jcprepct.obj" - -@erase "$(INTDIR)\jcsample.obj" - -@erase "$(INTDIR)\jctrans.obj" - -@erase "$(INTDIR)\jdapimin.obj" - -@erase "$(INTDIR)\jdapistd.obj" - -@erase "$(INTDIR)\jdarith.obj" - -@erase "$(INTDIR)\jdatadst.obj" - -@erase "$(INTDIR)\jdatasrc.obj" - -@erase "$(INTDIR)\jdcoefct.obj" - -@erase "$(INTDIR)\jdcolor.obj" - -@erase "$(INTDIR)\jddctmgr.obj" - -@erase "$(INTDIR)\jdhuff.obj" - -@erase "$(INTDIR)\jdinput.obj" - -@erase "$(INTDIR)\jdmainct.obj" - -@erase "$(INTDIR)\jdmarker.obj" - -@erase "$(INTDIR)\jdmaster.obj" - -@erase "$(INTDIR)\jdmerge.obj" - -@erase "$(INTDIR)\jdpostct.obj" - -@erase "$(INTDIR)\jdsample.obj" - -@erase "$(INTDIR)\jdtrans.obj" - -@erase "$(INTDIR)\jerror.obj" - -@erase "$(INTDIR)\jfdctflt.obj" - -@erase "$(INTDIR)\jfdctfst.obj" - -@erase "$(INTDIR)\jfdctint.obj" - -@erase "$(INTDIR)\jidctflt.obj" - -@erase "$(INTDIR)\jidctfst.obj" - -@erase "$(INTDIR)\jidctint.obj" - -@erase "$(INTDIR)\jmemmgr.obj" - -@erase "$(INTDIR)\jmemnobs.obj" - -@erase "$(INTDIR)\jquant1.obj" - -@erase "$(INTDIR)\jquant2.obj" - -@erase "$(INTDIR)\jutils.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\jpeg.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\jpeg.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\jpeg.bsc" -BSC32_SBRS= \ - -LIB32=link.exe -lib -LIB32_FLAGS=/nologo /out:"$(OUTDIR)\jpeg.lib" -LIB32_OBJS= \ - "$(INTDIR)\jaricom.obj" \ - "$(INTDIR)\jcapimin.obj" \ - "$(INTDIR)\jcapistd.obj" \ - "$(INTDIR)\jcarith.obj" \ - "$(INTDIR)\jccoefct.obj" \ - "$(INTDIR)\jccolor.obj" \ - "$(INTDIR)\jcdctmgr.obj" \ - "$(INTDIR)\jchuff.obj" \ - "$(INTDIR)\jcinit.obj" \ - "$(INTDIR)\jcmainct.obj" \ - "$(INTDIR)\jcmarker.obj" \ - "$(INTDIR)\jcmaster.obj" \ - "$(INTDIR)\jcomapi.obj" \ - "$(INTDIR)\jcparam.obj" \ - "$(INTDIR)\jcprepct.obj" \ - "$(INTDIR)\jcsample.obj" \ - "$(INTDIR)\jctrans.obj" \ - "$(INTDIR)\jdapimin.obj" \ - "$(INTDIR)\jdapistd.obj" \ - "$(INTDIR)\jdarith.obj" \ - "$(INTDIR)\jdatadst.obj" \ - "$(INTDIR)\jdatasrc.obj" \ - "$(INTDIR)\jdcoefct.obj" \ - "$(INTDIR)\jdcolor.obj" \ - "$(INTDIR)\jddctmgr.obj" \ - "$(INTDIR)\jdhuff.obj" \ - "$(INTDIR)\jdinput.obj" \ - "$(INTDIR)\jdmainct.obj" \ - "$(INTDIR)\jdmarker.obj" \ - "$(INTDIR)\jdmaster.obj" \ - "$(INTDIR)\jdmerge.obj" \ - "$(INTDIR)\jdpostct.obj" \ - "$(INTDIR)\jdsample.obj" \ - "$(INTDIR)\jdtrans.obj" \ - "$(INTDIR)\jerror.obj" \ - "$(INTDIR)\jfdctflt.obj" \ - "$(INTDIR)\jfdctfst.obj" \ - "$(INTDIR)\jfdctint.obj" \ - "$(INTDIR)\jidctflt.obj" \ - "$(INTDIR)\jidctfst.obj" \ - "$(INTDIR)\jidctint.obj" \ - "$(INTDIR)\jmemmgr.obj" \ - "$(INTDIR)\jmemnobs.obj" \ - "$(INTDIR)\jquant1.obj" \ - "$(INTDIR)\jquant2.obj" \ - "$(INTDIR)\jutils.obj" - -"$(OUTDIR)\jpeg.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) - $(LIB32) @<< - $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("jpeg.dep") -!INCLUDE "jpeg.dep" -!ELSE -!MESSAGE Warning: cannot find "jpeg.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "jpeg - Win32" -SOURCE=.\jaricom.c - -"$(INTDIR)\jaricom.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcapimin.c - -"$(INTDIR)\jcapimin.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcapistd.c - -"$(INTDIR)\jcapistd.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcarith.c - -"$(INTDIR)\jcarith.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jccoefct.c - -"$(INTDIR)\jccoefct.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jccolor.c - -"$(INTDIR)\jccolor.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcdctmgr.c - -"$(INTDIR)\jcdctmgr.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jchuff.c - -"$(INTDIR)\jchuff.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcinit.c - -"$(INTDIR)\jcinit.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcmainct.c - -"$(INTDIR)\jcmainct.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcmarker.c - -"$(INTDIR)\jcmarker.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcmaster.c - -"$(INTDIR)\jcmaster.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcomapi.c - -"$(INTDIR)\jcomapi.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcparam.c - -"$(INTDIR)\jcparam.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcprepct.c - -"$(INTDIR)\jcprepct.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jcsample.c - -"$(INTDIR)\jcsample.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jctrans.c - -"$(INTDIR)\jctrans.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdapimin.c - -"$(INTDIR)\jdapimin.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdapistd.c - -"$(INTDIR)\jdapistd.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdarith.c - -"$(INTDIR)\jdarith.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdatadst.c - -"$(INTDIR)\jdatadst.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdatasrc.c - -"$(INTDIR)\jdatasrc.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdcoefct.c - -"$(INTDIR)\jdcoefct.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdcolor.c - -"$(INTDIR)\jdcolor.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jddctmgr.c - -"$(INTDIR)\jddctmgr.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdhuff.c - -"$(INTDIR)\jdhuff.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdinput.c - -"$(INTDIR)\jdinput.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdmainct.c - -"$(INTDIR)\jdmainct.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdmarker.c - -"$(INTDIR)\jdmarker.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdmaster.c - -"$(INTDIR)\jdmaster.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdmerge.c - -"$(INTDIR)\jdmerge.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdpostct.c - -"$(INTDIR)\jdpostct.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdsample.c - -"$(INTDIR)\jdsample.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jdtrans.c - -"$(INTDIR)\jdtrans.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jerror.c - -"$(INTDIR)\jerror.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jfdctflt.c - -"$(INTDIR)\jfdctflt.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jfdctfst.c - -"$(INTDIR)\jfdctfst.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jfdctint.c - -"$(INTDIR)\jfdctint.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jidctflt.c - -"$(INTDIR)\jidctflt.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jidctfst.c - -"$(INTDIR)\jidctfst.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jidctint.c - -"$(INTDIR)\jidctint.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jmemmgr.c - -"$(INTDIR)\jmemmgr.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jmemnobs.c - -"$(INTDIR)\jmemnobs.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jquant1.c - -"$(INTDIR)\jquant1.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jquant2.c - -"$(INTDIR)\jquant2.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jutils.c - -"$(INTDIR)\jutils.obj" : $(SOURCE) "$(INTDIR)" - - - -!ENDIF - diff --git a/thirdparty/jpeg-9e/makejsln.v16 b/thirdparty/jpeg-9e/makejsln.v16 deleted file mode 100644 index 344f799..0000000 --- a/thirdparty/jpeg-9e/makejsln.v16 +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31402.337 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "jpeg.vcxproj", "{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Release|ARM = Release|ARM - Release|ARM64 = Release|ARM64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|ARM.ActiveCfg = Release|ARM - {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|ARM.Build.0 = Release|ARM - {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|ARM64.ActiveCfg = Release|ARM64 - {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|ARM64.Build.0 = Release|ARM64 - {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|Win32.ActiveCfg = Release|Win32 - {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|Win32.Build.0 = Release|Win32 - {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|x64.ActiveCfg = Release|x64 - {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {F3829CB8-BF87-4A30-B5D3-E3ADB548485D} - EndGlobalSection -EndGlobal diff --git a/thirdparty/jpeg-9e/makejvcx.v16 b/thirdparty/jpeg-9e/makejvcx.v16 deleted file mode 100644 index 55f98cb..0000000 --- a/thirdparty/jpeg-9e/makejvcx.v16 +++ /dev/null @@ -1,222 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1} - Win32Proj - jpeg - 10.0 - - - - StaticLibrary - false - true - Unicode - v142 - - - StaticLibrary - false - true - Unicode - v142 - - - StaticLibrary - false - true - Unicode - v142 - - - StaticLibrary - false - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - $(SolutionDir)$(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - $(SolutionDir)$(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - $(SolutionDir)$(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS - true - true - - - Windows - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS - true - true - - - Windows - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS - true - true - - - Windows - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS - true - true - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makejvcx.v17 b/thirdparty/jpeg-9e/makejvcx.v17 deleted file mode 100644 index e4000a9..0000000 --- a/thirdparty/jpeg-9e/makejvcx.v17 +++ /dev/null @@ -1,222 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1} - Win32Proj - jpeg - 10.0 - - - - StaticLibrary - false - true - Unicode - v143 - - - StaticLibrary - false - true - Unicode - v143 - - - StaticLibrary - false - true - Unicode - v143 - - - StaticLibrary - false - true - Unicode - v143 - - - - - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - $(SolutionDir)$(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - $(SolutionDir)$(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - $(SolutionDir)$(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS - true - true - - - Windows - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS - true - true - - - Windows - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS - true - true - - - Windows - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS - true - true - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makeproj.mac b/thirdparty/jpeg-9e/makeproj.mac deleted file mode 100644 index e5b5102..0000000 --- a/thirdparty/jpeg-9e/makeproj.mac +++ /dev/null @@ -1,213 +0,0 @@ --- --- makeproj.mac --- --- This AppleScript builds Code Warrior PRO Release 2 project files for the --- libjpeg library as well as the test programs 'cjpeg', 'djpeg', 'jpegtran'. --- (We'd distribute real project files, except they're not text --- and would create maintenance headaches.) --- --- The script then compiles and links the library and the test programs. --- NOTE: if you haven't already created a 'jconfig.h' file, the script --- automatically copies 'jconfig.mac' to 'jconfig.h'. --- --- To use this script, you must have AppleScript 1.1 or later installed --- and a suitable AppleScript editor like Script Editor or Script Debugger --- (http://www.latenightsw.com). Open this file with your AppleScript --- editor and execute the "run" command to build the projects. --- --- Thanks to Dan Sears and Don Agro for this script. --- Questions about this script can be addressed to dogpark@interlog.com --- - -on run - - choose folder with prompt ">>> Select IJG source folder <<<" - set ijg_folder to result - - choose folder with prompt ">>> Select MetroWerks folder <<<" - set cw_folder to result - - -- if jconfig.h doesn't already exist, copy jconfig.mac - - tell application "Finder" - if not (exists file "jconfig.h" of ijg_folder) then - duplicate {file "jconfig.mac" of folder ijg_folder} - select file "jconfig.mac copy" of folder ijg_folder - set name of selection to "jconfig.h" - end if - end tell - - tell application "CodeWarrior IDE 2.1" - with timeout of 10000 seconds - - -- create libjpeg project - - activate - Create Project (ijg_folder as string) & "libjpeg.proj" - Set Preferences of panel "Target Settings" to {Target Name:"libjpeg"} - Set Preferences of panel "PPC Project" to {File Name:"libjpeg"} - Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} - Set Preferences of panel "PPC Project" to {Project Type:library} - Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} - Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} - Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} - Set Preferences of panel "PPC Linker" to {Generate SYM File:false} - - Add Files (ijg_folder as string) & "jaricom.c" To Segment 1 - Add Files (ijg_folder as string) & "jcapimin.c" To Segment 1 - Add Files (ijg_folder as string) & "jcapistd.c" To Segment 1 - Add Files (ijg_folder as string) & "jcarith.c" To Segment 1 - Add Files (ijg_folder as string) & "jctrans.c" To Segment 1 - Add Files (ijg_folder as string) & "jcparam.c" To Segment 1 - Add Files (ijg_folder as string) & "jdatadst.c" To Segment 1 - Add Files (ijg_folder as string) & "jcinit.c" To Segment 1 - Add Files (ijg_folder as string) & "jcmaster.c" To Segment 1 - Add Files (ijg_folder as string) & "jcmarker.c" To Segment 1 - Add Files (ijg_folder as string) & "jcmainct.c" To Segment 1 - Add Files (ijg_folder as string) & "jcprepct.c" To Segment 1 - Add Files (ijg_folder as string) & "jccoefct.c" To Segment 1 - Add Files (ijg_folder as string) & "jccolor.c" To Segment 1 - Add Files (ijg_folder as string) & "jcsample.c" To Segment 1 - Add Files (ijg_folder as string) & "jchuff.c" To Segment 1 - Add Files (ijg_folder as string) & "jcdctmgr.c" To Segment 1 - Add Files (ijg_folder as string) & "jfdctfst.c" To Segment 1 - Add Files (ijg_folder as string) & "jfdctflt.c" To Segment 1 - Add Files (ijg_folder as string) & "jfdctint.c" To Segment 1 - Add Files (ijg_folder as string) & "jdapimin.c" To Segment 1 - Add Files (ijg_folder as string) & "jdapistd.c" To Segment 1 - Add Files (ijg_folder as string) & "jdarith.c" To Segment 1 - Add Files (ijg_folder as string) & "jdtrans.c" To Segment 1 - Add Files (ijg_folder as string) & "jdatasrc.c" To Segment 1 - Add Files (ijg_folder as string) & "jdmaster.c" To Segment 1 - Add Files (ijg_folder as string) & "jdinput.c" To Segment 1 - Add Files (ijg_folder as string) & "jdmarker.c" To Segment 1 - Add Files (ijg_folder as string) & "jdhuff.c" To Segment 1 - Add Files (ijg_folder as string) & "jdmainct.c" To Segment 1 - Add Files (ijg_folder as string) & "jdcoefct.c" To Segment 1 - Add Files (ijg_folder as string) & "jdpostct.c" To Segment 1 - Add Files (ijg_folder as string) & "jddctmgr.c" To Segment 1 - Add Files (ijg_folder as string) & "jidctfst.c" To Segment 1 - Add Files (ijg_folder as string) & "jidctflt.c" To Segment 1 - Add Files (ijg_folder as string) & "jidctint.c" To Segment 1 - Add Files (ijg_folder as string) & "jdsample.c" To Segment 1 - Add Files (ijg_folder as string) & "jdcolor.c" To Segment 1 - Add Files (ijg_folder as string) & "jquant1.c" To Segment 1 - Add Files (ijg_folder as string) & "jquant2.c" To Segment 1 - Add Files (ijg_folder as string) & "jdmerge.c" To Segment 1 - Add Files (ijg_folder as string) & "jcomapi.c" To Segment 1 - Add Files (ijg_folder as string) & "jutils.c" To Segment 1 - Add Files (ijg_folder as string) & "jerror.c" To Segment 1 - Add Files (ijg_folder as string) & "jmemmgr.c" To Segment 1 - Add Files (ijg_folder as string) & "jmemmac.c" To Segment 1 - - -- compile and link the library - - Make Project - Close Project - - -- create cjpeg project - - activate - Create Project (ijg_folder as string) & "cjpeg.proj" - Set Preferences of panel "Target Settings" to {Target Name:"cjpeg"} - Set Preferences of panel "PPC Project" to {File Name:"cjpeg"} - Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} - Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} - Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} - Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} - Set Preferences of panel "PPC Linker" to {Generate SYM File:false} - - Add Files (ijg_folder as string) & "cjpeg.c" To Segment 1 - Add Files (ijg_folder as string) & "rdppm.c" To Segment 1 - Add Files (ijg_folder as string) & "rdgif.c" To Segment 1 - Add Files (ijg_folder as string) & "rdtarga.c" To Segment 1 - Add Files (ijg_folder as string) & "rdrle.c" To Segment 1 - Add Files (ijg_folder as string) & "rdbmp.c" To Segment 1 - Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1 - Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1 - - Add Files (ijg_folder as string) & "libjpeg" To Segment 2 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4 - - -- compile and link cjpeg - - Make Project - Close Project - - -- create djpeg project - - activate - Create Project (ijg_folder as string) & "djpeg.proj" - Set Preferences of panel "Target Settings" to {Target Name:"djpeg"} - Set Preferences of panel "PPC Project" to {File Name:"djpeg"} - Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} - Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} - Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} - Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} - Set Preferences of panel "PPC Linker" to {Generate SYM File:false} - - Add Files (ijg_folder as string) & "djpeg.c" To Segment 1 - Add Files (ijg_folder as string) & "wrppm.c" To Segment 1 - Add Files (ijg_folder as string) & "wrgif.c" To Segment 1 - Add Files (ijg_folder as string) & "wrtarga.c" To Segment 1 - Add Files (ijg_folder as string) & "wrrle.c" To Segment 1 - Add Files (ijg_folder as string) & "wrbmp.c" To Segment 1 - Add Files (ijg_folder as string) & "rdcolmap.c" To Segment 1 - Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1 - - Add Files (ijg_folder as string) & "libjpeg" To Segment 2 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4 - - -- compile and link djpeg - - Make Project - Close Project - - -- create jpegtran project - - activate - Create Project (ijg_folder as string) & "jpegtran.proj" - Set Preferences of panel "Target Settings" to {Target Name:"jpegtran"} - Set Preferences of panel "PPC Project" to {File Name:"jpegtran"} - Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} - Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} - Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} - Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} - Set Preferences of panel "PPC Linker" to {Generate SYM File:false} - - Add Files (ijg_folder as string) & "jpegtran.c" To Segment 1 - Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1 - Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1 - Add Files (ijg_folder as string) & "transupp.c" To Segment 1 - - Add Files (ijg_folder as string) & "libjpeg" To Segment 2 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4 - - -- compile and link jpegtran - - Make Project - Close Project - - quit - - end timeout - end tell -end run diff --git a/thirdparty/jpeg-9e/makerdep.vc6 b/thirdparty/jpeg-9e/makerdep.vc6 deleted file mode 100644 index 94748d0..0000000 --- a/thirdparty/jpeg-9e/makerdep.vc6 +++ /dev/null @@ -1,6 +0,0 @@ -# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von rdjpgcom.mak - -.\rdjpgcom.c : \ - ".\jconfig.h"\ - ".\jinclude.h"\ - diff --git a/thirdparty/jpeg-9e/makerdsp.vc6 b/thirdparty/jpeg-9e/makerdsp.vc6 deleted file mode 100644 index 8eaf446..0000000 --- a/thirdparty/jpeg-9e/makerdsp.vc6 +++ /dev/null @@ -1,78 +0,0 @@ -# Microsoft Developer Studio Project File - Name="rdjpgcom" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=rdjpgcom - Win32 -!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "rdjpgcom.mak". -!MESSAGE -!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "rdjpgcom.mak" CFG="rdjpgcom - Win32" -!MESSAGE -!MESSAGE Fr die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "rdjpgcom - Win32" (basierend auf "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir ".\rdjpgcom\Release" -# PROP BASE Intermediate_Dir ".\rdjpgcom\Release" -# PROP BASE Target_Dir ".\rdjpgcom" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\Release" -# PROP Intermediate_Dir ".\Release\rdjpgcom" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir ".\rdjpgcom" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# Begin Target - -# Name "rdjpgcom - Win32" -# Begin Group "Quellcodedateien" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" -# Begin Source File - -SOURCE=.\rdjpgcom.c -# End Source File -# End Group -# Begin Group "Header-Dateien" - -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" -# Begin Source File - -SOURCE=.\jconfig.h -# End Source File -# Begin Source File - -SOURCE=.\jinclude.h -# End Source File -# End Group -# Begin Group "Ressourcendateien" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/thirdparty/jpeg-9e/makerfil.v16 b/thirdparty/jpeg-9e/makerfil.v16 deleted file mode 100644 index be828f5..0000000 --- a/thirdparty/jpeg-9e/makerfil.v16 +++ /dev/null @@ -1,30 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - - - Source Files - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makermak.vc6 b/thirdparty/jpeg-9e/makermak.vc6 deleted file mode 100644 index 6d2d4c7..0000000 --- a/thirdparty/jpeg-9e/makermak.vc6 +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on rdjpgcom.dsp -!IF "$(CFG)" == "" -CFG=rdjpgcom - Win32 -!MESSAGE Keine Konfiguration angegeben. rdjpgcom - Win32 wird als Standard verwendet. -!ENDIF - -!IF "$(CFG)" != "rdjpgcom - Win32" -!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben. -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "rdjpgcom.mak" CFG="rdjpgcom - Win32" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "rdjpgcom - Win32" (basierend auf "Win32 (x86) Console Application") -!MESSAGE -!ERROR Eine ungültige Konfiguration wurde angegeben. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -RSC=rc.exe -OUTDIR=.\rdjpgcom\Release -INTDIR=.\rdjpgcom\Release -# Begin Custom Macros -OutDir=.\rdjpgcom\Release -# End Custom Macros - -ALL : "$(OUTDIR)\rdjpgcom.exe" - - -CLEAN : - -@erase "$(INTDIR)\rdjpgcom.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\rdjpgcom.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\rdjpgcom.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\rdjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)\rdjpgcom.exe" -LINK32_OBJS= \ - "$(INTDIR)\rdjpgcom.obj" - -"$(OUTDIR)\rdjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\rdjpgcom.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("rdjpgcom.dep") -!INCLUDE "rdjpgcom.dep" -!ELSE -!MESSAGE Warning: cannot find "rdjpgcom.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "rdjpgcom - Win32" -SOURCE=.\rdjpgcom.c - -"$(INTDIR)\rdjpgcom.obj" : $(SOURCE) "$(INTDIR)" - - - -!ENDIF - diff --git a/thirdparty/jpeg-9e/makervcx.v16 b/thirdparty/jpeg-9e/makervcx.v16 deleted file mode 100644 index 21e412e..0000000 --- a/thirdparty/jpeg-9e/makervcx.v16 +++ /dev/null @@ -1,178 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {C81513DB-78DC-46BC-BC98-82E745203976} - Win32Proj - rdjpgcom - 10.0 - - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makervcx.v17 b/thirdparty/jpeg-9e/makervcx.v17 deleted file mode 100644 index bf20038..0000000 --- a/thirdparty/jpeg-9e/makervcx.v17 +++ /dev/null @@ -1,178 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {C81513DB-78DC-46BC-BC98-82E745203976} - Win32Proj - rdjpgcom - 10.0 - - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - - - - - - - - - - - - - - - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/maketdep.vc6 b/thirdparty/jpeg-9e/maketdep.vc6 deleted file mode 100644 index e177ecb..0000000 --- a/thirdparty/jpeg-9e/maketdep.vc6 +++ /dev/null @@ -1,43 +0,0 @@ -# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von jpegtran.mak - -.\cdjpeg.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\jpegtran.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - ".\jversion.h"\ - ".\transupp.h"\ - - -.\rdswitch.c : \ - ".\cderror.h"\ - ".\cdjpeg.h"\ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpeglib.h"\ - - -.\transupp.c : \ - ".\jconfig.h"\ - ".\jerror.h"\ - ".\jinclude.h"\ - ".\jmorecfg.h"\ - ".\jpegint.h"\ - ".\jpeglib.h"\ - ".\transupp.h"\ - diff --git a/thirdparty/jpeg-9e/maketdsp.vc6 b/thirdparty/jpeg-9e/maketdsp.vc6 deleted file mode 100644 index 00df01a..0000000 --- a/thirdparty/jpeg-9e/maketdsp.vc6 +++ /dev/null @@ -1,122 +0,0 @@ -# Microsoft Developer Studio Project File - Name="jpegtran" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=jpegtran - Win32 -!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "jpegtran.mak". -!MESSAGE -!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "jpegtran.mak" CFG="jpegtran - Win32" -!MESSAGE -!MESSAGE Fr die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "jpegtran - Win32" (basierend auf "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir ".\jpegtran\Release" -# PROP BASE Intermediate_Dir ".\jpegtran\Release" -# PROP BASE Target_Dir ".\jpegtran" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\Release" -# PROP Intermediate_Dir ".\Release\jpegtran" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir ".\jpegtran" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# Begin Target - -# Name "jpegtran - Win32" -# Begin Group "Quellcodedateien" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" -# Begin Source File - -SOURCE=.\cdjpeg.c -# End Source File -# Begin Source File - -SOURCE=.\jpegtran.c -# End Source File -# Begin Source File - -SOURCE=.\rdswitch.c -# End Source File -# Begin Source File - -SOURCE=.\transupp.c -# End Source File -# End Group -# Begin Group "Header-Dateien" - -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" -# Begin Source File - -SOURCE=.\cderror.h -# End Source File -# Begin Source File - -SOURCE=.\cdjpeg.h -# End Source File -# Begin Source File - -SOURCE=.\jconfig.h -# End Source File -# Begin Source File - -SOURCE=.\jerror.h -# End Source File -# Begin Source File - -SOURCE=.\jinclude.h -# End Source File -# Begin Source File - -SOURCE=.\jmorecfg.h -# End Source File -# Begin Source File - -SOURCE=.\jpegint.h -# End Source File -# Begin Source File - -SOURCE=.\jpeglib.h -# End Source File -# Begin Source File - -SOURCE=.\jversion.h -# End Source File -# Begin Source File - -SOURCE=.\transupp.h -# End Source File -# End Group -# Begin Group "Ressourcendateien" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/thirdparty/jpeg-9e/maketfil.v16 b/thirdparty/jpeg-9e/maketfil.v16 deleted file mode 100644 index 4fcb210..0000000 --- a/thirdparty/jpeg-9e/maketfil.v16 +++ /dev/null @@ -1,63 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/maketmak.vc6 b/thirdparty/jpeg-9e/maketmak.vc6 deleted file mode 100644 index a0de38c..0000000 --- a/thirdparty/jpeg-9e/maketmak.vc6 +++ /dev/null @@ -1,131 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on jpegtran.dsp -!IF "$(CFG)" == "" -CFG=jpegtran - Win32 -!MESSAGE Keine Konfiguration angegeben. jpegtran - Win32 wird als Standard verwendet. -!ENDIF - -!IF "$(CFG)" != "jpegtran - Win32" -!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben. -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "jpegtran.mak" CFG="jpegtran - Win32" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "jpegtran - Win32" (basierend auf "Win32 (x86) Console Application") -!MESSAGE -!ERROR Eine ungültige Konfiguration wurde angegeben. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -RSC=rc.exe -OUTDIR=.\jpegtran\Release -INTDIR=.\jpegtran\Release -# Begin Custom Macros -OutDir=.\jpegtran\Release -# End Custom Macros - -ALL : "$(OUTDIR)\jpegtran.exe" - - -CLEAN : - -@erase "$(INTDIR)\cdjpeg.obj" - -@erase "$(INTDIR)\jpegtran.obj" - -@erase "$(INTDIR)\rdswitch.obj" - -@erase "$(INTDIR)\transupp.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\jpegtran.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\jpegtran.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\jpegtran.pdb" /machine:I386 /out:"$(OUTDIR)\jpegtran.exe" -LINK32_OBJS= \ - "$(INTDIR)\cdjpeg.obj" \ - "$(INTDIR)\jpegtran.obj" \ - "$(INTDIR)\rdswitch.obj" \ - "$(INTDIR)\transupp.obj" - -"$(OUTDIR)\jpegtran.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\jpegtran.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("jpegtran.dep") -!INCLUDE "jpegtran.dep" -!ELSE -!MESSAGE Warning: cannot find "jpegtran.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "jpegtran - Win32" -SOURCE=.\cdjpeg.c - -"$(INTDIR)\cdjpeg.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\jpegtran.c - -"$(INTDIR)\jpegtran.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\rdswitch.c - -"$(INTDIR)\rdswitch.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\transupp.c - -"$(INTDIR)\transupp.obj" : $(SOURCE) "$(INTDIR)" - - - -!ENDIF - diff --git a/thirdparty/jpeg-9e/maketvcx.v16 b/thirdparty/jpeg-9e/maketvcx.v16 deleted file mode 100644 index 0a90ae4..0000000 --- a/thirdparty/jpeg-9e/maketvcx.v16 +++ /dev/null @@ -1,193 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {025BAC50-51B5-4FFE-BC47-3F920BB4047E} - Win32Proj - jpegtran - 10.0 - - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/maketvcx.v17 b/thirdparty/jpeg-9e/maketvcx.v17 deleted file mode 100644 index 4d41415..0000000 --- a/thirdparty/jpeg-9e/maketvcx.v17 +++ /dev/null @@ -1,193 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {025BAC50-51B5-4FFE-BC47-3F920BB4047E} - Win32Proj - jpegtran - 10.0 - - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - - - - - - - - - - - - - - - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - $(Configuration)\$(Platform)\jpeg.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makewdep.vc6 b/thirdparty/jpeg-9e/makewdep.vc6 deleted file mode 100644 index 15929bf..0000000 --- a/thirdparty/jpeg-9e/makewdep.vc6 +++ /dev/null @@ -1,6 +0,0 @@ -# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von wrjpgcom.mak - -.\wrjpgcom.c : \ - ".\jconfig.h"\ - ".\jinclude.h"\ - diff --git a/thirdparty/jpeg-9e/makewdsp.vc6 b/thirdparty/jpeg-9e/makewdsp.vc6 deleted file mode 100644 index d2f3887..0000000 --- a/thirdparty/jpeg-9e/makewdsp.vc6 +++ /dev/null @@ -1,78 +0,0 @@ -# Microsoft Developer Studio Project File - Name="wrjpgcom" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=wrjpgcom - Win32 -!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "wrjpgcom.mak". -!MESSAGE -!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "wrjpgcom.mak" CFG="wrjpgcom - Win32" -!MESSAGE -!MESSAGE Fr die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "wrjpgcom - Win32" (basierend auf "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir ".\wrjpgcom\Release" -# PROP BASE Intermediate_Dir ".\wrjpgcom\Release" -# PROP BASE Target_Dir ".\wrjpgcom" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\Release" -# PROP Intermediate_Dir ".\Release\wrjpgcom" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir ".\wrjpgcom" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# Begin Target - -# Name "wrjpgcom - Win32" -# Begin Group "Quellcodedateien" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" -# Begin Source File - -SOURCE=.\wrjpgcom.c -# End Source File -# End Group -# Begin Group "Header-Dateien" - -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" -# Begin Source File - -SOURCE=.\jconfig.h -# End Source File -# Begin Source File - -SOURCE=.\jinclude.h -# End Source File -# End Group -# Begin Group "Ressourcendateien" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/thirdparty/jpeg-9e/makewfil.v16 b/thirdparty/jpeg-9e/makewfil.v16 deleted file mode 100644 index c6ea74d..0000000 --- a/thirdparty/jpeg-9e/makewfil.v16 +++ /dev/null @@ -1,30 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - - - Source Files - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makewmak.vc6 b/thirdparty/jpeg-9e/makewmak.vc6 deleted file mode 100644 index 22b9086..0000000 --- a/thirdparty/jpeg-9e/makewmak.vc6 +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on wrjpgcom.dsp -!IF "$(CFG)" == "" -CFG=wrjpgcom - Win32 -!MESSAGE Keine Konfiguration angegeben. wrjpgcom - Win32 wird als Standard verwendet. -!ENDIF - -!IF "$(CFG)" != "wrjpgcom - Win32" -!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben. -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "wrjpgcom.mak" CFG="wrjpgcom - Win32" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "wrjpgcom - Win32" (basierend auf "Win32 (x86) Console Application") -!MESSAGE -!ERROR Eine ungültige Konfiguration wurde angegeben. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -RSC=rc.exe -OUTDIR=.\wrjpgcom\Release -INTDIR=.\wrjpgcom\Release -# Begin Custom Macros -OutDir=.\wrjpgcom\Release -# End Custom Macros - -ALL : "$(OUTDIR)\wrjpgcom.exe" - - -CLEAN : - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\wrjpgcom.obj" - -@erase "$(OUTDIR)\wrjpgcom.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\wrjpgcom.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\wrjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)\wrjpgcom.exe" -LINK32_OBJS= \ - "$(INTDIR)\wrjpgcom.obj" - -"$(OUTDIR)\wrjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\wrjpgcom.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("wrjpgcom.dep") -!INCLUDE "wrjpgcom.dep" -!ELSE -!MESSAGE Warning: cannot find "wrjpgcom.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "wrjpgcom - Win32" -SOURCE=.\wrjpgcom.c - -"$(INTDIR)\wrjpgcom.obj" : $(SOURCE) "$(INTDIR)" - - - -!ENDIF - diff --git a/thirdparty/jpeg-9e/makewvcx.v16 b/thirdparty/jpeg-9e/makewvcx.v16 deleted file mode 100644 index 2ecbb2c..0000000 --- a/thirdparty/jpeg-9e/makewvcx.v16 +++ /dev/null @@ -1,178 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {B57065D4-DDDA-4668-BAF5-2D49270C973C} - Win32Proj - wrjpgcom - 10.0 - - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - Application - false - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makewvcx.v17 b/thirdparty/jpeg-9e/makewvcx.v17 deleted file mode 100644 index 542b4ad..0000000 --- a/thirdparty/jpeg-9e/makewvcx.v17 +++ /dev/null @@ -1,178 +0,0 @@ - - - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {B57065D4-DDDA-4668-BAF5-2D49270C973C} - Win32Proj - wrjpgcom - 10.0 - - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - Application - false - true - Unicode - v143 - - - - - - - - - - - - - - - - - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - false - $(Configuration)\$(Platform)\ - $(Configuration)\$(Platform)\$(ProjectName)\ - - - - Level3 - NotUsing - Full - true - false - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - Level3 - NotUsing - Full - true - false - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS - true - true - 4996 - - - Console - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jpeg-9e/makljpeg.st b/thirdparty/jpeg-9e/makljpeg.st deleted file mode 100644 index cc1ba01..0000000 --- a/thirdparty/jpeg-9e/makljpeg.st +++ /dev/null @@ -1,68 +0,0 @@ -; Project file for Independent JPEG Group's software -; -; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. -; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding. -; -; To use this file, rename it to libjpeg.prj. -; Read installation instructions before trying to make the program! -; -; -; * * * Output file * * * -libjpeg.lib -; -; * * * COMPILER OPTIONS * * * -.C[-P] ; absolute calls -.C[-M] ; and no string merging, folks -.C[-w-cln] ; no "constant is long" warnings -.C[-w-par] ; no "parameter xxxx unused" -.C[-w-rch] ; no "unreachable code" -.C[-wsig] ; warn if significant digits may be lost -.L[-J] ; link new Obj-format (so we get a library) -= -; * * * * List of modules * * * * -jaricom.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcarith.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jccoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jccolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcdctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jchuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcinit.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcomapi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcparam.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcprepct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jctrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdarith.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdatadst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h) -jdatasrc.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h) -jdcoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdcolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jddctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jdhuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdinput.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdmerge.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdpostct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdtrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jerror.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jversion.h,jerror.h) -jfdctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jfdctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jfdctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jidctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jidctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jidctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jquant1.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jquant2.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jutils.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jmemmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h) -jmemansi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h) diff --git a/thirdparty/jpeg-9e/maktjpeg.st b/thirdparty/jpeg-9e/maktjpeg.st deleted file mode 100644 index 43f078a..0000000 --- a/thirdparty/jpeg-9e/maktjpeg.st +++ /dev/null @@ -1,30 +0,0 @@ -; Project file for Independent JPEG Group's software -; -; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. -; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding. -; -; To use this file, rename it to jpegtran.prj. -; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." -; Read installation instructions before trying to make the program! -; -; -; * * * Output file * * * -jpegtran.ttp -; -; * * * COMPILER OPTIONS * * * -.C[-P] ; absolute calls -.C[-M] ; and no string merging, folks -.C[-w-cln] ; no "constant is long" warnings -.C[-w-par] ; no "parameter xxxx unused" -.C[-w-rch] ; no "unreachable code" -.C[-wsig] ; warn if significant digits may be lost -= -; * * * * List of modules * * * * -pcstart.o -jpegtran.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,transupp.h,jversion.h) -cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -transupp.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,transupp.h) -libjpeg.lib ; built by libjpeg.prj -pcstdlib.lib ; standard library -pcextlib.lib ; extended library diff --git a/thirdparty/jpeg-9e/makvms.opt b/thirdparty/jpeg-9e/makvms.opt deleted file mode 100644 index 675e8fe..0000000 --- a/thirdparty/jpeg-9e/makvms.opt +++ /dev/null @@ -1,4 +0,0 @@ -! A pointer to the VAX/VMS C Run-Time Shareable Library. -! This file is needed by makefile.mms and makefile.vms, -! but only for the older VAX C compiler. DEC C does not need it. -Sys$Library:VAXCRTL.EXE /Share diff --git a/thirdparty/jpeg-9e/missing b/thirdparty/jpeg-9e/missing deleted file mode 100755 index 1fe1611..0000000 --- a/thirdparty/jpeg-9e/missing +++ /dev/null @@ -1,215 +0,0 @@ -#! /bin/sh -# Common wrapper for a few potentially missing GNU programs. - -scriptversion=2018-03-07.03; # UTC - -# Copyright (C) 1996-2021 Free Software Foundation, Inc. -# Originally written by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try '$0 --help' for more information" - exit 1 -fi - -case $1 in - - --is-lightweight) - # Used by our autoconf macros to check whether the available missing - # script is modern enough. - exit 0 - ;; - - --run) - # Back-compat with the calling convention used by older automake. - shift - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due -to PROGRAM being missing or too old. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal autoconf autoheader autom4te automake makeinfo - bison yacc flex lex help2man - -Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and -'g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: unknown '$1' option" - echo 1>&2 "Try '$0 --help' for more information" - exit 1 - ;; - -esac - -# Run the given program, remember its exit status. -"$@"; st=$? - -# If it succeeded, we are done. -test $st -eq 0 && exit 0 - -# Also exit now if we it failed (or wasn't found), and '--version' was -# passed; such an option is passed most likely to detect whether the -# program is present and works. -case $2 in --version|--help) exit $st;; esac - -# Exit code 63 means version mismatch. This often happens when the user -# tries to use an ancient version of a tool on a file that requires a -# minimum version. -if test $st -eq 63; then - msg="probably too old" -elif test $st -eq 127; then - # Program was missing. - msg="missing on your system" -else - # Program was found and executed, but failed. Give up. - exit $st -fi - -perl_URL=https://www.perl.org/ -flex_URL=https://github.com/westes/flex -gnu_software_URL=https://www.gnu.org/software - -program_details () -{ - case $1 in - aclocal|automake) - echo "The '$1' program is part of the GNU Automake package:" - echo "<$gnu_software_URL/automake>" - echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/autoconf>" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - autoconf|autom4te|autoheader) - echo "The '$1' program is part of the GNU Autoconf package:" - echo "<$gnu_software_URL/autoconf/>" - echo "It also requires GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - esac -} - -give_advice () -{ - # Normalize program name to check for. - normalized_program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - - printf '%s\n' "'$1' is $msg." - - configure_deps="'configure.ac' or m4 files included by 'configure.ac'" - case $normalized_program in - autoconf*) - echo "You should only need it if you modified 'configure.ac'," - echo "or m4 files included by it." - program_details 'autoconf' - ;; - autoheader*) - echo "You should only need it if you modified 'acconfig.h' or" - echo "$configure_deps." - program_details 'autoheader' - ;; - automake*) - echo "You should only need it if you modified 'Makefile.am' or" - echo "$configure_deps." - program_details 'automake' - ;; - aclocal*) - echo "You should only need it if you modified 'acinclude.m4' or" - echo "$configure_deps." - program_details 'aclocal' - ;; - autom4te*) - echo "You might have modified some maintainer files that require" - echo "the 'autom4te' program to be rebuilt." - program_details 'autom4te' - ;; - bison*|yacc*) - echo "You should only need it if you modified a '.y' file." - echo "You may want to install the GNU Bison package:" - echo "<$gnu_software_URL/bison/>" - ;; - lex*|flex*) - echo "You should only need it if you modified a '.l' file." - echo "You may want to install the Fast Lexical Analyzer package:" - echo "<$flex_URL>" - ;; - help2man*) - echo "You should only need it if you modified a dependency" \ - "of a man page." - echo "You may want to install the GNU Help2man package:" - echo "<$gnu_software_URL/help2man/>" - ;; - makeinfo*) - echo "You should only need it if you modified a '.texi' file, or" - echo "any other file indirectly affecting the aspect of the manual." - echo "You might want to install the Texinfo package:" - echo "<$gnu_software_URL/texinfo/>" - echo "The spurious makeinfo call might also be the consequence of" - echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" - echo "want to install GNU make:" - echo "<$gnu_software_URL/make/>" - ;; - *) - echo "You might have modified some files without having the proper" - echo "tools for further handling them. Check the 'README' file, it" - echo "often tells you about the needed prerequisites for installing" - echo "this package. You may also peek at any GNU archive site, in" - echo "case some other package contains this missing '$1' program." - ;; - esac -} - -give_advice "$1" | sed -e '1s/^/WARNING: /' \ - -e '2,$s/^/ /' >&2 - -# Propagate the correct exit status (expected to be 127 for a program -# not found, 63 for a program that failed due to version mismatch). -exit $st - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/thirdparty/jpeg-9e/rdbmp.c b/thirdparty/jpeg-9e/rdbmp.c deleted file mode 100644 index 6749ea0..0000000 --- a/thirdparty/jpeg-9e/rdbmp.c +++ /dev/null @@ -1,469 +0,0 @@ -/* - * rdbmp.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2009-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to read input images in Microsoft "BMP" - * format (MS Windows 3.x, OS/2 1.x, and OS/2 2.x flavors). - * Currently, only 8-, 24-, and 32-bit images are supported, not 1-bit or - * 4-bit (feeding such low-depth images into JPEG would be silly anyway). - * Also, we don't support RLE-compressed files. - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume input from - * an ordinary stdio stream. They further assume that reading begins - * at the start of the file; start_input may need work if the - * user interface has already read some data (e.g., to determine that - * the file is indeed BMP format). - * - * This code contributed by James Arthur Boucher. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef BMP_SUPPORTED - - -/* Macros to deal with unsigned chars as efficiently as compiler allows */ - -#ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char U_CHAR; -#define UCH(x) ((int) (x)) -#else /* !HAVE_UNSIGNED_CHAR */ -typedef char U_CHAR; -#ifdef CHAR_IS_UNSIGNED -#define UCH(x) ((int) (x)) -#else -#define UCH(x) ((int) (x) & 0xFF) -#endif -#endif /* HAVE_UNSIGNED_CHAR */ - - -#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) - - -/* Private version of data source object */ - -typedef struct _bmp_source_struct * bmp_source_ptr; - -typedef struct _bmp_source_struct { - struct cjpeg_source_struct pub; /* public fields */ - - j_compress_ptr cinfo; /* back link saves passing separate parm */ - - JSAMPARRAY colormap; /* BMP colormap (converted to my format) */ - - jvirt_sarray_ptr whole_image; /* Needed to reverse row order */ - JDIMENSION source_row; /* Current source row number */ - JDIMENSION row_width; /* Physical width of scanlines in file */ - - int bits_per_pixel; /* remembers 8-, 24-, or 32-bit format */ - int cmap_length; /* colormap length */ -} bmp_source_struct; - - -LOCAL(int) -read_byte (bmp_source_ptr sinfo) -/* Read next byte from BMP file */ -{ - register FILE *infile = sinfo->pub.input_file; - register int c; - - if ((c = getc(infile)) == EOF) - ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); - return c; -} - - -LOCAL(void) -read_colormap (bmp_source_ptr sinfo, int cmaplen, int mapentrysize) -/* Read the colormap from a BMP file */ -{ - int i; - - switch (mapentrysize) { - case 3: - /* BGR format (occurs in OS/2 files) */ - for (i = 0; i < cmaplen; i++) { - sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); - } - break; - case 4: - /* BGR0 format (occurs in MS Windows files) */ - for (i = 0; i < cmaplen; i++) { - sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); - (void) read_byte(sinfo); - } - break; - default: - ERREXIT(sinfo->cinfo, JERR_BMP_BADCMAP); - } -} - - -/* - * Read one row of pixels. - * The image has been read into the whole_image array, but is otherwise - * unprocessed. We must read it out in top-to-bottom row order, and if - * it is an 8-bit image, we must expand colormapped pixels to 24bit format. - */ - -METHODDEF(JDIMENSION) -get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 8-bit colormap indexes */ -{ - bmp_source_ptr source = (bmp_source_ptr) sinfo; - register JSAMPROW inptr, outptr; - register JSAMPARRAY colormap; - register JDIMENSION col; - register int t; - int cmaplen; - - /* Fetch next row from virtual array */ - source->source_row--; - inptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, - source->whole_image, source->source_row, (JDIMENSION) 1, FALSE); - - /* Expand the colormap indexes to real data */ - outptr = source->pub.buffer[0]; - colormap = source->colormap; - cmaplen = source->cmap_length; - for (col = cinfo->image_width; col > 0; col--) { - t = GETJSAMPLE(*inptr++); - if (t >= cmaplen) - ERREXIT(cinfo, JERR_BMP_OUTOFRANGE); - *outptr++ = colormap[0][t]; /* can omit GETJSAMPLE() safely */ - *outptr++ = colormap[1][t]; - *outptr++ = colormap[2][t]; - } - - return 1; -} - -METHODDEF(JDIMENSION) -get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 24-bit pixels */ -{ - bmp_source_ptr source = (bmp_source_ptr) sinfo; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - - /* Fetch next row from virtual array */ - source->source_row--; - inptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, - source->whole_image, source->source_row, (JDIMENSION) 1, FALSE); - - /* Transfer data. Note source values are in BGR order - * (even though Microsoft's own documents say the opposite). - */ - outptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ - outptr[1] = *inptr++; - outptr[0] = *inptr++; - outptr += 3; - } - - return 1; -} - -METHODDEF(JDIMENSION) -get_32bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 32-bit pixels */ -{ - bmp_source_ptr source = (bmp_source_ptr) sinfo; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - - /* Fetch next row from virtual array */ - source->source_row--; - inptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, - source->whole_image, source->source_row, (JDIMENSION) 1, FALSE); - - /* Transfer data. Note source values are in BGR order - * (even though Microsoft's own documents say the opposite). - */ - outptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ - outptr[1] = *inptr++; - outptr[0] = *inptr++; - inptr++; /* skip the 4th byte (Alpha channel) */ - outptr += 3; - } - - return 1; -} - - -/* - * This method loads the image into whole_image during the first call on - * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call - * get_8bit_row, get_24bit_row, or get_32bit_row on subsequent calls. - */ - -METHODDEF(JDIMENSION) -preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - bmp_source_ptr source = (bmp_source_ptr) sinfo; - register FILE *infile = source->pub.input_file; - register int c; - register JSAMPROW out_ptr; - JDIMENSION row, col; - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - - /* Read the data into a virtual array in input-file row order. */ - for (row = 0; row < cinfo->image_height; row++) { - if (progress != NULL) { - progress->pub.pass_counter = (long) row; - progress->pub.pass_limit = (long) cinfo->image_height; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } - out_ptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, - source->whole_image, row, (JDIMENSION) 1, TRUE); - for (col = source->row_width; col > 0; col--) { - /* inline copy of read_byte() for speed */ - if ((c = getc(infile)) == EOF) - ERREXIT(cinfo, JERR_INPUT_EOF); - *out_ptr++ = (JSAMPLE) c; - } - } - if (progress != NULL) - progress->completed_extra_passes++; - - /* Set up to read from the virtual array in top-to-bottom order */ - switch (source->bits_per_pixel) { - case 8: - source->pub.get_pixel_rows = get_8bit_row; - break; - case 24: - source->pub.get_pixel_rows = get_24bit_row; - break; - case 32: - source->pub.get_pixel_rows = get_32bit_row; - break; - default: - ERREXIT(cinfo, JERR_BMP_BADDEPTH); - } - source->source_row = cinfo->image_height; - - /* And read the first row */ - return (*source->pub.get_pixel_rows) (cinfo, sinfo); -} - - -/* - * Read the file header; return image size and component count. - */ - -METHODDEF(void) -start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - bmp_source_ptr source = (bmp_source_ptr) sinfo; - U_CHAR bmpfileheader[14]; - U_CHAR bmpinfoheader[64]; -#define GET_2B(array, offset) ((unsigned int) UCH(array[offset]) + \ - (((unsigned int) UCH(array[offset+1])) << 8)) -#define GET_4B(array, offset) ((INT32) UCH(array[offset]) + \ - (((INT32) UCH(array[offset+1])) << 8) + \ - (((INT32) UCH(array[offset+2])) << 16) + \ - (((INT32) UCH(array[offset+3])) << 24)) - INT32 bfOffBits; - INT32 headerSize; - INT32 biWidth; - INT32 biHeight; - unsigned int biPlanes; - INT32 biCompression; - INT32 biXPelsPerMeter,biYPelsPerMeter; - INT32 biClrUsed = 0; - int mapentrysize = 0; /* 0 indicates no colormap */ - INT32 bPad; - JDIMENSION row_width; - - /* Read and verify the bitmap file header */ - if (! ReadOK(source->pub.input_file, bmpfileheader, 14)) - ERREXIT(cinfo, JERR_INPUT_EOF); - if (GET_2B(bmpfileheader, 0) != 0x4D42) /* 'BM' */ - ERREXIT(cinfo, JERR_BMP_NOT); - bfOffBits = GET_4B(bmpfileheader, 10); - /* We ignore the remaining fileheader fields */ - - /* The infoheader might be 12 bytes (OS/2 1.x), 40 bytes (Windows), - * or 64 bytes (OS/2 2.x). Check the first 4 bytes to find out which. - */ - if (! ReadOK(source->pub.input_file, bmpinfoheader, 4)) - ERREXIT(cinfo, JERR_INPUT_EOF); - headerSize = GET_4B(bmpinfoheader, 0); - if (headerSize < 12 || headerSize > 64) - ERREXIT(cinfo, JERR_BMP_BADHEADER); - if (! ReadOK(source->pub.input_file, bmpinfoheader + 4, headerSize - 4)) - ERREXIT(cinfo, JERR_INPUT_EOF); - - switch ((int) headerSize) { - case 12: - /* Decode OS/2 1.x header (Microsoft calls this a BITMAPCOREHEADER) */ - biWidth = (INT32) GET_2B(bmpinfoheader, 4); - biHeight = (INT32) GET_2B(bmpinfoheader, 6); - biPlanes = GET_2B(bmpinfoheader, 8); - source->bits_per_pixel = (int) GET_2B(bmpinfoheader, 10); - - switch (source->bits_per_pixel) { - case 8: /* colormapped image */ - mapentrysize = 3; /* OS/2 uses RGBTRIPLE colormap */ - TRACEMS2(cinfo, 1, JTRC_BMP_OS2_MAPPED, (int) biWidth, (int) biHeight); - break; - case 24: /* RGB image */ - case 32: /* RGB image + Alpha channel */ - TRACEMS3(cinfo, 1, JTRC_BMP_OS2, (int) biWidth, (int) biHeight, - source->bits_per_pixel); - break; - default: - ERREXIT(cinfo, JERR_BMP_BADDEPTH); - } - break; - case 40: - case 64: - /* Decode Windows 3.x header (Microsoft calls this a BITMAPINFOHEADER) */ - /* or OS/2 2.x header, which has additional fields that we ignore */ - biWidth = GET_4B(bmpinfoheader, 4); - biHeight = GET_4B(bmpinfoheader, 8); - biPlanes = GET_2B(bmpinfoheader, 12); - source->bits_per_pixel = (int) GET_2B(bmpinfoheader, 14); - biCompression = GET_4B(bmpinfoheader, 16); - biXPelsPerMeter = GET_4B(bmpinfoheader, 24); - biYPelsPerMeter = GET_4B(bmpinfoheader, 28); - biClrUsed = GET_4B(bmpinfoheader, 32); - /* biSizeImage, biClrImportant fields are ignored */ - - switch (source->bits_per_pixel) { - case 8: /* colormapped image */ - mapentrysize = 4; /* Windows uses RGBQUAD colormap */ - TRACEMS2(cinfo, 1, JTRC_BMP_MAPPED, (int) biWidth, (int) biHeight); - break; - case 24: /* RGB image */ - case 32: /* RGB image + Alpha channel */ - TRACEMS3(cinfo, 1, JTRC_BMP, (int) biWidth, (int) biHeight, - source->bits_per_pixel); - break; - default: - ERREXIT(cinfo, JERR_BMP_BADDEPTH); - } - if (biCompression != 0) - ERREXIT(cinfo, JERR_BMP_COMPRESSED); - - if (biXPelsPerMeter > 0 && biYPelsPerMeter > 0) { - /* Set JFIF density parameters from the BMP data */ - cinfo->X_density = (UINT16) (biXPelsPerMeter/100); /* 100 cm per meter */ - cinfo->Y_density = (UINT16) (biYPelsPerMeter/100); - cinfo->density_unit = 2; /* dots/cm */ - } - break; - default: - ERREXIT(cinfo, JERR_BMP_BADHEADER); - return; /* avoid compiler warnings for uninitialized variables */ - } - - if (biPlanes != 1) - ERREXIT(cinfo, JERR_BMP_BADPLANES); - /* Sanity check for buffer allocation below */ - if (biWidth <= 0 || biHeight <= 0 || (biWidth >> 24) || (biHeight >> 24)) - ERREXIT(cinfo, JERR_BMP_OUTOFRANGE); - - /* Compute distance to bitmap data --- will adjust for colormap below */ - bPad = bfOffBits - (headerSize + 14); - - /* Read the colormap, if any */ - if (mapentrysize > 0) { - if (biClrUsed <= 0) - biClrUsed = 256; /* assume it's 256 */ - else if (biClrUsed > 256) - ERREXIT(cinfo, JERR_BMP_BADCMAP); - /* Allocate space to store the colormap */ - source->colormap = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, - JPOOL_IMAGE, (JDIMENSION) biClrUsed, (JDIMENSION) 3); - source->cmap_length = (int) biClrUsed; - /* and read it from the file */ - read_colormap(source, (int) biClrUsed, mapentrysize); - /* account for size of colormap */ - bPad -= biClrUsed * mapentrysize; - } - - /* Skip any remaining pad bytes */ - if (bPad < 0) /* incorrect bfOffBits value? */ - ERREXIT(cinfo, JERR_BMP_BADHEADER); - while (--bPad >= 0) { - (void) read_byte(source); - } - - /* Compute row width in file, including padding to 4-byte boundary */ - if (source->bits_per_pixel == 24) - row_width = (JDIMENSION) (biWidth * 3); - else if (source->bits_per_pixel == 32) - row_width = (JDIMENSION) (biWidth * 4); - else - row_width = (JDIMENSION) biWidth; - while ((row_width & 3) != 0) row_width++; - source->row_width = row_width; - - /* Allocate space for inversion array, prepare for preload pass */ - source->whole_image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - row_width, (JDIMENSION) biHeight, (JDIMENSION) 1); - source->pub.get_pixel_rows = preload_image; - if (cinfo->progress != NULL) { - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - progress->total_extra_passes++; /* count file input as separate pass */ - } - - /* Allocate one-row buffer for returned data */ - source->pub.buffer = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, - JPOOL_IMAGE, (JDIMENSION) (biWidth * 3), (JDIMENSION) 1); - source->pub.buffer_height = 1; - - cinfo->in_color_space = JCS_RGB; - cinfo->input_components = 3; - cinfo->data_precision = 8; - cinfo->image_width = (JDIMENSION) biWidth; - cinfo->image_height = (JDIMENSION) biHeight; -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - /* no work */ -} - - -/* - * The module selection routine for BMP format input. - */ - -GLOBAL(cjpeg_source_ptr) -jinit_read_bmp (j_compress_ptr cinfo) -{ - bmp_source_ptr source; - - /* Create module interface object */ - source = (bmp_source_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(bmp_source_struct)); - source->cinfo = cinfo; /* make back link for subroutines */ - /* Fill in method ptrs, except get_pixel_rows which start_input sets */ - source->pub.start_input = start_input_bmp; - source->pub.finish_input = finish_input_bmp; - - return &source->pub; -} - -#endif /* BMP_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/rdcolmap.c b/thirdparty/jpeg-9e/rdcolmap.c deleted file mode 100644 index 42b3437..0000000 --- a/thirdparty/jpeg-9e/rdcolmap.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - * rdcolmap.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file implements djpeg's "-map file" switch. It reads a source image - * and constructs a colormap to be supplied to the JPEG decompressor. - * - * Currently, these file formats are supported for the map file: - * GIF: the contents of the GIF's global colormap are used. - * PPM (either text or raw flavor): the entire file is read and - * each unique pixel value is entered in the map. - * Note that reading a large PPM file will be horrendously slow. - * Typically, a PPM-format map file should contain just one pixel - * of each desired color. Such a file can be extracted from an - * ordinary image PPM file with ppmtomap(1). - * - * Rescaling a PPM that has a maxval unequal to MAXJSAMPLE is not - * currently implemented. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ - -/* Portions of this code are based on the PBMPLUS library, which is: -** -** Copyright (C) 1988 by Jef Poskanzer. -** -** Permission to use, copy, modify, and distribute this software and its -** documentation for any purpose and without fee is hereby granted, provided -** that the above copyright notice appear in all copies and that both that -** copyright notice and this permission notice appear in supporting -** documentation. This software is provided "as is" without express or -** implied warranty. -*/ - - -/* - * Add a (potentially) new color to the color map. - */ - -LOCAL(void) -add_map_entry (j_decompress_ptr cinfo, int R, int G, int B) -{ - JSAMPROW colormap0 = cinfo->colormap[0]; - JSAMPROW colormap1 = cinfo->colormap[1]; - JSAMPROW colormap2 = cinfo->colormap[2]; - int ncolors = cinfo->actual_number_of_colors; - int index; - - /* Check for duplicate color. */ - for (index = 0; index < ncolors; index++) { - if (GETJSAMPLE(colormap0[index]) == R && - GETJSAMPLE(colormap1[index]) == G && - GETJSAMPLE(colormap2[index]) == B) - return; /* color is already in map */ - } - - /* Check for map overflow. */ - if (ncolors >= (MAXJSAMPLE+1)) - ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, (MAXJSAMPLE+1)); - - /* OK, add color to map. */ - colormap0[ncolors] = (JSAMPLE) R; - colormap1[ncolors] = (JSAMPLE) G; - colormap2[ncolors] = (JSAMPLE) B; - cinfo->actual_number_of_colors++; -} - - -/* - * Extract color map from a GIF file. - */ - -LOCAL(void) -read_gif_map (j_decompress_ptr cinfo, FILE * infile) -{ - int header[13]; - int i, colormaplen; - int R, G, B; - - /* Initial 'G' has already been read by read_color_map */ - /* Read the rest of the GIF header and logical screen descriptor */ - for (i = 1; i < 13; i++) { - if ((header[i] = getc(infile)) == EOF) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - } - - /* Verify GIF Header */ - if (header[1] != 'I' || header[2] != 'F') - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - - /* There must be a global color map. */ - if ((header[10] & 0x80) == 0) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - - /* OK, fetch it. */ - colormaplen = 2 << (header[10] & 0x07); - - for (i = 0; i < colormaplen; i++) { - R = getc(infile); - G = getc(infile); - B = getc(infile); - if (R == EOF || G == EOF || B == EOF) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - add_map_entry(cinfo, - R << (BITS_IN_JSAMPLE-8), - G << (BITS_IN_JSAMPLE-8), - B << (BITS_IN_JSAMPLE-8)); - } -} - - -/* Support routines for reading PPM */ - - -LOCAL(int) -pbm_getc (FILE * infile) -/* Read next char, skipping over any comments */ -/* A comment/newline sequence is returned as a newline */ -{ - register int ch; - - ch = getc(infile); - if (ch == '#') { - do { - ch = getc(infile); - } while (ch != '\n' && ch != EOF); - } - return ch; -} - - -LOCAL(unsigned int) -read_pbm_integer (j_decompress_ptr cinfo, FILE * infile) -/* Read an unsigned decimal integer from the PPM file */ -/* Swallows one trailing character after the integer */ -/* Note that on a 16-bit-int machine, only values up to 64k can be read. */ -/* This should not be a problem in practice. */ -{ - register int ch; - register unsigned int val; - - /* Skip any leading whitespace */ - do { - ch = pbm_getc(infile); - if (ch == EOF) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); - - if (ch < '0' || ch > '9') - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - - val = ch - '0'; - while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') { - val *= 10; - val += ch - '0'; - } - return val; -} - - -/* - * Extract color map from a PPM file. - */ - -LOCAL(void) -read_ppm_map (j_decompress_ptr cinfo, FILE * infile) -{ - int c; - unsigned int w, h, maxval, row, col; - int R, G, B; - - /* Initial 'P' has already been read by read_color_map */ - c = getc(infile); /* save format discriminator for a sec */ - - /* while we fetch the remaining header info */ - w = read_pbm_integer(cinfo, infile); - h = read_pbm_integer(cinfo, infile); - maxval = read_pbm_integer(cinfo, infile); - - if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - - /* For now, we don't support rescaling from an unusual maxval. */ - if (maxval != (unsigned int) MAXJSAMPLE) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - - switch (c) { - case '3': /* it's a text-format PPM file */ - for (row = 0; row < h; row++) { - for (col = 0; col < w; col++) { - R = read_pbm_integer(cinfo, infile); - G = read_pbm_integer(cinfo, infile); - B = read_pbm_integer(cinfo, infile); - add_map_entry(cinfo, R, G, B); - } - } - break; - - case '6': /* it's a raw-format PPM file */ - for (row = 0; row < h; row++) { - for (col = 0; col < w; col++) { - R = getc(infile); - G = getc(infile); - B = getc(infile); - if (R == EOF || G == EOF || B == EOF) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - add_map_entry(cinfo, R, G, B); - } - } - break; - - default: - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - break; - } -} - - -/* - * Main entry point from djpeg.c. - * Input: opened input file (from file name argument on command line). - * Output: colormap and actual_number_of_colors fields are set in cinfo. - */ - -GLOBAL(void) -read_color_map (j_decompress_ptr cinfo, FILE * infile) -{ - /* Allocate space for a color map of maximum supported size. */ - cinfo->colormap = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) (MAXJSAMPLE+1), (JDIMENSION) 3); - cinfo->actual_number_of_colors = 0; /* initialize map to empty */ - - /* Read first byte to determine file format */ - switch (getc(infile)) { - case 'G': - read_gif_map(cinfo, infile); - break; - case 'P': - read_ppm_map(cinfo, infile); - break; - default: - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - break; - } -} - -#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/rdgif.c b/thirdparty/jpeg-9e/rdgif.c deleted file mode 100644 index 5d2339c..0000000 --- a/thirdparty/jpeg-9e/rdgif.c +++ /dev/null @@ -1,679 +0,0 @@ -/* - * rdgif.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2019-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to read input images in GIF format. - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume input from - * an ordinary stdio stream. They further assume that reading begins - * at the start of the file; start_input may need work if the - * user interface has already read some data (e.g., to determine that - * the file is indeed GIF format). - */ - -/* - * This code is loosely based on giftoppm from the PBMPLUS distribution - * of Feb. 1991. That file contains the following copyright notice: - * +-------------------------------------------------------------------+ - * | Copyright 1990, David Koblas. | - * | Permission to use, copy, modify, and distribute this software | - * | and its documentation for any purpose and without fee is hereby | - * | granted, provided that the above copyright notice appear in all | - * | copies and that both that copyright notice and this permission | - * | notice appear in supporting documentation. This software is | - * | provided "as is" without express or implied warranty. | - * +-------------------------------------------------------------------+ - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef GIF_SUPPORTED - - -/* Macros to deal with unsigned chars as efficiently as compiler allows */ - -#ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char U_CHAR; -#define UCH(x) ((int) (x)) -#else /* !HAVE_UNSIGNED_CHAR */ -typedef char U_CHAR; -#ifdef CHAR_IS_UNSIGNED -#define UCH(x) ((int) (x)) -#else -#define UCH(x) ((int) (x) & 0xFF) -#endif -#endif /* HAVE_UNSIGNED_CHAR */ - - -#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) - - -#define MAXCOLORMAPSIZE 256 /* max # of colors in a GIF colormap */ -#define NUMCOLORS 3 /* # of colors */ -#define CM_RED 0 /* color component numbers */ -#define CM_GREEN 1 -#define CM_BLUE 2 - -#define MAX_LZW_BITS 12 /* maximum LZW code size */ -#define LZW_TABLE_SIZE (1< table of prefix symbols */ - UINT8 FAR *symbol_tail; /* => table of suffix bytes */ - UINT8 FAR *symbol_stack; /* => stack for symbol expansions */ - UINT8 FAR *sp; /* stack pointer */ - - /* State for interlaced image processing */ - boolean is_interlaced; /* TRUE if have interlaced image */ - jvirt_sarray_ptr interlaced_image; /* full image in interlaced order */ - JDIMENSION cur_row_number; /* need to know actual row number */ - JDIMENSION pass2_offset; /* # of pixel rows in pass 1 */ - JDIMENSION pass3_offset; /* # of pixel rows in passes 1&2 */ - JDIMENSION pass4_offset; /* # of pixel rows in passes 1,2,3 */ -} gif_source_struct; - -typedef gif_source_struct * gif_source_ptr; - - -/* Forward declarations */ -METHODDEF(JDIMENSION) get_pixel_rows - JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); -METHODDEF(JDIMENSION) load_interlaced_image - JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); -METHODDEF(JDIMENSION) get_interlaced_row - JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); - - -LOCAL(int) -ReadByte (gif_source_ptr sinfo) -/* Read next byte from GIF file */ -{ - register FILE *infile = sinfo->pub.input_file; - register int c; - - if ((c = getc(infile)) == EOF) - ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); - return c; -} - - -LOCAL(int) -GetDataBlock (gif_source_ptr sinfo, U_CHAR *buf) -/* Read a GIF data block, which has a leading count byte */ -/* A zero-length block marks the end of a data block sequence */ -{ - int count; - - count = ReadByte(sinfo); - if (count > 0) { - if (! ReadOK(sinfo->pub.input_file, buf, count)) - ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); - } - return count; -} - - -LOCAL(void) -SkipDataBlocks (gif_source_ptr sinfo) -/* Skip a series of data blocks, until a block terminator is found */ -{ - U_CHAR buf[256]; - - while (GetDataBlock(sinfo, buf) > 0) - /* skip */; -} - - -LOCAL(void) -ReInitLZW (gif_source_ptr sinfo) -/* (Re)initialize LZW state; shared code for startup and Clear processing */ -{ - sinfo->code_size = sinfo->input_code_size + 1; - sinfo->limit_code = sinfo->clear_code << 1; /* 2^code_size */ - sinfo->max_code = sinfo->clear_code + 2; /* first unused code value */ - sinfo->sp = sinfo->symbol_stack; /* init stack to empty */ -} - - -LOCAL(void) -InitLZWCode (gif_source_ptr sinfo) -/* Initialize for a series of LZWReadByte (and hence GetCode) calls */ -{ - /* GetCode initialization */ - sinfo->last_byte = 2; /* make safe to "recopy last two bytes" */ - sinfo->code_buf[0] = 0; - sinfo->code_buf[1] = 0; - sinfo->last_bit = 0; /* nothing in the buffer */ - sinfo->cur_bit = 0; /* force buffer load on first call */ - sinfo->first_time = TRUE; - sinfo->out_of_blocks = FALSE; - - /* LZWReadByte initialization: */ - /* compute special code values (note that these do not change later) */ - sinfo->clear_code = 1 << sinfo->input_code_size; - sinfo->end_code = sinfo->clear_code + 1; - ReInitLZW(sinfo); -} - - -LOCAL(int) -GetCode (gif_source_ptr sinfo) -/* Fetch the next code_size bits from the GIF data */ -/* We assume code_size is less than 16 */ -{ - register INT32 accum; - int offs, count; - - while (sinfo->cur_bit + sinfo->code_size > sinfo->last_bit) { - /* Time to reload the buffer */ - /* First time, share code with Clear case */ - if (sinfo->first_time) { - sinfo->first_time = FALSE; - return sinfo->clear_code; - } - if (sinfo->out_of_blocks) { - WARNMS(sinfo->cinfo, JWRN_GIF_NOMOREDATA); - return sinfo->end_code; /* fake something useful */ - } - /* preserve last two bytes of what we have -- assume code_size <= 16 */ - sinfo->code_buf[0] = sinfo->code_buf[sinfo->last_byte-2]; - sinfo->code_buf[1] = sinfo->code_buf[sinfo->last_byte-1]; - /* Load more bytes; set flag if we reach the terminator block */ - if ((count = GetDataBlock(sinfo, &sinfo->code_buf[2])) == 0) { - sinfo->out_of_blocks = TRUE; - WARNMS(sinfo->cinfo, JWRN_GIF_NOMOREDATA); - return sinfo->end_code; /* fake something useful */ - } - /* Reset counters */ - sinfo->cur_bit = (sinfo->cur_bit - sinfo->last_bit) + 16; - sinfo->last_byte = 2 + count; - sinfo->last_bit = sinfo->last_byte * 8; - } - - /* Form up next 24 bits in accum */ - offs = sinfo->cur_bit >> 3; /* byte containing cur_bit */ - accum = (INT32) UCH(sinfo->code_buf[offs+2]); - accum <<= 8; - accum |= (INT32) UCH(sinfo->code_buf[offs+1]); - accum <<= 8; - accum |= (INT32) UCH(sinfo->code_buf[offs]); - - /* Right-align cur_bit in accum, then mask off desired number of bits */ - accum >>= (sinfo->cur_bit & 7); - sinfo->cur_bit += sinfo->code_size; - return ((int) accum) & ((1 << sinfo->code_size) - 1); -} - - -LOCAL(int) -LZWReadByte (gif_source_ptr sinfo) -/* Read an LZW-compressed byte */ -{ - register int code; /* current working code */ - int incode; /* saves actual input code */ - - /* If any codes are stacked from a previously read symbol, return them */ - if (sinfo->sp > sinfo->symbol_stack) - return (int) *(-- sinfo->sp); - - /* Time to read a new symbol */ - code = GetCode(sinfo); - - if (code == sinfo->clear_code) { - /* Reinit state, swallow any extra Clear codes, and */ - /* return next code, which is expected to be a raw byte. */ - ReInitLZW(sinfo); - do { - code = GetCode(sinfo); - } while (code == sinfo->clear_code); - if (code > sinfo->clear_code) { /* make sure it is a raw byte */ - WARNMS(sinfo->cinfo, JWRN_GIF_BADDATA); - code = 0; /* use something valid */ - } - /* make firstcode, oldcode valid! */ - sinfo->firstcode = sinfo->oldcode = code; - return code; - } - - if (code == sinfo->end_code) { - /* Skip the rest of the image, unless GetCode already read terminator */ - if (! sinfo->out_of_blocks) { - SkipDataBlocks(sinfo); - sinfo->out_of_blocks = TRUE; - } - /* Complain that there's not enough data */ - WARNMS(sinfo->cinfo, JWRN_GIF_ENDCODE); - /* Pad data with 0's */ - return 0; /* fake something usable */ - } - - /* Got normal raw byte or LZW symbol */ - incode = code; /* save for a moment */ - - if (code >= sinfo->max_code) { /* special case for not-yet-defined symbol */ - /* code == max_code is OK; anything bigger is bad data */ - if (code > sinfo->max_code) { - WARNMS(sinfo->cinfo, JWRN_GIF_BADDATA); - incode = 0; /* prevent creation of loops in symbol table */ - } - /* this symbol will be defined as oldcode/firstcode */ - *(sinfo->sp++) = (UINT8) sinfo->firstcode; - code = sinfo->oldcode; - } - - /* If it's a symbol, expand it into the stack */ - while (code >= sinfo->clear_code) { - *(sinfo->sp++) = sinfo->symbol_tail[code]; /* tail is a byte value */ - code = sinfo->symbol_head[code]; /* head is another LZW symbol */ - } - /* At this point code just represents a raw byte */ - sinfo->firstcode = code; /* save for possible future use */ - - /* If there's room in table... */ - if ((code = sinfo->max_code) < LZW_TABLE_SIZE) { - /* Define a new symbol = prev sym + head of this sym's expansion */ - sinfo->symbol_head[code] = (UINT16) sinfo->oldcode; - sinfo->symbol_tail[code] = (UINT8) sinfo->firstcode; - sinfo->max_code++; - /* Is it time to increase code_size? */ - if (sinfo->max_code >= sinfo->limit_code && - sinfo->code_size < MAX_LZW_BITS) { - sinfo->code_size++; - sinfo->limit_code <<= 1; /* keep equal to 2^code_size */ - } - } - - sinfo->oldcode = incode; /* save last input symbol for future use */ - return sinfo->firstcode; /* return first byte of symbol's expansion */ -} - - -LOCAL(void) -ReadColorMap (gif_source_ptr sinfo, int cmaplen, JSAMPARRAY cmap) -/* Read a GIF colormap */ -{ - int i; - - for (i = 0; i < cmaplen; i++) { -#if BITS_IN_JSAMPLE == 8 -#define UPSCALE(x) (x) -#else -#define UPSCALE(x) ((x) << (BITS_IN_JSAMPLE-8)) -#endif - cmap[CM_RED ][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo)); - cmap[CM_GREEN][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo)); - cmap[CM_BLUE ][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo)); - } -} - - -LOCAL(void) -DoExtension (gif_source_ptr sinfo) -/* Process an extension block */ -/* Currently we ignore 'em all */ -{ - int extlabel; - - /* Read extension label byte */ - extlabel = ReadByte(sinfo); - TRACEMS1(sinfo->cinfo, 1, JTRC_GIF_EXTENSION, extlabel); - /* Skip the data block(s) associated with the extension */ - SkipDataBlocks(sinfo); -} - - -/* - * Read the file header; return image size and component count. - */ - -METHODDEF(void) -start_input_gif (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - gif_source_ptr source = (gif_source_ptr) sinfo; - U_CHAR hdrbuf[10]; /* workspace for reading control blocks */ - unsigned int width, height; /* image dimensions */ - int colormaplen, aspectRatio; - int c; - - /* Read and verify GIF Header */ - if (! ReadOK(source->pub.input_file, hdrbuf, 6)) - ERREXIT(cinfo, JERR_GIF_NOT); - if (hdrbuf[0] != 'G' || hdrbuf[1] != 'I' || hdrbuf[2] != 'F') - ERREXIT(cinfo, JERR_GIF_NOT); - /* Check for expected version numbers. - * If unknown version, give warning and try to process anyway; - * this is per recommendation in GIF89a standard. - */ - if ((hdrbuf[3] != '8' || hdrbuf[4] != '7' || hdrbuf[5] != 'a') && - (hdrbuf[3] != '8' || hdrbuf[4] != '9' || hdrbuf[5] != 'a')) - TRACEMS3(cinfo, 1, JTRC_GIF_BADVERSION, hdrbuf[3], hdrbuf[4], hdrbuf[5]); - - /* Read and decipher Logical Screen Descriptor */ - if (! ReadOK(source->pub.input_file, hdrbuf, 7)) - ERREXIT(cinfo, JERR_INPUT_EOF); - width = LM_to_uint(hdrbuf, 0); - height = LM_to_uint(hdrbuf, 2); - /* we ignore the color resolution, sort flag, and background color index */ - aspectRatio = UCH(hdrbuf[6]); - if (aspectRatio != 0 && aspectRatio != 49) - TRACEMS(cinfo, 1, JTRC_GIF_NONSQUARE); - - /* Allocate space to store the colormap */ - source->colormap = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, - JPOOL_IMAGE, (JDIMENSION) MAXCOLORMAPSIZE, (JDIMENSION) NUMCOLORS); - colormaplen = 0; /* indicate initialization */ - - /* Read global colormap if header indicates it is present */ - if (BitSet(hdrbuf[4], COLORMAPFLAG)) { - colormaplen = 2 << (hdrbuf[4] & 0x07); - ReadColorMap(source, colormaplen, source->colormap); - } - - /* Scan until we reach start of desired image. - * We don't currently support skipping images, but could add it easily. - */ - for (;;) { - c = ReadByte(source); - - if (c == ';') /* GIF terminator?? */ - ERREXIT(cinfo, JERR_GIF_IMAGENOTFOUND); - - if (c == '!') { /* Extension */ - DoExtension(source); - continue; - } - - if (c != ',') { /* Not an image separator? */ - WARNMS1(cinfo, JWRN_GIF_CHAR, c); - continue; - } - - /* Read and decipher Local Image Descriptor */ - if (! ReadOK(source->pub.input_file, hdrbuf, 9)) - ERREXIT(cinfo, JERR_INPUT_EOF); - /* we ignore top/left position info, also sort flag */ - width = LM_to_uint(hdrbuf, 4); - height = LM_to_uint(hdrbuf, 6); - if (width <= 0 || height <= 0) - ERREXIT(cinfo, JERR_GIF_OUTOFRANGE); - source->is_interlaced = (BitSet(hdrbuf[8], INTERLACE) != 0); - - /* Read local colormap if header indicates it is present */ - /* Note: if we wanted to support skipping images, */ - /* we'd need to skip rather than read colormap for ignored images */ - if (BitSet(hdrbuf[8], COLORMAPFLAG)) { - colormaplen = 2 << (hdrbuf[8] & 0x07); - ReadColorMap(source, colormaplen, source->colormap); - } - - source->input_code_size = ReadByte(source); /* get min-code-size byte */ - if (source->input_code_size < 2 || source->input_code_size > 8) - ERREXIT1(cinfo, JERR_GIF_CODESIZE, source->input_code_size); - - /* Reached desired image, so break out of loop */ - /* If we wanted to skip this image, */ - /* we'd call SkipDataBlocks and then continue the loop */ - break; - } - - /* Prepare to read selected image: first initialize LZW decompressor */ - source->symbol_head = (UINT16 FAR *) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, LZW_TABLE_SIZE * SIZEOF(UINT16)); - source->symbol_tail = (UINT8 FAR *) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, LZW_TABLE_SIZE * SIZEOF(UINT8)); - source->symbol_stack = (UINT8 FAR *) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, LZW_TABLE_SIZE * SIZEOF(UINT8)); - InitLZWCode(source); - - /* - * If image is interlaced, we read it into a full-size sample array, - * decompressing as we go; then get_interlaced_row selects rows from the - * sample array in the proper order. - */ - if (source->is_interlaced) { - /* We request the virtual array now, but can't access it until virtual - * arrays have been allocated. Hence, the actual work of reading the - * image is postponed until the first call to get_pixel_rows. - */ - source->interlaced_image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - (JDIMENSION) width, (JDIMENSION) height, (JDIMENSION) 1); - if (cinfo->progress != NULL) { - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - progress->total_extra_passes++; /* count file input as separate pass */ - } - source->pub.get_pixel_rows = load_interlaced_image; - } else { - source->pub.get_pixel_rows = get_pixel_rows; - } - - /* Create compressor input buffer. */ - source->pub.buffer = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, - JPOOL_IMAGE, (JDIMENSION) width * NUMCOLORS, (JDIMENSION) 1); - source->pub.buffer_height = 1; - - /* Pad colormap for safety. */ - for (c = colormaplen; c < source->clear_code; c++) { - source->colormap[CM_RED ][c] = - source->colormap[CM_GREEN][c] = - source->colormap[CM_BLUE ][c] = CENTERJSAMPLE; - } - - /* Return info about the image. */ - cinfo->in_color_space = JCS_RGB; - cinfo->input_components = NUMCOLORS; - cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */ - cinfo->image_width = width; - cinfo->image_height = height; - - TRACEMS3(cinfo, 1, JTRC_GIF, width, height, colormaplen); -} - - -/* - * Read one row of pixels. - * This version is used for noninterlaced GIF images: - * we read directly from the GIF file. - */ - -METHODDEF(JDIMENSION) -get_pixel_rows (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - gif_source_ptr source = (gif_source_ptr) sinfo; - register int c; - register JSAMPROW ptr; - register JDIMENSION col; - register JSAMPARRAY colormap = source->colormap; - - ptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - c = LZWReadByte(source); - *ptr++ = colormap[CM_RED ][c]; - *ptr++ = colormap[CM_GREEN][c]; - *ptr++ = colormap[CM_BLUE ][c]; - } - return 1; -} - - -/* - * Read one row of pixels. - * This version is used for the first call on get_pixel_rows when - * reading an interlaced GIF file: we read the whole image into memory. - */ - -METHODDEF(JDIMENSION) -load_interlaced_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - gif_source_ptr source = (gif_source_ptr) sinfo; - register JSAMPROW sptr; - register JDIMENSION col; - JDIMENSION row; - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - - /* Read the interlaced image into the virtual array we've created. */ - for (row = 0; row < cinfo->image_height; row++) { - if (progress != NULL) { - progress->pub.pass_counter = (long) row; - progress->pub.pass_limit = (long) cinfo->image_height; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } - sptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, - source->interlaced_image, row, (JDIMENSION) 1, TRUE); - for (col = cinfo->image_width; col > 0; col--) { - *sptr++ = (JSAMPLE) LZWReadByte(source); - } - } - if (progress != NULL) - progress->completed_extra_passes++; - - /* Replace method pointer so subsequent calls don't come here. */ - source->pub.get_pixel_rows = get_interlaced_row; - /* Initialize for get_interlaced_row, and perform first call on it. */ - source->cur_row_number = 0; - source->pass2_offset = (cinfo->image_height + 7) / 8; - source->pass3_offset = source->pass2_offset + (cinfo->image_height + 3) / 8; - source->pass4_offset = source->pass3_offset + (cinfo->image_height + 1) / 4; - - return get_interlaced_row(cinfo, sinfo); -} - - -/* - * Read one row of pixels. - * This version is used for interlaced GIF images: - * we read from the virtual array. - */ - -METHODDEF(JDIMENSION) -get_interlaced_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - gif_source_ptr source = (gif_source_ptr) sinfo; - register int c; - register JSAMPROW sptr, ptr; - register JDIMENSION col; - register JSAMPARRAY colormap = source->colormap; - JDIMENSION irow; - - /* Figure out which row of interlaced image is needed, and access it. */ - switch ((int) (source->cur_row_number & 7)) { - case 0: /* first-pass row */ - irow = source->cur_row_number >> 3; - break; - case 4: /* second-pass row */ - irow = (source->cur_row_number >> 3) + source->pass2_offset; - break; - case 2: /* third-pass row */ - case 6: - irow = (source->cur_row_number >> 2) + source->pass3_offset; - break; - default: /* fourth-pass row */ - irow = (source->cur_row_number >> 1) + source->pass4_offset; - } - sptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, - source->interlaced_image, irow, (JDIMENSION) 1, FALSE); - /* Scan the row, expand colormap, and output */ - ptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - c = GETJSAMPLE(*sptr++); - *ptr++ = colormap[CM_RED ][c]; - *ptr++ = colormap[CM_GREEN][c]; - *ptr++ = colormap[CM_BLUE ][c]; - } - source->cur_row_number++; /* for next time */ - return 1; -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_input_gif (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - /* no work */ -} - - -/* - * The module selection routine for GIF format input. - */ - -GLOBAL(cjpeg_source_ptr) -jinit_read_gif (j_compress_ptr cinfo) -{ - gif_source_ptr source; - - /* Create module interface object */ - source = (gif_source_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(gif_source_struct)); - source->cinfo = cinfo; /* make back link for subroutines */ - /* Fill in method ptrs, except get_pixel_rows which start_input sets */ - source->pub.start_input = start_input_gif; - source->pub.finish_input = finish_input_gif; - - return &source->pub; -} - -#endif /* GIF_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/rdjpgcom.1 b/thirdparty/jpeg-9e/rdjpgcom.1 deleted file mode 100644 index d7741fb..0000000 --- a/thirdparty/jpeg-9e/rdjpgcom.1 +++ /dev/null @@ -1,63 +0,0 @@ -.TH RDJPGCOM 1 "13 September 2013" -.SH NAME -rdjpgcom \- display text comments from a JPEG file -.SH SYNOPSIS -.B rdjpgcom -[ -.B \-raw -] -[ -.B \-verbose -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B rdjpgcom -reads the named JPEG/JFIF file, or the standard input if no file is named, -and prints any text comments found in the file on the standard output. -.PP -The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. -Although the standard doesn't actually define what COM blocks are for, they -are widely used to hold user-supplied text strings. This lets you add -annotations, titles, index terms, etc to your JPEG files, and later retrieve -them as text. COM blocks do not interfere with the image stored in the JPEG -file. The maximum size of a COM block is 64K, but you can have as many of -them as you like in one JPEG file. -.SH OPTIONS -.TP -.B \-raw -Normally -.B rdjpgcom -escapes non-printable characters in comments, for security reasons. -This option avoids that. -.PP -.B \-verbose -Causes -.B rdjpgcom -to also display the JPEG image dimensions. -.PP -Switch names may be abbreviated, and are not case sensitive. -.SH HINTS -.B rdjpgcom -does not depend on the IJG JPEG library. Its source code is intended as an -illustration of the minimum amount of code required to parse a JPEG file -header correctly. -.PP -In -.B \-verbose -mode, -.B rdjpgcom -will also attempt to print the contents of any "APP12" markers as text. -Some digital cameras produce APP12 markers containing useful textual -information. If you like, you can modify the source code to print -other APPn marker types as well. -.SH SEE ALSO -.BR cjpeg (1), -.BR djpeg (1), -.BR jpegtran (1), -.BR wrjpgcom (1) -.SH AUTHOR -Independent JPEG Group diff --git a/thirdparty/jpeg-9e/rdjpgcom.c b/thirdparty/jpeg-9e/rdjpgcom.c deleted file mode 100644 index 3719154..0000000 --- a/thirdparty/jpeg-9e/rdjpgcom.c +++ /dev/null @@ -1,515 +0,0 @@ -/* - * rdjpgcom.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2009 by Bill Allombert, Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a very simple stand-alone application that displays - * the text in COM (comment) markers in a JFIF file. - * This may be useful as an example of the minimum logic needed to parse - * JPEG markers. - */ - -#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ -#include "jinclude.h" /* get auto-config symbols, */ - -#ifdef HAVE_LOCALE_H -#include /* Bill Allombert: use locale for isprint */ -#endif -#include /* to declare isupper(), tolower() */ -#ifdef USE_SETMODE -#include /* to declare setmode()'s parameter macros */ -/* If you have setmode() but not , just delete this line: */ -#include /* to declare setmode() */ -#endif - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#endif -#endif - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif -#ifndef EXIT_SUCCESS -#ifdef VMS -#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ -#else -#define EXIT_SUCCESS 0 -#endif -#endif - - -/* - * These macros are used to read the input file. - * To reuse this code in another application, you might need to change these. - */ - -static FILE * infile; /* input JPEG file */ - -/* Return next input byte, or EOF if no more */ -#define NEXTBYTE() getc(infile) - - -/* Error exit handler */ -#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) - - -/* Read one byte, testing for EOF */ -static int -read_1_byte (void) -{ - int c; - - c = NEXTBYTE(); - if (c == EOF) - ERREXIT("Premature EOF in JPEG file"); - return c; -} - -/* Read 2 bytes, convert to unsigned int */ -/* All 2-byte quantities in JPEG markers are MSB first */ -static unsigned int -read_2_bytes (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - if (c1 == EOF) - ERREXIT("Premature EOF in JPEG file"); - c2 = NEXTBYTE(); - if (c2 == EOF) - ERREXIT("Premature EOF in JPEG file"); - return (((unsigned int) c1) << 8) + ((unsigned int) c2); -} - - -/* - * JPEG markers consist of one or more 0xFF bytes, followed by a marker - * code byte (which is not an FF). Here are the marker codes of interest - * in this program. (See jdmarker.c for a more complete list.) - */ - -#define M_SOF0 0xC0 /* Start Of Frame N */ -#define M_SOF1 0xC1 /* N indicates which compression process */ -#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ -#define M_SOF3 0xC3 -#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ -#define M_SOF6 0xC6 -#define M_SOF7 0xC7 -#define M_SOF9 0xC9 -#define M_SOF10 0xCA -#define M_SOF11 0xCB -#define M_SOF13 0xCD -#define M_SOF14 0xCE -#define M_SOF15 0xCF -#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ -#define M_EOI 0xD9 /* End Of Image (end of datastream) */ -#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ -#define M_APP0 0xE0 /* Application-specific marker, type N */ -#define M_APP12 0xEC /* (we don't bother to list all 16 APPn's) */ -#define M_COM 0xFE /* COMment */ - - -/* - * Find the next JPEG marker and return its marker code. - * We expect at least one FF byte, possibly more if the compressor used FFs - * to pad the file. - * There could also be non-FF garbage between markers. The treatment of such - * garbage is unspecified; we choose to skip over it but emit a warning msg. - * NB: this routine must not be used after seeing SOS marker, since it will - * not deal correctly with FF/00 sequences in the compressed image data... - */ - -static int -next_marker (void) -{ - int c; - int discarded_bytes = 0; - - /* Find 0xFF byte; count and skip any non-FFs. */ - c = read_1_byte(); - while (c != 0xFF) { - discarded_bytes++; - c = read_1_byte(); - } - /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs - * are legal as pad bytes, so don't count them in discarded_bytes. - */ - do { - c = read_1_byte(); - } while (c == 0xFF); - - if (discarded_bytes != 0) { - fprintf(stderr, "Warning: garbage data found in JPEG file\n"); - } - - return c; -} - - -/* - * Read the initial marker, which should be SOI. - * For a JFIF file, the first two bytes of the file should be literally - * 0xFF M_SOI. To be more general, we could use next_marker, but if the - * input file weren't actually JPEG at all, next_marker might read the whole - * file and then return a misleading error message... - */ - -static int -first_marker (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - c2 = NEXTBYTE(); - if (c1 != 0xFF || c2 != M_SOI) - ERREXIT("Not a JPEG file"); - return c2; -} - - -/* - * Most types of marker are followed by a variable-length parameter segment. - * This routine skips over the parameters for any marker we don't otherwise - * want to process. - * Note that we MUST skip the parameter segment explicitly in order not to - * be fooled by 0xFF bytes that might appear within the parameter segment; - * such bytes do NOT introduce new markers. - */ - -static void -skip_variable (void) -/* Skip over an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Skip over the remaining bytes */ - while (length > 0) { - (void) read_1_byte(); - length--; - } -} - - -/* - * Process a COM marker. - * We want to print out the marker contents as legible text; - * we must guard against non-text junk and varying newline representations. - */ - -static void -process_COM (int raw) -{ - unsigned int length; - int ch; - int lastch = 0; - - /* Bill Allombert: set locale properly for isprint */ -#ifdef HAVE_LOCALE_H - setlocale(LC_CTYPE, ""); -#endif - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - - while (length > 0) { - ch = read_1_byte(); - if (raw) { - putc(ch, stdout); - /* Emit the character in a readable form. - * Nonprintables are converted to \nnn form, - * while \ is converted to \\. - * Newlines in CR, CR/LF, or LF form will be printed as one newline. - */ - } else if (ch == '\r') { - printf("\n"); - } else if (ch == '\n') { - if (lastch != '\r') - printf("\n"); - } else if (ch == '\\') { - printf("\\\\"); - } else if (isprint(ch)) { - putc(ch, stdout); - } else { - printf("\\%03o", ch); - } - lastch = ch; - length--; - } - printf("\n"); - - /* Bill Allombert: revert to C locale */ -#ifdef HAVE_LOCALE_H - setlocale(LC_CTYPE, "C"); -#endif -} - - -/* - * Process a SOFn marker. - * This code is only needed if you want to know the image dimensions... - */ - -static void -process_SOFn (int marker) -{ - unsigned int length; - unsigned int image_height, image_width; - int data_precision, num_components; - const char * process; - int ci; - - length = read_2_bytes(); /* usual parameter length count */ - - data_precision = read_1_byte(); - image_height = read_2_bytes(); - image_width = read_2_bytes(); - num_components = read_1_byte(); - - switch (marker) { - case M_SOF0: process = "Baseline"; break; - case M_SOF1: process = "Extended sequential"; break; - case M_SOF2: process = "Progressive"; break; - case M_SOF3: process = "Lossless"; break; - case M_SOF5: process = "Differential sequential"; break; - case M_SOF6: process = "Differential progressive"; break; - case M_SOF7: process = "Differential lossless"; break; - case M_SOF9: process = "Extended sequential, arithmetic coding"; break; - case M_SOF10: process = "Progressive, arithmetic coding"; break; - case M_SOF11: process = "Lossless, arithmetic coding"; break; - case M_SOF13: process = "Differential sequential, arithmetic coding"; break; - case M_SOF14: process = "Differential progressive, arithmetic coding"; break; - case M_SOF15: process = "Differential lossless, arithmetic coding"; break; - default: process = "Unknown"; break; - } - - printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n", - image_width, image_height, num_components, data_precision); - printf("JPEG process: %s\n", process); - - if (length != (unsigned int) (8 + num_components * 3)) - ERREXIT("Bogus SOF marker length"); - - for (ci = 0; ci < num_components; ci++) { - (void) read_1_byte(); /* Component ID code */ - (void) read_1_byte(); /* H, V sampling factors */ - (void) read_1_byte(); /* Quantization table number */ - } -} - - -/* - * Parse the marker stream until SOS or EOI is seen; - * display any COM markers. - * While the companion program wrjpgcom will always insert COM markers before - * SOFn, other implementations might not, so we scan to SOS before stopping. - * If we were only interested in the image dimensions, we would stop at SOFn. - * (Conversely, if we only cared about COM markers, there would be no need - * for special code to handle SOFn; we could treat it like other markers.) - */ - -static int -scan_JPEG_header (int verbose, int raw) -{ - int marker; - - /* Expect SOI at start of file */ - if (first_marker() != M_SOI) - ERREXIT("Expected SOI marker first"); - - /* Scan miscellaneous markers until we reach SOS. */ - for (;;) { - marker = next_marker(); - switch (marker) { - /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be, - * treated as SOFn. C4 in particular is actually DHT. - */ - case M_SOF0: /* Baseline */ - case M_SOF1: /* Extended sequential, Huffman */ - case M_SOF2: /* Progressive, Huffman */ - case M_SOF3: /* Lossless, Huffman */ - case M_SOF5: /* Differential sequential, Huffman */ - case M_SOF6: /* Differential progressive, Huffman */ - case M_SOF7: /* Differential lossless, Huffman */ - case M_SOF9: /* Extended sequential, arithmetic */ - case M_SOF10: /* Progressive, arithmetic */ - case M_SOF11: /* Lossless, arithmetic */ - case M_SOF13: /* Differential sequential, arithmetic */ - case M_SOF14: /* Differential progressive, arithmetic */ - case M_SOF15: /* Differential lossless, arithmetic */ - if (verbose) - process_SOFn(marker); - else - skip_variable(); - break; - - case M_SOS: /* stop before hitting compressed data */ - return marker; - - case M_EOI: /* in case it's a tables-only JPEG stream */ - return marker; - - case M_COM: - process_COM(raw); - break; - - case M_APP12: - /* Some digital camera makers put useful textual information into - * APP12 markers, so we print those out too when in -verbose mode. - */ - if (verbose) { - printf("APP12 contains:\n"); - process_COM(raw); - } else - skip_variable(); - break; - - default: /* Anything else just gets skipped */ - skip_variable(); /* we assume it has a parameter count... */ - break; - } - } /* end loop */ -} - - -/* Command line parsing code */ - -static const char * progname; /* program name for error messages */ - - -static void -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "rdjpgcom displays any textual comments in a JPEG file.\n"); - - fprintf(stderr, "Usage: %s [switches] [inputfile]\n", progname); - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -raw Display non-printable characters in comments (unsafe)\n"); - fprintf(stderr, " -verbose Also display dimensions of JPEG image\n"); - - exit(EXIT_FAILURE); -} - - -static int -keymatch (char * arg, const char * keyword, int minchars) -/* Case-insensitive matching of (possibly abbreviated) keyword switches. */ -/* keyword is the constant keyword (must be lower case already), */ -/* minchars is length of minimum legal abbreviation. */ -{ - register int ca, ck; - register int nmatched = 0; - - while ((ca = *arg++) != '\0') { - if ((ck = *keyword++) == '\0') - return 0; /* arg longer than keyword, no good */ - if (isupper(ca)) /* force arg to lcase (assume ck is already) */ - ca = tolower(ca); - if (ca != ck) - return 0; /* no good */ - nmatched++; /* count matched characters */ - } - /* reached end of argument; fail if it's too short for unique abbrev */ - if (nmatched < minchars) - return 0; - return 1; /* A-OK */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - int argn; - char * arg; - int verbose = 0, raw = 0; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "rdjpgcom"; /* in case C library doesn't provide it */ - - /* Parse switches, if any */ - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (arg[0] != '-') - break; /* not switch, must be file name */ - arg++; /* advance over '-' */ - if (keymatch(arg, "verbose", 1)) { - verbose++; - } else if (keymatch(arg, "raw", 1)) { - raw = 1; - } else - usage(); - } - - /* Open the input file. */ - /* Unix style: expect zero or one file name */ - if (argn < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } - if (argn < argc) { - if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdin), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open stdin\n", progname); - exit(EXIT_FAILURE); - } -#else - infile = stdin; -#endif - } - - /* Scan the JPEG headers. */ - (void) scan_JPEG_header(verbose, raw); - - /* All done. */ - exit(EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/thirdparty/jpeg-9e/rdppm.c b/thirdparty/jpeg-9e/rdppm.c deleted file mode 100644 index ca63867..0000000 --- a/thirdparty/jpeg-9e/rdppm.c +++ /dev/null @@ -1,501 +0,0 @@ -/* - * rdppm.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2009-2020 by Bill Allombert, Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to read input images in PPM/PGM format. - * The extended 2-byte-per-sample raw PPM/PGM formats are supported. - * The PBMPLUS library is NOT required to compile this software - * (but it is highly useful as a set of PPM image manipulation programs). - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume input from - * an ordinary stdio stream. They further assume that reading begins - * at the start of the file; start_input may need work if the - * user interface has already read some data (e.g., to determine that - * the file is indeed PPM format). - */ - -/* Portions of this code are based on the PBMPLUS library, which is: -** -** Copyright (C) 1988 by Jef Poskanzer. -** -** Permission to use, copy, modify, and distribute this software and its -** documentation for any purpose and without fee is hereby granted, provided -** that the above copyright notice appear in all copies and that both that -** copyright notice and this permission notice appear in supporting -** documentation. This software is provided "as is" without express or -** implied warranty. -*/ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef PPM_SUPPORTED - - -/* Macros to deal with unsigned chars as efficiently as compiler allows */ - -#ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char U_CHAR; -#define UCH(x) ((int) (x)) -#else /* !HAVE_UNSIGNED_CHAR */ -typedef char U_CHAR; -#ifdef CHAR_IS_UNSIGNED -#define UCH(x) ((int) (x)) -#else -#define UCH(x) ((int) (x) & 0xFF) -#endif -#endif /* HAVE_UNSIGNED_CHAR */ - - -#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) - - -/* - * On most systems, reading individual bytes with getc() is drastically less - * efficient than buffering a row at a time with fread(). On PCs, we must - * allocate the buffer in near data space, because we are assuming small-data - * memory model, wherein fread() can't reach far memory. If you need to - * process very wide images on a PC, you might have to compile in large-memory - * model, or else replace fread() with a getc() loop --- which will be much - * slower. - */ - - -/* Private version of data source object */ - -typedef struct { - struct cjpeg_source_struct pub; /* public fields */ - - /* Usually these two pointers point to the same place: */ - U_CHAR *iobuffer; /* fread's I/O buffer */ - JSAMPROW pixrow; /* compressor input buffer */ - size_t buffer_width; /* width of I/O buffer */ - JSAMPLE *rescale; /* => maxval-remapping array, or NULL */ - unsigned int maxval; -} ppm_source_struct; - -typedef ppm_source_struct * ppm_source_ptr; - - -LOCAL(int) -pbm_getc (FILE * infile) -/* Read next char, skipping over any comments */ -/* A comment/newline sequence is returned as a newline */ -{ - register int ch; - - ch = getc(infile); - if (ch == '#') { - do { - ch = getc(infile); - } while (ch != '\n' && ch != EOF); - } - return ch; -} - - -LOCAL(unsigned int) -read_pbm_integer (j_compress_ptr cinfo, FILE * infile) -/* Read an unsigned decimal integer from the PPM file */ -/* Swallows one trailing character after the integer */ -/* Note that on a 16-bit-int machine, only values up to 64k can be read. */ -/* This should not be a problem in practice. */ -{ - register int ch; - register unsigned int val; - - /* Skip any leading whitespace */ - do { - ch = pbm_getc(infile); - if (ch == EOF) - ERREXIT(cinfo, JERR_INPUT_EOF); - } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); - - if (ch < '0' || ch > '9') - ERREXIT(cinfo, JERR_PPM_NONNUMERIC); - - val = ch - '0'; - while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') { - val *= 10; - val += ch - '0'; - } - return val; -} - - -/* - * Read one row of pixels. - * - * We provide several different versions depending on input file format. - * In all cases, input is scaled to the size of JSAMPLE. - * - * A really fast path is provided for reading byte/sample raw files with - * maxval = MAXJSAMPLE, which is the normal case for 8-bit data. - */ - - -METHODDEF(JDIMENSION) -get_text_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading text-format PGM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - FILE * infile = source->pub.input_file; - register JSAMPROW ptr; - register JSAMPLE *rescale = source->rescale; - unsigned int maxval = source->maxval; - JDIMENSION col; - - ptr = source->pixrow; - for (col = cinfo->image_width; col > 0; col--) { - register unsigned int temp; - temp = read_pbm_integer(cinfo, infile); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - } - return 1; -} - - -METHODDEF(JDIMENSION) -get_text_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading text-format PPM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - FILE * infile = source->pub.input_file; - register JSAMPROW ptr; - register JSAMPLE *rescale = source->rescale; - unsigned int maxval = source->maxval; - JDIMENSION col; - - ptr = source->pixrow; - for (col = cinfo->image_width; col > 0; col--) { - register unsigned int temp; - temp = read_pbm_integer(cinfo, infile); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - temp = read_pbm_integer(cinfo, infile); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - temp = read_pbm_integer(cinfo, infile); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - } - return 1; -} - - -METHODDEF(JDIMENSION) -get_scaled_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading raw-byte-format PGM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - register JSAMPROW ptr; - register U_CHAR * bufferptr; - register JSAMPLE *rescale = source->rescale; - unsigned int maxval = source->maxval; - JDIMENSION col; - - if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) - ERREXIT(cinfo, JERR_INPUT_EOF); - ptr = source->pixrow; - bufferptr = source->iobuffer; - for (col = cinfo->image_width; col > 0; col--) { - register unsigned int temp; - temp = (unsigned int) UCH(*bufferptr++); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - } - return 1; -} - - -METHODDEF(JDIMENSION) -get_scaled_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading raw-byte-format PPM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - register JSAMPROW ptr; - register U_CHAR * bufferptr; - register JSAMPLE *rescale = source->rescale; - unsigned int maxval = source->maxval; - JDIMENSION col; - - if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) - ERREXIT(cinfo, JERR_INPUT_EOF); - ptr = source->pixrow; - bufferptr = source->iobuffer; - for (col = cinfo->image_width; col > 0; col--) { - register unsigned int temp; - temp = (unsigned int) UCH(*bufferptr++); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - temp = (unsigned int) UCH(*bufferptr++); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - temp = (unsigned int) UCH(*bufferptr++); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - } - return 1; -} - - -METHODDEF(JDIMENSION) -get_raw_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading raw-byte-format files with maxval = MAXJSAMPLE. - * In this case we just read right into the JSAMPLE buffer! - * Note that same code works for PPM and PGM files. - */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - - if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) - ERREXIT(cinfo, JERR_INPUT_EOF); - return 1; -} - - -METHODDEF(JDIMENSION) -get_word_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading raw-word-format PGM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - register JSAMPROW ptr; - register U_CHAR * bufferptr; - register JSAMPLE *rescale = source->rescale; - unsigned int maxval = source->maxval; - JDIMENSION col; - - if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) - ERREXIT(cinfo, JERR_INPUT_EOF); - ptr = source->pixrow; - bufferptr = source->iobuffer; - for (col = cinfo->image_width; col > 0; col--) { - register unsigned int temp; - temp = ((unsigned int) UCH(*bufferptr++)) << 8; - temp |= (unsigned int) UCH(*bufferptr++); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - } - return 1; -} - - -METHODDEF(JDIMENSION) -get_word_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading raw-word-format PPM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - register JSAMPROW ptr; - register U_CHAR * bufferptr; - register JSAMPLE *rescale = source->rescale; - unsigned int maxval = source->maxval; - JDIMENSION col; - - if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) - ERREXIT(cinfo, JERR_INPUT_EOF); - ptr = source->pixrow; - bufferptr = source->iobuffer; - for (col = cinfo->image_width; col > 0; col--) { - register unsigned int temp; - temp = ((unsigned int) UCH(*bufferptr++)) << 8; - temp |= (unsigned int) UCH(*bufferptr++); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - temp = ((unsigned int) UCH(*bufferptr++)) << 8; - temp |= (unsigned int) UCH(*bufferptr++); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - temp = ((unsigned int) UCH(*bufferptr++)) << 8; - temp |= (unsigned int) UCH(*bufferptr++); - if (temp > maxval) - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - *ptr++ = rescale[temp]; - } - return 1; -} - - -/* - * Read the file header; return image size and component count. - */ - -METHODDEF(void) -start_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - int c; - unsigned int w, h, maxval; - boolean need_iobuffer, use_raw_buffer, need_rescale; - - if (getc(source->pub.input_file) != 'P') - ERREXIT(cinfo, JERR_PPM_NOT); - - c = getc(source->pub.input_file); /* subformat discriminator character */ - - /* detect unsupported variants (ie, PBM) before trying to read header */ - switch (c) { - case '2': /* it's a text-format PGM file */ - case '3': /* it's a text-format PPM file */ - case '5': /* it's a raw-format PGM file */ - case '6': /* it's a raw-format PPM file */ - break; - default: - ERREXIT(cinfo, JERR_PPM_NOT); - } - - /* fetch the remaining header info */ - w = read_pbm_integer(cinfo, source->pub.input_file); - h = read_pbm_integer(cinfo, source->pub.input_file); - maxval = read_pbm_integer(cinfo, source->pub.input_file); - - if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ - ERREXIT(cinfo, JERR_PPM_NOT); - - if (((long) w >> 24) || /* sanity check for buffer allocation below */ - ((long) maxval >> 16)) /* support max 16-bit (2-byte) sample values */ - ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); - - cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */ - cinfo->image_width = (JDIMENSION) w; - cinfo->image_height = (JDIMENSION) h; - source->maxval = maxval; - - /* initialize flags to most common settings */ - need_iobuffer = TRUE; /* do we need an I/O buffer? */ - use_raw_buffer = FALSE; /* do we map input buffer onto I/O buffer? */ - need_rescale = TRUE; /* do we need a rescale array? */ - - switch (c) { - case '2': /* it's a text-format PGM file */ - cinfo->input_components = 1; - cinfo->in_color_space = JCS_GRAYSCALE; - TRACEMS2(cinfo, 1, JTRC_PGM_TEXT, w, h); - source->pub.get_pixel_rows = get_text_gray_row; - need_iobuffer = FALSE; - break; - - case '3': /* it's a text-format PPM file */ - cinfo->input_components = 3; - cinfo->in_color_space = JCS_RGB; - TRACEMS2(cinfo, 1, JTRC_PPM_TEXT, w, h); - source->pub.get_pixel_rows = get_text_rgb_row; - need_iobuffer = FALSE; - break; - - case '5': /* it's a raw-format PGM file */ - cinfo->input_components = 1; - cinfo->in_color_space = JCS_GRAYSCALE; - TRACEMS2(cinfo, 1, JTRC_PGM, w, h); - if (maxval > 255) { - source->pub.get_pixel_rows = get_word_gray_row; - } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) { - source->pub.get_pixel_rows = get_raw_row; - use_raw_buffer = TRUE; - need_rescale = FALSE; - } else { - source->pub.get_pixel_rows = get_scaled_gray_row; - } - break; - - case '6': /* it's a raw-format PPM file */ - cinfo->input_components = 3; - cinfo->in_color_space = JCS_RGB; - TRACEMS2(cinfo, 1, JTRC_PPM, w, h); - if (maxval > 255) { - source->pub.get_pixel_rows = get_word_rgb_row; - } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) { - source->pub.get_pixel_rows = get_raw_row; - use_raw_buffer = TRUE; - need_rescale = FALSE; - } else { - source->pub.get_pixel_rows = get_scaled_rgb_row; - } - break; - } - - /* Allocate space for I/O buffer: 1 or 3 bytes or words/pixel. */ - if (need_iobuffer) { - source->buffer_width = (size_t) w * (size_t) cinfo->input_components * - ((maxval <= 255) ? SIZEOF(U_CHAR) : (2 * SIZEOF(U_CHAR))); - source->iobuffer = (U_CHAR *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, source->buffer_width); - } - - /* Create compressor input buffer. */ - if (use_raw_buffer) { - /* For unscaled raw-input case, we can just map it onto the I/O buffer. */ - /* Cast here implies near->far pointer conversion on PCs */ - source->pixrow = (JSAMPROW) source->iobuffer; - } else { - /* Need to translate anyway, so make a separate sample buffer. */ - source->pixrow = (JSAMPROW) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (size_t) w * - (size_t) cinfo->input_components * SIZEOF(JSAMPLE)); - } - /* Synthesize a JSAMPARRAY pointer structure */ - source->pub.buffer = & source->pixrow; - source->pub.buffer_height = 1; - - /* Compute the rescaling array if required. */ - if (need_rescale) { - INT32 val, half_maxval; - - /* On 16-bit-int machines we have to be careful of maxval = 65535 */ - source->rescale = (JSAMPLE *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, - JPOOL_IMAGE, ((size_t) maxval + (size_t) 1) * SIZEOF(JSAMPLE)); - half_maxval = maxval / 2; - for (val = 0; val <= (INT32) maxval; val++) { - /* The multiplication here must be done in 32 bits to avoid overflow */ - source->rescale[val] = (JSAMPLE) ((val * MAXJSAMPLE + half_maxval) / maxval); - } - } -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - /* no work */ -} - - -/* - * The module selection routine for PPM format input. - */ - -GLOBAL(cjpeg_source_ptr) -jinit_read_ppm (j_compress_ptr cinfo) -{ - ppm_source_ptr source; - - /* Create module interface object */ - source = (ppm_source_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(ppm_source_struct)); - /* Fill in method ptrs, except get_pixel_rows which start_input sets */ - source->pub.start_input = start_input_ppm; - source->pub.finish_input = finish_input_ppm; - - return &source->pub; -} - -#endif /* PPM_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/rdrle.c b/thirdparty/jpeg-9e/rdrle.c deleted file mode 100644 index 06f2e8a..0000000 --- a/thirdparty/jpeg-9e/rdrle.c +++ /dev/null @@ -1,380 +0,0 @@ -/* - * rdrle.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to read input images in Utah RLE format. - * The Utah Raster Toolkit library is required (version 3.1 or later). - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume input from - * an ordinary stdio stream. They further assume that reading begins - * at the start of the file; start_input may need work if the - * user interface has already read some data (e.g., to determine that - * the file is indeed RLE format). - * - * Based on code contributed by Mike Lijewski, - * with updates from Robert Hutchinson. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef RLE_SUPPORTED - -/* rle.h is provided by the Utah Raster Toolkit. */ - -#include - -/* - * We assume that JSAMPLE has the same representation as rle_pixel, - * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples. - */ - -#if BITS_IN_JSAMPLE != 8 - Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ -#endif - -/* - * We support the following types of RLE files: - * - * GRAYSCALE - 8 bits, no colormap - * MAPPEDGRAY - 8 bits, 1 channel colomap - * PSEUDOCOLOR - 8 bits, 3 channel colormap - * TRUECOLOR - 24 bits, 3 channel colormap - * DIRECTCOLOR - 24 bits, no colormap - * - * For now, we ignore any alpha channel in the image. - */ - -typedef enum - { GRAYSCALE, MAPPEDGRAY, PSEUDOCOLOR, TRUECOLOR, DIRECTCOLOR } rle_kind; - - -/* - * Since RLE stores scanlines bottom-to-top, we have to invert the image - * to conform to JPEG's top-to-bottom order. To do this, we read the - * incoming image into a virtual array on the first get_pixel_rows call, - * then fetch the required row from the virtual array on subsequent calls. - */ - -typedef struct _rle_source_struct * rle_source_ptr; - -typedef struct _rle_source_struct { - struct cjpeg_source_struct pub; /* public fields */ - - rle_kind visual; /* actual type of input file */ - jvirt_sarray_ptr image; /* virtual array to hold the image */ - JDIMENSION row; /* current row # in the virtual array */ - rle_hdr header; /* Input file information */ - rle_pixel **rle_row; /* holds a row returned by rle_getrow() */ - -} rle_source_struct; - - -/* - * Read the file header; return image size and component count. - */ - -METHODDEF(void) -start_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - rle_source_ptr source = (rle_source_ptr) sinfo; - JDIMENSION width, height; -#ifdef PROGRESS_REPORT - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; -#endif - - /* Use RLE library routine to get the header info */ - source->header = *rle_hdr_init(NULL); - source->header.rle_file = source->pub.input_file; - switch (rle_get_setup(&(source->header))) { - case RLE_SUCCESS: - /* A-OK */ - break; - case RLE_NOT_RLE: - ERREXIT(cinfo, JERR_RLE_NOT); - case RLE_NO_SPACE: - ERREXIT(cinfo, JERR_RLE_MEM); - case RLE_EMPTY: - ERREXIT(cinfo, JERR_RLE_EMPTY); - case RLE_EOF: - ERREXIT(cinfo, JERR_RLE_EOF); - default: - ERREXIT(cinfo, JERR_RLE_BADERROR); - } - - /* Figure out what we have, set private vars and return values accordingly */ - - width = source->header.xmax - source->header.xmin + 1; - height = source->header.ymax - source->header.ymin + 1; - source->header.xmin = 0; /* realign horizontally */ - source->header.xmax = width-1; - - cinfo->image_width = width; - cinfo->image_height = height; - cinfo->data_precision = 8; /* we can only handle 8 bit data */ - - if (source->header.ncolors == 1 && source->header.ncmap == 0) { - source->visual = GRAYSCALE; - TRACEMS2(cinfo, 1, JTRC_RLE_GRAY, width, height); - } else if (source->header.ncolors == 1 && source->header.ncmap == 1) { - source->visual = MAPPEDGRAY; - TRACEMS3(cinfo, 1, JTRC_RLE_MAPGRAY, width, height, - 1 << source->header.cmaplen); - } else if (source->header.ncolors == 1 && source->header.ncmap == 3) { - source->visual = PSEUDOCOLOR; - TRACEMS3(cinfo, 1, JTRC_RLE_MAPPED, width, height, - 1 << source->header.cmaplen); - } else if (source->header.ncolors == 3 && source->header.ncmap == 3) { - source->visual = TRUECOLOR; - TRACEMS3(cinfo, 1, JTRC_RLE_FULLMAP, width, height, - 1 << source->header.cmaplen); - } else if (source->header.ncolors == 3 && source->header.ncmap == 0) { - source->visual = DIRECTCOLOR; - TRACEMS2(cinfo, 1, JTRC_RLE, width, height); - } else - ERREXIT(cinfo, JERR_RLE_UNSUPPORTED); - - if (source->visual == GRAYSCALE || source->visual == MAPPEDGRAY) { - cinfo->in_color_space = JCS_GRAYSCALE; - cinfo->input_components = 1; - } else { - cinfo->in_color_space = JCS_RGB; - cinfo->input_components = 3; - } - - /* - * A place to hold each scanline while it's converted. - * (GRAYSCALE scanlines don't need converting) - */ - if (source->visual != GRAYSCALE) { - source->rle_row = (rle_pixel **) (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - width, (JDIMENSION) cinfo->input_components); - } - - /* request a virtual array to hold the image */ - source->image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - width * (JDIMENSION) source->header.ncolors, height, (JDIMENSION) 1); - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - /* count file input as separate pass */ - progress->total_extra_passes++; - } -#endif - - source->pub.buffer_height = 1; -} - - -/* - * Read one row of pixels. - * Called only after load_image has read the image into the virtual array. - * Used for GRAYSCALE, MAPPEDGRAY, TRUECOLOR, and DIRECTCOLOR images. - */ - -METHODDEF(JDIMENSION) -get_rle_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - rle_source_ptr source = (rle_source_ptr) sinfo; - - source->row--; - source->pub.buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); - - return 1; -} - -/* - * Read one row of pixels. - * Called only after load_image has read the image into the virtual array. - * Used for PSEUDOCOLOR images. - */ - -METHODDEF(JDIMENSION) -get_pseudocolor_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - rle_source_ptr source = (rle_source_ptr) sinfo; - JSAMPROW src_row, dest_row; - JDIMENSION col; - rle_map *colormap; - int val; - - colormap = source->header.cmap; - dest_row = source->pub.buffer[0]; - source->row--; - src_row = * (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); - - for (col = cinfo->image_width; col > 0; col--) { - val = GETJSAMPLE(*src_row++); - *dest_row++ = (JSAMPLE) (colormap[val ] >> 8); - *dest_row++ = (JSAMPLE) (colormap[val + 256] >> 8); - *dest_row++ = (JSAMPLE) (colormap[val + 512] >> 8); - } - - return 1; -} - - -/* - * Load the image into a virtual array. We have to do this because RLE - * files start at the lower left while the JPEG standard has them starting - * in the upper left. This is called the first time we want to get a row - * of input. What we do is load the RLE data into the array and then call - * the appropriate routine to read one row from the array. Before returning, - * we set source->pub.get_pixel_rows so that subsequent calls go straight to - * the appropriate row-reading routine. - */ - -METHODDEF(JDIMENSION) -load_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - rle_source_ptr source = (rle_source_ptr) sinfo; - JDIMENSION row, col; - JSAMPROW scanline, red_ptr, green_ptr, blue_ptr; - rle_pixel **rle_row; - rle_map *colormap; - char channel; -#ifdef PROGRESS_REPORT - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; -#endif - - /* Read the RLE data into our virtual array. - * We assume here that (a) rle_pixel is represented the same as JSAMPLE, - * and (b) we are not on a machine where FAR pointers differ from regular. - */ - RLE_CLR_BIT(source->header, RLE_ALPHA); /* don't read the alpha channel */ - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_limit = cinfo->image_height; - progress->pub.pass_counter = 0; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - - switch (source->visual) { - - case GRAYSCALE: - case PSEUDOCOLOR: - for (row = 0; row < cinfo->image_height; row++) { - rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); - rle_getrow(&source->header, rle_row); -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_counter++; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - } - break; - - case MAPPEDGRAY: - case TRUECOLOR: - rle_row = source->rle_row; - colormap = source->header.cmap; - for (row = 0; row < cinfo->image_height; row++) { - rle_getrow(&source->header, rle_row); - scanline = * (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); - - for (col = 0; col < cinfo->image_width; col++) { - for (channel = 0; channel < source->header.ncolors; channel++) { - *scanline++ = (JSAMPLE) - (colormap[GETJSAMPLE(rle_row[channel][col]) + 256 * channel] >> 8); - } - } - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_counter++; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - } - break; - - case DIRECTCOLOR: - rle_row = source->rle_row; - for (row = 0; row < cinfo->image_height; row++) { - rle_getrow(&source->header, rle_row); - scanline = * (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); - - red_ptr = rle_row[0]; - green_ptr = rle_row[1]; - blue_ptr = rle_row[2]; - - for (col = cinfo->image_width; col > 0; col--) { - *scanline++ = *red_ptr++; - *scanline++ = *green_ptr++; - *scanline++ = *blue_ptr++; - } - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_counter++; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - } - } - -#ifdef PROGRESS_REPORT - if (progress != NULL) - progress->completed_extra_passes++; -#endif - - /* Set up to call proper row-extraction routine in future */ - if (source->visual == PSEUDOCOLOR) { - source->pub.buffer = source->rle_row; - source->pub.get_pixel_rows = get_pseudocolor_row; - } else { - source->pub.get_pixel_rows = get_rle_row; - } - source->row = cinfo->image_height; - - /* And fetch the topmost (bottommost) row */ - return (*source->pub.get_pixel_rows) (cinfo, sinfo); -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - /* no work */ -} - - -/* - * The module selection routine for RLE format input. - */ - -GLOBAL(cjpeg_source_ptr) -jinit_read_rle (j_compress_ptr cinfo) -{ - rle_source_ptr source; - - /* Create module interface object */ - source = (rle_source_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(rle_source_struct)); - /* Fill in method ptrs */ - source->pub.start_input = start_input_rle; - source->pub.finish_input = finish_input_rle; - source->pub.get_pixel_rows = load_image; - - return &source->pub; -} - -#endif /* RLE_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/rdswitch.c b/thirdparty/jpeg-9e/rdswitch.c deleted file mode 100644 index 8a6675d..0000000 --- a/thirdparty/jpeg-9e/rdswitch.c +++ /dev/null @@ -1,363 +0,0 @@ -/* - * rdswitch.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2003-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to process some of cjpeg's more complicated - * command-line switches. Switches processed here are: - * -qtables file Read quantization tables from text file - * -scans file Read scan script from text file - * -quality N[,N,...] Set quality ratings - * -qslots N[,N,...] Set component quantization table selectors - * -sample HxV[,HxV,...] Set component sampling factors - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include /* to declare isdigit(), isspace() */ - - -LOCAL(int) -text_getc (FILE * file) -/* Read next char, skipping over any comments (# to end of line) */ -/* A comment/newline sequence is returned as a newline */ -{ - register int ch; - - ch = getc(file); - if (ch == '#') { - do { - ch = getc(file); - } while (ch != '\n' && ch != EOF); - } - return ch; -} - - -LOCAL(boolean) -read_text_integer (FILE * file, long * result, int * termchar) -/* Read an unsigned decimal integer from a file, store it in result */ -/* Reads one trailing character after the integer; returns it in termchar */ -{ - register int ch; - register long val; - - /* Skip any leading whitespace, detect EOF */ - do { - ch = text_getc(file); - if (ch == EOF) { - *termchar = ch; - return FALSE; - } - } while (isspace(ch)); - - if (! isdigit(ch)) { - *termchar = ch; - return FALSE; - } - - val = ch - '0'; - while ((ch = text_getc(file)) != EOF) { - if (! isdigit(ch)) - break; - val *= 10; - val += ch - '0'; - } - *result = val; - *termchar = ch; - return TRUE; -} - - -GLOBAL(boolean) -read_quant_tables (j_compress_ptr cinfo, char * filename, boolean force_baseline) -/* Read a set of quantization tables from the specified file. - * The file is plain ASCII text: decimal numbers with whitespace between. - * Comments preceded by '#' may be included in the file. - * There may be one to NUM_QUANT_TBLS tables in the file, each of 64 values. - * The tables are implicitly numbered 0,1,etc. - * NOTE: does not affect the qslots mapping, which will default to selecting - * table 0 for luminance (or primary) components, 1 for chrominance components. - * You must use -qslots if you want a different component->table mapping. - */ -{ - FILE * fp; - int tblno, i, termchar; - long val; - unsigned int table[DCTSIZE2]; - - if ((fp = fopen(filename, "r")) == NULL) { - fprintf(stderr, "Can't open table file %s\n", filename); - return FALSE; - } - tblno = 0; - - while (read_text_integer(fp, &val, &termchar)) { /* read 1st element of table */ - if (tblno >= NUM_QUANT_TBLS) { - fprintf(stderr, "Too many tables in file %s\n", filename); - fclose(fp); - return FALSE; - } - table[0] = (unsigned int) val; - for (i = 1; i < DCTSIZE2; i++) { - if (! read_text_integer(fp, &val, &termchar)) { - fprintf(stderr, "Invalid table data in file %s\n", filename); - fclose(fp); - return FALSE; - } - table[i] = (unsigned int) val; - } - jpeg_add_quant_table(cinfo, tblno, table, cinfo->q_scale_factor[tblno], - force_baseline); - tblno++; - } - - if (termchar != EOF) { - fprintf(stderr, "Non-numeric data in file %s\n", filename); - fclose(fp); - return FALSE; - } - - fclose(fp); - return TRUE; -} - - -#ifdef C_MULTISCAN_FILES_SUPPORTED - -LOCAL(boolean) -read_scan_integer (FILE * file, long * result, int * termchar) -/* Variant of read_text_integer that always looks for a non-space termchar; - * this simplifies parsing of punctuation in scan scripts. - */ -{ - register int ch; - - if (! read_text_integer(file, result, termchar)) - return FALSE; - ch = *termchar; - while (ch != EOF && isspace(ch)) - ch = text_getc(file); - if (isdigit(ch)) { /* oops, put it back */ - if (ungetc(ch, file) == EOF) - return FALSE; - ch = ' '; - } else { - /* Any separators other than ';' and ':' are ignored; - * this allows user to insert commas, etc, if desired. - */ - if (ch != EOF && ch != ';' && ch != ':') - ch = ' '; - } - *termchar = ch; - return TRUE; -} - - -GLOBAL(boolean) -read_scan_script (j_compress_ptr cinfo, char * filename) -/* Read a scan script from the specified text file. - * Each entry in the file defines one scan to be emitted. - * Entries are separated by semicolons ';'. - * An entry contains one to four component indexes, - * optionally followed by a colon ':' and four progressive-JPEG parameters. - * The component indexes denote which component(s) are to be transmitted - * in the current scan. The first component has index 0. - * Sequential JPEG is used if the progressive-JPEG parameters are omitted. - * The file is free format text: any whitespace may appear between numbers - * and the ':' and ';' punctuation marks. Also, other punctuation (such - * as commas or dashes) can be placed between numbers if desired. - * Comments preceded by '#' may be included in the file. - * Note: we do very little validity checking here; - * jcmaster.c will validate the script parameters. - */ -{ - FILE * fp; - int scanno, ncomps, termchar; - long val; - jpeg_scan_info * scanptr; -#define MAX_SCANS 100 /* quite arbitrary limit */ - jpeg_scan_info scans[MAX_SCANS]; - - if ((fp = fopen(filename, "r")) == NULL) { - fprintf(stderr, "Can't open scan definition file %s\n", filename); - return FALSE; - } - scanptr = scans; - scanno = 0; - - while (read_scan_integer(fp, &val, &termchar)) { - if (scanno >= MAX_SCANS) { - fprintf(stderr, "Too many scans defined in file %s\n", filename); - fclose(fp); - return FALSE; - } - scanptr->component_index[0] = (int) val; - ncomps = 1; - while (termchar == ' ') { - if (ncomps >= MAX_COMPS_IN_SCAN) { - fprintf(stderr, "Too many components in one scan in file %s\n", - filename); - fclose(fp); - return FALSE; - } - if (! read_scan_integer(fp, &val, &termchar)) - goto bogus; - scanptr->component_index[ncomps] = (int) val; - ncomps++; - } - scanptr->comps_in_scan = ncomps; - if (termchar == ':') { - if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') - goto bogus; - scanptr->Ss = (int) val; - if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') - goto bogus; - scanptr->Se = (int) val; - if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') - goto bogus; - scanptr->Ah = (int) val; - if (! read_scan_integer(fp, &val, &termchar)) - goto bogus; - scanptr->Al = (int) val; - } else { - /* set non-progressive parameters */ - scanptr->Ss = 0; - scanptr->Se = DCTSIZE2-1; - scanptr->Ah = 0; - scanptr->Al = 0; - } - if (termchar != ';' && termchar != EOF) { -bogus: - fprintf(stderr, "Invalid scan entry format in file %s\n", filename); - fclose(fp); - return FALSE; - } - scanptr++, scanno++; - } - - if (termchar != EOF) { - fprintf(stderr, "Non-numeric data in file %s\n", filename); - fclose(fp); - return FALSE; - } - - if (scanno > 0) { - /* Stash completed scan list in cinfo structure. - * NOTE: for cjpeg's use, JPOOL_IMAGE is the right lifetime for this data, - * but if you want to compress multiple images you'd want JPOOL_PERMANENT. - */ - scanptr = (jpeg_scan_info *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, scanno * SIZEOF(jpeg_scan_info)); - MEMCOPY(scanptr, scans, scanno * SIZEOF(jpeg_scan_info)); - cinfo->scan_info = scanptr; - cinfo->num_scans = scanno; - } - - fclose(fp); - return TRUE; -} - -#endif /* C_MULTISCAN_FILES_SUPPORTED */ - - -GLOBAL(boolean) -set_quality_ratings (j_compress_ptr cinfo, char *arg, boolean force_baseline) -/* Process a quality-ratings parameter string, of the form - * N[,N,...] - * If there are more q-table slots than parameters, the last value is replicated. - */ -{ - int val = 75; /* default value */ - int tblno; - char ch; - - for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { - if (*arg) { - ch = ','; /* if not set by sscanf, will be ',' */ - if (sscanf(arg, "%d%c", &val, &ch) < 1) - return FALSE; - if (ch != ',') /* syntax check */ - return FALSE; - /* Convert user 0-100 rating to percentage scaling */ - cinfo->q_scale_factor[tblno] = jpeg_quality_scaling(val); - while (*arg && *arg++ != ','); /* advance to next segment of arg string */ - } else { - /* reached end of parameter, set remaining factors to last value */ - cinfo->q_scale_factor[tblno] = jpeg_quality_scaling(val); - } - } - jpeg_default_qtables(cinfo, force_baseline); - return TRUE; -} - - -GLOBAL(boolean) -set_quant_slots (j_compress_ptr cinfo, char *arg) -/* Process a quantization-table-selectors parameter string, of the form - * N[,N,...] - * If there are more components than parameters, the last value is replicated. - */ -{ - int val = 0; /* default table # */ - int ci; - char ch; - - for (ci = 0; ci < MAX_COMPONENTS; ci++) { - if (*arg) { - ch = ','; /* if not set by sscanf, will be ',' */ - if (sscanf(arg, "%d%c", &val, &ch) < 1) - return FALSE; - if (ch != ',') /* syntax check */ - return FALSE; - if (val < 0 || val >= NUM_QUANT_TBLS) { - fprintf(stderr, "JPEG quantization tables are numbered 0..%d\n", - NUM_QUANT_TBLS-1); - return FALSE; - } - cinfo->comp_info[ci].quant_tbl_no = val; - while (*arg && *arg++ != ','); /* advance to next segment of arg string */ - } else { - /* reached end of parameter, set remaining components to last table */ - cinfo->comp_info[ci].quant_tbl_no = val; - } - } - return TRUE; -} - - -GLOBAL(boolean) -set_sample_factors (j_compress_ptr cinfo, char *arg) -/* Process a sample-factors parameter string, of the form - * HxV[,HxV,...] - * If there are more components than parameters, "1x1" is assumed for the rest. - */ -{ - int ci, val1, val2; - char ch1, ch2; - - for (ci = 0; ci < MAX_COMPONENTS; ci++) { - if (*arg) { - ch2 = ','; /* if not set by sscanf, will be ',' */ - if (sscanf(arg, "%d%c%d%c", &val1, &ch1, &val2, &ch2) < 3) - return FALSE; - if ((ch1 != 'x' && ch1 != 'X') || ch2 != ',') /* syntax check */ - return FALSE; - if (val1 <= 0 || val1 > MAX_SAMP_FACTOR || - val2 <= 0 || val2 > MAX_SAMP_FACTOR) { - fprintf(stderr, "JPEG sampling factors must be 1..%d\n", MAX_SAMP_FACTOR); - return FALSE; - } - cinfo->comp_info[ci].h_samp_factor = val1; - cinfo->comp_info[ci].v_samp_factor = val2; - while (*arg && *arg++ != ','); /* advance to next segment of arg string */ - } else { - /* reached end of parameter, set remaining components to 1x1 sampling */ - cinfo->comp_info[ci].h_samp_factor = 1; - cinfo->comp_info[ci].v_samp_factor = 1; - } - } - return TRUE; -} diff --git a/thirdparty/jpeg-9e/rdtarga.c b/thirdparty/jpeg-9e/rdtarga.c deleted file mode 100644 index c72ad73..0000000 --- a/thirdparty/jpeg-9e/rdtarga.c +++ /dev/null @@ -1,500 +0,0 @@ -/* - * rdtarga.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2017-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to read input images in Targa format. - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume input from - * an ordinary stdio stream. They further assume that reading begins - * at the start of the file; start_input may need work if the - * user interface has already read some data (e.g., to determine that - * the file is indeed Targa format). - * - * Based on code contributed by Lee Daniel Crocker. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef TARGA_SUPPORTED - - -/* Macros to deal with unsigned chars as efficiently as compiler allows */ - -#ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char U_CHAR; -#define UCH(x) ((int) (x)) -#else /* !HAVE_UNSIGNED_CHAR */ -typedef char U_CHAR; -#ifdef CHAR_IS_UNSIGNED -#define UCH(x) ((int) (x)) -#else -#define UCH(x) ((int) (x) & 0xFF) -#endif -#endif /* HAVE_UNSIGNED_CHAR */ - - -#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) - - -/* Private version of data source object */ - -typedef struct _tga_source_struct * tga_source_ptr; - -typedef struct _tga_source_struct { - struct cjpeg_source_struct pub; /* public fields */ - - j_compress_ptr cinfo; /* back link saves passing separate parm */ - - JSAMPARRAY colormap; /* Targa colormap (converted to my format) */ - - jvirt_sarray_ptr whole_image; /* Needed if funny input row order */ - JDIMENSION current_row; /* Current logical row number to read */ - - /* Pointer to routine to extract next Targa pixel from input file */ - JMETHOD(void, read_pixel, (tga_source_ptr sinfo)); - - /* Result of read_pixel is delivered here: */ - U_CHAR tga_pixel[4]; - - int pixel_size; /* Bytes per Targa pixel (1 to 4) */ - int cmap_length; /* colormap length */ - - /* State info for reading RLE-coded pixels; both counts must be init to 0 */ - int block_count; /* # of pixels remaining in RLE block */ - int dup_pixel_count; /* # of times to duplicate previous pixel */ - - /* This saves the correct pixel-row-expansion method for preload_image */ - JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, - cjpeg_source_ptr sinfo)); -} tga_source_struct; - - -/* For expanding 5-bit pixel values to 8-bit with best rounding */ - -static const UINT8 c5to8bits[32] = { - 0, 8, 16, 25, 33, 41, 49, 58, - 66, 74, 82, 90, 99, 107, 115, 123, - 132, 140, 148, 156, 165, 173, 181, 189, - 197, 206, 214, 222, 230, 239, 247, 255 -}; - - - -LOCAL(int) -read_byte (tga_source_ptr sinfo) -/* Read next byte from Targa file */ -{ - register FILE *infile = sinfo->pub.input_file; - register int c; - - if ((c = getc(infile)) == EOF) - ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); - return c; -} - - -LOCAL(void) -read_colormap (tga_source_ptr sinfo, int cmaplen, int mapentrysize) -/* Read the colormap from a Targa file */ -{ - int i; - - /* Presently only handles 24-bit BGR format */ - if (mapentrysize != 24) - ERREXIT(sinfo->cinfo, JERR_TGA_BADCMAP); - - for (i = 0; i < cmaplen; i++) { - sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); - } -} - - -/* - * read_pixel methods: get a single pixel from Targa file into tga_pixel[] - */ - -METHODDEF(void) -read_non_rle_pixel (tga_source_ptr sinfo) -/* Read one Targa pixel from the input file; no RLE expansion */ -{ - register int i; - - for (i = 0; i < sinfo->pixel_size; i++) { - sinfo->tga_pixel[i] = (U_CHAR) read_byte(sinfo); - } -} - -METHODDEF(void) -read_rle_pixel (tga_source_ptr sinfo) -/* Read one Targa pixel from the input file, expanding RLE data as needed */ -{ - register int i; - - /* Duplicate previously read pixel? */ - if (sinfo->dup_pixel_count > 0) { - sinfo->dup_pixel_count--; - return; - } - - /* Time to read RLE block header? */ - if (--sinfo->block_count < 0) { /* decrement pixels remaining in block */ - i = read_byte(sinfo); - if (i & 0x80) { /* Start of duplicate-pixel block? */ - sinfo->dup_pixel_count = i & 0x7F; /* number of dups after this one */ - sinfo->block_count = 0; /* then read new block header */ - } else { - sinfo->block_count = i & 0x7F; /* number of pixels after this one */ - } - } - - /* Read next pixel */ - for (i = 0; i < sinfo->pixel_size; i++) { - sinfo->tga_pixel[i] = (U_CHAR) read_byte(sinfo); - } -} - - -/* - * Read one row of pixels. - * - * We provide several different versions depending on input file format. - */ - -METHODDEF(JDIMENSION) -get_8bit_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 8-bit grayscale pixels */ -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - register JSAMPROW ptr; - register JDIMENSION col; - - ptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ - *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); - } - return 1; -} - -METHODDEF(JDIMENSION) -get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 8-bit colormap indexes */ -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - register JSAMPROW ptr; - register JSAMPARRAY colormap; - register JDIMENSION col; - register int t; - int cmaplen; - - ptr = source->pub.buffer[0]; - colormap = source->colormap; - cmaplen = source->cmap_length; - for (col = cinfo->image_width; col > 0; col--) { - (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ - t = UCH(source->tga_pixel[0]); - if (t >= cmaplen) - ERREXIT(cinfo, JERR_TGA_BADPARMS); - *ptr++ = colormap[0][t]; - *ptr++ = colormap[1][t]; - *ptr++ = colormap[2][t]; - } - return 1; -} - -METHODDEF(JDIMENSION) -get_16bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 16-bit pixels */ -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - register int t; - register JSAMPROW ptr; - register JDIMENSION col; - - ptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ - t = UCH(source->tga_pixel[0]); - t += UCH(source->tga_pixel[1]) << 8; - /* We expand 5 bit data to 8 bit sample width. - * The format of the 16-bit (LSB first) input word is - * xRRRRRGGGGGBBBBB - */ - ptr[2] = (JSAMPLE) c5to8bits[t & 0x1F]; - t >>= 5; - ptr[1] = (JSAMPLE) c5to8bits[t & 0x1F]; - t >>= 5; - ptr[0] = (JSAMPLE) c5to8bits[t & 0x1F]; - ptr += 3; - } - return 1; -} - -METHODDEF(JDIMENSION) -get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 24-bit pixels */ -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - register JSAMPROW ptr; - register JDIMENSION col; - - ptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ - *ptr++ = (JSAMPLE) UCH(source->tga_pixel[2]); /* change BGR to RGB order */ - *ptr++ = (JSAMPLE) UCH(source->tga_pixel[1]); - *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); - } - return 1; -} - -/* - * Targa also defines a 32-bit pixel format with order B,G,R,A. - * We presently ignore the attribute byte, so the code for reading - * these pixels is identical to the 24-bit routine above. - * This works because the actual pixel length is only known to read_pixel. - */ - -#define get_32bit_row get_24bit_row - - -/* - * This method is for re-reading the input data in standard top-down - * row order. The entire image has already been read into whole_image - * with proper conversion of pixel format, but it's in a funny row order. - */ - -METHODDEF(JDIMENSION) -get_memory_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - JDIMENSION source_row; - - /* Compute row of source that maps to current_row of normal order */ - /* For now, assume image is bottom-up and not interlaced. */ - /* NEEDS WORK to support interlaced images! */ - source_row = cinfo->image_height - source->current_row - 1; - - /* Fetch that row from virtual array */ - source->pub.buffer = (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, - source->whole_image, source_row, (JDIMENSION) 1, FALSE); - - source->current_row++; - return 1; -} - - -/* - * This method loads the image into whole_image during the first call on - * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call - * get_memory_row on subsequent calls. - */ - -METHODDEF(JDIMENSION) -preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - JDIMENSION row; - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - - /* Read the data into a virtual array in input-file row order. */ - for (row = 0; row < cinfo->image_height; row++) { - if (progress != NULL) { - progress->pub.pass_counter = (long) row; - progress->pub.pass_limit = (long) cinfo->image_height; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } - source->pub.buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->whole_image, row, (JDIMENSION) 1, TRUE); - (*source->get_pixel_rows) (cinfo, sinfo); - } - if (progress != NULL) - progress->completed_extra_passes++; - - /* Set up to read from the virtual array in unscrambled order */ - source->pub.get_pixel_rows = get_memory_row; - source->current_row = 0; - /* And read the first row */ - return get_memory_row(cinfo, sinfo); -} - - -/* - * Read the file header; return image size and component count. - */ - -METHODDEF(void) -start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - U_CHAR targaheader[18]; - int idlen, cmaptype, subtype, flags, interlace_type, components; - unsigned int width, height, maplen; - boolean is_bottom_up; - -#define GET_2B(offset) ((unsigned int) UCH(targaheader[offset]) + \ - (((unsigned int) UCH(targaheader[offset+1])) << 8)) - - if (! ReadOK(source->pub.input_file, targaheader, 18)) - ERREXIT(cinfo, JERR_INPUT_EOF); - - /* Pretend "15-bit" pixels are 16-bit --- we ignore attribute bit anyway */ - if (targaheader[16] == 15) - targaheader[16] = 16; - - idlen = UCH(targaheader[0]); - cmaptype = UCH(targaheader[1]); - subtype = UCH(targaheader[2]); - maplen = GET_2B(5); - width = GET_2B(12); - height = GET_2B(14); - source->pixel_size = UCH(targaheader[16]) >> 3; - flags = UCH(targaheader[17]); /* Image Descriptor byte */ - - is_bottom_up = ((flags & 0x20) == 0); /* bit 5 set => top-down */ - interlace_type = flags >> 6; /* bits 6/7 are interlace code */ - - if (cmaptype > 1 || /* cmaptype must be 0 or 1 */ - width <= 0 || height <= 0 || - source->pixel_size < 1 || source->pixel_size > 4 || - (UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */ - interlace_type != 0) /* currently don't allow interlaced image */ - ERREXIT(cinfo, JERR_TGA_BADPARMS); - - if (subtype > 8) { - /* It's an RLE-coded file */ - source->read_pixel = read_rle_pixel; - source->block_count = source->dup_pixel_count = 0; - subtype -= 8; - } else { - /* Non-RLE file */ - source->read_pixel = read_non_rle_pixel; - } - - /* Now should have subtype 1, 2, or 3 */ - components = 3; /* until proven different */ - cinfo->in_color_space = JCS_RGB; - - switch (subtype) { - case 1: /* Colormapped image */ - if (source->pixel_size == 1 && cmaptype == 1) - source->get_pixel_rows = get_8bit_row; - else - ERREXIT(cinfo, JERR_TGA_BADPARMS); - TRACEMS2(cinfo, 1, JTRC_TGA_MAPPED, width, height); - break; - case 2: /* RGB image */ - switch (source->pixel_size) { - case 2: - source->get_pixel_rows = get_16bit_row; - break; - case 3: - source->get_pixel_rows = get_24bit_row; - break; - case 4: - source->get_pixel_rows = get_32bit_row; - break; - default: - ERREXIT(cinfo, JERR_TGA_BADPARMS); - } - TRACEMS2(cinfo, 1, JTRC_TGA, width, height); - break; - case 3: /* Grayscale image */ - components = 1; - cinfo->in_color_space = JCS_GRAYSCALE; - if (source->pixel_size == 1) - source->get_pixel_rows = get_8bit_gray_row; - else - ERREXIT(cinfo, JERR_TGA_BADPARMS); - TRACEMS2(cinfo, 1, JTRC_TGA_GRAY, width, height); - break; - default: - ERREXIT(cinfo, JERR_TGA_BADPARMS); - } - - if (is_bottom_up) { - /* Create a virtual array to buffer the upside-down image. */ - source->whole_image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - (JDIMENSION) width * components, (JDIMENSION) height, (JDIMENSION) 1); - if (cinfo->progress != NULL) { - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - progress->total_extra_passes++; /* count file input as separate pass */ - } - /* source->pub.buffer will point to the virtual array. */ - source->pub.buffer_height = 1; /* in case anyone looks at it */ - source->pub.get_pixel_rows = preload_image; - } else { - /* Don't need a virtual array, but do need a one-row input buffer. */ - source->whole_image = NULL; - source->pub.buffer = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, - JPOOL_IMAGE, (JDIMENSION) width * components, (JDIMENSION) 1); - source->pub.buffer_height = 1; - source->pub.get_pixel_rows = source->get_pixel_rows; - } - - while (idlen--) /* Throw away ID field */ - (void) read_byte(source); - - if (maplen > 0) { - if (maplen > 256 || GET_2B(3) != 0) - ERREXIT(cinfo, JERR_TGA_BADCMAP); - /* Allocate space to store the colormap */ - source->colormap = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, - JPOOL_IMAGE, (JDIMENSION) maplen, (JDIMENSION) 3); - source->cmap_length = (int) maplen; - /* and read it from the file */ - read_colormap(source, (int) maplen, UCH(targaheader[7])); - } else { - if (cmaptype) /* but you promised a cmap! */ - ERREXIT(cinfo, JERR_TGA_BADPARMS); - source->colormap = NULL; - source->cmap_length = 0; - } - - cinfo->input_components = components; - cinfo->data_precision = 8; - cinfo->image_width = width; - cinfo->image_height = height; -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - /* no work */ -} - - -/* - * The module selection routine for Targa format input. - */ - -GLOBAL(cjpeg_source_ptr) -jinit_read_targa (j_compress_ptr cinfo) -{ - tga_source_ptr source; - - /* Create module interface object */ - source = (tga_source_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(tga_source_struct)); - source->cinfo = cinfo; /* make back link for subroutines */ - /* Fill in method ptrs, except get_pixel_rows which start_input sets */ - source->pub.start_input = start_input_tga; - source->pub.finish_input = finish_input_tga; - - return &source->pub; -} - -#endif /* TARGA_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/stamp-h1 b/thirdparty/jpeg-9e/stamp-h1 deleted file mode 100644 index 47553f4..0000000 --- a/thirdparty/jpeg-9e/stamp-h1 +++ /dev/null @@ -1 +0,0 @@ -timestamp for jconfig.h diff --git a/thirdparty/jpeg-9e/structure.txt b/thirdparty/jpeg-9e/structure.txt deleted file mode 100644 index 98e20c7..0000000 --- a/thirdparty/jpeg-9e/structure.txt +++ /dev/null @@ -1,942 +0,0 @@ -IJG JPEG LIBRARY: SYSTEM ARCHITECTURE - -Copyright (C) 1991-2013, Thomas G. Lane, Guido Vollbeding. -This file is part of the Independent JPEG Group's software. -For conditions of distribution and use, see the accompanying README file. - - -This file provides an overview of the architecture of the IJG JPEG software; -that is, the functions of the various modules in the system and the interfaces -between modules. For more precise details about any data structure or calling -convention, see the include files and comments in the source code. - -We assume that the reader is already somewhat familiar with the JPEG standard. -The README file includes references for learning about JPEG. The file -libjpeg.txt describes the library from the viewpoint of an application -programmer using the library; it's best to read that file before this one. -Also, the file coderules.txt describes the coding style conventions we use. - -In this document, JPEG-specific terminology follows the JPEG standard: - A "component" means a color channel, e.g., Red or Luminance. - A "sample" is a single component value (i.e., one number in the image data). - A "coefficient" is a frequency coefficient (a DCT transform output number). - A "block" is an array of samples or coefficients. - An "MCU" (minimum coded unit) is an interleaved set of blocks of size - determined by the sampling factors, or a single block in a - noninterleaved scan. -We do not use the terms "pixel" and "sample" interchangeably. When we say -pixel, we mean an element of the full-size image, while a sample is an element -of the downsampled image. Thus the number of samples may vary across -components while the number of pixels does not. (This terminology is not used -rigorously throughout the code, but it is used in places where confusion would -otherwise result.) - - -*** System features *** - -The IJG distribution contains two parts: - * A subroutine library for JPEG compression and decompression. - * cjpeg/djpeg, two sample applications that use the library to transform - JFIF JPEG files to and from several other image formats. -cjpeg/djpeg are of no great intellectual complexity: they merely add a simple -command-line user interface and I/O routines for several uncompressed image -formats. This document concentrates on the library itself. - -We desire the library to be capable of supporting all JPEG baseline, extended -sequential, and progressive DCT processes. The library does not support the -hierarchical or lossless processes defined in the standard. - -Within these limits, any set of compression parameters allowed by the JPEG -spec should be readable for decompression. (We can be more restrictive about -what formats we can generate.) Although the system design allows for all -parameter values, some uncommon settings are not yet implemented and may -never be; nonintegral sampling ratios are the prime example. Furthermore, -we treat 8-bit vs. 12-bit data precision as a compile-time switch, not a -run-time option, because most machines can store 8-bit pixels much more -compactly than 12-bit. - -By itself, the library handles only interchange JPEG datastreams --- in -particular the widely used JFIF file format. The library can be used by -surrounding code to process interchange or abbreviated JPEG datastreams that -are embedded in more complex file formats. (For example, libtiff uses this -library to implement JPEG compression within the TIFF file format.) - -The library includes a substantial amount of code that is not covered by the -JPEG standard but is necessary for typical applications of JPEG. These -functions preprocess the image before JPEG compression or postprocess it after -decompression. They include colorspace conversion, downsampling/upsampling, -and color quantization. This code can be omitted if not needed. - -A wide range of quality vs. speed tradeoffs are possible in JPEG processing, -and even more so in decompression postprocessing. The decompression library -provides multiple implementations that cover most of the useful tradeoffs, -ranging from very-high-quality down to fast-preview operation. On the -compression side we have generally not provided low-quality choices, since -compression is normally less time-critical. It should be understood that the -low-quality modes may not meet the JPEG standard's accuracy requirements; -nonetheless, they are useful for viewers. - - -*** Portability issues *** - -Portability is an essential requirement for the library. The key portability -issues that show up at the level of system architecture are: - -1. Memory usage. We want the code to be able to run on PC-class machines -with limited memory. Images should therefore be processed sequentially (in -strips), to avoid holding the whole image in memory at once. Where a -full-image buffer is necessary, we should be able to use either virtual memory -or temporary files. - -2. Near/far pointer distinction. To run efficiently on 80x86 machines, the -code should distinguish "small" objects (kept in near data space) from -"large" ones (kept in far data space). This is an annoying restriction, but -fortunately it does not impact code quality for less brain-damaged machines, -and the source code clutter turns out to be minimal with sufficient use of -pointer typedefs. - -3. Data precision. We assume that "char" is at least 8 bits, "short" and -"int" at least 16, "long" at least 32. The code will work fine with larger -data sizes, although memory may be used inefficiently in some cases. However, -the JPEG compressed datastream must ultimately appear on external storage as a -sequence of 8-bit bytes if it is to conform to the standard. This may pose a -problem on machines where char is wider than 8 bits. The library represents -compressed data as an array of values of typedef JOCTET. If no data type -exactly 8 bits wide is available, custom data source and data destination -modules must be written to unpack and pack the chosen JOCTET datatype into -8-bit external representation. - - -*** System overview *** - -The compressor and decompressor are each divided into two main sections: -the JPEG compressor or decompressor proper, and the preprocessing or -postprocessing functions. The interface between these two sections is the -image data that the official JPEG spec regards as its input or output: this -data is in the colorspace to be used for compression, and it is downsampled -to the sampling factors to be used. The preprocessing and postprocessing -steps are responsible for converting a normal image representation to or from -this form. (Those few applications that want to deal with YCbCr downsampled -data can skip the preprocessing or postprocessing step.) - -Looking more closely, the compressor library contains the following main -elements: - - Preprocessing: - * Color space conversion (e.g., RGB to YCbCr). - * Edge expansion and downsampling. Optionally, this step can do simple - smoothing --- this is often helpful for low-quality source data. - JPEG proper: - * MCU assembly, DCT, quantization. - * Entropy coding (sequential or progressive, Huffman or arithmetic). - -In addition to these modules we need overall control, marker generation, -and support code (memory management & error handling). There is also a -module responsible for physically writing the output data --- typically -this is just an interface to fwrite(), but some applications may need to -do something else with the data. - -The decompressor library contains the following main elements: - - JPEG proper: - * Entropy decoding (sequential or progressive, Huffman or arithmetic). - * Dequantization, inverse DCT, MCU disassembly. - Postprocessing: - * Upsampling. Optionally, this step may be able to do more general - rescaling of the image. - * Color space conversion (e.g., YCbCr to RGB). This step may also - provide gamma adjustment [ currently it does not ]. - * Optional color quantization (e.g., reduction to 256 colors). - * Optional color precision reduction (e.g., 24-bit to 15-bit color). - [This feature is not currently implemented.] - -We also need overall control, marker parsing, and a data source module. -The support code (memory management & error handling) can be shared with -the compression half of the library. - -There may be several implementations of each of these elements, particularly -in the decompressor, where a wide range of speed/quality tradeoffs is very -useful. It must be understood that some of the best speedups involve -merging adjacent steps in the pipeline. For example, upsampling, color space -conversion, and color quantization might all be done at once when using a -low-quality ordered-dither technique. The system architecture is designed to -allow such merging where appropriate. - - -Note: it is convenient to regard edge expansion (padding to block boundaries) -as a preprocessing/postprocessing function, even though the JPEG spec includes -it in compression/decompression. We do this because downsampling/upsampling -can be simplified a little if they work on padded data: it's not necessary to -have special cases at the right and bottom edges. Therefore the interface -buffer is always an integral number of blocks wide and high, and we expect -compression preprocessing to pad the source data properly. Padding will occur -only to the next block (block_size-sample) boundary. In an interleaved-scan -situation, additional dummy blocks may be used to fill out MCUs, but the MCU -assembly and disassembly logic will create or discard these blocks internally. -(This is advantageous for speed reasons, since we avoid DCTing the dummy -blocks. It also permits a small reduction in file size, because the -compressor can choose dummy block contents so as to minimize their size -in compressed form. Finally, it makes the interface buffer specification -independent of whether the file is actually interleaved or not.) -Applications that wish to deal directly with the downsampled data must -provide similar buffering and padding for odd-sized images. - - -*** Poor man's object-oriented programming *** - -It should be clear by now that we have a lot of quasi-independent processing -steps, many of which have several possible behaviors. To avoid cluttering the -code with lots of switch statements, we use a simple form of object-style -programming to separate out the different possibilities. - -For example, two different color quantization algorithms could be implemented -as two separate modules that present the same external interface; at runtime, -the calling code will access the proper module indirectly through an "object". - -We can get the limited features we need while staying within portable C. -The basic tool is a function pointer. An "object" is just a struct -containing one or more function pointer fields, each of which corresponds to -a method name in real object-oriented languages. During initialization we -fill in the function pointers with references to whichever module we have -determined we need to use in this run. Then invocation of the module is done -by indirecting through a function pointer; on most machines this is no more -expensive than a switch statement, which would be the only other way of -making the required run-time choice. The really significant benefit, of -course, is keeping the source code clean and well structured. - -We can also arrange to have private storage that varies between different -implementations of the same kind of object. We do this by making all the -module-specific object structs be separately allocated entities, which will -be accessed via pointers in the master compression or decompression struct. -The "public" fields or methods for a given kind of object are specified by -a commonly known struct. But a module's initialization code can allocate -a larger struct that contains the common struct as its first member, plus -additional private fields. With appropriate pointer casting, the module's -internal functions can access these private fields. (For a simple example, -see jdatadst.c, which implements the external interface specified by struct -jpeg_destination_mgr, but adds extra fields.) - -(Of course this would all be a lot easier if we were using C++, but we are -not yet prepared to assume that everyone has a C++ compiler.) - -An important benefit of this scheme is that it is easy to provide multiple -versions of any method, each tuned to a particular case. While a lot of -precalculation might be done to select an optimal implementation of a method, -the cost per invocation is constant. For example, the upsampling step might -have a "generic" method, plus one or more "hardwired" methods for the most -popular sampling factors; the hardwired methods would be faster because they'd -use straight-line code instead of for-loops. The cost to determine which -method to use is paid only once, at startup, and the selection criteria are -hidden from the callers of the method. - -This plan differs a little bit from usual object-oriented structures, in that -only one instance of each object class will exist during execution. The -reason for having the class structure is that on different runs we may create -different instances (choose to execute different modules). You can think of -the term "method" as denoting the common interface presented by a particular -set of interchangeable functions, and "object" as denoting a group of related -methods, or the total shared interface behavior of a group of modules. - - -*** Overall control structure *** - -We previously mentioned the need for overall control logic in the compression -and decompression libraries. In IJG implementations prior to v5, overall -control was mostly provided by "pipeline control" modules, which proved to be -large, unwieldy, and hard to understand. To improve the situation, the -control logic has been subdivided into multiple modules. The control modules -consist of: - -1. Master control for module selection and initialization. This has two -responsibilities: - - 1A. Startup initialization at the beginning of image processing. - The individual processing modules to be used in this run are selected - and given initialization calls. - - 1B. Per-pass control. This determines how many passes will be performed - and calls each active processing module to configure itself - appropriately at the beginning of each pass. End-of-pass processing, - where necessary, is also invoked from the master control module. - - Method selection is partially distributed, in that a particular processing - module may contain several possible implementations of a particular method, - which it will select among when given its initialization call. The master - control code need only be concerned with decisions that affect more than - one module. - -2. Data buffering control. A separate control module exists for each - inter-processing-step data buffer. This module is responsible for - invoking the processing steps that write or read that data buffer. - -Each buffer controller sees the world as follows: - -input data => processing step A => buffer => processing step B => output data - | | | - ------------------ controller ------------------ - -The controller knows the dataflow requirements of steps A and B: how much data -they want to accept in one chunk and how much they output in one chunk. Its -function is to manage its buffer and call A and B at the proper times. - -A data buffer control module may itself be viewed as a processing step by a -higher-level control module; thus the control modules form a binary tree with -elementary processing steps at the leaves of the tree. - -The control modules are objects. A considerable amount of flexibility can -be had by replacing implementations of a control module. For example: -* Merging of adjacent steps in the pipeline is done by replacing a control - module and its pair of processing-step modules with a single processing- - step module. (Hence the possible merges are determined by the tree of - control modules.) -* In some processing modes, a given interstep buffer need only be a "strip" - buffer large enough to accommodate the desired data chunk sizes. In other - modes, a full-image buffer is needed and several passes are required. - The control module determines which kind of buffer is used and manipulates - virtual array buffers as needed. One or both processing steps may be - unaware of the multi-pass behavior. - -In theory, we might be able to make all of the data buffer controllers -interchangeable and provide just one set of implementations for all. In -practice, each one contains considerable special-case processing for its -particular job. The buffer controller concept should be regarded as an -overall system structuring principle, not as a complete description of the -task performed by any one controller. - - -*** Compression object structure *** - -Here is a sketch of the logical structure of the JPEG compression library: - - |-- Colorspace conversion - |-- Preprocessing controller --| - | |-- Downsampling -Main controller --| - | |-- Forward DCT, quantize - |-- Coefficient controller --| - |-- Entropy encoding - -This sketch also describes the flow of control (subroutine calls) during -typical image data processing. Each of the components shown in the diagram is -an "object" which may have several different implementations available. One -or more source code files contain the actual implementation(s) of each object. - -The objects shown above are: - -* Main controller: buffer controller for the subsampled-data buffer, which - holds the preprocessed input data. This controller invokes preprocessing to - fill the subsampled-data buffer, and JPEG compression to empty it. There is - usually no need for a full-image buffer here; a strip buffer is adequate. - -* Preprocessing controller: buffer controller for the downsampling input data - buffer, which lies between colorspace conversion and downsampling. Note - that a unified conversion/downsampling module would probably replace this - controller entirely. - -* Colorspace conversion: converts application image data into the desired - JPEG color space; also changes the data from pixel-interleaved layout to - separate component planes. Processes one pixel row at a time. - -* Downsampling: performs reduction of chroma components as required. - Optionally may perform pixel-level smoothing as well. Processes a "row - group" at a time, where a row group is defined as Vmax pixel rows of each - component before downsampling, and Vk sample rows afterwards (remember Vk - differs across components). Some downsampling or smoothing algorithms may - require context rows above and below the current row group; the - preprocessing controller is responsible for supplying these rows via proper - buffering. The downsampler is responsible for edge expansion at the right - edge (i.e., extending each sample row to a multiple of block_size samples); - but the preprocessing controller is responsible for vertical edge expansion - (i.e., duplicating the bottom sample row as needed to make a multiple of - block_size rows). - -* Coefficient controller: buffer controller for the DCT-coefficient data. - This controller handles MCU assembly, including insertion of dummy DCT - blocks when needed at the right or bottom edge. When performing - Huffman-code optimization or emitting a multiscan JPEG file, this - controller is responsible for buffering the full image. The equivalent of - one fully interleaved MCU row of subsampled data is processed per call, - even when the JPEG file is noninterleaved. - -* Forward DCT and quantization: Perform DCT, quantize, and emit coefficients. - Works on one or more DCT blocks at a time. (Note: the coefficients are now - emitted in normal array order, which the entropy encoder is expected to - convert to zigzag order as necessary. Prior versions of the IJG code did - the conversion to zigzag order within the quantization step.) - -* Entropy encoding: Perform Huffman or arithmetic entropy coding and emit the - coded data to the data destination module. Works on one MCU per call. - For progressive JPEG, the same DCT blocks are fed to the entropy coder - during each pass, and the coder must emit the appropriate subset of - coefficients. - -In addition to the above objects, the compression library includes these -objects: - -* Master control: determines the number of passes required, controls overall - and per-pass initialization of the other modules. - -* Marker writing: generates JPEG markers (except for RSTn, which is emitted - by the entropy encoder when needed). - -* Data destination manager: writes the output JPEG datastream to its final - destination (e.g., a file). The destination manager supplied with the - library knows how to write to a stdio stream or to a memory buffer; - for other behaviors, the surrounding application may provide its own - destination manager. - -* Memory manager: allocates and releases memory, controls virtual arrays - (with backing store management, where required). - -* Error handler: performs formatting and output of error and trace messages; - determines handling of nonfatal errors. The surrounding application may - override some or all of this object's methods to change error handling. - -* Progress monitor: supports output of "percent-done" progress reports. - This object represents an optional callback to the surrounding application: - if wanted, it must be supplied by the application. - -The error handler, destination manager, and progress monitor objects are -defined as separate objects in order to simplify application-specific -customization of the JPEG library. A surrounding application may override -individual methods or supply its own all-new implementation of one of these -objects. The object interfaces for these objects are therefore treated as -part of the application interface of the library, whereas the other objects -are internal to the library. - -The error handler and memory manager are shared by JPEG compression and -decompression; the progress monitor, if used, may be shared as well. - - -*** Decompression object structure *** - -Here is a sketch of the logical structure of the JPEG decompression library: - - |-- Entropy decoding - |-- Coefficient controller --| - | |-- Dequantize, Inverse DCT -Main controller --| - | |-- Upsampling - |-- Postprocessing controller --| |-- Colorspace conversion - |-- Color quantization - |-- Color precision reduction - -As before, this diagram also represents typical control flow. The objects -shown are: - -* Main controller: buffer controller for the subsampled-data buffer, which - holds the output of JPEG decompression proper. This controller's primary - task is to feed the postprocessing procedure. Some upsampling algorithms - may require context rows above and below the current row group; when this - is true, the main controller is responsible for managing its buffer so as - to make context rows available. In the current design, the main buffer is - always a strip buffer; a full-image buffer is never required. - -* Coefficient controller: buffer controller for the DCT-coefficient data. - This controller handles MCU disassembly, including deletion of any dummy - DCT blocks at the right or bottom edge. When reading a multiscan JPEG - file, this controller is responsible for buffering the full image. - (Buffering DCT coefficients, rather than samples, is necessary to support - progressive JPEG.) The equivalent of one fully interleaved MCU row of - subsampled data is processed per call, even when the source JPEG file is - noninterleaved. - -* Entropy decoding: Read coded data from the data source module and perform - Huffman or arithmetic entropy decoding. Works on one MCU per call. - For progressive JPEG decoding, the coefficient controller supplies the prior - coefficients of each MCU (initially all zeroes), which the entropy decoder - modifies in each scan. - -* Dequantization and inverse DCT: like it says. Note that the coefficients - buffered by the coefficient controller have NOT been dequantized; we - merge dequantization and inverse DCT into a single step for speed reasons. - When scaled-down output is asked for, simplified DCT algorithms may be used - that need fewer coefficients and emit fewer samples per DCT block, not the - full 8x8. Works on one DCT block at a time. - -* Postprocessing controller: buffer controller for the color quantization - input buffer, when quantization is in use. (Without quantization, this - controller just calls the upsampler.) For two-pass quantization, this - controller is responsible for buffering the full-image data. - -* Upsampling: restores chroma components to full size. (May support more - general output rescaling, too. Note that if undersized DCT outputs have - been emitted by the DCT module, this module must adjust so that properly - sized outputs are created.) Works on one row group at a time. This module - also calls the color conversion module, so its top level is effectively a - buffer controller for the upsampling->color conversion buffer. However, in - all but the highest-quality operating modes, upsampling and color - conversion are likely to be merged into a single step. - -* Colorspace conversion: convert from JPEG color space to output color space, - and change data layout from separate component planes to pixel-interleaved. - Works on one pixel row at a time. - -* Color quantization: reduce the data to colormapped form, using either an - externally specified colormap or an internally generated one. This module - is not used for full-color output. Works on one pixel row at a time; may - require two passes to generate a color map. Note that the output will - always be a single component representing colormap indexes. In the current - design, the output values are JSAMPLEs, so an 8-bit compilation cannot - quantize to more than 256 colors. This is unlikely to be a problem in - practice. - -* Color reduction: this module handles color precision reduction, e.g., - generating 15-bit color (5 bits/primary) from JPEG's 24-bit output. - Not quite clear yet how this should be handled... should we merge it with - colorspace conversion??? - -Note that some high-speed operating modes might condense the entire -postprocessing sequence to a single module (upsample, color convert, and -quantize in one step). - -In addition to the above objects, the decompression library includes these -objects: - -* Master control: determines the number of passes required, controls overall - and per-pass initialization of the other modules. This is subdivided into - input and output control: jdinput.c controls only input-side processing, - while jdmaster.c handles overall initialization and output-side control. - -* Marker reading: decodes JPEG markers (except for RSTn). - -* Data source manager: supplies the input JPEG datastream. The source - manager supplied with the library knows how to read from a stdio stream - or from a memory buffer; for other behaviors, the surrounding application - may provide its own source manager. - -* Memory manager: same as for compression library. - -* Error handler: same as for compression library. - -* Progress monitor: same as for compression library. - -As with compression, the data source manager, error handler, and progress -monitor are candidates for replacement by a surrounding application. - - -*** Decompression input and output separation *** - -To support efficient incremental display of progressive JPEG files, the -decompressor is divided into two sections that can run independently: - -1. Data input includes marker parsing, entropy decoding, and input into the - coefficient controller's DCT coefficient buffer. Note that this - processing is relatively cheap and fast. - -2. Data output reads from the DCT coefficient buffer and performs the IDCT - and all postprocessing steps. - -For a progressive JPEG file, the data input processing is allowed to get -arbitrarily far ahead of the data output processing. (This occurs only -if the application calls jpeg_consume_input(); otherwise input and output -run in lockstep, since the input section is called only when the output -section needs more data.) In this way the application can avoid making -extra display passes when data is arriving faster than the display pass -can run. Furthermore, it is possible to abort an output pass without -losing anything, since the coefficient buffer is read-only as far as the -output section is concerned. See libjpeg.txt for more detail. - -A full-image coefficient array is only created if the JPEG file has multiple -scans (or if the application specifies buffered-image mode anyway). When -reading a single-scan file, the coefficient controller normally creates only -a one-MCU buffer, so input and output processing must run in lockstep in this -case. jpeg_consume_input() is effectively a no-op in this situation. - -The main impact of dividing the decompressor in this fashion is that we must -be very careful with shared variables in the cinfo data structure. Each -variable that can change during the course of decompression must be -classified as belonging to data input or data output, and each section must -look only at its own variables. For example, the data output section may not -depend on any of the variables that describe the current scan in the JPEG -file, because these may change as the data input section advances into a new -scan. - -The progress monitor is (somewhat arbitrarily) defined to treat input of the -file as one pass when buffered-image mode is not used, and to ignore data -input work completely when buffered-image mode is used. Note that the -library has no reliable way to predict the number of passes when dealing -with a progressive JPEG file, nor can it predict the number of output passes -in buffered-image mode. So the work estimate is inherently bogus anyway. - -No comparable division is currently made in the compression library, because -there isn't any real need for it. - - -*** Data formats *** - -Arrays of pixel sample values use the following data structure: - - typedef something JSAMPLE; a pixel component value, 0..MAXJSAMPLE - typedef JSAMPLE *JSAMPROW; ptr to a row of samples - typedef JSAMPROW *JSAMPARRAY; ptr to a list of rows - typedef JSAMPARRAY *JSAMPIMAGE; ptr to a list of color-component arrays - -The basic element type JSAMPLE will typically be one of unsigned char, -(signed) char, or short. Short will be used if samples wider than 8 bits are -to be supported (this is a compile-time option). Otherwise, unsigned char is -used if possible. If the compiler only supports signed chars, then it is -necessary to mask off the value when reading. Thus, all reads of JSAMPLE -values must be coded as "GETJSAMPLE(value)", where the macro will be defined -as "((value) & 0xFF)" on signed-char machines and "((int) (value))" elsewhere. - -With these conventions, JSAMPLE values can be assumed to be >= 0. This helps -simplify correct rounding during downsampling, etc. The JPEG standard's -specification that sample values run from -128..127 is accommodated by -subtracting 128 from the sample value in the DCT step. Similarly, during -decompression the output of the IDCT step will be immediately shifted back to -0..255. (NB: different values are required when 12-bit samples are in use. -The code is written in terms of MAXJSAMPLE and CENTERJSAMPLE, which will be -defined as 255 and 128 respectively in an 8-bit implementation, and as 4095 -and 2048 in a 12-bit implementation.) - -We use a pointer per row, rather than a two-dimensional JSAMPLE array. This -choice costs only a small amount of memory and has several benefits: -* Code using the data structure doesn't need to know the allocated width of - the rows. This simplifies edge expansion/compression, since we can work - in an array that's wider than the logical picture width. -* Indexing doesn't require multiplication; this is a performance win on many - machines. -* Arrays with more than 64K total elements can be supported even on machines - where malloc() cannot allocate chunks larger than 64K. -* The rows forming a component array may be allocated at different times - without extra copying. This trick allows some speedups in smoothing steps - that need access to the previous and next rows. - -Note that each color component is stored in a separate array; we don't use the -traditional layout in which the components of a pixel are stored together. -This simplifies coding of modules that work on each component independently, -because they don't need to know how many components there are. Furthermore, -we can read or write each component to a temporary file independently, which -is helpful when dealing with noninterleaved JPEG files. - -In general, a specific sample value is accessed by code such as - GETJSAMPLE(image[colorcomponent][row][col]) -where col is measured from the image left edge, but row is measured from the -first sample row currently in memory. Either of the first two indexings can -be precomputed by copying the relevant pointer. - - -Since most image-processing applications prefer to work on images in which -the components of a pixel are stored together, the data passed to or from the -surrounding application uses the traditional convention: a single pixel is -represented by N consecutive JSAMPLE values, and an image row is an array of -(# of color components)*(image width) JSAMPLEs. One or more rows of data can -be represented by a pointer of type JSAMPARRAY in this scheme. This scheme is -converted to component-wise storage inside the JPEG library. (Applications -that want to skip JPEG preprocessing or postprocessing will have to contend -with component-wise storage.) - - -Arrays of DCT-coefficient values use the following data structure: - - typedef short JCOEF; a 16-bit signed integer - typedef JCOEF JBLOCK[DCTSIZE2]; an 8x8 block of coefficients - typedef JBLOCK *JBLOCKROW; ptr to one horizontal row of 8x8 blocks - typedef JBLOCKROW *JBLOCKARRAY; ptr to a list of such rows - typedef JBLOCKARRAY *JBLOCKIMAGE; ptr to a list of color component arrays - -The underlying type is at least a 16-bit signed integer; while "short" is big -enough on all machines of interest, on some machines it is preferable to use -"int" for speed reasons, despite the storage cost. Coefficients are grouped -into 8x8 blocks (but we always use #defines DCTSIZE and DCTSIZE2 rather than -"8" and "64"). - -The contents of a coefficient block may be in either "natural" or zigzagged -order, and may be true values or divided by the quantization coefficients, -depending on where the block is in the processing pipeline. In the current -library, coefficient blocks are kept in natural order everywhere; the entropy -codecs zigzag or dezigzag the data as it is written or read. The blocks -contain quantized coefficients everywhere outside the DCT/IDCT subsystems. -(This latter decision may need to be revisited to support variable -quantization a la JPEG Part 3.) - -Notice that the allocation unit is now a row of 8x8 coefficient blocks, -corresponding to block_size rows of samples. Otherwise the structure -is much the same as for samples, and for the same reasons. - -On machines where malloc() can't handle a request bigger than 64Kb, this data -structure limits us to rows of less than 512 JBLOCKs, or a picture width of -4000+ pixels. This seems an acceptable restriction. - - -On 80x86 machines, the bottom-level pointer types (JSAMPROW and JBLOCKROW) -must be declared as "far" pointers, but the upper levels can be "near" -(implying that the pointer lists are allocated in the DS segment). -We use a #define symbol FAR, which expands to the "far" keyword when -compiling on 80x86 machines and to nothing elsewhere. - - -*** Suspendable processing *** - -In some applications it is desirable to use the JPEG library as an -incremental, memory-to-memory filter. In this situation the data source or -destination may be a limited-size buffer, and we can't rely on being able to -empty or refill the buffer at arbitrary times. Instead the application would -like to have control return from the library at buffer overflow/underrun, and -then resume compression or decompression at a later time. - -This scenario is supported for simple cases. (For anything more complex, we -recommend that the application "bite the bullet" and develop real multitasking -capability.) The libjpeg.txt file goes into more detail about the usage and -limitations of this capability; here we address the implications for library -structure. - -The essence of the problem is that the entropy codec (coder or decoder) must -be prepared to stop at arbitrary times. In turn, the controllers that call -the entropy codec must be able to stop before having produced or consumed all -the data that they normally would handle in one call. That part is reasonably -straightforward: we make the controller call interfaces include "progress -counters" which indicate the number of data chunks successfully processed, and -we require callers to test the counter rather than just assume all of the data -was processed. - -Rather than trying to restart at an arbitrary point, the current Huffman -codecs are designed to restart at the beginning of the current MCU after a -suspension due to buffer overflow/underrun. At the start of each call, the -codec's internal state is loaded from permanent storage (in the JPEG object -structures) into local variables. On successful completion of the MCU, the -permanent state is updated. (This copying is not very expensive, and may even -lead to *improved* performance if the local variables can be registerized.) -If a suspension occurs, the codec simply returns without updating the state, -thus effectively reverting to the start of the MCU. Note that this implies -leaving some data unprocessed in the source/destination buffer (ie, the -compressed partial MCU). The data source/destination module interfaces are -specified so as to make this possible. This also implies that the data buffer -must be large enough to hold a worst-case compressed MCU; a couple thousand -bytes should be enough. - -In a successive-approximation AC refinement scan, the progressive Huffman -decoder has to be able to undo assignments of newly nonzero coefficients if it -suspends before the MCU is complete, since decoding requires distinguishing -previously-zero and previously-nonzero coefficients. This is a bit tedious -but probably won't have much effect on performance. Other variants of Huffman -decoding need not worry about this, since they will just store the same values -again if forced to repeat the MCU. - -This approach would probably not work for an arithmetic codec, since its -modifiable state is quite large and couldn't be copied cheaply. Instead it -would have to suspend and resume exactly at the point of the buffer end. - -The JPEG marker reader is designed to cope with suspension at an arbitrary -point. It does so by backing up to the start of the marker parameter segment, -so the data buffer must be big enough to hold the largest marker of interest. -Again, a couple KB should be adequate. (A special "skip" convention is used -to bypass COM and APPn markers, so these can be larger than the buffer size -without causing problems; otherwise a 64K buffer would be needed in the worst -case.) - -The JPEG marker writer currently does *not* cope with suspension. -We feel that this is not necessary; it is much easier simply to require -the application to ensure there is enough buffer space before starting. (An -empty 2K buffer is more than sufficient for the header markers; and ensuring -there are a dozen or two bytes available before calling jpeg_finish_compress() -will suffice for the trailer.) This would not work for writing multi-scan -JPEG files, but we simply do not intend to support that capability with -suspension. - - -*** Memory manager services *** - -The JPEG library's memory manager controls allocation and deallocation of -memory, and it manages large "virtual" data arrays on machines where the -operating system does not provide virtual memory. Note that the same -memory manager serves both compression and decompression operations. - -In all cases, allocated objects are tied to a particular compression or -decompression master record, and they will be released when that master -record is destroyed. - -The memory manager does not provide explicit deallocation of objects. -Instead, objects are created in "pools" of free storage, and a whole pool -can be freed at once. This approach helps prevent storage-leak bugs, and -it speeds up operations whenever malloc/free are slow (as they often are). -The pools can be regarded as lifetime identifiers for objects. Two -pools/lifetimes are defined: - * JPOOL_PERMANENT lasts until master record is destroyed - * JPOOL_IMAGE lasts until done with image (JPEG datastream) -Permanent lifetime is used for parameters and tables that should be carried -across from one datastream to another; this includes all application-visible -parameters. Image lifetime is used for everything else. (A third lifetime, -JPOOL_PASS = one processing pass, was originally planned. However it was -dropped as not being worthwhile. The actual usage patterns are such that the -peak memory usage would be about the same anyway; and having per-pass storage -substantially complicates the virtual memory allocation rules --- see below.) - -The memory manager deals with three kinds of object: -1. "Small" objects. Typically these require no more than 10K-20K total. -2. "Large" objects. These may require tens to hundreds of K depending on - image size. Semantically they behave the same as small objects, but we - distinguish them for two reasons: - * On MS-DOS machines, large objects are referenced by FAR pointers, - small objects by NEAR pointers. - * Pool allocation heuristics may differ for large and small objects. - Note that individual "large" objects cannot exceed the size allowed by - type size_t, which may be 64K or less on some machines. -3. "Virtual" objects. These are large 2-D arrays of JSAMPLEs or JBLOCKs - (typically large enough for the entire image being processed). The - memory manager provides stripwise access to these arrays. On machines - without virtual memory, the rest of the array may be swapped out to a - temporary file. - -(Note: JSAMPARRAY and JBLOCKARRAY data structures are a combination of large -objects for the data proper and small objects for the row pointers. For -convenience and speed, the memory manager provides single routines to create -these structures. Similarly, virtual arrays include a small control block -and a JSAMPARRAY or JBLOCKARRAY working buffer, all created with one call.) - -In the present implementation, virtual arrays are only permitted to have image -lifespan. (Permanent lifespan would not be reasonable, and pass lifespan is -not very useful since a virtual array's raison d'etre is to store data for -multiple passes through the image.) We also expect that only "small" objects -will be given permanent lifespan, though this restriction is not required by -the memory manager. - -In a non-virtual-memory machine, some performance benefit can be gained by -making the in-memory buffers for virtual arrays be as large as possible. -(For small images, the buffers might fit entirely in memory, so blind -swapping would be very wasteful.) The memory manager will adjust the height -of the buffers to fit within a prespecified maximum memory usage. In order -to do this in a reasonably optimal fashion, the manager needs to allocate all -of the virtual arrays at once. Therefore, there isn't a one-step allocation -routine for virtual arrays; instead, there is a "request" routine that simply -allocates the control block, and a "realize" routine (called just once) that -determines space allocation and creates all of the actual buffers. The -realize routine must allow for space occupied by non-virtual large objects. -(We don't bother to factor in the space needed for small objects, on the -grounds that it isn't worth the trouble.) - -To support all this, we establish the following protocol for doing business -with the memory manager: - 1. Modules must request virtual arrays (which may have only image lifespan) - during the initial setup phase, i.e., in their jinit_xxx routines. - 2. All "large" objects (including JSAMPARRAYs and JBLOCKARRAYs) must also be - allocated during initial setup. - 3. realize_virt_arrays will be called at the completion of initial setup. - The above conventions ensure that sufficient information is available - for it to choose a good size for virtual array buffers. -Small objects of any lifespan may be allocated at any time. We expect that -the total space used for small objects will be small enough to be negligible -in the realize_virt_arrays computation. - -In a virtual-memory machine, we simply pretend that the available space is -infinite, thus causing realize_virt_arrays to decide that it can allocate all -the virtual arrays as full-size in-memory buffers. The overhead of the -virtual-array access protocol is very small when no swapping occurs. - -A virtual array can be specified to be "pre-zeroed"; when this flag is set, -never-yet-written sections of the array are set to zero before being made -available to the caller. If this flag is not set, never-written sections -of the array contain garbage. (This feature exists primarily because the -equivalent logic would otherwise be needed in jdcoefct.c for progressive -JPEG mode; we may as well make it available for possible other uses.) - -The first write pass on a virtual array is required to occur in top-to-bottom -order; read passes, as well as any write passes after the first one, may -access the array in any order. This restriction exists partly to simplify -the virtual array control logic, and partly because some file systems may not -support seeking beyond the current end-of-file in a temporary file. The main -implication of this restriction is that rearrangement of rows (such as -converting top-to-bottom data order to bottom-to-top) must be handled while -reading data out of the virtual array, not while putting it in. - - -*** Memory manager internal structure *** - -To isolate system dependencies as much as possible, we have broken the -memory manager into two parts. There is a reasonably system-independent -"front end" (jmemmgr.c) and a "back end" that contains only the code -likely to change across systems. All of the memory management methods -outlined above are implemented by the front end. The back end provides -the following routines for use by the front end (none of these routines -are known to the rest of the JPEG code): - -jpeg_mem_init, jpeg_mem_term system-dependent initialization/shutdown - -jpeg_get_small, jpeg_free_small interface to malloc and free library routines - (or their equivalents) - -jpeg_get_large, jpeg_free_large interface to FAR malloc/free in MSDOS machines; - else usually the same as - jpeg_get_small/jpeg_free_small - -jpeg_mem_available estimate available memory - -jpeg_open_backing_store create a backing-store object - -read_backing_store, manipulate a backing-store object -write_backing_store, -close_backing_store - -On some systems there will be more than one type of backing-store object -(specifically, in MS-DOS a backing store file might be an area of extended -memory as well as a disk file). jpeg_open_backing_store is responsible for -choosing how to implement a given object. The read/write/close routines -are method pointers in the structure that describes a given object; this -lets them be different for different object types. - -It may be necessary to ensure that backing store objects are explicitly -released upon abnormal program termination. For example, MS-DOS won't free -extended memory by itself. To support this, we will expect the main program -or surrounding application to arrange to call self_destruct (typically via -jpeg_destroy) upon abnormal termination. This may require a SIGINT signal -handler or equivalent. We don't want to have the back end module install its -own signal handler, because that would pre-empt the surrounding application's -ability to control signal handling. - -The IJG distribution includes several memory manager back end implementations. -Usually the same back end should be suitable for all applications on a given -system, but it is possible for an application to supply its own back end at -need. - - -*** Implications of DNL marker *** - -Some JPEG files may use a DNL marker to postpone definition of the image -height (this would be useful for a fax-like scanner's output, for instance). -In these files the SOF marker claims the image height is 0, and you only -find out the true image height at the end of the first scan. - -We could read these files as follows: -1. Upon seeing zero image height, replace it by 65535 (the maximum allowed). -2. When the DNL is found, update the image height in the global image - descriptor. -This implies that control modules must avoid making copies of the image -height, and must re-test for termination after each MCU row. This would -be easy enough to do. - -In cases where image-size data structures are allocated, this approach will -result in very inefficient use of virtual memory or much-larger-than-necessary -temporary files. This seems acceptable for something that probably won't be a -mainstream usage. People might have to forgo use of memory-hogging options -(such as two-pass color quantization or noninterleaved JPEG files) if they -want efficient conversion of such files. (One could improve efficiency by -demanding a user-supplied upper bound for the height, less than 65536; in most -cases it could be much less.) - -The standard also permits the SOF marker to overestimate the image height, -with a DNL to give the true, smaller height at the end of the first scan. -This would solve the space problems if the overestimate wasn't too great. -However, it implies that you don't even know whether DNL will be used. - -This leads to a couple of very serious objections: -1. Testing for a DNL marker must occur in the inner loop of the decompressor's - Huffman decoder; this implies a speed penalty whether the feature is used - or not. -2. There is no way to hide the last-minute change in image height from an - application using the decoder. Thus *every* application using the IJG - library would suffer a complexity penalty whether it cared about DNL or - not. -We currently do not support DNL because of these problems. - -A different approach is to insist that DNL-using files be preprocessed by a -separate program that reads ahead to the DNL, then goes back and fixes the SOF -marker. This is a much simpler solution and is probably far more efficient. -Even if one wants piped input, buffering the first scan of the JPEG file needs -a lot smaller temp file than is implied by the maximum-height method. For -this approach we'd simply treat DNL as a no-op in the decompressor (at most, -check that it matches the SOF image height). - -We will not worry about making the compressor capable of outputting DNL. -Something similar to the first scheme above could be applied if anyone ever -wants to make that work. diff --git a/thirdparty/jpeg-9e/testimg.bmp b/thirdparty/jpeg-9e/testimg.bmp deleted file mode 100644 index 11aa0cbf4115728832db78699bb26ef9f1c55718..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35050 zcmbWg4P2J>+5dkwyo-qud7A|eD-@grGZRQ9%#bNFaiAsxB+U{`d_v2C2$-!_>j5h( zvO<}Z8+-6!EmOkX{g{#7-cR24t{?HaH|O3;Z}Afkc}u77^J?)G)HoeZ9k#OFt*>ucX zTK%v$EUDhRJ9C1!zNp;0VeA85&0kJ>%@q~i{3qsl3un&t4*cdfUfJg7yiv*Tc%yQr zc#D_(&8y)!{!qHoYyPC&yYAb!dJC4#_YNIA?Tt#C>@Atr;XS+MEiZfaJKo>FJnv1v z<5@3pUb>f({F%4&Pwn0h*4^uk8S|odSH?{5p~wH?MGyOt7d2$3SFygzyDh)K`><+_ zm(c&bH)e9K_pM2zy!ylYy!)P9@6BDZ!~5B~3h%bN@Arn^_@P%h<40a@$~o`5H^1)9 zntj&Gy|dm+nf##l(9Y+*-22MCDO2}(mAilKJ-YreFJ^d*cjWMXulBzCy=C(jcoV1o z%v*BTIj`x_UwXxL4|_?;sotvlI=taS{_ahAVv+aglaF{mNK5uobEbQzKmEIxc7M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ZMKBfXi&Hd}H!?ngjOoqIp&(kkQ9#vjuqcT-aagMQ%*|+h<|;(RSd@g2NUWhs z7<)B0Tc4*3I`)5kkV>vO|6;6W^t!nhI>v0>YNiTf0dqD_@7tFx>r2Xd#$MPNEgXhiUN*82Tm8=cBZYXOY>If8D@hqm{)bfXcc`# z#zxkopyQqss5FcRWG(~oYMpi$wbGq4`VNV_pRT`N9nXFF<<>o0cfW8}rh4|{4T*~u z?On8Ya79qkhSUubQRl>8dVHY0WS_+uQ@F9s;;-*dh&ULN5hiI01YOFy!PrR6A02%L zqvJ~;Oh$xc+>Pr|7?xx-(kQ7beULsK;hmu6^+lN7&=A{9a`?5LGbw37UNRC>L2T?e z_}pLSFsJ`p`#?PVF%#kEESfZF(xSasYwB5a>~=6e=GX6ia6U*GclTMrA0?xWkub|c z^CiL}XcfCkj>u6NhncFFKNexD40)K8PDh`T%3l39U)I2xXv}TaT!XKc3p&bFs|%W0 npgsS&|NipEIlcF6y#&CI&z`N|%YR;echaJnbaS0eJ?s5{Jc^b~ diff --git a/thirdparty/jpeg-9e/testimg.gif b/thirdparty/jpeg-9e/testimg.gif deleted file mode 100644 index db8f744..0000000 --- a/thirdparty/jpeg-9e/testimg.gif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b2d4a598fd6520e739e95293cb60c8b6e9af5e33c0b9ee635e6ffa1a2b8b3b68 -size 21718 diff --git a/thirdparty/jpeg-9e/testimg.jpg b/thirdparty/jpeg-9e/testimg.jpg deleted file mode 100644 index 0585333..0000000 --- a/thirdparty/jpeg-9e/testimg.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b7ea0b521397c20176b809eb19fd4b51ea83368a3d8becb89ff430dcf8ea4e57 -size 5770 diff --git a/thirdparty/jpeg-9e/testimg.ppm b/thirdparty/jpeg-9e/testimg.ppm deleted file mode 100644 index 1377eef..0000000 --- a/thirdparty/jpeg-9e/testimg.ppm +++ /dev/null @@ -1,4 +0,0 @@ -P6 -227 149 -255 -0/-0/-10.21/51.51.62/72.83/83/83/:3-:3-:3-:3-:3-:2/91.91.80-80-91.91.:2/80-80-80-80-80-80-80-80-6.+6.+6.+5-*5-*4,)4,)4,)4,)4,)4,)4,)4,)4,)4,)4,).+$/,%/,%0-&1.'2/(30)30)63,63,74-85.85.96/:70:70A;/B<0D>2F@2IA4JB5KC6KD4MD5MD5MD3NB2OC3OC3PD4QE5T>1Y?2b@4nB5}E6ŒG8šG9¥E7²F9ºF9¿E8ÆF;ÉF>ËF?ÌG@ÌG@íCNíCLíCLíDKíDIïBFñ>Bõ@â?@×?<Ñ=;µ@.µ@.µ@.´?-´?-³@-²?-°?-­@,ªA.¦A-¢B,A*›A)˜@*—A*’?/’?/’?/‘>,‘>,’<+’<+’<+”?+”?+”=*”=*”=*•>+–?+—@,”?:•>7—=4Ÿ?1©B3³D3¼D3¿D4º?/¶@2­E8žH;‡H9mB2T8*D3#:659549547326216005//50-72/72/72/61-61-50,50,50,.0-.0-.0-//-//-0/-2.-3--5,-4+,4*+4(*7(+=.1E69LUPdUPdUPd0/-0/-10.10.40-51.62/72.83/83/83/:3-:3-:3-:3-:3-91.91.80-80-80-80-91.91.80-80-80-80-80-80-80-80-6.+6.+5-*5-*5-*4,)4,)4,)5-*5-*5-*5-*5-*5-*5-*5-*/,%0-&0-&1.'2/(30)41*41*63,63,74-74-85.96/:70:70@:.A;/C=1E?3H@3IA4JB5JC3LC4LC4KB3MA1MA1NB2OC3PD4P>0U?1^A3jC4xD6†D4“D5žB3¨B3°@2¶@4¼B7ÂC:ÄE<ÆF=ÇG>èAKèAIèCIêDHíDGïBDó@D÷>Cø;Aø9@ö9?ð.‘>.‘>,=+’<+’<+”>-“>*“>*”=*”=*•>+–?,—@-“@8•>5˜>3Ÿ?1«A3µD4½D3ÁC4¼A2¸B6­E8œI;…G:kA3S9*D4$<66;55:4493382271161.61.72/72/72/61-61-50,50,50,.0-.0-.0-//-//-0/-2.-2.-3--5,-4*+4(*5)+<-0C47I:=h<;vDC†JI’LJST§`h¨k{rŽ‘{¢„°|†»y†½lv«[\ŒQHsQBkOFaOFaNI_RN_[Yfnotƒ‡ˆ”™•™ž—š ”™‘ƒ~ojk[]\JVUCXQaXQaXQa/.,/.,0/-10.40-40-51.51.72.72.72.92,92,92,92,92,91.80-7/,7/,7/,7/,80-91.80-80-80-80-80-80-80-80-6.+5-*5-*5-*4,)4,)4,)4,)5-*5-*5-*5-*5-*5-*5-*5-*1.'1.'2/(30)30)41*41*52+63,63,63,74-85.96/96/:70?9-@:.B<0D>2G?4H@3H@3H@3I@1I@1I@1K?1K?/L@0MA1NB2MA1QA2YB2dC2qC3|C2‰A2“@0™<+ :+©;,¯>0¶@4¼C8¿F=ÀG>à?Eá@FãBGæCFêDFðCEõADù?Dú;@û:?÷:@ñ=@è@@ÜA=Ñ@;É>7³@-³@-³@-²?,²?,²?-¯>,®?,ª?-©@-¥@,¡A+A,˜@*—A*–@)’?/‘>.‘>.‘>.=+=+=+’<+“=,“=,’<+’=)“>*“>*”?+•@,”B7–?5š>3£>2­A4¹C5¿D5ÂC4ÂD6ºF9¯I=›I=‚F;gA4P:,B6&=77=77<66:4493383072/72/62/62/62/52-52-41,41,41,,1-,1-.0-.0-//-//-0/-2.-5//4..5,-4*+4*+9-/>24C79_83l?:|E@ˆIB’NK›Z^œft”n‡Œwž€~¯zƒºs¹dm¤UU‰NEtO?lMBbPEcQHcMH^NK\[[estx…‰ˆ‡Œ†Š†…†Š|xzlghXZ[KVTEZT`ZT`ZT`.-+/.,/.,0/-10.40-40-40-51.61-61-61-81+81+81+81+50-50-4/,4/,4/,4/,50-50-61.61.61.61.61.61.61.61.3.+3.+3.+2-*2-*2-*1,)1,)4/,4/,4/,4/,4/,4/,4/,4/,30+30+30+41,41,52-52-52-52-52-63.74/850850961961>8,?9-@:.B<0E=2E=2F>1F>1G=1G>/F=.I=/I=/J>0L@0L@0JD4NE4TD4^D3hE2sB1~A/‡>-Œ9'”9'9)£<-¬@3³E8·I<ºJ>Ù@CÚACÝCEâDEçCDîACô@Cø>Aü;@û:?÷:>ð=@åA?ÚB=ËA7Ã>5°@,°@,°@,°?-¯>,¯>,®?,¬>-ª?-¦?,£@-Ÿ@,œ@+˜@*–@)”@(‘>.‘>.‘>.=-=-=-<*<*=+=+<*<*=+“=,”>-”>-”B6–?5›?2¦@2²B4½C6ÂB5ÄB5ÄF:½H>­K@˜J@|F:aA4K;.?9+@86@86?75>64:5294183073062/62/62/32.32-21,21,21,-2.-2.-2./1./1.00.00.10.5106005//5,-4+,6,-:01>45W6-b<3qA7}D9„H@ŒRQŽ_i‹iƒs˜|z¬u~·myµ^g¢RQŠMDyM?rN@dPEgQFfLC^GBVNLZ^^fjnquzvx}vz€vwzokoa`bUWYKTUG]V^]V^]V^.-+.-+.-+/.,0/-10.3/,40-3/,4/+4/+4/+4/+6/)6/)6/)4/,4/,3.+3.+3.+3.+4/,4/,50-50-50-50-50-50-50-50-3.+3.+2-*2-*2-*1,)1,)1,)4/,4/,4/,4/,4/,4/,4/,4/,41,41,41,41,41,52-52-52-52-52-63.63.74/850961961<5+=6,?8.@9/B:/C;0C;0C;.D:.D:.D:.G;-H<.I=/J>0K?1GH6KH7PG6XG5aF3jD1uB/|?,‚;)‹:'’;(š=,£B2«G7±K<´M>ÒDBÔDCØDBÝEBâC@ê@@ð>>÷:>û:=ú9<õ;>í?>áB>ÓC:ÅA5º?0¯@-®?,®?,®?,­>+­>+¬>-ª?-¨?,¤?-¢?,ž?+š?*–?+”?*“>)?.?.>->->-Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,<,=-‘>.‘>.”B4—A4@1ª@3¶B5ÁC7ÆA8Å@7ÁB;¸G?©KCJ@uE;Y>3C9-78*@86@86?75>64=53:5294173062/43/43/32.23.12-12,12,,2.-2.-2.-2./1./1.00.00.3205105104..2,,4+,7./901P5*Y9,e>/n@1tB7|KGƒYcƒg~p—xx¬s{¹js¶]e¦TT”OG‚LAyPAjPAhMAeJA`GBYHEXKKWMPU^bc`fbcha`f\Z`TWZOUYKWYL`WZ`WZ`WZ,,,,,,---.-+/.,0/-10.3/,2.+2.+3.*3.*3.*3.*3.*3.*3.+3.+2-*1,)1,)2-*3.+3.+3.+3.+3.+3.+3.+3.+3.+3.+2-*2-*2-*2-*1,)1,)1,)0+(3.+3.+3.+3.+3.+3.+3.+3.+41,41,41,41,41,41,41,41,41,52-52-63.74/850850850;4*<5+=6,>7-@7.A8/A9.A9.C9/C9-C9-F:.G;/H<.J>0K?1FI8GH6MH5TG6[F3dC0lA.t?-{<*‚;)Š;*“=,šA1£F5ªJ:­M=ÉE@ËFAÑFAÖE@ÞC?å@>í==ó9<ø:<÷9;ó;=ë?=ÝB=ÌD8¼A2±>,«@,«@,¬?+¬>-¬>-©>,©>,¨>.¥>-¢?, ?,›>,—?+•>*“>)‘?)>->->->-Ž=,Ž=,Ž=,<+Ž=,<+‹<+‹<+‹<+Œ=.>/Ž?0’C2—A2 @2­A5»B9ÃC:Ç@:Å@9»@9³H@¥NGNEoG=R@4?;039-A75A75@64>63<4194083/74/63.43.34/23.13.02-02-02--3/-3/-3/.3/.3/02/02/11/11/32032040/2.-1-,4..5//H4)M5)X8+a<,f>2nGBzYb‚lƒ€uŸ{|´u|Àmu¾bi±[[¡SLLBQAnN?jI=cH>`HB^FCX@BO2K?3DG6EF6KE5PD4VC2^C2e@.m>,v=,|;)ƒ:)Š;*“=.›B2¢F7¦I:¿D<ÂF>ÇG>ÏF>ØE>âC?ì@>ó<>õ9:ó9:ï;<å@<×B;ÆD6´A/¨=)©@-©@-©@-¨?,¨?,¨>.§=-¥>-£>, ?.ž?-š?,—>,“>*‘?*>)>->->-Œ=,Œ=,Œ=,‹<-‹<-‹<-‹<-‰<,‰<,Š=-‹=0‹=0Œ>1‘D2–C1¡A3®B6¼C:ÅA<ÇB=ÃB=»EA³PJ¥XPŽZOqSIVI@BD97A6A83@72?61=60<4194083/63.43.43.34.13.13.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>¾DA»KG·XR¯f]£qfth|rfik^S_SCSHQJBLE=D=5<8/95,74-63,33+43.34.23-13.02--2,,1+,1+-2.-2.-2.-2.-2.-2./1./1.02/02/11/11/11/11/11/11/5*2;/3A32C4/J;6]OOymy‹…Ÿ’‘½”–Ӕ݂‰×tzÈjn¸_b©YZPHmHBdA>]>>X?AVBHVLU^U`bbqnn}xv†|p€ulyoguh_k_T`Ta[Eb\Fc]G,-/,-/,-/,-/---------.-+/.,.-+.-+0,)/+(/+(/+(/+(.*).*).*).*)/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+0,+1-,1-,1-,1-,1-,1-,1-,1-,1-,1-,0,)0,)1-*2.+3/,3/,2.+2.+2.+2.+2.+2.+3/,40-51.62/80-91.:2/;30=4/>50>50=4-?4.?4.?4.B5-C6.E80G:2H;3H>5J=5L=6O>6Q=4V;2Z90_7/h8.p7.y6-‚8-‰9.’;1–<1š>1¢@3¦A5ªB5³E8¾E:ÉF<ÔE=ÜC=âC?ãD@ßF@ÕF>ÄF8±C2£B/›C-ŸB0 A/Ÿ@.ž?-ž?-Ÿ>-ž>.ž>.š=,™=.–=-“=,=+>-Œ=,‹>,Š=+Š=+‰<,‰<,‰<,‡;-‡;-…<-†4†@6‡A7ˆB8‘H7•F7£G:±I@¹HB¹FAºJFµTM²dZªreŸ~op~|mlteYgZJZOPLAKI=EC7@>2=:1:7.44*11)23+23-12,/1,/1,.0+.0+.0-/1./1./1./1./1./1./1./1.02/11/11/11/11/11/11/11/5*:9-9<15?53H?:^VTxszŠˆž‘“º”—Εׄ‹ÓxÆpyºkt¯en¥__yXZsSUjRWjU]j\gmguvr‚v‡€‘‡ƒ•‰}v†yp€sfteXfW_YA`ZBb\D,-/,-/,-/,-/,-/---------.-+.-+.-+-,*/+(.*'.*'.*'.*+.*+.*+.*+-)*-)*-)*-)*/+,/+,/+,/+,/+,/+,/+,/+,.*+.*+/+,/+,/+,0,-0,-0,-0,-0,-0,-1-.1-.1-.1-.1-.0,+0,+1-,2.-2.-2.-2.-1-,1-,1-,1-,1-,2.-3/.40/51080-91.:2/;30=31=31=4/=4/?40?4.?4.A4.C60D7/F91G:2H;5J;6K<7N=6P;6S:5V72[60c60k6.t5,}7/‡9/Ž:0”<0˜<1œ@3ž@4¢@3§A3±C6¼C8ÇD:ÎC<ÖF>ÚG@×HBÍH?¾E:­C3ŸB0™B.B/œA.›@-›>-›>-›>-›>-œ?0˜<-–=-”=,“=.>-Œ=,Š=+Š=+‰<*‰<,‰<,‡;+‡;+…<-„;,ƒ;-„<0‚<0‚<2‚>3ƒ?4…A8†C:‡D;“K<–H; H>­JDµIF´KG´SM¯_V®rg¥qœz{Šwr€ocqbVdWPQCMN@HI;DD8@@4::055+/0(01)01+/0*/0+./*./*//-//-//-//-//-//-//-//-//-//-00.00.00.00.00.00.00.00.6*>6+;8.6;63HE>_^Yyz|Šœ“²’–ÃŽ•Ë„Æ}ˆ¾{‰¸|‹´|Œ°ˆ—yƒq~‡o|‚n}€o‚€yއƒ™‹¡”‘¨˜¦”ˆŠƒ–ƒ|{j{iXiW\V<^X>`Z@-.0-.0-.0-.0-.0-.0......---.-+-,*-,*,+).*'.*'.*',*++)*+)*+)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+-+,-+,-+,-+,.,-.,-.,-.,-/-./-./-./+*0,+1-,1-,1-,1-,0,+0,+0,+0,+0,+0,+1-,2.-3/.40/91/:20;31<42=31=31=31=31>3/>3/>3/@3-A4.C60D71E82G83H94I:5L:6M:6N94Q83T50^72e60o6/x8/ƒ90Š:/’;1•=1™?4™?4›?2@1¥A2­C5¸D7ÀD:ÉF<ÌG>ÌIAÄH>¶F:©C4B0—B.˜A.˜A.˜?-—>,™>,™=.™=.™=.•<,”<.“=.=-Ž<.Š=-Š=-ˆ<,ˆ;)ˆ;+‡;+‡;+„;,„;,ƒ;-‚:,;/€<1€<1>5ƒ@7ƒC:…E<†F=’M>•I<œH>¨IC¯LG¯PL¯\Tªj^§€o y˜š‚Žœƒ„–€z‹ym{lam_UYHQUDKO@EI:@D6;=057,13(01)/0*/.).-).-).-+/.,0/-/.,/.,/.,/.,/.,/.,/.,/.,0/-0/-0/-0/-0/-0/-0/-0/-8*A6):3-1961HJ=bfX{€y‰‘“Œ“£–²Œ”¸ƒ³±…™²¤¶ªµ•§§¤£Œ ž‡ž–‚™}˜‰œ‹ˆ£”°š–²›”­—‹£‹…›†’~k|iUfSXT7ZV9^Z=+/2+/2-.0-.0-.0-.0-.0...------.-+-,*-,*,+),+),+),*+,*+,*++)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*++)*+)*+)*,*+-+,-+,.,-.,-/-./-./-./+*0,+0,+0,+0,+0,+/+*.*)/+*/+*/+*/+*0,+1-,3/.40/91/:20;31<42=32=32<20<20=20=2.=2.?1.@2/A4.B5/C60D63C84D95G96G96H94K84N51V72_60h70r7/}:1†<1=2>2˜?7—?5—?5—?3šA3£C5ªD6³E8ºE;¿F=ÀG>»F=°D8¤B5™@0–@/–A-–A-–?,•>+•<,•<,–=-–=/”<.’<-=-Ž<.‹<-‰<,ˆ<,ˆ<,‡;+†:*†:*†:*ƒ:+‚:+‚:,€:.;0€<1€=4?6‚B9ƒD;†G@‡HALA’H?˜HA¤KGªOLªWQªf]¥wh¡Œw˜›€’¥‰Š¤‡„ž…|’}t‚qlte\eRV_LMVCEL0-?1.@2/A30A30?61@72@93A96A96B94E74G51O61W6/a6/j8/u9.€0•>7•>5“?5’@4•B4™C4ŸC4¥D4ªB5²C8´E:±E;©C7 @4˜?1•?2“A,’?-“=,“=,“<+“<+”<.”<.“;-’E5:@29<134,22*1.)/+(/*'0**3*+4+,1++1++1++1++1++1++1++0,+1-,1-,1-,1-,1-,1-,1-,/.,;(;5(23+(56$CL-\hDt„`…”wŽ›‰’ž”Ÿšž–¥—•µ¡Æ¤¦Ð¨¥É¯¦Ê°§Ë¯¢Éª—¿‹³ˆ°‹³ŽŽ²Ž²¬Š„¢€€™{wŽrdx]MaHQQ5QQ5RR6,03,03,03,03./1./1./1./1/////////0/-/.,/.,.-+.-+/-..,-.,--+,,*++)*+)**()+)*+)*+)*+)*+)*+)*+)*+)*+)*+)*+)**()*()*())'()'(+)*+)*,*+-+,.,-.,-/-./-./+*/+*/+*/+*/+*.*)-)(,('0,+0,+0,+0,+1-,2.-40/40/:12;23;23<34=32<21<21;10<1/<1/<1/=/,>0->0-?1.@2/;60;62;83<94=:5=:5?82A60F5.O4-W5+b6+n8,x:-<,„<.’:6‘<5=5Ž@4A4‘B3•B2™@0Ÿ?1¦@4ªB7ªB9¥@6?5—=2•?2‘@-’?-‘>,’<+‘;*‘;,“;-“;-‘;,<.;-‹<-‰;.‡;-„;,„;,…9)…9)…9)‚9*‚9*9+~8,}9,=1€=4€@7B9„E>…HCˆKFŠMHŒIAŽGA˜JF¢SOª\X«h`©{n£Žy—Ž©ˆ…¯‹«ˆ~£„€˜€‹w{nixacr[ZhQP]IIUACL;>D60-?1.?1.96/:729839839:4:94;83>71A2+I2*S2)^4(j6)s8*|:*~;+84:5=4Œ@3‹B3A1@/”>-˜<-Ÿ=0¥@4¦A7¢@7œ>4—=4•=3‘@-?,=+<*‘;*‘;,‘;,’<-‘;.<.;-Š;,ˆ:-‡;-„;,„;,…9)…9)‚9(‚9*9*€8*~8,}9,€>2?5€@7‚C<ƒG?†IDˆMGŠOIŒICHD˜MJ¥UT¬a^­ng«s¤•€–¡ƒŠ¬‰‚°‹|«‡|£„™y‚ql{dgv__nWXeQP\HIRAAG9=@579.66.41,1,)1)'2()3)*4*+2)*2)*2)*2)*2)*2)*2)*0**1++1++1++0,+0,+0,+0,+0,+:&27(+4."47=HRb1l~J€’b‰™rŽ|Ÿ‚ŠŸ~Ч{·€˜Æ…œÎ…œÉ¢šÉŸ™Èž”׉¸Š®€‚°‹¶ˆ‚¬~ˆ¯ƒ‡ª€~œvuml„dZnRG[?IL/GJ-DG*/0*/0*/0*01+01+01+21,21,32-63.63.63.52-50,4/+4/+8.,7/,6.+5-+4,*2-*1++0,-0,-.,/--/-,1,+0*+/)*.()./(0/(//(//(//(//)-.)-.*+/+,-,*-,(.-).-)-.(./)./)--/--/---.../-.0/-2.+3.+2-)4,)5.(7.)8/(;0*;1(<2)<5+=4+>5.>5.>5.=4-<3.<1-=2.<1-<1/;0.=/.>0/>0/?11H-&C1';5)2:++=-(=.-;.45-?-+H()R%(X((Z.+Z8.[A2\G6wC-{B.„C1A3’?1•;0–:/”8+“;-‘>.‘B1‘D0‘D0B.?,<*Ÿ63›83”:2Œ<1…@1B0|A/|A/‚C2„A1ˆ>1‰=0‰;/ˆ:.‡9-‡9-v:/|@5u=0n9)s@/s@/t<+{@0{<-ƒ?4ˆD9‹H?ˆLA„NBQC€RC—HK•TRd]…ue{…lw’sz|€£ƒ‰¦ˆŽ¥‰’¤Œ‘¥Œ‡¤ˆy¢‚kŸ{awhŽea†]\zV[sS]mR[cLVTEPH=J;6G53B,/=&,:#+:#-9#/8".#/-#-,$-,&*+))+-(.1'/2'/4'06&14'14'13'32(32(30(3.)-0,-0,)//'=>0WZErx\‹gœs‹žpŒ¢qŒ§r‹¨r‰ªs³{›¾†£¿Ž ¾Œ›¹‡’²€‹­{†ªz„ª{…ª~„§}…¥€€ž|z“vr‰oi{e[jWLZIKO@CG8>B3/0*01+01+01+12,12,21,32-43.63.74/74/63.61-50,50,7/,7/,6.+6.,5-+2-*1++0,+0,-/-./-0--/-,1+*/)*.()-/(//(//(//(//)-/)-.*+.*+/+*-,*.-).-)/.*./)./)./)..0....../-./.,/.,1-*3.+3.*5.(6/)8/(90);0*<2)=3*>5,>5,>5.>5.>5.=4-<3,=2.=2.<1-;0.;0.;0.=/.>0/?10F/'D0)A3*=4+96-85.83-<1-?-+D*)K)(P*'U.)[4-_:1c?3s@+xA-€A0‰?2‘?4”;3”:1“;19.‹<-Š>.ŠA0‹B1B/ŽA/@/š93—:3’;2‹=1„?0‚@0@/?/„A1†>0‰=0‰;/‡;.„:-‚:,‚:,w9.x<1s9-n9)r?.s>.q9*u:,}=1„@5‰E:‹H?‰K@†MB„PCQC›DJ›QR–d]vfƒ‡p}”w~ ƒ¦…ˆ§ˆŽ§Š’¦‹“¥Œ£‰‚Ÿƒwœ}o˜xa•g\`VƒZU}XWyXWpSPbJKVECI;@A998340-0,+/+,.)--(,*,+)+***,+),-(,/)-2(03(03(02(02(10)1/*1-*1,+3,+32-12./0,)--%9:,TWBox[€‹i‡–o†™l†žnˆ£p†¤p„¥pŠ­w“¶€›¹‡˜¶„“³Œ®{†«xƒ§w‚¨yƒ¨|ƒ¦|„¤{x’uqˆnh{eYjWL[HGK<@D5:>/12,12,12,12,23-23-43.43.54/74/85085085083/72.61-80-80-7/,6.,6.,3.+2,,1-,1-./-.0.1..0--/,+0+*/*).1'//(//(//)-/)-/)-.*+.*+0,+0,+/.*/.*/.*0/*/0*/0*/////////0./0/-1-,1-*2-)4/+70*90+:1*<1+=3*>4+?5,?6-?6-@7.@70?6/>5.=4->3/=2.<1-;0.;0.;0.;0.<1/=20C2*E0+H/+L,-N+/M*.J*/E+.A-,@.*@/(C/(M/'Y0*d1-j30i;+o;-w;0=4‰<4Ž;5Ž94:4‹;2‡=2†>2…@1†A2‰A3ŒB5C6‘=2=1Œ>1Š>0†>/…=.…=.†=.ˆ<.‰;.ˆ:-‡9,„;,€;+~=+z=*}=3z<1v:/u;-x@1x@1v<.v;-?3„B6ŠF=‹H?ŠJA‡KA‡NC†PDDHQQšc^’ug‰„n‘t~}€¥ƒ„©‡ˆª‰©Œ“§Œ‘£‰‹ƒ„˜€”{a›k[•eXaV‰`W…`W]QtVMiPC[E=RA6F9/<2*5-&1+%.)$-(1&*1&*1&*1&*1&*1(-2).1+//*0-+0,+0+,0),1(-1&.1&.14.24.0.*'**"66*PUAmv[~‰i€k~“h™jƒŸn€ n~ m€¥q‡¬xŽ®|‹­zˆªw„©v§t€¦u¦w€¥y¤y€¢}}›yw’sp‡mh{eYkUL[HEG:=?28:-23-23-34.34.34.45/54/54/650961961:72:72:51940940:2/91.91.80-7/-4/,4/,3/.3/.3/01/01/00.1..0--/,,.2).2).2).0*.0*,0*,0*,/+*1-,1-*0/+0/+10+10+10+10+11111100010.10.2.+2.+3.*91.92,;2+<3,>4+@6-@6-A7.A8/A8/B90A8/A81@70>5.?4.=2.=2.<1-;0.;0.<1/=20=20?5,E2.O-.W(0]#/\"0W#/L'.C/.:3-55);5)E1(U.'c+*l*+e;/j;1s=3}<6…;8‰;9Š;7ˆ:6‰>9†?9…B9ƒC9…B9†B9‡A9‰@7†B/†B/‡@.‡@.‡>-ˆ<,‰:+‹9+‹8*‹8*ˆ9*…9)€<)z=(w?(t@(ƒ=3{7,x8,z3/>3/=2.=2.=20=20>31>31>7/C41O/2Y*2_%3`#2Y%1N+1B3077-39+68*?5)N1)]-)e+)c;3h<3r=7z=:‚<<†<=‡;;…;:‚;9>8€A:C;‚C<ƒB<…@9„?8E/D/C.ƒ@-†=,‰<,‹9+Œ9+Œ6)Š7)†9)‚;)~=)w?(sA(qB(…6/|/'8/ƒ?4w5)s5*}A6}C7E9G<ƒI>„J?…K@‡LDŠOGŒSJycL~hSoYu]}bˆi„•u‚ |¥~|©€~¬…­†€ª„¥€|ž}{˜yn}ŽlyŒlwŒkwŒmt‰joƒgl~dbqZ[hTSZHIK=B@4=6,8/&5+":&(8%'6&'2&&0(&-)(++)).*'+*&,*&,*'+*'+,)*,**,**,-#$2*(50,85,BC5UZFfpWn}^tˆcqŠbt‘ex˜iw›ks™hs›iwŸmz¢mx lwŸkv¡ly£q{¥u{¥w|£wxžuzœww–tqŽom†hd{_WkPJ^CFB9>:195,560560671671782782872872983<94=:5>;6>;6?:6>95>95?74?74>63=52;62:5294194184184195484373243132021/6-.6-.6-.6-.6-.4..4/,4/,40-40-40-52-32-32-43.43.431431542540841850940:5/=60?6/@7.B8/C9/F90G:1H;2F<3F<3F<3F<3E;2C90B71A60@5/@51>50=4/=4/>42?53?53=82A64I35Q16V.6U-5R/5J22A62::08<.9;-?9)H6*P4)U3)]2+c4.k62t76}77‚89ƒ7978}75{:6|=8{?7@9ƒ@:…@;†?;|E0}D0€C0‚A/…=.‡;-‰:-ˆ9,‡8+…9+‚:+<+{>+x?+uA+tB+‹2,‹2,¡LE§XQŠA8|90‚F;€J>yH:zJ<{M@|NA~NB‚PE‡UJYN_uNgwRtzX€{^Š|b“i›s›—|™zˆ |ƒ¨¬ƒ|¬‚x¨~t£yq vŠpˆo†nƒŽp€p}px‹ms‡kk~bgu\_iQWZGPM0%:,+7,*5+)1,(-,'+.').((/().(+-*,,*/+*3)*6',7&,9&,2)$<3,E>4JF:QR@]bLgqVizXmƒ]j…\j‰]p‘bq•eo•do—eršhu krhq›itžlx¢rz¤vy¢vyŸvvštw™tu”rokj…fc|^UlOJ^BHA9@91;4,671782782782893893983:94:94=:5>;6?<7?<7@;7@;7@;7B:7B:7A96@85=84=84<73<73<74<74<74;74:6395284173080.80.80.80.80.80.61.61.61-52-52-52-63.63.54/54/540540651952:72=84=82@93?80A8/C90D:0E;1H;2I=1I=1H>4H>4H>4G=4F<3D:1B8/A60B71@70@72?61?61@72@72A83=84@85B86D97E:8G96G96E:4C90B90B:/B:-D;,F:*H;*H;*].&b0)n3/x73ƒ98‰;;Š<<‰>;‹A>†A<?6}=4~;3‚;5ˆ=8Œ>:~C3€B3€A2ƒ?2ƒ=1„<0ƒ;/;/;.|=.{=.|>/|>/|>/}>/}>/—.*£;8ÎkfÙ~y­ZTŒC<ˆLAN@tJ:qM=pQ?qR@tSB{VD‚[J‰_OUOe€Uz~[‘y_¥ra³of»rk»xo¶…vªz ›~•£€Œ¦ƒ¦~}¢yyŸvŒr‹rˆ‘r„“r€•t|–sv”ps’pl‹ig„eby\\lQU_GMP;ED0A<)>3-<3,92*41(01).1(+1'+0)/0*2/*6,*:*+@'+D%+G$+H#+A7+LC4WP@[XE`bLgmQiwVj{Wl‚[g‚Wf†WjŽ^n”an”an–bršfržko›hnšiqœnw¡sy¢vxžuu›ts—su—ts’pn‹li„cb{[TmMH`@MD=E<5@707827828938938939:4:94:94;:5>;6?<7@=8@=8A<8A<8A<8A<8A<8A<8@;7?:6>95>95=84>95>95>95>95=84<73:51940:0.:0.:0.91.91.91.91.72.61-61-63.63.63.74/74/74/540651961;83<94?:4@;5B;3A8/B90C9/E;1H<0I=1J>2K=2K>5K>5J=4J=4F<3E;2C90B8/B92B92A81@72@72@93A:4A:4?74>95=<7>?7?@8@@6D@5J=4J70N5.Q6-Q6+O8*M:+I<)H=)l3(r6,~;3‰@:•DA›HDŸJGŸLH QJ—MDD;„;2‚8-…7-Œ91;4…?7…?7†=6…<5ƒ=5€=4|>3y?3vA3uA3uA3y?3}=3ƒ:3‡83Š73Ÿ%$´<;í{zþ•’Åhc–G@‰K@wI:mNfW@jX@r\E}aL„eQj{O{{U™w\´l`Ì^_ÚR\áM[àO^êmuÜxxÎ…~¿€²–€§—}ž•x˜“u•Žr”r‘‘u”u‡–u—s{–sx–rq‘lp‹hiadtW]gLVX@LJ3GB.L40H3.D3,?2*:1(70&40'40'81):/+?-+C++H(+M%-O$-Q#-PE1[P:d^FgfJilOnuTm{Wl~Vk„Zg„Vg‡Vm]p•ap—br™dvhrœlo™km—ip™mwtyŸxw›wt–us•tu”tsqoŠki„cb{[TmMGa>SJCKB;F=69:49:49:49:49:4:;5=<7=<7=<7?<7@=8@=8A>9C>:D?;D?;E@8C>8D=7B;5B;5B;5B;5B;5B;5A:4A:4A83A83A83@72@72>71>71>71<71<71;60:5/85085074/74/761961961:72<71=82A:2B;1C:1E;1F<2J>2K?3L@2N@3N@3M@7M@7L?6K>5I<3F<2E;2E;2B90A81A81?80?80?82@93@93<5/LE?IB:E<5OB:K:2J3+\>6Z5-`5.`4+^/'\0%b8,g@1gB2‹I;G;–I?žLAŸF>›>7š=6žD;¥ND£QE¨VH«YK£PBš@5˜:0ž=4’9;9:Œ67†54„96ƒ@:{@8o?3oC6lB4m?2u:274Œ35’-3–(1ÏEEèbaÅEDÍWUáyv«VO†F<‚WGlS=f\CedFgfHgbEm_DyeL†nVŽdK­p]ÍphÞW]å8Kð(Dü&Hþ+Lþd02b22\31L)'D'#I2,J70F5.E2,E0+H0.I-,I)*O+-V24VK/`W:f_BgdEkoLu}Xu„]oWj„WlˆXnŽ]q“`s•bu˜bušdv›eq–ks˜ms˜oq•os•rw™xz™zy–zx•yqŽrm‡jj„ghƒdazZTnKIc@TKBSJAPG>9:49:49:49:4:;5;<6>=8?>9>=8@=8A>9A>9B?:D?;D?;D?;FA;E@:E@:E@:D?9D?9E>8E>8E>8E>6E>6D=5C<4D;4D;4C:3B92B92B92B92A81A81@91@93>71<71;60;60:5/85.74-74-96196/96/;60<8/>:1A:0C:1C;0E;1G=1J>0L@2M?2NA1NA1N@5N@5M?6J=4I<3H;2E;1E;2C:1B90A81@91@91@91?;2?;2C:3G81I0,V..j68u99{;;†ECƒD?„H@…I?†G>ŽJA›NH£PL¥MK’E3”C2šB4 B6 >36-7+¡<0£C5›@.™@. E3¦F6©E5¯H9¸N@´KR¯GN¥@F™9=‘8:Š?<€A:r@5k?2uK=€NC@:‚,-“(0µ8FÒK\àJIáMMÌ>=Ã>?Ò_\µXQ„@5€UDvbJa]@Z_?ekIonOshJ{fK†kPÌ]VÚ][êSZó7SD=]P.dY9ga?ifCnrMz‚[z‰bt†^r‰]oŠ]oŒ^qŽ^u’bw•cw•cw•cr’mw—rz˜vy–w~˜}ƒ„…‡ƒ›…™ƒz’|q‰ql„jhc`yYTnKJdAWQEVPDUOC8938938939:4;<6<=7?>9@?:@?:B?:C@;C@;C@;D?;D?;D?;FA;FA;FA;E@:E@:G@:G@8F?7IB:HA9H?8G>5F=4E<3E<3D;2D:1D:1D:1C:1D;2D;4D;4C<4?80?80<71;60:5/:5/94.94.96/96/96/;7.<8/@9/A:0C;0E;1F<0I=/K?1M@0M@0NA1M@0N@5M?4L>3K=2I<3H;2E;1D:0C:1C:1A:0A:2?;2@<3@<3A=4SE–I?•MA›OB¬RJÃSRÏNSÒENœE2B0 @0¥?1¦:-¥7*¦8+§=/¬E4¡>+˜7$:%¥>+®@/³B2¹C5§/8±9B¹DL¾KR¸NRªLL“B>}:1u;/q9,s5*2-›47º8@?:A@;BA4G=3F<2E;1D:0D:0E;1E;1D;2E<3E<3E<3@91?80?80<71;60:5/:5/:5/96/96-;7.;7.=9.@9/C;0D<1F<0F=.J>0L?/M@0M@0O?/O?/O>4O>4N=3K=2J<1G:1G:1D:0D;2D;2B;1B;1@<3A=4A>5A>5Q9/X+&‰:?ÅP`ãOeñOfíPcÐGO¢20”:/Ž?.–C3®F=ËFGÞ>Hã2B§H6§F5©B3®@3°?1²>1³B4´D6²G5«B/£<)¤;&©<(­:(¯5&®3$¸7<»8>½7>½6=¿9@?:BA4G=1H<0G;/E;/E;/E;/E;1E;1D<1D;2D;2@9/@91@91?82<71;60;60:5/;7.;7.;7.<8-?8.A;/C;0D4N=3N=3J<1I;0G;/F90D:0D<1D;2B;1@<1A=2A>5B?6C@7_4-t42¯KSâYiðH_ð:Qá2C½#+¬/)š9(;&•=)¬@3ÈA=Ý:?ä0;¨D4¨B3«?2®>2´?5¹C7½G;»J<¬>/ª?-¨=+¨:)ª9'²:*¹;-¼ÃLDËTLÑTNÙKJÝ>Cã3>è.<Ù5+Û7.Ò0+Ò94Á82µ@9µ[P”UDxO9~dI„lPbF]F®eTÍqdÛsjübÿ?eÿAiÿBkÿBmÿAmÿ@oÿ@oÿ@qÿAqÿBnÿ=hÿEmÿJpöGhíMièZrÛbs½YcŒ@D]($M-"PC2PR=CO76H.WH1eYCujT€{gŽy˜œ‹”Œ‡”ƒ~‰—ˆŽœŒ™ˆ‡’‚Š“‚—žŽ¤¨—²¶§¸¼®¿Á¶ÀÁ¹ÂþÅÅÃÃÃþ¾¾²´³¢©¢—Žy‡vh{e\sWTmONiHTYBUZCW\E560560671782893:;5=<7>=8@?:B?:C@;DAGB>GD=GD=HC=ID>IE0I=/G>/G>/F<0F<0E;/E;1D<1C:1B90A:2@91@91?82<71;60;60;7.;7.;7,<8-?8.A;/D0K?/M@0NA0P@0O?/O@-P>2N>1M<2L;1I;0H:/F90C9/C;0B<0B;1@<1A=2A?3B@4C@7t50–FEÆY_ßUbã@Qä5FÚ0;À*+¯1%Ÿ9#•;!”: ¡=&·=.Æ90Ê2- :,¢:-¥9-¨6,°91¸A9»E;·E:­?2«@0§<,¤6'ª6)·=0ÄD9ÊG=¾9*Î@4áD=ïA@öDâ<@×?>ÎC>ÍJB×RMåZWéPRìELï;Gõ6F÷2Dø/Bû1Gÿ6Lø:Tø:Tø:Tû:Wþ=\ÿ?aÿBeÿDiûhú?júAm÷@nõ?oò>mï=mÿFnÿ:aÿ>dÿInÿJløMmòSoæXnëp‚Å_j˜ILt:6\6-O9+OD2SN:`PArdWˆ|p”Ž‚Ÿœ“¦§¡¡¦ ”˜”Ÿ›¨¤¦¯¬¦¬ª¤¦¥§§¥µ´°ÄÀ½ÍÉÀÒÍÇÕÐÌ×ÏÍÖÍÐ×ÎÓÑÊÑËÆÌ¿½À°²±˜Ÿ˜€Œ€m~k^u[VoQSlNU_DV`EWaF560560560560671893:94;:5=<7@=8A>9C@;DAHC?HC?GD=HE>ID>ID>JF=LE=MF2G=1F<0D<1D<1C:1B;1A:2@91?82?82<71<71<8/<8-<8->7-@:.B:/D2B@4@@4+)¨JKÁSV¾=BÀ/6Ç.3Ä./»0)ª1 £9!›=!–=˜= ¡=#¥;#¦6"6- 8/¢5.¦3,®71·@:¹B<²@6±B7­A5¨7È`UÑq¤eSŽWC‡N:¡XGÊe[ãa_ëPTëBIùDKí@DÞ@?ÑB<ÅB8ÁB9ÌIAßPLìKPô@Kù9Hý7Hþ5Hø3Eö7G÷=K÷9R÷9Rø7Rú7Uý7Xÿ9]ÿHC?ID@HE>HE>ID>JE?JF=MF>MF2G=1E=2D<1C:1C:1A:2A:2@93?82<71<71<8-<8-<8-?8.@:.B:/D2??3@@4”67Á]_ÈZ[¯78®,,µ/,±,#°0#¯8$®B(©G* G'šF$šF$–C!”? Ÿ81£;2¦92¨50°:6¹B>¹D=±>7«<3¨<2¦»72»:Ê<$á:*ñ.(ÿ$&ÿ'ÿ'ÿ%ÿ%(ù,)ñ2*ë5*è3(è2'ê/&ì-%Ü=(Ñ2Þ>0Ñ5)Ê7/Â?7¯C9Çqd²m]–YF™VE¿i\ÝlfãSSë@Hù?Lï4¹6,½4.Î44ïBHø8Gÿ2Fÿ3Hÿ5Iú7GöYÿ=Xÿ:Wÿ6Wÿ5Yÿ5\ÿ6_ÿ7eÿ;kÿ:mÿ;oÿtû>vôEbýNkÿTqúIfð?\ÿRqÿfƒÿf€ô^wêbváky×s{Ärvªfe”ZV‰TN’€~¨™–¾°°Ä»¼ÆÁÅÈÇÍÅÈÑÀÄÏÆÌØÈËÚËÍÜÓÐáÚÖåäÜëêßïîáòòäãõççöçêóâèñàêïßêìÜéå×äÓÉÒþά©—y‡vi|f`w[\uWbqRapQ`oP201312423653875984984983;:5<<4==5??5AA7CC9EE9EE9HH@HH>HH3B90E<5C:5@85?74@86?67>56:44F85E76B87@78>:;<:=<<>==????A@,§B0©D2©D0©B/¨?,«>*­<*µ=-¾C4ÅF7À>0·3&Í6+Ì8,Ì:-Ì=/Ï=.Ô(Þ9%Ô4Ï4 Î9%Å8&¾6&Æ@4ÕQEÒIAÜMIïUUüVXýJPø9Aü4?ÿ9DäCHßCFÓAAÆ?;¹=3®=/ª?/ª@0¿Q@ÉQCÑLCØC=å??÷@Eÿ>Gÿ8CúGMúENûEQþESüARú=Sü>XÿCbÿGiÿBhùHH7H?8F=6C:5C<6A:4?74?74@85>95=84;63>3/=4/>42<74=98<;9=<:>=;@?;C@9G@6J@4L@0O@-P?+P>(=B,?A,E=0H92K63J46F35A57>=;8=69?5?A4C=-J9)^B4sRC¼K=¬;- 2#¡6&£:'8$ž9%£?(¡;%¦=(­@,³@-¶=,·9*¸6(¹5(¦;+¤:*£9)¥;+¦?.©B/«B/«@.­?.«:(±<+¿E6ÆH9Á?1¼8+½7+Ï5+Ï7,Î:.Ï;/Ó=/×;/ß8/ç4/ð0-õ--÷-+ò/+ê4)ß8(Ö;'Ï=&á:'Ù7"×8%Ô=*Ì;*Á5&Ã;/ÍG<ÐG?ÙJFèPOóPQôGKò;@÷:Aÿ?GàDGÜDCÓB?Å>8·;1¬;-ª<-©>.µF5ÅM?ÓNEÜGCã?@ñ>Bý>Fÿ>H÷DJ÷CLúDPÿFTýBSú=Sü>XÿBaÿFhÿCiü?iù@lùBpûGvüJzþL|ÿIxÿHtõKpðRsò]zö`{ùXwýMqÿCkÿAlóCjÝJgÉ^p®pugNI†‚v´”‡Ì²¥äÔÇëäÜèéäéêîéçòíáõöâûýàüÿâýÿçþÿìÿÿòþÿ÷üþúûþûöýúõü÷ôúôôøïðôëîñèëïæëäÞâÜÖØÊÆÅ²²°ž ›Ž“Œˆ…ˆ…–†‰€†}/.,0/-10.21/43/540762761:94::2<<4>>4@@6BB8CC9DD8IF=IG;JH;KJ8MJ7NL7NL7OL9KI:NKBTSQ_^dihxmm…lkŠihˆcYd[QZQGPJ@IH>FG>CC=A@::1>:1=90:3-94.;60=82=:3>;4?<5?<3C?4F@4I?3L@2O?0P?-Q>-P>*3@&7?'<=+A;-B8/A62>42;31=85B:7H94O2.[+)o-.Š:= EJª9+¢2$Ÿ1"¤9'¥<)ž7$8$¢<&¤;&¨=)±A-¶A/¹>.»<-¾:-À:.®>0¬<.©9+¨:+ª<+¬>-­>-¬=,²?-®9(¸>/ÊL=ÊH:¼6*º2&Å;0Ó5*Ô6+Ò8,Ô:.×;/Û9.â7/é2,ñ/-õ.+õ.+ñ0)ç2'Ý6&Ó8$Ì:#à7$Ü5#Û8'Û>-Ó=.Æ7)Å8.ËA7Ç<5Ì?8ÙEAåKIìIJëCCí?Að@CÜDC×C?ÏB;Â=4¶:.­9*ª;*«<+ª9)¿E8ÔNEÝIEâ?@ëXÿ@_ÿDfÿCiþDmÿFpÿIwÿK{ÿL|ýK{ÿCvÿGwÿJtúNtþZ|ÿa€ýUvòCdüHkÿRvÞ=\ÎH`Úz†µ}~\F;„r³‹Õ³§óÛÑúíåøóðøøú÷ôýôëüüêÿÿéÿÿëÿÿíÿÿòÿÿ÷ÿÿûÿÿýþÿþúÿýùÿûøÿøöþõöýòöûðôúïóðçêåßáÓÏξ½¹­®¨¢¥œ£™£—¤ªœŸ¥—œ¢”/.,/.,0/-10,21-32.54/650872991;;3==3??5AA7BB8CC9IE<0?=1@<0?<-A;+F?/H?.K?/M@/O?/P?/Q>/P=.<@)=?*?>,?<-?;0=:3;:5:94<94D95N43[*-o&--8¨3C¶7H§7)¥7&§9(ª?-¨?, 9&Ÿ9#¤;&¥:&«<)³>,¹@/½>/Â<0Å=/Ç=0¹@5¶=2²:,®8*¯9+°:,²:,²:*¶;,¹;-ÄB4ËE9Ç?3¾1'À2(Ê:1Ú3+Ø4*Ù7,Ú8-Ü8.ß7,æ3,ì1,ó0,õ.+õ.)ï0(æ1&Ú4$Ñ6 Ê8Ü/Ú0Ú4$Ý;,ØVßetû §Í‘]=2aP@©wlÑ¥œöÔËþêãÿôòÿþÿÿüÿùóÿüïÿÿïÿÿðÿÿòÿÿôÿÿ÷þÿûýÿüûÿýùÿüøÿúøÿù÷ÿö÷ÿôøÿôøþó÷öëïìãäÚÔÔÉź¹´³´¬±´©²µª¶¾³°¸­¬´©10,10,0/+0/+10,21,43.54/77/880991;;1==3??5AA7BB8KD:LF:OG:QJ:RK9SL9RM:QK=OKBVTUfdowx††¨»“ÃŽ‘ÆŠÀ‡‚¸{w©rlœid_[~UPnNJaJGXEBM?=B;7696196-86*86)581692891;;/><-?<+C<)D<'I>*J?+L?,M@/M@0M?2M?4L>3M?4K?3F<2B90=909:25<44>57<5>:1H3.\0/{48œ;D¯9E²2Aª<+ª<+«@.¬A/©@-¥<'¥<'©>*§8%­:'µ<+¼=.Á;/Å;.Ê<0Ì<1ÁA6¾>3º:/·7,·7,¸8+¸8+º8+»7+ÇA5ÍC8Å8.Á1&Æ3)Ë7-Í6-à2+ß3)á5+â6,ã5,ç4-ê2*ð/*ö/,ø.*ô/)ì0'ã1#Ù4!Î6É7Ú/Ù/Ù2"Ù5)Ù9-Ô:0Ö?6ØE=ÕF>Í@9Ç<5Ë@9ÖKDÙNGÐF<Å;1Å=1Ä<0ÀCí>EóBJûJTÿJYýFXúCYýB]ù@_ûBdþFjÿJsÿOxÿOzÿLyýIxÿGwÿRÿQ}ÿIqûImÿStÿVtøNiëD^äF]èYkÿ—¢ÿ¶¼î žˆKFd2)©jcÍ–ôÇÁÿãÞÿòðÿüýÿýÿú÷ÿý÷ÿÿöÿÿöÿÿøÿÿùÿÿüÿÿýýÿýúÿüøÿûøÿúøÿø÷ÿ÷øÿõ÷ÿôøÿôøýñóóéêäÜÚÖÑÍÍÊÃÉÉ¿É˾ËÍÀÇÑȾȿ·Á¸84163.52-30+30+41,52-63,85.96/:70<90>;2@=4B?6B?6KC8ME:PF:SJ9TK:UL;SL<=;:6;8396/267465672880<:-A<)D>(G?(I?&J?)IA,JA0IA4IA6HA9G@:R9?ž46§<*¨=+ª?-ª?-©>,©>*¬?+¯@-«8%²9(¹:+¿:+Ã9,É9.Î:0Ò;2É>7Æ;4Ã81Â8.Â8.Ã9/Â8.Ã6,Ä7-ÑC9Ò?5Ä0&Ã,#Ð7/Ö<4Î4,æ1*æ1*ç2)è3*ê3+í2+ð/*ó.(ø.*÷-)ò/)ì2&ã3$Ø5"Ï7 Ì7Ü5#Ù3#Ø2$Ö2&Õ5)Õ7,Õ;3Ö?8ìYRáRJÓHAÊD;ÉF<ÊJ?ÅG;½?3¼;(¼;(º;*¹:)·:(¸:+¼>0¿A3ÁA6Á<5Å<6ÏA?×EEÝGIãJMèMQëADì?EðCIúJTþN[üJZüF\üF]øA]ùBaýEiÿJpÿNwÿOzÿMxÿKxÿR{ÿR{þOvýOtÿVwÿ]{ÿSoîD^øUjîQd÷dtÿ’žÿ‹“òƒ‰Ç`c­KL²keÏŽˆñ¼¶ÿÞÙÿðìÿúúÿüþýûÿüûÿþûÿÿûÿÿûÿÿüÿÿûýÿûûÿûøÿûøÿüùÿûùÿûúÿøúÿöøÿòõÿðóûìïòææçÝÛߨÒÛ×ÎÝÛÏàÞÑàáÓÚãÞÏØÓÅÎÉ<94;8385052-41*41*52+63,74-85.96/;8/=:1?<3A>5B?6KA7MC7RF8UI9WK;WK;UL=SJASJK[Xcnl‚‚‚¨‘”Çš Þž§ì¡©ò¡¤óž í™›æ•˜ß”•Ö̈‰¿‚ƒ±zz rq‘fd|XWiPN\IGRFCJDBG=?K==G;:?;:8<92A;-D=*F@*F@(GA)GB.ED2CC7BC=AC@>BAG9HH,©>,ª?+­@,¯@-°?-°=*±8'¶8)½9*Ã9,È8-Ì8.Ò91Õ;3Î;4Í:3Ë81Ë81Ì92Í:2Ì70Ë6/Ó<3Õ>5Ò91Ì2*Ð3*Ù;2Ú<3Ó5,è0(é1)ì1*î1+ñ0+ò/)ô-(ö,(÷-)õ.)ñ0)ê2(â5%Ù6#Ò7!Í8 Õ8%Õ8%Õ5%Ñ4%Ò4(Ô6+Ô7.Ð7/ãNGèXPçZQØRIËH>ÃE9¼B5·?1¹<&¹<&¹<(¸;'¸9(º;*À>0Ä@4ÉD;Æ?9É@:ÑFCÕIHÖHG×IHÛJMìCFêADíDIöKSüQZýN]ûL]üJ`öD^÷DaùFfýIlÿNuÿOxÿOxÿNyðYzðWvóVuüYxÿ]{ÿZuûQkòI`ýWköUgêN\ö^kâKZçSaçSaåQ_¸jfÉ‚~窧ÿÓÑÿëèÿôòÿøùÿÿÿùýÿùüÿûüÿüüþüúûýùøüøõü÷ôÿú÷ÿûøÿüúÿûúÿøøÿòõýîñúëîðââëÝÝäÙÕâÙÒæßÕëçÛñîßóñâêóðÜåâÏØÕ@=6=:3:7074-52+52+52+63,74-74-96/;8/=:1?<3@=4A>5M@7OC7RF8WJ:XK:YL-C@-CB.BC3AE7>E=€UE’YFL7A+“A+«@,®A-®A-®A-°A.²A/²=+°7&µ7(¼8)Â8+È8-Í6-Ñ7/Õ8/Ù;2Ò73Ñ61Ñ61Ò72Ô94Ô94Õ81Ó6/ÞA:Ö8/Ñ3*Ø7/Þ=5Þ=5Û8/Ù6-ë0'ì0'ï0(ò/)õ.)ø-)ø+(ø+(ø-)ô/)ð1)é4)á5'Ù8&Ó8$Ï8#Í8$Î9%Î7$Ï6&Ð7)Ô8,Ó7+Î4*Ì3+ãNGôd\ë`YÔOFÂB9¸<2´:/·?&¸>&·=&¸;%º9&½9*Á;/Ä>3ÌC9ÊA9ÎE?ÕKHÓLIÎGDÌFEÐJIéFGæCDéDHòMSùRZùR\ùN^úOaõG^õGbøGdûIiÿNrÿRvÿRyÿRyå[uë\xõ`}ü_|øUpõMgùPgÿYnÿ[mÿbsóL]úSdøM_ÿRgüI_ýE]³d`¾tqÚš˜ûÈÅÿåãÿîëÿõôÿÿÿûÿÿùÿÿùÿÿúÿÿüþýýüúýùöýøõÿøõÿùöÿúøÿúùÿööþððøêêõåæìÜÝèÚÙæØÕèÞÕðèÝùóåþûêÿþíòûúâëêÔÝÜA>5@=4?<3=:1;8/96-74+63*52)52)63*74-:70=:3@=6B?8J@6OC7RF8VI9WJ9XK;ZL?[NHTIMXR`gd|}©’Ì—Ÿçž©ù¤°ÿª³ÿª³ÿ¬³ÿ«³þª±ùª®õ¨«î§«êŸ¡Ü™šÒÁ±ur¡he’]Z…XR~YP{YQxVOpOG_E?M?:@?;8@@6>>2@B5@F:>E=:C>9CB*®?,±@.³@.´?-¶=,¹;,º6'¿5(Ä6*Ë7-Ñ7-Ö8/Ú91Û81×84Ø95Ù:6Ú85Ø61Ø61Û83Ý:3æC<à=6Ú70ã@7þ[Rÿlcÿ]Tã@7é1'î2)ò1*ô/)õ*&÷'%ø(&ú*(ø-)ó0*í2)ã1%Ú0#Ó1"Ò5$Õ:(É=&É=&Ë=)Ï<*Ñ;,Ò9+Ô8,Ó6-Ú@8Ð71ÜGAôc^ãXQÉB<Å@9·3.´<#¶<$¹<&º<&½:(¿:)Ä<.Ç=2È>4ÌC;ÙPJßXTÓOJÁ@;¿@:ÊKEäFEäFEèJKïPTòQWïNVïKVñL\ùRdøOf÷Ke÷JfüMnÿRsÿRvÿPtê[wêZuðZuú[wÿ]xÿZsÿWnÿViÿctþVgÿ\mÿYlõDXùBXÿMeÿIb·nh­hcËŽ‹èµ²ùÑÏÿêéýïîúù÷øþüøÿÿøÿÿøÿþúþýþþüÿûøþöôþùõÿû÷ÿùöÿöôÿööÿõõöèèçרäÔÔÞÐÍãÖÐñçÝüôçÿøèÿüéÿÿí÷ÿÿèñðØáàC?4B>3A=2?;0=90;7.:6-95,73*73*73*83-:5/=82@;5B=7I?5LB6QE7UH8VI8YI9YK>ZMEUKLXP_ebyz¦‰É”œäš§ö ¯ÿ«´ÿ¬µÿ­·ÿ¯·ÿ¯·ÿ¯¶ü¯³ú¯²÷§ªí¢£ä˜˜ØŒŠÉ€~½uq®ie¢b^›cVŽbU‹]TƒWOtNHdFCTBAIAAA;=8@C9ß<7ß<7â=9æA=èC=éB<èA;ç@:èA9ä@7Ü8/Õ1'Ø6+ëI>þ\Qô?4î6,ê+#î)#ù,)ÿ./þ,-ø((ú0.õ4/ï7/ç6,Ü4)Ö2&Ó3%Ò5&Å='Ç<'É<(Ì;(Í:(Ï7)Ï6(Ð4(Õ8/Ï5-Õ<6åPJçSOÛLHÏA?º/,¹=%º>&»='½<'¾9(À8(Ã9,Ä:/È>4ËB:ÕOFÜWPÒQKÃD=¿B<ÆKDáIFáIFåMLëSRíTVëPVéNVìOZ÷VføUhùSiúRküRmÿSqÿStÿRsïNoøTvÿ\|ÿ^{ÿ[vÿUoýQgûReüUføQbÿZhÿZjôM^úRcÿWiôI\§ha™\W·€{Ù©¥ïÇÅýáÞùêçýøõøýùøÿÿ÷ÿÿöÿýùÿýÿÿýÿûûÿö÷üùòþùõþùõþöóÿ÷õÿõõøêéêÜÛäÖÓÝÐÊáÔÌïåÙüõåÿùçÿýéÿÿì÷ÿýèñîÙâßEA5EA6C?4A=2?;0=9.<8-;7.84+84+73*83-:5/=82?:4A<6G>5JB7ND8RF6TG6WG7YI:YKBWKKXP[b^wsuž…ŠÂ™Þ—¤ó¬ÿª´û¬¶ý®¸ÿ±¹ÿ²ºÿ´»ÿ³ºÿµ¹ÿ¯²ùª­ô££ë™—àŽŒÕ‚€Éxt¾qm·l`¢i]dY“^V‡VQyNKhEDV@@J76;?=>HBBKABN?BYFJmX_}fnt¤}¬§‚®¬}§´w ¾p—Âc…ÃRpÅE^ÔI\×EPÊ9<¾3,»7(¸;%³; ¯<*¯<*°;)³;*·<,»<-À<-Ä<.Ä6*Ë8.Ô<1Û>5á@8á>7à<3á:2Ü73Ù40Ø3/à93èA;ìE?êA<å<5ã<4Û4,Ø4*Û7-Ô2'Ì, Ö6*èH<÷I>ò@6ï4-ð-)÷+*ý+,ý+,ø*,ñ))ì/+è3,â5.Ü4+Ö2(Ô2'Ô2'Ç:&È;'Ê<(Î;)Ñ;*Ò:,Ô8+Ô8,Ñ4+Ø;4Õ:5Õ<7çONîXYÙEEÅ02¾=(¿<(¿<(¿:'Á9)À8*Á7*Á7,Æ>2ÇA6ÏJAØUKÑRIÄH>¿E:ÃH@ÚIDÙHCÝLGäSPåSSâPQâMQåNWòXdöZhý[pþZrýUoûQlýPnÿRpÿFmÿOvÿZ}ÿ[{ÿVqÿSkÿVkÿ[mûYhúYhü`mö`kî\fñenífmÚT[’cY}ND™lfØ’ß¹¶ñÓÑôàßþöôøú÷÷ÿý÷ÿÿöÿýùÿýÿþÿÿýÿÿ÷ûúúòüùôüùôýøôÿùöÿøöùîìñãâçÙÖÝÐÈÜÒÈîäØýöäÿûèÿýçÿÿè÷ýùêðìÝãßIE9HD8FB6D@4B>2@<1?;0>:/:6-95,95,94.:5/<71>93@;5E>6HA7LD7QE5RE4UF3WG7WIC_@EmDJ€OU•]f¦jrÇe˜ÍkœÏl›Ïf‘Í]…ÎTyÌFgË8UÌ0Hß>PäBMÔ:<Æ7/Ã@.ºB*®/Û?0Ü@3Ü@3Ò6*èKBåJEÎ50àFFóZ\áHKØ?BÆ=-Ä;+Ã:*Ã:*Ã:*Ã9,Á9+À8,Â<0Â>2ÈF9ÏOBÎPDÄH<¿C7¾D7ÑF?ÑF?ÕJCÛPKÝROÙMLÚKMÜKPëX`ó[hüaqÿauûWoõOgõMgúPkÿJuÿOyÿSwÿRqÿSmþ[pÿcuÿixÿguüaoôbmìelàglÔjjÉjh¼c_dVeH:_Tª‡Í«©åÇÇïÚÙÿóóùøöøþü÷ÿÿ÷ÿÿûÿÿÿþÿÿüÿÿ÷þûüôúûóûúõþûöÿýùÿûøþôòøíéêßÙÞÔËÝÓÇíæÖÿøåÿþèÿÿæÿÿçõúóêïèáæßLI:KH9JG8HD8FB6D@4B>3A=2=9.<8/;7.;60;60<71>93?:4B?8EA8JD8NE4PE1TE0VG4XH9ZMEVMR[Whkl‹~‚²‰“Ð’Ÿå™§ò§­÷©¯ù«±û­³ý°´þ°´þ°´þ¯³ý«®û¨«ø¥§ô ¢ïšœé“•⊌ل†Ó…É{u½mk­dd _a”X[†QQsNHbUFY_CRlBLEO˜LV¬U]¼[dÅ]fçJuéNxæPuàLn×FcÒ?YÍ5JÊ+?Ú5EçAMéFKÙ><Í>6ÊH8¿J6°B)·>-¸=-º<-½>/Ã?2ÊB4ÐD7ÕE:ÙE9ÚB7Û>5Û:2Ù6-Ù5,Ú3+Ù2*Ô1*×4-Û60Ý90ß80Þ7/Ý6.Ü5,Ö/&Ù5+Ø6)Ï2#Í1"Ò9)Õ>-Ó<+Ö=-æD7÷KAÿD?û56÷)-÷)-ù.2ø67í55â30Ú1,×/,×/,Ù0-Û/-ã80â:1â:1â<0à<0ß=0Ü?0Ú>1Ñ7+ïWLù`XÓ;6Ó;:èOQÞEHèOTÍ=2Ê:/Æ8,Æ8,Æ:-Å;.Ã;-À:.¾:-¾<.ÁB3ÇH9ÇI:ÂD6¾@2¼>0ÊE<ÊE<ÎI@ÕPI×RMÔNKÓKK×LOçZ`ð^hüfrÿhxü]qóOgóMeùQjÿPzÿQxÿQpûSmø\qûhxûjw÷epüfró_kí_kêkrÝsu¿lh¦f\¡l^ujXVI8kXJ–{t¾ŸœßÁÁïÕØþîïûõõúüûúÿÿùÿÿýþÿÿýÿÿûÿÿ÷ÿýÿ÷ûþõûüöÿþùÿÿúÿþúÿûõÿ÷òñèáäÜÑáÙÌðé×ÿúæÿÿæÿÿãÿÿäöùðíðççêáQK=PJ3Õ;1Ö8/Õ4*Ö3*Ø4+Û4,Ü5-Ú9/Ý<2à=4ß<3Ý90Ü5-Ü5,Ý6-Ò.$Ý;.Ü<.Í1"Å.Í8$Ð=)Ì;&Ë:'Ò9+á:1ó=9ÿ@@ÿ;?ÿ27ô+1ê,.ß+,×+)Ó+(×/.Þ44ä88è:;ó55ò64î73é6/ã7-Ý5*×5(Ñ5&Í5'çPEÿmcÛHAÈ42×CCÓ>BêUYÙB;Ô=6Ì70Æ6-Ç9/Æ<1Ã=1Á=.»9)»<+½@.¿B0¿B0¾?.¼=,»<+ÃC8ÄD9ÈH=ÏPGÒSLÐOIÐOJÔOPç_cîaiûitÿm|ÿdu÷UjõRgýWoÿSxÿUtûWpð_pñoyôy~êmsÞXaïamò`mïaoðs{숊ɂ|¥wjšyhhpYMO:^WGƒqg±•’Ý¿¿ñÔØýéëþôõýûþûÿÿúþÿýþÿÿýÿÿûÿÿöÿüÿøùÿõúýôÿÿúÿÿúÿÿúÿý÷ÿþöùðçíåÚéâÒôïÜÿûåÿþåÿÿãÿÿâøúíòôçîðãSM=RL4D=5B;3A:4@93A:4A96B:7@A;CC;IE:NG7QF2RF.UF/WH5XJ=RHFXR\jh€}§‹’Æ’žÚ–¤å¥¦ù¦§ú©ªý«¬þ¬­ÿ­®þ¬­ý«®û¨¬ö¦ªó¤¨ñ£§î¡¨î §ë¤è›¢æ™žâ’šÛŠ”Ò…Ê‚ŽÂ‚‰·‚©‡yšŽmˆšczªWi¾P]ÓKWäGPí?Hñ9Aî;6é<5âB6ÙH7ÎJ5ÅG1ÂD.Å@/ãUGàG?Ú;7Ø64Ø88Ö:;Ï98Ê66¼=.¾<.¿;.À;,Â8+Ä6*Æ3)È1&Í5*Ð3*Ñ3(Õ2)×3*Ù5,Ý6.Þ7/Ü>3Ý<2Ü;1Û8/Û7.Ú6,Ø4*×3)Õ3&Ó3%Ñ4%Ï6&Ò=)Ñ>*Ê9$À2Æ;(È5%Ó3'ç60ü;<ÿ=@ÿ7=ù27ê-1à..×--Õ0.Ü44ã9:é;=ë;>ý.4ú/3ö01î1/æ1*Þ2(Õ1%Ï3$È2#Ð>/új_ãTLÈ95Ð@@Ë:=ãRUçJEÝB=Ò93Ê5.Æ8.Å;0Â<0¿=-¹<*¼?-½@.¼?-º;(º;(½<)¾=*º>2º>2ÀD8ÈLBÌPFÊNFÌMGÐNLçbcêbføhqÿo{ÿhxøYm÷Ujþ[pÿXsü\tìbqãktç€í‰‡ãyyØ_dñhrÿl|öcsíkwø‘•餟À–Š¥‹z\pWFRRLÿ4:èB*âD)ÙH)ÎN+ÃO(¹L%¶H%»D&ÛWBÚF8Ú;5æ>>íBHé>Fß5>×08ÈF8ÇE7ÈD7ÉA3Ç=0Æ8,Æ3)Ç0%Ê0&Î1(Ó2(Ö3*Ù5,Ù5,Û4,Û4,áC8Û=2Ø7-Ø7-Ü:/Ý9/Ù5+Õ1'Ù7*Ð0"Ì0!Ð9&Ì9%Æ5 Ç9#ÑE.Á:&É:)Õ7+â3.í//÷05þ5;ÿ;BÿIMúGJîDDæ@@ä>>ã9:ã28á.4þ'/û(/ø*.ó-.ë0+ã2*Û5)Ô7(Æ0!¾/óeYê]TÌA<ÓEDÊ;=ÝNRïPMäFCÕ:6Ê5/Æ8.Ä:/À,¼A/½B0º=)·8%º9&¾;)Á>,²8+²8+¸>1ÁG<ÅK@ÄIAÆICÊJGå`aæ^bñdlÿlxÿix÷ZköTiýZoú^tòcuãgqØqrÝ…é”ꋇåruùq{ÿxˆõ`sßXgóŠ‘ý¶´Ö«¢¬•…TnSAS;PTCkaWž†‚Ý¿ÁõÖÛøßåÿóùÿûÿÿþÿüýÿýüÿÿüÿÿúÿÿôÿùÿø÷ÿôöüòüÿøýþøüüôÿýöÿÿöÿþôûõç÷ñáüúåÿþåþýáýþßÿÿãÿÿñýþîüýíXO@XO@WN?VM>TKñ8>æ=@ÙD@ÑHBå;Dà;BÞCGÉ99ÌB@ËD@½/-ÞHIëHKîAGï;Dì8Aé:?â<>Ú<;Ô<9ÏA=É>9ÊC=ÑLCËK@¼>2³7+¹;-¹9,¾8-Å7-Ê3,Ï0,Ô/-Ý11á34çA1à9)Ü1 á1"é8(ê;*ã6%×2Ñ2Ì4Ê5Ç4 É3"Ì3%Ñ3(Ô3)Í.(Ï2+Î6+Ì8*Ë8(Í7&Ð7%Ø6'ß3'é2,ð31ò01ð+2í*2í+4ï-6ú+1÷*/ñ+,î.-ë4.ä8,Ú7(Ð5#Ã.Ä3 çXHèZLÊ<2ÞOGÄ5/ÚIFÝQRÚLKÒDBË<8È80Ç7,È9+Ê;+È;)Å:'À9%½:&»<)º=+¸=+¶=,³9.µ;.¹=1½?1½?1¿@1Â@2ÅA4ïk_õqeêd[ômiùroécbðjiútuÿk|ûivñdmï_hòaføgjõnkîqk÷|wÿ}ƒþYjÿ[wîZpû¬±«°œaŸz]sMIZ6LR6snX£–†Ë·®íÕÓÿîðÿõ÷ÿ÷ûþøüüüþþÿÿþÿÿþÿÿýþÿæÿòàÿëâýêìÿð÷ÿôûÿôþÿóÿþñÿýïÿûîÿùèÿùæÿøãÿùãÿùáþúáýÿþþÿÿþÿÿYPAXO@XO@VM>UL=TKDë:Bè7?ä7;Ü89Õ:8Ð;7ÓF?Ç<5Å<4ÌG>ÌLAÁC7¶;,·9+¹7*½7+Å7-Ë4-Ñ2.Ø3/á53æ66á?0ß<-Þ6)à4&á6%á6%Û4"Ó4Ð:"Ê:"Æ:#Æ;&É<*Í;,Ì8,Ì5*Ö3.Ö5-Ñ7-Î8*É6&Ç4"Ë4!Ð3"Ø2$ß1(å/+ç.,è,-æ,1æ-3ç.4î*,î,-í0.é2.á3*Û5'×7'Ò9'Ó@,»*ÔE5Î?1ÙF>êWPØC?ØBAåWVâRRÛKJÔC>Í=5É9.È9+Ç8(È;)Ä;(Á:'¾;'½>+º?-¹@/¶>-²9.µ;0·=0¹=1º?0½?1ÁB3ÅC6ëi\òmdçb[ðkfõolèbañklûuvÿp€ÿo|öirë^fêY^òadøqnù|vöyuÿx~ùRdÿUríXnö¥«¥¨“X”n[tLN_;QZ;us\ª×úøàÜÿôóÿúûÿúûÿûüüüþúþÿûÿÿúþÿûüþçÿñáÿêáýçéÿìóÿòøÿóýÿòÿÿóÿýïÿýíÿúëÿöåûóàúòÝûõßý÷ßúúøüüúÿÿýZQBYPAYPAWN?VM>UL=TKCß>Câ;CØ7=Õ?AÏA@ÉD?Â=8Ã96ëWWàBCæ=Bé:Aæ7<Þ58Ö66Ñ96Ì;6ÕHAÅ:3¾5+ÅA5ËK>ÆH:»=/¶8)¹7)¿7+Æ8,Î7.Õ60Þ63æ87ë;;Ó5)Ö6*Ú6*Ü6*Ý5(Ý7)Ú:*Ö?,Ã5¼5¸6 ¸7"»9)¼8+¼4(º0&é=;å>8Þ=5Ô*ÓB/Â1 æTEÐ<0ÚA;ÞC?èJIòTSèVVçSSãOMÝIEÖC;Ï<2Ê8+Å6&Ä7&À7%¼7$»:'¹<*·>-µ=,²=,°:.±;/²<.µ=/·=.º?0ÀB4ÃE7Ü\Oêg]äaYñlgöpoçabìfgòkoäP`ï^kôhqòemñ`eödgûqqúzwövsÿnuõJ]ÿMjïUmñœ¡ŸžŠPˆcVoEOd=Va?ww]¯¤’âÐÄÿíæÿ÷óÿûøÿýûÿþüûÿüûÿýûÿýùÿû÷ýùãÿëÜþãÚøÞàúáèûåïüèöýëýþîýúëÿúêÿ÷èúñàòê×ðèÕôìÙùñÜýùöÿûøÿþû\PB\PB[OAZN@YM?YM?XL>XL>UI;TH:SG9RF8RF8RF8RF8RF8JF=KGÓ>@ÐFCÅA<¸71Å>:ê[WÝABä?Cç=@ã:=Û89Ó97Î=8ÌA:ÏE;Ã9/»2(À/¸9(¼8)Â8+É:,Ò:/Ù80á83è;7ì=:Ô3+Ö3,Ù5,Ý4-Þ6-Þ7.Ú:.Ô>/Æ9(Á<)½>-¹>.»=/½=2Á>6Ã>7ó?>î?<æ?7Ù=1Í:*Æ9%Æ;$È<%Ï<(Ï8'Ï2#Ñ1%Ó2(Õ4,Ñ2,Ï0*Ñ3*Ó5*Ñ7+Ï7)Ê7'É8%Ê<(Ì>*Ê<(Î=,ô^PàF<Ò3/Ò.-è?BþUXÿvuÿroÿjgö^YçPIÕA7Ç5(½.Ä8'À9&»8&¹:)¶=,µ=-±>,°<-­<.­<.®=/°<-±;-¶>0¼B3ÁE9ÉMAß`Wâa[ôpløtrå`aä]aå^dÙFVçYeógpôgo÷dlýjpÿstúxvõssûenóCXÿEbðRkë’˜œ—ƒN‚\Ql?Ri?ZhDy|_°ª”èÛËÿôêÿùðÿúóÿýöýÿùûÿúùÿúöÿøòüóîøïÔüÚÎóÒÊëÌÏìÎ×îÒàïØéòÝóöãöõãûõåüõãõìÛíáÑéÝÍíáÑóç×úõïü÷ñþùó\PB\PB[OA[OAZN@YM?YM?YM?WK=VJcî7Uí8IçAEßFAØIAØIAÞFCæAGð;Jõ8JãDI×>AÐ@?ÏJE¾?8²3,ÇD<âTPÜDCáACä>@â>?Ü>=Ô@<ÏE;ÌH<Ç=2Á7,½5'½9*¿=-¿=-»<+½<)À;*Ç;,Î<-Õ;/Û8/à70ç83ë95ã:7â64â22å31æ42ä50Û2+Ò1)É2'Ç9-Ä<0¿90¼5/¿52È<;ÒDCó57î66å61Ø5,Ë5&Ã6"Á9#Ã;#É>'Ê9&Ë5$Í5'Ñ9,Ó;0Ò:/Ï8-Í?1É;-Ä8'Ã7&Ã:'Å<)Å='Æ;&Í>-Í:*Ø>2ãB:Ö.+æ::á14å26Ò73Ö;7ÞC>åJEêQIêSHèTHäUGË?0Æ>.¾<,º<-¶>.³@.°?/®?.«=0«=.¬<.¬<.­<,±=.·A3¼D6ÆLAÞbZâc]ðnlôrrå`cå`eæ`gúixûozõltí`hñ^fÿkqÿw{ÿ{|öpqø^hö@Wý>]óOh懠•ƒX†aXuE\vIgwP‚ˆfµ±–éáÌÿùéÿüíÿýñþÿóûÿôøÿöôÿóíûìäòãÝëÜÁëŻ㾺޺¿Þ¼ÆáÀÍâÃØæÌãëÓìîÙôñÞøñßóêÛìàÒèÚÍìÜÏñáÔòçáòçáóèâ[OA[OA[OAZN@ZN@YM?YM?YM?XL>XL>WK=VJPI?QI>SK>UL;XM9YM7YM7XM;WK=ULGYSWc_nmkƒtt–|~§ƒ†³†‰²‡Š·ŠŒ¿‹ÈŽÏŽŽÔÕÓ”Ó‹Ê‚‰¿{‚¶u|²ov­gp«ck©€n~ey­ZvÏMoê?cú2Vÿ0Lû6Gð@CâGBÙLB×MCÝIGèCJõÍID¸<4¯5*ÉI@ÕLF×CAÜ>=Ý:;Û;;Ù?=ÔE=ÌH<ÇI;Á7*Á7*À8(¾9(¼9'º9&½:(À;(Ä;)Ê=,Ò<-×;.Ü8.á6.ä6/è5.ê24è.1ê+0ð/2ö37÷69î45æ21Ø/,×31Ô63Ï42Î/3Ð/5Û5?ä=Gõ,2ñ.2è2/Ü3,Ñ5(É8'Æ;&Æ>(Ä9$Æ8$Ë8&Ò:,Ø?1ÛA5ÚB5ÙA6ÎI8ÇB1¿<*½:&Á<)Ã?*Å<)Ä9&Ì;*Î6)Î0'çB<Ý1/ñ>Aå.2à'-Ò3-Ó4.Ö71Ö92Ò8.Í5*Æ2&À1#ÎE5ÆA2¼=.µ:+±9)®:+ª:,ª:,ª/«=.«<+¬=,°?/µA4ÉSGàg^ßd_èkiînoæchðjqõoxüp}ýt~õmwîcj÷dlÿqzÿw|ûsuökpöXfûAYÿ:[õKfâ}…©˜†l”ojŠXo‰ZxŠ`—r¶·˜âÜÂúôÞüúåÿÿïûÿïõÿïîÿëçúäÜïÙÐãÍÉÛū٫¨Ó¦¨Ñ¥¯Ô©¶Ô®¼Ö±ÇÚºÒßÁàæÌêéÔòíÚòéÚïáÖìÛÑëØÑíÚÓèÛÒæÙÐåØÏZN>ZN>ZN>ZN>YM=YM=YM=YM=XL@çE@ÝJBÚKCÞHGéBLó8ÏE;ÆF9¿E6Á8(Ã:*Â:*¿:'½8%½:&¿:'Á:&Ä9&Ë:)Ò;*Ù9+Ý7+á5+ä3+ç4-í)-ò)/ù,3ÿ.4ÿ07ÿ18ÿ28ý58ú7;õ8<ò9?ò9Aô9D÷6Gû6Hü5Jø)1õ,2î02ã4/Ø7-Ï9*Í<+Ì=,È7&Ï9*Ø2á?4â>4â?6â?6ÑN<ÍH7ÇB1Â=,¿:'Á:'Å9(È9)Ç3%Ó9/á@8ëD>Þ0/á-.ì38í38×4-×6.Ù80Ø:1Õ;1Ó;0Î:.Ê:/ÖL?ÌF:¿?2´9*¯7)«7*©8*¨8*ª<-¬>/­?0­=/«<+«<+­<,¯>0ÀKAÚc[Ýc^èkiðosëhnõrzüvïer÷oyør{öjsÿlvÿvÿu}öioõfl÷RbÿA[ÿ6YôFaÝt{²›‰€¤~z›f{—f€–h‘u­±ŽÌË­áàÄéëÓî÷ÜåóÙÙíÑÎçÉÅÞÀ¼Õ·´Ë®®Å¨•Ã’”‘˜Ä“¡È™§Ë¬Ë¡µÎ§ÁÒ®ÎÙ»ÙÝÄåãÎìåÕïáÖëÚÒçÒÍäÏÊÞÐÇÚÌÃÕǾ[N>ZM=ZM=ZM=ZM=ZM=YLXL>YNø<=íA=äE?àGBãDHèAKï=Mô:OÒBAÑGDÅA<ÂH=¯;.°5É83È.,Ç)&É.*Í:3ÌC9ÂD6¸@0Ã:(Ã<)Ã<)Á:'À;(Á=(Â;'Ã8%Ä6"Ê7%Ô8)Ù7*Ý5(á3(å3)è3*û03ÿ58ÿ7<ÿ38ÿ,2ÿ&-ÿ'-ÿ)1ÿ,3ù'0ô%/ú'6ÿ+=ÿ(Aÿ:ú2ö".ô&0î+1æ0/Ú1,Ò4+Ï5)Ð6*Ô6+Ü90æ>5ì>7ë:4é61è50é61ØL?×K<ÒF7Ê>/Ä6(Â3%È6)Í9-Í5*Ô6-æC<à74à21Ò ì89ê35Ó2(Ô3)Ò4)Ñ5)Ï5+Ì5*È5+Å7+ãYNØRFÊH;¾@4¶=ê@AéBIêCMëANê>NÌA<Å@9¾?6µ?3®=/±=0¿E8ÒMDÇ61Ô;6Ï1.Í2.ÖC<Ç?3´6'·?.½6#Á:'Ã<)Â;'À9%Á:&Ã:'Ç:&Ë:'Ð9(Ô7(Ö3$Ú."à/%ì7.ô=5ø72ù30ú.-û)(ý%&ÿ#%ÿ"'ÿ"'ÿ$*ù )ú!,ÿ%7ÿ'<ÿ;ÿ4ÿ3ý)7ð".ç"+ä*-Ý--Ó+(Ò-)Ü41â62é54ï64ó55ó12ñ-.ï+,í++Õ<4Ò91Ñ:1ëTK»"Ä+#ßF>È.&Ì/(Þ<7èE@â:7Ø/,Û.*ã41é:7Ý?3×;.Ï5)Ë3&Ì5*Î:.Ë;0Æ8.ìbWàZOÈD8¹6,º:/·9-¯3)²6,¯1%°2&®2&®4'¯7'²:,²<.³=/°:.ºC;Ö\Wìppñsvøv~ûyƒõq|ÿ{„ûx€øu}üs{ÿr~ÿq}ÿlxûisøbmôI\ÿ=\ÿ8[ñ:VÖek²–‡¦}~¡i|šd}•c‡—j”ŸuŸ¥ ¨ƒœ¨„’£Š£|€Ÿvx›qw›o|r t„£w¯uƒ³y‰¹½„“¾†—¾‡œ¾‹¢½§¼“¯½š¾Â§Ï̹ßÓÇãÒËÜÇÄÖ¾¾Ê»´Á²«¹ª£ZM1ÐB6Ü?6è?8ôA=ö=;ø:<÷:@ô7½=4¶<1°õ6;ú3:û06ú-2û.3ý14þ36×4/Ü:5Ù72æDAæDAÎ/+Ñ2.Á"Ö41á?<èE@à=8Ø3-Ù2,Ý60à91Ò<-Ï9*É5'È4&Ê8+Ë;0Ê<2Æ9/ícYáXNÉ@8¼3+À:1Á;2½7.À:1Á4+¾4*½4*»5*¸6(´6(²7(°6)´;0»B9ÓYTèllïqtöw~þ|†øv€ÿ|„ûyøv~þuÿsÿo}ÿiwùeqùanöI]ÿ<\ÿ9\ô=YÕdh«y€œsu˜`t’\w]cŠ•k—p‹•p…”mp†_lˆ_fŠ\g^j_q•ey›i}l€­r„²tЏz»}½‘½‚–½„›»‰›µ†¡³­¶—¾½¨ÏÆ·ØÇ¿ÖÁ¾ÒººÅ·¶º¬«²¤£\L<\L<\L<\L<\L<\L<\L<\L/ÇE5ÐG7ÚC8ä?9ó=<ú9>ü9Aú:Eò>GæAH×@EÏ@B¿<4¸90±8-«:*¨9(«:*»?3ÏF<ÙD>Ø96Ú65Ü:7ÜC=ÝOEÍI<²4%À9&Á:'Ã<)Æ=+Ç>,È=*É:)Ì9)Ï8'Ï2#Ó/#ß4*î=3ô?6ñ91í2+Ú7&Ý6&à3#å/"é-"î+%ñ,&ò+(ó++ð(+ò'-ú(5þ%8ÿ5þ2ÿ3ð(5ô.;ô4?ò8Cï;Dðå+6ñ1<ô/9ù-8ù+5ù,3ø-1ö.1ö01Ù1.ä<9Û64à;9ÿljæBAÒ.-Ð.,Û97á?<àA=Û<6Õ7.Ô6+Ô6+Ó5*Å8&Ã6%Ã6%Ä8)Ç;.Æ<1Æ<2Å;1ëaWáTMÉ<3¿0(Ë;3Ï?6Î;3Ñ>6Ú=8×<7Ô=4Ï<2É;/Â:.»7*¶6)·;/»@8ÏTMãgeíorøz~ÿˆý{…ý{ƒùzúx€ÿwÿsÿl}ÿftøbnø]kõG^ÿ:Zÿ9\÷AZÐ_c›gkŠ^e†Oh…Ol„Rt…X{ˆ\}ˆ^x„\q‚X`yO_P`†UeYm•`uœg{ j€£m­p…±tˆ¶v‹¹y‹¹yŒºz‘º~”º‘±•¬€›©†©­’ºµ¢Ç¹°Ë¸²Ì´²¶­®ª¡¢ —˜[K;[K;[K;[K;[K;[K;[K;[K;ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<]K=]K=]L<^M=^M;^O<^O<^O<`P@^Q@]P@\NC\NE[NF\OI]PJ`NdcSmfX{g^‰ohœzu¯„|¸†{µ™…º¥…´¯€ªºy¡ÈxŸÓušÍc‹¾OyêAFà@@ÕA=ÌF;ÈJ;ÉJ;ÐF9ÜB:î@?ø;Aþ:Dü7õ>8ð50è-&×:)Ú8)Ý5(à2'æ/'é.'é,(é,*ç+*å(,è)1ï+7õ';ö";ú=ÿ"A÷8Gä(6ç/;ÿP\ÿ`lÿP\ò^N>^N?^N?_OB`PC`OEbM\cPdcUodZle‘vr¤~w«‚v¦“~©¬†«Â‰©ÐžÛw“âk‡ÝXuÓFfÿ=MüDPðJNÞJHÌG>ÇG<ÍG<ÙD>èBBó>Cù>Gø@HðCIÞDDÍB=À?9½A5µ=/®:+ª;*©:)­9*º<.Ì?6áFBä<;ïABíAAÞ:8ãJBæXLÔL>È@0À8(»3#Á8(È<-É:*Ë7)Ð8+Î0%×3)à8/é;4ï:3î50ë0+è+'Û4,ß4-ä2.ë31ð43õ45ö58õ6;é/4ç.6ê0=î1Cò.Fõ*Gý,Lÿ1TðPî3Dî2Aî3>ê5<æ89Ü73Ð3*Ç/$Ì2*È-(Ñ61óXT÷\ZóXVÜ@AâHHÜB@Õ<7Î70Í6-Ï8-Í9+Ê7'Æ3!³:%²9$´;(¸=-¹;-¶6)»8.Ä>5ÛNGÙEAÎ50Ð1-á>9è?:ã81ä71ð/0ï11ì42é73â92Ø:/Ð9.È:.¾6*º7-ÈIBÜ_Yënlû}€ÿ…‰ýƒõv}õx~ùzÿx‚ÿsÿj{ÿdtö_nðUeôF]ÿ6Vÿ7ZúF_ÀTRvaBJoRÿ-Hÿ:QþCTéDKÒ@AËA>ÎDAÖEBãEFêAFï@EïBFçDEÚEAÉC:¿?4º@3±;-©8(¨9(©:)®9(º:-Ë;3èIEë??î;>æ68Û2/ÞA:îZPõg[ÙQCÉA3¾4'À6)Ç9+Ê8+Í6+Ò8,Ñ0&Ü5-æ;4ë:4ê40è/,ê-+í-,ó4;õ3;ø3<þ2=ÿ1>þ0=ý0?ù0@ô1Añ2Dò5Kó5Oó0Põ-Qþ1Xÿ:dá7B÷O\ÿanÿ`nþXfùQbòEXé8Jó@Sê:GÝ2;Ò/2È3-Á9-º=+µ>(Æ9/¿2(ÙJBúkcÝLGáPMÍ<9Ï;9àLJÔ@<Ê7/Ê7-Î(«;%­=)²?-±9)®4'º:1ÊC=ÕHAØC?Ô72×2.ç;7ì:6è2.ë2-÷)+÷+,ô.-ð3/é61â:1Ú<1Ò>2Â6)º4)ÅB:×XRçjhú|}ÿ†‰þ€„õv}öyú{‚ÿx„ÿqÿh{ýbtõ^oîSe÷I`ÿ9Xÿ9[ûI_ºQNmZ:Em8ZvCa|InSv†Y|‡]Šbg‚—lœl{ m|¤o}¨p~ªo‚ªnƒ©l…©lˆ«qˆ®qˆ°r†³r„³oƒµn„¸p‡¹t‹µv‰¬tŒ¦wš¨„°´™ÈïØÌ¾àÏŽÃÓ«±Á›¡±ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8[L9[L9\M:\M:\M:`J<`J<^K<_L=^M;_N<_N<^O<^O<_P;_P;aPHÿ$Hÿ0Qÿ;UñÇA6¾>1·?1¯9+¨7'¨:)¬=*²=,À>1Ñ>7ß=:ç79æ/3ã/0á32Û94åNEülaïj[ÙQCÆÍD>Á61É;7ãUQÕF@É91È8-É:,È9(È:&É;%ªB)¦<&¦<&¬=*©8(¬3(¼=4ÒMFÕGCÝEBÛ96Ü30é73í41ì/+ó2-ÿ)/ÿ*/ý--ö0/ï4/è7/ß;1Ø>2É:,¼4(À;2ÏNHßb^÷yzÿˆŠÿ„†ùzú}ƒü}„ÿx„ÿn~ÿdwù^pò[léN`öHaÿ8Wÿ7YøH]²JGcS1Al6ZtDf~NuˆZŽc…f‡’jˆ—n‰žs‡¤t‚§t§r}¨p}©n©mƒ©l…©k†§n‡ªp†¬o…¯o°l³k‚¶n…·p‡´s‡­rŒ¨wœ¬…²¹šÈƱ×οÞÐÅ·¿Ò¤¬¿’š­ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8[L9[L9\M:\M:\M:`J<`J<^K<_L=^M=_N<_N<^O<`Q>aR=bQ=bQ=bR;bP:aO9`N8jNMgNRbQ[cWkjfuv’}}™y‘’{¯ŒËƒ‡ã{|ùqsÿgjÿTXÿAGÿ#Mÿ.Tÿ7Wù9Pé>NàEM×EHÑ?B×BDÚACÜ@AÛA?ØC?ÏB9Å?4¿=0·?1¯9+©8(«=,°A.·B1ÇC7×D=Ú64å57ã,0ç02è88Ó0+Ï5-éUKÿznæ^RÎD7É=0Ê<0É6,Í6+Ö90Ú70ß82ä71ç40é1/í10ò53ø87ÿ=ÿ>ÿ>ÿ>ÿ=ÿ=ÿ<ü=ò:ï@ð$Ið&Nï$Qó%Uÿ0eÿ=sÿgrþalôXeîR_ïQ`îM]â?RÖ1Bß:JÑ4?¿-0±-(¦5'ž>&–C%E"¯7&²9(ÒWHº<0ÁA8º7/º3/ÍC@ãXSÕHAÈ91Ä6*Å6&Ä5$Ä6"Ç9#¦B*¢<%£:%§<*¦7&©3'½A7ØSLØIEáGEÞ:8ß2.ê41î1-ï.)ù4.ÿ'-ÿ',ÿ)+ö*)í-(ä1*Ü5,Õ9-Ð>1½3(¼7.ÉHBÙ\Xôwuÿ‰‰ÿ‡‰ý~…ý€†þ†ÿx„ÿl|ý`sõZlïXiãHZóE^û4Sÿ3RóCX«E@\L*?j4Uo?d|LwŠ\†“h‹–l˜pŽtŽ£xŽ«{†«x©t|¨mz¦i}¥g¥h‚¦h…¤k…¦m„ªm‚¬l®j}±i€´lƒ·oˆ·sˆ°tެxœ®„²¹šÄ«ÐǶÖÈ»²½Óž©¿‹–¬]K7]K7]K7]K7]K7]K7]K7]K7^L8^L8^L8^L8^L8^L8^L8^L8\J>]K?]M@\L=ZM=ZO=\Q?^SA_T@_R?^Q@aQAcRBdQCdNAcM@pKEjKIfOUgZknl„v|ž}†¯ƒŠ´Š…®Ÿ‰­¸Š¦Ìƒ”Þ{~îumøl]ûfRðN[æDQä>LéANïCQí>Ké:Gê4Á;/¼8+ :$¬C0¬=,®6(Â?5ÑD=Ð;5Ó61Û83Ü71Ý6-Ý7)Ü9(Ý='Ù;"Õ7à74õPLõXOÛD9Ç8(Ì?.ÒC3Ñ;-Ò4+ðGDâ.1ï4;ö4?ï+9ÿ@Qí(9þ&+ÿ*-ÿ*-÷"û#$ÿ()þ((òð"ú+1ì )î&1ò.<ç$5ÿYnë+@ÿ`jÿ^iÿYcûT[öPTìHIÛ@;Ê:1ÅA2½F2®D.Ÿ;$”5–7#˜;)œ=+§81«83ÁEC¿;9¾23Æ45È44×CAÜKFÚKEÑD;È:0Ä4+È4*Ì3+Ì2*·?1³9,®.#­'¶,"Æ7/ÓC:ÚG=äPFßE;Ù80Ü1*ç/-ô01ý/3ÿ.4ò14ó12ô01ó/0ó0.î1+é4+à8-Ö=/¾2#¾?0·>3Õ`Wçtqÿù…†ôŠŒþ…Œÿwˆÿe}ÿ[wÿXuÿSoûJgûDcö7Y÷9]ç>[Ú]k„C=PI/F`;Xw^N?^N?[N>ZO=\Q?^SA_TB]QA]P@_OB`NBbPFcOFcOFkLGjMOgS\h_rnoŽw~ª~ˆ»…ŠÁ›–Ì¢Œ»«£»wŽÕx‚í|x÷uhöjYüZgóN\ìFRòHUöJVõERï?Jë;Eä9Aà:>Ú::Õ=:Î?7Ç>4À+ª?-¨9(²:,ÁA6Å<4Ç7/Õ<7Ó40×4-Ø4*Ø4(Ú7&Û:&Û;%Ù;"Þ52æA;ëMDàI>Ð>/Ç8(Ê8)Ó;.Ý<2öJFæ/1ò5<ø6Aò.<ÿ?Pì'8ö$'÷%(û),ý+,ü*+ù'(ø((ø*,ð$'í%(ê%,þ:DÚ'ð4CüATÞ#6ÿluÿblþZcüW]õOSæBCÙ;8Ñ>6¾8,¾E4¹H6¨?,–1)Ž()ž-'°:6ÑTRÎHGÃ54Æ45Ò<=ëWUØGBÖGAÏB9Ç9/Ä4+Ê6,Ð7/Ò5.Â?5À:1À5.Â3+É4.Ð83Ø?9ÞE=ãJBÞA8Ù6/Ü1*æ0-ó11ü03ÿ.3ò14ó12ô01õ/0ó0.î1+é4+à8-×>0¿3$¼=.¶=2Ó^Uévsÿù…†õ‡Šþ‚Šÿu…ÿe|ÿ[vÿWtÿQoþIhúAaö8Zö=_æF`ÅQ\{?7NH.Ga>Yx=e‡Ks•Yx›awbz¢f|¥i}¦j|¥i|¥i|¤h{£e{¡d}¡c}¡c¡d{¤l}¦n}©l}ªi}ªe}­c¯c‚±cƒ±f‡²k‡¯pˆ«u‹«|¬„©‰‹¤†z…‡doqR]_]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8^K<_N>aP@`P@]P?[O?[O?[RC[QE[QE\OF\OG_PKcQOfTRhTUiTQiVXi]kmi„sv¡zƒ¼ŠÍ‰Ö—‘ÙŸ‹Êª‚¶º}ŸÒ‘烅ð~tïveÿ`k÷S\íGQðFQöHR÷EQô@Kî=Gå6=à7:Ù99Ô<7Í@7ÅA4½?0¸=-©@-¨=+ª;*¸B4ÅI?À;2»0)Ì92Í6/Ò5.Õ7,Ù7*Ù7(Ú7$Ü:%Þ<'ß3/Û4.âA9éOCÜH:Ç6%Æ3#Ù@2á>5õHDé13ó4;ú6@ø4@ÿES÷3Añ),í"&î#&û03÷--ï''í%%÷12ì(*ø7:è+1â)1ë3?ÿR^ï=KÿYiúafñV\îOTðMRêEIÞ:;Õ74Ô?9À6,¿?2»C5²>1ª8-¥3)Ÿ,%œ' ˜% §0*ÆFCÂ::¼,,È44×ABô^]Ò>:ÒC;ÐA9Ë=3Ì9/Ô=4Ú@8Ý@9ÙA>×=;Ü>=ãA?ã?>à;9ã?=ëIDàA;Û=4Ø5,Û2+å2-ð31÷12ú/2ó04ô02ö01õ/0õ/.ð0+é4+à8-Ø?1À4%¸9*´;0Ð[Rízwÿ’’û‡ˆøƒ‹ü~‰ÿr‚ÿcyÿZtÿTqÿMmÿFgü=_ø:^ôBbåQg§?Fn<1OK2KcA[z?h‡Lr“Zu˜^tš_wŸc{£gz£gy¢fy¢fy¡cx byŸb{Ÿa| b}Ÿby¢j{¤j{§h{¨e{©azª^|­^®`…³hеnвs‰¬t†¦w‚žvy“pn‡gVb`COM4@>^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^L6`N:aP<`Q>]P?ZN>YPAXPEXOH[RM_UTcWYeX_iYcl\fm]hlbclemolrtšx¶~†Ï„ŒßŠŽç‹‡ÞŠÙ¬‰É³­½y’Í{ßyê†vÿnrÿbgùU\öLUöFPöBMó>Gð;Dæ5;á7:Û97Ò=7ËA6ÄB4»B1·?.©;,­=/¯>0»G:ËRGÇH?¹6.º1)È91Í81Ó;0Ú<0Û;-Ù6%Ü6&à9'á40Û2-à=4ëOCãK=Ñ;,Ð8*àB6Þ7.ð>:é/0ò16÷4<ü8BÿNZÿKWý>Cò38â$&í/1ê,,ð22ç+*é0.ò::Ñæ37Ü-2ç9BïENÿYcôLYÔ?AÚADßCFá>CÞ9=Ü89Ø88Ó:5É83Â91½:2ÀA:ÍNHÖVSÐNNÆAB¯82µ:5ÏKGØNLãQRïYZêRQñYXÉ51Î>6ÑC9Ð@7Ó?5ÚA9àC<àA;íCñ:?é58í=?øLJà93Ú70Ø4+Ü3,ã5.ì30ò21ô01ô04ô02ö01ö.0õ/.ñ0+ê3+à8-Ù@2Â6'µ6'²9.ÉWMî}yÿ“’û‰‰þ€‹ý{‡üoücwÿXqÿNmÿFhÿ?cþ8\ù=`íIdÙYhˆ25d<0SQ8TgG`}Ej‰Ps’Yt•\u˜^wby¡ey¢fw dv awŸavž`xŸ`zž`{Ÿa| by¢hz£g|¦fz§bz¨_z¨]|«]~­_†²eеmŒ³rŠ­s†¦u€œstŽii_RaZDSL8G@^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;_K2_M5aO9_P;\O>ZN@XPEXQKYQO^X\g`hnfsshysg{sg}tfnnzor…rw•v|¬y‚Ã~†×ƒŠåˆ‹ì’뛌ߞƒÆžt¢¡kƒ®mq¾vjÈ{iþllÿklÿfiÿ]`üQWöEMð;Bí5=è59ã68Ý98Õ>7ÎA7ÅC5¼C0¶A-¬8+´@3¯;.°;1ÇRHÓ]SÈNCº;2¾90Á7,Ì9/Ö>1Ý=1Ú6*Ü4'á7(á2-ã60ä=5åE9âF9ÜC3ÝA2á?2Û0&ì62ì0/ð-1ò-4ú7?ÿOYÿZdÿ[_ÿOSá.1ã03ß--÷EEè66Ü,,Û-.ë>@Û25Ù37ÿchÞ=CÊ*2Ê-4¾()Ô;=àAEÚ7:Ù37á8;Ü89Î..Ì43Í<9ÓHEÝSSì`c÷hnõdkî[e¿B<ÆE@å^[÷igÿopÿjjåKK×=;É4.Ñ>7ÕE<ÖC;Ó?5Ö<4Ø93Ø7/ö0=ò,9ó+6õ-8ò*5î+3õ8<þJKà3/Û4.Ø4+Ü4+â5.ê40ï4/ð3/ö/4ö/2÷/1ø-0ö..ñ0+ê3+â7-Û?2Å9*²3$±8-ÃNEî}yÿ’‘üŠŠÿ}‹ÿw…ùl|öatùUmÿHgÿ>bÿ8_þ4\õ@aâMcÂWap/+\A0XX>]lMbIl‰St’\u–_v™_xžcy¡ex buŸ`uŸ`u_vž_wž_zž`{Ÿa| by£d{¥f|¦dz¨`y§^y¨Z{ªZ}¬\€¬_…¯g‡®m‡ªp…¥sƒ t{•nrŠffvi[k^RbU_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<`L1aM2`N6^O:[N>YOE[RMZTT_ZahbprmzuŒ{t“yr“zp“yo”ov’pyšt}¨w€·zƒÈ~…Õƒ‰á‹‹å”ã—ŠÒ™„¼¡ƒ§ª„“«~yŸl[ŽX>ÈH?ÕPIäVRìVUòRRôJMî=Cè38ì7<ç9;à;9Ø=8ÑA8ÈC4¿B0¹@-³9.ºA6«5+£.$¼J?Øh\×eZÊVI·=2¸6)¾4)Î:0Ù;0Ü5,ß3)ä6+á/+å61ã;2Ü:/Ü?0ãF7ãC3ß9+ß1&ê3-ð31ï-.î*.ô17ÿEJÿS[ÿ_dÿ\aâ9<â9<Õ+.ôJKâ89×//Û55Ì()Ë(+÷YZÛ?BÔ9=Ð7:· %Ã))Û=>åBEÝ49Ù,2Þ17Ú/5Í(,Ò37äKNöaeûhnùcl÷_kû_mý_nÒNIÔOJè]ZêVTçMMãGHÑ32Î31ÙA<àKDãPHßKAØA8×:3×50Õ2+ÿ,;þ+:ü(7ø%4÷'4û/:ÿ=CÿILà1.Ü3,Û4,Ü5,á4-ç4-ì5/ï4/ö/4÷/2ù.1ù-0ø..ò/+ë3+â7-Ù=0É;-³1#°7,¹D;ìyvÿþŠ‹ÿyŠþqõhxó`söTlüCcÿ7^ÿ3_ÿ3\óDcÒM^ JMb6+TE0W[@^kMc~Kk‡Tt‘[w•_x™`{ždz cvž`s›]s›\s›\tœ]v^wž_{Ÿa| by¡bz¤b|§b{¦_x¦[x§Yz©Y{ªZ~ª]ƒ­e…¬i†ªm‰§s‰¥u„s|•mv‡unmfwe_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<^OÏcWÔh[ÔfYÁPB¹?2¹5)Ç7,Ô:0Ù5,ß2+ç6.ã0,ã4/â7/Ü8.à>1åC4â?0Þ4'æ4*é1)ò2/ð..ï-.ò14ô68ü?CðOTúY^éFKõRW×47ëFJÝ8<åBEÚ7:Î.0Ð15ãIKÑ8;Î8:¸#%Ñ<>Ü89ä;>ê=Aç6<â-4Þ)2â19çÿ/>ý)7ÿ-:ÿ9CÿAHûABã1/ß4-Ü5,Ý5,á4-æ3,ì5/ð50÷.4ù.2ú.1ù-0ø..ò/+ë3+ã7-Ø:.Ì>0´2$±7,±<3çtqþŠŠþŠ‹ÿr†ýj}ñbtð]pôRjûBbÿ6`ÿ5aÿ8_ïKfÁN[z;6Y?.LH/TZ@]cIbzJj„TrŽ[v”^yšc{ždxžas›\p˜Yp˜Yq™Zq™Zt›\uœ]y_zž`x¡_y¢^z¥^y¤\x¤Wv¥Uw¦V{§X~ª]‚¬d„«h†¨l‡¥o†¢r€šmx‘gr„lk}ecu]_O?_O?_O?_O?_O?_O?_O?_O?^N>^N>^N>^N>^N>^N>^N>^N>eQ6cR8aP<]P@ZPG\TR_Zab^otrŠyx˜€¨ƒ°~~²yx±wv°xw³t}Âw€Ã}…Æ‚ˆÆ…ŠÂÀ—–¾ ¼¬§»¶¬´¾³¯È¸©Ð¿¥Õ¡ϼ”Dz‡·kS®\F¤G5©=0ÂH=áVQðVTòNOì?Aë=?è<<ä<;ß=:×=5Ï;1Ë8.¿82Á<5¹:3·>5ÀPDÅYMÅ]PÎgXÐdWÁM@º:-Å8.Ò91Ø3-ß2,è50æ40á2-à5-ã<3çC7æC4â:-à3%ê5*è-&ð0+ð.,ò21ò44ç.,è00áEIõY]öW\ÿpuåDJéHNÞ=Cü[aÿouÝ>Cÿ~‚ÿmqêQTÔ>@Å02Ñ<>øEIî9>ð7=ø=Fô6@è-8ö>Jÿ\hÿmwÿitÿdl÷]gú^kÿapÿ]nüWhî_YãOKâJGÕ74Ò0.Ù54Ó/.Ø95ßD?ãJDáJAÙ@8Ó6/Ö5-Ü71â94ð$0ý/<ÿ1=ø*6û/:ÿ>Eÿ>Cì44â3.Þ5.Ý6-Ý5,á3*è3,ï4/ò5/÷.4ù.2ú.1ù-0ø..ô.+í2+ä6-×9-Ï@2µ1$²6,°7/èpoþˆˆÿŠŒÿkƒücxð]pïZnôPiýAdÿ7aÿ8dý=bæPi°QW^2'RG3DH/PV`P@`P@_O?_O?_O?aQAbRB_O?]M=]M=aQAcSCbRB`P@eS;aP<_O?^QH[QOZSZeapsq‰xxšz|¥~€±€¹}¼xy¹rs¶no²qwÏv{̓̋Ȗ—䤾²±¹½¸²ÌŲÓÍ­ÙЩÛУÛÑ ÝÑ¡ØÌšÒÆ”Õ¦Š·gŸ_FËzgØte¾G?ØQMøbaìILç>Aä79æ9;ã99Ü75Ù61Û94È95À50ÇB;¹=5¾I?ÄXK·PAËeVÎdVÊYKÃG;Ä:/Í6-Ù6/â5/å3/á/-ß2,â70ä=4à<0Û8)Ý5(å8*å/$ê/(î.)ð0-ï20ë40è51æ40Ó8<åJNõY]ëOS×7?×6>ùX`ÿ~†ÿ~†ÿowÿgoÿipÿfjõ\_ïY[ô^`ÿRYÿCKü8Bü7A÷1>ï+9î/>ñ=IÿS_ÿ`kÿgpÿepþboÿbpÿ`oÿ[lìTOßFA×85×31Ù10×/.Ú21Ü86áD=ÜB:Ø?7Ö<4×90Û81á83ä84ô5=ó4;õ3;÷4<ø5;ó49ë33ã1/Þ3,Ý6-Þ7.à5+ä3+é2,ñ1,õ2.ø/5ø03ú/2ú.1ù//õ/,î3,å7.à@4Ë9,½7+®/&·<5ÒXWÿ˜šù~ÿhÿe|ö]rîRhòHeÿAeÿ9bÿ5`üJlÕRd‰==K. >>&?I.IO5]]EWlAcxMqˆZx’by–`t•\r–Xq˜Wl•Sm–Rn—So˜Vr™Xt›\uœ]uœ]tœVtWv Xw¡Wv¢Uv¢Uu¡Tt S{¥[{£\zŸ\u—Zn‹Uc}MXrCSj>AW1?U/`P@`P@`P@_O?`P@aQAbRB`P@_O?`P@bRBcSCbRB`P@fVF_QD\OF_TRcZ_f`nmkƒwv˜wy¢{}°}¸x|»qt·lo¶ln¸oq»suÙ|}Ù‰ˆÔ˜—Ш§Æ¹¶½ÉƵÓÏ©Ý×£âÜžçßžæÞäÜžâÙ ÙÒœÑʖѼ¸€¦~dÄ‹wÉ}m¶VJÓ`Y÷qnîZZêJLä>@é<>ì>@è:;ã56á34Õ=:Ë73Ê?8¹6.·>3¼L@³I;Å^OÛp`ÒaSÄH<½5)Ä0&Ö5-Ý4-Ü/)â43å95å<7à<3Ü8.Ù5)Ý5(ã5*í6.ï4-î1+ë0+ç0,ã2,á4.Þ5.Ò9;×>AäIMóW[ü\dü\dþ]eÿ`kôR]ïMXñQ[ÿ_gÿjqÿflô[`ëRU÷07ó+5ô+5ù-9ó&5è/ç'6í7DüP\ÿ[dÿclÿemÿepÿdoý[hõP^åFBÞ<9Û64ß63á53Þ20Û2/Û62à>9Û>7Ö<2×:1Ú91ß82å95è96é9;ê7:ë7:î79î79ì57å31Þ3,Û4,Û7-Þ7.á6,å2+ì1*ó0,ø1.÷05÷03ú/2ù.1ù//õ/,î3,ç6.ß=2Ò>2Â8-µ2*·82ØZ[ÿ“õw{ÿa{ÿ^v÷WqöOkøFfý=bÿ:cú=cëLhºJVw<8F5#7=#9C(DH/UP`rJnƒXw_v“]t“Zp”Vn•Tk’Ok”Pl•Qm–Ro˜Vr™Zsš[sš[tœVuWuŸWuŸUtžTržQqPq›Qn˜Pl”NhŒLbFXu?Nh8F]/@W+@W-@W-AX.YL<[N>^QA^QA^QA^QA_RB`SCaTD`SC_RB`SCaTDaTD`SC^QAbUM^QK[QPcYakesqm„vu•y{¤y{®y~¶w}»ns·ei°bf°jn¸rvÀ}zᇃᖔߩ§Ù¼¸ÏÍÊÃÝØ¸çá­êå¡ïéŸðêžíæžéá¢âÛ¤×Ï ËĘ´°“¦œ˜„k§„p¥p`œRG»]UÞmi÷usð^_çHLæ@Dí@Dí=@ë7:ç36Ü>;Ô;6ÔA:Â70·7.µ?3­=/µG8Új\Þj[×\MÊB6Å2(Ñ4+Ú6-Ú1*Þ44éA>ìGCà=6Õ2)Õ1'Ú2'Þ0%è3*é1)ç.)æ/)ã2,â7/á=4âA7Ã-,Ê43ÜCEðVXú^bùYaóS]òP[èFQêHSðNYü\fÿmvÿmtôY_ÜAGó*2õ,4ý1<ÿ1>÷*9ï&6ö6EÿJX÷ISõOY÷W_ü_fÿdkÿai÷Q[éBJÞ95Þ63ã75é<8ë<9ç85â51Ý60Ý:3Ù;2Ö90×90Û81á83ç:6ì:8à;9â:9ã99ç98è88å84à40Ú3+Ú6,Ú8-Ü8,á6,å3)ì/)õ/,ú0.ô15õ13ø02ù.1÷//ó0,î3,ç6.Ý9/ÛD9Æ9/»4.´0,â`bÿƒˆônuÿ_zþWsúPmþLlýDfø8_ö9_ðGf×ReDJi=4K@,7@%8@(ED/LE2N^9YkEg|Qr‰[tZqUmRkMi‘Kh‘Ki’Lk”Pm–To–Up—Xq—ZuWuWtœUrœTpšRm—Mk•Kj”LdGaˆE\~AUt;Li3E_/AX*>U'B\/E_2Ic6WJ:ZM=\O?^QA]P@^QA_RBaTD`SC`SC`SCaTDaTD`SC_RB]P@YNR[PVbXcjcsqm†vu•xz£z|­w|´sy·mr¶bi±]c­ag±lr¾v|È‹‡æ”‘褡淴áÇÄ×ÕÒËáÞ¿èå²ëç¨ïê¦îé¥éã¥ãܨÛÒ§Ëß¾µ–Ÿ§˜š…‰v—‚q—se™cW³i`Ïrmû‹‰õutë[[çKNéCGî?Dî;?í8=ß:8Ý;8ßD?ÓC;Ã:0¹;/¯7)¦2#¾J;ÚbRék]ÛSGÉ9.Í3)Ö5+Ø4+Ù33ñMLý[XíKFÙ80Ö3*Û4+Þ2(à-&á,%á,%ß,'Ý0)Ú6-Ø<0×?2À0(Ä4,Î:6ÙCBßFHàEKäGPìLVñQ]öVbøXdû[gÿgpÿmuôY_Ø=Cñ.2ò-4ô-4ò*4í%2ì(6ûô@?ð<;ç85à72Ü92Ø:1×90Ù80Ü71ã73ê86ì87Þ<9ß;9â:7ä;8æ:8ä84Þ5.Ø4+Ù7,Ú8-Ü8,á7*å3)ì/)ô/)ù/+ó25ô23õ12÷/1÷//ó0,î3,ç6.Ü8.ßG<É90¾3.´-*îfjÿy€ójrÿ`{ýTqþKkÿFjÿ=cö3[î<^äPhÄXe…DBbE7WP=DH1@D-JH3JB/IW4Sc?btLmƒUp‹XoŒRkŽNiŽKgIg‘Ih‘Kj“Mk”Pm–To–Wp–YtœVs›Uq™Sn—Qj”Lg‘IeŽHdG`‡D]AWy=Rq8Mi6Lf6Ne7Pe:Lf6Oi9Sm=UH8WJ:[N>\O?]P@]P@_RBaTD_RB`SCaTDaTD`SC_RB_RB_RBTLY`Xgnf{tp‰xt•xw¡xz«y{´sy·jqµ`g¯\b¬`f°kq»v|Æ~„Ε”äžžè­­é½¼æËÉßÕÓÔÝÜÊãàÁåâ¹çã¶æß³àØ³ÚÑ´ÐůÀ´¤¯¥™”œ‰ˆ†y‰}qwk›sk§ngºoi扄î~ósróedòVYòLNðCEî>Aå95â:7äB=ÞE?Ì<3Æ=3ÂB5­1%¬1"ÇI;ÛYKÖN@Ì=/Î8*Ò6*Ñ3'Ö34õUUÿkhú]XâE>Ü;3ß;2ã80â4-ä1,â1+Ý0)Ö/'Ì0$Æ/$Â0#Ã9,À4'Á3)Ë:5×CAÛEGÛBGÛ@HàDOìOZóVaòVaú^iÿgoóYaÝDIð88í55ï26ð18ò3;÷9CÿHSÿVaä6?Ý4;Ý7;êAFøKOüIMô;@ê05å61ë95ñ;8ó;9ó;9ð:7é73â70ß;2Ü;1Ù;2Û:2ß82ä73è64ì65á<8ã;8ä;8è:9è;7æ95á6/Û4,Ú8-Û9,Ý9-á7*å3)ë0'ò/)÷0+ð45ñ33ô22ô01ö0/ò1,î3,ç6.Þ7.ÞD:Ê7/¿1-¾21÷jpÿrzøhrû]vúPmÿCfÿ_L;_ZFQP;KI4PI6MB0DR1M[8[kFf|Nm…SmŠPlŒMhHfŽGgHg‘Ii’Lj“Ol•Sn•Vo•Xt™Vq˜Un–Pj’LfIcŒFaŠF_ˆDZ@X|?St;Pn8Pj:Tk=XmB[pEUp=Vq>Wr?RE5UH8XK;ZM=[N>\O?^QA`SC`SCaTDaTDaTD`SC`SCbUEdWG]Ulje|yu}yœzy£wyªvx±sw¶lqµcj²[c¬]e®hp¹w}LjІՙܡ¦à¯²å»¿åÆÇãÍÏÞÔÓØ×ÖÑÙ×ËÙÕÉ×ÑÅÒÉÂÌÂÀŹ»´§®¥˜¡‡Œ†xzuwvqulg~mfŒoib[œa[¾sm×zuï{ü|yÿrpýccöSTîHHñB=ê>:ã<6àA;Ñ:1ÒD:ÝTJÂ>2¸6)¼:,Â=.È?/ÏA3×C5×?1Ñ8*Ð23èLMú_]ñXSßD?Ø;4Û81à70æ92ç92ç92â92Ú9/Ñ9.È9+Ä8)®)¸3"È@2ÓI>ÒE>Ë;:Ì7;Ð9@Ï8AâHTïUaðYbõ^g÷`iêU[ØCIè?:ë?;ñAAúGJÿMRÿQYÿT]ÿV^á4:Ú/5Ú03ç7:ô=Aù:?ø48÷/2é61ï95ð95í41í1/ê20ç40á4.ã<4à=4Þ=3Þ;2à93ä73è43ë33æ:8ç98ê88ì89ì87é75ã4/Ü4+Û7-Û9,Ý9-ß7*ã2(è0&ï0(õ0*î45ð43ó32ó11ô1/ò1,î3,è5.à90Ù<3Ì70Á0-ÑAAÿnuýku÷coïSkóIfÿ;cÿ1`ÿ3bÿRJ7QF4MB0AL.GU4Sc>`rHgMj‡MjŠKh‹GeFfŽGfHgJi’Nk”Rl”Um“Vq–So”Qj‘NgŽKcŒH`‰E_ˆF_†G\‚E[~DWxAVr?Uo?YpB]rG_tKYtAYtAXs@NB2QE5UI9WK;XL\P@^RBaUEbVFbVFaUE_SCaUEfZJj^Nkg‚up|x›{y¡wx¨vw­pt±jo±ah®^f¯_g°em¶pxÁ~…͉ؖܙ¡Ï ¨Öª±Û´¹ßº¿ß¾ÂßÂÄÝÅÆÛÆÃÖÅÁÒÁºÌ¼³Æ»¯Å´¨¾¦˜±—‰¢†‡‰qqstpqogevhe†nj`Y”e_š[T·g`×tnî{vÿ{wÿwsÿhfù[ZÿQKöGBè=6èC=Ø;4ÛG=ê\RÅ;0Ä<0½7+¾6(Ç>.ÑD3ÔC2ÔA1×A0Ò8:Ø>@ÜDCÛC@Ö=8Ó91Ø7/Þ7/å:3æ93å:3â;3Û>5ÕA5ÑE6ÌG8¬.¼;%ÌK8ÑL=Æ=3»0+¿10Ë8>ÕBJáKVëU`ðZeð]eìYaßLRÐ?DÑ4+Ö8/ß<7ê@@ñDFôEJñBIî?Fâ5;ß26ã36ï8<õ79ù14þ-2ÿ.4ë40ð95ò64ì0.è,*è/,è2.á2-ä=5à=4ß>4ß<3ã:5ç85ì65í55ì57ì57í57ï56ï56ì42å2.Þ1*Þ7.Ü:-Ý:+Þ8*á3(ç1&í1(ò1*í55î53ñ42ó11ó1/ò1,î3,è5.ã;2Ò4+Ò;4Æ20çUVÿpxùcnñ[gãKbóEfÿ7bÿ+]ÿ1bÿ@hÞKe­RYd8/ZI7SN:UN;[P>VI8M@0MA1=H*CN.K[6Xj@ayGf‚HhˆIgŠFeŠDc‹BcEeŽHgLh‘Oi‘Rj’Tn“Pl‘NhLd‹Jb‰H_ˆF_‡H`‡H_…H_‚H]~I]yH]wH`wKcxOdyP[vA[vAZu@MA1PD4SG7VJ:WK;YM=[O?]QAcWGdXHdXHbVFaUEcWGj^NpdTvq‘yu˜xvtsŸrr¤su®lp¯bg«Za©^f¯em¸lt½u}ƈДڕœâš¤ÈŸ©Í¦°Ô¬´Ù°µÛ±µÚ²´ÚµµÛ³±Ö²®Ñ®¦Ë«¡ÄªžÂ¦˜»™‹®‹{Ÿ|y€dbgidhbY\g[[xeauXRe]ˆOHŸVO»aY×jcóvpÿ}zÿwuÿljÿZUÿPJñD>ôMGàB9ßF>êWOº,"¼2'½5'Ç=0ÑE6Ë>-Á2!É8%ÙF4ÞDFÒ9;Ë32Ë62Ó;6×<7Û<6á<6æ;4å82à5.Ø4+Ï5+Ê8+Ä<.Â>/ÑU;ÅI/»='½;+Ã=2Ä;5Â65Â37ÜKRÞLVâOYåS]éWaæU\ÝLSÒCGÉ5)Ð8-Õ81Ú64Ý55ß58á4:ß28å8<å6;ì9=ö8É53øceÿpyô\hêR_ÞHaõGhÿ:eÿ*]ÿ/aÿ@hÓE]–AFQ-!UJ8PN9OH5\O>YH8L<-NB2:D)?J*GU2Rd:]sBcEf†GeˆDcˆBa‰@a‹CcŒFeŽJfMgPhRlPkOfLcŠIaˆG_‡H_‡H`†I\‚G]€H]~I`|Ka{Ld{Of{Rg|S]xC^yD_zEAC8CE:IF=OH@RGAWI@]M>`O=aQ:aS9`T>_VGaZTfaeljwro€wožzt¢~wªzu«ro¨hf¥a`¢^^¦ba­hg·qoÃ|xÏ…€Ú‰ã—í–ó¢žÙ£ŸÚ¥¡Ü¦¢Ý§¡Ý¦¡Û¥ Ú¦žÙ¥Ö£œÒ¢™Ð¡˜Íž–É—ÁŒ‚´ƒy«mrvghlc_`e[ZlYUtUP€ULVK–RG¨ZN²ZP½\SÔmdç|tò…~üˆðxyõyyæabÜPQ×EEñYVÎ61È1(Ç5(Ä7&Â6%Ã8%Æ9'Ì:+Ð<.Õ?1Ô8+Ö=/Ø?1Ó;-Í5'Í4&Ø:.ã?5à90á90Þ7.×7+Ï7)È;)Ä@+ÁC,Ä;3È?7ÍD<ÏF>ÌC;Å<4»2*µ,$Ä>5ÍG>×QHÞXOá[RßYPÖPGËE<Ìÿ)<ö*6í.6ç48å;;Ü94Ü:5Ý<4à;5ã:5æ93é73é62ì25ì44ë54è64ä71ß7.Ú6,Ø6)Û9*Û:(Û:&Ü9&ß8%á8%â7#â7#í41ï4/ñ4.ó3.ó4,ï5)ê6(å8*à:.Ø7/×96Ý>BÿlyÿasþRlöGdÿIjû5Yÿ5]ÿ;eú=cãPj©LVT)":1 9<)EF4RL>PH;BC39E15K4FGHJ#MQ,U\:\jGcuOf}QeNc…Hb‡BaŠ>cŒ@eDjIl‘Nm‘Qj’IiFgŒFf‹Ff‹Hf‰Ic…Ic‚GdƒJdIc~Gc~Gd€FfFe~Dc|BX}8[€;^ƒ>[K>^M;`O;`Q:^S?^WGa\Vhcinlyrqƒtnšvpžtp¢pm¢gfŸaaŸ]^Ÿ\\¤ed°kjºtrÅ}{φ‚ÙŽˆà”Žè˜’ì›—Òœ˜Ó™Öžš×™Ö—Õœ–Ò•Ñž–Ñœ”Íœ“Ê›’Ç™‘Ä“‰»ˆ®€w¦tmtkdkf]`e[YiZSoWMzVJŠVI›UK°\RºYRÁXRÓf_Þqjãvoêwý‡…ÿˆ‡÷uuðfdäTSíYUÇ2+Â/%Æ7)Ã7&À7%Á8%Ä9&É:*Ï;-Ó=/Ö8,Õ9,Ó:,Ò:,Ñ9+Ñ9+Ô8+Ø8,ß;1à90Ü8.Ø8,Ð8*Ç:(¿;&¼;%¿4-Á80Æ=5É@8ÊA9È?7Å<4Â91¾5-Ç>6ÑH@ØOGÚQI×NFÌC;À7/Ê8Ñ9"Û8)å4,ï./ö*3û(7ÿ(:ÿ+Bÿ*Bÿ)Aÿ&Aÿ$@ÿ >ÿ=ÿ<ÿ8ÿ9ÿ$;ÿ);÷-9ï29ê7;å;;Ü94Ü:5Ý;6à;5ã:5æ93é73é62ì25í36ë54è64ä71ß7.Ü5,Ø6)Û9*Û:(Û:&Ü9&Þ9%á8%â7#â7#é4-ê3-ì4,ì4*ì4*ë5(æ6)á7*ÞcŒ@eDiŽHkMlPl’IjGhGf‹Ff‹Hf‰Id†JdƒHe„KdIc€HdHeGeGfEd}C\<_„?b‡B69.:<1??7E@:KB=OE/Ô>/Î6(Ë/"Ú:.Û7-Ù7,Ö8,Ñ9+É:)Â9&¼8#¾4*À6,Â8.Ä:0Ç=3Ê@6ËA7ÌB8Å;1Ê@6ÏE;ÐF<ÒH>ÑG=Ê@6Â8.Í6!Ô7&ß7,é3/ñ03ø,5ý*9ÿ*<ü'=ü'=û%=ù#;û!:ü8ü7þ7ÿ6ÿ6ÿ#8ý*;ù1<ñ6=é9;ã;:Ü86Ü:5Þ;6à;5ã:5ç85é73é62ï26î47í55ê65å61ß6/Ü5,×5(Ù9)Ù9)Ú9'Û8%Ý8%Þ7$à7$à7$â4+â4)å4*å5(ã6(â7&Þ7'Û8)Ý=1Ï2+×98ÿltÿ]nþPið=[ÿJlÿ5\ÿ=eü4[ô<`êTq«?Oa#(H1+79+-8'18&:;)B=*A<(@>)@B*?GY`4s~T€Œfw‡bi~Ub|MaI`ƒC`…?aŠ>cŒ@hŽEjJkMlPn”Kk‘HhGgŒGgŒIh‹KfˆKf…Je„Ke‚Jc€HeGf‚Hf‚GeFcDb‡BeŠEhH06*58-;<4A>9G@:KB;RE.Ð?.Ë8(Ç/!Ò6)Ó5)Ô4(Ò6)Ñ9+Í<+È=*Ä;(Æ9/Æ9/Æ9/Æ9/Ç:0È;1É<2Ê=3ÒE;ÒE;ÐB8Ë=3Ë=3ÏA7ÏA7Ë=3Ñ4#Ø6)â5.ë31ò/5÷+6û(7ü)<ù&9÷&;÷&;ø'<û&<ý%<ÿ$:ÿ#:ÿ!7ÿ"7ü%7ù-9÷5>ñ:?ç9:à87Ü86Ü:5Þ;6à;5å95ç85ê65ë54ñ27ð37î66ê65æ72á6/Ü5,×5(Ø8*Ø8(Ø9&Ù8&Ú7$Ü7$Ý6#Ý6#Ù6'Ú7(Û8'Ü9(Ü9(Û:(×:'Ö:+Õ;/Î3.éIKÿo{ÿVjøDaö=_ÿCiÿ/[ÿ7`û=cëLlÆOe€0=G >3--3'+8'2=,=B.B@+C;$G="MA'R_*q}MŸp—¨|ƒ˜mj„W_{J]~E_ƒCa†@b‹?fCk‘Hl‘Lm‘Qm‘So•Ll’IiŽHhHhJiŒLhŠMiˆMf…LdƒJdGe‚Hf„Hh„If‚EeDf‹FiŽIl‘L-3'17-7:3<;6B=9G?UOCZUQa_dhgukkƒllˆjg’baXV‡PP†QQXYš`cªfj´orÁuxÉ|Ѓ„Ö†‡×‰ˆØŠ‰×Œ‰ØŒŒÌ‹‹ËŠ‰Í‰‡Ð‰…ш„ÑŠƒÓ‰‚ÐŒ„Ï‹„È…Á†º†²‡¥}x–vpŠ“ScƒQ\qUT`^RVcOTbH_]DvUB’LB¼RRÖPWàPYé\dèejâljâwqâvláphõ~vÿ‚{ÿ‡~ôkaÉ?2À8(À;(¿='¾='¿='Â;'Å:'Ç8(Ê8)Ü8/Ú7.Ô8,Ï9+Ê;+È;*Ç:)É7(Ï9+Ñ7+Ô8,Ó7+Ï7*Ì8*Ë<,Ë>-É=0Ê<0Ê<0É;/È:.Æ8,Å7+Å5*Ð@5Ð@5Í=2Ë8.Ë8.Î;1Í:0É6,Ò.$Ù0)ä2.î23ô/8ù-9û+;ü+>ü-?û.?ú0@ü/@þ/Aÿ.?ÿ-?ÿ->ÿ)9ý)8ø*7õ0:ó6=ì9=ã77Ú53Ü86Ü:5Þ;6â:7å95ç85ê65ë54ò38ñ48ï56í76æ74á6/Ú6,×5*Ö9*Ö9*Ö9(Ø9&Ø9&Ù8&Ú7$Ú7$Ô9%Õ:&Ô<'Õ=(Ô=(Ô=(Ó>*Ó=.Ð8-Ù;8ÿ^eÿaqÿPi÷;\ÿAiû6aÿ/]ÿ.WøIjÛYq•>NX'-?+,730*1)-9-5@/:B+<<"B;VG(iV6v‡P£lª¾‹¨¾Ž¥wo‹[aK^F`…BcˆBeŽBj“Go•Lp•Po“So“Uo•Ll‘KiŽHgŒGiŒJiŒLi‹NhŠNf…Je„IdƒHfƒIg…Ih†Hg…Gf„FgIi‘Kl”N*2%.4*470894<;7B=:HA;KD(À>(Á=(Ä;(È;)Ì9)Î8*Ú3+Ù6-Ö:.Î:,Ç:)Â9'Ä;)É=,Í>.Ö@2ÙA4×=1Ï7*Ê4&Ê8)Ë<,È:,È:,É;-Ê;-Ê;-È9+È6)Ç5(Ê6*Ï;/Ò>2Õ>3Ö?4Õ>3Î7,Å.#Õ)%Ü-*ç02ñ29ø0;ü/>þ/?ý0Aú0@÷1@ö2@ö0=÷/:ù-9ú,8ü*7ý/<ù/;õ0:ñ2:í6;æ68ß55Ù42Ü86Ý:5ß:6â:7æ87é77ê67ë54õ49ó49ð69í76æ74ß6/Ú6-Ö6*Õ7+Ô8)Ô8)Ô9'Õ8'Õ8%×8%×8%Ï:$Î<%Î>&Í?'ÍA(ÍA*Î@,Ï=.Ð71éIKÿgrÿOdÿHfû7]ÿAmý/_ÿ1^ø1XåOj¹Wfh39@*,?994443524925>-2<#29ECl`8Ž}R™±u©Á‡µÎ—­È•’®}v”be†Q_ƒF`…Bc‰@gDo•Jr˜Or—Rq•Up”Vo•Ll‘KhGf‹Fh‹IiŒLi‹Ni‹Og†Kf…Je„If…IhˆIjˆJi‡Gg…EhJk“Mn–P(0#*2'/4-350664<87@<9C>8IEû3>ú0>ú0@ø/?ò.<ï/<í/9í07í.5ï,2ò+2ò)/õ1;õ3<ò5;ì59ç47á55Þ65Û75Ü86Ý97ß:6ã:7æ87é77ê67ë46ö5:ô5:ñ7:î87æ74à72Ù6-Ô6+Ñ8*Ð8*Ð9(Ð9(Ð9(Ñ8&Ñ8&Ó8&È:"Ç;"È>$Ç?%ÇA(Ç@*Ê>-Î;1Õ:6üU\ÿ_oÿGcÿ>bÿ8cÿ6gÿ0cÿ4\òCbÈMa…BIL44:97<<>948>58<7379+3="8DS[,ƒPª£o«Èˆ¯ËŽ¯Ì’¦Ã‘¯}{™ggˆQ^‚E^ƒ@c‰@iDo•Js™Ps˜Sq•Uo“Un“MkJgŒGeŠEgŠHh‹Ki‹Ni‹NfˆLd†Id†Ig‡Hi‰JjŠIi‰FhˆEi“Kl–No™Q&.!(0%-2+130333756:97>;6GD=DD*½<'»8$¾5#ÑB2ãOAäN@ØB4Í7)Ë7)Ð>/Ê;+É:*Ç8(È6'È6'Ê6(Î8*Ð8+Ó;.Õ;/Õ9-Ó5*Õ7,Ü;1Ý<2Ú9/ë7:ñ8=÷:Aü8Bü4A÷.>ò,;ï,:í/;é19è38é58í57ñ48ô36ö45î49ï6;í9<é69â45Ý33Ý86ß;9Ü86Þ97á98å99æ89é69ê67ë46ö5:ô5:ñ7:î79ç85ß82Ø7/Ó7+Ð8+Í9+Í:*Ì;*Í:*Í:*Í:(Ï9(Ä: Â: Ã=$Á?%Â@(Ä@+É=.Í81ßhŽCo•Jr˜Or—Rp”Tn’To“MkIgŠFeˆFf‰Gh‹Ki‹Ni‹NfˆKe‡Jd‡GeˆHgŠHh‹Gh‹GfŠDj”Lm—OpšR(0!'/"(-&+-*.0/333775:94==5?@8DE?JLKQQYVWiZ\s]^|YW†[Y‹^]–ee¥nn¸wxÊ€Ú„„䊌ðŠŒðŠŠì†‡ä‚‚Ü€Ô‚€Óƒ‚Ò€„ĄǃƒÉ„„ΆƒÒˆƒÕ‹ƒÖŒƒÒŠ€ÇŠ€½‰±…~ €xwpxkeec^XpZMm[Mi\Kf^Kd_IcaHfbGl`FlR;„UA£^O¿aYÑYXßPTñQ[ÿXbôkcæYRÔD<Î70Ñ7/×;/Ø/Å@/Á@-¾=*¼9'Â9)¾0"êVJáJ?Å.#Ñ=1Î2Ü<0Ù7,Û7-â>4éE;øAFó8?ð3:ö4?ö2>ñ-;ï,:í2=ì7@æ5;ã68å78é99ð:9ñ86ò65ï==î<<ê:<æ89á77ß76Ü75Ü75Þ97á98ã99æ::é9;ì9<í9<ï8<÷6;ô5:ñ7:í9:è:9à;5×90Ï7,Ë7+È9)Ç:)Ç:)Ç:)Ç:)È;*È;)Á9!Ä>%½;#µ5»:$ÈE3Í@6Ê0.ÿ^eÿVgÿHcÿ;\ú0Xø/[ý5cÿc‡?iDn”Im•Ll”Nk’Qj‘RjŽHfŠDc†Bc†Df‰Gh‹Kg‰LdˆJg‹MhŒNg‹Kf‹HeŠEf‹EjIm“Jp›SrUtŸW*0")/#).'+-(-/.222553782;<4>@5BC;HJGOPTSUaXYm[[s\Z‚^]‰da–kj¦us¼}Ї‡á‹‹íŒòŒ‹ñ‰‰í…„ ڀ~Ò€σ€Ï…†Æ†‡È‡ˆË‰ˆÎ‹‡ÑŒ†Ð…ÎŽ„ÉŠ€½‰³†{£‚x‘{s€tknkd^e\SbaLb`Ke^Kh]Ii\Ij^Hk_Gm_EraG{]CŽ[Fª[LÆWPàQS÷PXÿS`ìWQãKFÛ>9×50Ú5/Ý90Ü8,Ø8*Ó8&Ñ8&Ñ8&Ô8)×7)Ü5,à3,ã2,Ë1'Ë4)È9+Æ=-ÄA/Á@-¾=*¾9(Â9)Ë<.åQEÜH<È4(Ì:-È:,Á5&Ê=+Ê=+Ê;*Ì;*Ë:)Î8)Ï7)Ï6(Ó7*Ö8,Ù7,×3)Õ1'Ø1(ß7.å=4ûBHò7>í07ï/:ò0;î.;ì1<ê6?ã6<Ü36×32ß:8îEB÷JFøEAõ?<è:9æ:8å97â96á85à85á98á98à87â88å99ç9:é9;ì9<í8=ì7<ô5:ò59î68ê88æ:8Ý:5Ó91Ë7-Æ8*Ã:*Â:*À;*À;*Á<+Á<+Á<+½9"Á?)¹;$²5¸;'À>];2@>/3A05?4E=:X;?T-0X51ZI7bjEu[бpšÄ|žÈ|š¹}š¹€™·ƒ©yr`YuESq?\{B_>b†>iCm“Fl”Kk“Mh‘MhQhŒFeˆDc†Bc†DgŠHiŒLhŒNg‹MiOiMiŽKgŒGgŒGfŽGj’Im•LnœQoRr U-1"-1#,/&,.).0-11/34/45-9;0<>1@B5EH?KMLQRWUTbXWi\Yx^]fcŽpm¢zx¹…‚ÏŠáíŽñŽŒïŠˆé‡ƒá~Õ|Í}È}Ç…‡ÄˆˆÆŠŠÊŒŠËŒŠËŒ‡ÇŒ„À‹‚¹‰€¯†|¡€v‘{p€ujpod`i_Ue\MXeK]bKa_Jh[HmZIp[Hq\Go]EtcItZ?‚V= WDÅYMäTSûNTÿIUß@<Þ<9Ý84ß61á6/á6.Þ6+Ú7(Ö6&Ó8&Ó8&Õ8'Ø6)Ý5,á3,ä1,Ç5(Å6(Â9)Á<+Á@-Á@-À=+À8(Ã5'ÜJ=ÜE:ÕA5Îë7@ê=CÜ7;áAAìNK÷ZUüZUùRLïB>è62à72à74à74ß74à85á96ã;8ä::á77ä88æ89è8;é9<ë8<ì7<ì7<ò38î47ì57ç77â:7Ù:4Ï8/Ç7,Â8+¿:+½;+»<+»<+»<+»<+»<+º9$¾@*³9$°7$¶;+´2%Ã40îOTÿZiÿH`ù8Uó6Vó>]ñFfçHfÞEat?9e?6QA2@C04?.29)>5,O61K*#W:,j\Bˆ_«t”½{“ÃyÃv•²|œ¸…™µ…€šm\uKHa7Nh9[xB_}?c„?hŒBl’Ej“Gh’JgLeMe‰Cd‡Cc†BeˆFh‹IjŽNkOjŽNkOkOiMhJgHi‘Hl•Ip™Ms¡Vt¢Wv¤Y25$13&02'01+12-23.34.46+9;-;>-?B1DF9IJBNNNRQWTR]XVd\Zoda~nl”zw®„‚ÄŒ‰Ø‘Žå”‘ì“펋扅ڂÎ{Å}¿‚}¿ƒƒ¿……Á‰ˆÂŠÃ‹ˆ¿‹„¸‡®…}¦…{€vŽzm~sfmoa`k^Vi[NgZJVdJZbJa_JjZJpYIsYJtZIs]FqY?tU9†T;§ZFÌ\PæRNóEGù:AØ3/Ü41á51ä50ã5.â4+à6)Û8)Ö7$Ó8$Ñ8&Ô9'Ø6)Ý5*à3,ã2,Â8+¿7)»7(¼:*¿=-Â>/Ã;-Ä8+Æ3)ëTKÔ;3Ì8.ÑA6¾4'À<-½>-Ã7&Ä8'Æ9(Ç:)Ê8)Ë7)Ì6(Í3'Ó5*Ô3)Ö2)Û4,ã:3é>7ì?9ë>8è47ì59ï6;î5;ê2:æ39ä7=á<@óUVûc`ÿnjÿidóVQäA<ß61à3/Þ71Þ71Þ71ß82á85â96å97æ::å78æ89è8;é9<ë8<ë8<ë8<ë8<ñ48î68ê67æ87à;7Ö<4Ì9/Å8.½9,º;,¶;+µ<+´<+´<+³;*³;*³:'·@,­8&¬9'±;-«+"Ã54ÿ_gÿSdýE]ó;Uí1B2SE*okHŠ“f•¬t´t‹¹q‹½t¡¹‰¡¸Š§}l‚\K_:BV1Lc7Yq?_{@dƒ@i‹Ak‘Di’Fg‘IdJbLc†Bc†Bd‡CgŠHjMkOm‘Qn’Rj‘Pj‘Nj’Li‘Jg‘Gi“Gm—KqœMu¥Yv¦Zx¨\78(78*66,56056156167/68+;>-=@+@C.DG4IK=NNFQPNSQTVUSYY[a_lkius›€}´ˆ†ÈŒ‰Ö•’ã”äÞ‹‡Ó„Æ}º|µ€{±~¸‚º‡„»‰…¸Š„²†¨z›€xs‡znzrfjm_\j[Tk[NjZKjYI^bK_aKe^Kk[KpZLtZKw\Kz[G{WAƒS=—U?³XFÍSFÝF?å76ê01Û2-ß3/â5/å4.ã2*à2'ß5(Ü9(Ô7$Ð9$Ï:$Ñ:'Ô8)Ù7*Ý5,à3,½>-¹:)µ6%·8'½;+Â=.Ç;.É6,Ñ80ö\T×=5Ë4+ÏA5¸3$·:(¹@-Â9)Ã:*Æ:+È:,Ê;-Ì:-Ï8-Ñ7-Ñ3*Ò1)Ö1+Þ71ç;7ë>:è;7æ74é77ï;<ðê7=ê7=ð69î79ê7:ä::ß=:Ö=7Ë;2Ã;/¸9*´;*±<*¯<)­=)¬<(¬<(¬<(«:(¬=*¤9'¥:*©9-«0)ËAAÿgr÷L^÷E[ðBYèF[ÛN^ÈT]´VW§SQSU@LN9JG4JE1FD-AA'>C#@G%MU.^g,?=.==1==5=<7;<6;=2;=/?B-@D+CG,GI1KM8NOASPITQLYXDZ[M_^Zgepqo‡{y¡ƒ€·‡…ƌӋՊъ…ǃ€¹~z­zw¤{u¡zw°|y°€|®~©‚~£y•|t‰zrvkqrffm`Zl[QlZNl[KmZKmZIg^Mi]Mi]Mj]Mn]Ms^My^M€[I“`OšWG§N@¹I=Æ@5Ð6.Ù0)á0*á51â5/ã4/â4-à2)ß3'Ü6&Ú;(Ð9$Í;$Ì<$Í<'Ñ:)Õ9*Ù7,Ü5,ºA.´;(¯6#°5#¹:)Â=.É;/Í6-Û>7ùZTåHAÐ90Ì@3¸6&«4 ±>)¿7'¿7'À7'Ã7(Å7)É7*Î7,Ð8-Ù<3Û:2Þ93å<7ê>:ê=9ç85ã41è96ë<9ê::è8:ì>@øORÿccÿqpùheàUPÈ=8¿2+È5.Ö;7à<:â:9à<3á:2á:4á83ã73ä65å55æ68é69é69ê7;ë8<ë8>è7=è7=ç6<ð8:ì8;è8:ã;:Ý>:Ó>7É<2À+>467>O#Jh4gTt•\„›c‹™dŽ›f‘¢l•¬t•²x„”pn}\Q`C=J09F,BO3O_;Xi=czDgBkŠDk‘Dh’Fe‘F`G`Gf†Ci‰FjKlMlOkOm‘Ql“Rm”Qm”Qm–Pl–Lk—Jm™JržOu¢Qy¬]y¬]x«\CB0DB3DB6EB9CC;CC;BB8AD3CG0EH-GJ-JM0OO7RQ?TREURI[\:\\@\]Kaa_ihvrq{z¦~µ†‚¿ˆƒÃˆ„Á„¸{­ysŸtp•qmŽol£rn¡tq wršwrtoƒskxrilmb^l_Vj\OlZLn[Lo\Kq\Kq\KrZNq[Nn\Nl_Ol`PqaQy_N†[KŸ_S¦OE°A8½:2È5-Ï1(Ø1(Ý5*â70á6/á4-á3*à4(ß5(Ù6%Ô9#Í;"Ê<$È>$Ê>'Í<'Ò;*Õ9,Ø8,·D/±<(¬5!­4!¸9(Ä<.Ì9/Ï5-Ú83ñNIòSMÙB9ÌB5½@.¥2¬?(À;,Á9+À8*À6)Å7+É9.Ï;1Ô;3áD=ãA<ä?;ç>;é=;é;:è88ç77æ93æ95å84é;:ôJJÿ\[ÿdc÷caË=9¿82»4.Ã81ÓB=ÞE@ß=;Ù42â;3â;3â92ä84å84æ66é77é77ê69ë6;ë6;ë8<ë8>è7=è7=ç6<í68ê69æ89à;9Û>9Ñ>6Æ<1¾<.²8)®;)ª;(¦;'¤;&¡;%¡:' 9&ž?-”7%š=,—:)˜3'ÂQKíkmï\fïN^ìI\àHWÎJU·SS¡]RŒfQ‚jP=Sg{Fh‚Cl‹Ek‘Di“Gc‘Fa‘G^Gi‰FlŒImNn‘OlOjŽNkOk’Qp—Tp™SpšRo›Po›NqNv£Rw¦Uz­^z­^y¬]GD3HE6HF9HE±61Á3/Î5/Ö5+Ù7*Û8)ß6/ß4-à3,à4*â6*Þ7'Ø7%Ï7 Ì<"È>"Æ>$Ç?'Ê>'Ï<*Ó:,Õ9,µE/­='¨3¬3 ·8'Å;.Ì9/Ò5.Ò/*ä?;ûYTàI@ÎD7ÆI7¥5®D,ËF7ÉD5ÉA3É?2Í?3ÒB7ÚF<àG?ßB;à>9à;7à74â64ä65ç77é99é>7ç:4ä73è<:ñIHñMLØ=;¹(%¸-(¼5/Å@9ÌC=ÐA;Ö=8Ý>;ã?>á:2á:2â92ä84æ95è96ë99í9:ë7:ë6;ì7<ë8<ë8>è7=ç6<æ7<ì59è58å78ß:8Ù<7Ï<4Ä<0º:-°8(«:(¨;'¤;&¡:'Ÿ:&Ÿ:&ž9%š?,4"—>,“:*“1&Ì\X÷y|æT_ðTbèI[ØDRÃGO®SPšbS†lS{rSC[C?H3B7%O6"_K0prJ€£iˆÇ€yÃt{¾qu¢]oƒHy}J‡†Xy|O\d5:D)3=$4>&WN?XO@YPAZQB\SD]TE]TEcZKbYJbXNcXRg\Zmacsfmwjs|n{~p}s€s€~p}wjtobli\fcb]a`[a^W_\U_[R^ZOa[ObZMe\Kg\Ji\Ii]Gk\El]Fm]Dm]D_gOkiTqZH{M@•RI©WL®TI³WH¦N:¢G2¢?*ª;(¾:.Ò72à23å,1Þ7.Þ7.Þ7.Ü8.Ü8.Û7-Ø6+Ø6+×7+Õ7+Õ7+Õ7+Ô8+Ô8+Ô8+Ô8+¸=.·=.°8(§2!ª2!´;*½>/Â:,Æ6+Í6-Ô:2ÜB8àI>ÖG9Ç;,¹1!ßOGÙIAÔE=ÓE;ØH?ÜG@àC>á<:ã54ê67ï8:í9:ç77à72Ý:3Ü>5ÎKAÈE;½=0µ7)°5&³8)¹>.ÀA2Á;/Ê<2Õ>5ß=8ç;9î79ò67ô68æ7>æ7>æ7<å8:å99å97ã:5ã:3Þ5.ß6/ã81ä84å97ç98ç9:ç9:ë;>ç9;á99Ü<<ÖA=ÌC;ÀB6´@3¦;+¢=+>,™<*–;(•:'”9&“8%‡F2‡>/†/%”-(ÀIKèkoçlqÊWZ¶OP©TQŸVO˜YP•[P–]R™^Vœ`XMb!:O3JOf x’I˜²h¡½r »t™²pƒ›akN\lEWdHS\GHN@=C9;<,AB4=?2:=2,¯:)½9,Ì70Ø42Þ22Ý6-Þ7.Ü8.Ü8.Û7-Ú8-Ù7,×7+×7+Õ7+Õ7+Ô8+Ô8+Ô8+Ô8+Ò9+¸>/·=.®9(¥2 ¦3 ²:)»=.¿;,Æ:-È4*Ì3+Ó;0ÜE:ßPBÞRCÚQAÝE@Ø@;Ñ<6Ð;5Õ>7Ø=8Û96Ý33é69í68ï79í68é77å97â=9á?:ÆC9¿?2¸:,±6'¯5&²8)¸=-¿@1ÅA4ÍA4×@7ß=8å97ê67ï56ô68ç6<ç6<ç7:æ89æ87å97å95ã:3â92ã:3ã:3ä;6æ:8æ:8å99å99æ9;ä:=à<=Ú?=Ñ@;Å?6¸<2¬;-¥;+ <,œ=+—<)–;(’:&‘8&7%z;)€8)‰5*ž;5ÁQPÚceÔ]a¹MM­NL¤SOYP˜\R—^S—^U˜_V™^VSg*Sg(^r3zO—°l¥¾z™²nˆ¡`j‚Fau@Sf9IY5FP7?H59?358/;<,AB4=?2:=2;A5:C2@M3Rc?]uCgƒHqLp”Jm“Hk“Jk“Lh‘Km‘Tn’To“Sm”Qk“Lj”Hl—Hm˜HpJnžJp Ls£Ou¦Tx©Xx©Xx©Zm–\b‹QY‚H]TE]TE]TE]TE]TE]TE]TE]TE[RC\SD]TE^UF_VG`WHaXIaXIe]He]Jd[Jd[Le[Qf[Uh]Yh\\i]]j^`k_ak__i]]f[YbWU`USYVMWTKTQHRNCQMBSOCWQCXRB^WG^WEaYFc[Fg\Hi^Hk`Jk`J^cOmhUy_PˆXN¤[T³VQ´HE¸E>¹@7¸>3·<-·9*¼8+Ã9.Ê:/Ï;1Û7-Û7-Û7-Ü8.Ú8-Ù7,Ø8,×7+Õ7+Õ7+Õ7+Ô8+Ô8+Ô8+Ò9+Ò9+º@1¶>.®9(£2 ¢3ª:&µ=,»=.Ä?0Å7+Æ2(Ê3(Ð<0ØF9ÛM?ÝQBÜ87Ø43Ô20Ô52Ù:7à>;å=<é;<ï8<ï5:ì27ê24é56å97á<8à=8¹;-·9+±6'®4%­5%°8(µ<+»=.ÈD7ÏC6ÖB8Ü=7â96è64í55ò67ê5:é6:é69ç79ç77æ95å:3å:3ã:3ä;4ã<6ã<6ã;8â:9á99à88Ý9:Þ;<Û@>ÕA=É>7º:1­7+¥7(¡;,œ=+˜=*”<(’;(9&8%Ž7$u8%y6%ˆ9,¢E=ºROÂVT¹OO¬HH¤LHœSL˜ZO—^S–bU—aW˜_V˜]UgxB{ŒU“¦n¥¸€«À‡ž³zz‘YYp:?R$AS)AQ-?L0:C.6<.690581:;+@A3=?29<1;A59B1@M3Qb>_wEi…Js’Nr–Lo•Jm•Lm•Nk”Np”Vq•Uo–Sn–Pl”Kk•Il—HmšIpJpJp Lu¤Sx©Xyª[u¦Wq¡U_ˆNVEOx>aXIaXIaXIaXIaXIaXIaXIaXI_VG`WH`WHaXIbYJcZKd[Ld[Le]Ff^Gf^Ig_Lg^Of\Pf\Rf\Sh]Wh]Wh^Uh^Ug]Se[QdZNdZN]YNZVKVRFRNBPL@PM>RO@UO?WQAYTA[VC^WDaZGd]Jf`JgaKadSleUt]O‹[Q«b\»YXºDD¾9:Æ;8É:6Ç80Â8-½8)¼:*½@.¾C1Ù7*Ù7*Ú8+Ú8+Ú8+Ø8*Ø8*Õ8)Õ8)Õ8)Ô8)Ô8)Ô8)Ò9)Ò9)Ò9)»A2¶>.¬9'¡4 2¢8"¬=)µ@.¼>/Á9+Ä6*Ç4*Ë7+Í;.Î0å26á14Ý02Ý34à88å;<ë=?î;?ï6<í38ì/5é05ç47ã77Û64Õ30±7(°6'®6&¬7&¬7&®9'²:)µ:*ÃA3ËA4ÔA7Ü?8â:7ç85í76ð67í6:í6:í68ë76ê86è94ç:4æ;4â92á:2ß:4à;7Þ:8Ý98Û97Û89Ö<:Õ@<ÓB?ÊA;»;2¯6+¥5'ž7(œ;*—<)“<)‘<(:&8$Œ7#Œ6%z@,v5#6'™E;¬OH¬MI©LG¨PLPH–VL“ZO“_R“bT•aV—aW™`W~‹]™©z­½Ž¦·Š¡ts†YN`8/A->3B%:F.=F3;A3:=2;<4<=79:*?@2<>19<1:@49B1?L2Pa=`xFj†Kt“Os—Mq—Lo—No—Pm–P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UUÛORÞ=Cã8>à67Õ62È:.¹@+­E*¦I*Ô7(Ô7(Õ8)Ö9*Ö9*Õ9*Õ9*Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Ò9)Ò9)Ñ:)¼@4µ=/«<+ :$—7’6š<#¦B*°C.¹@/¿;,Ã7*Å2(Ë4+Ó:2Ù@8ó1<ð2<î5=ë8>ç:>å;>ä:=ã9<á48ä5:å8<ä;>Þ;<Ò86Å1-¼-'«<+«=,«>*©>*¨=)©<(©:'«8%¯6%¹7)Å;.Ñ=3Ù<5à;7ä;8è;7ð75ï75ï75î84ì94é;4è;4å=4â>5à?7ÞA:ÚA;ÙA>ÕA?Ñ??Ñ??¾B:»@8µ<3ª8-¡5(›5'˜8(•<*‘;*<)Š<(‡:&†9'„7%ƒ6$‚5#y<)r3!}:*—OA£YLœRG•OE–VJ”ZN[MŒ[M‹[OŽ\Q”^T™`Yœa[s}Xyƒ`r|ZU`B9F,/;'0;+1;03=44;35<4:?8?B9?A6<<277+89)>?1:27@/=J0O`HO?HO?PPDVRGYOChREYM˜UL³RLØXWàGJçï:Aì?CæBCáACÞ@AÚ>?Ï12Ñ56Ô::Ò<;Ê;7¾73µ4.¯3+¥>+¥>+¥>+¦?,¥>+¤>(¥<'¨;'ª7$²7'¼8+Å8.Ì8.Ö92Þ<7ä?;î85î85î84ì94ë:4è;4å=4â>4âA7ÝC9ÚC<ÕB;ÐA=Ê?<Ç=;Ã<9®>3©:/¢8+œ6(˜7'”8)‘:)Œ;(‹=)ˆ=*…<)ƒ:'‚9&€7&6%~5$v4$x5%…B2˜UEœXK“QCPD•ZL’ZM[NŽ]OŽ\Q’\R•\U˜[V™\W`hCX_=JS4>G,6?*2=-4>35?74=88>:=B/;9*78(=>0:26?.=J0N_;`xFk‡Lu”Pu™Os™NršQršSp™SqœMrNqœMp›LošKrNu¡Ry¥X«`~©az¥]qœUf‘L_‰G[ˆE\‰Hb‰RY€ISzCh_Ph_Ph_Ph_Ph_Ph_Ph_Ph_Pg^Oh_Ph_Ph_Ph_Ph_Pi`Qi`QmcWlbVjaRi`Qh_Pg^Og^Mh_NiaNiaLiaLiaJh`IhaGhaGhaGh`Kg_Je_Ib[H\WCUR?PM:ML:EF4DG6DH7BI9BI9BJ;BJ;BJ;JJ@QQERPAUNÄYSÛQOãCEå8:ß55×:3Ê>/¸>)¬<$Ï8'Ï8'Ð9(Ò;*Ò;*Ò;*Ò;*Ò;*Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)½=2¶:.­<,¥>+˜9#Œ59ž@' :$¯<)¾?0È;1Ì8.Ñ7/Ù<5àA;ð;Bï>FëBGãCEÖ@?Ê;7À50»1.·0,¼51¾:5»<6³:2©9.£9,¡9,Ÿ>+Ÿ>+ ?,¡@-¡@-¡A+£>*¤=*©<(­:(²7(¹5)Á4*Ë80Ö?8ÝD>é:5é:5è;4è;4ç<4ä=4á?4Þ@5ÝC9ØD:ÒC;ÊA9Ä?:¼;6¸85´73ž9-™7*•5'’6'‘:)<*‰:)„9&†=*„=+=*€<)~:'|7'{6&{6&y1#€8*ŒG8–RE’PB‹K?ŽSE™_SXKZN’\R–]T—\V˜[V˜YT—XSV^7EM(6@8A&>G27@E>GJ?GI;BC1?>);;#78(=>09;.69.8>26?.E5>F7?G8=H8AE4HK6YS;_F0€K9Àj]Ýf`åSSçDEè@@ã?=Ö=5É=0Â>/É3$Ë5&Ì6'Í7(Í7(Î8)Ñ;,Ó=.Ò<-Ò<-Ò<-Ò<-Ñ;,Ñ;,Ñ;,Ñ;,¸3,·7.±;-¦;)˜8"‘7’8š:"«B-±<+¹7)Á4*Í6/×<7âC?êHCëBGéDHÝCCÉ:6»61´80®8.§5+ª:/¨9.¤8. 8-›9,–:+’<+>-˜=*˜=*™>+š?,›@-œA.žB-¡@-¡<*¥:(«7(°6)¶6+¾8-Å;1Ê=4ß:4á<6â?6ã@7âA7ßA6Ú@4×@5ÚG=ÒE;ÇA6»;2±6.ª3-¤1,¢1+”;-’:,:+:*‰:)ˆ;)…<+„=+~:'|9(|9({:({:(z9'x6&w4$z, A4˜NC“MAŽL>RE‘VHŽRG˜\R˜\R‘UMTL™ZU—XS–WR `^R[0IQ(AK&BK,>H/7@-2=-4>34;3HPEX^RW[LLO?1;=0:=29?34=,;H.Pa=bzHlˆMu”Ps—Mq—Lp˜OršSqšTpJqžKrŸLrŸNsŸPv¢U{§\ªb‚­fx£^i”O_‰G]‡G`ŠJfŽOhRd‰U[€LTyEi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qj^^j_]j_]j_[j_Yj`Wj`Vj`Vj`TjaRjaRjaRjaRjaRjaRjaRj_Kh`Kg_Jg_Jd]J^YEUR?ONE5?E7>F7>F7=E6BF8>E5=F1DN5HK0PB'yS<¹ubÉdXà_YíUTêFGä>>â@=Û>9Ñ82Ì:+Î<-Ï=.Ð<.Ï;-Î:,Í9+Í9+Î:,Î:,Î:,Ð:,Ð:,Ð:,Ð:,Ð:,È?9ÆA:½A7®=/6#•2•2™3¦5#²7(Á;0ÑA8ÞE?æIDéJFìJGÞBCÛEDÎC@¼;5®9/¨>1¢A1œ?.œ@1™@0–>0’?/Œ?-ˆ?.„A.ƒB.‘;*‘;*’<+“=,”?+”?+–?,™>+Ÿ@.¡=-¤:,§9*¬8+±8-¶:0¹:1Ð90Ò;2Õ>5ÕA7×C7ÖD7ÔD9ÑE8ÊB6ÃA4¹=1°:0¨8-¢5.5,œ5.Ž=,Œ=,Š;,ˆ;+†:*„;*<,€=,~;*|;)y:)y:)x9(w8'u6't5&„1)‘C9˜NC‘K?ŒJ>PD’TIRG“SJšWQ˜UO™UR\X”WTŽSO—\XT]0Zc8_j@[eBIT66C)4@*0:-;H.Pa=c{IlˆMu”Pt˜Nq—Lq™PršSqšTq¡Kp LpJqžMt Qx¤W|§_ªc{¦aošUcŒJ]…Fa‰JeNeNc‹Ld‰U[€LTyEi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qj^`j^`j^^j_]j_[j_Yj`Wj`Vj`Vj`Tj`Tj`Tj`Tj`Vj`Vj`VlaMk`LiaLiaNf_La\I[VCTQ@ML:HI9DG6AE6AE6?E7>D6=C5=F57@-?H3EM5AA%QA']E³u`³WHÙbZðebîRSéEFìFHèBDÝ79È9+É:,É:,É:,É:,Ê8+È6)È6)Ê8+Ë7+Ë7+Ë7+Ë7+Ì8,Ì8,Î7,Â3/¾5/¸5-¬3( 0"›0Ÿ1 ¥4$»A2ÇC7ÖG?ãKFçLGéJFåFBâC?ÕCCÏDAÁ@:°;1£=/žC1™F4•G3’E3E2ŒC2‰B0ƒB0B/{B.xD.Š8*‹9+‰:)Š;*‹<+<+Ž=,<*–?.–=-›;+9* 8+¥9-©:/«;/¼7.¾90Á;0Ä>3Å?3Æ@4Ä@3ÁA4¸:,²:,ª9+£7+7+™7,–8.–91‰=-ˆ<,…<+„;,‚:+€;+<+<,};+z;*z;,w9*v8)u7(t6's5&Œ91”F<—MBŽJ?ˆHMKB3;I27C-EJ3IG0K<%mN9—dO§`NŸA5ÆSLçc_ð^^îRUíJMêDHç>CÉ;/Ç9-Å7+Å7+Ç9-Ê:/Ë;0Ë;0Ñ>4Ñ>4Ñ>4Ò>4Ó?5Ó?5Ó?5Ó?5Ó?=ÑB>ÍD>ÆF=ÁG<ÂI>ÆN@ÎPDÙSJÞOGäLGäIEåFCâC?àA=ß@<ÔFDÊC?º?7«<1ž>.—D2“H3‘J6‹G4ŠF3‡D3„C1B0zA.wC.uB/†8+…9+…9+†:,†:,‡;-‡;+ˆ;+‰:+‹:)Ž8)8*•9,™<-=/ž>0«9/­8.®9/°:.°:.²:,¯9+®8*¨7)¥7*ž7(›6*•7+’8-9/;0†=.…<-ƒ;,9*:+~9*}:*};-|:,z;,y;,w9,s8*q6(q7)q7)B8”G=‘K?ŠH<‡I<‹OD“UJ—TL—PLSP˜QO–RO—\X_Xh^žzn™k…’fu‚VYh=CR)?O(P`B'=A&;>#78(:;-79,9<1;A57@/MKH/JH1Q?+e>-”ZL¬`S›>6œ4+µ@9ØXUóigödeëRUèINìKQ×J@ÓF<Í@6Ë>4Í@6ÒD:ÕG=×G>ÚJAÚJAÝJBÝJBÞKCßJCàKDàKDëRTéSTãTPÜSMØSLØSLÛTNàUNàLHâHFäEBäB@äB@äB@ãEBãEBØJHËD@¹>7ª>2žA2–C1F3I6‰F3‡D3†C3ƒ@0@1}?0y@/x@1ƒ9.ƒ9.‚:.‚:.ƒ;/ƒ;-ƒ;-ƒ;-9*‚9*…9+‡9,‰:+;-<.=/›;/œ:/ž9- :.¡9,¢8*¢8*¢8*Ÿ8)œ8)˜8(”8)9*Œ:,ˆ:-‡;-ƒ;-‚:,9+~9*}8)}7+|8+{9+z8*y9-x:-t9+q5*o5)q7+r:-G;ŽH<‰I=„I;…K=ŒRF“WMšWO˜QMžTQ™RP•VQ’`YˆbW‚h[ŠwhivKZi>JY.AR&IZ0Wi?dvLj|TXjDL\8?M,:D)C-=@-:=*89):;-68+8;0H-NC-b=-„D:¯VP¶MJ¡++´:9º=;ÑTPòpnýwvñehêY^ò]cáVOÚOHÒG@ÎC<ÑD=ÔG@ÖGAÖGAÙHCÚIDÚIDÝIEÞJFÞJFàKGàKGãGJáGIÝGHÙGG×HD×HDØGDÝEBàBAåABé@CêBBèBBäB@ßA>ÜA=ÚJIÌB@»<6®>3¢@3—A2B0D3‰A2ˆ@2ˆ>1…=1‚<2€<1=1}=1ƒ:3;3;1;1€<1€<1=/=/=/€.™9)•9*“:*Ž;+Š;,‡;+ƒ;,€;+‚:,9+7)~6*{5){5)z6)z6+x6*x8,w9.s7,o5)o5)r:-u=0ŽL>‰K>„J<‚M=…QC‹VH’XM—WN”MIœRQšTR•[We\y_PcXFb]IBP,?M)?O(K\2_qGk~QcyKVk@M_7@R,6E&7D*=F1=D4:=27:19:*:;-68+8;0G*SA+{E9¦NL¸EH»5<¾19Ë@EÄ?@ÊJIÞb`îrpïopçbeáZ^ÛRJÕLDÏD=ÍB;ÏD=ÒE>ÐC<Î?9ÒC=ÓB=ÔC>×C?×C?ØD@ÙEAÚEAà?Dß@DÞDFßFHßIHàJIãIIæFHçACëADîAEîACéAAâ@>Ù>:Ö=8ÛEGË=<»73°;4¦@4˜?1>0ŽA1‰=/Š<0‰;1‰92‡81†93…:4„;4:4:4€<3€<3<3}=3}=3|<0{=0{=0{=.{<-z;,y:+z8*z8*€:0‚:.„:-ˆ:.Œ:.‘;.”<.–=-’9)‘:):*Š;*‡;+ƒ;,<+}<*€8,€8,~6*}5)|4(z4(z4*y5*u3'v6,v8-r6+n4(n5*s:/v@4‹PB†N?N=R@…VF‰XIŽUJ‘RI“NI™RP”SO‘\VŠfZl\LML7BL3@O.KZ9WgC`rJezOdzLVl=G]/AV+7I#0A!5C*=F5QJ:MG7IC3GA13M*>G*[B.PGºVVº7?»'3ÜBNÐ:CÄ9>»;:ÂHGÓ][ßgf×[]ÇILÓJDÏF@ÌC=ÎC>ÒGBÒGBÐB>Ë=9ÒC?ÓB?ÔC@ÕDAØDBÙECÙECÚFDá>Cà?DÞBEßEGáGGàFFàBCâ=AëADí>Cì;Aê<>æ>>ãA?ßD@ßFAÙ@CÉ78¹30±:4§?4š>1=/Ž?2Š;.‹9.‹80‹61Š71Š73‰84‰:5:3:3:3~;3|<3|<2{=2{=2u9.v;-w<.w<.x=-x=-y;,y;,{;1};/~8,7*„6)‡5'‰6(‹5&7(‹8(‹:)ˆ;)…<+<,~=+{<*€8,7+~6*|4(|4({2)y3)y5*t1(u5+v8-r6+n4)n5*t;0xB6ŒTE„Q@P>‚UB„YHˆYI‰SGNG˜SN˜RPPKˆVO‚bUeZHFK4;K0IX;[jKgxVewQYnCSi;Me5I`28M"-B*;2@):E7;B;8<;7;<<=-<=/79,9<1=C77@/6C)DU1Rj8_{@mŒHp”Jq—LršQtœUr›Uq¢Qt¥Vu¥Ys£Ym›Sd‘N\‰HZ„DdŒNa‰J`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.s9.r8-r8-q8-p7,p7,p7,p5-o6-n5,n5,m4+l3*i3)i3)g1'k7,h4)e1&h4)d0%f4)uC8•JE“LH“PJTL‰WNYOx[Mp]Nj^N]WGPQAKN=CJ:9B12:+08)36-17-06,/5+/5)17+2:-4<-9D4;F6=H7*0640641622716929;0:<.:?)?H+KY5]pChƒLs“TwŸYw¡WržQiŒT^IUx@WzB[~F[~F[~F]€H_‚J_‚J_‚J_‚J^I^I]€H]€HUvKJk@@a6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlcToh^ng_lh_tqj…„¡ ž¼¼ºÏÏÏÎÏÑààâòòòúøùû÷öøòòñìéêåâïÍÃàÀµÅ©¥€sbaZGML7CH2AI4AH6BF7BD7C@9D<9C98C772?5;@9@93H/+c76QR³giÇmmÂ[\ÉYWÑUS×QNÝKKåGFèBBê@AÞCGÞDFÞDFÞBEÞBEÝADÜBBÜBBÜDCÙCB×C?ÔC>ÒE>ÐE>ÏF<ÐG=â@;Ý@9Õ@9ÌC9ÀD:°B5›;-‹5&Š=-…=.>-€=,€=,<,ƒ<*„=+‚:,‚:,€:.9-9-~8,}9.}9.~:/~:/}:1}:1}:1}:1}:1{;2w;1w;1v:0u9/t8.s9.r8-q7,r8-q8-p7,p7,n8,m7+m7+m7+o6-o6-n5,m4+j4*j4*i3)h4)f2'k7,h4)c1&e3(b0%e3(uC8”JG“NIQJ‹TM„XOzZMq[Mh\LXUDHK:=D4=E69A208+/7*5=056157257247005.06,08-19,6A3:E5=J9>K9;J77F12A,0?*.42.420511605818:/:<.:?+WzB[~FY|DY|D\G_‚J_‚J^I^I^I]€H]€H]€HSsJHh?>^5icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUfc\gd]vsn“’ޝ¯­ÄÆÅÚÛÝìíïóôöö÷ùüüþÿÿÿÿþÿÿûúüööùôñÿÞÏöÖÇãÈ·É´Ÿ­ž‡ŠƒicbFGG-EG/DF0GD3IC5H;3F42G34M797@;;@:@;8G85cGF‘kjŔ譩ҋ‡ÇtnÀ]XÆSNÖNNâIKëEIðCGÜFHáHKÜCFÕ:>Ø>@âFIàDGÖ:;Ú@@Ú@@ÙA@ÖB>ÔC>ÑB<ÏB;ÏB;ãA<Ý@9Ô?8ËA7¾B8°@4;.8*‹>.†>/‚?.>-€=,<+=*=*9-9-9-~8,~8,|8-|8-|8-}9.|90|90|90z:1z:1z:1z:1x=5w<4v;3u:2t91r7/p7.p7.o6-m7-m7-m7-m7-l8-l8-l8-i2+m6/p92o81k4-g2*g2*h3+e0(i7.d2)^,#`0&_/%b2(p@6’LJOKŠQJ‚QJ}YMv_QfYIRO>CF5=F58C35@02=/3;04:04:077577566446135016/05..6+.9+2=/6C29H5:I68G42D./A+,20,2.-2..3-36/780:&DR1YkCh‚Ru”[wž_r›Wj•N\}HXyDTu@Tu@WxCZ{F[|GZ{F^JbƒNbƒN^J\}H_€K`L^JTrNFd@:X4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUed_onj…†¤¤¢ÁÃÂÖÚÛêîï÷ûþ÷ûþøüÿüýÿþþþÿþÿÿýüÿüùÿûøÿïÚüêÒîÞÅØÍ±À»¤£„‚ƒcgkJMP1II/EC,HA/J>2L93M85Q99;;9BA?MHE\RQyjg¢‹Ì³®åÇ¿ÿÙÏ괪̃|Àc\ÌVTÛPSãFMâ=DÕEEÕEEÙGHÞIKÛEGÖ<>Ö<>Ü@CÚ>?Ù??Ú@@ÙA@ÖB>ÓB=ÒA<ÐA;ß@:Û@;Ô?8ÌA:¿C9±A6 ;/‘9+Œ=.‡>/ƒ>.>-€=,<+€=,<,9-9-9-~8,}9.|8-|8-|8-|90|90|90z:1z:1{;2{;2{;2v=4u<3t;2s:1r90p7.m7-m7-m7-l8-l8-l8-l8-j8-j8-j8-l5.n70n91n91l7/i4,g2*e3*c1(e3*_/%^.$b2(^.$`0&n?5„IEˆQLˆWRWOrVKdRDQJ:>?/:A16A14A02>02<14<15;17:388677577557446116005./7,.8-1<.4A07E49H58G44E22D.062.40.3--2,14-45-8:-9=,7?'DQ3YkEh‚Sv”`wbp˜YfNZzHWwETtBTtBVvDYyGYyGYyG[{I_M_M\|J[{I^~L^~L\|JTmOF_A9R4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUneVneVneVddby{x—™˜²¶µÍÑÒäéìôùüúÿÿûÿÿûÿÿûÿÿýÿþþþüÿÿûÿÿúÿÿúÿüßúùÛïðÐáåÄÒØ´¼Äž©‡’j`hCRW7DG,EC.KD4MC9N?8L=8C:;SJKi`a€xv›“¼µ¯×ÐÈçÝÓúêÝÿôéÿåÛ画Äec¸ACËBIáNVÚVRÒLIËDAÎBAÔFE×EFÙCDÛBD×=?Ø>>Ù??Ø@?×A@ÕA=ÓB=ÒA<Ü?:Ù@:ÔA:ÍD<ÀD<²B7¡<2“9.Œ=0‡=0ƒ>/>.€=-<+€=,€=,9-9-9-}9.}9.|8-|8-{8/}:1}:1{;2{;2{;2{;2{;2{;2t;2s:1p:0o9/n8.m7-k7,k7,l8-l8-j8-j8-j8-j8-i9-i9-n91m80m80m80m80i7.f4+c1(c3)a1']-#_0&c4*\-#_0&sD:OK‚UPXQqSK^J?OC7?<-37(2:+/<+0<.2=/4<15;17:37:388688668557257227016/08-.8-0;-2?.6C27E48G48G48G46=53:2/4-,1*.1(13(57*6:)6>'DQ5[lHk„Zy–fwœfl”X^‡KWwEUuCRr@Rr@TtBVvDWwEWwEXxF[{I]}K[{I[{I]}K\|JXxFPfOAW@3I2icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUneVneVneVneVofWgklƒ‡ˆ£§¨¹¾ÁÐÕØåíðóûþõýÿùÿÿûÿÿüÿÿüþûýþùþýøÿþ÷ÿÿöóÿâñÿÞëùÖäòÎÛêÃÌÛ²³Â™ ¬„}‰cdnKLS4EI0HJ5KI:GE9D@7QEEk__‹€¤š™µ°­ÊÇÂÜÜÔççÝ÷óèÿýñÿøíÿÝÕú·±èŽŽÌbd±>CÃPIÉTMÉOJÃF@ÊFBÔMJØJIÑ??Ò>>Ô>?Õ?>Ö@?ÕA?ÓB?ÓB?ÒC?×>8×?:ÒC=ÌE?ÀE>±B9¢=5•;2Œ<1‡=0ƒ=1=0=-~<,€=-€=-~:/~:/~:/}9.}9.|8-{8/{8/~;2|<3|<3{;2{;2z;4z;4z;4p:0o9/o9/m9.l8-k7,j6+h6+i7,i7,h8,h8,h8,h8,h8,h8,o:4j81h6/i70j81j81e4-a0)e4-b1*].&a2*b3+Y*"_3*zNE~]XvWRiNGWC:J<3@:.:;-8<.08)/:,1<.2=/5=25;169078079468368349338138119.19..9+/:,1<.2?.5B18E4:I6;J7;C87?428.-3)-0%/1&24'48)4<'ER8_pPr‹d}šnwœifXT}EUrBTqASp@Sp@TqAUrBVsCVsCWtD[xH]zJ\yI^{K_|L\yIVsCK\JD8f\Z†|z«¡ŸÁ·µËÃÁÕÐÍãâÞîïé÷øðùöíüòèÿóéÿóíÿäß즤´if«K=³QDÁYNÇ[QÆQH¿D=ÂA<ËD@Ë@=Ï?>Ð@?ÑB>ÒC?ÒC?ÑC?ÑC?Ö>9Ô@<ÒD@ÉE@½D<¯@9 >5•<4Œ<3‡=2ƒ=1=0=/~<.=/€Qn>Qn>Qn>Qn>Qn>Sp@Sp@WtD[xH]zJ]zJ_|L_|LZwGQn>ESF6D7(6)gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXpgXpgXinrz‚…“š «´¹ÄÍÒÜåêì÷ùôþÿôþýöÿüúÿúûÿ÷ûþóøúìõöæòóãòþêôýèôüåóøáòöÛëëÏØ×¹ÅÄ¥±°’ŽregOMP;EL:EM>EODGSG~zqŸ›’ƽ¸ÙÎÌáÓÒçÛÛôêéü÷ôðïëûüöÿÿöÿþôÿúñÿôêÿçÞÿÚÒß‘}·fS¢K:²UF½WKµF;·@8ÈKEÇC>ÊC?ÌB?ÎC@ÎC>ÍD>ÍD>ÌC=Ô@<ÒC=ÎE?ÅD?¸A;ª=8ž;5•<4Œ<3‡=4ƒ=3=2=1~<0=1=/~:/~:/~:/}9.|90{8/{8/{8/|<3{;2{;2y:3y:3x92w81w81m80l7/j8/j8/i7.i7.g7-g7-g7-g7-f7-f7-f7-f7-f7-d8-i70h6/g5.f5.g6/h70g6/e6.a2*e6.^2)\0'`4+a5,i=4|PGQJBE>6:6-85,99/8:/47,36+4:.5;/5;/69.69.68-57,46+19,19,19,19,19,19,19,19,08+.9+.9+/:*0;+3>.6A17B2gw]umv‘nf‰_RwKAh;Mj:Nk;Pm=Pm=Nk;Nk;OlVsCZwG]zJ^{K_|L_|LVsCLi9=H@/:2#.&gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXqhYqhYcjpmtz„’£¬±¾ÉÍÓÞâåðòðüüòüûõþùøÿ÷úÿôüÿòúýìøùçöøãööìù÷ëúöêýöæÿôâøëØçØÁÖÆ¯À±šŸ“}vn[ZWFOQCQWKYcZbme–˜‹²²¦ÕÎÆêÜÙõããüéëÿñôÿ÷ùÿýýýþùøûôõûñúýòÿÿóÿÿóÿÿñÿãÊ¹q[¨WD¬SCµQB¹MA¿JAÂG@ÆE?ÉE@ÊE@ÊE>ÉD=ÈC<ÈC<ÒC?ÒD@ÌEAÂC=³=9¦;5œ;5•<6Œ<5‡<6ƒ=5=4<3~<0=1€<1~:/~:/~:/}9.|90{8/{8/y90{;2{;2z:1x92w81v70v70u6/k90j8/j8/j8/j8/h8.h8.h8.g7-f7-f7-f7-d8-d8-d8-d8-h6/h70i81i81h70i81j;3l=5g80k<4b6-a5,oC:xLCtI@uJA:=647036/7:18;247.14+25,58-58-57,46+46+46+46+46)/7(08)08)08)08)08)08+08+19,08+08+/7*08+19,3;.4e9Jg9Li;Nk=Nk=Li;Li;Mj

      UrDYvH[xJ]zL^{M\yKQn@Eb47@;+4/!*%gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVofWpgXpgXqhYriZhowmt|‚‹’¥®µÂÍÑÔßãäïñòþþóýüôÿùöÿ÷úÿôüÿñýÿíýÿêýÿêÿöñÿøóÿ÷ïÿ÷íÿöëÿïáöÜÍäʹƯ§”ƒ€sce]P[YM_bYovo|…€¦­¾À³ÚÖÍñãàÿìíÿñôÿñ÷ÿñ÷ÿ÷ûûúøøÿøøÿúôÿõîÿïòÿï÷ÿóÿñÖÿðÖÿȰÅ}g¢O=®Q@¸RD³C8ÀIAÄH@ÇF@ÇF@ÈE=ÇD<ÆC;ÆC;ÓD@ÐE@ÊE@¾A=±;7£74š93•<6Œ<5‡<6ƒ=5=4<3~;2<3=1~:/~:/~:/}9.|90{8/{8/y90z:1z:1y90w81v70u6/u6/t5.k90k90j8/j8/j8/i9/i9/h8.f7-f7-f7-d8-d8-d8-d8-d8-f5.i81l;4k:3j92j92m>6qB:n?7pD;g;2g;2SJŒaXTKpE<6=52913:27<5492/5+25,9<345-35*24)13(13(35(46)57*,7',7'-8(-8(-8(-8(-8(/7(19*08)08+/7*/7*/7*08+08+7@+9B-=D2=D2=A29;-35'/3$3:*JVBcr[f}a\wVLnICgA=c:He7Kh:Nk=Nk=Kh:Jg9Li;Nk=TqCWtFZwI[xJ]zLZwINk=A^05;9*0.!'%heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheTheVhdYkd\kd\md]meZmfVg`MjeOnlWnl]ff^eeeqqy‡‘“–ž¡«³¶ÃÈËÙÝàìíï÷÷÷ûùúþýûÿþúÿÿûýþøûüöùüóúýôùÿõùúõùúôøúïúûëûýèöùÞäçÈÒÖµ¶¼š”›ymvW\fK`lTq~lƒ‘€žŽ··µËËÉââàïïíôôòøøöúúøùù÷þþüþþüþþüþþüþþüþþüþþüþþüæÿÿðÿÿûÿÿýïîЪ§ a\™D=¸MEÄKBÈC:ÊA7ÎD:ÑH>ÏJAÉI>ÆG>ÁJ2¿K4¹L5¯K4 H2”F2ŒE3‡E5‚D5C6€@4‚>3…;2‡9/Š7/6-~:1~:1}90|8/{7.z7.y6-x5,w7-w7-x8.x8.v8-u7,s5*q3(h91h91h91g80h70g6/g6/g6/f5.h6/i70j81i70h6/f4-g2,k1-k4/n70m80k9.j:.i>.iB1dC2gJ8aJ8raOyn\ƒ|j…‚qOL;4:04:04:039/39/39/28.28.17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4.05//4./4..3-.3-/4./4.05/0;32=55A77C98D86B64@22?.3@.DQ=WeN\jSSaHHV=DR8FT:Ic>Ke@Ke@Ke>JeOjAUpGYtK\vO]wR]wTWpPHaC8Q3).2&+/$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheTheVhdYkd\kd\md]meZmfVjcPlgQmkVlj[gg_lll~~†’ž§±³¹ÁÄÏ×Úâçêðô÷ûüþÿÿÿÿþÿþýûÿþúÿÿûþÿùûüôøûòøûò÷ýóøùóøùñøúíøùéùûåòõÚáâÃÌЯ´¸—‘–vkrSYaI_kUtoŒ˜Š›©œÀÀ¾ÓÓÑççåóóñ÷÷õûûùüüúûûùþþüþþüþþüþþüþþüþþüþþüþþüîÿÿôÿÿüÿÿÿüúÿíêñ¿¸Ã}u¢J@³K@»J<ÅK>ÈJ>ÄD9½=2¿?6ÃD;ÂH3ÃJ7½M9³J7¦G5™C4D6‹F7ƒC7C8A7>5‚<4„:1†91‡81}:2}:2|91z:1y90x8/w7.v7.u6-v7.t8.t8.t8.r6,p4*o3)i81i81i81h70h70h70g6/g6/e3,e3,g5.h6/j81j81j81k92k60l71m80l:1k;/l>1j@0iD2hG6kP=gR?ufSvd‹†s†ƒrML:4:039/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4.05//4..3-.3-.3-.3-/4.05/-80/:21=34@66B66B66B45B16C1CPAO6BP7FT:Ic@Jd?Ke@Ke>Ic3L/).2',0$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheTheVhdYkd\kd\md]meZmfVmhTmhRmkVjk[jkcvxw‘‘™¨ª¶¾ÈÊÓÛÞêòõ÷üÿüÿÿþÿÿÿÿÿÿþÿþýûÿþúÿÿúýþøúûóõøïóöëñ÷ëô÷îöøíöøêö÷åõ÷áîîÔÛÛ¿ÉÊ«°±’“–yuy^kpZt{iˆ§œ¬¶­ÎÎÌÞÞÜïïíøøöûûùþþüþþüýýûþþüþþüþþüþþüþþüþþüþþüþþü÷ÿÿùÿÿþÿÿÿüúÿúôÿöíÿÑÄÙž•L=§Q@¬K;ª>1¸G9ÑXMÐTJ¾?6ÆD6ÇH9ÄJ=¹I=ªB7?5•A7’E=‡A9„A9@:>8~>5<4<4€;4x<2x<2w;1w;1v:0u9/t:/t:/s9.r9.r9.r9.q8-n8,l6*k5)j81j81j81j81i70i70i70h6/g5.g5.g5.g6/h70i81k:3k:3l;4k:3i:0j;1k?2lB4iD2fE2fI7lVAjYEviV†l‘Ž{€mEF439/28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4./4./4..3--2,-2,.3-/4./4.*5-+6.-9//;12>24@46B47D38E3?L:ER>CQ:;I28F->L3ES:H`>Jb@LdBKc?Ia=G`9F_8G`9RkDXpL]uS^vVZqTPgK=T8,C)).2',0%*.heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheTheVjcYkd\kd\md]meZmfVniUljSlkVlm]pqi€‚ž¡¨º¼ÈÃÍÏÜäçóûþûÿÿúþÿüýÿýýýüûùÿþüÿÿûÿþùûüôõöîîñæëîãçíáíñãðôåñôãòôßðòÜêêÐÙØ¼ÈÇ«²±•¡¡‡‘“}‘’€œžª­¢¶»´ÀÅ¿ÜÜÚééçööôûûùýýûÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüþþüüúÿÿþÿÿþÿöòïûôîÿýóÿûíÿõäêı·ƒn”Q>¡P=¸XH¸L?¸D7ÀG<Ç>4ÉD;ÈH?¿F>°?9¢;6š=8–A>?;‡@<@<}@;z?9y@9x?8v?8v=4v=4v=4u<3s=3r<2r<2q;1o;0o;0o;0l:/k9.j8-j8-i7,n72n72m61l71l71k60i70i70l:3j92h70g6/f7/f7/h91h91j?6f>4e=1f>2hC3iE5gF3cG2cJ6hV@k\GskV‡‚nŽzor_9>*28.28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3-.3-.3--2,-2,-2,-2,.3-.3-)4,)4,*6,+7-.:01=14@25A36C2:G5Æ=7ÈA;ÈD?ÀC?´<;©98 9:›==‘==Š>>„@?|A=xA6s>6s>6r=5p>5p>5p>5n>4n>4m=3l<2j;1j;1i:0i:0i:0p62p62p62o51m61m61k60i70l;4k:3h91e90e90e90e:1f;2dB6cA5cC4dD5fG5eH6cH3_I2^L6eV?jbKrmW„ƒn„‡r[`L3;&28.28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3--2,-2,,1+,1+,1+,1+-2,-2,,6.+5-*4,*4++5,.8-0:/2=/2=-5@06A05A-1=)1=)5A+9E/=O5AS9FY=I\@J]?J]=K^>L_?TgG\oQcvZbtZYkSK]G6G4$5"&+.$),"'*heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheTheVjcYkd\lc\md]meZlfVlgSljSlnXorasvm…„Ÿ¤ª¸¿ÉÖßäîöùùÿÿûÿÿùýÿþÿÿÿÿÿþýûÿÿûÿÿúüüôóõêëíâãçÙßãÕÜãÓäéÒçìÕéíÖêìÔëëÓèæÏßÚÄÔθÔÍºÍÆ¶ËøÐÉÁÙÒÌàÛØëååòîïòòðùù÷ýýûýýûýýûÿÿýþþüüüúþþüþþüþþüþþüþþüþþüþþüþþüÿøüÿöùÿýýþÿý÷ÿýïÿøëÿõòÿøëúçÿÿíÿïÛ̧”£lX£ZG­VCªM;ÁA8ÃB<ÃD>¿D?·?>­;;£99œ:;–<<Ž>?…?=}@=wB7o>7n?7o@8n?7m>6i=4h<3h<3h<3i=4r73q62q62p62o51m61l71j81h70g80e90e:1d<2f>4f@5gA6]C4aG8cL:dM;cM8`K6]K3]M4]Q9`Y?miPss[€„mt|eFO:2>(39/28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0*+0*+0*,1+-2,,6.,6.*4,*4+*4++5*-7,.9+-8*0;+4?/5@/4?.3>-3?+4@,7F/;J3@P6DT:GWºH=ºH>ºG@·F@°C@¦=:97—<;‘=;ˆ>;€A5i=4j>5j>5k?6s63r73q62p62n72l71j81i81d8/d90c;1d>3d@4cA5cA5bB5VG4^OmmSsw^z‚jcmU2>(5C,4:039/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1+,1++0**/)*/)+0*,1+,1++5-+5-*4,*4,+5,+5,,6+-7,,7)/:,2=/6A17B27B25@/4?.2?+5B.:G3>L5AO6ES:JX?M[BTbI]kTcqZ_lXUbPERA2>0#/#(..&,,$**heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdTjdVjcYkd\lc\md]lfZlfVomXmmUimVgkZembr{xŽ—œ¨±ºÊÓØäëñöþÿ÷üÿøüÿþÿÿÿÿÿúù÷ÿÿúýýõøøîðòåéëÝåéÚåéØåìÚæíÎèïÐéîÐæéÎèæÏèãÏáÚÈÙÏÃÚÍÄßÒÌìÞÛúììÿôöÿõùÿõûÿøþýýûÿÿýÿÿýþþüþþüÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüþþüÿüúÿýúÿûøùýüøÿÿôÿÿðÿÿêþüðÿûùÿûÿÿôÿöæÿôßÿãÍ×­”¢sY°SA®Q?®N>°O?±OB¯J@¥C:š<4—<7‘>8‰?6ƒ@7{B7tD6qE8nG8s>:s>:s>:q>:q>:q>:q>:p?:sB=rA8l=7l=7m>8n?9r73r73q73n72m82j81i81f:1f;2d>3d@4bB5`C5]A3\@2[?1QI4[S>f^Gg_H`Y?ZS9ZS7\W:ZV;WW;knSrx^u}eUaI%37E.4:04:04:039/39/39/28.28.17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0**/)*/)+0*+0*,1+)3+)3+*4,+5-+5,,6--7.-7,,6+.8-2=/6A39D69D67B46A1/<*2?-5B09F2:u@:s@9o>9o>9n72n72n93m;4l;4j;3g<3d<2c?3^>1dG9cG9T=-O8(M8'D/TR;PN7KI0MK2]Y>ieJeaDVU7XX<]`CosXz€fcmT=I1,:#1?(5;15;14:04:04:039/39/39/39/39/39/28.17-17-17-06,16016005/05//4./4./4./4.,1+,1+,1+,1+,1+,1++0*+0*.5.-4--4-,3,-4--4-.5-.5-+2*-4,08-5=29A6=E:?G7B25@03>-1<+2>*9E/BN8IU?O[EVbN]hWYdTLWIF5F4‰D4…D2}B0yB.s@-o?+v?:t=8u>9v?:t?9q<6r=7sA:q?8q?8q?8o>7o>7n=6n=6n=6l;4m<5m>6k?6j?6h@6eA5cA5dG9[A2^G7\I8N=+F7$G8%A4!IM4GK2DG,BE*MM1[[?abC`aBYY=dgJsw\sy_X`H8D,/;%6D-7=36<26<26<25;15;15;15;15;15;15;14:04:039/39/39/27127127116016016005/05/.3-.3--2,-2,,1+,1++0*+0**1**1*)0))0))0)*1*+2+,3,.5--4,.5-07/4;39@8?F>BIA:G69F56C13@.2?+5B.;I2?M6KXDR_KXeSVcRKWI8p;5q<6vA;sA:p>7r@9xG@n=6n=6n=6m>6l=5l=5l=5l=5g?5h@6gA6gC7eC7cC6`C5^D5aL;UB1ZI7`S@RG3C;&E=(GA+>G,BH.@F*<@%?B%LO2_`AijKaaEnqTvz_gmSHP84<%4=(=F18>48>48>48>47=37=37=36<28>48>47=37=37=36<26<26<25:449349349338238238227105/05//4..3--2,,1++0*+0*(/((/((/((/((/()0)*1*+2+070.5.+2++2+.5.5<5K:4-9/-3/-3/,2.gdUgdUheVheVheVheVifWifWifWifWifWifWifWifWifWifWleUldWlcZmd]md]mf^mg[khWmlWimThpXht`hthm|wˆ—𥴻ÀÉÐÔÛáéðööûÿúþÿýþÿÿÿýÿþúþþöýýñúûí÷úéô÷âîóÝçìÕàèÐÜà¿×Ú»ÖÖ¼Ù×ÂÝ×ÉßÖÍåÛÙìàâøìðüïöÿõûÿùþÿúýÿûûÿûûÿýúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüöÿþ÷ÿþúÿþþþÿÿüÿÿùÿÿøÿÿ÷þÿøÿÿøüÿùùÿýúÿÿøþÿøúÿõöÿóÿþìÿýéÿòßÿñÛÿðÚñÒ½³zyS3i?3i?3i?3f>2f>2f>2f>2aA4`C5`C5_C5^D5[D4ZE4VE3XI6OB/\T?oiSc^HMK4IG0LJ3;E*?H->G*48>47=37=37=39?58>48>48>48>48>48>48>47<67<67<66;56;56;55:45:438238216005//4.-2,,1+,1++0,+0,*/+*/++0,,1--2.-2.051.3/+0,+0,-2.2738=9'4.:0.5..5.-4-gdUgdUgdUheVheVifWifWifWifWifWifWifWifWifWifWifWleUldWlcZmd]md]mf^mg[khWkmWjnUiqYgs_drejyt…”—¡²¹¾ÇÎÓÚâèïõôùýùýÿýþÿÿÿýÿÿúÿÿøÿÿóþÿñûþë÷úåðõÞèîÔàéÎÛܽÕÕ¹ÑÑ·ÔѾÚÔÈáØÓêàßôéíþóùÿöþÿûÿÿýÿÿþÿÿþúÿþúþÿùþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüøÿÿøÿÿûÿÿþþþÿýþÿûüÿûúÿúúÿùùÿù÷ÿù÷ÿüùÿÿûþÿûûÿüùÿûùôîÿÿöÿþôÿýóÿüîÿ÷çùçÓéӾϴŸ¶š„•u`yVBlI5mH6rM;uP>mF7iB3gB2jE5nI9oJ:pK;oK;eA1eA1cB1cB1cB1cB1cB1bC1\G6\G6\G6ZG6YH6WH5TG4RG3PH3MH2fdM~~fprZVX@IM4HL3;E*A.;>+9?59?59?58>48>47=37=37=38>48>48>48>48>48>48>48>49>89>89>88=78=78=77<67<66;55:449338227105//4./4.-2.-2.,1-+0,+0,,1--2.-2.,1-,1-,1-,1-.21043376598:H7=L9@O<@O:8F91?2,9/.5.-4-,3,fcTfcTgdUheVheVifWjgXjgXifWifWifWifWifWifWifWifWleUldWlcZmd]md]mf^mg[khWkmWioUiqYgs_bpcgxr‚”– ³¹ÁÊÑÕÜäéðöõúþùýÿýÿþÿÿýÿÿúÿÿöÿÿôÿÿñÿÿïúýèò÷àéïÕàéÎÙÚ»ÑѵÍË´Î˺ÖÏÅßÕÓìâãøíóÿöþÿùÿÿüÿÿýÿÿÿýþÿúýÿ÷þÿøþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýýÿýþÿýþÿýÿþþþüþÿùþÿ÷ÿÿõýýóýýõþýøþýùÿþüÿýÿÿýÿÿþÿþùÿÿüÿÿúþúöõýøôÿþöÿþñÿþïÿûéÿóàöåÓåÓ¿Ò»©¹ŸŸƒuŽrd|]I}^JrVAaE0W;&Y=(Z?*X=(`E0`E0_F0_F0`G1`G1^H1^H1[L9ZM:ZM:XM9XM9UM8RL6QL6NL5QQ9ikS|€glrXSY?DM2>G,:G+48>48>48>47=37=38>48>48>48>49?59?5:?9:?9:?9:?99>89>89>88=78=78=77<66;55:4493382382/40.3/-2.,1-+0,+0,+0,+0,+/.,0/-10.21/32/32/32.210A.5F3;M7>P:=O7:L47I/6H.3E-6H0:L6MJ9EB1;A7;A7;A7;A7:@6:@6:@69?58>48>48>49?59?5:@6:@6:@6;@:;@:;@::?9:?99>89>89>8:?9:?99>89>88=78=77<67<6495273162/40-2.,1-+0,+/.,0/,0/-10.21.21.23-12,01):'/@-6H2;M5=O7?I.9F*?L0=J.AN2DN3HQ4LR6IN0JM0ZY;miLhdIc]C_YA_ZD`[GZUBQN=LI8=C9=C9=C989>89>8;@:;@:;@:;@::?9:?9:?9:?99>:8=95:6384162/40.3/.21.21.21-10-12,01,01-12-12$5"*<&3E/9K3XW9UT6SR3KE/JD.FA-D?,A>/@>1??3>@5<=5;>59?59A67B48C57C57D3:B79A69A68@58@59A69A6:B7:B7:B79A6:B7;C8F;7B:7C97A66A16?.4<-39-270.5./51-7/-9+-<%.B3J7O7Z 8Y$8W+:U2:R8;P==O?>O=:L6@R8EX:EZ;DY:>U93J0(>'.5-,3++2*ZgM[hN\hP_iQakSckTglXhkXghVihVifWifWkeWmeXmeZnf[khWkhYkg[kg^jf]jf]hfZgeVgjWglVfoZerajwnzЉ𫲷ÉÓÑØÞáéìò÷úøþþùþúúÿøûþóúüï÷úé÷øæõôâíìØéæÓåâÏÜ×ÄÑ̹˾­Á´¤º¬Ÿ¼¯§Á¶²ÌÀÀÛÐÖèÞæûóþý÷ÿþûÿÿþÿþýÿüýÿüýÿüýÿþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿýúÿýúÿüùÿüùÿýùÿýùÿþúÿþýÿýüÿüûÿýþÿþÿÿþÿÿýþýûüÿþÿÿýýÿüùÿøóøíçòåÝöèßÿïçÿûÿÿýÿÿýþÿÿýÿÿûýÿüýÿþüýÿýþÿþýÿÿýÿÿýþÿý÷ÿþîÿÿæÿÿâ÷÷ßýûââàÇ‹‡lRM0TM0QK+SJ+WN/UO/UN1TO1SO2QP4QP4PP6QM2PO3PN5PP6MO7KO6HM6EM5HQ6EN3BK.AH)BI(GM+JP,KQ-NR/PT1VZ9^aBaaE[[?VVVV>XV=YW>XW;XW9WV8VU7QK5OI3LG3ID1DA2B@3??3>@5<=5;>59?59A67B48C57C57D3:B79A69A68@58@59A69A6:B7:B7:B7:B7:B7;C8F;76<83=51=/3B+9M*BY-Ia1Nq7Mn9Ji=Fa>AY?:L<:K9=O9DV5:@69A67B47B47C57D3:B7:B79A69A69A69A6:B7:B7:B7:B7:B7:B7;C8F;>F;>IA>J@?I>>I9?H7>F7>D8=B;>E>;A=6@85A39H1BV3Pg;ZrB]€F\}HVuIMhEBZ@9N;5G74E3XR6F;?G<>H=>I9?H7>F7>D8=B;=D=;A=6@85A39H1DX5Ri=]uEY|BXyDRqEIdA,6H2@R8L_AQfGShIMdH@W=4J329107/-4,YgMZhN\hP^jRblTemVgoZjo[lo\lm[mk\mj[nhZnhZoi]ph]liXkhYjfZie\ie\ie\ig[igXfiVchRajUerao|s{‹ŠŽŸ¦Ÿ±»ÂËÒÕÜäéðöòúüôúøñöðíðçéëÞáãÕÚÛËÒÑ¿ÌɶÉıþ«¾¹¦»´¢Ë¾®ÓŸÝÏÄæÙÑíâà÷ëíÿôúÿøÿÿ÷ÿÿúÿÿüÿþýÿýüÿûüþüþýþÿÿþþþþþþþþþþþþþþþþþþÿþüÿþüþýûÿüùÿýúÿýúÿýúÿû÷ÿúöþùõÿýüÿûúýùøüúûþüýÿýþÿþÿÿýþÿüýÿüüÿüùÿøó÷ìæòåÝøêáÿóëÿûÿÿýÿÿýþÿÿûÿÿûýÿúýÿüüýÿüýÿþýÿÿþÿÿþýÿþõÿüìÿüãÿúÝþýèÿÿëåãÌŒˆoRL2UN2TM0WN1VM.UO/WP3VQ3UQ4QP2ON2MM1PL1NM1NL3MM3LN6LP7KP9JR:LU:IR7JS6QX9SZ9U[9]c?gmI€”a’¦sŸ±š«’¡xˆ”pr|Z\bFLP7KM7LK6KI4NI5PK7TM:VP:WQ;VP:SN:QL9LI:IG:EE9CE:=>6F;?G<=G<=H8>G6=E6=C7=B;:A:9?;5?75A39H1BV3Ne9Wo?Sv /* to declare isdigit() */ - - -#if TRANSFORMS_SUPPORTED - -/* - * Lossless image transformation routines. These routines work on DCT - * coefficient arrays and thus do not require any lossy decompression - * or recompression of the image. - * Thanks to Guido Vollbeding for the initial design and code of this feature, - * and to Ben Jackson for introducing the cropping feature. - * - * Horizontal flipping is done in-place, using a single top-to-bottom - * pass through the virtual source array. It will thus be much the - * fastest option for images larger than main memory. - * - * The other routines require a set of destination virtual arrays, so they - * need twice as much memory as jpegtran normally does. The destination - * arrays are always written in normal scan order (top to bottom) because - * the virtual array manager expects this. The source arrays will be scanned - * in the corresponding order, which means multiple passes through the source - * arrays for most of the transforms. That could result in much thrashing - * if the image is larger than main memory. - * - * If cropping or trimming is involved, the destination arrays may be smaller - * than the source arrays. Note it is not possible to do horizontal flip - * in-place when a nonzero Y crop offset is specified, since we'd have to move - * data from one block row to another but the virtual array manager doesn't - * guarantee we can touch more than one row at a time. So in that case, - * we have to use a separate destination array. - * - * Some notes about the operating environment of the individual transform - * routines: - * 1. Both the source and destination virtual arrays are allocated from the - * source JPEG object, and therefore should be manipulated by calling the - * source's memory manager. - * 2. The destination's component count should be used. It may be smaller - * than the source's when forcing to grayscale. - * 3. Likewise the destination's sampling factors should be used. When - * forcing to grayscale the destination's sampling factors will be all 1, - * and we may as well take that as the effective iMCU size. - * 4. When "trim" is in effect, the destination's dimensions will be the - * trimmed values but the source's will be untrimmed. - * 5. When "crop" is in effect, the destination's dimensions will be the - * cropped values but the source's will be uncropped. Each transform - * routine is responsible for picking up source data starting at the - * correct X and Y offset for the crop region. (The X and Y offsets - * passed to the transform routines are measured in iMCU blocks of the - * destination.) - * 6. All the routines assume that the source and destination buffers are - * padded out to a full iMCU boundary. This is true, although for the - * source buffer it is an undocumented property of jdcoefct.c. - */ - - -/* Drop code may be used with or without virtual memory adaptation code. - * This code has some dependencies on internal library behavior, so you - * may choose to disable it. For example, it doesn't make a difference - * if you only use jmemnobs anyway. - */ -#ifndef DROP_REQUEST_FROM_SRC -#define DROP_REQUEST_FROM_SRC 1 /* 0 disables adaptation */ -#endif - - -#if DROP_REQUEST_FROM_SRC -/* Force jpeg_read_coefficients to request - * the virtual coefficient arrays from - * the source decompression object. - */ -METHODDEF(jvirt_barray_ptr) -drop_request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero, - JDIMENSION blocksperrow, JDIMENSION numrows, - JDIMENSION maxaccess) -{ - j_common_ptr srcinfo = (j_common_ptr) cinfo->client_data; - - return (*srcinfo->mem->request_virt_barray) - (srcinfo, pool_id, pre_zero, - blocksperrow, numrows, maxaccess); -} - - -/* Force jpeg_read_coefficients to return - * after requesting and before accessing - * the virtual coefficient arrays. - */ -METHODDEF(int) -drop_consume_input (j_decompress_ptr cinfo) -{ - return JPEG_SUSPENDED; -} - - -METHODDEF(void) -drop_start_input_pass (j_decompress_ptr cinfo) -{ - cinfo->inputctl->consume_input = drop_consume_input; -} - - -LOCAL(void) -drop_request_from_src (j_decompress_ptr dropinfo, j_decompress_ptr srcinfo) -{ - void *save_client_data; - JMETHOD(jvirt_barray_ptr, save_request_virt_barray, - (j_common_ptr cinfo, int pool_id, boolean pre_zero, - JDIMENSION blocksperrow, JDIMENSION numrows, JDIMENSION maxaccess)); - JMETHOD(void, save_start_input_pass, (j_decompress_ptr cinfo)); - - /* Set custom method pointers, save original pointers */ - save_client_data = dropinfo->client_data; - dropinfo->client_data = (void *) srcinfo; - save_request_virt_barray = dropinfo->mem->request_virt_barray; - dropinfo->mem->request_virt_barray = drop_request_virt_barray; - save_start_input_pass = dropinfo->inputctl->start_input_pass; - dropinfo->inputctl->start_input_pass = drop_start_input_pass; - - /* Execute only initialization part. - * Requested coefficient arrays will be realized later by the srcinfo object. - * Next call to the same function will then do the actual data reading. - * NB: since we request the coefficient arrays from another object, - * the inherent realization call is effectively a no-op. - */ - (void) jpeg_read_coefficients(dropinfo); - - /* Reset method pointers */ - dropinfo->client_data = save_client_data; - dropinfo->mem->request_virt_barray = save_request_virt_barray; - dropinfo->inputctl->start_input_pass = save_start_input_pass; - /* Do input initialization for first scan now, - * which also resets the consume_input method. - */ - (*save_start_input_pass)(dropinfo); -} -#endif /* DROP_REQUEST_FROM_SRC */ - - -LOCAL(void) -dequant_comp (j_decompress_ptr cinfo, jpeg_component_info *compptr, - jvirt_barray_ptr coef_array, JQUANT_TBL *qtblptr1) -{ - JDIMENSION blk_x, blk_y; - int offset_y, k; - JQUANT_TBL *qtblptr; - JBLOCKARRAY buffer; - JBLOCKROW block; - JCOEFPTR ptr; - - qtblptr = compptr->quant_table; - for (blk_y = 0; blk_y < compptr->height_in_blocks; - blk_y += compptr->v_samp_factor) { - buffer = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef_array, blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - block = buffer[offset_y]; - for (blk_x = 0; blk_x < compptr->width_in_blocks; blk_x++) { - ptr = block[blk_x]; - for (k = 0; k < DCTSIZE2; k++) - if (qtblptr->quantval[k] != qtblptr1->quantval[k]) - ptr[k] *= qtblptr->quantval[k] / qtblptr1->quantval[k]; - } - } - } -} - - -LOCAL(void) -requant_comp (j_decompress_ptr cinfo, jpeg_component_info *compptr, - jvirt_barray_ptr coef_array, JQUANT_TBL *qtblptr1) -{ - JDIMENSION blk_x, blk_y; - int offset_y, k; - JQUANT_TBL *qtblptr; - JBLOCKARRAY buffer; - JBLOCKROW block; - JCOEFPTR ptr; - JCOEF temp, qval; - - qtblptr = compptr->quant_table; - for (blk_y = 0; blk_y < compptr->height_in_blocks; - blk_y += compptr->v_samp_factor) { - buffer = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef_array, blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - block = buffer[offset_y]; - for (blk_x = 0; blk_x < compptr->width_in_blocks; blk_x++) { - ptr = block[blk_x]; - for (k = 0; k < DCTSIZE2; k++) { - temp = qtblptr->quantval[k]; - qval = qtblptr1->quantval[k]; - if (temp != qval) { - temp *= ptr[k]; - /* The following quantization code is a copy from jcdctmgr.c */ -#ifdef FAST_DIVIDE -#define DIVIDE_BY(a,b) a /= b -#else -#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0 -#endif - if (temp < 0) { - temp = -temp; - temp += qval>>1; /* for rounding */ - DIVIDE_BY(temp, qval); - temp = -temp; - } else { - temp += qval>>1; /* for rounding */ - DIVIDE_BY(temp, qval); - } - ptr[k] = temp; - } - } - } - } - } -} - - -/* Calculate largest common denominator with Euclid's algorithm. - */ -LOCAL(JCOEF) -largest_common_denominator(JCOEF a, JCOEF b) -{ - JCOEF c; - - do { - c = a % b; - a = b; - b = c; - } while (c); - - return a; -} - - -LOCAL(void) -adjust_quant(j_decompress_ptr srcinfo, jvirt_barray_ptr *src_coef_arrays, - j_decompress_ptr dropinfo, jvirt_barray_ptr *drop_coef_arrays, - boolean trim, j_compress_ptr dstinfo) -{ - jpeg_component_info *compptr1, *compptr2; - JQUANT_TBL *qtblptr1, *qtblptr2, *qtblptr3; - int ci, k; - - for (ci = 0; ci < dstinfo->num_components && - ci < dropinfo->num_components; ci++) { - compptr1 = srcinfo->comp_info + ci; - compptr2 = dropinfo->comp_info + ci; - qtblptr1 = compptr1->quant_table; - qtblptr2 = compptr2->quant_table; - for (k = 0; k < DCTSIZE2; k++) { - if (qtblptr1->quantval[k] != qtblptr2->quantval[k]) { - if (trim) - requant_comp(dropinfo, compptr2, drop_coef_arrays[ci], qtblptr1); - else { - qtblptr3 = dstinfo->quant_tbl_ptrs[compptr1->quant_tbl_no]; - for (k = 0; k < DCTSIZE2; k++) - if (qtblptr1->quantval[k] != qtblptr2->quantval[k]) - qtblptr3->quantval[k] = largest_common_denominator - (qtblptr1->quantval[k], qtblptr2->quantval[k]); - dequant_comp(srcinfo, compptr1, src_coef_arrays[ci], qtblptr3); - dequant_comp(dropinfo, compptr2, drop_coef_arrays[ci], qtblptr3); - } - break; - } - } - } -} - - -LOCAL(void) -do_drop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - j_decompress_ptr dropinfo, jvirt_barray_ptr *drop_coef_arrays, - JDIMENSION drop_width, JDIMENSION drop_height) -/* Drop. If the dropinfo component number is smaller than the destination's, - * we fill in the remaining components with zero. This provides the feature - * of dropping grayscale into (arbitrarily sampled) color images. - */ -{ - JDIMENSION comp_width, comp_height; - JDIMENSION blk_y, x_drop_blocks, y_drop_blocks; - int ci, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - jpeg_component_info *compptr; - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = drop_width * compptr->h_samp_factor; - comp_height = drop_height * compptr->v_samp_factor; - x_drop_blocks = x_crop_offset * compptr->h_samp_factor; - y_drop_blocks = y_crop_offset * compptr->v_samp_factor; - for (blk_y = 0; blk_y < comp_height; blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], blk_y + y_drop_blocks, - (JDIMENSION) compptr->v_samp_factor, TRUE); - if (ci < dropinfo->num_components) { -#if DROP_REQUEST_FROM_SRC - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, drop_coef_arrays[ci], blk_y, -#else - src_buffer = (*dropinfo->mem->access_virt_barray) - ((j_common_ptr) dropinfo, drop_coef_arrays[ci], blk_y, -#endif - (JDIMENSION) compptr->v_samp_factor, FALSE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - jcopy_block_row(src_buffer[offset_y], - dst_buffer[offset_y] + x_drop_blocks, - comp_width); - } - } else { - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - FMEMZERO(dst_buffer[offset_y] + x_drop_blocks, - comp_width * SIZEOF(JBLOCK)); - } - } - } - } -} - - -LOCAL(void) -do_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* Crop. This is only used when no rotate/flip is requested with the crop. */ -{ - JDIMENSION dst_blk_y, x_crop_blocks, y_crop_blocks; - int ci, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - jpeg_component_info *compptr; - - /* We simply have to copy the right amount of data (the destination's - * image size) starting at the given X and Y offsets in the source. - */ - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - y_crop_blocks = y_crop_offset * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_y + y_crop_blocks, - (JDIMENSION) compptr->v_samp_factor, FALSE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, - dst_buffer[offset_y], - compptr->width_in_blocks); - } - } - } -} - - -LOCAL(void) -do_crop_ext_zero (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* Crop. This is only used when no rotate/flip is requested with the crop. - * Extension: If the destination size is larger than the source, we fill in - * the extra area with zero (neutral gray). Note we also have to zero partial - * iMCUs at the right and bottom edge of the source image area in this case. - */ -{ - JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height; - JDIMENSION dst_blk_y, x_crop_blocks, y_crop_blocks; - int ci, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - jpeg_component_info *compptr; - - MCU_cols = srcinfo->output_width / - (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); - MCU_rows = srcinfo->output_height / - (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - comp_height = MCU_rows * compptr->v_samp_factor; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - y_crop_blocks = y_crop_offset * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - if (dstinfo->jpeg_height > srcinfo->output_height) { - if (dst_blk_y < y_crop_blocks || - dst_blk_y >= y_crop_blocks + comp_height) { - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - FMEMZERO(dst_buffer[offset_y], - compptr->width_in_blocks * SIZEOF(JBLOCK)); - } - continue; - } - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_y - y_crop_blocks, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } else { - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_y + y_crop_blocks, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - if (dstinfo->jpeg_width > srcinfo->output_width) { - if (x_crop_blocks > 0) { - FMEMZERO(dst_buffer[offset_y], - x_crop_blocks * SIZEOF(JBLOCK)); - } - jcopy_block_row(src_buffer[offset_y], - dst_buffer[offset_y] + x_crop_blocks, - comp_width); - if (compptr->width_in_blocks > x_crop_blocks + comp_width) { - FMEMZERO(dst_buffer[offset_y] + - x_crop_blocks + comp_width, - (compptr->width_in_blocks - - x_crop_blocks - comp_width) * SIZEOF(JBLOCK)); - } - } else { - jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, - dst_buffer[offset_y], - compptr->width_in_blocks); - } - } - } - } -} - - -LOCAL(void) -do_crop_ext_flat (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* Crop. This is only used when no rotate/flip is requested with the crop. - * Extension: The destination width is larger than the source and we fill in - * the extra area with the DC of the adjacent block. Note we also have to - * fill partial iMCUs at the right and bottom edge of the source image area - * in this case. - */ -{ - JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height; - JDIMENSION dst_blk_x, dst_blk_y, x_crop_blocks, y_crop_blocks; - int ci, offset_y; - JCOEF dc; - JBLOCKARRAY src_buffer, dst_buffer; - jpeg_component_info *compptr; - - MCU_cols = srcinfo->output_width / - (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); - MCU_rows = srcinfo->output_height / - (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - comp_height = MCU_rows * compptr->v_samp_factor; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - y_crop_blocks = y_crop_offset * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - if (dstinfo->jpeg_height > srcinfo->output_height) { - if (dst_blk_y < y_crop_blocks || - dst_blk_y >= y_crop_blocks + comp_height) { - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - FMEMZERO(dst_buffer[offset_y], - compptr->width_in_blocks * SIZEOF(JBLOCK)); - } - continue; - } - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_y - y_crop_blocks, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } else { - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_y + y_crop_blocks, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - if (x_crop_blocks > 0) { - FMEMZERO(dst_buffer[offset_y], - x_crop_blocks * SIZEOF(JBLOCK)); - dc = src_buffer[offset_y][0][0]; - for (dst_blk_x = 0; dst_blk_x < x_crop_blocks; dst_blk_x++) { - dst_buffer[offset_y][dst_blk_x][0] = dc; - } - } - jcopy_block_row(src_buffer[offset_y], - dst_buffer[offset_y] + x_crop_blocks, - comp_width); - if (compptr->width_in_blocks > x_crop_blocks + comp_width) { - FMEMZERO(dst_buffer[offset_y] + - x_crop_blocks + comp_width, - (compptr->width_in_blocks - - x_crop_blocks - comp_width) * SIZEOF(JBLOCK)); - dc = src_buffer[offset_y][comp_width - 1][0]; - for (dst_blk_x = x_crop_blocks + comp_width; - dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { - dst_buffer[offset_y][dst_blk_x][0] = dc; - } - } - } - } - } -} - - -LOCAL(void) -do_crop_ext_reflect (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* Crop. This is only used when no rotate/flip is requested with the crop. - * Extension: The destination width is larger than the source and we fill in - * the extra area with repeated reflections of the source region. Note we - * also have to fill partial iMCUs at the right and bottom edge of the source - * image area in this case. - */ -{ - JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, src_blk_x; - JDIMENSION dst_blk_x, dst_blk_y, x_crop_blocks, y_crop_blocks; - int ci, k, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JBLOCKROW src_row_ptr, dst_row_ptr; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - MCU_cols = srcinfo->output_width / - (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); - MCU_rows = srcinfo->output_height / - (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - comp_height = MCU_rows * compptr->v_samp_factor; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - y_crop_blocks = y_crop_offset * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - if (dstinfo->jpeg_height > srcinfo->output_height) { - if (dst_blk_y < y_crop_blocks || - dst_blk_y >= y_crop_blocks + comp_height) { - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - FMEMZERO(dst_buffer[offset_y], - compptr->width_in_blocks * SIZEOF(JBLOCK)); - } - continue; - } - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_y - y_crop_blocks, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } else { - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_y + y_crop_blocks, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - /* Copy source region */ - jcopy_block_row(src_buffer[offset_y], - dst_buffer[offset_y] + x_crop_blocks, - comp_width); - if (x_crop_blocks > 0) { - /* Reflect to left */ - dst_row_ptr = dst_buffer[offset_y] + x_crop_blocks; - for (dst_blk_x = x_crop_blocks; dst_blk_x > 0;) { - src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ - for (src_blk_x = comp_width; src_blk_x > 0 && dst_blk_x > 0; - src_blk_x--, dst_blk_x--) { - dst_ptr = *--dst_row_ptr; /* destination goes left */ - src_ptr = *src_row_ptr++; /* source goes right */ - /* this unrolled loop doesn't need to know which row it's on... */ - for (k = 0; k < DCTSIZE2; k += 2) { - *dst_ptr++ = *src_ptr++; /* copy even column */ - *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */ - } - } - } - } - if (compptr->width_in_blocks > x_crop_blocks + comp_width) { - /* Reflect to right */ - dst_row_ptr = dst_buffer[offset_y] + x_crop_blocks + comp_width; - for (dst_blk_x = compptr->width_in_blocks - x_crop_blocks - comp_width; - dst_blk_x > 0;) { - src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ - for (src_blk_x = comp_width; src_blk_x > 0 && dst_blk_x > 0; - src_blk_x--, dst_blk_x--) { - dst_ptr = *dst_row_ptr++; /* destination goes right */ - src_ptr = *--src_row_ptr; /* source goes left */ - /* this unrolled loop doesn't need to know which row it's on... */ - for (k = 0; k < DCTSIZE2; k += 2) { - *dst_ptr++ = *src_ptr++; /* copy even column */ - *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */ - } - } - } - } - } - } - } -} - - -LOCAL(void) -do_wipe (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - JDIMENSION drop_width, JDIMENSION drop_height) -/* Wipe - drop content of specified area, fill with zero (neutral gray) */ -{ - JDIMENSION x_wipe_blocks, wipe_width; - JDIMENSION y_wipe_blocks, wipe_bottom; - int ci, offset_y; - JBLOCKARRAY buffer; - jpeg_component_info *compptr; - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - x_wipe_blocks = x_crop_offset * compptr->h_samp_factor; - wipe_width = drop_width * compptr->h_samp_factor; - y_wipe_blocks = y_crop_offset * compptr->v_samp_factor; - wipe_bottom = drop_height * compptr->v_samp_factor + y_wipe_blocks; - for (; y_wipe_blocks < wipe_bottom; - y_wipe_blocks += compptr->v_samp_factor) { - buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], y_wipe_blocks, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - FMEMZERO(buffer[offset_y] + x_wipe_blocks, - wipe_width * SIZEOF(JBLOCK)); - } - } - } -} - - -LOCAL(void) -do_flatten (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - JDIMENSION drop_width, JDIMENSION drop_height) -/* Flatten - drop content of specified area, similar to wipe, - * but fill with average of adjacent blocks, instead of zero. - */ -{ - JDIMENSION x_wipe_blocks, wipe_width, wipe_right; - JDIMENSION y_wipe_blocks, wipe_bottom, blk_x; - int ci, offset_y, dc_left_value, dc_right_value, average; - JBLOCKARRAY buffer; - jpeg_component_info *compptr; - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - x_wipe_blocks = x_crop_offset * compptr->h_samp_factor; - wipe_width = drop_width * compptr->h_samp_factor; - wipe_right = wipe_width + x_wipe_blocks; - y_wipe_blocks = y_crop_offset * compptr->v_samp_factor; - wipe_bottom = drop_height * compptr->v_samp_factor + y_wipe_blocks; - for (; y_wipe_blocks < wipe_bottom; - y_wipe_blocks += compptr->v_samp_factor) { - buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], y_wipe_blocks, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - FMEMZERO(buffer[offset_y] + x_wipe_blocks, - wipe_width * SIZEOF(JBLOCK)); - if (x_wipe_blocks > 0) { - dc_left_value = buffer[offset_y][x_wipe_blocks - 1][0]; - if (wipe_right < compptr->width_in_blocks) { - dc_right_value = buffer[offset_y][wipe_right][0]; - average = (dc_left_value + dc_right_value) >> 1; - } else { - average = dc_left_value; - } - } else if (wipe_right < compptr->width_in_blocks) { - average = buffer[offset_y][wipe_right][0]; - } else continue; - for (blk_x = x_wipe_blocks; blk_x < wipe_right; blk_x++) { - buffer[offset_y][blk_x][0] = (JCOEF) average; - } - } - } - } -} - - -LOCAL(void) -do_reflect (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - JDIMENSION drop_width, JDIMENSION drop_height) -/* Reflect - drop content of specified area, similar to wipe, but - * fill with repeated reflections of the outside area, instead of zero. - * NB: y_crop_offset is assumed to be zero. - */ -{ - JDIMENSION x_wipe_blocks, wipe_width; - JDIMENSION y_wipe_blocks, wipe_bottom; - JDIMENSION src_blk_x, dst_blk_x; - int ci, k, offset_y; - JBLOCKARRAY buffer; - JBLOCKROW src_row_ptr, dst_row_ptr; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - x_wipe_blocks = x_crop_offset * compptr->h_samp_factor; - wipe_width = drop_width * compptr->h_samp_factor; - wipe_bottom = drop_height * compptr->v_samp_factor; - for (y_wipe_blocks = 0; y_wipe_blocks < wipe_bottom; - y_wipe_blocks += compptr->v_samp_factor) { - buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], y_wipe_blocks, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - if (x_wipe_blocks > 0) { - /* Reflect from left */ - dst_row_ptr = buffer[offset_y] + x_wipe_blocks; - for (dst_blk_x = wipe_width; dst_blk_x > 0;) { - src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ - for (src_blk_x = x_wipe_blocks; - src_blk_x > 0 && dst_blk_x > 0; src_blk_x--, dst_blk_x--) { - dst_ptr = *dst_row_ptr++; /* destination goes right */ - src_ptr = *--src_row_ptr; /* source goes left */ - /* this unrolled loop doesn't need to know which row it's on... */ - for (k = 0; k < DCTSIZE2; k += 2) { - *dst_ptr++ = *src_ptr++; /* copy even column */ - *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */ - } - } - } - } else if (compptr->width_in_blocks > x_wipe_blocks + wipe_width) { - /* Reflect from right */ - dst_row_ptr = buffer[offset_y] + x_wipe_blocks + wipe_width; - for (dst_blk_x = wipe_width; dst_blk_x > 0;) { - src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ - src_blk_x = compptr->width_in_blocks - x_wipe_blocks - wipe_width; - for (; src_blk_x > 0 && dst_blk_x > 0; src_blk_x--, dst_blk_x--) { - dst_ptr = *--dst_row_ptr; /* destination goes left */ - src_ptr = *src_row_ptr++; /* source goes right */ - /* this unrolled loop doesn't need to know which row it's on... */ - for (k = 0; k < DCTSIZE2; k += 2) { - *dst_ptr++ = *src_ptr++; /* copy even column */ - *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */ - } - } - } - } else { - FMEMZERO(buffer[offset_y] + x_wipe_blocks, - wipe_width * SIZEOF(JBLOCK)); - } - } - } - } -} - - -LOCAL(void) -do_flip_h_no_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, - jvirt_barray_ptr *src_coef_arrays) -/* Horizontal flip; done in-place, so no separate dest array is required. - * NB: this only works when y_crop_offset is zero. - */ -{ - JDIMENSION MCU_cols, comp_width, blk_x, blk_y, x_crop_blocks; - int ci, k, offset_y; - JBLOCKARRAY buffer; - JCOEFPTR ptr1, ptr2; - JCOEF temp1, temp2; - jpeg_component_info *compptr; - - /* Horizontal mirroring of DCT blocks is accomplished by swapping - * pairs of blocks in-place. Within a DCT block, we perform horizontal - * mirroring by changing the signs of odd-numbered columns. - * Partial iMCUs at the right edge are left untouched. - */ - MCU_cols = srcinfo->output_width / - (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - for (blk_y = 0; blk_y < compptr->height_in_blocks; - blk_y += compptr->v_samp_factor) { - buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - /* Do the mirroring */ - for (blk_x = 0; blk_x * 2 < comp_width; blk_x++) { - ptr1 = buffer[offset_y][blk_x]; - ptr2 = buffer[offset_y][comp_width - blk_x - 1]; - /* this unrolled loop doesn't need to know which row it's on... */ - for (k = 0; k < DCTSIZE2; k += 2) { - temp1 = *ptr1; /* swap even column */ - temp2 = *ptr2; - *ptr1++ = temp2; - *ptr2++ = temp1; - temp1 = *ptr1; /* swap odd column with sign change */ - temp2 = *ptr2; - *ptr1++ = -temp2; - *ptr2++ = -temp1; - } - } - if (x_crop_blocks > 0) { - /* Now left-justify the portion of the data to be kept. - * We can't use a single jcopy_block_row() call because that routine - * depends on memcpy(), whose behavior is unspecified for overlapping - * source and destination areas. Sigh. - */ - for (blk_x = 0; blk_x < compptr->width_in_blocks; blk_x++) { - jcopy_block_row(buffer[offset_y] + blk_x + x_crop_blocks, - buffer[offset_y] + blk_x, - (JDIMENSION) 1); - } - } - } - } - } -} - - -LOCAL(void) -do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* Horizontal flip in general cropping case */ -{ - JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y; - JDIMENSION x_crop_blocks, y_crop_blocks; - int ci, k, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JBLOCKROW src_row_ptr, dst_row_ptr; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - /* Here we must output into a separate array because we can't touch - * different rows of a single virtual array simultaneously. Otherwise, - * this is essentially the same as the routine above. - */ - MCU_cols = srcinfo->output_width / - (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - y_crop_blocks = y_crop_offset * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_y + y_crop_blocks, - (JDIMENSION) compptr->v_samp_factor, FALSE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - dst_row_ptr = dst_buffer[offset_y]; - src_row_ptr = src_buffer[offset_y]; - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { - if (x_crop_blocks + dst_blk_x < comp_width) { - /* Do the mirrorable blocks */ - dst_ptr = dst_row_ptr[dst_blk_x]; - src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; - /* this unrolled loop doesn't need to know which row it's on... */ - for (k = 0; k < DCTSIZE2; k += 2) { - *dst_ptr++ = *src_ptr++; /* copy even column */ - *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */ - } - } else { - /* Copy last partial block(s) verbatim */ - jcopy_block_row(src_row_ptr + dst_blk_x + x_crop_blocks, - dst_row_ptr + dst_blk_x, - (JDIMENSION) 1); - } - } - } - } - } -} - - -LOCAL(void) -do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* Vertical flip */ -{ - JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; - JDIMENSION x_crop_blocks, y_crop_blocks; - int ci, i, j, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JBLOCKROW src_row_ptr, dst_row_ptr; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - /* We output into a separate array because we can't touch different - * rows of the source virtual array simultaneously. Otherwise, this - * is a pretty straightforward analog of horizontal flip. - * Within a DCT block, vertical mirroring is done by changing the signs - * of odd-numbered rows. - * Partial iMCUs at the bottom edge are copied verbatim. - */ - MCU_rows = srcinfo->output_height / - (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_height = MCU_rows * compptr->v_samp_factor; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - y_crop_blocks = y_crop_offset * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - if (y_crop_blocks + dst_blk_y < comp_height) { - /* Row is within the mirrorable area. */ - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - comp_height - y_crop_blocks - dst_blk_y - - (JDIMENSION) compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } else { - /* Bottom-edge blocks will be copied verbatim. */ - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_y + y_crop_blocks, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - if (y_crop_blocks + dst_blk_y < comp_height) { - /* Row is within the mirrorable area. */ - dst_row_ptr = dst_buffer[offset_y]; - src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; - src_row_ptr += x_crop_blocks; - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; - dst_blk_x++) { - dst_ptr = dst_row_ptr[dst_blk_x]; - src_ptr = src_row_ptr[dst_blk_x]; - for (i = 0; i < DCTSIZE; i += 2) { - /* copy even row */ - for (j = 0; j < DCTSIZE; j++) - *dst_ptr++ = *src_ptr++; - /* copy odd row with sign change */ - for (j = 0; j < DCTSIZE; j++) - *dst_ptr++ = - *src_ptr++; - } - } - } else { - /* Just copy row verbatim. */ - jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, - dst_buffer[offset_y], - compptr->width_in_blocks); - } - } - } - } -} - - -LOCAL(void) -do_transpose (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* Transpose source into destination */ -{ - JDIMENSION dst_blk_x, dst_blk_y, x_crop_blocks, y_crop_blocks; - int ci, i, j, offset_x, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - /* Transposing pixels within a block just requires transposing the - * DCT coefficients. - * Partial iMCUs at the edges require no special treatment; we simply - * process all the available DCT blocks for every component. - */ - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - y_crop_blocks = y_crop_offset * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; - dst_blk_x += compptr->h_samp_factor) { - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_x + x_crop_blocks, - (JDIMENSION) compptr->h_samp_factor, FALSE); - for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { - dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; - src_ptr = src_buffer[offset_x][dst_blk_y + offset_y + y_crop_blocks]; - for (i = 0; i < DCTSIZE; i++) - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - } - } - } - } - } -} - - -LOCAL(void) -do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* 90 degree rotation is equivalent to - * 1. Transposing the image; - * 2. Horizontal mirroring. - * These two steps are merged into a single processing routine. - */ -{ - JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y; - JDIMENSION x_crop_blocks, y_crop_blocks; - int ci, i, j, offset_x, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - /* Because of the horizontal mirror step, we can't process partial iMCUs - * at the (output) right edge properly. They just get transposed and - * not mirrored. - */ - MCU_cols = srcinfo->output_height / - (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - y_crop_blocks = y_crop_offset * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; - dst_blk_x += compptr->h_samp_factor) { - if (x_crop_blocks + dst_blk_x < comp_width) { - /* Block is within the mirrorable area. */ - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - comp_width - x_crop_blocks - dst_blk_x - - (JDIMENSION) compptr->h_samp_factor, - (JDIMENSION) compptr->h_samp_factor, FALSE); - } else { - /* Edge blocks are transposed but not mirrored. */ - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_x + x_crop_blocks, - (JDIMENSION) compptr->h_samp_factor, FALSE); - } - for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { - dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; - if (x_crop_blocks + dst_blk_x < comp_width) { - /* Block is within the mirrorable area. */ - src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] - [dst_blk_y + offset_y + y_crop_blocks]; - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - i++; - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - } - } else { - /* Edge blocks are transposed but not mirrored. */ - src_ptr = src_buffer[offset_x] - [dst_blk_y + offset_y + y_crop_blocks]; - for (i = 0; i < DCTSIZE; i++) - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - } - } - } - } - } - } -} - - -LOCAL(void) -do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* 270 degree rotation is equivalent to - * 1. Horizontal mirroring; - * 2. Transposing the image. - * These two steps are merged into a single processing routine. - */ -{ - JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; - JDIMENSION x_crop_blocks, y_crop_blocks; - int ci, i, j, offset_x, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - /* Because of the horizontal mirror step, we can't process partial iMCUs - * at the (output) bottom edge properly. They just get transposed and - * not mirrored. - */ - MCU_rows = srcinfo->output_width / - (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_height = MCU_rows * compptr->v_samp_factor; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - y_crop_blocks = y_crop_offset * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; - dst_blk_x += compptr->h_samp_factor) { - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_x + x_crop_blocks, - (JDIMENSION) compptr->h_samp_factor, FALSE); - for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { - dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; - if (y_crop_blocks + dst_blk_y < comp_height) { - /* Block is within the mirrorable area. */ - src_ptr = src_buffer[offset_x] - [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < DCTSIZE; j++) { - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - j++; - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - } - } - } else { - /* Edge blocks are transposed but not mirrored. */ - src_ptr = src_buffer[offset_x] - [dst_blk_y + offset_y + y_crop_blocks]; - for (i = 0; i < DCTSIZE; i++) - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - } - } - } - } - } - } -} - - -LOCAL(void) -do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* 180 degree rotation is equivalent to - * 1. Vertical mirroring; - * 2. Horizontal mirroring. - * These two steps are merged into a single processing routine. - */ -{ - JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; - JDIMENSION x_crop_blocks, y_crop_blocks; - int ci, i, j, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JBLOCKROW src_row_ptr, dst_row_ptr; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - MCU_cols = srcinfo->output_width / - (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); - MCU_rows = srcinfo->output_height / - (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - comp_height = MCU_rows * compptr->v_samp_factor; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - y_crop_blocks = y_crop_offset * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - if (y_crop_blocks + dst_blk_y < comp_height) { - /* Row is within the vertically mirrorable area. */ - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - comp_height - y_crop_blocks - dst_blk_y - - (JDIMENSION) compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } else { - /* Bottom-edge rows are only mirrored horizontally. */ - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_y + y_crop_blocks, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - dst_row_ptr = dst_buffer[offset_y]; - if (y_crop_blocks + dst_blk_y < comp_height) { - /* Row is within the mirrorable area. */ - src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { - dst_ptr = dst_row_ptr[dst_blk_x]; - if (x_crop_blocks + dst_blk_x < comp_width) { - /* Process the blocks that can be mirrored both ways. */ - src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; - for (i = 0; i < DCTSIZE; i += 2) { - /* For even row, negate every odd column. */ - for (j = 0; j < DCTSIZE; j += 2) { - *dst_ptr++ = *src_ptr++; - *dst_ptr++ = - *src_ptr++; - } - /* For odd row, negate every even column. */ - for (j = 0; j < DCTSIZE; j += 2) { - *dst_ptr++ = - *src_ptr++; - *dst_ptr++ = *src_ptr++; - } - } - } else { - /* Any remaining right-edge blocks are only mirrored vertically. */ - src_ptr = src_row_ptr[x_crop_blocks + dst_blk_x]; - for (i = 0; i < DCTSIZE; i += 2) { - for (j = 0; j < DCTSIZE; j++) - *dst_ptr++ = *src_ptr++; - for (j = 0; j < DCTSIZE; j++) - *dst_ptr++ = - *src_ptr++; - } - } - } - } else { - /* Remaining rows are just mirrored horizontally. */ - src_row_ptr = src_buffer[offset_y]; - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { - if (x_crop_blocks + dst_blk_x < comp_width) { - /* Process the blocks that can be mirrored. */ - dst_ptr = dst_row_ptr[dst_blk_x]; - src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; - for (i = 0; i < DCTSIZE2; i += 2) { - *dst_ptr++ = *src_ptr++; - *dst_ptr++ = - *src_ptr++; - } - } else { - /* Any remaining right-edge blocks are only copied. */ - jcopy_block_row(src_row_ptr + dst_blk_x + x_crop_blocks, - dst_row_ptr + dst_blk_x, - (JDIMENSION) 1); - } - } - } - } - } - } -} - - -LOCAL(void) -do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* Transverse transpose is equivalent to - * 1. 180 degree rotation; - * 2. Transposition; - * or - * 1. Horizontal mirroring; - * 2. Transposition; - * 3. Horizontal mirroring. - * These steps are merged into a single processing routine. - */ -{ - JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; - JDIMENSION x_crop_blocks, y_crop_blocks; - int ci, i, j, offset_x, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - MCU_cols = srcinfo->output_height / - (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); - MCU_rows = srcinfo->output_width / - (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - comp_height = MCU_rows * compptr->v_samp_factor; - x_crop_blocks = x_crop_offset * compptr->h_samp_factor; - y_crop_blocks = y_crop_offset * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; - dst_blk_x += compptr->h_samp_factor) { - if (x_crop_blocks + dst_blk_x < comp_width) { - /* Block is within the mirrorable area. */ - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - comp_width - x_crop_blocks - dst_blk_x - - (JDIMENSION) compptr->h_samp_factor, - (JDIMENSION) compptr->h_samp_factor, FALSE); - } else { - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - dst_blk_x + x_crop_blocks, - (JDIMENSION) compptr->h_samp_factor, FALSE); - } - for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { - dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; - if (y_crop_blocks + dst_blk_y < comp_height) { - if (x_crop_blocks + dst_blk_x < comp_width) { - /* Block is within the mirrorable area. */ - src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] - [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < DCTSIZE; j++) { - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - j++; - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - } - i++; - for (j = 0; j < DCTSIZE; j++) { - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - j++; - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - } - } - } else { - /* Right-edge blocks are mirrored in y only */ - src_ptr = src_buffer[offset_x] - [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < DCTSIZE; j++) { - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - j++; - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - } - } - } - } else { - if (x_crop_blocks + dst_blk_x < comp_width) { - /* Bottom-edge blocks are mirrored in x only */ - src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] - [dst_blk_y + offset_y + y_crop_blocks]; - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - i++; - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - } - } else { - /* At lower right corner, just transpose, no mirroring */ - src_ptr = src_buffer[offset_x] - [dst_blk_y + offset_y + y_crop_blocks]; - for (i = 0; i < DCTSIZE; i++) - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - } - } - } - } - } - } - } -} - - -/* Parse an unsigned integer: subroutine for jtransform_parse_crop_spec. - * Returns TRUE if valid integer found, FALSE if not. - * *strptr is advanced over the digit string, and *result is set to its value. - */ - -LOCAL(boolean) -jt_read_integer (const char ** strptr, JDIMENSION * result) -{ - const char * ptr = *strptr; - JDIMENSION val = 0; - - for (; isdigit(*ptr); ptr++) { - val = val * 10 + (JDIMENSION) (*ptr - '0'); - } - *result = val; - if (ptr == *strptr) - return FALSE; /* oops, no digits */ - *strptr = ptr; - return TRUE; -} - - -/* Parse a crop specification (written in X11 geometry style). - * The routine returns TRUE if the spec string is valid, FALSE if not. - * - * The crop spec string should have the format - * [{fr}]x[{fr}]{+-}{+-} - * where width, height, xoffset, and yoffset are unsigned integers. - * Each of the elements can be omitted to indicate a default value. - * (A weakness of this style is that it is not possible to omit xoffset - * while specifying yoffset, since they look alike.) - * - * This code is loosely based on XParseGeometry from the X11 distribution. - */ - -GLOBAL(boolean) -jtransform_parse_crop_spec (jpeg_transform_info *info, const char *spec) -{ - info->crop = FALSE; - info->crop_width_set = JCROP_UNSET; - info->crop_height_set = JCROP_UNSET; - info->crop_xoffset_set = JCROP_UNSET; - info->crop_yoffset_set = JCROP_UNSET; - - if (isdigit(*spec)) { - /* fetch width */ - if (! jt_read_integer(&spec, &info->crop_width)) - return FALSE; - if (*spec == 'f' || *spec == 'F') { - spec++; - info->crop_width_set = JCROP_FORCE; - } else if (*spec == 'r' || *spec == 'R') { - spec++; - info->crop_width_set = JCROP_REFLECT; - } else - info->crop_width_set = JCROP_POS; - } - if (*spec == 'x' || *spec == 'X') { - /* fetch height */ - spec++; - if (! jt_read_integer(&spec, &info->crop_height)) - return FALSE; - if (*spec == 'f' || *spec == 'F') { - spec++; - info->crop_height_set = JCROP_FORCE; - } else if (*spec == 'r' || *spec == 'R') { - spec++; - info->crop_height_set = JCROP_REFLECT; - } else - info->crop_height_set = JCROP_POS; - } - if (*spec == '+' || *spec == '-') { - /* fetch xoffset */ - info->crop_xoffset_set = (*spec == '-') ? JCROP_NEG : JCROP_POS; - spec++; - if (! jt_read_integer(&spec, &info->crop_xoffset)) - return FALSE; - } - if (*spec == '+' || *spec == '-') { - /* fetch yoffset */ - info->crop_yoffset_set = (*spec == '-') ? JCROP_NEG : JCROP_POS; - spec++; - if (! jt_read_integer(&spec, &info->crop_yoffset)) - return FALSE; - } - /* We had better have gotten to the end of the string. */ - if (*spec != '\0') - return FALSE; - info->crop = TRUE; - return TRUE; -} - - -/* Trim off any partial iMCUs on the indicated destination edge */ - -LOCAL(void) -trim_right_edge (jpeg_transform_info *info, JDIMENSION full_width) -{ - JDIMENSION MCU_cols; - - MCU_cols = info->output_width / info->iMCU_sample_width; - if (MCU_cols > 0 && info->x_crop_offset + MCU_cols == - full_width / info->iMCU_sample_width) - info->output_width = MCU_cols * info->iMCU_sample_width; -} - -LOCAL(void) -trim_bottom_edge (jpeg_transform_info *info, JDIMENSION full_height) -{ - JDIMENSION MCU_rows; - - MCU_rows = info->output_height / info->iMCU_sample_height; - if (MCU_rows > 0 && info->y_crop_offset + MCU_rows == - full_height / info->iMCU_sample_height) - info->output_height = MCU_rows * info->iMCU_sample_height; -} - - -/* Request any required workspace. - * - * This routine figures out the size that the output image will be - * (which implies that all the transform parameters must be set before - * it is called). - * - * We allocate the workspace virtual arrays from the source decompression - * object, so that all the arrays (both the original data and the workspace) - * will be taken into account while making memory management decisions. - * Hence, this routine must be called after jpeg_read_header (which reads - * the image dimensions) and before jpeg_read_coefficients (which realizes - * the source's virtual arrays). - * - * This function returns FALSE right away if -perfect is given - * and transformation is not perfect. Otherwise returns TRUE. - */ - -GLOBAL(boolean) -jtransform_request_workspace (j_decompress_ptr srcinfo, - jpeg_transform_info *info) -{ - jvirt_barray_ptr *coef_arrays; - boolean need_workspace, transpose_it; - jpeg_component_info *compptr; - JDIMENSION xoffset, yoffset, dtemp; - JDIMENSION width_in_iMCUs, height_in_iMCUs; - JDIMENSION width_in_blocks, height_in_blocks; - int itemp, ci, h_samp_factor, v_samp_factor; - - /* Determine number of components in output image */ - if (info->force_grayscale && - (srcinfo->jpeg_color_space == JCS_YCbCr || - srcinfo->jpeg_color_space == JCS_BG_YCC) && - srcinfo->num_components == 3) - /* We'll only process the first component */ - info->num_components = 1; - else - /* Process all the components */ - info->num_components = srcinfo->num_components; - - /* Compute output image dimensions and related values. */ - jpeg_core_output_dimensions(srcinfo); - - /* Return right away if -perfect is given and transformation is not perfect. - */ - if (info->perfect) { - if (info->num_components == 1) { - if (!jtransform_perfect_transform(srcinfo->output_width, - srcinfo->output_height, - srcinfo->min_DCT_h_scaled_size, - srcinfo->min_DCT_v_scaled_size, - info->transform)) - return FALSE; - } else { - if (!jtransform_perfect_transform(srcinfo->output_width, - srcinfo->output_height, - srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size, - srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size, - info->transform)) - return FALSE; - } - } - - /* If there is only one output component, force the iMCU size to be 1; - * else use the source iMCU size. (This allows us to do the right thing - * when reducing color to grayscale, and also provides a handy way of - * cleaning up "funny" grayscale images whose sampling factors are not 1x1.) - */ - switch (info->transform) { - case JXFORM_TRANSPOSE: - case JXFORM_TRANSVERSE: - case JXFORM_ROT_90: - case JXFORM_ROT_270: - info->output_width = srcinfo->output_height; - info->output_height = srcinfo->output_width; - if (info->num_components == 1) { - info->iMCU_sample_width = srcinfo->min_DCT_v_scaled_size; - info->iMCU_sample_height = srcinfo->min_DCT_h_scaled_size; - } else { - info->iMCU_sample_width = - srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size; - info->iMCU_sample_height = - srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size; - } - break; - default: - info->output_width = srcinfo->output_width; - info->output_height = srcinfo->output_height; - if (info->num_components == 1) { - info->iMCU_sample_width = srcinfo->min_DCT_h_scaled_size; - info->iMCU_sample_height = srcinfo->min_DCT_v_scaled_size; - } else { - info->iMCU_sample_width = - srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size; - info->iMCU_sample_height = - srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size; - } - } - - /* If cropping has been requested, compute the crop area's position and - * dimensions, ensuring that its upper left corner falls at an iMCU boundary. - */ - if (info->crop) { - /* Insert default values for unset crop parameters */ - if (info->crop_xoffset_set == JCROP_UNSET) - info->crop_xoffset = 0; /* default to +0 */ - if (info->crop_yoffset_set == JCROP_UNSET) - info->crop_yoffset = 0; /* default to +0 */ - if (info->crop_width_set == JCROP_UNSET) { - if (info->crop_xoffset >= info->output_width) - ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); - info->crop_width = info->output_width - info->crop_xoffset; - } else { - /* Check for crop extension */ - if (info->crop_width > info->output_width) { - /* Crop extension does not work when transforming! */ - if (info->transform != JXFORM_NONE || - info->crop_xoffset >= info->crop_width || - info->crop_xoffset > info->crop_width - info->output_width) - ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); - } else { - if (info->crop_xoffset >= info->output_width || - info->crop_width <= 0 || - info->crop_xoffset > info->output_width - info->crop_width) - ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); - } - } - if (info->crop_height_set == JCROP_UNSET) { - if (info->crop_yoffset >= info->output_height) - ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); - info->crop_height = info->output_height - info->crop_yoffset; - } else { - /* Check for crop extension */ - if (info->crop_height > info->output_height) { - /* Crop extension does not work when transforming! */ - if (info->transform != JXFORM_NONE || - info->crop_yoffset >= info->crop_height || - info->crop_yoffset > info->crop_height - info->output_height) - ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); - } else { - if (info->crop_yoffset >= info->output_height || - info->crop_height <= 0 || - info->crop_yoffset > info->output_height - info->crop_height) - ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); - } - } - /* Convert negative crop offsets into regular offsets */ - if (info->crop_xoffset_set != JCROP_NEG) - xoffset = info->crop_xoffset; - else if (info->crop_width > info->output_width) /* crop extension */ - xoffset = info->crop_width - info->output_width - info->crop_xoffset; - else - xoffset = info->output_width - info->crop_width - info->crop_xoffset; - if (info->crop_yoffset_set != JCROP_NEG) - yoffset = info->crop_yoffset; - else if (info->crop_height > info->output_height) /* crop extension */ - yoffset = info->crop_height - info->output_height - info->crop_yoffset; - else - yoffset = info->output_height - info->crop_height - info->crop_yoffset; - /* Now adjust so that upper left corner falls at an iMCU boundary */ - switch (info->transform) { - case JXFORM_DROP: - /* Ensure the effective drop region will not exceed the requested */ - itemp = info->iMCU_sample_width; - dtemp = itemp - 1 - ((xoffset + itemp - 1) % itemp); - xoffset += dtemp; - if (info->crop_width <= dtemp) - info->drop_width = 0; - else if (xoffset + info->crop_width - dtemp == info->output_width) - /* Matching right edge: include partial iMCU */ - info->drop_width = (info->crop_width - dtemp + itemp - 1) / itemp; - else - info->drop_width = (info->crop_width - dtemp) / itemp; - itemp = info->iMCU_sample_height; - dtemp = itemp - 1 - ((yoffset + itemp - 1) % itemp); - yoffset += dtemp; - if (info->crop_height <= dtemp) - info->drop_height = 0; - else if (yoffset + info->crop_height - dtemp == info->output_height) - /* Matching bottom edge: include partial iMCU */ - info->drop_height = (info->crop_height - dtemp + itemp - 1) / itemp; - else - info->drop_height = (info->crop_height - dtemp) / itemp; - /* Check if sampling factors match for dropping */ - if (info->drop_width != 0 && info->drop_height != 0) - for (ci = 0; ci < info->num_components && - ci < info->drop_ptr->num_components; ci++) { - if (info->drop_ptr->comp_info[ci].h_samp_factor * - srcinfo->max_h_samp_factor != - srcinfo->comp_info[ci].h_samp_factor * - info->drop_ptr->max_h_samp_factor) - ERREXIT6(srcinfo, JERR_BAD_DROP_SAMPLING, ci, - info->drop_ptr->comp_info[ci].h_samp_factor, - info->drop_ptr->max_h_samp_factor, - srcinfo->comp_info[ci].h_samp_factor, - srcinfo->max_h_samp_factor, 'h'); - if (info->drop_ptr->comp_info[ci].v_samp_factor * - srcinfo->max_v_samp_factor != - srcinfo->comp_info[ci].v_samp_factor * - info->drop_ptr->max_v_samp_factor) - ERREXIT6(srcinfo, JERR_BAD_DROP_SAMPLING, ci, - info->drop_ptr->comp_info[ci].v_samp_factor, - info->drop_ptr->max_v_samp_factor, - srcinfo->comp_info[ci].v_samp_factor, - srcinfo->max_v_samp_factor, 'v'); - } - break; - case JXFORM_WIPE: - /* Ensure the effective wipe region will cover the requested */ - info->drop_width = (JDIMENSION) jdiv_round_up - ((long) (info->crop_width + (xoffset % info->iMCU_sample_width)), - (long) info->iMCU_sample_width); - info->drop_height = (JDIMENSION) jdiv_round_up - ((long) (info->crop_height + (yoffset % info->iMCU_sample_height)), - (long) info->iMCU_sample_height); - break; - default: - /* Ensure the effective crop region will cover the requested */ - if (info->crop_width_set == JCROP_FORCE || - info->crop_width > info->output_width) - info->output_width = info->crop_width; - else - info->output_width = - info->crop_width + (xoffset % info->iMCU_sample_width); - if (info->crop_height_set == JCROP_FORCE || - info->crop_height > info->output_height) - info->output_height = info->crop_height; - else - info->output_height = - info->crop_height + (yoffset % info->iMCU_sample_height); - } - /* Save x/y offsets measured in iMCUs */ - info->x_crop_offset = xoffset / info->iMCU_sample_width; - info->y_crop_offset = yoffset / info->iMCU_sample_height; - } else { - info->x_crop_offset = 0; - info->y_crop_offset = 0; - } - - /* Figure out whether we need workspace arrays, - * and if so whether they are transposed relative to the source. - */ - need_workspace = FALSE; - transpose_it = FALSE; - switch (info->transform) { - case JXFORM_NONE: - if (info->x_crop_offset != 0 || info->y_crop_offset != 0 || - info->output_width > srcinfo->output_width || - info->output_height > srcinfo->output_height) - need_workspace = TRUE; - /* No workspace needed if neither cropping nor transforming */ - break; - case JXFORM_FLIP_H: - if (info->trim) - trim_right_edge(info, srcinfo->output_width); - if (info->y_crop_offset != 0) - need_workspace = TRUE; - /* do_flip_h_no_crop doesn't need a workspace array */ - break; - case JXFORM_FLIP_V: - if (info->trim) - trim_bottom_edge(info, srcinfo->output_height); - /* Need workspace arrays having same dimensions as source image. */ - need_workspace = TRUE; - break; - case JXFORM_TRANSPOSE: - /* transpose does NOT have to trim anything */ - /* Need workspace arrays having transposed dimensions. */ - need_workspace = TRUE; - transpose_it = TRUE; - break; - case JXFORM_TRANSVERSE: - if (info->trim) { - trim_right_edge(info, srcinfo->output_height); - trim_bottom_edge(info, srcinfo->output_width); - } - /* Need workspace arrays having transposed dimensions. */ - need_workspace = TRUE; - transpose_it = TRUE; - break; - case JXFORM_ROT_90: - if (info->trim) - trim_right_edge(info, srcinfo->output_height); - /* Need workspace arrays having transposed dimensions. */ - need_workspace = TRUE; - transpose_it = TRUE; - break; - case JXFORM_ROT_180: - if (info->trim) { - trim_right_edge(info, srcinfo->output_width); - trim_bottom_edge(info, srcinfo->output_height); - } - /* Need workspace arrays having same dimensions as source image. */ - need_workspace = TRUE; - break; - case JXFORM_ROT_270: - if (info->trim) - trim_bottom_edge(info, srcinfo->output_width); - /* Need workspace arrays having transposed dimensions. */ - need_workspace = TRUE; - transpose_it = TRUE; - break; - case JXFORM_WIPE: - break; - case JXFORM_DROP: -#if DROP_REQUEST_FROM_SRC - drop_request_from_src(info->drop_ptr, srcinfo); -#endif - break; - } - - /* Allocate workspace if needed. - * Note that we allocate arrays padded out to the next iMCU boundary, - * so that transform routines need not worry about missing edge blocks. - */ - if (need_workspace) { - coef_arrays = (jvirt_barray_ptr *) (*srcinfo->mem->alloc_small) - ((j_common_ptr) srcinfo, JPOOL_IMAGE, - SIZEOF(jvirt_barray_ptr) * info->num_components); - width_in_iMCUs = (JDIMENSION) jdiv_round_up - ((long) info->output_width, (long) info->iMCU_sample_width); - height_in_iMCUs = (JDIMENSION) jdiv_round_up - ((long) info->output_height, (long) info->iMCU_sample_height); - for (ci = 0; ci < info->num_components; ci++) { - compptr = srcinfo->comp_info + ci; - if (info->num_components == 1) { - /* we're going to force samp factors to 1x1 in this case */ - h_samp_factor = v_samp_factor = 1; - } else if (transpose_it) { - h_samp_factor = compptr->v_samp_factor; - v_samp_factor = compptr->h_samp_factor; - } else { - h_samp_factor = compptr->h_samp_factor; - v_samp_factor = compptr->v_samp_factor; - } - width_in_blocks = width_in_iMCUs * h_samp_factor; - height_in_blocks = height_in_iMCUs * v_samp_factor; - coef_arrays[ci] = (*srcinfo->mem->request_virt_barray) - ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE, - width_in_blocks, height_in_blocks, (JDIMENSION) v_samp_factor); - } - info->workspace_coef_arrays = coef_arrays; - } else - info->workspace_coef_arrays = NULL; - - return TRUE; -} - - -/* Transpose destination image parameters */ - -LOCAL(void) -transpose_critical_parameters (j_compress_ptr dstinfo) -{ - int tblno, i, j, ci, itemp; - jpeg_component_info *compptr; - JQUANT_TBL *qtblptr; - JDIMENSION jtemp; - UINT16 qtemp; - - /* Transpose image dimensions */ - jtemp = dstinfo->image_width; - dstinfo->image_width = dstinfo->image_height; - dstinfo->image_height = jtemp; - itemp = dstinfo->min_DCT_h_scaled_size; - dstinfo->min_DCT_h_scaled_size = dstinfo->min_DCT_v_scaled_size; - dstinfo->min_DCT_v_scaled_size = itemp; - - /* Transpose sampling factors */ - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - itemp = compptr->h_samp_factor; - compptr->h_samp_factor = compptr->v_samp_factor; - compptr->v_samp_factor = itemp; - } - - /* Transpose quantization tables */ - for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { - qtblptr = dstinfo->quant_tbl_ptrs[tblno]; - if (qtblptr != NULL) { - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < i; j++) { - qtemp = qtblptr->quantval[i*DCTSIZE+j]; - qtblptr->quantval[i*DCTSIZE+j] = qtblptr->quantval[j*DCTSIZE+i]; - qtblptr->quantval[j*DCTSIZE+i] = qtemp; - } - } - } - } -} - - -/* Adjust Exif image parameters. - * - * We try to adjust the Tags ExifImageWidth and ExifImageHeight if possible. - */ - -LOCAL(void) -adjust_exif_parameters (JOCTET FAR * data, unsigned int length, - JDIMENSION new_width, JDIMENSION new_height) -{ - boolean is_motorola; /* Flag for byte order */ - unsigned int number_of_tags, tagnum; - unsigned int firstoffset, offset; - JDIMENSION new_value; - - if (length < 12) return; /* Length of an IFD entry */ - - /* Discover byte order */ - if (GETJOCTET(data[0]) == 0x49 && GETJOCTET(data[1]) == 0x49) - is_motorola = FALSE; - else if (GETJOCTET(data[0]) == 0x4D && GETJOCTET(data[1]) == 0x4D) - is_motorola = TRUE; - else - return; - - /* Check Tag Mark */ - if (is_motorola) { - if (GETJOCTET(data[2]) != 0) return; - if (GETJOCTET(data[3]) != 0x2A) return; - } else { - if (GETJOCTET(data[3]) != 0) return; - if (GETJOCTET(data[2]) != 0x2A) return; - } - - /* Get first IFD offset (offset to IFD0) */ - if (is_motorola) { - if (GETJOCTET(data[4]) != 0) return; - if (GETJOCTET(data[5]) != 0) return; - firstoffset = GETJOCTET(data[6]); - firstoffset <<= 8; - firstoffset += GETJOCTET(data[7]); - } else { - if (GETJOCTET(data[7]) != 0) return; - if (GETJOCTET(data[6]) != 0) return; - firstoffset = GETJOCTET(data[5]); - firstoffset <<= 8; - firstoffset += GETJOCTET(data[4]); - } - if (firstoffset > length - 2) return; /* check end of data segment */ - - /* Get the number of directory entries contained in this IFD */ - if (is_motorola) { - number_of_tags = GETJOCTET(data[firstoffset]); - number_of_tags <<= 8; - number_of_tags += GETJOCTET(data[firstoffset+1]); - } else { - number_of_tags = GETJOCTET(data[firstoffset+1]); - number_of_tags <<= 8; - number_of_tags += GETJOCTET(data[firstoffset]); - } - if (number_of_tags == 0) return; - firstoffset += 2; - - /* Search for ExifSubIFD offset Tag in IFD0 */ - for (;;) { - if (firstoffset > length - 12) return; /* check end of data segment */ - /* Get Tag number */ - if (is_motorola) { - tagnum = GETJOCTET(data[firstoffset]); - tagnum <<= 8; - tagnum += GETJOCTET(data[firstoffset+1]); - } else { - tagnum = GETJOCTET(data[firstoffset+1]); - tagnum <<= 8; - tagnum += GETJOCTET(data[firstoffset]); - } - if (tagnum == 0x8769) break; /* found ExifSubIFD offset Tag */ - if (--number_of_tags == 0) return; - firstoffset += 12; - } - - /* Get the ExifSubIFD offset */ - if (is_motorola) { - if (GETJOCTET(data[firstoffset+8]) != 0) return; - if (GETJOCTET(data[firstoffset+9]) != 0) return; - offset = GETJOCTET(data[firstoffset+10]); - offset <<= 8; - offset += GETJOCTET(data[firstoffset+11]); - } else { - if (GETJOCTET(data[firstoffset+11]) != 0) return; - if (GETJOCTET(data[firstoffset+10]) != 0) return; - offset = GETJOCTET(data[firstoffset+9]); - offset <<= 8; - offset += GETJOCTET(data[firstoffset+8]); - } - if (offset > length - 2) return; /* check end of data segment */ - - /* Get the number of directory entries contained in this SubIFD */ - if (is_motorola) { - number_of_tags = GETJOCTET(data[offset]); - number_of_tags <<= 8; - number_of_tags += GETJOCTET(data[offset+1]); - } else { - number_of_tags = GETJOCTET(data[offset+1]); - number_of_tags <<= 8; - number_of_tags += GETJOCTET(data[offset]); - } - if (number_of_tags < 2) return; - offset += 2; - - /* Search for ExifImageWidth and ExifImageHeight Tags in this SubIFD */ - do { - if (offset > length - 12) return; /* check end of data segment */ - /* Get Tag number */ - if (is_motorola) { - tagnum = GETJOCTET(data[offset]); - tagnum <<= 8; - tagnum += GETJOCTET(data[offset+1]); - } else { - tagnum = GETJOCTET(data[offset+1]); - tagnum <<= 8; - tagnum += GETJOCTET(data[offset]); - } - if (tagnum == 0xA002 || tagnum == 0xA003) { - if (tagnum == 0xA002) - new_value = new_width; /* ExifImageWidth Tag */ - else - new_value = new_height; /* ExifImageHeight Tag */ - if (is_motorola) { - data[offset+2] = 0; /* Format = unsigned long (4 octets) */ - data[offset+3] = 4; - data[offset+4] = 0; /* Number Of Components = 1 */ - data[offset+5] = 0; - data[offset+6] = 0; - data[offset+7] = 1; - data[offset+8] = 0; - data[offset+9] = 0; - data[offset+10] = (JOCTET)((new_value >> 8) & 0xFF); - data[offset+11] = (JOCTET)(new_value & 0xFF); - } else { - data[offset+2] = 4; /* Format = unsigned long (4 octets) */ - data[offset+3] = 0; - data[offset+4] = 1; /* Number Of Components = 1 */ - data[offset+5] = 0; - data[offset+6] = 0; - data[offset+7] = 0; - data[offset+8] = (JOCTET)(new_value & 0xFF); - data[offset+9] = (JOCTET)((new_value >> 8) & 0xFF); - data[offset+10] = 0; - data[offset+11] = 0; - } - } - offset += 12; - } while (--number_of_tags); -} - - -/* Adjust output image parameters as needed. - * - * This must be called after jpeg_copy_critical_parameters() - * and before jpeg_write_coefficients(). - * - * The return value is the set of virtual coefficient arrays to be written - * (either the ones allocated by jtransform_request_workspace, or the - * original source data arrays). The caller will need to pass this value - * to jpeg_write_coefficients(). - */ - -GLOBAL(jvirt_barray_ptr *) -jtransform_adjust_parameters (j_decompress_ptr srcinfo, - j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jpeg_transform_info *info) -{ - /* If force-to-grayscale is requested, adjust destination parameters */ - if (info->force_grayscale) { - /* First, ensure we have YCC or grayscale data, and that the source's - * Y channel is full resolution. (No reasonable person would make Y - * be less than full resolution, so actually coping with that case - * isn't worth extra code space. But we check it to avoid crashing.) - */ - if ((((dstinfo->jpeg_color_space == JCS_YCbCr || - dstinfo->jpeg_color_space == JCS_BG_YCC) && - dstinfo->num_components == 3) || - (dstinfo->jpeg_color_space == JCS_GRAYSCALE && - dstinfo->num_components == 1)) && - srcinfo->comp_info[0].h_samp_factor == srcinfo->max_h_samp_factor && - srcinfo->comp_info[0].v_samp_factor == srcinfo->max_v_samp_factor) { - /* We use jpeg_set_colorspace to make sure subsidiary settings get fixed - * properly. Among other things, it sets the target h_samp_factor & - * v_samp_factor to 1, which typically won't match the source. - * We have to preserve the source's quantization table number, however. - */ - int sv_quant_tbl_no = dstinfo->comp_info[0].quant_tbl_no; - jpeg_set_colorspace(dstinfo, JCS_GRAYSCALE); - dstinfo->comp_info[0].quant_tbl_no = sv_quant_tbl_no; - } else { - /* Sorry, can't do it */ - ERREXIT(dstinfo, JERR_CONVERSION_NOTIMPL); - } - } else if (info->num_components == 1) { - /* For a single-component source, we force the destination sampling factors - * to 1x1, with or without force_grayscale. This is useful because some - * decoders choke on grayscale images with other sampling factors. - */ - dstinfo->comp_info[0].h_samp_factor = 1; - dstinfo->comp_info[0].v_samp_factor = 1; - } - - /* Correct the destination's image dimensions as necessary - * for rotate/flip, resize, and crop operations. - */ - dstinfo->jpeg_width = info->output_width; - dstinfo->jpeg_height = info->output_height; - - /* Transpose destination image parameters, adjust quantization */ - switch (info->transform) { - case JXFORM_TRANSPOSE: - case JXFORM_TRANSVERSE: - case JXFORM_ROT_90: - case JXFORM_ROT_270: - transpose_critical_parameters(dstinfo); - break; - case JXFORM_DROP: - if (info->drop_width != 0 && info->drop_height != 0) - adjust_quant(srcinfo, src_coef_arrays, - info->drop_ptr, info->drop_coef_arrays, - info->trim, dstinfo); - break; - default: - break; - } - - /* Adjust Exif properties */ - if (srcinfo->marker_list != NULL && - srcinfo->marker_list->marker == JPEG_APP0+1 && - srcinfo->marker_list->data_length >= 6 && - GETJOCTET(srcinfo->marker_list->data[0]) == 0x45 && - GETJOCTET(srcinfo->marker_list->data[1]) == 0x78 && - GETJOCTET(srcinfo->marker_list->data[2]) == 0x69 && - GETJOCTET(srcinfo->marker_list->data[3]) == 0x66 && - GETJOCTET(srcinfo->marker_list->data[4]) == 0 && - GETJOCTET(srcinfo->marker_list->data[5]) == 0) { - /* Suppress output of JFIF marker */ - dstinfo->write_JFIF_header = FALSE; - /* Adjust Exif image parameters */ - if (dstinfo->jpeg_width != srcinfo->image_width || - dstinfo->jpeg_height != srcinfo->image_height) - /* Align data segment to start of TIFF structure for parsing */ - adjust_exif_parameters(srcinfo->marker_list->data + 6, - srcinfo->marker_list->data_length - 6, - dstinfo->jpeg_width, dstinfo->jpeg_height); - } - - /* Return the appropriate output data set */ - if (info->workspace_coef_arrays != NULL) - return info->workspace_coef_arrays; - return src_coef_arrays; -} - - -/* Execute the actual transformation, if any. - * - * This must be called *after* jpeg_write_coefficients, because it depends - * on jpeg_write_coefficients to have computed subsidiary values such as - * the per-component width and height fields in the destination object. - * - * Note that some transformations will modify the source data arrays! - */ - -GLOBAL(void) -jtransform_execute_transform (j_decompress_ptr srcinfo, - j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jpeg_transform_info *info) -{ - jvirt_barray_ptr *dst_coef_arrays = info->workspace_coef_arrays; - - /* Note: conditions tested here should match those in switch statement - * in jtransform_request_workspace() - */ - switch (info->transform) { - case JXFORM_NONE: - if (info->output_width > srcinfo->output_width || - info->output_height > srcinfo->output_height) { - if (info->output_width > srcinfo->output_width && - info->crop_width_set == JCROP_REFLECT) - do_crop_ext_reflect(srcinfo, dstinfo, - info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, dst_coef_arrays); - else if (info->output_width > srcinfo->output_width && - info->crop_width_set == JCROP_FORCE) - do_crop_ext_flat(srcinfo, dstinfo, - info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, dst_coef_arrays); - else - do_crop_ext_zero(srcinfo, dstinfo, - info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, dst_coef_arrays); - } else if (info->x_crop_offset != 0 || info->y_crop_offset != 0) - do_crop(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_FLIP_H: - if (info->y_crop_offset != 0) - do_flip_h(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, dst_coef_arrays); - else - do_flip_h_no_crop(srcinfo, dstinfo, info->x_crop_offset, - src_coef_arrays); - break; - case JXFORM_FLIP_V: - do_flip_v(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_TRANSPOSE: - do_transpose(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_TRANSVERSE: - do_transverse(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_ROT_90: - do_rot_90(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_ROT_180: - do_rot_180(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_ROT_270: - do_rot_270(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_WIPE: - if (info->crop_width_set == JCROP_REFLECT && - info->y_crop_offset == 0 && info->drop_height == - (JDIMENSION) jdiv_round_up - ((long) info->output_height, (long) info->iMCU_sample_height) && - (info->x_crop_offset == 0 || - info->x_crop_offset + info->drop_width == - (JDIMENSION) jdiv_round_up - ((long) info->output_width, (long) info->iMCU_sample_width))) - do_reflect(srcinfo, dstinfo, info->x_crop_offset, - src_coef_arrays, info->drop_width, info->drop_height); - else if (info->crop_width_set == JCROP_FORCE) - do_flatten(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, info->drop_width, info->drop_height); - else - do_wipe(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, info->drop_width, info->drop_height); - break; - case JXFORM_DROP: - if (info->drop_width != 0 && info->drop_height != 0) - do_drop(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, info->drop_ptr, info->drop_coef_arrays, - info->drop_width, info->drop_height); - break; - } -} - -/* jtransform_perfect_transform - * - * Determine whether lossless transformation is perfectly - * possible for a specified image and transformation. - * - * Inputs: - * image_width, image_height: source image dimensions. - * MCU_width, MCU_height: pixel dimensions of MCU. - * transform: transformation identifier. - * Parameter sources from initialized jpeg_struct - * (after reading source header): - * image_width = cinfo.image_width - * image_height = cinfo.image_height - * MCU_width = cinfo.max_h_samp_factor * cinfo.block_size - * MCU_height = cinfo.max_v_samp_factor * cinfo.block_size - * Result: - * TRUE = perfect transformation possible - * FALSE = perfect transformation not possible - * (may use custom action then) - */ - -GLOBAL(boolean) -jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height, - int MCU_width, int MCU_height, - JXFORM_CODE transform) -{ - boolean result = TRUE; /* initialize TRUE */ - - switch (transform) { - case JXFORM_FLIP_H: - case JXFORM_ROT_270: - if (image_width % (JDIMENSION) MCU_width) - result = FALSE; - break; - case JXFORM_FLIP_V: - case JXFORM_ROT_90: - if (image_height % (JDIMENSION) MCU_height) - result = FALSE; - break; - case JXFORM_TRANSVERSE: - case JXFORM_ROT_180: - if (image_width % (JDIMENSION) MCU_width) - result = FALSE; - if (image_height % (JDIMENSION) MCU_height) - result = FALSE; - break; - default: - break; - } - - return result; -} - -#endif /* TRANSFORMS_SUPPORTED */ - - -/* Setup decompression object to save desired markers in memory. - * This must be called before jpeg_read_header() to have the desired effect. - */ - -GLOBAL(void) -jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option) -{ -#ifdef SAVE_MARKERS_SUPPORTED - int m; - - /* Save comments except under NONE option */ - if (option != JCOPYOPT_NONE) { - jpeg_save_markers(srcinfo, JPEG_COM, 0xFFFF); - } - /* Save all types of APPn markers iff ALL option */ - if (option == JCOPYOPT_ALL) { - for (m = 0; m < 16; m++) - jpeg_save_markers(srcinfo, JPEG_APP0 + m, 0xFFFF); - } -#endif /* SAVE_MARKERS_SUPPORTED */ -} - -/* Copy markers saved in the given source object to the destination object. - * This should be called just after jpeg_start_compress() or - * jpeg_write_coefficients(). - * Note that those routines will have written the SOI, and also the - * JFIF APP0 or Adobe APP14 markers if selected. - */ - -GLOBAL(void) -jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JCOPY_OPTION option) -{ - jpeg_saved_marker_ptr marker; - - /* In the current implementation, we don't actually need to examine the - * option flag here; we just copy everything that got saved. - * But to avoid confusion, we do not output JFIF and Adobe APP14 markers - * if the encoder library already wrote one. - */ - for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) { - if (dstinfo->write_JFIF_header && - marker->marker == JPEG_APP0 && - marker->data_length >= 5 && - GETJOCTET(marker->data[0]) == 0x4A && - GETJOCTET(marker->data[1]) == 0x46 && - GETJOCTET(marker->data[2]) == 0x49 && - GETJOCTET(marker->data[3]) == 0x46 && - GETJOCTET(marker->data[4]) == 0) - continue; /* reject duplicate JFIF */ - if (dstinfo->write_Adobe_marker && - marker->marker == JPEG_APP0+14 && - marker->data_length >= 5 && - GETJOCTET(marker->data[0]) == 0x41 && - GETJOCTET(marker->data[1]) == 0x64 && - GETJOCTET(marker->data[2]) == 0x6F && - GETJOCTET(marker->data[3]) == 0x62 && - GETJOCTET(marker->data[4]) == 0x65) - continue; /* reject duplicate Adobe */ -#ifdef NEED_FAR_POINTERS - /* We could use jpeg_write_marker if the data weren't FAR... */ - { - unsigned int i; - jpeg_write_m_header(dstinfo, marker->marker, marker->data_length); - for (i = 0; i < marker->data_length; i++) - jpeg_write_m_byte(dstinfo, marker->data[i]); - } -#else - jpeg_write_marker(dstinfo, marker->marker, - marker->data, marker->data_length); -#endif - } -} diff --git a/thirdparty/jpeg-9e/transupp.h b/thirdparty/jpeg-9e/transupp.h deleted file mode 100644 index a8ba16a..0000000 --- a/thirdparty/jpeg-9e/transupp.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * transupp.h - * - * Copyright (C) 1997-2019, Thomas G. Lane, Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains declarations for image transformation routines and - * other utility code used by the jpegtran sample application. These are - * NOT part of the core JPEG library. But we keep these routines separate - * from jpegtran.c to ease the task of maintaining jpegtran-like programs - * that have other user interfaces. - * - * NOTE: all the routines declared here have very specific requirements - * about when they are to be executed during the reading and writing of the - * source and destination files. See the comments in transupp.c, or see - * jpegtran.c for an example of correct usage. - */ - -/* If you happen not to want the image transform support, disable it here */ -#ifndef TRANSFORMS_SUPPORTED -#define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */ -#endif - -/* - * Although rotating and flipping data expressed as DCT coefficients is not - * hard, there is an asymmetry in the JPEG format specification for images - * whose dimensions aren't multiples of the iMCU size. The right and bottom - * image edges are padded out to the next iMCU boundary with junk data; but - * no padding is possible at the top and left edges. If we were to flip - * the whole image including the pad data, then pad garbage would become - * visible at the top and/or left, and real pixels would disappear into the - * pad margins --- perhaps permanently, since encoders & decoders may not - * bother to preserve DCT blocks that appear to be completely outside the - * nominal image area. So, we have to exclude any partial iMCUs from the - * basic transformation. - * - * Transpose is the only transformation that can handle partial iMCUs at the - * right and bottom edges completely cleanly. flip_h can flip partial iMCUs - * at the bottom, but leaves any partial iMCUs at the right edge untouched. - * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched. - * The other transforms are defined as combinations of these basic transforms - * and process edge blocks in a way that preserves the equivalence. - * - * The "trim" option causes untransformable partial iMCUs to be dropped; - * this is not strictly lossless, but it usually gives the best-looking - * result for odd-size images. Note that when this option is active, - * the expected mathematical equivalences between the transforms may not hold. - * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim - * followed by -rot 180 -trim trims both edges.) - * - * We also offer a lossless-crop option, which discards data outside a given - * image region but losslessly preserves what is inside. Like the rotate and - * flip transforms, lossless crop is restricted by the current JPEG format: the - * upper left corner of the selected region must fall on an iMCU boundary. If - * this does not hold for the given crop parameters, we silently move the upper - * left corner up and/or left to make it so, simultaneously increasing the - * region dimensions to keep the lower right crop corner unchanged. (Thus, the - * output image covers at least the requested region, but may cover more.) - * The adjustment of the region dimensions may be optionally disabled. - * - * A complementary lossless-wipe option is provided to discard (gray out) data - * inside a given image region while losslessly preserving what is outside. - * Another option is lossless-drop, which replaces data at a given image - * position by another image. Both source images must have the same - * subsampling values. It is best if they also have the same quantization, - * otherwise quantization adaption occurs. The trim option can be used with - * the drop option to requantize the drop file to the source file. - * - * We also provide a lossless-resize option, which is kind of a lossless-crop - * operation in the DCT coefficient block domain - it discards higher-order - * coefficients and losslessly preserves lower-order coefficients of a - * sub-block. - * - * Rotate/flip transform, resize, and crop can be requested together in a - * single invocation. The crop is applied last --- that is, the crop region - * is specified in terms of the destination image after transform/resize. - * - * We also offer a "force to grayscale" option, which simply discards the - * chrominance channels of a YCbCr image. This is lossless in the sense that - * the luminance channel is preserved exactly. It's not the same kind of - * thing as the rotate/flip transformations, but it's convenient to handle it - * as part of this package, mainly because the transformation routines have to - * be aware of the option to know how many components to work on. - */ - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jtransform_parse_crop_spec jTrParCrop -#define jtransform_request_workspace jTrRequest -#define jtransform_adjust_parameters jTrAdjust -#define jtransform_execute_transform jTrExec -#define jtransform_perfect_transform jTrPerfect -#define jcopy_markers_setup jCMrkSetup -#define jcopy_markers_execute jCMrkExec -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* - * Codes for supported types of image transformations. - */ - -typedef enum { - JXFORM_NONE, /* no transformation */ - JXFORM_FLIP_H, /* horizontal flip */ - JXFORM_FLIP_V, /* vertical flip */ - JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */ - JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */ - JXFORM_ROT_90, /* 90-degree clockwise rotation */ - JXFORM_ROT_180, /* 180-degree rotation */ - JXFORM_ROT_270, /* 270-degree clockwise (or 90 ccw) */ - JXFORM_WIPE, /* wipe */ - JXFORM_DROP /* drop */ -} JXFORM_CODE; - -/* - * Codes for crop parameters, which can individually be unspecified, - * positive or negative for xoffset or yoffset, - * positive or force or reflect for width or height. - */ - -typedef enum { - JCROP_UNSET, - JCROP_POS, - JCROP_NEG, - JCROP_FORCE, - JCROP_REFLECT -} JCROP_CODE; - -/* - * Transform parameters struct. - * NB: application must not change any elements of this struct after - * calling jtransform_request_workspace. - */ - -typedef struct { - /* Options: set by caller */ - JXFORM_CODE transform; /* image transform operator */ - boolean perfect; /* if TRUE, fail if partial MCUs are requested */ - boolean trim; /* if TRUE, trim partial MCUs as needed */ - boolean force_grayscale; /* if TRUE, convert color image to grayscale */ - boolean crop; /* if TRUE, crop or wipe source image, or drop */ - - /* Crop parameters: application need not set these unless crop is TRUE. - * These can be filled in by jtransform_parse_crop_spec(). - */ - JDIMENSION crop_width; /* Width of selected region */ - JCROP_CODE crop_width_set; /* (force disables adjustment) */ - JDIMENSION crop_height; /* Height of selected region */ - JCROP_CODE crop_height_set; /* (force disables adjustment) */ - JDIMENSION crop_xoffset; /* X offset of selected region */ - JCROP_CODE crop_xoffset_set; /* (negative measures from right edge) */ - JDIMENSION crop_yoffset; /* Y offset of selected region */ - JCROP_CODE crop_yoffset_set; /* (negative measures from bottom edge) */ - - /* Drop parameters: set by caller for drop request */ - j_decompress_ptr drop_ptr; - jvirt_barray_ptr * drop_coef_arrays; - - /* Internal workspace: caller should not touch these */ - int num_components; /* # of components in workspace */ - jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */ - JDIMENSION output_width; /* cropped destination dimensions */ - JDIMENSION output_height; - JDIMENSION x_crop_offset; /* destination crop offsets measured in iMCUs */ - JDIMENSION y_crop_offset; - JDIMENSION drop_width; /* drop/wipe dimensions measured in iMCUs */ - JDIMENSION drop_height; - int iMCU_sample_width; /* destination iMCU size */ - int iMCU_sample_height; -} jpeg_transform_info; - - -#if TRANSFORMS_SUPPORTED - -/* Parse a crop specification (written in X11 geometry style) */ -EXTERN(boolean) jtransform_parse_crop_spec - JPP((jpeg_transform_info *info, const char *spec)); -/* Request any required workspace */ -EXTERN(boolean) jtransform_request_workspace - JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info)); -/* Adjust output image parameters */ -EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters - JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jpeg_transform_info *info)); -/* Execute the actual transformation, if any */ -EXTERN(void) jtransform_execute_transform - JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jpeg_transform_info *info)); -/* Determine whether lossless transformation is perfectly - * possible for a specified image and transformation. - */ -EXTERN(boolean) jtransform_perfect_transform - JPP((JDIMENSION image_width, JDIMENSION image_height, - int MCU_width, int MCU_height, - JXFORM_CODE transform)); - -/* jtransform_execute_transform used to be called - * jtransform_execute_transformation, but some compilers complain about - * routine names that long. This macro is here to avoid breaking any - * old source code that uses the original name... - */ -#define jtransform_execute_transformation jtransform_execute_transform - -#endif /* TRANSFORMS_SUPPORTED */ - - -/* - * Support for copying optional markers from source to destination file. - */ - -typedef enum { - JCOPYOPT_NONE, /* copy no optional markers */ - JCOPYOPT_COMMENTS, /* copy only comment (COM) markers */ - JCOPYOPT_ALL /* copy all optional markers */ -} JCOPY_OPTION; - -#define JCOPYOPT_DEFAULT JCOPYOPT_COMMENTS /* recommended default */ - -/* Setup decompression object to save desired markers in memory */ -EXTERN(void) jcopy_markers_setup - JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option)); -/* Copy markers saved in the given source object to the destination object */ -EXTERN(void) jcopy_markers_execute - JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JCOPY_OPTION option)); diff --git a/thirdparty/jpeg-9e/usage.txt b/thirdparty/jpeg-9e/usage.txt deleted file mode 100644 index b20484b..0000000 --- a/thirdparty/jpeg-9e/usage.txt +++ /dev/null @@ -1,709 +0,0 @@ -USAGE instructions for the Independent JPEG Group's JPEG software -================================================================= - -This file describes usage of the JPEG conversion programs cjpeg and djpeg, -as well as the utility programs jpegtran, rdjpgcom and wrjpgcom. (See -the other documentation files if you wish to use the JPEG library within -your own programs.) - -If you are on a Unix machine you may prefer to read the Unix-style manual -pages in files cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1. - - -INTRODUCTION - -These programs implement JPEG image encoding, decoding, and transcoding. -JPEG (pronounced "jay-peg") is a standardized compression method for -full-color and grayscale images. - - -GENERAL USAGE - -We provide two programs, cjpeg to compress an image file into JPEG format, -and djpeg to decompress a JPEG file back into a conventional image format. - -On Unix-like systems, you say: - cjpeg [switches] [imagefile] >jpegfile -or - djpeg [switches] [jpegfile] >imagefile -The programs read the specified input file, or standard input if none is -named. They always write to standard output (with trace/error messages to -standard error). These conventions are handy for piping images between -programs. - -On most non-Unix systems, you say: - cjpeg [switches] imagefile jpegfile -or - djpeg [switches] jpegfile imagefile -i.e., both the input and output files are named on the command line. This -style is a little more foolproof, and it loses no functionality if you don't -have pipes. (You can get this style on Unix too, if you prefer, by defining -TWO_FILE_COMMANDLINE when you compile the programs; see install.txt.) - -You can also say: - cjpeg [switches] -outfile jpegfile imagefile -or - djpeg [switches] -outfile imagefile jpegfile -This syntax works on all systems, so it is useful for scripts. - -The currently supported image file formats are: PPM (PBMPLUS color format), -PGM (PBMPLUS grayscale format), BMP, GIF, Targa, and RLE (Utah Raster Toolkit -format). (RLE is supported only if the URT library is available, which it -isn't on most non-Unix systems.) cjpeg recognizes the input image format -automatically, with the exception of some Targa-format files. You have to -tell djpeg which format to generate. - -JPEG files are in the standard JFIF file format. There are other, -less widely used JPEG-based file formats, but we don't support them. - -All switch names may be abbreviated; for example, -grayscale may be written --gray or -gr. Most of the "basic" switches can be abbreviated to as little as -one letter. Upper and lower case are equivalent (-BMP is the same as -bmp). -British spellings are also accepted (e.g., -greyscale), though for brevity -these are not mentioned below. - - -CJPEG DETAILS - -The basic command line switches for cjpeg are: - - -quality N[,...] Scale quantization tables to adjust image quality. - Quality is 0 (worst) to 100 (best); default is 75. - (See below for more info.) - - -grayscale Create monochrome JPEG file from color input. - Be sure to use this switch when compressing a grayscale - BMP or GIF file, because cjpeg isn't bright enough to - notice whether a BMP or GIF file uses only shades of - gray. By saying -grayscale, you'll get a smaller - JPEG file that takes less time to process. - - -rgb Create RGB JPEG file. - Using this switch suppresses the conversion from RGB - colorspace input to the default YCbCr JPEG colorspace. - You can use this switch in combination with the - -block N switch (see below) for lossless JPEG coding. - See also the -rgb1 switch below. - - -optimize Perform optimization of entropy encoding parameters. - Without this, default encoding parameters are used. - -optimize usually makes the JPEG file a little smaller, - but cjpeg runs somewhat slower and needs much more - memory. Image quality and speed of decompression are - unaffected by -optimize. - - -progressive Create progressive JPEG file (see below). - - -scale M/N Scale the output image by a factor M/N. Currently - supported scale factors are M/N with all N from 1 to - 16, where M is the destination DCT size, which is 8 by - default (see -block N switch below). - - -targa Input file is Targa format. Targa files that contain - an "identification" field will not be automatically - recognized by cjpeg; for such files you must specify - -targa to make cjpeg treat the input as Targa format. - For most Targa files, you won't need this switch. - -The -quality switch lets you trade off compressed file size against quality of -the reconstructed image: the higher the quality setting, the larger the JPEG -file, and the closer the output image will be to the original input. Normally -you want to use the lowest quality setting (smallest file) that decompresses -into something visually indistinguishable from the original image. For this -purpose the quality setting should be between 50 and 95; the default of 75 is -often about right. If you see defects at -quality 75, then go up 5 or 10 -counts at a time until you are happy with the output image. (The optimal -setting will vary from one image to another.) - --quality 100 will generate a quantization table of all 1's, minimizing loss -in the quantization step (but there is still information loss in subsampling, -as well as roundoff error). This setting is mainly of interest for -experimental purposes. Quality values above about 95 are NOT recommended for -normal use; the compressed file size goes up dramatically for hardly any gain -in output image quality. - -In the other direction, quality values below 50 will produce very small files -of low image quality. Settings around 5 to 10 might be useful in preparing an -index of a large image library, for example. Try -quality 2 (or so) for some -amusing Cubist effects. (Note: quality values below about 25 generate 2-byte -quantization tables, which are considered optional in the JPEG standard. -cjpeg emits a warning message when you give such a quality value, because some -other JPEG programs may be unable to decode the resulting file. Use -baseline -if you need to ensure compatibility at low quality values.) - -The -quality option has been extended in IJG version 7 for support of separate -quality settings for luminance and chrominance (or in general, for every -provided quantization table slot). This feature is useful for high-quality -applications which cannot accept the damage of color data by coarse -subsampling settings. You can now easily reduce the color data amount more -smoothly with finer control without separate subsampling. The resulting file -is fully compliant with standard JPEG decoders. -Note that the -quality ratings refer to the quantization table slots, and that -the last value is replicated if there are more q-table slots than parameters. -The default q-table slots are 0 for luminance and 1 for chrominance with -default tables as given in the JPEG standard. This is compatible with the old -behaviour in case that only one parameter is given, which is then used for -both luminance and chrominance (slots 0 and 1). More or custom quantization -tables can be set with -qtables and assigned to components with -qslots -parameter (see the "wizard" switches below). -CAUTION: You must explicitly add -sample 1x1 for efficient separate color -quality selection, since the default value used by library is 2x2! - -The -progressive switch creates a "progressive JPEG" file. In this type of -JPEG file, the data is stored in multiple scans of increasing quality. If the -file is being transmitted over a slow communications link, the decoder can use -the first scan to display a low-quality image very quickly, and can then -improve the display with each subsequent scan. The final image is exactly -equivalent to a standard JPEG file of the same quality setting, and the total -file size is about the same --- often a little smaller. - -Switches for advanced users: - - -arithmetic Use arithmetic coding. - CAUTION: arithmetic coded JPEG is not yet widely - implemented, so many decoders will be unable to - view an arithmetic coded JPEG file at all. - - -block N Set DCT block size. All N from 1 to 16 are possible. - Default is 8 (baseline format). - Larger values produce higher compression, - smaller values produce higher quality - (exact DCT stage possible with 1 or 2; with the - default quality of 75 and default Luminance qtable - the DCT+Quantization stage is lossless for N=1). - CAUTION: An implementation of the JPEG SmartScale - extension is required for this feature. SmartScale - enabled JPEG is not yet widely implemented, so many - decoders will be unable to view a SmartScale extended - JPEG file at all. - - -rgb1 Create RGB JPEG file with reversible color transform. - Works like the -rgb switch (see above) and inserts a - simple reversible color transform into the processing - which significantly improves the compression. - Use this switch in combination with the -block N - switch (see above) for lossless JPEG coding. - CAUTION: A decoder with inverse color transform - support is required for this feature. Reversible - color transform support is not yet widely implemented, - so many decoders will be unable to view a reversible - color transformed JPEG file at all. - - -bgycc Create big gamut YCC JPEG file. - In this type of encoding the color difference - components are quantized further by a factor of 2 - compared to the normal Cb/Cr values, thus creating - space to allow larger color values with higher - saturation than the normal gamut limits to be encoded. - In order to compensate for the loss of color fidelity - compared to a normal YCC encoded file, the color - quantization tables can be adjusted accordingly. - For example, cjpeg -bgycc -quality 80,90 will give - similar results as cjpeg -quality 80. - CAUTION: For correct decompression a decoder with big - gamut YCC support (JFIF version 2) is required. - An old decoder may or may not display a big gamut YCC - encoded JPEG file, depending on JFIF version check - and corresponding warning/error configuration. - In case of a granted decompression the old decoder - will display the image with half saturated colors. - - -dct int Use integer DCT method (default). - -dct fast Use fast integer DCT (less accurate). - -dct float Use floating-point DCT method. - The float method is very slightly more accurate than - the int method, but is much slower unless your machine - has very fast floating-point hardware. Also note that - results of the floating-point method may vary slightly - across machines, while the integer methods should give - the same results everywhere. The fast integer method - is much less accurate than the other two. - - -nosmooth Don't use high-quality downsampling. - - -restart N Emit a JPEG restart marker every N MCU rows, or every - N MCU blocks if "B" is attached to the number. - -restart 0 (the default) means no restart markers. - - -smooth N Smooth the input image to eliminate dithering noise. - N, ranging from 1 to 100, indicates the strength of - smoothing. 0 (the default) means no smoothing. - - -maxmemory N Set limit for amount of memory to use in processing - large images. Value is in thousands of bytes, or - millions of bytes if "M" is attached to the number. - For example, -max 4m selects 4000000 bytes. If more - space is needed, temporary files will be used. - - -verbose Enable debug printout. More -v's give more printout. - or -debug Also, version information is printed at startup. - -The -restart option inserts extra markers that allow a JPEG decoder to -resynchronize after a transmission error. Without restart markers, any damage -to a compressed file will usually ruin the image from the point of the error -to the end of the image; with restart markers, the damage is usually confined -to the portion of the image up to the next restart marker. Of course, the -restart markers occupy extra space. We recommend -restart 1 for images that -will be transmitted across unreliable networks such as Usenet. - -The -smooth option filters the input to eliminate fine-scale noise. This is -often useful when converting dithered images to JPEG: a moderate smoothing -factor of 10 to 50 gets rid of dithering patterns in the input file, resulting -in a smaller JPEG file and a better-looking image. Too large a smoothing -factor will visibly blur the image, however. - -Switches for wizards: - - -baseline Force baseline-compatible quantization tables to be - generated. This clamps quantization values to 8 bits - even at low quality settings. (This switch is poorly - named, since it does not ensure that the output is - actually baseline JPEG. For example, you can use - -baseline and -progressive together.) - - -qtables file Use the quantization tables given in the specified - text file. - - -qslots N[,...] Select which quantization table to use for each color - component. - - -sample HxV[,...] Set JPEG sampling factors for each color component. - - -scans file Use the scan script given in the specified text file. - -The "wizard" switches are intended for experimentation with JPEG. If you -don't know what you are doing, DON'T USE THEM. These switches are documented -further in the file wizard.txt. - - -DJPEG DETAILS - -The basic command line switches for djpeg are: - - -colors N Reduce image to at most N colors. This reduces the - or -quantize N number of colors used in the output image, so that it - can be displayed on a colormapped display or stored in - a colormapped file format. For example, if you have - an 8-bit display, you'd need to reduce to 256 or fewer - colors. (-colors is the recommended name, -quantize - is provided only for backwards compatibility.) - - -fast Select recommended processing options for fast, low - quality output. (The default options are chosen for - highest quality output.) Currently, this is equivalent - to "-dct fast -nosmooth -onepass -dither ordered". - - -grayscale Force grayscale output even if JPEG file is color. - Useful for viewing on monochrome displays; also, - djpeg runs noticeably faster in this mode. - - -rgb Force RGB output even if JPEG file is grayscale. - This is provided to support applications that don't - want to cope with grayscale as a separate case. - - -scale M/N Scale the output image by a factor M/N. Currently - supported scale factors are M/N with all M from 1 to - 16, where N is the source DCT size, which is 8 for - baseline JPEG. If the /N part is omitted, then M - specifies the DCT scaled size to be applied on the - given input. For baseline JPEG this is equivalent to - M/8 scaling, since the source DCT size for baseline - JPEG is 8. Scaling is handy if the image is larger - than your screen; also, djpeg runs much faster when - scaling down the output. - - -bmp Select BMP output format (Windows flavor). 8-bit - colormapped format is emitted if -colors or -grayscale - is specified, or if the JPEG file is grayscale; - otherwise, 24-bit full-color format is emitted. - - -gif Select GIF output format (LZW compressed). - Since GIF does not support more than 256 colors, - -colors 256 is assumed (unless you specify a smaller - number of colors). If you specify -fast, the default - number of colors is 216. - - -gif0 Select GIF output format (uncompressed). - Since GIF does not support more than 256 colors, - -colors 256 is assumed (unless you specify a smaller - number of colors). If you specify -fast, the default - number of colors is 216. - - -os2 Select BMP output format (OS/2 1.x flavor). 8-bit - colormapped format is emitted if -colors or -grayscale - is specified, or if the JPEG file is grayscale; - otherwise, 24-bit full-color format is emitted. - - -pnm Select PBMPLUS (PPM/PGM) output format (this is the - default format). PGM is emitted if the JPEG file is - grayscale or if -grayscale is specified; otherwise - PPM is emitted. - - -rle Select RLE output format. (Requires URT library.) - - -targa Select Targa output format. Grayscale format is - emitted if the JPEG file is grayscale or if - -grayscale is specified; otherwise, colormapped format - is emitted if -colors is specified; otherwise, 24-bit - full-color format is emitted. - -Switches for advanced users: - - -dct int Use integer DCT method (default). - -dct fast Use fast integer DCT (less accurate). - -dct float Use floating-point DCT method. - The float method is very slightly more accurate than - the int method, but is much slower unless your machine - has very fast floating-point hardware. Also note that - results of the floating-point method may vary slightly - across machines, while the integer methods should give - the same results everywhere. The fast integer method - is much less accurate than the other two. - - -dither fs Use Floyd-Steinberg dithering in color quantization. - -dither ordered Use ordered dithering in color quantization. - -dither none Do not use dithering in color quantization. - By default, Floyd-Steinberg dithering is applied when - quantizing colors; this is slow but usually produces - the best results. Ordered dither is a compromise - between speed and quality; no dithering is fast but - usually looks awful. Note that these switches have - no effect unless color quantization is being done. - Ordered dither is only available in -onepass mode. - - -map FILE Quantize to the colors used in the specified image - file. This is useful for producing multiple files - with identical color maps, or for forcing a predefined - set of colors to be used. The FILE must be a GIF - or PPM file. This option overrides -colors and - -onepass. - - -nosmooth Don't use high-quality upsampling. - - -onepass Use one-pass instead of two-pass color quantization. - The one-pass method is faster and needs less memory, - but it produces a lower-quality image. -onepass is - ignored unless you also say -colors N. Also, - the one-pass method is always used for grayscale - output (the two-pass method is no improvement then). - - -maxmemory N Set limit for amount of memory to use in processing - large images. Value is in thousands of bytes, or - millions of bytes if "M" is attached to the number. - For example, -max 4m selects 4000000 bytes. If more - space is needed, temporary files will be used. - - -verbose Enable debug printout. More -v's give more printout. - or -debug Also, version information is printed at startup. - - -HINTS FOR CJPEG - -Color GIF files are not the ideal input for JPEG; JPEG is really intended for -compressing full-color (24-bit) images. In particular, don't try to convert -cartoons, line drawings, and other images that have only a few distinct -colors. GIF works great on these, JPEG does not. If you want to convert a -GIF to JPEG, you should experiment with cjpeg's -quality and -smooth options -to get a satisfactory conversion. -smooth 10 or so is often helpful. - -Avoid running an image through a series of JPEG compression/decompression -cycles. Image quality loss will accumulate; after ten or so cycles the image -may be noticeably worse than it was after one cycle. It's best to use a -lossless format while manipulating an image, then convert to JPEG format when -you are ready to file the image away. - -The -optimize option to cjpeg is worth using when you are making a "final" -version for posting or archiving. It's also a win when you are using low -quality settings to make very small JPEG files; the percentage improvement -is often a lot more than it is on larger files. (At present, -optimize -mode is always selected when generating progressive JPEG files.) - - -HINTS FOR DJPEG - -To get a quick preview of an image, use the -grayscale and/or -scale switches. -"-grayscale -scale 1/8" is the fastest case. - -Several options are available that trade off image quality to gain speed. -"-fast" turns on the recommended settings. - -"-dct fast" and/or "-nosmooth" gain speed at a small sacrifice in quality. -When producing a color-quantized image, "-onepass -dither ordered" is fast but -much lower quality than the default behavior. "-dither none" may give -acceptable results in two-pass mode, but is seldom tolerable in one-pass mode. - -If you are fortunate enough to have very fast floating point hardware, -"-dct float" may be even faster than "-dct fast". But on most machines -"-dct float" is slower than "-dct int"; in this case it is not worth using, -because its theoretical accuracy advantage is too small to be significant -in practice. - -Two-pass color quantization requires a good deal of memory; on MS-DOS machines -it may run out of memory even with -maxmemory 0. In that case you can still -decompress, with some loss of image quality, by specifying -onepass for -one-pass quantization. - - -HINTS FOR BOTH PROGRAMS - -If more space is needed than will fit in the available main memory (as -determined by -maxmemory), temporary files will be used. (MS-DOS versions -will try to get extended or expanded memory first.) The temporary files are -often rather large: in typical cases they occupy three bytes per pixel, for -example 3*800*600 = 1.44Mb for an 800x600 image. If you don't have enough -free disk space, leave out -progressive and -optimize (for cjpeg) or specify --onepass (for djpeg). - -On MS-DOS, the temporary files are created in the directory named by the TMP -or TEMP environment variable, or in the current directory if neither of those -exist. Amiga implementations put the temp files in the directory named by -JPEGTMP:, so be sure to assign JPEGTMP: to a disk partition with adequate free -space. - -The default memory usage limit (-maxmemory) is set when the software is -compiled. If you get an "insufficient memory" error, try specifying a smaller --maxmemory value, even -maxmemory 0 to use the absolute minimum space. You -may want to recompile with a smaller default value if this happens often. - -On machines that have "environment" variables, you can define the environment -variable JPEGMEM to set the default memory limit. The value is specified as -described for the -maxmemory switch. JPEGMEM overrides the default value -specified when the program was compiled, and itself is overridden by an -explicit -maxmemory switch. - -On MS-DOS machines, -maxmemory is the amount of main (conventional) memory to -use. (Extended or expanded memory is also used if available.) Most -DOS-specific versions of this software do their own memory space estimation -and do not need you to specify -maxmemory. - - -JPEGTRAN - -jpegtran performs various useful transformations of JPEG files. -It can translate the coded representation from one variant of JPEG to another, -for example from baseline JPEG to progressive JPEG or vice versa. It can also -perform some rearrangements of the image data, for example turning an image -from landscape to portrait format by rotation. For EXIF files and JPEG files -containing Exif data, you may prefer to use exiftran instead. - -jpegtran works by rearranging the compressed data (DCT coefficients), without -ever fully decoding the image. Therefore, its transformations are lossless: -there is no image degradation at all, which would not be true if you used -djpeg followed by cjpeg to accomplish the same conversion. But by the same -token, jpegtran cannot perform lossy operations such as changing the image -quality. However, while the image data is losslessly transformed, metadata -can be removed. See the -copy option for specifics. - -jpegtran uses a command line syntax similar to cjpeg or djpeg. -On Unix-like systems, you say: - jpegtran [switches] [inputfile] >outputfile -On most non-Unix systems, you say: - jpegtran [switches] inputfile outputfile -where both the input and output files are JPEG files. - -To specify the coded JPEG representation used in the output file, -jpegtran accepts a subset of the switches recognized by cjpeg: - -optimize Perform optimization of entropy encoding parameters. - -progressive Create progressive JPEG file. - -arithmetic Use arithmetic coding. - -restart N Emit a JPEG restart marker every N MCU rows, or every - N MCU blocks if "B" is attached to the number. - -scans file Use the scan script given in the specified text file. -See the previous discussion of cjpeg for more details about these switches. -If you specify none of these switches, you get a plain baseline-JPEG output -file. The quality setting and so forth are determined by the input file. - -The image can be losslessly transformed by giving one of these switches: - -flip horizontal Mirror image horizontally (left-right). - -flip vertical Mirror image vertically (top-bottom). - -rotate 90 Rotate image 90 degrees clockwise. - -rotate 180 Rotate image 180 degrees. - -rotate 270 Rotate image 270 degrees clockwise (or 90 ccw). - -transpose Transpose image (across UL-to-LR axis). - -transverse Transverse transpose (across UR-to-LL axis). - -The transpose transformation has no restrictions regarding image dimensions. -The other transformations operate rather oddly if the image dimensions are not -a multiple of the iMCU size (usually 8 or 16 pixels), because they can only -transform complete blocks of DCT coefficient data in the desired way. - -jpegtran's default behavior when transforming an odd-size image is designed -to preserve exact reversibility and mathematical consistency of the -transformation set. As stated, transpose is able to flip the entire image -area. Horizontal mirroring leaves any partial iMCU column at the right edge -untouched, but is able to flip all rows of the image. Similarly, vertical -mirroring leaves any partial iMCU row at the bottom edge untouched, but is -able to flip all columns. The other transforms can be built up as sequences -of transpose and flip operations; for consistency, their actions on edge -pixels are defined to be the same as the end result of the corresponding -transpose-and-flip sequence. - -For practical use, you may prefer to discard any untransformable edge pixels -rather than having a strange-looking strip along the right and/or bottom edges -of a transformed image. To do this, add the -trim switch: - -trim Drop non-transformable edge blocks. -Obviously, a transformation with -trim is not reversible, so strictly speaking -jpegtran with this switch is not lossless. Also, the expected mathematical -equivalences between the transformations no longer hold. For example, -"-rot 270 -trim" trims only the bottom edge, but "-rot 90 -trim" followed by -"-rot 180 -trim" trims both edges. - -If you are only interested in perfect transformation, add the -perfect switch: - -perfect Fails with an error if the transformation is not - perfect. -For example you may want to do - jpegtran -rot 90 -perfect foo.jpg || djpeg foo.jpg | pnmflip -r90 | cjpeg -to do a perfect rotation if available or an approximated one if not. - -We also offer a lossless-crop option, which discards data outside a given -image region but losslessly preserves what is inside. Like the rotate and -flip transforms, lossless crop is restricted by the current JPEG format: the -upper left corner of the selected region must fall on an iMCU boundary. If -this does not hold for the given crop parameters, we silently move the upper -left corner up and/or left to make it so, simultaneously increasing the -region dimensions to keep the lower right crop corner unchanged. (Thus, the -output image covers at least the requested region, but may cover more.) -The adjustment of the region dimensions may be optionally disabled by -attaching an 'f' character ("force") to the width or height number. - -The image can be losslessly cropped by giving the switch: - -crop WxH+X+Y Crop to a rectangular subarea of width W, height H - starting at point X,Y. - -Crop extension: The width or height parameters can be made larger than the -source image. In this case the extra area is filled in with zero (neutral -gray). A larger width parameter has two more options: Attaching an 'f' -character ("flatten") to the width number will fill in the extra area with -the DC of the adjacent block, instead of gray out. Attaching an 'r' -character ("reflect") to the width number will fill in the extra area with -repeated reflections of the source region, instead of gray out. - -A complementary lossless-wipe option is provided to discard (gray out) data -inside a given image region while losslessly preserving what is outside: - -wipe WxH+X+Y Wipe (gray out) a rectangular subarea of - width W, height H starting at point X,Y. - -Attaching an 'f' character ("flatten") to the width number will fill the -region with the average of adjacent blocks, instead of gray out. In case -the wipe region and outside area form two horizontally adjacent rectangles, -attaching an 'r' character ("reflect") to the width number will fill the -region with repeated reflections of the outside area, instead of gray out. - -Another option is lossless-drop, which replaces data at a given image -position by another image: - -drop +X+Y filename Drop another image - -Both source images must have the same subsampling values. It is best if -they also have the same quantization, otherwise quantization adaption occurs. -The trim option can be used with the drop option to requantize the drop file -to the source file. - -Other not-strictly-lossless transformation switches are: - - -grayscale Force grayscale output. -This option discards the chrominance channels if the input image is YCbCr -(ie, a standard color JPEG), resulting in a grayscale JPEG file. The -luminance channel is preserved exactly, so this is a better method of reducing -to grayscale than decompression, conversion, and recompression. This switch -is particularly handy for fixing a monochrome picture that was mistakenly -encoded as a color JPEG. (In such a case, the space savings from getting rid -of the near-empty chroma channels won't be large; but the decoding time for -a grayscale JPEG is substantially less than that for a color JPEG.) - - -scale M/N Scale the output image by a factor M/N. -Currently supported scale factors are M/N with all M from 1 to 16, where N is -the source DCT size, which is 8 for baseline JPEG. If the /N part is omitted, -then M specifies the DCT scaled size to be applied on the given input. For -baseline JPEG this is equivalent to M/8 scaling, since the source DCT size -for baseline JPEG is 8. CAUTION: An implementation of the JPEG SmartScale -extension is required for this feature. SmartScale enabled JPEG is not yet -widely implemented, so many decoders will be unable to view a SmartScale -extended JPEG file at all. - -jpegtran also recognizes these switches that control what to do with "extra" -markers, such as comment blocks: - -copy none Copy no extra markers from source file. - This setting suppresses all comments - and other metadata in the source file. - -copy comments Copy only comment markers. - This setting copies comments from the source file, - but discards any other metadata. - -copy all Copy all extra markers. This setting preserves - metadata found in the source file, such as JFIF - thumbnails, Exif data, and Photoshop settings. - In some files these extra markers can be sizable. - Note that this option will copy thumbnails as-is; - they will not be transformed. -The default behavior is -copy comments. (Note: in IJG releases v6 and v6a, -jpegtran always did the equivalent of -copy none.) - -Additional switches recognized by jpegtran are: - -outfile filename - -maxmemory N - -verbose - -debug -These work the same as in cjpeg or djpeg. - - -THE COMMENT UTILITIES - -The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. -Although the standard doesn't actually define what COM blocks are for, they -are widely used to hold user-supplied text strings. This lets you add -annotations, titles, index terms, etc to your JPEG files, and later retrieve -them as text. COM blocks do not interfere with the image stored in the JPEG -file. The maximum size of a COM block is 64K, but you can have as many of -them as you like in one JPEG file. - -We provide two utility programs to display COM block contents and add COM -blocks to a JPEG file. - -rdjpgcom searches a JPEG file and prints the contents of any COM blocks on -standard output. The command line syntax is - rdjpgcom [-raw] [-verbose] [inputfilename] -The switch "-raw" (or just "-r") causes rdjpgcom to also output non-printable -characters in comments, which are normally escaped for security reasons. -The switch "-verbose" (or just "-v") causes rdjpgcom to also display the JPEG -image dimensions. If you omit the input file name from the command line, -the JPEG file is read from standard input. (This may not work on some -operating systems, if binary data can't be read from stdin.) - -wrjpgcom adds a COM block, containing text you provide, to a JPEG file. -Ordinarily, the COM block is added after any existing COM blocks, but you -can delete the old COM blocks if you wish. wrjpgcom produces a new JPEG -file; it does not modify the input file. DO NOT try to overwrite the input -file by directing wrjpgcom's output back into it; on most systems this will -just destroy your file. - -The command line syntax for wrjpgcom is similar to cjpeg's. On Unix-like -systems, it is - wrjpgcom [switches] [inputfilename] -The output file is written to standard output. The input file comes from -the named file, or from standard input if no input file is named. - -On most non-Unix systems, the syntax is - wrjpgcom [switches] inputfilename outputfilename -where both input and output file names must be given explicitly. - -wrjpgcom understands three switches: - -replace Delete any existing COM blocks from the file. - -comment "Comment text" Supply new COM text on command line. - -cfile name Read text for new COM block from named file. -(Switch names can be abbreviated.) If you have only one line of comment text -to add, you can provide it on the command line with -comment. The comment -text must be surrounded with quotes so that it is treated as a single -argument. Longer comments can be read from a text file. - -If you give neither -comment nor -cfile, then wrjpgcom will read the comment -text from standard input. (In this case an input image file name MUST be -supplied, so that the source JPEG file comes from somewhere else.) You can -enter multiple lines, up to 64KB worth. Type an end-of-file indicator -(usually control-D or control-Z) to terminate the comment text entry. - -wrjpgcom will not add a COM block if the provided comment string is empty. -Therefore -replace -comment "" can be used to delete all COM blocks from a -file. - -These utility programs do not depend on the IJG JPEG library. In -particular, the source code for rdjpgcom is intended as an illustration of -the minimum amount of code required to parse a JPEG file header correctly. diff --git a/thirdparty/jpeg-9e/wizard.txt b/thirdparty/jpeg-9e/wizard.txt deleted file mode 100644 index 54170b2..0000000 --- a/thirdparty/jpeg-9e/wizard.txt +++ /dev/null @@ -1,211 +0,0 @@ -Advanced usage instructions for the Independent JPEG Group's JPEG software -========================================================================== - -This file describes cjpeg's "switches for wizards". - -The "wizard" switches are intended for experimentation with JPEG by persons -who are reasonably knowledgeable about the JPEG standard. If you don't know -what you are doing, DON'T USE THESE SWITCHES. You'll likely produce files -with worse image quality and/or poorer compression than you'd get from the -default settings. Furthermore, these switches must be used with caution -when making files intended for general use, because not all JPEG decoders -will support unusual JPEG parameter settings. - - -Quantization Table Adjustment ------------------------------ - -Ordinarily, cjpeg starts with a default set of tables (the same ones given -as examples in the JPEG standard) and scales them up or down according to -the -quality setting. The details of the scaling algorithm can be found in -jcparam.c. At very low quality settings, some quantization table entries -can get scaled up to values exceeding 255. Although 2-byte quantization -values are supported by the IJG software, this feature is not in baseline -JPEG and is not supported by all implementations. If you need to ensure -wide compatibility of low-quality files, you can constrain the scaled -quantization values to no more than 255 by giving the -baseline switch. -Note that use of -baseline will result in poorer quality for the same file -size, since more bits than necessary are expended on higher AC coefficients. - -You can substitute a different set of quantization values by using the --qtables switch: - - -qtables file Use the quantization tables given in the named file. - -The specified file should be a text file containing decimal quantization -values. The file should contain one to four tables, each of 64 elements. -The tables are implicitly numbered 0,1,etc. in order of appearance. Table -entries appear in normal array order (NOT in the zigzag order in which they -will be stored in the JPEG file). - -Quantization table files are free format, in that arbitrary whitespace can -appear between numbers. Also, comments can be included: a comment starts -with '#' and extends to the end of the line. Here is an example file that -duplicates the default quantization tables: - - # Quantization tables given in JPEG spec, section K.1 - - # This is table 0 (the luminance table): - 16 11 10 16 24 40 51 61 - 12 12 14 19 26 58 60 55 - 14 13 16 24 40 57 69 56 - 14 17 22 29 51 87 80 62 - 18 22 37 56 68 109 103 77 - 24 35 55 64 81 104 113 92 - 49 64 78 87 103 121 120 101 - 72 92 95 98 112 100 103 99 - - # This is table 1 (the chrominance table): - 17 18 24 47 99 99 99 99 - 18 21 26 66 99 99 99 99 - 24 26 56 99 99 99 99 99 - 47 66 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - -If the -qtables switch is used without -quality, then the specified tables -are used exactly as-is. If both -qtables and -quality are used, then the -tables taken from the file are scaled in the same fashion that the default -tables would be scaled for that quality setting. If -baseline appears, then -the quantization values are constrained to the range 1-255. - -By default, cjpeg will use quantization table 0 for luminance components and -table 1 for chrominance components. To override this choice, use the -qslots -switch: - - -qslots N[,...] Select which quantization table to use for - each color component. - -The -qslots switch specifies a quantization table number for each color -component, in the order in which the components appear in the JPEG SOF marker. -For example, to create a separate table for each of Y,Cb,Cr, you could -provide a -qtables file that defines three quantization tables and say -"-qslots 0,1,2". If -qslots gives fewer table numbers than there are color -components, then the last table number is repeated as necessary. - - -Sampling Factor Adjustment --------------------------- - -By default, cjpeg uses 2:1 horizontal and vertical downsampling when -compressing YCbCr data, and no downsampling for all other color spaces. -You can override this default with the -sample switch: - - -sample HxV[,...] Set JPEG sampling factors for each color - component. - -The -sample switch specifies the JPEG sampling factors for each color -component, in the order in which they appear in the JPEG SOF marker. -If you specify fewer HxV pairs than there are components, the remaining -components are set to 1x1 sampling. For example, the default YCbCr setting -is equivalent to "-sample 2x2,1x1,1x1", which can be abbreviated to -"-sample 2x2". - -There are still some JPEG decoders in existence that support only 2x1 -sampling (also called 4:2:2 sampling). Compatibility with such decoders can -be achieved by specifying "-sample 2x1". This is not recommended unless -really necessary, since it increases file size and encoding/decoding time -with very little quality gain. - - -Multiple Scan / Progression Control ------------------------------------ - -By default, cjpeg emits a single-scan sequential JPEG file. The --progressive switch generates a progressive JPEG file using a default series -of progression parameters. You can create multiple-scan sequential JPEG -files or progressive JPEG files with custom progression parameters by using -the -scans switch: - - -scans file Use the scan sequence given in the named file. - -The specified file should be a text file containing a "scan script". -The script specifies the contents and ordering of the scans to be emitted. -Each entry in the script defines one scan. A scan definition specifies -the components to be included in the scan, and for progressive JPEG it also -specifies the progression parameters Ss,Se,Ah,Al for the scan. Scan -definitions are separated by semicolons (';'). A semicolon after the last -scan definition is optional. - -Each scan definition contains one to four component indexes, optionally -followed by a colon (':') and the four progressive-JPEG parameters. The -component indexes denote which color component(s) are to be transmitted in -the scan. Components are numbered in the order in which they appear in the -JPEG SOF marker, with the first component being numbered 0. (Note that these -indexes are not the "component ID" codes assigned to the components, just -positional indexes.) - -The progression parameters for each scan are: - Ss Zigzag index of first coefficient included in scan - Se Zigzag index of last coefficient included in scan - Ah Zero for first scan of a coefficient, else Al of prior scan - Al Successive approximation low bit position for scan -If the progression parameters are omitted, the values 0,63,0,0 are used, -producing a sequential JPEG file. cjpeg automatically determines whether -the script represents a progressive or sequential file, by observing whether -Ss and Se values other than 0 and 63 appear. (The -progressive switch is -not needed to specify this; in fact, it is ignored when -scans appears.) -The scan script must meet the JPEG restrictions on progression sequences. -(cjpeg checks that the spec's requirements are obeyed.) - -Scan script files are free format, in that arbitrary whitespace can appear -between numbers and around punctuation. Also, comments can be included: a -comment starts with '#' and extends to the end of the line. For additional -legibility, commas or dashes can be placed between values. (Actually, any -single punctuation character other than ':' or ';' can be inserted.) For -example, the following two scan definitions are equivalent: - 0 1 2: 0 63 0 0; - 0,1,2 : 0-63, 0,0 ; - -Here is an example of a scan script that generates a partially interleaved -sequential JPEG file: - - 0; # Y only in first scan - 1 2; # Cb and Cr in second scan - -Here is an example of a progressive scan script using only spectral selection -(no successive approximation): - - # Interleaved DC scan for Y,Cb,Cr: - 0,1,2: 0-0, 0, 0 ; - # AC scans: - 0: 1-2, 0, 0 ; # First two Y AC coefficients - 0: 3-5, 0, 0 ; # Three more - 1: 1-63, 0, 0 ; # All AC coefficients for Cb - 2: 1-63, 0, 0 ; # All AC coefficients for Cr - 0: 6-9, 0, 0 ; # More Y coefficients - 0: 10-63, 0, 0 ; # Remaining Y coefficients - -Here is an example of a successive-approximation script. This is equivalent -to the default script used by "cjpeg -progressive" for YCbCr images: - - # Initial DC scan for Y,Cb,Cr (lowest bit not sent) - 0,1,2: 0-0, 0, 1 ; - # First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits: - 0: 1-5, 0, 2 ; - # Send all Cr,Cb AC coefficients, minus lowest bit: - # (chroma data is usually too small to be worth subdividing further; - # but note we send Cr first since eye is least sensitive to Cb) - 2: 1-63, 0, 1 ; - 1: 1-63, 0, 1 ; - # Send remaining Y AC coefficients, minus 2 lowest bits: - 0: 6-63, 0, 2 ; - # Send next-to-lowest bit of all Y AC coefficients: - 0: 1-63, 2, 1 ; - # At this point we've sent all but the lowest bit of all coefficients. - # Send lowest bit of DC coefficients - 0,1,2: 0-0, 1, 0 ; - # Send lowest bit of AC coefficients - 2: 1-63, 1, 0 ; - 1: 1-63, 1, 0 ; - # Y AC lowest bit scan is last; it's usually the largest scan - 0: 1-63, 1, 0 ; - -It may be worth pointing out that this script is tuned for quality settings -of around 50 to 75. For lower quality settings, you'd probably want to use -a script with fewer stages of successive approximation (otherwise the -initial scans will be really bad). For higher quality settings, you might -want to use more stages of successive approximation (so that the initial -scans are not too large). diff --git a/thirdparty/jpeg-9e/wrbmp.c b/thirdparty/jpeg-9e/wrbmp.c deleted file mode 100644 index bed699f..0000000 --- a/thirdparty/jpeg-9e/wrbmp.c +++ /dev/null @@ -1,437 +0,0 @@ -/* - * wrbmp.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2017-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write output images in Microsoft "BMP" - * format (MS Windows 3.x and OS/2 1.x flavors). - * Either 8-bit colormapped or 24-bit full-color format can be written. - * No compression is supported. - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume output to - * an ordinary stdio stream. - * - * This code contributed by James Arthur Boucher. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef BMP_SUPPORTED - - -/* - * To support 12-bit JPEG data, we'd have to scale output down to 8 bits. - * This is not yet implemented. - */ - -#if BITS_IN_JSAMPLE != 8 - Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ -#endif - -/* - * Since BMP stores scanlines bottom-to-top, we have to invert the image - * from JPEG's top-to-bottom order. To do this, we save the outgoing data - * in a virtual array during put_pixel_row calls, then actually emit the - * BMP file during finish_output. The virtual array contains one JSAMPLE per - * pixel if the output is grayscale or colormapped, three if it is full color. - */ - -/* Private version of data destination object */ - -typedef struct { - struct djpeg_dest_struct pub; /* public fields */ - - boolean is_os2; /* saves the OS2 format request flag */ - - jvirt_sarray_ptr whole_image; /* needed to reverse row order */ - JDIMENSION data_width; /* JSAMPLEs per row */ - JDIMENSION row_width; /* physical width of one row in the BMP file */ - int pad_bytes; /* number of padding bytes needed per row */ - JDIMENSION cur_output_row; /* next row# to write to virtual array */ -} bmp_dest_struct; - -typedef bmp_dest_struct * bmp_dest_ptr; - - -/* Forward declarations */ -LOCAL(void) write_colormap - JPP((j_decompress_ptr cinfo, bmp_dest_ptr dest, - int map_colors, int map_entry_size)); - - -/* - * Write some pixel data. - * In this module rows_supplied will always be 1. - */ - -METHODDEF(void) -put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -/* This version is for writing 24-bit pixels */ -{ - bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - int pad; - - /* Access next row in virtual array */ - outptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, - dest->whole_image, dest->cur_output_row, (JDIMENSION) 1, TRUE); - dest->cur_output_row++; - - /* Transfer data. Note destination values must be in BGR order - * (even though Microsoft's own documents say the opposite). - */ - inptr = dest->pub.buffer[0]; - for (col = cinfo->output_width; col > 0; col--) { - outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ - outptr[1] = *inptr++; - outptr[0] = *inptr++; - outptr += 3; - } - - /* Zero out the pad bytes. */ - pad = dest->pad_bytes; - while (--pad >= 0) - *outptr++ = 0; -} - -METHODDEF(void) -put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -/* This version is for grayscale OR quantized color output */ -{ - bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - int pad; - - /* Access next row in virtual array */ - outptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, - dest->whole_image, dest->cur_output_row, (JDIMENSION) 1, TRUE); - dest->cur_output_row++; - - /* Transfer data. */ - inptr = dest->pub.buffer[0]; - for (col = cinfo->output_width; col > 0; col--) { - *outptr++ = *inptr++; /* can omit GETJSAMPLE() safely */ - } - - /* Zero out the pad bytes. */ - pad = dest->pad_bytes; - while (--pad >= 0) - *outptr++ = 0; -} - - -/* - * Startup: normally writes the file header. - * In this module we may as well postpone everything until finish_output. - */ - -METHODDEF(void) -start_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - /* no work here */ -} - - -/* - * Finish up at the end of the file. - * - * Here is where we really output the BMP file. - * - * First, routines to write the Windows and OS/2 variants of the file header. - */ - -LOCAL(void) -write_bmp_header (j_decompress_ptr cinfo, bmp_dest_ptr dest) -/* Write a Windows-style BMP file header, including colormap if needed */ -{ - char bmpfileheader[14]; - char bmpinfoheader[40]; -#define PUT_2B(array, offset, value) \ - (array[offset] = (char) ((value) & 0xFF), \ - array[offset+1] = (char) (((value) >> 8) & 0xFF)) -#define PUT_4B(array, offset, value) \ - (array[offset] = (char) ((value) & 0xFF), \ - array[offset+1] = (char) (((value) >> 8) & 0xFF), \ - array[offset+2] = (char) (((value) >> 16) & 0xFF), \ - array[offset+3] = (char) (((value) >> 24) & 0xFF)) - INT32 headersize, bfSize; - int bits_per_pixel, cmap_entries; - - /* Compute colormap size and total file size */ - if (cinfo->out_color_space == JCS_RGB) { - if (cinfo->quantize_colors) { - /* Colormapped RGB */ - bits_per_pixel = 8; - cmap_entries = 256; - } else { - /* Unquantized, full color RGB */ - bits_per_pixel = 24; - cmap_entries = 0; - } - } else { - /* Grayscale output. We need to fake a 256-entry colormap. */ - bits_per_pixel = 8; - cmap_entries = 256; - } - /* File size */ - headersize = 14 + 40 + cmap_entries * 4; /* Header and colormap */ - bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height; - - /* Set unused fields of header to 0 */ - MEMZERO(bmpfileheader, SIZEOF(bmpfileheader)); - MEMZERO(bmpinfoheader, SIZEOF(bmpinfoheader)); - - /* Fill the file header */ - bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */ - bmpfileheader[1] = 0x4D; - PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */ - /* we leave bfReserved1 & bfReserved2 = 0 */ - PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */ - - /* Fill the info header (Microsoft calls this a BITMAPINFOHEADER) */ - PUT_2B(bmpinfoheader, 0, 40); /* biSize */ - PUT_4B(bmpinfoheader, 4, cinfo->output_width); /* biWidth */ - PUT_4B(bmpinfoheader, 8, cinfo->output_height); /* biHeight */ - PUT_2B(bmpinfoheader, 12, 1); /* biPlanes - must be 1 */ - PUT_2B(bmpinfoheader, 14, bits_per_pixel); /* biBitCount */ - /* we leave biCompression = 0, for none */ - /* we leave biSizeImage = 0; this is correct for uncompressed data */ - if (cinfo->density_unit == 2) { /* if have density in dots/cm, then */ - PUT_4B(bmpinfoheader, 24, (INT32) (cinfo->X_density*100)); /* XPels/M */ - PUT_4B(bmpinfoheader, 28, (INT32) (cinfo->Y_density*100)); /* XPels/M */ - } - PUT_2B(bmpinfoheader, 32, cmap_entries); /* biClrUsed */ - /* we leave biClrImportant = 0 */ - - if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14) - ERREXIT(cinfo, JERR_FILE_WRITE); - if (JFWRITE(dest->pub.output_file, bmpinfoheader, 40) != (size_t) 40) - ERREXIT(cinfo, JERR_FILE_WRITE); - - if (cmap_entries > 0) - write_colormap(cinfo, dest, cmap_entries, 4); -} - - -LOCAL(void) -write_os2_header (j_decompress_ptr cinfo, bmp_dest_ptr dest) -/* Write an OS2-style BMP file header, including colormap if needed */ -{ - char bmpfileheader[14]; - char bmpcoreheader[12]; - INT32 headersize, bfSize; - int bits_per_pixel, cmap_entries; - - /* Compute colormap size and total file size */ - if (cinfo->out_color_space == JCS_RGB) { - if (cinfo->quantize_colors) { - /* Colormapped RGB */ - bits_per_pixel = 8; - cmap_entries = 256; - } else { - /* Unquantized, full color RGB */ - bits_per_pixel = 24; - cmap_entries = 0; - } - } else { - /* Grayscale output. We need to fake a 256-entry colormap. */ - bits_per_pixel = 8; - cmap_entries = 256; - } - /* File size */ - headersize = 14 + 12 + cmap_entries * 3; /* Header and colormap */ - bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height; - - /* Set unused fields of header to 0 */ - MEMZERO(bmpfileheader, SIZEOF(bmpfileheader)); - MEMZERO(bmpcoreheader, SIZEOF(bmpcoreheader)); - - /* Fill the file header */ - bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */ - bmpfileheader[1] = 0x4D; - PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */ - /* we leave bfReserved1 & bfReserved2 = 0 */ - PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */ - - /* Fill the info header (Microsoft calls this a BITMAPCOREHEADER) */ - PUT_2B(bmpcoreheader, 0, 12); /* bcSize */ - PUT_2B(bmpcoreheader, 4, cinfo->output_width); /* bcWidth */ - PUT_2B(bmpcoreheader, 6, cinfo->output_height); /* bcHeight */ - PUT_2B(bmpcoreheader, 8, 1); /* bcPlanes - must be 1 */ - PUT_2B(bmpcoreheader, 10, bits_per_pixel); /* bcBitCount */ - - if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14) - ERREXIT(cinfo, JERR_FILE_WRITE); - if (JFWRITE(dest->pub.output_file, bmpcoreheader, 12) != (size_t) 12) - ERREXIT(cinfo, JERR_FILE_WRITE); - - if (cmap_entries > 0) - write_colormap(cinfo, dest, cmap_entries, 3); -} - - -/* - * Write the colormap. - * Windows uses BGR0 map entries; OS/2 uses BGR entries. - */ - -LOCAL(void) -write_colormap (j_decompress_ptr cinfo, bmp_dest_ptr dest, - int map_colors, int map_entry_size) -{ - JSAMPARRAY colormap = cinfo->colormap; - int num_colors = cinfo->actual_number_of_colors; - FILE * outfile = dest->pub.output_file; - int i; - - if (colormap != NULL) { - if (cinfo->out_color_components == 3) { - /* Normal case with RGB colormap */ - for (i = 0; i < num_colors; i++) { - putc(GETJSAMPLE(colormap[2][i]), outfile); - putc(GETJSAMPLE(colormap[1][i]), outfile); - putc(GETJSAMPLE(colormap[0][i]), outfile); - if (map_entry_size == 4) - putc(0, outfile); - } - } else { - /* Grayscale colormap (only happens with grayscale quantization) */ - for (i = 0; i < num_colors; i++) { - putc(GETJSAMPLE(colormap[0][i]), outfile); - putc(GETJSAMPLE(colormap[0][i]), outfile); - putc(GETJSAMPLE(colormap[0][i]), outfile); - if (map_entry_size == 4) - putc(0, outfile); - } - } - } else { - /* If no colormap, must be grayscale data. Generate a linear "map". */ - for (i = 0; i < 256; i++) { - putc(i, outfile); - putc(i, outfile); - putc(i, outfile); - if (map_entry_size == 4) - putc(0, outfile); - } - } - /* Pad colormap to ensure specified number of colormap entries */ - if (i > map_colors) - ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, i); - for (; i < map_colors; i++) { - putc(CENTERJSAMPLE, outfile); - putc(CENTERJSAMPLE, outfile); - putc(CENTERJSAMPLE, outfile); - if (map_entry_size == 4) - putc(0, outfile); - } -} - - -METHODDEF(void) -finish_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; - register FILE * outfile = dest->pub.output_file; - register JSAMPROW data_ptr; - JDIMENSION row; - register JDIMENSION col; - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - - /* Write the header and colormap */ - if (dest->is_os2) - write_os2_header(cinfo, dest); - else - write_bmp_header(cinfo, dest); - - /* Write the file body from our virtual array */ - for (row = cinfo->output_height; row > 0; row--) { - if (progress != NULL) { - progress->pub.pass_counter = (long) (cinfo->output_height - row); - progress->pub.pass_limit = (long) cinfo->output_height; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } - data_ptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, - dest->whole_image, row - 1, (JDIMENSION) 1, FALSE); - for (col = dest->row_width; col > 0; col--) { - putc(GETJSAMPLE(*data_ptr), outfile); - data_ptr++; - } - } - if (progress != NULL) - progress->completed_extra_passes++; - - /* Make sure we wrote the output file OK */ - JFFLUSH(outfile); - if (JFERROR(outfile)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * The module selection routine for BMP format output. - */ - -GLOBAL(djpeg_dest_ptr) -jinit_write_bmp (j_decompress_ptr cinfo, boolean is_os2) -{ - bmp_dest_ptr dest; - JDIMENSION row_width; - - /* Create module interface object, fill in method pointers */ - dest = (bmp_dest_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(bmp_dest_struct)); - dest->pub.start_output = start_output_bmp; - dest->pub.finish_output = finish_output_bmp; - dest->is_os2 = is_os2; - - switch (cinfo->out_color_space) { - case JCS_GRAYSCALE: - dest->pub.put_pixel_rows = put_gray_rows; - break; - case JCS_RGB: - if (cinfo->quantize_colors) - dest->pub.put_pixel_rows = put_gray_rows; - else - dest->pub.put_pixel_rows = put_pixel_rows; - break; - default: - ERREXIT(cinfo, JERR_BMP_COLORSPACE); - } - - /* Calculate output image dimensions so we can allocate space */ - jpeg_calc_output_dimensions(cinfo); - - /* Determine width of rows in the BMP file (padded to 4-byte boundary). */ - row_width = cinfo->output_width * cinfo->output_components; - dest->data_width = row_width; - while ((row_width & 3) != 0) row_width++; - dest->row_width = row_width; - dest->pad_bytes = (int) (row_width - dest->data_width); - - /* Allocate space for inversion array, prepare for write pass */ - dest->whole_image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - row_width, cinfo->output_height, (JDIMENSION) 1); - dest->cur_output_row = 0; - if (cinfo->progress != NULL) { - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - progress->total_extra_passes++; /* count file input as separate pass */ - } - - /* Create decompressor output buffer. */ - dest->pub.buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, row_width, (JDIMENSION) 1); - dest->pub.buffer_height = 1; - - return &dest->pub; -} - -#endif /* BMP_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/wrgif.c b/thirdparty/jpeg-9e/wrgif.c deleted file mode 100644 index 9d472de..0000000 --- a/thirdparty/jpeg-9e/wrgif.c +++ /dev/null @@ -1,566 +0,0 @@ -/* - * wrgif.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2015-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write output images in GIF format. - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume output to - * an ordinary stdio stream. - */ - -/* - * This code is loosely based on ppmtogif from the PBMPLUS distribution - * of Feb. 1991. That file contains the following copyright notice: - * Based on GIFENCODE by David Rowley . - * Lempel-Ziv compression based on "compress" by Spencer W. Thomas et al. - * Copyright (C) 1989 by Jef Poskanzer. - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation. This software is provided "as is" without express or - * implied warranty. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef GIF_SUPPORTED - - -#define MAX_LZW_BITS 12 /* maximum LZW code size (4096 symbols) */ - -typedef INT16 code_int; /* must hold -1 .. 2**MAX_LZW_BITS */ - -#define LZW_TABLE_SIZE ((code_int) 1 << MAX_LZW_BITS) - -#define HSIZE 5003 /* hash table size for 80% occupancy */ - -typedef int hash_int; /* must hold -2*HSIZE..2*HSIZE */ - -#define MAXCODE(n_bits) (((code_int) 1 << (n_bits)) - 1) - - -/* - * The LZW hash table consists of two parallel arrays: - * hash_code[i] code of symbol in slot i, or 0 if empty slot - * hash_value[i] symbol's value; undefined if empty slot - * where slot values (i) range from 0 to HSIZE-1. The symbol value is - * its prefix symbol's code concatenated with its suffix character. - * - * Algorithm: use open addressing double hashing (no chaining) on the - * prefix code / suffix character combination. We do a variant of Knuth's - * algorithm D (vol. 3, sec. 6.4) along with G. Knott's relatively-prime - * secondary probe. - * - * The hash_value[] table is allocated from FAR heap space since it would - * use up rather a lot of the near data space in a PC. - */ - -typedef INT32 hash_entry; /* must hold (code_int<<8) | byte */ - -#define HASH_ENTRY(prefix, suffix) ((((hash_entry) (prefix)) << 8) | (suffix)) - - -/* Private version of data destination object */ - -typedef struct { - struct djpeg_dest_struct pub; /* public fields */ - - j_decompress_ptr cinfo; /* back link saves passing separate parm */ - - /* State for packing variable-width codes into a bitstream */ - int n_bits; /* current number of bits/code */ - code_int maxcode; /* maximum code, given n_bits */ - int init_bits; /* initial n_bits ... restored after clear */ - INT32 cur_accum; /* holds bits not yet output */ - int cur_bits; /* # of bits in cur_accum */ - - /* LZW string construction */ - code_int waiting_code; /* symbol not yet output; may be extendable */ - boolean first_byte; /* if TRUE, waiting_code is not valid */ - - /* State for GIF code assignment */ - code_int ClearCode; /* clear code (doesn't change) */ - code_int EOFCode; /* EOF code (ditto) */ - code_int free_code; /* LZW: first not-yet-used symbol code */ - code_int code_counter; /* not LZW: counts output symbols */ - - /* LZW hash table */ - code_int *hash_code; /* => hash table of symbol codes */ - hash_entry FAR *hash_value; /* => hash table of symbol values */ - - /* GIF data packet construction buffer */ - int bytesinpkt; /* # of bytes in current packet */ - char packetbuf[256]; /* workspace for accumulating packet */ - -} gif_dest_struct; - -typedef gif_dest_struct * gif_dest_ptr; - - -/* - * Routines to package finished data bytes into GIF data blocks. - * A data block consists of a count byte (1..255) and that many data bytes. - */ - -LOCAL(void) -flush_packet (gif_dest_ptr dinfo) -/* flush any accumulated data */ -{ - if (dinfo->bytesinpkt > 0) { /* never write zero-length packet */ - dinfo->packetbuf[0] = (char) dinfo->bytesinpkt++; - if (JFWRITE(dinfo->pub.output_file, dinfo->packetbuf, dinfo->bytesinpkt) - != (size_t) dinfo->bytesinpkt) - ERREXIT(dinfo->cinfo, JERR_FILE_WRITE); - dinfo->bytesinpkt = 0; - } -} - - -/* Add a character to current packet; flush to disk if necessary */ -#define CHAR_OUT(dinfo, c) \ - { (dinfo)->packetbuf[++(dinfo)->bytesinpkt] = (char) (c); \ - if ((dinfo)->bytesinpkt >= 255) \ - flush_packet(dinfo); \ - } - - -/* Routine to convert variable-width codes into a byte stream */ - -LOCAL(void) -output (gif_dest_ptr dinfo, code_int code) -/* Emit a code of n_bits bits */ -/* Uses cur_accum and cur_bits to reblock into 8-bit bytes */ -{ - dinfo->cur_accum |= ((INT32) code) << dinfo->cur_bits; - dinfo->cur_bits += dinfo->n_bits; - - while (dinfo->cur_bits >= 8) { - CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF); - dinfo->cur_accum >>= 8; - dinfo->cur_bits -= 8; - } - - /* - * If the next entry is going to be too big for the code size, - * then increase it, if possible. We do this here to ensure - * that it's done in sync with the decoder's codesize increases. - */ - if (dinfo->free_code > dinfo->maxcode) { - dinfo->n_bits++; - if (dinfo->n_bits == MAX_LZW_BITS) - dinfo->maxcode = LZW_TABLE_SIZE; /* free_code will never exceed this */ - else - dinfo->maxcode = MAXCODE(dinfo->n_bits); - } -} - - -/* Compression initialization & termination */ - - -LOCAL(void) -clear_hash (gif_dest_ptr dinfo) -/* Fill the hash table with empty entries */ -{ - /* It's sufficient to zero hash_code[] */ - MEMZERO(dinfo->hash_code, HSIZE * SIZEOF(code_int)); -} - - -LOCAL(void) -clear_block (gif_dest_ptr dinfo) -/* Reset compressor and issue a Clear code */ -{ - clear_hash(dinfo); /* delete all the symbols */ - dinfo->free_code = dinfo->ClearCode + 2; - output(dinfo, dinfo->ClearCode); /* inform decoder */ - dinfo->n_bits = dinfo->init_bits; /* reset code size */ - dinfo->maxcode = MAXCODE(dinfo->n_bits); -} - - -LOCAL(void) -compress_init (gif_dest_ptr dinfo, int i_bits) -/* Initialize compressor */ -{ - /* init all the state variables */ - dinfo->n_bits = dinfo->init_bits = i_bits; - dinfo->maxcode = MAXCODE(dinfo->n_bits); - dinfo->ClearCode = ((code_int) 1 << (i_bits - 1)); - dinfo->EOFCode = dinfo->ClearCode + 1; - dinfo->code_counter = dinfo->free_code = dinfo->ClearCode + 2; - dinfo->first_byte = TRUE; /* no waiting symbol yet */ - /* init output buffering vars */ - dinfo->bytesinpkt = 0; - dinfo->cur_accum = 0; - dinfo->cur_bits = 0; - /* clear hash table */ - if (dinfo->hash_code != NULL) - clear_hash(dinfo); - /* GIF specifies an initial Clear code */ - output(dinfo, dinfo->ClearCode); -} - - -LOCAL(void) -compress_term (gif_dest_ptr dinfo) -/* Clean up at end */ -{ - /* Flush out the buffered LZW code */ - if (! dinfo->first_byte) - output(dinfo, dinfo->waiting_code); - /* Send an EOF code */ - output(dinfo, dinfo->EOFCode); - /* Flush the bit-packing buffer */ - if (dinfo->cur_bits > 0) { - CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF); - } - /* Flush the packet buffer */ - flush_packet(dinfo); -} - - -/* GIF header construction */ - - -LOCAL(void) -put_word (gif_dest_ptr dinfo, unsigned int w) -/* Emit a 16-bit word, LSB first */ -{ - putc(w & 0xFF, dinfo->pub.output_file); - putc((w >> 8) & 0xFF, dinfo->pub.output_file); -} - - -LOCAL(void) -put_3bytes (gif_dest_ptr dinfo, int val) -/* Emit 3 copies of same byte value --- handy subr for colormap construction */ -{ - putc(val, dinfo->pub.output_file); - putc(val, dinfo->pub.output_file); - putc(val, dinfo->pub.output_file); -} - - -LOCAL(void) -emit_header (gif_dest_ptr dinfo, int num_colors, JSAMPARRAY colormap) -/* Output the GIF file header, including color map */ -/* If colormap == NULL, synthesize a grayscale colormap */ -{ - int BitsPerPixel, ColorMapSize, InitCodeSize, FlagByte; - int cshift = dinfo->cinfo->data_precision - 8; - int i; - - if (num_colors > 256) - ERREXIT1(dinfo->cinfo, JERR_TOO_MANY_COLORS, num_colors); - /* Compute bits/pixel and related values */ - BitsPerPixel = 1; - while (num_colors > (1 << BitsPerPixel)) - BitsPerPixel++; - ColorMapSize = 1 << BitsPerPixel; - if (BitsPerPixel <= 1) - InitCodeSize = 2; - else - InitCodeSize = BitsPerPixel; - /* - * Write the GIF header. - * Note that we generate a plain GIF87 header for maximum compatibility. - */ - putc('G', dinfo->pub.output_file); - putc('I', dinfo->pub.output_file); - putc('F', dinfo->pub.output_file); - putc('8', dinfo->pub.output_file); - putc('7', dinfo->pub.output_file); - putc('a', dinfo->pub.output_file); - /* Write the Logical Screen Descriptor */ - put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); - put_word(dinfo, (unsigned int) dinfo->cinfo->output_height); - FlagByte = 0x80; /* Yes, there is a global color table */ - FlagByte |= (BitsPerPixel - 1) << 4; /* color resolution */ - FlagByte |= (BitsPerPixel - 1); /* size of global color table */ - putc(FlagByte, dinfo->pub.output_file); - putc(0, dinfo->pub.output_file); /* Background color index */ - putc(0, dinfo->pub.output_file); /* Reserved (aspect ratio in GIF89) */ - /* Write the Global Color Map */ - /* If the color map is more than 8 bits precision, */ - /* we reduce it to 8 bits by shifting */ - for (i = 0; i < ColorMapSize; i++) { - if (i < num_colors) { - if (colormap != NULL) { - if (dinfo->cinfo->out_color_space == JCS_RGB) { - /* Normal case: RGB color map */ - putc(GETJSAMPLE(colormap[0][i]) >> cshift, dinfo->pub.output_file); - putc(GETJSAMPLE(colormap[1][i]) >> cshift, dinfo->pub.output_file); - putc(GETJSAMPLE(colormap[2][i]) >> cshift, dinfo->pub.output_file); - } else { - /* Grayscale "color map": possible if quantizing grayscale image */ - put_3bytes(dinfo, GETJSAMPLE(colormap[0][i]) >> cshift); - } - } else { - /* Create a grayscale map of num_colors values, range 0..255 */ - put_3bytes(dinfo, (i * 255 + (num_colors - 1) / 2) / (num_colors - 1)); - } - } else { - /* fill out the map to a power of 2 */ - put_3bytes(dinfo, CENTERJSAMPLE >> cshift); - } - } - /* Write image separator and Image Descriptor */ - putc(',', dinfo->pub.output_file); /* separator */ - put_word(dinfo, 0); /* left/top offset */ - put_word(dinfo, 0); - put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); /* image size */ - put_word(dinfo, (unsigned int) dinfo->cinfo->output_height); - /* flag byte: not interlaced, no local color map */ - putc(0x00, dinfo->pub.output_file); - /* Write Initial Code Size byte */ - putc(InitCodeSize, dinfo->pub.output_file); - - /* Initialize for compression of image data */ - compress_init(dinfo, InitCodeSize + 1); -} - - -/* - * Startup: write the file header. - */ - -METHODDEF(void) -start_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - gif_dest_ptr dest = (gif_dest_ptr) dinfo; - - if (cinfo->quantize_colors) - emit_header(dest, cinfo->actual_number_of_colors, cinfo->colormap); - else - emit_header(dest, 256, (JSAMPARRAY) NULL); -} - - -/* - * Write some pixel data. - * In this module rows_supplied will always be 1. - */ - - -/* - * The LZW algorithm proper - */ - -METHODDEF(void) -put_LZW_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - gif_dest_ptr dest = (gif_dest_ptr) dinfo; - register JSAMPROW ptr; - register JDIMENSION col; - code_int c; - register hash_int i; - register hash_int disp; - register hash_entry probe_value; - - ptr = dest->pub.buffer[0]; - for (col = cinfo->output_width; col > 0; col--) { - /* Accept and compress one 8-bit byte */ - c = (code_int) GETJSAMPLE(*ptr++); - - if (dest->first_byte) { /* need to initialize waiting_code */ - dest->waiting_code = c; - dest->first_byte = FALSE; - continue; - } - - /* Probe hash table to see if a symbol exists for - * waiting_code followed by c. - * If so, replace waiting_code by that symbol and continue. - */ - i = ((hash_int) c << (MAX_LZW_BITS-8)) + dest->waiting_code; - /* i is less than twice 2**MAX_LZW_BITS, therefore less than twice HSIZE */ - if (i >= HSIZE) - i -= HSIZE; - - probe_value = HASH_ENTRY(dest->waiting_code, c); - - if (dest->hash_code[i] == 0) { - /* hit empty slot; desired symbol not in table */ - output(dest, dest->waiting_code); - if (dest->free_code < LZW_TABLE_SIZE) { - dest->hash_code[i] = dest->free_code++; /* add symbol to hashtable */ - dest->hash_value[i] = probe_value; - } else - clear_block(dest); - dest->waiting_code = c; - continue; - } - if (dest->hash_value[i] == probe_value) { - dest->waiting_code = dest->hash_code[i]; - continue; - } - - if (i == 0) /* secondary hash (after G. Knott) */ - disp = 1; - else - disp = HSIZE - i; - for (;;) { - i -= disp; - if (i < 0) - i += HSIZE; - if (dest->hash_code[i] == 0) { - /* hit empty slot; desired symbol not in table */ - output(dest, dest->waiting_code); - if (dest->free_code < LZW_TABLE_SIZE) { - dest->hash_code[i] = dest->free_code++; /* add symbol to hashtable */ - dest->hash_value[i] = probe_value; - } else - clear_block(dest); - dest->waiting_code = c; - break; - } - if (dest->hash_value[i] == probe_value) { - dest->waiting_code = dest->hash_code[i]; - break; - } - } - } -} - - -/* - * The pseudo-compression algorithm. - * - * In this version we simply output each pixel value as a separate symbol; - * thus, no compression occurs. In fact, there is expansion of one bit per - * pixel, because we use a symbol width one bit wider than the pixel width. - * - * GIF ordinarily uses variable-width symbols, and the decoder will expect - * to ratchet up the symbol width after a fixed number of symbols. - * To simplify the logic and keep the expansion penalty down, we emit a - * GIF Clear code to reset the decoder just before the width would ratchet up. - * Thus, all the symbols in the output file will have the same bit width. - * Note that emitting the Clear codes at the right times is a mere matter of - * counting output symbols and is in no way dependent on the LZW algorithm. - * - * With a small basic pixel width (low color count), Clear codes will be - * needed very frequently, causing the file to expand even more. So this - * simplistic approach wouldn't work too well on bilevel images, for example. - * But for output of JPEG conversions the pixel width will usually be 8 bits - * (129 to 256 colors), so the overhead added by Clear symbols is only about - * one symbol in every 256. - */ - -METHODDEF(void) -put_raw_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - gif_dest_ptr dest = (gif_dest_ptr) dinfo; - register JSAMPROW ptr; - register JDIMENSION col; - code_int c; - - ptr = dest->pub.buffer[0]; - for (col = cinfo->output_width; col > 0; col--) { - c = (code_int) GETJSAMPLE(*ptr++); - /* Accept and output one pixel value. - * The given value must be less than n_bits wide. - */ - - /* Output the given pixel value as a symbol. */ - output(dest, c); - /* Issue Clear codes often enough to keep the reader from ratcheting up - * its symbol size. - */ - if (dest->code_counter < dest->maxcode) { - dest->code_counter++; - } else { - output(dest, dest->ClearCode); - dest->code_counter = dest->ClearCode + 2; /* reset the counter */ - } - } -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - gif_dest_ptr dest = (gif_dest_ptr) dinfo; - - /* Flush compression mechanism */ - compress_term(dest); - /* Write a zero-length data block to end the series */ - putc(0, dest->pub.output_file); - /* Write the GIF terminator mark */ - putc(';', dest->pub.output_file); - /* Make sure we wrote the output file OK */ - JFFLUSH(dest->pub.output_file); - if (JFERROR(dest->pub.output_file)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * The module selection routine for GIF format output. - */ - -GLOBAL(djpeg_dest_ptr) -jinit_write_gif (j_decompress_ptr cinfo, boolean is_lzw) -{ - gif_dest_ptr dest; - - /* Create module interface object, fill in method pointers */ - dest = (gif_dest_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(gif_dest_struct)); - dest->cinfo = cinfo; /* make back link for subroutines */ - dest->pub.start_output = start_output_gif; - dest->pub.finish_output = finish_output_gif; - - if (cinfo->out_color_space != JCS_GRAYSCALE && - cinfo->out_color_space != JCS_RGB) - ERREXIT(cinfo, JERR_GIF_COLORSPACE); - - /* Force quantization if color or if > 8 bits input */ - if (cinfo->out_color_space != JCS_GRAYSCALE || cinfo->data_precision > 8) { - /* Force quantization to at most 256 colors */ - cinfo->quantize_colors = TRUE; - if (cinfo->desired_number_of_colors > 256) - cinfo->desired_number_of_colors = 256; - } - - /* Calculate output image dimensions so we can allocate space */ - jpeg_calc_output_dimensions(cinfo); - - if (cinfo->output_components != 1) /* safety check: just one component? */ - ERREXIT(cinfo, JERR_GIF_BUG); - - /* Create decompressor output buffer. */ - dest->pub.buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, cinfo->output_width, (JDIMENSION) 1); - dest->pub.buffer_height = 1; - - if (is_lzw) { - dest->pub.put_pixel_rows = put_LZW_pixel_rows; - /* Allocate space for hash table */ - dest->hash_code = (code_int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, HSIZE * SIZEOF(code_int)); - dest->hash_value = (hash_entry FAR *) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, HSIZE * SIZEOF(hash_entry)); - } else { - dest->pub.put_pixel_rows = put_raw_pixel_rows; - /* Mark tables unused */ - dest->hash_code = NULL; - dest->hash_value = NULL; - } - - return &dest->pub; -} - -#endif /* GIF_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/wrjpgcom.1 b/thirdparty/jpeg-9e/wrjpgcom.1 deleted file mode 100644 index d419a99..0000000 --- a/thirdparty/jpeg-9e/wrjpgcom.1 +++ /dev/null @@ -1,103 +0,0 @@ -.TH WRJPGCOM 1 "15 June 1995" -.SH NAME -wrjpgcom \- insert text comments into a JPEG file -.SH SYNOPSIS -.B wrjpgcom -[ -.B \-replace -] -[ -.BI \-comment " text" -] -[ -.BI \-cfile " name" -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B wrjpgcom -reads the named JPEG/JFIF file, or the standard input if no file is named, -and generates a new JPEG/JFIF file on standard output. A comment block is -added to the file. -.PP -The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. -Although the standard doesn't actually define what COM blocks are for, they -are widely used to hold user-supplied text strings. This lets you add -annotations, titles, index terms, etc to your JPEG files, and later retrieve -them as text. COM blocks do not interfere with the image stored in the JPEG -file. The maximum size of a COM block is 64K, but you can have as many of -them as you like in one JPEG file. -.PP -.B wrjpgcom -adds a COM block, containing text you provide, to a JPEG file. -Ordinarily, the COM block is added after any existing COM blocks; but you -can delete the old COM blocks if you wish. -.SH OPTIONS -Switch names may be abbreviated, and are not case sensitive. -.TP -.B \-replace -Delete any existing COM blocks from the file. -.TP -.BI \-comment " text" -Supply text for new COM block on command line. -.TP -.BI \-cfile " name" -Read text for new COM block from named file. -.PP -If you have only one line of comment text to add, you can provide it on the -command line with -.BR \-comment . -The comment text must be surrounded with quotes so that it is treated as a -single argument. Longer comments can be read from a text file. -.PP -If you give neither -.B \-comment -nor -.BR \-cfile , -then -.B wrjpgcom -will read the comment text from standard input. (In this case an input image -file name MUST be supplied, so that the source JPEG file comes from somewhere -else.) You can enter multiple lines, up to 64KB worth. Type an end-of-file -indicator (usually control-D) to terminate the comment text entry. -.PP -.B wrjpgcom -will not add a COM block if the provided comment string is empty. Therefore -\fB\-replace \-comment ""\fR can be used to delete all COM blocks from a file. -.SH EXAMPLES -.LP -Add a short comment to in.jpg, producing out.jpg: -.IP -.B wrjpgcom \-c -\fI"View of my back yard" in.jpg -.B > -.I out.jpg -.PP -Attach a long comment previously stored in comment.txt: -.IP -.B wrjpgcom -.I in.jpg -.B < -.I comment.txt -.B > -.I out.jpg -.PP -or equivalently -.IP -.B wrjpgcom -.B -cfile -.I comment.txt -.B < -.I in.jpg -.B > -.I out.jpg -.SH SEE ALSO -.BR cjpeg (1), -.BR djpeg (1), -.BR jpegtran (1), -.BR rdjpgcom (1) -.SH AUTHOR -Independent JPEG Group diff --git a/thirdparty/jpeg-9e/wrjpgcom.c b/thirdparty/jpeg-9e/wrjpgcom.c deleted file mode 100644 index 571e9d0..0000000 --- a/thirdparty/jpeg-9e/wrjpgcom.c +++ /dev/null @@ -1,599 +0,0 @@ -/* - * wrjpgcom.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2015-2017 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a very simple stand-alone application that inserts - * user-supplied text as a COM (comment) marker in a JFIF file. - * This may be useful as an example of the minimum logic needed to parse - * JPEG markers. - */ - -#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ -#include "jinclude.h" /* get auto-config symbols, */ - -#ifndef HAVE_STDLIB_H /* should declare malloc() */ -extern void * malloc (); -#endif -#include /* to declare isupper(), tolower() */ -#ifdef USE_SETMODE -#include /* to declare setmode()'s parameter macros */ -/* If you have setmode() but not , just delete this line: */ -#include /* to declare setmode() */ -#endif - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define WRITE_BINARY "w" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#define WRITE_BINARY "wb", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#define WRITE_BINARY "wb" -#endif -#endif - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif -#ifndef EXIT_SUCCESS -#ifdef VMS -#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ -#else -#define EXIT_SUCCESS 0 -#endif -#endif - -/* Reduce this value if your malloc() can't allocate blocks up to 64K. - * On DOS, compiling in large model is usually a better solution. - */ - -#ifndef MAX_COM_LENGTH -#define MAX_COM_LENGTH 65000L /* must be <= 65533 in any case */ -#endif - - -/* - * These macros are used to read the input file and write the output file. - * To reuse this code in another application, you might need to change these. - */ - -static FILE * infile; /* input JPEG file */ - -/* Return next input byte, or EOF if no more */ -#define NEXTBYTE() getc(infile) - -static FILE * outfile; /* output JPEG file */ - -/* Emit an output byte */ -#define PUTBYTE(x) putc((x), outfile) - - -/* Error exit handler */ -#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) - - -/* Read one byte, testing for EOF */ -static int -read_1_byte (void) -{ - int c; - - c = NEXTBYTE(); - if (c == EOF) - ERREXIT("Premature EOF in JPEG file"); - return c; -} - -/* Read 2 bytes, convert to unsigned int */ -/* All 2-byte quantities in JPEG markers are MSB first */ -static unsigned int -read_2_bytes (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - if (c1 == EOF) - ERREXIT("Premature EOF in JPEG file"); - c2 = NEXTBYTE(); - if (c2 == EOF) - ERREXIT("Premature EOF in JPEG file"); - return (((unsigned int) c1) << 8) + ((unsigned int) c2); -} - - -/* Routines to write data to output file */ - -static void -write_1_byte (int c) -{ - PUTBYTE(c); -} - -static void -write_2_bytes (unsigned int val) -{ - PUTBYTE((val >> 8) & 0xFF); - PUTBYTE(val & 0xFF); -} - -static void -write_marker (int marker) -{ - PUTBYTE(0xFF); - PUTBYTE(marker); -} - -static void -copy_rest_of_file (void) -{ - int c; - - while ((c = NEXTBYTE()) != EOF) - PUTBYTE(c); -} - - -/* - * JPEG markers consist of one or more 0xFF bytes, followed by a marker - * code byte (which is not an FF). Here are the marker codes of interest - * in this program. (See jdmarker.c for a more complete list.) - */ - -#define M_SOF0 0xC0 /* Start Of Frame N */ -#define M_SOF1 0xC1 /* N indicates which compression process */ -#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ -#define M_SOF3 0xC3 -#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ -#define M_SOF6 0xC6 -#define M_SOF7 0xC7 -#define M_SOF9 0xC9 -#define M_SOF10 0xCA -#define M_SOF11 0xCB -#define M_SOF13 0xCD -#define M_SOF14 0xCE -#define M_SOF15 0xCF -#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ -#define M_EOI 0xD9 /* End Of Image (end of datastream) */ -#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ -#define M_COM 0xFE /* COMment */ - - -/* - * Find the next JPEG marker and return its marker code. - * We expect at least one FF byte, possibly more if the compressor used FFs - * to pad the file. (Padding FFs will NOT be replicated in the output file.) - * There could also be non-FF garbage between markers. The treatment of such - * garbage is unspecified; we choose to skip over it but emit a warning msg. - * NB: this routine must not be used after seeing SOS marker, since it will - * not deal correctly with FF/00 sequences in the compressed image data... - */ - -static int -next_marker (void) -{ - int c; - int discarded_bytes = 0; - - /* Find 0xFF byte; count and skip any non-FFs. */ - c = read_1_byte(); - while (c != 0xFF) { - discarded_bytes++; - c = read_1_byte(); - } - /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs - * are legal as pad bytes, so don't count them in discarded_bytes. - */ - do { - c = read_1_byte(); - } while (c == 0xFF); - - if (discarded_bytes != 0) { - fprintf(stderr, "Warning: garbage data found in JPEG file\n"); - } - - return c; -} - - -/* - * Read the initial marker, which should be SOI. - * For a JFIF file, the first two bytes of the file should be literally - * 0xFF M_SOI. To be more general, we could use next_marker, but if the - * input file weren't actually JPEG at all, next_marker might read the whole - * file and then return a misleading error message... - */ - -static int -first_marker (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - c2 = NEXTBYTE(); - if (c1 != 0xFF || c2 != M_SOI) - ERREXIT("Not a JPEG file"); - return c2; -} - - -/* - * Most types of marker are followed by a variable-length parameter segment. - * This routine skips over the parameters for any marker we don't otherwise - * want to process. - * Note that we MUST skip the parameter segment explicitly in order not to - * be fooled by 0xFF bytes that might appear within the parameter segment; - * such bytes do NOT introduce new markers. - */ - -static void -copy_variable (void) -/* Copy an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - write_2_bytes(length); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Copy the remaining bytes */ - while (length > 0) { - write_1_byte(read_1_byte()); - length--; - } -} - -static void -skip_variable (void) -/* Skip over an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Skip over the remaining bytes */ - while (length > 0) { - (void) read_1_byte(); - length--; - } -} - - -/* - * Parse the marker stream until SOFn or EOI is seen; - * copy data to output, but discard COM markers unless keep_COM is true. - */ - -static int -scan_JPEG_header (int keep_COM) -{ - int marker; - - /* Expect SOI at start of file */ - if (first_marker() != M_SOI) - ERREXIT("Expected SOI marker first"); - write_marker(M_SOI); - - /* Scan miscellaneous markers until we reach SOFn. */ - for (;;) { - marker = next_marker(); - switch (marker) { - /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be, - * treated as SOFn. C4 in particular is actually DHT. - */ - case M_SOF0: /* Baseline */ - case M_SOF1: /* Extended sequential, Huffman */ - case M_SOF2: /* Progressive, Huffman */ - case M_SOF3: /* Lossless, Huffman */ - case M_SOF5: /* Differential sequential, Huffman */ - case M_SOF6: /* Differential progressive, Huffman */ - case M_SOF7: /* Differential lossless, Huffman */ - case M_SOF9: /* Extended sequential, arithmetic */ - case M_SOF10: /* Progressive, arithmetic */ - case M_SOF11: /* Lossless, arithmetic */ - case M_SOF13: /* Differential sequential, arithmetic */ - case M_SOF14: /* Differential progressive, arithmetic */ - case M_SOF15: /* Differential lossless, arithmetic */ - return marker; - - case M_SOS: /* should not see compressed data before SOF */ - ERREXIT("SOS without prior SOFn"); - break; - - case M_EOI: /* in case it's a tables-only JPEG stream */ - return marker; - - case M_COM: /* Existing COM: conditionally discard */ - if (keep_COM) { - write_marker(marker); - copy_variable(); - } else { - skip_variable(); - } - break; - - default: /* Anything else just gets copied */ - write_marker(marker); - copy_variable(); /* we assume it has a parameter count... */ - break; - } - } /* end loop */ -} - - -/* Command line parsing code */ - -static const char * progname; /* program name for error messages */ - - -static void -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "wrjpgcom inserts a textual comment in a JPEG file.\n"); - fprintf(stderr, "You can add to or replace any existing comment(s).\n"); - - fprintf(stderr, "Usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -replace Delete any existing comments\n"); - fprintf(stderr, " -comment \"text\" Insert comment with given text\n"); - fprintf(stderr, " -cfile name Read comment from named file\n"); - fprintf(stderr, "Notice that you must put quotes around the comment text\n"); - fprintf(stderr, "when you use -comment.\n"); - fprintf(stderr, "If you do not give either -comment or -cfile on the command line,\n"); - fprintf(stderr, "then the comment text is read from standard input.\n"); - fprintf(stderr, "It can be multiple lines, up to %u characters total.\n", - (unsigned int) MAX_COM_LENGTH); -#ifndef TWO_FILE_COMMANDLINE - fprintf(stderr, "You must specify an input JPEG file name when supplying\n"); - fprintf(stderr, "comment text from standard input.\n"); -#endif - - exit(EXIT_FAILURE); -} - - -static int -keymatch (char * arg, const char * keyword, int minchars) -/* Case-insensitive matching of (possibly abbreviated) keyword switches. */ -/* keyword is the constant keyword (must be lower case already), */ -/* minchars is length of minimum legal abbreviation. */ -{ - register int ca, ck; - register int nmatched = 0; - - while ((ca = *arg++) != '\0') { - if ((ck = *keyword++) == '\0') - return 0; /* arg longer than keyword, no good */ - if (isupper(ca)) /* force arg to lcase (assume ck is already) */ - ca = tolower(ca); - if (ca != ck) - return 0; /* no good */ - nmatched++; /* count matched characters */ - } - /* reached end of argument; fail if it's too short for unique abbrev */ - if (nmatched < minchars) - return 0; - return 1; /* A-OK */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - int argn; - char * arg; - int keep_COM = 1; - char * comment_arg = NULL; - FILE * comment_file = NULL; - unsigned int comment_length = 0; - int marker; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "wrjpgcom"; /* in case C library doesn't provide it */ - - /* Parse switches, if any */ - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (arg[0] != '-') - break; /* not switch, must be file name */ - arg++; /* advance over '-' */ - if (keymatch(arg, "replace", 1)) { - keep_COM = 0; - } else if (keymatch(arg, "cfile", 2)) { - if (++argn >= argc) usage(); - if ((comment_file = fopen(argv[argn], "r")) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } else if (keymatch(arg, "comment", 1)) { - if (++argn >= argc) usage(); - comment_arg = argv[argn]; - /* If the comment text starts with '"', then we are probably running - * under MS-DOG and must parse out the quoted string ourselves. Sigh. - */ - if (comment_arg[0] == '"') { - comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH); - if (comment_arg == NULL) - ERREXIT("Insufficient memory"); - if (strlen(argv[argn]+1) >= (size_t) MAX_COM_LENGTH) { - fprintf(stderr, "Comment text may not exceed %u bytes\n", - (unsigned int) MAX_COM_LENGTH); - exit(EXIT_FAILURE); - } - strcpy(comment_arg, argv[argn]+1); - for (;;) { - comment_length = (unsigned int) strlen(comment_arg); - if (comment_length > 0 && comment_arg[comment_length-1] == '"') { - comment_arg[comment_length-1] = '\0'; /* zap terminating quote */ - break; - } - if (++argn >= argc) - ERREXIT("Missing ending quote mark"); - if (strlen(comment_arg) + 1 + strlen(argv[argn]) >= - (size_t) MAX_COM_LENGTH) { - fprintf(stderr, "Comment text may not exceed %u bytes\n", - (unsigned int) MAX_COM_LENGTH); - exit(EXIT_FAILURE); - } - strcat(comment_arg, " "); - strcat(comment_arg, argv[argn]); - } - } else if (strlen(comment_arg) >= (size_t) MAX_COM_LENGTH) { - fprintf(stderr, "Comment text may not exceed %u bytes\n", - (unsigned int) MAX_COM_LENGTH); - exit(EXIT_FAILURE); - } - comment_length = (unsigned int) strlen(comment_arg); - } else - usage(); - } - - /* Cannot use both -comment and -cfile. */ - if (comment_arg != NULL && comment_file != NULL) - usage(); - /* If there is neither -comment nor -cfile, we will read the comment text - * from stdin; in this case there MUST be an input JPEG file name. - */ - if (comment_arg == NULL && comment_file == NULL && argn >= argc) - usage(); - - /* Open the input file. */ - if (argn < argc) { - if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdin), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open stdin\n", progname); - exit(EXIT_FAILURE); - } -#else - infile = stdin; -#endif - } - - /* Open the output file. */ -#ifdef TWO_FILE_COMMANDLINE - /* Must have explicit output file name */ - if (argn != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - if ((outfile = fopen(argv[argn+1], WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn+1]); - exit(EXIT_FAILURE); - } -#else - /* Unix style: expect zero or one file name */ - if (argn < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } - /* default output file is stdout */ -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdout), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((outfile = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open stdout\n", progname); - exit(EXIT_FAILURE); - } -#else - outfile = stdout; -#endif -#endif /* TWO_FILE_COMMANDLINE */ - - /* Collect comment text from comment_file or stdin, if necessary */ - if (comment_arg == NULL) { - FILE * src_file; - int c; - - comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH); - if (comment_arg == NULL) - ERREXIT("Insufficient memory"); - comment_length = 0; - src_file = (comment_file != NULL ? comment_file : stdin); - while ((c = getc(src_file)) != EOF) { - if (comment_length >= (unsigned int) MAX_COM_LENGTH) { - fprintf(stderr, "Comment text may not exceed %u bytes\n", - (unsigned int) MAX_COM_LENGTH); - exit(EXIT_FAILURE); - } - comment_arg[comment_length++] = (char) c; - } - if (comment_file != NULL) - fclose(comment_file); - } - - /* Copy JPEG headers until SOFn marker; - * we will insert the new comment marker just before SOFn. - * This (a) causes the new comment to appear after, rather than before, - * existing comments; and (b) ensures that comments come after any JFIF - * or JFXX markers, as required by the JFIF specification. - */ - marker = scan_JPEG_header(keep_COM); - /* Insert the new COM marker, but only if nonempty text has been supplied */ - if (comment_length > 0) { - write_marker(M_COM); - write_2_bytes(comment_length + 2); - while (comment_length > 0) { - write_1_byte(*comment_arg++); - comment_length--; - } - } - /* Duplicate the remainder of the source file. - * Note that any COM markers occuring after SOF will not be touched. - */ - write_marker(marker); - copy_rest_of_file(); - - /* All done. */ - exit(EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/thirdparty/jpeg-9e/wrppm.c b/thirdparty/jpeg-9e/wrppm.c deleted file mode 100644 index c9e03ad..0000000 --- a/thirdparty/jpeg-9e/wrppm.c +++ /dev/null @@ -1,264 +0,0 @@ -/* - * wrppm.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2009-2020 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write output images in PPM/PGM format. - * The extended 2-byte-per-sample raw PPM/PGM formats are supported. - * The PBMPLUS library is NOT required to compile this software - * (but it is highly useful as a set of PPM image manipulation programs). - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume output to - * an ordinary stdio stream. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef PPM_SUPPORTED - - -/* - * For 12-bit JPEG data, we either downscale the values to 8 bits - * (to write standard byte-per-sample PPM/PGM files), or output - * nonstandard word-per-sample PPM/PGM files. Downscaling is done - * if PPM_NORAWWORD is defined (this can be done in the Makefile - * or in jconfig.h). - * (When the core library supports data precision reduction, a cleaner - * implementation will be to ask for that instead.) - */ - -#if BITS_IN_JSAMPLE == 8 -#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) (v) -#define BYTESPERSAMPLE 1 -#define PPM_MAXVAL 255 -#else -#ifdef PPM_NORAWWORD -#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) ((v) >> (BITS_IN_JSAMPLE-8)) -#define BYTESPERSAMPLE 1 -#define PPM_MAXVAL 255 -#else -/* The word-per-sample format always puts the MSB first. */ -#define PUTPPMSAMPLE(ptr,v) \ - { register int val_ = v; \ - *ptr++ = (char) ((val_ >> 8) & 0xFF); \ - *ptr++ = (char) (val_ & 0xFF); \ - } -#define BYTESPERSAMPLE 2 -#define PPM_MAXVAL ((1<pub.output_file, dest->iobuffer, dest->buffer_width); -} - - -/* - * This code is used when we have to copy the data and apply a pixel - * format translation. Typically this only happens in 12-bit mode. - */ - -METHODDEF(void) -copy_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; - register char * bufferptr; - register JSAMPROW ptr; - register JDIMENSION col; - - ptr = dest->pixrow; - bufferptr = dest->iobuffer; - for (col = dest->samples_per_row; col > 0; col--) { - PUTPPMSAMPLE(bufferptr, GETJSAMPLE(*ptr++)); - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - - -/* - * Write some pixel data when color quantization is in effect. - * We have to demap the color index values to straight data. - */ - -METHODDEF(void) -put_demapped_rgb (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; - register char * bufferptr; - register int pixval; - register JSAMPROW ptr; - register JSAMPROW color_map0 = cinfo->colormap[0]; - register JSAMPROW color_map1 = cinfo->colormap[1]; - register JSAMPROW color_map2 = cinfo->colormap[2]; - register JDIMENSION col; - - ptr = dest->pixrow; - bufferptr = dest->iobuffer; - for (col = cinfo->output_width; col > 0; col--) { - pixval = GETJSAMPLE(*ptr++); - PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map0[pixval])); - PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map1[pixval])); - PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map2[pixval])); - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - -METHODDEF(void) -put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; - register char * bufferptr; - register JSAMPROW ptr; - register JSAMPROW color_map0 = cinfo->colormap[0]; - register JDIMENSION col; - - ptr = dest->pixrow; - bufferptr = dest->iobuffer; - for (col = cinfo->output_width; col > 0; col--) { - PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map0[GETJSAMPLE(*ptr++)])); - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - - -/* - * Startup: write the file header. - */ - -METHODDEF(void) -start_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - /* Emit file header */ - switch (cinfo->out_color_space) { - case JCS_GRAYSCALE: - /* emit header for raw PGM format */ - fprintf(dinfo->output_file, "P5\n%ld %ld\n%d\n", - (long) cinfo->output_width, (long) cinfo->output_height, - PPM_MAXVAL); - break; - case JCS_RGB: - /* emit header for raw PPM format */ - fprintf(dinfo->output_file, "P6\n%ld %ld\n%d\n", - (long) cinfo->output_width, (long) cinfo->output_height, - PPM_MAXVAL); - break; - default: - ERREXIT(cinfo, JERR_PPM_COLORSPACE); - } -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - /* Make sure we wrote the output file OK */ - JFFLUSH(dinfo->output_file); - if (JFERROR(dinfo->output_file)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * The module selection routine for PPM format output. - */ - -GLOBAL(djpeg_dest_ptr) -jinit_write_ppm (j_decompress_ptr cinfo) -{ - ppm_dest_ptr dest; - - /* Create module interface object, fill in method pointers */ - dest = (ppm_dest_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(ppm_dest_struct)); - dest->pub.start_output = start_output_ppm; - dest->pub.finish_output = finish_output_ppm; - - /* Calculate output image dimensions so we can allocate space */ - jpeg_calc_output_dimensions(cinfo); - - /* Create physical I/O buffer. Note we make this near on a PC. */ - dest->samples_per_row = cinfo->output_width * cinfo->out_color_components; - dest->buffer_width = dest->samples_per_row * (BYTESPERSAMPLE * SIZEOF(char)); - dest->iobuffer = (char *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width); - - if (cinfo->quantize_colors || BITS_IN_JSAMPLE != 8 || - SIZEOF(JSAMPLE) != SIZEOF(char)) { - /* When quantizing, we need an output buffer for colormap indexes - * that's separate from the physical I/O buffer. We also need a - * separate buffer if pixel format translation must take place. - */ - dest->pixrow = (JSAMPROW) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (size_t) cinfo->output_width * - (size_t) cinfo->output_components * SIZEOF(JSAMPLE)); - if (! cinfo->quantize_colors) - dest->pub.put_pixel_rows = copy_pixel_rows; - else if (cinfo->out_color_space == JCS_GRAYSCALE) - dest->pub.put_pixel_rows = put_demapped_gray; - else - dest->pub.put_pixel_rows = put_demapped_rgb; - } else { - /* We will fwrite() directly from decompressor output buffer. */ - /* Cast here implies near->far pointer conversion on PCs */ - dest->pixrow = (JSAMPROW) dest->iobuffer; - dest->pub.put_pixel_rows = put_pixel_rows; - } - /* Synthesize a JSAMPARRAY pointer structure */ - dest->pub.buffer = & dest->pixrow; - dest->pub.buffer_height = 1; - - return &dest->pub; -} - -#endif /* PPM_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/wrrle.c b/thirdparty/jpeg-9e/wrrle.c deleted file mode 100644 index dc2fadb..0000000 --- a/thirdparty/jpeg-9e/wrrle.c +++ /dev/null @@ -1,306 +0,0 @@ -/* - * wrrle.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2017-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write output images in RLE format. - * The Utah Raster Toolkit library is required (version 3.1 or later). - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume output to - * an ordinary stdio stream. - * - * Based on code contributed by Mike Lijewski, - * with updates from Robert Hutchinson. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef RLE_SUPPORTED - -/* rle.h is provided by the Utah Raster Toolkit. */ - -#include - -/* - * We assume that JSAMPLE has the same representation as rle_pixel, - * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples. - */ - -#if BITS_IN_JSAMPLE != 8 - Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ -#endif - - -/* - * Since RLE stores scanlines bottom-to-top, we have to invert the image - * from JPEG's top-to-bottom order. To do this, we save the outgoing data - * in a virtual array during put_pixel_row calls, then actually emit the - * RLE file during finish_output. - */ - - -/* - * For now, if we emit an RLE color map then it is always 256 entries long, - * though not all of the entries need be used. - */ - -#define CMAPBITS 8 -#define CMAPLENGTH (1<<(CMAPBITS)) - -typedef struct { - struct djpeg_dest_struct pub; /* public fields */ - - jvirt_sarray_ptr image; /* virtual array to store the output image */ - rle_map *colormap; /* RLE-style color map, or NULL if none */ - rle_pixel **rle_row; /* To pass rows to rle_putrow() */ - -} rle_dest_struct; - -typedef rle_dest_struct * rle_dest_ptr; - - -/* Forward declarations */ -METHODDEF(void) rle_put_pixel_rows - JPP((j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied)); - - -/* - * Write the file header. - * - * In this module it's easier to wait till finish_output to write anything. - */ - -METHODDEF(void) -start_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - rle_dest_ptr dest = (rle_dest_ptr) dinfo; - size_t cmapsize; - int ci, i; -#ifdef PROGRESS_REPORT - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; -#endif - - /* - * Make sure the image can be stored in RLE format. - * - * - RLE stores image dimensions as *signed* 16 bit integers. JPEG - * uses unsigned, so we have to check the width. - * - * - Colorspace is expected to be grayscale or RGB. - * - * - The number of channels (components) is expected to be 1 (grayscale/ - * pseudocolor) or 3 (truecolor/directcolor). - * (could be 2 or 4 if using an alpha channel, but we aren't) - */ - - if (cinfo->output_width > 32767 || cinfo->output_height > 32767) - ERREXIT2(cinfo, JERR_RLE_DIMENSIONS, cinfo->output_width, - cinfo->output_height); - - if (cinfo->out_color_space != JCS_GRAYSCALE && - cinfo->out_color_space != JCS_RGB) - ERREXIT(cinfo, JERR_RLE_COLORSPACE); - - if (cinfo->output_components != 1 && cinfo->output_components != 3) - ERREXIT1(cinfo, JERR_RLE_TOOMANYCHANNELS, cinfo->num_components); - - /* Convert colormap, if any, to RLE format. */ - - dest->colormap = NULL; - - if (cinfo->quantize_colors) { - /* Allocate storage for RLE-style cmap, zero any extra entries */ - cmapsize = cinfo->out_color_components * CMAPLENGTH * SIZEOF(rle_map); - dest->colormap = (rle_map *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, cmapsize); - MEMZERO(dest->colormap, cmapsize); - - /* Save away data in RLE format --- note 8-bit left shift! */ - /* Shifting would need adjustment for JSAMPLEs wider than 8 bits. */ - for (ci = 0; ci < cinfo->out_color_components; ci++) { - for (i = 0; i < cinfo->actual_number_of_colors; i++) { - dest->colormap[ci * CMAPLENGTH + i] = - GETJSAMPLE(cinfo->colormap[ci][i]) << 8; - } - } - } - - /* Set the output buffer to the first row */ - dest->pub.buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->image, (JDIMENSION) 0, (JDIMENSION) 1, TRUE); - dest->pub.buffer_height = 1; - - dest->pub.put_pixel_rows = rle_put_pixel_rows; - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->total_extra_passes++; /* count file writing as separate pass */ - } -#endif -} - - -/* - * Write some pixel data. - * - * This routine just saves the data away in a virtual array. - */ - -METHODDEF(void) -rle_put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - rle_dest_ptr dest = (rle_dest_ptr) dinfo; - - if (cinfo->output_scanline < cinfo->output_height) { - dest->pub.buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->image, - cinfo->output_scanline, (JDIMENSION) 1, TRUE); - } -} - - -/* - * Finish up at the end of the file. - * - * Here is where we really output the RLE file. - */ - -METHODDEF(void) -finish_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - rle_dest_ptr dest = (rle_dest_ptr) dinfo; - rle_hdr header; /* Output file information */ - rle_pixel **rle_row, *red_ptr, *green_ptr, *blue_ptr; - JSAMPROW output_row; - char cmapcomment[80]; - int row, col; - int ci; -#ifdef PROGRESS_REPORT - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; -#endif - - /* Initialize the header info */ - header = *rle_hdr_init(NULL); - header.rle_file = dest->pub.output_file; - header.xmin = 0; - header.xmax = cinfo->output_width - 1; - header.ymin = 0; - header.ymax = cinfo->output_height - 1; - header.alpha = 0; - header.ncolors = cinfo->output_components; - for (ci = 0; ci < cinfo->output_components; ci++) { - RLE_SET_BIT(header, ci); - } - if (cinfo->quantize_colors) { - header.ncmap = cinfo->out_color_components; - header.cmaplen = CMAPBITS; - header.cmap = dest->colormap; - /* Add a comment to the output image with the true colormap length. */ - sprintf(cmapcomment, "color_map_length=%d", cinfo->actual_number_of_colors); - rle_putcom(cmapcomment, &header); - } - - /* Emit the RLE header and color map (if any) */ - rle_put_setup(&header); - - /* Now output the RLE data from our virtual array. - * We assume here that (a) rle_pixel is represented the same as JSAMPLE, - * and (b) we are not on a machine where FAR pointers differ from regular. - */ - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_limit = cinfo->output_height; - progress->pub.pass_counter = 0; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - - if (cinfo->output_components == 1) { - for (row = cinfo->output_height - 1; row >= 0; row--) { - rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->image, - (JDIMENSION) row, (JDIMENSION) 1, FALSE); - rle_putrow(rle_row, (int) cinfo->output_width, &header); -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_counter++; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - } - } else { - for (row = cinfo->output_height - 1; row >= 0; row--) { - output_row = * (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->image, - (JDIMENSION) row, (JDIMENSION) 1, FALSE); - rle_row = dest->rle_row; - red_ptr = rle_row[0]; - green_ptr = rle_row[1]; - blue_ptr = rle_row[2]; - for (col = cinfo->output_width; col > 0; col--) { - *red_ptr++ = GETJSAMPLE(*output_row++); - *green_ptr++ = GETJSAMPLE(*output_row++); - *blue_ptr++ = GETJSAMPLE(*output_row++); - } - rle_putrow(rle_row, (int) cinfo->output_width, &header); -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_counter++; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - } - } - -#ifdef PROGRESS_REPORT - if (progress != NULL) - progress->completed_extra_passes++; -#endif - - /* Emit file trailer */ - rle_puteof(&header); - JFFLUSH(dest->pub.output_file); - if (JFERROR(dest->pub.output_file)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * The module selection routine for RLE format output. - */ - -GLOBAL(djpeg_dest_ptr) -jinit_write_rle (j_decompress_ptr cinfo) -{ - rle_dest_ptr dest; - - /* Create module interface object, fill in method pointers */ - dest = (rle_dest_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(rle_dest_struct)); - dest->pub.start_output = start_output_rle; - dest->pub.finish_output = finish_output_rle; - - /* Calculate output image dimensions so we can allocate space */ - jpeg_calc_output_dimensions(cinfo); - - /* Allocate a work array for output to the RLE library. */ - dest->rle_row = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, - JPOOL_IMAGE, cinfo->output_width, (JDIMENSION) cinfo->output_components); - - /* Allocate a virtual array to hold the image. */ - dest->image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - cinfo->output_width * (JDIMENSION) cinfo->output_components, - cinfo->output_height, (JDIMENSION) 1); - - return &dest->pub; -} - -#endif /* RLE_SUPPORTED */ diff --git a/thirdparty/jpeg-9e/wrtarga.c b/thirdparty/jpeg-9e/wrtarga.c deleted file mode 100644 index 8ded518..0000000 --- a/thirdparty/jpeg-9e/wrtarga.c +++ /dev/null @@ -1,254 +0,0 @@ -/* - * wrtarga.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2015-2019 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write output images in Targa format. - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume output to - * an ordinary stdio stream. - * - * Based on code contributed by Lee Daniel Crocker. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef TARGA_SUPPORTED - - -/* - * To support 12-bit JPEG data, we'd have to scale output down to 8 bits. - * This is not yet implemented. - */ - -#if BITS_IN_JSAMPLE != 8 - Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ -#endif - -/* - * The output buffer needs to be writable by fwrite(). On PCs, we must - * allocate the buffer in near data space, because we are assuming small-data - * memory model, wherein fwrite() can't reach far memory. If you need to - * process very wide images on a PC, you might have to compile in large-memory - * model, or else replace fwrite() with a putc() loop --- which will be much - * slower. - */ - - -/* Private version of data destination object */ - -typedef struct { - struct djpeg_dest_struct pub; /* public fields */ - - char *iobuffer; /* physical I/O buffer */ - JDIMENSION buffer_width; /* width of one row */ -} tga_dest_struct; - -typedef tga_dest_struct * tga_dest_ptr; - - -LOCAL(void) -write_header (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, int num_colors) -/* Create and write a Targa header */ -{ - char targaheader[18]; - - /* Set unused fields of header to 0 */ - MEMZERO(targaheader, SIZEOF(targaheader)); - - if (num_colors > 0) { - targaheader[1] = 1; /* color map type 1 */ - targaheader[5] = (char) (num_colors & 0xFF); - targaheader[6] = (char) (num_colors >> 8); - targaheader[7] = 24; /* 24 bits per cmap entry */ - } - - targaheader[12] = (char) (cinfo->output_width & 0xFF); - targaheader[13] = (char) (cinfo->output_width >> 8); - targaheader[14] = (char) (cinfo->output_height & 0xFF); - targaheader[15] = (char) (cinfo->output_height >> 8); - targaheader[17] = 0x20; /* Top-down, non-interlaced */ - - if (cinfo->out_color_space == JCS_GRAYSCALE) { - targaheader[2] = 3; /* image type = uncompressed grayscale */ - targaheader[16] = 8; /* bits per pixel */ - } else { /* must be RGB */ - if (num_colors > 0) { - targaheader[2] = 1; /* image type = colormapped RGB */ - targaheader[16] = 8; - } else { - targaheader[2] = 2; /* image type = uncompressed RGB */ - targaheader[16] = 24; - } - } - - if (JFWRITE(dinfo->output_file, targaheader, 18) != (size_t) 18) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * Write some pixel data. - * In this module rows_supplied will always be 1. - */ - -METHODDEF(void) -put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -/* used for unquantized full-color output */ -{ - tga_dest_ptr dest = (tga_dest_ptr) dinfo; - register JSAMPROW inptr; - register char * outptr; - register JDIMENSION col; - - inptr = dest->pub.buffer[0]; - outptr = dest->iobuffer; - for (col = cinfo->output_width; col > 0; col--) { - outptr[0] = (char) GETJSAMPLE(inptr[2]); /* RGB to BGR order */ - outptr[1] = (char) GETJSAMPLE(inptr[1]); - outptr[2] = (char) GETJSAMPLE(inptr[0]); - inptr += 3, outptr += 3; - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - -METHODDEF(void) -put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -/* used for grayscale OR quantized color output */ -{ - tga_dest_ptr dest = (tga_dest_ptr) dinfo; - register JSAMPROW inptr; - register char * outptr; - register JDIMENSION col; - - inptr = dest->pub.buffer[0]; - outptr = dest->iobuffer; - for (col = cinfo->output_width; col > 0; col--) { - *outptr++ = (char) GETJSAMPLE(*inptr++); - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - - -/* - * Write some demapped pixel data when color quantization is in effect. - * For Targa, this is only applied to grayscale data. - */ - -METHODDEF(void) -put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - tga_dest_ptr dest = (tga_dest_ptr) dinfo; - register JSAMPROW inptr; - register char * outptr; - register JSAMPROW color_map0 = cinfo->colormap[0]; - register JDIMENSION col; - - inptr = dest->pub.buffer[0]; - outptr = dest->iobuffer; - for (col = cinfo->output_width; col > 0; col--) { - *outptr++ = (char) GETJSAMPLE(color_map0[GETJSAMPLE(*inptr++)]); - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - - -/* - * Startup: write the file header. - */ - -METHODDEF(void) -start_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - int num_colors, i; - FILE *outfile; - - switch (cinfo->out_color_space) { - case JCS_GRAYSCALE: - /* Targa doesn't have a mapped grayscale format, so we will */ - /* demap quantized gray output. Never emit a colormap. */ - write_header(cinfo, dinfo, 0); - if (cinfo->quantize_colors) - dinfo->put_pixel_rows = put_demapped_gray; - else - dinfo->put_pixel_rows = put_gray_rows; - break; - case JCS_RGB: - if (cinfo->quantize_colors) { - /* We only support 8-bit colormap indexes, so only 256 colors */ - num_colors = cinfo->actual_number_of_colors; - if (num_colors > 256) - ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, num_colors); - write_header(cinfo, dinfo, num_colors); - /* Write the colormap. Note Targa uses BGR byte order */ - outfile = dinfo->output_file; - for (i = 0; i < num_colors; i++) { - putc(GETJSAMPLE(cinfo->colormap[2][i]), outfile); - putc(GETJSAMPLE(cinfo->colormap[1][i]), outfile); - putc(GETJSAMPLE(cinfo->colormap[0][i]), outfile); - } - dinfo->put_pixel_rows = put_gray_rows; - } else { - write_header(cinfo, dinfo, 0); - dinfo->put_pixel_rows = put_pixel_rows; - } - break; - default: - ERREXIT(cinfo, JERR_TGA_COLORSPACE); - } -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - /* Make sure we wrote the output file OK */ - JFFLUSH(dinfo->output_file); - if (JFERROR(dinfo->output_file)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * The module selection routine for Targa format output. - */ - -GLOBAL(djpeg_dest_ptr) -jinit_write_targa (j_decompress_ptr cinfo) -{ - tga_dest_ptr dest; - - /* Create module interface object, fill in method pointers */ - dest = (tga_dest_ptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(tga_dest_struct)); - dest->pub.start_output = start_output_tga; - dest->pub.finish_output = finish_output_tga; - - /* Calculate output image dimensions so we can allocate space */ - jpeg_calc_output_dimensions(cinfo); - - /* Create I/O buffer. Note we make this near on a PC. */ - dest->buffer_width = cinfo->output_width * cinfo->output_components; - dest->iobuffer = (char *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, - JPOOL_IMAGE, (size_t) dest->buffer_width * SIZEOF(char)); - - /* Create decompressor output buffer. */ - dest->pub.buffer = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, - JPOOL_IMAGE, dest->buffer_width, (JDIMENSION) 1); - dest->pub.buffer_height = 1; - - return &dest->pub; -} - -#endif /* TARGA_SUPPORTED */ diff --git a/thirdparty/libpng-1.6.37/ANNOUNCE b/thirdparty/libpng-1.6.37/ANNOUNCE deleted file mode 100644 index ecf9c70..0000000 --- a/thirdparty/libpng-1.6.37/ANNOUNCE +++ /dev/null @@ -1,47 +0,0 @@ -libpng 1.6.37 - April 14, 2019 -============================== - -This is a public release of libpng, intended for use in production code. - - -Files available for download ----------------------------- - -Source files with LF line endings (for Unix/Linux): - - * libpng-1.6.37.tar.xz (LZMA-compressed, recommended) - * libpng-1.6.37.tar.gz - -Source files with CRLF line endings (for Windows): - - * lp1637.7z (LZMA-compressed, recommended) - * lp1637.zip - -Other information: - - * README.md - * LICENSE.md - * AUTHORS.md - * TRADEMARK.md - - -Changes since the previous public release (version 1.6.36) ----------------------------------------------------------- - - * Fixed a use-after-free vulnerability (CVE-2019-7317) in png_image_free. - * Fixed a memory leak in the ARM NEON implementation of png_do_expand_palette. - * Fixed a memory leak in pngtest.c. - * Fixed two vulnerabilities (CVE-2018-14048, CVE-2018-14550) in - contrib/pngminus; refactor. - * Changed the license of contrib/pngminus to MIT; refresh makefile and docs. - (Contributed by Willem van Schaik) - * Fixed a typo in the libpng license v2. - (Contributed by Miguel Ojeda) - * Added makefiles for AddressSanitizer-enabled builds. - * Cleaned up various makefiles. - - -Send comments/corrections/commendations to png-mng-implement at lists.sf.net. -Subscription is required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement -to subscribe. diff --git a/thirdparty/libpng-1.6.37/AUTHORS b/thirdparty/libpng-1.6.37/AUTHORS deleted file mode 100644 index 79a3d10..0000000 --- a/thirdparty/libpng-1.6.37/AUTHORS +++ /dev/null @@ -1,45 +0,0 @@ -PNG REFERENCE LIBRARY AUTHORS -============================= - -This is the list of PNG Reference Library ("libpng") Contributing -Authors, for copyright and licensing purposes. - - * Andreas Dilger - * Cosmin Truta - * Dave Martindale - * Eric S. Raymond - * Gilles Vollant - * Glenn Randers-Pehrson - * Greg Roelofs - * Guy Eric Schalnat - * James Yu - * John Bowler - * Kevin Bracey - * Magnus Holmgren - * Mandar Sahastrabuddhe - * Mans Rullgard - * Matt Sarett - * Mike Klein - * Paul Schmidt - * Sam Bushell - * Samuel Williams - * Simon-Pierre Cadieux - * Tim Wegner - * Tom Lane - * Tom Tanner - * Vadim Barkov - * Willem van Schaik - * Zhijie Liang - * Arm Holdings - - Richard Townsend - * Google Inc. - - Matt Sarett - - Mike Klein - -The build projects, the build scripts, the test scripts, and other -files in the "projects", "scripts" and "tests" directories, have other -copyright owners, but are released under the libpng license. - -Some files in the "contrib" directory, and some tools-generated files -that are distributed with libpng, have other copyright owners, and are -released under other open source licenses. diff --git a/thirdparty/libpng-1.6.37/CHANGES b/thirdparty/libpng-1.6.37/CHANGES deleted file mode 100644 index f0b0a93..0000000 --- a/thirdparty/libpng-1.6.37/CHANGES +++ /dev/null @@ -1,6109 +0,0 @@ -CHANGES - changes for libpng - -version 0.1 [March 29, 1995] - initial work-in-progress release - -version 0.2 [April 1, 1995] - added reader into png.h - fixed small problems in stub file - -version 0.3 [April 8, 1995] - added pull reader - split up pngwrite.c to several files - added pnglib.txt - added example.c - cleaned up writer, adding a few new transformations - fixed some bugs in writer - interfaced with zlib 0.5 - added K&R support - added check for 64 KB blocks for 16 bit machines - -version 0.4 [April 26, 1995] - cleaned up code and commented code - simplified time handling into png_time - created png_color_16 and png_color_8 to handle color needs - cleaned up color type defines - fixed various bugs - made various names more consistent - interfaced with zlib 0.71 - cleaned up zTXt reader and writer (using zlib's Reset functions) - split transformations into pngrtran.c and pngwtran.c - -version 0.5 [April 30, 1995] - interfaced with zlib 0.8 - fixed many reading and writing bugs - saved using 3 spaces instead of tabs - -version 0.6 [May 1, 1995] - first beta release - added png_large_malloc() and png_large_free() - added png_size_t - cleaned up some compiler warnings - added png_start_read_image() - -version 0.7 [June 24, 1995] - cleaned up lots of bugs - finished dithering and other stuff - added test program - changed name from pnglib to libpng - -version 0.71 [June 26, 1995] - changed pngtest.png for zlib 0.93 - fixed error in libpng.txt and example.c - -version 0.8 [August 20, 1995] - cleaned up some bugs - added png_set_filler() - split up pngstub.c into pngmem.c, pngio.c, and pngerror.c - added #define's to remove unwanted code - moved png_info_init() to png.c - added old_size into png_realloc() - added functions to manually set filtering and compression info - changed compression parameters based on image type - optimized filter selection code - added version info - changed external functions passing floats to doubles (k&r problems?) - put all the configurable stuff in pngconf.h - enabled png_set_shift to work with paletted images on read - added png_read_update_info() - updates info structure with transformations - -Version 0.81 [August, 1995] - incorporated Tim Wegner's medium model code (thanks, Tim) - -Version 0.82 [September, 1995] - [unspecified changes] - -Version 0.85 [December, 1995] - added more medium model code (almost everything's a far) - added i/o, error, and memory callback functions - fixed some bugs (16-bit, 4-bit interlaced, etc.) - added first run progressive reader (barely tested) - -Version 0.86 [January, 1996] - fixed bugs - improved documentation - -Version 0.87 [January, 1996] - fixed medium model bugs - fixed other bugs introduced in 0.85 and 0.86 - added some minor documentation - -Version 0.88 [January, 1996] - fixed progressive bugs - replaced tabs with spaces - cleaned up documentation - added callbacks for read/write and warning/error functions - -Version 0.89 [June 5, 1996] - Added new initialization API to make libpng work better with shared libs - we now have png_create_read_struct(), png_create_write_struct(), - png_create_info_struct(), png_destroy_read_struct(), and - png_destroy_write_struct() instead of the separate calls to - malloc and png_read_init(), png_info_init(), and png_write_init() - Changed warning/error callback functions to fix bug - this means you - should use the new initialization API if you were using the old - png_set_message_fn() calls, and that the old API no longer exists - so that people are aware that they need to change their code - Changed filter selection API to allow selection of multiple filters - since it didn't work in previous versions of libpng anyways - Optimized filter selection code - Fixed png_set_background() to allow using an arbitrary RGB color for - paletted images - Fixed gamma and background correction for paletted images, so - png_correct_palette is not needed unless you are correcting an - external palette (you will need to #define PNG_CORRECT_PALETTE_SUPPORTED - in pngconf.h) - if nobody uses this, it may disappear in the future. - Fixed bug with Borland 64K memory allocation (Alexander Lehmann) - Fixed bug in interlace handling (Smarasderagd, I think) - Added more error checking for writing and image to reduce invalid files - Separated read and write functions so that they won't both be linked - into a binary when only reading or writing functionality is used - New pngtest image also has interlacing and zTXt - Updated documentation to reflect new API - -Version 0.89c [June 17, 1996] - Bug fixes. - -Version 0.90 [January, 1997] - Made CRC errors/warnings on critical and ancillary chunks configurable - libpng will use the zlib CRC routines by (compile-time) default - Changed DOS small/medium model memory support - needs zlib 1.04 (Tim Wegner) - Added external C++ wrapper statements to png.h (Gilles Dauphin) - Allow PNG file to be read when some or all of file signature has already - been read from the beginning of the stream. ****This affects the size - of info_struct and invalidates all programs that use a shared libpng**** - Fixed png_filler() declarations - Fixed? background color conversions - Fixed order of error function pointers to match documentation - Current chunk name is now available in png_struct to reduce the number - of nearly identical error messages (will simplify multi-lingual - support when available) - Try to get ready for unknown-chunk callback functions: - - previously read critical chunks are flagged, so the chunk handling - routines can determine if the chunk is in the right place - - all chunk handling routines have the same prototypes, so we will - be able to handle all chunks via a callback mechanism - Try to fix Linux "setjmp" buffer size problems - Removed png_large_malloc, png_large_free, and png_realloc functions. - -Version 0.95 [March, 1997] - Fixed bug in pngwutil.c allocating "up_row" twice and "avg_row" never - Fixed bug in PNG file signature compares when start != 0 - Changed parameter type of png_set_filler(...filler...) from png_byte - to png_uint_32 - Added test for MACOS to ensure that both math.h and fp.h are not #included - Added macros for libpng to be compiled as a Windows DLL (Andreas Kupries) - Added "packswap" transformation, which changes the endianness of - packed-pixel bytes (Kevin Bracey) - Added "strip_alpha" transformation, which removes the alpha channel of - input images without using it (not necessarily a good idea) - Added "swap_alpha" transformation, which puts the alpha channel in front - of the color bytes instead of after - Removed all implicit variable tests which assume NULL == 0 (I think) - Changed several variables to "png_size_t" to show 16/32-bit limitations - Added new pCAL chunk read/write support - Added experimental filter selection weighting (Greg Roelofs) - Removed old png_set_rgbx() and png_set_xrgb() functions that have been - obsolete for about 2 years now (use png_set_filler() instead) - Added macros to read 16- and 32-bit ints directly from buffer, to be - used only on those systems that support it (namely PowerPC and 680x0) - With some testing, this may become the default for MACOS/PPC systems. - Only calculate CRC on data if we are going to use it - Added macros for zTXt compression type PNG_zTXt_COMPRESSION_??? - Added macros for simple libpng debugging output selectable at compile time - Removed PNG_READ_END_MODE in progressive reader (Smarasderagd) - More description of info_struct in libpng.txt and png.h - More instructions in example.c - More chunk types tested in pngtest.c - Renamed pngrcb.c to pngset.c, and all png_read_ functions to be - png_set_. We now have corresponding png_get_ - functions in pngget.c to get information in info_ptr. This isolates - the application from the internal organization of png_info_struct - (good for shared library implementations). - -Version 0.96 [May, 1997] - Fixed serious bug with < 8bpp images introduced in 0.95 - Fixed 256-color transparency bug (Greg Roelofs) - Fixed up documentation (Greg Roelofs, Laszlo Nyul) - Fixed "error" in pngconf.h for Linux setjmp() behavior - Fixed DOS medium model support (Tim Wegner) - Fixed png_check_keyword() for case with error in static string text - Added read of CRC after IEND chunk for embedded PNGs (Laszlo Nyul) - Added typecasts to quiet compiler errors - Added more debugging info - -Version 0.97 [January, 1998] - Removed PNG_USE_OWN_CRC capability - Relocated png_set_crc_action from pngrutil.c to pngrtran.c - Fixed typecasts of "new_key", etc. (Andreas Dilger) - Added RFC 1152 [sic] date support - Fixed bug in gamma handling of 4-bit grayscale - Added 2-bit grayscale gamma handling (Glenn R-P) - Added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P) - Minor corrections in libpng.txt - Added simple sRGB support (Glenn R-P) - Easier conditional compiling, e.g., - define PNG_READ/WRITE_NOT_FULLY_SUPPORTED; - all configurable options can be selected from command-line instead - of having to edit pngconf.h (Glenn R-P) - Fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P) - Added more conditions for png_do_background, to avoid changing - black pixels to background when a background is supplied and - no pixels are transparent - Repaired PNG_NO_STDIO behavior - Tested NODIV support and made it default behavior (Greg Roelofs) - Added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler) - Regularized version numbering scheme and bumped shared-library major - version number to 2 to avoid problems with libpng 0.89 apps - (Greg Roelofs) - -Version 0.98 [January, 1998] - Cleaned up some typos in libpng.txt and in code documentation - Fixed memory leaks in pCAL chunk processing (Glenn R-P and John Bowler) - Cosmetic change "display_gamma" to "screen_gamma" in pngrtran.c - Changed recommendation about file_gamma for PC images to .51 from .45, - in example.c and libpng.txt, added comments to distinguish between - screen_gamma, viewing_gamma, and display_gamma. - Changed all references to RFC1152 to read RFC1123 and changed the - PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED - Added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent) - Changed srgb_intent from png_byte to int to avoid compiler bugs - -Version 0.99 [January 30, 1998] - Free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler) - Fixed a longstanding "packswap" bug in pngtrans.c - Fixed some inconsistencies in pngconf.h that prevented compiling with - PNG_READ_GAMMA_SUPPORTED and PNG_READ_hIST_SUPPORTED undefined - Fixed some typos and made other minor rearrangement of libpng.txt (Andreas) - Changed recommendation about file_gamma for PC images to .50 from .51 in - example.c and libpng.txt, and changed file_gamma for sRGB images to .45 - Added a number of functions to access information from the png structure - png_get_image_height(), etc. (Glenn R-P, suggestion by Brad Pettit) - Added TARGET_MACOS similar to zlib-1.0.8 - Define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined - Added type casting to all png_malloc() function calls - -Version 0.99a [January 31, 1998] - Added type casts and parentheses to all returns that return a value.(Tim W.) - -Version 0.99b [February 4, 1998] - Added type cast png_uint_32 on malloc function calls where needed. - Changed type of num_hist from png_uint_32 to int (same as num_palette). - Added checks for rowbytes overflow, in case png_size_t is less than 32 bits. - Renamed makefile.elf to makefile.lnx. - -Version 0.99c [February 7, 1998] - More type casting. Removed erroneous overflow test in pngmem.c. - Added png_buffered_memcpy() and png_buffered_memset(), apply them to rowbytes. - Added UNIX manual pages libpng.3 (incorporating libpng.txt) and png.5. - -Version 0.99d [February 11, 1998] - Renamed "far_to_near()" "png_far_to_near()" - Revised libpng.3 - Version 99c "buffered" operations didn't work as intended. Replaced them - with png_memcpy_check() and png_memset_check(). - Added many "if (png_ptr == NULL) return" to quell compiler warnings about - unused png_ptr, mostly in pngget.c and pngset.c. - Check for overlength tRNS chunk present when indexed-color PLTE is read. - Cleaned up spelling errors in libpng.3/libpng.txt - Corrected a problem with png_get_tRNS() which returned undefined trans array - -Version 0.99e [February 28, 1998] - Corrected png_get_tRNS() again. - Add parentheses for easier reading of pngget.c, fixed "||" should be "&&". - Touched up example.c to make more of it compileable, although the entire - file still can't be compiled (Willem van Schaik) - Fixed a bug in png_do_shift() (Bryan Tsai) - Added a space in png.h prototype for png_write_chunk_start() - Replaced pngtest.png with one created with zlib 1.1.1 - Changed pngtest to report PASS even when file size is different (Jean-loup G.) - Corrected some logic errors in png_do_invert_alpha() (Chris Patterson) - -Version 0.99f [March 5, 1998] - Corrected a bug in pngpread() introduced in version 99c (Kevin Bracey) - Moved makefiles into a "scripts" directory, and added INSTALL instruction file - Added makefile.os2 and pngos2.def (A. Zabolotny) and makefile.s2x (W. Sebok) - Added pointers to "note on libpng versions" in makefile.lnx and README - Added row callback feature when reading and writing nonprogressive rows - and added a test of this feature in pngtest.c - Added user transform callbacks, with test of the feature in pngtest.c - -Version 0.99g [March 6, 1998, morning] - Minor changes to pngtest.c to suppress compiler warnings. - Removed "beta" language from documentation. - -Version 0.99h [March 6, 1998, evening] - Minor changes to previous minor changes to pngtest.c - Changed PNG_READ_NOT_FULLY_SUPPORTED to PNG_READ_TRANSFORMS_NOT_SUPPORTED - and added PNG_PROGRESSIVE_READ_NOT_SUPPORTED macro - Added user transform capability - -Version 1.00 [March 7, 1998] - Changed several typedefs in pngrutil.c - Added makefile.wat (Pawel Mrochen), updated makefile.tc3 (Willem van Schaik) - Replaced "while(1)" with "for(;;)" - Added PNGARG() to prototypes in pngtest.c and removed some prototypes - Updated some of the makefiles (Tom Lane) - Changed some typedefs (s_start, etc.) in pngrutil.c - Fixed dimensions of "short_months" array in pngwrite.c - Replaced ansi2knr.c with the one from jpeg-v6 - -Version 1.0.0 [March 8, 1998] - Changed name from 1.00 to 1.0.0 (Adam Costello) - Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert) - -Version 1.0.0a [March 9, 1998] - Fixed three bugs in pngrtran.c to make gamma+background handling consistent - (Greg Roelofs) - Changed format of the PNG_LIBPNG_VER integer to xyyzz instead of xyz - for major, minor, and bugfix releases. This is 10001. (Adam Costello, - Tom Lane) - Make months range from 1-12 in png_convert_to_rfc1123 - -Version 1.0.0b [March 13, 1998] - Quieted compiler complaints about two empty "for" loops in pngrutil.c - Minor changes to makefile.s2x - Removed #ifdef/#endif around a png_free() in pngread.c - -Version 1.0.1 [March 14, 1998] - Changed makefile.s2x to reduce security risk of using a relative pathname - Fixed some typos in the documentation (Greg). - Fixed a problem with value of "channels" returned by png_read_update_info() - -Version 1.0.1a [April 21, 1998] - Optimized Paeth calculations by replacing abs() function calls with intrinsics - plus other loop optimizations. Improves avg decoding speed by about 20%. - Commented out i386istic "align" compiler flags in makefile.lnx. - Reduced the default warning level in some makefiles, to make them consistent. - Removed references to IJG and JPEG in the ansi2knr.c copyright statement. - Fixed a bug in png_do_strip_filler with XXRRGGBB => RRGGBB transformation. - Added grayscale and 16-bit capability to png_do_read_filler(). - Fixed a bug in pngset.c, introduced in version 0.99c, that sets rowbytes - too large when writing an image with bit_depth < 8 (Bob Dellaca). - Corrected some bugs in the experimental weighted filtering heuristics. - Moved a misplaced pngrutil code block that truncates tRNS if it has more - than num_palette entries -- test was done before num_palette was defined. - Fixed a png_convert_to_rfc1123() bug that converts day 31 to 0 (Steve Eddins). - Changed compiler flags in makefile.wat for better optimization - (Pawel Mrochen). - -Version 1.0.1b [May 2, 1998] - Relocated png_do_gray_to_rgb() within png_do_read_transformations() (Greg). - Relocated the png_composite macros from pngrtran.c to png.h (Greg). - Added makefile.sco (contributed by Mike Hopkirk). - Fixed two bugs (missing definitions of "istop") introduced in libpng-1.0.1a. - Fixed a bug in pngrtran.c that would set channels=5 under some circumstances. - More work on the Paeth-filtering, achieving imperceptible speedup - (A Kleinert). - More work on loop optimization which may help when compiled with C++ - compilers. - Added warnings when people try to use transforms they've defined out. - Collapsed 4 "i" and "c" loops into single "i" loops in pngrtran and pngwtran. - Revised paragraph about png_set_expand() in libpng.txt and libpng.3 (Greg) - -Version 1.0.1c [May 11, 1998] - Fixed a bug in pngrtran.c (introduced in libpng-1.0.1a) where the masks for - filler bytes should have been 0xff instead of 0xf. - Added max_pixel_depth=32 in pngrutil.c when using FILLER with palette images. - Moved PNG_WRITE_WEIGHTED_FILTER_SUPPORTED and PNG_WRITE_FLUSH_SUPPORTED - out of the PNG_WRITE_TRANSFORMS_NOT_SUPPORTED block of pngconf.h - Added "PNG_NO_WRITE_TRANSFORMS" etc., as alternatives for *_NOT_SUPPORTED, - for consistency, in pngconf.h - Added individual "ifndef PNG_NO_[CAPABILITY]" in pngconf.h to make it easier - to remove unwanted capabilities via the compile line - Made some corrections to grammar (which, it's) in documentation (Greg). - Corrected example.c, use of row_pointers in png_write_image(). - -Version 1.0.1d [May 24, 1998] - Corrected several statements that used side effects illegally in pngrutil.c - and pngtrans.c, that were introduced in version 1.0.1b - Revised png_read_rows() to avoid repeated if-testing for NULL (A Kleinert) - More corrections to example.c, use of row_pointers in png_write_image() - and png_read_rows(). - Added pngdll.mak and pngdef.pas to scripts directory, contributed by - Bob Dellaca, to make a png32bd.dll with Borland C++ 4.5 - Fixed error in example.c with png_set_text: num_text is 3, not 2 (Guido V.) - Changed several loops from count-down to count-up, for consistency. - -Version 1.0.1e [June 6, 1998] - Revised libpng.txt and libpng.3 description of png_set_read|write_fn(), and - added warnings when people try to set png_read_fn and png_write_fn in - the same structure. - Added a test such that png_do_gamma will be done when num_trans==0 - for truecolor images that have defined a background. This corrects an - error that was introduced in libpng-0.90 that can cause gamma processing - to be skipped. - Added tests in png.h to include "trans" and "trans_values" in structures - when PNG_READ_BACKGROUND_SUPPORTED or PNG_READ_EXPAND_SUPPORTED is defined. - Add png_free(png_ptr->time_buffer) in png_destroy_read_struct() - Moved png_convert_to_rfc_1123() from pngwrite.c to png.c - Added capability for user-provided malloc_fn() and free_fn() functions, - and revised pngtest.c to demonstrate their use, replacing the - PNGTEST_DEBUG_MEM feature. - Added makefile.w32, for Microsoft C++ 4.0 and later (Tim Wegner). - -Version 1.0.2 [June 14, 1998] - Fixed two bugs in makefile.bor . - -Version 1.0.2a [December 30, 1998] - Replaced and extended code that was removed from png_set_filler() in 1.0.1a. - Fixed a bug in png_do_filler() that made it fail to write filler bytes in - the left-most pixel of each row (Kevin Bracey). - Changed "static pngcharp tIME_string" to "static char tIME_string[30]" - in pngtest.c (Duncan Simpson). - Fixed a bug in pngtest.c that caused pngtest to try to write a tIME chunk - even when no tIME chunk was present in the source file. - Fixed a problem in pngrutil.c: gray_to_rgb didn't always work with 16-bit. - Fixed a problem in png_read_push_finish_row(), which would not skip some - passes that it should skip, for images that are less than 3 pixels high. - Interchanged the order of calls to png_do_swap() and png_do_shift() - in pngwtran.c (John Cromer). - Added #ifdef PNG_DEBUG/#endif surrounding use of PNG_DEBUG in png.h . - Changed "bad adaptive filter type" from error to warning in pngrutil.c . - Fixed a documentation error about default filtering with 8-bit indexed-color. - Separated the PNG_NO_STDIO macro into PNG_NO_STDIO and PNG_NO_CONSOLE_IO - (L. Peter Deutsch). - Added png_set_rgb_to_gray() and png_get_rgb_to_gray_status() functions. - Added png_get_copyright() and png_get_header_version() functions. - Revised comments on png_set_progressive_read_fn() in libpng.txt and example.c - Added information about debugging in libpng.txt and libpng.3 . - Changed "ln -sf" to "ln -s -f" in makefile.s2x, makefile.lnx, and - makefile.sco. - Removed lines after Dynamic Dependencies" in makefile.aco . - Revised makefile.dec to make a shared library (Jeremie Petit). - Removed trailing blanks from all files. - -Version 1.0.2a [January 6, 1999] - Removed misplaced #endif and #ifdef PNG_NO_EXTERN near the end of png.h - Added "if" tests to silence complaints about unused png_ptr in png.h and png.c - Changed "check_if_png" function in example.c to return true (nonzero) if PNG. - Changed libpng.txt to demonstrate png_sig_cmp() instead of png_check_sig() - which is obsolete. - -Version 1.0.3 [January 14, 1999] - Added makefile.hux, for Hewlett Packard HPUX 10.20 and 11.00 (Jim Rice) - Added a statement of Y2K compliance in png.h, libpng.3, and Y2KINFO. - -Version 1.0.3a [August 12, 1999] - Added check for PNG_READ_INTERLACE_SUPPORTED in pngread.c; issue a warning - if an attempt is made to read an interlaced image when it's not supported. - Added check if png_ptr->trans is defined before freeing it in pngread.c - Modified the Y2K statement to include versions back to version 0.71 - Fixed a bug in the check for valid IHDR bit_depth/color_types in pngrutil.c - Modified makefile.wat (added -zp8 flag, ".symbolic", changed some comments) - Replaced leading blanks with tab characters in makefile.hux - Changed "dworkin.wustl.edu" to "ccrc.wustl.edu" in various documents. - Changed (float)red and (float)green to (double)red, (double)green - in png_set_rgb_to_gray() to avoid "promotion" problems in AIX. - Fixed a bug in pngconf.h that omitted when PNG_DEBUG==0 (K Bracey). - Reformatted libpng.3 and libpngpf.3 with proper fonts (script by J. vanZandt). - Updated documentation to refer to the PNG-1.2 specification. - Removed ansi2knr.c and left pointers to the latest source for ansi2knr.c - in makefile.knr, INSTALL, and README (L. Peter Deutsch) - Fixed bugs in calculation of the length of rowbytes when adding alpha - channels to 16-bit images, in pngrtran.c (Chris Nokleberg) - Added function png_set_user_transform_info() to store user_transform_ptr, - user_depth, and user_channels into the png_struct, and a function - png_get_user_transform_ptr() to retrieve the pointer (Chris Nokleberg) - Added function png_set_empty_plte_permitted() to make libpng useable - in MNG applications. - Corrected the typedef for png_free_ptr in png.h (Jesse Jones). - Correct gamma with srgb is 45455 instead of 45000 in pngrutil.c, to be - consistent with PNG-1.2, and allow variance of 500 before complaining. - Added assembler code contributed by Intel in file pngvcrd.c and modified - makefile.w32 to use it (Nirav Chhatrapati, INTEL Corporation, - Gilles Vollant) - Changed "ln -s -f" to "ln -f -s" in the makefiles to make Solaris happy. - Added some aliases for png_set_expand() in pngrtran.c, namely - png_set_expand_PLTE(), png_set_expand_depth(), and png_set_expand_tRNS() - (Greg Roelofs, in "PNG: The Definitive Guide"). - Added makefile.beo for BEOS on X86, contributed by Sander Stok. - -Version 1.0.3b [August 26, 1999] - Replaced 2147483647L several places with PNG_MAX_UINT macro, defined in png.h - Changed leading blanks to tabs in all makefiles. - Define PNG_USE_PNGVCRD in makefile.w32, to get MMX assembler code. - Made alternate versions of png_set_expand() in pngrtran.c, namely - png_set_gray_1_2_4_to_8, png_set_palette_to_rgb, and png_set_tRNS_to_alpha - (Greg Roelofs, in "PNG: The Definitive Guide"). Deleted the 1.0.3a aliases. - Relocated start of 'extern "C"' block in png.h so it doesn't include pngconf.h - Revised calculation of num_blocks in pngmem.c to avoid a potentially - negative shift distance, whose results are undefined in the C language. - Added a check in pngset.c to prevent writing multiple tIME chunks. - Added a check in pngwrite.c to detect invalid small window_bits sizes. - -Version 1.0.3d [September 4, 1999] - Fixed type casting of igamma in pngrutil.c - Added new png_expand functions to scripts/pngdef.pas and pngos2.def - Added a demo read_user_transform_fn that examines the row filters in pngtest.c - -Version 1.0.4 [September 24, 1999, not distributed publicly] - Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined - Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h - Made several minor corrections to pngtest.c - Renamed the makefiles with longer but more user friendly extensions. - Copied the PNG copyright and license to a separate LICENSE file. - Revised documentation, png.h, and example.c to remove reference to - "viewing_gamma" which no longer appears in the PNG specification. - Revised pngvcrd.c to use MMX code for interlacing only on the final pass. - Updated pngvcrd.c to use the faster C filter algorithms from libpng-1.0.1a - Split makefile.win32vc into two versions, makefile.vcawin32 (uses MMX - assembler code) and makefile.vcwin32 (doesn't). - Added a CPU timing report to pngtest.c (enabled by defining PNGTEST_TIMING) - Added a copy of pngnow.png to the distribution. - -Version 1.0.4a [September 25, 1999] - Increase max_pixel_depth in pngrutil.c if a user transform needs it. - Changed several division operations to right-shifts in pngvcrd.c - -Version 1.0.4b [September 30, 1999] - Added parentheses in line 3732 of pngvcrd.c - Added a comment in makefile.linux warning about buggy -O3 in pgcc 2.95.1 - -Version 1.0.4c [October 1, 1999] - Added a "png_check_version" function in png.c and pngtest.c that will generate - a helpful compiler error if an old png.h is found in the search path. - Changed type of png_user_transform_depth|channels from int to png_byte. - Added "Libpng is OSI Certified Open Source Software" statement to png.h - -Version 1.0.4d [October 6, 1999] - Changed 0.45 to 0.45455 in png_set_sRGB() - Removed unused PLTE entries from pngnow.png - Re-enabled some parts of pngvcrd.c (png_combine_row) that work properly. - -Version 1.0.4e [October 10, 1999] - Fixed sign error in pngvcrd.c (Greg Roelofs) - Replaced some instances of memcpy with simple assignments in pngvcrd (GR-P) - -Version 1.0.4f [October 15, 1999] - Surrounded example.c code with #if 0 .. #endif to prevent people from - inadvertently trying to compile it. - Changed png_get_header_version() from a function to a macro in png.h - Added type casting mostly in pngrtran.c and pngwtran.c - Removed some pointless "ptr = NULL" in pngmem.c - Added a "contrib" directory containing the source code from Greg's book. - -Version 1.0.5 [October 15, 1999] - Minor editing of the INSTALL and README files. - -Version 1.0.5a [October 23, 1999] - Added contrib/pngsuite and contrib/pngminus (Willem van Schaik) - Fixed a typo in the png_set_sRGB() function call in example.c (Jan Nijtmans) - Further optimization and bugfix of pngvcrd.c - Revised pngset.c so that it does not allocate or free memory in the user's - text_ptr structure. Instead, it makes its own copy. - Created separate write_end_info_struct in pngtest.c for a more severe test. - Added code in pngwrite.c to free info_ptr->text[i].key to stop a memory leak. - -Version 1.0.5b [November 23, 1999] - Moved PNG_FLAG_HAVE_CHUNK_HEADER, PNG_FLAG_BACKGROUND_IS_GRAY and - PNG_FLAG_WROTE_tIME from flags to mode. - Added png_write_info_before_PLTE() function. - Fixed some typecasting in contrib/gregbook/*.c - Updated scripts/makevms.com and added makevms.com to contrib/gregbook - and contrib/pngminus (Martin Zinser) - -Version 1.0.5c [November 26, 1999] - Moved png_get_header_version from png.h to png.c, to accommodate ansi2knr. - Removed all global arrays (according to PNG_NO_GLOBAL_ARRAYS macro), to - accommodate making DLL's: Moved usr_png_ver from global variable to function - png_get_header_ver() in png.c. Moved png_sig to png_sig_bytes in png.c and - eliminated use of png_sig in pngwutil.c. Moved the various png_CHNK arrays - into pngtypes.h. Eliminated use of global png_pass arrays. Declared the - png_CHNK and png_pass arrays to be "const". Made the global arrays - available to applications (although none are used in libpng itself) when - PNG_NO_GLOBAL_ARRAYS is not defined or when PNG_GLOBAL_ARRAYS is defined. - Removed some extraneous "-I" from contrib/pngminus/makefile.std - Changed the PNG_sRGB_INTENT macros in png.h to be consistent with PNG-1.2. - Change PNG_SRGB_INTENT to PNG_sRGB_INTENT in libpng.txt and libpng.3 - -Version 1.0.5d [November 29, 1999] - Add type cast (png_const_charp) two places in png.c - Eliminated pngtypes.h; use macros instead to declare PNG_CHNK arrays. - Renamed "PNG_GLOBAL_ARRAYS" to "PNG_USE_GLOBAL_ARRAYS" and made available - to applications a macro "PNG_USE_LOCAL_ARRAYS". - comment out (with #ifdef) all the new declarations when - PNG_USE_GLOBAL_ARRAYS is defined. - Added PNG_EXPORT_VAR macro to accommodate making DLL's. - -Version 1.0.5e [November 30, 1999] - Added iCCP, iTXt, and sPLT support; added "lang" member to the png_text - structure; refactored the inflate/deflate support to make adding new chunks - with trailing compressed parts easier in the future, and added new functions - png_free_iCCP, png_free_pCAL, png_free_sPLT, png_free_text, png_get_iCCP, - png_get_spalettes, png_set_iCCP, png_set_spalettes (Eric S. Raymond). - NOTE: Applications that write text chunks MUST define png_text->lang - before calling png_set_text(). It must be set to NULL if you want to - write tEXt or zTXt chunks. If you want your application to be able to - run with older versions of libpng, use - - #ifdef PNG_iTXt_SUPPORTED - png_text[i].lang = NULL; - #endif - - Changed png_get_oFFs() and png_set_oFFs() to use signed rather than unsigned - offsets (Eric S. Raymond). - Combined PNG_READ_cHNK_SUPPORTED and PNG_WRITE_cHNK_SUPPORTED macros into - PNG_cHNK_SUPPORTED and combined the three types of PNG_text_SUPPORTED - macros, leaving the separate macros also available. - Removed comments on #endifs at the end of many short, non-nested #if-blocks. - -Version 1.0.5f [December 6, 1999] - Changed makefile.solaris to issue a warning about potential problems when - the ucb "ld" is in the path ahead of the ccs "ld". - Removed "- [date]" from the "synopsis" line in libpng.3 and libpngpf.3. - Added sCAL chunk support (Eric S. Raymond). - -Version 1.0.5g [December 7, 1999] - Fixed "png_free_spallettes" typo in png.h - Added code to handle new chunks in pngpread.c - Moved PNG_CHNK string macro definitions outside of PNG_NO_EXTERN block - Added "translated_key" to png_text structure and png_write_iTXt(). - Added code in pngwrite.c to work around a newly discovered zlib bug. - -Version 1.0.5h [December 10, 1999] - NOTE: regarding the note for version 1.0.5e, the following must also - be included in your code: - png_text[i].translated_key = NULL; - Unknown chunk handling is now supported. - Option to eliminate all floating point support was added. Some new - fixed-point functions such as png_set_gAMA_fixed() were added. - Expanded tabs and removed trailing blanks in source files. - -Version 1.0.5i [December 13, 1999] - Added some type casts to silence compiler warnings. - Renamed "png_free_spalette" to "png_free_spalettes" for consistency. - Removed leading blanks from a #define in pngvcrd.c - Added some parameters to the new png_set_keep_unknown_chunks() function. - Added a test for up->location != 0 in the first instance of writing - unknown chunks in pngwrite.c - Changed "num" to "i" in png_free_spalettes() and png_free_unknowns() to - prevent recursion. - Added png_free_hIST() function. - Various patches to fix bugs in the sCAL and integer cHRM processing, - and to add some convenience macros for use with sCAL. - -Version 1.0.5j [December 21, 1999] - Changed "unit" parameter of png_write_sCAL from png_byte to int, to work - around buggy compilers. - Added new type "png_fixed_point" for integers that hold float*100000 values - Restored backward compatibility of tEXt/zTXt chunk processing: - Restored the first four members of png_text to the same order as v.1.0.5d. - Added members "lang_key" and "itxt_length" to png_text struct. Set - text_length=0 when "text" contains iTXt data. Use the "compression" - member to distinguish among tEXt/zTXt/iTXt types. Added - PNG_ITXT_COMPRESSION_NONE (1) and PNG_ITXT_COMPRESSION_zTXt(2) macros. - The "Note" above, about backward incompatibility of libpng-1.0.5e, no - longer applies. - Fixed png_read|write_iTXt() to read|write parameters in the right order, - and to write the iTXt chunk after IDAT if it appears in the end_ptr. - Added pnggccrd.c, version of pngvcrd.c Intel assembler for gcc (Greg Roelofs) - Reversed the order of trying to write floating-point and fixed-point gAMA. - -Version 1.0.5k [December 27, 1999] - Added many parentheses, e.g., "if (a && b & c)" becomes "if (a && (b & c))" - Added png_handle_as_unknown() function (Glenn) - Added png_free_chunk_list() function and chunk_list and num_chunk_list members - of png_ptr. - Eliminated erroneous warnings about multiple sPLT chunks and sPLT-after-PLTE. - Fixed a libpng-1.0.5h bug in pngrutil.c that was issuing erroneous warnings - about ignoring incorrect gAMA with sRGB (gAMA was in fact not ignored) - Added png_free_tRNS(); png_set_tRNS() now malloc's its own trans array (ESR). - Define png_get_int_32 when oFFs chunk is supported as well as when pCAL is. - Changed type of proflen from png_int_32 to png_uint_32 in png_get_iCCP(). - -Version 1.0.5l [January 1, 2000] - Added functions png_set_read_user_chunk_fn() and png_get_user_chunk_ptr() - for setting a callback function to handle unknown chunks and for - retrieving the associated user pointer (Glenn). - -Version 1.0.5m [January 7, 2000] - Added high-level functions png_read_png(), png_write_png(), png_free_pixels(). - -Version 1.0.5n [January 9, 2000] - Added png_free_PLTE() function, and modified png_set_PLTE() to malloc its - own memory for info_ptr->palette. This makes it safe for the calling - application to free its copy of the palette any time after it calls - png_set_PLTE(). - -Version 1.0.5o [January 20, 2000] - Cosmetic changes only (removed some trailing blanks and TABs) - -Version 1.0.5p [January 31, 2000] - Renamed pngdll.mak to makefile.bd32 - Cosmetic changes in pngtest.c - -Version 1.0.5q [February 5, 2000] - Relocated the makefile.solaris warning about PATH problems. - Fixed pngvcrd.c bug by pushing/popping registers in mmxsupport (Bruce Oberg) - Revised makefile.gcmmx - Added PNG_SETJMP_SUPPORTED, PNG_SETJMP_NOT_SUPPORTED, and PNG_ABORT() macros - -Version 1.0.5r [February 7, 2000] - Removed superfluous prototype for png_get_itxt from png.h - Fixed a bug in pngrtran.c that improperly expanded the background color. - Return *num_text=0 from png_get_text() when appropriate, and fix documentation - of png_get_text() in libpng.txt/libpng.3. - -Version 1.0.5s [February 18, 2000] - Added "png_jmp_env()" macro to pngconf.h, to help people migrate to the - new error handler that's planned for the next libpng release, and changed - example.c, pngtest.c, and contrib programs to use this macro. - Revised some of the DLL-export macros in pngconf.h (Greg Roelofs) - Fixed a bug in png_read_png() that caused it to fail to expand some images - that it should have expanded. - Fixed some mistakes in the unused and undocumented INCH_CONVERSIONS functions - in pngget.c - Changed the allocation of palette, history, and trans arrays back to - the version 1.0.5 method (linking instead of copying) which restores - backward compatibility with version 1.0.5. Added some remarks about - that in example.c. Added "free_me" member to info_ptr and png_ptr - and added png_free_data() function. - Updated makefile.linux and makefile.gccmmx to make directories conditionally. - Made cosmetic changes to pngasmrd.h - Added png_set_rows() and png_get_rows(), for use with png_read|write_png(). - Modified png_read_png() to allocate info_ptr->row_pointers only if it - hasn't already been allocated. - -Version 1.0.5t [March 4, 2000] - Changed png_jmp_env() migration aiding macro to png_jmpbuf(). - Fixed "interlace" typo (should be "interlaced") in contrib/gregbook/read2-x.c - Fixed bug with use of PNG_BEFORE_IHDR bit in png_ptr->mode, introduced when - PNG_FLAG_HAVE_CHUNK_HEADER was moved into png_ptr->mode in version 1.0.5b - Files in contrib/gregbook were revised to use png_jmpbuf() and to select - a 24-bit visual if one is available, and to allow abbreviated options. - Files in contrib/pngminus were revised to use the png_jmpbuf() macro. - Removed spaces in makefile.linux and makefile.gcmmx, introduced in 1.0.5s - -Version 1.0.5u [March 5, 2000] - Simplified the code that detects old png.h in png.c and pngtest.c - Renamed png_spalette (_p, _pp) to png_sPLT_t (_tp, _tpp) - Increased precision of rgb_to_gray calculations from 8 to 15 bits and - added png_set_rgb_to_gray_fixed() function. - Added makefile.bc32 (32-bit Borland C++, C mode) - -Version 1.0.5v [March 11, 2000] - Added some parentheses to the png_jmpbuf macro definition. - Updated references to the zlib home page, which has moved to freesoftware.com. - Corrected bugs in documentation regarding png_read_row() and png_write_row(). - Updated documentation of png_rgb_to_gray calculations in libpng.3/libpng.txt. - Renamed makefile.borland,turboc3 back to makefile.bor,tc3 as in version 1.0.3, - revised borland makefiles; added makefile.ibmvac3 and makefile.gcc (Cosmin) - -Version 1.0.6 [March 20, 2000] - Minor revisions of makefile.bor, libpng.txt, and gregbook/rpng2-win.c - Added makefile.sggcc (SGI IRIX with gcc) - -Version 1.0.6d [April 7, 2000] - Changed sprintf() to strcpy() in png_write_sCAL_s() to work without STDIO - Added data_length parameter to png_decompress_chunk() function - Revised documentation to remove reference to abandoned png_free_chnk functions - Fixed an error in png_rgb_to_gray_fixed() - Revised example.c, usage of png_destroy_write_struct(). - Renamed makefile.ibmvac3 to makefile.ibmc, added libpng.icc IBM project file - Added a check for info_ptr->free_me&PNG_FREE_TEXT when freeing text in png.c - Simplify png_sig_bytes() function to remove use of non-ISO-C strdup(). - -Version 1.0.6e [April 9, 2000] - Added png_data_freer() function. - In the code that checks for over-length tRNS chunks, added check of - info_ptr->num_trans as well as png_ptr->num_trans (Matthias Benckmann) - Minor revisions of libpng.txt/libpng.3. - Check for existing data and free it if the free_me flag is set, in png_set_*() - and png_handle_*(). - Only define PNG_WEIGHTED_FILTERS_SUPPORTED when PNG_FLOATING_POINT_SUPPORTED - is defined. - Changed several instances of PNG_NO_CONSOLE_ID to PNG_NO_STDIO in pngrutil.c - and mentioned the purposes of the two macros in libpng.txt/libpng.3. - -Version 1.0.6f [April 14, 2000] - Revised png_set_iCCP() and png_set_rows() to avoid prematurely freeing data. - Add checks in png_set_text() for NULL members of the input text structure. - Revised libpng.txt/libpng.3. - Removed superfluous prototype for png_set_iTXt from png.h - Removed "else" from pngread.c, after png_error(), and changed "0" to "length". - Changed several png_errors about malformed ancillary chunks to png_warnings. - -Version 1.0.6g [April 24, 2000] - Added png_pass-* arrays to pnggccrd.c when PNG_USE_LOCAL_ARRAYS is defined. - Relocated paragraph about png_set_background() in libpng.3/libpng.txt - and other revisions (Matthias Benckmann) - Relocated info_ptr->free_me, png_ptr->free_me, and other info_ptr and - png_ptr members to restore binary compatibility with libpng-1.0.5 - (breaks compatibility with libpng-1.0.6). - -Version 1.0.6h [April 24, 2000] - Changed shared library so-number pattern from 2.x.y.z to xy.z (this builds - libpng.so.10 & libpng.so.10.6h instead of libpng.so.2 & libpng.so.2.1.0.6h) - This is a temporary change for test purposes. - -Version 1.0.6i [May 2, 2000] - Rearranged some members at the end of png_info and png_struct, to put - unknown_chunks_num and free_me within the original size of the png_structs - and free_me, png_read_user_fn, and png_free_fn within the original png_info, - because some old applications allocate the structs directly instead of - using png_create_*(). - Added documentation of user memory functions in libpng.txt/libpng.3 - Modified png_read_png so that it will use user_allocated row_pointers - if present, unless free_me directs that it be freed, and added description - of the use of png_set_rows() and png_get_rows() in libpng.txt/libpng.3. - Added PNG_LEGACY_SUPPORTED macro, and #ifdef out all new (since version - 1.00) members of png_struct and png_info, to regain binary compatibility - when you define this macro. Capabilities lost in this event - are user transforms (new in version 1.0.0),the user transform pointer - (new in version 1.0.2), rgb_to_gray (new in 1.0.5), iCCP, sCAL, sPLT, - the high-level interface, and unknown chunks support (all new in 1.0.6). - This was necessary because of old applications that allocate the structs - directly as authors were instructed to do in libpng-0.88 and earlier, - instead of using png_create_*(). - Added modes PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT which - can be used to detect codes that directly allocate the structs, and - code to check these modes in png_read_init() and png_write_init() and - generate a libpng error if the modes aren't set and PNG_LEGACY_SUPPORTED - was not defined. - Added makefile.intel and updated makefile.watcom (Pawel Mrochen) - -Version 1.0.6j [May 3, 2000] - Overloaded png_read_init() and png_write_init() with macros that convert - calls to png_read_init_2() or png_write_init_2() that check the version - and structure sizes. - -Version 1.0.7beta11 [May 7, 2000] - Removed the new PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT modes - which are no longer used. - Eliminated the three new members of png_text when PNG_LEGACY_SUPPORTED is - defined or when neither PNG_READ_iTXt_SUPPORTED nor PNG_WRITE_iTXt_SUPPORTED - is defined. - Made PNG_NO_READ|WRITE_iTXt the default setting, to avoid memory - overrun when old applications fill the info_ptr->text structure directly. - Added PNGAPI macro, and added it to the definitions of all exported functions. - Relocated version macro definitions ahead of the includes of zlib.h and - pngconf.h in png.h. - -Version 1.0.7beta12 [May 12, 2000] - Revised pngset.c to avoid a problem with expanding the png_debug macro. - Deleted some extraneous defines from pngconf.h - Made PNG_NO_CONSOLE_IO the default condition when PNG_BUILD_DLL is defined. - Use MSC _RPTn debugging instead of fprintf if _MSC_VER is defined. - Added png_access_version_number() function. - Check for mask&PNG_FREE_CHNK (for TEXT, SCAL, PCAL) in png_free_data(). - Expanded libpng.3/libpng.txt information about png_data_freer(). - -Version 1.0.7beta14 [May 17, 2000] (beta13 was not published) - Changed pnggccrd.c and pngvcrd.c to handle bad adaptive filter types as - warnings instead of errors, as pngrutil.c does. - Set the PNG_INFO_IDAT valid flag in png_set_rows() so png_write_png() - will actually write IDATs. - Made the default PNG_USE_LOCAL_ARRAYS depend on PNG_DLL instead of WIN32. - Make png_free_data() ignore its final parameter except when freeing data - that can have multiple instances (text, sPLT, unknowns). - Fixed a new bug in png_set_rows(). - Removed info_ptr->valid tests from png_free_data(), as in version 1.0.5. - Added png_set_invalid() function. - Fixed incorrect illustrations of png_destroy_write_struct() in example.c. - -Version 1.0.7beta15 [May 30, 2000] - Revised the deliberately erroneous Linux setjmp code in pngconf.h to produce - fewer error messages. - Rearranged checks for Z_OK to check the most likely path first in pngpread.c - and pngwutil.c. - Added checks in pngtest.c for png_create_*() returning NULL, and mentioned - in libpng.txt/libpng.3 the need for applications to check this. - Changed names of png_default_*() functions in pngtest to pngtest_*(). - Changed return type of png_get_x|y_offset_*() from png_uint_32 to png_int_32. - Fixed some bugs in the unused PNG_INCH_CONVERSIONS functions in pngget.c - Set each pointer to NULL after freeing it in png_free_data(). - Worked around a problem in pngconf.h; AIX's strings.h defines an "index" - macro that conflicts with libpng's png_color_16.index. (Dimitri - Papadapoulos) - Added "msvc" directory with MSVC++ project files (Simon-Pierre Cadieux). - -Version 1.0.7beta16 [June 4, 2000] - Revised the workaround of AIX string.h "index" bug. - Added a check for overlength PLTE chunk in pngrutil.c. - Added PNG_NO_POINTER_INDEXING macro to use array-indexing instead of pointer - indexing in pngrutil.c and pngwutil.c to accommodate a buggy compiler. - Added a warning in png_decompress_chunk() when it runs out of data, e.g. - when it tries to read an erroneous PhotoShop iCCP chunk. - Added PNG_USE_DLL macro. - Revised the copyright/disclaimer/license notice. - Added contrib/msvctest directory - -Version 1.0.7rc1 [June 9, 2000] - Corrected the definition of PNG_TRANSFORM_INVERT_ALPHA (0x0400 not 0x0200) - Added contrib/visupng directory (Willem van Schaik) - -Version 1.0.7beta18 [June 23, 2000] - Revised PNGAPI definition, and pngvcrd.c to work with __GCC__ - and do not redefine PNGAPI if it is passed in via a compiler directive. - Revised visupng/PngFile.c to remove returns from within the Try block. - Removed leading underscores from "_PNG_H" and "_PNG_SAVE_BSD_SOURCE" macros. - Updated contrib/visupng/cexcept.h to version 1.0.0. - Fixed bugs in pngwrite.c and pngwutil.c that prevented writing iCCP chunks. - -Version 1.0.7rc2 [June 28, 2000] - Updated license to include disclaimers required by UCITA. - Fixed "DJBPP" typo in pnggccrd.c introduced in beta18. - -Version 1.0.7 [July 1, 2000] - Revised the definition of "trans_values" in libpng.3/libpng.txt - -Version 1.0.8beta1 [July 8, 2000] - Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks. - Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and - pngwutil.c. - Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h. - Removed unused "#include " from png.c - Added WindowsCE support. - Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment. - -Version 1.0.8beta2 [July 10, 2000] - Added project files to the wince directory and made further revisions - of pngtest.c, pngrio.c, and pngwio.c in support of WindowsCE. - -Version 1.0.8beta3 [July 11, 2000] - Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS() - for indexed-color input files to avoid potential double-freeing trans array - under some unusual conditions; problem was introduced in version 1.0.6f. - Further revisions to pngtest.c and files in the wince subdirectory. - -Version 1.0.8beta4 [July 14, 2000] - Added the files pngbar.png and pngbar.jpg to the distribution. - Added makefile.cygwin, and cygwin support in pngconf.h - Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory) - -Version 1.0.8rc1 [July 16, 2000] - Revised png_debug() macros and statements to eliminate compiler warnings. - -Version 1.0.8 [July 24, 2000] - Added png_flush() in pngwrite.c, after png_write_IEND(). - Updated makefile.hpux to build a shared library. - -Version 1.0.9beta1 [November 10, 2000] - Fixed typo in scripts/makefile.hpux - Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser) - Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser) - Changed "cdrom.com" in documentation to "libpng.org" - Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg). - Changed type of "params" from voidp to png_voidp in png_read|write_png(). - Make sure PNGAPI and PNG_IMPEXP are defined in pngconf.h. - Revised the 3 instances of WRITEFILE in pngtest.c. - Relocated "msvc" and "wince" project subdirectories into "dll" subdirectory. - Updated png.rc in dll/msvc project - Revised makefile.dec to define and use LIBPATH and INCPATH - Increased size of global png_libpng_ver[] array from 12 to 18 chars. - Made global png_libpng_ver[], png_sig[] and png_pass_*[] arrays const. - Removed duplicate png_crc_finish() from png_handle_bKGD() function. - Added a warning when application calls png_read_update_info() multiple times. - Revised makefile.cygwin - Fixed bugs in iCCP support in pngrutil.c and pngwutil.c. - Replaced png_set_empty_plte_permitted() with png_permit_mng_features(). - -Version 1.0.9beta2 [November 19, 2000] - Renamed the "dll" subdirectory "projects". - Added borland project files to "projects" subdirectory. - Set VS_FF_PRERELEASE and VS_FF_PATCHED flags in msvc/png.rc when appropriate. - Add error message in png_set_compression_buffer_size() when malloc fails. - -Version 1.0.9beta3 [November 23, 2000] - Revised PNG_LIBPNG_BUILD_TYPE macro in png.h, used in the msvc project. - Removed the png_flush() in pngwrite.c that crashes some applications - that don't set png_output_flush_fn. - Added makefile.macosx and makefile.aix to scripts directory. - -Version 1.0.9beta4 [December 1, 2000] - Change png_chunk_warning to png_warning in png_check_keyword(). - Increased the first part of msg buffer from 16 to 18 in png_chunk_error(). - -Version 1.0.9beta5 [December 15, 2000] - Added support for filter method 64 (for PNG datastreams embedded in MNG). - -Version 1.0.9beta6 [December 18, 2000] - Revised png_set_filter() to accept filter method 64 when appropriate. - Added new PNG_HAVE_PNG_SIGNATURE bit to png_ptr->mode and use it to - help prevent applications from using MNG features in PNG datastreams. - Added png_permit_mng_features() function. - Revised libpng.3/libpng.txt. Changed "filter type" to "filter method". - -Version 1.0.9rc1 [December 23, 2000] - Revised test for PNG_HAVE_PNG_SIGNATURE in pngrutil.c - Fixed error handling of unknown compression type in png_decompress_chunk(). - In pngconf.h, define __cdecl when _MSC_VER is defined. - -Version 1.0.9beta7 [December 28, 2000] - Changed PNG_TEXT_COMPRESSION_zTXt to PNG_COMPRESSION_TYPE_BASE several places. - Revised memory management in png_set_hIST and png_handle_hIST in a backward - compatible manner. PLTE and tRNS were revised similarly. - Revised the iCCP chunk reader to ignore trailing garbage. - -Version 1.0.9beta8 [January 12, 2001] - Moved pngasmrd.h into pngconf.h. - Improved handling of out-of-spec garbage iCCP chunks generated by PhotoShop. - -Version 1.0.9beta9 [January 15, 2001] - Added png_set_invalid, png_permit_mng_features, and png_mmx_supported to - wince and msvc project module definition files. - Minor revision of makefile.cygwin. - Fixed bug with progressive reading of narrow interlaced images in pngpread.c - -Version 1.0.9beta10 [January 16, 2001] - Do not typedef png_FILE_p in pngconf.h when PNG_NO_STDIO is defined. - Fixed "png_mmx_supported" typo in project definition files. - -Version 1.0.9beta11 [January 19, 2001] - Updated makefile.sgi to make shared library. - Removed png_mmx_support() function and disabled PNG_MNG_FEATURES_SUPPORTED - by default, for the benefit of DLL forward compatibility. These will - be re-enabled in version 1.2.0. - -Version 1.0.9rc2 [January 22, 2001] - Revised cygwin support. - -Version 1.0.9 [January 31, 2001] - Added check of cygwin's ALL_STATIC in pngconf.h - Added "-nommx" parameter to contrib/gregbook/rpng2-win and rpng2-x demos. - -Version 1.0.10beta1 [March 14, 2001] - Revised makefile.dec, makefile.sgi, and makefile.sggcc; added makefile.hpgcc. - Reformatted libpng.3 to eliminate bad line breaks. - Added checks for _mmx_supported in the read_filter_row function of pnggccrd.c - Added prototype for png_mmx_support() near the top of pnggccrd.c - Moved some error checking from png_handle_IHDR to png_set_IHDR. - Added PNG_NO_READ_SUPPORTED and PNG_NO_WRITE_SUPPORTED macros. - Revised png_mmx_support() function in pnggccrd.c - Restored version 1.0.8 PNG_WRITE_EMPTY_PLTE_SUPPORTED behavior in pngwutil.c - Fixed memory leak in contrib/visupng/PngFile.c - Fixed bugs in png_combine_row() in pnggccrd.c and pngvcrd.c (C version) - Added warnings when retrieving or setting gamma=0. - Increased the first part of msg buffer from 16 to 18 in png_chunk_warning(). - -Version 1.0.10rc1 [March 23, 2001] - Changed all instances of memcpy, strcpy, and strlen to png_memcpy, png_strcpy, - and png_strlen. - Revised png_mmx_supported() function in pnggccrd.c to return proper value. - Fixed bug in progressive reading (pngpread.c) with small images (height < 8). - -Version 1.0.10 [March 30, 2001] - Deleted extraneous space (introduced in 1.0.9) from line 42 of makefile.cygwin - Added beos project files (Chris Herborth) - -Version 1.0.11beta1 [April 3, 2001] - Added type casts on several png_malloc() calls (Dimitri Papadapoulos). - Removed a no-longer needed AIX work-around from pngconf.h - Changed several "//" single-line comments to C-style in pnggccrd.c - -Version 1.0.11beta2 [April 11, 2001] - Removed PNGAPI from several functions whose prototypes did not have PNGAPI. - Updated scripts/pngos2.def - -Version 1.0.11beta3 [April 14, 2001] - Added checking the results of many instances of png_malloc() for NULL - -Version 1.0.11beta4 [April 20, 2001] - Undid the changes from version 1.0.11beta3. Added a check for NULL return - from user's malloc_fn(). - Removed some useless type casts of the NULL pointer. - Added makefile.netbsd - -Version 1.0.11 [April 27, 2001] - Revised makefile.netbsd - -Version 1.0.12beta1 [May 14, 2001] - Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot) - Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h - Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings. - Eliminated the png_error about apps using png_read|write_init(). Instead, - libpng will reallocate the png_struct and info_struct if they are too small. - This retains future binary compatibility for old applications written for - libpng-0.88 and earlier. - -Version 1.2.0beta1 [May 6, 2001] - Bumped DLLNUM to 2. - Re-enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED - by default. - Added runtime selection of MMX features. - Added png_set_strip_error_numbers function and related macros. - -Version 1.2.0beta2 [May 7, 2001] - Finished merging 1.2.0beta1 with version 1.0.11 - Added a check for attempts to read or write PLTE in grayscale PNG datastreams. - -Version 1.2.0beta3 [May 17, 2001] - Enabled user memory function by default. - Modified png_create_struct so it passes user mem_ptr to user memory allocator. - Increased png_mng_features flag from png_byte to png_uint_32. - Bumped shared-library (so-number) and dll-number to 3. - -Version 1.2.0beta4 [June 23, 2001] - Check for missing profile length field in iCCP chunk and free chunk_data - in case of truncated iCCP chunk. - Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc - Bumped dll-number from 2 to 3 in makefile.cygwin - Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly - if user attempts to run it on an 8-bit display. - Updated contrib/gregbook - Use png_malloc instead of png_zalloc to allocate palette in pngset.c - Updated makefile.ibmc - Added some typecasts to eliminate gcc 3.0 warnings. Changed prototypes - of png_write_oFFS width and height from png_uint_32 to png_int_32. - Updated example.c - Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c - -Version 1.2.0beta5 [August 8, 2001] - Revised contrib/gregbook - Revised makefile.gcmmx - Revised pnggccrd.c to conditionally compile some thread-unsafe code only - when PNG_THREAD_UNSAFE_OK is defined. - Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with - value exceeding 2^bit_depth-1 - Revised makefile.sgi and makefile.sggcc - Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c - Removed restriction that do_invert_mono only operate on 1-bit opaque files - -Version 1.2.0 [September 1, 2001] - Changed a png_warning() to png_debug() in pnggccrd.c - Fixed contrib/gregbook/rpng-x.c, rpng2-x.c to avoid crash with XFreeGC(). - -Version 1.2.1beta1 [October 19, 2001] - Revised makefile.std in contrib/pngminus - Include background_1 in png_struct regardless of gamma support. - Revised makefile.netbsd and makefile.macosx, added makefile.darwin. - Revised example.c to provide more details about using row_callback(). - -Version 1.2.1beta2 [October 25, 2001] - Added type cast to each NULL appearing in a function call, except for - WINCE functions. - Added makefile.so9. - -Version 1.2.1beta3 [October 27, 2001] - Removed type casts from all NULLs. - Simplified png_create_struct_2(). - -Version 1.2.1beta4 [November 7, 2001] - Revised png_create_info_struct() and png_creat_struct_2(). - Added error message if png_write_info() was omitted. - Type cast NULLs appearing in function calls when _NO_PROTO or - PNG_TYPECAST_NULL is defined. - -Version 1.2.1rc1 [November 24, 2001] - Type cast NULLs appearing in function calls except when PNG_NO_TYPECAST_NULL - is defined. - Changed typecast of "size" argument to png_size_t in pngmem.c calls to - the user malloc_fn, to agree with the prototype in png.h - Added a pop/push operation to pnggccrd.c, to preserve Eflag (Maxim Sobolev) - Updated makefile.sgi to recognize LIBPATH and INCPATH. - Updated various makefiles so "make clean" does not remove previous major - version of the shared library. - -Version 1.2.1rc2 [December 4, 2001] - Always allocate 256-entry internal palette, hist, and trans arrays, to - avoid out-of-bounds memory reference caused by invalid PNG datastreams. - Added a check for prefix_length > data_length in iCCP chunk handler. - -Version 1.2.1 [December 7, 2001] - None. - -Version 1.2.2beta1 [February 22, 2002] - Fixed a bug with reading the length of iCCP profiles (Larry Reeves). - Revised makefile.linux, makefile.gcmmx, and makefile.sgi to generate - libpng.a, libpng12.so (not libpng.so.3), and libpng12/png.h - Revised makefile.darwin to remove "-undefined suppress" option. - Added checks for gamma and chromaticity values over 21474.83, which exceed - the limit for PNG unsigned 32-bit integers when encoded. - Revised calls to png_create_read_struct() and png_create_write_struct() - for simpler debugging. - Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK) - -Version 1.2.2beta2 [February 23, 2002] - Check chunk_length and idat_size for invalid (over PNG_MAX_UINT) lengths. - Check for invalid image dimensions in png_get_IHDR. - Added missing "fi;" in the install target of the SGI makefiles. - Added install-static to all makefiles that make shared libraries. - Always do gamma compensation when image is partially transparent. - -Version 1.2.2beta3 [March 7, 2002] - Compute background.gray and background_1.gray even when color_type is RGB - in case image gets reduced to gray later. - Modified shared-library makefiles to install pkgconfig/libpngNN.pc. - Export (with PNGAPI) png_zalloc, png_zfree, and png_handle_as_unknown - Removed unused png_write_destroy_info prototype from png.h - Eliminated incorrect use of width_mmx from pnggccrd.c in pixel_bytes == 8 case - Added install-shared target to all makefiles that make shared libraries. - Stopped a double free of palette, hist, and trans when not using free_me. - Added makefile.32sunu for Sun Ultra 32 and makefile.64sunu for Sun Ultra 64. - -Version 1.2.2beta4 [March 8, 2002] - Compute background.gray and background_1.gray even when color_type is RGB - in case image gets reduced to gray later (Jason Summers). - Relocated a misplaced /bin/rm in the "install-shared" makefile targets - Added PNG_1_0_X macro which can be used to build a 1.0.x-compatible library. - -Version 1.2.2beta5 [March 26, 2002] - Added missing PNGAPI to several function definitions. - Check for invalid bit_depth or color_type in png_get_IHDR(), and - check for missing PLTE or IHDR in png_push_read_chunk() (Matthias Clasen). - Revised iTXt support to accept NULL for lang and lang_key. - Compute gamma for color components of background even when color_type is gray. - Changed "()" to "{}" in scripts/libpng.pc.in. - Revised makefiles to put png.h and pngconf.h only in $prefix/include/libpngNN - Revised makefiles to make symlink to libpng.so.NN in addition to libpngNN.so - -Version 1.2.2beta6 [March 31, 2002] - -Version 1.0.13beta1 [March 31, 2002] - Prevent png_zalloc() from trying to memset memory that it failed to acquire. - Add typecasts of PNG_MAX_UINT in pngset_cHRM_fixed() (Matt Holgate). - Ensure that the right function (user or default) is used to free the - png_struct after an error in png_create_read_struct_2(). - -Version 1.2.2rc1 [April 7, 2002] - -Version 1.0.13rc1 [April 7, 2002] - Save the ebx register in pnggccrd.c (Sami Farin) - Add "mem_ptr = png_ptr->mem_ptr" in png_destroy_write_struct() (Paul Gardner). - Updated makefiles to put headers in include/libpng and remove old include/*.h. - -Version 1.2.2 [April 15, 2002] - -Version 1.0.13 [April 15, 2002] - Revised description of png_set_filter() in libpng.3/libpng.txt. - Revised makefile.netbsd and added makefile.neNNbsd and makefile.freebsd - -Version 1.0.13patch01 [April 17, 2002] - -Version 1.2.2patch01 [April 17, 2002] - Changed ${PNGMAJ}.${PNGVER} bug to ${PNGVER} in makefile.sgi and - makefile.sggcc - Fixed VER -> PNGVER typo in makefile.macosx and added install-static to - install - Added install: target to makefile.32sunu and makefile.64sunu - -Version 1.0.13patch03 [April 18, 2002] - -Version 1.2.2patch03 [April 18, 2002] - Revised 15 makefiles to link libpng.a to libpngNN.a and the include libpng - subdirectory to libpngNN subdirectory without the full pathname. - Moved generation of libpng.pc from "install" to "all" in 15 makefiles. - -Version 1.2.3rc1 [April 28, 2002] - Added install-man target to 15 makefiles (Dimitri Papadopolous-Orfanos). - Added $(DESTDIR) feature to 24 makefiles (Tim Mooney) - Fixed bug with $prefix, should be $(prefix) in makefile.hpux. - Updated cygwin-specific portion of pngconf.h and revised makefile.cygwin - Added a link from libpngNN.pc to libpng.pc in 15 makefiles. - Added links from include/libpngNN/*.h to include/*.h in 24 makefiles. - Revised makefile.darwin to make relative links without full pathname. - Added setjmp() at the end of png_create_*_struct_2() in case user forgets - to put one in their application. - Restored png_zalloc() and png_zfree() prototypes to version 1.2.1 and - removed them from module definition files. - -Version 1.2.3rc2 [May 1, 2002] - Fixed bug in reporting number of channels in pngget.c and pngset.c, - that was introduced in version 1.2.2beta5. - Exported png_zalloc(), png_zfree(), png_default_read(), png_default_write(), - png_default_flush(), and png_push_fill_buffer() and included them in - module definition files. - Added "libpng.pc" dependency to the "install-shared" target in 15 makefiles. - -Version 1.2.3rc3 [May 1, 2002] - Revised prototype for png_default_flush() - Remove old libpng.pc and libpngNN.pc before installing new ones. - -Version 1.2.3rc4 [May 2, 2002] - Typos in *.def files (png_default_read|write -> png_default_read|write_data) - In makefiles, changed rm libpng.NN.pc to rm libpngNN.pc - Added libpng-config and libpngNN-config and modified makefiles to install - them. - Changed $(MANPATH) to $(DESTDIR)$(MANPATH) in makefiles - Added "Win32 DLL VB" configuration to projects/msvc/libpng.dsp - -Version 1.2.3rc5 [May 11, 2002] - Changed "error" and "message" in prototypes to "error_message" and - "warning_message" to avoid namespace conflict. - Revised 15 makefiles to build libpng-config from libpng-config-*.in - Once more restored png_zalloc and png_zfree to regular nonexported form. - Restored png_default_read|write_data, png_default_flush, png_read_fill_buffer - to nonexported form, but with PNGAPI, and removed them from module def - files. - -Version 1.2.3rc6 [May 14, 2002] - Removed "PNGAPI" from png_zalloc() and png_zfree() in png.c - Changed "Gz" to "Gd" in projects/msvc/libpng.dsp and zlib.dsp. - Removed leftover libpng-config "sed" script from four makefiles. - Revised libpng-config creating script in 16 makefiles. - -Version 1.2.3 [May 22, 2002] - Revised libpng-config target in makefile.cygwin. - Removed description of png_set_mem_fn() from documentation. - Revised makefile.freebsd. - Minor cosmetic changes to 15 makefiles, e.g., $(DI) = $(DESTDIR)/$(INCDIR). - Revised projects/msvc/README.txt - Changed -lpng to -lpngNN in LDFLAGS in several makefiles. - -Version 1.2.4beta1 [May 24, 2002] - Added libpng.pc and libpng-config to "all:" target in 16 makefiles. - Fixed bug in 16 makefiles: $(DESTDIR)/$(LIBPATH) to $(DESTDIR)$(LIBPATH) - Added missing "\" before closing double quote in makefile.gcmmx. - Plugged various memory leaks; added png_malloc_warn() and png_set_text_2() - functions. - -Version 1.2.4beta2 [June 25, 2002] - Plugged memory leak of png_ptr->current_text (Matt Holgate). - Check for buffer overflow before reading CRC in pngpread.c (Warwick Allison) - Added -soname to the loader flags in makefile.dec, makefile.sgi, and - makefile.sggcc. - Added "test-installed" target to makefile.linux, makefile.gcmmx, - makefile.sgi, and makefile.sggcc. - -Version 1.2.4beta3 [June 28, 2002] - Plugged memory leak of row_buf in pngtest.c when there is a png_error(). - Detect buffer overflow in pngpread.c when IDAT is corrupted with extra data. - Added "test-installed" target to makefile.32sunu, makefile.64sunu, - makefile.beos, makefile.darwin, makefile.dec, makefile.macosx, - makefile.solaris, makefile.hpux, makefile.hpgcc, and makefile.so9. - -Version 1.2.4rc1 and 1.0.14rc1 [July 2, 2002] - Added "test-installed" target to makefile.cygwin and makefile.sco. - Revised pnggccrd.c to be able to back out version 1.0.x via PNG_1_0_X macro. - -Version 1.2.4 and 1.0.14 [July 8, 2002] - Changed png_warning() to png_error() when width is too large to process. - -Version 1.2.4patch01 [July 20, 2002] - Revised makefile.cygwin to use DLL number 12 instead of 13. - -Version 1.2.5beta1 [August 6, 2002] - Added code to contrib/gregbook/readpng2.c to ignore unused chunks. - Replaced toucan.png in contrib/gregbook (it has been corrupt since 1.0.11) - Removed some stray *.o files from contrib/gregbook. - Changed png_error() to png_warning() about "Too much data" in pngpread.c - and about "Extra compressed data" in pngrutil.c. - Prevent png_ptr->pass from exceeding 7 in png_push_finish_row(). - Updated makefile.hpgcc - Updated png.c and pnggccrd.c handling of return from png_mmx_support() - -Version 1.2.5beta2 [August 15, 2002] - Only issue png_warning() about "Too much data" in pngpread.c when avail_in - is nonzero. - Updated makefiles to install a separate libpng.so.3 with its own rpath. - -Version 1.2.5rc1 and 1.0.15rc1 [August 24, 2002] - Revised makefiles to not remove previous minor versions of shared libraries. - -Version 1.2.5rc2 and 1.0.15rc2 [September 16, 2002] - Revised 13 makefiles to remove "-lz" and "-L$(ZLIBLIB)", etc., from shared - library loader directive. - Added missing "$OBJSDLL" line to makefile.gcmmx. - Added missing "; fi" to makefile.32sunu. - -Version 1.2.5rc3 and 1.0.15rc3 [September 18, 2002] - Revised libpng-config script. - -Version 1.2.5 and 1.0.15 [October 3, 2002] - Revised makefile.macosx, makefile.darwin, makefile.hpgcc, and makefile.hpux, - and makefile.aix. - Relocated two misplaced PNGAPI lines in pngtest.c - -Version 1.2.6beta1 [October 22, 2002] - Commented out warning about uninitialized mmx_support in pnggccrd.c. - Changed "IBMCPP__" flag to "__IBMCPP__" in pngconf.h. - Relocated two more misplaced PNGAPI lines in pngtest.c - Fixed memory overrun bug in png_do_read_filler() with 16-bit datastreams, - introduced in version 1.0.2. - Revised makefile.macosx, makefile.dec, makefile.aix, and makefile.32sunu. - -Version 1.2.6beta2 [November 1, 2002] - Added libpng-config "--ldopts" output. - Added "AR=ar" and "ARFLAGS=rc" and changed "ar rc" to "$(AR) $(ARFLAGS)" - in makefiles. - -Version 1.2.6beta3 [July 18, 2004] - Reverted makefile changes from version 1.2.6beta2 and some of the changes - from version 1.2.6beta1; these will be postponed until version 1.2.7. - Version 1.2.6 is going to be a simple bugfix release. - Changed the one instance of "ln -sf" to "ln -f -s" in each Sun makefile. - Fixed potential overrun in pngerror.c by using strncpy instead of memcpy. - Added "#!/bin/sh" at the top of configure, for recognition of the - 'x' flag under Cygwin (Cosmin). - Optimized vacuous tests that silence compiler warnings, in png.c (Cosmin). - Added support for PNG_USER_CONFIG, in pngconf.h (Cosmin). - Fixed the special memory handler for Borland C under DOS, in pngmem.c - (Cosmin). - Removed some spurious assignments in pngrutil.c (Cosmin). - Replaced 65536 with 65536L, and 0xffff with 0xffffL, to silence warnings - on 16-bit platforms (Cosmin). - Enclosed shift op expressions in parentheses, to silence warnings (Cosmin). - Used proper type png_fixed_point, to avoid problems on 16-bit platforms, - in png_handle_sRGB() (Cosmin). - Added compression_type to png_struct, and optimized the window size - inside the deflate stream (Cosmin). - Fixed definition of isnonalpha(), in pngerror.c and pngrutil.c (Cosmin). - Fixed handling of unknown chunks that come after IDAT (Cosmin). - Allowed png_error() and png_warning() to work even if png_ptr == NULL - (Cosmin). - Replaced row_info->rowbytes with row_bytes in png_write_find_filter() - (Cosmin). - Fixed definition of PNG_LIBPNG_VER_DLLNUM (Simon-Pierre). - Used PNG_LIBPNG_VER and PNG_LIBPNG_VER_STRING instead of the hardcoded - values in png.c (Simon-Pierre, Cosmin). - Initialized png_libpng_ver[] with PNG_LIBPNG_VER_STRING (Simon-Pierre). - Replaced PNG_LIBPNG_VER_MAJOR with PNG_LIBPNG_VER_DLLNUM in png.rc - (Simon-Pierre). - Moved the definition of PNG_HEADER_VERSION_STRING near the definitions - of the other PNG_LIBPNG_VER_... symbols in png.h (Cosmin). - Relocated #ifndef PNGAPI guards in pngconf.h (Simon-Pierre, Cosmin). - Updated scripts/makefile.vc(a)win32 (Cosmin). - Updated the MSVC project (Simon-Pierre, Cosmin). - Updated the Borland C++ Builder project (Cosmin). - Avoided access to asm_flags in pngvcrd.c, if PNG_1_0_X is defined (Cosmin). - Commented out warning about uninitialized mmx_support in pngvcrd.c (Cosmin). - Removed scripts/makefile.bd32 and scripts/pngdef.pas (Cosmin). - Added extra guard around inclusion of Turbo C memory headers, in pngconf.h - (Cosmin). - Renamed projects/msvc/ to projects/visualc6/, and projects/borland/ to - projects/cbuilder5/ (Cosmin). - Moved projects/visualc6/png32ms.def to scripts/pngw32.def, - and projects/visualc6/png.rc to scripts/pngw32.rc (Cosmin). - Added projects/visualc6/pngtest.dsp; removed contrib/msvctest/ (Cosmin). - Changed line endings to DOS style in cbuilder5 and visualc6 files, even - in the tar.* distributions (Cosmin). - Updated contrib/visupng/VisualPng.dsp (Cosmin). - Updated contrib/visupng/cexcept.h to version 2.0.0 (Cosmin). - Added a separate distribution with "configure" and supporting files (Junichi). - -Version 1.2.6beta4 [July 28, 2004] - Added user ability to change png_size_t via a PNG_SIZE_T macro. - Added png_sizeof() and png_convert_size() functions. - Added PNG_SIZE_MAX (maximum value of a png_size_t variable. - Added check in png_malloc_default() for (size_t)size != (png_uint_32)size - which would indicate an overflow. - Changed sPLT failure action from png_error to png_warning and abandon chunk. - Changed sCAL and iCCP failures from png_error to png_warning and abandon. - Added png_get_uint_31(png_ptr, buf) function. - Added PNG_UINT_32_MAX macro. - Renamed PNG_MAX_UINT to PNG_UINT_31_MAX. - Made png_zalloc() issue a png_warning and return NULL on potential - overflow. - Turn on PNG_NO_ZALLOC_ZERO by default in version 1.2.x - Revised "clobber list" in pnggccrd.c so it will compile under gcc-3.4. - Revised Borland portion of png_malloc() to return NULL or issue - png_error() according to setting of PNG_FLAG_MALLOC_NULL_MEM_OK. - Added PNG_NO_SEQUENTIAL_READ_SUPPORTED macro to conditionally remove - sequential read support. - Added some "#if PNG_WRITE_SUPPORTED" blocks. - Added #ifdef to remove some redundancy in png_malloc_default(). - Use png_malloc instead of png_zalloc to allocate the palette. - -Version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004] - Fixed buffer overflow vulnerability (CVE-2004-0597) in png_handle_tRNS(). - Fixed NULL dereference vulnerability (CVE-2004-0598) in png_handle_iCCP(). - Fixed integer overflow vulnerability (CVE-2004-0599) in png_read_png(). - Fixed some harmless bugs in png_handle_sBIT, etc, that would cause - duplicate chunk types to go undetected. - Fixed some timestamps in the -config version - Rearranged order of processing of color types in png_handle_tRNS(). - Added ROWBYTES macro to calculate rowbytes without integer overflow. - Updated makefile.darwin and removed makefile.macosx from scripts directory. - Imposed default one million column, one-million row limits on the image - dimensions, and added png_set_user_limits() function to override them. - Revised use of PNG_SET_USER_LIMITS_SUPPORTED macro. - Fixed wrong cast of returns from png_get_user_width|height_max(). - Changed some "keep the compiler happy" from empty statements to returns, - Revised libpng.txt to remove 1.2.x stuff from the 1.0.x distribution - -Version 1.0.16rc2 and 1.2.6rc2 [August 7, 2004] - Revised makefile.darwin and makefile.solaris. Removed makefile.macosx. - Revised pngtest's png_debug_malloc() to use png_malloc() instead of - png_malloc_default() which is not supposed to be exported. - Fixed off-by-one error in one of the conversions to PNG_ROWBYTES() in - pngpread.c. Bug was introduced in 1.2.6rc1. - Fixed bug in RGB to RGBX transformation introduced in 1.2.6rc1. - Fixed old bug in RGB to Gray transformation. - Fixed problem with 64-bit compilers by casting arguments to abs() - to png_int_32. - Changed "ln -sf" to "ln -f -s" in three makefiles (solaris, sco, so9). - Changed "HANDLE_CHUNK_*" to "PNG_HANDLE_CHUNK_*" (Cosmin) - Added "-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)" to 15 *NIX makefiles. - Added code to update the row_info->colortype in png_do_read_filler() (MSB). - -Version 1.0.16rc3 and 1.2.6rc3 [August 9, 2004] - Eliminated use of "abs()" in testing cHRM and gAMA values, to avoid - trouble with some 64-bit compilers. Created PNG_OUT_OF_RANGE() macro. - Revised documentation of png_set_keep_unknown_chunks(). - Check handle_as_unknown status in pngpread.c, as in pngread.c previously. - Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_INTERNAL section of png.h - Added "rim" definitions for CONST4 and CONST6 in pnggccrd.c - -Version 1.0.16rc4 and 1.2.6rc4 [August 10, 2004] - Fixed mistake in pngtest.c introduced in 1.2.6rc2 (declaration of - "pinfo" was out of place). - -Version 1.0.16rc5 and 1.2.6rc5 [August 10, 2004] - Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_ASSEMBLER_CODE_SUPPORTED - section of png.h where they were inadvertently placed in version rc3. - -Version 1.2.6 and 1.0.16 [August 15, 2004] - Revised pngtest so memory allocation testing is only done when PNG_DEBUG==1. - -Version 1.2.7beta1 [August 26, 2004] - Removed unused pngasmrd.h file. - Removed references to uu.net for archived files. Added references to - PNG Spec (second edition) and the PNG ISO/IEC Standard. - Added "test-dd" target in 15 makefiles, to run pngtest in DESTDIR. - Fixed bug with "optimized window size" in the IDAT datastream, that - causes libpng to write PNG files with incorrect zlib header bytes. - -Version 1.2.7beta2 [August 28, 2004] - Fixed bug with sCAL chunk and big-endian machines (David Munro). - Undid new code added in 1.2.6rc2 to update the color_type in - png_set_filler(). - Added png_set_add_alpha() that updates color type. - -Version 1.0.17rc1 and 1.2.7rc1 [September 4, 2004] - Revised png_set_strip_filler() to not remove alpha if color_type has alpha. - -Version 1.2.7 and 1.0.17 [September 12, 2004] - Added makefile.hp64 - Changed projects/msvc/png32ms.def to scripts/png32ms.def in makefile.cygwin - -Version 1.2.8beta1 [November 1, 2004] - Fixed bug in png_text_compress() that would fail to complete a large block. - Fixed bug, introduced in libpng-1.2.7, that overruns a buffer during - strip alpha operation in png_do_strip_filler(). - Added PNG_1_2_X definition in pngconf.h - Use #ifdef to comment out png_info_init in png.c and png_read_init in - pngread.c (as of 1.3.0) - -Version 1.2.8beta2 [November 2, 2004] - Reduce color_type to a nonalpha type after strip alpha operation in - png_do_strip_filler(). - -Version 1.2.8beta3 [November 3, 2004] - Revised definitions of PNG_MAX_UINT_32, PNG_MAX_SIZE, and PNG_MAXSUM - -Version 1.2.8beta4 [November 12, 2004] - Fixed (again) definition of PNG_LIBPNG_VER_DLLNUM in png.h (Cosmin). - Added PNG_LIBPNG_BUILD_PRIVATE in png.h (Cosmin). - Set png_ptr->zstream.data_type to Z_BINARY, to avoid unnecessary detection - of data type in deflate (Cosmin). - Deprecated but continue to support SPECIALBUILD and PRIVATEBUILD in favor of - PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING. - -Version 1.2.8beta5 [November 20, 2004] - Use png_ptr->flags instead of png_ptr->transformations to pass - PNG_STRIP_ALPHA info to png_do_strip_filler(), to preserve ABI - compatibility. - Revised handling of SPECIALBUILD, PRIVATEBUILD, - PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING. - -Version 1.2.8rc1 [November 24, 2004] - Moved handling of BUILD macros from pngconf.h to png.h - Added definition of PNG_LIBPNG_BASE_TYPE in png.h, inadvertently - omitted from beta5. - Revised scripts/pngw32.rc - Despammed mailing addresses by masking "@" with "at". - Inadvertently installed a supposedly faster test version of pngrutil.c - -Version 1.2.8rc2 [November 26, 2004] - Added two missing "\" in png.h - Change tests in pngread.c and pngpread.c to - if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) - png_do_read_transformations(png_ptr); - -Version 1.2.8rc3 [November 28, 2004] - Reverted pngrutil.c to version libpng-1.2.8beta5. - Added scripts/makefile.elf with supporting code in pngconf.h for symbol - versioning (John Bowler). - -Version 1.2.8rc4 [November 29, 2004] - Added projects/visualc7 (Simon-pierre). - -Version 1.2.8rc5 [November 29, 2004] - Fixed new typo in scripts/pngw32.rc - -Version 1.2.8 [December 3, 2004] - Removed projects/visualc7, added projects/visualc71. - -Version 1.2.9beta1 [February 21, 2006] - Initialized some structure members in pngwutil.c to avoid gcc-4.0.0 complaints - Revised man page and libpng.txt to make it clear that one should not call - png_read_end or png_write_end after png_read_png or png_write_png. - Updated references to png-mng-implement mailing list. - Fixed an incorrect typecast in pngrutil.c - Added PNG_NO_READ_SUPPORTED conditional for making a write-only library. - Added PNG_NO_WRITE_INTERLACING_SUPPORTED conditional. - Optimized alpha-inversion loops in pngwtran.c - Moved test for nonzero gamma outside of png_build_gamma_table() in pngrtran.c - Make sure num_trans is <= 256 before copying data in png_set_tRNS(). - Make sure num_palette is <= 256 before copying data in png_set_PLTE(). - Interchanged order of write_swap_alpha and write_invert_alpha transforms. - Added parentheses in the definition of PNG_LIBPNG_BUILD_TYPE (Cosmin). - Optimized zlib window flag (CINFO) in contrib/pngsuite/*.png (Cosmin). - Updated scripts/makefile.bc32 for Borland C++ 5.6 (Cosmin). - Exported png_get_uint_32, png_save_uint_32, png_get_uint_16, png_save_uint_16, - png_get_int_32, png_save_int_32, png_get_uint_31 (Cosmin). - Added type cast (png_byte) in png_write_sCAL() (Cosmin). - Fixed scripts/makefile.cygwin (Christian Biesinger, Cosmin). - Default iTXt support was inadvertently enabled. - -Version 1.2.9beta2 [February 21, 2006] - Check for png_rgb_to_gray and png_gray_to_rgb read transformations before - checking for png_read_dither in pngrtran.c - Revised checking of chromaticity limits to accommodate extended RGB - colorspace (John Denker). - Changed line endings in some of the project files to CRLF, even in the - "Unix" tar distributions (Cosmin). - Made png_get_int_32 and png_save_int_32 always available (Cosmin). - Updated scripts/pngos2.def, scripts/pngw32.def and projects/wince/png32ce.def - with the newly exported functions. - Eliminated distributions without the "configure" script. - Updated INSTALL instructions. - -Version 1.2.9beta3 [February 24, 2006] - Fixed CRCRLF line endings in contrib/visupng/VisualPng.dsp - Made libpng.pc respect EXEC_PREFIX (D. P. Kreil, J. Bowler) - Removed reference to pngasmrd.h from Makefile.am - Renamed CHANGES to ChangeLog. - Renamed LICENSE to COPYING. - Renamed ANNOUNCE to NEWS. - Created AUTHORS file. - -Version 1.2.9beta4 [March 3, 2006] - Changed definition of PKGCONFIG from $prefix/lib to $libdir in configure.ac - Reverted to filenames LICENSE and ANNOUNCE; removed AUTHORS and COPYING. - Removed newline from the end of some error and warning messages. - Removed test for sqrt() from configure.ac and configure. - Made swap tables in pngtrans.c PNG_CONST (Carlo Bramix). - Disabled default iTXt support that was inadvertently enabled in - libpng-1.2.9beta1. - Added "OS2" to list of systems that don't need underscores, in pnggccrd.c - Removed libpng version and date from *.c files. - -Version 1.2.9beta5 [March 4, 2006] - Removed trailing blanks from source files. - Put version and date of latest change in each source file, and changed - copyright year accordingly. - More cleanup of configure.ac, Makefile.am, and associated scripts. - Restored scripts/makefile.elf which was inadvertently deleted. - -Version 1.2.9beta6 [March 6, 2006] - Fixed typo (RELEASE) in configuration files. - -Version 1.2.9beta7 [March 7, 2006] - Removed libpng.vers and libpng.sym from libpng12_la_SOURCES in Makefile.am - Fixed inconsistent #ifdef's around png_sig_bytes() and png_set_sCAL_s() - in png.h. - Updated makefile.elf as suggested by debian. - Made cosmetic changes to some makefiles, adding LN_SF and other macros. - Made some makefiles accept "exec_prefix". - -Version 1.2.9beta8 [March 9, 2006] - Fixed some "#if defined (..." which should be "#if defined(..." - Bug introduced in libpng-1.2.8. - Fixed inconsistency in definition of png_default_read_data() - Restored blank that was lost from makefile.sggcc "clean" target in beta7. - Revised calculation of "current" and "major" for irix in ltmain.sh - Changed "mkdir" to "MKDIR_P" in some makefiles. - Separated PNG_EXPAND and PNG_EXPAND_tRNS. - Added png_set_expand_gray_1_2_4_to_8() and deprecated - png_set_gray_1_2_4_to_8() which also expands tRNS to alpha. - -Version 1.2.9beta9 [March 10, 2006] - Include "config.h" in pngconf.h when available. - Added some checks for NULL png_ptr or NULL info_ptr (timeless) - -Version 1.2.9beta10 [March 20, 2006] - Removed extra CR from contrib/visualpng/VisualPng.dsw (Cosmin) - Made pnggccrd.c PIC-compliant (Christian Aichinger). - Added makefile.mingw (Wolfgang Glas). - Revised pngconf.h MMX checking. - -Version 1.2.9beta11 [March 22, 2006] - Fixed out-of-order declaration in pngwrite.c that was introduced in beta9 - Simplified some makefiles by using LIBSO, LIBSOMAJ, and LIBSOVER macros. - -Version 1.2.9rc1 [March 31, 2006] - Defined PNG_USER_PRIVATEBUILD when including "pngusr.h" (Cosmin). - Removed nonsensical assertion check from pngtest.c (Cosmin). - -Version 1.2.9 [April 14, 2006] - Revised makefile.beos and added "none" selector in ltmain.sh - -Version 1.2.10beta1 [April 15, 2006] - Renamed "config.h" to "png_conf.h" and revised Makefile.am to add - -DPNG_BUILDING_LIBPNG to compile directive, and modified pngconf.h - to include png_conf.h only when PNG_BUILDING_LIBPNG is defined. - -Version 1.2.10beta2 [April 15, 2006] - Manually updated Makefile.in and configure. Changed png_conf.h.in - back to config.h. - -Version 1.2.10beta3 [April 15, 2006] - Change png_conf.h back to config.h in pngconf.h. - -Version 1.2.10beta4 [April 16, 2006] - Change PNG_BUILDING_LIBPNG to PNG_CONFIGURE_LIBPNG in config/Makefile*. - -Version 1.2.10beta5 [April 16, 2006] - Added a configure check for compiling assembler code in pnggccrd.c - -Version 1.2.10beta6 [April 17, 2006] - Revised the configure check for pnggccrd.c - Moved -DPNG_CONFIGURE_LIBPNG into @LIBPNG_DEFINES@ - Added @LIBPNG_DEFINES@ to arguments when building libpng.sym - -Version 1.2.10beta7 [April 18, 2006] - Change "exec_prefix=$prefix" to "exec_prefix=$(prefix)" in makefiles. - -Version 1.2.10rc1 [April 19, 2006] - Ensure pngconf.h doesn't define both PNG_USE_PNGGCCRD and PNG_USE_PNGVCRD - Fixed "LN_FS" typo in makefile.sco and makefile.solaris. - -Version 1.2.10rc2 [April 20, 2006] - Added a backslash between -DPNG_CONFIGURE_LIBPNG and -DPNG_NO_ASSEMBLER_CODE - in configure.ac and configure - Made the configure warning about versioned symbols less arrogant. - -Version 1.2.10rc3 [April 21, 2006] - Added a note in libpng.txt that png_set_sig_bytes(8) can be used when - writing an embedded PNG without the 8-byte signature. - Revised makefiles and configure to avoid making links to libpng.so.* - -Version 1.2.10 [April 23, 2006] - Reverted configure to "rc2" state. - -Version 1.2.11beta1 [May 31, 2006] - scripts/libpng.pc.in contained "configure" style version info and would - not work with makefiles. - The shared-library makefiles were linking to libpng.so.0 instead of - libpng.so.3 compatibility as the library. - -Version 1.2.11beta2 [June 2, 2006] - Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid - buffer overflow. - Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb) - -Version 1.2.11beta3 [June 5, 2006] - Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin). - Removed the accidental leftover Makefile.in~ (Cosmin). - Avoided potential buffer overflow and optimized buffer in - png_write_sCAL(), png_write_sCAL_s() (Cosmin). - Removed the include directories and libraries from CFLAGS and LDFLAGS - in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin). - -Version 1.2.11beta4 [June 6, 2006] - Allow zero-length IDAT chunks after the entire zlib datastream, but not - after another intervening chunk type. - -Version 1.0.19rc1, 1.2.11rc1 [June 13, 2006] - Deleted extraneous square brackets from [config.h] in configure.ac - -Version 1.0.19rc2, 1.2.11rc2 [June 14, 2006] - Added prototypes for PNG_INCH_CONVERSIONS functions to png.h - Revised INSTALL and autogen.sh - Fixed typo in several makefiles (-W1 should be -Wl) - Added typedef for png_int_32 and png_uint_32 on 64-bit systems. - -Version 1.0.19rc3, 1.2.11rc3 [June 15, 2006] - Removed the new typedefs for 64-bit systems (delay until version 1.4.0) - Added one zero element to png_gamma_shift[] array in pngrtran.c to avoid - reading out of bounds. - -Version 1.0.19rc4, 1.2.11rc4 [June 15, 2006] - Really removed the new typedefs for 64-bit systems. - -Version 1.0.19rc5, 1.2.11rc5 [June 22, 2006] - Removed png_sig_bytes entry from scripts/pngw32.def - -Version 1.0.19, 1.2.11 [June 26, 2006] - None. - -Version 1.0.20, 1.2.12 [June 27, 2006] - Really increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid - buffer overflow. - -Version 1.2.13beta1 [October 2, 2006] - Removed AC_FUNC_MALLOC from configure.ac - Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h - Change "logical" to "bitwise" throughout documentation. - Detect and fix attempt to write wrong iCCP profile length (CVE-2006-7244) - -Version 1.0.21, 1.2.13 [November 14, 2006] - Fix potential buffer overflow in sPLT chunk handler. - Fix Makefile.am to not try to link to noexistent files. - Check all exported functions for NULL png_ptr. - -Version 1.2.14beta1 [November 17, 2006] - Relocated three misplaced tests for NULL png_ptr. - Built Makefile.in with automake-1.9.6 instead of 1.9.2. - Build configure with autoconf-2.60 instead of 2.59 - -Version 1.2.14beta2 [November 17, 2006] - Added some typecasts in png_zalloc(). - -Version 1.2.14rc1 [November 20, 2006] - Changed "strtod" to "png_strtod" in pngrutil.c - -Version 1.0.22, 1.2.14 [November 27, 2006] - Added missing "$(srcdir)" in Makefile.am and Makefile.in - -Version 1.2.15beta1 [December 3, 2006] - Generated configure with autoconf-2.61 instead of 2.60 - Revised configure.ac to update libpng.pc and libpng-config. - -Version 1.2.15beta2 [December 3, 2006] - Always export MMX asm functions, just stubs if not building pnggccrd.c - -Version 1.2.15beta3 [December 4, 2006] - Add "png_bytep" typecast to profile while calculating length in pngwutil.c - -Version 1.2.15beta4 [December 7, 2006] - Added scripts/CMakeLists.txt - Changed PNG_NO_ASSEMBLER_CODE to PNG_NO_MMX_CODE in scripts, like 1.4.0beta - -Version 1.2.15beta5 [December 7, 2006] - Changed some instances of PNG_ASSEMBLER_* to PNG_MMX_* in pnggccrd.c - Revised scripts/CMakeLists.txt - -Version 1.2.15beta6 [December 13, 2006] - Revised scripts/CMakeLists.txt and configure.ac - -Version 1.2.15rc1 [December 18, 2006] - Revised scripts/CMakeLists.txt - -Version 1.2.15rc2 [December 21, 2006] - Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers. - Added scripts/makefile.nommx - -Version 1.2.15rc3 [December 25, 2006] - Fixed shared library numbering error that was introduced in 1.2.15beta6. - -Version 1.2.15rc4 [December 27, 2006] - Fixed handling of rgb_to_gray when png_ptr->color.gray isn't set. - -Version 1.2.15rc5 [December 31, 2006] - Revised handling of rgb_to_gray. - -Version 1.2.15 [January 5, 2007] - Added some (unsigned long) typecasts in pngtest.c to avoid printing errors. - -Version 1.2.16beta1 [January 6, 2007] - Fix bugs in makefile.nommx - -Version 1.2.16beta2 [January 16, 2007] - Revised scripts/CMakeLists.txt - -Version 1.2.16 [January 31, 2007] - No changes. - -Version 1.2.17beta1 [March 6, 2007] - Revised scripts/CMakeLists.txt to install both shared and static libraries. - Deleted a redundant line from pngset.c. - -Version 1.2.17beta2 [April 26, 2007] - Relocated misplaced test for png_ptr == NULL in pngpread.c - Change "==" to "&" for testing PNG_RGB_TO_GRAY_ERR & PNG_RGB_TO_GRAY_WARN - flags. - Changed remaining instances of PNG_ASSEMBLER_* to PNG_MMX_* - Added pngerror() when write_IHDR fails in deflateInit2(). - Added "const" to some array declarations. - Mention examples of libpng usage in the libpng*.txt and libpng.3 documents. - -Version 1.2.17rc1 [May 4, 2007] - No changes. - -Version 1.2.17rc2 [May 8, 2007] - Moved several PNG_HAVE_* macros out of PNG_INTERNAL because applications - calling set_unknown_chunk_location() need them. - Changed transformation flag from PNG_EXPAND_tRNS to PNG_EXPAND in - png_set_expand_gray_1_2_4_to_8(). - Added png_ptr->unknown_chunk to hold working unknown chunk data, so it - can be free'ed in case of error. Revised unknown chunk handling in - pngrutil.c and pngpread.c to use this structure. - -Version 1.2.17rc3 [May 8, 2007] - Revised symbol-handling in configure script. - -Version 1.2.17rc4 [May 10, 2007] - Revised unknown chunk handling to avoid storing unknown critical chunks. - -Version 1.0.25 [May 15, 2007] -Version 1.2.17 [May 15, 2007] - Added "png_ptr->num_trans=0" before error return in png_handle_tRNS, - to eliminate a vulnerability (CVE-2007-2445, CERT VU#684664) - -Version 1.0.26 [May 15, 2007] -Version 1.2.18 [May 15, 2007] - Reverted the libpng-1.2.17rc3 change to symbol-handling in configure script - -Version 1.2.19beta1 [May 18, 2007] - Changed "const static" to "static PNG_CONST" everywhere, mostly undoing - change of libpng-1.2.17beta2. Changed other "const" to "PNG_CONST" - Changed some handling of unused parameters, to avoid compiler warnings. - "if (unused == NULL) return;" becomes "unused = unused". - -Version 1.2.19beta2 [May 18, 2007] - Only use the valid bits of tRNS value in png_do_expand() (Brian Cartier) - -Version 1.2.19beta3 [May 19, 2007] - Add some "png_byte" typecasts in png_check_keyword() and write new_key - instead of key in zTXt chunk (Kevin Ryde). - -Version 1.2.19beta4 [May 21, 2007] - Add png_snprintf() function and use it in place of sprint() for improved - defense against buffer overflows. - -Version 1.2.19beta5 [May 21, 2007] - Fixed png_handle_tRNS() to only use the valid bits of tRNS value. - Changed handling of more unused parameters, to avoid compiler warnings. - Removed some PNG_CONST in pngwutil.c to avoid compiler warnings. - -Version 1.2.19beta6 [May 22, 2007] - Added some #ifdef PNG_MMX_CODE_SUPPORTED where needed in pngvcrd.c - Added a special "_MSC_VER" case that defines png_snprintf to _snprintf - -Version 1.2.19beta7 [May 22, 2007] - Squelched png_squelch_warnings() in pnggccrd.c and added - an #ifdef PNG_MMX_CODE_SUPPORTED block around the declarations that caused - the warnings that png_squelch_warnings was squelching. - -Version 1.2.19beta8 [May 22, 2007] - Removed __MMX__ from test in pngconf.h. - -Version 1.2.19beta9 [May 23, 2007] - Made png_squelch_warnings() available via PNG_SQUELCH_WARNINGS macro. - Revised png_squelch_warnings() so it might work. - Updated makefile.sgcc and makefile.solaris; added makefile.solaris-x86. - -Version 1.2.19beta10 [May 24, 2007] - Resquelched png_squelch_warnings(), use "__attribute__((used))" instead. - -Version 1.4.0beta1 [April 20, 2006] - Enabled iTXt support (changes png_struct, thus requires so-number change). - Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED - Eliminated PNG_1_0_X and PNG_1_2_X macros. - Removed deprecated functions png_read_init, png_write_init, png_info_init, - png_permit_empty_plte, png_set_gray_1_2_4_to_8, png_check_sig, and - removed the deprecated macro PNG_MAX_UINT. - Moved "PNG_INTERNAL" parts of png.h and pngconf.h into pngintrn.h - Removed many WIN32_WCE #ifdefs (Cosmin). - Reduced dependency on C-runtime library when on Windows (Simon-Pierre) - Replaced sprintf() with png_sprintf() (Simon-Pierre) - -Version 1.4.0beta2 [April 20, 2006] - Revised makefiles and configure to avoid making links to libpng.so.* - Moved some leftover MMX-related defines from pngconf.h to pngintrn.h - Updated scripts/pngos2.def, pngw32.def, and projects/wince/png32ce.def - -Version 1.4.0beta3 [May 10, 2006] - Updated scripts/pngw32.def to comment out MMX functions. - Added PNG_NO_GET_INT_32 and PNG_NO_SAVE_INT_32 macros. - Scripts/libpng.pc.in contained "configure" style version info and would - not work with makefiles. - Revised pngconf.h and added pngconf.h.in, so makefiles and configure can - pass defines to libpng and applications. - -Version 1.4.0beta4 [May 11, 2006] - Revised configure.ac, Makefile.am, and many of the makefiles to write - their defines in pngconf.h. - -Version 1.4.0beta5 [May 15, 2006] - Added a missing semicolon in Makefile.am and Makefile.in - Deleted extraneous square brackets from configure.ac - -Version 1.4.0beta6 [June 2, 2006] - Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid - buffer overflow. - Changed sonum from 0 to 1. - Removed unused prototype for png_check_sig() from png.h - -Version 1.4.0beta7 [June 16, 2006] - Exported png_write_sig (Cosmin). - Optimized buffer in png_handle_cHRM() (Cosmin). - Set pHYs = 2835 x 2835 pixels per meter, and added - sCAL = 0.352778e-3 x 0.352778e-3 meters, in pngtest.png (Cosmin). - Added png_set_benign_errors(), png_benign_error(), png_chunk_benign_error(). - Added typedef for png_int_32 and png_uint_32 on 64-bit systems. - Added "(unsigned long)" typecast on png_uint_32 variables in printf lists. - -Version 1.4.0beta8 [June 22, 2006] - Added demonstration of user chunk support in pngtest.c, to support the - public sTER chunk and a private vpAg chunk. - -Version 1.4.0beta9 [July 3, 2006] - Removed ordinals from scripts/pngw32.def and removed png_info_int and - png_set_gray_1_2_4_to_8 entries. - Inline call of png_get_uint_32() in png_get_uint_31(). - Use png_get_uint_31() to get vpAg width and height in pngtest.c - Removed WINCE and Netware projects. - Removed standalone Y2KINFO file. - -Version 1.4.0beta10 [July 12, 2006] - Eliminated automatic copy of pngconf.h to pngconf.h.in from configure and - some makefiles, because it was not working reliably. Instead, distribute - pngconf.h.in along with pngconf.h and cause configure and some of the - makefiles to update pngconf.h from pngconf.h.in. - Added pngconf.h to DEPENDENCIES in Makefile.am - -Version 1.4.0beta11 [August 19, 2006] - Removed AC_FUNC_MALLOC from configure.ac. - Added a warning when writing iCCP profile with mismatched profile length. - Patched pnggccrd.c to assemble on x86_64 platforms. - Moved chunk header reading into a separate function png_read_chunk_header() - in pngrutil.c. The chunk header (len+sig) is now serialized in a single - operation (Cosmin). - Implemented support for I/O states. Added png_ptr member io_state, and - functions png_get_io_chunk_name() and png_get_io_state() in pngget.c - (Cosmin). - Added png_get_io_chunk_name and png_get_io_state to scripts/*.def (Cosmin). - Renamed scripts/pngw32.* to scripts/pngwin.* (Cosmin). - Removed the include directories and libraries from CFLAGS and LDFLAGS - in scripts/makefile.gcc (Cosmin). - Used png_save_uint_32() to set vpAg width and height in pngtest.c (Cosmin). - Cast to proper type when getting/setting vpAg units in pngtest.c (Cosmin). - Added pngintrn.h to the Visual C++ projects (Cosmin). - Removed scripts/list (Cosmin). - Updated copyright year in scripts/pngwin.def (Cosmin). - Removed PNG_TYPECAST_NULL and used standard NULL consistently (Cosmin). - Disallowed the user to redefine png_size_t, and enforced a consistent use - of png_size_t across libpng (Cosmin). - Changed the type of png_ptr->rowbytes, PNG_ROWBYTES() and friends - to png_size_t (Cosmin). - Removed png_convert_size() and replaced png_sizeof with sizeof (Cosmin). - Removed some unnecessary type casts (Cosmin). - Changed prototype of png_get_compression_buffer_size() and - png_set_compression_buffer_size() to work with png_size_t instead of - png_uint_32 (Cosmin). - Removed png_memcpy_check() and png_memset_check() (Cosmin). - Fixed a typo (png_byte --> png_bytep) in libpng.3 and libpng.txt (Cosmin). - Clarified that png_zalloc() does not clear the allocated memory, - and png_zalloc() and png_zfree() cannot be PNGAPI (Cosmin). - Renamed png_mem_size_t to png_alloc_size_t, fixed its definition in - pngconf.h, and used it in all memory allocation functions (Cosmin). - Renamed pngintrn.h to pngpriv.h, added a comment at the top of the file - mentioning that the symbols declared in that file are private, and - updated the scripts and the Visual C++ projects accordingly (Cosmin). - Removed circular references between pngconf.h and pngconf.h.in in - scripts/makefile.vc*win32 (Cosmin). - Removing trailing '.' from the warning and error messages (Cosmin). - Added pngdefs.h that is built by makefile or configure, instead of - pngconf.h.in (Glenn). - Detect and fix attempt to write wrong iCCP profile length. - -Version 1.4.0beta12 [October 19, 2006] - Changed "logical" to "bitwise" in the documentation. - Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h - Add a typecast to stifle compiler warning in pngrutil.c - -Version 1.4.0beta13 [November 10, 2006] - Fix potential buffer overflow in sPLT chunk handler. - Fix Makefile.am to not try to link to noexistent files. - -Version 1.4.0beta14 [November 15, 2006] - Check all exported functions for NULL png_ptr. - -Version 1.4.0beta15 [November 17, 2006] - Relocated two misplaced tests for NULL png_ptr. - Built Makefile.in with automake-1.9.6 instead of 1.9.2. - Build configure with autoconf-2.60 instead of 2.59 - Add "install: all" in Makefile.am so "configure; make install" will work. - -Version 1.4.0beta16 [November 17, 2006] - Added a typecast in png_zalloc(). - -Version 1.4.0beta17 [December 4, 2006] - Changed "new_key[79] = '\0';" to "(*new_key)[79] = '\0';" in pngwutil.c - Add "png_bytep" typecast to profile while calculating length in pngwutil.c - -Version 1.4.0beta18 [December 7, 2006] - Added scripts/CMakeLists.txt - -Version 1.4.0beta19 [May 16, 2007] - Revised scripts/CMakeLists.txt - Rebuilt configure and Makefile.in with newer tools. - Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers. - Added scripts/makefile.nommx - -Version 1.4.0beta20 [July 9, 2008] - Moved several PNG_HAVE_* macros from pngpriv.h to png.h because applications - calling set_unknown_chunk_location() need them. - Moved several macro definitions from pngpriv.h to pngconf.h - Merge with changes to the 1.2.X branch, as of 1.2.30beta04. - Deleted all use of the MMX assembler code and Intel-licensed optimizations. - Revised makefile.mingw - -Version 1.4.0beta21 [July 21, 2008] - Moved local array "chunkdata" from pngrutil.c to the png_struct, so - it will be freed by png_read_destroy() in case of a read error (Kurt - Christensen). - -Version 1.4.0beta22 [July 21, 2008] - Change "purpose" and "buffer" to png_ptr->chunkdata to avoid memory leaking. - -Version 1.4.0beta23 [July 22, 2008] - Change "chunkdata = NULL" to "png_ptr->chunkdata = NULL" several places in - png_decompress_chunk(). - -Version 1.4.0beta24 [July 25, 2008] - Change all remaining "chunkdata" to "png_ptr->chunkdata" in - png_decompress_chunk(), and remove "chunkdata" from parameter list. - Put a call to png_check_chunk_name() in png_read_chunk_header(). - Revised png_check_chunk_name() to reject a name with a lowercase 3rd byte. - Removed two calls to png_check_chunk_name() occurring later in the process. - Define PNG_NO_ERROR_NUMBERS by default in pngconf.h - -Version 1.4.0beta25 [July 30, 2008] - Added a call to png_check_chunk_name() in pngpread.c - Reverted png_check_chunk_name() to accept a name with a lowercase 3rd byte. - Added png_push_have_buffer() function to pngpread.c - Eliminated PNG_BIG_ENDIAN_SUPPORTED and associated png_get_* macros. - Made inline expansion of png_get_*() optional with PNG_USE_READ_MACROS. - Eliminated all PNG_USELESS_TESTS and PNG_CORRECT_PALETTE_SUPPORTED code. - Synced contrib directory and configure files with libpng-1.2.30beta06. - Eliminated no-longer-used pngdefs.h (but it's still built in the makefiles) - Relocated a misplaced "#endif /* PNG_NO_WRITE_FILTER */" in pngwutil.c - -Version 1.4.0beta26 [August 4, 2008] - Removed png_push_have_buffer() function in pngpread.c. It increased the - compiled library size slightly. - Changed "-Wall" to "-W -Wall" in the CFLAGS in all makefiles (Cosmin Truta) - Declared png_ptr "volatile" in pngread.c and pngwrite.c to avoid warnings. - Updated contrib/visupng/cexcept.h to version 2.0.1 - Added PNG_LITERAL_CHARACTER macros for #, [, and ]. - -Version 1.4.0beta27 [August 5, 2008] - Revised usage of PNG_LITERAL_SHARP in pngerror.c. - Moved newline character from individual png_debug messages into the - png_debug macros. - Allow user to #define their own png_debug, png_debug1, and png_debug2. - -Version 1.4.0beta28 [August 5, 2008] - Revised usage of PNG_LITERAL_SHARP in pngerror.c. - Added PNG_STRING_NEWLINE macro - -Version 1.4.0beta29 [August 9, 2008] - Revised usage of PNG_STRING_NEWLINE to work on non-ISO compilers. - Added PNG_STRING_COPYRIGHT macro. - Added non-ISO versions of png_debug macros. - -Version 1.4.0beta30 [August 14, 2008] - Added premultiplied alpha feature (Volker Wiendl). - -Version 1.4.0beta31 [August 18, 2008] - Moved png_set_premultiply_alpha from pngtrans.c to pngrtran.c - Removed extra crc check at the end of png_handle_cHRM(). Bug introduced - in libpng-1.4.0beta20. - -Version 1.4.0beta32 [August 19, 2008] - Added PNG_WRITE_FLUSH_SUPPORTED block around new png_flush() call. - Revised PNG_NO_STDIO version of png_write_flush() - -Version 1.4.0beta33 [August 20, 2008] - Added png_get|set_chunk_cache_max() to limit the total number of sPLT, - text, and unknown chunks that can be stored. - -Version 1.4.0beta34 [September 6, 2008] - Shortened tIME_string to 29 bytes in pngtest.c - Fixed off-by-one error introduced in png_push_read_zTXt() function in - libpng-1.2.30beta04/pngpread.c (Harald van Dijk) - -Version 1.4.0beta35 [October 6, 2008] - Changed "trans_values" to "trans_color". - Changed so-number from 0 to 14. Some OS do not like 0. - Revised makefile.darwin to fix shared library numbering. - Change png_set_gray_1_2_4_to_8() to png_set_expand_gray_1_2_4_to_8() - in example.c (debian bug report) - -Version 1.4.0beta36 [October 25, 2008] - Sync with tEXt vulnerability fix in libpng-1.2.33rc02. - -Version 1.4.0beta37 [November 13, 2008] - Added png_check_cHRM in png.c and moved checking from pngget.c, pngrutil.c, - and pngwrite.c - -Version 1.4.0beta38 [November 22, 2008] - Added check for zero-area RGB cHRM triangle in png_check_cHRM() and - png_check_cHRM_fixed(). - -Version 1.4.0beta39 [November 23, 2008] - Revised png_warning() to write its message on standard output by default - when warning_fn is NULL. - -Version 1.4.0beta40 [November 24, 2008] - Eliminated png_check_cHRM(). Instead, always use png_check_cHRM_fixed(). - In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant - check for all-zero coordinates that is detected by the triangle check. - -Version 1.4.0beta41 [November 26, 2008] - Fixed string vs pointer-to-string error in png_check_keyword(). - Rearranged test expressions in png_check_cHRM_fixed() to avoid internal - overflows. - Added PNG_NO_CHECK_cHRM conditional. - -Version 1.4.0beta42, 43 [December 1, 2008] - Merge png_debug with version 1.2.34beta04. - -Version 1.4.0beta44 [December 6, 2008] - Removed redundant check for key==NULL before calling png_check_keyword() - to ensure that new_key gets initialized and removed extra warning - (Merge with version 1.2.34beta05 -- Arvan Pritchard). - -Version 1.4.0beta45 [December 9, 2008] - In png_write_png(), respect the placement of the filler bytes in an earlier - call to png_set_filler() (Jim Barry). - -Version 1.4.0beta46 [December 10, 2008] - Undid previous change and added PNG_TRANSFORM_STRIP_FILLER_BEFORE and - PNG_TRANSFORM_STRIP_FILLER_AFTER conditionals and deprecated - PNG_TRANSFORM_STRIP_FILLER (Jim Barry). - -Version 1.4.0beta47 [December 15, 2008] - Support for dithering was disabled by default, because it has never - been well tested and doesn't work very well. The code has not - been removed, however, and can be enabled by building libpng with - PNG_READ_DITHER_SUPPORTED defined. - -Version 1.4.0beta48 [February 14, 2009] - Added new exported function png_calloc(). - Combined several instances of png_malloc(); png_memset() into png_calloc(). - Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24 - but was never defined. - -Version 1.4.0beta49 [February 28, 2009] - Added png_fileno() macro to pngconf.h, used in pngwio.c - Corrected order of #ifdef's in png_debug definition in png.h - Fixed bug introduced in libpng-1.4.0beta48 with the memset arguments - for pcal_params. - Fixed order of #ifdef directives in the png_debug defines in png.h - (bug introduced in libpng-1.2.34/1.4.0beta29). - Revised comments in png_set_read_fn() and png_set_write_fn(). - -Version 1.4.0beta50 [March 18, 2009] - Use png_calloc() instead of png_malloc() to allocate big_row_buf when - reading an interlaced file, to avoid a possible UMR. - Undid revision of PNG_NO_STDIO version of png_write_flush(). Users - having trouble with fflush() can build with PNG_NO_WRITE_FLUSH defined - or supply their own flush_fn() replacement. - Revised libpng*.txt and png.h documentation about use of png_write_flush() - and png_set_write_fn(). - Removed fflush() from pngtest.c. - Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h - -Version 1.4.0beta51 [March 21, 2009] - Removed new png_fileno() macro from pngconf.h . - -Version 1.4.0beta52 [March 27, 2009] - Relocated png_do_chop() ahead of building gamma tables in pngrtran.c - This avoids building 16-bit gamma tables unnecessarily. - Removed fflush() from pngtest.c. - Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h - Added a section on differences between 1.0.x and 1.2.x to libpng.3/libpng.txt - -Version 1.4.0beta53 [April 1, 2009] - Removed some remaining MMX macros from pngpriv.h - Fixed potential memory leak of "new_name" in png_write_iCCP() (Ralph Giles) - -Version 1.4.0beta54 [April 13, 2009] - Added "ifndef PNG_SKIP_SETJMP_CHECK" block in pngconf.h to allow - application code writers to bypass the check for multiple inclusion - of setjmp.h when they know that it is safe to ignore the situation. - Eliminated internal use of setjmp() in pngread.c and pngwrite.c - Reordered ancillary chunks in pngtest.png to be the same as what - pngtest now produces, and made some cosmetic changes to pngtest output. - Eliminated deprecated png_read_init_3() and png_write_init_3() functions. - -Version 1.4.0beta55 [April 15, 2009] - Simplified error handling in pngread.c and pngwrite.c by putting - the new png_read_cleanup() and png_write_cleanup() functions inline. - -Version 1.4.0beta56 [April 25, 2009] - Renamed "user_chunk_data" to "my_user_chunk_data" in pngtest.c to suppress - "shadowed declaration" warning from gcc-4.3.3. - Renamed "gamma" to "png_gamma" in pngset.c to avoid "shadowed declaration" - warning about a global "gamma" variable in math.h on some platforms. - -Version 1.4.0beta57 [May 2, 2009] - Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24 - but was never defined (again). - Rebuilt configure scripts with autoconf-2.63 instead of 2.62 - Removed pngprefs.h and MMX from makefiles - -Version 1.4.0beta58 [May 14, 2009] - Changed pngw32.def to pngwin.def in makefile.mingw (typo was introduced - in beta57). - Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri) - -Version 1.4.0beta59 [May 15, 2009] - Reformated sources in libpng style (3-space intentation, comment format) - Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG) - Added sections about the git repository and our coding style to the - documentation - Relocated misplaced #endif in pngwrite.c, sCAL chunk handler. - -Version 1.4.0beta60 [May 19, 2009] - Conditionally compile png_read_finish_row() which is not used by - progressive readers. - Added contrib/pngminim/preader to demonstrate building minimal progressive - decoder, based on contrib/gregbook with embedded libpng and zlib. - -Version 1.4.0beta61 [May 20, 2009] - In contrib/pngminim/*, renamed "makefile.std" to "makefile", since there - is only one makefile in those directories, and revised the README files - accordingly. - More reformatting of comments, mostly to capitalize sentences. - -Version 1.4.0beta62 [June 2, 2009] - Added "#define PNG_NO_WRITE_SWAP" to contrib/pngminim/encoder/pngusr.h - and "define PNG_NO_READ_SWAP" to decoder/pngusr.h and preader/pngusr.h - Reformatted several remaining "else statement" into two lines. - Added a section to the libpng documentation about using png_get_io_ptr() - in configure scripts to detect the presence of libpng. - -Version 1.4.0beta63 [June 15, 2009] - Revised libpng*.txt and libpng.3 to mention calling png_set_IHDR() - multiple times and to specify the sample order in the tRNS chunk, - because the ISO PNG specification has a typo in the tRNS table. - Changed several PNG_UNKNOWN_CHUNK_SUPPORTED to - PNG_HANDLE_AS_UNKNOWN_SUPPORTED, to make the png_set_keep mechanism - available for ignoring known chunks even when not saving unknown chunks. - Adopted preference for consistent use of "#ifdef" and "#ifndef" versus - "#if defined()" and "if !defined()" where possible. - -Version 1.4.0beta64 [June 24, 2009] - Eliminated PNG_LEGACY_SUPPORTED code. - Moved the various unknown chunk macro definitions outside of the - PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks. - -Version 1.4.0beta65 [June 26, 2009] - Added a reference to the libpng license in each file. - -Version 1.4.0beta66 [June 27, 2009] - Refer to the libpng license instead of the libpng license in each file. - -Version 1.4.0beta67 [July 6, 2009] - Relocated INVERT_ALPHA within png_read_png() and png_write_png(). - Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB. - Added an "xcode" project to the projects directory (Alam Arias). - -Version 1.4.0beta68 [July 19, 2009] - Avoid some tests in filter selection in pngwutil.c - -Version 1.4.0beta69 [July 25, 2009] - Simplified the new filter-selection test. This runs faster in the - common "PNG_ALL_FILTERS" and PNG_FILTER_NONE cases. - Removed extraneous declaration from the new call to png_read_gray_to_rgb() - (bug introduced in libpng-1.4.0beta67). - Fixed up xcode project (Alam Arias) - Added a prototype for png_64bit_product() in png.c - -Version 1.4.0beta70 [July 27, 2009] - Avoid a possible NULL dereference in debug build, in png_set_text_2(). - (bug introduced in libpng-0.95, discovered by Evan Rouault) - -Version 1.4.0beta71 [July 29, 2009] - Rebuilt configure scripts with autoconf-2.64. - -Version 1.4.0beta72 [August 1, 2009] - Replaced *.tar.lzma with *.tar.xz in distribution. Get the xz codec - from . - -Version 1.4.0beta73 [August 1, 2009] - Reject attempt to write iCCP chunk with negative embedded profile length - (JD Chen) (CVE-2009-5063). - -Version 1.4.0beta74 [August 8, 2009] - Changed png_ptr and info_ptr member "trans" to "trans_alpha". - -Version 1.4.0beta75 [August 21, 2009] - Removed an extra png_debug() recently added to png_write_find_filter(). - Fixed incorrect #ifdef in pngset.c regarding unknown chunk support. - -Version 1.4.0beta76 [August 22, 2009] - Moved an incorrectly located test in png_read_row() in pngread.c - -Version 1.4.0beta77 [August 27, 2009] - Removed lpXYZ.tar.bz2 (with CRLF), KNOWNBUG, libpng-x.y.z-KNOWNBUG.txt, - and the "noconfig" files from the distribution. - Moved CMakeLists.txt from scripts into the main libpng directory. - Various bugfixes and improvements to CMakeLists.txt (Philip Lowman) - -Version 1.4.0beta78 [August 31, 2009] - Converted all PNG_NO_* tests to PNG_*_SUPPORTED everywhere except pngconf.h - Eliminated PNG_NO_FREE_ME and PNG_FREE_ME_SUPPORTED macros. - Use png_malloc plus a loop instead of png_calloc() to initialize - row_pointers in png_read_png(). - -Version 1.4.0beta79 [September 1, 2009] - Eliminated PNG_GLOBAL_ARRAYS and PNG_LOCAL_ARRAYS; always use local arrays. - Eliminated PNG_CALLOC_SUPPORTED macro and always provide png_calloc(). - -Version 1.4.0beta80 [September 17, 2009] - Removed scripts/libpng.icc - Changed typecast of filler from png_byte to png_uint_16 in png_set_filler(). - (Dennis Gustafsson) - Fixed typo introduced in beta78 in pngtest.c ("#if def " should be "#ifdef ") - -Version 1.4.0beta81 [September 23, 2009] - Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h - Expanded TAB characters in pngrtran.c - Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid - compiler complaints about doubly declaring things "const". - Changed all "#if [!]defined(X)" to "if[n]def X" where possible. - Eliminated unused png_ptr->row_buf_size - -Version 1.4.0beta82 [September 25, 2009] - Moved redundant IHDR checking into new png_check_IHDR() in png.c - and report all errors found in the IHDR data. - Eliminated useless call to png_check_cHRM() from pngset.c - -Version 1.4.0beta83 [September 25, 2009] - Revised png_check_IHDR() to eliminate bogus complaint about filter_type. - -Version 1.4.0beta84 [September 30, 2009] - Fixed some inconsistent indentation in pngconf.h - Revised png_check_IHDR() to add a test for width variable less than 32-bit. - -Version 1.4.0beta85 [October 1, 2009] - Revised png_check_IHDR() again, to check info_ptr members instead of - the contents of the returned parameters. - -Version 1.4.0beta86 [October 9, 2009] - Updated the "xcode" project (Alam Arias). - Eliminated a shadowed declaration of "pp" in png_handle_sPLT(). - -Version 1.4.0rc01 [October 19, 2009] - Trivial cosmetic changes. - -Version 1.4.0beta87 [October 30, 2009] - Moved version 1.4.0 back into beta. - -Version 1.4.0beta88 [October 30, 2009] - Revised libpng*.txt section about differences between 1.2.x and 1.4.0 - because most of the new features have now been ported back to 1.2.41 - -Version 1.4.0beta89 [November 1, 2009] - More bugfixes and improvements to CMakeLists.txt (Philip Lowman) - Removed a harmless extra png_set_invert_alpha() from pngwrite.c - Apply png_user_chunk_cache_max within png_decompress_chunk(). - Merged libpng-1.2.41.txt with libpng-1.4.0.txt where appropriate. - -Version 1.4.0beta90 [November 2, 2009] - Removed all remaining WIN32_WCE #ifdefs except those involving the - time.h "tm" structure - -Version 1.4.0beta91 [November 3, 2009] - Updated scripts/pngw32.def and projects/wince/png32ce.def - Copied projects/wince/png32ce.def to the scripts directory. - Added scripts/makefile.wce - Patched ltmain.sh for wince support. - Added PNG_CONVERT_tIME_SUPPORTED macro. - -Version 1.4.0beta92 [November 4, 2009] - Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED - Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED - Revised libpng*.txt to describe differences from 1.2.40 to 1.4.0 (instead - of differences from 1.2.41 to 1.4.0) - -Version 1.4.0beta93 [November 7, 2009] - Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and - PNG_ALLOCATED macros to detect deprecated direct access to the - png_struct or info_struct members and other deprecated usage in - applications (John Bowler). - Updated scripts/makefile* to add "-DPNG_CONFIGURE_LIBPNG" to CFLAGS, - to prevent warnings about direct access to png structs by libpng - functions while building libpng. They need to be tested, especially - those using compilers other than gcc. - Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG". - They should work but still need to be updated to remove - references to pnggccrd.c or pngvcrd.c and ASM building. - Added README.txt to the beos, cbuilder5, netware, and xcode projects warning - that they need to be updated, to remove references to pnggccrd.c and - pngvcrd.c and to depend on pngpriv.h - Removed three direct references to read_info_ptr members in pngtest.c - that were detected by the new PNG_DEPSTRUCT macro. - Moved the png_debug macro definitions and the png_read_destroy(), - png_write_destroy() and png_far_to_near() prototypes from png.h - to pngpriv.h (John Bowler) - Moved the synopsis lines for png_read_destroy(), png_write_destroy() - png_debug(), png_debug1(), and png_debug2() from libpng.3 to libpngpf.3. - -Version 1.4.0beta94 [November 9, 2009] - Removed the obsolete, unused pnggccrd.c and pngvcrd.c files. - Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions. - Removed dependency of pngtest.o on pngpriv.h in the makefiles. - Only #define PNG_DEPSTRUCT, etc. in pngconf.h if not already defined. - -Version 1.4.0beta95 [November 10, 2009] - Changed png_check_sig() to !png_sig_cmp() in contrib programs. - Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile - Changed png_check_sig() to !png_sig_cmp() in contrib programs. - Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c - Changed pngminim/*/gather.sh to stop trying to remove pnggccrd.c and pngvcrd.c - Added dependency on pngpriv.h in contrib/pngminim/*/makefile - -Version 1.4.0beta96 [November 12, 2009] - Renamed scripts/makefile.wce to scripts/makefile.cegcc - Revised Makefile.am to use libpng.sys while building libpng.so - so that only PNG_EXPORT functions are exported. - Removed the deprecated png_check_sig() function/macro. - Removed recently removed function names from scripts/*.def - Revised pngtest.png to put chunks in the same order written by pngtest - (evidently the same change made in libpng-1.0beta54 was lost). - Added PNG_PRIVATE macro definition in pngconf.h for possible future use. - -Version 1.4.0beta97 [November 13, 2009] - Restored pngtest.png to the libpng-1.4.0beta7 version. - Removed projects/beos and netware.txt; no one seems to be supporting them. - Revised Makefile.in - -Version 1.4.0beta98 [November 13, 2009] - Added the "xcode" project to zip distributions, - Fixed a typo in scripts/pngwin.def introduced in beta97. - -Version 1.4.0beta99 [November 14, 2009] - Moved libpng-config.in and libpng.pc-configure.in out of the scripts - directory, to libpng-config.in and libpng-pc.in, respectively, and - modified Makefile.am and configure.ac accordingly. Now "configure" - needs nothing from the "scripts" directory. - Avoid redefining PNG_CONST in pngconf.h - -Version 1.4.0beta100 [November 14, 2009] - Removed ASM builds from projects/visualc6 and projects/visualc71 - Removed scripts/makefile.nommx and makefile.vcawin32 - Revised CMakeLists.txt to account for new location of libpng-config.in - and libpng-pc.in - Updated INSTALL to reflect removal and relocation of files. - -Version 1.4.0beta101 [November 14, 2009] - Restored the binary files (*.jpg, *.png, some project files) that were - accidentally deleted from the zip and 7z distributions when the xcode - project was added. - -Version 1.4.0beta102 [November 18, 2009] - Added libpng-config.in and libpng-pc.in to the zip and 7z distributions. - Fixed a typo in projects/visualc6/pngtest.dsp, introduced in beta100. - Moved descriptions of makefiles and other scripts out of INSTALL into - scripts/README.txt - Updated the copyright year in scripts/pngwin.rc from 2006 to 2009. - -Version 1.4.0beta103 [November 21, 2009] - Removed obsolete comments about ASM from projects/visualc71/README_zlib.txt - Align row_buf on 16-byte boundary in memory. - Restored the PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED guard around the call - to png_flush() after png_write_IEND(). See 1.4.0beta32, 1.4.0beta50 - changes above and 1.2.30, 1.2.30rc01 and rc03 in 1.2.41 CHANGES. Someone - needs this feature. - Make the 'png_jmpbuf' macro expand to a call that records the correct - longjmp function as well as returning a pointer to the setjmp - jmp_buf buffer, and marked direct access to jmpbuf 'deprecated'. - (John Bowler) - -Version 1.4.0beta104 [November 22, 2009] - Removed png_longjmp_ptr from scripts/*.def and libpng.3 - Rebuilt configure scripts with autoconf-2.65 - -Version 1.4.0beta105 [November 25, 2009] - Use fast integer PNG_DIVIDE_BY_255() or PNG_DIVIDE_BY_65535() - to accomplish alpha premultiplication when - PNG_READ_COMPOSITE_NODIV_SUPPORTED is defined. - Changed "/255" to "/255.0" in background calculations to make it clear - that the 255 is used as a double. - -Version 1.4.0beta106 [November 27, 2009] - Removed premultiplied alpha feature. - -Version 1.4.0beta107 [December 4, 2009] - Updated README - Added "#define PNG_NO_PEDANTIC_WARNINGS" in the libpng source files. - Removed "-DPNG_CONFIGURE_LIBPNG" from the makefiles and projects. - Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco - to put png.h and pngconf.h in $prefix/include, like the other scripts, - instead of in $prefix/include/libpng. Also revised makefile.sco - to put them in $prefix/include/libpng15 instead of in - $prefix/include/libpng/libpng15. - -Version 1.4.0beta108 [December 11, 2009] - Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile - Relocated png_do_chop() to its original position in pngrtran.c; the - change in version 1.2.41beta08 caused transparency to be handled wrong - in some 16-bit datastreams (Yusaku Sugai). - -Version 1.4.0beta109 [December 13, 2009] - Added "bit_depth" parameter to the private png_build_gamma_table() function. - Pass bit_depth=8 to png_build_gamma_table() when bit_depth is 16 but the - PNG_16_TO_8 transform has been set, to avoid unnecessary build of 16-bit - tables. - -Version 1.4.0rc02 [December 20, 2009] - Declared png_cleanup_needed "volatile" in pngread.c and pngwrite.c - -Version 1.4.0rc03 [December 22, 2009] - Renamed libpng-pc.in back to libpng.pc.in and revised CMakeLists.txt - (revising the change in 1.4.0beta99) - -Version 1.4.0rc04 [December 25, 2009] - Swapped PNG_UNKNOWN_CHUNKS_SUPPORTED and PNG_HANDLE_AS_UNKNOWN_SUPPORTED - in pngset.c to be consistent with other changes in version 1.2.38. - -Version 1.4.0rc05 [December 25, 2009] - Changed "libpng-pc.in" to "libpng.pc.in" in configure.ac, configure, and - Makefile.in to be consistent with changes in libpng-1.4.0rc03 - -Version 1.4.0rc06 [December 29, 2009] - Reverted the gamma_table changes from libpng-1.4.0beta109. - Fixed some indentation errors. - -Version 1.4.0rc07 [January 1, 2010] - Revised libpng*.txt and libpng.3 about 1.2.x->1.4.x differences. - Use png_calloc() instead of png_malloc(); png_memset() in pngrutil.c - Update copyright year to 2010. - -Version 1.4.0rc08 [January 2, 2010] - Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr - in pngtest.c - -Version 1.4.0 [January 3, 2010] - No changes. - -Version 1.4.1beta01 [January 8, 2010] - Updated CMakeLists.txt for consistent indentation and to avoid an - unclosed if-statement warning (Philip Lowman). - Revised Makefile.am and Makefile.in to remove references to Y2KINFO, - KNOWNBUG, and libpng.la (Robert Schwebel). - Revised the makefiles to install the same files and symbolic - links as configure, except for libpng.la and libpng14.la. - Make png_set|get_compression_buffer_size() available even when - PNG_WRITE_SUPPORTED is not enabled. - Revised Makefile.am and Makefile.in to simplify their maintenance. - Revised scripts/makefile.linux to install a link to libpng14.so.14.1 - -Version 1.4.1beta02 [January 9, 2010] - Revised the rest of the makefiles to install a link to libpng14.so.14.1 - -Version 1.4.1beta03 [January 10, 2010] - Removed png_set_premultiply_alpha() from scripts/*.def - -Version 1.4.1rc01 [January 16, 2010] - No changes. - -Version 1.4.1beta04 [January 23, 2010] - Revised png_decompress_chunk() to improve speed and memory usage when - decoding large chunks. - Added png_set|get_chunk_malloc_max() functions. - -Version 1.4.1beta05 [January 26, 2010] - Relocated "int k" declaration in pngtest.c to minimize its scope. - -Version 1.4.1beta06 [January 28, 2010] - Revised png_decompress_chunk() to use a two-pass method suggested by - John Bowler. - -Version 1.4.1beta07 [February 6, 2010] - Folded some long lines in the source files. - Added defineable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX, - and a PNG_USER_LIMITS_SUPPORTED flag. - Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as - png_ptr->png_user_chunk_malloc_max. - Revised png_push_save_buffer() to do fewer but larger png_malloc() calls. - -Version 1.4.1beta08 [February 6, 2010] - Minor cleanup and updating of dates and copyright year. - -Version 1.5.0beta01 [February 7, 2010] - Moved declaration of png_struct into private pngstruct.h and png_info - into pnginfo.h - -Version 1.4.1beta09 and 1.5.0beta02 [February 7, 2010] - Reverted to original png_push_save_buffer() code. - -Version 1.4.1beta10 and 1.5.0beta03 [February 8, 2010] - Return allocated "old_buffer" in png_push_save_buffer() before - calling png_error(), to avoid a potential memory leak. - Updated configure script to use SO number 15. - -Version 1.5.0beta04 [February 9, 2010] - Removed malformed "incomplete struct declaration" of png_info from png.h - -Version 1.5.0beta05 [February 12, 2010] - Removed PNG_DEPSTRUCT markup in pngstruct.h and pnginfo.h, and undid the - linewrapping that it entailed. - Revised comments in pngstruct.h and pnginfo.h and added pointers to - the libpng license. - Changed PNG_INTERNAL to PNG_EXPOSE_INTERNAL_STRUCTURES - Removed the cbuilder5 project, which has not been updated to 1.4.0. - -Version 1.4.1beta12 and 1.5.0beta06 [February 14, 2010] - Fixed type declaration of png_get_chunk_malloc_max() in pngget.c (Daisuke - Nishikawa) - -Version 1.5.0beta07 [omitted] - -Version 1.5.0beta08 [February 19, 2010] - Changed #ifdef PNG_NO_STDIO_SUPPORTED to #ifdef PNG_NO_CONSOLE_IO_SUPPORTED - wherever png_snprintf() is used to construct error and warning messages. - Noted in scripts/makefile.mingw that it expects to be run under MSYS. - Removed obsolete unused MMX-querying support from contrib/gregbook - Added exported png_longjmp() function. - Removed the AIX redefinition of jmpbuf in png.h - Added -D_ALLSOURCE in configure.ac, makefile.aix, and CMakeLists.txt - when building on AIX. - -Version 1.5.0beta09 [February 19, 2010] - Removed -D_ALLSOURCE from configure.ac, makefile.aix, and CMakeLists.txt. - Changed the name of png_ptr->jmpbuf to png_ptr->png_jmpbuf in pngstruct.h - -Version 1.5.0beta10 [February 25, 2010] - Removed unused gzio.c from contrib/pngminim gather and makefile scripts - Removed replacement error handlers from contrib/gregbook. Because of - the new png_longjmp() function they are no longer needed. - -Version 1.5.0beta11 [March 6, 2010] - Removed checking for already-included setjmp.h from pngconf.h - Fixed inconsistent indentations and made numerous cosmetic changes. - Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5 - -Version 1.5.0beta12 [March 9, 2010] - Moved "#include png.h" inside pngpriv.h and removed "#include png.h" from - the source files, along with "#define PNG_EXPOSE_INTERNAL_STRUCTURES" - and "#define PNG_NO_PEDANTIC_WARNINGS" (John Bowler). - Created new pngdebug.h and moved debug definitions there. - -Version 1.5.0beta13 [March 10, 2010] - Protect pngstruct.h, pnginfo.h, and pngdebug.h from being included twice. - Revise the "#ifdef" blocks in png_inflate() so it will compile when neither - PNG_USER_CHUNK_MALLOC_MAX nor PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED - is defined. - Removed unused png_measure_compressed_chunk() from pngpriv.h and libpngpf.3 - Moved the 'config.h' support from pngconf.h to pngpriv.h - Removed PNGAPI from the png_longjmp_ptr typedef. - Eliminated dependence of pngtest.c on the private pngdebug.h file. - Make all png_debug macros into *unterminated* statements or - expressions (i.e. a trailing ';' must always be added) and correct - the format statements in various png_debug messages. - -Version 1.5.0beta14 [March 14, 2010] - Removed direct access to png_ptr->io_ptr from the Windows code in pngtest.c - Revised Makefile.am to account for recent additions and replacements. - Corrected CE and OS/2 DEF files (scripts/png*def) for symbols removed and - added ordinal numbers to the Windows DEF file and corrected the duplicated - ordinal numbers on CE symbols that are commented out. - Added back in export symbols that can be present in the Windows build but - are disabled by default. - PNG_EXPORT changed to include an 'ordinal' field for DEF file generation. - PNG_CALLBACK added to make callback definitions uniform. PNGAPI split - into PNGCAPI (base C form), PNGAPI (exports) and PNGCBAPI (callbacks), - and appropriate changes made to all files. Cygwin builds re-hinged to - allow procedure call standard changes and to remove the need for the DEF - file (fixes build on Cygwin). - Enabled 'attribute' warnings that are relevant to library APIs and callbacks. - Changed rules for generation of the various symbol files and added a new - rule for a DEF file (which is also added to the distribution). - Updated the symbol file generation to stop it adding spurious spaces - to EOL (coming from preprocessor macro expansion). Added a facility - to join tokens in the output and rewrite *.dfn to use this. - Eliminated scripts/*.def in favor of libpng.def; updated projects/visualc71 - and removed scripts/makefile.cygwin. - Made PNG_BUILD_DLL safe: it can be set whenever a DLL is being built. - Removed the include of sys/types.h - apparently unnecessary now on the - platforms on which it happened (all but Mac OS and RISC OS). - Moved the Mac OS test into pngpriv.h (the only place it is used.) - -Version 1.5.0beta15 [March 17, 2010] - Added symbols.chk target to Makefile.am to validate the symbols in png.h - against the new DEF file scripts/symbols.def. - Changed the default DEF file back to pngwin.def. - Removed makefile.mingw. - Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN - -Version 1.5.0beta16 [April 1, 2010] - Make png_text_struct independent of PNG_iTXt_SUPPORTED, so that - fields are initialized in all configurations. The READ/WRITE - macros (PNG_(READ|WRITE)_iTXt_SUPPORTED) still function as - before to disable code to actually read or write iTXt chunks - and iTXt_SUPPORTED can be used to detect presence of either - read or write support (but it is probably better to check for - the one actually required - read or write.) - Combined multiple png_warning() calls for a single error. - Restored the macro definition of png_check_sig(). - -Version 1.5.0beta17 [April 17, 2010] - Added some "(long)" typecasts to printf calls in png_handle_cHRM(). - Documented the fact that png_set_dither() was disabled since libpng-1.4.0. - Reenabled png_set_dither() but renamed it to png_set_quantize() to reflect - more accurately what it actually does. At the same time, renamed - the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros to - PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS. - Added some "(long)" typecasts to printf calls in png_handle_cHRM(). - Freeze build-time only configuration in the build. - In all prior versions of libpng most configuration options - controlled by compiler #defines had to be repeated by the - application code that used libpng. This patch changes this - so that compilation options that can only be changed at build - time are frozen in the build. Options that are compiler - dependent (and those that are system dependent) are evaluated - each time - pngconf.h holds these. Options that can be changed - per-file in the application are in png.h. Frozen options are - in the new installed header file pnglibconf.h (John Bowler) - Removed the xcode project because it has not been updated to work - with libpng-1.5.0. - Removed the ability to include optional pngusr.h - -Version 1.5.0beta18 [April 17, 2010] - Restored the ability to include optional pngusr.h - Moved replacements for png_error() and png_warning() from the - contrib/pngminim project to pngerror.c, for use when warnings or - errors are disabled via PNG_NO_WARN or PNG_NO_ERROR_TEXT, to avoid - storing unneeded error/warning text. - Updated contrib/pngminim project to work with the new pnglibconf.h - Added some PNG_NO_* defines to contrib/pngminim/*/pngusr.h to save space. - -Version 1.5.0beta19 [April 24, 2010] - Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the functions - to read and write ints to be disabled independently of PNG_USE_READ_MACROS, - which allows libpng to be built with the functions even though the default - is to use the macros - this allows applications to choose at app build - time whether or not to use macros (previously impossible because the - functions weren't in the default build.) - Changed Windows calling convention back to __cdecl for API functions. - For Windows/x86 platforms only: - __stdcall is no longer needed for Visual Basic, so libpng-1.5.0 uses - __cdecl throughout (both API functions and callbacks) on Windows/x86 - platforms. - Replaced visualc6 and visualc71 projects with new vstudio project - Relaxed the overly-restrictive permissions of some files. - -Version 1.5.0beta20 [April 24, 2010] - Relaxed more overly-restrictive permissions of some files. - -Version 1.5.0beta21 [April 27, 2010] - Removed some unwanted binary bytes and changed CRLF to NEWLINE in the new - vstudio project files, and some trivial editing of some files in the - scripts directory. - Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in - contrib/pngminim/decoder/pngusr.h to make a smaller decoder application. - -Version 1.5.0beta22 [April 28, 2010] - Fixed dependencies of GET_INT_32 - it does not require READ_INT_FUNCTIONS - because it has a macro equivalent. - Improved the options.awk script; added an "everything off" option. - Revised contrib/pngminim to use the "everything off" option in pngusr.dfa. - -Version 1.5.0beta23 [April 29, 2010] - Corrected PNG_REMOVED macro to take five arguments. - The macro was documented with two arguments (name,ordinal), however - the symbol checking .dfn files assumed five arguments. The five - argument form seems more useful so it is changed to that. - Corrected PNG_UNKNOWN_CHUNKS_SUPPORTED to PNG_HANDLE_AS_UNKNOWN_SUPPORTED - in gregbook/readpng2.c - Corrected protection of png_get_user_transform_ptr. The API declaration in - png.h is removed if both READ and WRITE USER_TRANSFORM are turned off - but was left defined in pngtrans.c - Added logunsupported=1 to cause pnglibconf.h to document disabled options. - This makes the installed pnglibconf.h more readable but causes no - other change. The intention is that users of libpng will find it - easier to understand if an API they need is missing. - Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined. - Removed dummy_inflate.c from contrib/pngminim/encoder - Removed contrib/pngminim/*/gather.sh; gathering is now done in the makefile. - -Version 1.5.0beta24 [May 7, 2010] - Use bitwise "&" instead of arithmetic mod in pngrutil.c calculation of the - offset of the png_ptr->rowbuf pointer into png_ptr->big_row_buf. - Added more blank lines for readability. - -Version 1.5.0beta25 [June 18, 2010] - In pngpread.c: png_push_have_row() add check for new_row > height - Removed the now-redundant check for out-of-bounds new_row from example.c - -Version 1.5.0beta26 [June 18, 2010] - In pngpread.c: png_push_process_row() add check for too many rows. - -Version 1.5.0beta27 [June 18, 2010] - Removed the check added in beta25 as it is now redundant. - -Version 1.5.0beta28 [June 20, 2010] - Rewrote png_process_IDAT_data to consistently treat extra data as warnings - and handle end conditions more cleanly. - Removed the new (beta26) check in png_push_process_row(). - -Version 1.5.0beta29 [June 21, 2010] - Revised scripts/options.awk to work on Sunos (but still doesn't work) - Added comment to options.awk and contrib/pngminim/*/makefile to try nawk. - -Version 1.5.0beta30 [June 22, 2010] - Stop memory leak when reading a malformed sCAL chunk. - -Version 1.5.0beta31 [June 26, 2010] - Revised pngpread.c patch of beta28 to avoid an endless loop. - Removed some trailing blanks. - -Version 1.5.0beta32 [June 26, 2010] - Removed leftover scripts/options.patch and scripts/options.rej - -Version 1.5.0beta33 [July 6, 3010] - Made FIXED and FLOATING options consistent in the APIs they enable and - disable. Corrected scripts/options.awk to handle both command line - options and options specified in the .dfa files. - Changed char *msg to PNG_CONST char *msg in pngrutil.c - Make png_set_sRGB_gAMA_and_cHRM set values using either the fixed or - floating point APIs, but not both. - Reversed patch to remove error handler when the jmp_buf is stored in the - main program structure, not the png_struct. - The error handler is needed because the default handler in libpng will - always use the jmp_buf in the library control structure; this is never - set. The gregbook code is a useful example because, even though it - uses setjmp/longjmp, it shows how error handling can be implemented - using control mechanisms not directly supported by libpng. The - technique will work correctly with mechanisms such as Microsoft - Structure Exceptions or C++ exceptions (compiler willing - note that gcc - does not by default support interworking of C and C++ error handling.) - Reverted changes to call png_longjmp in contrib/gregbook where it is not - appropriate. If mainprog->jmpbuf is used by setjmp, then png_longjmp - cannot be used. - Changed "extern PNG_EXPORT" to "PNG_EXPORT" in png.h (Jan Nijtmans) - Changed "extern" to "PNG_EXTERN" in pngpriv.h (except for the 'extern "C" {') - -Version 1.5.0beta34 [July 12, 2010] - Put #ifndef PNG_EXTERN, #endif around the define PNG_EXTERN in pngpriv.h - -Version 1.5.0beta35 [July 24, 2010] - Removed some newly-added TAB characters. - Added -DNO_PNG_SNPRINTF to CFLAGS in scripts/makefile.dj2 - Moved the definition of png_snprintf() outside of the enclosing - #ifdef blocks in pngconf.h - -Version 1.5.0beta36 [July 29, 2010] - Patches by John Bowler: - Fixed point APIs are now supported throughout (no missing APIs). - Internal fixed point arithmetic support exists for all internal floating - point operations. - sCAL validates the floating point strings it is passed. - Safe, albeit rudimentary, Watcom support is provided by PNG_API_RULE==2 - Two new APIs exist to get the number of passes without turning on the - PNG_INTERLACE transform and to get the number of rows in the current - pass. - A new test program, pngvalid.c, validates the gamma code. - Errors in the 16-bit gamma correction (overflows) have been corrected. - cHRM chunk testing is done consistently (previously the floating point - API bypassed it, because the test really didn't work on FP, now the test - is performed on the actual values to be stored in the PNG file so it - works in the FP case too.) - Most floating point APIs now simply call the fixed point APIs after - converting the values to the fixed point form used in the PNG file. - The standard headers no longer include zlib.h, which is currently only - required for pngstruct.h and can therefore be internal. - Revised png_get_int_32 to undo the PNG two's complement representation of - negative numbers. - -Version 1.5.0beta37 [July 30, 2010] - Added a typecast in png_get_int_32() in png.h and pngrutil.h to avoid - a compiler warning. - Replaced oFFs 0,0 with oFFs -10,20 in pngtest.png - -Version 1.5.0beta38 [July 31, 2010] - Implemented remaining "_fixed" functions. - Corrected a number of recently introduced warnings mostly resulting from - safe but uncast assignments to shorter integers. Also added a zlib - VStudio release library project because the latest zlib Official Windows - build does not include such a thing. - Revised png_get_int_16() to be similar to png_get_int_32(). - Restored projects/visualc71. - -Version 1.5.0beta39 [August 2, 2010] - VisualC/GCC warning fixes, VisualC build fixes - The changes include support for function attributes in VC in addition to - those already present in GCC - necessary because without these some - warnings are unavoidable. Fixes include signed/unsigned fixes in - pngvalid and checks with gcc -Wall -Wextra -Wunused. - VC requires function attributes on function definitions as well as - declarations, PNG_FUNCTION has been added to enable this and the - relevant function definitions changed. - -Version 1.5.0beta40 [August 6, 2010] - Correct use of _WINDOWS_ in pngconf.h - Removed png_mem_ #defines; they are no longer used. - Added the sRGB chunk to pngtest.png - -Version 1.5.0beta41 [August 11, 2010] - Added the cHRM chunk to pngtest.png - Don't try to use version-script with cygwin/mingw. - Revised contrib/gregbook to work under cygwin/mingw. - -Version 1.5.0beta42 [August 18, 2010] - Add .dll.a to the list of extensions to be symlinked by Makefile.am (Yaakov) - Made all API functions that have const arguments and constant string - literal pointers declare them (John Bowler). - -Version 1.5.0beta43 [August 20, 2010] - Removed spurious tabs, shorten long lines (no source change) - Also added scripts/chkfmt to validate the format of all the files that can - reasonably be validated (it is suggested to run "make distclean" before - checking, because some machine generated files have long lines.) - Reformatted the CHANGES file to be more consistent throughout. - Made changes to address various issues identified by GCC, mostly - signed/unsigned and shortening problems on assignment but also a few - difficult to optimize (for GCC) loops. - Fixed non-GCC fixed point builds. In png.c a declaration was misplaced - in an earlier update. Fixed to declare the auto variables at the head. - Use cexcept.h in pngvalid.c. - -Version 1.5.0beta44 [August 24, 2010] - Updated CMakeLists.txt to use CMAKE_INSTALL_LIBDIR variable; useful for - installing libpng in /usr/lib64 (Funda Wang). - Revised CMakeLists.txt to put the man pages in share/man/man* not man/man* - Revised CMakeLists.txt to make symlinks instead of copies when installing. - Changed PNG_LIB_NAME from pngNN to libpngNN in CMakeLists.txt (Philip Lowman) - Implemented memory checks within pngvalid - Reformatted/rearranged pngvalid.c to assist use of progressive reader. - Check interlaced images in pngvalid - Clarified pngusr.h comments in pnglibconf.dfa - Simplified the pngvalid error-handling code now that cexcept.h is in place. - Implemented progressive reader in pngvalid.c for standard tests - Implemented progressive read in pngvalid.c gamma tests - Turn on progressive reader in pngvalid.c by default and tidy code. - -Version 1.5.0beta45 [August 26, 2010] - Added an explicit make step to projects/vstudio for pnglibconf.h - Also corrected zlib.vcxproj into which Visual Studio had introduced - what it calls an "authoring error". The change to make pnglibconf.h - simply copies the file; in the future it may actually generate the - file from scripts/pnglibconf.dfa as the other build systems do. - Changed pngvalid to work when floating point APIs are disabled - Renamed the prebuilt scripts/pnglibconf.h to scripts/pnglibconf.h.prebuilt - Supply default values for PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX - in pngpriv.h in case the user neglected to define them in their pngusr.h - -Version 1.5.0beta46 [August 28, 2010] - Added new private header files to libpng_sources in CMakeLists.txt - Added PNG_READ_16BIT, PNG_WRITE_16BIT, and PNG_16BIT options. - Added reference to scripts/pnglibconf.h.prebuilt in the visualc71 project. - -Version 1.5.0beta47 [September 11, 2010] - Fixed a number of problems with 64-bit compilation reported by Visual - Studio 2010 (John Bowler). - -Version 1.5.0beta48 [October 4, 2010] - Updated CMakeLists.txt (Philip Lowman). - Revised autogen.sh to recognize and use $AUTOCONF, $AUTOMAKE, $AUTOHEADER, - $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE - Fixed problem with symbols creation in Makefile.am which was assuming that - all versions of ccp write to standard output by default (Martin Banky). The - bug was introduced in libpng-1.2.9beta5. - Removed unused mkinstalldirs. - -Version 1.5.0beta49 [October 8, 2010] - Undid Makefile.am revision of 1.5.0beta48. - -Version 1.5.0beta50 [October 14, 2010] - Revised Makefile.in to account for mkinstalldirs being removed. - Added some "(unsigned long)" typecasts in printf statements in pngvalid.c. - Suppressed a compiler warning in png_handle_sPLT(). - Check for out-of-range text compression mode in png_set_text(). - -Version 1.5.0beta51 [October 15, 2010] - Changed embedded dates to "(PENDING RELEASE) in beta releases (and future - rc releases) to minimize the difference between releases. - -Version 1.5.0beta52 [October 16, 2010] - Restored some of the embedded dates (in png.h, png.c, documentation, etc.) - -Version 1.5.0beta53 [October 18, 2010] - Updated INSTALL to mention using "make maintainer-clean" and to remove - obsolete statement about a custom ltmain.sh - Disabled "color-tests" by default in Makefile.am so it will work with - automake versions earlier than 1.11.1 - Use document name "libpng-manual.txt" instead of "libpng-.txt" - to simplify version differences. - Removed obsolete remarks about setjmp handling from INSTALL. - Revised and renamed the typedef in png.h and png.c that was designed - to catch library and header mismatch. - -Version 1.5.0beta54 [November 10, 2010] - Require 48 bytes, not 64 bytes, for big_row_buf in overflow checks. - Used a consistent structure for the pngget.c functions. - -Version 1.5.0beta55 [November 21, 2010] - Revised png_get_uint_32, png_get_int_32, png_get_uint_16 (Cosmin) - Moved reading of file signature into png_read_sig (Cosmin) - Fixed atomicity of chunk header serialization (Cosmin) - Added test for io_state in pngtest.c (Cosmin) - Added "#!/bin/sh" at the top of contrib/pngminim/*/gather.sh scripts. - Changes to remove gcc warnings (John Bowler) - Certain optional gcc warning flags resulted in warnings in libpng code. - With these changes only -Wconversion and -Wcast-qual cannot be turned on. - Changes are trivial rearrangements of code. -Wconversion is not possible - for pngrutil.c (because of the widespread use of += et al on variables - smaller than (int) or (unsigned int)) and -Wcast-qual is not possible - with pngwio.c and pngwutil.c because the 'write' callback and zlib - compression both fail to declare their input buffers with 'const'. - -Version 1.5.0beta56 [December 7, 2010] - Added the private PNG_UNUSED() macro definition in pngpriv.h. - Added some commentary about PNG_EXPORT in png.h and pngconf.h - Revised PNG_EXPORT() macro and added PNG_EXPORTA() macro, with the - objective of simplifying and improving the cosmetic appearance of png.h. - Fixed some incorrect "=" macro names in pnglibconf.dfa - Included documentation of changes in 1.5.0 from 1.4.x in libpng-manual.txt - -Version 1.5.0beta57 [December 9, 2010] - Documented the pngvalid gamma error summary with additional comments and - print statements. - Improved missing symbol handling in checksym.awk; symbols missing in both - the old and new files can now be optionally ignored, treated as errors - or warnings. - Removed references to pngvcrd.c and pnggccrd.c from the vstudio project. - Updated "libpng14" to "libpng15" in the visualc71 project. - Enabled the strip16 tests in pngvalid.` - Don't display test results (except PASS/FAIL) when running "make test". - Instead put them in pngtest-log.txt - Added "--with-zprefix=" to configure.ac - Updated the prebuilt configuration files to autoconf version 2.68 - -Version 1.5.0beta58 [December 19, 2010] - Fixed interlace image handling and add test cases (John Bowler) - Fixed the clean rule in Makefile.am to remove pngtest-log.txt - Made minor changes to work around warnings in gcc 3.4 - -Version 1.5.0rc01 [December 27, 2010] - No changes. - -Version 1.5.0rc02 [December 27, 2010] - Eliminated references to the scripts/*.def files in project/visualc71. - -Version 1.5.0rc03 [December 28, 2010] - Eliminated scripts/*.def and revised Makefile.am accordingly - -Version 1.5.0rc04 [December 29, 2010] - Fixed bug in background transformation handling in pngrtran.c (it was - looking for the flag in png_ptr->transformations instead of in - png_ptr->flags) (David Raymond). - -Version 1.5.0rc05 [December 31, 2010] - Fixed typo in a comment in CMakeLists.txt (libpng14 => libpng15) (Cosmin) - -Version 1.5.0rc06 [January 4, 2011] - Changed the new configure option "zprefix=string" to "zlib-prefix=string" - -Version 1.5.0rc07 [January 4, 2011] - Updated copyright year. - -Version 1.5.0 [January 6, 2011] - No changes. - -version 1.5.1beta01 [January 8, 2011] - Added description of png_set_crc_action() to the manual. - Added a note in the manual that the type of the iCCP profile was changed - from png_charpp to png_bytepp in png_get_iCCP(). This change happened - in version 1.5.0beta36 but is not noted in the CHANGES. Similarly, - it was changed from png_charpp to png_const_bytepp in png_set_iCCP(). - Ensure that png_rgb_to_gray ignores palette mapped images, if libpng - internally happens to call it with one, and fixed a failure to handle - palette mapped images correctly. This fixes CVE-2690. - -Version 1.5.1beta02 [January 14, 2011] - Fixed a bug in handling of interlaced images (bero at arklinux.org). - Updated CMakeLists.txt (Clifford Yapp) - -Version 1.5.1beta03 [January 14, 2011] - Fixed typecasting of some png_debug() statements (Cosmin) - -Version 1.5.1beta04 [January 16, 2011] - Updated documentation of png_set|get_tRNS() (Thomas Klausner). - Mentioned in the documentation that applications must #include "zlib.h" - if they need access to anything in zlib.h, and that a number of - macros such as png_memset() are no longer accessible by applications. - Corrected pngvalid gamma test "sample" function to access all of the color - samples of each pixel, instead of sampling the red channel three times. - Prefixed variable names index, div, exp, gamma with "png_" to avoid "shadow" - warnings, and (mistakenly) changed png_exp() to exp(). - -Version 1.5.1beta05 [January 16, 2011] - Changed variable names png_index, png_div, png_exp, and png_gamma to - char_index, divisor, exp_b10, and gamma_val, respectively, and - changed exp() back to png_exp(). - -Version 1.5.1beta06 [January 20, 2011] - Prevent png_push_crc_skip() from hanging while reading an unknown chunk - or an over-large compressed zTXt chunk with the progressive reader. - Eliminated more GCC "shadow" warnings. - Revised png_fixed() in png.c to avoid compiler warning about reaching the - end without returning anything. - -Version 1.5.1beta07 [January 22, 2011] - In the manual, describe the png_get_IHDR() arguments in the correct order. - Added const_png_structp and const_png_infop types, and used them in - prototypes for most png_get_*() functions. - -Version 1.5.1beta08 [January 23, 2011] - Added png_get_io_chunk_type() and deprecated png_get_io_chunk_name() - Added synopses for the IO_STATE functions and other missing synopses - to the manual. Removed the synopses from libpngpf.3 because they - were out of date and no longer useful. Better information can be - obtained by reading the prototypes and comments in pngpriv.h - Attempted to fix cpp on Solaris with S. Studio 12 cc, fix build - Added a make macro DFNCPP that is a CPP that will accept the tokens in - a .dfn file and adds configure stuff to test for such a CPP. ./configure - should fail if one is not available. - Corrected const_png_ in png.h to png_const_ to avoid polluting the namespace. - Added png_get_current_row_number and png_get_current_pass_number for the - benefit of the user transform callback. - Added png_process_data_pause and png_process_data_skip for the benefit of - progressive readers that need to stop data processing or want to optimize - skipping of unread data (e.g., if the reader marks a chunk to be skipped.) - -Version 1.5.1beta09 [January 24, 2011] - Enhanced pngvalid, corrected an error in gray_to_rgb, corrected doc error. - pngvalid contains tests of transforms, which tests are currently disabled - because they are incompletely tested. gray_to_rgb was failing to expand - the bit depth for smaller bit depth images; this seems to be a long - standing error and resulted, apparently, in invalid output - (CVE-2011-0408, CERT VU#643140). The documentation did not accurately - describe what libpng really does when converting RGB to gray. - -Version 1.5.1beta10 [January 27, 2010] - Fixed incorrect examples of callback prototypes in the manual, that were - introduced in libpng-1.0.0. - In addition the order of the png_get_uint macros with respect to the - relevant function definitions has been reversed. This helps the - preprocessing of the symbol files be more robust. Furthermore, the - symbol file preprocessing now uses -DPNG_NO_USE_READ_MACROS even when - the library may actually be built with PNG_USE_READ_MACROS; this stops - the read macros interfering with the symbol file format. - Made the manual, synopses, and function prototypes use the function - argument names file_gamma, int_file_gamma, and srgb_intent consistently. - -Version 1.5.1beta11 [January 28, 2011] - Changed PNG_UNUSED from "param=param;" to "{if(param){}}". - Corrected local variable type in new API png_process_data_skip() - The type was self-evidently incorrect but only causes problems on 64-bit - architectures. - Added transform tests to pngvalid and simplified the arguments. - -Version 1.5.1rc01 [January 29, 2011] - No changes. - -Version 1.5.1rc02 [January 31, 2011] - Added a request in the manual that applications do not use "png_" or - "PNG_" to begin any of their own symbols. - Changed PNG_UNUSED to "(void)param;" and updated the commentary in pngpriv.h - -Version 1.5.1 [February 3, 2011] - No changes. - -Version 1.5.2beta01 [February 13, 2011] - More -Wshadow fixes for older gcc compilers. Older gcc versions apparently - check formal parameters names in function declarations (as well as - definitions) to see if they match a name in the global namespace. - Revised PNG_EXPORTA macro to not use an empty parameter, to accommodate the - old VisualC++ preprocessor. - Turned on interlace handling in png_read_png(). - Fixed gcc pedantic warnings. - Handle longjmp in Cygwin. - Fixed png_get_current_row_number() in the interlaced case. - Cleaned up ALPHA flags and transformations. - Implemented expansion to 16 bits. - -Version 1.5.2beta02 [February 19, 2011] - Fixed mistake in the descriptions of user read_transform and write_transform - function prototypes in the manual. The row_info struct is png_row_infop. - Reverted png_get_current_row_number() to previous (1.5.2beta01) behavior. - Corrected png_get_current_row_number documentation - Fixed the read/write row callback documentation. - This documents the current behavior, where the callback is called after - every row with information pertaining to the next row. - -Version 1.5.2beta03 [March 3, 2011] - Fixed scripts/makefile.vcwin32 - Updated contrib/pngsuite/README to add the word "modify". - Define PNG_ALLOCATED to blank when _MSC_VER<1300. - -Version 1.5.2rc01 [March 19, 2011] - Define remaining attributes to blank when MSC_VER<1300. - ifdef out mask arrays in pngread.c when interlacing is not supported. - -Version 1.5.2rc02 [March 22, 2011] - Added a hint to try CPP=/bin/cpp if "cpp -E" fails in scripts/pnglibconf.mak - and in contrib/pngminim/*/makefile, eg., on SunOS 5.10, and removed "strip" - from the makefiles. - Fixed a bug (present since libpng-1.0.7) that makes png_handle_sPLT() fail - to compile when PNG_NO_POINTER_INDEXING is defined (Chubanov Kirill) - -Version 1.5.2rc03 [March 24, 2011] - Don't include standard header files in png.h while building the symbol table, - to avoid cpp failure on SunOS (introduced PNG_BUILDING_SYMBOL_TABLE macro). - -Version 1.5.2 [March 31, 2011] - No changes. - -Version 1.5.3beta01 [April 1, 2011] - Re-initialize the zlib compressor before compressing non-IDAT chunks. - Added API functions (png_set_text_compression_level() and four others) to - set parameters for zlib compression of non-IDAT chunks. - -Version 1.5.3beta02 [April 3, 2011] - Updated scripts/symbols.def with new API functions. - Only compile the new zlib re-initializing code when text or iCCP is - supported, using PNG_WRITE_COMPRESSED_TEXT_SUPPORTED macro. - Improved the optimization of the zlib CMF byte (see libpng-1.2.6beta03). - Optimize the zlib CMF byte in non-IDAT compressed chunks - -Version 1.5.3beta03 [April 16, 2011] - Fixed gcc -ansi -pedantic compile. A strict ANSI system does not have - snprintf, and the "__STRICT_ANSI__" detects that condition more reliably - than __STDC__ (John Bowler). - Removed the PNG_PTR_NORETURN attribute because it too dangerous. It tells - the compiler that a user supplied callback (the error handler) does not - return, yet there is no guarantee in practice that the application code - will correctly implement the error handler because the compiler only - issues a warning if there is a mistake (John Bowler). - Removed the no-longer-used PNG_DEPSTRUCT macro. - Updated the zlib version to 1.2.5 in the VStudio project. - Fixed 64-bit builds where png_uint_32 is smaller than png_size_t in - pngwutil.c (John Bowler). - Fixed bug with stripping the filler or alpha channel when writing, that - was introduced in libpng-1.5.2beta01 (bug report by Andrew Church). - -Version 1.5.3beta04 [April 27, 2011] - Updated pngtest.png with the new zlib CMF optimization. - Cleaned up conditional compilation code and of background/gamma handling - Internal changes only except a new option to avoid compiling the - png_build_grayscale_palette API (which is not used at all internally.) - The main change is to move the transform tests (READ_TRANSFORMS, - WRITE_TRANSFORMS) up one level to the caller of the APIs. This avoids - calls to spurious functions if all transforms are disabled and slightly - simplifies those functions. Pngvalid modified to handle this. - A minor change is to stop the strip_16 and expand_16 interfaces from - disabling each other; this allows the future alpha premultiplication - code to use 16-bit intermediate values while still producing 8-bit output. - png_do_background and png_do_gamma have been simplified to take a single - pointer to the png_struct rather than pointers to every item required - from the png_struct. This makes no practical difference to the internal - code. - A serious bug in the pngvalid internal routine 'standard_display_init' has - been fixed - this failed to initialize the red channel and accidentally - initialized the alpha channel twice. - Changed png_struct jmp_buf member name from png_jmpbuf to tmp_jmpbuf to - avoid a possible clash with the png_jmpbuf macro on some platforms. - -Version 1.5.3beta05 [May 6, 2011] - Added the "_POSIX_SOURCE" feature test macro to ensure libpng sees the - correct API. _POSIX_SOURCE is defined in pngpriv.h, pngtest.c and - pngvalid.c to ensure that POSIX conformant systems disable non-POSIX APIs. - Removed png_snprintf and added formatted warning messages. This change adds - internal APIs to allow png_warning messages to have parameters without - requiring the host OS to implement snprintf. As a side effect the - dependency of the tIME-supporting RFC1132 code on stdio is removed and - PNG_NO_WARNINGS does actually work now. - Pass "" instead of '\0' to png_default_error() in png_err(). This mistake - was introduced in libpng-1.2.20beta01. This fixes CVE-2011-2691. - Added PNG_WRITE_OPTIMIZE_CMF_SUPPORTED macro to make the zlib "CMF" byte - optimization configurable. - IDAT compression failed if preceded by a compressed text chunk (bug - introduced in libpng-1.5.3beta01-02). This was because the attempt to - reset the zlib stream in png_write_IDAT happened after the first IDAT - chunk had been deflated - much too late. In this change internal - functions were added to claim/release the z_stream and, hopefully, make - the code more robust. Also deflateEnd checking is added - previously - libpng would ignore an error at the end of the stream. - -Version 1.5.3beta06 [May 8, 2011] - Removed the -D_ALL_SOURCE from definitions for AIX in CMakeLists.txt - Implemented premultiplied alpha support: png_set_alpha_mode API - -Version 1.5.3beta07 [May 11, 2011] - Added expand_16 support to the high level interface. - Added named value and 'flag' gamma support to png_set_gamma. Made a minor - change from the previous (unreleased) ABI/API to hide the exact value used - for Macs - it's not a good idea to embed this in the ABI! - Moved macro definitions for PNG_HAVE_IHDR, PNG_HAVE_PLTE, and PNG_AFTER_IDAT - from pngpriv.h to png.h because they must be visible to applications - that call png_set_unknown_chunks(). - Check for up->location !PNG_AFTER_IDAT when writing unknown chunks - before IDAT. - -Version 1.5.3beta08 [May 16, 2011] - Improved "pngvalid --speed" to exclude more of pngvalid from the time. - Documented png_set_alpha_mode(), other changes in libpng.3/libpng-manual.txt - The cHRM chunk now sets the defaults for png_set_rgb_to_gray() (when negative - parameters are supplied by the caller), while in the absence of cHRM - sRGB/Rec 709 values are still used. This introduced a divide-by-zero - bug in png_handle_cHRM(). - The bKGD chunk no longer overwrites the background value set by - png_set_background(), allowing the latter to be used before the file - header is read. It never performed any useful function to override - the default anyway. - Added memory overwrite and palette image checks to pngvalid.c - Previously palette image code was poorly checked. Since the transformation - code has a special palette path in most cases this was a severe weakness. - Minor cleanup and some extra checking in pngrutil.c and pngrtran.c. When - expanding an indexed image, always expand to RGBA if transparency is - present. - -Version 1.5.3beta09 [May 17, 2011] - Reversed earlier 1.5.3 change of transformation order; move png_expand_16 - back where it was. The change doesn't work because it requires 16-bit - gamma tables when the code only generates 8-bit ones. This fails - silently; the libpng code just doesn't do any gamma correction. Moving - the tests back leaves the old, inaccurate, 8-bit gamma calculations, but - these are clearly better than none! - -Version 1.5.3beta10 [May 20, 2011] - - png_set_background() and png_expand_16() did not work together correctly. - This problem is present in 1.5.2; if png_set_background is called with - need_expand false and the matching 16 bit color libpng erroneously just - treats it as an 8-bit color because of where png_do_expand_16 is in the - transform list. This simple fix reduces the supplied colour to 8-bits, - so it gets smashed, but this is better than the current behavior. - Added tests for expand16, more fixes for palette image tests to pngvalid. - Corrects the code for palette image tests and disables attempts to - validate palette colors. - -Version 1.5.3rc01 [June 3, 2011] - No changes. - -Version 1.5.3rc02 [June 8, 2011] - Fixed uninitialized memory read in png_format_buffer() (Bug report by - Frank Busse, CVE-2011-2501, related to CVE-2004-0421). - -Version 1.5.3beta11 [June 11, 2011] - Fixed png_handle_sCAL which is broken in 1.5. This fixes CVE 2011-2692. - Added sCAL to pngtest.png - Revised documentation about png_set_user_limits() to say that it also affects - png writing. - Revised handling of png_set_user_limits() so that it can increase the - limit beyond the PNG_USER_WIDTH|HEIGHT_MAX; previously it could only - reduce it. - Make the 16-to-8 scaling accurate. Dividing by 256 with no rounding is - wrong (high by one) 25% of the time. Dividing by 257 with rounding is - wrong in 128 out of 65536 cases. Getting the right answer all the time - without division is easy. - Added "_SUPPORTED" to the PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION macro. - Added projects/owatcom, an IDE project for OpenWatcom to replace - scripts/makefile.watcom. This project works with OpenWatcom 1.9. The - IDE autogenerates appropriate makefiles (libpng.mk) for batch processing. - The project is configurable, unlike the Visual Studio project, so long - as the developer has an awk. - Changed png_set_gAMA to limit the gamma value range so that the inverse - of the stored value cannot overflow the fixed point representation, - and changed other things OpenWatcom warns about. - Revised pngvalid.c to test PNG_ALPHA_MODE_SUPPORTED correctly. This allows - pngvalid to build when ALPHA_MODE is not supported, which is required if - it is to build on libpng 1.4. - Removed string/memory macros that are no longer used and are not - necessarily fully supportable, particularly png_strncpy and png_snprintf. - Added log option to pngvalid.c and attempted to improve gamma messages. - -Version 1.5.3 [omitted] - People found the presence of a beta release following an rc release - to be confusing; therefore we bump the version to libpng-1.5.4beta01 - and there will be no libpng-1.5.3 release. - -Version 1.5.4beta01 [June 14, 2011] - Made it possible to undefine PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED - to get the same (inaccurate) output as libpng-1.5.2 and earlier. - Moved definitions of PNG_HAVE_IHDR, PNG_AFTER_IDAT, and PNG_HAVE_PLTE - outside of an unknown-chunk block in png.h because they are also - needed for other uses. - -Version 1.5.4beta02 [June 14, 2011] - Fixed and clarified LEGACY 16-to-8 scaling code. - Added png_set_chop_16() API, to match inaccurate results from previous - libpng versions. - Removed the ACCURATE and LEGACY options (they are no longer useable) - Use the old scaling method for background if png_set_chop_16() was - called. - Made png_set_chop_16() API removeable by disabling PNG_CHOP_16_TO_8_SUPPORTED - -Version 1.5.4beta03 [June 15, 2011] - Fixed a problem in png_do_expand_palette() exposed by optimization in - 1.5.3beta06 - Also removed a spurious and confusing "trans" member ("trans") from png_info. - The palette expand optimization prevented expansion to an intermediate RGBA - form if tRNS was present but alpha was marked to be stripped; this exposed - a check for tRNS in png_do_expand_palette() which is inconsistent with the - code elsewhere in libpng. - Correction to the expand_16 code; removed extra instance of - png_set_scale_16_to_8 from pngpriv.h - -Version 1.5.4beta04 [June 16, 2011] - Added a missing "#ifdef PNG_READ_BACKGROUND_SUPPORTED/#endif" in pngrtran.c - Added PNG_TRANSFORM_CHOP_16 to the high-level read transforms. - Made PNG_READ_16_TO_8_ACCURATE_SCALE configurable again. If this is - not enabled, png_set_strip_16() and png_do_scale_16_to_8() aren't built. - Revised contrib/visupng, gregbook, and pngminim to demonstrate chop_16_to_8 - -Version 1.5.4beta05 [June 16, 2011] - Renamed png_set_strip_16() to png_set_scale_16() and renamed - png_set_chop_16() to png_set_strip(16) in an attempt to minimize the - behavior changes between libpng14 and libpng15. - -Version 1.5.4beta06 [June 18, 2011] - Fixed new bug that was causing both strip_16 and scale_16 to be applied. - -Version 1.5.4beta07 [June 19, 2011] - Fixed pngvalid, simplified macros, added checking for 0 in sCAL. - The ACCURATE scale macro is no longer defined in 1.5 - call the - png_scale_16_to_8 API. Made sure that PNG_READ_16_TO_8 is still defined - if the png_strip_16_to_8 API is present. png_check_fp_number now - maintains some state so that positive, negative and zero values are - identified. sCAL uses these to be strictly spec conformant. - -Version 1.5.4beta08 [June 23, 2011] - Fixed pngvalid if ACCURATE_SCALE is defined. - Updated scripts/pnglibconf.h.prebuilt. - -Version 1.5.4rc01 [June 30, 2011] - Define PNG_ALLOCATED to "restrict" only if MSC_VER >= 1400. - -Version 1.5.4 [July 7, 2011] - No changes. - -Version 1.5.5beta01 [July 13, 2011] - Fixed some typos and made other minor changes in the manual. - Updated contrib/pngminus/makefile.std (Samuli Souminen) - -Version 1.5.5beta02 [July 14, 2011] - Revised Makefile.am and Makefile.in to look in the right directory for - pnglibconf.h.prebuilt - -Version 1.5.5beta03 [July 27, 2011] - Enabled compilation with g++ compiler. This compiler does not recognize - the file extension, so it always compiles with C++ rules. Made minor - changes to pngrutil.c to cast results where C++ expects it but C does not. - Minor editing of libpng.3 and libpng-manual.txt. - -Version 1.5.5beta04 [July 29, 2011] - Revised CMakeLists.txt (Clifford Yapp) - Updated commentary about the png_rgb_to_gray() default coefficients - in the manual and in pngrtran.c - -Version 1.5.5beta05 [August 17, 2011] - Prevent unexpected API exports from non-libpng DLLs on Windows. The "_DLL" - is removed from the test of whether a DLL is being built (this erroneously - caused the libpng APIs to be marked as DLL exports in static builds under - Microsoft Visual Studio). Almost all of the libpng building configuration - is moved from pngconf.h to pngpriv.h, but PNG_DLL_EXPORT remains in - pngconf.h, though, so that it is colocated with the import definition (it - is no longer used anywhere in the installed headers). The VStudio project - definitions have been cleaned up: "_USRDLL" has been removed from the - static library builds (this was incorrect), and PNG_USE_DLL has been added - to pngvalid to test the functionality (pngtest does not supply it, - deliberately). The spurious "_EXPORTS" has been removed from the - libpng build (all these errors were a result of copy/paste between project - configurations.) - Added new types and internal functions for CIE RGB end point handling to - pngpriv.h (functions yet to be implemented). - -Version 1.5.5beta06 [August 26, 2011] - Ensure the CMAKE_LIBRARY_OUTPUT_DIRECTORY is set in CMakeLists.txt - (Clifford Yap) - Fixes to rgb_to_gray and cHRM XYZ APIs (John Bowler): - The rgb_to_gray code had errors when combined with gamma correction. - Some pixels were treated as true grey when they weren't and such pixels - and true grey ones were not gamma corrected (the original value of the - red component was used instead). APIs to get and set cHRM using color - space end points have been added and the rgb_to_gray code that defaults - based on cHRM, and the divide-by-zero bug in png_handle_cHRM (CERT - VU#477046, CVE-2011-3328, introduced in 1.5.4) have been corrected. - A considerable number of tests has been added to pngvalid for the - rgb_to_gray transform. - Arithmetic errors in rgb_to_gray whereby the calculated gray value was - truncated to the bit depth rather than rounded have been fixed except in - the 8-bit non-gamma-corrected case (where consistency seems more important - than correctness.) The code still has considerable inaccuracies in the - 8-bit case because 8-bit linear arithmetic is used. - -Version 1.5.5beta07 [September 7, 2011] - Added "$(ARCH)" option to makefile.darwin - Added SunOS support to configure.ac and Makefile.am - Changed png_chunk_benign_error() to png_warning() in png.c, in - png_XYZ_from_xy_checked(). - -Version 1.5.5beta08 [September 10, 2011] - Fixed 64-bit compilation errors (gcc). The errors fixed relate - to conditions where types that are 32 bits in the GCC 32-bit - world (uLong and png_size_t) become 64 bits in the 64-bit - world. This produces potential truncation errors which the - compiler correctly flags. - Relocated new HAVE_SOLARIS_LD definition in configure.ac - Constant changes for 64-bit compatibility (removal of L suffixes). The - 16-bit cases still use "L" as we don't have a 16-bit test system. - -Version 1.5.5rc01 [September 15, 2011] - Removed "L" suffixes in pngpriv.h - -Version 1.5.5 [September 22, 2011] - No changes. - -Version 1.5.6beta01 [September 22, 2011] - Fixed some 64-bit type conversion warnings in pngrtran.c - Moved row_info from png_struct to a local variable. - The various interlace mask arrays have been made into arrays of - bytes and made PNG_CONST and static (previously some arrays were - marked PNG_CONST and some weren't). - Additional checks have been added to the transform code to validate the - pixel depths after the transforms on both read and write. - Removed some redundant code from pngwrite.c, in png_destroy_write_struct(). - Changed chunk reading/writing code to use png_uint_32 instead of png_byte[4]. - This removes the need to allocate temporary strings for chunk names on - the stack in the read/write code. Unknown chunk handling still uses the - string form because this is exposed in the API. - -Version 1.5.6beta02 [September 26, 2011] - Added a note in the manual the png_read_update_info() must be called only - once with a particular info_ptr. - Fixed a typo in the definition of the new PNG_STRING_FROM_CHUNK(s,c) macro. - -Version 1.5.6beta03 [September 28, 2011] - Revised test-pngtest.sh to report FAIL when pngtest fails. - Added "--strict" option to pngtest, to report FAIL when the failure is - only because the resulting valid files are different. - Revised CMakeLists.txt to work with mingw and removed some material from - CMakeLists.txt that is no longer useful in libpng-1.5. - -Version 1.5.6beta04 [October 5, 2011] - Fixed typo in Makefile.in and Makefile.am ("-M Wl" should be "-M -Wl")." - -Version 1.5.6beta05 [October 12, 2011] - Speed up png_combine_row() for interlaced images. This reduces the generality - of the code, allowing it to be optimized for Adam7 interlace. The masks - passed to png_combine_row() are now generated internally, avoiding - some code duplication and localizing the interlace handling somewhat. - Align png_struct::row_buf - previously it was always unaligned, caused by - a bug in the code that attempted to align it; the code needs to subtract - one from the pointer to take account of the filter byte prepended to - each row. - Optimized png_combine_row() when rows are aligned. This gains a small - percentage for 16-bit and 32-bit pixels in the typical case where the - output row buffers are appropriately aligned. The optimization was not - previously possible because the png_struct buffer was always misaligned. - Fixed bug in png_write_chunk_header() debug print, introduced in 1.5.6beta01. - -Version 1.5.6beta06 [October 17, 2011] - Removed two redundant tests for uninitialized row. - Fixed a relatively harmless memory overwrite in compressed text writing - with a 1 byte zlib buffer. - Add ability to call png_read_update_info multiple times to pngvalid.c. - Fixes for multiple calls to png_read_update_info. These fixes attend to - most of the errors revealed in pngvalid, however doing the gamma work - twice results in inaccuracies that can't be easily fixed. There is now - a warning in the code if this is going to happen. - Turned on multiple png_read_update_info in pngvalid transform tests. - Prevent libpng from overwriting unused bits at the end of the image when - it is not byte aligned, while reading. Prior to libpng-1.5.6 libpng would - overwrite the partial byte at the end of each row if the row width was not - an exact multiple of 8 bits and the image is not interlaced. - -Version 1.5.6beta07 [October 21, 2011] - Made png_ptr->prev_row an aligned pointer into png_ptr->big_prev_row - (Mans Rullgard). - -Version 1.5.6rc01 [October 26, 2011] - Changed misleading "Missing PLTE before cHRM" warning to "Out of place cHRM" - -Version 1.5.6rc02 [October 27, 2011] - Added LSR() macro to defend against buggy compilers that evaluate non-taken - code branches and complain about out-of-range shifts. - -Version 1.5.6rc03 [October 28, 2011] - Renamed the LSR() macro to PNG_LSR() and added PNG_LSL() macro. - Fixed compiler warnings with Intel and MSYS compilers. The logical shift - fix for Microsoft Visual C is required by other compilers, so this - enables that fix for all compilers when using compile-time constants. - Under MSYS 'byte' is a name declared in a system header file, so we - changed the name of a local variable to avoid the warnings that result. - Added #define PNG_ALIGN_TYPE PNG_ALIGN_NONE to contrib/pngminim/*/pngusr.h - -Version 1.5.6 [November 3, 2011] - No changes. - -Version 1.5.7beta01 [November 4, 2011] - Added support for ARM processor, when decoding all PNG up-filtered rows - and any other-filtered rows with 3 or 4 bytes per pixel (Mans Rullgard). - Fixed bug in pngvalid on early allocation failure; fixed type cast in - pngmem.c; pngvalid would attempt to call png_error() if the allocation - of a png_struct or png_info failed. This would probably have led to a - crash. The pngmem.c implementation of png_malloc() included a cast - to png_size_t which would fail on large allocations on 16-bit systems. - Fix for the preprocessor of the Intel C compiler. The preprocessor - splits adjacent @ signs with a space; this changes the concatenation - token from @-@-@ to PNG_JOIN; that should work with all compiler - preprocessors. - Paeth filter speed improvements from work by Siarhei Siamashka. This - changes the 'Paeth' reconstruction function to improve the GCC code - generation on x86. The changes are only part of the suggested ones; - just the changes that definitely improve speed and remain simple. - The changes also slightly increase the clarity of the code. - -Version 1.5.7beta02 [November 11, 2011] - Check compression_type parameter in png_get_iCCP and remove spurious - casts. The compression_type parameter is always assigned to, so must - be non-NULL. The cast of the profile length potentially truncated the - value unnecessarily on a 16-bit int system, so the cast of the (byte) - compression type to (int) is specified by ANSI-C anyway. - Fixed FP division by zero in pngvalid.c; the 'test_pixel' code left - the sBIT fields in the test pixel as 0, which resulted in a floating - point division by zero which was irrelevant but causes systems where - FP exceptions cause a crash. Added code to pngvalid to turn on FP - exceptions if the appropriate glibc support is there to ensure this is - tested in the future. - Updated scripts/pnglibconf.mak and scripts/makefile.std to handle the - new PNG_JOIN macro. - Added versioning to pnglibconf.h comments. - Simplified read/write API initial version; basic read/write tested on - a variety of images, limited documentation (in the header file.) - Installed more accurate linear to sRGB conversion tables. The slightly - modified tables reduce the number of 16-bit values that - convert to an off-by-one 8-bit value. The "makesRGB.c" code that was used - to generate the tables is now in a contrib/sRGBtables sub-directory. - -Version 1.5.7beta03 [November 17, 2011] - Removed PNG_CONST from the sRGB table declarations in pngpriv.h and png.c - Added run-time detection of NEON support. - Added contrib/libtests; includes simplified API test and timing test and - a color conversion utility for rapid checking of failed 'pngstest' results. - Multiple transform bug fixes plus a work-round for double gamma correction. - libpng does not support more than one transform that requires linear data - at once - if this is tried typically the results is double gamma - correction. Since the simplified APIs can need rgb to gray combined with - a compose operation it is necessary to do one of these outside the main - libpng transform code. This check-in also contains fixes to various bugs - in the simplified APIs themselves and to some bugs in compose and rgb to - gray (on palette) itself. - Fixes for C++ compilation using g++ When libpng source is compiled - using g++. The compiler imposes C++ rules on the C source; thus it - is desirable to make the source work with either C or C++ rules - without throwing away useful error information. This change adds - png_voidcast to allow C semantic (void*) cases or the corresponding - C++ static_cast operation, as appropriate. - Added --noexecstack to assembler file compilation. GCC does not set - this on assembler compilation, even though it does on C compilation. - This creates security issues if assembler code is enabled; the - work-around is to set it by default in the flags for $(CCAS) - Work around compilers that don't support declaration of const data. Some - compilers fault 'extern const' data declarations (because the data is - not initialized); this turns on const-ness only for compilers where - this is known to work. - -Version 1.5.7beta04 [November 17, 2011] - Since the gcc driver does not recognize the --noexecstack flag, we must - use the -Wa prefix to have it passed through to the assembler. - Also removed a duplicate setting of this flag. - Added files that were omitted from the libpng-1.5.7beta03 zip distribution. - -Version 1.5.7beta05 [November 25, 2011] - Removed "zTXt" from warning in generic chunk decompression function. - Validate time settings passed to png_set_tIME() and png_convert_to_rfc1123() - (Frank Busse). Note: This prevented CVE-2015-7981 from affecting - libpng-1.5.7 and later. - Added MINGW support to CMakeLists.txt - Reject invalid compression flag or method when reading the iTXt chunk. - Backed out 'simplified' API changes. The API seems too complex and there - is a lack of consensus or enthusiasm for the proposals. The API also - reveals significant bugs inside libpng (double gamma correction and the - known bug of being unable to retrieve a corrected palette). It seems - better to wait until the bugs, at least, are corrected. - Moved pngvalid.c into contrib/libtests - Rebuilt Makefile.in, configure, etc., with autoconf-2.68 - -Version 1.5.7rc01 [December 1, 2011] - Replaced an "#if" with "#ifdef" in pngrtran.c - Revised #if PNG_DO_BC block in png.c (use #ifdef and add #else) - -Version 1.5.7rc02 [December 5, 2011] - Revised project files and contrib/pngvalid/pngvalid.c to account for - the relocation of pngvalid into contrib/libtests. - Revised pngconf.h to use " __declspec(restrict)" only when MSC_VER >= 1400, - as in libpng-1.5.4. - Put CRLF line endings in the owatcom project files. - -Version 1.5.7rc03 [December 7, 2011] - Updated CMakeLists.txt to account for the relocation of pngvalid.c - -Version 1.5.7 [December 15, 2011] - Minor fixes to pngvalid.c for gcc 4.6.2 compatibility to remove warnings - reported by earlier versions. - Fixed minor memset/sizeof errors in pngvalid.c. - -Version 1.6.0beta01 [December 15, 2011] - Removed machine-generated configure files from the GIT repository (they will - continue to appear in the tarball distributions and in the libpng15 and - earlier GIT branches). - Restored the new 'simplified' API, which was started in libpng-1.5.7beta02 - but later deleted from libpng-1.5.7beta05. - Added example programs for the new 'simplified' API. - Added ANSI-C (C90) headers and require them, and take advantage of the - change. Also fixed some of the projects/* and contrib/* files that needed - updates for libpng16 and the move of pngvalid.c. - With this change the required ANSI-C header files are assumed to exist: the - implementation must provide float.h, limits.h, stdarg.h and stddef.h and - libpng relies on limits.h and stddef.h existing and behaving as defined - (the other two required headers aren't used). Non-ANSI systems that don't - have stddef.h or limits.h will have to provide an appropriate fake - containing the relevant types and #defines. - Dropped support for 16-bit platforms. The use of FAR/far has been eliminated - and the definition of png_alloc_size_t is now controlled by a flag so - that 'small size_t' systems can select it if necessary. Libpng 1.6 may - not currently work on such systems -- it seems likely that it will - ask 'malloc' for more than 65535 bytes with any image that has a - sufficiently large row size (rather than simply failing to read such - images). - New tools directory containing tools used to generate libpng code. - Fixed race conditions in parallel make builds. With higher degrees of - parallelism during 'make' the use of the same temporary file names such - as 'dfn*' can result in a race where a temporary file from one arm of the - build is deleted or overwritten in another arm. This changes the - temporary files for suffix rules to always use $* and ensures that the - non-suffix rules use unique file names. - -Version 1.6.0beta02 [December 21, 2011] - Correct configure builds where build and source directories are separate. - The include path of 'config.h' was erroneously made relative in pngvalid.c - in libpng 1.5.7. - -Version 1.6.0beta03 [December 22, 2011] - Start-up code size improvements, error handler flexibility. These changes - alter how the tricky allocation of the initial png_struct and png_info - structures are handled. png_info is now handled in pretty much the same - way as everything else, except that the allocations handle NULL return - silently. png_struct is changed in a similar way on allocation and on - deallocation a 'safety' error handler is put in place (which should never - be required). The error handler itself is changed to permit mismatches - in the application and libpng error buffer size; however, this means a - silent change to the API to return the jmp_buf if the size doesn't match - the size from the libpng compilation; libpng now allocates the memory and - this may fail. Overall these changes result in slight code size - reductions; however, this is a reduction in code that is always executed - so is particularly valuable. Overall on a 64-bit system the libpng DLL - decreases in code size by 1733 bytes. pngerror.o increases in size by - about 465 bytes because of the new functionality. - Added png_convert_to_rfc1123_buffer() and deprecated png_convert_to_rfc1123() - to avoid including a spurious buffer in the png_struct. - -Version 1.6.0beta04 [December 30, 2011] - Regenerated configure scripts with automake-1.11.2 - Eliminated png_info_destroy(). It is now used only in png.c and only calls - one other internal function and memset(). - Enabled png_get_sCAL_fixed() if floating point APIs are enabled. Previously - it was disabled whenever internal fixed point arithmetic was selected, - which meant it didn't exist even on systems where FP was available but not - preferred. - Added pngvalid.c compile time checks for const APIs. - Implemented 'restrict' for png_info and png_struct. Because of the way - libpng works both png_info and png_struct are always accessed via a - single pointer. This means adding C99 'restrict' to the pointer gives - the compiler some opportunity to optimize the code. This change allows - that. - Moved AC_MSG_CHECKING([if libraries can be versioned]) later to the proper - location in configure.ac (Gilles Espinasse). - Changed png_memcpy to C assignment where appropriate. Changed all those - uses of png_memcpy that were doing a simple assignment to assignments - (all those cases where the thing being copied is a non-array C L-value). - Added some error checking to png_set_*() routines. - Removed the reference to the non-exported function png_memcpy() from - example.c. - Fixed the Visual C 64-bit build - it requires jmp_buf to be aligned, but - it had become misaligned. - Revised contrib/pngminus/pnm2png.c to avoid warnings when png_uint_32 - and unsigned long are of different sizes. - -Version 1.6.0beta05 [January 15, 2012] - Updated manual with description of the simplified API (copied from png.h) - Fix bug in pngerror.c: some long warnings were being improperly truncated - (CVE-2011-3464, bug introduced in libpng-1.5.3beta05). - -Version 1.6.0beta06 [January 24, 2012] - Added palette support to the simplified APIs. This commit - changes some of the macro definitions in png.h, app code - may need corresponding changes. - Increased the formatted warning buffer to 192 bytes. - Added color-map support to simplified API. This is an initial version for - review; the documentation has not yet been updated. - Fixed Min/GW uninstall to remove libpng.dll.a - -Version 1.6.0beta07 [January 28, 2012] - Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived) - compiler issues slightly different warnings from those issued by the - current vesions of GCC. This eliminates those warnings by - adding/removing casts and small code rewrites. - Updated configure.ac from autoupdate: added --enable-werror option. - Also some layout regularization and removal of introduced tab characters - (replaced with 3-character indentation). Obsolete macros identified by - autoupdate have been removed; the replacements are all in 2.59 so - the pre-req hasn't been changed. --enable-werror checks for support - for -Werror (or the given argument) in the compiler. This mimics the - gcc configure option by allowing -Werror to be turned on safely; without - the option the tests written in configure itself fail compilation because - they cause compiler warnings. - Rewrote autogen.sh to run autoreconf instead of running tools one-by-one. - Conditionalize the install rules for MINGW and CYGWIN in CMakeLists.txt and - set CMAKE_LIBRARY_OUTPUT_DIRECTORY to "lib" on all platforms (C. Yapp). - Freeze libtool files in the 'scripts' directory. This version of autogen.sh - attempts to dissuade people from running it when it is not, or should not, - be necessary. In fact, autogen.sh does not work when run in a libpng - directory extracted from a tar distribution anymore. You must run it in - a GIT clone instead. - Added two images to contrib/pngsuite (1-bit and 2-bit transparent grayscale), - and renamed three whose names were inconsistent with those in - pngsuite/README.txt. - -Version 1.6.0beta08 [February 1, 2012] - Fixed Image::colormap misalignment in pngstest.c - Check libtool/libtoolize version number (2.4.2) in configure.ac - Divide test-pngstest.sh into separate pngstest runs for basic and - transparent images. - Moved automake options to AM_INIT_AUTOMAKE in configure.ac - Added color-tests, silent-rules (Not yet implemented in Makefile.am) and - version checking to configure.ac - Improved pngstest speed by not doing redundant tests and add const to - the background parameter of png_image_finish_read. The --background - option is now done automagically only when required, so that commandline - option no longer exists. - Cleaned up pngpriv.h to consistently declare all functions and data. - Also eliminated PNG_CONST_DATA, which is apparently not needed but we - can't be sure until it is gone. - Added symbol prefixing that allows all the libpng external symbols - to be prefixed (suggested by Reuben Hawkins). - Updated "ftbb*.png" list in the owatcom and vstudio projects. - Fixed 'prefix' builds on clean systems. The generation of pngprefix.h - should not require itself. - Updated INSTALL to explain that autogen.sh must be run in a GIT clone, - not in a libpng directory extracted from a tar distribution. - -Version 1.6.0beta09 [February 1, 2012] - Reverted the prebuilt configure files to libpng-1.6.0beta05 condition. - -Version 1.6.0beta10 [February 3, 2012] - Added Z_SOLO for zlib-1.2.6+ and correct pngstest tests - Updated list of test images in CMakeLists.txt - Updated the prebuilt configure files to current condition. - Revised INSTALL information about autogen.sh; it works in tar distributions. - -Version 1.6.0beta11 [February 16, 2012] - Fix character count in pngstest command in projects/owatcom/pngstest.tgt - Revised test-pngstest.sh to report PASS/FAIL for each image. - Updated documentation about the simplified API. - Corrected estimate of error in libpng png_set_rgb_to_gray API. The API is - extremely inaccurate for sRGB conversions because it uses an 8-bit - intermediate linear value and it does not use the sRGB transform, so it - suffers from the known instability in gamma transforms for values close - to 0 (see Poynton). The net result is that the calculation has a maximum - error of 14.99/255; 0.5/255^(1/2.2). pngstest now uses 15 for the - permitted 8-bit error. This may still not be enough because of arithmetic - error. - Removed some unused arrays (with #ifdef) from png_read_push_finish_row(). - Fixed a memory overwrite bug in simplified read of RGB PNG with - non-linear gamma Also bugs in the error checking in pngread.c and changed - quite a lot of the checks in pngstest.c to be correct; either correctly - written or not over-optimistic. The pngstest changes are insufficient to - allow all possible RGB transforms to be passed; pngstest cmppixel needs - to be rewritten to make it clearer which errors it allows and then changed - to permit known inaccuracies. - Removed tests for no-longer-used *_EMPTY_PLTE_SUPPORTED from pngstruct.h - Fixed fixed/float API export conditionals. 1) If FIXED_POINT or - FLOATING_POINT options were switched off, png.h ended up with lone ';' - characters. This is not valid ANSI-C outside a function. The ';' - characters have been moved inside the definition of PNG_FP_EXPORT and - PNG_FIXED_EXPORT. 2) If either option was switched off, the declaration - of the corresponding functions were completely omitted, even though some - of them are still used internally. The result is still valid, but - produces warnings from gcc with some warning options (including -Wall). The - fix is to cause png.h to declare the functions with PNG_INTERNAL_FUNCTION - when png.h is included from pngpriv.h. - Check for invalid palette index while reading paletted PNG. When one is - found, issue a warning and increase png_ptr->num_palette accordingly. - Apps are responsible for checking to see if that happened. - -Version 1.6.0beta12 [February 18, 2012] - Do not increase num_palette on invalid_index. - Relocated check for invalid palette index to pngrtran.c, after unpacking - the sub-8-bit pixels. - Fixed CVE-2011-3026 buffer overrun bug. This bug was introduced when - iCCP chunk support was added at libpng-1.0.6. Deal more correctly with the - test on iCCP chunk length. Also removed spurious casts that may hide - problems on 16-bit systems. - -Version 1.6.0beta13 [February 24, 2012] - Eliminated redundant png_push_read_tEXt|zTXt|iTXt|unknown code from - pngpread.c and use the sequential png_handle_tEXt, etc., in pngrutil.c; - now that png_ptr->buffer is inaccessible to applications, the special - handling is no longer useful. - Added PNG_SAFE_LIMITS feature to pnglibconf.dfa, pngpriv.h, and new - pngusr.dfa to reset the user limits to safe ones if PNG_SAFE_LIMITS is - defined. To enable, use "CPPFLAGS=-DPNG_SAFE_LIMITS_SUPPORTED=1" on the - configure command or put #define PNG_SAFE_LIMITS_SUPPORTED in - pnglibconf.h.prebuilt and pnglibconf.h. - -Version 1.6.0beta14 [February 27, 2012] - Added information about the new limits in the manual. - Updated Makefile.in - -Version 1.6.0beta15 [March 2, 2012] - Removed unused "current_text" members of png_struct and the png_free() - of png_ptr->current_text from pngread.c - Rewrote pngstest.c for substantial speed improvement. - Fixed transparent pixel and 16-bit rgb tests in pngstest and removed a - spurious check in pngwrite.c - Added PNG_IMAGE_FLAG_FAST for the benefit of applications that store - intermediate files, or intermediate in-memory data, while processing - image data with the simplified API. The option makes the files larger - but faster to write and read. pngstest now uses this by default; this - can be disabled with the --slow option. - Improved pngstest fine tuning of error numbers, new test file generator. - The generator generates images that test the full range of sample values, - allow the error numbers in pngstest to be tuned and checked. makepng - also allows generation of images with extra chunks, although this is - still work-in-progress. - Added check for invalid palette index while reading. - Fixed some bugs in ICC profile writing. The code should now accept - all potentially valid ICC profiles and reject obviously invalid ones. - It now uses png_error() to do so rather than casually writing a PNG - without the necessary color data. - Removed whitespace from the end of lines in all source files and scripts. - -Version 1.6.0beta16 [March 6, 2012] - Relocated palette-index checking function from pngrutil.c to pngtrans.c - Added palette-index checking while writing. - Changed png_inflate() and calling routines to avoid overflow problems. - This is an intermediate check-in that solves the immediate problems and - introduces one performance improvement (avoiding a copy via png_ptr->zbuf.) - Further changes will be made to make ICC profile handling more secure. - Fixed build warnings (MSVC, GCC, GCC v3). Cygwin GCC with default options - declares 'index' as a global, causing a warning if it is used as a local - variable. GCC 64-bit warns about assigning a (size_t) (unsigned 64-bit) - to an (int) (signed 32-bit). MSVC, however, warns about using the - unary '-' operator on an unsigned value (even though it is well defined - by ANSI-C to be ~x+1). The padding calculation was changed to use a - different method. Removed the tests on png_ptr->pass. - Added contrib/libtests/tarith.c to test internal arithmetic functions from - png.c. This is a libpng maintainer program used to validate changes to the - internal arithmetic functions. - Made read 'inflate' handling like write 'deflate' handling. The read - code now claims and releases png_ptr->zstream, like the write code. - The bug whereby the progressive reader failed to release the zstream - is now fixed, all initialization is delayed, and the code checks for - changed parameters on deflate rather than always calling - deflatedEnd/deflateInit. - Validate the zTXt strings in pngvalid. - Added code to validate the windowBits value passed to deflateInit2(). - If the call to deflateInit2() is wrong a png_warning will be issued - (in fact this is harmless, but the PNG data produced may be sub-optimal). - -Version 1.6.0beta17 [March 10, 2012] - Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition. - Reject all iCCP chunks after the first, even if the first one is invalid. - Deflate/inflate was reworked to move common zlib calls into single - functions [rw]util.c. A new shared keyword check routine was also added - and the 'zbuf' is no longer allocated on progressive read. It is now - possible to call png_inflate() incrementally. A warning is no longer - issued if the language tag or translated keyword in the iTXt chunk - has zero length. - If benign errors are disabled use maximum window on ancillary inflate. - This works round a bug introduced in 1.5.4 where compressed ancillary - chunks could end up with a too-small windowBits value in the deflate - header. - -Version 1.6.0beta18 [March 16, 2012] - Issue a png_benign_error() instead of png_warning() about bad palette index. - In pngtest, treat benign errors as errors if "-strict" is present. - Fixed an off-by-one error in the palette index checking function. - Fixed a compiler warning under Cygwin (Windows-7, 32-bit system) - Revised example.c to put text strings in a temporary character array - instead of directly assigning string constants to png_textp members. - This avoids compiler warnings when -Wwrite-strings is enabled. - Added output flushing to aid debugging under Visual Studio. Unfortunately - this is necessary because the VS2010 output window otherwise simply loses - the error messages on error (they weren't flushed to the window before - the process exited, apparently!) - Added configuration support for benign errors and changed the read - default. Also changed some warnings in the iCCP and sRGB handling - from to benign errors. Configuration now makes read benign - errors warnings and write benign errors to errors by default (thus - changing the behavior on read). The simplified API always forces - read benign errors to warnings (regardless of the system default, unless - this is disabled in which case the simplified API can't be built.) - -Version 1.6.0beta19 [March 18, 2012] - Work around for duplicate row start calls; added warning messages. - This turns on PNG_FLAG_DETECT_UNINITIALIZED to detect app code that - fails to call one of the 'start' routines (not enabled in libpng-1.5 - because it is technically an API change, since it did normally work - before.) It also makes duplicate calls to png_read_start_row (an - internal function called at the start of the image read) benign, as - they were before changes to use png_inflate_claim. Somehow webkit is - causing this to happen; this is probably a mis-feature in the zlib - changes so this commit is only a work-round. - Removed erroneous setting of DETECT_UNINITIALIZED and added more - checks. The code now does a png_error if an attempt is made to do the - row initialization twice; this is an application error and it has - serious consequences because the transform data in png_struct is - changed by each call. - Added application error reporting and added chunk names to read - benign errors; also added --strict to pngstest - not enabled - yet because a warning is produced. - Avoid the double gamma correction warning in the simplified API. - This allows the --strict option to pass in the pngstest checks - -Version 1.6.0beta20 [March 29, 2012] - Changed chunk handler warnings into benign errors, incrementally load iCCP - Added checksum-icc.c to contrib/tools - Prevent PNG_EXPAND+PNG_SHIFT doing the shift twice. - Recognize known sRGB ICC profiles while reading; prefer writing the - iCCP profile over writing the sRGB chunk, controlled by the - PNG_sRGB_PROFILE_CHECKS option. - Revised png_set_text_2() to avoid potential memory corruption (fixes - CVE-2011-3048, also known as CVE-2012-3425). - -Version 1.6.0beta21 [April 27, 2012] - Revised scripts/makefile.darwin: use system zlib; remove quotes around - architecture list; add missing ppc architecture; add architecture options - to shared library link; don't try to create a shared lib based on missing - RELEASE variable. - Enable png_set_check_for_invalid_index() for both read and write. - Removed #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED in pngpriv.h around - declaration of png_handle_unknown(). - Added -lssp_nonshared in a comment in scripts/makefile.freebsd - and changed deprecated NOOBJ and NOPROFILE to NO_OBJ and NO_PROFILE. - -Version 1.6.0beta22 [May 23, 2012] - Removed need for -Wno-cast-align with clang. clang correctly warns on - alignment increasing pointer casts when -Wcast-align is passed. This - fixes the cases that clang warns about either by eliminating the - casts from png_bytep to png_uint_16p (pngread.c), or, for pngrutil.c - where the cast is previously verified or pngstest.c where it is OK, by - introducing new png_aligncast macros to do the cast in a way that clang - accepts. - -Version 1.6.0beta23 [June 6, 2012] - Revised CMakeLists.txt to not attempt to make a symlink under mingw. - Made fixes for new optimization warnings from gcc 4.7.0. The compiler - performs an optimization which is safe; however it then warns about it. - Changing the type of 'palette_number' in pngvalid.c removes the warning. - Do not depend upon a GCC feature macro being available for use in generating - the linker mapfile symbol prefix. - Improved performance of new do_check_palette_indexes() function (only - update the value when it actually increases, move test for whether - the check is wanted out of the function. - -Version 1.6.0beta24 [June 7, 2012] - Don't check palette indexes if num_palette is 0 (as it can be in MNG files). - -Version 1.6.0beta25 [June 16, 2012] - Revised png_set_keep_unknown_chunks() so num_chunks < 0 means ignore all - unknown chunks and all known chunks except for IHDR, PLTE, tRNS, IDAT, - and IEND. Previously it only meant ignore all unknown chunks, the - same as num_chunks == 0. Revised png_image_skip_unused_chunks() to - provide a list of chunks to be processed instead of a list of chunks to - ignore. Revised contrib/gregbook/readpng2.c accordingly. - -Version 1.6.0beta26 [July 10, 2012] - Removed scripts/makefile.cegcc from the *.zip and *.7z distributions; it - depends on configure, which is not included in those archives. - Moved scripts/chkfmt to contrib/tools. - Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386. - -Version 1.6.0beta27 [August 11, 2012] - Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE when __GNUC__ < 3. - Do not use __restrict when GNUC is <= 3.1 - Removed references to png_zalloc() and png_zfree() from the manual. - Fixed configurations where floating point is completely disabled. Because - of the changes to support symbol prefixing PNG_INTERNAL_FUNCTION declares - floating point APIs during libpng builds even if they are completely - disabled. This requires the png floating point types (png_double*) to be - declared even though the functions are never actually defined. This - change provides a dummy definition so that the declarations work, yet any - implementation will fail to compile because of an incomplete type. - Re-eliminated the use of strcpy() in pngtest.c. An unnecessary use of - strcpy() was accidentally re-introduced in libpng16; this change replaces - it with strncpy(). - Eliminated use of png_sizeof(); use sizeof() instead. - Use a consistent style for (sizeof type) and (sizeof (array)) - Cleanup of png_set_filler(). This function does very different things on - read and write. In libpng 1.6 the two cases can be distinguished and - considerable code cleanup, and extra error checking, is possible. This - makes calls on the write side that have no effect be ignored with a - png_app_error(), which can be disabled in the app using - png_set_benign_errors(), and removes the spurious use of usr_channels - on the read side. - Insist on autotools 1.12.1 for git builds because there are security issues - with 1.12 and insisting on anything less would allow 1.12 to be used. - Removed info_ptr->signature[8] from WRITE-only builds. - Add some conditions for compiling png_fixed(). This is a small function - but it requires "-lm" on some platforms. - Cause pngtest --strict to fail on any warning from libpng (not just errors) - and cause it not to fail at the comparison step if libpng lacks support - for writing chunks that it reads from the input (currently only implemented - for compressed text chunks). - Make all three "make check" test programs work without READ or WRITE support. - Now "make check" will succeed even if libpng is compiled with -DPNG_NO_READ - or -DPNG_NO_WRITE. The tests performed are reduced, but the basic reading - and writing of a PNG file is always tested by one or more of the tests. - Consistently use strlen(), memset(), memcpy(), and memcmp() instead of the - png_strlen(), png_memset(), png_memcpy(), and png_memcmp() macros. - Removed the png_sizeof(), png_strlen(), png_memset(), png_memcpy(), and - png_memcmp() macros. - Work around gcc 3.x and Microsoft Visual Studio 2010 complaints. Both object - to the split initialization of num_chunks. - -Version 1.6.0beta28 [August 29, 2012] - Unknown handling fixes and clean up. This adds more correct option - control of the unknown handling, corrects the pre-existing bug where - the per-chunk 'keep' setting is ignored and makes it possible to skip - IDAT chunks in the sequential reader (broken in earlier 1.6 versions). - There is a new test program, test-unknown.c, which is a work in progress - (not currently part of the test suite). Comments in the header files now - explain how the unknown handling works. - Allow fine grain control of unknown chunk APIs. This change allows - png_set_keep_unknown_chunks() to be turned off if not required and causes - both read and write to behave appropriately (on read this is only possible - if the user callback is used to handle unknown chunks). The change - also removes the support for storing unknown chunks in the info_struct - if the only unknown handling enabled is via the callback, allowing libpng - to be configured with callback reading and none of the unnecessary code. - Corrected fix for unknown handling in pngtest. This reinstates the - libpng handling of unknown chunks other than vpAg and sTER (including - unsafe-to-copy chunks which were dropped before) and eliminates the - repositioning of vpAg and sTER in pngtest.png by changing pngtest.png - (so the chunks are where libpng would put them). - Added "tunknown" test and corrected a logic error in png_handle_unknown() - when SAVE support is absent. Moved the shell test scripts for - contrib/libtests from the libpng top directory to contrib/libtests. - png_handle_unknown() must always read or skip the chunk, if - SAVE_UNKNOWN_CHUNKS is turned off *and* the application does not set - a user callback an unknown chunk will not be read, leading to a read - error, which was revealed by the "tunknown" test. - Cleaned up and corrected ICC profile handling. - contrib/libtests/makepng: corrected 'rgb' and 'gray' cases. profile_error - messages could be truncated; made a correct buffer size calculation and - adjusted pngerror.c appropriately. png_icc_check_* checking improved; - changed the functions to receive the correct color type of the PNG on read - or write and check that it matches the color space of the profile (despite - what the comments said before, there is danger in assuming the app will - cope correctly with an RGB profile on a grayscale image and, since it - violates the PNG spec, allowing it is certain to produce inconsistent - app behavior and might even cause app crashes.) Check that profiles - contain the tags needed to process the PNG (tags all required by the ICC - spec). Removed unused PNG_STATIC from pngpriv.h. - -Version 1.6.0beta29 [September 4, 2012] - Fixed the simplified API example programs to add the *colormap parameter - to several of he API and improved the error message if the version field - is not set. - Added contrib/examples/* to the *.zip and *.7z distributions. - Updated simplified API synopses and description of the png_image structure - in the manual. - Made makepng and pngtest produce identical PNGs, add "--relaxed" option - to pngtest. The "--relaxed" option turns off the benign errors that are - enabled by default in pre-RC builds. makepng can now write ICC profiles - where the length has not been extended to a multiple of 4, and pngtest - now intercepts all libpng errors, allowing the previously-introduced - "--strict test" on no warnings to actually work. - Improved ICC profile handling including cHRM chunk generation and fixed - Cygwin+MSVC build errors. The ICC profile handling now includes more - checking. Several errors that caused rejection of the profile are now - handled with a warning in such a way that the invalid profiles will be - read by default in release (but not pre-RC) builds but will not be - written by default. The easy part of handling the cHRM chunk is written, - where the ICC profile contains the required data. The more difficult - part plus guessing a gAMA value requires code to pass selected RGB values - through the profile. - -Version 1.6.0beta30 [October 24, 2012] - Changed ICC profile matrix/vector types to not depend on array type rules. - By the ANSI-C standard the new types should be identical to the previous - versions, and all known versions of gcc tested with the previous versions - except for GCC-4.2.1 work with this version. The change makes the ANSI-C - rule that const applied to an array of elements applies instead to the - elements in the array moot by explicitly applying const to the base - elements of the png_icc_matrix and png_icc_vector types. The accidental - (harmless) 'const' previously applied to the parameters of two of the - functions have also been removed. - Added a work around for GCC 4.2 optimization bug. - Marked the broken (bad white point) original HP sRGB profiles correctly and - correct comments. - Added -DZ_SOLO to contrib/pngminim/*/makefile to work with zlib-1.2.7 - Use /MDd for vstudio debug builds. Also added pngunkown to the vstudio - builds, fixed build errors and corrected a minor exit code error in - pngvalid if the 'touch' file name is invalid. - Add updated WARNING file to projects/vstudio from libpng 1.5/vstudio - Fixed build when using #define PNG_NO_READ_GAMMA in png_do_compose() in - pngrtran.c (Domani Hannes). - -Version 1.6.0beta31 [November 1, 2012] - Undid the erroneous change to vstudio/pngvalid build in libpng-1.6.0beta30. - Made pngvalid so that it will build outside the libpng source tree. - Made builds -DPNG_NO_READ_GAMMA compile (the unit tests still fail). - Made PNG_NO_READ_GAMMA switch off interfaces that depend on READ_GAMMA. - Prior to 1.6.0 switching off READ_GAMMA did unpredictable things to the - interfaces that use it (specifically, png_do_background in 1.4 would - simply display composite for grayscale images but do composition - with the incorrect arithmetic for color ones). In 1.6 the semantic - of -DPNG_NO_READ_GAMMA is changed to simply disable any interface that - depends on it; this obliges people who set it to consider whether they - really want it off if they happen to use any of the interfaces in - question (typically most users who disable it won't). - Fixed GUIDs in projects/vstudio. Some were duplicated or missing, - resulting in VS2010 having to update the files. - Removed non-working ICC profile support code that was mostly added to - libpng-1.6.0beta29 and beta30. There was too much code for too little - gain; implementing full ICC color correction may be desirable but is left - up to applications. - -Version 1.6.0beta32 [November 25, 2012] - Fixed an intermittent SEGV in pngstest due to an uninitialized array element. - Added the ability for contrib/libtests/makepng.c to make a PNG with just one - color. This is useful for debugging pngstest color inaccuracy reports. - Fixed error checking in the simplified write API (Olaf van der Spek) - Made png_user_version_check() ok to use with libpng version 1.10.x and later. - -Version 1.6.0beta33 [December 15, 2012] - Fixed typo in png.c (PNG_SET_CHUNK_MALLOC_MAX should be PNG_CHUNK_MALLOC_MAX) - that causes the MALLOC_MAX limit not to work (John Bowler) - Change png_warning() to png_app_error() in pngwrite.c and comment the - fall-through condition. - Change png_warning() to png_app_warning() in png_write_tRNS(). - Rearranged the ARM-NEON optimizations: Isolated the machine specific code - to the hardware subdirectory and added comments to pngrutil.c so that - implementors of other optimizations know what to do. - Fixed cases of unquoted DESTDIR in Makefile.am - Rebuilt Makefile.in, etc., with autoconf-2.69 and automake-1.12.5. - -Version 1.6.0beta34 [December 19, 2012] - Cleaned up whitespace in the synopsis portion of the manpage "libpng.3" - Disassembled the version number in scripts/options.awk (necessary for - building on SunOs). - -Version 1.6.0beta35 [December 23, 2012] - Made default Zlib compression settings be configurable. This adds #defines to - pnglibconf.h to control the defaults. - Fixed Windows build issues, enabled ARM compilation. Various warnings issued - by earlier versions of GCC fixed for Cygwin and Min/GW (which both use old - GCCs.) ARM support is enabled by default in zlib.props (unsupported by - Microsoft) and ARM compilation is made possible by deleting the check for - x86. The test programs cannot be run because they are not signed. - -Version 1.6.0beta36 [January 2, 2013] - Discontinued distributing libpng-1.x.x.tar.bz2. - Discontinued distributing libpng-1.7.0-1.6.0-diff.txt and similar. - Rebuilt configure with autoconf-2.69 (inadvertently not done in beta33) - Fixed 'make distcheck' on SUN OS - libpng.so was not being removed - -Version 1.6.0beta37 [January 10, 2013] - Fixed conceivable but difficult to repro overflow. Also added two test - programs to generate and test a PNG which should have the problem. - -Version 1.6.0beta39 [January 19, 2013] - Again corrected attempt at overflow detection in png_set_unknown_chunks() - (CVE-2013-7353). Added overflow detection in png_set_sPLT() and - png_set_text_2() (CVE-2013-7354). - -Version 1.6.0beta40 [January 20, 2013] - Use consistent handling of overflows in text, sPLT and unknown png_set_* APIs - -Version 1.6.0rc01 [January 26, 2013] - No changes. - -Version 1.6.0rc02 [February 4, 2013] - Added png_get_palette_max() function. - -Version 1.6.0rc03 [February 5, 2013] - Fixed the png_get_palette_max API. - -Version 1.6.0rc04 [February 7, 2013] - Turn serial tests back on (recently turned off by autotools upgrade). - -Version 1.6.0rc05 [February 8, 2013] - Update manual about png_get_palette_max(). - -Version 1.6.0rc06 [February 9, 2013] - Fixed missing dependency in --prefix builds The intermediate - internal 'prefix.h' file can only be generated correctly after - pnglibconf.h, however the dependency was not in Makefile.am. The - symptoms are unpredictable depending on the order make chooses to - build pngprefix.h and pnglibconf.h, often the error goes unnoticed - because there is a system pnglibconf.h to use instead. - -Version 1.6.0rc07 [February 10, 2013] - Enclosed the new png_get_palette_max in #ifdef PNG_GET_PALETTE_MAX_SUPPORTED - block, and revised pnglibconf.h and pnglibconf.h.prebuilt accordingly. - -Version 1.6.0rc08 [February 10, 2013] - Fix typo in png.h #ifdef - -Version 1.6.0 [February 14, 2013] - No changes. - -Version 1.6.1beta01 [February 16, 2013] - Made symbol prefixing work with the ARM neon optimizations. Also allow - pngpriv.h to be included for preprocessor definitions only, so it can - be used in non-C/C++ files. Back ported from libpng 1.7. - Made sRGB check numbers consistent. - Ported libpng 1.5 options.awk/dfn file handling to 1.6, fixed one bug. - Removed cc -E workround, corrected png_get_palette_max API Tested on - SUN OS cc 5.9, which demonstrates the tokenization problem previously - avoided by using /lib/cpp. Since all .dfn output is now protected in - double quotes unless it is to be macro substituted the fix should - work everywhere. - Enabled parallel tests - back ported from libpng-1.7. - scripts/pnglibconf.dfa formatting improvements back ported from libpng17. - Fixed a race condition in the creation of the build 'scripts' directory - while building with a parallel make. - Use approved/supported Android method to check for NEON, use Linux/POSIX - 1003.1 API to check /proc/self/auxv avoiding buffer allocation and other - library calls (ported from libpng15). - -Version 1.6.1beta02 [February 19, 2013] - Use parentheses more consistently in "#if defined(MACRO)" tests. - Folded long lines. - Reenabled code to allow zero length PLTE chunks for MNG. - -Version 1.6.1beta03 [February 22, 2013] - Fixed ALIGNED_MEMORY support. - Added a new configure option: - --enable-arm-neon=always will stop the run-time checks. New checks - within arm/arm_init.c will cause the code not to be compiled unless - __ARM_NEON__ is set. This should make it fail safe (if someone asks - for it on then the build will fail if it can't be done.) - Updated the INSTALL document. - -Version 1.6.1beta04 [February 27, 2013] - Revised INSTALL to recommend using CPPFLAGS instead of INCLUDES. - Revised scripts/makefile.freebsd to respect ZLIBLIB and ZLIBINC. - Revised scripts/dfn.awk to work with the buggy MSYS awk that has trouble - with CRLF line endings. - -Version 1.6.1beta05 [March 1, 2013] - Avoid a possible memory leak in contrib/gregbook/readpng.c - -Version 1.6.1beta06 [March 4, 2013] - Better documentation of unknown handling API interactions. - Corrected Android builds and corrected libpng.vers with symbol - prefixing. It also makes those tests compile and link on Android. - Added an API png_set_option() to set optimization options externally, - providing an alternative and general solution for the non-portable - run-time tests used by the ARM Neon code, using the PNG_ARM_NEON option. - The order of settings vs options in pnglibconf.h is reversed to allow - settings to depend on options and options can now set (or override) the - defaults for settings. - -Version 1.6.1beta07 [March 7, 2013] - Corrected simplified API default gamma for color-mapped output, added - a flag to change default. In 1.6.0 when the simplified API was used - to produce color-mapped output from an input image with no gamma - information the gamma assumed for the input could be different from - that assumed for non-color-mapped output. In particular 16-bit depth - input files were assumed to be sRGB encoded, whereas in the 'direct' - case they were assumed to have linear data. This was an error. The - fix makes the simplified API treat all input files the same way and - adds a new flag to the png_image::flags member to allow the - application/user to specify that 16-bit files contain sRGB data - rather than the default linear. - Fixed bugs in the pngpixel and makepng test programs. - -Version 1.6.1beta08 [March 7, 2013] - Fixed CMakelists.txt to allow building a single variant of the library - (Claudio Bley): - Introduced a PNG_LIB_TARGETS variable that lists all activated library - targets. It is an error if this variable ends up empty, ie. you have - to build at least one library variant. - Made the *_COPY targets only depend on library targets actually being build. - Use PNG_LIB_TARGETS to unify a code path. - Changed the CREATE_SYMLINK macro to expect the full path to a file as the - first argument. When symlinking the filename component of that path is - determined and used as the link target. - Use copy_if_different in the CREATE_SYMLINK macro. - -Version 1.6.1beta09 [March 13, 2013] - Eliminated two warnings from the Intel C compiler. The warnings are - technically valid, although a reasonable treatment of division would - show it to be incorrect. - -Version 1.6.1rc01 [March 21, 2013] - No changes. - -Version 1.6.1 [March 28, 2013] - No changes. - -Version 1.6.2beta01 [April 14, 2013] - Updated documentation of 1.5.x to 1.6.x changes in iCCP chunk handling. - Fixed incorrect warning of excess deflate data. End condition - the - warning would be produced if the end of the deflate stream wasn't read - in the last row. The warning is harmless. - Corrected the test on user transform changes on read. It was in the - png_set of the transform function, but that doesn't matter unless the - transform function changes the rowbuf size, and that is only valid if - transform_info is called. - Corrected a misplaced closing bracket in contrib/libtests/pngvalid.c - (Flavio Medeiros). - Corrected length written to uncompressed iTXt chunks (Samuli Suominen). - Bug was introduced in libpng-1.6.0. - -Version 1.6.2rc01 [April 18, 2013] - Added contrib/tools/fixitxt.c, to repair the erroneous iTXt chunk length - written by libpng-1.6.0 and 1.6.1. - Disallow storing sRGB information when the sRGB is not supported. - -Version 1.6.2rc02 [April 18, 2013] - Merge pngtest.c with libpng-1.7.0 - -Version 1.6.2rc03 [April 22, 2013] - Trivial spelling cleanup. - -Version 1.6.2rc04 and 1.6.2rc05 [omitted] - -Version 1.6.2rc06 [April 24, 2013] - Reverted to version 1.6.2rc03. Recent changes to arm/neon support - have been ported to libpng-1.7.0beta09 and will reappear in version - 1.6.3beta01. - -Version 1.6.2 [April 25, 2013] - No changes. - -Version 1.6.3beta01 [April 25, 2013] - Revised stack marking in arm/filter_neon.S and configure.ac. - Ensure that NEON filter stuff is completely disabled when switched 'off'. - Previously the ARM NEON specific files were still built if the option - was switched 'off' as opposed to being explicitly disabled. - -Version 1.6.3beta02 [April 26, 2013] - Test for 'arm*' not just 'arm' in the host_cpu configure variable. - Rebuilt the configure scripts. - -Version 1.6.3beta03 [April 30, 2013] - Expanded manual paragraph about writing private chunks, particularly - the need to call png_set_keep_unknown_chunks() when writing them. - Avoid dereferencing NULL pointer possibly returned from - png_create_write_struct() (Andrew Church). - -Version 1.6.3beta05 [May 9, 2013] - Calculate our own zlib windowBits when decoding rather than trusting the - CMF bytes in the PNG datastream. - Added an option to force maximum window size for inflating, which was - the behavior of libpng15 and earlier, via a new PNG_MAXIMUM_INFLATE_WINDOW - option for png_set_options(). - Added png-fix-itxt and png-fix-too-far-back to the built programs and - removed warnings from the source code and timepng that are revealed as - a result. - Detect wrong libpng versions linked to png-fix-too-far-back, which currently - only works with libpng versions that can be made to reliably fail when - the deflate data contains an out-of-window reference. This means only - 1.6 and later. - Fixed gnu issues: g++ needs a static_cast, gcc 4.4.7 has a broken warning - message which it is easier to work round than ignore. - Updated contrib/pngminus/pnm2png.c (Paul Stewart): - Check for EOF - Ignore "#" delimited comments in input file to pnm2png.c. - Fixed whitespace handling - Added a call to png_set_packing() - Initialize dimension values so if sscanf fails at least we have known - invalid values. - Attempt to detect configuration issues with png-fix-too-far-back, which - requires both the correct libpng and the correct zlib to function - correctly. - Check ZLIB_VERNUM for mismatches, enclose #error in quotes - Added information in the documentation about problems with and fixes for - the bad CRC and bad iTXt chunk situations. - -Version 1.6.3beta06 [May 12, 2013] - Allow contrib/pngminus/pnm2png.c to compile without WRITE_INVERT and - WRITE_PACK supported (writes error message that it can't read P1 or - P4 PBM files). - Improved png-fix-too-far-back usage message, added --suffix option. - Revised contrib/pngminim/*/makefile to generate pnglibconf.h with the - right zlib header files. - Separated CPPFLAGS and CFLAGS in contrib/pngminim/*/makefile - -Version 1.6.3beta07 [June 8, 2013] - Removed a redundant test in png_set_IHDR(). - Added set(CMAKE_CONFIGURATION_TYPES ...) to CMakeLists.txt (Andrew Hundt) - Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt - Enclose the prototypes for the simplified write API in - #ifdef PNG_STDIO_SUPPORTED/#endif - Make ARM NEON support work at compile time (not just configure time). - This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when - using a compiler that compiles for multiple architectures at one time. - Removed PNG_FILTER_OPTIMIZATIONS and PNG_ARM_NEON_SUPPORTED from - pnglibconf.h, allowing more of the decisions to be made internally - (pngpriv.h) during the compile. Without this, symbol prefixing is broken - under certain circumstances on ARM platforms. Now only the API parts of - the optimizations ('check' vs 'api') are exposed in the public header files - except that the new setting PNG_ARM_NEON_OPT documents how libpng makes the - decision about whether or not to use the optimizations. - Protect symbol prefixing against CC/CPPFLAGS/CFLAGS usage. - Previous iOS/Xcode fixes for the ARM NEON optimizations moved the test - on __ARM_NEON__ from configure time to compile time. This breaks symbol - prefixing because the definition of the special png_init_filter_functions - call was hidden at configure time if the relevant compiler arguments are - passed in CFLAGS as opposed to CC. This change attempts to avoid all - the confusion that would result by declaring the init function even when - it is not used, so that it will always get prefixed. - -Version 1.6.3beta08 [June 18, 2013] - Revised libpng.3 so that "doclifter" can process it. - -Version 1.6.3beta09 [June 27, 2013] - Revised example.c to illustrate use of PNG_DEFAULT_sRGB and PNG_GAMMA_MAC_18 - as parameters for png_set_gamma(). These have been available since - libpng-1.5.4. - Renamed contrib/tools/png-fix-too-far-back.c to pngfix.c and revised it - to check all compressed chunks known to libpng. - -Version 1.6.3beta10 [July 5, 2013] - Updated documentation to show default behavior of benign errors correctly. - Only compile ARM code when PNG_READ_SUPPORTED is defined. - Fixed undefined behavior in contrib/tools/pngfix.c and added new strip - option. pngfix relied on undefined behavior and even a simple change from - gcc to g++ caused it to fail. The new strip option 'unsafe' has been - implemented and is the default if --max is given. Option names have - been clarified, with --strip=transform now stripping the bKGD chunk, - which was stripped previously with --strip=unused. - Added all documented chunk types to pngpriv.h - Unified pngfix.c source with libpng17. - -Version 1.6.3rc01 [July 11, 2013] - No changes. - -Version 1.6.3 [July 18, 2013] - Revised manual about changes in iTXt chunk handling made in libpng-1.6.0. - Added "/* SAFE */" comments in pngrutil.c and pngrtran.c where warnings - may be erroneously issued by code-checking applications. - -Version 1.6.4beta01 [August 21, 2013] - Added information about png_set_options() to the manual. - Delay calling png_init_filter_functions() until a row with nonzero filter - is found. - -Version 1.6.4beta02 [August 30, 2013] - Fixed inconsistent conditional compilation of png_chunk_unknown_handling() - prototype, definition, and usage. Made it depend on - PNG_HANDLE_AS_UNKNOWN_SUPPORTED everywhere. - -Version 1.6.4rc01 [September 5, 2013] - No changes. - -Version 1.6.4 [September 12, 2013] - No changes. - -Version 1.6.5 [September 14, 2013] - Removed two stray lines of code from arm/arm_init.c. - -Version 1.6.6 [September 16, 2013] - Removed two stray lines of code from arm/arm_init.c, again. - -Version 1.6.7beta01 [September 30, 2013] - Revised unknown chunk code to correct several bugs in the NO_SAVE_/NO_WRITE - combination - Allow HANDLE_AS_UNKNOWN to work when other options are configured off. Also - fixed the pngminim makefiles to work when $(MAKEFLAGS) contains stuff - which terminates the make options (as by default in recent versions of - Gentoo). - Avoid up-cast warnings in pngvalid.c. On ARM the alignment requirements of - png_modifier are greater than that of png_store and as a consequence - compilation of pngvalid.c results in a warning about increased alignment - requirements because of the bare cast to (png_modifier*). The code is safe, - because the pointer is known to point to a stack allocated png_modifier, - but this change avoids the warning. - Fixed default behavior of ARM_NEON_API. If the ARM NEON API option was - compiled without the CHECK option it defaulted to on, not off. - Check user callback behavior in pngunknown.c. Previous versions compiled - if SAVE_UNKNOWN was not available but did nothing since the callback - was never implemented. - Merged pngunknown.c with 1.7 version and back ported 1.7 improvements/fixes - -Version 1.6.7beta02 [October 12, 2013] - Made changes for compatibility with automake 1.14: - 1) Added the 'compile' program to the list of programs that must be cleaned - in autogen.sh - 2) Added 'subdir-objects' which causes .c files in sub-directories to be - compiled such that the corresponding .o files are also in the - sub-directory. This is because automake 1.14 warns that the - current behavior of compiling to the top level directory may be removed - in the future. - 3) Updated dependencies on pnglibconf.h to match the new .o locations and - added all the files in contrib/libtests and contrib/tools that depend - on pnglibconf.h - 4) Added 'BUILD_SOURCES = pnglibconf.h'; this is the automake recommended - way of handling the dependencies of sources that are machine generated; - unfortunately it only works if the user does 'make all' or 'make check', - so the dependencies (3) are still required. - Cleaned up (char*) casts of zlib messages. The latest version of the Intel C - compiler complains about casting a string literal as (char*), so copied the - treatment of z_const from the library code into pngfix.c - Simplified error message code in pngunknown. The simplification has the - useful side effect of avoiding a bogus warning generated by the latest - version of the Intel C compiler (it objects to - condition ? string-literal : string-literal). - Make autogen.sh work with automake 1.13 as well as 1.14. Do this by always - removing the 1.14 'compile' script but never checking for it. - -Version 1.6.7beta03 [October 19, 2013] - Added ARMv8 support (James Yu ). Added file - arm/filter_neon_intrinsics.c; enable with -mfpu=neon. - Revised pngvalid to generate size images with as many filters as it can - manage, limited by the number of rows. - Cleaned up ARM NEON compilation handling. The tests are now in pngpriv.h - and detect the broken GCC compilers. - -Version 1.6.7beta04 [October 26, 2013] - Allow clang derived from older GCC versions to use ARM intrinsics. This - causes all clang builds that use -mfpu=neon to use the intrinsics code, - not the assembler code. This has only been tested on iOS 7. It may be - necessary to exclude some earlier clang versions but this seems unlikely. - Changed NEON implementation selection mechanism. This allows assembler - or intrinsics to be turned on at compile time during the build by defining - PNG_ARM_NEON_IMPLEMENTATION to the correct value (2 or 1). This macro - is undefined by default and the build type is selected in pngpriv.h. - -Version 1.6.7rc01 [November 2, 2013] - No changes. - -Version 1.6.7rc02 [November 7, 2013] - Fixed #include in filter_neon_intrinsics.c and ctype macros. The ctype char - checking macros take an unsigned char argument, not a signed char. - -Version 1.6.7 [November 14, 2013] - No changes. - -Version 1.6.8beta01 [November 24, 2013] - Moved prototype for png_handle_unknown() in pngpriv.h outside of - the #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED/#endif block. - Added "-Wall" to CFLAGS in contrib/pngminim/*/makefile - Conditionally compile some unused functions reported by -Wall in - pngminim. - Fixed 'minimal' builds. Various obviously useful minimal configurations - don't build because of missing contrib/libtests test programs and - overly complex dependencies in scripts/pnglibconf.dfa. This change - adds contrib/conftest/*.dfa files that can be used in automatic build - scripts to ensure that these configurations continue to build. - Enabled WRITE_INVERT and WRITE_PACK in contrib/pngminim/encoder. - Fixed pngvalid 'fail' function declaration on the Intel C Compiler. - This reverts to the previous 'static' implementation and works round - the 'unused static function' warning by using PNG_UNUSED(). - -Version 1.6.8beta02 [November 30, 2013] - Removed or marked PNG_UNUSED some harmless "dead assignments" reported - by clang scan-build. - Changed tabs to 3 spaces in png_debug macros and changed '"%s"m' - to '"%s" m' to improve portability among compilers. - Changed png_free_default() to free() in pngtest.c - -Version 1.6.8rc01 [December 12, 2013] - Tidied up pngfix inits and fixed pngtest no-write builds. - -Version 1.6.8rc02 [December 14, 2013] - Handle zero-length PLTE chunk or NULL palette with png_error() - instead of png_chunk_report(), which by default issues a warning - rather than an error, leading to later reading from a NULL pointer - (png_ptr->palette) in png_do_expand_palette(). This is CVE-2013-6954 - and VU#650142. Libpng-1.6.1 through 1.6.7 are vulnerable. - Libpng-1.6.0 and earlier do not have this bug. - -Version 1.6.8 [December 19, 2013] - No changes. - -Version 1.6.9beta01 [December 26, 2013] - Bookkeeping: Moved functions around (no changes). Moved transform - function definitions before the place where they are called so that - they can be made static. Move the intrapixel functions and the - grayscale palette builder out of the png?tran.c files. The latter - isn't a transform function and is no longer used internally, and the - former MNG specific functions are better placed in pngread/pngwrite.c - Made transform implementation functions static. This makes the internal - functions called by png_do_{read|write}_transformations static. On an - x86-64 DLL build (Gentoo Linux) this reduces the size of the text - segment of the DLL by 1208 bytes, about 0.6%. It also simplifies - maintenance by removing the declarations from pngpriv.h and allowing - easier changes to the internal interfaces. - Rebuilt configure scripts with automake-1.14.1 and autoconf-2.69 - in the tar distributions. - -Version 1.6.9beta02 [January 1, 2014] - Added checks for libpng 1.5 to pngvalid.c. This supports the use of - this version of pngvalid in libpng 1.5 - Merged with pngvalid.c from libpng-1.7 changes to create a single - pngvalid.c - Removed #error macro from contrib/tools/pngfix.c (Thomas Klausner). - Merged pngrio.c, pngtrans.c, pngwio.c, and pngerror.c with libpng-1.7.0 - Merged libpng-1.7.0 changes to make no-interlace configurations work - with test programs. - Revised pngvalid.c to support libpng 1.5, which does not support the - PNG_MAXIMUM_INFLATE_WINDOW option, so #define it out when appropriate in - pngvalid.c - Allow unversioned links created on install to be disabled in configure. - In configure builds 'make install' changes/adds links like png.h - and libpng.a to point to the newly installed, versioned, files (e.g. - libpng17/png.h and libpng17.a). Three new configure options and some - rearrangement of Makefile.am allow creation of these links to be disabled. - -Version 1.6.9beta03 [January 10, 2014] - Removed potentially misleading warning from png_check_IHDR(). - -Version 1.6.9beta04 [January 20, 2014] - Updated scripts/makefile.* to use CPPFLAGS (Cosmin). - Added clang attribute support (Cosmin). - -Version 1.6.9rc01 [January 28, 2014] - No changes. - -Version 1.6.9rc02 [January 30, 2014] - Quiet an uninitialized memory warning from VC2013 in png_get_png(). - -Version 1.6.9 [February 6, 2014] - -Version 1.6.10beta01 [February 9, 2014] - Backported changes from libpng-1.7.0beta30 and beta31: - Fixed a large number of instances where PNGCBAPI was omitted from - function definitions. - Added pngimage test program for png_read_png() and png_write_png() - with two new test scripts. - Removed dependence on !PNG_READ_EXPAND_SUPPORTED for calling - png_set_packing() in png_read_png(). - Fixed combination of ~alpha with shift. On read invert alpha, processing - occurred after shift processing, which causes the final values to be - outside the range that should be produced by the shift. Reversing the - order on read makes the two transforms work together correctly and mirrors - the order used on write. - Do not read invalid sBIT chunks. Previously libpng only checked sBIT - values on write, so a malicious PNG writer could therefore cause - the read code to return an invalid sBIT chunk, which might lead to - application errors or crashes. Such chunks are now skipped (with - chunk_benign_error). - Make png_read_png() and png_write_png() prototypes in png.h depend - upon PNG_READ_SUPPORTED and PNG_WRITE_SUPPORTED. - Support builds with unsupported PNG_TRANSFORM_* values. All of the - PNG_TRANSFORM_* values are always defined in png.h and, because they - are used for both read and write in some cases, it is not reliable - to #if out ones that are totally unsupported. This change adds error - detection in png_read_image() and png_write_image() to do a - png_app_error() if the app requests something that cannot be done - and it adds corresponding code to pngimage.c to handle such options - by not attempting to test them. - -Version 1.6.10beta02 [February 23, 2014] - Moved redefines of png_error(), png_warning(), png_chunk_error(), - and png_chunk_warning() from pngpriv.h to png.h to make them visible - to libpng-calling applications. - Moved OS dependent code from arm/arm_init.c, to allow the included - implementation of the ARM NEON discovery function to be set at - build-time and provide sample implementations from the current code in the - contrib/arm-neon subdirectory. The __linux__ code has also been changed to - compile and link on Android by using /proc/cpuinfo, and the old linux code - is in contrib/arm-neon/linux-auxv.c. The new code avoids POSIX and Linux - dependencies apart from opening /proc/cpuinfo and is C90 compliant. - Check for info_ptr == NULL early in png_read_end() so we don't need to - run all the png_handle_*() and depend on them to return if info_ptr == NULL. - This improves the performance of png_read_end(png_ptr, NULL) and makes - it more robust against future programming errors. - Check for __has_extension before using it in pngconf.h, to - support older Clang versions (Jeremy Sequoia). - Treat CRC error handling with png_set_crc_action(), instead of with - png_set_benign_errors(), which has been the case since libpng-1.6.0beta18. - Use a user warning handler in contrib/gregbook/readpng2.c instead of default, - so warnings will be put on stderr even if libpng has CONSOLE_IO disabled. - Added png_ptr->process_mode = PNG_READ_IDAT_MODE in png_push_read_chunk - after recognizing the IDAT chunk, which avoids an infinite loop while - reading a datastream whose first IDAT chunk is of zero-length. - This fixes CERT VU#684412 and CVE-2014-0333. - Don't recognize known sRGB profiles as sRGB if they have been hacked, - but don't reject them and don't issue a copyright violation warning. - -Version 1.6.10beta03 [February 25, 2014] - Moved some documentation from png.h to libpng.3 and libpng-manual.txt - Minor editing of contrib/arm-neon/README and contrib/examples/*.c - -Version 1.6.10rc01 [February 27, 2014] - Fixed typos in the manual and in scripts/pnglibconf.dfa (CFLAGS -> CPPFLAGS - and PNG_USR_CONFIG -> PNG_USER_CONFIG). - -Version 1.6.10rc02 [February 28, 2014] - Removed unreachable return statement after png_chunk_error() - in pngrutil.c - -Version 1.6.10rc03 [March 4, 2014] - Un-deprecated png_data_freer(). - -Version 1.6.10 [March 6, 2014] - No changes. - -Version 1.6.11beta01 [March 17, 2014] - Use "if (value != 0)" instead of "if (value)" consistently. - Changed ZlibSrcDir from 1.2.5 to 1.2.8 in projects/vstudio. - Moved configuration information from the manual to the INSTALL file. - -Version 1.6.11beta02 [April 6, 2014] - Removed #if/#else/#endif from inside two pow() calls in pngvalid.c because - they were handled improperly by Portland Group's PGI-14.1 - PGI-14.3 - when using its "__builtin_pow()" function. - Silence 'unused parameter' build warnings (Cosmin Truta). - $(CP) is now used alongside $(RM_F). Also, use 'copy' instead of 'cp' - where applicable, and applied other minor makefile changes (Cosmin). - Don't warn about invalid dimensions exceeding user limits (Cosmin). - Allow an easy replacement of the default pre-built configuration - header with a custom header, via the make PNGLIBCONF_H_PREBUILT - macro (Cosmin). - -Version 1.6.11beta03 [April 6, 2014] - Fixed a typo in pngrutil.c, introduced in libpng-1.5.6, that interferes - with "blocky" expansion of sub-8-bit interlaced PNG files (Eric Huss). - Optionally use __builtin_bswap16() in png_do_swap(). - -Version 1.6.11beta04 [April 19, 2014] - Made progressive reading of interlaced images consistent with the - behavior of the sequential reader and consistent with the manual, by - moving some code out of the PNG_READ_INTERLACING_SUPPORTED blocks. The - row_callback now receives the proper pass number and unexpanded rows, when - png_combine_row() isn't built or used, and png_set_interlace_handling() - is not called. - Allow PNG_sRGB_PROFILE_CHECKING = (-1) to mean no sRGB profile checking. - -Version 1.6.11beta05 [April 26, 2014] - Do not reject ICC V2 profiles that lack padding (Kai-Uwe Behrmann). - Relocated closing bracket of the sRGB profile test loop to avoid getting - "Not recognizing known sRGB profile that has been edited" warning for - ICC V2 profiles that lack the MD5 signature in the profile header. - -Version 1.6.11beta06 [May 19, 2014] - Added PNG_SKIP_sRGB_CHECK_PROFILE choice for png_set_option(). - -Version 1.6.11rc01 [May 27, 2014] - No changes. - -Version 1.6.11rc02 [June 3, 2014] - Test ZLIB_VERNUM instead of PNG_ZLIB_VERNUM in contrib/tools/pngfix.c - -Version 1.6.11 [June 5, 2014] - No changes. - -Version 1.6.12rc01 [June 6, 2014] - Relocated new code from 1.6.11beta06 in png.c to a point after the - declarations (Max Stepin). - -Version 1.6.12rc02 [June 7, 2014] - Changed file permissions of contrib/tools/intgamma.sh, - test-driver, and compile from 0644 to 0755 (Cosmin). - -Version 1.6.12rc03 [June 8, 2014] - Ensure "__has_attribute()" macro exists before trying to use it with - old clang compilers (MacPorts Ticket #43939). - -Version 1.6.12 [June 12, 2014] - No changes. - -Version 1.6.13beta01 [July 4, 2014] - Quieted -Wsign-compare and -Wclobber compiler warnings in - contrib/pngminus/*.c - Added "(void) png_ptr;" where needed in contrib/gregbook to quiet - compiler complaints about unused pointers. - Split a long output string in contrib/gregbook/rpng2-x.c. - Added "PNG_SET_OPTION" requirement for sRGB chunk support to pnglibconf.dfa, - Needed for write-only support (John Bowler). - Changed "if defined(__ARM_NEON__)" to - "if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu). - Fixed clang no-warning builds: png_digit was defined but never used. - -Version 1.6.13beta02 [July 21, 2014] - Fixed an incorrect separator ("/" should be "\") in scripts/makefile.vcwin32 - (bug report from Wolfgang S. Kechel). Bug was introduced in libpng-1.6.11. - Also fixed makefile.bc32, makefile.bor, makefile.msc, makefile.intel, and - makefile.tc3 similarly. - -Version 1.6.13beta03 [August 3, 2014] - Removed scripts/makefile.elf. It has not worked since libpng-1.5.0beta14 - due to elimination of the PNG_FUNCTION_EXPORT and PNG_DATA_EXPORT - definitions from pngconf.h. - Ensure that CMakeLists.txt makes the target "lib" directory before making - symbolic link into it (SourceForge bug report #226 by Rolf Timmermans). - -Version 1.6.13beta04 [August 8, 2014] - Added opinion that the ECCN (Export Control Classification Number) for - libpng is EAR99 to the README file. - Eliminated use of "$<" in makefile explicit rules, when copying - $PNGLIBCONF_H_PREBUILT. This does not work on some versions of make; - bug introduced in libpng version 1.6.11. - -Version 1.6.13rc01 [August 14, 2014] - Made "ccopts" agree with "CFLAGS" in scripts/makefile.hp* and makefile.*sunu - -Version 1.6.13 [August 21, 2014] - No changes. - -Version 1.6.14beta01 [September 14, 2014] - Guard usage of png_ptr->options with #ifdef PNG_SET_OPTION_SUPPORTED. - Do not build contrib/tools/pngfix.c when PNG_SETJMP_NOT_SUPPORTED, - to allow "make" to complete without setjmp support (bug report by - Claudio Fontana) - Add "#include " to contrib/tools/pngfix.c (John Bowler) - -Version 1.6.14beta02 [September 18, 2014] - Use nanosleep() instead of usleep() in contrib/gregbook/rpng2-x.c - because usleep() is deprecated. - Define usleep() in contrib/gregbook/rpng2-x.c if not already defined - in unistd.h and nanosleep() is not available; fixes error introduced - in libpng-1.6.13. - Disable floating point exception handling in pngvalid.c when - PNG_FLOATING_ARITHMETIC is not supported (bug report by "zootus - at users.sourceforge.net"). - -Version 1.6.14beta03 [September 19, 2014] - Define FE_DIVBYZERO, FE_INVALID, and FE_OVERFLOW in pngvalid.c if not - already defined. Revert floating point exception handling in pngvalid.c - to version 1.6.14beta01 behavior. - -Version 1.6.14beta04 [September 27, 2014] - Fixed incorrect handling of the iTXt compression flag in pngrutil.c - (bug report by Shunsaku Hirata). Bug was introduced in libpng-1.6.0. - -Version 1.6.14beta05 [October 1, 2014] - Added "option READ_iCCP enables READ_COMPRESSED_TEXT" to pnglibconf.dfa - -Version 1.6.14beta06 [October 5, 2014] - Removed unused "text_len" parameter from private function png_write_zTXt(). - Conditionally compile some code in png_deflate_claim(), when - PNG_WARNINGS_SUPPORTED and PNG_ERROR_TEXT_SUPPORTED are disabled. - Replaced repeated code in pngpread.c with PNG_PUSH_SAVE_BUFFER_IF_FULL. - Added "chunk iTXt enables TEXT" and "chunk zTXt enables TEXT" - to pnglibconf.dfa. - Removed "option READ_COMPRESSED_TEXT enables READ_TEXT" from pnglibconf.dfa, - to make it possible to configure a libpng that supports iCCP but not TEXT. - -Version 1.6.14beta07 [October 7, 2014] - Removed "option WRITE_COMPRESSED_TEXT enables WRITE_TEXT" from pnglibconf.dfa - Only mark text chunks as written after successfully writing them. - -Version 1.6.14rc01 [October 15, 2014] - Fixed some typos in comments. - -Version 1.6.14rc02 [October 17, 2014] - Changed png_convert_to_rfc_1123() to png_convert_to_rfc_1123_buffer() - in the manual, to reflect the change made in libpng-1.6.0. - Updated README file to explain that direct access to the png_struct - and info_struct members has not been permitted since libpng-1.5.0. - -Version 1.6.14 [October 23, 2014] - No changes. - -Version 1.6.15beta01 [October 29, 2014] - Changed "if (!x)" to "if (x == 0)" and "if (x)" to "if (x != 0)" - Simplified png_free_data(). - Added missing "ptr = NULL" after some instances of png_free(). - -Version 1.6.15beta02 [November 1, 2014] - Changed remaining "if (!x)" to "if (x == 0)" and "if (x)" to "if (x != 0)" - -Version 1.6.15beta03 [November 3, 2014] - Added PNG_USE_ARM_NEON configuration flag (Marcin Juszkiewicz). - -Version 1.6.15beta04 [November 4, 2014] - Removed new PNG_USE_ARM_NEON configuration flag and made a one-line - revision to configure.ac to support ARM on aarch64 instead (John Bowler). - -Version 1.6.15beta05 [November 5, 2014] - Use png_get_libpng_ver(NULL) instead of PNG_LIBPNG_VER_STRING in - example.c, pngtest.c, and applications in the contrib directory. - Fixed an out-of-range read in png_user_version_check() (Bug report from - Qixue Xiao, CVE-2015-8540). - Simplified and future-proofed png_user_version_check(). - Fixed GCC unsigned int->float warnings. Various versions of GCC - seem to generate warnings when an unsigned value is implicitly - converted to double. This is probably a GCC bug but this change - avoids the issue by explicitly converting to (int) where safe. - Free all allocated memory in pngimage. The file buffer cache was left - allocated at the end of the program, harmless but it causes memory - leak reports from clang. - Fixed array size calculations to avoid warnings. At various points - in the code the number of elements in an array is calculated using - sizeof. This generates a compile time constant of type (size_t) which - is then typically assigned to an (unsigned int) or (int). Some versions - of GCC on 64-bit systems warn about the apparent narrowing, even though - the same compiler does apparently generate the correct, in-range, - numeric constant. This adds appropriate, safe, casts to make the - warnings go away. - -Version 1.6.15beta06 [November 6, 2014] - Reverted use png_get_libpng_ver(NULL) instead of PNG_LIBPNG_VER_STRING - in the manual, example.c, pngtest.c, and applications in the contrib - directory. It was incorrect advice. - -Version 1.6.15beta07 [November 7, 2014] - Removed #ifdef PNG_16BIT_SUPPORTED/#endif around png_product2(); it is - needed by png_reciprocal2(). - Added #ifdef PNG_16BIT_SUPPORTED/#endif around png_log16bit() and - png_do_swap(). - Changed all "#endif /* PNG_FEATURE_SUPPORTED */" to "#endif /* FEATURE */" - -Version 1.6.15beta08 [November 8, 2014] - More housecleaning in *.h - -Version 1.6.15rc01 [November 13, 2014] - -Version 1.6.15rc02 [November 14, 2014] - The macros passed in the command line to Borland make were ignored if - similarly-named macros were already defined in makefiles. This behavior - is different from POSIX make and other make programs. Surround the - macro definitions with ifndef guards (Cosmin). - -Version 1.6.15rc03 [November 16, 2014] - Added "-D_CRT_SECURE_NO_WARNINGS" to CFLAGS in scripts/makefile.vcwin32. - Removed the obsolete $ARCH variable from scripts/makefile.darwin. - -Version 1.6.15 [November 20, 2014] - No changes. - -Version 1.6.16beta01 [December 14, 2014] - Added ".align 2" to arm/filter_neon.S to support old GAS assemblers that - don't do alignment correctly. - Revised Makefile.am and scripts/symbols.dfn to work with MinGW/MSYS - (Bob Friesenhahn). - -Version 1.6.16beta02 [December 15, 2014] - Revised Makefile.am and scripts/*.dfn again to work with MinGW/MSYS; - renamed scripts/*.dfn to scripts/*.c (John Bowler). - -Version 1.6.16beta03 [December 21, 2014] - Quiet a "comparison always true" warning in pngstest.c (John Bowler). - -Version 1.6.16rc01 [December 21, 2014] - Restored a test on width that was removed from png.c at libpng-1.6.9 - (Bug report by Alex Eubanks, CVE-2015-0973). - -Version 1.6.16rc02 [December 21, 2014] - Undid the update to pngrutil.c in 1.6.16rc01. - -Version 1.6.16rc03 [December 21, 2014] - Fixed an overflow in png_combine_row() with very wide interlaced images - (Bug report and fix by John Bowler, CVE-2014-9495). - -Version 1.6.16 [December 22, 2014] - No changes. - -Version 1.6.17beta01 [January 29, 2015] - Removed duplicate PNG_SAFE_LIMITS_SUPPORTED handling from pngconf.h - Corrected the width limit calculation in png_check_IHDR(). - Removed user limits from pngfix. Also pass NULL pointers to - png_read_row to skip the unnecessary row de-interlace stuff. - Added testing of png_set_packing() to pngvalid.c - Regenerated configure scripts in the *.tar distributions with libtool-2.4.4 - Implement previously untested cases of libpng transforms in pngvalid.c - Fixed byte order in png_do_read_filler() with 16-bit input. Previously - the high and low bytes of the filler, from png_set_filler() or from - png_set_add_alpha(), were read in the wrong order. - Made the check for out-of-range values in png_set_tRNS() detect - values that are exactly 2^bit_depth, and work on 16-bit platforms. - Merged some parts of libpng-1.6.17beta01 and libpng-1.7.0beta47. - Added #ifndef __COVERITY__ where needed in png.c, pngrutil.c and - pngset.c to avoid warnings about dead code. - Added "& 0xff" to many instances of expressions that are typecast - to (png_byte), to avoid Coverity warnings. - -Version 1.6.17beta02 [February 7, 2015] - Work around one more Coverity-scan dead-code warning. - Do not build png_product2() when it is unused. - -Version 1.6.17beta03 [February 17, 2015] - Display user limits in the output from pngtest. - Eliminated the PNG_SAFE_LIMITS macro and restored the 1-million-column - and 1-million-row default limits in pnglibconf.dfa, that can be reset - by the user at build time or run time. This provides a more robust - defense against DOS and as-yet undiscovered overflows. - -Version 1.6.17beta04 [February 21, 2015] - Added PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED macro, on by default. - Allow user to call png_get_IHDR() with NULL arguments (Reuben Hawkins). - Rebuilt configure scripts with automake-1.15 and libtool-2.4.6 - -Version 1.6.17beta05 [February 25, 2015] - Restored compiling of png_reciprocal2 with PNG_NO_16BIT. - -Version 1.6.17beta06 [February 27, 2015] - Moved png_set_filter() prototype into a PNG_WRITE_SUPPORTED block - of png.h. - Avoid runtime checks when converting integer to png_byte with - Visual Studio (Sergey Kosarevsky) - -Version 1.6.17rc01 [March 4, 2015] - No changes. - -Version 1.6.17rc02 [March 9, 2015] - Removed some comments that the configure script did not handle - properly from scripts/pnglibconf.dfa and pnglibconf.h.prebuilt. - Free the unknown_chunks structure even when it contains no data. - -Version 1.6.17rc03 [March 12, 2015] - Updated CMakeLists.txt to add OSX framework, change YES/NO to ON/OFF - for consistency, and remove some useless tests (Alexey Petruchik). - -Version 1.6.17rc04 [March 16, 2015] - Remove pnglibconf.h, pnglibconf.c, and pnglibconf.out instead of - pnglibconf.* in "make clean" (Cosmin). - Fix bug in calculation of maxbits, in png_write_sBIT, introduced - in libpng-1.6.17beta01 (John Bowler). - -Version 1.6.17rc05 [March 21, 2015] - Define PNG_FILTER_* and PNG_FILTER_VALUE_* in png.h even when WRITE - is not supported (John Bowler). This fixes an error introduced in - libpng-1.6.17beta06. - Reverted "& 0xff" additions of version 1.6.17beta01. Libpng passes - the Coverity scan without them. - -Version 1.6.17rc06 [March 23, 2015] - Remove pnglibconf.dfn and pnglibconf.pre with "make clean". - Reformatted some "&0xff" instances to "& 0xff". - Fixed simplified 8-bit-linear to sRGB alpha. The calculated alpha - value was wrong. It's not clear if this affected the final stored - value; in the obvious code path the upper and lower 8-bits of the - alpha value were identical and the alpha was truncated to 8-bits - rather than dividing by 257 (John Bowler). - -Version 1.6.17 [March 26, 2015] - No changes. - -Version 1.6.18beta01 [April 1, 2015] - Removed PNG_SET_CHUNK_[CACHE|MALLOC]_LIMIT_SUPPORTED macros. They - have been combined with PNG_SET_USER_LIMITS_SUPPORTED (resolves - bug report by Andrew Church). - Fixed rgb_to_gray checks and added tRNS checks to pngvalid.c. This - fixes some arithmetic errors that caused some tests to fail on - some 32-bit platforms (Bug reports by Peter Breitenlohner [i686] - and Petr Gajdos [i586]). - -Version 1.6.18beta02 [April 26, 2015] - Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler - (Bug report by Viktor Szakats). - -Version 1.6.18beta03 [May 6, 2015] - Replaced "unexpected" with an integer (0xabadca11) in pngset.c - where a long was expected, to avoid a compiler warning when PNG_DEBUG > 1. - Added contrib/examples/simpleover.c, to demonstrate how to handle - alpha compositing of multiple images, using the "simplified API" - and an example PNG generation tool, contrib/examples/genpng.c - (John Bowler). - -Version 1.6.18beta04 [May 20, 2015] - PNG_RELEASE_BUILD replaces tests where the code depended on the build base - type and can be defined on the command line, allowing testing in beta - builds (John Bowler). - Avoid Coverity issue 80858 (REVERSE NULL) in pngtest.c PNG_DEBUG builds. - Avoid a harmless potential integer overflow in png_XYZ_from_xy() (Bug - report from Christopher Ferris). - -Version 1.6.18beta05 [May 31, 2015] - Backport filter selection code from libpng-1.7.0beta51, to combine - sub_row, up_row, avg_row, and paeth_row into try_row and tst_row. - Changed png_voidcast(), etc., to voidcast(), etc., in contrib/tools/pngfix.c - to avoid confusion with the libpng private macros. - Fixed old cut&paste bug in the weighted filter selection code in - pngwutil.c, introduced in libpng-0.95, March 1997. - -Version 1.6.18beta06 [June 1, 2015] - Removed WRITE_WEIGHTED_FILTERED code, to save a few kbytes of the - compiled library size. It never worked properly and as far as we can - tell, no one uses it. The png_set_filter_heuristics() and - png_set_filter_heuristics_fixed() APIs are retained but deprecated - and do nothing. - -Version 1.6.18beta07 [June 6, 2015] - Removed non-working progressive reader 'skip' function. This - function has apparently never been used. It was implemented - to support back-door modification of png_struct in libpng-1.4.x - but (because it does nothing and cannot do anything) was apparently - never tested (John Bowler). - Fixed cexcept.h in which GCC 5 now reports that one of the auto - variables in the Try macro needs to be volatile to prevent value - being lost over the setjmp (John Bowler). - Fixed NO_WRITE_FILTER and -Wconversion build breaks (John Bowler). - Fix g++ build breaks (John Bowler). - Quieted some Coverity issues in pngfix.c, png-fix-itxt.c, pngvalid.c, - pngstest.c, and pngimage.c. Most seem harmless, but png-fix-itxt - would only work with iTXt chunks with length 255 or less. - Added #ifdef's to contrib/examples programs so people don't try - to compile them without the minimum required support enabled - (suggested by Flavio Medeiros). - -Version 1.6.18beta08 [June 30, 2015] - Eliminated the final two Coverity defects (insecure temporary file - handling in contrib/libtests/pngstest.c; possible overflow of - unsigned char in contrib/tools/png-fix-itxt.c). To use the "secure" - file handling, define PNG_USE_MKSTEMP, otherwise "tmpfile()" will - be used. - Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h - -Version 1.6.18beta09 [July 5, 2015] - Removed some useless typecasts from contrib/tools/png-fix-itxt.c - Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin). - Replaced arbitrary use of 'extern' with #define PNG_LINKAGE_*. To - preserve API compatibility, the new defines all default to "extern" - (requested by Jan Nijtmans). - -Version 1.6.18rc01 [July 9, 2015] - Belatedly added Mans Rullgard and James Yu to the list of Contributing - Authors. - -Version 1.6.18rc02 [July 12, 2015] - Restored unused FILTER_HEURISTIC macros removed at libpng-1.6.18beta08 - to png.h to avoid compatibility warnings. - -Version 1.6.18rc03 [July 15, 2015] - Minor changes to the man page - -Version 1.6.18 [July 23, 2015] - No changes. - -Version 1.6.19beta01 [July 30, 2015] - Updated obsolete information about the simplified API macros in the - manual pages (Bug report by Arc Riley). - Avoid potentially dereferencing NULL info_ptr in png_info_init_3(). - Rearranged png.h to put the major sections in the same order as - in libpng17. - Eliminated unused PNG_COST_SHIFT, PNG_WEIGHT_SHIFT, PNG_COST_FACTOR, and - PNG_WEIGHT_FACTOR macros. - Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler - (Bug report by Viktor Szakats). Several warnings remain and are - unavoidable, where we test for overflow. - Fixed potential leak of png_pixels in contrib/pngminus/pnm2png.c - Fixed uninitialized variable in contrib/gregbook/rpng2-x.c - -Version 1.6.19beta02 [August 19, 2015] - Moved config.h.in~ from the "libpng_autotools_files" list to the - "libpng_autotools_extra" list in autogen.sh because it was causing a - false positive for missing files (bug report by Robert C. Seacord). - Removed unreachable "break" statements in png.c, pngread.c, and pngrtran.c - to suppress clang warnings (Bug report by Viktor Szakats). - Fixed some bad links in the man page. - Changed "n bit" to "n-bit" in comments. - Added signed/unsigned 16-bit safety net. This removes the dubious - 0x8000 flag definitions on 16-bit systems. They aren't supported - yet the defs *probably* work, however it seems much safer to do this - and be advised if anyone, contrary to advice, is building libpng 1.6 - on a 16-bit system. It also adds back various switch default clauses - for GCC; GCC errors out if they are not present (with an appropriately - high level of warnings). - Safely convert num_bytes to a png_byte in png_set_sig_bytes() (Robert - Seacord). - Fixed the recently reported 1's complement security issue by replacing - the value that is illegal in the PNG spec, in both signed and unsigned - values, with 0. Illegal unsigned values (anything greater than or equal - to 0x80000000) can still pass through, but since these are not illegal - in ANSI-C (unlike 0x80000000 in the signed case) the checking that - occurs later can catch them (John Bowler). - -Version 1.6.19beta03 [September 26, 2015] - Fixed png_save_int_32 when int is not 2's complement (John Bowler). - Updated libpng16 with all the recent test changes from libpng17, - including changes to pngvalid.c to ensure that the original, - distributed, version of contrib/visupng/cexcept.h can be used - (John Bowler). - pngvalid contains the correction to the use of SAVE/STORE_ - UNKNOWN_CHUNKS; a bug revealed by changes in libpng 1.7. More - tests contain the --strict option to detect warnings and the - pngvalid-standard test has been corrected so that it does not - turn on progressive-read. There is a separate test which does - that. (John Bowler) - Also made some signed/unsigned fixes. - Make pngstest error limits version specific. Splitting the machine - generated error structs out to a file allows the values to be updated - without changing pngstest.c itself. Since libpng 1.6 and 1.7 have - slightly different error limits this simplifies maintenance. The - makepngs.sh script has also been updated to more accurately reflect - current problems in libpng 1.7 (John Bowler). - Incorporated new test PNG files into make check. tests/pngstest-* - are changed so that the new test files are divided into 8 groups by - gamma and alpha channel. These tests have considerably better code - and pixel-value coverage than contrib/pngsuite; however,coverage is - still incomplete (John Bowler). - Removed the '--strict' in 1.6 because of the double-gamma-correction - warning, updated pngstest-errors.h for the errors detected with the - new contrib/testspngs PNG test files (John Bowler). - -Version 1.6.19beta04 [October 15, 2015] - Worked around rgb-to-gray issues in libpng 1.6. The previous - attempts to ignore the errors in the code aren't quite enough to - deal with the 'channel selection' encoding added to libpng 1.7; abort. - pngvalid.c is changed to drop this encoding in prior versions. - Fixed 'pow' macros in pngvalid.c. It is legal for 'pow' to be a - macro, therefore the argument list cannot contain preprocessing - directives. Make sure pow is a function where this happens. This is - a minimal safe fix, the issue only arises in non-performance-critical - code (bug report by Curtis Leach, fix by John Bowler). - Added sPLT support to pngtest.c - -Version 1.6.19rc01 [October 23, 2015] - No changes. - -Version 1.6.19rc02 [October 31, 2015] - Prevent setting or writing over-length PLTE chunk (Cosmin Truta). - Silently truncate over-length PLTE chunk while reading. - Libpng incorrectly calculated the output rowbytes when the application - decreased either the number of channels or the bit depth (or both) in - a user transform. This was safe; libpng overallocated buffer space - (potentially by quite a lot; up to 4 times the amount required) but, - from 1.5.4 on, resulted in a png_error (John Bowler). - -Version 1.6.19rc03 [November 3, 2015] - Fixed some inconsequential cut-and-paste typos in png_set_cHRM_XYZ_fixed(). - Clarified COPYRIGHT information to state explicitly that versions - are derived from previous versions. - Removed much of the long list of previous versions from png.h and - libpng.3. - -Version 1.6.19rc04 [November 5, 2015] - Fixed new bug with CRC error after reading an over-length palette - (bug report by Cosmin Truta) (CVE-2015-8126). - -Version 1.6.19 [November 12, 2015] - Cleaned up coding style in png_handle_PLTE(). - -Version 1.6.20beta01 [November 20, 2015] - Avoid potential pointer overflow/underflow in png_handle_sPLT() and - png_handle_pCAL() (Bug report by John Regehr). - -Version 1.6.20beta02 [November 23, 2015] - Fixed incorrect implementation of png_set_PLTE() that uses png_ptr - not info_ptr, that left png_set_PLTE() open to the CVE-2015-8126 - vulnerability. Fixes CVE-2015-8472. - -Version 1.6.20beta03 [November 24, 2015] - Backported tests from libpng-1.7.0beta69. - -Version 1.6.20rc01 [November 26, 2015] - Fixed an error in handling of bad zlib CMINFO field in pngfix, found by - American Fuzzy Lop, reported by Brian Carpenter. inflate() doesn't - immediately fault a bad CMINFO field; instead a 'too far back' error - happens later (at least some times). pngfix failed to limit CMINFO to - the allowed values but then assumed that window_bits was in range, - triggering an assert. The bug is mostly harmless; the PNG file cannot - be fixed. - -Version 1.6.20rc02 [November 29, 2015] - In libpng 1.6 zlib initialization was changed to use the window size - in the zlib stream, not a fixed value. This causes some invalid images, - where CINFO is too large, to display 'correctly' if the rest of the - data is valid. This provides a workaround for zlib versions where the - error arises (ones that support the API change to use the window size - in the stream). - -Version 1.6.20 [December 3, 2015] - No changes. - -Version 1.6.21beta01 [December 11, 2015] - Fixed syntax "$(command)" in tests/pngstest that some shells other than - bash could not parse (Bug report by Nelson Beebe). Use `command` instead. - -Version 1.6.21beta02 [December 14, 2015] - Moved png_check_keyword() from pngwutil.c to pngset.c - Removed LE/BE dependencies in pngvalid, to 'fix' the current problem - in the BigEndian tests by not testing it, making the BE code the same - as the LE version. - Fixes to pngvalid for various reduced build configurations (eliminate unused - statics) and a fix for the case in rgb_to_gray when the digitize option - reduces graylo to 0, producing a large error. - -Version 1.6.21beta03 [December 18, 2015] - Widened the 'limit' check on the internally calculated error limits in - the 'DIGITIZE' case (the code used prior to 1.7 for rgb_to_gray error - checks) and changed the check to only operate in non-release builds - (base build type not RC or RELEASE.) - Fixed undefined behavior in pngvalid.c, undefined because - (png_byte) << shift is undefined if it changes the signed bit - (because png_byte is promoted to int). The libpng exported functions - png_get_uint_32 and png_get_uint_16 handle this. (Bug reported by - David Drysdale as a result of reports from UBSAN in clang 3.8). - This changes pngvalid to use BE random numbers; this used to produce - errors but these should not be fixed as a result of the previous changes. - -Version 1.6.21rc01 [January 4, 2016] - In projects/vstudio, combined readme.txt and WARNING into README.txt - -Version 1.6.21rc02 [January 7, 2016] - Relocated assert() in contrib/tools/pngfix.c, bug found by American - Fuzzy Lop, reported by Brian Carpenter. - Marked 'limit' UNUSED in transform_range_check(). This only affects - release builds. - -Version 1.6.21 [January 15, 2016] - Worked around a false-positive Coverity issue in pngvalid.c. - -Version 1.6.22beta01 [January 23, 2016] - Changed PNG_USE_MKSTEMP to __COVERITY__ to select alternate - "tmpfile()" implementation in contrib/libtests/pngstest.c - Fixed NO_STDIO build of pngunknown.c to skip calling png_init_io() - if there is no stdio.h support. - Added a png_image_write_to_memory() API and a number of assist macros - to allow an application that uses the simplified API write to bypass - stdio and write directly to memory. - Added some warnings (png.h) and some check code to detect *possible* - overflow in the ROW_STRIDE and simplified image SIZE macros. This - disallows image width/height/format that *might* overflow. This is - a quiet API change that limits in-memory image size (uncompressed) to - less than 4GByte and image row size (stride) to less than 2GByte. - Revised workaround for false-positive Coverity issue in pngvalid.c. - -Version 1.6.22beta02 [February 8, 2016] - Only use exit(77) in configure builds. - Corrected error in PNG_IMAGE_PNG_SIZE_MAX. This new macro underreported - the palette size because it failed to take into account that the memory - palette has to be expanded to full RGB when it is written to PNG. - Updated CMakeLists.txt, added supporting scripts/gen*.cmake.in - and test.cmake.in (Roger Leigh). - Relaxed limit checks on gamma values in pngrtran.c. As suggested in - the comments gamma values outside the range currently permitted - by png_set_alpha_mode are useful for HDR data encoding. These values - are already permitted by png_set_gamma so it is reasonable caution to - extend the png_set_alpha_mode range as HDR imaging systems are starting - to emerge. - -Version 1.6.22beta03 [March 9, 2016] - Added a common-law trademark notice and export control information - to the LICENSE file, png.h, and the man page. - Restored "& 0xff" in png_save_uint_16() and png_save_uint_32() that - were accidentally removed from libpng-1.6.17. - Changed PNG_INFO_cHNK and PNG_FREE_cHNK from 0xnnnn to 0xnnnnU in png.h - (Robert C. Seacord). - Removed dubious "#if INT_MAX" test from png.h that was added to - libpng-1.6.19beta02 (John Bowler). - Add ${INCLUDES} in scripts/genout.cmake.in (Bug report by Nixon Kwok). - Updated LICENSE to say files in the contrib directory are not - necessarily under the libpng license, and that some makefiles have - other copyright owners. - Added INTEL-SSE2 support (Mike Klein and Matt Sarett, Google, Inc.). - Made contrib/libtests/timepng more robust. The code no longer gives - up/fails on invalid PNG data, it just skips it (with error messages). - The code no longer fails on PNG files with data beyond IEND. Options - exist to use png_read_png (reading the whole image, not by row) and, in - that case, to apply any of the supported transforms. This makes for - more realistic testing; the decoded data actually gets used in a - meaningful fashion (John Bowler). - Fixed some misleading indentation (Krishnaraj Bhat). - -Version 1.6.22beta04 [April 5, 2016] - Force GCC compilation to C89 if needed (Dagobert Michelsen). - SSE filter speed improvements for bpp=3: - memcpy-free implementations of load3() / store3(). - call load3() only when needed at the end of a scanline. - -Version 1.6.22beta05 [April 27, 2016] - Added PNG_FAST_FILTERS macro (defined as - PNG_FILTER_NONE|PNG_FILTER_SUB|PNG_FILTER_UP). - Various fixes for contrib/libtests/timepng.c - Moved INTEL-SSE code from pngpriv.h into contrib/intel/intel_sse.patch. - Fixed typo (missing underscore) in #define PNG_READ_16_TO_8_SUPPORTED - (Bug report by Y.Ohashik). - -Version 1.6.22beta06 [May 5, 2016] - Rebased contrib/intel_sse.patch. - Quieted two Coverity issues in contrib/libtests/timepng.c. - Fixed issues with scripts/genout.cmake.in (David Capello, Nixon Kwok): - Added support to use multiple directories in ZLIBINCDIR variable, - Fixed CMAKE_C_FLAGS with multiple values when genout is compiled on MSVC, - Fixed pnglibconf.c compilation on OS X including the sysroot path. - -Version 1.6.22rc01 [May 14, 2016] - No changes. - -Version 1.6.22rc02 [May 16, 2016] - Removed contrib/timepng from default build; it does not build on platforms - that don't supply clock_gettime(). - -Version 1.6.22rc03 [May 17, 2016] - Restored contrib/timepng to default build but check for the presence - of clock_gettime() in configure.ac and Makefile.am. - -Version 1.6.22 [May 26, 2016] - No changes. - -Version 1.6.23beta01 [May 29, 2016] - Stop a potential memory leak in png_set_tRNS() (Bug report by Ted Ying). - Fixed the progressive reader to handle empty first IDAT chunk properly - (patch by Timothy Nikkel). This bug was introduced in libpng-1.6.0 and - only affected the libpng16 branch. - Added tests in pngvalid.c to check zero-length IDAT chunks in various - positions. Fixed the sequential reader to handle these more robustly - (John Bowler). - -Version 1.6.23rc01 [June 2, 2016] - Corrected progressive read input buffer in pngvalid.c. The previous version - the code invariably passed just one byte at a time to libpng. The intent - was to pass a random number of bytes in the range 0..511. - Moved sse2 prototype from pngpriv.h to contrib/intel/intel_sse.patch. - Added missing ")" in pngerror.c (Matt Sarrett). - -Version 1.6.23rc02 [June 4, 2016] - Fixed undefined behavior in png_push_save_buffer(). Do not call - memcpy() with a null source, even if count is zero (Leon Scroggins III). - -Version 1.6.23 [June 9, 2016] - Fixed bad link to RFC2083 in png.5 (Nikola Forro). - -Version 1.6.24beta01 [June 11, 2016] - Avoid potential overflow of the PNG_IMAGE_SIZE macro. This macro - is not used within libpng, but is used in some of the examples. - -Version 1.6.24beta02 [June 23, 2016] - Correct filter heuristic overflow handling. This was broken when the - write filter code was moved out-of-line; if there is a single filter and - the heuristic sum overflows the calculation of the filtered line is not - completed. In versions prior to 1.6 the code was duplicated in-line - and the check not performed, so the filter operation completed; however, - in the multi-filter case where the sum is performed the 'none' filter would - be selected if all the sums overflowed, even if it wasn't in the filter - list. The fix to the first problem is simply to provide PNG_SIZE_MAX as - the current lmins sum value; this means the sum can never exceed it and - overflows silently. A reasonable compiler that does choose to inline - the code will simply eliminate the sum check. - The fix to the second problem is to use high precision arithmetic (this is - implemented in 1.7), however a simple safe fix here is to chose the lowest - numbered filter in the list from png_set_filter (this only works if the - first problem is also fixed) (John Bowler). - Use a more efficient absolute value calculation on SSE2 (Matthieu Darbois). - Fixed the case where PNG_IMAGE_BUFFER_SIZE can overflow in the application - as a result of the application using an increased 'row_stride'; previously - png_image_finish_read only checked for overflow on the base calculation of - components. (I.e. it checked for overflow of a 32-bit number on the total - number of pixel components in the output format, not the possibly padded row - length and not the number of bytes, which for linear formats is twice the - number of components.) - MSVC does not like '-(unsigned)', so replaced it with 0U-(unsigned) - MSVC does not like (uInt) = -(unsigned) (i.e. as an initializer), unless - the conversion is explicitly invoked by a cast. - Put the SKIP definition in the correct place. It needs to come after the - png.h include (see all the other .c files in contrib/libtests) because it - depends on PNG_LIBPNG_VER. - Removed the three compile warning options from the individual project - files into the zlib.props globals. It increases the warning level from 4 - to All and adds a list of the warnings that need to be turned off. This is - semi-documentary; the intent is to tell libpng users which warnings have - been examined and judged non-fixable at present. The warning about - structure padding is fixable, but it would be a significant change (moving - structure members around). - -Version 1.6.24beta03 [July 4, 2016] - Optimized absolute value calculation in filter selection, similar to - code in the PAETH decoder in pngrutil.c. Build with PNG_USE_ABS to - use this. - Added pngcp to the build together with a pngcp.dfa configuration test. - Added high resolution timing to pngcp. - Added "Common linking failures" section to INSTALL. - Relocated misplaced #endif in png.c sRGB profile checking. - Fixed two Coverity issues in pngcp.c. - -Version 1.6.24beta04 [July 8, 2016] - Avoid filter-selection heuristic sum calculations in cases where only one - filter is a candidate for selection. This trades off code size (added - private png_setup_*_row_only() functions) for speed. - -Version 1.6.24beta05 [July 13, 2016] - Fixed some indentation to comply with our coding style. - Added contrib/tools/reindent. - -Version 1.6.24beta06 [July 18, 2016] - Fixed more indentation to comply with our coding style. - Eliminated unnecessary tests of boolean png_isaligned() vs 0. - -Version 1.6.24rc01 [July 25, 2016] - No changes. - -Version 1.6.24rc02 [August 1, 2016] - Conditionally compile SSE2 headers in contrib/intel/intel_sse.patch - Conditionally compile png_decompress_chunk(). - -Version 1.6.24rc03 [August 2, 2016] - Conditionally compile ARM_NEON headers in pngpriv.h - Updated contrib/intel/intel_sse.patch - -Version 1.6.24[August 4, 2016] - No changes. - -Version 1.6.25beta01 [August 12, 2016] - Reject oversized iCCP profile immediately. - Cleaned up PNG_DEBUG compile of pngtest.c. - Conditionally compile png_inflate(). - -Version 1.6.25beta02 [August 18, 2016] - Don't install pngcp; it conflicts with pngcp in the pngtools package. - Minor editing of INSTALL, (whitespace, added copyright line) - -Version 1.6.25rc01 [August 24, 2016] - No changes. - -Version 1.6.25rc02 [August 29, 2016] - Added MIPS support (Mandar Sahastrabuddhe ). - Only the UP filter is currently implemented. - -Version 1.6.25rc03 [August 29, 2016] - Rebased contrib/intel/intel_sse.patch after the MIPS implementation. - -Version 1.6.25rc04 [August 30, 2016] - Added MIPS support for SUB, AVG, and PAETH filters (Mandar Sahastrabuddhe). - -Version 1.6.25rc05 [August 30, 2016] - Rebased contrib/intel/intel_sse.patch after the MIPS implementation update.. - -Version 1.6.25 [September 1, 2016] - No changes. - -Version 1.6.26beta01 [September 26, 2016] - Fixed handling zero length IDAT in pngfix (bug report by Agostino Sarubbo, - bugfix by John Bowler). - Do not issue a png_error() on read in png_set_pCAL() because png_handle_pCAL - has allocated memory that libpng needs to free. - Conditionally compile png_set_benign_errors() in pngread.c and pngtest.c - Issue a png_benign_error instead of a png_error on ADLER32 mismatch - while decoding compressed data chunks. - Changed PNG_ZLIB_VERNUM to ZLIB_VERNUM in pngpriv.h, pngstruct.h, and - pngrutil.c. - If CRC handling of critical chunks has been set to PNG_CRC_QUIET_USE, - ignore the ADLER32 checksum in the IDAT chunk as well as the chunk CRCs. - Issue png_benign_error() on ADLER32 checksum mismatch instead of png_error(). - Add tests/badcrc.png and tests/badadler.png to tests/pngtest. - Merged pngtest.c with libpng-1.7.0beta84/pngtest.c - -Version 1.6.26beta02 [October 1, 2016] - Updated the documentation about CRC and ADLER32 handling. - Quieted 117 warnings from clang-3.8 in pngtrans.c, pngread.c, - pngwrite.c, pngunknown.c, and pngvalid.c. - Quieted 58 (out of 144) -Wconversion compiler warnings by changing - flag definitions in pngpriv.h from 0xnnnn to 0xnnnnU and trivial changes - in png.c, pngread.c, and pngwutil.c. - -Version 1.6.26beta03 [October 2, 2016] - Removed contrib/libtests/*.orig and *.rej that slipped into the tarballs. - Quieted the 86 remaining -Wconversion compiler warnings by - revising the png_isaligned() macro and trivial changes in png.c, - pngerror.c, pngget.c, pngmem.c, pngset.c, pngrtran.c, pngrutil.c, - pngwtran.c, pngwrite.c, and pngwutil.c. - -Version 1.6.26beta04 [October 3, 2016] - Quieted (bogus?) clang warnings about "absolute value has no effect" - when PNG_USE_ABS is defined. - Fixed offsets in contrib/intel/intel_sse.patch - -Version 1.6.26beta05 [October 6, 2016] - Changed integer constant 4294967294 to unsigned 4294967294U in pngconf.h - to avoid a signed/unsigned compare in the preprocessor. - -Version 1.6.26beta06 [October 7, 2016] - Use zlib-1.2.8.1 inflateValidate() instead of inflateReset2() to - optionally avoid ADLER32 evaluation. - -Version 1.6.26rc01 [October 12, 2016] - No changes. - -Version 1.6.26 [October 20, 2016] - Cosmetic change, "ptr != 0" to "ptr != NULL" in png.c and pngrutil.c - Despammed email addresses (replaced "@" with " at "). - -Version 1.6.27beta01 [November 2, 2016] - Restrict the new ADLER32-skipping to IDAT chunks. It broke iCCP chunk - handling: an erroneous iCCP chunk would throw a png_error and reject the - entire PNG image instead of rejecting just the iCCP chunk with a warning, - if built with zlib-1.2.8.1. - -Version 1.6.27rc01 [December 27, 2016] - Control ADLER32 checking with new PNG_IGNORE_ADLER32 option. Fixes - an endless loop when handling erroneous ADLER32 checksums; bug - introduced in libpng-1.6.26. - Removed the use of a macro containing the pre-processor 'defined' - operator. It is unclear whether this is valid; a macro that - "generates" 'defined' is not permitted, but the use of the word - "generates" within the C90 standard seems to imply more than simple - substitution of an expression itself containing a well-formed defined - operation. - Added ARM support to CMakeLists.txt (Andreas Franek). - -Version 1.6.27 [December 29, 2016] - Fixed a potential null pointer dereference in png_set_text_2() (bug report - and patch by Patrick Keshishian, CVE-2016-10087). - -Version 1.6.28rc01 [January 3, 2017] - Fixed arm/aarch64 detection in CMakeLists.txt (Gianfranco Costamagna). - Added option to Cmake build allowing a custom location of zlib to be - specified in a scenario where libpng is being built as a subproject - alongside zlib by another project (Sam Serrels). - Changed png_ptr->options from a png_byte to png_uint_32, to accommodate - up to 16 options. - -Version 1.6.28rc02 [January 4, 2017] - Added "include(GNUInstallDirs)" to CMakeLists.txt (Gianfranco Costamagna). - Moved SSE2 optimization code into the main libpng source directory. - Configure libpng with "configure --enable-intel-sse" or compile - libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it. - -Version 1.6.28rc03 [January 4, 2017] - Backed out the SSE optimization and last CMakeLists.txt to allow time for QA. - -Version 1.6.28 [January 5, 2017] - No changes. - -Version 1.6.29beta01 [January 12, 2017] - Readded "include(GNUInstallDirs)" to CMakeLists.txt (Gianfranco Costamagna). - Moved SSE2 optimization code into the main libpng source directory. - Configure libpng with "configure --enable-intel-sse" or compile - libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it. - Simplified conditional compilation in pngvalid.c, for AIX (Michael Felt). - -Version 1.6.29beta02 [February 22, 2017] - Avoid conditional directives that break statements in pngrutil.c (Romero - Malaquias) - The contrib/examples/pngtopng.c recovery code was in the wrong "if" - branches; the comments were correct. - Added code for PowerPC VSX optimisation (Vadim Barkov). - -Version 1.6.29beta03 [March 1, 2017] - Avoid potential overflow of shift operations in png_do_expand() (Aaron Boxer). - Change test ZLIB_VERNUM >= 0x1281 to ZLIB_VERNUM >= 0x1290 in pngrutil.c - because Solaris 11 distributes zlib-1.2.8.f that is older than 1.2.8.1, - as suggested in zlib FAQ, item 24. - Suppress clang warnings about implicit sign changes in png.c - -Version 1.6.29 [March 16, 2017] - No changes. - -Version 1.6.30beta01 [April 1, 2017] - Added missing "$(CPPFLAGS)" to the compile line for c.pic.o in - makefile.linux and makefile.solaris-x86 (Cosmin). - Revised documentation of png_get_error_ptr() in the libpng manual. - Silence clang -Wcomma and const drop warnings (Viktor Szakats). - Update Sourceforge URLs in documentation (https instead of http). - -Version 1.6.30beta02 [April 22, 2017] - Document need to check for integer overflow when allocating a pixel - buffer for multiple rows in contrib/gregbook, contrib/pngminus, - example.c, and in the manual (suggested by Jaeseung Choi). This - is similar to the bug reported against pngquant in CVE-2016-5735. - Removed reference to the obsolete PNG_SAFE_LIMITS macro in the documentation. - -Version 1.6.30beta03 [May 22, 2017] - Check for integer overflow in contrib/visupng and contrib/tools/genpng. - Do not double evaluate CMAKE_SYSTEM_PROCESSOR in CMakeLists.txt. - Test CMAKE_HOST_WIN32 instead of WIN32 in CMakeLists.txt. - Fix some URL in documentation. - -Version 1.6.30beta04 [June 7, 2017] - Avoid writing an empty IDAT when the last IDAT exactly fills the - compression buffer (bug report by Brian Baird). This bug was - introduced in libpng-1.6.0. - -Version 1.6.30rc01 [June 14, 2017] - No changes. - -Version 1.6.30rc02 [June 25, 2017] - Update copyright year in pnglibconf.h, make ltmain.sh executable. - Add a reference to the libpng.download site in README. - -Version 1.6.30 [June 28, 2017] - No changes. - -Version 1.6.31beta01 [July 5, 2017] - Guard the definition of _POSIX_SOURCE in pngpriv.h (AIX already defines it; - bug report by Michael Felt). - Revised pngpriv.h to work around failure to compile arm/filter_neon.S - ("typedef" directive is unrecognized by the assembler). The problem - was introduced in libpng-1.6.30beta01. - Added "Requires: zlib" to libpng.pc.in (Pieter Neerincx). - Added special case for FreeBSD in arm/filter_neon.S (Maya Rashish). - -Version 1.6.31beta02 [July 8, 2017] - Added instructions for disabling hardware optimizations in INSTALL. - Added "--enable-hardware-optimizations" configuration flag to enable - or disable all hardware optimizations with one flag. - -Version 1.6.31beta03 [July 9, 2017] - Updated CMakeLists.txt to add INTEL_SSE and MIPS_MSA platforms. - Changed "int" to "png_size_t" in intel/filter_sse2.c to prevent - possible integer overflow (Bug report by John Bowler). - Quieted "declaration after statement" warnings in intel/filter_sse2.c. - Added scripts/makefile-linux-opt, which has hardware optimizations enabled. - -Version 1.6.31beta04 [July 11, 2017] - Removed one of the GCC-7.1.0 'strict-overflow' warnings that result when - integers appear on both sides of a compare. Worked around the others by - forcing the strict-overflow setting in the relevant functions to a level - where they are not reported (John Bowler). - Changed "FALL THROUGH" comments to "FALLTHROUGH" because GCC doesn't like - the space. - Worked around some C-style casts from (void*) because g++ 5.4.0 objects - to them. - Increased the buffer size for 'sprint' to pass the gcc 7.1.0 'sprint - overflow' check that is on by default with -Wall -Wextra. - -Version 1.6.31beta05 [July 13, 2017] - Added eXIf chunk support. - -Version 1.6.31beta06 [July 17, 2017] - Added a minimal eXIf chunk (with Orientation and FocalLengthIn35mmFilm - tags) to pngtest.png. - -Version 1.6.31beta07 [July 18, 2017] - Revised the eXIf chunk in pngtest.png to fix "Bad IFD1 Directory" warning. - -Version 1.6.31rc01 [July 19, 2017] - No changes. - -Version 1.6.31rc02 [July 25, 2017] - Fixed typo in example.c (png_free_image should be png_image_free) (Bug - report by John Smith) - -Version 1.6.31 [July 27, 2017] - No changes. - -Version 1.6.32beta01 [July 31, 2017] - Avoid possible NULL dereference in png_handle_eXIf when benign_errors - are allowed. Avoid leaking the input buffer "eXIf_buf". - Eliminated png_ptr->num_exif member from pngstruct.h and added num_exif - to arguments for png_get_eXIf() and png_set_eXIf(). - Added calls to png_handle_eXIf(() in pngread.c and png_write_eXIf() in - pngwrite.c, and made various other fixes to png_write_eXIf(). - Changed name of png_get_eXIF and png_set_eXIf() to png_get_eXIf_1() and - png_set_eXIf_1(), respectively, to avoid breaking API compatibility - with libpng-1.6.31. - -Version 1.6.32beta02 [August 1, 2017] - Updated contrib/libtests/pngunknown.c with eXIf chunk. - -Version 1.6.32beta03 [August 2, 2017] - Initialized btoa[] in pngstest.c - Stop memory leak when returning from png_handle_eXIf() with an error - (Bug report from the OSS-fuzz project). - -Version 1.6.32beta04 [August 2, 2017] - Replaced local eXIf_buf with info_ptr-eXIf_buf in png_handle_eXIf(). - Update libpng.3 and libpng-manual.txt about eXIf functions. - -Version 1.6.32beta05 [August 2, 2017] - Restored png_get_eXIf() and png_set_eXIf() to maintain API compatibility. - -Version 1.6.32beta06 [August 2, 2017] - Removed png_get_eXIf_1() and png_set_eXIf_1(). - -Version 1.6.32beta07 [August 3, 2017] - Check length of all chunks except IDAT against user limit to fix an - OSS-fuzz issue (Fixes CVE-2017-12652). - -Version 1.6.32beta08 [August 3, 2017] - Check length of IDAT against maximum possible IDAT size, accounting - for height, rowbytes, interlacing and zlib/deflate overhead. - Restored png_get_eXIf_1() and png_set_eXIf_1(), because strlen(eXIf_buf) - does not work (the eXIf chunk data can contain zeroes). - -Version 1.6.32beta09 [August 3, 2017] - Require cmake-2.8.8 in CMakeLists.txt. Revised symlink creation, - no longer using deprecated cmake LOCATION feature (Clifford Yapp). - Fixed five-byte error in the calculation of IDAT maximum possible size. - -Version 1.6.32beta10 [August 5, 2017] - Moved chunk-length check into a png_check_chunk_length() private - function (Suggested by Max Stepin). - Moved bad pngs from tests to contrib/libtests/crashers - Moved testing of bad pngs into a separate tests/pngtest-badpngs script - Added the --xfail (expected FAIL) option to pngtest.c. It writes XFAIL - in the output but PASS for the libpng test. - Require cmake-3.0.2 in CMakeLists.txt (Clifford Yapp). - Fix "const" declaration info_ptr argument to png_get_eXIf_1() and the - num_exif argument to png_get_eXIf_1() (Github Issue 171). - -Version 1.6.32beta11 [August 7, 2017] - Added "eXIf" to "chunks_to_ignore[]" in png_set_keep_unknown_chunks(). - Added huge_IDAT.png and empty_ancillary_chunks.png to testpngs/crashers. - Make pngtest --strict, --relax, --xfail options imply -m (multiple). - Removed unused chunk_name parameter from png_check_chunk_length(). - Relocated setting free_me for eXIf data, to stop an OSS-fuzz leak. - Initialize profile_header[] in png_handle_iCCP() to fix OSS-fuzz issue. - Initialize png_ptr->row_buf[0] to 255 in png_read_row() to fix OSS-fuzz UMR. - Attempt to fix a UMR in png_set_text_2() to fix OSS-fuzz issue. - Increase minimum zlib stream from 9 to 14 in png_handle_iCCP(), to account - for the minimum 'deflate' stream, and relocate the test to a point - after the keyword has been read. - Check that the eXIf chunk has at least 2 bytes and begins with "II" or "MM". - -Version 1.6.32rc01 [August 18, 2017] - Added a set of "huge_xxxx_chunk.png" files to contrib/testpngs/crashers, - one for each known chunk type, with length = 2GB-1. - Check for 0 return from png_get_rowbytes() and added some (size_t) typecasts - in contrib/pngminus/*.c to stop some Coverity issues (162705, 162706, - and 162707). - Renamed chunks in contrib/testpngs/crashers to avoid having files whose - names differ only in case; this causes problems with some platforms - (github issue #172). - -Version 1.6.32rc02 [August 22, 2017] - Added contrib/oss-fuzz directory which contains files used by the oss-fuzz - project (https://github.com/google/oss-fuzz/tree/master/projects/libpng). - -Version 1.6.32 [August 24, 2017] - No changes. - -Version 1.6.33beta01 [August 28, 2017] - Added PNGMINUS_UNUSED macro to contrib/pngminus/p*.c and added missing - parenthesis in contrib/pngminus/pnm2png.c (bug report by Christian Hesse). - Fixed off-by-one error in png_do_check_palette_indexes() (Bug report - by Mick P., Source Forge Issue #269). - -Version 1.6.33beta02 [September 3, 2017] - Initialize png_handler.row_ptr in contrib/oss-fuzz/libpng_read_fuzzer.cc - to fix shortlived oss-fuzz issue 3234. - Compute a larger limit on IDAT because some applications write a deflate - buffer for each row (Bug report by Andrew Church). - Use current date (DATE) instead of release-date (RDATE) in last - changed date of contrib/oss-fuzz files. - Enabled ARM support in CMakeLists.txt (Bernd Kuhls). - -Version 1.6.33beta03 [September 14, 2017] - Fixed incorrect typecast of some arguments to png_malloc() and - png_calloc() that were png_uint_32 instead of png_alloc_size_t - (Bug report by "irwir" in Github libpng issue #175). - Use pnglibconf.h.prebuilt when building for ANDROID with cmake (Github - issue 162, by rcdailey). - -Version 1.6.33rc01 [September 20, 2017] - Initialize memory allocated by png_inflate to zero, using memset, to - stop an oss-fuzz "use of uninitialized value" detection in png_set_text_2() - due to truncated iTXt or zTXt chunk. - Initialize memory allocated by png_read_buffer to zero, using memset, to - stop an oss-fuzz "use of uninitialized value" detection in - png_icc_check_tag_table() due to truncated iCCP chunk. - Removed a redundant test (suggested by "irwir" in Github issue #180). - -Version 1.6.33rc02 [September 23, 2017] - Added an interlaced version of each file in contrib/pngsuite. - Relocate new memset() call in pngrutil.c. - Removed more redundant tests (suggested by "irwir" in Github issue #180). - Add support for loading images with associated alpha in the Simplified - API (Samuel Williams). - -Version 1.6.33 [September 28, 2017] - Revert contrib/oss-fuzz/libpng_read_fuzzer.cc to libpng-1.6.32 state. - Initialize png_handler.row_ptr in contrib/oss-fuzz/libpng_read_fuzzer.cc - Add end_info structure and png_read_end() to the libpng fuzzer. - -Version 1.6.34 [September 29, 2017] - Removed contrib/pngsuite/i*.png; some of them caused test failures. - -Version 1.6.35beta01 [March 6, 2018] - Restored 21 of the contrib/pngsuite/i*.png, which do not cause test - failures. Placed the remainder in contrib/pngsuite/interlaced/i*.png. - Added calls to png_set_*() transforms commonly used by browsers to - the fuzzer. - Removed some unnecessary brackets in pngrtran.c - Fixed miscellaneous typos (Patch by github user "luzpaz"). - Change "ASM C" to "C ASM" in CMakeLists.txt - Fixed incorrect handling of bKGD chunk in sub-8-bit files (Cosmin) - Added hardware optimization directories to zip and 7z distributions. - Fixed incorrect bitmask for options. - Fixed many spelling typos. - -Version 1.6.35beta02 [March 28, 2018] - Make png_get_iCCP consistent with man page (allow compression-type argument - to be NULL, bug report by Lenard Szolnoki). - -Version 1.6.35 [July 15, 2018] - Replaced the remaining uses of png_size_t with size_t (Cosmin) - Fixed the calculation of row_factor in png_check_chunk_length - (reported by Thuan Pham in SourceForge issue #278) - Added missing parentheses to a macro definition - (suggested by "irwir" in GitHub issue #216) - -Version 1.6.36 [December 1, 2018] - Optimized png_do_expand_palette for ARM processors. - Improved performance by around 10-22% on a recent ARM Chromebook. - (Contributed by Richard Townsend, ARM Holdings) - Fixed manipulation of machine-specific optimization options. - (Contributed by Vicki Pfau) - Used memcpy instead of manual pointer arithmetic on Intel SSE2. - (Contributed by Samuel Williams) - Fixed build errors with MSVC on ARM64. - (Contributed by Zhijie Liang) - Fixed detection of libm in CMakeLists. - (Contributed by Cameron Cawley) - Fixed incorrect creation of pkg-config file in CMakeLists. - (Contributed by Kyle Bentley) - Fixed the CMake build on Windows MSYS by avoiding symlinks. - Fixed a build warning on OpenBSD. - (Contributed by Theo Buehler) - Fixed various typos in comments. - (Contributed by "luz.paz") - Raised the minimum required CMake version from 3.0.2 to 3.1. - Removed yet more of the vestigial support for pre-ANSI C compilers. - Removed ancient makefiles for ancient systems that have been broken - across all previous libpng-1.6.x versions. - Removed the Y2K compliance statement and the export control - information. - Applied various code style and documentation fixes. - -Version 1.6.37 [April 14, 2019] - Fixed a use-after-free vulnerability (CVE-2019-7317) in png_image_free. - Fixed a memory leak in the ARM NEON implementation of png_do_expand_palette. - Fixed a memory leak in pngtest.c. - Fixed two vulnerabilities (CVE-2018-14048, CVE-2018-14550) in - contrib/pngminus; refactor. - Changed the license of contrib/pngminus to MIT; refresh makefile and docs. - (Contributed by Willem van Schaik) - Fixed a typo in the libpng license v2. - (Contributed by Miguel Ojeda) - Added makefiles for AddressSanitizer-enabled builds. - Cleaned up various makefiles. - -Send comments/corrections/commendations to png-mng-implement at lists.sf.net. -Subscription is required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement -to subscribe. diff --git a/thirdparty/libpng-1.6.37/CMakeLists.txt b/thirdparty/libpng-1.6.37/CMakeLists.txt deleted file mode 100644 index 6451fcf..0000000 --- a/thirdparty/libpng-1.6.37/CMakeLists.txt +++ /dev/null @@ -1,931 +0,0 @@ -# CMakeLists.txt - -# Copyright (C) 2018 Cosmin Truta -# Copyright (C) 2007,2009-2018 Glenn Randers-Pehrson -# Written by Christian Ehrlicher, 2007 -# Revised by Roger Lowman, 2009-2010 -# Revised by Clifford Yapp, 2011-2012,2017 -# Revised by Roger Leigh, 2016 -# Revised by Andreas Franek, 2016 -# Revised by Sam Serrels, 2017 -# Revised by Vadim Barkov, 2017 -# Revised by Vicky Pfau, 2018 -# Revised by Cameron Cawley, 2018 -# Revised by Cosmin Truta, 2018 -# Revised by Kyle Bentley, 2018 - -# This code is released under the libpng license. -# For conditions of distribution and use, see the disclaimer -# and license in png.h - -cmake_minimum_required(VERSION 3.1) -cmake_policy(VERSION 3.1) - -project(libpng C ASM) -enable_testing() - -set(PNGLIB_MAJOR 1) -set(PNGLIB_MINOR 6) -set(PNGLIB_RELEASE 37) -set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) -set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) - -include(GNUInstallDirs) - -# needed packages - -# Allow users to specify location of Zlib. -# Useful if zlib is being built alongside this as a sub-project. -option(PNG_BUILD_ZLIB "Custom zlib Location, else find_package is used" OFF) - -if(NOT PNG_BUILD_ZLIB) - find_package(ZLIB REQUIRED) - include_directories(${ZLIB_INCLUDE_DIR}) -endif() - -if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU) - find_library(M_LIBRARY m) -else() - # libm is not needed and/or not available - set(M_LIBRARY "") -endif() - -# COMMAND LINE OPTIONS -option(PNG_SHARED "Build shared lib" ON) -option(PNG_STATIC "Build static lib" ON) -option(PNG_TESTS "Build libpng tests" ON) - -# Many more configuration options could be added here -option(PNG_FRAMEWORK "Build OS X framework" OFF) -option(PNG_DEBUG "Build with debug output" OFF) -option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations" ON) - -set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names") -set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings") - -if(PNG_HARDWARE_OPTIMIZATIONS) - -# set definitions and sources for arm -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") - set(PNG_ARM_NEON_POSSIBLE_VALUES check on off) - set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations: - check: (default) use internal checking code; - off: disable the optimizations; - on: turn on unconditionally.") - set_property(CACHE PNG_ARM_NEON PROPERTY STRINGS - ${PNG_ARM_NEON_POSSIBLE_VALUES}) - list(FIND PNG_ARM_NEON_POSSIBLE_VALUES ${PNG_ARM_NEON} index) - if(index EQUAL -1) - message(FATAL_ERROR - "PNG_ARM_NEON must be one of [${PNG_ARM_NEON_POSSIBLE_VALUES}]") - elseif(NOT ${PNG_ARM_NEON} STREQUAL "off") - set(libpng_arm_sources - arm/arm_init.c - arm/filter_neon.S - arm/filter_neon_intrinsics.c - arm/palette_neon_intrinsics.c) - - if(${PNG_ARM_NEON} STREQUAL "on") - add_definitions(-DPNG_ARM_NEON_OPT=2) - elseif(${PNG_ARM_NEON} STREQUAL "check") - add_definitions(-DPNG_ARM_NEON_CHECK_SUPPORTED) - endif() - else() - add_definitions(-DPNG_ARM_NEON_OPT=0) - endif() -endif() - -# set definitions and sources for powerpc -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*") - set(PNG_POWERPC_VSX_POSSIBLE_VALUES on off) - set(PNG_POWERPC_VSX "on" CACHE STRING "Enable POWERPC VSX optimizations: - off: disable the optimizations.") - set_property(CACHE PNG_POWERPC_VSX PROPERTY STRINGS - ${PNG_POWERPC_VSX_POSSIBLE_VALUES}) - list(FIND PNG_POWERPC_VSX_POSSIBLE_VALUES ${PNG_POWERPC_VSX} index) - if(index EQUAL -1) - message(FATAL_ERROR - "PNG_POWERPC_VSX must be one of [${PNG_POWERPC_VSX_POSSIBLE_VALUES}]") - elseif(NOT ${PNG_POWERPC_VSX} STREQUAL "off") - set(libpng_powerpc_sources - powerpc/powerpc_init.c - powerpc/filter_vsx_intrinsics.c) - if(${PNG_POWERPC_VSX} STREQUAL "on") - add_definitions(-DPNG_POWERPC_VSX_OPT=2) - endif() - else() - add_definitions(-DPNG_POWERPC_VSX_OPT=0) - endif() -endif() - -# set definitions and sources for intel -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*") - set(PNG_INTEL_SSE_POSSIBLE_VALUES on off) - set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations: - off: disable the optimizations") - set_property(CACHE PNG_INTEL_SSE PROPERTY STRINGS - ${PNG_INTEL_SSE_POSSIBLE_VALUES}) - list(FIND PNG_INTEL_SSE_POSSIBLE_VALUES ${PNG_INTEL_SSE} index) - if(index EQUAL -1) - message(FATAL_ERROR - "PNG_INTEL_SSE must be one of [${PNG_INTEL_SSE_POSSIBLE_VALUES}]") - elseif(NOT ${PNG_INTEL_SSE} STREQUAL "off") - set(libpng_intel_sources - intel/intel_init.c - intel/filter_sse2_intrinsics.c) - if(${PNG_INTEL_SSE} STREQUAL "on") - add_definitions(-DPNG_INTEL_SSE_OPT=1) - endif() - else() - add_definitions(-DPNG_INTEL_SSE_OPT=0) - endif() -endif() - -# set definitions and sources for MIPS -if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*") - set(PNG_MIPS_MSA_POSSIBLE_VALUES on off) - set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations: - off: disable the optimizations") - set_property(CACHE PNG_MIPS_MSA PROPERTY STRINGS - ${PNG_MIPS_MSA_POSSIBLE_VALUES}) - list(FIND PNG_MIPS_MSA_POSSIBLE_VALUES ${PNG_MIPS_MSA} index) - if(index EQUAL -1) - message(FATAL_ERROR - "PNG_MIPS_MSA must be one of [${PNG_MIPS_MSA_POSSIBLE_VALUES}]") - elseif(NOT ${PNG_MIPS_MSA} STREQUAL "off") - set(libpng_mips_sources - mips/mips_init.c - mips/filter_msa_intrinsics.c) - if(${PNG_MIPS_MSA} STREQUAL "on") - add_definitions(-DPNG_MIPS_MSA_OPT=2) - endif() - else() - add_definitions(-DPNG_MIPS_MSA_OPT=0) - endif() -endif() - -else(PNG_HARDWARE_OPTIMIZATIONS) - -# set definitions and sources for arm -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") - add_definitions(-DPNG_ARM_NEON_OPT=0) -endif() - -# set definitions and sources for powerpc -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*") - add_definitions(-DPNG_POWERPC_VSX_OPT=0) -endif() - -# set definitions and sources for intel -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*") - add_definitions(-DPNG_INTEL_SSE_OPT=0) -endif() - -# set definitions and sources for MIPS -if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*") - add_definitions(-DPNG_MIPS_MSA_OPT=0) -endif() - -endif(PNG_HARDWARE_OPTIMIZATIONS) - -# SET LIBNAME -set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR}) - -# to distinguish between debug and release lib -set(CMAKE_DEBUG_POSTFIX "d") - -include(CheckCSourceCompiles) -option(ld-version-script "Enable linker version script" ON) -if(ld-version-script AND NOT APPLE) - # Check if LD supports linker scripts. - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 { - global: sym; - local: *; -}; - -VERS_2 { - global: sym2; - main; -} VERS_1; -") - set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS}) - set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/conftest.map'") - check_c_source_compiles("void sym(void) {} -void sym2(void) {} -int main(void) {return 0;} -" HAVE_LD_VERSION_SCRIPT) - if(NOT HAVE_LD_VERSION_SCRIPT) - set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE} "-Wl,-M -Wl,${CMAKE_CURRENT_BINARY_DIR}/conftest.map") - check_c_source_compiles("void sym(void) {} -void sym2(void) {} -int main(void) {return 0;} -" HAVE_SOLARIS_LD_VERSION_SCRIPT) - endif() - set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE}) - file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map") -endif() - -# Find symbol prefix. Likely obsolete and unnecessary with recent -# toolchains (it's not done in many other projects). -function(symbol_prefix) - set(SYMBOL_PREFIX) - - execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E" "-" - INPUT_FILE /dev/null - OUTPUT_VARIABLE OUT - RESULT_VARIABLE STATUS) - - if(CPP_FAIL) - message(WARNING "Failed to run the C preprocessor") - endif() - - string(REPLACE "\n" ";" OUT "${OUT}") - foreach(line ${OUT}) - string(REGEX MATCH "^PREFIX=" found_match "${line}") - if(found_match) - string(REGEX REPLACE "^PREFIX=(.*\)" "\\1" prefix "${line}") - string(REGEX MATCH "__USER_LABEL_PREFIX__" found_match "${prefix}") - if(found_match) - string(REGEX REPLACE "(.*)__USER_LABEL_PREFIX__(.*)" "\\1\\2" prefix "${prefix}") - endif() - set(SYMBOL_PREFIX "${prefix}") - endif() - endforeach() - - message(STATUS "Symbol prefix: ${SYMBOL_PREFIX}") - set(SYMBOL_PREFIX "${SYMBOL_PREFIX}" PARENT_SCOPE) -endfunction() - -if(UNIX) - symbol_prefix() -endif() - -find_program(AWK NAMES gawk awk) - -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -if(NOT AWK OR ANDROID) - # No awk available to generate sources; use pre-built pnglibconf.h - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt - ${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h) - add_custom_target(genfiles) # Dummy -else() - include(CMakeParseArguments) - # Generate .chk from .out with awk - # generate_chk(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]]) - function(generate_chk) - set(options) - set(oneValueArgs INPUT OUTPUT) - set(multiValueArgs DEPENDS) - cmake_parse_arguments(_GC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - if(NOT _GC_INPUT) - message(FATAL_ERROR "generate_chk: Missing INPUT argument") - endif() - if(NOT _GC_OUTPUT) - message(FATAL_ERROR "generate_chk: Missing OUTPUT argument") - endif() - - add_custom_command(OUTPUT "${_GC_OUTPUT}" - COMMAND "${CMAKE_COMMAND}" - "-DINPUT=${_GC_INPUT}" - "-DOUTPUT=${_GC_OUTPUT}" - -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake" - DEPENDS "${_GC_INPUT}" ${_GC_DEPENDS} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - endfunction() - - # Generate .out from .c with awk - # generate_out(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]]) - function(generate_out) - set(options) - set(oneValueArgs INPUT OUTPUT) - set(multiValueArgs DEPENDS) - cmake_parse_arguments(_GO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - if(NOT _GO_INPUT) - message(FATAL_ERROR "generate_out: Missing INPUT argument") - endif() - if(NOT _GO_OUTPUT) - message(FATAL_ERROR "generate_out: Missing OUTPUT argument") - endif() - - add_custom_command(OUTPUT "${_GO_OUTPUT}" - COMMAND "${CMAKE_COMMAND}" - "-DINPUT=${_GO_INPUT}" - "-DOUTPUT=${_GO_OUTPUT}" - -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake" - DEPENDS "${_GO_INPUT}" ${_GO_DEPENDS} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - endfunction() - - # Generate specific source file with awk - # generate_source(OUTPUT outputfile [DEPENDS dep1 [dep2...]]) - function(generate_source) - set(options) - set(oneValueArgs OUTPUT) - set(multiValueArgs DEPENDS) - cmake_parse_arguments(_GSO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - if(NOT _GSO_OUTPUT) - message(FATAL_ERROR "generate_source: Missing OUTPUT argument") - endif() - - add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_GSO_OUTPUT}" - COMMAND "${CMAKE_COMMAND}" - "-DOUTPUT=${_GSO_OUTPUT}" - -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake" - DEPENDS ${_GSO_DEPENDS} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - endfunction() - - # Copy file - function(generate_copy source destination) - add_custom_command(OUTPUT "${destination}" - COMMAND "${CMAKE_COMMAND}" -E remove "${destination}" - COMMAND "${CMAKE_COMMAND}" -E copy "${source}" - "${destination}" - DEPENDS "${source}") - endfunction() - - # Generate scripts/pnglibconf.h - generate_source(OUTPUT "scripts/pnglibconf.c" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk" - "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h") - - # Generate pnglibconf.c - generate_source(OUTPUT "pnglibconf.c" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk" - "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h") - - if(PNG_PREFIX) - set(PNGLIBCONF_H_EXTRA_DEPENDS - "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/macro.lst") - set(PNGPREFIX_H_EXTRA_DEPENDS - "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out") - endif() - - generate_out(INPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out") - - # Generate pnglibconf.h - generate_source(OUTPUT "pnglibconf.h" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" - ${PNGLIBCONF_H_EXTRA_DEPENDS}) - - generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/intprefix.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h") - - generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/prefix.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h" - "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out") - - # Generate pngprefix.h - generate_source(OUTPUT "pngprefix.h" - DEPENDS ${PNGPREFIX_H_EXTRA_DEPENDS}) - - generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/sym.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h") - - generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h" - "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt") - - generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/vers.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h" - "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h") - - generate_chk(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/checksym.awk" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.def") - - add_custom_target(symbol-check DEPENDS - "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk") - - generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" - "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym") - generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out" - "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers") - - add_custom_target(genvers DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers") - add_custom_target(gensym DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym") - - add_custom_target("genprebuilt" - COMMAND "${CMAKE_COMMAND}" - "-DOUTPUT=scripts/pnglibconf.h.prebuilt" - -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - - # A single target handles generation of all generated files. If - # they are depended upon separately by multiple targets, this - # confuses parallel make (it would require a separate top-level - # target for each file to track the dependencies properly). - add_custom_target(genfiles DEPENDS - "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym" - "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" - "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out") -endif(NOT AWK OR ANDROID) - -# OUR SOURCES -set(libpng_public_hdrs - png.h - pngconf.h - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" -) -set(libpng_private_hdrs - pngpriv.h - pngdebug.h - pnginfo.h - pngstruct.h -) -if(AWK AND NOT ANDROID) - list(APPEND libpng_private_hdrs "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h") -endif() -set(libpng_sources - ${libpng_public_hdrs} - ${libpng_private_hdrs} - png.c - pngerror.c - pngget.c - pngmem.c - pngpread.c - pngread.c - pngrio.c - pngrtran.c - pngrutil.c - pngset.c - pngtrans.c - pngwio.c - pngwrite.c - pngwtran.c - pngwutil.c - ${libpng_arm_sources} - ${libpng_intel_sources} - ${libpng_mips_sources} - ${libpng_powerpc_sources} -) -set(pngtest_sources - pngtest.c -) -set(pngvalid_sources - contrib/libtests/pngvalid.c -) -set(pngstest_sources - contrib/libtests/pngstest.c -) -set(pngunknown_sources - contrib/libtests/pngunknown.c -) -set(pngimage_sources - contrib/libtests/pngimage.c -) -set(pngfix_sources - contrib/tools/pngfix.c -) -set(png_fix_itxt_sources - contrib/tools/png-fix-itxt.c -) - -if(MSVC) - add_definitions(-D_CRT_SECURE_NO_DEPRECATE) -endif() - -if(PNG_DEBUG) - add_definitions(-DPNG_DEBUG) -endif() - -# NOW BUILD OUR TARGET -include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR}) - -unset(PNG_LIB_TARGETS) - -if(PNG_SHARED) - add_library(png SHARED ${libpng_sources}) - set(PNG_LIB_TARGETS png) - set_target_properties(png PROPERTIES OUTPUT_NAME ${PNG_LIB_NAME}) - add_dependencies(png genfiles) - if(MSVC) - # msvc does not append 'lib' - do it here to have consistent name - set_target_properties(png PROPERTIES PREFIX "lib") - set_target_properties(png PROPERTIES IMPORT_PREFIX "lib") - endif() - target_link_libraries(png ${ZLIB_LIBRARY} ${M_LIBRARY}) - - if(UNIX AND AWK) - if(HAVE_LD_VERSION_SCRIPT) - set_target_properties(png PROPERTIES LINK_FLAGS - "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'") - elseif(HAVE_SOLARIS_LD_VERSION_SCRIPT) - set_target_properties(png PROPERTIES LINK_FLAGS - "-Wl,-M -Wl,'${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'") - endif() - endif() -endif() - -if(PNG_STATIC) - # does not work without changing name - set(PNG_LIB_NAME_STATIC png_static) - add_library(png_static STATIC ${libpng_sources}) - add_dependencies(png_static genfiles) - # MSVC doesn't use a different file extension for shared vs. static - # libs. We are able to change OUTPUT_NAME to remove the _static - # for all other platforms. - if(NOT MSVC) - set_target_properties(png_static PROPERTIES - OUTPUT_NAME "${PNG_LIB_NAME}" - CLEAN_DIRECT_OUTPUT 1) - else() - set_target_properties(png_static PROPERTIES - OUTPUT_NAME "${PNG_LIB_NAME}_static" - CLEAN_DIRECT_OUTPUT 1) - endif() - list(APPEND PNG_LIB_TARGETS png_static) - if(MSVC) - # msvc does not append 'lib' - do it here to have consistent name - set_target_properties(png_static PROPERTIES PREFIX "lib") - endif() - target_link_libraries(png_static ${ZLIB_LIBRARY} ${M_LIBRARY}) -endif() - -if(PNG_FRAMEWORK) - set(PNG_LIB_NAME_FRAMEWORK png_framework) - add_library(png_framework SHARED ${libpng_sources}) - add_dependencies(png_framework genfiles) - list(APPEND PNG_LIB_TARGETS png_framework) - set_target_properties(png_framework PROPERTIES - FRAMEWORK TRUE - FRAMEWORK_VERSION ${PNGLIB_VERSION} - MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PNGLIB_MAJOR}.${PNGLIB_MINOR} - MACOSX_FRAMEWORK_BUNDLE_VERSION ${PNGLIB_VERSION} - MACOSX_FRAMEWORK_IDENTIFIER org.libpng.libpng - XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" - PUBLIC_HEADER "${libpng_public_hdrs}" - OUTPUT_NAME png) - target_link_libraries(png_framework ${ZLIB_LIBRARY} ${M_LIBRARY}) -endif() - -if(NOT PNG_LIB_TARGETS) - message(SEND_ERROR - "No library variant selected to build. " - "Please enable at least one of the following options: " - "PNG_STATIC, PNG_SHARED, PNG_FRAMEWORK") -endif() - -if(PNG_SHARED AND WIN32) - set_target_properties(png PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL) -endif() - -function(png_add_test) - set(options) - set(oneValueArgs NAME COMMAND) - set(multiValueArgs OPTIONS FILES) - cmake_parse_arguments(_PAT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if(NOT _PAT_NAME) - message(FATAL_ERROR "png_add_test: Missing NAME argument") - endif() - if(NOT _PAT_COMMAND) - message(FATAL_ERROR "png_add_test: Missing COMMAND argument") - endif() - - set(TEST_OPTIONS "${_PAT_OPTIONS}") - set(TEST_FILES "${_PAT_FILES}") - - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/test.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake" @ONLY) - add_test(NAME "${_PAT_NAME}" - COMMAND "${CMAKE_COMMAND}" - "-DLIBPNG=$" - "-DTEST_COMMAND=$" - -P "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake") -endfunction() - -if(PNG_TESTS AND PNG_SHARED) - # Find test PNG files by globbing, but sort lists to ensure - # consistency between different filesystems. - file(GLOB PNGSUITE_PNGS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/*.png") - list(SORT PNGSUITE_PNGS) - file(GLOB TEST_PNGS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/testpngs/*.png") - list(SORT TEST_PNGS) - - set(PNGTEST_PNG "${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png") - - add_executable(pngtest ${pngtest_sources}) - target_link_libraries(pngtest png) - - png_add_test(NAME pngtest COMMAND pngtest FILES "${PNGTEST_PNG}") - - add_executable(pngvalid ${pngvalid_sources}) - target_link_libraries(pngvalid png) - - png_add_test(NAME pngvalid-gamma-16-to-8 - COMMAND pngvalid OPTIONS --gamma-16-to-8) - png_add_test(NAME pngvalid-gamma-alpha-mode - COMMAND pngvalid OPTIONS --gamma-alpha-mode) - png_add_test(NAME pngvalid-gamma-background - COMMAND pngvalid OPTIONS --gamma-background) - png_add_test(NAME pngvalid-gamma-expand16-alpha-mode - COMMAND pngvalid OPTIONS --gamma-alpha-mode --expand16) - png_add_test(NAME pngvalid-gamma-expand16-background - COMMAND pngvalid OPTIONS --gamma-background --expand16) - png_add_test(NAME pngvalid-gamma-expand16-transform - COMMAND pngvalid OPTIONS --gamma-transform --expand16) - png_add_test(NAME pngvalid-gamma-sbit - COMMAND pngvalid OPTIONS --gamma-sbit) - png_add_test(NAME pngvalid-gamma-threshold - COMMAND pngvalid OPTIONS --gamma-threshold) - png_add_test(NAME pngvalid-gamma-transform - COMMAND pngvalid OPTIONS --gamma-transform) - png_add_test(NAME pngvalid-progressive-interlace-standard - COMMAND pngvalid OPTIONS --standard --progressive-read --interlace) - png_add_test(NAME pngvalid-progressive-size - COMMAND pngvalid OPTIONS --size --progressive-read) - png_add_test(NAME pngvalid-progressive-standard - COMMAND pngvalid OPTIONS --standard --progressive-read) - png_add_test(NAME pngvalid-standard - COMMAND pngvalid OPTIONS --standard) - png_add_test(NAME pngvalid-transform - COMMAND pngvalid OPTIONS --transform) - - add_executable(pngstest ${pngstest_sources}) - target_link_libraries(pngstest png) - - foreach(gamma_type 1.8 linear none sRGB) - foreach(alpha_type none alpha) - set(PNGSTEST_FILES) - foreach(test_png ${TEST_PNGS}) - string(REGEX MATCH ".*-linear[-.].*" TEST_PNG_LINEAR "${test_png}") - string(REGEX MATCH ".*-sRGB[-.].*" TEST_PNG_SRGB "${test_png}") - string(REGEX MATCH ".*-1.8[-.].*" TEST_PNG_G18 "${test_png}") - string(REGEX MATCH ".*-alpha-.*" TEST_PNG_ALPHA "${test_png}") - - set(TEST_PNG_VALID TRUE) - - if(TEST_PNG_ALPHA) - if(NOT "${alpha_type}" STREQUAL "alpha") - set(TEST_PNG_VALID FALSE) - endif() - else() - if("${alpha_type}" STREQUAL "alpha") - set(TEST_PNG_VALID FALSE) - endif() - endif() - - if(TEST_PNG_LINEAR) - if(NOT "${gamma_type}" STREQUAL "linear") - set(TEST_PNG_VALID FALSE) - endif() - elseif(TEST_PNG_SRGB) - if(NOT "${gamma_type}" STREQUAL "sRGB") - set(TEST_PNG_VALID FALSE) - endif() - elseif(TEST_PNG_G18) - if(NOT "${gamma_type}" STREQUAL "1.8") - set(TEST_PNG_VALID FALSE) - endif() - else() - if(NOT "${gamma_type}" STREQUAL "none") - set(TEST_PNG_VALID FALSE) - endif() - endif() - - if(TEST_PNG_VALID) - list(APPEND PNGSTEST_FILES "${test_png}") - endif() - endforeach() - # Should already be sorted, but sort anyway to be certain. - list(SORT PNGSTEST_FILES) - png_add_test(NAME pngstest-${gamma_type}-${alpha_type} - COMMAND pngstest - OPTIONS --tmpfile "${gamma_type}-${alpha_type}-" --log - FILES ${PNGSTEST_FILES}) - endforeach() - endforeach() - - add_executable(pngunknown ${pngunknown_sources}) - target_link_libraries(pngunknown png) - - png_add_test(NAME pngunknown-discard COMMAND pngunknown OPTIONS --strict default=discard FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-IDAT COMMAND pngunknown OPTIONS --strict default=discard IDAT=save FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-if-safe COMMAND pngunknown OPTIONS --strict default=if-safe FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-sAPI COMMAND pngunknown OPTIONS --strict bKGD=save cHRM=save gAMA=save all=discard iCCP=save sBIT=save sRGB=save FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-save COMMAND pngunknown OPTIONS --strict default=save FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-sTER COMMAND pngunknown OPTIONS --strict sTER=if-safe FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-vpAg COMMAND pngunknown OPTIONS --strict vpAg=if-safe FILES "${PNGTEST_PNG}") - - add_executable(pngimage ${pngimage_sources}) - target_link_libraries(pngimage png) - - png_add_test(NAME pngimage-quick COMMAND pngimage OPTIONS --list-combos --log FILES ${PNGSUITE_PNGS}) - png_add_test(NAME pngimage-full COMMAND pngimage OPTIONS --exhaustive --list-combos --log FILES ${PNGSUITE_PNGS}) -endif() - -if(PNG_SHARED) - add_executable(pngfix ${pngfix_sources}) - target_link_libraries(pngfix png) - set(PNG_BIN_TARGETS pngfix) - - add_executable(png-fix-itxt ${png_fix_itxt_sources}) - target_link_libraries(png-fix-itxt ${ZLIB_LIBRARY} ${M_LIBRARY}) - list(APPEND PNG_BIN_TARGETS png-fix-itxt) -endif() - -# Set a variable with CMake code which: -# Creates a symlink from src to dest (if possible) or alternatively -# copies if different. -include(CMakeParseArguments) - -function(create_symlink DEST_FILE) - - cmake_parse_arguments(S "" "FILE;TARGET" "" ${ARGN}) - - if(NOT S_TARGET AND NOT S_FILE) - message(FATAL_ERROR "create_symlink: Missing TARGET or FILE argument") - endif() - - if(S_TARGET AND S_FILE) - message(FATAL_ERROR "create_symlink: Both source file ${S_FILE} and build target ${S_TARGET} arguments are present; can only have one.") - endif() - - if(S_FILE) - # If we don't need to symlink something that's coming from a build target, - # we can go ahead and symlink/copy at configure time. - if(CMAKE_HOST_WIN32 AND NOT CYGWIN) - execute_process( - COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${S_FILE} ${DEST_FILE} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - else() - execute_process( - COMMAND ${CMAKE_COMMAND} -E create_symlink ${S_FILE} ${DEST_FILE} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - endif() - endif() - - if(S_TARGET) - # We need to use generator expressions, which can be a bit tricky, so for - # simplicity make the symlink a POST_BUILD step and use the TARGET - # signature of add_custom_command. - if(CMAKE_HOST_WIN32 AND NOT CYGWIN) - add_custom_command(TARGET ${S_TARGET} POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy_if_different $ $/${DEST_FILE}) - else() - add_custom_command(TARGET ${S_TARGET} POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E create_symlink $ $/${DEST_FILE}) - endif() - endif() - -endfunction() - -# Create source generation scripts. -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genchk.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake @ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genout.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake @ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/gensrc.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake @ONLY) - -# libpng is a library so default to 'lib' -if(NOT DEFINED CMAKE_INSTALL_LIBDIR) - set(CMAKE_INSTALL_LIBDIR lib) -endif() - -# CREATE PKGCONFIG FILES -# We use the same files like ./configure, so we have to set its vars. -# Only do this on Windows for Cygwin - the files don't make much sense outside -# of a UNIX look-alike. -if(NOT WIN32 OR CYGWIN OR MINGW) - set(prefix ${CMAKE_INSTALL_PREFIX}) - set(exec_prefix ${CMAKE_INSTALL_PREFIX}) - set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) - set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) - set(LIBS "-lz -lm") - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in - ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY) - create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc) - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in - ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) - create_symlink(libpng-config FILE ${PNGLIB_NAME}-config) -endif() - -# SET UP LINKS -if(PNG_SHARED) - set_target_properties(png PROPERTIES -# VERSION 16.${PNGLIB_RELEASE}.1.6.37 - VERSION 16.${PNGLIB_RELEASE}.0 - SOVERSION 16 - CLEAN_DIRECT_OUTPUT 1) -endif() - -# INSTALL -if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - install(TARGETS ${PNG_LIB_TARGETS} - EXPORT libpng - RUNTIME DESTINATION bin - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - if(PNG_SHARED) - # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin - if(CYGWIN OR MINGW) - create_symlink(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png) - install(FILES $/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} - DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(NOT WIN32) - create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png) - install(FILES $/libpng${CMAKE_SHARED_LIBRARY_SUFFIX} - DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - endif() - - if(PNG_STATIC) - if(NOT WIN32 OR CYGWIN OR MINGW) - create_symlink(libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static) - install(FILES $/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} - DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - endif() -endif() - -if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) - install(FILES ${libpng_public_hdrs} DESTINATION include) - install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME}) -endif() -if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL) - if(NOT WIN32 OR CYGWIN OR MINGW) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin) - endif() -endif() - -if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL) - install(TARGETS ${PNG_BIN_TARGETS} - RUNTIME DESTINATION bin) -endif() - -if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL) - # Install man pages - if(NOT PNG_MAN_DIR) - set(PNG_MAN_DIR "share/man") - endif() - install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3) - install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5) - # Install pkg-config files - if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config - DESTINATION bin) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config - DESTINATION bin) - endif() -endif() - -# Create an export file that CMake users can include() to import our targets. -if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL) - install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake) -endif() - -# what's with libpng-manual.txt and all the extra files? - -# UNINSTALL -# do we need this? - -# DIST -# do we need this? - -# to create msvc import lib for mingw compiled shared lib -# pexports libpng.dll > libpng.def -# lib /def:libpng.def /machine:x86 diff --git a/thirdparty/libpng-1.6.37/INSTALL b/thirdparty/libpng-1.6.37/INSTALL deleted file mode 100644 index 4c17022..0000000 --- a/thirdparty/libpng-1.6.37/INSTALL +++ /dev/null @@ -1,465 +0,0 @@ - - Installing libpng - -Contents - - I. Simple installation - II. Rebuilding the configure scripts - III. Using scripts/makefile* - IV. Using cmake - V. Directory structure - VI. Building with project files - VII. Building with makefiles - VIII. Configuring libpng for 16-bit platforms - IX. Configuring for DOS - X. Configuring for Medium Model - XI. Prepending a prefix to exported symbols - XII. Configuring for compiler xxx: - XIII. Removing unwanted object code - XIV. Enabling or disabling hardware optimizations - XV. Changes to the build and configuration of libpng in libpng-1.5.x - XVI. Setjmp/longjmp issues - XVII. Common linking failures - XVIII. Other sources of information about libpng - -I. Simple installation - -On Unix/Linux and similar systems, you can simply type - - ./configure [--prefix=/path] - make check - make install - -and ignore the rest of this document. "/path" is the path to the directory -where you want to install the libpng "lib", "include", and "bin" -subdirectories. - -If you downloaded a GIT clone, you will need to run ./autogen.sh before -running ./configure, to create "configure" and "Makefile.in" which are -not included in the GIT repository. - -Note that "configure" is only included in the "*.tar" distributions and not -in the "*.zip" or "*.7z" distributions. If you downloaded one of those -distributions, see "Building with project files" or "Building with makefiles", -below. - -II. Rebuilding the configure scripts - -If configure does not work on your system, or if you have a need to -change configure.ac or Makefile.am, and you have a reasonably -up-to-date set of tools, running ./autogen.sh in a git clone before -running ./configure may fix the problem. To be really sure that you -aren't using any of the included pre-built scripts, especially if you -are building from a tar distribution instead of a git distribution, -do this: - - ./configure --enable-maintainer-mode - make maintainer-clean - ./autogen.sh --maintainer --clean - ./autogen.sh --maintainer - ./configure [--prefix=/path] [other options] - make - make install - make check - -III. Using scripts/makefile* - -Instead, you can use one of the custom-built makefiles in the -"scripts" directory - - cp scripts/pnglibconf.h.prebuilt pnglibconf.h - cp scripts/makefile.system makefile - make test - make install - -The files that are presently available in the scripts directory -are listed and described in scripts/README.txt. - -Or you can use one of the "projects" in the "projects" directory. - -Before installing libpng, you must first install zlib, if it -is not already on your system. zlib can usually be found -wherever you got libpng; otherwise go to https://zlib.net/. You can -place zlib in the same directory as libpng or in another directory. - -If your system already has a preinstalled zlib you will still need -to have access to the zlib.h and zconf.h include files that -correspond to the version of zlib that's installed. - -If you wish to test with a particular zlib that is not first in the -standard library search path, put ZLIBLIB, ZLIBINC, CPPFLAGS, LDFLAGS, -and LD_LIBRARY_PATH in your environment before running "make test" -or "make distcheck": - - ZLIBLIB=/path/to/lib export ZLIBLIB - ZLIBINC=/path/to/include export ZLIBINC - CPPFLAGS="-I$ZLIBINC" export CPPFLAGS - LDFLAGS="-L$ZLIBLIB" export LDFLAGS - LD_LIBRARY_PATH="$ZLIBLIB:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH - -If you are using one of the makefile scripts, put ZLIBLIB and ZLIBINC -in your environment and type - - make ZLIBLIB=$ZLIBLIB ZLIBINC=$ZLIBINC test - -IV. Using cmake - -If you want to use "cmake" (see www.cmake.org), type - - cmake . -DCMAKE_INSTALL_PREFIX=/path - make - make install - -As when using the simple configure method described above, "/path" points to -the installation directory where you want to put the libpng "lib", "include", -and "bin" subdirectories. - -V. Directory structure - -You can rename the directories that you downloaded (they -might be called "libpng-x.y.z" or "libpngNN" and "zlib-1.2.8" -or "zlib128") so that you have directories called "zlib" and "libpng". - -Your directory structure should look like this: - - .. (the parent directory) - libpng (this directory) - INSTALL (this file) - README - *.h, *.c => libpng source files - CMakeLists.txt => "cmake" script - configuration files: - configure.ac, configure, Makefile.am, Makefile.in, - autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in, - libpng-config.in, aclocal.m4, config.h.in, config.sub, - depcomp, install-sh, mkinstalldirs, test-pngtest.sh - contrib - arm-neon, conftest, examples, gregbook, libtests, pngminim, - pngminus, pngsuite, tools, visupng - projects - cbuilder5, owatcom, visualc71, vstudio, xcode - scripts - makefile.* - *.def (module definition files) - etc. - pngtest.png - etc. - zlib - README, *.h, *.c contrib, etc. - -If the line endings in the files look funny, you may wish to get the other -distribution of libpng. It is available in both tar.gz (UNIX style line -endings) and zip (DOS style line endings) formats. - -VI. Building with project files - -If you are building libpng with MSVC, you can enter the -libpng projects\visualc71 or vstudio directory and follow the instructions -in README.txt. - -Otherwise enter the zlib directory and follow the instructions in zlib/README, -then come back here and run "configure" or choose the appropriate -makefile.sys in the scripts directory. - -VII. Building with makefiles - -Copy the file (or files) that you need from the -scripts directory into this directory, for example - -MSDOS example: - - copy scripts\makefile.msc makefile - copy scripts\pnglibconf.h.prebuilt pnglibconf.h - -UNIX example: - - cp scripts/makefile.std makefile - cp scripts/pnglibconf.h.prebuilt pnglibconf.h - -Read the makefile to see if you need to change any source or -target directories to match your preferences. - -Then read pnglibconf.dfa to see if you want to make any configuration -changes. - -Then just run "make" which will create the libpng library in -this directory and "make test" which will run a quick test that reads -the "pngtest.png" file and writes a "pngout.png" file that should be -identical to it. Look for "9782 zero samples" in the output of the -test. For more confidence, you can run another test by typing -"pngtest pngnow.png" and looking for "289 zero samples" in the output. -Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare -your output with the result shown in contrib/pngsuite/README. - -Most of the makefiles will allow you to run "make install" to -put the library in its final resting place (if you want to -do that, run "make install" in the zlib directory first if necessary). -Some also allow you to run "make test-installed" after you have -run "make install". - -VIII. Configuring libpng for 16-bit platforms - -You will want to look into zconf.h to tell zlib (and thus libpng) that -it cannot allocate more than 64K at a time. Even if you can, the memory -won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K. - -IX. Configuring for DOS - -For DOS users who only have access to the lower 640K, you will -have to limit zlib's memory usage via a png_set_compression_mem_level() -call. See zlib.h or zconf.h in the zlib library for more information. - -X. Configuring for Medium Model - -Libpng's support for medium model has been tested on most of the popular -compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets -defined, and FAR gets defined to far in pngconf.h, and you should be -all set. Everything in the library (except for zlib's structure) is -expecting far data. You must use the typedefs with the p or pp on -the end for pointers (or at least look at them and be careful). Make -note that the rows of data are defined as png_bytepp, which is -an "unsigned char far * far *". - -XI. Prepending a prefix to exported symbols - -Starting with libpng-1.6.0, you can configure libpng (when using the -"configure" script) to prefix all exported symbols by means of the -configuration option "--with-libpng-prefix=FOO_", where FOO_ can be any -string beginning with a letter and containing only uppercase -and lowercase letters, digits, and the underscore (i.e., a C language -identifier). This creates a set of macros in pnglibconf.h, so this is -transparent to applications; their function calls get transformed by -the macros to use the modified names. - -XII. Configuring for compiler xxx: - -All includes for libpng are in pngconf.h. If you need to add, change -or delete an include, this is the place to do it. -The includes that are not needed outside libpng are placed in pngpriv.h, -which is only used by the routines inside libpng itself. -The files in libpng proper only include pngpriv.h and png.h, which -in turn includes pngconf.h and, as of libpng-1.5.0, pnglibconf.h. -As of libpng-1.5.0, pngpriv.h also includes three other private header -files, pngstruct.h, pnginfo.h, and pngdebug.h, which contain material -that previously appeared in the public headers. - -XIII. Removing unwanted object code - -There are a bunch of #define's in pngconf.h that control what parts of -libpng are compiled. All the defines end in _SUPPORTED. If you are -never going to use a capability, you can change the #define to #undef -before recompiling libpng and save yourself code and data space, or -you can turn off individual capabilities with defines that begin with -"PNG_NO_". - -In libpng-1.5.0 and later, the #define's are in pnglibconf.h instead. - -You can also turn all of the transforms and ancillary chunk capabilities -off en masse with compiler directives that define -PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, -or all four, along with directives to turn on any of the capabilities that -you do want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the -extra transformations but still leave the library fully capable of reading -and writing PNG files with all known public chunks. Use of the -PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library -that is incapable of reading or writing ancillary chunks. If you are -not using the progressive reading capability, you can turn that off -with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING -capability, which you'll still have). - -All the reading and writing specific code are in separate files, so the -linker should only grab the files it needs. However, if you want to -make sure, or if you are building a stand alone library, all the -reading files start with "pngr" and all the writing files start with "pngw". -The files that don't match either (like png.c, pngtrans.c, etc.) -are used for both reading and writing, and always need to be included. -The progressive reader is in pngpread.c - -If you are creating or distributing a dynamically linked library (a .so -or DLL file), you should not remove or disable any parts of the library, -as this will cause applications linked with different versions of the -library to fail if they call functions not available in your library. -The size of the library itself should not be an issue, because only -those sections that are actually used will be loaded into memory. - -XIV. Enabling or disabling hardware optimizations - -Certain hardware capabilities, such as the Intel SSE instructions, -are normally detected at run time. Enable them with configure options -such as one of - - --enable-arm-neon=yes - --enable-mips-msa=yes - --enable-intel-sse=yes - --enable-powerpc-vsx=yes - -or enable them all at once with - - --enable-hardware-optimizations=yes - -or, if you are not using "configure", you can use one -or more of - - CPPFLAGS += "-DPNG_ARM_NEON" - CPPFLAGS += "-DPNG_MIPS_MSA" - CPPFLAGS += "-DPNG_INTEL_SSE" - CPPFLAGS += "-DPNG_POWERPC_VSX" - -See for example scripts/makefile.linux-opt - -If you wish to avoid using them, -you can disable them via the configure option - - --disable-hardware-optimizations - -to disable them all, or - - --enable-intel-sse=no - -to disable a particular one, -or via compiler-command options such as - - CPPFLAGS += "-DPNG_ARM_NEON_OPT=0, -DPNG_MIPS_MSA_OPT=0, - -DPNG_INTEL_SSE_OPT=0, -DPNG_POWERPC_VSX_OPT=0" - -If you are using cmake, hardware optimizations are "on" -by default. To disable them, use - - cmake . -DPNG_ARM_NEON=no -DPNG_INTEL_SSE=no \ - -DPNG_MIPS_MSA=no -DPNG_POWERPC_VSX=no - -or disable them all at once with - - cmake . -DPNG_HARDWARE_OPTIMIZATIONS=no - -XV. Changes to the build and configuration of libpng in libpng-1.5.x - -Details of internal changes to the library code can be found in the CHANGES -file and in the GIT repository logs. These will be of no concern to the vast -majority of library users or builders; however, the few who configure libpng -to a non-default feature set may need to change how this is done. - -There should be no need for library builders to alter build scripts if -these use the distributed build support - configure or the makefiles - -however, users of the makefiles may care to update their build scripts -to build pnglibconf.h where the corresponding makefile does not do so. - -Building libpng with a non-default configuration has changed completely. -The old method using pngusr.h should still work correctly even though the -way pngusr.h is used in the build has been changed; however, library -builders will probably want to examine the changes to take advantage of -new capabilities and to simplify their build system. - -A. Specific changes to library configuration capabilities - -The exact mechanism used to control attributes of API functions has -changed. A single set of operating system independent macro definitions -is used and operating system specific directives are defined in -pnglibconf.h - -As part of this the mechanism used to choose procedure call standards on -those systems that allow a choice has been changed. At present this only -affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems -running on Intel processors. As before, PNGAPI is defined where required -to control the exported API functions; however, two new macros, PNGCBAPI -and PNGCAPI, are used instead for callback functions (PNGCBAPI) and -(PNGCAPI) for functions that must match a C library prototype (currently -only png_longjmp_ptr, which must match the C longjmp function.) The new -approach is documented in pngconf.h - -Despite these changes, libpng 1.5.0 only supports the native C function -calling standard on those platforms tested so far ("__cdecl" on Microsoft -Windows). This is because the support requirements for alternative -calling conventions seem to no longer exist. Developers who find it -necessary to set PNG_API_RULE to 1 should advise the mailing list -(png-mng-implement) of this and library builders who use Openwatcom and -therefore set PNG_API_RULE to 2 should also contact the mailing list. - -B. Changes to the configuration mechanism - -Prior to libpng-1.5.0 library builders who needed to configure libpng -had either to modify the exported pngconf.h header file to add system -specific configuration or had to write feature selection macros into -pngusr.h and cause this to be included into pngconf.h by defining -PNG_USER_CONFIG. The latter mechanism had the disadvantage that an -application built without PNG_USER_CONFIG defined would see the -unmodified, default, libpng API and thus would probably fail to link. - -These mechanisms still work in the configure build and in any makefile -build that builds pnglibconf.h, although the feature selection macros -have changed somewhat as described above. In 1.5.0, however, pngusr.h is -processed only once, at the time the exported header file pnglibconf.h is -built. pngconf.h no longer includes pngusr.h; therefore, pngusr.h is ignored -after the build of pnglibconf.h and it is never included in an application -build. - -The formerly used alternative of adding a list of feature macros to the -CPPFLAGS setting in the build also still works; however, the macros will be -copied to pnglibconf.h and this may produce macro redefinition warnings -when the individual C files are compiled. - -All configuration now only works if pnglibconf.h is built from -scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan -(the original author of awk) maintains C source code of that awk and this -and all known later implementations (often called by subtly different -names - nawk and gawk for example) are adequate to build pnglibconf.h. -The Sun Microsystems (now Oracle) program 'awk' is an earlier version -and does not work; this may also apply to other systems that have a -functioning awk called 'nawk'. - -Configuration options are now documented in scripts/pnglibconf.dfa. This -file also includes dependency information that ensures a configuration is -consistent; that is, if a feature is switched off, dependent features are -also switched off. As a recommended alternative to using feature macros in -pngusr.h a system builder may also define equivalent options in pngusr.dfa -(or, indeed, any file) and add that to the configuration by setting -DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate -how to do this, and also illustrate a case where pngusr.h is still required. - -After you have built libpng, the definitions that were recorded in -pnglibconf.h are available to your application (pnglibconf.h is included -in png.h and gets installed alongside png.h and pngconf.h in your -$PREFIX/include directory). Do not edit pnglibconf.h after you have built -libpng, because than the settings would not accurately reflect the settings -that were used to build libpng. - -XVI. Setjmp/longjmp issues - -Libpng uses setjmp()/longjmp() for error handling. Unfortunately setjmp() -is known to be not thread-safe on some platforms and we don't know of -any platform where it is guaranteed to be thread-safe. Therefore, if -your application is going to be using multiple threads, you should -configure libpng with PNG_NO_SETJMP in your pngusr.dfa file, with --DPNG_NO_SETJMP on your compile line, or with - - #undef PNG_SETJMP_SUPPORTED - -in your pnglibconf.h or pngusr.h. - -Starting with libpng-1.6.0, the library included a "simplified API". -This requires setjmp/longjmp, so you must either build the library -with PNG_SETJMP_SUPPORTED defined, or with PNG_SIMPLIFIED_READ_SUPPORTED -and PNG_SIMPLIFIED_WRITE_SUPPORTED undefined. - -XVII. Common linking failures - -If your application fails to find libpng or zlib entries while linking: - - Be sure "-lz" appears after "-lpng" on your linking command. - - Be sure you have built libpng, zlib, and your application for the - same platform (e.g., 32-bit or 64-bit). - - If you are using the vstudio project, observe the WARNING in - project/vstudio/README.txt. - -XVIII. Other sources of information about libpng: - -Further information can be found in the README and libpng-manual.txt -files, in the individual makefiles, in png.h, and the manual pages -libpng.3 and png.5. - -Copyright (c) 1998-2002,2006-2016 Glenn Randers-Pehrson -This document is released under the libpng license. -For conditions of distribution and use, see the disclaimer -and license in png.h. diff --git a/thirdparty/libpng-1.6.37/LICENSE b/thirdparty/libpng-1.6.37/LICENSE deleted file mode 100644 index e0c5b53..0000000 --- a/thirdparty/libpng-1.6.37/LICENSE +++ /dev/null @@ -1,134 +0,0 @@ -COPYRIGHT NOTICE, DISCLAIMER, and LICENSE -========================================= - -PNG Reference Library License version 2 ---------------------------------------- - - * Copyright (c) 1995-2019 The PNG Reference Library Authors. - * Copyright (c) 2018-2019 Cosmin Truta. - * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. - * Copyright (c) 1996-1997 Andreas Dilger. - * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. - -The software is supplied "as is", without warranty of any kind, -express or implied, including, without limitation, the warranties -of merchantability, fitness for a particular purpose, title, and -non-infringement. In no event shall the Copyright owners, or -anyone distributing the software, be liable for any damages or -other liability, whether in contract, tort or otherwise, arising -from, out of, or in connection with the software, or the use or -other dealings in the software, even if advised of the possibility -of such damage. - -Permission is hereby granted to use, copy, modify, and distribute -this software, or portions hereof, for any purpose, without fee, -subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you - must not claim that you wrote the original software. If you - use this software in a product, an acknowledgment in the product - documentation would be appreciated, but is not required. - - 2. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - - -PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) ------------------------------------------------------------------------ - -libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are -Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are -derived from libpng-1.0.6, and are distributed according to the same -disclaimer and license as libpng-1.0.6 with the following individuals -added to the list of Contributing Authors: - - Simon-Pierre Cadieux - Eric S. Raymond - Mans Rullgard - Cosmin Truta - Gilles Vollant - James Yu - Mandar Sahastrabuddhe - Google Inc. - Vadim Barkov - -and with the following additions to the disclaimer: - - There is no warranty against interference with your enjoyment of - the library or against infringement. There is no warranty that our - efforts or the library will fulfill any of your particular purposes - or needs. This library is provided with all faults, and the entire - risk of satisfactory quality, performance, accuracy, and effort is - with the user. - -Some files in the "contrib" directory and some configure-generated -files that are distributed with libpng have other copyright owners, and -are released under other open source licenses. - -libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from -libpng-0.96, and are distributed according to the same disclaimer and -license as libpng-0.96, with the following individuals added to the -list of Contributing Authors: - - Tom Lane - Glenn Randers-Pehrson - Willem van Schaik - -libpng versions 0.89, June 1996, through 0.96, May 1997, are -Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, -and are distributed according to the same disclaimer and license as -libpng-0.88, with the following individuals added to the list of -Contributing Authors: - - John Bowler - Kevin Bracey - Sam Bushell - Magnus Holmgren - Greg Roelofs - Tom Tanner - -Some files in the "scripts" directory have other copyright owners, -but are released under this license. - -libpng versions 0.5, May 1995, through 0.88, January 1996, are -Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. - -For the purposes of this copyright and license, "Contributing Authors" -is defined as the following set of individuals: - - Andreas Dilger - Dave Martindale - Guy Eric Schalnat - Paul Schmidt - Tim Wegner - -The PNG Reference Library is supplied "AS IS". The Contributing -Authors and Group 42, Inc. disclaim all warranties, expressed or -implied, including, without limitation, the warranties of -merchantability and of fitness for any purpose. The Contributing -Authors and Group 42, Inc. assume no liability for direct, indirect, -incidental, special, exemplary, or consequential damages, which may -result from the use of the PNG Reference Library, even if advised of -the possibility of such damage. - -Permission is hereby granted to use, copy, modify, and distribute this -source code, or portions hereof, for any purpose, without fee, subject -to the following restrictions: - - 1. The origin of this source code must not be misrepresented. - - 2. Altered versions must be plainly marked as such and must not - be misrepresented as being the original source. - - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - -The Contributing Authors and Group 42, Inc. specifically permit, -without fee, and encourage the use of this source code as a component -to supporting the PNG file format in commercial products. If you use -this source code in a product, acknowledgment is not required but would -be appreciated. diff --git a/thirdparty/libpng-1.6.37/Makefile b/thirdparty/libpng-1.6.37/Makefile deleted file mode 100644 index 0127ebd..0000000 --- a/thirdparty/libpng-1.6.37/Makefile +++ /dev/null @@ -1,2428 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# Makefile. Generated from Makefile.in by configure. - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - - -# Makefile.am, the source file for Makefile.in (and hence Makefile), is -# -# Copyright (c) 2018 Cosmin Truta -# Copyright (c) 2004-2016 Glenn Randers-Pehrson -# -# This code is released under the libpng license. -# For conditions of distribution and use, see the disclaimer -# and license in png.h - - - - - - -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/libpng -pkglibdir = $(libdir)/libpng -pkglibexecdir = $(libexecdir)/libpng -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = x86_64-pc-linux-gnu -host_triplet = i586-pc-msdosdjgpp -check_PROGRAMS = pngtest$(EXEEXT) pngunknown$(EXEEXT) \ - pngstest$(EXEEXT) pngvalid$(EXEEXT) pngimage$(EXEEXT) \ - pngcp$(EXEEXT) $(am__EXEEXT_1) -#am__append_1 = timepng -bin_PROGRAMS = pngfix$(EXEEXT) png-fix-itxt$(EXEEXT) -#am__append_2 = arm/arm_init.c\ -# arm/filter_neon.S arm/filter_neon_intrinsics.c \ -# arm/palette_neon_intrinsics.c - -am__append_3 = mips/mips_init.c\ - mips/filter_msa_intrinsics.c - -am__append_4 = intel/intel_init.c\ - intel/filter_sse2_intrinsics.c - -am__append_5 = powerpc/powerpc_init.c\ - powerpc/filter_vsx_intrinsics.c - - -# Versioned symbols and restricted exports -#am__append_6 = -Wl,-M -Wl,libpng.vers -am__append_7 = -Wl,--version-script=libpng.vers -# Only restricted exports when possible -#am__append_8 = -export-symbols libpng.sym -#am__append_9 = -DPNG_PREFIX='' -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/scripts/libtool.m4 \ - $(top_srcdir)/scripts/ltoptions.m4 \ - $(top_srcdir)/scripts/ltsugar.m4 \ - $(top_srcdir)/scripts/ltversion.m4 \ - $(top_srcdir)/scripts/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(pkginclude_HEADERS) $(am__DIST_COMMON) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = libpng.pc libpng-config -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" \ - "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)" -#am__EXEEXT_1 = timepng$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -LTLIBRARIES = $(lib_LTLIBRARIES) -libpng16_la_LIBADD = -am__libpng16_la_SOURCES_DIST = png.c \ - pngerror.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c \ - pngrtran.c pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c \ - pngwtran.c pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h \ - pngpriv.h pngstruct.h pngusr.dfa arm/arm_init.c \ - arm/filter_neon.S arm/filter_neon_intrinsics.c \ - arm/palette_neon_intrinsics.c mips/mips_init.c \ - mips/filter_msa_intrinsics.c intel/intel_init.c \ - intel/filter_sse2_intrinsics.c powerpc/powerpc_init.c \ - powerpc/filter_vsx_intrinsics.c -am__dirstamp = $(am__leading_dot)dirstamp -#am__objects_1 = arm/arm_init.lo arm/filter_neon.lo \ -# arm/filter_neon_intrinsics.lo \ -# arm/palette_neon_intrinsics.lo -am__objects_2 = mips/mips_init.lo \ - mips/filter_msa_intrinsics.lo -am__objects_3 = intel/intel_init.lo \ - intel/filter_sse2_intrinsics.lo -am__objects_4 = powerpc/powerpc_init.lo \ - powerpc/filter_vsx_intrinsics.lo -am_libpng16_la_OBJECTS = png.lo pngerror.lo \ - pngget.lo pngmem.lo pngpread.lo pngread.lo pngrio.lo \ - pngrtran.lo pngrutil.lo pngset.lo pngtrans.lo pngwio.lo \ - pngwrite.lo pngwtran.lo pngwutil.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) $(am__objects_4) -nodist_libpng16_la_OBJECTS = -libpng16_la_OBJECTS = \ - $(am_libpng16_la_OBJECTS) \ - $(nodist_libpng16_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -am__v_lt_1 = -libpng16_la_LINK = $(LIBTOOL) $(AM_V_lt) \ - --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ - $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libpng16_la_LDFLAGS) $(LDFLAGS) -o \ - $@ -am_png_fix_itxt_OBJECTS = contrib/tools/png-fix-itxt.$(OBJEXT) -png_fix_itxt_OBJECTS = $(am_png_fix_itxt_OBJECTS) -png_fix_itxt_LDADD = $(LDADD) -am_pngcp_OBJECTS = contrib/tools/pngcp.$(OBJEXT) -pngcp_OBJECTS = $(am_pngcp_OBJECTS) -pngcp_DEPENDENCIES = libpng16.la -am_pngfix_OBJECTS = contrib/tools/pngfix.$(OBJEXT) -pngfix_OBJECTS = $(am_pngfix_OBJECTS) -pngfix_DEPENDENCIES = libpng16.la -am_pngimage_OBJECTS = contrib/libtests/pngimage.$(OBJEXT) -pngimage_OBJECTS = $(am_pngimage_OBJECTS) -pngimage_DEPENDENCIES = libpng16.la -am_pngstest_OBJECTS = contrib/libtests/pngstest.$(OBJEXT) -pngstest_OBJECTS = $(am_pngstest_OBJECTS) -pngstest_DEPENDENCIES = libpng16.la -am_pngtest_OBJECTS = pngtest.$(OBJEXT) -pngtest_OBJECTS = $(am_pngtest_OBJECTS) -pngtest_DEPENDENCIES = libpng16.la -am_pngunknown_OBJECTS = contrib/libtests/pngunknown.$(OBJEXT) -pngunknown_OBJECTS = $(am_pngunknown_OBJECTS) -pngunknown_DEPENDENCIES = libpng16.la -am_pngvalid_OBJECTS = contrib/libtests/pngvalid.$(OBJEXT) -pngvalid_OBJECTS = $(am_pngvalid_OBJECTS) -pngvalid_DEPENDENCIES = libpng16.la -am_timepng_OBJECTS = contrib/libtests/timepng.$(OBJEXT) -timepng_OBJECTS = $(am_timepng_OBJECTS) -timepng_DEPENDENCIES = libpng16.la -SCRIPTS = $(bin_SCRIPTS) -AM_V_P = $(am__v_P_$(V)) -am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I. -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/png.Plo ./$(DEPDIR)/pngerror.Plo \ - ./$(DEPDIR)/pngget.Plo ./$(DEPDIR)/pngmem.Plo \ - ./$(DEPDIR)/pngpread.Plo ./$(DEPDIR)/pngread.Plo \ - ./$(DEPDIR)/pngrio.Plo ./$(DEPDIR)/pngrtran.Plo \ - ./$(DEPDIR)/pngrutil.Plo ./$(DEPDIR)/pngset.Plo \ - ./$(DEPDIR)/pngtest.Po ./$(DEPDIR)/pngtrans.Plo \ - ./$(DEPDIR)/pngwio.Plo ./$(DEPDIR)/pngwrite.Plo \ - ./$(DEPDIR)/pngwtran.Plo ./$(DEPDIR)/pngwutil.Plo \ - arm/$(DEPDIR)/arm_init.Plo arm/$(DEPDIR)/filter_neon.Plo \ - arm/$(DEPDIR)/filter_neon_intrinsics.Plo \ - arm/$(DEPDIR)/palette_neon_intrinsics.Plo \ - contrib/libtests/$(DEPDIR)/pngimage.Po \ - contrib/libtests/$(DEPDIR)/pngstest.Po \ - contrib/libtests/$(DEPDIR)/pngunknown.Po \ - contrib/libtests/$(DEPDIR)/pngvalid.Po \ - contrib/libtests/$(DEPDIR)/timepng.Po \ - contrib/tools/$(DEPDIR)/png-fix-itxt.Po \ - contrib/tools/$(DEPDIR)/pngcp.Po \ - contrib/tools/$(DEPDIR)/pngfix.Po \ - intel/$(DEPDIR)/filter_sse2_intrinsics.Plo \ - intel/$(DEPDIR)/intel_init.Plo \ - mips/$(DEPDIR)/filter_msa_intrinsics.Plo \ - mips/$(DEPDIR)/mips_init.Plo \ - powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo \ - powerpc/$(DEPDIR)/powerpc_init.Plo -am__mv = mv -f -CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CCASFLAGS) $(CCASFLAGS) -AM_V_CPPAS = $(am__v_CPPAS_$(V)) -am__v_CPPAS_ = $(am__v_CPPAS_$(AM_DEFAULT_VERBOSITY)) -am__v_CPPAS_0 = @echo " CPPAS " $@; -am__v_CPPAS_1 = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libpng16_la_SOURCES) \ - $(nodist_libpng16_la_SOURCES) \ - $(png_fix_itxt_SOURCES) $(pngcp_SOURCES) $(pngfix_SOURCES) \ - $(pngimage_SOURCES) $(pngstest_SOURCES) $(pngtest_SOURCES) \ - $(pngunknown_SOURCES) $(pngvalid_SOURCES) $(timepng_SOURCES) -DIST_SOURCES = \ - $(am__libpng16_la_SOURCES_DIST) \ - $(png_fix_itxt_SOURCES) $(pngcp_SOURCES) $(pngfix_SOURCES) \ - $(pngimage_SOURCES) $(pngstest_SOURCES) $(pngtest_SOURCES) \ - $(pngunknown_SOURCES) $(pngvalid_SOURCES) $(timepng_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -man3dir = $(mandir)/man3 -man5dir = $(mandir)/man5 -NROFF = nroff -MANS = $(dist_man_MANS) -DATA = $(pkgconfig_DATA) -HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope -AM_RECURSIVE_TARGETS = cscope check recheck -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = .exe .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:.exe.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(srcdir)/libpng-config.in \ - $(srcdir)/libpng.pc.in AUTHORS INSTALL README TODO compile \ - config.guess config.sub depcomp install-sh ltmain.sh missing \ - test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ - || { sleep 5 && rm -rf "$(distdir)"; }; \ - else :; fi -am__post_remove_distdir = $(am__remove_distdir) -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz -GZIP_ENV = --best -DIST_TARGETS = dist-xz dist-gzip -distuninstallcheck_listfiles = find . -type f -print -am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ - | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print - -#distribute headers in /usr/include/libpng/* -pkgincludedir = $(includedir)/$(PNGLIB_BASENAME) -ACLOCAL = ${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing aclocal-1.16 -AMTAR = $${TAR-tar} -AM_DEFAULT_VERBOSITY = 1 -AR = i586-pc-msdosdjgpp-ar -AS = as -AUTOCONF = ${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing autoconf -AUTOHEADER = ${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing autoheader -AUTOMAKE = ${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing automake-1.16 -AWK = gawk -CC = i586-pc-msdosdjgpp-gcc -CCAS = i586-pc-msdosdjgpp-gcc -CCASDEPMODE = depmode=gcc3 -CCASFLAGS = -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib -CCDEPMODE = depmode=gcc3 -CFLAGS = -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib -CPP = i586-pc-msdosdjgpp-gcc -E -CPPFLAGS = -CYGPATH_W = echo -DEFS = -DHAVE_CONFIG_H -DEPDIR = .deps - -# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe -# other operating systems (NeXT?) the C preprocessor selected by configure -# checks input tokens for validity - effectively it performs part of the ANSI-C -# parsing - and therefore fails with the .df files. configure.ac has special -# checks for this and sets DFNCPP appropriately. -DFNCPP = i586-pc-msdosdjgpp-gcc -E -DLLTOOL = false -DSYMUTIL = -DUMPBIN = -ECHO_C = -ECHO_N = -n -ECHO_T = -EGREP = /usr/bin/grep -E -EXEEXT = .exe -FGREP = /usr/bin/grep -F -GREP = /usr/bin/grep -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -LD = /opt/cross/djgpp/i586-pc-msdosdjgpp/bin/ld -LDFLAGS = -LIBOBJS = ${LIBOBJDIR}strtod$U.o -LIBS = -lz -LIBTOOL = $(SHELL) $(top_builddir)/libtool -LIPO = -LN_S = ln -s -LTLIBOBJS = ${LIBOBJDIR}strtod$U.lo -LT_SYS_LIBRARY_PATH = -MAINT = # -MAKEINFO = ${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing makeinfo -MANIFEST_TOOL = : -MKDIR_P = /usr/bin/mkdir -p -NM = /opt/cross/djgpp/bin/i586-pc-msdosdjgpp-nm -B -NMEDIT = -OBJDUMP = i586-pc-msdosdjgpp-objdump -OBJEXT = o -OTOOL = -OTOOL64 = -PACKAGE = libpng -PACKAGE_BUGREPORT = png-mng-implement@lists.sourceforge.net -PACKAGE_NAME = libpng -PACKAGE_STRING = libpng 1.6.37 -PACKAGE_TARNAME = libpng -PACKAGE_URL = -PACKAGE_VERSION = 1.6.37 -PATH_SEPARATOR = : -PNGLIB_MAJOR = 1 -PNGLIB_MINOR = 6 -PNGLIB_RELEASE = 37 -PNGLIB_VERSION = 1.6.37 - -# PNG_COPTS give extra options for the C compiler to be used on all compilation -# steps (unless targe_CFLAGS is specified; that will take precedence over -# AM_CFLAGS) -PNG_COPTS = -PNG_PREFIX = -POW_LIB = -RANLIB = i586-pc-msdosdjgpp-ranlib -SED = /usr/bin/sed -SET_MAKE = -SHELL = /bin/bash -STRIP = i586-pc-msdosdjgpp-strip -SYMBOL_PREFIX = _ -VERSION = 1.6.37 -abs_builddir = /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37 -abs_srcdir = /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37 -abs_top_builddir = /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37 -abs_top_srcdir = /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37 -ac_ct_AR = -ac_ct_CC = -ac_ct_DUMPBIN = -am__include = include -am__leading_dot = . -am__quote = -am__tar = $${TAR-tar} chof - "$$tardir" -am__untar = $${TAR-tar} xf - - -# generate the -config scripts if required -binconfigs = libpng16-config -bindir = ${exec_prefix}/bin -build = x86_64-pc-linux-gnu -build_alias = x86_64-linux-gnu -build_cpu = x86_64 -build_os = linux-gnu -build_vendor = pc -builddir = . -datadir = ${datarootdir} -datarootdir = ${prefix}/share -docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} -dvidir = ${docdir} -exec_prefix = ${prefix} -host = i586-pc-msdosdjgpp -host_alias = i586-pc-msdosdjgpp -host_cpu = i586 -host_os = msdosdjgpp -host_vendor = pc -htmldir = ${docdir} -includedir = ${prefix}/include -infodir = ${datarootdir}/info -install_sh = ${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/install-sh -libdir = ${exec_prefix}/lib -libexecdir = ${exec_prefix}/libexec -localedir = ${datarootdir}/locale -localstatedir = ${prefix}/var -mandir = ${datarootdir}/man -mkdir_p = $(MKDIR_P) -oldincludedir = /usr/include -pdfdir = ${docdir} - -# pkg-config stuff, note that libpng.pc is always required in order -# to get the correct library -pkgconfigdir = ${libdir}/pkgconfig -prefix = /home/scott/code/FLTK_Nano-X_DOS/installed/dos -program_transform_name = s,x,x, -psdir = ${docdir} -sbindir = ${exec_prefix}/sbin -sharedstatedir = ${prefix}/com -srcdir = . -sysconfdir = ${prefix}/etc -target_alias = -top_build_prefix = -top_builddir = . -top_srcdir = . -PNGLIB_BASENAME = libpng16 -ACLOCAL_AMFLAGS = -I scripts - -# This ensures that pnglibconf.h gets built at the start of 'make all' or -# 'make check', but it does not add dependencies to the individual programs, -# this is done below. -# -# IMPORTANT: always add the object modules of new programs to the list below -# because otherwise the sequence 'configure; make new-program' will *sometimes* -# result in the installed (system) pnglibconf.h being used and the result is -# always wrong and always very confusing. -BUILT_SOURCES = pnglibconf.h -pngtest_SOURCES = pngtest.c -pngtest_LDADD = libpng16.la -pngvalid_SOURCES = contrib/libtests/pngvalid.c -pngvalid_LDADD = libpng16.la -pngstest_SOURCES = contrib/libtests/pngstest.c -pngstest_LDADD = libpng16.la -pngunknown_SOURCES = contrib/libtests/pngunknown.c -pngunknown_LDADD = libpng16.la -pngimage_SOURCES = contrib/libtests/pngimage.c -pngimage_LDADD = libpng16.la -timepng_SOURCES = contrib/libtests/timepng.c -timepng_LDADD = libpng16.la -pngfix_SOURCES = contrib/tools/pngfix.c -pngfix_LDADD = libpng16.la -png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c -pngcp_SOURCES = contrib/tools/pngcp.c -pngcp_LDADD = libpng16.la - -# Generally these are single line shell scripts to run a test with a particular -# set of parameters: -TESTS = \ - tests/pngtest\ - tests/pngtest-badpngs\ - tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\ - tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\ - tests/pngvalid-gamma-expand16-background\ - tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\ - tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\ - tests/pngvalid-progressive-size\ - tests/pngvalid-progressive-interlace-standard\ - tests/pngvalid-transform\ - tests/pngvalid-progressive-standard tests/pngvalid-standard\ - tests/pngstest-1.8 tests/pngstest-1.8-alpha tests/pngstest-linear\ - tests/pngstest-linear-alpha tests/pngstest-none tests/pngstest-none-alpha\ - tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\ - tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\ - tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\ - tests/pngimage-quick tests/pngimage-full - - -# man pages -dist_man_MANS = libpng.3 libpngpf.3 png.5 -EXTRA_SCRIPTS = libpng-config libpng16-config -bin_SCRIPTS = ${binconfigs} - -# rules to build libpng, only build the old library on request -lib_LTLIBRARIES = libpng16.la -# EXTRA_LTLIBRARIES= libpng.la -libpng16_la_SOURCES = png.c pngerror.c \ - pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c \ - pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c \ - pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h \ - pngstruct.h pngusr.dfa $(am__append_2) $(am__append_3) \ - $(am__append_4) $(am__append_5) -nodist_libpng16_la_SOURCES = pnglibconf.h -libpng16_la_LDFLAGS = -no-undefined \ - -export-dynamic -version-number \ - 16:37:0 \ - $(am__append_6) $(am__append_7) $(am__append_8) -#libpng16_la_DEPENDENCIES = libpng.sym -libpng16_la_DEPENDENCIES = libpng.vers -pkginclude_HEADERS = png.h pngconf.h -nodist_pkginclude_HEADERS = pnglibconf.h -pkgconfig_DATA = libpng16.pc - -# Extra source distribution files, '${srcdir}' is used below to stop build files -# from those directories being included. This only works if the configure is -# not done in the source directory! -EXTRA_DIST = \ - ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \ - pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ - ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ - $(TESTS) $(XFAIL_TESTS) tests/pngstest \ - CMakeLists.txt example.c libpng-manual.txt - -SCRIPT_CLEANFILES = scripts/*.out scripts/*.chk -CLEANFILES = *.tf? pngout.png libpng16.pc \ - libpng16-config libpng.vers libpng.sym \ - check.new pnglibconf.h pngprefix.h symbols.new pngtest-log.txt \ - pnglibconf.out pnglibconf.c pnglibconf.pre pnglibconf.dfn \ - $(SCRIPT_CLEANFILES) - -MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ -config.sub configure depcomp install-sh ltmain.sh missing - -AM_CFLAGS = ${PNG_COPTS} -SUFFIXES = .chk .out - -# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually -# be built with PNG_USE_READ_MACROS; this prevents the read macros from -# interfering with the symbol file format. -SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG16_0' \ - -DPNGLIB_VERSION='1.6.37' \ - -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)' -DPNG_NO_USE_READ_MACROS \ - -DPNG_BUILDING_SYMBOL_TABLE $(am__append_9) - -# EXT_LIST is a list of the possibly library directory extensions, this exists -# because we can't find a good way of discovering the file extensions that are -# actually installed on a given system, so instead we check for every extension -# we have seen. -EXT_LIST = a dll.a so so.16.37 la sl dylib -all: $(BUILT_SOURCES) config.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .chk .out .S .c .lo .log .o .obj .test .test$(EXEEXT) .trs -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: # $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): # $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: # $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -libpng.pc: $(top_builddir)/config.status $(srcdir)/libpng.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -libpng-config: $(top_builddir)/config.status $(srcdir)/libpng-config.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } -arm/$(am__dirstamp): - @$(MKDIR_P) arm - @: > arm/$(am__dirstamp) -arm/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) arm/$(DEPDIR) - @: > arm/$(DEPDIR)/$(am__dirstamp) -arm/arm_init.lo: arm/$(am__dirstamp) arm/$(DEPDIR)/$(am__dirstamp) -arm/filter_neon.lo: arm/$(am__dirstamp) arm/$(DEPDIR)/$(am__dirstamp) -arm/filter_neon_intrinsics.lo: arm/$(am__dirstamp) \ - arm/$(DEPDIR)/$(am__dirstamp) -arm/palette_neon_intrinsics.lo: arm/$(am__dirstamp) \ - arm/$(DEPDIR)/$(am__dirstamp) -mips/$(am__dirstamp): - @$(MKDIR_P) mips - @: > mips/$(am__dirstamp) -mips/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) mips/$(DEPDIR) - @: > mips/$(DEPDIR)/$(am__dirstamp) -mips/mips_init.lo: mips/$(am__dirstamp) mips/$(DEPDIR)/$(am__dirstamp) -mips/filter_msa_intrinsics.lo: mips/$(am__dirstamp) \ - mips/$(DEPDIR)/$(am__dirstamp) -intel/$(am__dirstamp): - @$(MKDIR_P) intel - @: > intel/$(am__dirstamp) -intel/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) intel/$(DEPDIR) - @: > intel/$(DEPDIR)/$(am__dirstamp) -intel/intel_init.lo: intel/$(am__dirstamp) \ - intel/$(DEPDIR)/$(am__dirstamp) -intel/filter_sse2_intrinsics.lo: intel/$(am__dirstamp) \ - intel/$(DEPDIR)/$(am__dirstamp) -powerpc/$(am__dirstamp): - @$(MKDIR_P) powerpc - @: > powerpc/$(am__dirstamp) -powerpc/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) powerpc/$(DEPDIR) - @: > powerpc/$(DEPDIR)/$(am__dirstamp) -powerpc/powerpc_init.lo: powerpc/$(am__dirstamp) \ - powerpc/$(DEPDIR)/$(am__dirstamp) -powerpc/filter_vsx_intrinsics.lo: powerpc/$(am__dirstamp) \ - powerpc/$(DEPDIR)/$(am__dirstamp) - -libpng16.la: $(libpng16_la_OBJECTS) $(libpng16_la_DEPENDENCIES) $(EXTRA_libpng16_la_DEPENDENCIES) - $(AM_V_CCLD)$(libpng16_la_LINK) -rpath $(libdir) $(libpng16_la_OBJECTS) $(libpng16_la_LIBADD) $(LIBS) -contrib/tools/$(am__dirstamp): - @$(MKDIR_P) contrib/tools - @: > contrib/tools/$(am__dirstamp) -contrib/tools/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) contrib/tools/$(DEPDIR) - @: > contrib/tools/$(DEPDIR)/$(am__dirstamp) -contrib/tools/png-fix-itxt.$(OBJEXT): contrib/tools/$(am__dirstamp) \ - contrib/tools/$(DEPDIR)/$(am__dirstamp) - -png-fix-itxt$(EXEEXT): $(png_fix_itxt_OBJECTS) $(png_fix_itxt_DEPENDENCIES) $(EXTRA_png_fix_itxt_DEPENDENCIES) - @rm -f png-fix-itxt$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(png_fix_itxt_OBJECTS) $(png_fix_itxt_LDADD) $(LIBS) -contrib/tools/pngcp.$(OBJEXT): contrib/tools/$(am__dirstamp) \ - contrib/tools/$(DEPDIR)/$(am__dirstamp) - -pngcp$(EXEEXT): $(pngcp_OBJECTS) $(pngcp_DEPENDENCIES) $(EXTRA_pngcp_DEPENDENCIES) - @rm -f pngcp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngcp_OBJECTS) $(pngcp_LDADD) $(LIBS) -contrib/tools/pngfix.$(OBJEXT): contrib/tools/$(am__dirstamp) \ - contrib/tools/$(DEPDIR)/$(am__dirstamp) - -pngfix$(EXEEXT): $(pngfix_OBJECTS) $(pngfix_DEPENDENCIES) $(EXTRA_pngfix_DEPENDENCIES) - @rm -f pngfix$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngfix_OBJECTS) $(pngfix_LDADD) $(LIBS) -contrib/libtests/$(am__dirstamp): - @$(MKDIR_P) contrib/libtests - @: > contrib/libtests/$(am__dirstamp) -contrib/libtests/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) contrib/libtests/$(DEPDIR) - @: > contrib/libtests/$(DEPDIR)/$(am__dirstamp) -contrib/libtests/pngimage.$(OBJEXT): contrib/libtests/$(am__dirstamp) \ - contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -pngimage$(EXEEXT): $(pngimage_OBJECTS) $(pngimage_DEPENDENCIES) $(EXTRA_pngimage_DEPENDENCIES) - @rm -f pngimage$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngimage_OBJECTS) $(pngimage_LDADD) $(LIBS) -contrib/libtests/pngstest.$(OBJEXT): contrib/libtests/$(am__dirstamp) \ - contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -pngstest$(EXEEXT): $(pngstest_OBJECTS) $(pngstest_DEPENDENCIES) $(EXTRA_pngstest_DEPENDENCIES) - @rm -f pngstest$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngstest_OBJECTS) $(pngstest_LDADD) $(LIBS) - -pngtest$(EXEEXT): $(pngtest_OBJECTS) $(pngtest_DEPENDENCIES) $(EXTRA_pngtest_DEPENDENCIES) - @rm -f pngtest$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngtest_OBJECTS) $(pngtest_LDADD) $(LIBS) -contrib/libtests/pngunknown.$(OBJEXT): \ - contrib/libtests/$(am__dirstamp) \ - contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -pngunknown$(EXEEXT): $(pngunknown_OBJECTS) $(pngunknown_DEPENDENCIES) $(EXTRA_pngunknown_DEPENDENCIES) - @rm -f pngunknown$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngunknown_OBJECTS) $(pngunknown_LDADD) $(LIBS) -contrib/libtests/pngvalid.$(OBJEXT): contrib/libtests/$(am__dirstamp) \ - contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -pngvalid$(EXEEXT): $(pngvalid_OBJECTS) $(pngvalid_DEPENDENCIES) $(EXTRA_pngvalid_DEPENDENCIES) - @rm -f pngvalid$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngvalid_OBJECTS) $(pngvalid_LDADD) $(LIBS) -contrib/libtests/timepng.$(OBJEXT): contrib/libtests/$(am__dirstamp) \ - contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -timepng$(EXEEXT): $(timepng_OBJECTS) $(timepng_DEPENDENCIES) $(EXTRA_timepng_DEPENDENCIES) - @rm -f timepng$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(timepng_OBJECTS) $(timepng_LDADD) $(LIBS) -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n' \ - -e 'h;s|.*|.|' \ - -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) { files[d] = files[d] " " $$1; \ - if (++n[d] == $(am__install_max)) { \ - print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ - else { print "f", d "/" $$4, $$1 } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 's,.*/,,;$(transform)'`; \ - dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f arm/*.$(OBJEXT) - -rm -f arm/*.lo - -rm -f contrib/libtests/*.$(OBJEXT) - -rm -f contrib/tools/*.$(OBJEXT) - -rm -f intel/*.$(OBJEXT) - -rm -f intel/*.lo - -rm -f mips/*.$(OBJEXT) - -rm -f mips/*.lo - -rm -f powerpc/*.$(OBJEXT) - -rm -f powerpc/*.lo - -distclean-compile: - -rm -f *.tab.c - -include ./$(DEPDIR)/png.Plo # am--include-marker -include ./$(DEPDIR)/pngerror.Plo # am--include-marker -include ./$(DEPDIR)/pngget.Plo # am--include-marker -include ./$(DEPDIR)/pngmem.Plo # am--include-marker -include ./$(DEPDIR)/pngpread.Plo # am--include-marker -include ./$(DEPDIR)/pngread.Plo # am--include-marker -include ./$(DEPDIR)/pngrio.Plo # am--include-marker -include ./$(DEPDIR)/pngrtran.Plo # am--include-marker -include ./$(DEPDIR)/pngrutil.Plo # am--include-marker -include ./$(DEPDIR)/pngset.Plo # am--include-marker -include ./$(DEPDIR)/pngtest.Po # am--include-marker -include ./$(DEPDIR)/pngtrans.Plo # am--include-marker -include ./$(DEPDIR)/pngwio.Plo # am--include-marker -include ./$(DEPDIR)/pngwrite.Plo # am--include-marker -include ./$(DEPDIR)/pngwtran.Plo # am--include-marker -include ./$(DEPDIR)/pngwutil.Plo # am--include-marker -include arm/$(DEPDIR)/arm_init.Plo # am--include-marker -include arm/$(DEPDIR)/filter_neon.Plo # am--include-marker -include arm/$(DEPDIR)/filter_neon_intrinsics.Plo # am--include-marker -include arm/$(DEPDIR)/palette_neon_intrinsics.Plo # am--include-marker -include contrib/libtests/$(DEPDIR)/pngimage.Po # am--include-marker -include contrib/libtests/$(DEPDIR)/pngstest.Po # am--include-marker -include contrib/libtests/$(DEPDIR)/pngunknown.Po # am--include-marker -include contrib/libtests/$(DEPDIR)/pngvalid.Po # am--include-marker -include contrib/libtests/$(DEPDIR)/timepng.Po # am--include-marker -include contrib/tools/$(DEPDIR)/png-fix-itxt.Po # am--include-marker -include contrib/tools/$(DEPDIR)/pngcp.Po # am--include-marker -include contrib/tools/$(DEPDIR)/pngfix.Po # am--include-marker -include intel/$(DEPDIR)/filter_sse2_intrinsics.Plo # am--include-marker -include intel/$(DEPDIR)/intel_init.Plo # am--include-marker -include mips/$(DEPDIR)/filter_msa_intrinsics.Plo # am--include-marker -include mips/$(DEPDIR)/mips_init.Plo # am--include-marker -include powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo # am--include-marker -include powerpc/$(DEPDIR)/powerpc_init.Plo # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.S.o: - $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ - $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ - $(am__mv) $$depbase.Tpo $$depbase.Po -# $(AM_V_CPPAS)source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) \ -# $(AM_V_CPPAS_no)$(CPPASCOMPILE) -c -o $@ $< - -.S.obj: - $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ - $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ - $(am__mv) $$depbase.Tpo $$depbase.Po -# $(AM_V_CPPAS)source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) \ -# $(AM_V_CPPAS_no)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.S.lo: - $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ - $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ - $(am__mv) $$depbase.Tpo $$depbase.Plo -# $(AM_V_CPPAS)source='$<' object='$@' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) \ -# $(AM_V_CPPAS_no)$(LTCPPASCOMPILE) -c -o $@ $< - -.c.o: - $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ - $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ - $(am__mv) $$depbase.Tpo $$depbase.Po -# $(AM_V_CC)source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ - $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ - $(am__mv) $$depbase.Tpo $$depbase.Po -# $(AM_V_CC)source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ - $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ - $(am__mv) $$depbase.Tpo $$depbase.Plo -# $(AM_V_CC)source='$<' object='$@' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -rm -rf arm/.libs arm/_libs - -rm -rf intel/.libs intel/_libs - -rm -rf mips/.libs mips/_libs - -rm -rf powerpc/.libs powerpc/_libs - -distclean-libtool: - -rm -f libtool config.lt -install-man3: $(dist_man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(dist_man_MANS)'; \ - test -n "$(man3dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.3[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ - done; } - -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man3dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) -install-man5: $(dist_man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(dist_man_MANS)'; \ - test -n "$(man5dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.5[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ - done; } - -uninstall-man5: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man5dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) -install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) - @$(NORMAL_INSTALL) - @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-nodist_pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) -install-pkgincludeHEADERS: $(pkginclude_HEADERS) - @$(NORMAL_INSTALL) - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscope: cscope.files - test ! -s cscope.files \ - || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) -clean-cscope: - -rm -f cscope.files -cscope.files: clean-cscope cscopelist -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: $(check_PROGRAMS) - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -tests/pngtest.log: tests/pngtest - @p='tests/pngtest'; \ - b='tests/pngtest'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngtest-badpngs.log: tests/pngtest-badpngs - @p='tests/pngtest-badpngs'; \ - b='tests/pngtest-badpngs'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-16-to-8.log: tests/pngvalid-gamma-16-to-8 - @p='tests/pngvalid-gamma-16-to-8'; \ - b='tests/pngvalid-gamma-16-to-8'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-alpha-mode.log: tests/pngvalid-gamma-alpha-mode - @p='tests/pngvalid-gamma-alpha-mode'; \ - b='tests/pngvalid-gamma-alpha-mode'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-background.log: tests/pngvalid-gamma-background - @p='tests/pngvalid-gamma-background'; \ - b='tests/pngvalid-gamma-background'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-expand16-alpha-mode.log: tests/pngvalid-gamma-expand16-alpha-mode - @p='tests/pngvalid-gamma-expand16-alpha-mode'; \ - b='tests/pngvalid-gamma-expand16-alpha-mode'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-expand16-background.log: tests/pngvalid-gamma-expand16-background - @p='tests/pngvalid-gamma-expand16-background'; \ - b='tests/pngvalid-gamma-expand16-background'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-expand16-transform.log: tests/pngvalid-gamma-expand16-transform - @p='tests/pngvalid-gamma-expand16-transform'; \ - b='tests/pngvalid-gamma-expand16-transform'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-sbit.log: tests/pngvalid-gamma-sbit - @p='tests/pngvalid-gamma-sbit'; \ - b='tests/pngvalid-gamma-sbit'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-threshold.log: tests/pngvalid-gamma-threshold - @p='tests/pngvalid-gamma-threshold'; \ - b='tests/pngvalid-gamma-threshold'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-transform.log: tests/pngvalid-gamma-transform - @p='tests/pngvalid-gamma-transform'; \ - b='tests/pngvalid-gamma-transform'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-progressive-size.log: tests/pngvalid-progressive-size - @p='tests/pngvalid-progressive-size'; \ - b='tests/pngvalid-progressive-size'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-progressive-interlace-standard.log: tests/pngvalid-progressive-interlace-standard - @p='tests/pngvalid-progressive-interlace-standard'; \ - b='tests/pngvalid-progressive-interlace-standard'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-transform.log: tests/pngvalid-transform - @p='tests/pngvalid-transform'; \ - b='tests/pngvalid-transform'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-progressive-standard.log: tests/pngvalid-progressive-standard - @p='tests/pngvalid-progressive-standard'; \ - b='tests/pngvalid-progressive-standard'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-standard.log: tests/pngvalid-standard - @p='tests/pngvalid-standard'; \ - b='tests/pngvalid-standard'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-1.8.log: tests/pngstest-1.8 - @p='tests/pngstest-1.8'; \ - b='tests/pngstest-1.8'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-1.8-alpha.log: tests/pngstest-1.8-alpha - @p='tests/pngstest-1.8-alpha'; \ - b='tests/pngstest-1.8-alpha'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-linear.log: tests/pngstest-linear - @p='tests/pngstest-linear'; \ - b='tests/pngstest-linear'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-linear-alpha.log: tests/pngstest-linear-alpha - @p='tests/pngstest-linear-alpha'; \ - b='tests/pngstest-linear-alpha'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-none.log: tests/pngstest-none - @p='tests/pngstest-none'; \ - b='tests/pngstest-none'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-none-alpha.log: tests/pngstest-none-alpha - @p='tests/pngstest-none-alpha'; \ - b='tests/pngstest-none-alpha'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-sRGB.log: tests/pngstest-sRGB - @p='tests/pngstest-sRGB'; \ - b='tests/pngstest-sRGB'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-sRGB-alpha.log: tests/pngstest-sRGB-alpha - @p='tests/pngstest-sRGB-alpha'; \ - b='tests/pngstest-sRGB-alpha'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-IDAT.log: tests/pngunknown-IDAT - @p='tests/pngunknown-IDAT'; \ - b='tests/pngunknown-IDAT'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-discard.log: tests/pngunknown-discard - @p='tests/pngunknown-discard'; \ - b='tests/pngunknown-discard'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-if-safe.log: tests/pngunknown-if-safe - @p='tests/pngunknown-if-safe'; \ - b='tests/pngunknown-if-safe'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-sAPI.log: tests/pngunknown-sAPI - @p='tests/pngunknown-sAPI'; \ - b='tests/pngunknown-sAPI'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-sTER.log: tests/pngunknown-sTER - @p='tests/pngunknown-sTER'; \ - b='tests/pngunknown-sTER'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-save.log: tests/pngunknown-save - @p='tests/pngunknown-save'; \ - b='tests/pngunknown-save'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-vpAg.log: tests/pngunknown-vpAg - @p='tests/pngunknown-vpAg'; \ - b='tests/pngunknown-vpAg'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngimage-quick.log: tests/pngimage-quick - @p='tests/pngimage-quick'; \ - b='tests/pngimage-quick'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngimage-full.log: tests/pngimage-full - @p='tests/pngimage-full'; \ - b='tests/pngimage-full'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test$(EXEEXT).log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz - $(am__post_remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__post_remove_distdir) - -dist-lzip: distdir - tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__post_remove_distdir) -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__post_remove_distdir) - -dist-tarZ: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__post_remove_distdir) - -dist-shar: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz - $(am__post_remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__post_remove_distdir) - -dist dist-all: - $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' - $(am__post_remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lz*) \ - lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir) - chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build/sub \ - && ../../configure \ - $(AM_DISTCHECK_CONFIGURE_FLAGS) \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=../.. --prefix="$$dc_install_base" \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__post_remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @test -n '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: trying to run $@ with an empty' \ - '$$(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - $(am__cd) '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \ - $(HEADERS) config.h -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f arm/$(DEPDIR)/$(am__dirstamp) - -rm -f arm/$(am__dirstamp) - -rm -f contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -rm -f contrib/libtests/$(am__dirstamp) - -rm -f contrib/tools/$(DEPDIR)/$(am__dirstamp) - -rm -f contrib/tools/$(am__dirstamp) - -rm -f intel/$(DEPDIR)/$(am__dirstamp) - -rm -f intel/$(am__dirstamp) - -rm -f mips/$(DEPDIR)/$(am__dirstamp) - -rm -f mips/$(am__dirstamp) - -rm -f powerpc/$(DEPDIR)/$(am__dirstamp) - -rm -f powerpc/$(am__dirstamp) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -##install-exec-hook: -##install-data-hook: -###uninstall-hook: -clean: clean-am - -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f ./$(DEPDIR)/png.Plo - -rm -f ./$(DEPDIR)/pngerror.Plo - -rm -f ./$(DEPDIR)/pngget.Plo - -rm -f ./$(DEPDIR)/pngmem.Plo - -rm -f ./$(DEPDIR)/pngpread.Plo - -rm -f ./$(DEPDIR)/pngread.Plo - -rm -f ./$(DEPDIR)/pngrio.Plo - -rm -f ./$(DEPDIR)/pngrtran.Plo - -rm -f ./$(DEPDIR)/pngrutil.Plo - -rm -f ./$(DEPDIR)/pngset.Plo - -rm -f ./$(DEPDIR)/pngtest.Po - -rm -f ./$(DEPDIR)/pngtrans.Plo - -rm -f ./$(DEPDIR)/pngwio.Plo - -rm -f ./$(DEPDIR)/pngwrite.Plo - -rm -f ./$(DEPDIR)/pngwtran.Plo - -rm -f ./$(DEPDIR)/pngwutil.Plo - -rm -f arm/$(DEPDIR)/arm_init.Plo - -rm -f arm/$(DEPDIR)/filter_neon.Plo - -rm -f arm/$(DEPDIR)/filter_neon_intrinsics.Plo - -rm -f arm/$(DEPDIR)/palette_neon_intrinsics.Plo - -rm -f contrib/libtests/$(DEPDIR)/pngimage.Po - -rm -f contrib/libtests/$(DEPDIR)/pngstest.Po - -rm -f contrib/libtests/$(DEPDIR)/pngunknown.Po - -rm -f contrib/libtests/$(DEPDIR)/pngvalid.Po - -rm -f contrib/libtests/$(DEPDIR)/timepng.Po - -rm -f contrib/tools/$(DEPDIR)/png-fix-itxt.Po - -rm -f contrib/tools/$(DEPDIR)/pngcp.Po - -rm -f contrib/tools/$(DEPDIR)/pngfix.Po - -rm -f intel/$(DEPDIR)/filter_sse2_intrinsics.Plo - -rm -f intel/$(DEPDIR)/intel_init.Plo - -rm -f mips/$(DEPDIR)/filter_msa_intrinsics.Plo - -rm -f mips/$(DEPDIR)/mips_init.Plo - -rm -f powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo - -rm -f powerpc/$(DEPDIR)/powerpc_init.Plo - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man install-nodist_pkgincludeHEADERS \ - install-pkgconfigDATA install-pkgincludeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-binSCRIPTS \ - install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man3 install-man5 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f ./$(DEPDIR)/png.Plo - -rm -f ./$(DEPDIR)/pngerror.Plo - -rm -f ./$(DEPDIR)/pngget.Plo - -rm -f ./$(DEPDIR)/pngmem.Plo - -rm -f ./$(DEPDIR)/pngpread.Plo - -rm -f ./$(DEPDIR)/pngread.Plo - -rm -f ./$(DEPDIR)/pngrio.Plo - -rm -f ./$(DEPDIR)/pngrtran.Plo - -rm -f ./$(DEPDIR)/pngrutil.Plo - -rm -f ./$(DEPDIR)/pngset.Plo - -rm -f ./$(DEPDIR)/pngtest.Po - -rm -f ./$(DEPDIR)/pngtrans.Plo - -rm -f ./$(DEPDIR)/pngwio.Plo - -rm -f ./$(DEPDIR)/pngwrite.Plo - -rm -f ./$(DEPDIR)/pngwtran.Plo - -rm -f ./$(DEPDIR)/pngwutil.Plo - -rm -f arm/$(DEPDIR)/arm_init.Plo - -rm -f arm/$(DEPDIR)/filter_neon.Plo - -rm -f arm/$(DEPDIR)/filter_neon_intrinsics.Plo - -rm -f arm/$(DEPDIR)/palette_neon_intrinsics.Plo - -rm -f contrib/libtests/$(DEPDIR)/pngimage.Po - -rm -f contrib/libtests/$(DEPDIR)/pngstest.Po - -rm -f contrib/libtests/$(DEPDIR)/pngunknown.Po - -rm -f contrib/libtests/$(DEPDIR)/pngvalid.Po - -rm -f contrib/libtests/$(DEPDIR)/timepng.Po - -rm -f contrib/tools/$(DEPDIR)/png-fix-itxt.Po - -rm -f contrib/tools/$(DEPDIR)/pngcp.Po - -rm -f contrib/tools/$(DEPDIR)/pngfix.Po - -rm -f intel/$(DEPDIR)/filter_sse2_intrinsics.Plo - -rm -f intel/$(DEPDIR)/intel_init.Plo - -rm -f mips/$(DEPDIR)/filter_msa_intrinsics.Plo - -rm -f mips/$(DEPDIR)/mips_init.Plo - -rm -f powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo - -rm -f powerpc/$(DEPDIR)/powerpc_init.Plo - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-libLTLIBRARIES uninstall-man \ - uninstall-nodist_pkgincludeHEADERS uninstall-pkgconfigDATA \ - uninstall-pkgincludeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man3 uninstall-man5 - -.MAKE: all check check-am install install-am install-data-am \ - install-exec-am install-strip uninstall-am - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \ - check-TESTS check-am clean clean-binPROGRAMS \ - clean-checkPROGRAMS clean-cscope clean-generic \ - clean-libLTLIBRARIES clean-libtool cscope cscopelist-am ctags \ - ctags-am dist dist-all dist-bzip2 dist-gzip dist-hook \ - dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \ - distclean distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-binSCRIPTS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-man3 install-man5 \ - install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \ - install-pkgconfigDATA install-pkgincludeHEADERS install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-hook uninstall-libLTLIBRARIES \ - uninstall-man uninstall-man3 uninstall-man5 \ - uninstall-nodist_pkgincludeHEADERS uninstall-pkgconfigDATA \ - uninstall-pkgincludeHEADERS - -.PRECIOUS: Makefile - - -$(PNGLIB_BASENAME).pc: libpng.pc - cp libpng.pc $@ - -$(PNGLIB_BASENAME)-config: libpng-config - cp libpng-config $@ - -scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h -scripts/prefix.out: png.h pngconf.h pnglibconf.out -scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt -scripts/intprefix.out: pnglibconf.h - -libpng.sym: scripts/sym.out - rm -f $@ - cp $? $@ -libpng.vers: scripts/vers.out - rm -f $@ - cp $? $@ - -# Rename functions in scripts/prefix.out with a PNG_PREFIX prefix. -# Rename macros in scripts/macro.lst from PNG_PREFIXpng_ to PNG_ (the actual -# implementation of the macro). -#pnglibconf.h: pnglibconf.out scripts/prefix.out scripts/macro.lst -# rm -f $@ -# $(AWK) 's==0 && NR>1{print prev}\ -# s==0{prev=$$0}\ -# s==1{print "#define", $$1, "" $$1}\ -# s==2{print "#define png_" $$1, "PNG_" $$1}\ -# END{print prev}' s=0 pnglibconf.out s=1 scripts/prefix.out\ -# s=2 ${srcdir}/scripts/macro.lst >pnglibconf.tf8 -# mv pnglibconf.tf8 $@ - -#pngprefix.h: scripts/intprefix.out -# rm -f pngprefix.tf1 -# $(AWK) '{print "#define", $$1, "" $$1}' $? >pngprefix.tf1 -# mv pngprefix.tf1 $@ -pnglibconf.h: pnglibconf.out - rm -f $@ - cp $? $@ - -pngprefix.h: # is empty - :>$@ - -$(srcdir)/scripts/pnglibconf.h.prebuilt: - @echo "Attempting to build $@" >&2 - @echo "This is a machine generated file, but if you want to make" >&2 - @echo "a new one simply make 'scripts/pnglibconf.out', copy that" >&2 - @echo "AND set PNG_ZLIB_VERNUM to 0 (you MUST do this)" >&2 - @exit 1 - -# The following is necessary to ensure that the local pnglibconf.h is used, not -# an installed one (this can happen immediately after on a clean system if -# 'make test' is the first thing the user does.) Only files which include -# one of the png source files (typically png.h or pngpriv.h) need to be listed -# here: -pngtest.o: pnglibconf.h - -contrib/libtests/makepng.o: pnglibconf.h -contrib/libtests/pngstest.o: pnglibconf.h -contrib/libtests/pngunknown.o: pnglibconf.h -contrib/libtests/pngimage.o: pnglibconf.h -contrib/libtests/pngvalid.o: pnglibconf.h -contrib/libtests/readpng.o: pnglibconf.h -contrib/libtests/tarith.o: pnglibconf.h -contrib/libtests/timepng.o: pnglibconf.h - -contrib/tools/makesRGB.o: pnglibconf.h -contrib/tools/pngfix.o: pnglibconf.h -contrib/tools/pngcp.o: pnglibconf.h - -.c.out: - rm -f $@ $*.tf[12] - test -d scripts || mkdir scripts || test -d scripts - $(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\ - $(CPPFLAGS) $(SYMBOL_CFLAGS) $< > $*.tf1 - $(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2 - rm -f $*.tf1 - mv $*.tf2 $@ - -# The .c file for pnglibconf.h is machine generated -pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA) - rm -f $@ $*.tf[45] - $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\ - ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ - ${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2 - $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf5 $*.tf4 1>&2 - rm $*.tf4 - mv $*.tf5 $@ - -# Symbol checks (.def and .out files should match) -scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out - -.out.chk: - rm -f $@ $*.new - $(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\ - of="$*.new" $< >&2 - mv $*.new $@ - -# used on demand to regenerate the standard header, CPPFLAGS should -# be empty - no non-standard defines -scripts/pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h - rm -f $@ pnglibconf.tf[67] - test -z "$(CPPFLAGS)" - echo "com 1.6.37 STANDARD API DEFINITION" |\ - $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf6\ - logunsupported=1 version=search ${srcdir}/pngconf.h -\ - ${srcdir}/scripts/pnglibconf.dfa 1>&2 - $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf7\ - pnglibconf.tf6 1>&2 - rm pnglibconf.tf6 - mv pnglibconf.tf7 $@ - -$(libpng16_la_OBJECTS): png.h pngconf.h \ - pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngprefix.h - -test: check-am - -# Extra checks -check: scripts/symbols.chk - -# Don't distribute the generated script files -dist-hook: - cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES) - -# Make links between installed files with release-specific names and the generic -# file names. If this install rule is run the generic names will be deleted and -# recreated - this has obvious issues for systems with multiple installations. - -install-header-links: - @set -ex; cd '$(DESTDIR)$(includedir)'; for f in $(HEADERS); do \ - rm -f "$$f"; $(LN_S) "$(PNGLIB_BASENAME)/$$f" "$$f"; done - -uninstall-header-links: - cd '$(DESTDIR)$(includedir)'; rm -f $(HEADERS) - -install-libpng-pc: - @set -ex; cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc; \ - $(LN_S) '$(PNGLIB_BASENAME).pc' libpng.pc - -uninstall-libpng-pc: - rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc' - -install-library-links: - @set -x; cd '$(DESTDIR)$(libdir)';\ - for ext in $(EXT_LIST); do\ - rm -f "libpng.$$ext";\ - if test -f "$(PNGLIB_BASENAME).$$ext"; then\ - $(LN_S) "$(PNGLIB_BASENAME).$$ext" "libpng.$$ext" || exit 1;\ - fi;\ - done - -uninstall-library-links: - @set -x; cd '$(DESTDIR)$(libdir)'; for ext in $(EXT_LIST); do\ - rm -f "libpng.$$ext"; done - -install-libpng-config: - @set -ex; cd '$(DESTDIR)$(bindir)'; rm -f libpng-config; \ - $(LN_S) '$(PNGLIB_BASENAME)-config' libpng-config - -uninstall-libpng-config: - rm -f '$(DESTDIR)$(bindir)/libpng-config' - -# If --enable-unversioned-links is specified the header and lib file links -# will be automatically made on a 'make install': - -install-data-hook: install-header-links -uninstall-hook: uninstall-header-links -install-exec-hook: install-library-links -uninstall-hook: uninstall-library-links - -# Likewise, --install-pc causes libpng.pc to be constructed: - -install-data-hook: install-libpng-pc -uninstall-hook: uninstall-libpng-pc - -# And --install-config: - -install-exec-hook: install-libpng-config -uninstall-hook: uninstall-libpng-config - -# The following addition ensures that 'make all' always builds the test programs -# too. It used to, but some change either in libpng or configure stopped this -# working. -all-am: $(check_PROGRAMS) - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/thirdparty/libpng-1.6.37/Makefile.am b/thirdparty/libpng-1.6.37/Makefile.am deleted file mode 100644 index 4f621aa..0000000 --- a/thirdparty/libpng-1.6.37/Makefile.am +++ /dev/null @@ -1,393 +0,0 @@ -# Makefile.am, the source file for Makefile.in (and hence Makefile), is -# -# Copyright (c) 2018 Cosmin Truta -# Copyright (c) 2004-2016 Glenn Randers-Pehrson -# -# This code is released under the libpng license. -# For conditions of distribution and use, see the disclaimer -# and license in png.h - -PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ - -ACLOCAL_AMFLAGS = -I scripts - -# test programs - run on make check, make distcheck -check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage pngcp -if HAVE_CLOCK_GETTIME -check_PROGRAMS += timepng -endif - -# Utilities - installed -bin_PROGRAMS= pngfix png-fix-itxt - -# This ensures that pnglibconf.h gets built at the start of 'make all' or -# 'make check', but it does not add dependencies to the individual programs, -# this is done below. -# -# IMPORTANT: always add the object modules of new programs to the list below -# because otherwise the sequence 'configure; make new-program' will *sometimes* -# result in the installed (system) pnglibconf.h being used and the result is -# always wrong and always very confusing. -BUILT_SOURCES = pnglibconf.h - -pngtest_SOURCES = pngtest.c -pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la - -pngvalid_SOURCES = contrib/libtests/pngvalid.c -pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la - -pngstest_SOURCES = contrib/libtests/pngstest.c -pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la - -pngunknown_SOURCES = contrib/libtests/pngunknown.c -pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la - -pngimage_SOURCES = contrib/libtests/pngimage.c -pngimage_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la - -timepng_SOURCES = contrib/libtests/timepng.c -timepng_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la - -pngfix_SOURCES = contrib/tools/pngfix.c -pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la - -png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c - -pngcp_SOURCES = contrib/tools/pngcp.c -pngcp_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la - -# Generally these are single line shell scripts to run a test with a particular -# set of parameters: -TESTS =\ - tests/pngtest\ - tests/pngtest-badpngs\ - tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\ - tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\ - tests/pngvalid-gamma-expand16-background\ - tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\ - tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\ - tests/pngvalid-progressive-size\ - tests/pngvalid-progressive-interlace-standard\ - tests/pngvalid-transform\ - tests/pngvalid-progressive-standard tests/pngvalid-standard\ - tests/pngstest-1.8 tests/pngstest-1.8-alpha tests/pngstest-linear\ - tests/pngstest-linear-alpha tests/pngstest-none tests/pngstest-none-alpha\ - tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\ - tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\ - tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\ - tests/pngimage-quick tests/pngimage-full - -# man pages -dist_man_MANS= libpng.3 libpngpf.3 png.5 - -# generate the -config scripts if required -binconfigs= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config -EXTRA_SCRIPTS= libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config -bin_SCRIPTS= @binconfigs@ - -# rules to build libpng, only build the old library on request -lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -# EXTRA_LTLIBRARIES= libpng.la -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\ - pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c\ - pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\ - png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h pngusr.dfa - -if PNG_ARM_NEON -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\ - arm/filter_neon.S arm/filter_neon_intrinsics.c \ - arm/palette_neon_intrinsics.c -endif - -if PNG_MIPS_MSA -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c\ - mips/filter_msa_intrinsics.c -endif - -if PNG_INTEL_SSE -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += intel/intel_init.c\ - intel/filter_sse2_intrinsics.c -endif - -if PNG_POWERPC_VSX -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += powerpc/powerpc_init.c\ - powerpc/filter_vsx_intrinsics.c -endif - -nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h - -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \ - -version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 - -if HAVE_LD_VERSION_SCRIPT -# Versioned symbols and restricted exports -if HAVE_SOLARIS_LD - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,-M -Wl,libpng.vers -else - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,--version-script=libpng.vers -endif - - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers -else -# Only restricted exports when possible - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -export-symbols libpng.sym - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym -endif - -#distribute headers in /usr/include/libpng/* -pkgincludedir= $(includedir)/$(PNGLIB_BASENAME) -pkginclude_HEADERS= png.h pngconf.h -nodist_pkginclude_HEADERS= pnglibconf.h - -# pkg-config stuff, note that libpng.pc is always required in order -# to get the correct library -pkgconfigdir = @pkgconfigdir@ -pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc - -# Extra source distribution files, '${srcdir}' is used below to stop build files -# from those directories being included. This only works if the configure is -# not done in the source directory! -EXTRA_DIST= \ - ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \ - pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ - ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ - $(TESTS) $(XFAIL_TESTS) tests/pngstest \ - CMakeLists.txt example.c libpng-manual.txt - -SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk - -CLEANFILES= *.tf? pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \ - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \ - check.new pnglibconf.h pngprefix.h symbols.new pngtest-log.txt \ - pnglibconf.out pnglibconf.c pnglibconf.pre pnglibconf.dfn \ - $(SCRIPT_CLEANFILES) - -MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ -config.sub configure depcomp install-sh ltmain.sh missing - -# PNG_COPTS give extra options for the C compiler to be used on all compilation -# steps (unless targe_CFLAGS is specified; that will take precedence over -# AM_CFLAGS) -PNG_COPTS = @PNG_COPTS@ -AM_CFLAGS = ${PNG_COPTS} - -# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe -# other operating systems (NeXT?) the C preprocessor selected by configure -# checks input tokens for validity - effectively it performs part of the ANSI-C -# parsing - and therefore fails with the .df files. configure.ac has special -# checks for this and sets DFNCPP appropriately. -DFNCPP = @DFNCPP@ - -SUFFIXES = .chk .out - -$(PNGLIB_BASENAME).pc: libpng.pc - cp libpng.pc $@ - -$(PNGLIB_BASENAME)-config: libpng-config - cp libpng-config $@ - -scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h -scripts/prefix.out: png.h pngconf.h pnglibconf.out -scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt -scripts/intprefix.out: pnglibconf.h - -libpng.sym: scripts/sym.out - rm -f $@ - cp $? $@ -libpng.vers: scripts/vers.out - rm -f $@ - cp $? $@ - -if DO_PNG_PREFIX -# Rename functions in scripts/prefix.out with a PNG_PREFIX prefix. -# Rename macros in scripts/macro.lst from PNG_PREFIXpng_ to PNG_ (the actual -# implementation of the macro). -pnglibconf.h: pnglibconf.out scripts/prefix.out scripts/macro.lst - rm -f $@ - $(AWK) 's==0 && NR>1{print prev}\ - s==0{prev=$$0}\ - s==1{print "#define", $$1, "@PNG_PREFIX@" $$1}\ - s==2{print "#define @PNG_PREFIX@png_" $$1, "PNG_" $$1}\ - END{print prev}' s=0 pnglibconf.out s=1 scripts/prefix.out\ - s=2 ${srcdir}/scripts/macro.lst >pnglibconf.tf8 - mv pnglibconf.tf8 $@ - -pngprefix.h: scripts/intprefix.out - rm -f pngprefix.tf1 - $(AWK) '{print "#define", $$1, "@PNG_PREFIX@" $$1}' $? >pngprefix.tf1 - mv pngprefix.tf1 $@ -else -pnglibconf.h: pnglibconf.out - rm -f $@ - cp $? $@ - -pngprefix.h: # is empty - :>$@ -endif - -$(srcdir)/scripts/pnglibconf.h.prebuilt: - @echo "Attempting to build $@" >&2 - @echo "This is a machine generated file, but if you want to make" >&2 - @echo "a new one simply make 'scripts/pnglibconf.out', copy that" >&2 - @echo "AND set PNG_ZLIB_VERNUM to 0 (you MUST do this)" >&2 - @exit 1 - -# The following is necessary to ensure that the local pnglibconf.h is used, not -# an installed one (this can happen immediately after on a clean system if -# 'make test' is the first thing the user does.) Only files which include -# one of the png source files (typically png.h or pngpriv.h) need to be listed -# here: -pngtest.o: pnglibconf.h - -contrib/libtests/makepng.o: pnglibconf.h -contrib/libtests/pngstest.o: pnglibconf.h -contrib/libtests/pngunknown.o: pnglibconf.h -contrib/libtests/pngimage.o: pnglibconf.h -contrib/libtests/pngvalid.o: pnglibconf.h -contrib/libtests/readpng.o: pnglibconf.h -contrib/libtests/tarith.o: pnglibconf.h -contrib/libtests/timepng.o: pnglibconf.h - -contrib/tools/makesRGB.o: pnglibconf.h -contrib/tools/pngfix.o: pnglibconf.h -contrib/tools/pngcp.o: pnglibconf.h - -# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually -# be built with PNG_USE_READ_MACROS; this prevents the read macros from -# interfering with the symbol file format. -SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\ - -DPNGLIB_VERSION='@PNGLIB_VERSION@'\ - -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'\ - -DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE - -if DO_PNG_PREFIX -SYMBOL_CFLAGS += -DPNG_PREFIX='@PNG_PREFIX@' -endif - -.c.out: - rm -f $@ $*.tf[12] - test -d scripts || mkdir scripts || test -d scripts - $(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\ - $(CPPFLAGS) $(SYMBOL_CFLAGS) $< > $*.tf1 - $(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2 - rm -f $*.tf1 - mv $*.tf2 $@ - -# The .c file for pnglibconf.h is machine generated -pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA) - rm -f $@ $*.tf[45] - $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\ - ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ - ${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2 - $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf5 $*.tf4 1>&2 - rm $*.tf4 - mv $*.tf5 $@ - -# Symbol checks (.def and .out files should match) -scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out - -.out.chk: - rm -f $@ $*.new - $(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\ - of="$*.new" $< >&2 - mv $*.new $@ - -# used on demand to regenerate the standard header, CPPFLAGS should -# be empty - no non-standard defines -scripts/pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h - rm -f $@ pnglibconf.tf[67] - test -z "$(CPPFLAGS)" - echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\ - $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf6\ - logunsupported=1 version=search ${srcdir}/pngconf.h -\ - ${srcdir}/scripts/pnglibconf.dfa 1>&2 - $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf7\ - pnglibconf.tf6 1>&2 - rm pnglibconf.tf6 - mv pnglibconf.tf7 $@ - -$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \ - pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngprefix.h - -test: check-am - -# Extra checks -check: scripts/symbols.chk - -# Don't distribute the generated script files -dist-hook: - cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES) - -# Make links between installed files with release-specific names and the generic -# file names. If this install rule is run the generic names will be deleted and -# recreated - this has obvious issues for systems with multiple installations. - -install-header-links: - @set -ex; cd '$(DESTDIR)$(includedir)'; for f in $(HEADERS); do \ - rm -f "$$f"; $(LN_S) "$(PNGLIB_BASENAME)/$$f" "$$f"; done - -uninstall-header-links: - cd '$(DESTDIR)$(includedir)'; rm -f $(HEADERS) - -install-libpng-pc: - @set -ex; cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc; \ - $(LN_S) '$(PNGLIB_BASENAME).pc' libpng.pc - -uninstall-libpng-pc: - rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc' - -# EXT_LIST is a list of the possibly library directory extensions, this exists -# because we can't find a good way of discovering the file extensions that are -# actually installed on a given system, so instead we check for every extension -# we have seen. - -EXT_LIST = a dll.a so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ la sl dylib - -install-library-links: - @set -x; cd '$(DESTDIR)$(libdir)';\ - for ext in $(EXT_LIST); do\ - rm -f "libpng.$$ext";\ - if test -f "$(PNGLIB_BASENAME).$$ext"; then\ - $(LN_S) "$(PNGLIB_BASENAME).$$ext" "libpng.$$ext" || exit 1;\ - fi;\ - done - -uninstall-library-links: - @set -x; cd '$(DESTDIR)$(libdir)'; for ext in $(EXT_LIST); do\ - rm -f "libpng.$$ext"; done - -install-libpng-config: - @set -ex; cd '$(DESTDIR)$(bindir)'; rm -f libpng-config; \ - $(LN_S) '$(PNGLIB_BASENAME)-config' libpng-config - -uninstall-libpng-config: - rm -f '$(DESTDIR)$(bindir)/libpng-config' - -if DO_INSTALL_LINKS -# If --enable-unversioned-links is specified the header and lib file links -# will be automatically made on a 'make install': - -install-data-hook: install-header-links -uninstall-hook: uninstall-header-links -install-exec-hook: install-library-links -uninstall-hook: uninstall-library-links -endif - -if DO_INSTALL_LIBPNG_PC -# Likewise, --install-pc causes libpng.pc to be constructed: - -install-data-hook: install-libpng-pc -uninstall-hook: uninstall-libpng-pc -endif - -if DO_INSTALL_LIBPNG_CONFIG -# And --install-config: - -install-exec-hook: install-libpng-config -uninstall-hook: uninstall-libpng-config -endif - -# The following addition ensures that 'make all' always builds the test programs -# too. It used to, but some change either in libpng or configure stopped this -# working. -all-am: $(check_PROGRAMS) diff --git a/thirdparty/libpng-1.6.37/Makefile.in b/thirdparty/libpng-1.6.37/Makefile.in deleted file mode 100644 index 81ac1c8..0000000 --- a/thirdparty/libpng-1.6.37/Makefile.in +++ /dev/null @@ -1,2428 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Makefile.am, the source file for Makefile.in (and hence Makefile), is -# -# Copyright (c) 2018 Cosmin Truta -# Copyright (c) 2004-2016 Glenn Randers-Pehrson -# -# This code is released under the libpng license. -# For conditions of distribution and use, see the disclaimer -# and license in png.h - - - - - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = pngtest$(EXEEXT) pngunknown$(EXEEXT) \ - pngstest$(EXEEXT) pngvalid$(EXEEXT) pngimage$(EXEEXT) \ - pngcp$(EXEEXT) $(am__EXEEXT_1) -@HAVE_CLOCK_GETTIME_TRUE@am__append_1 = timepng -bin_PROGRAMS = pngfix$(EXEEXT) png-fix-itxt$(EXEEXT) -@PNG_ARM_NEON_TRUE@am__append_2 = arm/arm_init.c\ -@PNG_ARM_NEON_TRUE@ arm/filter_neon.S arm/filter_neon_intrinsics.c \ -@PNG_ARM_NEON_TRUE@ arm/palette_neon_intrinsics.c - -@PNG_MIPS_MSA_TRUE@am__append_3 = mips/mips_init.c\ -@PNG_MIPS_MSA_TRUE@ mips/filter_msa_intrinsics.c - -@PNG_INTEL_SSE_TRUE@am__append_4 = intel/intel_init.c\ -@PNG_INTEL_SSE_TRUE@ intel/filter_sse2_intrinsics.c - -@PNG_POWERPC_VSX_TRUE@am__append_5 = powerpc/powerpc_init.c\ -@PNG_POWERPC_VSX_TRUE@ powerpc/filter_vsx_intrinsics.c - - -# Versioned symbols and restricted exports -@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_TRUE@am__append_6 = -Wl,-M -Wl,libpng.vers -@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_FALSE@am__append_7 = -Wl,--version-script=libpng.vers -# Only restricted exports when possible -@HAVE_LD_VERSION_SCRIPT_FALSE@am__append_8 = -export-symbols libpng.sym -@DO_PNG_PREFIX_TRUE@am__append_9 = -DPNG_PREFIX='@PNG_PREFIX@' -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/scripts/libtool.m4 \ - $(top_srcdir)/scripts/ltoptions.m4 \ - $(top_srcdir)/scripts/ltsugar.m4 \ - $(top_srcdir)/scripts/ltversion.m4 \ - $(top_srcdir)/scripts/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(pkginclude_HEADERS) $(am__DIST_COMMON) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = libpng.pc libpng-config -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" \ - "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)" -@HAVE_CLOCK_GETTIME_TRUE@am__EXEEXT_1 = timepng$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -LTLIBRARIES = $(lib_LTLIBRARIES) -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = -am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST = png.c \ - pngerror.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c \ - pngrtran.c pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c \ - pngwtran.c pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h \ - pngpriv.h pngstruct.h pngusr.dfa arm/arm_init.c \ - arm/filter_neon.S arm/filter_neon_intrinsics.c \ - arm/palette_neon_intrinsics.c mips/mips_init.c \ - mips/filter_msa_intrinsics.c intel/intel_init.c \ - intel/filter_sse2_intrinsics.c powerpc/powerpc_init.c \ - powerpc/filter_vsx_intrinsics.c -am__dirstamp = $(am__leading_dot)dirstamp -@PNG_ARM_NEON_TRUE@am__objects_1 = arm/arm_init.lo arm/filter_neon.lo \ -@PNG_ARM_NEON_TRUE@ arm/filter_neon_intrinsics.lo \ -@PNG_ARM_NEON_TRUE@ arm/palette_neon_intrinsics.lo -@PNG_MIPS_MSA_TRUE@am__objects_2 = mips/mips_init.lo \ -@PNG_MIPS_MSA_TRUE@ mips/filter_msa_intrinsics.lo -@PNG_INTEL_SSE_TRUE@am__objects_3 = intel/intel_init.lo \ -@PNG_INTEL_SSE_TRUE@ intel/filter_sse2_intrinsics.lo -@PNG_POWERPC_VSX_TRUE@am__objects_4 = powerpc/powerpc_init.lo \ -@PNG_POWERPC_VSX_TRUE@ powerpc/filter_vsx_intrinsics.lo -am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = png.lo pngerror.lo \ - pngget.lo pngmem.lo pngpread.lo pngread.lo pngrio.lo \ - pngrtran.lo pngrutil.lo pngset.lo pngtrans.lo pngwio.lo \ - pngwrite.lo pngwtran.lo pngwutil.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) $(am__objects_4) -nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \ - $(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) \ - $(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK = $(LIBTOOL) $(AM_V_lt) \ - --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ - $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS) $(LDFLAGS) -o \ - $@ -am_png_fix_itxt_OBJECTS = contrib/tools/png-fix-itxt.$(OBJEXT) -png_fix_itxt_OBJECTS = $(am_png_fix_itxt_OBJECTS) -png_fix_itxt_LDADD = $(LDADD) -am_pngcp_OBJECTS = contrib/tools/pngcp.$(OBJEXT) -pngcp_OBJECTS = $(am_pngcp_OBJECTS) -pngcp_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am_pngfix_OBJECTS = contrib/tools/pngfix.$(OBJEXT) -pngfix_OBJECTS = $(am_pngfix_OBJECTS) -pngfix_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am_pngimage_OBJECTS = contrib/libtests/pngimage.$(OBJEXT) -pngimage_OBJECTS = $(am_pngimage_OBJECTS) -pngimage_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am_pngstest_OBJECTS = contrib/libtests/pngstest.$(OBJEXT) -pngstest_OBJECTS = $(am_pngstest_OBJECTS) -pngstest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am_pngtest_OBJECTS = pngtest.$(OBJEXT) -pngtest_OBJECTS = $(am_pngtest_OBJECTS) -pngtest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am_pngunknown_OBJECTS = contrib/libtests/pngunknown.$(OBJEXT) -pngunknown_OBJECTS = $(am_pngunknown_OBJECTS) -pngunknown_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am_pngvalid_OBJECTS = contrib/libtests/pngvalid.$(OBJEXT) -pngvalid_OBJECTS = $(am_pngvalid_OBJECTS) -pngvalid_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am_timepng_OBJECTS = contrib/libtests/timepng.$(OBJEXT) -timepng_OBJECTS = $(am_timepng_OBJECTS) -timepng_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -SCRIPTS = $(bin_SCRIPTS) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/png.Plo ./$(DEPDIR)/pngerror.Plo \ - ./$(DEPDIR)/pngget.Plo ./$(DEPDIR)/pngmem.Plo \ - ./$(DEPDIR)/pngpread.Plo ./$(DEPDIR)/pngread.Plo \ - ./$(DEPDIR)/pngrio.Plo ./$(DEPDIR)/pngrtran.Plo \ - ./$(DEPDIR)/pngrutil.Plo ./$(DEPDIR)/pngset.Plo \ - ./$(DEPDIR)/pngtest.Po ./$(DEPDIR)/pngtrans.Plo \ - ./$(DEPDIR)/pngwio.Plo ./$(DEPDIR)/pngwrite.Plo \ - ./$(DEPDIR)/pngwtran.Plo ./$(DEPDIR)/pngwutil.Plo \ - arm/$(DEPDIR)/arm_init.Plo arm/$(DEPDIR)/filter_neon.Plo \ - arm/$(DEPDIR)/filter_neon_intrinsics.Plo \ - arm/$(DEPDIR)/palette_neon_intrinsics.Plo \ - contrib/libtests/$(DEPDIR)/pngimage.Po \ - contrib/libtests/$(DEPDIR)/pngstest.Po \ - contrib/libtests/$(DEPDIR)/pngunknown.Po \ - contrib/libtests/$(DEPDIR)/pngvalid.Po \ - contrib/libtests/$(DEPDIR)/timepng.Po \ - contrib/tools/$(DEPDIR)/png-fix-itxt.Po \ - contrib/tools/$(DEPDIR)/pngcp.Po \ - contrib/tools/$(DEPDIR)/pngfix.Po \ - intel/$(DEPDIR)/filter_sse2_intrinsics.Plo \ - intel/$(DEPDIR)/intel_init.Plo \ - mips/$(DEPDIR)/filter_msa_intrinsics.Plo \ - mips/$(DEPDIR)/mips_init.Plo \ - powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo \ - powerpc/$(DEPDIR)/powerpc_init.Plo -am__mv = mv -f -CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CCASFLAGS) $(CCASFLAGS) -AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) -am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) -am__v_CPPAS_0 = @echo " CPPAS " $@; -am__v_CPPAS_1 = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \ - $(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \ - $(png_fix_itxt_SOURCES) $(pngcp_SOURCES) $(pngfix_SOURCES) \ - $(pngimage_SOURCES) $(pngstest_SOURCES) $(pngtest_SOURCES) \ - $(pngunknown_SOURCES) $(pngvalid_SOURCES) $(timepng_SOURCES) -DIST_SOURCES = \ - $(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST) \ - $(png_fix_itxt_SOURCES) $(pngcp_SOURCES) $(pngfix_SOURCES) \ - $(pngimage_SOURCES) $(pngstest_SOURCES) $(pngtest_SOURCES) \ - $(pngunknown_SOURCES) $(pngvalid_SOURCES) $(timepng_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -man3dir = $(mandir)/man3 -man5dir = $(mandir)/man5 -NROFF = nroff -MANS = $(dist_man_MANS) -DATA = $(pkgconfig_DATA) -HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope -AM_RECURSIVE_TARGETS = cscope check recheck -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(srcdir)/libpng-config.in \ - $(srcdir)/libpng.pc.in AUTHORS INSTALL README TODO compile \ - config.guess config.sub depcomp install-sh ltmain.sh missing \ - test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ - || { sleep 5 && rm -rf "$(distdir)"; }; \ - else :; fi -am__post_remove_distdir = $(am__remove_distdir) -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz -GZIP_ENV = --best -DIST_TARGETS = dist-xz dist-gzip -distuninstallcheck_listfiles = find . -type f -print -am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ - | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print - -#distribute headers in /usr/include/libpng/* -pkgincludedir = $(includedir)/$(PNGLIB_BASENAME) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ - -# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe -# other operating systems (NeXT?) the C preprocessor selected by configure -# checks input tokens for validity - effectively it performs part of the ANSI-C -# parsing - and therefore fails with the .df files. configure.ac has special -# checks for this and sets DFNCPP appropriately. -DFNCPP = @DFNCPP@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PNGLIB_MAJOR = @PNGLIB_MAJOR@ -PNGLIB_MINOR = @PNGLIB_MINOR@ -PNGLIB_RELEASE = @PNGLIB_RELEASE@ -PNGLIB_VERSION = @PNGLIB_VERSION@ - -# PNG_COPTS give extra options for the C compiler to be used on all compilation -# steps (unless targe_CFLAGS is specified; that will take precedence over -# AM_CFLAGS) -PNG_COPTS = @PNG_COPTS@ -PNG_PREFIX = @PNG_PREFIX@ -POW_LIB = @POW_LIB@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SYMBOL_PREFIX = @SYMBOL_PREFIX@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ - -# generate the -config scripts if required -binconfigs = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ - -# pkg-config stuff, note that libpng.pc is always required in order -# to get the correct library -pkgconfigdir = @pkgconfigdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -PNGLIB_BASENAME = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ -ACLOCAL_AMFLAGS = -I scripts - -# This ensures that pnglibconf.h gets built at the start of 'make all' or -# 'make check', but it does not add dependencies to the individual programs, -# this is done below. -# -# IMPORTANT: always add the object modules of new programs to the list below -# because otherwise the sequence 'configure; make new-program' will *sometimes* -# result in the installed (system) pnglibconf.h being used and the result is -# always wrong and always very confusing. -BUILT_SOURCES = pnglibconf.h -pngtest_SOURCES = pngtest.c -pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -pngvalid_SOURCES = contrib/libtests/pngvalid.c -pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -pngstest_SOURCES = contrib/libtests/pngstest.c -pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -pngunknown_SOURCES = contrib/libtests/pngunknown.c -pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -pngimage_SOURCES = contrib/libtests/pngimage.c -pngimage_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -timepng_SOURCES = contrib/libtests/timepng.c -timepng_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -pngfix_SOURCES = contrib/tools/pngfix.c -pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c -pngcp_SOURCES = contrib/tools/pngcp.c -pngcp_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la - -# Generally these are single line shell scripts to run a test with a particular -# set of parameters: -TESTS = \ - tests/pngtest\ - tests/pngtest-badpngs\ - tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\ - tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\ - tests/pngvalid-gamma-expand16-background\ - tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\ - tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\ - tests/pngvalid-progressive-size\ - tests/pngvalid-progressive-interlace-standard\ - tests/pngvalid-transform\ - tests/pngvalid-progressive-standard tests/pngvalid-standard\ - tests/pngstest-1.8 tests/pngstest-1.8-alpha tests/pngstest-linear\ - tests/pngstest-linear-alpha tests/pngstest-none tests/pngstest-none-alpha\ - tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\ - tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\ - tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\ - tests/pngimage-quick tests/pngimage-full - - -# man pages -dist_man_MANS = libpng.3 libpngpf.3 png.5 -EXTRA_SCRIPTS = libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config -bin_SCRIPTS = @binconfigs@ - -# rules to build libpng, only build the old library on request -lib_LTLIBRARIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -# EXTRA_LTLIBRARIES= libpng.la -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c \ - pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c \ - pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c \ - pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h \ - pngstruct.h pngusr.dfa $(am__append_2) $(am__append_3) \ - $(am__append_4) $(am__append_5) -nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined \ - -export-dynamic -version-number \ - @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 \ - $(am__append_6) $(am__append_7) $(am__append_8) -@HAVE_LD_VERSION_SCRIPT_FALSE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym -@HAVE_LD_VERSION_SCRIPT_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers -pkginclude_HEADERS = png.h pngconf.h -nodist_pkginclude_HEADERS = pnglibconf.h -pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc - -# Extra source distribution files, '${srcdir}' is used below to stop build files -# from those directories being included. This only works if the configure is -# not done in the source directory! -EXTRA_DIST = \ - ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \ - pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ - ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ - $(TESTS) $(XFAIL_TESTS) tests/pngstest \ - CMakeLists.txt example.c libpng-manual.txt - -SCRIPT_CLEANFILES = scripts/*.out scripts/*.chk -CLEANFILES = *.tf? pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \ - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \ - check.new pnglibconf.h pngprefix.h symbols.new pngtest-log.txt \ - pnglibconf.out pnglibconf.c pnglibconf.pre pnglibconf.dfn \ - $(SCRIPT_CLEANFILES) - -MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ -config.sub configure depcomp install-sh ltmain.sh missing - -AM_CFLAGS = ${PNG_COPTS} -SUFFIXES = .chk .out - -# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually -# be built with PNG_USE_READ_MACROS; this prevents the read macros from -# interfering with the symbol file format. -SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0' \ - -DPNGLIB_VERSION='@PNGLIB_VERSION@' \ - -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)' -DPNG_NO_USE_READ_MACROS \ - -DPNG_BUILDING_SYMBOL_TABLE $(am__append_9) - -# EXT_LIST is a list of the possibly library directory extensions, this exists -# because we can't find a good way of discovering the file extensions that are -# actually installed on a given system, so instead we check for every extension -# we have seen. -EXT_LIST = a dll.a so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ la sl dylib -all: $(BUILT_SOURCES) config.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .chk .out .S .c .lo .log .o .obj .test .test$(EXEEXT) .trs -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -libpng.pc: $(top_builddir)/config.status $(srcdir)/libpng.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -libpng-config: $(top_builddir)/config.status $(srcdir)/libpng-config.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } -arm/$(am__dirstamp): - @$(MKDIR_P) arm - @: > arm/$(am__dirstamp) -arm/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) arm/$(DEPDIR) - @: > arm/$(DEPDIR)/$(am__dirstamp) -arm/arm_init.lo: arm/$(am__dirstamp) arm/$(DEPDIR)/$(am__dirstamp) -arm/filter_neon.lo: arm/$(am__dirstamp) arm/$(DEPDIR)/$(am__dirstamp) -arm/filter_neon_intrinsics.lo: arm/$(am__dirstamp) \ - arm/$(DEPDIR)/$(am__dirstamp) -arm/palette_neon_intrinsics.lo: arm/$(am__dirstamp) \ - arm/$(DEPDIR)/$(am__dirstamp) -mips/$(am__dirstamp): - @$(MKDIR_P) mips - @: > mips/$(am__dirstamp) -mips/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) mips/$(DEPDIR) - @: > mips/$(DEPDIR)/$(am__dirstamp) -mips/mips_init.lo: mips/$(am__dirstamp) mips/$(DEPDIR)/$(am__dirstamp) -mips/filter_msa_intrinsics.lo: mips/$(am__dirstamp) \ - mips/$(DEPDIR)/$(am__dirstamp) -intel/$(am__dirstamp): - @$(MKDIR_P) intel - @: > intel/$(am__dirstamp) -intel/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) intel/$(DEPDIR) - @: > intel/$(DEPDIR)/$(am__dirstamp) -intel/intel_init.lo: intel/$(am__dirstamp) \ - intel/$(DEPDIR)/$(am__dirstamp) -intel/filter_sse2_intrinsics.lo: intel/$(am__dirstamp) \ - intel/$(DEPDIR)/$(am__dirstamp) -powerpc/$(am__dirstamp): - @$(MKDIR_P) powerpc - @: > powerpc/$(am__dirstamp) -powerpc/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) powerpc/$(DEPDIR) - @: > powerpc/$(DEPDIR)/$(am__dirstamp) -powerpc/powerpc_init.lo: powerpc/$(am__dirstamp) \ - powerpc/$(DEPDIR)/$(am__dirstamp) -powerpc/filter_vsx_intrinsics.lo: powerpc/$(am__dirstamp) \ - powerpc/$(DEPDIR)/$(am__dirstamp) - -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES) $(EXTRA_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES) - $(AM_V_CCLD)$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK) -rpath $(libdir) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD) $(LIBS) -contrib/tools/$(am__dirstamp): - @$(MKDIR_P) contrib/tools - @: > contrib/tools/$(am__dirstamp) -contrib/tools/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) contrib/tools/$(DEPDIR) - @: > contrib/tools/$(DEPDIR)/$(am__dirstamp) -contrib/tools/png-fix-itxt.$(OBJEXT): contrib/tools/$(am__dirstamp) \ - contrib/tools/$(DEPDIR)/$(am__dirstamp) - -png-fix-itxt$(EXEEXT): $(png_fix_itxt_OBJECTS) $(png_fix_itxt_DEPENDENCIES) $(EXTRA_png_fix_itxt_DEPENDENCIES) - @rm -f png-fix-itxt$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(png_fix_itxt_OBJECTS) $(png_fix_itxt_LDADD) $(LIBS) -contrib/tools/pngcp.$(OBJEXT): contrib/tools/$(am__dirstamp) \ - contrib/tools/$(DEPDIR)/$(am__dirstamp) - -pngcp$(EXEEXT): $(pngcp_OBJECTS) $(pngcp_DEPENDENCIES) $(EXTRA_pngcp_DEPENDENCIES) - @rm -f pngcp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngcp_OBJECTS) $(pngcp_LDADD) $(LIBS) -contrib/tools/pngfix.$(OBJEXT): contrib/tools/$(am__dirstamp) \ - contrib/tools/$(DEPDIR)/$(am__dirstamp) - -pngfix$(EXEEXT): $(pngfix_OBJECTS) $(pngfix_DEPENDENCIES) $(EXTRA_pngfix_DEPENDENCIES) - @rm -f pngfix$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngfix_OBJECTS) $(pngfix_LDADD) $(LIBS) -contrib/libtests/$(am__dirstamp): - @$(MKDIR_P) contrib/libtests - @: > contrib/libtests/$(am__dirstamp) -contrib/libtests/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) contrib/libtests/$(DEPDIR) - @: > contrib/libtests/$(DEPDIR)/$(am__dirstamp) -contrib/libtests/pngimage.$(OBJEXT): contrib/libtests/$(am__dirstamp) \ - contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -pngimage$(EXEEXT): $(pngimage_OBJECTS) $(pngimage_DEPENDENCIES) $(EXTRA_pngimage_DEPENDENCIES) - @rm -f pngimage$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngimage_OBJECTS) $(pngimage_LDADD) $(LIBS) -contrib/libtests/pngstest.$(OBJEXT): contrib/libtests/$(am__dirstamp) \ - contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -pngstest$(EXEEXT): $(pngstest_OBJECTS) $(pngstest_DEPENDENCIES) $(EXTRA_pngstest_DEPENDENCIES) - @rm -f pngstest$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngstest_OBJECTS) $(pngstest_LDADD) $(LIBS) - -pngtest$(EXEEXT): $(pngtest_OBJECTS) $(pngtest_DEPENDENCIES) $(EXTRA_pngtest_DEPENDENCIES) - @rm -f pngtest$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngtest_OBJECTS) $(pngtest_LDADD) $(LIBS) -contrib/libtests/pngunknown.$(OBJEXT): \ - contrib/libtests/$(am__dirstamp) \ - contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -pngunknown$(EXEEXT): $(pngunknown_OBJECTS) $(pngunknown_DEPENDENCIES) $(EXTRA_pngunknown_DEPENDENCIES) - @rm -f pngunknown$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngunknown_OBJECTS) $(pngunknown_LDADD) $(LIBS) -contrib/libtests/pngvalid.$(OBJEXT): contrib/libtests/$(am__dirstamp) \ - contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -pngvalid$(EXEEXT): $(pngvalid_OBJECTS) $(pngvalid_DEPENDENCIES) $(EXTRA_pngvalid_DEPENDENCIES) - @rm -f pngvalid$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pngvalid_OBJECTS) $(pngvalid_LDADD) $(LIBS) -contrib/libtests/timepng.$(OBJEXT): contrib/libtests/$(am__dirstamp) \ - contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -timepng$(EXEEXT): $(timepng_OBJECTS) $(timepng_DEPENDENCIES) $(EXTRA_timepng_DEPENDENCIES) - @rm -f timepng$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(timepng_OBJECTS) $(timepng_LDADD) $(LIBS) -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n' \ - -e 'h;s|.*|.|' \ - -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) { files[d] = files[d] " " $$1; \ - if (++n[d] == $(am__install_max)) { \ - print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ - else { print "f", d "/" $$4, $$1 } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 's,.*/,,;$(transform)'`; \ - dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f arm/*.$(OBJEXT) - -rm -f arm/*.lo - -rm -f contrib/libtests/*.$(OBJEXT) - -rm -f contrib/tools/*.$(OBJEXT) - -rm -f intel/*.$(OBJEXT) - -rm -f intel/*.lo - -rm -f mips/*.$(OBJEXT) - -rm -f mips/*.lo - -rm -f powerpc/*.$(OBJEXT) - -rm -f powerpc/*.lo - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/png.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngerror.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngget.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngmem.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngpread.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngread.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngrio.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngrtran.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngrutil.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngset.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtest.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtrans.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwio.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwrite.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwtran.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwutil.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/arm_init.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/filter_neon.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/filter_neon_intrinsics.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/palette_neon_intrinsics.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/pngimage.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/pngstest.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/pngunknown.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/pngvalid.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/timepng.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@contrib/tools/$(DEPDIR)/png-fix-itxt.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@contrib/tools/$(DEPDIR)/pngcp.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@contrib/tools/$(DEPDIR)/pngfix.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@intel/$(DEPDIR)/filter_sse2_intrinsics.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@intel/$(DEPDIR)/intel_init.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@mips/$(DEPDIR)/filter_msa_intrinsics.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@mips/$(DEPDIR)/mips_init.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@powerpc/$(DEPDIR)/powerpc_init.Plo@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.S.o: -@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< - -.S.obj: -@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.S.lo: -@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -rm -rf arm/.libs arm/_libs - -rm -rf intel/.libs intel/_libs - -rm -rf mips/.libs mips/_libs - -rm -rf powerpc/.libs powerpc/_libs - -distclean-libtool: - -rm -f libtool config.lt -install-man3: $(dist_man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(dist_man_MANS)'; \ - test -n "$(man3dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.3[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ - done; } - -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man3dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) -install-man5: $(dist_man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(dist_man_MANS)'; \ - test -n "$(man5dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.5[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ - done; } - -uninstall-man5: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man5dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) -install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) - @$(NORMAL_INSTALL) - @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-nodist_pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) -install-pkgincludeHEADERS: $(pkginclude_HEADERS) - @$(NORMAL_INSTALL) - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscope: cscope.files - test ! -s cscope.files \ - || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) -clean-cscope: - -rm -f cscope.files -cscope.files: clean-cscope cscopelist -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: $(check_PROGRAMS) - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -tests/pngtest.log: tests/pngtest - @p='tests/pngtest'; \ - b='tests/pngtest'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngtest-badpngs.log: tests/pngtest-badpngs - @p='tests/pngtest-badpngs'; \ - b='tests/pngtest-badpngs'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-16-to-8.log: tests/pngvalid-gamma-16-to-8 - @p='tests/pngvalid-gamma-16-to-8'; \ - b='tests/pngvalid-gamma-16-to-8'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-alpha-mode.log: tests/pngvalid-gamma-alpha-mode - @p='tests/pngvalid-gamma-alpha-mode'; \ - b='tests/pngvalid-gamma-alpha-mode'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-background.log: tests/pngvalid-gamma-background - @p='tests/pngvalid-gamma-background'; \ - b='tests/pngvalid-gamma-background'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-expand16-alpha-mode.log: tests/pngvalid-gamma-expand16-alpha-mode - @p='tests/pngvalid-gamma-expand16-alpha-mode'; \ - b='tests/pngvalid-gamma-expand16-alpha-mode'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-expand16-background.log: tests/pngvalid-gamma-expand16-background - @p='tests/pngvalid-gamma-expand16-background'; \ - b='tests/pngvalid-gamma-expand16-background'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-expand16-transform.log: tests/pngvalid-gamma-expand16-transform - @p='tests/pngvalid-gamma-expand16-transform'; \ - b='tests/pngvalid-gamma-expand16-transform'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-sbit.log: tests/pngvalid-gamma-sbit - @p='tests/pngvalid-gamma-sbit'; \ - b='tests/pngvalid-gamma-sbit'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-threshold.log: tests/pngvalid-gamma-threshold - @p='tests/pngvalid-gamma-threshold'; \ - b='tests/pngvalid-gamma-threshold'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-gamma-transform.log: tests/pngvalid-gamma-transform - @p='tests/pngvalid-gamma-transform'; \ - b='tests/pngvalid-gamma-transform'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-progressive-size.log: tests/pngvalid-progressive-size - @p='tests/pngvalid-progressive-size'; \ - b='tests/pngvalid-progressive-size'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-progressive-interlace-standard.log: tests/pngvalid-progressive-interlace-standard - @p='tests/pngvalid-progressive-interlace-standard'; \ - b='tests/pngvalid-progressive-interlace-standard'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-transform.log: tests/pngvalid-transform - @p='tests/pngvalid-transform'; \ - b='tests/pngvalid-transform'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-progressive-standard.log: tests/pngvalid-progressive-standard - @p='tests/pngvalid-progressive-standard'; \ - b='tests/pngvalid-progressive-standard'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngvalid-standard.log: tests/pngvalid-standard - @p='tests/pngvalid-standard'; \ - b='tests/pngvalid-standard'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-1.8.log: tests/pngstest-1.8 - @p='tests/pngstest-1.8'; \ - b='tests/pngstest-1.8'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-1.8-alpha.log: tests/pngstest-1.8-alpha - @p='tests/pngstest-1.8-alpha'; \ - b='tests/pngstest-1.8-alpha'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-linear.log: tests/pngstest-linear - @p='tests/pngstest-linear'; \ - b='tests/pngstest-linear'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-linear-alpha.log: tests/pngstest-linear-alpha - @p='tests/pngstest-linear-alpha'; \ - b='tests/pngstest-linear-alpha'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-none.log: tests/pngstest-none - @p='tests/pngstest-none'; \ - b='tests/pngstest-none'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-none-alpha.log: tests/pngstest-none-alpha - @p='tests/pngstest-none-alpha'; \ - b='tests/pngstest-none-alpha'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-sRGB.log: tests/pngstest-sRGB - @p='tests/pngstest-sRGB'; \ - b='tests/pngstest-sRGB'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngstest-sRGB-alpha.log: tests/pngstest-sRGB-alpha - @p='tests/pngstest-sRGB-alpha'; \ - b='tests/pngstest-sRGB-alpha'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-IDAT.log: tests/pngunknown-IDAT - @p='tests/pngunknown-IDAT'; \ - b='tests/pngunknown-IDAT'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-discard.log: tests/pngunknown-discard - @p='tests/pngunknown-discard'; \ - b='tests/pngunknown-discard'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-if-safe.log: tests/pngunknown-if-safe - @p='tests/pngunknown-if-safe'; \ - b='tests/pngunknown-if-safe'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-sAPI.log: tests/pngunknown-sAPI - @p='tests/pngunknown-sAPI'; \ - b='tests/pngunknown-sAPI'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-sTER.log: tests/pngunknown-sTER - @p='tests/pngunknown-sTER'; \ - b='tests/pngunknown-sTER'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-save.log: tests/pngunknown-save - @p='tests/pngunknown-save'; \ - b='tests/pngunknown-save'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngunknown-vpAg.log: tests/pngunknown-vpAg - @p='tests/pngunknown-vpAg'; \ - b='tests/pngunknown-vpAg'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngimage-quick.log: tests/pngimage-quick - @p='tests/pngimage-quick'; \ - b='tests/pngimage-quick'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/pngimage-full.log: tests/pngimage-full - @p='tests/pngimage-full'; \ - b='tests/pngimage-full'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz - $(am__post_remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__post_remove_distdir) - -dist-lzip: distdir - tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__post_remove_distdir) -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__post_remove_distdir) - -dist-tarZ: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__post_remove_distdir) - -dist-shar: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz - $(am__post_remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__post_remove_distdir) - -dist dist-all: - $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' - $(am__post_remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lz*) \ - lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir) - chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build/sub \ - && ../../configure \ - $(AM_DISTCHECK_CONFIGURE_FLAGS) \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=../.. --prefix="$$dc_install_base" \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__post_remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @test -n '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: trying to run $@ with an empty' \ - '$$(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - $(am__cd) '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \ - $(HEADERS) config.h -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f arm/$(DEPDIR)/$(am__dirstamp) - -rm -f arm/$(am__dirstamp) - -rm -f contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -rm -f contrib/libtests/$(am__dirstamp) - -rm -f contrib/tools/$(DEPDIR)/$(am__dirstamp) - -rm -f contrib/tools/$(am__dirstamp) - -rm -f intel/$(DEPDIR)/$(am__dirstamp) - -rm -f intel/$(am__dirstamp) - -rm -f mips/$(DEPDIR)/$(am__dirstamp) - -rm -f mips/$(am__dirstamp) - -rm -f powerpc/$(DEPDIR)/$(am__dirstamp) - -rm -f powerpc/$(am__dirstamp) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -@DO_INSTALL_LIBPNG_CONFIG_FALSE@@DO_INSTALL_LINKS_FALSE@install-exec-hook: -@DO_INSTALL_LIBPNG_PC_FALSE@@DO_INSTALL_LINKS_FALSE@install-data-hook: -@DO_INSTALL_LIBPNG_CONFIG_FALSE@@DO_INSTALL_LIBPNG_PC_FALSE@@DO_INSTALL_LINKS_FALSE@uninstall-hook: -clean: clean-am - -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f ./$(DEPDIR)/png.Plo - -rm -f ./$(DEPDIR)/pngerror.Plo - -rm -f ./$(DEPDIR)/pngget.Plo - -rm -f ./$(DEPDIR)/pngmem.Plo - -rm -f ./$(DEPDIR)/pngpread.Plo - -rm -f ./$(DEPDIR)/pngread.Plo - -rm -f ./$(DEPDIR)/pngrio.Plo - -rm -f ./$(DEPDIR)/pngrtran.Plo - -rm -f ./$(DEPDIR)/pngrutil.Plo - -rm -f ./$(DEPDIR)/pngset.Plo - -rm -f ./$(DEPDIR)/pngtest.Po - -rm -f ./$(DEPDIR)/pngtrans.Plo - -rm -f ./$(DEPDIR)/pngwio.Plo - -rm -f ./$(DEPDIR)/pngwrite.Plo - -rm -f ./$(DEPDIR)/pngwtran.Plo - -rm -f ./$(DEPDIR)/pngwutil.Plo - -rm -f arm/$(DEPDIR)/arm_init.Plo - -rm -f arm/$(DEPDIR)/filter_neon.Plo - -rm -f arm/$(DEPDIR)/filter_neon_intrinsics.Plo - -rm -f arm/$(DEPDIR)/palette_neon_intrinsics.Plo - -rm -f contrib/libtests/$(DEPDIR)/pngimage.Po - -rm -f contrib/libtests/$(DEPDIR)/pngstest.Po - -rm -f contrib/libtests/$(DEPDIR)/pngunknown.Po - -rm -f contrib/libtests/$(DEPDIR)/pngvalid.Po - -rm -f contrib/libtests/$(DEPDIR)/timepng.Po - -rm -f contrib/tools/$(DEPDIR)/png-fix-itxt.Po - -rm -f contrib/tools/$(DEPDIR)/pngcp.Po - -rm -f contrib/tools/$(DEPDIR)/pngfix.Po - -rm -f intel/$(DEPDIR)/filter_sse2_intrinsics.Plo - -rm -f intel/$(DEPDIR)/intel_init.Plo - -rm -f mips/$(DEPDIR)/filter_msa_intrinsics.Plo - -rm -f mips/$(DEPDIR)/mips_init.Plo - -rm -f powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo - -rm -f powerpc/$(DEPDIR)/powerpc_init.Plo - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man install-nodist_pkgincludeHEADERS \ - install-pkgconfigDATA install-pkgincludeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-binSCRIPTS \ - install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man3 install-man5 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f ./$(DEPDIR)/png.Plo - -rm -f ./$(DEPDIR)/pngerror.Plo - -rm -f ./$(DEPDIR)/pngget.Plo - -rm -f ./$(DEPDIR)/pngmem.Plo - -rm -f ./$(DEPDIR)/pngpread.Plo - -rm -f ./$(DEPDIR)/pngread.Plo - -rm -f ./$(DEPDIR)/pngrio.Plo - -rm -f ./$(DEPDIR)/pngrtran.Plo - -rm -f ./$(DEPDIR)/pngrutil.Plo - -rm -f ./$(DEPDIR)/pngset.Plo - -rm -f ./$(DEPDIR)/pngtest.Po - -rm -f ./$(DEPDIR)/pngtrans.Plo - -rm -f ./$(DEPDIR)/pngwio.Plo - -rm -f ./$(DEPDIR)/pngwrite.Plo - -rm -f ./$(DEPDIR)/pngwtran.Plo - -rm -f ./$(DEPDIR)/pngwutil.Plo - -rm -f arm/$(DEPDIR)/arm_init.Plo - -rm -f arm/$(DEPDIR)/filter_neon.Plo - -rm -f arm/$(DEPDIR)/filter_neon_intrinsics.Plo - -rm -f arm/$(DEPDIR)/palette_neon_intrinsics.Plo - -rm -f contrib/libtests/$(DEPDIR)/pngimage.Po - -rm -f contrib/libtests/$(DEPDIR)/pngstest.Po - -rm -f contrib/libtests/$(DEPDIR)/pngunknown.Po - -rm -f contrib/libtests/$(DEPDIR)/pngvalid.Po - -rm -f contrib/libtests/$(DEPDIR)/timepng.Po - -rm -f contrib/tools/$(DEPDIR)/png-fix-itxt.Po - -rm -f contrib/tools/$(DEPDIR)/pngcp.Po - -rm -f contrib/tools/$(DEPDIR)/pngfix.Po - -rm -f intel/$(DEPDIR)/filter_sse2_intrinsics.Plo - -rm -f intel/$(DEPDIR)/intel_init.Plo - -rm -f mips/$(DEPDIR)/filter_msa_intrinsics.Plo - -rm -f mips/$(DEPDIR)/mips_init.Plo - -rm -f powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo - -rm -f powerpc/$(DEPDIR)/powerpc_init.Plo - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-libLTLIBRARIES uninstall-man \ - uninstall-nodist_pkgincludeHEADERS uninstall-pkgconfigDATA \ - uninstall-pkgincludeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man3 uninstall-man5 - -.MAKE: all check check-am install install-am install-data-am \ - install-exec-am install-strip uninstall-am - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \ - check-TESTS check-am clean clean-binPROGRAMS \ - clean-checkPROGRAMS clean-cscope clean-generic \ - clean-libLTLIBRARIES clean-libtool cscope cscopelist-am ctags \ - ctags-am dist dist-all dist-bzip2 dist-gzip dist-hook \ - dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \ - distclean distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-binSCRIPTS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-man3 install-man5 \ - install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \ - install-pkgconfigDATA install-pkgincludeHEADERS install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-hook uninstall-libLTLIBRARIES \ - uninstall-man uninstall-man3 uninstall-man5 \ - uninstall-nodist_pkgincludeHEADERS uninstall-pkgconfigDATA \ - uninstall-pkgincludeHEADERS - -.PRECIOUS: Makefile - - -$(PNGLIB_BASENAME).pc: libpng.pc - cp libpng.pc $@ - -$(PNGLIB_BASENAME)-config: libpng-config - cp libpng-config $@ - -scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h -scripts/prefix.out: png.h pngconf.h pnglibconf.out -scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt -scripts/intprefix.out: pnglibconf.h - -libpng.sym: scripts/sym.out - rm -f $@ - cp $? $@ -libpng.vers: scripts/vers.out - rm -f $@ - cp $? $@ - -# Rename functions in scripts/prefix.out with a PNG_PREFIX prefix. -# Rename macros in scripts/macro.lst from PNG_PREFIXpng_ to PNG_ (the actual -# implementation of the macro). -@DO_PNG_PREFIX_TRUE@pnglibconf.h: pnglibconf.out scripts/prefix.out scripts/macro.lst -@DO_PNG_PREFIX_TRUE@ rm -f $@ -@DO_PNG_PREFIX_TRUE@ $(AWK) 's==0 && NR>1{print prev}\ -@DO_PNG_PREFIX_TRUE@ s==0{prev=$$0}\ -@DO_PNG_PREFIX_TRUE@ s==1{print "#define", $$1, "@PNG_PREFIX@" $$1}\ -@DO_PNG_PREFIX_TRUE@ s==2{print "#define @PNG_PREFIX@png_" $$1, "PNG_" $$1}\ -@DO_PNG_PREFIX_TRUE@ END{print prev}' s=0 pnglibconf.out s=1 scripts/prefix.out\ -@DO_PNG_PREFIX_TRUE@ s=2 ${srcdir}/scripts/macro.lst >pnglibconf.tf8 -@DO_PNG_PREFIX_TRUE@ mv pnglibconf.tf8 $@ - -@DO_PNG_PREFIX_TRUE@pngprefix.h: scripts/intprefix.out -@DO_PNG_PREFIX_TRUE@ rm -f pngprefix.tf1 -@DO_PNG_PREFIX_TRUE@ $(AWK) '{print "#define", $$1, "@PNG_PREFIX@" $$1}' $? >pngprefix.tf1 -@DO_PNG_PREFIX_TRUE@ mv pngprefix.tf1 $@ -@DO_PNG_PREFIX_FALSE@pnglibconf.h: pnglibconf.out -@DO_PNG_PREFIX_FALSE@ rm -f $@ -@DO_PNG_PREFIX_FALSE@ cp $? $@ - -@DO_PNG_PREFIX_FALSE@pngprefix.h: # is empty -@DO_PNG_PREFIX_FALSE@ :>$@ - -$(srcdir)/scripts/pnglibconf.h.prebuilt: - @echo "Attempting to build $@" >&2 - @echo "This is a machine generated file, but if you want to make" >&2 - @echo "a new one simply make 'scripts/pnglibconf.out', copy that" >&2 - @echo "AND set PNG_ZLIB_VERNUM to 0 (you MUST do this)" >&2 - @exit 1 - -# The following is necessary to ensure that the local pnglibconf.h is used, not -# an installed one (this can happen immediately after on a clean system if -# 'make test' is the first thing the user does.) Only files which include -# one of the png source files (typically png.h or pngpriv.h) need to be listed -# here: -pngtest.o: pnglibconf.h - -contrib/libtests/makepng.o: pnglibconf.h -contrib/libtests/pngstest.o: pnglibconf.h -contrib/libtests/pngunknown.o: pnglibconf.h -contrib/libtests/pngimage.o: pnglibconf.h -contrib/libtests/pngvalid.o: pnglibconf.h -contrib/libtests/readpng.o: pnglibconf.h -contrib/libtests/tarith.o: pnglibconf.h -contrib/libtests/timepng.o: pnglibconf.h - -contrib/tools/makesRGB.o: pnglibconf.h -contrib/tools/pngfix.o: pnglibconf.h -contrib/tools/pngcp.o: pnglibconf.h - -.c.out: - rm -f $@ $*.tf[12] - test -d scripts || mkdir scripts || test -d scripts - $(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\ - $(CPPFLAGS) $(SYMBOL_CFLAGS) $< > $*.tf1 - $(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2 - rm -f $*.tf1 - mv $*.tf2 $@ - -# The .c file for pnglibconf.h is machine generated -pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA) - rm -f $@ $*.tf[45] - $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\ - ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ - ${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2 - $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf5 $*.tf4 1>&2 - rm $*.tf4 - mv $*.tf5 $@ - -# Symbol checks (.def and .out files should match) -scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out - -.out.chk: - rm -f $@ $*.new - $(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\ - of="$*.new" $< >&2 - mv $*.new $@ - -# used on demand to regenerate the standard header, CPPFLAGS should -# be empty - no non-standard defines -scripts/pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h - rm -f $@ pnglibconf.tf[67] - test -z "$(CPPFLAGS)" - echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\ - $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf6\ - logunsupported=1 version=search ${srcdir}/pngconf.h -\ - ${srcdir}/scripts/pnglibconf.dfa 1>&2 - $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf7\ - pnglibconf.tf6 1>&2 - rm pnglibconf.tf6 - mv pnglibconf.tf7 $@ - -$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \ - pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngprefix.h - -test: check-am - -# Extra checks -check: scripts/symbols.chk - -# Don't distribute the generated script files -dist-hook: - cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES) - -# Make links between installed files with release-specific names and the generic -# file names. If this install rule is run the generic names will be deleted and -# recreated - this has obvious issues for systems with multiple installations. - -install-header-links: - @set -ex; cd '$(DESTDIR)$(includedir)'; for f in $(HEADERS); do \ - rm -f "$$f"; $(LN_S) "$(PNGLIB_BASENAME)/$$f" "$$f"; done - -uninstall-header-links: - cd '$(DESTDIR)$(includedir)'; rm -f $(HEADERS) - -install-libpng-pc: - @set -ex; cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc; \ - $(LN_S) '$(PNGLIB_BASENAME).pc' libpng.pc - -uninstall-libpng-pc: - rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc' - -install-library-links: - @set -x; cd '$(DESTDIR)$(libdir)';\ - for ext in $(EXT_LIST); do\ - rm -f "libpng.$$ext";\ - if test -f "$(PNGLIB_BASENAME).$$ext"; then\ - $(LN_S) "$(PNGLIB_BASENAME).$$ext" "libpng.$$ext" || exit 1;\ - fi;\ - done - -uninstall-library-links: - @set -x; cd '$(DESTDIR)$(libdir)'; for ext in $(EXT_LIST); do\ - rm -f "libpng.$$ext"; done - -install-libpng-config: - @set -ex; cd '$(DESTDIR)$(bindir)'; rm -f libpng-config; \ - $(LN_S) '$(PNGLIB_BASENAME)-config' libpng-config - -uninstall-libpng-config: - rm -f '$(DESTDIR)$(bindir)/libpng-config' - -# If --enable-unversioned-links is specified the header and lib file links -# will be automatically made on a 'make install': - -@DO_INSTALL_LINKS_TRUE@install-data-hook: install-header-links -@DO_INSTALL_LINKS_TRUE@uninstall-hook: uninstall-header-links -@DO_INSTALL_LINKS_TRUE@install-exec-hook: install-library-links -@DO_INSTALL_LINKS_TRUE@uninstall-hook: uninstall-library-links - -# Likewise, --install-pc causes libpng.pc to be constructed: - -@DO_INSTALL_LIBPNG_PC_TRUE@install-data-hook: install-libpng-pc -@DO_INSTALL_LIBPNG_PC_TRUE@uninstall-hook: uninstall-libpng-pc - -# And --install-config: - -@DO_INSTALL_LIBPNG_CONFIG_TRUE@install-exec-hook: install-libpng-config -@DO_INSTALL_LIBPNG_CONFIG_TRUE@uninstall-hook: uninstall-libpng-config - -# The following addition ensures that 'make all' always builds the test programs -# too. It used to, but some change either in libpng or configure stopped this -# working. -all-am: $(check_PROGRAMS) - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/thirdparty/libpng-1.6.37/README b/thirdparty/libpng-1.6.37/README deleted file mode 100644 index cfc1f0e..0000000 --- a/thirdparty/libpng-1.6.37/README +++ /dev/null @@ -1,183 +0,0 @@ -README for libpng version 1.6.37 - April 14, 2019 -================================================= - -See the note about version numbers near the top of png.h. -See INSTALL for instructions on how to install libpng. - -Libpng comes in several distribution formats. Get libpng-*.tar.gz or -libpng-*.tar.xz or if you want UNIX-style line endings in the text -files, or lpng*.7z or lpng*.zip if you want DOS-style line endings. - -Version 0.89 was the first official release of libpng. Don't let the -fact that it's the first release fool you. The libpng library has been -in extensive use and testing since mid-1995. By late 1997 it had -finally gotten to the stage where there hadn't been significant -changes to the API in some time, and people have a bad feeling about -libraries with versions < 1.0. Version 1.0.0 was released in -March 1998. - -**** -Note that some of the changes to the png_info structure render this -version of the library binary incompatible with libpng-0.89 or -earlier versions if you are using a shared library. The type of the -"filler" parameter for png_set_filler() has changed from png_byte to -png_uint_32, which will affect shared-library applications that use -this function. - -To avoid problems with changes to the internals of the png info_struct, -new APIs have been made available in 0.95 to avoid direct application -access to info_ptr. These functions are the png_set_ and -png_get_ functions. These functions should be used when -accessing/storing the info_struct data, rather than manipulating it -directly, to avoid such problems in the future. - -It is important to note that the APIs did not make current programs -that access the info struct directly incompatible with the new -library, through libpng-1.2.x. In libpng-1.4.x, which was meant to -be a transitional release, members of the png_struct and the -info_struct can still be accessed, but the compiler will issue a -warning about deprecated usage. Since libpng-1.5.0, direct access -to these structs is not allowed, and the definitions of the structs -reside in private pngstruct.h and pnginfo.h header files that are not -accessible to applications. It is strongly suggested that new -programs use the new APIs (as shown in example.c and pngtest.c), and -older programs be converted to the new format, to facilitate upgrades -in the future. -**** - -Additions since 0.90 include the ability to compile libpng as a -Windows DLL, and new APIs for accessing data in the info struct. -Experimental functions include the ability to set weighting and cost -factors for row filter selection, direct reads of integers from buffers -on big-endian processors that support misaligned data access, faster -methods of doing alpha composition, and more accurate 16->8 bit color -conversion. - -The additions since 0.89 include the ability to read from a PNG stream -which has had some (or all) of the signature bytes read by the calling -application. This also allows the reading of embedded PNG streams that -do not have the PNG file signature. As well, it is now possible to set -the library action on the detection of chunk CRC errors. It is possible -to set different actions based on whether the CRC error occurred in a -critical or an ancillary chunk. - -For a detailed description on using libpng, read libpng-manual.txt. -For examples of libpng in a program, see example.c and pngtest.c. For -usage information and restrictions (what little they are) on libpng, -see png.h. For a description on using zlib (the compression library -used by libpng) and zlib's restrictions, see zlib.h - -I have included a general makefile, as well as several machine and -compiler specific ones, but you may have to modify one for your own -needs. - -You should use zlib 1.0.4 or later to run this, but it MAY work with -versions as old as zlib 0.95. Even so, there are bugs in older zlib -versions which can cause the output of invalid compression streams for -some images. - -You should also note that zlib is a compression library that is useful -for more things than just PNG files. You can use zlib as a drop-in -replacement for fread() and fwrite(), if you are so inclined. - -zlib should be available at the same place that libpng is, or at -https://zlib.net. - -You may also want a copy of the PNG specification. It is available -as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find -these at http://www.libpng.org/pub/png/pngdocs.html . - -This code is currently being archived at libpng.sourceforge.io in the -[DOWNLOAD] area, and at http://libpng.download/src . - -This release, based in a large way on Glenn's, Guy's and Andreas' -earlier work, was created and will be supported by myself and the PNG -development group. - -Send comments/corrections/commendations to png-mng-implement at -lists.sourceforge.net (subscription required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement -to subscribe). - -Send general questions about the PNG specification to png-mng-misc -at lists.sourceforge.net (subscription required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-misc to -subscribe). - -Files in this distribution: - - ANNOUNCE => Announcement of this version, with recent changes - AUTHORS => List of contributing authors - CHANGES => Description of changes between libpng versions - KNOWNBUG => List of known bugs and deficiencies - LICENSE => License to use and redistribute libpng - README => This file - TODO => Things not implemented in the current library - TRADEMARK => Trademark information - example.c => Example code for using libpng functions - libpng.3 => manual page for libpng (includes libpng-manual.txt) - libpng-manual.txt => Description of libpng and its functions - libpngpf.3 => manual page for libpng's private functions - png.5 => manual page for the PNG format - png.c => Basic interface functions common to library - png.h => Library function and interface declarations (public) - pngpriv.h => Library function and interface declarations (private) - pngconf.h => System specific library configuration (public) - pngstruct.h => png_struct declaration (private) - pnginfo.h => png_info struct declaration (private) - pngdebug.h => debugging macros (private) - pngerror.c => Error/warning message I/O functions - pngget.c => Functions for retrieving info from struct - pngmem.c => Memory handling functions - pngbar.png => PNG logo, 88x31 - pngnow.png => PNG logo, 98x31 - pngpread.c => Progressive reading functions - pngread.c => Read data/helper high-level functions - pngrio.c => Lowest-level data read I/O functions - pngrtran.c => Read data transformation functions - pngrutil.c => Read data utility functions - pngset.c => Functions for storing data into the info_struct - pngtest.c => Library test program - pngtest.png => Library test sample image - pngtrans.c => Common data transformation functions - pngwio.c => Lowest-level write I/O functions - pngwrite.c => High-level write functions - pngwtran.c => Write data transformations - pngwutil.c => Write utility functions - arm => Contains optimized code for the ARM platform - powerpc => Contains optimized code for the PowerPC platform - contrib => Contributions - arm-neon => Optimized code for ARM-NEON platform - powerpc-vsx => Optimized code for POWERPC-VSX platform - examples => Example programs - gregbook => source code for PNG reading and writing, from - Greg Roelofs' "PNG: The Definitive Guide", - O'Reilly, 1999 - libtests => Test programs - mips-msa => Optimized code for MIPS-MSA platform - pngminim => Minimal decoder, encoder, and progressive decoder - programs demonstrating use of pngusr.dfa - pngminus => Simple pnm2png and png2pnm programs - pngsuite => Test images - testpngs - tools => Various tools - visupng => Contains a MSVC workspace for VisualPng - intel => Optimized code for INTEL-SSE2 platform - mips => Optimized code for MIPS platform - projects => Contains project files and workspaces for - building a DLL - owatcom => Contains a WATCOM project for building libpng - visualc71 => Contains a Microsoft Visual C++ (MSVC) - workspace for building libpng and zlib - vstudio => Contains a Microsoft Visual C++ (MSVC) - workspace for building libpng and zlib - scripts => Directory containing scripts for building libpng: - (see scripts/README.txt for the list of scripts) - -Good luck, and happy coding! - - * Cosmin Truta (current maintainer, since 2018) - * Glenn Randers-Pehrson (former maintainer, 1998-2018) - * Andreas Eric Dilger (former maintainer, 1996-1997) - * Guy Eric Schalnat (original author and former maintainer, 1995-1996) - (formerly of Group 42, Inc.) diff --git a/thirdparty/libpng-1.6.37/TODO b/thirdparty/libpng-1.6.37/TODO deleted file mode 100644 index 562dab0..0000000 --- a/thirdparty/libpng-1.6.37/TODO +++ /dev/null @@ -1,23 +0,0 @@ -TODO - list of things to do for libpng: - -* Fix all defects (duh!) -* Better C++ wrapper / full C++ implementation (?) -* Fix the problems with C++ and 'extern "C"'. -* cHRM transformation. -* Palette creation. -* "grayscale->palette" transformation and "palette->grayscale" detection. -* Improved dithering. -* Multi-lingual error and warning message support. -* Complete sRGB transformation. (Currently it simply uses gamma=0.45455.) -* Man pages for function calls. -* Better documentation. -* Better filter selection - (e.g., counting huffman bits/precompression; filter inertia; filter costs). -* Histogram creation. -* Text conversion between different code pages (e.g., Latin-1 -> Mac). -* Avoid building gamma tables whenever possible. -* Greater precision in changing to linear gamma for compositing against - background, and in doing rgb-to-gray transformations. -* Investigate pre-incremented loop counters and other loop constructions. -* Interpolated method of handling interlacing. -* More validations for libpng transformations. diff --git a/thirdparty/libpng-1.6.37/TRADEMARK b/thirdparty/libpng-1.6.37/TRADEMARK deleted file mode 100644 index ac66718..0000000 --- a/thirdparty/libpng-1.6.37/TRADEMARK +++ /dev/null @@ -1,8 +0,0 @@ -TRADEMARK -========= - -The name "libpng" has not been registered by the Copyright owners -as a trademark in any jurisdiction. However, because libpng has -been distributed and maintained world-wide, continually since 1995, -the Copyright owners claim "common-law trademark protection" in any -jurisdiction where common-law trademark is recognized. diff --git a/thirdparty/libpng-1.6.37/aclocal.m4 b/thirdparty/libpng-1.6.37/aclocal.m4 deleted file mode 100644 index bc18c34..0000000 --- a/thirdparty/libpng-1.6.37/aclocal.m4 +++ /dev/null @@ -1,1196 +0,0 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- - -# Copyright (C) 1996-2018 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically 'autoreconf'.])]) - -# Copyright (C) 2002-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.16' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# Figure out how to run the assembler. -*- Autoconf -*- - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_AS -# ---------- -AC_DEFUN([AM_PROG_AS], -[# By default we simply use the C compiler to build assembly code. -AC_REQUIRE([AC_PROG_CC]) -test "${CCAS+set}" = set || CCAS=$CC -test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS -AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) -AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) -_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl -]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to -# '$srcdir', '$srcdir/..', or '$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is '.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - - -# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES. -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - AS_CASE([$CONFIG_FILES], - [*\'*], [eval set x "$CONFIG_FILES"], - [*], [set x $CONFIG_FILES]) - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`AS_DIRNAME(["$am_mf"])` - am_filepart=`AS_BASENAME(["$am_mf"])` - AM_RUN_LOG([cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles]) || am_rc=$? - done - if test $am_rc -ne 0; then - AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking).]) - fi - AS_UNSET([am_dirpart]) - AS_UNSET([am_filepart]) - AS_UNSET([am_mf]) - AS_UNSET([am_rc]) - rm -f conftest-deps.mk -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking is enabled. -# This creates each '.Po' and '.Plo' makefile fragment that we'll need in -# order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -m4_define([AC_PROG_CC], -m4_defn([AC_PROG_CC]) -[_AM_PROG_CC_C_O -]) - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.65])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[AC_DIAGNOSE([obsolete], - [$0: two- and three-arguments forms are deprecated.]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), - [ok:ok],, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -AM_MISSING_PROG([AUTOCONF], [autoconf]) -AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -AM_MISSING_PROG([AUTOHEADER], [autoheader]) -AM_MISSING_PROG([MAKEINFO], [makeinfo]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -AC_REQUIRE([AM_SILENT_RULES])dnl -dnl The testsuite driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This -dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. -]) - -dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) - -# Copyright (C) 2003-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless 'enable' is passed literally. -# For symmetry, 'disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], - [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], - am_maintainer_other[ make rules and dependencies not useful - (and sometimes confusing) to the casual installer])], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAKE_INCLUDE() -# ----------------- -# Check whether make has an 'include' directive that can support all -# the idioms we need for our automatic dependency tracking code. -AC_DEFUN([AM_MAKE_INCLUDE], -[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) -cat > confinc.mk << 'END' -am__doit: - @echo this is the am__doit target >confinc.out -.PHONY: am__doit -END -am__include="#" -am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) - AS_CASE([$?:`cat confinc.out 2>/dev/null`], - ['0:this is the am__doit target'], - [AS_CASE([$s], - [BSD], [am__include='.include' am__quote='"'], - [am__include='include' am__quote=''])]) - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -AC_MSG_RESULT([${_am_result}]) -AC_SUBST([am__include])]) -AC_SUBST([am__quote])]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it is modern enough. -# If it is, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# -------------------- -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) - -# _AM_SET_OPTIONS(OPTIONS) -# ------------------------ -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Copyright (C) 1999-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_CC_C_O -# --------------- -# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -# to automatically call this. -AC_DEFUN([_AM_PROG_CC_C_O], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) - -# For backward compatibility. -AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT([yes]) -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi -AC_CONFIG_COMMANDS_PRE( - [AC_MSG_CHECKING([that generated files are newer than configure]) - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - AC_MSG_RESULT([done])]) -rm -f conftest.file -]) - -# Copyright (C) 2009-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], [dnl -AS_HELP_STRING( - [--enable-silent-rules], - [less verbose build output (undo: "make V=1")]) -AS_HELP_STRING( - [--disable-silent-rules], - [verbose build output (undo: "make V=0")])dnl -]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -dnl -dnl A few 'make' implementations (e.g., NonStop OS and NextStep) -dnl do not support nested variable expansions. -dnl See automake bug#9928 and bug#10237. -am_make=${MAKE-make} -AC_CACHE_CHECK([whether $am_make supports nested variables], - [am_cv_make_support_nested_variables], - [if AS_ECHO([['TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor 'install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in "make install-strip", and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of 'v7', 'ustar', or 'pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -# -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' - -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([scripts/libtool.m4]) -m4_include([scripts/ltoptions.m4]) -m4_include([scripts/ltsugar.m4]) -m4_include([scripts/ltversion.m4]) -m4_include([scripts/lt~obsolete.m4]) diff --git a/thirdparty/libpng-1.6.37/arm/.deps/arm_init.Plo b/thirdparty/libpng-1.6.37/arm/.deps/arm_init.Plo deleted file mode 100644 index 9ce06a8..0000000 --- a/thirdparty/libpng-1.6.37/arm/.deps/arm_init.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/libpng-1.6.37/arm/.deps/filter_neon.Plo b/thirdparty/libpng-1.6.37/arm/.deps/filter_neon.Plo deleted file mode 100644 index 9ce06a8..0000000 --- a/thirdparty/libpng-1.6.37/arm/.deps/filter_neon.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/libpng-1.6.37/arm/.deps/filter_neon_intrinsics.Plo b/thirdparty/libpng-1.6.37/arm/.deps/filter_neon_intrinsics.Plo deleted file mode 100644 index 9ce06a8..0000000 --- a/thirdparty/libpng-1.6.37/arm/.deps/filter_neon_intrinsics.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/libpng-1.6.37/arm/.deps/palette_neon_intrinsics.Plo b/thirdparty/libpng-1.6.37/arm/.deps/palette_neon_intrinsics.Plo deleted file mode 100644 index 9ce06a8..0000000 --- a/thirdparty/libpng-1.6.37/arm/.deps/palette_neon_intrinsics.Plo +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/libpng-1.6.37/arm/arm_init.c b/thirdparty/libpng-1.6.37/arm/arm_init.c deleted file mode 100644 index a34ecdb..0000000 --- a/thirdparty/libpng-1.6.37/arm/arm_init.c +++ /dev/null @@ -1,136 +0,0 @@ - -/* arm_init.c - NEON optimised filter functions - * - * Copyright (c) 2018 Cosmin Truta - * Copyright (c) 2014,2016 Glenn Randers-Pehrson - * Written by Mans Rullgard, 2011. - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - */ - -/* Below, after checking __linux__, various non-C90 POSIX 1003.1 functions are - * called. - */ -#define _POSIX_SOURCE 1 - -#include "../pngpriv.h" - -#ifdef PNG_READ_SUPPORTED - -#if PNG_ARM_NEON_OPT > 0 -#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */ -/* WARNING: it is strongly recommended that you do not build libpng with - * run-time checks for CPU features if at all possible. In the case of the ARM - * NEON instructions there is no processor-specific way of detecting the - * presence of the required support, therefore run-time detection is extremely - * OS specific. - * - * You may set the macro PNG_ARM_NEON_FILE to the file name of file containing - * a fragment of C source code which defines the png_have_neon function. There - * are a number of implementations in contrib/arm-neon, but the only one that - * has partial support is contrib/arm-neon/linux.c - a generic Linux - * implementation which reads /proc/cpufino. - */ -#ifndef PNG_ARM_NEON_FILE -# ifdef __linux__ -# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c" -# endif -#endif - -#ifdef PNG_ARM_NEON_FILE - -#include /* for sig_atomic_t */ -static int png_have_neon(png_structp png_ptr); -#include PNG_ARM_NEON_FILE - -#else /* PNG_ARM_NEON_FILE */ -# error "PNG_ARM_NEON_FILE undefined: no support for run-time ARM NEON checks" -#endif /* PNG_ARM_NEON_FILE */ -#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */ - -#ifndef PNG_ALIGNED_MEMORY_SUPPORTED -# error "ALIGNED_MEMORY is required; set: -DPNG_ALIGNED_MEMORY_SUPPORTED" -#endif - -void -png_init_filter_functions_neon(png_structp pp, unsigned int bpp) -{ - /* The switch statement is compiled in for ARM_NEON_API, the call to - * png_have_neon is compiled in for ARM_NEON_CHECK. If both are defined - * the check is only performed if the API has not set the NEON option on - * or off explicitly. In this case the check controls what happens. - * - * If the CHECK is not compiled in and the option is UNSET the behavior prior - * to 1.6.7 was to use the NEON code - this was a bug caused by having the - * wrong order of the 'ON' and 'default' cases. UNSET now defaults to OFF, - * as documented in png.h - */ - png_debug(1, "in png_init_filter_functions_neon"); -#ifdef PNG_ARM_NEON_API_SUPPORTED - switch ((pp->options >> PNG_ARM_NEON) & 3) - { - case PNG_OPTION_UNSET: - /* Allow the run-time check to execute if it has been enabled - - * thus both API and CHECK can be turned on. If it isn't supported - * this case will fall through to the 'default' below, which just - * returns. - */ -#endif /* PNG_ARM_NEON_API_SUPPORTED */ -#ifdef PNG_ARM_NEON_CHECK_SUPPORTED - { - static volatile sig_atomic_t no_neon = -1; /* not checked */ - - if (no_neon < 0) - no_neon = !png_have_neon(pp); - - if (no_neon) - return; - } -#ifdef PNG_ARM_NEON_API_SUPPORTED - break; -#endif -#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */ - -#ifdef PNG_ARM_NEON_API_SUPPORTED - default: /* OFF or INVALID */ - return; - - case PNG_OPTION_ON: - /* Option turned on */ - break; - } -#endif - - /* IMPORTANT: any new external functions used here must be declared using - * PNG_INTERNAL_FUNCTION in ../pngpriv.h. This is required so that the - * 'prefix' option to configure works: - * - * ./configure --with-libpng-prefix=foobar_ - * - * Verify you have got this right by running the above command, doing a build - * and examining pngprefix.h; it must contain a #define for every external - * function you add. (Notice that this happens automatically for the - * initialization function.) - */ - pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up_neon; - - if (bpp == 3) - { - pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_neon; - pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_neon; - pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = - png_read_filter_row_paeth3_neon; - } - - else if (bpp == 4) - { - pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_neon; - pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_neon; - pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = - png_read_filter_row_paeth4_neon; - } -} -#endif /* PNG_ARM_NEON_OPT > 0 */ -#endif /* READ */ diff --git a/thirdparty/libpng-1.6.37/arm/filter_neon.S b/thirdparty/libpng-1.6.37/arm/filter_neon.S deleted file mode 100644 index 2308aad..0000000 --- a/thirdparty/libpng-1.6.37/arm/filter_neon.S +++ /dev/null @@ -1,253 +0,0 @@ - -/* filter_neon.S - NEON optimised filter functions - * - * Copyright (c) 2018 Cosmin Truta - * Copyright (c) 2014,2017 Glenn Randers-Pehrson - * Written by Mans Rullgard, 2011. - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - */ - -/* This is required to get the symbol renames, which are #defines, and the - * definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION. - */ -#define PNG_VERSION_INFO_ONLY -#include "../pngpriv.h" - -#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) -.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */ -#endif - -#ifdef PNG_READ_SUPPORTED - -/* Assembler NEON support - only works for 32-bit ARM (i.e. it does not work for - * ARM64). The code in arm/filter_neon_intrinsics.c supports ARM64, however it - * only works if -mfpu=neon is specified on the GCC command line. See pngpriv.h - * for the logic which sets PNG_USE_ARM_NEON_ASM: - */ -#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */ - -#if PNG_ARM_NEON_OPT > 0 - -#ifdef __ELF__ -# define ELF -#else -# define ELF @ -#endif - - .arch armv7-a - .fpu neon - -.macro func name, export=0 - .macro endfunc -ELF .size \name, . - \name - .endfunc - .purgem endfunc - .endm - .text - - /* Explicitly specifying alignment here because some versions of - * GAS don't align code correctly. This is harmless in correctly - * written versions of GAS. - */ - .align 2 - - .if \export - .global \name - .endif -ELF .type \name, STT_FUNC - .func \name -\name: -.endm - -func png_read_filter_row_sub4_neon, export=1 - ldr r3, [r0, #4] @ rowbytes - vmov.i8 d3, #0 -1: - vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] - vadd.u8 d0, d3, d4 - vadd.u8 d1, d0, d5 - vadd.u8 d2, d1, d6 - vadd.u8 d3, d2, d7 - vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! - subs r3, r3, #16 - bgt 1b - - bx lr -endfunc - -func png_read_filter_row_sub3_neon, export=1 - ldr r3, [r0, #4] @ rowbytes - vmov.i8 d3, #0 - mov r0, r1 - mov r2, #3 - mov r12, #12 - vld1.8 {q11}, [r0], r12 -1: - vext.8 d5, d22, d23, #3 - vadd.u8 d0, d3, d22 - vext.8 d6, d22, d23, #6 - vadd.u8 d1, d0, d5 - vext.8 d7, d23, d23, #1 - vld1.8 {q11}, [r0], r12 - vst1.32 {d0[0]}, [r1,:32], r2 - vadd.u8 d2, d1, d6 - vst1.32 {d1[0]}, [r1], r2 - vadd.u8 d3, d2, d7 - vst1.32 {d2[0]}, [r1], r2 - vst1.32 {d3[0]}, [r1], r2 - subs r3, r3, #12 - bgt 1b - - bx lr -endfunc - -func png_read_filter_row_up_neon, export=1 - ldr r3, [r0, #4] @ rowbytes -1: - vld1.8 {q0}, [r1,:128] - vld1.8 {q1}, [r2,:128]! - vadd.u8 q0, q0, q1 - vst1.8 {q0}, [r1,:128]! - subs r3, r3, #16 - bgt 1b - - bx lr -endfunc - -func png_read_filter_row_avg4_neon, export=1 - ldr r12, [r0, #4] @ rowbytes - vmov.i8 d3, #0 -1: - vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] - vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]! - vhadd.u8 d0, d3, d16 - vadd.u8 d0, d0, d4 - vhadd.u8 d1, d0, d17 - vadd.u8 d1, d1, d5 - vhadd.u8 d2, d1, d18 - vadd.u8 d2, d2, d6 - vhadd.u8 d3, d2, d19 - vadd.u8 d3, d3, d7 - vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! - subs r12, r12, #16 - bgt 1b - - bx lr -endfunc - -func png_read_filter_row_avg3_neon, export=1 - push {r4,lr} - ldr r12, [r0, #4] @ rowbytes - vmov.i8 d3, #0 - mov r0, r1 - mov r4, #3 - mov lr, #12 - vld1.8 {q11}, [r0], lr -1: - vld1.8 {q10}, [r2], lr - vext.8 d5, d22, d23, #3 - vhadd.u8 d0, d3, d20 - vext.8 d17, d20, d21, #3 - vadd.u8 d0, d0, d22 - vext.8 d6, d22, d23, #6 - vhadd.u8 d1, d0, d17 - vext.8 d18, d20, d21, #6 - vadd.u8 d1, d1, d5 - vext.8 d7, d23, d23, #1 - vld1.8 {q11}, [r0], lr - vst1.32 {d0[0]}, [r1,:32], r4 - vhadd.u8 d2, d1, d18 - vst1.32 {d1[0]}, [r1], r4 - vext.8 d19, d21, d21, #1 - vadd.u8 d2, d2, d6 - vhadd.u8 d3, d2, d19 - vst1.32 {d2[0]}, [r1], r4 - vadd.u8 d3, d3, d7 - vst1.32 {d3[0]}, [r1], r4 - subs r12, r12, #12 - bgt 1b - - pop {r4,pc} -endfunc - -.macro paeth rx, ra, rb, rc - vaddl.u8 q12, \ra, \rb @ a + b - vaddl.u8 q15, \rc, \rc @ 2*c - vabdl.u8 q13, \rb, \rc @ pa - vabdl.u8 q14, \ra, \rc @ pb - vabd.u16 q15, q12, q15 @ pc - vcle.u16 q12, q13, q14 @ pa <= pb - vcle.u16 q13, q13, q15 @ pa <= pc - vcle.u16 q14, q14, q15 @ pb <= pc - vand q12, q12, q13 @ pa <= pb && pa <= pc - vmovn.u16 d28, q14 - vmovn.u16 \rx, q12 - vbsl d28, \rb, \rc - vbsl \rx, \ra, d28 -.endm - -func png_read_filter_row_paeth4_neon, export=1 - ldr r12, [r0, #4] @ rowbytes - vmov.i8 d3, #0 - vmov.i8 d20, #0 -1: - vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] - vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]! - paeth d0, d3, d16, d20 - vadd.u8 d0, d0, d4 - paeth d1, d0, d17, d16 - vadd.u8 d1, d1, d5 - paeth d2, d1, d18, d17 - vadd.u8 d2, d2, d6 - paeth d3, d2, d19, d18 - vmov d20, d19 - vadd.u8 d3, d3, d7 - vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! - subs r12, r12, #16 - bgt 1b - - bx lr -endfunc - -func png_read_filter_row_paeth3_neon, export=1 - push {r4,lr} - ldr r12, [r0, #4] @ rowbytes - vmov.i8 d3, #0 - vmov.i8 d4, #0 - mov r0, r1 - mov r4, #3 - mov lr, #12 - vld1.8 {q11}, [r0], lr -1: - vld1.8 {q10}, [r2], lr - paeth d0, d3, d20, d4 - vext.8 d5, d22, d23, #3 - vadd.u8 d0, d0, d22 - vext.8 d17, d20, d21, #3 - paeth d1, d0, d17, d20 - vst1.32 {d0[0]}, [r1,:32], r4 - vext.8 d6, d22, d23, #6 - vadd.u8 d1, d1, d5 - vext.8 d18, d20, d21, #6 - paeth d2, d1, d18, d17 - vext.8 d7, d23, d23, #1 - vld1.8 {q11}, [r0], lr - vst1.32 {d1[0]}, [r1], r4 - vadd.u8 d2, d2, d6 - vext.8 d19, d21, d21, #1 - paeth d3, d2, d19, d18 - vst1.32 {d2[0]}, [r1], r4 - vmov d4, d19 - vadd.u8 d3, d3, d7 - vst1.32 {d3[0]}, [r1], r4 - subs r12, r12, #12 - bgt 1b - - pop {r4,pc} -endfunc -#endif /* PNG_ARM_NEON_OPT > 0 */ -#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */ -#endif /* READ */ diff --git a/thirdparty/libpng-1.6.37/arm/filter_neon_intrinsics.c b/thirdparty/libpng-1.6.37/arm/filter_neon_intrinsics.c deleted file mode 100644 index 553c0be..0000000 --- a/thirdparty/libpng-1.6.37/arm/filter_neon_intrinsics.c +++ /dev/null @@ -1,402 +0,0 @@ - -/* filter_neon_intrinsics.c - NEON optimised filter functions - * - * Copyright (c) 2018 Cosmin Truta - * Copyright (c) 2014,2016 Glenn Randers-Pehrson - * Written by James Yu , October 2013. - * Based on filter_neon.S, written by Mans Rullgard, 2011. - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - */ - -#include "../pngpriv.h" - -#ifdef PNG_READ_SUPPORTED - -/* This code requires -mfpu=neon on the command line: */ -#if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */ - -#if defined(_MSC_VER) && defined(_M_ARM64) -# include -#else -# include -#endif - -/* libpng row pointers are not necessarily aligned to any particular boundary, - * however this code will only work with appropriate alignment. arm/arm_init.c - * checks for this (and will not compile unless it is done). This code uses - * variants of png_aligncast to avoid compiler warnings. - */ -#define png_ptr(type,pointer) png_aligncast(type *,pointer) -#define png_ptrc(type,pointer) png_aligncastconst(const type *,pointer) - -/* The following relies on a variable 'temp_pointer' being declared with type - * 'type'. This is written this way just to hide the GCC strict aliasing - * warning; note that the code is safe because there never is an alias between - * the input and output pointers. - * - * When compiling with MSVC ARM64, the png_ldr macro can't be passed directly - * to vst4_lane_u32, because of an internal compiler error inside MSVC. - * To avoid this compiler bug, we use a temporary variable (vdest_val) to store - * the result of png_ldr. - */ -#define png_ldr(type,pointer)\ - (temp_pointer = png_ptr(type,pointer), *temp_pointer) - -#if PNG_ARM_NEON_OPT > 0 - -void -png_read_filter_row_up_neon(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - png_bytep rp = row; - png_bytep rp_stop = row + row_info->rowbytes; - png_const_bytep pp = prev_row; - - png_debug(1, "in png_read_filter_row_up_neon"); - - for (; rp < rp_stop; rp += 16, pp += 16) - { - uint8x16_t qrp, qpp; - - qrp = vld1q_u8(rp); - qpp = vld1q_u8(pp); - qrp = vaddq_u8(qrp, qpp); - vst1q_u8(rp, qrp); - } -} - -void -png_read_filter_row_sub3_neon(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - png_bytep rp = row; - png_bytep rp_stop = row + row_info->rowbytes; - - uint8x16_t vtmp = vld1q_u8(rp); - uint8x8x2_t *vrpt = png_ptr(uint8x8x2_t, &vtmp); - uint8x8x2_t vrp = *vrpt; - - uint8x8x4_t vdest; - vdest.val[3] = vdup_n_u8(0); - - png_debug(1, "in png_read_filter_row_sub3_neon"); - - for (; rp < rp_stop;) - { - uint8x8_t vtmp1, vtmp2; - uint32x2_t *temp_pointer; - - vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 3); - vdest.val[0] = vadd_u8(vdest.val[3], vrp.val[0]); - vtmp2 = vext_u8(vrp.val[0], vrp.val[1], 6); - vdest.val[1] = vadd_u8(vdest.val[0], vtmp1); - - vtmp1 = vext_u8(vrp.val[1], vrp.val[1], 1); - vdest.val[2] = vadd_u8(vdest.val[1], vtmp2); - vdest.val[3] = vadd_u8(vdest.val[2], vtmp1); - - vtmp = vld1q_u8(rp + 12); - vrpt = png_ptr(uint8x8x2_t, &vtmp); - vrp = *vrpt; - - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[0]), 0); - rp += 3; - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[1]), 0); - rp += 3; - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[2]), 0); - rp += 3; - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[3]), 0); - rp += 3; - } - - PNG_UNUSED(prev_row) -} - -void -png_read_filter_row_sub4_neon(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - png_bytep rp = row; - png_bytep rp_stop = row + row_info->rowbytes; - - uint8x8x4_t vdest; - vdest.val[3] = vdup_n_u8(0); - - png_debug(1, "in png_read_filter_row_sub4_neon"); - - for (; rp < rp_stop; rp += 16) - { - uint32x2x4_t vtmp = vld4_u32(png_ptr(uint32_t,rp)); - uint8x8x4_t *vrpt = png_ptr(uint8x8x4_t,&vtmp); - uint8x8x4_t vrp = *vrpt; - uint32x2x4_t *temp_pointer; - uint32x2x4_t vdest_val; - - vdest.val[0] = vadd_u8(vdest.val[3], vrp.val[0]); - vdest.val[1] = vadd_u8(vdest.val[0], vrp.val[1]); - vdest.val[2] = vadd_u8(vdest.val[1], vrp.val[2]); - vdest.val[3] = vadd_u8(vdest.val[2], vrp.val[3]); - - vdest_val = png_ldr(uint32x2x4_t, &vdest); - vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0); - } - - PNG_UNUSED(prev_row) -} - -void -png_read_filter_row_avg3_neon(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - png_bytep rp = row; - png_const_bytep pp = prev_row; - png_bytep rp_stop = row + row_info->rowbytes; - - uint8x16_t vtmp; - uint8x8x2_t *vrpt; - uint8x8x2_t vrp; - uint8x8x4_t vdest; - vdest.val[3] = vdup_n_u8(0); - - vtmp = vld1q_u8(rp); - vrpt = png_ptr(uint8x8x2_t,&vtmp); - vrp = *vrpt; - - png_debug(1, "in png_read_filter_row_avg3_neon"); - - for (; rp < rp_stop; pp += 12) - { - uint8x8_t vtmp1, vtmp2, vtmp3; - - uint8x8x2_t *vppt; - uint8x8x2_t vpp; - - uint32x2_t *temp_pointer; - - vtmp = vld1q_u8(pp); - vppt = png_ptr(uint8x8x2_t,&vtmp); - vpp = *vppt; - - vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 3); - vdest.val[0] = vhadd_u8(vdest.val[3], vpp.val[0]); - vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]); - - vtmp2 = vext_u8(vpp.val[0], vpp.val[1], 3); - vtmp3 = vext_u8(vrp.val[0], vrp.val[1], 6); - vdest.val[1] = vhadd_u8(vdest.val[0], vtmp2); - vdest.val[1] = vadd_u8(vdest.val[1], vtmp1); - - vtmp2 = vext_u8(vpp.val[0], vpp.val[1], 6); - vtmp1 = vext_u8(vrp.val[1], vrp.val[1], 1); - - vtmp = vld1q_u8(rp + 12); - vrpt = png_ptr(uint8x8x2_t,&vtmp); - vrp = *vrpt; - - vdest.val[2] = vhadd_u8(vdest.val[1], vtmp2); - vdest.val[2] = vadd_u8(vdest.val[2], vtmp3); - - vtmp2 = vext_u8(vpp.val[1], vpp.val[1], 1); - - vdest.val[3] = vhadd_u8(vdest.val[2], vtmp2); - vdest.val[3] = vadd_u8(vdest.val[3], vtmp1); - - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[0]), 0); - rp += 3; - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[1]), 0); - rp += 3; - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[2]), 0); - rp += 3; - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[3]), 0); - rp += 3; - } -} - -void -png_read_filter_row_avg4_neon(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - png_bytep rp = row; - png_bytep rp_stop = row + row_info->rowbytes; - png_const_bytep pp = prev_row; - - uint8x8x4_t vdest; - vdest.val[3] = vdup_n_u8(0); - - png_debug(1, "in png_read_filter_row_avg4_neon"); - - for (; rp < rp_stop; rp += 16, pp += 16) - { - uint32x2x4_t vtmp; - uint8x8x4_t *vrpt, *vppt; - uint8x8x4_t vrp, vpp; - uint32x2x4_t *temp_pointer; - uint32x2x4_t vdest_val; - - vtmp = vld4_u32(png_ptr(uint32_t,rp)); - vrpt = png_ptr(uint8x8x4_t,&vtmp); - vrp = *vrpt; - vtmp = vld4_u32(png_ptrc(uint32_t,pp)); - vppt = png_ptr(uint8x8x4_t,&vtmp); - vpp = *vppt; - - vdest.val[0] = vhadd_u8(vdest.val[3], vpp.val[0]); - vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]); - vdest.val[1] = vhadd_u8(vdest.val[0], vpp.val[1]); - vdest.val[1] = vadd_u8(vdest.val[1], vrp.val[1]); - vdest.val[2] = vhadd_u8(vdest.val[1], vpp.val[2]); - vdest.val[2] = vadd_u8(vdest.val[2], vrp.val[2]); - vdest.val[3] = vhadd_u8(vdest.val[2], vpp.val[3]); - vdest.val[3] = vadd_u8(vdest.val[3], vrp.val[3]); - - vdest_val = png_ldr(uint32x2x4_t, &vdest); - vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0); - } -} - -static uint8x8_t -paeth(uint8x8_t a, uint8x8_t b, uint8x8_t c) -{ - uint8x8_t d, e; - uint16x8_t p1, pa, pb, pc; - - p1 = vaddl_u8(a, b); /* a + b */ - pc = vaddl_u8(c, c); /* c * 2 */ - pa = vabdl_u8(b, c); /* pa */ - pb = vabdl_u8(a, c); /* pb */ - pc = vabdq_u16(p1, pc); /* pc */ - - p1 = vcleq_u16(pa, pb); /* pa <= pb */ - pa = vcleq_u16(pa, pc); /* pa <= pc */ - pb = vcleq_u16(pb, pc); /* pb <= pc */ - - p1 = vandq_u16(p1, pa); /* pa <= pb && pa <= pc */ - - d = vmovn_u16(pb); - e = vmovn_u16(p1); - - d = vbsl_u8(d, b, c); - e = vbsl_u8(e, a, d); - - return e; -} - -void -png_read_filter_row_paeth3_neon(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - png_bytep rp = row; - png_const_bytep pp = prev_row; - png_bytep rp_stop = row + row_info->rowbytes; - - uint8x16_t vtmp; - uint8x8x2_t *vrpt; - uint8x8x2_t vrp; - uint8x8_t vlast = vdup_n_u8(0); - uint8x8x4_t vdest; - vdest.val[3] = vdup_n_u8(0); - - vtmp = vld1q_u8(rp); - vrpt = png_ptr(uint8x8x2_t,&vtmp); - vrp = *vrpt; - - png_debug(1, "in png_read_filter_row_paeth3_neon"); - - for (; rp < rp_stop; pp += 12) - { - uint8x8x2_t *vppt; - uint8x8x2_t vpp; - uint8x8_t vtmp1, vtmp2, vtmp3; - uint32x2_t *temp_pointer; - - vtmp = vld1q_u8(pp); - vppt = png_ptr(uint8x8x2_t,&vtmp); - vpp = *vppt; - - vdest.val[0] = paeth(vdest.val[3], vpp.val[0], vlast); - vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]); - - vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 3); - vtmp2 = vext_u8(vpp.val[0], vpp.val[1], 3); - vdest.val[1] = paeth(vdest.val[0], vtmp2, vpp.val[0]); - vdest.val[1] = vadd_u8(vdest.val[1], vtmp1); - - vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 6); - vtmp3 = vext_u8(vpp.val[0], vpp.val[1], 6); - vdest.val[2] = paeth(vdest.val[1], vtmp3, vtmp2); - vdest.val[2] = vadd_u8(vdest.val[2], vtmp1); - - vtmp1 = vext_u8(vrp.val[1], vrp.val[1], 1); - vtmp2 = vext_u8(vpp.val[1], vpp.val[1], 1); - - vtmp = vld1q_u8(rp + 12); - vrpt = png_ptr(uint8x8x2_t,&vtmp); - vrp = *vrpt; - - vdest.val[3] = paeth(vdest.val[2], vtmp2, vtmp3); - vdest.val[3] = vadd_u8(vdest.val[3], vtmp1); - - vlast = vtmp2; - - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[0]), 0); - rp += 3; - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[1]), 0); - rp += 3; - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[2]), 0); - rp += 3; - vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[3]), 0); - rp += 3; - } -} - -void -png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - png_bytep rp = row; - png_bytep rp_stop = row + row_info->rowbytes; - png_const_bytep pp = prev_row; - - uint8x8_t vlast = vdup_n_u8(0); - uint8x8x4_t vdest; - vdest.val[3] = vdup_n_u8(0); - - png_debug(1, "in png_read_filter_row_paeth4_neon"); - - for (; rp < rp_stop; rp += 16, pp += 16) - { - uint32x2x4_t vtmp; - uint8x8x4_t *vrpt, *vppt; - uint8x8x4_t vrp, vpp; - uint32x2x4_t *temp_pointer; - uint32x2x4_t vdest_val; - - vtmp = vld4_u32(png_ptr(uint32_t,rp)); - vrpt = png_ptr(uint8x8x4_t,&vtmp); - vrp = *vrpt; - vtmp = vld4_u32(png_ptrc(uint32_t,pp)); - vppt = png_ptr(uint8x8x4_t,&vtmp); - vpp = *vppt; - - vdest.val[0] = paeth(vdest.val[3], vpp.val[0], vlast); - vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]); - vdest.val[1] = paeth(vdest.val[0], vpp.val[1], vpp.val[0]); - vdest.val[1] = vadd_u8(vdest.val[1], vrp.val[1]); - vdest.val[2] = paeth(vdest.val[1], vpp.val[2], vpp.val[1]); - vdest.val[2] = vadd_u8(vdest.val[2], vrp.val[2]); - vdest.val[3] = paeth(vdest.val[2], vpp.val[3], vpp.val[2]); - vdest.val[3] = vadd_u8(vdest.val[3], vrp.val[3]); - - vlast = vpp.val[3]; - - vdest_val = png_ldr(uint32x2x4_t, &vdest); - vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0); - } -} - -#endif /* PNG_ARM_NEON_OPT > 0 */ -#endif /* PNG_ARM_NEON_IMPLEMENTATION == 1 (intrinsics) */ -#endif /* READ */ diff --git a/thirdparty/libpng-1.6.37/arm/palette_neon_intrinsics.c b/thirdparty/libpng-1.6.37/arm/palette_neon_intrinsics.c deleted file mode 100644 index b4d1fd2..0000000 --- a/thirdparty/libpng-1.6.37/arm/palette_neon_intrinsics.c +++ /dev/null @@ -1,149 +0,0 @@ - -/* palette_neon_intrinsics.c - NEON optimised palette expansion functions - * - * Copyright (c) 2018-2019 Cosmin Truta - * Copyright (c) 2017-2018 Arm Holdings. All rights reserved. - * Written by Richard Townsend , February 2017. - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - */ - -#include "../pngpriv.h" - -#if PNG_ARM_NEON_IMPLEMENTATION == 1 - -#if defined(_MSC_VER) && defined(_M_ARM64) -# include -#else -# include -#endif - -/* Build an RGBA8 palette from the separate RGB and alpha palettes. */ -void -png_riffle_palette_neon(png_structrp png_ptr) -{ - png_const_colorp palette = png_ptr->palette; - png_bytep riffled_palette = png_ptr->riffled_palette; - png_const_bytep trans_alpha = png_ptr->trans_alpha; - int num_trans = png_ptr->num_trans; - int i; - - png_debug(1, "in png_riffle_palette_neon"); - - /* Initially black, opaque. */ - uint8x16x4_t w = {{ - vdupq_n_u8(0x00), - vdupq_n_u8(0x00), - vdupq_n_u8(0x00), - vdupq_n_u8(0xff), - }}; - - /* First, riffle the RGB colours into an RGBA8 palette. - * The alpha component is set to opaque for now. - */ - for (i = 0; i < 256; i += 16) - { - uint8x16x3_t v = vld3q_u8((png_const_bytep)(palette + i)); - w.val[0] = v.val[0]; - w.val[1] = v.val[1]; - w.val[2] = v.val[2]; - vst4q_u8(riffled_palette + (i << 2), w); - } - - /* Fix up the missing transparency values. */ - for (i = 0; i < num_trans; i++) - riffled_palette[(i << 2) + 3] = trans_alpha[i]; -} - -/* Expands a palettized row into RGBA8. */ -int -png_do_expand_palette_rgba8_neon(png_structrp png_ptr, png_row_infop row_info, - png_const_bytep row, png_bytepp ssp, png_bytepp ddp) -{ - png_uint_32 row_width = row_info->width; - const png_uint_32 *riffled_palette = - (const png_uint_32 *)png_ptr->riffled_palette; - const png_int_32 pixels_per_chunk = 4; - int i; - - png_debug(1, "in png_do_expand_palette_rgba8_neon"); - - if (row_width < pixels_per_chunk) - return 0; - - /* This function originally gets the last byte of the output row. - * The NEON part writes forward from a given position, so we have - * to seek this back by 4 pixels x 4 bytes. - */ - *ddp = *ddp - ((pixels_per_chunk * sizeof(png_uint_32)) - 1); - - for (i = 0; i < row_width; i += pixels_per_chunk) - { - uint32x4_t cur; - png_bytep sp = *ssp - i, dp = *ddp - (i << 2); - cur = vld1q_dup_u32 (riffled_palette + *(sp - 3)); - cur = vld1q_lane_u32(riffled_palette + *(sp - 2), cur, 1); - cur = vld1q_lane_u32(riffled_palette + *(sp - 1), cur, 2); - cur = vld1q_lane_u32(riffled_palette + *(sp - 0), cur, 3); - vst1q_u32((void *)dp, cur); - } - if (i != row_width) - { - /* Remove the amount that wasn't processed. */ - i -= pixels_per_chunk; - } - - /* Decrement output pointers. */ - *ssp = *ssp - i; - *ddp = *ddp - (i << 2); - return i; -} - -/* Expands a palettized row into RGB8. */ -int -png_do_expand_palette_rgb8_neon(png_structrp png_ptr, png_row_infop row_info, - png_const_bytep row, png_bytepp ssp, png_bytepp ddp) -{ - png_uint_32 row_width = row_info->width; - png_const_bytep palette = (png_const_bytep)png_ptr->palette; - const png_uint_32 pixels_per_chunk = 8; - int i; - - png_debug(1, "in png_do_expand_palette_rgb8_neon"); - - if (row_width <= pixels_per_chunk) - return 0; - - /* Seeking this back by 8 pixels x 3 bytes. */ - *ddp = *ddp - ((pixels_per_chunk * sizeof(png_color)) - 1); - - for (i = 0; i < row_width; i += pixels_per_chunk) - { - uint8x8x3_t cur; - png_bytep sp = *ssp - i, dp = *ddp - ((i << 1) + i); - cur = vld3_dup_u8(palette + sizeof(png_color) * (*(sp - 7))); - cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 6)), cur, 1); - cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 5)), cur, 2); - cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 4)), cur, 3); - cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 3)), cur, 4); - cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 2)), cur, 5); - cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 1)), cur, 6); - cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 0)), cur, 7); - vst3_u8((void *)dp, cur); - } - - if (i != row_width) - { - /* Remove the amount that wasn't processed. */ - i -= pixels_per_chunk; - } - - /* Decrement output pointers. */ - *ssp = *ssp - i; - *ddp = *ddp - ((i << 1) + i); - return i; -} - -#endif /* PNG_ARM_NEON_IMPLEMENTATION */ diff --git a/thirdparty/libpng-1.6.37/autogen.sh b/thirdparty/libpng-1.6.37/autogen.sh deleted file mode 100755 index a46daf6..0000000 --- a/thirdparty/libpng-1.6.37/autogen.sh +++ /dev/null @@ -1,225 +0,0 @@ -#! /bin/sh -# -# Run 'autoreconf' to build 'configure', 'Makefile.in' and other configure -# control files. -# -# The first time this is run on a GIT checkout the only files that exist are -# configure.ac and Makefile.am; all of the autotools support scripts are -# missing. They are instantiated with autoreconf --force --install. -# -# For regular ("tarball") distributions all the files should exist. We do not -# want them to be updated *under any circumstances*. It should never be -# necessary to run autogen.sh because ./configure --enable-maintainer-mode says -# what to do if Makefile.am or configure.ac are changed. -# -# It is *probably* OK to update the files on a GIT checkout, because they have -# come from the local tools, but leave that to the user who is assumed to know -# whether it is ok or required. -# -# This script is intended to work without arguments, there are, however, hidden -# arguments (a) for use while testing the script and (b) to fix up systems that -# have been broken. If (b) is required the script prompts for the correct -# options. For this reason the options are *NOT* documented in the help; this -# is deliberate; UTSL. -# -clean= -maintainer= -while test $# -gt 0 -do - case "$1" in - --maintainer) - maintainer=1;; - - --clean) - clean=1;; - - *) - exec >&2 - echo "$0: usage: ./autogen.sh" - if test -d .git - then - echo " ./autogen.sh generates the configure script and" - echo " Makefile.in, or refreshes them after changes to Makefile.am" - echo " or configure.ac. You may prefer to just run autoreconf." - elif test -z "$maintainer" - then - echo " DO NOT RUN THIS SCRIPT." - echo " If you need to change Makefile.am or configure.ac then you" - echo " also need to run ./configure --enable-maintainer-mode and" - echo " use the appropriate autotools, *NOT* this script, to update" - echo " everything, please check the documentation of autoreconf." - echo " WARNING: libpng is intentionally generated with a known," - echo " fixed, set of autotools. It is known *NOT* to work with" - echo " the collection of autotools distributed on highly reputable" - echo " operating systems." - echo " Remember: autotools is GNU software, you are expected to" - echo " pay for support." - else - echo " You have run autogen.sh with --maintainer enabled and you" - echo " are not using a GIT distribution, then you have given an" - echo " unrecognized argument. This is not good. --maintainer" - echo " switches off any assumptions that you might not know what" - echo " you are doing." - fi - exit 1;; - esac - - shift -done -# -# First check for a set of the autotools files; if absent then this is assumed -# to be a GIT version and the local autotools must be used. If present this -# is a tarball distribution and the script should not be used. If partially -# present bad things are happening. -# -# The autotools generated files: -libpng_autotools_files="Makefile.in aclocal.m4 config.guess config.h.in - config.sub configure depcomp install-sh ltmain.sh missing\ - test-driver" -# -# Files generated by versions of configue >2.68 or automake >1.13 (i.e. later -# versions than those required by configure.ac): -libpng_autotools_extra="compile config.h.in~" -# -# These are separate because 'maintainer-clean' does not remove them. -libpng_libtool_files="scripts/libtool.m4 scripts/ltoptions.m4\ - scripts/ltsugar.m4 scripts/ltversion.m4 scripts/lt~obsolete.m4" - -libpng_autotools_dirs="autom4te.cache" # not required -# -# The configure generated files: -libpng_configure_files="Makefile config.h config.log config.status\ - libpng-config libpng.pc libtool stamp-h1" - -libpng_configure_dirs=".deps" -# -# We must remove the configure generated files as well as the autotools -# generated files if autotools are regenerated because otherwise if configure -# has been run without "--enable-maintainer-mode" make can do a partial update -# of Makefile. These functions do the two bits of cleaning. -clean_autotools(){ - rm -rf $libpng_autotools_files $libpng_libtool_files $libpng_autotools_dirs - rm -rf $libpng_autotools_extra -} - -clean_configure(){ - rm -rf $libpng_configure_files $libpng_configure_dirs -} -# -# Clean: remove everything (this is to help with testing) -if test -n "$clean" -then - clean_configure - if test -n "$maintainer" - then - clean_autotools - fi - - exit 0 -fi -# -# Validate the distribution. -libpng_autotools_file_found= -libpng_autotools_file_missing= -for file in $libpng_autotools_files -do - if test -f "$file" - then - libpng_autotools_file_found=1 - else - libpng_autotools_file_missing=1 - fi -done -# -# Presence of one of these does not *invalidate* missing, but absence -# invalidates found. -for file in $libpng_libtool_files -do - if test ! -f "$file" - then - libpng_autotools_file_missing=1 - fi -done -# -# The cache directory doesn't matter - it will be regenerated and does not exist -# anyway in a tarball. -# -# Either everything is missing or everything is there, the --maintainer option -# just changes this so that the mode is set to generate all the files. -mode= -if test -z "$libpng_autotools_file_found" -o -n "$maintainer" -then - mode="autoreconf" -else - if test -n "$libpng_autotools_file_missing" - then - mode="broken" - else - mode="configure" - fi -fi -# -# So: -case "$mode" in - autoreconf) - # Clean in case configure files exist - clean_configure - clean_autotools - # Everything must be initialized, so use --force - if autoreconf --warnings=all --force --install - then - missing= - for file in $libpng_autotools_files - do - test -f "$file" || missing=1 - done - # ignore the cache directory - test -z "$missing" || { - exec >&2 - echo "autoreconf was run, but did not produce all the expected" - echo "files. It is likely that your autotools installation is" - echo "not compatible with that expected by libpng." - exit 1 - } - else - exec >&2 - echo "autoreconf failed: your version of autotools is incompatible" - echo "with this libpng version. Please use a distributed archive" - echo "(which includes the autotools generated files) and run configure" - echo "instead." - exit 1 - fi;; - - configure) - if test -d .git - then - exec >&2 - echo "ERROR: running autoreconf on an initialized system" - echo " This is not necessary; it is only necessary to remake the" - echo " autotools generated files if Makefile.am or configure.ac" - echo " change and make does the right thing with:" - echo - echo " ./configure --enable-maintainer-mode." - echo - echo " You can run autoreconf yourself if you don't like maintainer" - echo " mode and you can also just run autoreconf -f -i to initialize" - echo " everything in the first place; this script is only for" - echo " compatibility with prior releases." - exit 1 - else - exec >&2 - echo "autogen.sh is intended only to generate 'configure' on systems" - echo "that do not have it. You have a complete 'configure', if you" - echo "need to change Makefile.am or configure.ac you also need to" - echo "run configure with the --enable-maintainer-mode option." - exit 1 - fi;; - - broken) - exec >&2 - echo "Your system has a partial set of autotools generated files." - echo "autogen.sh is unable to proceed. The full set of files is" - echo "contained in the libpng 'tar' distribution archive and you do" - echo "not need to run autogen.sh if you use it." - exit 1;; -esac diff --git a/thirdparty/libpng-1.6.37/compile b/thirdparty/libpng-1.6.37/compile deleted file mode 100755 index 99e5052..0000000 --- a/thirdparty/libpng-1.6.37/compile +++ /dev/null @@ -1,348 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand '-c -o'. - -scriptversion=2018-03-07.03; # UTC - -# Copyright (C) 1999-2018 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' - -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent tools from complaining about whitespace usage. -IFS=" "" $nl" - -file_conv= - -# func_file_conv build_file lazy -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. If the determined conversion -# type is listed in (the comma separated) LAZY, no conversion will -# take place. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv/,$2, in - *,$file_conv,*) - ;; - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_cl_dashL linkdir -# Make cl look for libraries in LINKDIR -func_cl_dashL () -{ - func_file_conv "$1" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" -} - -# func_cl_dashl library -# Do a library search-path lookup for cl -func_cl_dashl () -{ - lib=$1 - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - lib=$dir/$lib.dll.lib - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - lib=$dir/$lib.lib - break - fi - if test -f "$dir/lib$lib.a"; then - found=yes - lib=$dir/lib$lib.a - break - fi - done - IFS=$save_IFS - - if test "$found" != yes; then - lib=$lib.lib - fi -} - -# func_cl_wrapper cl arg... -# Adjust compile command to suit cl -func_cl_wrapper () -{ - # Assume a capable shell - lib_path= - shared=: - linker_opts= - for arg - do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - eat=1 - case $2 in - *.o | *.[oO][bB][jJ]) - func_file_conv "$2" - set x "$@" -Fo"$file" - shift - ;; - *) - func_file_conv "$2" - set x "$@" -Fe"$file" - shift - ;; - esac - ;; - -I) - eat=1 - func_file_conv "$2" mingw - set x "$@" -I"$file" - shift - ;; - -I*) - func_file_conv "${1#-I}" mingw - set x "$@" -I"$file" - shift - ;; - -l) - eat=1 - func_cl_dashl "$2" - set x "$@" "$lib" - shift - ;; - -l*) - func_cl_dashl "${1#-l}" - set x "$@" "$lib" - shift - ;; - -L) - eat=1 - func_cl_dashL "$2" - ;; - -L*) - func_cl_dashL "${1#-L}" - ;; - -static) - shared=false - ;; - -Wl,*) - arg=${1#-Wl,} - save_ifs="$IFS"; IFS=',' - for flag in $arg; do - IFS="$save_ifs" - linker_opts="$linker_opts $flag" - done - IFS="$save_ifs" - ;; - -Xlinker) - eat=1 - linker_opts="$linker_opts $2" - ;; - -*) - set x "$@" "$1" - shift - ;; - *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) - func_file_conv "$1" - set x "$@" -Tp"$file" - shift - ;; - *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) - func_file_conv "$1" mingw - set x "$@" "$file" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift - done - if test -n "$linker_opts"; then - linker_opts="-link$linker_opts" - fi - exec "$@" $linker_opts - exit 1 -} - -eat= - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand '-c -o'. -Remove '-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file 'INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ - icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) - func_cl_wrapper "$@" # Doesn't return... - ;; -esac - -ofile= -cfile= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - # So we strip '-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no '-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # '.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use '[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/thirdparty/libpng-1.6.37/config.guess b/thirdparty/libpng-1.6.37/config.guess deleted file mode 100755 index 256083a..0000000 --- a/thirdparty/libpng-1.6.37/config.guess +++ /dev/null @@ -1,1476 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. - -timestamp='2018-03-08' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. -# -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess -# -# Please send patches to . - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case "$UNAME_SYSTEM" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - eval "$set_cc_for_build" - cat <<-EOF > "$dummy.c" - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" - - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl - fi - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)` - case "$UNAME_MACHINE_ARCH" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown - ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in - earm*) - os=netbsdelf - ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in - earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in - Debian*) - release='-gnu' - ;; - *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" - exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; - *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; - *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; - *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; - *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; - *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; - mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE=alpha ;; - "EV4.5 (21064)") - UNAME_MACHINE=alpha ;; - "LCA4 (21066/21068)") - UNAME_MACHINE=alpha ;; - "EV5 (21164)") - UNAME_MACHINE=alphaev5 ;; - "EV5.6 (21164A)") - UNAME_MACHINE=alphaev56 ;; - "EV5.6 (21164PC)") - UNAME_MACHINE=alphapca56 ;; - "EV5.7 (21164PC)") - UNAME_MACHINE=alphapca57 ;; - "EV6 (21264)") - UNAME_MACHINE=alphaev6 ;; - "EV6.7 (21264A)") - UNAME_MACHINE=alphaev67 ;; - "EV6.8CB (21264C)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8AL (21264B)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8CX (21264D)") - UNAME_MACHINE=alphaev68 ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE=alphaev69 ;; - "EV7 (21364)") - UNAME_MACHINE=alphaev7 ;; - "EV7.9 (21364A)") - UNAME_MACHINE=alphaev79 ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" - ;; - sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] - then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] - then - echo m88k-dg-dgux"$UNAME_RELEASE" - else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" - fi - else - echo i586-dg-dgux"$UNAME_RELEASE" - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in - 9000/31?) HP_ARCH=m68000 ;; - 9000/[34]??) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in - 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 - 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in - 32) HP_ARCH=hppa2.0n ;; - 64) HP_ARCH=hppa2.0w ;; - '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ "$HP_ARCH" = hppa2.0w ] - then - eval "$set_cc_for_build" - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH=hppa2.0w - else - HP_ARCH=hppa64 - fi - fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; - 3050*:HI-UX:*:*) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk - else - echo "$UNAME_MACHINE"-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; - *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in - amd64) - UNAME_PROCESSOR=x86_64 ;; - i386) - UNAME_PROCESSOR=i586 ;; - esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; - *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; - *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; - *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; - i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; - *:Interix*:*) - case "$UNAME_MACHINE" in - x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; - IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; - esac ;; - i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - *:GNU:*:*) - # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix - exit ;; - aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arm*:Linux:*:*) - eval "$set_cc_for_build" - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi - else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; - ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } - ;; - mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; - or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; - sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; - x86_64:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; - xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; - i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; - i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; - i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configure will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" - else - echo mips-unknown-sysv"$UNAME_RELEASE" - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; - SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 - fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = x86; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = 386; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; - *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; - i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; - amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; -esac - -echo "$0: unable to guess system type" >&2 - -case "$UNAME_MACHINE:$UNAME_SYSTEM" in - mips:Linux | mips64:Linux) - # If we got here on MIPS GNU/Linux, output extra information. - cat >&2 <&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = "$UNAME_MACHINE" -UNAME_RELEASE = "$UNAME_RELEASE" -UNAME_SYSTEM = "$UNAME_SYSTEM" -UNAME_VERSION = "$UNAME_VERSION" -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/thirdparty/libpng-1.6.37/config.h b/thirdparty/libpng-1.6.37/config.h deleted file mode 100644 index 608cc24..0000000 --- a/thirdparty/libpng-1.6.37/config.h +++ /dev/null @@ -1,127 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `feenableexcept' function. */ -/* #undef HAVE_FEENABLEEXCEPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `m' library (-lm). */ -/* #undef HAVE_LIBM */ - -/* Define to 1 if you have the `z' library (-lz). */ -#define HAVE_LIBZ 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `pow' function. */ -#define HAVE_POW 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "libpng" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "png-mng-implement@lists.sourceforge.net" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "libpng" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "libpng 1.6.37" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "libpng" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.6.37" - -/* Turn on ARM Neon optimizations at run-time */ -/* #undef PNG_ARM_NEON_API_SUPPORTED */ - -/* Check for ARM Neon support at run-time */ -/* #undef PNG_ARM_NEON_CHECK_SUPPORTED */ - -/* Enable ARM Neon optimizations */ -/* #undef PNG_ARM_NEON_OPT */ - -/* Enable Intel SSE optimizations */ -/* #undef PNG_INTEL_SSE_OPT */ - -/* Turn on MIPS MSA optimizations at run-time */ -/* #undef PNG_MIPS_MSA_API_SUPPORTED */ - -/* Check for MIPS MSA support at run-time */ -/* #undef PNG_MIPS_MSA_CHECK_SUPPORTED */ - -/* Enable MIPS MSA optimizations */ -/* #undef PNG_MIPS_MSA_OPT */ - -/* Turn on POWERPC VSX optimizations at run-time */ -/* #undef PNG_POWERPC_VSX_API_SUPPORTED */ - -/* Check for POWERPC VSX support at run-time */ -/* #undef PNG_POWERPC_VSX_CHECK_SUPPORTED */ - -/* Enable POWERPC VSX optimizations */ -/* #undef PNG_POWERPC_VSX_OPT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if your declares `struct tm'. */ -/* #undef TM_IN_SYS_TIME */ - -/* Version number of package */ -#define VERSION "1.6.37" - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ diff --git a/thirdparty/libpng-1.6.37/config.h.in b/thirdparty/libpng-1.6.37/config.h.in deleted file mode 100644 index 2931048..0000000 --- a/thirdparty/libpng-1.6.37/config.h.in +++ /dev/null @@ -1,126 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the `feenableexcept' function. */ -#undef HAVE_FEENABLEEXCEPT - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `m' library (-lm). */ -#undef HAVE_LIBM - -/* Define to 1 if you have the `z' library (-lz). */ -#undef HAVE_LIBZ - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `pow' function. */ -#undef HAVE_POW - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Turn on ARM Neon optimizations at run-time */ -#undef PNG_ARM_NEON_API_SUPPORTED - -/* Check for ARM Neon support at run-time */ -#undef PNG_ARM_NEON_CHECK_SUPPORTED - -/* Enable ARM Neon optimizations */ -#undef PNG_ARM_NEON_OPT - -/* Enable Intel SSE optimizations */ -#undef PNG_INTEL_SSE_OPT - -/* Turn on MIPS MSA optimizations at run-time */ -#undef PNG_MIPS_MSA_API_SUPPORTED - -/* Check for MIPS MSA support at run-time */ -#undef PNG_MIPS_MSA_CHECK_SUPPORTED - -/* Enable MIPS MSA optimizations */ -#undef PNG_MIPS_MSA_OPT - -/* Turn on POWERPC VSX optimizations at run-time */ -#undef PNG_POWERPC_VSX_API_SUPPORTED - -/* Check for POWERPC VSX support at run-time */ -#undef PNG_POWERPC_VSX_CHECK_SUPPORTED - -/* Enable POWERPC VSX optimizations */ -#undef PNG_POWERPC_VSX_OPT - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if your declares `struct tm'. */ -#undef TM_IN_SYS_TIME - -/* Version number of package */ -#undef VERSION - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to `unsigned int' if does not define. */ -#undef size_t diff --git a/thirdparty/libpng-1.6.37/config.log b/thirdparty/libpng-1.6.37/config.log deleted file mode 100644 index 2b51363..0000000 --- a/thirdparty/libpng-1.6.37/config.log +++ /dev/null @@ -1,998 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by libpng configure 1.6.37, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ ./configure --with-zlib-prefix=/home/scott/code/FLTK_Nano-X_DOS/installed/dos --disable-shared --build=x86_64-linux-gnu --host=i586-pc-msdosdjgpp --prefix=/home/scott/code/FLTK_Nano-X_DOS/installed/dos - -## --------- ## -## Platform. ## -## --------- ## - -hostname = kpdev -uname -m = x86_64 -uname -r = 5.14.0-1032-oem -uname -s = Linux -uname -v = #35-Ubuntu SMP Thu Mar 31 12:49:29 UTC 2022 - -/usr/bin/uname -p = x86_64 -/bin/uname -X = unknown - -/bin/arch = x86_64 -/usr/bin/arch -k = unknown -/usr/convex/getsysinfo = unknown -/usr/bin/hostinfo = unknown -/bin/machine = unknown -/usr/bin/oslevel = unknown -/bin/universe = unknown - -PATH: /opt/cross/djgpp/bin -PATH: /home/scott/opt/bin -PATH: /home/scott/joey/sdks/IIgs -PATH: /home/scott/.local/bin -PATH: /home/scott/bin -PATH: /usr/local/sbin -PATH: /usr/local/bin -PATH: /usr/sbin -PATH: /usr/bin -PATH: /sbin -PATH: /bin -PATH: /usr/games -PATH: /usr/local/games -PATH: /snap/bin - - -## ----------- ## -## Core tests. ## -## ----------- ## - -configure:2354: checking for a BSD-compatible install -configure:2422: result: /usr/bin/install -c -configure:2433: checking whether build environment is sane -configure:2488: result: yes -configure:2545: checking for i586-pc-msdosdjgpp-strip -configure:2561: found /opt/cross/djgpp/bin/i586-pc-msdosdjgpp-strip -configure:2572: result: i586-pc-msdosdjgpp-strip -configure:2637: checking for a thread-safe mkdir -p -configure:2676: result: /usr/bin/mkdir -p -configure:2683: checking for gawk -configure:2699: found /usr/bin/gawk -configure:2710: result: gawk -configure:2721: checking whether make sets $(MAKE) -configure:2743: result: yes -configure:2772: checking whether make supports nested variables -configure:2789: result: yes -configure:2919: checking whether to enable maintainer-specific portions of Makefiles -configure:2928: result: no -configure:2968: checking for i586-pc-msdosdjgpp-gcc -configure:2984: found /opt/cross/djgpp/bin/i586-pc-msdosdjgpp-gcc -configure:2995: result: i586-pc-msdosdjgpp-gcc -configure:3264: checking for C compiler version -configure:3273: i586-pc-msdosdjgpp-gcc --version >&5 -i586-pc-msdosdjgpp-gcc (GCC) 10.2.0 -Copyright (C) 2020 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -configure:3284: $? = 0 -configure:3273: i586-pc-msdosdjgpp-gcc -v >&5 -Using built-in specs. -COLLECT_GCC=i586-pc-msdosdjgpp-gcc -COLLECT_LTO_WRAPPER=/opt/cross/djgpp/libexec/gcc/i586-pc-msdosdjgpp/10.2.0/lto-wrapper -Target: i586-pc-msdosdjgpp -Configured with: ../gnu/gcc-10.20/configure --target=i586-pc-msdosdjgpp --program-prefix=i586-pc-msdosdjgpp- --prefix=/opt/cross/djgpp --disable-nls --disable-plugin --disable-lto --enable-lto --enable-libstdcxx-filesystem-ts --enable-libquadmath-support --with-gmp=/home/scott/source/build-djgpp/build/djcross-gcc-10.2.0/tmpinst --with-mpfr=/home/scott/source/build-djgpp/build/djcross-gcc-10.2.0/tmpinst --with-mpc=/home/scott/source/build-djgpp/build/djcross-gcc-10.2.0/tmpinst --enable-version-specific-runtime-libs --enable-languages=c,c++ -Thread model: single -Supported LTO compression algorithms: zlib -gcc version 10.2.0 (GCC) -configure:3284: $? = 0 -configure:3273: i586-pc-msdosdjgpp-gcc -V >&5 -i586-pc-msdosdjgpp-gcc: error: unrecognized command-line option '-V' -i586-pc-msdosdjgpp-gcc: fatal error: no input files -compilation terminated. -configure:3284: $? = 1 -configure:3273: i586-pc-msdosdjgpp-gcc -qversion >&5 -i586-pc-msdosdjgpp-gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'? -i586-pc-msdosdjgpp-gcc: fatal error: no input files -compilation terminated. -configure:3284: $? = 1 -configure:3304: checking whether the C compiler works -configure:3326: i586-pc-msdosdjgpp-gcc -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:3330: $? = 0 -configure:3378: result: yes -configure:3381: checking for C compiler default output file name -configure:3383: result: a.out -configure:3389: checking for suffix of executables -configure:3396: i586-pc-msdosdjgpp-gcc -o conftest -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:3400: $? = 0 -configure:3422: result: .exe -configure:3444: checking whether we are cross compiling -configure:3482: result: yes -configure:3487: checking for suffix of object files -configure:3509: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:3513: $? = 0 -configure:3534: result: o -configure:3538: checking whether we are using the GNU C compiler -configure:3557: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:3557: $? = 0 -configure:3566: result: yes -configure:3575: checking whether i586-pc-msdosdjgpp-gcc accepts -g -configure:3595: i586-pc-msdosdjgpp-gcc -c -g conftest.c >&5 -configure:3595: $? = 0 -configure:3636: result: yes -configure:3653: checking for i586-pc-msdosdjgpp-gcc option to accept ISO C89 -configure:3716: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:3716: $? = 0 -configure:3729: result: none needed -configure:3754: checking whether i586-pc-msdosdjgpp-gcc understands -c and -o together -configure:3776: i586-pc-msdosdjgpp-gcc -c conftest.c -o conftest2.o -configure:3779: $? = 0 -configure:3776: i586-pc-msdosdjgpp-gcc -c conftest.c -o conftest2.o -configure:3779: $? = 0 -configure:3791: result: yes -configure:3811: checking whether make supports the include directive -configure:3826: make -f confmf.GNU && cat confinc.out -this is the am__doit target -configure:3829: $? = 0 -configure:3848: result: yes (GNU style) -configure:3873: checking dependency style of i586-pc-msdosdjgpp-gcc -configure:3984: result: gcc3 -configure:4008: checking dependency style of i586-pc-msdosdjgpp-gcc -configure:4117: result: gcc3 -configure:4136: checking build system type -configure:4150: result: x86_64-pc-linux-gnu -configure:4170: checking host system type -configure:4183: result: i586-pc-msdosdjgpp -configure:4203: checking for a sed that does not truncate output -configure:4267: result: /usr/bin/sed -configure:4285: checking for grep that handles long lines and -e -configure:4343: result: /usr/bin/grep -configure:4348: checking for egrep -configure:4410: result: /usr/bin/grep -E -configure:4415: checking for fgrep -configure:4477: result: /usr/bin/grep -F -configure:4504: checking how to print strings -configure:4531: result: printf -configure:4564: checking for ld used by i586-pc-msdosdjgpp-gcc -configure:4631: result: /opt/cross/djgpp/i586-pc-msdosdjgpp/bin/ld -configure:4638: checking if the linker (/opt/cross/djgpp/i586-pc-msdosdjgpp/bin/ld) is GNU ld -configure:4653: result: yes -configure:4670: checking how to run the C preprocessor -configure:4701: i586-pc-msdosdjgpp-gcc -E conftest.c -configure:4701: $? = 0 -configure:4715: i586-pc-msdosdjgpp-gcc -E conftest.c -conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory - 11 | #include - | ^~~~~~~~~~~~~~~~~~ -compilation terminated. -configure:4715: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "libpng" -| #define PACKAGE_TARNAME "libpng" -| #define PACKAGE_VERSION "1.6.37" -| #define PACKAGE_STRING "libpng 1.6.37" -| #define PACKAGE_BUGREPORT "png-mng-implement@lists.sourceforge.net" -| #define PACKAGE_URL "" -| #define PACKAGE "libpng" -| #define VERSION "1.6.37" -| /* end confdefs.h. */ -| #include -configure:4740: result: i586-pc-msdosdjgpp-gcc -E -configure:4760: i586-pc-msdosdjgpp-gcc -E conftest.c -configure:4760: $? = 0 -configure:4774: i586-pc-msdosdjgpp-gcc -E conftest.c -conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory - 11 | #include - | ^~~~~~~~~~~~~~~~~~ -compilation terminated. -configure:4774: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "libpng" -| #define PACKAGE_TARNAME "libpng" -| #define PACKAGE_VERSION "1.6.37" -| #define PACKAGE_STRING "libpng 1.6.37" -| #define PACKAGE_BUGREPORT "png-mng-implement@lists.sourceforge.net" -| #define PACKAGE_URL "" -| #define PACKAGE "libpng" -| #define VERSION "1.6.37" -| /* end confdefs.h. */ -| #include -configure:4806: checking for gawk -configure:4833: result: gawk -configure:4845: checking whether ln -s works -configure:4849: result: yes -configure:4856: checking whether make sets $(MAKE) -configure:4878: result: yes -configure:4930: checking for BSD- or MS-compatible name lister (nm) -configure:4984: result: /opt/cross/djgpp/bin/i586-pc-msdosdjgpp-nm -B -configure:5114: checking the name lister (/opt/cross/djgpp/bin/i586-pc-msdosdjgpp-nm -B) interface -configure:5121: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:5124: /opt/cross/djgpp/bin/i586-pc-msdosdjgpp-nm -B "conftest.o" -configure:5127: output -00000000 b .bss -00000000 N .comment -00000000 d .data -00000000 t .text -00000000 B _some_variable -configure:5128: result: BSD nm -configure:5132: checking the maximum length of command line arguments -configure:5263: result: 1572864 -configure:5311: checking how to convert x86_64-pc-linux-gnu file names to i586-pc-msdosdjgpp format -configure:5351: result: func_convert_file_noop -configure:5358: checking how to convert x86_64-pc-linux-gnu file names to toolchain format -configure:5378: result: func_convert_file_noop -configure:5385: checking for /opt/cross/djgpp/i586-pc-msdosdjgpp/bin/ld option to reload object files -configure:5392: result: -r -configure:5426: checking for i586-pc-msdosdjgpp-objdump -configure:5442: found /opt/cross/djgpp/bin/i586-pc-msdosdjgpp-objdump -configure:5453: result: i586-pc-msdosdjgpp-objdump -configure:5522: checking how to recognize dependent libraries -configure:5722: result: unknown -configure:5767: checking for i586-pc-msdosdjgpp-dlltool -configure:5797: result: no -configure:5807: checking for dlltool -configure:5837: result: no -configure:5864: checking how to associate runtime and link libraries -configure:5891: result: printf %s\n -configure:5908: checking for i586-pc-msdosdjgpp-ar -configure:5924: found /opt/cross/djgpp/bin/i586-pc-msdosdjgpp-ar -configure:5935: result: i586-pc-msdosdjgpp-ar -configure:6016: checking for archiver @FILE support -configure:6033: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:6033: $? = 0 -configure:6036: i586-pc-msdosdjgpp-ar cru libconftest.a @conftest.lst >&5 -configure:6039: $? = 0 -configure:6044: i586-pc-msdosdjgpp-ar cru libconftest.a @conftest.lst >&5 -i586-pc-msdosdjgpp-ar: conftest.o: No such file or directory -configure:6047: $? = 1 -configure:6046: result: @ -configure:6064: checking for i586-pc-msdosdjgpp-strip -configure:6091: result: i586-pc-msdosdjgpp-strip -configure:6163: checking for i586-pc-msdosdjgpp-ranlib -configure:6179: found /opt/cross/djgpp/bin/i586-pc-msdosdjgpp-ranlib -configure:6190: result: i586-pc-msdosdjgpp-ranlib -configure:6332: checking command to parse /opt/cross/djgpp/bin/i586-pc-msdosdjgpp-nm -B output from i586-pc-msdosdjgpp-gcc object -configure:6485: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:6488: $? = 0 -configure:6492: /opt/cross/djgpp/bin/i586-pc-msdosdjgpp-nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm -configure:6495: $? = 0 -cannot find nm_test_var in conftest.nm -configure:6485: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:6488: $? = 0 -configure:6492: /opt/cross/djgpp/bin/i586-pc-msdosdjgpp-nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm -configure:6495: $? = 0 -configure:6561: i586-pc-msdosdjgpp-gcc -o conftest.exe -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c conftstm.o >&5 -configure:6564: $? = 0 -configure:6602: result: ok -configure:6649: checking for sysroot -configure:6679: result: no -configure:6686: checking for a working dd -configure:6724: result: /usr/bin/dd -configure:6728: checking how to truncate binary pipes -configure:6743: result: /usr/bin/dd bs=4096 count=1 -configure:7032: checking for i586-pc-msdosdjgpp-mt -configure:7062: result: no -configure:7072: checking for mt -configure:7088: found /usr/bin/mt -configure:7099: result: mt -configure:7111: WARNING: using cross tools not prefixed with host triplet -configure:7122: checking if mt is a manifest tool -configure:7128: mt '-?' -configure:7136: result: no -configure:7809: checking for ANSI C header files -configure:7829: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:7829: $? = 0 -configure:7913: result: yes -configure:7926: checking for sys/types.h -configure:7926: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:7926: $? = 0 -configure:7926: result: yes -configure:7926: checking for sys/stat.h -configure:7926: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:7926: $? = 0 -configure:7926: result: yes -configure:7926: checking for stdlib.h -configure:7926: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:7926: $? = 0 -configure:7926: result: yes -configure:7926: checking for string.h -configure:7926: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:7926: $? = 0 -configure:7926: result: yes -configure:7926: checking for memory.h -configure:7926: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:7926: $? = 0 -configure:7926: result: yes -configure:7926: checking for strings.h -configure:7926: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:7926: $? = 0 -configure:7926: result: yes -configure:7926: checking for inttypes.h -configure:7926: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:7926: $? = 0 -configure:7926: result: yes -configure:7926: checking for stdint.h -configure:7926: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:7926: $? = 0 -configure:7926: result: yes -configure:7926: checking for unistd.h -configure:7926: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:7926: $? = 0 -configure:7926: result: yes -configure:7940: checking for dlfcn.h -configure:7940: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:7940: $? = 0 -configure:7940: result: yes -configure:8494: checking for objdir -configure:8509: result: .libs -configure:8773: checking if i586-pc-msdosdjgpp-gcc supports -fno-rtti -fno-exceptions -configure:8791: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib -fno-rtti -fno-exceptions conftest.c >&5 -cc1: warning: command-line option '-fno-rtti' is valid for C++/D/ObjC++ but not for C -configure:8795: $? = 0 -configure:8808: result: no -configure:9166: checking for i586-pc-msdosdjgpp-gcc option to produce PIC -configure:9173: result: -configure:9245: checking if i586-pc-msdosdjgpp-gcc static flag -static works -configure:9273: result: yes -configure:9288: checking if i586-pc-msdosdjgpp-gcc supports -c -o file.o -configure:9309: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib -o out/conftest2.o conftest.c >&5 -configure:9313: $? = 0 -configure:9335: result: yes -configure:9343: checking if i586-pc-msdosdjgpp-gcc supports -c -o file.o -configure:9390: result: yes -configure:9423: checking whether the i586-pc-msdosdjgpp-gcc linker (/opt/cross/djgpp/i586-pc-msdosdjgpp/bin/ld) supports shared libraries -configure:10682: result: no -configure:10922: checking dynamic linker characteristics -configure:11740: result: no -configure:11862: checking how to hardcode library paths into programs -configure:11887: result: unsupported -configure:12435: checking whether stripping libraries is possible -configure:12440: result: yes -configure:12475: checking if libtool supports shared libraries -configure:12477: result: no -configure:12480: checking whether to build shared libraries -configure:12505: result: no -configure:12508: checking whether to build static libraries -configure:12512: result: yes -configure:9345: checking that AWK works -configure:9351: result: ok -configure:9402: checking if we need to force back C standard to C89 -configure:9418: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:9418: $? = 0 -configure:9419: result: no -configure:9434: checking for ANSI C header files -configure:9538: result: yes -configure:9548: checking for an ANSI C-conforming const -configure:9614: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:9614: $? = 0 -configure:9621: result: yes -configure:9629: checking for size_t -configure:9629: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:9629: $? = 0 -configure:9629: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -conftest.c: In function 'main': -conftest.c:60:21: error: expected expression before ')' token - 60 | if (sizeof ((size_t))) - | ^ -configure:9629: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "libpng" -| #define PACKAGE_TARNAME "libpng" -| #define PACKAGE_VERSION "1.6.37" -| #define PACKAGE_STRING "libpng 1.6.37" -| #define PACKAGE_BUGREPORT "png-mng-implement@lists.sourceforge.net" -| #define PACKAGE_URL "" -| #define PACKAGE "libpng" -| #define VERSION "1.6.37" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define STDC_HEADERS 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((size_t))) -| return 0; -| ; -| return 0; -| } -configure:9629: result: yes -configure:9640: checking whether struct tm is in sys/time.h or time.h -configure:9660: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:9660: $? = 0 -configure:9667: result: time.h -configure:9675: checking for C/C++ restrict keyword -configure:9700: i586-pc-msdosdjgpp-gcc -c -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -configure:9700: $? = 0 -configure:9708: result: __restrict -configure:9723: checking for working strtod -configure:9774: result: no -configure:9783: checking for pow -configure:9783: i586-pc-msdosdjgpp-gcc -o conftest.exe -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -conftest.c:48:6: warning: conflicting types for built-in function 'pow'; expected 'double(double, double)' [-Wbuiltin-declaration-mismatch] - 48 | char pow (); - | ^~~ -conftest.c:36:1: note: 'pow' is declared in header '' - 35 | # include - 36 | #else -configure:9783: $? = 0 -configure:9783: result: yes -configure:9838: checking for pow -configure:9838: result: yes -configure:9898: checking for clock_gettime -configure:9898: i586-pc-msdosdjgpp-gcc -o conftest.exe -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c >&5 -/tmp/ccbZw3j7.o:conftest.c:(.text+0x7): undefined reference to `clock_gettime' -collect2: error: ld returned 1 exit status -configure:9898: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "libpng" -| #define PACKAGE_TARNAME "libpng" -| #define PACKAGE_VERSION "1.6.37" -| #define PACKAGE_STRING "libpng 1.6.37" -| #define PACKAGE_BUGREPORT "png-mng-implement@lists.sourceforge.net" -| #define PACKAGE_URL "" -| #define PACKAGE "libpng" -| #define VERSION "1.6.37" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define STDC_HEADERS 1 -| #define restrict __restrict -| #define HAVE_POW 1 -| /* end confdefs.h. */ -| /* Define clock_gettime to an innocuous variant, in case declares clock_gettime. -| For example, HP-UX 11i declares gettimeofday. */ -| #define clock_gettime innocuous_clock_gettime -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char clock_gettime (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef clock_gettime -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char clock_gettime (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_clock_gettime || defined __stub___clock_gettime -| choke me -| #endif -| -| int -| main () -| { -| return clock_gettime (); -| ; -| return 0; -| } -configure:9898: result: no -configure:9902: WARNING: not building timepng -configure:9923: checking for zlibVersion in -lz -configure:9948: i586-pc-msdosdjgpp-gcc -o conftest.exe -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c -lz >&5 -configure:9948: $? = 0 -configure:9957: result: yes -configure:10022: checking for feenableexcept in -lm -configure:10047: i586-pc-msdosdjgpp-gcc -o conftest.exe -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c -lm -lz >&5 -/tmp/ccxIHtq4.o:conftest.c:(.text+0x7): undefined reference to `feenableexcept' -collect2: error: ld returned 1 exit status -configure:10047: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "libpng" -| #define PACKAGE_TARNAME "libpng" -| #define PACKAGE_VERSION "1.6.37" -| #define PACKAGE_STRING "libpng 1.6.37" -| #define PACKAGE_BUGREPORT "png-mng-implement@lists.sourceforge.net" -| #define PACKAGE_URL "" -| #define PACKAGE "libpng" -| #define VERSION "1.6.37" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define STDC_HEADERS 1 -| #define restrict __restrict -| #define HAVE_POW 1 -| #define HAVE_LIBZ 1 -| /* end confdefs.h. */ -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char feenableexcept (); -| int -| main () -| { -| return feenableexcept (); -| ; -| return 0; -| } -configure:10056: result: no -configure:10069: checking for feenableexcept -configure:10069: i586-pc-msdosdjgpp-gcc -o conftest.exe -DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib conftest.c -lz >&5 -/tmp/ccRiWpJ9.o:conftest.c:(.text+0x7): undefined reference to `feenableexcept' -collect2: error: ld returned 1 exit status -configure:10069: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "libpng" -| #define PACKAGE_TARNAME "libpng" -| #define PACKAGE_VERSION "1.6.37" -| #define PACKAGE_STRING "libpng 1.6.37" -| #define PACKAGE_BUGREPORT "png-mng-implement@lists.sourceforge.net" -| #define PACKAGE_URL "" -| #define PACKAGE "libpng" -| #define VERSION "1.6.37" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define STDC_HEADERS 1 -| #define restrict __restrict -| #define HAVE_POW 1 -| #define HAVE_LIBZ 1 -| /* end confdefs.h. */ -| /* Define feenableexcept to an innocuous variant, in case declares feenableexcept. -| For example, HP-UX 11i declares gettimeofday. */ -| #define feenableexcept innocuous_feenableexcept -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char feenableexcept (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef feenableexcept -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char feenableexcept (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_feenableexcept || defined __stub___feenableexcept -| choke me -| #endif -| -| int -| main () -| { -| return feenableexcept (); -| ; -| return 0; -| } -configure:10069: result: no -configure:10079: checking if using Solaris linker -configure:10088: result: no -configure:10100: checking if libraries can be versioned -configure:10121: result: yes -configure:10143: checking for symbol prefix -configure:10150: result: _ -configure:10172: pkgconfig directory is ${libdir}/pkgconfig -configure:10533: Extra options for compiler: -configure:10643: checking that generated files are newer than configure -configure:10649: result: done -configure:10724: creating ./config.status - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by libpng config.status 1.6.37, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status - -on kpdev - -config.status:1125: creating Makefile -config.status:1125: creating libpng.pc -config.status:1125: creating libpng-config -config.status:1125: creating config.h -config.status:1306: config.h is unchanged -config.status:1354: executing depfiles commands -config.status:1431: cd . && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles -make: Nothing to be done for 'am--depfiles'. -config.status:1436: $? = 0 -config.status:1354: executing libtool commands - -## ---------------- ## -## Cache variables. ## -## ---------------- ## - -ac_cv_build=x86_64-pc-linux-gnu -ac_cv_c_compiler_gnu=yes -ac_cv_c_const=yes -ac_cv_c_restrict=__restrict -ac_cv_env_CCASFLAGS_set= -ac_cv_env_CCASFLAGS_value= -ac_cv_env_CCAS_set= -ac_cv_env_CCAS_value= -ac_cv_env_CC_set= -ac_cv_env_CC_value= -ac_cv_env_CFLAGS_set=set -ac_cv_env_CFLAGS_value='-DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib' -ac_cv_env_CPPFLAGS_set= -ac_cv_env_CPPFLAGS_value= -ac_cv_env_CPP_set= -ac_cv_env_CPP_value= -ac_cv_env_LDFLAGS_set= -ac_cv_env_LDFLAGS_value= -ac_cv_env_LIBS_set= -ac_cv_env_LIBS_value= -ac_cv_env_LT_SYS_LIBRARY_PATH_set= -ac_cv_env_LT_SYS_LIBRARY_PATH_value= -ac_cv_env_PNG_COPTS_set= -ac_cv_env_PNG_COPTS_value= -ac_cv_env_build_alias_set=set -ac_cv_env_build_alias_value=x86_64-linux-gnu -ac_cv_env_host_alias_set=set -ac_cv_env_host_alias_value=i586-pc-msdosdjgpp -ac_cv_env_target_alias_set= -ac_cv_env_target_alias_value= -ac_cv_exeext=.exe -ac_cv_func_clock_gettime=no -ac_cv_func_feenableexcept=no -ac_cv_func_pow=yes -ac_cv_func_strtod=no -ac_cv_header_dlfcn_h=yes -ac_cv_header_inttypes_h=yes -ac_cv_header_memory_h=yes -ac_cv_header_stdc=yes -ac_cv_header_stdint_h=yes -ac_cv_header_stdlib_h=yes -ac_cv_header_string_h=yes -ac_cv_header_strings_h=yes -ac_cv_header_sys_stat_h=yes -ac_cv_header_sys_types_h=yes -ac_cv_header_unistd_h=yes -ac_cv_host=i586-pc-msdosdjgpp -ac_cv_lib_m_feenableexcept=no -ac_cv_lib_z_zlibVersion=yes -ac_cv_objext=o -ac_cv_path_EGREP='/usr/bin/grep -E' -ac_cv_path_FGREP='/usr/bin/grep -F' -ac_cv_path_GREP=/usr/bin/grep -ac_cv_path_SED=/usr/bin/sed -ac_cv_path_install='/usr/bin/install -c' -ac_cv_path_lt_DD=/usr/bin/dd -ac_cv_path_mkdir=/usr/bin/mkdir -ac_cv_prog_AR=i586-pc-msdosdjgpp-ar -ac_cv_prog_AWK=gawk -ac_cv_prog_CC=i586-pc-msdosdjgpp-gcc -ac_cv_prog_CPP='i586-pc-msdosdjgpp-gcc -E' -ac_cv_prog_OBJDUMP=i586-pc-msdosdjgpp-objdump -ac_cv_prog_RANLIB=i586-pc-msdosdjgpp-ranlib -ac_cv_prog_STRIP=i586-pc-msdosdjgpp-strip -ac_cv_prog_ac_ct_MANIFEST_TOOL=mt -ac_cv_prog_cc_c89= -ac_cv_prog_cc_g=yes -ac_cv_prog_make_make_set=yes -ac_cv_struct_tm=time.h -ac_cv_type_size_t=yes -am_cv_CCAS_dependencies_compiler_type=gcc3 -am_cv_CC_dependencies_compiler_type=gcc3 -am_cv_make_support_nested_variables=yes -am_cv_prog_cc_c_o=yes -lt_cv_ar_at_file=@ -lt_cv_deplibs_check_method=unknown -lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_ld_reload_flag=-r -lt_cv_nm_interface='BSD nm' -lt_cv_objdir=.libs -lt_cv_path_LD=/opt/cross/djgpp/i586-pc-msdosdjgpp/bin/ld -lt_cv_path_NM='/opt/cross/djgpp/bin/i586-pc-msdosdjgpp-nm -B' -lt_cv_path_mainfest_tool=no -lt_cv_prog_compiler_c_o=yes -lt_cv_prog_compiler_pic= -lt_cv_prog_compiler_rtti_exceptions=no -lt_cv_prog_compiler_static_works=yes -lt_cv_prog_gnu_ld=yes -lt_cv_sharedlib_from_linklib_cmd='printf %s\n' -lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' -lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\''' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\''' -lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' -lt_cv_sys_global_symbol_to_import= -lt_cv_sys_max_cmd_len=1572864 -lt_cv_to_host_file_cmd=func_convert_file_noop -lt_cv_to_tool_file_cmd=func_convert_file_noop -lt_cv_truncate_bin='/usr/bin/dd bs=4096 count=1' - -## ----------------- ## -## Output variables. ## -## ----------------- ## - -ACLOCAL='${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing aclocal-1.16' -AMDEPBACKSLASH='\' -AMDEP_FALSE='#' -AMDEP_TRUE='' -AMTAR='$${TAR-tar}' -AM_BACKSLASH='\' -AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -AM_DEFAULT_VERBOSITY='1' -AM_V='$(V)' -AR='i586-pc-msdosdjgpp-ar' -AS='as' -AUTOCONF='${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing autoconf' -AUTOHEADER='${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing autoheader' -AUTOMAKE='${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing automake-1.16' -AWK='gawk' -CC='i586-pc-msdosdjgpp-gcc' -CCAS='i586-pc-msdosdjgpp-gcc' -CCASDEPMODE='depmode=gcc3' -CCASFLAGS='-DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib' -CCDEPMODE='depmode=gcc3' -CFLAGS='-DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib' -CPP='i586-pc-msdosdjgpp-gcc -E' -CPPFLAGS='' -CYGPATH_W='echo' -DEFS='-DHAVE_CONFIG_H' -DEPDIR='.deps' -DFNCPP='i586-pc-msdosdjgpp-gcc -E' -DLLTOOL='false' -DO_INSTALL_LIBPNG_CONFIG_FALSE='#' -DO_INSTALL_LIBPNG_CONFIG_TRUE='' -DO_INSTALL_LIBPNG_PC_FALSE='#' -DO_INSTALL_LIBPNG_PC_TRUE='' -DO_INSTALL_LINKS_FALSE='#' -DO_INSTALL_LINKS_TRUE='' -DO_PNG_PREFIX_FALSE='' -DO_PNG_PREFIX_TRUE='#' -DSYMUTIL='' -DUMPBIN='' -ECHO_C='' -ECHO_N='-n' -ECHO_T='' -EGREP='/usr/bin/grep -E' -EXEEXT='.exe' -FGREP='/usr/bin/grep -F' -GREP='/usr/bin/grep' -HAVE_CLOCK_GETTIME_FALSE='' -HAVE_CLOCK_GETTIME_TRUE='#' -HAVE_LD_VERSION_SCRIPT_FALSE='#' -HAVE_LD_VERSION_SCRIPT_TRUE='' -HAVE_SOLARIS_LD_FALSE='' -HAVE_SOLARIS_LD_TRUE='#' -INSTALL_DATA='${INSTALL} -m 644' -INSTALL_PROGRAM='${INSTALL}' -INSTALL_SCRIPT='${INSTALL}' -INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' -LD='/opt/cross/djgpp/i586-pc-msdosdjgpp/bin/ld' -LDFLAGS='' -LIBOBJS=' ${LIBOBJDIR}strtod$U.o' -LIBS='-lz ' -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -LIPO='' -LN_S='ln -s' -LTLIBOBJS=' ${LIBOBJDIR}strtod$U.lo' -LT_SYS_LIBRARY_PATH='' -MAINT='#' -MAINTAINER_MODE_FALSE='' -MAINTAINER_MODE_TRUE='#' -MAKEINFO='${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing makeinfo' -MANIFEST_TOOL=':' -MKDIR_P='/usr/bin/mkdir -p' -NM='/opt/cross/djgpp/bin/i586-pc-msdosdjgpp-nm -B' -NMEDIT='' -OBJDUMP='i586-pc-msdosdjgpp-objdump' -OBJEXT='o' -OTOOL64='' -OTOOL='' -PACKAGE='libpng' -PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net' -PACKAGE_NAME='libpng' -PACKAGE_STRING='libpng 1.6.37' -PACKAGE_TARNAME='libpng' -PACKAGE_URL='' -PACKAGE_VERSION='1.6.37' -PATH_SEPARATOR=':' -PNGLIB_MAJOR='1' -PNGLIB_MINOR='6' -PNGLIB_RELEASE='37' -PNGLIB_VERSION='1.6.37' -PNG_ARM_NEON_FALSE='' -PNG_ARM_NEON_TRUE='#' -PNG_COPTS='' -PNG_INTEL_SSE_FALSE='#' -PNG_INTEL_SSE_TRUE='' -PNG_MIPS_MSA_FALSE='#' -PNG_MIPS_MSA_TRUE='' -PNG_POWERPC_VSX_FALSE='#' -PNG_POWERPC_VSX_TRUE='' -PNG_PREFIX='' -POW_LIB='' -RANLIB='i586-pc-msdosdjgpp-ranlib' -SED='/usr/bin/sed' -SET_MAKE='' -SHELL='/bin/bash' -STRIP='i586-pc-msdosdjgpp-strip' -SYMBOL_PREFIX='_' -VERSION='1.6.37' -ac_ct_AR='' -ac_ct_CC='' -ac_ct_DUMPBIN='' -am__EXEEXT_FALSE='#' -am__EXEEXT_TRUE='' -am__fastdepCCAS_FALSE='#' -am__fastdepCCAS_TRUE='' -am__fastdepCC_FALSE='#' -am__fastdepCC_TRUE='' -am__include='include' -am__isrc='' -am__leading_dot='.' -am__nodep='_no' -am__quote='' -am__tar='$${TAR-tar} chof - "$$tardir"' -am__untar='$${TAR-tar} xf -' -binconfigs='${binconfigs}' -bindir='${exec_prefix}/bin' -build='x86_64-pc-linux-gnu' -build_alias='x86_64-linux-gnu' -build_cpu='x86_64' -build_os='linux-gnu' -build_vendor='pc' -datadir='${datarootdir}' -datarootdir='${prefix}/share' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -dvidir='${docdir}' -exec_prefix='${prefix}' -host='i586-pc-msdosdjgpp' -host_alias='i586-pc-msdosdjgpp' -host_cpu='i586' -host_os='msdosdjgpp' -host_vendor='pc' -htmldir='${docdir}' -includedir='${prefix}/include' -infodir='${datarootdir}/info' -install_sh='${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/install-sh' -libdir='${exec_prefix}/lib' -libexecdir='${exec_prefix}/libexec' -localedir='${datarootdir}/locale' -localstatedir='${prefix}/var' -mandir='${datarootdir}/man' -mkdir_p='$(MKDIR_P)' -oldincludedir='/usr/include' -pdfdir='${docdir}' -pkgconfigdir='${libdir}/pkgconfig' -prefix='/home/scott/code/FLTK_Nano-X_DOS/installed/dos' -program_transform_name='s,x,x,' -psdir='${docdir}' -sbindir='${exec_prefix}/sbin' -sharedstatedir='${prefix}/com' -sysconfdir='${prefix}/etc' -target_alias='' - -## ----------- ## -## confdefs.h. ## -## ----------- ## - -/* confdefs.h */ -#define PACKAGE_NAME "libpng" -#define PACKAGE_TARNAME "libpng" -#define PACKAGE_VERSION "1.6.37" -#define PACKAGE_STRING "libpng 1.6.37" -#define PACKAGE_BUGREPORT "png-mng-implement@lists.sourceforge.net" -#define PACKAGE_URL "" -#define PACKAGE "libpng" -#define VERSION "1.6.37" -#define STDC_HEADERS 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_DLFCN_H 1 -#define LT_OBJDIR ".libs/" -#define STDC_HEADERS 1 -#define restrict __restrict -#define HAVE_POW 1 -#define HAVE_LIBZ 1 - -configure: exit 0 diff --git a/thirdparty/libpng-1.6.37/config.status b/thirdparty/libpng-1.6.37/config.status deleted file mode 100755 index efdbdb6..0000000 --- a/thirdparty/libpng-1.6.37/config.status +++ /dev/null @@ -1,2011 +0,0 @@ -#! /bin/bash -# Generated by configure. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=${CONFIG_SHELL-/bin/bash} -export SHELL -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by libpng $as_me 1.6.37, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -# Files that config.status was made for. -config_files=" Makefile libpng.pc:libpng.pc.in libpng-config:libpng-config.in" -config_headers=" config.h" -config_commands=" depfiles libtool" - -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -ac_cs_config="'--with-zlib-prefix=/home/scott/code/FLTK_Nano-X_DOS/installed/dos' '--disable-shared' '--build=x86_64-linux-gnu' '--host=i586-pc-msdosdjgpp' '--prefix=/home/scott/code/FLTK_Nano-X_DOS/installed/dos' 'build_alias=x86_64-linux-gnu' 'host_alias=i586-pc-msdosdjgpp' 'CFLAGS=-DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib'" -ac_cs_version="\ -libpng config.status 1.6.37 -configured by ./configure, generated by GNU Autoconf 2.69, - with options \"$ac_cs_config\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='/home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37' -srcdir='.' -INSTALL='/usr/bin/install -c' -MKDIR_P='/usr/bin/mkdir -p' -AWK='gawk' -test -n "$AWK" || AWK=awk -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -if $ac_cs_recheck; then - set X /bin/bash './configure' '--with-zlib-prefix=/home/scott/code/FLTK_Nano-X_DOS/installed/dos' '--disable-shared' '--build=x86_64-linux-gnu' '--host=i586-pc-msdosdjgpp' '--prefix=/home/scott/code/FLTK_Nano-X_DOS/installed/dos' 'build_alias=x86_64-linux-gnu' 'host_alias=i586-pc-msdosdjgpp' 'CFLAGS=-DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib' $ac_configure_extra_args --no-create --no-recursion - shift - $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6 - CONFIG_SHELL='/bin/bash' - export CONFIG_SHELL - exec "$@" -fi - -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -# -# INIT-COMMANDS -# -AMDEP_TRUE="" MAKE="make" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -double_quote_subst='s/\(["`\\]\)/\\\1/g' -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -SED='/usr/bin/sed' -Xsed='/usr/bin/sed -e 1s/^X//' -GREP='/usr/bin/grep' -EGREP='/usr/bin/grep -E' -FGREP='/usr/bin/grep -F' -SHELL='/bin/bash' -ECHO='printf %s\n' -LD='/opt/cross/djgpp/i586-pc-msdosdjgpp/bin/ld' -macro_version='2.4.6' -macro_revision='2.4.6' -AS='as' -DLLTOOL='false' -OBJDUMP='i586-pc-msdosdjgpp-objdump' -enable_shared='no' -enable_static='yes' -pic_mode='default' -enable_fast_install='needless' -shared_archive_member_spec='' -PATH_SEPARATOR=':' -host_alias='i586-pc-msdosdjgpp' -host='i586-pc-msdosdjgpp' -host_os='msdosdjgpp' -build_alias='x86_64-linux-gnu' -build='x86_64-pc-linux-gnu' -build_os='linux-gnu' -NM='/opt/cross/djgpp/bin/i586-pc-msdosdjgpp-nm -B' -LN_S='ln -s' -max_cmd_len='1572864' -ac_objext='o' -exeext='' -lt_unset='unset' -lt_SP2NL='tr \040 \012' -lt_NL2SP='tr \015\012 \040\040' -lt_cv_to_host_file_cmd='func_convert_file_noop' -lt_cv_to_tool_file_cmd='func_convert_file_noop' -reload_flag=' -r' -reload_cmds='$LD$reload_flag -o $output$reload_objs' -deplibs_check_method='unknown' -file_magic_cmd='$MAGIC_CMD' -file_magic_glob='' -want_nocaseglob='no' -sharedlib_from_linklib_cmd='printf %s\n' -AR='i586-pc-msdosdjgpp-ar' -AR_FLAGS='cru' -archiver_list_spec='@' -STRIP='i586-pc-msdosdjgpp-strip' -RANLIB='i586-pc-msdosdjgpp-ranlib' -old_postinstall_cmds='chmod 644 $oldlib~$RANLIB $tool_oldlib' -old_postuninstall_cmds='' -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib' -lock_old_archive_extraction='no' -CC='i586-pc-msdosdjgpp-gcc' -CFLAGS='-DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib' -compiler='i586-pc-msdosdjgpp-gcc' -GCC='yes' -lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' -lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' -lt_cv_sys_global_symbol_to_import='' -lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\''' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\''' -lt_cv_nm_interface='BSD nm' -nm_file_list_spec='@' -lt_sysroot='' -lt_cv_truncate_bin='/usr/bin/dd bs=4096 count=1' -objdir='.libs' -MAGIC_CMD='file' -lt_prog_compiler_no_builtin_flag=' -fno-builtin' -lt_prog_compiler_pic='' -lt_prog_compiler_wl='-Wl,' -lt_prog_compiler_static='-static' -lt_cv_prog_compiler_c_o='yes' -need_locks='no' -MANIFEST_TOOL=':' -DSYMUTIL='' -NMEDIT='' -LIPO='' -OTOOL='' -OTOOL64='' -libext='a' -shrext_cmds='.so' -extract_expsyms_cmds='' -archive_cmds_need_lc='yes' -enable_shared_with_static_runtimes='no' -export_dynamic_flag_spec='' -whole_archive_flag_spec='' -compiler_needs_object='no' -old_archive_from_new_cmds='' -old_archive_from_expsyms_cmds='' -archive_cmds='' -archive_expsym_cmds='' -module_cmds='' -module_expsym_cmds='' -with_gnu_ld='yes' -allow_undefined_flag='' -no_undefined_flag='' -hardcode_libdir_flag_spec='' -hardcode_libdir_separator='' -hardcode_direct='no' -hardcode_direct_absolute='no' -hardcode_minus_L='no' -hardcode_shlibpath_var='unsupported' -hardcode_automatic='no' -inherit_rpath='no' -link_all_deplibs='unknown' -always_export_symbols='no' -export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' -include_expsyms='' -prelink_cmds='' -postlink_cmds='' -file_list_spec='' -variables_saved_for_relink='PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH' -need_lib_prefix='unknown' -need_version='unknown' -version_type='none' -runpath_var='' -shlibpath_var='' -shlibpath_overrides_runpath='unknown' -libname_spec='lib$name' -library_names_spec='' -soname_spec='' -install_override_mode='' -postinstall_cmds='' -postuninstall_cmds='' -finish_cmds='' -finish_eval='' -hardcode_into_libs='no' -sys_lib_search_path_spec='/opt/cross/djgpp/lib/gcc/i586-pc-msdosdjgpp/10.2.0 /opt/cross/djgpp/i586-pc-msdosdjgpp/lib ' -configure_time_dlsearch_path='/lib /usr/lib' -configure_time_lt_sys_library_path='' -hardcode_action='unsupported' -enable_dlopen='unknown' -enable_dlopen_self='unknown' -enable_dlopen_self_static='unknown' -old_striplib='i586-pc-msdosdjgpp-strip --strip-debug' -striplib='i586-pc-msdosdjgpp-strip --strip-unneeded' - -LTCC='i586-pc-msdosdjgpp-gcc' -LTCFLAGS='-DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib' -compiler='i586-pc-msdosdjgpp-gcc' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SED GREP EGREP FGREP SHELL ECHO LD AS DLLTOOL OBJDUMP PATH_SEPARATOR NM LN_S lt_SP2NL lt_NL2SP reload_flag deplibs_check_method file_magic_cmd file_magic_glob want_nocaseglob sharedlib_from_linklib_cmd AR AR_FLAGS archiver_list_spec STRIP RANLIB CC CFLAGS compiler lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl lt_cv_sys_global_symbol_to_import lt_cv_sys_global_symbol_to_c_name_address lt_cv_sys_global_symbol_to_c_name_address_lib_prefix lt_cv_nm_interface nm_file_list_spec lt_cv_truncate_bin lt_prog_compiler_no_builtin_flag lt_prog_compiler_pic lt_prog_compiler_wl lt_prog_compiler_static lt_cv_prog_compiler_c_o need_locks MANIFEST_TOOL DSYMUTIL NMEDIT LIPO OTOOL OTOOL64 shrext_cmds export_dynamic_flag_spec whole_archive_flag_spec compiler_needs_object with_gnu_ld allow_undefined_flag no_undefined_flag hardcode_libdir_flag_spec hardcode_libdir_separator exclude_expsyms include_expsyms file_list_spec variables_saved_for_relink libname_spec library_names_spec soname_spec install_override_mode finish_eval old_striplib striplib; do - case `eval \\$ECHO \\""\\$$var"\\"` in - *[\\\`\"\$]*) - eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED \"\$sed_quote_subst\"\`\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_$var=\\\"\$$var\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds old_postinstall_cmds old_postuninstall_cmds old_archive_cmds extract_expsyms_cmds old_archive_from_new_cmds old_archive_from_expsyms_cmds archive_cmds archive_expsym_cmds module_cmds module_expsym_cmds export_symbols_cmds prelink_cmds postlink_cmds postinstall_cmds postuninstall_cmds finish_cmds sys_lib_search_path_spec configure_time_dlsearch_path configure_time_lt_sys_library_path; do - case `eval \\$ECHO \\""\\$$var"\\"` in - *[\\\`\"\$]*) - eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_$var=\\\"\$$var\\\"" - ;; - esac -done - -ac_aux_dir='.' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='libpng' - VERSION='1.6.37' - RM='rm -f' - ofile='libtool' - - - - - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "libpng.pc") CONFIG_FILES="$CONFIG_FILES libpng.pc:libpng.pc.in" ;; - "libpng-config") CONFIG_FILES="$CONFIG_FILES libpng-config:libpng-config.in" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && -S["am__EXEEXT_FALSE"]="#" -S["am__EXEEXT_TRUE"]="" -S["LTLIBOBJS"]=" ${LIBOBJDIR}strtod$U.lo" -S["PNG_POWERPC_VSX_FALSE"]="#" -S["PNG_POWERPC_VSX_TRUE"]="" -S["PNG_INTEL_SSE_FALSE"]="#" -S["PNG_INTEL_SSE_TRUE"]="" -S["PNG_MIPS_MSA_FALSE"]="#" -S["PNG_MIPS_MSA_TRUE"]="" -S["PNG_ARM_NEON_FALSE"]="" -S["PNG_ARM_NEON_TRUE"]="#" -S["DO_INSTALL_LIBPNG_CONFIG_FALSE"]="#" -S["DO_INSTALL_LIBPNG_CONFIG_TRUE"]="" -S["DO_INSTALL_LIBPNG_PC_FALSE"]="#" -S["DO_INSTALL_LIBPNG_PC_TRUE"]="" -S["DO_INSTALL_LINKS_FALSE"]="#" -S["DO_INSTALL_LINKS_TRUE"]="" -S["DO_PNG_PREFIX_FALSE"]="" -S["DO_PNG_PREFIX_TRUE"]="#" -S["PNG_PREFIX"]="" -S["binconfigs"]="${binconfigs}" -S["pkgconfigdir"]="${libdir}/pkgconfig" -S["PNGLIB_RELEASE"]="37" -S["PNGLIB_MINOR"]="6" -S["PNGLIB_MAJOR"]="1" -S["PNGLIB_VERSION"]="1.6.37" -S["SYMBOL_PREFIX"]="_" -S["HAVE_LD_VERSION_SCRIPT_FALSE"]="#" -S["HAVE_LD_VERSION_SCRIPT_TRUE"]="" -S["HAVE_SOLARIS_LD_FALSE"]="" -S["HAVE_SOLARIS_LD_TRUE"]="#" -S["HAVE_CLOCK_GETTIME_FALSE"]="" -S["HAVE_CLOCK_GETTIME_TRUE"]="#" -S["LIBOBJS"]=" ${LIBOBJDIR}strtod$U.o" -S["POW_LIB"]="" -S["PNG_COPTS"]="" -S["DFNCPP"]="i586-pc-msdosdjgpp-gcc -E" -S["LT_SYS_LIBRARY_PATH"]="" -S["OTOOL64"]="" -S["OTOOL"]="" -S["LIPO"]="" -S["NMEDIT"]="" -S["DSYMUTIL"]="" -S["MANIFEST_TOOL"]=":" -S["RANLIB"]="i586-pc-msdosdjgpp-ranlib" -S["ac_ct_AR"]="" -S["AR"]="i586-pc-msdosdjgpp-ar" -S["NM"]="/opt/cross/djgpp/bin/i586-pc-msdosdjgpp-nm -B" -S["ac_ct_DUMPBIN"]="" -S["DUMPBIN"]="" -S["LIBTOOL"]="$(SHELL) $(top_builddir)/libtool" -S["OBJDUMP"]="i586-pc-msdosdjgpp-objdump" -S["DLLTOOL"]="false" -S["AS"]="as" -S["LN_S"]="ln -s" -S["CPP"]="i586-pc-msdosdjgpp-gcc -E" -S["LD"]="/opt/cross/djgpp/i586-pc-msdosdjgpp/bin/ld" -S["FGREP"]="/usr/bin/grep -F" -S["EGREP"]="/usr/bin/grep -E" -S["GREP"]="/usr/bin/grep" -S["SED"]="/usr/bin/sed" -S["host_os"]="msdosdjgpp" -S["host_vendor"]="pc" -S["host_cpu"]="i586" -S["host"]="i586-pc-msdosdjgpp" -S["build_os"]="linux-gnu" -S["build_vendor"]="pc" -S["build_cpu"]="x86_64" -S["build"]="x86_64-pc-linux-gnu" -S["am__fastdepCCAS_FALSE"]="#" -S["am__fastdepCCAS_TRUE"]="" -S["CCASDEPMODE"]="depmode=gcc3" -S["CCASFLAGS"]="-DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib" -S["CCAS"]="i586-pc-msdosdjgpp-gcc" -S["am__fastdepCC_FALSE"]="#" -S["am__fastdepCC_TRUE"]="" -S["CCDEPMODE"]="depmode=gcc3" -S["am__nodep"]="_no" -S["AMDEPBACKSLASH"]="\\" -S["AMDEP_FALSE"]="#" -S["AMDEP_TRUE"]="" -S["am__include"]="include" -S["DEPDIR"]=".deps" -S["OBJEXT"]="o" -S["EXEEXT"]=".exe" -S["ac_ct_CC"]="" -S["CPPFLAGS"]="" -S["LDFLAGS"]="" -S["CFLAGS"]="-DPNG_NO_CONSOLE_IO -I/home/scott/code/FLTK_Nano-X_DOS/installed/dos/include -L/home/scott/code/FLTK_Nano-X_DOS/installed/dos/lib" -S["CC"]="i586-pc-msdosdjgpp-gcc" -S["MAINT"]="#" -S["MAINTAINER_MODE_FALSE"]="" -S["MAINTAINER_MODE_TRUE"]="#" -S["AM_BACKSLASH"]="\\" -S["AM_DEFAULT_VERBOSITY"]="1" -S["AM_DEFAULT_V"]="$(AM_DEFAULT_VERBOSITY)" -S["AM_V"]="$(V)" -S["am__untar"]="$${TAR-tar} xf -" -S["am__tar"]="$${TAR-tar} chof - \"$$tardir\"" -S["AMTAR"]="$${TAR-tar}" -S["am__leading_dot"]="." -S["SET_MAKE"]="" -S["AWK"]="gawk" -S["mkdir_p"]="$(MKDIR_P)" -S["MKDIR_P"]="/usr/bin/mkdir -p" -S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s" -S["STRIP"]="i586-pc-msdosdjgpp-strip" -S["install_sh"]="${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/install-sh" -S["MAKEINFO"]="${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing makeinfo" -S["AUTOHEADER"]="${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing autoheader" -S["AUTOMAKE"]="${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing automake-1.16" -S["AUTOCONF"]="${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing autoconf" -S["ACLOCAL"]="${SHELL} /home/scott/code/FLTK_Nano-X_DOS/libpng-1.6.37/missing aclocal-1.16" -S["VERSION"]="1.6.37" -S["PACKAGE"]="libpng" -S["CYGPATH_W"]="echo" -S["am__isrc"]="" -S["INSTALL_DATA"]="${INSTALL} -m 644" -S["INSTALL_SCRIPT"]="${INSTALL}" -S["INSTALL_PROGRAM"]="${INSTALL}" -S["target_alias"]="" -S["host_alias"]="i586-pc-msdosdjgpp" -S["build_alias"]="x86_64-linux-gnu" -S["LIBS"]="-lz " -S["ECHO_T"]="" -S["ECHO_N"]="-n" -S["ECHO_C"]="" -S["DEFS"]="-DHAVE_CONFIG_H" -S["mandir"]="${datarootdir}/man" -S["localedir"]="${datarootdir}/locale" -S["libdir"]="${exec_prefix}/lib" -S["psdir"]="${docdir}" -S["pdfdir"]="${docdir}" -S["dvidir"]="${docdir}" -S["htmldir"]="${docdir}" -S["infodir"]="${datarootdir}/info" -S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" -S["oldincludedir"]="/usr/include" -S["includedir"]="${prefix}/include" -S["localstatedir"]="${prefix}/var" -S["sharedstatedir"]="${prefix}/com" -S["sysconfdir"]="${prefix}/etc" -S["datadir"]="${datarootdir}" -S["datarootdir"]="${prefix}/share" -S["libexecdir"]="${exec_prefix}/libexec" -S["sbindir"]="${exec_prefix}/sbin" -S["bindir"]="${exec_prefix}/bin" -S["program_transform_name"]="s,x,x," -S["prefix"]="/home/scott/code/FLTK_Nano-X_DOS/installed/dos" -S["exec_prefix"]="${prefix}" -S["PACKAGE_URL"]="" -S["PACKAGE_BUGREPORT"]="png-mng-implement@lists.sourceforge.net" -S["PACKAGE_STRING"]="libpng 1.6.37" -S["PACKAGE_VERSION"]="1.6.37" -S["PACKAGE_TARNAME"]="libpng" -S["PACKAGE_NAME"]="libpng" -S["PATH_SEPARATOR"]=":" -S["SHELL"]="/bin/bash" -S["am__quote"]="" -_ACAWK -cat >>"$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -D["PACKAGE_NAME"]=" \"libpng\"" -D["PACKAGE_TARNAME"]=" \"libpng\"" -D["PACKAGE_VERSION"]=" \"1.6.37\"" -D["PACKAGE_STRING"]=" \"libpng 1.6.37\"" -D["PACKAGE_BUGREPORT"]=" \"png-mng-implement@lists.sourceforge.net\"" -D["PACKAGE_URL"]=" \"\"" -D["PACKAGE"]=" \"libpng\"" -D["VERSION"]=" \"1.6.37\"" -D["STDC_HEADERS"]=" 1" -D["HAVE_SYS_TYPES_H"]=" 1" -D["HAVE_SYS_STAT_H"]=" 1" -D["HAVE_STDLIB_H"]=" 1" -D["HAVE_STRING_H"]=" 1" -D["HAVE_MEMORY_H"]=" 1" -D["HAVE_STRINGS_H"]=" 1" -D["HAVE_INTTYPES_H"]=" 1" -D["HAVE_STDINT_H"]=" 1" -D["HAVE_UNISTD_H"]=" 1" -D["HAVE_DLFCN_H"]=" 1" -D["LT_OBJDIR"]=" \".libs/\"" -D["STDC_HEADERS"]=" 1" -D["restrict"]=" __restrict" -D["HAVE_POW"]=" 1" -D["HAVE_LIBZ"]=" 1" - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { - line = $ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} - ac_datarootdir_hack=' - s&@datadir@&${datarootdir}&g - s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g - s&@infodir@&${datarootdir}/info&g - s&@localedir@&${datarootdir}/locale&g - s&@mandir@&${datarootdir}/man&g - s&\${datarootdir}&${prefix}/share&g' ;; -esac -ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -} - -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - case $CONFIG_FILES in #( - *\'*) : - eval set x "$CONFIG_FILES" ;; #( - *) : - set x $CONFIG_FILES ;; #( - *) : - ;; -esac - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`$as_dirname -- "$am_mf" || -$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$am_mf" : 'X\(//\)[^/]' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$am_mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - am_filepart=`$as_basename -- "$am_mf" || -$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { echo "$as_me:$LINENO: cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles" >&5 - (cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } || am_rc=$? - done - if test $am_rc -ne 0; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). -See \`config.log' for more details" "$LINENO" 5; } - fi - { am_dirpart=; unset am_dirpart;} - { am_filepart=; unset am_filepart;} - { am_mf=; unset am_mf;} - { am_rc=; unset am_rc;} - rm -f conftest-deps.mk -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# The names of the tagged configurations supported by this script. -available_tags='' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Assembler program. -AS=$lt_AS - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Object dumper program. -OBJDUMP=$lt_OBJDUMP - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - "libpng-config":F) chmod +x libpng-config ;; - - esac -done # for ac_tag - - -as_fn_exit 0 diff --git a/thirdparty/libpng-1.6.37/config.sub b/thirdparty/libpng-1.6.37/config.sub deleted file mode 100755 index 9ccf09a..0000000 --- a/thirdparty/libpng-1.6.37/config.sub +++ /dev/null @@ -1,1801 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. - -timestamp='2018-03-08' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - -Canonicalize a configuration name. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2018 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo "$1" - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - x64) - basic_machine=x86_64-pc - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases that might get confused - # with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose - ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ - | -midnightbsd*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo "$os" | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo "$os" | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo "$os" | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4*) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -pikeos*) - # Until real need of OS specific support for - # particular features comes up, bare metal - # configurations are quite functional. - case $basic_machine in - arm*) - os=-eabi - ;; - *) - os=-elf - ;; - esac - ;; - -nacl*) - ;; - -ios) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - c8051-*) - os=-elf - ;; - hexagon-*) - os=-elf - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - pru-*) - os=-elf - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` - ;; -esac - -echo "$basic_machine$os" -exit - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/thirdparty/libpng-1.6.37/configure b/thirdparty/libpng-1.6.37/configure deleted file mode 100755 index 1b2c463..0000000 --- a/thirdparty/libpng-1.6.37/configure +++ /dev/null @@ -1,16116 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libpng 1.6.37. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: png-mng-implement@lists.sourceforge.net about your -$0: system, including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='libpng' -PACKAGE_TARNAME='libpng' -PACKAGE_VERSION='1.6.37' -PACKAGE_STRING='libpng 1.6.37' -PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net' -PACKAGE_URL='' - -ac_unique_file="pngget.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -PNG_POWERPC_VSX_FALSE -PNG_POWERPC_VSX_TRUE -PNG_INTEL_SSE_FALSE -PNG_INTEL_SSE_TRUE -PNG_MIPS_MSA_FALSE -PNG_MIPS_MSA_TRUE -PNG_ARM_NEON_FALSE -PNG_ARM_NEON_TRUE -DO_INSTALL_LIBPNG_CONFIG_FALSE -DO_INSTALL_LIBPNG_CONFIG_TRUE -DO_INSTALL_LIBPNG_PC_FALSE -DO_INSTALL_LIBPNG_PC_TRUE -DO_INSTALL_LINKS_FALSE -DO_INSTALL_LINKS_TRUE -DO_PNG_PREFIX_FALSE -DO_PNG_PREFIX_TRUE -PNG_PREFIX -binconfigs -pkgconfigdir -PNGLIB_RELEASE -PNGLIB_MINOR -PNGLIB_MAJOR -PNGLIB_VERSION -SYMBOL_PREFIX -HAVE_LD_VERSION_SCRIPT_FALSE -HAVE_LD_VERSION_SCRIPT_TRUE -HAVE_SOLARIS_LD_FALSE -HAVE_SOLARIS_LD_TRUE -HAVE_CLOCK_GETTIME_FALSE -HAVE_CLOCK_GETTIME_TRUE -LIBOBJS -POW_LIB -PNG_COPTS -DFNCPP -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -AR -NM -ac_ct_DUMPBIN -DUMPBIN -LIBTOOL -OBJDUMP -DLLTOOL -AS -LN_S -CPP -LD -FGREP -EGREP -GREP -SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -am__fastdepCCAS_FALSE -am__fastdepCCAS_TRUE -CCASDEPMODE -CCASFLAGS -CCAS -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL -am__quote' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_maintainer_mode -enable_dependency_tracking -with_gnu_ld -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_sysroot -enable_libtool_lock -enable_werror -with_zlib_prefix -with_pkgconfigdir -with_binconfigs -with_libpng_prefix -enable_unversioned_links -enable_unversioned_libpng_pc -enable_unversioned_libpng_config -enable_hardware_optimizations -enable_arm_neon -enable_mips_msa -enable_intel_sse -enable_powerpc_vsx -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CCAS -CCASFLAGS -CPP -LT_SYS_LIBRARY_PATH -PNG_COPTS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures libpng 1.6.37 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/libpng] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of libpng 1.6.37:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-maintainer-mode - enable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-werror[=OPT] Pass -Werror or the given argument to the compiler - if it is supported - --enable-unversioned-links - Installed libpng header files are placed in a - versioned subdirectory and installed libpng library - (including DLL) files are versioned. If this option - is enabled unversioned links will be created - pointing to the corresponding installed files. If - you use libpng.pc or libpng-config for all builds - you do not need these links, but if you compile - programs directly they will typically #include - and link with -lpng; in that case you need - the links. The links can be installed manually using - 'make install-header-links' and 'make - install-library-links' and can be removed using the - corresponding uninstall- targets. If you do enable - this option every libpng 'make install' will - recreate the links to point to the just installed - version of libpng. The default is to create the - links; use --disable-unversioned-links to change - this - --enable-unversioned-libpng-pc - Install the configuration file 'libpng.pc' as a link - to the versioned version. This is done by default - - use --disable-unversioned-libpng-pc to change this. - --enable-unversioned-libpng-config - Install the configuration file 'libpng-config' as a - link to the versioned version. This is done by - default - use --disable-unversioned-libpng-config to - change this. - --enable-hardware-optimizations - Enable hardware optimizations: =no/off, yes/on: - --enable-arm-neon Enable ARM NEON optimizations: =no/off, check, api, - yes/on: no/off: disable the optimizations; check: - use internal checking code (deprecated and poorly - supported); api: disable by default, enable by a - call to png_set_option; yes/on: turn on - unconditionally. If not specified: determined by the - compiler. - --enable-mips-msa Enable MIPS MSA optimizations: =no/off, check, api, - yes/on: no/off: disable the optimizations; check: - use internal checking code (deprecated and poorly - supported); api: disable by default, enable by a - call to png_set_option; yes/on: turn on - unconditionally. If not specified: determined by the - compiler. - --enable-intel-sse Enable Intel SSE optimizations: =no/off, yes/on: - no/off: disable the optimizations; yes/on: enable - the optimizations. If not specified: determined by - the compiler. - --enable-powerpc-vsx Enable POWERPC VSX optimizations: =no/off, check, - api, yes/on: no/off: disable the optimizations; - check: use internal checking code api: disable by - default, enable by a call to png_set_option yes/on: - turn on unconditionally. If not specified: - determined by the compiler. - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). - --with-zlib-prefix prefix that may have been used in installed zlib - --with-pkgconfigdir Use the specified pkgconfig dir (default is - libdir/pkgconfig) - --with-binconfigs Generate shell libpng-config scripts as well as - pkg-config data [default=yes] - --with-libpng-prefix prefix libpng exported function (API) names with the - given value - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CCAS assembler compiler command (defaults to CC) - CCASFLAGS assembler compiler flags (defaults to CFLAGS) - CPP C preprocessor - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - PNG_COPTS additional flags for the C compiler, use this for options that - would cause configure itself to fail - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -libpng configure 1.6.37 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by libpng $as_me 1.6.37, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -# libpng does not follow GNU file name conventions (hence 'foreign') -# color-tests requires automake 1.11 or later -# silent-rules requires automake 1.11 or later -# dist-xz requires automake 1.11 or later -# 1.12.2 fixes a security issue in 1.11.2 and 1.12.1 -# 1.13 is required for parallel tests -am__api_version='1.16' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='libpng' - VERSION='1.6.37' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar pax cpio none' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - -# The following line causes --disable-maintainer-mode to be the default to -# configure. This is necessary because libpng distributions cannot rely on the -# time stamps of the autotools generated files being correct - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - - -PNGLIB_VERSION=1.6.37 -PNGLIB_MAJOR=1 -PNGLIB_MINOR=6 -PNGLIB_RELEASE=37 - - - -ac_config_headers="$ac_config_headers config.h" - - -# Checks for programs. -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } -cat > confinc.mk << 'END' -am__doit: - @echo this is the am__doit target >confinc.out -.PHONY: am__doit -END -am__include="#" -am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 - (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - case $?:`cat confinc.out 2>/dev/null` in #( - '0:this is the am__doit target') : - case $s in #( - BSD) : - am__include='.include' am__quote='"' ;; #( - *) : - am__include='include' am__quote='' ;; -esac ;; #( - *) : - ;; -esac - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -$as_echo "${_am_result}" >&6; } - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -# By default we simply use the C compiler to build assembly code. - -test "${CCAS+set}" = set || CCAS=$CC -test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS - - - -depcc="$CCAS" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CCAS_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CCAS_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CCAS_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } -CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then - am__fastdepCCAS_TRUE= - am__fastdepCCAS_FALSE='#' -else - am__fastdepCCAS_TRUE='#' - am__fastdepCCAS_FALSE= -fi - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options -enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; -esac - -test -z "$AS" && AS=as - - - - - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - enable_dlopen=no - - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - pic_mode=default -fi - - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } - -# Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - -# Some awks crash when confronted with pnglibconf.dfa, do a test run now -# to make sure this doesn't happen -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that AWK works" >&5 -$as_echo_n "checking that AWK works... " >&6; } -if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\ - ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ - ${srcdir}/pngusr.dfa 1>&2 -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 1 "failed -See \`config.log' for more details" "$LINENO" 5; } -fi - -# This is a remnant of the old cc -E validation, where it may have been -# necessary to use a different preprocessor for .dfn files -DFNCPP="$CPP" - - -# -Werror cannot be passed to GCC in CFLAGS because configure will fail (it -# checks the compiler with a program that generates a warning), add the -# following option to deal with this - -# Check whether --enable-werror was given. -if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; test "$enable_werror" = "yes" && enable_werror="-Werror" - if test "$enable_werror" != "no"; then - sav_CFLAGS="$CFLAGS" - CFLAGS="$enable_werror $CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler allows $enable_werror" >&5 -$as_echo_n "checking if the compiler allows $enable_werror... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - int main(int argc, char **argv){ - return argv[argc-1][0]; - } -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - PNG_COPTS="$PNG_COPTS $enable_werror" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$sav_CFLAGS" - fi -fi - - -# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89 -# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining _POSIX_SOURCE to 1 -# This is incompatible with the new default mode, so we test for that and force the -# "-std=c89" compiler option: -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to force back C standard to C89" >&5 -$as_echo_n "checking if we need to force back C standard to C89... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define _POSIX_SOURCE 1 - #include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - - if test "x$GCC" != "xyes"; then - as_fn_error $? "Forcing back to C89 is required but the flags are only known for GCC" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - CFLAGS="$CFLAGS -std=c89" - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# Checks for header files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - - -# Checks for typedefs, structures, and compiler characteristics. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if ${ac_cv_struct_tm+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_tm=time.h -else - ac_cv_struct_tm=sys/time.h -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if ${ac_cv_c_restrict+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } -int -main () -{ -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_restrict=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } - - case $ac_cv_c_restrict in - restrict) ;; - no) $as_echo "#define restrict /**/" >>confdefs.h - ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $ac_cv_c_restrict -_ACEOF - ;; - esac - - -# Checks for library functions. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 -$as_echo_n "checking for working strtod... " >&6; } -if ${ac_cv_func_strtod+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_strtod=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -$ac_includes_default -#ifndef strtod -double strtod (); -#endif -int -main() -{ - { - /* Some versions of Linux strtod mis-parse strings with leading '+'. */ - char *string = " +69"; - char *term; - double value; - value = strtod (string, &term); - if (value != 69 || term != (string + 4)) - return 1; - } - - { - /* Under Solaris 2.4, strtod returns the wrong value for the - terminating character under some conditions. */ - char *string = "NaN"; - char *term; - strtod (string, &term); - if (term != string && *(term - 1) == 0) - return 1; - } - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_strtod=yes -else - ac_cv_func_strtod=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 -$as_echo "$ac_cv_func_strtod" >&6; } -if test $ac_cv_func_strtod = no; then - case " $LIBOBJS " in - *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; -esac - -ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" -if test "x$ac_cv_func_pow" = xyes; then : - -fi - -if test $ac_cv_func_pow = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 -$as_echo_n "checking for pow in -lm... " >&6; } -if ${ac_cv_lib_m_pow+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pow (); -int -main () -{ -return pow (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_pow=yes -else - ac_cv_lib_m_pow=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 -$as_echo "$ac_cv_lib_m_pow" >&6; } -if test "x$ac_cv_lib_m_pow" = xyes; then : - POW_LIB=-lm -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 -$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} -fi - -fi - -fi - -for ac_func in pow -do : - ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" -if test "x$ac_cv_func_pow" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_POW 1 -_ACEOF - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 -$as_echo_n "checking for pow in -lm... " >&6; } -if ${ac_cv_lib_m_pow+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pow (); -int -main () -{ -return pow (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_pow=yes -else - ac_cv_lib_m_pow=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 -$as_echo "$ac_cv_lib_m_pow" >&6; } -if test "x$ac_cv_lib_m_pow" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -else - as_fn_error $? "cannot find pow" "$LINENO" 5 -fi - -fi -done - - -# Some later POSIX 1003.1 functions are required for test programs, failure here -# is soft (the corresponding test program is not built). -ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building timepng" >&5 -$as_echo "$as_me: WARNING: not building timepng" >&2;} -fi - - if test "$ac_cv_func_clock_gettime" = "yes"; then - HAVE_CLOCK_GETTIME_TRUE= - HAVE_CLOCK_GETTIME_FALSE='#' -else - HAVE_CLOCK_GETTIME_TRUE='#' - HAVE_CLOCK_GETTIME_FALSE= -fi - - - -# Check whether --with-zlib-prefix was given. -if test "${with_zlib_prefix+set}" = set; then : - withval=$with_zlib_prefix; ZPREFIX=${withval} -else - ZPREFIX='z_' -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5 -$as_echo_n "checking for zlibVersion in -lz... " >&6; } -if ${ac_cv_lib_z_zlibVersion+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char zlibVersion (); -int -main () -{ -return zlibVersion (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_zlibVersion=yes -else - ac_cv_lib_z_zlibVersion=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5 -$as_echo "$ac_cv_lib_z_zlibVersion" >&6; } -if test "x$ac_cv_lib_z_zlibVersion" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -else - as_ac_Lib=`$as_echo "ac_cv_lib_z_${ZPREFIX}zlibVersion" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ZPREFIX}zlibVersion in -lz" >&5 -$as_echo_n "checking for ${ZPREFIX}zlibVersion in -lz... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ${ZPREFIX}zlibVersion (); -int -main () -{ -return ${ZPREFIX}zlibVersion (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -else - as_fn_error $? "zlib not installed" "$LINENO" 5 -fi - -fi - - -# The following is for pngvalid, to ensure it catches FP errors even on -# platforms that don't enable FP exceptions, the function appears in the math -# library (typically), it's not an error if it is not found. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for feenableexcept in -lm" >&5 -$as_echo_n "checking for feenableexcept in -lm... " >&6; } -if ${ac_cv_lib_m_feenableexcept+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char feenableexcept (); -int -main () -{ -return feenableexcept (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_feenableexcept=yes -else - ac_cv_lib_m_feenableexcept=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_feenableexcept" >&5 -$as_echo "$ac_cv_lib_m_feenableexcept" >&6; } -if test "x$ac_cv_lib_m_feenableexcept" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - -for ac_func in feenableexcept -do : - ac_fn_c_check_func "$LINENO" "feenableexcept" "ac_cv_func_feenableexcept" -if test "x$ac_cv_func_feenableexcept" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FEENABLEEXCEPT 1 -_ACEOF - -fi -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if using Solaris linker" >&5 -$as_echo_n "checking if using Solaris linker... " >&6; } -SLD=`$LD --version 2>&1 | grep Solaris` -if test "$SLD"; then - have_solaris_ld=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - have_solaris_ld=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "$have_solaris_ld" = "yes"; then - HAVE_SOLARIS_LD_TRUE= - HAVE_SOLARIS_LD_FALSE='#' -else - HAVE_SOLARIS_LD_TRUE='#' - HAVE_SOLARIS_LD_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5 -$as_echo_n "checking if libraries can be versioned... " >&6; } -# Special case for PE/COFF platforms: ld reports -# support for version-script, but doesn't actually -# DO anything with it. -case $host in -*cygwin* | *mingw32* | *interix* ) - have_ld_version_script=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -;; -* ) - -if test "$have_solaris_ld" = "yes"; then - GLD=`$LD --help < /dev/null 2>&1 | grep 'M mapfile'` -else - GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script` -fi - -if test "$GLD"; then - have_ld_version_script=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - have_ld_version_script=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** You have not enabled versioned symbols." >&5 -$as_echo "$as_me: WARNING: *** You have not enabled versioned symbols." >&2;} -fi -;; -esac - - if test "$have_ld_version_script" = "yes"; then - HAVE_LD_VERSION_SCRIPT_TRUE= - HAVE_LD_VERSION_SCRIPT_FALSE='#' -else - HAVE_LD_VERSION_SCRIPT_TRUE='#' - HAVE_LD_VERSION_SCRIPT_FALSE= -fi - - -if test "$have_ld_version_script" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5 -$as_echo_n "checking for symbol prefix... " >&6; } - SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ - | ${CPP-${CC-gcc} -E} - 2>&1 \ - | ${EGREP-grep} "^PREFIX=" \ - | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5 -$as_echo "$SYMBOL_PREFIX" >&6; } -fi - -# Substitutions for .in files - - - - - -# Additional arguments (and substitutions) -# Allow the pkg-config directory to be set - -# Check whether --with-pkgconfigdir was given. -if test "${with_pkgconfigdir+set}" = set; then : - withval=$with_pkgconfigdir; pkgconfigdir=${withval} -else - pkgconfigdir='${libdir}/pkgconfig' -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: pkgconfig directory is ${pkgconfigdir}" >&5 -$as_echo "$as_me: pkgconfig directory is ${pkgconfigdir}" >&6;} - -# Make the *-config binary config scripts optional - -# Check whether --with-binconfigs was given. -if test "${with_binconfigs+set}" = set; then : - withval=$with_binconfigs; if test "${withval}" = no; then - binconfigs= - { $as_echo "$as_me:${as_lineno-$LINENO}: libpng-config scripts will not be built" >&5 -$as_echo "$as_me: libpng-config scripts will not be built" >&6;} - else - binconfigs='${binconfigs}' - fi -else - binconfigs='${binconfigs}' -fi - - - -# Support for prefixes to the API function names; this will generate defines -# at the start of the build to rename exported library functions - -# Check whether --with-libpng-prefix was given. -if test "${with_libpng_prefix+set}" = set; then : - withval=$with_libpng_prefix; if test "${withval:-no}" != "no"; then - PNG_PREFIX=${withval} - - fi -fi - - if test "${with_libpng_prefix:-no}" != "no"; then - DO_PNG_PREFIX_TRUE= - DO_PNG_PREFIX_FALSE='#' -else - DO_PNG_PREFIX_TRUE='#' - DO_PNG_PREFIX_FALSE= -fi - - -# Control over what links are made for installed files. Versioned files are -# always installed, when the following options are turned on corresponding -# unversioned links are also created (normally as symbolic links): -# Check whether --enable-unversioned-links was given. -if test "${enable_unversioned_links+set}" = set; then : - enableval=$enable_unversioned_links; -fi - - -# The AM_CONDITIONAL test is written so that the default is enabled; -# --disable-unversioned-links must be given to turn the option off. - if test "$enable_unversioned_links" != "no"; then - DO_INSTALL_LINKS_TRUE= - DO_INSTALL_LINKS_FALSE='#' -else - DO_INSTALL_LINKS_TRUE='#' - DO_INSTALL_LINKS_FALSE= -fi - - -# Check whether --enable-unversioned-libpng-pc was given. -if test "${enable_unversioned_libpng_pc+set}" = set; then : - enableval=$enable_unversioned_libpng_pc; -fi - - if test "$enable_unversioned_libpng_pc" != "no"; then - DO_INSTALL_LIBPNG_PC_TRUE= - DO_INSTALL_LIBPNG_PC_FALSE='#' -else - DO_INSTALL_LIBPNG_PC_TRUE='#' - DO_INSTALL_LIBPNG_PC_FALSE= -fi - - -# Check whether --enable-unversioned-libpng-config was given. -if test "${enable_unversioned_libpng_config+set}" = set; then : - enableval=$enable_unversioned_libpng_config; -fi - - if test "$enable_unversioned_libpng_config" != "no"; then - DO_INSTALL_LIBPNG_CONFIG_TRUE= - DO_INSTALL_LIBPNG_CONFIG_FALSE='#' -else - DO_INSTALL_LIBPNG_CONFIG_TRUE='#' - DO_INSTALL_LIBPNG_CONFIG_FALSE= -fi - - -# HOST SPECIFIC OPTIONS -# ===================== -# -# DEFAULT -# ======= -# -# Check whether --enable-hardware-optimizations was given. -if test "${enable_hardware_optimizations+set}" = set; then : - enableval=$enable_hardware_optimizations; case "$enableval" in - no|off) - # disable hardware optimization on all systems: - enable_arm_neon=no - -$as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h - - enable_mips_msa=no - -$as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h - - enable_powerpc_vsx=no - -$as_echo "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h - - enable_intel_sse=no - -$as_echo "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h - - ;; - *) - # allow enabling hardware optimization on any system: - case "$host_cpu" in - arm*|aarch64*) - enable_arm_neon=yes - -$as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h - - ;; - mipsel*|mips64el*) - enable_mips_msa=yes - -$as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h - - ;; - i?86|x86_64) - enable_intel_sse=yes - -$as_echo "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h - - ;; - powerpc*|ppc64*) - enable_powerpc_vsx=yes - -$as_echo "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h - - ;; - esac - ;; - esac -fi - - -# ARM -# === -# -# ARM NEON (SIMD) support. - -# Check whether --enable-arm-neon was given. -if test "${enable_arm_neon+set}" = set; then : - enableval=$enable_arm_neon; case "$enableval" in - no|off) - # disable the default enabling on __ARM_NEON__ systems: - -$as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h - - # Prevent inclusion of the assembler files below: - enable_arm_neon=no;; - check) - -$as_echo "#define PNG_ARM_NEON_CHECK_SUPPORTED /**/" >>confdefs.h -;; - api) - -$as_echo "#define PNG_ARM_NEON_API_SUPPORTED /**/" >>confdefs.h -;; - yes|on) - -$as_echo "#define PNG_ARM_NEON_OPT 2" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-arm-neon: please specify 'check' or 'api', if - you want the optimizations unconditionally pass -mfpu=neon - to the compiler." >&5 -$as_echo "$as_me: WARNING: --enable-arm-neon: please specify 'check' or 'api', if - you want the optimizations unconditionally pass -mfpu=neon - to the compiler." >&2;};; - *) - as_fn_error $? "--enable-arm-neon=${enable_arm_neon}: invalid value" "$LINENO" 5 - esac -fi - - -# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or -# where ARM optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'arm*') - - if test "$enable_arm_neon" != 'no' && - case "$host_cpu" in - arm*|aarch64*) :;; - *) test "$enable_arm_neon" != '';; - esac; then - PNG_ARM_NEON_TRUE= - PNG_ARM_NEON_FALSE='#' -else - PNG_ARM_NEON_TRUE='#' - PNG_ARM_NEON_FALSE= -fi - - -# MIPS -# === -# -# MIPS MSA (SIMD) support. - -# Check whether --enable-mips-msa was given. -if test "${enable_mips_msa+set}" = set; then : - enableval=$enable_mips_msa; case "$enableval" in - no|off) - # disable the default enabling on __mips_msa systems: - -$as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h - - # Prevent inclusion of the assembler files below: - enable_mips_msa=no;; - check) - -$as_echo "#define PNG_MIPS_MSA_CHECK_SUPPORTED /**/" >>confdefs.h -;; - api) - -$as_echo "#define PNG_MIPS_MSA_API_SUPPORTED /**/" >>confdefs.h -;; - yes|on) - -$as_echo "#define PNG_MIPS_MSA_OPT 2" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-mips-msa: please specify 'check' or 'api', if - you want the optimizations unconditionally pass '-mmsa -mfp64' - to the compiler." >&5 -$as_echo "$as_me: WARNING: --enable-mips-msa: please specify 'check' or 'api', if - you want the optimizations unconditionally pass '-mmsa -mfp64' - to the compiler." >&2;};; - *) - as_fn_error $? "--enable-mips-msa=${enable_mips_msa}: invalid value" "$LINENO" 5 - esac -fi - - -# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or -# where MIPS optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'mips*') - - if test "$enable_mips_msa" != 'no' && - case "$host_cpu" in - mipsel*|mips64el*) :;; - esac; then - PNG_MIPS_MSA_TRUE= - PNG_MIPS_MSA_FALSE='#' -else - PNG_MIPS_MSA_TRUE='#' - PNG_MIPS_MSA_FALSE= -fi - - -# INTEL -# ===== -# -# INTEL SSE (SIMD) support. - -# Check whether --enable-intel-sse was given. -if test "${enable_intel_sse+set}" = set; then : - enableval=$enable_intel_sse; case "$enableval" in - no|off) - # disable the default enabling: - -$as_echo "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h - - # Prevent inclusion of the assembler files below: - enable_intel_sse=no;; - yes|on) - -$as_echo "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h -;; - *) - as_fn_error $? "--enable-intel-sse=${enable_intel_sse}: invalid value" "$LINENO" 5 - esac -fi - - -# Add Intel specific files to all builds where the host_cpu is Intel ('x86*') -# or where Intel optimizations were explicitly requested (this allows a -# fallback if a future host CPU does not match 'x86*') - if test "$enable_intel_sse" != 'no' && - case "$host_cpu" in - i?86|x86_64) :;; - *) test "$enable_intel_sse" != '';; - esac; then - PNG_INTEL_SSE_TRUE= - PNG_INTEL_SSE_FALSE='#' -else - PNG_INTEL_SSE_TRUE='#' - PNG_INTEL_SSE_FALSE= -fi - - -# PowerPC -# === -# -# PowerPC VSX (SIMD) support. - -# Check whether --enable-powerpc-vsx was given. -if test "${enable_powerpc_vsx+set}" = set; then : - enableval=$enable_powerpc_vsx; case "$enableval" in - no|off) - # disable the default enabling on __ppc64__ systems: - -$as_echo "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h - - # Prevent inclusion of the platform specific files below: - enable_powerpc_vsx=no;; - check) - -$as_echo "#define PNG_POWERPC_VSX_CHECK_SUPPORTED /**/" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file - for the list of supported OSes." >&5 -$as_echo "$as_me: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file - for the list of supported OSes." >&2;};; - api) - -$as_echo "#define PNG_POWERPC_VSX_API_SUPPORTED /**/" >>confdefs.h -;; - yes|on) - -$as_echo "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if - you want the optimizations unconditionally pass '-maltivec -mvsx' - or '-mcpu=power8'to the compiler." >&5 -$as_echo "$as_me: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if - you want the optimizations unconditionally pass '-maltivec -mvsx' - or '-mcpu=power8'to the compiler." >&2;};; - *) - as_fn_error $? "--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value" "$LINENO" 5 - esac -fi - - -# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or -# where POWERPC optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'powerpc*') - - if test "$enable_powerpc_vsx" != 'no' && - case "$host_cpu" in - powerpc*|ppc64*) :;; - esac; then - PNG_POWERPC_VSX_TRUE= - PNG_POWERPC_VSX_FALSE='#' -else - PNG_POWERPC_VSX_TRUE='#' - PNG_POWERPC_VSX_FALSE= -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: Extra options for compiler: $PNG_COPTS" >&5 -$as_echo "$as_me: Extra options for compiler: $PNG_COPTS" >&6;} - -# Config files, substituting as above -ac_config_files="$ac_config_files Makefile libpng.pc:libpng.pc.in" - -ac_config_files="$ac_config_files libpng-config:libpng-config.in" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_CLOCK_GETTIME_TRUE}" && test -z "${HAVE_CLOCK_GETTIME_FALSE}"; then - as_fn_error $? "conditional \"HAVE_CLOCK_GETTIME\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_SOLARIS_LD_TRUE}" && test -z "${HAVE_SOLARIS_LD_FALSE}"; then - as_fn_error $? "conditional \"HAVE_SOLARIS_LD\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT_FALSE}"; then - as_fn_error $? "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DO_PNG_PREFIX_TRUE}" && test -z "${DO_PNG_PREFIX_FALSE}"; then - as_fn_error $? "conditional \"DO_PNG_PREFIX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DO_INSTALL_LINKS_TRUE}" && test -z "${DO_INSTALL_LINKS_FALSE}"; then - as_fn_error $? "conditional \"DO_INSTALL_LINKS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DO_INSTALL_LIBPNG_PC_TRUE}" && test -z "${DO_INSTALL_LIBPNG_PC_FALSE}"; then - as_fn_error $? "conditional \"DO_INSTALL_LIBPNG_PC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DO_INSTALL_LIBPNG_CONFIG_TRUE}" && test -z "${DO_INSTALL_LIBPNG_CONFIG_FALSE}"; then - as_fn_error $? "conditional \"DO_INSTALL_LIBPNG_CONFIG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${PNG_ARM_NEON_TRUE}" && test -z "${PNG_ARM_NEON_FALSE}"; then - as_fn_error $? "conditional \"PNG_ARM_NEON\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${PNG_MIPS_MSA_TRUE}" && test -z "${PNG_MIPS_MSA_FALSE}"; then - as_fn_error $? "conditional \"PNG_MIPS_MSA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${PNG_INTEL_SSE_TRUE}" && test -z "${PNG_INTEL_SSE_FALSE}"; then - as_fn_error $? "conditional \"PNG_INTEL_SSE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${PNG_POWERPC_VSX_TRUE}" && test -z "${PNG_POWERPC_VSX_FALSE}"; then - as_fn_error $? "conditional \"PNG_POWERPC_VSX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by libpng $as_me 1.6.37, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -libpng config.status 1.6.37 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -SHELL \ -ECHO \ -LD \ -AS \ -DLLTOOL \ -OBJDUMP \ -PATH_SEPARATOR \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "libpng.pc") CONFIG_FILES="$CONFIG_FILES libpng.pc:libpng.pc.in" ;; - "libpng-config") CONFIG_FILES="$CONFIG_FILES libpng-config:libpng-config.in" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - case $CONFIG_FILES in #( - *\'*) : - eval set x "$CONFIG_FILES" ;; #( - *) : - set x $CONFIG_FILES ;; #( - *) : - ;; -esac - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`$as_dirname -- "$am_mf" || -$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$am_mf" : 'X\(//\)[^/]' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$am_mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - am_filepart=`$as_basename -- "$am_mf" || -$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { echo "$as_me:$LINENO: cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles" >&5 - (cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } || am_rc=$? - done - if test $am_rc -ne 0; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). -See \`config.log' for more details" "$LINENO" 5; } - fi - { am_dirpart=; unset am_dirpart;} - { am_filepart=; unset am_filepart;} - { am_mf=; unset am_mf;} - { am_rc=; unset am_rc;} - rm -f conftest-deps.mk -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# The names of the tagged configurations supported by this script. -available_tags='' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Assembler program. -AS=$lt_AS - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Object dumper program. -OBJDUMP=$lt_OBJDUMP - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - "libpng-config":F) chmod +x libpng-config ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/thirdparty/libpng-1.6.37/configure.ac b/thirdparty/libpng-1.6.37/configure.ac deleted file mode 100644 index 52dba94..0000000 --- a/thirdparty/libpng-1.6.37/configure.ac +++ /dev/null @@ -1,532 +0,0 @@ -# configure.ac - -# Copyright (c) 2018 Cosmin Truta -# Copyright (c) 2004-2016 Glenn Randers-Pehrson - -# This code is released under the libpng license. -# For conditions of distribution and use, see the disclaimer -# and license in png.h - -dnl Process this file with autoconf to produce a configure script. -dnl -dnl Minor upgrades (compatible ABI): increment the package version -dnl (third field in two places below) and set the PNGLIB_RELEASE -dnl variable. -dnl -dnl Major upgrades (incompatible ABI): increment the package major -dnl version (second field, or first if desired), set the minor -dnl to 0, set PNGLIB_MAJOR below *and* follow the instructions in -dnl Makefile.am to upgrade the package name. - -dnl This is here to prevent earlier autoconf from being used, it -dnl should not be necessary to regenerate configure if the time -dnl stamps are correct -AC_PREREQ([2.68]) - -dnl Version number stuff here: - -AC_INIT([libpng],[1.6.37],[png-mng-implement@lists.sourceforge.net]) -AC_CONFIG_MACRO_DIR([scripts]) - -# libpng does not follow GNU file name conventions (hence 'foreign') -# color-tests requires automake 1.11 or later -# silent-rules requires automake 1.11 or later -# dist-xz requires automake 1.11 or later -# 1.12.2 fixes a security issue in 1.11.2 and 1.12.1 -# 1.13 is required for parallel tests -AM_INIT_AUTOMAKE([1.13 foreign dist-xz color-tests silent-rules subdir-objects]) -# The following line causes --disable-maintainer-mode to be the default to -# configure. This is necessary because libpng distributions cannot rely on the -# time stamps of the autotools generated files being correct -AM_MAINTAINER_MODE - -dnl configure.ac and Makefile.am expect automake 1.11.2 or a compatible later -dnl version; aclocal.m4 will generate a failure if you use a prior version of -dnl automake, so the following is not necessary (and is not defined anyway): -dnl AM_PREREQ([1.11.2]) -dnl stop configure from automagically running automake - -PNGLIB_VERSION=1.6.37 -PNGLIB_MAJOR=1 -PNGLIB_MINOR=6 -PNGLIB_RELEASE=37 - -dnl End of version number stuff - -AC_CONFIG_SRCDIR([pngget.c]) -AC_CONFIG_HEADERS([config.h]) - -# Checks for programs. -AC_LANG([C]) -AC_PROG_CC -AM_PROG_AS -LT_PATH_LD -AC_PROG_CPP -AC_PROG_AWK -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET - -dnl libtool/libtoolize; version 2.4.2 is the tested version. This or any -dnl compatible later version may be used -LT_INIT([win32-dll]) -LT_PREREQ([2.4.2]) - -# Some awks crash when confronted with pnglibconf.dfa, do a test run now -# to make sure this doesn't happen -AC_MSG_CHECKING([that AWK works]) -if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\ - ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ - ${srcdir}/pngusr.dfa 1>&2 -then - AC_MSG_RESULT([ok]) -else - AC_MSG_FAILURE([failed], 1) -fi - -# This is a remnant of the old cc -E validation, where it may have been -# necessary to use a different preprocessor for .dfn files -DFNCPP="$CPP" -AC_SUBST(DFNCPP) - -# -Werror cannot be passed to GCC in CFLAGS because configure will fail (it -# checks the compiler with a program that generates a warning), add the -# following option to deal with this -AC_ARG_VAR(PNG_COPTS, - [additional flags for the C compiler, use this for options that would] - [cause configure itself to fail]) -AC_ARG_ENABLE(werror, - AS_HELP_STRING([[[--enable-werror[=OPT]]]], - [Pass -Werror or the given argument to the compiler if it is supported]), - [test "$enable_werror" = "yes" && enable_werror="-Werror" - if test "$enable_werror" != "no"; then - sav_CFLAGS="$CFLAGS" - CFLAGS="$enable_werror $CFLAGS" - AC_MSG_CHECKING([if the compiler allows $enable_werror]) - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([ - [int main(int argc, char **argv){] - [return argv[argc-1][0];] - [}]])], - AC_MSG_RESULT(yes) - PNG_COPTS="$PNG_COPTS $enable_werror", - AC_MSG_RESULT(no)) - CFLAGS="$sav_CFLAGS" - fi],) - -# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89 -# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining _POSIX_SOURCE to 1 -# This is incompatible with the new default mode, so we test for that and force the -# "-std=c89" compiler option: -AC_MSG_CHECKING([if we need to force back C standard to C89]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ - [#define _POSIX_SOURCE 1] - [#include ] - ])], - AC_MSG_RESULT(no),[ - if test "x$GCC" != "xyes"; then - AC_MSG_ERROR( - [Forcing back to C89 is required but the flags are only known for GCC]) - fi - AC_MSG_RESULT(yes) - CFLAGS="$CFLAGS -std=c89" -]) - -# Checks for header files. -AC_HEADER_STDC - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T -AC_STRUCT_TM -AC_C_RESTRICT - -# Checks for library functions. -AC_FUNC_STRTOD -AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_MSG_ERROR(cannot find pow)) ) - -# Some later POSIX 1003.1 functions are required for test programs, failure here -# is soft (the corresponding test program is not built). -AC_CHECK_FUNC([clock_gettime],,[AC_MSG_WARN([not building timepng])]) -AM_CONDITIONAL([HAVE_CLOCK_GETTIME], [test "$ac_cv_func_clock_gettime" = "yes"]) - -AC_ARG_WITH(zlib-prefix, - AS_HELP_STRING([[[--with-zlib-prefix]]], - [prefix that may have been used in installed zlib]), - [ZPREFIX=${withval}], - [ZPREFIX='z_']) -AC_CHECK_LIB(z, zlibVersion, , - AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, , AC_MSG_ERROR(zlib not installed))) - -# The following is for pngvalid, to ensure it catches FP errors even on -# platforms that don't enable FP exceptions, the function appears in the math -# library (typically), it's not an error if it is not found. -AC_CHECK_LIB([m], [feenableexcept]) -AC_CHECK_FUNCS([feenableexcept]) - -AC_MSG_CHECKING([if using Solaris linker]) -SLD=`$LD --version 2>&1 | grep Solaris` -if test "$SLD"; then - have_solaris_ld=yes - AC_MSG_RESULT(yes) -else - have_solaris_ld=no - AC_MSG_RESULT(no) -fi -AM_CONDITIONAL(HAVE_SOLARIS_LD, test "$have_solaris_ld" = "yes") - -AC_MSG_CHECKING([if libraries can be versioned]) -# Special case for PE/COFF platforms: ld reports -# support for version-script, but doesn't actually -# DO anything with it. -case $host in -*cygwin* | *mingw32* | *interix* ) - have_ld_version_script=no - AC_MSG_RESULT(no) -;; -* ) - -if test "$have_solaris_ld" = "yes"; then - GLD=`$LD --help < /dev/null 2>&1 | grep 'M mapfile'` -else - GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script` -fi - -if test "$GLD"; then - have_ld_version_script=yes - AC_MSG_RESULT(yes) -else - have_ld_version_script=no - AC_MSG_RESULT(no) - AC_MSG_WARN(*** You have not enabled versioned symbols.) -fi -;; -esac - -AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") - -if test "$have_ld_version_script" = "yes"; then - AC_MSG_CHECKING([for symbol prefix]) - SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ - | ${CPP-${CC-gcc} -E} - 2>&1 \ - | ${EGREP-grep} "^PREFIX=" \ - | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` - AC_SUBST(SYMBOL_PREFIX) - AC_MSG_RESULT($SYMBOL_PREFIX) -fi - -# Substitutions for .in files -AC_SUBST(PNGLIB_VERSION) -AC_SUBST(PNGLIB_MAJOR) -AC_SUBST(PNGLIB_MINOR) -AC_SUBST(PNGLIB_RELEASE) - -# Additional arguments (and substitutions) -# Allow the pkg-config directory to be set -AC_ARG_WITH(pkgconfigdir, - AS_HELP_STRING([[[--with-pkgconfigdir]]], - [Use the specified pkgconfig dir (default is libdir/pkgconfig)]), - [pkgconfigdir=${withval}], - [pkgconfigdir='${libdir}/pkgconfig']) - -AC_SUBST([pkgconfigdir]) -AC_MSG_NOTICE([[pkgconfig directory is ${pkgconfigdir}]]) - -# Make the *-config binary config scripts optional -AC_ARG_WITH(binconfigs, - AS_HELP_STRING([[[--with-binconfigs]]], - [Generate shell libpng-config scripts as well as pkg-config data] - [@<:@default=yes@:>@]), - [if test "${withval}" = no; then - binconfigs= - AC_MSG_NOTICE([[libpng-config scripts will not be built]]) - else - binconfigs='${binconfigs}' - fi], - [binconfigs='${binconfigs}']) -AC_SUBST([binconfigs]) - -# Support for prefixes to the API function names; this will generate defines -# at the start of the build to rename exported library functions -AC_ARG_WITH(libpng-prefix, - AS_HELP_STRING([[[--with-libpng-prefix]]], - [prefix libpng exported function (API) names with the given value]), - [if test "${withval:-no}" != "no"; then - AC_SUBST([PNG_PREFIX], [${withval}]) - fi]) -AM_CONDITIONAL([DO_PNG_PREFIX], [test "${with_libpng_prefix:-no}" != "no"]) - -# Control over what links are made for installed files. Versioned files are -# always installed, when the following options are turned on corresponding -# unversioned links are also created (normally as symbolic links): -AC_ARG_ENABLE([unversioned-links], - AS_HELP_STRING([[[--enable-unversioned-links]]], - [Installed libpng header files are placed in a versioned subdirectory] - [and installed libpng library (including DLL) files are versioned.] - [If this option is enabled unversioned links will be created pointing to] - [the corresponding installed files. If you use libpng.pc or] - [libpng-config for all builds you do not need these links, but if you] - [compile programs directly they will typically #include and] - [link with -lpng; in that case you need the links.] - [The links can be installed manually using 'make install-header-links'] - [and 'make install-library-links' and can be removed using the] - [corresponding uninstall- targets. If you do enable this option every] - [libpng 'make install' will recreate the links to point to the just] - [installed version of libpng. The default is to create the links;] - [use --disable-unversioned-links to change this])) - -# The AM_CONDITIONAL test is written so that the default is enabled; -# --disable-unversioned-links must be given to turn the option off. -AM_CONDITIONAL([DO_INSTALL_LINKS],[test "$enable_unversioned_links" != "no"]) - -AC_ARG_ENABLE([unversioned-libpng-pc], - AS_HELP_STRING([[[--enable-unversioned-libpng-pc]]], - [Install the configuration file 'libpng.pc' as a link to the versioned] - [version. This is done by default - use --disable-unversioned-libpng-pc] - [to change this.])) -AM_CONDITIONAL([DO_INSTALL_LIBPNG_PC], - [test "$enable_unversioned_libpng_pc" != "no"]) - -AC_ARG_ENABLE([unversioned-libpng-config], - AS_HELP_STRING([[[--enable-unversioned-libpng-config]]], - [Install the configuration file 'libpng-config' as a link to the] - [versioned version. This is done by default - use] - [--disable-unversioned-libpng-config to change this.])) -AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG], - [test "$enable_unversioned_libpng_config" != "no"]) - -# HOST SPECIFIC OPTIONS -# ===================== -# -# DEFAULT -# ======= -# -AC_ARG_ENABLE([hardware-optimizations], - AS_HELP_STRING([[[--enable-hardware-optimizations]]], - [Enable hardware optimizations: =no/off, yes/on:]), - [case "$enableval" in - no|off) - # disable hardware optimization on all systems: - enable_arm_neon=no - AC_DEFINE([PNG_ARM_NEON_OPT], [0], - [Disable ARM_NEON optimizations]) - enable_mips_msa=no - AC_DEFINE([PNG_MIPS_MSA_OPT], [0], - [Disable MIPS_MSA optimizations]) - enable_powerpc_vsx=no - AC_DEFINE([PNG_POWERPC_VSX_OPT], [0], - [Disable POWERPC VSX optimizations]) - enable_intel_sse=no - AC_DEFINE([PNG_INTEL_SSE_OPT], [0], - [Disable INTEL_SSE optimizations]) - ;; - *) - # allow enabling hardware optimization on any system: - case "$host_cpu" in - arm*|aarch64*) - enable_arm_neon=yes - AC_DEFINE([PNG_ARM_NEON_OPT], [0], - [Enable ARM_NEON optimizations]) - ;; - mipsel*|mips64el*) - enable_mips_msa=yes - AC_DEFINE([PNG_MIPS_MSA_OPT], [0], - [Enable MIPS_MSA optimizations]) - ;; - i?86|x86_64) - enable_intel_sse=yes - AC_DEFINE([PNG_INTEL_SSE_OPT], [1], - [Enable Intel SSE optimizations]) - ;; - powerpc*|ppc64*) - enable_powerpc_vsx=yes - AC_DEFINE([PNG_POWERPC_VSX_OPT], [2], - [Enable POWERPC VSX optimizations]) - ;; - esac - ;; - esac]) - -# ARM -# === -# -# ARM NEON (SIMD) support. - -AC_ARG_ENABLE([arm-neon], - AS_HELP_STRING([[[--enable-arm-neon]]], - [Enable ARM NEON optimizations: =no/off, check, api, yes/on:] - [no/off: disable the optimizations; check: use internal checking code] - [(deprecated and poorly supported); api: disable by default, enable by] - [a call to png_set_option; yes/on: turn on unconditionally.] - [If not specified: determined by the compiler.]), - [case "$enableval" in - no|off) - # disable the default enabling on __ARM_NEON__ systems: - AC_DEFINE([PNG_ARM_NEON_OPT], [0], - [Disable ARM Neon optimizations]) - # Prevent inclusion of the assembler files below: - enable_arm_neon=no;; - check) - AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [], - [Check for ARM Neon support at run-time]);; - api) - AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [], - [Turn on ARM Neon optimizations at run-time]);; - yes|on) - AC_DEFINE([PNG_ARM_NEON_OPT], [2], - [Enable ARM Neon optimizations]) - AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if] - [you want the optimizations unconditionally pass -mfpu=neon] - [to the compiler.]);; - *) - AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value]) - esac]) - -# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or -# where ARM optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'arm*') - -AM_CONDITIONAL([PNG_ARM_NEON], - [test "$enable_arm_neon" != 'no' && - case "$host_cpu" in - arm*|aarch64*) :;; - *) test "$enable_arm_neon" != '';; - esac]) - -# MIPS -# === -# -# MIPS MSA (SIMD) support. - -AC_ARG_ENABLE([mips-msa], - AS_HELP_STRING([[[--enable-mips-msa]]], - [Enable MIPS MSA optimizations: =no/off, check, api, yes/on:] - [no/off: disable the optimizations; check: use internal checking code] - [(deprecated and poorly supported); api: disable by default, enable by] - [a call to png_set_option; yes/on: turn on unconditionally.] - [If not specified: determined by the compiler.]), - [case "$enableval" in - no|off) - # disable the default enabling on __mips_msa systems: - AC_DEFINE([PNG_MIPS_MSA_OPT], [0], - [Disable MIPS MSA optimizations]) - # Prevent inclusion of the assembler files below: - enable_mips_msa=no;; - check) - AC_DEFINE([PNG_MIPS_MSA_CHECK_SUPPORTED], [], - [Check for MIPS MSA support at run-time]);; - api) - AC_DEFINE([PNG_MIPS_MSA_API_SUPPORTED], [], - [Turn on MIPS MSA optimizations at run-time]);; - yes|on) - AC_DEFINE([PNG_MIPS_MSA_OPT], [2], - [Enable MIPS MSA optimizations]) - AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api', if] - [you want the optimizations unconditionally pass '-mmsa -mfp64'] - [to the compiler.]);; - *) - AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}: invalid value]) - esac]) - -# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or -# where MIPS optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'mips*') - -AM_CONDITIONAL([PNG_MIPS_MSA], - [test "$enable_mips_msa" != 'no' && - case "$host_cpu" in - mipsel*|mips64el*) :;; - esac]) - -# INTEL -# ===== -# -# INTEL SSE (SIMD) support. - -AC_ARG_ENABLE([intel-sse], - AS_HELP_STRING([[[--enable-intel-sse]]], - [Enable Intel SSE optimizations: =no/off, yes/on:] - [no/off: disable the optimizations;] - [yes/on: enable the optimizations.] - [If not specified: determined by the compiler.]), - [case "$enableval" in - no|off) - # disable the default enabling: - AC_DEFINE([PNG_INTEL_SSE_OPT], [0], - [Disable Intel SSE optimizations]) - # Prevent inclusion of the assembler files below: - enable_intel_sse=no;; - yes|on) - AC_DEFINE([PNG_INTEL_SSE_OPT], [1], - [Enable Intel SSE optimizations]);; - *) - AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}: invalid value]) - esac]) - -# Add Intel specific files to all builds where the host_cpu is Intel ('x86*') -# or where Intel optimizations were explicitly requested (this allows a -# fallback if a future host CPU does not match 'x86*') -AM_CONDITIONAL([PNG_INTEL_SSE], - [test "$enable_intel_sse" != 'no' && - case "$host_cpu" in - i?86|x86_64) :;; - *) test "$enable_intel_sse" != '';; - esac]) - -# PowerPC -# === -# -# PowerPC VSX (SIMD) support. - -AC_ARG_ENABLE([powerpc-vsx], -AS_HELP_STRING([[[--enable-powerpc-vsx]]], - [Enable POWERPC VSX optimizations: =no/off, check, api, yes/on:] - [no/off: disable the optimizations; check: use internal checking code] - [api: disable by default, enable by a call to png_set_option] - [yes/on: turn on unconditionally.] - [If not specified: determined by the compiler.]), - [case "$enableval" in - no|off) - # disable the default enabling on __ppc64__ systems: - AC_DEFINE([PNG_POWERPC_VSX_OPT], [0], - [Disable POWERPC VSX optimizations]) - # Prevent inclusion of the platform specific files below: - enable_powerpc_vsx=no;; - check) - AC_DEFINE([PNG_POWERPC_VSX_CHECK_SUPPORTED], [], - [Check for POWERPC VSX support at run-time]) - AC_MSG_WARN([--enable-powerpc-vsx Please check contrib/powerpc/README file] - [for the list of supported OSes.]);; - api) - AC_DEFINE([PNG_POWERPC_VSX_API_SUPPORTED], [], - [Turn on POWERPC VSX optimizations at run-time]);; - yes|on) - AC_DEFINE([PNG_POWERPC_VSX_OPT], [2], - [Enable POWERPC VSX optimizations]) - AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api', if] - [you want the optimizations unconditionally pass '-maltivec -mvsx'] - [or '-mcpu=power8'to the compiler.]);; - *) - AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value]) - esac]) - -# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or -# where POWERPC optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'powerpc*') - -AM_CONDITIONAL([PNG_POWERPC_VSX], - [test "$enable_powerpc_vsx" != 'no' && - case "$host_cpu" in - powerpc*|ppc64*) :;; - esac]) - - -AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]]) - -# Config files, substituting as above -AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in]) -AC_CONFIG_FILES([libpng-config:libpng-config.in], - [chmod +x libpng-config]) - -AC_OUTPUT diff --git a/thirdparty/libpng-1.6.37/contrib/README.txt b/thirdparty/libpng-1.6.37/contrib/README.txt deleted file mode 100644 index 97963c6..0000000 --- a/thirdparty/libpng-1.6.37/contrib/README.txt +++ /dev/null @@ -1,5 +0,0 @@ - -This "contrib" directory contains contributions which are not necessarily under -the libpng license, although all are open source. They are not part of -libpng proper and are not used for building the library, although some are used -for testing the library via "make check". diff --git a/thirdparty/libpng-1.6.37/contrib/arm-neon/README b/thirdparty/libpng-1.6.37/contrib/arm-neon/README deleted file mode 100644 index b4248cf..0000000 --- a/thirdparty/libpng-1.6.37/contrib/arm-neon/README +++ /dev/null @@ -1,83 +0,0 @@ -OPERATING SYSTEM SPECIFIC ARM NEON DETECTION --------------------------------------------- - -Detection of the ability to execute ARM NEON on an ARM processor requires -operating system support. (The information is not available in user mode.) - -HOW TO USE THIS ---------------- - -This directory contains C code fragments that can be included in arm/arm_init.c -by setting the macro PNG_ARM_NEON_FILE to the file name in "" or <> at build -time. This setting is not recorded in pnglibconf.h and can be changed simply by -rebuilding arm/arm_init.o with the required macro definition. - -For any of this code to be used the ARM NEON code must be enabled and run time -checks must be supported. I.e.: - -#if PNG_ARM_NEON_OPT > 0 -#ifdef PNG_ARM_NEON_CHECK_SUPPORTED - -This is done in a 'configure' build by passing configure the argument: - - --enable-arm-neon=check - -Apart from the basic Linux implementation in contrib/arm-neon/linux.c this code -is unsupported. That means that it is not even compiled on a regular basis and -may be broken in any given minor release. - -FILE FORMAT ------------ - -Each file documents its testing status as of the last time it was tested (which -may have been a long time ago): - -STATUS: one of: - SUPPORTED: This indicates that the file is included in the regularly - performed test builds and bugs are fixed when discovered. - COMPILED: This indicates that the code did compile at least once. See the - more detailed description for the extent to which the result was - successful. - TESTED: This means the code was fully compiled into the libpng test programs - and these were run at least once. - -BUG REPORTS: an email address to which to send reports of problems - -The file is a fragment of C code. It should not define any 'extern' symbols; -everything should be static. It must define the function: - -static int png_have_neon(png_structp png_ptr); - -That function must return 1 if ARM NEON instructions are supported, 0 if not. -It must not execute png_error unless it detects a bug. A png_error will prevent -the reading of the PNG and in the future, writing too. - -BUG REPORTS ------------ - -If you mail a bug report for any file that is not SUPPORTED there may only be -limited response. Consider fixing it and sending a patch to fix the problem - -this is more likely to result in action. - -CONTRIBUTIONS -------------- - -You may send contributions of new implementations to -png-mng-implement@sourceforge.net. Please write code in strict C90 C where -possible. Obviously OS dependencies are to be expected. If you submit code you -must have the authors permission and it must have a license that is acceptable -to the current maintainer; in particular that license must permit modification -and redistribution. - -Please try to make the contribution a single file and give the file a clear and -unambiguous name that identifies the target OS. If multiple files really are -required put them all in a sub-directory. - -You must also be prepared to handle bug reports from users of the code, either -by joining the png-mng-implement mailing list or by providing an email for the -"BUG REPORTS" entry or both. Please make sure that the header of the file -contains the STATUS and BUG REPORTS fields as above. - -Please list the OS requirements as precisely as possible. Ideally you should -also list the environment in which the code has been tested and certainly list -any environments where you suspect it might not work. diff --git a/thirdparty/libpng-1.6.37/contrib/arm-neon/android-ndk.c b/thirdparty/libpng-1.6.37/contrib/arm-neon/android-ndk.c deleted file mode 100644 index fb3a489..0000000 --- a/thirdparty/libpng-1.6.37/contrib/arm-neon/android-ndk.c +++ /dev/null @@ -1,39 +0,0 @@ -/* contrib/arm-neon/android-ndk.c - * - * Copyright (c) 2014 Glenn Randers-Pehrson - * Written by John Bowler, 2014. - * Last changed in libpng 1.6.10 [March 6, 2014] - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - * - * SEE contrib/arm-neon/README before reporting bugs - * - * STATUS: COMPILED, UNTESTED - * BUG REPORTS: png-mng-implement@sourceforge.net - * - * png_have_neon implemented for the Android NDK, see: - * - * Documentation: - * http://www.kandroid.org/ndk/docs/CPU-ARM-NEON.html - * https://code.google.com/p/android/issues/detail?id=49065 - * - * NOTE: this requires that libpng is built against the Android NDK and linked - * with an implementation of the Android ARM 'cpu-features' library. The code - * has been compiled only, not linked: no version of the library has been found, - * only the header files exist in the NDK. - */ -#include - -static int -png_have_neon(png_structp png_ptr) -{ - /* This is a whole lot easier than the linux code, however it is probably - * implemented as below, therefore it is better to cache the result (these - * function calls may be slow!) - */ - PNG_UNUSED(png_ptr) - return android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM && - (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; -} diff --git a/thirdparty/libpng-1.6.37/contrib/arm-neon/linux-auxv.c b/thirdparty/libpng-1.6.37/contrib/arm-neon/linux-auxv.c deleted file mode 100644 index 4d26bd3..0000000 --- a/thirdparty/libpng-1.6.37/contrib/arm-neon/linux-auxv.c +++ /dev/null @@ -1,120 +0,0 @@ -/* contrib/arm-neon/linux-auxv.c - * - * Copyright (c) 2014 Glenn Randers-Pehrson - * Written by Mans Rullgard, 2011. - * Last changed in libpng 1.6.10 [March 6, 2014] - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - * - * SEE contrib/arm-neon/README before reporting bugs - * - * STATUS: COMPILED, TESTED - * BUG REPORTS: png-mng-implement@sourceforge.net - * - * png_have_neon implemented for Linux versions which allow access to - * /proc/self/auxv. This is probably faster, cleaner and safer than the code to - * read /proc/cpuinfo in contrib/arm-neon/linux, however it is yet another piece - * of potentially untested code and has more complex dependencies than the code - * to read cpuinfo. - * - * This generic __linux__ implementation requires reading /proc/self/auxv and - * looking at each element for one that records NEON capabilities. - */ -#include /* for POSIX 1003.1 */ -#include /* for EINTR */ - -#include -#include -#include -#include -#include - -/* A read call may be interrupted, in which case it returns -1 and sets errno to - * EINTR if nothing was done, otherwise (if something was done) a partial read - * may result. - */ -static size_t -safe_read(png_structp png_ptr, int fd, void *buffer_in, size_t nbytes) -{ - size_t ntotal = 0; - char *buffer = png_voidcast(char*, buffer_in); - - while (nbytes > 0) - { - unsigned int nread; - int iread; - - /* Passing nread > INT_MAX to read is implementation defined in POSIX - * 1003.1, therefore despite the unsigned argument portable code must - * limit the value to INT_MAX! - */ - if (nbytes > INT_MAX) - nread = INT_MAX; - - else - nread = (unsigned int)/*SAFE*/nbytes; - - iread = read(fd, buffer, nread); - - if (iread == -1) - { - /* This is the devil in the details, a read can terminate early with 0 - * bytes read because of EINTR, yet it still returns -1 otherwise end - * of file cannot be distinguished. - */ - if (errno != EINTR) - { - png_warning(png_ptr, "/proc read failed"); - return 0; /* I.e., a permanent failure */ - } - } - - else if (iread < 0) - { - /* Not a valid 'read' result: */ - png_warning(png_ptr, "OS /proc read bug"); - return 0; - } - - else if (iread > 0) - { - /* Continue reading until a permanent failure, or EOF */ - buffer += iread; - nbytes -= (unsigned int)/*SAFE*/iread; - ntotal += (unsigned int)/*SAFE*/iread; - } - - else - return ntotal; - } - - return ntotal; /* nbytes == 0 */ -} - -static int -png_have_neon(png_structp png_ptr) -{ - int fd = open("/proc/self/auxv", O_RDONLY); - Elf32_auxv_t aux; - - /* Failsafe: failure to open means no NEON */ - if (fd == -1) - { - png_warning(png_ptr, "/proc/self/auxv open failed"); - return 0; - } - - while (safe_read(png_ptr, fd, &aux, sizeof aux) == sizeof aux) - { - if (aux.a_type == AT_HWCAP && (aux.a_un.a_val & HWCAP_NEON) != 0) - { - close(fd); - return 1; - } - } - - close(fd); - return 0; -} diff --git a/thirdparty/libpng-1.6.37/contrib/arm-neon/linux.c b/thirdparty/libpng-1.6.37/contrib/arm-neon/linux.c deleted file mode 100644 index a9bc360..0000000 --- a/thirdparty/libpng-1.6.37/contrib/arm-neon/linux.c +++ /dev/null @@ -1,161 +0,0 @@ -/* contrib/arm-neon/linux.c - * - * Last changed in libpng 1.6.31 [July 27, 2017] - * Copyright (c) 2014, 2017 Glenn Randers-Pehrson - * Written by John Bowler, 2014, 2017. - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - * - * SEE contrib/arm-neon/README before reporting bugs - * - * STATUS: SUPPORTED - * BUG REPORTS: png-mng-implement@sourceforge.net - * - * png_have_neon implemented for Linux by reading the widely available - * pseudo-file /proc/cpuinfo. - * - * This code is strict ANSI-C and is probably moderately portable; it does - * however use and it assumes that /proc/cpuinfo is never localized. - */ -#include - -static int -png_have_neon(png_structp png_ptr) -{ - FILE *f = fopen("/proc/cpuinfo", "rb"); - - if (f != NULL) - { - /* This is a simple state machine which reads the input byte-by-byte until - * it gets a match on the 'neon' feature or reaches the end of the stream. - */ - static const char ch_feature[] = { 70, 69, 65, 84, 85, 82, 69, 83 }; - static const char ch_neon[] = { 78, 69, 79, 78 }; - - enum - { - StartLine, Feature, Colon, StartTag, Neon, HaveNeon, SkipTag, SkipLine - } state; - int counter; - - for (state=StartLine, counter=0;;) - { - int ch = fgetc(f); - - if (ch == EOF) - { - /* EOF means error or end-of-file, return false; neon at EOF is - * assumed to be a mistake. - */ - fclose(f); - return 0; - } - - switch (state) - { - case StartLine: - /* Match spaces at the start of line */ - if (ch <= 32) /* skip control characters and space */ - break; - - counter=0; - state = Feature; - /* FALLTHROUGH */ - - case Feature: - /* Match 'FEATURE', ASCII case insensitive. */ - if ((ch & ~0x20) == ch_feature[counter]) - { - if (++counter == (sizeof ch_feature)) - state = Colon; - break; - } - - /* did not match 'feature' */ - state = SkipLine; - /* FALLTHROUGH */ - - case SkipLine: - skipLine: - /* Skip everything until we see linefeed or carriage return */ - if (ch != 10 && ch != 13) - break; - - state = StartLine; - break; - - case Colon: - /* Match any number of space or tab followed by ':' */ - if (ch == 32 || ch == 9) - break; - - if (ch == 58) /* i.e. ':' */ - { - state = StartTag; - break; - } - - /* Either a bad line format or a 'feature' prefix followed by - * other characters. - */ - state = SkipLine; - goto skipLine; - - case StartTag: - /* Skip space characters before a tag */ - if (ch == 32 || ch == 9) - break; - - state = Neon; - counter = 0; - /* FALLTHROUGH */ - - case Neon: - /* Look for 'neon' tag */ - if ((ch & ~0x20) == ch_neon[counter]) - { - if (++counter == (sizeof ch_neon)) - state = HaveNeon; - break; - } - - state = SkipTag; - /* FALLTHROUGH */ - - case SkipTag: - /* Skip non-space characters */ - if (ch == 10 || ch == 13) - state = StartLine; - - else if (ch == 32 || ch == 9) - state = StartTag; - break; - - case HaveNeon: - /* Have seen a 'neon' prefix, but there must be a space or new - * line character to terminate it. - */ - if (ch == 10 || ch == 13 || ch == 32 || ch == 9) - { - fclose(f); - return 1; - } - - state = SkipTag; - break; - - default: - png_error(png_ptr, "png_have_neon: internal error (bug)"); - } - } - } - -#ifdef PNG_WARNINGS_SUPPORTED - else - png_warning(png_ptr, "/proc/cpuinfo open failed"); -#endif - - return 0; -} diff --git a/thirdparty/libpng-1.6.37/contrib/conftest/README b/thirdparty/libpng-1.6.37/contrib/conftest/README deleted file mode 100644 index 0f47279..0000000 --- a/thirdparty/libpng-1.6.37/contrib/conftest/README +++ /dev/null @@ -1,49 +0,0 @@ -This directory contains test configuration files, currently always '.dfa' files -intended to be used in the build by setting the make macro DFA_XTRA to the name -of the file. - -These files are used in release validation of the 'configure' builds of libpng -by building 'make check', or 'make all-am' for cross-builds, with each .dfa -file. - -The files in this directory may change between minor releases, however -contributions describing specific builds of libpng are welcomed. There is no -guarantee that libpng will continue to build with such configurations; support -for given configurations can be, and has been, dropped between successive minor -releases. However if a .dfa file describing a configuration is not in this -directory it is very unlikely that it will be tested before a minor release! - -You can use these .dfa files as the basis of new configurations. Files in this -directory should not have any use restrictions or restrictive licenses. - -This directory is not included in the .zip and .7z distributions, which do -not contain 'configure' scripts. - -DOCUMENTATION -============= - -Examples: - ${srcdir}/pngusr.dfa - ${srcdir}/contrib/pngminim/*/pngusr.dfa - -Documentation of the options: - ${srcdir}/scripts/pnglibconf.dfa - -Documentation of the file format: - ${srcdir}/scripts/options.awk - -FILE NAMING -=========== - -File names in this directory may NOT contain any of the five characters: - - - , + * ? - -Neither may they contain any space character. - -While other characters may be used it is strongly suggested that file names be -limited to lower case Latiin alphabetic characters (a-z), digits (0-9) and, if -necessary the underscore (_) character. File names should be about 8 characters -long (excluding the .dfa extension). Submitted .dfa files should have names -between 7 and 16 characters long, shorter names (6 characters or less) are -reserved for standard tests. diff --git a/thirdparty/libpng-1.6.37/contrib/conftest/pngcp.dfa b/thirdparty/libpng-1.6.37/contrib/conftest/pngcp.dfa deleted file mode 100644 index 31c411d..0000000 --- a/thirdparty/libpng-1.6.37/contrib/conftest/pngcp.dfa +++ /dev/null @@ -1,57 +0,0 @@ -# pngcp.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2016 -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Build libpng with support for pngcp. This means just png_read_png, -# png_write_png and small number of configuration settings. -# -everything = off - -# This option is specific to this configuration; it adds a #define to the -# generated pnglibconf.h which turns on the (not portable) timing option for -# pngcp. Note that any option is automatically preceded by PNG_; there is no -# way round this and this is deliberate. -option PNGCP_TIMING - -# Because of the everything off above the option must also be turned on. This -# may not be done in one step because it is safer and avoids mis-spelled options -# in user .dfa files to error out if an unrecognized option is turned on. -option PNGCP_TIMING on - -# Options to turn on png_read_png and png_write_png: -option INFO_IMAGE on -option SEQUENTIAL_READ on -option EASY_ACCESS on -option WRITE on -option WRITE_16BIT on -option WRITE_FILTER on - -# pngcp needs this to preserve unknown chunks, switching all these on means that -# pngcp can work without explicit known chunk reading support -option UNKNOWN_CHUNKS on -option SET_UNKNOWN_CHUNKS on -option HANDLE_AS_UNKNOWN on -option SAVE_UNKNOWN_CHUNKS on -option WRITE_UNKNOWN_CHUNKS on - -# pngcp needs this to handle palette files with invalid indices: -option CHECK_FOR_INVALID_INDEX on -option GET_PALETTE_MAX on - -# Pre-libpng 1.7 pngcp has to stash text chunks manually, post 1.7 without this -# text chunks should be handled as unknown ok. -option TEXT on - -# this is used to turn off limits: -option USER_LIMITS on -option SET_USER_LIMITS on - -# these are just required for specific customizations -option WRITE_CUSTOMIZE_ZTXT_COMPRESSION on -option WRITE_CUSTOMIZE_COMPRESSION on diff --git a/thirdparty/libpng-1.6.37/contrib/conftest/read.dfa b/thirdparty/libpng-1.6.37/contrib/conftest/read.dfa deleted file mode 100644 index 21e88d0..0000000 --- a/thirdparty/libpng-1.6.37/contrib/conftest/read.dfa +++ /dev/null @@ -1,58 +0,0 @@ -# read.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2013 -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Build libpng with basic read support. This enables the lowest level libpng -# read API - the one where the calling code has to use a loop to read each row. -# At present this is the API used by most programs. -# -# Support is enabled only for those chunks and transformations that are -# typically required - others can be added easily. -# - -everything = off - -# The sequential read code is enabled here; the progressive code can be used -# instead but there is no point enabling both. - -option SEQUENTIAL_READ on - -# Likewise it is pointless enabling both fixed and floating point APIs. Choose -# one or the other for both the API and the internal math. - -#Fixed point: -#option FIXED_POINT on -#option FLOATING_ARITHMETIC off - -#Floating point: -option FLOATING_POINT on -option FLOATING_ARITHMETIC on - -# Basic error handling, IO and user memory support. The latter allows the -# application program to provide its own implementations of 'malloc' and 'free'. -option SETJMP on -option STDIO on -option USER_MEM on - -# To read the full set of PNG images correctly interlace, transparency and -# 16-bit support is required. The application can implement interlace itself, -# but very few do and it's no longer possible to disable it when READ is -# enabled. -option READ_tRNS on -option READ_16BIT on - -# Everything else is application dependent. This file assumes the app handles -# all the native PNG bit layouts, so it doesn't need any of layout change -# transforms, but needs libpng to perform gamma correction. It doesn't do any -# colorspace stuff and ignores the 'significant bit' information. -# -# If your app always expands the image to a limited set of bit layouts you -# probably want to consider using the simplified API instead of the low level -# one - see png.h and s_read.dfa. -option READ_GAMMA on diff --git a/thirdparty/libpng-1.6.37/contrib/conftest/s_read.dfa b/thirdparty/libpng-1.6.37/contrib/conftest/s_read.dfa deleted file mode 100644 index cb1ce0b..0000000 --- a/thirdparty/libpng-1.6.37/contrib/conftest/s_read.dfa +++ /dev/null @@ -1,35 +0,0 @@ -# s_read.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2013 -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Build libpng with simplified read support (only). This builds a minimal -# libpng able to read all PNG formats and convert them into a small number of -# well understood memory formats. -# - -everything = off - -option SIMPLIFIED_READ on - -# It isn't necessary to chose fixed or floating point for the APIs because the -# simplified API doesn't need fixed or floating point numbers. It is necessary -# to chose an internal math implementation. The default (because of 'everything -# = off') is fixed point - turn the floating point implementation on if you have -# hardware floating point or prefer your software floating point implementation. -option FLOATING_ARITHMETIC on - -# This is not strictly necessary, but without it the message strings in the API -# will not be filled in -option ERROR_TEXT on - -# Switching these options on enables the 'AFIRST' and 'BGR' formats - you don't -# need this if you don't use them, they just allow the in-memory layout to be -# changed to match common hardware formats. -option SIMPLIFIED_READ_AFIRST on -option SIMPLIFIED_READ_BGR on diff --git a/thirdparty/libpng-1.6.37/contrib/conftest/s_write.dfa b/thirdparty/libpng-1.6.37/contrib/conftest/s_write.dfa deleted file mode 100644 index e540a46..0000000 --- a/thirdparty/libpng-1.6.37/contrib/conftest/s_write.dfa +++ /dev/null @@ -1,33 +0,0 @@ -# s_write.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2013 -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Build libpng with (just) simplified write support -# - -everything = off - -option SIMPLIFIED_WRITE on - -# It isn't necessary to chose fixed or floating point for the APIs because the -# simplified API doesn't need fixed or floating point numbers. It is necessary -# to chose an internal math implementation. The default (because of 'everything -# = off') is fixed point - turn the floating point implementation on if you have -# hardware floating point or prefer your software floating point implementation. -option FLOATING_ARITHMETIC on - -# This is not strictly necessary, but without it the message strings in the API -# will not be filled in -option ERROR_TEXT on - -# Switching these options on enables the 'AFIRST' and 'BGR' formats - you don't -# need this if you don't use them, they just allow the in-memory layout to be -# changed to match common hardware formats. -option SIMPLIFIED_WRITE_AFIRST on -option SIMPLIFIED_WRITE_BGR on diff --git a/thirdparty/libpng-1.6.37/contrib/conftest/simple.dfa b/thirdparty/libpng-1.6.37/contrib/conftest/simple.dfa deleted file mode 100644 index 0419333..0000000 --- a/thirdparty/libpng-1.6.37/contrib/conftest/simple.dfa +++ /dev/null @@ -1,36 +0,0 @@ -# simple.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2013 -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Build libpng with just the simplified APIs (read and write). -# - -everything = off - -option SIMPLIFIED_WRITE on -option SIMPLIFIED_READ on - -# It isn't necessary to chose fixed or floating point for the APIs because the -# simplified API doesn't need fixed or floating point numbers. It is necessary -# to chose an internal math implementation. The default (because of 'everything -# = off') is fixed point - turn the floating point implementation on if you have -# hardware floating point or prefer your software floating point implementation. -option FLOATING_ARITHMETIC on - -# This is not strictly necessary, but without it the message strings in the API -# will not be filled in -option ERROR_TEXT on - -# Switching these options on enables the 'AFIRST' and 'BGR' formats - you don't -# need this if you don't use them, they just allow the in-memory layout to be -# changed to match common hardware formats. -option SIMPLIFIED_READ_AFIRST on -option SIMPLIFIED_READ_BGR on -option SIMPLIFIED_WRITE_AFIRST on -option SIMPLIFIED_WRITE_BGR on diff --git a/thirdparty/libpng-1.6.37/contrib/conftest/write.dfa b/thirdparty/libpng-1.6.37/contrib/conftest/write.dfa deleted file mode 100644 index 3319aab..0000000 --- a/thirdparty/libpng-1.6.37/contrib/conftest/write.dfa +++ /dev/null @@ -1,45 +0,0 @@ -# write.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2013 -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Build libpng with no read support and minimal write support. -# - -everything = off - -# Switch on the write code - this makes a minimalist encoder - -option WRITE on - -# Choose fixed or floating point APIs and arithmetic. The choices are -# independent but normally they will match. It is typically better to use the -# floating point if you have floating point hardware. If you don't know, or -# (perhaps) to make libpng smaller used fixed point throughout. - -#Fixed point: -#option FIXED_POINT on -#option FLOATING_ARITHMETIC off - -#Floating point: -option FLOATING_POINT on -option FLOATING_ARITHMETIC on - -# Basic error handling, IO and user memory support. The latter allows the -# application program to provide its own implementations of 'malloc' and 'free'. -option SETJMP on -option STDIO on -option USER_MEM on - -# Everything else is optional. Unlike the read code in libpng the write code -# does not need to deal with arbitrary formats, so only add support for things -# you really do write! For example you might only write sRGB images, sometimes -# with transparency and never write 16 bit images, so: -option WRITE_sRGB on -option WRITE_tRNS on -#option WRITE_16BIT off (this is the default with 'everything = off') diff --git a/thirdparty/libpng-1.6.37/contrib/examples/README.txt b/thirdparty/libpng-1.6.37/contrib/examples/README.txt deleted file mode 100644 index 48dab4f..0000000 --- a/thirdparty/libpng-1.6.37/contrib/examples/README.txt +++ /dev/null @@ -1,24 +0,0 @@ - -This directory (contrib/examples) contains examples of libpng usage. - -NO COPYRIGHT RIGHTS ARE CLAIMED TO ANY OF THE FILES IN THIS DIRECTORY. - -To the extent possible under law, the authors have waived all copyright and -related or neighboring rights to this work. This work is published from: -United States. - -The files may be used freely in any way. The intention is that appropriate -parts of the files be used in other libpng-using programs without any need for -the authors of the using code to seek copyright or license from the original -authors. - -The source code and comments in this directory are the original work of the -people named below. No other person or organization has made contributions to -the work in this directory. - -ORIGINAL AUTHORS - The following people have contributed to the code in this directory. None - of the people below claim any rights with regard to the contents of this - directory. - - John Bowler diff --git a/thirdparty/libpng-1.6.37/contrib/examples/iccfrompng.c b/thirdparty/libpng-1.6.37/contrib/examples/iccfrompng.c deleted file mode 100644 index 00056ab..0000000 --- a/thirdparty/libpng-1.6.37/contrib/examples/iccfrompng.c +++ /dev/null @@ -1,185 +0,0 @@ -/*- iccfrompng - * - * COPYRIGHT: Written by John Cunningham Bowler, 2011. - * To the extent possible under law, the author has waived all copyright and - * related or neighboring rights to this work. This work is published from: - * United States. - * - * Extract any icc profiles found in the given PNG files. This is a simple - * example of a program that extracts information from the header of a PNG file - * without processing the image. Notice that some header information may occur - * after the image data. Textual data and comments are an example; the approach - * in this file won't work reliably for such data because it only looks for the - * information in the section of the file that precedes the image data. - * - * Compile and link against libpng and zlib, plus anything else required on the - * system you use. - * - * To use supply a list of PNG files containing iCCP chunks, the chunks will be - * extracted to a similarly named file with the extension replaced by 'icc', - * which will be overwritten without warning. - */ -#include -#include -#include -#include - -#include - -#if defined(PNG_READ_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) && \ - defined (PNG_iCCP_SUPPORTED) - - -static int verbose = 1; -static png_byte no_profile[] = "no profile"; - -static png_bytep -extract(FILE *fp, png_uint_32 *proflen) -{ - png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0); - png_infop info_ptr = NULL; - png_bytep result = NULL; - - /* Initialize for error or no profile: */ - *proflen = 0; - - if (png_ptr == NULL) - { - fprintf(stderr, "iccfrompng: version library mismatch?\n"); - return 0; - } - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return 0; - } - - png_init_io(png_ptr, fp); - - info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) - png_error(png_ptr, "OOM allocating info structure"); - - png_read_info(png_ptr, info_ptr); - - { - png_charp name; - int compression_type; - png_bytep profile; - - if (png_get_iCCP(png_ptr, info_ptr, &name, &compression_type, &profile, - proflen) & PNG_INFO_iCCP) - { - result = malloc(*proflen); - if (result != NULL) - memcpy(result, profile, *proflen); - - else - png_error(png_ptr, "OOM allocating profile buffer"); - } - - else - result = no_profile; - } - - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return result; -} - -static int -extract_one_file(const char *filename) -{ - int result = 0; - FILE *fp = fopen(filename, "rb"); - - if (fp != NULL) - { - png_uint_32 proflen = 0; - png_bytep profile = extract(fp, &proflen); - - if (profile != NULL && profile != no_profile) - { - size_t len; - char *output; - - { - const char *ep = strrchr(filename, '.'); - - if (ep != NULL) - len = ep-filename; - - else - len = strlen(filename); - } - - output = malloc(len + 5); - if (output != NULL) - { - FILE *of; - - memcpy(output, filename, len); - strcpy(output+len, ".icc"); - - of = fopen(output, "wb"); - if (of != NULL) - { - if (fwrite(profile, proflen, 1, of) == 1 && - fflush(of) == 0 && - fclose(of) == 0) - { - if (verbose) - printf("%s -> %s\n", filename, output); - /* Success return */ - result = 1; - } - - else - { - fprintf(stderr, "%s: error writing profile\n", output); - if (remove(output)) - fprintf(stderr, "%s: could not remove file\n", output); - } - } - - else - fprintf(stderr, "%s: failed to open output file\n", output); - - free(output); - } - - else - fprintf(stderr, "%s: OOM allocating string!\n", filename); - - free(profile); - } - - else if (verbose && profile == no_profile) - printf("%s has no profile\n", filename); - } - - else - fprintf(stderr, "%s: could not open file\n", filename); - - return result; -} - -int -main(int argc, char **argv) -{ - int i; - int extracted = 0; - - for (i=1; i -#include -#include /* required for error handling */ - -/* Normally use here to get the installed libpng, but this is done to - * ensure the code picks up the local libpng implementation: - */ -#include "../../png.h" - -#if defined(PNG_READ_SUPPORTED) && defined(PNG_SEQUENTIAL_READ_SUPPORTED) - -/* Return component 'c' of pixel 'x' from the given row. */ -static unsigned int -component(png_const_bytep row, png_uint_32 x, unsigned int c, - unsigned int bit_depth, unsigned int channels) -{ - /* PNG images can be up to 2^31 pixels wide, but this means they can be up to - * 2^37 bits wide (for a 64-bit pixel - the largest possible) and hence 2^34 - * bytes wide. Since the row fitted into memory, however, the following must - * work: - */ - png_uint_32 bit_offset_hi = bit_depth * ((x >> 6) * channels); - png_uint_32 bit_offset_lo = bit_depth * ((x & 0x3f) * channels + c); - - row = (png_const_bytep)(((const png_byte (*)[8])row) + bit_offset_hi); - row += bit_offset_lo >> 3; - bit_offset_lo &= 0x07; - - /* PNG pixels are packed into bytes to put the first pixel in the highest - * bits of the byte and into two bytes for 16-bit values with the high 8 bits - * first, so: - */ - switch (bit_depth) - { - case 1: return (row[0] >> (7-bit_offset_lo)) & 0x01; - case 2: return (row[0] >> (6-bit_offset_lo)) & 0x03; - case 4: return (row[0] >> (4-bit_offset_lo)) & 0x0f; - case 8: return row[0]; - case 16: return (row[0] << 8) + row[1]; - default: - /* This should never happen; it indicates a bug in this program or in - * libpng itself: - */ - fprintf(stderr, "pngpixel: invalid bit depth %u\n", bit_depth); - exit(1); - } -} - -/* Print a pixel from a row returned by libpng; determine the row format, find - * the pixel, and print the relevant information to stdout. - */ -static void -print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row, - png_uint_32 x) -{ - unsigned int bit_depth = png_get_bit_depth(png_ptr, info_ptr); - - switch (png_get_color_type(png_ptr, info_ptr)) - { - case PNG_COLOR_TYPE_GRAY: - printf("GRAY %u\n", component(row, x, 0, bit_depth, 1)); - return; - - /* The palette case is slightly more difficult - the palette and, if - * present, the tRNS ('transparency', though the values are really - * opacity) data must be read to give the full picture: - */ - case PNG_COLOR_TYPE_PALETTE: - { - int index = component(row, x, 0, bit_depth, 1); - png_colorp palette = NULL; - int num_palette = 0; - - if ((png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) & - PNG_INFO_PLTE) && num_palette > 0 && palette != NULL) - { - png_bytep trans_alpha = NULL; - int num_trans = 0; - if ((png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, - NULL) & PNG_INFO_tRNS) && num_trans > 0 && - trans_alpha != NULL) - printf("INDEXED %u = %d %d %d %d\n", index, - palette[index].red, palette[index].green, - palette[index].blue, - index < num_trans ? trans_alpha[index] : 255); - - else /* no transparency */ - printf("INDEXED %u = %d %d %d\n", index, - palette[index].red, palette[index].green, - palette[index].blue); - } - - else - printf("INDEXED %u = invalid index\n", index); - } - return; - - case PNG_COLOR_TYPE_RGB: - printf("RGB %u %u %u\n", component(row, x, 0, bit_depth, 3), - component(row, x, 1, bit_depth, 3), - component(row, x, 2, bit_depth, 3)); - return; - - case PNG_COLOR_TYPE_GRAY_ALPHA: - printf("GRAY+ALPHA %u %u\n", component(row, x, 0, bit_depth, 2), - component(row, x, 1, bit_depth, 2)); - return; - - case PNG_COLOR_TYPE_RGB_ALPHA: - printf("RGBA %u %u %u %u\n", component(row, x, 0, bit_depth, 4), - component(row, x, 1, bit_depth, 4), - component(row, x, 2, bit_depth, 4), - component(row, x, 3, bit_depth, 4)); - return; - - default: - png_error(png_ptr, "pngpixel: invalid color type"); - } -} - -int main(int argc, const char **argv) -{ - /* This program uses the default, based, libpng error handling - * mechanism, therefore any local variable that exists before the call to - * setjmp and is changed after the call to setjmp returns successfully must - * be declared with 'volatile' to ensure that their values don't get - * destroyed by longjmp: - */ - volatile int result = 1/*fail*/; - - if (argc == 4) - { - long x = atol(argv[1]); - long y = atol(argv[2]); - FILE *f = fopen(argv[3], "rb"); - volatile png_bytep row = NULL; - - if (f != NULL) - { - /* libpng requires a callback function for handling errors; this - * callback must not return. The default callback function uses a - * stored style jmp_buf which is held in a png_struct and - * writes error messages to stderr. Creating the png_struct is a - * little tricky; just copy the following code. - */ - png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - NULL, NULL, NULL); - - if (png_ptr != NULL) - { - png_infop info_ptr = png_create_info_struct(png_ptr); - - if (info_ptr != NULL) - { - /* Declare stack variables to hold pointers to locally allocated - * data. - */ - - /* Initialize the error control buffer: */ - if (setjmp(png_jmpbuf(png_ptr)) == 0) - { - png_uint_32 width, height; - int bit_depth, color_type, interlace_method, - compression_method, filter_method; - png_bytep row_tmp; - - /* Now associate the recently opened (FILE*) with the default - * libpng initialization functions. Sometimes libpng is - * compiled without stdio support (it can be difficult to do - * in some environments); in that case you will have to write - * your own read callback to read data from the (FILE*). - */ - png_init_io(png_ptr, f); - - /* And read the first part of the PNG file - the header and - * all the information up to the first pixel. - */ - png_read_info(png_ptr, info_ptr); - - /* This fills in enough information to tell us the width of - * each row in bytes, allocate the appropriate amount of - * space. In this case png_malloc is used - it will not - * return if memory isn't available. - */ - row = png_malloc(png_ptr, png_get_rowbytes(png_ptr, - info_ptr)); - - /* To avoid the overhead of using a volatile auto copy row_tmp - * to a local here - just use row for the png_free below. - */ - row_tmp = row; - - /* All the information we need is in the header is returned by - * png_get_IHDR, if this fails we can now use 'png_error' to - * signal the error and return control to the setjmp above. - */ - if (png_get_IHDR(png_ptr, info_ptr, &width, &height, - &bit_depth, &color_type, &interlace_method, - &compression_method, &filter_method)) - { - int passes, pass; - - /* png_set_interlace_handling returns the number of - * passes required as well as turning on libpng's - * handling, but since we do it ourselves this is - * necessary: - */ - switch (interlace_method) - { - case PNG_INTERLACE_NONE: - passes = 1; - break; - - case PNG_INTERLACE_ADAM7: - passes = PNG_INTERLACE_ADAM7_PASSES; - break; - - default: - png_error(png_ptr, "pngpixel: unknown interlace"); - } - - /* Now read the pixels, pass-by-pass, row-by-row: */ - png_start_read_image(png_ptr); - - for (pass=0; pass -#include -#include -#include - -/* Normally use here to get the installed libpng, but this is done to - * ensure the code picks up the local libpng implementation: - */ -#include "../../png.h" -#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) && \ - defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) - -int main(int argc, const char **argv) -{ - int result = 1; - - if (argc == 3) - { - png_image image; - - /* Only the image structure version number needs to be set. */ - memset(&image, 0, sizeof image); - image.version = PNG_IMAGE_VERSION; - - if (png_image_begin_read_from_file(&image, argv[1])) - { - png_bytep buffer; - - /* Change this to try different formats! If you set a colormap format - * then you must also supply a colormap below. - */ - image.format = PNG_FORMAT_RGBA; - - buffer = malloc(PNG_IMAGE_SIZE(image)); - - if (buffer != NULL) - { - if (png_image_finish_read(&image, NULL/*background*/, buffer, - 0/*row_stride*/, NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP */)) - { - if (png_image_write_to_file(&image, argv[2], - 0/*convert_to_8bit*/, buffer, 0/*row_stride*/, - NULL/*colormap*/)) - result = 0; - - else - fprintf(stderr, "pngtopng: write %s: %s\n", argv[2], - image.message); - } - - else - fprintf(stderr, "pngtopng: read %s: %s\n", argv[1], - image.message); - - free(buffer); - } - - else - { - fprintf(stderr, "pngtopng: out of memory: %lu bytes\n", - (unsigned long)PNG_IMAGE_SIZE(image)); - - /* This is the only place where a 'free' is required; libpng does - * the cleanup on error and success, but in this case we couldn't - * complete the read because of running out of memory and so libpng - * has not got to the point where it can do cleanup. - */ - png_image_free(&image); - } - } - - else - /* Failed to read the first argument: */ - fprintf(stderr, "pngtopng: %s: %s\n", argv[1], image.message); - } - - else - /* Wrong number of arguments */ - fprintf(stderr, "pngtopng: usage: pngtopng input-file output-file\n"); - - return result; -} -#endif /* READ && WRITE */ diff --git a/thirdparty/libpng-1.6.37/contrib/examples/simpleover.c b/thirdparty/libpng-1.6.37/contrib/examples/simpleover.c deleted file mode 100644 index 59dd313..0000000 --- a/thirdparty/libpng-1.6.37/contrib/examples/simpleover.c +++ /dev/null @@ -1,648 +0,0 @@ -/*- simpleover - * - * COPYRIGHT: Written by John Cunningham Bowler, 2015. - * To the extent possible under law, the author has waived all copyright and - * related or neighboring rights to this work. This work is published from: - * United States. - * - * Read several PNG files, which should have an alpha channel or transparency - * information, and composite them together to produce one or more 16-bit linear - * RGBA intermediates. This involves doing the correct 'over' composition to - * combine the alpha channels and corresponding data. - * - * Finally read an output (background) PNG using the 24-bit RGB format (the - * PNG will be composited on green (#00ff00) by default if it has an alpha - * channel), and apply the intermediate image generated above to specified - * locations in the image. - * - * The command line has the general format: - * - * simpleover [output.png] - * {--sprite=width,height,name {[--at=x,y] {sprite.png}}} - * {--add=name {x,y}} - * - * The --sprite and --add options may occur multiple times. They are executed - * in order. --add may refer to any sprite already read. - * - * This code is intended to show how to composite multiple images together - * correctly. Apart from the libpng Simplified API the only work done in here - * is to combine multiple input PNG images into a single sprite; this involves - * a Porter-Duff 'over' operation and the input PNG images may, as a result, - * be regarded as being layered one on top of the other with the first (leftmost - * on the command line) being at the bottom and the last on the top. - */ -#include -#include -#include -#include -#include - -/* Normally use here to get the installed libpng, but this is done to - * ensure the code picks up the local libpng implementation, so long as this - * file is linked against a sufficiently recent libpng (1.6+) it is ok to - * change this to : - */ -#include "../../png.h" - -#ifdef PNG_SIMPLIFIED_READ_SUPPORTED - -#define sprite_name_chars 15 -struct sprite { - FILE *file; - png_uint_16p buffer; - unsigned int width; - unsigned int height; - char name[sprite_name_chars+1]; -}; - -#if 0 /* div by 65535 test program */ -#include -#include - -int main(void) { - double err = 0; - unsigned int xerr = 0; - unsigned int r = 32769; - { - unsigned int x = 0; - - do { - unsigned int t = x + (x >> 16) /*+ (x >> 31)*/ + r; - double v = x, errtest; - - if (t < x) { - fprintf(stderr, "overflow: %u+%u -> %u\n", x, r, t); - return 1; - } - - v /= 65535; - errtest = v; - t >>= 16; - errtest -= t; - - if (errtest > err) { - err = errtest; - xerr = x; - - if (errtest >= .5) { - fprintf(stderr, "error: %u/65535 = %f, not %u, error %f\n", - x, v, t, errtest); - return 0; - } - } - } while (++x <= 65535U*65535U); - } - - printf("error %f @ %u\n", err, xerr); - - return 0; -} -#endif /* div by 65535 test program */ - -static void -sprite_op(const struct sprite *sprite, int x_offset, int y_offset, - png_imagep image, const png_uint_16 *buffer) -{ - /* This is where the Porter-Duff 'Over' operator is evaluated; change this - * code to change the operator (this could be parameterized). Any other - * image processing operation could be used here. - */ - - - /* Check for an x or y offset that pushes any part of the image beyond the - * right or bottom of the sprite: - */ - if ((y_offset < 0 || (unsigned)/*SAFE*/y_offset < sprite->height) && - (x_offset < 0 || (unsigned)/*SAFE*/x_offset < sprite->width)) - { - unsigned int y = 0; - - if (y_offset < 0) - y = -y_offset; /* Skip to first visible row */ - - do - { - unsigned int x = 0; - - if (x_offset < 0) - x = -x_offset; - - do - { - /* In and out are RGBA values, so: */ - const png_uint_16 *in_pixel = buffer + (y * image->width + x)*4; - png_uint_32 in_alpha = in_pixel[3]; - - /* This is the optimized Porter-Duff 'Over' operation, when the - * input alpha is 0 the output is not changed. - */ - if (in_alpha > 0) - { - png_uint_16 *out_pixel = sprite->buffer + - ((y+y_offset) * sprite->width + (x+x_offset))*4; - - /* This is the weight to apply to the output: */ - in_alpha = 65535-in_alpha; - - if (in_alpha > 0) - { - /* The input must be composed onto the output. This means - * multiplying the current output pixel value by the inverse - * of the input alpha (1-alpha). A division is required but - * it is by the constant 65535. Approximate this as: - * - * (x + (x >> 16) + 32769) >> 16; - * - * This is exact (and does not overflow) for all values of - * x in the range 0..65535*65535. (Note that the calculation - * produces the closest integer; the maximum error is <0.5). - */ - png_uint_32 tmp; - -# define compose(c)\ - tmp = out_pixel[c] * in_alpha;\ - tmp = (tmp + (tmp >> 16) + 32769) >> 16;\ - out_pixel[c] = tmp + in_pixel[c] - - /* The following is very vectorizable... */ - compose(0); - compose(1); - compose(2); - compose(3); - } - - else - out_pixel[0] = in_pixel[0], - out_pixel[1] = in_pixel[1], - out_pixel[2] = in_pixel[2], - out_pixel[3] = in_pixel[3]; - } - } - while (++x < image->width); - } - while (++y < image->height); - } -} - -static int -create_sprite(struct sprite *sprite, int *argc, const char ***argv) -{ - /* Read the arguments and create this sprite. The sprite buffer has already - * been allocated. This reads the input PNGs one by one in linear format, - * composes them onto the sprite buffer (the code in the function above) - * then saves the result, converting it on the fly to PNG RGBA 8-bit format. - */ - while (*argc > 0) - { - char tombstone; - int x = 0, y = 0; - - if ((*argv)[0][0] == '-' && (*argv)[0][1] == '-') - { - /* The only supported option is --at. */ - if (sscanf((*argv)[0], "--at=%d,%d%c", &x, &y, &tombstone) != 2) - break; /* success; caller will parse this option */ - - ++*argv, --*argc; - } - - else - { - /* The argument has to be a file name */ - png_image image; - - image.version = PNG_IMAGE_VERSION; - image.opaque = NULL; - - if (png_image_begin_read_from_file(&image, (*argv)[0])) - { - png_uint_16p buffer; - - image.format = PNG_FORMAT_LINEAR_RGB_ALPHA; - - buffer = malloc(PNG_IMAGE_SIZE(image)); - - if (buffer != NULL) - { - if (png_image_finish_read(&image, NULL/*background*/, buffer, - 0/*row_stride*/, - NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP*/)) - { - /* This is the place where the Porter-Duff 'Over' operator - * needs to be done by this code. In fact, any image - * processing required can be done here; the data is in - * the correct format (linear, 16-bit) and source and - * destination are in memory. - */ - sprite_op(sprite, x, y, &image, buffer); - free(buffer); - ++*argv, --*argc; - /* And continue to the next argument */ - continue; - } - - else - { - free(buffer); - fprintf(stderr, "simpleover: read %s: %s\n", (*argv)[0], - image.message); - } - } - - else - { - fprintf(stderr, "simpleover: out of memory: %lu bytes\n", - (unsigned long)PNG_IMAGE_SIZE(image)); - - /* png_image_free must be called if we abort the Simplified API - * read because of a problem detected in this code. If problems - * are detected in the Simplified API it cleans up itself. - */ - png_image_free(&image); - } - } - - else - { - /* Failed to read the first argument: */ - fprintf(stderr, "simpleover: %s: %s\n", (*argv)[0], image.message); - } - - return 0; /* failure */ - } - } - - /* All the sprite operations have completed successfully. Save the RGBA - * buffer as a PNG using the simplified write API. - */ - sprite->file = tmpfile(); - - if (sprite->file != NULL) - { - png_image save; - - memset(&save, 0, sizeof save); - save.version = PNG_IMAGE_VERSION; - save.opaque = NULL; - save.width = sprite->width; - save.height = sprite->height; - save.format = PNG_FORMAT_LINEAR_RGB_ALPHA; - save.flags = PNG_IMAGE_FLAG_FAST; - save.colormap_entries = 0; - - if (png_image_write_to_stdio(&save, sprite->file, 1/*convert_to_8_bit*/, - sprite->buffer, 0/*row_stride*/, NULL/*colormap*/)) - { - /* Success; the buffer is no longer needed: */ - free(sprite->buffer); - sprite->buffer = NULL; - return 1; /* ok */ - } - - else - fprintf(stderr, "simpleover: write sprite %s: %s\n", sprite->name, - save.message); - } - - else - fprintf(stderr, "simpleover: sprite %s: could not allocate tmpfile: %s\n", - sprite->name, strerror(errno)); - - return 0; /* fail */ -} - -static int -add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite, - int *argc, const char ***argv) -{ - /* Given a --add argument naming this sprite, perform the operations listed - * in the following arguments. The arguments are expected to have the form - * (x,y), which is just an offset at which to add the sprite to the - * output. - */ - while (*argc > 0) - { - char tombstone; - int x, y; - - if ((*argv)[0][0] == '-' && (*argv)[0][1] == '-') - return 1; /* success */ - - if (sscanf((*argv)[0], "%d,%d%c", &x, &y, &tombstone) == 2) - { - /* Now add the new image into the sprite data, but only if it - * will fit. - */ - if (x < 0 || y < 0 || - (unsigned)/*SAFE*/x >= output->width || - (unsigned)/*SAFE*/y >= output->height || - sprite->width > output->width-x || - sprite->height > output->height-y) - { - fprintf(stderr, "simpleover: sprite %s @ (%d,%d) outside image\n", - sprite->name, x, y); - /* Could just skip this, but for the moment it is an error */ - return 0; /* error */ - } - - else - { - /* Since we know the sprite fits we can just read it into the - * output using the simplified API. - */ - png_image in; - - in.version = PNG_IMAGE_VERSION; - rewind(sprite->file); - - if (png_image_begin_read_from_stdio(&in, sprite->file)) - { - in.format = PNG_FORMAT_RGB; /* force compose */ - - if (png_image_finish_read(&in, NULL/*background*/, - out_buf + (y*output->width + x)*3/*RGB*/, - output->width*3/*row_stride*/, - NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP*/)) - { - ++*argv, --*argc; - continue; - } - } - - /* The read failed: */ - fprintf(stderr, "simpleover: add sprite %s: %s\n", sprite->name, - in.message); - return 0; /* error */ - } - } - - else - { - fprintf(stderr, "simpleover: --add='%s': invalid position %s\n", - sprite->name, (*argv)[0]); - return 0; /* error */ - } - } - - return 1; /* ok */ -} - -static int -simpleover_process(png_imagep output, png_bytep out_buf, int argc, - const char **argv) -{ - int result = 1; /* success */ -# define csprites 10/*limit*/ -# define str(a) #a - int nsprites = 0; - struct sprite sprites[csprites]; - - while (argc > 0) - { - result = 0; /* fail */ - - if (strncmp(argv[0], "--sprite=", 9) == 0) - { - char tombstone; - - if (nsprites < csprites) - { - int n; - - sprites[nsprites].width = sprites[nsprites].height = 0; - sprites[nsprites].name[0] = 0; - - n = sscanf(argv[0], "--sprite=%u,%u,%" str(sprite_name_chars) "s%c", - &sprites[nsprites].width, &sprites[nsprites].height, - sprites[nsprites].name, &tombstone); - - if ((n == 2 || n == 3) && - sprites[nsprites].width > 0 && sprites[nsprites].height > 0) - { - size_t buf_size, tmp; - - /* Default a name if not given. */ - if (sprites[nsprites].name[0] == 0) - sprintf(sprites[nsprites].name, "sprite-%d", nsprites+1); - - /* Allocate a buffer for the sprite and calculate the buffer - * size: - */ - buf_size = sizeof (png_uint_16 [4]); - buf_size *= sprites[nsprites].width; - buf_size *= sprites[nsprites].height; - - /* This can overflow a (size_t); check for this: */ - tmp = buf_size; - tmp /= sprites[nsprites].width; - tmp /= sprites[nsprites].height; - - if (tmp == sizeof (png_uint_16 [4])) - { - sprites[nsprites].buffer = malloc(buf_size); - /* This buffer must be initialized to transparent: */ - memset(sprites[nsprites].buffer, 0, buf_size); - - if (sprites[nsprites].buffer != NULL) - { - sprites[nsprites].file = NULL; - ++argv, --argc; - - if (create_sprite(sprites+nsprites++, &argc, &argv)) - { - result = 1; /* still ok */ - continue; - } - - break; /* error */ - } - } - - /* Overflow, or OOM */ - fprintf(stderr, "simpleover: %s: sprite too large\n", argv[0]); - break; - } - - else - { - fprintf(stderr, "simpleover: %s: invalid sprite (%u,%u)\n", - argv[0], sprites[nsprites].width, sprites[nsprites].height); - break; - } - } - - else - { - fprintf(stderr, "simpleover: %s: too many sprites\n", argv[0]); - break; - } - } - - else if (strncmp(argv[0], "--add=", 6) == 0) - { - const char *name = argv[0]+6; - int isprite = nsprites; - - ++argv, --argc; - - while (--isprite >= 0) - { - if (strcmp(sprites[isprite].name, name) == 0) - { - if (!add_sprite(output, out_buf, sprites+isprite, &argc, &argv)) - goto out; /* error in add_sprite */ - - break; - } - } - - if (isprite < 0) /* sprite not found */ - { - fprintf(stderr, "simpleover: --add='%s': sprite not found\n", name); - break; - } - } - - else - { - fprintf(stderr, "simpleover: %s: unrecognized operation\n", argv[0]); - break; - } - - result = 1; /* ok */ - } - - /* Clean up the cache of sprites: */ -out: - while (--nsprites >= 0) - { - if (sprites[nsprites].buffer != NULL) - free(sprites[nsprites].buffer); - - if (sprites[nsprites].file != NULL) - (void)fclose(sprites[nsprites].file); - } - - return result; -} - -int main(int argc, const char **argv) -{ - int result = 1; /* default to fail */ - - if (argc >= 2) - { - int argi = 2; - const char *output = NULL; - png_image image; - - if (argc > 2 && argv[2][0] != '-'/*an operation*/) - { - output = argv[2]; - argi = 3; - } - - image.version = PNG_IMAGE_VERSION; - image.opaque = NULL; - - if (png_image_begin_read_from_file(&image, argv[1])) - { - png_bytep buffer; - - image.format = PNG_FORMAT_RGB; /* 24-bit RGB */ - - buffer = malloc(PNG_IMAGE_SIZE(image)); - - if (buffer != NULL) - { - png_color background = {0, 0xff, 0}; /* fully saturated green */ - - if (png_image_finish_read(&image, &background, buffer, - 0/*row_stride*/, NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP */)) - { - /* At this point png_image_finish_read has cleaned up the - * allocated data in png_image, and only the buffer needs to be - * freed. - * - * Perform the remaining operations: - */ - if (simpleover_process(&image, buffer, argc-argi, argv+argi)) - { - /* Write the output: */ - if ((output != NULL && - png_image_write_to_file(&image, output, - 0/*convert_to_8bit*/, buffer, 0/*row_stride*/, - NULL/*colormap*/)) || - (output == NULL && - png_image_write_to_stdio(&image, stdout, - 0/*convert_to_8bit*/, buffer, 0/*row_stride*/, - NULL/*colormap*/))) - result = 0; - - else - fprintf(stderr, "simpleover: write %s: %s\n", - output == NULL ? "stdout" : output, image.message); - } - - /* else simpleover_process writes an error message */ - } - - else - fprintf(stderr, "simpleover: read %s: %s\n", argv[1], - image.message); - - free(buffer); - } - - else - { - fprintf(stderr, "simpleover: out of memory: %lu bytes\n", - (unsigned long)PNG_IMAGE_SIZE(image)); - - /* This is the only place where a 'free' is required; libpng does - * the cleanup on error and success, but in this case we couldn't - * complete the read because of running out of memory. - */ - png_image_free(&image); - } - } - - else - { - /* Failed to read the first argument: */ - fprintf(stderr, "simpleover: %s: %s\n", argv[1], image.message); - } - } - - else - { - /* Usage message */ - fprintf(stderr, - "simpleover: usage: simpleover background.png [output.png]\n" - " Output 'background.png' as a 24-bit RGB PNG file in 'output.png'\n" - " or, if not given, stdout. 'background.png' will be composited\n" - " on fully saturated green.\n" - "\n" - " Optionally, before output, process additional PNG files:\n" - "\n" - " --sprite=width,height,name {[--at=x,y] {sprite.png}}\n" - " Produce a transparent sprite of size (width,height) and with\n" - " name 'name'.\n" - " For each sprite.png composite it using a Porter-Duff 'Over'\n" - " operation at offset (x,y) in the sprite (defaulting to (0,0)).\n" - " Input PNGs will be truncated to the area of the sprite.\n" - "\n" - " --add='name' {x,y}\n" - " Optionally, before output, composite a sprite, 'name', which\n" - " must have been previously produced using --sprite, at each\n" - " offset (x,y) in the output image. Each sprite must fit\n" - " completely within the output image.\n" - "\n" - " PNG files are processed in the order they occur on the command\n" - " line and thus the first PNG processed appears as the bottommost\n" - " in the output image.\n"); - } - - return result; -} -#endif /* SIMPLIFIED_READ */ diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/COPYING b/thirdparty/libpng-1.6.37/contrib/gregbook/COPYING deleted file mode 100644 index a3e9774..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/LICENSE b/thirdparty/libpng-1.6.37/contrib/gregbook/LICENSE deleted file mode 100644 index d956717..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/LICENSE +++ /dev/null @@ -1,50 +0,0 @@ - --------------------------------------------------------------------------- - - Copyright (c) 1998-2008 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - --------------------------------------------------------------------------- diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.mingw32 b/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.mingw32 deleted file mode 100644 index 3a3ff60..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.mingw32 +++ /dev/null @@ -1,131 +0,0 @@ -# Sample makefile for rpng-win / rpng2-win / wpng using mingw32-gcc and make. -# Greg Roelofs -# Last modified: 2 June 2007 -# -# The programs built by this makefile are described in the book, -# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and -# Associates, 1999). Go buy a copy, eh? Well, OK, it's not -# generally for sale anymore, but it's the thought that counts, -# right? (Hint: http://www.libpng.org/pub/png/book/ ) -# -# Invoke this makefile from a DOS-prompt window via: -# -# make -f Makefile.mingw32 -# -# This makefile assumes libpng and zlib have already been built or downloaded -# and are in subdirectories at the same level as the current subdirectory -# (as indicated by the PNGDIR and ZDIR macros below). It makes no assumptions -# at all about the mingw32 installation tree (W32DIR). Edit as appropriate. -# -# Note that the names of the dynamic and static libpng and zlib libraries -# used below may change in later releases of the libraries. This makefile -# builds both statically and dynamically linked executables by default. -# (You need only one set, but for testing it can be handy to have both.) - - -# macros -------------------------------------------------------------------- - -#PNGDIR = ../..# for libpng-x.y.z/contrib/gregbook builds -PNGDIR = ../libpng-win32 -PNGINC = -I$(PNGDIR) -PNGLIBd = $(PNGDIR)/libpng.dll.a # dynamically linked -PNGLIBs = $(PNGDIR)/libpng.a # statically linked, local libpng - -#ZDIR = ../../../zlib-win32# for libpng-x.y.z/contrib/gregbook builds -ZDIR = ../zlib-win32 -ZINC = -I$(ZDIR) -ZLIBd = $(ZDIR)/libzdll.a -ZLIBs = $(ZDIR)/libz.a - -# change this to be the path where mingw32 installs its stuff: -W32DIR = -#W32DIR = /usr/local/cross-tools/i386-mingw32msvc -W32INC = -I$(W32DIR)/include -W32LIB = $(W32DIR)/lib/libuser32.a $(W32DIR)/lib/libgdi32.a - -CC = gcc -#CC = i386-mingw32msvc-gcc # e.g., Linux -> Win32 cross-compilation -LD = $(CC) -RM = rm -f -CPPFLAGS = $(INCS) -CFLAGS = -O -Wall $(MINGW_CCFLAGS) -# [note that -Wall is a gcc-specific compilation flag ("most warnings on")] -# [-ansi, -pedantic and -W can also be used] -LDFLAGS = $(MINGW_LDFLAGS) -O = .o -E = .exe - -INCS = $(PNGINC) $(ZINC) $(W32INC) -RLIBSd = $(PNGLIBd) $(ZLIBd) $(W32LIB) -lm -RLIBSs = $(PNGLIBs) $(ZLIBs) $(W32LIB) -lm -WLIBSd = $(PNGLIBd) $(ZLIBd) -WLIBSs = $(PNGLIBs) $(ZLIBs) - -RPNG = rpng-win -RPNG2 = rpng2-win -WPNG = wpng - -ROBJSd = $(RPNG)$(O) readpng.pic$(O) -ROBJS2d = $(RPNG2)$(O) readpng2.pic$(O) -WOBJSd = $(WPNG)$(O) writepng.pic$(O) - -RPNGs = $(RPNG)-static -RPNG2s = $(RPNG2)-static -WPNGs = $(WPNG)-static - -ROBJSs = $(RPNG)$(O) readpng$(O) -ROBJS2s = $(RPNG2)$(O) readpng2$(O) -WOBJSs = $(WPNG)$(O) writepng$(O) - -STATIC_EXES = $(RPNGs)$(E) $(RPNG2s)$(E) $(WPNGs)$(E) -DYNAMIC_EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) - -EXES = $(STATIC_EXES) $(DYNAMIC_EXES) - - -# implicit make rules ------------------------------------------------------- - -.c$(O): - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< - -%.pic$(O): %.c - $(CC) -c $(CPPFLAGS) $(CFLAGS) -DPNG_BUILD_DLL -o $@ $< - - -# dependencies -------------------------------------------------------------- - -all: $(EXES) - -$(RPNGs)$(E): $(ROBJSs) - $(LD) $(LDFLAGS) -o $@ $(ROBJSs) $(RLIBSs) - -$(RPNG)$(E): $(ROBJSd) - $(LD) $(LDFLAGS) -o $@ $(ROBJSd) $(RLIBSd) - -$(RPNG2s)$(E): $(ROBJS2s) - $(LD) $(LDFLAGS) -o $@ $(ROBJS2s) $(RLIBSs) - -$(RPNG2)$(E): $(ROBJS2d) - $(LD) $(LDFLAGS) -o $@ $(ROBJS2d) $(RLIBSd) - -$(WPNGs)$(E): $(WOBJSs) - $(LD) $(LDFLAGS) -o $@ $(WOBJSs) $(WLIBSs) - -$(WPNG)$(E): $(WOBJSd) - $(LD) $(LDFLAGS) -o $@ $(WOBJSd) $(WLIBSd) - -$(RPNG)$(O): $(RPNG).c readpng.h -$(RPNG2)$(O): $(RPNG2).c readpng2.h -$(WPNG)$(O): $(WPNG).c writepng.h - -readpng$(O) readpng.pic$(O): readpng.c readpng.h -readpng2$(O) readpng2.pic$(O): readpng2.c readpng2.h -writepng$(O) writepng.pic$(O): writepng.c writepng.h - - -# maintenance --------------------------------------------------------------- - -clean: - $(RM) $(EXES) - $(RM) $(ROBJSs) $(ROBJS2s) $(WOBJSs) - $(RM) $(ROBJSd) $(ROBJS2d) $(WOBJSd) diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.sgi b/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.sgi deleted file mode 100644 index 94d61b4..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.sgi +++ /dev/null @@ -1,105 +0,0 @@ -# Sample makefile for rpng-x / rpng2-x / wpng for SGI using cc and make. -# Greg Roelofs -# Last modified: 7 March 2002 -# -# The programs built by this makefile are described in the book, -# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and -# Associates, 1999). Go buy a copy, eh? Buy some for friends -# and family, too. (Not that this is a blatant plug or anything.) -# -# Invoke this makefile from a shell prompt in the usual way; for example: -# -# make -f Makefile.sgi -# -# This makefile assumes libpng and zlib have already been built or downloaded -# and are both installed in /usr/local/{include,lib} (as indicated by the -# PNG* and Z* macros below). Edit as appropriate--choose only ONE each of -# the PNGINC, PNGLIB, ZINC and ZLIB lines. -# -# This makefile builds dynamically linked executables (against libpng and zlib, -# that is), but that can be changed by uncommenting the appropriate PNGLIB and -# ZLIB lines. - - -# macros -------------------------------------------------------------------- - -PNGINC = -I/usr/local/include/libpng16 -PNGLIB = -L/usr/local/lib -lpng16 # dynamically linked against libpng -#PNGLIB = /usr/local/lib/libpng16.a # statically linked against libpng -# or: -#PNGINC = -I../.. -#PNGLIB = -L../.. -lpng -#PNGLIB = ../../libpng.a - -ZINC = -I/usr/local/include -ZLIB = -L/usr/local/lib -lz # dynamically linked against zlib -#ZLIB = /usr/local/lib/libz.a # statically linked against zlib -#ZINC = -I../zlib -#ZLIB = -L../zlib -lz -#ZLIB = ../../../zlib/libz.a - -XINC = -I/usr/include/X11 # old-style, stock X distributions -XLIB = -L/usr/lib/X11 -lX11 -#XINC = -I/usr/openwin/include # Sun workstations (OpenWindows) -#XLIB = -L/usr/openwin/lib -lX11 -#XINC = -I/usr/X11R6/include # new X distributions (XFree86, etc.) -#XLIB = -L/usr/X11R6/lib -lX11 - -INCS = $(PNGINC) $(ZINC) $(XINC) -RLIBS = $(PNGLIB) $(ZLIB) $(XLIB) -lm -WLIBS = $(PNGLIB) $(ZLIB) - -CC = cc -LD = cc -RM = rm -f -# ABI must be the same as that used to build libpng. -ABI = -CPPFLAGS = -CFLAGS = $(ABI) -O -fullwarn $(INCS) -LDFLAGS = $(ABI) -O = .o -E = - -RPNG = rpng-x -RPNG2 = rpng2-x -WPNG = wpng - -ROBJS = $(RPNG)$(O) readpng$(O) -ROBJS2 = $(RPNG2)$(O) readpng2$(O) -WOBJS = $(WPNG)$(O) writepng$(O) - -EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) - - -# implicit make rules ------------------------------------------------------- - -.c$(O): - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< - - -# dependencies -------------------------------------------------------------- - -all: $(EXES) - -$(RPNG)$(E): $(ROBJS) - $(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBS) - -$(RPNG2)$(E): $(ROBJS2) - $(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBS) - -$(WPNG)$(E): $(WOBJS) - $(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBS) - -$(RPNG)$(O): $(RPNG).c readpng.h -$(RPNG2)$(O): $(RPNG2).c readpng2.h -$(WPNG)$(O): $(WPNG).c writepng.h - -readpng$(O): readpng.c readpng.h -readpng2$(O): readpng2.c readpng2.h -writepng$(O): writepng.c writepng.h - - -# maintenance --------------------------------------------------------------- - -clean: - $(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS) diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.unx b/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.unx deleted file mode 100644 index 1a73e03..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.unx +++ /dev/null @@ -1,134 +0,0 @@ -# Sample makefile for rpng-x / rpng2-x / wpng using gcc and make. -# Greg Roelofs -# Last modified: 2 June 2007 -# -# The programs built by this makefile are described in the book, -# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and -# Associates, 1999). Go buy a copy, eh? Well, OK, it's not -# generally for sale anymore, but it's the thought that counts, -# right? (Hint: http://www.libpng.org/pub/png/book/ ) -# -# Invoke this makefile from a shell prompt in the usual way; for example: -# -# make -f Makefile.unx -# -# This makefile assumes libpng and zlib have already been built or downloaded -# and are installed in /usr/local/{include,lib} or as otherwise indicated by -# the PNG* and Z* macros below. Edit as appropriate--choose only ONE each of -# the PNGINC, PNGLIBd, PNGLIBs, ZINC, ZLIBd and ZLIBs lines. -# -# This makefile builds both dynamically and statically linked executables -# (against libpng and zlib, that is), but that can be changed by modifying -# the "EXES =" line. (You need only one set, but for testing it can be handy -# to have both.) - - -# macros -------------------------------------------------------------------- - -#PNGDIR = /usr/local/lib -#PNGINC = -I/usr/local/include/libpng16 -#PNGLIBd = -L$(PNGDIR) -lpng16 # dynamically linked, installed libpng -#PNGLIBs = $(PNGDIR)/libpng16.a # statically linked, installed libpng -# or: -PNGDIR = ../..# this one is for libpng-x.y.z/contrib/gregbook builds -#PNGDIR = ../libpng -PNGINC = -I$(PNGDIR) -PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng16 # dynamically linked -PNGLIBs = $(PNGDIR)/libpng.a # statically linked, local libpng - -ZDIR = /usr/local/lib -#ZDIR = /usr/lib64 -ZINC = -I/usr/local/include -ZLIBd = -L$(ZDIR) -lz # dynamically linked against zlib -ZLIBs = $(ZDIR)/libz.a # statically linked against zlib -# or: -#ZDIR = ../zlib -#ZINC = -I$(ZDIR) -#ZLIBd = -Wl,-rpath,$(ZDIR) -L$(ZDIR) -lz # -rpath allows in-place testing -#ZLIBs = $(ZDIR)/libz.a - -#XINC = -I/usr/include # old-style, stock X distributions -#XLIB = -L/usr/lib/X11 -lX11 # (including SGI IRIX) -#XINC = -I/usr/openwin/include # Sun workstations (OpenWindows) -#XLIB = -L/usr/openwin/lib -lX11 -XINC = -I/usr/X11R6/include # new X distributions (X.org, etc.) -XLIB = -L/usr/X11R6/lib -lX11 -#XLIB = -L/usr/X11R6/lib64 -lX11 # e.g., Red Hat on AMD64 - -INCS = $(PNGINC) $(ZINC) $(XINC) -RLIBSd = $(PNGLIBd) $(ZLIBd) $(XLIB) -lm -RLIBSs = $(PNGLIBs) $(ZLIBs) $(XLIB) -lm -WLIBSd = $(PNGLIBd) $(ZLIBd) -lm -WLIBSs = $(PNGLIBs) $(ZLIBs) -lm - -CC = gcc -LD = gcc -RM = rm -f -CPPFLAGS = $(INCS) -DFEATURE_LOOP -CFLAGS = -O -Wall -#CFLAGS = -O -W -Wall -Wextra -pedantic -ansi -# [note that -Wall is a gcc-specific compilation flag ("most warnings on")] -# [-ansi, -pedantic, -Wextra, and -W can also be used] -LDFLAGS = -O = .o -E = - -RPNG = rpng-x -RPNG2 = rpng2-x -WPNG = wpng - -RPNGs = $(RPNG)-static -RPNG2s = $(RPNG2)-static -WPNGs = $(WPNG)-static - -ROBJS = $(RPNG)$(O) readpng$(O) -ROBJS2 = $(RPNG2)$(O) readpng2$(O) -WOBJS = $(WPNG)$(O) writepng$(O) - -STATIC_EXES = $(RPNGs)$(E) $(RPNG2s)$(E) $(WPNGs)$(E) -DYNAMIC_EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) - -EXES = $(STATIC_EXES) $(DYNAMIC_EXES) - - -# implicit make rules ------------------------------------------------------- - -.c$(O): - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< - - -# dependencies -------------------------------------------------------------- - -all: $(EXES) - -$(RPNGs)$(E): $(ROBJS) - $(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBSs) - -$(RPNG)$(E): $(ROBJS) - $(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBSd) - -$(RPNG2s)$(E): $(ROBJS2) - $(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBSs) - -$(RPNG2)$(E): $(ROBJS2) - $(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBSd) - -$(WPNGs)$(E): $(WOBJS) - $(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBSs) - -$(WPNG)$(E): $(WOBJS) - $(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBSd) - -$(RPNG)$(O): $(RPNG).c readpng.h -$(RPNG2)$(O): $(RPNG2).c readpng2.h -$(WPNG)$(O): $(WPNG).c writepng.h - -readpng$(O): readpng.c readpng.h -readpng2$(O): readpng2.c readpng2.h -writepng$(O): writepng.c writepng.h - - -# maintenance --------------------------------------------------------------- - -clean: - $(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS) diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.w32 b/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.w32 deleted file mode 100644 index ab7dcf7..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/Makefile.w32 +++ /dev/null @@ -1,114 +0,0 @@ -# Sample makefile for rpng-win / rpng2-win / wpng using MSVC and NMAKE. -# Greg Roelofs -# Last modified: 2 June 2007 -# -# The programs built by this makefile are described in the book, -# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and -# Associates, 1999). Go buy a copy, eh? Well, OK, it's not -# generally for sale anymore, but it's the thought that counts, -# right? (Hint: http://www.libpng.org/pub/png/book/ ) -# -# Invoke this makefile from a DOS prompt window via: -# -# %devstudio%\vc\bin\vcvars32.bat -# nmake -nologo -f Makefile.w32 -# -# where %devstudio% is the installation directory for MSVC / DevStudio. If -# you get "environment out of space" errors, create a desktop shortcut with -# "c:\windows\command.com /e:4096" as the program command line and set the -# working directory to this directory. Then double-click to open the new -# DOS-prompt window with a bigger environment and retry the commands above. -# -# This makefile assumes libpng and zlib have already been built or downloaded -# and are in subdirectories at the same level as the current subdirectory -# (as indicated by the PNGPATH and ZPATH macros below). Edit as appropriate. -# -# Note that the names of the dynamic and static libpng and zlib libraries -# used below may change in later releases of the libraries. This makefile -# builds statically linked executables, but that can be changed by uncom- -# menting the appropriate PNGLIB and ZLIB lines. - -!include - - -# macros -------------------------------------------------------------------- - -PNGPATH = ../libpng -PNGINC = -I$(PNGPATH) -#PNGLIB = $(PNGPATH)/pngdll.lib -PNGLIB = $(PNGPATH)/libpng.lib - -ZPATH = ../zlib -ZINC = -I$(ZPATH) -#ZLIB = $(ZPATH)/zlibdll.lib -ZLIB = $(ZPATH)/zlibstat.lib - -WINLIBS = -defaultlib:user32.lib gdi32.lib -# ["real" apps may also need comctl32.lib, comdlg32.lib, winmm.lib, etc.] - -INCS = $(PNGINC) $(ZINC) -RLIBS = $(PNGLIB) $(ZLIB) $(WINLIBS) -WLIBS = $(PNGLIB) $(ZLIB) - -CC = cl -LD = link -RM = del -CPPFLAGS = $(INCS) -CFLAGS = -nologo -O -W3 $(cvars) -# [note that -W3 is an MSVC-specific compilation flag ("all warnings on")] -# [see %devstudio%\vc\include\win32.mak for cvars macro definition] -O = .obj -E = .exe - -RLDFLAGS = -nologo -subsystem:windows -WLDFLAGS = -nologo - -RPNG = rpng-win -RPNG2 = rpng2-win -WPNG = wpng - -ROBJS = $(RPNG)$(O) readpng$(O) -ROBJS2 = $(RPNG2)$(O) readpng2$(O) -WOBJS = $(WPNG)$(O) writepng$(O) - -EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) - - -# implicit make rules ------------------------------------------------------- - -.c$(O): - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< - - -# dependencies -------------------------------------------------------------- - -all: $(EXES) - -$(RPNG)$(E): $(ROBJS) - $(LD) $(RLDFLAGS) -out:$@ $(ROBJS) $(RLIBS) - -$(RPNG2)$(E): $(ROBJS2) - $(LD) $(RLDFLAGS) -out:$@ $(ROBJS2) $(RLIBS) - -$(WPNG)$(E): $(WOBJS) - $(LD) $(WLDFLAGS) -out:$@ $(WOBJS) $(WLIBS) - -$(RPNG)$(O): $(RPNG).c readpng.h -$(RPNG2)$(O): $(RPNG2).c readpng2.h -$(WPNG)$(O): $(WPNG).c writepng.h - -readpng$(O): readpng.c readpng.h -readpng2$(O): readpng2.c readpng2.h -writepng$(O): writepng.c writepng.h - - -# maintenance --------------------------------------------------------------- - -clean: -# ideally we could just do this: -# $(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS) -# ...but the Windows "DEL" command is none too bright, so: - $(RM) r*$(E) - $(RM) w*$(E) - $(RM) r*$(O) - $(RM) w*$(O) diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/README b/thirdparty/libpng-1.6.37/contrib/gregbook/README deleted file mode 100644 index 90e28f7..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/README +++ /dev/null @@ -1,186 +0,0 @@ - =========================== - PNG: The Definitive Guide - =========================== - - Source Code - -Chapters 13, 14 and 15 of "PNG: The Definitive Guide" discuss three free, -cross-platform demo programs that show how to use the libpng reference -library: rpng, rpng2 and wpng. rpng and rpng2 are viewers; the first is -a very simple example that that shows how a standard file-viewer might use -libpng, while the second is designed to process streaming data and shows -how a web browser might be written. wpng is a simple command-line program -that reads binary PGM and PPM files (the ``raw'' grayscale and RGB subsets -of PBMPLUS/NetPBM) and converts them to PNG. - -The source code for all three demo programs currently compiles under -Unix, OpenVMS, and 32-bit Windows. (Special thanks to Martin Zinser, -zinser at decus.de, for making the necessary changes for OpenVMS and for -providing an appropriate build script.) Build instructions can be found -below. - -Files: - - README this file - LICENSE terms of distribution and reuse (BSD-like or GNU GPL) - COPYING GNU General Public License (GPL) - - Makefile.unx Unix makefile - Makefile.w32 Windows (MSVC) makefile - makevms.com OpenVMS build script - - rpng-win.c Windows front end for the basic viewer - rpng-x.c X Window System (Unix, OpenVMS) front end - readpng.c generic back end for the basic viewer - readpng.h header file for the basic viewer - - rpng2-win.c Windows front end for the progressive viewer - rpng2-x.c X front end for the progressive viewer - readpng2.c generic back end for the progressive viewer - readpng2.h header file for the progressive viewer - - wpng.c generic (text) front end for the converter - writepng.c generic back end for the converter - writepng.h header file for the converter - - toucan.png transparent PNG for testing (by Stefan Schneider) - -Note that, although the programs are designed to be functional, their -primary purpose is to illustrate how to use libpng to add PNG support to -other programs. As such, their user interfaces are crude and definitely -are not intended for everyday use. - -Please see http://www.libpng.org/pub/png/pngbook.html for further infor- -mation and links to the latest version of the source code, and Chapters -13-15 of the book for detailed discussion of the three programs. - -Greg Roelofs -https://pobox.com/~newt/greg_contact.html -16 March 2008 - - -BUILD INSTRUCTIONS - - - Prerequisites (in order of compilation): - - - zlib https://zlib.net/ - - libpng http://www.libpng.org/pub/png/libpng.html - - pngbook http://www.libpng.org/pub/png/book/sources.html - - The pngbook demo programs are explicitly designed to demonstrate proper - coding techniques for using the libpng reference library. As a result, - you need to download and build both zlib (on which libpng depends) and - libpng. A common build setup is to place the zlib, libpng and pngbook - subdirectory trees ("folders") in the same parent directory. Then the - libpng build can refer to files in ../zlib (or ..\zlib or [-.zlib]), - and similarly for the pngbook build. - - Note that all three packages are designed to be built from a command - line by default; those who wish to use a graphical or other integrated - development environments are on their own. - - - - Unix: - - Unpack the latest pngbook sources (which should correspond to this - README file) into a directory and change into that directory. - - Copy Makefile.unx to Makefile and edit the PNG* and Z* variables - appropriately (possibly also the X* variables if necessary). - - make - - There is no "install" target, so copy the three executables somewhere - in your path or run them from the current directory. All three will - print a basic usage screen when run without any command-line arguments; - see the book for more details. - - - - Windows: - - Unpack the latest pngbook sources (which should correspond to this - README file) into a folder, open a "DOS shell" or "command prompt" - or equivalent command-line window, and cd into the folder where you - unpacked the source code. - - For MSVC, set up the necessary environment variables by invoking - - %devstudio%\vc\bin\vcvars32.bat - - where where %devstudio% is the installation directory for MSVC / - DevStudio. If you get "environment out of space" errors under 95/98, - create a desktop shortcut with "c:\windows\command.com /e:4096" as - the program command line and set the working directory to the pngbook - directory. Then double-click to open the new DOS-prompt window with - a bigger environment and retry the commands above. - - Copy Makefile.w32 to Makefile and edit the PNGPATH and ZPATH variables - appropriately (possibly also the "INC" and "LIB" variables if needed). - Note that the names of the dynamic and static libpng and zlib libraries - used in the makefile may change in later releases of the libraries. - Also note that, as of libpng version 1.0.5, MSVC DLL builds do not work. - This makefile therefore builds statically linked executables, but if - the DLL problems ever get fixed, uncommenting the appropriate PNGLIB - and ZLIB lines will build dynamically linked executables instead. - - Do the build by typing - - nmake - - The result should be three executables: rpng-win.exe, rpng2-win.exe, - and wpng.exe. Copy them somewhere in your PATH or run them from the - current folder. Like the Unix versions, the two windowed programs - (rpng and rpng2) now display a usage screen in a console window when - invoked without command-line arguments; this is new behavior as of - the June 2001 release. Note that the programs use the Unix-style "-" - character to specify options, instead of the more common DOS/Windows - "/" character. (For example: "rpng2-win -bgpat 4 foo.png", not - "rpng2-win /bgpat 4 foo.png") - - - - OpenVMS: - - Unpack the pngbook sources into a subdirectory and change into that - subdirectory. - - Edit makevms.com appropriately, specifically the zpath and pngpath - variables. - - @makevms - - To run the programs, they probably first need to be set up as "foreign - symbols," with "disk" and "dir" set appropriately: - - $ rpng == "$disk:[dir]rpng-x.exe" - $ rpng2 == "$disk:[dir]rpng2-x.exe" - $ wpng == "$disk:[dir]wpng.exe" - - All three will print a basic usage screen when run without any command- - line arguments; see the book for more details. Note that the options - style is Unix-like, i.e., preceded by "-" rather than "/". - - -RUNNING THE PROGRAMS: (VERY) BRIEF INTRO - - rpng is a simple PNG viewer that can display transparent PNGs with a - specified background color; for example, - - rpng -bgcolor \#ff0000 toucan.png - - would display the image with a red background. rpng2 is a progressive - viewer that simulates a web browser in some respects; it can display - images against either a background color or a dynamically generated - background image. For example: - - rpng2 -bgpat 16 toucan.png - - wpng is a purely command-line image converter from binary PBMPLUS/NetPBM - format (.pgm or .ppm) to PNG; for example, - - wpng -time < toucan-notrans.ppm > toucan-notrans.png - - would convert the specified PPM file (using redirection) to PNG, auto- - matically setting the PNG modification-time chunk. - - All options can be abbreviated to the shortest unique value; for example, - "-bgc" for -bgcolor (versus "-bgp" for -bgpat), or "-g" for -gamma. diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/makevms.com b/thirdparty/libpng-1.6.37/contrib/gregbook/makevms.com deleted file mode 100644 index f32bcab..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/makevms.com +++ /dev/null @@ -1,132 +0,0 @@ -$!------------------------------------------------------------------------------ -$! make "PNG: The Definitive Guide" demo programs (for X) under OpenVMS -$! -$! Script created by Martin Zinser for libpng; modified by Greg Roelofs -$! for standalone pngbook source distribution. -$! -$! -$! Set locations where zlib and libpng sources live. -$! -$ zpath = "" -$ pngpath = "" -$! -$ if f$search("[---.zlib]zlib.h").nes."" then zpath = "[---.zlib]" -$ if f$search("[--]png.h").nes."" then pngpath = "[--]" -$! -$ if f$search("[-.zlib]zlib.h").nes."" then zpath = "[-.zlib]" -$ if f$search("[-.libpng]png.h").nes."" then pngpath = "[-.libpng]" -$! -$ if zpath .eqs. "" -$ then -$ write sys$output "zlib include not found. Exiting..." -$ exit 2 -$ endif -$! -$ if pngpath .eqs. "" -$ then -$ write sys$output "libpng include not found. Exiting..." -$ exit 2 -$ endif -$! -$! Look for the compiler used. -$! -$ ccopt="/include=(''zpath',''pngpath')" -$ if f$getsyi("HW_MODEL").ge.1024 -$ then -$ ccopt = "/prefix=all"+ccopt -$ comp = "__decc__=1" -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ else -$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" -$ then -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs."" -$ then -$ comp = "__gcc__=1" -$ CC :== GCC -$ else -$ comp = "__vaxc__=1" -$ endif -$ else -$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: -$ ccopt = "/decc/prefix=all"+ccopt -$ comp = "__decc__=1" -$ endif -$ endif -$ open/write lopt lib.opt -$ write lopt "''pngpath'libpng.olb/lib" -$ write lopt "''zpath'libz.olb/lib" -$ close lopt -$ open/write xopt x11.opt -$ write xopt "sys$library:decw$xlibshr.exe/share" -$ close xopt -$! -$! Build 'em. -$! -$ write sys$output "Compiling PNG book programs ..." -$ CALL MAKE readpng.OBJ "cc ''CCOPT' readpng" - - readpng.c readpng.h -$ CALL MAKE readpng2.OBJ "cc ''CCOPT' readpng2" - - readpng2.c readpng2.h -$ CALL MAKE writepng.OBJ "cc ''CCOPT' writepng" - - writepng.c writepng.h -$ write sys$output "Building rpng-x..." -$ CALL MAKE rpng-x.OBJ "cc ''CCOPT' rpng-x" - - rpng-x.c readpng.h -$ call make rpng-x.exe - - "LINK rpng-x,readpng,lib.opt/opt,x11.opt/opt" - - rpng-x.obj readpng.obj -$ write sys$output "Building rpng2-x..." -$ CALL MAKE rpng2-x.OBJ "cc ''CCOPT' rpng2-x" - - rpng2-x.c readpng2.h -$ call make rpng2-x.exe - - "LINK rpng2-x,readpng2,lib.opt/opt,x11.opt/opt" - - rpng2-x.obj readpng2.obj -$ write sys$output "Building wpng..." -$ CALL MAKE wpng.OBJ "cc ''CCOPT' wpng" - - wpng.c writepng.h -$ call make wpng.exe - - "LINK wpng,writepng,lib.opt/opt" - - wpng.obj writepng.obj -$ exit -$! -$! -$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES -$ V = 'F$Verify(0) -$! P1 = What we are trying to make -$! P2 = Command to make it -$! P3 - P8 What it depends on -$ -$ If F$Search(P1) .Eqs. "" Then Goto Makeit -$ Time = F$CvTime(F$File(P1,"RDT")) -$arg=3 -$Loop: -$ Argument = P'arg -$ If Argument .Eqs. "" Then Goto Exit -$ El=0 -$Loop2: -$ File = F$Element(El," ",Argument) -$ If File .Eqs. " " Then Goto Endl -$ AFile = "" -$Loop3: -$ OFile = AFile -$ AFile = F$Search(File) -$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl -$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit -$ Goto Loop3 -$NextEL: -$ El = El + 1 -$ Goto Loop2 -$EndL: -$ arg=arg+1 -$ If arg .Le. 8 Then Goto Loop -$ Goto Exit -$ -$Makeit: -$ VV=F$VERIFY(0) -$ write sys$output P2 -$ 'P2 -$ VV='F$Verify(VV) -$Exit: -$ If V Then Set Verify -$ENDSUBROUTINE diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/readpng.c b/thirdparty/libpng-1.6.37/contrib/gregbook/readpng.c deleted file mode 100644 index fad9b53..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/readpng.c +++ /dev/null @@ -1,323 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng - simple PNG display program readpng.c - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2007,2017 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ---------------------------------------------------------------------------*/ - -#include -#include -#include - -#include "png.h" /* libpng header */ -#include "readpng.h" /* typedefs, common macros, public prototypes */ - -/* future versions of libpng will provide this macro: */ -#ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) -#endif - - -static png_structp png_ptr = NULL; -static png_infop info_ptr = NULL; - -png_uint_32 width, height; -int bit_depth, color_type; -uch *image_data = NULL; - - -void readpng_version_info(void) -{ - fprintf(stderr, " Compiled with libpng %s; using libpng %s.\n", - PNG_LIBPNG_VER_STRING, png_libpng_ver); - fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", - ZLIB_VERSION, zlib_version); -} - - -/* return value = 0 for success, 1 for bad sig, 2 for bad IHDR, 4 for no mem */ - -int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight) -{ - uch sig[8]; - - - /* first do a quick check that the file really is a PNG image; could - * have used slightly more general png_sig_cmp() function instead */ - - fread(sig, 1, 8, infile); - if (png_sig_cmp(sig, 0, 8)) - return 1; /* bad signature */ - - - /* could pass pointers to user-defined error handlers instead of NULLs: */ - - png_ptr = png_create_read_struct(png_get_libpng_ver(NULL), NULL, NULL, - NULL); - if (!png_ptr) - return 4; /* out of memory */ - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) { - png_destroy_read_struct(&png_ptr, NULL, NULL); - return 4; /* out of memory */ - } - - - /* we could create a second info struct here (end_info), but it's only - * useful if we want to keep pre- and post-IDAT chunk info separated - * (mainly for PNG-aware image editors and converters) */ - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function */ - - if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return 2; - } - - - png_init_io(png_ptr, infile); - png_set_sig_bytes(png_ptr, 8); /* we already read the 8 signature bytes */ - - png_read_info(png_ptr, info_ptr); /* read all PNG info up to image data */ - - - /* alternatively, could make separate calls to png_get_image_width(), - * etc., but want bit_depth and color_type for later [don't care about - * compression_type and filter_type => NULLs] */ - - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - NULL, NULL, NULL); - *pWidth = width; - *pHeight = height; - - - /* OK, that's all we need for now; return happy */ - - return 0; -} - - - - -/* returns 0 if succeeds, 1 if fails due to no bKGD chunk, 2 if libpng error; - * scales values to 8-bit if necessary */ - -int readpng_get_bgcolor(uch *red, uch *green, uch *blue) -{ - png_color_16p pBackground; - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function */ - - if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return 2; - } - - - if (!png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD)) - return 1; - - /* it is not obvious from the libpng documentation, but this function - * takes a pointer to a pointer, and it always returns valid red, green - * and blue values, regardless of color_type: */ - - png_get_bKGD(png_ptr, info_ptr, &pBackground); - - - /* however, it always returns the raw bKGD data, regardless of any - * bit-depth transformations, so check depth and adjust if necessary */ - - if (bit_depth == 16) { - *red = pBackground->red >> 8; - *green = pBackground->green >> 8; - *blue = pBackground->blue >> 8; - } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { - if (bit_depth == 1) - *red = *green = *blue = pBackground->gray? 255 : 0; - else if (bit_depth == 2) - *red = *green = *blue = (255/3) * pBackground->gray; - else /* bit_depth == 4 */ - *red = *green = *blue = (255/15) * pBackground->gray; - } else { - *red = (uch)pBackground->red; - *green = (uch)pBackground->green; - *blue = (uch)pBackground->blue; - } - - return 0; -} - - - - -/* display_exponent == LUT_exponent * CRT_exponent */ - -uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes) -{ - double gamma; - png_uint_32 i, rowbytes; - png_bytepp row_pointers = NULL; - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function */ - - if (setjmp(png_jmpbuf(png_ptr))) { - free(image_data); - image_data = NULL; - free(row_pointers); - row_pointers = NULL; - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return NULL; - } - - - /* expand palette images to RGB, low-bit-depth grayscale images to 8 bits, - * transparency chunks to full alpha channel; strip 16-bit-per-sample - * images to 8 bits per sample; and convert grayscale to RGB[A] */ - - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_expand(png_ptr); - if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) - png_set_expand(png_ptr); - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) - png_set_expand(png_ptr); -#ifdef PNG_READ_16_TO_8_SUPPORTED - if (bit_depth == 16) -# ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED - png_set_scale_16(png_ptr); -# else - png_set_strip_16(png_ptr); -# endif -#endif - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - - - /* unlike the example in the libpng documentation, we have *no* idea where - * this file may have come from--so if it doesn't have a file gamma, don't - * do any correction ("do no harm") */ - - if (png_get_gAMA(png_ptr, info_ptr, &gamma)) - png_set_gamma(png_ptr, display_exponent, gamma); - - - /* all transformations have been registered; now update info_ptr data, - * get rowbytes and channels, and allocate image memory */ - - png_read_update_info(png_ptr, info_ptr); - - *pRowbytes = rowbytes = png_get_rowbytes(png_ptr, info_ptr); - *pChannels = (int)png_get_channels(png_ptr, info_ptr); - - /* Guard against integer overflow */ - if (height > ((size_t)(-1))/rowbytes) { - fprintf(stderr, "readpng: image_data buffer would be too large\n", - return NULL; - } - - if ((image_data = (uch *)malloc(rowbytes*height)) == NULL) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return NULL; - } - if ((row_pointers = (png_bytepp)malloc(height*sizeof(png_bytep))) == NULL) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - free(image_data); - image_data = NULL; - return NULL; - } - - Trace((stderr, "readpng_get_image: channels = %d, rowbytes = %ld, height = %ld\n", - *pChannels, rowbytes, height)); - - - /* set the individual row_pointers to point at the correct offsets */ - - for (i = 0; i < height; ++i) - row_pointers[i] = image_data + i*rowbytes; - - - /* now we can go ahead and just read the whole image */ - - png_read_image(png_ptr, row_pointers); - - - /* and we're done! (png_read_end() can be omitted if no processing of - * post-IDAT text/time/etc. is desired) */ - - free(row_pointers); - row_pointers = NULL; - - png_read_end(png_ptr, NULL); - - return image_data; -} - - -void readpng_cleanup(int free_image_data) -{ - if (free_image_data && image_data) { - free(image_data); - image_data = NULL; - } - - if (png_ptr && info_ptr) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - png_ptr = NULL; - info_ptr = NULL; - } -} diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/readpng.h b/thirdparty/libpng-1.6.37/contrib/gregbook/readpng.h deleted file mode 100644 index fad9fe3..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/readpng.h +++ /dev/null @@ -1,88 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng - simple PNG display program readpng.h - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2007 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ---------------------------------------------------------------------------*/ - -#ifndef TRUE -# define TRUE 1 -# define FALSE 0 -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b)? (a) : (b)) -# define MIN(a,b) ((a) < (b)? (a) : (b)) -#endif - -#ifdef DEBUG -# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} -#else -# define Trace(x) ; -#endif - -typedef unsigned char uch; -typedef unsigned short ush; -typedef unsigned long ulg; - - -/* prototypes for public functions in readpng.c */ - -void readpng_version_info(void); - -int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight); - -int readpng_get_bgcolor(uch *bg_red, uch *bg_green, uch *bg_blue); - -uch *readpng_get_image(double display_exponent, int *pChannels, - ulg *pRowbytes); - -void readpng_cleanup(int free_image_data); diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/readpng2.c b/thirdparty/libpng-1.6.37/contrib/gregbook/readpng2.c deleted file mode 100644 index 610b3cd..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/readpng2.c +++ /dev/null @@ -1,521 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng2 - progressive-model PNG display program readpng2.c - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2015 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - --------------------------------------------------------------------------- - - Changelog: - 2015-11-12 - Check return value of png_get_bKGD() (Glenn R-P) - 2017-04-22 - Guard against integer overflow (Glenn R-P) - - ---------------------------------------------------------------------------*/ - - -#include /* for exit() prototype */ -#include - -#include -#include "png.h" /* libpng header from the local directory */ -#include "readpng2.h" /* typedefs, common macros, public prototypes */ - - -/* local prototypes */ - -static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr); -static void readpng2_row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass); -static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr); -static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg); -static void readpng2_warning_handler(png_structp png_ptr, png_const_charp msg); - - - - -void readpng2_version_info(void) -{ - fprintf(stderr, " Compiled with libpng %s; using libpng %s\n", - PNG_LIBPNG_VER_STRING, png_libpng_ver); - - fprintf(stderr, " and with zlib %s; using zlib %s.\n", - ZLIB_VERSION, zlib_version); -} - - - - -int readpng2_check_sig(uch *sig, int num) -{ - return !png_sig_cmp(sig, 0, num); -} - - - - -/* returns 0 for success, 2 for libpng problem, 4 for out of memory */ - -int readpng2_init(mainprog_info *mainprog_ptr) -{ - png_structp png_ptr; /* note: temporary variables! */ - png_infop info_ptr; - - - /* could also replace libpng warning-handler (final NULL), but no need: */ - - png_ptr = png_create_read_struct(png_get_libpng_ver(NULL), mainprog_ptr, - readpng2_error_handler, readpng2_warning_handler); - if (!png_ptr) - return 4; /* out of memory */ - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) { - png_destroy_read_struct(&png_ptr, NULL, NULL); - return 4; /* out of memory */ - } - - - /* we could create a second info struct here (end_info), but it's only - * useful if we want to keep pre- and post-IDAT chunk info separated - * (mainly for PNG-aware image editors and converters) */ - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function, unless an alternate error handler was installed-- - * but compatible error handlers must either use longjmp() themselves - * (as in this program) or exit immediately, so here we are: */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return 2; - } - - -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - /* prepare the reader to ignore all recognized chunks whose data won't be - * used, i.e., all chunks recognized by libpng except for IHDR, PLTE, IDAT, - * IEND, tRNS, bKGD, gAMA, and sRGB (small performance improvement) */ - { - /* These byte strings were copied from png.h. If a future version - * of readpng2.c recognizes more chunks, add them to this list. - */ - static const png_byte chunks_to_process[] = { - 98, 75, 71, 68, '\0', /* bKGD */ - 103, 65, 77, 65, '\0', /* gAMA */ - 115, 82, 71, 66, '\0', /* sRGB */ - }; - - /* Ignore all chunks except for IHDR, PLTE, tRNS, IDAT, and IEND */ - png_set_keep_unknown_chunks(png_ptr, -1 /* PNG_HANDLE_CHUNK_NEVER */, - NULL, -1); - - /* But do not ignore chunks in the "chunks_to_process" list */ - png_set_keep_unknown_chunks(png_ptr, - 0 /* PNG_HANDLE_CHUNK_AS_DEFAULT */, chunks_to_process, - sizeof(chunks_to_process)/5); - } -#endif /* PNG_HANDLE_AS_UNKNOWN_SUPPORTED */ - - - /* instead of doing png_init_io() here, now we set up our callback - * functions for progressive decoding */ - - png_set_progressive_read_fn(png_ptr, mainprog_ptr, - readpng2_info_callback, readpng2_row_callback, readpng2_end_callback); - - - /* make sure we save our pointers for use in readpng2_decode_data() */ - - mainprog_ptr->png_ptr = png_ptr; - mainprog_ptr->info_ptr = info_ptr; - - - /* and that's all there is to initialization */ - - return 0; -} - - - - -/* returns 0 for success, 2 for libpng (longjmp) problem */ - -int readpng2_decode_data(mainprog_info *mainprog_ptr, uch *rawbuf, ulg length) -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - mainprog_ptr->png_ptr = NULL; - mainprog_ptr->info_ptr = NULL; - return 2; - } - - - /* hand off the next chunk of input data to libpng for decoding */ - - png_process_data(png_ptr, info_ptr, rawbuf, length); - - return 0; -} - - - - -static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr) -{ - mainprog_info *mainprog_ptr; - int color_type, bit_depth; - png_uint_32 width, height; -#ifdef PNG_FLOATING_POINT_SUPPORTED - double gamma; -#else - png_fixed_point gamma; -#endif - - - /* setjmp() doesn't make sense here, because we'd either have to exit(), - * longjmp() ourselves, or return control to libpng, which doesn't want - * to see us again. By not doing anything here, libpng will instead jump - * to readpng2_decode_data(), which can return an error value to the main - * program. */ - - - /* retrieve the pointer to our special-purpose struct, using the png_ptr - * that libpng passed back to us (i.e., not a global this time--there's - * no real difference for a single image, but for a multithreaded browser - * decoding several PNG images at the same time, one needs to avoid mixing - * up different images' structs) */ - - mainprog_ptr = png_get_progressive_ptr(png_ptr); - - if (mainprog_ptr == NULL) { /* we be hosed */ - fprintf(stderr, - "readpng2 error: main struct not recoverable in info_callback.\n"); - fflush(stderr); - return; - /* - * Alternatively, we could call our error-handler just like libpng - * does, which would effectively terminate the program. Since this - * can only happen if png_ptr gets redirected somewhere odd or the - * main PNG struct gets wiped, we're probably toast anyway. (If - * png_ptr itself is NULL, we would not have been called.) - */ - } - - - /* this is just like in the non-progressive case */ - - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - NULL, NULL, NULL); - mainprog_ptr->width = (ulg)width; - mainprog_ptr->height = (ulg)height; - - - /* since we know we've read all of the PNG file's "header" (i.e., up - * to IDAT), we can check for a background color here */ - - if (mainprog_ptr->need_bgcolor) - { - png_color_16p pBackground; - - /* it is not obvious from the libpng documentation, but this function - * takes a pointer to a pointer, and it always returns valid red, - * green and blue values, regardless of color_type: */ - if (png_get_bKGD(png_ptr, info_ptr, &pBackground)) - { - - /* however, it always returns the raw bKGD data, regardless of any - * bit-depth transformations, so check depth and adjust if necessary - */ - if (bit_depth == 16) { - mainprog_ptr->bg_red = pBackground->red >> 8; - mainprog_ptr->bg_green = pBackground->green >> 8; - mainprog_ptr->bg_blue = pBackground->blue >> 8; - } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { - if (bit_depth == 1) - mainprog_ptr->bg_red = mainprog_ptr->bg_green = - mainprog_ptr->bg_blue = pBackground->gray? 255 : 0; - else if (bit_depth == 2) - mainprog_ptr->bg_red = mainprog_ptr->bg_green = - mainprog_ptr->bg_blue = (255/3) * pBackground->gray; - else /* bit_depth == 4 */ - mainprog_ptr->bg_red = mainprog_ptr->bg_green = - mainprog_ptr->bg_blue = (255/15) * pBackground->gray; - } else { - mainprog_ptr->bg_red = (uch)pBackground->red; - mainprog_ptr->bg_green = (uch)pBackground->green; - mainprog_ptr->bg_blue = (uch)pBackground->blue; - } - } - } - - - /* as before, let libpng expand palette images to RGB, low-bit-depth - * grayscale images to 8 bits, transparency chunks to full alpha channel; - * strip 16-bit-per-sample images to 8 bits per sample; and convert - * grayscale to RGB[A] */ - - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_expand(png_ptr); - if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) - png_set_expand(png_ptr); - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) - png_set_expand(png_ptr); -#ifdef PNG_READ_16_TO_8_SUPPORTED - if (bit_depth == 16) -# ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED - png_set_scale_16(png_ptr); -# else - png_set_strip_16(png_ptr); -# endif -#endif - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - - - /* Unlike the basic viewer, which was designed to operate on local files, - * this program is intended to simulate a web browser--even though we - * actually read from a local file, too. But because we are pretending - * that most of the images originate on the Internet, we follow the recom- - * mendation of the sRGB proposal and treat unlabelled images (no gAMA - * chunk) as existing in the sRGB color space. That is, we assume that - * such images have a file gamma of 0.45455, which corresponds to a PC-like - * display system. This change in assumptions will have no effect on a - * PC-like system, but on a Mac, SGI, NeXT or other system with a non- - * identity lookup table, it will darken unlabelled images, which effec- - * tively favors images from PC-like systems over those originating on - * the local platform. Note that mainprog_ptr->display_exponent is the - * "gamma" value for the entire display system, i.e., the product of - * LUT_exponent and CRT_exponent. */ - -#ifdef PNG_FLOATING_POINT_SUPPORTED - if (png_get_gAMA(png_ptr, info_ptr, &gamma)) - png_set_gamma(png_ptr, mainprog_ptr->display_exponent, gamma); - else - png_set_gamma(png_ptr, mainprog_ptr->display_exponent, 0.45455); -#else - if (png_get_gAMA_fixed(png_ptr, info_ptr, &gamma)) - png_set_gamma_fixed(png_ptr, - (png_fixed_point)(100000*mainprog_ptr->display_exponent+.5), gamma); - else - png_set_gamma_fixed(png_ptr, - (png_fixed_point)(100000*mainprog_ptr->display_exponent+.5), 45455); -#endif - - /* we'll let libpng expand interlaced images, too */ - - mainprog_ptr->passes = png_set_interlace_handling(png_ptr); - - - /* all transformations have been registered; now update info_ptr data and - * then get rowbytes and channels */ - - png_read_update_info(png_ptr, info_ptr); - - mainprog_ptr->rowbytes = (int)png_get_rowbytes(png_ptr, info_ptr); - mainprog_ptr->channels = png_get_channels(png_ptr, info_ptr); - - - /* Call the main program to allocate memory for the image buffer and - * initialize windows and whatnot. (The old-style function-pointer - * invocation is used for compatibility with a few supposedly ANSI - * compilers that nevertheless barf on "fn_ptr()"-style syntax.) */ - - (*mainprog_ptr->mainprog_init)(); - - - /* and that takes care of initialization */ - - return; -} - - - - - -static void readpng2_row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass) -{ - mainprog_info *mainprog_ptr; - - - /* first check whether the row differs from the previous pass; if not, - * nothing to combine or display */ - - if (!new_row) - return; - - - /* retrieve the pointer to our special-purpose struct so we can access - * the old rows and image-display callback function */ - - mainprog_ptr = png_get_progressive_ptr(png_ptr); - - - /* save the pass number for optional use by the front end */ - - mainprog_ptr->pass = pass; - - - /* have libpng either combine the new row data with the existing row data - * from previous passes (if interlaced) or else just copy the new row - * into the main program's image buffer */ - - png_progressive_combine_row(png_ptr, mainprog_ptr->row_pointers[row_num], - new_row); - - - /* finally, call the display routine in the main program with the number - * of the row we just updated */ - - (*mainprog_ptr->mainprog_display_row)(row_num); - - - /* and we're ready for more */ - - return; -} - - - - - -static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr) -{ - mainprog_info *mainprog_ptr; - - - /* retrieve the pointer to our special-purpose struct */ - - mainprog_ptr = png_get_progressive_ptr(png_ptr); - - - /* let the main program know that it should flush any buffered image - * data to the display now and set a "done" flag or whatever, but note - * that it SHOULD NOT DESTROY THE PNG STRUCTS YET--in other words, do - * NOT call readpng2_cleanup() either here or in the finish_display() - * routine; wait until control returns to the main program via - * readpng2_decode_data() */ - - (*mainprog_ptr->mainprog_finish_display)(); - - - /* all done */ - - (void)info_ptr; /* Unused */ - - return; -} - - - - - -void readpng2_cleanup(mainprog_info *mainprog_ptr) -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - if (png_ptr && info_ptr) - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - - mainprog_ptr->png_ptr = NULL; - mainprog_ptr->info_ptr = NULL; -} - - -static void readpng2_warning_handler(png_structp png_ptr, png_const_charp msg) -{ - fprintf(stderr, "readpng2 libpng warning: %s\n", msg); - fflush(stderr); - (void)png_ptr; /* Unused */ -} - - -static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg) -{ - mainprog_info *mainprog_ptr; - - /* This function, aside from the extra step of retrieving the "error - * pointer" (below) and the fact that it exists within the application - * rather than within libpng, is essentially identical to libpng's - * default error handler. The second point is critical: since both - * setjmp() and longjmp() are called from the same code, they are - * guaranteed to have compatible notions of how big a jmp_buf is, - * regardless of whether _BSD_SOURCE or anything else has (or has not) - * been defined. */ - - fprintf(stderr, "readpng2 libpng error: %s\n", msg); - fflush(stderr); - - mainprog_ptr = png_get_error_ptr(png_ptr); - if (mainprog_ptr == NULL) { /* we are completely hosed now */ - fprintf(stderr, - "readpng2 severe error: jmpbuf not recoverable; terminating.\n"); - fflush(stderr); - exit(99); - } - - /* Now we have our data structure we can use the information in it - * to return control to our own higher level code (all the points - * where 'setjmp' is called in this file.) This will work with other - * error handling mechanisms as well - libpng always calls png_error - * when it can proceed no further, thus, so long as the error handler - * is intercepted, application code can do its own error recovery. - */ - longjmp(mainprog_ptr->jmpbuf, 1); -} diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/readpng2.h b/thirdparty/libpng-1.6.37/contrib/gregbook/readpng2.h deleted file mode 100644 index 6b3660d..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/readpng2.h +++ /dev/null @@ -1,116 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng2 - progressive-model PNG display program readpng2.h - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2008 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ---------------------------------------------------------------------------*/ - -#ifndef TRUE -# define TRUE 1 -# define FALSE 0 -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b)? (a) : (b)) -# define MIN(a,b) ((a) < (b)? (a) : (b)) -#endif - -#ifdef DEBUG -# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} -#else -# define Trace(x) ; -#endif - -enum rpng2_states { - kPreInit = 0, - kWindowInit, - kDone -}; - -typedef unsigned char uch; -typedef unsigned short ush; -typedef unsigned long ulg; - -typedef struct _mainprog_info { - double display_exponent; - ulg width; - ulg height; - void *png_ptr; - void *info_ptr; - void (*mainprog_init)(void); - void (*mainprog_display_row)(ulg row_num); - void (*mainprog_finish_display)(void); - uch *image_data; - uch **row_pointers; - jmp_buf jmpbuf; - int passes; /* not used */ - int pass; - int rowbytes; - int channels; - int need_bgcolor; - int state; - uch bg_red; - uch bg_green; - uch bg_blue; -} mainprog_info; - - -/* prototypes for public functions in readpng2.c */ - -void readpng2_version_info(void); - -int readpng2_check_sig(uch *sig, int num); - -int readpng2_init(mainprog_info *mainprog_ptr); - -int readpng2_decode_data(mainprog_info *mainprog_ptr, uch *rawbuf, ulg length); - -void readpng2_cleanup(mainprog_info *mainprog_ptr); diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/readppm.c b/thirdparty/libpng-1.6.37/contrib/gregbook/readppm.c deleted file mode 100644 index 52e7027..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/readppm.c +++ /dev/null @@ -1,188 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng - simple PNG display program readppm.c - - --------------------------------------------------------------------------- - - This is a special-purpose replacement for readpng.c that allows binary - PPM files to be used in place of PNG images. - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2007,2017 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ---------------------------------------------------------------------------*/ - -#include -#include - -#include "readpng.h" /* typedefs, common macros, public prototypes */ - - -ulg width, height; -int bit_depth, color_type, channels; -uch *image_data = NULL; -FILE *saved_infile; - - -void readpng_version_info() -{ - fprintf(stderr, " Compiled without libpng, zlib or PBMPLUS/NetPBM.\n"); -} - - -/* return value = 0 for success, 1 for bad sig, 2 for bad IHDR, 4 for no mem */ - -int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight) -{ - static uch ppmline[256]; - int maxval; - - - saved_infile = infile; - - fgets(ppmline, 256, infile); - if (ppmline[0] != 'P' || ppmline[1] != '6') { - fprintf(stderr, "ERROR: not a PPM file\n"); - return 1; - } - /* possible color types: P5 = grayscale (0), P6 = RGB (2), P8 = RGBA (6) */ - if (ppmline[1] == '6') { - color_type = 2; - channels = 3; - } else if (ppmline[1] == '8') { - color_type = 6; - channels = 4; - } else /* if (ppmline[1] == '5') */ { - color_type = 0; - channels = 1; - } - - do { - fgets(ppmline, 256, infile); - } while (ppmline[0] == '#'); - sscanf(ppmline, "%lu %lu", &width, &height); - - do { - fgets(ppmline, 256, infile); - } while (ppmline[0] == '#'); - sscanf(ppmline, "%d", &maxval); - if (maxval != 255) { - fprintf(stderr, "ERROR: maxval = %d\n", maxval); - return 2; - } - bit_depth = 8; - - *pWidth = width; - *pHeight = height; - - return 0; -} - - - - -/* returns 0 if succeeds, 1 if fails due to no bKGD chunk, 2 if libpng error; - * scales values to 8-bit if necessary */ - -int readpng_get_bgcolor(uch *red, uch *green, uch *blue) -{ - return 1; -} - - - - -/* display_exponent == LUT_exponent * CRT_exponent */ - -uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes) -{ - ulg rowbytes; - - - /* expand palette images to RGB, low-bit-depth grayscale images to 8 bits, - * transparency chunks to full alpha channel; strip 16-bit-per-sample - * images to 8 bits per sample; and convert grayscale to RGB[A] */ - - /* GRR WARNING: grayscale needs to be expanded and channels reset! */ - - *pRowbytes = rowbytes = channels*width; - *pChannels = channels; - - Trace((stderr, "readpng_get_image: rowbytes = %ld, height = %ld\n", rowbytes, height)); - - /* Guard against integer overflow */ - if (height > ((size_t)(-1))/rowbytes) { - fprintf(stderr, PROGNAME ": image_data buffer would be too large\n", - return NULL; - } - - if ((image_data = (uch *)malloc(rowbytes*height)) == NULL) { - return NULL; - } - - /* now we can go ahead and just read the whole image */ - - if (fread(image_data, 1L, rowbytes*height, saved_infile) < - rowbytes*height) { - free (image_data); - image_data = NULL; - return NULL; - } - - return image_data; -} - - -void readpng_cleanup(int free_image_data) -{ - if (free_image_data && image_data) { - free(image_data); - image_data = NULL; - } -} diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/rpng-win.c b/thirdparty/libpng-1.6.37/contrib/gregbook/rpng-win.c deleted file mode 100644 index 1a6f876..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/rpng-win.c +++ /dev/null @@ -1,735 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng - simple PNG display program rpng-win.c - - This program decodes and displays PNG images, with gamma correction and - optionally with a user-specified background color (in case the image has - transparency). It is very nearly the most basic PNG viewer possible. - This version is for 32-bit Windows; it may compile under 16-bit Windows - with a little tweaking (or maybe not). - - to do: - - handle quoted command-line args (especially filenames with spaces) - - have minimum window width: oh well - - use %.1023s to simplify truncation of title-bar string? - - --------------------------------------------------------------------------- - - Changelog: - - 1.00: initial public release - - 1.01: modified to allow abbreviated options; fixed long/ulong mis- - match; switched to png_jmpbuf() macro - - 1.02: added extra set of parentheses to png_jmpbuf() macro; fixed - command-line parsing bug - - 1.10: enabled "message window"/console (thanks to David Geldreich) - - 2.00: dual-licensed (added GNU GPL) - - 2.01: fixed improper display of usage screen on PNG error(s) - - 2.02: check for integer overflow (Glenn R-P) - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2008, 2017 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ---------------------------------------------------------------------------*/ - -#define PROGNAME "rpng-win" -#define LONGNAME "Simple PNG Viewer for Windows" -#define VERSION "2.01 of 16 March 2008" - -#include -#include -#include -#include -#include -#ifdef __CYGWIN__ -/* getch replacement. Turns out, we don't really need this, - * but leave it here if we ever enable any of the uses of - * _getch in the main code - */ -#include -#include -#include -int repl_getch( void ) -{ - char ch; - int fd = fileno(stdin); - struct termio old_tty, new_tty; - - ioctl(fd, TCGETA, &old_tty); - new_tty = old_tty; - new_tty.c_lflag &= ~(ICANON | ECHO | ISIG); - ioctl(fd, TCSETA, &new_tty); - fread(&ch, 1, sizeof(ch), stdin); - ioctl(fd, TCSETA, &old_tty); - - return ch; -} -#define _getch repl_getch -#else -#include /* only for _getch() */ -#endif - -/* #define DEBUG : this enables the Trace() macros */ - -#include "readpng.h" /* typedefs, common macros, readpng prototypes */ - - -/* could just include png.h, but this macro is the only thing we need - * (name and typedefs changed to local versions); note that side effects - * only happen with alpha (which could easily be avoided with - * "ush acopy = (alpha);") */ - -#define alpha_composite(composite, fg, alpha, bg) { \ - ush temp = ((ush)(fg)*(ush)(alpha) + \ - (ush)(bg)*(ush)(255 - (ush)(alpha)) + (ush)128); \ - (composite) = (uch)((temp + (temp >> 8)) >> 8); \ -} - - -/* local prototypes */ -static int rpng_win_create_window(HINSTANCE hInst, int showmode); -static int rpng_win_display_image(void); -static void rpng_win_cleanup(void); -LRESULT CALLBACK rpng_win_wndproc(HWND, UINT, WPARAM, LPARAM); - - -static char titlebar[1024]; -static char *progname = PROGNAME; -static char *appname = LONGNAME; -static char *filename; -static FILE *infile; - -static char *bgstr; -static uch bg_red=0, bg_green=0, bg_blue=0; - -static double display_exponent; - -static ulg image_width, image_height, image_rowbytes; -static int image_channels; -static uch *image_data; - -/* Windows-specific variables */ -static ulg wimage_rowbytes; -static uch *dib; -static uch *wimage_data; -static BITMAPINFOHEADER *bmih; - -static HWND global_hwnd; - - - - -int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) -{ - char *args[1024]; /* arbitrary limit, but should suffice */ - char *p, *q, **argv = args; - int argc = 0; - int rc, alen, flen; - int error = 0; - int have_bg = FALSE; - double LUT_exponent; /* just the lookup table */ - double CRT_exponent = 2.2; /* just the monitor */ - double default_display_exponent; /* whole display system */ - MSG msg; - - - filename = (char *)NULL; - -#ifndef __CYGWIN__ - /* First reenable console output, which normally goes to the bit bucket - * for windowed apps. Closing the console window will terminate the - * app. Thanks to David.Geldreich at realviz.com for supplying the magical - * incantation. */ - - AllocConsole(); - freopen("CONOUT$", "a", stderr); - freopen("CONOUT$", "a", stdout); -#endif - - - /* Next set the default value for our display-system exponent, i.e., - * the product of the CRT exponent and the exponent corresponding to - * the frame-buffer's lookup table (LUT), if any. This is not an - * exhaustive list of LUT values (e.g., OpenStep has a lot of weird - * ones), but it should cover 99% of the current possibilities. And - * yes, these ifdefs are completely wasted in a Windows program... */ - -#if defined(NeXT) - LUT_exponent = 1.0 / 2.2; - /* - if (some_next_function_that_returns_gamma(&next_gamma)) - LUT_exponent = 1.0 / next_gamma; - */ -#elif defined(sgi) - LUT_exponent = 1.0 / 1.7; - /* there doesn't seem to be any documented function to get the - * "gamma" value, so we do it the hard way */ - infile = fopen("/etc/config/system.glGammaVal", "r"); - if (infile) { - double sgi_gamma; - - fgets(tmpline, 80, infile); - fclose(infile); - sgi_gamma = atof(tmpline); - if (sgi_gamma > 0.0) - LUT_exponent = 1.0 / sgi_gamma; - } -#elif defined(Macintosh) - LUT_exponent = 1.8 / 2.61; - /* - if (some_mac_function_that_returns_gamma(&mac_gamma)) - LUT_exponent = mac_gamma / 2.61; - */ -#else - LUT_exponent = 1.0; /* assume no LUT: most PCs */ -#endif - - /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ - default_display_exponent = LUT_exponent * CRT_exponent; - - - /* If the user has set the SCREEN_GAMMA environment variable as suggested - * (somewhat imprecisely) in the libpng documentation, use that; otherwise - * use the default value we just calculated. Either way, the user may - * override this via a command-line option. */ - - if ((p = getenv("SCREEN_GAMMA")) != NULL) - display_exponent = atof(p); - else - display_exponent = default_display_exponent; - - - /* Windows really hates command lines, so we have to set up our own argv. - * Note that we do NOT bother with quoted arguments here, so don't use - * filenames with spaces in 'em! */ - - argv[argc++] = PROGNAME; - p = cmd; - for (;;) { - if (*p == ' ') - while (*++p == ' ') - ; - /* now p points at the first non-space after some spaces */ - if (*p == '\0') - break; /* nothing after the spaces: done */ - argv[argc++] = q = p; - while (*q && *q != ' ') - ++q; - /* now q points at a space or the end of the string */ - if (*q == '\0') - break; /* last argv already terminated; quit */ - *q = '\0'; /* change space to terminator */ - p = q + 1; - } - argv[argc] = NULL; /* terminate the argv array itself */ - - - /* Now parse the command line for options and the PNG filename. */ - - while (*++argv && !error) { - if (!strncmp(*argv, "-gamma", 2)) { - if (!*++argv) - ++error; - else { - display_exponent = atof(*argv); - if (display_exponent <= 0.0) - ++error; - } - } else if (!strncmp(*argv, "-bgcolor", 2)) { - if (!*++argv) - ++error; - else { - bgstr = *argv; - if (strlen(bgstr) != 7 || bgstr[0] != '#') - ++error; - else - have_bg = TRUE; - } - } else { - if (**argv != '-') { - filename = *argv; - if (argv[1]) /* shouldn't be any more args after filename */ - ++error; - } else - ++error; /* not expecting any other options */ - } - } - - if (!filename) - ++error; - - - /* print usage screen if any errors up to this point */ - - if (error) { -#ifndef __CYGWIN__ - int ch; -#endif - - fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); - readpng_version_info(); - fprintf(stderr, "\n" - "Usage: %s [-gamma exp] [-bgcolor bg] file.png\n" - " exp \ttransfer-function exponent (``gamma'') of the display\n" - "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" - "\t\t to the product of the lookup-table exponent (varies)\n" - "\t\t and the CRT exponent (usually 2.2); must be positive\n" - " bg \tdesired background color in 7-character hex RGB format\n" - "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" - "\t\t used with transparent images\n" - "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n" -#ifndef __CYGWIN__ - "Press Q or Esc to quit this usage screen.\n" -#endif - "\n", PROGNAME, default_display_exponent); -#ifndef __CYGWIN__ - do - ch = _getch(); - while (ch != 'q' && ch != 'Q' && ch != 0x1B); -#endif - exit(1); - } - - - if (!(infile = fopen(filename, "rb"))) { - fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); - ++error; - } else { - if ((rc = readpng_init(infile, &image_width, &image_height)) != 0) { - switch (rc) { - case 1: - fprintf(stderr, PROGNAME - ": [%s] is not a PNG file: incorrect signature\n", - filename); - break; - case 2: - fprintf(stderr, PROGNAME - ": [%s] has bad IHDR (libpng longjmp)\n", filename); - break; - case 4: - fprintf(stderr, PROGNAME ": insufficient memory\n"); - break; - default: - fprintf(stderr, PROGNAME - ": unknown readpng_init() error\n"); - break; - } - ++error; - } - if (error) - fclose(infile); - } - - - if (error) { -#ifndef __CYGWIN__ - int ch; -#endif - - fprintf(stderr, PROGNAME ": aborting.\n"); -#ifndef __CYGWIN__ - do - ch = _getch(); - while (ch != 'q' && ch != 'Q' && ch != 0x1B); -#endif - exit(2); - } else { - fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); -#ifndef __CYGWIN__ - fprintf(stderr, - "\n [console window: closing this window will terminate %s]\n\n", - PROGNAME); -#endif - } - - - /* set the title-bar string, but make sure buffer doesn't overflow */ - - alen = strlen(appname); - flen = strlen(filename); - if (alen + flen + 3 > 1023) - sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); - else - sprintf(titlebar, "%s: %s", appname, filename); - - - /* if the user didn't specify a background color on the command line, - * check for one in the PNG file--if not, the initialized values of 0 - * (black) will be used */ - - if (have_bg) { - unsigned r, g, b; /* this approach quiets compiler warnings */ - - sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); - bg_red = (uch)r; - bg_green = (uch)g; - bg_blue = (uch)b; - } else if (readpng_get_bgcolor(&bg_red, &bg_green, &bg_blue) > 1) { - readpng_cleanup(TRUE); - fprintf(stderr, PROGNAME - ": libpng error while checking for background color\n"); - exit(2); - } - - - /* do the basic Windows initialization stuff, make the window and fill it - * with the background color */ - - if (rpng_win_create_window(hInst, showmode)) - exit(2); - - - /* decode the image, all at once */ - - Trace((stderr, "calling readpng_get_image()\n")) - image_data = readpng_get_image(display_exponent, &image_channels, - &image_rowbytes); - Trace((stderr, "done with readpng_get_image()\n")) - - - /* done with PNG file, so clean up to minimize memory usage (but do NOT - * nuke image_data!) */ - - readpng_cleanup(FALSE); - fclose(infile); - - if (!image_data) { - fprintf(stderr, PROGNAME ": unable to decode PNG image\n"); - exit(3); - } - - - /* display image (composite with background if requested) */ - - Trace((stderr, "calling rpng_win_display_image()\n")) - if (rpng_win_display_image()) { - free(image_data); - exit(4); - } - Trace((stderr, "done with rpng_win_display_image()\n")) - - - /* wait for the user to tell us when to quit */ - - printf( -#ifndef __CYGWIN__ - "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n" -#else - "Done. Press mouse button 1 (within image window) to quit.\n" -#endif - ); - fflush(stdout); - - while (GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - - /* OK, we're done: clean up all image and Windows resources and go away */ - - rpng_win_cleanup(); - - return msg.wParam; -} - - - - - -static int rpng_win_create_window(HINSTANCE hInst, int showmode) -{ - uch *dest; - int extra_width, extra_height; - ulg i, j; - WNDCLASSEX wndclass; - - -/*--------------------------------------------------------------------------- - Allocate memory for the display-specific version of the image (round up - to multiple of 4 for Windows DIB). - ---------------------------------------------------------------------------*/ - - wimage_rowbytes = ((3*image_width + 3L) >> 2) << 2; - - /* Guard against integer overflow */ - if (image_height > ((size_t)(-1))/wimage_rowbytes) { - fprintf(stderr, PROGNAME ": image_data buffer would be too large\n"); - return 4; /* fail */ - } - - if (!(dib = (uch *)malloc(sizeof(BITMAPINFOHEADER) + - wimage_rowbytes*image_height))) - { - return 4; /* fail */ - } - -/*--------------------------------------------------------------------------- - Initialize the DIB. Negative height means to use top-down BMP ordering - (must be uncompressed, but that's what we want). Bit count of 1, 4 or 8 - implies a colormap of RGBX quads, but 24-bit BMPs just use B,G,R values - directly => wimage_data begins immediately after BMP header. - ---------------------------------------------------------------------------*/ - - memset(dib, 0, sizeof(BITMAPINFOHEADER)); - bmih = (BITMAPINFOHEADER *)dib; - bmih->biSize = sizeof(BITMAPINFOHEADER); - bmih->biWidth = image_width; - bmih->biHeight = -((long)image_height); - bmih->biPlanes = 1; - bmih->biBitCount = 24; - bmih->biCompression = 0; - wimage_data = dib + sizeof(BITMAPINFOHEADER); - -/*--------------------------------------------------------------------------- - Fill in background color (black by default); data are in BGR order. - ---------------------------------------------------------------------------*/ - - for (j = 0; j < image_height; ++j) { - dest = wimage_data + j*wimage_rowbytes; - for (i = image_width; i > 0; --i) { - *dest++ = bg_blue; - *dest++ = bg_green; - *dest++ = bg_red; - } - } - -/*--------------------------------------------------------------------------- - Set the window parameters. - ---------------------------------------------------------------------------*/ - - memset(&wndclass, 0, sizeof(wndclass)); - - wndclass.cbSize = sizeof(wndclass); - wndclass.style = CS_HREDRAW | CS_VREDRAW; - wndclass.lpfnWndProc = rpng_win_wndproc; - wndclass.hInstance = hInst; - wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); - wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass.hbrBackground = (HBRUSH)GetStockObject(DKGRAY_BRUSH); - wndclass.lpszMenuName = NULL; - wndclass.lpszClassName = progname; - wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); - - RegisterClassEx(&wndclass); - -/*--------------------------------------------------------------------------- - Finally, create the window. - ---------------------------------------------------------------------------*/ - - extra_width = 2*(GetSystemMetrics(SM_CXBORDER) + - GetSystemMetrics(SM_CXDLGFRAME)); - extra_height = 2*(GetSystemMetrics(SM_CYBORDER) + - GetSystemMetrics(SM_CYDLGFRAME)) + - GetSystemMetrics(SM_CYCAPTION); - - global_hwnd = CreateWindow(progname, titlebar, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, image_width+extra_width, - image_height+extra_height, NULL, NULL, hInst, NULL); - - ShowWindow(global_hwnd, showmode); - UpdateWindow(global_hwnd); - - return 0; - -} /* end function rpng_win_create_window() */ - - - - - -static int rpng_win_display_image() -{ - uch *src, *dest; - uch r, g, b, a; - ulg i, row, lastrow; - RECT rect; - - - Trace((stderr, "beginning display loop (image_channels == %d)\n", - image_channels)) - Trace((stderr, "(width = %ld, rowbytes = %ld, wimage_rowbytes = %d)\n", - image_width, image_rowbytes, wimage_rowbytes)) - - -/*--------------------------------------------------------------------------- - Blast image data to buffer. This whole routine takes place before the - message loop begins, so there's no real point in any pseudo-progressive - display... - ---------------------------------------------------------------------------*/ - - for (lastrow = row = 0; row < image_height; ++row) { - src = image_data + row*image_rowbytes; - dest = wimage_data + row*wimage_rowbytes; - if (image_channels == 3) { - for (i = image_width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - *dest++ = b; - *dest++ = g; /* note reverse order */ - *dest++ = r; - } - } else /* if (image_channels == 4) */ { - for (i = image_width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (a == 255) { - *dest++ = b; - *dest++ = g; - *dest++ = r; - } else if (a == 0) { - *dest++ = bg_blue; - *dest++ = bg_green; - *dest++ = bg_red; - } else { - /* this macro (copied from png.h) composites the - * foreground and background values and puts the - * result into the first argument; there are no - * side effects with the first argument */ - alpha_composite(*dest++, b, a, bg_blue); - alpha_composite(*dest++, g, a, bg_green); - alpha_composite(*dest++, r, a, bg_red); - } - } - } - /* display after every 16 lines */ - if (((row+1) & 0xf) == 0) { - rect.left = 0L; - rect.top = (LONG)lastrow; - rect.right = (LONG)image_width; /* possibly off by one? */ - rect.bottom = (LONG)lastrow + 16L; /* possibly off by one? */ - InvalidateRect(global_hwnd, &rect, FALSE); - UpdateWindow(global_hwnd); /* similar to XFlush() */ - lastrow = row + 1; - } - } - - Trace((stderr, "calling final image-flush routine\n")) - if (lastrow < image_height) { - rect.left = 0L; - rect.top = (LONG)lastrow; - rect.right = (LONG)image_width; /* possibly off by one? */ - rect.bottom = (LONG)image_height; /* possibly off by one? */ - InvalidateRect(global_hwnd, &rect, FALSE); - UpdateWindow(global_hwnd); /* similar to XFlush() */ - } - -/* - last param determines whether or not background is wiped before paint - InvalidateRect(global_hwnd, NULL, TRUE); - UpdateWindow(global_hwnd); - */ - - return 0; -} - - - - - -static void rpng_win_cleanup() -{ - if (image_data) { - free(image_data); - image_data = NULL; - } - - if (dib) { - free(dib); - dib = NULL; - } -} - - - - - -LRESULT CALLBACK rpng_win_wndproc(HWND hwnd, UINT iMsg, WPARAM wP, LPARAM lP) -{ - HDC hdc; - PAINTSTRUCT ps; - int rc; - - switch (iMsg) { - case WM_CREATE: - /* one-time processing here, if any */ - return 0; - - case WM_PAINT: - hdc = BeginPaint(hwnd, &ps); - /* dest */ - rc = StretchDIBits(hdc, 0, 0, image_width, image_height, - /* source */ - 0, 0, image_width, image_height, - wimage_data, (BITMAPINFO *)bmih, - /* iUsage: no clue */ - 0, SRCCOPY); - EndPaint(hwnd, &ps); - return 0; - - /* wait for the user to tell us when to quit */ - case WM_CHAR: - switch (wP) { /* only need one, so ignore repeat count */ - case 'q': - case 'Q': - case 0x1B: /* Esc key */ - PostQuitMessage(0); - } - return 0; - - case WM_LBUTTONDOWN: /* another way of quitting */ - case WM_DESTROY: - PostQuitMessage(0); - return 0; - } - - return DefWindowProc(hwnd, iMsg, wP, lP); -} diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/rpng-x.c b/thirdparty/libpng-1.6.37/contrib/gregbook/rpng-x.c deleted file mode 100644 index 92effaa..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/rpng-x.c +++ /dev/null @@ -1,911 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng - simple PNG display program rpng-x.c - - This program decodes and displays PNG images, with gamma correction and - optionally with a user-specified background color (in case the image has - transparency). It is very nearly the most basic PNG viewer possible. - This version is for the X Window System (tested by author under Unix and - by Martin Zinser under OpenVMS; may work under OS/2 with some tweaking). - - to do: - - 8-bit (colormapped) X support - - use %.1023s to simplify truncation of title-bar string? - - --------------------------------------------------------------------------- - - Changelog: - - 1.01: initial public release - - 1.02: modified to allow abbreviated options; fixed long/ulong mis- - match; switched to png_jmpbuf() macro - - 1.10: added support for non-default visuals; fixed X pixel-conversion - - 1.11: added extra set of parentheses to png_jmpbuf() macro; fixed - command-line parsing bug - - 1.12: fixed some small X memory leaks (thanks to François Petitjean) - - 1.13: fixed XFreeGC() crash bug (thanks to Patrick Welche) - - 1.14: added support for X resources (thanks to Gerhard Niklasch) - - 2.00: dual-licensed (added GNU GPL) - - 2.01: fixed improper display of usage screen on PNG error(s) - - 2.02: Added "void(argc);" statement to quiet pedantic compiler warnings - about unused variable (GR-P) - - 2.03: check for integer overflow (Glenn R-P) - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2008, 2017 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ---------------------------------------------------------------------------*/ - -#define PROGNAME "rpng-x" -#define LONGNAME "Simple PNG Viewer for X" -#define VERSION "2.02 of 15 June 2014" -#define RESNAME "rpng" /* our X resource application name */ -#define RESCLASS "Rpng" /* our X resource class name */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* #define DEBUG : this enables the Trace() macros */ - -#include "readpng.h" /* typedefs, common macros, readpng prototypes */ - - -/* could just include png.h, but this macro is the only thing we need - * (name and typedefs changed to local versions); note that side effects - * only happen with alpha (which could easily be avoided with - * "ush acopy = (alpha);") */ - -#define alpha_composite(composite, fg, alpha, bg) { \ - ush temp = ((ush)(fg)*(ush)(alpha) + \ - (ush)(bg)*(ush)(255 - (ush)(alpha)) + (ush)128); \ - (composite) = (uch)((temp + (temp >> 8)) >> 8); \ -} - - -/* local prototypes */ -static int rpng_x_create_window(void); -static int rpng_x_display_image(void); -static void rpng_x_cleanup(void); -static int rpng_x_msb(ulg u32val); - - -static char titlebar[1024], *window_name = titlebar; -static char *appname = LONGNAME; -static char *icon_name = PROGNAME; -static char *res_name = RESNAME; -static char *res_class = RESCLASS; -static char *filename; -static FILE *infile; - -static char *bgstr; -static uch bg_red=0, bg_green=0, bg_blue=0; - -static double display_exponent; - -static ulg image_width, image_height, image_rowbytes; -static int image_channels; -static uch *image_data; - -/* X-specific variables */ -static char *displayname; -static XImage *ximage; -static Display *display; -static int depth; -static Visual *visual; -static XVisualInfo *visual_list; -static int RShift, GShift, BShift; -static ulg RMask, GMask, BMask; -static Window window; -static GC gc; -static Colormap colormap; - -static int have_nondefault_visual = FALSE; -static int have_colormap = FALSE; -static int have_window = FALSE; -static int have_gc = FALSE; -/* -ulg numcolors=0, pixels[256]; -ush reds[256], greens[256], blues[256]; - */ - - - - -int main(int argc, char **argv) -{ -#ifdef sgi - char tmpline[80]; -#endif - char *p; - int rc, alen, flen; - int error = 0; - int have_bg = FALSE; - double LUT_exponent; /* just the lookup table */ - double CRT_exponent = 2.2; /* just the monitor */ - double default_display_exponent; /* whole display system */ - XEvent e; - KeySym k; - - - displayname = (char *)NULL; - filename = (char *)NULL; - - - /* First set the default value for our display-system exponent, i.e., - * the product of the CRT exponent and the exponent corresponding to - * the frame-buffer's lookup table (LUT), if any. This is not an - * exhaustive list of LUT values (e.g., OpenStep has a lot of weird - * ones), but it should cover 99% of the current possibilities. */ - -#if defined(NeXT) - LUT_exponent = 1.0 / 2.2; - /* - if (some_next_function_that_returns_gamma(&next_gamma)) - LUT_exponent = 1.0 / next_gamma; - */ -#elif defined(sgi) - LUT_exponent = 1.0 / 1.7; - /* there doesn't seem to be any documented function to get the - * "gamma" value, so we do it the hard way */ - infile = fopen("/etc/config/system.glGammaVal", "r"); - if (infile) { - double sgi_gamma; - - fgets(tmpline, 80, infile); - fclose(infile); - sgi_gamma = atof(tmpline); - if (sgi_gamma > 0.0) - LUT_exponent = 1.0 / sgi_gamma; - } -#elif defined(Macintosh) - LUT_exponent = 1.8 / 2.61; - /* - if (some_mac_function_that_returns_gamma(&mac_gamma)) - LUT_exponent = mac_gamma / 2.61; - */ -#else - LUT_exponent = 1.0; /* assume no LUT: most PCs */ -#endif - - /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ - default_display_exponent = LUT_exponent * CRT_exponent; - - - /* If the user has set the SCREEN_GAMMA environment variable as suggested - * (somewhat imprecisely) in the libpng documentation, use that; otherwise - * use the default value we just calculated. Either way, the user may - * override this via a command-line option. */ - - if ((p = getenv("SCREEN_GAMMA")) != NULL) - display_exponent = atof(p); - else - display_exponent = default_display_exponent; - - - /* Now parse the command line for options and the PNG filename. */ - - while (*++argv && !error) { - if (!strncmp(*argv, "-display", 2)) { - if (!*++argv) - ++error; - else - displayname = *argv; - } else if (!strncmp(*argv, "-gamma", 2)) { - if (!*++argv) - ++error; - else { - display_exponent = atof(*argv); - if (display_exponent <= 0.0) - ++error; - } - } else if (!strncmp(*argv, "-bgcolor", 2)) { - if (!*++argv) - ++error; - else { - bgstr = *argv; - if (strlen(bgstr) != 7 || bgstr[0] != '#') - ++error; - else - have_bg = TRUE; - } - } else { - if (**argv != '-') { - filename = *argv; - if (argv[1]) /* shouldn't be any more args after filename */ - ++error; - } else - ++error; /* not expecting any other options */ - } - } - - if (!filename) - ++error; - - - /* print usage screen if any errors up to this point */ - - if (error) { - fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); - readpng_version_info(); - fprintf(stderr, "\n" - "Usage: %s [-display xdpy] [-gamma exp] [-bgcolor bg] file.png\n" - " xdpy\tname of the target X display (e.g., ``hostname:0'')\n" - " exp \ttransfer-function exponent (``gamma'') of the display\n" - "\t\t system in floating-point format (e.g., ``%.1f''); equal\n", - PROGNAME, default_display_exponent); - - fprintf(stderr, "\n" - "\t\t to the product of the lookup-table exponent (varies)\n" - "\t\t and the CRT exponent (usually 2.2); must be positive\n" - " bg \tdesired background color in 7-character hex RGB format\n" - "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" - "\t\t used with transparent images\n" - "\nPress Q, Esc or mouse button 1 (within image window, after image\n" - "is displayed) to quit.\n"); - exit(1); - } - - - if (!(infile = fopen(filename, "rb"))) { - fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); - ++error; - } else { - if ((rc = readpng_init(infile, &image_width, &image_height)) != 0) { - switch (rc) { - case 1: - fprintf(stderr, PROGNAME - ": [%s] is not a PNG file: incorrect signature\n", - filename); - break; - case 2: - fprintf(stderr, PROGNAME - ": [%s] has bad IHDR (libpng longjmp)\n", filename); - break; - case 4: - fprintf(stderr, PROGNAME ": insufficient memory\n"); - break; - default: - fprintf(stderr, PROGNAME - ": unknown readpng_init() error\n"); - break; - } - ++error; - } else { - display = XOpenDisplay(displayname); - if (!display) { - readpng_cleanup(TRUE); - fprintf(stderr, PROGNAME ": can't open X display [%s]\n", - displayname? displayname : "default"); - ++error; - } - } - if (error) - fclose(infile); - } - - - if (error) { - fprintf(stderr, PROGNAME ": aborting.\n"); - exit(2); - } - - - /* set the title-bar string, but make sure buffer doesn't overflow */ - - alen = strlen(appname); - flen = strlen(filename); - if (alen + flen + 3 > 1023) - sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); - else - sprintf(titlebar, "%s: %s", appname, filename); - - - /* if the user didn't specify a background color on the command line, - * check for one in the PNG file--if not, the initialized values of 0 - * (black) will be used */ - - if (have_bg) { - unsigned r, g, b; /* this approach quiets compiler warnings */ - - sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); - bg_red = (uch)r; - bg_green = (uch)g; - bg_blue = (uch)b; - } else if (readpng_get_bgcolor(&bg_red, &bg_green, &bg_blue) > 1) { - readpng_cleanup(TRUE); - fprintf(stderr, PROGNAME - ": libpng error while checking for background color\n"); - exit(2); - } - - - /* do the basic X initialization stuff, make the window and fill it - * with the background color */ - - if (rpng_x_create_window()) - exit(2); - - - /* decode the image, all at once */ - - Trace((stderr, "calling readpng_get_image()\n")) - image_data = readpng_get_image(display_exponent, &image_channels, - &image_rowbytes); - Trace((stderr, "done with readpng_get_image()\n")) - - - /* done with PNG file, so clean up to minimize memory usage (but do NOT - * nuke image_data!) */ - - readpng_cleanup(FALSE); - fclose(infile); - - if (!image_data) { - fprintf(stderr, PROGNAME ": unable to decode PNG image\n"); - exit(3); - } - - - /* display image (composite with background if requested) */ - - Trace((stderr, "calling rpng_x_display_image()\n")) - if (rpng_x_display_image()) { - free(image_data); - exit(4); - } - Trace((stderr, "done with rpng_x_display_image()\n")) - - - /* wait for the user to tell us when to quit */ - - printf( - "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); - fflush(stdout); - - do - XNextEvent(display, &e); - while (!(e.type == ButtonPress && e.xbutton.button == Button1) && - !(e.type == KeyPress && /* v--- or 1 for shifted keys */ - ((k = XLookupKeysym(&e.xkey, 0)) == XK_q || k == XK_Escape) )); - - - /* OK, we're done: clean up all image and X resources and go away */ - - rpng_x_cleanup(); - - (void)argc; /* Unused */ - - return 0; -} - - - - - -static int rpng_x_create_window(void) -{ - uch *xdata; - int need_colormap = FALSE; - int screen, pad; - ulg bg_pixel = 0L; - ulg attrmask; - Window root; - XEvent e; - XGCValues gcvalues; - XSetWindowAttributes attr; - XTextProperty windowName, *pWindowName = &windowName; - XTextProperty iconName, *pIconName = &iconName; - XVisualInfo visual_info; - XSizeHints *size_hints; - XWMHints *wm_hints; - XClassHint *class_hints; - - - screen = DefaultScreen(display); - depth = DisplayPlanes(display, screen); - root = RootWindow(display, screen); - -#ifdef DEBUG - XSynchronize(display, True); -#endif - -#if 0 -/* GRR: add 8-bit support */ - if (/* depth != 8 && */ depth != 16 && depth != 24 && depth != 32) { - fprintf(stderr, - "screen depth %d not supported (only 16-, 24- or 32-bit TrueColor)\n", - depth); - return 2; - } - - XMatchVisualInfo(display, screen, depth, - (depth == 8)? PseudoColor : TrueColor, &visual_info); - visual = visual_info.visual; -#else - if (depth != 16 && depth != 24 && depth != 32) { - int visuals_matched = 0; - - Trace((stderr, "default depth is %d: checking other visuals\n", - depth)) - - /* 24-bit first */ - visual_info.screen = screen; - visual_info.depth = 24; - visual_list = XGetVisualInfo(display, - VisualScreenMask | VisualDepthMask, &visual_info, &visuals_matched); - if (visuals_matched == 0) { -/* GRR: add 15-, 16- and 32-bit TrueColor visuals (also DirectColor?) */ - fprintf(stderr, "default screen depth %d not supported, and no" - " 24-bit visuals found\n", depth); - return 2; - } - Trace((stderr, "XGetVisualInfo() returned %d 24-bit visuals\n", - visuals_matched)) - visual = visual_list[0].visual; - depth = visual_list[0].depth; -/* - colormap_size = visual_list[0].colormap_size; - visual_class = visual->class; - visualID = XVisualIDFromVisual(visual); - */ - have_nondefault_visual = TRUE; - need_colormap = TRUE; - } else { - XMatchVisualInfo(display, screen, depth, TrueColor, &visual_info); - visual = visual_info.visual; - } -#endif - - RMask = visual->red_mask; - GMask = visual->green_mask; - BMask = visual->blue_mask; - -/* GRR: add/check 8-bit support */ - if (depth == 8 || need_colormap) { - colormap = XCreateColormap(display, root, visual, AllocNone); - if (!colormap) { - fprintf(stderr, "XCreateColormap() failed\n"); - return 2; - } - have_colormap = TRUE; - } - if (depth == 15 || depth == 16) { - RShift = 15 - rpng_x_msb(RMask); /* these are right-shifts */ - GShift = 15 - rpng_x_msb(GMask); - BShift = 15 - rpng_x_msb(BMask); - } else if (depth > 16) { -#define NO_24BIT_MASKS -#ifdef NO_24BIT_MASKS - RShift = rpng_x_msb(RMask) - 7; /* these are left-shifts */ - GShift = rpng_x_msb(GMask) - 7; - BShift = rpng_x_msb(BMask) - 7; -#else - RShift = 7 - rpng_x_msb(RMask); /* these are right-shifts, too */ - GShift = 7 - rpng_x_msb(GMask); - BShift = 7 - rpng_x_msb(BMask); -#endif - } - if (depth >= 15 && (RShift < 0 || GShift < 0 || BShift < 0)) { - fprintf(stderr, "rpng internal logic error: negative X shift(s)!\n"); - return 2; - } - -/*--------------------------------------------------------------------------- - Finally, create the window. - ---------------------------------------------------------------------------*/ - - attr.backing_store = Always; - attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask; - attrmask = CWBackingStore | CWEventMask; - if (have_nondefault_visual) { - attr.colormap = colormap; - attr.background_pixel = 0; - attr.border_pixel = 1; - attrmask |= CWColormap | CWBackPixel | CWBorderPixel; - } - - window = XCreateWindow(display, root, 0, 0, image_width, image_height, 0, - depth, InputOutput, visual, attrmask, &attr); - - if (window == None) { - fprintf(stderr, "XCreateWindow() failed\n"); - return 2; - } else - have_window = TRUE; - - if (depth == 8) - XSetWindowColormap(display, window, colormap); - - if (!XStringListToTextProperty(&window_name, 1, pWindowName)) - pWindowName = NULL; - if (!XStringListToTextProperty(&icon_name, 1, pIconName)) - pIconName = NULL; - - /* OK if any hints allocation fails; XSetWMProperties() allows NULLs */ - - if ((size_hints = XAllocSizeHints()) != NULL) { - /* window will not be resizable */ - size_hints->flags = PMinSize | PMaxSize; - size_hints->min_width = size_hints->max_width = (int)image_width; - size_hints->min_height = size_hints->max_height = (int)image_height; - } - - if ((wm_hints = XAllocWMHints()) != NULL) { - wm_hints->initial_state = NormalState; - wm_hints->input = True; - /* wm_hints->icon_pixmap = icon_pixmap; */ - wm_hints->flags = StateHint | InputHint /* | IconPixmapHint */ ; - } - - if ((class_hints = XAllocClassHint()) != NULL) { - class_hints->res_name = res_name; - class_hints->res_class = res_class; - } - - XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0, - size_hints, wm_hints, class_hints); - - /* various properties and hints no longer needed; free memory */ - if (pWindowName) - XFree(pWindowName->value); - if (pIconName) - XFree(pIconName->value); - if (size_hints) - XFree(size_hints); - if (wm_hints) - XFree(wm_hints); - if (class_hints) - XFree(class_hints); - - XMapWindow(display, window); - - gc = XCreateGC(display, window, 0, &gcvalues); - have_gc = TRUE; - -/*--------------------------------------------------------------------------- - Fill window with the specified background color. - ---------------------------------------------------------------------------*/ - - if (depth == 24 || depth == 32) { - bg_pixel = ((ulg)bg_red << RShift) | - ((ulg)bg_green << GShift) | - ((ulg)bg_blue << BShift); - } else if (depth == 16) { - bg_pixel = ((((ulg)bg_red << 8) >> RShift) & RMask) | - ((((ulg)bg_green << 8) >> GShift) & GMask) | - ((((ulg)bg_blue << 8) >> BShift) & BMask); - } else /* depth == 8 */ { - - /* GRR: add 8-bit support */ - - } - - XSetForeground(display, gc, bg_pixel); - XFillRectangle(display, window, gc, 0, 0, image_width, image_height); - -/*--------------------------------------------------------------------------- - Wait for first Expose event to do any drawing, then flush. - ---------------------------------------------------------------------------*/ - - do - XNextEvent(display, &e); - while (e.type != Expose || e.xexpose.count); - - XFlush(display); - -/*--------------------------------------------------------------------------- - Allocate memory for the X- and display-specific version of the image. - ---------------------------------------------------------------------------*/ - - if (depth == 24 || depth == 32) { - xdata = (uch *)malloc(4*image_width*image_height); - pad = 32; - } else if (depth == 16) { - xdata = (uch *)malloc(2*image_width*image_height); - pad = 16; - } else /* depth == 8 */ { - xdata = (uch *)malloc(image_width*image_height); - pad = 8; - } - - if (!xdata) { - fprintf(stderr, PROGNAME ": unable to allocate image memory\n"); - return 4; - } - - ximage = XCreateImage(display, visual, depth, ZPixmap, 0, - (char *)xdata, image_width, image_height, pad, 0); - - if (!ximage) { - fprintf(stderr, PROGNAME ": XCreateImage() failed\n"); - free(xdata); - return 3; - } - - /* to avoid testing the byte order every pixel (or doubling the size of - * the drawing routine with a giant if-test), we arbitrarily set the byte - * order to MSBFirst and let Xlib worry about inverting things on little- - * endian machines (like Linux/x86, old VAXen, etc.)--this is not the most - * efficient approach (the giant if-test would be better), but in the - * interest of clarity, we take the easy way out... */ - - ximage->byte_order = MSBFirst; - - return 0; - -} /* end function rpng_x_create_window() */ - - - - - -static int rpng_x_display_image(void) -{ - uch *src; - char *dest; - uch r, g, b, a; - ulg i, row, lastrow = 0; - ulg pixel; - int ximage_rowbytes = ximage->bytes_per_line; -/* int bpp = ximage->bits_per_pixel; */ - - - Trace((stderr, "beginning display loop (image_channels == %d)\n", - image_channels)) - Trace((stderr, " (width = %ld, rowbytes = %ld, ximage_rowbytes = %d)\n", - image_width, image_rowbytes, ximage_rowbytes)) - Trace((stderr, " (bpp = %d)\n", ximage->bits_per_pixel)) - Trace((stderr, " (byte_order = %s)\n", ximage->byte_order == MSBFirst? - "MSBFirst" : (ximage->byte_order == LSBFirst? "LSBFirst" : "unknown"))) - - if (depth == 24 || depth == 32) { - ulg red, green, blue; - - for (lastrow = row = 0; row < image_height; ++row) { - src = image_data + row*image_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - if (image_channels == 3) { - for (i = image_width; i > 0; --i) { - red = *src++; - green = *src++; - blue = *src++; -#ifdef NO_24BIT_MASKS - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - /* GRR BUG: this assumes bpp == 32, but may be 24: */ - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); -#else - red = (RShift < 0)? red << (-RShift) : red >> RShift; - green = (GShift < 0)? green << (-GShift) : green >> GShift; - blue = (BShift < 0)? blue << (-BShift) : blue >> BShift; - pixel = (red & RMask) | (green & GMask) | (blue & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); -#endif - } - } else /* if (image_channels == 4) */ { - for (i = image_width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (a == 255) { - red = r; - green = g; - blue = b; - } else if (a == 0) { - red = bg_red; - green = bg_green; - blue = bg_blue; - } else { - /* this macro (from png.h) composites the foreground - * and background values and puts the result into the - * first argument */ - alpha_composite(red, r, a, bg_red); - alpha_composite(green, g, a, bg_green); - alpha_composite(blue, b, a, bg_blue); - } - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - /* display after every 16 lines */ - if (((row+1) & 0xf) == 0) { - XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, - (int)lastrow, image_width, 16); - XFlush(display); - lastrow = row + 1; - } - } - - } else if (depth == 16) { - ush red, green, blue; - - for (lastrow = row = 0; row < image_height; ++row) { - src = image_data + row*image_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - if (image_channels == 3) { - for (i = image_width; i > 0; --i) { - red = ((ush)(*src) << 8); - ++src; - green = ((ush)(*src) << 8); - ++src; - blue = ((ush)(*src) << 8); - ++src; - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } else /* if (image_channels == 4) */ { - for (i = image_width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (a == 255) { - red = ((ush)r << 8); - green = ((ush)g << 8); - blue = ((ush)b << 8); - } else if (a == 0) { - red = ((ush)bg_red << 8); - green = ((ush)bg_green << 8); - blue = ((ush)bg_blue << 8); - } else { - /* this macro (from png.h) composites the foreground - * and background values and puts the result back into - * the first argument (== fg byte here: safe) */ - alpha_composite(r, r, a, bg_red); - alpha_composite(g, g, a, bg_green); - alpha_composite(b, b, a, bg_blue); - red = ((ush)r << 8); - green = ((ush)g << 8); - blue = ((ush)b << 8); - } - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - /* display after every 16 lines */ - if (((row+1) & 0xf) == 0) { - XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, - (int)lastrow, image_width, 16); - XFlush(display); - lastrow = row + 1; - } - } - - } else /* depth == 8 */ { - - /* GRR: add 8-bit support */ - - } - - Trace((stderr, "calling final XPutImage()\n")) - if (lastrow < image_height) { - XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, - (int)lastrow, image_width, image_height-lastrow); - XFlush(display); - } - - return 0; -} - - - - -static void rpng_x_cleanup(void) -{ - if (image_data) { - free(image_data); - image_data = NULL; - } - - if (ximage) { - if (ximage->data) { - free(ximage->data); /* we allocated it, so we free it */ - ximage->data = (char *)NULL; /* instead of XDestroyImage() */ - } - XDestroyImage(ximage); - ximage = NULL; - } - - if (have_gc) - XFreeGC(display, gc); - - if (have_window) - XDestroyWindow(display, window); - - if (have_colormap) - XFreeColormap(display, colormap); - - if (have_nondefault_visual) - XFree(visual_list); -} - - - - - -static int rpng_x_msb(ulg u32val) -{ - int i; - - for (i = 31; i >= 0; --i) { - if (u32val & 0x80000000L) - break; - u32val <<= 1; - } - return i; -} diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/rpng2-win.c b/thirdparty/libpng-1.6.37/contrib/gregbook/rpng2-win.c deleted file mode 100644 index ed6b526..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/rpng2-win.c +++ /dev/null @@ -1,1261 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng2 - progressive-model PNG display program rpng2-win.c - - This program decodes and displays PNG files progressively, as if it were - a web browser (though the front end is only set up to read from files). - It supports gamma correction, user-specified background colors, and user- - specified background patterns (for transparent images). This version is - for 32-bit Windows; it may compile under 16-bit Windows with a little - tweaking (or maybe not). Thanks to Adam Costello and Pieter S. van der - Meulen for the "diamond" and "radial waves" patterns, respectively. - - to do (someday, maybe): - - handle quoted command-line args (especially filenames with spaces) - - finish resizable checkerboard-gradient (sizes 4-128?) - - use %.1023s to simplify truncation of title-bar string? - - have minimum window width: oh well - - --------------------------------------------------------------------------- - - Changelog: - - 1.01: initial public release - - 1.02: fixed cut-and-paste error in usage screen (oops...) - - 1.03: modified to allow abbreviated options - - 1.04: removed bogus extra argument from usage fprintf() [Glenn R-P?]; - fixed command-line parsing bug - - 1.10: enabled "message window"/console (thanks to David Geldreich) - - 1.20: added runtime MMX-enabling/disabling and new -mmx* options - - 1.21: made minor tweak to usage screen to fit within 25-line console - - 1.22: added AMD64/EM64T support (__x86_64__) - - 2.00: dual-licensed (added GNU GPL) - - 2.01: fixed 64-bit typo in readpng2.c - - 2.02: fixed improper display of usage screen on PNG error(s); fixed - unexpected-EOF and file-read-error cases - - 2.03: removed runtime MMX-enabling/disabling and obsolete -mmx* options - - 2.04: check for integer overflow (Glenn R-P) - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2008, 2017 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ---------------------------------------------------------------------------*/ - -#define PROGNAME "rpng2-win" -#define LONGNAME "Progressive PNG Viewer for Windows" -#define VERSION "2.02 of 16 March 2008" - -#include -#include -#include -#include /* for jmpbuf declaration in readpng2.h */ -#include -#include /* only for PvdM background code */ -#include -#ifdef __CYGWIN__ -/* getch replacement. Turns out, we don't really need this, - * but leave it here if we ever enable any of the uses of - * _getch in the main code - */ -#include -#include -#include -int repl_getch( void ) -{ - char ch; - int fd = fileno(stdin); - struct termio old_tty, new_tty; - - ioctl(fd, TCGETA, &old_tty); - new_tty = old_tty; - new_tty.c_lflag &= ~(ICANON | ECHO | ISIG); - ioctl(fd, TCSETA, &new_tty); - fread(&ch, 1, sizeof(ch), stdin); - ioctl(fd, TCSETA, &old_tty); - - return ch; -} -#define _getch repl_getch -#else -#include /* only for _getch() */ -#endif - -/* all for PvdM background code: */ -#ifndef PI -# define PI 3.141592653589793238 -#endif -#define PI_2 (PI*0.5) -#define INV_PI_360 (360.0 / PI) -#define MAX(a,b) (a>b?a:b) -#define MIN(a,b) (a> 8)) >> 8); \ -} - - -#define INBUFSIZE 4096 /* with pseudo-timing on (1 sec delay/block), this - * block size corresponds roughly to a download - * speed 10% faster than theoretical 33.6K maximum - * (assuming 8 data bits, 1 stop bit and no other - * overhead) */ - -/* local prototypes */ -static void rpng2_win_init(void); -static int rpng2_win_create_window(void); -static int rpng2_win_load_bg_image(void); -static void rpng2_win_display_row(ulg row); -static void rpng2_win_finish_display(void); -static void rpng2_win_cleanup(void); -LRESULT CALLBACK rpng2_win_wndproc(HWND, UINT, WPARAM, LPARAM); - - -static char titlebar[1024]; -static char *progname = PROGNAME; -static char *appname = LONGNAME; -static char *filename; -static FILE *infile; - -static mainprog_info rpng2_info; - -static uch inbuf[INBUFSIZE]; -static int incount; - -static int pat = 6; /* must be less than num_bgpat */ -static int bg_image = 0; -static int bgscale = 16; -static ulg bg_rowbytes; -static uch *bg_data; - -static struct rgb_color { - uch r, g, b; -} rgb[] = { - { 0, 0, 0}, /* 0: black */ - {255, 255, 255}, /* 1: white */ - {173, 132, 57}, /* 2: tan */ - { 64, 132, 0}, /* 3: medium green */ - {189, 117, 1}, /* 4: gold */ - {253, 249, 1}, /* 5: yellow */ - { 0, 0, 255}, /* 6: blue */ - { 0, 0, 120}, /* 7: medium blue */ - {255, 0, 255}, /* 8: magenta */ - { 64, 0, 64}, /* 9: dark magenta */ - {255, 0, 0}, /* 10: red */ - { 64, 0, 0}, /* 11: dark red */ - {255, 127, 0}, /* 12: orange */ - {192, 96, 0}, /* 13: darker orange */ - { 24, 60, 0}, /* 14: dark green-yellow */ - { 85, 125, 200} /* 15: ice blue */ -}; -/* not used for now, but should be for error-checking: -static int num_rgb = sizeof(rgb) / sizeof(struct rgb_color); - */ - -/* - This whole struct is a fairly cheesy way to keep the number of - command-line options to a minimum. The radial-waves background - type is a particularly poor fit to the integer elements of the - struct...but a few macros and a little fixed-point math will do - wonders for ya. - - type bits: - F E D C B A 9 8 7 6 5 4 3 2 1 0 - | | | | | - | | +-+-+-- 0 = sharp-edged checkerboard - | | 1 = soft diamonds - | | 2 = radial waves - | | 3-7 = undefined - | +-- gradient #2 inverted? - +-- alternating columns inverted? - */ -static struct background_pattern { - ush type; - int rgb1_max, rgb1_min; /* or bg_freq, bg_gray */ - int rgb2_max, rgb2_min; /* or bg_bsat, bg_brot (both scaled by 10)*/ -} bg[] = { - {0+8, 2,0, 1,15}, /* checkered: tan/black vs. white/ice blue */ - {0+24, 2,0, 1,0}, /* checkered: tan/black vs. white/black */ - {0+8, 4,5, 0,2}, /* checkered: gold/yellow vs. black/tan */ - {0+8, 4,5, 0,6}, /* checkered: gold/yellow vs. black/blue */ - {0, 7,0, 8,9}, /* checkered: deep blue/black vs. magenta */ - {0+8, 13,0, 5,14}, /* checkered: orange/black vs. yellow */ - {0+8, 12,0, 10,11}, /* checkered: orange/black vs. red */ - {1, 7,0, 8,0}, /* diamonds: deep blue/black vs. magenta */ - {1, 12,0, 11,0}, /* diamonds: orange vs. dark red */ - {1, 10,0, 7,0}, /* diamonds: red vs. medium blue */ - {1, 4,0, 5,0}, /* diamonds: gold vs. yellow */ - {1, 3,0, 0,0}, /* diamonds: medium green vs. black */ - {2, 16, 100, 20, 0}, /* radial: ~hard radial color-beams */ - {2, 18, 100, 10, 2}, /* radial: soft, curved radial color-beams */ - {2, 16, 256, 100, 250}, /* radial: very tight spiral */ - {2, 10000, 256, 11, 0} /* radial: dipole-moire' (almost fractal) */ -}; -static int num_bgpat = sizeof(bg) / sizeof(struct background_pattern); - - -/* Windows-specific global variables (could go in struct, but messy...) */ -static ulg wimage_rowbytes; -static uch *dib; -static uch *wimage_data; -static BITMAPINFOHEADER *bmih; - -static HWND global_hwnd; -static HINSTANCE global_hInst; -static int global_showmode; - - - - -int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) -{ - char *args[1024]; /* arbitrary limit, but should suffice */ - char **argv = args; - char *p, *q, *bgstr = NULL; - int argc = 0; - int rc, alen, flen; - int error = 0; - int timing = FALSE; - int have_bg = FALSE; - double LUT_exponent; /* just the lookup table */ - double CRT_exponent = 2.2; /* just the monitor */ - double default_display_exponent; /* whole display system */ - MSG msg; - - - /* First initialize a few things, just to be sure--memset takes care of - * default background color (black), booleans (FALSE), pointers (NULL), - * etc. */ - - global_hInst = hInst; - global_showmode = showmode; - filename = (char *)NULL; - memset(&rpng2_info, 0, sizeof(mainprog_info)); - -#ifndef __CYGWIN__ - /* Next reenable console output, which normally goes to the bit bucket - * for windowed apps. Closing the console window will terminate the - * app. Thanks to David.Geldreich at realviz.com for supplying the magical - * incantation. */ - - AllocConsole(); - freopen("CONOUT$", "a", stderr); - freopen("CONOUT$", "a", stdout); -#endif - - /* Set the default value for our display-system exponent, i.e., the - * product of the CRT exponent and the exponent corresponding to - * the frame-buffer's lookup table (LUT), if any. This is not an - * exhaustive list of LUT values (e.g., OpenStep has a lot of weird - * ones), but it should cover 99% of the current possibilities. And - * yes, these ifdefs are completely wasted in a Windows program... */ - -#if defined(NeXT) - /* third-party utilities can modify the default LUT exponent */ - LUT_exponent = 1.0 / 2.2; - /* - if (some_next_function_that_returns_gamma(&next_gamma)) - LUT_exponent = 1.0 / next_gamma; - */ -#elif defined(sgi) - LUT_exponent = 1.0 / 1.7; - /* there doesn't seem to be any documented function to - * get the "gamma" value, so we do it the hard way */ - infile = fopen("/etc/config/system.glGammaVal", "r"); - if (infile) { - double sgi_gamma; - - fgets(tmpline, 80, infile); - fclose(infile); - sgi_gamma = atof(tmpline); - if (sgi_gamma > 0.0) - LUT_exponent = 1.0 / sgi_gamma; - } -#elif defined(Macintosh) - LUT_exponent = 1.8 / 2.61; - /* - if (some_mac_function_that_returns_gamma(&mac_gamma)) - LUT_exponent = mac_gamma / 2.61; - */ -#else - LUT_exponent = 1.0; /* assume no LUT: most PCs */ -#endif - - /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ - default_display_exponent = LUT_exponent * CRT_exponent; - - - /* If the user has set the SCREEN_GAMMA environment variable as suggested - * (somewhat imprecisely) in the libpng documentation, use that; otherwise - * use the default value we just calculated. Either way, the user may - * override this via a command-line option. */ - - if ((p = getenv("SCREEN_GAMMA")) != NULL) - rpng2_info.display_exponent = atof(p); - else - rpng2_info.display_exponent = default_display_exponent; - - - /* Windows really hates command lines, so we have to set up our own argv. - * Note that we do NOT bother with quoted arguments here, so don't use - * filenames with spaces in 'em! */ - - argv[argc++] = PROGNAME; - p = cmd; - for (;;) { - if (*p == ' ') - while (*++p == ' ') - ; - /* now p points at the first non-space after some spaces */ - if (*p == '\0') - break; /* nothing after the spaces: done */ - argv[argc++] = q = p; - while (*q && *q != ' ') - ++q; - /* now q points at a space or the end of the string */ - if (*q == '\0') - break; /* last argv already terminated; quit */ - *q = '\0'; /* change space to terminator */ - p = q + 1; - } - argv[argc] = NULL; /* terminate the argv array itself */ - - - /* Now parse the command line for options and the PNG filename. */ - - while (*++argv && !error) { - if (!strncmp(*argv, "-gamma", 2)) { - if (!*++argv) - ++error; - else { - rpng2_info.display_exponent = atof(*argv); - if (rpng2_info.display_exponent <= 0.0) - ++error; - } - } else if (!strncmp(*argv, "-bgcolor", 4)) { - if (!*++argv) - ++error; - else { - bgstr = *argv; - if (strlen(bgstr) != 7 || bgstr[0] != '#') - ++error; - else { - have_bg = TRUE; - bg_image = FALSE; - } - } - } else if (!strncmp(*argv, "-bgpat", 4)) { - if (!*++argv) - ++error; - else { - pat = atoi(*argv) - 1; - if (pat < 0 || pat >= num_bgpat) - ++error; - else { - bg_image = TRUE; - have_bg = FALSE; - } - } - } else if (!strncmp(*argv, "-timing", 2)) { - timing = TRUE; - } else { - if (**argv != '-') { - filename = *argv; - if (argv[1]) /* shouldn't be any more args after filename */ - ++error; - } else - ++error; /* not expecting any other options */ - } - } - - if (!filename) - ++error; - - - /* print usage screen if any errors up to this point */ - - if (error) { -#ifndef __CYGWIN__ - int ch; -#endif - - fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); - readpng2_version_info(); - fprintf(stderr, "\n" - "Usage: %s [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing]\n" - " %*s file.png\n\n" - " exp \ttransfer-function exponent (``gamma'') of the display\n" - "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" - "\t\t to the product of the lookup-table exponent (varies)\n" - "\t\t and the CRT exponent (usually 2.2); must be positive\n" - " bg \tdesired background color in 7-character hex RGB format\n" - "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" - "\t\t used with transparent images; overrides -bgpat option\n" - " pat \tdesired background pattern number (1-%d); used with\n" - "\t\t transparent images; overrides -bgcolor option\n" - " -timing\tenables delay for every block read, to simulate modem\n" - "\t\t download of image (~36 Kbps)\n" - "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n" -#ifndef __CYGWIN__ - "Press Q or Esc to quit this usage screen. ", -#else - , -#endif - PROGNAME, -#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) && \ - !(defined(__CYGWIN__) || defined(__MINGW32__)) - (int)strlen(PROGNAME), " ", -#endif - (int)strlen(PROGNAME), " ", default_display_exponent, num_bgpat); - fflush(stderr); -#ifndef __CYGWIN__ - do - ch = _getch(); - while (ch != 'q' && ch != 'Q' && ch != 0x1B); -#endif - exit(1); - } - - - if (!(infile = fopen(filename, "rb"))) { - fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); - ++error; - } else { - incount = fread(inbuf, 1, INBUFSIZE, infile); - if (incount < 8 || !readpng2_check_sig(inbuf, 8)) { - fprintf(stderr, PROGNAME - ": [%s] is not a PNG file: incorrect signature\n", - filename); - ++error; - } else if ((rc = readpng2_init(&rpng2_info)) != 0) { - switch (rc) { - case 2: - fprintf(stderr, PROGNAME - ": [%s] has bad IHDR (libpng longjmp)\n", filename); - break; - case 4: - fprintf(stderr, PROGNAME ": insufficient memory\n"); - break; - default: - fprintf(stderr, PROGNAME - ": unknown readpng2_init() error\n"); - break; - } - ++error; - } - if (error) - fclose(infile); - } - - - if (error) { -#ifndef __CYGWIN__ - int ch; -#endif - - fprintf(stderr, PROGNAME ": aborting.\n"); -#ifndef __CYGWIN__ - do - ch = _getch(); - while (ch != 'q' && ch != 'Q' && ch != 0x1B); -#endif - exit(2); - } else { - fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); -#ifndef __CYGWIN__ - fprintf(stderr, - "\n [console window: closing this window will terminate %s]\n\n", - PROGNAME); -#endif - fflush(stderr); - } - - - /* set the title-bar string, but make sure buffer doesn't overflow */ - - alen = strlen(appname); - flen = strlen(filename); - if (alen + flen + 3 > 1023) - sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); - else - sprintf(titlebar, "%s: %s", appname, filename); - - - /* set some final rpng2_info variables before entering main data loop */ - - if (have_bg) { - unsigned r, g, b; /* this approach quiets compiler warnings */ - - sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); - rpng2_info.bg_red = (uch)r; - rpng2_info.bg_green = (uch)g; - rpng2_info.bg_blue = (uch)b; - } else - rpng2_info.need_bgcolor = TRUE; - - rpng2_info.state = kPreInit; - rpng2_info.mainprog_init = rpng2_win_init; - rpng2_info.mainprog_display_row = rpng2_win_display_row; - rpng2_info.mainprog_finish_display = rpng2_win_finish_display; - - - /* OK, this is the fun part: call readpng2_decode_data() at the start of - * the loop to deal with our first buffer of data (read in above to verify - * that the file is a PNG image), then loop through the file and continue - * calling the same routine to handle each chunk of data. It in turn - * passes the data to libpng, which will invoke one or more of our call- - * backs as decoded data become available. We optionally call Sleep() for - * one second per iteration to simulate downloading the image via an analog - * modem. */ - - for (;;) { - Trace((stderr, "about to call readpng2_decode_data()\n")) - if (readpng2_decode_data(&rpng2_info, inbuf, incount)) - ++error; - Trace((stderr, "done with readpng2_decode_data()\n")) - - if (error || incount != INBUFSIZE || rpng2_info.state == kDone) { - if (rpng2_info.state == kDone) { - Trace((stderr, "done decoding PNG image\n")) - } else if (ferror(infile)) { - fprintf(stderr, PROGNAME - ": error while reading PNG image file\n"); - exit(3); - } else if (feof(infile)) { - fprintf(stderr, PROGNAME ": end of file reached " - "(unexpectedly) while reading PNG image file\n"); - exit(3); - } else /* if (error) */ { - /* will print error message below */ - } - break; - } - - if (timing) - Sleep(1000L); - - incount = fread(inbuf, 1, INBUFSIZE, infile); - } - - - /* clean up PNG stuff and report any decoding errors */ - - fclose(infile); - Trace((stderr, "about to call readpng2_cleanup()\n")) - readpng2_cleanup(&rpng2_info); - - if (error) { - fprintf(stderr, PROGNAME ": libpng error while decoding PNG image\n"); - exit(3); - } - - - /* wait for the user to tell us when to quit */ - - while (GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - - /* we're done: clean up all image and Windows resources and go away */ - - Trace((stderr, "about to call rpng2_win_cleanup()\n")) - rpng2_win_cleanup(); - - return msg.wParam; -} - - - - - -/* this function is called by readpng2_info_callback() in readpng2.c, which - * in turn is called by libpng after all of the pre-IDAT chunks have been - * read and processed--i.e., we now have enough info to finish initializing */ - -static void rpng2_win_init() -{ - ulg i; - ulg rowbytes = rpng2_info.rowbytes; - - Trace((stderr, "beginning rpng2_win_init()\n")) - Trace((stderr, " rowbytes = %d\n", rpng2_info.rowbytes)) - Trace((stderr, " width = %ld\n", rpng2_info.width)) - Trace((stderr, " height = %ld\n", rpng2_info.height)) - - /* Guard against integer overflow */ - if (rpng2_info.height > ((size_t)(-1))/rowbytes) { - fprintf(stderr, PROGNAME ": image_data buffer would be too large\n", - readpng2_cleanup(&rpng2_info); - return; - } - - rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height); - if (!rpng2_info.image_data) { - readpng2_cleanup(&rpng2_info); - return; - } - - rpng2_info.row_pointers = (uch **)malloc(rpng2_info.height * sizeof(uch *)); - if (!rpng2_info.row_pointers) { - free(rpng2_info.image_data); - rpng2_info.image_data = NULL; - readpng2_cleanup(&rpng2_info); - return; - } - - for (i = 0; i < rpng2_info.height; ++i) - rpng2_info.row_pointers[i] = rpng2_info.image_data + i*rowbytes; - -/*--------------------------------------------------------------------------- - Do the basic Windows initialization stuff, make the window, and fill it - with the user-specified, file-specified or default background color. - ---------------------------------------------------------------------------*/ - - if (rpng2_win_create_window()) { - readpng2_cleanup(&rpng2_info); - return; - } - - rpng2_info.state = kWindowInit; -} - - - - - -static int rpng2_win_create_window() -{ - uch bg_red = rpng2_info.bg_red; - uch bg_green = rpng2_info.bg_green; - uch bg_blue = rpng2_info.bg_blue; - uch *dest; - int extra_width, extra_height; - ulg i, j; - WNDCLASSEX wndclass; - RECT rect; - - -/*--------------------------------------------------------------------------- - Allocate memory for the display-specific version of the image (round up - to multiple of 4 for Windows DIB). - ---------------------------------------------------------------------------*/ - - wimage_rowbytes = ((3*rpng2_info.width + 3L) >> 2) << 2; - - if (!(dib = (uch *)malloc(sizeof(BITMAPINFOHEADER) + - wimage_rowbytes*rpng2_info.height))) - { - return 4; /* fail */ - } - -/*--------------------------------------------------------------------------- - Initialize the DIB. Negative height means to use top-down BMP ordering - (must be uncompressed, but that's what we want). Bit count of 1, 4 or 8 - implies a colormap of RGBX quads, but 24-bit BMPs just use B,G,R values - directly => wimage_data begins immediately after BMP header. - ---------------------------------------------------------------------------*/ - - memset(dib, 0, sizeof(BITMAPINFOHEADER)); - bmih = (BITMAPINFOHEADER *)dib; - bmih->biSize = sizeof(BITMAPINFOHEADER); - bmih->biWidth = rpng2_info.width; - bmih->biHeight = -((long)rpng2_info.height); - bmih->biPlanes = 1; - bmih->biBitCount = 24; - bmih->biCompression = 0; - wimage_data = dib + sizeof(BITMAPINFOHEADER); - -/*--------------------------------------------------------------------------- - Fill window with the specified background color (default is black), but - defer loading faked "background image" until window is displayed (may be - slow to compute). Data are in BGR order. - ---------------------------------------------------------------------------*/ - - if (bg_image) { /* just fill with black for now */ - memset(wimage_data, 0, wimage_rowbytes*rpng2_info.height); - } else { - for (j = 0; j < rpng2_info.height; ++j) { - dest = wimage_data + j*wimage_rowbytes; - for (i = rpng2_info.width; i > 0; --i) { - *dest++ = bg_blue; - *dest++ = bg_green; - *dest++ = bg_red; - } - } - } - -/*--------------------------------------------------------------------------- - Set the window parameters. - ---------------------------------------------------------------------------*/ - - memset(&wndclass, 0, sizeof(wndclass)); - - wndclass.cbSize = sizeof(wndclass); - wndclass.style = CS_HREDRAW | CS_VREDRAW; - wndclass.lpfnWndProc = rpng2_win_wndproc; - wndclass.hInstance = global_hInst; - wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); - wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass.hbrBackground = (HBRUSH)GetStockObject(DKGRAY_BRUSH); - wndclass.lpszMenuName = NULL; - wndclass.lpszClassName = progname; - wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); - - RegisterClassEx(&wndclass); - -/*--------------------------------------------------------------------------- - Finally, create the window. - ---------------------------------------------------------------------------*/ - - extra_width = 2*(GetSystemMetrics(SM_CXBORDER) + - GetSystemMetrics(SM_CXDLGFRAME)); - extra_height = 2*(GetSystemMetrics(SM_CYBORDER) + - GetSystemMetrics(SM_CYDLGFRAME)) + - GetSystemMetrics(SM_CYCAPTION); - - global_hwnd = CreateWindow(progname, titlebar, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, rpng2_info.width+extra_width, - rpng2_info.height+extra_height, NULL, NULL, global_hInst, NULL); - - ShowWindow(global_hwnd, global_showmode); - UpdateWindow(global_hwnd); - -/*--------------------------------------------------------------------------- - Now compute the background image and display it. If it fails (memory - allocation), revert to a plain background color. - ---------------------------------------------------------------------------*/ - - if (bg_image) { - static const char *msg = "Computing background image..."; - int x, y, len = strlen(msg); - HDC hdc = GetDC(global_hwnd); - TEXTMETRIC tm; - - GetTextMetrics(hdc, &tm); - x = (rpng2_info.width - len*tm.tmAveCharWidth)/2; - y = (rpng2_info.height - tm.tmHeight)/2; - SetBkMode(hdc, TRANSPARENT); - SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); - /* this can still begin out of bounds even if x is positive (???): */ - TextOut(hdc, ((x < 0)? 0 : x), ((y < 0)? 0 : y), msg, len); - ReleaseDC(global_hwnd, hdc); - - rpng2_win_load_bg_image(); /* resets bg_image if fails */ - } - - if (!bg_image) { - for (j = 0; j < rpng2_info.height; ++j) { - dest = wimage_data + j*wimage_rowbytes; - for (i = rpng2_info.width; i > 0; --i) { - *dest++ = bg_blue; - *dest++ = bg_green; - *dest++ = bg_red; - } - } - } - - rect.left = 0L; - rect.top = 0L; - rect.right = (LONG)rpng2_info.width; /* possibly off by one? */ - rect.bottom = (LONG)rpng2_info.height; /* possibly off by one? */ - InvalidateRect(global_hwnd, &rect, FALSE); - UpdateWindow(global_hwnd); /* similar to XFlush() */ - - return 0; - -} /* end function rpng2_win_create_window() */ - - - - - -static int rpng2_win_load_bg_image() -{ - uch *src, *dest; - uch r1, r2, g1, g2, b1, b2; - uch r1_inv, r2_inv, g1_inv, g2_inv, b1_inv, b2_inv; - int k, hmax, max; - int xidx, yidx, yidx_max = (bgscale-1); - int even_odd_vert, even_odd_horiz, even_odd; - int invert_gradient2 = (bg[pat].type & 0x08); - int invert_column; - ulg i, row; - -/*--------------------------------------------------------------------------- - Allocate buffer for fake background image to be used with transparent - images; if this fails, revert to plain background color. - ---------------------------------------------------------------------------*/ - - bg_rowbytes = 3 * rpng2_info.width; - bg_data = (uch *)malloc(bg_rowbytes * rpng2_info.height); - if (!bg_data) { - fprintf(stderr, PROGNAME - ": unable to allocate memory for background image\n"); - bg_image = 0; - return 1; - } - -/*--------------------------------------------------------------------------- - Vertical gradients (ramps) in NxN squares, alternating direction and - colors (N == bgscale). - ---------------------------------------------------------------------------*/ - - if ((bg[pat].type & 0x07) == 0) { - uch r1_min = rgb[bg[pat].rgb1_min].r; - uch g1_min = rgb[bg[pat].rgb1_min].g; - uch b1_min = rgb[bg[pat].rgb1_min].b; - uch r2_min = rgb[bg[pat].rgb2_min].r; - uch g2_min = rgb[bg[pat].rgb2_min].g; - uch b2_min = rgb[bg[pat].rgb2_min].b; - int r1_diff = rgb[bg[pat].rgb1_max].r - r1_min; - int g1_diff = rgb[bg[pat].rgb1_max].g - g1_min; - int b1_diff = rgb[bg[pat].rgb1_max].b - b1_min; - int r2_diff = rgb[bg[pat].rgb2_max].r - r2_min; - int g2_diff = rgb[bg[pat].rgb2_max].g - g2_min; - int b2_diff = rgb[bg[pat].rgb2_max].b - b2_min; - - for (row = 0; row < rpng2_info.height; ++row) { - yidx = row % bgscale; - even_odd_vert = (row / bgscale) & 1; - - r1 = r1_min + (r1_diff * yidx) / yidx_max; - g1 = g1_min + (g1_diff * yidx) / yidx_max; - b1 = b1_min + (b1_diff * yidx) / yidx_max; - r1_inv = r1_min + (r1_diff * (yidx_max-yidx)) / yidx_max; - g1_inv = g1_min + (g1_diff * (yidx_max-yidx)) / yidx_max; - b1_inv = b1_min + (b1_diff * (yidx_max-yidx)) / yidx_max; - - r2 = r2_min + (r2_diff * yidx) / yidx_max; - g2 = g2_min + (g2_diff * yidx) / yidx_max; - b2 = b2_min + (b2_diff * yidx) / yidx_max; - r2_inv = r2_min + (r2_diff * (yidx_max-yidx)) / yidx_max; - g2_inv = g2_min + (g2_diff * (yidx_max-yidx)) / yidx_max; - b2_inv = b2_min + (b2_diff * (yidx_max-yidx)) / yidx_max; - - dest = bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - even_odd_horiz = (i / bgscale) & 1; - even_odd = even_odd_vert ^ even_odd_horiz; - invert_column = - (even_odd_horiz && (bg[pat].type & 0x10)); - if (even_odd == 0) { /* gradient #1 */ - if (invert_column) { - *dest++ = r1_inv; - *dest++ = g1_inv; - *dest++ = b1_inv; - } else { - *dest++ = r1; - *dest++ = g1; - *dest++ = b1; - } - } else { /* gradient #2 */ - if ((invert_column && invert_gradient2) || - (!invert_column && !invert_gradient2)) - { - *dest++ = r2; /* not inverted or */ - *dest++ = g2; /* doubly inverted */ - *dest++ = b2; - } else { - *dest++ = r2_inv; - *dest++ = g2_inv; /* singly inverted */ - *dest++ = b2_inv; - } - } - } - } - -/*--------------------------------------------------------------------------- - Soft gradient-diamonds with scale = bgscale. Code contributed by Adam - M. Costello. - ---------------------------------------------------------------------------*/ - - } else if ((bg[pat].type & 0x07) == 1) { - - hmax = (bgscale-1)/2; /* half the max weight of a color */ - max = 2*hmax; /* the max weight of a color */ - - r1 = rgb[bg[pat].rgb1_max].r; - g1 = rgb[bg[pat].rgb1_max].g; - b1 = rgb[bg[pat].rgb1_max].b; - r2 = rgb[bg[pat].rgb2_max].r; - g2 = rgb[bg[pat].rgb2_max].g; - b2 = rgb[bg[pat].rgb2_max].b; - - for (row = 0; row < rpng2_info.height; ++row) { - yidx = row % bgscale; - if (yidx > hmax) - yidx = bgscale-1 - yidx; - dest = bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - xidx = i % bgscale; - if (xidx > hmax) - xidx = bgscale-1 - xidx; - k = xidx + yidx; - *dest++ = (k*r1 + (max-k)*r2) / max; - *dest++ = (k*g1 + (max-k)*g2) / max; - *dest++ = (k*b1 + (max-k)*b2) / max; - } - } - -/*--------------------------------------------------------------------------- - Radial "starburst" with azimuthal sinusoids; [eventually number of sinu- - soids will equal bgscale?]. This one is slow but very cool. Code con- - tributed by Pieter S. van der Meulen (originally in Smalltalk). - ---------------------------------------------------------------------------*/ - - } else if ((bg[pat].type & 0x07) == 2) { - uch ch; - int ii, x, y, hw, hh, grayspot; - double freq, rotate, saturate, gray, intensity; - double angle=0.0, aoffset=0.0, maxDist, dist; - double red=0.0, green=0.0, blue=0.0, hue, s, v, f, p, q, t; - - fprintf(stderr, "%s: computing radial background...", - PROGNAME); - fflush(stderr); - - hh = rpng2_info.height / 2; - hw = rpng2_info.width / 2; - - /* variables for radial waves: - * aoffset: number of degrees to rotate hue [CURRENTLY NOT USED] - * freq: number of color beams originating from the center - * grayspot: size of the graying center area (anti-alias) - * rotate: rotation of the beams as a function of radius - * saturate: saturation of beams' shape azimuthally - */ - angle = CLIP(angle, 0.0, 360.0); - grayspot = CLIP(bg[pat].bg_gray, 1, (hh + hw)); - freq = MAX((double)bg[pat].bg_freq, 0.0); - saturate = (double)bg[pat].bg_bsat * 0.1; - rotate = (double)bg[pat].bg_brot * 0.1; - gray = 0.0; - intensity = 0.0; - maxDist = (double)((hw*hw) + (hh*hh)); - - for (row = 0; row < rpng2_info.height; ++row) { - y = row - hh; - dest = bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - x = i - hw; - angle = (x == 0)? PI_2 : atan((double)y / (double)x); - gray = (double)MAX(ABS(y), ABS(x)) / grayspot; - gray = MIN(1.0, gray); - dist = (double)((x*x) + (y*y)) / maxDist; - intensity = cos((angle+(rotate*dist*PI)) * freq) * - gray * saturate; - intensity = (MAX(MIN(intensity,1.0),-1.0) + 1.0) * 0.5; - hue = (angle + PI) * INV_PI_360 + aoffset; - s = gray * ((double)(ABS(x)+ABS(y)) / (double)(hw + hh)); - s = MIN(MAX(s,0.0), 1.0); - v = MIN(MAX(intensity,0.0), 1.0); - - if (s == 0.0) { - ch = (uch)(v * 255.0); - *dest++ = ch; - *dest++ = ch; - *dest++ = ch; - } else { - if ((hue < 0.0) || (hue >= 360.0)) - hue -= (((int)(hue / 360.0)) * 360.0); - hue /= 60.0; - ii = (int)hue; - f = hue - (double)ii; - p = (1.0 - s) * v; - q = (1.0 - (s * f)) * v; - t = (1.0 - (s * (1.0 - f))) * v; - if (ii == 0) { red = v; green = t; blue = p; } - else if (ii == 1) { red = q; green = v; blue = p; } - else if (ii == 2) { red = p; green = v; blue = t; } - else if (ii == 3) { red = p; green = q; blue = v; } - else if (ii == 4) { red = t; green = p; blue = v; } - else if (ii == 5) { red = v; green = p; blue = q; } - *dest++ = (uch)(red * 255.0); - *dest++ = (uch)(green * 255.0); - *dest++ = (uch)(blue * 255.0); - } - } - } - fprintf(stderr, "done.\n"); - fflush(stderr); - } - -/*--------------------------------------------------------------------------- - Blast background image to display buffer before beginning PNG decode; - calling function will handle invalidation and UpdateWindow() call. - ---------------------------------------------------------------------------*/ - - for (row = 0; row < rpng2_info.height; ++row) { - src = bg_data + row*bg_rowbytes; - dest = wimage_data + row*wimage_rowbytes; - for (i = rpng2_info.width; i > 0; --i) { - r1 = *src++; - g1 = *src++; - b1 = *src++; - *dest++ = b1; - *dest++ = g1; /* note reverse order */ - *dest++ = r1; - } - } - - return 0; - -} /* end function rpng2_win_load_bg_image() */ - - - - - -static void rpng2_win_display_row(ulg row) -{ - uch bg_red = rpng2_info.bg_red; - uch bg_green = rpng2_info.bg_green; - uch bg_blue = rpng2_info.bg_blue; - uch *src, *src2=NULL, *dest; - uch r, g, b, a; - ulg i; - static int rows=0; - static ulg firstrow; - -/*--------------------------------------------------------------------------- - rows and firstrow simply track how many rows (and which ones) have not - yet been displayed; alternatively, we could call InvalidateRect() for - every row and not bother with the records-keeping. - ---------------------------------------------------------------------------*/ - - Trace((stderr, "beginning rpng2_win_display_row()\n")) - - if (rows == 0) - firstrow = row; /* first row not yet displayed */ - - ++rows; /* count of rows received but not yet displayed */ - -/*--------------------------------------------------------------------------- - Aside from the use of the rpng2_info struct and the lack of an outer - loop (over rows), this routine is identical to rpng_win_display_image() - in the non-progressive version of the program. - ---------------------------------------------------------------------------*/ - - src = rpng2_info.image_data + row*rpng2_info.rowbytes; - if (bg_image) - src2 = bg_data + row*bg_rowbytes; - dest = wimage_data + row*wimage_rowbytes; - - if (rpng2_info.channels == 3) { - for (i = rpng2_info.width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - *dest++ = b; - *dest++ = g; /* note reverse order */ - *dest++ = r; - } - } else /* if (rpng2_info.channels == 4) */ { - for (i = rpng2_info.width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (bg_image) { - bg_red = *src2++; - bg_green = *src2++; - bg_blue = *src2++; - } - if (a == 255) { - *dest++ = b; - *dest++ = g; - *dest++ = r; - } else if (a == 0) { - *dest++ = bg_blue; - *dest++ = bg_green; - *dest++ = bg_red; - } else { - /* this macro (copied from png.h) composites the - * foreground and background values and puts the - * result into the first argument; there are no - * side effects with the first argument */ - alpha_composite(*dest++, b, a, bg_blue); - alpha_composite(*dest++, g, a, bg_green); - alpha_composite(*dest++, r, a, bg_red); - } - } - } - -/*--------------------------------------------------------------------------- - Display after every 16 rows or when on last row. (Region may include - previously displayed lines due to interlacing--i.e., not contiguous.) - ---------------------------------------------------------------------------*/ - - if ((rows & 0xf) == 0 || row == rpng2_info.height-1) { - RECT rect; - - rect.left = 0L; - rect.top = (LONG)firstrow; - rect.right = (LONG)rpng2_info.width; /* possibly off by one? */ - rect.bottom = (LONG)row + 1L; /* possibly off by one? */ - InvalidateRect(global_hwnd, &rect, FALSE); - UpdateWindow(global_hwnd); /* similar to XFlush() */ - rows = 0; - } - -} /* end function rpng2_win_display_row() */ - - - - - -static void rpng2_win_finish_display() -{ - Trace((stderr, "beginning rpng2_win_finish_display()\n")) - - /* last row has already been displayed by rpng2_win_display_row(), so - * we have nothing to do here except set a flag and let the user know - * that the image is done */ - - rpng2_info.state = kDone; - printf( -#ifndef __CYGWIN__ - "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n" -#else - "Done. Press mouse button 1 (within image window) to quit.\n" -#endif - ); - fflush(stdout); -} - - - - - -static void rpng2_win_cleanup() -{ - if (bg_image && bg_data) { - free(bg_data); - bg_data = NULL; - } - - if (rpng2_info.image_data) { - free(rpng2_info.image_data); - rpng2_info.image_data = NULL; - } - - if (rpng2_info.row_pointers) { - free(rpng2_info.row_pointers); - rpng2_info.row_pointers = NULL; - } - - if (dib) { - free(dib); - dib = NULL; - } -} - - - - - -LRESULT CALLBACK rpng2_win_wndproc(HWND hwnd, UINT iMsg, WPARAM wP, LPARAM lP) -{ - HDC hdc; - PAINTSTRUCT ps; - int rc; - - switch (iMsg) { - case WM_CREATE: - /* one-time processing here, if any */ - return 0; - - case WM_PAINT: - hdc = BeginPaint(hwnd, &ps); - rc = StretchDIBits(hdc, 0, 0, rpng2_info.width, rpng2_info.height, - 0, 0, rpng2_info.width, rpng2_info.height, - wimage_data, (BITMAPINFO *)bmih, - 0, SRCCOPY); - EndPaint(hwnd, &ps); - return 0; - - /* wait for the user to tell us when to quit */ - case WM_CHAR: - switch (wP) { /* only need one, so ignore repeat count */ - case 'q': - case 'Q': - case 0x1B: /* Esc key */ - PostQuitMessage(0); - } - return 0; - - case WM_LBUTTONDOWN: /* another way of quitting */ - case WM_DESTROY: - PostQuitMessage(0); - return 0; - } - - return DefWindowProc(hwnd, iMsg, wP, lP); -} diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/rpng2-x.c b/thirdparty/libpng-1.6.37/contrib/gregbook/rpng2-x.c deleted file mode 100644 index af944c0..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/rpng2-x.c +++ /dev/null @@ -1,2143 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng2 - progressive-model PNG display program rpng2-x.c - - This program decodes and displays PNG files progressively, as if it were - a web browser (though the front end is only set up to read from files). - It supports gamma correction, user-specified background colors, and user- - specified background patterns (for transparent images). This version is - for the X Window System (tested by the author under Unix and by Martin - Zinser under OpenVMS; may work under OS/2 with a little tweaking). - - Thanks to Adam Costello and Pieter S. van der Meulen for the "diamond" - and "radial waves" patterns, respectively. - - to do (someday, maybe): - - fix expose/redraw code: don't draw entire row if only part exposed - - 8-bit (colormapped) X support - - finish resizable checkerboard-gradient (sizes 4-128?) - - use %.1023s to simplify truncation of title-bar string? - - --------------------------------------------------------------------------- - - Changelog: - - 1.01: initial public release - - 1.02: modified to allow abbreviated options; fixed char/uchar mismatch - - 1.10: added support for non-default visuals; fixed X pixel-conversion - - 1.11: added -usleep option for demos; fixed command-line parsing bug - - 1.12: added -pause option for demos and testing - - 1.20: added runtime MMX-enabling/disabling and new -mmx* options - - 1.21: fixed some small X memory leaks (thanks to François Petitjean) - - 1.22: fixed XFreeGC() crash bug (thanks to Patrick Welche) - - 1.23: added -bgpat 0 mode (std white/gray checkerboard, 8x8 squares) - - 1.30: added -loop option for -bgpat (ifdef FEATURE_LOOP); fixed bpp = - 24; added support for X resources (thanks to Gerhard Niklasch) - - 1.31: added code to skip unused chunks (thanks to Glenn Randers-Pehrson) - - 1.32: added AMD64/EM64T support (__x86_64__); added basic expose/redraw - handling - - 2.00: dual-licensed (added GNU GPL) - - 2.01: fixed 64-bit typo in readpng2.c; fixed -pause usage description - - 2.02: fixed improper display of usage screen on PNG error(s); fixed - unexpected-EOF and file-read-error cases; fixed Trace() cut-and- - paste bugs - - 2.03: deleted runtime MMX-enabling/disabling and obsolete -mmx* options - - 2.04: Added "void(foo);" statements to quiet pedantic compiler warnings - about unused variables (GR-P) - - 2.05: Use nanosleep() instead of usleep(), which is deprecated (GR-P). - - 2.06: check for integer overflow (Glenn R-P) - --------------------------------------------------------------------------- - - Copyright (c) 1998-2010, 2014-2015, 2017 Greg Roelofs. All rights - reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ---------------------------------------------------------------------------*/ - -#define PROGNAME "rpng2-x" -#define LONGNAME "Progressive PNG Viewer for X" -#define VERSION "2.04 of 15 June 2014" -#define RESNAME "rpng2" /* our X resource application name */ -#define RESCLASS "Rpng" /* our X resource class name */ - -#include -#include -#include -#include -#include /* for jmpbuf declaration in readpng2.h */ -#include -#include /* only for PvdM background code */ -#include -#include -#include -#include /* defines XK_* macros */ - -#if _POSIX_C_SOURCE >= 199309L /* have nanosleep() */ -# undef usleep -# define usleep(usec) { \ - struct timespec ts; \ - ts.tv_sec = 0; \ - ts.tv_nsec = (usec) * 1000; \ - nanosleep(&ts, NULL); } -# endif - -#ifndef usleep /* have neither nanosleep() nor usleep() */ -# define usleep(x) sleep(((x)+499999)/1000000) -#endif - -#ifdef VMS -# include -#endif - -/* all for PvdM background code: */ -#ifndef PI -# define PI 3.141592653589793238 -#endif -#define PI_2 (PI*0.5) -#define INV_PI_360 (360.0 / PI) -#define MAX(a,b) (a>b?a:b) -#define MIN(a,b) (a> 8)) >> 8); \ -} - - -#define INBUFSIZE 4096 /* with pseudo-timing on (1 sec delay/block), this - * block size corresponds roughly to a download - * speed 10% faster than theoretical 33.6K maximum - * (assuming 8 data bits, 1 stop bit and no other - * overhead) */ - -/* local prototypes */ -static void rpng2_x_init (void); -static int rpng2_x_create_window (void); -static int rpng2_x_load_bg_image (void); -static void rpng2_x_display_row (ulg row); -static void rpng2_x_finish_display (void); -static void rpng2_x_redisplay_image (ulg startcol, ulg startrow, - ulg width, ulg height); -#ifdef FEATURE_LOOP -static void rpng2_x_reload_bg_image (void); -static int is_number (char *p); -#endif -static void rpng2_x_cleanup (void); -static int rpng2_x_msb (ulg u32val); - - -static char titlebar[1024], *window_name = titlebar; -static char *appname = LONGNAME; -static char *icon_name = PROGNAME; -static char *res_name = RESNAME; -static char *res_class = RESCLASS; -static char *filename; -static FILE *infile; - -static mainprog_info rpng2_info; - -static uch inbuf[INBUFSIZE]; -static int incount; - -static int pat = 6; /* must be less than num_bgpat */ -static int bg_image = 0; -static int bgscale, bgscale_default = 16; -static ulg bg_rowbytes; -static uch *bg_data; - -int pause_after_pass = FALSE; -int demo_timing = FALSE; -ulg usleep_duration = 0L; - -static struct rgb_color { - uch r, g, b; -} rgb[] = { - { 0, 0, 0}, /* 0: black */ - {255, 255, 255}, /* 1: white */ - {173, 132, 57}, /* 2: tan */ - { 64, 132, 0}, /* 3: medium green */ - {189, 117, 1}, /* 4: gold */ - {253, 249, 1}, /* 5: yellow */ - { 0, 0, 255}, /* 6: blue */ - { 0, 0, 120}, /* 7: medium blue */ - {255, 0, 255}, /* 8: magenta */ - { 64, 0, 64}, /* 9: dark magenta */ - {255, 0, 0}, /* 10: red */ - { 64, 0, 0}, /* 11: dark red */ - {255, 127, 0}, /* 12: orange */ - {192, 96, 0}, /* 13: darker orange */ - { 24, 60, 0}, /* 14: dark green-yellow */ - { 85, 125, 200}, /* 15: ice blue */ - {192, 192, 192} /* 16: Netscape/Mosaic gray */ -}; -/* not used for now, but should be for error-checking: -static int num_rgb = sizeof(rgb) / sizeof(struct rgb_color); - */ - -/* - This whole struct is a fairly cheesy way to keep the number of - command-line options to a minimum. The radial-waves background - type is a particularly poor fit to the integer elements of the - struct...but a few macros and a little fixed-point math will do - wonders for ya. - - type bits: - F E D C B A 9 8 7 6 5 4 3 2 1 0 - | | | | | - | | +-+-+-- 0 = sharp-edged checkerboard - | | 1 = soft diamonds - | | 2 = radial waves - | | 3-7 = undefined - | +-- gradient #2 inverted? - +-- alternating columns inverted? - */ -static struct background_pattern { - ush type; - int rgb1_max, rgb1_min; /* or bg_freq, bg_gray */ - int rgb2_max, rgb2_min; /* or bg_bsat, bg_brot (both scaled by 10)*/ -} bg[] = { - {0, 1,1, 16,16}, /* checkered: white vs. light gray (basic) */ - {0+8, 2,0, 1,15}, /* checkered: tan/black vs. white/ice blue */ - {0+24, 2,0, 1,0}, /* checkered: tan/black vs. white/black */ - {0+8, 4,5, 0,2}, /* checkered: gold/yellow vs. black/tan */ - {0+8, 4,5, 0,6}, /* checkered: gold/yellow vs. black/blue */ - {0, 7,0, 8,9}, /* checkered: deep blue/black vs. magenta */ - {0+8, 13,0, 5,14}, /* checkered: orange/black vs. yellow */ - {0+8, 12,0, 10,11}, /* checkered: orange/black vs. red */ - {1, 7,0, 8,0}, /* diamonds: deep blue/black vs. magenta */ - {1, 12,0, 11,0}, /* diamonds: orange vs. dark red */ - {1, 10,0, 7,0}, /* diamonds: red vs. medium blue */ - {1, 4,0, 5,0}, /* diamonds: gold vs. yellow */ - {1, 3,0, 0,0}, /* diamonds: medium green vs. black */ - {2, 16, 100, 20, 0}, /* radial: ~hard radial color-beams */ - {2, 18, 100, 10, 2}, /* radial: soft, curved radial color-beams */ - {2, 16, 256, 100, 250}, /* radial: very tight spiral */ - {2, 10000, 256, 11, 0} /* radial: dipole-moire' (almost fractal) */ -}; -static int num_bgpat = sizeof(bg) / sizeof(struct background_pattern); - - -/* X-specific variables */ -static char *displayname; -static XImage *ximage; -static Display *display; -static int depth; -static Visual *visual; -static XVisualInfo *visual_list; -static int RShift, GShift, BShift; -static ulg RMask, GMask, BMask; -static Window window; -static GC gc; -static Colormap colormap; - -static int have_nondefault_visual = FALSE; -static int have_colormap = FALSE; -static int have_window = FALSE; -static int have_gc = FALSE; - - - - -int main(int argc, char **argv) -{ -#ifdef sgi - char tmpline[80]; -#endif - char *p, *bgstr = NULL; - int rc, alen, flen; - int error = 0; - int timing = FALSE; - int have_bg = FALSE; -#ifdef FEATURE_LOOP - int loop = FALSE; - long loop_interval = -1; /* seconds (100,000 max) */ -#endif - double LUT_exponent; /* just the lookup table */ - double CRT_exponent = 2.2; /* just the monitor */ - double default_display_exponent; /* whole display system */ - XEvent e; - KeySym k; - - - /* First initialize a few things, just to be sure--memset takes care of - * default background color (black), booleans (FALSE), pointers (NULL), - * etc. */ - - displayname = (char *)NULL; - filename = (char *)NULL; - memset(&rpng2_info, 0, sizeof(mainprog_info)); - - - /* Set the default value for our display-system exponent, i.e., the - * product of the CRT exponent and the exponent corresponding to - * the frame-buffer's lookup table (LUT), if any. This is not an - * exhaustive list of LUT values (e.g., OpenStep has a lot of weird - * ones), but it should cover 99% of the current possibilities. */ - -#if defined(NeXT) - /* third-party utilities can modify the default LUT exponent */ - LUT_exponent = 1.0 / 2.2; - /* - if (some_next_function_that_returns_gamma(&next_gamma)) - LUT_exponent = 1.0 / next_gamma; - */ -#elif defined(sgi) - LUT_exponent = 1.0 / 1.7; - /* there doesn't seem to be any documented function to - * get the "gamma" value, so we do it the hard way */ - infile = fopen("/etc/config/system.glGammaVal", "r"); - if (infile) { - double sgi_gamma; - - fgets(tmpline, 80, infile); - fclose(infile); - sgi_gamma = atof(tmpline); - if (sgi_gamma > 0.0) - LUT_exponent = 1.0 / sgi_gamma; - } -#elif defined(Macintosh) - LUT_exponent = 1.8 / 2.61; - /* - if (some_mac_function_that_returns_gamma(&mac_gamma)) - LUT_exponent = mac_gamma / 2.61; - */ -#else - LUT_exponent = 1.0; /* assume no LUT: most PCs */ -#endif - - /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ - default_display_exponent = LUT_exponent * CRT_exponent; - - - /* If the user has set the SCREEN_GAMMA environment variable as suggested - * (somewhat imprecisely) in the libpng documentation, use that; otherwise - * use the default value we just calculated. Either way, the user may - * override this via a command-line option. */ - - if ((p = getenv("SCREEN_GAMMA")) != NULL) - rpng2_info.display_exponent = atof(p); - else - rpng2_info.display_exponent = default_display_exponent; - - - /* Now parse the command line for options and the PNG filename. */ - - while (*++argv && !error) { - if (!strncmp(*argv, "-display", 2)) { - if (!*++argv) - ++error; - else - displayname = *argv; - } else if (!strncmp(*argv, "-gamma", 2)) { - if (!*++argv) - ++error; - else { - rpng2_info.display_exponent = atof(*argv); - if (rpng2_info.display_exponent <= 0.0) - ++error; - } - } else if (!strncmp(*argv, "-bgcolor", 4)) { - if (!*++argv) - ++error; - else { - bgstr = *argv; - if (strlen(bgstr) != 7 || bgstr[0] != '#') - ++error; - else { - have_bg = TRUE; - bg_image = FALSE; - } - } - } else if (!strncmp(*argv, "-bgpat", 4)) { - if (!*++argv) - ++error; - else { - pat = atoi(*argv); - if (pat >= 0 && pat < num_bgpat) { - bg_image = TRUE; - have_bg = FALSE; - } else - ++error; - } - } else if (!strncmp(*argv, "-usleep", 2)) { - if (!*++argv) - ++error; - else { - usleep_duration = (ulg)atol(*argv); - demo_timing = TRUE; - } - } else if (!strncmp(*argv, "-pause", 2)) { - pause_after_pass = TRUE; - } else if (!strncmp(*argv, "-timing", 2)) { - timing = TRUE; -#ifdef FEATURE_LOOP - } else if (!strncmp(*argv, "-loop", 2)) { - loop = TRUE; - if (!argv[1] || !is_number(argv[1])) - loop_interval = 2; - else { - ++argv; - loop_interval = atol(*argv); - if (loop_interval < 0) - loop_interval = 2; - else if (loop_interval > 100000) /* bit more than one day */ - loop_interval = 100000; - } -#endif - } else { - if (**argv != '-') { - filename = *argv; - if (argv[1]) /* shouldn't be any more args after filename */ - ++error; - } else - ++error; /* not expecting any other options */ - } - } - - if (!filename) - ++error; - - - /* print usage screen if any errors up to this point */ - - if (error) { - fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); - readpng2_version_info(); - fprintf(stderr, "\n" - "Usage: "); - fprintf(stderr, - "%s [-display xdpy] [-gamma exp] [-bgcolor bg | -bgpat pat]\n" - " %*s [-usleep dur | -timing] [-pause]\n", - PROGNAME, (int)strlen(PROGNAME), " "); - fprintf(stderr, -#ifdef FEATURE_LOOP - " [-loop [sec]]" -#endif - " file.png\n\n"); - fprintf(stderr, - " xdpy\tname of the target X display (e.g., ``hostname:0'')\n" - " exp \ttransfer-function exponent (``gamma'') of the display\n" - "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" - "\t\t to the product of the lookup-table exponent (varies)\n", - default_display_exponent); - fprintf(stderr, - "\t\t and the CRT exponent (usually 2.2); must be positive\n" - " bg \tdesired background color in 7-character hex RGB format\n" - "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" - "\t\t used with transparent images; overrides -bgpat\n" - " pat \tdesired background pattern number (0-%d); used with\n" - "\t\t transparent images; overrides -bgcolor\n", - num_bgpat-1); -#ifdef FEATURE_LOOP - fprintf(stderr, - " -loop\tloops through background images after initial display\n" - "\t\t is complete (depends on -bgpat)\n" - " sec \tseconds to display each background image (default = 2)\n"); -#endif - fprintf(stderr, - " dur \tduration in microseconds to wait after displaying each\n" - "\t\t row (for demo purposes)\n" - " -timing\tenables delay for every block read, to simulate modem\n" - "\t\t download of image (~36 Kbps)\n" - " -pause\tpauses after displaying each pass until mouse clicked\n" - "\nPress Q, Esc or mouse button 1 (within image window, after image\n" - "is displayed) to quit.\n"); - exit(1); - } - - if (!(infile = fopen(filename, "rb"))) { - fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); - ++error; - } else { - incount = fread(inbuf, 1, INBUFSIZE, infile); - if (incount < 8 || !readpng2_check_sig(inbuf, 8)) { - fprintf(stderr, PROGNAME - ": [%s] is not a PNG file: incorrect signature\n", - filename); - ++error; - } else if ((rc = readpng2_init(&rpng2_info)) != 0) { - switch (rc) { - case 2: - fprintf(stderr, PROGNAME - ": [%s] has bad IHDR (libpng longjmp)\n", filename); - break; - case 4: - fprintf(stderr, PROGNAME ": insufficient memory\n"); - break; - default: - fprintf(stderr, PROGNAME - ": unknown readpng2_init() error\n"); - break; - } - ++error; - } else { - Trace((stderr, "about to call XOpenDisplay()\n")) - display = XOpenDisplay(displayname); - if (!display) { - readpng2_cleanup(&rpng2_info); - fprintf(stderr, PROGNAME ": can't open X display [%s]\n", - displayname? displayname : "default"); - ++error; - } - } - if (error) - fclose(infile); - } - - - if (error) { - fprintf(stderr, PROGNAME ": aborting.\n"); - exit(2); - } - - - /* set the title-bar string, but make sure buffer doesn't overflow */ - - alen = strlen(appname); - flen = strlen(filename); - if (alen + flen + 3 > 1023) - sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); - else - sprintf(titlebar, "%s: %s", appname, filename); - - - /* set some final rpng2_info variables before entering main data loop */ - - if (have_bg) { - unsigned r, g, b; /* this approach quiets compiler warnings */ - - sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); - rpng2_info.bg_red = (uch)r; - rpng2_info.bg_green = (uch)g; - rpng2_info.bg_blue = (uch)b; - } else - rpng2_info.need_bgcolor = TRUE; - - rpng2_info.state = kPreInit; - rpng2_info.mainprog_init = rpng2_x_init; - rpng2_info.mainprog_display_row = rpng2_x_display_row; - rpng2_info.mainprog_finish_display = rpng2_x_finish_display; - - - /* OK, this is the fun part: call readpng2_decode_data() at the start of - * the loop to deal with our first buffer of data (read in above to verify - * that the file is a PNG image), then loop through the file and continue - * calling the same routine to handle each chunk of data. It in turn - * passes the data to libpng, which will invoke one or more of our call- - * backs as decoded data become available. We optionally call sleep() for - * one second per iteration to simulate downloading the image via an analog - * modem. */ - - for (;;) { - Trace((stderr, "about to call readpng2_decode_data()\n")) - if (readpng2_decode_data(&rpng2_info, inbuf, incount)) - ++error; - Trace((stderr, "done with readpng2_decode_data()\n")) - - if (error || incount != INBUFSIZE || rpng2_info.state == kDone) { - if (rpng2_info.state == kDone) { - Trace((stderr, "done decoding PNG image\n")) - } else if (ferror(infile)) { - fprintf(stderr, PROGNAME - ": error while reading PNG image file\n"); - exit(3); - } else if (feof(infile)) { - fprintf(stderr, PROGNAME ": end of file reached " - "(unexpectedly) while reading PNG image file\n"); - exit(3); - } else /* if (error) */ { - /* will print error message below */ - } - break; - } - - if (timing) - sleep(1); - - incount = fread(inbuf, 1, INBUFSIZE, infile); - } - - - /* clean up PNG stuff and report any decoding errors */ - - fclose(infile); - Trace((stderr, "about to call readpng2_cleanup()\n")) - readpng2_cleanup(&rpng2_info); - - if (error) { - fprintf(stderr, PROGNAME ": libpng error while decoding PNG image\n"); - exit(3); - } - - -#ifdef FEATURE_LOOP - - if (loop && bg_image) { - Trace((stderr, "entering -loop loop (FEATURE_LOOP)\n")) - for (;;) { - int i, use_sleep; - struct timeval now, then; - - /* get current time and add loop_interval to get target time */ - if (gettimeofday(&then, NULL) == 0) { - then.tv_sec += loop_interval; - use_sleep = FALSE; - } else - use_sleep = TRUE; - - /* do quick check for a quit event but don't wait for it */ - /* GRR BUG: should also check for Expose events and redraw... */ - if (XCheckMaskEvent(display, KeyPressMask | ButtonPressMask, &e)) - if (QUIT(e,k)) - break; - - /* generate next background image */ - if (++pat >= num_bgpat) - pat = 0; - rpng2_x_reload_bg_image(); - - /* wait for timeout, using whatever means are available */ - if (use_sleep || gettimeofday(&now, NULL) != 0) { - for (i = loop_interval; i > 0; --i) { - sleep(1); - /* GRR BUG: also need to check for Expose (and redraw!) */ - if (XCheckMaskEvent(display, KeyPressMask | ButtonPressMask, - &e) && QUIT(e,k)) - break; - } - } else { - /* Y2038 BUG! */ - if (now.tv_sec < then.tv_sec || - (now.tv_sec == then.tv_sec && now.tv_usec < then.tv_usec)) - { - int quit = FALSE; - long seconds_to_go = then.tv_sec - now.tv_sec; - long usleep_usec; - - /* basically chew up most of remaining loop-interval with - * calls to sleep(1) interleaved with checks for quit - * events, but also recalc time-to-go periodically; when - * done, clean up any remaining time with usleep() call - * (could also use SIGALRM, but signals are a pain...) */ - while (seconds_to_go-- > 1) { - int seconds_done = 0; - - for (i = seconds_to_go; i > 0 && !quit; --i) { - sleep(1); - /* GRR BUG: need to check for Expose and redraw */ - if (XCheckMaskEvent(display, KeyPressMask | - ButtonPressMask, &e) && QUIT(e,k)) - quit = TRUE; - if (++seconds_done > 1000) - break; /* time to redo seconds_to_go meas. */ - } - if (quit) - break; - - /* OK, more than 1000 seconds since last check: - * correct the time-to-go measurement for drift */ - if (gettimeofday(&now, NULL) == 0) { - if (now.tv_sec >= then.tv_sec) - break; - seconds_to_go = then.tv_sec - now.tv_sec; - } else - ++seconds_to_go; /* restore what we subtracted */ - } - if (quit) - break; /* breaks outer do-loop, skips redisplay */ - - /* since difference between "now" and "then" is already - * eaten up to within a couple of seconds, don't need to - * worry about overflow--but might have overshot (neg.) */ - if (gettimeofday(&now, NULL) == 0) { - usleep_usec = 1000000L*(then.tv_sec - now.tv_sec) + - then.tv_usec - now.tv_usec; - if (usleep_usec > 0) - usleep((ulg)usleep_usec); - } - } - } - - /* composite image against new background and display (note that - * we do not take into account the time spent doing this...) */ - rpng2_x_redisplay_image (0, 0, rpng2_info.width, rpng2_info.height); - } - - } else /* FALL THROUGH and do the normal thing */ - -#endif /* FEATURE_LOOP */ - - /* wait for the user to tell us when to quit */ - - if (rpng2_info.state >= kWindowInit) { - Trace((stderr, "entering final wait-for-quit-event loop\n")) - do { - XNextEvent(display, &e); - if (e.type == Expose) { - XExposeEvent *ex = (XExposeEvent *)&e; - rpng2_x_redisplay_image (ex->x, ex->y, ex->width, ex->height); - } - } while (!QUIT(e,k)); - } else { - fprintf(stderr, PROGNAME ": init callback never called: probable " - "libpng error while decoding PNG metadata\n"); - exit(4); - } - - - /* we're done: clean up all image and X resources and go away */ - - Trace((stderr, "about to call rpng2_x_cleanup()\n")) - rpng2_x_cleanup(); - - (void)argc; /* Unused */ - - return 0; -} - - - - - -/* this function is called by readpng2_info_callback() in readpng2.c, which - * in turn is called by libpng after all of the pre-IDAT chunks have been - * read and processed--i.e., we now have enough info to finish initializing */ - -static void rpng2_x_init(void) -{ - ulg i; - ulg rowbytes = rpng2_info.rowbytes; - - Trace((stderr, "beginning rpng2_x_init()\n")) - Trace((stderr, " rowbytes = %d\n", rpng2_info.rowbytes)) - Trace((stderr, " width = %ld\n", rpng2_info.width)) - Trace((stderr, " height = %ld\n", rpng2_info.height)) - - /* Guard against integer overflow */ - if (rpng2_info.height > ((size_t)(-1))/rpng2_info.rowbytes) { - fprintf(stderr, PROGNAME ": image_data buffer would be too large\n"); - readpng2_cleanup(&rpng2_info); - return; - } - - rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height); - if (!rpng2_info.image_data) { - readpng2_cleanup(&rpng2_info); - return; - } - - rpng2_info.row_pointers = (uch **)malloc(rpng2_info.height * sizeof(uch *)); - if (!rpng2_info.row_pointers) { - free(rpng2_info.image_data); - rpng2_info.image_data = NULL; - readpng2_cleanup(&rpng2_info); - return; - } - - for (i = 0; i < rpng2_info.height; ++i) - rpng2_info.row_pointers[i] = rpng2_info.image_data + i*rowbytes; - - - /* do the basic X initialization stuff, make the window, and fill it with - * the user-specified, file-specified or default background color or - * pattern */ - - if (rpng2_x_create_window()) { - - /* GRR TEMPORARY HACK: this is fundamentally no different from cases - * above; libpng should call our error handler to longjmp() back to us - * when png_ptr goes away. If we/it segfault instead, seems like a - * libpng bug... */ - - /* we're here via libpng callback, so if window fails, clean and bail */ - readpng2_cleanup(&rpng2_info); - rpng2_x_cleanup(); - exit(2); - } - - rpng2_info.state = kWindowInit; -} - - - - - -static int rpng2_x_create_window(void) -{ - ulg bg_red = rpng2_info.bg_red; - ulg bg_green = rpng2_info.bg_green; - ulg bg_blue = rpng2_info.bg_blue; - ulg bg_pixel = 0L; - ulg attrmask; - int need_colormap = FALSE; - int screen, pad; - uch *xdata; - Window root; - XEvent e; - XGCValues gcvalues; - XSetWindowAttributes attr; - XTextProperty windowName, *pWindowName = &windowName; - XTextProperty iconName, *pIconName = &iconName; - XVisualInfo visual_info; - XSizeHints *size_hints; - XWMHints *wm_hints; - XClassHint *class_hints; - - - Trace((stderr, "beginning rpng2_x_create_window()\n")) - - screen = DefaultScreen(display); - depth = DisplayPlanes(display, screen); - root = RootWindow(display, screen); - -#ifdef DEBUG - XSynchronize(display, True); -#endif - - if (depth != 16 && depth != 24 && depth != 32) { - int visuals_matched = 0; - - Trace((stderr, "default depth is %d: checking other visuals\n", - depth)) - - /* 24-bit first */ - visual_info.screen = screen; - visual_info.depth = 24; - visual_list = XGetVisualInfo(display, - VisualScreenMask | VisualDepthMask, &visual_info, &visuals_matched); - if (visuals_matched == 0) { -/* GRR: add 15-, 16- and 32-bit TrueColor visuals (also DirectColor?) */ - fprintf(stderr, "default screen depth %d not supported, and no" - " 24-bit visuals found\n", depth); - return 2; - } - Trace((stderr, "XGetVisualInfo() returned %d 24-bit visuals\n", - visuals_matched)) - visual = visual_list[0].visual; - depth = visual_list[0].depth; -/* - colormap_size = visual_list[0].colormap_size; - visual_class = visual->class; - visualID = XVisualIDFromVisual(visual); - */ - have_nondefault_visual = TRUE; - need_colormap = TRUE; - } else { - XMatchVisualInfo(display, screen, depth, TrueColor, &visual_info); - visual = visual_info.visual; - } - - RMask = visual->red_mask; - GMask = visual->green_mask; - BMask = visual->blue_mask; - -/* GRR: add/check 8-bit support */ - if (depth == 8 || need_colormap) { - colormap = XCreateColormap(display, root, visual, AllocNone); - if (!colormap) { - fprintf(stderr, "XCreateColormap() failed\n"); - return 2; - } - have_colormap = TRUE; - if (depth == 8) - bg_image = FALSE; /* gradient just wastes palette entries */ - } - if (depth == 15 || depth == 16) { - RShift = 15 - rpng2_x_msb(RMask); /* these are right-shifts */ - GShift = 15 - rpng2_x_msb(GMask); - BShift = 15 - rpng2_x_msb(BMask); - } else if (depth > 16) { - RShift = rpng2_x_msb(RMask) - 7; /* these are left-shifts */ - GShift = rpng2_x_msb(GMask) - 7; - BShift = rpng2_x_msb(BMask) - 7; - } - if (depth >= 15 && (RShift < 0 || GShift < 0 || BShift < 0)) { - fprintf(stderr, "rpng2 internal logic error: negative X shift(s)!\n"); - return 2; - } - -/*--------------------------------------------------------------------------- - Finally, create the window. - ---------------------------------------------------------------------------*/ - - attr.backing_store = Always; - attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask; - attrmask = CWBackingStore | CWEventMask; - if (have_nondefault_visual) { - attr.colormap = colormap; - attr.background_pixel = 0; - attr.border_pixel = 1; - attrmask |= CWColormap | CWBackPixel | CWBorderPixel; - } - - window = XCreateWindow(display, root, 0, 0, rpng2_info.width, - rpng2_info.height, 0, depth, InputOutput, visual, attrmask, &attr); - - if (window == None) { - fprintf(stderr, "XCreateWindow() failed\n"); - return 2; - } else - have_window = TRUE; - - if (depth == 8) - XSetWindowColormap(display, window, colormap); - - if (!XStringListToTextProperty(&window_name, 1, pWindowName)) - pWindowName = NULL; - if (!XStringListToTextProperty(&icon_name, 1, pIconName)) - pIconName = NULL; - - /* OK if either hints allocation fails; XSetWMProperties() allows NULLs */ - - if ((size_hints = XAllocSizeHints()) != NULL) { - /* window will not be resizable */ - size_hints->flags = PMinSize | PMaxSize; - size_hints->min_width = size_hints->max_width = (int)rpng2_info.width; - size_hints->min_height = size_hints->max_height = - (int)rpng2_info.height; - } - - if ((wm_hints = XAllocWMHints()) != NULL) { - wm_hints->initial_state = NormalState; - wm_hints->input = True; - /* wm_hints->icon_pixmap = icon_pixmap; */ - wm_hints->flags = StateHint | InputHint /* | IconPixmapHint */ ; - } - - if ((class_hints = XAllocClassHint()) != NULL) { - class_hints->res_name = res_name; - class_hints->res_class = res_class; - } - - XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0, - size_hints, wm_hints, class_hints); - - /* various properties and hints no longer needed; free memory */ - if (pWindowName) - XFree(pWindowName->value); - if (pIconName) - XFree(pIconName->value); - if (size_hints) - XFree(size_hints); - if (wm_hints) - XFree(wm_hints); - if (class_hints) - XFree(class_hints); - - XMapWindow(display, window); - - gc = XCreateGC(display, window, 0, &gcvalues); - have_gc = TRUE; - -/*--------------------------------------------------------------------------- - Allocate memory for the X- and display-specific version of the image. - ---------------------------------------------------------------------------*/ - - if (depth == 24 || depth == 32) { - xdata = (uch *)malloc(4*rpng2_info.width*rpng2_info.height); - pad = 32; - } else if (depth == 16) { - xdata = (uch *)malloc(2*rpng2_info.width*rpng2_info.height); - pad = 16; - } else /* depth == 8 */ { - xdata = (uch *)malloc(rpng2_info.width*rpng2_info.height); - pad = 8; - } - - if (!xdata) { - fprintf(stderr, PROGNAME ": unable to allocate image memory\n"); - return 4; - } - - ximage = XCreateImage(display, visual, depth, ZPixmap, 0, - (char *)xdata, rpng2_info.width, rpng2_info.height, pad, 0); - - if (!ximage) { - fprintf(stderr, PROGNAME ": XCreateImage() failed\n"); - free(xdata); - return 3; - } - - /* to avoid testing the byte order every pixel (or doubling the size of - * the drawing routine with a giant if-test), we arbitrarily set the byte - * order to MSBFirst and let Xlib worry about inverting things on little- - * endian machines (e.g., Linux/x86, old VAXen, etc.)--this is not the - * most efficient approach (the giant if-test would be better), but in - * the interest of clarity, we'll take the easy way out... */ - - ximage->byte_order = MSBFirst; - -/*--------------------------------------------------------------------------- - Fill window with the specified background color (default is black) or - faked "background image" (but latter is disabled if 8-bit; gradients - just waste palette entries). - ---------------------------------------------------------------------------*/ - - if (bg_image) - rpng2_x_load_bg_image(); /* resets bg_image if fails */ - - if (!bg_image) { - if (depth == 24 || depth == 32) { - bg_pixel = (bg_red << RShift) | - (bg_green << GShift) | - (bg_blue << BShift); - } else if (depth == 16) { - bg_pixel = (((bg_red << 8) >> RShift) & RMask) | - (((bg_green << 8) >> GShift) & GMask) | - (((bg_blue << 8) >> BShift) & BMask); - } else /* depth == 8 */ { - - /* GRR: add 8-bit support */ - - } - XSetForeground(display, gc, bg_pixel); - XFillRectangle(display, window, gc, 0, 0, rpng2_info.width, - rpng2_info.height); - } - -/*--------------------------------------------------------------------------- - Wait for first Expose event to do any drawing, then flush and return. - ---------------------------------------------------------------------------*/ - - do - XNextEvent(display, &e); - while (e.type != Expose || e.xexpose.count); - - XFlush(display); - - return 0; - -} /* end function rpng2_x_create_window() */ - - - - - -static int rpng2_x_load_bg_image(void) -{ - uch *src; - char *dest; - uch r1, r2, g1, g2, b1, b2; - uch r1_inv, r2_inv, g1_inv, g2_inv, b1_inv, b2_inv; - int k, hmax, max; - int xidx, yidx, yidx_max; - int even_odd_vert, even_odd_horiz, even_odd; - int invert_gradient2 = (bg[pat].type & 0x08); - int invert_column; - int ximage_rowbytes = ximage->bytes_per_line; - ulg i, row; - ulg pixel; - -/*--------------------------------------------------------------------------- - Allocate buffer for fake background image to be used with transparent - images; if this fails, revert to plain background color. - ---------------------------------------------------------------------------*/ - - bg_rowbytes = 3 * rpng2_info.width; - bg_data = (uch *)malloc(bg_rowbytes * rpng2_info.height); - if (!bg_data) { - fprintf(stderr, PROGNAME - ": unable to allocate memory for background image\n"); - bg_image = 0; - return 1; - } - - bgscale = (pat == 0)? 8 : bgscale_default; - yidx_max = bgscale - 1; - -/*--------------------------------------------------------------------------- - Vertical gradients (ramps) in NxN squares, alternating direction and - colors (N == bgscale). - ---------------------------------------------------------------------------*/ - - if ((bg[pat].type & 0x07) == 0) { - uch r1_min = rgb[bg[pat].rgb1_min].r; - uch g1_min = rgb[bg[pat].rgb1_min].g; - uch b1_min = rgb[bg[pat].rgb1_min].b; - uch r2_min = rgb[bg[pat].rgb2_min].r; - uch g2_min = rgb[bg[pat].rgb2_min].g; - uch b2_min = rgb[bg[pat].rgb2_min].b; - int r1_diff = rgb[bg[pat].rgb1_max].r - r1_min; - int g1_diff = rgb[bg[pat].rgb1_max].g - g1_min; - int b1_diff = rgb[bg[pat].rgb1_max].b - b1_min; - int r2_diff = rgb[bg[pat].rgb2_max].r - r2_min; - int g2_diff = rgb[bg[pat].rgb2_max].g - g2_min; - int b2_diff = rgb[bg[pat].rgb2_max].b - b2_min; - - for (row = 0; row < rpng2_info.height; ++row) { - yidx = (int)(row % bgscale); - even_odd_vert = (int)((row / bgscale) & 1); - - r1 = r1_min + (r1_diff * yidx) / yidx_max; - g1 = g1_min + (g1_diff * yidx) / yidx_max; - b1 = b1_min + (b1_diff * yidx) / yidx_max; - r1_inv = r1_min + (r1_diff * (yidx_max-yidx)) / yidx_max; - g1_inv = g1_min + (g1_diff * (yidx_max-yidx)) / yidx_max; - b1_inv = b1_min + (b1_diff * (yidx_max-yidx)) / yidx_max; - - r2 = r2_min + (r2_diff * yidx) / yidx_max; - g2 = g2_min + (g2_diff * yidx) / yidx_max; - b2 = b2_min + (b2_diff * yidx) / yidx_max; - r2_inv = r2_min + (r2_diff * (yidx_max-yidx)) / yidx_max; - g2_inv = g2_min + (g2_diff * (yidx_max-yidx)) / yidx_max; - b2_inv = b2_min + (b2_diff * (yidx_max-yidx)) / yidx_max; - - dest = (char *)bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - even_odd_horiz = (int)((i / bgscale) & 1); - even_odd = even_odd_vert ^ even_odd_horiz; - invert_column = - (even_odd_horiz && (bg[pat].type & 0x10)); - if (even_odd == 0) { /* gradient #1 */ - if (invert_column) { - *dest++ = r1_inv; - *dest++ = g1_inv; - *dest++ = b1_inv; - } else { - *dest++ = r1; - *dest++ = g1; - *dest++ = b1; - } - } else { /* gradient #2 */ - if ((invert_column && invert_gradient2) || - (!invert_column && !invert_gradient2)) - { - *dest++ = r2; /* not inverted or */ - *dest++ = g2; /* doubly inverted */ - *dest++ = b2; - } else { - *dest++ = r2_inv; - *dest++ = g2_inv; /* singly inverted */ - *dest++ = b2_inv; - } - } - } - } - -/*--------------------------------------------------------------------------- - Soft gradient-diamonds with scale = bgscale. Code contributed by Adam - M. Costello. - ---------------------------------------------------------------------------*/ - - } else if ((bg[pat].type & 0x07) == 1) { - - hmax = (bgscale-1)/2; /* half the max weight of a color */ - max = 2*hmax; /* the max weight of a color */ - - r1 = rgb[bg[pat].rgb1_max].r; - g1 = rgb[bg[pat].rgb1_max].g; - b1 = rgb[bg[pat].rgb1_max].b; - r2 = rgb[bg[pat].rgb2_max].r; - g2 = rgb[bg[pat].rgb2_max].g; - b2 = rgb[bg[pat].rgb2_max].b; - - for (row = 0; row < rpng2_info.height; ++row) { - yidx = (int)(row % bgscale); - if (yidx > hmax) - yidx = bgscale-1 - yidx; - dest = (char *)bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - xidx = (int)(i % bgscale); - if (xidx > hmax) - xidx = bgscale-1 - xidx; - k = xidx + yidx; - *dest++ = (k*r1 + (max-k)*r2) / max; - *dest++ = (k*g1 + (max-k)*g2) / max; - *dest++ = (k*b1 + (max-k)*b2) / max; - } - } - -/*--------------------------------------------------------------------------- - Radial "starburst" with azimuthal sinusoids; [eventually number of sinu- - soids will equal bgscale?]. This one is slow but very cool. Code con- - tributed by Pieter S. van der Meulen (originally in Smalltalk). - ---------------------------------------------------------------------------*/ - - } else if ((bg[pat].type & 0x07) == 2) { - uch ch; - int ii, x, y, hw, hh, grayspot; - double freq, rotate, saturate, gray, intensity; - double angle=0.0, aoffset=0.0, maxDist, dist; - double red=0.0, green=0.0, blue=0.0, hue, s, v, f, p, q, t; - - fprintf(stderr, "%s: computing radial background...", - PROGNAME); - fflush(stderr); - - hh = (int)(rpng2_info.height / 2); - hw = (int)(rpng2_info.width / 2); - - /* variables for radial waves: - * aoffset: number of degrees to rotate hue [CURRENTLY NOT USED] - * freq: number of color beams originating from the center - * grayspot: size of the graying center area (anti-alias) - * rotate: rotation of the beams as a function of radius - * saturate: saturation of beams' shape azimuthally - */ - angle = CLIP(angle, 0.0, 360.0); - grayspot = CLIP(bg[pat].bg_gray, 1, (hh + hw)); - freq = MAX((double)bg[pat].bg_freq, 0.0); - saturate = (double)bg[pat].bg_bsat * 0.1; - rotate = (double)bg[pat].bg_brot * 0.1; - gray = 0.0; - intensity = 0.0; - maxDist = (double)((hw*hw) + (hh*hh)); - - for (row = 0; row < rpng2_info.height; ++row) { - y = (int)(row - hh); - dest = (char *)bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - x = (int)(i - hw); - angle = (x == 0)? PI_2 : atan((double)y / (double)x); - gray = (double)MAX(ABS(y), ABS(x)) / grayspot; - gray = MIN(1.0, gray); - dist = (double)((x*x) + (y*y)) / maxDist; - intensity = cos((angle+(rotate*dist*PI)) * freq) * - gray * saturate; - intensity = (MAX(MIN(intensity,1.0),-1.0) + 1.0) * 0.5; - hue = (angle + PI) * INV_PI_360 + aoffset; - s = gray * ((double)(ABS(x)+ABS(y)) / (double)(hw + hh)); - s = MIN(MAX(s,0.0), 1.0); - v = MIN(MAX(intensity,0.0), 1.0); - - if (s == 0.0) { - ch = (uch)(v * 255.0); - *dest++ = ch; - *dest++ = ch; - *dest++ = ch; - } else { - if ((hue < 0.0) || (hue >= 360.0)) - hue -= (((int)(hue / 360.0)) * 360.0); - hue /= 60.0; - ii = (int)hue; - f = hue - (double)ii; - p = (1.0 - s) * v; - q = (1.0 - (s * f)) * v; - t = (1.0 - (s * (1.0 - f))) * v; - if (ii == 0) { red = v; green = t; blue = p; } - else if (ii == 1) { red = q; green = v; blue = p; } - else if (ii == 2) { red = p; green = v; blue = t; } - else if (ii == 3) { red = p; green = q; blue = v; } - else if (ii == 4) { red = t; green = p; blue = v; } - else if (ii == 5) { red = v; green = p; blue = q; } - *dest++ = (uch)(red * 255.0); - *dest++ = (uch)(green * 255.0); - *dest++ = (uch)(blue * 255.0); - } - } - } - fprintf(stderr, "done.\n"); - fflush(stderr); - } - -/*--------------------------------------------------------------------------- - Blast background image to display buffer before beginning PNG decode. - ---------------------------------------------------------------------------*/ - - if (depth == 24 || depth == 32) { - ulg red, green, blue; - int bpp = ximage->bits_per_pixel; - - for (row = 0; row < rpng2_info.height; ++row) { - src = bg_data + row*bg_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - if (bpp == 32) { /* slightly optimized version */ - for (i = rpng2_info.width; i > 0; --i) { - red = *src++; - green = *src++; - blue = *src++; - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } else { - for (i = rpng2_info.width; i > 0; --i) { - red = *src++; - green = *src++; - blue = *src++; - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - /* GRR BUG? this assumes bpp == 24 & bits are packed low */ - /* (probably need to use RShift, RMask, etc.) */ - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - } - - } else if (depth == 16) { - ush red, green, blue; - - for (row = 0; row < rpng2_info.height; ++row) { - src = bg_data + row*bg_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - for (i = rpng2_info.width; i > 0; --i) { - red = ((ush)(*src) << 8); ++src; - green = ((ush)(*src) << 8); ++src; - blue = ((ush)(*src) << 8); ++src; - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - - } else /* depth == 8 */ { - - /* GRR: add 8-bit support */ - - } - - XPutImage(display, window, gc, ximage, 0, 0, 0, 0, rpng2_info.width, - rpng2_info.height); - - return 0; - -} /* end function rpng2_x_load_bg_image() */ - - - - - -static void rpng2_x_display_row(ulg row) -{ - uch bg_red = rpng2_info.bg_red; - uch bg_green = rpng2_info.bg_green; - uch bg_blue = rpng2_info.bg_blue; - uch *src, *src2=NULL; - char *dest; - uch r, g, b, a; - int ximage_rowbytes = ximage->bytes_per_line; - ulg i, pixel; - static int rows=0, prevpass=(-1); - static ulg firstrow; - -/*--------------------------------------------------------------------------- - rows and firstrow simply track how many rows (and which ones) have not - yet been displayed; alternatively, we could call XPutImage() for every - row and not bother with the records-keeping. - ---------------------------------------------------------------------------*/ - - Trace((stderr, "beginning rpng2_x_display_row()\n")) - - if (rpng2_info.pass != prevpass) { - if (pause_after_pass && rpng2_info.pass > 0) { - XEvent e; - KeySym k; - - fprintf(stderr, - "%s: end of pass %d of 7; click in image window to continue\n", - PROGNAME, prevpass + 1); - do - XNextEvent(display, &e); - while (!QUIT(e,k)); - } - fprintf(stderr, "%s: pass %d of 7\r", PROGNAME, rpng2_info.pass + 1); - fflush(stderr); - prevpass = rpng2_info.pass; - } - - if (rows == 0) - firstrow = row; /* first row that is not yet displayed */ - - ++rows; /* count of rows received but not yet displayed */ - -/*--------------------------------------------------------------------------- - Aside from the use of the rpng2_info struct, the lack of an outer loop - (over rows) and moving the XPutImage() call outside the "if (depth)" - tests, this routine is identical to rpng_x_display_image() in the non- - progressive version of the program. - ---------------------------------------------------------------------------*/ - - if (depth == 24 || depth == 32) { - ulg red, green, blue; - int bpp = ximage->bits_per_pixel; - - src = rpng2_info.image_data + row*rpng2_info.rowbytes; - if (bg_image) - src2 = bg_data + row*bg_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - if (rpng2_info.channels == 3) { - for (i = rpng2_info.width; i > 0; --i) { - red = *src++; - green = *src++; - blue = *src++; - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - if (bpp == 32) { - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } else { - /* GRR BUG? this assumes bpp == 24 & bits are packed low */ - /* (probably need to use RShift, RMask, etc.) */ - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - } else /* if (rpng2_info.channels == 4) */ { - for (i = rpng2_info.width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (bg_image) { - bg_red = *src2++; - bg_green = *src2++; - bg_blue = *src2++; - } - if (a == 255) { - red = r; - green = g; - blue = b; - } else if (a == 0) { - red = bg_red; - green = bg_green; - blue = bg_blue; - } else { - /* this macro (from png.h) composites the foreground - * and background values and puts the result into the - * first argument */ - alpha_composite(red, r, a, bg_red); - alpha_composite(green, g, a, bg_green); - alpha_composite(blue, b, a, bg_blue); - } - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - if (bpp == 32) { - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } else { - /* GRR BUG? this assumes bpp == 24 & bits are packed low */ - /* (probably need to use RShift, RMask, etc.) */ - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - } - - } else if (depth == 16) { - ush red, green, blue; - - src = rpng2_info.row_pointers[row]; - if (bg_image) - src2 = bg_data + row*bg_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - if (rpng2_info.channels == 3) { - for (i = rpng2_info.width; i > 0; --i) { - red = ((ush)(*src) << 8); - ++src; - green = ((ush)(*src) << 8); - ++src; - blue = ((ush)(*src) << 8); - ++src; - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } else /* if (rpng2_info.channels == 4) */ { - for (i = rpng2_info.width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (bg_image) { - bg_red = *src2++; - bg_green = *src2++; - bg_blue = *src2++; - } - if (a == 255) { - red = ((ush)r << 8); - green = ((ush)g << 8); - blue = ((ush)b << 8); - } else if (a == 0) { - red = ((ush)bg_red << 8); - green = ((ush)bg_green << 8); - blue = ((ush)bg_blue << 8); - } else { - /* this macro (from png.h) composites the foreground - * and background values and puts the result back into - * the first argument (== fg byte here: safe) */ - alpha_composite(r, r, a, bg_red); - alpha_composite(g, g, a, bg_green); - alpha_composite(b, b, a, bg_blue); - red = ((ush)r << 8); - green = ((ush)g << 8); - blue = ((ush)b << 8); - } - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - - } else /* depth == 8 */ { - - /* GRR: add 8-bit support */ - - } - - -/*--------------------------------------------------------------------------- - Display after every 16 rows or when on one of last two rows. (Region - may include previously displayed lines due to interlacing--i.e., not - contiguous. Also, second-to-last row is final one in interlaced images - with odd number of rows.) For demos, flush (and delay) after every 16th - row so "sparse" passes don't go twice as fast. - ---------------------------------------------------------------------------*/ - - if (demo_timing && (row - firstrow >= 16 || row >= rpng2_info.height-2)) { - XPutImage(display, window, gc, ximage, 0, (int)firstrow, 0, - (int)firstrow, rpng2_info.width, row - firstrow + 1); - XFlush(display); - rows = 0; - usleep(usleep_duration); - } else - if (!demo_timing && ((rows & 0xf) == 0 || row >= rpng2_info.height-2)) { - XPutImage(display, window, gc, ximage, 0, (int)firstrow, 0, - (int)firstrow, rpng2_info.width, row - firstrow + 1); - XFlush(display); - rows = 0; - } - -} - - - - - -static void rpng2_x_finish_display(void) -{ - Trace((stderr, "beginning rpng2_x_finish_display()\n")) - - /* last row has already been displayed by rpng2_x_display_row(), so we - * have nothing to do here except set a flag and let the user know that - * the image is done */ - - rpng2_info.state = kDone; - printf( - "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); - fflush(stdout); -} - - - - - -static void rpng2_x_redisplay_image(ulg startcol, ulg startrow, - ulg width, ulg height) -{ - uch bg_red = rpng2_info.bg_red; - uch bg_green = rpng2_info.bg_green; - uch bg_blue = rpng2_info.bg_blue; - uch *src, *src2=NULL; - char *dest; - uch r, g, b, a; - ulg i, row, lastrow = 0; - ulg pixel; - int ximage_rowbytes = ximage->bytes_per_line; - - - Trace((stderr, "beginning display loop (image_channels == %d)\n", - rpng2_info.channels)) - Trace((stderr, " (width = %ld, rowbytes = %d, ximage_rowbytes = %d)\n", - rpng2_info.width, rpng2_info.rowbytes, ximage_rowbytes)) - Trace((stderr, " (bpp = %d)\n", ximage->bits_per_pixel)) - Trace((stderr, " (byte_order = %s)\n", ximage->byte_order == MSBFirst? - "MSBFirst" : (ximage->byte_order == LSBFirst? "LSBFirst" : "unknown"))) - -/*--------------------------------------------------------------------------- - Aside from the use of the rpng2_info struct and of src2 (for background - image), this routine is identical to rpng_x_display_image() in the non- - progressive version of the program--for the simple reason that redisplay - of the image against a new background happens after the image is fully - decoded and therefore is, by definition, non-progressive. - ---------------------------------------------------------------------------*/ - - if (depth == 24 || depth == 32) { - ulg red, green, blue; - int bpp = ximage->bits_per_pixel; - - for (lastrow = row = startrow; row < startrow+height; ++row) { - src = rpng2_info.image_data + row*rpng2_info.rowbytes; - if (bg_image) - src2 = bg_data + row*bg_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - if (rpng2_info.channels == 3) { - for (i = rpng2_info.width; i > 0; --i) { - red = *src++; - green = *src++; - blue = *src++; -#ifdef NO_24BIT_MASKS - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - if (bpp == 32) { - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } else { - /* this assumes bpp == 24 & bits are packed low */ - /* (probably need to use RShift, RMask, etc.) */ - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } -#else - red = (RShift < 0)? red << (-RShift) : red >> RShift; - green = (GShift < 0)? green << (-GShift) : green >> GShift; - blue = (BShift < 0)? blue << (-BShift) : blue >> BShift; - pixel = (red & RMask) | (green & GMask) | (blue & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - if (bpp == 32) { - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } else { - /* GRR BUG */ - /* this assumes bpp == 24 & bits are packed low */ - /* (probably need to use RShift/RMask/etc. here, too) */ - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } -#endif - } - - } else /* if (rpng2_info.channels == 4) */ { - for (i = rpng2_info.width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (bg_image) { - bg_red = *src2++; - bg_green = *src2++; - bg_blue = *src2++; - } - if (a == 255) { - red = r; - green = g; - blue = b; - } else if (a == 0) { - red = bg_red; - green = bg_green; - blue = bg_blue; - } else { - /* this macro (from png.h) composites the foreground - * and background values and puts the result into the - * first argument */ - alpha_composite(red, r, a, bg_red); - alpha_composite(green, g, a, bg_green); - alpha_composite(blue, b, a, bg_blue); - } -#ifdef NO_24BIT_MASKS - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - if (bpp == 32) { - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } else { - /* this assumes bpp == 24 & bits are packed low */ - /* (probably need to use RShift, RMask, etc.) */ - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } -#else - red = (RShift < 0)? red << (-RShift) : red >> RShift; - green = (GShift < 0)? green << (-GShift) : green >> GShift; - blue = (BShift < 0)? blue << (-BShift) : blue >> BShift; - pixel = (red & RMask) | (green & GMask) | (blue & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - if (bpp == 32) { - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } else { - /* GRR BUG */ - /* this assumes bpp == 24 & bits are packed low */ - /* (probably need to use RShift/RMask/etc. here, too) */ - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } -#endif - } - } - /* display after every 16 lines */ - if (((row+1) & 0xf) == 0) { - XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, - (int)lastrow, rpng2_info.width, 16); - XFlush(display); - lastrow = row + 1; - } - } - - } else if (depth == 16) { - ush red, green, blue; - - for (lastrow = row = startrow; row < startrow+height; ++row) { - src = rpng2_info.row_pointers[row]; - if (bg_image) - src2 = bg_data + row*bg_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - if (rpng2_info.channels == 3) { - for (i = rpng2_info.width; i > 0; --i) { - red = ((ush)(*src) << 8); - ++src; - green = ((ush)(*src) << 8); - ++src; - blue = ((ush)(*src) << 8); - ++src; - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } else /* if (rpng2_info.channels == 4) */ { - for (i = rpng2_info.width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (bg_image) { - bg_red = *src2++; - bg_green = *src2++; - bg_blue = *src2++; - } - if (a == 255) { - red = ((ush)r << 8); - green = ((ush)g << 8); - blue = ((ush)b << 8); - } else if (a == 0) { - red = ((ush)bg_red << 8); - green = ((ush)bg_green << 8); - blue = ((ush)bg_blue << 8); - } else { - /* this macro (from png.h) composites the foreground - * and background values and puts the result back into - * the first argument (== fg byte here: safe) */ - alpha_composite(r, r, a, bg_red); - alpha_composite(g, g, a, bg_green); - alpha_composite(b, b, a, bg_blue); - red = ((ush)r << 8); - green = ((ush)g << 8); - blue = ((ush)b << 8); - } - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - /* display after every 16 lines */ - if (((row+1) & 0xf) == 0) { - XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, - (int)lastrow, rpng2_info.width, 16); - XFlush(display); - lastrow = row + 1; - } - } - - } else /* depth == 8 */ { - - /* GRR: add 8-bit support */ - - } - - Trace((stderr, "calling final XPutImage()\n")) - if (lastrow < startrow+height) { - XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, - (int)lastrow, rpng2_info.width, rpng2_info.height-lastrow); - XFlush(display); - } - - (void)startcol; - (void)width; - -} /* end function rpng2_x_redisplay_image() */ - - - - - -#ifdef FEATURE_LOOP - -static void rpng2_x_reload_bg_image(void) -{ - char *dest; - uch r1, r2, g1, g2, b1, b2; - uch r1_inv, r2_inv, g1_inv, g2_inv, b1_inv, b2_inv; - int k, hmax, max; - int xidx, yidx, yidx_max; - int even_odd_vert, even_odd_horiz, even_odd; - int invert_gradient2 = (bg[pat].type & 0x08); - int invert_column; - ulg i, row; - - - bgscale = (pat == 0)? 8 : bgscale_default; - yidx_max = bgscale - 1; - -/*--------------------------------------------------------------------------- - Vertical gradients (ramps) in NxN squares, alternating direction and - colors (N == bgscale). - ---------------------------------------------------------------------------*/ - - if ((bg[pat].type & 0x07) == 0) { - uch r1_min = rgb[bg[pat].rgb1_min].r; - uch g1_min = rgb[bg[pat].rgb1_min].g; - uch b1_min = rgb[bg[pat].rgb1_min].b; - uch r2_min = rgb[bg[pat].rgb2_min].r; - uch g2_min = rgb[bg[pat].rgb2_min].g; - uch b2_min = rgb[bg[pat].rgb2_min].b; - int r1_diff = rgb[bg[pat].rgb1_max].r - r1_min; - int g1_diff = rgb[bg[pat].rgb1_max].g - g1_min; - int b1_diff = rgb[bg[pat].rgb1_max].b - b1_min; - int r2_diff = rgb[bg[pat].rgb2_max].r - r2_min; - int g2_diff = rgb[bg[pat].rgb2_max].g - g2_min; - int b2_diff = rgb[bg[pat].rgb2_max].b - b2_min; - - for (row = 0; row < rpng2_info.height; ++row) { - yidx = (int)(row % bgscale); - even_odd_vert = (int)((row / bgscale) & 1); - - r1 = r1_min + (r1_diff * yidx) / yidx_max; - g1 = g1_min + (g1_diff * yidx) / yidx_max; - b1 = b1_min + (b1_diff * yidx) / yidx_max; - r1_inv = r1_min + (r1_diff * (yidx_max-yidx)) / yidx_max; - g1_inv = g1_min + (g1_diff * (yidx_max-yidx)) / yidx_max; - b1_inv = b1_min + (b1_diff * (yidx_max-yidx)) / yidx_max; - - r2 = r2_min + (r2_diff * yidx) / yidx_max; - g2 = g2_min + (g2_diff * yidx) / yidx_max; - b2 = b2_min + (b2_diff * yidx) / yidx_max; - r2_inv = r2_min + (r2_diff * (yidx_max-yidx)) / yidx_max; - g2_inv = g2_min + (g2_diff * (yidx_max-yidx)) / yidx_max; - b2_inv = b2_min + (b2_diff * (yidx_max-yidx)) / yidx_max; - - dest = (char *)bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - even_odd_horiz = (int)((i / bgscale) & 1); - even_odd = even_odd_vert ^ even_odd_horiz; - invert_column = - (even_odd_horiz && (bg[pat].type & 0x10)); - if (even_odd == 0) { /* gradient #1 */ - if (invert_column) { - *dest++ = r1_inv; - *dest++ = g1_inv; - *dest++ = b1_inv; - } else { - *dest++ = r1; - *dest++ = g1; - *dest++ = b1; - } - } else { /* gradient #2 */ - if ((invert_column && invert_gradient2) || - (!invert_column && !invert_gradient2)) - { - *dest++ = r2; /* not inverted or */ - *dest++ = g2; /* doubly inverted */ - *dest++ = b2; - } else { - *dest++ = r2_inv; - *dest++ = g2_inv; /* singly inverted */ - *dest++ = b2_inv; - } - } - } - } - -/*--------------------------------------------------------------------------- - Soft gradient-diamonds with scale = bgscale. Code contributed by Adam - M. Costello. - ---------------------------------------------------------------------------*/ - - } else if ((bg[pat].type & 0x07) == 1) { - - hmax = (bgscale-1)/2; /* half the max weight of a color */ - max = 2*hmax; /* the max weight of a color */ - - r1 = rgb[bg[pat].rgb1_max].r; - g1 = rgb[bg[pat].rgb1_max].g; - b1 = rgb[bg[pat].rgb1_max].b; - r2 = rgb[bg[pat].rgb2_max].r; - g2 = rgb[bg[pat].rgb2_max].g; - b2 = rgb[bg[pat].rgb2_max].b; - - for (row = 0; row < rpng2_info.height; ++row) { - yidx = (int)(row % bgscale); - if (yidx > hmax) - yidx = bgscale-1 - yidx; - dest = (char *)bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - xidx = (int)(i % bgscale); - if (xidx > hmax) - xidx = bgscale-1 - xidx; - k = xidx + yidx; - *dest++ = (k*r1 + (max-k)*r2) / max; - *dest++ = (k*g1 + (max-k)*g2) / max; - *dest++ = (k*b1 + (max-k)*b2) / max; - } - } - -/*--------------------------------------------------------------------------- - Radial "starburst" with azimuthal sinusoids; [eventually number of sinu- - soids will equal bgscale?]. This one is slow but very cool. Code con- - tributed by Pieter S. van der Meulen (originally in Smalltalk). - ---------------------------------------------------------------------------*/ - - } else if ((bg[pat].type & 0x07) == 2) { - uch ch; - int ii, x, y, hw, hh, grayspot; - double freq, rotate, saturate, gray, intensity; - double angle=0.0, aoffset=0.0, maxDist, dist; - double red=0.0, green=0.0, blue=0.0, hue, s, v, f, p, q, t; - - hh = (int)(rpng2_info.height / 2); - hw = (int)(rpng2_info.width / 2); - - /* variables for radial waves: - * aoffset: number of degrees to rotate hue [CURRENTLY NOT USED] - * freq: number of color beams originating from the center - * grayspot: size of the graying center area (anti-alias) - * rotate: rotation of the beams as a function of radius - * saturate: saturation of beams' shape azimuthally - */ - angle = CLIP(angle, 0.0, 360.0); - grayspot = CLIP(bg[pat].bg_gray, 1, (hh + hw)); - freq = MAX((double)bg[pat].bg_freq, 0.0); - saturate = (double)bg[pat].bg_bsat * 0.1; - rotate = (double)bg[pat].bg_brot * 0.1; - gray = 0.0; - intensity = 0.0; - maxDist = (double)((hw*hw) + (hh*hh)); - - for (row = 0; row < rpng2_info.height; ++row) { - y = (int)(row - hh); - dest = (char *)bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - x = (int)(i - hw); - angle = (x == 0)? PI_2 : atan((double)y / (double)x); - gray = (double)MAX(ABS(y), ABS(x)) / grayspot; - gray = MIN(1.0, gray); - dist = (double)((x*x) + (y*y)) / maxDist; - intensity = cos((angle+(rotate*dist*PI)) * freq) * - gray * saturate; - intensity = (MAX(MIN(intensity,1.0),-1.0) + 1.0) * 0.5; - hue = (angle + PI) * INV_PI_360 + aoffset; - s = gray * ((double)(ABS(x)+ABS(y)) / (double)(hw + hh)); - s = MIN(MAX(s,0.0), 1.0); - v = MIN(MAX(intensity,0.0), 1.0); - - if (s == 0.0) { - ch = (uch)(v * 255.0); - *dest++ = ch; - *dest++ = ch; - *dest++ = ch; - } else { - if ((hue < 0.0) || (hue >= 360.0)) - hue -= (((int)(hue / 360.0)) * 360.0); - hue /= 60.0; - ii = (int)hue; - f = hue - (double)ii; - p = (1.0 - s) * v; - q = (1.0 - (s * f)) * v; - t = (1.0 - (s * (1.0 - f))) * v; - if (ii == 0) { red = v; green = t; blue = p; } - else if (ii == 1) { red = q; green = v; blue = p; } - else if (ii == 2) { red = p; green = v; blue = t; } - else if (ii == 3) { red = p; green = q; blue = v; } - else if (ii == 4) { red = t; green = p; blue = v; } - else if (ii == 5) { red = v; green = p; blue = q; } - *dest++ = (uch)(red * 255.0); - *dest++ = (uch)(green * 255.0); - *dest++ = (uch)(blue * 255.0); - } - } - } - } - -} /* end function rpng2_x_reload_bg_image() */ - - - - - -static int is_number(char *p) -{ - while (*p) { - if (!isdigit(*p)) - return FALSE; - ++p; - } - return TRUE; -} - -#endif /* FEATURE_LOOP */ - - - - - -static void rpng2_x_cleanup(void) -{ - if (bg_image && bg_data) { - free(bg_data); - bg_data = NULL; - } - - if (rpng2_info.image_data) { - free(rpng2_info.image_data); - rpng2_info.image_data = NULL; - } - - if (rpng2_info.row_pointers) { - free(rpng2_info.row_pointers); - rpng2_info.row_pointers = NULL; - } - - if (ximage) { - if (ximage->data) { - free(ximage->data); /* we allocated it, so we free it */ - ximage->data = (char *)NULL; /* instead of XDestroyImage() */ - } - XDestroyImage(ximage); - ximage = NULL; - } - - if (have_gc) - XFreeGC(display, gc); - - if (have_window) - XDestroyWindow(display, window); - - if (have_colormap) - XFreeColormap(display, colormap); - - if (have_nondefault_visual) - XFree(visual_list); -} - - - - - -static int rpng2_x_msb(ulg u32val) -{ - int i; - - for (i = 31; i >= 0; --i) { - if (u32val & 0x80000000L) - break; - u32val <<= 1; - } - return i; -} diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/toucan.png b/thirdparty/libpng-1.6.37/contrib/gregbook/toucan.png deleted file mode 100644 index 72b472e..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/toucan.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9813e3a499eb5145c88dec52327de8493362155f43ced42737caad513db94de7 -size 12901 diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/wpng.c b/thirdparty/libpng-1.6.37/contrib/gregbook/wpng.c deleted file mode 100644 index a8f367f..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/wpng.c +++ /dev/null @@ -1,865 +0,0 @@ -/*--------------------------------------------------------------------------- - - wpng - simple PNG-writing program wpng.c - - This program converts certain NetPBM binary files (grayscale and RGB, - maxval = 255) to PNG. Non-interlaced PNGs are written progressively; - interlaced PNGs are read and written in one memory-intensive blast. - - Thanks to Jean-loup Gailly for providing the necessary trick to read - interactive text from the keyboard while stdin is redirected. Thanks - to Cosmin Truta for Cygwin fixes. - - NOTE: includes provisional support for PNM type "8" (portable alphamap) - images, presumed to be a 32-bit interleaved RGBA format; no pro- - vision for possible interleaved grayscale+alpha (16-bit) format. - THIS IS UNLIKELY TO BECOME AN OFFICIAL NETPBM ALPHA FORMAT! - - to do: - - delete output file if quit before calling any writepng routines - - process backspace with -text option under DOS/Win? (currently get ^H) - - --------------------------------------------------------------------------- - - Changelog: - - 1.01: initial public release - - 1.02: modified to allow abbreviated options - - 1.03: removed extraneous character from usage screen; fixed bug in - command-line parsing - - 1.04: fixed DOS/OS2/Win32 detection, including partial Cygwin fix - (see http://home.att.net/~perlspinr/diffs/GregBook_cygwin.diff) - - 2.00: dual-licensed (added GNU GPL) - - 2.01: check for integer overflow (Glenn R-P) - - [REPORTED BUG (win32 only): "contrib/gregbook/wpng.c - cmd line - dose not work! In order to do something useful I needed to redirect - both input and output, with cygwin and with bcc32 as well. Under - Linux, the same wpng appears to work fine. I don't know what is - the problem."] - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2007, 2017 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ---------------------------------------------------------------------------*/ - -#define PROGNAME "wpng" -#define VERSION "2.00 of 2 June 2007" -#define APPNAME "Simple PGM/PPM/PAM to PNG Converter" - -#if defined(__MSDOS__) || defined(__OS2__) -# define DOS_OS2_W32 -#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) -# ifndef __GNUC__ /* treat Win32 native ports of gcc as Unix environments */ -# define DOS_OS2_W32 -# endif -#endif - -#include -#include -#include -#include /* for jmpbuf declaration in writepng.h */ -#include - -#ifdef DOS_OS2_W32 -# include /* for isatty(), setmode() prototypes */ -# include /* O_BINARY for fdopen() without text translation */ -# ifdef __EMX__ -# ifndef getch -# define getch() _read_kbd(0, 1, 0) /* need getche() */ -# endif -# else /* !__EMX__ */ -# ifdef __GO32__ -# include -# define getch() getkey() /* GRR: need getche() */ -# else -# include /* for getche() console input */ -# endif -# endif /* ?__EMX__ */ -# define FGETS(buf,len,stream) dos_kbd_gets(buf,len) -#else -# include /* for isatty() prototype */ -# define FGETS fgets -#endif - -/* #define DEBUG : this enables the Trace() macros */ - -/* #define FORBID_LATIN1_CTRL : this requires the user to re-enter any - text that includes control characters discouraged by the PNG spec; text - that includes an escape character (27) must be re-entered regardless */ - -#include "writepng.h" /* typedefs, common macros, writepng prototypes */ - - - -/* local prototypes */ - -static int wpng_isvalid_latin1(uch *p, int len); -static void wpng_cleanup(void); - -#ifdef DOS_OS2_W32 - static char *dos_kbd_gets(char *buf, int len); -#endif - - - -static mainprog_info wpng_info; /* lone global */ - - - -int main(int argc, char **argv) -{ -#ifndef DOS_OS2_W32 - FILE *keybd; -#endif -#ifdef sgi - FILE *tmpfile; /* or we could just use keybd, since no overlap */ - char tmpline[80]; -#endif - char *inname = NULL, outname[256]; - char *p, pnmchar, pnmline[256]; - char *bgstr, *textbuf = NULL; - ulg rowbytes; - int rc, len = 0; - int error = 0; - int text = FALSE; - int maxval; - double LUT_exponent; /* just the lookup table */ - double CRT_exponent = 2.2; /* just the monitor */ - double default_display_exponent; /* whole display system */ - double default_gamma = 0.0; - - - wpng_info.infile = NULL; - wpng_info.outfile = NULL; - wpng_info.image_data = NULL; - wpng_info.row_pointers = NULL; - wpng_info.filter = FALSE; - wpng_info.interlaced = FALSE; - wpng_info.have_bg = FALSE; - wpng_info.have_time = FALSE; - wpng_info.have_text = 0; - wpng_info.gamma = 0.0; - - - /* First get the default value for our display-system exponent, i.e., - * the product of the CRT exponent and the exponent corresponding to - * the frame-buffer's lookup table (LUT), if any. If the PNM image - * looks correct on the user's display system, its file gamma is the - * inverse of this value. (Note that this is not an exhaustive list - * of LUT values--e.g., OpenStep has a lot of weird ones--but it should - * cover 99% of the current possibilities. This section must ensure - * that default_display_exponent is positive.) */ - -#if defined(NeXT) - /* third-party utilities can modify the default LUT exponent */ - LUT_exponent = 1.0 / 2.2; - /* - if (some_next_function_that_returns_gamma(&next_gamma)) - LUT_exponent = 1.0 / next_gamma; - */ -#elif defined(sgi) - LUT_exponent = 1.0 / 1.7; - /* there doesn't seem to be any documented function to - * get the "gamma" value, so we do it the hard way */ - tmpfile = fopen("/etc/config/system.glGammaVal", "r"); - if (tmpfile) { - double sgi_gamma; - - fgets(tmpline, 80, tmpfile); - fclose(tmpfile); - sgi_gamma = atof(tmpline); - if (sgi_gamma > 0.0) - LUT_exponent = 1.0 / sgi_gamma; - } -#elif defined(Macintosh) - LUT_exponent = 1.8 / 2.61; - /* - if (some_mac_function_that_returns_gamma(&mac_gamma)) - LUT_exponent = mac_gamma / 2.61; - */ -#else - LUT_exponent = 1.0; /* assume no LUT: most PCs */ -#endif - - /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ - default_display_exponent = LUT_exponent * CRT_exponent; - - - /* If the user has set the SCREEN_GAMMA environment variable as suggested - * (somewhat imprecisely) in the libpng documentation, use that; otherwise - * use the default value we just calculated. Either way, the user may - * override this via a command-line option. */ - - if ((p = getenv("SCREEN_GAMMA")) != NULL) { - double exponent = atof(p); - - if (exponent > 0.0) - default_gamma = 1.0 / exponent; - } - - if (default_gamma == 0.0) - default_gamma = 1.0 / default_display_exponent; - - - /* Now parse the command line for options and the PNM filename. */ - - while (*++argv && !error) { - if (!strncmp(*argv, "-i", 2)) { - wpng_info.interlaced = TRUE; - } else if (!strncmp(*argv, "-time", 3)) { - wpng_info.modtime = time(NULL); - wpng_info.have_time = TRUE; - } else if (!strncmp(*argv, "-text", 3)) { - text = TRUE; - } else if (!strncmp(*argv, "-gamma", 2)) { - if (!*++argv) - ++error; - else { - wpng_info.gamma = atof(*argv); - if (wpng_info.gamma <= 0.0) - ++error; - else if (wpng_info.gamma > 1.01) - fprintf(stderr, PROGNAME - " warning: file gammas are usually less than 1.0\n"); - } - } else if (!strncmp(*argv, "-bgcolor", 4)) { - if (!*++argv) - ++error; - else { - bgstr = *argv; - if (strlen(bgstr) != 7 || bgstr[0] != '#') - ++error; - else { - unsigned r, g, b; /* this way quiets compiler warnings */ - - sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); - wpng_info.bg_red = (uch)r; - wpng_info.bg_green = (uch)g; - wpng_info.bg_blue = (uch)b; - wpng_info.have_bg = TRUE; - } - } - } else { - if (**argv != '-') { - inname = *argv; - if (argv[1]) /* shouldn't be any more args after filename */ - ++error; - } else - ++error; /* not expecting any other options */ - } - } - - - /* open the input and output files, or register an error and abort */ - - if (!inname) { - if (isatty(0)) { - fprintf(stderr, PROGNAME - ": must give input filename or provide image data via stdin\n"); - ++error; - } else { -#ifdef DOS_OS2_W32 - /* some buggy C libraries require BOTH setmode() and fdopen(bin) */ - setmode(fileno(stdin), O_BINARY); - setmode(fileno(stdout), O_BINARY); -#endif - if ((wpng_info.infile = fdopen(fileno(stdin), "rb")) == NULL) { - fprintf(stderr, PROGNAME - ": unable to reopen stdin in binary mode\n"); - ++error; - } else - if ((wpng_info.outfile = fdopen(fileno(stdout), "wb")) == NULL) { - fprintf(stderr, PROGNAME - ": unable to reopen stdout in binary mode\n"); - fclose(wpng_info.infile); - ++error; - } else - wpng_info.filter = TRUE; - } - } else if ((len = strlen(inname)) > 250) { - fprintf(stderr, PROGNAME ": input filename is too long [%d chars]\n", - len); - ++error; - } else if (!(wpng_info.infile = fopen(inname, "rb"))) { - fprintf(stderr, PROGNAME ": can't open input file [%s]\n", inname); - ++error; - } - - if (!error) { - fgets(pnmline, 256, wpng_info.infile); - if (pnmline[0] != 'P' || ((pnmchar = pnmline[1]) != '5' && - pnmchar != '6' && pnmchar != '8')) - { - fprintf(stderr, PROGNAME - ": input file [%s] is not a binary PGM, PPM or PAM file\n", - inname); - ++error; - } else { - wpng_info.pnmtype = (int)(pnmchar - '0'); - if (wpng_info.pnmtype != 8) - wpng_info.have_bg = FALSE; /* no need for bg if opaque */ - do { - fgets(pnmline, 256, wpng_info.infile); /* lose any comments */ - } while (pnmline[0] == '#'); - sscanf(pnmline, "%ld %ld", &wpng_info.width, &wpng_info.height); - do { - fgets(pnmline, 256, wpng_info.infile); /* more comment lines */ - } while (pnmline[0] == '#'); - sscanf(pnmline, "%d", &maxval); - if (wpng_info.width <= 0L || wpng_info.height <= 0L || - maxval != 255) - { - fprintf(stderr, PROGNAME - ": only positive width/height, maxval == 255 allowed \n"); - ++error; - } - wpng_info.sample_depth = 8; /* <==> maxval 255 */ - - if (!wpng_info.filter) { - /* make outname from inname */ - if ((p = strrchr(inname, '.')) == NULL || - (p - inname) != (len - 4)) - { - strcpy(outname, inname); - strcpy(outname+len, ".png"); - } else { - len -= 4; - strncpy(outname, inname, len); - strcpy(outname+len, ".png"); - } - /* check if outname already exists; if not, open */ - if ((wpng_info.outfile = fopen(outname, "rb")) != NULL) { - fprintf(stderr, PROGNAME ": output file exists [%s]\n", - outname); - fclose(wpng_info.outfile); - ++error; - } else if (!(wpng_info.outfile = fopen(outname, "wb"))) { - fprintf(stderr, PROGNAME ": can't open output file [%s]\n", - outname); - ++error; - } - } - } - if (error) { - fclose(wpng_info.infile); - wpng_info.infile = NULL; - if (wpng_info.filter) { - fclose(wpng_info.outfile); - wpng_info.outfile = NULL; - } - } - } - - - /* if we had any errors, print usage and die horrible death...arrr! */ - - if (error) { - fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, APPNAME); - writepng_version_info(); - fprintf(stderr, "\n" -"Usage: %s [-gamma exp] [-bgcolor bg] [-text] [-time] [-interlace] pnmfile\n" -"or: ... | %s [-gamma exp] [-bgcolor bg] [-text] [-time] [-interlace] | ...\n" - " exp \ttransfer-function exponent (``gamma'') of the image in\n" - "\t\t floating-point format (e.g., ``%.5f''); if image looks\n" - "\t\t correct on given display system, image gamma is equal to\n" - "\t\t inverse of display-system exponent, i.e., 1 / (LUT * CRT)\n" - "\t\t (where LUT = lookup-table exponent and CRT = CRT exponent;\n" - "\t\t first varies, second is usually 2.2, all are positive)\n" - " bg \tdesired background color for alpha-channel images, in\n" - "\t\t 7-character hex RGB format (e.g., ``#ff7700'' for orange:\n" - "\t\t same as HTML colors)\n" - " -text\tprompt interactively for text info (tEXt chunks)\n" - " -time\tinclude a tIME chunk (last modification time)\n" - " -interlace\twrite interlaced PNG image\n" - "\n" -"pnmfile or stdin must be a binary PGM (`P5'), PPM (`P6') or (extremely\n" -"unofficial and unsupported!) PAM (`P8') file. Currently it is required\n" -"to have maxval == 255 (i.e., no scaling). If pnmfile is specified, it\n" -"is converted to the corresponding PNG file with the same base name but a\n" -"``.png'' extension; files read from stdin are converted and sent to stdout.\n" -"The conversion is progressive (low memory usage) unless interlacing is\n" -"requested; in that case the whole image will be buffered in memory and\n" -"written in one call.\n" - "\n", PROGNAME, PROGNAME, default_gamma); - exit(1); - } - - - /* prepare the text buffers for libpng's use; note that even though - * PNG's png_text struct includes a length field, we don't have to fill - * it out */ - - if (text && -#ifndef DOS_OS2_W32 - (keybd = fdopen(fileno(stderr), "r")) != NULL && -#endif - (textbuf = (char *)malloc((5 + 9)*75)) != NULL) - { - int i, valid, result; - - fprintf(stderr, - "Enter text info (no more than 72 characters per line);\n"); - fprintf(stderr, "to skip a field, hit the key.\n"); - /* note: just leaves len == 1 */ - - do { - valid = TRUE; - p = textbuf + TEXT_TITLE_OFFSET; - fprintf(stderr, " Title: "); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { - if (p[len-1] == '\n') - p[--len] = '\0'; - wpng_info.title = p; - wpng_info.have_text |= TEXT_TITLE; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_TITLE; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_TITLE; - valid = FALSE; - } -#endif - } - } - } while (!valid); - - do { - valid = TRUE; - p = textbuf + TEXT_AUTHOR_OFFSET; - fprintf(stderr, " Author: "); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { - if (p[len-1] == '\n') - p[--len] = '\0'; - wpng_info.author = p; - wpng_info.have_text |= TEXT_AUTHOR; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_AUTHOR; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_AUTHOR; - valid = FALSE; - } -#endif - } - } - } while (!valid); - - do { - valid = TRUE; - p = textbuf + TEXT_DESC_OFFSET; - fprintf(stderr, " Description (up to 9 lines):\n"); - for (i = 1; i < 10; ++i) { - fprintf(stderr, " [%d] ", i); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) - p += len; /* now points at NULL; char before is newline */ - else - break; - } - if ((len = p - (textbuf + TEXT_DESC_OFFSET)) > 1) { - if (p[-1] == '\n') { - p[-1] = '\0'; - --len; - } - wpng_info.desc = textbuf + TEXT_DESC_OFFSET; - wpng_info.have_text |= TEXT_DESC; - p = textbuf + TEXT_DESC_OFFSET; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_DESC; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_DESC; - valid = FALSE; - } -#endif - } - } - } while (!valid); - - do { - valid = TRUE; - p = textbuf + TEXT_COPY_OFFSET; - fprintf(stderr, " Copyright: "); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { - if (p[len-1] == '\n') - p[--len] = '\0'; - wpng_info.copyright = p; - wpng_info.have_text |= TEXT_COPY; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_COPY; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_COPY; - valid = FALSE; - } -#endif - } - } - } while (!valid); - - do { - valid = TRUE; - p = textbuf + TEXT_EMAIL_OFFSET; - fprintf(stderr, " E-mail: "); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { - if (p[len-1] == '\n') - p[--len] = '\0'; - wpng_info.email = p; - wpng_info.have_text |= TEXT_EMAIL; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_EMAIL; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_EMAIL; - valid = FALSE; - } -#endif - } - } - } while (!valid); - - do { - valid = TRUE; - p = textbuf + TEXT_URL_OFFSET; - fprintf(stderr, " URL: "); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { - if (p[len-1] == '\n') - p[--len] = '\0'; - wpng_info.url = p; - wpng_info.have_text |= TEXT_URL; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_URL; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_URL; - valid = FALSE; - } -#endif - } - } - } while (!valid); - -#ifndef DOS_OS2_W32 - fclose(keybd); -#endif - - } else if (text) { - fprintf(stderr, PROGNAME ": unable to allocate memory for text\n"); - text = FALSE; - wpng_info.have_text = 0; - } - - - /* allocate libpng stuff, initialize transformations, write pre-IDAT data */ - - if ((rc = writepng_init(&wpng_info)) != 0) { - switch (rc) { - case 2: - fprintf(stderr, PROGNAME - ": libpng initialization problem (longjmp)\n"); - break; - case 4: - fprintf(stderr, PROGNAME ": insufficient memory\n"); - break; - case 11: - fprintf(stderr, PROGNAME - ": internal logic error (unexpected PNM type)\n"); - break; - default: - fprintf(stderr, PROGNAME - ": unknown writepng_init() error\n"); - break; - } - exit(rc); - } - - - /* free textbuf, since it's a completely local variable and all text info - * has just been written to the PNG file */ - - if (text && textbuf) { - free(textbuf); - textbuf = NULL; - } - - - /* calculate rowbytes on basis of image type; note that this becomes much - * more complicated if we choose to support PBM type, ASCII PNM types, or - * 16-bit-per-sample binary data [currently not an official NetPBM type] */ - - if (wpng_info.pnmtype == 5) - rowbytes = wpng_info.width; - else if (wpng_info.pnmtype == 6) - rowbytes = wpng_info.width * 3; - else /* if (wpng_info.pnmtype == 8) */ - rowbytes = wpng_info.width * 4; - - - /* read and write the image, either in its entirety (if writing interlaced - * PNG) or row by row (if non-interlaced) */ - - fprintf(stderr, "Encoding image data...\n"); - fflush(stderr); - - if (wpng_info.interlaced) { - long i; - ulg bytes; - ulg image_bytes; - - /* Guard against integer overflow */ - if (wpng_info_height > ((size_t)(-1)/rowbytes || - wpng_info_height > ((ulg)(-1)/rowbytes) { - fprintf(stderr, PROGNAME ": image_data buffer too large\n"); - writepng_cleanup(&wpng_info); - wpng_cleanup(); - exit(5); - } - - image_bytes = rowbytes * wpng_info.height; - - wpng_info.image_data = (uch *)malloc(image_bytes); - wpng_info.row_pointers = (uch **)malloc(wpng_info.height*sizeof(uch *)); - if (wpng_info.image_data == NULL || wpng_info.row_pointers == NULL) { - fprintf(stderr, PROGNAME ": insufficient memory for image data\n"); - writepng_cleanup(&wpng_info); - wpng_cleanup(); - exit(5); - } - for (i = 0; i < wpng_info.height; ++i) - wpng_info.row_pointers[i] = wpng_info.image_data + i*rowbytes; - bytes = fread(wpng_info.image_data, 1, image_bytes, wpng_info.infile); - if (bytes != image_bytes) { - fprintf(stderr, PROGNAME ": expected %lu bytes, got %lu bytes\n", - image_bytes, bytes); - fprintf(stderr, " (continuing anyway)\n"); - } - if (writepng_encode_image(&wpng_info) != 0) { - fprintf(stderr, PROGNAME - ": libpng problem (longjmp) while writing image data\n"); - writepng_cleanup(&wpng_info); - wpng_cleanup(); - exit(2); - } - - } else /* not interlaced: write progressively (row by row) */ { - long j; - ulg bytes; - - wpng_info.image_data = (uch *)malloc(rowbytes); - if (wpng_info.image_data == NULL) { - fprintf(stderr, PROGNAME ": insufficient memory for row data\n"); - writepng_cleanup(&wpng_info); - wpng_cleanup(); - exit(5); - } - error = 0; - for (j = wpng_info.height; j > 0L; --j) { - bytes = fread(wpng_info.image_data, 1, rowbytes, wpng_info.infile); - if (bytes != rowbytes) { - fprintf(stderr, PROGNAME - ": expected %lu bytes, got %lu bytes (row %ld)\n", rowbytes, - bytes, wpng_info.height-j); - ++error; - break; - } - if (writepng_encode_row(&wpng_info) != 0) { - fprintf(stderr, PROGNAME - ": libpng problem (longjmp) while writing row %ld\n", - wpng_info.height-j); - ++error; - break; - } - } - if (error) { - writepng_cleanup(&wpng_info); - wpng_cleanup(); - exit(2); - } - if (writepng_encode_finish(&wpng_info) != 0) { - fprintf(stderr, PROGNAME ": error on final libpng call\n"); - writepng_cleanup(&wpng_info); - wpng_cleanup(); - exit(2); - } - } - - - /* OK, we're done (successfully): clean up all resources and quit */ - - fprintf(stderr, "Done.\n"); - fflush(stderr); - - writepng_cleanup(&wpng_info); - wpng_cleanup(); - - return 0; -} - - - - - -static int wpng_isvalid_latin1(uch *p, int len) -{ - int i, result = -1; - - for (i = 0; i < len; ++i) { - if (p[i] == 10 || (p[i] > 31 && p[i] < 127) || p[i] > 160) - continue; /* character is completely OK */ - if (result < 0 || (p[result] != 27 && p[i] == 27)) - result = i; /* mark location of first questionable one */ - } /* or of first escape character (bad) */ - - return result; -} - - - - - -static void wpng_cleanup(void) -{ - if (wpng_info.outfile) { - fclose(wpng_info.outfile); - wpng_info.outfile = NULL; - } - - if (wpng_info.infile) { - fclose(wpng_info.infile); - wpng_info.infile = NULL; - } - - if (wpng_info.image_data) { - free(wpng_info.image_data); - wpng_info.image_data = NULL; - } - - if (wpng_info.row_pointers) { - free(wpng_info.row_pointers); - wpng_info.row_pointers = NULL; - } -} - - - - -#ifdef DOS_OS2_W32 - -static char *dos_kbd_gets(char *buf, int len) -{ - int ch, count=0; - - do { - buf[count++] = ch = getche(); - } while (ch != '\r' && count < len-1); - - buf[count--] = '\0'; /* terminate string */ - if (buf[count] == '\r') /* Enter key makes CR, so change to newline */ - buf[count] = '\n'; - - fprintf(stderr, "\n"); /* Enter key does *not* cause a newline */ - fflush(stderr); - - return buf; -} - -#endif /* DOS_OS2_W32 */ diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/writepng.c b/thirdparty/libpng-1.6.37/contrib/gregbook/writepng.c deleted file mode 100644 index 055c743..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/writepng.c +++ /dev/null @@ -1,401 +0,0 @@ -/*--------------------------------------------------------------------------- - - wpng - simple PNG-writing program writepng.c - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2007, 2017 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ---------------------------------------------------------------------------*/ - - -#include /* for exit() prototype */ -#include - -#include "png.h" /* libpng header, includes setjmp.h */ -#include "writepng.h" /* typedefs, common macros, public prototypes */ - - -/* local prototype */ - -static void writepng_error_handler(png_structp png_ptr, png_const_charp msg); - - - -void writepng_version_info(void) -{ - fprintf(stderr, " Compiled with libpng %s; using libpng %s.\n", - PNG_LIBPNG_VER_STRING, png_libpng_ver); - fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", - ZLIB_VERSION, zlib_version); -} - - - - -/* returns 0 for success, 2 for libpng problem, 4 for out of memory, 11 for - * unexpected pnmtype; note that outfile might be stdout */ - -int writepng_init(mainprog_info *mainprog_ptr) -{ - png_structp png_ptr; /* note: temporary variables! */ - png_infop info_ptr; - int color_type, interlace_type; - - - /* could also replace libpng warning-handler (final NULL), but no need: */ - - png_ptr = png_create_write_struct(png_get_libpng_ver(NULL), mainprog_ptr, - writepng_error_handler, NULL); - if (!png_ptr) - return 4; /* out of memory */ - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) { - png_destroy_write_struct(&png_ptr, NULL); - return 4; /* out of memory */ - } - - - /* setjmp() must be called in every function that calls a PNG-writing - * libpng function, unless an alternate error handler was installed-- - * but compatible error handlers must either use longjmp() themselves - * (as in this program) or some other method to return control to - * application code, so here we go: */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_write_struct(&png_ptr, &info_ptr); - return 2; - } - - - /* make sure outfile is (re)opened in BINARY mode */ - - png_init_io(png_ptr, mainprog_ptr->outfile); - - - /* set the compression levels--in general, always want to leave filtering - * turned on (except for palette images) and allow all of the filters, - * which is the default; want 32K zlib window, unless entire image buffer - * is 16K or smaller (unknown here)--also the default; usually want max - * compression (NOT the default); and remaining compression flags should - * be left alone */ - - png_set_compression_level(png_ptr, Z_BEST_COMPRESSION); -/* - >> this is default for no filtering; Z_FILTERED is default otherwise: - png_set_compression_strategy(png_ptr, Z_DEFAULT_STRATEGY); - >> these are all defaults: - png_set_compression_mem_level(png_ptr, 8); - png_set_compression_window_bits(png_ptr, 15); - png_set_compression_method(png_ptr, 8); - */ - - - /* set the image parameters appropriately */ - - if (mainprog_ptr->pnmtype == 5) - color_type = PNG_COLOR_TYPE_GRAY; - else if (mainprog_ptr->pnmtype == 6) - color_type = PNG_COLOR_TYPE_RGB; - else if (mainprog_ptr->pnmtype == 8) - color_type = PNG_COLOR_TYPE_RGB_ALPHA; - else { - png_destroy_write_struct(&png_ptr, &info_ptr); - return 11; - } - - interlace_type = mainprog_ptr->interlaced? PNG_INTERLACE_ADAM7 : - PNG_INTERLACE_NONE; - - png_set_IHDR(png_ptr, info_ptr, mainprog_ptr->width, mainprog_ptr->height, - mainprog_ptr->sample_depth, color_type, interlace_type, - PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); - - if (mainprog_ptr->gamma > 0.0) - png_set_gAMA(png_ptr, info_ptr, mainprog_ptr->gamma); - - if (mainprog_ptr->have_bg) { /* we know it's RGBA, not gray+alpha */ - png_color_16 background; - - background.red = mainprog_ptr->bg_red; - background.green = mainprog_ptr->bg_green; - background.blue = mainprog_ptr->bg_blue; - png_set_bKGD(png_ptr, info_ptr, &background); - } - - if (mainprog_ptr->have_time) { - png_time modtime; - - png_convert_from_time_t(&modtime, mainprog_ptr->modtime); - png_set_tIME(png_ptr, info_ptr, &modtime); - } - - if (mainprog_ptr->have_text) { - png_text text[6]; - int num_text = 0; - - if (mainprog_ptr->have_text & TEXT_TITLE) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "Title"; - text[num_text].text = mainprog_ptr->title; - ++num_text; - } - if (mainprog_ptr->have_text & TEXT_AUTHOR) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "Author"; - text[num_text].text = mainprog_ptr->author; - ++num_text; - } - if (mainprog_ptr->have_text & TEXT_DESC) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "Description"; - text[num_text].text = mainprog_ptr->desc; - ++num_text; - } - if (mainprog_ptr->have_text & TEXT_COPY) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "Copyright"; - text[num_text].text = mainprog_ptr->copyright; - ++num_text; - } - if (mainprog_ptr->have_text & TEXT_EMAIL) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "E-mail"; - text[num_text].text = mainprog_ptr->email; - ++num_text; - } - if (mainprog_ptr->have_text & TEXT_URL) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "URL"; - text[num_text].text = mainprog_ptr->url; - ++num_text; - } - png_set_text(png_ptr, info_ptr, text, num_text); - } - - - /* write all chunks up to (but not including) first IDAT */ - - png_write_info(png_ptr, info_ptr); - - - /* if we wanted to write any more text info *after* the image data, we - * would set up text struct(s) here and call png_set_text() again, with - * just the new data; png_set_tIME() could also go here, but it would - * have no effect since we already called it above (only one tIME chunk - * allowed) */ - - - /* set up the transformations: for now, just pack low-bit-depth pixels - * into bytes (one, two or four pixels per byte) */ - - png_set_packing(png_ptr); -/* png_set_shift(png_ptr, &sig_bit); to scale low-bit-depth values */ - - - /* make sure we save our pointers for use in writepng_encode_image() */ - - mainprog_ptr->png_ptr = png_ptr; - mainprog_ptr->info_ptr = info_ptr; - - - /* OK, that's all we need to do for now; return happy */ - - return 0; -} - - - - - -/* returns 0 for success, 2 for libpng (longjmp) problem */ - -int writepng_encode_image(mainprog_info *mainprog_ptr) -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - - /* as always, setjmp() must be called in every function that calls a - * PNG-writing libpng function */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_write_struct(&png_ptr, &info_ptr); - mainprog_ptr->png_ptr = NULL; - mainprog_ptr->info_ptr = NULL; - return 2; - } - - - /* and now we just write the whole image; libpng takes care of interlacing - * for us */ - - png_write_image(png_ptr, mainprog_ptr->row_pointers); - - - /* since that's it, we also close out the end of the PNG file now--if we - * had any text or time info to write after the IDATs, second argument - * would be info_ptr, but we optimize slightly by sending NULL pointer: */ - - png_write_end(png_ptr, NULL); - - return 0; -} - - - - - -/* returns 0 if succeeds, 2 if libpng problem */ - -int writepng_encode_row(mainprog_info *mainprog_ptr) /* NON-interlaced only! */ -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - - /* as always, setjmp() must be called in every function that calls a - * PNG-writing libpng function */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_write_struct(&png_ptr, &info_ptr); - mainprog_ptr->png_ptr = NULL; - mainprog_ptr->info_ptr = NULL; - return 2; - } - - - /* image_data points at our one row of image data */ - - png_write_row(png_ptr, mainprog_ptr->image_data); - - return 0; -} - - - - - -/* returns 0 if succeeds, 2 if libpng problem */ - -int writepng_encode_finish(mainprog_info *mainprog_ptr) /* NON-interlaced! */ -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - - /* as always, setjmp() must be called in every function that calls a - * PNG-writing libpng function */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_write_struct(&png_ptr, &info_ptr); - mainprog_ptr->png_ptr = NULL; - mainprog_ptr->info_ptr = NULL; - return 2; - } - - - /* close out PNG file; if we had any text or time info to write after - * the IDATs, second argument would be info_ptr: */ - - png_write_end(png_ptr, NULL); - - return 0; -} - - - - - -void writepng_cleanup(mainprog_info *mainprog_ptr) -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - if (png_ptr && info_ptr) - png_destroy_write_struct(&png_ptr, &info_ptr); -} - - - - - -static void writepng_error_handler(png_structp png_ptr, png_const_charp msg) -{ - mainprog_info *mainprog_ptr; - - /* This function, aside from the extra step of retrieving the "error - * pointer" (below) and the fact that it exists within the application - * rather than within libpng, is essentially identical to libpng's - * default error handler. The second point is critical: since both - * setjmp() and longjmp() are called from the same code, they are - * guaranteed to have compatible notions of how big a jmp_buf is, - * regardless of whether _BSD_SOURCE or anything else has (or has not) - * been defined. */ - - fprintf(stderr, "writepng libpng error: %s\n", msg); - fflush(stderr); - - mainprog_ptr = png_get_error_ptr(png_ptr); - if (mainprog_ptr == NULL) { /* we are completely hosed now */ - fprintf(stderr, - "writepng severe error: jmpbuf not recoverable; terminating.\n"); - fflush(stderr); - exit(99); - } - - /* Now we have our data structure we can use the information in it - * to return control to our own higher level code (all the points - * where 'setjmp' is called in this file.) This will work with other - * error handling mechanisms as well - libpng always calls png_error - * when it can proceed no further, thus, so long as the error handler - * is intercepted, application code can do its own error recovery. - */ - longjmp(mainprog_ptr->jmpbuf, 1); -} diff --git a/thirdparty/libpng-1.6.37/contrib/gregbook/writepng.h b/thirdparty/libpng-1.6.37/contrib/gregbook/writepng.h deleted file mode 100644 index 78b966b..0000000 --- a/thirdparty/libpng-1.6.37/contrib/gregbook/writepng.h +++ /dev/null @@ -1,133 +0,0 @@ -/*--------------------------------------------------------------------------- - - wpng - simple PNG-writing program writepng.h - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2007 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - The contents of this file are DUAL-LICENSED. You may modify and/or - redistribute this software according to the terms of one of the - following two licenses (at your option): - - - LICENSE 1 ("BSD-like with advertising clause"): - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - - LICENSE 2 (GNU GPL v2 or later): - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - ---------------------------------------------------------------------------*/ - -#ifndef TRUE -# define TRUE 1 -# define FALSE 0 -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b)? (a) : (b)) -# define MIN(a,b) ((a) < (b)? (a) : (b)) -#endif - -#ifdef DEBUG -# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} -#else -# define Trace(x) ; -#endif - -#define TEXT_TITLE 0x01 -#define TEXT_AUTHOR 0x02 -#define TEXT_DESC 0x04 -#define TEXT_COPY 0x08 -#define TEXT_EMAIL 0x10 -#define TEXT_URL 0x20 - -#define TEXT_TITLE_OFFSET 0 -#define TEXT_AUTHOR_OFFSET 72 -#define TEXT_COPY_OFFSET (2*72) -#define TEXT_EMAIL_OFFSET (3*72) -#define TEXT_URL_OFFSET (4*72) -#define TEXT_DESC_OFFSET (5*72) - -typedef unsigned char uch; -typedef unsigned short ush; -typedef unsigned long ulg; - -typedef struct _mainprog_info { - double gamma; - long width; - long height; - time_t modtime; - FILE *infile; - FILE *outfile; - void *png_ptr; - void *info_ptr; - uch *image_data; - uch **row_pointers; - char *title; - char *author; - char *desc; - char *copyright; - char *email; - char *url; - int filter; /* command-line-filter flag, not PNG row filter! */ - int pnmtype; - int sample_depth; - int interlaced; - int have_bg; - int have_time; - int have_text; - jmp_buf jmpbuf; - uch bg_red; - uch bg_green; - uch bg_blue; -} mainprog_info; - - -/* prototypes for public functions in writepng.c */ - -void writepng_version_info(void); - -int writepng_init(mainprog_info *mainprog_ptr); - -int writepng_encode_image(mainprog_info *mainprog_ptr); - -int writepng_encode_row(mainprog_info *mainprog_ptr); - -int writepng_encode_finish(mainprog_info *mainprog_ptr); - -void writepng_cleanup(mainprog_info *mainprog_ptr); diff --git a/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngimage.Po b/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngimage.Po deleted file mode 100644 index 9ce06a8..0000000 --- a/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngimage.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngstest.Po b/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngstest.Po deleted file mode 100644 index 9ce06a8..0000000 --- a/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngstest.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngunknown.Po b/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngunknown.Po deleted file mode 100644 index 9ce06a8..0000000 --- a/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngunknown.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngvalid.Po b/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngvalid.Po deleted file mode 100644 index 9ce06a8..0000000 --- a/thirdparty/libpng-1.6.37/contrib/libtests/.deps/pngvalid.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/libpng-1.6.37/contrib/libtests/.deps/timepng.Po b/thirdparty/libpng-1.6.37/contrib/libtests/.deps/timepng.Po deleted file mode 100644 index 9ce06a8..0000000 --- a/thirdparty/libpng-1.6.37/contrib/libtests/.deps/timepng.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/libpng-1.6.37/contrib/libtests/fakepng.c b/thirdparty/libpng-1.6.37/contrib/libtests/fakepng.c deleted file mode 100644 index 6512c14..0000000 --- a/thirdparty/libpng-1.6.37/contrib/libtests/fakepng.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Fake a PNG - just write it out directly. - * - * COPYRIGHT: Written by John Cunningham Bowler, 2014. - * To the extent possible under law, the author has waived all copyright and - * related or neighboring rights to this work. This work is published from: - * United States. - * - */ - -#include -#include /* for crc32 */ - -void -put_uLong(uLong val) -{ - putchar(val >> 24); - putchar(val >> 16); - putchar(val >> 8); - putchar(val >> 0); -} - -void -put_chunk(const unsigned char *chunk, uInt length) -{ - uLong crc; - - put_uLong(length-4); /* Exclude the tag */ - - fwrite(chunk, length, 1, stdout); - - crc = crc32(0, Z_NULL, 0); - put_uLong(crc32(crc, chunk, length)); -} - -const unsigned char signature[] = -{ - 137, 80, 78, 71, 13, 10, 26, 10 -}; - -const unsigned char IHDR[] = -{ - 73, 72, 68, 82, /* IHDR */ - 0, 0, 0, 1, /* width */ - 0, 0, 0, 1, /* height */ - 1, /* bit depth */ - 0, /* color type: greyscale */ - 0, /* compression method */ - 0, /* filter method */ - 0 /* interlace method: none */ -}; - -const unsigned char unknown[] = -{ - 'u', 'n', 'K', 'n' /* "unKn" - private safe to copy */ -}; - -int -main(void) -{ - fwrite(signature, sizeof signature, 1, stdout); - put_chunk(IHDR, sizeof IHDR); - - for (;;) - put_chunk(unknown, sizeof unknown); -} diff --git a/thirdparty/libpng-1.6.37/contrib/libtests/gentests.sh b/thirdparty/libpng-1.6.37/contrib/libtests/gentests.sh deleted file mode 100755 index f0f8d23..0000000 --- a/thirdparty/libpng-1.6.37/contrib/libtests/gentests.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2013 John Cunningham Bowler -# -# Last changed in libpng 1.6.0 [February 14, 2013] -# -# This code is released under the libpng license. -# For conditions of distribution and use, see the disclaimer -# and license in png.h -# -# Generate a set of PNG test images. The images are generated in a -# sub-directory called 'tests' by default, however a command line argument will -# change that name. The generation requires a built version of makepng in the -# current directory. -# -usage(){ - exec >&2 - echo "$0 []" - echo ' Generate a set of PNG test files in "directory" ("tests" by default)' - exit 1 -} - -mp="$PWD/makepng" -test -x "$mp" || { - exec >&2 - echo "$0: the 'makepng' program must exist" - echo " in the directory within which this program:" - echo " $mp" - echo " is executed" - usage -} - -# Just one argument: the directory -testdir="tests" -test $# -gt 1 && { - testdir="$1" - shift -} -test $# -eq 0 || usage - -# Take care not to clobber something -if test -e "$testdir" -then - test -d "$testdir" || usage -else - # mkdir -p isn't portable, so do the following - mkdir "$testdir" 2>/dev/null || mkdir -p "$testdir" || usage -fi - -# This fails in a very satisfactory way if it's not accessible -cd "$testdir" -:>"test$$.png" || { - exec >&2 - echo "$testdir: directory not writable" - usage -} -rm "test$$.png" || { - exec >&2 - echo "$testdir: you have create but not write privileges here." - echo " This is unexpected. You have a spurion; "'"'"test$$.png"'"'"." - echo " You need to remove this yourself. Try a different directory." - exit 1 -} - -# Now call makepng ($mp) to create every file we can think of with a -# reasonable name -doit(){ - for gamma in "" --sRGB --linear --1.8 - do - case "$gamma" in - "") - gname=;; - --sRGB) - gname="-srgb";; - --linear) - gname="-lin";; - --1.8) - gname="-18";; - *) - gname="-$gamma";; - esac - "$mp" $gamma "$1" "$2" "test-$1-$2$gname.png" - done -} -# -for ct in gray palette -do - for bd in 1 2 4 8 - do - doit "$ct" "$bd" - done -done -# -doit "gray" "16" -# -for ct in gray-alpha rgb rgb-alpha -do - for bd in 8 16 - do - doit "$ct" "$bd" - done -done diff --git a/thirdparty/libpng-1.6.37/contrib/libtests/makepng.c b/thirdparty/libpng-1.6.37/contrib/libtests/makepng.c deleted file mode 100644 index 312062b..0000000 --- a/thirdparty/libpng-1.6.37/contrib/libtests/makepng.c +++ /dev/null @@ -1,1941 +0,0 @@ -/* makepng.c */ -#define _ISOC99_SOURCE -/* Copyright: */ -#define COPYRIGHT "\251 2013,2015 John Cunningham Bowler" -/* - * Last changed in libpng 1.6.20 [November 24, 2015] - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - * - * Make a test PNG image. The arguments are as follows: - * - * makepng [--sRGB|--linear|--1.8] [--tRNS] [--nofilters] \ - * color-type bit-depth [file-name] - * - * The color-type may be numeric (and must match the numbers used by the PNG - * specification) or one of the format names listed below. The bit-depth is the - * component bit depth, or the pixel bit-depth for a color-mapped image. - * - * Without any options no color-space information is written, with the options - * an sRGB or the appropriate gAMA chunk is written. "1.8" refers to the - * display system used on older Apple computers to correct for high ambient - * light levels in the viewing environment; it applies a transform of - * approximately value^(1/1.45) to the color values and so a gAMA chunk of 65909 - * is written (1.45/2.2). - * - * The image data is generated internally. Unless --color is given the images - * used are as follows: - * - * 1 channel: a square image with a diamond, the least luminous colors are on - * the edge of the image, the most luminous in the center. - * - * 2 channels: the color channel increases in luminosity from top to bottom, the - * alpha channel increases in opacity from left to right. - * - * 3 channels: linear combinations of, from the top-left corner clockwise, - * black, green, white, red. - * - * 4 channels: linear combinations of, from the top-left corner clockwise, - * transparent, red, green, blue. - * - * For color-mapped images a four channel color-map is used and if --tRNS is - * given the PNG file has a tRNS chunk, as follows: - * - * 1-bit: entry 0 is transparent-red, entry 1 is opaque-white - * 2-bit: entry 0: transparent-green - * entry 1: 40%-red - * entry 2: 80%-blue - * entry 3: opaque-white - * 4-bit: the 16 combinations of the 2-bit case - * 8-bit: the 256 combinations of the 4-bit case - * - * The palette always has 2^bit-depth entries and the tRNS chunk one fewer. The - * image is the 1-channel diamond, but using palette index, not luminosity. - * - * For formats other than color-mapped ones if --tRNS is specified a tRNS chunk - * is generated with all channels equal to the low bits of 0x0101. - * - * Image size is determined by the final pixel depth in bits, i.e. channels x - * bit-depth, as follows: - * - * 8 bits or less: 64x64 - * 16 bits: 256x256 - * More than 16 bits: 1024x1024 - * - * Row filtering is the libpng default but may be turned off (the 'none' filter - * is used on every row) with the --nofilters option. - * - * The images are not interlaced. - * - * If file-name is given then the PNG is written to that file, else it is - * written to stdout. Notice that stdout is not supported on systems where, by - * default, it assumes text output; this program makes no attempt to change the - * text mode of stdout! - * - * makepng --color= ... - * - * If --color is given then the whole image has that color, color-mapped images - * will have exactly one palette entry and all image files with be 16x16 in - * size. The color value is 1 to 4 decimal numbers as appropriate for the color - * type. - * - * makepng --small ... - * - * If --small is given the images are no larger than required to include every - * possible pixel value for the format. - * - * For formats with pixels 8 bits or fewer in size the images consist of a - * single row with 2^pixel-depth pixels, one of every possible value. - * - * For formats with 16-bit pixels a 256x256 image is generated containing every - * possible pixel value. - * - * For larger pixel sizes a 256x256 image is generated where the first row - * consists of each pixel that has identical byte values throughout the pixel - * followed by rows where the byte values differ within the pixel. - * - * In all cases the pixel values are arranged in such a way that the SUB and UP - * filters give byte sequences for maximal zlib compression. By default (if - * --nofilters is not given) the SUB filter is used on the first row and the UP - * filter on all following rows. - * - * The --small option is meant to provide good test-case coverage, however the - * images are not easy to examine visually. Without the --small option the - * images contain identical color values; the pixel values are adjusted - * according to the gamma encoding with no gamma encoding being interpreted as - * sRGB. - * - * LICENSING - * ========= - * - * This code is copyright of the authors, see the COPYRIGHT define above. The - * code is licensed as above, using the libpng license. The code generates - * images which are solely the product of the code; the options choose which of - * the many possibilities to generate. The images that result (but not the code - * which generates them) are licensed as defined here: - * - * IMPORTANT: the COPYRIGHT #define must contain ISO-Latin-1 characters, the - * IMAGE_LICENSING #define must contain UTF-8 characters. The 'copyright' - * symbol 0xA9U (\251) in ISO-Latin-1 encoding and 0xC20xA9 (\302\251) in UTF-8. - */ -#define IMAGE_LICENSING "Dedicated to the public domain per Creative Commons "\ - "license \"CC0 1.0\"; https://creativecommons.org/publicdomain/zero/1.0/" - -#include /* for offsetof */ -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H) -# include -#endif - -/* Define the following to use this test against your installed libpng, rather - * than the one being built here: - */ -#ifdef PNG_FREESTANDING_TESTS -# include -#else -# include "../../png.h" -#endif - -#include - -/* Work round for GCC complaints about casting a (double) function result to - * an unsigned: - */ -static unsigned int -flooru(double d) -{ - d = floor(d); - return (unsigned int)d; -} - -static png_byte -floorb(double d) -{ - d = floor(d); - return (png_byte)d; -} - -/* This structure is used for inserting extra chunks (the --insert argument, not - * documented above.) - */ -typedef struct chunk_insert -{ - struct chunk_insert *next; - void (*insert)(png_structp, png_infop, int, png_charpp); - int nparams; - png_charp parameters[1]; -} chunk_insert; - -static unsigned int -channels_of_type(int color_type) -{ - if (color_type & PNG_COLOR_MASK_PALETTE) - return 1; - - else - { - int channels = 1; - - if (color_type & PNG_COLOR_MASK_COLOR) - channels = 3; - - if (color_type & PNG_COLOR_MASK_ALPHA) - return channels + 1; - - else - return channels; - } -} - -static unsigned int -pixel_depth_of_type(int color_type, int bit_depth) -{ - return channels_of_type(color_type) * bit_depth; -} - -static unsigned int -image_size_of_type(int color_type, int bit_depth, unsigned int *colors, - int small) -{ - if (*colors) - return 16; - - else - { - int pixel_depth = pixel_depth_of_type(color_type, bit_depth); - - if (small) - { - if (pixel_depth <= 8) /* there will be one row */ - return 1 << pixel_depth; - - else - return 256; - } - - else if (pixel_depth < 8) - return 64; - - else if (pixel_depth > 16) - return 1024; - - else - return 256; - } -} - -static void -set_color(png_colorp color, png_bytep trans, unsigned int red, - unsigned int green, unsigned int blue, unsigned int alpha, - png_const_bytep gamma_table) -{ - color->red = gamma_table[red]; - color->green = gamma_table[green]; - color->blue = gamma_table[blue]; - *trans = (png_byte)alpha; -} - -static int -generate_palette(png_colorp palette, png_bytep trans, int bit_depth, - png_const_bytep gamma_table, unsigned int *colors) -{ - /* - * 1-bit: entry 0 is transparent-red, entry 1 is opaque-white - * 2-bit: entry 0: transparent-green - * entry 1: 40%-red - * entry 2: 80%-blue - * entry 3: opaque-white - * 4-bit: the 16 combinations of the 2-bit case - * 8-bit: the 256 combinations of the 4-bit case - */ - switch (colors[0]) - { - default: - fprintf(stderr, "makepng: --colors=...: invalid count %u\n", - colors[0]); - exit(1); - - case 1: - set_color(palette+0, trans+0, colors[1], colors[1], colors[1], 255, - gamma_table); - return 1; - - case 2: - set_color(palette+0, trans+0, colors[1], colors[1], colors[1], - colors[2], gamma_table); - return 1; - - case 3: - set_color(palette+0, trans+0, colors[1], colors[2], colors[3], 255, - gamma_table); - return 1; - - case 4: - set_color(palette+0, trans+0, colors[1], colors[2], colors[3], - colors[4], gamma_table); - return 1; - - case 0: - if (bit_depth == 1) - { - set_color(palette+0, trans+0, 255, 0, 0, 0, gamma_table); - set_color(palette+1, trans+1, 255, 255, 255, 255, gamma_table); - return 2; - } - - else - { - unsigned int size = 1U << (bit_depth/2); /* 2, 4 or 16 */ - unsigned int x, y; - volatile unsigned int ip = 0; - - for (x=0; x> 3; - - if (offset < rowbytes && (bit_depth < 16 || offset+1 < rowbytes)) - { - row += offset; - - switch (bit_depth) - { - case 1: - case 2: - case 4: - /* Don't gamma correct - values get smashed */ - { - unsigned int shift = (8 - bit_depth) - (x & 0x7U); - - mask <<= shift; - value = (value << shift) & mask; - *row = (png_byte)((*row & ~mask) | value); - } - return; - - default: - fprintf(stderr, "makepng: bad bit depth (internal error)\n"); - exit(1); - - case 16: - value = flooru(65535*pow(value/65535.,conv)+.5); - *row++ = (png_byte)(value >> 8); - *row = (png_byte)value; - return; - - case 8: - *row = gamma_table[value]; - return; - } - } - - else - { - fprintf(stderr, "makepng: row buffer overflow (internal error)\n"); - exit(1); - } - } - - else - { - fprintf(stderr, "makepng: component overflow (internal error)\n"); - exit(1); - } -} - -static int /* filter mask for row */ -generate_row(png_bytep row, size_t rowbytes, unsigned int y, int color_type, - int bit_depth, png_const_bytep gamma_table, double conv, - unsigned int *colors, int small) -{ - int filters = 0; /* file *MASK*, 0 means the default, not NONE */ - png_uint_32 size_max = - image_size_of_type(color_type, bit_depth, colors, small)-1; - png_uint_32 depth_max = (1U << bit_depth)-1; /* up to 65536 */ - - if (colors[0] == 0) if (small) - { - unsigned int pixel_depth = pixel_depth_of_type(color_type, bit_depth); - - /* For pixel depths less than 16 generate a single row containing all the - * possible pixel values. For 16 generate all 65536 byte pair - * combinations in a 256x256 pixel array. - */ - switch (pixel_depth) - { - case 1: - assert(y == 0 && rowbytes == 1 && size_max == 1); - row[0] = 0x6CU; /* binary: 01101100, only top 2 bits used */ - filters = PNG_FILTER_NONE; - break; - - case 2: - assert(y == 0 && rowbytes == 1 && size_max == 3); - row[0] = 0x1BU; /* binary 00011011, all bits used */ - filters = PNG_FILTER_NONE; - break; - - case 4: - assert(y == 0 && rowbytes == 8 && size_max == 15); - row[0] = 0x01U; - row[1] = 0x23U; /* SUB gives 0x22U for all following bytes */ - row[2] = 0x45U; - row[3] = 0x67U; - row[4] = 0x89U; - row[5] = 0xABU; - row[6] = 0xCDU; - row[7] = 0xEFU; - filters = PNG_FILTER_SUB; - break; - - case 8: - /* The row will have all the pixel values in order starting with - * '1', the SUB filter will change every byte into '1' (including - * the last, which generates pixel value '0'). Since the SUB filter - * has value 1 this should result in maximum compression. - */ - assert(y == 0 && rowbytes == 256 && size_max == 255); - for (;;) - { - row[size_max] = 0xFFU & (size_max+1); - if (size_max == 0) - break; - --size_max; - } - filters = PNG_FILTER_SUB; - break; - - case 16: - /* Rows are generated such that each row has a constant difference - * between the first and second byte of each pixel and so that the - * difference increases by 1 at each row. The rows start with the - * first byte value of 0 and the value increases to 255 across the - * row. - * - * The difference starts at 1, so the first row is: - * - * 0 1 1 2 2 3 3 4 ... 254 255 255 0 - * - * This means that running the SUB filter on the first row produces: - * - * [SUB==1] 0 1 0 1 0 1... - * - * Then the difference is 2 on the next row, giving: - * - * 0 2 1 3 2 4 3 5 ... 254 0 255 1 - * - * When the UP filter is run on this libpng produces: - * - * [UP ==2] 0 1 0 1 0 1... - * - * And so on for all the remain rows to the final two * rows: - * - * row 254: 0 255 1 0 2 1 3 2 4 3 ... 254 253 255 254 - * row 255: 0 0 1 1 2 2 3 3 4 4 ... 254 254 255 255 - */ - assert(rowbytes == 512 && size_max == 255); - for (;;) - { - row[2*size_max ] = 0xFFU & size_max; - row[2*size_max+1] = 0xFFU & (size_max+y+1); - if (size_max == 0) - break; - --size_max; - } - /* The first row must include PNG_FILTER_UP so that libpng knows we - * need to keep it for the following row: - */ - filters = (y == 0 ? PNG_FILTER_SUB+PNG_FILTER_UP : PNG_FILTER_UP); - break; - - case 24: - case 32: - case 48: - case 64: - /* The rows are filled by an alogorithm similar to the above, in the - * first row pixel bytes are all equal, increasing from 0 by 1 for - * each pixel. In the second row the bytes within a pixel are - * incremented 1,3,5,7,... from the previous row byte. Using an odd - * number ensures all the possible byte values are used. - */ - assert(size_max == 255 && rowbytes == 256*(pixel_depth>>3)); - pixel_depth >>= 3; /* now in bytes */ - while (rowbytes > 0) - { - const size_t pixel_index = --rowbytes/pixel_depth; - - if (y == 0) - row[rowbytes] = 0xFFU & pixel_index; - - else - { - const size_t byte_offset = - rowbytes - pixel_index * pixel_depth; - - row[rowbytes] = - 0xFFU & (pixel_index + (byte_offset * 2*y) + 1); - } - } - filters = (y == 0 ? PNG_FILTER_SUB+PNG_FILTER_UP : PNG_FILTER_UP); - break; - - default: - assert(0/*NOT REACHED*/); - } - } - - else switch (channels_of_type(color_type)) - { - /* 1 channel: a square image with a diamond, the least luminous colors are on - * the edge of the image, the most luminous in the center. - */ - case 1: - { - png_uint_32 x; - png_uint_32 base = 2*size_max - abs(2*y-size_max); - - for (x=0; x<=size_max; ++x) - { - png_uint_32 luma = base - abs(2*x-size_max); - - /* 'luma' is now in the range 0..2*size_max, we need - * 0..depth_max - */ - luma = (luma*depth_max + size_max) / (2*size_max); - set_value(row, rowbytes, x, bit_depth, luma, gamma_table, conv); - } - } - break; - - /* 2 channels: the color channel increases in luminosity from top to bottom, - * the alpha channel increases in opacity from left to right. - */ - case 2: - { - png_uint_32 alpha = (depth_max * y * 2 + size_max) / (2 * size_max); - png_uint_32 x; - - for (x=0; x<=size_max; ++x) - { - set_value(row, rowbytes, 2*x, bit_depth, - (depth_max * x * 2 + size_max) / (2 * size_max), gamma_table, - conv); - set_value(row, rowbytes, 2*x+1, bit_depth, alpha, gamma_table, - conv); - } - } - break; - - /* 3 channels: linear combinations of, from the top-left corner clockwise, - * black, green, white, red. - */ - case 3: - { - /* x0: the black->red scale (the value of the red component) at the - * start of the row (blue and green are 0). - * x1: the green->white scale (the value of the red and blue - * components at the end of the row; green is depth_max). - */ - png_uint_32 Y = (depth_max * y * 2 + size_max) / (2 * size_max); - png_uint_32 x; - - /* Interpolate x/depth_max from start to end: - * - * start end difference - * red: Y Y 0 - * green: 0 depth_max depth_max - * blue: 0 Y Y - */ - for (x=0; x<=size_max; ++x) - { - set_value(row, rowbytes, 3*x+0, bit_depth, /* red */ Y, - gamma_table, conv); - set_value(row, rowbytes, 3*x+1, bit_depth, /* green */ - (depth_max * x * 2 + size_max) / (2 * size_max), - gamma_table, conv); - set_value(row, rowbytes, 3*x+2, bit_depth, /* blue */ - (Y * x * 2 + size_max) / (2 * size_max), - gamma_table, conv); - } - } - break; - - /* 4 channels: linear combinations of, from the top-left corner clockwise, - * transparent, red, green, blue. - */ - case 4: - { - /* x0: the transparent->blue scale (the value of the blue and alpha - * components) at the start of the row (red and green are 0). - * x1: the red->green scale (the value of the red and green - * components at the end of the row; blue is 0 and alpha is - * depth_max). - */ - png_uint_32 Y = (depth_max * y * 2 + size_max) / (2 * size_max); - png_uint_32 x; - - /* Interpolate x/depth_max from start to end: - * - * start end difference - * red: 0 depth_max-Y depth_max-Y - * green: 0 Y Y - * blue: Y 0 -Y - * alpha: Y depth_max depth_max-Y - */ - for (x=0; x<=size_max; ++x) - { - set_value(row, rowbytes, 4*x+0, bit_depth, /* red */ - ((depth_max-Y) * x * 2 + size_max) / (2 * size_max), - gamma_table, conv); - set_value(row, rowbytes, 4*x+1, bit_depth, /* green */ - (Y * x * 2 + size_max) / (2 * size_max), - gamma_table, conv); - set_value(row, rowbytes, 4*x+2, bit_depth, /* blue */ - Y - (Y * x * 2 + size_max) / (2 * size_max), - gamma_table, conv); - set_value(row, rowbytes, 4*x+3, bit_depth, /* alpha */ - Y + ((depth_max-Y) * x * 2 + size_max) / (2 * size_max), - gamma_table, conv); - } - } - break; - - default: - fprintf(stderr, "makepng: internal bad channel count\n"); - exit(2); - } - - else if (color_type & PNG_COLOR_MASK_PALETTE) - { - /* Palette with fixed color: the image rows are all 0 and the image width - * is 16. - */ - memset(row, 0, rowbytes); - } - - else if (colors[0] == channels_of_type(color_type)) - switch (channels_of_type(color_type)) - { - case 1: - { - png_uint_32 luma = colors[1]; - png_uint_32 x; - - for (x=0; x<=size_max; ++x) - set_value(row, rowbytes, x, bit_depth, luma, gamma_table, - conv); - } - break; - - case 2: - { - png_uint_32 luma = colors[1]; - png_uint_32 alpha = colors[2]; - png_uint_32 x; - - for (x=0; x 0 && gamma < 1000) - gamma = PNG_FP_1; - - if (gamma > 0) - real_gamma = gamma; - - { - unsigned int i; - - if (real_gamma == 45455) for (i=0; i<256; ++i) - { - gamma_table[i] = (png_byte)i; - conv = 1.; - } - - else - { - /* Convert 'i' from sRGB (45455) to real_gamma, this makes - * the images look the same regardless of the gAMA chunk. - */ - conv = real_gamma; - conv /= 45455; - - gamma_table[0] = 0; - - for (i=1; i<255; ++i) - gamma_table[i] = floorb(pow(i/255.,conv) * 255 + .5); - - gamma_table[255] = 255; - } - } - - png_set_IHDR(png_ptr, info_ptr, size, ysize, bit_depth, color_type, - PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - - if (color_type & PNG_COLOR_MASK_PALETTE) - { - int npalette; - png_color palette[256]; - png_byte trans[256]; - - npalette = generate_palette(palette, trans, bit_depth, gamma_table, - colors); - png_set_PLTE(png_ptr, info_ptr, palette, npalette); - - if (tRNS) - png_set_tRNS(png_ptr, info_ptr, trans, npalette-1, - NULL/*transparent color*/); - - /* Reset gamma_table to prevent the image rows being changed */ - for (npalette=0; npalette<256; ++npalette) - gamma_table[npalette] = (png_byte)npalette; - } - - else if (tRNS) - { - png_color_16 col; - - col.red = col.green = col.blue = col.gray = - 0x0101U & ((1U< 0) /* Else don't set color space information */ - { - png_set_gAMA_fixed(png_ptr, info_ptr, real_gamma); - - /* Just use the sRGB values here. */ - png_set_cHRM_fixed(png_ptr, info_ptr, - /* color x y */ - /* white */ 31270, 32900, - /* red */ 64000, 33000, - /* green */ 30000, 60000, - /* blue */ 15000, 6000 - ); - } - - /* Insert extra information. */ - while (insert != NULL) - { - insert->insert(png_ptr, info_ptr, insert->nparams, insert->parameters); - insert = insert->next; - } - - /* Write the file header. */ - png_write_info(png_ptr, info_ptr); - - /* Restrict the filters */ - png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, filters); - - { -# ifdef PNG_WRITE_INTERLACING_SUPPORTED - int passes = png_set_interlace_handling(png_ptr); -# else /* !WRITE_INTERLACING */ - int passes = 1; -# endif /* !WRITE_INTERLACING */ - int pass; - size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr); - - row = malloc(rowbytes); - - if (row == NULL) - png_error(png_ptr, "OOM allocating row buffer"); - - for (pass = 0; pass < passes; ++pass) - { - unsigned int y; - - for (y=0; y 0) - { - /* Round up to a multiple of 4 here to allow an iCCP profile - * to be padded to a 4x boundary. - */ - png_bytep data = malloc((total+3)&~3); - - if (data != NULL) - { - size_t new_size = 0; - - for (;;) - { - ch = getc(fp); - if (ch == EOF) break; - data[new_size++] = (png_byte)ch; - } - - if (ferror(fp) || new_size != total) - { - perror("temporary file"); - fprintf(stderr, "temporary file read error\n"); - free(data); - } - - else - { - (void)fclose(fp); - *result = data; - return total; - } - } - - else - fprintf(stderr, "%s: out of memory loading file\n", name); - } - - else - fprintf(stderr, "%s: empty file\n", name); - } - } - } - - else - { - perror(name); - fprintf(stderr, "%s: open failed\n", name); - } - - fclose(fp); - } - - else - fprintf(stderr, "makepng: %s: could not open temporary file\n", name); - - exit(1); - return 0; -} - -static size_t -load_fake(png_charp param, png_bytepp profile) -{ - char *endptr = NULL; - uint64_t size = strtoull(param, &endptr, 0/*base*/); - - /* The 'fake' format is *[string] */ - if (endptr != NULL && *endptr == '*') - { - size_t len = strlen(++endptr); - size_t result = (size_t)size; - - if (len == 0) len = 1; /* capture the terminating '\0' */ - - /* Now repeat that string to fill 'size' bytes. */ - if (result == size && (*profile = malloc(result)) != NULL) - { - png_bytep out = *profile; - - if (len == 1) - memset(out, *endptr, result); - - else - { - while (size >= len) - { - memcpy(out, endptr, len); - out += len; - size -= len; - } - memcpy(out, endptr, size); - } - - return result; - } - - else - { - fprintf(stderr, "%s: size exceeds system limits\n", param); - exit(1); - } - } - - return 0; -} - -static void -check_param_count(int nparams, int expect) -{ - if (nparams != expect) - { - fprintf(stderr, "bad parameter count (internal error)\n"); - exit(1); - } -} - -static void -insert_iCCP(png_structp png_ptr, png_infop info_ptr, int nparams, - png_charpp params) -{ - png_bytep profile = NULL; - png_uint_32 proflen = 0; - int result; - - check_param_count(nparams, 2); - - switch (params[1][0]) - { - case '<': - { - size_t filelen = load_file(params[1]+1, &profile); - if (filelen > 0xfffffffc) /* Maximum profile length */ - { - fprintf(stderr, "%s: file too long (%lu) for an ICC profile\n", - params[1]+1, (unsigned long)filelen); - exit(1); - } - - proflen = (png_uint_32)filelen; - } - break; - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - { - size_t fake_len = load_fake(params[1], &profile); - - if (fake_len > 0) /* else a simple parameter */ - { - if (fake_len > 0xffffffff) /* Maximum profile length */ - { - fprintf(stderr, - "%s: fake data too long (%lu) for an ICC profile\n", - params[1], (unsigned long)fake_len); - exit(1); - } - proflen = (png_uint_32)(fake_len & ~3U); - /* Always fix up the profile length. */ - png_save_uint_32(profile, proflen); - break; - } - } - - default: - fprintf(stderr, "--insert iCCP \"%s\": unrecognized\n", params[1]); - fprintf(stderr, " use '<' to read a file: \" 3) - { - png_uint_32 prof_header = png_get_uint_32(profile); - - if (prof_header != proflen) - { - fprintf(stderr, "--insert iCCP %s: profile length field wrong:\n", - params[1]); - fprintf(stderr, " actual %lu, recorded value %lu (corrected)\n", - (unsigned long)proflen, (unsigned long)prof_header); - png_save_uint_32(profile, proflen); - } - } - - if (result && profile != NULL && proflen >=4) - png_set_iCCP(png_ptr, info_ptr, params[0], PNG_COMPRESSION_TYPE_BASE, - profile, proflen); - - if (profile) - free(profile); - - if (!result) - exit(1); -} - -static void -clear_text(png_text *text, png_charp keyword) -{ - text->compression = -1; /* none */ - text->key = keyword; - text->text = NULL; - text->text_length = 0; /* libpng calculates this */ - text->itxt_length = 0; /* libpng calculates this */ - text->lang = NULL; - text->lang_key = NULL; -} - -static void -set_text(png_structp png_ptr, png_infop info_ptr, png_textp text, - png_charp param) -{ - switch (param[0]) - { - case '<': - { - png_bytep file = NULL; - - text->text_length = load_file(param+1, &file); - text->text = (png_charp)file; - } - break; - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - { - png_bytep data = NULL; - size_t fake_len = load_fake(param, &data); - - if (fake_len > 0) /* else a simple parameter */ - { - text->text_length = fake_len; - text->text = (png_charp)data; - break; - } - } - - default: - text->text = param; - break; - } - - png_set_text(png_ptr, info_ptr, text, 1); - - if (text->text != param) - free(text->text); -} - -static void -insert_tEXt(png_structp png_ptr, png_infop info_ptr, int nparams, - png_charpp params) -{ - png_text text; - - check_param_count(nparams, 2); - clear_text(&text, params[0]); - set_text(png_ptr, info_ptr, &text, params[1]); -} - -static void -insert_zTXt(png_structp png_ptr, png_infop info_ptr, int nparams, - png_charpp params) -{ - png_text text; - - check_param_count(nparams, 2); - clear_text(&text, params[0]); - text.compression = 0; /* deflate */ - set_text(png_ptr, info_ptr, &text, params[1]); -} - -static void -insert_iTXt(png_structp png_ptr, png_infop info_ptr, int nparams, - png_charpp params) -{ - png_text text; - - check_param_count(nparams, 4); - clear_text(&text, params[0]); - text.compression = 2; /* iTXt + deflate */ - text.lang = params[1];/* language tag */ - text.lang_key = params[2]; /* translated keyword */ - set_text(png_ptr, info_ptr, &text, params[3]); -} - -static void -insert_hIST(png_structp png_ptr, png_infop info_ptr, int nparams, - png_charpp params) -{ - int i; - png_uint_16 freq[256]; - - /* libpng takes the count from the PLTE count; we don't check it here but we - * do set the array to 0 for unspecified entries. - */ - memset(freq, 0, sizeof freq); - for (i=0; inext = NULL; - cip->insert = insert; - cip->nparams = nparams; - for (i=0; iparameters[i] = list[i]; - - return cip; -} - -static chunk_insert * -find_insert(png_const_charp what, png_charp param) -{ - png_uint_32 chunk = 0; - png_charp parameter_list[1024]; - int i, nparams; - - /* Assemble the chunk name */ - for (i=0; i<4; ++i) - { - char ch = what[i]; - - if ((ch >= 65 && ch <= 90) || (ch >= 97 && ch <= 122)) - chunk = (chunk << 8) + what[i]; - - else - break; - } - - if (i < 4 || what[4] != 0) - { - fprintf(stderr, "makepng --insert \"%s\": invalid chunk name\n", what); - exit(1); - } - - /* Assemble the parameter list. */ - nparams = find_parameters(what, param, parameter_list, 1024); - -# define CHUNK(a,b,c,d) (((a)<<24)+((b)<<16)+((c)<<8)+(d)) - - switch (chunk) - { - case CHUNK(105,67,67,80): /* iCCP */ - if (nparams == 2) - return make_insert(what, insert_iCCP, nparams, parameter_list); - break; - - case CHUNK(116,69,88,116): /* tEXt */ - if (nparams == 2) - return make_insert(what, insert_tEXt, nparams, parameter_list); - break; - - case CHUNK(122,84,88,116): /* zTXt */ - if (nparams == 2) - return make_insert(what, insert_zTXt, nparams, parameter_list); - break; - - case CHUNK(105,84,88,116): /* iTXt */ - if (nparams == 4) - return make_insert(what, insert_iTXt, nparams, parameter_list); - break; - - case CHUNK(104,73,83,84): /* hIST */ - if (nparams <= 256) - return make_insert(what, insert_hIST, nparams, parameter_list); - break; - - case CHUNK(115,66,73,84): /* sBIT */ - if (nparams <= 4) - return make_insert(what, insert_sBIT, nparams, parameter_list); - break; - -#if 0 - case CHUNK(115,80,76,84): /* sPLT */ - return make_insert(what, insert_sPLT, nparams, parameter_list); -#endif - - default: - fprintf(stderr, "makepng --insert \"%s\": unrecognized chunk name\n", - what); - exit(1); - } - - bad_parameter_count(what, nparams); - return NULL; -} - -/* This is necessary because libpng expects writeable strings for things like - * text chunks (maybe this should be fixed...) - */ -static png_charp -strstash(png_const_charp foo) -{ - /* The program indicates a memory allocation error by crashing, this is by - * design. - */ - if (foo != NULL) - { - png_charp bar = malloc(strlen(foo)+1); - return strcpy(bar, foo); - } - - return NULL; -} - -static png_charp -strstash_list(const png_const_charp *text) -{ - size_t foo = 0; - png_charp result, bar; - const png_const_charp *line = text; - - while (*line != NULL) - foo += strlen(*line++); - - result = bar = malloc(foo+1); - - line = text; - while (*line != NULL) - { - foo = strlen(*line); - memcpy(bar, *line++, foo); - bar += foo; - } - - *bar = 0; - return result; -} - -/* These are used to insert Copyright and Licence fields, they allow the text to - * have \n unlike the --insert option. - */ -static chunk_insert * -add_tEXt(const char *key, const png_const_charp *text) -{ - static char what[5] = { 116, 69, 88, 116, 0 }; - png_charp parameter_list[3]; - - parameter_list[0] = strstash(key); - parameter_list[1] = strstash_list(text); - parameter_list[2] = NULL; - - return make_insert(what, insert_tEXt, 2, parameter_list); -} - -static chunk_insert * -add_iTXt(const char *key, const char *language, const char *language_key, - const png_const_charp *text) -{ - static char what[5] = { 105, 84, 88, 116, 0 }; - png_charp parameter_list[5]; - - parameter_list[0] = strstash(key); - parameter_list[1] = strstash(language); - parameter_list[2] = strstash(language_key); - parameter_list[3] = strstash_list(text); - parameter_list[4] = NULL; - - return make_insert(what, insert_iTXt, 4, parameter_list); -} - -/* This is a not-very-good parser for a sequence of numbers (including 0). It - * doesn't accept some apparently valid things, but it accepts all the sensible - * combinations. - */ -static void -parse_color(char *arg, unsigned int *colors) -{ - unsigned int ncolors = 0; - - while (*arg && ncolors < 4) - { - char *ep = arg; - - unsigned long ul = strtoul(arg, &ep, 0); - - if (ul > 65535) - { - fprintf(stderr, "makepng --color=...'%s': too big\n", arg); - exit(1); - } - - if (ep == arg) - { - fprintf(stderr, "makepng --color=...'%s': not a valid color\n", arg); - exit(1); - } - - if (*ep) ++ep; /* skip a separator */ - arg = ep; - - colors[++ncolors] = (unsigned int)ul; /* checked above */ - } - - if (*arg) - { - fprintf(stderr, "makepng --color=...'%s': too many values\n", arg); - exit(1); - } - - *colors = ncolors; -} - -int -main(int argc, char **argv) -{ - FILE *fp = stdout; - const char *file_name = NULL; - int color_type = 8; /* invalid */ - int bit_depth = 32; /* invalid */ - int small = 0; /* make full size images */ - int tRNS = 0; /* don't output a tRNS chunk */ - unsigned int colors[5]; - unsigned int filters = PNG_ALL_FILTERS; - png_fixed_point gamma = 0; /* not set */ - chunk_insert *head_insert = NULL; - chunk_insert **insert_ptr = &head_insert; - - memset(colors, 0, sizeof colors); - - while (--argc > 0) - { - char *arg = *++argv; - - if (strcmp(arg, "--small") == 0) - { - small = 1; - continue; - } - - if (strcmp(arg, "--tRNS") == 0) - { - tRNS = 1; - continue; - } - - if (strcmp(arg, "--sRGB") == 0) - { - gamma = PNG_DEFAULT_sRGB; - continue; - } - - if (strcmp(arg, "--linear") == 0) - { - gamma = PNG_FP_1; - continue; - } - - if (strcmp(arg, "--1.8") == 0) - { - gamma = PNG_GAMMA_MAC_18; - continue; - } - - if (strcmp(arg, "--nofilters") == 0) - { - filters = PNG_FILTER_NONE; - continue; - } - - if (strncmp(arg, "--color=", 8) == 0) - { - parse_color(arg+8, colors); - continue; - } - - if (argc >= 3 && strcmp(arg, "--insert") == 0) - { - png_const_charp what = *++argv; - png_charp param = *++argv; - chunk_insert *new_insert; - - argc -= 2; - - new_insert = find_insert(what, param); - - if (new_insert != NULL) - { - *insert_ptr = new_insert; - insert_ptr = &new_insert->next; - } - - continue; - } - - if (arg[0] == '-') - { - fprintf(stderr, "makepng: %s: invalid option\n", arg); - exit(1); - } - - if (strcmp(arg, "palette") == 0) - { - color_type = PNG_COLOR_TYPE_PALETTE; - continue; - } - - if (strncmp(arg, "gray", 4) == 0) - { - if (arg[4] == 0) - { - color_type = PNG_COLOR_TYPE_GRAY; - continue; - } - - else if (strcmp(arg+4, "a") == 0 || - strcmp(arg+4, "alpha") == 0 || - strcmp(arg+4, "-alpha") == 0) - { - color_type = PNG_COLOR_TYPE_GRAY_ALPHA; - continue; - } - } - - if (strncmp(arg, "rgb", 3) == 0) - { - if (arg[3] == 0) - { - color_type = PNG_COLOR_TYPE_RGB; - continue; - } - - else if (strcmp(arg+3, "a") == 0 || - strcmp(arg+3, "alpha") == 0 || - strcmp(arg+3, "-alpha") == 0) - { - color_type = PNG_COLOR_TYPE_RGB_ALPHA; - continue; - } - } - - if (color_type == 8 && isdigit(arg[0])) - { - color_type = atoi(arg); - if (color_type < 0 || color_type > 6 || color_type == 1 || - color_type == 5) - { - fprintf(stderr, "makepng: %s: not a valid color type\n", arg); - exit(1); - } - - continue; - } - - if (bit_depth == 32 && isdigit(arg[0])) - { - bit_depth = atoi(arg); - if (bit_depth <= 0 || bit_depth > 16 || - (bit_depth & -bit_depth) != bit_depth) - { - fprintf(stderr, "makepng: %s: not a valid bit depth\n", arg); - exit(1); - } - - continue; - } - - if (argc == 1) /* It's the file name */ - { - fp = fopen(arg, "wb"); - if (fp == NULL) - { - fprintf(stderr, "%s: %s: could not open\n", arg, strerror(errno)); - exit(1); - } - - file_name = arg; - continue; - } - - fprintf(stderr, "makepng: %s: unknown argument\n", arg); - exit(1); - } /* argument while loop */ - - if (color_type == 8 || bit_depth == 32) - { - fprintf(stderr, "usage: makepng [--small] [--sRGB|--linear|--1.8] " - "[--color=...] color-type bit-depth [file-name]\n" - " Make a test PNG file, by default writes to stdout.\n" - " Other options are available, UTSL.\n"); - exit(1); - } - - /* Check the colors */ - { - unsigned int lim = (color_type == PNG_COLOR_TYPE_PALETTE ? 255U : - (1U< lim) - { - fprintf(stderr, "makepng: --color=...: %u out of range [0..%u]\n", - colors[i], lim); - exit(1); - } - } - - /* small and colors are incomparible (will probably crash if both are used at - * the same time!) - */ - if (small && colors[0] != 0) - { - fprintf(stderr, "makepng: --color --small: only one at a time!\n"); - exit(1); - } - - /* Restrict the filters for more speed to those we know are used for the - * generated images. - */ - if (filters == PNG_ALL_FILTERS && !small/*small provides defaults*/) - { - if ((color_type & PNG_COLOR_MASK_PALETTE) != 0 || bit_depth < 8) - filters = PNG_FILTER_NONE; - - else if (color_type & PNG_COLOR_MASK_COLOR) /* rgb */ - { - if (bit_depth == 8) - filters &= ~(PNG_FILTER_NONE | PNG_FILTER_AVG); - - else - filters = PNG_FILTER_SUB | PNG_FILTER_PAETH; - } - - else /* gray 8 or 16-bit */ - filters &= ~PNG_FILTER_NONE; - } - - /* Insert standard copyright and licence text. */ - { - static png_const_charp copyright[] = - { - COPYRIGHT, /* ISO-Latin-1 */ - NULL - }; - static png_const_charp licensing[] = - { - IMAGE_LICENSING, /* UTF-8 */ - NULL - }; - - chunk_insert *new_insert; - - new_insert = add_tEXt("Copyright", copyright); - if (new_insert != NULL) - { - *insert_ptr = new_insert; - insert_ptr = &new_insert->next; - } - - new_insert = add_iTXt("Licensing", "en", NULL, licensing); - if (new_insert != NULL) - { - *insert_ptr = new_insert; - insert_ptr = &new_insert->next; - } - } - - { - int ret = write_png(&file_name, fp, color_type, bit_depth, gamma, - head_insert, filters, colors, small, tRNS); - - if (ret != 0 && file_name != NULL) - remove(file_name); - - return ret; - } -} diff --git a/thirdparty/libpng-1.6.37/contrib/libtests/pngimage.c b/thirdparty/libpng-1.6.37/contrib/libtests/pngimage.c deleted file mode 100644 index f130c04..0000000 --- a/thirdparty/libpng-1.6.37/contrib/libtests/pngimage.c +++ /dev/null @@ -1,1712 +0,0 @@ -/* pngimage.c - * - * Copyright (c) 2015,2016 John Cunningham Bowler - * - * Last changed in libpng 1.6.24 [August 4, 2016] - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - * - * Test the png_read_png and png_write_png interfaces. Given a PNG file load it - * using png_read_png and then write with png_write_png. Test all possible - * transforms. - */ -#include -#include -#include -#include -#include -#include - -#if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H) -# include -#endif - -/* Define the following to use this test against your installed libpng, rather - * than the one being built here: - */ -#ifdef PNG_FREESTANDING_TESTS -# include -#else -# include "../../png.h" -#endif - -#ifndef PNG_SETJMP_SUPPORTED -# include /* because png.h did *not* include this */ -#endif - -/* 1.6.1 added support for the configure test harness, which uses 77 to indicate - * a skipped test, in earlier versions we need to succeed on a skipped test, so: - */ -#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H) -# define SKIP 77 -#else -# define SKIP 0 -#endif - -#if PNG_LIBPNG_VER < 10700 - /* READ_PNG and WRITE_PNG were not defined, so: */ -# ifdef PNG_INFO_IMAGE_SUPPORTED -# ifdef PNG_SEQUENTIAL_READ_SUPPORTED -# define PNG_READ_PNG_SUPPORTED -# endif /* SEQUENTIAL_READ */ -# ifdef PNG_WRITE_SUPPORTED -# define PNG_WRITE_PNG_SUPPORTED -# endif /* WRITE */ -# endif /* INFO_IMAGE */ -#endif /* pre 1.7.0 */ - -#ifdef PNG_READ_PNG_SUPPORTED -/* If a transform is valid on both read and write this implies that if the - * transform is applied to read it must also be applied on write to produce - * meaningful data. This is because these transforms when performed on read - * produce data with a memory format that does not correspond to a PNG format. - * - * Most of these transforms are invertible; after applying the transform on - * write the result is the original PNG data that would have would have been - * read if no transform were applied. - * - * The exception is _SHIFT, which destroys the low order bits marked as not - * significant in a PNG with the sBIT chunk. - * - * The following table lists, for each transform, the conditions under which it - * is expected to do anything. Conditions are defined as follows: - * - * 1) Color mask bits required - simply a mask to AND with color_type; one of - * these must be present for the transform to fire, except that 0 means - * 'always'. - * 2) Color mask bits which must be absent - another mask - none of these must - * be present. - * 3) Bit depths - a mask of component bit depths for the transform to fire. - * 4) 'read' - the transform works in png_read_png. - * 5) 'write' - the transform works in png_write_png. - * 6) PNG_INFO_chunk; a mask of the chunks that must be present for the - * transform to fire. All must be present - the requirement is that - * png_get_valid() & mask == mask, so if mask is 0 there is no requirement. - * - * The condition refers to the original image state - if multiple transforms are - * used together it is possible to cause a transform that wouldn't fire on the - * original image to fire. - */ -static struct transform_info -{ - const char *name; - int transform; - png_uint_32 valid_chunks; -# define CHUNK_NONE 0 -# define CHUNK_sBIT PNG_INFO_sBIT -# define CHUNK_tRNS PNG_INFO_tRNS - png_byte color_mask_required; - png_byte color_mask_absent; -# define COLOR_MASK_X 0 -# define COLOR_MASK_P PNG_COLOR_MASK_PALETTE -# define COLOR_MASK_C PNG_COLOR_MASK_COLOR -# define COLOR_MASK_A PNG_COLOR_MASK_ALPHA -# define COLOR_MASK_ALL (PALETTE+COLOR+ALPHA) /* absent = gray, no alpha */ - png_byte bit_depths; -# define BD_ALL (1 + 2 + 4 + 8 + 16) -# define BD_PAL (1 + 2 + 4 + 8) -# define BD_LOW (1 + 2 + 4) -# define BD_16 16 -# define BD_TRUE (8+16) /* i.e. true-color depths */ - png_byte when; -# define TRANSFORM_R 1 -# define TRANSFORM_W 2 -# define TRANSFORM_RW 3 - png_byte tested; /* the transform was tested somewhere */ -} transform_info[] = -{ - /* List ALL the PNG_TRANSFORM_ macros here. Check for support using the READ - * macros; even if the transform is supported on write it cannot be tested - * without the read support. - */ -# define T(name,chunk,cm_required,cm_absent,bd,when)\ - { #name, PNG_TRANSFORM_ ## name, CHUNK_ ## chunk,\ - COLOR_MASK_ ## cm_required, COLOR_MASK_ ## cm_absent, BD_ ## bd,\ - TRANSFORM_ ## when, 0/*!tested*/ } - -#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED - T(STRIP_16, NONE, X, X, 16, R), - /* drops the bottom 8 bits when bit depth is 16 */ -#endif -#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED - T(STRIP_ALPHA, NONE, A, X, ALL, R), - /* removes the alpha channel if present */ -#endif -#ifdef PNG_WRITE_PACK_SUPPORTED -# define TRANSFORM_RW_PACK TRANSFORM_RW -#else -# define TRANSFORM_RW_PACK TRANSFORM_R -#endif -#ifdef PNG_READ_PACK_SUPPORTED - T(PACKING, NONE, X, X, LOW, RW_PACK), - /* unpacks low-bit-depth components into 1 byte per component on read, - * reverses this on write. - */ -#endif -#ifdef PNG_WRITE_PACKSWAP_SUPPORTED -# define TRANSFORM_RW_PACKSWAP TRANSFORM_RW -#else -# define TRANSFORM_RW_PACKSWAP TRANSFORM_R -#endif -#ifdef PNG_READ_PACKSWAP_SUPPORTED - T(PACKSWAP, NONE, X, X, LOW, RW_PACKSWAP), - /* reverses the order of low-bit-depth components packed into a byte */ -#endif -#ifdef PNG_READ_EXPAND_SUPPORTED - T(EXPAND, NONE, P, X, ALL, R), - /* expands PLTE PNG files to RGB (no tRNS) or RGBA (tRNS) * - * Note that the 'EXPAND' transform does lots of different things: */ - T(EXPAND, NONE, X, C, ALL, R), - /* expands grayscale PNG files to RGB, or RGBA */ - T(EXPAND, tRNS, X, A, ALL, R), - /* expands the tRNS chunk in files without alpha */ -#endif -#ifdef PNG_WRITE_INVERT_SUPPORTED -# define TRANSFORM_RW_INVERT TRANSFORM_RW -#else -# define TRANSFORM_RW_INVERT TRANSFORM_R -#endif -#ifdef PNG_READ_INVERT_SUPPORTED - T(INVERT_MONO, NONE, X, C, ALL, RW_INVERT), - /* converts gray-scale components to 1..0 from 0..1 */ -#endif -#ifdef PNG_WRITE_SHIFT_SUPPORTED -# define TRANSFORM_RW_SHIFT TRANSFORM_RW -#else -# define TRANSFORM_RW_SHIFT TRANSFORM_R -#endif -#ifdef PNG_READ_SHIFT_SUPPORTED - T(SHIFT, sBIT, X, X, ALL, RW_SHIFT), - /* reduces component values to the original range based on the sBIT chunk, - * this is only partially reversible - the low bits are lost and cannot be - * recovered on write. In fact write code replicates the bits to generate - * new low-order bits. - */ -#endif -#ifdef PNG_WRITE_BGR_SUPPORTED -# define TRANSFORM_RW_BGR TRANSFORM_RW -#else -# define TRANSFORM_RW_BGR TRANSFORM_R -#endif -#ifdef PNG_READ_BGR_SUPPORTED - T(BGR, NONE, C, P, TRUE, RW_BGR), - /* reverses the rgb component values of true-color pixels */ -#endif -#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED -# define TRANSFORM_RW_SWAP_ALPHA TRANSFORM_RW -#else -# define TRANSFORM_RW_SWAP_ALPHA TRANSFORM_R -#endif -#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED - T(SWAP_ALPHA, NONE, A, X, TRUE, RW_SWAP_ALPHA), - /* swaps the alpha channel of RGBA or GA pixels to the front - ARGB or - * AG, on write reverses the process. - */ -#endif -#ifdef PNG_WRITE_SWAP_SUPPORTED -# define TRANSFORM_RW_SWAP TRANSFORM_RW -#else -# define TRANSFORM_RW_SWAP TRANSFORM_R -#endif -#ifdef PNG_READ_SWAP_SUPPORTED - T(SWAP_ENDIAN, NONE, X, P, 16, RW_SWAP), - /* byte-swaps 16-bit component values */ -#endif -#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED -# define TRANSFORM_RW_INVERT_ALPHA TRANSFORM_RW -#else -# define TRANSFORM_RW_INVERT_ALPHA TRANSFORM_R -#endif -#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED - T(INVERT_ALPHA, NONE, A, X, TRUE, RW_INVERT_ALPHA), - /* converts an alpha channel from 0..1 to 1..0 */ -#endif -#ifdef PNG_WRITE_FILLER_SUPPORTED - T(STRIP_FILLER_BEFORE, NONE, A, P, TRUE, W), /* 'A' for a filler! */ - /* on write skips a leading filler channel; testing requires data with a - * filler channel so this is produced from RGBA or GA images by removing - * the 'alpha' flag from the color type in place. - */ - T(STRIP_FILLER_AFTER, NONE, A, P, TRUE, W), - /* on write strips a trailing filler channel */ -#endif -#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED - T(GRAY_TO_RGB, NONE, X, C, ALL, R), - /* expands grayscale images to RGB, also causes the palette part of - * 'EXPAND' to happen. Low bit depth grayscale images are expanded to - * 8-bits per component and no attempt is made to convert the image to a - * palette image. While this transform is partially reversible - * png_write_png does not currently support this. - */ - T(GRAY_TO_RGB, NONE, P, X, ALL, R), - /* The 'palette' side effect mentioned above; a bit bogus but this is the - * way the libpng code works. - */ -#endif -#ifdef PNG_READ_EXPAND_16_SUPPORTED - T(EXPAND_16, NONE, X, X, PAL, R), - /* expands images to 16-bits per component, as a side effect expands - * palette images to RGB and expands the tRNS chunk if present, so it can - * modify 16-bit per component images as well: - */ - T(EXPAND_16, tRNS, X, A, 16, R), - /* side effect of EXPAND_16 - expands the tRNS chunk in an RGB or G 16-bit - * image. - */ -#endif -#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED - T(SCALE_16, NONE, X, X, 16, R), - /* scales 16-bit components to 8-bits. */ -#endif - - { NULL /*name*/, 0, 0, 0, 0, 0, 0, 0/*!tested*/ } - -#undef T -}; - -#define ARRAY_SIZE(a) ((sizeof a)/(sizeof a[0])) -#define TTABLE_SIZE ARRAY_SIZE(transform_info) - -/* Some combinations of options that should be reversible are not; these cases - * are bugs. - */ -static int known_bad_combos[][2] = -{ - /* problem, antidote */ - { PNG_TRANSFORM_SHIFT | PNG_TRANSFORM_INVERT_ALPHA, 0/*antidote*/ } -}; - -static int -is_combo(int transforms) -{ - return transforms & (transforms-1); /* non-zero if more than one set bit */ -} - -static int -first_transform(int transforms) -{ - return transforms & -transforms; /* lowest set bit */ -} - -static int -is_bad_combo(int transforms) -{ - unsigned int i; - - for (i=0; ifirst.next = NULL; - buffer->last = NULL; - buffer->current = NULL; -} - -static void -buffer_destroy_list(struct buffer_list *list) -{ - if (list != NULL) - { - struct buffer_list *next = list->next; - DELETE(list); - buffer_destroy_list(next); - } -} - -static void -buffer_destroy(struct buffer *buffer) -{ - struct buffer_list *list = buffer->first.next; - buffer_init(buffer); - buffer_destroy_list(list); -} - -#ifdef PNG_WRITE_PNG_SUPPORTED -static void -buffer_start_write(struct buffer *buffer) -{ - buffer->last = &buffer->first; - buffer->end_count = 0; - buffer->current = NULL; -} -#endif - -static void -buffer_start_read(struct buffer *buffer) -{ - buffer->current = &buffer->first; - buffer->read_count = 0; -} - -#ifdef ENOMEM /* required by POSIX 1003.1 */ -# define MEMORY ENOMEM -#else -# define MEMORY ERANGE /* required by ANSI-C */ -#endif -static struct buffer * -get_buffer(png_structp pp) - /* Used from libpng callbacks to get the current buffer */ -{ - return (struct buffer*)png_get_io_ptr(pp); -} - -static struct buffer_list * -buffer_extend(struct buffer_list *current) -{ - struct buffer_list *add; - - assert(current->next == NULL); - - add = NEW(struct buffer_list); - if (add == NULL) - return NULL; - - add->next = NULL; - current->next = add; - - return add; -} - -/* Load a buffer from a file; does the equivalent of buffer_start_write. On a - * read error returns an errno value, else returns 0. - */ -static int -buffer_from_file(struct buffer *buffer, FILE *fp) -{ - struct buffer_list *last = &buffer->first; - size_t count = 0; - - for (;;) - { - size_t r = fread(last->buffer+count, 1/*size*/, - (sizeof last->buffer)-count, fp); - - if (r > 0) - { - count += r; - - if (count >= sizeof last->buffer) - { - assert(count == sizeof last->buffer); - count = 0; - - if (last->next == NULL) - { - last = buffer_extend(last); - if (last == NULL) - return MEMORY; - } - - else - last = last->next; - } - } - - else /* fread failed - probably end of file */ - { - if (feof(fp)) - { - buffer->last = last; - buffer->end_count = count; - return 0; /* no error */ - } - - /* Some kind of funky error; errno should be non-zero */ - return errno == 0 ? ERANGE : errno; - } - } -} - -/* This structure is used to control the test of a single file. */ -typedef enum -{ - VERBOSE, /* switches on all messages */ - INFORMATION, - WARNINGS, /* switches on warnings */ - LIBPNG_WARNING, - APP_WARNING, - ERRORS, /* just errors */ - APP_FAIL, /* continuable error - no need to longjmp */ - LIBPNG_ERROR, /* this and higher cause a longjmp */ - LIBPNG_BUG, /* erroneous behavior in libpng */ - APP_ERROR, /* such as out-of-memory in a callback */ - QUIET, /* no normal messages */ - USER_ERROR, /* such as file-not-found */ - INTERNAL_ERROR -} error_level; -#define LEVEL_MASK 0xf /* where the level is in 'options' */ - -#define EXHAUSTIVE 0x010 /* Test all combinations of active options */ -#define STRICT 0x020 /* Fail on warnings as well as errors */ -#define LOG 0x040 /* Log pass/fail to stdout */ -#define CONTINUE 0x080 /* Continue on APP_FAIL errors */ -#define SKIP_BUGS 0x100 /* Skip over known bugs */ -#define LOG_SKIPPED 0x200 /* Log skipped bugs */ -#define FIND_BAD_COMBOS 0x400 /* Attempt to deduce bad combos */ -#define LIST_COMBOS 0x800 /* List combos by name */ - -/* Result masks apply to the result bits in the 'results' field below; these - * bits are simple 1U<options = WARNINGS; /* default to !verbose, !quiet */ - dp->filename = NULL; - dp->operation = NULL; - dp->original_pp = NULL; - dp->original_ip = NULL; - dp->original_rows = NULL; - dp->read_pp = NULL; - dp->read_ip = NULL; - buffer_init(&dp->original_file); - -# ifdef PNG_WRITE_PNG_SUPPORTED - dp->write_pp = NULL; - buffer_init(&dp->written_file); -# endif -} - -static void -display_clean_read(struct display *dp) -{ - if (dp->read_pp != NULL) - png_destroy_read_struct(&dp->read_pp, &dp->read_ip, NULL); -} - -#ifdef PNG_WRITE_PNG_SUPPORTED -static void -display_clean_write(struct display *dp) -{ - if (dp->write_pp != NULL) - png_destroy_write_struct(&dp->write_pp, NULL); -} -#endif - -static void -display_clean(struct display *dp) -{ -# ifdef PNG_WRITE_PNG_SUPPORTED - display_clean_write(dp); -# endif - display_clean_read(dp); - - dp->original_rowbytes = 0; - dp->original_rows = NULL; - dp->chunks = 0; - - png_destroy_read_struct(&dp->original_pp, &dp->original_ip, NULL); - /* leave the filename for error detection */ - dp->results = 0; /* reset for next time */ -} - -static void -display_destroy(struct display *dp) -{ - /* Release any memory held in the display. */ -# ifdef PNG_WRITE_PNG_SUPPORTED - buffer_destroy(&dp->written_file); -# endif - - buffer_destroy(&dp->original_file); -} - -static struct display * -get_dp(png_structp pp) - /* The display pointer is always stored in the png_struct error pointer */ -{ - struct display *dp = (struct display*)png_get_error_ptr(pp); - - if (dp == NULL) - { - fprintf(stderr, "pngimage: internal error (no display)\n"); - exit(99); /* prevents a crash */ - } - - return dp; -} - -/* error handling */ -#ifdef __GNUC__ -# define VGATTR __attribute__((__format__ (__printf__,3,4))) - /* Required to quiet GNUC warnings when the compiler sees a stdarg function - * that calls one of the stdio v APIs. - */ -#else -# define VGATTR -#endif -static void VGATTR -display_log(struct display *dp, error_level level, const char *fmt, ...) - /* 'level' is as above, fmt is a stdio style format string. This routine - * does not return if level is above LIBPNG_WARNING - */ -{ - dp->results |= 1U << level; - - if (level > (error_level)(dp->options & LEVEL_MASK)) - { - const char *lp; - va_list ap; - - switch (level) - { - case INFORMATION: lp = "information"; break; - case LIBPNG_WARNING: lp = "warning(libpng)"; break; - case APP_WARNING: lp = "warning(pngimage)"; break; - case APP_FAIL: lp = "error(continuable)"; break; - case LIBPNG_ERROR: lp = "error(libpng)"; break; - case LIBPNG_BUG: lp = "bug(libpng)"; break; - case APP_ERROR: lp = "error(pngimage)"; break; - case USER_ERROR: lp = "error(user)"; break; - - case INTERNAL_ERROR: /* anything unexpected is an internal error: */ - case VERBOSE: case WARNINGS: case ERRORS: case QUIET: - default: lp = "bug(pngimage)"; break; - } - - fprintf(stderr, "%s: %s: %s", - dp->filename != NULL ? dp->filename : "", lp, dp->operation); - - if (dp->transforms != 0) - { - int tr = dp->transforms; - - if (is_combo(tr)) - { - if (dp->options & LIST_COMBOS) - { - int trx = tr; - - fprintf(stderr, "("); - if (trx) - { - int start = 0; - - while (trx) - { - int trz = trx & -trx; - - if (start) fprintf(stderr, "+"); - fprintf(stderr, "%s", transform_name(trz)); - start = 1; - trx &= ~trz; - } - } - - else - fprintf(stderr, "-"); - fprintf(stderr, ")"); - } - - else - fprintf(stderr, "(0x%x)", tr); - } - - else - fprintf(stderr, "(%s)", transform_name(tr)); - } - - fprintf(stderr, ": "); - - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - - fputc('\n', stderr); - } - /* else do not output any message */ - - /* Errors cause this routine to exit to the fail code */ - if (level > APP_FAIL || (level > ERRORS && !(dp->options & CONTINUE))) - longjmp(dp->error_return, level); -} - -/* error handler callbacks for libpng */ -static void PNGCBAPI -display_warning(png_structp pp, png_const_charp warning) -{ - display_log(get_dp(pp), LIBPNG_WARNING, "%s", warning); -} - -static void PNGCBAPI -display_error(png_structp pp, png_const_charp error) -{ - struct display *dp = get_dp(pp); - - display_log(dp, LIBPNG_ERROR, "%s", error); -} - -static void -display_cache_file(struct display *dp, const char *filename) - /* Does the initial cache of the file. */ -{ - FILE *fp; - int ret; - - dp->filename = filename; - - if (filename != NULL) - { - fp = fopen(filename, "rb"); - if (fp == NULL) - display_log(dp, USER_ERROR, "open failed: %s", strerror(errno)); - } - - else - fp = stdin; - - ret = buffer_from_file(&dp->original_file, fp); - - fclose(fp); - - if (ret != 0) - display_log(dp, APP_ERROR, "read failed: %s", strerror(ret)); -} - -static void -buffer_read(struct display *dp, struct buffer *bp, png_bytep data, - size_t size) -{ - struct buffer_list *last = bp->current; - size_t read_count = bp->read_count; - - while (size > 0) - { - size_t avail; - - if (last == NULL || - (last == bp->last && read_count >= bp->end_count)) - { - display_log(dp, USER_ERROR, "file truncated (%lu bytes)", - (unsigned long)size); - /*NOTREACHED*/ - break; - } - - else if (read_count >= sizeof last->buffer) - { - /* Move to the next buffer: */ - last = last->next; - read_count = 0; - bp->current = last; /* Avoid update outside the loop */ - - /* And do a sanity check (the EOF case is caught above) */ - if (last == NULL) - { - display_log(dp, INTERNAL_ERROR, "damaged buffer list"); - /*NOTREACHED*/ - break; - } - } - - avail = (sizeof last->buffer) - read_count; - if (avail > size) - avail = size; - - memcpy(data, last->buffer + read_count, avail); - read_count += avail; - size -= avail; - data += avail; - } - - bp->read_count = read_count; -} - -static void PNGCBAPI -read_function(png_structp pp, png_bytep data, size_t size) -{ - buffer_read(get_dp(pp), get_buffer(pp), data, size); -} - -static void -read_png(struct display *dp, struct buffer *bp, const char *operation, - int transforms) -{ - png_structp pp; - png_infop ip; - - /* This cleans out any previous read and sets operation and transforms to - * empty. - */ - display_clean_read(dp); - - if (operation != NULL) /* else this is a verify and do not overwrite info */ - { - dp->operation = operation; - dp->transforms = transforms; - } - - dp->read_pp = pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, dp, - display_error, display_warning); - if (pp == NULL) - display_log(dp, LIBPNG_ERROR, "failed to create read struct"); - - /* The png_read_png API requires us to make the info struct, but it does the - * call to png_read_info. - */ - dp->read_ip = ip = png_create_info_struct(pp); - if (ip == NULL) - display_log(dp, LIBPNG_ERROR, "failed to create info struct"); - -# ifdef PNG_SET_USER_LIMITS_SUPPORTED - /* Remove the user limits, if any */ - png_set_user_limits(pp, 0x7fffffff, 0x7fffffff); -# endif - - /* Set the IO handling */ - buffer_start_read(bp); - png_set_read_fn(pp, bp, read_function); - - png_read_png(pp, ip, transforms, NULL/*params*/); - -#if 0 /* crazy debugging */ - { - png_bytep pr = png_get_rows(pp, ip)[0]; - size_t rb = png_get_rowbytes(pp, ip); - size_t cb; - char c = ' '; - - fprintf(stderr, "%.4x %2d (%3lu bytes):", transforms, png_get_bit_depth(pp,ip), (unsigned long)rb); - - for (cb=0; cboriginal_file, "original read", 0/*no transform*/); - - /* Move the result to the 'original' fields */ - dp->original_pp = pp = dp->read_pp, dp->read_pp = NULL; - dp->original_ip = ip = dp->read_ip, dp->read_ip = NULL; - - dp->original_rowbytes = png_get_rowbytes(pp, ip); - if (dp->original_rowbytes == 0) - display_log(dp, LIBPNG_BUG, "png_get_rowbytes returned 0"); - - dp->chunks = png_get_valid(pp, ip, 0xffffffff); - if ((dp->chunks & PNG_INFO_IDAT) == 0) /* set by png_read_png */ - display_log(dp, LIBPNG_BUG, "png_read_png did not set IDAT flag"); - - dp->original_rows = png_get_rows(pp, ip); - if (dp->original_rows == NULL) - display_log(dp, LIBPNG_BUG, "png_read_png did not create row buffers"); - - if (!png_get_IHDR(pp, ip, - &dp->width, &dp->height, &dp->bit_depth, &dp->color_type, - &dp->interlace_method, &dp->compression_method, &dp->filter_method)) - display_log(dp, LIBPNG_BUG, "png_get_IHDR failed"); - - /* 'active' transforms are discovered based on the original image format; - * running one active transform can activate others. At present the code - * does not attempt to determine the closure. - */ - { - png_uint_32 chunks = dp->chunks; - int active = 0, inactive = 0; - int ct = dp->color_type; - int bd = dp->bit_depth; - unsigned int i; - - for (i=0; iactive_transforms = active; - dp->ignored_transforms = inactive; /* excluding write-only transforms */ - } -} - -static int -compare_read(struct display *dp, int applied_transforms) -{ - /* Compare the png_info from read_ip with original_info */ - size_t rowbytes; - png_uint_32 width, height; - int bit_depth, color_type; - int interlace_method, compression_method, filter_method; - const char *e = NULL; - - png_get_IHDR(dp->read_pp, dp->read_ip, &width, &height, &bit_depth, - &color_type, &interlace_method, &compression_method, &filter_method); - -# define C(item) if (item != dp->item) \ - display_log(dp, APP_WARNING, "IHDR " #item "(%lu) changed to %lu",\ - (unsigned long)dp->item, (unsigned long)item), e = #item - - /* The IHDR should be identical: */ - C(width); - C(height); - C(bit_depth); - C(color_type); - C(interlace_method); - C(compression_method); - C(filter_method); - - /* 'e' remains set to the name of the last thing changed: */ - if (e) - display_log(dp, APP_ERROR, "IHDR changed (%s)", e); - - /* All the chunks from the original PNG should be preserved in the output PNG - * because the PNG format has not been changed. - */ - { - unsigned long chunks = - png_get_valid(dp->read_pp, dp->read_ip, 0xffffffff); - - if (chunks != dp->chunks) - display_log(dp, APP_FAIL, "PNG chunks changed from 0x%lx to 0x%lx", - (unsigned long)dp->chunks, chunks); - } - - /* rowbytes should be the same */ - rowbytes = png_get_rowbytes(dp->read_pp, dp->read_ip); - - /* NOTE: on 64-bit systems this may trash the top bits of rowbytes, - * which could lead to weird error messages. - */ - if (rowbytes != dp->original_rowbytes) - display_log(dp, APP_ERROR, "PNG rowbytes changed from %lu to %lu", - (unsigned long)dp->original_rowbytes, (unsigned long)rowbytes); - - /* The rows should be the same too, unless the applied transforms includes - * the shift transform, in which case low bits may have been lost. - */ - { - png_bytepp rows = png_get_rows(dp->read_pp, dp->read_ip); - unsigned int mask; /* mask (if not zero) for the final byte */ - - if (bit_depth < 8) - { - /* Need the stray bits at the end, this depends only on the low bits - * of the image width; overflow does not matter. If the width is an - * exact multiple of 8 bits this gives a mask of 0, not 0xff. - */ - mask = 0xff & (0xff00 >> ((bit_depth * width) & 7)); - } - - else - mask = 0; - - if (rows == NULL) - display_log(dp, LIBPNG_BUG, "png_get_rows returned NULL"); - - if ((applied_transforms & PNG_TRANSFORM_SHIFT) == 0 || - (dp->active_transforms & PNG_TRANSFORM_SHIFT) == 0 || - color_type == PNG_COLOR_TYPE_PALETTE) - { - unsigned long y; - - for (y=0; yoriginal_rows[y]; - - if (memcmp(row, orig, rowbytes-(mask != 0)) != 0 || (mask != 0 && - ((row[rowbytes-1] & mask) != (orig[rowbytes-1] & mask)))) - { - size_t x; - - /* Find the first error */ - for (x=0; x 0x%.2x", - (unsigned long)x, (unsigned long)y, orig[x], row[x]); - return 0; /* don't keep reporting failed rows on 'continue' */ - } - } - } - - else -# ifdef PNG_sBIT_SUPPORTED - { - unsigned long y; - int bpp; /* bits-per-pixel then bytes-per-pixel */ - /* components are up to 8 bytes in size */ - png_byte sig_bits[8]; - png_color_8p sBIT; - - if (png_get_sBIT(dp->read_pp, dp->read_ip, &sBIT) != PNG_INFO_sBIT) - display_log(dp, INTERNAL_ERROR, - "active shift transform but no sBIT in file"); - - switch (color_type) - { - case PNG_COLOR_TYPE_GRAY: - sig_bits[0] = sBIT->gray; - bpp = bit_depth; - break; - - case PNG_COLOR_TYPE_GA: - sig_bits[0] = sBIT->gray; - sig_bits[1] = sBIT->alpha; - bpp = 2 * bit_depth; - break; - - case PNG_COLOR_TYPE_RGB: - sig_bits[0] = sBIT->red; - sig_bits[1] = sBIT->green; - sig_bits[2] = sBIT->blue; - bpp = 3 * bit_depth; - break; - - case PNG_COLOR_TYPE_RGBA: - sig_bits[0] = sBIT->red; - sig_bits[1] = sBIT->green; - sig_bits[2] = sBIT->blue; - sig_bits[3] = sBIT->alpha; - bpp = 4 * bit_depth; - break; - - default: - display_log(dp, LIBPNG_ERROR, "invalid colour type %d", - color_type); - /*NOTREACHED*/ - bpp = 0; - break; - } - - { - int b; - - for (b=0; 8*b bit_depth/*!palette*/) - display_log(dp, LIBPNG_BUG, - "invalid sBIT[%u] value %d returned for PNG bit depth %d", - b, sig_bits[b], bit_depth); - } - } - - if (bpp < 8 && bpp != bit_depth) - { - /* sanity check; this is a grayscale PNG; something is wrong in the - * code above. - */ - display_log(dp, INTERNAL_ERROR, "invalid bpp %u for bit_depth %u", - bpp, bit_depth); - } - - switch (bit_depth) - { - int b; - - case 16: /* Two bytes per component, big-endian */ - for (b = (bpp >> 4); b > 0; --b) - { - unsigned int sig = (unsigned int)(0xffff0000 >> sig_bits[b]); - - sig_bits[2*b+1] = (png_byte)sig; - sig_bits[2*b+0] = (png_byte)(sig >> 8); /* big-endian */ - } - break; - - case 8: /* One byte per component */ - for (b=0; b*8 < bpp; ++b) - sig_bits[b] = (png_byte)(0xff00 >> sig_bits[b]); - break; - - case 1: /* allowed, but dumb */ - /* Value is 1 */ - sig_bits[0] = 0xff; - break; - - case 2: /* Replicate 4 times */ - /* Value is 1 or 2 */ - b = 0x3 & ((0x3<<2) >> sig_bits[0]); - b |= b << 2; - b |= b << 4; - sig_bits[0] = (png_byte)b; - break; - - case 4: /* Relicate twice */ - /* Value is 1, 2, 3 or 4 */ - b = 0xf & ((0xf << 4) >> sig_bits[0]); - b |= b << 4; - sig_bits[0] = (png_byte)b; - break; - - default: - display_log(dp, LIBPNG_BUG, "invalid bit depth %d", bit_depth); - break; - } - - /* Convert bpp to bytes; this gives '1' for low-bit depth grayscale, - * where there are multiple pixels per byte. - */ - bpp = (bpp+7) >> 3; - - /* The mask can be combined with sig_bits[0] */ - if (mask != 0) - { - mask &= sig_bits[0]; - - if (bpp != 1 || mask == 0) - display_log(dp, INTERNAL_ERROR, "mask calculation error %u, %u", - bpp, mask); - } - - for (y=0; yoriginal_rows[y]; - unsigned long x; - - for (x=0; x<(width-(mask!=0)); ++x) - { - int b; - - for (b=0; b%.2x", - x, b, y, orig[-1], row[-1]); - return 0; - } - } - } - - if (mask != 0 && (*row & mask) != (*orig & mask)) - { - display_log(dp, APP_FAIL, - "significant bits at (%lu[end],%lu) changed", x, y); - return 0; - } - } /* for y */ - } -# else /* !sBIT */ - display_log(dp, INTERNAL_ERROR, - "active shift transform but no sBIT support"); -# endif /* !sBIT */ - } - - return 1; /* compare succeeded */ -} - -#ifdef PNG_WRITE_PNG_SUPPORTED -static void -buffer_write(struct display *dp, struct buffer *buffer, png_bytep data, - size_t size) - /* Generic write function used both from the write callback provided to - * libpng and from the generic read code. - */ -{ - /* Write the data into the buffer, adding buffers as required */ - struct buffer_list *last = buffer->last; - size_t end_count = buffer->end_count; - - while (size > 0) - { - size_t avail; - - if (end_count >= sizeof last->buffer) - { - if (last->next == NULL) - { - last = buffer_extend(last); - - if (last == NULL) - display_log(dp, APP_ERROR, "out of memory saving file"); - } - - else - last = last->next; - - buffer->last = last; /* avoid the need to rewrite every time */ - end_count = 0; - } - - avail = (sizeof last->buffer) - end_count; - if (avail > size) - avail = size; - - memcpy(last->buffer + end_count, data, avail); - end_count += avail; - size -= avail; - data += avail; - } - - buffer->end_count = end_count; -} - -static void PNGCBAPI -write_function(png_structp pp, png_bytep data, size_t size) -{ - buffer_write(get_dp(pp), get_buffer(pp), data, size); -} - -static void -write_png(struct display *dp, png_infop ip, int transforms) -{ - display_clean_write(dp); /* safety */ - - buffer_start_write(&dp->written_file); - dp->operation = "write"; - dp->transforms = transforms; - - dp->write_pp = png_create_write_struct(PNG_LIBPNG_VER_STRING, dp, - display_error, display_warning); - - if (dp->write_pp == NULL) - display_log(dp, APP_ERROR, "failed to create write png_struct"); - - png_set_write_fn(dp->write_pp, &dp->written_file, write_function, - NULL/*flush*/); - -# ifdef PNG_SET_USER_LIMITS_SUPPORTED - /* Remove the user limits, if any */ - png_set_user_limits(dp->write_pp, 0x7fffffff, 0x7fffffff); -# endif - - /* Certain transforms require the png_info to be zapped to allow the - * transform to work correctly. - */ - if (transforms & (PNG_TRANSFORM_PACKING| - PNG_TRANSFORM_STRIP_FILLER| - PNG_TRANSFORM_STRIP_FILLER_BEFORE)) - { - int ct = dp->color_type; - - if (transforms & (PNG_TRANSFORM_STRIP_FILLER| - PNG_TRANSFORM_STRIP_FILLER_BEFORE)) - ct &= ~PNG_COLOR_MASK_ALPHA; - - png_set_IHDR(dp->write_pp, ip, dp->width, dp->height, dp->bit_depth, ct, - dp->interlace_method, dp->compression_method, dp->filter_method); - } - - png_write_png(dp->write_pp, ip, transforms, NULL/*params*/); - - /* Clean it on the way out - if control returns to the caller then the - * written_file contains the required data. - */ - display_clean_write(dp); -} -#endif /* WRITE_PNG */ - -static int -skip_transform(struct display *dp, int tr) - /* Helper to test for a bad combo and log it if it is skipped */ -{ - if ((dp->options & SKIP_BUGS) != 0 && is_bad_combo(tr)) - { - /* Log this to stdout if logging is on, otherwise just do an information - * display_log. - */ - if ((dp->options & LOG_SKIPPED) != 0) - { - printf("SKIP: %s transforms ", dp->filename); - - while (tr != 0) - { - int next = first_transform(tr); - tr &= ~next; - - printf("%s", transform_name(next)); - if (tr != 0) - putchar('+'); - } - - putchar('\n'); - } - - else - display_log(dp, INFORMATION, "%s: skipped known bad combo 0x%x", - dp->filename, tr); - - return 1; /* skip */ - } - - return 0; /* don't skip */ -} - -static void -test_one_file(struct display *dp, const char *filename) -{ - /* First cache the file and update the display original file - * information for the new file. - */ - dp->operation = "cache file"; - dp->transforms = 0; - display_cache_file(dp, filename); - update_display(dp); - - /* First test: if there are options that should be ignored for this file - * verify that they really are ignored. - */ - if (dp->ignored_transforms != 0) - { - read_png(dp, &dp->original_file, "ignored transforms", - dp->ignored_transforms); - - /* The result should be identical to the original_rows */ - if (!compare_read(dp, 0/*transforms applied*/)) - return; /* no point testing more */ - } - -#ifdef PNG_WRITE_PNG_SUPPORTED - /* Second test: write the original PNG data out to a new file (to test the - * write side) then read the result back in and make sure that it hasn't - * changed. - */ - dp->operation = "write"; - write_png(dp, dp->original_ip, 0/*transforms*/); - read_png(dp, &dp->written_file, NULL, 0/*transforms*/); - if (!compare_read(dp, 0/*transforms applied*/)) - return; -#endif - - /* Third test: the active options. Test each in turn, or, with the - * EXHAUSTIVE option, test all possible combinations. - */ - { - /* Use unsigned int here because the code below to increment through all - * the possibilities exhaustively has to use a compare and that must be - * unsigned, because some transforms are negative on a 16-bit system. - */ - unsigned int active = dp->active_transforms; - int exhaustive = (dp->options & EXHAUSTIVE) != 0; - unsigned int current = first_transform(active); - unsigned int bad_transforms = 0; - unsigned int bad_combo = ~0U; /* bitwise AND of failing transforms */ - unsigned int bad_combo_list = 0; /* bitwise OR of failures */ - - for (;;) - { - read_png(dp, &dp->original_file, "active transforms", current); - - /* If this involved any irreversible transformations then if we write - * it out with just the reversible transformations and read it in again - * with the same transforms we should get the same thing. At present - * this isn't done - it just seems like a waste of time and it would - * require two sets of read png_struct/png_info. - * - * If there were no irreversible transformations then if we write it - * out and read it back in again (without the reversible transforms) - * we should get back to the place where we started. - */ -#ifdef PNG_WRITE_PNG_SUPPORTED - if ((current & write_transforms) == current) - { - /* All transforms reversible: write the PNG with the transformations - * reversed, then read it back in with no transformations. The - * result should be the same as the original apart from the loss of - * low order bits because of the SHIFT/sBIT transform. - */ - dp->operation = "reversible transforms"; - write_png(dp, dp->read_ip, current); - - /* And if this is read back in, because all the transformations were - * reversible, the result should be the same. - */ - read_png(dp, &dp->written_file, NULL, 0); - if (!compare_read(dp, current/*for the SHIFT/sBIT transform*/)) - { - /* This set of transforms failed. If a single bit is set - if - * there is just one transform - don't include this in further - * 'exhaustive' tests. Notice that each transform is tested on - * its own before testing combos in the exhaustive case. - */ - if (is_combo(current)) - { - bad_combo &= current; - bad_combo_list |= current; - } - - else - bad_transforms |= current; - } - } -#endif - - /* Now move to the next transform */ - if (exhaustive) /* all combinations */ - { - unsigned int next = current; - - do - { - if (next == read_transforms) /* Everything tested */ - goto combo; - - ++next; - } /* skip known bad combos if the relevant option is set; skip - * combos involving known bad single transforms in all cases. - */ - while ( (next & read_transforms) <= current - || (next & active) == 0 /* skip cases that do nothing */ - || (next & bad_transforms) != 0 - || skip_transform(dp, next)); - - assert((next & read_transforms) == next); - current = next; - } - - else /* one at a time */ - { - active &= ~current; - - if (active == 0) - goto combo; - - current = first_transform(active); - } - } - -combo: - if (dp->options & FIND_BAD_COMBOS) - { - /* bad_combos identifies the combos that occur in all failing cases; - * bad_combo_list identifies transforms that do not prevent the - * failure. - */ - if (bad_combo != ~0U) - printf("%s[0x%x]: PROBLEM: 0x%x[0x%x] ANTIDOTE: 0x%x\n", - dp->filename, active, bad_combo, bad_combo_list, - rw_transforms & ~bad_combo_list); - - else - printf("%s: no %sbad combos found\n", dp->filename, - (dp->options & SKIP_BUGS) ? "additional " : ""); - } - } -} - -static int -do_test(struct display *dp, const char *file) - /* Exists solely to isolate the setjmp clobbers */ -{ - int ret = setjmp(dp->error_return); - - if (ret == 0) - { - test_one_file(dp, file); - return 0; - } - - else if (ret < ERRORS) /* shouldn't longjmp on warnings */ - display_log(dp, INTERNAL_ERROR, "unexpected return code %d", ret); - - return ret; -} - -int -main(int argc, char **argv) -{ - /* For each file on the command line test it with a range of transforms */ - int option_end, ilog = 0; - struct display d; - - validate_T(); - display_init(&d); - - for (option_end=1; option_end QUIET) /* abort on user or internal error */ - return 99; - } - - /* Here on any return, including failures, except user/internal issues - */ - { - int pass = (d.options & STRICT) ? - RESULT_STRICT(d.results) : RESULT_RELAXED(d.results); - - if (!pass) - ++errors; - - if (d.options & LOG) - { - int j; - - printf("%s: pngimage ", pass ? "PASS" : "FAIL"); - - for (j=1; j -#include -#include -#include -#include -#include -#include - -#if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H) -# include -#endif - -/* Define the following to use this test against your installed libpng, rather - * than the one being built here: - */ -#ifdef PNG_FREESTANDING_TESTS -# include -#else -# include "../../png.h" -#endif - -/* 1.6.1 added support for the configure test harness, which uses 77 to indicate - * a skipped test, in earlier versions we need to succeed on a skipped test, so: - */ -#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H) -# define SKIP 77 -#else -# define SKIP 0 -#endif - -#ifdef PNG_SIMPLIFIED_READ_SUPPORTED /* Else nothing can be done */ -#include "../tools/sRGB.h" - -/* KNOWN ISSUES - * - * These defines switch on alternate algorithms for format conversions to match - * the current libpng implementation; they are set to allow pngstest to pass - * even though libpng is producing answers that are not as correct as they - * should be. - */ -#define ALLOW_UNUSED_GPC 0 - /* If true include unused static GPC functions and declare an external array - * of them to hide the fact that they are unused. This is for development - * use while testing the correct function to use to take into account libpng - * misbehavior, such as using a simple power law to correct sRGB to linear. - */ - -/* The following is to support direct compilation of this file as C++ */ -#ifdef __cplusplus -# define voidcast(type, value) static_cast(value) -# define aligncastconst(type, value) \ - static_cast(static_cast(value)) -#else -# define voidcast(type, value) (value) -# define aligncastconst(type, value) ((const void*)(value)) -#endif /* __cplusplus */ - -/* During parallel runs of pngstest each temporary file needs a unique name, - * this is used to permit uniqueness using a command line argument which can be - * up to 22 characters long. - */ -static char tmpf[23] = "TMP"; - -/* Generate random bytes. This uses a boring repeatable algorithm and it - * is implemented here so that it gives the same set of numbers on every - * architecture. It's a linear congruential generator (Knuth or Sedgewick - * "Algorithms") but it comes from the 'feedback taps' table in Horowitz and - * Hill, "The Art of Electronics". - */ -static void -make_random_bytes(png_uint_32* seed, void* pv, size_t size) -{ - png_uint_32 u0 = seed[0], u1 = seed[1]; - png_bytep bytes = voidcast(png_bytep, pv); - - /* There are thirty three bits, the next bit in the sequence is bit-33 XOR - * bit-20. The top 1 bit is in u1, the bottom 32 are in u0. - */ - size_t i; - for (i=0; i> (20-8)) ^ ((u1 << 7) | (u0 >> (32-7)))) & 0xff; - u1 <<= 8; - u1 |= u0 >> 24; - u0 <<= 8; - u0 |= u; - *bytes++ = (png_byte)u; - } - - seed[0] = u0; - seed[1] = u1; -} - -static png_uint_32 color_seed[2]; - -static void -reseed(void) -{ - color_seed[0] = 0x12345678U; - color_seed[1] = 0x9abcdefU; -} - -static void -random_color(png_colorp color) -{ - make_random_bytes(color_seed, color, sizeof *color); -} - -/* Math support - neither Cygwin nor Visual Studio have C99 support and we need - * a predictable rounding function, so make one here: - */ -static double -closestinteger(double x) -{ - return floor(x + .5); -} - -/* Cast support: remove GCC whines. */ -static png_byte -u8d(double d) -{ - d = closestinteger(d); - return (png_byte)d; -} - -static png_uint_16 -u16d(double d) -{ - d = closestinteger(d); - return (png_uint_16)d; -} - -/* sRGB support: use exact calculations rounded to the nearest int, see the - * fesetround() call in main(). sRGB_to_d optimizes the 8 to 16-bit conversion. - */ -static double sRGB_to_d[256]; -static double g22_to_d[256]; - -static void -init_sRGB_to_d(void) -{ - int i; - - sRGB_to_d[0] = 0; - for (i=1; i<255; ++i) - sRGB_to_d[i] = linear_from_sRGB(i/255.); - sRGB_to_d[255] = 1; - - g22_to_d[0] = 0; - for (i=1; i<255; ++i) - g22_to_d[i] = pow(i/255., 1/.45455); - g22_to_d[255] = 1; -} - -static png_byte -sRGB(double linear /*range 0.0 .. 1.0*/) -{ - return u8d(255 * sRGB_from_linear(linear)); -} - -static png_byte -isRGB(int fixed_linear) -{ - return sRGB(fixed_linear / 65535.); -} - -#if 0 /* not used */ -static png_byte -unpremultiply(int component, int alpha) -{ - if (alpha <= component) - return 255; /* Arbitrary, but consistent with the libpng code */ - - else if (alpha >= 65535) - return isRGB(component); - - else - return sRGB((double)component / alpha); -} -#endif - -static png_uint_16 -ilinear(int fixed_srgb) -{ - return u16d(65535 * sRGB_to_d[fixed_srgb]); -} - -static png_uint_16 -ilineara(int fixed_srgb, int alpha) -{ - return u16d((257 * alpha) * sRGB_to_d[fixed_srgb]); -} - -static png_uint_16 -ilinear_g22(int fixed_srgb) -{ - return u16d(65535 * g22_to_d[fixed_srgb]); -} - -#if ALLOW_UNUSED_GPC -static png_uint_16 -ilineara_g22(int fixed_srgb, int alpha) -{ - return u16d((257 * alpha) * g22_to_d[fixed_srgb]); -} -#endif - -static double -YfromRGBint(int ir, int ig, int ib) -{ - double r = ir; - double g = ig; - double b = ib; - return YfromRGB(r, g, b); -} - -#if 0 /* unused */ -/* The error that results from using a 2.2 power law in place of the correct - * sRGB transform, given an 8-bit value which might be either sRGB or power-law. - */ -static int -power_law_error8(int value) -{ - if (value > 0 && value < 255) - { - double vd = value / 255.; - double e = fabs( - pow(sRGB_to_d[value], 1/2.2) - sRGB_from_linear(pow(vd, 2.2))); - - /* Always allow an extra 1 here for rounding errors */ - e = 1+floor(255 * e); - return (int)e; - } - - return 0; -} - -static int error_in_sRGB_roundtrip = 56; /* by experiment */ -static int -power_law_error16(int value) -{ - if (value > 0 && value < 65535) - { - /* Round trip the value through an 8-bit representation but using - * non-matching to/from conversions. - */ - double vd = value / 65535.; - double e = fabs( - pow(sRGB_from_linear(vd), 2.2) - linear_from_sRGB(pow(vd, 1/2.2))); - - /* Always allow an extra 1 here for rounding errors */ - e = error_in_sRGB_roundtrip+floor(65535 * e); - return (int)e; - } - - return 0; -} - -static int -compare_8bit(int v1, int v2, int error_limit, int multiple_algorithms) -{ - int e = abs(v1-v2); - int ev1, ev2; - - if (e <= error_limit) - return 1; - - if (!multiple_algorithms) - return 0; - - ev1 = power_law_error8(v1); - if (e <= ev1) - return 1; - - ev2 = power_law_error8(v2); - if (e <= ev2) - return 1; - - return 0; -} - -static int -compare_16bit(int v1, int v2, int error_limit, int multiple_algorithms) -{ - int e = abs(v1-v2); - int ev1, ev2; - - if (e <= error_limit) - return 1; - - /* "multiple_algorithms" in this case means that a color-map has been - * involved somewhere, so we can deduce that the values were forced to 8-bit - * (like the via_linear case for 8-bit.) - */ - if (!multiple_algorithms) - return 0; - - ev1 = power_law_error16(v1); - if (e <= ev1) - return 1; - - ev2 = power_law_error16(v2); - if (e <= ev2) - return 1; - - return 0; -} -#endif /* unused */ - -#define USE_FILE 1 /* else memory */ -#define USE_STDIO 2 /* else use file name */ -#define STRICT 4 /* fail on warnings too */ -#define VERBOSE 8 -#define KEEP_TMPFILES 16 /* else delete temporary files */ -#define KEEP_GOING 32 -#define ACCUMULATE 64 -#define FAST_WRITE 128 -#define sRGB_16BIT 256 -#define NO_RESEED 512 /* do not reseed on each new file */ -#define GBG_ERROR 1024 /* do not ignore the gamma+background_rgb_to_gray - * libpng warning. */ - -static void -print_opts(png_uint_32 opts) -{ - if (opts & USE_FILE) - printf(" --file"); - if (opts & USE_STDIO) - printf(" --stdio"); - if (!(opts & STRICT)) - printf(" --nostrict"); - if (opts & VERBOSE) - printf(" --verbose"); - if (opts & KEEP_TMPFILES) - printf(" --preserve"); - if (opts & KEEP_GOING) - printf(" --keep-going"); - if (opts & ACCUMULATE) - printf(" --accumulate"); - if (!(opts & FAST_WRITE)) /* --fast is currently the default */ - printf(" --slow"); - if (opts & sRGB_16BIT) - printf(" --sRGB-16bit"); - if (opts & NO_RESEED) - printf(" --noreseed"); -#if PNG_LIBPNG_VER < 10700 /* else on by default */ - if (opts & GBG_ERROR) - printf(" --fault-gbg-warning"); -#endif -} - -#define FORMAT_NO_CHANGE 0x80000000 /* additional flag */ - -/* A name table for all the formats - defines the format of the '+' arguments to - * pngstest. - */ -#define FORMAT_COUNT 64 -#define FORMAT_MASK 0x3f -static const char * const format_names[FORMAT_COUNT] = -{ - "sRGB-gray", - "sRGB-gray+alpha", - "sRGB-rgb", - "sRGB-rgb+alpha", - "linear-gray", - "linear-gray+alpha", - "linear-rgb", - "linear-rgb+alpha", - - "color-mapped-sRGB-gray", - "color-mapped-sRGB-gray+alpha", - "color-mapped-sRGB-rgb", - "color-mapped-sRGB-rgb+alpha", - "color-mapped-linear-gray", - "color-mapped-linear-gray+alpha", - "color-mapped-linear-rgb", - "color-mapped-linear-rgb+alpha", - - "sRGB-gray", - "sRGB-gray+alpha", - "sRGB-bgr", - "sRGB-bgr+alpha", - "linear-gray", - "linear-gray+alpha", - "linear-bgr", - "linear-bgr+alpha", - - "color-mapped-sRGB-gray", - "color-mapped-sRGB-gray+alpha", - "color-mapped-sRGB-bgr", - "color-mapped-sRGB-bgr+alpha", - "color-mapped-linear-gray", - "color-mapped-linear-gray+alpha", - "color-mapped-linear-bgr", - "color-mapped-linear-bgr+alpha", - - "sRGB-gray", - "alpha+sRGB-gray", - "sRGB-rgb", - "alpha+sRGB-rgb", - "linear-gray", - "alpha+linear-gray", - "linear-rgb", - "alpha+linear-rgb", - - "color-mapped-sRGB-gray", - "color-mapped-alpha+sRGB-gray", - "color-mapped-sRGB-rgb", - "color-mapped-alpha+sRGB-rgb", - "color-mapped-linear-gray", - "color-mapped-alpha+linear-gray", - "color-mapped-linear-rgb", - "color-mapped-alpha+linear-rgb", - - "sRGB-gray", - "alpha+sRGB-gray", - "sRGB-bgr", - "alpha+sRGB-bgr", - "linear-gray", - "alpha+linear-gray", - "linear-bgr", - "alpha+linear-bgr", - - "color-mapped-sRGB-gray", - "color-mapped-alpha+sRGB-gray", - "color-mapped-sRGB-bgr", - "color-mapped-alpha+sRGB-bgr", - "color-mapped-linear-gray", - "color-mapped-alpha+linear-gray", - "color-mapped-linear-bgr", - "color-mapped-alpha+linear-bgr", -}; - -/* Decode an argument to a format number. */ -static png_uint_32 -formatof(const char *arg) -{ - char *ep; - unsigned long format = strtoul(arg, &ep, 0); - - if (ep > arg && *ep == 0 && format < FORMAT_COUNT) - return (png_uint_32)format; - - else for (format=0; format < FORMAT_COUNT; ++format) - { - if (strcmp(format_names[format], arg) == 0) - return (png_uint_32)format; - } - - fprintf(stderr, "pngstest: format name '%s' invalid\n", arg); - return FORMAT_COUNT; -} - -/* Bitset/test functions for formats */ -#define FORMAT_SET_COUNT (FORMAT_COUNT / 32) -typedef struct -{ - png_uint_32 bits[FORMAT_SET_COUNT]; -} -format_list; - -static void format_init(format_list *pf) -{ - int i; - for (i=0; ibits[i] = 0; /* All off */ -} - -#if 0 /* currently unused */ -static void format_clear(format_list *pf) -{ - int i; - for (i=0; ibits[i] = 0; -} -#endif - -static int format_is_initial(format_list *pf) -{ - int i; - for (i=0; ibits[i] != 0) - return 0; - - return 1; -} - -static int format_set(format_list *pf, png_uint_32 format) -{ - if (format < FORMAT_COUNT) - return pf->bits[format >> 5] |= ((png_uint_32)1) << (format & 31); - - return 0; -} - -#if 0 /* currently unused */ -static int format_unset(format_list *pf, png_uint_32 format) -{ - if (format < FORMAT_COUNT) - return pf->bits[format >> 5] &= ~((png_uint_32)1) << (format & 31); - - return 0; -} -#endif - -static int format_isset(format_list *pf, png_uint_32 format) -{ - return format < FORMAT_COUNT && - (pf->bits[format >> 5] & (((png_uint_32)1) << (format & 31))) != 0; -} - -static void format_default(format_list *pf, int redundant) -{ - if (redundant) - { - int i; - - /* set everything, including flags that are pointless */ - for (i=0; ibits[i] = ~(png_uint_32)0; - } - - else - { - png_uint_32 f; - - for (f=0; finput_file != NULL) - rewind(image->input_file); -} - -/* Free the image buffer; the buffer is re-used on a re-read, this is just for - * cleanup. - */ -static void -freebuffer(Image *image) -{ - if (image->buffer) free(image->buffer); - image->buffer = NULL; - image->bufsize = 0; - image->allocsize = 0; -} - -/* Delete function; cleans out all the allocated data and the temporary file in - * the image. - */ -static void -freeimage(Image *image) -{ - freebuffer(image); - png_image_free(&image->image); - - if (image->input_file != NULL) - { - fclose(image->input_file); - image->input_file = NULL; - } - - if (image->input_memory != NULL) - { - free(image->input_memory); - image->input_memory = NULL; - image->input_memory_size = 0; - } - - if (image->tmpfile_name[0] != 0 && (image->opts & KEEP_TMPFILES) == 0) - { - (void)remove(image->tmpfile_name); - image->tmpfile_name[0] = 0; - } -} - -/* This is actually a re-initializer; allows an image structure to be re-used by - * freeing everything that relates to an old image. - */ -static void initimage(Image *image, png_uint_32 opts, const char *file_name, - int stride_extra) -{ - freeimage(image); - memset(&image->image, 0, sizeof image->image); - image->opts = opts; - image->file_name = file_name; - image->stride_extra = stride_extra; -} - -/* Make sure the image buffer is big enough; allows re-use of the buffer if the - * image is re-read. - */ -#define BUFFER_INIT8 73 -static void -allocbuffer(Image *image) -{ - size_t size = PNG_IMAGE_BUFFER_SIZE(image->image, image->stride); - - if (size+32 > image->bufsize) - { - freebuffer(image); - image->buffer = voidcast(png_bytep, malloc(size+32)); - if (image->buffer == NULL) - { - fflush(stdout); - fprintf(stderr, - "simpletest: out of memory allocating %lu(+32) byte buffer\n", - (unsigned long)size); - exit(1); - } - image->bufsize = size+32; - } - - memset(image->buffer, 95, image->bufsize); - memset(image->buffer+16, BUFFER_INIT8, size); - image->allocsize = size; -} - -/* Make sure 16 bytes match the given byte. */ -static int -check16(png_const_bytep bp, int b) -{ - int i = 16; - - do - if (*bp != b) return 1; - while (--i); - - return 0; -} - -/* Check for overwrite in the image buffer. */ -static void -checkbuffer(Image *image, const char *arg) -{ - if (check16(image->buffer, 95)) - { - fflush(stdout); - fprintf(stderr, "%s: overwrite at start of image buffer\n", arg); - exit(1); - } - - if (check16(image->buffer+16+image->allocsize, 95)) - { - fflush(stdout); - fprintf(stderr, "%s: overwrite at end of image buffer\n", arg); - exit(1); - } -} - -/* ERROR HANDLING */ -/* Log a terminal error, also frees the libpng part of the image if necessary. - */ -static int -logerror(Image *image, const char *a1, const char *a2, const char *a3) -{ - fflush(stdout); - if (image->image.warning_or_error) - fprintf(stderr, "%s%s%s: %s\n", a1, a2, a3, image->image.message); - - else - fprintf(stderr, "%s%s%s\n", a1, a2, a3); - - if (image->image.opaque != NULL) - { - fprintf(stderr, "%s: image opaque pointer non-NULL on error\n", - image->file_name); - png_image_free(&image->image); - } - - return 0; -} - -/* Log an error and close a file (just a utility to do both things in one - * function call.) - */ -static int -logclose(Image *image, FILE *f, const char *name, const char *operation) -{ - int e = errno; - - fclose(f); - return logerror(image, name, operation, strerror(e)); -} - -/* Make sure the png_image has been freed - validates that libpng is doing what - * the spec says and freeing the image. - */ -static int -checkopaque(Image *image) -{ - if (image->image.opaque != NULL) - { - png_image_free(&image->image); - return logerror(image, image->file_name, ": opaque not NULL", ""); - } - - /* Separate out the gamma+background_rgb_to_gray warning because it may - * produce opaque component errors: - */ - else if (image->image.warning_or_error != 0 && - (strcmp(image->image.message, - "libpng does not support gamma+background+rgb_to_gray") == 0 ? - (image->opts & GBG_ERROR) != 0 : (image->opts & STRICT) != 0)) - return logerror(image, image->file_name, (image->opts & GBG_ERROR) != 0 ? - " --fault-gbg-warning" : " --strict", ""); - - else - return 1; -} - -/* IMAGE COMPARISON/CHECKING */ -/* Compare the pixels of two images, which should be the same but aren't. The - * images must have been checked for a size match. - */ -typedef struct -{ - /* The components, for grayscale images the gray value is in 'g' and if alpha - * is not present 'a' is set to 255 or 65535 according to format. - */ - int r, g, b, a; -} Pixel; - -typedef struct -{ - /* The background as the original sRGB 8-bit value converted to the final - * integer format and as a double precision linear value in the range 0..1 - * for with partially transparent pixels. - */ - int ir, ig, ib; - double dr, dg, db; /* linear r,g,b scaled to 0..1 */ -} Background; - -/* Basic image formats; control the data but not the layout thereof. */ -#define BASE_FORMATS\ - (PNG_FORMAT_FLAG_ALPHA|PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_LINEAR) - -/* Read a Pixel from a buffer. The code below stores the correct routine for - * the format in a function pointer, these are the routines: - */ -static void -gp_g8(Pixel *p, png_const_voidp pb) -{ - png_const_bytep pp = voidcast(png_const_bytep, pb); - - p->r = p->g = p->b = pp[0]; - p->a = 255; -} - -static void -gp_ga8(Pixel *p, png_const_voidp pb) -{ - png_const_bytep pp = voidcast(png_const_bytep, pb); - - p->r = p->g = p->b = pp[0]; - p->a = pp[1]; -} - -#ifdef PNG_FORMAT_AFIRST_SUPPORTED -static void -gp_ag8(Pixel *p, png_const_voidp pb) -{ - png_const_bytep pp = voidcast(png_const_bytep, pb); - - p->r = p->g = p->b = pp[1]; - p->a = pp[0]; -} -#endif - -static void -gp_rgb8(Pixel *p, png_const_voidp pb) -{ - png_const_bytep pp = voidcast(png_const_bytep, pb); - - p->r = pp[0]; - p->g = pp[1]; - p->b = pp[2]; - p->a = 255; -} - -#ifdef PNG_FORMAT_BGR_SUPPORTED -static void -gp_bgr8(Pixel *p, png_const_voidp pb) -{ - png_const_bytep pp = voidcast(png_const_bytep, pb); - - p->r = pp[2]; - p->g = pp[1]; - p->b = pp[0]; - p->a = 255; -} -#endif - -static void -gp_rgba8(Pixel *p, png_const_voidp pb) -{ - png_const_bytep pp = voidcast(png_const_bytep, pb); - - p->r = pp[0]; - p->g = pp[1]; - p->b = pp[2]; - p->a = pp[3]; -} - -#ifdef PNG_FORMAT_BGR_SUPPORTED -static void -gp_bgra8(Pixel *p, png_const_voidp pb) -{ - png_const_bytep pp = voidcast(png_const_bytep, pb); - - p->r = pp[2]; - p->g = pp[1]; - p->b = pp[0]; - p->a = pp[3]; -} -#endif - -#ifdef PNG_FORMAT_AFIRST_SUPPORTED -static void -gp_argb8(Pixel *p, png_const_voidp pb) -{ - png_const_bytep pp = voidcast(png_const_bytep, pb); - - p->r = pp[1]; - p->g = pp[2]; - p->b = pp[3]; - p->a = pp[0]; -} -#endif - -#if defined(PNG_FORMAT_AFIRST_SUPPORTED) && defined(PNG_FORMAT_BGR_SUPPORTED) -static void -gp_abgr8(Pixel *p, png_const_voidp pb) -{ - png_const_bytep pp = voidcast(png_const_bytep, pb); - - p->r = pp[3]; - p->g = pp[2]; - p->b = pp[1]; - p->a = pp[0]; -} -#endif - -static void -gp_g16(Pixel *p, png_const_voidp pb) -{ - png_const_uint_16p pp = voidcast(png_const_uint_16p, pb); - - p->r = p->g = p->b = pp[0]; - p->a = 65535; -} - -static void -gp_ga16(Pixel *p, png_const_voidp pb) -{ - png_const_uint_16p pp = voidcast(png_const_uint_16p, pb); - - p->r = p->g = p->b = pp[0]; - p->a = pp[1]; -} - -#ifdef PNG_FORMAT_AFIRST_SUPPORTED -static void -gp_ag16(Pixel *p, png_const_voidp pb) -{ - png_const_uint_16p pp = voidcast(png_const_uint_16p, pb); - - p->r = p->g = p->b = pp[1]; - p->a = pp[0]; -} -#endif - -static void -gp_rgb16(Pixel *p, png_const_voidp pb) -{ - png_const_uint_16p pp = voidcast(png_const_uint_16p, pb); - - p->r = pp[0]; - p->g = pp[1]; - p->b = pp[2]; - p->a = 65535; -} - -#ifdef PNG_FORMAT_BGR_SUPPORTED -static void -gp_bgr16(Pixel *p, png_const_voidp pb) -{ - png_const_uint_16p pp = voidcast(png_const_uint_16p, pb); - - p->r = pp[2]; - p->g = pp[1]; - p->b = pp[0]; - p->a = 65535; -} -#endif - -static void -gp_rgba16(Pixel *p, png_const_voidp pb) -{ - png_const_uint_16p pp = voidcast(png_const_uint_16p, pb); - - p->r = pp[0]; - p->g = pp[1]; - p->b = pp[2]; - p->a = pp[3]; -} - -#ifdef PNG_FORMAT_BGR_SUPPORTED -static void -gp_bgra16(Pixel *p, png_const_voidp pb) -{ - png_const_uint_16p pp = voidcast(png_const_uint_16p, pb); - - p->r = pp[2]; - p->g = pp[1]; - p->b = pp[0]; - p->a = pp[3]; -} -#endif - -#ifdef PNG_FORMAT_AFIRST_SUPPORTED -static void -gp_argb16(Pixel *p, png_const_voidp pb) -{ - png_const_uint_16p pp = voidcast(png_const_uint_16p, pb); - - p->r = pp[1]; - p->g = pp[2]; - p->b = pp[3]; - p->a = pp[0]; -} -#endif - -#if defined(PNG_FORMAT_AFIRST_SUPPORTED) && defined(PNG_FORMAT_BGR_SUPPORTED) -static void -gp_abgr16(Pixel *p, png_const_voidp pb) -{ - png_const_uint_16p pp = voidcast(png_const_uint_16p, pb); - - p->r = pp[3]; - p->g = pp[2]; - p->b = pp[1]; - p->a = pp[0]; -} -#endif - -/* Given a format, return the correct one of the above functions. */ -static void (* -get_pixel(png_uint_32 format))(Pixel *p, png_const_voidp pb) -{ - /* The color-map flag is irrelevant here - the caller of the function - * returned must either pass the buffer or, for a color-mapped image, the - * correct entry in the color-map. - */ - if (format & PNG_FORMAT_FLAG_LINEAR) - { - if (format & PNG_FORMAT_FLAG_COLOR) - { -# ifdef PNG_FORMAT_BGR_SUPPORTED - if (format & PNG_FORMAT_FLAG_BGR) - { - if (format & PNG_FORMAT_FLAG_ALPHA) - { -# ifdef PNG_FORMAT_AFIRST_SUPPORTED - if (format & PNG_FORMAT_FLAG_AFIRST) - return gp_abgr16; - - else -# endif - return gp_bgra16; - } - - else - return gp_bgr16; - } - - else -# endif - { - if (format & PNG_FORMAT_FLAG_ALPHA) - { -# ifdef PNG_FORMAT_AFIRST_SUPPORTED - if (format & PNG_FORMAT_FLAG_AFIRST) - return gp_argb16; - - else -# endif - return gp_rgba16; - } - - else - return gp_rgb16; - } - } - - else - { - if (format & PNG_FORMAT_FLAG_ALPHA) - { -# ifdef PNG_FORMAT_AFIRST_SUPPORTED - if (format & PNG_FORMAT_FLAG_AFIRST) - return gp_ag16; - - else -# endif - return gp_ga16; - } - - else - return gp_g16; - } - } - - else - { - if (format & PNG_FORMAT_FLAG_COLOR) - { -# ifdef PNG_FORMAT_BGR_SUPPORTED - if (format & PNG_FORMAT_FLAG_BGR) - { - if (format & PNG_FORMAT_FLAG_ALPHA) - { -# ifdef PNG_FORMAT_AFIRST_SUPPORTED - if (format & PNG_FORMAT_FLAG_AFIRST) - return gp_abgr8; - - else -# endif - return gp_bgra8; - } - - else - return gp_bgr8; - } - - else -# endif - { - if (format & PNG_FORMAT_FLAG_ALPHA) - { -# ifdef PNG_FORMAT_AFIRST_SUPPORTED - if (format & PNG_FORMAT_FLAG_AFIRST) - return gp_argb8; - - else -# endif - return gp_rgba8; - } - - else - return gp_rgb8; - } - } - - else - { - if (format & PNG_FORMAT_FLAG_ALPHA) - { -# ifdef PNG_FORMAT_AFIRST_SUPPORTED - if (format & PNG_FORMAT_FLAG_AFIRST) - return gp_ag8; - - else -# endif - return gp_ga8; - } - - else - return gp_g8; - } - } -} - -/* Conversion between pixel formats. The code above effectively eliminates the - * component ordering changes leaving three basic changes: - * - * 1) Remove an alpha channel by pre-multiplication or compositing on a - * background color. (Adding an alpha channel is a no-op.) - * - * 2) Remove color by mapping to grayscale. (Grayscale to color is a no-op.) - * - * 3) Convert between 8-bit and 16-bit components. (Both directtions are - * relevant.) - * - * This gives the following base format conversion matrix: - * - * OUT: ----- 8-bit ----- ----- 16-bit ----- - * IN G GA RGB RGBA G GA RGB RGBA - * 8 G . . . . lin lin lin lin - * 8 GA bckg . bckc . pre' pre pre' pre - * 8 RGB g8 g8 . . glin glin lin lin - * 8 RGBA g8b g8 bckc . gpr' gpre pre' pre - * 16 G sRGB sRGB sRGB sRGB . . . . - * 16 GA b16g unpg b16c unpc A . A . - * 16 RGB sG sG sRGB sRGB g16 g16 . . - * 16 RGBA gb16 sGp cb16 sCp g16 g16' A . - * - * 8-bit to 8-bit: - * bckg: composite on gray background - * bckc: composite on color background - * g8: convert sRGB components to sRGB grayscale - * g8b: convert sRGB components to grayscale and composite on gray background - * - * 8-bit to 16-bit: - * lin: make sRGB components linear, alpha := 65535 - * pre: make sRGB components linear and premultiply by alpha (scale alpha) - * pre': as 'pre' but alpha := 65535 - * glin: make sRGB components linear, convert to grayscale, alpha := 65535 - * gpre: make sRGB components grayscale and linear and premultiply by alpha - * gpr': as 'gpre' but alpha := 65535 - * - * 16-bit to 8-bit: - * sRGB: convert linear components to sRGB, alpha := 255 - * unpg: unpremultiply gray component and convert to sRGB (scale alpha) - * unpc: unpremultiply color components and convert to sRGB (scale alpha) - * b16g: composite linear onto gray background and convert the result to sRGB - * b16c: composite linear onto color background and convert the result to sRGB - * sG: convert linear RGB to sRGB grayscale - * sGp: unpremultiply RGB then convert to sRGB grayscale - * sCp: unpremultiply RGB then convert to sRGB - * gb16: composite linear onto background and convert to sRGB grayscale - * (order doesn't matter, the composite and grayscale operations permute) - * cb16: composite linear onto background and convert to sRGB - * - * 16-bit to 16-bit: - * A: set alpha to 65535 - * g16: convert linear RGB to linear grayscale (alpha := 65535) - * g16': as 'g16' but alpha is unchanged - */ -/* Simple copy: */ -static void -gpc_noop(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - out->r = in->r; - out->g = in->g; - out->b = in->b; - out->a = in->a; -} - -#if ALLOW_UNUSED_GPC -static void -gpc_nop8(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - if (in->a == 0) - out->r = out->g = out->b = 255; - - else - { - out->r = in->r; - out->g = in->g; - out->b = in->b; - } - - out->a = in->a; -} -#endif - -#if ALLOW_UNUSED_GPC -static void -gpc_nop6(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - if (in->a == 0) - out->r = out->g = out->b = 65535; - - else - { - out->r = in->r; - out->g = in->g; - out->b = in->b; - } - - out->a = in->a; -} -#endif - -/* 8-bit to 8-bit conversions */ -/* bckg: composite on gray background */ -static void -gpc_bckg(Pixel *out, const Pixel *in, const Background *back) -{ - if (in->a <= 0) - out->r = out->g = out->b = back->ig; - - else if (in->a >= 255) - out->r = out->g = out->b = in->g; - - else - { - double a = in->a / 255.; - - out->r = out->g = out->b = sRGB(sRGB_to_d[in->g] * a + back->dg * (1-a)); - } - - out->a = 255; -} - -/* bckc: composite on color background */ -static void -gpc_bckc(Pixel *out, const Pixel *in, const Background *back) -{ - if (in->a <= 0) - { - out->r = back->ir; - out->g = back->ig; - out->b = back->ib; - } - - else if (in->a >= 255) - { - out->r = in->r; - out->g = in->g; - out->b = in->b; - } - - else - { - double a = in->a / 255.; - - out->r = sRGB(sRGB_to_d[in->r] * a + back->dr * (1-a)); - out->g = sRGB(sRGB_to_d[in->g] * a + back->dg * (1-a)); - out->b = sRGB(sRGB_to_d[in->b] * a + back->db * (1-a)); - } - - out->a = 255; -} - -/* g8: convert sRGB components to sRGB grayscale */ -static void -gpc_g8(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - if (in->r == in->g && in->g == in->b) - out->r = out->g = out->b = in->g; - - else - out->r = out->g = out->b = - sRGB(YfromRGB(sRGB_to_d[in->r], sRGB_to_d[in->g], sRGB_to_d[in->b])); - - out->a = in->a; -} - -/* g8b: convert sRGB components to grayscale and composite on gray background */ -static void -gpc_g8b(Pixel *out, const Pixel *in, const Background *back) -{ - if (in->a <= 0) - out->r = out->g = out->b = back->ig; - - else if (in->a >= 255) - { - if (in->r == in->g && in->g == in->b) - out->r = out->g = out->b = in->g; - - else - out->r = out->g = out->b = sRGB(YfromRGB( - sRGB_to_d[in->r], sRGB_to_d[in->g], sRGB_to_d[in->b])); - } - - else - { - double a = in->a/255.; - - out->r = out->g = out->b = sRGB(a * YfromRGB(sRGB_to_d[in->r], - sRGB_to_d[in->g], sRGB_to_d[in->b]) + back->dg * (1-a)); - } - - out->a = 255; -} - -/* 8-bit to 16-bit conversions */ -/* lin: make sRGB components linear, alpha := 65535 */ -static void -gpc_lin(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - out->r = ilinear(in->r); - - if (in->g == in->r) - { - out->g = out->r; - - if (in->b == in->r) - out->b = out->r; - - else - out->b = ilinear(in->b); - } - - else - { - out->g = ilinear(in->g); - - if (in->b == in->r) - out->b = out->r; - - else if (in->b == in->g) - out->b = out->g; - - else - out->b = ilinear(in->b); - } - - out->a = 65535; -} - -/* pre: make sRGB components linear and premultiply by alpha (scale alpha) */ -static void -gpc_pre(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - out->r = ilineara(in->r, in->a); - - if (in->g == in->r) - { - out->g = out->r; - - if (in->b == in->r) - out->b = out->r; - - else - out->b = ilineara(in->b, in->a); - } - - else - { - out->g = ilineara(in->g, in->a); - - if (in->b == in->r) - out->b = out->r; - - else if (in->b == in->g) - out->b = out->g; - - else - out->b = ilineara(in->b, in->a); - } - - out->a = in->a * 257; -} - -/* pre': as 'pre' but alpha := 65535 */ -static void -gpc_preq(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - out->r = ilineara(in->r, in->a); - - if (in->g == in->r) - { - out->g = out->r; - - if (in->b == in->r) - out->b = out->r; - - else - out->b = ilineara(in->b, in->a); - } - - else - { - out->g = ilineara(in->g, in->a); - - if (in->b == in->r) - out->b = out->r; - - else if (in->b == in->g) - out->b = out->g; - - else - out->b = ilineara(in->b, in->a); - } - - out->a = 65535; -} - -/* glin: make sRGB components linear, convert to grayscale, alpha := 65535 */ -static void -gpc_glin(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - if (in->r == in->g && in->g == in->b) - out->r = out->g = out->b = ilinear(in->g); - - else - out->r = out->g = out->b = u16d(65535 * - YfromRGB(sRGB_to_d[in->r], sRGB_to_d[in->g], sRGB_to_d[in->b])); - - out->a = 65535; -} - -/* gpre: make sRGB components grayscale and linear and premultiply by alpha */ -static void -gpc_gpre(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - if (in->r == in->g && in->g == in->b) - out->r = out->g = out->b = ilineara(in->g, in->a); - - else - out->r = out->g = out->b = u16d(in->a * 257 * - YfromRGB(sRGB_to_d[in->r], sRGB_to_d[in->g], sRGB_to_d[in->b])); - - out->a = 257 * in->a; -} - -/* gpr': as 'gpre' but alpha := 65535 */ -static void -gpc_gprq(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - if (in->r == in->g && in->g == in->b) - out->r = out->g = out->b = ilineara(in->g, in->a); - - else - out->r = out->g = out->b = u16d(in->a * 257 * - YfromRGB(sRGB_to_d[in->r], sRGB_to_d[in->g], sRGB_to_d[in->b])); - - out->a = 65535; -} - -/* 8-bit to 16-bit conversions for gAMA 45455 encoded values */ -/* Lin: make gAMA 45455 components linear, alpha := 65535 */ -static void -gpc_Lin(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - out->r = ilinear_g22(in->r); - - if (in->g == in->r) - { - out->g = out->r; - - if (in->b == in->r) - out->b = out->r; - - else - out->b = ilinear_g22(in->b); - } - - else - { - out->g = ilinear_g22(in->g); - - if (in->b == in->r) - out->b = out->r; - - else if (in->b == in->g) - out->b = out->g; - - else - out->b = ilinear_g22(in->b); - } - - out->a = 65535; -} - -#if ALLOW_UNUSED_GPC -/* Pre: make gAMA 45455 components linear and premultiply by alpha (scale alpha) - */ -static void -gpc_Pre(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - out->r = ilineara_g22(in->r, in->a); - - if (in->g == in->r) - { - out->g = out->r; - - if (in->b == in->r) - out->b = out->r; - - else - out->b = ilineara_g22(in->b, in->a); - } - - else - { - out->g = ilineara_g22(in->g, in->a); - - if (in->b == in->r) - out->b = out->r; - - else if (in->b == in->g) - out->b = out->g; - - else - out->b = ilineara_g22(in->b, in->a); - } - - out->a = in->a * 257; -} -#endif - -#if ALLOW_UNUSED_GPC -/* Pre': as 'Pre' but alpha := 65535 */ -static void -gpc_Preq(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - out->r = ilineara_g22(in->r, in->a); - - if (in->g == in->r) - { - out->g = out->r; - - if (in->b == in->r) - out->b = out->r; - - else - out->b = ilineara_g22(in->b, in->a); - } - - else - { - out->g = ilineara_g22(in->g, in->a); - - if (in->b == in->r) - out->b = out->r; - - else if (in->b == in->g) - out->b = out->g; - - else - out->b = ilineara_g22(in->b, in->a); - } - - out->a = 65535; -} -#endif - -#if ALLOW_UNUSED_GPC -/* Glin: make gAMA 45455 components linear, convert to grayscale, alpha := 65535 - */ -static void -gpc_Glin(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - if (in->r == in->g && in->g == in->b) - out->r = out->g = out->b = ilinear_g22(in->g); - - else - out->r = out->g = out->b = u16d(65535 * - YfromRGB(g22_to_d[in->r], g22_to_d[in->g], g22_to_d[in->b])); - - out->a = 65535; -} -#endif - -#if ALLOW_UNUSED_GPC -/* Gpre: make gAMA 45455 components grayscale and linear and premultiply by - * alpha. - */ -static void -gpc_Gpre(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - if (in->r == in->g && in->g == in->b) - out->r = out->g = out->b = ilineara_g22(in->g, in->a); - - else - out->r = out->g = out->b = u16d(in->a * 257 * - YfromRGB(g22_to_d[in->r], g22_to_d[in->g], g22_to_d[in->b])); - - out->a = 257 * in->a; -} -#endif - -#if ALLOW_UNUSED_GPC -/* Gpr': as 'Gpre' but alpha := 65535 */ -static void -gpc_Gprq(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - if (in->r == in->g && in->g == in->b) - out->r = out->g = out->b = ilineara_g22(in->g, in->a); - - else - out->r = out->g = out->b = u16d(in->a * 257 * - YfromRGB(g22_to_d[in->r], g22_to_d[in->g], g22_to_d[in->b])); - - out->a = 65535; -} -#endif - -/* 16-bit to 8-bit conversions */ -/* sRGB: convert linear components to sRGB, alpha := 255 */ -static void -gpc_sRGB(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - out->r = isRGB(in->r); - - if (in->g == in->r) - { - out->g = out->r; - - if (in->b == in->r) - out->b = out->r; - - else - out->b = isRGB(in->b); - } - - else - { - out->g = isRGB(in->g); - - if (in->b == in->r) - out->b = out->r; - - else if (in->b == in->g) - out->b = out->g; - - else - out->b = isRGB(in->b); - } - - out->a = 255; -} - -/* unpg: unpremultiply gray component and convert to sRGB (scale alpha) */ -static void -gpc_unpg(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - if (in->a <= 128) - { - out->r = out->g = out->b = 255; - out->a = 0; - } - - else - { - out->r = out->g = out->b = sRGB((double)in->g / in->a); - out->a = u8d(in->a / 257.); - } -} - -/* unpc: unpremultiply color components and convert to sRGB (scale alpha) */ -static void -gpc_unpc(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - if (in->a <= 128) - { - out->r = out->g = out->b = 255; - out->a = 0; - } - - else - { - out->r = sRGB((double)in->r / in->a); - out->g = sRGB((double)in->g / in->a); - out->b = sRGB((double)in->b / in->a); - out->a = u8d(in->a / 257.); - } -} - -/* b16g: composite linear onto gray background and convert the result to sRGB */ -static void -gpc_b16g(Pixel *out, const Pixel *in, const Background *back) -{ - if (in->a <= 0) - out->r = out->g = out->b = back->ig; - - else - { - double a = in->a/65535.; - double a1 = 1-a; - - a /= 65535; - out->r = out->g = out->b = sRGB(in->g * a + back->dg * a1); - } - - out->a = 255; -} - -/* b16c: composite linear onto color background and convert the result to sRGB*/ -static void -gpc_b16c(Pixel *out, const Pixel *in, const Background *back) -{ - if (in->a <= 0) - { - out->r = back->ir; - out->g = back->ig; - out->b = back->ib; - } - - else - { - double a = in->a/65535.; - double a1 = 1-a; - - a /= 65535; - out->r = sRGB(in->r * a + back->dr * a1); - out->g = sRGB(in->g * a + back->dg * a1); - out->b = sRGB(in->b * a + back->db * a1); - } - - out->a = 255; -} - -/* sG: convert linear RGB to sRGB grayscale */ -static void -gpc_sG(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - out->r = out->g = out->b = sRGB(YfromRGBint(in->r, in->g, in->b)/65535); - out->a = 255; -} - -/* sGp: unpremultiply RGB then convert to sRGB grayscale */ -static void -gpc_sGp(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - if (in->a <= 128) - { - out->r = out->g = out->b = 255; - out->a = 0; - } - - else - { - out->r = out->g = out->b = sRGB(YfromRGBint(in->r, in->g, in->b)/in->a); - out->a = u8d(in->a / 257.); - } -} - -/* sCp: unpremultiply RGB then convert to sRGB */ -static void -gpc_sCp(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - - if (in->a <= 128) - { - out->r = out->g = out->b = 255; - out->a = 0; - } - - else - { - out->r = sRGB((double)in->r / in->a); - out->g = sRGB((double)in->g / in->a); - out->b = sRGB((double)in->b / in->a); - out->a = u8d(in->a / 257.); - } -} - -/* gb16: composite linear onto background and convert to sRGB grayscale */ -/* (order doesn't matter, the composite and grayscale operations permute) */ -static void -gpc_gb16(Pixel *out, const Pixel *in, const Background *back) -{ - if (in->a <= 0) - out->r = out->g = out->b = back->ig; - - else if (in->a >= 65535) - out->r = out->g = out->b = isRGB(in->g); - - else - { - double a = in->a / 65535.; - double a1 = 1-a; - - a /= 65535; - out->r = out->g = out->b = sRGB(in->g * a + back->dg * a1); - } - - out->a = 255; -} - -/* cb16: composite linear onto background and convert to sRGB */ -static void -gpc_cb16(Pixel *out, const Pixel *in, const Background *back) -{ - if (in->a <= 0) - { - out->r = back->ir; - out->g = back->ig; - out->b = back->ib; - } - - else if (in->a >= 65535) - { - out->r = isRGB(in->r); - out->g = isRGB(in->g); - out->b = isRGB(in->b); - } - - else - { - double a = in->a / 65535.; - double a1 = 1-a; - - a /= 65535; - out->r = sRGB(in->r * a + back->dr * a1); - out->g = sRGB(in->g * a + back->dg * a1); - out->b = sRGB(in->b * a + back->db * a1); - } - - out->a = 255; -} - -/* 16-bit to 16-bit conversions */ -/* A: set alpha to 65535 */ -static void -gpc_A(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - out->r = in->r; - out->g = in->g; - out->b = in->b; - out->a = 65535; -} - -/* g16: convert linear RGB to linear grayscale (alpha := 65535) */ -static void -gpc_g16(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - out->r = out->g = out->b = u16d(YfromRGBint(in->r, in->g, in->b)); - out->a = 65535; -} - -/* g16': as 'g16' but alpha is unchanged */ -static void -gpc_g16q(Pixel *out, const Pixel *in, const Background *back) -{ - (void)back; - out->r = out->g = out->b = u16d(YfromRGBint(in->r, in->g, in->b)); - out->a = in->a; -} - -#if ALLOW_UNUSED_GPC -/* Unused functions (to hide them from GCC unused function warnings) */ -void (* const gpc_unused[]) - (Pixel *out, const Pixel *in, const Background *back) = -{ - gpc_Pre, gpc_Preq, gpc_Glin, gpc_Gpre, gpc_Gprq, gpc_nop8, gpc_nop6 -}; -#endif - -/* OUT: ----- 8-bit ----- ----- 16-bit ----- - * IN G GA RGB RGBA G GA RGB RGBA - * 8 G . . . . lin lin lin lin - * 8 GA bckg . bckc . pre' pre pre' pre - * 8 RGB g8 g8 . . glin glin lin lin - * 8 RGBA g8b g8 bckc . gpr' gpre pre' pre - * 16 G sRGB sRGB sRGB sRGB . . . . - * 16 GA b16g unpg b16c unpc A . A . - * 16 RGB sG sG sRGB sRGB g16 g16 . . - * 16 RGBA gb16 sGp cb16 sCp g16 g16' A . - * - * The matrix is held in an array indexed thus: - * - * gpc_fn[out_format & BASE_FORMATS][in_format & BASE_FORMATS]; - */ -/* This will produce a compile time error if the FORMAT_FLAG values don't - * match the above matrix! - */ -#if PNG_FORMAT_FLAG_ALPHA == 1 && PNG_FORMAT_FLAG_COLOR == 2 &&\ - PNG_FORMAT_FLAG_LINEAR == 4 -static void (* const gpc_fn[8/*in*/][8/*out*/]) - (Pixel *out, const Pixel *in, const Background *back) = -{ -/*out: G-8 GA-8 RGB-8 RGBA-8 G-16 GA-16 RGB-16 RGBA-16 */ - {gpc_noop,gpc_noop,gpc_noop,gpc_noop, gpc_Lin, gpc_Lin, gpc_Lin, gpc_Lin }, - {gpc_bckg,gpc_noop,gpc_bckc,gpc_noop, gpc_preq,gpc_pre, gpc_preq,gpc_pre }, - {gpc_g8, gpc_g8, gpc_noop,gpc_noop, gpc_glin,gpc_glin,gpc_lin, gpc_lin }, - {gpc_g8b, gpc_g8, gpc_bckc,gpc_noop, gpc_gprq,gpc_gpre,gpc_preq,gpc_pre }, - {gpc_sRGB,gpc_sRGB,gpc_sRGB,gpc_sRGB, gpc_noop,gpc_noop,gpc_noop,gpc_noop}, - {gpc_b16g,gpc_unpg,gpc_b16c,gpc_unpc, gpc_A, gpc_noop,gpc_A, gpc_noop}, - {gpc_sG, gpc_sG, gpc_sRGB,gpc_sRGB, gpc_g16, gpc_g16, gpc_noop,gpc_noop}, - {gpc_gb16,gpc_sGp, gpc_cb16,gpc_sCp, gpc_g16, gpc_g16q,gpc_A, gpc_noop} -}; - -/* The array is repeated for the cases where both the input and output are color - * mapped because then different algorithms are used. - */ -static void (* const gpc_fn_colormapped[8/*in*/][8/*out*/]) - (Pixel *out, const Pixel *in, const Background *back) = -{ -/*out: G-8 GA-8 RGB-8 RGBA-8 G-16 GA-16 RGB-16 RGBA-16 */ - {gpc_noop,gpc_noop,gpc_noop,gpc_noop, gpc_lin, gpc_lin, gpc_lin, gpc_lin }, - {gpc_bckg,gpc_noop,gpc_bckc,gpc_noop, gpc_preq,gpc_pre, gpc_preq,gpc_pre }, - {gpc_g8, gpc_g8, gpc_noop,gpc_noop, gpc_glin,gpc_glin,gpc_lin, gpc_lin }, - {gpc_g8b, gpc_g8, gpc_bckc,gpc_noop, gpc_gprq,gpc_gpre,gpc_preq,gpc_pre }, - {gpc_sRGB,gpc_sRGB,gpc_sRGB,gpc_sRGB, gpc_noop,gpc_noop,gpc_noop,gpc_noop}, - {gpc_b16g,gpc_unpg,gpc_b16c,gpc_unpc, gpc_A, gpc_noop,gpc_A, gpc_noop}, - {gpc_sG, gpc_sG, gpc_sRGB,gpc_sRGB, gpc_g16, gpc_g16, gpc_noop,gpc_noop}, - {gpc_gb16,gpc_sGp, gpc_cb16,gpc_sCp, gpc_g16, gpc_g16q,gpc_A, gpc_noop} -}; - -/* The error arrays record the error in the same matrix; 64 entries, however - * the different algorithms used in libpng for colormap and direct conversions - * mean that four separate matrices are used (for each combination of - * colormapped and direct.) - * - * In some cases the conversion between sRGB formats goes via a linear - * intermediate; an sRGB to linear conversion (as above) is followed by a simple - * linear to sRGB step with no other conversions. This is done by a separate - * error array from an arbitrary 'in' format to one of the four basic outputs - * (since final output is always sRGB not colormapped). - * - * These arrays may be modified if the --accumulate flag is set during the run; - * then instead of logging errors they are simply added in. - * - * The three entries are currently for transparent, partially transparent and - * opaque input pixel values. Notice that alpha should be exact in each case. - * - * Errors in alpha should only occur when converting from a direct format - * to a colormapped format, when alpha is effectively smashed (so large - * errors can occur.) There should be no error in the '0' and 'opaque' - * values. The fourth entry in the array is used for the alpha error (and it - * should always be zero for the 'via linear' case since this is never color - * mapped.) - * - * Mapping to a colormap smashes the colors, it is necessary to have separate - * values for these cases because they are much larger; it is very much - * impossible to obtain a reasonable result, these are held in - * gpc_error_to_colormap. - */ -#if PNG_FORMAT_FLAG_COLORMAP == 8 /* extra check also required */ -# include "pngstest-errors.h" /* machine generated */ -#endif /* COLORMAP flag check */ -#endif /* flag checks */ - -typedef struct -{ - /* Basic pixel information: */ - Image* in_image; /* Input image */ - const Image* out_image; /* Output image */ - - /* 'background' is the value passed to the gpc_ routines, it may be NULL if - * it should not be used (*this* program has an error if it crashes as a - * result!) - */ - Background background_color; - const Background* background; - - /* Precalculated values: */ - int in_opaque; /* Value of input alpha that is opaque */ - int is_palette; /* Sample values come from the palette */ - int accumulate; /* Accumulate component errors (don't log) */ - int output_8bit; /* Output is 8-bit (else 16-bit) */ - - void (*in_gp)(Pixel*, png_const_voidp); - void (*out_gp)(Pixel*, png_const_voidp); - - void (*transform)(Pixel *out, const Pixel *in, const Background *back); - /* A function to perform the required transform */ - - void (*from_linear)(Pixel *out, const Pixel *in, const Background *back); - /* For 'via_linear' transforms the final, from linear, step, else NULL */ - - png_uint_16 error[4]; - /* Three error values for transparent, partially transparent and opaque - * input pixels (in turn). - */ - - png_uint_16 *error_ptr; - /* Where these are stored in the static array (for 'accumulate') */ -} -Transform; - -/* Return a 'transform' as above for the given format conversion. */ -static void -transform_from_formats(Transform *result, Image *in_image, - const Image *out_image, png_const_colorp background, int via_linear) -{ - png_uint_32 in_format, out_format; - png_uint_32 in_base, out_base; - - memset(result, 0, sizeof *result); - - /* Store the original images for error messages */ - result->in_image = in_image; - result->out_image = out_image; - - in_format = in_image->image.format; - out_format = out_image->image.format; - - if (in_format & PNG_FORMAT_FLAG_LINEAR) - result->in_opaque = 65535; - else - result->in_opaque = 255; - - result->output_8bit = (out_format & PNG_FORMAT_FLAG_LINEAR) == 0; - - result->is_palette = 0; /* set by caller if required */ - result->accumulate = (in_image->opts & ACCUMULATE) != 0; - - /* The loaders (which need the ordering information) */ - result->in_gp = get_pixel(in_format); - result->out_gp = get_pixel(out_format); - - /* Remove the ordering information: */ - in_format &= BASE_FORMATS | PNG_FORMAT_FLAG_COLORMAP; - in_base = in_format & BASE_FORMATS; - out_format &= BASE_FORMATS | PNG_FORMAT_FLAG_COLORMAP; - out_base = out_format & BASE_FORMATS; - - if (via_linear) - { - /* Check for an error in this program: */ - if (out_format & (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLORMAP)) - { - fprintf(stderr, "internal transform via linear error 0x%x->0x%x\n", - in_format, out_format); - exit(1); - } - - result->transform = gpc_fn[in_base][out_base | PNG_FORMAT_FLAG_LINEAR]; - result->from_linear = gpc_fn[out_base | PNG_FORMAT_FLAG_LINEAR][out_base]; - result->error_ptr = gpc_error_via_linear[in_format][out_format]; - } - - else if (~in_format & out_format & PNG_FORMAT_FLAG_COLORMAP) - { - /* The input is not colormapped but the output is, the errors will - * typically be large (only the grayscale-no-alpha case permits preserving - * even 8-bit values.) - */ - result->transform = gpc_fn[in_base][out_base]; - result->from_linear = NULL; - result->error_ptr = gpc_error_to_colormap[in_base][out_base]; - } - - else - { - /* The caller handles the colormap->pixel value conversion, so the - * transform function just gets a pixel value, however because libpng - * currently contains a different implementation for mapping a colormap if - * both input and output are colormapped we need different conversion - * functions to deal with errors in the libpng implementation. - */ - if (in_format & out_format & PNG_FORMAT_FLAG_COLORMAP) - result->transform = gpc_fn_colormapped[in_base][out_base]; - else - result->transform = gpc_fn[in_base][out_base]; - result->from_linear = NULL; - result->error_ptr = gpc_error[in_format][out_format]; - } - - /* Follow the libpng simplified API rules to work out what to pass to the gpc - * routines as a background value, if one is not required pass NULL so that - * this program crashes in the even of a programming error. - */ - result->background = NULL; /* default: not required */ - - /* Rule 1: background only need be supplied if alpha is to be removed */ - if (in_format & ~out_format & PNG_FORMAT_FLAG_ALPHA) - { - /* The input value is 'NULL' to use the background and (otherwise) an sRGB - * background color (to use a solid color). The code above uses a fixed - * byte value, BUFFER_INIT8, for buffer even for 16-bit output. For - * linear (16-bit) output the sRGB background color is ignored; the - * composition is always on the background (so BUFFER_INIT8 * 257), except - * that for the colormap (i.e. linear colormapped output) black is used. - */ - result->background = &result->background_color; - - if (out_format & PNG_FORMAT_FLAG_LINEAR || via_linear) - { - if (out_format & PNG_FORMAT_FLAG_COLORMAP) - { - result->background_color.ir = - result->background_color.ig = - result->background_color.ib = 0; - result->background_color.dr = - result->background_color.dg = - result->background_color.db = 0; - } - - else - { - result->background_color.ir = - result->background_color.ig = - result->background_color.ib = BUFFER_INIT8 * 257; - result->background_color.dr = - result->background_color.dg = - result->background_color.db = 0; - } - } - - else /* sRGB output */ - { - if (background != NULL) - { - if (out_format & PNG_FORMAT_FLAG_COLOR) - { - result->background_color.ir = background->red; - result->background_color.ig = background->green; - result->background_color.ib = background->blue; - /* TODO: sometimes libpng uses the power law conversion here, how - * to handle this? - */ - result->background_color.dr = sRGB_to_d[background->red]; - result->background_color.dg = sRGB_to_d[background->green]; - result->background_color.db = sRGB_to_d[background->blue]; - } - - else /* grayscale: libpng only looks at 'g' */ - { - result->background_color.ir = - result->background_color.ig = - result->background_color.ib = background->green; - /* TODO: sometimes libpng uses the power law conversion here, how - * to handle this? - */ - result->background_color.dr = - result->background_color.dg = - result->background_color.db = sRGB_to_d[background->green]; - } - } - - else if ((out_format & PNG_FORMAT_FLAG_COLORMAP) == 0) - { - result->background_color.ir = - result->background_color.ig = - result->background_color.ib = BUFFER_INIT8; - /* TODO: sometimes libpng uses the power law conversion here, how - * to handle this? - */ - result->background_color.dr = - result->background_color.dg = - result->background_color.db = sRGB_to_d[BUFFER_INIT8]; - } - - /* Else the output is colormapped and a background color must be - * provided; if pngstest crashes then that is a bug in this program - * (though libpng should png_error as well.) - */ - else - result->background = NULL; - } - } - - if (result->background == NULL) - { - result->background_color.ir = - result->background_color.ig = - result->background_color.ib = -1; /* not used */ - result->background_color.dr = - result->background_color.dg = - result->background_color.db = 1E30; /* not used */ - } - - - /* Copy the error values into the Transform: */ - result->error[0] = result->error_ptr[0]; - result->error[1] = result->error_ptr[1]; - result->error[2] = result->error_ptr[2]; - result->error[3] = result->error_ptr[3]; -} - - -/* Compare two pixels. - * - * OLD error values: -static int error_to_linear = 811; * by experiment * -static int error_to_linear_grayscale = 424; * by experiment * -static int error_to_sRGB = 6; * by experiment * -static int error_to_sRGB_grayscale = 17; * libpng error by calculation + - 2 by experiment * -static int error_in_compose = 2; * by experiment * -static int error_in_premultiply = 1; - * - * The following is *just* the result of a round trip from 8-bit sRGB to linear - * then back to 8-bit sRGB when it is done by libpng. There are two problems: - * - * 1) libpng currently uses a 2.2 power law with no linear segment, this results - * in instability in the low values and even with 16-bit precision sRGB(1) ends - * up mapping to sRGB(0) as a result of rounding in the 16-bit representation. - * This gives an error of 1 in the handling of value 1 only. - * - * 2) libpng currently uses an intermediate 8-bit linear value in gamma - * correction of 8-bit values. This results in many more errors, the worse of - * which is mapping sRGB(14) to sRGB(0). - * - * The general 'error_via_linear' is more complex because of pre-multiplication, - * this compounds the 8-bit errors according to the alpha value of the pixel. - * As a result 256 values are pre-calculated for error_via_linear. - */ -#if 0 -static int error_in_libpng_gamma; -static int error_via_linear[256]; /* Indexed by 8-bit alpha */ - -static void -init_error_via_linear(void) -{ - int alpha; - - error_via_linear[0] = 255; /* transparent pixel */ - - for (alpha=1; alpha<=255; ++alpha) - { - /* 16-bit values less than 128.5 get rounded to 8-bit 0 and so the worst - * case error arises with 16-bit 128.5, work out what sRGB - * (non-associated) value generates 128.5; any value less than this is - * going to map to 0, so the worst error is floor(value). - * - * Note that errors are considerably higher (more than a factor of 2) - * because libpng uses a simple power law for sRGB data at present. - * - * Add .1 for arithmetic errors inside libpng. - */ - double v = floor(255*pow(.5/*(128.5 * 255 / 65535)*/ / alpha, 1/2.2)+.1); - - error_via_linear[alpha] = (int)v; - } - - /* This is actually 14.99, but, despite the closeness to 15, 14 seems to work - * ok in this case. - */ - error_in_libpng_gamma = 14; -} -#endif - -static void -print_pixel(char string[64], const Pixel *pixel, png_uint_32 format) -{ - switch (format & (PNG_FORMAT_FLAG_ALPHA|PNG_FORMAT_FLAG_COLOR)) - { - case 0: - sprintf(string, "%s(%d)", format_names[format], pixel->g); - break; - - case PNG_FORMAT_FLAG_ALPHA: - sprintf(string, "%s(%d,%d)", format_names[format], pixel->g, - pixel->a); - break; - - case PNG_FORMAT_FLAG_COLOR: - sprintf(string, "%s(%d,%d,%d)", format_names[format], - pixel->r, pixel->g, pixel->b); - break; - - case PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA: - sprintf(string, "%s(%d,%d,%d,%d)", format_names[format], - pixel->r, pixel->g, pixel->b, pixel->a); - break; - - default: - sprintf(string, "invalid-format"); - break; - } -} - -static int -logpixel(const Transform *transform, png_uint_32 x, png_uint_32 y, - const Pixel *in, const Pixel *calc, const Pixel *out, const char *reason) -{ - png_uint_32 in_format = transform->in_image->image.format; - png_uint_32 out_format = transform->out_image->image.format; - - png_uint_32 back_format = out_format & ~PNG_FORMAT_FLAG_ALPHA; - const char *via_linear = ""; - - char pixel_in[64], pixel_calc[64], pixel_out[64], pixel_loc[64]; - char background_info[100]; - - print_pixel(pixel_in, in, in_format); - print_pixel(pixel_calc, calc, out_format); - print_pixel(pixel_out, out, out_format); - - if (transform->is_palette) - sprintf(pixel_loc, "palette: %lu", (unsigned long)y); - else - sprintf(pixel_loc, "%lu,%lu", (unsigned long)x, (unsigned long)y); - - if (transform->from_linear != NULL) - { - via_linear = " (via linear)"; - /* And as a result the *read* format which did any background processing - * was itself linear, so the background color information is also - * linear. - */ - back_format |= PNG_FORMAT_FLAG_LINEAR; - } - - if (transform->background != NULL) - { - Pixel back; - char pixel_back[64]; - - back.r = transform->background->ir; - back.g = transform->background->ig; - back.b = transform->background->ib; - back.a = -1; /* not used */ - - print_pixel(pixel_back, &back, back_format); - sprintf(background_info, " on background %s", pixel_back); - } - - else - background_info[0] = 0; - - if (transform->in_image->file_name != transform->out_image->file_name) - { - char error_buffer[512]; - sprintf(error_buffer, - "(%s) %s error%s:\n %s%s ->\n %s\n not: %s.\n" - "Use --preserve and examine: ", pixel_loc, reason, via_linear, - pixel_in, background_info, pixel_out, pixel_calc); - return logerror(transform->in_image, transform->in_image->file_name, - error_buffer, transform->out_image->file_name); - } - - else - { - char error_buffer[512]; - sprintf(error_buffer, - "(%s) %s error%s:\n %s%s ->\n %s\n not: %s.\n" - " The error happened when reading the original file with this format.", - pixel_loc, reason, via_linear, pixel_in, background_info, pixel_out, - pixel_calc); - return logerror(transform->in_image, transform->in_image->file_name, - error_buffer, ""); - } -} - -static int -cmppixel(Transform *transform, png_const_voidp in, png_const_voidp out, - png_uint_32 x, png_uint_32 y/*or palette index*/) -{ - int maxerr; - png_const_charp errmsg; - Pixel pixel_in, pixel_calc, pixel_out; - - transform->in_gp(&pixel_in, in); - - if (transform->from_linear == NULL) - transform->transform(&pixel_calc, &pixel_in, transform->background); - - else - { - transform->transform(&pixel_out, &pixel_in, transform->background); - transform->from_linear(&pixel_calc, &pixel_out, NULL); - } - - transform->out_gp(&pixel_out, out); - - /* Eliminate the case where the input and output values match exactly. */ - if (pixel_calc.a == pixel_out.a && pixel_calc.r == pixel_out.r && - pixel_calc.g == pixel_out.g && pixel_calc.b == pixel_out.b) - return 1; - - /* Eliminate the case where the output pixel is transparent and the output - * is 8-bit - any component values are valid. Don't check the input alpha - * here to also skip the 16-bit small alpha cases. - */ - if (transform->output_8bit && pixel_calc.a == 0 && pixel_out.a == 0) - return 1; - - /* Check for alpha errors first; an alpha error can damage the components too - * so avoid spurious checks on components if one is found. - */ - errmsg = NULL; - { - int err_a = abs(pixel_calc.a-pixel_out.a); - - if (err_a > transform->error[3]) - { - /* If accumulating check the components too */ - if (transform->accumulate) - transform->error[3] = (png_uint_16)err_a; - - else - errmsg = "alpha"; - } - } - - /* Now if *either* of the output alphas are 0 but alpha is within tolerance - * eliminate the 8-bit component comparison. - */ - if (errmsg == NULL && transform->output_8bit && - (pixel_calc.a == 0 || pixel_out.a == 0)) - return 1; - - if (errmsg == NULL) /* else just signal an alpha error */ - { - int err_r = abs(pixel_calc.r - pixel_out.r); - int err_g = abs(pixel_calc.g - pixel_out.g); - int err_b = abs(pixel_calc.b - pixel_out.b); - int limit; - - if ((err_r | err_g | err_b) == 0) - return 1; /* exact match */ - - /* Mismatch on a component, check the input alpha */ - if (pixel_in.a >= transform->in_opaque) - { - errmsg = "opaque component"; - limit = 2; /* opaque */ - } - - else if (pixel_in.a > 0) - { - errmsg = "alpha component"; - limit = 1; /* partially transparent */ - } - - else - { - errmsg = "transparent component (background)"; - limit = 0; /* transparent */ - } - - maxerr = err_r; - if (maxerr < err_g) maxerr = err_g; - if (maxerr < err_b) maxerr = err_b; - - if (maxerr <= transform->error[limit]) - return 1; /* within the error limits */ - - /* Handle a component mis-match; log it, just return an error code, or - * accumulate it. - */ - if (transform->accumulate) - { - transform->error[limit] = (png_uint_16)maxerr; - return 1; /* to cause the caller to keep going */ - } - } - - /* Failure to match and not accumulating, so the error must be logged. */ - return logpixel(transform, x, y, &pixel_in, &pixel_calc, &pixel_out, errmsg); -} - -static png_byte -component_loc(png_byte loc[4], png_uint_32 format) -{ - /* Given a format return the number of channels and the location of - * each channel. - * - * The mask 'loc' contains the component offset of the channels in the - * following order. Note that if 'format' is grayscale the entries 1-3 must - * all contain the location of the gray channel. - * - * 0: alpha - * 1: red or gray - * 2: green or gray - * 3: blue or gray - */ - png_byte channels; - - if (format & PNG_FORMAT_FLAG_COLOR) - { - channels = 3; - - loc[2] = 1; - -# ifdef PNG_FORMAT_BGR_SUPPORTED - if (format & PNG_FORMAT_FLAG_BGR) - { - loc[1] = 2; - loc[3] = 0; - } - - else -# endif - { - loc[1] = 0; - loc[3] = 2; - } - } - - else - { - channels = 1; - loc[1] = loc[2] = loc[3] = 0; - } - - if (format & PNG_FORMAT_FLAG_ALPHA) - { -# ifdef PNG_FORMAT_AFIRST_SUPPORTED - if (format & PNG_FORMAT_FLAG_AFIRST) - { - loc[0] = 0; - ++loc[1]; - ++loc[2]; - ++loc[3]; - } - - else -# endif - loc[0] = channels; - - ++channels; - } - - else - loc[0] = 4; /* not present */ - - return channels; -} - -/* Compare two images, the original 'a', which was written out then read back in - * to * give image 'b'. The formats may have been changed. - */ -static int -compare_two_images(Image *a, Image *b, int via_linear, - png_const_colorp background) -{ - ptrdiff_t stridea = a->stride; - ptrdiff_t strideb = b->stride; - png_const_bytep rowa = a->buffer+16; - png_const_bytep rowb = b->buffer+16; - png_uint_32 width = a->image.width; - png_uint_32 height = a->image.height; - png_uint_32 formata = a->image.format; - png_uint_32 formatb = b->image.format; - unsigned int a_sample = PNG_IMAGE_SAMPLE_SIZE(formata); - unsigned int b_sample = PNG_IMAGE_SAMPLE_SIZE(formatb); - int alpha_added, alpha_removed; - int bchannels; - png_uint_32 y; - Transform tr; - int btoa[4]={0,0,0,0}; - - /* This should never happen: */ - if (width != b->image.width || height != b->image.height) - return logerror(a, a->file_name, ": width x height changed: ", - b->file_name); - - /* Set up the background and the transform */ - transform_from_formats(&tr, a, b, background, via_linear); - - /* Find the first row and inter-row space. */ - if (!(formata & PNG_FORMAT_FLAG_COLORMAP) && - (formata & PNG_FORMAT_FLAG_LINEAR)) - stridea *= 2; - - if (!(formatb & PNG_FORMAT_FLAG_COLORMAP) && - (formatb & PNG_FORMAT_FLAG_LINEAR)) - strideb *= 2; - - if (stridea < 0) rowa += (height-1) * (-stridea); - if (strideb < 0) rowb += (height-1) * (-strideb); - - /* First shortcut the two colormap case by comparing the image data; if it - * matches then we expect the colormaps to match, although this is not - * absolutely necessary for an image match. If the colormaps fail to match - * then there is a problem in libpng. - */ - if (formata & formatb & PNG_FORMAT_FLAG_COLORMAP) - { - /* Only check colormap entries that actually exist; */ - png_const_bytep ppa, ppb; - int match; - png_byte in_use[256], amax = 0, bmax = 0; - - memset(in_use, 0, sizeof in_use); - - ppa = rowa; - ppb = rowb; - - /* Do this the slow way to accumulate the 'in_use' flags, don't break out - * of the loop until the end; this validates the color-mapped data to - * ensure all pixels are valid color-map indexes. - */ - for (y=0, match=1; y bmax) - bmax = bval; - - if (bval != aval) - match = 0; - - in_use[aval] = 1; - if (aval > amax) - amax = aval; - } - } - - /* If the buffers match then the colormaps must too. */ - if (match) - { - /* Do the color-maps match, entry by entry? Only check the 'in_use' - * entries. An error here should be logged as a color-map error. - */ - png_const_bytep a_cmap = (png_const_bytep)a->colormap; - png_const_bytep b_cmap = (png_const_bytep)b->colormap; - int result = 1; /* match by default */ - - /* This is used in logpixel to get the error message correct. */ - tr.is_palette = 1; - - for (y=0; y<256; ++y, a_cmap += a_sample, b_cmap += b_sample) - if (in_use[y]) - { - /* The colormap entries should be valid, but because libpng doesn't - * do any checking at present the original image may contain invalid - * pixel values. These cause an error here (at present) unless - * accumulating errors in which case the program just ignores them. - */ - if (y >= a->image.colormap_entries) - { - if ((a->opts & ACCUMULATE) == 0) - { - char pindex[9]; - sprintf(pindex, "%lu[%lu]", (unsigned long)y, - (unsigned long)a->image.colormap_entries); - logerror(a, a->file_name, ": bad pixel index: ", pindex); - } - result = 0; - } - - else if (y >= b->image.colormap_entries) - { - if ((b->opts & ACCUMULATE) == 0) - { - char pindex[9]; - sprintf(pindex, "%lu[%lu]", (unsigned long)y, - (unsigned long)b->image.colormap_entries); - logerror(b, b->file_name, ": bad pixel index: ", pindex); - } - result = 0; - } - - /* All the mismatches are logged here; there can only be 256! */ - else if (!cmppixel(&tr, a_cmap, b_cmap, 0, y)) - result = 0; - } - - /* If requested, copy the error values back from the Transform. */ - if (a->opts & ACCUMULATE) - { - tr.error_ptr[0] = tr.error[0]; - tr.error_ptr[1] = tr.error[1]; - tr.error_ptr[2] = tr.error[2]; - tr.error_ptr[3] = tr.error[3]; - result = 1; /* force a continue */ - } - - return result; - } - - /* else the image buffers don't match pixel-wise so compare sample values - * instead, but first validate that the pixel indexes are in range (but - * only if not accumulating, when the error is ignored.) - */ - else if ((a->opts & ACCUMULATE) == 0) - { -# ifdef __GNUC__ -# define BYTE_CHARS 20 /* 2^32: GCC sprintf warning */ -# else -# define BYTE_CHARS 3 /* 2^8: real maximum value */ -# endif - /* Check the original image first, - * TODO: deal with input images with bad pixel values? - */ - if (amax >= a->image.colormap_entries) - { - char pindex[3+2*BYTE_CHARS]; - sprintf(pindex, "%d[%u]", amax, - (png_byte)/*SAFE*/a->image.colormap_entries); - return logerror(a, a->file_name, ": bad pixel index: ", pindex); - } - - else if (bmax >= b->image.colormap_entries) - { - char pindex[3+2*BYTE_CHARS]; - sprintf(pindex, "%d[%u]", bmax, - (png_byte)/*SAFE*/b->image.colormap_entries); - return logerror(b, b->file_name, ": bad pixel index: ", pindex); - } - } - } - - /* We can directly compare pixel values without the need to use the read - * or transform support (i.e. a memory compare) if: - * - * 1) The bit depth has not changed. - * 2) RGB to grayscale has not been done (the reverse is ok; we just compare - * the three RGB values to the original grayscale.) - * 3) An alpha channel has not been removed from an 8-bit format, or the - * 8-bit alpha value of the pixel was 255 (opaque). - * - * If an alpha channel has been *added* then it must have the relevant opaque - * value (255 or 65535). - * - * The fist two the tests (in the order given above) (using the boolean - * equivalence !a && !b == !(a || b)) - */ - if (!(((formata ^ formatb) & PNG_FORMAT_FLAG_LINEAR) | - (formata & (formatb ^ PNG_FORMAT_FLAG_COLOR) & PNG_FORMAT_FLAG_COLOR))) - { - /* Was an alpha channel changed? */ - png_uint_32 alpha_changed = (formata ^ formatb) & PNG_FORMAT_FLAG_ALPHA; - - /* Was an alpha channel removed? (The third test.) If so the direct - * comparison is only possible if the input alpha is opaque. - */ - alpha_removed = (formata & alpha_changed) != 0; - - /* Was an alpha channel added? */ - alpha_added = (formatb & alpha_changed) != 0; - - /* The channels may have been moved between input and output, this finds - * out how, recording the result in the btoa array, which says where in - * 'a' to find each channel of 'b'. If alpha was added then btoa[alpha] - * ends up as 4 (and is not used.) - */ - { - int i; - png_byte aloc[4]; - png_byte bloc[4]; - - /* The following are used only if the formats match, except that - * 'bchannels' is a flag for matching formats. btoa[x] says, for each - * channel in b, where to find the corresponding value in a, for the - * bchannels. achannels may be different for a gray to rgb transform - * (a will be 1 or 2, b will be 3 or 4 channels.) - */ - (void)component_loc(aloc, formata); - bchannels = component_loc(bloc, formatb); - - /* Hence the btoa array. */ - for (i=0; i<4; ++i) if (bloc[i] < 4) - btoa[bloc[i]] = aloc[i]; /* may be '4' for alpha */ - - if (alpha_added) - alpha_added = bloc[0]; /* location of alpha channel in image b */ - - else - alpha_added = 4; /* Won't match an image b channel */ - - if (alpha_removed) - alpha_removed = aloc[0]; /* location of alpha channel in image a */ - - else - alpha_removed = 4; - } - } - - else - { - /* Direct compare is not possible, cancel out all the corresponding local - * variables. - */ - bchannels = 0; - alpha_removed = alpha_added = 4; - btoa[3] = btoa[2] = btoa[1] = btoa[0] = 4; /* 4 == not present */ - } - - for (y=0; ycolormap + a_sample * *ppa++; - else - psa = ppa, ppa += a_sample; - - if (formatb & PNG_FORMAT_FLAG_COLORMAP) - psb = (png_const_bytep)b->colormap + b_sample * *ppb++; - else - psb = ppb, ppb += b_sample; - - /* Do the fast test if possible. */ - if (bchannels) - { - /* Check each 'b' channel against either the corresponding 'a' - * channel or the opaque alpha value, as appropriate. If - * alpha_removed value is set (not 4) then also do this only if the - * 'a' alpha channel (alpha_removed) is opaque; only relevant for - * the 8-bit case. - */ - if (formatb & PNG_FORMAT_FLAG_LINEAR) /* 16-bit checks */ - { - png_const_uint_16p pua = aligncastconst(png_const_uint_16p, psa); - png_const_uint_16p pub = aligncastconst(png_const_uint_16p, psb); - - switch (bchannels) - { - case 4: - if (pua[btoa[3]] != pub[3]) break; - /* FALLTHROUGH */ - case 3: - if (pua[btoa[2]] != pub[2]) break; - /* FALLTHROUGH */ - case 2: - if (pua[btoa[1]] != pub[1]) break; - /* FALLTHROUGH */ - case 1: - if (pua[btoa[0]] != pub[0]) break; - if (alpha_added != 4 && pub[alpha_added] != 65535) break; - continue; /* x loop */ - default: - break; /* impossible */ - } - } - - else if (alpha_removed == 4 || psa[alpha_removed] == 255) - { - switch (bchannels) - { - case 4: - if (psa[btoa[3]] != psb[3]) break; - /* FALLTHROUGH */ - case 3: - if (psa[btoa[2]] != psb[2]) break; - /* FALLTHROUGH */ - case 2: - if (psa[btoa[1]] != psb[1]) break; - /* FALLTHROUGH */ - case 1: - if (psa[btoa[0]] != psb[0]) break; - if (alpha_added != 4 && psb[alpha_added] != 255) break; - continue; /* x loop */ - default: - break; /* impossible */ - } - } - } - - /* If we get to here the fast match failed; do the slow match for this - * pixel. - */ - if (!cmppixel(&tr, psa, psb, x, y) && (a->opts & KEEP_GOING) == 0) - return 0; /* error case */ - } - } - - /* If requested, copy the error values back from the Transform. */ - if (a->opts & ACCUMULATE) - { - tr.error_ptr[0] = tr.error[0]; - tr.error_ptr[1] = tr.error[1]; - tr.error_ptr[2] = tr.error[2]; - tr.error_ptr[3] = tr.error[3]; - } - - return 1; -} - -/* Read the file; how the read gets done depends on which of input_file and - * input_memory have been set. - */ -static int -read_file(Image *image, png_uint_32 format, png_const_colorp background) -{ - memset(&image->image, 0, sizeof image->image); - image->image.version = PNG_IMAGE_VERSION; - - if (image->input_memory != NULL) - { - if (!png_image_begin_read_from_memory(&image->image, image->input_memory, - image->input_memory_size)) - return logerror(image, "memory init: ", image->file_name, ""); - } - -# ifdef PNG_STDIO_SUPPORTED - else if (image->input_file != NULL) - { - if (!png_image_begin_read_from_stdio(&image->image, image->input_file)) - return logerror(image, "stdio init: ", image->file_name, ""); - } - - else - { - if (!png_image_begin_read_from_file(&image->image, image->file_name)) - return logerror(image, "file init: ", image->file_name, ""); - } -# else - else - { - return logerror(image, "unsupported file/stdio init: ", - image->file_name, ""); - } -# endif - - /* This must be set after the begin_read call: */ - if (image->opts & sRGB_16BIT) - image->image.flags |= PNG_IMAGE_FLAG_16BIT_sRGB; - - /* Have an initialized image with all the data we need plus, maybe, an - * allocated file (myfile) or buffer (mybuffer) that need to be freed. - */ - { - int result; - png_uint_32 image_format; - - /* Print both original and output formats. */ - image_format = image->image.format; - - if (image->opts & VERBOSE) - { - printf("%s %lu x %lu %s -> %s", image->file_name, - (unsigned long)image->image.width, - (unsigned long)image->image.height, - format_names[image_format & FORMAT_MASK], - (format & FORMAT_NO_CHANGE) != 0 || image->image.format == format - ? "no change" : format_names[format & FORMAT_MASK]); - - if (background != NULL) - printf(" background(%d,%d,%d)\n", background->red, - background->green, background->blue); - else - printf("\n"); - - fflush(stdout); - } - - /* 'NO_CHANGE' combined with the color-map flag forces the base format - * flags to be set on read to ensure that the original representation is - * not lost in the pass through a colormap format. - */ - if ((format & FORMAT_NO_CHANGE) != 0) - { - if ((format & PNG_FORMAT_FLAG_COLORMAP) != 0 && - (image_format & PNG_FORMAT_FLAG_COLORMAP) != 0) - format = (image_format & ~BASE_FORMATS) | (format & BASE_FORMATS); - - else - format = image_format; - } - - image->image.format = format; - - image->stride = PNG_IMAGE_ROW_STRIDE(image->image) + image->stride_extra; - allocbuffer(image); - - result = png_image_finish_read(&image->image, background, - image->buffer+16, (png_int_32)image->stride, image->colormap); - - checkbuffer(image, image->file_name); - - if (result) - return checkopaque(image); - - else - return logerror(image, image->file_name, ": image read failed", ""); - } -} - -/* Reads from a filename, which must be in image->file_name, but uses - * image->opts to choose the method. The file is always read in its native - * format (the one the simplified API suggests). - */ -static int -read_one_file(Image *image) -{ - if (!(image->opts & USE_FILE) || (image->opts & USE_STDIO)) - { - /* memory or stdio. */ - FILE *f = fopen(image->file_name, "rb"); - - if (f != NULL) - { - if (image->opts & USE_FILE) - image->input_file = f; - - else /* memory */ - { - if (fseek(f, 0, SEEK_END) == 0) - { - long int cb = ftell(f); - - if (cb > 0) - { -#ifndef __COVERITY__ - if ((unsigned long int)cb <= (size_t)~(size_t)0) -#endif - { - png_bytep b = voidcast(png_bytep, malloc((size_t)cb)); - - if (b != NULL) - { - rewind(f); - - if (fread(b, (size_t)cb, 1, f) == 1) - { - fclose(f); - image->input_memory_size = cb; - image->input_memory = b; - } - - else - { - free(b); - return logclose(image, f, image->file_name, - ": read failed: "); - } - } - - else - return logclose(image, f, image->file_name, - ": out of memory: "); - } - - else - return logclose(image, f, image->file_name, - ": file too big for this architecture: "); - /* cb is the length of the file as a (long) and - * this is greater than the maximum amount of - * memory that can be requested from malloc. - */ - } - - else if (cb == 0) - return logclose(image, f, image->file_name, - ": zero length: "); - - else - return logclose(image, f, image->file_name, - ": tell failed: "); - } - - else - return logclose(image, f, image->file_name, ": seek failed: "); - } - } - - else - return logerror(image, image->file_name, ": open failed: ", - strerror(errno)); - } - - return read_file(image, FORMAT_NO_CHANGE, NULL); -} - -#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED -static int -write_one_file(Image *output, Image *image, int convert_to_8bit) -{ - if (image->opts & FAST_WRITE) - image->image.flags |= PNG_IMAGE_FLAG_FAST; - - if (image->opts & USE_STDIO) - { -#ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED -#ifndef __COVERITY__ - FILE *f = tmpfile(); -#else - /* Experimental. Coverity says tmpfile() is insecure because it - * generates predictable names. - * - * It is possible to satisfy Coverity by using mkstemp(); however, - * any platform supporting mkstemp() undoubtedly has a secure tmpfile() - * implementation as well, and doesn't need the fix. Note that - * the fix won't work on platforms that don't support mkstemp(). - * - * https://www.securecoding.cert.org/confluence/display/c/ - * FIO21-C.+Do+not+create+temporary+files+in+shared+directories - * says that most historic implementations of tmpfile() provide - * only a limited number of possible temporary file names - * (usually 26) before file names are recycled. That article also - * provides a secure solution that unfortunately depends upon mkstemp(). - */ - char tmpfile[] = "pngstest-XXXXXX"; - int filedes; - FILE *f; - umask(0177); - filedes = mkstemp(tmpfile); - if (filedes < 0) - f = NULL; - else - { - f = fdopen(filedes,"w+"); - /* Hide the filename immediately and ensure that the file does - * not exist after the program ends - */ - (void) unlink(tmpfile); - } -#endif - - if (f != NULL) - { - if (png_image_write_to_stdio(&image->image, f, convert_to_8bit, - image->buffer+16, (png_int_32)image->stride, image->colormap)) - { - if (fflush(f) == 0) - { - rewind(f); - initimage(output, image->opts, "tmpfile", image->stride_extra); - output->input_file = f; - if (!checkopaque(image)) - return 0; - } - - else - return logclose(image, f, "tmpfile", ": flush: "); - } - - else - { - fclose(f); - return logerror(image, "tmpfile", ": write failed", ""); - } - } - - else - return logerror(image, "tmpfile", ": open: ", strerror(errno)); -#else /* SIMPLIFIED_WRITE_STDIO */ - return logerror(image, "tmpfile", ": open: unsupported", ""); -#endif /* SIMPLIFIED_WRITE_STDIO */ - } - - else if (image->opts & USE_FILE) - { -#ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED - static int counter = 0; - char name[32]; - - sprintf(name, "%s%d.png", tmpf, ++counter); - - if (png_image_write_to_file(&image->image, name, convert_to_8bit, - image->buffer+16, (png_int_32)image->stride, image->colormap)) - { - initimage(output, image->opts, output->tmpfile_name, - image->stride_extra); - /* Afterwards, or freeimage will delete it! */ - strcpy(output->tmpfile_name, name); - - if (!checkopaque(image)) - return 0; - } - - else - return logerror(image, name, ": write failed", ""); -#else /* SIMPLIFIED_WRITE_STDIO */ - return logerror(image, "stdio", ": open: unsupported", ""); -#endif /* SIMPLIFIED_WRITE_STDIO */ - } - - else /* use memory */ - { - png_alloc_size_t size; - - if (png_image_write_get_memory_size(image->image, size, convert_to_8bit, - image->buffer+16, (png_int_32)image->stride, image->colormap)) - { - /* This is non-fatal but ignoring it was causing serious problems in - * the macro to be ignored: - */ - if (size > PNG_IMAGE_PNG_SIZE_MAX(image->image)) - return logerror(image, "memory", ": PNG_IMAGE_SIZE_MAX wrong", ""); - - initimage(output, image->opts, "memory", image->stride_extra); - output->input_memory = malloc(size); - - if (output->input_memory != NULL) - { - output->input_memory_size = size; - - if (png_image_write_to_memory(&image->image, output->input_memory, - &output->input_memory_size, convert_to_8bit, image->buffer+16, - (png_int_32)image->stride, image->colormap)) - { - /* This is also non-fatal but it safes safer to error out anyway: - */ - if (size != output->input_memory_size) - return logerror(image, "memory", ": memory size wrong", ""); - } - - else - return logerror(image, "memory", ": write failed", ""); - } - - else - return logerror(image, "memory", ": out of memory", ""); - } - - else - return logerror(image, "memory", ": get size:", ""); - } - - /* 'output' has an initialized temporary image, read this back in and compare - * this against the original: there should be no change since the original - * format was written unmodified unless 'convert_to_8bit' was specified. - * However, if the original image was color-mapped, a simple read will zap - * the linear, color and maybe alpha flags, this will cause spurious failures - * under some circumstances. - */ - if (read_file(output, image->image.format | FORMAT_NO_CHANGE, NULL)) - { - png_uint_32 original_format = image->image.format; - - if (convert_to_8bit) - original_format &= ~PNG_FORMAT_FLAG_LINEAR; - - if ((output->image.format & BASE_FORMATS) != - (original_format & BASE_FORMATS)) - return logerror(image, image->file_name, ": format changed on read: ", - output->file_name); - - return compare_two_images(image, output, 0/*via linear*/, NULL); - } - - else - return logerror(output, output->tmpfile_name, - ": read of new file failed", ""); -} -#endif - -static int -testimage(Image *image, png_uint_32 opts, format_list *pf) -{ - int result; - Image copy; - - /* Copy the original data, stealing it from 'image' */ - checkopaque(image); - copy = *image; - - copy.opts = opts; - copy.buffer = NULL; - copy.bufsize = 0; - copy.allocsize = 0; - - image->input_file = NULL; - image->input_memory = NULL; - image->input_memory_size = 0; - image->tmpfile_name[0] = 0; - - { - png_uint_32 counter; - Image output; - - newimage(&output); - - result = 1; - - /* Use the low bit of 'counter' to indicate whether or not to do alpha - * removal with a background color or by composting onto the image; this - * step gets skipped if it isn't relevant - */ - for (counter=0; counter<2*FORMAT_COUNT; ++counter) - if (format_isset(pf, counter >> 1)) - { - png_uint_32 format = counter >> 1; - - png_color background_color; - png_colorp background = NULL; - - /* If there is a format change that removes the alpha channel then - * the background is relevant. If the output is 8-bit color-mapped - * then a background color *must* be provided, otherwise there are - * two tests to do - one with a color, the other with NULL. The - * NULL test happens second. - */ - if ((counter & 1) == 0) - { - if ((format & PNG_FORMAT_FLAG_ALPHA) == 0 && - (image->image.format & PNG_FORMAT_FLAG_ALPHA) != 0) - { - /* Alpha/transparency will be removed, the background is - * relevant: make it a color the first time - */ - random_color(&background_color); - background = &background_color; - - /* BUT if the output is to a color-mapped 8-bit format then - * the background must always be a color, so increment 'counter' - * to skip the NULL test. - */ - if ((format & PNG_FORMAT_FLAG_COLORMAP) != 0 && - (format & PNG_FORMAT_FLAG_LINEAR) == 0) - ++counter; - } - - /* Otherwise an alpha channel is not being eliminated, just leave - * background NULL and skip the (counter & 1) NULL test. - */ - else - ++counter; - } - /* else just use NULL for background */ - - resetimage(©); - copy.opts = opts; /* in case read_file needs to change it */ - - result = read_file(©, format, background); - if (!result) - break; - - /* Make sure the file just read matches the original file. */ - result = compare_two_images(image, ©, 0/*via linear*/, background); - if (!result) - break; - -# ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED - /* Write the *copy* just made to a new file to make sure the write - * side works ok. Check the conversion to sRGB if the copy is - * linear. - */ - output.opts = opts; - result = write_one_file(&output, ©, 0/*convert to 8bit*/); - if (!result) - break; - - /* Validate against the original too; the background is needed here - * as well so that compare_two_images knows what color was used. - */ - result = compare_two_images(image, &output, 0, background); - if (!result) - break; - - if ((format & PNG_FORMAT_FLAG_LINEAR) != 0 && - (format & PNG_FORMAT_FLAG_COLORMAP) == 0) - { - /* 'output' is linear, convert to the corresponding sRGB format. - */ - output.opts = opts; - result = write_one_file(&output, ©, 1/*convert to 8bit*/); - if (!result) - break; - - /* This may involve a conversion via linear; in the ideal world - * this would round-trip correctly, but libpng 1.5.7 is not the - * ideal world so allow a drift (error_via_linear). - * - * 'image' has an alpha channel but 'output' does not then there - * will a strip-alpha-channel operation (because 'output' is - * linear), handle this by composing on black when doing the - * comparison. - */ - result = compare_two_images(image, &output, 1/*via_linear*/, - background); - if (!result) - break; - } -# endif /* PNG_SIMPLIFIED_WRITE_SUPPORTED */ - } - - freeimage(&output); - } - - freeimage(©); - - return result; -} - -static int -test_one_file(const char *file_name, format_list *formats, png_uint_32 opts, - int stride_extra, int log_pass) -{ - int result; - Image image; - - if (!(opts & NO_RESEED)) - reseed(); /* ensure that the random numbers don't depend on file order */ - newimage(&image); - initimage(&image, opts, file_name, stride_extra); - result = read_one_file(&image); - if (result) - result = testimage(&image, opts, formats); - freeimage(&image); - - /* Ensure that stderr is flushed into any log file */ - fflush(stderr); - - if (log_pass) - { - if (result) - printf("PASS:"); - - else - printf("FAIL:"); - -# ifndef PNG_SIMPLIFIED_WRITE_SUPPORTED - printf(" (no write)"); -# endif - - print_opts(opts); - printf(" %s\n", file_name); - /* stdout may not be line-buffered if it is piped to a file, so: */ - fflush(stdout); - } - - else if (!result) - exit(1); - - return result; -} - -int -main(int argc, char **argv) -{ - png_uint_32 opts = FAST_WRITE | STRICT; - format_list formats; - const char *touch = NULL; - int log_pass = 0; - int redundant = 0; - int stride_extra = 0; - int retval = 0; - int c; - -#if PNG_LIBPNG_VER >= 10700 - /* This error should not exist in 1.7 or later: */ - opts |= GBG_ERROR; -#endif - - init_sRGB_to_d(); -#if 0 - init_error_via_linear(); -#endif - format_init(&formats); - reseed(); /* initialize random number seeds */ - - for (c=1; c= sizeof tmpf) - { - fflush(stdout); - fprintf(stderr, "%s: %s is too long for a temp file prefix\n", - argv[0], argv[c]); - exit(99); - } - - /* Safe: checked above */ - strncpy(tmpf, argv[c], sizeof (tmpf)-1); - } - - else - { - fflush(stdout); - fprintf(stderr, "%s: %s requires a temporary file prefix\n", - argv[0], arg); - exit(99); - } - } - else if (strcmp(arg, "--touch") == 0) - { - if (c+1 < argc) - touch = argv[++c]; - - else - { - fflush(stdout); - fprintf(stderr, "%s: %s requires a file name argument\n", - argv[0], arg); - exit(99); - } - } - else if (arg[0] == '+') - { - png_uint_32 format = formatof(arg+1); - - if (format > FORMAT_COUNT) - exit(99); - - format_set(&formats, format); - } - else if (arg[0] == '-' && arg[1] != 0 && (arg[1] != '0' || arg[2] != 0)) - { - fflush(stdout); - fprintf(stderr, "%s: unknown option: %s\n", argv[0], arg); - exit(99); - } - else - { - if (format_is_initial(&formats)) - format_default(&formats, redundant); - - if (arg[0] == '-') - { - int term = (arg[1] == '0' ? 0 : '\n'); - unsigned int ich = 0; - - /* Loop reading files, use a static buffer to simplify this and just - * stop if the name gets to long. - */ - static char buffer[4096]; - - do - { - int ch = getchar(); - - /* Don't allow '\0' in file names, and terminate with '\n' or, - * for -0, just '\0' (use -print0 to find to make this work!) - */ - if (ch == EOF || ch == term || ch == 0) - { - buffer[ich] = 0; - - if (ich > 0 && !test_one_file(buffer, &formats, opts, - stride_extra, log_pass)) - retval = 1; - - if (ch == EOF) - break; - - ich = 0; - --ich; /* so that the increment below sets it to 0 again */ - } - - else - buffer[ich] = (char)ch; - } while (++ich < sizeof buffer); - - if (ich) - { - buffer[32] = 0; - buffer[4095] = 0; - fprintf(stderr, "%s...%s: file name too long\n", buffer, - buffer+(4096-32)); - exit(99); - } - } - - else if (!test_one_file(arg, &formats, opts, stride_extra, log_pass)) - retval = 1; - } - } - - if (opts & ACCUMULATE) - { - unsigned int in; - - printf("/* contrib/libtests/pngstest-errors.h\n"); - printf(" *\n"); - printf(" * BUILT USING:" PNG_HEADER_VERSION_STRING); - printf(" *\n"); - printf(" * This code is released under the libpng license.\n"); - printf(" * For conditions of distribution and use, see the disclaimer\n"); - printf(" * and license in png.h\n"); - printf(" *\n"); - printf(" * THIS IS A MACHINE GENERATED FILE: do not edit it directly!\n"); - printf(" * Instead run:\n"); - printf(" *\n"); - printf(" * pngstest --accumulate\n"); - printf(" *\n"); - printf(" * on as many PNG files as possible; at least PNGSuite and\n"); - printf(" * contrib/libtests/testpngs.\n"); - printf(" */\n"); - - printf("static png_uint_16 gpc_error[16/*in*/][16/*out*/][4/*a*/] =\n"); - printf("{\n"); - for (in=0; in<16; ++in) - { - unsigned int out; - printf(" { /* input: %s */\n ", format_names[in]); - for (out=0; out<16; ++out) - { - unsigned int alpha; - printf(" {"); - for (alpha=0; alpha<4; ++alpha) - { - printf(" %d", gpc_error[in][out][alpha]); - if (alpha < 3) putchar(','); - } - printf(" }"); - if (out < 15) - { - putchar(','); - if (out % 4 == 3) printf("\n "); - } - } - printf("\n }"); - - if (in < 15) - putchar(','); - else - putchar('\n'); - } - printf("};\n"); - - printf("static png_uint_16 gpc_error_via_linear[16][4/*out*/][4] =\n"); - printf("{\n"); - for (in=0; in<16; ++in) - { - unsigned int out; - printf(" { /* input: %s */\n ", format_names[in]); - for (out=0; out<4; ++out) - { - unsigned int alpha; - printf(" {"); - for (alpha=0; alpha<4; ++alpha) - { - printf(" %d", gpc_error_via_linear[in][out][alpha]); - if (alpha < 3) putchar(','); - } - printf(" }"); - if (out < 3) - putchar(','); - } - printf("\n }"); - - if (in < 15) - putchar(','); - else - putchar('\n'); - } - printf("};\n"); - - printf("static png_uint_16 gpc_error_to_colormap[8/*i*/][8/*o*/][4] =\n"); - printf("{\n"); - for (in=0; in<8; ++in) - { - unsigned int out; - printf(" { /* input: %s */\n ", format_names[in]); - for (out=0; out<8; ++out) - { - unsigned int alpha; - printf(" {"); - for (alpha=0; alpha<4; ++alpha) - { - printf(" %d", gpc_error_to_colormap[in][out][alpha]); - if (alpha < 3) putchar(','); - } - printf(" }"); - if (out < 7) - { - putchar(','); - if (out % 4 == 3) printf("\n "); - } - } - printf("\n }"); - - if (in < 7) - putchar(','); - else - putchar('\n'); - } - printf("};\n"); - printf("/* END MACHINE GENERATED */\n"); - } - - if (retval == 0 && touch != NULL) - { - FILE *fsuccess = fopen(touch, "wt"); - - if (fsuccess != NULL) - { - int error = 0; - fprintf(fsuccess, "PNG simple API tests succeeded\n"); - fflush(fsuccess); - error = ferror(fsuccess); - - if (fclose(fsuccess) || error) - { - fflush(stdout); - fprintf(stderr, "%s: write failed\n", touch); - exit(99); - } - } - - else - { - fflush(stdout); - fprintf(stderr, "%s: open failed\n", touch); - exit(99); - } - } - - return retval; -} - -#else /* !PNG_SIMPLIFIED_READ_SUPPORTED */ -int main(void) -{ - fprintf(stderr, "pngstest: no read support in libpng, test skipped\n"); - /* So the test is skipped: */ - return SKIP; -} -#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */ diff --git a/thirdparty/libpng-1.6.37/contrib/libtests/pngunknown.c b/thirdparty/libpng-1.6.37/contrib/libtests/pngunknown.c deleted file mode 100644 index 05bdd83..0000000 --- a/thirdparty/libpng-1.6.37/contrib/libtests/pngunknown.c +++ /dev/null @@ -1,1294 +0,0 @@ - -/* pngunknown.c - test the read side unknown chunk handling - * - * Last changed in libpng 1.6.32 [August 24, 2017] - * Copyright (c) 2015,2017 Glenn Randers-Pehrson - * Written by John Cunningham Bowler - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - * - * NOTES: - * This is a C program that is intended to be linked against libpng. It - * allows the libpng unknown handling code to be tested by interpreting - * arguments to save or discard combinations of chunks. The program is - * currently just a minimal validation for the built-in libpng facilities. - */ - -#include -#include -#include -#include - -/* Define the following to use this test against your installed libpng, rather - * than the one being built here: - */ -#ifdef PNG_FREESTANDING_TESTS -# include -#else -# include "../../png.h" -#endif - -/* 1.6.1 added support for the configure test harness, which uses 77 to indicate - * a skipped test, in earlier versions we need to succeed on a skipped test, so: - */ -#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H) -# define SKIP 77 -#else -# define SKIP 0 -#endif - - -/* Since this program tests the ability to change the unknown chunk handling - * these must be defined: - */ -#if defined(PNG_SET_UNKNOWN_CHUNKS_SUPPORTED) &&\ - defined(PNG_STDIO_SUPPORTED) &&\ - defined(PNG_READ_SUPPORTED) - -/* One of these must be defined to allow us to find out what happened. It is - * still useful to set unknown chunk handling without either of these in order - * to cause *known* chunks to be discarded. This can be a significant - * efficiency gain, but it can't really be tested here. - */ -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) ||\ - defined(PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED) - -#if PNG_LIBPNG_VER < 10500 -/* This deliberately lacks the const. */ -typedef png_byte *png_const_bytep; - -/* This is copied from 1.5.1 png.h: */ -#define PNG_INTERLACE_ADAM7_PASSES 7 -#define PNG_PASS_START_ROW(pass) (((1U&~(pass))<<(3-((pass)>>1)))&7) -#define PNG_PASS_START_COL(pass) (((1U& (pass))<<(3-(((pass)+1)>>1)))&7) -#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) -#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) -#define PNG_PASS_ROWS(height, pass) (((height)+(((1<>PNG_PASS_ROW_SHIFT(pass)) -#define PNG_PASS_COLS(width, pass) (((width)+(((1<>PNG_PASS_COL_SHIFT(pass)) -#define PNG_ROW_FROM_PASS_ROW(yIn, pass) \ - (((yIn)<>(((7-(off))-(pass))<<2)) & 0xFU) | \ - ((0x01145AF0U>>(((7-(off))-(pass))<<2)) & 0xF0U)) -#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ - ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) -#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ - ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) - -/* These are needed too for the default build: */ -#define PNG_WRITE_16BIT_SUPPORTED -#define PNG_READ_16BIT_SUPPORTED - -/* This comes from pnglibconf.h after 1.5: */ -#define PNG_FP_1 100000 -#define PNG_GAMMA_THRESHOLD_FIXED\ - ((png_fixed_point)(PNG_GAMMA_THRESHOLD * PNG_FP_1)) -#endif - -#if PNG_LIBPNG_VER < 10600 - /* 1.6.0 constifies many APIs. The following exists to allow pngvalid to be - * compiled against earlier versions. - */ -# define png_const_structp png_structp -#endif - -#if PNG_LIBPNG_VER < 10700 - /* Copied from libpng 1.7.0 png.h */ -#define PNG_u2(b1, b2) (((unsigned int)(b1) << 8) + (b2)) - -#define PNG_U16(b1, b2) ((png_uint_16)PNG_u2(b1, b2)) -#define PNG_U32(b1, b2, b3, b4)\ - (((png_uint_32)PNG_u2(b1, b2) << 16) + PNG_u2(b3, b4)) - -/* Constants for known chunk types. - */ -#define png_IDAT PNG_U32( 73, 68, 65, 84) -#define png_IEND PNG_U32( 73, 69, 78, 68) -#define png_IHDR PNG_U32( 73, 72, 68, 82) -#define png_PLTE PNG_U32( 80, 76, 84, 69) -#define png_bKGD PNG_U32( 98, 75, 71, 68) -#define png_cHRM PNG_U32( 99, 72, 82, 77) -#define png_eXIf PNG_U32(101, 88, 73, 102) /* registered July 2017 */ -#define png_fRAc PNG_U32(102, 82, 65, 99) /* registered, not defined */ -#define png_gAMA PNG_U32(103, 65, 77, 65) -#define png_gIFg PNG_U32(103, 73, 70, 103) -#define png_gIFt PNG_U32(103, 73, 70, 116) /* deprecated */ -#define png_gIFx PNG_U32(103, 73, 70, 120) -#define png_hIST PNG_U32(104, 73, 83, 84) -#define png_iCCP PNG_U32(105, 67, 67, 80) -#define png_iTXt PNG_U32(105, 84, 88, 116) -#define png_oFFs PNG_U32(111, 70, 70, 115) -#define png_pCAL PNG_U32(112, 67, 65, 76) -#define png_pHYs PNG_U32(112, 72, 89, 115) -#define png_sBIT PNG_U32(115, 66, 73, 84) -#define png_sCAL PNG_U32(115, 67, 65, 76) -#define png_sPLT PNG_U32(115, 80, 76, 84) -#define png_sRGB PNG_U32(115, 82, 71, 66) -#define png_sTER PNG_U32(115, 84, 69, 82) -#define png_tEXt PNG_U32(116, 69, 88, 116) -#define png_tIME PNG_U32(116, 73, 77, 69) -#define png_tRNS PNG_U32(116, 82, 78, 83) -#define png_zTXt PNG_U32(122, 84, 88, 116) - -/* Test on flag values as defined in the spec (section 5.4): */ -#define PNG_CHUNK_ANCILLARY(c) (1 & ((c) >> 29)) -#define PNG_CHUNK_CRITICAL(c) (!PNG_CHUNK_ANCILLARY(c)) -#define PNG_CHUNK_PRIVATE(c) (1 & ((c) >> 21)) -#define PNG_CHUNK_RESERVED(c) (1 & ((c) >> 13)) -#define PNG_CHUNK_SAFE_TO_COPY(c) (1 & ((c) >> 5)) - -#endif /* PNG_LIBPNG_VER < 10700 */ - -#ifdef __cplusplus -# define this not_the_cpp_this -# define new not_the_cpp_new -# define voidcast(type, value) static_cast(value) -#else -# define voidcast(type, value) (value) -#endif /* __cplusplus */ - -/* Unused formal parameter errors are removed using the following macro which is - * expected to have no bad effects on performance. - */ -#ifndef UNUSED -# if defined(__GNUC__) || defined(_MSC_VER) -# define UNUSED(param) (void)param; -# else -# define UNUSED(param) -# endif -#endif - -/* Types of chunks not known to libpng */ -#define png_vpAg PNG_U32(118, 112, 65, 103) - -/* Chunk information */ -#define PNG_INFO_tEXt 0x10000000U -#define PNG_INFO_iTXt 0x20000000U -#define PNG_INFO_zTXt 0x40000000U - -#define PNG_INFO_sTER 0x01000000U -#define PNG_INFO_vpAg 0x02000000U - -#define ABSENT 0 -#define START 1 -#define END 2 - -static struct -{ - char name[5]; - png_uint_32 flag; - png_uint_32 tag; - int unknown; /* Chunk not known to libpng */ - int all; /* Chunk set by the '-1' option */ - int position; /* position in pngtest.png */ - int keep; /* unknown handling setting */ -} chunk_info[] = { - /* Critical chunks */ - { "IDAT", PNG_INFO_IDAT, png_IDAT, 0, 0, START, 0 }, /* must be [0] */ - { "PLTE", PNG_INFO_PLTE, png_PLTE, 0, 0, ABSENT, 0 }, - - /* Non-critical chunks that libpng handles */ - /* This is a mess but it seems to be the only way to do it - there is no way - * to check for a definition outside a #if. - */ - { "bKGD", PNG_INFO_bKGD, png_bKGD, -# ifdef PNG_READ_bKGD_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "cHRM", PNG_INFO_cHRM, png_cHRM, -# ifdef PNG_READ_cHRM_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "eXIf", PNG_INFO_eXIf, png_eXIf, -# ifdef PNG_READ_eXIf_SUPPORTED - 0, -# else - 1, -# endif - 1, END, 0 }, - { "gAMA", PNG_INFO_gAMA, png_gAMA, -# ifdef PNG_READ_gAMA_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "hIST", PNG_INFO_hIST, png_hIST, -# ifdef PNG_READ_hIST_SUPPORTED - 0, -# else - 1, -# endif - 1, ABSENT, 0 }, - { "iCCP", PNG_INFO_iCCP, png_iCCP, -# ifdef PNG_READ_iCCP_SUPPORTED - 0, -# else - 1, -# endif - 1, ABSENT, 0 }, - { "iTXt", PNG_INFO_iTXt, png_iTXt, -# ifdef PNG_READ_iTXt_SUPPORTED - 0, -# else - 1, -# endif - 1, ABSENT, 0 }, - { "oFFs", PNG_INFO_oFFs, png_oFFs, -# ifdef PNG_READ_oFFs_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "pCAL", PNG_INFO_pCAL, png_pCAL, -# ifdef PNG_READ_pCAL_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "pHYs", PNG_INFO_pHYs, png_pHYs, -# ifdef PNG_READ_pHYs_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "sBIT", PNG_INFO_sBIT, png_sBIT, -# ifdef PNG_READ_sBIT_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "sCAL", PNG_INFO_sCAL, png_sCAL, -# ifdef PNG_READ_sCAL_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "sPLT", PNG_INFO_sPLT, png_sPLT, -# ifdef PNG_READ_sPLT_SUPPORTED - 0, -# else - 1, -# endif - 1, ABSENT, 0 }, - { "sRGB", PNG_INFO_sRGB, png_sRGB, -# ifdef PNG_READ_sRGB_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "tEXt", PNG_INFO_tEXt, png_tEXt, -# ifdef PNG_READ_tEXt_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "tIME", PNG_INFO_tIME, png_tIME, -# ifdef PNG_READ_tIME_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "tRNS", PNG_INFO_tRNS, png_tRNS, -# ifdef PNG_READ_tRNS_SUPPORTED - 0, -# else - 1, -# endif - 0, ABSENT, 0 }, - { "zTXt", PNG_INFO_zTXt, png_zTXt, -# ifdef PNG_READ_zTXt_SUPPORTED - 0, -# else - 1, -# endif - 1, END, 0 }, - - /* No libpng handling */ - { "sTER", PNG_INFO_sTER, png_sTER, 1, 1, START, 0 }, - { "vpAg", PNG_INFO_vpAg, png_vpAg, 1, 0, START, 0 }, -}; - -#define NINFO ((int)((sizeof chunk_info)/(sizeof chunk_info[0]))) - -static void -clear_keep(void) -{ - int i = NINFO; - while (--i >= 0) - chunk_info[i].keep = 0; -} - -static int -find(const char *name) -{ - int i = NINFO; - while (--i >= 0) - { - if (memcmp(chunk_info[i].name, name, 4) == 0) - break; - } - - return i; -} - -static int -findb(const png_byte *name) -{ - int i = NINFO; - while (--i >= 0) - { - if (memcmp(chunk_info[i].name, name, 4) == 0) - break; - } - - return i; -} - -static int -find_by_flag(png_uint_32 flag) -{ - int i = NINFO; - - while (--i >= 0) if (chunk_info[i].flag == flag) return i; - - fprintf(stderr, "pngunknown: internal error\n"); - exit(4); -} - -static int -ancillary(const char *name) -{ - return PNG_CHUNK_ANCILLARY(PNG_U32(name[0], name[1], name[2], name[3])); -} - -#ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED -static int -ancillaryb(const png_byte *name) -{ - return PNG_CHUNK_ANCILLARY(PNG_U32(name[0], name[1], name[2], name[3])); -} -#endif - -/* Type of an error_ptr */ -typedef struct -{ - jmp_buf error_return; - png_structp png_ptr; - png_infop info_ptr, end_ptr; - png_uint_32 before_IDAT; - png_uint_32 after_IDAT; - int error_count; - int warning_count; - int keep; /* the default value */ - const char *program; - const char *file; - const char *test; -} display; - -static const char init[] = "initialization"; -static const char cmd[] = "command line"; - -static void -init_display(display *d, const char *program) -{ - memset(d, 0, sizeof *d); - d->png_ptr = NULL; - d->info_ptr = d->end_ptr = NULL; - d->error_count = d->warning_count = 0; - d->program = program; - d->file = program; - d->test = init; -} - -static void -clean_display(display *d) -{ - png_destroy_read_struct(&d->png_ptr, &d->info_ptr, &d->end_ptr); - - /* This must not happen - it might cause an app crash */ - if (d->png_ptr != NULL || d->info_ptr != NULL || d->end_ptr != NULL) - { - fprintf(stderr, "%s(%s): png_destroy_read_struct error\n", d->file, - d->test); - exit(1); - } -} - -PNG_FUNCTION(void, display_exit, (display *d), static PNG_NORETURN) -{ - ++(d->error_count); - - if (d->png_ptr != NULL) - clean_display(d); - - /* During initialization and if this is a single command line argument set - * exit now - there is only one test, otherwise longjmp to do the next test. - */ - if (d->test == init || d->test == cmd) - exit(1); - - longjmp(d->error_return, 1); -} - -static int -display_rc(const display *d, int strict) -{ - return d->error_count + (strict ? d->warning_count : 0); -} - -/* libpng error and warning callbacks */ -PNG_FUNCTION(void, (PNGCBAPI error), (png_structp png_ptr, const char *message), - static PNG_NORETURN) -{ - display *d = (display*)png_get_error_ptr(png_ptr); - - fprintf(stderr, "%s(%s): libpng error: %s\n", d->file, d->test, message); - display_exit(d); -} - -static void PNGCBAPI -warning(png_structp png_ptr, const char *message) -{ - display *d = (display*)png_get_error_ptr(png_ptr); - - fprintf(stderr, "%s(%s): libpng warning: %s\n", d->file, d->test, message); - ++(d->warning_count); -} - -static png_uint_32 -get_valid(display *d, png_infop info_ptr) -{ - png_uint_32 flags = png_get_valid(d->png_ptr, info_ptr, (png_uint_32)~0); - - /* Map the text chunks back into the flags */ - { - png_textp text; - png_uint_32 ntext = png_get_text(d->png_ptr, info_ptr, &text, NULL); - - while (ntext > 0) switch (text[--ntext].compression) - { - case -1: - flags |= PNG_INFO_tEXt; - break; - case 0: - flags |= PNG_INFO_zTXt; - break; - case 1: - case 2: - flags |= PNG_INFO_iTXt; - break; - default: - fprintf(stderr, "%s(%s): unknown text compression %d\n", d->file, - d->test, text[ntext].compression); - display_exit(d); - } - } - - return flags; -} - -#ifdef PNG_READ_USER_CHUNKS_SUPPORTED -static int PNGCBAPI -read_callback(png_structp pp, png_unknown_chunkp pc) -{ - /* This function mimics the behavior of png_set_keep_unknown_chunks by - * returning '0' to keep the chunk and '1' to discard it. - */ - display *d = voidcast(display*, png_get_user_chunk_ptr(pp)); - int chunk = findb(pc->name); - int keep, discard; - - if (chunk < 0) /* not one in our list, so not a known chunk */ - keep = d->keep; - - else - { - keep = chunk_info[chunk].keep; - if (keep == PNG_HANDLE_CHUNK_AS_DEFAULT) - { - /* See the comments in png.h - use the default for unknown chunks, - * do not keep known chunks. - */ - if (chunk_info[chunk].unknown) - keep = d->keep; - - else - keep = PNG_HANDLE_CHUNK_NEVER; - } - } - - switch (keep) - { - default: - fprintf(stderr, "%s(%s): %d: unrecognized chunk option\n", d->file, - d->test, chunk_info[chunk].keep); - display_exit(d); - - case PNG_HANDLE_CHUNK_AS_DEFAULT: - case PNG_HANDLE_CHUNK_NEVER: - discard = 1/*handled; discard*/; - break; - - case PNG_HANDLE_CHUNK_IF_SAFE: - case PNG_HANDLE_CHUNK_ALWAYS: - discard = 0/*not handled; keep*/; - break; - } - - /* Also store information about this chunk in the display, the relevant flag - * is set if the chunk is to be kept ('not handled'.) - */ - if (chunk >= 0) if (!discard) /* stupidity to stop a GCC warning */ - { - png_uint_32 flag = chunk_info[chunk].flag; - - if (pc->location & PNG_AFTER_IDAT) - d->after_IDAT |= flag; - - else - d->before_IDAT |= flag; - } - - /* However if there is no support to store unknown chunks don't ask libpng to - * do it; there will be an png_error. - */ -# ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED - return discard; -# else - return 1; /*handled; discard*/ -# endif -} -#endif /* READ_USER_CHUNKS_SUPPORTED */ - -#ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED -static png_uint_32 -get_unknown(display *d, png_infop info_ptr, int after_IDAT) -{ - /* Create corresponding 'unknown' flags */ - png_uint_32 flags = 0; - - UNUSED(after_IDAT) - - { - png_unknown_chunkp unknown; - int num_unknown = png_get_unknown_chunks(d->png_ptr, info_ptr, &unknown); - - while (--num_unknown >= 0) - { - int chunk = findb(unknown[num_unknown].name); - - /* Chunks not known to pngunknown must be validated here; since they - * must also be unknown to libpng the 'display->keep' behavior should - * have been used. - */ - if (chunk < 0) switch (d->keep) - { - default: /* impossible */ - case PNG_HANDLE_CHUNK_AS_DEFAULT: - case PNG_HANDLE_CHUNK_NEVER: - fprintf(stderr, "%s(%s): %s: %s: unknown chunk saved\n", - d->file, d->test, d->keep ? "discard" : "default", - unknown[num_unknown].name); - ++(d->error_count); - break; - - case PNG_HANDLE_CHUNK_IF_SAFE: - if (!ancillaryb(unknown[num_unknown].name)) - { - fprintf(stderr, - "%s(%s): if-safe: %s: unknown critical chunk saved\n", - d->file, d->test, unknown[num_unknown].name); - ++(d->error_count); - break; - } - /* FALLTHROUGH */ /* (safe) */ - case PNG_HANDLE_CHUNK_ALWAYS: - break; - } - - else - flags |= chunk_info[chunk].flag; - } - } - - return flags; -} -#else /* SAVE_UNKNOWN_CHUNKS */ -static png_uint_32 -get_unknown(display *d, png_infop info_ptr, int after_IDAT) - /* Otherwise this will return the cached values set by any user callback */ -{ - UNUSED(info_ptr); - - if (after_IDAT) - return d->after_IDAT; - - else - return d->before_IDAT; -} - -# ifndef PNG_READ_USER_CHUNKS_SUPPORTED - /* The #defines above should mean this is never reached, it's just here as - * a check to ensure the logic is correct. - */ -# error No store support and no user chunk support, this will not work -# endif /* READ_USER_CHUNKS */ -#endif /* SAVE_UNKNOWN_CHUNKS */ - -static int -check(FILE *fp, int argc, const char **argv, png_uint_32p flags/*out*/, - display *d, int set_callback) -{ - int i, npasses, ipass; - png_uint_32 height; - - d->keep = PNG_HANDLE_CHUNK_AS_DEFAULT; - d->before_IDAT = 0; - d->after_IDAT = 0; - - /* Some of these errors are permanently fatal and cause an exit here, others - * are per-test and cause an error return. - */ - d->png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, d, error, - warning); - if (d->png_ptr == NULL) - { - fprintf(stderr, "%s(%s): could not allocate png struct\n", d->file, - d->test); - /* Terminate here, this error is not test specific. */ - exit(1); - } - - d->info_ptr = png_create_info_struct(d->png_ptr); - d->end_ptr = png_create_info_struct(d->png_ptr); - if (d->info_ptr == NULL || d->end_ptr == NULL) - { - fprintf(stderr, "%s(%s): could not allocate png info\n", d->file, - d->test); - clean_display(d); - exit(1); - } - - png_init_io(d->png_ptr, fp); - -# ifdef PNG_READ_USER_CHUNKS_SUPPORTED - /* This is only done if requested by the caller; it interferes with the - * standard store/save mechanism. - */ - if (set_callback) - png_set_read_user_chunk_fn(d->png_ptr, d, read_callback); -# else - UNUSED(set_callback) -# endif - - /* Handle each argument in turn; multiple settings are possible for the same - * chunk and multiple calls will occur (the last one should override all - * preceding ones). - */ - for (i=0; i= 10700 &&\ - !defined(PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED) - if (option < PNG_HANDLE_CHUNK_IF_SAFE) -# endif /* 1.7+ SAVE_UNKNOWN_CHUNKS */ - { - png_byte name[5]; - - memcpy(name, chunk_info[chunk].name, 5); - png_set_keep_unknown_chunks(d->png_ptr, option, name, 1); - chunk_info[chunk].keep = option; - } - continue; - } - - break; - - case 7: /* default */ - if (memcmp(argv[i], "default", 7) == 0) - { -# if PNG_LIBPNG_VER >= 10700 &&\ - !defined(PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED) - if (option < PNG_HANDLE_CHUNK_IF_SAFE) -# endif /* 1.7+ SAVE_UNKNOWN_CHUNKS */ - png_set_keep_unknown_chunks(d->png_ptr, option, NULL, 0); - - d->keep = option; - continue; - } - - break; - - case 3: /* all */ - if (memcmp(argv[i], "all", 3) == 0) - { -# if PNG_LIBPNG_VER >= 10700 &&\ - !defined(PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED) - if (option < PNG_HANDLE_CHUNK_IF_SAFE) -# endif /* 1.7+ SAVE_UNKNOWN_CHUNKS */ - png_set_keep_unknown_chunks(d->png_ptr, option, NULL, -1); - - d->keep = option; - - for (chunk = 0; chunk < NINFO; ++chunk) - if (chunk_info[chunk].all) - chunk_info[chunk].keep = option; - continue; - } - - break; - - default: /* some misplaced = */ - - break; - } - } - - fprintf(stderr, "%s(%s): %s: unrecognized chunk argument\n", d->file, - d->test, argv[i]); - display_exit(d); - } - - png_read_info(d->png_ptr, d->info_ptr); - - switch (png_get_interlace_type(d->png_ptr, d->info_ptr)) - { - case PNG_INTERLACE_NONE: - npasses = 1; - break; - - case PNG_INTERLACE_ADAM7: - npasses = PNG_INTERLACE_ADAM7_PASSES; - break; - - default: - /* Hard error because it is not test specific */ - fprintf(stderr, "%s(%s): invalid interlace type\n", d->file, d->test); - clean_display(d); - exit(1); - } - - /* Skip the image data, if IDAT is not being handled then don't do this - * because it will cause a CRC error. - */ - if (chunk_info[0/*IDAT*/].keep == PNG_HANDLE_CHUNK_AS_DEFAULT) - { - png_start_read_image(d->png_ptr); - height = png_get_image_height(d->png_ptr, d->info_ptr); - - if (npasses > 1) - { - png_uint_32 width = png_get_image_width(d->png_ptr, d->info_ptr); - - for (ipass=0; ipass 0) - { - png_uint_32 y; - - for (y=0; ypng_ptr, NULL, NULL); - } - } - } /* interlaced */ - - else /* not interlaced */ - { - png_uint_32 y; - - for (y=0; ypng_ptr, NULL, NULL); - } - } - - png_read_end(d->png_ptr, d->end_ptr); - - flags[0] = get_valid(d, d->info_ptr); - flags[1] = get_unknown(d, d->info_ptr, 0/*before IDAT*/); - - /* Only png_read_png sets PNG_INFO_IDAT! */ - flags[chunk_info[0/*IDAT*/].keep != PNG_HANDLE_CHUNK_AS_DEFAULT] |= - PNG_INFO_IDAT; - - flags[2] = get_valid(d, d->end_ptr); - flags[3] = get_unknown(d, d->end_ptr, 1/*after IDAT*/); - - clean_display(d); - - return d->keep; -} - -static void -check_error(display *d, png_uint_32 flags, const char *message) -{ - while (flags) - { - png_uint_32 flag = flags & -(png_int_32)flags; - int i = find_by_flag(flag); - - fprintf(stderr, "%s(%s): chunk %s: %s\n", d->file, d->test, - chunk_info[i].name, message); - ++(d->error_count); - - flags &= ~flag; - } -} - -static void -check_handling(display *d, int def, png_uint_32 chunks, png_uint_32 known, - png_uint_32 unknown, const char *position, int set_callback) -{ - while (chunks) - { - png_uint_32 flag = chunks & -(png_int_32)chunks; - int i = find_by_flag(flag); - int keep = chunk_info[i].keep; - const char *type; - const char *errorx = NULL; - - if (chunk_info[i].unknown) - { - if (keep == PNG_HANDLE_CHUNK_AS_DEFAULT) - { - type = "UNKNOWN (default)"; - keep = def; - } - - else - type = "UNKNOWN (specified)"; - - if (flag & known) - errorx = "chunk processed"; - - else switch (keep) - { - case PNG_HANDLE_CHUNK_AS_DEFAULT: - if (flag & unknown) - errorx = "DEFAULT: unknown chunk saved"; - break; - - case PNG_HANDLE_CHUNK_NEVER: - if (flag & unknown) - errorx = "DISCARD: unknown chunk saved"; - break; - - case PNG_HANDLE_CHUNK_IF_SAFE: - if (ancillary(chunk_info[i].name)) - { - if (!(flag & unknown)) - errorx = "IF-SAFE: unknown ancillary chunk lost"; - } - - else if (flag & unknown) - errorx = "IF-SAFE: unknown critical chunk saved"; - break; - - case PNG_HANDLE_CHUNK_ALWAYS: - if (!(flag & unknown)) - errorx = "SAVE: unknown chunk lost"; - break; - - default: - errorx = "internal error: bad keep"; - break; - } - } /* unknown chunk */ - - else /* known chunk */ - { - type = "KNOWN"; - - if (flag & known) - { - /* chunk was processed, it won't have been saved because that is - * caught below when checking for inconsistent processing. - */ - if (keep != PNG_HANDLE_CHUNK_AS_DEFAULT) - errorx = "!DEFAULT: known chunk processed"; - } - - else /* not processed */ switch (keep) - { - case PNG_HANDLE_CHUNK_AS_DEFAULT: - errorx = "DEFAULT: known chunk not processed"; - break; - - case PNG_HANDLE_CHUNK_NEVER: - if (flag & unknown) - errorx = "DISCARD: known chunk saved"; - break; - - case PNG_HANDLE_CHUNK_IF_SAFE: - if (ancillary(chunk_info[i].name)) - { - if (!(flag & unknown)) - errorx = "IF-SAFE: known ancillary chunk lost"; - } - - else if (flag & unknown) - errorx = "IF-SAFE: known critical chunk saved"; - break; - - case PNG_HANDLE_CHUNK_ALWAYS: - if (!(flag & unknown)) - errorx = "SAVE: known chunk lost"; - break; - - default: - errorx = "internal error: bad keep (2)"; - break; - } - } - - if (errorx != NULL) - { - ++(d->error_count); - fprintf(stderr, "%s(%s%s): %s %s %s: %s\n", d->file, d->test, - set_callback ? ",callback" : "", - type, chunk_info[i].name, position, errorx); - } - - chunks &= ~flag; - } -} - -static void -perform_one_test(FILE *fp, int argc, const char **argv, - png_uint_32 *default_flags, display *d, int set_callback) -{ - int def; - png_uint_32 flags[2][4]; - - rewind(fp); - clear_keep(); - memcpy(flags[0], default_flags, sizeof flags[0]); - - def = check(fp, argc, argv, flags[1], d, set_callback); - - /* If IDAT is being handled as unknown the image read is skipped and all the - * IDATs after the first end up in the end info struct, so in this case add - * IDAT to the list of unknowns. (Do this after 'check' above sets the - * chunk_info 'keep' fields.) - * - * Note that the flag setting has to be in the 'known' field to avoid - * triggering the consistency check below and the flag must only be set if - * there are multiple IDATs, so if the check above did find an unknown IDAT - * after IDAT. - */ - if (chunk_info[0/*IDAT*/].keep != PNG_HANDLE_CHUNK_AS_DEFAULT && - (flags[1][3] & PNG_INFO_IDAT) != 0) - flags[0][2] |= PNG_INFO_IDAT; - - /* Chunks should either be known or unknown, never both and this should apply - * whether the chunk is before or after the IDAT (actually, the app can - * probably change this by swapping the handling after the image, but this - * test does not do that.) - */ - check_error(d, (flags[0][0]|flags[0][2]) & (flags[0][1]|flags[0][3]), - "chunk handled inconsistently in count tests"); - check_error(d, (flags[1][0]|flags[1][2]) & (flags[1][1]|flags[1][3]), - "chunk handled inconsistently in option tests"); - - /* Now find out what happened to each chunk before and after the IDAT and - * determine if the behavior was correct. First some basic sanity checks, - * any known chunk should be known in the original count, any unknown chunk - * should be either known or unknown in the original. - */ - { - png_uint_32 test; - - test = flags[1][0] & ~flags[0][0]; - check_error(d, test, "new known chunk before IDAT"); - test = flags[1][1] & ~(flags[0][0] | flags[0][1]); - check_error(d, test, "new unknown chunk before IDAT"); - test = flags[1][2] & ~flags[0][2]; - check_error(d, test, "new known chunk after IDAT"); - test = flags[1][3] & ~(flags[0][2] | flags[0][3]); - check_error(d, test, "new unknown chunk after IDAT"); - } - - /* Now each chunk in the original list should have been handled according to - * the options set for that chunk, regardless of whether libpng knows about - * it or not. - */ - check_handling(d, def, flags[0][0] | flags[0][1], flags[1][0], flags[1][1], - "before IDAT", set_callback); - check_handling(d, def, flags[0][2] | flags[0][3], flags[1][2], flags[1][3], - "after IDAT", set_callback); -} - -static void -perform_one_test_safe(FILE *fp, int argc, const char **argv, - png_uint_32 *default_flags, display *d, const char *test) -{ - if (setjmp(d->error_return) == 0) - { - d->test = test; /* allow use of d->error_return */ -# ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED - perform_one_test(fp, argc, argv, default_flags, d, 0); -# endif -# ifdef PNG_READ_USER_CHUNKS_SUPPORTED - perform_one_test(fp, argc, argv, default_flags, d, 1); -# endif - d->test = init; /* prevent use of d->error_return */ - } -} - -static const char *standard_tests[] = -{ - "discard", "default=discard", 0, - "save", "default=save", 0, - "if-safe", "default=if-safe", 0, - "vpAg", "vpAg=if-safe", 0, - "sTER", "sTER=if-safe", 0, - "IDAT", "default=discard", "IDAT=save", 0, - "sAPI", "bKGD=save", "cHRM=save", "gAMA=save", "all=discard", "iCCP=save", - "sBIT=save", "sRGB=save", "eXIf=save", 0, - 0/*end*/ -}; - -static PNG_NORETURN void -usage(const char *program, const char *reason) -{ - fprintf(stderr, "pngunknown: %s: usage:\n %s [--strict] " - "--default|{(CHNK|default|all)=(default|discard|if-safe|save)} " - "testfile.png\n", reason, program); - exit(99); -} - -int -main(int argc, const char **argv) -{ - FILE *fp; - png_uint_32 default_flags[4/*valid,unknown{before,after}*/]; - int strict = 0, default_tests = 0; - const char *count_argv = "default=save"; - const char *touch_file = NULL; - display d; - - init_display(&d, argv[0]); - - while (++argv, --argc > 0) - { - if (strcmp(*argv, "--strict") == 0) - strict = 1; - - else if (strcmp(*argv, "--default") == 0) - default_tests = 1; - - else if (strcmp(*argv, "--touch") == 0) - { - if (argc > 1) - touch_file = *++argv, --argc; - - else - usage(d.program, "--touch: missing file name"); - } - - else - break; - } - - /* A file name is required, but there should be no other arguments if - * --default was specified. - */ - if (argc <= 0) - usage(d.program, "missing test file"); - - /* GCC BUG: if (default_tests && argc != 1) triggers some weird GCC argc - * optimization which causes warnings with -Wstrict-overflow! - */ - else if (default_tests) if (argc != 1) - usage(d.program, "extra arguments"); - - /* The name of the test file is the last argument; remove it. */ - d.file = argv[--argc]; - - fp = fopen(d.file, "rb"); - if (fp == NULL) - { - perror(d.file); - exit(99); - } - - /* First find all the chunks, known and unknown, in the test file, a failure - * here aborts the whole test. - * - * If 'save' is supported then the normal saving method should happen, - * otherwise if 'read' is supported then the read callback will do the - * same thing. If both are supported the 'read' callback won't be - * instantiated by default. If 'save' is *not* supported then a user - * callback is required even though we can call png_get_unknown_chunks. - */ - if (check(fp, 1, &count_argv, default_flags, &d, -# ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED - 0 -# else - 1 -# endif - ) != PNG_HANDLE_CHUNK_ALWAYS) - { - fprintf(stderr, "%s: %s: internal error\n", d.program, d.file); - exit(99); - } - - /* Now find what the various supplied options cause to change: */ - if (!default_tests) - { - d.test = cmd; /* acts as a flag to say exit, do not longjmp */ -# ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED - perform_one_test(fp, argc, argv, default_flags, &d, 0); -# endif -# ifdef PNG_READ_USER_CHUNKS_SUPPORTED - perform_one_test(fp, argc, argv, default_flags, &d, 1); -# endif - d.test = init; - } - - else - { - const char **test = standard_tests; - - /* Set the exit_test pointer here so we can continue after a libpng error. - * NOTE: this leaks memory because the png_struct data from the failing - * test is never freed. - */ - while (*test) - { - const char *this_test = *test++; - const char **next = test; - int count = display_rc(&d, strict), new_count; - const char *result; - int arg_count = 0; - - while (*next) ++next, ++arg_count; - - perform_one_test_safe(fp, arg_count, test, default_flags, &d, - this_test); - - new_count = display_rc(&d, strict); - - if (new_count == count) - result = "PASS"; - - else - result = "FAIL"; - - printf("%s: %s %s\n", result, d.program, this_test); - - test = next+1; - } - } - - fclose(fp); - - if (display_rc(&d, strict) == 0) - { - /* Success, touch the success file if appropriate */ - if (touch_file != NULL) - { - FILE *fsuccess = fopen(touch_file, "wt"); - - if (fsuccess != NULL) - { - int err = 0; - fprintf(fsuccess, "PNG unknown tests succeeded\n"); - fflush(fsuccess); - err = ferror(fsuccess); - - if (fclose(fsuccess) || err) - { - fprintf(stderr, "%s: write failed\n", touch_file); - exit(99); - } - } - - else - { - fprintf(stderr, "%s: open failed\n", touch_file); - exit(99); - } - } - - return 0; - } - - return 1; -} - -#else /* !(READ_USER_CHUNKS || SAVE_UNKNOWN_CHUNKS) */ -int -main(void) -{ - fprintf(stderr, - " test ignored: no support to find out about unknown chunks\n"); - /* So the test is skipped: */ - return SKIP; -} -#endif /* READ_USER_CHUNKS || SAVE_UNKNOWN_CHUNKS */ - -#else /* !(SET_UNKNOWN_CHUNKS && READ) */ -int -main(void) -{ - fprintf(stderr, - " test ignored: no support to modify unknown chunk handling\n"); - /* So the test is skipped: */ - return SKIP; -} -#endif /* SET_UNKNOWN_CHUNKS && READ*/ diff --git a/thirdparty/libpng-1.6.37/contrib/libtests/pngvalid.c b/thirdparty/libpng-1.6.37/contrib/libtests/pngvalid.c deleted file mode 100644 index d800110..0000000 --- a/thirdparty/libpng-1.6.37/contrib/libtests/pngvalid.c +++ /dev/null @@ -1,12230 +0,0 @@ - -/* pngvalid.c - validate libpng by constructing then reading png files. - * - * Last changed in libpng 1.6.31 [July 27, 2017] - * Copyright (c) 2014-2017 John Cunningham Bowler - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - * - * NOTES: - * This is a C program that is intended to be linked against libpng. It - * generates bitmaps internally, stores them as PNG files (using the - * sequential write code) then reads them back (using the sequential - * read code) and validates that the result has the correct data. - * - * The program can be modified and extended to test the correctness of - * transformations performed by libpng. - */ - -#define _POSIX_SOURCE 1 -#define _ISOC99_SOURCE 1 /* For floating point */ -#define _GNU_SOURCE 1 /* For the floating point exception extension */ -#define _BSD_SOURCE 1 /* For the floating point exception extension */ - -#include -#include - -#if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H) -# include -#endif - -#ifdef HAVE_FEENABLEEXCEPT /* from config.h, if included */ -# include -#endif - -#ifndef FE_DIVBYZERO -# define FE_DIVBYZERO 0 -#endif -#ifndef FE_INVALID -# define FE_INVALID 0 -#endif -#ifndef FE_OVERFLOW -# define FE_OVERFLOW 0 -#endif - -/* Define the following to use this test against your installed libpng, rather - * than the one being built here: - */ -#ifdef PNG_FREESTANDING_TESTS -# include -#else -# include "../../png.h" -#endif - -#ifdef PNG_ZLIB_HEADER -# include PNG_ZLIB_HEADER -#else -# include /* For crc32 */ -#endif - -/* 1.6.1 added support for the configure test harness, which uses 77 to indicate - * a skipped test, in earlier versions we need to succeed on a skipped test, so: - */ -#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H) -# define SKIP 77 -#else -# define SKIP 0 -#endif - -/* pngvalid requires write support and one of the fixed or floating point APIs. - */ -#if defined(PNG_WRITE_SUPPORTED) &&\ - (defined(PNG_FIXED_POINT_SUPPORTED) || defined(PNG_FLOATING_POINT_SUPPORTED)) - -#if PNG_LIBPNG_VER < 10500 -/* This deliberately lacks the const. */ -typedef png_byte *png_const_bytep; - -/* This is copied from 1.5.1 png.h: */ -#define PNG_INTERLACE_ADAM7_PASSES 7 -#define PNG_PASS_START_ROW(pass) (((1U&~(pass))<<(3-((pass)>>1)))&7) -#define PNG_PASS_START_COL(pass) (((1U& (pass))<<(3-(((pass)+1)>>1)))&7) -#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) -#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) -#define PNG_PASS_ROWS(height, pass) (((height)+(((1<>PNG_PASS_ROW_SHIFT(pass)) -#define PNG_PASS_COLS(width, pass) (((width)+(((1<>PNG_PASS_COL_SHIFT(pass)) -#define PNG_ROW_FROM_PASS_ROW(yIn, pass) \ - (((yIn)<>(((7-(off))-(pass))<<2)) & 0xFU) | \ - ((0x01145AF0U>>(((7-(off))-(pass))<<2)) & 0xF0U)) -#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ - ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) -#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ - ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) - -/* These are needed too for the default build: */ -#define PNG_WRITE_16BIT_SUPPORTED -#define PNG_READ_16BIT_SUPPORTED - -/* This comes from pnglibconf.h after 1.5: */ -#define PNG_FP_1 100000 -#define PNG_GAMMA_THRESHOLD_FIXED\ - ((png_fixed_point)(PNG_GAMMA_THRESHOLD * PNG_FP_1)) -#endif - -#if PNG_LIBPNG_VER < 10600 - /* 1.6.0 constifies many APIs, the following exists to allow pngvalid to be - * compiled against earlier versions. - */ -# define png_const_structp png_structp -#endif - -#ifndef RELEASE_BUILD - /* RELEASE_BUILD is true for releases and release candidates: */ -# define RELEASE_BUILD (PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC) -#endif -#if RELEASE_BUILD -# define debugonly(something) -#else /* !RELEASE_BUILD */ -# define debugonly(something) something -#endif /* !RELEASE_BUILD */ - -#include /* For floating point constants */ -#include /* For malloc */ -#include /* For memcpy, memset */ -#include /* For floor */ - -/* Convenience macros. */ -#define CHUNK(a,b,c,d) (((a)<<24)+((b)<<16)+((c)<<8)+(d)) -#define CHUNK_IHDR CHUNK(73,72,68,82) -#define CHUNK_PLTE CHUNK(80,76,84,69) -#define CHUNK_IDAT CHUNK(73,68,65,84) -#define CHUNK_IEND CHUNK(73,69,78,68) -#define CHUNK_cHRM CHUNK(99,72,82,77) -#define CHUNK_gAMA CHUNK(103,65,77,65) -#define CHUNK_sBIT CHUNK(115,66,73,84) -#define CHUNK_sRGB CHUNK(115,82,71,66) - -/* Unused formal parameter errors are removed using the following macro which is - * expected to have no bad effects on performance. - */ -#ifndef UNUSED -# if defined(__GNUC__) || defined(_MSC_VER) -# define UNUSED(param) (void)param; -# else -# define UNUSED(param) -# endif -#endif - -/***************************** EXCEPTION HANDLING *****************************/ -#ifdef PNG_FREESTANDING_TESTS -# include -#else -# include "../visupng/cexcept.h" -#endif - -#ifdef __cplusplus -# define this not_the_cpp_this -# define new not_the_cpp_new -# define voidcast(type, value) static_cast(value) -#else -# define voidcast(type, value) (value) -#endif /* __cplusplus */ - -struct png_store; -define_exception_type(struct png_store*); - -/* The following are macros to reduce typing everywhere where the well known - * name 'the_exception_context' must be defined. - */ -#define anon_context(ps) struct exception_context *the_exception_context = \ - &(ps)->exception_context -#define context(ps,fault) anon_context(ps); png_store *fault - -/* This macro returns the number of elements in an array as an (unsigned int), - * it is necessary to avoid the inability of certain versions of GCC to use - * the value of a compile-time constant when performing range checks. It must - * be passed an array name. - */ -#define ARRAY_SIZE(a) ((unsigned int)((sizeof (a))/(sizeof (a)[0]))) - -/* GCC BUG 66447 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66447) requires - * some broken GCC versions to be fixed up to avoid invalid whining about auto - * variables that are *not* changed within the scope of a setjmp being changed. - * - * Feel free to extend the list of broken versions. - */ -#define is_gnu(major,minor)\ - (defined __GNUC__) && __GNUC__ == (major) && __GNUC_MINOR__ == (minor) -#define is_gnu_patch(major,minor,patch)\ - is_gnu(major,minor) && __GNUC_PATCHLEVEL__ == 0 -/* For the moment just do it always; all versions of GCC seem to be broken: */ -#ifdef __GNUC__ - const void * volatile make_volatile_for_gnu; -# define gnu_volatile(x) make_volatile_for_gnu = &x; -#else /* !GNUC broken versions */ -# define gnu_volatile(x) -#endif /* !GNUC broken versions */ - -/******************************* UTILITIES ************************************/ -/* Error handling is particularly problematic in production code - error - * handlers often themselves have bugs which lead to programs that detect - * minor errors crashing. The following functions deal with one very - * common class of errors in error handlers - attempting to format error or - * warning messages into buffers that are too small. - */ -static size_t safecat(char *buffer, size_t bufsize, size_t pos, - const char *cat) -{ - while (pos < bufsize && cat != NULL && *cat != 0) - buffer[pos++] = *cat++; - - if (pos >= bufsize) - pos = bufsize-1; - - buffer[pos] = 0; - return pos; -} - -static size_t safecatn(char *buffer, size_t bufsize, size_t pos, int n) -{ - char number[64]; - sprintf(number, "%d", n); - return safecat(buffer, bufsize, pos, number); -} - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -static size_t safecatd(char *buffer, size_t bufsize, size_t pos, double d, - int precision) -{ - char number[64]; - sprintf(number, "%.*f", precision, d); - return safecat(buffer, bufsize, pos, number); -} -#endif - -static const char invalid[] = "invalid"; -static const char sep[] = ": "; - -static const char *colour_types[8] = -{ - "grayscale", invalid, "truecolour", "indexed-colour", - "grayscale with alpha", invalid, "truecolour with alpha", invalid -}; - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -/* Convert a double precision value to fixed point. */ -static png_fixed_point -fix(double d) -{ - d = floor(d * PNG_FP_1 + .5); - return (png_fixed_point)d; -} -#endif /* PNG_READ_SUPPORTED */ - -/* Generate random bytes. This uses a boring repeatable algorithm and it - * is implemented here so that it gives the same set of numbers on every - * architecture. It's a linear congruential generator (Knuth or Sedgewick - * "Algorithms") but it comes from the 'feedback taps' table in Horowitz and - * Hill, "The Art of Electronics" (Pseudo-Random Bit Sequences and Noise - * Generation.) - */ -static void -make_random_bytes(png_uint_32* seed, void* pv, size_t size) -{ - png_uint_32 u0 = seed[0], u1 = seed[1]; - png_bytep bytes = voidcast(png_bytep, pv); - - /* There are thirty three bits, the next bit in the sequence is bit-33 XOR - * bit-20. The top 1 bit is in u1, the bottom 32 are in u0. - */ - size_t i; - for (i=0; i> (20-8)) ^ ((u1 << 7) | (u0 >> (32-7)))) & 0xff; - u1 <<= 8; - u1 |= u0 >> 24; - u0 <<= 8; - u0 |= u; - *bytes++ = (png_byte)u; - } - - seed[0] = u0; - seed[1] = u1; -} - -static void -make_four_random_bytes(png_uint_32* seed, png_bytep bytes) -{ - make_random_bytes(seed, bytes, 4); -} - -#if defined PNG_READ_SUPPORTED || defined PNG_WRITE_tRNS_SUPPORTED ||\ - defined PNG_WRITE_FILTER_SUPPORTED -static void -randomize(void *pv, size_t size) -{ - static png_uint_32 random_seed[2] = {0x56789abc, 0xd}; - make_random_bytes(random_seed, pv, size); -} - -#define R8(this) randomize(&(this), sizeof (this)) - -#ifdef PNG_READ_SUPPORTED -static png_byte -random_byte(void) -{ - unsigned char b1[1]; - randomize(b1, sizeof b1); - return b1[0]; -} -#endif /* READ */ - -static png_uint_16 -random_u16(void) -{ - unsigned char b2[2]; - randomize(b2, sizeof b2); - return png_get_uint_16(b2); -} - -#if defined PNG_READ_RGB_TO_GRAY_SUPPORTED ||\ - defined PNG_READ_FILLER_SUPPORTED -static png_uint_32 -random_u32(void) -{ - unsigned char b4[4]; - randomize(b4, sizeof b4); - return png_get_uint_32(b4); -} -#endif /* READ_FILLER || READ_RGB_TO_GRAY */ - -#endif /* READ || WRITE_tRNS || WRITE_FILTER */ - -#if defined PNG_READ_TRANSFORMS_SUPPORTED ||\ - defined PNG_WRITE_FILTER_SUPPORTED -static unsigned int -random_mod(unsigned int max) -{ - return random_u16() % max; /* 0 .. max-1 */ -} -#endif /* READ_TRANSFORMS || WRITE_FILTER */ - -#if (defined PNG_READ_RGB_TO_GRAY_SUPPORTED) ||\ - (defined PNG_READ_FILLER_SUPPORTED) -static int -random_choice(void) -{ - return random_byte() & 1; -} -#endif /* READ_RGB_TO_GRAY || READ_FILLER */ - -/* A numeric ID based on PNG file characteristics. The 'do_interlace' field - * simply records whether pngvalid did the interlace itself or whether it - * was done by libpng. Width and height must be less than 256. 'palette' is an - * index of the palette to use for formats with a palette otherwise a boolean - * indicating if a tRNS chunk was generated. - */ -#define FILEID(col, depth, palette, interlace, width, height, do_interlace) \ - ((png_uint_32)((col) + ((depth)<<3) + ((palette)<<8) + ((interlace)<<13) + \ - (((do_interlace)!=0)<<15) + ((width)<<16) + ((height)<<24))) - -#define COL_FROM_ID(id) ((png_byte)((id)& 0x7U)) -#define DEPTH_FROM_ID(id) ((png_byte)(((id) >> 3) & 0x1fU)) -#define PALETTE_FROM_ID(id) (((id) >> 8) & 0x1f) -#define INTERLACE_FROM_ID(id) ((png_byte)(((id) >> 13) & 0x3)) -#define DO_INTERLACE_FROM_ID(id) ((int)(((id)>>15) & 1)) -#define WIDTH_FROM_ID(id) (((id)>>16) & 0xff) -#define HEIGHT_FROM_ID(id) (((id)>>24) & 0xff) - -/* Utility to construct a standard name for a standard image. */ -static size_t -standard_name(char *buffer, size_t bufsize, size_t pos, png_byte colour_type, - int bit_depth, unsigned int npalette, int interlace_type, - png_uint_32 w, png_uint_32 h, int do_interlace) -{ - pos = safecat(buffer, bufsize, pos, colour_types[colour_type]); - if (colour_type == 3) /* must have a palette */ - { - pos = safecat(buffer, bufsize, pos, "["); - pos = safecatn(buffer, bufsize, pos, npalette); - pos = safecat(buffer, bufsize, pos, "]"); - } - - else if (npalette != 0) - pos = safecat(buffer, bufsize, pos, "+tRNS"); - - pos = safecat(buffer, bufsize, pos, " "); - pos = safecatn(buffer, bufsize, pos, bit_depth); - pos = safecat(buffer, bufsize, pos, " bit"); - - if (interlace_type != PNG_INTERLACE_NONE) - { - pos = safecat(buffer, bufsize, pos, " interlaced"); - if (do_interlace) - pos = safecat(buffer, bufsize, pos, "(pngvalid)"); - else - pos = safecat(buffer, bufsize, pos, "(libpng)"); - } - - if (w > 0 || h > 0) - { - pos = safecat(buffer, bufsize, pos, " "); - pos = safecatn(buffer, bufsize, pos, w); - pos = safecat(buffer, bufsize, pos, "x"); - pos = safecatn(buffer, bufsize, pos, h); - } - - return pos; -} - -static size_t -standard_name_from_id(char *buffer, size_t bufsize, size_t pos, png_uint_32 id) -{ - return standard_name(buffer, bufsize, pos, COL_FROM_ID(id), - DEPTH_FROM_ID(id), PALETTE_FROM_ID(id), INTERLACE_FROM_ID(id), - WIDTH_FROM_ID(id), HEIGHT_FROM_ID(id), DO_INTERLACE_FROM_ID(id)); -} - -/* Convenience API and defines to list valid formats. Note that 16 bit read and - * write support is required to do 16 bit read tests (we must be able to make a - * 16 bit image to test!) - */ -#ifdef PNG_WRITE_16BIT_SUPPORTED -# define WRITE_BDHI 4 -# ifdef PNG_READ_16BIT_SUPPORTED -# define READ_BDHI 4 -# define DO_16BIT -# endif -#else -# define WRITE_BDHI 3 -#endif -#ifndef DO_16BIT -# define READ_BDHI 3 -#endif - -/* The following defines the number of different palettes to generate for - * each log bit depth of a colour type 3 standard image. - */ -#define PALETTE_COUNT(bit_depth) ((bit_depth) > 4 ? 1U : 16U) - -static int -next_format(png_bytep colour_type, png_bytep bit_depth, - unsigned int* palette_number, int low_depth_gray, int tRNS) -{ - if (*bit_depth == 0) - { - *colour_type = 0; - if (low_depth_gray) - *bit_depth = 1; - else - *bit_depth = 8; - *palette_number = 0; - return 1; - } - - if (*colour_type < 4/*no alpha channel*/) - { - /* Add multiple palettes for colour type 3, one image with tRNS - * and one without for other non-alpha formats: - */ - unsigned int pn = ++*palette_number; - png_byte ct = *colour_type; - - if (((ct == 0/*GRAY*/ || ct/*RGB*/ == 2) && tRNS && pn < 2) || - (ct == 3/*PALETTE*/ && pn < PALETTE_COUNT(*bit_depth))) - return 1; - - /* No: next bit depth */ - *palette_number = 0; - } - - *bit_depth = (png_byte)(*bit_depth << 1); - - /* Palette images are restricted to 8 bit depth */ - if (*bit_depth <= 8 -#ifdef DO_16BIT - || (*colour_type != 3 && *bit_depth <= 16) -#endif - ) - return 1; - - /* Move to the next color type, or return 0 at the end. */ - switch (*colour_type) - { - case 0: - *colour_type = 2; - *bit_depth = 8; - return 1; - - case 2: - *colour_type = 3; - *bit_depth = 1; - return 1; - - case 3: - *colour_type = 4; - *bit_depth = 8; - return 1; - - case 4: - *colour_type = 6; - *bit_depth = 8; - return 1; - - default: - return 0; - } -} - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -static unsigned int -sample(png_const_bytep row, png_byte colour_type, png_byte bit_depth, - png_uint_32 x, unsigned int sample_index, int swap16, int littleendian) -{ - png_uint_32 bit_index, result; - - /* Find a sample index for the desired sample: */ - x *= bit_depth; - bit_index = x; - - if ((colour_type & 1) == 0) /* !palette */ - { - if (colour_type & 2) - bit_index *= 3; - - if (colour_type & 4) - bit_index += x; /* Alpha channel */ - - /* Multiple channels; select one: */ - if (colour_type & (2+4)) - bit_index += sample_index * bit_depth; - } - - /* Return the sample from the row as an integer. */ - row += bit_index >> 3; - result = *row; - - if (bit_depth == 8) - return result; - - else if (bit_depth > 8) - { - if (swap16) - return (*++row << 8) + result; - else - return (result << 8) + *++row; - } - - /* Less than 8 bits per sample. By default PNG has the big end of - * the egg on the left of the screen, but if littleendian is set - * then the big end is on the right. - */ - bit_index &= 7; - - if (!littleendian) - bit_index = 8-bit_index-bit_depth; - - return (result >> bit_index) & ((1U<> 3] & ~destMask; - unsigned int sourceByte = fromBuffer[fromIndex >> 3]; - - /* Don't rely on << or >> supporting '0' here, just in case: */ - fromIndex &= 7; - if (littleendian) - { - if (fromIndex > 0) sourceByte >>= fromIndex; - if ((toIndex & 7) > 0) sourceByte <<= toIndex & 7; - } - - else - { - if (fromIndex > 0) sourceByte <<= fromIndex; - if ((toIndex & 7) > 0) sourceByte >>= toIndex & 7; - } - - toBuffer[toIndex >> 3] = (png_byte)(destByte | (sourceByte & destMask)); - } - else /* One or more bytes */ - memmove(toBuffer+(toIndex>>3), fromBuffer+(fromIndex>>3), pixelSize>>3); -} - -#ifdef PNG_READ_SUPPORTED -/* Copy a complete row of pixels, taking into account potential partial - * bytes at the end. - */ -static void -row_copy(png_bytep toBuffer, png_const_bytep fromBuffer, unsigned int bitWidth, - int littleendian) -{ - memcpy(toBuffer, fromBuffer, bitWidth >> 3); - - if ((bitWidth & 7) != 0) - { - unsigned int mask; - - toBuffer += bitWidth >> 3; - fromBuffer += bitWidth >> 3; - if (littleendian) - mask = 0xff << (bitWidth & 7); - else - mask = 0xff >> (bitWidth & 7); - *toBuffer = (png_byte)((*toBuffer & mask) | (*fromBuffer & ~mask)); - } -} - -/* Compare pixels - they are assumed to start at the first byte in the - * given buffers. - */ -static int -pixel_cmp(png_const_bytep pa, png_const_bytep pb, png_uint_32 bit_width) -{ -#if PNG_LIBPNG_VER < 10506 - if (memcmp(pa, pb, bit_width>>3) == 0) - { - png_uint_32 p; - - if ((bit_width & 7) == 0) return 0; - - /* Ok, any differences? */ - p = pa[bit_width >> 3]; - p ^= pb[bit_width >> 3]; - - if (p == 0) return 0; - - /* There are, but they may not be significant, remove the bits - * after the end (the low order bits in PNG.) - */ - bit_width &= 7; - p >>= 8-bit_width; - - if (p == 0) return 0; - } -#else - /* From libpng-1.5.6 the overwrite should be fixed, so compare the trailing - * bits too: - */ - if (memcmp(pa, pb, (bit_width+7)>>3) == 0) - return 0; -#endif - - /* Return the index of the changed byte. */ - { - png_uint_32 where = 0; - - while (pa[where] == pb[where]) ++where; - return 1+where; - } -} -#endif /* PNG_READ_SUPPORTED */ - -/*************************** BASIC PNG FILE WRITING ***************************/ -/* A png_store takes data from the sequential writer or provides data - * to the sequential reader. It can also store the result of a PNG - * write for later retrieval. - */ -#define STORE_BUFFER_SIZE 500 /* arbitrary */ -typedef struct png_store_buffer -{ - struct png_store_buffer* prev; /* NOTE: stored in reverse order */ - png_byte buffer[STORE_BUFFER_SIZE]; -} png_store_buffer; - -#define FILE_NAME_SIZE 64 - -typedef struct store_palette_entry /* record of a single palette entry */ -{ - png_byte red; - png_byte green; - png_byte blue; - png_byte alpha; -} store_palette_entry, store_palette[256]; - -typedef struct png_store_file -{ - struct png_store_file* next; /* as many as you like... */ - char name[FILE_NAME_SIZE]; - unsigned int IDAT_bits; /* Number of bits in IDAT size */ - png_uint_32 IDAT_size; /* Total size of IDAT data */ - png_uint_32 id; /* must be correct (see FILEID) */ - size_t datacount; /* In this (the last) buffer */ - png_store_buffer data; /* Last buffer in file */ - int npalette; /* Number of entries in palette */ - store_palette_entry* palette; /* May be NULL */ -} png_store_file; - -/* The following is a pool of memory allocated by a single libpng read or write - * operation. - */ -typedef struct store_pool -{ - struct png_store *store; /* Back pointer */ - struct store_memory *list; /* List of allocated memory */ - png_byte mark[4]; /* Before and after data */ - - /* Statistics for this run. */ - png_alloc_size_t max; /* Maximum single allocation */ - png_alloc_size_t current; /* Current allocation */ - png_alloc_size_t limit; /* Highest current allocation */ - png_alloc_size_t total; /* Total allocation */ - - /* Overall statistics (retained across successive runs). */ - png_alloc_size_t max_max; - png_alloc_size_t max_limit; - png_alloc_size_t max_total; -} store_pool; - -typedef struct png_store -{ - /* For cexcept.h exception handling - simply store one of these; - * the context is a self pointer but it may point to a different - * png_store (in fact it never does in this program.) - */ - struct exception_context - exception_context; - - unsigned int verbose :1; - unsigned int treat_warnings_as_errors :1; - unsigned int expect_error :1; - unsigned int expect_warning :1; - unsigned int saw_warning :1; - unsigned int speed :1; - unsigned int progressive :1; /* use progressive read */ - unsigned int validated :1; /* used as a temporary flag */ - int nerrors; - int nwarnings; - int noptions; /* number of options below: */ - struct { - unsigned char option; /* option number, 0..30 */ - unsigned char setting; /* setting (unset,invalid,on,off) */ - } options[16]; - char test[128]; /* Name of test */ - char error[256]; - - /* Share fields */ - png_uint_32 chunklen; /* Length of chunk+overhead (chunkpos >= 8) */ - png_uint_32 chunktype;/* Type of chunk (valid if chunkpos >= 4) */ - png_uint_32 chunkpos; /* Position in chunk */ - png_uint_32 IDAT_size;/* Accumulated IDAT size in .new */ - unsigned int IDAT_bits;/* Cache of the file store value */ - - /* Read fields */ - png_structp pread; /* Used to read a saved file */ - png_infop piread; - png_store_file* current; /* Set when reading */ - png_store_buffer* next; /* Set when reading */ - size_t readpos; /* Position in *next */ - png_byte* image; /* Buffer for reading interlaced images */ - size_t cb_image; /* Size of this buffer */ - size_t cb_row; /* Row size of the image(s) */ - uLong IDAT_crc; - png_uint_32 IDAT_len; /* Used when re-chunking IDAT chunks */ - png_uint_32 IDAT_pos; /* Used when re-chunking IDAT chunks */ - png_uint_32 image_h; /* Number of rows in a single image */ - store_pool read_memory_pool; - - /* Write fields */ - png_store_file* saved; - png_structp pwrite; /* Used when writing a new file */ - png_infop piwrite; - size_t writepos; /* Position in .new */ - char wname[FILE_NAME_SIZE]; - png_store_buffer new; /* The end of the new PNG file being written. */ - store_pool write_memory_pool; - store_palette_entry* palette; - int npalette; -} png_store; - -/* Initialization and cleanup */ -static void -store_pool_mark(png_bytep mark) -{ - static png_uint_32 store_seed[2] = { 0x12345678, 1}; - - make_four_random_bytes(store_seed, mark); -} - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -/* Use this for random 32 bit values; this function makes sure the result is - * non-zero. - */ -static png_uint_32 -random_32(void) -{ - - for (;;) - { - png_byte mark[4]; - png_uint_32 result; - - store_pool_mark(mark); - result = png_get_uint_32(mark); - - if (result != 0) - return result; - } -} -#endif /* PNG_READ_SUPPORTED */ - -static void -store_pool_init(png_store *ps, store_pool *pool) -{ - memset(pool, 0, sizeof *pool); - - pool->store = ps; - pool->list = NULL; - pool->max = pool->current = pool->limit = pool->total = 0; - pool->max_max = pool->max_limit = pool->max_total = 0; - store_pool_mark(pool->mark); -} - -static void -store_init(png_store* ps) -{ - memset(ps, 0, sizeof *ps); - init_exception_context(&ps->exception_context); - store_pool_init(ps, &ps->read_memory_pool); - store_pool_init(ps, &ps->write_memory_pool); - ps->verbose = 0; - ps->treat_warnings_as_errors = 0; - ps->expect_error = 0; - ps->expect_warning = 0; - ps->saw_warning = 0; - ps->speed = 0; - ps->progressive = 0; - ps->validated = 0; - ps->nerrors = ps->nwarnings = 0; - ps->pread = NULL; - ps->piread = NULL; - ps->saved = ps->current = NULL; - ps->next = NULL; - ps->readpos = 0; - ps->image = NULL; - ps->cb_image = 0; - ps->cb_row = 0; - ps->image_h = 0; - ps->pwrite = NULL; - ps->piwrite = NULL; - ps->writepos = 0; - ps->chunkpos = 8; - ps->chunktype = 0; - ps->chunklen = 16; - ps->IDAT_size = 0; - ps->IDAT_bits = 0; - ps->new.prev = NULL; - ps->palette = NULL; - ps->npalette = 0; - ps->noptions = 0; -} - -static void -store_freebuffer(png_store_buffer* psb) -{ - if (psb->prev) - { - store_freebuffer(psb->prev); - free(psb->prev); - psb->prev = NULL; - } -} - -static void -store_freenew(png_store *ps) -{ - store_freebuffer(&ps->new); - ps->writepos = 0; - ps->chunkpos = 8; - ps->chunktype = 0; - ps->chunklen = 16; - ps->IDAT_size = 0; - ps->IDAT_bits = 0; - if (ps->palette != NULL) - { - free(ps->palette); - ps->palette = NULL; - ps->npalette = 0; - } -} - -static void -store_storenew(png_store *ps) -{ - png_store_buffer *pb; - - pb = voidcast(png_store_buffer*, malloc(sizeof *pb)); - - if (pb == NULL) - png_error(ps->pwrite, "store new: OOM"); - - *pb = ps->new; - ps->new.prev = pb; - ps->writepos = 0; -} - -static void -store_freefile(png_store_file **ppf) -{ - if (*ppf != NULL) - { - store_freefile(&(*ppf)->next); - - store_freebuffer(&(*ppf)->data); - (*ppf)->datacount = 0; - if ((*ppf)->palette != NULL) - { - free((*ppf)->palette); - (*ppf)->palette = NULL; - (*ppf)->npalette = 0; - } - free(*ppf); - *ppf = NULL; - } -} - -static unsigned int -bits_of(png_uint_32 num) -{ - /* Return the number of bits in 'num' */ - unsigned int b = 0; - - if (num & 0xffff0000U) b += 16U, num >>= 16; - if (num & 0xff00U) b += 8U, num >>= 8; - if (num & 0xf0U) b += 4U, num >>= 4; - if (num & 0xcU) b += 2U, num >>= 2; - if (num & 0x2U) ++b, num >>= 1; - if (num) ++b; - - return b; /* 0..32 */ -} - -/* Main interface to file storage, after writing a new PNG file (see the API - * below) call store_storefile to store the result with the given name and id. - */ -static void -store_storefile(png_store *ps, png_uint_32 id) -{ - png_store_file *pf; - - if (ps->chunkpos != 0U || ps->chunktype != 0U || ps->chunklen != 0U || - ps->IDAT_size == 0) - png_error(ps->pwrite, "storefile: incomplete write"); - - pf = voidcast(png_store_file*, malloc(sizeof *pf)); - if (pf == NULL) - png_error(ps->pwrite, "storefile: OOM"); - safecat(pf->name, sizeof pf->name, 0, ps->wname); - pf->id = id; - pf->data = ps->new; - pf->datacount = ps->writepos; - pf->IDAT_size = ps->IDAT_size; - pf->IDAT_bits = bits_of(ps->IDAT_size); - /* Because the IDAT always has zlib header stuff this must be true: */ - if (pf->IDAT_bits == 0U) - png_error(ps->pwrite, "storefile: 0 sized IDAT"); - ps->new.prev = NULL; - ps->writepos = 0; - ps->chunkpos = 8; - ps->chunktype = 0; - ps->chunklen = 16; - ps->IDAT_size = 0; - pf->palette = ps->palette; - pf->npalette = ps->npalette; - ps->palette = 0; - ps->npalette = 0; - - /* And save it. */ - pf->next = ps->saved; - ps->saved = pf; -} - -/* Generate an error message (in the given buffer) */ -static size_t -store_message(png_store *ps, png_const_structp pp, char *buffer, size_t bufsize, - size_t pos, const char *msg) -{ - if (pp != NULL && pp == ps->pread) - { - /* Reading a file */ - pos = safecat(buffer, bufsize, pos, "read: "); - - if (ps->current != NULL) - { - pos = safecat(buffer, bufsize, pos, ps->current->name); - pos = safecat(buffer, bufsize, pos, sep); - } - } - - else if (pp != NULL && pp == ps->pwrite) - { - /* Writing a file */ - pos = safecat(buffer, bufsize, pos, "write: "); - pos = safecat(buffer, bufsize, pos, ps->wname); - pos = safecat(buffer, bufsize, pos, sep); - } - - else - { - /* Neither reading nor writing (or a memory error in struct delete) */ - pos = safecat(buffer, bufsize, pos, "pngvalid: "); - } - - if (ps->test[0] != 0) - { - pos = safecat(buffer, bufsize, pos, ps->test); - pos = safecat(buffer, bufsize, pos, sep); - } - pos = safecat(buffer, bufsize, pos, msg); - return pos; -} - -/* Verbose output to the error stream: */ -static void -store_verbose(png_store *ps, png_const_structp pp, png_const_charp prefix, - png_const_charp message) -{ - char buffer[512]; - - if (prefix) - fputs(prefix, stderr); - - (void)store_message(ps, pp, buffer, sizeof buffer, 0, message); - fputs(buffer, stderr); - fputc('\n', stderr); -} - -/* Log an error or warning - the relevant count is always incremented. */ -static void -store_log(png_store* ps, png_const_structp pp, png_const_charp message, - int is_error) -{ - /* The warning is copied to the error buffer if there are no errors and it is - * the first warning. The error is copied to the error buffer if it is the - * first error (overwriting any prior warnings). - */ - if (is_error ? (ps->nerrors)++ == 0 : - (ps->nwarnings)++ == 0 && ps->nerrors == 0) - store_message(ps, pp, ps->error, sizeof ps->error, 0, message); - - if (ps->verbose) - store_verbose(ps, pp, is_error ? "error: " : "warning: ", message); -} - -#ifdef PNG_READ_SUPPORTED -/* Internal error function, called with a png_store but no libpng stuff. */ -static void -internal_error(png_store *ps, png_const_charp message) -{ - store_log(ps, NULL, message, 1 /* error */); - - /* And finally throw an exception. */ - { - struct exception_context *the_exception_context = &ps->exception_context; - Throw ps; - } -} -#endif /* PNG_READ_SUPPORTED */ - -/* Functions to use as PNG callbacks. */ -static void PNGCBAPI -store_error(png_structp ppIn, png_const_charp message) /* PNG_NORETURN */ -{ - png_const_structp pp = ppIn; - png_store *ps = voidcast(png_store*, png_get_error_ptr(pp)); - - if (!ps->expect_error) - store_log(ps, pp, message, 1 /* error */); - - /* And finally throw an exception. */ - { - struct exception_context *the_exception_context = &ps->exception_context; - Throw ps; - } -} - -static void PNGCBAPI -store_warning(png_structp ppIn, png_const_charp message) -{ - png_const_structp pp = ppIn; - png_store *ps = voidcast(png_store*, png_get_error_ptr(pp)); - - if (!ps->expect_warning) - store_log(ps, pp, message, 0 /* warning */); - else - ps->saw_warning = 1; -} - -/* These somewhat odd functions are used when reading an image to ensure that - * the buffer is big enough, the png_structp is for errors. - */ -/* Return a single row from the correct image. */ -static png_bytep -store_image_row(const png_store* ps, png_const_structp pp, int nImage, - png_uint_32 y) -{ - size_t coffset = (nImage * ps->image_h + y) * (ps->cb_row + 5) + 2; - - if (ps->image == NULL) - png_error(pp, "no allocated image"); - - if (coffset + ps->cb_row + 3 > ps->cb_image) - png_error(pp, "image too small"); - - return ps->image + coffset; -} - -static void -store_image_free(png_store *ps, png_const_structp pp) -{ - if (ps->image != NULL) - { - png_bytep image = ps->image; - - if (image[-1] != 0xed || image[ps->cb_image] != 0xfe) - { - if (pp != NULL) - png_error(pp, "png_store image overwrite (1)"); - else - store_log(ps, NULL, "png_store image overwrite (2)", 1); - } - - ps->image = NULL; - ps->cb_image = 0; - --image; - free(image); - } -} - -static void -store_ensure_image(png_store *ps, png_const_structp pp, int nImages, - size_t cbRow, png_uint_32 cRows) -{ - size_t cb = nImages * cRows * (cbRow + 5); - - if (ps->cb_image < cb) - { - png_bytep image; - - store_image_free(ps, pp); - - /* The buffer is deliberately mis-aligned. */ - image = voidcast(png_bytep, malloc(cb+2)); - if (image == NULL) - { - /* Called from the startup - ignore the error for the moment. */ - if (pp == NULL) - return; - - png_error(pp, "OOM allocating image buffer"); - } - - /* These magic tags are used to detect overwrites above. */ - ++image; - image[-1] = 0xed; - image[cb] = 0xfe; - - ps->image = image; - ps->cb_image = cb; - } - - /* We have an adequate sized image; lay out the rows. There are 2 bytes at - * the start and three at the end of each (this ensures that the row - * alignment starts out odd - 2+1 and changes for larger images on each row.) - */ - ps->cb_row = cbRow; - ps->image_h = cRows; - - /* For error checking, the whole buffer is set to 10110010 (0xb2 - 178). - * This deliberately doesn't match the bits in the size test image which are - * outside the image; these are set to 0xff (all 1). To make the row - * comparison work in the 'size' test case the size rows are pre-initialized - * to the same value prior to calling 'standard_row'. - */ - memset(ps->image, 178, cb); - - /* Then put in the marks. */ - while (--nImages >= 0) - { - png_uint_32 y; - - for (y=0; yimage; - - if (image[-1] != 0xed || image[ps->cb_image] != 0xfe) - png_error(pp, "image overwrite"); - else - { - size_t cbRow = ps->cb_row; - png_uint_32 rows = ps->image_h; - - image += iImage * (cbRow+5) * ps->image_h; - - image += 2; /* skip image first row markers */ - - for (; rows > 0; --rows) - { - if (image[-2] != 190 || image[-1] != 239) - png_error(pp, "row start overwritten"); - - if (image[cbRow] != 222 || image[cbRow+1] != 173 || - image[cbRow+2] != 17) - png_error(pp, "row end overwritten"); - - image += cbRow+5; - } - } -} -#endif /* PNG_READ_SUPPORTED */ - -static int -valid_chunktype(png_uint_32 chunktype) -{ - /* Each byte in the chunk type must be in one of the ranges 65..90, 97..122 - * (both inclusive), so: - */ - unsigned int i; - - for (i=0; i<4; ++i) - { - unsigned int c = chunktype & 0xffU; - - if (!((c >= 65U && c <= 90U) || (c >= 97U && c <= 122U))) - return 0; - - chunktype >>= 8; - } - - return 1; /* It's valid */ -} - -static void PNGCBAPI -store_write(png_structp ppIn, png_bytep pb, size_t st) -{ - png_const_structp pp = ppIn; - png_store *ps = voidcast(png_store*, png_get_io_ptr(pp)); - size_t writepos = ps->writepos; - png_uint_32 chunkpos = ps->chunkpos; - png_uint_32 chunktype = ps->chunktype; - png_uint_32 chunklen = ps->chunklen; - - if (ps->pwrite != pp) - png_error(pp, "store state damaged"); - - /* Technically this is legal, but in practice libpng never writes more than - * the maximum chunk size at once so if it happens something weird has - * changed inside libpng (probably). - */ - if (st > 0x7fffffffU) - png_error(pp, "unexpected write size"); - - /* Now process the bytes to be written. Do this in units of the space in the - * output (write) buffer or, at the start 4 bytes for the chunk type and - * length limited in any case by the amount of data. - */ - while (st > 0) - { - if (writepos >= STORE_BUFFER_SIZE) - store_storenew(ps), writepos = 0; - - if (chunkpos < 4) - { - png_byte b = *pb++; - --st; - chunklen = (chunklen << 8) + b; - ps->new.buffer[writepos++] = b; - ++chunkpos; - } - - else if (chunkpos < 8) - { - png_byte b = *pb++; - --st; - chunktype = (chunktype << 8) + b; - ps->new.buffer[writepos++] = b; - - if (++chunkpos == 8) - { - chunklen &= 0xffffffffU; - if (chunklen > 0x7fffffffU) - png_error(pp, "chunk length too great"); - - chunktype &= 0xffffffffU; - if (chunktype == CHUNK_IDAT) - { - if (chunklen > ~ps->IDAT_size) - png_error(pp, "pngvalid internal image too large"); - - ps->IDAT_size += chunklen; - } - - else if (!valid_chunktype(chunktype)) - png_error(pp, "invalid chunk type"); - - chunklen += 12; /* for header and CRC */ - } - } - - else /* chunkpos >= 8 */ - { - size_t cb = st; - - if (cb > STORE_BUFFER_SIZE - writepos) - cb = STORE_BUFFER_SIZE - writepos; - - if (cb > chunklen - chunkpos/* bytes left in chunk*/) - cb = (size_t)/*SAFE*/(chunklen - chunkpos); - - memcpy(ps->new.buffer + writepos, pb, cb); - chunkpos += (png_uint_32)/*SAFE*/cb; - pb += cb; - writepos += cb; - st -= cb; - - if (chunkpos >= chunklen) /* must be equal */ - chunkpos = chunktype = chunklen = 0; - } - } /* while (st > 0) */ - - ps->writepos = writepos; - ps->chunkpos = chunkpos; - ps->chunktype = chunktype; - ps->chunklen = chunklen; -} - -static void PNGCBAPI -store_flush(png_structp ppIn) -{ - UNUSED(ppIn) /*DOES NOTHING*/ -} - -#ifdef PNG_READ_SUPPORTED -static size_t -store_read_buffer_size(png_store *ps) -{ - /* Return the bytes available for read in the current buffer. */ - if (ps->next != &ps->current->data) - return STORE_BUFFER_SIZE; - - return ps->current->datacount; -} - -/* Return total bytes available for read. */ -static size_t -store_read_buffer_avail(png_store *ps) -{ - if (ps->current != NULL && ps->next != NULL) - { - png_store_buffer *next = &ps->current->data; - size_t cbAvail = ps->current->datacount; - - while (next != ps->next && next != NULL) - { - next = next->prev; - cbAvail += STORE_BUFFER_SIZE; - } - - if (next != ps->next) - png_error(ps->pread, "buffer read error"); - - if (cbAvail > ps->readpos) - return cbAvail - ps->readpos; - } - - return 0; -} - -static int -store_read_buffer_next(png_store *ps) -{ - png_store_buffer *pbOld = ps->next; - png_store_buffer *pbNew = &ps->current->data; - if (pbOld != pbNew) - { - while (pbNew != NULL && pbNew->prev != pbOld) - pbNew = pbNew->prev; - - if (pbNew != NULL) - { - ps->next = pbNew; - ps->readpos = 0; - return 1; - } - - png_error(ps->pread, "buffer lost"); - } - - return 0; /* EOF or error */ -} - -/* Need separate implementation and callback to allow use of the same code - * during progressive read, where the io_ptr is set internally by libpng. - */ -static void -store_read_imp(png_store *ps, png_bytep pb, size_t st) -{ - if (ps->current == NULL || ps->next == NULL) - png_error(ps->pread, "store state damaged"); - - while (st > 0) - { - size_t cbAvail = store_read_buffer_size(ps) - ps->readpos; - - if (cbAvail > 0) - { - if (cbAvail > st) cbAvail = st; - memcpy(pb, ps->next->buffer + ps->readpos, cbAvail); - st -= cbAvail; - pb += cbAvail; - ps->readpos += cbAvail; - } - - else if (!store_read_buffer_next(ps)) - png_error(ps->pread, "read beyond end of file"); - } -} - -static size_t -store_read_chunk(png_store *ps, png_bytep pb, size_t max, size_t min) -{ - png_uint_32 chunklen = ps->chunklen; - png_uint_32 chunktype = ps->chunktype; - png_uint_32 chunkpos = ps->chunkpos; - size_t st = max; - - if (st > 0) do - { - if (chunkpos >= chunklen) /* end of last chunk */ - { - png_byte buffer[8]; - - /* Read the header of the next chunk: */ - store_read_imp(ps, buffer, 8U); - chunklen = png_get_uint_32(buffer) + 12U; - chunktype = png_get_uint_32(buffer+4U); - chunkpos = 0U; /* Position read so far */ - } - - if (chunktype == CHUNK_IDAT) - { - png_uint_32 IDAT_pos = ps->IDAT_pos; - png_uint_32 IDAT_len = ps->IDAT_len; - png_uint_32 IDAT_size = ps->IDAT_size; - - /* The IDAT headers are constructed here; skip the input header. */ - if (chunkpos < 8U) - chunkpos = 8U; - - if (IDAT_pos == IDAT_len) - { - png_byte random = random_byte(); - - /* Make a new IDAT chunk, if IDAT_len is 0 this is the first IDAT, - * if IDAT_size is 0 this is the end. At present this is set up - * using a random number so that there is a 25% chance before - * the start of the first IDAT chunk being 0 length. - */ - if (IDAT_len == 0U) /* First IDAT */ - { - switch (random & 3U) - { - case 0U: IDAT_len = 12U; break; /* 0 bytes */ - case 1U: IDAT_len = 13U; break; /* 1 byte */ - default: IDAT_len = random_u32(); - IDAT_len %= IDAT_size; - IDAT_len += 13U; /* 1..IDAT_size bytes */ - break; - } - } - - else if (IDAT_size == 0U) /* all IDAT data read */ - { - /* The last (IDAT) chunk should be positioned at the CRC now: */ - if (chunkpos != chunklen-4U) - png_error(ps->pread, "internal: IDAT size mismatch"); - - /* The only option here is to add a zero length IDAT, this - * happens 25% of the time. Because of the check above - * chunklen-4U-chunkpos must be zero, we just need to skip the - * CRC now. - */ - if ((random & 3U) == 0U) - IDAT_len = 12U; /* Output another 0 length IDAT */ - - else - { - /* End of IDATs, skip the CRC to make the code above load the - * next chunk header next time round. - */ - png_byte buffer[4]; - - store_read_imp(ps, buffer, 4U); - chunkpos += 4U; - ps->IDAT_pos = IDAT_pos; - ps->IDAT_len = IDAT_len; - ps->IDAT_size = 0U; - continue; /* Read the next chunk */ - } - } - - else - { - /* Middle of IDATs, use 'random' to determine the number of bits - * to use in the IDAT length. - */ - IDAT_len = random_u32(); - IDAT_len &= (1U << (1U + random % ps->IDAT_bits)) - 1U; - if (IDAT_len > IDAT_size) - IDAT_len = IDAT_size; - IDAT_len += 12U; /* zero bytes may occur */ - } - - IDAT_pos = 0U; - ps->IDAT_crc = 0x35af061e; /* Ie: crc32(0UL, "IDAT", 4) */ - } /* IDAT_pos == IDAT_len */ - - if (IDAT_pos < 8U) /* Return the header */ do - { - png_uint_32 b; - unsigned int shift; - - if (IDAT_pos < 4U) - b = IDAT_len - 12U; - - else - b = CHUNK_IDAT; - - shift = 3U & IDAT_pos; - ++IDAT_pos; - - if (shift < 3U) - b >>= 8U*(3U-shift); - - *pb++ = 0xffU & b; - } - while (--st > 0 && IDAT_pos < 8); - - else if (IDAT_pos < IDAT_len - 4U) /* I.e not the CRC */ - { - if (chunkpos < chunklen-4U) - { - uInt avail = (uInt)-1; - - if (avail > (IDAT_len-4U) - IDAT_pos) - avail = (uInt)/*SAFE*/((IDAT_len-4U) - IDAT_pos); - - if (avail > st) - avail = (uInt)/*SAFE*/st; - - if (avail > (chunklen-4U) - chunkpos) - avail = (uInt)/*SAFE*/((chunklen-4U) - chunkpos); - - store_read_imp(ps, pb, avail); - ps->IDAT_crc = crc32(ps->IDAT_crc, pb, avail); - pb += (size_t)/*SAFE*/avail; - st -= (size_t)/*SAFE*/avail; - chunkpos += (png_uint_32)/*SAFE*/avail; - IDAT_size -= (png_uint_32)/*SAFE*/avail; - IDAT_pos += (png_uint_32)/*SAFE*/avail; - } - - else /* skip the input CRC */ - { - png_byte buffer[4]; - - store_read_imp(ps, buffer, 4U); - chunkpos += 4U; - } - } - - else /* IDAT crc */ do - { - uLong b = ps->IDAT_crc; - unsigned int shift = (IDAT_len - IDAT_pos); /* 4..1 */ - ++IDAT_pos; - - if (shift > 1U) - b >>= 8U*(shift-1U); - - *pb++ = 0xffU & b; - } - while (--st > 0 && IDAT_pos < IDAT_len); - - ps->IDAT_pos = IDAT_pos; - ps->IDAT_len = IDAT_len; - ps->IDAT_size = IDAT_size; - } - - else /* !IDAT */ - { - /* If there is still some pending IDAT data after the IDAT chunks have - * been processed there is a problem: - */ - if (ps->IDAT_len > 0 && ps->IDAT_size > 0) - png_error(ps->pread, "internal: missing IDAT data"); - - if (chunktype == CHUNK_IEND && ps->IDAT_len == 0U) - png_error(ps->pread, "internal: missing IDAT"); - - if (chunkpos < 8U) /* Return the header */ do - { - png_uint_32 b; - unsigned int shift; - - if (chunkpos < 4U) - b = chunklen - 12U; - - else - b = chunktype; - - shift = 3U & chunkpos; - ++chunkpos; - - if (shift < 3U) - b >>= 8U*(3U-shift); - - *pb++ = 0xffU & b; - } - while (--st > 0 && chunkpos < 8); - - else /* Return chunk bytes, including the CRC */ - { - size_t avail = st; - - if (avail > chunklen - chunkpos) - avail = (size_t)/*SAFE*/(chunklen - chunkpos); - - store_read_imp(ps, pb, avail); - pb += avail; - st -= avail; - chunkpos += (png_uint_32)/*SAFE*/avail; - - /* Check for end of chunk and end-of-file; don't try to read a new - * chunk header at this point unless instructed to do so by 'min'. - */ - if (chunkpos >= chunklen && max-st >= min && - store_read_buffer_avail(ps) == 0) - break; - } - } /* !IDAT */ - } - while (st > 0); - - ps->chunklen = chunklen; - ps->chunktype = chunktype; - ps->chunkpos = chunkpos; - - return st; /* space left */ -} - -static void PNGCBAPI -store_read(png_structp ppIn, png_bytep pb, size_t st) -{ - png_const_structp pp = ppIn; - png_store *ps = voidcast(png_store*, png_get_io_ptr(pp)); - - if (ps == NULL || ps->pread != pp) - png_error(pp, "bad store read call"); - - store_read_chunk(ps, pb, st, st); -} - -static void -store_progressive_read(png_store *ps, png_structp pp, png_infop pi) -{ - if (ps->pread != pp || ps->current == NULL || ps->next == NULL) - png_error(pp, "store state damaged (progressive)"); - - /* This is another Horowitz and Hill random noise generator. In this case - * the aim is to stress the progressive reader with truly horrible variable - * buffer sizes in the range 1..500, so a sequence of 9 bit random numbers - * is generated. We could probably just count from 1 to 32767 and get as - * good a result. - */ - while (store_read_buffer_avail(ps) > 0) - { - static png_uint_32 noise = 2; - size_t cb; - png_byte buffer[512]; - - /* Generate 15 more bits of stuff: */ - noise = (noise << 9) | ((noise ^ (noise >> (9-5))) & 0x1ff); - cb = noise & 0x1ff; - cb -= store_read_chunk(ps, buffer, cb, 1); - png_process_data(pp, pi, buffer, cb); - } -} -#endif /* PNG_READ_SUPPORTED */ - -/* The caller must fill this in: */ -static store_palette_entry * -store_write_palette(png_store *ps, int npalette) -{ - if (ps->pwrite == NULL) - store_log(ps, NULL, "attempt to write palette without write stream", 1); - - if (ps->palette != NULL) - png_error(ps->pwrite, "multiple store_write_palette calls"); - - /* This function can only return NULL if called with '0'! */ - if (npalette > 0) - { - ps->palette = voidcast(store_palette_entry*, malloc(npalette * - sizeof *ps->palette)); - - if (ps->palette == NULL) - png_error(ps->pwrite, "store new palette: OOM"); - - ps->npalette = npalette; - } - - return ps->palette; -} - -#ifdef PNG_READ_SUPPORTED -static store_palette_entry * -store_current_palette(png_store *ps, int *npalette) -{ - /* This is an internal error (the call has been made outside a read - * operation.) - */ - if (ps->current == NULL) - { - store_log(ps, ps->pread, "no current stream for palette", 1); - return NULL; - } - - /* The result may be null if there is no palette. */ - *npalette = ps->current->npalette; - return ps->current->palette; -} -#endif /* PNG_READ_SUPPORTED */ - -/***************************** MEMORY MANAGEMENT*** ***************************/ -#ifdef PNG_USER_MEM_SUPPORTED -/* A store_memory is simply the header for an allocated block of memory. The - * pointer returned to libpng is just after the end of the header block, the - * allocated memory is followed by a second copy of the 'mark'. - */ -typedef struct store_memory -{ - store_pool *pool; /* Originating pool */ - struct store_memory *next; /* Singly linked list */ - png_alloc_size_t size; /* Size of memory allocated */ - png_byte mark[4]; /* ID marker */ -} store_memory; - -/* Handle a fatal error in memory allocation. This calls png_error if the - * libpng struct is non-NULL, else it outputs a message and returns. This means - * that a memory problem while libpng is running will abort (png_error) the - * handling of particular file while one in cleanup (after the destroy of the - * struct has returned) will simply keep going and free (or attempt to free) - * all the memory. - */ -static void -store_pool_error(png_store *ps, png_const_structp pp, const char *msg) -{ - if (pp != NULL) - png_error(pp, msg); - - /* Else we have to do it ourselves. png_error eventually calls store_log, - * above. store_log accepts a NULL png_structp - it just changes what gets - * output by store_message. - */ - store_log(ps, pp, msg, 1 /* error */); -} - -static void -store_memory_free(png_const_structp pp, store_pool *pool, store_memory *memory) -{ - /* Note that pp may be NULL (see store_pool_delete below), the caller has - * found 'memory' in pool->list *and* unlinked this entry, so this is a valid - * pointer (for sure), but the contents may have been trashed. - */ - if (memory->pool != pool) - store_pool_error(pool->store, pp, "memory corrupted (pool)"); - - else if (memcmp(memory->mark, pool->mark, sizeof memory->mark) != 0) - store_pool_error(pool->store, pp, "memory corrupted (start)"); - - /* It should be safe to read the size field now. */ - else - { - png_alloc_size_t cb = memory->size; - - if (cb > pool->max) - store_pool_error(pool->store, pp, "memory corrupted (size)"); - - else if (memcmp((png_bytep)(memory+1)+cb, pool->mark, sizeof pool->mark) - != 0) - store_pool_error(pool->store, pp, "memory corrupted (end)"); - - /* Finally give the library a chance to find problems too: */ - else - { - pool->current -= cb; - free(memory); - } - } -} - -static void -store_pool_delete(png_store *ps, store_pool *pool) -{ - if (pool->list != NULL) - { - fprintf(stderr, "%s: %s %s: memory lost (list follows):\n", ps->test, - pool == &ps->read_memory_pool ? "read" : "write", - pool == &ps->read_memory_pool ? (ps->current != NULL ? - ps->current->name : "unknown file") : ps->wname); - ++ps->nerrors; - - do - { - store_memory *next = pool->list; - pool->list = next->next; - next->next = NULL; - - fprintf(stderr, "\t%lu bytes @ %p\n", - (unsigned long)next->size, (const void*)(next+1)); - /* The NULL means this will always return, even if the memory is - * corrupted. - */ - store_memory_free(NULL, pool, next); - } - while (pool->list != NULL); - } - - /* And reset the other fields too for the next time. */ - if (pool->max > pool->max_max) pool->max_max = pool->max; - pool->max = 0; - if (pool->current != 0) /* unexpected internal error */ - fprintf(stderr, "%s: %s %s: memory counter mismatch (internal error)\n", - ps->test, pool == &ps->read_memory_pool ? "read" : "write", - pool == &ps->read_memory_pool ? (ps->current != NULL ? - ps->current->name : "unknown file") : ps->wname); - pool->current = 0; - - if (pool->limit > pool->max_limit) - pool->max_limit = pool->limit; - - pool->limit = 0; - - if (pool->total > pool->max_total) - pool->max_total = pool->total; - - pool->total = 0; - - /* Get a new mark too. */ - store_pool_mark(pool->mark); -} - -/* The memory callbacks: */ -static png_voidp PNGCBAPI -store_malloc(png_structp ppIn, png_alloc_size_t cb) -{ - png_const_structp pp = ppIn; - store_pool *pool = voidcast(store_pool*, png_get_mem_ptr(pp)); - store_memory *new = voidcast(store_memory*, malloc(cb + (sizeof *new) + - (sizeof pool->mark))); - - if (new != NULL) - { - if (cb > pool->max) - pool->max = cb; - - pool->current += cb; - - if (pool->current > pool->limit) - pool->limit = pool->current; - - pool->total += cb; - - new->size = cb; - memcpy(new->mark, pool->mark, sizeof new->mark); - memcpy((png_byte*)(new+1) + cb, pool->mark, sizeof pool->mark); - new->pool = pool; - new->next = pool->list; - pool->list = new; - ++new; - } - - else - { - /* NOTE: the PNG user malloc function cannot use the png_ptr it is passed - * other than to retrieve the allocation pointer! libpng calls the - * store_malloc callback in two basic cases: - * - * 1) From png_malloc; png_malloc will do a png_error itself if NULL is - * returned. - * 2) From png_struct or png_info structure creation; png_malloc is - * to return so cleanup can be performed. - * - * To handle this store_malloc can log a message, but can't do anything - * else. - */ - store_log(pool->store, pp, "out of memory", 1 /* is_error */); - } - - return new; -} - -static void PNGCBAPI -store_free(png_structp ppIn, png_voidp memory) -{ - png_const_structp pp = ppIn; - store_pool *pool = voidcast(store_pool*, png_get_mem_ptr(pp)); - store_memory *this = voidcast(store_memory*, memory), **test; - - /* Because libpng calls store_free with a dummy png_struct when deleting - * png_struct or png_info via png_destroy_struct_2 it is necessary to check - * the passed in png_structp to ensure it is valid, and not pass it to - * png_error if it is not. - */ - if (pp != pool->store->pread && pp != pool->store->pwrite) - pp = NULL; - - /* First check that this 'memory' really is valid memory - it must be in the - * pool list. If it is, use the shared memory_free function to free it. - */ - --this; - for (test = &pool->list; *test != this; test = &(*test)->next) - { - if (*test == NULL) - { - store_pool_error(pool->store, pp, "bad pointer to free"); - return; - } - } - - /* Unlink this entry, *test == this. */ - *test = this->next; - this->next = NULL; - store_memory_free(pp, pool, this); -} -#endif /* PNG_USER_MEM_SUPPORTED */ - -/* Setup functions. */ -/* Cleanup when aborting a write or after storing the new file. */ -static void -store_write_reset(png_store *ps) -{ - if (ps->pwrite != NULL) - { - anon_context(ps); - - Try - png_destroy_write_struct(&ps->pwrite, &ps->piwrite); - - Catch_anonymous - { - /* memory corruption: continue. */ - } - - ps->pwrite = NULL; - ps->piwrite = NULL; - } - - /* And make sure that all the memory has been freed - this will output - * spurious errors in the case of memory corruption above, but this is safe. - */ -# ifdef PNG_USER_MEM_SUPPORTED - store_pool_delete(ps, &ps->write_memory_pool); -# endif - - store_freenew(ps); -} - -/* The following is the main write function, it returns a png_struct and, - * optionally, a png_info suitable for writiing a new PNG file. Use - * store_storefile above to record this file after it has been written. The - * returned libpng structures as destroyed by store_write_reset above. - */ -static png_structp -set_store_for_write(png_store *ps, png_infopp ppi, const char *name) -{ - anon_context(ps); - - Try - { - if (ps->pwrite != NULL) - png_error(ps->pwrite, "write store already in use"); - - store_write_reset(ps); - safecat(ps->wname, sizeof ps->wname, 0, name); - - /* Don't do the slow memory checks if doing a speed test, also if user - * memory is not supported we can't do it anyway. - */ -# ifdef PNG_USER_MEM_SUPPORTED - if (!ps->speed) - ps->pwrite = png_create_write_struct_2(PNG_LIBPNG_VER_STRING, - ps, store_error, store_warning, &ps->write_memory_pool, - store_malloc, store_free); - - else -# endif - ps->pwrite = png_create_write_struct(PNG_LIBPNG_VER_STRING, - ps, store_error, store_warning); - - png_set_write_fn(ps->pwrite, ps, store_write, store_flush); - -# ifdef PNG_SET_OPTION_SUPPORTED - { - int opt; - for (opt=0; optnoptions; ++opt) - if (png_set_option(ps->pwrite, ps->options[opt].option, - ps->options[opt].setting) == PNG_OPTION_INVALID) - png_error(ps->pwrite, "png option invalid"); - } -# endif - - if (ppi != NULL) - *ppi = ps->piwrite = png_create_info_struct(ps->pwrite); - } - - Catch_anonymous - return NULL; - - return ps->pwrite; -} - -/* Cleanup when finished reading (either due to error or in the success case). - * This routine exists even when there is no read support to make the code - * tidier (avoid a mass of ifdefs) and so easier to maintain. - */ -static void -store_read_reset(png_store *ps) -{ -# ifdef PNG_READ_SUPPORTED - if (ps->pread != NULL) - { - anon_context(ps); - - Try - png_destroy_read_struct(&ps->pread, &ps->piread, NULL); - - Catch_anonymous - { - /* error already output: continue */ - } - - ps->pread = NULL; - ps->piread = NULL; - } -# endif - -# ifdef PNG_USER_MEM_SUPPORTED - /* Always do this to be safe. */ - store_pool_delete(ps, &ps->read_memory_pool); -# endif - - ps->current = NULL; - ps->next = NULL; - ps->readpos = 0; - ps->validated = 0; - - ps->chunkpos = 8; - ps->chunktype = 0; - ps->chunklen = 16; - ps->IDAT_size = 0; -} - -#ifdef PNG_READ_SUPPORTED -static void -store_read_set(png_store *ps, png_uint_32 id) -{ - png_store_file *pf = ps->saved; - - while (pf != NULL) - { - if (pf->id == id) - { - ps->current = pf; - ps->next = NULL; - ps->IDAT_size = pf->IDAT_size; - ps->IDAT_bits = pf->IDAT_bits; /* just a cache */ - ps->IDAT_len = 0; - ps->IDAT_pos = 0; - ps->IDAT_crc = 0UL; - store_read_buffer_next(ps); - return; - } - - pf = pf->next; - } - - { - size_t pos; - char msg[FILE_NAME_SIZE+64]; - - pos = standard_name_from_id(msg, sizeof msg, 0, id); - pos = safecat(msg, sizeof msg, pos, ": file not found"); - png_error(ps->pread, msg); - } -} - -/* The main interface for reading a saved file - pass the id number of the file - * to retrieve. Ids must be unique or the earlier file will be hidden. The API - * returns a png_struct and, optionally, a png_info. Both of these will be - * destroyed by store_read_reset above. - */ -static png_structp -set_store_for_read(png_store *ps, png_infopp ppi, png_uint_32 id, - const char *name) -{ - /* Set the name for png_error */ - safecat(ps->test, sizeof ps->test, 0, name); - - if (ps->pread != NULL) - png_error(ps->pread, "read store already in use"); - - store_read_reset(ps); - - /* Both the create APIs can return NULL if used in their default mode - * (because there is no other way of handling an error because the jmp_buf - * by default is stored in png_struct and that has not been allocated!) - * However, given that store_error works correctly in these circumstances - * we don't ever expect NULL in this program. - */ -# ifdef PNG_USER_MEM_SUPPORTED - if (!ps->speed) - ps->pread = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, ps, - store_error, store_warning, &ps->read_memory_pool, store_malloc, - store_free); - - else -# endif - ps->pread = png_create_read_struct(PNG_LIBPNG_VER_STRING, ps, store_error, - store_warning); - - if (ps->pread == NULL) - { - struct exception_context *the_exception_context = &ps->exception_context; - - store_log(ps, NULL, "png_create_read_struct returned NULL (unexpected)", - 1 /*error*/); - - Throw ps; - } - -# ifdef PNG_SET_OPTION_SUPPORTED - { - int opt; - for (opt=0; optnoptions; ++opt) - if (png_set_option(ps->pread, ps->options[opt].option, - ps->options[opt].setting) == PNG_OPTION_INVALID) - png_error(ps->pread, "png option invalid"); - } -# endif - - store_read_set(ps, id); - - if (ppi != NULL) - *ppi = ps->piread = png_create_info_struct(ps->pread); - - return ps->pread; -} -#endif /* PNG_READ_SUPPORTED */ - -/* The overall cleanup of a store simply calls the above then removes all the - * saved files. This does not delete the store itself. - */ -static void -store_delete(png_store *ps) -{ - store_write_reset(ps); - store_read_reset(ps); - store_freefile(&ps->saved); - store_image_free(ps, NULL); -} - -/*********************** PNG FILE MODIFICATION ON READ ************************/ -/* Files may be modified on read. The following structure contains a complete - * png_store together with extra members to handle modification and a special - * read callback for libpng. To use this the 'modifications' field must be set - * to a list of png_modification structures that actually perform the - * modification, otherwise a png_modifier is functionally equivalent to a - * png_store. There is a special read function, set_modifier_for_read, which - * replaces set_store_for_read. - */ -typedef enum modifier_state -{ - modifier_start, /* Initial value */ - modifier_signature, /* Have a signature */ - modifier_IHDR /* Have an IHDR */ -} modifier_state; - -typedef struct CIE_color -{ - /* A single CIE tristimulus value, representing the unique response of a - * standard observer to a variety of light spectra. The observer recognizes - * all spectra that produce this response as the same color, therefore this - * is effectively a description of a color. - */ - double X, Y, Z; -} CIE_color; - -typedef struct color_encoding -{ - /* A description of an (R,G,B) encoding of color (as defined above); this - * includes the actual colors of the (R,G,B) triples (1,0,0), (0,1,0) and - * (0,0,1) plus an encoding value that is used to encode the linear - * components R, G and B to give the actual values R^gamma, G^gamma and - * B^gamma that are stored. - */ - double gamma; /* Encoding (file) gamma of space */ - CIE_color red, green, blue; /* End points */ -} color_encoding; - -#ifdef PNG_READ_SUPPORTED -#if defined PNG_READ_TRANSFORMS_SUPPORTED && defined PNG_READ_cHRM_SUPPORTED -static double -chromaticity_x(CIE_color c) -{ - return c.X / (c.X + c.Y + c.Z); -} - -static double -chromaticity_y(CIE_color c) -{ - return c.Y / (c.X + c.Y + c.Z); -} - -static CIE_color -white_point(const color_encoding *encoding) -{ - CIE_color white; - - white.X = encoding->red.X + encoding->green.X + encoding->blue.X; - white.Y = encoding->red.Y + encoding->green.Y + encoding->blue.Y; - white.Z = encoding->red.Z + encoding->green.Z + encoding->blue.Z; - - return white; -} -#endif /* READ_TRANSFORMS && READ_cHRM */ - -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED -static void -normalize_color_encoding(color_encoding *encoding) -{ - const double whiteY = encoding->red.Y + encoding->green.Y + - encoding->blue.Y; - - if (whiteY != 1) - { - encoding->red.X /= whiteY; - encoding->red.Y /= whiteY; - encoding->red.Z /= whiteY; - encoding->green.X /= whiteY; - encoding->green.Y /= whiteY; - encoding->green.Z /= whiteY; - encoding->blue.X /= whiteY; - encoding->blue.Y /= whiteY; - encoding->blue.Z /= whiteY; - } -} -#endif - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -static size_t -safecat_color_encoding(char *buffer, size_t bufsize, size_t pos, - const color_encoding *e, double encoding_gamma) -{ - if (e != 0) - { - if (encoding_gamma != 0) - pos = safecat(buffer, bufsize, pos, "("); - pos = safecat(buffer, bufsize, pos, "R("); - pos = safecatd(buffer, bufsize, pos, e->red.X, 4); - pos = safecat(buffer, bufsize, pos, ","); - pos = safecatd(buffer, bufsize, pos, e->red.Y, 4); - pos = safecat(buffer, bufsize, pos, ","); - pos = safecatd(buffer, bufsize, pos, e->red.Z, 4); - pos = safecat(buffer, bufsize, pos, "),G("); - pos = safecatd(buffer, bufsize, pos, e->green.X, 4); - pos = safecat(buffer, bufsize, pos, ","); - pos = safecatd(buffer, bufsize, pos, e->green.Y, 4); - pos = safecat(buffer, bufsize, pos, ","); - pos = safecatd(buffer, bufsize, pos, e->green.Z, 4); - pos = safecat(buffer, bufsize, pos, "),B("); - pos = safecatd(buffer, bufsize, pos, e->blue.X, 4); - pos = safecat(buffer, bufsize, pos, ","); - pos = safecatd(buffer, bufsize, pos, e->blue.Y, 4); - pos = safecat(buffer, bufsize, pos, ","); - pos = safecatd(buffer, bufsize, pos, e->blue.Z, 4); - pos = safecat(buffer, bufsize, pos, ")"); - if (encoding_gamma != 0) - pos = safecat(buffer, bufsize, pos, ")"); - } - - if (encoding_gamma != 0) - { - pos = safecat(buffer, bufsize, pos, "^"); - pos = safecatd(buffer, bufsize, pos, encoding_gamma, 5); - } - - return pos; -} -#endif /* READ_TRANSFORMS */ -#endif /* PNG_READ_SUPPORTED */ - -typedef struct png_modifier -{ - png_store this; /* I am a png_store */ - struct png_modification *modifications; /* Changes to make */ - - modifier_state state; /* My state */ - - /* Information from IHDR: */ - png_byte bit_depth; /* From IHDR */ - png_byte colour_type; /* From IHDR */ - - /* While handling PLTE, IDAT and IEND these chunks may be pended to allow - * other chunks to be inserted. - */ - png_uint_32 pending_len; - png_uint_32 pending_chunk; - - /* Test values */ - double *gammas; - unsigned int ngammas; - unsigned int ngamma_tests; /* Number of gamma tests to run*/ - double current_gamma; /* 0 if not set */ - const color_encoding *encodings; - unsigned int nencodings; - const color_encoding *current_encoding; /* If an encoding has been set */ - unsigned int encoding_counter; /* For iteration */ - int encoding_ignored; /* Something overwrote it */ - - /* Control variables used to iterate through possible encodings, the - * following must be set to 0 and tested by the function that uses the - * png_modifier because the modifier only sets it to 1 (true.) - */ - unsigned int repeat :1; /* Repeat this transform test. */ - unsigned int test_uses_encoding :1; - - /* Lowest sbit to test (pre-1.7 libpng fails for sbit < 8) */ - png_byte sbitlow; - - /* Error control - these are the limits on errors accepted by the gamma tests - * below. - */ - double maxout8; /* Maximum output value error */ - double maxabs8; /* Absolute sample error 0..1 */ - double maxcalc8; /* Absolute sample error 0..1 */ - double maxpc8; /* Percentage sample error 0..100% */ - double maxout16; /* Maximum output value error */ - double maxabs16; /* Absolute sample error 0..1 */ - double maxcalc16;/* Absolute sample error 0..1 */ - double maxcalcG; /* Absolute sample error 0..1 */ - double maxpc16; /* Percentage sample error 0..100% */ - - /* This is set by transforms that need to allow a higher limit, it is an - * internal check on pngvalid to ensure that the calculated error limits are - * not ridiculous; without this it is too easy to make a mistake in pngvalid - * that allows any value through. - * - * NOTE: this is not checked in release builds. - */ - double limit; /* limit on error values, normally 4E-3 */ - - /* Log limits - values above this are logged, but not necessarily - * warned. - */ - double log8; /* Absolute error in 8 bits to log */ - double log16; /* Absolute error in 16 bits to log */ - - /* Logged 8 and 16 bit errors ('output' values): */ - double error_gray_2; - double error_gray_4; - double error_gray_8; - double error_gray_16; - double error_color_8; - double error_color_16; - double error_indexed; - - /* Flags: */ - /* Whether to call png_read_update_info, not png_read_start_image, and how - * many times to call it. - */ - int use_update_info; - - /* Whether or not to interlace. */ - int interlace_type :9; /* int, but must store '1' */ - - /* Run the standard tests? */ - unsigned int test_standard :1; - - /* Run the odd-sized image and interlace read/write tests? */ - unsigned int test_size :1; - - /* Run tests on reading with a combination of transforms, */ - unsigned int test_transform :1; - unsigned int test_tRNS :1; /* Includes tRNS images */ - - /* When to use the use_input_precision option, this controls the gamma - * validation code checks. If set any value that is within the transformed - * range input-.5 to input+.5 will be accepted, otherwise the value must be - * within the normal limits. It should not be necessary to set this; the - * result should always be exact within the permitted error limits. - */ - unsigned int use_input_precision :1; - unsigned int use_input_precision_sbit :1; - unsigned int use_input_precision_16to8 :1; - - /* If set assume that the calculation bit depth is set by the input - * precision, not the output precision. - */ - unsigned int calculations_use_input_precision :1; - - /* If set assume that the calculations are done in 16 bits even if the sample - * depth is 8 bits. - */ - unsigned int assume_16_bit_calculations :1; - - /* Which gamma tests to run: */ - unsigned int test_gamma_threshold :1; - unsigned int test_gamma_transform :1; /* main tests */ - unsigned int test_gamma_sbit :1; - unsigned int test_gamma_scale16 :1; - unsigned int test_gamma_background :1; - unsigned int test_gamma_alpha_mode :1; - unsigned int test_gamma_expand16 :1; - unsigned int test_exhaustive :1; - - /* Whether or not to run the low-bit-depth grayscale tests. This fails on - * gamma images in some cases because of gross inaccuracies in the grayscale - * gamma handling for low bit depth. - */ - unsigned int test_lbg :1; - unsigned int test_lbg_gamma_threshold :1; - unsigned int test_lbg_gamma_transform :1; - unsigned int test_lbg_gamma_sbit :1; - unsigned int test_lbg_gamma_composition :1; - - unsigned int log :1; /* Log max error */ - - /* Buffer information, the buffer size limits the size of the chunks that can - * be modified - they must fit (including header and CRC) into the buffer! - */ - size_t flush; /* Count of bytes to flush */ - size_t buffer_count; /* Bytes in buffer */ - size_t buffer_position; /* Position in buffer */ - png_byte buffer[1024]; -} png_modifier; - -/* This returns true if the test should be stopped now because it has already - * failed and it is running silently. - */ -static int fail(png_modifier *pm) -{ - return !pm->log && !pm->this.verbose && (pm->this.nerrors > 0 || - (pm->this.treat_warnings_as_errors && pm->this.nwarnings > 0)); -} - -static void -modifier_init(png_modifier *pm) -{ - memset(pm, 0, sizeof *pm); - store_init(&pm->this); - pm->modifications = NULL; - pm->state = modifier_start; - pm->sbitlow = 1U; - pm->ngammas = 0; - pm->ngamma_tests = 0; - pm->gammas = 0; - pm->current_gamma = 0; - pm->encodings = 0; - pm->nencodings = 0; - pm->current_encoding = 0; - pm->encoding_counter = 0; - pm->encoding_ignored = 0; - pm->repeat = 0; - pm->test_uses_encoding = 0; - pm->maxout8 = pm->maxpc8 = pm->maxabs8 = pm->maxcalc8 = 0; - pm->maxout16 = pm->maxpc16 = pm->maxabs16 = pm->maxcalc16 = 0; - pm->maxcalcG = 0; - pm->limit = 4E-3; - pm->log8 = pm->log16 = 0; /* Means 'off' */ - pm->error_gray_2 = pm->error_gray_4 = pm->error_gray_8 = 0; - pm->error_gray_16 = pm->error_color_8 = pm->error_color_16 = 0; - pm->error_indexed = 0; - pm->use_update_info = 0; - pm->interlace_type = PNG_INTERLACE_NONE; - pm->test_standard = 0; - pm->test_size = 0; - pm->test_transform = 0; -# ifdef PNG_WRITE_tRNS_SUPPORTED - pm->test_tRNS = 1; -# else - pm->test_tRNS = 0; -# endif - pm->use_input_precision = 0; - pm->use_input_precision_sbit = 0; - pm->use_input_precision_16to8 = 0; - pm->calculations_use_input_precision = 0; - pm->assume_16_bit_calculations = 0; - pm->test_gamma_threshold = 0; - pm->test_gamma_transform = 0; - pm->test_gamma_sbit = 0; - pm->test_gamma_scale16 = 0; - pm->test_gamma_background = 0; - pm->test_gamma_alpha_mode = 0; - pm->test_gamma_expand16 = 0; - pm->test_lbg = 1; - pm->test_lbg_gamma_threshold = 1; - pm->test_lbg_gamma_transform = 1; - pm->test_lbg_gamma_sbit = 1; - pm->test_lbg_gamma_composition = 1; - pm->test_exhaustive = 0; - pm->log = 0; - - /* Rely on the memset for all the other fields - there are no pointers */ -} - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED - -/* This controls use of checks that explicitly know how libpng digitizes the - * samples in calculations; setting this circumvents simple error limit checking - * in the rgb_to_gray check, replacing it with an exact copy of the libpng 1.5 - * algorithm. - */ -#define DIGITIZE PNG_LIBPNG_VER < 10700 - -/* If pm->calculations_use_input_precision is set then operations will happen - * with the precision of the input, not the precision of the output depth. - * - * If pm->assume_16_bit_calculations is set then even 8 bit calculations use 16 - * bit precision. This only affects those of the following limits that pertain - * to a calculation - not a digitization operation - unless the following API is - * called directly. - */ -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED -#if DIGITIZE -static double digitize(double value, int depth, int do_round) -{ - /* 'value' is in the range 0 to 1, the result is the same value rounded to a - * multiple of the digitization factor - 8 or 16 bits depending on both the - * sample depth and the 'assume' setting. Digitization is normally by - * rounding and 'do_round' should be 1, if it is 0 the digitized value will - * be truncated. - */ - unsigned int digitization_factor = (1U << depth) - 1; - - /* Limiting the range is done as a convenience to the caller - it's easier to - * do it once here than every time at the call site. - */ - if (value <= 0) - value = 0; - - else if (value >= 1) - value = 1; - - value *= digitization_factor; - if (do_round) value += .5; - return floor(value)/digitization_factor; -} -#endif -#endif /* RGB_TO_GRAY */ - -#ifdef PNG_READ_GAMMA_SUPPORTED -static double abserr(const png_modifier *pm, int in_depth, int out_depth) -{ - /* Absolute error permitted in linear values - affected by the bit depth of - * the calculations. - */ - if (pm->assume_16_bit_calculations || - (pm->calculations_use_input_precision ? in_depth : out_depth) == 16) - return pm->maxabs16; - else - return pm->maxabs8; -} - -static double calcerr(const png_modifier *pm, int in_depth, int out_depth) -{ - /* Error in the linear composition arithmetic - only relevant when - * composition actually happens (0 < alpha < 1). - */ - if ((pm->calculations_use_input_precision ? in_depth : out_depth) == 16) - return pm->maxcalc16; - else if (pm->assume_16_bit_calculations) - return pm->maxcalcG; - else - return pm->maxcalc8; -} - -static double pcerr(const png_modifier *pm, int in_depth, int out_depth) -{ - /* Percentage error permitted in the linear values. Note that the specified - * value is a percentage but this routine returns a simple number. - */ - if (pm->assume_16_bit_calculations || - (pm->calculations_use_input_precision ? in_depth : out_depth) == 16) - return pm->maxpc16 * .01; - else - return pm->maxpc8 * .01; -} - -/* Output error - the error in the encoded value. This is determined by the - * digitization of the output so can be +/-0.5 in the actual output value. In - * the expand_16 case with the current code in libpng the expand happens after - * all the calculations are done in 8 bit arithmetic, so even though the output - * depth is 16 the output error is determined by the 8 bit calculation. - * - * This limit is not determined by the bit depth of internal calculations. - * - * The specified parameter does *not* include the base .5 digitization error but - * it is added here. - */ -static double outerr(const png_modifier *pm, int in_depth, int out_depth) -{ - /* There is a serious error in the 2 and 4 bit grayscale transform because - * the gamma table value (8 bits) is simply shifted, not rounded, so the - * error in 4 bit grayscale gamma is up to the value below. This is a hack - * to allow pngvalid to succeed: - * - * TODO: fix this in libpng - */ - if (out_depth == 2) - return .73182-.5; - - if (out_depth == 4) - return .90644-.5; - - if ((pm->calculations_use_input_precision ? in_depth : out_depth) == 16) - return pm->maxout16; - - /* This is the case where the value was calculated at 8-bit precision then - * scaled to 16 bits. - */ - else if (out_depth == 16) - return pm->maxout8 * 257; - - else - return pm->maxout8; -} - -/* This does the same thing as the above however it returns the value to log, - * rather than raising a warning. This is useful for debugging to track down - * exactly what set of parameters cause high error values. - */ -static double outlog(const png_modifier *pm, int in_depth, int out_depth) -{ - /* The command line parameters are either 8 bit (0..255) or 16 bit (0..65535) - * and so must be adjusted for low bit depth grayscale: - */ - if (out_depth <= 8) - { - if (pm->log8 == 0) /* switched off */ - return 256; - - if (out_depth < 8) - return pm->log8 / 255 * ((1<log8; - } - - if ((pm->calculations_use_input_precision ? in_depth : out_depth) == 16) - { - if (pm->log16 == 0) - return 65536; - - return pm->log16; - } - - /* This is the case where the value was calculated at 8-bit precision then - * scaled to 16 bits. - */ - if (pm->log8 == 0) - return 65536; - - return pm->log8 * 257; -} - -/* This complements the above by providing the appropriate quantization for the - * final value. Normally this would just be quantization to an integral value, - * but in the 8 bit calculation case it's actually quantization to a multiple of - * 257! - */ -static int output_quantization_factor(const png_modifier *pm, int in_depth, - int out_depth) -{ - if (out_depth == 16 && in_depth != 16 && - pm->calculations_use_input_precision) - return 257; - else - return 1; -} -#endif /* PNG_READ_GAMMA_SUPPORTED */ - -/* One modification structure must be provided for each chunk to be modified (in - * fact more than one can be provided if multiple separate changes are desired - * for a single chunk.) Modifications include adding a new chunk when a - * suitable chunk does not exist. - * - * The caller of modify_fn will reset the CRC of the chunk and record 'modified' - * or 'added' as appropriate if the modify_fn returns 1 (true). If the - * modify_fn is NULL the chunk is simply removed. - */ -typedef struct png_modification -{ - struct png_modification *next; - png_uint_32 chunk; - - /* If the following is NULL all matching chunks will be removed: */ - int (*modify_fn)(struct png_modifier *pm, - struct png_modification *me, int add); - - /* If the following is set to PLTE, IDAT or IEND and the chunk has not been - * found and modified (and there is a modify_fn) the modify_fn will be called - * to add the chunk before the relevant chunk. - */ - png_uint_32 add; - unsigned int modified :1; /* Chunk was modified */ - unsigned int added :1; /* Chunk was added */ - unsigned int removed :1; /* Chunk was removed */ -} png_modification; - -static void -modification_reset(png_modification *pmm) -{ - if (pmm != NULL) - { - pmm->modified = 0; - pmm->added = 0; - pmm->removed = 0; - modification_reset(pmm->next); - } -} - -static void -modification_init(png_modification *pmm) -{ - memset(pmm, 0, sizeof *pmm); - pmm->next = NULL; - pmm->chunk = 0; - pmm->modify_fn = NULL; - pmm->add = 0; - modification_reset(pmm); -} - -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED -static void -modifier_current_encoding(const png_modifier *pm, color_encoding *ce) -{ - if (pm->current_encoding != 0) - *ce = *pm->current_encoding; - - else - memset(ce, 0, sizeof *ce); - - ce->gamma = pm->current_gamma; -} -#endif - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -static size_t -safecat_current_encoding(char *buffer, size_t bufsize, size_t pos, - const png_modifier *pm) -{ - pos = safecat_color_encoding(buffer, bufsize, pos, pm->current_encoding, - pm->current_gamma); - - if (pm->encoding_ignored) - pos = safecat(buffer, bufsize, pos, "[overridden]"); - - return pos; -} -#endif - -/* Iterate through the usefully testable color encodings. An encoding is one - * of: - * - * 1) Nothing (no color space, no gamma). - * 2) Just a gamma value from the gamma array (including 1.0) - * 3) A color space from the encodings array with the corresponding gamma. - * 4) The same, but with gamma 1.0 (only really useful with 16 bit calculations) - * - * The iterator selects these in turn, the randomizer selects one at random, - * which is used depends on the setting of the 'test_exhaustive' flag. Notice - * that this function changes the colour space encoding so it must only be - * called on completion of the previous test. This is what 'modifier_reset' - * does, below. - * - * After the function has been called the 'repeat' flag will still be set; the - * caller of modifier_reset must reset it at the start of each run of the test! - */ -static unsigned int -modifier_total_encodings(const png_modifier *pm) -{ - return 1 + /* (1) nothing */ - pm->ngammas + /* (2) gamma values to test */ - pm->nencodings + /* (3) total number of encodings */ - /* The following test only works after the first time through the - * png_modifier code because 'bit_depth' is set when the IHDR is read. - * modifier_reset, below, preserves the setting until after it has called - * the iterate function (also below.) - * - * For this reason do not rely on this function outside a call to - * modifier_reset. - */ - ((pm->bit_depth == 16 || pm->assume_16_bit_calculations) ? - pm->nencodings : 0); /* (4) encodings with gamma == 1.0 */ -} - -static void -modifier_encoding_iterate(png_modifier *pm) -{ - if (!pm->repeat && /* Else something needs the current encoding again. */ - pm->test_uses_encoding) /* Some transform is encoding dependent */ - { - if (pm->test_exhaustive) - { - if (++pm->encoding_counter >= modifier_total_encodings(pm)) - pm->encoding_counter = 0; /* This will stop the repeat */ - } - - else - { - /* Not exhaustive - choose an encoding at random; generate a number in - * the range 1..(max-1), so the result is always non-zero: - */ - if (pm->encoding_counter == 0) - pm->encoding_counter = random_mod(modifier_total_encodings(pm)-1)+1; - else - pm->encoding_counter = 0; - } - - if (pm->encoding_counter > 0) - pm->repeat = 1; - } - - else if (!pm->repeat) - pm->encoding_counter = 0; -} - -static void -modifier_reset(png_modifier *pm) -{ - store_read_reset(&pm->this); - pm->limit = 4E-3; - pm->pending_len = pm->pending_chunk = 0; - pm->flush = pm->buffer_count = pm->buffer_position = 0; - pm->modifications = NULL; - pm->state = modifier_start; - modifier_encoding_iterate(pm); - /* The following must be set in the next run. In particular - * test_uses_encodings must be set in the _ini function of each transform - * that looks at the encodings. (Not the 'add' function!) - */ - pm->test_uses_encoding = 0; - pm->current_gamma = 0; - pm->current_encoding = 0; - pm->encoding_ignored = 0; - /* These only become value after IHDR is read: */ - pm->bit_depth = pm->colour_type = 0; -} - -/* The following must be called before anything else to get the encoding set up - * on the modifier. In particular it must be called before the transform init - * functions are called. - */ -static void -modifier_set_encoding(png_modifier *pm) -{ - /* Set the encoding to the one specified by the current encoding counter, - * first clear out all the settings - this corresponds to an encoding_counter - * of 0. - */ - pm->current_gamma = 0; - pm->current_encoding = 0; - pm->encoding_ignored = 0; /* not ignored yet - happens in _ini functions. */ - - /* Now, if required, set the gamma and encoding fields. */ - if (pm->encoding_counter > 0) - { - /* The gammas[] array is an array of screen gammas, not encoding gammas, - * so we need the inverse: - */ - if (pm->encoding_counter <= pm->ngammas) - pm->current_gamma = 1/pm->gammas[pm->encoding_counter-1]; - - else - { - unsigned int i = pm->encoding_counter - pm->ngammas; - - if (i >= pm->nencodings) - { - i %= pm->nencodings; - pm->current_gamma = 1; /* Linear, only in the 16 bit case */ - } - - else - pm->current_gamma = pm->encodings[i].gamma; - - pm->current_encoding = pm->encodings + i; - } - } -} - -/* Enquiry functions to find out what is set. Notice that there is an implicit - * assumption below that the first encoding in the list is the one for sRGB. - */ -static int -modifier_color_encoding_is_sRGB(const png_modifier *pm) -{ - return pm->current_encoding != 0 && pm->current_encoding == pm->encodings && - pm->current_encoding->gamma == pm->current_gamma; -} - -static int -modifier_color_encoding_is_set(const png_modifier *pm) -{ - return pm->current_gamma != 0; -} - -/* The guts of modification are performed during a read. */ -static void -modifier_crc(png_bytep buffer) -{ - /* Recalculate the chunk CRC - a complete chunk must be in - * the buffer, at the start. - */ - uInt datalen = png_get_uint_32(buffer); - uLong crc = crc32(0, buffer+4, datalen+4); - /* The cast to png_uint_32 is safe because a crc32 is always a 32 bit value. - */ - png_save_uint_32(buffer+datalen+8, (png_uint_32)crc); -} - -static void -modifier_setbuffer(png_modifier *pm) -{ - modifier_crc(pm->buffer); - pm->buffer_count = png_get_uint_32(pm->buffer)+12; - pm->buffer_position = 0; -} - -/* Separate the callback into the actual implementation (which is passed the - * png_modifier explicitly) and the callback, which gets the modifier from the - * png_struct. - */ -static void -modifier_read_imp(png_modifier *pm, png_bytep pb, size_t st) -{ - while (st > 0) - { - size_t cb; - png_uint_32 len, chunk; - png_modification *mod; - - if (pm->buffer_position >= pm->buffer_count) switch (pm->state) - { - static png_byte sign[8] = { 137, 80, 78, 71, 13, 10, 26, 10 }; - case modifier_start: - store_read_chunk(&pm->this, pm->buffer, 8, 8); /* signature. */ - pm->buffer_count = 8; - pm->buffer_position = 0; - - if (memcmp(pm->buffer, sign, 8) != 0) - png_error(pm->this.pread, "invalid PNG file signature"); - pm->state = modifier_signature; - break; - - case modifier_signature: - store_read_chunk(&pm->this, pm->buffer, 13+12, 13+12); /* IHDR */ - pm->buffer_count = 13+12; - pm->buffer_position = 0; - - if (png_get_uint_32(pm->buffer) != 13 || - png_get_uint_32(pm->buffer+4) != CHUNK_IHDR) - png_error(pm->this.pread, "invalid IHDR"); - - /* Check the list of modifiers for modifications to the IHDR. */ - mod = pm->modifications; - while (mod != NULL) - { - if (mod->chunk == CHUNK_IHDR && mod->modify_fn && - (*mod->modify_fn)(pm, mod, 0)) - { - mod->modified = 1; - modifier_setbuffer(pm); - } - - /* Ignore removal or add if IHDR! */ - mod = mod->next; - } - - /* Cache information from the IHDR (the modified one.) */ - pm->bit_depth = pm->buffer[8+8]; - pm->colour_type = pm->buffer[8+8+1]; - - pm->state = modifier_IHDR; - pm->flush = 0; - break; - - case modifier_IHDR: - default: - /* Read a new chunk and process it until we see PLTE, IDAT or - * IEND. 'flush' indicates that there is still some data to - * output from the preceding chunk. - */ - if ((cb = pm->flush) > 0) - { - if (cb > st) cb = st; - pm->flush -= cb; - store_read_chunk(&pm->this, pb, cb, cb); - pb += cb; - st -= cb; - if (st == 0) return; - } - - /* No more bytes to flush, read a header, or handle a pending - * chunk. - */ - if (pm->pending_chunk != 0) - { - png_save_uint_32(pm->buffer, pm->pending_len); - png_save_uint_32(pm->buffer+4, pm->pending_chunk); - pm->pending_len = 0; - pm->pending_chunk = 0; - } - else - store_read_chunk(&pm->this, pm->buffer, 8, 8); - - pm->buffer_count = 8; - pm->buffer_position = 0; - - /* Check for something to modify or a terminator chunk. */ - len = png_get_uint_32(pm->buffer); - chunk = png_get_uint_32(pm->buffer+4); - - /* Terminators first, they may have to be delayed for added - * chunks - */ - if (chunk == CHUNK_PLTE || chunk == CHUNK_IDAT || - chunk == CHUNK_IEND) - { - mod = pm->modifications; - - while (mod != NULL) - { - if ((mod->add == chunk || - (mod->add == CHUNK_PLTE && chunk == CHUNK_IDAT)) && - mod->modify_fn != NULL && !mod->modified && !mod->added) - { - /* Regardless of what the modify function does do not run - * this again. - */ - mod->added = 1; - - if ((*mod->modify_fn)(pm, mod, 1 /*add*/)) - { - /* Reset the CRC on a new chunk */ - if (pm->buffer_count > 0) - modifier_setbuffer(pm); - - else - { - pm->buffer_position = 0; - mod->removed = 1; - } - - /* The buffer has been filled with something (we assume) - * so output this. Pend the current chunk. - */ - pm->pending_len = len; - pm->pending_chunk = chunk; - break; /* out of while */ - } - } - - mod = mod->next; - } - - /* Don't do any further processing if the buffer was modified - - * otherwise the code will end up modifying a chunk that was - * just added. - */ - if (mod != NULL) - break; /* out of switch */ - } - - /* If we get to here then this chunk may need to be modified. To - * do this it must be less than 1024 bytes in total size, otherwise - * it just gets flushed. - */ - if (len+12 <= sizeof pm->buffer) - { - size_t s = len+12-pm->buffer_count; - store_read_chunk(&pm->this, pm->buffer+pm->buffer_count, s, s); - pm->buffer_count = len+12; - - /* Check for a modification, else leave it be. */ - mod = pm->modifications; - while (mod != NULL) - { - if (mod->chunk == chunk) - { - if (mod->modify_fn == NULL) - { - /* Remove this chunk */ - pm->buffer_count = pm->buffer_position = 0; - mod->removed = 1; - break; /* Terminate the while loop */ - } - - else if ((*mod->modify_fn)(pm, mod, 0)) - { - mod->modified = 1; - /* The chunk may have been removed: */ - if (pm->buffer_count == 0) - { - pm->buffer_position = 0; - break; - } - modifier_setbuffer(pm); - } - } - - mod = mod->next; - } - } - - else - pm->flush = len+12 - pm->buffer_count; /* data + crc */ - - /* Take the data from the buffer (if there is any). */ - break; - } - - /* Here to read from the modifier buffer (not directly from - * the store, as in the flush case above.) - */ - cb = pm->buffer_count - pm->buffer_position; - - if (cb > st) - cb = st; - - memcpy(pb, pm->buffer + pm->buffer_position, cb); - st -= cb; - pb += cb; - pm->buffer_position += cb; - } -} - -/* The callback: */ -static void PNGCBAPI -modifier_read(png_structp ppIn, png_bytep pb, size_t st) -{ - png_const_structp pp = ppIn; - png_modifier *pm = voidcast(png_modifier*, png_get_io_ptr(pp)); - - if (pm == NULL || pm->this.pread != pp) - png_error(pp, "bad modifier_read call"); - - modifier_read_imp(pm, pb, st); -} - -/* Like store_progressive_read but the data is getting changed as we go so we - * need a local buffer. - */ -static void -modifier_progressive_read(png_modifier *pm, png_structp pp, png_infop pi) -{ - if (pm->this.pread != pp || pm->this.current == NULL || - pm->this.next == NULL) - png_error(pp, "store state damaged (progressive)"); - - /* This is another Horowitz and Hill random noise generator. In this case - * the aim is to stress the progressive reader with truly horrible variable - * buffer sizes in the range 1..500, so a sequence of 9 bit random numbers - * is generated. We could probably just count from 1 to 32767 and get as - * good a result. - */ - for (;;) - { - static png_uint_32 noise = 1; - size_t cb, cbAvail; - png_byte buffer[512]; - - /* Generate 15 more bits of stuff: */ - noise = (noise << 9) | ((noise ^ (noise >> (9-5))) & 0x1ff); - cb = noise & 0x1ff; - - /* Check that this number of bytes are available (in the current buffer.) - * (This doesn't quite work - the modifier might delete a chunk; unlikely - * but possible, it doesn't happen at present because the modifier only - * adds chunks to standard images.) - */ - cbAvail = store_read_buffer_avail(&pm->this); - if (pm->buffer_count > pm->buffer_position) - cbAvail += pm->buffer_count - pm->buffer_position; - - if (cb > cbAvail) - { - /* Check for EOF: */ - if (cbAvail == 0) - break; - - cb = cbAvail; - } - - modifier_read_imp(pm, buffer, cb); - png_process_data(pp, pi, buffer, cb); - } - - /* Check the invariants at the end (if this fails it's a problem in this - * file!) - */ - if (pm->buffer_count > pm->buffer_position || - pm->this.next != &pm->this.current->data || - pm->this.readpos < pm->this.current->datacount) - png_error(pp, "progressive read implementation error"); -} - -/* Set up a modifier. */ -static png_structp -set_modifier_for_read(png_modifier *pm, png_infopp ppi, png_uint_32 id, - const char *name) -{ - /* Do this first so that the modifier fields are cleared even if an error - * happens allocating the png_struct. No allocation is done here so no - * cleanup is required. - */ - pm->state = modifier_start; - pm->bit_depth = 0; - pm->colour_type = 255; - - pm->pending_len = 0; - pm->pending_chunk = 0; - pm->flush = 0; - pm->buffer_count = 0; - pm->buffer_position = 0; - - return set_store_for_read(&pm->this, ppi, id, name); -} - - -/******************************** MODIFICATIONS *******************************/ -/* Standard modifications to add chunks. These do not require the _SUPPORTED - * macros because the chunks can be there regardless of whether this specific - * libpng supports them. - */ -typedef struct gama_modification -{ - png_modification this; - png_fixed_point gamma; -} gama_modification; - -static int -gama_modify(png_modifier *pm, png_modification *me, int add) -{ - UNUSED(add) - /* This simply dumps the given gamma value into the buffer. */ - png_save_uint_32(pm->buffer, 4); - png_save_uint_32(pm->buffer+4, CHUNK_gAMA); - png_save_uint_32(pm->buffer+8, ((gama_modification*)me)->gamma); - return 1; -} - -static void -gama_modification_init(gama_modification *me, png_modifier *pm, double gammad) -{ - double g; - - modification_init(&me->this); - me->this.chunk = CHUNK_gAMA; - me->this.modify_fn = gama_modify; - me->this.add = CHUNK_PLTE; - g = fix(gammad); - me->gamma = (png_fixed_point)g; - me->this.next = pm->modifications; - pm->modifications = &me->this; -} - -typedef struct chrm_modification -{ - png_modification this; - const color_encoding *encoding; - png_fixed_point wx, wy, rx, ry, gx, gy, bx, by; -} chrm_modification; - -static int -chrm_modify(png_modifier *pm, png_modification *me, int add) -{ - UNUSED(add) - /* As with gAMA this just adds the required cHRM chunk to the buffer. */ - png_save_uint_32(pm->buffer , 32); - png_save_uint_32(pm->buffer+ 4, CHUNK_cHRM); - png_save_uint_32(pm->buffer+ 8, ((chrm_modification*)me)->wx); - png_save_uint_32(pm->buffer+12, ((chrm_modification*)me)->wy); - png_save_uint_32(pm->buffer+16, ((chrm_modification*)me)->rx); - png_save_uint_32(pm->buffer+20, ((chrm_modification*)me)->ry); - png_save_uint_32(pm->buffer+24, ((chrm_modification*)me)->gx); - png_save_uint_32(pm->buffer+28, ((chrm_modification*)me)->gy); - png_save_uint_32(pm->buffer+32, ((chrm_modification*)me)->bx); - png_save_uint_32(pm->buffer+36, ((chrm_modification*)me)->by); - return 1; -} - -static void -chrm_modification_init(chrm_modification *me, png_modifier *pm, - const color_encoding *encoding) -{ - CIE_color white = white_point(encoding); - - /* Original end points: */ - me->encoding = encoding; - - /* Chromaticities (in fixed point): */ - me->wx = fix(chromaticity_x(white)); - me->wy = fix(chromaticity_y(white)); - - me->rx = fix(chromaticity_x(encoding->red)); - me->ry = fix(chromaticity_y(encoding->red)); - me->gx = fix(chromaticity_x(encoding->green)); - me->gy = fix(chromaticity_y(encoding->green)); - me->bx = fix(chromaticity_x(encoding->blue)); - me->by = fix(chromaticity_y(encoding->blue)); - - modification_init(&me->this); - me->this.chunk = CHUNK_cHRM; - me->this.modify_fn = chrm_modify; - me->this.add = CHUNK_PLTE; - me->this.next = pm->modifications; - pm->modifications = &me->this; -} - -typedef struct srgb_modification -{ - png_modification this; - png_byte intent; -} srgb_modification; - -static int -srgb_modify(png_modifier *pm, png_modification *me, int add) -{ - UNUSED(add) - /* As above, ignore add and just make a new chunk */ - png_save_uint_32(pm->buffer, 1); - png_save_uint_32(pm->buffer+4, CHUNK_sRGB); - pm->buffer[8] = ((srgb_modification*)me)->intent; - return 1; -} - -static void -srgb_modification_init(srgb_modification *me, png_modifier *pm, png_byte intent) -{ - modification_init(&me->this); - me->this.chunk = CHUNK_sBIT; - - if (intent <= 3) /* if valid, else *delete* sRGB chunks */ - { - me->this.modify_fn = srgb_modify; - me->this.add = CHUNK_PLTE; - me->intent = intent; - } - - else - { - me->this.modify_fn = 0; - me->this.add = 0; - me->intent = 0; - } - - me->this.next = pm->modifications; - pm->modifications = &me->this; -} - -#ifdef PNG_READ_GAMMA_SUPPORTED -typedef struct sbit_modification -{ - png_modification this; - png_byte sbit; -} sbit_modification; - -static int -sbit_modify(png_modifier *pm, png_modification *me, int add) -{ - png_byte sbit = ((sbit_modification*)me)->sbit; - if (pm->bit_depth > sbit) - { - int cb = 0; - switch (pm->colour_type) - { - case 0: - cb = 1; - break; - - case 2: - case 3: - cb = 3; - break; - - case 4: - cb = 2; - break; - - case 6: - cb = 4; - break; - - default: - png_error(pm->this.pread, - "unexpected colour type in sBIT modification"); - } - - png_save_uint_32(pm->buffer, cb); - png_save_uint_32(pm->buffer+4, CHUNK_sBIT); - - while (cb > 0) - (pm->buffer+8)[--cb] = sbit; - - return 1; - } - else if (!add) - { - /* Remove the sBIT chunk */ - pm->buffer_count = pm->buffer_position = 0; - return 1; - } - else - return 0; /* do nothing */ -} - -static void -sbit_modification_init(sbit_modification *me, png_modifier *pm, png_byte sbit) -{ - modification_init(&me->this); - me->this.chunk = CHUNK_sBIT; - me->this.modify_fn = sbit_modify; - me->this.add = CHUNK_PLTE; - me->sbit = sbit; - me->this.next = pm->modifications; - pm->modifications = &me->this; -} -#endif /* PNG_READ_GAMMA_SUPPORTED */ -#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ - -/***************************** STANDARD PNG FILES *****************************/ -/* Standard files - write and save standard files. */ -/* There are two basic forms of standard images. Those which attempt to have - * all the possible pixel values (not possible for 16bpp images, but a range of - * values are produced) and those which have a range of image sizes. The former - * are used for testing transforms, in particular gamma correction and bit - * reduction and increase. The latter are reserved for testing the behavior of - * libpng with respect to 'odd' image sizes - particularly small images where - * rows become 1 byte and interlace passes disappear. - * - * The first, most useful, set are the 'transform' images, the second set of - * small images are the 'size' images. - * - * The transform files are constructed with rows which fit into a 1024 byte row - * buffer. This makes allocation easier below. Further regardless of the file - * format every row has 128 pixels (giving 1024 bytes for 64bpp formats). - * - * Files are stored with no gAMA or sBIT chunks, with a PLTE only when needed - * and with an ID derived from the colour type, bit depth and interlace type - * as above (FILEID). The width (128) and height (variable) are not stored in - * the FILEID - instead the fields are set to 0, indicating a transform file. - * - * The size files ar constructed with rows a maximum of 128 bytes wide, allowing - * a maximum width of 16 pixels (for the 64bpp case.) They also have a maximum - * height of 16 rows. The width and height are stored in the FILEID and, being - * non-zero, indicate a size file. - * - * Because the PNG filter code is typically the largest CPU consumer within - * libpng itself there is a tendency to attempt to optimize it. This results in - * special case code which needs to be validated. To cause this to happen the - * 'size' images are made to use each possible filter, in so far as this is - * possible for smaller images. - * - * For palette image (colour type 3) multiple transform images are stored with - * the same bit depth to allow testing of more colour combinations - - * particularly important for testing the gamma code because libpng uses a - * different code path for palette images. For size images a single palette is - * used. - */ - -/* Make a 'standard' palette. Because there are only 256 entries in a palette - * (maximum) this actually makes a random palette in the hope that enough tests - * will catch enough errors. (Note that the same palette isn't produced every - * time for the same test - it depends on what previous tests have been run - - * but a given set of arguments to pngvalid will always produce the same palette - * at the same test! This is why pseudo-random number generators are useful for - * testing.) - * - * The store must be open for write when this is called, otherwise an internal - * error will occur. This routine contains its own magic number seed, so the - * palettes generated don't change if there are intervening errors (changing the - * calls to the store_mark seed.) - */ -static store_palette_entry * -make_standard_palette(png_store* ps, int npalette, int do_tRNS) -{ - static png_uint_32 palette_seed[2] = { 0x87654321, 9 }; - - int i = 0; - png_byte values[256][4]; - - /* Always put in black and white plus the six primary and secondary colors. - */ - for (; i<8; ++i) - { - values[i][1] = (png_byte)((i&1) ? 255U : 0U); - values[i][2] = (png_byte)((i&2) ? 255U : 0U); - values[i][3] = (png_byte)((i&4) ? 255U : 0U); - } - - /* Then add 62 grays (one quarter of the remaining 256 slots). */ - { - int j = 0; - png_byte random_bytes[4]; - png_byte need[256]; - - need[0] = 0; /*got black*/ - memset(need+1, 1, (sizeof need)-2); /*need these*/ - need[255] = 0; /*but not white*/ - - while (i<70) - { - png_byte b; - - if (j==0) - { - make_four_random_bytes(palette_seed, random_bytes); - j = 4; - } - - b = random_bytes[--j]; - if (need[b]) - { - values[i][1] = b; - values[i][2] = b; - values[i++][3] = b; - } - } - } - - /* Finally add 192 colors at random - don't worry about matches to things we - * already have, chance is less than 1/65536. Don't worry about grays, - * chance is the same, so we get a duplicate or extra gray less than 1 time - * in 170. - */ - for (; i<256; ++i) - make_four_random_bytes(palette_seed, values[i]); - - /* Fill in the alpha values in the first byte. Just use all possible values - * (0..255) in an apparently random order: - */ - { - store_palette_entry *palette; - png_byte selector[4]; - - make_four_random_bytes(palette_seed, selector); - - if (do_tRNS) - for (i=0; i<256; ++i) - values[i][0] = (png_byte)(i ^ selector[0]); - - else - for (i=0; i<256; ++i) - values[i][0] = 255; /* no transparency/tRNS chunk */ - - /* 'values' contains 256 ARGB values, but we only need 'npalette'. - * 'npalette' will always be a power of 2: 2, 4, 16 or 256. In the low - * bit depth cases select colors at random, else it is difficult to have - * a set of low bit depth palette test with any chance of a reasonable - * range of colors. Do this by randomly permuting values into the low - * 'npalette' entries using an XOR mask generated here. This also - * permutes the npalette == 256 case in a potentially useful way (there is - * no relationship between palette index and the color value therein!) - */ - palette = store_write_palette(ps, npalette); - - for (i=0; i 0) - png_set_tRNS(pp, pi, tRNS, j, 0/*color*/); -#endif - } -} - -#ifdef PNG_WRITE_tRNS_SUPPORTED -static void -set_random_tRNS(png_structp pp, png_infop pi, png_byte colour_type, - int bit_depth) -{ - /* To make this useful the tRNS color needs to match at least one pixel. - * Random values are fine for gray, including the 16-bit case where we know - * that the test image contains all the gray values. For RGB we need more - * method as only 65536 different RGB values are generated. - */ - png_color_16 tRNS; - png_uint_16 mask = (png_uint_16)((1U << bit_depth)-1); - - R8(tRNS); /* makes unset fields random */ - - if (colour_type & 2/*RGB*/) - { - if (bit_depth == 8) - { - tRNS.red = random_u16(); - tRNS.green = random_u16(); - tRNS.blue = tRNS.red ^ tRNS.green; - tRNS.red &= mask; - tRNS.green &= mask; - tRNS.blue &= mask; - } - - else /* bit_depth == 16 */ - { - tRNS.red = random_u16(); - tRNS.green = (png_uint_16)(tRNS.red * 257); - tRNS.blue = (png_uint_16)(tRNS.green * 17); - } - } - - else - { - tRNS.gray = random_u16(); - tRNS.gray &= mask; - } - - png_set_tRNS(pp, pi, NULL, 0, &tRNS); -} -#endif - -/* The number of passes is related to the interlace type. There was no libpng - * API to determine this prior to 1.5, so we need an inquiry function: - */ -static int -npasses_from_interlace_type(png_const_structp pp, int interlace_type) -{ - switch (interlace_type) - { - default: - png_error(pp, "invalid interlace type"); - - case PNG_INTERLACE_NONE: - return 1; - - case PNG_INTERLACE_ADAM7: - return PNG_INTERLACE_ADAM7_PASSES; - } -} - -static unsigned int -bit_size(png_const_structp pp, png_byte colour_type, png_byte bit_depth) -{ - switch (colour_type) - { - default: png_error(pp, "invalid color type"); - - case 0: return bit_depth; - - case 2: return 3*bit_depth; - - case 3: return bit_depth; - - case 4: return 2*bit_depth; - - case 6: return 4*bit_depth; - } -} - -#define TRANSFORM_WIDTH 128U -#define TRANSFORM_ROWMAX (TRANSFORM_WIDTH*8U) -#define SIZE_ROWMAX (16*8U) /* 16 pixels, max 8 bytes each - 128 bytes */ -#define STANDARD_ROWMAX TRANSFORM_ROWMAX /* The larger of the two */ -#define SIZE_HEIGHTMAX 16 /* Maximum range of size images */ - -static size_t -transform_rowsize(png_const_structp pp, png_byte colour_type, - png_byte bit_depth) -{ - return (TRANSFORM_WIDTH * bit_size(pp, colour_type, bit_depth)) / 8; -} - -/* transform_width(pp, colour_type, bit_depth) current returns the same number - * every time, so just use a macro: - */ -#define transform_width(pp, colour_type, bit_depth) TRANSFORM_WIDTH - -static png_uint_32 -transform_height(png_const_structp pp, png_byte colour_type, png_byte bit_depth) -{ - switch (bit_size(pp, colour_type, bit_depth)) - { - case 1: - case 2: - case 4: - return 1; /* Total of 128 pixels */ - - case 8: - return 2; /* Total of 256 pixels/bytes */ - - case 16: - return 512; /* Total of 65536 pixels */ - - case 24: - case 32: - return 512; /* 65536 pixels */ - - case 48: - case 64: - return 2048;/* 4 x 65536 pixels. */ -# define TRANSFORM_HEIGHTMAX 2048 - - default: - return 0; /* Error, will be caught later */ - } -} - -#ifdef PNG_READ_SUPPORTED -/* The following can only be defined here, now we have the definitions - * of the transform image sizes. - */ -static png_uint_32 -standard_width(png_const_structp pp, png_uint_32 id) -{ - png_uint_32 width = WIDTH_FROM_ID(id); - UNUSED(pp) - - if (width == 0) - width = transform_width(pp, COL_FROM_ID(id), DEPTH_FROM_ID(id)); - - return width; -} - -static png_uint_32 -standard_height(png_const_structp pp, png_uint_32 id) -{ - png_uint_32 height = HEIGHT_FROM_ID(id); - - if (height == 0) - height = transform_height(pp, COL_FROM_ID(id), DEPTH_FROM_ID(id)); - - return height; -} - -static png_uint_32 -standard_rowsize(png_const_structp pp, png_uint_32 id) -{ - png_uint_32 width = standard_width(pp, id); - - /* This won't overflow: */ - width *= bit_size(pp, COL_FROM_ID(id), DEPTH_FROM_ID(id)); - return (width + 7) / 8; -} -#endif /* PNG_READ_SUPPORTED */ - -static void -transform_row(png_const_structp pp, png_byte buffer[TRANSFORM_ROWMAX], - png_byte colour_type, png_byte bit_depth, png_uint_32 y) -{ - png_uint_32 v = y << 7; - png_uint_32 i = 0; - - switch (bit_size(pp, colour_type, bit_depth)) - { - case 1: - while (i<128/8) buffer[i] = (png_byte)(v & 0xff), v += 17, ++i; - return; - - case 2: - while (i<128/4) buffer[i] = (png_byte)(v & 0xff), v += 33, ++i; - return; - - case 4: - while (i<128/2) buffer[i] = (png_byte)(v & 0xff), v += 65, ++i; - return; - - case 8: - /* 256 bytes total, 128 bytes in each row set as follows: */ - while (i<128) buffer[i] = (png_byte)(v & 0xff), ++v, ++i; - return; - - case 16: - /* Generate all 65536 pixel values in order, which includes the 8 bit - * GA case as well as the 16 bit G case. - */ - while (i<128) - { - buffer[2*i] = (png_byte)((v>>8) & 0xff); - buffer[2*i+1] = (png_byte)(v & 0xff); - ++v; - ++i; - } - - return; - - case 24: - /* 65535 pixels, but rotate the values. */ - while (i<128) - { - /* Three bytes per pixel, r, g, b, make b by r^g */ - buffer[3*i+0] = (png_byte)((v >> 8) & 0xff); - buffer[3*i+1] = (png_byte)(v & 0xff); - buffer[3*i+2] = (png_byte)(((v >> 8) ^ v) & 0xff); - ++v; - ++i; - } - - return; - - case 32: - /* 65535 pixels, r, g, b, a; just replicate */ - while (i<128) - { - buffer[4*i+0] = (png_byte)((v >> 8) & 0xff); - buffer[4*i+1] = (png_byte)(v & 0xff); - buffer[4*i+2] = (png_byte)((v >> 8) & 0xff); - buffer[4*i+3] = (png_byte)(v & 0xff); - ++v; - ++i; - } - - return; - - case 48: - /* y is maximum 2047, giving 4x65536 pixels, make 'r' increase by 1 at - * each pixel, g increase by 257 (0x101) and 'b' by 0x1111: - */ - while (i<128) - { - png_uint_32 t = v++; - buffer[6*i+0] = (png_byte)((t >> 8) & 0xff); - buffer[6*i+1] = (png_byte)(t & 0xff); - t *= 257; - buffer[6*i+2] = (png_byte)((t >> 8) & 0xff); - buffer[6*i+3] = (png_byte)(t & 0xff); - t *= 17; - buffer[6*i+4] = (png_byte)((t >> 8) & 0xff); - buffer[6*i+5] = (png_byte)(t & 0xff); - ++i; - } - - return; - - case 64: - /* As above in the 32 bit case. */ - while (i<128) - { - png_uint_32 t = v++; - buffer[8*i+0] = (png_byte)((t >> 8) & 0xff); - buffer[8*i+1] = (png_byte)(t & 0xff); - buffer[8*i+4] = (png_byte)((t >> 8) & 0xff); - buffer[8*i+5] = (png_byte)(t & 0xff); - t *= 257; - buffer[8*i+2] = (png_byte)((t >> 8) & 0xff); - buffer[8*i+3] = (png_byte)(t & 0xff); - buffer[8*i+6] = (png_byte)((t >> 8) & 0xff); - buffer[8*i+7] = (png_byte)(t & 0xff); - ++i; - } - return; - - default: - break; - } - - png_error(pp, "internal error"); -} - -/* This is just to do the right cast - could be changed to a function to check - * 'bd' but there isn't much point. - */ -#define DEPTH(bd) ((png_byte)(1U << (bd))) - -/* This is just a helper for compiling on minimal systems with no write - * interlacing support. If there is no write interlacing we can't generate test - * cases with interlace: - */ -#ifdef PNG_WRITE_INTERLACING_SUPPORTED -# define INTERLACE_LAST PNG_INTERLACE_LAST -# define check_interlace_type(type) ((void)(type)) -# define set_write_interlace_handling(pp,type) png_set_interlace_handling(pp) -# define do_own_interlace 0 -#elif PNG_LIBPNG_VER < 10700 -# define set_write_interlace_handling(pp,type) (1) -static void -check_interlace_type(int const interlace_type) -{ - /* Prior to 1.7.0 libpng does not support the write of an interlaced image - * unless PNG_WRITE_INTERLACING_SUPPORTED, even with do_interlace so the - * code here does the pixel interlace itself, so: - */ - if (interlace_type != PNG_INTERLACE_NONE) - { - /* This is an internal error - --interlace tests should be skipped, not - * attempted. - */ - fprintf(stderr, "pngvalid: no interlace support\n"); - exit(99); - } -} -# define INTERLACE_LAST (PNG_INTERLACE_NONE+1) -# define do_own_interlace 0 -#else /* libpng 1.7+ */ -# define set_write_interlace_handling(pp,type)\ - npasses_from_interlace_type(pp,type) -# define check_interlace_type(type) ((void)(type)) -# define INTERLACE_LAST PNG_INTERLACE_LAST -# define do_own_interlace 1 -#endif /* WRITE_INTERLACING tests */ - -#if PNG_LIBPNG_VER >= 10700 || defined PNG_WRITE_INTERLACING_SUPPORTED -# define CAN_WRITE_INTERLACE 1 -#else -# define CAN_WRITE_INTERLACE 0 -#endif - -/* Do the same thing for read interlacing; this controls whether read tests do - * their own de-interlace or use libpng. - */ -#ifdef PNG_READ_INTERLACING_SUPPORTED -# define do_read_interlace 0 -#else /* no libpng read interlace support */ -# define do_read_interlace 1 -#endif -/* The following two routines use the PNG interlace support macros from - * png.h to interlace or deinterlace rows. - */ -static void -interlace_row(png_bytep buffer, png_const_bytep imageRow, - unsigned int pixel_size, png_uint_32 w, int pass, int littleendian) -{ - png_uint_32 xin, xout, xstep; - - /* Note that this can, trivially, be optimized to a memcpy on pass 7, the - * code is presented this way to make it easier to understand. In practice - * consult the code in the libpng source to see other ways of doing this. - * - * It is OK for buffer and imageRow to be identical, because 'xin' moves - * faster than 'xout' and we copy up. - */ - xin = PNG_PASS_START_COL(pass); - xstep = 1U<wname); - text.text = copy; - text.text_length = pos; - text.itxt_length = 0; - text.lang = 0; - text.lang_key = 0; - - png_set_text(pp, pi, &text, 1); - } -#endif - - if (colour_type == 3) /* palette */ - init_standard_palette(ps, pp, pi, 1U << bit_depth, 1/*do tRNS*/); - -# ifdef PNG_WRITE_tRNS_SUPPORTED - else if (palette_number) - set_random_tRNS(pp, pi, colour_type, bit_depth); -# endif - - png_write_info(pp, pi); - - if (png_get_rowbytes(pp, pi) != - transform_rowsize(pp, colour_type, bit_depth)) - png_error(pp, "transform row size incorrect"); - - else - { - /* Somewhat confusingly this must be called *after* png_write_info - * because if it is called before, the information in *pp has not been - * updated to reflect the interlaced image. - */ - int npasses = set_write_interlace_handling(pp, interlace_type); - int pass; - - if (npasses != npasses_from_interlace_type(pp, interlace_type)) - png_error(pp, "write: png_set_interlace_handling failed"); - - for (pass=0; pass 0) - interlace_row(buffer, buffer, - bit_size(pp, colour_type, bit_depth), w, pass, - 0/*data always bigendian*/); - else - continue; - } -# endif /* do_own_interlace */ - - choose_random_filter(pp, pass == 0 && y == 0); - png_write_row(pp, buffer); - } - } - } - -#ifdef PNG_TEXT_SUPPORTED - { - static char key[] = "end marker"; - static char comment[] = "end"; - png_text text; - - /* Use a compressed text string to test the correct interaction of text - * compression and IDAT compression. - */ - text.compression = TEXT_COMPRESSION; - text.key = key; - text.text = comment; - text.text_length = (sizeof comment)-1; - text.itxt_length = 0; - text.lang = 0; - text.lang_key = 0; - - png_set_text(pp, pi, &text, 1); - } -#endif - - png_write_end(pp, pi); - - /* And store this under the appropriate id, then clean up. */ - store_storefile(ps, FILEID(colour_type, bit_depth, palette_number, - interlace_type, 0, 0, 0)); - - store_write_reset(ps); - } - - Catch(fault) - { - /* Use the png_store returned by the exception. This may help the compiler - * because 'ps' is not used in this branch of the setjmp. Note that fault - * and ps will always be the same value. - */ - store_write_reset(fault); - } -} - -static void -make_transform_images(png_modifier *pm) -{ - png_byte colour_type = 0; - png_byte bit_depth = 0; - unsigned int palette_number = 0; - - /* This is in case of errors. */ - safecat(pm->this.test, sizeof pm->this.test, 0, "make standard images"); - - /* Use next_format to enumerate all the combinations we test, including - * generating multiple low bit depth palette images. Non-A images (palette - * and direct) are created with and without tRNS chunks. - */ - while (next_format(&colour_type, &bit_depth, &palette_number, 1, 1)) - { - int interlace_type; - - for (interlace_type = PNG_INTERLACE_NONE; - interlace_type < INTERLACE_LAST; ++interlace_type) - { - char name[FILE_NAME_SIZE]; - - standard_name(name, sizeof name, 0, colour_type, bit_depth, - palette_number, interlace_type, 0, 0, do_own_interlace); - make_transform_image(&pm->this, colour_type, bit_depth, palette_number, - interlace_type, name); - } - } -} - -/* Build a single row for the 'size' test images; this fills in only the - * first bit_width bits of the sample row. - */ -static void -size_row(png_byte buffer[SIZE_ROWMAX], png_uint_32 bit_width, png_uint_32 y) -{ - /* height is in the range 1 to 16, so: */ - y = ((y & 1) << 7) + ((y & 2) << 6) + ((y & 4) << 5) + ((y & 8) << 4); - /* the following ensures bits are set in small images: */ - y ^= 0xA5; - - while (bit_width >= 8) - *buffer++ = (png_byte)y++, bit_width -= 8; - - /* There may be up to 7 remaining bits, these go in the most significant - * bits of the byte. - */ - if (bit_width > 0) - { - png_uint_32 mask = (1U<<(8-bit_width))-1; - *buffer = (png_byte)((*buffer & mask) | (y & ~mask)); - } -} - -static void -make_size_image(png_store* const ps, png_byte const colour_type, - png_byte const bit_depth, int const interlace_type, - png_uint_32 const w, png_uint_32 const h, - int const do_interlace) -{ - context(ps, fault); - - check_interlace_type(interlace_type); - - Try - { - png_infop pi; - png_structp pp; - unsigned int pixel_size; - - /* Make a name and get an appropriate id for the store: */ - char name[FILE_NAME_SIZE]; - png_uint_32 id = FILEID(colour_type, bit_depth, 0/*palette*/, - interlace_type, w, h, do_interlace); - - standard_name_from_id(name, sizeof name, 0, id); - pp = set_store_for_write(ps, &pi, name); - - /* In the event of a problem return control to the Catch statement below - * to do the clean up - it is not possible to 'return' directly from a Try - * block. - */ - if (pp == NULL) - Throw ps; - - png_set_IHDR(pp, pi, w, h, bit_depth, colour_type, interlace_type, - PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - -#ifdef PNG_TEXT_SUPPORTED - { - static char key[] = "image name"; /* must be writeable */ - size_t pos; - png_text text; - char copy[FILE_NAME_SIZE]; - - /* Use a compressed text string to test the correct interaction of text - * compression and IDAT compression. - */ - text.compression = TEXT_COMPRESSION; - text.key = key; - /* Yuck: the text must be writable! */ - pos = safecat(copy, sizeof copy, 0, ps->wname); - text.text = copy; - text.text_length = pos; - text.itxt_length = 0; - text.lang = 0; - text.lang_key = 0; - - png_set_text(pp, pi, &text, 1); - } -#endif - - if (colour_type == 3) /* palette */ - init_standard_palette(ps, pp, pi, 1U << bit_depth, 0/*do tRNS*/); - - png_write_info(pp, pi); - - /* Calculate the bit size, divide by 8 to get the byte size - this won't - * overflow because we know the w values are all small enough even for - * a system where 'unsigned int' is only 16 bits. - */ - pixel_size = bit_size(pp, colour_type, bit_depth); - if (png_get_rowbytes(pp, pi) != ((w * pixel_size) + 7) / 8) - png_error(pp, "size row size incorrect"); - - else - { - int npasses = npasses_from_interlace_type(pp, interlace_type); - png_uint_32 y; - int pass; - png_byte image[16][SIZE_ROWMAX]; - - /* To help consistent error detection make the parts of this buffer - * that aren't set below all '1': - */ - memset(image, 0xff, sizeof image); - - if (!do_interlace && - npasses != set_write_interlace_handling(pp, interlace_type)) - png_error(pp, "write: png_set_interlace_handling failed"); - - /* Prepare the whole image first to avoid making it 7 times: */ - for (y=0; y 0) - { - /* Set to all 1's for error detection (libpng tends to - * set unset things to 0). - */ - memset(tempRow, 0xff, sizeof tempRow); - interlace_row(tempRow, row, pixel_size, w, pass, - 0/*data always bigendian*/); - row = tempRow; - } - else - continue; - } - -# ifdef PNG_WRITE_FILTER_SUPPORTED - /* Only get to here if the row has some pixels in it, set the - * filters to 'all' for the very first row and thereafter to a - * single filter. It isn't well documented, but png_set_filter - * does accept a filter number (per the spec) as well as a bit - * mask. - * - * The code now uses filters at random, except that on the first - * row of an image it ensures that a previous row filter is in - * the set so that libpng allocates the row buffer. - */ - { - int filters = 8 << random_mod(PNG_FILTER_VALUE_LAST); - - if (pass == 0 && y == 0 && - (filters < PNG_FILTER_UP || w == 1U)) - filters |= PNG_FILTER_UP; - - png_set_filter(pp, 0/*method*/, filters); - } -# endif - - png_write_row(pp, row); - } - } - } - -#ifdef PNG_TEXT_SUPPORTED - { - static char key[] = "end marker"; - static char comment[] = "end"; - png_text text; - - /* Use a compressed text string to test the correct interaction of text - * compression and IDAT compression. - */ - text.compression = TEXT_COMPRESSION; - text.key = key; - text.text = comment; - text.text_length = (sizeof comment)-1; - text.itxt_length = 0; - text.lang = 0; - text.lang_key = 0; - - png_set_text(pp, pi, &text, 1); - } -#endif - - png_write_end(pp, pi); - - /* And store this under the appropriate id, then clean up. */ - store_storefile(ps, id); - - store_write_reset(ps); - } - - Catch(fault) - { - /* Use the png_store returned by the exception. This may help the compiler - * because 'ps' is not used in this branch of the setjmp. Note that fault - * and ps will always be the same value. - */ - store_write_reset(fault); - } -} - -static void -make_size(png_store* const ps, png_byte const colour_type, int bdlo, - int const bdhi) -{ - for (; bdlo <= bdhi; ++bdlo) - { - png_uint_32 width; - - for (width = 1; width <= 16; ++width) - { - png_uint_32 height; - - for (height = 1; height <= 16; ++height) - { - /* The four combinations of DIY interlace and interlace or not - - * no interlace + DIY should be identical to no interlace with - * libpng doing it. - */ - make_size_image(ps, colour_type, DEPTH(bdlo), PNG_INTERLACE_NONE, - width, height, 0); - make_size_image(ps, colour_type, DEPTH(bdlo), PNG_INTERLACE_NONE, - width, height, 1); -# ifdef PNG_WRITE_INTERLACING_SUPPORTED - make_size_image(ps, colour_type, DEPTH(bdlo), PNG_INTERLACE_ADAM7, - width, height, 0); -# endif -# if CAN_WRITE_INTERLACE - /* 1.7.0 removes the hack that prevented app write of an interlaced - * image if WRITE_INTERLACE was not supported - */ - make_size_image(ps, colour_type, DEPTH(bdlo), PNG_INTERLACE_ADAM7, - width, height, 1); -# endif - } - } - } -} - -static void -make_size_images(png_store *ps) -{ - /* This is in case of errors. */ - safecat(ps->test, sizeof ps->test, 0, "make size images"); - - /* Arguments are colour_type, low bit depth, high bit depth - */ - make_size(ps, 0, 0, WRITE_BDHI); - make_size(ps, 2, 3, WRITE_BDHI); - make_size(ps, 3, 0, 3 /*palette: max 8 bits*/); - make_size(ps, 4, 3, WRITE_BDHI); - make_size(ps, 6, 3, WRITE_BDHI); -} - -#ifdef PNG_READ_SUPPORTED -/* Return a row based on image id and 'y' for checking: */ -static void -standard_row(png_const_structp pp, png_byte std[STANDARD_ROWMAX], - png_uint_32 id, png_uint_32 y) -{ - if (WIDTH_FROM_ID(id) == 0) - transform_row(pp, std, COL_FROM_ID(id), DEPTH_FROM_ID(id), y); - else - size_row(std, WIDTH_FROM_ID(id) * bit_size(pp, COL_FROM_ID(id), - DEPTH_FROM_ID(id)), y); -} -#endif /* PNG_READ_SUPPORTED */ - -/* Tests - individual test cases */ -/* Like 'make_standard' but errors are deliberately introduced into the calls - * to ensure that they get detected - it should not be possible to write an - * invalid image with libpng! - */ -/* TODO: the 'set' functions can probably all be made to take a - * png_const_structp rather than a modifiable one. - */ -#ifdef PNG_WARNINGS_SUPPORTED -static void -sBIT0_error_fn(png_structp pp, png_infop pi) -{ - /* 0 is invalid... */ - png_color_8 bad; - bad.red = bad.green = bad.blue = bad.gray = bad.alpha = 0; - png_set_sBIT(pp, pi, &bad); -} - -static void -sBIT_error_fn(png_structp pp, png_infop pi) -{ - png_byte bit_depth; - png_color_8 bad; - - if (png_get_color_type(pp, pi) == PNG_COLOR_TYPE_PALETTE) - bit_depth = 8; - - else - bit_depth = png_get_bit_depth(pp, pi); - - /* Now we know the bit depth we can easily generate an invalid sBIT entry */ - bad.red = bad.green = bad.blue = bad.gray = bad.alpha = - (png_byte)(bit_depth+1); - png_set_sBIT(pp, pi, &bad); -} - -static const struct -{ - void (*fn)(png_structp, png_infop); - const char *msg; - unsigned int warning :1; /* the error is a warning... */ -} error_test[] = - { - /* no warnings makes these errors undetectable prior to 1.7.0 */ - { sBIT0_error_fn, "sBIT(0): failed to detect error", - PNG_LIBPNG_VER < 10700 }, - - { sBIT_error_fn, "sBIT(too big): failed to detect error", - PNG_LIBPNG_VER < 10700 }, - }; - -static void -make_error(png_store* const ps, png_byte const colour_type, - png_byte bit_depth, int interlace_type, int test, png_const_charp name) -{ - context(ps, fault); - - check_interlace_type(interlace_type); - - Try - { - png_infop pi; - png_structp pp = set_store_for_write(ps, &pi, name); - png_uint_32 w, h; - gnu_volatile(pp) - - if (pp == NULL) - Throw ps; - - w = transform_width(pp, colour_type, bit_depth); - gnu_volatile(w) - h = transform_height(pp, colour_type, bit_depth); - gnu_volatile(h) - png_set_IHDR(pp, pi, w, h, bit_depth, colour_type, interlace_type, - PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - - if (colour_type == 3) /* palette */ - init_standard_palette(ps, pp, pi, 1U << bit_depth, 0/*do tRNS*/); - - /* Time for a few errors; these are in various optional chunks, the - * standard tests test the standard chunks pretty well. - */ -# define exception__prev exception_prev_1 -# define exception__env exception_env_1 - Try - { - gnu_volatile(exception__prev) - - /* Expect this to throw: */ - ps->expect_error = !error_test[test].warning; - ps->expect_warning = error_test[test].warning; - ps->saw_warning = 0; - error_test[test].fn(pp, pi); - - /* Normally the error is only detected here: */ - png_write_info(pp, pi); - - /* And handle the case where it was only a warning: */ - if (ps->expect_warning && ps->saw_warning) - Throw ps; - - /* If we get here there is a problem, we have success - no error or - * no warning - when we shouldn't have success. Log an error. - */ - store_log(ps, pp, error_test[test].msg, 1 /*error*/); - } - - Catch (fault) - { /* expected exit */ - } -#undef exception__prev -#undef exception__env - - /* And clear these flags */ - ps->expect_warning = 0; - - if (ps->expect_error) - ps->expect_error = 0; - - else - { - /* Now write the whole image, just to make sure that the detected, or - * undetected, error has not created problems inside libpng. This - * doesn't work if there was a png_error in png_write_info because that - * can abort before PLTE was written. - */ - if (png_get_rowbytes(pp, pi) != - transform_rowsize(pp, colour_type, bit_depth)) - png_error(pp, "row size incorrect"); - - else - { - int npasses = set_write_interlace_handling(pp, interlace_type); - int pass; - - if (npasses != npasses_from_interlace_type(pp, interlace_type)) - png_error(pp, "write: png_set_interlace_handling failed"); - - for (pass=0; pass 0) - interlace_row(buffer, buffer, - bit_size(pp, colour_type, bit_depth), w, pass, - 0/*data always bigendian*/); - else - continue; - } -# endif /* do_own_interlace */ - - png_write_row(pp, buffer); - } - } - } /* image writing */ - - png_write_end(pp, pi); - } - - /* The following deletes the file that was just written. */ - store_write_reset(ps); - } - - Catch(fault) - { - store_write_reset(fault); - } -} - -static int -make_errors(png_modifier* const pm, png_byte const colour_type, - int bdlo, int const bdhi) -{ - for (; bdlo <= bdhi; ++bdlo) - { - int interlace_type; - - for (interlace_type = PNG_INTERLACE_NONE; - interlace_type < INTERLACE_LAST; ++interlace_type) - { - unsigned int test; - char name[FILE_NAME_SIZE]; - - standard_name(name, sizeof name, 0, colour_type, 1<this, colour_type, DEPTH(bdlo), interlace_type, - test, name); - - if (fail(pm)) - return 0; - } - } - } - - return 1; /* keep going */ -} -#endif /* PNG_WARNINGS_SUPPORTED */ - -static void -perform_error_test(png_modifier *pm) -{ -#ifdef PNG_WARNINGS_SUPPORTED /* else there are no cases that work! */ - /* Need to do this here because we just write in this test. */ - safecat(pm->this.test, sizeof pm->this.test, 0, "error test"); - - if (!make_errors(pm, 0, 0, WRITE_BDHI)) - return; - - if (!make_errors(pm, 2, 3, WRITE_BDHI)) - return; - - if (!make_errors(pm, 3, 0, 3)) - return; - - if (!make_errors(pm, 4, 3, WRITE_BDHI)) - return; - - if (!make_errors(pm, 6, 3, WRITE_BDHI)) - return; -#else - UNUSED(pm) -#endif -} - -/* This is just to validate the internal PNG formatting code - if this fails - * then the warning messages the library outputs will probably be garbage. - */ -static void -perform_formatting_test(png_store *ps) -{ -#ifdef PNG_TIME_RFC1123_SUPPORTED - /* The handle into the formatting code is the RFC1123 support; this test does - * nothing if that is compiled out. - */ - context(ps, fault); - - Try - { - png_const_charp correct = "29 Aug 2079 13:53:60 +0000"; - png_const_charp result; -# if PNG_LIBPNG_VER >= 10600 - char timestring[29]; -# endif - png_structp pp; - png_time pt; - - pp = set_store_for_write(ps, NULL, "libpng formatting test"); - - if (pp == NULL) - Throw ps; - - - /* Arbitrary settings: */ - pt.year = 2079; - pt.month = 8; - pt.day = 29; - pt.hour = 13; - pt.minute = 53; - pt.second = 60; /* a leap second */ - -# if PNG_LIBPNG_VER < 10600 - result = png_convert_to_rfc1123(pp, &pt); -# else - if (png_convert_to_rfc1123_buffer(timestring, &pt)) - result = timestring; - - else - result = NULL; -# endif - - if (result == NULL) - png_error(pp, "png_convert_to_rfc1123 failed"); - - if (strcmp(result, correct) != 0) - { - size_t pos = 0; - char msg[128]; - - pos = safecat(msg, sizeof msg, pos, "png_convert_to_rfc1123("); - pos = safecat(msg, sizeof msg, pos, correct); - pos = safecat(msg, sizeof msg, pos, ") returned: '"); - pos = safecat(msg, sizeof msg, pos, result); - pos = safecat(msg, sizeof msg, pos, "'"); - - png_error(pp, msg); - } - - store_write_reset(ps); - } - - Catch(fault) - { - store_write_reset(fault); - } -#else - UNUSED(ps) -#endif -} - -#ifdef PNG_READ_SUPPORTED -/* Because we want to use the same code in both the progressive reader and the - * sequential reader it is necessary to deal with the fact that the progressive - * reader callbacks only have one parameter (png_get_progressive_ptr()), so this - * must contain all the test parameters and all the local variables directly - * accessible to the sequential reader implementation. - * - * The technique adopted is to reinvent part of what Dijkstra termed a - * 'display'; an array of pointers to the stack frames of enclosing functions so - * that a nested function definition can access the local (C auto) variables of - * the functions that contain its definition. In fact C provides the first - * pointer (the local variables - the stack frame pointer) and the last (the - * global variables - the BCPL global vector typically implemented as global - * addresses), this code requires one more pointer to make the display - the - * local variables (and function call parameters) of the function that actually - * invokes either the progressive or sequential reader. - * - * Perhaps confusingly this technique is confounded with classes - the - * 'standard_display' defined here is sub-classed as the 'gamma_display' below. - * A gamma_display is a standard_display, taking advantage of the ANSI-C - * requirement that the pointer to the first member of a structure must be the - * same as the pointer to the structure. This allows us to reuse standard_ - * functions in the gamma test code; something that could not be done with - * nested functions! - */ -typedef struct standard_display -{ - png_store* ps; /* Test parameters (passed to the function) */ - png_byte colour_type; - png_byte bit_depth; - png_byte red_sBIT; /* Input data sBIT values. */ - png_byte green_sBIT; - png_byte blue_sBIT; - png_byte alpha_sBIT; - png_byte interlace_type; - png_byte filler; /* Output has a filler */ - png_uint_32 id; /* Calculated file ID */ - png_uint_32 w; /* Width of image */ - png_uint_32 h; /* Height of image */ - int npasses; /* Number of interlaced passes */ - png_uint_32 pixel_size; /* Width of one pixel in bits */ - png_uint_32 bit_width; /* Width of output row in bits */ - size_t cbRow; /* Bytes in a row of the output image */ - int do_interlace; /* Do interlacing internally */ - int littleendian; /* App (row) data is little endian */ - int is_transparent; /* Transparency information was present. */ - int has_tRNS; /* color type GRAY or RGB with a tRNS chunk. */ - int speed; /* Doing a speed test */ - int use_update_info;/* Call update_info, not start_image */ - struct - { - png_uint_16 red; - png_uint_16 green; - png_uint_16 blue; - } transparent; /* The transparent color, if set. */ - int npalette; /* Number of entries in the palette. */ - store_palette - palette; -} standard_display; - -static void -standard_display_init(standard_display *dp, png_store* ps, png_uint_32 id, - int do_interlace, int use_update_info) -{ - memset(dp, 0, sizeof *dp); - - dp->ps = ps; - dp->colour_type = COL_FROM_ID(id); - dp->bit_depth = DEPTH_FROM_ID(id); - if (dp->bit_depth < 1 || dp->bit_depth > 16) - internal_error(ps, "internal: bad bit depth"); - if (dp->colour_type == 3) - dp->red_sBIT = dp->blue_sBIT = dp->green_sBIT = dp->alpha_sBIT = 8; - else - dp->red_sBIT = dp->blue_sBIT = dp->green_sBIT = dp->alpha_sBIT = - dp->bit_depth; - dp->interlace_type = INTERLACE_FROM_ID(id); - check_interlace_type(dp->interlace_type); - dp->id = id; - /* All the rest are filled in after the read_info: */ - dp->w = 0; - dp->h = 0; - dp->npasses = 0; - dp->pixel_size = 0; - dp->bit_width = 0; - dp->cbRow = 0; - dp->do_interlace = do_interlace; - dp->littleendian = 0; - dp->is_transparent = 0; - dp->speed = ps->speed; - dp->use_update_info = use_update_info; - dp->npalette = 0; - /* Preset the transparent color to black: */ - memset(&dp->transparent, 0, sizeof dp->transparent); - /* Preset the palette to full intensity/opaque throughout: */ - memset(dp->palette, 0xff, sizeof dp->palette); -} - -/* Initialize the palette fields - this must be done later because the palette - * comes from the particular png_store_file that is selected. - */ -static void -standard_palette_init(standard_display *dp) -{ - store_palette_entry *palette = store_current_palette(dp->ps, &dp->npalette); - - /* The remaining entries remain white/opaque. */ - if (dp->npalette > 0) - { - int i = dp->npalette; - memcpy(dp->palette, palette, i * sizeof *palette); - - /* Check for a non-opaque palette entry: */ - while (--i >= 0) - if (palette[i].alpha < 255) - break; - -# ifdef __GNUC__ - /* GCC can't handle the more obviously optimizable version. */ - if (i >= 0) - dp->is_transparent = 1; - else - dp->is_transparent = 0; -# else - dp->is_transparent = (i >= 0); -# endif - } -} - -/* Utility to read the palette from the PNG file and convert it into - * store_palette format. This returns 1 if there is any transparency in the - * palette (it does not check for a transparent colour in the non-palette case.) - */ -static int -read_palette(store_palette palette, int *npalette, png_const_structp pp, - png_infop pi) -{ - png_colorp pal; - png_bytep trans_alpha; - int num; - - pal = 0; - *npalette = -1; - - if (png_get_PLTE(pp, pi, &pal, npalette) & PNG_INFO_PLTE) - { - int i = *npalette; - - if (i <= 0 || i > 256) - png_error(pp, "validate: invalid PLTE count"); - - while (--i >= 0) - { - palette[i].red = pal[i].red; - palette[i].green = pal[i].green; - palette[i].blue = pal[i].blue; - } - - /* Mark the remainder of the entries with a flag value (other than - * white/opaque which is the flag value stored above.) - */ - memset(palette + *npalette, 126, (256-*npalette) * sizeof *palette); - } - - else /* !png_get_PLTE */ - { - if (*npalette != (-1)) - png_error(pp, "validate: invalid PLTE result"); - /* But there is no palette, so record this: */ - *npalette = 0; - memset(palette, 113, sizeof (store_palette)); - } - - trans_alpha = 0; - num = 2; /* force error below */ - if ((png_get_tRNS(pp, pi, &trans_alpha, &num, 0) & PNG_INFO_tRNS) != 0 && - (trans_alpha != NULL || num != 1/*returns 1 for a transparent color*/) && - /* Oops, if a palette tRNS gets expanded png_read_update_info (at least so - * far as 1.5.4) does not remove the trans_alpha pointer, only num_trans, - * so in the above call we get a success, we get a pointer (who knows what - * to) and we get num_trans == 0: - */ - !(trans_alpha != NULL && num == 0)) /* TODO: fix this in libpng. */ - { - int i; - - /* Any of these are crash-worthy - given the implementation of - * png_get_tRNS up to 1.5 an app won't crash if it just checks the - * result above and fails to check that the variables it passed have - * actually been filled in! Note that if the app were to pass the - * last, png_color_16p, variable too it couldn't rely on this. - */ - if (trans_alpha == NULL || num <= 0 || num > 256 || num > *npalette) - png_error(pp, "validate: unexpected png_get_tRNS (palette) result"); - - for (i=0; iis_transparent) - png_error(pp, "validate: palette transparency changed"); - - if (npalette != dp->npalette) - { - size_t pos = 0; - char msg[64]; - - pos = safecat(msg, sizeof msg, pos, "validate: palette size changed: "); - pos = safecatn(msg, sizeof msg, pos, dp->npalette); - pos = safecat(msg, sizeof msg, pos, " -> "); - pos = safecatn(msg, sizeof msg, pos, npalette); - png_error(pp, msg); - } - - { - int i = npalette; /* npalette is aliased */ - - while (--i >= 0) - if (palette[i].red != dp->palette[i].red || - palette[i].green != dp->palette[i].green || - palette[i].blue != dp->palette[i].blue || - palette[i].alpha != dp->palette[i].alpha) - png_error(pp, "validate: PLTE or tRNS chunk changed"); - } -} - -/* By passing a 'standard_display' the progressive callbacks can be used - * directly by the sequential code, the functions suffixed "_imp" are the - * implementations, the functions without the suffix are the callbacks. - * - * The code for the info callback is split into two because this callback calls - * png_read_update_info or png_start_read_image and what gets called depends on - * whether the info needs updating (we want to test both calls in pngvalid.) - */ -static void -standard_info_part1(standard_display *dp, png_structp pp, png_infop pi) -{ - if (png_get_bit_depth(pp, pi) != dp->bit_depth) - png_error(pp, "validate: bit depth changed"); - - if (png_get_color_type(pp, pi) != dp->colour_type) - png_error(pp, "validate: color type changed"); - - if (png_get_filter_type(pp, pi) != PNG_FILTER_TYPE_BASE) - png_error(pp, "validate: filter type changed"); - - if (png_get_interlace_type(pp, pi) != dp->interlace_type) - png_error(pp, "validate: interlacing changed"); - - if (png_get_compression_type(pp, pi) != PNG_COMPRESSION_TYPE_BASE) - png_error(pp, "validate: compression type changed"); - - dp->w = png_get_image_width(pp, pi); - - if (dp->w != standard_width(pp, dp->id)) - png_error(pp, "validate: image width changed"); - - dp->h = png_get_image_height(pp, pi); - - if (dp->h != standard_height(pp, dp->id)) - png_error(pp, "validate: image height changed"); - - /* Record (but don't check at present) the input sBIT according to the colour - * type information. - */ - { - png_color_8p sBIT = 0; - - if (png_get_sBIT(pp, pi, &sBIT) & PNG_INFO_sBIT) - { - int sBIT_invalid = 0; - - if (sBIT == 0) - png_error(pp, "validate: unexpected png_get_sBIT result"); - - if (dp->colour_type & PNG_COLOR_MASK_COLOR) - { - if (sBIT->red == 0 || sBIT->red > dp->bit_depth) - sBIT_invalid = 1; - else - dp->red_sBIT = sBIT->red; - - if (sBIT->green == 0 || sBIT->green > dp->bit_depth) - sBIT_invalid = 1; - else - dp->green_sBIT = sBIT->green; - - if (sBIT->blue == 0 || sBIT->blue > dp->bit_depth) - sBIT_invalid = 1; - else - dp->blue_sBIT = sBIT->blue; - } - - else /* !COLOR */ - { - if (sBIT->gray == 0 || sBIT->gray > dp->bit_depth) - sBIT_invalid = 1; - else - dp->blue_sBIT = dp->green_sBIT = dp->red_sBIT = sBIT->gray; - } - - /* All 8 bits in tRNS for a palette image are significant - see the - * spec. - */ - if (dp->colour_type & PNG_COLOR_MASK_ALPHA) - { - if (sBIT->alpha == 0 || sBIT->alpha > dp->bit_depth) - sBIT_invalid = 1; - else - dp->alpha_sBIT = sBIT->alpha; - } - - if (sBIT_invalid) - png_error(pp, "validate: sBIT value out of range"); - } - } - - /* Important: this is validating the value *before* any transforms have been - * put in place. It doesn't matter for the standard tests, where there are - * no transforms, but it does for other tests where rowbytes may change after - * png_read_update_info. - */ - if (png_get_rowbytes(pp, pi) != standard_rowsize(pp, dp->id)) - png_error(pp, "validate: row size changed"); - - /* Validate the colour type 3 palette (this can be present on other color - * types.) - */ - standard_palette_validate(dp, pp, pi); - - /* In any case always check for a transparent color (notice that the - * colour type 3 case must not give a successful return on the get_tRNS call - * with these arguments!) - */ - { - png_color_16p trans_color = 0; - - if (png_get_tRNS(pp, pi, 0, 0, &trans_color) & PNG_INFO_tRNS) - { - if (trans_color == 0) - png_error(pp, "validate: unexpected png_get_tRNS (color) result"); - - switch (dp->colour_type) - { - case 0: - dp->transparent.red = dp->transparent.green = dp->transparent.blue = - trans_color->gray; - dp->has_tRNS = 1; - break; - - case 2: - dp->transparent.red = trans_color->red; - dp->transparent.green = trans_color->green; - dp->transparent.blue = trans_color->blue; - dp->has_tRNS = 1; - break; - - case 3: - /* Not expected because it should result in the array case - * above. - */ - png_error(pp, "validate: unexpected png_get_tRNS result"); - break; - - default: - png_error(pp, "validate: invalid tRNS chunk with alpha image"); - } - } - } - - /* Read the number of passes - expected to match the value used when - * creating the image (interlaced or not). This has the side effect of - * turning on interlace handling (if do_interlace is not set.) - */ - dp->npasses = npasses_from_interlace_type(pp, dp->interlace_type); - if (!dp->do_interlace) - { -# ifdef PNG_READ_INTERLACING_SUPPORTED - if (dp->npasses != png_set_interlace_handling(pp)) - png_error(pp, "validate: file changed interlace type"); -# else /* !READ_INTERLACING */ - /* This should never happen: the relevant tests (!do_interlace) should - * not be run. - */ - if (dp->npasses > 1) - png_error(pp, "validate: no libpng interlace support"); -# endif /* !READ_INTERLACING */ - } - - /* Caller calls png_read_update_info or png_start_read_image now, then calls - * part2. - */ -} - -/* This must be called *after* the png_read_update_info call to get the correct - * 'rowbytes' value, otherwise png_get_rowbytes will refer to the untransformed - * image. - */ -static void -standard_info_part2(standard_display *dp, png_const_structp pp, - png_const_infop pi, int nImages) -{ - /* Record cbRow now that it can be found. */ - { - png_byte ct = png_get_color_type(pp, pi); - png_byte bd = png_get_bit_depth(pp, pi); - - if (bd >= 8 && (ct == PNG_COLOR_TYPE_RGB || ct == PNG_COLOR_TYPE_GRAY) && - dp->filler) - ct |= 4; /* handle filler as faked alpha channel */ - - dp->pixel_size = bit_size(pp, ct, bd); - } - dp->bit_width = png_get_image_width(pp, pi) * dp->pixel_size; - dp->cbRow = png_get_rowbytes(pp, pi); - - /* Validate the rowbytes here again. */ - if (dp->cbRow != (dp->bit_width+7)/8) - png_error(pp, "bad png_get_rowbytes calculation"); - - /* Then ensure there is enough space for the output image(s). */ - store_ensure_image(dp->ps, pp, nImages, dp->cbRow, dp->h); -} - -static void -standard_info_imp(standard_display *dp, png_structp pp, png_infop pi, - int nImages) -{ - /* Note that the validation routine has the side effect of turning on - * interlace handling in the subsequent code. - */ - standard_info_part1(dp, pp, pi); - - /* And the info callback has to call this (or png_read_update_info - see - * below in the png_modifier code for that variant. - */ - if (dp->use_update_info) - { - /* For debugging the effect of multiple calls: */ - int i = dp->use_update_info; - while (i-- > 0) - png_read_update_info(pp, pi); - } - - else - png_start_read_image(pp); - - /* Validate the height, width and rowbytes plus ensure that sufficient buffer - * exists for decoding the image. - */ - standard_info_part2(dp, pp, pi, nImages); -} - -static void PNGCBAPI -standard_info(png_structp pp, png_infop pi) -{ - standard_display *dp = voidcast(standard_display*, - png_get_progressive_ptr(pp)); - - /* Call with nImages==1 because the progressive reader can only produce one - * image. - */ - standard_info_imp(dp, pp, pi, 1 /*only one image*/); -} - -static void PNGCBAPI -progressive_row(png_structp ppIn, png_bytep new_row, png_uint_32 y, int pass) -{ - png_const_structp pp = ppIn; - const standard_display *dp = voidcast(standard_display*, - png_get_progressive_ptr(pp)); - - /* When handling interlacing some rows will be absent in each pass, the - * callback still gets called, but with a NULL pointer. This is checked - * in the 'else' clause below. We need our own 'cbRow', but we can't call - * png_get_rowbytes because we got no info structure. - */ - if (new_row != NULL) - { - png_bytep row; - - /* In the case where the reader doesn't do the interlace it gives - * us the y in the sub-image: - */ - if (dp->do_interlace && dp->interlace_type == PNG_INTERLACE_ADAM7) - { -#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED - /* Use this opportunity to validate the png 'current' APIs: */ - if (y != png_get_current_row_number(pp)) - png_error(pp, "png_get_current_row_number is broken"); - - if (pass != png_get_current_pass_number(pp)) - png_error(pp, "png_get_current_pass_number is broken"); -#endif /* USER_TRANSFORM_INFO */ - - y = PNG_ROW_FROM_PASS_ROW(y, pass); - } - - /* Validate this just in case. */ - if (y >= dp->h) - png_error(pp, "invalid y to progressive row callback"); - - row = store_image_row(dp->ps, pp, 0, y); - - /* Combine the new row into the old: */ -#ifdef PNG_READ_INTERLACING_SUPPORTED - if (dp->do_interlace) -#endif /* READ_INTERLACING */ - { - if (dp->interlace_type == PNG_INTERLACE_ADAM7) - deinterlace_row(row, new_row, dp->pixel_size, dp->w, pass, - dp->littleendian); - else - row_copy(row, new_row, dp->pixel_size * dp->w, dp->littleendian); - } -#ifdef PNG_READ_INTERLACING_SUPPORTED - else - png_progressive_combine_row(pp, row, new_row); -#endif /* PNG_READ_INTERLACING_SUPPORTED */ - } - - else if (dp->interlace_type == PNG_INTERLACE_ADAM7 && - PNG_ROW_IN_INTERLACE_PASS(y, pass) && - PNG_PASS_COLS(dp->w, pass) > 0) - png_error(pp, "missing row in progressive de-interlacing"); -} - -static void -sequential_row(standard_display *dp, png_structp pp, png_infop pi, - int iImage, int iDisplay) -{ - int npasses = dp->npasses; - int do_interlace = dp->do_interlace && - dp->interlace_type == PNG_INTERLACE_ADAM7; - png_uint_32 height = standard_height(pp, dp->id); - png_uint_32 width = standard_width(pp, dp->id); - const png_store* ps = dp->ps; - int pass; - - for (pass=0; pass 0 && PNG_ROW_IN_INTERLACE_PASS(y, pass)) - { - /* Read the row into a pair of temporary buffers, then do the - * merge here into the output rows. - */ - png_byte row[STANDARD_ROWMAX], display[STANDARD_ROWMAX]; - - /* The following aids (to some extent) error detection - we can - * see where png_read_row wrote. Use opposite values in row and - * display to make this easier. Don't use 0xff (which is used in - * the image write code to fill unused bits) or 0 (which is a - * likely value to overwrite unused bits with). - */ - memset(row, 0xc5, sizeof row); - memset(display, 0x5c, sizeof display); - - png_read_row(pp, row, display); - - if (iImage >= 0) - deinterlace_row(store_image_row(ps, pp, iImage, y), row, - dp->pixel_size, dp->w, pass, dp->littleendian); - - if (iDisplay >= 0) - deinterlace_row(store_image_row(ps, pp, iDisplay, y), display, - dp->pixel_size, dp->w, pass, dp->littleendian); - } - } - else - png_read_row(pp, - iImage >= 0 ? store_image_row(ps, pp, iImage, y) : NULL, - iDisplay >= 0 ? store_image_row(ps, pp, iDisplay, y) : NULL); - } - } - - /* And finish the read operation (only really necessary if the caller wants - * to find additional data in png_info from chunks after the last IDAT.) - */ - png_read_end(pp, pi); -} - -#ifdef PNG_TEXT_SUPPORTED -static void -standard_check_text(png_const_structp pp, png_const_textp tp, - png_const_charp keyword, png_const_charp text) -{ - char msg[1024]; - size_t pos = safecat(msg, sizeof msg, 0, "text: "); - size_t ok; - - pos = safecat(msg, sizeof msg, pos, keyword); - pos = safecat(msg, sizeof msg, pos, ": "); - ok = pos; - - if (tp->compression != TEXT_COMPRESSION) - { - char buf[64]; - - sprintf(buf, "compression [%d->%d], ", TEXT_COMPRESSION, - tp->compression); - pos = safecat(msg, sizeof msg, pos, buf); - } - - if (tp->key == NULL || strcmp(tp->key, keyword) != 0) - { - pos = safecat(msg, sizeof msg, pos, "keyword \""); - if (tp->key != NULL) - { - pos = safecat(msg, sizeof msg, pos, tp->key); - pos = safecat(msg, sizeof msg, pos, "\", "); - } - - else - pos = safecat(msg, sizeof msg, pos, "null, "); - } - - if (tp->text == NULL) - pos = safecat(msg, sizeof msg, pos, "text lost, "); - - else - { - if (tp->text_length != strlen(text)) - { - char buf[64]; - sprintf(buf, "text length changed[%lu->%lu], ", - (unsigned long)strlen(text), (unsigned long)tp->text_length); - pos = safecat(msg, sizeof msg, pos, buf); - } - - if (strcmp(tp->text, text) != 0) - { - pos = safecat(msg, sizeof msg, pos, "text becomes \""); - pos = safecat(msg, sizeof msg, pos, tp->text); - pos = safecat(msg, sizeof msg, pos, "\" (was \""); - pos = safecat(msg, sizeof msg, pos, text); - pos = safecat(msg, sizeof msg, pos, "\"), "); - } - } - - if (tp->itxt_length != 0) - pos = safecat(msg, sizeof msg, pos, "iTXt length set, "); - - if (tp->lang != NULL) - { - pos = safecat(msg, sizeof msg, pos, "iTXt language \""); - pos = safecat(msg, sizeof msg, pos, tp->lang); - pos = safecat(msg, sizeof msg, pos, "\", "); - } - - if (tp->lang_key != NULL) - { - pos = safecat(msg, sizeof msg, pos, "iTXt keyword \""); - pos = safecat(msg, sizeof msg, pos, tp->lang_key); - pos = safecat(msg, sizeof msg, pos, "\", "); - } - - if (pos > ok) - { - msg[pos-2] = '\0'; /* Remove the ", " at the end */ - png_error(pp, msg); - } -} - -static void -standard_text_validate(standard_display *dp, png_const_structp pp, - png_infop pi, int check_end) -{ - png_textp tp = NULL; - png_uint_32 num_text = png_get_text(pp, pi, &tp, NULL); - - if (num_text == 2 && tp != NULL) - { - standard_check_text(pp, tp, "image name", dp->ps->current->name); - - /* This exists because prior to 1.5.18 the progressive reader left the - * png_struct z_stream unreset at the end of the image, so subsequent - * attempts to use it simply returns Z_STREAM_END. - */ - if (check_end) - standard_check_text(pp, tp+1, "end marker", "end"); - } - - else - { - char msg[64]; - - sprintf(msg, "expected two text items, got %lu", - (unsigned long)num_text); - png_error(pp, msg); - } -} -#else -# define standard_text_validate(dp,pp,pi,check_end) ((void)0) -#endif - -static void -standard_row_validate(standard_display *dp, png_const_structp pp, - int iImage, int iDisplay, png_uint_32 y) -{ - int where; - png_byte std[STANDARD_ROWMAX]; - - /* The row must be pre-initialized to the magic number here for the size - * tests to pass: - */ - memset(std, 178, sizeof std); - standard_row(pp, std, dp->id, y); - - /* At the end both the 'row' and 'display' arrays should end up identical. - * In earlier passes 'row' will be partially filled in, with only the pixels - * that have been read so far, but 'display' will have those pixels - * replicated to fill the unread pixels while reading an interlaced image. - */ - if (iImage >= 0 && - (where = pixel_cmp(std, store_image_row(dp->ps, pp, iImage, y), - dp->bit_width)) != 0) - { - char msg[64]; - sprintf(msg, "PNG image row[%lu][%d] changed from %.2x to %.2x", - (unsigned long)y, where-1, std[where-1], - store_image_row(dp->ps, pp, iImage, y)[where-1]); - png_error(pp, msg); - } - - if (iDisplay >= 0 && - (where = pixel_cmp(std, store_image_row(dp->ps, pp, iDisplay, y), - dp->bit_width)) != 0) - { - char msg[64]; - sprintf(msg, "display row[%lu][%d] changed from %.2x to %.2x", - (unsigned long)y, where-1, std[where-1], - store_image_row(dp->ps, pp, iDisplay, y)[where-1]); - png_error(pp, msg); - } -} - -static void -standard_image_validate(standard_display *dp, png_const_structp pp, int iImage, - int iDisplay) -{ - png_uint_32 y; - - if (iImage >= 0) - store_image_check(dp->ps, pp, iImage); - - if (iDisplay >= 0) - store_image_check(dp->ps, pp, iDisplay); - - for (y=0; yh; ++y) - standard_row_validate(dp, pp, iImage, iDisplay, y); - - /* This avoids false positives if the validation code is never called! */ - dp->ps->validated = 1; -} - -static void PNGCBAPI -standard_end(png_structp ppIn, png_infop pi) -{ - png_const_structp pp = ppIn; - standard_display *dp = voidcast(standard_display*, - png_get_progressive_ptr(pp)); - - UNUSED(pi) - - /* Validate the image - progressive reading only produces one variant for - * interlaced images. - */ - standard_text_validate(dp, pp, pi, - PNG_LIBPNG_VER >= 10518/*check_end: see comments above*/); - standard_image_validate(dp, pp, 0, -1); -} - -/* A single test run checking the standard image to ensure it is not damaged. */ -static void -standard_test(png_store* const psIn, png_uint_32 const id, - int do_interlace, int use_update_info) -{ - standard_display d; - context(psIn, fault); - - /* Set up the display (stack frame) variables from the arguments to the - * function and initialize the locals that are filled in later. - */ - standard_display_init(&d, psIn, id, do_interlace, use_update_info); - - /* Everything is protected by a Try/Catch. The functions called also - * typically have local Try/Catch blocks. - */ - Try - { - png_structp pp; - png_infop pi; - - /* Get a png_struct for reading the image. This will throw an error if it - * fails, so we don't need to check the result. - */ - pp = set_store_for_read(d.ps, &pi, d.id, - d.do_interlace ? (d.ps->progressive ? - "pngvalid progressive deinterlacer" : - "pngvalid sequential deinterlacer") : (d.ps->progressive ? - "progressive reader" : "sequential reader")); - - /* Initialize the palette correctly from the png_store_file. */ - standard_palette_init(&d); - - /* Introduce the correct read function. */ - if (d.ps->progressive) - { - png_set_progressive_read_fn(pp, &d, standard_info, progressive_row, - standard_end); - - /* Now feed data into the reader until we reach the end: */ - store_progressive_read(d.ps, pp, pi); - } - else - { - /* Note that this takes the store, not the display. */ - png_set_read_fn(pp, d.ps, store_read); - - /* Check the header values: */ - png_read_info(pp, pi); - - /* The code tests both versions of the images that the sequential - * reader can produce. - */ - standard_info_imp(&d, pp, pi, 2 /*images*/); - - /* Need the total bytes in the image below; we can't get to this point - * unless the PNG file values have been checked against the expected - * values. - */ - { - sequential_row(&d, pp, pi, 0, 1); - - /* After the last pass loop over the rows again to check that the - * image is correct. - */ - if (!d.speed) - { - standard_text_validate(&d, pp, pi, 1/*check_end*/); - standard_image_validate(&d, pp, 0, 1); - } - else - d.ps->validated = 1; - } - } - - /* Check for validation. */ - if (!d.ps->validated) - png_error(pp, "image read failed silently"); - - /* Successful completion. */ - } - - Catch(fault) - d.ps = fault; /* make sure this hasn't been clobbered. */ - - /* In either case clean up the store. */ - store_read_reset(d.ps); -} - -static int -test_standard(png_modifier* const pm, png_byte const colour_type, - int bdlo, int const bdhi) -{ - for (; bdlo <= bdhi; ++bdlo) - { - int interlace_type; - - for (interlace_type = PNG_INTERLACE_NONE; - interlace_type < INTERLACE_LAST; ++interlace_type) - { - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - interlace_type, 0, 0, 0), do_read_interlace, pm->use_update_info); - - if (fail(pm)) - return 0; - } - } - - return 1; /* keep going */ -} - -static void -perform_standard_test(png_modifier *pm) -{ - /* Test each colour type over the valid range of bit depths (expressed as - * log2(bit_depth) in turn, stop as soon as any error is detected. - */ - if (!test_standard(pm, 0, 0, READ_BDHI)) - return; - - if (!test_standard(pm, 2, 3, READ_BDHI)) - return; - - if (!test_standard(pm, 3, 0, 3)) - return; - - if (!test_standard(pm, 4, 3, READ_BDHI)) - return; - - if (!test_standard(pm, 6, 3, READ_BDHI)) - return; -} - - -/********************************** SIZE TESTS ********************************/ -static int -test_size(png_modifier* const pm, png_byte const colour_type, - int bdlo, int const bdhi) -{ - /* Run the tests on each combination. - * - * NOTE: on my 32 bit x86 each of the following blocks takes - * a total of 3.5 seconds if done across every combo of bit depth - * width and height. This is a waste of time in practice, hence the - * hinc and winc stuff: - */ - static const png_byte hinc[] = {1, 3, 11, 1, 5}; - static const png_byte winc[] = {1, 9, 5, 7, 1}; - int save_bdlo = bdlo; - - for (; bdlo <= bdhi; ++bdlo) - { - png_uint_32 h, w; - - for (h=1; h<=16; h+=hinc[bdlo]) for (w=1; w<=16; w+=winc[bdlo]) - { - /* First test all the 'size' images against the sequential - * reader using libpng to deinterlace (where required.) This - * validates the write side of libpng. There are four possibilities - * to validate. - */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - PNG_INTERLACE_NONE, w, h, 0), 0/*do_interlace*/, - pm->use_update_info); - - if (fail(pm)) - return 0; - - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - PNG_INTERLACE_NONE, w, h, 1), 0/*do_interlace*/, - pm->use_update_info); - - if (fail(pm)) - return 0; - - /* Now validate the interlaced read side - do_interlace true, - * in the progressive case this does actually make a difference - * to the code used in the non-interlaced case too. - */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - PNG_INTERLACE_NONE, w, h, 0), 1/*do_interlace*/, - pm->use_update_info); - - if (fail(pm)) - return 0; - -# if CAN_WRITE_INTERLACE - /* Validate the pngvalid code itself: */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - PNG_INTERLACE_ADAM7, w, h, 1), 1/*do_interlace*/, - pm->use_update_info); - - if (fail(pm)) - return 0; -# endif - } - } - - /* Now do the tests of libpng interlace handling, after we have made sure - * that the pngvalid version works: - */ - for (bdlo = save_bdlo; bdlo <= bdhi; ++bdlo) - { - png_uint_32 h, w; - - for (h=1; h<=16; h+=hinc[bdlo]) for (w=1; w<=16; w+=winc[bdlo]) - { -# ifdef PNG_READ_INTERLACING_SUPPORTED - /* Test with pngvalid generated interlaced images first; we have - * already verify these are ok (unless pngvalid has self-consistent - * read/write errors, which is unlikely), so this detects errors in the - * read side first: - */ -# if CAN_WRITE_INTERLACE - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - PNG_INTERLACE_ADAM7, w, h, 1), 0/*do_interlace*/, - pm->use_update_info); - - if (fail(pm)) - return 0; -# endif -# endif /* READ_INTERLACING */ - -# ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* Test the libpng write side against the pngvalid read side: */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - PNG_INTERLACE_ADAM7, w, h, 0), 1/*do_interlace*/, - pm->use_update_info); - - if (fail(pm)) - return 0; -# endif - -# ifdef PNG_READ_INTERLACING_SUPPORTED -# ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* Test both together: */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, - PNG_INTERLACE_ADAM7, w, h, 0), 0/*do_interlace*/, - pm->use_update_info); - - if (fail(pm)) - return 0; -# endif -# endif /* READ_INTERLACING */ - } - } - - return 1; /* keep going */ -} - -static void -perform_size_test(png_modifier *pm) -{ - /* Test each colour type over the valid range of bit depths (expressed as - * log2(bit_depth) in turn, stop as soon as any error is detected. - */ - if (!test_size(pm, 0, 0, READ_BDHI)) - return; - - if (!test_size(pm, 2, 3, READ_BDHI)) - return; - - /* For the moment don't do the palette test - it's a waste of time when - * compared to the grayscale test. - */ -#if 0 - if (!test_size(pm, 3, 0, 3)) - return; -#endif - - if (!test_size(pm, 4, 3, READ_BDHI)) - return; - - if (!test_size(pm, 6, 3, READ_BDHI)) - return; -} - - -/******************************* TRANSFORM TESTS ******************************/ -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -/* A set of tests to validate libpng image transforms. The possibilities here - * are legion because the transforms can be combined in a combinatorial - * fashion. To deal with this some measure of restraint is required, otherwise - * the tests would take forever. - */ -typedef struct image_pixel -{ - /* A local (pngvalid) representation of a PNG pixel, in all its - * various forms. - */ - unsigned int red, green, blue, alpha; /* For non-palette images. */ - unsigned int palette_index; /* For a palette image. */ - png_byte colour_type; /* As in the spec. */ - png_byte bit_depth; /* Defines bit size in row */ - png_byte sample_depth; /* Scale of samples */ - unsigned int have_tRNS :1; /* tRNS chunk may need processing */ - unsigned int swap_rgb :1; /* RGB swapped to BGR */ - unsigned int alpha_first :1; /* Alpha at start, not end */ - unsigned int alpha_inverted :1; /* Alpha channel inverted */ - unsigned int mono_inverted :1; /* Gray channel inverted */ - unsigned int swap16 :1; /* Byte swap 16-bit components */ - unsigned int littleendian :1; /* High bits on right */ - unsigned int sig_bits :1; /* Pixel shifted (sig bits only) */ - - /* For checking the code calculates double precision floating point values - * along with an error value, accumulated from the transforms. Because an - * sBIT setting allows larger error bounds (indeed, by the spec, apparently - * up to just less than +/-1 in the scaled value) the *lowest* sBIT for each - * channel is stored. This sBIT value is folded in to the stored error value - * at the end of the application of the transforms to the pixel. - * - * If sig_bits is set above the red, green, blue and alpha values have been - * scaled so they only contain the significant bits of the component values. - */ - double redf, greenf, bluef, alphaf; - double rede, greene, bluee, alphae; - png_byte red_sBIT, green_sBIT, blue_sBIT, alpha_sBIT; -} image_pixel; - -/* Shared utility function, see below. */ -static void -image_pixel_setf(image_pixel *this, unsigned int rMax, unsigned int gMax, - unsigned int bMax, unsigned int aMax) -{ - this->redf = this->red / (double)rMax; - this->greenf = this->green / (double)gMax; - this->bluef = this->blue / (double)bMax; - this->alphaf = this->alpha / (double)aMax; - - if (this->red < rMax) - this->rede = this->redf * DBL_EPSILON; - else - this->rede = 0; - if (this->green < gMax) - this->greene = this->greenf * DBL_EPSILON; - else - this->greene = 0; - if (this->blue < bMax) - this->bluee = this->bluef * DBL_EPSILON; - else - this->bluee = 0; - if (this->alpha < aMax) - this->alphae = this->alphaf * DBL_EPSILON; - else - this->alphae = 0; -} - -/* Initialize the structure for the next pixel - call this before doing any - * transforms and call it for each pixel since all the fields may need to be - * reset. - */ -static void -image_pixel_init(image_pixel *this, png_const_bytep row, png_byte colour_type, - png_byte bit_depth, png_uint_32 x, store_palette palette, - const image_pixel *format /*from pngvalid transform of input*/) -{ - png_byte sample_depth = - (png_byte)(colour_type == PNG_COLOR_TYPE_PALETTE ? 8 : bit_depth); - unsigned int max = (1U<swap16); - int littleendian = (format != 0 && format->littleendian); - int sig_bits = (format != 0 && format->sig_bits); - - /* Initially just set everything to the same number and the alpha to opaque. - * Note that this currently assumes a simple palette where entry x has colour - * rgb(x,x,x)! - */ - this->palette_index = this->red = this->green = this->blue = - sample(row, colour_type, bit_depth, x, 0, swap16, littleendian); - this->alpha = max; - this->red_sBIT = this->green_sBIT = this->blue_sBIT = this->alpha_sBIT = - sample_depth; - - /* Then override as appropriate: */ - if (colour_type == 3) /* palette */ - { - /* This permits the caller to default to the sample value. */ - if (palette != 0) - { - unsigned int i = this->palette_index; - - this->red = palette[i].red; - this->green = palette[i].green; - this->blue = palette[i].blue; - this->alpha = palette[i].alpha; - } - } - - else /* not palette */ - { - unsigned int i = 0; - - if ((colour_type & 4) != 0 && format != 0 && format->alpha_first) - { - this->alpha = this->red; - /* This handles the gray case for 'AG' pixels */ - this->palette_index = this->red = this->green = this->blue = - sample(row, colour_type, bit_depth, x, 1, swap16, littleendian); - i = 1; - } - - if (colour_type & 2) - { - /* Green is second for both BGR and RGB: */ - this->green = sample(row, colour_type, bit_depth, x, ++i, swap16, - littleendian); - - if (format != 0 && format->swap_rgb) /* BGR */ - this->red = sample(row, colour_type, bit_depth, x, ++i, swap16, - littleendian); - else - this->blue = sample(row, colour_type, bit_depth, x, ++i, swap16, - littleendian); - } - - else /* grayscale */ if (format != 0 && format->mono_inverted) - this->red = this->green = this->blue = this->red ^ max; - - if ((colour_type & 4) != 0) /* alpha */ - { - if (format == 0 || !format->alpha_first) - this->alpha = sample(row, colour_type, bit_depth, x, ++i, swap16, - littleendian); - - if (format != 0 && format->alpha_inverted) - this->alpha ^= max; - } - } - - /* Calculate the scaled values, these are simply the values divided by - * 'max' and the error is initialized to the double precision epsilon value - * from the header file. - */ - image_pixel_setf(this, - sig_bits ? (1U << format->red_sBIT)-1 : max, - sig_bits ? (1U << format->green_sBIT)-1 : max, - sig_bits ? (1U << format->blue_sBIT)-1 : max, - sig_bits ? (1U << format->alpha_sBIT)-1 : max); - - /* Store the input information for use in the transforms - these will - * modify the information. - */ - this->colour_type = colour_type; - this->bit_depth = bit_depth; - this->sample_depth = sample_depth; - this->have_tRNS = 0; - this->swap_rgb = 0; - this->alpha_first = 0; - this->alpha_inverted = 0; - this->mono_inverted = 0; - this->swap16 = 0; - this->littleendian = 0; - this->sig_bits = 0; -} - -#if defined PNG_READ_EXPAND_SUPPORTED || defined PNG_READ_GRAY_TO_RGB_SUPPORTED\ - || defined PNG_READ_EXPAND_SUPPORTED || defined PNG_READ_EXPAND_16_SUPPORTED\ - || defined PNG_READ_BACKGROUND_SUPPORTED -/* Convert a palette image to an rgb image. This necessarily converts the tRNS - * chunk at the same time, because the tRNS will be in palette form. The way - * palette validation works means that the original palette is never updated, - * instead the image_pixel value from the row contains the RGB of the - * corresponding palette entry and *this* is updated. Consequently this routine - * only needs to change the colour type information. - */ -static void -image_pixel_convert_PLTE(image_pixel *this) -{ - if (this->colour_type == PNG_COLOR_TYPE_PALETTE) - { - if (this->have_tRNS) - { - this->colour_type = PNG_COLOR_TYPE_RGB_ALPHA; - this->have_tRNS = 0; - } - else - this->colour_type = PNG_COLOR_TYPE_RGB; - - /* The bit depth of the row changes at this point too (notice that this is - * the row format, not the sample depth, which is separate.) - */ - this->bit_depth = 8; - } -} - -/* Add an alpha channel; this will import the tRNS information because tRNS is - * not valid in an alpha image. The bit depth will invariably be set to at - * least 8 prior to 1.7.0. Palette images will be converted to alpha (using - * the above API). With png_set_background the alpha channel is never expanded - * but this routine is used by pngvalid to simplify code; 'for_background' - * records this. - */ -static void -image_pixel_add_alpha(image_pixel *this, const standard_display *display, - int for_background) -{ - if (this->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(this); - - if ((this->colour_type & PNG_COLOR_MASK_ALPHA) == 0) - { - if (this->colour_type == PNG_COLOR_TYPE_GRAY) - { -# if PNG_LIBPNG_VER < 10700 - if (!for_background && this->bit_depth < 8) - this->bit_depth = this->sample_depth = 8; -# endif - - if (this->have_tRNS) - { - /* After 1.7 the expansion of bit depth only happens if there is a - * tRNS chunk to expand at this point. - */ -# if PNG_LIBPNG_VER >= 10700 - if (!for_background && this->bit_depth < 8) - this->bit_depth = this->sample_depth = 8; -# endif - - this->have_tRNS = 0; - - /* Check the input, original, channel value here against the - * original tRNS gray chunk valie. - */ - if (this->red == display->transparent.red) - this->alphaf = 0; - else - this->alphaf = 1; - } - else - this->alphaf = 1; - - this->colour_type = PNG_COLOR_TYPE_GRAY_ALPHA; - } - - else if (this->colour_type == PNG_COLOR_TYPE_RGB) - { - if (this->have_tRNS) - { - this->have_tRNS = 0; - - /* Again, check the exact input values, not the current transformed - * value! - */ - if (this->red == display->transparent.red && - this->green == display->transparent.green && - this->blue == display->transparent.blue) - this->alphaf = 0; - else - this->alphaf = 1; - } - else - this->alphaf = 1; - - this->colour_type = PNG_COLOR_TYPE_RGB_ALPHA; - } - - /* The error in the alpha is zero and the sBIT value comes from the - * original sBIT data (actually it will always be the original bit depth). - */ - this->alphae = 0; - this->alpha_sBIT = display->alpha_sBIT; - } -} -#endif /* transforms that need image_pixel_add_alpha */ - -struct transform_display; -typedef struct image_transform -{ - /* The name of this transform: a string. */ - const char *name; - - /* Each transform can be disabled from the command line: */ - int enable; - - /* The global list of transforms; read only. */ - struct image_transform *const list; - - /* The global count of the number of times this transform has been set on an - * image. - */ - unsigned int global_use; - - /* The local count of the number of times this transform has been set. */ - unsigned int local_use; - - /* The next transform in the list, each transform must call its own next - * transform after it has processed the pixel successfully. - */ - const struct image_transform *next; - - /* A single transform for the image, expressed as a series of function - * callbacks and some space for values. - * - * First a callback to add any required modifications to the png_modifier; - * this gets called just before the modifier is set up for read. - */ - void (*ini)(const struct image_transform *this, - struct transform_display *that); - - /* And a callback to set the transform on the current png_read_struct: - */ - void (*set)(const struct image_transform *this, - struct transform_display *that, png_structp pp, png_infop pi); - - /* Then a transform that takes an input pixel in one PNG format or another - * and modifies it by a pngvalid implementation of the transform (thus - * duplicating the libpng intent without, we hope, duplicating the bugs - * in the libpng implementation!) The png_structp is solely to allow error - * reporting via png_error and png_warning. - */ - void (*mod)(const struct image_transform *this, image_pixel *that, - png_const_structp pp, const struct transform_display *display); - - /* Add this transform to the list and return true if the transform is - * meaningful for this colour type and bit depth - if false then the - * transform should have no effect on the image so there's not a lot of - * point running it. - */ - int (*add)(struct image_transform *this, - const struct image_transform **that, png_byte colour_type, - png_byte bit_depth); -} image_transform; - -typedef struct transform_display -{ - standard_display this; - - /* Parameters */ - png_modifier* pm; - const image_transform* transform_list; - unsigned int max_gamma_8; - - /* Local variables */ - png_byte output_colour_type; - png_byte output_bit_depth; - png_byte unpacked; - - /* Modifications (not necessarily used.) */ - gama_modification gama_mod; - chrm_modification chrm_mod; - srgb_modification srgb_mod; -} transform_display; - -/* Set sRGB, cHRM and gAMA transforms as required by the current encoding. */ -static void -transform_set_encoding(transform_display *this) -{ - /* Set up the png_modifier '_current' fields then use these to determine how - * to add appropriate chunks. - */ - png_modifier *pm = this->pm; - - modifier_set_encoding(pm); - - if (modifier_color_encoding_is_set(pm)) - { - if (modifier_color_encoding_is_sRGB(pm)) - srgb_modification_init(&this->srgb_mod, pm, PNG_sRGB_INTENT_ABSOLUTE); - - else - { - /* Set gAMA and cHRM separately. */ - gama_modification_init(&this->gama_mod, pm, pm->current_gamma); - - if (pm->current_encoding != 0) - chrm_modification_init(&this->chrm_mod, pm, pm->current_encoding); - } - } -} - -/* Three functions to end the list: */ -static void -image_transform_ini_end(const image_transform *this, - transform_display *that) -{ - UNUSED(this) - UNUSED(that) -} - -static void -image_transform_set_end(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - UNUSED(this) - UNUSED(that) - UNUSED(pp) - UNUSED(pi) -} - -/* At the end of the list recalculate the output image pixel value from the - * double precision values set up by the preceding 'mod' calls: - */ -static unsigned int -sample_scale(double sample_value, unsigned int scale) -{ - sample_value = floor(sample_value * scale + .5); - - /* Return NaN as 0: */ - if (!(sample_value > 0)) - sample_value = 0; - else if (sample_value > scale) - sample_value = scale; - - return (unsigned int)sample_value; -} - -static void -image_transform_mod_end(const image_transform *this, image_pixel *that, - png_const_structp pp, const transform_display *display) -{ - unsigned int scale = (1U<sample_depth)-1; - int sig_bits = that->sig_bits; - - UNUSED(this) - UNUSED(pp) - UNUSED(display) - - /* At the end recalculate the digitized red green and blue values according - * to the current sample_depth of the pixel. - * - * The sample value is simply scaled to the maximum, checking for over - * and underflow (which can both happen for some image transforms, - * including simple size scaling, though libpng doesn't do that at present. - */ - that->red = sample_scale(that->redf, scale); - - /* This is a bit bogus; really the above calculation should use the red_sBIT - * value, not sample_depth, but because libpng does png_set_shift by just - * shifting the bits we get errors if we don't do it the same way. - */ - if (sig_bits && that->red_sBIT < that->sample_depth) - that->red >>= that->sample_depth - that->red_sBIT; - - /* The error value is increased, at the end, according to the lowest sBIT - * value seen. Common sense tells us that the intermediate integer - * representations are no more accurate than +/- 0.5 in the integral values, - * the sBIT allows the implementation to be worse than this. In addition the - * PNG specification actually permits any error within the range (-1..+1), - * but that is ignored here. Instead the final digitized value is compared, - * below to the digitized value of the error limits - this has the net effect - * of allowing (almost) +/-1 in the output value. It's difficult to see how - * any algorithm that digitizes intermediate results can be more accurate. - */ - that->rede += 1./(2*((1U<red_sBIT)-1)); - - if (that->colour_type & PNG_COLOR_MASK_COLOR) - { - that->green = sample_scale(that->greenf, scale); - if (sig_bits && that->green_sBIT < that->sample_depth) - that->green >>= that->sample_depth - that->green_sBIT; - - that->blue = sample_scale(that->bluef, scale); - if (sig_bits && that->blue_sBIT < that->sample_depth) - that->blue >>= that->sample_depth - that->blue_sBIT; - - that->greene += 1./(2*((1U<green_sBIT)-1)); - that->bluee += 1./(2*((1U<blue_sBIT)-1)); - } - else - { - that->blue = that->green = that->red; - that->bluef = that->greenf = that->redf; - that->bluee = that->greene = that->rede; - } - - if ((that->colour_type & PNG_COLOR_MASK_ALPHA) || - that->colour_type == PNG_COLOR_TYPE_PALETTE) - { - that->alpha = sample_scale(that->alphaf, scale); - that->alphae += 1./(2*((1U<alpha_sBIT)-1)); - } - else - { - that->alpha = scale; /* opaque */ - that->alphaf = 1; /* Override this. */ - that->alphae = 0; /* It's exact ;-) */ - } - - if (sig_bits && that->alpha_sBIT < that->sample_depth) - that->alpha >>= that->sample_depth - that->alpha_sBIT; -} - -/* Static 'end' structure: */ -static image_transform image_transform_end = -{ - "(end)", /* name */ - 1, /* enable */ - 0, /* list */ - 0, /* global_use */ - 0, /* local_use */ - 0, /* next */ - image_transform_ini_end, - image_transform_set_end, - image_transform_mod_end, - 0 /* never called, I want it to crash if it is! */ -}; - -/* Reader callbacks and implementations, where they differ from the standard - * ones. - */ -static void -transform_display_init(transform_display *dp, png_modifier *pm, png_uint_32 id, - const image_transform *transform_list) -{ - memset(dp, 0, sizeof *dp); - - /* Standard fields */ - standard_display_init(&dp->this, &pm->this, id, do_read_interlace, - pm->use_update_info); - - /* Parameter fields */ - dp->pm = pm; - dp->transform_list = transform_list; - dp->max_gamma_8 = 16; - - /* Local variable fields */ - dp->output_colour_type = 255; /* invalid */ - dp->output_bit_depth = 255; /* invalid */ - dp->unpacked = 0; /* not unpacked */ -} - -static void -transform_info_imp(transform_display *dp, png_structp pp, png_infop pi) -{ - /* Reuse the standard stuff as appropriate. */ - standard_info_part1(&dp->this, pp, pi); - - /* Now set the list of transforms. */ - dp->transform_list->set(dp->transform_list, dp, pp, pi); - - /* Update the info structure for these transforms: */ - { - int i = dp->this.use_update_info; - /* Always do one call, even if use_update_info is 0. */ - do - png_read_update_info(pp, pi); - while (--i > 0); - } - - /* And get the output information into the standard_display */ - standard_info_part2(&dp->this, pp, pi, 1/*images*/); - - /* Plus the extra stuff we need for the transform tests: */ - dp->output_colour_type = png_get_color_type(pp, pi); - dp->output_bit_depth = png_get_bit_depth(pp, pi); - - /* If png_set_filler is in action then fake the output color type to include - * an alpha channel where appropriate. - */ - if (dp->output_bit_depth >= 8 && - (dp->output_colour_type == PNG_COLOR_TYPE_RGB || - dp->output_colour_type == PNG_COLOR_TYPE_GRAY) && dp->this.filler) - dp->output_colour_type |= 4; - - /* Validate the combination of colour type and bit depth that we are getting - * out of libpng; the semantics of something not in the PNG spec are, at - * best, unclear. - */ - switch (dp->output_colour_type) - { - case PNG_COLOR_TYPE_PALETTE: - if (dp->output_bit_depth > 8) goto error; - /* FALLTHROUGH */ - case PNG_COLOR_TYPE_GRAY: - if (dp->output_bit_depth == 1 || dp->output_bit_depth == 2 || - dp->output_bit_depth == 4) - break; - /* FALLTHROUGH */ - default: - if (dp->output_bit_depth == 8 || dp->output_bit_depth == 16) - break; - /* FALLTHROUGH */ - error: - { - char message[128]; - size_t pos; - - pos = safecat(message, sizeof message, 0, - "invalid final bit depth: colour type("); - pos = safecatn(message, sizeof message, pos, dp->output_colour_type); - pos = safecat(message, sizeof message, pos, ") with bit depth: "); - pos = safecatn(message, sizeof message, pos, dp->output_bit_depth); - - png_error(pp, message); - } - } - - /* Use a test pixel to check that the output agrees with what we expect - - * this avoids running the whole test if the output is unexpected. This also - * checks for internal errors. - */ - { - image_pixel test_pixel; - - memset(&test_pixel, 0, sizeof test_pixel); - test_pixel.colour_type = dp->this.colour_type; /* input */ - test_pixel.bit_depth = dp->this.bit_depth; - if (test_pixel.colour_type == PNG_COLOR_TYPE_PALETTE) - test_pixel.sample_depth = 8; - else - test_pixel.sample_depth = test_pixel.bit_depth; - /* Don't need sBIT here, but it must be set to non-zero to avoid - * arithmetic overflows. - */ - test_pixel.have_tRNS = dp->this.is_transparent != 0; - test_pixel.red_sBIT = test_pixel.green_sBIT = test_pixel.blue_sBIT = - test_pixel.alpha_sBIT = test_pixel.sample_depth; - - dp->transform_list->mod(dp->transform_list, &test_pixel, pp, dp); - - if (test_pixel.colour_type != dp->output_colour_type) - { - char message[128]; - size_t pos = safecat(message, sizeof message, 0, "colour type "); - - pos = safecatn(message, sizeof message, pos, dp->output_colour_type); - pos = safecat(message, sizeof message, pos, " expected "); - pos = safecatn(message, sizeof message, pos, test_pixel.colour_type); - - png_error(pp, message); - } - - if (test_pixel.bit_depth != dp->output_bit_depth) - { - char message[128]; - size_t pos = safecat(message, sizeof message, 0, "bit depth "); - - pos = safecatn(message, sizeof message, pos, dp->output_bit_depth); - pos = safecat(message, sizeof message, pos, " expected "); - pos = safecatn(message, sizeof message, pos, test_pixel.bit_depth); - - png_error(pp, message); - } - - /* If both bit depth and colour type are correct check the sample depth. - */ - if (test_pixel.colour_type == PNG_COLOR_TYPE_PALETTE && - test_pixel.sample_depth != 8) /* oops - internal error! */ - png_error(pp, "pngvalid: internal: palette sample depth not 8"); - else if (dp->unpacked && test_pixel.bit_depth != 8) - png_error(pp, "pngvalid: internal: bad unpacked pixel depth"); - else if (!dp->unpacked && test_pixel.colour_type != PNG_COLOR_TYPE_PALETTE - && test_pixel.bit_depth != test_pixel.sample_depth) - { - char message[128]; - size_t pos = safecat(message, sizeof message, 0, - "internal: sample depth "); - - /* Because unless something has set 'unpacked' or the image is palette - * mapped we expect the transform to keep sample depth and bit depth - * the same. - */ - pos = safecatn(message, sizeof message, pos, test_pixel.sample_depth); - pos = safecat(message, sizeof message, pos, " expected "); - pos = safecatn(message, sizeof message, pos, test_pixel.bit_depth); - - png_error(pp, message); - } - else if (test_pixel.bit_depth != dp->output_bit_depth) - { - /* This could be a libpng error too; libpng has not produced what we - * expect for the output bit depth. - */ - char message[128]; - size_t pos = safecat(message, sizeof message, 0, - "internal: bit depth "); - - pos = safecatn(message, sizeof message, pos, dp->output_bit_depth); - pos = safecat(message, sizeof message, pos, " expected "); - pos = safecatn(message, sizeof message, pos, test_pixel.bit_depth); - - png_error(pp, message); - } - } -} - -static void PNGCBAPI -transform_info(png_structp pp, png_infop pi) -{ - transform_info_imp(voidcast(transform_display*, png_get_progressive_ptr(pp)), - pp, pi); -} - -static void -transform_range_check(png_const_structp pp, unsigned int r, unsigned int g, - unsigned int b, unsigned int a, unsigned int in_digitized, double in, - unsigned int out, png_byte sample_depth, double err, double limit, - const char *name, double digitization_error) -{ - /* Compare the scaled, digitzed, values of our local calculation (in+-err) - * with the digitized values libpng produced; 'sample_depth' is the actual - * digitization depth of the libpng output colors (the bit depth except for - * palette images where it is always 8.) The check on 'err' is to detect - * internal errors in pngvalid itself. - */ - unsigned int max = (1U< limit ||) !(out >= in_min && out <= in_max)) - { - char message[256]; - size_t pos; - - pos = safecat(message, sizeof message, 0, name); - pos = safecat(message, sizeof message, pos, " output value error: rgba("); - pos = safecatn(message, sizeof message, pos, r); - pos = safecat(message, sizeof message, pos, ","); - pos = safecatn(message, sizeof message, pos, g); - pos = safecat(message, sizeof message, pos, ","); - pos = safecatn(message, sizeof message, pos, b); - pos = safecat(message, sizeof message, pos, ","); - pos = safecatn(message, sizeof message, pos, a); - pos = safecat(message, sizeof message, pos, "): "); - pos = safecatn(message, sizeof message, pos, out); - pos = safecat(message, sizeof message, pos, " expected: "); - pos = safecatn(message, sizeof message, pos, in_digitized); - pos = safecat(message, sizeof message, pos, " ("); - pos = safecatd(message, sizeof message, pos, (in-err)*max, 3); - pos = safecat(message, sizeof message, pos, ".."); - pos = safecatd(message, sizeof message, pos, (in+err)*max, 3); - pos = safecat(message, sizeof message, pos, ")"); - - png_error(pp, message); - } - - UNUSED(limit) -} - -static void -transform_image_validate(transform_display *dp, png_const_structp pp, - png_infop pi) -{ - /* Constants for the loop below: */ - const png_store* const ps = dp->this.ps; - png_byte in_ct = dp->this.colour_type; - png_byte in_bd = dp->this.bit_depth; - png_uint_32 w = dp->this.w; - png_uint_32 h = dp->this.h; - png_byte out_ct = dp->output_colour_type; - png_byte out_bd = dp->output_bit_depth; - png_byte sample_depth = - (png_byte)(out_ct == PNG_COLOR_TYPE_PALETTE ? 8 : out_bd); - png_byte red_sBIT = dp->this.red_sBIT; - png_byte green_sBIT = dp->this.green_sBIT; - png_byte blue_sBIT = dp->this.blue_sBIT; - png_byte alpha_sBIT = dp->this.alpha_sBIT; - int have_tRNS = dp->this.is_transparent; - double digitization_error; - - store_palette out_palette; - png_uint_32 y; - - UNUSED(pi) - - /* Check for row overwrite errors */ - store_image_check(dp->this.ps, pp, 0); - - /* Read the palette corresponding to the output if the output colour type - * indicates a palette, otherwise set out_palette to garbage. - */ - if (out_ct == PNG_COLOR_TYPE_PALETTE) - { - /* Validate that the palette count itself has not changed - this is not - * expected. - */ - int npalette = (-1); - - (void)read_palette(out_palette, &npalette, pp, pi); - if (npalette != dp->this.npalette) - png_error(pp, "unexpected change in palette size"); - - digitization_error = .5; - } - else - { - png_byte in_sample_depth; - - memset(out_palette, 0x5e, sizeof out_palette); - - /* use-input-precision means assume that if the input has 8 bit (or less) - * samples and the output has 16 bit samples the calculations will be done - * with 8 bit precision, not 16. - */ - if (in_ct == PNG_COLOR_TYPE_PALETTE || in_bd < 16) - in_sample_depth = 8; - else - in_sample_depth = in_bd; - - if (sample_depth != 16 || in_sample_depth > 8 || - !dp->pm->calculations_use_input_precision) - digitization_error = .5; - - /* Else calculations are at 8 bit precision, and the output actually - * consists of scaled 8-bit values, so scale .5 in 8 bits to the 16 bits: - */ - else - digitization_error = .5 * 257; - } - - for (y=0; ythis.palette, - NULL); - - in_pixel.red_sBIT = red_sBIT; - in_pixel.green_sBIT = green_sBIT; - in_pixel.blue_sBIT = blue_sBIT; - in_pixel.alpha_sBIT = alpha_sBIT; - in_pixel.have_tRNS = have_tRNS != 0; - - /* For error detection, below. */ - r = in_pixel.red; - g = in_pixel.green; - b = in_pixel.blue; - a = in_pixel.alpha; - - /* This applies the transforms to the input data, including output - * format operations which must be used when reading the output - * pixel that libpng produces. - */ - dp->transform_list->mod(dp->transform_list, &in_pixel, pp, dp); - - /* Read the output pixel and compare it to what we got, we don't - * use the error field here, so no need to update sBIT. in_pixel - * says whether we expect libpng to change the output format. - */ - image_pixel_init(&out_pixel, pRow, out_ct, out_bd, x, out_palette, - &in_pixel); - - /* We don't expect changes to the index here even if the bit depth is - * changed. - */ - if (in_ct == PNG_COLOR_TYPE_PALETTE && - out_ct == PNG_COLOR_TYPE_PALETTE) - { - if (in_pixel.palette_index != out_pixel.palette_index) - png_error(pp, "unexpected transformed palette index"); - } - - /* Check the colours for palette images too - in fact the palette could - * be separately verified itself in most cases. - */ - if (in_pixel.red != out_pixel.red) - transform_range_check(pp, r, g, b, a, in_pixel.red, in_pixel.redf, - out_pixel.red, sample_depth, in_pixel.rede, - dp->pm->limit + 1./(2*((1U<pm->limit + 1./(2*((1U<pm->limit + 1./(2*((1U<pm->limit + 1./(2*((1U<this.ps->validated = 1; -} - -static void PNGCBAPI -transform_end(png_structp ppIn, png_infop pi) -{ - png_const_structp pp = ppIn; - transform_display *dp = voidcast(transform_display*, - png_get_progressive_ptr(pp)); - - if (!dp->this.speed) - transform_image_validate(dp, pp, pi); - else - dp->this.ps->validated = 1; -} - -/* A single test run. */ -static void -transform_test(png_modifier *pmIn, png_uint_32 idIn, - const image_transform* transform_listIn, const char * const name) -{ - transform_display d; - context(&pmIn->this, fault); - - transform_display_init(&d, pmIn, idIn, transform_listIn); - - Try - { - size_t pos = 0; - png_structp pp; - png_infop pi; - char full_name[256]; - - /* Make sure the encoding fields are correct and enter the required - * modifications. - */ - transform_set_encoding(&d); - - /* Add any modifications required by the transform list. */ - d.transform_list->ini(d.transform_list, &d); - - /* Add the color space information, if any, to the name. */ - pos = safecat(full_name, sizeof full_name, pos, name); - pos = safecat_current_encoding(full_name, sizeof full_name, pos, d.pm); - - /* Get a png_struct for reading the image. */ - pp = set_modifier_for_read(d.pm, &pi, d.this.id, full_name); - standard_palette_init(&d.this); - -# if 0 - /* Logging (debugging only) */ - { - char buffer[256]; - - (void)store_message(&d.pm->this, pp, buffer, sizeof buffer, 0, - "running test"); - - fprintf(stderr, "%s\n", buffer); - } -# endif - - /* Introduce the correct read function. */ - if (d.pm->this.progressive) - { - /* Share the row function with the standard implementation. */ - png_set_progressive_read_fn(pp, &d, transform_info, progressive_row, - transform_end); - - /* Now feed data into the reader until we reach the end: */ - modifier_progressive_read(d.pm, pp, pi); - } - else - { - /* modifier_read expects a png_modifier* */ - png_set_read_fn(pp, d.pm, modifier_read); - - /* Check the header values: */ - png_read_info(pp, pi); - - /* Process the 'info' requirements. Only one image is generated */ - transform_info_imp(&d, pp, pi); - - sequential_row(&d.this, pp, pi, -1, 0); - - if (!d.this.speed) - transform_image_validate(&d, pp, pi); - else - d.this.ps->validated = 1; - } - - modifier_reset(d.pm); - } - - Catch(fault) - { - modifier_reset(voidcast(png_modifier*,(void*)fault)); - } -} - -/* The transforms: */ -#define ITSTRUCT(name) image_transform_##name -#define ITDATA(name) image_transform_data_##name -#define image_transform_ini image_transform_default_ini -#define IT(name)\ -static image_transform ITSTRUCT(name) =\ -{\ - #name,\ - 1, /*enable*/\ - &PT, /*list*/\ - 0, /*global_use*/\ - 0, /*local_use*/\ - 0, /*next*/\ - image_transform_ini,\ - image_transform_png_set_##name##_set,\ - image_transform_png_set_##name##_mod,\ - image_transform_png_set_##name##_add\ -} -#define PT ITSTRUCT(end) /* stores the previous transform */ - -/* To save code: */ -extern void image_transform_default_ini(const image_transform *this, - transform_display *that); /* silence GCC warnings */ - -void /* private, but almost always needed */ -image_transform_default_ini(const image_transform *this, - transform_display *that) -{ - this->next->ini(this->next, that); -} - -#ifdef PNG_READ_BACKGROUND_SUPPORTED -static int -image_transform_default_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(colour_type) - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - return 1; -} -#endif - -#ifdef PNG_READ_EXPAND_SUPPORTED -/* png_set_palette_to_rgb */ -static void -image_transform_png_set_palette_to_rgb_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_palette_to_rgb(pp); - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_palette_to_rgb_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(that); - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_palette_to_rgb_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - return colour_type == PNG_COLOR_TYPE_PALETTE; -} - -IT(palette_to_rgb); -#undef PT -#define PT ITSTRUCT(palette_to_rgb) -#endif /* PNG_READ_EXPAND_SUPPORTED */ - -#ifdef PNG_READ_EXPAND_SUPPORTED -/* png_set_tRNS_to_alpha */ -static void -image_transform_png_set_tRNS_to_alpha_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_tRNS_to_alpha(pp); - - /* If there was a tRNS chunk that would get expanded and add an alpha - * channel is_transparent must be updated: - */ - if (that->this.has_tRNS) - that->this.is_transparent = 1; - - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_tRNS_to_alpha_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ -#if PNG_LIBPNG_VER < 10700 - /* LIBPNG BUG: this always forces palette images to RGB. */ - if (that->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(that); -#endif - - /* This effectively does an 'expand' only if there is some transparency to - * convert to an alpha channel. - */ - if (that->have_tRNS) -# if PNG_LIBPNG_VER >= 10700 - if (that->colour_type != PNG_COLOR_TYPE_PALETTE && - (that->colour_type & PNG_COLOR_MASK_ALPHA) == 0) -# endif - image_pixel_add_alpha(that, &display->this, 0/*!for background*/); - -#if PNG_LIBPNG_VER < 10700 - /* LIBPNG BUG: otherwise libpng still expands to 8 bits! */ - else - { - if (that->bit_depth < 8) - that->bit_depth =8; - if (that->sample_depth < 8) - that->sample_depth = 8; - } -#endif - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_tRNS_to_alpha_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - /* We don't know yet whether there will be a tRNS chunk, but we know that - * this transformation should do nothing if there already is an alpha - * channel. In addition, after the bug fix in 1.7.0, there is no longer - * any action on a palette image. - */ - return -# if PNG_LIBPNG_VER >= 10700 - colour_type != PNG_COLOR_TYPE_PALETTE && -# endif - (colour_type & PNG_COLOR_MASK_ALPHA) == 0; -} - -IT(tRNS_to_alpha); -#undef PT -#define PT ITSTRUCT(tRNS_to_alpha) -#endif /* PNG_READ_EXPAND_SUPPORTED */ - -#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED -/* png_set_gray_to_rgb */ -static void -image_transform_png_set_gray_to_rgb_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_gray_to_rgb(pp); - /* NOTE: this doesn't result in tRNS expansion. */ - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_gray_to_rgb_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - /* NOTE: we can actually pend the tRNS processing at this point because we - * can correctly recognize the original pixel value even though we have - * mapped the one gray channel to the three RGB ones, but in fact libpng - * doesn't do this, so we don't either. - */ - if ((that->colour_type & PNG_COLOR_MASK_COLOR) == 0 && that->have_tRNS) - image_pixel_add_alpha(that, &display->this, 0/*!for background*/); - - /* Simply expand the bit depth and alter the colour type as required. */ - if (that->colour_type == PNG_COLOR_TYPE_GRAY) - { - /* RGB images have a bit depth at least equal to '8' */ - if (that->bit_depth < 8) - that->sample_depth = that->bit_depth = 8; - - /* And just changing the colour type works here because the green and blue - * channels are being maintained in lock-step with the red/gray: - */ - that->colour_type = PNG_COLOR_TYPE_RGB; - } - - else if (that->colour_type == PNG_COLOR_TYPE_GRAY_ALPHA) - that->colour_type = PNG_COLOR_TYPE_RGB_ALPHA; - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_gray_to_rgb_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - return (colour_type & PNG_COLOR_MASK_COLOR) == 0; -} - -IT(gray_to_rgb); -#undef PT -#define PT ITSTRUCT(gray_to_rgb) -#endif /* PNG_READ_GRAY_TO_RGB_SUPPORTED */ - -#ifdef PNG_READ_EXPAND_SUPPORTED -/* png_set_expand */ -static void -image_transform_png_set_expand_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_expand(pp); - - if (that->this.has_tRNS) - that->this.is_transparent = 1; - - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_expand_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - /* The general expand case depends on what the colour type is: */ - if (that->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(that); - else if (that->bit_depth < 8) /* grayscale */ - that->sample_depth = that->bit_depth = 8; - - if (that->have_tRNS) - image_pixel_add_alpha(that, &display->this, 0/*!for background*/); - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_expand_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - /* 'expand' should do nothing for RGBA or GA input - no tRNS and the bit - * depth is at least 8 already. - */ - return (colour_type & PNG_COLOR_MASK_ALPHA) == 0; -} - -IT(expand); -#undef PT -#define PT ITSTRUCT(expand) -#endif /* PNG_READ_EXPAND_SUPPORTED */ - -#ifdef PNG_READ_EXPAND_SUPPORTED -/* png_set_expand_gray_1_2_4_to_8 - * Pre 1.7.0 LIBPNG BUG: this just does an 'expand' - */ -static void -image_transform_png_set_expand_gray_1_2_4_to_8_set( - const image_transform *this, transform_display *that, png_structp pp, - png_infop pi) -{ - png_set_expand_gray_1_2_4_to_8(pp); - /* NOTE: don't expect this to expand tRNS */ - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_expand_gray_1_2_4_to_8_mod( - const image_transform *this, image_pixel *that, png_const_structp pp, - const transform_display *display) -{ -#if PNG_LIBPNG_VER < 10700 - image_transform_png_set_expand_mod(this, that, pp, display); -#else - /* Only expand grayscale of bit depth less than 8: */ - if (that->colour_type == PNG_COLOR_TYPE_GRAY && - that->bit_depth < 8) - that->sample_depth = that->bit_depth = 8; - - this->next->mod(this->next, that, pp, display); -#endif /* 1.7 or later */ -} - -static int -image_transform_png_set_expand_gray_1_2_4_to_8_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ -#if PNG_LIBPNG_VER < 10700 - return image_transform_png_set_expand_add(this, that, colour_type, - bit_depth); -#else - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - /* This should do nothing unless the color type is gray and the bit depth is - * less than 8: - */ - return colour_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8; -#endif /* 1.7 or later */ -} - -IT(expand_gray_1_2_4_to_8); -#undef PT -#define PT ITSTRUCT(expand_gray_1_2_4_to_8) -#endif /* PNG_READ_EXPAND_SUPPORTED */ - -#ifdef PNG_READ_EXPAND_16_SUPPORTED -/* png_set_expand_16 */ -static void -image_transform_png_set_expand_16_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_expand_16(pp); - - /* NOTE: prior to 1.7 libpng does SET_EXPAND as well, so tRNS is expanded. */ -# if PNG_LIBPNG_VER < 10700 - if (that->this.has_tRNS) - that->this.is_transparent = 1; -# endif - - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_expand_16_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - /* Expect expand_16 to expand everything to 16 bits as a result of also - * causing 'expand' to happen. - */ - if (that->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(that); - - if (that->have_tRNS) - image_pixel_add_alpha(that, &display->this, 0/*!for background*/); - - if (that->bit_depth < 16) - that->sample_depth = that->bit_depth = 16; - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_expand_16_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(colour_type) - - this->next = *that; - *that = this; - - /* expand_16 does something unless the bit depth is already 16. */ - return bit_depth < 16; -} - -IT(expand_16); -#undef PT -#define PT ITSTRUCT(expand_16) -#endif /* PNG_READ_EXPAND_16_SUPPORTED */ - -#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED /* API added in 1.5.4 */ -/* png_set_scale_16 */ -static void -image_transform_png_set_scale_16_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_scale_16(pp); -# if PNG_LIBPNG_VER < 10700 - /* libpng will limit the gamma table size: */ - that->max_gamma_8 = PNG_MAX_GAMMA_8; -# endif - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_scale_16_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->bit_depth == 16) - { - that->sample_depth = that->bit_depth = 8; - if (that->red_sBIT > 8) that->red_sBIT = 8; - if (that->green_sBIT > 8) that->green_sBIT = 8; - if (that->blue_sBIT > 8) that->blue_sBIT = 8; - if (that->alpha_sBIT > 8) that->alpha_sBIT = 8; - } - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_scale_16_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(colour_type) - - this->next = *that; - *that = this; - - return bit_depth > 8; -} - -IT(scale_16); -#undef PT -#define PT ITSTRUCT(scale_16) -#endif /* PNG_READ_SCALE_16_TO_8_SUPPORTED (1.5.4 on) */ - -#ifdef PNG_READ_16_TO_8_SUPPORTED /* the default before 1.5.4 */ -/* png_set_strip_16 */ -static void -image_transform_png_set_strip_16_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_strip_16(pp); -# if PNG_LIBPNG_VER < 10700 - /* libpng will limit the gamma table size: */ - that->max_gamma_8 = PNG_MAX_GAMMA_8; -# endif - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_strip_16_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->bit_depth == 16) - { - that->sample_depth = that->bit_depth = 8; - if (that->red_sBIT > 8) that->red_sBIT = 8; - if (that->green_sBIT > 8) that->green_sBIT = 8; - if (that->blue_sBIT > 8) that->blue_sBIT = 8; - if (that->alpha_sBIT > 8) that->alpha_sBIT = 8; - - /* Prior to 1.5.4 png_set_strip_16 would use an 'accurate' method if this - * configuration option is set. From 1.5.4 the flag is never set and the - * 'scale' API (above) must be used. - */ -# ifdef PNG_READ_ACCURATE_SCALE_SUPPORTED -# if PNG_LIBPNG_VER >= 10504 -# error PNG_READ_ACCURATE_SCALE should not be set -# endif - - /* The strip 16 algorithm drops the low 8 bits rather than calculating - * 1/257, so we need to adjust the permitted errors appropriately: - * Notice that this is only relevant prior to the addition of the - * png_set_scale_16 API in 1.5.4 (but 1.5.4+ always defines the above!) - */ - { - const double d = (255-128.5)/65535; - that->rede += d; - that->greene += d; - that->bluee += d; - that->alphae += d; - } -# endif - } - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_strip_16_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(colour_type) - - this->next = *that; - *that = this; - - return bit_depth > 8; -} - -IT(strip_16); -#undef PT -#define PT ITSTRUCT(strip_16) -#endif /* PNG_READ_16_TO_8_SUPPORTED */ - -#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED -/* png_set_strip_alpha */ -static void -image_transform_png_set_strip_alpha_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_strip_alpha(pp); - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_strip_alpha_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->colour_type == PNG_COLOR_TYPE_GRAY_ALPHA) - that->colour_type = PNG_COLOR_TYPE_GRAY; - else if (that->colour_type == PNG_COLOR_TYPE_RGB_ALPHA) - that->colour_type = PNG_COLOR_TYPE_RGB; - - that->have_tRNS = 0; - that->alphaf = 1; - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_strip_alpha_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - return (colour_type & PNG_COLOR_MASK_ALPHA) != 0; -} - -IT(strip_alpha); -#undef PT -#define PT ITSTRUCT(strip_alpha) -#endif /* PNG_READ_STRIP_ALPHA_SUPPORTED */ - -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED -/* png_set_rgb_to_gray(png_structp, int err_action, double red, double green) - * png_set_rgb_to_gray_fixed(png_structp, int err_action, png_fixed_point red, - * png_fixed_point green) - * png_get_rgb_to_gray_status - * - * The 'default' test here uses values known to be used inside libpng prior to - * 1.7.0: - * - * red: 6968 - * green: 23434 - * blue: 2366 - * - * These values are being retained for compatibility, along with the somewhat - * broken truncation calculation in the fast-and-inaccurate code path. Older - * versions of libpng will fail the accuracy tests below because they use the - * truncation algorithm everywhere. - */ -#define data ITDATA(rgb_to_gray) -static struct -{ - double gamma; /* File gamma to use in processing */ - - /* The following are the parameters for png_set_rgb_to_gray: */ -# ifdef PNG_FLOATING_POINT_SUPPORTED - double red_to_set; - double green_to_set; -# else - png_fixed_point red_to_set; - png_fixed_point green_to_set; -# endif - - /* The actual coefficients: */ - double red_coefficient; - double green_coefficient; - double blue_coefficient; - - /* Set if the coeefficients have been overridden. */ - int coefficients_overridden; -} data; - -#undef image_transform_ini -#define image_transform_ini image_transform_png_set_rgb_to_gray_ini -static void -image_transform_png_set_rgb_to_gray_ini(const image_transform *this, - transform_display *that) -{ - png_modifier *pm = that->pm; - const color_encoding *e = pm->current_encoding; - - UNUSED(this) - - /* Since we check the encoding this flag must be set: */ - pm->test_uses_encoding = 1; - - /* If 'e' is not NULL chromaticity information is present and either a cHRM - * or an sRGB chunk will be inserted. - */ - if (e != 0) - { - /* Coefficients come from the encoding, but may need to be normalized to a - * white point Y of 1.0 - */ - const double whiteY = e->red.Y + e->green.Y + e->blue.Y; - - data.red_coefficient = e->red.Y; - data.green_coefficient = e->green.Y; - data.blue_coefficient = e->blue.Y; - - if (whiteY != 1) - { - data.red_coefficient /= whiteY; - data.green_coefficient /= whiteY; - data.blue_coefficient /= whiteY; - } - } - - else - { - /* The default (built in) coeffcients, as above: */ -# if PNG_LIBPNG_VER < 10700 - data.red_coefficient = 6968 / 32768.; - data.green_coefficient = 23434 / 32768.; - data.blue_coefficient = 2366 / 32768.; -# else - data.red_coefficient = .2126; - data.green_coefficient = .7152; - data.blue_coefficient = .0722; -# endif - } - - data.gamma = pm->current_gamma; - - /* If not set then the calculations assume linear encoding (implicitly): */ - if (data.gamma == 0) - data.gamma = 1; - - /* The arguments to png_set_rgb_to_gray can override the coefficients implied - * by the color space encoding. If doing exhaustive checks do the override - * in each case, otherwise do it randomly. - */ - if (pm->test_exhaustive) - { - /* First time in coefficients_overridden is 0, the following sets it to 1, - * so repeat if it is set. If a test fails this may mean we subsequently - * skip a non-override test, ignore that. - */ - data.coefficients_overridden = !data.coefficients_overridden; - pm->repeat = data.coefficients_overridden != 0; - } - - else - data.coefficients_overridden = random_choice(); - - if (data.coefficients_overridden) - { - /* These values override the color encoding defaults, simply use random - * numbers. - */ - png_uint_32 ru; - double total; - - ru = random_u32(); - data.green_coefficient = total = (ru & 0xffff) / 65535.; - ru >>= 16; - data.red_coefficient = (1 - total) * (ru & 0xffff) / 65535.; - total += data.red_coefficient; - data.blue_coefficient = 1 - total; - -# ifdef PNG_FLOATING_POINT_SUPPORTED - data.red_to_set = data.red_coefficient; - data.green_to_set = data.green_coefficient; -# else - data.red_to_set = fix(data.red_coefficient); - data.green_to_set = fix(data.green_coefficient); -# endif - - /* The following just changes the error messages: */ - pm->encoding_ignored = 1; - } - - else - { - data.red_to_set = -1; - data.green_to_set = -1; - } - - /* Adjust the error limit in the png_modifier because of the larger errors - * produced in the digitization during the gamma handling. - */ - if (data.gamma != 1) /* Use gamma tables */ - { - if (that->this.bit_depth == 16 || pm->assume_16_bit_calculations) - { - /* The computations have the form: - * - * r * rc + g * gc + b * bc - * - * Each component of which is +/-1/65535 from the gamma_to_1 table - * lookup, resulting in a base error of +/-6. The gamma_from_1 - * conversion adds another +/-2 in the 16-bit case and - * +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case. - */ -# if PNG_LIBPNG_VER < 10700 - if (that->this.bit_depth < 16) - that->max_gamma_8 = PNG_MAX_GAMMA_8; -# endif - that->pm->limit += pow( - (that->this.bit_depth == 16 || that->max_gamma_8 > 14 ? - 8. : - 6. + (1<<(15-that->max_gamma_8)) - )/65535, data.gamma); - } - - else - { - /* Rounding to 8 bits in the linear space causes massive errors which - * will trigger the error check in transform_range_check. Fix that - * here by taking the gamma encoding into account. - * - * When DIGITIZE is set because a pre-1.7 version of libpng is being - * tested allow a bigger slack. - * - * NOTE: this number only affects the internal limit check in pngvalid, - * it has no effect on the limits applied to the libpng values. - */ -#if DIGITIZE - that->pm->limit += pow( 2.0/255, data.gamma); -#else - that->pm->limit += pow( 1.0/255, data.gamma); -#endif - } - } - - else - { - /* With no gamma correction a large error comes from the truncation of the - * calculation in the 8 bit case, allow for that here. - */ - if (that->this.bit_depth != 16 && !pm->assume_16_bit_calculations) - that->pm->limit += 4E-3; - } -} - -static void -image_transform_png_set_rgb_to_gray_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - int error_action = 1; /* no error, no defines in png.h */ - -# ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_rgb_to_gray(pp, error_action, data.red_to_set, data.green_to_set); -# else - png_set_rgb_to_gray_fixed(pp, error_action, data.red_to_set, - data.green_to_set); -# endif - -# ifdef PNG_READ_cHRM_SUPPORTED - if (that->pm->current_encoding != 0) - { - /* We have an encoding so a cHRM chunk may have been set; if so then - * check that the libpng APIs give the correct (X,Y,Z) values within - * some margin of error for the round trip through the chromaticity - * form. - */ -# ifdef PNG_FLOATING_POINT_SUPPORTED -# define API_function png_get_cHRM_XYZ -# define API_form "FP" -# define API_type double -# define API_cvt(x) (x) -# else -# define API_function png_get_cHRM_XYZ_fixed -# define API_form "fixed" -# define API_type png_fixed_point -# define API_cvt(x) ((double)(x)/PNG_FP_1) -# endif - - API_type rX, gX, bX; - API_type rY, gY, bY; - API_type rZ, gZ, bZ; - - if ((API_function(pp, pi, &rX, &rY, &rZ, &gX, &gY, &gZ, &bX, &bY, &bZ) - & PNG_INFO_cHRM) != 0) - { - double maxe; - const char *el; - color_encoding e, o; - - /* Expect libpng to return a normalized result, but the original - * color space encoding may not be normalized. - */ - modifier_current_encoding(that->pm, &o); - normalize_color_encoding(&o); - - /* Sanity check the pngvalid code - the coefficients should match - * the normalized Y values of the encoding unless they were - * overridden. - */ - if (data.red_to_set == -1 && data.green_to_set == -1 && - (fabs(o.red.Y - data.red_coefficient) > DBL_EPSILON || - fabs(o.green.Y - data.green_coefficient) > DBL_EPSILON || - fabs(o.blue.Y - data.blue_coefficient) > DBL_EPSILON)) - png_error(pp, "internal pngvalid cHRM coefficient error"); - - /* Generate a colour space encoding. */ - e.gamma = o.gamma; /* not used */ - e.red.X = API_cvt(rX); - e.red.Y = API_cvt(rY); - e.red.Z = API_cvt(rZ); - e.green.X = API_cvt(gX); - e.green.Y = API_cvt(gY); - e.green.Z = API_cvt(gZ); - e.blue.X = API_cvt(bX); - e.blue.Y = API_cvt(bY); - e.blue.Z = API_cvt(bZ); - - /* This should match the original one from the png_modifier, within - * the range permitted by the libpng fixed point representation. - */ - maxe = 0; - el = "-"; /* Set to element name with error */ - -# define CHECK(col,x)\ - {\ - double err = fabs(o.col.x - e.col.x);\ - if (err > maxe)\ - {\ - maxe = err;\ - el = #col "(" #x ")";\ - }\ - } - - CHECK(red,X) - CHECK(red,Y) - CHECK(red,Z) - CHECK(green,X) - CHECK(green,Y) - CHECK(green,Z) - CHECK(blue,X) - CHECK(blue,Y) - CHECK(blue,Z) - - /* Here in both fixed and floating cases to check the values read - * from the cHRm chunk. PNG uses fixed point in the cHRM chunk, so - * we can't expect better than +/-.5E-5 on the result, allow 1E-5. - */ - if (maxe >= 1E-5) - { - size_t pos = 0; - char buffer[256]; - - pos = safecat(buffer, sizeof buffer, pos, API_form); - pos = safecat(buffer, sizeof buffer, pos, " cHRM "); - pos = safecat(buffer, sizeof buffer, pos, el); - pos = safecat(buffer, sizeof buffer, pos, " error: "); - pos = safecatd(buffer, sizeof buffer, pos, maxe, 7); - pos = safecat(buffer, sizeof buffer, pos, " "); - /* Print the color space without the gamma value: */ - pos = safecat_color_encoding(buffer, sizeof buffer, pos, &o, 0); - pos = safecat(buffer, sizeof buffer, pos, " -> "); - pos = safecat_color_encoding(buffer, sizeof buffer, pos, &e, 0); - - png_error(pp, buffer); - } - } - } -# endif /* READ_cHRM */ - - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_rgb_to_gray_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if ((that->colour_type & PNG_COLOR_MASK_COLOR) != 0) - { - double gray, err; - -# if PNG_LIBPNG_VER < 10700 - if (that->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(that); -# endif - - /* Image now has RGB channels... */ -# if DIGITIZE - { - png_modifier *pm = display->pm; - unsigned int sample_depth = that->sample_depth; - unsigned int calc_depth = (pm->assume_16_bit_calculations ? 16 : - sample_depth); - unsigned int gamma_depth = - (sample_depth == 16 ? - display->max_gamma_8 : - (pm->assume_16_bit_calculations ? - display->max_gamma_8 : - sample_depth)); - int isgray; - double r, g, b; - double rlo, rhi, glo, ghi, blo, bhi, graylo, grayhi; - - /* Do this using interval arithmetic, otherwise it is too difficult to - * handle the errors correctly. - * - * To handle the gamma correction work out the upper and lower bounds - * of the digitized value. Assume rounding here - normally the values - * will be identical after this operation if there is only one - * transform, feel free to delete the png_error checks on this below in - * the future (this is just me trying to ensure it works!) - * - * Interval arithmetic is exact, but to implement it it must be - * possible to control the floating point implementation rounding mode. - * This cannot be done in ANSI-C, so instead I reduce the 'lo' values - * by DBL_EPSILON and increase the 'hi' values by the same. - */ -# define DD(v,d,r) (digitize(v*(1-DBL_EPSILON), d, r) * (1-DBL_EPSILON)) -# define DU(v,d,r) (digitize(v*(1+DBL_EPSILON), d, r) * (1+DBL_EPSILON)) - - r = rlo = rhi = that->redf; - rlo -= that->rede; - rlo = DD(rlo, calc_depth, 1/*round*/); - rhi += that->rede; - rhi = DU(rhi, calc_depth, 1/*round*/); - - g = glo = ghi = that->greenf; - glo -= that->greene; - glo = DD(glo, calc_depth, 1/*round*/); - ghi += that->greene; - ghi = DU(ghi, calc_depth, 1/*round*/); - - b = blo = bhi = that->bluef; - blo -= that->bluee; - blo = DD(blo, calc_depth, 1/*round*/); - bhi += that->bluee; - bhi = DU(bhi, calc_depth, 1/*round*/); - - isgray = r==g && g==b; - - if (data.gamma != 1) - { - const double power = 1/data.gamma; - const double abse = .5/(sample_depth == 16 ? 65535 : 255); - - /* If a gamma calculation is done it is done using lookup tables of - * precision gamma_depth, so the already digitized value above may - * need to be further digitized here. - */ - if (gamma_depth != calc_depth) - { - rlo = DD(rlo, gamma_depth, 0/*truncate*/); - rhi = DU(rhi, gamma_depth, 0/*truncate*/); - glo = DD(glo, gamma_depth, 0/*truncate*/); - ghi = DU(ghi, gamma_depth, 0/*truncate*/); - blo = DD(blo, gamma_depth, 0/*truncate*/); - bhi = DU(bhi, gamma_depth, 0/*truncate*/); - } - - /* 'abse' is the error in the gamma table calculation itself. */ - r = pow(r, power); - rlo = DD(pow(rlo, power)-abse, calc_depth, 1); - rhi = DU(pow(rhi, power)+abse, calc_depth, 1); - - g = pow(g, power); - glo = DD(pow(glo, power)-abse, calc_depth, 1); - ghi = DU(pow(ghi, power)+abse, calc_depth, 1); - - b = pow(b, power); - blo = DD(pow(blo, power)-abse, calc_depth, 1); - bhi = DU(pow(bhi, power)+abse, calc_depth, 1); - } - - /* Now calculate the actual gray values. Although the error in the - * coefficients depends on whether they were specified on the command - * line (in which case truncation to 15 bits happened) or not (rounding - * was used) the maximum error in an individual coefficient is always - * 2/32768, because even in the rounding case the requirement that - * coefficients add up to 32768 can cause a larger rounding error. - * - * The only time when rounding doesn't occur in 1.5.5 and later is when - * the non-gamma code path is used for less than 16 bit data. - */ - gray = r * data.red_coefficient + g * data.green_coefficient + - b * data.blue_coefficient; - - { - int do_round = data.gamma != 1 || calc_depth == 16; - const double ce = 2. / 32768; - - graylo = DD(rlo * (data.red_coefficient-ce) + - glo * (data.green_coefficient-ce) + - blo * (data.blue_coefficient-ce), calc_depth, do_round); - if (graylo > gray) /* always accept the right answer */ - graylo = gray; - - grayhi = DU(rhi * (data.red_coefficient+ce) + - ghi * (data.green_coefficient+ce) + - bhi * (data.blue_coefficient+ce), calc_depth, do_round); - if (grayhi < gray) - grayhi = gray; - } - - /* And invert the gamma. */ - if (data.gamma != 1) - { - const double power = data.gamma; - - /* And this happens yet again, shifting the values once more. */ - if (gamma_depth != sample_depth) - { - rlo = DD(rlo, gamma_depth, 0/*truncate*/); - rhi = DU(rhi, gamma_depth, 0/*truncate*/); - glo = DD(glo, gamma_depth, 0/*truncate*/); - ghi = DU(ghi, gamma_depth, 0/*truncate*/); - blo = DD(blo, gamma_depth, 0/*truncate*/); - bhi = DU(bhi, gamma_depth, 0/*truncate*/); - } - - gray = pow(gray, power); - graylo = DD(pow(graylo, power), sample_depth, 1); - grayhi = DU(pow(grayhi, power), sample_depth, 1); - } - -# undef DD -# undef DU - - /* Now the error can be calculated. - * - * If r==g==b because there is no overall gamma correction libpng - * currently preserves the original value. - */ - if (isgray) - err = (that->rede + that->greene + that->bluee)/3; - - else - { - err = fabs(grayhi-gray); - - if (fabs(gray - graylo) > err) - err = fabs(graylo-gray); - -#if !RELEASE_BUILD - /* Check that this worked: */ - if (err > pm->limit) - { - size_t pos = 0; - char buffer[128]; - - pos = safecat(buffer, sizeof buffer, pos, "rgb_to_gray error "); - pos = safecatd(buffer, sizeof buffer, pos, err, 6); - pos = safecat(buffer, sizeof buffer, pos, " exceeds limit "); - pos = safecatd(buffer, sizeof buffer, pos, pm->limit, 6); - png_warning(pp, buffer); - pm->limit = err; - } -#endif /* !RELEASE_BUILD */ - } - } -# else /* !DIGITIZE */ - { - double r = that->redf; - double re = that->rede; - double g = that->greenf; - double ge = that->greene; - double b = that->bluef; - double be = that->bluee; - -# if PNG_LIBPNG_VER < 10700 - /* The true gray case involves no math in earlier versions (not - * true, there was some if gamma correction was happening too.) - */ - if (r == g && r == b) - { - gray = r; - err = re; - if (err < ge) err = ge; - if (err < be) err = be; - } - - else -# endif /* before 1.7 */ - if (data.gamma == 1) - { - /* There is no need to do the conversions to and from linear space, - * so the calculation should be a lot more accurate. There is a - * built in error in the coefficients because they only have 15 bits - * and are adjusted to make sure they add up to 32768. This - * involves a integer calculation with truncation of the form: - * - * ((int)(coefficient * 100000) * 32768)/100000 - * - * This is done to the red and green coefficients (the ones - * provided to the API) then blue is calculated from them so the - * result adds up to 32768. In the worst case this can result in - * a -1 error in red and green and a +2 error in blue. Consequently - * the worst case in the calculation below is 2/32768 error. - * - * TODO: consider fixing this in libpng by rounding the calculation - * limiting the error to 1/32768. - * - * Handling this by adding 2/32768 here avoids needing to increase - * the global error limits to take this into account.) - */ - gray = r * data.red_coefficient + g * data.green_coefficient + - b * data.blue_coefficient; - err = re * data.red_coefficient + ge * data.green_coefficient + - be * data.blue_coefficient + 2./32768 + gray * 5 * DBL_EPSILON; - } - - else - { - /* The calculation happens in linear space, and this produces much - * wider errors in the encoded space. These are handled here by - * factoring the errors in to the calculation. There are two table - * lookups in the calculation and each introduces a quantization - * error defined by the table size. - */ - png_modifier *pm = display->pm; - double in_qe = (that->sample_depth > 8 ? .5/65535 : .5/255); - double out_qe = (that->sample_depth > 8 ? .5/65535 : - (pm->assume_16_bit_calculations ? .5/(1<max_gamma_8) : - .5/255)); - double rhi, ghi, bhi, grayhi; - double g1 = 1/data.gamma; - - rhi = r + re + in_qe; if (rhi > 1) rhi = 1; - r -= re + in_qe; if (r < 0) r = 0; - ghi = g + ge + in_qe; if (ghi > 1) ghi = 1; - g -= ge + in_qe; if (g < 0) g = 0; - bhi = b + be + in_qe; if (bhi > 1) bhi = 1; - b -= be + in_qe; if (b < 0) b = 0; - - r = pow(r, g1)*(1-DBL_EPSILON); rhi = pow(rhi, g1)*(1+DBL_EPSILON); - g = pow(g, g1)*(1-DBL_EPSILON); ghi = pow(ghi, g1)*(1+DBL_EPSILON); - b = pow(b, g1)*(1-DBL_EPSILON); bhi = pow(bhi, g1)*(1+DBL_EPSILON); - - /* Work out the lower and upper bounds for the gray value in the - * encoded space, then work out an average and error. Remove the - * previously added input quantization error at this point. - */ - gray = r * data.red_coefficient + g * data.green_coefficient + - b * data.blue_coefficient - 2./32768 - out_qe; - if (gray <= 0) - gray = 0; - else - { - gray *= (1 - 6 * DBL_EPSILON); - gray = pow(gray, data.gamma) * (1-DBL_EPSILON); - } - - grayhi = rhi * data.red_coefficient + ghi * data.green_coefficient + - bhi * data.blue_coefficient + 2./32768 + out_qe; - grayhi *= (1 + 6 * DBL_EPSILON); - if (grayhi >= 1) - grayhi = 1; - else - grayhi = pow(grayhi, data.gamma) * (1+DBL_EPSILON); - - err = (grayhi - gray) / 2; - gray = (grayhi + gray) / 2; - - if (err <= in_qe) - err = gray * DBL_EPSILON; - - else - err -= in_qe; - -#if !RELEASE_BUILD - /* Validate that the error is within limits (this has caused - * problems before, it's much easier to detect them here.) - */ - if (err > pm->limit) - { - size_t pos = 0; - char buffer[128]; - - pos = safecat(buffer, sizeof buffer, pos, "rgb_to_gray error "); - pos = safecatd(buffer, sizeof buffer, pos, err, 6); - pos = safecat(buffer, sizeof buffer, pos, " exceeds limit "); - pos = safecatd(buffer, sizeof buffer, pos, pm->limit, 6); - png_warning(pp, buffer); - pm->limit = err; - } -#endif /* !RELEASE_BUILD */ - } - } -# endif /* !DIGITIZE */ - - that->bluef = that->greenf = that->redf = gray; - that->bluee = that->greene = that->rede = err; - - /* The sBIT is the minimum of the three colour channel sBITs. */ - if (that->red_sBIT > that->green_sBIT) - that->red_sBIT = that->green_sBIT; - if (that->red_sBIT > that->blue_sBIT) - that->red_sBIT = that->blue_sBIT; - that->blue_sBIT = that->green_sBIT = that->red_sBIT; - - /* And remove the colour bit in the type: */ - if (that->colour_type == PNG_COLOR_TYPE_RGB) - that->colour_type = PNG_COLOR_TYPE_GRAY; - else if (that->colour_type == PNG_COLOR_TYPE_RGB_ALPHA) - that->colour_type = PNG_COLOR_TYPE_GRAY_ALPHA; - } - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_rgb_to_gray_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - return (colour_type & PNG_COLOR_MASK_COLOR) != 0; -} - -#undef data -IT(rgb_to_gray); -#undef PT -#define PT ITSTRUCT(rgb_to_gray) -#undef image_transform_ini -#define image_transform_ini image_transform_default_ini -#endif /* PNG_READ_RGB_TO_GRAY_SUPPORTED */ - -#ifdef PNG_READ_BACKGROUND_SUPPORTED -/* png_set_background(png_structp, png_const_color_16p background_color, - * int background_gamma_code, int need_expand, double background_gamma) - * png_set_background_fixed(png_structp, png_const_color_16p background_color, - * int background_gamma_code, int need_expand, - * png_fixed_point background_gamma) - * - * This ignores the gamma (at present.) -*/ -#define data ITDATA(background) -static image_pixel data; - -static void -image_transform_png_set_background_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_byte colour_type, bit_depth; - png_byte random_bytes[8]; /* 8 bytes - 64 bits - the biggest pixel */ - int expand; - png_color_16 back; - - /* We need a background colour, because we don't know exactly what transforms - * have been set we have to supply the colour in the original file format and - * so we need to know what that is! The background colour is stored in the - * transform_display. - */ - R8(random_bytes); - - /* Read the random value, for colour type 3 the background colour is actually - * expressed as a 24bit rgb, not an index. - */ - colour_type = that->this.colour_type; - if (colour_type == 3) - { - colour_type = PNG_COLOR_TYPE_RGB; - bit_depth = 8; - expand = 0; /* passing in an RGB not a pixel index */ - } - - else - { - if (that->this.has_tRNS) - that->this.is_transparent = 1; - - bit_depth = that->this.bit_depth; - expand = 1; - } - - image_pixel_init(&data, random_bytes, colour_type, - bit_depth, 0/*x*/, 0/*unused: palette*/, NULL/*format*/); - - /* Extract the background colour from this image_pixel, but make sure the - * unused fields of 'back' are garbage. - */ - R8(back); - - if (colour_type & PNG_COLOR_MASK_COLOR) - { - back.red = (png_uint_16)data.red; - back.green = (png_uint_16)data.green; - back.blue = (png_uint_16)data.blue; - } - - else - back.gray = (png_uint_16)data.red; - -#ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_background(pp, &back, PNG_BACKGROUND_GAMMA_FILE, expand, 0); -#else - png_set_background_fixed(pp, &back, PNG_BACKGROUND_GAMMA_FILE, expand, 0); -#endif - - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_background_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - /* Check for tRNS first: */ - if (that->have_tRNS && that->colour_type != PNG_COLOR_TYPE_PALETTE) - image_pixel_add_alpha(that, &display->this, 1/*for background*/); - - /* This is only necessary if the alpha value is less than 1. */ - if (that->alphaf < 1) - { - /* Now we do the background calculation without any gamma correction. */ - if (that->alphaf <= 0) - { - that->redf = data.redf; - that->greenf = data.greenf; - that->bluef = data.bluef; - - that->rede = data.rede; - that->greene = data.greene; - that->bluee = data.bluee; - - that->red_sBIT= data.red_sBIT; - that->green_sBIT= data.green_sBIT; - that->blue_sBIT= data.blue_sBIT; - } - - else /* 0 < alpha < 1 */ - { - double alf = 1 - that->alphaf; - - that->redf = that->redf * that->alphaf + data.redf * alf; - that->rede = that->rede * that->alphaf + data.rede * alf + - DBL_EPSILON; - that->greenf = that->greenf * that->alphaf + data.greenf * alf; - that->greene = that->greene * that->alphaf + data.greene * alf + - DBL_EPSILON; - that->bluef = that->bluef * that->alphaf + data.bluef * alf; - that->bluee = that->bluee * that->alphaf + data.bluee * alf + - DBL_EPSILON; - } - - /* Remove the alpha type and set the alpha (not in that order.) */ - that->alphaf = 1; - that->alphae = 0; - } - - if (that->colour_type == PNG_COLOR_TYPE_RGB_ALPHA) - that->colour_type = PNG_COLOR_TYPE_RGB; - else if (that->colour_type == PNG_COLOR_TYPE_GRAY_ALPHA) - that->colour_type = PNG_COLOR_TYPE_GRAY; - /* PNG_COLOR_TYPE_PALETTE is not changed */ - - this->next->mod(this->next, that, pp, display); -} - -#define image_transform_png_set_background_add image_transform_default_add - -#undef data -IT(background); -#undef PT -#define PT ITSTRUCT(background) -#endif /* PNG_READ_BACKGROUND_SUPPORTED */ - -/* png_set_quantize(png_structp, png_colorp palette, int num_palette, - * int maximum_colors, png_const_uint_16p histogram, int full_quantize) - * - * Very difficult to validate this! - */ -/*NOTE: TBD NYI */ - -/* The data layout transforms are handled by swapping our own channel data, - * necessarily these need to happen at the end of the transform list because the - * semantic of the channels changes after these are executed. Some of these, - * like set_shift and set_packing, can't be done at present because they change - * the layout of the data at the sub-sample level so sample() won't get the - * right answer. - */ -/* png_set_invert_alpha */ -#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED -/* Invert the alpha channel - * - * png_set_invert_alpha(png_structrp png_ptr) - */ -static void -image_transform_png_set_invert_alpha_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_invert_alpha(pp); - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_invert_alpha_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->colour_type & 4) - that->alpha_inverted = 1; - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_invert_alpha_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - /* Only has an effect on pixels with alpha: */ - return (colour_type & 4) != 0; -} - -IT(invert_alpha); -#undef PT -#define PT ITSTRUCT(invert_alpha) - -#endif /* PNG_READ_INVERT_ALPHA_SUPPORTED */ - -/* png_set_bgr */ -#ifdef PNG_READ_BGR_SUPPORTED -/* Swap R,G,B channels to order B,G,R. - * - * png_set_bgr(png_structrp png_ptr) - * - * This only has an effect on RGB and RGBA pixels. - */ -static void -image_transform_png_set_bgr_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_bgr(pp); - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_bgr_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->colour_type == PNG_COLOR_TYPE_RGB || - that->colour_type == PNG_COLOR_TYPE_RGBA) - that->swap_rgb = 1; - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_bgr_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - return colour_type == PNG_COLOR_TYPE_RGB || - colour_type == PNG_COLOR_TYPE_RGBA; -} - -IT(bgr); -#undef PT -#define PT ITSTRUCT(bgr) - -#endif /* PNG_READ_BGR_SUPPORTED */ - -/* png_set_swap_alpha */ -#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED -/* Put the alpha channel first. - * - * png_set_swap_alpha(png_structrp png_ptr) - * - * This only has an effect on GA and RGBA pixels. - */ -static void -image_transform_png_set_swap_alpha_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_swap_alpha(pp); - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_swap_alpha_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->colour_type == PNG_COLOR_TYPE_GA || - that->colour_type == PNG_COLOR_TYPE_RGBA) - that->alpha_first = 1; - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_swap_alpha_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - return colour_type == PNG_COLOR_TYPE_GA || - colour_type == PNG_COLOR_TYPE_RGBA; -} - -IT(swap_alpha); -#undef PT -#define PT ITSTRUCT(swap_alpha) - -#endif /* PNG_READ_SWAP_ALPHA_SUPPORTED */ - -/* png_set_swap */ -#ifdef PNG_READ_SWAP_SUPPORTED -/* Byte swap 16-bit components. - * - * png_set_swap(png_structrp png_ptr) - */ -static void -image_transform_png_set_swap_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_swap(pp); - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_swap_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->bit_depth == 16) - that->swap16 = 1; - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_swap_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(colour_type) - - this->next = *that; - *that = this; - - return bit_depth == 16; -} - -IT(swap); -#undef PT -#define PT ITSTRUCT(swap) - -#endif /* PNG_READ_SWAP_SUPPORTED */ - -#ifdef PNG_READ_FILLER_SUPPORTED -/* Add a filler byte to 8-bit Gray or 24-bit RGB images. - * - * png_set_filler, (png_structp png_ptr, png_uint_32 filler, int flags)); - * - * Flags: - * - * PNG_FILLER_BEFORE - * PNG_FILLER_AFTER - */ -#define data ITDATA(filler) -static struct -{ - png_uint_32 filler; - int flags; -} data; - -static void -image_transform_png_set_filler_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - /* Need a random choice for 'before' and 'after' as well as for the - * filler. The 'filler' value has all 32 bits set, but only bit_depth - * will be used. At this point we don't know bit_depth. - */ - data.filler = random_u32(); - data.flags = random_choice(); - - png_set_filler(pp, data.filler, data.flags); - - /* The standard display handling stuff also needs to know that - * there is a filler, so set that here. - */ - that->this.filler = 1; - - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_filler_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->bit_depth >= 8 && - (that->colour_type == PNG_COLOR_TYPE_RGB || - that->colour_type == PNG_COLOR_TYPE_GRAY)) - { - unsigned int max = (1U << that->bit_depth)-1; - that->alpha = data.filler & max; - that->alphaf = ((double)that->alpha) / max; - that->alphae = 0; - - /* The filler has been stored in the alpha channel, we must record - * that this has been done for the checking later on, the color - * type is faked to have an alpha channel, but libpng won't report - * this; the app has to know the extra channel is there and this - * was recording in standard_display::filler above. - */ - that->colour_type |= 4; /* alpha added */ - that->alpha_first = data.flags == PNG_FILLER_BEFORE; - } - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_filler_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - this->next = *that; - *that = this; - - return bit_depth >= 8 && (colour_type == PNG_COLOR_TYPE_RGB || - colour_type == PNG_COLOR_TYPE_GRAY); -} - -#undef data -IT(filler); -#undef PT -#define PT ITSTRUCT(filler) - -/* png_set_add_alpha, (png_structp png_ptr, png_uint_32 filler, int flags)); */ -/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */ -#define data ITDATA(add_alpha) -static struct -{ - png_uint_32 filler; - int flags; -} data; - -static void -image_transform_png_set_add_alpha_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - /* Need a random choice for 'before' and 'after' as well as for the - * filler. The 'filler' value has all 32 bits set, but only bit_depth - * will be used. At this point we don't know bit_depth. - */ - data.filler = random_u32(); - data.flags = random_choice(); - - png_set_add_alpha(pp, data.filler, data.flags); - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_add_alpha_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->bit_depth >= 8 && - (that->colour_type == PNG_COLOR_TYPE_RGB || - that->colour_type == PNG_COLOR_TYPE_GRAY)) - { - unsigned int max = (1U << that->bit_depth)-1; - that->alpha = data.filler & max; - that->alphaf = ((double)that->alpha) / max; - that->alphae = 0; - - that->colour_type |= 4; /* alpha added */ - that->alpha_first = data.flags == PNG_FILLER_BEFORE; - } - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_add_alpha_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - this->next = *that; - *that = this; - - return bit_depth >= 8 && (colour_type == PNG_COLOR_TYPE_RGB || - colour_type == PNG_COLOR_TYPE_GRAY); -} - -#undef data -IT(add_alpha); -#undef PT -#define PT ITSTRUCT(add_alpha) - -#endif /* PNG_READ_FILLER_SUPPORTED */ - -/* png_set_packing */ -#ifdef PNG_READ_PACK_SUPPORTED -/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. - * - * png_set_packing(png_structrp png_ptr) - * - * This should only affect grayscale and palette images with less than 8 bits - * per pixel. - */ -static void -image_transform_png_set_packing_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_packing(pp); - that->unpacked = 1; - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_packing_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - /* The general expand case depends on what the colour type is, - * low bit-depth pixel values are unpacked into bytes without - * scaling, so sample_depth is not changed. - */ - if (that->bit_depth < 8) /* grayscale or palette */ - that->bit_depth = 8; - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_packing_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(colour_type) - - this->next = *that; - *that = this; - - /* Nothing should happen unless the bit depth is less than 8: */ - return bit_depth < 8; -} - -IT(packing); -#undef PT -#define PT ITSTRUCT(packing) - -#endif /* PNG_READ_PACK_SUPPORTED */ - -/* png_set_packswap */ -#ifdef PNG_READ_PACKSWAP_SUPPORTED -/* Swap pixels packed into bytes; reverses the order on screen so that - * the high order bits correspond to the rightmost pixels. - * - * png_set_packswap(png_structrp png_ptr) - */ -static void -image_transform_png_set_packswap_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_packswap(pp); - that->this.littleendian = 1; - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_packswap_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->bit_depth < 8) - that->littleendian = 1; - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_packswap_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(colour_type) - - this->next = *that; - *that = this; - - return bit_depth < 8; -} - -IT(packswap); -#undef PT -#define PT ITSTRUCT(packswap) - -#endif /* PNG_READ_PACKSWAP_SUPPORTED */ - - -/* png_set_invert_mono */ -#ifdef PNG_READ_INVERT_MONO_SUPPORTED -/* Invert the gray channel - * - * png_set_invert_mono(png_structrp png_ptr) - */ -static void -image_transform_png_set_invert_mono_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_invert_mono(pp); - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_invert_mono_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - if (that->colour_type & 4) - that->mono_inverted = 1; - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_invert_mono_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - /* Only has an effect on pixels with no colour: */ - return (colour_type & 2) == 0; -} - -IT(invert_mono); -#undef PT -#define PT ITSTRUCT(invert_mono) - -#endif /* PNG_READ_INVERT_MONO_SUPPORTED */ - -#ifdef PNG_READ_SHIFT_SUPPORTED -/* png_set_shift(png_structp, png_const_color_8p true_bits) - * - * The output pixels will be shifted by the given true_bits - * values. - */ -#define data ITDATA(shift) -static png_color_8 data; - -static void -image_transform_png_set_shift_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - /* Get a random set of shifts. The shifts need to do something - * to test the transform, so they are limited to the bit depth - * of the input image. Notice that in the following the 'gray' - * field is randomized independently. This acts as a check that - * libpng does use the correct field. - */ - unsigned int depth = that->this.bit_depth; - - data.red = (png_byte)/*SAFE*/(random_mod(depth)+1); - data.green = (png_byte)/*SAFE*/(random_mod(depth)+1); - data.blue = (png_byte)/*SAFE*/(random_mod(depth)+1); - data.gray = (png_byte)/*SAFE*/(random_mod(depth)+1); - data.alpha = (png_byte)/*SAFE*/(random_mod(depth)+1); - - png_set_shift(pp, &data); - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_shift_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - /* Copy the correct values into the sBIT fields, libpng does not do - * anything to palette data: - */ - if (that->colour_type != PNG_COLOR_TYPE_PALETTE) - { - that->sig_bits = 1; - - /* The sBIT fields are reset to the values previously sent to - * png_set_shift according to the colour type. - * does. - */ - if (that->colour_type & 2) /* RGB channels */ - { - that->red_sBIT = data.red; - that->green_sBIT = data.green; - that->blue_sBIT = data.blue; - } - - else /* One grey channel */ - that->red_sBIT = that->green_sBIT = that->blue_sBIT = data.gray; - - that->alpha_sBIT = data.alpha; - } - - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_shift_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - UNUSED(bit_depth) - - this->next = *that; - *that = this; - - return colour_type != PNG_COLOR_TYPE_PALETTE; -} - -IT(shift); -#undef PT -#define PT ITSTRUCT(shift) - -#endif /* PNG_READ_SHIFT_SUPPORTED */ - -#ifdef THIS_IS_THE_PROFORMA -static void -image_transform_png_set_@_set(const image_transform *this, - transform_display *that, png_structp pp, png_infop pi) -{ - png_set_@(pp); - this->next->set(this->next, that, pp, pi); -} - -static void -image_transform_png_set_@_mod(const image_transform *this, - image_pixel *that, png_const_structp pp, - const transform_display *display) -{ - this->next->mod(this->next, that, pp, display); -} - -static int -image_transform_png_set_@_add(image_transform *this, - const image_transform **that, png_byte colour_type, png_byte bit_depth) -{ - this->next = *that; - *that = this; - - return 1; -} - -IT(@); -#endif - - -/* This may just be 'end' if all the transforms are disabled! */ -static image_transform *const image_transform_first = &PT; - -static void -transform_enable(const char *name) -{ - /* Everything starts out enabled, so if we see an 'enable' disabled - * everything else the first time round. - */ - static int all_disabled = 0; - int found_it = 0; - image_transform *list = image_transform_first; - - while (list != &image_transform_end) - { - if (strcmp(list->name, name) == 0) - { - list->enable = 1; - found_it = 1; - } - else if (!all_disabled) - list->enable = 0; - - list = list->list; - } - - all_disabled = 1; - - if (!found_it) - { - fprintf(stderr, "pngvalid: --transform-enable=%s: unknown transform\n", - name); - exit(99); - } -} - -static void -transform_disable(const char *name) -{ - image_transform *list = image_transform_first; - - while (list != &image_transform_end) - { - if (strcmp(list->name, name) == 0) - { - list->enable = 0; - return; - } - - list = list->list; - } - - fprintf(stderr, "pngvalid: --transform-disable=%s: unknown transform\n", - name); - exit(99); -} - -static void -image_transform_reset_count(void) -{ - image_transform *next = image_transform_first; - int count = 0; - - while (next != &image_transform_end) - { - next->local_use = 0; - next->next = 0; - next = next->list; - ++count; - } - - /* This can only happen if we every have more than 32 transforms (excluding - * the end) in the list. - */ - if (count > 32) abort(); -} - -static int -image_transform_test_counter(png_uint_32 counter, unsigned int max) -{ - /* Test the list to see if there is any point contining, given a current - * counter and a 'max' value. - */ - image_transform *next = image_transform_first; - - while (next != &image_transform_end) - { - /* For max 0 or 1 continue until the counter overflows: */ - counter >>= 1; - - /* Continue if any entry hasn't reacked the max. */ - if (max > 1 && next->local_use < max) - return 1; - next = next->list; - } - - return max <= 1 && counter == 0; -} - -static png_uint_32 -image_transform_add(const image_transform **this, unsigned int max, - png_uint_32 counter, char *name, size_t sizeof_name, size_t *pos, - png_byte colour_type, png_byte bit_depth) -{ - for (;;) /* until we manage to add something */ - { - png_uint_32 mask; - image_transform *list; - - /* Find the next counter value, if the counter is zero this is the start - * of the list. This routine always returns the current counter (not the - * next) so it returns 0 at the end and expects 0 at the beginning. - */ - if (counter == 0) /* first time */ - { - image_transform_reset_count(); - if (max <= 1) - counter = 1; - else - counter = random_32(); - } - else /* advance the counter */ - { - switch (max) - { - case 0: ++counter; break; - case 1: counter <<= 1; break; - default: counter = random_32(); break; - } - } - - /* Now add all these items, if possible */ - *this = &image_transform_end; - list = image_transform_first; - mask = 1; - - /* Go through the whole list adding anything that the counter selects: */ - while (list != &image_transform_end) - { - if ((counter & mask) != 0 && list->enable && - (max == 0 || list->local_use < max)) - { - /* Candidate to add: */ - if (list->add(list, this, colour_type, bit_depth) || max == 0) - { - /* Added, so add to the name too. */ - *pos = safecat(name, sizeof_name, *pos, " +"); - *pos = safecat(name, sizeof_name, *pos, list->name); - } - - else - { - /* Not useful and max>0, so remove it from *this: */ - *this = list->next; - list->next = 0; - - /* And, since we know it isn't useful, stop it being added again - * in this run: - */ - list->local_use = max; - } - } - - mask <<= 1; - list = list->list; - } - - /* Now if anything was added we have something to do. */ - if (*this != &image_transform_end) - return counter; - - /* Nothing added, but was there anything in there to add? */ - if (!image_transform_test_counter(counter, max)) - return 0; - } -} - -static void -perform_transform_test(png_modifier *pm) -{ - png_byte colour_type = 0; - png_byte bit_depth = 0; - unsigned int palette_number = 0; - - while (next_format(&colour_type, &bit_depth, &palette_number, pm->test_lbg, - pm->test_tRNS)) - { - png_uint_32 counter = 0; - size_t base_pos; - char name[64]; - - base_pos = safecat(name, sizeof name, 0, "transform:"); - - for (;;) - { - size_t pos = base_pos; - const image_transform *list = 0; - - /* 'max' is currently hardwired to '1'; this should be settable on the - * command line. - */ - counter = image_transform_add(&list, 1/*max*/, counter, - name, sizeof name, &pos, colour_type, bit_depth); - - if (counter == 0) - break; - - /* The command line can change this to checking interlaced images. */ - do - { - pm->repeat = 0; - transform_test(pm, FILEID(colour_type, bit_depth, palette_number, - pm->interlace_type, 0, 0, 0), list, name); - - if (fail(pm)) - return; - } - while (pm->repeat); - } - } -} -#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ - -/********************************* GAMMA TESTS ********************************/ -#ifdef PNG_READ_GAMMA_SUPPORTED -/* Reader callbacks and implementations, where they differ from the standard - * ones. - */ -typedef struct gamma_display -{ - standard_display this; - - /* Parameters */ - png_modifier* pm; - double file_gamma; - double screen_gamma; - double background_gamma; - png_byte sbit; - int threshold_test; - int use_input_precision; - int scale16; - int expand16; - int do_background; - png_color_16 background_color; - - /* Local variables */ - double maxerrout; - double maxerrpc; - double maxerrabs; -} gamma_display; - -#define ALPHA_MODE_OFFSET 4 - -static void -gamma_display_init(gamma_display *dp, png_modifier *pm, png_uint_32 id, - double file_gamma, double screen_gamma, png_byte sbit, int threshold_test, - int use_input_precision, int scale16, int expand16, - int do_background, const png_color_16 *pointer_to_the_background_color, - double background_gamma) -{ - /* Standard fields */ - standard_display_init(&dp->this, &pm->this, id, do_read_interlace, - pm->use_update_info); - - /* Parameter fields */ - dp->pm = pm; - dp->file_gamma = file_gamma; - dp->screen_gamma = screen_gamma; - dp->background_gamma = background_gamma; - dp->sbit = sbit; - dp->threshold_test = threshold_test; - dp->use_input_precision = use_input_precision; - dp->scale16 = scale16; - dp->expand16 = expand16; - dp->do_background = do_background; - if (do_background && pointer_to_the_background_color != 0) - dp->background_color = *pointer_to_the_background_color; - else - memset(&dp->background_color, 0, sizeof dp->background_color); - - /* Local variable fields */ - dp->maxerrout = dp->maxerrpc = dp->maxerrabs = 0; -} - -static void -gamma_info_imp(gamma_display *dp, png_structp pp, png_infop pi) -{ - /* Reuse the standard stuff as appropriate. */ - standard_info_part1(&dp->this, pp, pi); - - /* If requested strip 16 to 8 bits - this is handled automagically below - * because the output bit depth is read from the library. Note that there - * are interactions with sBIT but, internally, libpng makes sbit at most - * PNG_MAX_GAMMA_8 prior to 1.7 when doing the following. - */ - if (dp->scale16) -# ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED - png_set_scale_16(pp); -# else - /* The following works both in 1.5.4 and earlier versions: */ -# ifdef PNG_READ_16_TO_8_SUPPORTED - png_set_strip_16(pp); -# else - png_error(pp, "scale16 (16 to 8 bit conversion) not supported"); -# endif -# endif - - if (dp->expand16) -# ifdef PNG_READ_EXPAND_16_SUPPORTED - png_set_expand_16(pp); -# else - png_error(pp, "expand16 (8 to 16 bit conversion) not supported"); -# endif - - if (dp->do_background >= ALPHA_MODE_OFFSET) - { -# ifdef PNG_READ_ALPHA_MODE_SUPPORTED - { - /* This tests the alpha mode handling, if supported. */ - int mode = dp->do_background - ALPHA_MODE_OFFSET; - - /* The gamma value is the output gamma, and is in the standard, - * non-inverted, representation. It provides a default for the PNG file - * gamma, but since the file has a gAMA chunk this does not matter. - */ - const double sg = dp->screen_gamma; -# ifndef PNG_FLOATING_POINT_SUPPORTED - png_fixed_point g = fix(sg); -# endif - -# ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_alpha_mode(pp, mode, sg); -# else - png_set_alpha_mode_fixed(pp, mode, g); -# endif - - /* However, for the standard Porter-Duff algorithm the output defaults - * to be linear, so if the test requires non-linear output it must be - * corrected here. - */ - if (mode == PNG_ALPHA_STANDARD && sg != 1) - { -# ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_gamma(pp, sg, dp->file_gamma); -# else - png_fixed_point f = fix(dp->file_gamma); - png_set_gamma_fixed(pp, g, f); -# endif - } - } -# else - png_error(pp, "alpha mode handling not supported"); -# endif - } - - else - { - /* Set up gamma processing. */ -# ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_gamma(pp, dp->screen_gamma, dp->file_gamma); -# else - { - png_fixed_point s = fix(dp->screen_gamma); - png_fixed_point f = fix(dp->file_gamma); - png_set_gamma_fixed(pp, s, f); - } -# endif - - if (dp->do_background) - { -# ifdef PNG_READ_BACKGROUND_SUPPORTED - /* NOTE: this assumes the caller provided the correct background gamma! - */ - const double bg = dp->background_gamma; -# ifndef PNG_FLOATING_POINT_SUPPORTED - png_fixed_point g = fix(bg); -# endif - -# ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_background(pp, &dp->background_color, dp->do_background, - 0/*need_expand*/, bg); -# else - png_set_background_fixed(pp, &dp->background_color, - dp->do_background, 0/*need_expand*/, g); -# endif -# else - png_error(pp, "png_set_background not supported"); -# endif - } - } - - { - int i = dp->this.use_update_info; - /* Always do one call, even if use_update_info is 0. */ - do - png_read_update_info(pp, pi); - while (--i > 0); - } - - /* Now we may get a different cbRow: */ - standard_info_part2(&dp->this, pp, pi, 1 /*images*/); -} - -static void PNGCBAPI -gamma_info(png_structp pp, png_infop pi) -{ - gamma_info_imp(voidcast(gamma_display*, png_get_progressive_ptr(pp)), pp, - pi); -} - -/* Validate a single component value - the routine gets the input and output - * sample values as unscaled PNG component values along with a cache of all the - * information required to validate the values. - */ -typedef struct validate_info -{ - png_const_structp pp; - gamma_display *dp; - png_byte sbit; - int use_input_precision; - int do_background; - int scale16; - unsigned int sbit_max; - unsigned int isbit_shift; - unsigned int outmax; - - double gamma_correction; /* Overall correction required. */ - double file_inverse; /* Inverse of file gamma. */ - double screen_gamma; - double screen_inverse; /* Inverse of screen gamma. */ - - double background_red; /* Linear background value, red or gray. */ - double background_green; - double background_blue; - - double maxabs; - double maxpc; - double maxcalc; - double maxout; - double maxout_total; /* Total including quantization error */ - double outlog; - int outquant; -} -validate_info; - -static void -init_validate_info(validate_info *vi, gamma_display *dp, png_const_structp pp, - int in_depth, int out_depth) -{ - unsigned int outmax = (1U<pp = pp; - vi->dp = dp; - - if (dp->sbit > 0 && dp->sbit < in_depth) - { - vi->sbit = dp->sbit; - vi->isbit_shift = in_depth - dp->sbit; - } - - else - { - vi->sbit = (png_byte)in_depth; - vi->isbit_shift = 0; - } - - vi->sbit_max = (1U << vi->sbit)-1; - - /* This mimics the libpng threshold test, '0' is used to prevent gamma - * correction in the validation test. - */ - vi->screen_gamma = dp->screen_gamma; - if (fabs(vi->screen_gamma-1) < PNG_GAMMA_THRESHOLD) - vi->screen_gamma = vi->screen_inverse = 0; - else - vi->screen_inverse = 1/vi->screen_gamma; - - vi->use_input_precision = dp->use_input_precision; - vi->outmax = outmax; - vi->maxabs = abserr(dp->pm, in_depth, out_depth); - vi->maxpc = pcerr(dp->pm, in_depth, out_depth); - vi->maxcalc = calcerr(dp->pm, in_depth, out_depth); - vi->maxout = outerr(dp->pm, in_depth, out_depth); - vi->outquant = output_quantization_factor(dp->pm, in_depth, out_depth); - vi->maxout_total = vi->maxout + vi->outquant * .5; - vi->outlog = outlog(dp->pm, in_depth, out_depth); - - if ((dp->this.colour_type & PNG_COLOR_MASK_ALPHA) != 0 || - (dp->this.colour_type == 3 && dp->this.is_transparent) || - ((dp->this.colour_type == 0 || dp->this.colour_type == 2) && - dp->this.has_tRNS)) - { - vi->do_background = dp->do_background; - - if (vi->do_background != 0) - { - const double bg_inverse = 1/dp->background_gamma; - double r, g, b; - - /* Caller must at least put the gray value into the red channel */ - r = dp->background_color.red; r /= outmax; - g = dp->background_color.green; g /= outmax; - b = dp->background_color.blue; b /= outmax; - -# if 0 - /* libpng doesn't do this optimization, if we do pngvalid will fail. - */ - if (fabs(bg_inverse-1) >= PNG_GAMMA_THRESHOLD) -# endif - { - r = pow(r, bg_inverse); - g = pow(g, bg_inverse); - b = pow(b, bg_inverse); - } - - vi->background_red = r; - vi->background_green = g; - vi->background_blue = b; - } - } - else /* Do not expect any background processing */ - vi->do_background = 0; - - if (vi->do_background == 0) - vi->background_red = vi->background_green = vi->background_blue = 0; - - vi->gamma_correction = 1/(dp->file_gamma*dp->screen_gamma); - if (fabs(vi->gamma_correction-1) < PNG_GAMMA_THRESHOLD) - vi->gamma_correction = 0; - - vi->file_inverse = 1/dp->file_gamma; - if (fabs(vi->file_inverse-1) < PNG_GAMMA_THRESHOLD) - vi->file_inverse = 0; - - vi->scale16 = dp->scale16; -} - -/* This function handles composition of a single non-alpha component. The - * argument is the input sample value, in the range 0..1, and the alpha value. - * The result is the composed, linear, input sample. If alpha is less than zero - * this is the alpha component and the function should not be called! - */ -static double -gamma_component_compose(int do_background, double input_sample, double alpha, - double background, int *compose) -{ - switch (do_background) - { -#ifdef PNG_READ_BACKGROUND_SUPPORTED - case PNG_BACKGROUND_GAMMA_SCREEN: - case PNG_BACKGROUND_GAMMA_FILE: - case PNG_BACKGROUND_GAMMA_UNIQUE: - /* Standard PNG background processing. */ - if (alpha < 1) - { - if (alpha > 0) - { - input_sample = input_sample * alpha + background * (1-alpha); - if (compose != NULL) - *compose = 1; - } - - else - input_sample = background; - } - break; -#endif - -#ifdef PNG_READ_ALPHA_MODE_SUPPORTED - case ALPHA_MODE_OFFSET + PNG_ALPHA_STANDARD: - case ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN: - /* The components are premultiplied in either case and the output is - * gamma encoded (to get standard Porter-Duff we expect the output - * gamma to be set to 1.0!) - */ - case ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED: - /* The optimization is that the partial-alpha entries are linear - * while the opaque pixels are gamma encoded, but this only affects the - * output encoding. - */ - if (alpha < 1) - { - if (alpha > 0) - { - input_sample *= alpha; - if (compose != NULL) - *compose = 1; - } - - else - input_sample = 0; - } - break; -#endif - - default: - /* Standard cases where no compositing is done (so the component - * value is already correct.) - */ - UNUSED(alpha) - UNUSED(background) - UNUSED(compose) - break; - } - - return input_sample; -} - -/* This API returns the encoded *input* component, in the range 0..1 */ -static double -gamma_component_validate(const char *name, const validate_info *vi, - unsigned int id, unsigned int od, - const double alpha /* <0 for the alpha channel itself */, - const double background /* component background value */) -{ - unsigned int isbit = id >> vi->isbit_shift; - unsigned int sbit_max = vi->sbit_max; - unsigned int outmax = vi->outmax; - int do_background = vi->do_background; - - double i; - - /* First check on the 'perfect' result obtained from the digitized input - * value, id, and compare this against the actual digitized result, 'od'. - * 'i' is the input result in the range 0..1: - */ - i = isbit; i /= sbit_max; - - /* Check for the fast route: if we don't do any background composition or if - * this is the alpha channel ('alpha' < 0) or if the pixel is opaque then - * just use the gamma_correction field to correct to the final output gamma. - */ - if (alpha == 1 /* opaque pixel component */ || !do_background -#ifdef PNG_READ_ALPHA_MODE_SUPPORTED - || do_background == ALPHA_MODE_OFFSET + PNG_ALPHA_PNG -#endif - || (alpha < 0 /* alpha channel */ -#ifdef PNG_READ_ALPHA_MODE_SUPPORTED - && do_background != ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN -#endif - )) - { - /* Then get the gamma corrected version of 'i' and compare to 'od', any - * error less than .5 is insignificant - just quantization of the output - * value to the nearest digital value (nevertheless the error is still - * recorded - it's interesting ;-) - */ - double encoded_sample = i; - double encoded_error; - - /* alpha less than 0 indicates the alpha channel, which is always linear - */ - if (alpha >= 0 && vi->gamma_correction > 0) - encoded_sample = pow(encoded_sample, vi->gamma_correction); - encoded_sample *= outmax; - - encoded_error = fabs(od-encoded_sample); - - if (encoded_error > vi->dp->maxerrout) - vi->dp->maxerrout = encoded_error; - - if (encoded_error < vi->maxout_total && encoded_error < vi->outlog) - return i; - } - - /* The slow route - attempt to do linear calculations. */ - /* There may be an error, or background processing is required, so calculate - * the actual sample values - unencoded light intensity values. Note that in - * practice these are not completely unencoded because they include a - * 'viewing correction' to decrease or (normally) increase the perceptual - * contrast of the image. There's nothing we can do about this - we don't - * know what it is - so assume the unencoded value is perceptually linear. - */ - { - double input_sample = i; /* In range 0..1 */ - double output, error, encoded_sample, encoded_error; - double es_lo, es_hi; - int compose = 0; /* Set to one if composition done */ - int output_is_encoded; /* Set if encoded to screen gamma */ - int log_max_error = 1; /* Check maximum error values */ - png_const_charp pass = 0; /* Reason test passes (or 0 for fail) */ - - /* Convert to linear light (with the above caveat.) The alpha channel is - * already linear. - */ - if (alpha >= 0) - { - int tcompose; - - if (vi->file_inverse > 0) - input_sample = pow(input_sample, vi->file_inverse); - - /* Handle the compose processing: */ - tcompose = 0; - input_sample = gamma_component_compose(do_background, input_sample, - alpha, background, &tcompose); - - if (tcompose) - compose = 1; - } - - /* And similarly for the output value, but we need to check the background - * handling to linearize it correctly. - */ - output = od; - output /= outmax; - - output_is_encoded = vi->screen_gamma > 0; - - if (alpha < 0) /* The alpha channel */ - { -#ifdef PNG_READ_ALPHA_MODE_SUPPORTED - if (do_background != ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN) -#endif - { - /* In all other cases the output alpha channel is linear already, - * don't log errors here, they are much larger in linear data. - */ - output_is_encoded = 0; - log_max_error = 0; - } - } - -#ifdef PNG_READ_ALPHA_MODE_SUPPORTED - else /* A component */ - { - if (do_background == ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED && - alpha < 1) /* the optimized case - linear output */ - { - if (alpha > 0) log_max_error = 0; - output_is_encoded = 0; - } - } -#endif - - if (output_is_encoded) - output = pow(output, vi->screen_gamma); - - /* Calculate (or recalculate) the encoded_sample value and repeat the - * check above (unnecessary if we took the fast route, but harmless.) - */ - encoded_sample = input_sample; - if (output_is_encoded) - encoded_sample = pow(encoded_sample, vi->screen_inverse); - encoded_sample *= outmax; - - encoded_error = fabs(od-encoded_sample); - - /* Don't log errors in the alpha channel, or the 'optimized' case, - * neither are significant to the overall perception. - */ - if (log_max_error && encoded_error > vi->dp->maxerrout) - vi->dp->maxerrout = encoded_error; - - if (encoded_error < vi->maxout_total) - { - if (encoded_error < vi->outlog) - return i; - - /* Test passed but error is bigger than the log limit, record why the - * test passed: - */ - pass = "less than maxout:\n"; - } - - /* i: the original input value in the range 0..1 - * - * pngvalid calculations: - * input_sample: linear result; i linearized and composed, range 0..1 - * encoded_sample: encoded result; input_sample scaled to output bit depth - * - * libpng calculations: - * output: linear result; od scaled to 0..1 and linearized - * od: encoded result from libpng - */ - - /* Now we have the numbers for real errors, both absolute values as as a - * percentage of the correct value (output): - */ - error = fabs(input_sample-output); - - if (log_max_error && error > vi->dp->maxerrabs) - vi->dp->maxerrabs = error; - - /* The following is an attempt to ignore the tendency of quantization to - * dominate the percentage errors for lower result values: - */ - if (log_max_error && input_sample > .5) - { - double percentage_error = error/input_sample; - if (percentage_error > vi->dp->maxerrpc) - vi->dp->maxerrpc = percentage_error; - } - - /* Now calculate the digitization limits for 'encoded_sample' using the - * 'max' values. Note that maxout is in the encoded space but maxpc and - * maxabs are in linear light space. - * - * First find the maximum error in linear light space, range 0..1: - */ - { - double tmp = input_sample * vi->maxpc; - if (tmp < vi->maxabs) tmp = vi->maxabs; - /* If 'compose' is true the composition was done in linear space using - * integer arithmetic. This introduces an extra error of +/- 0.5 (at - * least) in the integer space used. 'maxcalc' records this, taking - * into account the possibility that even for 16 bit output 8 bit space - * may have been used. - */ - if (compose && tmp < vi->maxcalc) tmp = vi->maxcalc; - - /* The 'maxout' value refers to the encoded result, to compare with - * this encode input_sample adjusted by the maximum error (tmp) above. - */ - es_lo = encoded_sample - vi->maxout; - - if (es_lo > 0 && input_sample-tmp > 0) - { - double low_value = input_sample-tmp; - if (output_is_encoded) - low_value = pow(low_value, vi->screen_inverse); - low_value *= outmax; - if (low_value < es_lo) es_lo = low_value; - - /* Quantize this appropriately: */ - es_lo = ceil(es_lo / vi->outquant - .5) * vi->outquant; - } - - else - es_lo = 0; - - es_hi = encoded_sample + vi->maxout; - - if (es_hi < outmax && input_sample+tmp < 1) - { - double high_value = input_sample+tmp; - if (output_is_encoded) - high_value = pow(high_value, vi->screen_inverse); - high_value *= outmax; - if (high_value > es_hi) es_hi = high_value; - - es_hi = floor(es_hi / vi->outquant + .5) * vi->outquant; - } - - else - es_hi = outmax; - } - - /* The primary test is that the final encoded value returned by the - * library should be between the two limits (inclusive) that were - * calculated above. - */ - if (od >= es_lo && od <= es_hi) - { - /* The value passes, but we may need to log the information anyway. */ - if (encoded_error < vi->outlog) - return i; - - if (pass == 0) - pass = "within digitization limits:\n"; - } - - { - /* There has been an error in processing, or we need to log this - * value. - */ - double is_lo, is_hi; - - /* pass is set at this point if either of the tests above would have - * passed. Don't do these additional tests here - just log the - * original [es_lo..es_hi] values. - */ - if (pass == 0 && vi->use_input_precision && vi->dp->sbit) - { - /* Ok, something is wrong - this actually happens in current libpng - * 16-to-8 processing. Assume that the input value (id, adjusted - * for sbit) can be anywhere between value-.5 and value+.5 - quite a - * large range if sbit is low. - * - * NOTE: at present because the libpng gamma table stuff has been - * changed to use a rounding algorithm to correct errors in 8-bit - * calculations the precise sbit calculation (a shift) has been - * lost. This can result in up to a +/-1 error in the presence of - * an sbit less than the bit depth. - */ -# if PNG_LIBPNG_VER < 10700 -# define SBIT_ERROR .5 -# else -# define SBIT_ERROR 1. -# endif - double tmp = (isbit - SBIT_ERROR)/sbit_max; - - if (tmp <= 0) - tmp = 0; - - else if (alpha >= 0 && vi->file_inverse > 0 && tmp < 1) - tmp = pow(tmp, vi->file_inverse); - - tmp = gamma_component_compose(do_background, tmp, alpha, background, - NULL); - - if (output_is_encoded && tmp > 0 && tmp < 1) - tmp = pow(tmp, vi->screen_inverse); - - is_lo = ceil(outmax * tmp - vi->maxout_total); - - if (is_lo < 0) - is_lo = 0; - - tmp = (isbit + SBIT_ERROR)/sbit_max; - - if (tmp >= 1) - tmp = 1; - - else if (alpha >= 0 && vi->file_inverse > 0 && tmp < 1) - tmp = pow(tmp, vi->file_inverse); - - tmp = gamma_component_compose(do_background, tmp, alpha, background, - NULL); - - if (output_is_encoded && tmp > 0 && tmp < 1) - tmp = pow(tmp, vi->screen_inverse); - - is_hi = floor(outmax * tmp + vi->maxout_total); - - if (is_hi > outmax) - is_hi = outmax; - - if (!(od < is_lo || od > is_hi)) - { - if (encoded_error < vi->outlog) - return i; - - pass = "within input precision limits:\n"; - } - - /* One last chance. If this is an alpha channel and the 16to8 - * option has been used and 'inaccurate' scaling is used then the - * bit reduction is obtained by simply using the top 8 bits of the - * value. - * - * This is only done for older libpng versions when the 'inaccurate' - * (chop) method of scaling was used. - */ -# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED -# if PNG_LIBPNG_VER < 10504 - /* This may be required for other components in the future, - * but at present the presence of gamma correction effectively - * prevents the errors in the component scaling (I don't quite - * understand why, but since it's better this way I care not - * to ask, JB 20110419.) - */ - if (pass == 0 && alpha < 0 && vi->scale16 && vi->sbit > 8 && - vi->sbit + vi->isbit_shift == 16) - { - tmp = ((id >> 8) - .5)/255; - - if (tmp > 0) - { - is_lo = ceil(outmax * tmp - vi->maxout_total); - if (is_lo < 0) is_lo = 0; - } - - else - is_lo = 0; - - tmp = ((id >> 8) + .5)/255; - - if (tmp < 1) - { - is_hi = floor(outmax * tmp + vi->maxout_total); - if (is_hi > outmax) is_hi = outmax; - } - - else - is_hi = outmax; - - if (!(od < is_lo || od > is_hi)) - { - if (encoded_error < vi->outlog) - return i; - - pass = "within 8 bit limits:\n"; - } - } -# endif -# endif - } - else /* !use_input_precision */ - is_lo = es_lo, is_hi = es_hi; - - /* Attempt to output a meaningful error/warning message: the message - * output depends on the background/composite operation being performed - * because this changes what parameters were actually used above. - */ - { - size_t pos = 0; - /* Need either 1/255 or 1/65535 precision here; 3 or 6 decimal - * places. Just use outmax to work out which. - */ - int precision = (outmax >= 1000 ? 6 : 3); - int use_input=1, use_background=0, do_compose=0; - char msg[256]; - - if (pass != 0) - pos = safecat(msg, sizeof msg, pos, "\n\t"); - - /* Set up the various flags, the output_is_encoded flag above - * is also used below. do_compose is just a double check. - */ - switch (do_background) - { -# ifdef PNG_READ_BACKGROUND_SUPPORTED - case PNG_BACKGROUND_GAMMA_SCREEN: - case PNG_BACKGROUND_GAMMA_FILE: - case PNG_BACKGROUND_GAMMA_UNIQUE: - use_background = (alpha >= 0 && alpha < 1); -# endif -# ifdef PNG_READ_ALPHA_MODE_SUPPORTED - /* FALLTHROUGH */ - case ALPHA_MODE_OFFSET + PNG_ALPHA_STANDARD: - case ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN: - case ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED: -# endif /* ALPHA_MODE_SUPPORTED */ - do_compose = (alpha > 0 && alpha < 1); - use_input = (alpha != 0); - break; - - default: - break; - } - - /* Check the 'compose' flag */ - if (compose != do_compose) - png_error(vi->pp, "internal error (compose)"); - - /* 'name' is the component name */ - pos = safecat(msg, sizeof msg, pos, name); - pos = safecat(msg, sizeof msg, pos, "("); - pos = safecatn(msg, sizeof msg, pos, id); - if (use_input || pass != 0/*logging*/) - { - if (isbit != id) - { - /* sBIT has reduced the precision of the input: */ - pos = safecat(msg, sizeof msg, pos, ", sbit("); - pos = safecatn(msg, sizeof msg, pos, vi->sbit); - pos = safecat(msg, sizeof msg, pos, "): "); - pos = safecatn(msg, sizeof msg, pos, isbit); - } - pos = safecat(msg, sizeof msg, pos, "/"); - /* The output is either "id/max" or "id sbit(sbit): isbit/max" */ - pos = safecatn(msg, sizeof msg, pos, vi->sbit_max); - } - pos = safecat(msg, sizeof msg, pos, ")"); - - /* A component may have been multiplied (in linear space) by the - * alpha value, 'compose' says whether this is relevant. - */ - if (compose || pass != 0) - { - /* If any form of composition is being done report our - * calculated linear value here (the code above doesn't record - * the input value before composition is performed, so what - * gets reported is the value after composition.) - */ - if (use_input || pass != 0) - { - if (vi->file_inverse > 0) - { - pos = safecat(msg, sizeof msg, pos, "^"); - pos = safecatd(msg, sizeof msg, pos, vi->file_inverse, 2); - } - - else - pos = safecat(msg, sizeof msg, pos, "[linear]"); - - pos = safecat(msg, sizeof msg, pos, "*(alpha)"); - pos = safecatd(msg, sizeof msg, pos, alpha, precision); - } - - /* Now record the *linear* background value if it was used - * (this function is not passed the original, non-linear, - * value but it is contained in the test name.) - */ - if (use_background) - { - pos = safecat(msg, sizeof msg, pos, use_input ? "+" : " "); - pos = safecat(msg, sizeof msg, pos, "(background)"); - pos = safecatd(msg, sizeof msg, pos, background, precision); - pos = safecat(msg, sizeof msg, pos, "*"); - pos = safecatd(msg, sizeof msg, pos, 1-alpha, precision); - } - } - - /* Report the calculated value (input_sample) and the linearized - * libpng value (output) unless this is just a component gamma - * correction. - */ - if (compose || alpha < 0 || pass != 0) - { - pos = safecat(msg, sizeof msg, pos, - pass != 0 ? " =\n\t" : " = "); - pos = safecatd(msg, sizeof msg, pos, input_sample, precision); - pos = safecat(msg, sizeof msg, pos, " (libpng: "); - pos = safecatd(msg, sizeof msg, pos, output, precision); - pos = safecat(msg, sizeof msg, pos, ")"); - - /* Finally report the output gamma encoding, if any. */ - if (output_is_encoded) - { - pos = safecat(msg, sizeof msg, pos, " ^"); - pos = safecatd(msg, sizeof msg, pos, vi->screen_inverse, 2); - pos = safecat(msg, sizeof msg, pos, "(to screen) ="); - } - - else - pos = safecat(msg, sizeof msg, pos, " [screen is linear] ="); - } - - if ((!compose && alpha >= 0) || pass != 0) - { - if (pass != 0) /* logging */ - pos = safecat(msg, sizeof msg, pos, "\n\t[overall:"); - - /* This is the non-composition case, the internal linear - * values are irrelevant (though the log below will reveal - * them.) Output a much shorter warning/error message and report - * the overall gamma correction. - */ - if (vi->gamma_correction > 0) - { - pos = safecat(msg, sizeof msg, pos, " ^"); - pos = safecatd(msg, sizeof msg, pos, vi->gamma_correction, 2); - pos = safecat(msg, sizeof msg, pos, "(gamma correction) ="); - } - - else - pos = safecat(msg, sizeof msg, pos, - " [no gamma correction] ="); - - if (pass != 0) - pos = safecat(msg, sizeof msg, pos, "]"); - } - - /* This is our calculated encoded_sample which should (but does - * not) match od: - */ - pos = safecat(msg, sizeof msg, pos, pass != 0 ? "\n\t" : " "); - pos = safecatd(msg, sizeof msg, pos, is_lo, 1); - pos = safecat(msg, sizeof msg, pos, " < "); - pos = safecatd(msg, sizeof msg, pos, encoded_sample, 1); - pos = safecat(msg, sizeof msg, pos, " (libpng: "); - pos = safecatn(msg, sizeof msg, pos, od); - pos = safecat(msg, sizeof msg, pos, ")"); - pos = safecat(msg, sizeof msg, pos, "/"); - pos = safecatn(msg, sizeof msg, pos, outmax); - pos = safecat(msg, sizeof msg, pos, " < "); - pos = safecatd(msg, sizeof msg, pos, is_hi, 1); - - if (pass == 0) /* The error condition */ - { -# ifdef PNG_WARNINGS_SUPPORTED - png_warning(vi->pp, msg); -# else - store_warning(vi->pp, msg); -# endif - } - - else /* logging this value */ - store_verbose(&vi->dp->pm->this, vi->pp, pass, msg); - } - } - } - - return i; -} - -static void -gamma_image_validate(gamma_display *dp, png_const_structp pp, - png_infop pi) -{ - /* Get some constants derived from the input and output file formats: */ - const png_store* const ps = dp->this.ps; - png_byte in_ct = dp->this.colour_type; - png_byte in_bd = dp->this.bit_depth; - png_uint_32 w = dp->this.w; - png_uint_32 h = dp->this.h; - const size_t cbRow = dp->this.cbRow; - png_byte out_ct = png_get_color_type(pp, pi); - png_byte out_bd = png_get_bit_depth(pp, pi); - - /* There are three sources of error, firstly the quantization in the - * file encoding, determined by sbit and/or the file depth, secondly - * the output (screen) gamma and thirdly the output file encoding. - * - * Since this API receives the screen and file gamma in double - * precision it is possible to calculate an exact answer given an input - * pixel value. Therefore we assume that the *input* value is exact - - * sample/maxsample - calculate the corresponding gamma corrected - * output to the limits of double precision arithmetic and compare with - * what libpng returns. - * - * Since the library must quantize the output to 8 or 16 bits there is - * a fundamental limit on the accuracy of the output of +/-.5 - this - * quantization limit is included in addition to the other limits - * specified by the parameters to the API. (Effectively, add .5 - * everywhere.) - * - * The behavior of the 'sbit' parameter is defined by section 12.5 - * (sample depth scaling) of the PNG spec. That section forces the - * decoder to assume that the PNG values have been scaled if sBIT is - * present: - * - * png-sample = floor( input-sample * (max-out/max-in) + .5); - * - * This means that only a subset of the possible PNG values should - * appear in the input. However, the spec allows the encoder to use a - * variety of approximations to the above and doesn't require any - * restriction of the values produced. - * - * Nevertheless the spec requires that the upper 'sBIT' bits of the - * value stored in a PNG file be the original sample bits. - * Consequently the code below simply scales the top sbit bits by - * (1<this.palette; - int in_is_transparent = dp->this.is_transparent; - int process_tRNS; - int out_npalette = -1; - int out_is_transparent = 0; /* Just refers to the palette case */ - store_palette out_palette; - validate_info vi; - - /* Check for row overwrite errors */ - store_image_check(dp->this.ps, pp, 0); - - /* Supply the input and output sample depths here - 8 for an indexed image, - * otherwise the bit depth. - */ - init_validate_info(&vi, dp, pp, in_ct==3?8:in_bd, out_ct==3?8:out_bd); - - processing = (vi.gamma_correction > 0 && !dp->threshold_test) - || in_bd != out_bd || in_ct != out_ct || vi.do_background; - process_tRNS = dp->this.has_tRNS && vi.do_background; - - /* TODO: FIX THIS: MAJOR BUG! If the transformations all happen inside - * the palette there is no way of finding out, because libpng fails to - * update the palette on png_read_update_info. Indeed, libpng doesn't - * even do the required work until much later, when it doesn't have any - * info pointer. Oops. For the moment 'processing' is turned off if - * out_ct is palette. - */ - if (in_ct == 3 && out_ct == 3) - processing = 0; - - if (processing && out_ct == 3) - out_is_transparent = read_palette(out_palette, &out_npalette, pp, pi); - - for (y=0; ythis.palette[in_index].alpha : - sample(std, in_ct, in_bd, x, samples_per_pixel, 0, 0); - - unsigned int output_alpha = 65536 /* as a flag value */; - - if (out_ct == 3) - { - if (out_is_transparent) - output_alpha = out_palette[out_index].alpha; - } - - else if ((out_ct & PNG_COLOR_MASK_ALPHA) != 0) - output_alpha = sample(pRow, out_ct, out_bd, x, - samples_per_pixel, 0, 0); - - if (output_alpha != 65536) - alpha = gamma_component_validate("alpha", &vi, input_alpha, - output_alpha, -1/*alpha*/, 0/*background*/); - - else /* no alpha in output */ - { - /* This is a copy of the calculation of 'i' above in order to - * have the alpha value to use in the background calculation. - */ - alpha = input_alpha >> vi.isbit_shift; - alpha /= vi.sbit_max; - } - } - - else if (process_tRNS) - { - /* alpha needs to be set appropriately for this pixel, it is - * currently 1 and needs to be 0 for an input pixel which matches - * the values in tRNS. - */ - switch (in_ct) - { - case 0: /* gray */ - if (sample(std, in_ct, in_bd, x, 0, 0, 0) == - dp->this.transparent.red) - alpha = 0; - break; - - case 2: /* RGB */ - if (sample(std, in_ct, in_bd, x, 0, 0, 0) == - dp->this.transparent.red && - sample(std, in_ct, in_bd, x, 1, 0, 0) == - dp->this.transparent.green && - sample(std, in_ct, in_bd, x, 2, 0, 0) == - dp->this.transparent.blue) - alpha = 0; - break; - - default: - break; - } - } - - /* Handle grayscale or RGB components. */ - if ((in_ct & PNG_COLOR_MASK_COLOR) == 0) /* grayscale */ - (void)gamma_component_validate("gray", &vi, - sample(std, in_ct, in_bd, x, 0, 0, 0), - sample(pRow, out_ct, out_bd, x, 0, 0, 0), - alpha/*component*/, vi.background_red); - else /* RGB or palette */ - { - (void)gamma_component_validate("red", &vi, - in_ct == 3 ? in_palette[in_index].red : - sample(std, in_ct, in_bd, x, 0, 0, 0), - out_ct == 3 ? out_palette[out_index].red : - sample(pRow, out_ct, out_bd, x, 0, 0, 0), - alpha/*component*/, vi.background_red); - - (void)gamma_component_validate("green", &vi, - in_ct == 3 ? in_palette[in_index].green : - sample(std, in_ct, in_bd, x, 1, 0, 0), - out_ct == 3 ? out_palette[out_index].green : - sample(pRow, out_ct, out_bd, x, 1, 0, 0), - alpha/*component*/, vi.background_green); - - (void)gamma_component_validate("blue", &vi, - in_ct == 3 ? in_palette[in_index].blue : - sample(std, in_ct, in_bd, x, 2, 0, 0), - out_ct == 3 ? out_palette[out_index].blue : - sample(pRow, out_ct, out_bd, x, 2, 0, 0), - alpha/*component*/, vi.background_blue); - } - } - } - - else if (memcmp(std, pRow, cbRow) != 0) - { - char msg[64]; - - /* No transform is expected on the threshold tests. */ - sprintf(msg, "gamma: below threshold row %lu changed", - (unsigned long)y); - - png_error(pp, msg); - } - } /* row (y) loop */ - - dp->this.ps->validated = 1; -} - -static void PNGCBAPI -gamma_end(png_structp ppIn, png_infop pi) -{ - png_const_structp pp = ppIn; - gamma_display *dp = voidcast(gamma_display*, png_get_progressive_ptr(pp)); - - if (!dp->this.speed) - gamma_image_validate(dp, pp, pi); - else - dp->this.ps->validated = 1; -} - -/* A single test run checking a gamma transformation. - * - * maxabs: maximum absolute error as a fraction - * maxout: maximum output error in the output units - * maxpc: maximum percentage error (as a percentage) - */ -static void -gamma_test(png_modifier *pmIn, png_byte colour_typeIn, - png_byte bit_depthIn, int palette_numberIn, - int interlace_typeIn, - const double file_gammaIn, const double screen_gammaIn, - png_byte sbitIn, int threshold_testIn, - const char *name, - int use_input_precisionIn, int scale16In, - int expand16In, int do_backgroundIn, - const png_color_16 *bkgd_colorIn, double bkgd_gammaIn) -{ - gamma_display d; - context(&pmIn->this, fault); - - gamma_display_init(&d, pmIn, FILEID(colour_typeIn, bit_depthIn, - palette_numberIn, interlace_typeIn, 0, 0, 0), - file_gammaIn, screen_gammaIn, sbitIn, - threshold_testIn, use_input_precisionIn, scale16In, - expand16In, do_backgroundIn, bkgd_colorIn, bkgd_gammaIn); - - Try - { - png_structp pp; - png_infop pi; - gama_modification gama_mod; - srgb_modification srgb_mod; - sbit_modification sbit_mod; - - /* For the moment don't use the png_modifier support here. */ - d.pm->encoding_counter = 0; - modifier_set_encoding(d.pm); /* Just resets everything */ - d.pm->current_gamma = d.file_gamma; - - /* Make an appropriate modifier to set the PNG file gamma to the - * given gamma value and the sBIT chunk to the given precision. - */ - d.pm->modifications = NULL; - gama_modification_init(&gama_mod, d.pm, d.file_gamma); - srgb_modification_init(&srgb_mod, d.pm, 127 /*delete*/); - if (d.sbit > 0) - sbit_modification_init(&sbit_mod, d.pm, d.sbit); - - modification_reset(d.pm->modifications); - - /* Get a png_struct for reading the image. */ - pp = set_modifier_for_read(d.pm, &pi, d.this.id, name); - standard_palette_init(&d.this); - - /* Introduce the correct read function. */ - if (d.pm->this.progressive) - { - /* Share the row function with the standard implementation. */ - png_set_progressive_read_fn(pp, &d, gamma_info, progressive_row, - gamma_end); - - /* Now feed data into the reader until we reach the end: */ - modifier_progressive_read(d.pm, pp, pi); - } - else - { - /* modifier_read expects a png_modifier* */ - png_set_read_fn(pp, d.pm, modifier_read); - - /* Check the header values: */ - png_read_info(pp, pi); - - /* Process the 'info' requirements. Only one image is generated */ - gamma_info_imp(&d, pp, pi); - - sequential_row(&d.this, pp, pi, -1, 0); - - if (!d.this.speed) - gamma_image_validate(&d, pp, pi); - else - d.this.ps->validated = 1; - } - - modifier_reset(d.pm); - - if (d.pm->log && !d.threshold_test && !d.this.speed) - fprintf(stderr, "%d bit %s %s: max error %f (%.2g, %2g%%)\n", - d.this.bit_depth, colour_types[d.this.colour_type], name, - d.maxerrout, d.maxerrabs, 100*d.maxerrpc); - - /* Log the summary values too. */ - if (d.this.colour_type == 0 || d.this.colour_type == 4) - { - switch (d.this.bit_depth) - { - case 1: - break; - - case 2: - if (d.maxerrout > d.pm->error_gray_2) - d.pm->error_gray_2 = d.maxerrout; - - break; - - case 4: - if (d.maxerrout > d.pm->error_gray_4) - d.pm->error_gray_4 = d.maxerrout; - - break; - - case 8: - if (d.maxerrout > d.pm->error_gray_8) - d.pm->error_gray_8 = d.maxerrout; - - break; - - case 16: - if (d.maxerrout > d.pm->error_gray_16) - d.pm->error_gray_16 = d.maxerrout; - - break; - - default: - png_error(pp, "bad bit depth (internal: 1)"); - } - } - - else if (d.this.colour_type == 2 || d.this.colour_type == 6) - { - switch (d.this.bit_depth) - { - case 8: - - if (d.maxerrout > d.pm->error_color_8) - d.pm->error_color_8 = d.maxerrout; - - break; - - case 16: - - if (d.maxerrout > d.pm->error_color_16) - d.pm->error_color_16 = d.maxerrout; - - break; - - default: - png_error(pp, "bad bit depth (internal: 2)"); - } - } - - else if (d.this.colour_type == 3) - { - if (d.maxerrout > d.pm->error_indexed) - d.pm->error_indexed = d.maxerrout; - } - } - - Catch(fault) - modifier_reset(voidcast(png_modifier*,(void*)fault)); -} - -static void gamma_threshold_test(png_modifier *pm, png_byte colour_type, - png_byte bit_depth, int interlace_type, double file_gamma, - double screen_gamma) -{ - size_t pos = 0; - char name[64]; - pos = safecat(name, sizeof name, pos, "threshold "); - pos = safecatd(name, sizeof name, pos, file_gamma, 3); - pos = safecat(name, sizeof name, pos, "/"); - pos = safecatd(name, sizeof name, pos, screen_gamma, 3); - - (void)gamma_test(pm, colour_type, bit_depth, 0/*palette*/, interlace_type, - file_gamma, screen_gamma, 0/*sBIT*/, 1/*threshold test*/, name, - 0 /*no input precision*/, - 0 /*no scale16*/, 0 /*no expand16*/, 0 /*no background*/, 0 /*hence*/, - 0 /*no background gamma*/); -} - -static void -perform_gamma_threshold_tests(png_modifier *pm) -{ - png_byte colour_type = 0; - png_byte bit_depth = 0; - unsigned int palette_number = 0; - - /* Don't test more than one instance of each palette - it's pointless, in - * fact this test is somewhat excessive since libpng doesn't make this - * decision based on colour type or bit depth! - * - * CHANGED: now test two palettes and, as a side effect, images with and - * without tRNS. - */ - while (next_format(&colour_type, &bit_depth, &palette_number, - pm->test_lbg_gamma_threshold, pm->test_tRNS)) - if (palette_number < 2) - { - double test_gamma = 1.0; - while (test_gamma >= .4) - { - /* There's little point testing the interlacing vs non-interlacing, - * but this can be set from the command line. - */ - gamma_threshold_test(pm, colour_type, bit_depth, pm->interlace_type, - test_gamma, 1/test_gamma); - test_gamma *= .95; - } - - /* And a special test for sRGB */ - gamma_threshold_test(pm, colour_type, bit_depth, pm->interlace_type, - .45455, 2.2); - - if (fail(pm)) - return; - } -} - -static void gamma_transform_test(png_modifier *pm, - png_byte colour_type, png_byte bit_depth, - int palette_number, - int interlace_type, const double file_gamma, - const double screen_gamma, png_byte sbit, - int use_input_precision, int scale16) -{ - size_t pos = 0; - char name[64]; - - if (sbit != bit_depth && sbit != 0) - { - pos = safecat(name, sizeof name, pos, "sbit("); - pos = safecatn(name, sizeof name, pos, sbit); - pos = safecat(name, sizeof name, pos, ") "); - } - - else - pos = safecat(name, sizeof name, pos, "gamma "); - - if (scale16) - pos = safecat(name, sizeof name, pos, "16to8 "); - - pos = safecatd(name, sizeof name, pos, file_gamma, 3); - pos = safecat(name, sizeof name, pos, "->"); - pos = safecatd(name, sizeof name, pos, screen_gamma, 3); - - gamma_test(pm, colour_type, bit_depth, palette_number, interlace_type, - file_gamma, screen_gamma, sbit, 0, name, use_input_precision, - scale16, pm->test_gamma_expand16, 0 , 0, 0); -} - -static void perform_gamma_transform_tests(png_modifier *pm) -{ - png_byte colour_type = 0; - png_byte bit_depth = 0; - unsigned int palette_number = 0; - - while (next_format(&colour_type, &bit_depth, &palette_number, - pm->test_lbg_gamma_transform, pm->test_tRNS)) - { - unsigned int i, j; - - for (i=0; ingamma_tests; ++i) for (j=0; jngamma_tests; ++j) - if (i != j) - { - gamma_transform_test(pm, colour_type, bit_depth, palette_number, - pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], 0/*sBIT*/, - pm->use_input_precision, 0 /*do not scale16*/); - - if (fail(pm)) - return; - } - } -} - -static void perform_gamma_sbit_tests(png_modifier *pm) -{ - png_byte sbit; - - /* The only interesting cases are colour and grayscale, alpha is ignored here - * for overall speed. Only bit depths where sbit is less than the bit depth - * are tested. - */ - for (sbit=pm->sbitlow; sbit<(1<test_lbg_gamma_sbit, pm->test_tRNS)) - if ((colour_type & PNG_COLOR_MASK_ALPHA) == 0 && - ((colour_type == 3 && sbit < 8) || - (colour_type != 3 && sbit < bit_depth))) - { - unsigned int i; - - for (i=0; ingamma_tests; ++i) - { - unsigned int j; - - for (j=0; jngamma_tests; ++j) if (i != j) - { - gamma_transform_test(pm, colour_type, bit_depth, npalette, - pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], - sbit, pm->use_input_precision_sbit, 0 /*scale16*/); - - if (fail(pm)) - return; - } - } - } - } -} - -/* Note that this requires a 16 bit source image but produces 8 bit output, so - * we only need the 16bit write support, but the 16 bit images are only - * generated if DO_16BIT is defined. - */ -#ifdef DO_16BIT -static void perform_gamma_scale16_tests(png_modifier *pm) -{ -# ifndef PNG_MAX_GAMMA_8 -# define PNG_MAX_GAMMA_8 11 -# endif -# if defined PNG_MAX_GAMMA_8 || PNG_LIBPNG_VER < 10700 -# define SBIT_16_TO_8 PNG_MAX_GAMMA_8 -# else -# define SBIT_16_TO_8 16 -# endif - /* Include the alpha cases here. Note that sbit matches the internal value - * used by the library - otherwise we will get spurious errors from the - * internal sbit style approximation. - * - * The threshold test is here because otherwise the 16 to 8 conversion will - * proceed *without* gamma correction, and the tests above will fail (but not - * by much) - this could be fixed, it only appears with the -g option. - */ - unsigned int i, j; - for (i=0; ingamma_tests; ++i) - { - for (j=0; jngamma_tests; ++j) - { - if (i != j && - fabs(pm->gammas[j]/pm->gammas[i]-1) >= PNG_GAMMA_THRESHOLD) - { - gamma_transform_test(pm, 0, 16, 0, pm->interlace_type, - 1/pm->gammas[i], pm->gammas[j], SBIT_16_TO_8, - pm->use_input_precision_16to8, 1 /*scale16*/); - - if (fail(pm)) - return; - - gamma_transform_test(pm, 2, 16, 0, pm->interlace_type, - 1/pm->gammas[i], pm->gammas[j], SBIT_16_TO_8, - pm->use_input_precision_16to8, 1 /*scale16*/); - - if (fail(pm)) - return; - - gamma_transform_test(pm, 4, 16, 0, pm->interlace_type, - 1/pm->gammas[i], pm->gammas[j], SBIT_16_TO_8, - pm->use_input_precision_16to8, 1 /*scale16*/); - - if (fail(pm)) - return; - - gamma_transform_test(pm, 6, 16, 0, pm->interlace_type, - 1/pm->gammas[i], pm->gammas[j], SBIT_16_TO_8, - pm->use_input_precision_16to8, 1 /*scale16*/); - - if (fail(pm)) - return; - } - } - } -} -#endif /* 16 to 8 bit conversion */ - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ - defined(PNG_READ_ALPHA_MODE_SUPPORTED) -static void gamma_composition_test(png_modifier *pm, - png_byte colour_type, png_byte bit_depth, - int palette_number, - int interlace_type, const double file_gamma, - const double screen_gamma, - int use_input_precision, int do_background, - int expand_16) -{ - size_t pos = 0; - png_const_charp base; - double bg; - char name[128]; - png_color_16 background; - - /* Make up a name and get an appropriate background gamma value. */ - switch (do_background) - { - default: - base = ""; - bg = 4; /* should not be used */ - break; - case PNG_BACKGROUND_GAMMA_SCREEN: - base = " bckg(Screen):"; - bg = 1/screen_gamma; - break; - case PNG_BACKGROUND_GAMMA_FILE: - base = " bckg(File):"; - bg = file_gamma; - break; - case PNG_BACKGROUND_GAMMA_UNIQUE: - base = " bckg(Unique):"; - /* This tests the handling of a unique value, the math is such that the - * value tends to be <1, but is neither screen nor file (even if they - * match!) - */ - bg = (file_gamma + screen_gamma) / 3; - break; -#ifdef PNG_READ_ALPHA_MODE_SUPPORTED - case ALPHA_MODE_OFFSET + PNG_ALPHA_PNG: - base = " alpha(PNG)"; - bg = 4; /* should not be used */ - break; - case ALPHA_MODE_OFFSET + PNG_ALPHA_STANDARD: - base = " alpha(Porter-Duff)"; - bg = 4; /* should not be used */ - break; - case ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED: - base = " alpha(Optimized)"; - bg = 4; /* should not be used */ - break; - case ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN: - base = " alpha(Broken)"; - bg = 4; /* should not be used */ - break; -#endif - } - - /* Use random background values - the background is always presented in the - * output space (8 or 16 bit components). - */ - if (expand_16 || bit_depth == 16) - { - png_uint_32 r = random_32(); - - background.red = (png_uint_16)r; - background.green = (png_uint_16)(r >> 16); - r = random_32(); - background.blue = (png_uint_16)r; - background.gray = (png_uint_16)(r >> 16); - - /* In earlier libpng versions, those where DIGITIZE is set, any background - * gamma correction in the expand16 case was done using 8-bit gamma - * correction tables, resulting in larger errors. To cope with those - * cases use a 16-bit background value which will handle this gamma - * correction. - */ -# if DIGITIZE - if (expand_16 && (do_background == PNG_BACKGROUND_GAMMA_UNIQUE || - do_background == PNG_BACKGROUND_GAMMA_FILE) && - fabs(bg*screen_gamma-1) > PNG_GAMMA_THRESHOLD) - { - /* The background values will be looked up in an 8-bit table to do - * the gamma correction, so only select values which are an exact - * match for the 8-bit table entries: - */ - background.red = (png_uint_16)((background.red >> 8) * 257); - background.green = (png_uint_16)((background.green >> 8) * 257); - background.blue = (png_uint_16)((background.blue >> 8) * 257); - background.gray = (png_uint_16)((background.gray >> 8) * 257); - } -# endif - } - - else /* 8 bit colors */ - { - png_uint_32 r = random_32(); - - background.red = (png_byte)r; - background.green = (png_byte)(r >> 8); - background.blue = (png_byte)(r >> 16); - background.gray = (png_byte)(r >> 24); - } - - background.index = 193; /* rgb(193,193,193) to detect errors */ - - if (!(colour_type & PNG_COLOR_MASK_COLOR)) - { - /* Because, currently, png_set_background is always called with - * 'need_expand' false in this case and because the gamma test itself - * doesn't cause an expand to 8-bit for lower bit depths the colour must - * be reduced to the correct range. - */ - if (bit_depth < 8) - background.gray &= (png_uint_16)((1U << bit_depth)-1); - - /* Grayscale input, we do not convert to RGB (TBD), so we must set the - * background to gray - else libpng seems to fail. - */ - background.red = background.green = background.blue = background.gray; - } - - pos = safecat(name, sizeof name, pos, "gamma "); - pos = safecatd(name, sizeof name, pos, file_gamma, 3); - pos = safecat(name, sizeof name, pos, "->"); - pos = safecatd(name, sizeof name, pos, screen_gamma, 3); - - pos = safecat(name, sizeof name, pos, base); - if (do_background < ALPHA_MODE_OFFSET) - { - /* Include the background color and gamma in the name: */ - pos = safecat(name, sizeof name, pos, "("); - /* This assumes no expand gray->rgb - the current code won't handle that! - */ - if (colour_type & PNG_COLOR_MASK_COLOR) - { - pos = safecatn(name, sizeof name, pos, background.red); - pos = safecat(name, sizeof name, pos, ","); - pos = safecatn(name, sizeof name, pos, background.green); - pos = safecat(name, sizeof name, pos, ","); - pos = safecatn(name, sizeof name, pos, background.blue); - } - else - pos = safecatn(name, sizeof name, pos, background.gray); - pos = safecat(name, sizeof name, pos, ")^"); - pos = safecatd(name, sizeof name, pos, bg, 3); - } - - gamma_test(pm, colour_type, bit_depth, palette_number, interlace_type, - file_gamma, screen_gamma, 0/*sBIT*/, 0, name, use_input_precision, - 0/*strip 16*/, expand_16, do_background, &background, bg); -} - - -static void -perform_gamma_composition_tests(png_modifier *pm, int do_background, - int expand_16) -{ - png_byte colour_type = 0; - png_byte bit_depth = 0; - unsigned int palette_number = 0; - - /* Skip the non-alpha cases - there is no setting of a transparency colour at - * present. - * - * TODO: incorrect; the palette case sets tRNS and, now RGB and gray do, - * however the palette case fails miserably so is commented out below. - */ - while (next_format(&colour_type, &bit_depth, &palette_number, - pm->test_lbg_gamma_composition, pm->test_tRNS)) - if ((colour_type & PNG_COLOR_MASK_ALPHA) != 0 -#if 0 /* TODO: FIXME */ - /*TODO: FIXME: this should work */ - || colour_type == 3 -#endif - || (colour_type != 3 && palette_number != 0)) - { - unsigned int i, j; - - /* Don't skip the i==j case here - it's relevant. */ - for (i=0; ingamma_tests; ++i) for (j=0; jngamma_tests; ++j) - { - gamma_composition_test(pm, colour_type, bit_depth, palette_number, - pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], - pm->use_input_precision, do_background, expand_16); - - if (fail(pm)) - return; - } - } -} -#endif /* READ_BACKGROUND || READ_ALPHA_MODE */ - -static void -init_gamma_errors(png_modifier *pm) -{ - /* Use -1 to catch tests that were not actually run */ - pm->error_gray_2 = pm->error_gray_4 = pm->error_gray_8 = -1.; - pm->error_color_8 = -1.; - pm->error_indexed = -1.; - pm->error_gray_16 = pm->error_color_16 = -1.; -} - -static void -print_one(const char *leader, double err) -{ - if (err != -1.) - printf(" %s %.5f\n", leader, err); -} - -static void -summarize_gamma_errors(png_modifier *pm, png_const_charp who, int low_bit_depth, - int indexed) -{ - fflush(stderr); - - if (who) - printf("\nGamma correction with %s:\n", who); - - else - printf("\nBasic gamma correction:\n"); - - if (low_bit_depth) - { - print_one(" 2 bit gray: ", pm->error_gray_2); - print_one(" 4 bit gray: ", pm->error_gray_4); - print_one(" 8 bit gray: ", pm->error_gray_8); - print_one(" 8 bit color:", pm->error_color_8); - if (indexed) - print_one(" indexed: ", pm->error_indexed); - } - - print_one("16 bit gray: ", pm->error_gray_16); - print_one("16 bit color:", pm->error_color_16); - - fflush(stdout); -} - -static void -perform_gamma_test(png_modifier *pm, int summary) -{ - /*TODO: remove this*/ - /* Save certain values for the temporary overrides below. */ - unsigned int calculations_use_input_precision = - pm->calculations_use_input_precision; -# ifdef PNG_READ_BACKGROUND_SUPPORTED - double maxout8 = pm->maxout8; -# endif - - /* First some arbitrary no-transform tests: */ - if (!pm->this.speed && pm->test_gamma_threshold) - { - perform_gamma_threshold_tests(pm); - - if (fail(pm)) - return; - } - - /* Now some real transforms. */ - if (pm->test_gamma_transform) - { - if (summary) - { - fflush(stderr); - printf("Gamma correction error summary\n\n"); - printf("The printed value is the maximum error in the pixel values\n"); - printf("calculated by the libpng gamma correction code. The error\n"); - printf("is calculated as the difference between the output pixel\n"); - printf("value (always an integer) and the ideal value from the\n"); - printf("libpng specification (typically not an integer).\n\n"); - - printf("Expect this value to be less than .5 for 8 bit formats,\n"); - printf("less than 1 for formats with fewer than 8 bits and a small\n"); - printf("number (typically less than 5) for the 16 bit formats.\n"); - printf("For performance reasons the value for 16 bit formats\n"); - printf("increases when the image file includes an sBIT chunk.\n"); - fflush(stdout); - } - - init_gamma_errors(pm); - /*TODO: remove this. Necessary because the current libpng - * implementation works in 8 bits: - */ - if (pm->test_gamma_expand16) - pm->calculations_use_input_precision = 1; - perform_gamma_transform_tests(pm); - if (!calculations_use_input_precision) - pm->calculations_use_input_precision = 0; - - if (summary) - summarize_gamma_errors(pm, 0/*who*/, 1/*low bit depth*/, 1/*indexed*/); - - if (fail(pm)) - return; - } - - /* The sbit tests produce much larger errors: */ - if (pm->test_gamma_sbit) - { - init_gamma_errors(pm); - perform_gamma_sbit_tests(pm); - - if (summary) - summarize_gamma_errors(pm, "sBIT", pm->sbitlow < 8U, 1/*indexed*/); - - if (fail(pm)) - return; - } - -#ifdef DO_16BIT /* Should be READ_16BIT_SUPPORTED */ - if (pm->test_gamma_scale16) - { - /* The 16 to 8 bit strip operations: */ - init_gamma_errors(pm); - perform_gamma_scale16_tests(pm); - - if (summary) - { - fflush(stderr); - printf("\nGamma correction with 16 to 8 bit reduction:\n"); - printf(" 16 bit gray: %.5f\n", pm->error_gray_16); - printf(" 16 bit color: %.5f\n", pm->error_color_16); - fflush(stdout); - } - - if (fail(pm)) - return; - } -#endif - -#ifdef PNG_READ_BACKGROUND_SUPPORTED - if (pm->test_gamma_background) - { - init_gamma_errors(pm); - - /*TODO: remove this. Necessary because the current libpng - * implementation works in 8 bits: - */ - if (pm->test_gamma_expand16) - { - pm->calculations_use_input_precision = 1; - pm->maxout8 = .499; /* because the 16 bit background is smashed */ - } - perform_gamma_composition_tests(pm, PNG_BACKGROUND_GAMMA_UNIQUE, - pm->test_gamma_expand16); - if (!calculations_use_input_precision) - pm->calculations_use_input_precision = 0; - pm->maxout8 = maxout8; - - if (summary) - summarize_gamma_errors(pm, "background", 1, 0/*indexed*/); - - if (fail(pm)) - return; - } -#endif - -#ifdef PNG_READ_ALPHA_MODE_SUPPORTED - if (pm->test_gamma_alpha_mode) - { - int do_background; - - init_gamma_errors(pm); - - /*TODO: remove this. Necessary because the current libpng - * implementation works in 8 bits: - */ - if (pm->test_gamma_expand16) - pm->calculations_use_input_precision = 1; - for (do_background = ALPHA_MODE_OFFSET + PNG_ALPHA_STANDARD; - do_background <= ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN && !fail(pm); - ++do_background) - perform_gamma_composition_tests(pm, do_background, - pm->test_gamma_expand16); - if (!calculations_use_input_precision) - pm->calculations_use_input_precision = 0; - - if (summary) - summarize_gamma_errors(pm, "alpha mode", 1, 0/*indexed*/); - - if (fail(pm)) - return; - } -#endif -} -#endif /* PNG_READ_GAMMA_SUPPORTED */ -#endif /* PNG_READ_SUPPORTED */ - -/* INTERLACE MACRO VALIDATION */ -/* This is copied verbatim from the specification, it is simply the pass - * number in which each pixel in each 8x8 tile appears. The array must - * be indexed adam7[y][x] and notice that the pass numbers are based at - * 1, not 0 - the base libpng uses. - */ -static const -png_byte adam7[8][8] = -{ - { 1,6,4,6,2,6,4,6 }, - { 7,7,7,7,7,7,7,7 }, - { 5,6,5,6,5,6,5,6 }, - { 7,7,7,7,7,7,7,7 }, - { 3,6,4,6,3,6,4,6 }, - { 7,7,7,7,7,7,7,7 }, - { 5,6,5,6,5,6,5,6 }, - { 7,7,7,7,7,7,7,7 } -}; - -/* This routine validates all the interlace support macros in png.h for - * a variety of valid PNG widths and heights. It uses a number of similarly - * named internal routines that feed off the above array. - */ -static png_uint_32 -png_pass_start_row(int pass) -{ - int x, y; - ++pass; - for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass) - return y; - return 0xf; -} - -static png_uint_32 -png_pass_start_col(int pass) -{ - int x, y; - ++pass; - for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass) - return x; - return 0xf; -} - -static int -png_pass_row_shift(int pass) -{ - int x, y, base=(-1), inc=8; - ++pass; - for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass) - { - if (base == (-1)) - base = y; - else if (base == y) - {} - else if (inc == y-base) - base=y; - else if (inc == 8) - inc = y-base, base=y; - else if (inc != y-base) - return 0xff; /* error - more than one 'inc' value! */ - } - - if (base == (-1)) return 0xfe; /* error - no row in pass! */ - - /* The shift is always 1, 2 or 3 - no pass has all the rows! */ - switch (inc) - { -case 2: return 1; -case 4: return 2; -case 8: return 3; -default: break; - } - - /* error - unrecognized 'inc' */ - return (inc << 8) + 0xfd; -} - -static int -png_pass_col_shift(int pass) -{ - int x, y, base=(-1), inc=8; - ++pass; - for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass) - { - if (base == (-1)) - base = x; - else if (base == x) - {} - else if (inc == x-base) - base=x; - else if (inc == 8) - inc = x-base, base=x; - else if (inc != x-base) - return 0xff; /* error - more than one 'inc' value! */ - } - - if (base == (-1)) return 0xfe; /* error - no row in pass! */ - - /* The shift is always 1, 2 or 3 - no pass has all the rows! */ - switch (inc) - { -case 1: return 0; /* pass 7 has all the columns */ -case 2: return 1; -case 4: return 2; -case 8: return 3; -default: break; - } - - /* error - unrecognized 'inc' */ - return (inc << 8) + 0xfd; -} - -static png_uint_32 -png_row_from_pass_row(png_uint_32 yIn, int pass) -{ - /* By examination of the array: */ - switch (pass) - { -case 0: return yIn * 8; -case 1: return yIn * 8; -case 2: return yIn * 8 + 4; -case 3: return yIn * 4; -case 4: return yIn * 4 + 2; -case 5: return yIn * 2; -case 6: return yIn * 2 + 1; -default: break; - } - - return 0xff; /* bad pass number */ -} - -static png_uint_32 -png_col_from_pass_col(png_uint_32 xIn, int pass) -{ - /* By examination of the array: */ - switch (pass) - { -case 0: return xIn * 8; -case 1: return xIn * 8 + 4; -case 2: return xIn * 4; -case 3: return xIn * 4 + 2; -case 4: return xIn * 2; -case 5: return xIn * 2 + 1; -case 6: return xIn; -default: break; - } - - return 0xff; /* bad pass number */ -} - -static int -png_row_in_interlace_pass(png_uint_32 y, int pass) -{ - /* Is row 'y' in pass 'pass'? */ - int x; - y &= 7; - ++pass; - for (x=0; x<8; ++x) if (adam7[y][x] == pass) - return 1; - - return 0; -} - -static int -png_col_in_interlace_pass(png_uint_32 x, int pass) -{ - /* Is column 'x' in pass 'pass'? */ - int y; - x &= 7; - ++pass; - for (y=0; y<8; ++y) if (adam7[y][x] == pass) - return 1; - - return 0; -} - -static png_uint_32 -png_pass_rows(png_uint_32 height, int pass) -{ - png_uint_32 tiles = height>>3; - png_uint_32 rows = 0; - unsigned int x, y; - - height &= 7; - ++pass; - for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass) - { - rows += tiles; - if (y < height) ++rows; - break; /* i.e. break the 'x', column, loop. */ - } - - return rows; -} - -static png_uint_32 -png_pass_cols(png_uint_32 width, int pass) -{ - png_uint_32 tiles = width>>3; - png_uint_32 cols = 0; - unsigned int x, y; - - width &= 7; - ++pass; - for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass) - { - cols += tiles; - if (x < width) ++cols; - break; /* i.e. break the 'y', row, loop. */ - } - - return cols; -} - -static void -perform_interlace_macro_validation(void) -{ - /* The macros to validate, first those that depend only on pass: - * - * PNG_PASS_START_ROW(pass) - * PNG_PASS_START_COL(pass) - * PNG_PASS_ROW_SHIFT(pass) - * PNG_PASS_COL_SHIFT(pass) - */ - int pass; - - for (pass=0; pass<7; ++pass) - { - png_uint_32 m, f, v; - - m = PNG_PASS_START_ROW(pass); - f = png_pass_start_row(pass); - if (m != f) - { - fprintf(stderr, "PNG_PASS_START_ROW(%d) = %u != %x\n", pass, m, f); - exit(99); - } - - m = PNG_PASS_START_COL(pass); - f = png_pass_start_col(pass); - if (m != f) - { - fprintf(stderr, "PNG_PASS_START_COL(%d) = %u != %x\n", pass, m, f); - exit(99); - } - - m = PNG_PASS_ROW_SHIFT(pass); - f = png_pass_row_shift(pass); - if (m != f) - { - fprintf(stderr, "PNG_PASS_ROW_SHIFT(%d) = %u != %x\n", pass, m, f); - exit(99); - } - - m = PNG_PASS_COL_SHIFT(pass); - f = png_pass_col_shift(pass); - if (m != f) - { - fprintf(stderr, "PNG_PASS_COL_SHIFT(%d) = %u != %x\n", pass, m, f); - exit(99); - } - - /* Macros that depend on the image or sub-image height too: - * - * PNG_PASS_ROWS(height, pass) - * PNG_PASS_COLS(width, pass) - * PNG_ROW_FROM_PASS_ROW(yIn, pass) - * PNG_COL_FROM_PASS_COL(xIn, pass) - * PNG_ROW_IN_INTERLACE_PASS(y, pass) - * PNG_COL_IN_INTERLACE_PASS(x, pass) - */ - for (v=0;;) - { - /* The first two tests overflow if the pass row or column is outside - * the possible range for a 32-bit result. In fact the values should - * never be outside the range for a 31-bit result, but checking for 32 - * bits here ensures that if an app uses a bogus pass row or column - * (just so long as it fits in a 32 bit integer) it won't get a - * possibly dangerous overflow. - */ - /* First the base 0 stuff: */ - if (v < png_pass_rows(0xFFFFFFFFU, pass)) - { - m = PNG_ROW_FROM_PASS_ROW(v, pass); - f = png_row_from_pass_row(v, pass); - if (m != f) - { - fprintf(stderr, "PNG_ROW_FROM_PASS_ROW(%u, %d) = %u != %x\n", - v, pass, m, f); - exit(99); - } - } - - if (v < png_pass_cols(0xFFFFFFFFU, pass)) - { - m = PNG_COL_FROM_PASS_COL(v, pass); - f = png_col_from_pass_col(v, pass); - if (m != f) - { - fprintf(stderr, "PNG_COL_FROM_PASS_COL(%u, %d) = %u != %x\n", - v, pass, m, f); - exit(99); - } - } - - m = PNG_ROW_IN_INTERLACE_PASS(v, pass); - f = png_row_in_interlace_pass(v, pass); - if (m != f) - { - fprintf(stderr, "PNG_ROW_IN_INTERLACE_PASS(%u, %d) = %u != %x\n", - v, pass, m, f); - exit(99); - } - - m = PNG_COL_IN_INTERLACE_PASS(v, pass); - f = png_col_in_interlace_pass(v, pass); - if (m != f) - { - fprintf(stderr, "PNG_COL_IN_INTERLACE_PASS(%u, %d) = %u != %x\n", - v, pass, m, f); - exit(99); - } - - /* Then the base 1 stuff: */ - ++v; - m = PNG_PASS_ROWS(v, pass); - f = png_pass_rows(v, pass); - if (m != f) - { - fprintf(stderr, "PNG_PASS_ROWS(%u, %d) = %u != %x\n", - v, pass, m, f); - exit(99); - } - - m = PNG_PASS_COLS(v, pass); - f = png_pass_cols(v, pass); - if (m != f) - { - fprintf(stderr, "PNG_PASS_COLS(%u, %d) = %u != %x\n", - v, pass, m, f); - exit(99); - } - - /* Move to the next v - the stepping algorithm starts skipping - * values above 1024. - */ - if (v > 1024) - { - if (v == PNG_UINT_31_MAX) - break; - - v = (v << 1) ^ v; - if (v >= PNG_UINT_31_MAX) - v = PNG_UINT_31_MAX-1; - } - } - } -} - -/* Test color encodings. These values are back-calculated from the published - * chromaticities. The values are accurate to about 14 decimal places; 15 are - * given. These values are much more accurate than the ones given in the spec, - * which typically don't exceed 4 decimal places. This allows testing of the - * libpng code to its theoretical accuracy of 4 decimal places. (If pngvalid - * used the published errors the 'slack' permitted would have to be +/-.5E-4 or - * more.) - * - * The png_modifier code assumes that encodings[0] is sRGB and treats it - * specially: do not change the first entry in this list! - */ -static const color_encoding test_encodings[] = -{ -/* sRGB: must be first in this list! */ -/*gamma:*/ { 1/2.2, -/*red: */ { 0.412390799265959, 0.212639005871510, 0.019330818715592 }, -/*green:*/ { 0.357584339383878, 0.715168678767756, 0.119194779794626 }, -/*blue: */ { 0.180480788401834, 0.072192315360734, 0.950532152249660} }, -/* Kodak ProPhoto (wide gamut) */ -/*gamma:*/ { 1/1.6 /*approximate: uses 1.8 power law compared to sRGB 2.4*/, -/*red: */ { 0.797760489672303, 0.288071128229293, 0.000000000000000 }, -/*green:*/ { 0.135185837175740, 0.711843217810102, 0.000000000000000 }, -/*blue: */ { 0.031349349581525, 0.000085653960605, 0.825104602510460} }, -/* Adobe RGB (1998) */ -/*gamma:*/ { 1/(2+51./256), -/*red: */ { 0.576669042910131, 0.297344975250536, 0.027031361386412 }, -/*green:*/ { 0.185558237906546, 0.627363566255466, 0.070688852535827 }, -/*blue: */ { 0.188228646234995, 0.075291458493998, 0.991337536837639} }, -/* Adobe Wide Gamut RGB */ -/*gamma:*/ { 1/(2+51./256), -/*red: */ { 0.716500716779386, 0.258728243040113, 0.000000000000000 }, -/*green:*/ { 0.101020574397477, 0.724682314948566, 0.051211818965388 }, -/*blue: */ { 0.146774385252705, 0.016589442011321, 0.773892783545073} }, -/* Fake encoding which selects just the green channel */ -/*gamma:*/ { 1.45/2.2, /* the 'Mac' gamma */ -/*red: */ { 0.716500716779386, 0.000000000000000, 0.000000000000000 }, -/*green:*/ { 0.101020574397477, 1.000000000000000, 0.051211818965388 }, -/*blue: */ { 0.146774385252705, 0.000000000000000, 0.773892783545073} }, -}; - -/* signal handler - * - * This attempts to trap signals and escape without crashing. It needs a - * context pointer so that it can throw an exception (call longjmp) to recover - * from the condition; this is handled by making the png_modifier used by 'main' - * into a global variable. - */ -static png_modifier pm; - -static void signal_handler(int signum) -{ - - size_t pos = 0; - char msg[64]; - - pos = safecat(msg, sizeof msg, pos, "caught signal: "); - - switch (signum) - { - case SIGABRT: - pos = safecat(msg, sizeof msg, pos, "abort"); - break; - - case SIGFPE: - pos = safecat(msg, sizeof msg, pos, "floating point exception"); - break; - - case SIGILL: - pos = safecat(msg, sizeof msg, pos, "illegal instruction"); - break; - - case SIGINT: - pos = safecat(msg, sizeof msg, pos, "interrupt"); - break; - - case SIGSEGV: - pos = safecat(msg, sizeof msg, pos, "invalid memory access"); - break; - - case SIGTERM: - pos = safecat(msg, sizeof msg, pos, "termination request"); - break; - - default: - pos = safecat(msg, sizeof msg, pos, "unknown "); - pos = safecatn(msg, sizeof msg, pos, signum); - break; - } - - store_log(&pm.this, NULL/*png_structp*/, msg, 1/*error*/); - - /* And finally throw an exception so we can keep going, unless this is - * SIGTERM in which case stop now. - */ - if (signum != SIGTERM) - { - struct exception_context *the_exception_context = - &pm.this.exception_context; - - Throw &pm.this; - } - - else - exit(1); -} - -/* main program */ -int main(int argc, char **argv) -{ - int summary = 1; /* Print the error summary at the end */ - int memstats = 0; /* Print memory statistics at the end */ - - /* Create the given output file on success: */ - const char *touch = NULL; - - /* This is an array of standard gamma values (believe it or not I've seen - * every one of these mentioned somewhere.) - * - * In the following list the most useful values are first! - */ - static double - gammas[]={2.2, 1.0, 2.2/1.45, 1.8, 1.5, 2.4, 2.5, 2.62, 2.9}; - - /* This records the command and arguments: */ - size_t cp = 0; - char command[1024]; - - anon_context(&pm.this); - - gnu_volatile(summary) - gnu_volatile(memstats) - gnu_volatile(touch) - - /* Add appropriate signal handlers, just the ANSI specified ones: */ - signal(SIGABRT, signal_handler); - signal(SIGFPE, signal_handler); - signal(SIGILL, signal_handler); - signal(SIGINT, signal_handler); - signal(SIGSEGV, signal_handler); - signal(SIGTERM, signal_handler); - -#ifdef HAVE_FEENABLEEXCEPT - /* Only required to enable FP exceptions on platforms where they start off - * disabled; this is not necessary but if it is not done pngvalid will likely - * end up ignoring FP conditions that other platforms fault. - */ - feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); -#endif - - modifier_init(&pm); - - /* Preallocate the image buffer, because we know how big it needs to be, - * note that, for testing purposes, it is deliberately mis-aligned by tag - * bytes either side. All rows have an additional five bytes of padding for - * overwrite checking. - */ - store_ensure_image(&pm.this, NULL, 2, TRANSFORM_ROWMAX, TRANSFORM_HEIGHTMAX); - - /* Don't give argv[0], it's normally some horrible libtool string: */ - cp = safecat(command, sizeof command, cp, "pngvalid"); - - /* Default to error on warning: */ - pm.this.treat_warnings_as_errors = 1; - - /* Default assume_16_bit_calculations appropriately; this tells the checking - * code that 16-bit arithmetic is used for 8-bit samples when it would make a - * difference. - */ - pm.assume_16_bit_calculations = PNG_LIBPNG_VER >= 10700; - - /* Currently 16 bit expansion happens at the end of the pipeline, so the - * calculations are done in the input bit depth not the output. - * - * TODO: fix this - */ - pm.calculations_use_input_precision = 1U; - - /* Store the test gammas */ - pm.gammas = gammas; - pm.ngammas = ARRAY_SIZE(gammas); - pm.ngamma_tests = 0; /* default to off */ - - /* Low bit depth gray images don't do well in the gamma tests, until - * this is fixed turn them off for some gamma cases: - */ -# ifdef PNG_WRITE_tRNS_SUPPORTED - pm.test_tRNS = 1; -# endif - pm.test_lbg = PNG_LIBPNG_VER >= 10600; - pm.test_lbg_gamma_threshold = 1; - pm.test_lbg_gamma_transform = PNG_LIBPNG_VER >= 10600; - pm.test_lbg_gamma_sbit = 1; - pm.test_lbg_gamma_composition = PNG_LIBPNG_VER >= 10700; - - /* And the test encodings */ - pm.encodings = test_encodings; - pm.nencodings = ARRAY_SIZE(test_encodings); - -# if PNG_LIBPNG_VER < 10700 - pm.sbitlow = 8U; /* because libpng doesn't do sBIT below 8! */ -# else - pm.sbitlow = 1U; -# endif - - /* The following allows results to pass if they correspond to anything in the - * transformed range [input-.5,input+.5]; this is is required because of the - * way libpng treates the 16_TO_8 flag when building the gamma tables in - * releases up to 1.6.0. - * - * TODO: review this - */ - pm.use_input_precision_16to8 = 1U; - pm.use_input_precision_sbit = 1U; /* because libpng now rounds sBIT */ - - /* Some default values (set the behavior for 'make check' here). - * These values simply control the maximum error permitted in the gamma - * transformations. The practical limits for human perception are described - * below (the setting for maxpc16), however for 8 bit encodings it isn't - * possible to meet the accepted capabilities of human vision - i.e. 8 bit - * images can never be good enough, regardless of encoding. - */ - pm.maxout8 = .1; /* Arithmetic error in *encoded* value */ - pm.maxabs8 = .00005; /* 1/20000 */ - pm.maxcalc8 = 1./255; /* +/-1 in 8 bits for compose errors */ - pm.maxpc8 = .499; /* I.e., .499% fractional error */ - pm.maxout16 = .499; /* Error in *encoded* value */ - pm.maxabs16 = .00005;/* 1/20000 */ - pm.maxcalc16 =1./65535;/* +/-1 in 16 bits for compose errors */ -# if PNG_LIBPNG_VER < 10700 - pm.maxcalcG = 1./((1<38149 by the following: - */ - pm.maxpc16 = .005; /* I.e., 1/200% - 1/20000 */ - - /* Now parse the command line options. */ - while (--argc >= 1) - { - int catmore = 0; /* Set if the argument has an argument. */ - - /* Record each argument for posterity: */ - cp = safecat(command, sizeof command, cp, " "); - cp = safecat(command, sizeof command, cp, *++argv); - - if (strcmp(*argv, "-v") == 0) - pm.this.verbose = 1; - - else if (strcmp(*argv, "-l") == 0) - pm.log = 1; - - else if (strcmp(*argv, "-q") == 0) - summary = pm.this.verbose = pm.log = 0; - - else if (strcmp(*argv, "-w") == 0 || - strcmp(*argv, "--strict") == 0) - pm.this.treat_warnings_as_errors = 1; /* NOTE: this is the default! */ - - else if (strcmp(*argv, "--nostrict") == 0) - pm.this.treat_warnings_as_errors = 0; - - else if (strcmp(*argv, "--speed") == 0) - pm.this.speed = 1, pm.ngamma_tests = pm.ngammas, pm.test_standard = 0, - summary = 0; - - else if (strcmp(*argv, "--memory") == 0) - memstats = 1; - - else if (strcmp(*argv, "--size") == 0) - pm.test_size = 1; - - else if (strcmp(*argv, "--nosize") == 0) - pm.test_size = 0; - - else if (strcmp(*argv, "--standard") == 0) - pm.test_standard = 1; - - else if (strcmp(*argv, "--nostandard") == 0) - pm.test_standard = 0; - - else if (strcmp(*argv, "--transform") == 0) - pm.test_transform = 1; - - else if (strcmp(*argv, "--notransform") == 0) - pm.test_transform = 0; - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED - else if (strncmp(*argv, "--transform-disable=", - sizeof "--transform-disable") == 0) - { - pm.test_transform = 1; - transform_disable(*argv + sizeof "--transform-disable"); - } - - else if (strncmp(*argv, "--transform-enable=", - sizeof "--transform-enable") == 0) - { - pm.test_transform = 1; - transform_enable(*argv + sizeof "--transform-enable"); - } -#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ - - else if (strcmp(*argv, "--gamma") == 0) - { - /* Just do two gamma tests here (2.2 and linear) for speed: */ - pm.ngamma_tests = 2U; - pm.test_gamma_threshold = 1; - pm.test_gamma_transform = 1; - pm.test_gamma_sbit = 1; - pm.test_gamma_scale16 = 1; - pm.test_gamma_background = 1; /* composition */ - pm.test_gamma_alpha_mode = 1; - } - - else if (strcmp(*argv, "--nogamma") == 0) - pm.ngamma_tests = 0; - - else if (strcmp(*argv, "--gamma-threshold") == 0) - pm.ngamma_tests = 2U, pm.test_gamma_threshold = 1; - - else if (strcmp(*argv, "--nogamma-threshold") == 0) - pm.test_gamma_threshold = 0; - - else if (strcmp(*argv, "--gamma-transform") == 0) - pm.ngamma_tests = 2U, pm.test_gamma_transform = 1; - - else if (strcmp(*argv, "--nogamma-transform") == 0) - pm.test_gamma_transform = 0; - - else if (strcmp(*argv, "--gamma-sbit") == 0) - pm.ngamma_tests = 2U, pm.test_gamma_sbit = 1; - - else if (strcmp(*argv, "--nogamma-sbit") == 0) - pm.test_gamma_sbit = 0; - - else if (strcmp(*argv, "--gamma-16-to-8") == 0) - pm.ngamma_tests = 2U, pm.test_gamma_scale16 = 1; - - else if (strcmp(*argv, "--nogamma-16-to-8") == 0) - pm.test_gamma_scale16 = 0; - - else if (strcmp(*argv, "--gamma-background") == 0) - pm.ngamma_tests = 2U, pm.test_gamma_background = 1; - - else if (strcmp(*argv, "--nogamma-background") == 0) - pm.test_gamma_background = 0; - - else if (strcmp(*argv, "--gamma-alpha-mode") == 0) - pm.ngamma_tests = 2U, pm.test_gamma_alpha_mode = 1; - - else if (strcmp(*argv, "--nogamma-alpha-mode") == 0) - pm.test_gamma_alpha_mode = 0; - - else if (strcmp(*argv, "--expand16") == 0) - pm.test_gamma_expand16 = 1; - - else if (strcmp(*argv, "--noexpand16") == 0) - pm.test_gamma_expand16 = 0; - - else if (strcmp(*argv, "--low-depth-gray") == 0) - pm.test_lbg = pm.test_lbg_gamma_threshold = - pm.test_lbg_gamma_transform = pm.test_lbg_gamma_sbit = - pm.test_lbg_gamma_composition = 1; - - else if (strcmp(*argv, "--nolow-depth-gray") == 0) - pm.test_lbg = pm.test_lbg_gamma_threshold = - pm.test_lbg_gamma_transform = pm.test_lbg_gamma_sbit = - pm.test_lbg_gamma_composition = 0; - -# ifdef PNG_WRITE_tRNS_SUPPORTED - else if (strcmp(*argv, "--tRNS") == 0) - pm.test_tRNS = 1; -# endif - - else if (strcmp(*argv, "--notRNS") == 0) - pm.test_tRNS = 0; - - else if (strcmp(*argv, "--more-gammas") == 0) - pm.ngamma_tests = 3U; - - else if (strcmp(*argv, "--all-gammas") == 0) - pm.ngamma_tests = pm.ngammas; - - else if (strcmp(*argv, "--progressive-read") == 0) - pm.this.progressive = 1; - - else if (strcmp(*argv, "--use-update-info") == 0) - ++pm.use_update_info; /* Can call multiple times */ - - else if (strcmp(*argv, "--interlace") == 0) - { -# if CAN_WRITE_INTERLACE - pm.interlace_type = PNG_INTERLACE_ADAM7; -# else /* !CAN_WRITE_INTERLACE */ - fprintf(stderr, "pngvalid: no write interlace support\n"); - return SKIP; -# endif /* !CAN_WRITE_INTERLACE */ - } - - else if (strcmp(*argv, "--use-input-precision") == 0) - pm.use_input_precision = 1U; - - else if (strcmp(*argv, "--use-calculation-precision") == 0) - pm.use_input_precision = 0; - - else if (strcmp(*argv, "--calculations-use-input-precision") == 0) - pm.calculations_use_input_precision = 1U; - - else if (strcmp(*argv, "--assume-16-bit-calculations") == 0) - pm.assume_16_bit_calculations = 1U; - - else if (strcmp(*argv, "--calculations-follow-bit-depth") == 0) - pm.calculations_use_input_precision = - pm.assume_16_bit_calculations = 0; - - else if (strcmp(*argv, "--exhaustive") == 0) - pm.test_exhaustive = 1; - - else if (argc > 1 && strcmp(*argv, "--sbitlow") == 0) - --argc, pm.sbitlow = (png_byte)atoi(*++argv), catmore = 1; - - else if (argc > 1 && strcmp(*argv, "--touch") == 0) - --argc, touch = *++argv, catmore = 1; - - else if (argc > 1 && strncmp(*argv, "--max", 5) == 0) - { - --argc; - - if (strcmp(5+*argv, "abs8") == 0) - pm.maxabs8 = atof(*++argv); - - else if (strcmp(5+*argv, "abs16") == 0) - pm.maxabs16 = atof(*++argv); - - else if (strcmp(5+*argv, "calc8") == 0) - pm.maxcalc8 = atof(*++argv); - - else if (strcmp(5+*argv, "calc16") == 0) - pm.maxcalc16 = atof(*++argv); - - else if (strcmp(5+*argv, "out8") == 0) - pm.maxout8 = atof(*++argv); - - else if (strcmp(5+*argv, "out16") == 0) - pm.maxout16 = atof(*++argv); - - else if (strcmp(5+*argv, "pc8") == 0) - pm.maxpc8 = atof(*++argv); - - else if (strcmp(5+*argv, "pc16") == 0) - pm.maxpc16 = atof(*++argv); - - else - { - fprintf(stderr, "pngvalid: %s: unknown 'max' option\n", *argv); - exit(99); - } - - catmore = 1; - } - - else if (strcmp(*argv, "--log8") == 0) - --argc, pm.log8 = atof(*++argv), catmore = 1; - - else if (strcmp(*argv, "--log16") == 0) - --argc, pm.log16 = atof(*++argv), catmore = 1; - -#ifdef PNG_SET_OPTION_SUPPORTED - else if (strncmp(*argv, "--option=", 9) == 0) - { - /* Syntax of the argument is %s\n",strtime(&tartime),fname); - if (action == TGZ_EXTRACT) - { - makedir(fname); - push_attr(&attributes,fname,tarmode,tartime); - } - break; - case REGTYPE: - case AREGTYPE: - remaining = getoct(buffer.header.size,12); - if (remaining == -1) - { - action = TGZ_INVALID; - break; - } - if (action == TGZ_LIST) - printf(" %s %9d %s\n",strtime(&tartime),remaining,fname); - else if (action == TGZ_EXTRACT) - { - if (matchname(arg,argc,argv,fname)) - { - outfile = fopen(fname,"wb"); - if (outfile == NULL) { - /* try creating directory */ - char *p = strrchr(fname, '/'); - if (p != NULL) { - *p = '\0'; - makedir(fname); - *p = '/'; - outfile = fopen(fname,"wb"); - } - } - if (outfile != NULL) - printf("Extracting %s\n",fname); - else - fprintf(stderr, "%s: Couldn't create %s",prog,fname); - } - else - outfile = NULL; - } - getheader = 0; - break; - case GNUTYPE_LONGLINK: - case GNUTYPE_LONGNAME: - remaining = getoct(buffer.header.size,12); - if (remaining < 0 || remaining >= BLOCKSIZE) - { - action = TGZ_INVALID; - break; - } - len = gzread(in, fname, BLOCKSIZE); - if (len < 0) - error(gzerror(in, &err)); - if (fname[BLOCKSIZE-1] != 0 || (int)strlen(fname) > remaining) - { - action = TGZ_INVALID; - break; - } - getheader = 2; - break; - default: - if (action == TGZ_LIST) - printf(" %s <---> %s\n",strtime(&tartime),fname); - break; - } - } - else - { - unsigned int bytes = (remaining > BLOCKSIZE) ? BLOCKSIZE : remaining; - - if (outfile != NULL) - { - if (fwrite(&buffer,sizeof(char),bytes,outfile) != bytes) - { - fprintf(stderr, - "%s: Error writing %s -- skipping\n",prog,fname); - fclose(outfile); - outfile = NULL; - remove(fname); - } - } - remaining -= bytes; - } - - if (remaining == 0) - { - getheader = 1; - if (outfile != NULL) - { - fclose(outfile); - outfile = NULL; - if (action != TGZ_INVALID) - push_attr(&attributes,fname,tarmode,tartime); - } - } - - /* - * Abandon if errors are found - */ - if (action == TGZ_INVALID) - { - error("broken archive"); - break; - } - } - - /* - * Restore file modes and time stamps - */ - restore_attr(&attributes); - - if (gzclose(in) != Z_OK) - error("failed gzclose"); - - return 0; -} - - -/* ============================================================ */ - -void help(int exitval) -{ - printf("untgz version 0.2.1\n" - " using zlib version %s\n\n", - zlibVersion()); - printf("Usage: untgz file.tgz extract all files\n" - " untgz file.tgz fname ... extract selected files\n" - " untgz -l file.tgz list archive contents\n" - " untgz -h display this help\n"); - exit(exitval); -} - -void error(const char *msg) -{ - fprintf(stderr, "%s: %s\n", prog, msg); - exit(1); -} - - -/* ============================================================ */ - -#if defined(WIN32) && defined(__GNUC__) -int _CRT_glob = 0; /* disable argument globbing in MinGW */ -#endif - -int main(int argc,char **argv) -{ - int action = TGZ_EXTRACT; - int arg = 1; - char *TGZfile; - gzFile *f; - - prog = strrchr(argv[0],'\\'); - if (prog == NULL) - { - prog = strrchr(argv[0],'/'); - if (prog == NULL) - { - prog = strrchr(argv[0],':'); - if (prog == NULL) - prog = argv[0]; - else - prog++; - } - else - prog++; - } - else - prog++; - - if (argc == 1) - help(0); - - if (strcmp(argv[arg],"-l") == 0) - { - action = TGZ_LIST; - if (argc == ++arg) - help(0); - } - else if (strcmp(argv[arg],"-h") == 0) - { - help(0); - } - - if ((TGZfile = TGZfname(argv[arg])) == NULL) - TGZnotfound(argv[arg]); - - ++arg; - if ((action == TGZ_LIST) && (arg != argc)) - help(1); - -/* - * Process the TGZ file - */ - switch(action) - { - case TGZ_LIST: - case TGZ_EXTRACT: - f = gzopen(TGZfile,"rb"); - if (f == NULL) - { - fprintf(stderr,"%s: Couldn't gzopen %s\n",prog,TGZfile); - return 1; - } - exit(tar(f, action, arg, argc, argv)); - break; - - default: - error("Unknown option"); - exit(1); - } - - return 0; -} diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/readme.txt b/thirdparty/zlib-1.2.12/contrib/vstudio/readme.txt deleted file mode 100644 index d396d43..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/readme.txt +++ /dev/null @@ -1,78 +0,0 @@ -Building instructions for the DLL versions of Zlib 1.2.12 -======================================================== - -This directory contains projects that build zlib and minizip using -Microsoft Visual C++ 9.0/10.0. - -You don't need to build these projects yourself. You can download the -binaries from: - http://www.winimage.com/zLibDll - -More information can be found at this site. - - - - - -Build instructions for Visual Studio 2008 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Compile assembly code (with Visual Studio Command Prompt) by running: - bld_ml64.bat (in contrib\masmx64) - bld_ml32.bat (in contrib\masmx86) -- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008 -- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32" - -Build instructions for Visual Studio 2010 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010 - -Build instructions for Visual Studio 2012 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc11\zlibvc.sln with Microsoft Visual C++ 2012 - -Build instructions for Visual Studio 2013 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc12\zlibvc.sln with Microsoft Visual C++ 2013 - -Build instructions for Visual Studio 2015 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc14\zlibvc.sln with Microsoft Visual C++ 2015 - - -Important ---------- -- To use zlibwapi.dll in your application, you must define the - macro ZLIB_WINAPI when compiling your application's source files. - - -Additional notes ----------------- -- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built - by Gilles Vollant from the zlib 1.1.x sources, and distributed at - http://www.winimage.com/zLibDll - It uses the WINAPI calling convention for the exported functions, and - includes the minizip functionality. If your application needs that - particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll. - -- The new DLL was renamed because there exist several incompatible - versions of zlib.dll on the Internet. - -- There is also an official DLL build of zlib, named zlib1.dll. This one - is exporting the functions using the CDECL convention. See the file - win32\DLL_FAQ.txt found in this zlib distribution. - -- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol - has a slightly different effect. To avoid compatibility problems, do - not define it here. - - -Gilles Vollant -info@winimage.com - -Visual Studio 2013 and 2015 Projects from Sean Hunt -seandhunt_7@yahoo.com diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/miniunz.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/miniunz.vcxproj deleted file mode 100644 index 74e15c9..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/miniunz.vcxproj +++ /dev/null @@ -1,310 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694382A} - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - true - false - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - false - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - true - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - true - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - false - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - $(IntDir) - Level3 - EditAndContinue - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/miniunz.vcxproj.filters b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/miniunz.vcxproj.filters deleted file mode 100644 index 0b2a3de..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/miniunz.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {048af943-022b-4db6-beeb-a54c34774ee2} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - {c1d600d2-888f-4aea-b73e-8b0dd9befa0c} - h;hpp;hxx;hm;inl;inc - - - {0844199a-966b-4f19-81db-1e0125e141b9} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/minizip.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/minizip.vcxproj deleted file mode 100644 index 917e156..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/minizip.vcxproj +++ /dev/null @@ -1,307 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - true - false - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - false - x64\$(Configuration)\ - x64\$(Configuration)\ - true - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - true - false - x64\$(Configuration)\ - x64\$(Configuration)\ - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - $(IntDir) - Level3 - EditAndContinue - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/minizip.vcxproj.filters b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/minizip.vcxproj.filters deleted file mode 100644 index dd73cd3..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/minizip.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {c0419b40-bf50-40da-b153-ff74215b79de} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - {bb87b070-735b-478e-92ce-7383abb2f36c} - h;hpp;hxx;hm;inl;inc - - - {f46ab6a6-548f-43cb-ae96-681abb5bd5db} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlib.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlib.vcxproj deleted file mode 100644 index 9088d17..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlib.vcxproj +++ /dev/null @@ -1,420 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} - testzlib - Win32Proj - - - - Application - MultiByte - true - - - Application - MultiByte - true - - - Application - MultiByte - - - Application - MultiByte - true - - - Application - MultiByte - true - - - Application - MultiByte - - - Application - true - - - Application - true - - - Application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - true - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - true - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - EditAndContinue - - - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlib.vcxproj.filters b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlib.vcxproj.filters deleted file mode 100644 index 249daa8..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlib.vcxproj.filters +++ /dev/null @@ -1,58 +0,0 @@ - - - - - {c1f6a2e3-5da5-4955-8653-310d3efe05a9} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - {c2aaffdc-2c95-4d6f-8466-4bec5890af2c} - h;hpp;hxx;hm;inl;inc - - - {c274fe07-05f2-461c-964b-f6341e4e7eb5} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlibdll.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlibdll.vcxproj deleted file mode 100644 index bcb08ff..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlibdll.vcxproj +++ /dev/null @@ -1,310 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694366A} - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - true - false - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - false - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - true - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - true - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - false - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - $(IntDir) - Level3 - EditAndContinue - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlibdll.vcxproj.filters b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlibdll.vcxproj.filters deleted file mode 100644 index 53a8693..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/testzlibdll.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {fa61a89f-93fc-4c89-b29e-36224b7592f4} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - {d4b85da0-2ba2-4934-b57f-e2584e3848ee} - h;hpp;hxx;hm;inl;inc - - - {e573e075-00bd-4a7d-bd67-a8cc9bfc5aca} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlib.rc b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlib.rc deleted file mode 100644 index 8ad25f1..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 12, 0 - PRODUCTVERSION 1, 2, 12, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.12\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibstat.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibstat.vcxproj deleted file mode 100644 index b9f2bbe..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibstat.vcxproj +++ /dev/null @@ -1,473 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} - - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDebug - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - cd ..\..\masmx86 -bld_ml32.bat - - - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - cd ..\..\masmx86 -bld_ml32.bat - - - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - cd ..\..\masmx64 -bld_ml64.bat - - - - - Itanium - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - cd ..\..\masmx64 -bld_ml64.bat - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibstat.vcxproj.filters b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibstat.vcxproj.filters deleted file mode 100644 index c8c7f7e..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibstat.vcxproj.filters +++ /dev/null @@ -1,77 +0,0 @@ - - - - - {174213f6-7f66-4ae8-a3a8-a1e0a1e6ffdd} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Source Files - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.def b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.def deleted file mode 100644 index ba09bc1..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.2 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.sln b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.sln deleted file mode 100644 index 6f6ffd5..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.sln +++ /dev/null @@ -1,135 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.vcxproj deleted file mode 100644 index 6ff9ddb..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.vcxproj +++ /dev/null @@ -1,657 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {8FD826F8-3739-44E6-8CC8-997122E53B8D} - - - - DynamicLibrary - false - true - - - DynamicLibrary - false - true - - - DynamicLibrary - false - - - DynamicLibrary - false - true - - - DynamicLibrary - false - true - - - DynamicLibrary - false - - - DynamicLibrary - false - true - - - DynamicLibrary - false - true - - - DynamicLibrary - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - true - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - true - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - true - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - zlibwapid - zlibwapi - zlibwapi - zlibwapid - zlibwapi - zlibwapi - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) - - - MultiThreadedDebug - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - EditAndContinue - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - true - .\zlibvc.def - true - true - Windows - false - - - - - cd ..\..\masmx86 -bld_ml32.bat - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - true - false - .\zlibvc.def - true - Windows - false - - - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - true - false - .\zlibvc.def - true - Windows - false - - - - - cd ..\..\masmx86 -bld_ml32.bat - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - true - .\zlibvc.def - true - true - Windows - MachineX64 - - - cd ..\..\masmx64 -bld_ml64.bat - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - true - false - .\zlibvc.def - true - Windows - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - true - false - .\zlibvc.def - true - Windows - MachineX64 - - - cd ..\..\masmx64 -bld_ml64.bat - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.vcxproj.filters b/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.vcxproj.filters deleted file mode 100644 index 180b71c..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc10/zlibvc.vcxproj.filters +++ /dev/null @@ -1,118 +0,0 @@ - - - - - {07934a85-8b61-443d-a0ee-b2eedb74f3cd} - cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 - - - {1d99675b-433d-4a21-9e50-ed4ab8b19762} - h;hpp;hxx;hm;inl;fi;fd - - - {431c0958-fa71-44d0-9084-2d19d100c0cc} - ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/miniunz.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/miniunz.vcxproj deleted file mode 100644 index 8f9f20b..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/miniunz.vcxproj +++ /dev/null @@ -1,314 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694382A} - Win32Proj - - - - Application - MultiByte - v110 - - - Application - Unicode - v110 - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - true - false - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - false - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - true - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - true - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - false - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/minizip.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/minizip.vcxproj deleted file mode 100644 index c93d9e6..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/minizip.vcxproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} - Win32Proj - - - - Application - MultiByte - v110 - - - Application - Unicode - v110 - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - true - false - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - false - x64\$(Configuration)\ - x64\$(Configuration)\ - true - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - true - false - x64\$(Configuration)\ - x64\$(Configuration)\ - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/testzlib.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/testzlib.vcxproj deleted file mode 100644 index 6d55954..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/testzlib.vcxproj +++ /dev/null @@ -1,426 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} - testzlib - Win32Proj - - - - Application - MultiByte - true - v110 - - - Application - MultiByte - true - v110 - - - Application - Unicode - v110 - - - Application - MultiByte - true - - - Application - MultiByte - true - - - Application - MultiByte - - - Application - true - v110 - - - Application - true - v110 - - - Application - v110 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - true - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - true - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/testzlibdll.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/testzlibdll.vcxproj deleted file mode 100644 index 9f20c78..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/testzlibdll.vcxproj +++ /dev/null @@ -1,314 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694366A} - Win32Proj - - - - Application - MultiByte - v110 - - - Application - Unicode - v110 - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - true - false - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - false - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - true - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - true - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - false - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlib.rc b/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlib.rc deleted file mode 100644 index 8ad25f1..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 12, 0 - PRODUCTVERSION 1, 2, 12, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.12\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibstat.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibstat.vcxproj deleted file mode 100644 index 806b76a..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibstat.vcxproj +++ /dev/null @@ -1,464 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} - - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - Unicode - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.def b/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.def deleted file mode 100644 index ba09bc1..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.2 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.sln b/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.sln deleted file mode 100644 index 9fcbafd..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.sln +++ /dev/null @@ -1,117 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.vcxproj deleted file mode 100644 index c65b95f..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc11/zlibvc.vcxproj +++ /dev/null @@ -1,688 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {8FD826F8-3739-44E6-8CC8-997122E53B8D} - - - - DynamicLibrary - false - true - v110 - - - DynamicLibrary - false - true - v110 - - - DynamicLibrary - false - v110 - Unicode - - - DynamicLibrary - false - true - - - DynamicLibrary - false - true - - - DynamicLibrary - false - - - DynamicLibrary - false - true - v110 - - - DynamicLibrary - false - true - v110 - - - DynamicLibrary - false - v110 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - true - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - true - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - true - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - cd ..\..\masmx86 -bld_ml32.bat - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - cd ..\..\masmx86 -bld_ml32.bat - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - cd ..\..\contrib\masmx64 -bld_ml64.bat - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - cd ..\..\masmx64 -bld_ml64.bat - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/miniunz.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/miniunz.vcxproj deleted file mode 100644 index d88ac7f..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/miniunz.vcxproj +++ /dev/null @@ -1,316 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694382A} - Win32Proj - - - - Application - MultiByte - v120 - - - Application - Unicode - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - true - false - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - false - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - true - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - true - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - false - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/minizip.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/minizip.vcxproj deleted file mode 100644 index f1f239c..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/minizip.vcxproj +++ /dev/null @@ -1,313 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} - Win32Proj - - - - Application - MultiByte - v120 - - - Application - Unicode - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - true - false - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - false - x64\$(Configuration)\ - x64\$(Configuration)\ - true - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - true - false - x64\$(Configuration)\ - x64\$(Configuration)\ - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/testzlib.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/testzlib.vcxproj deleted file mode 100644 index 64b2cbe..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/testzlib.vcxproj +++ /dev/null @@ -1,430 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} - testzlib - Win32Proj - - - - Application - MultiByte - true - v120 - - - Application - MultiByte - true - v120 - - - Application - Unicode - v120 - - - Application - MultiByte - true - v120 - - - Application - MultiByte - true - v120 - - - Application - MultiByte - v120 - - - Application - true - v120 - - - Application - true - v120 - - - Application - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - true - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - true - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - false - - - - - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/testzlibdll.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/testzlibdll.vcxproj deleted file mode 100644 index c66573a..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/testzlibdll.vcxproj +++ /dev/null @@ -1,316 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694366A} - Win32Proj - - - - Application - MultiByte - v120 - - - Application - Unicode - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - true - false - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - false - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - true - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - true - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - false - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlib.rc b/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlib.rc deleted file mode 100644 index 9475873..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 12, 0 - PRODUCTVERSION 1, 2, 12, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.12\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibstat.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibstat.vcxproj deleted file mode 100644 index 3fdee7c..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibstat.vcxproj +++ /dev/null @@ -1,467 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} - - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - Unicode - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.def b/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.def deleted file mode 100644 index ba09bc1..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.2 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.sln b/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.sln deleted file mode 100644 index dcda229..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.sln +++ /dev/null @@ -1,119 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.40629.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.vcxproj deleted file mode 100644 index ab2b6c3..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc12/zlibvc.vcxproj +++ /dev/null @@ -1,692 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {8FD826F8-3739-44E6-8CC8-997122E53B8D} - - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - v120 - Unicode - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - v120 - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - true - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - true - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - true - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - cd ..\..\masmx86 -bld_ml32.bat - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - false - - - cd ..\..\masmx86 -bld_ml32.bat - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - cd ..\..\contrib\masmx64 -bld_ml64.bat - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - cd ..\..\masmx64 -bld_ml64.bat - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/miniunz.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/miniunz.vcxproj deleted file mode 100644 index 9b5c075..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/miniunz.vcxproj +++ /dev/null @@ -1,316 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694382A} - Win32Proj - - - - Application - MultiByte - v140 - - - Application - Unicode - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - true - false - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - false - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - true - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - true - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - false - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/minizip.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/minizip.vcxproj deleted file mode 100644 index 968a410..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/minizip.vcxproj +++ /dev/null @@ -1,313 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} - Win32Proj - - - - Application - MultiByte - v140 - - - Application - Unicode - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - true - false - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - false - x64\$(Configuration)\ - x64\$(Configuration)\ - true - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - true - false - x64\$(Configuration)\ - x64\$(Configuration)\ - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/testzlib.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/testzlib.vcxproj deleted file mode 100644 index 2c37125..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/testzlib.vcxproj +++ /dev/null @@ -1,430 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} - testzlib - Win32Proj - - - - Application - MultiByte - true - v140 - - - Application - MultiByte - true - v140 - - - Application - Unicode - v140 - - - Application - MultiByte - true - v140 - - - Application - MultiByte - true - v140 - - - Application - MultiByte - v140 - - - Application - true - v140 - - - Application - true - v140 - - - Application - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - true - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - true - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - false - - - - - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/testzlibdll.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/testzlibdll.vcxproj deleted file mode 100644 index d87474d..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/testzlibdll.vcxproj +++ /dev/null @@ -1,316 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694366A} - Win32Proj - - - - Application - MultiByte - v140 - - - Application - Unicode - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - true - false - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - false - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - true - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - true - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - false - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlib.rc b/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlib.rc deleted file mode 100644 index 9475873..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 12, 0 - PRODUCTVERSION 1, 2, 12, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.12\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibstat.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibstat.vcxproj deleted file mode 100644 index 3e4b986..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibstat.vcxproj +++ /dev/null @@ -1,467 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} - - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - Unicode - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.def b/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.def deleted file mode 100644 index ba09bc1..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.2 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.sln b/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.sln deleted file mode 100644 index 6f4a107..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.sln +++ /dev/null @@ -1,119 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.vcxproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.vcxproj deleted file mode 100644 index f8f673c..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc14/zlibvc.vcxproj +++ /dev/null @@ -1,692 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {8FD826F8-3739-44E6-8CC8-997122E53B8D} - - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - v140 - Unicode - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - v140 - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - true - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - true - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - true - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - cd ..\..\masmx86 -bld_ml32.bat - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - false - - - cd ..\..\masmx86 -bld_ml32.bat - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - cd ..\..\contrib\masmx64 -bld_ml64.bat - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - cd ..\..\masmx64 -bld_ml64.bat - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/miniunz.vcproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/miniunz.vcproj deleted file mode 100644 index 7da32b9..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/miniunz.vcproj +++ /dev/null @@ -1,565 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/minizip.vcproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/minizip.vcproj deleted file mode 100644 index e57e07d..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/minizip.vcproj +++ /dev/null @@ -1,562 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/testzlib.vcproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/testzlib.vcproj deleted file mode 100644 index 9cb0bf8..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/testzlib.vcproj +++ /dev/null @@ -1,852 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/testzlibdll.vcproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/testzlibdll.vcproj deleted file mode 100644 index b1ddde0..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/testzlibdll.vcproj +++ /dev/null @@ -1,565 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlib.rc b/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlib.rc deleted file mode 100644 index 8ad25f1..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 12, 0 - PRODUCTVERSION 1, 2, 12, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.12\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibstat.vcproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibstat.vcproj deleted file mode 100644 index 61c76c7..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibstat.vcproj +++ /dev/null @@ -1,835 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.def b/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.def deleted file mode 100644 index ba09bc1..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.2 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.sln b/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.sln deleted file mode 100644 index b482967..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.sln +++ /dev/null @@ -1,144 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" - ProjectSection(ProjectDependencies) = postProject - {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" - ProjectSection(ProjectDependencies) = postProject - {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" - ProjectSection(ProjectDependencies) = postProject - {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.vcproj b/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.vcproj deleted file mode 100644 index c9a8947..0000000 --- a/thirdparty/zlib-1.2.12/contrib/vstudio/vc9/zlibvc.vcproj +++ /dev/null @@ -1,1156 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/thirdparty/zlib-1.2.12/crc32.c b/thirdparty/zlib-1.2.12/crc32.c deleted file mode 100644 index a1bdce5..0000000 --- a/thirdparty/zlib-1.2.12/crc32.c +++ /dev/null @@ -1,1116 +0,0 @@ -/* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2022 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * - * This interleaved implementation of a CRC makes use of pipelined multiple - * arithmetic-logic units, commonly found in modern CPU cores. It is due to - * Kadatch and Jenkins (2010). See doc/crc-doc.1.0.pdf in this distribution. - */ - -/* @(#) $Id$ */ - -/* - Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore - protection on the static variables used to control the first-use generation - of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should - first call get_crc_table() to initialize the tables before allowing more than - one thread to use crc32(). - - MAKECRCH can be #defined to write out crc32.h. A main() routine is also - produced, so that this one source file can be compiled to an executable. - */ - -#ifdef MAKECRCH -# include -# ifndef DYNAMIC_CRC_TABLE -# define DYNAMIC_CRC_TABLE -# endif /* !DYNAMIC_CRC_TABLE */ -#endif /* MAKECRCH */ - -#include "zutil.h" /* for Z_U4, Z_U8, z_crc_t, and FAR definitions */ - - /* - A CRC of a message is computed on N braids of words in the message, where - each word consists of W bytes (4 or 8). If N is 3, for example, then three - running sparse CRCs are calculated respectively on each braid, at these - indices in the array of words: 0, 3, 6, ..., 1, 4, 7, ..., and 2, 5, 8, ... - This is done starting at a word boundary, and continues until as many blocks - of N * W bytes as are available have been processed. The results are combined - into a single CRC at the end. For this code, N must be in the range 1..6 and - W must be 4 or 8. The upper limit on N can be increased if desired by adding - more #if blocks, extending the patterns apparent in the code. In addition, - crc32.h would need to be regenerated, if the maximum N value is increased. - - N and W are chosen empirically by benchmarking the execution time on a given - processor. The choices for N and W below were based on testing on Intel Kaby - Lake i7, AMD Ryzen 7, ARM Cortex-A57, Sparc64-VII, PowerPC POWER9, and MIPS64 - Octeon II processors. The Intel, AMD, and ARM processors were all fastest - with N=5, W=8. The Sparc, PowerPC, and MIPS64 were all fastest at N=5, W=4. - They were all tested with either gcc or clang, all using the -O3 optimization - level. Your mileage may vary. - */ - -/* Define N */ -#ifdef Z_TESTN -# define N Z_TESTN -#else -# define N 5 -#endif -#if N < 1 || N > 6 -# error N must be in 1..6 -#endif - -/* - z_crc_t must be at least 32 bits. z_word_t must be at least as long as - z_crc_t. It is assumed here that z_word_t is either 32 bits or 64 bits, and - that bytes are eight bits. - */ - -/* - Define W and the associated z_word_t type. If W is not defined, then a - braided calculation is not used, and the associated tables and code are not - compiled. - */ -#ifdef Z_TESTW -# if Z_TESTW-1 != -1 -# define W Z_TESTW -# endif -#else -# ifdef MAKECRCH -# define W 8 /* required for MAKECRCH */ -# else -# if defined(__x86_64__) || defined(__aarch64__) -# define W 8 -# else -# define W 4 -# endif -# endif -#endif -#ifdef W -# if W == 8 && defined(Z_U8) - typedef Z_U8 z_word_t; -# elif defined(Z_U4) -# undef W -# define W 4 - typedef Z_U4 z_word_t; -# else -# undef W -# endif -#endif - -/* Local functions. */ -local z_crc_t multmodp OF((z_crc_t a, z_crc_t b)); -local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); - -/* If available, use the ARM processor CRC32 instruction. */ -#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8 -# define ARMCRC32 -#endif - -#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) -/* - Swap the bytes in a z_word_t to convert between little and big endian. Any - self-respecting compiler will optimize this to a single machine byte-swap - instruction, if one is available. This assumes that word_t is either 32 bits - or 64 bits. - */ -local z_word_t byte_swap(word) - z_word_t word; -{ -# if W == 8 - return - (word & 0xff00000000000000) >> 56 | - (word & 0xff000000000000) >> 40 | - (word & 0xff0000000000) >> 24 | - (word & 0xff00000000) >> 8 | - (word & 0xff000000) << 8 | - (word & 0xff0000) << 24 | - (word & 0xff00) << 40 | - (word & 0xff) << 56; -# else /* W == 4 */ - return - (word & 0xff000000) >> 24 | - (word & 0xff0000) >> 8 | - (word & 0xff00) << 8 | - (word & 0xff) << 24; -# endif -} -#endif - -/* CRC polynomial. */ -#define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */ - -#ifdef DYNAMIC_CRC_TABLE - -local z_crc_t FAR crc_table[256]; -local z_crc_t FAR x2n_table[32]; -local void make_crc_table OF((void)); -#ifdef W - local z_word_t FAR crc_big_table[256]; - local z_crc_t FAR crc_braid_table[W][256]; - local z_word_t FAR crc_braid_big_table[W][256]; - local void braid OF((z_crc_t [][256], z_word_t [][256], int, int)); -#endif -#ifdef MAKECRCH - local void write_table OF((FILE *, const z_crc_t FAR *, int)); - local void write_table32hi OF((FILE *, const z_word_t FAR *, int)); - local void write_table64 OF((FILE *, const z_word_t FAR *, int)); -#endif /* MAKECRCH */ - -/* - Define a once() function depending on the availability of atomics. If this is - compiled with DYNAMIC_CRC_TABLE defined, and if CRCs will be computed in - multiple threads, and if atomics are not available, then get_crc_table() must - be called to initialize the tables and must return before any threads are - allowed to compute or combine CRCs. - */ - -/* Definition of once functionality. */ -typedef struct once_s once_t; -local void once OF((once_t *, void (*)(void))); - -/* Check for the availability of atomics. */ -#if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \ - !defined(__STDC_NO_ATOMICS__) - -#include - -/* Structure for once(), which must be initialized with ONCE_INIT. */ -struct once_s { - atomic_flag begun; - atomic_int done; -}; -#define ONCE_INIT {ATOMIC_FLAG_INIT, 0} - -/* - Run the provided init() function exactly once, even if multiple threads - invoke once() at the same time. The state must be a once_t initialized with - ONCE_INIT. - */ -local void once(state, init) - once_t *state; - void (*init)(void); -{ - if (!atomic_load(&state->done)) { - if (atomic_flag_test_and_set(&state->begun)) - while (!atomic_load(&state->done)) - ; - else { - init(); - atomic_store(&state->done, 1); - } - } -} - -#else /* no atomics */ - -/* Structure for once(), which must be initialized with ONCE_INIT. */ -struct once_s { - volatile int begun; - volatile int done; -}; -#define ONCE_INIT {0, 0} - -/* Test and set. Alas, not atomic, but tries to minimize the period of - vulnerability. */ -local int test_and_set OF((int volatile *)); -local int test_and_set(flag) - int volatile *flag; -{ - int was; - - was = *flag; - *flag = 1; - return was; -} - -/* Run the provided init() function once. This is not thread-safe. */ -local void once(state, init) - once_t *state; - void (*init)(void); -{ - if (!state->done) { - if (test_and_set(&state->begun)) - while (!state->done) - ; - else { - init(); - state->done = 1; - } - } -} - -#endif - -/* State for once(). */ -local once_t made = ONCE_INIT; - -/* - Generate tables for a byte-wise 32-bit CRC calculation on the polynomial: - x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. - - Polynomials over GF(2) are represented in binary, one bit per coefficient, - with the lowest powers in the most significant bit. Then adding polynomials - is just exclusive-or, and multiplying a polynomial by x is a right shift by - one. If we call the above polynomial p, and represent a byte as the - polynomial q, also with the lowest power in the most significant bit (so the - byte 0xb1 is the polynomial x^7+x^3+x^2+1), then the CRC is (q*x^32) mod p, - where a mod b means the remainder after dividing a by b. - - This calculation is done using the shift-register method of multiplying and - taking the remainder. The register is initialized to zero, and for each - incoming bit, x^32 is added mod p to the register if the bit is a one (where - x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by x - (which is shifting right by one and adding x^32 mod p if the bit shifted out - is a one). We start with the highest power (least significant bit) of q and - repeat for all eight bits of q. - - The table is simply the CRC of all possible eight bit values. This is all the - information needed to generate CRCs on data a byte at a time for all - combinations of CRC register values and incoming bytes. - */ - -local void make_crc_table() -{ - unsigned i, j, n; - z_crc_t p; - - /* initialize the CRC of bytes tables */ - for (i = 0; i < 256; i++) { - p = i; - for (j = 0; j < 8; j++) - p = p & 1 ? (p >> 1) ^ POLY : p >> 1; - crc_table[i] = p; -#ifdef W - crc_big_table[i] = byte_swap(p); -#endif - } - - /* initialize the x^2^n mod p(x) table */ - p = (z_crc_t)1 << 30; /* x^1 */ - x2n_table[0] = p; - for (n = 1; n < 32; n++) - x2n_table[n] = p = multmodp(p, p); - -#ifdef W - /* initialize the braiding tables -- needs x2n_table[] */ - braid(crc_braid_table, crc_braid_big_table, N, W); -#endif - -#ifdef MAKECRCH - { - /* - The crc32.h header file contains tables for both 32-bit and 64-bit - z_word_t's, and so requires a 64-bit type be available. In that case, - z_word_t must be defined to be 64-bits. This code then also generates - and writes out the tables for the case that z_word_t is 32 bits. - */ -#if !defined(W) || W != 8 -# error Need a 64-bit integer type in order to generate crc32.h. -#endif - FILE *out; - int k, n; - z_crc_t ltl[8][256]; - z_word_t big[8][256]; - - out = fopen("crc32.h", "w"); - if (out == NULL) return; - - /* write out little-endian CRC table to crc32.h */ - fprintf(out, - "/* crc32.h -- tables for rapid CRC calculation\n" - " * Generated automatically by crc32.c\n */\n" - "\n" - "local const z_crc_t FAR crc_table[] = {\n" - " "); - write_table(out, crc_table, 256); - fprintf(out, - "};\n"); - - /* write out big-endian CRC table for 64-bit z_word_t to crc32.h */ - fprintf(out, - "\n" - "#ifdef W\n" - "\n" - "#if W == 8\n" - "\n" - "local const z_word_t FAR crc_big_table[] = {\n" - " "); - write_table64(out, crc_big_table, 256); - fprintf(out, - "};\n"); - - /* write out big-endian CRC table for 32-bit z_word_t to crc32.h */ - fprintf(out, - "\n" - "#else /* W == 4 */\n" - "\n" - "local const z_word_t FAR crc_big_table[] = {\n" - " "); - write_table32hi(out, crc_big_table, 256); - fprintf(out, - "};\n" - "\n" - "#endif\n"); - - /* write out braid tables for each value of N */ - for (n = 1; n <= 6; n++) { - fprintf(out, - "\n" - "#if N == %d\n", n); - - /* compute braid tables for this N and 64-bit word_t */ - braid(ltl, big, n, 8); - - /* write out braid tables for 64-bit z_word_t to crc32.h */ - fprintf(out, - "\n" - "#if W == 8\n" - "\n" - "local const z_crc_t FAR crc_braid_table[][256] = {\n"); - for (k = 0; k < 8; k++) { - fprintf(out, " {"); - write_table(out, ltl[k], 256); - fprintf(out, "}%s", k < 7 ? ",\n" : ""); - } - fprintf(out, - "};\n" - "\n" - "local const z_word_t FAR crc_braid_big_table[][256] = {\n"); - for (k = 0; k < 8; k++) { - fprintf(out, " {"); - write_table64(out, big[k], 256); - fprintf(out, "}%s", k < 7 ? ",\n" : ""); - } - fprintf(out, - "};\n"); - - /* compute braid tables for this N and 32-bit word_t */ - braid(ltl, big, n, 4); - - /* write out braid tables for 32-bit z_word_t to crc32.h */ - fprintf(out, - "\n" - "#else /* W == 4 */\n" - "\n" - "local const z_crc_t FAR crc_braid_table[][256] = {\n"); - for (k = 0; k < 4; k++) { - fprintf(out, " {"); - write_table(out, ltl[k], 256); - fprintf(out, "}%s", k < 3 ? ",\n" : ""); - } - fprintf(out, - "};\n" - "\n" - "local const z_word_t FAR crc_braid_big_table[][256] = {\n"); - for (k = 0; k < 4; k++) { - fprintf(out, " {"); - write_table32hi(out, big[k], 256); - fprintf(out, "}%s", k < 3 ? ",\n" : ""); - } - fprintf(out, - "};\n" - "\n" - "#endif\n" - "\n" - "#endif\n"); - } - fprintf(out, - "\n" - "#endif\n"); - - /* write out zeros operator table to crc32.h */ - fprintf(out, - "\n" - "local const z_crc_t FAR x2n_table[] = {\n" - " "); - write_table(out, x2n_table, 32); - fprintf(out, - "};\n"); - fclose(out); - } -#endif /* MAKECRCH */ -} - -#ifdef MAKECRCH - -/* - Write the 32-bit values in table[0..k-1] to out, five per line in - hexadecimal separated by commas. - */ -local void write_table(out, table, k) - FILE *out; - const z_crc_t FAR *table; - int k; -{ - int n; - - for (n = 0; n < k; n++) - fprintf(out, "%s0x%08lx%s", n == 0 || n % 5 ? "" : " ", - (unsigned long)(table[n]), - n == k - 1 ? "" : (n % 5 == 4 ? ",\n" : ", ")); -} - -/* - Write the high 32-bits of each value in table[0..k-1] to out, five per line - in hexadecimal separated by commas. - */ -local void write_table32hi(out, table, k) -FILE *out; -const z_word_t FAR *table; -int k; -{ - int n; - - for (n = 0; n < k; n++) - fprintf(out, "%s0x%08lx%s", n == 0 || n % 5 ? "" : " ", - (unsigned long)(table[n] >> 32), - n == k - 1 ? "" : (n % 5 == 4 ? ",\n" : ", ")); -} - -/* - Write the 64-bit values in table[0..k-1] to out, three per line in - hexadecimal separated by commas. This assumes that if there is a 64-bit - type, then there is also a long long integer type, and it is at least 64 - bits. If not, then the type cast and format string can be adjusted - accordingly. - */ -local void write_table64(out, table, k) - FILE *out; - const z_word_t FAR *table; - int k; -{ - int n; - - for (n = 0; n < k; n++) - fprintf(out, "%s0x%016llx%s", n == 0 || n % 3 ? "" : " ", - (unsigned long long)(table[n]), - n == k - 1 ? "" : (n % 3 == 2 ? ",\n" : ", ")); -} - -/* Actually do the deed. */ -int main() -{ - make_crc_table(); - return 0; -} - -#endif /* MAKECRCH */ - -#ifdef W -/* - Generate the little and big-endian braid tables for the given n and z_word_t - size w. Each array must have room for w blocks of 256 elements. - */ -local void braid(ltl, big, n, w) - z_crc_t ltl[][256]; - z_word_t big[][256]; - int n; - int w; -{ - int k; - z_crc_t i, p, q; - for (k = 0; k < w; k++) { - p = x2nmodp((n * w + 3 - k) << 3, 0); - ltl[k][0] = 0; - big[w - 1 - k][0] = 0; - for (i = 1; i < 256; i++) { - ltl[k][i] = q = multmodp(i << 24, p); - big[w - 1 - k][i] = byte_swap(q); - } - } -} -#endif - -#else /* !DYNAMIC_CRC_TABLE */ -/* ======================================================================== - * Tables for byte-wise and braided CRC-32 calculations, and a table of powers - * of x for combining CRC-32s, all made by make_crc_table(). - */ -#include "crc32.h" -#endif /* DYNAMIC_CRC_TABLE */ - -/* ======================================================================== - * Routines used for CRC calculation. Some are also required for the table - * generation above. - */ - -/* - Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, - reflected. For speed, this requires that a not be zero. - */ -local z_crc_t multmodp(a, b) - z_crc_t a; - z_crc_t b; -{ - z_crc_t m, p; - - m = (z_crc_t)1 << 31; - p = 0; - for (;;) { - if (a & m) { - p ^= b; - if ((a & (m - 1)) == 0) - break; - } - m >>= 1; - b = b & 1 ? (b >> 1) ^ POLY : b >> 1; - } - return p; -} - -/* - Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been - initialized. - */ -local z_crc_t x2nmodp(n, k) - z_off64_t n; - unsigned k; -{ - z_crc_t p; - - p = (z_crc_t)1 << 31; /* x^0 == 1 */ - while (n) { - if (n & 1) - p = multmodp(x2n_table[k & 31], p); - n >>= 1; - k++; - } - return p; -} - -/* ========================================================================= - * This function can be used by asm versions of crc32(), and to force the - * generation of the CRC tables in a threaded application. - */ -const z_crc_t FAR * ZEXPORT get_crc_table() -{ -#ifdef DYNAMIC_CRC_TABLE - once(&made, make_crc_table); -#endif /* DYNAMIC_CRC_TABLE */ - return (const z_crc_t FAR *)crc_table; -} - -/* ========================================================================= - * Use ARM machine instructions if available. This will compute the CRC about - * ten times faster than the braided calculation. This code does not check for - * the presence of the CRC instruction at run time. __ARM_FEATURE_CRC32 will - * only be defined if the compilation specifies an ARM processor architecture - * that has the instructions. For example, compiling with -march=armv8.1-a or - * -march=armv8-a+crc, or -march=native if the compile machine has the crc32 - * instructions. - */ -#ifdef ARMCRC32 - -/* - Constants empirically determined to maximize speed. These values are from - measurements on a Cortex-A57. Your mileage may vary. - */ -#define Z_BATCH 3990 /* number of words in a batch */ -#define Z_BATCH_ZEROS 0xa10d3d0c /* computed from Z_BATCH = 3990 */ -#define Z_BATCH_MIN 800 /* fewest words in a final batch */ - -unsigned long ZEXPORT crc32_z(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - z_size_t len; -{ - z_crc_t val; - z_word_t crc1, crc2; - const z_word_t *word; - z_word_t val0, val1, val2; - z_size_t last, last2, i; - z_size_t num; - - /* Return initial CRC, if requested. */ - if (buf == Z_NULL) return 0; - -#ifdef DYNAMIC_CRC_TABLE - once(&made, make_crc_table); -#endif /* DYNAMIC_CRC_TABLE */ - - /* Pre-condition the CRC */ - crc ^= 0xffffffff; - - /* Compute the CRC up to a word boundary. */ - while (len && ((z_size_t)buf & 7) != 0) { - len--; - val = *buf++; - __asm__ volatile("crc32b %w0, %w0, %w1" : "+r"(crc) : "r"(val)); - } - - /* Prepare to compute the CRC on full 64-bit words word[0..num-1]. */ - word = (z_word_t const *)buf; - num = len >> 3; - len &= 7; - - /* Do three interleaved CRCs to realize the throughput of one crc32x - instruction per cycle. Each CRC is calcuated on Z_BATCH words. The three - CRCs are combined into a single CRC after each set of batches. */ - while (num >= 3 * Z_BATCH) { - crc1 = 0; - crc2 = 0; - for (i = 0; i < Z_BATCH; i++) { - val0 = word[i]; - val1 = word[i + Z_BATCH]; - val2 = word[i + 2 * Z_BATCH]; - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc1) : "r"(val1)); - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc2) : "r"(val2)); - } - word += 3 * Z_BATCH; - num -= 3 * Z_BATCH; - crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc1; - crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc2; - } - - /* Do one last smaller batch with the remaining words, if there are enough - to pay for the combination of CRCs. */ - last = num / 3; - if (last >= Z_BATCH_MIN) { - last2 = last << 1; - crc1 = 0; - crc2 = 0; - for (i = 0; i < last; i++) { - val0 = word[i]; - val1 = word[i + last]; - val2 = word[i + last2]; - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc1) : "r"(val1)); - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc2) : "r"(val2)); - } - word += 3 * last; - num -= 3 * last; - val = x2nmodp(last, 6); - crc = multmodp(val, crc) ^ crc1; - crc = multmodp(val, crc) ^ crc2; - } - - /* Compute the CRC on any remaining words. */ - for (i = 0; i < num; i++) { - val0 = word[i]; - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); - } - word += num; - - /* Complete the CRC on any remaining bytes. */ - buf = (const unsigned char FAR *)word; - while (len) { - len--; - val = *buf++; - __asm__ volatile("crc32b %w0, %w0, %w1" : "+r"(crc) : "r"(val)); - } - - /* Return the CRC, post-conditioned. */ - return crc ^ 0xffffffff; -} - -#else - -#ifdef W - -/* - Return the CRC of the W bytes in the word_t data, taking the - least-significant byte of the word as the first byte of data, without any pre - or post conditioning. This is used to combine the CRCs of each braid. - */ -local z_crc_t crc_word(data) - z_word_t data; -{ - int k; - for (k = 0; k < W; k++) - data = (data >> 8) ^ crc_table[data & 0xff]; - return (z_crc_t)data; -} - -local z_word_t crc_word_big(data) - z_word_t data; -{ - int k; - for (k = 0; k < W; k++) - data = (data << 8) ^ - crc_big_table[(data >> ((W - 1) << 3)) & 0xff]; - return data; -} - -#endif - -/* ========================================================================= */ -unsigned long ZEXPORT crc32_z(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - z_size_t len; -{ - /* Return initial CRC, if requested. */ - if (buf == Z_NULL) return 0; - -#ifdef DYNAMIC_CRC_TABLE - once(&made, make_crc_table); -#endif /* DYNAMIC_CRC_TABLE */ - - /* Pre-condition the CRC */ - crc ^= 0xffffffff; - -#ifdef W - - /* If provided enough bytes, do a braided CRC calculation. */ - if (len >= N * W + W - 1) { - z_size_t blks; - z_word_t const *words; - unsigned endian; - int k; - - /* Compute the CRC up to a z_word_t boundary. */ - while (len && ((z_size_t)buf & (W - 1)) != 0) { - len--; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - } - - /* Compute the CRC on as many N z_word_t blocks as are available. */ - blks = len / (N * W); - len -= blks * N * W; - words = (z_word_t const *)buf; - - /* Do endian check at execution time instead of compile time, since ARM - processors can change the endianess at execution time. If the - compiler knows what the endianess will be, it can optimize out the - check and the unused branch. */ - endian = 1; - if (*(unsigned char *)&endian) { - /* Little endian. */ - - z_crc_t crc0; - z_word_t word0; -#if N > 1 - z_crc_t crc1; - z_word_t word1; -#if N > 2 - z_crc_t crc2; - z_word_t word2; -#if N > 3 - z_crc_t crc3; - z_word_t word3; -#if N > 4 - z_crc_t crc4; - z_word_t word4; -#if N > 5 - z_crc_t crc5; - z_word_t word5; -#endif -#endif -#endif -#endif -#endif - - /* Initialize the CRC for each braid. */ - crc0 = crc; -#if N > 1 - crc1 = 0; -#if N > 2 - crc2 = 0; -#if N > 3 - crc3 = 0; -#if N > 4 - crc4 = 0; -#if N > 5 - crc5 = 0; -#endif -#endif -#endif -#endif -#endif - - /* - Process the first blks-1 blocks, computing the CRCs on each braid - independently. - */ - while (--blks) { - /* Load the word for each braid into registers. */ - word0 = crc0 ^ words[0]; -#if N > 1 - word1 = crc1 ^ words[1]; -#if N > 2 - word2 = crc2 ^ words[2]; -#if N > 3 - word3 = crc3 ^ words[3]; -#if N > 4 - word4 = crc4 ^ words[4]; -#if N > 5 - word5 = crc5 ^ words[5]; -#endif -#endif -#endif -#endif -#endif - words += N; - - /* Compute and update the CRC for each word. The loop should - get unrolled. */ - crc0 = crc_braid_table[0][word0 & 0xff]; -#if N > 1 - crc1 = crc_braid_table[0][word1 & 0xff]; -#if N > 2 - crc2 = crc_braid_table[0][word2 & 0xff]; -#if N > 3 - crc3 = crc_braid_table[0][word3 & 0xff]; -#if N > 4 - crc4 = crc_braid_table[0][word4 & 0xff]; -#if N > 5 - crc5 = crc_braid_table[0][word5 & 0xff]; -#endif -#endif -#endif -#endif -#endif - for (k = 1; k < W; k++) { - crc0 ^= crc_braid_table[k][(word0 >> (k << 3)) & 0xff]; -#if N > 1 - crc1 ^= crc_braid_table[k][(word1 >> (k << 3)) & 0xff]; -#if N > 2 - crc2 ^= crc_braid_table[k][(word2 >> (k << 3)) & 0xff]; -#if N > 3 - crc3 ^= crc_braid_table[k][(word3 >> (k << 3)) & 0xff]; -#if N > 4 - crc4 ^= crc_braid_table[k][(word4 >> (k << 3)) & 0xff]; -#if N > 5 - crc5 ^= crc_braid_table[k][(word5 >> (k << 3)) & 0xff]; -#endif -#endif -#endif -#endif -#endif - } - } - - /* - Process the last block, combining the CRCs of the N braids at the - same time. - */ - crc = crc_word(crc0 ^ words[0]); -#if N > 1 - crc = crc_word(crc1 ^ words[1] ^ crc); -#if N > 2 - crc = crc_word(crc2 ^ words[2] ^ crc); -#if N > 3 - crc = crc_word(crc3 ^ words[3] ^ crc); -#if N > 4 - crc = crc_word(crc4 ^ words[4] ^ crc); -#if N > 5 - crc = crc_word(crc5 ^ words[5] ^ crc); -#endif -#endif -#endif -#endif -#endif - words += N; - } - else { - /* Big endian. */ - - z_word_t crc0, word0, comb; -#if N > 1 - z_word_t crc1, word1; -#if N > 2 - z_word_t crc2, word2; -#if N > 3 - z_word_t crc3, word3; -#if N > 4 - z_word_t crc4, word4; -#if N > 5 - z_word_t crc5, word5; -#endif -#endif -#endif -#endif -#endif - - /* Initialize the CRC for each braid. */ - crc0 = byte_swap(crc); -#if N > 1 - crc1 = 0; -#if N > 2 - crc2 = 0; -#if N > 3 - crc3 = 0; -#if N > 4 - crc4 = 0; -#if N > 5 - crc5 = 0; -#endif -#endif -#endif -#endif -#endif - - /* - Process the first blks-1 blocks, computing the CRCs on each braid - independently. - */ - while (--blks) { - /* Load the word for each braid into registers. */ - word0 = crc0 ^ words[0]; -#if N > 1 - word1 = crc1 ^ words[1]; -#if N > 2 - word2 = crc2 ^ words[2]; -#if N > 3 - word3 = crc3 ^ words[3]; -#if N > 4 - word4 = crc4 ^ words[4]; -#if N > 5 - word5 = crc5 ^ words[5]; -#endif -#endif -#endif -#endif -#endif - words += N; - - /* Compute and update the CRC for each word. The loop should - get unrolled. */ - crc0 = crc_braid_big_table[0][word0 & 0xff]; -#if N > 1 - crc1 = crc_braid_big_table[0][word1 & 0xff]; -#if N > 2 - crc2 = crc_braid_big_table[0][word2 & 0xff]; -#if N > 3 - crc3 = crc_braid_big_table[0][word3 & 0xff]; -#if N > 4 - crc4 = crc_braid_big_table[0][word4 & 0xff]; -#if N > 5 - crc5 = crc_braid_big_table[0][word5 & 0xff]; -#endif -#endif -#endif -#endif -#endif - for (k = 1; k < W; k++) { - crc0 ^= crc_braid_big_table[k][(word0 >> (k << 3)) & 0xff]; -#if N > 1 - crc1 ^= crc_braid_big_table[k][(word1 >> (k << 3)) & 0xff]; -#if N > 2 - crc2 ^= crc_braid_big_table[k][(word2 >> (k << 3)) & 0xff]; -#if N > 3 - crc3 ^= crc_braid_big_table[k][(word3 >> (k << 3)) & 0xff]; -#if N > 4 - crc4 ^= crc_braid_big_table[k][(word4 >> (k << 3)) & 0xff]; -#if N > 5 - crc5 ^= crc_braid_big_table[k][(word5 >> (k << 3)) & 0xff]; -#endif -#endif -#endif -#endif -#endif - } - } - - /* - Process the last block, combining the CRCs of the N braids at the - same time. - */ - comb = crc_word_big(crc0 ^ words[0]); -#if N > 1 - comb = crc_word_big(crc1 ^ words[1] ^ comb); -#if N > 2 - comb = crc_word_big(crc2 ^ words[2] ^ comb); -#if N > 3 - comb = crc_word_big(crc3 ^ words[3] ^ comb); -#if N > 4 - comb = crc_word_big(crc4 ^ words[4] ^ comb); -#if N > 5 - comb = crc_word_big(crc5 ^ words[5] ^ comb); -#endif -#endif -#endif -#endif -#endif - words += N; - crc = byte_swap(comb); - } - - /* - Update the pointer to the remaining bytes to process. - */ - buf = (unsigned char const *)words; - } - -#endif /* W */ - - /* Complete the computation of the CRC on any remaining bytes. */ - while (len >= 8) { - len -= 8; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - } - while (len) { - len--; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - } - - /* Return the CRC, post-conditioned. */ - return crc ^ 0xffffffff; -} - -#endif - -/* ========================================================================= */ -unsigned long ZEXPORT crc32(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - uInt len; -{ - return crc32_z(crc, buf, len); -} - -/* ========================================================================= */ -uLong ZEXPORT crc32_combine64(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off64_t len2; -{ -#ifdef DYNAMIC_CRC_TABLE - once(&made, make_crc_table); -#endif /* DYNAMIC_CRC_TABLE */ - return multmodp(x2nmodp(len2, 3), crc1) ^ crc2; -} - -/* ========================================================================= */ -uLong ZEXPORT crc32_combine(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off_t len2; -{ - return crc32_combine64(crc1, crc2, len2); -} - -/* ========================================================================= */ -uLong ZEXPORT crc32_combine_gen64(len2) - z_off64_t len2; -{ -#ifdef DYNAMIC_CRC_TABLE - once(&made, make_crc_table); -#endif /* DYNAMIC_CRC_TABLE */ - return x2nmodp(len2, 3); -} - -/* ========================================================================= */ -uLong ZEXPORT crc32_combine_gen(len2) - z_off_t len2; -{ - return crc32_combine_gen64(len2); -} - -/* ========================================================================= */ -uLong crc32_combine_op(crc1, crc2, op) - uLong crc1; - uLong crc2; - uLong op; -{ - return multmodp(op, crc1) ^ crc2; -} diff --git a/thirdparty/zlib-1.2.12/crc32.h b/thirdparty/zlib-1.2.12/crc32.h deleted file mode 100644 index 137df68..0000000 --- a/thirdparty/zlib-1.2.12/crc32.h +++ /dev/null @@ -1,9446 +0,0 @@ -/* crc32.h -- tables for rapid CRC calculation - * Generated automatically by crc32.c - */ - -local const z_crc_t FAR crc_table[] = { - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, - 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, - 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, - 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, - 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, - 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, - 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, - 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, - 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, - 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, - 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, - 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, - 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, - 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, - 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, - 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, - 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, - 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, - 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, - 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, - 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, - 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, - 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, - 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, - 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, - 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, - 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, - 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, - 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, - 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, - 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, - 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, - 0x2d02ef8d}; - -#ifdef W - -#if W == 8 - -local const z_word_t FAR crc_big_table[] = { - 0x0000000000000000, 0x9630077700000000, 0x2c610eee00000000, - 0xba51099900000000, 0x19c46d0700000000, 0x8ff46a7000000000, - 0x35a563e900000000, 0xa395649e00000000, 0x3288db0e00000000, - 0xa4b8dc7900000000, 0x1ee9d5e000000000, 0x88d9d29700000000, - 0x2b4cb60900000000, 0xbd7cb17e00000000, 0x072db8e700000000, - 0x911dbf9000000000, 0x6410b71d00000000, 0xf220b06a00000000, - 0x4871b9f300000000, 0xde41be8400000000, 0x7dd4da1a00000000, - 0xebe4dd6d00000000, 0x51b5d4f400000000, 0xc785d38300000000, - 0x56986c1300000000, 0xc0a86b6400000000, 0x7af962fd00000000, - 0xecc9658a00000000, 0x4f5c011400000000, 0xd96c066300000000, - 0x633d0ffa00000000, 0xf50d088d00000000, 0xc8206e3b00000000, - 0x5e10694c00000000, 0xe44160d500000000, 0x727167a200000000, - 0xd1e4033c00000000, 0x47d4044b00000000, 0xfd850dd200000000, - 0x6bb50aa500000000, 0xfaa8b53500000000, 0x6c98b24200000000, - 0xd6c9bbdb00000000, 0x40f9bcac00000000, 0xe36cd83200000000, - 0x755cdf4500000000, 0xcf0dd6dc00000000, 0x593dd1ab00000000, - 0xac30d92600000000, 0x3a00de5100000000, 0x8051d7c800000000, - 0x1661d0bf00000000, 0xb5f4b42100000000, 0x23c4b35600000000, - 0x9995bacf00000000, 0x0fa5bdb800000000, 0x9eb8022800000000, - 0x0888055f00000000, 0xb2d90cc600000000, 0x24e90bb100000000, - 0x877c6f2f00000000, 0x114c685800000000, 0xab1d61c100000000, - 0x3d2d66b600000000, 0x9041dc7600000000, 0x0671db0100000000, - 0xbc20d29800000000, 0x2a10d5ef00000000, 0x8985b17100000000, - 0x1fb5b60600000000, 0xa5e4bf9f00000000, 0x33d4b8e800000000, - 0xa2c9077800000000, 0x34f9000f00000000, 0x8ea8099600000000, - 0x18980ee100000000, 0xbb0d6a7f00000000, 0x2d3d6d0800000000, - 0x976c649100000000, 0x015c63e600000000, 0xf4516b6b00000000, - 0x62616c1c00000000, 0xd830658500000000, 0x4e0062f200000000, - 0xed95066c00000000, 0x7ba5011b00000000, 0xc1f4088200000000, - 0x57c40ff500000000, 0xc6d9b06500000000, 0x50e9b71200000000, - 0xeab8be8b00000000, 0x7c88b9fc00000000, 0xdf1ddd6200000000, - 0x492dda1500000000, 0xf37cd38c00000000, 0x654cd4fb00000000, - 0x5861b24d00000000, 0xce51b53a00000000, 0x7400bca300000000, - 0xe230bbd400000000, 0x41a5df4a00000000, 0xd795d83d00000000, - 0x6dc4d1a400000000, 0xfbf4d6d300000000, 0x6ae9694300000000, - 0xfcd96e3400000000, 0x468867ad00000000, 0xd0b860da00000000, - 0x732d044400000000, 0xe51d033300000000, 0x5f4c0aaa00000000, - 0xc97c0ddd00000000, 0x3c71055000000000, 0xaa41022700000000, - 0x10100bbe00000000, 0x86200cc900000000, 0x25b5685700000000, - 0xb3856f2000000000, 0x09d466b900000000, 0x9fe461ce00000000, - 0x0ef9de5e00000000, 0x98c9d92900000000, 0x2298d0b000000000, - 0xb4a8d7c700000000, 0x173db35900000000, 0x810db42e00000000, - 0x3b5cbdb700000000, 0xad6cbac000000000, 0x2083b8ed00000000, - 0xb6b3bf9a00000000, 0x0ce2b60300000000, 0x9ad2b17400000000, - 0x3947d5ea00000000, 0xaf77d29d00000000, 0x1526db0400000000, - 0x8316dc7300000000, 0x120b63e300000000, 0x843b649400000000, - 0x3e6a6d0d00000000, 0xa85a6a7a00000000, 0x0bcf0ee400000000, - 0x9dff099300000000, 0x27ae000a00000000, 0xb19e077d00000000, - 0x44930ff000000000, 0xd2a3088700000000, 0x68f2011e00000000, - 0xfec2066900000000, 0x5d5762f700000000, 0xcb67658000000000, - 0x71366c1900000000, 0xe7066b6e00000000, 0x761bd4fe00000000, - 0xe02bd38900000000, 0x5a7ada1000000000, 0xcc4add6700000000, - 0x6fdfb9f900000000, 0xf9efbe8e00000000, 0x43beb71700000000, - 0xd58eb06000000000, 0xe8a3d6d600000000, 0x7e93d1a100000000, - 0xc4c2d83800000000, 0x52f2df4f00000000, 0xf167bbd100000000, - 0x6757bca600000000, 0xdd06b53f00000000, 0x4b36b24800000000, - 0xda2b0dd800000000, 0x4c1b0aaf00000000, 0xf64a033600000000, - 0x607a044100000000, 0xc3ef60df00000000, 0x55df67a800000000, - 0xef8e6e3100000000, 0x79be694600000000, 0x8cb361cb00000000, - 0x1a8366bc00000000, 0xa0d26f2500000000, 0x36e2685200000000, - 0x95770ccc00000000, 0x03470bbb00000000, 0xb916022200000000, - 0x2f26055500000000, 0xbe3bbac500000000, 0x280bbdb200000000, - 0x925ab42b00000000, 0x046ab35c00000000, 0xa7ffd7c200000000, - 0x31cfd0b500000000, 0x8b9ed92c00000000, 0x1daede5b00000000, - 0xb0c2649b00000000, 0x26f263ec00000000, 0x9ca36a7500000000, - 0x0a936d0200000000, 0xa906099c00000000, 0x3f360eeb00000000, - 0x8567077200000000, 0x1357000500000000, 0x824abf9500000000, - 0x147ab8e200000000, 0xae2bb17b00000000, 0x381bb60c00000000, - 0x9b8ed29200000000, 0x0dbed5e500000000, 0xb7efdc7c00000000, - 0x21dfdb0b00000000, 0xd4d2d38600000000, 0x42e2d4f100000000, - 0xf8b3dd6800000000, 0x6e83da1f00000000, 0xcd16be8100000000, - 0x5b26b9f600000000, 0xe177b06f00000000, 0x7747b71800000000, - 0xe65a088800000000, 0x706a0fff00000000, 0xca3b066600000000, - 0x5c0b011100000000, 0xff9e658f00000000, 0x69ae62f800000000, - 0xd3ff6b6100000000, 0x45cf6c1600000000, 0x78e20aa000000000, - 0xeed20dd700000000, 0x5483044e00000000, 0xc2b3033900000000, - 0x612667a700000000, 0xf71660d000000000, 0x4d47694900000000, - 0xdb776e3e00000000, 0x4a6ad1ae00000000, 0xdc5ad6d900000000, - 0x660bdf4000000000, 0xf03bd83700000000, 0x53aebca900000000, - 0xc59ebbde00000000, 0x7fcfb24700000000, 0xe9ffb53000000000, - 0x1cf2bdbd00000000, 0x8ac2baca00000000, 0x3093b35300000000, - 0xa6a3b42400000000, 0x0536d0ba00000000, 0x9306d7cd00000000, - 0x2957de5400000000, 0xbf67d92300000000, 0x2e7a66b300000000, - 0xb84a61c400000000, 0x021b685d00000000, 0x942b6f2a00000000, - 0x37be0bb400000000, 0xa18e0cc300000000, 0x1bdf055a00000000, - 0x8def022d00000000}; - -#else /* W == 4 */ - -local const z_word_t FAR crc_big_table[] = { - 0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07, - 0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79, - 0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7, - 0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84, - 0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13, - 0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663, - 0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5, - 0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5, - 0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832, - 0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51, - 0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf, - 0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1, - 0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76, - 0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606, - 0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996, - 0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6, - 0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c, - 0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712, - 0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c, - 0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4, - 0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943, - 0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333, - 0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe, - 0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce, - 0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359, - 0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a, - 0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04, - 0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a, - 0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0, - 0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580, - 0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10, - 0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060, - 0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1, - 0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf, - 0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31, - 0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852, - 0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5, - 0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5, - 0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75, - 0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005, - 0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292, - 0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1, - 0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f, - 0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111, - 0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0, - 0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0, - 0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40, - 0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530, - 0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba, - 0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4, - 0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a, - 0x8def022d}; - -#endif - -#if N == 1 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xccaa009e, 0x4225077d, 0x8e8f07e3, 0x844a0efa, - 0x48e00e64, 0xc66f0987, 0x0ac50919, 0xd3e51bb5, 0x1f4f1b2b, - 0x91c01cc8, 0x5d6a1c56, 0x57af154f, 0x9b0515d1, 0x158a1232, - 0xd92012ac, 0x7cbb312b, 0xb01131b5, 0x3e9e3656, 0xf23436c8, - 0xf8f13fd1, 0x345b3f4f, 0xbad438ac, 0x767e3832, 0xaf5e2a9e, - 0x63f42a00, 0xed7b2de3, 0x21d12d7d, 0x2b142464, 0xe7be24fa, - 0x69312319, 0xa59b2387, 0xf9766256, 0x35dc62c8, 0xbb53652b, - 0x77f965b5, 0x7d3c6cac, 0xb1966c32, 0x3f196bd1, 0xf3b36b4f, - 0x2a9379e3, 0xe639797d, 0x68b67e9e, 0xa41c7e00, 0xaed97719, - 0x62737787, 0xecfc7064, 0x205670fa, 0x85cd537d, 0x496753e3, - 0xc7e85400, 0x0b42549e, 0x01875d87, 0xcd2d5d19, 0x43a25afa, - 0x8f085a64, 0x562848c8, 0x9a824856, 0x140d4fb5, 0xd8a74f2b, - 0xd2624632, 0x1ec846ac, 0x9047414f, 0x5ced41d1, 0x299dc2ed, - 0xe537c273, 0x6bb8c590, 0xa712c50e, 0xadd7cc17, 0x617dcc89, - 0xeff2cb6a, 0x2358cbf4, 0xfa78d958, 0x36d2d9c6, 0xb85dde25, - 0x74f7debb, 0x7e32d7a2, 0xb298d73c, 0x3c17d0df, 0xf0bdd041, - 0x5526f3c6, 0x998cf358, 0x1703f4bb, 0xdba9f425, 0xd16cfd3c, - 0x1dc6fda2, 0x9349fa41, 0x5fe3fadf, 0x86c3e873, 0x4a69e8ed, - 0xc4e6ef0e, 0x084cef90, 0x0289e689, 0xce23e617, 0x40ace1f4, - 0x8c06e16a, 0xd0eba0bb, 0x1c41a025, 0x92cea7c6, 0x5e64a758, - 0x54a1ae41, 0x980baedf, 0x1684a93c, 0xda2ea9a2, 0x030ebb0e, - 0xcfa4bb90, 0x412bbc73, 0x8d81bced, 0x8744b5f4, 0x4beeb56a, - 0xc561b289, 0x09cbb217, 0xac509190, 0x60fa910e, 0xee7596ed, - 0x22df9673, 0x281a9f6a, 0xe4b09ff4, 0x6a3f9817, 0xa6959889, - 0x7fb58a25, 0xb31f8abb, 0x3d908d58, 0xf13a8dc6, 0xfbff84df, - 0x37558441, 0xb9da83a2, 0x7570833c, 0x533b85da, 0x9f918544, - 0x111e82a7, 0xddb48239, 0xd7718b20, 0x1bdb8bbe, 0x95548c5d, - 0x59fe8cc3, 0x80de9e6f, 0x4c749ef1, 0xc2fb9912, 0x0e51998c, - 0x04949095, 0xc83e900b, 0x46b197e8, 0x8a1b9776, 0x2f80b4f1, - 0xe32ab46f, 0x6da5b38c, 0xa10fb312, 0xabcaba0b, 0x6760ba95, - 0xe9efbd76, 0x2545bde8, 0xfc65af44, 0x30cfafda, 0xbe40a839, - 0x72eaa8a7, 0x782fa1be, 0xb485a120, 0x3a0aa6c3, 0xf6a0a65d, - 0xaa4de78c, 0x66e7e712, 0xe868e0f1, 0x24c2e06f, 0x2e07e976, - 0xe2ade9e8, 0x6c22ee0b, 0xa088ee95, 0x79a8fc39, 0xb502fca7, - 0x3b8dfb44, 0xf727fbda, 0xfde2f2c3, 0x3148f25d, 0xbfc7f5be, - 0x736df520, 0xd6f6d6a7, 0x1a5cd639, 0x94d3d1da, 0x5879d144, - 0x52bcd85d, 0x9e16d8c3, 0x1099df20, 0xdc33dfbe, 0x0513cd12, - 0xc9b9cd8c, 0x4736ca6f, 0x8b9ccaf1, 0x8159c3e8, 0x4df3c376, - 0xc37cc495, 0x0fd6c40b, 0x7aa64737, 0xb60c47a9, 0x3883404a, - 0xf42940d4, 0xfeec49cd, 0x32464953, 0xbcc94eb0, 0x70634e2e, - 0xa9435c82, 0x65e95c1c, 0xeb665bff, 0x27cc5b61, 0x2d095278, - 0xe1a352e6, 0x6f2c5505, 0xa386559b, 0x061d761c, 0xcab77682, - 0x44387161, 0x889271ff, 0x825778e6, 0x4efd7878, 0xc0727f9b, - 0x0cd87f05, 0xd5f86da9, 0x19526d37, 0x97dd6ad4, 0x5b776a4a, - 0x51b26353, 0x9d1863cd, 0x1397642e, 0xdf3d64b0, 0x83d02561, - 0x4f7a25ff, 0xc1f5221c, 0x0d5f2282, 0x079a2b9b, 0xcb302b05, - 0x45bf2ce6, 0x89152c78, 0x50353ed4, 0x9c9f3e4a, 0x121039a9, - 0xdeba3937, 0xd47f302e, 0x18d530b0, 0x965a3753, 0x5af037cd, - 0xff6b144a, 0x33c114d4, 0xbd4e1337, 0x71e413a9, 0x7b211ab0, - 0xb78b1a2e, 0x39041dcd, 0xf5ae1d53, 0x2c8e0fff, 0xe0240f61, - 0x6eab0882, 0xa201081c, 0xa8c40105, 0x646e019b, 0xeae10678, - 0x264b06e6}, - {0x00000000, 0xa6770bb4, 0x979f1129, 0x31e81a9d, 0xf44f2413, - 0x52382fa7, 0x63d0353a, 0xc5a73e8e, 0x33ef4e67, 0x959845d3, - 0xa4705f4e, 0x020754fa, 0xc7a06a74, 0x61d761c0, 0x503f7b5d, - 0xf64870e9, 0x67de9cce, 0xc1a9977a, 0xf0418de7, 0x56368653, - 0x9391b8dd, 0x35e6b369, 0x040ea9f4, 0xa279a240, 0x5431d2a9, - 0xf246d91d, 0xc3aec380, 0x65d9c834, 0xa07ef6ba, 0x0609fd0e, - 0x37e1e793, 0x9196ec27, 0xcfbd399c, 0x69ca3228, 0x582228b5, - 0xfe552301, 0x3bf21d8f, 0x9d85163b, 0xac6d0ca6, 0x0a1a0712, - 0xfc5277fb, 0x5a257c4f, 0x6bcd66d2, 0xcdba6d66, 0x081d53e8, - 0xae6a585c, 0x9f8242c1, 0x39f54975, 0xa863a552, 0x0e14aee6, - 0x3ffcb47b, 0x998bbfcf, 0x5c2c8141, 0xfa5b8af5, 0xcbb39068, - 0x6dc49bdc, 0x9b8ceb35, 0x3dfbe081, 0x0c13fa1c, 0xaa64f1a8, - 0x6fc3cf26, 0xc9b4c492, 0xf85cde0f, 0x5e2bd5bb, 0x440b7579, - 0xe27c7ecd, 0xd3946450, 0x75e36fe4, 0xb044516a, 0x16335ade, - 0x27db4043, 0x81ac4bf7, 0x77e43b1e, 0xd19330aa, 0xe07b2a37, - 0x460c2183, 0x83ab1f0d, 0x25dc14b9, 0x14340e24, 0xb2430590, - 0x23d5e9b7, 0x85a2e203, 0xb44af89e, 0x123df32a, 0xd79acda4, - 0x71edc610, 0x4005dc8d, 0xe672d739, 0x103aa7d0, 0xb64dac64, - 0x87a5b6f9, 0x21d2bd4d, 0xe47583c3, 0x42028877, 0x73ea92ea, - 0xd59d995e, 0x8bb64ce5, 0x2dc14751, 0x1c295dcc, 0xba5e5678, - 0x7ff968f6, 0xd98e6342, 0xe86679df, 0x4e11726b, 0xb8590282, - 0x1e2e0936, 0x2fc613ab, 0x89b1181f, 0x4c162691, 0xea612d25, - 0xdb8937b8, 0x7dfe3c0c, 0xec68d02b, 0x4a1fdb9f, 0x7bf7c102, - 0xdd80cab6, 0x1827f438, 0xbe50ff8c, 0x8fb8e511, 0x29cfeea5, - 0xdf879e4c, 0x79f095f8, 0x48188f65, 0xee6f84d1, 0x2bc8ba5f, - 0x8dbfb1eb, 0xbc57ab76, 0x1a20a0c2, 0x8816eaf2, 0x2e61e146, - 0x1f89fbdb, 0xb9fef06f, 0x7c59cee1, 0xda2ec555, 0xebc6dfc8, - 0x4db1d47c, 0xbbf9a495, 0x1d8eaf21, 0x2c66b5bc, 0x8a11be08, - 0x4fb68086, 0xe9c18b32, 0xd82991af, 0x7e5e9a1b, 0xefc8763c, - 0x49bf7d88, 0x78576715, 0xde206ca1, 0x1b87522f, 0xbdf0599b, - 0x8c184306, 0x2a6f48b2, 0xdc27385b, 0x7a5033ef, 0x4bb82972, - 0xedcf22c6, 0x28681c48, 0x8e1f17fc, 0xbff70d61, 0x198006d5, - 0x47abd36e, 0xe1dcd8da, 0xd034c247, 0x7643c9f3, 0xb3e4f77d, - 0x1593fcc9, 0x247be654, 0x820cede0, 0x74449d09, 0xd23396bd, - 0xe3db8c20, 0x45ac8794, 0x800bb91a, 0x267cb2ae, 0x1794a833, - 0xb1e3a387, 0x20754fa0, 0x86024414, 0xb7ea5e89, 0x119d553d, - 0xd43a6bb3, 0x724d6007, 0x43a57a9a, 0xe5d2712e, 0x139a01c7, - 0xb5ed0a73, 0x840510ee, 0x22721b5a, 0xe7d525d4, 0x41a22e60, - 0x704a34fd, 0xd63d3f49, 0xcc1d9f8b, 0x6a6a943f, 0x5b828ea2, - 0xfdf58516, 0x3852bb98, 0x9e25b02c, 0xafcdaab1, 0x09baa105, - 0xfff2d1ec, 0x5985da58, 0x686dc0c5, 0xce1acb71, 0x0bbdf5ff, - 0xadcafe4b, 0x9c22e4d6, 0x3a55ef62, 0xabc30345, 0x0db408f1, - 0x3c5c126c, 0x9a2b19d8, 0x5f8c2756, 0xf9fb2ce2, 0xc813367f, - 0x6e643dcb, 0x982c4d22, 0x3e5b4696, 0x0fb35c0b, 0xa9c457bf, - 0x6c636931, 0xca146285, 0xfbfc7818, 0x5d8b73ac, 0x03a0a617, - 0xa5d7ada3, 0x943fb73e, 0x3248bc8a, 0xf7ef8204, 0x519889b0, - 0x6070932d, 0xc6079899, 0x304fe870, 0x9638e3c4, 0xa7d0f959, - 0x01a7f2ed, 0xc400cc63, 0x6277c7d7, 0x539fdd4a, 0xf5e8d6fe, - 0x647e3ad9, 0xc209316d, 0xf3e12bf0, 0x55962044, 0x90311eca, - 0x3646157e, 0x07ae0fe3, 0xa1d90457, 0x579174be, 0xf1e67f0a, - 0xc00e6597, 0x66796e23, 0xa3de50ad, 0x05a95b19, 0x34414184, - 0x92364a30}, - {0x00000000, 0xcb5cd3a5, 0x4dc8a10b, 0x869472ae, 0x9b914216, - 0x50cd91b3, 0xd659e31d, 0x1d0530b8, 0xec53826d, 0x270f51c8, - 0xa19b2366, 0x6ac7f0c3, 0x77c2c07b, 0xbc9e13de, 0x3a0a6170, - 0xf156b2d5, 0x03d6029b, 0xc88ad13e, 0x4e1ea390, 0x85427035, - 0x9847408d, 0x531b9328, 0xd58fe186, 0x1ed33223, 0xef8580f6, - 0x24d95353, 0xa24d21fd, 0x6911f258, 0x7414c2e0, 0xbf481145, - 0x39dc63eb, 0xf280b04e, 0x07ac0536, 0xccf0d693, 0x4a64a43d, - 0x81387798, 0x9c3d4720, 0x57619485, 0xd1f5e62b, 0x1aa9358e, - 0xebff875b, 0x20a354fe, 0xa6372650, 0x6d6bf5f5, 0x706ec54d, - 0xbb3216e8, 0x3da66446, 0xf6fab7e3, 0x047a07ad, 0xcf26d408, - 0x49b2a6a6, 0x82ee7503, 0x9feb45bb, 0x54b7961e, 0xd223e4b0, - 0x197f3715, 0xe82985c0, 0x23755665, 0xa5e124cb, 0x6ebdf76e, - 0x73b8c7d6, 0xb8e41473, 0x3e7066dd, 0xf52cb578, 0x0f580a6c, - 0xc404d9c9, 0x4290ab67, 0x89cc78c2, 0x94c9487a, 0x5f959bdf, - 0xd901e971, 0x125d3ad4, 0xe30b8801, 0x28575ba4, 0xaec3290a, - 0x659ffaaf, 0x789aca17, 0xb3c619b2, 0x35526b1c, 0xfe0eb8b9, - 0x0c8e08f7, 0xc7d2db52, 0x4146a9fc, 0x8a1a7a59, 0x971f4ae1, - 0x5c439944, 0xdad7ebea, 0x118b384f, 0xe0dd8a9a, 0x2b81593f, - 0xad152b91, 0x6649f834, 0x7b4cc88c, 0xb0101b29, 0x36846987, - 0xfdd8ba22, 0x08f40f5a, 0xc3a8dcff, 0x453cae51, 0x8e607df4, - 0x93654d4c, 0x58399ee9, 0xdeadec47, 0x15f13fe2, 0xe4a78d37, - 0x2ffb5e92, 0xa96f2c3c, 0x6233ff99, 0x7f36cf21, 0xb46a1c84, - 0x32fe6e2a, 0xf9a2bd8f, 0x0b220dc1, 0xc07ede64, 0x46eaacca, - 0x8db67f6f, 0x90b34fd7, 0x5bef9c72, 0xdd7beedc, 0x16273d79, - 0xe7718fac, 0x2c2d5c09, 0xaab92ea7, 0x61e5fd02, 0x7ce0cdba, - 0xb7bc1e1f, 0x31286cb1, 0xfa74bf14, 0x1eb014d8, 0xd5ecc77d, - 0x5378b5d3, 0x98246676, 0x852156ce, 0x4e7d856b, 0xc8e9f7c5, - 0x03b52460, 0xf2e396b5, 0x39bf4510, 0xbf2b37be, 0x7477e41b, - 0x6972d4a3, 0xa22e0706, 0x24ba75a8, 0xefe6a60d, 0x1d661643, - 0xd63ac5e6, 0x50aeb748, 0x9bf264ed, 0x86f75455, 0x4dab87f0, - 0xcb3ff55e, 0x006326fb, 0xf135942e, 0x3a69478b, 0xbcfd3525, - 0x77a1e680, 0x6aa4d638, 0xa1f8059d, 0x276c7733, 0xec30a496, - 0x191c11ee, 0xd240c24b, 0x54d4b0e5, 0x9f886340, 0x828d53f8, - 0x49d1805d, 0xcf45f2f3, 0x04192156, 0xf54f9383, 0x3e134026, - 0xb8873288, 0x73dbe12d, 0x6eded195, 0xa5820230, 0x2316709e, - 0xe84aa33b, 0x1aca1375, 0xd196c0d0, 0x5702b27e, 0x9c5e61db, - 0x815b5163, 0x4a0782c6, 0xcc93f068, 0x07cf23cd, 0xf6999118, - 0x3dc542bd, 0xbb513013, 0x700de3b6, 0x6d08d30e, 0xa65400ab, - 0x20c07205, 0xeb9ca1a0, 0x11e81eb4, 0xdab4cd11, 0x5c20bfbf, - 0x977c6c1a, 0x8a795ca2, 0x41258f07, 0xc7b1fda9, 0x0ced2e0c, - 0xfdbb9cd9, 0x36e74f7c, 0xb0733dd2, 0x7b2fee77, 0x662adecf, - 0xad760d6a, 0x2be27fc4, 0xe0beac61, 0x123e1c2f, 0xd962cf8a, - 0x5ff6bd24, 0x94aa6e81, 0x89af5e39, 0x42f38d9c, 0xc467ff32, - 0x0f3b2c97, 0xfe6d9e42, 0x35314de7, 0xb3a53f49, 0x78f9ecec, - 0x65fcdc54, 0xaea00ff1, 0x28347d5f, 0xe368aefa, 0x16441b82, - 0xdd18c827, 0x5b8cba89, 0x90d0692c, 0x8dd55994, 0x46898a31, - 0xc01df89f, 0x0b412b3a, 0xfa1799ef, 0x314b4a4a, 0xb7df38e4, - 0x7c83eb41, 0x6186dbf9, 0xaada085c, 0x2c4e7af2, 0xe712a957, - 0x15921919, 0xdececabc, 0x585ab812, 0x93066bb7, 0x8e035b0f, - 0x455f88aa, 0xc3cbfa04, 0x089729a1, 0xf9c19b74, 0x329d48d1, - 0xb4093a7f, 0x7f55e9da, 0x6250d962, 0xa90c0ac7, 0x2f987869, - 0xe4c4abcc}, - {0x00000000, 0x3d6029b0, 0x7ac05360, 0x47a07ad0, 0xf580a6c0, - 0xc8e08f70, 0x8f40f5a0, 0xb220dc10, 0x30704bc1, 0x0d106271, - 0x4ab018a1, 0x77d03111, 0xc5f0ed01, 0xf890c4b1, 0xbf30be61, - 0x825097d1, 0x60e09782, 0x5d80be32, 0x1a20c4e2, 0x2740ed52, - 0x95603142, 0xa80018f2, 0xefa06222, 0xd2c04b92, 0x5090dc43, - 0x6df0f5f3, 0x2a508f23, 0x1730a693, 0xa5107a83, 0x98705333, - 0xdfd029e3, 0xe2b00053, 0xc1c12f04, 0xfca106b4, 0xbb017c64, - 0x866155d4, 0x344189c4, 0x0921a074, 0x4e81daa4, 0x73e1f314, - 0xf1b164c5, 0xccd14d75, 0x8b7137a5, 0xb6111e15, 0x0431c205, - 0x3951ebb5, 0x7ef19165, 0x4391b8d5, 0xa121b886, 0x9c419136, - 0xdbe1ebe6, 0xe681c256, 0x54a11e46, 0x69c137f6, 0x2e614d26, - 0x13016496, 0x9151f347, 0xac31daf7, 0xeb91a027, 0xd6f18997, - 0x64d15587, 0x59b17c37, 0x1e1106e7, 0x23712f57, 0x58f35849, - 0x659371f9, 0x22330b29, 0x1f532299, 0xad73fe89, 0x9013d739, - 0xd7b3ade9, 0xead38459, 0x68831388, 0x55e33a38, 0x124340e8, - 0x2f236958, 0x9d03b548, 0xa0639cf8, 0xe7c3e628, 0xdaa3cf98, - 0x3813cfcb, 0x0573e67b, 0x42d39cab, 0x7fb3b51b, 0xcd93690b, - 0xf0f340bb, 0xb7533a6b, 0x8a3313db, 0x0863840a, 0x3503adba, - 0x72a3d76a, 0x4fc3feda, 0xfde322ca, 0xc0830b7a, 0x872371aa, - 0xba43581a, 0x9932774d, 0xa4525efd, 0xe3f2242d, 0xde920d9d, - 0x6cb2d18d, 0x51d2f83d, 0x167282ed, 0x2b12ab5d, 0xa9423c8c, - 0x9422153c, 0xd3826fec, 0xeee2465c, 0x5cc29a4c, 0x61a2b3fc, - 0x2602c92c, 0x1b62e09c, 0xf9d2e0cf, 0xc4b2c97f, 0x8312b3af, - 0xbe729a1f, 0x0c52460f, 0x31326fbf, 0x7692156f, 0x4bf23cdf, - 0xc9a2ab0e, 0xf4c282be, 0xb362f86e, 0x8e02d1de, 0x3c220dce, - 0x0142247e, 0x46e25eae, 0x7b82771e, 0xb1e6b092, 0x8c869922, - 0xcb26e3f2, 0xf646ca42, 0x44661652, 0x79063fe2, 0x3ea64532, - 0x03c66c82, 0x8196fb53, 0xbcf6d2e3, 0xfb56a833, 0xc6368183, - 0x74165d93, 0x49767423, 0x0ed60ef3, 0x33b62743, 0xd1062710, - 0xec660ea0, 0xabc67470, 0x96a65dc0, 0x248681d0, 0x19e6a860, - 0x5e46d2b0, 0x6326fb00, 0xe1766cd1, 0xdc164561, 0x9bb63fb1, - 0xa6d61601, 0x14f6ca11, 0x2996e3a1, 0x6e369971, 0x5356b0c1, - 0x70279f96, 0x4d47b626, 0x0ae7ccf6, 0x3787e546, 0x85a73956, - 0xb8c710e6, 0xff676a36, 0xc2074386, 0x4057d457, 0x7d37fde7, - 0x3a978737, 0x07f7ae87, 0xb5d77297, 0x88b75b27, 0xcf1721f7, - 0xf2770847, 0x10c70814, 0x2da721a4, 0x6a075b74, 0x576772c4, - 0xe547aed4, 0xd8278764, 0x9f87fdb4, 0xa2e7d404, 0x20b743d5, - 0x1dd76a65, 0x5a7710b5, 0x67173905, 0xd537e515, 0xe857cca5, - 0xaff7b675, 0x92979fc5, 0xe915e8db, 0xd475c16b, 0x93d5bbbb, - 0xaeb5920b, 0x1c954e1b, 0x21f567ab, 0x66551d7b, 0x5b3534cb, - 0xd965a31a, 0xe4058aaa, 0xa3a5f07a, 0x9ec5d9ca, 0x2ce505da, - 0x11852c6a, 0x562556ba, 0x6b457f0a, 0x89f57f59, 0xb49556e9, - 0xf3352c39, 0xce550589, 0x7c75d999, 0x4115f029, 0x06b58af9, - 0x3bd5a349, 0xb9853498, 0x84e51d28, 0xc34567f8, 0xfe254e48, - 0x4c059258, 0x7165bbe8, 0x36c5c138, 0x0ba5e888, 0x28d4c7df, - 0x15b4ee6f, 0x521494bf, 0x6f74bd0f, 0xdd54611f, 0xe03448af, - 0xa794327f, 0x9af41bcf, 0x18a48c1e, 0x25c4a5ae, 0x6264df7e, - 0x5f04f6ce, 0xed242ade, 0xd044036e, 0x97e479be, 0xaa84500e, - 0x4834505d, 0x755479ed, 0x32f4033d, 0x0f942a8d, 0xbdb4f69d, - 0x80d4df2d, 0xc774a5fd, 0xfa148c4d, 0x78441b9c, 0x4524322c, - 0x028448fc, 0x3fe4614c, 0x8dc4bd5c, 0xb0a494ec, 0xf704ee3c, - 0xca64c78c}, - {0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757, - 0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a, - 0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733, - 0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871, - 0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70, - 0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42, - 0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5, - 0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787, - 0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086, - 0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4, - 0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d, - 0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0, - 0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d, - 0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f, - 0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859, - 0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b, - 0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5, - 0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028, - 0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891, - 0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed, - 0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec, - 0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde, - 0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817, - 0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825, - 0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24, - 0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e, - 0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7, - 0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a, - 0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4, - 0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196, - 0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0, - 0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2, - 0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52, - 0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f, - 0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36, - 0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174, - 0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675, - 0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647, - 0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d, - 0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf, - 0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be, - 0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc, - 0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645, - 0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98, - 0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138, - 0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a, - 0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c, - 0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e, - 0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0, - 0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d, - 0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194, - 0xde0506f1}, - {0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc, - 0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f, - 0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a, - 0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29, - 0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8, - 0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023, - 0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e, - 0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065, - 0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84, - 0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7, - 0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922, - 0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71, - 0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0, - 0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b, - 0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816, - 0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd, - 0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c, - 0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f, - 0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba, - 0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579, - 0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98, - 0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873, - 0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e, - 0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5, - 0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134, - 0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7, - 0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732, - 0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461, - 0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0, - 0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b, - 0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26, - 0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd, - 0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc, - 0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef, - 0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a, - 0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049, - 0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8, - 0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43, - 0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e, - 0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5, - 0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24, - 0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07, - 0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982, - 0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1, - 0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0, - 0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b, - 0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576, - 0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d, - 0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c, - 0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f, - 0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda, - 0xbe9834ed}, - {0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504, - 0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49, - 0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e, - 0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192, - 0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859, - 0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c, - 0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620, - 0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265, - 0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae, - 0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2, - 0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175, - 0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38, - 0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05, - 0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40, - 0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f, - 0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca, - 0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850, - 0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d, - 0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da, - 0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864, - 0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af, - 0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea, - 0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74, - 0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31, - 0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa, - 0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a, - 0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd, - 0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180, - 0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a, - 0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f, - 0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290, - 0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5, - 0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed, - 0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0, - 0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167, - 0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b, - 0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0, - 0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5, - 0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc, - 0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189, - 0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842, - 0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e, - 0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299, - 0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4, - 0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec, - 0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9, - 0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66, - 0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23, - 0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9, - 0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4, - 0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33, - 0x9324fd72}, - {0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, - 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, - 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, - 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, - 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, - 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, - 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, - 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, - 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, - 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, - 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, - 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, - 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, - 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, - 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, - 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, - 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, - 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, - 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, - 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, - 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, - 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, - 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, - 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, - 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, - 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, - 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, - 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, - 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, - 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, - 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, - 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, - 0x2d02ef8d}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0x9630077700000000, 0x2c610eee00000000, - 0xba51099900000000, 0x19c46d0700000000, 0x8ff46a7000000000, - 0x35a563e900000000, 0xa395649e00000000, 0x3288db0e00000000, - 0xa4b8dc7900000000, 0x1ee9d5e000000000, 0x88d9d29700000000, - 0x2b4cb60900000000, 0xbd7cb17e00000000, 0x072db8e700000000, - 0x911dbf9000000000, 0x6410b71d00000000, 0xf220b06a00000000, - 0x4871b9f300000000, 0xde41be8400000000, 0x7dd4da1a00000000, - 0xebe4dd6d00000000, 0x51b5d4f400000000, 0xc785d38300000000, - 0x56986c1300000000, 0xc0a86b6400000000, 0x7af962fd00000000, - 0xecc9658a00000000, 0x4f5c011400000000, 0xd96c066300000000, - 0x633d0ffa00000000, 0xf50d088d00000000, 0xc8206e3b00000000, - 0x5e10694c00000000, 0xe44160d500000000, 0x727167a200000000, - 0xd1e4033c00000000, 0x47d4044b00000000, 0xfd850dd200000000, - 0x6bb50aa500000000, 0xfaa8b53500000000, 0x6c98b24200000000, - 0xd6c9bbdb00000000, 0x40f9bcac00000000, 0xe36cd83200000000, - 0x755cdf4500000000, 0xcf0dd6dc00000000, 0x593dd1ab00000000, - 0xac30d92600000000, 0x3a00de5100000000, 0x8051d7c800000000, - 0x1661d0bf00000000, 0xb5f4b42100000000, 0x23c4b35600000000, - 0x9995bacf00000000, 0x0fa5bdb800000000, 0x9eb8022800000000, - 0x0888055f00000000, 0xb2d90cc600000000, 0x24e90bb100000000, - 0x877c6f2f00000000, 0x114c685800000000, 0xab1d61c100000000, - 0x3d2d66b600000000, 0x9041dc7600000000, 0x0671db0100000000, - 0xbc20d29800000000, 0x2a10d5ef00000000, 0x8985b17100000000, - 0x1fb5b60600000000, 0xa5e4bf9f00000000, 0x33d4b8e800000000, - 0xa2c9077800000000, 0x34f9000f00000000, 0x8ea8099600000000, - 0x18980ee100000000, 0xbb0d6a7f00000000, 0x2d3d6d0800000000, - 0x976c649100000000, 0x015c63e600000000, 0xf4516b6b00000000, - 0x62616c1c00000000, 0xd830658500000000, 0x4e0062f200000000, - 0xed95066c00000000, 0x7ba5011b00000000, 0xc1f4088200000000, - 0x57c40ff500000000, 0xc6d9b06500000000, 0x50e9b71200000000, - 0xeab8be8b00000000, 0x7c88b9fc00000000, 0xdf1ddd6200000000, - 0x492dda1500000000, 0xf37cd38c00000000, 0x654cd4fb00000000, - 0x5861b24d00000000, 0xce51b53a00000000, 0x7400bca300000000, - 0xe230bbd400000000, 0x41a5df4a00000000, 0xd795d83d00000000, - 0x6dc4d1a400000000, 0xfbf4d6d300000000, 0x6ae9694300000000, - 0xfcd96e3400000000, 0x468867ad00000000, 0xd0b860da00000000, - 0x732d044400000000, 0xe51d033300000000, 0x5f4c0aaa00000000, - 0xc97c0ddd00000000, 0x3c71055000000000, 0xaa41022700000000, - 0x10100bbe00000000, 0x86200cc900000000, 0x25b5685700000000, - 0xb3856f2000000000, 0x09d466b900000000, 0x9fe461ce00000000, - 0x0ef9de5e00000000, 0x98c9d92900000000, 0x2298d0b000000000, - 0xb4a8d7c700000000, 0x173db35900000000, 0x810db42e00000000, - 0x3b5cbdb700000000, 0xad6cbac000000000, 0x2083b8ed00000000, - 0xb6b3bf9a00000000, 0x0ce2b60300000000, 0x9ad2b17400000000, - 0x3947d5ea00000000, 0xaf77d29d00000000, 0x1526db0400000000, - 0x8316dc7300000000, 0x120b63e300000000, 0x843b649400000000, - 0x3e6a6d0d00000000, 0xa85a6a7a00000000, 0x0bcf0ee400000000, - 0x9dff099300000000, 0x27ae000a00000000, 0xb19e077d00000000, - 0x44930ff000000000, 0xd2a3088700000000, 0x68f2011e00000000, - 0xfec2066900000000, 0x5d5762f700000000, 0xcb67658000000000, - 0x71366c1900000000, 0xe7066b6e00000000, 0x761bd4fe00000000, - 0xe02bd38900000000, 0x5a7ada1000000000, 0xcc4add6700000000, - 0x6fdfb9f900000000, 0xf9efbe8e00000000, 0x43beb71700000000, - 0xd58eb06000000000, 0xe8a3d6d600000000, 0x7e93d1a100000000, - 0xc4c2d83800000000, 0x52f2df4f00000000, 0xf167bbd100000000, - 0x6757bca600000000, 0xdd06b53f00000000, 0x4b36b24800000000, - 0xda2b0dd800000000, 0x4c1b0aaf00000000, 0xf64a033600000000, - 0x607a044100000000, 0xc3ef60df00000000, 0x55df67a800000000, - 0xef8e6e3100000000, 0x79be694600000000, 0x8cb361cb00000000, - 0x1a8366bc00000000, 0xa0d26f2500000000, 0x36e2685200000000, - 0x95770ccc00000000, 0x03470bbb00000000, 0xb916022200000000, - 0x2f26055500000000, 0xbe3bbac500000000, 0x280bbdb200000000, - 0x925ab42b00000000, 0x046ab35c00000000, 0xa7ffd7c200000000, - 0x31cfd0b500000000, 0x8b9ed92c00000000, 0x1daede5b00000000, - 0xb0c2649b00000000, 0x26f263ec00000000, 0x9ca36a7500000000, - 0x0a936d0200000000, 0xa906099c00000000, 0x3f360eeb00000000, - 0x8567077200000000, 0x1357000500000000, 0x824abf9500000000, - 0x147ab8e200000000, 0xae2bb17b00000000, 0x381bb60c00000000, - 0x9b8ed29200000000, 0x0dbed5e500000000, 0xb7efdc7c00000000, - 0x21dfdb0b00000000, 0xd4d2d38600000000, 0x42e2d4f100000000, - 0xf8b3dd6800000000, 0x6e83da1f00000000, 0xcd16be8100000000, - 0x5b26b9f600000000, 0xe177b06f00000000, 0x7747b71800000000, - 0xe65a088800000000, 0x706a0fff00000000, 0xca3b066600000000, - 0x5c0b011100000000, 0xff9e658f00000000, 0x69ae62f800000000, - 0xd3ff6b6100000000, 0x45cf6c1600000000, 0x78e20aa000000000, - 0xeed20dd700000000, 0x5483044e00000000, 0xc2b3033900000000, - 0x612667a700000000, 0xf71660d000000000, 0x4d47694900000000, - 0xdb776e3e00000000, 0x4a6ad1ae00000000, 0xdc5ad6d900000000, - 0x660bdf4000000000, 0xf03bd83700000000, 0x53aebca900000000, - 0xc59ebbde00000000, 0x7fcfb24700000000, 0xe9ffb53000000000, - 0x1cf2bdbd00000000, 0x8ac2baca00000000, 0x3093b35300000000, - 0xa6a3b42400000000, 0x0536d0ba00000000, 0x9306d7cd00000000, - 0x2957de5400000000, 0xbf67d92300000000, 0x2e7a66b300000000, - 0xb84a61c400000000, 0x021b685d00000000, 0x942b6f2a00000000, - 0x37be0bb400000000, 0xa18e0cc300000000, 0x1bdf055a00000000, - 0x8def022d00000000}, - {0x0000000000000000, 0x41311b1900000000, 0x8262363200000000, - 0xc3532d2b00000000, 0x04c56c6400000000, 0x45f4777d00000000, - 0x86a75a5600000000, 0xc796414f00000000, 0x088ad9c800000000, - 0x49bbc2d100000000, 0x8ae8effa00000000, 0xcbd9f4e300000000, - 0x0c4fb5ac00000000, 0x4d7eaeb500000000, 0x8e2d839e00000000, - 0xcf1c988700000000, 0x5112c24a00000000, 0x1023d95300000000, - 0xd370f47800000000, 0x9241ef6100000000, 0x55d7ae2e00000000, - 0x14e6b53700000000, 0xd7b5981c00000000, 0x9684830500000000, - 0x59981b8200000000, 0x18a9009b00000000, 0xdbfa2db000000000, - 0x9acb36a900000000, 0x5d5d77e600000000, 0x1c6c6cff00000000, - 0xdf3f41d400000000, 0x9e0e5acd00000000, 0xa224849500000000, - 0xe3159f8c00000000, 0x2046b2a700000000, 0x6177a9be00000000, - 0xa6e1e8f100000000, 0xe7d0f3e800000000, 0x2483dec300000000, - 0x65b2c5da00000000, 0xaaae5d5d00000000, 0xeb9f464400000000, - 0x28cc6b6f00000000, 0x69fd707600000000, 0xae6b313900000000, - 0xef5a2a2000000000, 0x2c09070b00000000, 0x6d381c1200000000, - 0xf33646df00000000, 0xb2075dc600000000, 0x715470ed00000000, - 0x30656bf400000000, 0xf7f32abb00000000, 0xb6c231a200000000, - 0x75911c8900000000, 0x34a0079000000000, 0xfbbc9f1700000000, - 0xba8d840e00000000, 0x79dea92500000000, 0x38efb23c00000000, - 0xff79f37300000000, 0xbe48e86a00000000, 0x7d1bc54100000000, - 0x3c2ade5800000000, 0x054f79f000000000, 0x447e62e900000000, - 0x872d4fc200000000, 0xc61c54db00000000, 0x018a159400000000, - 0x40bb0e8d00000000, 0x83e823a600000000, 0xc2d938bf00000000, - 0x0dc5a03800000000, 0x4cf4bb2100000000, 0x8fa7960a00000000, - 0xce968d1300000000, 0x0900cc5c00000000, 0x4831d74500000000, - 0x8b62fa6e00000000, 0xca53e17700000000, 0x545dbbba00000000, - 0x156ca0a300000000, 0xd63f8d8800000000, 0x970e969100000000, - 0x5098d7de00000000, 0x11a9ccc700000000, 0xd2fae1ec00000000, - 0x93cbfaf500000000, 0x5cd7627200000000, 0x1de6796b00000000, - 0xdeb5544000000000, 0x9f844f5900000000, 0x58120e1600000000, - 0x1923150f00000000, 0xda70382400000000, 0x9b41233d00000000, - 0xa76bfd6500000000, 0xe65ae67c00000000, 0x2509cb5700000000, - 0x6438d04e00000000, 0xa3ae910100000000, 0xe29f8a1800000000, - 0x21cca73300000000, 0x60fdbc2a00000000, 0xafe124ad00000000, - 0xeed03fb400000000, 0x2d83129f00000000, 0x6cb2098600000000, - 0xab2448c900000000, 0xea1553d000000000, 0x29467efb00000000, - 0x687765e200000000, 0xf6793f2f00000000, 0xb748243600000000, - 0x741b091d00000000, 0x352a120400000000, 0xf2bc534b00000000, - 0xb38d485200000000, 0x70de657900000000, 0x31ef7e6000000000, - 0xfef3e6e700000000, 0xbfc2fdfe00000000, 0x7c91d0d500000000, - 0x3da0cbcc00000000, 0xfa368a8300000000, 0xbb07919a00000000, - 0x7854bcb100000000, 0x3965a7a800000000, 0x4b98833b00000000, - 0x0aa9982200000000, 0xc9fab50900000000, 0x88cbae1000000000, - 0x4f5def5f00000000, 0x0e6cf44600000000, 0xcd3fd96d00000000, - 0x8c0ec27400000000, 0x43125af300000000, 0x022341ea00000000, - 0xc1706cc100000000, 0x804177d800000000, 0x47d7369700000000, - 0x06e62d8e00000000, 0xc5b500a500000000, 0x84841bbc00000000, - 0x1a8a417100000000, 0x5bbb5a6800000000, 0x98e8774300000000, - 0xd9d96c5a00000000, 0x1e4f2d1500000000, 0x5f7e360c00000000, - 0x9c2d1b2700000000, 0xdd1c003e00000000, 0x120098b900000000, - 0x533183a000000000, 0x9062ae8b00000000, 0xd153b59200000000, - 0x16c5f4dd00000000, 0x57f4efc400000000, 0x94a7c2ef00000000, - 0xd596d9f600000000, 0xe9bc07ae00000000, 0xa88d1cb700000000, - 0x6bde319c00000000, 0x2aef2a8500000000, 0xed796bca00000000, - 0xac4870d300000000, 0x6f1b5df800000000, 0x2e2a46e100000000, - 0xe136de6600000000, 0xa007c57f00000000, 0x6354e85400000000, - 0x2265f34d00000000, 0xe5f3b20200000000, 0xa4c2a91b00000000, - 0x6791843000000000, 0x26a09f2900000000, 0xb8aec5e400000000, - 0xf99fdefd00000000, 0x3accf3d600000000, 0x7bfde8cf00000000, - 0xbc6ba98000000000, 0xfd5ab29900000000, 0x3e099fb200000000, - 0x7f3884ab00000000, 0xb0241c2c00000000, 0xf115073500000000, - 0x32462a1e00000000, 0x7377310700000000, 0xb4e1704800000000, - 0xf5d06b5100000000, 0x3683467a00000000, 0x77b25d6300000000, - 0x4ed7facb00000000, 0x0fe6e1d200000000, 0xccb5ccf900000000, - 0x8d84d7e000000000, 0x4a1296af00000000, 0x0b238db600000000, - 0xc870a09d00000000, 0x8941bb8400000000, 0x465d230300000000, - 0x076c381a00000000, 0xc43f153100000000, 0x850e0e2800000000, - 0x42984f6700000000, 0x03a9547e00000000, 0xc0fa795500000000, - 0x81cb624c00000000, 0x1fc5388100000000, 0x5ef4239800000000, - 0x9da70eb300000000, 0xdc9615aa00000000, 0x1b0054e500000000, - 0x5a314ffc00000000, 0x996262d700000000, 0xd85379ce00000000, - 0x174fe14900000000, 0x567efa5000000000, 0x952dd77b00000000, - 0xd41ccc6200000000, 0x138a8d2d00000000, 0x52bb963400000000, - 0x91e8bb1f00000000, 0xd0d9a00600000000, 0xecf37e5e00000000, - 0xadc2654700000000, 0x6e91486c00000000, 0x2fa0537500000000, - 0xe836123a00000000, 0xa907092300000000, 0x6a54240800000000, - 0x2b653f1100000000, 0xe479a79600000000, 0xa548bc8f00000000, - 0x661b91a400000000, 0x272a8abd00000000, 0xe0bccbf200000000, - 0xa18dd0eb00000000, 0x62defdc000000000, 0x23efe6d900000000, - 0xbde1bc1400000000, 0xfcd0a70d00000000, 0x3f838a2600000000, - 0x7eb2913f00000000, 0xb924d07000000000, 0xf815cb6900000000, - 0x3b46e64200000000, 0x7a77fd5b00000000, 0xb56b65dc00000000, - 0xf45a7ec500000000, 0x370953ee00000000, 0x763848f700000000, - 0xb1ae09b800000000, 0xf09f12a100000000, 0x33cc3f8a00000000, - 0x72fd249300000000}, - {0x0000000000000000, 0x376ac20100000000, 0x6ed4840300000000, - 0x59be460200000000, 0xdca8090700000000, 0xebc2cb0600000000, - 0xb27c8d0400000000, 0x85164f0500000000, 0xb851130e00000000, - 0x8f3bd10f00000000, 0xd685970d00000000, 0xe1ef550c00000000, - 0x64f91a0900000000, 0x5393d80800000000, 0x0a2d9e0a00000000, - 0x3d475c0b00000000, 0x70a3261c00000000, 0x47c9e41d00000000, - 0x1e77a21f00000000, 0x291d601e00000000, 0xac0b2f1b00000000, - 0x9b61ed1a00000000, 0xc2dfab1800000000, 0xf5b5691900000000, - 0xc8f2351200000000, 0xff98f71300000000, 0xa626b11100000000, - 0x914c731000000000, 0x145a3c1500000000, 0x2330fe1400000000, - 0x7a8eb81600000000, 0x4de47a1700000000, 0xe0464d3800000000, - 0xd72c8f3900000000, 0x8e92c93b00000000, 0xb9f80b3a00000000, - 0x3cee443f00000000, 0x0b84863e00000000, 0x523ac03c00000000, - 0x6550023d00000000, 0x58175e3600000000, 0x6f7d9c3700000000, - 0x36c3da3500000000, 0x01a9183400000000, 0x84bf573100000000, - 0xb3d5953000000000, 0xea6bd33200000000, 0xdd01113300000000, - 0x90e56b2400000000, 0xa78fa92500000000, 0xfe31ef2700000000, - 0xc95b2d2600000000, 0x4c4d622300000000, 0x7b27a02200000000, - 0x2299e62000000000, 0x15f3242100000000, 0x28b4782a00000000, - 0x1fdeba2b00000000, 0x4660fc2900000000, 0x710a3e2800000000, - 0xf41c712d00000000, 0xc376b32c00000000, 0x9ac8f52e00000000, - 0xada2372f00000000, 0xc08d9a7000000000, 0xf7e7587100000000, - 0xae591e7300000000, 0x9933dc7200000000, 0x1c25937700000000, - 0x2b4f517600000000, 0x72f1177400000000, 0x459bd57500000000, - 0x78dc897e00000000, 0x4fb64b7f00000000, 0x16080d7d00000000, - 0x2162cf7c00000000, 0xa474807900000000, 0x931e427800000000, - 0xcaa0047a00000000, 0xfdcac67b00000000, 0xb02ebc6c00000000, - 0x87447e6d00000000, 0xdefa386f00000000, 0xe990fa6e00000000, - 0x6c86b56b00000000, 0x5bec776a00000000, 0x0252316800000000, - 0x3538f36900000000, 0x087faf6200000000, 0x3f156d6300000000, - 0x66ab2b6100000000, 0x51c1e96000000000, 0xd4d7a66500000000, - 0xe3bd646400000000, 0xba03226600000000, 0x8d69e06700000000, - 0x20cbd74800000000, 0x17a1154900000000, 0x4e1f534b00000000, - 0x7975914a00000000, 0xfc63de4f00000000, 0xcb091c4e00000000, - 0x92b75a4c00000000, 0xa5dd984d00000000, 0x989ac44600000000, - 0xaff0064700000000, 0xf64e404500000000, 0xc124824400000000, - 0x4432cd4100000000, 0x73580f4000000000, 0x2ae6494200000000, - 0x1d8c8b4300000000, 0x5068f15400000000, 0x6702335500000000, - 0x3ebc755700000000, 0x09d6b75600000000, 0x8cc0f85300000000, - 0xbbaa3a5200000000, 0xe2147c5000000000, 0xd57ebe5100000000, - 0xe839e25a00000000, 0xdf53205b00000000, 0x86ed665900000000, - 0xb187a45800000000, 0x3491eb5d00000000, 0x03fb295c00000000, - 0x5a456f5e00000000, 0x6d2fad5f00000000, 0x801b35e100000000, - 0xb771f7e000000000, 0xeecfb1e200000000, 0xd9a573e300000000, - 0x5cb33ce600000000, 0x6bd9fee700000000, 0x3267b8e500000000, - 0x050d7ae400000000, 0x384a26ef00000000, 0x0f20e4ee00000000, - 0x569ea2ec00000000, 0x61f460ed00000000, 0xe4e22fe800000000, - 0xd388ede900000000, 0x8a36abeb00000000, 0xbd5c69ea00000000, - 0xf0b813fd00000000, 0xc7d2d1fc00000000, 0x9e6c97fe00000000, - 0xa90655ff00000000, 0x2c101afa00000000, 0x1b7ad8fb00000000, - 0x42c49ef900000000, 0x75ae5cf800000000, 0x48e900f300000000, - 0x7f83c2f200000000, 0x263d84f000000000, 0x115746f100000000, - 0x944109f400000000, 0xa32bcbf500000000, 0xfa958df700000000, - 0xcdff4ff600000000, 0x605d78d900000000, 0x5737bad800000000, - 0x0e89fcda00000000, 0x39e33edb00000000, 0xbcf571de00000000, - 0x8b9fb3df00000000, 0xd221f5dd00000000, 0xe54b37dc00000000, - 0xd80c6bd700000000, 0xef66a9d600000000, 0xb6d8efd400000000, - 0x81b22dd500000000, 0x04a462d000000000, 0x33cea0d100000000, - 0x6a70e6d300000000, 0x5d1a24d200000000, 0x10fe5ec500000000, - 0x27949cc400000000, 0x7e2adac600000000, 0x494018c700000000, - 0xcc5657c200000000, 0xfb3c95c300000000, 0xa282d3c100000000, - 0x95e811c000000000, 0xa8af4dcb00000000, 0x9fc58fca00000000, - 0xc67bc9c800000000, 0xf1110bc900000000, 0x740744cc00000000, - 0x436d86cd00000000, 0x1ad3c0cf00000000, 0x2db902ce00000000, - 0x4096af9100000000, 0x77fc6d9000000000, 0x2e422b9200000000, - 0x1928e99300000000, 0x9c3ea69600000000, 0xab54649700000000, - 0xf2ea229500000000, 0xc580e09400000000, 0xf8c7bc9f00000000, - 0xcfad7e9e00000000, 0x9613389c00000000, 0xa179fa9d00000000, - 0x246fb59800000000, 0x1305779900000000, 0x4abb319b00000000, - 0x7dd1f39a00000000, 0x3035898d00000000, 0x075f4b8c00000000, - 0x5ee10d8e00000000, 0x698bcf8f00000000, 0xec9d808a00000000, - 0xdbf7428b00000000, 0x8249048900000000, 0xb523c68800000000, - 0x88649a8300000000, 0xbf0e588200000000, 0xe6b01e8000000000, - 0xd1dadc8100000000, 0x54cc938400000000, 0x63a6518500000000, - 0x3a18178700000000, 0x0d72d58600000000, 0xa0d0e2a900000000, - 0x97ba20a800000000, 0xce0466aa00000000, 0xf96ea4ab00000000, - 0x7c78ebae00000000, 0x4b1229af00000000, 0x12ac6fad00000000, - 0x25c6adac00000000, 0x1881f1a700000000, 0x2feb33a600000000, - 0x765575a400000000, 0x413fb7a500000000, 0xc429f8a000000000, - 0xf3433aa100000000, 0xaafd7ca300000000, 0x9d97bea200000000, - 0xd073c4b500000000, 0xe71906b400000000, 0xbea740b600000000, - 0x89cd82b700000000, 0x0cdbcdb200000000, 0x3bb10fb300000000, - 0x620f49b100000000, 0x55658bb000000000, 0x6822d7bb00000000, - 0x5f4815ba00000000, 0x06f653b800000000, 0x319c91b900000000, - 0xb48adebc00000000, 0x83e01cbd00000000, 0xda5e5abf00000000, - 0xed3498be00000000}, - {0x0000000000000000, 0x6567bcb800000000, 0x8bc809aa00000000, - 0xeeafb51200000000, 0x5797628f00000000, 0x32f0de3700000000, - 0xdc5f6b2500000000, 0xb938d79d00000000, 0xef28b4c500000000, - 0x8a4f087d00000000, 0x64e0bd6f00000000, 0x018701d700000000, - 0xb8bfd64a00000000, 0xddd86af200000000, 0x3377dfe000000000, - 0x5610635800000000, 0x9f57195000000000, 0xfa30a5e800000000, - 0x149f10fa00000000, 0x71f8ac4200000000, 0xc8c07bdf00000000, - 0xada7c76700000000, 0x4308727500000000, 0x266fcecd00000000, - 0x707fad9500000000, 0x1518112d00000000, 0xfbb7a43f00000000, - 0x9ed0188700000000, 0x27e8cf1a00000000, 0x428f73a200000000, - 0xac20c6b000000000, 0xc9477a0800000000, 0x3eaf32a000000000, - 0x5bc88e1800000000, 0xb5673b0a00000000, 0xd00087b200000000, - 0x6938502f00000000, 0x0c5fec9700000000, 0xe2f0598500000000, - 0x8797e53d00000000, 0xd187866500000000, 0xb4e03add00000000, - 0x5a4f8fcf00000000, 0x3f28337700000000, 0x8610e4ea00000000, - 0xe377585200000000, 0x0dd8ed4000000000, 0x68bf51f800000000, - 0xa1f82bf000000000, 0xc49f974800000000, 0x2a30225a00000000, - 0x4f579ee200000000, 0xf66f497f00000000, 0x9308f5c700000000, - 0x7da740d500000000, 0x18c0fc6d00000000, 0x4ed09f3500000000, - 0x2bb7238d00000000, 0xc518969f00000000, 0xa07f2a2700000000, - 0x1947fdba00000000, 0x7c20410200000000, 0x928ff41000000000, - 0xf7e848a800000000, 0x3d58149b00000000, 0x583fa82300000000, - 0xb6901d3100000000, 0xd3f7a18900000000, 0x6acf761400000000, - 0x0fa8caac00000000, 0xe1077fbe00000000, 0x8460c30600000000, - 0xd270a05e00000000, 0xb7171ce600000000, 0x59b8a9f400000000, - 0x3cdf154c00000000, 0x85e7c2d100000000, 0xe0807e6900000000, - 0x0e2fcb7b00000000, 0x6b4877c300000000, 0xa20f0dcb00000000, - 0xc768b17300000000, 0x29c7046100000000, 0x4ca0b8d900000000, - 0xf5986f4400000000, 0x90ffd3fc00000000, 0x7e5066ee00000000, - 0x1b37da5600000000, 0x4d27b90e00000000, 0x284005b600000000, - 0xc6efb0a400000000, 0xa3880c1c00000000, 0x1ab0db8100000000, - 0x7fd7673900000000, 0x9178d22b00000000, 0xf41f6e9300000000, - 0x03f7263b00000000, 0x66909a8300000000, 0x883f2f9100000000, - 0xed58932900000000, 0x546044b400000000, 0x3107f80c00000000, - 0xdfa84d1e00000000, 0xbacff1a600000000, 0xecdf92fe00000000, - 0x89b82e4600000000, 0x67179b5400000000, 0x027027ec00000000, - 0xbb48f07100000000, 0xde2f4cc900000000, 0x3080f9db00000000, - 0x55e7456300000000, 0x9ca03f6b00000000, 0xf9c783d300000000, - 0x176836c100000000, 0x720f8a7900000000, 0xcb375de400000000, - 0xae50e15c00000000, 0x40ff544e00000000, 0x2598e8f600000000, - 0x73888bae00000000, 0x16ef371600000000, 0xf840820400000000, - 0x9d273ebc00000000, 0x241fe92100000000, 0x4178559900000000, - 0xafd7e08b00000000, 0xcab05c3300000000, 0x3bb659ed00000000, - 0x5ed1e55500000000, 0xb07e504700000000, 0xd519ecff00000000, - 0x6c213b6200000000, 0x094687da00000000, 0xe7e932c800000000, - 0x828e8e7000000000, 0xd49eed2800000000, 0xb1f9519000000000, - 0x5f56e48200000000, 0x3a31583a00000000, 0x83098fa700000000, - 0xe66e331f00000000, 0x08c1860d00000000, 0x6da63ab500000000, - 0xa4e140bd00000000, 0xc186fc0500000000, 0x2f29491700000000, - 0x4a4ef5af00000000, 0xf376223200000000, 0x96119e8a00000000, - 0x78be2b9800000000, 0x1dd9972000000000, 0x4bc9f47800000000, - 0x2eae48c000000000, 0xc001fdd200000000, 0xa566416a00000000, - 0x1c5e96f700000000, 0x79392a4f00000000, 0x97969f5d00000000, - 0xf2f123e500000000, 0x05196b4d00000000, 0x607ed7f500000000, - 0x8ed162e700000000, 0xebb6de5f00000000, 0x528e09c200000000, - 0x37e9b57a00000000, 0xd946006800000000, 0xbc21bcd000000000, - 0xea31df8800000000, 0x8f56633000000000, 0x61f9d62200000000, - 0x049e6a9a00000000, 0xbda6bd0700000000, 0xd8c101bf00000000, - 0x366eb4ad00000000, 0x5309081500000000, 0x9a4e721d00000000, - 0xff29cea500000000, 0x11867bb700000000, 0x74e1c70f00000000, - 0xcdd9109200000000, 0xa8beac2a00000000, 0x4611193800000000, - 0x2376a58000000000, 0x7566c6d800000000, 0x10017a6000000000, - 0xfeaecf7200000000, 0x9bc973ca00000000, 0x22f1a45700000000, - 0x479618ef00000000, 0xa939adfd00000000, 0xcc5e114500000000, - 0x06ee4d7600000000, 0x6389f1ce00000000, 0x8d2644dc00000000, - 0xe841f86400000000, 0x51792ff900000000, 0x341e934100000000, - 0xdab1265300000000, 0xbfd69aeb00000000, 0xe9c6f9b300000000, - 0x8ca1450b00000000, 0x620ef01900000000, 0x07694ca100000000, - 0xbe519b3c00000000, 0xdb36278400000000, 0x3599929600000000, - 0x50fe2e2e00000000, 0x99b9542600000000, 0xfcdee89e00000000, - 0x12715d8c00000000, 0x7716e13400000000, 0xce2e36a900000000, - 0xab498a1100000000, 0x45e63f0300000000, 0x208183bb00000000, - 0x7691e0e300000000, 0x13f65c5b00000000, 0xfd59e94900000000, - 0x983e55f100000000, 0x2106826c00000000, 0x44613ed400000000, - 0xaace8bc600000000, 0xcfa9377e00000000, 0x38417fd600000000, - 0x5d26c36e00000000, 0xb389767c00000000, 0xd6eecac400000000, - 0x6fd61d5900000000, 0x0ab1a1e100000000, 0xe41e14f300000000, - 0x8179a84b00000000, 0xd769cb1300000000, 0xb20e77ab00000000, - 0x5ca1c2b900000000, 0x39c67e0100000000, 0x80fea99c00000000, - 0xe599152400000000, 0x0b36a03600000000, 0x6e511c8e00000000, - 0xa716668600000000, 0xc271da3e00000000, 0x2cde6f2c00000000, - 0x49b9d39400000000, 0xf081040900000000, 0x95e6b8b100000000, - 0x7b490da300000000, 0x1e2eb11b00000000, 0x483ed24300000000, - 0x2d596efb00000000, 0xc3f6dbe900000000, 0xa691675100000000, - 0x1fa9b0cc00000000, 0x7ace0c7400000000, 0x9461b96600000000, - 0xf10605de00000000}, - {0x0000000000000000, 0xb029603d00000000, 0x6053c07a00000000, - 0xd07aa04700000000, 0xc0a680f500000000, 0x708fe0c800000000, - 0xa0f5408f00000000, 0x10dc20b200000000, 0xc14b703000000000, - 0x7162100d00000000, 0xa118b04a00000000, 0x1131d07700000000, - 0x01edf0c500000000, 0xb1c490f800000000, 0x61be30bf00000000, - 0xd197508200000000, 0x8297e06000000000, 0x32be805d00000000, - 0xe2c4201a00000000, 0x52ed402700000000, 0x4231609500000000, - 0xf21800a800000000, 0x2262a0ef00000000, 0x924bc0d200000000, - 0x43dc905000000000, 0xf3f5f06d00000000, 0x238f502a00000000, - 0x93a6301700000000, 0x837a10a500000000, 0x3353709800000000, - 0xe329d0df00000000, 0x5300b0e200000000, 0x042fc1c100000000, - 0xb406a1fc00000000, 0x647c01bb00000000, 0xd455618600000000, - 0xc489413400000000, 0x74a0210900000000, 0xa4da814e00000000, - 0x14f3e17300000000, 0xc564b1f100000000, 0x754dd1cc00000000, - 0xa537718b00000000, 0x151e11b600000000, 0x05c2310400000000, - 0xb5eb513900000000, 0x6591f17e00000000, 0xd5b8914300000000, - 0x86b821a100000000, 0x3691419c00000000, 0xe6ebe1db00000000, - 0x56c281e600000000, 0x461ea15400000000, 0xf637c16900000000, - 0x264d612e00000000, 0x9664011300000000, 0x47f3519100000000, - 0xf7da31ac00000000, 0x27a091eb00000000, 0x9789f1d600000000, - 0x8755d16400000000, 0x377cb15900000000, 0xe706111e00000000, - 0x572f712300000000, 0x4958f35800000000, 0xf971936500000000, - 0x290b332200000000, 0x9922531f00000000, 0x89fe73ad00000000, - 0x39d7139000000000, 0xe9adb3d700000000, 0x5984d3ea00000000, - 0x8813836800000000, 0x383ae35500000000, 0xe840431200000000, - 0x5869232f00000000, 0x48b5039d00000000, 0xf89c63a000000000, - 0x28e6c3e700000000, 0x98cfa3da00000000, 0xcbcf133800000000, - 0x7be6730500000000, 0xab9cd34200000000, 0x1bb5b37f00000000, - 0x0b6993cd00000000, 0xbb40f3f000000000, 0x6b3a53b700000000, - 0xdb13338a00000000, 0x0a84630800000000, 0xbaad033500000000, - 0x6ad7a37200000000, 0xdafec34f00000000, 0xca22e3fd00000000, - 0x7a0b83c000000000, 0xaa71238700000000, 0x1a5843ba00000000, - 0x4d77329900000000, 0xfd5e52a400000000, 0x2d24f2e300000000, - 0x9d0d92de00000000, 0x8dd1b26c00000000, 0x3df8d25100000000, - 0xed82721600000000, 0x5dab122b00000000, 0x8c3c42a900000000, - 0x3c15229400000000, 0xec6f82d300000000, 0x5c46e2ee00000000, - 0x4c9ac25c00000000, 0xfcb3a26100000000, 0x2cc9022600000000, - 0x9ce0621b00000000, 0xcfe0d2f900000000, 0x7fc9b2c400000000, - 0xafb3128300000000, 0x1f9a72be00000000, 0x0f46520c00000000, - 0xbf6f323100000000, 0x6f15927600000000, 0xdf3cf24b00000000, - 0x0eaba2c900000000, 0xbe82c2f400000000, 0x6ef862b300000000, - 0xded1028e00000000, 0xce0d223c00000000, 0x7e24420100000000, - 0xae5ee24600000000, 0x1e77827b00000000, 0x92b0e6b100000000, - 0x2299868c00000000, 0xf2e326cb00000000, 0x42ca46f600000000, - 0x5216664400000000, 0xe23f067900000000, 0x3245a63e00000000, - 0x826cc60300000000, 0x53fb968100000000, 0xe3d2f6bc00000000, - 0x33a856fb00000000, 0x838136c600000000, 0x935d167400000000, - 0x2374764900000000, 0xf30ed60e00000000, 0x4327b63300000000, - 0x102706d100000000, 0xa00e66ec00000000, 0x7074c6ab00000000, - 0xc05da69600000000, 0xd081862400000000, 0x60a8e61900000000, - 0xb0d2465e00000000, 0x00fb266300000000, 0xd16c76e100000000, - 0x614516dc00000000, 0xb13fb69b00000000, 0x0116d6a600000000, - 0x11caf61400000000, 0xa1e3962900000000, 0x7199366e00000000, - 0xc1b0565300000000, 0x969f277000000000, 0x26b6474d00000000, - 0xf6cce70a00000000, 0x46e5873700000000, 0x5639a78500000000, - 0xe610c7b800000000, 0x366a67ff00000000, 0x864307c200000000, - 0x57d4574000000000, 0xe7fd377d00000000, 0x3787973a00000000, - 0x87aef70700000000, 0x9772d7b500000000, 0x275bb78800000000, - 0xf72117cf00000000, 0x470877f200000000, 0x1408c71000000000, - 0xa421a72d00000000, 0x745b076a00000000, 0xc472675700000000, - 0xd4ae47e500000000, 0x648727d800000000, 0xb4fd879f00000000, - 0x04d4e7a200000000, 0xd543b72000000000, 0x656ad71d00000000, - 0xb510775a00000000, 0x0539176700000000, 0x15e537d500000000, - 0xa5cc57e800000000, 0x75b6f7af00000000, 0xc59f979200000000, - 0xdbe815e900000000, 0x6bc175d400000000, 0xbbbbd59300000000, - 0x0b92b5ae00000000, 0x1b4e951c00000000, 0xab67f52100000000, - 0x7b1d556600000000, 0xcb34355b00000000, 0x1aa365d900000000, - 0xaa8a05e400000000, 0x7af0a5a300000000, 0xcad9c59e00000000, - 0xda05e52c00000000, 0x6a2c851100000000, 0xba56255600000000, - 0x0a7f456b00000000, 0x597ff58900000000, 0xe95695b400000000, - 0x392c35f300000000, 0x890555ce00000000, 0x99d9757c00000000, - 0x29f0154100000000, 0xf98ab50600000000, 0x49a3d53b00000000, - 0x983485b900000000, 0x281de58400000000, 0xf86745c300000000, - 0x484e25fe00000000, 0x5892054c00000000, 0xe8bb657100000000, - 0x38c1c53600000000, 0x88e8a50b00000000, 0xdfc7d42800000000, - 0x6feeb41500000000, 0xbf94145200000000, 0x0fbd746f00000000, - 0x1f6154dd00000000, 0xaf4834e000000000, 0x7f3294a700000000, - 0xcf1bf49a00000000, 0x1e8ca41800000000, 0xaea5c42500000000, - 0x7edf646200000000, 0xcef6045f00000000, 0xde2a24ed00000000, - 0x6e0344d000000000, 0xbe79e49700000000, 0x0e5084aa00000000, - 0x5d50344800000000, 0xed79547500000000, 0x3d03f43200000000, - 0x8d2a940f00000000, 0x9df6b4bd00000000, 0x2ddfd48000000000, - 0xfda574c700000000, 0x4d8c14fa00000000, 0x9c1b447800000000, - 0x2c32244500000000, 0xfc48840200000000, 0x4c61e43f00000000, - 0x5cbdc48d00000000, 0xec94a4b000000000, 0x3cee04f700000000, - 0x8cc764ca00000000}, - {0x0000000000000000, 0xa5d35ccb00000000, 0x0ba1c84d00000000, - 0xae72948600000000, 0x1642919b00000000, 0xb391cd5000000000, - 0x1de359d600000000, 0xb830051d00000000, 0x6d8253ec00000000, - 0xc8510f2700000000, 0x66239ba100000000, 0xc3f0c76a00000000, - 0x7bc0c27700000000, 0xde139ebc00000000, 0x70610a3a00000000, - 0xd5b256f100000000, 0x9b02d60300000000, 0x3ed18ac800000000, - 0x90a31e4e00000000, 0x3570428500000000, 0x8d40479800000000, - 0x28931b5300000000, 0x86e18fd500000000, 0x2332d31e00000000, - 0xf68085ef00000000, 0x5353d92400000000, 0xfd214da200000000, - 0x58f2116900000000, 0xe0c2147400000000, 0x451148bf00000000, - 0xeb63dc3900000000, 0x4eb080f200000000, 0x3605ac0700000000, - 0x93d6f0cc00000000, 0x3da4644a00000000, 0x9877388100000000, - 0x20473d9c00000000, 0x8594615700000000, 0x2be6f5d100000000, - 0x8e35a91a00000000, 0x5b87ffeb00000000, 0xfe54a32000000000, - 0x502637a600000000, 0xf5f56b6d00000000, 0x4dc56e7000000000, - 0xe81632bb00000000, 0x4664a63d00000000, 0xe3b7faf600000000, - 0xad077a0400000000, 0x08d426cf00000000, 0xa6a6b24900000000, - 0x0375ee8200000000, 0xbb45eb9f00000000, 0x1e96b75400000000, - 0xb0e423d200000000, 0x15377f1900000000, 0xc08529e800000000, - 0x6556752300000000, 0xcb24e1a500000000, 0x6ef7bd6e00000000, - 0xd6c7b87300000000, 0x7314e4b800000000, 0xdd66703e00000000, - 0x78b52cf500000000, 0x6c0a580f00000000, 0xc9d904c400000000, - 0x67ab904200000000, 0xc278cc8900000000, 0x7a48c99400000000, - 0xdf9b955f00000000, 0x71e901d900000000, 0xd43a5d1200000000, - 0x01880be300000000, 0xa45b572800000000, 0x0a29c3ae00000000, - 0xaffa9f6500000000, 0x17ca9a7800000000, 0xb219c6b300000000, - 0x1c6b523500000000, 0xb9b80efe00000000, 0xf7088e0c00000000, - 0x52dbd2c700000000, 0xfca9464100000000, 0x597a1a8a00000000, - 0xe14a1f9700000000, 0x4499435c00000000, 0xeaebd7da00000000, - 0x4f388b1100000000, 0x9a8adde000000000, 0x3f59812b00000000, - 0x912b15ad00000000, 0x34f8496600000000, 0x8cc84c7b00000000, - 0x291b10b000000000, 0x8769843600000000, 0x22bad8fd00000000, - 0x5a0ff40800000000, 0xffdca8c300000000, 0x51ae3c4500000000, - 0xf47d608e00000000, 0x4c4d659300000000, 0xe99e395800000000, - 0x47ecadde00000000, 0xe23ff11500000000, 0x378da7e400000000, - 0x925efb2f00000000, 0x3c2c6fa900000000, 0x99ff336200000000, - 0x21cf367f00000000, 0x841c6ab400000000, 0x2a6efe3200000000, - 0x8fbda2f900000000, 0xc10d220b00000000, 0x64de7ec000000000, - 0xcaacea4600000000, 0x6f7fb68d00000000, 0xd74fb39000000000, - 0x729cef5b00000000, 0xdcee7bdd00000000, 0x793d271600000000, - 0xac8f71e700000000, 0x095c2d2c00000000, 0xa72eb9aa00000000, - 0x02fde56100000000, 0xbacde07c00000000, 0x1f1ebcb700000000, - 0xb16c283100000000, 0x14bf74fa00000000, 0xd814b01e00000000, - 0x7dc7ecd500000000, 0xd3b5785300000000, 0x7666249800000000, - 0xce56218500000000, 0x6b857d4e00000000, 0xc5f7e9c800000000, - 0x6024b50300000000, 0xb596e3f200000000, 0x1045bf3900000000, - 0xbe372bbf00000000, 0x1be4777400000000, 0xa3d4726900000000, - 0x06072ea200000000, 0xa875ba2400000000, 0x0da6e6ef00000000, - 0x4316661d00000000, 0xe6c53ad600000000, 0x48b7ae5000000000, - 0xed64f29b00000000, 0x5554f78600000000, 0xf087ab4d00000000, - 0x5ef53fcb00000000, 0xfb26630000000000, 0x2e9435f100000000, - 0x8b47693a00000000, 0x2535fdbc00000000, 0x80e6a17700000000, - 0x38d6a46a00000000, 0x9d05f8a100000000, 0x33776c2700000000, - 0x96a430ec00000000, 0xee111c1900000000, 0x4bc240d200000000, - 0xe5b0d45400000000, 0x4063889f00000000, 0xf8538d8200000000, - 0x5d80d14900000000, 0xf3f245cf00000000, 0x5621190400000000, - 0x83934ff500000000, 0x2640133e00000000, 0x883287b800000000, - 0x2de1db7300000000, 0x95d1de6e00000000, 0x300282a500000000, - 0x9e70162300000000, 0x3ba34ae800000000, 0x7513ca1a00000000, - 0xd0c096d100000000, 0x7eb2025700000000, 0xdb615e9c00000000, - 0x63515b8100000000, 0xc682074a00000000, 0x68f093cc00000000, - 0xcd23cf0700000000, 0x189199f600000000, 0xbd42c53d00000000, - 0x133051bb00000000, 0xb6e30d7000000000, 0x0ed3086d00000000, - 0xab0054a600000000, 0x0572c02000000000, 0xa0a19ceb00000000, - 0xb41ee81100000000, 0x11cdb4da00000000, 0xbfbf205c00000000, - 0x1a6c7c9700000000, 0xa25c798a00000000, 0x078f254100000000, - 0xa9fdb1c700000000, 0x0c2eed0c00000000, 0xd99cbbfd00000000, - 0x7c4fe73600000000, 0xd23d73b000000000, 0x77ee2f7b00000000, - 0xcfde2a6600000000, 0x6a0d76ad00000000, 0xc47fe22b00000000, - 0x61acbee000000000, 0x2f1c3e1200000000, 0x8acf62d900000000, - 0x24bdf65f00000000, 0x816eaa9400000000, 0x395eaf8900000000, - 0x9c8df34200000000, 0x32ff67c400000000, 0x972c3b0f00000000, - 0x429e6dfe00000000, 0xe74d313500000000, 0x493fa5b300000000, - 0xececf97800000000, 0x54dcfc6500000000, 0xf10fa0ae00000000, - 0x5f7d342800000000, 0xfaae68e300000000, 0x821b441600000000, - 0x27c818dd00000000, 0x89ba8c5b00000000, 0x2c69d09000000000, - 0x9459d58d00000000, 0x318a894600000000, 0x9ff81dc000000000, - 0x3a2b410b00000000, 0xef9917fa00000000, 0x4a4a4b3100000000, - 0xe438dfb700000000, 0x41eb837c00000000, 0xf9db866100000000, - 0x5c08daaa00000000, 0xf27a4e2c00000000, 0x57a912e700000000, - 0x1919921500000000, 0xbccacede00000000, 0x12b85a5800000000, - 0xb76b069300000000, 0x0f5b038e00000000, 0xaa885f4500000000, - 0x04facbc300000000, 0xa129970800000000, 0x749bc1f900000000, - 0xd1489d3200000000, 0x7f3a09b400000000, 0xdae9557f00000000, - 0x62d9506200000000, 0xc70a0ca900000000, 0x6978982f00000000, - 0xccabc4e400000000}, - {0x0000000000000000, 0xb40b77a600000000, 0x29119f9700000000, - 0x9d1ae83100000000, 0x13244ff400000000, 0xa72f385200000000, - 0x3a35d06300000000, 0x8e3ea7c500000000, 0x674eef3300000000, - 0xd345989500000000, 0x4e5f70a400000000, 0xfa54070200000000, - 0x746aa0c700000000, 0xc061d76100000000, 0x5d7b3f5000000000, - 0xe97048f600000000, 0xce9cde6700000000, 0x7a97a9c100000000, - 0xe78d41f000000000, 0x5386365600000000, 0xddb8919300000000, - 0x69b3e63500000000, 0xf4a90e0400000000, 0x40a279a200000000, - 0xa9d2315400000000, 0x1dd946f200000000, 0x80c3aec300000000, - 0x34c8d96500000000, 0xbaf67ea000000000, 0x0efd090600000000, - 0x93e7e13700000000, 0x27ec969100000000, 0x9c39bdcf00000000, - 0x2832ca6900000000, 0xb528225800000000, 0x012355fe00000000, - 0x8f1df23b00000000, 0x3b16859d00000000, 0xa60c6dac00000000, - 0x12071a0a00000000, 0xfb7752fc00000000, 0x4f7c255a00000000, - 0xd266cd6b00000000, 0x666dbacd00000000, 0xe8531d0800000000, - 0x5c586aae00000000, 0xc142829f00000000, 0x7549f53900000000, - 0x52a563a800000000, 0xe6ae140e00000000, 0x7bb4fc3f00000000, - 0xcfbf8b9900000000, 0x41812c5c00000000, 0xf58a5bfa00000000, - 0x6890b3cb00000000, 0xdc9bc46d00000000, 0x35eb8c9b00000000, - 0x81e0fb3d00000000, 0x1cfa130c00000000, 0xa8f164aa00000000, - 0x26cfc36f00000000, 0x92c4b4c900000000, 0x0fde5cf800000000, - 0xbbd52b5e00000000, 0x79750b4400000000, 0xcd7e7ce200000000, - 0x506494d300000000, 0xe46fe37500000000, 0x6a5144b000000000, - 0xde5a331600000000, 0x4340db2700000000, 0xf74bac8100000000, - 0x1e3be47700000000, 0xaa3093d100000000, 0x372a7be000000000, - 0x83210c4600000000, 0x0d1fab8300000000, 0xb914dc2500000000, - 0x240e341400000000, 0x900543b200000000, 0xb7e9d52300000000, - 0x03e2a28500000000, 0x9ef84ab400000000, 0x2af33d1200000000, - 0xa4cd9ad700000000, 0x10c6ed7100000000, 0x8ddc054000000000, - 0x39d772e600000000, 0xd0a73a1000000000, 0x64ac4db600000000, - 0xf9b6a58700000000, 0x4dbdd22100000000, 0xc38375e400000000, - 0x7788024200000000, 0xea92ea7300000000, 0x5e999dd500000000, - 0xe54cb68b00000000, 0x5147c12d00000000, 0xcc5d291c00000000, - 0x78565eba00000000, 0xf668f97f00000000, 0x42638ed900000000, - 0xdf7966e800000000, 0x6b72114e00000000, 0x820259b800000000, - 0x36092e1e00000000, 0xab13c62f00000000, 0x1f18b18900000000, - 0x9126164c00000000, 0x252d61ea00000000, 0xb83789db00000000, - 0x0c3cfe7d00000000, 0x2bd068ec00000000, 0x9fdb1f4a00000000, - 0x02c1f77b00000000, 0xb6ca80dd00000000, 0x38f4271800000000, - 0x8cff50be00000000, 0x11e5b88f00000000, 0xa5eecf2900000000, - 0x4c9e87df00000000, 0xf895f07900000000, 0x658f184800000000, - 0xd1846fee00000000, 0x5fbac82b00000000, 0xebb1bf8d00000000, - 0x76ab57bc00000000, 0xc2a0201a00000000, 0xf2ea168800000000, - 0x46e1612e00000000, 0xdbfb891f00000000, 0x6ff0feb900000000, - 0xe1ce597c00000000, 0x55c52eda00000000, 0xc8dfc6eb00000000, - 0x7cd4b14d00000000, 0x95a4f9bb00000000, 0x21af8e1d00000000, - 0xbcb5662c00000000, 0x08be118a00000000, 0x8680b64f00000000, - 0x328bc1e900000000, 0xaf9129d800000000, 0x1b9a5e7e00000000, - 0x3c76c8ef00000000, 0x887dbf4900000000, 0x1567577800000000, - 0xa16c20de00000000, 0x2f52871b00000000, 0x9b59f0bd00000000, - 0x0643188c00000000, 0xb2486f2a00000000, 0x5b3827dc00000000, - 0xef33507a00000000, 0x7229b84b00000000, 0xc622cfed00000000, - 0x481c682800000000, 0xfc171f8e00000000, 0x610df7bf00000000, - 0xd506801900000000, 0x6ed3ab4700000000, 0xdad8dce100000000, - 0x47c234d000000000, 0xf3c9437600000000, 0x7df7e4b300000000, - 0xc9fc931500000000, 0x54e67b2400000000, 0xe0ed0c8200000000, - 0x099d447400000000, 0xbd9633d200000000, 0x208cdbe300000000, - 0x9487ac4500000000, 0x1ab90b8000000000, 0xaeb27c2600000000, - 0x33a8941700000000, 0x87a3e3b100000000, 0xa04f752000000000, - 0x1444028600000000, 0x895eeab700000000, 0x3d559d1100000000, - 0xb36b3ad400000000, 0x07604d7200000000, 0x9a7aa54300000000, - 0x2e71d2e500000000, 0xc7019a1300000000, 0x730aedb500000000, - 0xee10058400000000, 0x5a1b722200000000, 0xd425d5e700000000, - 0x602ea24100000000, 0xfd344a7000000000, 0x493f3dd600000000, - 0x8b9f1dcc00000000, 0x3f946a6a00000000, 0xa28e825b00000000, - 0x1685f5fd00000000, 0x98bb523800000000, 0x2cb0259e00000000, - 0xb1aacdaf00000000, 0x05a1ba0900000000, 0xecd1f2ff00000000, - 0x58da855900000000, 0xc5c06d6800000000, 0x71cb1ace00000000, - 0xfff5bd0b00000000, 0x4bfecaad00000000, 0xd6e4229c00000000, - 0x62ef553a00000000, 0x4503c3ab00000000, 0xf108b40d00000000, - 0x6c125c3c00000000, 0xd8192b9a00000000, 0x56278c5f00000000, - 0xe22cfbf900000000, 0x7f3613c800000000, 0xcb3d646e00000000, - 0x224d2c9800000000, 0x96465b3e00000000, 0x0b5cb30f00000000, - 0xbf57c4a900000000, 0x3169636c00000000, 0x856214ca00000000, - 0x1878fcfb00000000, 0xac738b5d00000000, 0x17a6a00300000000, - 0xa3add7a500000000, 0x3eb73f9400000000, 0x8abc483200000000, - 0x0482eff700000000, 0xb089985100000000, 0x2d93706000000000, - 0x999807c600000000, 0x70e84f3000000000, 0xc4e3389600000000, - 0x59f9d0a700000000, 0xedf2a70100000000, 0x63cc00c400000000, - 0xd7c7776200000000, 0x4add9f5300000000, 0xfed6e8f500000000, - 0xd93a7e6400000000, 0x6d3109c200000000, 0xf02be1f300000000, - 0x4420965500000000, 0xca1e319000000000, 0x7e15463600000000, - 0xe30fae0700000000, 0x5704d9a100000000, 0xbe74915700000000, - 0x0a7fe6f100000000, 0x97650ec000000000, 0x236e796600000000, - 0xad50dea300000000, 0x195ba90500000000, 0x8441413400000000, - 0x304a369200000000}, - {0x0000000000000000, 0x9e00aacc00000000, 0x7d07254200000000, - 0xe3078f8e00000000, 0xfa0e4a8400000000, 0x640ee04800000000, - 0x87096fc600000000, 0x1909c50a00000000, 0xb51be5d300000000, - 0x2b1b4f1f00000000, 0xc81cc09100000000, 0x561c6a5d00000000, - 0x4f15af5700000000, 0xd115059b00000000, 0x32128a1500000000, - 0xac1220d900000000, 0x2b31bb7c00000000, 0xb53111b000000000, - 0x56369e3e00000000, 0xc83634f200000000, 0xd13ff1f800000000, - 0x4f3f5b3400000000, 0xac38d4ba00000000, 0x32387e7600000000, - 0x9e2a5eaf00000000, 0x002af46300000000, 0xe32d7bed00000000, - 0x7d2dd12100000000, 0x6424142b00000000, 0xfa24bee700000000, - 0x1923316900000000, 0x87239ba500000000, 0x566276f900000000, - 0xc862dc3500000000, 0x2b6553bb00000000, 0xb565f97700000000, - 0xac6c3c7d00000000, 0x326c96b100000000, 0xd16b193f00000000, - 0x4f6bb3f300000000, 0xe379932a00000000, 0x7d7939e600000000, - 0x9e7eb66800000000, 0x007e1ca400000000, 0x1977d9ae00000000, - 0x8777736200000000, 0x6470fcec00000000, 0xfa70562000000000, - 0x7d53cd8500000000, 0xe353674900000000, 0x0054e8c700000000, - 0x9e54420b00000000, 0x875d870100000000, 0x195d2dcd00000000, - 0xfa5aa24300000000, 0x645a088f00000000, 0xc848285600000000, - 0x5648829a00000000, 0xb54f0d1400000000, 0x2b4fa7d800000000, - 0x324662d200000000, 0xac46c81e00000000, 0x4f41479000000000, - 0xd141ed5c00000000, 0xedc29d2900000000, 0x73c237e500000000, - 0x90c5b86b00000000, 0x0ec512a700000000, 0x17ccd7ad00000000, - 0x89cc7d6100000000, 0x6acbf2ef00000000, 0xf4cb582300000000, - 0x58d978fa00000000, 0xc6d9d23600000000, 0x25de5db800000000, - 0xbbdef77400000000, 0xa2d7327e00000000, 0x3cd798b200000000, - 0xdfd0173c00000000, 0x41d0bdf000000000, 0xc6f3265500000000, - 0x58f38c9900000000, 0xbbf4031700000000, 0x25f4a9db00000000, - 0x3cfd6cd100000000, 0xa2fdc61d00000000, 0x41fa499300000000, - 0xdffae35f00000000, 0x73e8c38600000000, 0xede8694a00000000, - 0x0eefe6c400000000, 0x90ef4c0800000000, 0x89e6890200000000, - 0x17e623ce00000000, 0xf4e1ac4000000000, 0x6ae1068c00000000, - 0xbba0ebd000000000, 0x25a0411c00000000, 0xc6a7ce9200000000, - 0x58a7645e00000000, 0x41aea15400000000, 0xdfae0b9800000000, - 0x3ca9841600000000, 0xa2a92eda00000000, 0x0ebb0e0300000000, - 0x90bba4cf00000000, 0x73bc2b4100000000, 0xedbc818d00000000, - 0xf4b5448700000000, 0x6ab5ee4b00000000, 0x89b261c500000000, - 0x17b2cb0900000000, 0x909150ac00000000, 0x0e91fa6000000000, - 0xed9675ee00000000, 0x7396df2200000000, 0x6a9f1a2800000000, - 0xf49fb0e400000000, 0x17983f6a00000000, 0x899895a600000000, - 0x258ab57f00000000, 0xbb8a1fb300000000, 0x588d903d00000000, - 0xc68d3af100000000, 0xdf84fffb00000000, 0x4184553700000000, - 0xa283dab900000000, 0x3c83707500000000, 0xda853b5300000000, - 0x4485919f00000000, 0xa7821e1100000000, 0x3982b4dd00000000, - 0x208b71d700000000, 0xbe8bdb1b00000000, 0x5d8c549500000000, - 0xc38cfe5900000000, 0x6f9ede8000000000, 0xf19e744c00000000, - 0x1299fbc200000000, 0x8c99510e00000000, 0x9590940400000000, - 0x0b903ec800000000, 0xe897b14600000000, 0x76971b8a00000000, - 0xf1b4802f00000000, 0x6fb42ae300000000, 0x8cb3a56d00000000, - 0x12b30fa100000000, 0x0bbacaab00000000, 0x95ba606700000000, - 0x76bdefe900000000, 0xe8bd452500000000, 0x44af65fc00000000, - 0xdaafcf3000000000, 0x39a840be00000000, 0xa7a8ea7200000000, - 0xbea12f7800000000, 0x20a185b400000000, 0xc3a60a3a00000000, - 0x5da6a0f600000000, 0x8ce74daa00000000, 0x12e7e76600000000, - 0xf1e068e800000000, 0x6fe0c22400000000, 0x76e9072e00000000, - 0xe8e9ade200000000, 0x0bee226c00000000, 0x95ee88a000000000, - 0x39fca87900000000, 0xa7fc02b500000000, 0x44fb8d3b00000000, - 0xdafb27f700000000, 0xc3f2e2fd00000000, 0x5df2483100000000, - 0xbef5c7bf00000000, 0x20f56d7300000000, 0xa7d6f6d600000000, - 0x39d65c1a00000000, 0xdad1d39400000000, 0x44d1795800000000, - 0x5dd8bc5200000000, 0xc3d8169e00000000, 0x20df991000000000, - 0xbedf33dc00000000, 0x12cd130500000000, 0x8ccdb9c900000000, - 0x6fca364700000000, 0xf1ca9c8b00000000, 0xe8c3598100000000, - 0x76c3f34d00000000, 0x95c47cc300000000, 0x0bc4d60f00000000, - 0x3747a67a00000000, 0xa9470cb600000000, 0x4a40833800000000, - 0xd44029f400000000, 0xcd49ecfe00000000, 0x5349463200000000, - 0xb04ec9bc00000000, 0x2e4e637000000000, 0x825c43a900000000, - 0x1c5ce96500000000, 0xff5b66eb00000000, 0x615bcc2700000000, - 0x7852092d00000000, 0xe652a3e100000000, 0x05552c6f00000000, - 0x9b5586a300000000, 0x1c761d0600000000, 0x8276b7ca00000000, - 0x6171384400000000, 0xff71928800000000, 0xe678578200000000, - 0x7878fd4e00000000, 0x9b7f72c000000000, 0x057fd80c00000000, - 0xa96df8d500000000, 0x376d521900000000, 0xd46add9700000000, - 0x4a6a775b00000000, 0x5363b25100000000, 0xcd63189d00000000, - 0x2e64971300000000, 0xb0643ddf00000000, 0x6125d08300000000, - 0xff257a4f00000000, 0x1c22f5c100000000, 0x82225f0d00000000, - 0x9b2b9a0700000000, 0x052b30cb00000000, 0xe62cbf4500000000, - 0x782c158900000000, 0xd43e355000000000, 0x4a3e9f9c00000000, - 0xa939101200000000, 0x3739bade00000000, 0x2e307fd400000000, - 0xb030d51800000000, 0x53375a9600000000, 0xcd37f05a00000000, - 0x4a146bff00000000, 0xd414c13300000000, 0x37134ebd00000000, - 0xa913e47100000000, 0xb01a217b00000000, 0x2e1a8bb700000000, - 0xcd1d043900000000, 0x531daef500000000, 0xff0f8e2c00000000, - 0x610f24e000000000, 0x8208ab6e00000000, 0x1c0801a200000000, - 0x0501c4a800000000, 0x9b016e6400000000, 0x7806e1ea00000000, - 0xe6064b2600000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757, - 0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a, - 0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733, - 0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871, - 0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70, - 0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42, - 0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5, - 0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787, - 0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086, - 0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4, - 0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d, - 0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0, - 0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d, - 0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f, - 0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859, - 0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b, - 0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5, - 0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028, - 0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891, - 0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed, - 0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec, - 0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde, - 0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817, - 0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825, - 0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24, - 0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e, - 0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7, - 0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a, - 0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4, - 0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196, - 0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0, - 0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2, - 0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52, - 0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f, - 0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36, - 0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174, - 0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675, - 0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647, - 0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d, - 0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf, - 0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be, - 0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc, - 0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645, - 0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98, - 0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138, - 0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a, - 0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c, - 0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e, - 0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0, - 0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d, - 0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194, - 0xde0506f1}, - {0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc, - 0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f, - 0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a, - 0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29, - 0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8, - 0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023, - 0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e, - 0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065, - 0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84, - 0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7, - 0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922, - 0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71, - 0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0, - 0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b, - 0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816, - 0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd, - 0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c, - 0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f, - 0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba, - 0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579, - 0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98, - 0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873, - 0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e, - 0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5, - 0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134, - 0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7, - 0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732, - 0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461, - 0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0, - 0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b, - 0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26, - 0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd, - 0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc, - 0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef, - 0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a, - 0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049, - 0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8, - 0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43, - 0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e, - 0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5, - 0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24, - 0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07, - 0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982, - 0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1, - 0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0, - 0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b, - 0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576, - 0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d, - 0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c, - 0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f, - 0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda, - 0xbe9834ed}, - {0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504, - 0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49, - 0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e, - 0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192, - 0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859, - 0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c, - 0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620, - 0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265, - 0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae, - 0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2, - 0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175, - 0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38, - 0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05, - 0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40, - 0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f, - 0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca, - 0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850, - 0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d, - 0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da, - 0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864, - 0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af, - 0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea, - 0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74, - 0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31, - 0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa, - 0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a, - 0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd, - 0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180, - 0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a, - 0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f, - 0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290, - 0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5, - 0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed, - 0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0, - 0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167, - 0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b, - 0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0, - 0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5, - 0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc, - 0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189, - 0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842, - 0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e, - 0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299, - 0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4, - 0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec, - 0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9, - 0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66, - 0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23, - 0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9, - 0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4, - 0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33, - 0x9324fd72}, - {0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, - 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, - 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, - 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, - 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, - 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, - 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, - 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, - 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, - 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, - 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, - 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, - 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, - 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, - 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, - 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, - 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, - 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, - 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, - 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, - 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, - 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, - 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, - 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, - 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, - 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, - 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, - 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, - 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, - 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, - 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, - 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, - 0x2d02ef8d}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07, - 0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79, - 0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7, - 0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84, - 0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13, - 0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663, - 0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5, - 0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5, - 0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832, - 0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51, - 0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf, - 0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1, - 0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76, - 0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606, - 0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996, - 0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6, - 0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c, - 0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712, - 0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c, - 0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4, - 0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943, - 0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333, - 0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe, - 0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce, - 0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359, - 0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a, - 0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04, - 0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a, - 0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0, - 0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580, - 0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10, - 0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060, - 0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1, - 0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf, - 0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31, - 0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852, - 0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5, - 0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5, - 0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75, - 0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005, - 0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292, - 0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1, - 0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f, - 0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111, - 0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0, - 0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0, - 0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40, - 0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530, - 0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba, - 0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4, - 0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a, - 0x8def022d}, - {0x00000000, 0x41311b19, 0x82623632, 0xc3532d2b, 0x04c56c64, - 0x45f4777d, 0x86a75a56, 0xc796414f, 0x088ad9c8, 0x49bbc2d1, - 0x8ae8effa, 0xcbd9f4e3, 0x0c4fb5ac, 0x4d7eaeb5, 0x8e2d839e, - 0xcf1c9887, 0x5112c24a, 0x1023d953, 0xd370f478, 0x9241ef61, - 0x55d7ae2e, 0x14e6b537, 0xd7b5981c, 0x96848305, 0x59981b82, - 0x18a9009b, 0xdbfa2db0, 0x9acb36a9, 0x5d5d77e6, 0x1c6c6cff, - 0xdf3f41d4, 0x9e0e5acd, 0xa2248495, 0xe3159f8c, 0x2046b2a7, - 0x6177a9be, 0xa6e1e8f1, 0xe7d0f3e8, 0x2483dec3, 0x65b2c5da, - 0xaaae5d5d, 0xeb9f4644, 0x28cc6b6f, 0x69fd7076, 0xae6b3139, - 0xef5a2a20, 0x2c09070b, 0x6d381c12, 0xf33646df, 0xb2075dc6, - 0x715470ed, 0x30656bf4, 0xf7f32abb, 0xb6c231a2, 0x75911c89, - 0x34a00790, 0xfbbc9f17, 0xba8d840e, 0x79dea925, 0x38efb23c, - 0xff79f373, 0xbe48e86a, 0x7d1bc541, 0x3c2ade58, 0x054f79f0, - 0x447e62e9, 0x872d4fc2, 0xc61c54db, 0x018a1594, 0x40bb0e8d, - 0x83e823a6, 0xc2d938bf, 0x0dc5a038, 0x4cf4bb21, 0x8fa7960a, - 0xce968d13, 0x0900cc5c, 0x4831d745, 0x8b62fa6e, 0xca53e177, - 0x545dbbba, 0x156ca0a3, 0xd63f8d88, 0x970e9691, 0x5098d7de, - 0x11a9ccc7, 0xd2fae1ec, 0x93cbfaf5, 0x5cd76272, 0x1de6796b, - 0xdeb55440, 0x9f844f59, 0x58120e16, 0x1923150f, 0xda703824, - 0x9b41233d, 0xa76bfd65, 0xe65ae67c, 0x2509cb57, 0x6438d04e, - 0xa3ae9101, 0xe29f8a18, 0x21cca733, 0x60fdbc2a, 0xafe124ad, - 0xeed03fb4, 0x2d83129f, 0x6cb20986, 0xab2448c9, 0xea1553d0, - 0x29467efb, 0x687765e2, 0xf6793f2f, 0xb7482436, 0x741b091d, - 0x352a1204, 0xf2bc534b, 0xb38d4852, 0x70de6579, 0x31ef7e60, - 0xfef3e6e7, 0xbfc2fdfe, 0x7c91d0d5, 0x3da0cbcc, 0xfa368a83, - 0xbb07919a, 0x7854bcb1, 0x3965a7a8, 0x4b98833b, 0x0aa99822, - 0xc9fab509, 0x88cbae10, 0x4f5def5f, 0x0e6cf446, 0xcd3fd96d, - 0x8c0ec274, 0x43125af3, 0x022341ea, 0xc1706cc1, 0x804177d8, - 0x47d73697, 0x06e62d8e, 0xc5b500a5, 0x84841bbc, 0x1a8a4171, - 0x5bbb5a68, 0x98e87743, 0xd9d96c5a, 0x1e4f2d15, 0x5f7e360c, - 0x9c2d1b27, 0xdd1c003e, 0x120098b9, 0x533183a0, 0x9062ae8b, - 0xd153b592, 0x16c5f4dd, 0x57f4efc4, 0x94a7c2ef, 0xd596d9f6, - 0xe9bc07ae, 0xa88d1cb7, 0x6bde319c, 0x2aef2a85, 0xed796bca, - 0xac4870d3, 0x6f1b5df8, 0x2e2a46e1, 0xe136de66, 0xa007c57f, - 0x6354e854, 0x2265f34d, 0xe5f3b202, 0xa4c2a91b, 0x67918430, - 0x26a09f29, 0xb8aec5e4, 0xf99fdefd, 0x3accf3d6, 0x7bfde8cf, - 0xbc6ba980, 0xfd5ab299, 0x3e099fb2, 0x7f3884ab, 0xb0241c2c, - 0xf1150735, 0x32462a1e, 0x73773107, 0xb4e17048, 0xf5d06b51, - 0x3683467a, 0x77b25d63, 0x4ed7facb, 0x0fe6e1d2, 0xccb5ccf9, - 0x8d84d7e0, 0x4a1296af, 0x0b238db6, 0xc870a09d, 0x8941bb84, - 0x465d2303, 0x076c381a, 0xc43f1531, 0x850e0e28, 0x42984f67, - 0x03a9547e, 0xc0fa7955, 0x81cb624c, 0x1fc53881, 0x5ef42398, - 0x9da70eb3, 0xdc9615aa, 0x1b0054e5, 0x5a314ffc, 0x996262d7, - 0xd85379ce, 0x174fe149, 0x567efa50, 0x952dd77b, 0xd41ccc62, - 0x138a8d2d, 0x52bb9634, 0x91e8bb1f, 0xd0d9a006, 0xecf37e5e, - 0xadc26547, 0x6e91486c, 0x2fa05375, 0xe836123a, 0xa9070923, - 0x6a542408, 0x2b653f11, 0xe479a796, 0xa548bc8f, 0x661b91a4, - 0x272a8abd, 0xe0bccbf2, 0xa18dd0eb, 0x62defdc0, 0x23efe6d9, - 0xbde1bc14, 0xfcd0a70d, 0x3f838a26, 0x7eb2913f, 0xb924d070, - 0xf815cb69, 0x3b46e642, 0x7a77fd5b, 0xb56b65dc, 0xf45a7ec5, - 0x370953ee, 0x763848f7, 0xb1ae09b8, 0xf09f12a1, 0x33cc3f8a, - 0x72fd2493}, - {0x00000000, 0x376ac201, 0x6ed48403, 0x59be4602, 0xdca80907, - 0xebc2cb06, 0xb27c8d04, 0x85164f05, 0xb851130e, 0x8f3bd10f, - 0xd685970d, 0xe1ef550c, 0x64f91a09, 0x5393d808, 0x0a2d9e0a, - 0x3d475c0b, 0x70a3261c, 0x47c9e41d, 0x1e77a21f, 0x291d601e, - 0xac0b2f1b, 0x9b61ed1a, 0xc2dfab18, 0xf5b56919, 0xc8f23512, - 0xff98f713, 0xa626b111, 0x914c7310, 0x145a3c15, 0x2330fe14, - 0x7a8eb816, 0x4de47a17, 0xe0464d38, 0xd72c8f39, 0x8e92c93b, - 0xb9f80b3a, 0x3cee443f, 0x0b84863e, 0x523ac03c, 0x6550023d, - 0x58175e36, 0x6f7d9c37, 0x36c3da35, 0x01a91834, 0x84bf5731, - 0xb3d59530, 0xea6bd332, 0xdd011133, 0x90e56b24, 0xa78fa925, - 0xfe31ef27, 0xc95b2d26, 0x4c4d6223, 0x7b27a022, 0x2299e620, - 0x15f32421, 0x28b4782a, 0x1fdeba2b, 0x4660fc29, 0x710a3e28, - 0xf41c712d, 0xc376b32c, 0x9ac8f52e, 0xada2372f, 0xc08d9a70, - 0xf7e75871, 0xae591e73, 0x9933dc72, 0x1c259377, 0x2b4f5176, - 0x72f11774, 0x459bd575, 0x78dc897e, 0x4fb64b7f, 0x16080d7d, - 0x2162cf7c, 0xa4748079, 0x931e4278, 0xcaa0047a, 0xfdcac67b, - 0xb02ebc6c, 0x87447e6d, 0xdefa386f, 0xe990fa6e, 0x6c86b56b, - 0x5bec776a, 0x02523168, 0x3538f369, 0x087faf62, 0x3f156d63, - 0x66ab2b61, 0x51c1e960, 0xd4d7a665, 0xe3bd6464, 0xba032266, - 0x8d69e067, 0x20cbd748, 0x17a11549, 0x4e1f534b, 0x7975914a, - 0xfc63de4f, 0xcb091c4e, 0x92b75a4c, 0xa5dd984d, 0x989ac446, - 0xaff00647, 0xf64e4045, 0xc1248244, 0x4432cd41, 0x73580f40, - 0x2ae64942, 0x1d8c8b43, 0x5068f154, 0x67023355, 0x3ebc7557, - 0x09d6b756, 0x8cc0f853, 0xbbaa3a52, 0xe2147c50, 0xd57ebe51, - 0xe839e25a, 0xdf53205b, 0x86ed6659, 0xb187a458, 0x3491eb5d, - 0x03fb295c, 0x5a456f5e, 0x6d2fad5f, 0x801b35e1, 0xb771f7e0, - 0xeecfb1e2, 0xd9a573e3, 0x5cb33ce6, 0x6bd9fee7, 0x3267b8e5, - 0x050d7ae4, 0x384a26ef, 0x0f20e4ee, 0x569ea2ec, 0x61f460ed, - 0xe4e22fe8, 0xd388ede9, 0x8a36abeb, 0xbd5c69ea, 0xf0b813fd, - 0xc7d2d1fc, 0x9e6c97fe, 0xa90655ff, 0x2c101afa, 0x1b7ad8fb, - 0x42c49ef9, 0x75ae5cf8, 0x48e900f3, 0x7f83c2f2, 0x263d84f0, - 0x115746f1, 0x944109f4, 0xa32bcbf5, 0xfa958df7, 0xcdff4ff6, - 0x605d78d9, 0x5737bad8, 0x0e89fcda, 0x39e33edb, 0xbcf571de, - 0x8b9fb3df, 0xd221f5dd, 0xe54b37dc, 0xd80c6bd7, 0xef66a9d6, - 0xb6d8efd4, 0x81b22dd5, 0x04a462d0, 0x33cea0d1, 0x6a70e6d3, - 0x5d1a24d2, 0x10fe5ec5, 0x27949cc4, 0x7e2adac6, 0x494018c7, - 0xcc5657c2, 0xfb3c95c3, 0xa282d3c1, 0x95e811c0, 0xa8af4dcb, - 0x9fc58fca, 0xc67bc9c8, 0xf1110bc9, 0x740744cc, 0x436d86cd, - 0x1ad3c0cf, 0x2db902ce, 0x4096af91, 0x77fc6d90, 0x2e422b92, - 0x1928e993, 0x9c3ea696, 0xab546497, 0xf2ea2295, 0xc580e094, - 0xf8c7bc9f, 0xcfad7e9e, 0x9613389c, 0xa179fa9d, 0x246fb598, - 0x13057799, 0x4abb319b, 0x7dd1f39a, 0x3035898d, 0x075f4b8c, - 0x5ee10d8e, 0x698bcf8f, 0xec9d808a, 0xdbf7428b, 0x82490489, - 0xb523c688, 0x88649a83, 0xbf0e5882, 0xe6b01e80, 0xd1dadc81, - 0x54cc9384, 0x63a65185, 0x3a181787, 0x0d72d586, 0xa0d0e2a9, - 0x97ba20a8, 0xce0466aa, 0xf96ea4ab, 0x7c78ebae, 0x4b1229af, - 0x12ac6fad, 0x25c6adac, 0x1881f1a7, 0x2feb33a6, 0x765575a4, - 0x413fb7a5, 0xc429f8a0, 0xf3433aa1, 0xaafd7ca3, 0x9d97bea2, - 0xd073c4b5, 0xe71906b4, 0xbea740b6, 0x89cd82b7, 0x0cdbcdb2, - 0x3bb10fb3, 0x620f49b1, 0x55658bb0, 0x6822d7bb, 0x5f4815ba, - 0x06f653b8, 0x319c91b9, 0xb48adebc, 0x83e01cbd, 0xda5e5abf, - 0xed3498be}, - {0x00000000, 0x6567bcb8, 0x8bc809aa, 0xeeafb512, 0x5797628f, - 0x32f0de37, 0xdc5f6b25, 0xb938d79d, 0xef28b4c5, 0x8a4f087d, - 0x64e0bd6f, 0x018701d7, 0xb8bfd64a, 0xddd86af2, 0x3377dfe0, - 0x56106358, 0x9f571950, 0xfa30a5e8, 0x149f10fa, 0x71f8ac42, - 0xc8c07bdf, 0xada7c767, 0x43087275, 0x266fcecd, 0x707fad95, - 0x1518112d, 0xfbb7a43f, 0x9ed01887, 0x27e8cf1a, 0x428f73a2, - 0xac20c6b0, 0xc9477a08, 0x3eaf32a0, 0x5bc88e18, 0xb5673b0a, - 0xd00087b2, 0x6938502f, 0x0c5fec97, 0xe2f05985, 0x8797e53d, - 0xd1878665, 0xb4e03add, 0x5a4f8fcf, 0x3f283377, 0x8610e4ea, - 0xe3775852, 0x0dd8ed40, 0x68bf51f8, 0xa1f82bf0, 0xc49f9748, - 0x2a30225a, 0x4f579ee2, 0xf66f497f, 0x9308f5c7, 0x7da740d5, - 0x18c0fc6d, 0x4ed09f35, 0x2bb7238d, 0xc518969f, 0xa07f2a27, - 0x1947fdba, 0x7c204102, 0x928ff410, 0xf7e848a8, 0x3d58149b, - 0x583fa823, 0xb6901d31, 0xd3f7a189, 0x6acf7614, 0x0fa8caac, - 0xe1077fbe, 0x8460c306, 0xd270a05e, 0xb7171ce6, 0x59b8a9f4, - 0x3cdf154c, 0x85e7c2d1, 0xe0807e69, 0x0e2fcb7b, 0x6b4877c3, - 0xa20f0dcb, 0xc768b173, 0x29c70461, 0x4ca0b8d9, 0xf5986f44, - 0x90ffd3fc, 0x7e5066ee, 0x1b37da56, 0x4d27b90e, 0x284005b6, - 0xc6efb0a4, 0xa3880c1c, 0x1ab0db81, 0x7fd76739, 0x9178d22b, - 0xf41f6e93, 0x03f7263b, 0x66909a83, 0x883f2f91, 0xed589329, - 0x546044b4, 0x3107f80c, 0xdfa84d1e, 0xbacff1a6, 0xecdf92fe, - 0x89b82e46, 0x67179b54, 0x027027ec, 0xbb48f071, 0xde2f4cc9, - 0x3080f9db, 0x55e74563, 0x9ca03f6b, 0xf9c783d3, 0x176836c1, - 0x720f8a79, 0xcb375de4, 0xae50e15c, 0x40ff544e, 0x2598e8f6, - 0x73888bae, 0x16ef3716, 0xf8408204, 0x9d273ebc, 0x241fe921, - 0x41785599, 0xafd7e08b, 0xcab05c33, 0x3bb659ed, 0x5ed1e555, - 0xb07e5047, 0xd519ecff, 0x6c213b62, 0x094687da, 0xe7e932c8, - 0x828e8e70, 0xd49eed28, 0xb1f95190, 0x5f56e482, 0x3a31583a, - 0x83098fa7, 0xe66e331f, 0x08c1860d, 0x6da63ab5, 0xa4e140bd, - 0xc186fc05, 0x2f294917, 0x4a4ef5af, 0xf3762232, 0x96119e8a, - 0x78be2b98, 0x1dd99720, 0x4bc9f478, 0x2eae48c0, 0xc001fdd2, - 0xa566416a, 0x1c5e96f7, 0x79392a4f, 0x97969f5d, 0xf2f123e5, - 0x05196b4d, 0x607ed7f5, 0x8ed162e7, 0xebb6de5f, 0x528e09c2, - 0x37e9b57a, 0xd9460068, 0xbc21bcd0, 0xea31df88, 0x8f566330, - 0x61f9d622, 0x049e6a9a, 0xbda6bd07, 0xd8c101bf, 0x366eb4ad, - 0x53090815, 0x9a4e721d, 0xff29cea5, 0x11867bb7, 0x74e1c70f, - 0xcdd91092, 0xa8beac2a, 0x46111938, 0x2376a580, 0x7566c6d8, - 0x10017a60, 0xfeaecf72, 0x9bc973ca, 0x22f1a457, 0x479618ef, - 0xa939adfd, 0xcc5e1145, 0x06ee4d76, 0x6389f1ce, 0x8d2644dc, - 0xe841f864, 0x51792ff9, 0x341e9341, 0xdab12653, 0xbfd69aeb, - 0xe9c6f9b3, 0x8ca1450b, 0x620ef019, 0x07694ca1, 0xbe519b3c, - 0xdb362784, 0x35999296, 0x50fe2e2e, 0x99b95426, 0xfcdee89e, - 0x12715d8c, 0x7716e134, 0xce2e36a9, 0xab498a11, 0x45e63f03, - 0x208183bb, 0x7691e0e3, 0x13f65c5b, 0xfd59e949, 0x983e55f1, - 0x2106826c, 0x44613ed4, 0xaace8bc6, 0xcfa9377e, 0x38417fd6, - 0x5d26c36e, 0xb389767c, 0xd6eecac4, 0x6fd61d59, 0x0ab1a1e1, - 0xe41e14f3, 0x8179a84b, 0xd769cb13, 0xb20e77ab, 0x5ca1c2b9, - 0x39c67e01, 0x80fea99c, 0xe5991524, 0x0b36a036, 0x6e511c8e, - 0xa7166686, 0xc271da3e, 0x2cde6f2c, 0x49b9d394, 0xf0810409, - 0x95e6b8b1, 0x7b490da3, 0x1e2eb11b, 0x483ed243, 0x2d596efb, - 0xc3f6dbe9, 0xa6916751, 0x1fa9b0cc, 0x7ace0c74, 0x9461b966, - 0xf10605de}}; - -#endif - -#endif - -#if N == 2 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xae689191, 0x87a02563, 0x29c8b4f2, 0xd4314c87, - 0x7a59dd16, 0x539169e4, 0xfdf9f875, 0x73139f4f, 0xdd7b0ede, - 0xf4b3ba2c, 0x5adb2bbd, 0xa722d3c8, 0x094a4259, 0x2082f6ab, - 0x8eea673a, 0xe6273e9e, 0x484faf0f, 0x61871bfd, 0xcfef8a6c, - 0x32167219, 0x9c7ee388, 0xb5b6577a, 0x1bdec6eb, 0x9534a1d1, - 0x3b5c3040, 0x129484b2, 0xbcfc1523, 0x4105ed56, 0xef6d7cc7, - 0xc6a5c835, 0x68cd59a4, 0x173f7b7d, 0xb957eaec, 0x909f5e1e, - 0x3ef7cf8f, 0xc30e37fa, 0x6d66a66b, 0x44ae1299, 0xeac68308, - 0x642ce432, 0xca4475a3, 0xe38cc151, 0x4de450c0, 0xb01da8b5, - 0x1e753924, 0x37bd8dd6, 0x99d51c47, 0xf11845e3, 0x5f70d472, - 0x76b86080, 0xd8d0f111, 0x25290964, 0x8b4198f5, 0xa2892c07, - 0x0ce1bd96, 0x820bdaac, 0x2c634b3d, 0x05abffcf, 0xabc36e5e, - 0x563a962b, 0xf85207ba, 0xd19ab348, 0x7ff222d9, 0x2e7ef6fa, - 0x8016676b, 0xa9ded399, 0x07b64208, 0xfa4fba7d, 0x54272bec, - 0x7def9f1e, 0xd3870e8f, 0x5d6d69b5, 0xf305f824, 0xdacd4cd6, - 0x74a5dd47, 0x895c2532, 0x2734b4a3, 0x0efc0051, 0xa09491c0, - 0xc859c864, 0x663159f5, 0x4ff9ed07, 0xe1917c96, 0x1c6884e3, - 0xb2001572, 0x9bc8a180, 0x35a03011, 0xbb4a572b, 0x1522c6ba, - 0x3cea7248, 0x9282e3d9, 0x6f7b1bac, 0xc1138a3d, 0xe8db3ecf, - 0x46b3af5e, 0x39418d87, 0x97291c16, 0xbee1a8e4, 0x10893975, - 0xed70c100, 0x43185091, 0x6ad0e463, 0xc4b875f2, 0x4a5212c8, - 0xe43a8359, 0xcdf237ab, 0x639aa63a, 0x9e635e4f, 0x300bcfde, - 0x19c37b2c, 0xb7abeabd, 0xdf66b319, 0x710e2288, 0x58c6967a, - 0xf6ae07eb, 0x0b57ff9e, 0xa53f6e0f, 0x8cf7dafd, 0x229f4b6c, - 0xac752c56, 0x021dbdc7, 0x2bd50935, 0x85bd98a4, 0x784460d1, - 0xd62cf140, 0xffe445b2, 0x518cd423, 0x5cfdedf4, 0xf2957c65, - 0xdb5dc897, 0x75355906, 0x88cca173, 0x26a430e2, 0x0f6c8410, - 0xa1041581, 0x2fee72bb, 0x8186e32a, 0xa84e57d8, 0x0626c649, - 0xfbdf3e3c, 0x55b7afad, 0x7c7f1b5f, 0xd2178ace, 0xbadad36a, - 0x14b242fb, 0x3d7af609, 0x93126798, 0x6eeb9fed, 0xc0830e7c, - 0xe94bba8e, 0x47232b1f, 0xc9c94c25, 0x67a1ddb4, 0x4e696946, - 0xe001f8d7, 0x1df800a2, 0xb3909133, 0x9a5825c1, 0x3430b450, - 0x4bc29689, 0xe5aa0718, 0xcc62b3ea, 0x620a227b, 0x9ff3da0e, - 0x319b4b9f, 0x1853ff6d, 0xb63b6efc, 0x38d109c6, 0x96b99857, - 0xbf712ca5, 0x1119bd34, 0xece04541, 0x4288d4d0, 0x6b406022, - 0xc528f1b3, 0xade5a817, 0x038d3986, 0x2a458d74, 0x842d1ce5, - 0x79d4e490, 0xd7bc7501, 0xfe74c1f3, 0x501c5062, 0xdef63758, - 0x709ea6c9, 0x5956123b, 0xf73e83aa, 0x0ac77bdf, 0xa4afea4e, - 0x8d675ebc, 0x230fcf2d, 0x72831b0e, 0xdceb8a9f, 0xf5233e6d, - 0x5b4baffc, 0xa6b25789, 0x08dac618, 0x211272ea, 0x8f7ae37b, - 0x01908441, 0xaff815d0, 0x8630a122, 0x285830b3, 0xd5a1c8c6, - 0x7bc95957, 0x5201eda5, 0xfc697c34, 0x94a42590, 0x3accb401, - 0x130400f3, 0xbd6c9162, 0x40956917, 0xeefdf886, 0xc7354c74, - 0x695ddde5, 0xe7b7badf, 0x49df2b4e, 0x60179fbc, 0xce7f0e2d, - 0x3386f658, 0x9dee67c9, 0xb426d33b, 0x1a4e42aa, 0x65bc6073, - 0xcbd4f1e2, 0xe21c4510, 0x4c74d481, 0xb18d2cf4, 0x1fe5bd65, - 0x362d0997, 0x98459806, 0x16afff3c, 0xb8c76ead, 0x910fda5f, - 0x3f674bce, 0xc29eb3bb, 0x6cf6222a, 0x453e96d8, 0xeb560749, - 0x839b5eed, 0x2df3cf7c, 0x043b7b8e, 0xaa53ea1f, 0x57aa126a, - 0xf9c283fb, 0xd00a3709, 0x7e62a698, 0xf088c1a2, 0x5ee05033, - 0x7728e4c1, 0xd9407550, 0x24b98d25, 0x8ad11cb4, 0xa319a846, - 0x0d7139d7}, - {0x00000000, 0xb9fbdbe8, 0xa886b191, 0x117d6a79, 0x8a7c6563, - 0x3387be8b, 0x22fad4f2, 0x9b010f1a, 0xcf89cc87, 0x7672176f, - 0x670f7d16, 0xdef4a6fe, 0x45f5a9e4, 0xfc0e720c, 0xed731875, - 0x5488c39d, 0x44629f4f, 0xfd9944a7, 0xece42ede, 0x551ff536, - 0xce1efa2c, 0x77e521c4, 0x66984bbd, 0xdf639055, 0x8beb53c8, - 0x32108820, 0x236de259, 0x9a9639b1, 0x019736ab, 0xb86ced43, - 0xa911873a, 0x10ea5cd2, 0x88c53e9e, 0x313ee576, 0x20438f0f, - 0x99b854e7, 0x02b95bfd, 0xbb428015, 0xaa3fea6c, 0x13c43184, - 0x474cf219, 0xfeb729f1, 0xefca4388, 0x56319860, 0xcd30977a, - 0x74cb4c92, 0x65b626eb, 0xdc4dfd03, 0xcca7a1d1, 0x755c7a39, - 0x64211040, 0xdddacba8, 0x46dbc4b2, 0xff201f5a, 0xee5d7523, - 0x57a6aecb, 0x032e6d56, 0xbad5b6be, 0xaba8dcc7, 0x1253072f, - 0x89520835, 0x30a9d3dd, 0x21d4b9a4, 0x982f624c, 0xcafb7b7d, - 0x7300a095, 0x627dcaec, 0xdb861104, 0x40871e1e, 0xf97cc5f6, - 0xe801af8f, 0x51fa7467, 0x0572b7fa, 0xbc896c12, 0xadf4066b, - 0x140fdd83, 0x8f0ed299, 0x36f50971, 0x27886308, 0x9e73b8e0, - 0x8e99e432, 0x37623fda, 0x261f55a3, 0x9fe48e4b, 0x04e58151, - 0xbd1e5ab9, 0xac6330c0, 0x1598eb28, 0x411028b5, 0xf8ebf35d, - 0xe9969924, 0x506d42cc, 0xcb6c4dd6, 0x7297963e, 0x63eafc47, - 0xda1127af, 0x423e45e3, 0xfbc59e0b, 0xeab8f472, 0x53432f9a, - 0xc8422080, 0x71b9fb68, 0x60c49111, 0xd93f4af9, 0x8db78964, - 0x344c528c, 0x253138f5, 0x9ccae31d, 0x07cbec07, 0xbe3037ef, - 0xaf4d5d96, 0x16b6867e, 0x065cdaac, 0xbfa70144, 0xaeda6b3d, - 0x1721b0d5, 0x8c20bfcf, 0x35db6427, 0x24a60e5e, 0x9d5dd5b6, - 0xc9d5162b, 0x702ecdc3, 0x6153a7ba, 0xd8a87c52, 0x43a97348, - 0xfa52a8a0, 0xeb2fc2d9, 0x52d41931, 0x4e87f0bb, 0xf77c2b53, - 0xe601412a, 0x5ffa9ac2, 0xc4fb95d8, 0x7d004e30, 0x6c7d2449, - 0xd586ffa1, 0x810e3c3c, 0x38f5e7d4, 0x29888dad, 0x90735645, - 0x0b72595f, 0xb28982b7, 0xa3f4e8ce, 0x1a0f3326, 0x0ae56ff4, - 0xb31eb41c, 0xa263de65, 0x1b98058d, 0x80990a97, 0x3962d17f, - 0x281fbb06, 0x91e460ee, 0xc56ca373, 0x7c97789b, 0x6dea12e2, - 0xd411c90a, 0x4f10c610, 0xf6eb1df8, 0xe7967781, 0x5e6dac69, - 0xc642ce25, 0x7fb915cd, 0x6ec47fb4, 0xd73fa45c, 0x4c3eab46, - 0xf5c570ae, 0xe4b81ad7, 0x5d43c13f, 0x09cb02a2, 0xb030d94a, - 0xa14db333, 0x18b668db, 0x83b767c1, 0x3a4cbc29, 0x2b31d650, - 0x92ca0db8, 0x8220516a, 0x3bdb8a82, 0x2aa6e0fb, 0x935d3b13, - 0x085c3409, 0xb1a7efe1, 0xa0da8598, 0x19215e70, 0x4da99ded, - 0xf4524605, 0xe52f2c7c, 0x5cd4f794, 0xc7d5f88e, 0x7e2e2366, - 0x6f53491f, 0xd6a892f7, 0x847c8bc6, 0x3d87502e, 0x2cfa3a57, - 0x9501e1bf, 0x0e00eea5, 0xb7fb354d, 0xa6865f34, 0x1f7d84dc, - 0x4bf54741, 0xf20e9ca9, 0xe373f6d0, 0x5a882d38, 0xc1892222, - 0x7872f9ca, 0x690f93b3, 0xd0f4485b, 0xc01e1489, 0x79e5cf61, - 0x6898a518, 0xd1637ef0, 0x4a6271ea, 0xf399aa02, 0xe2e4c07b, - 0x5b1f1b93, 0x0f97d80e, 0xb66c03e6, 0xa711699f, 0x1eeab277, - 0x85ebbd6d, 0x3c106685, 0x2d6d0cfc, 0x9496d714, 0x0cb9b558, - 0xb5426eb0, 0xa43f04c9, 0x1dc4df21, 0x86c5d03b, 0x3f3e0bd3, - 0x2e4361aa, 0x97b8ba42, 0xc33079df, 0x7acba237, 0x6bb6c84e, - 0xd24d13a6, 0x494c1cbc, 0xf0b7c754, 0xe1caad2d, 0x583176c5, - 0x48db2a17, 0xf120f1ff, 0xe05d9b86, 0x59a6406e, 0xc2a74f74, - 0x7b5c949c, 0x6a21fee5, 0xd3da250d, 0x8752e690, 0x3ea93d78, - 0x2fd45701, 0x962f8ce9, 0x0d2e83f3, 0xb4d5581b, 0xa5a83262, - 0x1c53e98a}, - {0x00000000, 0x9d0fe176, 0xe16ec4ad, 0x7c6125db, 0x19ac8f1b, - 0x84a36e6d, 0xf8c24bb6, 0x65cdaac0, 0x33591e36, 0xae56ff40, - 0xd237da9b, 0x4f383bed, 0x2af5912d, 0xb7fa705b, 0xcb9b5580, - 0x5694b4f6, 0x66b23c6c, 0xfbbddd1a, 0x87dcf8c1, 0x1ad319b7, - 0x7f1eb377, 0xe2115201, 0x9e7077da, 0x037f96ac, 0x55eb225a, - 0xc8e4c32c, 0xb485e6f7, 0x298a0781, 0x4c47ad41, 0xd1484c37, - 0xad2969ec, 0x3026889a, 0xcd6478d8, 0x506b99ae, 0x2c0abc75, - 0xb1055d03, 0xd4c8f7c3, 0x49c716b5, 0x35a6336e, 0xa8a9d218, - 0xfe3d66ee, 0x63328798, 0x1f53a243, 0x825c4335, 0xe791e9f5, - 0x7a9e0883, 0x06ff2d58, 0x9bf0cc2e, 0xabd644b4, 0x36d9a5c2, - 0x4ab88019, 0xd7b7616f, 0xb27acbaf, 0x2f752ad9, 0x53140f02, - 0xce1bee74, 0x988f5a82, 0x0580bbf4, 0x79e19e2f, 0xe4ee7f59, - 0x8123d599, 0x1c2c34ef, 0x604d1134, 0xfd42f042, 0x41b9f7f1, - 0xdcb61687, 0xa0d7335c, 0x3dd8d22a, 0x581578ea, 0xc51a999c, - 0xb97bbc47, 0x24745d31, 0x72e0e9c7, 0xefef08b1, 0x938e2d6a, - 0x0e81cc1c, 0x6b4c66dc, 0xf64387aa, 0x8a22a271, 0x172d4307, - 0x270bcb9d, 0xba042aeb, 0xc6650f30, 0x5b6aee46, 0x3ea74486, - 0xa3a8a5f0, 0xdfc9802b, 0x42c6615d, 0x1452d5ab, 0x895d34dd, - 0xf53c1106, 0x6833f070, 0x0dfe5ab0, 0x90f1bbc6, 0xec909e1d, - 0x719f7f6b, 0x8cdd8f29, 0x11d26e5f, 0x6db34b84, 0xf0bcaaf2, - 0x95710032, 0x087ee144, 0x741fc49f, 0xe91025e9, 0xbf84911f, - 0x228b7069, 0x5eea55b2, 0xc3e5b4c4, 0xa6281e04, 0x3b27ff72, - 0x4746daa9, 0xda493bdf, 0xea6fb345, 0x77605233, 0x0b0177e8, - 0x960e969e, 0xf3c33c5e, 0x6eccdd28, 0x12adf8f3, 0x8fa21985, - 0xd936ad73, 0x44394c05, 0x385869de, 0xa55788a8, 0xc09a2268, - 0x5d95c31e, 0x21f4e6c5, 0xbcfb07b3, 0x8373efe2, 0x1e7c0e94, - 0x621d2b4f, 0xff12ca39, 0x9adf60f9, 0x07d0818f, 0x7bb1a454, - 0xe6be4522, 0xb02af1d4, 0x2d2510a2, 0x51443579, 0xcc4bd40f, - 0xa9867ecf, 0x34899fb9, 0x48e8ba62, 0xd5e75b14, 0xe5c1d38e, - 0x78ce32f8, 0x04af1723, 0x99a0f655, 0xfc6d5c95, 0x6162bde3, - 0x1d039838, 0x800c794e, 0xd698cdb8, 0x4b972cce, 0x37f60915, - 0xaaf9e863, 0xcf3442a3, 0x523ba3d5, 0x2e5a860e, 0xb3556778, - 0x4e17973a, 0xd318764c, 0xaf795397, 0x3276b2e1, 0x57bb1821, - 0xcab4f957, 0xb6d5dc8c, 0x2bda3dfa, 0x7d4e890c, 0xe041687a, - 0x9c204da1, 0x012facd7, 0x64e20617, 0xf9ede761, 0x858cc2ba, - 0x188323cc, 0x28a5ab56, 0xb5aa4a20, 0xc9cb6ffb, 0x54c48e8d, - 0x3109244d, 0xac06c53b, 0xd067e0e0, 0x4d680196, 0x1bfcb560, - 0x86f35416, 0xfa9271cd, 0x679d90bb, 0x02503a7b, 0x9f5fdb0d, - 0xe33efed6, 0x7e311fa0, 0xc2ca1813, 0x5fc5f965, 0x23a4dcbe, - 0xbeab3dc8, 0xdb669708, 0x4669767e, 0x3a0853a5, 0xa707b2d3, - 0xf1930625, 0x6c9ce753, 0x10fdc288, 0x8df223fe, 0xe83f893e, - 0x75306848, 0x09514d93, 0x945eace5, 0xa478247f, 0x3977c509, - 0x4516e0d2, 0xd81901a4, 0xbdd4ab64, 0x20db4a12, 0x5cba6fc9, - 0xc1b58ebf, 0x97213a49, 0x0a2edb3f, 0x764ffee4, 0xeb401f92, - 0x8e8db552, 0x13825424, 0x6fe371ff, 0xf2ec9089, 0x0fae60cb, - 0x92a181bd, 0xeec0a466, 0x73cf4510, 0x1602efd0, 0x8b0d0ea6, - 0xf76c2b7d, 0x6a63ca0b, 0x3cf77efd, 0xa1f89f8b, 0xdd99ba50, - 0x40965b26, 0x255bf1e6, 0xb8541090, 0xc435354b, 0x593ad43d, - 0x691c5ca7, 0xf413bdd1, 0x8872980a, 0x157d797c, 0x70b0d3bc, - 0xedbf32ca, 0x91de1711, 0x0cd1f667, 0x5a454291, 0xc74aa3e7, - 0xbb2b863c, 0x2624674a, 0x43e9cd8a, 0xdee62cfc, 0xa2870927, - 0x3f88e851}, - {0x00000000, 0xdd96d985, 0x605cb54b, 0xbdca6cce, 0xc0b96a96, - 0x1d2fb313, 0xa0e5dfdd, 0x7d730658, 0x5a03d36d, 0x87950ae8, - 0x3a5f6626, 0xe7c9bfa3, 0x9abab9fb, 0x472c607e, 0xfae60cb0, - 0x2770d535, 0xb407a6da, 0x69917f5f, 0xd45b1391, 0x09cdca14, - 0x74becc4c, 0xa92815c9, 0x14e27907, 0xc974a082, 0xee0475b7, - 0x3392ac32, 0x8e58c0fc, 0x53ce1979, 0x2ebd1f21, 0xf32bc6a4, - 0x4ee1aa6a, 0x937773ef, 0xb37e4bf5, 0x6ee89270, 0xd322febe, - 0x0eb4273b, 0x73c72163, 0xae51f8e6, 0x139b9428, 0xce0d4dad, - 0xe97d9898, 0x34eb411d, 0x89212dd3, 0x54b7f456, 0x29c4f20e, - 0xf4522b8b, 0x49984745, 0x940e9ec0, 0x0779ed2f, 0xdaef34aa, - 0x67255864, 0xbab381e1, 0xc7c087b9, 0x1a565e3c, 0xa79c32f2, - 0x7a0aeb77, 0x5d7a3e42, 0x80ece7c7, 0x3d268b09, 0xe0b0528c, - 0x9dc354d4, 0x40558d51, 0xfd9fe19f, 0x2009381a, 0xbd8d91ab, - 0x601b482e, 0xddd124e0, 0x0047fd65, 0x7d34fb3d, 0xa0a222b8, - 0x1d684e76, 0xc0fe97f3, 0xe78e42c6, 0x3a189b43, 0x87d2f78d, - 0x5a442e08, 0x27372850, 0xfaa1f1d5, 0x476b9d1b, 0x9afd449e, - 0x098a3771, 0xd41ceef4, 0x69d6823a, 0xb4405bbf, 0xc9335de7, - 0x14a58462, 0xa96fe8ac, 0x74f93129, 0x5389e41c, 0x8e1f3d99, - 0x33d55157, 0xee4388d2, 0x93308e8a, 0x4ea6570f, 0xf36c3bc1, - 0x2efae244, 0x0ef3da5e, 0xd36503db, 0x6eaf6f15, 0xb339b690, - 0xce4ab0c8, 0x13dc694d, 0xae160583, 0x7380dc06, 0x54f00933, - 0x8966d0b6, 0x34acbc78, 0xe93a65fd, 0x944963a5, 0x49dfba20, - 0xf415d6ee, 0x29830f6b, 0xbaf47c84, 0x6762a501, 0xdaa8c9cf, - 0x073e104a, 0x7a4d1612, 0xa7dbcf97, 0x1a11a359, 0xc7877adc, - 0xe0f7afe9, 0x3d61766c, 0x80ab1aa2, 0x5d3dc327, 0x204ec57f, - 0xfdd81cfa, 0x40127034, 0x9d84a9b1, 0xa06a2517, 0x7dfcfc92, - 0xc036905c, 0x1da049d9, 0x60d34f81, 0xbd459604, 0x008ffaca, - 0xdd19234f, 0xfa69f67a, 0x27ff2fff, 0x9a354331, 0x47a39ab4, - 0x3ad09cec, 0xe7464569, 0x5a8c29a7, 0x871af022, 0x146d83cd, - 0xc9fb5a48, 0x74313686, 0xa9a7ef03, 0xd4d4e95b, 0x094230de, - 0xb4885c10, 0x691e8595, 0x4e6e50a0, 0x93f88925, 0x2e32e5eb, - 0xf3a43c6e, 0x8ed73a36, 0x5341e3b3, 0xee8b8f7d, 0x331d56f8, - 0x13146ee2, 0xce82b767, 0x7348dba9, 0xaede022c, 0xd3ad0474, - 0x0e3bddf1, 0xb3f1b13f, 0x6e6768ba, 0x4917bd8f, 0x9481640a, - 0x294b08c4, 0xf4ddd141, 0x89aed719, 0x54380e9c, 0xe9f26252, - 0x3464bbd7, 0xa713c838, 0x7a8511bd, 0xc74f7d73, 0x1ad9a4f6, - 0x67aaa2ae, 0xba3c7b2b, 0x07f617e5, 0xda60ce60, 0xfd101b55, - 0x2086c2d0, 0x9d4cae1e, 0x40da779b, 0x3da971c3, 0xe03fa846, - 0x5df5c488, 0x80631d0d, 0x1de7b4bc, 0xc0716d39, 0x7dbb01f7, - 0xa02dd872, 0xdd5ede2a, 0x00c807af, 0xbd026b61, 0x6094b2e4, - 0x47e467d1, 0x9a72be54, 0x27b8d29a, 0xfa2e0b1f, 0x875d0d47, - 0x5acbd4c2, 0xe701b80c, 0x3a976189, 0xa9e01266, 0x7476cbe3, - 0xc9bca72d, 0x142a7ea8, 0x695978f0, 0xb4cfa175, 0x0905cdbb, - 0xd493143e, 0xf3e3c10b, 0x2e75188e, 0x93bf7440, 0x4e29adc5, - 0x335aab9d, 0xeecc7218, 0x53061ed6, 0x8e90c753, 0xae99ff49, - 0x730f26cc, 0xcec54a02, 0x13539387, 0x6e2095df, 0xb3b64c5a, - 0x0e7c2094, 0xd3eaf911, 0xf49a2c24, 0x290cf5a1, 0x94c6996f, - 0x495040ea, 0x342346b2, 0xe9b59f37, 0x547ff3f9, 0x89e92a7c, - 0x1a9e5993, 0xc7088016, 0x7ac2ecd8, 0xa754355d, 0xda273305, - 0x07b1ea80, 0xba7b864e, 0x67ed5fcb, 0x409d8afe, 0x9d0b537b, - 0x20c13fb5, 0xfd57e630, 0x8024e068, 0x5db239ed, 0xe0785523, - 0x3dee8ca6}, - {0x00000000, 0x9ba54c6f, 0xec3b9e9f, 0x779ed2f0, 0x03063b7f, - 0x98a37710, 0xef3da5e0, 0x7498e98f, 0x060c76fe, 0x9da93a91, - 0xea37e861, 0x7192a40e, 0x050a4d81, 0x9eaf01ee, 0xe931d31e, - 0x72949f71, 0x0c18edfc, 0x97bda193, 0xe0237363, 0x7b863f0c, - 0x0f1ed683, 0x94bb9aec, 0xe325481c, 0x78800473, 0x0a149b02, - 0x91b1d76d, 0xe62f059d, 0x7d8a49f2, 0x0912a07d, 0x92b7ec12, - 0xe5293ee2, 0x7e8c728d, 0x1831dbf8, 0x83949797, 0xf40a4567, - 0x6faf0908, 0x1b37e087, 0x8092ace8, 0xf70c7e18, 0x6ca93277, - 0x1e3dad06, 0x8598e169, 0xf2063399, 0x69a37ff6, 0x1d3b9679, - 0x869eda16, 0xf10008e6, 0x6aa54489, 0x14293604, 0x8f8c7a6b, - 0xf812a89b, 0x63b7e4f4, 0x172f0d7b, 0x8c8a4114, 0xfb1493e4, - 0x60b1df8b, 0x122540fa, 0x89800c95, 0xfe1ede65, 0x65bb920a, - 0x11237b85, 0x8a8637ea, 0xfd18e51a, 0x66bda975, 0x3063b7f0, - 0xabc6fb9f, 0xdc58296f, 0x47fd6500, 0x33658c8f, 0xa8c0c0e0, - 0xdf5e1210, 0x44fb5e7f, 0x366fc10e, 0xadca8d61, 0xda545f91, - 0x41f113fe, 0x3569fa71, 0xaeccb61e, 0xd95264ee, 0x42f72881, - 0x3c7b5a0c, 0xa7de1663, 0xd040c493, 0x4be588fc, 0x3f7d6173, - 0xa4d82d1c, 0xd346ffec, 0x48e3b383, 0x3a772cf2, 0xa1d2609d, - 0xd64cb26d, 0x4de9fe02, 0x3971178d, 0xa2d45be2, 0xd54a8912, - 0x4eefc57d, 0x28526c08, 0xb3f72067, 0xc469f297, 0x5fccbef8, - 0x2b545777, 0xb0f11b18, 0xc76fc9e8, 0x5cca8587, 0x2e5e1af6, - 0xb5fb5699, 0xc2658469, 0x59c0c806, 0x2d582189, 0xb6fd6de6, - 0xc163bf16, 0x5ac6f379, 0x244a81f4, 0xbfefcd9b, 0xc8711f6b, - 0x53d45304, 0x274cba8b, 0xbce9f6e4, 0xcb772414, 0x50d2687b, - 0x2246f70a, 0xb9e3bb65, 0xce7d6995, 0x55d825fa, 0x2140cc75, - 0xbae5801a, 0xcd7b52ea, 0x56de1e85, 0x60c76fe0, 0xfb62238f, - 0x8cfcf17f, 0x1759bd10, 0x63c1549f, 0xf86418f0, 0x8ffaca00, - 0x145f866f, 0x66cb191e, 0xfd6e5571, 0x8af08781, 0x1155cbee, - 0x65cd2261, 0xfe686e0e, 0x89f6bcfe, 0x1253f091, 0x6cdf821c, - 0xf77ace73, 0x80e41c83, 0x1b4150ec, 0x6fd9b963, 0xf47cf50c, - 0x83e227fc, 0x18476b93, 0x6ad3f4e2, 0xf176b88d, 0x86e86a7d, - 0x1d4d2612, 0x69d5cf9d, 0xf27083f2, 0x85ee5102, 0x1e4b1d6d, - 0x78f6b418, 0xe353f877, 0x94cd2a87, 0x0f6866e8, 0x7bf08f67, - 0xe055c308, 0x97cb11f8, 0x0c6e5d97, 0x7efac2e6, 0xe55f8e89, - 0x92c15c79, 0x09641016, 0x7dfcf999, 0xe659b5f6, 0x91c76706, - 0x0a622b69, 0x74ee59e4, 0xef4b158b, 0x98d5c77b, 0x03708b14, - 0x77e8629b, 0xec4d2ef4, 0x9bd3fc04, 0x0076b06b, 0x72e22f1a, - 0xe9476375, 0x9ed9b185, 0x057cfdea, 0x71e41465, 0xea41580a, - 0x9ddf8afa, 0x067ac695, 0x50a4d810, 0xcb01947f, 0xbc9f468f, - 0x273a0ae0, 0x53a2e36f, 0xc807af00, 0xbf997df0, 0x243c319f, - 0x56a8aeee, 0xcd0de281, 0xba933071, 0x21367c1e, 0x55ae9591, - 0xce0bd9fe, 0xb9950b0e, 0x22304761, 0x5cbc35ec, 0xc7197983, - 0xb087ab73, 0x2b22e71c, 0x5fba0e93, 0xc41f42fc, 0xb381900c, - 0x2824dc63, 0x5ab04312, 0xc1150f7d, 0xb68bdd8d, 0x2d2e91e2, - 0x59b6786d, 0xc2133402, 0xb58de6f2, 0x2e28aa9d, 0x489503e8, - 0xd3304f87, 0xa4ae9d77, 0x3f0bd118, 0x4b933897, 0xd03674f8, - 0xa7a8a608, 0x3c0dea67, 0x4e997516, 0xd53c3979, 0xa2a2eb89, - 0x3907a7e6, 0x4d9f4e69, 0xd63a0206, 0xa1a4d0f6, 0x3a019c99, - 0x448dee14, 0xdf28a27b, 0xa8b6708b, 0x33133ce4, 0x478bd56b, - 0xdc2e9904, 0xabb04bf4, 0x3015079b, 0x428198ea, 0xd924d485, - 0xaeba0675, 0x351f4a1a, 0x4187a395, 0xda22effa, 0xadbc3d0a, - 0x36197165}, - {0x00000000, 0xc18edfc0, 0x586cb9c1, 0x99e26601, 0xb0d97382, - 0x7157ac42, 0xe8b5ca43, 0x293b1583, 0xbac3e145, 0x7b4d3e85, - 0xe2af5884, 0x23218744, 0x0a1a92c7, 0xcb944d07, 0x52762b06, - 0x93f8f4c6, 0xaef6c4cb, 0x6f781b0b, 0xf69a7d0a, 0x3714a2ca, - 0x1e2fb749, 0xdfa16889, 0x46430e88, 0x87cdd148, 0x1435258e, - 0xd5bbfa4e, 0x4c599c4f, 0x8dd7438f, 0xa4ec560c, 0x656289cc, - 0xfc80efcd, 0x3d0e300d, 0x869c8fd7, 0x47125017, 0xdef03616, - 0x1f7ee9d6, 0x3645fc55, 0xf7cb2395, 0x6e294594, 0xafa79a54, - 0x3c5f6e92, 0xfdd1b152, 0x6433d753, 0xa5bd0893, 0x8c861d10, - 0x4d08c2d0, 0xd4eaa4d1, 0x15647b11, 0x286a4b1c, 0xe9e494dc, - 0x7006f2dd, 0xb1882d1d, 0x98b3389e, 0x593de75e, 0xc0df815f, - 0x01515e9f, 0x92a9aa59, 0x53277599, 0xcac51398, 0x0b4bcc58, - 0x2270d9db, 0xe3fe061b, 0x7a1c601a, 0xbb92bfda, 0xd64819ef, - 0x17c6c62f, 0x8e24a02e, 0x4faa7fee, 0x66916a6d, 0xa71fb5ad, - 0x3efdd3ac, 0xff730c6c, 0x6c8bf8aa, 0xad05276a, 0x34e7416b, - 0xf5699eab, 0xdc528b28, 0x1ddc54e8, 0x843e32e9, 0x45b0ed29, - 0x78bedd24, 0xb93002e4, 0x20d264e5, 0xe15cbb25, 0xc867aea6, - 0x09e97166, 0x900b1767, 0x5185c8a7, 0xc27d3c61, 0x03f3e3a1, - 0x9a1185a0, 0x5b9f5a60, 0x72a44fe3, 0xb32a9023, 0x2ac8f622, - 0xeb4629e2, 0x50d49638, 0x915a49f8, 0x08b82ff9, 0xc936f039, - 0xe00de5ba, 0x21833a7a, 0xb8615c7b, 0x79ef83bb, 0xea17777d, - 0x2b99a8bd, 0xb27bcebc, 0x73f5117c, 0x5ace04ff, 0x9b40db3f, - 0x02a2bd3e, 0xc32c62fe, 0xfe2252f3, 0x3fac8d33, 0xa64eeb32, - 0x67c034f2, 0x4efb2171, 0x8f75feb1, 0x169798b0, 0xd7194770, - 0x44e1b3b6, 0x856f6c76, 0x1c8d0a77, 0xdd03d5b7, 0xf438c034, - 0x35b61ff4, 0xac5479f5, 0x6ddaa635, 0x77e1359f, 0xb66fea5f, - 0x2f8d8c5e, 0xee03539e, 0xc738461d, 0x06b699dd, 0x9f54ffdc, - 0x5eda201c, 0xcd22d4da, 0x0cac0b1a, 0x954e6d1b, 0x54c0b2db, - 0x7dfba758, 0xbc757898, 0x25971e99, 0xe419c159, 0xd917f154, - 0x18992e94, 0x817b4895, 0x40f59755, 0x69ce82d6, 0xa8405d16, - 0x31a23b17, 0xf02ce4d7, 0x63d41011, 0xa25acfd1, 0x3bb8a9d0, - 0xfa367610, 0xd30d6393, 0x1283bc53, 0x8b61da52, 0x4aef0592, - 0xf17dba48, 0x30f36588, 0xa9110389, 0x689fdc49, 0x41a4c9ca, - 0x802a160a, 0x19c8700b, 0xd846afcb, 0x4bbe5b0d, 0x8a3084cd, - 0x13d2e2cc, 0xd25c3d0c, 0xfb67288f, 0x3ae9f74f, 0xa30b914e, - 0x62854e8e, 0x5f8b7e83, 0x9e05a143, 0x07e7c742, 0xc6691882, - 0xef520d01, 0x2edcd2c1, 0xb73eb4c0, 0x76b06b00, 0xe5489fc6, - 0x24c64006, 0xbd242607, 0x7caaf9c7, 0x5591ec44, 0x941f3384, - 0x0dfd5585, 0xcc738a45, 0xa1a92c70, 0x6027f3b0, 0xf9c595b1, - 0x384b4a71, 0x11705ff2, 0xd0fe8032, 0x491ce633, 0x889239f3, - 0x1b6acd35, 0xdae412f5, 0x430674f4, 0x8288ab34, 0xabb3beb7, - 0x6a3d6177, 0xf3df0776, 0x3251d8b6, 0x0f5fe8bb, 0xced1377b, - 0x5733517a, 0x96bd8eba, 0xbf869b39, 0x7e0844f9, 0xe7ea22f8, - 0x2664fd38, 0xb59c09fe, 0x7412d63e, 0xedf0b03f, 0x2c7e6fff, - 0x05457a7c, 0xc4cba5bc, 0x5d29c3bd, 0x9ca71c7d, 0x2735a3a7, - 0xe6bb7c67, 0x7f591a66, 0xbed7c5a6, 0x97ecd025, 0x56620fe5, - 0xcf8069e4, 0x0e0eb624, 0x9df642e2, 0x5c789d22, 0xc59afb23, - 0x041424e3, 0x2d2f3160, 0xeca1eea0, 0x754388a1, 0xb4cd5761, - 0x89c3676c, 0x484db8ac, 0xd1afdead, 0x1021016d, 0x391a14ee, - 0xf894cb2e, 0x6176ad2f, 0xa0f872ef, 0x33008629, 0xf28e59e9, - 0x6b6c3fe8, 0xaae2e028, 0x83d9f5ab, 0x42572a6b, 0xdbb54c6a, - 0x1a3b93aa}, - {0x00000000, 0xefc26b3e, 0x04f5d03d, 0xeb37bb03, 0x09eba07a, - 0xe629cb44, 0x0d1e7047, 0xe2dc1b79, 0x13d740f4, 0xfc152bca, - 0x172290c9, 0xf8e0fbf7, 0x1a3ce08e, 0xf5fe8bb0, 0x1ec930b3, - 0xf10b5b8d, 0x27ae81e8, 0xc86cead6, 0x235b51d5, 0xcc993aeb, - 0x2e452192, 0xc1874aac, 0x2ab0f1af, 0xc5729a91, 0x3479c11c, - 0xdbbbaa22, 0x308c1121, 0xdf4e7a1f, 0x3d926166, 0xd2500a58, - 0x3967b15b, 0xd6a5da65, 0x4f5d03d0, 0xa09f68ee, 0x4ba8d3ed, - 0xa46ab8d3, 0x46b6a3aa, 0xa974c894, 0x42437397, 0xad8118a9, - 0x5c8a4324, 0xb348281a, 0x587f9319, 0xb7bdf827, 0x5561e35e, - 0xbaa38860, 0x51943363, 0xbe56585d, 0x68f38238, 0x8731e906, - 0x6c065205, 0x83c4393b, 0x61182242, 0x8eda497c, 0x65edf27f, - 0x8a2f9941, 0x7b24c2cc, 0x94e6a9f2, 0x7fd112f1, 0x901379cf, - 0x72cf62b6, 0x9d0d0988, 0x763ab28b, 0x99f8d9b5, 0x9eba07a0, - 0x71786c9e, 0x9a4fd79d, 0x758dbca3, 0x9751a7da, 0x7893cce4, - 0x93a477e7, 0x7c661cd9, 0x8d6d4754, 0x62af2c6a, 0x89989769, - 0x665afc57, 0x8486e72e, 0x6b448c10, 0x80733713, 0x6fb15c2d, - 0xb9148648, 0x56d6ed76, 0xbde15675, 0x52233d4b, 0xb0ff2632, - 0x5f3d4d0c, 0xb40af60f, 0x5bc89d31, 0xaac3c6bc, 0x4501ad82, - 0xae361681, 0x41f47dbf, 0xa32866c6, 0x4cea0df8, 0xa7ddb6fb, - 0x481fddc5, 0xd1e70470, 0x3e256f4e, 0xd512d44d, 0x3ad0bf73, - 0xd80ca40a, 0x37cecf34, 0xdcf97437, 0x333b1f09, 0xc2304484, - 0x2df22fba, 0xc6c594b9, 0x2907ff87, 0xcbdbe4fe, 0x24198fc0, - 0xcf2e34c3, 0x20ec5ffd, 0xf6498598, 0x198beea6, 0xf2bc55a5, - 0x1d7e3e9b, 0xffa225e2, 0x10604edc, 0xfb57f5df, 0x14959ee1, - 0xe59ec56c, 0x0a5cae52, 0xe16b1551, 0x0ea97e6f, 0xec756516, - 0x03b70e28, 0xe880b52b, 0x0742de15, 0xe6050901, 0x09c7623f, - 0xe2f0d93c, 0x0d32b202, 0xefeea97b, 0x002cc245, 0xeb1b7946, - 0x04d91278, 0xf5d249f5, 0x1a1022cb, 0xf12799c8, 0x1ee5f2f6, - 0xfc39e98f, 0x13fb82b1, 0xf8cc39b2, 0x170e528c, 0xc1ab88e9, - 0x2e69e3d7, 0xc55e58d4, 0x2a9c33ea, 0xc8402893, 0x278243ad, - 0xccb5f8ae, 0x23779390, 0xd27cc81d, 0x3dbea323, 0xd6891820, - 0x394b731e, 0xdb976867, 0x34550359, 0xdf62b85a, 0x30a0d364, - 0xa9580ad1, 0x469a61ef, 0xadaddaec, 0x426fb1d2, 0xa0b3aaab, - 0x4f71c195, 0xa4467a96, 0x4b8411a8, 0xba8f4a25, 0x554d211b, - 0xbe7a9a18, 0x51b8f126, 0xb364ea5f, 0x5ca68161, 0xb7913a62, - 0x5853515c, 0x8ef68b39, 0x6134e007, 0x8a035b04, 0x65c1303a, - 0x871d2b43, 0x68df407d, 0x83e8fb7e, 0x6c2a9040, 0x9d21cbcd, - 0x72e3a0f3, 0x99d41bf0, 0x761670ce, 0x94ca6bb7, 0x7b080089, - 0x903fbb8a, 0x7ffdd0b4, 0x78bf0ea1, 0x977d659f, 0x7c4ade9c, - 0x9388b5a2, 0x7154aedb, 0x9e96c5e5, 0x75a17ee6, 0x9a6315d8, - 0x6b684e55, 0x84aa256b, 0x6f9d9e68, 0x805ff556, 0x6283ee2f, - 0x8d418511, 0x66763e12, 0x89b4552c, 0x5f118f49, 0xb0d3e477, - 0x5be45f74, 0xb426344a, 0x56fa2f33, 0xb938440d, 0x520fff0e, - 0xbdcd9430, 0x4cc6cfbd, 0xa304a483, 0x48331f80, 0xa7f174be, - 0x452d6fc7, 0xaaef04f9, 0x41d8bffa, 0xae1ad4c4, 0x37e20d71, - 0xd820664f, 0x3317dd4c, 0xdcd5b672, 0x3e09ad0b, 0xd1cbc635, - 0x3afc7d36, 0xd53e1608, 0x24354d85, 0xcbf726bb, 0x20c09db8, - 0xcf02f686, 0x2ddeedff, 0xc21c86c1, 0x292b3dc2, 0xc6e956fc, - 0x104c8c99, 0xff8ee7a7, 0x14b95ca4, 0xfb7b379a, 0x19a72ce3, - 0xf66547dd, 0x1d52fcde, 0xf29097e0, 0x039bcc6d, 0xec59a753, - 0x076e1c50, 0xe8ac776e, 0x0a706c17, 0xe5b20729, 0x0e85bc2a, - 0xe147d714}, - {0x00000000, 0x177b1443, 0x2ef62886, 0x398d3cc5, 0x5dec510c, - 0x4a97454f, 0x731a798a, 0x64616dc9, 0xbbd8a218, 0xaca3b65b, - 0x952e8a9e, 0x82559edd, 0xe634f314, 0xf14fe757, 0xc8c2db92, - 0xdfb9cfd1, 0xacc04271, 0xbbbb5632, 0x82366af7, 0x954d7eb4, - 0xf12c137d, 0xe657073e, 0xdfda3bfb, 0xc8a12fb8, 0x1718e069, - 0x0063f42a, 0x39eec8ef, 0x2e95dcac, 0x4af4b165, 0x5d8fa526, - 0x640299e3, 0x73798da0, 0x82f182a3, 0x958a96e0, 0xac07aa25, - 0xbb7cbe66, 0xdf1dd3af, 0xc866c7ec, 0xf1ebfb29, 0xe690ef6a, - 0x392920bb, 0x2e5234f8, 0x17df083d, 0x00a41c7e, 0x64c571b7, - 0x73be65f4, 0x4a335931, 0x5d484d72, 0x2e31c0d2, 0x394ad491, - 0x00c7e854, 0x17bcfc17, 0x73dd91de, 0x64a6859d, 0x5d2bb958, - 0x4a50ad1b, 0x95e962ca, 0x82927689, 0xbb1f4a4c, 0xac645e0f, - 0xc80533c6, 0xdf7e2785, 0xe6f31b40, 0xf1880f03, 0xde920307, - 0xc9e91744, 0xf0642b81, 0xe71f3fc2, 0x837e520b, 0x94054648, - 0xad887a8d, 0xbaf36ece, 0x654aa11f, 0x7231b55c, 0x4bbc8999, - 0x5cc79dda, 0x38a6f013, 0x2fdde450, 0x1650d895, 0x012bccd6, - 0x72524176, 0x65295535, 0x5ca469f0, 0x4bdf7db3, 0x2fbe107a, - 0x38c50439, 0x014838fc, 0x16332cbf, 0xc98ae36e, 0xdef1f72d, - 0xe77ccbe8, 0xf007dfab, 0x9466b262, 0x831da621, 0xba909ae4, - 0xadeb8ea7, 0x5c6381a4, 0x4b1895e7, 0x7295a922, 0x65eebd61, - 0x018fd0a8, 0x16f4c4eb, 0x2f79f82e, 0x3802ec6d, 0xe7bb23bc, - 0xf0c037ff, 0xc94d0b3a, 0xde361f79, 0xba5772b0, 0xad2c66f3, - 0x94a15a36, 0x83da4e75, 0xf0a3c3d5, 0xe7d8d796, 0xde55eb53, - 0xc92eff10, 0xad4f92d9, 0xba34869a, 0x83b9ba5f, 0x94c2ae1c, - 0x4b7b61cd, 0x5c00758e, 0x658d494b, 0x72f65d08, 0x169730c1, - 0x01ec2482, 0x38611847, 0x2f1a0c04, 0x6655004f, 0x712e140c, - 0x48a328c9, 0x5fd83c8a, 0x3bb95143, 0x2cc24500, 0x154f79c5, - 0x02346d86, 0xdd8da257, 0xcaf6b614, 0xf37b8ad1, 0xe4009e92, - 0x8061f35b, 0x971ae718, 0xae97dbdd, 0xb9eccf9e, 0xca95423e, - 0xddee567d, 0xe4636ab8, 0xf3187efb, 0x97791332, 0x80020771, - 0xb98f3bb4, 0xaef42ff7, 0x714de026, 0x6636f465, 0x5fbbc8a0, - 0x48c0dce3, 0x2ca1b12a, 0x3bdaa569, 0x025799ac, 0x152c8def, - 0xe4a482ec, 0xf3df96af, 0xca52aa6a, 0xdd29be29, 0xb948d3e0, - 0xae33c7a3, 0x97befb66, 0x80c5ef25, 0x5f7c20f4, 0x480734b7, - 0x718a0872, 0x66f11c31, 0x029071f8, 0x15eb65bb, 0x2c66597e, - 0x3b1d4d3d, 0x4864c09d, 0x5f1fd4de, 0x6692e81b, 0x71e9fc58, - 0x15889191, 0x02f385d2, 0x3b7eb917, 0x2c05ad54, 0xf3bc6285, - 0xe4c776c6, 0xdd4a4a03, 0xca315e40, 0xae503389, 0xb92b27ca, - 0x80a61b0f, 0x97dd0f4c, 0xb8c70348, 0xafbc170b, 0x96312bce, - 0x814a3f8d, 0xe52b5244, 0xf2504607, 0xcbdd7ac2, 0xdca66e81, - 0x031fa150, 0x1464b513, 0x2de989d6, 0x3a929d95, 0x5ef3f05c, - 0x4988e41f, 0x7005d8da, 0x677ecc99, 0x14074139, 0x037c557a, - 0x3af169bf, 0x2d8a7dfc, 0x49eb1035, 0x5e900476, 0x671d38b3, - 0x70662cf0, 0xafdfe321, 0xb8a4f762, 0x8129cba7, 0x9652dfe4, - 0xf233b22d, 0xe548a66e, 0xdcc59aab, 0xcbbe8ee8, 0x3a3681eb, - 0x2d4d95a8, 0x14c0a96d, 0x03bbbd2e, 0x67dad0e7, 0x70a1c4a4, - 0x492cf861, 0x5e57ec22, 0x81ee23f3, 0x969537b0, 0xaf180b75, - 0xb8631f36, 0xdc0272ff, 0xcb7966bc, 0xf2f45a79, 0xe58f4e3a, - 0x96f6c39a, 0x818dd7d9, 0xb800eb1c, 0xaf7bff5f, 0xcb1a9296, - 0xdc6186d5, 0xe5ecba10, 0xf297ae53, 0x2d2e6182, 0x3a5575c1, - 0x03d84904, 0x14a35d47, 0x70c2308e, 0x67b924cd, 0x5e341808, - 0x494f0c4b}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0x43147b1700000000, 0x8628f62e00000000, - 0xc53c8d3900000000, 0x0c51ec5d00000000, 0x4f45974a00000000, - 0x8a791a7300000000, 0xc96d616400000000, 0x18a2d8bb00000000, - 0x5bb6a3ac00000000, 0x9e8a2e9500000000, 0xdd9e558200000000, - 0x14f334e600000000, 0x57e74ff100000000, 0x92dbc2c800000000, - 0xd1cfb9df00000000, 0x7142c0ac00000000, 0x3256bbbb00000000, - 0xf76a368200000000, 0xb47e4d9500000000, 0x7d132cf100000000, - 0x3e0757e600000000, 0xfb3bdadf00000000, 0xb82fa1c800000000, - 0x69e0181700000000, 0x2af4630000000000, 0xefc8ee3900000000, - 0xacdc952e00000000, 0x65b1f44a00000000, 0x26a58f5d00000000, - 0xe399026400000000, 0xa08d797300000000, 0xa382f18200000000, - 0xe0968a9500000000, 0x25aa07ac00000000, 0x66be7cbb00000000, - 0xafd31ddf00000000, 0xecc766c800000000, 0x29fbebf100000000, - 0x6aef90e600000000, 0xbb20293900000000, 0xf834522e00000000, - 0x3d08df1700000000, 0x7e1ca40000000000, 0xb771c56400000000, - 0xf465be7300000000, 0x3159334a00000000, 0x724d485d00000000, - 0xd2c0312e00000000, 0x91d44a3900000000, 0x54e8c70000000000, - 0x17fcbc1700000000, 0xde91dd7300000000, 0x9d85a66400000000, - 0x58b92b5d00000000, 0x1bad504a00000000, 0xca62e99500000000, - 0x8976928200000000, 0x4c4a1fbb00000000, 0x0f5e64ac00000000, - 0xc63305c800000000, 0x85277edf00000000, 0x401bf3e600000000, - 0x030f88f100000000, 0x070392de00000000, 0x4417e9c900000000, - 0x812b64f000000000, 0xc23f1fe700000000, 0x0b527e8300000000, - 0x4846059400000000, 0x8d7a88ad00000000, 0xce6ef3ba00000000, - 0x1fa14a6500000000, 0x5cb5317200000000, 0x9989bc4b00000000, - 0xda9dc75c00000000, 0x13f0a63800000000, 0x50e4dd2f00000000, - 0x95d8501600000000, 0xd6cc2b0100000000, 0x7641527200000000, - 0x3555296500000000, 0xf069a45c00000000, 0xb37ddf4b00000000, - 0x7a10be2f00000000, 0x3904c53800000000, 0xfc38480100000000, - 0xbf2c331600000000, 0x6ee38ac900000000, 0x2df7f1de00000000, - 0xe8cb7ce700000000, 0xabdf07f000000000, 0x62b2669400000000, - 0x21a61d8300000000, 0xe49a90ba00000000, 0xa78eebad00000000, - 0xa481635c00000000, 0xe795184b00000000, 0x22a9957200000000, - 0x61bdee6500000000, 0xa8d08f0100000000, 0xebc4f41600000000, - 0x2ef8792f00000000, 0x6dec023800000000, 0xbc23bbe700000000, - 0xff37c0f000000000, 0x3a0b4dc900000000, 0x791f36de00000000, - 0xb07257ba00000000, 0xf3662cad00000000, 0x365aa19400000000, - 0x754eda8300000000, 0xd5c3a3f000000000, 0x96d7d8e700000000, - 0x53eb55de00000000, 0x10ff2ec900000000, 0xd9924fad00000000, - 0x9a8634ba00000000, 0x5fbab98300000000, 0x1caec29400000000, - 0xcd617b4b00000000, 0x8e75005c00000000, 0x4b498d6500000000, - 0x085df67200000000, 0xc130971600000000, 0x8224ec0100000000, - 0x4718613800000000, 0x040c1a2f00000000, 0x4f00556600000000, - 0x0c142e7100000000, 0xc928a34800000000, 0x8a3cd85f00000000, - 0x4351b93b00000000, 0x0045c22c00000000, 0xc5794f1500000000, - 0x866d340200000000, 0x57a28ddd00000000, 0x14b6f6ca00000000, - 0xd18a7bf300000000, 0x929e00e400000000, 0x5bf3618000000000, - 0x18e71a9700000000, 0xdddb97ae00000000, 0x9ecfecb900000000, - 0x3e4295ca00000000, 0x7d56eedd00000000, 0xb86a63e400000000, - 0xfb7e18f300000000, 0x3213799700000000, 0x7107028000000000, - 0xb43b8fb900000000, 0xf72ff4ae00000000, 0x26e04d7100000000, - 0x65f4366600000000, 0xa0c8bb5f00000000, 0xe3dcc04800000000, - 0x2ab1a12c00000000, 0x69a5da3b00000000, 0xac99570200000000, - 0xef8d2c1500000000, 0xec82a4e400000000, 0xaf96dff300000000, - 0x6aaa52ca00000000, 0x29be29dd00000000, 0xe0d348b900000000, - 0xa3c733ae00000000, 0x66fbbe9700000000, 0x25efc58000000000, - 0xf4207c5f00000000, 0xb734074800000000, 0x72088a7100000000, - 0x311cf16600000000, 0xf871900200000000, 0xbb65eb1500000000, - 0x7e59662c00000000, 0x3d4d1d3b00000000, 0x9dc0644800000000, - 0xded41f5f00000000, 0x1be8926600000000, 0x58fce97100000000, - 0x9191881500000000, 0xd285f30200000000, 0x17b97e3b00000000, - 0x54ad052c00000000, 0x8562bcf300000000, 0xc676c7e400000000, - 0x034a4add00000000, 0x405e31ca00000000, 0x893350ae00000000, - 0xca272bb900000000, 0x0f1ba68000000000, 0x4c0fdd9700000000, - 0x4803c7b800000000, 0x0b17bcaf00000000, 0xce2b319600000000, - 0x8d3f4a8100000000, 0x44522be500000000, 0x074650f200000000, - 0xc27addcb00000000, 0x816ea6dc00000000, 0x50a11f0300000000, - 0x13b5641400000000, 0xd689e92d00000000, 0x959d923a00000000, - 0x5cf0f35e00000000, 0x1fe4884900000000, 0xdad8057000000000, - 0x99cc7e6700000000, 0x3941071400000000, 0x7a557c0300000000, - 0xbf69f13a00000000, 0xfc7d8a2d00000000, 0x3510eb4900000000, - 0x7604905e00000000, 0xb3381d6700000000, 0xf02c667000000000, - 0x21e3dfaf00000000, 0x62f7a4b800000000, 0xa7cb298100000000, - 0xe4df529600000000, 0x2db233f200000000, 0x6ea648e500000000, - 0xab9ac5dc00000000, 0xe88ebecb00000000, 0xeb81363a00000000, - 0xa8954d2d00000000, 0x6da9c01400000000, 0x2ebdbb0300000000, - 0xe7d0da6700000000, 0xa4c4a17000000000, 0x61f82c4900000000, - 0x22ec575e00000000, 0xf323ee8100000000, 0xb037959600000000, - 0x750b18af00000000, 0x361f63b800000000, 0xff7202dc00000000, - 0xbc6679cb00000000, 0x795af4f200000000, 0x3a4e8fe500000000, - 0x9ac3f69600000000, 0xd9d78d8100000000, 0x1ceb00b800000000, - 0x5fff7baf00000000, 0x96921acb00000000, 0xd58661dc00000000, - 0x10baece500000000, 0x53ae97f200000000, 0x82612e2d00000000, - 0xc175553a00000000, 0x0449d80300000000, 0x475da31400000000, - 0x8e30c27000000000, 0xcd24b96700000000, 0x0818345e00000000, - 0x4b0c4f4900000000}, - {0x0000000000000000, 0x3e6bc2ef00000000, 0x3dd0f50400000000, - 0x03bb37eb00000000, 0x7aa0eb0900000000, 0x44cb29e600000000, - 0x47701e0d00000000, 0x791bdce200000000, 0xf440d71300000000, - 0xca2b15fc00000000, 0xc990221700000000, 0xf7fbe0f800000000, - 0x8ee03c1a00000000, 0xb08bfef500000000, 0xb330c91e00000000, - 0x8d5b0bf100000000, 0xe881ae2700000000, 0xd6ea6cc800000000, - 0xd5515b2300000000, 0xeb3a99cc00000000, 0x9221452e00000000, - 0xac4a87c100000000, 0xaff1b02a00000000, 0x919a72c500000000, - 0x1cc1793400000000, 0x22aabbdb00000000, 0x21118c3000000000, - 0x1f7a4edf00000000, 0x6661923d00000000, 0x580a50d200000000, - 0x5bb1673900000000, 0x65daa5d600000000, 0xd0035d4f00000000, - 0xee689fa000000000, 0xedd3a84b00000000, 0xd3b86aa400000000, - 0xaaa3b64600000000, 0x94c874a900000000, 0x9773434200000000, - 0xa91881ad00000000, 0x24438a5c00000000, 0x1a2848b300000000, - 0x19937f5800000000, 0x27f8bdb700000000, 0x5ee3615500000000, - 0x6088a3ba00000000, 0x6333945100000000, 0x5d5856be00000000, - 0x3882f36800000000, 0x06e9318700000000, 0x0552066c00000000, - 0x3b39c48300000000, 0x4222186100000000, 0x7c49da8e00000000, - 0x7ff2ed6500000000, 0x41992f8a00000000, 0xccc2247b00000000, - 0xf2a9e69400000000, 0xf112d17f00000000, 0xcf79139000000000, - 0xb662cf7200000000, 0x88090d9d00000000, 0x8bb23a7600000000, - 0xb5d9f89900000000, 0xa007ba9e00000000, 0x9e6c787100000000, - 0x9dd74f9a00000000, 0xa3bc8d7500000000, 0xdaa7519700000000, - 0xe4cc937800000000, 0xe777a49300000000, 0xd91c667c00000000, - 0x54476d8d00000000, 0x6a2caf6200000000, 0x6997988900000000, - 0x57fc5a6600000000, 0x2ee7868400000000, 0x108c446b00000000, - 0x1337738000000000, 0x2d5cb16f00000000, 0x488614b900000000, - 0x76edd65600000000, 0x7556e1bd00000000, 0x4b3d235200000000, - 0x3226ffb000000000, 0x0c4d3d5f00000000, 0x0ff60ab400000000, - 0x319dc85b00000000, 0xbcc6c3aa00000000, 0x82ad014500000000, - 0x811636ae00000000, 0xbf7df44100000000, 0xc66628a300000000, - 0xf80dea4c00000000, 0xfbb6dda700000000, 0xc5dd1f4800000000, - 0x7004e7d100000000, 0x4e6f253e00000000, 0x4dd412d500000000, - 0x73bfd03a00000000, 0x0aa40cd800000000, 0x34cfce3700000000, - 0x3774f9dc00000000, 0x091f3b3300000000, 0x844430c200000000, - 0xba2ff22d00000000, 0xb994c5c600000000, 0x87ff072900000000, - 0xfee4dbcb00000000, 0xc08f192400000000, 0xc3342ecf00000000, - 0xfd5fec2000000000, 0x988549f600000000, 0xa6ee8b1900000000, - 0xa555bcf200000000, 0x9b3e7e1d00000000, 0xe225a2ff00000000, - 0xdc4e601000000000, 0xdff557fb00000000, 0xe19e951400000000, - 0x6cc59ee500000000, 0x52ae5c0a00000000, 0x51156be100000000, - 0x6f7ea90e00000000, 0x166575ec00000000, 0x280eb70300000000, - 0x2bb580e800000000, 0x15de420700000000, 0x010905e600000000, - 0x3f62c70900000000, 0x3cd9f0e200000000, 0x02b2320d00000000, - 0x7ba9eeef00000000, 0x45c22c0000000000, 0x46791beb00000000, - 0x7812d90400000000, 0xf549d2f500000000, 0xcb22101a00000000, - 0xc89927f100000000, 0xf6f2e51e00000000, 0x8fe939fc00000000, - 0xb182fb1300000000, 0xb239ccf800000000, 0x8c520e1700000000, - 0xe988abc100000000, 0xd7e3692e00000000, 0xd4585ec500000000, - 0xea339c2a00000000, 0x932840c800000000, 0xad43822700000000, - 0xaef8b5cc00000000, 0x9093772300000000, 0x1dc87cd200000000, - 0x23a3be3d00000000, 0x201889d600000000, 0x1e734b3900000000, - 0x676897db00000000, 0x5903553400000000, 0x5ab862df00000000, - 0x64d3a03000000000, 0xd10a58a900000000, 0xef619a4600000000, - 0xecdaadad00000000, 0xd2b16f4200000000, 0xabaab3a000000000, - 0x95c1714f00000000, 0x967a46a400000000, 0xa811844b00000000, - 0x254a8fba00000000, 0x1b214d5500000000, 0x189a7abe00000000, - 0x26f1b85100000000, 0x5fea64b300000000, 0x6181a65c00000000, - 0x623a91b700000000, 0x5c51535800000000, 0x398bf68e00000000, - 0x07e0346100000000, 0x045b038a00000000, 0x3a30c16500000000, - 0x432b1d8700000000, 0x7d40df6800000000, 0x7efbe88300000000, - 0x40902a6c00000000, 0xcdcb219d00000000, 0xf3a0e37200000000, - 0xf01bd49900000000, 0xce70167600000000, 0xb76bca9400000000, - 0x8900087b00000000, 0x8abb3f9000000000, 0xb4d0fd7f00000000, - 0xa10ebf7800000000, 0x9f657d9700000000, 0x9cde4a7c00000000, - 0xa2b5889300000000, 0xdbae547100000000, 0xe5c5969e00000000, - 0xe67ea17500000000, 0xd815639a00000000, 0x554e686b00000000, - 0x6b25aa8400000000, 0x689e9d6f00000000, 0x56f55f8000000000, - 0x2fee836200000000, 0x1185418d00000000, 0x123e766600000000, - 0x2c55b48900000000, 0x498f115f00000000, 0x77e4d3b000000000, - 0x745fe45b00000000, 0x4a3426b400000000, 0x332ffa5600000000, - 0x0d4438b900000000, 0x0eff0f5200000000, 0x3094cdbd00000000, - 0xbdcfc64c00000000, 0x83a404a300000000, 0x801f334800000000, - 0xbe74f1a700000000, 0xc76f2d4500000000, 0xf904efaa00000000, - 0xfabfd84100000000, 0xc4d41aae00000000, 0x710de23700000000, - 0x4f6620d800000000, 0x4cdd173300000000, 0x72b6d5dc00000000, - 0x0bad093e00000000, 0x35c6cbd100000000, 0x367dfc3a00000000, - 0x08163ed500000000, 0x854d352400000000, 0xbb26f7cb00000000, - 0xb89dc02000000000, 0x86f602cf00000000, 0xffedde2d00000000, - 0xc1861cc200000000, 0xc23d2b2900000000, 0xfc56e9c600000000, - 0x998c4c1000000000, 0xa7e78eff00000000, 0xa45cb91400000000, - 0x9a377bfb00000000, 0xe32ca71900000000, 0xdd4765f600000000, - 0xdefc521d00000000, 0xe09790f200000000, 0x6dcc9b0300000000, - 0x53a759ec00000000, 0x501c6e0700000000, 0x6e77ace800000000, - 0x176c700a00000000, 0x2907b2e500000000, 0x2abc850e00000000, - 0x14d747e100000000}, - {0x0000000000000000, 0xc0df8ec100000000, 0xc1b96c5800000000, - 0x0166e29900000000, 0x8273d9b000000000, 0x42ac577100000000, - 0x43cab5e800000000, 0x83153b2900000000, 0x45e1c3ba00000000, - 0x853e4d7b00000000, 0x8458afe200000000, 0x4487212300000000, - 0xc7921a0a00000000, 0x074d94cb00000000, 0x062b765200000000, - 0xc6f4f89300000000, 0xcbc4f6ae00000000, 0x0b1b786f00000000, - 0x0a7d9af600000000, 0xcaa2143700000000, 0x49b72f1e00000000, - 0x8968a1df00000000, 0x880e434600000000, 0x48d1cd8700000000, - 0x8e25351400000000, 0x4efabbd500000000, 0x4f9c594c00000000, - 0x8f43d78d00000000, 0x0c56eca400000000, 0xcc89626500000000, - 0xcdef80fc00000000, 0x0d300e3d00000000, 0xd78f9c8600000000, - 0x1750124700000000, 0x1636f0de00000000, 0xd6e97e1f00000000, - 0x55fc453600000000, 0x9523cbf700000000, 0x9445296e00000000, - 0x549aa7af00000000, 0x926e5f3c00000000, 0x52b1d1fd00000000, - 0x53d7336400000000, 0x9308bda500000000, 0x101d868c00000000, - 0xd0c2084d00000000, 0xd1a4ead400000000, 0x117b641500000000, - 0x1c4b6a2800000000, 0xdc94e4e900000000, 0xddf2067000000000, - 0x1d2d88b100000000, 0x9e38b39800000000, 0x5ee73d5900000000, - 0x5f81dfc000000000, 0x9f5e510100000000, 0x59aaa99200000000, - 0x9975275300000000, 0x9813c5ca00000000, 0x58cc4b0b00000000, - 0xdbd9702200000000, 0x1b06fee300000000, 0x1a601c7a00000000, - 0xdabf92bb00000000, 0xef1948d600000000, 0x2fc6c61700000000, - 0x2ea0248e00000000, 0xee7faa4f00000000, 0x6d6a916600000000, - 0xadb51fa700000000, 0xacd3fd3e00000000, 0x6c0c73ff00000000, - 0xaaf88b6c00000000, 0x6a2705ad00000000, 0x6b41e73400000000, - 0xab9e69f500000000, 0x288b52dc00000000, 0xe854dc1d00000000, - 0xe9323e8400000000, 0x29edb04500000000, 0x24ddbe7800000000, - 0xe40230b900000000, 0xe564d22000000000, 0x25bb5ce100000000, - 0xa6ae67c800000000, 0x6671e90900000000, 0x67170b9000000000, - 0xa7c8855100000000, 0x613c7dc200000000, 0xa1e3f30300000000, - 0xa085119a00000000, 0x605a9f5b00000000, 0xe34fa47200000000, - 0x23902ab300000000, 0x22f6c82a00000000, 0xe22946eb00000000, - 0x3896d45000000000, 0xf8495a9100000000, 0xf92fb80800000000, - 0x39f036c900000000, 0xbae50de000000000, 0x7a3a832100000000, - 0x7b5c61b800000000, 0xbb83ef7900000000, 0x7d7717ea00000000, - 0xbda8992b00000000, 0xbcce7bb200000000, 0x7c11f57300000000, - 0xff04ce5a00000000, 0x3fdb409b00000000, 0x3ebda20200000000, - 0xfe622cc300000000, 0xf35222fe00000000, 0x338dac3f00000000, - 0x32eb4ea600000000, 0xf234c06700000000, 0x7121fb4e00000000, - 0xb1fe758f00000000, 0xb098971600000000, 0x704719d700000000, - 0xb6b3e14400000000, 0x766c6f8500000000, 0x770a8d1c00000000, - 0xb7d503dd00000000, 0x34c038f400000000, 0xf41fb63500000000, - 0xf57954ac00000000, 0x35a6da6d00000000, 0x9f35e17700000000, - 0x5fea6fb600000000, 0x5e8c8d2f00000000, 0x9e5303ee00000000, - 0x1d4638c700000000, 0xdd99b60600000000, 0xdcff549f00000000, - 0x1c20da5e00000000, 0xdad422cd00000000, 0x1a0bac0c00000000, - 0x1b6d4e9500000000, 0xdbb2c05400000000, 0x58a7fb7d00000000, - 0x987875bc00000000, 0x991e972500000000, 0x59c119e400000000, - 0x54f117d900000000, 0x942e991800000000, 0x95487b8100000000, - 0x5597f54000000000, 0xd682ce6900000000, 0x165d40a800000000, - 0x173ba23100000000, 0xd7e42cf000000000, 0x1110d46300000000, - 0xd1cf5aa200000000, 0xd0a9b83b00000000, 0x107636fa00000000, - 0x93630dd300000000, 0x53bc831200000000, 0x52da618b00000000, - 0x9205ef4a00000000, 0x48ba7df100000000, 0x8865f33000000000, - 0x890311a900000000, 0x49dc9f6800000000, 0xcac9a44100000000, - 0x0a162a8000000000, 0x0b70c81900000000, 0xcbaf46d800000000, - 0x0d5bbe4b00000000, 0xcd84308a00000000, 0xcce2d21300000000, - 0x0c3d5cd200000000, 0x8f2867fb00000000, 0x4ff7e93a00000000, - 0x4e910ba300000000, 0x8e4e856200000000, 0x837e8b5f00000000, - 0x43a1059e00000000, 0x42c7e70700000000, 0x821869c600000000, - 0x010d52ef00000000, 0xc1d2dc2e00000000, 0xc0b43eb700000000, - 0x006bb07600000000, 0xc69f48e500000000, 0x0640c62400000000, - 0x072624bd00000000, 0xc7f9aa7c00000000, 0x44ec915500000000, - 0x84331f9400000000, 0x8555fd0d00000000, 0x458a73cc00000000, - 0x702ca9a100000000, 0xb0f3276000000000, 0xb195c5f900000000, - 0x714a4b3800000000, 0xf25f701100000000, 0x3280fed000000000, - 0x33e61c4900000000, 0xf339928800000000, 0x35cd6a1b00000000, - 0xf512e4da00000000, 0xf474064300000000, 0x34ab888200000000, - 0xb7beb3ab00000000, 0x77613d6a00000000, 0x7607dff300000000, - 0xb6d8513200000000, 0xbbe85f0f00000000, 0x7b37d1ce00000000, - 0x7a51335700000000, 0xba8ebd9600000000, 0x399b86bf00000000, - 0xf944087e00000000, 0xf822eae700000000, 0x38fd642600000000, - 0xfe099cb500000000, 0x3ed6127400000000, 0x3fb0f0ed00000000, - 0xff6f7e2c00000000, 0x7c7a450500000000, 0xbca5cbc400000000, - 0xbdc3295d00000000, 0x7d1ca79c00000000, 0xa7a3352700000000, - 0x677cbbe600000000, 0x661a597f00000000, 0xa6c5d7be00000000, - 0x25d0ec9700000000, 0xe50f625600000000, 0xe46980cf00000000, - 0x24b60e0e00000000, 0xe242f69d00000000, 0x229d785c00000000, - 0x23fb9ac500000000, 0xe324140400000000, 0x60312f2d00000000, - 0xa0eea1ec00000000, 0xa188437500000000, 0x6157cdb400000000, - 0x6c67c38900000000, 0xacb84d4800000000, 0xaddeafd100000000, - 0x6d01211000000000, 0xee141a3900000000, 0x2ecb94f800000000, - 0x2fad766100000000, 0xef72f8a000000000, 0x2986003300000000, - 0xe9598ef200000000, 0xe83f6c6b00000000, 0x28e0e2aa00000000, - 0xabf5d98300000000, 0x6b2a574200000000, 0x6a4cb5db00000000, - 0xaa933b1a00000000}, - {0x0000000000000000, 0x6f4ca59b00000000, 0x9f9e3bec00000000, - 0xf0d29e7700000000, 0x7f3b060300000000, 0x1077a39800000000, - 0xe0a53def00000000, 0x8fe9987400000000, 0xfe760c0600000000, - 0x913aa99d00000000, 0x61e837ea00000000, 0x0ea4927100000000, - 0x814d0a0500000000, 0xee01af9e00000000, 0x1ed331e900000000, - 0x719f947200000000, 0xfced180c00000000, 0x93a1bd9700000000, - 0x637323e000000000, 0x0c3f867b00000000, 0x83d61e0f00000000, - 0xec9abb9400000000, 0x1c4825e300000000, 0x7304807800000000, - 0x029b140a00000000, 0x6dd7b19100000000, 0x9d052fe600000000, - 0xf2498a7d00000000, 0x7da0120900000000, 0x12ecb79200000000, - 0xe23e29e500000000, 0x8d728c7e00000000, 0xf8db311800000000, - 0x9797948300000000, 0x67450af400000000, 0x0809af6f00000000, - 0x87e0371b00000000, 0xe8ac928000000000, 0x187e0cf700000000, - 0x7732a96c00000000, 0x06ad3d1e00000000, 0x69e1988500000000, - 0x993306f200000000, 0xf67fa36900000000, 0x79963b1d00000000, - 0x16da9e8600000000, 0xe60800f100000000, 0x8944a56a00000000, - 0x0436291400000000, 0x6b7a8c8f00000000, 0x9ba812f800000000, - 0xf4e4b76300000000, 0x7b0d2f1700000000, 0x14418a8c00000000, - 0xe49314fb00000000, 0x8bdfb16000000000, 0xfa40251200000000, - 0x950c808900000000, 0x65de1efe00000000, 0x0a92bb6500000000, - 0x857b231100000000, 0xea37868a00000000, 0x1ae518fd00000000, - 0x75a9bd6600000000, 0xf0b7633000000000, 0x9ffbc6ab00000000, - 0x6f2958dc00000000, 0x0065fd4700000000, 0x8f8c653300000000, - 0xe0c0c0a800000000, 0x10125edf00000000, 0x7f5efb4400000000, - 0x0ec16f3600000000, 0x618dcaad00000000, 0x915f54da00000000, - 0xfe13f14100000000, 0x71fa693500000000, 0x1eb6ccae00000000, - 0xee6452d900000000, 0x8128f74200000000, 0x0c5a7b3c00000000, - 0x6316dea700000000, 0x93c440d000000000, 0xfc88e54b00000000, - 0x73617d3f00000000, 0x1c2dd8a400000000, 0xecff46d300000000, - 0x83b3e34800000000, 0xf22c773a00000000, 0x9d60d2a100000000, - 0x6db24cd600000000, 0x02fee94d00000000, 0x8d17713900000000, - 0xe25bd4a200000000, 0x12894ad500000000, 0x7dc5ef4e00000000, - 0x086c522800000000, 0x6720f7b300000000, 0x97f269c400000000, - 0xf8becc5f00000000, 0x7757542b00000000, 0x181bf1b000000000, - 0xe8c96fc700000000, 0x8785ca5c00000000, 0xf61a5e2e00000000, - 0x9956fbb500000000, 0x698465c200000000, 0x06c8c05900000000, - 0x8921582d00000000, 0xe66dfdb600000000, 0x16bf63c100000000, - 0x79f3c65a00000000, 0xf4814a2400000000, 0x9bcdefbf00000000, - 0x6b1f71c800000000, 0x0453d45300000000, 0x8bba4c2700000000, - 0xe4f6e9bc00000000, 0x142477cb00000000, 0x7b68d25000000000, - 0x0af7462200000000, 0x65bbe3b900000000, 0x95697dce00000000, - 0xfa25d85500000000, 0x75cc402100000000, 0x1a80e5ba00000000, - 0xea527bcd00000000, 0x851ede5600000000, 0xe06fc76000000000, - 0x8f2362fb00000000, 0x7ff1fc8c00000000, 0x10bd591700000000, - 0x9f54c16300000000, 0xf01864f800000000, 0x00cafa8f00000000, - 0x6f865f1400000000, 0x1e19cb6600000000, 0x71556efd00000000, - 0x8187f08a00000000, 0xeecb551100000000, 0x6122cd6500000000, - 0x0e6e68fe00000000, 0xfebcf68900000000, 0x91f0531200000000, - 0x1c82df6c00000000, 0x73ce7af700000000, 0x831ce48000000000, - 0xec50411b00000000, 0x63b9d96f00000000, 0x0cf57cf400000000, - 0xfc27e28300000000, 0x936b471800000000, 0xe2f4d36a00000000, - 0x8db876f100000000, 0x7d6ae88600000000, 0x12264d1d00000000, - 0x9dcfd56900000000, 0xf28370f200000000, 0x0251ee8500000000, - 0x6d1d4b1e00000000, 0x18b4f67800000000, 0x77f853e300000000, - 0x872acd9400000000, 0xe866680f00000000, 0x678ff07b00000000, - 0x08c355e000000000, 0xf811cb9700000000, 0x975d6e0c00000000, - 0xe6c2fa7e00000000, 0x898e5fe500000000, 0x795cc19200000000, - 0x1610640900000000, 0x99f9fc7d00000000, 0xf6b559e600000000, - 0x0667c79100000000, 0x692b620a00000000, 0xe459ee7400000000, - 0x8b154bef00000000, 0x7bc7d59800000000, 0x148b700300000000, - 0x9b62e87700000000, 0xf42e4dec00000000, 0x04fcd39b00000000, - 0x6bb0760000000000, 0x1a2fe27200000000, 0x756347e900000000, - 0x85b1d99e00000000, 0xeafd7c0500000000, 0x6514e47100000000, - 0x0a5841ea00000000, 0xfa8adf9d00000000, 0x95c67a0600000000, - 0x10d8a45000000000, 0x7f9401cb00000000, 0x8f469fbc00000000, - 0xe00a3a2700000000, 0x6fe3a25300000000, 0x00af07c800000000, - 0xf07d99bf00000000, 0x9f313c2400000000, 0xeeaea85600000000, - 0x81e20dcd00000000, 0x713093ba00000000, 0x1e7c362100000000, - 0x9195ae5500000000, 0xfed90bce00000000, 0x0e0b95b900000000, - 0x6147302200000000, 0xec35bc5c00000000, 0x837919c700000000, - 0x73ab87b000000000, 0x1ce7222b00000000, 0x930eba5f00000000, - 0xfc421fc400000000, 0x0c9081b300000000, 0x63dc242800000000, - 0x1243b05a00000000, 0x7d0f15c100000000, 0x8ddd8bb600000000, - 0xe2912e2d00000000, 0x6d78b65900000000, 0x023413c200000000, - 0xf2e68db500000000, 0x9daa282e00000000, 0xe803954800000000, - 0x874f30d300000000, 0x779daea400000000, 0x18d10b3f00000000, - 0x9738934b00000000, 0xf87436d000000000, 0x08a6a8a700000000, - 0x67ea0d3c00000000, 0x1675994e00000000, 0x79393cd500000000, - 0x89eba2a200000000, 0xe6a7073900000000, 0x694e9f4d00000000, - 0x06023ad600000000, 0xf6d0a4a100000000, 0x999c013a00000000, - 0x14ee8d4400000000, 0x7ba228df00000000, 0x8b70b6a800000000, - 0xe43c133300000000, 0x6bd58b4700000000, 0x04992edc00000000, - 0xf44bb0ab00000000, 0x9b07153000000000, 0xea98814200000000, - 0x85d424d900000000, 0x7506baae00000000, 0x1a4a1f3500000000, - 0x95a3874100000000, 0xfaef22da00000000, 0x0a3dbcad00000000, - 0x6571193600000000}, - {0x0000000000000000, 0x85d996dd00000000, 0x4bb55c6000000000, - 0xce6ccabd00000000, 0x966ab9c000000000, 0x13b32f1d00000000, - 0xdddfe5a000000000, 0x5806737d00000000, 0x6dd3035a00000000, - 0xe80a958700000000, 0x26665f3a00000000, 0xa3bfc9e700000000, - 0xfbb9ba9a00000000, 0x7e602c4700000000, 0xb00ce6fa00000000, - 0x35d5702700000000, 0xdaa607b400000000, 0x5f7f916900000000, - 0x91135bd400000000, 0x14cacd0900000000, 0x4cccbe7400000000, - 0xc91528a900000000, 0x0779e21400000000, 0x82a074c900000000, - 0xb77504ee00000000, 0x32ac923300000000, 0xfcc0588e00000000, - 0x7919ce5300000000, 0x211fbd2e00000000, 0xa4c62bf300000000, - 0x6aaae14e00000000, 0xef73779300000000, 0xf54b7eb300000000, - 0x7092e86e00000000, 0xbefe22d300000000, 0x3b27b40e00000000, - 0x6321c77300000000, 0xe6f851ae00000000, 0x28949b1300000000, - 0xad4d0dce00000000, 0x98987de900000000, 0x1d41eb3400000000, - 0xd32d218900000000, 0x56f4b75400000000, 0x0ef2c42900000000, - 0x8b2b52f400000000, 0x4547984900000000, 0xc09e0e9400000000, - 0x2fed790700000000, 0xaa34efda00000000, 0x6458256700000000, - 0xe181b3ba00000000, 0xb987c0c700000000, 0x3c5e561a00000000, - 0xf2329ca700000000, 0x77eb0a7a00000000, 0x423e7a5d00000000, - 0xc7e7ec8000000000, 0x098b263d00000000, 0x8c52b0e000000000, - 0xd454c39d00000000, 0x518d554000000000, 0x9fe19ffd00000000, - 0x1a38092000000000, 0xab918dbd00000000, 0x2e481b6000000000, - 0xe024d1dd00000000, 0x65fd470000000000, 0x3dfb347d00000000, - 0xb822a2a000000000, 0x764e681d00000000, 0xf397fec000000000, - 0xc6428ee700000000, 0x439b183a00000000, 0x8df7d28700000000, - 0x082e445a00000000, 0x5028372700000000, 0xd5f1a1fa00000000, - 0x1b9d6b4700000000, 0x9e44fd9a00000000, 0x71378a0900000000, - 0xf4ee1cd400000000, 0x3a82d66900000000, 0xbf5b40b400000000, - 0xe75d33c900000000, 0x6284a51400000000, 0xace86fa900000000, - 0x2931f97400000000, 0x1ce4895300000000, 0x993d1f8e00000000, - 0x5751d53300000000, 0xd28843ee00000000, 0x8a8e309300000000, - 0x0f57a64e00000000, 0xc13b6cf300000000, 0x44e2fa2e00000000, - 0x5edaf30e00000000, 0xdb0365d300000000, 0x156faf6e00000000, - 0x90b639b300000000, 0xc8b04ace00000000, 0x4d69dc1300000000, - 0x830516ae00000000, 0x06dc807300000000, 0x3309f05400000000, - 0xb6d0668900000000, 0x78bcac3400000000, 0xfd653ae900000000, - 0xa563499400000000, 0x20badf4900000000, 0xeed615f400000000, - 0x6b0f832900000000, 0x847cf4ba00000000, 0x01a5626700000000, - 0xcfc9a8da00000000, 0x4a103e0700000000, 0x12164d7a00000000, - 0x97cfdba700000000, 0x59a3111a00000000, 0xdc7a87c700000000, - 0xe9aff7e000000000, 0x6c76613d00000000, 0xa21aab8000000000, - 0x27c33d5d00000000, 0x7fc54e2000000000, 0xfa1cd8fd00000000, - 0x3470124000000000, 0xb1a9849d00000000, 0x17256aa000000000, - 0x92fcfc7d00000000, 0x5c9036c000000000, 0xd949a01d00000000, - 0x814fd36000000000, 0x049645bd00000000, 0xcafa8f0000000000, - 0x4f2319dd00000000, 0x7af669fa00000000, 0xff2fff2700000000, - 0x3143359a00000000, 0xb49aa34700000000, 0xec9cd03a00000000, - 0x694546e700000000, 0xa7298c5a00000000, 0x22f01a8700000000, - 0xcd836d1400000000, 0x485afbc900000000, 0x8636317400000000, - 0x03efa7a900000000, 0x5be9d4d400000000, 0xde30420900000000, - 0x105c88b400000000, 0x95851e6900000000, 0xa0506e4e00000000, - 0x2589f89300000000, 0xebe5322e00000000, 0x6e3ca4f300000000, - 0x363ad78e00000000, 0xb3e3415300000000, 0x7d8f8bee00000000, - 0xf8561d3300000000, 0xe26e141300000000, 0x67b782ce00000000, - 0xa9db487300000000, 0x2c02deae00000000, 0x7404add300000000, - 0xf1dd3b0e00000000, 0x3fb1f1b300000000, 0xba68676e00000000, - 0x8fbd174900000000, 0x0a64819400000000, 0xc4084b2900000000, - 0x41d1ddf400000000, 0x19d7ae8900000000, 0x9c0e385400000000, - 0x5262f2e900000000, 0xd7bb643400000000, 0x38c813a700000000, - 0xbd11857a00000000, 0x737d4fc700000000, 0xf6a4d91a00000000, - 0xaea2aa6700000000, 0x2b7b3cba00000000, 0xe517f60700000000, - 0x60ce60da00000000, 0x551b10fd00000000, 0xd0c2862000000000, - 0x1eae4c9d00000000, 0x9b77da4000000000, 0xc371a93d00000000, - 0x46a83fe000000000, 0x88c4f55d00000000, 0x0d1d638000000000, - 0xbcb4e71d00000000, 0x396d71c000000000, 0xf701bb7d00000000, - 0x72d82da000000000, 0x2ade5edd00000000, 0xaf07c80000000000, - 0x616b02bd00000000, 0xe4b2946000000000, 0xd167e44700000000, - 0x54be729a00000000, 0x9ad2b82700000000, 0x1f0b2efa00000000, - 0x470d5d8700000000, 0xc2d4cb5a00000000, 0x0cb801e700000000, - 0x8961973a00000000, 0x6612e0a900000000, 0xe3cb767400000000, - 0x2da7bcc900000000, 0xa87e2a1400000000, 0xf078596900000000, - 0x75a1cfb400000000, 0xbbcd050900000000, 0x3e1493d400000000, - 0x0bc1e3f300000000, 0x8e18752e00000000, 0x4074bf9300000000, - 0xc5ad294e00000000, 0x9dab5a3300000000, 0x1872ccee00000000, - 0xd61e065300000000, 0x53c7908e00000000, 0x49ff99ae00000000, - 0xcc260f7300000000, 0x024ac5ce00000000, 0x8793531300000000, - 0xdf95206e00000000, 0x5a4cb6b300000000, 0x94207c0e00000000, - 0x11f9ead300000000, 0x242c9af400000000, 0xa1f50c2900000000, - 0x6f99c69400000000, 0xea40504900000000, 0xb246233400000000, - 0x379fb5e900000000, 0xf9f37f5400000000, 0x7c2ae98900000000, - 0x93599e1a00000000, 0x168008c700000000, 0xd8ecc27a00000000, - 0x5d3554a700000000, 0x053327da00000000, 0x80eab10700000000, - 0x4e867bba00000000, 0xcb5fed6700000000, 0xfe8a9d4000000000, - 0x7b530b9d00000000, 0xb53fc12000000000, 0x30e657fd00000000, - 0x68e0248000000000, 0xed39b25d00000000, 0x235578e000000000, - 0xa68cee3d00000000}, - {0x0000000000000000, 0x76e10f9d00000000, 0xadc46ee100000000, - 0xdb25617c00000000, 0x1b8fac1900000000, 0x6d6ea38400000000, - 0xb64bc2f800000000, 0xc0aacd6500000000, 0x361e593300000000, - 0x40ff56ae00000000, 0x9bda37d200000000, 0xed3b384f00000000, - 0x2d91f52a00000000, 0x5b70fab700000000, 0x80559bcb00000000, - 0xf6b4945600000000, 0x6c3cb26600000000, 0x1addbdfb00000000, - 0xc1f8dc8700000000, 0xb719d31a00000000, 0x77b31e7f00000000, - 0x015211e200000000, 0xda77709e00000000, 0xac967f0300000000, - 0x5a22eb5500000000, 0x2cc3e4c800000000, 0xf7e685b400000000, - 0x81078a2900000000, 0x41ad474c00000000, 0x374c48d100000000, - 0xec6929ad00000000, 0x9a88263000000000, 0xd87864cd00000000, - 0xae996b5000000000, 0x75bc0a2c00000000, 0x035d05b100000000, - 0xc3f7c8d400000000, 0xb516c74900000000, 0x6e33a63500000000, - 0x18d2a9a800000000, 0xee663dfe00000000, 0x9887326300000000, - 0x43a2531f00000000, 0x35435c8200000000, 0xf5e991e700000000, - 0x83089e7a00000000, 0x582dff0600000000, 0x2eccf09b00000000, - 0xb444d6ab00000000, 0xc2a5d93600000000, 0x1980b84a00000000, - 0x6f61b7d700000000, 0xafcb7ab200000000, 0xd92a752f00000000, - 0x020f145300000000, 0x74ee1bce00000000, 0x825a8f9800000000, - 0xf4bb800500000000, 0x2f9ee17900000000, 0x597feee400000000, - 0x99d5238100000000, 0xef342c1c00000000, 0x34114d6000000000, - 0x42f042fd00000000, 0xf1f7b94100000000, 0x8716b6dc00000000, - 0x5c33d7a000000000, 0x2ad2d83d00000000, 0xea78155800000000, - 0x9c991ac500000000, 0x47bc7bb900000000, 0x315d742400000000, - 0xc7e9e07200000000, 0xb108efef00000000, 0x6a2d8e9300000000, - 0x1ccc810e00000000, 0xdc664c6b00000000, 0xaa8743f600000000, - 0x71a2228a00000000, 0x07432d1700000000, 0x9dcb0b2700000000, - 0xeb2a04ba00000000, 0x300f65c600000000, 0x46ee6a5b00000000, - 0x8644a73e00000000, 0xf0a5a8a300000000, 0x2b80c9df00000000, - 0x5d61c64200000000, 0xabd5521400000000, 0xdd345d8900000000, - 0x06113cf500000000, 0x70f0336800000000, 0xb05afe0d00000000, - 0xc6bbf19000000000, 0x1d9e90ec00000000, 0x6b7f9f7100000000, - 0x298fdd8c00000000, 0x5f6ed21100000000, 0x844bb36d00000000, - 0xf2aabcf000000000, 0x3200719500000000, 0x44e17e0800000000, - 0x9fc41f7400000000, 0xe92510e900000000, 0x1f9184bf00000000, - 0x69708b2200000000, 0xb255ea5e00000000, 0xc4b4e5c300000000, - 0x041e28a600000000, 0x72ff273b00000000, 0xa9da464700000000, - 0xdf3b49da00000000, 0x45b36fea00000000, 0x3352607700000000, - 0xe877010b00000000, 0x9e960e9600000000, 0x5e3cc3f300000000, - 0x28ddcc6e00000000, 0xf3f8ad1200000000, 0x8519a28f00000000, - 0x73ad36d900000000, 0x054c394400000000, 0xde69583800000000, - 0xa88857a500000000, 0x68229ac000000000, 0x1ec3955d00000000, - 0xc5e6f42100000000, 0xb307fbbc00000000, 0xe2ef738300000000, - 0x940e7c1e00000000, 0x4f2b1d6200000000, 0x39ca12ff00000000, - 0xf960df9a00000000, 0x8f81d00700000000, 0x54a4b17b00000000, - 0x2245bee600000000, 0xd4f12ab000000000, 0xa210252d00000000, - 0x7935445100000000, 0x0fd44bcc00000000, 0xcf7e86a900000000, - 0xb99f893400000000, 0x62bae84800000000, 0x145be7d500000000, - 0x8ed3c1e500000000, 0xf832ce7800000000, 0x2317af0400000000, - 0x55f6a09900000000, 0x955c6dfc00000000, 0xe3bd626100000000, - 0x3898031d00000000, 0x4e790c8000000000, 0xb8cd98d600000000, - 0xce2c974b00000000, 0x1509f63700000000, 0x63e8f9aa00000000, - 0xa34234cf00000000, 0xd5a33b5200000000, 0x0e865a2e00000000, - 0x786755b300000000, 0x3a97174e00000000, 0x4c7618d300000000, - 0x975379af00000000, 0xe1b2763200000000, 0x2118bb5700000000, - 0x57f9b4ca00000000, 0x8cdcd5b600000000, 0xfa3dda2b00000000, - 0x0c894e7d00000000, 0x7a6841e000000000, 0xa14d209c00000000, - 0xd7ac2f0100000000, 0x1706e26400000000, 0x61e7edf900000000, - 0xbac28c8500000000, 0xcc23831800000000, 0x56aba52800000000, - 0x204aaab500000000, 0xfb6fcbc900000000, 0x8d8ec45400000000, - 0x4d24093100000000, 0x3bc506ac00000000, 0xe0e067d000000000, - 0x9601684d00000000, 0x60b5fc1b00000000, 0x1654f38600000000, - 0xcd7192fa00000000, 0xbb909d6700000000, 0x7b3a500200000000, - 0x0ddb5f9f00000000, 0xd6fe3ee300000000, 0xa01f317e00000000, - 0x1318cac200000000, 0x65f9c55f00000000, 0xbedca42300000000, - 0xc83dabbe00000000, 0x089766db00000000, 0x7e76694600000000, - 0xa553083a00000000, 0xd3b207a700000000, 0x250693f100000000, - 0x53e79c6c00000000, 0x88c2fd1000000000, 0xfe23f28d00000000, - 0x3e893fe800000000, 0x4868307500000000, 0x934d510900000000, - 0xe5ac5e9400000000, 0x7f2478a400000000, 0x09c5773900000000, - 0xd2e0164500000000, 0xa40119d800000000, 0x64abd4bd00000000, - 0x124adb2000000000, 0xc96fba5c00000000, 0xbf8eb5c100000000, - 0x493a219700000000, 0x3fdb2e0a00000000, 0xe4fe4f7600000000, - 0x921f40eb00000000, 0x52b58d8e00000000, 0x2454821300000000, - 0xff71e36f00000000, 0x8990ecf200000000, 0xcb60ae0f00000000, - 0xbd81a19200000000, 0x66a4c0ee00000000, 0x1045cf7300000000, - 0xd0ef021600000000, 0xa60e0d8b00000000, 0x7d2b6cf700000000, - 0x0bca636a00000000, 0xfd7ef73c00000000, 0x8b9ff8a100000000, - 0x50ba99dd00000000, 0x265b964000000000, 0xe6f15b2500000000, - 0x901054b800000000, 0x4b3535c400000000, 0x3dd43a5900000000, - 0xa75c1c6900000000, 0xd1bd13f400000000, 0x0a98728800000000, - 0x7c797d1500000000, 0xbcd3b07000000000, 0xca32bfed00000000, - 0x1117de9100000000, 0x67f6d10c00000000, 0x9142455a00000000, - 0xe7a34ac700000000, 0x3c862bbb00000000, 0x4a67242600000000, - 0x8acde94300000000, 0xfc2ce6de00000000, 0x270987a200000000, - 0x51e8883f00000000}, - {0x0000000000000000, 0xe8dbfbb900000000, 0x91b186a800000000, - 0x796a7d1100000000, 0x63657c8a00000000, 0x8bbe873300000000, - 0xf2d4fa2200000000, 0x1a0f019b00000000, 0x87cc89cf00000000, - 0x6f17727600000000, 0x167d0f6700000000, 0xfea6f4de00000000, - 0xe4a9f54500000000, 0x0c720efc00000000, 0x751873ed00000000, - 0x9dc3885400000000, 0x4f9f624400000000, 0xa74499fd00000000, - 0xde2ee4ec00000000, 0x36f51f5500000000, 0x2cfa1ece00000000, - 0xc421e57700000000, 0xbd4b986600000000, 0x559063df00000000, - 0xc853eb8b00000000, 0x2088103200000000, 0x59e26d2300000000, - 0xb139969a00000000, 0xab36970100000000, 0x43ed6cb800000000, - 0x3a8711a900000000, 0xd25cea1000000000, 0x9e3ec58800000000, - 0x76e53e3100000000, 0x0f8f432000000000, 0xe754b89900000000, - 0xfd5bb90200000000, 0x158042bb00000000, 0x6cea3faa00000000, - 0x8431c41300000000, 0x19f24c4700000000, 0xf129b7fe00000000, - 0x8843caef00000000, 0x6098315600000000, 0x7a9730cd00000000, - 0x924ccb7400000000, 0xeb26b66500000000, 0x03fd4ddc00000000, - 0xd1a1a7cc00000000, 0x397a5c7500000000, 0x4010216400000000, - 0xa8cbdadd00000000, 0xb2c4db4600000000, 0x5a1f20ff00000000, - 0x23755dee00000000, 0xcbaea65700000000, 0x566d2e0300000000, - 0xbeb6d5ba00000000, 0xc7dca8ab00000000, 0x2f07531200000000, - 0x3508528900000000, 0xddd3a93000000000, 0xa4b9d42100000000, - 0x4c622f9800000000, 0x7d7bfbca00000000, 0x95a0007300000000, - 0xecca7d6200000000, 0x041186db00000000, 0x1e1e874000000000, - 0xf6c57cf900000000, 0x8faf01e800000000, 0x6774fa5100000000, - 0xfab7720500000000, 0x126c89bc00000000, 0x6b06f4ad00000000, - 0x83dd0f1400000000, 0x99d20e8f00000000, 0x7109f53600000000, - 0x0863882700000000, 0xe0b8739e00000000, 0x32e4998e00000000, - 0xda3f623700000000, 0xa3551f2600000000, 0x4b8ee49f00000000, - 0x5181e50400000000, 0xb95a1ebd00000000, 0xc03063ac00000000, - 0x28eb981500000000, 0xb528104100000000, 0x5df3ebf800000000, - 0x249996e900000000, 0xcc426d5000000000, 0xd64d6ccb00000000, - 0x3e96977200000000, 0x47fcea6300000000, 0xaf2711da00000000, - 0xe3453e4200000000, 0x0b9ec5fb00000000, 0x72f4b8ea00000000, - 0x9a2f435300000000, 0x802042c800000000, 0x68fbb97100000000, - 0x1191c46000000000, 0xf94a3fd900000000, 0x6489b78d00000000, - 0x8c524c3400000000, 0xf538312500000000, 0x1de3ca9c00000000, - 0x07eccb0700000000, 0xef3730be00000000, 0x965d4daf00000000, - 0x7e86b61600000000, 0xacda5c0600000000, 0x4401a7bf00000000, - 0x3d6bdaae00000000, 0xd5b0211700000000, 0xcfbf208c00000000, - 0x2764db3500000000, 0x5e0ea62400000000, 0xb6d55d9d00000000, - 0x2b16d5c900000000, 0xc3cd2e7000000000, 0xbaa7536100000000, - 0x527ca8d800000000, 0x4873a94300000000, 0xa0a852fa00000000, - 0xd9c22feb00000000, 0x3119d45200000000, 0xbbf0874e00000000, - 0x532b7cf700000000, 0x2a4101e600000000, 0xc29afa5f00000000, - 0xd895fbc400000000, 0x304e007d00000000, 0x49247d6c00000000, - 0xa1ff86d500000000, 0x3c3c0e8100000000, 0xd4e7f53800000000, - 0xad8d882900000000, 0x4556739000000000, 0x5f59720b00000000, - 0xb78289b200000000, 0xcee8f4a300000000, 0x26330f1a00000000, - 0xf46fe50a00000000, 0x1cb41eb300000000, 0x65de63a200000000, - 0x8d05981b00000000, 0x970a998000000000, 0x7fd1623900000000, - 0x06bb1f2800000000, 0xee60e49100000000, 0x73a36cc500000000, - 0x9b78977c00000000, 0xe212ea6d00000000, 0x0ac911d400000000, - 0x10c6104f00000000, 0xf81debf600000000, 0x817796e700000000, - 0x69ac6d5e00000000, 0x25ce42c600000000, 0xcd15b97f00000000, - 0xb47fc46e00000000, 0x5ca43fd700000000, 0x46ab3e4c00000000, - 0xae70c5f500000000, 0xd71ab8e400000000, 0x3fc1435d00000000, - 0xa202cb0900000000, 0x4ad930b000000000, 0x33b34da100000000, - 0xdb68b61800000000, 0xc167b78300000000, 0x29bc4c3a00000000, - 0x50d6312b00000000, 0xb80dca9200000000, 0x6a51208200000000, - 0x828adb3b00000000, 0xfbe0a62a00000000, 0x133b5d9300000000, - 0x09345c0800000000, 0xe1efa7b100000000, 0x9885daa000000000, - 0x705e211900000000, 0xed9da94d00000000, 0x054652f400000000, - 0x7c2c2fe500000000, 0x94f7d45c00000000, 0x8ef8d5c700000000, - 0x66232e7e00000000, 0x1f49536f00000000, 0xf792a8d600000000, - 0xc68b7c8400000000, 0x2e50873d00000000, 0x573afa2c00000000, - 0xbfe1019500000000, 0xa5ee000e00000000, 0x4d35fbb700000000, - 0x345f86a600000000, 0xdc847d1f00000000, 0x4147f54b00000000, - 0xa99c0ef200000000, 0xd0f673e300000000, 0x382d885a00000000, - 0x222289c100000000, 0xcaf9727800000000, 0xb3930f6900000000, - 0x5b48f4d000000000, 0x89141ec000000000, 0x61cfe57900000000, - 0x18a5986800000000, 0xf07e63d100000000, 0xea71624a00000000, - 0x02aa99f300000000, 0x7bc0e4e200000000, 0x931b1f5b00000000, - 0x0ed8970f00000000, 0xe6036cb600000000, 0x9f6911a700000000, - 0x77b2ea1e00000000, 0x6dbdeb8500000000, 0x8566103c00000000, - 0xfc0c6d2d00000000, 0x14d7969400000000, 0x58b5b90c00000000, - 0xb06e42b500000000, 0xc9043fa400000000, 0x21dfc41d00000000, - 0x3bd0c58600000000, 0xd30b3e3f00000000, 0xaa61432e00000000, - 0x42bab89700000000, 0xdf7930c300000000, 0x37a2cb7a00000000, - 0x4ec8b66b00000000, 0xa6134dd200000000, 0xbc1c4c4900000000, - 0x54c7b7f000000000, 0x2dadcae100000000, 0xc576315800000000, - 0x172adb4800000000, 0xfff120f100000000, 0x869b5de000000000, - 0x6e40a65900000000, 0x744fa7c200000000, 0x9c945c7b00000000, - 0xe5fe216a00000000, 0x0d25dad300000000, 0x90e6528700000000, - 0x783da93e00000000, 0x0157d42f00000000, 0xe98c2f9600000000, - 0xf3832e0d00000000, 0x1b58d5b400000000, 0x6232a8a500000000, - 0x8ae9531c00000000}, - {0x0000000000000000, 0x919168ae00000000, 0x6325a08700000000, - 0xf2b4c82900000000, 0x874c31d400000000, 0x16dd597a00000000, - 0xe469915300000000, 0x75f8f9fd00000000, 0x4f9f137300000000, - 0xde0e7bdd00000000, 0x2cbab3f400000000, 0xbd2bdb5a00000000, - 0xc8d322a700000000, 0x59424a0900000000, 0xabf6822000000000, - 0x3a67ea8e00000000, 0x9e3e27e600000000, 0x0faf4f4800000000, - 0xfd1b876100000000, 0x6c8aefcf00000000, 0x1972163200000000, - 0x88e37e9c00000000, 0x7a57b6b500000000, 0xebc6de1b00000000, - 0xd1a1349500000000, 0x40305c3b00000000, 0xb284941200000000, - 0x2315fcbc00000000, 0x56ed054100000000, 0xc77c6def00000000, - 0x35c8a5c600000000, 0xa459cd6800000000, 0x7d7b3f1700000000, - 0xecea57b900000000, 0x1e5e9f9000000000, 0x8fcff73e00000000, - 0xfa370ec300000000, 0x6ba6666d00000000, 0x9912ae4400000000, - 0x0883c6ea00000000, 0x32e42c6400000000, 0xa37544ca00000000, - 0x51c18ce300000000, 0xc050e44d00000000, 0xb5a81db000000000, - 0x2439751e00000000, 0xd68dbd3700000000, 0x471cd59900000000, - 0xe34518f100000000, 0x72d4705f00000000, 0x8060b87600000000, - 0x11f1d0d800000000, 0x6409292500000000, 0xf598418b00000000, - 0x072c89a200000000, 0x96bde10c00000000, 0xacda0b8200000000, - 0x3d4b632c00000000, 0xcfffab0500000000, 0x5e6ec3ab00000000, - 0x2b963a5600000000, 0xba0752f800000000, 0x48b39ad100000000, - 0xd922f27f00000000, 0xfaf67e2e00000000, 0x6b67168000000000, - 0x99d3dea900000000, 0x0842b60700000000, 0x7dba4ffa00000000, - 0xec2b275400000000, 0x1e9fef7d00000000, 0x8f0e87d300000000, - 0xb5696d5d00000000, 0x24f805f300000000, 0xd64ccdda00000000, - 0x47dda57400000000, 0x32255c8900000000, 0xa3b4342700000000, - 0x5100fc0e00000000, 0xc09194a000000000, 0x64c859c800000000, - 0xf559316600000000, 0x07edf94f00000000, 0x967c91e100000000, - 0xe384681c00000000, 0x721500b200000000, 0x80a1c89b00000000, - 0x1130a03500000000, 0x2b574abb00000000, 0xbac6221500000000, - 0x4872ea3c00000000, 0xd9e3829200000000, 0xac1b7b6f00000000, - 0x3d8a13c100000000, 0xcf3edbe800000000, 0x5eafb34600000000, - 0x878d413900000000, 0x161c299700000000, 0xe4a8e1be00000000, - 0x7539891000000000, 0x00c170ed00000000, 0x9150184300000000, - 0x63e4d06a00000000, 0xf275b8c400000000, 0xc812524a00000000, - 0x59833ae400000000, 0xab37f2cd00000000, 0x3aa69a6300000000, - 0x4f5e639e00000000, 0xdecf0b3000000000, 0x2c7bc31900000000, - 0xbdeaabb700000000, 0x19b366df00000000, 0x88220e7100000000, - 0x7a96c65800000000, 0xeb07aef600000000, 0x9eff570b00000000, - 0x0f6e3fa500000000, 0xfddaf78c00000000, 0x6c4b9f2200000000, - 0x562c75ac00000000, 0xc7bd1d0200000000, 0x3509d52b00000000, - 0xa498bd8500000000, 0xd160447800000000, 0x40f12cd600000000, - 0xb245e4ff00000000, 0x23d48c5100000000, 0xf4edfd5c00000000, - 0x657c95f200000000, 0x97c85ddb00000000, 0x0659357500000000, - 0x73a1cc8800000000, 0xe230a42600000000, 0x10846c0f00000000, - 0x811504a100000000, 0xbb72ee2f00000000, 0x2ae3868100000000, - 0xd8574ea800000000, 0x49c6260600000000, 0x3c3edffb00000000, - 0xadafb75500000000, 0x5f1b7f7c00000000, 0xce8a17d200000000, - 0x6ad3daba00000000, 0xfb42b21400000000, 0x09f67a3d00000000, - 0x9867129300000000, 0xed9feb6e00000000, 0x7c0e83c000000000, - 0x8eba4be900000000, 0x1f2b234700000000, 0x254cc9c900000000, - 0xb4dda16700000000, 0x4669694e00000000, 0xd7f801e000000000, - 0xa200f81d00000000, 0x339190b300000000, 0xc125589a00000000, - 0x50b4303400000000, 0x8996c24b00000000, 0x1807aae500000000, - 0xeab362cc00000000, 0x7b220a6200000000, 0x0edaf39f00000000, - 0x9f4b9b3100000000, 0x6dff531800000000, 0xfc6e3bb600000000, - 0xc609d13800000000, 0x5798b99600000000, 0xa52c71bf00000000, - 0x34bd191100000000, 0x4145e0ec00000000, 0xd0d4884200000000, - 0x2260406b00000000, 0xb3f128c500000000, 0x17a8e5ad00000000, - 0x86398d0300000000, 0x748d452a00000000, 0xe51c2d8400000000, - 0x90e4d47900000000, 0x0175bcd700000000, 0xf3c174fe00000000, - 0x62501c5000000000, 0x5837f6de00000000, 0xc9a69e7000000000, - 0x3b12565900000000, 0xaa833ef700000000, 0xdf7bc70a00000000, - 0x4eeaafa400000000, 0xbc5e678d00000000, 0x2dcf0f2300000000, - 0x0e1b837200000000, 0x9f8aebdc00000000, 0x6d3e23f500000000, - 0xfcaf4b5b00000000, 0x8957b2a600000000, 0x18c6da0800000000, - 0xea72122100000000, 0x7be37a8f00000000, 0x4184900100000000, - 0xd015f8af00000000, 0x22a1308600000000, 0xb330582800000000, - 0xc6c8a1d500000000, 0x5759c97b00000000, 0xa5ed015200000000, - 0x347c69fc00000000, 0x9025a49400000000, 0x01b4cc3a00000000, - 0xf300041300000000, 0x62916cbd00000000, 0x1769954000000000, - 0x86f8fdee00000000, 0x744c35c700000000, 0xe5dd5d6900000000, - 0xdfbab7e700000000, 0x4e2bdf4900000000, 0xbc9f176000000000, - 0x2d0e7fce00000000, 0x58f6863300000000, 0xc967ee9d00000000, - 0x3bd326b400000000, 0xaa424e1a00000000, 0x7360bc6500000000, - 0xe2f1d4cb00000000, 0x10451ce200000000, 0x81d4744c00000000, - 0xf42c8db100000000, 0x65bde51f00000000, 0x97092d3600000000, - 0x0698459800000000, 0x3cffaf1600000000, 0xad6ec7b800000000, - 0x5fda0f9100000000, 0xce4b673f00000000, 0xbbb39ec200000000, - 0x2a22f66c00000000, 0xd8963e4500000000, 0x490756eb00000000, - 0xed5e9b8300000000, 0x7ccff32d00000000, 0x8e7b3b0400000000, - 0x1fea53aa00000000, 0x6a12aa5700000000, 0xfb83c2f900000000, - 0x09370ad000000000, 0x98a6627e00000000, 0xa2c188f000000000, - 0x3350e05e00000000, 0xc1e4287700000000, 0x507540d900000000, - 0x258db92400000000, 0xb41cd18a00000000, 0x46a819a300000000, - 0xd739710d00000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xccaa009e, 0x4225077d, 0x8e8f07e3, 0x844a0efa, - 0x48e00e64, 0xc66f0987, 0x0ac50919, 0xd3e51bb5, 0x1f4f1b2b, - 0x91c01cc8, 0x5d6a1c56, 0x57af154f, 0x9b0515d1, 0x158a1232, - 0xd92012ac, 0x7cbb312b, 0xb01131b5, 0x3e9e3656, 0xf23436c8, - 0xf8f13fd1, 0x345b3f4f, 0xbad438ac, 0x767e3832, 0xaf5e2a9e, - 0x63f42a00, 0xed7b2de3, 0x21d12d7d, 0x2b142464, 0xe7be24fa, - 0x69312319, 0xa59b2387, 0xf9766256, 0x35dc62c8, 0xbb53652b, - 0x77f965b5, 0x7d3c6cac, 0xb1966c32, 0x3f196bd1, 0xf3b36b4f, - 0x2a9379e3, 0xe639797d, 0x68b67e9e, 0xa41c7e00, 0xaed97719, - 0x62737787, 0xecfc7064, 0x205670fa, 0x85cd537d, 0x496753e3, - 0xc7e85400, 0x0b42549e, 0x01875d87, 0xcd2d5d19, 0x43a25afa, - 0x8f085a64, 0x562848c8, 0x9a824856, 0x140d4fb5, 0xd8a74f2b, - 0xd2624632, 0x1ec846ac, 0x9047414f, 0x5ced41d1, 0x299dc2ed, - 0xe537c273, 0x6bb8c590, 0xa712c50e, 0xadd7cc17, 0x617dcc89, - 0xeff2cb6a, 0x2358cbf4, 0xfa78d958, 0x36d2d9c6, 0xb85dde25, - 0x74f7debb, 0x7e32d7a2, 0xb298d73c, 0x3c17d0df, 0xf0bdd041, - 0x5526f3c6, 0x998cf358, 0x1703f4bb, 0xdba9f425, 0xd16cfd3c, - 0x1dc6fda2, 0x9349fa41, 0x5fe3fadf, 0x86c3e873, 0x4a69e8ed, - 0xc4e6ef0e, 0x084cef90, 0x0289e689, 0xce23e617, 0x40ace1f4, - 0x8c06e16a, 0xd0eba0bb, 0x1c41a025, 0x92cea7c6, 0x5e64a758, - 0x54a1ae41, 0x980baedf, 0x1684a93c, 0xda2ea9a2, 0x030ebb0e, - 0xcfa4bb90, 0x412bbc73, 0x8d81bced, 0x8744b5f4, 0x4beeb56a, - 0xc561b289, 0x09cbb217, 0xac509190, 0x60fa910e, 0xee7596ed, - 0x22df9673, 0x281a9f6a, 0xe4b09ff4, 0x6a3f9817, 0xa6959889, - 0x7fb58a25, 0xb31f8abb, 0x3d908d58, 0xf13a8dc6, 0xfbff84df, - 0x37558441, 0xb9da83a2, 0x7570833c, 0x533b85da, 0x9f918544, - 0x111e82a7, 0xddb48239, 0xd7718b20, 0x1bdb8bbe, 0x95548c5d, - 0x59fe8cc3, 0x80de9e6f, 0x4c749ef1, 0xc2fb9912, 0x0e51998c, - 0x04949095, 0xc83e900b, 0x46b197e8, 0x8a1b9776, 0x2f80b4f1, - 0xe32ab46f, 0x6da5b38c, 0xa10fb312, 0xabcaba0b, 0x6760ba95, - 0xe9efbd76, 0x2545bde8, 0xfc65af44, 0x30cfafda, 0xbe40a839, - 0x72eaa8a7, 0x782fa1be, 0xb485a120, 0x3a0aa6c3, 0xf6a0a65d, - 0xaa4de78c, 0x66e7e712, 0xe868e0f1, 0x24c2e06f, 0x2e07e976, - 0xe2ade9e8, 0x6c22ee0b, 0xa088ee95, 0x79a8fc39, 0xb502fca7, - 0x3b8dfb44, 0xf727fbda, 0xfde2f2c3, 0x3148f25d, 0xbfc7f5be, - 0x736df520, 0xd6f6d6a7, 0x1a5cd639, 0x94d3d1da, 0x5879d144, - 0x52bcd85d, 0x9e16d8c3, 0x1099df20, 0xdc33dfbe, 0x0513cd12, - 0xc9b9cd8c, 0x4736ca6f, 0x8b9ccaf1, 0x8159c3e8, 0x4df3c376, - 0xc37cc495, 0x0fd6c40b, 0x7aa64737, 0xb60c47a9, 0x3883404a, - 0xf42940d4, 0xfeec49cd, 0x32464953, 0xbcc94eb0, 0x70634e2e, - 0xa9435c82, 0x65e95c1c, 0xeb665bff, 0x27cc5b61, 0x2d095278, - 0xe1a352e6, 0x6f2c5505, 0xa386559b, 0x061d761c, 0xcab77682, - 0x44387161, 0x889271ff, 0x825778e6, 0x4efd7878, 0xc0727f9b, - 0x0cd87f05, 0xd5f86da9, 0x19526d37, 0x97dd6ad4, 0x5b776a4a, - 0x51b26353, 0x9d1863cd, 0x1397642e, 0xdf3d64b0, 0x83d02561, - 0x4f7a25ff, 0xc1f5221c, 0x0d5f2282, 0x079a2b9b, 0xcb302b05, - 0x45bf2ce6, 0x89152c78, 0x50353ed4, 0x9c9f3e4a, 0x121039a9, - 0xdeba3937, 0xd47f302e, 0x18d530b0, 0x965a3753, 0x5af037cd, - 0xff6b144a, 0x33c114d4, 0xbd4e1337, 0x71e413a9, 0x7b211ab0, - 0xb78b1a2e, 0x39041dcd, 0xf5ae1d53, 0x2c8e0fff, 0xe0240f61, - 0x6eab0882, 0xa201081c, 0xa8c40105, 0x646e019b, 0xeae10678, - 0x264b06e6}, - {0x00000000, 0xa6770bb4, 0x979f1129, 0x31e81a9d, 0xf44f2413, - 0x52382fa7, 0x63d0353a, 0xc5a73e8e, 0x33ef4e67, 0x959845d3, - 0xa4705f4e, 0x020754fa, 0xc7a06a74, 0x61d761c0, 0x503f7b5d, - 0xf64870e9, 0x67de9cce, 0xc1a9977a, 0xf0418de7, 0x56368653, - 0x9391b8dd, 0x35e6b369, 0x040ea9f4, 0xa279a240, 0x5431d2a9, - 0xf246d91d, 0xc3aec380, 0x65d9c834, 0xa07ef6ba, 0x0609fd0e, - 0x37e1e793, 0x9196ec27, 0xcfbd399c, 0x69ca3228, 0x582228b5, - 0xfe552301, 0x3bf21d8f, 0x9d85163b, 0xac6d0ca6, 0x0a1a0712, - 0xfc5277fb, 0x5a257c4f, 0x6bcd66d2, 0xcdba6d66, 0x081d53e8, - 0xae6a585c, 0x9f8242c1, 0x39f54975, 0xa863a552, 0x0e14aee6, - 0x3ffcb47b, 0x998bbfcf, 0x5c2c8141, 0xfa5b8af5, 0xcbb39068, - 0x6dc49bdc, 0x9b8ceb35, 0x3dfbe081, 0x0c13fa1c, 0xaa64f1a8, - 0x6fc3cf26, 0xc9b4c492, 0xf85cde0f, 0x5e2bd5bb, 0x440b7579, - 0xe27c7ecd, 0xd3946450, 0x75e36fe4, 0xb044516a, 0x16335ade, - 0x27db4043, 0x81ac4bf7, 0x77e43b1e, 0xd19330aa, 0xe07b2a37, - 0x460c2183, 0x83ab1f0d, 0x25dc14b9, 0x14340e24, 0xb2430590, - 0x23d5e9b7, 0x85a2e203, 0xb44af89e, 0x123df32a, 0xd79acda4, - 0x71edc610, 0x4005dc8d, 0xe672d739, 0x103aa7d0, 0xb64dac64, - 0x87a5b6f9, 0x21d2bd4d, 0xe47583c3, 0x42028877, 0x73ea92ea, - 0xd59d995e, 0x8bb64ce5, 0x2dc14751, 0x1c295dcc, 0xba5e5678, - 0x7ff968f6, 0xd98e6342, 0xe86679df, 0x4e11726b, 0xb8590282, - 0x1e2e0936, 0x2fc613ab, 0x89b1181f, 0x4c162691, 0xea612d25, - 0xdb8937b8, 0x7dfe3c0c, 0xec68d02b, 0x4a1fdb9f, 0x7bf7c102, - 0xdd80cab6, 0x1827f438, 0xbe50ff8c, 0x8fb8e511, 0x29cfeea5, - 0xdf879e4c, 0x79f095f8, 0x48188f65, 0xee6f84d1, 0x2bc8ba5f, - 0x8dbfb1eb, 0xbc57ab76, 0x1a20a0c2, 0x8816eaf2, 0x2e61e146, - 0x1f89fbdb, 0xb9fef06f, 0x7c59cee1, 0xda2ec555, 0xebc6dfc8, - 0x4db1d47c, 0xbbf9a495, 0x1d8eaf21, 0x2c66b5bc, 0x8a11be08, - 0x4fb68086, 0xe9c18b32, 0xd82991af, 0x7e5e9a1b, 0xefc8763c, - 0x49bf7d88, 0x78576715, 0xde206ca1, 0x1b87522f, 0xbdf0599b, - 0x8c184306, 0x2a6f48b2, 0xdc27385b, 0x7a5033ef, 0x4bb82972, - 0xedcf22c6, 0x28681c48, 0x8e1f17fc, 0xbff70d61, 0x198006d5, - 0x47abd36e, 0xe1dcd8da, 0xd034c247, 0x7643c9f3, 0xb3e4f77d, - 0x1593fcc9, 0x247be654, 0x820cede0, 0x74449d09, 0xd23396bd, - 0xe3db8c20, 0x45ac8794, 0x800bb91a, 0x267cb2ae, 0x1794a833, - 0xb1e3a387, 0x20754fa0, 0x86024414, 0xb7ea5e89, 0x119d553d, - 0xd43a6bb3, 0x724d6007, 0x43a57a9a, 0xe5d2712e, 0x139a01c7, - 0xb5ed0a73, 0x840510ee, 0x22721b5a, 0xe7d525d4, 0x41a22e60, - 0x704a34fd, 0xd63d3f49, 0xcc1d9f8b, 0x6a6a943f, 0x5b828ea2, - 0xfdf58516, 0x3852bb98, 0x9e25b02c, 0xafcdaab1, 0x09baa105, - 0xfff2d1ec, 0x5985da58, 0x686dc0c5, 0xce1acb71, 0x0bbdf5ff, - 0xadcafe4b, 0x9c22e4d6, 0x3a55ef62, 0xabc30345, 0x0db408f1, - 0x3c5c126c, 0x9a2b19d8, 0x5f8c2756, 0xf9fb2ce2, 0xc813367f, - 0x6e643dcb, 0x982c4d22, 0x3e5b4696, 0x0fb35c0b, 0xa9c457bf, - 0x6c636931, 0xca146285, 0xfbfc7818, 0x5d8b73ac, 0x03a0a617, - 0xa5d7ada3, 0x943fb73e, 0x3248bc8a, 0xf7ef8204, 0x519889b0, - 0x6070932d, 0xc6079899, 0x304fe870, 0x9638e3c4, 0xa7d0f959, - 0x01a7f2ed, 0xc400cc63, 0x6277c7d7, 0x539fdd4a, 0xf5e8d6fe, - 0x647e3ad9, 0xc209316d, 0xf3e12bf0, 0x55962044, 0x90311eca, - 0x3646157e, 0x07ae0fe3, 0xa1d90457, 0x579174be, 0xf1e67f0a, - 0xc00e6597, 0x66796e23, 0xa3de50ad, 0x05a95b19, 0x34414184, - 0x92364a30}, - {0x00000000, 0xcb5cd3a5, 0x4dc8a10b, 0x869472ae, 0x9b914216, - 0x50cd91b3, 0xd659e31d, 0x1d0530b8, 0xec53826d, 0x270f51c8, - 0xa19b2366, 0x6ac7f0c3, 0x77c2c07b, 0xbc9e13de, 0x3a0a6170, - 0xf156b2d5, 0x03d6029b, 0xc88ad13e, 0x4e1ea390, 0x85427035, - 0x9847408d, 0x531b9328, 0xd58fe186, 0x1ed33223, 0xef8580f6, - 0x24d95353, 0xa24d21fd, 0x6911f258, 0x7414c2e0, 0xbf481145, - 0x39dc63eb, 0xf280b04e, 0x07ac0536, 0xccf0d693, 0x4a64a43d, - 0x81387798, 0x9c3d4720, 0x57619485, 0xd1f5e62b, 0x1aa9358e, - 0xebff875b, 0x20a354fe, 0xa6372650, 0x6d6bf5f5, 0x706ec54d, - 0xbb3216e8, 0x3da66446, 0xf6fab7e3, 0x047a07ad, 0xcf26d408, - 0x49b2a6a6, 0x82ee7503, 0x9feb45bb, 0x54b7961e, 0xd223e4b0, - 0x197f3715, 0xe82985c0, 0x23755665, 0xa5e124cb, 0x6ebdf76e, - 0x73b8c7d6, 0xb8e41473, 0x3e7066dd, 0xf52cb578, 0x0f580a6c, - 0xc404d9c9, 0x4290ab67, 0x89cc78c2, 0x94c9487a, 0x5f959bdf, - 0xd901e971, 0x125d3ad4, 0xe30b8801, 0x28575ba4, 0xaec3290a, - 0x659ffaaf, 0x789aca17, 0xb3c619b2, 0x35526b1c, 0xfe0eb8b9, - 0x0c8e08f7, 0xc7d2db52, 0x4146a9fc, 0x8a1a7a59, 0x971f4ae1, - 0x5c439944, 0xdad7ebea, 0x118b384f, 0xe0dd8a9a, 0x2b81593f, - 0xad152b91, 0x6649f834, 0x7b4cc88c, 0xb0101b29, 0x36846987, - 0xfdd8ba22, 0x08f40f5a, 0xc3a8dcff, 0x453cae51, 0x8e607df4, - 0x93654d4c, 0x58399ee9, 0xdeadec47, 0x15f13fe2, 0xe4a78d37, - 0x2ffb5e92, 0xa96f2c3c, 0x6233ff99, 0x7f36cf21, 0xb46a1c84, - 0x32fe6e2a, 0xf9a2bd8f, 0x0b220dc1, 0xc07ede64, 0x46eaacca, - 0x8db67f6f, 0x90b34fd7, 0x5bef9c72, 0xdd7beedc, 0x16273d79, - 0xe7718fac, 0x2c2d5c09, 0xaab92ea7, 0x61e5fd02, 0x7ce0cdba, - 0xb7bc1e1f, 0x31286cb1, 0xfa74bf14, 0x1eb014d8, 0xd5ecc77d, - 0x5378b5d3, 0x98246676, 0x852156ce, 0x4e7d856b, 0xc8e9f7c5, - 0x03b52460, 0xf2e396b5, 0x39bf4510, 0xbf2b37be, 0x7477e41b, - 0x6972d4a3, 0xa22e0706, 0x24ba75a8, 0xefe6a60d, 0x1d661643, - 0xd63ac5e6, 0x50aeb748, 0x9bf264ed, 0x86f75455, 0x4dab87f0, - 0xcb3ff55e, 0x006326fb, 0xf135942e, 0x3a69478b, 0xbcfd3525, - 0x77a1e680, 0x6aa4d638, 0xa1f8059d, 0x276c7733, 0xec30a496, - 0x191c11ee, 0xd240c24b, 0x54d4b0e5, 0x9f886340, 0x828d53f8, - 0x49d1805d, 0xcf45f2f3, 0x04192156, 0xf54f9383, 0x3e134026, - 0xb8873288, 0x73dbe12d, 0x6eded195, 0xa5820230, 0x2316709e, - 0xe84aa33b, 0x1aca1375, 0xd196c0d0, 0x5702b27e, 0x9c5e61db, - 0x815b5163, 0x4a0782c6, 0xcc93f068, 0x07cf23cd, 0xf6999118, - 0x3dc542bd, 0xbb513013, 0x700de3b6, 0x6d08d30e, 0xa65400ab, - 0x20c07205, 0xeb9ca1a0, 0x11e81eb4, 0xdab4cd11, 0x5c20bfbf, - 0x977c6c1a, 0x8a795ca2, 0x41258f07, 0xc7b1fda9, 0x0ced2e0c, - 0xfdbb9cd9, 0x36e74f7c, 0xb0733dd2, 0x7b2fee77, 0x662adecf, - 0xad760d6a, 0x2be27fc4, 0xe0beac61, 0x123e1c2f, 0xd962cf8a, - 0x5ff6bd24, 0x94aa6e81, 0x89af5e39, 0x42f38d9c, 0xc467ff32, - 0x0f3b2c97, 0xfe6d9e42, 0x35314de7, 0xb3a53f49, 0x78f9ecec, - 0x65fcdc54, 0xaea00ff1, 0x28347d5f, 0xe368aefa, 0x16441b82, - 0xdd18c827, 0x5b8cba89, 0x90d0692c, 0x8dd55994, 0x46898a31, - 0xc01df89f, 0x0b412b3a, 0xfa1799ef, 0x314b4a4a, 0xb7df38e4, - 0x7c83eb41, 0x6186dbf9, 0xaada085c, 0x2c4e7af2, 0xe712a957, - 0x15921919, 0xdececabc, 0x585ab812, 0x93066bb7, 0x8e035b0f, - 0x455f88aa, 0xc3cbfa04, 0x089729a1, 0xf9c19b74, 0x329d48d1, - 0xb4093a7f, 0x7f55e9da, 0x6250d962, 0xa90c0ac7, 0x2f987869, - 0xe4c4abcc}, - {0x00000000, 0x3d6029b0, 0x7ac05360, 0x47a07ad0, 0xf580a6c0, - 0xc8e08f70, 0x8f40f5a0, 0xb220dc10, 0x30704bc1, 0x0d106271, - 0x4ab018a1, 0x77d03111, 0xc5f0ed01, 0xf890c4b1, 0xbf30be61, - 0x825097d1, 0x60e09782, 0x5d80be32, 0x1a20c4e2, 0x2740ed52, - 0x95603142, 0xa80018f2, 0xefa06222, 0xd2c04b92, 0x5090dc43, - 0x6df0f5f3, 0x2a508f23, 0x1730a693, 0xa5107a83, 0x98705333, - 0xdfd029e3, 0xe2b00053, 0xc1c12f04, 0xfca106b4, 0xbb017c64, - 0x866155d4, 0x344189c4, 0x0921a074, 0x4e81daa4, 0x73e1f314, - 0xf1b164c5, 0xccd14d75, 0x8b7137a5, 0xb6111e15, 0x0431c205, - 0x3951ebb5, 0x7ef19165, 0x4391b8d5, 0xa121b886, 0x9c419136, - 0xdbe1ebe6, 0xe681c256, 0x54a11e46, 0x69c137f6, 0x2e614d26, - 0x13016496, 0x9151f347, 0xac31daf7, 0xeb91a027, 0xd6f18997, - 0x64d15587, 0x59b17c37, 0x1e1106e7, 0x23712f57, 0x58f35849, - 0x659371f9, 0x22330b29, 0x1f532299, 0xad73fe89, 0x9013d739, - 0xd7b3ade9, 0xead38459, 0x68831388, 0x55e33a38, 0x124340e8, - 0x2f236958, 0x9d03b548, 0xa0639cf8, 0xe7c3e628, 0xdaa3cf98, - 0x3813cfcb, 0x0573e67b, 0x42d39cab, 0x7fb3b51b, 0xcd93690b, - 0xf0f340bb, 0xb7533a6b, 0x8a3313db, 0x0863840a, 0x3503adba, - 0x72a3d76a, 0x4fc3feda, 0xfde322ca, 0xc0830b7a, 0x872371aa, - 0xba43581a, 0x9932774d, 0xa4525efd, 0xe3f2242d, 0xde920d9d, - 0x6cb2d18d, 0x51d2f83d, 0x167282ed, 0x2b12ab5d, 0xa9423c8c, - 0x9422153c, 0xd3826fec, 0xeee2465c, 0x5cc29a4c, 0x61a2b3fc, - 0x2602c92c, 0x1b62e09c, 0xf9d2e0cf, 0xc4b2c97f, 0x8312b3af, - 0xbe729a1f, 0x0c52460f, 0x31326fbf, 0x7692156f, 0x4bf23cdf, - 0xc9a2ab0e, 0xf4c282be, 0xb362f86e, 0x8e02d1de, 0x3c220dce, - 0x0142247e, 0x46e25eae, 0x7b82771e, 0xb1e6b092, 0x8c869922, - 0xcb26e3f2, 0xf646ca42, 0x44661652, 0x79063fe2, 0x3ea64532, - 0x03c66c82, 0x8196fb53, 0xbcf6d2e3, 0xfb56a833, 0xc6368183, - 0x74165d93, 0x49767423, 0x0ed60ef3, 0x33b62743, 0xd1062710, - 0xec660ea0, 0xabc67470, 0x96a65dc0, 0x248681d0, 0x19e6a860, - 0x5e46d2b0, 0x6326fb00, 0xe1766cd1, 0xdc164561, 0x9bb63fb1, - 0xa6d61601, 0x14f6ca11, 0x2996e3a1, 0x6e369971, 0x5356b0c1, - 0x70279f96, 0x4d47b626, 0x0ae7ccf6, 0x3787e546, 0x85a73956, - 0xb8c710e6, 0xff676a36, 0xc2074386, 0x4057d457, 0x7d37fde7, - 0x3a978737, 0x07f7ae87, 0xb5d77297, 0x88b75b27, 0xcf1721f7, - 0xf2770847, 0x10c70814, 0x2da721a4, 0x6a075b74, 0x576772c4, - 0xe547aed4, 0xd8278764, 0x9f87fdb4, 0xa2e7d404, 0x20b743d5, - 0x1dd76a65, 0x5a7710b5, 0x67173905, 0xd537e515, 0xe857cca5, - 0xaff7b675, 0x92979fc5, 0xe915e8db, 0xd475c16b, 0x93d5bbbb, - 0xaeb5920b, 0x1c954e1b, 0x21f567ab, 0x66551d7b, 0x5b3534cb, - 0xd965a31a, 0xe4058aaa, 0xa3a5f07a, 0x9ec5d9ca, 0x2ce505da, - 0x11852c6a, 0x562556ba, 0x6b457f0a, 0x89f57f59, 0xb49556e9, - 0xf3352c39, 0xce550589, 0x7c75d999, 0x4115f029, 0x06b58af9, - 0x3bd5a349, 0xb9853498, 0x84e51d28, 0xc34567f8, 0xfe254e48, - 0x4c059258, 0x7165bbe8, 0x36c5c138, 0x0ba5e888, 0x28d4c7df, - 0x15b4ee6f, 0x521494bf, 0x6f74bd0f, 0xdd54611f, 0xe03448af, - 0xa794327f, 0x9af41bcf, 0x18a48c1e, 0x25c4a5ae, 0x6264df7e, - 0x5f04f6ce, 0xed242ade, 0xd044036e, 0x97e479be, 0xaa84500e, - 0x4834505d, 0x755479ed, 0x32f4033d, 0x0f942a8d, 0xbdb4f69d, - 0x80d4df2d, 0xc774a5fd, 0xfa148c4d, 0x78441b9c, 0x4524322c, - 0x028448fc, 0x3fe4614c, 0x8dc4bd5c, 0xb0a494ec, 0xf704ee3c, - 0xca64c78c}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0xb029603d, 0x6053c07a, 0xd07aa047, 0xc0a680f5, - 0x708fe0c8, 0xa0f5408f, 0x10dc20b2, 0xc14b7030, 0x7162100d, - 0xa118b04a, 0x1131d077, 0x01edf0c5, 0xb1c490f8, 0x61be30bf, - 0xd1975082, 0x8297e060, 0x32be805d, 0xe2c4201a, 0x52ed4027, - 0x42316095, 0xf21800a8, 0x2262a0ef, 0x924bc0d2, 0x43dc9050, - 0xf3f5f06d, 0x238f502a, 0x93a63017, 0x837a10a5, 0x33537098, - 0xe329d0df, 0x5300b0e2, 0x042fc1c1, 0xb406a1fc, 0x647c01bb, - 0xd4556186, 0xc4894134, 0x74a02109, 0xa4da814e, 0x14f3e173, - 0xc564b1f1, 0x754dd1cc, 0xa537718b, 0x151e11b6, 0x05c23104, - 0xb5eb5139, 0x6591f17e, 0xd5b89143, 0x86b821a1, 0x3691419c, - 0xe6ebe1db, 0x56c281e6, 0x461ea154, 0xf637c169, 0x264d612e, - 0x96640113, 0x47f35191, 0xf7da31ac, 0x27a091eb, 0x9789f1d6, - 0x8755d164, 0x377cb159, 0xe706111e, 0x572f7123, 0x4958f358, - 0xf9719365, 0x290b3322, 0x9922531f, 0x89fe73ad, 0x39d71390, - 0xe9adb3d7, 0x5984d3ea, 0x88138368, 0x383ae355, 0xe8404312, - 0x5869232f, 0x48b5039d, 0xf89c63a0, 0x28e6c3e7, 0x98cfa3da, - 0xcbcf1338, 0x7be67305, 0xab9cd342, 0x1bb5b37f, 0x0b6993cd, - 0xbb40f3f0, 0x6b3a53b7, 0xdb13338a, 0x0a846308, 0xbaad0335, - 0x6ad7a372, 0xdafec34f, 0xca22e3fd, 0x7a0b83c0, 0xaa712387, - 0x1a5843ba, 0x4d773299, 0xfd5e52a4, 0x2d24f2e3, 0x9d0d92de, - 0x8dd1b26c, 0x3df8d251, 0xed827216, 0x5dab122b, 0x8c3c42a9, - 0x3c152294, 0xec6f82d3, 0x5c46e2ee, 0x4c9ac25c, 0xfcb3a261, - 0x2cc90226, 0x9ce0621b, 0xcfe0d2f9, 0x7fc9b2c4, 0xafb31283, - 0x1f9a72be, 0x0f46520c, 0xbf6f3231, 0x6f159276, 0xdf3cf24b, - 0x0eaba2c9, 0xbe82c2f4, 0x6ef862b3, 0xded1028e, 0xce0d223c, - 0x7e244201, 0xae5ee246, 0x1e77827b, 0x92b0e6b1, 0x2299868c, - 0xf2e326cb, 0x42ca46f6, 0x52166644, 0xe23f0679, 0x3245a63e, - 0x826cc603, 0x53fb9681, 0xe3d2f6bc, 0x33a856fb, 0x838136c6, - 0x935d1674, 0x23747649, 0xf30ed60e, 0x4327b633, 0x102706d1, - 0xa00e66ec, 0x7074c6ab, 0xc05da696, 0xd0818624, 0x60a8e619, - 0xb0d2465e, 0x00fb2663, 0xd16c76e1, 0x614516dc, 0xb13fb69b, - 0x0116d6a6, 0x11caf614, 0xa1e39629, 0x7199366e, 0xc1b05653, - 0x969f2770, 0x26b6474d, 0xf6cce70a, 0x46e58737, 0x5639a785, - 0xe610c7b8, 0x366a67ff, 0x864307c2, 0x57d45740, 0xe7fd377d, - 0x3787973a, 0x87aef707, 0x9772d7b5, 0x275bb788, 0xf72117cf, - 0x470877f2, 0x1408c710, 0xa421a72d, 0x745b076a, 0xc4726757, - 0xd4ae47e5, 0x648727d8, 0xb4fd879f, 0x04d4e7a2, 0xd543b720, - 0x656ad71d, 0xb510775a, 0x05391767, 0x15e537d5, 0xa5cc57e8, - 0x75b6f7af, 0xc59f9792, 0xdbe815e9, 0x6bc175d4, 0xbbbbd593, - 0x0b92b5ae, 0x1b4e951c, 0xab67f521, 0x7b1d5566, 0xcb34355b, - 0x1aa365d9, 0xaa8a05e4, 0x7af0a5a3, 0xcad9c59e, 0xda05e52c, - 0x6a2c8511, 0xba562556, 0x0a7f456b, 0x597ff589, 0xe95695b4, - 0x392c35f3, 0x890555ce, 0x99d9757c, 0x29f01541, 0xf98ab506, - 0x49a3d53b, 0x983485b9, 0x281de584, 0xf86745c3, 0x484e25fe, - 0x5892054c, 0xe8bb6571, 0x38c1c536, 0x88e8a50b, 0xdfc7d428, - 0x6feeb415, 0xbf941452, 0x0fbd746f, 0x1f6154dd, 0xaf4834e0, - 0x7f3294a7, 0xcf1bf49a, 0x1e8ca418, 0xaea5c425, 0x7edf6462, - 0xcef6045f, 0xde2a24ed, 0x6e0344d0, 0xbe79e497, 0x0e5084aa, - 0x5d503448, 0xed795475, 0x3d03f432, 0x8d2a940f, 0x9df6b4bd, - 0x2ddfd480, 0xfda574c7, 0x4d8c14fa, 0x9c1b4478, 0x2c322445, - 0xfc488402, 0x4c61e43f, 0x5cbdc48d, 0xec94a4b0, 0x3cee04f7, - 0x8cc764ca}, - {0x00000000, 0xa5d35ccb, 0x0ba1c84d, 0xae729486, 0x1642919b, - 0xb391cd50, 0x1de359d6, 0xb830051d, 0x6d8253ec, 0xc8510f27, - 0x66239ba1, 0xc3f0c76a, 0x7bc0c277, 0xde139ebc, 0x70610a3a, - 0xd5b256f1, 0x9b02d603, 0x3ed18ac8, 0x90a31e4e, 0x35704285, - 0x8d404798, 0x28931b53, 0x86e18fd5, 0x2332d31e, 0xf68085ef, - 0x5353d924, 0xfd214da2, 0x58f21169, 0xe0c21474, 0x451148bf, - 0xeb63dc39, 0x4eb080f2, 0x3605ac07, 0x93d6f0cc, 0x3da4644a, - 0x98773881, 0x20473d9c, 0x85946157, 0x2be6f5d1, 0x8e35a91a, - 0x5b87ffeb, 0xfe54a320, 0x502637a6, 0xf5f56b6d, 0x4dc56e70, - 0xe81632bb, 0x4664a63d, 0xe3b7faf6, 0xad077a04, 0x08d426cf, - 0xa6a6b249, 0x0375ee82, 0xbb45eb9f, 0x1e96b754, 0xb0e423d2, - 0x15377f19, 0xc08529e8, 0x65567523, 0xcb24e1a5, 0x6ef7bd6e, - 0xd6c7b873, 0x7314e4b8, 0xdd66703e, 0x78b52cf5, 0x6c0a580f, - 0xc9d904c4, 0x67ab9042, 0xc278cc89, 0x7a48c994, 0xdf9b955f, - 0x71e901d9, 0xd43a5d12, 0x01880be3, 0xa45b5728, 0x0a29c3ae, - 0xaffa9f65, 0x17ca9a78, 0xb219c6b3, 0x1c6b5235, 0xb9b80efe, - 0xf7088e0c, 0x52dbd2c7, 0xfca94641, 0x597a1a8a, 0xe14a1f97, - 0x4499435c, 0xeaebd7da, 0x4f388b11, 0x9a8adde0, 0x3f59812b, - 0x912b15ad, 0x34f84966, 0x8cc84c7b, 0x291b10b0, 0x87698436, - 0x22bad8fd, 0x5a0ff408, 0xffdca8c3, 0x51ae3c45, 0xf47d608e, - 0x4c4d6593, 0xe99e3958, 0x47ecadde, 0xe23ff115, 0x378da7e4, - 0x925efb2f, 0x3c2c6fa9, 0x99ff3362, 0x21cf367f, 0x841c6ab4, - 0x2a6efe32, 0x8fbda2f9, 0xc10d220b, 0x64de7ec0, 0xcaacea46, - 0x6f7fb68d, 0xd74fb390, 0x729cef5b, 0xdcee7bdd, 0x793d2716, - 0xac8f71e7, 0x095c2d2c, 0xa72eb9aa, 0x02fde561, 0xbacde07c, - 0x1f1ebcb7, 0xb16c2831, 0x14bf74fa, 0xd814b01e, 0x7dc7ecd5, - 0xd3b57853, 0x76662498, 0xce562185, 0x6b857d4e, 0xc5f7e9c8, - 0x6024b503, 0xb596e3f2, 0x1045bf39, 0xbe372bbf, 0x1be47774, - 0xa3d47269, 0x06072ea2, 0xa875ba24, 0x0da6e6ef, 0x4316661d, - 0xe6c53ad6, 0x48b7ae50, 0xed64f29b, 0x5554f786, 0xf087ab4d, - 0x5ef53fcb, 0xfb266300, 0x2e9435f1, 0x8b47693a, 0x2535fdbc, - 0x80e6a177, 0x38d6a46a, 0x9d05f8a1, 0x33776c27, 0x96a430ec, - 0xee111c19, 0x4bc240d2, 0xe5b0d454, 0x4063889f, 0xf8538d82, - 0x5d80d149, 0xf3f245cf, 0x56211904, 0x83934ff5, 0x2640133e, - 0x883287b8, 0x2de1db73, 0x95d1de6e, 0x300282a5, 0x9e701623, - 0x3ba34ae8, 0x7513ca1a, 0xd0c096d1, 0x7eb20257, 0xdb615e9c, - 0x63515b81, 0xc682074a, 0x68f093cc, 0xcd23cf07, 0x189199f6, - 0xbd42c53d, 0x133051bb, 0xb6e30d70, 0x0ed3086d, 0xab0054a6, - 0x0572c020, 0xa0a19ceb, 0xb41ee811, 0x11cdb4da, 0xbfbf205c, - 0x1a6c7c97, 0xa25c798a, 0x078f2541, 0xa9fdb1c7, 0x0c2eed0c, - 0xd99cbbfd, 0x7c4fe736, 0xd23d73b0, 0x77ee2f7b, 0xcfde2a66, - 0x6a0d76ad, 0xc47fe22b, 0x61acbee0, 0x2f1c3e12, 0x8acf62d9, - 0x24bdf65f, 0x816eaa94, 0x395eaf89, 0x9c8df342, 0x32ff67c4, - 0x972c3b0f, 0x429e6dfe, 0xe74d3135, 0x493fa5b3, 0xececf978, - 0x54dcfc65, 0xf10fa0ae, 0x5f7d3428, 0xfaae68e3, 0x821b4416, - 0x27c818dd, 0x89ba8c5b, 0x2c69d090, 0x9459d58d, 0x318a8946, - 0x9ff81dc0, 0x3a2b410b, 0xef9917fa, 0x4a4a4b31, 0xe438dfb7, - 0x41eb837c, 0xf9db8661, 0x5c08daaa, 0xf27a4e2c, 0x57a912e7, - 0x19199215, 0xbccacede, 0x12b85a58, 0xb76b0693, 0x0f5b038e, - 0xaa885f45, 0x04facbc3, 0xa1299708, 0x749bc1f9, 0xd1489d32, - 0x7f3a09b4, 0xdae9557f, 0x62d95062, 0xc70a0ca9, 0x6978982f, - 0xccabc4e4}, - {0x00000000, 0xb40b77a6, 0x29119f97, 0x9d1ae831, 0x13244ff4, - 0xa72f3852, 0x3a35d063, 0x8e3ea7c5, 0x674eef33, 0xd3459895, - 0x4e5f70a4, 0xfa540702, 0x746aa0c7, 0xc061d761, 0x5d7b3f50, - 0xe97048f6, 0xce9cde67, 0x7a97a9c1, 0xe78d41f0, 0x53863656, - 0xddb89193, 0x69b3e635, 0xf4a90e04, 0x40a279a2, 0xa9d23154, - 0x1dd946f2, 0x80c3aec3, 0x34c8d965, 0xbaf67ea0, 0x0efd0906, - 0x93e7e137, 0x27ec9691, 0x9c39bdcf, 0x2832ca69, 0xb5282258, - 0x012355fe, 0x8f1df23b, 0x3b16859d, 0xa60c6dac, 0x12071a0a, - 0xfb7752fc, 0x4f7c255a, 0xd266cd6b, 0x666dbacd, 0xe8531d08, - 0x5c586aae, 0xc142829f, 0x7549f539, 0x52a563a8, 0xe6ae140e, - 0x7bb4fc3f, 0xcfbf8b99, 0x41812c5c, 0xf58a5bfa, 0x6890b3cb, - 0xdc9bc46d, 0x35eb8c9b, 0x81e0fb3d, 0x1cfa130c, 0xa8f164aa, - 0x26cfc36f, 0x92c4b4c9, 0x0fde5cf8, 0xbbd52b5e, 0x79750b44, - 0xcd7e7ce2, 0x506494d3, 0xe46fe375, 0x6a5144b0, 0xde5a3316, - 0x4340db27, 0xf74bac81, 0x1e3be477, 0xaa3093d1, 0x372a7be0, - 0x83210c46, 0x0d1fab83, 0xb914dc25, 0x240e3414, 0x900543b2, - 0xb7e9d523, 0x03e2a285, 0x9ef84ab4, 0x2af33d12, 0xa4cd9ad7, - 0x10c6ed71, 0x8ddc0540, 0x39d772e6, 0xd0a73a10, 0x64ac4db6, - 0xf9b6a587, 0x4dbdd221, 0xc38375e4, 0x77880242, 0xea92ea73, - 0x5e999dd5, 0xe54cb68b, 0x5147c12d, 0xcc5d291c, 0x78565eba, - 0xf668f97f, 0x42638ed9, 0xdf7966e8, 0x6b72114e, 0x820259b8, - 0x36092e1e, 0xab13c62f, 0x1f18b189, 0x9126164c, 0x252d61ea, - 0xb83789db, 0x0c3cfe7d, 0x2bd068ec, 0x9fdb1f4a, 0x02c1f77b, - 0xb6ca80dd, 0x38f42718, 0x8cff50be, 0x11e5b88f, 0xa5eecf29, - 0x4c9e87df, 0xf895f079, 0x658f1848, 0xd1846fee, 0x5fbac82b, - 0xebb1bf8d, 0x76ab57bc, 0xc2a0201a, 0xf2ea1688, 0x46e1612e, - 0xdbfb891f, 0x6ff0feb9, 0xe1ce597c, 0x55c52eda, 0xc8dfc6eb, - 0x7cd4b14d, 0x95a4f9bb, 0x21af8e1d, 0xbcb5662c, 0x08be118a, - 0x8680b64f, 0x328bc1e9, 0xaf9129d8, 0x1b9a5e7e, 0x3c76c8ef, - 0x887dbf49, 0x15675778, 0xa16c20de, 0x2f52871b, 0x9b59f0bd, - 0x0643188c, 0xb2486f2a, 0x5b3827dc, 0xef33507a, 0x7229b84b, - 0xc622cfed, 0x481c6828, 0xfc171f8e, 0x610df7bf, 0xd5068019, - 0x6ed3ab47, 0xdad8dce1, 0x47c234d0, 0xf3c94376, 0x7df7e4b3, - 0xc9fc9315, 0x54e67b24, 0xe0ed0c82, 0x099d4474, 0xbd9633d2, - 0x208cdbe3, 0x9487ac45, 0x1ab90b80, 0xaeb27c26, 0x33a89417, - 0x87a3e3b1, 0xa04f7520, 0x14440286, 0x895eeab7, 0x3d559d11, - 0xb36b3ad4, 0x07604d72, 0x9a7aa543, 0x2e71d2e5, 0xc7019a13, - 0x730aedb5, 0xee100584, 0x5a1b7222, 0xd425d5e7, 0x602ea241, - 0xfd344a70, 0x493f3dd6, 0x8b9f1dcc, 0x3f946a6a, 0xa28e825b, - 0x1685f5fd, 0x98bb5238, 0x2cb0259e, 0xb1aacdaf, 0x05a1ba09, - 0xecd1f2ff, 0x58da8559, 0xc5c06d68, 0x71cb1ace, 0xfff5bd0b, - 0x4bfecaad, 0xd6e4229c, 0x62ef553a, 0x4503c3ab, 0xf108b40d, - 0x6c125c3c, 0xd8192b9a, 0x56278c5f, 0xe22cfbf9, 0x7f3613c8, - 0xcb3d646e, 0x224d2c98, 0x96465b3e, 0x0b5cb30f, 0xbf57c4a9, - 0x3169636c, 0x856214ca, 0x1878fcfb, 0xac738b5d, 0x17a6a003, - 0xa3add7a5, 0x3eb73f94, 0x8abc4832, 0x0482eff7, 0xb0899851, - 0x2d937060, 0x999807c6, 0x70e84f30, 0xc4e33896, 0x59f9d0a7, - 0xedf2a701, 0x63cc00c4, 0xd7c77762, 0x4add9f53, 0xfed6e8f5, - 0xd93a7e64, 0x6d3109c2, 0xf02be1f3, 0x44209655, 0xca1e3190, - 0x7e154636, 0xe30fae07, 0x5704d9a1, 0xbe749157, 0x0a7fe6f1, - 0x97650ec0, 0x236e7966, 0xad50dea3, 0x195ba905, 0x84414134, - 0x304a3692}, - {0x00000000, 0x9e00aacc, 0x7d072542, 0xe3078f8e, 0xfa0e4a84, - 0x640ee048, 0x87096fc6, 0x1909c50a, 0xb51be5d3, 0x2b1b4f1f, - 0xc81cc091, 0x561c6a5d, 0x4f15af57, 0xd115059b, 0x32128a15, - 0xac1220d9, 0x2b31bb7c, 0xb53111b0, 0x56369e3e, 0xc83634f2, - 0xd13ff1f8, 0x4f3f5b34, 0xac38d4ba, 0x32387e76, 0x9e2a5eaf, - 0x002af463, 0xe32d7bed, 0x7d2dd121, 0x6424142b, 0xfa24bee7, - 0x19233169, 0x87239ba5, 0x566276f9, 0xc862dc35, 0x2b6553bb, - 0xb565f977, 0xac6c3c7d, 0x326c96b1, 0xd16b193f, 0x4f6bb3f3, - 0xe379932a, 0x7d7939e6, 0x9e7eb668, 0x007e1ca4, 0x1977d9ae, - 0x87777362, 0x6470fcec, 0xfa705620, 0x7d53cd85, 0xe3536749, - 0x0054e8c7, 0x9e54420b, 0x875d8701, 0x195d2dcd, 0xfa5aa243, - 0x645a088f, 0xc8482856, 0x5648829a, 0xb54f0d14, 0x2b4fa7d8, - 0x324662d2, 0xac46c81e, 0x4f414790, 0xd141ed5c, 0xedc29d29, - 0x73c237e5, 0x90c5b86b, 0x0ec512a7, 0x17ccd7ad, 0x89cc7d61, - 0x6acbf2ef, 0xf4cb5823, 0x58d978fa, 0xc6d9d236, 0x25de5db8, - 0xbbdef774, 0xa2d7327e, 0x3cd798b2, 0xdfd0173c, 0x41d0bdf0, - 0xc6f32655, 0x58f38c99, 0xbbf40317, 0x25f4a9db, 0x3cfd6cd1, - 0xa2fdc61d, 0x41fa4993, 0xdffae35f, 0x73e8c386, 0xede8694a, - 0x0eefe6c4, 0x90ef4c08, 0x89e68902, 0x17e623ce, 0xf4e1ac40, - 0x6ae1068c, 0xbba0ebd0, 0x25a0411c, 0xc6a7ce92, 0x58a7645e, - 0x41aea154, 0xdfae0b98, 0x3ca98416, 0xa2a92eda, 0x0ebb0e03, - 0x90bba4cf, 0x73bc2b41, 0xedbc818d, 0xf4b54487, 0x6ab5ee4b, - 0x89b261c5, 0x17b2cb09, 0x909150ac, 0x0e91fa60, 0xed9675ee, - 0x7396df22, 0x6a9f1a28, 0xf49fb0e4, 0x17983f6a, 0x899895a6, - 0x258ab57f, 0xbb8a1fb3, 0x588d903d, 0xc68d3af1, 0xdf84fffb, - 0x41845537, 0xa283dab9, 0x3c837075, 0xda853b53, 0x4485919f, - 0xa7821e11, 0x3982b4dd, 0x208b71d7, 0xbe8bdb1b, 0x5d8c5495, - 0xc38cfe59, 0x6f9ede80, 0xf19e744c, 0x1299fbc2, 0x8c99510e, - 0x95909404, 0x0b903ec8, 0xe897b146, 0x76971b8a, 0xf1b4802f, - 0x6fb42ae3, 0x8cb3a56d, 0x12b30fa1, 0x0bbacaab, 0x95ba6067, - 0x76bdefe9, 0xe8bd4525, 0x44af65fc, 0xdaafcf30, 0x39a840be, - 0xa7a8ea72, 0xbea12f78, 0x20a185b4, 0xc3a60a3a, 0x5da6a0f6, - 0x8ce74daa, 0x12e7e766, 0xf1e068e8, 0x6fe0c224, 0x76e9072e, - 0xe8e9ade2, 0x0bee226c, 0x95ee88a0, 0x39fca879, 0xa7fc02b5, - 0x44fb8d3b, 0xdafb27f7, 0xc3f2e2fd, 0x5df24831, 0xbef5c7bf, - 0x20f56d73, 0xa7d6f6d6, 0x39d65c1a, 0xdad1d394, 0x44d17958, - 0x5dd8bc52, 0xc3d8169e, 0x20df9910, 0xbedf33dc, 0x12cd1305, - 0x8ccdb9c9, 0x6fca3647, 0xf1ca9c8b, 0xe8c35981, 0x76c3f34d, - 0x95c47cc3, 0x0bc4d60f, 0x3747a67a, 0xa9470cb6, 0x4a408338, - 0xd44029f4, 0xcd49ecfe, 0x53494632, 0xb04ec9bc, 0x2e4e6370, - 0x825c43a9, 0x1c5ce965, 0xff5b66eb, 0x615bcc27, 0x7852092d, - 0xe652a3e1, 0x05552c6f, 0x9b5586a3, 0x1c761d06, 0x8276b7ca, - 0x61713844, 0xff719288, 0xe6785782, 0x7878fd4e, 0x9b7f72c0, - 0x057fd80c, 0xa96df8d5, 0x376d5219, 0xd46add97, 0x4a6a775b, - 0x5363b251, 0xcd63189d, 0x2e649713, 0xb0643ddf, 0x6125d083, - 0xff257a4f, 0x1c22f5c1, 0x82225f0d, 0x9b2b9a07, 0x052b30cb, - 0xe62cbf45, 0x782c1589, 0xd43e3550, 0x4a3e9f9c, 0xa9391012, - 0x3739bade, 0x2e307fd4, 0xb030d518, 0x53375a96, 0xcd37f05a, - 0x4a146bff, 0xd414c133, 0x37134ebd, 0xa913e471, 0xb01a217b, - 0x2e1a8bb7, 0xcd1d0439, 0x531daef5, 0xff0f8e2c, 0x610f24e0, - 0x8208ab6e, 0x1c0801a2, 0x0501c4a8, 0x9b016e64, 0x7806e1ea, - 0xe6064b26}}; - -#endif - -#endif - -#if N == 3 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0x81256527, 0xd93bcc0f, 0x581ea928, 0x69069e5f, - 0xe823fb78, 0xb03d5250, 0x31183777, 0xd20d3cbe, 0x53285999, - 0x0b36f0b1, 0x8a139596, 0xbb0ba2e1, 0x3a2ec7c6, 0x62306eee, - 0xe3150bc9, 0x7f6b7f3d, 0xfe4e1a1a, 0xa650b332, 0x2775d615, - 0x166de162, 0x97488445, 0xcf562d6d, 0x4e73484a, 0xad664383, - 0x2c4326a4, 0x745d8f8c, 0xf578eaab, 0xc460dddc, 0x4545b8fb, - 0x1d5b11d3, 0x9c7e74f4, 0xfed6fe7a, 0x7ff39b5d, 0x27ed3275, - 0xa6c85752, 0x97d06025, 0x16f50502, 0x4eebac2a, 0xcfcec90d, - 0x2cdbc2c4, 0xadfea7e3, 0xf5e00ecb, 0x74c56bec, 0x45dd5c9b, - 0xc4f839bc, 0x9ce69094, 0x1dc3f5b3, 0x81bd8147, 0x0098e460, - 0x58864d48, 0xd9a3286f, 0xe8bb1f18, 0x699e7a3f, 0x3180d317, - 0xb0a5b630, 0x53b0bdf9, 0xd295d8de, 0x8a8b71f6, 0x0bae14d1, - 0x3ab623a6, 0xbb934681, 0xe38defa9, 0x62a88a8e, 0x26dcfab5, - 0xa7f99f92, 0xffe736ba, 0x7ec2539d, 0x4fda64ea, 0xceff01cd, - 0x96e1a8e5, 0x17c4cdc2, 0xf4d1c60b, 0x75f4a32c, 0x2dea0a04, - 0xaccf6f23, 0x9dd75854, 0x1cf23d73, 0x44ec945b, 0xc5c9f17c, - 0x59b78588, 0xd892e0af, 0x808c4987, 0x01a92ca0, 0x30b11bd7, - 0xb1947ef0, 0xe98ad7d8, 0x68afb2ff, 0x8bbab936, 0x0a9fdc11, - 0x52817539, 0xd3a4101e, 0xe2bc2769, 0x6399424e, 0x3b87eb66, - 0xbaa28e41, 0xd80a04cf, 0x592f61e8, 0x0131c8c0, 0x8014ade7, - 0xb10c9a90, 0x3029ffb7, 0x6837569f, 0xe91233b8, 0x0a073871, - 0x8b225d56, 0xd33cf47e, 0x52199159, 0x6301a62e, 0xe224c309, - 0xba3a6a21, 0x3b1f0f06, 0xa7617bf2, 0x26441ed5, 0x7e5ab7fd, - 0xff7fd2da, 0xce67e5ad, 0x4f42808a, 0x175c29a2, 0x96794c85, - 0x756c474c, 0xf449226b, 0xac578b43, 0x2d72ee64, 0x1c6ad913, - 0x9d4fbc34, 0xc551151c, 0x4474703b, 0x4db9f56a, 0xcc9c904d, - 0x94823965, 0x15a75c42, 0x24bf6b35, 0xa59a0e12, 0xfd84a73a, - 0x7ca1c21d, 0x9fb4c9d4, 0x1e91acf3, 0x468f05db, 0xc7aa60fc, - 0xf6b2578b, 0x779732ac, 0x2f899b84, 0xaeacfea3, 0x32d28a57, - 0xb3f7ef70, 0xebe94658, 0x6acc237f, 0x5bd41408, 0xdaf1712f, - 0x82efd807, 0x03cabd20, 0xe0dfb6e9, 0x61fad3ce, 0x39e47ae6, - 0xb8c11fc1, 0x89d928b6, 0x08fc4d91, 0x50e2e4b9, 0xd1c7819e, - 0xb36f0b10, 0x324a6e37, 0x6a54c71f, 0xeb71a238, 0xda69954f, - 0x5b4cf068, 0x03525940, 0x82773c67, 0x616237ae, 0xe0475289, - 0xb859fba1, 0x397c9e86, 0x0864a9f1, 0x8941ccd6, 0xd15f65fe, - 0x507a00d9, 0xcc04742d, 0x4d21110a, 0x153fb822, 0x941add05, - 0xa502ea72, 0x24278f55, 0x7c39267d, 0xfd1c435a, 0x1e094893, - 0x9f2c2db4, 0xc732849c, 0x4617e1bb, 0x770fd6cc, 0xf62ab3eb, - 0xae341ac3, 0x2f117fe4, 0x6b650fdf, 0xea406af8, 0xb25ec3d0, - 0x337ba6f7, 0x02639180, 0x8346f4a7, 0xdb585d8f, 0x5a7d38a8, - 0xb9683361, 0x384d5646, 0x6053ff6e, 0xe1769a49, 0xd06ead3e, - 0x514bc819, 0x09556131, 0x88700416, 0x140e70e2, 0x952b15c5, - 0xcd35bced, 0x4c10d9ca, 0x7d08eebd, 0xfc2d8b9a, 0xa43322b2, - 0x25164795, 0xc6034c5c, 0x4726297b, 0x1f388053, 0x9e1de574, - 0xaf05d203, 0x2e20b724, 0x763e1e0c, 0xf71b7b2b, 0x95b3f1a5, - 0x14969482, 0x4c883daa, 0xcdad588d, 0xfcb56ffa, 0x7d900add, - 0x258ea3f5, 0xa4abc6d2, 0x47becd1b, 0xc69ba83c, 0x9e850114, - 0x1fa06433, 0x2eb85344, 0xaf9d3663, 0xf7839f4b, 0x76a6fa6c, - 0xead88e98, 0x6bfdebbf, 0x33e34297, 0xb2c627b0, 0x83de10c7, - 0x02fb75e0, 0x5ae5dcc8, 0xdbc0b9ef, 0x38d5b226, 0xb9f0d701, - 0xe1ee7e29, 0x60cb1b0e, 0x51d32c79, 0xd0f6495e, 0x88e8e076, - 0x09cd8551}, - {0x00000000, 0x9b73ead4, 0xed96d3e9, 0x76e5393d, 0x005ca193, - 0x9b2f4b47, 0xedca727a, 0x76b998ae, 0x00b94326, 0x9bcaa9f2, - 0xed2f90cf, 0x765c7a1b, 0x00e5e2b5, 0x9b960861, 0xed73315c, - 0x7600db88, 0x0172864c, 0x9a016c98, 0xece455a5, 0x7797bf71, - 0x012e27df, 0x9a5dcd0b, 0xecb8f436, 0x77cb1ee2, 0x01cbc56a, - 0x9ab82fbe, 0xec5d1683, 0x772efc57, 0x019764f9, 0x9ae48e2d, - 0xec01b710, 0x77725dc4, 0x02e50c98, 0x9996e64c, 0xef73df71, - 0x740035a5, 0x02b9ad0b, 0x99ca47df, 0xef2f7ee2, 0x745c9436, - 0x025c4fbe, 0x992fa56a, 0xefca9c57, 0x74b97683, 0x0200ee2d, - 0x997304f9, 0xef963dc4, 0x74e5d710, 0x03978ad4, 0x98e46000, - 0xee01593d, 0x7572b3e9, 0x03cb2b47, 0x98b8c193, 0xee5df8ae, - 0x752e127a, 0x032ec9f2, 0x985d2326, 0xeeb81a1b, 0x75cbf0cf, - 0x03726861, 0x980182b5, 0xeee4bb88, 0x7597515c, 0x05ca1930, - 0x9eb9f3e4, 0xe85ccad9, 0x732f200d, 0x0596b8a3, 0x9ee55277, - 0xe8006b4a, 0x7373819e, 0x05735a16, 0x9e00b0c2, 0xe8e589ff, - 0x7396632b, 0x052ffb85, 0x9e5c1151, 0xe8b9286c, 0x73cac2b8, - 0x04b89f7c, 0x9fcb75a8, 0xe92e4c95, 0x725da641, 0x04e43eef, - 0x9f97d43b, 0xe972ed06, 0x720107d2, 0x0401dc5a, 0x9f72368e, - 0xe9970fb3, 0x72e4e567, 0x045d7dc9, 0x9f2e971d, 0xe9cbae20, - 0x72b844f4, 0x072f15a8, 0x9c5cff7c, 0xeab9c641, 0x71ca2c95, - 0x0773b43b, 0x9c005eef, 0xeae567d2, 0x71968d06, 0x0796568e, - 0x9ce5bc5a, 0xea008567, 0x71736fb3, 0x07caf71d, 0x9cb91dc9, - 0xea5c24f4, 0x712fce20, 0x065d93e4, 0x9d2e7930, 0xebcb400d, - 0x70b8aad9, 0x06013277, 0x9d72d8a3, 0xeb97e19e, 0x70e40b4a, - 0x06e4d0c2, 0x9d973a16, 0xeb72032b, 0x7001e9ff, 0x06b87151, - 0x9dcb9b85, 0xeb2ea2b8, 0x705d486c, 0x0b943260, 0x90e7d8b4, - 0xe602e189, 0x7d710b5d, 0x0bc893f3, 0x90bb7927, 0xe65e401a, - 0x7d2daace, 0x0b2d7146, 0x905e9b92, 0xe6bba2af, 0x7dc8487b, - 0x0b71d0d5, 0x90023a01, 0xe6e7033c, 0x7d94e9e8, 0x0ae6b42c, - 0x91955ef8, 0xe77067c5, 0x7c038d11, 0x0aba15bf, 0x91c9ff6b, - 0xe72cc656, 0x7c5f2c82, 0x0a5ff70a, 0x912c1dde, 0xe7c924e3, - 0x7cbace37, 0x0a035699, 0x9170bc4d, 0xe7958570, 0x7ce66fa4, - 0x09713ef8, 0x9202d42c, 0xe4e7ed11, 0x7f9407c5, 0x092d9f6b, - 0x925e75bf, 0xe4bb4c82, 0x7fc8a656, 0x09c87dde, 0x92bb970a, - 0xe45eae37, 0x7f2d44e3, 0x0994dc4d, 0x92e73699, 0xe4020fa4, - 0x7f71e570, 0x0803b8b4, 0x93705260, 0xe5956b5d, 0x7ee68189, - 0x085f1927, 0x932cf3f3, 0xe5c9cace, 0x7eba201a, 0x08bafb92, - 0x93c91146, 0xe52c287b, 0x7e5fc2af, 0x08e65a01, 0x9395b0d5, - 0xe57089e8, 0x7e03633c, 0x0e5e2b50, 0x952dc184, 0xe3c8f8b9, - 0x78bb126d, 0x0e028ac3, 0x95716017, 0xe394592a, 0x78e7b3fe, - 0x0ee76876, 0x959482a2, 0xe371bb9f, 0x7802514b, 0x0ebbc9e5, - 0x95c82331, 0xe32d1a0c, 0x785ef0d8, 0x0f2cad1c, 0x945f47c8, - 0xe2ba7ef5, 0x79c99421, 0x0f700c8f, 0x9403e65b, 0xe2e6df66, - 0x799535b2, 0x0f95ee3a, 0x94e604ee, 0xe2033dd3, 0x7970d707, - 0x0fc94fa9, 0x94baa57d, 0xe25f9c40, 0x792c7694, 0x0cbb27c8, - 0x97c8cd1c, 0xe12df421, 0x7a5e1ef5, 0x0ce7865b, 0x97946c8f, - 0xe17155b2, 0x7a02bf66, 0x0c0264ee, 0x97718e3a, 0xe194b707, - 0x7ae75dd3, 0x0c5ec57d, 0x972d2fa9, 0xe1c81694, 0x7abbfc40, - 0x0dc9a184, 0x96ba4b50, 0xe05f726d, 0x7b2c98b9, 0x0d950017, - 0x96e6eac3, 0xe003d3fe, 0x7b70392a, 0x0d70e2a2, 0x96030876, - 0xe0e6314b, 0x7b95db9f, 0x0d2c4331, 0x965fa9e5, 0xe0ba90d8, - 0x7bc97a0c}, - {0x00000000, 0x172864c0, 0x2e50c980, 0x3978ad40, 0x5ca19300, - 0x4b89f7c0, 0x72f15a80, 0x65d93e40, 0xb9432600, 0xae6b42c0, - 0x9713ef80, 0x803b8b40, 0xe5e2b500, 0xf2cad1c0, 0xcbb27c80, - 0xdc9a1840, 0xa9f74a41, 0xbedf2e81, 0x87a783c1, 0x908fe701, - 0xf556d941, 0xe27ebd81, 0xdb0610c1, 0xcc2e7401, 0x10b46c41, - 0x079c0881, 0x3ee4a5c1, 0x29ccc101, 0x4c15ff41, 0x5b3d9b81, - 0x624536c1, 0x756d5201, 0x889f92c3, 0x9fb7f603, 0xa6cf5b43, - 0xb1e73f83, 0xd43e01c3, 0xc3166503, 0xfa6ec843, 0xed46ac83, - 0x31dcb4c3, 0x26f4d003, 0x1f8c7d43, 0x08a41983, 0x6d7d27c3, - 0x7a554303, 0x432dee43, 0x54058a83, 0x2168d882, 0x3640bc42, - 0x0f381102, 0x181075c2, 0x7dc94b82, 0x6ae12f42, 0x53998202, - 0x44b1e6c2, 0x982bfe82, 0x8f039a42, 0xb67b3702, 0xa15353c2, - 0xc48a6d82, 0xd3a20942, 0xeadaa402, 0xfdf2c0c2, 0xca4e23c7, - 0xdd664707, 0xe41eea47, 0xf3368e87, 0x96efb0c7, 0x81c7d407, - 0xb8bf7947, 0xaf971d87, 0x730d05c7, 0x64256107, 0x5d5dcc47, - 0x4a75a887, 0x2fac96c7, 0x3884f207, 0x01fc5f47, 0x16d43b87, - 0x63b96986, 0x74910d46, 0x4de9a006, 0x5ac1c4c6, 0x3f18fa86, - 0x28309e46, 0x11483306, 0x066057c6, 0xdafa4f86, 0xcdd22b46, - 0xf4aa8606, 0xe382e2c6, 0x865bdc86, 0x9173b846, 0xa80b1506, - 0xbf2371c6, 0x42d1b104, 0x55f9d5c4, 0x6c817884, 0x7ba91c44, - 0x1e702204, 0x095846c4, 0x3020eb84, 0x27088f44, 0xfb929704, - 0xecbaf3c4, 0xd5c25e84, 0xc2ea3a44, 0xa7330404, 0xb01b60c4, - 0x8963cd84, 0x9e4ba944, 0xeb26fb45, 0xfc0e9f85, 0xc57632c5, - 0xd25e5605, 0xb7876845, 0xa0af0c85, 0x99d7a1c5, 0x8effc505, - 0x5265dd45, 0x454db985, 0x7c3514c5, 0x6b1d7005, 0x0ec44e45, - 0x19ec2a85, 0x209487c5, 0x37bce305, 0x4fed41cf, 0x58c5250f, - 0x61bd884f, 0x7695ec8f, 0x134cd2cf, 0x0464b60f, 0x3d1c1b4f, - 0x2a347f8f, 0xf6ae67cf, 0xe186030f, 0xd8feae4f, 0xcfd6ca8f, - 0xaa0ff4cf, 0xbd27900f, 0x845f3d4f, 0x9377598f, 0xe61a0b8e, - 0xf1326f4e, 0xc84ac20e, 0xdf62a6ce, 0xbabb988e, 0xad93fc4e, - 0x94eb510e, 0x83c335ce, 0x5f592d8e, 0x4871494e, 0x7109e40e, - 0x662180ce, 0x03f8be8e, 0x14d0da4e, 0x2da8770e, 0x3a8013ce, - 0xc772d30c, 0xd05ab7cc, 0xe9221a8c, 0xfe0a7e4c, 0x9bd3400c, - 0x8cfb24cc, 0xb583898c, 0xa2abed4c, 0x7e31f50c, 0x691991cc, - 0x50613c8c, 0x4749584c, 0x2290660c, 0x35b802cc, 0x0cc0af8c, - 0x1be8cb4c, 0x6e85994d, 0x79adfd8d, 0x40d550cd, 0x57fd340d, - 0x32240a4d, 0x250c6e8d, 0x1c74c3cd, 0x0b5ca70d, 0xd7c6bf4d, - 0xc0eedb8d, 0xf99676cd, 0xeebe120d, 0x8b672c4d, 0x9c4f488d, - 0xa537e5cd, 0xb21f810d, 0x85a36208, 0x928b06c8, 0xabf3ab88, - 0xbcdbcf48, 0xd902f108, 0xce2a95c8, 0xf7523888, 0xe07a5c48, - 0x3ce04408, 0x2bc820c8, 0x12b08d88, 0x0598e948, 0x6041d708, - 0x7769b3c8, 0x4e111e88, 0x59397a48, 0x2c542849, 0x3b7c4c89, - 0x0204e1c9, 0x152c8509, 0x70f5bb49, 0x67dddf89, 0x5ea572c9, - 0x498d1609, 0x95170e49, 0x823f6a89, 0xbb47c7c9, 0xac6fa309, - 0xc9b69d49, 0xde9ef989, 0xe7e654c9, 0xf0ce3009, 0x0d3cf0cb, - 0x1a14940b, 0x236c394b, 0x34445d8b, 0x519d63cb, 0x46b5070b, - 0x7fcdaa4b, 0x68e5ce8b, 0xb47fd6cb, 0xa357b20b, 0x9a2f1f4b, - 0x8d077b8b, 0xe8de45cb, 0xfff6210b, 0xc68e8c4b, 0xd1a6e88b, - 0xa4cbba8a, 0xb3e3de4a, 0x8a9b730a, 0x9db317ca, 0xf86a298a, - 0xef424d4a, 0xd63ae00a, 0xc11284ca, 0x1d889c8a, 0x0aa0f84a, - 0x33d8550a, 0x24f031ca, 0x41290f8a, 0x56016b4a, 0x6f79c60a, - 0x7851a2ca}, - {0x00000000, 0x9fda839e, 0xe4c4017d, 0x7b1e82e3, 0x12f904bb, - 0x8d238725, 0xf63d05c6, 0x69e78658, 0x25f20976, 0xba288ae8, - 0xc136080b, 0x5eec8b95, 0x370b0dcd, 0xa8d18e53, 0xd3cf0cb0, - 0x4c158f2e, 0x4be412ec, 0xd43e9172, 0xaf201391, 0x30fa900f, - 0x591d1657, 0xc6c795c9, 0xbdd9172a, 0x220394b4, 0x6e161b9a, - 0xf1cc9804, 0x8ad21ae7, 0x15089979, 0x7cef1f21, 0xe3359cbf, - 0x982b1e5c, 0x07f19dc2, 0x97c825d8, 0x0812a646, 0x730c24a5, - 0xecd6a73b, 0x85312163, 0x1aeba2fd, 0x61f5201e, 0xfe2fa380, - 0xb23a2cae, 0x2de0af30, 0x56fe2dd3, 0xc924ae4d, 0xa0c32815, - 0x3f19ab8b, 0x44072968, 0xdbddaaf6, 0xdc2c3734, 0x43f6b4aa, - 0x38e83649, 0xa732b5d7, 0xced5338f, 0x510fb011, 0x2a1132f2, - 0xb5cbb16c, 0xf9de3e42, 0x6604bddc, 0x1d1a3f3f, 0x82c0bca1, - 0xeb273af9, 0x74fdb967, 0x0fe33b84, 0x9039b81a, 0xf4e14df1, - 0x6b3bce6f, 0x10254c8c, 0x8fffcf12, 0xe618494a, 0x79c2cad4, - 0x02dc4837, 0x9d06cba9, 0xd1134487, 0x4ec9c719, 0x35d745fa, - 0xaa0dc664, 0xc3ea403c, 0x5c30c3a2, 0x272e4141, 0xb8f4c2df, - 0xbf055f1d, 0x20dfdc83, 0x5bc15e60, 0xc41bddfe, 0xadfc5ba6, - 0x3226d838, 0x49385adb, 0xd6e2d945, 0x9af7566b, 0x052dd5f5, - 0x7e335716, 0xe1e9d488, 0x880e52d0, 0x17d4d14e, 0x6cca53ad, - 0xf310d033, 0x63296829, 0xfcf3ebb7, 0x87ed6954, 0x1837eaca, - 0x71d06c92, 0xee0aef0c, 0x95146def, 0x0aceee71, 0x46db615f, - 0xd901e2c1, 0xa21f6022, 0x3dc5e3bc, 0x542265e4, 0xcbf8e67a, - 0xb0e66499, 0x2f3ce707, 0x28cd7ac5, 0xb717f95b, 0xcc097bb8, - 0x53d3f826, 0x3a347e7e, 0xa5eefde0, 0xdef07f03, 0x412afc9d, - 0x0d3f73b3, 0x92e5f02d, 0xe9fb72ce, 0x7621f150, 0x1fc67708, - 0x801cf496, 0xfb027675, 0x64d8f5eb, 0x32b39da3, 0xad691e3d, - 0xd6779cde, 0x49ad1f40, 0x204a9918, 0xbf901a86, 0xc48e9865, - 0x5b541bfb, 0x174194d5, 0x889b174b, 0xf38595a8, 0x6c5f1636, - 0x05b8906e, 0x9a6213f0, 0xe17c9113, 0x7ea6128d, 0x79578f4f, - 0xe68d0cd1, 0x9d938e32, 0x02490dac, 0x6bae8bf4, 0xf474086a, - 0x8f6a8a89, 0x10b00917, 0x5ca58639, 0xc37f05a7, 0xb8618744, - 0x27bb04da, 0x4e5c8282, 0xd186011c, 0xaa9883ff, 0x35420061, - 0xa57bb87b, 0x3aa13be5, 0x41bfb906, 0xde653a98, 0xb782bcc0, - 0x28583f5e, 0x5346bdbd, 0xcc9c3e23, 0x8089b10d, 0x1f533293, - 0x644db070, 0xfb9733ee, 0x9270b5b6, 0x0daa3628, 0x76b4b4cb, - 0xe96e3755, 0xee9faa97, 0x71452909, 0x0a5babea, 0x95812874, - 0xfc66ae2c, 0x63bc2db2, 0x18a2af51, 0x87782ccf, 0xcb6da3e1, - 0x54b7207f, 0x2fa9a29c, 0xb0732102, 0xd994a75a, 0x464e24c4, - 0x3d50a627, 0xa28a25b9, 0xc652d052, 0x598853cc, 0x2296d12f, - 0xbd4c52b1, 0xd4abd4e9, 0x4b715777, 0x306fd594, 0xafb5560a, - 0xe3a0d924, 0x7c7a5aba, 0x0764d859, 0x98be5bc7, 0xf159dd9f, - 0x6e835e01, 0x159ddce2, 0x8a475f7c, 0x8db6c2be, 0x126c4120, - 0x6972c3c3, 0xf6a8405d, 0x9f4fc605, 0x0095459b, 0x7b8bc778, - 0xe45144e6, 0xa844cbc8, 0x379e4856, 0x4c80cab5, 0xd35a492b, - 0xbabdcf73, 0x25674ced, 0x5e79ce0e, 0xc1a34d90, 0x519af58a, - 0xce407614, 0xb55ef4f7, 0x2a847769, 0x4363f131, 0xdcb972af, - 0xa7a7f04c, 0x387d73d2, 0x7468fcfc, 0xebb27f62, 0x90acfd81, - 0x0f767e1f, 0x6691f847, 0xf94b7bd9, 0x8255f93a, 0x1d8f7aa4, - 0x1a7ee766, 0x85a464f8, 0xfebae61b, 0x61606585, 0x0887e3dd, - 0x975d6043, 0xec43e2a0, 0x7399613e, 0x3f8cee10, 0xa0566d8e, - 0xdb48ef6d, 0x44926cf3, 0x2d75eaab, 0xb2af6935, 0xc9b1ebd6, - 0x566b6848}, - {0x00000000, 0x65673b46, 0xcace768c, 0xafa94dca, 0x4eedeb59, - 0x2b8ad01f, 0x84239dd5, 0xe144a693, 0x9ddbd6b2, 0xf8bcedf4, - 0x5715a03e, 0x32729b78, 0xd3363deb, 0xb65106ad, 0x19f84b67, - 0x7c9f7021, 0xe0c6ab25, 0x85a19063, 0x2a08dda9, 0x4f6fe6ef, - 0xae2b407c, 0xcb4c7b3a, 0x64e536f0, 0x01820db6, 0x7d1d7d97, - 0x187a46d1, 0xb7d30b1b, 0xd2b4305d, 0x33f096ce, 0x5697ad88, - 0xf93ee042, 0x9c59db04, 0x1afc500b, 0x7f9b6b4d, 0xd0322687, - 0xb5551dc1, 0x5411bb52, 0x31768014, 0x9edfcdde, 0xfbb8f698, - 0x872786b9, 0xe240bdff, 0x4de9f035, 0x288ecb73, 0xc9ca6de0, - 0xacad56a6, 0x03041b6c, 0x6663202a, 0xfa3afb2e, 0x9f5dc068, - 0x30f48da2, 0x5593b6e4, 0xb4d71077, 0xd1b02b31, 0x7e1966fb, - 0x1b7e5dbd, 0x67e12d9c, 0x028616da, 0xad2f5b10, 0xc8486056, - 0x290cc6c5, 0x4c6bfd83, 0xe3c2b049, 0x86a58b0f, 0x35f8a016, - 0x509f9b50, 0xff36d69a, 0x9a51eddc, 0x7b154b4f, 0x1e727009, - 0xb1db3dc3, 0xd4bc0685, 0xa82376a4, 0xcd444de2, 0x62ed0028, - 0x078a3b6e, 0xe6ce9dfd, 0x83a9a6bb, 0x2c00eb71, 0x4967d037, - 0xd53e0b33, 0xb0593075, 0x1ff07dbf, 0x7a9746f9, 0x9bd3e06a, - 0xfeb4db2c, 0x511d96e6, 0x347aada0, 0x48e5dd81, 0x2d82e6c7, - 0x822bab0d, 0xe74c904b, 0x060836d8, 0x636f0d9e, 0xccc64054, - 0xa9a17b12, 0x2f04f01d, 0x4a63cb5b, 0xe5ca8691, 0x80adbdd7, - 0x61e91b44, 0x048e2002, 0xab276dc8, 0xce40568e, 0xb2df26af, - 0xd7b81de9, 0x78115023, 0x1d766b65, 0xfc32cdf6, 0x9955f6b0, - 0x36fcbb7a, 0x539b803c, 0xcfc25b38, 0xaaa5607e, 0x050c2db4, - 0x606b16f2, 0x812fb061, 0xe4488b27, 0x4be1c6ed, 0x2e86fdab, - 0x52198d8a, 0x377eb6cc, 0x98d7fb06, 0xfdb0c040, 0x1cf466d3, - 0x79935d95, 0xd63a105f, 0xb35d2b19, 0x6bf1402c, 0x0e967b6a, - 0xa13f36a0, 0xc4580de6, 0x251cab75, 0x407b9033, 0xefd2ddf9, - 0x8ab5e6bf, 0xf62a969e, 0x934dadd8, 0x3ce4e012, 0x5983db54, - 0xb8c77dc7, 0xdda04681, 0x72090b4b, 0x176e300d, 0x8b37eb09, - 0xee50d04f, 0x41f99d85, 0x249ea6c3, 0xc5da0050, 0xa0bd3b16, - 0x0f1476dc, 0x6a734d9a, 0x16ec3dbb, 0x738b06fd, 0xdc224b37, - 0xb9457071, 0x5801d6e2, 0x3d66eda4, 0x92cfa06e, 0xf7a89b28, - 0x710d1027, 0x146a2b61, 0xbbc366ab, 0xdea45ded, 0x3fe0fb7e, - 0x5a87c038, 0xf52e8df2, 0x9049b6b4, 0xecd6c695, 0x89b1fdd3, - 0x2618b019, 0x437f8b5f, 0xa23b2dcc, 0xc75c168a, 0x68f55b40, - 0x0d926006, 0x91cbbb02, 0xf4ac8044, 0x5b05cd8e, 0x3e62f6c8, - 0xdf26505b, 0xba416b1d, 0x15e826d7, 0x708f1d91, 0x0c106db0, - 0x697756f6, 0xc6de1b3c, 0xa3b9207a, 0x42fd86e9, 0x279abdaf, - 0x8833f065, 0xed54cb23, 0x5e09e03a, 0x3b6edb7c, 0x94c796b6, - 0xf1a0adf0, 0x10e40b63, 0x75833025, 0xda2a7def, 0xbf4d46a9, - 0xc3d23688, 0xa6b50dce, 0x091c4004, 0x6c7b7b42, 0x8d3fddd1, - 0xe858e697, 0x47f1ab5d, 0x2296901b, 0xbecf4b1f, 0xdba87059, - 0x74013d93, 0x116606d5, 0xf022a046, 0x95459b00, 0x3aecd6ca, - 0x5f8bed8c, 0x23149dad, 0x4673a6eb, 0xe9daeb21, 0x8cbdd067, - 0x6df976f4, 0x089e4db2, 0xa7370078, 0xc2503b3e, 0x44f5b031, - 0x21928b77, 0x8e3bc6bd, 0xeb5cfdfb, 0x0a185b68, 0x6f7f602e, - 0xc0d62de4, 0xa5b116a2, 0xd92e6683, 0xbc495dc5, 0x13e0100f, - 0x76872b49, 0x97c38dda, 0xf2a4b69c, 0x5d0dfb56, 0x386ac010, - 0xa4331b14, 0xc1542052, 0x6efd6d98, 0x0b9a56de, 0xeadef04d, - 0x8fb9cb0b, 0x201086c1, 0x4577bd87, 0x39e8cda6, 0x5c8ff6e0, - 0xf326bb2a, 0x9641806c, 0x770526ff, 0x12621db9, 0xbdcb5073, - 0xd8ac6b35}, - {0x00000000, 0xd7e28058, 0x74b406f1, 0xa35686a9, 0xe9680de2, - 0x3e8a8dba, 0x9ddc0b13, 0x4a3e8b4b, 0x09a11d85, 0xde439ddd, - 0x7d151b74, 0xaaf79b2c, 0xe0c91067, 0x372b903f, 0x947d1696, - 0x439f96ce, 0x13423b0a, 0xc4a0bb52, 0x67f63dfb, 0xb014bda3, - 0xfa2a36e8, 0x2dc8b6b0, 0x8e9e3019, 0x597cb041, 0x1ae3268f, - 0xcd01a6d7, 0x6e57207e, 0xb9b5a026, 0xf38b2b6d, 0x2469ab35, - 0x873f2d9c, 0x50ddadc4, 0x26847614, 0xf166f64c, 0x523070e5, - 0x85d2f0bd, 0xcfec7bf6, 0x180efbae, 0xbb587d07, 0x6cbafd5f, - 0x2f256b91, 0xf8c7ebc9, 0x5b916d60, 0x8c73ed38, 0xc64d6673, - 0x11afe62b, 0xb2f96082, 0x651be0da, 0x35c64d1e, 0xe224cd46, - 0x41724bef, 0x9690cbb7, 0xdcae40fc, 0x0b4cc0a4, 0xa81a460d, - 0x7ff8c655, 0x3c67509b, 0xeb85d0c3, 0x48d3566a, 0x9f31d632, - 0xd50f5d79, 0x02eddd21, 0xa1bb5b88, 0x7659dbd0, 0x4d08ec28, - 0x9aea6c70, 0x39bcead9, 0xee5e6a81, 0xa460e1ca, 0x73826192, - 0xd0d4e73b, 0x07366763, 0x44a9f1ad, 0x934b71f5, 0x301df75c, - 0xe7ff7704, 0xadc1fc4f, 0x7a237c17, 0xd975fabe, 0x0e977ae6, - 0x5e4ad722, 0x89a8577a, 0x2afed1d3, 0xfd1c518b, 0xb722dac0, - 0x60c05a98, 0xc396dc31, 0x14745c69, 0x57ebcaa7, 0x80094aff, - 0x235fcc56, 0xf4bd4c0e, 0xbe83c745, 0x6961471d, 0xca37c1b4, - 0x1dd541ec, 0x6b8c9a3c, 0xbc6e1a64, 0x1f389ccd, 0xc8da1c95, - 0x82e497de, 0x55061786, 0xf650912f, 0x21b21177, 0x622d87b9, - 0xb5cf07e1, 0x16998148, 0xc17b0110, 0x8b458a5b, 0x5ca70a03, - 0xfff18caa, 0x28130cf2, 0x78cea136, 0xaf2c216e, 0x0c7aa7c7, - 0xdb98279f, 0x91a6acd4, 0x46442c8c, 0xe512aa25, 0x32f02a7d, - 0x716fbcb3, 0xa68d3ceb, 0x05dbba42, 0xd2393a1a, 0x9807b151, - 0x4fe53109, 0xecb3b7a0, 0x3b5137f8, 0x9a11d850, 0x4df35808, - 0xeea5dea1, 0x39475ef9, 0x7379d5b2, 0xa49b55ea, 0x07cdd343, - 0xd02f531b, 0x93b0c5d5, 0x4452458d, 0xe704c324, 0x30e6437c, - 0x7ad8c837, 0xad3a486f, 0x0e6ccec6, 0xd98e4e9e, 0x8953e35a, - 0x5eb16302, 0xfde7e5ab, 0x2a0565f3, 0x603beeb8, 0xb7d96ee0, - 0x148fe849, 0xc36d6811, 0x80f2fedf, 0x57107e87, 0xf446f82e, - 0x23a47876, 0x699af33d, 0xbe787365, 0x1d2ef5cc, 0xcacc7594, - 0xbc95ae44, 0x6b772e1c, 0xc821a8b5, 0x1fc328ed, 0x55fda3a6, - 0x821f23fe, 0x2149a557, 0xf6ab250f, 0xb534b3c1, 0x62d63399, - 0xc180b530, 0x16623568, 0x5c5cbe23, 0x8bbe3e7b, 0x28e8b8d2, - 0xff0a388a, 0xafd7954e, 0x78351516, 0xdb6393bf, 0x0c8113e7, - 0x46bf98ac, 0x915d18f4, 0x320b9e5d, 0xe5e91e05, 0xa67688cb, - 0x71940893, 0xd2c28e3a, 0x05200e62, 0x4f1e8529, 0x98fc0571, - 0x3baa83d8, 0xec480380, 0xd7193478, 0x00fbb420, 0xa3ad3289, - 0x744fb2d1, 0x3e71399a, 0xe993b9c2, 0x4ac53f6b, 0x9d27bf33, - 0xdeb829fd, 0x095aa9a5, 0xaa0c2f0c, 0x7deeaf54, 0x37d0241f, - 0xe032a447, 0x436422ee, 0x9486a2b6, 0xc45b0f72, 0x13b98f2a, - 0xb0ef0983, 0x670d89db, 0x2d330290, 0xfad182c8, 0x59870461, - 0x8e658439, 0xcdfa12f7, 0x1a1892af, 0xb94e1406, 0x6eac945e, - 0x24921f15, 0xf3709f4d, 0x502619e4, 0x87c499bc, 0xf19d426c, - 0x267fc234, 0x8529449d, 0x52cbc4c5, 0x18f54f8e, 0xcf17cfd6, - 0x6c41497f, 0xbba3c927, 0xf83c5fe9, 0x2fdedfb1, 0x8c885918, - 0x5b6ad940, 0x1154520b, 0xc6b6d253, 0x65e054fa, 0xb202d4a2, - 0xe2df7966, 0x353df93e, 0x966b7f97, 0x4189ffcf, 0x0bb77484, - 0xdc55f4dc, 0x7f037275, 0xa8e1f22d, 0xeb7e64e3, 0x3c9ce4bb, - 0x9fca6212, 0x4828e24a, 0x02166901, 0xd5f4e959, 0x76a26ff0, - 0xa140efa8}, - {0x00000000, 0xef52b6e1, 0x05d46b83, 0xea86dd62, 0x0ba8d706, - 0xe4fa61e7, 0x0e7cbc85, 0xe12e0a64, 0x1751ae0c, 0xf80318ed, - 0x1285c58f, 0xfdd7736e, 0x1cf9790a, 0xf3abcfeb, 0x192d1289, - 0xf67fa468, 0x2ea35c18, 0xc1f1eaf9, 0x2b77379b, 0xc425817a, - 0x250b8b1e, 0xca593dff, 0x20dfe09d, 0xcf8d567c, 0x39f2f214, - 0xd6a044f5, 0x3c269997, 0xd3742f76, 0x325a2512, 0xdd0893f3, - 0x378e4e91, 0xd8dcf870, 0x5d46b830, 0xb2140ed1, 0x5892d3b3, - 0xb7c06552, 0x56ee6f36, 0xb9bcd9d7, 0x533a04b5, 0xbc68b254, - 0x4a17163c, 0xa545a0dd, 0x4fc37dbf, 0xa091cb5e, 0x41bfc13a, - 0xaeed77db, 0x446baab9, 0xab391c58, 0x73e5e428, 0x9cb752c9, - 0x76318fab, 0x9963394a, 0x784d332e, 0x971f85cf, 0x7d9958ad, - 0x92cbee4c, 0x64b44a24, 0x8be6fcc5, 0x616021a7, 0x8e329746, - 0x6f1c9d22, 0x804e2bc3, 0x6ac8f6a1, 0x859a4040, 0xba8d7060, - 0x55dfc681, 0xbf591be3, 0x500bad02, 0xb125a766, 0x5e771187, - 0xb4f1cce5, 0x5ba37a04, 0xaddcde6c, 0x428e688d, 0xa808b5ef, - 0x475a030e, 0xa674096a, 0x4926bf8b, 0xa3a062e9, 0x4cf2d408, - 0x942e2c78, 0x7b7c9a99, 0x91fa47fb, 0x7ea8f11a, 0x9f86fb7e, - 0x70d44d9f, 0x9a5290fd, 0x7500261c, 0x837f8274, 0x6c2d3495, - 0x86abe9f7, 0x69f95f16, 0x88d75572, 0x6785e393, 0x8d033ef1, - 0x62518810, 0xe7cbc850, 0x08997eb1, 0xe21fa3d3, 0x0d4d1532, - 0xec631f56, 0x0331a9b7, 0xe9b774d5, 0x06e5c234, 0xf09a665c, - 0x1fc8d0bd, 0xf54e0ddf, 0x1a1cbb3e, 0xfb32b15a, 0x146007bb, - 0xfee6dad9, 0x11b46c38, 0xc9689448, 0x263a22a9, 0xccbcffcb, - 0x23ee492a, 0xc2c0434e, 0x2d92f5af, 0xc71428cd, 0x28469e2c, - 0xde393a44, 0x316b8ca5, 0xdbed51c7, 0x34bfe726, 0xd591ed42, - 0x3ac35ba3, 0xd04586c1, 0x3f173020, 0xae6be681, 0x41395060, - 0xabbf8d02, 0x44ed3be3, 0xa5c33187, 0x4a918766, 0xa0175a04, - 0x4f45ece5, 0xb93a488d, 0x5668fe6c, 0xbcee230e, 0x53bc95ef, - 0xb2929f8b, 0x5dc0296a, 0xb746f408, 0x581442e9, 0x80c8ba99, - 0x6f9a0c78, 0x851cd11a, 0x6a4e67fb, 0x8b606d9f, 0x6432db7e, - 0x8eb4061c, 0x61e6b0fd, 0x97991495, 0x78cba274, 0x924d7f16, - 0x7d1fc9f7, 0x9c31c393, 0x73637572, 0x99e5a810, 0x76b71ef1, - 0xf32d5eb1, 0x1c7fe850, 0xf6f93532, 0x19ab83d3, 0xf88589b7, - 0x17d73f56, 0xfd51e234, 0x120354d5, 0xe47cf0bd, 0x0b2e465c, - 0xe1a89b3e, 0x0efa2ddf, 0xefd427bb, 0x0086915a, 0xea004c38, - 0x0552fad9, 0xdd8e02a9, 0x32dcb448, 0xd85a692a, 0x3708dfcb, - 0xd626d5af, 0x3974634e, 0xd3f2be2c, 0x3ca008cd, 0xcadfaca5, - 0x258d1a44, 0xcf0bc726, 0x205971c7, 0xc1777ba3, 0x2e25cd42, - 0xc4a31020, 0x2bf1a6c1, 0x14e696e1, 0xfbb42000, 0x1132fd62, - 0xfe604b83, 0x1f4e41e7, 0xf01cf706, 0x1a9a2a64, 0xf5c89c85, - 0x03b738ed, 0xece58e0c, 0x0663536e, 0xe931e58f, 0x081fefeb, - 0xe74d590a, 0x0dcb8468, 0xe2993289, 0x3a45caf9, 0xd5177c18, - 0x3f91a17a, 0xd0c3179b, 0x31ed1dff, 0xdebfab1e, 0x3439767c, - 0xdb6bc09d, 0x2d1464f5, 0xc246d214, 0x28c00f76, 0xc792b997, - 0x26bcb3f3, 0xc9ee0512, 0x2368d870, 0xcc3a6e91, 0x49a02ed1, - 0xa6f29830, 0x4c744552, 0xa326f3b3, 0x4208f9d7, 0xad5a4f36, - 0x47dc9254, 0xa88e24b5, 0x5ef180dd, 0xb1a3363c, 0x5b25eb5e, - 0xb4775dbf, 0x555957db, 0xba0be13a, 0x508d3c58, 0xbfdf8ab9, - 0x670372c9, 0x8851c428, 0x62d7194a, 0x8d85afab, 0x6caba5cf, - 0x83f9132e, 0x697fce4c, 0x862d78ad, 0x7052dcc5, 0x9f006a24, - 0x7586b746, 0x9ad401a7, 0x7bfa0bc3, 0x94a8bd22, 0x7e2e6040, - 0x917cd6a1}, - {0x00000000, 0x87a6cb43, 0xd43c90c7, 0x539a5b84, 0x730827cf, - 0xf4aeec8c, 0xa734b708, 0x20927c4b, 0xe6104f9e, 0x61b684dd, - 0x322cdf59, 0xb58a141a, 0x95186851, 0x12bea312, 0x4124f896, - 0xc68233d5, 0x1751997d, 0x90f7523e, 0xc36d09ba, 0x44cbc2f9, - 0x6459beb2, 0xe3ff75f1, 0xb0652e75, 0x37c3e536, 0xf141d6e3, - 0x76e71da0, 0x257d4624, 0xa2db8d67, 0x8249f12c, 0x05ef3a6f, - 0x567561eb, 0xd1d3aaa8, 0x2ea332fa, 0xa905f9b9, 0xfa9fa23d, - 0x7d39697e, 0x5dab1535, 0xda0dde76, 0x899785f2, 0x0e314eb1, - 0xc8b37d64, 0x4f15b627, 0x1c8feda3, 0x9b2926e0, 0xbbbb5aab, - 0x3c1d91e8, 0x6f87ca6c, 0xe821012f, 0x39f2ab87, 0xbe5460c4, - 0xedce3b40, 0x6a68f003, 0x4afa8c48, 0xcd5c470b, 0x9ec61c8f, - 0x1960d7cc, 0xdfe2e419, 0x58442f5a, 0x0bde74de, 0x8c78bf9d, - 0xaceac3d6, 0x2b4c0895, 0x78d65311, 0xff709852, 0x5d4665f4, - 0xdae0aeb7, 0x897af533, 0x0edc3e70, 0x2e4e423b, 0xa9e88978, - 0xfa72d2fc, 0x7dd419bf, 0xbb562a6a, 0x3cf0e129, 0x6f6abaad, - 0xe8cc71ee, 0xc85e0da5, 0x4ff8c6e6, 0x1c629d62, 0x9bc45621, - 0x4a17fc89, 0xcdb137ca, 0x9e2b6c4e, 0x198da70d, 0x391fdb46, - 0xbeb91005, 0xed234b81, 0x6a8580c2, 0xac07b317, 0x2ba17854, - 0x783b23d0, 0xff9de893, 0xdf0f94d8, 0x58a95f9b, 0x0b33041f, - 0x8c95cf5c, 0x73e5570e, 0xf4439c4d, 0xa7d9c7c9, 0x207f0c8a, - 0x00ed70c1, 0x874bbb82, 0xd4d1e006, 0x53772b45, 0x95f51890, - 0x1253d3d3, 0x41c98857, 0xc66f4314, 0xe6fd3f5f, 0x615bf41c, - 0x32c1af98, 0xb56764db, 0x64b4ce73, 0xe3120530, 0xb0885eb4, - 0x372e95f7, 0x17bce9bc, 0x901a22ff, 0xc380797b, 0x4426b238, - 0x82a481ed, 0x05024aae, 0x5698112a, 0xd13eda69, 0xf1aca622, - 0x760a6d61, 0x259036e5, 0xa236fda6, 0xba8ccbe8, 0x3d2a00ab, - 0x6eb05b2f, 0xe916906c, 0xc984ec27, 0x4e222764, 0x1db87ce0, - 0x9a1eb7a3, 0x5c9c8476, 0xdb3a4f35, 0x88a014b1, 0x0f06dff2, - 0x2f94a3b9, 0xa83268fa, 0xfba8337e, 0x7c0ef83d, 0xaddd5295, - 0x2a7b99d6, 0x79e1c252, 0xfe470911, 0xded5755a, 0x5973be19, - 0x0ae9e59d, 0x8d4f2ede, 0x4bcd1d0b, 0xcc6bd648, 0x9ff18dcc, - 0x1857468f, 0x38c53ac4, 0xbf63f187, 0xecf9aa03, 0x6b5f6140, - 0x942ff912, 0x13893251, 0x401369d5, 0xc7b5a296, 0xe727dedd, - 0x6081159e, 0x331b4e1a, 0xb4bd8559, 0x723fb68c, 0xf5997dcf, - 0xa603264b, 0x21a5ed08, 0x01379143, 0x86915a00, 0xd50b0184, - 0x52adcac7, 0x837e606f, 0x04d8ab2c, 0x5742f0a8, 0xd0e43beb, - 0xf07647a0, 0x77d08ce3, 0x244ad767, 0xa3ec1c24, 0x656e2ff1, - 0xe2c8e4b2, 0xb152bf36, 0x36f47475, 0x1666083e, 0x91c0c37d, - 0xc25a98f9, 0x45fc53ba, 0xe7caae1c, 0x606c655f, 0x33f63edb, - 0xb450f598, 0x94c289d3, 0x13644290, 0x40fe1914, 0xc758d257, - 0x01dae182, 0x867c2ac1, 0xd5e67145, 0x5240ba06, 0x72d2c64d, - 0xf5740d0e, 0xa6ee568a, 0x21489dc9, 0xf09b3761, 0x773dfc22, - 0x24a7a7a6, 0xa3016ce5, 0x839310ae, 0x0435dbed, 0x57af8069, - 0xd0094b2a, 0x168b78ff, 0x912db3bc, 0xc2b7e838, 0x4511237b, - 0x65835f30, 0xe2259473, 0xb1bfcff7, 0x361904b4, 0xc9699ce6, - 0x4ecf57a5, 0x1d550c21, 0x9af3c762, 0xba61bb29, 0x3dc7706a, - 0x6e5d2bee, 0xe9fbe0ad, 0x2f79d378, 0xa8df183b, 0xfb4543bf, - 0x7ce388fc, 0x5c71f4b7, 0xdbd73ff4, 0x884d6470, 0x0febaf33, - 0xde38059b, 0x599eced8, 0x0a04955c, 0x8da25e1f, 0xad302254, - 0x2a96e917, 0x790cb293, 0xfeaa79d0, 0x38284a05, 0xbf8e8146, - 0xec14dac2, 0x6bb21181, 0x4b206dca, 0xcc86a689, 0x9f1cfd0d, - 0x18ba364e}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0x43cba68700000000, 0xc7903cd400000000, - 0x845b9a5300000000, 0xcf27087300000000, 0x8cecaef400000000, - 0x08b734a700000000, 0x4b7c922000000000, 0x9e4f10e600000000, - 0xdd84b66100000000, 0x59df2c3200000000, 0x1a148ab500000000, - 0x5168189500000000, 0x12a3be1200000000, 0x96f8244100000000, - 0xd53382c600000000, 0x7d99511700000000, 0x3e52f79000000000, - 0xba096dc300000000, 0xf9c2cb4400000000, 0xb2be596400000000, - 0xf175ffe300000000, 0x752e65b000000000, 0x36e5c33700000000, - 0xe3d641f100000000, 0xa01de77600000000, 0x24467d2500000000, - 0x678ddba200000000, 0x2cf1498200000000, 0x6f3aef0500000000, - 0xeb61755600000000, 0xa8aad3d100000000, 0xfa32a32e00000000, - 0xb9f905a900000000, 0x3da29ffa00000000, 0x7e69397d00000000, - 0x3515ab5d00000000, 0x76de0dda00000000, 0xf285978900000000, - 0xb14e310e00000000, 0x647db3c800000000, 0x27b6154f00000000, - 0xa3ed8f1c00000000, 0xe026299b00000000, 0xab5abbbb00000000, - 0xe8911d3c00000000, 0x6cca876f00000000, 0x2f0121e800000000, - 0x87abf23900000000, 0xc46054be00000000, 0x403bceed00000000, - 0x03f0686a00000000, 0x488cfa4a00000000, 0x0b475ccd00000000, - 0x8f1cc69e00000000, 0xccd7601900000000, 0x19e4e2df00000000, - 0x5a2f445800000000, 0xde74de0b00000000, 0x9dbf788c00000000, - 0xd6c3eaac00000000, 0x95084c2b00000000, 0x1153d67800000000, - 0x529870ff00000000, 0xf465465d00000000, 0xb7aee0da00000000, - 0x33f57a8900000000, 0x703edc0e00000000, 0x3b424e2e00000000, - 0x7889e8a900000000, 0xfcd272fa00000000, 0xbf19d47d00000000, - 0x6a2a56bb00000000, 0x29e1f03c00000000, 0xadba6a6f00000000, - 0xee71cce800000000, 0xa50d5ec800000000, 0xe6c6f84f00000000, - 0x629d621c00000000, 0x2156c49b00000000, 0x89fc174a00000000, - 0xca37b1cd00000000, 0x4e6c2b9e00000000, 0x0da78d1900000000, - 0x46db1f3900000000, 0x0510b9be00000000, 0x814b23ed00000000, - 0xc280856a00000000, 0x17b307ac00000000, 0x5478a12b00000000, - 0xd0233b7800000000, 0x93e89dff00000000, 0xd8940fdf00000000, - 0x9b5fa95800000000, 0x1f04330b00000000, 0x5ccf958c00000000, - 0x0e57e57300000000, 0x4d9c43f400000000, 0xc9c7d9a700000000, - 0x8a0c7f2000000000, 0xc170ed0000000000, 0x82bb4b8700000000, - 0x06e0d1d400000000, 0x452b775300000000, 0x9018f59500000000, - 0xd3d3531200000000, 0x5788c94100000000, 0x14436fc600000000, - 0x5f3ffde600000000, 0x1cf45b6100000000, 0x98afc13200000000, - 0xdb6467b500000000, 0x73ceb46400000000, 0x300512e300000000, - 0xb45e88b000000000, 0xf7952e3700000000, 0xbce9bc1700000000, - 0xff221a9000000000, 0x7b7980c300000000, 0x38b2264400000000, - 0xed81a48200000000, 0xae4a020500000000, 0x2a11985600000000, - 0x69da3ed100000000, 0x22a6acf100000000, 0x616d0a7600000000, - 0xe536902500000000, 0xa6fd36a200000000, 0xe8cb8cba00000000, - 0xab002a3d00000000, 0x2f5bb06e00000000, 0x6c9016e900000000, - 0x27ec84c900000000, 0x6427224e00000000, 0xe07cb81d00000000, - 0xa3b71e9a00000000, 0x76849c5c00000000, 0x354f3adb00000000, - 0xb114a08800000000, 0xf2df060f00000000, 0xb9a3942f00000000, - 0xfa6832a800000000, 0x7e33a8fb00000000, 0x3df80e7c00000000, - 0x9552ddad00000000, 0xd6997b2a00000000, 0x52c2e17900000000, - 0x110947fe00000000, 0x5a75d5de00000000, 0x19be735900000000, - 0x9de5e90a00000000, 0xde2e4f8d00000000, 0x0b1dcd4b00000000, - 0x48d66bcc00000000, 0xcc8df19f00000000, 0x8f46571800000000, - 0xc43ac53800000000, 0x87f163bf00000000, 0x03aaf9ec00000000, - 0x40615f6b00000000, 0x12f92f9400000000, 0x5132891300000000, - 0xd569134000000000, 0x96a2b5c700000000, 0xddde27e700000000, - 0x9e15816000000000, 0x1a4e1b3300000000, 0x5985bdb400000000, - 0x8cb63f7200000000, 0xcf7d99f500000000, 0x4b2603a600000000, - 0x08eda52100000000, 0x4391370100000000, 0x005a918600000000, - 0x84010bd500000000, 0xc7caad5200000000, 0x6f607e8300000000, - 0x2cabd80400000000, 0xa8f0425700000000, 0xeb3be4d000000000, - 0xa04776f000000000, 0xe38cd07700000000, 0x67d74a2400000000, - 0x241ceca300000000, 0xf12f6e6500000000, 0xb2e4c8e200000000, - 0x36bf52b100000000, 0x7574f43600000000, 0x3e08661600000000, - 0x7dc3c09100000000, 0xf9985ac200000000, 0xba53fc4500000000, - 0x1caecae700000000, 0x5f656c6000000000, 0xdb3ef63300000000, - 0x98f550b400000000, 0xd389c29400000000, 0x9042641300000000, - 0x1419fe4000000000, 0x57d258c700000000, 0x82e1da0100000000, - 0xc12a7c8600000000, 0x4571e6d500000000, 0x06ba405200000000, - 0x4dc6d27200000000, 0x0e0d74f500000000, 0x8a56eea600000000, - 0xc99d482100000000, 0x61379bf000000000, 0x22fc3d7700000000, - 0xa6a7a72400000000, 0xe56c01a300000000, 0xae10938300000000, - 0xeddb350400000000, 0x6980af5700000000, 0x2a4b09d000000000, - 0xff788b1600000000, 0xbcb32d9100000000, 0x38e8b7c200000000, - 0x7b23114500000000, 0x305f836500000000, 0x739425e200000000, - 0xf7cfbfb100000000, 0xb404193600000000, 0xe69c69c900000000, - 0xa557cf4e00000000, 0x210c551d00000000, 0x62c7f39a00000000, - 0x29bb61ba00000000, 0x6a70c73d00000000, 0xee2b5d6e00000000, - 0xade0fbe900000000, 0x78d3792f00000000, 0x3b18dfa800000000, - 0xbf4345fb00000000, 0xfc88e37c00000000, 0xb7f4715c00000000, - 0xf43fd7db00000000, 0x70644d8800000000, 0x33afeb0f00000000, - 0x9b0538de00000000, 0xd8ce9e5900000000, 0x5c95040a00000000, - 0x1f5ea28d00000000, 0x542230ad00000000, 0x17e9962a00000000, - 0x93b20c7900000000, 0xd079aafe00000000, 0x054a283800000000, - 0x46818ebf00000000, 0xc2da14ec00000000, 0x8111b26b00000000, - 0xca6d204b00000000, 0x89a686cc00000000, 0x0dfd1c9f00000000, - 0x4e36ba1800000000}, - {0x0000000000000000, 0xe1b652ef00000000, 0x836bd40500000000, - 0x62dd86ea00000000, 0x06d7a80b00000000, 0xe761fae400000000, - 0x85bc7c0e00000000, 0x640a2ee100000000, 0x0cae511700000000, - 0xed1803f800000000, 0x8fc5851200000000, 0x6e73d7fd00000000, - 0x0a79f91c00000000, 0xebcfabf300000000, 0x89122d1900000000, - 0x68a47ff600000000, 0x185ca32e00000000, 0xf9eaf1c100000000, - 0x9b37772b00000000, 0x7a8125c400000000, 0x1e8b0b2500000000, - 0xff3d59ca00000000, 0x9de0df2000000000, 0x7c568dcf00000000, - 0x14f2f23900000000, 0xf544a0d600000000, 0x9799263c00000000, - 0x762f74d300000000, 0x12255a3200000000, 0xf39308dd00000000, - 0x914e8e3700000000, 0x70f8dcd800000000, 0x30b8465d00000000, - 0xd10e14b200000000, 0xb3d3925800000000, 0x5265c0b700000000, - 0x366fee5600000000, 0xd7d9bcb900000000, 0xb5043a5300000000, - 0x54b268bc00000000, 0x3c16174a00000000, 0xdda045a500000000, - 0xbf7dc34f00000000, 0x5ecb91a000000000, 0x3ac1bf4100000000, - 0xdb77edae00000000, 0xb9aa6b4400000000, 0x581c39ab00000000, - 0x28e4e57300000000, 0xc952b79c00000000, 0xab8f317600000000, - 0x4a39639900000000, 0x2e334d7800000000, 0xcf851f9700000000, - 0xad58997d00000000, 0x4ceecb9200000000, 0x244ab46400000000, - 0xc5fce68b00000000, 0xa721606100000000, 0x4697328e00000000, - 0x229d1c6f00000000, 0xc32b4e8000000000, 0xa1f6c86a00000000, - 0x40409a8500000000, 0x60708dba00000000, 0x81c6df5500000000, - 0xe31b59bf00000000, 0x02ad0b5000000000, 0x66a725b100000000, - 0x8711775e00000000, 0xe5ccf1b400000000, 0x047aa35b00000000, - 0x6cdedcad00000000, 0x8d688e4200000000, 0xefb508a800000000, - 0x0e035a4700000000, 0x6a0974a600000000, 0x8bbf264900000000, - 0xe962a0a300000000, 0x08d4f24c00000000, 0x782c2e9400000000, - 0x999a7c7b00000000, 0xfb47fa9100000000, 0x1af1a87e00000000, - 0x7efb869f00000000, 0x9f4dd47000000000, 0xfd90529a00000000, - 0x1c26007500000000, 0x74827f8300000000, 0x95342d6c00000000, - 0xf7e9ab8600000000, 0x165ff96900000000, 0x7255d78800000000, - 0x93e3856700000000, 0xf13e038d00000000, 0x1088516200000000, - 0x50c8cbe700000000, 0xb17e990800000000, 0xd3a31fe200000000, - 0x32154d0d00000000, 0x561f63ec00000000, 0xb7a9310300000000, - 0xd574b7e900000000, 0x34c2e50600000000, 0x5c669af000000000, - 0xbdd0c81f00000000, 0xdf0d4ef500000000, 0x3ebb1c1a00000000, - 0x5ab132fb00000000, 0xbb07601400000000, 0xd9dae6fe00000000, - 0x386cb41100000000, 0x489468c900000000, 0xa9223a2600000000, - 0xcbffbccc00000000, 0x2a49ee2300000000, 0x4e43c0c200000000, - 0xaff5922d00000000, 0xcd2814c700000000, 0x2c9e462800000000, - 0x443a39de00000000, 0xa58c6b3100000000, 0xc751eddb00000000, - 0x26e7bf3400000000, 0x42ed91d500000000, 0xa35bc33a00000000, - 0xc18645d000000000, 0x2030173f00000000, 0x81e66bae00000000, - 0x6050394100000000, 0x028dbfab00000000, 0xe33bed4400000000, - 0x8731c3a500000000, 0x6687914a00000000, 0x045a17a000000000, - 0xe5ec454f00000000, 0x8d483ab900000000, 0x6cfe685600000000, - 0x0e23eebc00000000, 0xef95bc5300000000, 0x8b9f92b200000000, - 0x6a29c05d00000000, 0x08f446b700000000, 0xe942145800000000, - 0x99bac88000000000, 0x780c9a6f00000000, 0x1ad11c8500000000, - 0xfb674e6a00000000, 0x9f6d608b00000000, 0x7edb326400000000, - 0x1c06b48e00000000, 0xfdb0e66100000000, 0x9514999700000000, - 0x74a2cb7800000000, 0x167f4d9200000000, 0xf7c91f7d00000000, - 0x93c3319c00000000, 0x7275637300000000, 0x10a8e59900000000, - 0xf11eb77600000000, 0xb15e2df300000000, 0x50e87f1c00000000, - 0x3235f9f600000000, 0xd383ab1900000000, 0xb78985f800000000, - 0x563fd71700000000, 0x34e251fd00000000, 0xd554031200000000, - 0xbdf07ce400000000, 0x5c462e0b00000000, 0x3e9ba8e100000000, - 0xdf2dfa0e00000000, 0xbb27d4ef00000000, 0x5a91860000000000, - 0x384c00ea00000000, 0xd9fa520500000000, 0xa9028edd00000000, - 0x48b4dc3200000000, 0x2a695ad800000000, 0xcbdf083700000000, - 0xafd526d600000000, 0x4e63743900000000, 0x2cbef2d300000000, - 0xcd08a03c00000000, 0xa5acdfca00000000, 0x441a8d2500000000, - 0x26c70bcf00000000, 0xc771592000000000, 0xa37b77c100000000, - 0x42cd252e00000000, 0x2010a3c400000000, 0xc1a6f12b00000000, - 0xe196e61400000000, 0x0020b4fb00000000, 0x62fd321100000000, - 0x834b60fe00000000, 0xe7414e1f00000000, 0x06f71cf000000000, - 0x642a9a1a00000000, 0x859cc8f500000000, 0xed38b70300000000, - 0x0c8ee5ec00000000, 0x6e53630600000000, 0x8fe531e900000000, - 0xebef1f0800000000, 0x0a594de700000000, 0x6884cb0d00000000, - 0x893299e200000000, 0xf9ca453a00000000, 0x187c17d500000000, - 0x7aa1913f00000000, 0x9b17c3d000000000, 0xff1ded3100000000, - 0x1eabbfde00000000, 0x7c76393400000000, 0x9dc06bdb00000000, - 0xf564142d00000000, 0x14d246c200000000, 0x760fc02800000000, - 0x97b992c700000000, 0xf3b3bc2600000000, 0x1205eec900000000, - 0x70d8682300000000, 0x916e3acc00000000, 0xd12ea04900000000, - 0x3098f2a600000000, 0x5245744c00000000, 0xb3f326a300000000, - 0xd7f9084200000000, 0x364f5aad00000000, 0x5492dc4700000000, - 0xb5248ea800000000, 0xdd80f15e00000000, 0x3c36a3b100000000, - 0x5eeb255b00000000, 0xbf5d77b400000000, 0xdb57595500000000, - 0x3ae10bba00000000, 0x583c8d5000000000, 0xb98adfbf00000000, - 0xc972036700000000, 0x28c4518800000000, 0x4a19d76200000000, - 0xabaf858d00000000, 0xcfa5ab6c00000000, 0x2e13f98300000000, - 0x4cce7f6900000000, 0xad782d8600000000, 0xc5dc527000000000, - 0x246a009f00000000, 0x46b7867500000000, 0xa701d49a00000000, - 0xc30bfa7b00000000, 0x22bda89400000000, 0x40602e7e00000000, - 0xa1d67c9100000000}, - {0x0000000000000000, 0x5880e2d700000000, 0xf106b47400000000, - 0xa98656a300000000, 0xe20d68e900000000, 0xba8d8a3e00000000, - 0x130bdc9d00000000, 0x4b8b3e4a00000000, 0x851da10900000000, - 0xdd9d43de00000000, 0x741b157d00000000, 0x2c9bf7aa00000000, - 0x6710c9e000000000, 0x3f902b3700000000, 0x96167d9400000000, - 0xce969f4300000000, 0x0a3b421300000000, 0x52bba0c400000000, - 0xfb3df66700000000, 0xa3bd14b000000000, 0xe8362afa00000000, - 0xb0b6c82d00000000, 0x19309e8e00000000, 0x41b07c5900000000, - 0x8f26e31a00000000, 0xd7a601cd00000000, 0x7e20576e00000000, - 0x26a0b5b900000000, 0x6d2b8bf300000000, 0x35ab692400000000, - 0x9c2d3f8700000000, 0xc4addd5000000000, 0x1476842600000000, - 0x4cf666f100000000, 0xe570305200000000, 0xbdf0d28500000000, - 0xf67beccf00000000, 0xaefb0e1800000000, 0x077d58bb00000000, - 0x5ffdba6c00000000, 0x916b252f00000000, 0xc9ebc7f800000000, - 0x606d915b00000000, 0x38ed738c00000000, 0x73664dc600000000, - 0x2be6af1100000000, 0x8260f9b200000000, 0xdae01b6500000000, - 0x1e4dc63500000000, 0x46cd24e200000000, 0xef4b724100000000, - 0xb7cb909600000000, 0xfc40aedc00000000, 0xa4c04c0b00000000, - 0x0d461aa800000000, 0x55c6f87f00000000, 0x9b50673c00000000, - 0xc3d085eb00000000, 0x6a56d34800000000, 0x32d6319f00000000, - 0x795d0fd500000000, 0x21dded0200000000, 0x885bbba100000000, - 0xd0db597600000000, 0x28ec084d00000000, 0x706cea9a00000000, - 0xd9eabc3900000000, 0x816a5eee00000000, 0xcae160a400000000, - 0x9261827300000000, 0x3be7d4d000000000, 0x6367360700000000, - 0xadf1a94400000000, 0xf5714b9300000000, 0x5cf71d3000000000, - 0x0477ffe700000000, 0x4ffcc1ad00000000, 0x177c237a00000000, - 0xbefa75d900000000, 0xe67a970e00000000, 0x22d74a5e00000000, - 0x7a57a88900000000, 0xd3d1fe2a00000000, 0x8b511cfd00000000, - 0xc0da22b700000000, 0x985ac06000000000, 0x31dc96c300000000, - 0x695c741400000000, 0xa7caeb5700000000, 0xff4a098000000000, - 0x56cc5f2300000000, 0x0e4cbdf400000000, 0x45c783be00000000, - 0x1d47616900000000, 0xb4c137ca00000000, 0xec41d51d00000000, - 0x3c9a8c6b00000000, 0x641a6ebc00000000, 0xcd9c381f00000000, - 0x951cdac800000000, 0xde97e48200000000, 0x8617065500000000, - 0x2f9150f600000000, 0x7711b22100000000, 0xb9872d6200000000, - 0xe107cfb500000000, 0x4881991600000000, 0x10017bc100000000, - 0x5b8a458b00000000, 0x030aa75c00000000, 0xaa8cf1ff00000000, - 0xf20c132800000000, 0x36a1ce7800000000, 0x6e212caf00000000, - 0xc7a77a0c00000000, 0x9f2798db00000000, 0xd4aca69100000000, - 0x8c2c444600000000, 0x25aa12e500000000, 0x7d2af03200000000, - 0xb3bc6f7100000000, 0xeb3c8da600000000, 0x42badb0500000000, - 0x1a3a39d200000000, 0x51b1079800000000, 0x0931e54f00000000, - 0xa0b7b3ec00000000, 0xf837513b00000000, 0x50d8119a00000000, - 0x0858f34d00000000, 0xa1dea5ee00000000, 0xf95e473900000000, - 0xb2d5797300000000, 0xea559ba400000000, 0x43d3cd0700000000, - 0x1b532fd000000000, 0xd5c5b09300000000, 0x8d45524400000000, - 0x24c304e700000000, 0x7c43e63000000000, 0x37c8d87a00000000, - 0x6f483aad00000000, 0xc6ce6c0e00000000, 0x9e4e8ed900000000, - 0x5ae3538900000000, 0x0263b15e00000000, 0xabe5e7fd00000000, - 0xf365052a00000000, 0xb8ee3b6000000000, 0xe06ed9b700000000, - 0x49e88f1400000000, 0x11686dc300000000, 0xdffef28000000000, - 0x877e105700000000, 0x2ef846f400000000, 0x7678a42300000000, - 0x3df39a6900000000, 0x657378be00000000, 0xccf52e1d00000000, - 0x9475ccca00000000, 0x44ae95bc00000000, 0x1c2e776b00000000, - 0xb5a821c800000000, 0xed28c31f00000000, 0xa6a3fd5500000000, - 0xfe231f8200000000, 0x57a5492100000000, 0x0f25abf600000000, - 0xc1b334b500000000, 0x9933d66200000000, 0x30b580c100000000, - 0x6835621600000000, 0x23be5c5c00000000, 0x7b3ebe8b00000000, - 0xd2b8e82800000000, 0x8a380aff00000000, 0x4e95d7af00000000, - 0x1615357800000000, 0xbf9363db00000000, 0xe713810c00000000, - 0xac98bf4600000000, 0xf4185d9100000000, 0x5d9e0b3200000000, - 0x051ee9e500000000, 0xcb8876a600000000, 0x9308947100000000, - 0x3a8ec2d200000000, 0x620e200500000000, 0x29851e4f00000000, - 0x7105fc9800000000, 0xd883aa3b00000000, 0x800348ec00000000, - 0x783419d700000000, 0x20b4fb0000000000, 0x8932ada300000000, - 0xd1b24f7400000000, 0x9a39713e00000000, 0xc2b993e900000000, - 0x6b3fc54a00000000, 0x33bf279d00000000, 0xfd29b8de00000000, - 0xa5a95a0900000000, 0x0c2f0caa00000000, 0x54afee7d00000000, - 0x1f24d03700000000, 0x47a432e000000000, 0xee22644300000000, - 0xb6a2869400000000, 0x720f5bc400000000, 0x2a8fb91300000000, - 0x8309efb000000000, 0xdb890d6700000000, 0x9002332d00000000, - 0xc882d1fa00000000, 0x6104875900000000, 0x3984658e00000000, - 0xf712facd00000000, 0xaf92181a00000000, 0x06144eb900000000, - 0x5e94ac6e00000000, 0x151f922400000000, 0x4d9f70f300000000, - 0xe419265000000000, 0xbc99c48700000000, 0x6c429df100000000, - 0x34c27f2600000000, 0x9d44298500000000, 0xc5c4cb5200000000, - 0x8e4ff51800000000, 0xd6cf17cf00000000, 0x7f49416c00000000, - 0x27c9a3bb00000000, 0xe95f3cf800000000, 0xb1dfde2f00000000, - 0x1859888c00000000, 0x40d96a5b00000000, 0x0b52541100000000, - 0x53d2b6c600000000, 0xfa54e06500000000, 0xa2d402b200000000, - 0x6679dfe200000000, 0x3ef93d3500000000, 0x977f6b9600000000, - 0xcfff894100000000, 0x8474b70b00000000, 0xdcf455dc00000000, - 0x7572037f00000000, 0x2df2e1a800000000, 0xe3647eeb00000000, - 0xbbe49c3c00000000, 0x1262ca9f00000000, 0x4ae2284800000000, - 0x0169160200000000, 0x59e9f4d500000000, 0xf06fa27600000000, - 0xa8ef40a100000000}, - {0x0000000000000000, 0x463b676500000000, 0x8c76ceca00000000, - 0xca4da9af00000000, 0x59ebed4e00000000, 0x1fd08a2b00000000, - 0xd59d238400000000, 0x93a644e100000000, 0xb2d6db9d00000000, - 0xf4edbcf800000000, 0x3ea0155700000000, 0x789b723200000000, - 0xeb3d36d300000000, 0xad0651b600000000, 0x674bf81900000000, - 0x21709f7c00000000, 0x25abc6e000000000, 0x6390a18500000000, - 0xa9dd082a00000000, 0xefe66f4f00000000, 0x7c402bae00000000, - 0x3a7b4ccb00000000, 0xf036e56400000000, 0xb60d820100000000, - 0x977d1d7d00000000, 0xd1467a1800000000, 0x1b0bd3b700000000, - 0x5d30b4d200000000, 0xce96f03300000000, 0x88ad975600000000, - 0x42e03ef900000000, 0x04db599c00000000, 0x0b50fc1a00000000, - 0x4d6b9b7f00000000, 0x872632d000000000, 0xc11d55b500000000, - 0x52bb115400000000, 0x1480763100000000, 0xdecddf9e00000000, - 0x98f6b8fb00000000, 0xb986278700000000, 0xffbd40e200000000, - 0x35f0e94d00000000, 0x73cb8e2800000000, 0xe06dcac900000000, - 0xa656adac00000000, 0x6c1b040300000000, 0x2a20636600000000, - 0x2efb3afa00000000, 0x68c05d9f00000000, 0xa28df43000000000, - 0xe4b6935500000000, 0x7710d7b400000000, 0x312bb0d100000000, - 0xfb66197e00000000, 0xbd5d7e1b00000000, 0x9c2de16700000000, - 0xda16860200000000, 0x105b2fad00000000, 0x566048c800000000, - 0xc5c60c2900000000, 0x83fd6b4c00000000, 0x49b0c2e300000000, - 0x0f8ba58600000000, 0x16a0f83500000000, 0x509b9f5000000000, - 0x9ad636ff00000000, 0xdced519a00000000, 0x4f4b157b00000000, - 0x0970721e00000000, 0xc33ddbb100000000, 0x8506bcd400000000, - 0xa47623a800000000, 0xe24d44cd00000000, 0x2800ed6200000000, - 0x6e3b8a0700000000, 0xfd9dcee600000000, 0xbba6a98300000000, - 0x71eb002c00000000, 0x37d0674900000000, 0x330b3ed500000000, - 0x753059b000000000, 0xbf7df01f00000000, 0xf946977a00000000, - 0x6ae0d39b00000000, 0x2cdbb4fe00000000, 0xe6961d5100000000, - 0xa0ad7a3400000000, 0x81dde54800000000, 0xc7e6822d00000000, - 0x0dab2b8200000000, 0x4b904ce700000000, 0xd836080600000000, - 0x9e0d6f6300000000, 0x5440c6cc00000000, 0x127ba1a900000000, - 0x1df0042f00000000, 0x5bcb634a00000000, 0x9186cae500000000, - 0xd7bdad8000000000, 0x441be96100000000, 0x02208e0400000000, - 0xc86d27ab00000000, 0x8e5640ce00000000, 0xaf26dfb200000000, - 0xe91db8d700000000, 0x2350117800000000, 0x656b761d00000000, - 0xf6cd32fc00000000, 0xb0f6559900000000, 0x7abbfc3600000000, - 0x3c809b5300000000, 0x385bc2cf00000000, 0x7e60a5aa00000000, - 0xb42d0c0500000000, 0xf2166b6000000000, 0x61b02f8100000000, - 0x278b48e400000000, 0xedc6e14b00000000, 0xabfd862e00000000, - 0x8a8d195200000000, 0xccb67e3700000000, 0x06fbd79800000000, - 0x40c0b0fd00000000, 0xd366f41c00000000, 0x955d937900000000, - 0x5f103ad600000000, 0x192b5db300000000, 0x2c40f16b00000000, - 0x6a7b960e00000000, 0xa0363fa100000000, 0xe60d58c400000000, - 0x75ab1c2500000000, 0x33907b4000000000, 0xf9ddd2ef00000000, - 0xbfe6b58a00000000, 0x9e962af600000000, 0xd8ad4d9300000000, - 0x12e0e43c00000000, 0x54db835900000000, 0xc77dc7b800000000, - 0x8146a0dd00000000, 0x4b0b097200000000, 0x0d306e1700000000, - 0x09eb378b00000000, 0x4fd050ee00000000, 0x859df94100000000, - 0xc3a69e2400000000, 0x5000dac500000000, 0x163bbda000000000, - 0xdc76140f00000000, 0x9a4d736a00000000, 0xbb3dec1600000000, - 0xfd068b7300000000, 0x374b22dc00000000, 0x717045b900000000, - 0xe2d6015800000000, 0xa4ed663d00000000, 0x6ea0cf9200000000, - 0x289ba8f700000000, 0x27100d7100000000, 0x612b6a1400000000, - 0xab66c3bb00000000, 0xed5da4de00000000, 0x7efbe03f00000000, - 0x38c0875a00000000, 0xf28d2ef500000000, 0xb4b6499000000000, - 0x95c6d6ec00000000, 0xd3fdb18900000000, 0x19b0182600000000, - 0x5f8b7f4300000000, 0xcc2d3ba200000000, 0x8a165cc700000000, - 0x405bf56800000000, 0x0660920d00000000, 0x02bbcb9100000000, - 0x4480acf400000000, 0x8ecd055b00000000, 0xc8f6623e00000000, - 0x5b5026df00000000, 0x1d6b41ba00000000, 0xd726e81500000000, - 0x911d8f7000000000, 0xb06d100c00000000, 0xf656776900000000, - 0x3c1bdec600000000, 0x7a20b9a300000000, 0xe986fd4200000000, - 0xafbd9a2700000000, 0x65f0338800000000, 0x23cb54ed00000000, - 0x3ae0095e00000000, 0x7cdb6e3b00000000, 0xb696c79400000000, - 0xf0ada0f100000000, 0x630be41000000000, 0x2530837500000000, - 0xef7d2ada00000000, 0xa9464dbf00000000, 0x8836d2c300000000, - 0xce0db5a600000000, 0x04401c0900000000, 0x427b7b6c00000000, - 0xd1dd3f8d00000000, 0x97e658e800000000, 0x5dabf14700000000, - 0x1b90962200000000, 0x1f4bcfbe00000000, 0x5970a8db00000000, - 0x933d017400000000, 0xd506661100000000, 0x46a022f000000000, - 0x009b459500000000, 0xcad6ec3a00000000, 0x8ced8b5f00000000, - 0xad9d142300000000, 0xeba6734600000000, 0x21ebdae900000000, - 0x67d0bd8c00000000, 0xf476f96d00000000, 0xb24d9e0800000000, - 0x780037a700000000, 0x3e3b50c200000000, 0x31b0f54400000000, - 0x778b922100000000, 0xbdc63b8e00000000, 0xfbfd5ceb00000000, - 0x685b180a00000000, 0x2e607f6f00000000, 0xe42dd6c000000000, - 0xa216b1a500000000, 0x83662ed900000000, 0xc55d49bc00000000, - 0x0f10e01300000000, 0x492b877600000000, 0xda8dc39700000000, - 0x9cb6a4f200000000, 0x56fb0d5d00000000, 0x10c06a3800000000, - 0x141b33a400000000, 0x522054c100000000, 0x986dfd6e00000000, - 0xde569a0b00000000, 0x4df0deea00000000, 0x0bcbb98f00000000, - 0xc186102000000000, 0x87bd774500000000, 0xa6cde83900000000, - 0xe0f68f5c00000000, 0x2abb26f300000000, 0x6c80419600000000, - 0xff26057700000000, 0xb91d621200000000, 0x7350cbbd00000000, - 0x356bacd800000000}, - {0x0000000000000000, 0x9e83da9f00000000, 0x7d01c4e400000000, - 0xe3821e7b00000000, 0xbb04f91200000000, 0x2587238d00000000, - 0xc6053df600000000, 0x5886e76900000000, 0x7609f22500000000, - 0xe88a28ba00000000, 0x0b0836c100000000, 0x958bec5e00000000, - 0xcd0d0b3700000000, 0x538ed1a800000000, 0xb00ccfd300000000, - 0x2e8f154c00000000, 0xec12e44b00000000, 0x72913ed400000000, - 0x911320af00000000, 0x0f90fa3000000000, 0x57161d5900000000, - 0xc995c7c600000000, 0x2a17d9bd00000000, 0xb494032200000000, - 0x9a1b166e00000000, 0x0498ccf100000000, 0xe71ad28a00000000, - 0x7999081500000000, 0x211fef7c00000000, 0xbf9c35e300000000, - 0x5c1e2b9800000000, 0xc29df10700000000, 0xd825c89700000000, - 0x46a6120800000000, 0xa5240c7300000000, 0x3ba7d6ec00000000, - 0x6321318500000000, 0xfda2eb1a00000000, 0x1e20f56100000000, - 0x80a32ffe00000000, 0xae2c3ab200000000, 0x30afe02d00000000, - 0xd32dfe5600000000, 0x4dae24c900000000, 0x1528c3a000000000, - 0x8bab193f00000000, 0x6829074400000000, 0xf6aadddb00000000, - 0x34372cdc00000000, 0xaab4f64300000000, 0x4936e83800000000, - 0xd7b532a700000000, 0x8f33d5ce00000000, 0x11b00f5100000000, - 0xf232112a00000000, 0x6cb1cbb500000000, 0x423edef900000000, - 0xdcbd046600000000, 0x3f3f1a1d00000000, 0xa1bcc08200000000, - 0xf93a27eb00000000, 0x67b9fd7400000000, 0x843be30f00000000, - 0x1ab8399000000000, 0xf14de1f400000000, 0x6fce3b6b00000000, - 0x8c4c251000000000, 0x12cfff8f00000000, 0x4a4918e600000000, - 0xd4cac27900000000, 0x3748dc0200000000, 0xa9cb069d00000000, - 0x874413d100000000, 0x19c7c94e00000000, 0xfa45d73500000000, - 0x64c60daa00000000, 0x3c40eac300000000, 0xa2c3305c00000000, - 0x41412e2700000000, 0xdfc2f4b800000000, 0x1d5f05bf00000000, - 0x83dcdf2000000000, 0x605ec15b00000000, 0xfedd1bc400000000, - 0xa65bfcad00000000, 0x38d8263200000000, 0xdb5a384900000000, - 0x45d9e2d600000000, 0x6b56f79a00000000, 0xf5d52d0500000000, - 0x1657337e00000000, 0x88d4e9e100000000, 0xd0520e8800000000, - 0x4ed1d41700000000, 0xad53ca6c00000000, 0x33d010f300000000, - 0x2968296300000000, 0xb7ebf3fc00000000, 0x5469ed8700000000, - 0xcaea371800000000, 0x926cd07100000000, 0x0cef0aee00000000, - 0xef6d149500000000, 0x71eece0a00000000, 0x5f61db4600000000, - 0xc1e201d900000000, 0x22601fa200000000, 0xbce3c53d00000000, - 0xe465225400000000, 0x7ae6f8cb00000000, 0x9964e6b000000000, - 0x07e73c2f00000000, 0xc57acd2800000000, 0x5bf917b700000000, - 0xb87b09cc00000000, 0x26f8d35300000000, 0x7e7e343a00000000, - 0xe0fdeea500000000, 0x037ff0de00000000, 0x9dfc2a4100000000, - 0xb3733f0d00000000, 0x2df0e59200000000, 0xce72fbe900000000, - 0x50f1217600000000, 0x0877c61f00000000, 0x96f41c8000000000, - 0x757602fb00000000, 0xebf5d86400000000, 0xa39db33200000000, - 0x3d1e69ad00000000, 0xde9c77d600000000, 0x401fad4900000000, - 0x18994a2000000000, 0x861a90bf00000000, 0x65988ec400000000, - 0xfb1b545b00000000, 0xd594411700000000, 0x4b179b8800000000, - 0xa89585f300000000, 0x36165f6c00000000, 0x6e90b80500000000, - 0xf013629a00000000, 0x13917ce100000000, 0x8d12a67e00000000, - 0x4f8f577900000000, 0xd10c8de600000000, 0x328e939d00000000, - 0xac0d490200000000, 0xf48bae6b00000000, 0x6a0874f400000000, - 0x898a6a8f00000000, 0x1709b01000000000, 0x3986a55c00000000, - 0xa7057fc300000000, 0x448761b800000000, 0xda04bb2700000000, - 0x82825c4e00000000, 0x1c0186d100000000, 0xff8398aa00000000, - 0x6100423500000000, 0x7bb87ba500000000, 0xe53ba13a00000000, - 0x06b9bf4100000000, 0x983a65de00000000, 0xc0bc82b700000000, - 0x5e3f582800000000, 0xbdbd465300000000, 0x233e9ccc00000000, - 0x0db1898000000000, 0x9332531f00000000, 0x70b04d6400000000, - 0xee3397fb00000000, 0xb6b5709200000000, 0x2836aa0d00000000, - 0xcbb4b47600000000, 0x55376ee900000000, 0x97aa9fee00000000, - 0x0929457100000000, 0xeaab5b0a00000000, 0x7428819500000000, - 0x2cae66fc00000000, 0xb22dbc6300000000, 0x51afa21800000000, - 0xcf2c788700000000, 0xe1a36dcb00000000, 0x7f20b75400000000, - 0x9ca2a92f00000000, 0x022173b000000000, 0x5aa794d900000000, - 0xc4244e4600000000, 0x27a6503d00000000, 0xb9258aa200000000, - 0x52d052c600000000, 0xcc53885900000000, 0x2fd1962200000000, - 0xb1524cbd00000000, 0xe9d4abd400000000, 0x7757714b00000000, - 0x94d56f3000000000, 0x0a56b5af00000000, 0x24d9a0e300000000, - 0xba5a7a7c00000000, 0x59d8640700000000, 0xc75bbe9800000000, - 0x9fdd59f100000000, 0x015e836e00000000, 0xe2dc9d1500000000, - 0x7c5f478a00000000, 0xbec2b68d00000000, 0x20416c1200000000, - 0xc3c3726900000000, 0x5d40a8f600000000, 0x05c64f9f00000000, - 0x9b45950000000000, 0x78c78b7b00000000, 0xe64451e400000000, - 0xc8cb44a800000000, 0x56489e3700000000, 0xb5ca804c00000000, - 0x2b495ad300000000, 0x73cfbdba00000000, 0xed4c672500000000, - 0x0ece795e00000000, 0x904da3c100000000, 0x8af59a5100000000, - 0x147640ce00000000, 0xf7f45eb500000000, 0x6977842a00000000, - 0x31f1634300000000, 0xaf72b9dc00000000, 0x4cf0a7a700000000, - 0xd2737d3800000000, 0xfcfc687400000000, 0x627fb2eb00000000, - 0x81fdac9000000000, 0x1f7e760f00000000, 0x47f8916600000000, - 0xd97b4bf900000000, 0x3af9558200000000, 0xa47a8f1d00000000, - 0x66e77e1a00000000, 0xf864a48500000000, 0x1be6bafe00000000, - 0x8565606100000000, 0xdde3870800000000, 0x43605d9700000000, - 0xa0e243ec00000000, 0x3e61997300000000, 0x10ee8c3f00000000, - 0x8e6d56a000000000, 0x6def48db00000000, 0xf36c924400000000, - 0xabea752d00000000, 0x3569afb200000000, 0xd6ebb1c900000000, - 0x48686b5600000000}, - {0x0000000000000000, 0xc064281700000000, 0x80c9502e00000000, - 0x40ad783900000000, 0x0093a15c00000000, 0xc0f7894b00000000, - 0x805af17200000000, 0x403ed96500000000, 0x002643b900000000, - 0xc0426bae00000000, 0x80ef139700000000, 0x408b3b8000000000, - 0x00b5e2e500000000, 0xc0d1caf200000000, 0x807cb2cb00000000, - 0x40189adc00000000, 0x414af7a900000000, 0x812edfbe00000000, - 0xc183a78700000000, 0x01e78f9000000000, 0x41d956f500000000, - 0x81bd7ee200000000, 0xc11006db00000000, 0x01742ecc00000000, - 0x416cb41000000000, 0x81089c0700000000, 0xc1a5e43e00000000, - 0x01c1cc2900000000, 0x41ff154c00000000, 0x819b3d5b00000000, - 0xc136456200000000, 0x01526d7500000000, 0xc3929f8800000000, - 0x03f6b79f00000000, 0x435bcfa600000000, 0x833fe7b100000000, - 0xc3013ed400000000, 0x036516c300000000, 0x43c86efa00000000, - 0x83ac46ed00000000, 0xc3b4dc3100000000, 0x03d0f42600000000, - 0x437d8c1f00000000, 0x8319a40800000000, 0xc3277d6d00000000, - 0x0343557a00000000, 0x43ee2d4300000000, 0x838a055400000000, - 0x82d8682100000000, 0x42bc403600000000, 0x0211380f00000000, - 0xc275101800000000, 0x824bc97d00000000, 0x422fe16a00000000, - 0x0282995300000000, 0xc2e6b14400000000, 0x82fe2b9800000000, - 0x429a038f00000000, 0x02377bb600000000, 0xc25353a100000000, - 0x826d8ac400000000, 0x4209a2d300000000, 0x02a4daea00000000, - 0xc2c0f2fd00000000, 0xc7234eca00000000, 0x074766dd00000000, - 0x47ea1ee400000000, 0x878e36f300000000, 0xc7b0ef9600000000, - 0x07d4c78100000000, 0x4779bfb800000000, 0x871d97af00000000, - 0xc7050d7300000000, 0x0761256400000000, 0x47cc5d5d00000000, - 0x87a8754a00000000, 0xc796ac2f00000000, 0x07f2843800000000, - 0x475ffc0100000000, 0x873bd41600000000, 0x8669b96300000000, - 0x460d917400000000, 0x06a0e94d00000000, 0xc6c4c15a00000000, - 0x86fa183f00000000, 0x469e302800000000, 0x0633481100000000, - 0xc657600600000000, 0x864ffada00000000, 0x462bd2cd00000000, - 0x0686aaf400000000, 0xc6e282e300000000, 0x86dc5b8600000000, - 0x46b8739100000000, 0x06150ba800000000, 0xc67123bf00000000, - 0x04b1d14200000000, 0xc4d5f95500000000, 0x8478816c00000000, - 0x441ca97b00000000, 0x0422701e00000000, 0xc446580900000000, - 0x84eb203000000000, 0x448f082700000000, 0x049792fb00000000, - 0xc4f3baec00000000, 0x845ec2d500000000, 0x443aeac200000000, - 0x040433a700000000, 0xc4601bb000000000, 0x84cd638900000000, - 0x44a94b9e00000000, 0x45fb26eb00000000, 0x859f0efc00000000, - 0xc53276c500000000, 0x05565ed200000000, 0x456887b700000000, - 0x850cafa000000000, 0xc5a1d79900000000, 0x05c5ff8e00000000, - 0x45dd655200000000, 0x85b94d4500000000, 0xc514357c00000000, - 0x05701d6b00000000, 0x454ec40e00000000, 0x852aec1900000000, - 0xc587942000000000, 0x05e3bc3700000000, 0xcf41ed4f00000000, - 0x0f25c55800000000, 0x4f88bd6100000000, 0x8fec957600000000, - 0xcfd24c1300000000, 0x0fb6640400000000, 0x4f1b1c3d00000000, - 0x8f7f342a00000000, 0xcf67aef600000000, 0x0f0386e100000000, - 0x4faefed800000000, 0x8fcad6cf00000000, 0xcff40faa00000000, - 0x0f9027bd00000000, 0x4f3d5f8400000000, 0x8f59779300000000, - 0x8e0b1ae600000000, 0x4e6f32f100000000, 0x0ec24ac800000000, - 0xcea662df00000000, 0x8e98bbba00000000, 0x4efc93ad00000000, - 0x0e51eb9400000000, 0xce35c38300000000, 0x8e2d595f00000000, - 0x4e49714800000000, 0x0ee4097100000000, 0xce80216600000000, - 0x8ebef80300000000, 0x4edad01400000000, 0x0e77a82d00000000, - 0xce13803a00000000, 0x0cd372c700000000, 0xccb75ad000000000, - 0x8c1a22e900000000, 0x4c7e0afe00000000, 0x0c40d39b00000000, - 0xcc24fb8c00000000, 0x8c8983b500000000, 0x4cedaba200000000, - 0x0cf5317e00000000, 0xcc91196900000000, 0x8c3c615000000000, - 0x4c58494700000000, 0x0c66902200000000, 0xcc02b83500000000, - 0x8cafc00c00000000, 0x4ccbe81b00000000, 0x4d99856e00000000, - 0x8dfdad7900000000, 0xcd50d54000000000, 0x0d34fd5700000000, - 0x4d0a243200000000, 0x8d6e0c2500000000, 0xcdc3741c00000000, - 0x0da75c0b00000000, 0x4dbfc6d700000000, 0x8ddbeec000000000, - 0xcd7696f900000000, 0x0d12beee00000000, 0x4d2c678b00000000, - 0x8d484f9c00000000, 0xcde537a500000000, 0x0d811fb200000000, - 0x0862a38500000000, 0xc8068b9200000000, 0x88abf3ab00000000, - 0x48cfdbbc00000000, 0x08f102d900000000, 0xc8952ace00000000, - 0x883852f700000000, 0x485c7ae000000000, 0x0844e03c00000000, - 0xc820c82b00000000, 0x888db01200000000, 0x48e9980500000000, - 0x08d7416000000000, 0xc8b3697700000000, 0x881e114e00000000, - 0x487a395900000000, 0x4928542c00000000, 0x894c7c3b00000000, - 0xc9e1040200000000, 0x09852c1500000000, 0x49bbf57000000000, - 0x89dfdd6700000000, 0xc972a55e00000000, 0x09168d4900000000, - 0x490e179500000000, 0x896a3f8200000000, 0xc9c747bb00000000, - 0x09a36fac00000000, 0x499db6c900000000, 0x89f99ede00000000, - 0xc954e6e700000000, 0x0930cef000000000, 0xcbf03c0d00000000, - 0x0b94141a00000000, 0x4b396c2300000000, 0x8b5d443400000000, - 0xcb639d5100000000, 0x0b07b54600000000, 0x4baacd7f00000000, - 0x8bcee56800000000, 0xcbd67fb400000000, 0x0bb257a300000000, - 0x4b1f2f9a00000000, 0x8b7b078d00000000, 0xcb45dee800000000, - 0x0b21f6ff00000000, 0x4b8c8ec600000000, 0x8be8a6d100000000, - 0x8abacba400000000, 0x4adee3b300000000, 0x0a739b8a00000000, - 0xca17b39d00000000, 0x8a296af800000000, 0x4a4d42ef00000000, - 0x0ae03ad600000000, 0xca8412c100000000, 0x8a9c881d00000000, - 0x4af8a00a00000000, 0x0a55d83300000000, 0xca31f02400000000, - 0x8a0f294100000000, 0x4a6b015600000000, 0x0ac6796f00000000, - 0xcaa2517800000000}, - {0x0000000000000000, 0xd4ea739b00000000, 0xe9d396ed00000000, - 0x3d39e57600000000, 0x93a15c0000000000, 0x474b2f9b00000000, - 0x7a72caed00000000, 0xae98b97600000000, 0x2643b90000000000, - 0xf2a9ca9b00000000, 0xcf902fed00000000, 0x1b7a5c7600000000, - 0xb5e2e50000000000, 0x6108969b00000000, 0x5c3173ed00000000, - 0x88db007600000000, 0x4c86720100000000, 0x986c019a00000000, - 0xa555e4ec00000000, 0x71bf977700000000, 0xdf272e0100000000, - 0x0bcd5d9a00000000, 0x36f4b8ec00000000, 0xe21ecb7700000000, - 0x6ac5cb0100000000, 0xbe2fb89a00000000, 0x83165dec00000000, - 0x57fc2e7700000000, 0xf964970100000000, 0x2d8ee49a00000000, - 0x10b701ec00000000, 0xc45d727700000000, 0x980ce50200000000, - 0x4ce6969900000000, 0x71df73ef00000000, 0xa535007400000000, - 0x0badb90200000000, 0xdf47ca9900000000, 0xe27e2fef00000000, - 0x36945c7400000000, 0xbe4f5c0200000000, 0x6aa52f9900000000, - 0x579ccaef00000000, 0x8376b97400000000, 0x2dee000200000000, - 0xf904739900000000, 0xc43d96ef00000000, 0x10d7e57400000000, - 0xd48a970300000000, 0x0060e49800000000, 0x3d5901ee00000000, - 0xe9b3727500000000, 0x472bcb0300000000, 0x93c1b89800000000, - 0xaef85dee00000000, 0x7a122e7500000000, 0xf2c92e0300000000, - 0x26235d9800000000, 0x1b1ab8ee00000000, 0xcff0cb7500000000, - 0x6168720300000000, 0xb582019800000000, 0x88bbe4ee00000000, - 0x5c51977500000000, 0x3019ca0500000000, 0xe4f3b99e00000000, - 0xd9ca5ce800000000, 0x0d202f7300000000, 0xa3b8960500000000, - 0x7752e59e00000000, 0x4a6b00e800000000, 0x9e81737300000000, - 0x165a730500000000, 0xc2b0009e00000000, 0xff89e5e800000000, - 0x2b63967300000000, 0x85fb2f0500000000, 0x51115c9e00000000, - 0x6c28b9e800000000, 0xb8c2ca7300000000, 0x7c9fb80400000000, - 0xa875cb9f00000000, 0x954c2ee900000000, 0x41a65d7200000000, - 0xef3ee40400000000, 0x3bd4979f00000000, 0x06ed72e900000000, - 0xd207017200000000, 0x5adc010400000000, 0x8e36729f00000000, - 0xb30f97e900000000, 0x67e5e47200000000, 0xc97d5d0400000000, - 0x1d972e9f00000000, 0x20aecbe900000000, 0xf444b87200000000, - 0xa8152f0700000000, 0x7cff5c9c00000000, 0x41c6b9ea00000000, - 0x952cca7100000000, 0x3bb4730700000000, 0xef5e009c00000000, - 0xd267e5ea00000000, 0x068d967100000000, 0x8e56960700000000, - 0x5abce59c00000000, 0x678500ea00000000, 0xb36f737100000000, - 0x1df7ca0700000000, 0xc91db99c00000000, 0xf4245cea00000000, - 0x20ce2f7100000000, 0xe4935d0600000000, 0x30792e9d00000000, - 0x0d40cbeb00000000, 0xd9aab87000000000, 0x7732010600000000, - 0xa3d8729d00000000, 0x9ee197eb00000000, 0x4a0be47000000000, - 0xc2d0e40600000000, 0x163a979d00000000, 0x2b0372eb00000000, - 0xffe9017000000000, 0x5171b80600000000, 0x859bcb9d00000000, - 0xb8a22eeb00000000, 0x6c485d7000000000, 0x6032940b00000000, - 0xb4d8e79000000000, 0x89e102e600000000, 0x5d0b717d00000000, - 0xf393c80b00000000, 0x2779bb9000000000, 0x1a405ee600000000, - 0xceaa2d7d00000000, 0x46712d0b00000000, 0x929b5e9000000000, - 0xafa2bbe600000000, 0x7b48c87d00000000, 0xd5d0710b00000000, - 0x013a029000000000, 0x3c03e7e600000000, 0xe8e9947d00000000, - 0x2cb4e60a00000000, 0xf85e959100000000, 0xc56770e700000000, - 0x118d037c00000000, 0xbf15ba0a00000000, 0x6bffc99100000000, - 0x56c62ce700000000, 0x822c5f7c00000000, 0x0af75f0a00000000, - 0xde1d2c9100000000, 0xe324c9e700000000, 0x37ceba7c00000000, - 0x9956030a00000000, 0x4dbc709100000000, 0x708595e700000000, - 0xa46fe67c00000000, 0xf83e710900000000, 0x2cd4029200000000, - 0x11ede7e400000000, 0xc507947f00000000, 0x6b9f2d0900000000, - 0xbf755e9200000000, 0x824cbbe400000000, 0x56a6c87f00000000, - 0xde7dc80900000000, 0x0a97bb9200000000, 0x37ae5ee400000000, - 0xe3442d7f00000000, 0x4ddc940900000000, 0x9936e79200000000, - 0xa40f02e400000000, 0x70e5717f00000000, 0xb4b8030800000000, - 0x6052709300000000, 0x5d6b95e500000000, 0x8981e67e00000000, - 0x27195f0800000000, 0xf3f32c9300000000, 0xcecac9e500000000, - 0x1a20ba7e00000000, 0x92fbba0800000000, 0x4611c99300000000, - 0x7b282ce500000000, 0xafc25f7e00000000, 0x015ae60800000000, - 0xd5b0959300000000, 0xe88970e500000000, 0x3c63037e00000000, - 0x502b5e0e00000000, 0x84c12d9500000000, 0xb9f8c8e300000000, - 0x6d12bb7800000000, 0xc38a020e00000000, 0x1760719500000000, - 0x2a5994e300000000, 0xfeb3e77800000000, 0x7668e70e00000000, - 0xa282949500000000, 0x9fbb71e300000000, 0x4b51027800000000, - 0xe5c9bb0e00000000, 0x3123c89500000000, 0x0c1a2de300000000, - 0xd8f05e7800000000, 0x1cad2c0f00000000, 0xc8475f9400000000, - 0xf57ebae200000000, 0x2194c97900000000, 0x8f0c700f00000000, - 0x5be6039400000000, 0x66dfe6e200000000, 0xb235957900000000, - 0x3aee950f00000000, 0xee04e69400000000, 0xd33d03e200000000, - 0x07d7707900000000, 0xa94fc90f00000000, 0x7da5ba9400000000, - 0x409c5fe200000000, 0x94762c7900000000, 0xc827bb0c00000000, - 0x1ccdc89700000000, 0x21f42de100000000, 0xf51e5e7a00000000, - 0x5b86e70c00000000, 0x8f6c949700000000, 0xb25571e100000000, - 0x66bf027a00000000, 0xee64020c00000000, 0x3a8e719700000000, - 0x07b794e100000000, 0xd35de77a00000000, 0x7dc55e0c00000000, - 0xa92f2d9700000000, 0x9416c8e100000000, 0x40fcbb7a00000000, - 0x84a1c90d00000000, 0x504bba9600000000, 0x6d725fe000000000, - 0xb9982c7b00000000, 0x1700950d00000000, 0xc3eae69600000000, - 0xfed303e000000000, 0x2a39707b00000000, 0xa2e2700d00000000, - 0x7608039600000000, 0x4b31e6e000000000, 0x9fdb957b00000000, - 0x31432c0d00000000, 0xe5a95f9600000000, 0xd890bae000000000, - 0x0c7ac97b00000000}, - {0x0000000000000000, 0x2765258100000000, 0x0fcc3bd900000000, - 0x28a91e5800000000, 0x5f9e066900000000, 0x78fb23e800000000, - 0x50523db000000000, 0x7737183100000000, 0xbe3c0dd200000000, - 0x9959285300000000, 0xb1f0360b00000000, 0x9695138a00000000, - 0xe1a20bbb00000000, 0xc6c72e3a00000000, 0xee6e306200000000, - 0xc90b15e300000000, 0x3d7f6b7f00000000, 0x1a1a4efe00000000, - 0x32b350a600000000, 0x15d6752700000000, 0x62e16d1600000000, - 0x4584489700000000, 0x6d2d56cf00000000, 0x4a48734e00000000, - 0x834366ad00000000, 0xa426432c00000000, 0x8c8f5d7400000000, - 0xabea78f500000000, 0xdcdd60c400000000, 0xfbb8454500000000, - 0xd3115b1d00000000, 0xf4747e9c00000000, 0x7afed6fe00000000, - 0x5d9bf37f00000000, 0x7532ed2700000000, 0x5257c8a600000000, - 0x2560d09700000000, 0x0205f51600000000, 0x2aaceb4e00000000, - 0x0dc9cecf00000000, 0xc4c2db2c00000000, 0xe3a7fead00000000, - 0xcb0ee0f500000000, 0xec6bc57400000000, 0x9b5cdd4500000000, - 0xbc39f8c400000000, 0x9490e69c00000000, 0xb3f5c31d00000000, - 0x4781bd8100000000, 0x60e4980000000000, 0x484d865800000000, - 0x6f28a3d900000000, 0x181fbbe800000000, 0x3f7a9e6900000000, - 0x17d3803100000000, 0x30b6a5b000000000, 0xf9bdb05300000000, - 0xded895d200000000, 0xf6718b8a00000000, 0xd114ae0b00000000, - 0xa623b63a00000000, 0x814693bb00000000, 0xa9ef8de300000000, - 0x8e8aa86200000000, 0xb5fadc2600000000, 0x929ff9a700000000, - 0xba36e7ff00000000, 0x9d53c27e00000000, 0xea64da4f00000000, - 0xcd01ffce00000000, 0xe5a8e19600000000, 0xc2cdc41700000000, - 0x0bc6d1f400000000, 0x2ca3f47500000000, 0x040aea2d00000000, - 0x236fcfac00000000, 0x5458d79d00000000, 0x733df21c00000000, - 0x5b94ec4400000000, 0x7cf1c9c500000000, 0x8885b75900000000, - 0xafe092d800000000, 0x87498c8000000000, 0xa02ca90100000000, - 0xd71bb13000000000, 0xf07e94b100000000, 0xd8d78ae900000000, - 0xffb2af6800000000, 0x36b9ba8b00000000, 0x11dc9f0a00000000, - 0x3975815200000000, 0x1e10a4d300000000, 0x6927bce200000000, - 0x4e42996300000000, 0x66eb873b00000000, 0x418ea2ba00000000, - 0xcf040ad800000000, 0xe8612f5900000000, 0xc0c8310100000000, - 0xe7ad148000000000, 0x909a0cb100000000, 0xb7ff293000000000, - 0x9f56376800000000, 0xb83312e900000000, 0x7138070a00000000, - 0x565d228b00000000, 0x7ef43cd300000000, 0x5991195200000000, - 0x2ea6016300000000, 0x09c324e200000000, 0x216a3aba00000000, - 0x060f1f3b00000000, 0xf27b61a700000000, 0xd51e442600000000, - 0xfdb75a7e00000000, 0xdad27fff00000000, 0xade567ce00000000, - 0x8a80424f00000000, 0xa2295c1700000000, 0x854c799600000000, - 0x4c476c7500000000, 0x6b2249f400000000, 0x438b57ac00000000, - 0x64ee722d00000000, 0x13d96a1c00000000, 0x34bc4f9d00000000, - 0x1c1551c500000000, 0x3b70744400000000, 0x6af5b94d00000000, - 0x4d909ccc00000000, 0x6539829400000000, 0x425ca71500000000, - 0x356bbf2400000000, 0x120e9aa500000000, 0x3aa784fd00000000, - 0x1dc2a17c00000000, 0xd4c9b49f00000000, 0xf3ac911e00000000, - 0xdb058f4600000000, 0xfc60aac700000000, 0x8b57b2f600000000, - 0xac32977700000000, 0x849b892f00000000, 0xa3feacae00000000, - 0x578ad23200000000, 0x70eff7b300000000, 0x5846e9eb00000000, - 0x7f23cc6a00000000, 0x0814d45b00000000, 0x2f71f1da00000000, - 0x07d8ef8200000000, 0x20bdca0300000000, 0xe9b6dfe000000000, - 0xced3fa6100000000, 0xe67ae43900000000, 0xc11fc1b800000000, - 0xb628d98900000000, 0x914dfc0800000000, 0xb9e4e25000000000, - 0x9e81c7d100000000, 0x100b6fb300000000, 0x376e4a3200000000, - 0x1fc7546a00000000, 0x38a271eb00000000, 0x4f9569da00000000, - 0x68f04c5b00000000, 0x4059520300000000, 0x673c778200000000, - 0xae37626100000000, 0x895247e000000000, 0xa1fb59b800000000, - 0x869e7c3900000000, 0xf1a9640800000000, 0xd6cc418900000000, - 0xfe655fd100000000, 0xd9007a5000000000, 0x2d7404cc00000000, - 0x0a11214d00000000, 0x22b83f1500000000, 0x05dd1a9400000000, - 0x72ea02a500000000, 0x558f272400000000, 0x7d26397c00000000, - 0x5a431cfd00000000, 0x9348091e00000000, 0xb42d2c9f00000000, - 0x9c8432c700000000, 0xbbe1174600000000, 0xccd60f7700000000, - 0xebb32af600000000, 0xc31a34ae00000000, 0xe47f112f00000000, - 0xdf0f656b00000000, 0xf86a40ea00000000, 0xd0c35eb200000000, - 0xf7a67b3300000000, 0x8091630200000000, 0xa7f4468300000000, - 0x8f5d58db00000000, 0xa8387d5a00000000, 0x613368b900000000, - 0x46564d3800000000, 0x6eff536000000000, 0x499a76e100000000, - 0x3ead6ed000000000, 0x19c84b5100000000, 0x3161550900000000, - 0x1604708800000000, 0xe2700e1400000000, 0xc5152b9500000000, - 0xedbc35cd00000000, 0xcad9104c00000000, 0xbdee087d00000000, - 0x9a8b2dfc00000000, 0xb22233a400000000, 0x9547162500000000, - 0x5c4c03c600000000, 0x7b29264700000000, 0x5380381f00000000, - 0x74e51d9e00000000, 0x03d205af00000000, 0x24b7202e00000000, - 0x0c1e3e7600000000, 0x2b7b1bf700000000, 0xa5f1b39500000000, - 0x8294961400000000, 0xaa3d884c00000000, 0x8d58adcd00000000, - 0xfa6fb5fc00000000, 0xdd0a907d00000000, 0xf5a38e2500000000, - 0xd2c6aba400000000, 0x1bcdbe4700000000, 0x3ca89bc600000000, - 0x1401859e00000000, 0x3364a01f00000000, 0x4453b82e00000000, - 0x63369daf00000000, 0x4b9f83f700000000, 0x6cfaa67600000000, - 0x988ed8ea00000000, 0xbfebfd6b00000000, 0x9742e33300000000, - 0xb027c6b200000000, 0xc710de8300000000, 0xe075fb0200000000, - 0xc8dce55a00000000, 0xefb9c0db00000000, 0x26b2d53800000000, - 0x01d7f0b900000000, 0x297eeee100000000, 0x0e1bcb6000000000, - 0x792cd35100000000, 0x5e49f6d000000000, 0x76e0e88800000000, - 0x5185cd0900000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0x9ba54c6f, 0xec3b9e9f, 0x779ed2f0, 0x03063b7f, - 0x98a37710, 0xef3da5e0, 0x7498e98f, 0x060c76fe, 0x9da93a91, - 0xea37e861, 0x7192a40e, 0x050a4d81, 0x9eaf01ee, 0xe931d31e, - 0x72949f71, 0x0c18edfc, 0x97bda193, 0xe0237363, 0x7b863f0c, - 0x0f1ed683, 0x94bb9aec, 0xe325481c, 0x78800473, 0x0a149b02, - 0x91b1d76d, 0xe62f059d, 0x7d8a49f2, 0x0912a07d, 0x92b7ec12, - 0xe5293ee2, 0x7e8c728d, 0x1831dbf8, 0x83949797, 0xf40a4567, - 0x6faf0908, 0x1b37e087, 0x8092ace8, 0xf70c7e18, 0x6ca93277, - 0x1e3dad06, 0x8598e169, 0xf2063399, 0x69a37ff6, 0x1d3b9679, - 0x869eda16, 0xf10008e6, 0x6aa54489, 0x14293604, 0x8f8c7a6b, - 0xf812a89b, 0x63b7e4f4, 0x172f0d7b, 0x8c8a4114, 0xfb1493e4, - 0x60b1df8b, 0x122540fa, 0x89800c95, 0xfe1ede65, 0x65bb920a, - 0x11237b85, 0x8a8637ea, 0xfd18e51a, 0x66bda975, 0x3063b7f0, - 0xabc6fb9f, 0xdc58296f, 0x47fd6500, 0x33658c8f, 0xa8c0c0e0, - 0xdf5e1210, 0x44fb5e7f, 0x366fc10e, 0xadca8d61, 0xda545f91, - 0x41f113fe, 0x3569fa71, 0xaeccb61e, 0xd95264ee, 0x42f72881, - 0x3c7b5a0c, 0xa7de1663, 0xd040c493, 0x4be588fc, 0x3f7d6173, - 0xa4d82d1c, 0xd346ffec, 0x48e3b383, 0x3a772cf2, 0xa1d2609d, - 0xd64cb26d, 0x4de9fe02, 0x3971178d, 0xa2d45be2, 0xd54a8912, - 0x4eefc57d, 0x28526c08, 0xb3f72067, 0xc469f297, 0x5fccbef8, - 0x2b545777, 0xb0f11b18, 0xc76fc9e8, 0x5cca8587, 0x2e5e1af6, - 0xb5fb5699, 0xc2658469, 0x59c0c806, 0x2d582189, 0xb6fd6de6, - 0xc163bf16, 0x5ac6f379, 0x244a81f4, 0xbfefcd9b, 0xc8711f6b, - 0x53d45304, 0x274cba8b, 0xbce9f6e4, 0xcb772414, 0x50d2687b, - 0x2246f70a, 0xb9e3bb65, 0xce7d6995, 0x55d825fa, 0x2140cc75, - 0xbae5801a, 0xcd7b52ea, 0x56de1e85, 0x60c76fe0, 0xfb62238f, - 0x8cfcf17f, 0x1759bd10, 0x63c1549f, 0xf86418f0, 0x8ffaca00, - 0x145f866f, 0x66cb191e, 0xfd6e5571, 0x8af08781, 0x1155cbee, - 0x65cd2261, 0xfe686e0e, 0x89f6bcfe, 0x1253f091, 0x6cdf821c, - 0xf77ace73, 0x80e41c83, 0x1b4150ec, 0x6fd9b963, 0xf47cf50c, - 0x83e227fc, 0x18476b93, 0x6ad3f4e2, 0xf176b88d, 0x86e86a7d, - 0x1d4d2612, 0x69d5cf9d, 0xf27083f2, 0x85ee5102, 0x1e4b1d6d, - 0x78f6b418, 0xe353f877, 0x94cd2a87, 0x0f6866e8, 0x7bf08f67, - 0xe055c308, 0x97cb11f8, 0x0c6e5d97, 0x7efac2e6, 0xe55f8e89, - 0x92c15c79, 0x09641016, 0x7dfcf999, 0xe659b5f6, 0x91c76706, - 0x0a622b69, 0x74ee59e4, 0xef4b158b, 0x98d5c77b, 0x03708b14, - 0x77e8629b, 0xec4d2ef4, 0x9bd3fc04, 0x0076b06b, 0x72e22f1a, - 0xe9476375, 0x9ed9b185, 0x057cfdea, 0x71e41465, 0xea41580a, - 0x9ddf8afa, 0x067ac695, 0x50a4d810, 0xcb01947f, 0xbc9f468f, - 0x273a0ae0, 0x53a2e36f, 0xc807af00, 0xbf997df0, 0x243c319f, - 0x56a8aeee, 0xcd0de281, 0xba933071, 0x21367c1e, 0x55ae9591, - 0xce0bd9fe, 0xb9950b0e, 0x22304761, 0x5cbc35ec, 0xc7197983, - 0xb087ab73, 0x2b22e71c, 0x5fba0e93, 0xc41f42fc, 0xb381900c, - 0x2824dc63, 0x5ab04312, 0xc1150f7d, 0xb68bdd8d, 0x2d2e91e2, - 0x59b6786d, 0xc2133402, 0xb58de6f2, 0x2e28aa9d, 0x489503e8, - 0xd3304f87, 0xa4ae9d77, 0x3f0bd118, 0x4b933897, 0xd03674f8, - 0xa7a8a608, 0x3c0dea67, 0x4e997516, 0xd53c3979, 0xa2a2eb89, - 0x3907a7e6, 0x4d9f4e69, 0xd63a0206, 0xa1a4d0f6, 0x3a019c99, - 0x448dee14, 0xdf28a27b, 0xa8b6708b, 0x33133ce4, 0x478bd56b, - 0xdc2e9904, 0xabb04bf4, 0x3015079b, 0x428198ea, 0xd924d485, - 0xaeba0675, 0x351f4a1a, 0x4187a395, 0xda22effa, 0xadbc3d0a, - 0x36197165}, - {0x00000000, 0xc18edfc0, 0x586cb9c1, 0x99e26601, 0xb0d97382, - 0x7157ac42, 0xe8b5ca43, 0x293b1583, 0xbac3e145, 0x7b4d3e85, - 0xe2af5884, 0x23218744, 0x0a1a92c7, 0xcb944d07, 0x52762b06, - 0x93f8f4c6, 0xaef6c4cb, 0x6f781b0b, 0xf69a7d0a, 0x3714a2ca, - 0x1e2fb749, 0xdfa16889, 0x46430e88, 0x87cdd148, 0x1435258e, - 0xd5bbfa4e, 0x4c599c4f, 0x8dd7438f, 0xa4ec560c, 0x656289cc, - 0xfc80efcd, 0x3d0e300d, 0x869c8fd7, 0x47125017, 0xdef03616, - 0x1f7ee9d6, 0x3645fc55, 0xf7cb2395, 0x6e294594, 0xafa79a54, - 0x3c5f6e92, 0xfdd1b152, 0x6433d753, 0xa5bd0893, 0x8c861d10, - 0x4d08c2d0, 0xd4eaa4d1, 0x15647b11, 0x286a4b1c, 0xe9e494dc, - 0x7006f2dd, 0xb1882d1d, 0x98b3389e, 0x593de75e, 0xc0df815f, - 0x01515e9f, 0x92a9aa59, 0x53277599, 0xcac51398, 0x0b4bcc58, - 0x2270d9db, 0xe3fe061b, 0x7a1c601a, 0xbb92bfda, 0xd64819ef, - 0x17c6c62f, 0x8e24a02e, 0x4faa7fee, 0x66916a6d, 0xa71fb5ad, - 0x3efdd3ac, 0xff730c6c, 0x6c8bf8aa, 0xad05276a, 0x34e7416b, - 0xf5699eab, 0xdc528b28, 0x1ddc54e8, 0x843e32e9, 0x45b0ed29, - 0x78bedd24, 0xb93002e4, 0x20d264e5, 0xe15cbb25, 0xc867aea6, - 0x09e97166, 0x900b1767, 0x5185c8a7, 0xc27d3c61, 0x03f3e3a1, - 0x9a1185a0, 0x5b9f5a60, 0x72a44fe3, 0xb32a9023, 0x2ac8f622, - 0xeb4629e2, 0x50d49638, 0x915a49f8, 0x08b82ff9, 0xc936f039, - 0xe00de5ba, 0x21833a7a, 0xb8615c7b, 0x79ef83bb, 0xea17777d, - 0x2b99a8bd, 0xb27bcebc, 0x73f5117c, 0x5ace04ff, 0x9b40db3f, - 0x02a2bd3e, 0xc32c62fe, 0xfe2252f3, 0x3fac8d33, 0xa64eeb32, - 0x67c034f2, 0x4efb2171, 0x8f75feb1, 0x169798b0, 0xd7194770, - 0x44e1b3b6, 0x856f6c76, 0x1c8d0a77, 0xdd03d5b7, 0xf438c034, - 0x35b61ff4, 0xac5479f5, 0x6ddaa635, 0x77e1359f, 0xb66fea5f, - 0x2f8d8c5e, 0xee03539e, 0xc738461d, 0x06b699dd, 0x9f54ffdc, - 0x5eda201c, 0xcd22d4da, 0x0cac0b1a, 0x954e6d1b, 0x54c0b2db, - 0x7dfba758, 0xbc757898, 0x25971e99, 0xe419c159, 0xd917f154, - 0x18992e94, 0x817b4895, 0x40f59755, 0x69ce82d6, 0xa8405d16, - 0x31a23b17, 0xf02ce4d7, 0x63d41011, 0xa25acfd1, 0x3bb8a9d0, - 0xfa367610, 0xd30d6393, 0x1283bc53, 0x8b61da52, 0x4aef0592, - 0xf17dba48, 0x30f36588, 0xa9110389, 0x689fdc49, 0x41a4c9ca, - 0x802a160a, 0x19c8700b, 0xd846afcb, 0x4bbe5b0d, 0x8a3084cd, - 0x13d2e2cc, 0xd25c3d0c, 0xfb67288f, 0x3ae9f74f, 0xa30b914e, - 0x62854e8e, 0x5f8b7e83, 0x9e05a143, 0x07e7c742, 0xc6691882, - 0xef520d01, 0x2edcd2c1, 0xb73eb4c0, 0x76b06b00, 0xe5489fc6, - 0x24c64006, 0xbd242607, 0x7caaf9c7, 0x5591ec44, 0x941f3384, - 0x0dfd5585, 0xcc738a45, 0xa1a92c70, 0x6027f3b0, 0xf9c595b1, - 0x384b4a71, 0x11705ff2, 0xd0fe8032, 0x491ce633, 0x889239f3, - 0x1b6acd35, 0xdae412f5, 0x430674f4, 0x8288ab34, 0xabb3beb7, - 0x6a3d6177, 0xf3df0776, 0x3251d8b6, 0x0f5fe8bb, 0xced1377b, - 0x5733517a, 0x96bd8eba, 0xbf869b39, 0x7e0844f9, 0xe7ea22f8, - 0x2664fd38, 0xb59c09fe, 0x7412d63e, 0xedf0b03f, 0x2c7e6fff, - 0x05457a7c, 0xc4cba5bc, 0x5d29c3bd, 0x9ca71c7d, 0x2735a3a7, - 0xe6bb7c67, 0x7f591a66, 0xbed7c5a6, 0x97ecd025, 0x56620fe5, - 0xcf8069e4, 0x0e0eb624, 0x9df642e2, 0x5c789d22, 0xc59afb23, - 0x041424e3, 0x2d2f3160, 0xeca1eea0, 0x754388a1, 0xb4cd5761, - 0x89c3676c, 0x484db8ac, 0xd1afdead, 0x1021016d, 0x391a14ee, - 0xf894cb2e, 0x6176ad2f, 0xa0f872ef, 0x33008629, 0xf28e59e9, - 0x6b6c3fe8, 0xaae2e028, 0x83d9f5ab, 0x42572a6b, 0xdbb54c6a, - 0x1a3b93aa}, - {0x00000000, 0xefc26b3e, 0x04f5d03d, 0xeb37bb03, 0x09eba07a, - 0xe629cb44, 0x0d1e7047, 0xe2dc1b79, 0x13d740f4, 0xfc152bca, - 0x172290c9, 0xf8e0fbf7, 0x1a3ce08e, 0xf5fe8bb0, 0x1ec930b3, - 0xf10b5b8d, 0x27ae81e8, 0xc86cead6, 0x235b51d5, 0xcc993aeb, - 0x2e452192, 0xc1874aac, 0x2ab0f1af, 0xc5729a91, 0x3479c11c, - 0xdbbbaa22, 0x308c1121, 0xdf4e7a1f, 0x3d926166, 0xd2500a58, - 0x3967b15b, 0xd6a5da65, 0x4f5d03d0, 0xa09f68ee, 0x4ba8d3ed, - 0xa46ab8d3, 0x46b6a3aa, 0xa974c894, 0x42437397, 0xad8118a9, - 0x5c8a4324, 0xb348281a, 0x587f9319, 0xb7bdf827, 0x5561e35e, - 0xbaa38860, 0x51943363, 0xbe56585d, 0x68f38238, 0x8731e906, - 0x6c065205, 0x83c4393b, 0x61182242, 0x8eda497c, 0x65edf27f, - 0x8a2f9941, 0x7b24c2cc, 0x94e6a9f2, 0x7fd112f1, 0x901379cf, - 0x72cf62b6, 0x9d0d0988, 0x763ab28b, 0x99f8d9b5, 0x9eba07a0, - 0x71786c9e, 0x9a4fd79d, 0x758dbca3, 0x9751a7da, 0x7893cce4, - 0x93a477e7, 0x7c661cd9, 0x8d6d4754, 0x62af2c6a, 0x89989769, - 0x665afc57, 0x8486e72e, 0x6b448c10, 0x80733713, 0x6fb15c2d, - 0xb9148648, 0x56d6ed76, 0xbde15675, 0x52233d4b, 0xb0ff2632, - 0x5f3d4d0c, 0xb40af60f, 0x5bc89d31, 0xaac3c6bc, 0x4501ad82, - 0xae361681, 0x41f47dbf, 0xa32866c6, 0x4cea0df8, 0xa7ddb6fb, - 0x481fddc5, 0xd1e70470, 0x3e256f4e, 0xd512d44d, 0x3ad0bf73, - 0xd80ca40a, 0x37cecf34, 0xdcf97437, 0x333b1f09, 0xc2304484, - 0x2df22fba, 0xc6c594b9, 0x2907ff87, 0xcbdbe4fe, 0x24198fc0, - 0xcf2e34c3, 0x20ec5ffd, 0xf6498598, 0x198beea6, 0xf2bc55a5, - 0x1d7e3e9b, 0xffa225e2, 0x10604edc, 0xfb57f5df, 0x14959ee1, - 0xe59ec56c, 0x0a5cae52, 0xe16b1551, 0x0ea97e6f, 0xec756516, - 0x03b70e28, 0xe880b52b, 0x0742de15, 0xe6050901, 0x09c7623f, - 0xe2f0d93c, 0x0d32b202, 0xefeea97b, 0x002cc245, 0xeb1b7946, - 0x04d91278, 0xf5d249f5, 0x1a1022cb, 0xf12799c8, 0x1ee5f2f6, - 0xfc39e98f, 0x13fb82b1, 0xf8cc39b2, 0x170e528c, 0xc1ab88e9, - 0x2e69e3d7, 0xc55e58d4, 0x2a9c33ea, 0xc8402893, 0x278243ad, - 0xccb5f8ae, 0x23779390, 0xd27cc81d, 0x3dbea323, 0xd6891820, - 0x394b731e, 0xdb976867, 0x34550359, 0xdf62b85a, 0x30a0d364, - 0xa9580ad1, 0x469a61ef, 0xadaddaec, 0x426fb1d2, 0xa0b3aaab, - 0x4f71c195, 0xa4467a96, 0x4b8411a8, 0xba8f4a25, 0x554d211b, - 0xbe7a9a18, 0x51b8f126, 0xb364ea5f, 0x5ca68161, 0xb7913a62, - 0x5853515c, 0x8ef68b39, 0x6134e007, 0x8a035b04, 0x65c1303a, - 0x871d2b43, 0x68df407d, 0x83e8fb7e, 0x6c2a9040, 0x9d21cbcd, - 0x72e3a0f3, 0x99d41bf0, 0x761670ce, 0x94ca6bb7, 0x7b080089, - 0x903fbb8a, 0x7ffdd0b4, 0x78bf0ea1, 0x977d659f, 0x7c4ade9c, - 0x9388b5a2, 0x7154aedb, 0x9e96c5e5, 0x75a17ee6, 0x9a6315d8, - 0x6b684e55, 0x84aa256b, 0x6f9d9e68, 0x805ff556, 0x6283ee2f, - 0x8d418511, 0x66763e12, 0x89b4552c, 0x5f118f49, 0xb0d3e477, - 0x5be45f74, 0xb426344a, 0x56fa2f33, 0xb938440d, 0x520fff0e, - 0xbdcd9430, 0x4cc6cfbd, 0xa304a483, 0x48331f80, 0xa7f174be, - 0x452d6fc7, 0xaaef04f9, 0x41d8bffa, 0xae1ad4c4, 0x37e20d71, - 0xd820664f, 0x3317dd4c, 0xdcd5b672, 0x3e09ad0b, 0xd1cbc635, - 0x3afc7d36, 0xd53e1608, 0x24354d85, 0xcbf726bb, 0x20c09db8, - 0xcf02f686, 0x2ddeedff, 0xc21c86c1, 0x292b3dc2, 0xc6e956fc, - 0x104c8c99, 0xff8ee7a7, 0x14b95ca4, 0xfb7b379a, 0x19a72ce3, - 0xf66547dd, 0x1d52fcde, 0xf29097e0, 0x039bcc6d, 0xec59a753, - 0x076e1c50, 0xe8ac776e, 0x0a706c17, 0xe5b20729, 0x0e85bc2a, - 0xe147d714}, - {0x00000000, 0x177b1443, 0x2ef62886, 0x398d3cc5, 0x5dec510c, - 0x4a97454f, 0x731a798a, 0x64616dc9, 0xbbd8a218, 0xaca3b65b, - 0x952e8a9e, 0x82559edd, 0xe634f314, 0xf14fe757, 0xc8c2db92, - 0xdfb9cfd1, 0xacc04271, 0xbbbb5632, 0x82366af7, 0x954d7eb4, - 0xf12c137d, 0xe657073e, 0xdfda3bfb, 0xc8a12fb8, 0x1718e069, - 0x0063f42a, 0x39eec8ef, 0x2e95dcac, 0x4af4b165, 0x5d8fa526, - 0x640299e3, 0x73798da0, 0x82f182a3, 0x958a96e0, 0xac07aa25, - 0xbb7cbe66, 0xdf1dd3af, 0xc866c7ec, 0xf1ebfb29, 0xe690ef6a, - 0x392920bb, 0x2e5234f8, 0x17df083d, 0x00a41c7e, 0x64c571b7, - 0x73be65f4, 0x4a335931, 0x5d484d72, 0x2e31c0d2, 0x394ad491, - 0x00c7e854, 0x17bcfc17, 0x73dd91de, 0x64a6859d, 0x5d2bb958, - 0x4a50ad1b, 0x95e962ca, 0x82927689, 0xbb1f4a4c, 0xac645e0f, - 0xc80533c6, 0xdf7e2785, 0xe6f31b40, 0xf1880f03, 0xde920307, - 0xc9e91744, 0xf0642b81, 0xe71f3fc2, 0x837e520b, 0x94054648, - 0xad887a8d, 0xbaf36ece, 0x654aa11f, 0x7231b55c, 0x4bbc8999, - 0x5cc79dda, 0x38a6f013, 0x2fdde450, 0x1650d895, 0x012bccd6, - 0x72524176, 0x65295535, 0x5ca469f0, 0x4bdf7db3, 0x2fbe107a, - 0x38c50439, 0x014838fc, 0x16332cbf, 0xc98ae36e, 0xdef1f72d, - 0xe77ccbe8, 0xf007dfab, 0x9466b262, 0x831da621, 0xba909ae4, - 0xadeb8ea7, 0x5c6381a4, 0x4b1895e7, 0x7295a922, 0x65eebd61, - 0x018fd0a8, 0x16f4c4eb, 0x2f79f82e, 0x3802ec6d, 0xe7bb23bc, - 0xf0c037ff, 0xc94d0b3a, 0xde361f79, 0xba5772b0, 0xad2c66f3, - 0x94a15a36, 0x83da4e75, 0xf0a3c3d5, 0xe7d8d796, 0xde55eb53, - 0xc92eff10, 0xad4f92d9, 0xba34869a, 0x83b9ba5f, 0x94c2ae1c, - 0x4b7b61cd, 0x5c00758e, 0x658d494b, 0x72f65d08, 0x169730c1, - 0x01ec2482, 0x38611847, 0x2f1a0c04, 0x6655004f, 0x712e140c, - 0x48a328c9, 0x5fd83c8a, 0x3bb95143, 0x2cc24500, 0x154f79c5, - 0x02346d86, 0xdd8da257, 0xcaf6b614, 0xf37b8ad1, 0xe4009e92, - 0x8061f35b, 0x971ae718, 0xae97dbdd, 0xb9eccf9e, 0xca95423e, - 0xddee567d, 0xe4636ab8, 0xf3187efb, 0x97791332, 0x80020771, - 0xb98f3bb4, 0xaef42ff7, 0x714de026, 0x6636f465, 0x5fbbc8a0, - 0x48c0dce3, 0x2ca1b12a, 0x3bdaa569, 0x025799ac, 0x152c8def, - 0xe4a482ec, 0xf3df96af, 0xca52aa6a, 0xdd29be29, 0xb948d3e0, - 0xae33c7a3, 0x97befb66, 0x80c5ef25, 0x5f7c20f4, 0x480734b7, - 0x718a0872, 0x66f11c31, 0x029071f8, 0x15eb65bb, 0x2c66597e, - 0x3b1d4d3d, 0x4864c09d, 0x5f1fd4de, 0x6692e81b, 0x71e9fc58, - 0x15889191, 0x02f385d2, 0x3b7eb917, 0x2c05ad54, 0xf3bc6285, - 0xe4c776c6, 0xdd4a4a03, 0xca315e40, 0xae503389, 0xb92b27ca, - 0x80a61b0f, 0x97dd0f4c, 0xb8c70348, 0xafbc170b, 0x96312bce, - 0x814a3f8d, 0xe52b5244, 0xf2504607, 0xcbdd7ac2, 0xdca66e81, - 0x031fa150, 0x1464b513, 0x2de989d6, 0x3a929d95, 0x5ef3f05c, - 0x4988e41f, 0x7005d8da, 0x677ecc99, 0x14074139, 0x037c557a, - 0x3af169bf, 0x2d8a7dfc, 0x49eb1035, 0x5e900476, 0x671d38b3, - 0x70662cf0, 0xafdfe321, 0xb8a4f762, 0x8129cba7, 0x9652dfe4, - 0xf233b22d, 0xe548a66e, 0xdcc59aab, 0xcbbe8ee8, 0x3a3681eb, - 0x2d4d95a8, 0x14c0a96d, 0x03bbbd2e, 0x67dad0e7, 0x70a1c4a4, - 0x492cf861, 0x5e57ec22, 0x81ee23f3, 0x969537b0, 0xaf180b75, - 0xb8631f36, 0xdc0272ff, 0xcb7966bc, 0xf2f45a79, 0xe58f4e3a, - 0x96f6c39a, 0x818dd7d9, 0xb800eb1c, 0xaf7bff5f, 0xcb1a9296, - 0xdc6186d5, 0xe5ecba10, 0xf297ae53, 0x2d2e6182, 0x3a5575c1, - 0x03d84904, 0x14a35d47, 0x70c2308e, 0x67b924cd, 0x5e341808, - 0x494f0c4b}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0x43147b17, 0x8628f62e, 0xc53c8d39, 0x0c51ec5d, - 0x4f45974a, 0x8a791a73, 0xc96d6164, 0x18a2d8bb, 0x5bb6a3ac, - 0x9e8a2e95, 0xdd9e5582, 0x14f334e6, 0x57e74ff1, 0x92dbc2c8, - 0xd1cfb9df, 0x7142c0ac, 0x3256bbbb, 0xf76a3682, 0xb47e4d95, - 0x7d132cf1, 0x3e0757e6, 0xfb3bdadf, 0xb82fa1c8, 0x69e01817, - 0x2af46300, 0xefc8ee39, 0xacdc952e, 0x65b1f44a, 0x26a58f5d, - 0xe3990264, 0xa08d7973, 0xa382f182, 0xe0968a95, 0x25aa07ac, - 0x66be7cbb, 0xafd31ddf, 0xecc766c8, 0x29fbebf1, 0x6aef90e6, - 0xbb202939, 0xf834522e, 0x3d08df17, 0x7e1ca400, 0xb771c564, - 0xf465be73, 0x3159334a, 0x724d485d, 0xd2c0312e, 0x91d44a39, - 0x54e8c700, 0x17fcbc17, 0xde91dd73, 0x9d85a664, 0x58b92b5d, - 0x1bad504a, 0xca62e995, 0x89769282, 0x4c4a1fbb, 0x0f5e64ac, - 0xc63305c8, 0x85277edf, 0x401bf3e6, 0x030f88f1, 0x070392de, - 0x4417e9c9, 0x812b64f0, 0xc23f1fe7, 0x0b527e83, 0x48460594, - 0x8d7a88ad, 0xce6ef3ba, 0x1fa14a65, 0x5cb53172, 0x9989bc4b, - 0xda9dc75c, 0x13f0a638, 0x50e4dd2f, 0x95d85016, 0xd6cc2b01, - 0x76415272, 0x35552965, 0xf069a45c, 0xb37ddf4b, 0x7a10be2f, - 0x3904c538, 0xfc384801, 0xbf2c3316, 0x6ee38ac9, 0x2df7f1de, - 0xe8cb7ce7, 0xabdf07f0, 0x62b26694, 0x21a61d83, 0xe49a90ba, - 0xa78eebad, 0xa481635c, 0xe795184b, 0x22a99572, 0x61bdee65, - 0xa8d08f01, 0xebc4f416, 0x2ef8792f, 0x6dec0238, 0xbc23bbe7, - 0xff37c0f0, 0x3a0b4dc9, 0x791f36de, 0xb07257ba, 0xf3662cad, - 0x365aa194, 0x754eda83, 0xd5c3a3f0, 0x96d7d8e7, 0x53eb55de, - 0x10ff2ec9, 0xd9924fad, 0x9a8634ba, 0x5fbab983, 0x1caec294, - 0xcd617b4b, 0x8e75005c, 0x4b498d65, 0x085df672, 0xc1309716, - 0x8224ec01, 0x47186138, 0x040c1a2f, 0x4f005566, 0x0c142e71, - 0xc928a348, 0x8a3cd85f, 0x4351b93b, 0x0045c22c, 0xc5794f15, - 0x866d3402, 0x57a28ddd, 0x14b6f6ca, 0xd18a7bf3, 0x929e00e4, - 0x5bf36180, 0x18e71a97, 0xdddb97ae, 0x9ecfecb9, 0x3e4295ca, - 0x7d56eedd, 0xb86a63e4, 0xfb7e18f3, 0x32137997, 0x71070280, - 0xb43b8fb9, 0xf72ff4ae, 0x26e04d71, 0x65f43666, 0xa0c8bb5f, - 0xe3dcc048, 0x2ab1a12c, 0x69a5da3b, 0xac995702, 0xef8d2c15, - 0xec82a4e4, 0xaf96dff3, 0x6aaa52ca, 0x29be29dd, 0xe0d348b9, - 0xa3c733ae, 0x66fbbe97, 0x25efc580, 0xf4207c5f, 0xb7340748, - 0x72088a71, 0x311cf166, 0xf8719002, 0xbb65eb15, 0x7e59662c, - 0x3d4d1d3b, 0x9dc06448, 0xded41f5f, 0x1be89266, 0x58fce971, - 0x91918815, 0xd285f302, 0x17b97e3b, 0x54ad052c, 0x8562bcf3, - 0xc676c7e4, 0x034a4add, 0x405e31ca, 0x893350ae, 0xca272bb9, - 0x0f1ba680, 0x4c0fdd97, 0x4803c7b8, 0x0b17bcaf, 0xce2b3196, - 0x8d3f4a81, 0x44522be5, 0x074650f2, 0xc27addcb, 0x816ea6dc, - 0x50a11f03, 0x13b56414, 0xd689e92d, 0x959d923a, 0x5cf0f35e, - 0x1fe48849, 0xdad80570, 0x99cc7e67, 0x39410714, 0x7a557c03, - 0xbf69f13a, 0xfc7d8a2d, 0x3510eb49, 0x7604905e, 0xb3381d67, - 0xf02c6670, 0x21e3dfaf, 0x62f7a4b8, 0xa7cb2981, 0xe4df5296, - 0x2db233f2, 0x6ea648e5, 0xab9ac5dc, 0xe88ebecb, 0xeb81363a, - 0xa8954d2d, 0x6da9c014, 0x2ebdbb03, 0xe7d0da67, 0xa4c4a170, - 0x61f82c49, 0x22ec575e, 0xf323ee81, 0xb0379596, 0x750b18af, - 0x361f63b8, 0xff7202dc, 0xbc6679cb, 0x795af4f2, 0x3a4e8fe5, - 0x9ac3f696, 0xd9d78d81, 0x1ceb00b8, 0x5fff7baf, 0x96921acb, - 0xd58661dc, 0x10baece5, 0x53ae97f2, 0x82612e2d, 0xc175553a, - 0x0449d803, 0x475da314, 0x8e30c270, 0xcd24b967, 0x0818345e, - 0x4b0c4f49}, - {0x00000000, 0x3e6bc2ef, 0x3dd0f504, 0x03bb37eb, 0x7aa0eb09, - 0x44cb29e6, 0x47701e0d, 0x791bdce2, 0xf440d713, 0xca2b15fc, - 0xc9902217, 0xf7fbe0f8, 0x8ee03c1a, 0xb08bfef5, 0xb330c91e, - 0x8d5b0bf1, 0xe881ae27, 0xd6ea6cc8, 0xd5515b23, 0xeb3a99cc, - 0x9221452e, 0xac4a87c1, 0xaff1b02a, 0x919a72c5, 0x1cc17934, - 0x22aabbdb, 0x21118c30, 0x1f7a4edf, 0x6661923d, 0x580a50d2, - 0x5bb16739, 0x65daa5d6, 0xd0035d4f, 0xee689fa0, 0xedd3a84b, - 0xd3b86aa4, 0xaaa3b646, 0x94c874a9, 0x97734342, 0xa91881ad, - 0x24438a5c, 0x1a2848b3, 0x19937f58, 0x27f8bdb7, 0x5ee36155, - 0x6088a3ba, 0x63339451, 0x5d5856be, 0x3882f368, 0x06e93187, - 0x0552066c, 0x3b39c483, 0x42221861, 0x7c49da8e, 0x7ff2ed65, - 0x41992f8a, 0xccc2247b, 0xf2a9e694, 0xf112d17f, 0xcf791390, - 0xb662cf72, 0x88090d9d, 0x8bb23a76, 0xb5d9f899, 0xa007ba9e, - 0x9e6c7871, 0x9dd74f9a, 0xa3bc8d75, 0xdaa75197, 0xe4cc9378, - 0xe777a493, 0xd91c667c, 0x54476d8d, 0x6a2caf62, 0x69979889, - 0x57fc5a66, 0x2ee78684, 0x108c446b, 0x13377380, 0x2d5cb16f, - 0x488614b9, 0x76edd656, 0x7556e1bd, 0x4b3d2352, 0x3226ffb0, - 0x0c4d3d5f, 0x0ff60ab4, 0x319dc85b, 0xbcc6c3aa, 0x82ad0145, - 0x811636ae, 0xbf7df441, 0xc66628a3, 0xf80dea4c, 0xfbb6dda7, - 0xc5dd1f48, 0x7004e7d1, 0x4e6f253e, 0x4dd412d5, 0x73bfd03a, - 0x0aa40cd8, 0x34cfce37, 0x3774f9dc, 0x091f3b33, 0x844430c2, - 0xba2ff22d, 0xb994c5c6, 0x87ff0729, 0xfee4dbcb, 0xc08f1924, - 0xc3342ecf, 0xfd5fec20, 0x988549f6, 0xa6ee8b19, 0xa555bcf2, - 0x9b3e7e1d, 0xe225a2ff, 0xdc4e6010, 0xdff557fb, 0xe19e9514, - 0x6cc59ee5, 0x52ae5c0a, 0x51156be1, 0x6f7ea90e, 0x166575ec, - 0x280eb703, 0x2bb580e8, 0x15de4207, 0x010905e6, 0x3f62c709, - 0x3cd9f0e2, 0x02b2320d, 0x7ba9eeef, 0x45c22c00, 0x46791beb, - 0x7812d904, 0xf549d2f5, 0xcb22101a, 0xc89927f1, 0xf6f2e51e, - 0x8fe939fc, 0xb182fb13, 0xb239ccf8, 0x8c520e17, 0xe988abc1, - 0xd7e3692e, 0xd4585ec5, 0xea339c2a, 0x932840c8, 0xad438227, - 0xaef8b5cc, 0x90937723, 0x1dc87cd2, 0x23a3be3d, 0x201889d6, - 0x1e734b39, 0x676897db, 0x59035534, 0x5ab862df, 0x64d3a030, - 0xd10a58a9, 0xef619a46, 0xecdaadad, 0xd2b16f42, 0xabaab3a0, - 0x95c1714f, 0x967a46a4, 0xa811844b, 0x254a8fba, 0x1b214d55, - 0x189a7abe, 0x26f1b851, 0x5fea64b3, 0x6181a65c, 0x623a91b7, - 0x5c515358, 0x398bf68e, 0x07e03461, 0x045b038a, 0x3a30c165, - 0x432b1d87, 0x7d40df68, 0x7efbe883, 0x40902a6c, 0xcdcb219d, - 0xf3a0e372, 0xf01bd499, 0xce701676, 0xb76bca94, 0x8900087b, - 0x8abb3f90, 0xb4d0fd7f, 0xa10ebf78, 0x9f657d97, 0x9cde4a7c, - 0xa2b58893, 0xdbae5471, 0xe5c5969e, 0xe67ea175, 0xd815639a, - 0x554e686b, 0x6b25aa84, 0x689e9d6f, 0x56f55f80, 0x2fee8362, - 0x1185418d, 0x123e7666, 0x2c55b489, 0x498f115f, 0x77e4d3b0, - 0x745fe45b, 0x4a3426b4, 0x332ffa56, 0x0d4438b9, 0x0eff0f52, - 0x3094cdbd, 0xbdcfc64c, 0x83a404a3, 0x801f3348, 0xbe74f1a7, - 0xc76f2d45, 0xf904efaa, 0xfabfd841, 0xc4d41aae, 0x710de237, - 0x4f6620d8, 0x4cdd1733, 0x72b6d5dc, 0x0bad093e, 0x35c6cbd1, - 0x367dfc3a, 0x08163ed5, 0x854d3524, 0xbb26f7cb, 0xb89dc020, - 0x86f602cf, 0xffedde2d, 0xc1861cc2, 0xc23d2b29, 0xfc56e9c6, - 0x998c4c10, 0xa7e78eff, 0xa45cb914, 0x9a377bfb, 0xe32ca719, - 0xdd4765f6, 0xdefc521d, 0xe09790f2, 0x6dcc9b03, 0x53a759ec, - 0x501c6e07, 0x6e77ace8, 0x176c700a, 0x2907b2e5, 0x2abc850e, - 0x14d747e1}, - {0x00000000, 0xc0df8ec1, 0xc1b96c58, 0x0166e299, 0x8273d9b0, - 0x42ac5771, 0x43cab5e8, 0x83153b29, 0x45e1c3ba, 0x853e4d7b, - 0x8458afe2, 0x44872123, 0xc7921a0a, 0x074d94cb, 0x062b7652, - 0xc6f4f893, 0xcbc4f6ae, 0x0b1b786f, 0x0a7d9af6, 0xcaa21437, - 0x49b72f1e, 0x8968a1df, 0x880e4346, 0x48d1cd87, 0x8e253514, - 0x4efabbd5, 0x4f9c594c, 0x8f43d78d, 0x0c56eca4, 0xcc896265, - 0xcdef80fc, 0x0d300e3d, 0xd78f9c86, 0x17501247, 0x1636f0de, - 0xd6e97e1f, 0x55fc4536, 0x9523cbf7, 0x9445296e, 0x549aa7af, - 0x926e5f3c, 0x52b1d1fd, 0x53d73364, 0x9308bda5, 0x101d868c, - 0xd0c2084d, 0xd1a4ead4, 0x117b6415, 0x1c4b6a28, 0xdc94e4e9, - 0xddf20670, 0x1d2d88b1, 0x9e38b398, 0x5ee73d59, 0x5f81dfc0, - 0x9f5e5101, 0x59aaa992, 0x99752753, 0x9813c5ca, 0x58cc4b0b, - 0xdbd97022, 0x1b06fee3, 0x1a601c7a, 0xdabf92bb, 0xef1948d6, - 0x2fc6c617, 0x2ea0248e, 0xee7faa4f, 0x6d6a9166, 0xadb51fa7, - 0xacd3fd3e, 0x6c0c73ff, 0xaaf88b6c, 0x6a2705ad, 0x6b41e734, - 0xab9e69f5, 0x288b52dc, 0xe854dc1d, 0xe9323e84, 0x29edb045, - 0x24ddbe78, 0xe40230b9, 0xe564d220, 0x25bb5ce1, 0xa6ae67c8, - 0x6671e909, 0x67170b90, 0xa7c88551, 0x613c7dc2, 0xa1e3f303, - 0xa085119a, 0x605a9f5b, 0xe34fa472, 0x23902ab3, 0x22f6c82a, - 0xe22946eb, 0x3896d450, 0xf8495a91, 0xf92fb808, 0x39f036c9, - 0xbae50de0, 0x7a3a8321, 0x7b5c61b8, 0xbb83ef79, 0x7d7717ea, - 0xbda8992b, 0xbcce7bb2, 0x7c11f573, 0xff04ce5a, 0x3fdb409b, - 0x3ebda202, 0xfe622cc3, 0xf35222fe, 0x338dac3f, 0x32eb4ea6, - 0xf234c067, 0x7121fb4e, 0xb1fe758f, 0xb0989716, 0x704719d7, - 0xb6b3e144, 0x766c6f85, 0x770a8d1c, 0xb7d503dd, 0x34c038f4, - 0xf41fb635, 0xf57954ac, 0x35a6da6d, 0x9f35e177, 0x5fea6fb6, - 0x5e8c8d2f, 0x9e5303ee, 0x1d4638c7, 0xdd99b606, 0xdcff549f, - 0x1c20da5e, 0xdad422cd, 0x1a0bac0c, 0x1b6d4e95, 0xdbb2c054, - 0x58a7fb7d, 0x987875bc, 0x991e9725, 0x59c119e4, 0x54f117d9, - 0x942e9918, 0x95487b81, 0x5597f540, 0xd682ce69, 0x165d40a8, - 0x173ba231, 0xd7e42cf0, 0x1110d463, 0xd1cf5aa2, 0xd0a9b83b, - 0x107636fa, 0x93630dd3, 0x53bc8312, 0x52da618b, 0x9205ef4a, - 0x48ba7df1, 0x8865f330, 0x890311a9, 0x49dc9f68, 0xcac9a441, - 0x0a162a80, 0x0b70c819, 0xcbaf46d8, 0x0d5bbe4b, 0xcd84308a, - 0xcce2d213, 0x0c3d5cd2, 0x8f2867fb, 0x4ff7e93a, 0x4e910ba3, - 0x8e4e8562, 0x837e8b5f, 0x43a1059e, 0x42c7e707, 0x821869c6, - 0x010d52ef, 0xc1d2dc2e, 0xc0b43eb7, 0x006bb076, 0xc69f48e5, - 0x0640c624, 0x072624bd, 0xc7f9aa7c, 0x44ec9155, 0x84331f94, - 0x8555fd0d, 0x458a73cc, 0x702ca9a1, 0xb0f32760, 0xb195c5f9, - 0x714a4b38, 0xf25f7011, 0x3280fed0, 0x33e61c49, 0xf3399288, - 0x35cd6a1b, 0xf512e4da, 0xf4740643, 0x34ab8882, 0xb7beb3ab, - 0x77613d6a, 0x7607dff3, 0xb6d85132, 0xbbe85f0f, 0x7b37d1ce, - 0x7a513357, 0xba8ebd96, 0x399b86bf, 0xf944087e, 0xf822eae7, - 0x38fd6426, 0xfe099cb5, 0x3ed61274, 0x3fb0f0ed, 0xff6f7e2c, - 0x7c7a4505, 0xbca5cbc4, 0xbdc3295d, 0x7d1ca79c, 0xa7a33527, - 0x677cbbe6, 0x661a597f, 0xa6c5d7be, 0x25d0ec97, 0xe50f6256, - 0xe46980cf, 0x24b60e0e, 0xe242f69d, 0x229d785c, 0x23fb9ac5, - 0xe3241404, 0x60312f2d, 0xa0eea1ec, 0xa1884375, 0x6157cdb4, - 0x6c67c389, 0xacb84d48, 0xaddeafd1, 0x6d012110, 0xee141a39, - 0x2ecb94f8, 0x2fad7661, 0xef72f8a0, 0x29860033, 0xe9598ef2, - 0xe83f6c6b, 0x28e0e2aa, 0xabf5d983, 0x6b2a5742, 0x6a4cb5db, - 0xaa933b1a}, - {0x00000000, 0x6f4ca59b, 0x9f9e3bec, 0xf0d29e77, 0x7f3b0603, - 0x1077a398, 0xe0a53def, 0x8fe99874, 0xfe760c06, 0x913aa99d, - 0x61e837ea, 0x0ea49271, 0x814d0a05, 0xee01af9e, 0x1ed331e9, - 0x719f9472, 0xfced180c, 0x93a1bd97, 0x637323e0, 0x0c3f867b, - 0x83d61e0f, 0xec9abb94, 0x1c4825e3, 0x73048078, 0x029b140a, - 0x6dd7b191, 0x9d052fe6, 0xf2498a7d, 0x7da01209, 0x12ecb792, - 0xe23e29e5, 0x8d728c7e, 0xf8db3118, 0x97979483, 0x67450af4, - 0x0809af6f, 0x87e0371b, 0xe8ac9280, 0x187e0cf7, 0x7732a96c, - 0x06ad3d1e, 0x69e19885, 0x993306f2, 0xf67fa369, 0x79963b1d, - 0x16da9e86, 0xe60800f1, 0x8944a56a, 0x04362914, 0x6b7a8c8f, - 0x9ba812f8, 0xf4e4b763, 0x7b0d2f17, 0x14418a8c, 0xe49314fb, - 0x8bdfb160, 0xfa402512, 0x950c8089, 0x65de1efe, 0x0a92bb65, - 0x857b2311, 0xea37868a, 0x1ae518fd, 0x75a9bd66, 0xf0b76330, - 0x9ffbc6ab, 0x6f2958dc, 0x0065fd47, 0x8f8c6533, 0xe0c0c0a8, - 0x10125edf, 0x7f5efb44, 0x0ec16f36, 0x618dcaad, 0x915f54da, - 0xfe13f141, 0x71fa6935, 0x1eb6ccae, 0xee6452d9, 0x8128f742, - 0x0c5a7b3c, 0x6316dea7, 0x93c440d0, 0xfc88e54b, 0x73617d3f, - 0x1c2dd8a4, 0xecff46d3, 0x83b3e348, 0xf22c773a, 0x9d60d2a1, - 0x6db24cd6, 0x02fee94d, 0x8d177139, 0xe25bd4a2, 0x12894ad5, - 0x7dc5ef4e, 0x086c5228, 0x6720f7b3, 0x97f269c4, 0xf8becc5f, - 0x7757542b, 0x181bf1b0, 0xe8c96fc7, 0x8785ca5c, 0xf61a5e2e, - 0x9956fbb5, 0x698465c2, 0x06c8c059, 0x8921582d, 0xe66dfdb6, - 0x16bf63c1, 0x79f3c65a, 0xf4814a24, 0x9bcdefbf, 0x6b1f71c8, - 0x0453d453, 0x8bba4c27, 0xe4f6e9bc, 0x142477cb, 0x7b68d250, - 0x0af74622, 0x65bbe3b9, 0x95697dce, 0xfa25d855, 0x75cc4021, - 0x1a80e5ba, 0xea527bcd, 0x851ede56, 0xe06fc760, 0x8f2362fb, - 0x7ff1fc8c, 0x10bd5917, 0x9f54c163, 0xf01864f8, 0x00cafa8f, - 0x6f865f14, 0x1e19cb66, 0x71556efd, 0x8187f08a, 0xeecb5511, - 0x6122cd65, 0x0e6e68fe, 0xfebcf689, 0x91f05312, 0x1c82df6c, - 0x73ce7af7, 0x831ce480, 0xec50411b, 0x63b9d96f, 0x0cf57cf4, - 0xfc27e283, 0x936b4718, 0xe2f4d36a, 0x8db876f1, 0x7d6ae886, - 0x12264d1d, 0x9dcfd569, 0xf28370f2, 0x0251ee85, 0x6d1d4b1e, - 0x18b4f678, 0x77f853e3, 0x872acd94, 0xe866680f, 0x678ff07b, - 0x08c355e0, 0xf811cb97, 0x975d6e0c, 0xe6c2fa7e, 0x898e5fe5, - 0x795cc192, 0x16106409, 0x99f9fc7d, 0xf6b559e6, 0x0667c791, - 0x692b620a, 0xe459ee74, 0x8b154bef, 0x7bc7d598, 0x148b7003, - 0x9b62e877, 0xf42e4dec, 0x04fcd39b, 0x6bb07600, 0x1a2fe272, - 0x756347e9, 0x85b1d99e, 0xeafd7c05, 0x6514e471, 0x0a5841ea, - 0xfa8adf9d, 0x95c67a06, 0x10d8a450, 0x7f9401cb, 0x8f469fbc, - 0xe00a3a27, 0x6fe3a253, 0x00af07c8, 0xf07d99bf, 0x9f313c24, - 0xeeaea856, 0x81e20dcd, 0x713093ba, 0x1e7c3621, 0x9195ae55, - 0xfed90bce, 0x0e0b95b9, 0x61473022, 0xec35bc5c, 0x837919c7, - 0x73ab87b0, 0x1ce7222b, 0x930eba5f, 0xfc421fc4, 0x0c9081b3, - 0x63dc2428, 0x1243b05a, 0x7d0f15c1, 0x8ddd8bb6, 0xe2912e2d, - 0x6d78b659, 0x023413c2, 0xf2e68db5, 0x9daa282e, 0xe8039548, - 0x874f30d3, 0x779daea4, 0x18d10b3f, 0x9738934b, 0xf87436d0, - 0x08a6a8a7, 0x67ea0d3c, 0x1675994e, 0x79393cd5, 0x89eba2a2, - 0xe6a70739, 0x694e9f4d, 0x06023ad6, 0xf6d0a4a1, 0x999c013a, - 0x14ee8d44, 0x7ba228df, 0x8b70b6a8, 0xe43c1333, 0x6bd58b47, - 0x04992edc, 0xf44bb0ab, 0x9b071530, 0xea988142, 0x85d424d9, - 0x7506baae, 0x1a4a1f35, 0x95a38741, 0xfaef22da, 0x0a3dbcad, - 0x65711936}}; - -#endif - -#endif - -#if N == 4 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xf1da05aa, 0x38c50d15, 0xc91f08bf, 0x718a1a2a, - 0x80501f80, 0x494f173f, 0xb8951295, 0xe3143454, 0x12ce31fe, - 0xdbd13941, 0x2a0b3ceb, 0x929e2e7e, 0x63442bd4, 0xaa5b236b, - 0x5b8126c1, 0x1d596ee9, 0xec836b43, 0x259c63fc, 0xd4466656, - 0x6cd374c3, 0x9d097169, 0x541679d6, 0xa5cc7c7c, 0xfe4d5abd, - 0x0f975f17, 0xc68857a8, 0x37525202, 0x8fc74097, 0x7e1d453d, - 0xb7024d82, 0x46d84828, 0x3ab2ddd2, 0xcb68d878, 0x0277d0c7, - 0xf3add56d, 0x4b38c7f8, 0xbae2c252, 0x73fdcaed, 0x8227cf47, - 0xd9a6e986, 0x287cec2c, 0xe163e493, 0x10b9e139, 0xa82cf3ac, - 0x59f6f606, 0x90e9feb9, 0x6133fb13, 0x27ebb33b, 0xd631b691, - 0x1f2ebe2e, 0xeef4bb84, 0x5661a911, 0xa7bbacbb, 0x6ea4a404, - 0x9f7ea1ae, 0xc4ff876f, 0x352582c5, 0xfc3a8a7a, 0x0de08fd0, - 0xb5759d45, 0x44af98ef, 0x8db09050, 0x7c6a95fa, 0x7565bba4, - 0x84bfbe0e, 0x4da0b6b1, 0xbc7ab31b, 0x04efa18e, 0xf535a424, - 0x3c2aac9b, 0xcdf0a931, 0x96718ff0, 0x67ab8a5a, 0xaeb482e5, - 0x5f6e874f, 0xe7fb95da, 0x16219070, 0xdf3e98cf, 0x2ee49d65, - 0x683cd54d, 0x99e6d0e7, 0x50f9d858, 0xa123ddf2, 0x19b6cf67, - 0xe86ccacd, 0x2173c272, 0xd0a9c7d8, 0x8b28e119, 0x7af2e4b3, - 0xb3edec0c, 0x4237e9a6, 0xfaa2fb33, 0x0b78fe99, 0xc267f626, - 0x33bdf38c, 0x4fd76676, 0xbe0d63dc, 0x77126b63, 0x86c86ec9, - 0x3e5d7c5c, 0xcf8779f6, 0x06987149, 0xf74274e3, 0xacc35222, - 0x5d195788, 0x94065f37, 0x65dc5a9d, 0xdd494808, 0x2c934da2, - 0xe58c451d, 0x145640b7, 0x528e089f, 0xa3540d35, 0x6a4b058a, - 0x9b910020, 0x230412b5, 0xd2de171f, 0x1bc11fa0, 0xea1b1a0a, - 0xb19a3ccb, 0x40403961, 0x895f31de, 0x78853474, 0xc01026e1, - 0x31ca234b, 0xf8d52bf4, 0x090f2e5e, 0xeacb7748, 0x1b1172e2, - 0xd20e7a5d, 0x23d47ff7, 0x9b416d62, 0x6a9b68c8, 0xa3846077, - 0x525e65dd, 0x09df431c, 0xf80546b6, 0x311a4e09, 0xc0c04ba3, - 0x78555936, 0x898f5c9c, 0x40905423, 0xb14a5189, 0xf79219a1, - 0x06481c0b, 0xcf5714b4, 0x3e8d111e, 0x8618038b, 0x77c20621, - 0xbedd0e9e, 0x4f070b34, 0x14862df5, 0xe55c285f, 0x2c4320e0, - 0xdd99254a, 0x650c37df, 0x94d63275, 0x5dc93aca, 0xac133f60, - 0xd079aa9a, 0x21a3af30, 0xe8bca78f, 0x1966a225, 0xa1f3b0b0, - 0x5029b51a, 0x9936bda5, 0x68ecb80f, 0x336d9ece, 0xc2b79b64, - 0x0ba893db, 0xfa729671, 0x42e784e4, 0xb33d814e, 0x7a2289f1, - 0x8bf88c5b, 0xcd20c473, 0x3cfac1d9, 0xf5e5c966, 0x043fcccc, - 0xbcaade59, 0x4d70dbf3, 0x846fd34c, 0x75b5d6e6, 0x2e34f027, - 0xdfeef58d, 0x16f1fd32, 0xe72bf898, 0x5fbeea0d, 0xae64efa7, - 0x677be718, 0x96a1e2b2, 0x9faeccec, 0x6e74c946, 0xa76bc1f9, - 0x56b1c453, 0xee24d6c6, 0x1ffed36c, 0xd6e1dbd3, 0x273bde79, - 0x7cbaf8b8, 0x8d60fd12, 0x447ff5ad, 0xb5a5f007, 0x0d30e292, - 0xfceae738, 0x35f5ef87, 0xc42fea2d, 0x82f7a205, 0x732da7af, - 0xba32af10, 0x4be8aaba, 0xf37db82f, 0x02a7bd85, 0xcbb8b53a, - 0x3a62b090, 0x61e39651, 0x903993fb, 0x59269b44, 0xa8fc9eee, - 0x10698c7b, 0xe1b389d1, 0x28ac816e, 0xd97684c4, 0xa51c113e, - 0x54c61494, 0x9dd91c2b, 0x6c031981, 0xd4960b14, 0x254c0ebe, - 0xec530601, 0x1d8903ab, 0x4608256a, 0xb7d220c0, 0x7ecd287f, - 0x8f172dd5, 0x37823f40, 0xc6583aea, 0x0f473255, 0xfe9d37ff, - 0xb8457fd7, 0x499f7a7d, 0x808072c2, 0x715a7768, 0xc9cf65fd, - 0x38156057, 0xf10a68e8, 0x00d06d42, 0x5b514b83, 0xaa8b4e29, - 0x63944696, 0x924e433c, 0x2adb51a9, 0xdb015403, 0x121e5cbc, - 0xe3c45916}, - {0x00000000, 0x0ee7e8d1, 0x1dcfd1a2, 0x13283973, 0x3b9fa344, - 0x35784b95, 0x265072e6, 0x28b79a37, 0x773f4688, 0x79d8ae59, - 0x6af0972a, 0x64177ffb, 0x4ca0e5cc, 0x42470d1d, 0x516f346e, - 0x5f88dcbf, 0xee7e8d10, 0xe09965c1, 0xf3b15cb2, 0xfd56b463, - 0xd5e12e54, 0xdb06c685, 0xc82efff6, 0xc6c91727, 0x9941cb98, - 0x97a62349, 0x848e1a3a, 0x8a69f2eb, 0xa2de68dc, 0xac39800d, - 0xbf11b97e, 0xb1f651af, 0x078c1c61, 0x096bf4b0, 0x1a43cdc3, - 0x14a42512, 0x3c13bf25, 0x32f457f4, 0x21dc6e87, 0x2f3b8656, - 0x70b35ae9, 0x7e54b238, 0x6d7c8b4b, 0x639b639a, 0x4b2cf9ad, - 0x45cb117c, 0x56e3280f, 0x5804c0de, 0xe9f29171, 0xe71579a0, - 0xf43d40d3, 0xfadaa802, 0xd26d3235, 0xdc8adae4, 0xcfa2e397, - 0xc1450b46, 0x9ecdd7f9, 0x902a3f28, 0x8302065b, 0x8de5ee8a, - 0xa55274bd, 0xabb59c6c, 0xb89da51f, 0xb67a4dce, 0x0f1838c2, - 0x01ffd013, 0x12d7e960, 0x1c3001b1, 0x34879b86, 0x3a607357, - 0x29484a24, 0x27afa2f5, 0x78277e4a, 0x76c0969b, 0x65e8afe8, - 0x6b0f4739, 0x43b8dd0e, 0x4d5f35df, 0x5e770cac, 0x5090e47d, - 0xe166b5d2, 0xef815d03, 0xfca96470, 0xf24e8ca1, 0xdaf91696, - 0xd41efe47, 0xc736c734, 0xc9d12fe5, 0x9659f35a, 0x98be1b8b, - 0x8b9622f8, 0x8571ca29, 0xadc6501e, 0xa321b8cf, 0xb00981bc, - 0xbeee696d, 0x089424a3, 0x0673cc72, 0x155bf501, 0x1bbc1dd0, - 0x330b87e7, 0x3dec6f36, 0x2ec45645, 0x2023be94, 0x7fab622b, - 0x714c8afa, 0x6264b389, 0x6c835b58, 0x4434c16f, 0x4ad329be, - 0x59fb10cd, 0x571cf81c, 0xe6eaa9b3, 0xe80d4162, 0xfb257811, - 0xf5c290c0, 0xdd750af7, 0xd392e226, 0xc0badb55, 0xce5d3384, - 0x91d5ef3b, 0x9f3207ea, 0x8c1a3e99, 0x82fdd648, 0xaa4a4c7f, - 0xa4ada4ae, 0xb7859ddd, 0xb962750c, 0x1e307184, 0x10d79955, - 0x03ffa026, 0x0d1848f7, 0x25afd2c0, 0x2b483a11, 0x38600362, - 0x3687ebb3, 0x690f370c, 0x67e8dfdd, 0x74c0e6ae, 0x7a270e7f, - 0x52909448, 0x5c777c99, 0x4f5f45ea, 0x41b8ad3b, 0xf04efc94, - 0xfea91445, 0xed812d36, 0xe366c5e7, 0xcbd15fd0, 0xc536b701, - 0xd61e8e72, 0xd8f966a3, 0x8771ba1c, 0x899652cd, 0x9abe6bbe, - 0x9459836f, 0xbcee1958, 0xb209f189, 0xa121c8fa, 0xafc6202b, - 0x19bc6de5, 0x175b8534, 0x0473bc47, 0x0a945496, 0x2223cea1, - 0x2cc42670, 0x3fec1f03, 0x310bf7d2, 0x6e832b6d, 0x6064c3bc, - 0x734cfacf, 0x7dab121e, 0x551c8829, 0x5bfb60f8, 0x48d3598b, - 0x4634b15a, 0xf7c2e0f5, 0xf9250824, 0xea0d3157, 0xe4ead986, - 0xcc5d43b1, 0xc2baab60, 0xd1929213, 0xdf757ac2, 0x80fda67d, - 0x8e1a4eac, 0x9d3277df, 0x93d59f0e, 0xbb620539, 0xb585ede8, - 0xa6add49b, 0xa84a3c4a, 0x11284946, 0x1fcfa197, 0x0ce798e4, - 0x02007035, 0x2ab7ea02, 0x245002d3, 0x37783ba0, 0x399fd371, - 0x66170fce, 0x68f0e71f, 0x7bd8de6c, 0x753f36bd, 0x5d88ac8a, - 0x536f445b, 0x40477d28, 0x4ea095f9, 0xff56c456, 0xf1b12c87, - 0xe29915f4, 0xec7efd25, 0xc4c96712, 0xca2e8fc3, 0xd906b6b0, - 0xd7e15e61, 0x886982de, 0x868e6a0f, 0x95a6537c, 0x9b41bbad, - 0xb3f6219a, 0xbd11c94b, 0xae39f038, 0xa0de18e9, 0x16a45527, - 0x1843bdf6, 0x0b6b8485, 0x058c6c54, 0x2d3bf663, 0x23dc1eb2, - 0x30f427c1, 0x3e13cf10, 0x619b13af, 0x6f7cfb7e, 0x7c54c20d, - 0x72b32adc, 0x5a04b0eb, 0x54e3583a, 0x47cb6149, 0x492c8998, - 0xf8dad837, 0xf63d30e6, 0xe5150995, 0xebf2e144, 0xc3457b73, - 0xcda293a2, 0xde8aaad1, 0xd06d4200, 0x8fe59ebf, 0x8102766e, - 0x922a4f1d, 0x9ccda7cc, 0xb47a3dfb, 0xba9dd52a, 0xa9b5ec59, - 0xa7520488}, - {0x00000000, 0x3c60e308, 0x78c1c610, 0x44a12518, 0xf1838c20, - 0xcde36f28, 0x89424a30, 0xb522a938, 0x38761e01, 0x0416fd09, - 0x40b7d811, 0x7cd73b19, 0xc9f59221, 0xf5957129, 0xb1345431, - 0x8d54b739, 0x70ec3c02, 0x4c8cdf0a, 0x082dfa12, 0x344d191a, - 0x816fb022, 0xbd0f532a, 0xf9ae7632, 0xc5ce953a, 0x489a2203, - 0x74fac10b, 0x305be413, 0x0c3b071b, 0xb919ae23, 0x85794d2b, - 0xc1d86833, 0xfdb88b3b, 0xe1d87804, 0xddb89b0c, 0x9919be14, - 0xa5795d1c, 0x105bf424, 0x2c3b172c, 0x689a3234, 0x54fad13c, - 0xd9ae6605, 0xe5ce850d, 0xa16fa015, 0x9d0f431d, 0x282dea25, - 0x144d092d, 0x50ec2c35, 0x6c8ccf3d, 0x91344406, 0xad54a70e, - 0xe9f58216, 0xd595611e, 0x60b7c826, 0x5cd72b2e, 0x18760e36, - 0x2416ed3e, 0xa9425a07, 0x9522b90f, 0xd1839c17, 0xede37f1f, - 0x58c1d627, 0x64a1352f, 0x20001037, 0x1c60f33f, 0x18c1f649, - 0x24a11541, 0x60003059, 0x5c60d351, 0xe9427a69, 0xd5229961, - 0x9183bc79, 0xade35f71, 0x20b7e848, 0x1cd70b40, 0x58762e58, - 0x6416cd50, 0xd1346468, 0xed548760, 0xa9f5a278, 0x95954170, - 0x682dca4b, 0x544d2943, 0x10ec0c5b, 0x2c8cef53, 0x99ae466b, - 0xa5cea563, 0xe16f807b, 0xdd0f6373, 0x505bd44a, 0x6c3b3742, - 0x289a125a, 0x14faf152, 0xa1d8586a, 0x9db8bb62, 0xd9199e7a, - 0xe5797d72, 0xf9198e4d, 0xc5796d45, 0x81d8485d, 0xbdb8ab55, - 0x089a026d, 0x34fae165, 0x705bc47d, 0x4c3b2775, 0xc16f904c, - 0xfd0f7344, 0xb9ae565c, 0x85ceb554, 0x30ec1c6c, 0x0c8cff64, - 0x482dda7c, 0x744d3974, 0x89f5b24f, 0xb5955147, 0xf134745f, - 0xcd549757, 0x78763e6f, 0x4416dd67, 0x00b7f87f, 0x3cd71b77, - 0xb183ac4e, 0x8de34f46, 0xc9426a5e, 0xf5228956, 0x4000206e, - 0x7c60c366, 0x38c1e67e, 0x04a10576, 0x3183ec92, 0x0de30f9a, - 0x49422a82, 0x7522c98a, 0xc00060b2, 0xfc6083ba, 0xb8c1a6a2, - 0x84a145aa, 0x09f5f293, 0x3595119b, 0x71343483, 0x4d54d78b, - 0xf8767eb3, 0xc4169dbb, 0x80b7b8a3, 0xbcd75bab, 0x416fd090, - 0x7d0f3398, 0x39ae1680, 0x05cef588, 0xb0ec5cb0, 0x8c8cbfb8, - 0xc82d9aa0, 0xf44d79a8, 0x7919ce91, 0x45792d99, 0x01d80881, - 0x3db8eb89, 0x889a42b1, 0xb4faa1b9, 0xf05b84a1, 0xcc3b67a9, - 0xd05b9496, 0xec3b779e, 0xa89a5286, 0x94fab18e, 0x21d818b6, - 0x1db8fbbe, 0x5919dea6, 0x65793dae, 0xe82d8a97, 0xd44d699f, - 0x90ec4c87, 0xac8caf8f, 0x19ae06b7, 0x25cee5bf, 0x616fc0a7, - 0x5d0f23af, 0xa0b7a894, 0x9cd74b9c, 0xd8766e84, 0xe4168d8c, - 0x513424b4, 0x6d54c7bc, 0x29f5e2a4, 0x159501ac, 0x98c1b695, - 0xa4a1559d, 0xe0007085, 0xdc60938d, 0x69423ab5, 0x5522d9bd, - 0x1183fca5, 0x2de31fad, 0x29421adb, 0x1522f9d3, 0x5183dccb, - 0x6de33fc3, 0xd8c196fb, 0xe4a175f3, 0xa00050eb, 0x9c60b3e3, - 0x113404da, 0x2d54e7d2, 0x69f5c2ca, 0x559521c2, 0xe0b788fa, - 0xdcd76bf2, 0x98764eea, 0xa416ade2, 0x59ae26d9, 0x65cec5d1, - 0x216fe0c9, 0x1d0f03c1, 0xa82daaf9, 0x944d49f1, 0xd0ec6ce9, - 0xec8c8fe1, 0x61d838d8, 0x5db8dbd0, 0x1919fec8, 0x25791dc0, - 0x905bb4f8, 0xac3b57f0, 0xe89a72e8, 0xd4fa91e0, 0xc89a62df, - 0xf4fa81d7, 0xb05ba4cf, 0x8c3b47c7, 0x3919eeff, 0x05790df7, - 0x41d828ef, 0x7db8cbe7, 0xf0ec7cde, 0xcc8c9fd6, 0x882dbace, - 0xb44d59c6, 0x016ff0fe, 0x3d0f13f6, 0x79ae36ee, 0x45ced5e6, - 0xb8765edd, 0x8416bdd5, 0xc0b798cd, 0xfcd77bc5, 0x49f5d2fd, - 0x759531f5, 0x313414ed, 0x0d54f7e5, 0x800040dc, 0xbc60a3d4, - 0xf8c186cc, 0xc4a165c4, 0x7183ccfc, 0x4de32ff4, 0x09420aec, - 0x3522e9e4}, - {0x00000000, 0x6307d924, 0xc60fb248, 0xa5086b6c, 0x576e62d1, - 0x3469bbf5, 0x9161d099, 0xf26609bd, 0xaedcc5a2, 0xcddb1c86, - 0x68d377ea, 0x0bd4aece, 0xf9b2a773, 0x9ab57e57, 0x3fbd153b, - 0x5cbacc1f, 0x86c88d05, 0xe5cf5421, 0x40c73f4d, 0x23c0e669, - 0xd1a6efd4, 0xb2a136f0, 0x17a95d9c, 0x74ae84b8, 0x281448a7, - 0x4b139183, 0xee1bfaef, 0x8d1c23cb, 0x7f7a2a76, 0x1c7df352, - 0xb975983e, 0xda72411a, 0xd6e01c4b, 0xb5e7c56f, 0x10efae03, - 0x73e87727, 0x818e7e9a, 0xe289a7be, 0x4781ccd2, 0x248615f6, - 0x783cd9e9, 0x1b3b00cd, 0xbe336ba1, 0xdd34b285, 0x2f52bb38, - 0x4c55621c, 0xe95d0970, 0x8a5ad054, 0x5028914e, 0x332f486a, - 0x96272306, 0xf520fa22, 0x0746f39f, 0x64412abb, 0xc14941d7, - 0xa24e98f3, 0xfef454ec, 0x9df38dc8, 0x38fbe6a4, 0x5bfc3f80, - 0xa99a363d, 0xca9def19, 0x6f958475, 0x0c925d51, 0x76b13ed7, - 0x15b6e7f3, 0xb0be8c9f, 0xd3b955bb, 0x21df5c06, 0x42d88522, - 0xe7d0ee4e, 0x84d7376a, 0xd86dfb75, 0xbb6a2251, 0x1e62493d, - 0x7d659019, 0x8f0399a4, 0xec044080, 0x490c2bec, 0x2a0bf2c8, - 0xf079b3d2, 0x937e6af6, 0x3676019a, 0x5571d8be, 0xa717d103, - 0xc4100827, 0x6118634b, 0x021fba6f, 0x5ea57670, 0x3da2af54, - 0x98aac438, 0xfbad1d1c, 0x09cb14a1, 0x6acccd85, 0xcfc4a6e9, - 0xacc37fcd, 0xa051229c, 0xc356fbb8, 0x665e90d4, 0x055949f0, - 0xf73f404d, 0x94389969, 0x3130f205, 0x52372b21, 0x0e8de73e, - 0x6d8a3e1a, 0xc8825576, 0xab858c52, 0x59e385ef, 0x3ae45ccb, - 0x9fec37a7, 0xfcebee83, 0x2699af99, 0x459e76bd, 0xe0961dd1, - 0x8391c4f5, 0x71f7cd48, 0x12f0146c, 0xb7f87f00, 0xd4ffa624, - 0x88456a3b, 0xeb42b31f, 0x4e4ad873, 0x2d4d0157, 0xdf2b08ea, - 0xbc2cd1ce, 0x1924baa2, 0x7a236386, 0xed627dae, 0x8e65a48a, - 0x2b6dcfe6, 0x486a16c2, 0xba0c1f7f, 0xd90bc65b, 0x7c03ad37, - 0x1f047413, 0x43beb80c, 0x20b96128, 0x85b10a44, 0xe6b6d360, - 0x14d0dadd, 0x77d703f9, 0xd2df6895, 0xb1d8b1b1, 0x6baaf0ab, - 0x08ad298f, 0xada542e3, 0xcea29bc7, 0x3cc4927a, 0x5fc34b5e, - 0xfacb2032, 0x99ccf916, 0xc5763509, 0xa671ec2d, 0x03798741, - 0x607e5e65, 0x921857d8, 0xf11f8efc, 0x5417e590, 0x37103cb4, - 0x3b8261e5, 0x5885b8c1, 0xfd8dd3ad, 0x9e8a0a89, 0x6cec0334, - 0x0febda10, 0xaae3b17c, 0xc9e46858, 0x955ea447, 0xf6597d63, - 0x5351160f, 0x3056cf2b, 0xc230c696, 0xa1371fb2, 0x043f74de, - 0x6738adfa, 0xbd4aece0, 0xde4d35c4, 0x7b455ea8, 0x1842878c, - 0xea248e31, 0x89235715, 0x2c2b3c79, 0x4f2ce55d, 0x13962942, - 0x7091f066, 0xd5999b0a, 0xb69e422e, 0x44f84b93, 0x27ff92b7, - 0x82f7f9db, 0xe1f020ff, 0x9bd34379, 0xf8d49a5d, 0x5ddcf131, - 0x3edb2815, 0xccbd21a8, 0xafbaf88c, 0x0ab293e0, 0x69b54ac4, - 0x350f86db, 0x56085fff, 0xf3003493, 0x9007edb7, 0x6261e40a, - 0x01663d2e, 0xa46e5642, 0xc7698f66, 0x1d1bce7c, 0x7e1c1758, - 0xdb147c34, 0xb813a510, 0x4a75acad, 0x29727589, 0x8c7a1ee5, - 0xef7dc7c1, 0xb3c70bde, 0xd0c0d2fa, 0x75c8b996, 0x16cf60b2, - 0xe4a9690f, 0x87aeb02b, 0x22a6db47, 0x41a10263, 0x4d335f32, - 0x2e348616, 0x8b3ced7a, 0xe83b345e, 0x1a5d3de3, 0x795ae4c7, - 0xdc528fab, 0xbf55568f, 0xe3ef9a90, 0x80e843b4, 0x25e028d8, - 0x46e7f1fc, 0xb481f841, 0xd7862165, 0x728e4a09, 0x1189932d, - 0xcbfbd237, 0xa8fc0b13, 0x0df4607f, 0x6ef3b95b, 0x9c95b0e6, - 0xff9269c2, 0x5a9a02ae, 0x399ddb8a, 0x65271795, 0x0620ceb1, - 0xa328a5dd, 0xc02f7cf9, 0x32497544, 0x514eac60, 0xf446c70c, - 0x97411e28}, - {0x00000000, 0x01b5fd1d, 0x036bfa3a, 0x02de0727, 0x06d7f474, - 0x07620969, 0x05bc0e4e, 0x0409f353, 0x0dafe8e8, 0x0c1a15f5, - 0x0ec412d2, 0x0f71efcf, 0x0b781c9c, 0x0acde181, 0x0813e6a6, - 0x09a61bbb, 0x1b5fd1d0, 0x1aea2ccd, 0x18342bea, 0x1981d6f7, - 0x1d8825a4, 0x1c3dd8b9, 0x1ee3df9e, 0x1f562283, 0x16f03938, - 0x1745c425, 0x159bc302, 0x142e3e1f, 0x1027cd4c, 0x11923051, - 0x134c3776, 0x12f9ca6b, 0x36bfa3a0, 0x370a5ebd, 0x35d4599a, - 0x3461a487, 0x306857d4, 0x31ddaac9, 0x3303adee, 0x32b650f3, - 0x3b104b48, 0x3aa5b655, 0x387bb172, 0x39ce4c6f, 0x3dc7bf3c, - 0x3c724221, 0x3eac4506, 0x3f19b81b, 0x2de07270, 0x2c558f6d, - 0x2e8b884a, 0x2f3e7557, 0x2b378604, 0x2a827b19, 0x285c7c3e, - 0x29e98123, 0x204f9a98, 0x21fa6785, 0x232460a2, 0x22919dbf, - 0x26986eec, 0x272d93f1, 0x25f394d6, 0x244669cb, 0x6d7f4740, - 0x6ccaba5d, 0x6e14bd7a, 0x6fa14067, 0x6ba8b334, 0x6a1d4e29, - 0x68c3490e, 0x6976b413, 0x60d0afa8, 0x616552b5, 0x63bb5592, - 0x620ea88f, 0x66075bdc, 0x67b2a6c1, 0x656ca1e6, 0x64d95cfb, - 0x76209690, 0x77956b8d, 0x754b6caa, 0x74fe91b7, 0x70f762e4, - 0x71429ff9, 0x739c98de, 0x722965c3, 0x7b8f7e78, 0x7a3a8365, - 0x78e48442, 0x7951795f, 0x7d588a0c, 0x7ced7711, 0x7e337036, - 0x7f868d2b, 0x5bc0e4e0, 0x5a7519fd, 0x58ab1eda, 0x591ee3c7, - 0x5d171094, 0x5ca2ed89, 0x5e7ceaae, 0x5fc917b3, 0x566f0c08, - 0x57daf115, 0x5504f632, 0x54b10b2f, 0x50b8f87c, 0x510d0561, - 0x53d30246, 0x5266ff5b, 0x409f3530, 0x412ac82d, 0x43f4cf0a, - 0x42413217, 0x4648c144, 0x47fd3c59, 0x45233b7e, 0x4496c663, - 0x4d30ddd8, 0x4c8520c5, 0x4e5b27e2, 0x4feedaff, 0x4be729ac, - 0x4a52d4b1, 0x488cd396, 0x49392e8b, 0xdafe8e80, 0xdb4b739d, - 0xd99574ba, 0xd82089a7, 0xdc297af4, 0xdd9c87e9, 0xdf4280ce, - 0xdef77dd3, 0xd7516668, 0xd6e49b75, 0xd43a9c52, 0xd58f614f, - 0xd186921c, 0xd0336f01, 0xd2ed6826, 0xd358953b, 0xc1a15f50, - 0xc014a24d, 0xc2caa56a, 0xc37f5877, 0xc776ab24, 0xc6c35639, - 0xc41d511e, 0xc5a8ac03, 0xcc0eb7b8, 0xcdbb4aa5, 0xcf654d82, - 0xced0b09f, 0xcad943cc, 0xcb6cbed1, 0xc9b2b9f6, 0xc80744eb, - 0xec412d20, 0xedf4d03d, 0xef2ad71a, 0xee9f2a07, 0xea96d954, - 0xeb232449, 0xe9fd236e, 0xe848de73, 0xe1eec5c8, 0xe05b38d5, - 0xe2853ff2, 0xe330c2ef, 0xe73931bc, 0xe68ccca1, 0xe452cb86, - 0xe5e7369b, 0xf71efcf0, 0xf6ab01ed, 0xf47506ca, 0xf5c0fbd7, - 0xf1c90884, 0xf07cf599, 0xf2a2f2be, 0xf3170fa3, 0xfab11418, - 0xfb04e905, 0xf9daee22, 0xf86f133f, 0xfc66e06c, 0xfdd31d71, - 0xff0d1a56, 0xfeb8e74b, 0xb781c9c0, 0xb63434dd, 0xb4ea33fa, - 0xb55fcee7, 0xb1563db4, 0xb0e3c0a9, 0xb23dc78e, 0xb3883a93, - 0xba2e2128, 0xbb9bdc35, 0xb945db12, 0xb8f0260f, 0xbcf9d55c, - 0xbd4c2841, 0xbf922f66, 0xbe27d27b, 0xacde1810, 0xad6be50d, - 0xafb5e22a, 0xae001f37, 0xaa09ec64, 0xabbc1179, 0xa962165e, - 0xa8d7eb43, 0xa171f0f8, 0xa0c40de5, 0xa21a0ac2, 0xa3aff7df, - 0xa7a6048c, 0xa613f991, 0xa4cdfeb6, 0xa57803ab, 0x813e6a60, - 0x808b977d, 0x8255905a, 0x83e06d47, 0x87e99e14, 0x865c6309, - 0x8482642e, 0x85379933, 0x8c918288, 0x8d247f95, 0x8ffa78b2, - 0x8e4f85af, 0x8a4676fc, 0x8bf38be1, 0x892d8cc6, 0x889871db, - 0x9a61bbb0, 0x9bd446ad, 0x990a418a, 0x98bfbc97, 0x9cb64fc4, - 0x9d03b2d9, 0x9fddb5fe, 0x9e6848e3, 0x97ce5358, 0x967bae45, - 0x94a5a962, 0x9510547f, 0x9119a72c, 0x90ac5a31, 0x92725d16, - 0x93c7a00b}, - {0x00000000, 0x6e8c1b41, 0xdd183682, 0xb3942dc3, 0x61416b45, - 0x0fcd7004, 0xbc595dc7, 0xd2d54686, 0xc282d68a, 0xac0ecdcb, - 0x1f9ae008, 0x7116fb49, 0xa3c3bdcf, 0xcd4fa68e, 0x7edb8b4d, - 0x1057900c, 0x5e74ab55, 0x30f8b014, 0x836c9dd7, 0xede08696, - 0x3f35c010, 0x51b9db51, 0xe22df692, 0x8ca1edd3, 0x9cf67ddf, - 0xf27a669e, 0x41ee4b5d, 0x2f62501c, 0xfdb7169a, 0x933b0ddb, - 0x20af2018, 0x4e233b59, 0xbce956aa, 0xd2654deb, 0x61f16028, - 0x0f7d7b69, 0xdda83def, 0xb32426ae, 0x00b00b6d, 0x6e3c102c, - 0x7e6b8020, 0x10e79b61, 0xa373b6a2, 0xcdffade3, 0x1f2aeb65, - 0x71a6f024, 0xc232dde7, 0xacbec6a6, 0xe29dfdff, 0x8c11e6be, - 0x3f85cb7d, 0x5109d03c, 0x83dc96ba, 0xed508dfb, 0x5ec4a038, - 0x3048bb79, 0x201f2b75, 0x4e933034, 0xfd071df7, 0x938b06b6, - 0x415e4030, 0x2fd25b71, 0x9c4676b2, 0xf2ca6df3, 0xa2a3ab15, - 0xcc2fb054, 0x7fbb9d97, 0x113786d6, 0xc3e2c050, 0xad6edb11, - 0x1efaf6d2, 0x7076ed93, 0x60217d9f, 0x0ead66de, 0xbd394b1d, - 0xd3b5505c, 0x016016da, 0x6fec0d9b, 0xdc782058, 0xb2f43b19, - 0xfcd70040, 0x925b1b01, 0x21cf36c2, 0x4f432d83, 0x9d966b05, - 0xf31a7044, 0x408e5d87, 0x2e0246c6, 0x3e55d6ca, 0x50d9cd8b, - 0xe34de048, 0x8dc1fb09, 0x5f14bd8f, 0x3198a6ce, 0x820c8b0d, - 0xec80904c, 0x1e4afdbf, 0x70c6e6fe, 0xc352cb3d, 0xadded07c, - 0x7f0b96fa, 0x11878dbb, 0xa213a078, 0xcc9fbb39, 0xdcc82b35, - 0xb2443074, 0x01d01db7, 0x6f5c06f6, 0xbd894070, 0xd3055b31, - 0x609176f2, 0x0e1d6db3, 0x403e56ea, 0x2eb24dab, 0x9d266068, - 0xf3aa7b29, 0x217f3daf, 0x4ff326ee, 0xfc670b2d, 0x92eb106c, - 0x82bc8060, 0xec309b21, 0x5fa4b6e2, 0x3128ada3, 0xe3fdeb25, - 0x8d71f064, 0x3ee5dda7, 0x5069c6e6, 0x9e36506b, 0xf0ba4b2a, - 0x432e66e9, 0x2da27da8, 0xff773b2e, 0x91fb206f, 0x226f0dac, - 0x4ce316ed, 0x5cb486e1, 0x32389da0, 0x81acb063, 0xef20ab22, - 0x3df5eda4, 0x5379f6e5, 0xe0eddb26, 0x8e61c067, 0xc042fb3e, - 0xaecee07f, 0x1d5acdbc, 0x73d6d6fd, 0xa103907b, 0xcf8f8b3a, - 0x7c1ba6f9, 0x1297bdb8, 0x02c02db4, 0x6c4c36f5, 0xdfd81b36, - 0xb1540077, 0x638146f1, 0x0d0d5db0, 0xbe997073, 0xd0156b32, - 0x22df06c1, 0x4c531d80, 0xffc73043, 0x914b2b02, 0x439e6d84, - 0x2d1276c5, 0x9e865b06, 0xf00a4047, 0xe05dd04b, 0x8ed1cb0a, - 0x3d45e6c9, 0x53c9fd88, 0x811cbb0e, 0xef90a04f, 0x5c048d8c, - 0x328896cd, 0x7cabad94, 0x1227b6d5, 0xa1b39b16, 0xcf3f8057, - 0x1deac6d1, 0x7366dd90, 0xc0f2f053, 0xae7eeb12, 0xbe297b1e, - 0xd0a5605f, 0x63314d9c, 0x0dbd56dd, 0xdf68105b, 0xb1e40b1a, - 0x027026d9, 0x6cfc3d98, 0x3c95fb7e, 0x5219e03f, 0xe18dcdfc, - 0x8f01d6bd, 0x5dd4903b, 0x33588b7a, 0x80cca6b9, 0xee40bdf8, - 0xfe172df4, 0x909b36b5, 0x230f1b76, 0x4d830037, 0x9f5646b1, - 0xf1da5df0, 0x424e7033, 0x2cc26b72, 0x62e1502b, 0x0c6d4b6a, - 0xbff966a9, 0xd1757de8, 0x03a03b6e, 0x6d2c202f, 0xdeb80dec, - 0xb03416ad, 0xa06386a1, 0xceef9de0, 0x7d7bb023, 0x13f7ab62, - 0xc122ede4, 0xafaef6a5, 0x1c3adb66, 0x72b6c027, 0x807cadd4, - 0xeef0b695, 0x5d649b56, 0x33e88017, 0xe13dc691, 0x8fb1ddd0, - 0x3c25f013, 0x52a9eb52, 0x42fe7b5e, 0x2c72601f, 0x9fe64ddc, - 0xf16a569d, 0x23bf101b, 0x4d330b5a, 0xfea72699, 0x902b3dd8, - 0xde080681, 0xb0841dc0, 0x03103003, 0x6d9c2b42, 0xbf496dc4, - 0xd1c57685, 0x62515b46, 0x0cdd4007, 0x1c8ad00b, 0x7206cb4a, - 0xc192e689, 0xaf1efdc8, 0x7dcbbb4e, 0x1347a00f, 0xa0d38dcc, - 0xce5f968d}, - {0x00000000, 0xe71da697, 0x154a4b6f, 0xf257edf8, 0x2a9496de, - 0xcd893049, 0x3fdeddb1, 0xd8c37b26, 0x55292dbc, 0xb2348b2b, - 0x406366d3, 0xa77ec044, 0x7fbdbb62, 0x98a01df5, 0x6af7f00d, - 0x8dea569a, 0xaa525b78, 0x4d4ffdef, 0xbf181017, 0x5805b680, - 0x80c6cda6, 0x67db6b31, 0x958c86c9, 0x7291205e, 0xff7b76c4, - 0x1866d053, 0xea313dab, 0x0d2c9b3c, 0xd5efe01a, 0x32f2468d, - 0xc0a5ab75, 0x27b80de2, 0x8fd5b0b1, 0x68c81626, 0x9a9ffbde, - 0x7d825d49, 0xa541266f, 0x425c80f8, 0xb00b6d00, 0x5716cb97, - 0xdafc9d0d, 0x3de13b9a, 0xcfb6d662, 0x28ab70f5, 0xf0680bd3, - 0x1775ad44, 0xe52240bc, 0x023fe62b, 0x2587ebc9, 0xc29a4d5e, - 0x30cda0a6, 0xd7d00631, 0x0f137d17, 0xe80edb80, 0x1a593678, - 0xfd4490ef, 0x70aec675, 0x97b360e2, 0x65e48d1a, 0x82f92b8d, - 0x5a3a50ab, 0xbd27f63c, 0x4f701bc4, 0xa86dbd53, 0xc4da6723, - 0x23c7c1b4, 0xd1902c4c, 0x368d8adb, 0xee4ef1fd, 0x0953576a, - 0xfb04ba92, 0x1c191c05, 0x91f34a9f, 0x76eeec08, 0x84b901f0, - 0x63a4a767, 0xbb67dc41, 0x5c7a7ad6, 0xae2d972e, 0x493031b9, - 0x6e883c5b, 0x89959acc, 0x7bc27734, 0x9cdfd1a3, 0x441caa85, - 0xa3010c12, 0x5156e1ea, 0xb64b477d, 0x3ba111e7, 0xdcbcb770, - 0x2eeb5a88, 0xc9f6fc1f, 0x11358739, 0xf62821ae, 0x047fcc56, - 0xe3626ac1, 0x4b0fd792, 0xac127105, 0x5e459cfd, 0xb9583a6a, - 0x619b414c, 0x8686e7db, 0x74d10a23, 0x93ccacb4, 0x1e26fa2e, - 0xf93b5cb9, 0x0b6cb141, 0xec7117d6, 0x34b26cf0, 0xd3afca67, - 0x21f8279f, 0xc6e58108, 0xe15d8cea, 0x06402a7d, 0xf417c785, - 0x130a6112, 0xcbc91a34, 0x2cd4bca3, 0xde83515b, 0x399ef7cc, - 0xb474a156, 0x536907c1, 0xa13eea39, 0x46234cae, 0x9ee03788, - 0x79fd911f, 0x8baa7ce7, 0x6cb7da70, 0x52c5c807, 0xb5d86e90, - 0x478f8368, 0xa09225ff, 0x78515ed9, 0x9f4cf84e, 0x6d1b15b6, - 0x8a06b321, 0x07ece5bb, 0xe0f1432c, 0x12a6aed4, 0xf5bb0843, - 0x2d787365, 0xca65d5f2, 0x3832380a, 0xdf2f9e9d, 0xf897937f, - 0x1f8a35e8, 0xedddd810, 0x0ac07e87, 0xd20305a1, 0x351ea336, - 0xc7494ece, 0x2054e859, 0xadbebec3, 0x4aa31854, 0xb8f4f5ac, - 0x5fe9533b, 0x872a281d, 0x60378e8a, 0x92606372, 0x757dc5e5, - 0xdd1078b6, 0x3a0dde21, 0xc85a33d9, 0x2f47954e, 0xf784ee68, - 0x109948ff, 0xe2cea507, 0x05d30390, 0x8839550a, 0x6f24f39d, - 0x9d731e65, 0x7a6eb8f2, 0xa2adc3d4, 0x45b06543, 0xb7e788bb, - 0x50fa2e2c, 0x774223ce, 0x905f8559, 0x620868a1, 0x8515ce36, - 0x5dd6b510, 0xbacb1387, 0x489cfe7f, 0xaf8158e8, 0x226b0e72, - 0xc576a8e5, 0x3721451d, 0xd03ce38a, 0x08ff98ac, 0xefe23e3b, - 0x1db5d3c3, 0xfaa87554, 0x961faf24, 0x710209b3, 0x8355e44b, - 0x644842dc, 0xbc8b39fa, 0x5b969f6d, 0xa9c17295, 0x4edcd402, - 0xc3368298, 0x242b240f, 0xd67cc9f7, 0x31616f60, 0xe9a21446, - 0x0ebfb2d1, 0xfce85f29, 0x1bf5f9be, 0x3c4df45c, 0xdb5052cb, - 0x2907bf33, 0xce1a19a4, 0x16d96282, 0xf1c4c415, 0x039329ed, - 0xe48e8f7a, 0x6964d9e0, 0x8e797f77, 0x7c2e928f, 0x9b333418, - 0x43f04f3e, 0xa4ede9a9, 0x56ba0451, 0xb1a7a2c6, 0x19ca1f95, - 0xfed7b902, 0x0c8054fa, 0xeb9df26d, 0x335e894b, 0xd4432fdc, - 0x2614c224, 0xc10964b3, 0x4ce33229, 0xabfe94be, 0x59a97946, - 0xbeb4dfd1, 0x6677a4f7, 0x816a0260, 0x733def98, 0x9420490f, - 0xb39844ed, 0x5485e27a, 0xa6d20f82, 0x41cfa915, 0x990cd233, - 0x7e1174a4, 0x8c46995c, 0x6b5b3fcb, 0xe6b16951, 0x01accfc6, - 0xf3fb223e, 0x14e684a9, 0xcc25ff8f, 0x2b385918, 0xd96fb4e0, - 0x3e721277}, - {0x00000000, 0xa58b900e, 0x9066265d, 0x35edb653, 0xfbbd4afb, - 0x5e36daf5, 0x6bdb6ca6, 0xce50fca8, 0x2c0b93b7, 0x898003b9, - 0xbc6db5ea, 0x19e625e4, 0xd7b6d94c, 0x723d4942, 0x47d0ff11, - 0xe25b6f1f, 0x5817276e, 0xfd9cb760, 0xc8710133, 0x6dfa913d, - 0xa3aa6d95, 0x0621fd9b, 0x33cc4bc8, 0x9647dbc6, 0x741cb4d9, - 0xd19724d7, 0xe47a9284, 0x41f1028a, 0x8fa1fe22, 0x2a2a6e2c, - 0x1fc7d87f, 0xba4c4871, 0xb02e4edc, 0x15a5ded2, 0x20486881, - 0x85c3f88f, 0x4b930427, 0xee189429, 0xdbf5227a, 0x7e7eb274, - 0x9c25dd6b, 0x39ae4d65, 0x0c43fb36, 0xa9c86b38, 0x67989790, - 0xc213079e, 0xf7feb1cd, 0x527521c3, 0xe83969b2, 0x4db2f9bc, - 0x785f4fef, 0xddd4dfe1, 0x13842349, 0xb60fb347, 0x83e20514, - 0x2669951a, 0xc432fa05, 0x61b96a0b, 0x5454dc58, 0xf1df4c56, - 0x3f8fb0fe, 0x9a0420f0, 0xafe996a3, 0x0a6206ad, 0xbb2d9bf9, - 0x1ea60bf7, 0x2b4bbda4, 0x8ec02daa, 0x4090d102, 0xe51b410c, - 0xd0f6f75f, 0x757d6751, 0x9726084e, 0x32ad9840, 0x07402e13, - 0xa2cbbe1d, 0x6c9b42b5, 0xc910d2bb, 0xfcfd64e8, 0x5976f4e6, - 0xe33abc97, 0x46b12c99, 0x735c9aca, 0xd6d70ac4, 0x1887f66c, - 0xbd0c6662, 0x88e1d031, 0x2d6a403f, 0xcf312f20, 0x6ababf2e, - 0x5f57097d, 0xfadc9973, 0x348c65db, 0x9107f5d5, 0xa4ea4386, - 0x0161d388, 0x0b03d525, 0xae88452b, 0x9b65f378, 0x3eee6376, - 0xf0be9fde, 0x55350fd0, 0x60d8b983, 0xc553298d, 0x27084692, - 0x8283d69c, 0xb76e60cf, 0x12e5f0c1, 0xdcb50c69, 0x793e9c67, - 0x4cd32a34, 0xe958ba3a, 0x5314f24b, 0xf69f6245, 0xc372d416, - 0x66f94418, 0xa8a9b8b0, 0x0d2228be, 0x38cf9eed, 0x9d440ee3, - 0x7f1f61fc, 0xda94f1f2, 0xef7947a1, 0x4af2d7af, 0x84a22b07, - 0x2129bb09, 0x14c40d5a, 0xb14f9d54, 0xad2a31b3, 0x08a1a1bd, - 0x3d4c17ee, 0x98c787e0, 0x56977b48, 0xf31ceb46, 0xc6f15d15, - 0x637acd1b, 0x8121a204, 0x24aa320a, 0x11478459, 0xb4cc1457, - 0x7a9ce8ff, 0xdf1778f1, 0xeafacea2, 0x4f715eac, 0xf53d16dd, - 0x50b686d3, 0x655b3080, 0xc0d0a08e, 0x0e805c26, 0xab0bcc28, - 0x9ee67a7b, 0x3b6dea75, 0xd936856a, 0x7cbd1564, 0x4950a337, - 0xecdb3339, 0x228bcf91, 0x87005f9f, 0xb2ede9cc, 0x176679c2, - 0x1d047f6f, 0xb88fef61, 0x8d625932, 0x28e9c93c, 0xe6b93594, - 0x4332a59a, 0x76df13c9, 0xd35483c7, 0x310fecd8, 0x94847cd6, - 0xa169ca85, 0x04e25a8b, 0xcab2a623, 0x6f39362d, 0x5ad4807e, - 0xff5f1070, 0x45135801, 0xe098c80f, 0xd5757e5c, 0x70feee52, - 0xbeae12fa, 0x1b2582f4, 0x2ec834a7, 0x8b43a4a9, 0x6918cbb6, - 0xcc935bb8, 0xf97eedeb, 0x5cf57de5, 0x92a5814d, 0x372e1143, - 0x02c3a710, 0xa748371e, 0x1607aa4a, 0xb38c3a44, 0x86618c17, - 0x23ea1c19, 0xedbae0b1, 0x483170bf, 0x7ddcc6ec, 0xd85756e2, - 0x3a0c39fd, 0x9f87a9f3, 0xaa6a1fa0, 0x0fe18fae, 0xc1b17306, - 0x643ae308, 0x51d7555b, 0xf45cc555, 0x4e108d24, 0xeb9b1d2a, - 0xde76ab79, 0x7bfd3b77, 0xb5adc7df, 0x102657d1, 0x25cbe182, - 0x8040718c, 0x621b1e93, 0xc7908e9d, 0xf27d38ce, 0x57f6a8c0, - 0x99a65468, 0x3c2dc466, 0x09c07235, 0xac4be23b, 0xa629e496, - 0x03a27498, 0x364fc2cb, 0x93c452c5, 0x5d94ae6d, 0xf81f3e63, - 0xcdf28830, 0x6879183e, 0x8a227721, 0x2fa9e72f, 0x1a44517c, - 0xbfcfc172, 0x719f3dda, 0xd414add4, 0xe1f91b87, 0x44728b89, - 0xfe3ec3f8, 0x5bb553f6, 0x6e58e5a5, 0xcbd375ab, 0x05838903, - 0xa008190d, 0x95e5af5e, 0x306e3f50, 0xd235504f, 0x77bec041, - 0x42537612, 0xe7d8e61c, 0x29881ab4, 0x8c038aba, 0xb9ee3ce9, - 0x1c65ace7}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0x0e908ba500000000, 0x5d26669000000000, - 0x53b6ed3500000000, 0xfb4abdfb00000000, 0xf5da365e00000000, - 0xa66cdb6b00000000, 0xa8fc50ce00000000, 0xb7930b2c00000000, - 0xb903808900000000, 0xeab56dbc00000000, 0xe425e61900000000, - 0x4cd9b6d700000000, 0x42493d7200000000, 0x11ffd04700000000, - 0x1f6f5be200000000, 0x6e27175800000000, 0x60b79cfd00000000, - 0x330171c800000000, 0x3d91fa6d00000000, 0x956daaa300000000, - 0x9bfd210600000000, 0xc84bcc3300000000, 0xc6db479600000000, - 0xd9b41c7400000000, 0xd72497d100000000, 0x84927ae400000000, - 0x8a02f14100000000, 0x22fea18f00000000, 0x2c6e2a2a00000000, - 0x7fd8c71f00000000, 0x71484cba00000000, 0xdc4e2eb000000000, - 0xd2dea51500000000, 0x8168482000000000, 0x8ff8c38500000000, - 0x2704934b00000000, 0x299418ee00000000, 0x7a22f5db00000000, - 0x74b27e7e00000000, 0x6bdd259c00000000, 0x654dae3900000000, - 0x36fb430c00000000, 0x386bc8a900000000, 0x9097986700000000, - 0x9e0713c200000000, 0xcdb1fef700000000, 0xc321755200000000, - 0xb26939e800000000, 0xbcf9b24d00000000, 0xef4f5f7800000000, - 0xe1dfd4dd00000000, 0x4923841300000000, 0x47b30fb600000000, - 0x1405e28300000000, 0x1a95692600000000, 0x05fa32c400000000, - 0x0b6ab96100000000, 0x58dc545400000000, 0x564cdff100000000, - 0xfeb08f3f00000000, 0xf020049a00000000, 0xa396e9af00000000, - 0xad06620a00000000, 0xf99b2dbb00000000, 0xf70ba61e00000000, - 0xa4bd4b2b00000000, 0xaa2dc08e00000000, 0x02d1904000000000, - 0x0c411be500000000, 0x5ff7f6d000000000, 0x51677d7500000000, - 0x4e08269700000000, 0x4098ad3200000000, 0x132e400700000000, - 0x1dbecba200000000, 0xb5429b6c00000000, 0xbbd210c900000000, - 0xe864fdfc00000000, 0xe6f4765900000000, 0x97bc3ae300000000, - 0x992cb14600000000, 0xca9a5c7300000000, 0xc40ad7d600000000, - 0x6cf6871800000000, 0x62660cbd00000000, 0x31d0e18800000000, - 0x3f406a2d00000000, 0x202f31cf00000000, 0x2ebfba6a00000000, - 0x7d09575f00000000, 0x7399dcfa00000000, 0xdb658c3400000000, - 0xd5f5079100000000, 0x8643eaa400000000, 0x88d3610100000000, - 0x25d5030b00000000, 0x2b4588ae00000000, 0x78f3659b00000000, - 0x7663ee3e00000000, 0xde9fbef000000000, 0xd00f355500000000, - 0x83b9d86000000000, 0x8d2953c500000000, 0x9246082700000000, - 0x9cd6838200000000, 0xcf606eb700000000, 0xc1f0e51200000000, - 0x690cb5dc00000000, 0x679c3e7900000000, 0x342ad34c00000000, - 0x3aba58e900000000, 0x4bf2145300000000, 0x45629ff600000000, - 0x16d472c300000000, 0x1844f96600000000, 0xb0b8a9a800000000, - 0xbe28220d00000000, 0xed9ecf3800000000, 0xe30e449d00000000, - 0xfc611f7f00000000, 0xf2f194da00000000, 0xa14779ef00000000, - 0xafd7f24a00000000, 0x072ba28400000000, 0x09bb292100000000, - 0x5a0dc41400000000, 0x549d4fb100000000, 0xb3312aad00000000, - 0xbda1a10800000000, 0xee174c3d00000000, 0xe087c79800000000, - 0x487b975600000000, 0x46eb1cf300000000, 0x155df1c600000000, - 0x1bcd7a6300000000, 0x04a2218100000000, 0x0a32aa2400000000, - 0x5984471100000000, 0x5714ccb400000000, 0xffe89c7a00000000, - 0xf17817df00000000, 0xa2cefaea00000000, 0xac5e714f00000000, - 0xdd163df500000000, 0xd386b65000000000, 0x80305b6500000000, - 0x8ea0d0c000000000, 0x265c800e00000000, 0x28cc0bab00000000, - 0x7b7ae69e00000000, 0x75ea6d3b00000000, 0x6a8536d900000000, - 0x6415bd7c00000000, 0x37a3504900000000, 0x3933dbec00000000, - 0x91cf8b2200000000, 0x9f5f008700000000, 0xcce9edb200000000, - 0xc279661700000000, 0x6f7f041d00000000, 0x61ef8fb800000000, - 0x3259628d00000000, 0x3cc9e92800000000, 0x9435b9e600000000, - 0x9aa5324300000000, 0xc913df7600000000, 0xc78354d300000000, - 0xd8ec0f3100000000, 0xd67c849400000000, 0x85ca69a100000000, - 0x8b5ae20400000000, 0x23a6b2ca00000000, 0x2d36396f00000000, - 0x7e80d45a00000000, 0x70105fff00000000, 0x0158134500000000, - 0x0fc898e000000000, 0x5c7e75d500000000, 0x52eefe7000000000, - 0xfa12aebe00000000, 0xf482251b00000000, 0xa734c82e00000000, - 0xa9a4438b00000000, 0xb6cb186900000000, 0xb85b93cc00000000, - 0xebed7ef900000000, 0xe57df55c00000000, 0x4d81a59200000000, - 0x43112e3700000000, 0x10a7c30200000000, 0x1e3748a700000000, - 0x4aaa071600000000, 0x443a8cb300000000, 0x178c618600000000, - 0x191cea2300000000, 0xb1e0baed00000000, 0xbf70314800000000, - 0xecc6dc7d00000000, 0xe25657d800000000, 0xfd390c3a00000000, - 0xf3a9879f00000000, 0xa01f6aaa00000000, 0xae8fe10f00000000, - 0x0673b1c100000000, 0x08e33a6400000000, 0x5b55d75100000000, - 0x55c55cf400000000, 0x248d104e00000000, 0x2a1d9beb00000000, - 0x79ab76de00000000, 0x773bfd7b00000000, 0xdfc7adb500000000, - 0xd157261000000000, 0x82e1cb2500000000, 0x8c71408000000000, - 0x931e1b6200000000, 0x9d8e90c700000000, 0xce387df200000000, - 0xc0a8f65700000000, 0x6854a69900000000, 0x66c42d3c00000000, - 0x3572c00900000000, 0x3be24bac00000000, 0x96e429a600000000, - 0x9874a20300000000, 0xcbc24f3600000000, 0xc552c49300000000, - 0x6dae945d00000000, 0x633e1ff800000000, 0x3088f2cd00000000, - 0x3e18796800000000, 0x2177228a00000000, 0x2fe7a92f00000000, - 0x7c51441a00000000, 0x72c1cfbf00000000, 0xda3d9f7100000000, - 0xd4ad14d400000000, 0x871bf9e100000000, 0x898b724400000000, - 0xf8c33efe00000000, 0xf653b55b00000000, 0xa5e5586e00000000, - 0xab75d3cb00000000, 0x0389830500000000, 0x0d1908a000000000, - 0x5eafe59500000000, 0x503f6e3000000000, 0x4f5035d200000000, - 0x41c0be7700000000, 0x1276534200000000, 0x1ce6d8e700000000, - 0xb41a882900000000, 0xba8a038c00000000, 0xe93ceeb900000000, - 0xe7ac651c00000000}, - {0x0000000000000000, 0x97a61de700000000, 0x6f4b4a1500000000, - 0xf8ed57f200000000, 0xde96942a00000000, 0x493089cd00000000, - 0xb1ddde3f00000000, 0x267bc3d800000000, 0xbc2d295500000000, - 0x2b8b34b200000000, 0xd366634000000000, 0x44c07ea700000000, - 0x62bbbd7f00000000, 0xf51da09800000000, 0x0df0f76a00000000, - 0x9a56ea8d00000000, 0x785b52aa00000000, 0xeffd4f4d00000000, - 0x171018bf00000000, 0x80b6055800000000, 0xa6cdc68000000000, - 0x316bdb6700000000, 0xc9868c9500000000, 0x5e20917200000000, - 0xc4767bff00000000, 0x53d0661800000000, 0xab3d31ea00000000, - 0x3c9b2c0d00000000, 0x1ae0efd500000000, 0x8d46f23200000000, - 0x75aba5c000000000, 0xe20db82700000000, 0xb1b0d58f00000000, - 0x2616c86800000000, 0xdefb9f9a00000000, 0x495d827d00000000, - 0x6f2641a500000000, 0xf8805c4200000000, 0x006d0bb000000000, - 0x97cb165700000000, 0x0d9dfcda00000000, 0x9a3be13d00000000, - 0x62d6b6cf00000000, 0xf570ab2800000000, 0xd30b68f000000000, - 0x44ad751700000000, 0xbc4022e500000000, 0x2be63f0200000000, - 0xc9eb872500000000, 0x5e4d9ac200000000, 0xa6a0cd3000000000, - 0x3106d0d700000000, 0x177d130f00000000, 0x80db0ee800000000, - 0x7836591a00000000, 0xef9044fd00000000, 0x75c6ae7000000000, - 0xe260b39700000000, 0x1a8de46500000000, 0x8d2bf98200000000, - 0xab503a5a00000000, 0x3cf627bd00000000, 0xc41b704f00000000, - 0x53bd6da800000000, 0x2367dac400000000, 0xb4c1c72300000000, - 0x4c2c90d100000000, 0xdb8a8d3600000000, 0xfdf14eee00000000, - 0x6a57530900000000, 0x92ba04fb00000000, 0x051c191c00000000, - 0x9f4af39100000000, 0x08ecee7600000000, 0xf001b98400000000, - 0x67a7a46300000000, 0x41dc67bb00000000, 0xd67a7a5c00000000, - 0x2e972dae00000000, 0xb931304900000000, 0x5b3c886e00000000, - 0xcc9a958900000000, 0x3477c27b00000000, 0xa3d1df9c00000000, - 0x85aa1c4400000000, 0x120c01a300000000, 0xeae1565100000000, - 0x7d474bb600000000, 0xe711a13b00000000, 0x70b7bcdc00000000, - 0x885aeb2e00000000, 0x1ffcf6c900000000, 0x3987351100000000, - 0xae2128f600000000, 0x56cc7f0400000000, 0xc16a62e300000000, - 0x92d70f4b00000000, 0x057112ac00000000, 0xfd9c455e00000000, - 0x6a3a58b900000000, 0x4c419b6100000000, 0xdbe7868600000000, - 0x230ad17400000000, 0xb4accc9300000000, 0x2efa261e00000000, - 0xb95c3bf900000000, 0x41b16c0b00000000, 0xd61771ec00000000, - 0xf06cb23400000000, 0x67caafd300000000, 0x9f27f82100000000, - 0x0881e5c600000000, 0xea8c5de100000000, 0x7d2a400600000000, - 0x85c717f400000000, 0x12610a1300000000, 0x341ac9cb00000000, - 0xa3bcd42c00000000, 0x5b5183de00000000, 0xccf79e3900000000, - 0x56a174b400000000, 0xc107695300000000, 0x39ea3ea100000000, - 0xae4c234600000000, 0x8837e09e00000000, 0x1f91fd7900000000, - 0xe77caa8b00000000, 0x70dab76c00000000, 0x07c8c55200000000, - 0x906ed8b500000000, 0x68838f4700000000, 0xff2592a000000000, - 0xd95e517800000000, 0x4ef84c9f00000000, 0xb6151b6d00000000, - 0x21b3068a00000000, 0xbbe5ec0700000000, 0x2c43f1e000000000, - 0xd4aea61200000000, 0x4308bbf500000000, 0x6573782d00000000, - 0xf2d565ca00000000, 0x0a38323800000000, 0x9d9e2fdf00000000, - 0x7f9397f800000000, 0xe8358a1f00000000, 0x10d8dded00000000, - 0x877ec00a00000000, 0xa10503d200000000, 0x36a31e3500000000, - 0xce4e49c700000000, 0x59e8542000000000, 0xc3bebead00000000, - 0x5418a34a00000000, 0xacf5f4b800000000, 0x3b53e95f00000000, - 0x1d282a8700000000, 0x8a8e376000000000, 0x7263609200000000, - 0xe5c57d7500000000, 0xb67810dd00000000, 0x21de0d3a00000000, - 0xd9335ac800000000, 0x4e95472f00000000, 0x68ee84f700000000, - 0xff48991000000000, 0x07a5cee200000000, 0x9003d30500000000, - 0x0a55398800000000, 0x9df3246f00000000, 0x651e739d00000000, - 0xf2b86e7a00000000, 0xd4c3ada200000000, 0x4365b04500000000, - 0xbb88e7b700000000, 0x2c2efa5000000000, 0xce23427700000000, - 0x59855f9000000000, 0xa168086200000000, 0x36ce158500000000, - 0x10b5d65d00000000, 0x8713cbba00000000, 0x7ffe9c4800000000, - 0xe85881af00000000, 0x720e6b2200000000, 0xe5a876c500000000, - 0x1d45213700000000, 0x8ae33cd000000000, 0xac98ff0800000000, - 0x3b3ee2ef00000000, 0xc3d3b51d00000000, 0x5475a8fa00000000, - 0x24af1f9600000000, 0xb309027100000000, 0x4be4558300000000, - 0xdc42486400000000, 0xfa398bbc00000000, 0x6d9f965b00000000, - 0x9572c1a900000000, 0x02d4dc4e00000000, 0x988236c300000000, - 0x0f242b2400000000, 0xf7c97cd600000000, 0x606f613100000000, - 0x4614a2e900000000, 0xd1b2bf0e00000000, 0x295fe8fc00000000, - 0xbef9f51b00000000, 0x5cf44d3c00000000, 0xcb5250db00000000, - 0x33bf072900000000, 0xa4191ace00000000, 0x8262d91600000000, - 0x15c4c4f100000000, 0xed29930300000000, 0x7a8f8ee400000000, - 0xe0d9646900000000, 0x777f798e00000000, 0x8f922e7c00000000, - 0x1834339b00000000, 0x3e4ff04300000000, 0xa9e9eda400000000, - 0x5104ba5600000000, 0xc6a2a7b100000000, 0x951fca1900000000, - 0x02b9d7fe00000000, 0xfa54800c00000000, 0x6df29deb00000000, - 0x4b895e3300000000, 0xdc2f43d400000000, 0x24c2142600000000, - 0xb36409c100000000, 0x2932e34c00000000, 0xbe94feab00000000, - 0x4679a95900000000, 0xd1dfb4be00000000, 0xf7a4776600000000, - 0x60026a8100000000, 0x98ef3d7300000000, 0x0f49209400000000, - 0xed4498b300000000, 0x7ae2855400000000, 0x820fd2a600000000, - 0x15a9cf4100000000, 0x33d20c9900000000, 0xa474117e00000000, - 0x5c99468c00000000, 0xcb3f5b6b00000000, 0x5169b1e600000000, - 0xc6cfac0100000000, 0x3e22fbf300000000, 0xa984e61400000000, - 0x8fff25cc00000000, 0x1859382b00000000, 0xe0b46fd900000000, - 0x7712723e00000000}, - {0x0000000000000000, 0x411b8c6e00000000, 0x823618dd00000000, - 0xc32d94b300000000, 0x456b416100000000, 0x0470cd0f00000000, - 0xc75d59bc00000000, 0x8646d5d200000000, 0x8ad682c200000000, - 0xcbcd0eac00000000, 0x08e09a1f00000000, 0x49fb167100000000, - 0xcfbdc3a300000000, 0x8ea64fcd00000000, 0x4d8bdb7e00000000, - 0x0c90571000000000, 0x55ab745e00000000, 0x14b0f83000000000, - 0xd79d6c8300000000, 0x9686e0ed00000000, 0x10c0353f00000000, - 0x51dbb95100000000, 0x92f62de200000000, 0xd3eda18c00000000, - 0xdf7df69c00000000, 0x9e667af200000000, 0x5d4bee4100000000, - 0x1c50622f00000000, 0x9a16b7fd00000000, 0xdb0d3b9300000000, - 0x1820af2000000000, 0x593b234e00000000, 0xaa56e9bc00000000, - 0xeb4d65d200000000, 0x2860f16100000000, 0x697b7d0f00000000, - 0xef3da8dd00000000, 0xae2624b300000000, 0x6d0bb00000000000, - 0x2c103c6e00000000, 0x20806b7e00000000, 0x619be71000000000, - 0xa2b673a300000000, 0xe3adffcd00000000, 0x65eb2a1f00000000, - 0x24f0a67100000000, 0xe7dd32c200000000, 0xa6c6beac00000000, - 0xfffd9de200000000, 0xbee6118c00000000, 0x7dcb853f00000000, - 0x3cd0095100000000, 0xba96dc8300000000, 0xfb8d50ed00000000, - 0x38a0c45e00000000, 0x79bb483000000000, 0x752b1f2000000000, - 0x3430934e00000000, 0xf71d07fd00000000, 0xb6068b9300000000, - 0x30405e4100000000, 0x715bd22f00000000, 0xb276469c00000000, - 0xf36dcaf200000000, 0x15aba3a200000000, 0x54b02fcc00000000, - 0x979dbb7f00000000, 0xd686371100000000, 0x50c0e2c300000000, - 0x11db6ead00000000, 0xd2f6fa1e00000000, 0x93ed767000000000, - 0x9f7d216000000000, 0xde66ad0e00000000, 0x1d4b39bd00000000, - 0x5c50b5d300000000, 0xda16600100000000, 0x9b0dec6f00000000, - 0x582078dc00000000, 0x193bf4b200000000, 0x4000d7fc00000000, - 0x011b5b9200000000, 0xc236cf2100000000, 0x832d434f00000000, - 0x056b969d00000000, 0x44701af300000000, 0x875d8e4000000000, - 0xc646022e00000000, 0xcad6553e00000000, 0x8bcdd95000000000, - 0x48e04de300000000, 0x09fbc18d00000000, 0x8fbd145f00000000, - 0xcea6983100000000, 0x0d8b0c8200000000, 0x4c9080ec00000000, - 0xbffd4a1e00000000, 0xfee6c67000000000, 0x3dcb52c300000000, - 0x7cd0dead00000000, 0xfa960b7f00000000, 0xbb8d871100000000, - 0x78a013a200000000, 0x39bb9fcc00000000, 0x352bc8dc00000000, - 0x743044b200000000, 0xb71dd00100000000, 0xf6065c6f00000000, - 0x704089bd00000000, 0x315b05d300000000, 0xf276916000000000, - 0xb36d1d0e00000000, 0xea563e4000000000, 0xab4db22e00000000, - 0x6860269d00000000, 0x297baaf300000000, 0xaf3d7f2100000000, - 0xee26f34f00000000, 0x2d0b67fc00000000, 0x6c10eb9200000000, - 0x6080bc8200000000, 0x219b30ec00000000, 0xe2b6a45f00000000, - 0xa3ad283100000000, 0x25ebfde300000000, 0x64f0718d00000000, - 0xa7dde53e00000000, 0xe6c6695000000000, 0x6b50369e00000000, - 0x2a4bbaf000000000, 0xe9662e4300000000, 0xa87da22d00000000, - 0x2e3b77ff00000000, 0x6f20fb9100000000, 0xac0d6f2200000000, - 0xed16e34c00000000, 0xe186b45c00000000, 0xa09d383200000000, - 0x63b0ac8100000000, 0x22ab20ef00000000, 0xa4edf53d00000000, - 0xe5f6795300000000, 0x26dbede000000000, 0x67c0618e00000000, - 0x3efb42c000000000, 0x7fe0ceae00000000, 0xbccd5a1d00000000, - 0xfdd6d67300000000, 0x7b9003a100000000, 0x3a8b8fcf00000000, - 0xf9a61b7c00000000, 0xb8bd971200000000, 0xb42dc00200000000, - 0xf5364c6c00000000, 0x361bd8df00000000, 0x770054b100000000, - 0xf146816300000000, 0xb05d0d0d00000000, 0x737099be00000000, - 0x326b15d000000000, 0xc106df2200000000, 0x801d534c00000000, - 0x4330c7ff00000000, 0x022b4b9100000000, 0x846d9e4300000000, - 0xc576122d00000000, 0x065b869e00000000, 0x47400af000000000, - 0x4bd05de000000000, 0x0acbd18e00000000, 0xc9e6453d00000000, - 0x88fdc95300000000, 0x0ebb1c8100000000, 0x4fa090ef00000000, - 0x8c8d045c00000000, 0xcd96883200000000, 0x94adab7c00000000, - 0xd5b6271200000000, 0x169bb3a100000000, 0x57803fcf00000000, - 0xd1c6ea1d00000000, 0x90dd667300000000, 0x53f0f2c000000000, - 0x12eb7eae00000000, 0x1e7b29be00000000, 0x5f60a5d000000000, - 0x9c4d316300000000, 0xdd56bd0d00000000, 0x5b1068df00000000, - 0x1a0be4b100000000, 0xd926700200000000, 0x983dfc6c00000000, - 0x7efb953c00000000, 0x3fe0195200000000, 0xfccd8de100000000, - 0xbdd6018f00000000, 0x3b90d45d00000000, 0x7a8b583300000000, - 0xb9a6cc8000000000, 0xf8bd40ee00000000, 0xf42d17fe00000000, - 0xb5369b9000000000, 0x761b0f2300000000, 0x3700834d00000000, - 0xb146569f00000000, 0xf05ddaf100000000, 0x33704e4200000000, - 0x726bc22c00000000, 0x2b50e16200000000, 0x6a4b6d0c00000000, - 0xa966f9bf00000000, 0xe87d75d100000000, 0x6e3ba00300000000, - 0x2f202c6d00000000, 0xec0db8de00000000, 0xad1634b000000000, - 0xa18663a000000000, 0xe09defce00000000, 0x23b07b7d00000000, - 0x62abf71300000000, 0xe4ed22c100000000, 0xa5f6aeaf00000000, - 0x66db3a1c00000000, 0x27c0b67200000000, 0xd4ad7c8000000000, - 0x95b6f0ee00000000, 0x569b645d00000000, 0x1780e83300000000, - 0x91c63de100000000, 0xd0ddb18f00000000, 0x13f0253c00000000, - 0x52eba95200000000, 0x5e7bfe4200000000, 0x1f60722c00000000, - 0xdc4de69f00000000, 0x9d566af100000000, 0x1b10bf2300000000, - 0x5a0b334d00000000, 0x9926a7fe00000000, 0xd83d2b9000000000, - 0x810608de00000000, 0xc01d84b000000000, 0x0330100300000000, - 0x422b9c6d00000000, 0xc46d49bf00000000, 0x8576c5d100000000, - 0x465b516200000000, 0x0740dd0c00000000, 0x0bd08a1c00000000, - 0x4acb067200000000, 0x89e692c100000000, 0xc8fd1eaf00000000, - 0x4ebbcb7d00000000, 0x0fa0471300000000, 0xcc8dd3a000000000, - 0x8d965fce00000000}, - {0x0000000000000000, 0x1dfdb50100000000, 0x3afa6b0300000000, - 0x2707de0200000000, 0x74f4d70600000000, 0x6909620700000000, - 0x4e0ebc0500000000, 0x53f3090400000000, 0xe8e8af0d00000000, - 0xf5151a0c00000000, 0xd212c40e00000000, 0xcfef710f00000000, - 0x9c1c780b00000000, 0x81e1cd0a00000000, 0xa6e6130800000000, - 0xbb1ba60900000000, 0xd0d15f1b00000000, 0xcd2cea1a00000000, - 0xea2b341800000000, 0xf7d6811900000000, 0xa425881d00000000, - 0xb9d83d1c00000000, 0x9edfe31e00000000, 0x8322561f00000000, - 0x3839f01600000000, 0x25c4451700000000, 0x02c39b1500000000, - 0x1f3e2e1400000000, 0x4ccd271000000000, 0x5130921100000000, - 0x76374c1300000000, 0x6bcaf91200000000, 0xa0a3bf3600000000, - 0xbd5e0a3700000000, 0x9a59d43500000000, 0x87a4613400000000, - 0xd457683000000000, 0xc9aadd3100000000, 0xeead033300000000, - 0xf350b63200000000, 0x484b103b00000000, 0x55b6a53a00000000, - 0x72b17b3800000000, 0x6f4cce3900000000, 0x3cbfc73d00000000, - 0x2142723c00000000, 0x0645ac3e00000000, 0x1bb8193f00000000, - 0x7072e02d00000000, 0x6d8f552c00000000, 0x4a888b2e00000000, - 0x57753e2f00000000, 0x0486372b00000000, 0x197b822a00000000, - 0x3e7c5c2800000000, 0x2381e92900000000, 0x989a4f2000000000, - 0x8567fa2100000000, 0xa260242300000000, 0xbf9d912200000000, - 0xec6e982600000000, 0xf1932d2700000000, 0xd694f32500000000, - 0xcb69462400000000, 0x40477f6d00000000, 0x5dbaca6c00000000, - 0x7abd146e00000000, 0x6740a16f00000000, 0x34b3a86b00000000, - 0x294e1d6a00000000, 0x0e49c36800000000, 0x13b4766900000000, - 0xa8afd06000000000, 0xb552656100000000, 0x9255bb6300000000, - 0x8fa80e6200000000, 0xdc5b076600000000, 0xc1a6b26700000000, - 0xe6a16c6500000000, 0xfb5cd96400000000, 0x9096207600000000, - 0x8d6b957700000000, 0xaa6c4b7500000000, 0xb791fe7400000000, - 0xe462f77000000000, 0xf99f427100000000, 0xde989c7300000000, - 0xc365297200000000, 0x787e8f7b00000000, 0x65833a7a00000000, - 0x4284e47800000000, 0x5f79517900000000, 0x0c8a587d00000000, - 0x1177ed7c00000000, 0x3670337e00000000, 0x2b8d867f00000000, - 0xe0e4c05b00000000, 0xfd19755a00000000, 0xda1eab5800000000, - 0xc7e31e5900000000, 0x9410175d00000000, 0x89eda25c00000000, - 0xaeea7c5e00000000, 0xb317c95f00000000, 0x080c6f5600000000, - 0x15f1da5700000000, 0x32f6045500000000, 0x2f0bb15400000000, - 0x7cf8b85000000000, 0x61050d5100000000, 0x4602d35300000000, - 0x5bff665200000000, 0x30359f4000000000, 0x2dc82a4100000000, - 0x0acff44300000000, 0x1732414200000000, 0x44c1484600000000, - 0x593cfd4700000000, 0x7e3b234500000000, 0x63c6964400000000, - 0xd8dd304d00000000, 0xc520854c00000000, 0xe2275b4e00000000, - 0xffdaee4f00000000, 0xac29e74b00000000, 0xb1d4524a00000000, - 0x96d38c4800000000, 0x8b2e394900000000, 0x808efeda00000000, - 0x9d734bdb00000000, 0xba7495d900000000, 0xa78920d800000000, - 0xf47a29dc00000000, 0xe9879cdd00000000, 0xce8042df00000000, - 0xd37df7de00000000, 0x686651d700000000, 0x759be4d600000000, - 0x529c3ad400000000, 0x4f618fd500000000, 0x1c9286d100000000, - 0x016f33d000000000, 0x2668edd200000000, 0x3b9558d300000000, - 0x505fa1c100000000, 0x4da214c000000000, 0x6aa5cac200000000, - 0x77587fc300000000, 0x24ab76c700000000, 0x3956c3c600000000, - 0x1e511dc400000000, 0x03aca8c500000000, 0xb8b70ecc00000000, - 0xa54abbcd00000000, 0x824d65cf00000000, 0x9fb0d0ce00000000, - 0xcc43d9ca00000000, 0xd1be6ccb00000000, 0xf6b9b2c900000000, - 0xeb4407c800000000, 0x202d41ec00000000, 0x3dd0f4ed00000000, - 0x1ad72aef00000000, 0x072a9fee00000000, 0x54d996ea00000000, - 0x492423eb00000000, 0x6e23fde900000000, 0x73de48e800000000, - 0xc8c5eee100000000, 0xd5385be000000000, 0xf23f85e200000000, - 0xefc230e300000000, 0xbc3139e700000000, 0xa1cc8ce600000000, - 0x86cb52e400000000, 0x9b36e7e500000000, 0xf0fc1ef700000000, - 0xed01abf600000000, 0xca0675f400000000, 0xd7fbc0f500000000, - 0x8408c9f100000000, 0x99f57cf000000000, 0xbef2a2f200000000, - 0xa30f17f300000000, 0x1814b1fa00000000, 0x05e904fb00000000, - 0x22eedaf900000000, 0x3f136ff800000000, 0x6ce066fc00000000, - 0x711dd3fd00000000, 0x561a0dff00000000, 0x4be7b8fe00000000, - 0xc0c981b700000000, 0xdd3434b600000000, 0xfa33eab400000000, - 0xe7ce5fb500000000, 0xb43d56b100000000, 0xa9c0e3b000000000, - 0x8ec73db200000000, 0x933a88b300000000, 0x28212eba00000000, - 0x35dc9bbb00000000, 0x12db45b900000000, 0x0f26f0b800000000, - 0x5cd5f9bc00000000, 0x41284cbd00000000, 0x662f92bf00000000, - 0x7bd227be00000000, 0x1018deac00000000, 0x0de56bad00000000, - 0x2ae2b5af00000000, 0x371f00ae00000000, 0x64ec09aa00000000, - 0x7911bcab00000000, 0x5e1662a900000000, 0x43ebd7a800000000, - 0xf8f071a100000000, 0xe50dc4a000000000, 0xc20a1aa200000000, - 0xdff7afa300000000, 0x8c04a6a700000000, 0x91f913a600000000, - 0xb6fecda400000000, 0xab0378a500000000, 0x606a3e8100000000, - 0x7d978b8000000000, 0x5a90558200000000, 0x476de08300000000, - 0x149ee98700000000, 0x09635c8600000000, 0x2e64828400000000, - 0x3399378500000000, 0x8882918c00000000, 0x957f248d00000000, - 0xb278fa8f00000000, 0xaf854f8e00000000, 0xfc76468a00000000, - 0xe18bf38b00000000, 0xc68c2d8900000000, 0xdb71988800000000, - 0xb0bb619a00000000, 0xad46d49b00000000, 0x8a410a9900000000, - 0x97bcbf9800000000, 0xc44fb69c00000000, 0xd9b2039d00000000, - 0xfeb5dd9f00000000, 0xe348689e00000000, 0x5853ce9700000000, - 0x45ae7b9600000000, 0x62a9a59400000000, 0x7f54109500000000, - 0x2ca7199100000000, 0x315aac9000000000, 0x165d729200000000, - 0x0ba0c79300000000}, - {0x0000000000000000, 0x24d9076300000000, 0x48b20fc600000000, - 0x6c6b08a500000000, 0xd1626e5700000000, 0xf5bb693400000000, - 0x99d0619100000000, 0xbd0966f200000000, 0xa2c5dcae00000000, - 0x861cdbcd00000000, 0xea77d36800000000, 0xceaed40b00000000, - 0x73a7b2f900000000, 0x577eb59a00000000, 0x3b15bd3f00000000, - 0x1fccba5c00000000, 0x058dc88600000000, 0x2154cfe500000000, - 0x4d3fc74000000000, 0x69e6c02300000000, 0xd4efa6d100000000, - 0xf036a1b200000000, 0x9c5da91700000000, 0xb884ae7400000000, - 0xa748142800000000, 0x8391134b00000000, 0xeffa1bee00000000, - 0xcb231c8d00000000, 0x762a7a7f00000000, 0x52f37d1c00000000, - 0x3e9875b900000000, 0x1a4172da00000000, 0x4b1ce0d600000000, - 0x6fc5e7b500000000, 0x03aeef1000000000, 0x2777e87300000000, - 0x9a7e8e8100000000, 0xbea789e200000000, 0xd2cc814700000000, - 0xf615862400000000, 0xe9d93c7800000000, 0xcd003b1b00000000, - 0xa16b33be00000000, 0x85b234dd00000000, 0x38bb522f00000000, - 0x1c62554c00000000, 0x70095de900000000, 0x54d05a8a00000000, - 0x4e91285000000000, 0x6a482f3300000000, 0x0623279600000000, - 0x22fa20f500000000, 0x9ff3460700000000, 0xbb2a416400000000, - 0xd74149c100000000, 0xf3984ea200000000, 0xec54f4fe00000000, - 0xc88df39d00000000, 0xa4e6fb3800000000, 0x803ffc5b00000000, - 0x3d369aa900000000, 0x19ef9dca00000000, 0x7584956f00000000, - 0x515d920c00000000, 0xd73eb17600000000, 0xf3e7b61500000000, - 0x9f8cbeb000000000, 0xbb55b9d300000000, 0x065cdf2100000000, - 0x2285d84200000000, 0x4eeed0e700000000, 0x6a37d78400000000, - 0x75fb6dd800000000, 0x51226abb00000000, 0x3d49621e00000000, - 0x1990657d00000000, 0xa499038f00000000, 0x804004ec00000000, - 0xec2b0c4900000000, 0xc8f20b2a00000000, 0xd2b379f000000000, - 0xf66a7e9300000000, 0x9a01763600000000, 0xbed8715500000000, - 0x03d117a700000000, 0x270810c400000000, 0x4b63186100000000, - 0x6fba1f0200000000, 0x7076a55e00000000, 0x54afa23d00000000, - 0x38c4aa9800000000, 0x1c1dadfb00000000, 0xa114cb0900000000, - 0x85cdcc6a00000000, 0xe9a6c4cf00000000, 0xcd7fc3ac00000000, - 0x9c2251a000000000, 0xb8fb56c300000000, 0xd4905e6600000000, - 0xf049590500000000, 0x4d403ff700000000, 0x6999389400000000, - 0x05f2303100000000, 0x212b375200000000, 0x3ee78d0e00000000, - 0x1a3e8a6d00000000, 0x765582c800000000, 0x528c85ab00000000, - 0xef85e35900000000, 0xcb5ce43a00000000, 0xa737ec9f00000000, - 0x83eeebfc00000000, 0x99af992600000000, 0xbd769e4500000000, - 0xd11d96e000000000, 0xf5c4918300000000, 0x48cdf77100000000, - 0x6c14f01200000000, 0x007ff8b700000000, 0x24a6ffd400000000, - 0x3b6a458800000000, 0x1fb342eb00000000, 0x73d84a4e00000000, - 0x57014d2d00000000, 0xea082bdf00000000, 0xced12cbc00000000, - 0xa2ba241900000000, 0x8663237a00000000, 0xae7d62ed00000000, - 0x8aa4658e00000000, 0xe6cf6d2b00000000, 0xc2166a4800000000, - 0x7f1f0cba00000000, 0x5bc60bd900000000, 0x37ad037c00000000, - 0x1374041f00000000, 0x0cb8be4300000000, 0x2861b92000000000, - 0x440ab18500000000, 0x60d3b6e600000000, 0xdddad01400000000, - 0xf903d77700000000, 0x9568dfd200000000, 0xb1b1d8b100000000, - 0xabf0aa6b00000000, 0x8f29ad0800000000, 0xe342a5ad00000000, - 0xc79ba2ce00000000, 0x7a92c43c00000000, 0x5e4bc35f00000000, - 0x3220cbfa00000000, 0x16f9cc9900000000, 0x093576c500000000, - 0x2dec71a600000000, 0x4187790300000000, 0x655e7e6000000000, - 0xd857189200000000, 0xfc8e1ff100000000, 0x90e5175400000000, - 0xb43c103700000000, 0xe561823b00000000, 0xc1b8855800000000, - 0xadd38dfd00000000, 0x890a8a9e00000000, 0x3403ec6c00000000, - 0x10daeb0f00000000, 0x7cb1e3aa00000000, 0x5868e4c900000000, - 0x47a45e9500000000, 0x637d59f600000000, 0x0f16515300000000, - 0x2bcf563000000000, 0x96c630c200000000, 0xb21f37a100000000, - 0xde743f0400000000, 0xfaad386700000000, 0xe0ec4abd00000000, - 0xc4354dde00000000, 0xa85e457b00000000, 0x8c87421800000000, - 0x318e24ea00000000, 0x1557238900000000, 0x793c2b2c00000000, - 0x5de52c4f00000000, 0x4229961300000000, 0x66f0917000000000, - 0x0a9b99d500000000, 0x2e429eb600000000, 0x934bf84400000000, - 0xb792ff2700000000, 0xdbf9f78200000000, 0xff20f0e100000000, - 0x7943d39b00000000, 0x5d9ad4f800000000, 0x31f1dc5d00000000, - 0x1528db3e00000000, 0xa821bdcc00000000, 0x8cf8baaf00000000, - 0xe093b20a00000000, 0xc44ab56900000000, 0xdb860f3500000000, - 0xff5f085600000000, 0x933400f300000000, 0xb7ed079000000000, - 0x0ae4616200000000, 0x2e3d660100000000, 0x42566ea400000000, - 0x668f69c700000000, 0x7cce1b1d00000000, 0x58171c7e00000000, - 0x347c14db00000000, 0x10a513b800000000, 0xadac754a00000000, - 0x8975722900000000, 0xe51e7a8c00000000, 0xc1c77def00000000, - 0xde0bc7b300000000, 0xfad2c0d000000000, 0x96b9c87500000000, - 0xb260cf1600000000, 0x0f69a9e400000000, 0x2bb0ae8700000000, - 0x47dba62200000000, 0x6302a14100000000, 0x325f334d00000000, - 0x1686342e00000000, 0x7aed3c8b00000000, 0x5e343be800000000, - 0xe33d5d1a00000000, 0xc7e45a7900000000, 0xab8f52dc00000000, - 0x8f5655bf00000000, 0x909aefe300000000, 0xb443e88000000000, - 0xd828e02500000000, 0xfcf1e74600000000, 0x41f881b400000000, - 0x652186d700000000, 0x094a8e7200000000, 0x2d93891100000000, - 0x37d2fbcb00000000, 0x130bfca800000000, 0x7f60f40d00000000, - 0x5bb9f36e00000000, 0xe6b0959c00000000, 0xc26992ff00000000, - 0xae029a5a00000000, 0x8adb9d3900000000, 0x9517276500000000, - 0xb1ce200600000000, 0xdda528a300000000, 0xf97c2fc000000000, - 0x4475493200000000, 0x60ac4e5100000000, 0x0cc746f400000000, - 0x281e419700000000}, - {0x0000000000000000, 0x08e3603c00000000, 0x10c6c17800000000, - 0x1825a14400000000, 0x208c83f100000000, 0x286fe3cd00000000, - 0x304a428900000000, 0x38a922b500000000, 0x011e763800000000, - 0x09fd160400000000, 0x11d8b74000000000, 0x193bd77c00000000, - 0x2192f5c900000000, 0x297195f500000000, 0x315434b100000000, - 0x39b7548d00000000, 0x023cec7000000000, 0x0adf8c4c00000000, - 0x12fa2d0800000000, 0x1a194d3400000000, 0x22b06f8100000000, - 0x2a530fbd00000000, 0x3276aef900000000, 0x3a95cec500000000, - 0x03229a4800000000, 0x0bc1fa7400000000, 0x13e45b3000000000, - 0x1b073b0c00000000, 0x23ae19b900000000, 0x2b4d798500000000, - 0x3368d8c100000000, 0x3b8bb8fd00000000, 0x0478d8e100000000, - 0x0c9bb8dd00000000, 0x14be199900000000, 0x1c5d79a500000000, - 0x24f45b1000000000, 0x2c173b2c00000000, 0x34329a6800000000, - 0x3cd1fa5400000000, 0x0566aed900000000, 0x0d85cee500000000, - 0x15a06fa100000000, 0x1d430f9d00000000, 0x25ea2d2800000000, - 0x2d094d1400000000, 0x352cec5000000000, 0x3dcf8c6c00000000, - 0x0644349100000000, 0x0ea754ad00000000, 0x1682f5e900000000, - 0x1e6195d500000000, 0x26c8b76000000000, 0x2e2bd75c00000000, - 0x360e761800000000, 0x3eed162400000000, 0x075a42a900000000, - 0x0fb9229500000000, 0x179c83d100000000, 0x1f7fe3ed00000000, - 0x27d6c15800000000, 0x2f35a16400000000, 0x3710002000000000, - 0x3ff3601c00000000, 0x49f6c11800000000, 0x4115a12400000000, - 0x5930006000000000, 0x51d3605c00000000, 0x697a42e900000000, - 0x619922d500000000, 0x79bc839100000000, 0x715fe3ad00000000, - 0x48e8b72000000000, 0x400bd71c00000000, 0x582e765800000000, - 0x50cd166400000000, 0x686434d100000000, 0x608754ed00000000, - 0x78a2f5a900000000, 0x7041959500000000, 0x4bca2d6800000000, - 0x43294d5400000000, 0x5b0cec1000000000, 0x53ef8c2c00000000, - 0x6b46ae9900000000, 0x63a5cea500000000, 0x7b806fe100000000, - 0x73630fdd00000000, 0x4ad45b5000000000, 0x42373b6c00000000, - 0x5a129a2800000000, 0x52f1fa1400000000, 0x6a58d8a100000000, - 0x62bbb89d00000000, 0x7a9e19d900000000, 0x727d79e500000000, - 0x4d8e19f900000000, 0x456d79c500000000, 0x5d48d88100000000, - 0x55abb8bd00000000, 0x6d029a0800000000, 0x65e1fa3400000000, - 0x7dc45b7000000000, 0x75273b4c00000000, 0x4c906fc100000000, - 0x44730ffd00000000, 0x5c56aeb900000000, 0x54b5ce8500000000, - 0x6c1cec3000000000, 0x64ff8c0c00000000, 0x7cda2d4800000000, - 0x74394d7400000000, 0x4fb2f58900000000, 0x475195b500000000, - 0x5f7434f100000000, 0x579754cd00000000, 0x6f3e767800000000, - 0x67dd164400000000, 0x7ff8b70000000000, 0x771bd73c00000000, - 0x4eac83b100000000, 0x464fe38d00000000, 0x5e6a42c900000000, - 0x568922f500000000, 0x6e20004000000000, 0x66c3607c00000000, - 0x7ee6c13800000000, 0x7605a10400000000, 0x92ec833100000000, - 0x9a0fe30d00000000, 0x822a424900000000, 0x8ac9227500000000, - 0xb26000c000000000, 0xba8360fc00000000, 0xa2a6c1b800000000, - 0xaa45a18400000000, 0x93f2f50900000000, 0x9b11953500000000, - 0x8334347100000000, 0x8bd7544d00000000, 0xb37e76f800000000, - 0xbb9d16c400000000, 0xa3b8b78000000000, 0xab5bd7bc00000000, - 0x90d06f4100000000, 0x98330f7d00000000, 0x8016ae3900000000, - 0x88f5ce0500000000, 0xb05cecb000000000, 0xb8bf8c8c00000000, - 0xa09a2dc800000000, 0xa8794df400000000, 0x91ce197900000000, - 0x992d794500000000, 0x8108d80100000000, 0x89ebb83d00000000, - 0xb1429a8800000000, 0xb9a1fab400000000, 0xa1845bf000000000, - 0xa9673bcc00000000, 0x96945bd000000000, 0x9e773bec00000000, - 0x86529aa800000000, 0x8eb1fa9400000000, 0xb618d82100000000, - 0xbefbb81d00000000, 0xa6de195900000000, 0xae3d796500000000, - 0x978a2de800000000, 0x9f694dd400000000, 0x874cec9000000000, - 0x8faf8cac00000000, 0xb706ae1900000000, 0xbfe5ce2500000000, - 0xa7c06f6100000000, 0xaf230f5d00000000, 0x94a8b7a000000000, - 0x9c4bd79c00000000, 0x846e76d800000000, 0x8c8d16e400000000, - 0xb424345100000000, 0xbcc7546d00000000, 0xa4e2f52900000000, - 0xac01951500000000, 0x95b6c19800000000, 0x9d55a1a400000000, - 0x857000e000000000, 0x8d9360dc00000000, 0xb53a426900000000, - 0xbdd9225500000000, 0xa5fc831100000000, 0xad1fe32d00000000, - 0xdb1a422900000000, 0xd3f9221500000000, 0xcbdc835100000000, - 0xc33fe36d00000000, 0xfb96c1d800000000, 0xf375a1e400000000, - 0xeb5000a000000000, 0xe3b3609c00000000, 0xda04341100000000, - 0xd2e7542d00000000, 0xcac2f56900000000, 0xc221955500000000, - 0xfa88b7e000000000, 0xf26bd7dc00000000, 0xea4e769800000000, - 0xe2ad16a400000000, 0xd926ae5900000000, 0xd1c5ce6500000000, - 0xc9e06f2100000000, 0xc1030f1d00000000, 0xf9aa2da800000000, - 0xf1494d9400000000, 0xe96cecd000000000, 0xe18f8cec00000000, - 0xd838d86100000000, 0xd0dbb85d00000000, 0xc8fe191900000000, - 0xc01d792500000000, 0xf8b45b9000000000, 0xf0573bac00000000, - 0xe8729ae800000000, 0xe091fad400000000, 0xdf629ac800000000, - 0xd781faf400000000, 0xcfa45bb000000000, 0xc7473b8c00000000, - 0xffee193900000000, 0xf70d790500000000, 0xef28d84100000000, - 0xe7cbb87d00000000, 0xde7cecf000000000, 0xd69f8ccc00000000, - 0xceba2d8800000000, 0xc6594db400000000, 0xfef06f0100000000, - 0xf6130f3d00000000, 0xee36ae7900000000, 0xe6d5ce4500000000, - 0xdd5e76b800000000, 0xd5bd168400000000, 0xcd98b7c000000000, - 0xc57bd7fc00000000, 0xfdd2f54900000000, 0xf531957500000000, - 0xed14343100000000, 0xe5f7540d00000000, 0xdc40008000000000, - 0xd4a360bc00000000, 0xcc86c1f800000000, 0xc465a1c400000000, - 0xfccc837100000000, 0xf42fe34d00000000, 0xec0a420900000000, - 0xe4e9223500000000}, - {0x0000000000000000, 0xd1e8e70e00000000, 0xa2d1cf1d00000000, - 0x7339281300000000, 0x44a39f3b00000000, 0x954b783500000000, - 0xe672502600000000, 0x379ab72800000000, 0x88463f7700000000, - 0x59aed87900000000, 0x2a97f06a00000000, 0xfb7f176400000000, - 0xcce5a04c00000000, 0x1d0d474200000000, 0x6e346f5100000000, - 0xbfdc885f00000000, 0x108d7eee00000000, 0xc16599e000000000, - 0xb25cb1f300000000, 0x63b456fd00000000, 0x542ee1d500000000, - 0x85c606db00000000, 0xf6ff2ec800000000, 0x2717c9c600000000, - 0x98cb419900000000, 0x4923a69700000000, 0x3a1a8e8400000000, - 0xebf2698a00000000, 0xdc68dea200000000, 0x0d8039ac00000000, - 0x7eb911bf00000000, 0xaf51f6b100000000, 0x611c8c0700000000, - 0xb0f46b0900000000, 0xc3cd431a00000000, 0x1225a41400000000, - 0x25bf133c00000000, 0xf457f43200000000, 0x876edc2100000000, - 0x56863b2f00000000, 0xe95ab37000000000, 0x38b2547e00000000, - 0x4b8b7c6d00000000, 0x9a639b6300000000, 0xadf92c4b00000000, - 0x7c11cb4500000000, 0x0f28e35600000000, 0xdec0045800000000, - 0x7191f2e900000000, 0xa07915e700000000, 0xd3403df400000000, - 0x02a8dafa00000000, 0x35326dd200000000, 0xe4da8adc00000000, - 0x97e3a2cf00000000, 0x460b45c100000000, 0xf9d7cd9e00000000, - 0x283f2a9000000000, 0x5b06028300000000, 0x8aeee58d00000000, - 0xbd7452a500000000, 0x6c9cb5ab00000000, 0x1fa59db800000000, - 0xce4d7ab600000000, 0xc238180f00000000, 0x13d0ff0100000000, - 0x60e9d71200000000, 0xb101301c00000000, 0x869b873400000000, - 0x5773603a00000000, 0x244a482900000000, 0xf5a2af2700000000, - 0x4a7e277800000000, 0x9b96c07600000000, 0xe8afe86500000000, - 0x39470f6b00000000, 0x0eddb84300000000, 0xdf355f4d00000000, - 0xac0c775e00000000, 0x7de4905000000000, 0xd2b566e100000000, - 0x035d81ef00000000, 0x7064a9fc00000000, 0xa18c4ef200000000, - 0x9616f9da00000000, 0x47fe1ed400000000, 0x34c736c700000000, - 0xe52fd1c900000000, 0x5af3599600000000, 0x8b1bbe9800000000, - 0xf822968b00000000, 0x29ca718500000000, 0x1e50c6ad00000000, - 0xcfb821a300000000, 0xbc8109b000000000, 0x6d69eebe00000000, - 0xa324940800000000, 0x72cc730600000000, 0x01f55b1500000000, - 0xd01dbc1b00000000, 0xe7870b3300000000, 0x366fec3d00000000, - 0x4556c42e00000000, 0x94be232000000000, 0x2b62ab7f00000000, - 0xfa8a4c7100000000, 0x89b3646200000000, 0x585b836c00000000, - 0x6fc1344400000000, 0xbe29d34a00000000, 0xcd10fb5900000000, - 0x1cf81c5700000000, 0xb3a9eae600000000, 0x62410de800000000, - 0x117825fb00000000, 0xc090c2f500000000, 0xf70a75dd00000000, - 0x26e292d300000000, 0x55dbbac000000000, 0x84335dce00000000, - 0x3befd59100000000, 0xea07329f00000000, 0x993e1a8c00000000, - 0x48d6fd8200000000, 0x7f4c4aaa00000000, 0xaea4ada400000000, - 0xdd9d85b700000000, 0x0c7562b900000000, 0x8471301e00000000, - 0x5599d71000000000, 0x26a0ff0300000000, 0xf748180d00000000, - 0xc0d2af2500000000, 0x113a482b00000000, 0x6203603800000000, - 0xb3eb873600000000, 0x0c370f6900000000, 0xdddfe86700000000, - 0xaee6c07400000000, 0x7f0e277a00000000, 0x4894905200000000, - 0x997c775c00000000, 0xea455f4f00000000, 0x3badb84100000000, - 0x94fc4ef000000000, 0x4514a9fe00000000, 0x362d81ed00000000, - 0xe7c566e300000000, 0xd05fd1cb00000000, 0x01b736c500000000, - 0x728e1ed600000000, 0xa366f9d800000000, 0x1cba718700000000, - 0xcd52968900000000, 0xbe6bbe9a00000000, 0x6f83599400000000, - 0x5819eebc00000000, 0x89f109b200000000, 0xfac821a100000000, - 0x2b20c6af00000000, 0xe56dbc1900000000, 0x34855b1700000000, - 0x47bc730400000000, 0x9654940a00000000, 0xa1ce232200000000, - 0x7026c42c00000000, 0x031fec3f00000000, 0xd2f70b3100000000, - 0x6d2b836e00000000, 0xbcc3646000000000, 0xcffa4c7300000000, - 0x1e12ab7d00000000, 0x29881c5500000000, 0xf860fb5b00000000, - 0x8b59d34800000000, 0x5ab1344600000000, 0xf5e0c2f700000000, - 0x240825f900000000, 0x57310dea00000000, 0x86d9eae400000000, - 0xb1435dcc00000000, 0x60abbac200000000, 0x139292d100000000, - 0xc27a75df00000000, 0x7da6fd8000000000, 0xac4e1a8e00000000, - 0xdf77329d00000000, 0x0e9fd59300000000, 0x390562bb00000000, - 0xe8ed85b500000000, 0x9bd4ada600000000, 0x4a3c4aa800000000, - 0x4649281100000000, 0x97a1cf1f00000000, 0xe498e70c00000000, - 0x3570000200000000, 0x02eab72a00000000, 0xd302502400000000, - 0xa03b783700000000, 0x71d39f3900000000, 0xce0f176600000000, - 0x1fe7f06800000000, 0x6cded87b00000000, 0xbd363f7500000000, - 0x8aac885d00000000, 0x5b446f5300000000, 0x287d474000000000, - 0xf995a04e00000000, 0x56c456ff00000000, 0x872cb1f100000000, - 0xf41599e200000000, 0x25fd7eec00000000, 0x1267c9c400000000, - 0xc38f2eca00000000, 0xb0b606d900000000, 0x615ee1d700000000, - 0xde82698800000000, 0x0f6a8e8600000000, 0x7c53a69500000000, - 0xadbb419b00000000, 0x9a21f6b300000000, 0x4bc911bd00000000, - 0x38f039ae00000000, 0xe918dea000000000, 0x2755a41600000000, - 0xf6bd431800000000, 0x85846b0b00000000, 0x546c8c0500000000, - 0x63f63b2d00000000, 0xb21edc2300000000, 0xc127f43000000000, - 0x10cf133e00000000, 0xaf139b6100000000, 0x7efb7c6f00000000, - 0x0dc2547c00000000, 0xdc2ab37200000000, 0xebb0045a00000000, - 0x3a58e35400000000, 0x4961cb4700000000, 0x98892c4900000000, - 0x37d8daf800000000, 0xe6303df600000000, 0x950915e500000000, - 0x44e1f2eb00000000, 0x737b45c300000000, 0xa293a2cd00000000, - 0xd1aa8ade00000000, 0x00426dd000000000, 0xbf9ee58f00000000, - 0x6e76028100000000, 0x1d4f2a9200000000, 0xcca7cd9c00000000, - 0xfb3d7ab400000000, 0x2ad59dba00000000, 0x59ecb5a900000000, - 0x880452a700000000}, - {0x0000000000000000, 0xaa05daf100000000, 0x150dc53800000000, - 0xbf081fc900000000, 0x2a1a8a7100000000, 0x801f508000000000, - 0x3f174f4900000000, 0x951295b800000000, 0x543414e300000000, - 0xfe31ce1200000000, 0x4139d1db00000000, 0xeb3c0b2a00000000, - 0x7e2e9e9200000000, 0xd42b446300000000, 0x6b235baa00000000, - 0xc126815b00000000, 0xe96e591d00000000, 0x436b83ec00000000, - 0xfc639c2500000000, 0x566646d400000000, 0xc374d36c00000000, - 0x6971099d00000000, 0xd679165400000000, 0x7c7ccca500000000, - 0xbd5a4dfe00000000, 0x175f970f00000000, 0xa85788c600000000, - 0x0252523700000000, 0x9740c78f00000000, 0x3d451d7e00000000, - 0x824d02b700000000, 0x2848d84600000000, 0xd2ddb23a00000000, - 0x78d868cb00000000, 0xc7d0770200000000, 0x6dd5adf300000000, - 0xf8c7384b00000000, 0x52c2e2ba00000000, 0xedcafd7300000000, - 0x47cf278200000000, 0x86e9a6d900000000, 0x2cec7c2800000000, - 0x93e463e100000000, 0x39e1b91000000000, 0xacf32ca800000000, - 0x06f6f65900000000, 0xb9fee99000000000, 0x13fb336100000000, - 0x3bb3eb2700000000, 0x91b631d600000000, 0x2ebe2e1f00000000, - 0x84bbf4ee00000000, 0x11a9615600000000, 0xbbacbba700000000, - 0x04a4a46e00000000, 0xaea17e9f00000000, 0x6f87ffc400000000, - 0xc582253500000000, 0x7a8a3afc00000000, 0xd08fe00d00000000, - 0x459d75b500000000, 0xef98af4400000000, 0x5090b08d00000000, - 0xfa956a7c00000000, 0xa4bb657500000000, 0x0ebebf8400000000, - 0xb1b6a04d00000000, 0x1bb37abc00000000, 0x8ea1ef0400000000, - 0x24a435f500000000, 0x9bac2a3c00000000, 0x31a9f0cd00000000, - 0xf08f719600000000, 0x5a8aab6700000000, 0xe582b4ae00000000, - 0x4f876e5f00000000, 0xda95fbe700000000, 0x7090211600000000, - 0xcf983edf00000000, 0x659de42e00000000, 0x4dd53c6800000000, - 0xe7d0e69900000000, 0x58d8f95000000000, 0xf2dd23a100000000, - 0x67cfb61900000000, 0xcdca6ce800000000, 0x72c2732100000000, - 0xd8c7a9d000000000, 0x19e1288b00000000, 0xb3e4f27a00000000, - 0x0cecedb300000000, 0xa6e9374200000000, 0x33fba2fa00000000, - 0x99fe780b00000000, 0x26f667c200000000, 0x8cf3bd3300000000, - 0x7666d74f00000000, 0xdc630dbe00000000, 0x636b127700000000, - 0xc96ec88600000000, 0x5c7c5d3e00000000, 0xf67987cf00000000, - 0x4971980600000000, 0xe37442f700000000, 0x2252c3ac00000000, - 0x8857195d00000000, 0x375f069400000000, 0x9d5adc6500000000, - 0x084849dd00000000, 0xa24d932c00000000, 0x1d458ce500000000, - 0xb740561400000000, 0x9f088e5200000000, 0x350d54a300000000, - 0x8a054b6a00000000, 0x2000919b00000000, 0xb512042300000000, - 0x1f17ded200000000, 0xa01fc11b00000000, 0x0a1a1bea00000000, - 0xcb3c9ab100000000, 0x6139404000000000, 0xde315f8900000000, - 0x7434857800000000, 0xe12610c000000000, 0x4b23ca3100000000, - 0xf42bd5f800000000, 0x5e2e0f0900000000, 0x4877cbea00000000, - 0xe272111b00000000, 0x5d7a0ed200000000, 0xf77fd42300000000, - 0x626d419b00000000, 0xc8689b6a00000000, 0x776084a300000000, - 0xdd655e5200000000, 0x1c43df0900000000, 0xb64605f800000000, - 0x094e1a3100000000, 0xa34bc0c000000000, 0x3659557800000000, - 0x9c5c8f8900000000, 0x2354904000000000, 0x89514ab100000000, - 0xa11992f700000000, 0x0b1c480600000000, 0xb41457cf00000000, - 0x1e118d3e00000000, 0x8b03188600000000, 0x2106c27700000000, - 0x9e0eddbe00000000, 0x340b074f00000000, 0xf52d861400000000, - 0x5f285ce500000000, 0xe020432c00000000, 0x4a2599dd00000000, - 0xdf370c6500000000, 0x7532d69400000000, 0xca3ac95d00000000, - 0x603f13ac00000000, 0x9aaa79d000000000, 0x30afa32100000000, - 0x8fa7bce800000000, 0x25a2661900000000, 0xb0b0f3a100000000, - 0x1ab5295000000000, 0xa5bd369900000000, 0x0fb8ec6800000000, - 0xce9e6d3300000000, 0x649bb7c200000000, 0xdb93a80b00000000, - 0x719672fa00000000, 0xe484e74200000000, 0x4e813db300000000, - 0xf189227a00000000, 0x5b8cf88b00000000, 0x73c420cd00000000, - 0xd9c1fa3c00000000, 0x66c9e5f500000000, 0xcccc3f0400000000, - 0x59deaabc00000000, 0xf3db704d00000000, 0x4cd36f8400000000, - 0xe6d6b57500000000, 0x27f0342e00000000, 0x8df5eedf00000000, - 0x32fdf11600000000, 0x98f82be700000000, 0x0deabe5f00000000, - 0xa7ef64ae00000000, 0x18e77b6700000000, 0xb2e2a19600000000, - 0xecccae9f00000000, 0x46c9746e00000000, 0xf9c16ba700000000, - 0x53c4b15600000000, 0xc6d624ee00000000, 0x6cd3fe1f00000000, - 0xd3dbe1d600000000, 0x79de3b2700000000, 0xb8f8ba7c00000000, - 0x12fd608d00000000, 0xadf57f4400000000, 0x07f0a5b500000000, - 0x92e2300d00000000, 0x38e7eafc00000000, 0x87eff53500000000, - 0x2dea2fc400000000, 0x05a2f78200000000, 0xafa72d7300000000, - 0x10af32ba00000000, 0xbaaae84b00000000, 0x2fb87df300000000, - 0x85bda70200000000, 0x3ab5b8cb00000000, 0x90b0623a00000000, - 0x5196e36100000000, 0xfb93399000000000, 0x449b265900000000, - 0xee9efca800000000, 0x7b8c691000000000, 0xd189b3e100000000, - 0x6e81ac2800000000, 0xc48476d900000000, 0x3e111ca500000000, - 0x9414c65400000000, 0x2b1cd99d00000000, 0x8119036c00000000, - 0x140b96d400000000, 0xbe0e4c2500000000, 0x010653ec00000000, - 0xab03891d00000000, 0x6a25084600000000, 0xc020d2b700000000, - 0x7f28cd7e00000000, 0xd52d178f00000000, 0x403f823700000000, - 0xea3a58c600000000, 0x5532470f00000000, 0xff379dfe00000000, - 0xd77f45b800000000, 0x7d7a9f4900000000, 0xc272808000000000, - 0x68775a7100000000, 0xfd65cfc900000000, 0x5760153800000000, - 0xe8680af100000000, 0x426dd00000000000, 0x834b515b00000000, - 0x294e8baa00000000, 0x9646946300000000, 0x3c434e9200000000, - 0xa951db2a00000000, 0x035401db00000000, 0xbc5c1e1200000000, - 0x1659c4e300000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xae689191, 0x87a02563, 0x29c8b4f2, 0xd4314c87, - 0x7a59dd16, 0x539169e4, 0xfdf9f875, 0x73139f4f, 0xdd7b0ede, - 0xf4b3ba2c, 0x5adb2bbd, 0xa722d3c8, 0x094a4259, 0x2082f6ab, - 0x8eea673a, 0xe6273e9e, 0x484faf0f, 0x61871bfd, 0xcfef8a6c, - 0x32167219, 0x9c7ee388, 0xb5b6577a, 0x1bdec6eb, 0x9534a1d1, - 0x3b5c3040, 0x129484b2, 0xbcfc1523, 0x4105ed56, 0xef6d7cc7, - 0xc6a5c835, 0x68cd59a4, 0x173f7b7d, 0xb957eaec, 0x909f5e1e, - 0x3ef7cf8f, 0xc30e37fa, 0x6d66a66b, 0x44ae1299, 0xeac68308, - 0x642ce432, 0xca4475a3, 0xe38cc151, 0x4de450c0, 0xb01da8b5, - 0x1e753924, 0x37bd8dd6, 0x99d51c47, 0xf11845e3, 0x5f70d472, - 0x76b86080, 0xd8d0f111, 0x25290964, 0x8b4198f5, 0xa2892c07, - 0x0ce1bd96, 0x820bdaac, 0x2c634b3d, 0x05abffcf, 0xabc36e5e, - 0x563a962b, 0xf85207ba, 0xd19ab348, 0x7ff222d9, 0x2e7ef6fa, - 0x8016676b, 0xa9ded399, 0x07b64208, 0xfa4fba7d, 0x54272bec, - 0x7def9f1e, 0xd3870e8f, 0x5d6d69b5, 0xf305f824, 0xdacd4cd6, - 0x74a5dd47, 0x895c2532, 0x2734b4a3, 0x0efc0051, 0xa09491c0, - 0xc859c864, 0x663159f5, 0x4ff9ed07, 0xe1917c96, 0x1c6884e3, - 0xb2001572, 0x9bc8a180, 0x35a03011, 0xbb4a572b, 0x1522c6ba, - 0x3cea7248, 0x9282e3d9, 0x6f7b1bac, 0xc1138a3d, 0xe8db3ecf, - 0x46b3af5e, 0x39418d87, 0x97291c16, 0xbee1a8e4, 0x10893975, - 0xed70c100, 0x43185091, 0x6ad0e463, 0xc4b875f2, 0x4a5212c8, - 0xe43a8359, 0xcdf237ab, 0x639aa63a, 0x9e635e4f, 0x300bcfde, - 0x19c37b2c, 0xb7abeabd, 0xdf66b319, 0x710e2288, 0x58c6967a, - 0xf6ae07eb, 0x0b57ff9e, 0xa53f6e0f, 0x8cf7dafd, 0x229f4b6c, - 0xac752c56, 0x021dbdc7, 0x2bd50935, 0x85bd98a4, 0x784460d1, - 0xd62cf140, 0xffe445b2, 0x518cd423, 0x5cfdedf4, 0xf2957c65, - 0xdb5dc897, 0x75355906, 0x88cca173, 0x26a430e2, 0x0f6c8410, - 0xa1041581, 0x2fee72bb, 0x8186e32a, 0xa84e57d8, 0x0626c649, - 0xfbdf3e3c, 0x55b7afad, 0x7c7f1b5f, 0xd2178ace, 0xbadad36a, - 0x14b242fb, 0x3d7af609, 0x93126798, 0x6eeb9fed, 0xc0830e7c, - 0xe94bba8e, 0x47232b1f, 0xc9c94c25, 0x67a1ddb4, 0x4e696946, - 0xe001f8d7, 0x1df800a2, 0xb3909133, 0x9a5825c1, 0x3430b450, - 0x4bc29689, 0xe5aa0718, 0xcc62b3ea, 0x620a227b, 0x9ff3da0e, - 0x319b4b9f, 0x1853ff6d, 0xb63b6efc, 0x38d109c6, 0x96b99857, - 0xbf712ca5, 0x1119bd34, 0xece04541, 0x4288d4d0, 0x6b406022, - 0xc528f1b3, 0xade5a817, 0x038d3986, 0x2a458d74, 0x842d1ce5, - 0x79d4e490, 0xd7bc7501, 0xfe74c1f3, 0x501c5062, 0xdef63758, - 0x709ea6c9, 0x5956123b, 0xf73e83aa, 0x0ac77bdf, 0xa4afea4e, - 0x8d675ebc, 0x230fcf2d, 0x72831b0e, 0xdceb8a9f, 0xf5233e6d, - 0x5b4baffc, 0xa6b25789, 0x08dac618, 0x211272ea, 0x8f7ae37b, - 0x01908441, 0xaff815d0, 0x8630a122, 0x285830b3, 0xd5a1c8c6, - 0x7bc95957, 0x5201eda5, 0xfc697c34, 0x94a42590, 0x3accb401, - 0x130400f3, 0xbd6c9162, 0x40956917, 0xeefdf886, 0xc7354c74, - 0x695ddde5, 0xe7b7badf, 0x49df2b4e, 0x60179fbc, 0xce7f0e2d, - 0x3386f658, 0x9dee67c9, 0xb426d33b, 0x1a4e42aa, 0x65bc6073, - 0xcbd4f1e2, 0xe21c4510, 0x4c74d481, 0xb18d2cf4, 0x1fe5bd65, - 0x362d0997, 0x98459806, 0x16afff3c, 0xb8c76ead, 0x910fda5f, - 0x3f674bce, 0xc29eb3bb, 0x6cf6222a, 0x453e96d8, 0xeb560749, - 0x839b5eed, 0x2df3cf7c, 0x043b7b8e, 0xaa53ea1f, 0x57aa126a, - 0xf9c283fb, 0xd00a3709, 0x7e62a698, 0xf088c1a2, 0x5ee05033, - 0x7728e4c1, 0xd9407550, 0x24b98d25, 0x8ad11cb4, 0xa319a846, - 0x0d7139d7}, - {0x00000000, 0xb9fbdbe8, 0xa886b191, 0x117d6a79, 0x8a7c6563, - 0x3387be8b, 0x22fad4f2, 0x9b010f1a, 0xcf89cc87, 0x7672176f, - 0x670f7d16, 0xdef4a6fe, 0x45f5a9e4, 0xfc0e720c, 0xed731875, - 0x5488c39d, 0x44629f4f, 0xfd9944a7, 0xece42ede, 0x551ff536, - 0xce1efa2c, 0x77e521c4, 0x66984bbd, 0xdf639055, 0x8beb53c8, - 0x32108820, 0x236de259, 0x9a9639b1, 0x019736ab, 0xb86ced43, - 0xa911873a, 0x10ea5cd2, 0x88c53e9e, 0x313ee576, 0x20438f0f, - 0x99b854e7, 0x02b95bfd, 0xbb428015, 0xaa3fea6c, 0x13c43184, - 0x474cf219, 0xfeb729f1, 0xefca4388, 0x56319860, 0xcd30977a, - 0x74cb4c92, 0x65b626eb, 0xdc4dfd03, 0xcca7a1d1, 0x755c7a39, - 0x64211040, 0xdddacba8, 0x46dbc4b2, 0xff201f5a, 0xee5d7523, - 0x57a6aecb, 0x032e6d56, 0xbad5b6be, 0xaba8dcc7, 0x1253072f, - 0x89520835, 0x30a9d3dd, 0x21d4b9a4, 0x982f624c, 0xcafb7b7d, - 0x7300a095, 0x627dcaec, 0xdb861104, 0x40871e1e, 0xf97cc5f6, - 0xe801af8f, 0x51fa7467, 0x0572b7fa, 0xbc896c12, 0xadf4066b, - 0x140fdd83, 0x8f0ed299, 0x36f50971, 0x27886308, 0x9e73b8e0, - 0x8e99e432, 0x37623fda, 0x261f55a3, 0x9fe48e4b, 0x04e58151, - 0xbd1e5ab9, 0xac6330c0, 0x1598eb28, 0x411028b5, 0xf8ebf35d, - 0xe9969924, 0x506d42cc, 0xcb6c4dd6, 0x7297963e, 0x63eafc47, - 0xda1127af, 0x423e45e3, 0xfbc59e0b, 0xeab8f472, 0x53432f9a, - 0xc8422080, 0x71b9fb68, 0x60c49111, 0xd93f4af9, 0x8db78964, - 0x344c528c, 0x253138f5, 0x9ccae31d, 0x07cbec07, 0xbe3037ef, - 0xaf4d5d96, 0x16b6867e, 0x065cdaac, 0xbfa70144, 0xaeda6b3d, - 0x1721b0d5, 0x8c20bfcf, 0x35db6427, 0x24a60e5e, 0x9d5dd5b6, - 0xc9d5162b, 0x702ecdc3, 0x6153a7ba, 0xd8a87c52, 0x43a97348, - 0xfa52a8a0, 0xeb2fc2d9, 0x52d41931, 0x4e87f0bb, 0xf77c2b53, - 0xe601412a, 0x5ffa9ac2, 0xc4fb95d8, 0x7d004e30, 0x6c7d2449, - 0xd586ffa1, 0x810e3c3c, 0x38f5e7d4, 0x29888dad, 0x90735645, - 0x0b72595f, 0xb28982b7, 0xa3f4e8ce, 0x1a0f3326, 0x0ae56ff4, - 0xb31eb41c, 0xa263de65, 0x1b98058d, 0x80990a97, 0x3962d17f, - 0x281fbb06, 0x91e460ee, 0xc56ca373, 0x7c97789b, 0x6dea12e2, - 0xd411c90a, 0x4f10c610, 0xf6eb1df8, 0xe7967781, 0x5e6dac69, - 0xc642ce25, 0x7fb915cd, 0x6ec47fb4, 0xd73fa45c, 0x4c3eab46, - 0xf5c570ae, 0xe4b81ad7, 0x5d43c13f, 0x09cb02a2, 0xb030d94a, - 0xa14db333, 0x18b668db, 0x83b767c1, 0x3a4cbc29, 0x2b31d650, - 0x92ca0db8, 0x8220516a, 0x3bdb8a82, 0x2aa6e0fb, 0x935d3b13, - 0x085c3409, 0xb1a7efe1, 0xa0da8598, 0x19215e70, 0x4da99ded, - 0xf4524605, 0xe52f2c7c, 0x5cd4f794, 0xc7d5f88e, 0x7e2e2366, - 0x6f53491f, 0xd6a892f7, 0x847c8bc6, 0x3d87502e, 0x2cfa3a57, - 0x9501e1bf, 0x0e00eea5, 0xb7fb354d, 0xa6865f34, 0x1f7d84dc, - 0x4bf54741, 0xf20e9ca9, 0xe373f6d0, 0x5a882d38, 0xc1892222, - 0x7872f9ca, 0x690f93b3, 0xd0f4485b, 0xc01e1489, 0x79e5cf61, - 0x6898a518, 0xd1637ef0, 0x4a6271ea, 0xf399aa02, 0xe2e4c07b, - 0x5b1f1b93, 0x0f97d80e, 0xb66c03e6, 0xa711699f, 0x1eeab277, - 0x85ebbd6d, 0x3c106685, 0x2d6d0cfc, 0x9496d714, 0x0cb9b558, - 0xb5426eb0, 0xa43f04c9, 0x1dc4df21, 0x86c5d03b, 0x3f3e0bd3, - 0x2e4361aa, 0x97b8ba42, 0xc33079df, 0x7acba237, 0x6bb6c84e, - 0xd24d13a6, 0x494c1cbc, 0xf0b7c754, 0xe1caad2d, 0x583176c5, - 0x48db2a17, 0xf120f1ff, 0xe05d9b86, 0x59a6406e, 0xc2a74f74, - 0x7b5c949c, 0x6a21fee5, 0xd3da250d, 0x8752e690, 0x3ea93d78, - 0x2fd45701, 0x962f8ce9, 0x0d2e83f3, 0xb4d5581b, 0xa5a83262, - 0x1c53e98a}, - {0x00000000, 0x9d0fe176, 0xe16ec4ad, 0x7c6125db, 0x19ac8f1b, - 0x84a36e6d, 0xf8c24bb6, 0x65cdaac0, 0x33591e36, 0xae56ff40, - 0xd237da9b, 0x4f383bed, 0x2af5912d, 0xb7fa705b, 0xcb9b5580, - 0x5694b4f6, 0x66b23c6c, 0xfbbddd1a, 0x87dcf8c1, 0x1ad319b7, - 0x7f1eb377, 0xe2115201, 0x9e7077da, 0x037f96ac, 0x55eb225a, - 0xc8e4c32c, 0xb485e6f7, 0x298a0781, 0x4c47ad41, 0xd1484c37, - 0xad2969ec, 0x3026889a, 0xcd6478d8, 0x506b99ae, 0x2c0abc75, - 0xb1055d03, 0xd4c8f7c3, 0x49c716b5, 0x35a6336e, 0xa8a9d218, - 0xfe3d66ee, 0x63328798, 0x1f53a243, 0x825c4335, 0xe791e9f5, - 0x7a9e0883, 0x06ff2d58, 0x9bf0cc2e, 0xabd644b4, 0x36d9a5c2, - 0x4ab88019, 0xd7b7616f, 0xb27acbaf, 0x2f752ad9, 0x53140f02, - 0xce1bee74, 0x988f5a82, 0x0580bbf4, 0x79e19e2f, 0xe4ee7f59, - 0x8123d599, 0x1c2c34ef, 0x604d1134, 0xfd42f042, 0x41b9f7f1, - 0xdcb61687, 0xa0d7335c, 0x3dd8d22a, 0x581578ea, 0xc51a999c, - 0xb97bbc47, 0x24745d31, 0x72e0e9c7, 0xefef08b1, 0x938e2d6a, - 0x0e81cc1c, 0x6b4c66dc, 0xf64387aa, 0x8a22a271, 0x172d4307, - 0x270bcb9d, 0xba042aeb, 0xc6650f30, 0x5b6aee46, 0x3ea74486, - 0xa3a8a5f0, 0xdfc9802b, 0x42c6615d, 0x1452d5ab, 0x895d34dd, - 0xf53c1106, 0x6833f070, 0x0dfe5ab0, 0x90f1bbc6, 0xec909e1d, - 0x719f7f6b, 0x8cdd8f29, 0x11d26e5f, 0x6db34b84, 0xf0bcaaf2, - 0x95710032, 0x087ee144, 0x741fc49f, 0xe91025e9, 0xbf84911f, - 0x228b7069, 0x5eea55b2, 0xc3e5b4c4, 0xa6281e04, 0x3b27ff72, - 0x4746daa9, 0xda493bdf, 0xea6fb345, 0x77605233, 0x0b0177e8, - 0x960e969e, 0xf3c33c5e, 0x6eccdd28, 0x12adf8f3, 0x8fa21985, - 0xd936ad73, 0x44394c05, 0x385869de, 0xa55788a8, 0xc09a2268, - 0x5d95c31e, 0x21f4e6c5, 0xbcfb07b3, 0x8373efe2, 0x1e7c0e94, - 0x621d2b4f, 0xff12ca39, 0x9adf60f9, 0x07d0818f, 0x7bb1a454, - 0xe6be4522, 0xb02af1d4, 0x2d2510a2, 0x51443579, 0xcc4bd40f, - 0xa9867ecf, 0x34899fb9, 0x48e8ba62, 0xd5e75b14, 0xe5c1d38e, - 0x78ce32f8, 0x04af1723, 0x99a0f655, 0xfc6d5c95, 0x6162bde3, - 0x1d039838, 0x800c794e, 0xd698cdb8, 0x4b972cce, 0x37f60915, - 0xaaf9e863, 0xcf3442a3, 0x523ba3d5, 0x2e5a860e, 0xb3556778, - 0x4e17973a, 0xd318764c, 0xaf795397, 0x3276b2e1, 0x57bb1821, - 0xcab4f957, 0xb6d5dc8c, 0x2bda3dfa, 0x7d4e890c, 0xe041687a, - 0x9c204da1, 0x012facd7, 0x64e20617, 0xf9ede761, 0x858cc2ba, - 0x188323cc, 0x28a5ab56, 0xb5aa4a20, 0xc9cb6ffb, 0x54c48e8d, - 0x3109244d, 0xac06c53b, 0xd067e0e0, 0x4d680196, 0x1bfcb560, - 0x86f35416, 0xfa9271cd, 0x679d90bb, 0x02503a7b, 0x9f5fdb0d, - 0xe33efed6, 0x7e311fa0, 0xc2ca1813, 0x5fc5f965, 0x23a4dcbe, - 0xbeab3dc8, 0xdb669708, 0x4669767e, 0x3a0853a5, 0xa707b2d3, - 0xf1930625, 0x6c9ce753, 0x10fdc288, 0x8df223fe, 0xe83f893e, - 0x75306848, 0x09514d93, 0x945eace5, 0xa478247f, 0x3977c509, - 0x4516e0d2, 0xd81901a4, 0xbdd4ab64, 0x20db4a12, 0x5cba6fc9, - 0xc1b58ebf, 0x97213a49, 0x0a2edb3f, 0x764ffee4, 0xeb401f92, - 0x8e8db552, 0x13825424, 0x6fe371ff, 0xf2ec9089, 0x0fae60cb, - 0x92a181bd, 0xeec0a466, 0x73cf4510, 0x1602efd0, 0x8b0d0ea6, - 0xf76c2b7d, 0x6a63ca0b, 0x3cf77efd, 0xa1f89f8b, 0xdd99ba50, - 0x40965b26, 0x255bf1e6, 0xb8541090, 0xc435354b, 0x593ad43d, - 0x691c5ca7, 0xf413bdd1, 0x8872980a, 0x157d797c, 0x70b0d3bc, - 0xedbf32ca, 0x91de1711, 0x0cd1f667, 0x5a454291, 0xc74aa3e7, - 0xbb2b863c, 0x2624674a, 0x43e9cd8a, 0xdee62cfc, 0xa2870927, - 0x3f88e851}, - {0x00000000, 0xdd96d985, 0x605cb54b, 0xbdca6cce, 0xc0b96a96, - 0x1d2fb313, 0xa0e5dfdd, 0x7d730658, 0x5a03d36d, 0x87950ae8, - 0x3a5f6626, 0xe7c9bfa3, 0x9abab9fb, 0x472c607e, 0xfae60cb0, - 0x2770d535, 0xb407a6da, 0x69917f5f, 0xd45b1391, 0x09cdca14, - 0x74becc4c, 0xa92815c9, 0x14e27907, 0xc974a082, 0xee0475b7, - 0x3392ac32, 0x8e58c0fc, 0x53ce1979, 0x2ebd1f21, 0xf32bc6a4, - 0x4ee1aa6a, 0x937773ef, 0xb37e4bf5, 0x6ee89270, 0xd322febe, - 0x0eb4273b, 0x73c72163, 0xae51f8e6, 0x139b9428, 0xce0d4dad, - 0xe97d9898, 0x34eb411d, 0x89212dd3, 0x54b7f456, 0x29c4f20e, - 0xf4522b8b, 0x49984745, 0x940e9ec0, 0x0779ed2f, 0xdaef34aa, - 0x67255864, 0xbab381e1, 0xc7c087b9, 0x1a565e3c, 0xa79c32f2, - 0x7a0aeb77, 0x5d7a3e42, 0x80ece7c7, 0x3d268b09, 0xe0b0528c, - 0x9dc354d4, 0x40558d51, 0xfd9fe19f, 0x2009381a, 0xbd8d91ab, - 0x601b482e, 0xddd124e0, 0x0047fd65, 0x7d34fb3d, 0xa0a222b8, - 0x1d684e76, 0xc0fe97f3, 0xe78e42c6, 0x3a189b43, 0x87d2f78d, - 0x5a442e08, 0x27372850, 0xfaa1f1d5, 0x476b9d1b, 0x9afd449e, - 0x098a3771, 0xd41ceef4, 0x69d6823a, 0xb4405bbf, 0xc9335de7, - 0x14a58462, 0xa96fe8ac, 0x74f93129, 0x5389e41c, 0x8e1f3d99, - 0x33d55157, 0xee4388d2, 0x93308e8a, 0x4ea6570f, 0xf36c3bc1, - 0x2efae244, 0x0ef3da5e, 0xd36503db, 0x6eaf6f15, 0xb339b690, - 0xce4ab0c8, 0x13dc694d, 0xae160583, 0x7380dc06, 0x54f00933, - 0x8966d0b6, 0x34acbc78, 0xe93a65fd, 0x944963a5, 0x49dfba20, - 0xf415d6ee, 0x29830f6b, 0xbaf47c84, 0x6762a501, 0xdaa8c9cf, - 0x073e104a, 0x7a4d1612, 0xa7dbcf97, 0x1a11a359, 0xc7877adc, - 0xe0f7afe9, 0x3d61766c, 0x80ab1aa2, 0x5d3dc327, 0x204ec57f, - 0xfdd81cfa, 0x40127034, 0x9d84a9b1, 0xa06a2517, 0x7dfcfc92, - 0xc036905c, 0x1da049d9, 0x60d34f81, 0xbd459604, 0x008ffaca, - 0xdd19234f, 0xfa69f67a, 0x27ff2fff, 0x9a354331, 0x47a39ab4, - 0x3ad09cec, 0xe7464569, 0x5a8c29a7, 0x871af022, 0x146d83cd, - 0xc9fb5a48, 0x74313686, 0xa9a7ef03, 0xd4d4e95b, 0x094230de, - 0xb4885c10, 0x691e8595, 0x4e6e50a0, 0x93f88925, 0x2e32e5eb, - 0xf3a43c6e, 0x8ed73a36, 0x5341e3b3, 0xee8b8f7d, 0x331d56f8, - 0x13146ee2, 0xce82b767, 0x7348dba9, 0xaede022c, 0xd3ad0474, - 0x0e3bddf1, 0xb3f1b13f, 0x6e6768ba, 0x4917bd8f, 0x9481640a, - 0x294b08c4, 0xf4ddd141, 0x89aed719, 0x54380e9c, 0xe9f26252, - 0x3464bbd7, 0xa713c838, 0x7a8511bd, 0xc74f7d73, 0x1ad9a4f6, - 0x67aaa2ae, 0xba3c7b2b, 0x07f617e5, 0xda60ce60, 0xfd101b55, - 0x2086c2d0, 0x9d4cae1e, 0x40da779b, 0x3da971c3, 0xe03fa846, - 0x5df5c488, 0x80631d0d, 0x1de7b4bc, 0xc0716d39, 0x7dbb01f7, - 0xa02dd872, 0xdd5ede2a, 0x00c807af, 0xbd026b61, 0x6094b2e4, - 0x47e467d1, 0x9a72be54, 0x27b8d29a, 0xfa2e0b1f, 0x875d0d47, - 0x5acbd4c2, 0xe701b80c, 0x3a976189, 0xa9e01266, 0x7476cbe3, - 0xc9bca72d, 0x142a7ea8, 0x695978f0, 0xb4cfa175, 0x0905cdbb, - 0xd493143e, 0xf3e3c10b, 0x2e75188e, 0x93bf7440, 0x4e29adc5, - 0x335aab9d, 0xeecc7218, 0x53061ed6, 0x8e90c753, 0xae99ff49, - 0x730f26cc, 0xcec54a02, 0x13539387, 0x6e2095df, 0xb3b64c5a, - 0x0e7c2094, 0xd3eaf911, 0xf49a2c24, 0x290cf5a1, 0x94c6996f, - 0x495040ea, 0x342346b2, 0xe9b59f37, 0x547ff3f9, 0x89e92a7c, - 0x1a9e5993, 0xc7088016, 0x7ac2ecd8, 0xa754355d, 0xda273305, - 0x07b1ea80, 0xba7b864e, 0x67ed5fcb, 0x409d8afe, 0x9d0b537b, - 0x20c13fb5, 0xfd57e630, 0x8024e068, 0x5db239ed, 0xe0785523, - 0x3dee8ca6}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0x85d996dd, 0x4bb55c60, 0xce6ccabd, 0x966ab9c0, - 0x13b32f1d, 0xdddfe5a0, 0x5806737d, 0x6dd3035a, 0xe80a9587, - 0x26665f3a, 0xa3bfc9e7, 0xfbb9ba9a, 0x7e602c47, 0xb00ce6fa, - 0x35d57027, 0xdaa607b4, 0x5f7f9169, 0x91135bd4, 0x14cacd09, - 0x4cccbe74, 0xc91528a9, 0x0779e214, 0x82a074c9, 0xb77504ee, - 0x32ac9233, 0xfcc0588e, 0x7919ce53, 0x211fbd2e, 0xa4c62bf3, - 0x6aaae14e, 0xef737793, 0xf54b7eb3, 0x7092e86e, 0xbefe22d3, - 0x3b27b40e, 0x6321c773, 0xe6f851ae, 0x28949b13, 0xad4d0dce, - 0x98987de9, 0x1d41eb34, 0xd32d2189, 0x56f4b754, 0x0ef2c429, - 0x8b2b52f4, 0x45479849, 0xc09e0e94, 0x2fed7907, 0xaa34efda, - 0x64582567, 0xe181b3ba, 0xb987c0c7, 0x3c5e561a, 0xf2329ca7, - 0x77eb0a7a, 0x423e7a5d, 0xc7e7ec80, 0x098b263d, 0x8c52b0e0, - 0xd454c39d, 0x518d5540, 0x9fe19ffd, 0x1a380920, 0xab918dbd, - 0x2e481b60, 0xe024d1dd, 0x65fd4700, 0x3dfb347d, 0xb822a2a0, - 0x764e681d, 0xf397fec0, 0xc6428ee7, 0x439b183a, 0x8df7d287, - 0x082e445a, 0x50283727, 0xd5f1a1fa, 0x1b9d6b47, 0x9e44fd9a, - 0x71378a09, 0xf4ee1cd4, 0x3a82d669, 0xbf5b40b4, 0xe75d33c9, - 0x6284a514, 0xace86fa9, 0x2931f974, 0x1ce48953, 0x993d1f8e, - 0x5751d533, 0xd28843ee, 0x8a8e3093, 0x0f57a64e, 0xc13b6cf3, - 0x44e2fa2e, 0x5edaf30e, 0xdb0365d3, 0x156faf6e, 0x90b639b3, - 0xc8b04ace, 0x4d69dc13, 0x830516ae, 0x06dc8073, 0x3309f054, - 0xb6d06689, 0x78bcac34, 0xfd653ae9, 0xa5634994, 0x20badf49, - 0xeed615f4, 0x6b0f8329, 0x847cf4ba, 0x01a56267, 0xcfc9a8da, - 0x4a103e07, 0x12164d7a, 0x97cfdba7, 0x59a3111a, 0xdc7a87c7, - 0xe9aff7e0, 0x6c76613d, 0xa21aab80, 0x27c33d5d, 0x7fc54e20, - 0xfa1cd8fd, 0x34701240, 0xb1a9849d, 0x17256aa0, 0x92fcfc7d, - 0x5c9036c0, 0xd949a01d, 0x814fd360, 0x049645bd, 0xcafa8f00, - 0x4f2319dd, 0x7af669fa, 0xff2fff27, 0x3143359a, 0xb49aa347, - 0xec9cd03a, 0x694546e7, 0xa7298c5a, 0x22f01a87, 0xcd836d14, - 0x485afbc9, 0x86363174, 0x03efa7a9, 0x5be9d4d4, 0xde304209, - 0x105c88b4, 0x95851e69, 0xa0506e4e, 0x2589f893, 0xebe5322e, - 0x6e3ca4f3, 0x363ad78e, 0xb3e34153, 0x7d8f8bee, 0xf8561d33, - 0xe26e1413, 0x67b782ce, 0xa9db4873, 0x2c02deae, 0x7404add3, - 0xf1dd3b0e, 0x3fb1f1b3, 0xba68676e, 0x8fbd1749, 0x0a648194, - 0xc4084b29, 0x41d1ddf4, 0x19d7ae89, 0x9c0e3854, 0x5262f2e9, - 0xd7bb6434, 0x38c813a7, 0xbd11857a, 0x737d4fc7, 0xf6a4d91a, - 0xaea2aa67, 0x2b7b3cba, 0xe517f607, 0x60ce60da, 0x551b10fd, - 0xd0c28620, 0x1eae4c9d, 0x9b77da40, 0xc371a93d, 0x46a83fe0, - 0x88c4f55d, 0x0d1d6380, 0xbcb4e71d, 0x396d71c0, 0xf701bb7d, - 0x72d82da0, 0x2ade5edd, 0xaf07c800, 0x616b02bd, 0xe4b29460, - 0xd167e447, 0x54be729a, 0x9ad2b827, 0x1f0b2efa, 0x470d5d87, - 0xc2d4cb5a, 0x0cb801e7, 0x8961973a, 0x6612e0a9, 0xe3cb7674, - 0x2da7bcc9, 0xa87e2a14, 0xf0785969, 0x75a1cfb4, 0xbbcd0509, - 0x3e1493d4, 0x0bc1e3f3, 0x8e18752e, 0x4074bf93, 0xc5ad294e, - 0x9dab5a33, 0x1872ccee, 0xd61e0653, 0x53c7908e, 0x49ff99ae, - 0xcc260f73, 0x024ac5ce, 0x87935313, 0xdf95206e, 0x5a4cb6b3, - 0x94207c0e, 0x11f9ead3, 0x242c9af4, 0xa1f50c29, 0x6f99c694, - 0xea405049, 0xb2462334, 0x379fb5e9, 0xf9f37f54, 0x7c2ae989, - 0x93599e1a, 0x168008c7, 0xd8ecc27a, 0x5d3554a7, 0x053327da, - 0x80eab107, 0x4e867bba, 0xcb5fed67, 0xfe8a9d40, 0x7b530b9d, - 0xb53fc120, 0x30e657fd, 0x68e02480, 0xed39b25d, 0x235578e0, - 0xa68cee3d}, - {0x00000000, 0x76e10f9d, 0xadc46ee1, 0xdb25617c, 0x1b8fac19, - 0x6d6ea384, 0xb64bc2f8, 0xc0aacd65, 0x361e5933, 0x40ff56ae, - 0x9bda37d2, 0xed3b384f, 0x2d91f52a, 0x5b70fab7, 0x80559bcb, - 0xf6b49456, 0x6c3cb266, 0x1addbdfb, 0xc1f8dc87, 0xb719d31a, - 0x77b31e7f, 0x015211e2, 0xda77709e, 0xac967f03, 0x5a22eb55, - 0x2cc3e4c8, 0xf7e685b4, 0x81078a29, 0x41ad474c, 0x374c48d1, - 0xec6929ad, 0x9a882630, 0xd87864cd, 0xae996b50, 0x75bc0a2c, - 0x035d05b1, 0xc3f7c8d4, 0xb516c749, 0x6e33a635, 0x18d2a9a8, - 0xee663dfe, 0x98873263, 0x43a2531f, 0x35435c82, 0xf5e991e7, - 0x83089e7a, 0x582dff06, 0x2eccf09b, 0xb444d6ab, 0xc2a5d936, - 0x1980b84a, 0x6f61b7d7, 0xafcb7ab2, 0xd92a752f, 0x020f1453, - 0x74ee1bce, 0x825a8f98, 0xf4bb8005, 0x2f9ee179, 0x597feee4, - 0x99d52381, 0xef342c1c, 0x34114d60, 0x42f042fd, 0xf1f7b941, - 0x8716b6dc, 0x5c33d7a0, 0x2ad2d83d, 0xea781558, 0x9c991ac5, - 0x47bc7bb9, 0x315d7424, 0xc7e9e072, 0xb108efef, 0x6a2d8e93, - 0x1ccc810e, 0xdc664c6b, 0xaa8743f6, 0x71a2228a, 0x07432d17, - 0x9dcb0b27, 0xeb2a04ba, 0x300f65c6, 0x46ee6a5b, 0x8644a73e, - 0xf0a5a8a3, 0x2b80c9df, 0x5d61c642, 0xabd55214, 0xdd345d89, - 0x06113cf5, 0x70f03368, 0xb05afe0d, 0xc6bbf190, 0x1d9e90ec, - 0x6b7f9f71, 0x298fdd8c, 0x5f6ed211, 0x844bb36d, 0xf2aabcf0, - 0x32007195, 0x44e17e08, 0x9fc41f74, 0xe92510e9, 0x1f9184bf, - 0x69708b22, 0xb255ea5e, 0xc4b4e5c3, 0x041e28a6, 0x72ff273b, - 0xa9da4647, 0xdf3b49da, 0x45b36fea, 0x33526077, 0xe877010b, - 0x9e960e96, 0x5e3cc3f3, 0x28ddcc6e, 0xf3f8ad12, 0x8519a28f, - 0x73ad36d9, 0x054c3944, 0xde695838, 0xa88857a5, 0x68229ac0, - 0x1ec3955d, 0xc5e6f421, 0xb307fbbc, 0xe2ef7383, 0x940e7c1e, - 0x4f2b1d62, 0x39ca12ff, 0xf960df9a, 0x8f81d007, 0x54a4b17b, - 0x2245bee6, 0xd4f12ab0, 0xa210252d, 0x79354451, 0x0fd44bcc, - 0xcf7e86a9, 0xb99f8934, 0x62bae848, 0x145be7d5, 0x8ed3c1e5, - 0xf832ce78, 0x2317af04, 0x55f6a099, 0x955c6dfc, 0xe3bd6261, - 0x3898031d, 0x4e790c80, 0xb8cd98d6, 0xce2c974b, 0x1509f637, - 0x63e8f9aa, 0xa34234cf, 0xd5a33b52, 0x0e865a2e, 0x786755b3, - 0x3a97174e, 0x4c7618d3, 0x975379af, 0xe1b27632, 0x2118bb57, - 0x57f9b4ca, 0x8cdcd5b6, 0xfa3dda2b, 0x0c894e7d, 0x7a6841e0, - 0xa14d209c, 0xd7ac2f01, 0x1706e264, 0x61e7edf9, 0xbac28c85, - 0xcc238318, 0x56aba528, 0x204aaab5, 0xfb6fcbc9, 0x8d8ec454, - 0x4d240931, 0x3bc506ac, 0xe0e067d0, 0x9601684d, 0x60b5fc1b, - 0x1654f386, 0xcd7192fa, 0xbb909d67, 0x7b3a5002, 0x0ddb5f9f, - 0xd6fe3ee3, 0xa01f317e, 0x1318cac2, 0x65f9c55f, 0xbedca423, - 0xc83dabbe, 0x089766db, 0x7e766946, 0xa553083a, 0xd3b207a7, - 0x250693f1, 0x53e79c6c, 0x88c2fd10, 0xfe23f28d, 0x3e893fe8, - 0x48683075, 0x934d5109, 0xe5ac5e94, 0x7f2478a4, 0x09c57739, - 0xd2e01645, 0xa40119d8, 0x64abd4bd, 0x124adb20, 0xc96fba5c, - 0xbf8eb5c1, 0x493a2197, 0x3fdb2e0a, 0xe4fe4f76, 0x921f40eb, - 0x52b58d8e, 0x24548213, 0xff71e36f, 0x8990ecf2, 0xcb60ae0f, - 0xbd81a192, 0x66a4c0ee, 0x1045cf73, 0xd0ef0216, 0xa60e0d8b, - 0x7d2b6cf7, 0x0bca636a, 0xfd7ef73c, 0x8b9ff8a1, 0x50ba99dd, - 0x265b9640, 0xe6f15b25, 0x901054b8, 0x4b3535c4, 0x3dd43a59, - 0xa75c1c69, 0xd1bd13f4, 0x0a987288, 0x7c797d15, 0xbcd3b070, - 0xca32bfed, 0x1117de91, 0x67f6d10c, 0x9142455a, 0xe7a34ac7, - 0x3c862bbb, 0x4a672426, 0x8acde943, 0xfc2ce6de, 0x270987a2, - 0x51e8883f}, - {0x00000000, 0xe8dbfbb9, 0x91b186a8, 0x796a7d11, 0x63657c8a, - 0x8bbe8733, 0xf2d4fa22, 0x1a0f019b, 0x87cc89cf, 0x6f177276, - 0x167d0f67, 0xfea6f4de, 0xe4a9f545, 0x0c720efc, 0x751873ed, - 0x9dc38854, 0x4f9f6244, 0xa74499fd, 0xde2ee4ec, 0x36f51f55, - 0x2cfa1ece, 0xc421e577, 0xbd4b9866, 0x559063df, 0xc853eb8b, - 0x20881032, 0x59e26d23, 0xb139969a, 0xab369701, 0x43ed6cb8, - 0x3a8711a9, 0xd25cea10, 0x9e3ec588, 0x76e53e31, 0x0f8f4320, - 0xe754b899, 0xfd5bb902, 0x158042bb, 0x6cea3faa, 0x8431c413, - 0x19f24c47, 0xf129b7fe, 0x8843caef, 0x60983156, 0x7a9730cd, - 0x924ccb74, 0xeb26b665, 0x03fd4ddc, 0xd1a1a7cc, 0x397a5c75, - 0x40102164, 0xa8cbdadd, 0xb2c4db46, 0x5a1f20ff, 0x23755dee, - 0xcbaea657, 0x566d2e03, 0xbeb6d5ba, 0xc7dca8ab, 0x2f075312, - 0x35085289, 0xddd3a930, 0xa4b9d421, 0x4c622f98, 0x7d7bfbca, - 0x95a00073, 0xecca7d62, 0x041186db, 0x1e1e8740, 0xf6c57cf9, - 0x8faf01e8, 0x6774fa51, 0xfab77205, 0x126c89bc, 0x6b06f4ad, - 0x83dd0f14, 0x99d20e8f, 0x7109f536, 0x08638827, 0xe0b8739e, - 0x32e4998e, 0xda3f6237, 0xa3551f26, 0x4b8ee49f, 0x5181e504, - 0xb95a1ebd, 0xc03063ac, 0x28eb9815, 0xb5281041, 0x5df3ebf8, - 0x249996e9, 0xcc426d50, 0xd64d6ccb, 0x3e969772, 0x47fcea63, - 0xaf2711da, 0xe3453e42, 0x0b9ec5fb, 0x72f4b8ea, 0x9a2f4353, - 0x802042c8, 0x68fbb971, 0x1191c460, 0xf94a3fd9, 0x6489b78d, - 0x8c524c34, 0xf5383125, 0x1de3ca9c, 0x07eccb07, 0xef3730be, - 0x965d4daf, 0x7e86b616, 0xacda5c06, 0x4401a7bf, 0x3d6bdaae, - 0xd5b02117, 0xcfbf208c, 0x2764db35, 0x5e0ea624, 0xb6d55d9d, - 0x2b16d5c9, 0xc3cd2e70, 0xbaa75361, 0x527ca8d8, 0x4873a943, - 0xa0a852fa, 0xd9c22feb, 0x3119d452, 0xbbf0874e, 0x532b7cf7, - 0x2a4101e6, 0xc29afa5f, 0xd895fbc4, 0x304e007d, 0x49247d6c, - 0xa1ff86d5, 0x3c3c0e81, 0xd4e7f538, 0xad8d8829, 0x45567390, - 0x5f59720b, 0xb78289b2, 0xcee8f4a3, 0x26330f1a, 0xf46fe50a, - 0x1cb41eb3, 0x65de63a2, 0x8d05981b, 0x970a9980, 0x7fd16239, - 0x06bb1f28, 0xee60e491, 0x73a36cc5, 0x9b78977c, 0xe212ea6d, - 0x0ac911d4, 0x10c6104f, 0xf81debf6, 0x817796e7, 0x69ac6d5e, - 0x25ce42c6, 0xcd15b97f, 0xb47fc46e, 0x5ca43fd7, 0x46ab3e4c, - 0xae70c5f5, 0xd71ab8e4, 0x3fc1435d, 0xa202cb09, 0x4ad930b0, - 0x33b34da1, 0xdb68b618, 0xc167b783, 0x29bc4c3a, 0x50d6312b, - 0xb80dca92, 0x6a512082, 0x828adb3b, 0xfbe0a62a, 0x133b5d93, - 0x09345c08, 0xe1efa7b1, 0x9885daa0, 0x705e2119, 0xed9da94d, - 0x054652f4, 0x7c2c2fe5, 0x94f7d45c, 0x8ef8d5c7, 0x66232e7e, - 0x1f49536f, 0xf792a8d6, 0xc68b7c84, 0x2e50873d, 0x573afa2c, - 0xbfe10195, 0xa5ee000e, 0x4d35fbb7, 0x345f86a6, 0xdc847d1f, - 0x4147f54b, 0xa99c0ef2, 0xd0f673e3, 0x382d885a, 0x222289c1, - 0xcaf97278, 0xb3930f69, 0x5b48f4d0, 0x89141ec0, 0x61cfe579, - 0x18a59868, 0xf07e63d1, 0xea71624a, 0x02aa99f3, 0x7bc0e4e2, - 0x931b1f5b, 0x0ed8970f, 0xe6036cb6, 0x9f6911a7, 0x77b2ea1e, - 0x6dbdeb85, 0x8566103c, 0xfc0c6d2d, 0x14d79694, 0x58b5b90c, - 0xb06e42b5, 0xc9043fa4, 0x21dfc41d, 0x3bd0c586, 0xd30b3e3f, - 0xaa61432e, 0x42bab897, 0xdf7930c3, 0x37a2cb7a, 0x4ec8b66b, - 0xa6134dd2, 0xbc1c4c49, 0x54c7b7f0, 0x2dadcae1, 0xc5763158, - 0x172adb48, 0xfff120f1, 0x869b5de0, 0x6e40a659, 0x744fa7c2, - 0x9c945c7b, 0xe5fe216a, 0x0d25dad3, 0x90e65287, 0x783da93e, - 0x0157d42f, 0xe98c2f96, 0xf3832e0d, 0x1b58d5b4, 0x6232a8a5, - 0x8ae9531c}, - {0x00000000, 0x919168ae, 0x6325a087, 0xf2b4c829, 0x874c31d4, - 0x16dd597a, 0xe4699153, 0x75f8f9fd, 0x4f9f1373, 0xde0e7bdd, - 0x2cbab3f4, 0xbd2bdb5a, 0xc8d322a7, 0x59424a09, 0xabf68220, - 0x3a67ea8e, 0x9e3e27e6, 0x0faf4f48, 0xfd1b8761, 0x6c8aefcf, - 0x19721632, 0x88e37e9c, 0x7a57b6b5, 0xebc6de1b, 0xd1a13495, - 0x40305c3b, 0xb2849412, 0x2315fcbc, 0x56ed0541, 0xc77c6def, - 0x35c8a5c6, 0xa459cd68, 0x7d7b3f17, 0xecea57b9, 0x1e5e9f90, - 0x8fcff73e, 0xfa370ec3, 0x6ba6666d, 0x9912ae44, 0x0883c6ea, - 0x32e42c64, 0xa37544ca, 0x51c18ce3, 0xc050e44d, 0xb5a81db0, - 0x2439751e, 0xd68dbd37, 0x471cd599, 0xe34518f1, 0x72d4705f, - 0x8060b876, 0x11f1d0d8, 0x64092925, 0xf598418b, 0x072c89a2, - 0x96bde10c, 0xacda0b82, 0x3d4b632c, 0xcfffab05, 0x5e6ec3ab, - 0x2b963a56, 0xba0752f8, 0x48b39ad1, 0xd922f27f, 0xfaf67e2e, - 0x6b671680, 0x99d3dea9, 0x0842b607, 0x7dba4ffa, 0xec2b2754, - 0x1e9fef7d, 0x8f0e87d3, 0xb5696d5d, 0x24f805f3, 0xd64ccdda, - 0x47dda574, 0x32255c89, 0xa3b43427, 0x5100fc0e, 0xc09194a0, - 0x64c859c8, 0xf5593166, 0x07edf94f, 0x967c91e1, 0xe384681c, - 0x721500b2, 0x80a1c89b, 0x1130a035, 0x2b574abb, 0xbac62215, - 0x4872ea3c, 0xd9e38292, 0xac1b7b6f, 0x3d8a13c1, 0xcf3edbe8, - 0x5eafb346, 0x878d4139, 0x161c2997, 0xe4a8e1be, 0x75398910, - 0x00c170ed, 0x91501843, 0x63e4d06a, 0xf275b8c4, 0xc812524a, - 0x59833ae4, 0xab37f2cd, 0x3aa69a63, 0x4f5e639e, 0xdecf0b30, - 0x2c7bc319, 0xbdeaabb7, 0x19b366df, 0x88220e71, 0x7a96c658, - 0xeb07aef6, 0x9eff570b, 0x0f6e3fa5, 0xfddaf78c, 0x6c4b9f22, - 0x562c75ac, 0xc7bd1d02, 0x3509d52b, 0xa498bd85, 0xd1604478, - 0x40f12cd6, 0xb245e4ff, 0x23d48c51, 0xf4edfd5c, 0x657c95f2, - 0x97c85ddb, 0x06593575, 0x73a1cc88, 0xe230a426, 0x10846c0f, - 0x811504a1, 0xbb72ee2f, 0x2ae38681, 0xd8574ea8, 0x49c62606, - 0x3c3edffb, 0xadafb755, 0x5f1b7f7c, 0xce8a17d2, 0x6ad3daba, - 0xfb42b214, 0x09f67a3d, 0x98671293, 0xed9feb6e, 0x7c0e83c0, - 0x8eba4be9, 0x1f2b2347, 0x254cc9c9, 0xb4dda167, 0x4669694e, - 0xd7f801e0, 0xa200f81d, 0x339190b3, 0xc125589a, 0x50b43034, - 0x8996c24b, 0x1807aae5, 0xeab362cc, 0x7b220a62, 0x0edaf39f, - 0x9f4b9b31, 0x6dff5318, 0xfc6e3bb6, 0xc609d138, 0x5798b996, - 0xa52c71bf, 0x34bd1911, 0x4145e0ec, 0xd0d48842, 0x2260406b, - 0xb3f128c5, 0x17a8e5ad, 0x86398d03, 0x748d452a, 0xe51c2d84, - 0x90e4d479, 0x0175bcd7, 0xf3c174fe, 0x62501c50, 0x5837f6de, - 0xc9a69e70, 0x3b125659, 0xaa833ef7, 0xdf7bc70a, 0x4eeaafa4, - 0xbc5e678d, 0x2dcf0f23, 0x0e1b8372, 0x9f8aebdc, 0x6d3e23f5, - 0xfcaf4b5b, 0x8957b2a6, 0x18c6da08, 0xea721221, 0x7be37a8f, - 0x41849001, 0xd015f8af, 0x22a13086, 0xb3305828, 0xc6c8a1d5, - 0x5759c97b, 0xa5ed0152, 0x347c69fc, 0x9025a494, 0x01b4cc3a, - 0xf3000413, 0x62916cbd, 0x17699540, 0x86f8fdee, 0x744c35c7, - 0xe5dd5d69, 0xdfbab7e7, 0x4e2bdf49, 0xbc9f1760, 0x2d0e7fce, - 0x58f68633, 0xc967ee9d, 0x3bd326b4, 0xaa424e1a, 0x7360bc65, - 0xe2f1d4cb, 0x10451ce2, 0x81d4744c, 0xf42c8db1, 0x65bde51f, - 0x97092d36, 0x06984598, 0x3cffaf16, 0xad6ec7b8, 0x5fda0f91, - 0xce4b673f, 0xbbb39ec2, 0x2a22f66c, 0xd8963e45, 0x490756eb, - 0xed5e9b83, 0x7ccff32d, 0x8e7b3b04, 0x1fea53aa, 0x6a12aa57, - 0xfb83c2f9, 0x09370ad0, 0x98a6627e, 0xa2c188f0, 0x3350e05e, - 0xc1e42877, 0x507540d9, 0x258db924, 0xb41cd18a, 0x46a819a3, - 0xd739710d}}; - -#endif - -#endif - -#if N == 5 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xaf449247, 0x85f822cf, 0x2abcb088, 0xd08143df, - 0x7fc5d198, 0x55796110, 0xfa3df357, 0x7a7381ff, 0xd53713b8, - 0xff8ba330, 0x50cf3177, 0xaaf2c220, 0x05b65067, 0x2f0ae0ef, - 0x804e72a8, 0xf4e703fe, 0x5ba391b9, 0x711f2131, 0xde5bb376, - 0x24664021, 0x8b22d266, 0xa19e62ee, 0x0edaf0a9, 0x8e948201, - 0x21d01046, 0x0b6ca0ce, 0xa4283289, 0x5e15c1de, 0xf1515399, - 0xdbede311, 0x74a97156, 0x32bf01bd, 0x9dfb93fa, 0xb7472372, - 0x1803b135, 0xe23e4262, 0x4d7ad025, 0x67c660ad, 0xc882f2ea, - 0x48cc8042, 0xe7881205, 0xcd34a28d, 0x627030ca, 0x984dc39d, - 0x370951da, 0x1db5e152, 0xb2f17315, 0xc6580243, 0x691c9004, - 0x43a0208c, 0xece4b2cb, 0x16d9419c, 0xb99dd3db, 0x93216353, - 0x3c65f114, 0xbc2b83bc, 0x136f11fb, 0x39d3a173, 0x96973334, - 0x6caac063, 0xc3ee5224, 0xe952e2ac, 0x461670eb, 0x657e037a, - 0xca3a913d, 0xe08621b5, 0x4fc2b3f2, 0xb5ff40a5, 0x1abbd2e2, - 0x3007626a, 0x9f43f02d, 0x1f0d8285, 0xb04910c2, 0x9af5a04a, - 0x35b1320d, 0xcf8cc15a, 0x60c8531d, 0x4a74e395, 0xe53071d2, - 0x91990084, 0x3edd92c3, 0x1461224b, 0xbb25b00c, 0x4118435b, - 0xee5cd11c, 0xc4e06194, 0x6ba4f3d3, 0xebea817b, 0x44ae133c, - 0x6e12a3b4, 0xc15631f3, 0x3b6bc2a4, 0x942f50e3, 0xbe93e06b, - 0x11d7722c, 0x57c102c7, 0xf8859080, 0xd2392008, 0x7d7db24f, - 0x87404118, 0x2804d35f, 0x02b863d7, 0xadfcf190, 0x2db28338, - 0x82f6117f, 0xa84aa1f7, 0x070e33b0, 0xfd33c0e7, 0x527752a0, - 0x78cbe228, 0xd78f706f, 0xa3260139, 0x0c62937e, 0x26de23f6, - 0x899ab1b1, 0x73a742e6, 0xdce3d0a1, 0xf65f6029, 0x591bf26e, - 0xd95580c6, 0x76111281, 0x5cada209, 0xf3e9304e, 0x09d4c319, - 0xa690515e, 0x8c2ce1d6, 0x23687391, 0xcafc06f4, 0x65b894b3, - 0x4f04243b, 0xe040b67c, 0x1a7d452b, 0xb539d76c, 0x9f8567e4, - 0x30c1f5a3, 0xb08f870b, 0x1fcb154c, 0x3577a5c4, 0x9a333783, - 0x600ec4d4, 0xcf4a5693, 0xe5f6e61b, 0x4ab2745c, 0x3e1b050a, - 0x915f974d, 0xbbe327c5, 0x14a7b582, 0xee9a46d5, 0x41ded492, - 0x6b62641a, 0xc426f65d, 0x446884f5, 0xeb2c16b2, 0xc190a63a, - 0x6ed4347d, 0x94e9c72a, 0x3bad556d, 0x1111e5e5, 0xbe5577a2, - 0xf8430749, 0x5707950e, 0x7dbb2586, 0xd2ffb7c1, 0x28c24496, - 0x8786d6d1, 0xad3a6659, 0x027ef41e, 0x823086b6, 0x2d7414f1, - 0x07c8a479, 0xa88c363e, 0x52b1c569, 0xfdf5572e, 0xd749e7a6, - 0x780d75e1, 0x0ca404b7, 0xa3e096f0, 0x895c2678, 0x2618b43f, - 0xdc254768, 0x7361d52f, 0x59dd65a7, 0xf699f7e0, 0x76d78548, - 0xd993170f, 0xf32fa787, 0x5c6b35c0, 0xa656c697, 0x091254d0, - 0x23aee458, 0x8cea761f, 0xaf82058e, 0x00c697c9, 0x2a7a2741, - 0x853eb506, 0x7f034651, 0xd047d416, 0xfafb649e, 0x55bff6d9, - 0xd5f18471, 0x7ab51636, 0x5009a6be, 0xff4d34f9, 0x0570c7ae, - 0xaa3455e9, 0x8088e561, 0x2fcc7726, 0x5b650670, 0xf4219437, - 0xde9d24bf, 0x71d9b6f8, 0x8be445af, 0x24a0d7e8, 0x0e1c6760, - 0xa158f527, 0x2116878f, 0x8e5215c8, 0xa4eea540, 0x0baa3707, - 0xf197c450, 0x5ed35617, 0x746fe69f, 0xdb2b74d8, 0x9d3d0433, - 0x32799674, 0x18c526fc, 0xb781b4bb, 0x4dbc47ec, 0xe2f8d5ab, - 0xc8446523, 0x6700f764, 0xe74e85cc, 0x480a178b, 0x62b6a703, - 0xcdf23544, 0x37cfc613, 0x988b5454, 0xb237e4dc, 0x1d73769b, - 0x69da07cd, 0xc69e958a, 0xec222502, 0x4366b745, 0xb95b4412, - 0x161fd655, 0x3ca366dd, 0x93e7f49a, 0x13a98632, 0xbced1475, - 0x9651a4fd, 0x391536ba, 0xc328c5ed, 0x6c6c57aa, 0x46d0e722, - 0xe9947565}, - {0x00000000, 0x4e890ba9, 0x9d121752, 0xd39b1cfb, 0xe15528e5, - 0xafdc234c, 0x7c473fb7, 0x32ce341e, 0x19db578b, 0x57525c22, - 0x84c940d9, 0xca404b70, 0xf88e7f6e, 0xb60774c7, 0x659c683c, - 0x2b156395, 0x33b6af16, 0x7d3fa4bf, 0xaea4b844, 0xe02db3ed, - 0xd2e387f3, 0x9c6a8c5a, 0x4ff190a1, 0x01789b08, 0x2a6df89d, - 0x64e4f334, 0xb77fefcf, 0xf9f6e466, 0xcb38d078, 0x85b1dbd1, - 0x562ac72a, 0x18a3cc83, 0x676d5e2c, 0x29e45585, 0xfa7f497e, - 0xb4f642d7, 0x863876c9, 0xc8b17d60, 0x1b2a619b, 0x55a36a32, - 0x7eb609a7, 0x303f020e, 0xe3a41ef5, 0xad2d155c, 0x9fe32142, - 0xd16a2aeb, 0x02f13610, 0x4c783db9, 0x54dbf13a, 0x1a52fa93, - 0xc9c9e668, 0x8740edc1, 0xb58ed9df, 0xfb07d276, 0x289cce8d, - 0x6615c524, 0x4d00a6b1, 0x0389ad18, 0xd012b1e3, 0x9e9bba4a, - 0xac558e54, 0xe2dc85fd, 0x31479906, 0x7fce92af, 0xcedabc58, - 0x8053b7f1, 0x53c8ab0a, 0x1d41a0a3, 0x2f8f94bd, 0x61069f14, - 0xb29d83ef, 0xfc148846, 0xd701ebd3, 0x9988e07a, 0x4a13fc81, - 0x049af728, 0x3654c336, 0x78ddc89f, 0xab46d464, 0xe5cfdfcd, - 0xfd6c134e, 0xb3e518e7, 0x607e041c, 0x2ef70fb5, 0x1c393bab, - 0x52b03002, 0x812b2cf9, 0xcfa22750, 0xe4b744c5, 0xaa3e4f6c, - 0x79a55397, 0x372c583e, 0x05e26c20, 0x4b6b6789, 0x98f07b72, - 0xd67970db, 0xa9b7e274, 0xe73ee9dd, 0x34a5f526, 0x7a2cfe8f, - 0x48e2ca91, 0x066bc138, 0xd5f0ddc3, 0x9b79d66a, 0xb06cb5ff, - 0xfee5be56, 0x2d7ea2ad, 0x63f7a904, 0x51399d1a, 0x1fb096b3, - 0xcc2b8a48, 0x82a281e1, 0x9a014d62, 0xd48846cb, 0x07135a30, - 0x499a5199, 0x7b546587, 0x35dd6e2e, 0xe64672d5, 0xa8cf797c, - 0x83da1ae9, 0xcd531140, 0x1ec80dbb, 0x50410612, 0x628f320c, - 0x2c0639a5, 0xff9d255e, 0xb1142ef7, 0x46c47ef1, 0x084d7558, - 0xdbd669a3, 0x955f620a, 0xa7915614, 0xe9185dbd, 0x3a834146, - 0x740a4aef, 0x5f1f297a, 0x119622d3, 0xc20d3e28, 0x8c843581, - 0xbe4a019f, 0xf0c30a36, 0x235816cd, 0x6dd11d64, 0x7572d1e7, - 0x3bfbda4e, 0xe860c6b5, 0xa6e9cd1c, 0x9427f902, 0xdaaef2ab, - 0x0935ee50, 0x47bce5f9, 0x6ca9866c, 0x22208dc5, 0xf1bb913e, - 0xbf329a97, 0x8dfcae89, 0xc375a520, 0x10eeb9db, 0x5e67b272, - 0x21a920dd, 0x6f202b74, 0xbcbb378f, 0xf2323c26, 0xc0fc0838, - 0x8e750391, 0x5dee1f6a, 0x136714c3, 0x38727756, 0x76fb7cff, - 0xa5606004, 0xebe96bad, 0xd9275fb3, 0x97ae541a, 0x443548e1, - 0x0abc4348, 0x121f8fcb, 0x5c968462, 0x8f0d9899, 0xc1849330, - 0xf34aa72e, 0xbdc3ac87, 0x6e58b07c, 0x20d1bbd5, 0x0bc4d840, - 0x454dd3e9, 0x96d6cf12, 0xd85fc4bb, 0xea91f0a5, 0xa418fb0c, - 0x7783e7f7, 0x390aec5e, 0x881ec2a9, 0xc697c900, 0x150cd5fb, - 0x5b85de52, 0x694bea4c, 0x27c2e1e5, 0xf459fd1e, 0xbad0f6b7, - 0x91c59522, 0xdf4c9e8b, 0x0cd78270, 0x425e89d9, 0x7090bdc7, - 0x3e19b66e, 0xed82aa95, 0xa30ba13c, 0xbba86dbf, 0xf5216616, - 0x26ba7aed, 0x68337144, 0x5afd455a, 0x14744ef3, 0xc7ef5208, - 0x896659a1, 0xa2733a34, 0xecfa319d, 0x3f612d66, 0x71e826cf, - 0x432612d1, 0x0daf1978, 0xde340583, 0x90bd0e2a, 0xef739c85, - 0xa1fa972c, 0x72618bd7, 0x3ce8807e, 0x0e26b460, 0x40afbfc9, - 0x9334a332, 0xddbda89b, 0xf6a8cb0e, 0xb821c0a7, 0x6bbadc5c, - 0x2533d7f5, 0x17fde3eb, 0x5974e842, 0x8aeff4b9, 0xc466ff10, - 0xdcc53393, 0x924c383a, 0x41d724c1, 0x0f5e2f68, 0x3d901b76, - 0x731910df, 0xa0820c24, 0xee0b078d, 0xc51e6418, 0x8b976fb1, - 0x580c734a, 0x168578e3, 0x244b4cfd, 0x6ac24754, 0xb9595baf, - 0xf7d05006}, - {0x00000000, 0x8d88fde2, 0xc060fd85, 0x4de80067, 0x5bb0fd4b, - 0xd63800a9, 0x9bd000ce, 0x1658fd2c, 0xb761fa96, 0x3ae90774, - 0x77010713, 0xfa89faf1, 0xecd107dd, 0x6159fa3f, 0x2cb1fa58, - 0xa13907ba, 0xb5b2f36d, 0x383a0e8f, 0x75d20ee8, 0xf85af30a, - 0xee020e26, 0x638af3c4, 0x2e62f3a3, 0xa3ea0e41, 0x02d309fb, - 0x8f5bf419, 0xc2b3f47e, 0x4f3b099c, 0x5963f4b0, 0xd4eb0952, - 0x99030935, 0x148bf4d7, 0xb014e09b, 0x3d9c1d79, 0x70741d1e, - 0xfdfce0fc, 0xeba41dd0, 0x662ce032, 0x2bc4e055, 0xa64c1db7, - 0x07751a0d, 0x8afde7ef, 0xc715e788, 0x4a9d1a6a, 0x5cc5e746, - 0xd14d1aa4, 0x9ca51ac3, 0x112de721, 0x05a613f6, 0x882eee14, - 0xc5c6ee73, 0x484e1391, 0x5e16eebd, 0xd39e135f, 0x9e761338, - 0x13feeeda, 0xb2c7e960, 0x3f4f1482, 0x72a714e5, 0xff2fe907, - 0xe977142b, 0x64ffe9c9, 0x2917e9ae, 0xa49f144c, 0xbb58c777, - 0x36d03a95, 0x7b383af2, 0xf6b0c710, 0xe0e83a3c, 0x6d60c7de, - 0x2088c7b9, 0xad003a5b, 0x0c393de1, 0x81b1c003, 0xcc59c064, - 0x41d13d86, 0x5789c0aa, 0xda013d48, 0x97e93d2f, 0x1a61c0cd, - 0x0eea341a, 0x8362c9f8, 0xce8ac99f, 0x4302347d, 0x555ac951, - 0xd8d234b3, 0x953a34d4, 0x18b2c936, 0xb98bce8c, 0x3403336e, - 0x79eb3309, 0xf463ceeb, 0xe23b33c7, 0x6fb3ce25, 0x225bce42, - 0xafd333a0, 0x0b4c27ec, 0x86c4da0e, 0xcb2cda69, 0x46a4278b, - 0x50fcdaa7, 0xdd742745, 0x909c2722, 0x1d14dac0, 0xbc2ddd7a, - 0x31a52098, 0x7c4d20ff, 0xf1c5dd1d, 0xe79d2031, 0x6a15ddd3, - 0x27fdddb4, 0xaa752056, 0xbefed481, 0x33762963, 0x7e9e2904, - 0xf316d4e6, 0xe54e29ca, 0x68c6d428, 0x252ed44f, 0xa8a629ad, - 0x099f2e17, 0x8417d3f5, 0xc9ffd392, 0x44772e70, 0x522fd35c, - 0xdfa72ebe, 0x924f2ed9, 0x1fc7d33b, 0xadc088af, 0x2048754d, - 0x6da0752a, 0xe02888c8, 0xf67075e4, 0x7bf88806, 0x36108861, - 0xbb987583, 0x1aa17239, 0x97298fdb, 0xdac18fbc, 0x5749725e, - 0x41118f72, 0xcc997290, 0x817172f7, 0x0cf98f15, 0x18727bc2, - 0x95fa8620, 0xd8128647, 0x559a7ba5, 0x43c28689, 0xce4a7b6b, - 0x83a27b0c, 0x0e2a86ee, 0xaf138154, 0x229b7cb6, 0x6f737cd1, - 0xe2fb8133, 0xf4a37c1f, 0x792b81fd, 0x34c3819a, 0xb94b7c78, - 0x1dd46834, 0x905c95d6, 0xddb495b1, 0x503c6853, 0x4664957f, - 0xcbec689d, 0x860468fa, 0x0b8c9518, 0xaab592a2, 0x273d6f40, - 0x6ad56f27, 0xe75d92c5, 0xf1056fe9, 0x7c8d920b, 0x3165926c, - 0xbced6f8e, 0xa8669b59, 0x25ee66bb, 0x680666dc, 0xe58e9b3e, - 0xf3d66612, 0x7e5e9bf0, 0x33b69b97, 0xbe3e6675, 0x1f0761cf, - 0x928f9c2d, 0xdf679c4a, 0x52ef61a8, 0x44b79c84, 0xc93f6166, - 0x84d76101, 0x095f9ce3, 0x16984fd8, 0x9b10b23a, 0xd6f8b25d, - 0x5b704fbf, 0x4d28b293, 0xc0a04f71, 0x8d484f16, 0x00c0b2f4, - 0xa1f9b54e, 0x2c7148ac, 0x619948cb, 0xec11b529, 0xfa494805, - 0x77c1b5e7, 0x3a29b580, 0xb7a14862, 0xa32abcb5, 0x2ea24157, - 0x634a4130, 0xeec2bcd2, 0xf89a41fe, 0x7512bc1c, 0x38fabc7b, - 0xb5724199, 0x144b4623, 0x99c3bbc1, 0xd42bbba6, 0x59a34644, - 0x4ffbbb68, 0xc273468a, 0x8f9b46ed, 0x0213bb0f, 0xa68caf43, - 0x2b0452a1, 0x66ec52c6, 0xeb64af24, 0xfd3c5208, 0x70b4afea, - 0x3d5caf8d, 0xb0d4526f, 0x11ed55d5, 0x9c65a837, 0xd18da850, - 0x5c0555b2, 0x4a5da89e, 0xc7d5557c, 0x8a3d551b, 0x07b5a8f9, - 0x133e5c2e, 0x9eb6a1cc, 0xd35ea1ab, 0x5ed65c49, 0x488ea165, - 0xc5065c87, 0x88ee5ce0, 0x0566a102, 0xa45fa6b8, 0x29d75b5a, - 0x643f5b3d, 0xe9b7a6df, 0xffef5bf3, 0x7267a611, 0x3f8fa676, - 0xb2075b94}, - {0x00000000, 0x80f0171f, 0xda91287f, 0x5a613f60, 0x6e5356bf, - 0xeea341a0, 0xb4c27ec0, 0x343269df, 0xdca6ad7e, 0x5c56ba61, - 0x06378501, 0x86c7921e, 0xb2f5fbc1, 0x3205ecde, 0x6864d3be, - 0xe894c4a1, 0x623c5cbd, 0xe2cc4ba2, 0xb8ad74c2, 0x385d63dd, - 0x0c6f0a02, 0x8c9f1d1d, 0xd6fe227d, 0x560e3562, 0xbe9af1c3, - 0x3e6ae6dc, 0x640bd9bc, 0xe4fbcea3, 0xd0c9a77c, 0x5039b063, - 0x0a588f03, 0x8aa8981c, 0xc478b97a, 0x4488ae65, 0x1ee99105, - 0x9e19861a, 0xaa2befc5, 0x2adbf8da, 0x70bac7ba, 0xf04ad0a5, - 0x18de1404, 0x982e031b, 0xc24f3c7b, 0x42bf2b64, 0x768d42bb, - 0xf67d55a4, 0xac1c6ac4, 0x2cec7ddb, 0xa644e5c7, 0x26b4f2d8, - 0x7cd5cdb8, 0xfc25daa7, 0xc817b378, 0x48e7a467, 0x12869b07, - 0x92768c18, 0x7ae248b9, 0xfa125fa6, 0xa07360c6, 0x208377d9, - 0x14b11e06, 0x94410919, 0xce203679, 0x4ed02166, 0x538074b5, - 0xd37063aa, 0x89115cca, 0x09e14bd5, 0x3dd3220a, 0xbd233515, - 0xe7420a75, 0x67b21d6a, 0x8f26d9cb, 0x0fd6ced4, 0x55b7f1b4, - 0xd547e6ab, 0xe1758f74, 0x6185986b, 0x3be4a70b, 0xbb14b014, - 0x31bc2808, 0xb14c3f17, 0xeb2d0077, 0x6bdd1768, 0x5fef7eb7, - 0xdf1f69a8, 0x857e56c8, 0x058e41d7, 0xed1a8576, 0x6dea9269, - 0x378bad09, 0xb77bba16, 0x8349d3c9, 0x03b9c4d6, 0x59d8fbb6, - 0xd928eca9, 0x97f8cdcf, 0x1708dad0, 0x4d69e5b0, 0xcd99f2af, - 0xf9ab9b70, 0x795b8c6f, 0x233ab30f, 0xa3caa410, 0x4b5e60b1, - 0xcbae77ae, 0x91cf48ce, 0x113f5fd1, 0x250d360e, 0xa5fd2111, - 0xff9c1e71, 0x7f6c096e, 0xf5c49172, 0x7534866d, 0x2f55b90d, - 0xafa5ae12, 0x9b97c7cd, 0x1b67d0d2, 0x4106efb2, 0xc1f6f8ad, - 0x29623c0c, 0xa9922b13, 0xf3f31473, 0x7303036c, 0x47316ab3, - 0xc7c17dac, 0x9da042cc, 0x1d5055d3, 0xa700e96a, 0x27f0fe75, - 0x7d91c115, 0xfd61d60a, 0xc953bfd5, 0x49a3a8ca, 0x13c297aa, - 0x933280b5, 0x7ba64414, 0xfb56530b, 0xa1376c6b, 0x21c77b74, - 0x15f512ab, 0x950505b4, 0xcf643ad4, 0x4f942dcb, 0xc53cb5d7, - 0x45cca2c8, 0x1fad9da8, 0x9f5d8ab7, 0xab6fe368, 0x2b9ff477, - 0x71fecb17, 0xf10edc08, 0x199a18a9, 0x996a0fb6, 0xc30b30d6, - 0x43fb27c9, 0x77c94e16, 0xf7395909, 0xad586669, 0x2da87176, - 0x63785010, 0xe388470f, 0xb9e9786f, 0x39196f70, 0x0d2b06af, - 0x8ddb11b0, 0xd7ba2ed0, 0x574a39cf, 0xbfdefd6e, 0x3f2eea71, - 0x654fd511, 0xe5bfc20e, 0xd18dabd1, 0x517dbcce, 0x0b1c83ae, - 0x8bec94b1, 0x01440cad, 0x81b41bb2, 0xdbd524d2, 0x5b2533cd, - 0x6f175a12, 0xefe74d0d, 0xb586726d, 0x35766572, 0xdde2a1d3, - 0x5d12b6cc, 0x077389ac, 0x87839eb3, 0xb3b1f76c, 0x3341e073, - 0x6920df13, 0xe9d0c80c, 0xf4809ddf, 0x74708ac0, 0x2e11b5a0, - 0xaee1a2bf, 0x9ad3cb60, 0x1a23dc7f, 0x4042e31f, 0xc0b2f400, - 0x282630a1, 0xa8d627be, 0xf2b718de, 0x72470fc1, 0x4675661e, - 0xc6857101, 0x9ce44e61, 0x1c14597e, 0x96bcc162, 0x164cd67d, - 0x4c2de91d, 0xccddfe02, 0xf8ef97dd, 0x781f80c2, 0x227ebfa2, - 0xa28ea8bd, 0x4a1a6c1c, 0xcaea7b03, 0x908b4463, 0x107b537c, - 0x24493aa3, 0xa4b92dbc, 0xfed812dc, 0x7e2805c3, 0x30f824a5, - 0xb00833ba, 0xea690cda, 0x6a991bc5, 0x5eab721a, 0xde5b6505, - 0x843a5a65, 0x04ca4d7a, 0xec5e89db, 0x6cae9ec4, 0x36cfa1a4, - 0xb63fb6bb, 0x820ddf64, 0x02fdc87b, 0x589cf71b, 0xd86ce004, - 0x52c47818, 0xd2346f07, 0x88555067, 0x08a54778, 0x3c972ea7, - 0xbc6739b8, 0xe60606d8, 0x66f611c7, 0x8e62d566, 0x0e92c279, - 0x54f3fd19, 0xd403ea06, 0xe03183d9, 0x60c194c6, 0x3aa0aba6, - 0xba50bcb9}, - {0x00000000, 0x9570d495, 0xf190af6b, 0x64e07bfe, 0x38505897, - 0xad208c02, 0xc9c0f7fc, 0x5cb02369, 0x70a0b12e, 0xe5d065bb, - 0x81301e45, 0x1440cad0, 0x48f0e9b9, 0xdd803d2c, 0xb96046d2, - 0x2c109247, 0xe141625c, 0x7431b6c9, 0x10d1cd37, 0x85a119a2, - 0xd9113acb, 0x4c61ee5e, 0x288195a0, 0xbdf14135, 0x91e1d372, - 0x049107e7, 0x60717c19, 0xf501a88c, 0xa9b18be5, 0x3cc15f70, - 0x5821248e, 0xcd51f01b, 0x19f3c2f9, 0x8c83166c, 0xe8636d92, - 0x7d13b907, 0x21a39a6e, 0xb4d34efb, 0xd0333505, 0x4543e190, - 0x695373d7, 0xfc23a742, 0x98c3dcbc, 0x0db30829, 0x51032b40, - 0xc473ffd5, 0xa093842b, 0x35e350be, 0xf8b2a0a5, 0x6dc27430, - 0x09220fce, 0x9c52db5b, 0xc0e2f832, 0x55922ca7, 0x31725759, - 0xa40283cc, 0x8812118b, 0x1d62c51e, 0x7982bee0, 0xecf26a75, - 0xb042491c, 0x25329d89, 0x41d2e677, 0xd4a232e2, 0x33e785f2, - 0xa6975167, 0xc2772a99, 0x5707fe0c, 0x0bb7dd65, 0x9ec709f0, - 0xfa27720e, 0x6f57a69b, 0x434734dc, 0xd637e049, 0xb2d79bb7, - 0x27a74f22, 0x7b176c4b, 0xee67b8de, 0x8a87c320, 0x1ff717b5, - 0xd2a6e7ae, 0x47d6333b, 0x233648c5, 0xb6469c50, 0xeaf6bf39, - 0x7f866bac, 0x1b661052, 0x8e16c4c7, 0xa2065680, 0x37768215, - 0x5396f9eb, 0xc6e62d7e, 0x9a560e17, 0x0f26da82, 0x6bc6a17c, - 0xfeb675e9, 0x2a14470b, 0xbf64939e, 0xdb84e860, 0x4ef43cf5, - 0x12441f9c, 0x8734cb09, 0xe3d4b0f7, 0x76a46462, 0x5ab4f625, - 0xcfc422b0, 0xab24594e, 0x3e548ddb, 0x62e4aeb2, 0xf7947a27, - 0x937401d9, 0x0604d54c, 0xcb552557, 0x5e25f1c2, 0x3ac58a3c, - 0xafb55ea9, 0xf3057dc0, 0x6675a955, 0x0295d2ab, 0x97e5063e, - 0xbbf59479, 0x2e8540ec, 0x4a653b12, 0xdf15ef87, 0x83a5ccee, - 0x16d5187b, 0x72356385, 0xe745b710, 0x67cf0be4, 0xf2bfdf71, - 0x965fa48f, 0x032f701a, 0x5f9f5373, 0xcaef87e6, 0xae0ffc18, - 0x3b7f288d, 0x176fbaca, 0x821f6e5f, 0xe6ff15a1, 0x738fc134, - 0x2f3fe25d, 0xba4f36c8, 0xdeaf4d36, 0x4bdf99a3, 0x868e69b8, - 0x13febd2d, 0x771ec6d3, 0xe26e1246, 0xbede312f, 0x2baee5ba, - 0x4f4e9e44, 0xda3e4ad1, 0xf62ed896, 0x635e0c03, 0x07be77fd, - 0x92cea368, 0xce7e8001, 0x5b0e5494, 0x3fee2f6a, 0xaa9efbff, - 0x7e3cc91d, 0xeb4c1d88, 0x8fac6676, 0x1adcb2e3, 0x466c918a, - 0xd31c451f, 0xb7fc3ee1, 0x228cea74, 0x0e9c7833, 0x9becaca6, - 0xff0cd758, 0x6a7c03cd, 0x36cc20a4, 0xa3bcf431, 0xc75c8fcf, - 0x522c5b5a, 0x9f7dab41, 0x0a0d7fd4, 0x6eed042a, 0xfb9dd0bf, - 0xa72df3d6, 0x325d2743, 0x56bd5cbd, 0xc3cd8828, 0xefdd1a6f, - 0x7aadcefa, 0x1e4db504, 0x8b3d6191, 0xd78d42f8, 0x42fd966d, - 0x261ded93, 0xb36d3906, 0x54288e16, 0xc1585a83, 0xa5b8217d, - 0x30c8f5e8, 0x6c78d681, 0xf9080214, 0x9de879ea, 0x0898ad7f, - 0x24883f38, 0xb1f8ebad, 0xd5189053, 0x406844c6, 0x1cd867af, - 0x89a8b33a, 0xed48c8c4, 0x78381c51, 0xb569ec4a, 0x201938df, - 0x44f94321, 0xd18997b4, 0x8d39b4dd, 0x18496048, 0x7ca91bb6, - 0xe9d9cf23, 0xc5c95d64, 0x50b989f1, 0x3459f20f, 0xa129269a, - 0xfd9905f3, 0x68e9d166, 0x0c09aa98, 0x99797e0d, 0x4ddb4cef, - 0xd8ab987a, 0xbc4be384, 0x293b3711, 0x758b1478, 0xe0fbc0ed, - 0x841bbb13, 0x116b6f86, 0x3d7bfdc1, 0xa80b2954, 0xcceb52aa, - 0x599b863f, 0x052ba556, 0x905b71c3, 0xf4bb0a3d, 0x61cbdea8, - 0xac9a2eb3, 0x39eafa26, 0x5d0a81d8, 0xc87a554d, 0x94ca7624, - 0x01baa2b1, 0x655ad94f, 0xf02a0dda, 0xdc3a9f9d, 0x494a4b08, - 0x2daa30f6, 0xb8dae463, 0xe46ac70a, 0x711a139f, 0x15fa6861, - 0x808abcf4}, - {0x00000000, 0xcf9e17c8, 0x444d29d1, 0x8bd33e19, 0x889a53a2, - 0x4704446a, 0xccd77a73, 0x03496dbb, 0xca45a105, 0x05dbb6cd, - 0x8e0888d4, 0x41969f1c, 0x42dff2a7, 0x8d41e56f, 0x0692db76, - 0xc90cccbe, 0x4ffa444b, 0x80645383, 0x0bb76d9a, 0xc4297a52, - 0xc76017e9, 0x08fe0021, 0x832d3e38, 0x4cb329f0, 0x85bfe54e, - 0x4a21f286, 0xc1f2cc9f, 0x0e6cdb57, 0x0d25b6ec, 0xc2bba124, - 0x49689f3d, 0x86f688f5, 0x9ff48896, 0x506a9f5e, 0xdbb9a147, - 0x1427b68f, 0x176edb34, 0xd8f0ccfc, 0x5323f2e5, 0x9cbde52d, - 0x55b12993, 0x9a2f3e5b, 0x11fc0042, 0xde62178a, 0xdd2b7a31, - 0x12b56df9, 0x996653e0, 0x56f84428, 0xd00eccdd, 0x1f90db15, - 0x9443e50c, 0x5bddf2c4, 0x58949f7f, 0x970a88b7, 0x1cd9b6ae, - 0xd347a166, 0x1a4b6dd8, 0xd5d57a10, 0x5e064409, 0x919853c1, - 0x92d13e7a, 0x5d4f29b2, 0xd69c17ab, 0x19020063, 0xe498176d, - 0x2b0600a5, 0xa0d53ebc, 0x6f4b2974, 0x6c0244cf, 0xa39c5307, - 0x284f6d1e, 0xe7d17ad6, 0x2eddb668, 0xe143a1a0, 0x6a909fb9, - 0xa50e8871, 0xa647e5ca, 0x69d9f202, 0xe20acc1b, 0x2d94dbd3, - 0xab625326, 0x64fc44ee, 0xef2f7af7, 0x20b16d3f, 0x23f80084, - 0xec66174c, 0x67b52955, 0xa82b3e9d, 0x6127f223, 0xaeb9e5eb, - 0x256adbf2, 0xeaf4cc3a, 0xe9bda181, 0x2623b649, 0xadf08850, - 0x626e9f98, 0x7b6c9ffb, 0xb4f28833, 0x3f21b62a, 0xf0bfa1e2, - 0xf3f6cc59, 0x3c68db91, 0xb7bbe588, 0x7825f240, 0xb1293efe, - 0x7eb72936, 0xf564172f, 0x3afa00e7, 0x39b36d5c, 0xf62d7a94, - 0x7dfe448d, 0xb2605345, 0x3496dbb0, 0xfb08cc78, 0x70dbf261, - 0xbf45e5a9, 0xbc0c8812, 0x73929fda, 0xf841a1c3, 0x37dfb60b, - 0xfed37ab5, 0x314d6d7d, 0xba9e5364, 0x750044ac, 0x76492917, - 0xb9d73edf, 0x320400c6, 0xfd9a170e, 0x1241289b, 0xdddf3f53, - 0x560c014a, 0x99921682, 0x9adb7b39, 0x55456cf1, 0xde9652e8, - 0x11084520, 0xd804899e, 0x179a9e56, 0x9c49a04f, 0x53d7b787, - 0x509eda3c, 0x9f00cdf4, 0x14d3f3ed, 0xdb4de425, 0x5dbb6cd0, - 0x92257b18, 0x19f64501, 0xd66852c9, 0xd5213f72, 0x1abf28ba, - 0x916c16a3, 0x5ef2016b, 0x97fecdd5, 0x5860da1d, 0xd3b3e404, - 0x1c2df3cc, 0x1f649e77, 0xd0fa89bf, 0x5b29b7a6, 0x94b7a06e, - 0x8db5a00d, 0x422bb7c5, 0xc9f889dc, 0x06669e14, 0x052ff3af, - 0xcab1e467, 0x4162da7e, 0x8efccdb6, 0x47f00108, 0x886e16c0, - 0x03bd28d9, 0xcc233f11, 0xcf6a52aa, 0x00f44562, 0x8b277b7b, - 0x44b96cb3, 0xc24fe446, 0x0dd1f38e, 0x8602cd97, 0x499cda5f, - 0x4ad5b7e4, 0x854ba02c, 0x0e989e35, 0xc10689fd, 0x080a4543, - 0xc794528b, 0x4c476c92, 0x83d97b5a, 0x809016e1, 0x4f0e0129, - 0xc4dd3f30, 0x0b4328f8, 0xf6d93ff6, 0x3947283e, 0xb2941627, - 0x7d0a01ef, 0x7e436c54, 0xb1dd7b9c, 0x3a0e4585, 0xf590524d, - 0x3c9c9ef3, 0xf302893b, 0x78d1b722, 0xb74fa0ea, 0xb406cd51, - 0x7b98da99, 0xf04be480, 0x3fd5f348, 0xb9237bbd, 0x76bd6c75, - 0xfd6e526c, 0x32f045a4, 0x31b9281f, 0xfe273fd7, 0x75f401ce, - 0xba6a1606, 0x7366dab8, 0xbcf8cd70, 0x372bf369, 0xf8b5e4a1, - 0xfbfc891a, 0x34629ed2, 0xbfb1a0cb, 0x702fb703, 0x692db760, - 0xa6b3a0a8, 0x2d609eb1, 0xe2fe8979, 0xe1b7e4c2, 0x2e29f30a, - 0xa5facd13, 0x6a64dadb, 0xa3681665, 0x6cf601ad, 0xe7253fb4, - 0x28bb287c, 0x2bf245c7, 0xe46c520f, 0x6fbf6c16, 0xa0217bde, - 0x26d7f32b, 0xe949e4e3, 0x629adafa, 0xad04cd32, 0xae4da089, - 0x61d3b741, 0xea008958, 0x259e9e90, 0xec92522e, 0x230c45e6, - 0xa8df7bff, 0x67416c37, 0x6408018c, 0xab961644, 0x2045285d, - 0xefdb3f95}, - {0x00000000, 0x24825136, 0x4904a26c, 0x6d86f35a, 0x920944d8, - 0xb68b15ee, 0xdb0de6b4, 0xff8fb782, 0xff638ff1, 0xdbe1dec7, - 0xb6672d9d, 0x92e57cab, 0x6d6acb29, 0x49e89a1f, 0x246e6945, - 0x00ec3873, 0x25b619a3, 0x01344895, 0x6cb2bbcf, 0x4830eaf9, - 0xb7bf5d7b, 0x933d0c4d, 0xfebbff17, 0xda39ae21, 0xdad59652, - 0xfe57c764, 0x93d1343e, 0xb7536508, 0x48dcd28a, 0x6c5e83bc, - 0x01d870e6, 0x255a21d0, 0x4b6c3346, 0x6fee6270, 0x0268912a, - 0x26eac01c, 0xd965779e, 0xfde726a8, 0x9061d5f2, 0xb4e384c4, - 0xb40fbcb7, 0x908ded81, 0xfd0b1edb, 0xd9894fed, 0x2606f86f, - 0x0284a959, 0x6f025a03, 0x4b800b35, 0x6eda2ae5, 0x4a587bd3, - 0x27de8889, 0x035cd9bf, 0xfcd36e3d, 0xd8513f0b, 0xb5d7cc51, - 0x91559d67, 0x91b9a514, 0xb53bf422, 0xd8bd0778, 0xfc3f564e, - 0x03b0e1cc, 0x2732b0fa, 0x4ab443a0, 0x6e361296, 0x96d8668c, - 0xb25a37ba, 0xdfdcc4e0, 0xfb5e95d6, 0x04d12254, 0x20537362, - 0x4dd58038, 0x6957d10e, 0x69bbe97d, 0x4d39b84b, 0x20bf4b11, - 0x043d1a27, 0xfbb2ada5, 0xdf30fc93, 0xb2b60fc9, 0x96345eff, - 0xb36e7f2f, 0x97ec2e19, 0xfa6add43, 0xdee88c75, 0x21673bf7, - 0x05e56ac1, 0x6863999b, 0x4ce1c8ad, 0x4c0df0de, 0x688fa1e8, - 0x050952b2, 0x218b0384, 0xde04b406, 0xfa86e530, 0x9700166a, - 0xb382475c, 0xddb455ca, 0xf93604fc, 0x94b0f7a6, 0xb032a690, - 0x4fbd1112, 0x6b3f4024, 0x06b9b37e, 0x223be248, 0x22d7da3b, - 0x06558b0d, 0x6bd37857, 0x4f512961, 0xb0de9ee3, 0x945ccfd5, - 0xf9da3c8f, 0xdd586db9, 0xf8024c69, 0xdc801d5f, 0xb106ee05, - 0x9584bf33, 0x6a0b08b1, 0x4e895987, 0x230faadd, 0x078dfbeb, - 0x0761c398, 0x23e392ae, 0x4e6561f4, 0x6ae730c2, 0x95688740, - 0xb1ead676, 0xdc6c252c, 0xf8ee741a, 0xf6c1cb59, 0xd2439a6f, - 0xbfc56935, 0x9b473803, 0x64c88f81, 0x404adeb7, 0x2dcc2ded, - 0x094e7cdb, 0x09a244a8, 0x2d20159e, 0x40a6e6c4, 0x6424b7f2, - 0x9bab0070, 0xbf295146, 0xd2afa21c, 0xf62df32a, 0xd377d2fa, - 0xf7f583cc, 0x9a737096, 0xbef121a0, 0x417e9622, 0x65fcc714, - 0x087a344e, 0x2cf86578, 0x2c145d0b, 0x08960c3d, 0x6510ff67, - 0x4192ae51, 0xbe1d19d3, 0x9a9f48e5, 0xf719bbbf, 0xd39bea89, - 0xbdadf81f, 0x992fa929, 0xf4a95a73, 0xd02b0b45, 0x2fa4bcc7, - 0x0b26edf1, 0x66a01eab, 0x42224f9d, 0x42ce77ee, 0x664c26d8, - 0x0bcad582, 0x2f4884b4, 0xd0c73336, 0xf4456200, 0x99c3915a, - 0xbd41c06c, 0x981be1bc, 0xbc99b08a, 0xd11f43d0, 0xf59d12e6, - 0x0a12a564, 0x2e90f452, 0x43160708, 0x6794563e, 0x67786e4d, - 0x43fa3f7b, 0x2e7ccc21, 0x0afe9d17, 0xf5712a95, 0xd1f37ba3, - 0xbc7588f9, 0x98f7d9cf, 0x6019add5, 0x449bfce3, 0x291d0fb9, - 0x0d9f5e8f, 0xf210e90d, 0xd692b83b, 0xbb144b61, 0x9f961a57, - 0x9f7a2224, 0xbbf87312, 0xd67e8048, 0xf2fcd17e, 0x0d7366fc, - 0x29f137ca, 0x4477c490, 0x60f595a6, 0x45afb476, 0x612de540, - 0x0cab161a, 0x2829472c, 0xd7a6f0ae, 0xf324a198, 0x9ea252c2, - 0xba2003f4, 0xbacc3b87, 0x9e4e6ab1, 0xf3c899eb, 0xd74ac8dd, - 0x28c57f5f, 0x0c472e69, 0x61c1dd33, 0x45438c05, 0x2b759e93, - 0x0ff7cfa5, 0x62713cff, 0x46f36dc9, 0xb97cda4b, 0x9dfe8b7d, - 0xf0787827, 0xd4fa2911, 0xd4161162, 0xf0944054, 0x9d12b30e, - 0xb990e238, 0x461f55ba, 0x629d048c, 0x0f1bf7d6, 0x2b99a6e0, - 0x0ec38730, 0x2a41d606, 0x47c7255c, 0x6345746a, 0x9ccac3e8, - 0xb84892de, 0xd5ce6184, 0xf14c30b2, 0xf1a008c1, 0xd52259f7, - 0xb8a4aaad, 0x9c26fb9b, 0x63a94c19, 0x472b1d2f, 0x2aadee75, - 0x0e2fbf43}, - {0x00000000, 0x36f290f3, 0x6de521e6, 0x5b17b115, 0xdbca43cc, - 0xed38d33f, 0xb62f622a, 0x80ddf2d9, 0x6ce581d9, 0x5a17112a, - 0x0100a03f, 0x37f230cc, 0xb72fc215, 0x81dd52e6, 0xdacae3f3, - 0xec387300, 0xd9cb03b2, 0xef399341, 0xb42e2254, 0x82dcb2a7, - 0x0201407e, 0x34f3d08d, 0x6fe46198, 0x5916f16b, 0xb52e826b, - 0x83dc1298, 0xd8cba38d, 0xee39337e, 0x6ee4c1a7, 0x58165154, - 0x0301e041, 0x35f370b2, 0x68e70125, 0x5e1591d6, 0x050220c3, - 0x33f0b030, 0xb32d42e9, 0x85dfd21a, 0xdec8630f, 0xe83af3fc, - 0x040280fc, 0x32f0100f, 0x69e7a11a, 0x5f1531e9, 0xdfc8c330, - 0xe93a53c3, 0xb22de2d6, 0x84df7225, 0xb12c0297, 0x87de9264, - 0xdcc92371, 0xea3bb382, 0x6ae6415b, 0x5c14d1a8, 0x070360bd, - 0x31f1f04e, 0xddc9834e, 0xeb3b13bd, 0xb02ca2a8, 0x86de325b, - 0x0603c082, 0x30f15071, 0x6be6e164, 0x5d147197, 0xd1ce024a, - 0xe73c92b9, 0xbc2b23ac, 0x8ad9b35f, 0x0a044186, 0x3cf6d175, - 0x67e16060, 0x5113f093, 0xbd2b8393, 0x8bd91360, 0xd0cea275, - 0xe63c3286, 0x66e1c05f, 0x501350ac, 0x0b04e1b9, 0x3df6714a, - 0x080501f8, 0x3ef7910b, 0x65e0201e, 0x5312b0ed, 0xd3cf4234, - 0xe53dd2c7, 0xbe2a63d2, 0x88d8f321, 0x64e08021, 0x521210d2, - 0x0905a1c7, 0x3ff73134, 0xbf2ac3ed, 0x89d8531e, 0xd2cfe20b, - 0xe43d72f8, 0xb929036f, 0x8fdb939c, 0xd4cc2289, 0xe23eb27a, - 0x62e340a3, 0x5411d050, 0x0f066145, 0x39f4f1b6, 0xd5cc82b6, - 0xe33e1245, 0xb829a350, 0x8edb33a3, 0x0e06c17a, 0x38f45189, - 0x63e3e09c, 0x5511706f, 0x60e200dd, 0x5610902e, 0x0d07213b, - 0x3bf5b1c8, 0xbb284311, 0x8ddad3e2, 0xd6cd62f7, 0xe03ff204, - 0x0c078104, 0x3af511f7, 0x61e2a0e2, 0x57103011, 0xd7cdc2c8, - 0xe13f523b, 0xba28e32e, 0x8cda73dd, 0x78ed02d5, 0x4e1f9226, - 0x15082333, 0x23fab3c0, 0xa3274119, 0x95d5d1ea, 0xcec260ff, - 0xf830f00c, 0x1408830c, 0x22fa13ff, 0x79eda2ea, 0x4f1f3219, - 0xcfc2c0c0, 0xf9305033, 0xa227e126, 0x94d571d5, 0xa1260167, - 0x97d49194, 0xccc32081, 0xfa31b072, 0x7aec42ab, 0x4c1ed258, - 0x1709634d, 0x21fbf3be, 0xcdc380be, 0xfb31104d, 0xa026a158, - 0x96d431ab, 0x1609c372, 0x20fb5381, 0x7bece294, 0x4d1e7267, - 0x100a03f0, 0x26f89303, 0x7def2216, 0x4b1db2e5, 0xcbc0403c, - 0xfd32d0cf, 0xa62561da, 0x90d7f129, 0x7cef8229, 0x4a1d12da, - 0x110aa3cf, 0x27f8333c, 0xa725c1e5, 0x91d75116, 0xcac0e003, - 0xfc3270f0, 0xc9c10042, 0xff3390b1, 0xa42421a4, 0x92d6b157, - 0x120b438e, 0x24f9d37d, 0x7fee6268, 0x491cf29b, 0xa524819b, - 0x93d61168, 0xc8c1a07d, 0xfe33308e, 0x7eeec257, 0x481c52a4, - 0x130be3b1, 0x25f97342, 0xa923009f, 0x9fd1906c, 0xc4c62179, - 0xf234b18a, 0x72e94353, 0x441bd3a0, 0x1f0c62b5, 0x29fef246, - 0xc5c68146, 0xf33411b5, 0xa823a0a0, 0x9ed13053, 0x1e0cc28a, - 0x28fe5279, 0x73e9e36c, 0x451b739f, 0x70e8032d, 0x461a93de, - 0x1d0d22cb, 0x2bffb238, 0xab2240e1, 0x9dd0d012, 0xc6c76107, - 0xf035f1f4, 0x1c0d82f4, 0x2aff1207, 0x71e8a312, 0x471a33e1, - 0xc7c7c138, 0xf13551cb, 0xaa22e0de, 0x9cd0702d, 0xc1c401ba, - 0xf7369149, 0xac21205c, 0x9ad3b0af, 0x1a0e4276, 0x2cfcd285, - 0x77eb6390, 0x4119f363, 0xad218063, 0x9bd31090, 0xc0c4a185, - 0xf6363176, 0x76ebc3af, 0x4019535c, 0x1b0ee249, 0x2dfc72ba, - 0x180f0208, 0x2efd92fb, 0x75ea23ee, 0x4318b31d, 0xc3c541c4, - 0xf537d137, 0xae206022, 0x98d2f0d1, 0x74ea83d1, 0x42181322, - 0x190fa237, 0x2ffd32c4, 0xaf20c01d, 0x99d250ee, 0xc2c5e1fb, - 0xf4377108}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0xf390f23600000000, 0xe621e56d00000000, - 0x15b1175b00000000, 0xcc43cadb00000000, 0x3fd338ed00000000, - 0x2a622fb600000000, 0xd9f2dd8000000000, 0xd981e56c00000000, - 0x2a11175a00000000, 0x3fa0000100000000, 0xcc30f23700000000, - 0x15c22fb700000000, 0xe652dd8100000000, 0xf3e3cada00000000, - 0x007338ec00000000, 0xb203cbd900000000, 0x419339ef00000000, - 0x54222eb400000000, 0xa7b2dc8200000000, 0x7e40010200000000, - 0x8dd0f33400000000, 0x9861e46f00000000, 0x6bf1165900000000, - 0x6b822eb500000000, 0x9812dc8300000000, 0x8da3cbd800000000, - 0x7e3339ee00000000, 0xa7c1e46e00000000, 0x5451165800000000, - 0x41e0010300000000, 0xb270f33500000000, 0x2501e76800000000, - 0xd691155e00000000, 0xc320020500000000, 0x30b0f03300000000, - 0xe9422db300000000, 0x1ad2df8500000000, 0x0f63c8de00000000, - 0xfcf33ae800000000, 0xfc80020400000000, 0x0f10f03200000000, - 0x1aa1e76900000000, 0xe931155f00000000, 0x30c3c8df00000000, - 0xc3533ae900000000, 0xd6e22db200000000, 0x2572df8400000000, - 0x97022cb100000000, 0x6492de8700000000, 0x7123c9dc00000000, - 0x82b33bea00000000, 0x5b41e66a00000000, 0xa8d1145c00000000, - 0xbd60030700000000, 0x4ef0f13100000000, 0x4e83c9dd00000000, - 0xbd133beb00000000, 0xa8a22cb000000000, 0x5b32de8600000000, - 0x82c0030600000000, 0x7150f13000000000, 0x64e1e66b00000000, - 0x9771145d00000000, 0x4a02ced100000000, 0xb9923ce700000000, - 0xac232bbc00000000, 0x5fb3d98a00000000, 0x8641040a00000000, - 0x75d1f63c00000000, 0x6060e16700000000, 0x93f0135100000000, - 0x93832bbd00000000, 0x6013d98b00000000, 0x75a2ced000000000, - 0x86323ce600000000, 0x5fc0e16600000000, 0xac50135000000000, - 0xb9e1040b00000000, 0x4a71f63d00000000, 0xf801050800000000, - 0x0b91f73e00000000, 0x1e20e06500000000, 0xedb0125300000000, - 0x3442cfd300000000, 0xc7d23de500000000, 0xd2632abe00000000, - 0x21f3d88800000000, 0x2180e06400000000, 0xd210125200000000, - 0xc7a1050900000000, 0x3431f73f00000000, 0xedc32abf00000000, - 0x1e53d88900000000, 0x0be2cfd200000000, 0xf8723de400000000, - 0x6f0329b900000000, 0x9c93db8f00000000, 0x8922ccd400000000, - 0x7ab23ee200000000, 0xa340e36200000000, 0x50d0115400000000, - 0x4561060f00000000, 0xb6f1f43900000000, 0xb682ccd500000000, - 0x45123ee300000000, 0x50a329b800000000, 0xa333db8e00000000, - 0x7ac1060e00000000, 0x8951f43800000000, 0x9ce0e36300000000, - 0x6f70115500000000, 0xdd00e26000000000, 0x2e90105600000000, - 0x3b21070d00000000, 0xc8b1f53b00000000, 0x114328bb00000000, - 0xe2d3da8d00000000, 0xf762cdd600000000, 0x04f23fe000000000, - 0x0481070c00000000, 0xf711f53a00000000, 0xe2a0e26100000000, - 0x1130105700000000, 0xc8c2cdd700000000, 0x3b523fe100000000, - 0x2ee328ba00000000, 0xdd73da8c00000000, 0xd502ed7800000000, - 0x26921f4e00000000, 0x3323081500000000, 0xc0b3fa2300000000, - 0x194127a300000000, 0xead1d59500000000, 0xff60c2ce00000000, - 0x0cf030f800000000, 0x0c83081400000000, 0xff13fa2200000000, - 0xeaa2ed7900000000, 0x19321f4f00000000, 0xc0c0c2cf00000000, - 0x335030f900000000, 0x26e127a200000000, 0xd571d59400000000, - 0x670126a100000000, 0x9491d49700000000, 0x8120c3cc00000000, - 0x72b031fa00000000, 0xab42ec7a00000000, 0x58d21e4c00000000, - 0x4d63091700000000, 0xbef3fb2100000000, 0xbe80c3cd00000000, - 0x4d1031fb00000000, 0x58a126a000000000, 0xab31d49600000000, - 0x72c3091600000000, 0x8153fb2000000000, 0x94e2ec7b00000000, - 0x67721e4d00000000, 0xf0030a1000000000, 0x0393f82600000000, - 0x1622ef7d00000000, 0xe5b21d4b00000000, 0x3c40c0cb00000000, - 0xcfd032fd00000000, 0xda6125a600000000, 0x29f1d79000000000, - 0x2982ef7c00000000, 0xda121d4a00000000, 0xcfa30a1100000000, - 0x3c33f82700000000, 0xe5c125a700000000, 0x1651d79100000000, - 0x03e0c0ca00000000, 0xf07032fc00000000, 0x4200c1c900000000, - 0xb19033ff00000000, 0xa42124a400000000, 0x57b1d69200000000, - 0x8e430b1200000000, 0x7dd3f92400000000, 0x6862ee7f00000000, - 0x9bf21c4900000000, 0x9b8124a500000000, 0x6811d69300000000, - 0x7da0c1c800000000, 0x8e3033fe00000000, 0x57c2ee7e00000000, - 0xa4521c4800000000, 0xb1e30b1300000000, 0x4273f92500000000, - 0x9f0023a900000000, 0x6c90d19f00000000, 0x7921c6c400000000, - 0x8ab134f200000000, 0x5343e97200000000, 0xa0d31b4400000000, - 0xb5620c1f00000000, 0x46f2fe2900000000, 0x4681c6c500000000, - 0xb51134f300000000, 0xa0a023a800000000, 0x5330d19e00000000, - 0x8ac20c1e00000000, 0x7952fe2800000000, 0x6ce3e97300000000, - 0x9f731b4500000000, 0x2d03e87000000000, 0xde931a4600000000, - 0xcb220d1d00000000, 0x38b2ff2b00000000, 0xe14022ab00000000, - 0x12d0d09d00000000, 0x0761c7c600000000, 0xf4f135f000000000, - 0xf4820d1c00000000, 0x0712ff2a00000000, 0x12a3e87100000000, - 0xe1331a4700000000, 0x38c1c7c700000000, 0xcb5135f100000000, - 0xdee022aa00000000, 0x2d70d09c00000000, 0xba01c4c100000000, - 0x499136f700000000, 0x5c2021ac00000000, 0xafb0d39a00000000, - 0x76420e1a00000000, 0x85d2fc2c00000000, 0x9063eb7700000000, - 0x63f3194100000000, 0x638021ad00000000, 0x9010d39b00000000, - 0x85a1c4c000000000, 0x763136f600000000, 0xafc3eb7600000000, - 0x5c53194000000000, 0x49e20e1b00000000, 0xba72fc2d00000000, - 0x08020f1800000000, 0xfb92fd2e00000000, 0xee23ea7500000000, - 0x1db3184300000000, 0xc441c5c300000000, 0x37d137f500000000, - 0x226020ae00000000, 0xd1f0d29800000000, 0xd183ea7400000000, - 0x2213184200000000, 0x37a20f1900000000, 0xc432fd2f00000000, - 0x1dc020af00000000, 0xee50d29900000000, 0xfbe1c5c200000000, - 0x087137f400000000}, - {0x0000000000000000, 0x3651822400000000, 0x6ca2044900000000, - 0x5af3866d00000000, 0xd844099200000000, 0xee158bb600000000, - 0xb4e60ddb00000000, 0x82b78fff00000000, 0xf18f63ff00000000, - 0xc7dee1db00000000, 0x9d2d67b600000000, 0xab7ce59200000000, - 0x29cb6a6d00000000, 0x1f9ae84900000000, 0x45696e2400000000, - 0x7338ec0000000000, 0xa319b62500000000, 0x9548340100000000, - 0xcfbbb26c00000000, 0xf9ea304800000000, 0x7b5dbfb700000000, - 0x4d0c3d9300000000, 0x17ffbbfe00000000, 0x21ae39da00000000, - 0x5296d5da00000000, 0x64c757fe00000000, 0x3e34d19300000000, - 0x086553b700000000, 0x8ad2dc4800000000, 0xbc835e6c00000000, - 0xe670d80100000000, 0xd0215a2500000000, 0x46336c4b00000000, - 0x7062ee6f00000000, 0x2a91680200000000, 0x1cc0ea2600000000, - 0x9e7765d900000000, 0xa826e7fd00000000, 0xf2d5619000000000, - 0xc484e3b400000000, 0xb7bc0fb400000000, 0x81ed8d9000000000, - 0xdb1e0bfd00000000, 0xed4f89d900000000, 0x6ff8062600000000, - 0x59a9840200000000, 0x035a026f00000000, 0x350b804b00000000, - 0xe52ada6e00000000, 0xd37b584a00000000, 0x8988de2700000000, - 0xbfd95c0300000000, 0x3d6ed3fc00000000, 0x0b3f51d800000000, - 0x51ccd7b500000000, 0x679d559100000000, 0x14a5b99100000000, - 0x22f43bb500000000, 0x7807bdd800000000, 0x4e563ffc00000000, - 0xcce1b00300000000, 0xfab0322700000000, 0xa043b44a00000000, - 0x9612366e00000000, 0x8c66d89600000000, 0xba375ab200000000, - 0xe0c4dcdf00000000, 0xd6955efb00000000, 0x5422d10400000000, - 0x6273532000000000, 0x3880d54d00000000, 0x0ed1576900000000, - 0x7de9bb6900000000, 0x4bb8394d00000000, 0x114bbf2000000000, - 0x271a3d0400000000, 0xa5adb2fb00000000, 0x93fc30df00000000, - 0xc90fb6b200000000, 0xff5e349600000000, 0x2f7f6eb300000000, - 0x192eec9700000000, 0x43dd6afa00000000, 0x758ce8de00000000, - 0xf73b672100000000, 0xc16ae50500000000, 0x9b99636800000000, - 0xadc8e14c00000000, 0xdef00d4c00000000, 0xe8a18f6800000000, - 0xb252090500000000, 0x84038b2100000000, 0x06b404de00000000, - 0x30e586fa00000000, 0x6a16009700000000, 0x5c4782b300000000, - 0xca55b4dd00000000, 0xfc0436f900000000, 0xa6f7b09400000000, - 0x90a632b000000000, 0x1211bd4f00000000, 0x24403f6b00000000, - 0x7eb3b90600000000, 0x48e23b2200000000, 0x3bdad72200000000, - 0x0d8b550600000000, 0x5778d36b00000000, 0x6129514f00000000, - 0xe39edeb000000000, 0xd5cf5c9400000000, 0x8f3cdaf900000000, - 0xb96d58dd00000000, 0x694c02f800000000, 0x5f1d80dc00000000, - 0x05ee06b100000000, 0x33bf849500000000, 0xb1080b6a00000000, - 0x8759894e00000000, 0xddaa0f2300000000, 0xebfb8d0700000000, - 0x98c3610700000000, 0xae92e32300000000, 0xf461654e00000000, - 0xc230e76a00000000, 0x4087689500000000, 0x76d6eab100000000, - 0x2c256cdc00000000, 0x1a74eef800000000, 0x59cbc1f600000000, - 0x6f9a43d200000000, 0x3569c5bf00000000, 0x0338479b00000000, - 0x818fc86400000000, 0xb7de4a4000000000, 0xed2dcc2d00000000, - 0xdb7c4e0900000000, 0xa844a20900000000, 0x9e15202d00000000, - 0xc4e6a64000000000, 0xf2b7246400000000, 0x7000ab9b00000000, - 0x465129bf00000000, 0x1ca2afd200000000, 0x2af32df600000000, - 0xfad277d300000000, 0xcc83f5f700000000, 0x9670739a00000000, - 0xa021f1be00000000, 0x22967e4100000000, 0x14c7fc6500000000, - 0x4e347a0800000000, 0x7865f82c00000000, 0x0b5d142c00000000, - 0x3d0c960800000000, 0x67ff106500000000, 0x51ae924100000000, - 0xd3191dbe00000000, 0xe5489f9a00000000, 0xbfbb19f700000000, - 0x89ea9bd300000000, 0x1ff8adbd00000000, 0x29a92f9900000000, - 0x735aa9f400000000, 0x450b2bd000000000, 0xc7bca42f00000000, - 0xf1ed260b00000000, 0xab1ea06600000000, 0x9d4f224200000000, - 0xee77ce4200000000, 0xd8264c6600000000, 0x82d5ca0b00000000, - 0xb484482f00000000, 0x3633c7d000000000, 0x006245f400000000, - 0x5a91c39900000000, 0x6cc041bd00000000, 0xbce11b9800000000, - 0x8ab099bc00000000, 0xd0431fd100000000, 0xe6129df500000000, - 0x64a5120a00000000, 0x52f4902e00000000, 0x0807164300000000, - 0x3e56946700000000, 0x4d6e786700000000, 0x7b3ffa4300000000, - 0x21cc7c2e00000000, 0x179dfe0a00000000, 0x952a71f500000000, - 0xa37bf3d100000000, 0xf98875bc00000000, 0xcfd9f79800000000, - 0xd5ad196000000000, 0xe3fc9b4400000000, 0xb90f1d2900000000, - 0x8f5e9f0d00000000, 0x0de910f200000000, 0x3bb892d600000000, - 0x614b14bb00000000, 0x571a969f00000000, 0x24227a9f00000000, - 0x1273f8bb00000000, 0x48807ed600000000, 0x7ed1fcf200000000, - 0xfc66730d00000000, 0xca37f12900000000, 0x90c4774400000000, - 0xa695f56000000000, 0x76b4af4500000000, 0x40e52d6100000000, - 0x1a16ab0c00000000, 0x2c47292800000000, 0xaef0a6d700000000, - 0x98a124f300000000, 0xc252a29e00000000, 0xf40320ba00000000, - 0x873bccba00000000, 0xb16a4e9e00000000, 0xeb99c8f300000000, - 0xddc84ad700000000, 0x5f7fc52800000000, 0x692e470c00000000, - 0x33ddc16100000000, 0x058c434500000000, 0x939e752b00000000, - 0xa5cff70f00000000, 0xff3c716200000000, 0xc96df34600000000, - 0x4bda7cb900000000, 0x7d8bfe9d00000000, 0x277878f000000000, - 0x1129fad400000000, 0x621116d400000000, 0x544094f000000000, - 0x0eb3129d00000000, 0x38e290b900000000, 0xba551f4600000000, - 0x8c049d6200000000, 0xd6f71b0f00000000, 0xe0a6992b00000000, - 0x3087c30e00000000, 0x06d6412a00000000, 0x5c25c74700000000, - 0x6a74456300000000, 0xe8c3ca9c00000000, 0xde9248b800000000, - 0x8461ced500000000, 0xb2304cf100000000, 0xc108a0f100000000, - 0xf75922d500000000, 0xadaaa4b800000000, 0x9bfb269c00000000, - 0x194ca96300000000, 0x2f1d2b4700000000, 0x75eead2a00000000, - 0x43bf2f0e00000000}, - {0x0000000000000000, 0xc8179ecf00000000, 0xd1294d4400000000, - 0x193ed38b00000000, 0xa2539a8800000000, 0x6a44044700000000, - 0x737ad7cc00000000, 0xbb6d490300000000, 0x05a145ca00000000, - 0xcdb6db0500000000, 0xd488088e00000000, 0x1c9f964100000000, - 0xa7f2df4200000000, 0x6fe5418d00000000, 0x76db920600000000, - 0xbecc0cc900000000, 0x4b44fa4f00000000, 0x8353648000000000, - 0x9a6db70b00000000, 0x527a29c400000000, 0xe91760c700000000, - 0x2100fe0800000000, 0x383e2d8300000000, 0xf029b34c00000000, - 0x4ee5bf8500000000, 0x86f2214a00000000, 0x9fccf2c100000000, - 0x57db6c0e00000000, 0xecb6250d00000000, 0x24a1bbc200000000, - 0x3d9f684900000000, 0xf588f68600000000, 0x9688f49f00000000, - 0x5e9f6a5000000000, 0x47a1b9db00000000, 0x8fb6271400000000, - 0x34db6e1700000000, 0xfcccf0d800000000, 0xe5f2235300000000, - 0x2de5bd9c00000000, 0x9329b15500000000, 0x5b3e2f9a00000000, - 0x4200fc1100000000, 0x8a1762de00000000, 0x317a2bdd00000000, - 0xf96db51200000000, 0xe053669900000000, 0x2844f85600000000, - 0xddcc0ed000000000, 0x15db901f00000000, 0x0ce5439400000000, - 0xc4f2dd5b00000000, 0x7f9f945800000000, 0xb7880a9700000000, - 0xaeb6d91c00000000, 0x66a147d300000000, 0xd86d4b1a00000000, - 0x107ad5d500000000, 0x0944065e00000000, 0xc153989100000000, - 0x7a3ed19200000000, 0xb2294f5d00000000, 0xab179cd600000000, - 0x6300021900000000, 0x6d1798e400000000, 0xa500062b00000000, - 0xbc3ed5a000000000, 0x74294b6f00000000, 0xcf44026c00000000, - 0x07539ca300000000, 0x1e6d4f2800000000, 0xd67ad1e700000000, - 0x68b6dd2e00000000, 0xa0a143e100000000, 0xb99f906a00000000, - 0x71880ea500000000, 0xcae547a600000000, 0x02f2d96900000000, - 0x1bcc0ae200000000, 0xd3db942d00000000, 0x265362ab00000000, - 0xee44fc6400000000, 0xf77a2fef00000000, 0x3f6db12000000000, - 0x8400f82300000000, 0x4c1766ec00000000, 0x5529b56700000000, - 0x9d3e2ba800000000, 0x23f2276100000000, 0xebe5b9ae00000000, - 0xf2db6a2500000000, 0x3accf4ea00000000, 0x81a1bde900000000, - 0x49b6232600000000, 0x5088f0ad00000000, 0x989f6e6200000000, - 0xfb9f6c7b00000000, 0x3388f2b400000000, 0x2ab6213f00000000, - 0xe2a1bff000000000, 0x59ccf6f300000000, 0x91db683c00000000, - 0x88e5bbb700000000, 0x40f2257800000000, 0xfe3e29b100000000, - 0x3629b77e00000000, 0x2f1764f500000000, 0xe700fa3a00000000, - 0x5c6db33900000000, 0x947a2df600000000, 0x8d44fe7d00000000, - 0x455360b200000000, 0xb0db963400000000, 0x78cc08fb00000000, - 0x61f2db7000000000, 0xa9e545bf00000000, 0x12880cbc00000000, - 0xda9f927300000000, 0xc3a141f800000000, 0x0bb6df3700000000, - 0xb57ad3fe00000000, 0x7d6d4d3100000000, 0x64539eba00000000, - 0xac44007500000000, 0x1729497600000000, 0xdf3ed7b900000000, - 0xc600043200000000, 0x0e179afd00000000, 0x9b28411200000000, - 0x533fdfdd00000000, 0x4a010c5600000000, 0x8216929900000000, - 0x397bdb9a00000000, 0xf16c455500000000, 0xe85296de00000000, - 0x2045081100000000, 0x9e8904d800000000, 0x569e9a1700000000, - 0x4fa0499c00000000, 0x87b7d75300000000, 0x3cda9e5000000000, - 0xf4cd009f00000000, 0xedf3d31400000000, 0x25e44ddb00000000, - 0xd06cbb5d00000000, 0x187b259200000000, 0x0145f61900000000, - 0xc95268d600000000, 0x723f21d500000000, 0xba28bf1a00000000, - 0xa3166c9100000000, 0x6b01f25e00000000, 0xd5cdfe9700000000, - 0x1dda605800000000, 0x04e4b3d300000000, 0xccf32d1c00000000, - 0x779e641f00000000, 0xbf89fad000000000, 0xa6b7295b00000000, - 0x6ea0b79400000000, 0x0da0b58d00000000, 0xc5b72b4200000000, - 0xdc89f8c900000000, 0x149e660600000000, 0xaff32f0500000000, - 0x67e4b1ca00000000, 0x7eda624100000000, 0xb6cdfc8e00000000, - 0x0801f04700000000, 0xc0166e8800000000, 0xd928bd0300000000, - 0x113f23cc00000000, 0xaa526acf00000000, 0x6245f40000000000, - 0x7b7b278b00000000, 0xb36cb94400000000, 0x46e44fc200000000, - 0x8ef3d10d00000000, 0x97cd028600000000, 0x5fda9c4900000000, - 0xe4b7d54a00000000, 0x2ca04b8500000000, 0x359e980e00000000, - 0xfd8906c100000000, 0x43450a0800000000, 0x8b5294c700000000, - 0x926c474c00000000, 0x5a7bd98300000000, 0xe116908000000000, - 0x29010e4f00000000, 0x303fddc400000000, 0xf828430b00000000, - 0xf63fd9f600000000, 0x3e28473900000000, 0x271694b200000000, - 0xef010a7d00000000, 0x546c437e00000000, 0x9c7bddb100000000, - 0x85450e3a00000000, 0x4d5290f500000000, 0xf39e9c3c00000000, - 0x3b8902f300000000, 0x22b7d17800000000, 0xeaa04fb700000000, - 0x51cd06b400000000, 0x99da987b00000000, 0x80e44bf000000000, - 0x48f3d53f00000000, 0xbd7b23b900000000, 0x756cbd7600000000, - 0x6c526efd00000000, 0xa445f03200000000, 0x1f28b93100000000, - 0xd73f27fe00000000, 0xce01f47500000000, 0x06166aba00000000, - 0xb8da667300000000, 0x70cdf8bc00000000, 0x69f32b3700000000, - 0xa1e4b5f800000000, 0x1a89fcfb00000000, 0xd29e623400000000, - 0xcba0b1bf00000000, 0x03b72f7000000000, 0x60b72d6900000000, - 0xa8a0b3a600000000, 0xb19e602d00000000, 0x7989fee200000000, - 0xc2e4b7e100000000, 0x0af3292e00000000, 0x13cdfaa500000000, - 0xdbda646a00000000, 0x651668a300000000, 0xad01f66c00000000, - 0xb43f25e700000000, 0x7c28bb2800000000, 0xc745f22b00000000, - 0x0f526ce400000000, 0x166cbf6f00000000, 0xde7b21a000000000, - 0x2bf3d72600000000, 0xe3e449e900000000, 0xfada9a6200000000, - 0x32cd04ad00000000, 0x89a04dae00000000, 0x41b7d36100000000, - 0x588900ea00000000, 0x909e9e2500000000, 0x2e5292ec00000000, - 0xe6450c2300000000, 0xff7bdfa800000000, 0x376c416700000000, - 0x8c01086400000000, 0x441696ab00000000, 0x5d28452000000000, - 0x953fdbef00000000}, - {0x0000000000000000, 0x95d4709500000000, 0x6baf90f100000000, - 0xfe7be06400000000, 0x9758503800000000, 0x028c20ad00000000, - 0xfcf7c0c900000000, 0x6923b05c00000000, 0x2eb1a07000000000, - 0xbb65d0e500000000, 0x451e308100000000, 0xd0ca401400000000, - 0xb9e9f04800000000, 0x2c3d80dd00000000, 0xd24660b900000000, - 0x4792102c00000000, 0x5c6241e100000000, 0xc9b6317400000000, - 0x37cdd11000000000, 0xa219a18500000000, 0xcb3a11d900000000, - 0x5eee614c00000000, 0xa095812800000000, 0x3541f1bd00000000, - 0x72d3e19100000000, 0xe707910400000000, 0x197c716000000000, - 0x8ca801f500000000, 0xe58bb1a900000000, 0x705fc13c00000000, - 0x8e24215800000000, 0x1bf051cd00000000, 0xf9c2f31900000000, - 0x6c16838c00000000, 0x926d63e800000000, 0x07b9137d00000000, - 0x6e9aa32100000000, 0xfb4ed3b400000000, 0x053533d000000000, - 0x90e1434500000000, 0xd773536900000000, 0x42a723fc00000000, - 0xbcdcc39800000000, 0x2908b30d00000000, 0x402b035100000000, - 0xd5ff73c400000000, 0x2b8493a000000000, 0xbe50e33500000000, - 0xa5a0b2f800000000, 0x3074c26d00000000, 0xce0f220900000000, - 0x5bdb529c00000000, 0x32f8e2c000000000, 0xa72c925500000000, - 0x5957723100000000, 0xcc8302a400000000, 0x8b11128800000000, - 0x1ec5621d00000000, 0xe0be827900000000, 0x756af2ec00000000, - 0x1c4942b000000000, 0x899d322500000000, 0x77e6d24100000000, - 0xe232a2d400000000, 0xf285e73300000000, 0x675197a600000000, - 0x992a77c200000000, 0x0cfe075700000000, 0x65ddb70b00000000, - 0xf009c79e00000000, 0x0e7227fa00000000, 0x9ba6576f00000000, - 0xdc34474300000000, 0x49e037d600000000, 0xb79bd7b200000000, - 0x224fa72700000000, 0x4b6c177b00000000, 0xdeb867ee00000000, - 0x20c3878a00000000, 0xb517f71f00000000, 0xaee7a6d200000000, - 0x3b33d64700000000, 0xc548362300000000, 0x509c46b600000000, - 0x39bff6ea00000000, 0xac6b867f00000000, 0x5210661b00000000, - 0xc7c4168e00000000, 0x805606a200000000, 0x1582763700000000, - 0xebf9965300000000, 0x7e2de6c600000000, 0x170e569a00000000, - 0x82da260f00000000, 0x7ca1c66b00000000, 0xe975b6fe00000000, - 0x0b47142a00000000, 0x9e9364bf00000000, 0x60e884db00000000, - 0xf53cf44e00000000, 0x9c1f441200000000, 0x09cb348700000000, - 0xf7b0d4e300000000, 0x6264a47600000000, 0x25f6b45a00000000, - 0xb022c4cf00000000, 0x4e5924ab00000000, 0xdb8d543e00000000, - 0xb2aee46200000000, 0x277a94f700000000, 0xd901749300000000, - 0x4cd5040600000000, 0x572555cb00000000, 0xc2f1255e00000000, - 0x3c8ac53a00000000, 0xa95eb5af00000000, 0xc07d05f300000000, - 0x55a9756600000000, 0xabd2950200000000, 0x3e06e59700000000, - 0x7994f5bb00000000, 0xec40852e00000000, 0x123b654a00000000, - 0x87ef15df00000000, 0xeecca58300000000, 0x7b18d51600000000, - 0x8563357200000000, 0x10b745e700000000, 0xe40bcf6700000000, - 0x71dfbff200000000, 0x8fa45f9600000000, 0x1a702f0300000000, - 0x73539f5f00000000, 0xe687efca00000000, 0x18fc0fae00000000, - 0x8d287f3b00000000, 0xcaba6f1700000000, 0x5f6e1f8200000000, - 0xa115ffe600000000, 0x34c18f7300000000, 0x5de23f2f00000000, - 0xc8364fba00000000, 0x364dafde00000000, 0xa399df4b00000000, - 0xb8698e8600000000, 0x2dbdfe1300000000, 0xd3c61e7700000000, - 0x46126ee200000000, 0x2f31debe00000000, 0xbae5ae2b00000000, - 0x449e4e4f00000000, 0xd14a3eda00000000, 0x96d82ef600000000, - 0x030c5e6300000000, 0xfd77be0700000000, 0x68a3ce9200000000, - 0x01807ece00000000, 0x94540e5b00000000, 0x6a2fee3f00000000, - 0xfffb9eaa00000000, 0x1dc93c7e00000000, 0x881d4ceb00000000, - 0x7666ac8f00000000, 0xe3b2dc1a00000000, 0x8a916c4600000000, - 0x1f451cd300000000, 0xe13efcb700000000, 0x74ea8c2200000000, - 0x33789c0e00000000, 0xa6acec9b00000000, 0x58d70cff00000000, - 0xcd037c6a00000000, 0xa420cc3600000000, 0x31f4bca300000000, - 0xcf8f5cc700000000, 0x5a5b2c5200000000, 0x41ab7d9f00000000, - 0xd47f0d0a00000000, 0x2a04ed6e00000000, 0xbfd09dfb00000000, - 0xd6f32da700000000, 0x43275d3200000000, 0xbd5cbd5600000000, - 0x2888cdc300000000, 0x6f1addef00000000, 0xfacead7a00000000, - 0x04b54d1e00000000, 0x91613d8b00000000, 0xf8428dd700000000, - 0x6d96fd4200000000, 0x93ed1d2600000000, 0x06396db300000000, - 0x168e285400000000, 0x835a58c100000000, 0x7d21b8a500000000, - 0xe8f5c83000000000, 0x81d6786c00000000, 0x140208f900000000, - 0xea79e89d00000000, 0x7fad980800000000, 0x383f882400000000, - 0xadebf8b100000000, 0x539018d500000000, 0xc644684000000000, - 0xaf67d81c00000000, 0x3ab3a88900000000, 0xc4c848ed00000000, - 0x511c387800000000, 0x4aec69b500000000, 0xdf38192000000000, - 0x2143f94400000000, 0xb49789d100000000, 0xddb4398d00000000, - 0x4860491800000000, 0xb61ba97c00000000, 0x23cfd9e900000000, - 0x645dc9c500000000, 0xf189b95000000000, 0x0ff2593400000000, - 0x9a2629a100000000, 0xf30599fd00000000, 0x66d1e96800000000, - 0x98aa090c00000000, 0x0d7e799900000000, 0xef4cdb4d00000000, - 0x7a98abd800000000, 0x84e34bbc00000000, 0x11373b2900000000, - 0x78148b7500000000, 0xedc0fbe000000000, 0x13bb1b8400000000, - 0x866f6b1100000000, 0xc1fd7b3d00000000, 0x54290ba800000000, - 0xaa52ebcc00000000, 0x3f869b5900000000, 0x56a52b0500000000, - 0xc3715b9000000000, 0x3d0abbf400000000, 0xa8decb6100000000, - 0xb32e9aac00000000, 0x26faea3900000000, 0xd8810a5d00000000, - 0x4d557ac800000000, 0x2476ca9400000000, 0xb1a2ba0100000000, - 0x4fd95a6500000000, 0xda0d2af000000000, 0x9d9f3adc00000000, - 0x084b4a4900000000, 0xf630aa2d00000000, 0x63e4dab800000000, - 0x0ac76ae400000000, 0x9f131a7100000000, 0x6168fa1500000000, - 0xf4bc8a8000000000}, - {0x0000000000000000, 0x1f17f08000000000, 0x7f2891da00000000, - 0x603f615a00000000, 0xbf56536e00000000, 0xa041a3ee00000000, - 0xc07ec2b400000000, 0xdf69323400000000, 0x7eada6dc00000000, - 0x61ba565c00000000, 0x0185370600000000, 0x1e92c78600000000, - 0xc1fbf5b200000000, 0xdeec053200000000, 0xbed3646800000000, - 0xa1c494e800000000, 0xbd5c3c6200000000, 0xa24bcce200000000, - 0xc274adb800000000, 0xdd635d3800000000, 0x020a6f0c00000000, - 0x1d1d9f8c00000000, 0x7d22fed600000000, 0x62350e5600000000, - 0xc3f19abe00000000, 0xdce66a3e00000000, 0xbcd90b6400000000, - 0xa3cefbe400000000, 0x7ca7c9d000000000, 0x63b0395000000000, - 0x038f580a00000000, 0x1c98a88a00000000, 0x7ab978c400000000, - 0x65ae884400000000, 0x0591e91e00000000, 0x1a86199e00000000, - 0xc5ef2baa00000000, 0xdaf8db2a00000000, 0xbac7ba7000000000, - 0xa5d04af000000000, 0x0414de1800000000, 0x1b032e9800000000, - 0x7b3c4fc200000000, 0x642bbf4200000000, 0xbb428d7600000000, - 0xa4557df600000000, 0xc46a1cac00000000, 0xdb7dec2c00000000, - 0xc7e544a600000000, 0xd8f2b42600000000, 0xb8cdd57c00000000, - 0xa7da25fc00000000, 0x78b317c800000000, 0x67a4e74800000000, - 0x079b861200000000, 0x188c769200000000, 0xb948e27a00000000, - 0xa65f12fa00000000, 0xc66073a000000000, 0xd977832000000000, - 0x061eb11400000000, 0x1909419400000000, 0x793620ce00000000, - 0x6621d04e00000000, 0xb574805300000000, 0xaa6370d300000000, - 0xca5c118900000000, 0xd54be10900000000, 0x0a22d33d00000000, - 0x153523bd00000000, 0x750a42e700000000, 0x6a1db26700000000, - 0xcbd9268f00000000, 0xd4ced60f00000000, 0xb4f1b75500000000, - 0xabe647d500000000, 0x748f75e100000000, 0x6b98856100000000, - 0x0ba7e43b00000000, 0x14b014bb00000000, 0x0828bc3100000000, - 0x173f4cb100000000, 0x77002deb00000000, 0x6817dd6b00000000, - 0xb77eef5f00000000, 0xa8691fdf00000000, 0xc8567e8500000000, - 0xd7418e0500000000, 0x76851aed00000000, 0x6992ea6d00000000, - 0x09ad8b3700000000, 0x16ba7bb700000000, 0xc9d3498300000000, - 0xd6c4b90300000000, 0xb6fbd85900000000, 0xa9ec28d900000000, - 0xcfcdf89700000000, 0xd0da081700000000, 0xb0e5694d00000000, - 0xaff299cd00000000, 0x709babf900000000, 0x6f8c5b7900000000, - 0x0fb33a2300000000, 0x10a4caa300000000, 0xb1605e4b00000000, - 0xae77aecb00000000, 0xce48cf9100000000, 0xd15f3f1100000000, - 0x0e360d2500000000, 0x1121fda500000000, 0x711e9cff00000000, - 0x6e096c7f00000000, 0x7291c4f500000000, 0x6d86347500000000, - 0x0db9552f00000000, 0x12aea5af00000000, 0xcdc7979b00000000, - 0xd2d0671b00000000, 0xb2ef064100000000, 0xadf8f6c100000000, - 0x0c3c622900000000, 0x132b92a900000000, 0x7314f3f300000000, - 0x6c03037300000000, 0xb36a314700000000, 0xac7dc1c700000000, - 0xcc42a09d00000000, 0xd355501d00000000, 0x6ae900a700000000, - 0x75fef02700000000, 0x15c1917d00000000, 0x0ad661fd00000000, - 0xd5bf53c900000000, 0xcaa8a34900000000, 0xaa97c21300000000, - 0xb580329300000000, 0x1444a67b00000000, 0x0b5356fb00000000, - 0x6b6c37a100000000, 0x747bc72100000000, 0xab12f51500000000, - 0xb405059500000000, 0xd43a64cf00000000, 0xcb2d944f00000000, - 0xd7b53cc500000000, 0xc8a2cc4500000000, 0xa89dad1f00000000, - 0xb78a5d9f00000000, 0x68e36fab00000000, 0x77f49f2b00000000, - 0x17cbfe7100000000, 0x08dc0ef100000000, 0xa9189a1900000000, - 0xb60f6a9900000000, 0xd6300bc300000000, 0xc927fb4300000000, - 0x164ec97700000000, 0x095939f700000000, 0x696658ad00000000, - 0x7671a82d00000000, 0x1050786300000000, 0x0f4788e300000000, - 0x6f78e9b900000000, 0x706f193900000000, 0xaf062b0d00000000, - 0xb011db8d00000000, 0xd02ebad700000000, 0xcf394a5700000000, - 0x6efddebf00000000, 0x71ea2e3f00000000, 0x11d54f6500000000, - 0x0ec2bfe500000000, 0xd1ab8dd100000000, 0xcebc7d5100000000, - 0xae831c0b00000000, 0xb194ec8b00000000, 0xad0c440100000000, - 0xb21bb48100000000, 0xd224d5db00000000, 0xcd33255b00000000, - 0x125a176f00000000, 0x0d4de7ef00000000, 0x6d7286b500000000, - 0x7265763500000000, 0xd3a1e2dd00000000, 0xccb6125d00000000, - 0xac89730700000000, 0xb39e838700000000, 0x6cf7b1b300000000, - 0x73e0413300000000, 0x13df206900000000, 0x0cc8d0e900000000, - 0xdf9d80f400000000, 0xc08a707400000000, 0xa0b5112e00000000, - 0xbfa2e1ae00000000, 0x60cbd39a00000000, 0x7fdc231a00000000, - 0x1fe3424000000000, 0x00f4b2c000000000, 0xa130262800000000, - 0xbe27d6a800000000, 0xde18b7f200000000, 0xc10f477200000000, - 0x1e66754600000000, 0x017185c600000000, 0x614ee49c00000000, - 0x7e59141c00000000, 0x62c1bc9600000000, 0x7dd64c1600000000, - 0x1de92d4c00000000, 0x02feddcc00000000, 0xdd97eff800000000, - 0xc2801f7800000000, 0xa2bf7e2200000000, 0xbda88ea200000000, - 0x1c6c1a4a00000000, 0x037beaca00000000, 0x63448b9000000000, - 0x7c537b1000000000, 0xa33a492400000000, 0xbc2db9a400000000, - 0xdc12d8fe00000000, 0xc305287e00000000, 0xa524f83000000000, - 0xba3308b000000000, 0xda0c69ea00000000, 0xc51b996a00000000, - 0x1a72ab5e00000000, 0x05655bde00000000, 0x655a3a8400000000, - 0x7a4dca0400000000, 0xdb895eec00000000, 0xc49eae6c00000000, - 0xa4a1cf3600000000, 0xbbb63fb600000000, 0x64df0d8200000000, - 0x7bc8fd0200000000, 0x1bf79c5800000000, 0x04e06cd800000000, - 0x1878c45200000000, 0x076f34d200000000, 0x6750558800000000, - 0x7847a50800000000, 0xa72e973c00000000, 0xb83967bc00000000, - 0xd80606e600000000, 0xc711f66600000000, 0x66d5628e00000000, - 0x79c2920e00000000, 0x19fdf35400000000, 0x06ea03d400000000, - 0xd98331e000000000, 0xc694c16000000000, 0xa6aba03a00000000, - 0xb9bc50ba00000000}, - {0x0000000000000000, 0xe2fd888d00000000, 0x85fd60c000000000, - 0x6700e84d00000000, 0x4bfdb05b00000000, 0xa90038d600000000, - 0xce00d09b00000000, 0x2cfd581600000000, 0x96fa61b700000000, - 0x7407e93a00000000, 0x1307017700000000, 0xf1fa89fa00000000, - 0xdd07d1ec00000000, 0x3ffa596100000000, 0x58fab12c00000000, - 0xba0739a100000000, 0x6df3b2b500000000, 0x8f0e3a3800000000, - 0xe80ed27500000000, 0x0af35af800000000, 0x260e02ee00000000, - 0xc4f38a6300000000, 0xa3f3622e00000000, 0x410eeaa300000000, - 0xfb09d30200000000, 0x19f45b8f00000000, 0x7ef4b3c200000000, - 0x9c093b4f00000000, 0xb0f4635900000000, 0x5209ebd400000000, - 0x3509039900000000, 0xd7f48b1400000000, 0x9be014b000000000, - 0x791d9c3d00000000, 0x1e1d747000000000, 0xfce0fcfd00000000, - 0xd01da4eb00000000, 0x32e02c6600000000, 0x55e0c42b00000000, - 0xb71d4ca600000000, 0x0d1a750700000000, 0xefe7fd8a00000000, - 0x88e715c700000000, 0x6a1a9d4a00000000, 0x46e7c55c00000000, - 0xa41a4dd100000000, 0xc31aa59c00000000, 0x21e72d1100000000, - 0xf613a60500000000, 0x14ee2e8800000000, 0x73eec6c500000000, - 0x91134e4800000000, 0xbdee165e00000000, 0x5f139ed300000000, - 0x3813769e00000000, 0xdaeefe1300000000, 0x60e9c7b200000000, - 0x82144f3f00000000, 0xe514a77200000000, 0x07e92fff00000000, - 0x2b1477e900000000, 0xc9e9ff6400000000, 0xaee9172900000000, - 0x4c149fa400000000, 0x77c758bb00000000, 0x953ad03600000000, - 0xf23a387b00000000, 0x10c7b0f600000000, 0x3c3ae8e000000000, - 0xdec7606d00000000, 0xb9c7882000000000, 0x5b3a00ad00000000, - 0xe13d390c00000000, 0x03c0b18100000000, 0x64c059cc00000000, - 0x863dd14100000000, 0xaac0895700000000, 0x483d01da00000000, - 0x2f3de99700000000, 0xcdc0611a00000000, 0x1a34ea0e00000000, - 0xf8c9628300000000, 0x9fc98ace00000000, 0x7d34024300000000, - 0x51c95a5500000000, 0xb334d2d800000000, 0xd4343a9500000000, - 0x36c9b21800000000, 0x8cce8bb900000000, 0x6e33033400000000, - 0x0933eb7900000000, 0xebce63f400000000, 0xc7333be200000000, - 0x25ceb36f00000000, 0x42ce5b2200000000, 0xa033d3af00000000, - 0xec274c0b00000000, 0x0edac48600000000, 0x69da2ccb00000000, - 0x8b27a44600000000, 0xa7dafc5000000000, 0x452774dd00000000, - 0x22279c9000000000, 0xc0da141d00000000, 0x7add2dbc00000000, - 0x9820a53100000000, 0xff204d7c00000000, 0x1dddc5f100000000, - 0x31209de700000000, 0xd3dd156a00000000, 0xb4ddfd2700000000, - 0x562075aa00000000, 0x81d4febe00000000, 0x6329763300000000, - 0x04299e7e00000000, 0xe6d416f300000000, 0xca294ee500000000, - 0x28d4c66800000000, 0x4fd42e2500000000, 0xad29a6a800000000, - 0x172e9f0900000000, 0xf5d3178400000000, 0x92d3ffc900000000, - 0x702e774400000000, 0x5cd32f5200000000, 0xbe2ea7df00000000, - 0xd92e4f9200000000, 0x3bd3c71f00000000, 0xaf88c0ad00000000, - 0x4d75482000000000, 0x2a75a06d00000000, 0xc88828e000000000, - 0xe47570f600000000, 0x0688f87b00000000, 0x6188103600000000, - 0x837598bb00000000, 0x3972a11a00000000, 0xdb8f299700000000, - 0xbc8fc1da00000000, 0x5e72495700000000, 0x728f114100000000, - 0x907299cc00000000, 0xf772718100000000, 0x158ff90c00000000, - 0xc27b721800000000, 0x2086fa9500000000, 0x478612d800000000, - 0xa57b9a5500000000, 0x8986c24300000000, 0x6b7b4ace00000000, - 0x0c7ba28300000000, 0xee862a0e00000000, 0x548113af00000000, - 0xb67c9b2200000000, 0xd17c736f00000000, 0x3381fbe200000000, - 0x1f7ca3f400000000, 0xfd812b7900000000, 0x9a81c33400000000, - 0x787c4bb900000000, 0x3468d41d00000000, 0xd6955c9000000000, - 0xb195b4dd00000000, 0x53683c5000000000, 0x7f95644600000000, - 0x9d68eccb00000000, 0xfa68048600000000, 0x18958c0b00000000, - 0xa292b5aa00000000, 0x406f3d2700000000, 0x276fd56a00000000, - 0xc5925de700000000, 0xe96f05f100000000, 0x0b928d7c00000000, - 0x6c92653100000000, 0x8e6fedbc00000000, 0x599b66a800000000, - 0xbb66ee2500000000, 0xdc66066800000000, 0x3e9b8ee500000000, - 0x1266d6f300000000, 0xf09b5e7e00000000, 0x979bb63300000000, - 0x75663ebe00000000, 0xcf61071f00000000, 0x2d9c8f9200000000, - 0x4a9c67df00000000, 0xa861ef5200000000, 0x849cb74400000000, - 0x66613fc900000000, 0x0161d78400000000, 0xe39c5f0900000000, - 0xd84f981600000000, 0x3ab2109b00000000, 0x5db2f8d600000000, - 0xbf4f705b00000000, 0x93b2284d00000000, 0x714fa0c000000000, - 0x164f488d00000000, 0xf4b2c00000000000, 0x4eb5f9a100000000, - 0xac48712c00000000, 0xcb48996100000000, 0x29b511ec00000000, - 0x054849fa00000000, 0xe7b5c17700000000, 0x80b5293a00000000, - 0x6248a1b700000000, 0xb5bc2aa300000000, 0x5741a22e00000000, - 0x30414a6300000000, 0xd2bcc2ee00000000, 0xfe419af800000000, - 0x1cbc127500000000, 0x7bbcfa3800000000, 0x994172b500000000, - 0x23464b1400000000, 0xc1bbc39900000000, 0xa6bb2bd400000000, - 0x4446a35900000000, 0x68bbfb4f00000000, 0x8a4673c200000000, - 0xed469b8f00000000, 0x0fbb130200000000, 0x43af8ca600000000, - 0xa152042b00000000, 0xc652ec6600000000, 0x24af64eb00000000, - 0x08523cfd00000000, 0xeaafb47000000000, 0x8daf5c3d00000000, - 0x6f52d4b000000000, 0xd555ed1100000000, 0x37a8659c00000000, - 0x50a88dd100000000, 0xb255055c00000000, 0x9ea85d4a00000000, - 0x7c55d5c700000000, 0x1b553d8a00000000, 0xf9a8b50700000000, - 0x2e5c3e1300000000, 0xcca1b69e00000000, 0xaba15ed300000000, - 0x495cd65e00000000, 0x65a18e4800000000, 0x875c06c500000000, - 0xe05cee8800000000, 0x02a1660500000000, 0xb8a65fa400000000, - 0x5a5bd72900000000, 0x3d5b3f6400000000, 0xdfa6b7e900000000, - 0xf35befff00000000, 0x11a6677200000000, 0x76a68f3f00000000, - 0x945b07b200000000}, - {0x0000000000000000, 0xa90b894e00000000, 0x5217129d00000000, - 0xfb1c9bd300000000, 0xe52855e100000000, 0x4c23dcaf00000000, - 0xb73f477c00000000, 0x1e34ce3200000000, 0x8b57db1900000000, - 0x225c525700000000, 0xd940c98400000000, 0x704b40ca00000000, - 0x6e7f8ef800000000, 0xc77407b600000000, 0x3c689c6500000000, - 0x9563152b00000000, 0x16afb63300000000, 0xbfa43f7d00000000, - 0x44b8a4ae00000000, 0xedb32de000000000, 0xf387e3d200000000, - 0x5a8c6a9c00000000, 0xa190f14f00000000, 0x089b780100000000, - 0x9df86d2a00000000, 0x34f3e46400000000, 0xcfef7fb700000000, - 0x66e4f6f900000000, 0x78d038cb00000000, 0xd1dbb18500000000, - 0x2ac72a5600000000, 0x83cca31800000000, 0x2c5e6d6700000000, - 0x8555e42900000000, 0x7e497ffa00000000, 0xd742f6b400000000, - 0xc976388600000000, 0x607db1c800000000, 0x9b612a1b00000000, - 0x326aa35500000000, 0xa709b67e00000000, 0x0e023f3000000000, - 0xf51ea4e300000000, 0x5c152dad00000000, 0x4221e39f00000000, - 0xeb2a6ad100000000, 0x1036f10200000000, 0xb93d784c00000000, - 0x3af1db5400000000, 0x93fa521a00000000, 0x68e6c9c900000000, - 0xc1ed408700000000, 0xdfd98eb500000000, 0x76d207fb00000000, - 0x8dce9c2800000000, 0x24c5156600000000, 0xb1a6004d00000000, - 0x18ad890300000000, 0xe3b112d000000000, 0x4aba9b9e00000000, - 0x548e55ac00000000, 0xfd85dce200000000, 0x0699473100000000, - 0xaf92ce7f00000000, 0x58bcdace00000000, 0xf1b7538000000000, - 0x0aabc85300000000, 0xa3a0411d00000000, 0xbd948f2f00000000, - 0x149f066100000000, 0xef839db200000000, 0x468814fc00000000, - 0xd3eb01d700000000, 0x7ae0889900000000, 0x81fc134a00000000, - 0x28f79a0400000000, 0x36c3543600000000, 0x9fc8dd7800000000, - 0x64d446ab00000000, 0xcddfcfe500000000, 0x4e136cfd00000000, - 0xe718e5b300000000, 0x1c047e6000000000, 0xb50ff72e00000000, - 0xab3b391c00000000, 0x0230b05200000000, 0xf92c2b8100000000, - 0x5027a2cf00000000, 0xc544b7e400000000, 0x6c4f3eaa00000000, - 0x9753a57900000000, 0x3e582c3700000000, 0x206ce20500000000, - 0x89676b4b00000000, 0x727bf09800000000, 0xdb7079d600000000, - 0x74e2b7a900000000, 0xdde93ee700000000, 0x26f5a53400000000, - 0x8ffe2c7a00000000, 0x91cae24800000000, 0x38c16b0600000000, - 0xc3ddf0d500000000, 0x6ad6799b00000000, 0xffb56cb000000000, - 0x56bee5fe00000000, 0xada27e2d00000000, 0x04a9f76300000000, - 0x1a9d395100000000, 0xb396b01f00000000, 0x488a2bcc00000000, - 0xe181a28200000000, 0x624d019a00000000, 0xcb4688d400000000, - 0x305a130700000000, 0x99519a4900000000, 0x8765547b00000000, - 0x2e6edd3500000000, 0xd57246e600000000, 0x7c79cfa800000000, - 0xe91ada8300000000, 0x401153cd00000000, 0xbb0dc81e00000000, - 0x1206415000000000, 0x0c328f6200000000, 0xa539062c00000000, - 0x5e259dff00000000, 0xf72e14b100000000, 0xf17ec44600000000, - 0x58754d0800000000, 0xa369d6db00000000, 0x0a625f9500000000, - 0x145691a700000000, 0xbd5d18e900000000, 0x4641833a00000000, - 0xef4a0a7400000000, 0x7a291f5f00000000, 0xd322961100000000, - 0x283e0dc200000000, 0x8135848c00000000, 0x9f014abe00000000, - 0x360ac3f000000000, 0xcd16582300000000, 0x641dd16d00000000, - 0xe7d1727500000000, 0x4edafb3b00000000, 0xb5c660e800000000, - 0x1ccde9a600000000, 0x02f9279400000000, 0xabf2aeda00000000, - 0x50ee350900000000, 0xf9e5bc4700000000, 0x6c86a96c00000000, - 0xc58d202200000000, 0x3e91bbf100000000, 0x979a32bf00000000, - 0x89aefc8d00000000, 0x20a575c300000000, 0xdbb9ee1000000000, - 0x72b2675e00000000, 0xdd20a92100000000, 0x742b206f00000000, - 0x8f37bbbc00000000, 0x263c32f200000000, 0x3808fcc000000000, - 0x9103758e00000000, 0x6a1fee5d00000000, 0xc314671300000000, - 0x5677723800000000, 0xff7cfb7600000000, 0x046060a500000000, - 0xad6be9eb00000000, 0xb35f27d900000000, 0x1a54ae9700000000, - 0xe148354400000000, 0x4843bc0a00000000, 0xcb8f1f1200000000, - 0x6284965c00000000, 0x99980d8f00000000, 0x309384c100000000, - 0x2ea74af300000000, 0x87acc3bd00000000, 0x7cb0586e00000000, - 0xd5bbd12000000000, 0x40d8c40b00000000, 0xe9d34d4500000000, - 0x12cfd69600000000, 0xbbc45fd800000000, 0xa5f091ea00000000, - 0x0cfb18a400000000, 0xf7e7837700000000, 0x5eec0a3900000000, - 0xa9c21e8800000000, 0x00c997c600000000, 0xfbd50c1500000000, - 0x52de855b00000000, 0x4cea4b6900000000, 0xe5e1c22700000000, - 0x1efd59f400000000, 0xb7f6d0ba00000000, 0x2295c59100000000, - 0x8b9e4cdf00000000, 0x7082d70c00000000, 0xd9895e4200000000, - 0xc7bd907000000000, 0x6eb6193e00000000, 0x95aa82ed00000000, - 0x3ca10ba300000000, 0xbf6da8bb00000000, 0x166621f500000000, - 0xed7aba2600000000, 0x4471336800000000, 0x5a45fd5a00000000, - 0xf34e741400000000, 0x0852efc700000000, 0xa159668900000000, - 0x343a73a200000000, 0x9d31faec00000000, 0x662d613f00000000, - 0xcf26e87100000000, 0xd112264300000000, 0x7819af0d00000000, - 0x830534de00000000, 0x2a0ebd9000000000, 0x859c73ef00000000, - 0x2c97faa100000000, 0xd78b617200000000, 0x7e80e83c00000000, - 0x60b4260e00000000, 0xc9bfaf4000000000, 0x32a3349300000000, - 0x9ba8bddd00000000, 0x0ecba8f600000000, 0xa7c021b800000000, - 0x5cdcba6b00000000, 0xf5d7332500000000, 0xebe3fd1700000000, - 0x42e8745900000000, 0xb9f4ef8a00000000, 0x10ff66c400000000, - 0x9333c5dc00000000, 0x3a384c9200000000, 0xc124d74100000000, - 0x682f5e0f00000000, 0x761b903d00000000, 0xdf10197300000000, - 0x240c82a000000000, 0x8d070bee00000000, 0x18641ec500000000, - 0xb16f978b00000000, 0x4a730c5800000000, 0xe378851600000000, - 0xfd4c4b2400000000, 0x5447c26a00000000, 0xaf5b59b900000000, - 0x0650d0f700000000}, - {0x0000000000000000, 0x479244af00000000, 0xcf22f88500000000, - 0x88b0bc2a00000000, 0xdf4381d000000000, 0x98d1c57f00000000, - 0x1061795500000000, 0x57f33dfa00000000, 0xff81737a00000000, - 0xb81337d500000000, 0x30a38bff00000000, 0x7731cf5000000000, - 0x20c2f2aa00000000, 0x6750b60500000000, 0xefe00a2f00000000, - 0xa8724e8000000000, 0xfe03e7f400000000, 0xb991a35b00000000, - 0x31211f7100000000, 0x76b35bde00000000, 0x2140662400000000, - 0x66d2228b00000000, 0xee629ea100000000, 0xa9f0da0e00000000, - 0x0182948e00000000, 0x4610d02100000000, 0xcea06c0b00000000, - 0x893228a400000000, 0xdec1155e00000000, 0x995351f100000000, - 0x11e3eddb00000000, 0x5671a97400000000, 0xbd01bf3200000000, - 0xfa93fb9d00000000, 0x722347b700000000, 0x35b1031800000000, - 0x62423ee200000000, 0x25d07a4d00000000, 0xad60c66700000000, - 0xeaf282c800000000, 0x4280cc4800000000, 0x051288e700000000, - 0x8da234cd00000000, 0xca30706200000000, 0x9dc34d9800000000, - 0xda51093700000000, 0x52e1b51d00000000, 0x1573f1b200000000, - 0x430258c600000000, 0x04901c6900000000, 0x8c20a04300000000, - 0xcbb2e4ec00000000, 0x9c41d91600000000, 0xdbd39db900000000, - 0x5363219300000000, 0x14f1653c00000000, 0xbc832bbc00000000, - 0xfb116f1300000000, 0x73a1d33900000000, 0x3433979600000000, - 0x63c0aa6c00000000, 0x2452eec300000000, 0xace252e900000000, - 0xeb70164600000000, 0x7a037e6500000000, 0x3d913aca00000000, - 0xb52186e000000000, 0xf2b3c24f00000000, 0xa540ffb500000000, - 0xe2d2bb1a00000000, 0x6a62073000000000, 0x2df0439f00000000, - 0x85820d1f00000000, 0xc21049b000000000, 0x4aa0f59a00000000, - 0x0d32b13500000000, 0x5ac18ccf00000000, 0x1d53c86000000000, - 0x95e3744a00000000, 0xd27130e500000000, 0x8400999100000000, - 0xc392dd3e00000000, 0x4b22611400000000, 0x0cb025bb00000000, - 0x5b43184100000000, 0x1cd15cee00000000, 0x9461e0c400000000, - 0xd3f3a46b00000000, 0x7b81eaeb00000000, 0x3c13ae4400000000, - 0xb4a3126e00000000, 0xf33156c100000000, 0xa4c26b3b00000000, - 0xe3502f9400000000, 0x6be093be00000000, 0x2c72d71100000000, - 0xc702c15700000000, 0x809085f800000000, 0x082039d200000000, - 0x4fb27d7d00000000, 0x1841408700000000, 0x5fd3042800000000, - 0xd763b80200000000, 0x90f1fcad00000000, 0x3883b22d00000000, - 0x7f11f68200000000, 0xf7a14aa800000000, 0xb0330e0700000000, - 0xe7c033fd00000000, 0xa052775200000000, 0x28e2cb7800000000, - 0x6f708fd700000000, 0x390126a300000000, 0x7e93620c00000000, - 0xf623de2600000000, 0xb1b19a8900000000, 0xe642a77300000000, - 0xa1d0e3dc00000000, 0x29605ff600000000, 0x6ef21b5900000000, - 0xc68055d900000000, 0x8112117600000000, 0x09a2ad5c00000000, - 0x4e30e9f300000000, 0x19c3d40900000000, 0x5e5190a600000000, - 0xd6e12c8c00000000, 0x9173682300000000, 0xf406fcca00000000, - 0xb394b86500000000, 0x3b24044f00000000, 0x7cb640e000000000, - 0x2b457d1a00000000, 0x6cd739b500000000, 0xe467859f00000000, - 0xa3f5c13000000000, 0x0b878fb000000000, 0x4c15cb1f00000000, - 0xc4a5773500000000, 0x8337339a00000000, 0xd4c40e6000000000, - 0x93564acf00000000, 0x1be6f6e500000000, 0x5c74b24a00000000, - 0x0a051b3e00000000, 0x4d975f9100000000, 0xc527e3bb00000000, - 0x82b5a71400000000, 0xd5469aee00000000, 0x92d4de4100000000, - 0x1a64626b00000000, 0x5df626c400000000, 0xf584684400000000, - 0xb2162ceb00000000, 0x3aa690c100000000, 0x7d34d46e00000000, - 0x2ac7e99400000000, 0x6d55ad3b00000000, 0xe5e5111100000000, - 0xa27755be00000000, 0x490743f800000000, 0x0e95075700000000, - 0x8625bb7d00000000, 0xc1b7ffd200000000, 0x9644c22800000000, - 0xd1d6868700000000, 0x59663aad00000000, 0x1ef47e0200000000, - 0xb686308200000000, 0xf114742d00000000, 0x79a4c80700000000, - 0x3e368ca800000000, 0x69c5b15200000000, 0x2e57f5fd00000000, - 0xa6e749d700000000, 0xe1750d7800000000, 0xb704a40c00000000, - 0xf096e0a300000000, 0x78265c8900000000, 0x3fb4182600000000, - 0x684725dc00000000, 0x2fd5617300000000, 0xa765dd5900000000, - 0xe0f799f600000000, 0x4885d77600000000, 0x0f1793d900000000, - 0x87a72ff300000000, 0xc0356b5c00000000, 0x97c656a600000000, - 0xd054120900000000, 0x58e4ae2300000000, 0x1f76ea8c00000000, - 0x8e0582af00000000, 0xc997c60000000000, 0x41277a2a00000000, - 0x06b53e8500000000, 0x5146037f00000000, 0x16d447d000000000, - 0x9e64fbfa00000000, 0xd9f6bf5500000000, 0x7184f1d500000000, - 0x3616b57a00000000, 0xbea6095000000000, 0xf9344dff00000000, - 0xaec7700500000000, 0xe95534aa00000000, 0x61e5888000000000, - 0x2677cc2f00000000, 0x7006655b00000000, 0x379421f400000000, - 0xbf249dde00000000, 0xf8b6d97100000000, 0xaf45e48b00000000, - 0xe8d7a02400000000, 0x60671c0e00000000, 0x27f558a100000000, - 0x8f87162100000000, 0xc815528e00000000, 0x40a5eea400000000, - 0x0737aa0b00000000, 0x50c497f100000000, 0x1756d35e00000000, - 0x9fe66f7400000000, 0xd8742bdb00000000, 0x33043d9d00000000, - 0x7496793200000000, 0xfc26c51800000000, 0xbbb481b700000000, - 0xec47bc4d00000000, 0xabd5f8e200000000, 0x236544c800000000, - 0x64f7006700000000, 0xcc854ee700000000, 0x8b170a4800000000, - 0x03a7b66200000000, 0x4435f2cd00000000, 0x13c6cf3700000000, - 0x54548b9800000000, 0xdce437b200000000, 0x9b76731d00000000, - 0xcd07da6900000000, 0x8a959ec600000000, 0x022522ec00000000, - 0x45b7664300000000, 0x12445bb900000000, 0x55d61f1600000000, - 0xdd66a33c00000000, 0x9af4e79300000000, 0x3286a91300000000, - 0x7514edbc00000000, 0xfda4519600000000, 0xba36153900000000, - 0xedc528c300000000, 0xaa576c6c00000000, 0x22e7d04600000000, - 0x657594e900000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0x65673b46, 0xcace768c, 0xafa94dca, 0x4eedeb59, - 0x2b8ad01f, 0x84239dd5, 0xe144a693, 0x9ddbd6b2, 0xf8bcedf4, - 0x5715a03e, 0x32729b78, 0xd3363deb, 0xb65106ad, 0x19f84b67, - 0x7c9f7021, 0xe0c6ab25, 0x85a19063, 0x2a08dda9, 0x4f6fe6ef, - 0xae2b407c, 0xcb4c7b3a, 0x64e536f0, 0x01820db6, 0x7d1d7d97, - 0x187a46d1, 0xb7d30b1b, 0xd2b4305d, 0x33f096ce, 0x5697ad88, - 0xf93ee042, 0x9c59db04, 0x1afc500b, 0x7f9b6b4d, 0xd0322687, - 0xb5551dc1, 0x5411bb52, 0x31768014, 0x9edfcdde, 0xfbb8f698, - 0x872786b9, 0xe240bdff, 0x4de9f035, 0x288ecb73, 0xc9ca6de0, - 0xacad56a6, 0x03041b6c, 0x6663202a, 0xfa3afb2e, 0x9f5dc068, - 0x30f48da2, 0x5593b6e4, 0xb4d71077, 0xd1b02b31, 0x7e1966fb, - 0x1b7e5dbd, 0x67e12d9c, 0x028616da, 0xad2f5b10, 0xc8486056, - 0x290cc6c5, 0x4c6bfd83, 0xe3c2b049, 0x86a58b0f, 0x35f8a016, - 0x509f9b50, 0xff36d69a, 0x9a51eddc, 0x7b154b4f, 0x1e727009, - 0xb1db3dc3, 0xd4bc0685, 0xa82376a4, 0xcd444de2, 0x62ed0028, - 0x078a3b6e, 0xe6ce9dfd, 0x83a9a6bb, 0x2c00eb71, 0x4967d037, - 0xd53e0b33, 0xb0593075, 0x1ff07dbf, 0x7a9746f9, 0x9bd3e06a, - 0xfeb4db2c, 0x511d96e6, 0x347aada0, 0x48e5dd81, 0x2d82e6c7, - 0x822bab0d, 0xe74c904b, 0x060836d8, 0x636f0d9e, 0xccc64054, - 0xa9a17b12, 0x2f04f01d, 0x4a63cb5b, 0xe5ca8691, 0x80adbdd7, - 0x61e91b44, 0x048e2002, 0xab276dc8, 0xce40568e, 0xb2df26af, - 0xd7b81de9, 0x78115023, 0x1d766b65, 0xfc32cdf6, 0x9955f6b0, - 0x36fcbb7a, 0x539b803c, 0xcfc25b38, 0xaaa5607e, 0x050c2db4, - 0x606b16f2, 0x812fb061, 0xe4488b27, 0x4be1c6ed, 0x2e86fdab, - 0x52198d8a, 0x377eb6cc, 0x98d7fb06, 0xfdb0c040, 0x1cf466d3, - 0x79935d95, 0xd63a105f, 0xb35d2b19, 0x6bf1402c, 0x0e967b6a, - 0xa13f36a0, 0xc4580de6, 0x251cab75, 0x407b9033, 0xefd2ddf9, - 0x8ab5e6bf, 0xf62a969e, 0x934dadd8, 0x3ce4e012, 0x5983db54, - 0xb8c77dc7, 0xdda04681, 0x72090b4b, 0x176e300d, 0x8b37eb09, - 0xee50d04f, 0x41f99d85, 0x249ea6c3, 0xc5da0050, 0xa0bd3b16, - 0x0f1476dc, 0x6a734d9a, 0x16ec3dbb, 0x738b06fd, 0xdc224b37, - 0xb9457071, 0x5801d6e2, 0x3d66eda4, 0x92cfa06e, 0xf7a89b28, - 0x710d1027, 0x146a2b61, 0xbbc366ab, 0xdea45ded, 0x3fe0fb7e, - 0x5a87c038, 0xf52e8df2, 0x9049b6b4, 0xecd6c695, 0x89b1fdd3, - 0x2618b019, 0x437f8b5f, 0xa23b2dcc, 0xc75c168a, 0x68f55b40, - 0x0d926006, 0x91cbbb02, 0xf4ac8044, 0x5b05cd8e, 0x3e62f6c8, - 0xdf26505b, 0xba416b1d, 0x15e826d7, 0x708f1d91, 0x0c106db0, - 0x697756f6, 0xc6de1b3c, 0xa3b9207a, 0x42fd86e9, 0x279abdaf, - 0x8833f065, 0xed54cb23, 0x5e09e03a, 0x3b6edb7c, 0x94c796b6, - 0xf1a0adf0, 0x10e40b63, 0x75833025, 0xda2a7def, 0xbf4d46a9, - 0xc3d23688, 0xa6b50dce, 0x091c4004, 0x6c7b7b42, 0x8d3fddd1, - 0xe858e697, 0x47f1ab5d, 0x2296901b, 0xbecf4b1f, 0xdba87059, - 0x74013d93, 0x116606d5, 0xf022a046, 0x95459b00, 0x3aecd6ca, - 0x5f8bed8c, 0x23149dad, 0x4673a6eb, 0xe9daeb21, 0x8cbdd067, - 0x6df976f4, 0x089e4db2, 0xa7370078, 0xc2503b3e, 0x44f5b031, - 0x21928b77, 0x8e3bc6bd, 0xeb5cfdfb, 0x0a185b68, 0x6f7f602e, - 0xc0d62de4, 0xa5b116a2, 0xd92e6683, 0xbc495dc5, 0x13e0100f, - 0x76872b49, 0x97c38dda, 0xf2a4b69c, 0x5d0dfb56, 0x386ac010, - 0xa4331b14, 0xc1542052, 0x6efd6d98, 0x0b9a56de, 0xeadef04d, - 0x8fb9cb0b, 0x201086c1, 0x4577bd87, 0x39e8cda6, 0x5c8ff6e0, - 0xf326bb2a, 0x9641806c, 0x770526ff, 0x12621db9, 0xbdcb5073, - 0xd8ac6b35}, - {0x00000000, 0xd7e28058, 0x74b406f1, 0xa35686a9, 0xe9680de2, - 0x3e8a8dba, 0x9ddc0b13, 0x4a3e8b4b, 0x09a11d85, 0xde439ddd, - 0x7d151b74, 0xaaf79b2c, 0xe0c91067, 0x372b903f, 0x947d1696, - 0x439f96ce, 0x13423b0a, 0xc4a0bb52, 0x67f63dfb, 0xb014bda3, - 0xfa2a36e8, 0x2dc8b6b0, 0x8e9e3019, 0x597cb041, 0x1ae3268f, - 0xcd01a6d7, 0x6e57207e, 0xb9b5a026, 0xf38b2b6d, 0x2469ab35, - 0x873f2d9c, 0x50ddadc4, 0x26847614, 0xf166f64c, 0x523070e5, - 0x85d2f0bd, 0xcfec7bf6, 0x180efbae, 0xbb587d07, 0x6cbafd5f, - 0x2f256b91, 0xf8c7ebc9, 0x5b916d60, 0x8c73ed38, 0xc64d6673, - 0x11afe62b, 0xb2f96082, 0x651be0da, 0x35c64d1e, 0xe224cd46, - 0x41724bef, 0x9690cbb7, 0xdcae40fc, 0x0b4cc0a4, 0xa81a460d, - 0x7ff8c655, 0x3c67509b, 0xeb85d0c3, 0x48d3566a, 0x9f31d632, - 0xd50f5d79, 0x02eddd21, 0xa1bb5b88, 0x7659dbd0, 0x4d08ec28, - 0x9aea6c70, 0x39bcead9, 0xee5e6a81, 0xa460e1ca, 0x73826192, - 0xd0d4e73b, 0x07366763, 0x44a9f1ad, 0x934b71f5, 0x301df75c, - 0xe7ff7704, 0xadc1fc4f, 0x7a237c17, 0xd975fabe, 0x0e977ae6, - 0x5e4ad722, 0x89a8577a, 0x2afed1d3, 0xfd1c518b, 0xb722dac0, - 0x60c05a98, 0xc396dc31, 0x14745c69, 0x57ebcaa7, 0x80094aff, - 0x235fcc56, 0xf4bd4c0e, 0xbe83c745, 0x6961471d, 0xca37c1b4, - 0x1dd541ec, 0x6b8c9a3c, 0xbc6e1a64, 0x1f389ccd, 0xc8da1c95, - 0x82e497de, 0x55061786, 0xf650912f, 0x21b21177, 0x622d87b9, - 0xb5cf07e1, 0x16998148, 0xc17b0110, 0x8b458a5b, 0x5ca70a03, - 0xfff18caa, 0x28130cf2, 0x78cea136, 0xaf2c216e, 0x0c7aa7c7, - 0xdb98279f, 0x91a6acd4, 0x46442c8c, 0xe512aa25, 0x32f02a7d, - 0x716fbcb3, 0xa68d3ceb, 0x05dbba42, 0xd2393a1a, 0x9807b151, - 0x4fe53109, 0xecb3b7a0, 0x3b5137f8, 0x9a11d850, 0x4df35808, - 0xeea5dea1, 0x39475ef9, 0x7379d5b2, 0xa49b55ea, 0x07cdd343, - 0xd02f531b, 0x93b0c5d5, 0x4452458d, 0xe704c324, 0x30e6437c, - 0x7ad8c837, 0xad3a486f, 0x0e6ccec6, 0xd98e4e9e, 0x8953e35a, - 0x5eb16302, 0xfde7e5ab, 0x2a0565f3, 0x603beeb8, 0xb7d96ee0, - 0x148fe849, 0xc36d6811, 0x80f2fedf, 0x57107e87, 0xf446f82e, - 0x23a47876, 0x699af33d, 0xbe787365, 0x1d2ef5cc, 0xcacc7594, - 0xbc95ae44, 0x6b772e1c, 0xc821a8b5, 0x1fc328ed, 0x55fda3a6, - 0x821f23fe, 0x2149a557, 0xf6ab250f, 0xb534b3c1, 0x62d63399, - 0xc180b530, 0x16623568, 0x5c5cbe23, 0x8bbe3e7b, 0x28e8b8d2, - 0xff0a388a, 0xafd7954e, 0x78351516, 0xdb6393bf, 0x0c8113e7, - 0x46bf98ac, 0x915d18f4, 0x320b9e5d, 0xe5e91e05, 0xa67688cb, - 0x71940893, 0xd2c28e3a, 0x05200e62, 0x4f1e8529, 0x98fc0571, - 0x3baa83d8, 0xec480380, 0xd7193478, 0x00fbb420, 0xa3ad3289, - 0x744fb2d1, 0x3e71399a, 0xe993b9c2, 0x4ac53f6b, 0x9d27bf33, - 0xdeb829fd, 0x095aa9a5, 0xaa0c2f0c, 0x7deeaf54, 0x37d0241f, - 0xe032a447, 0x436422ee, 0x9486a2b6, 0xc45b0f72, 0x13b98f2a, - 0xb0ef0983, 0x670d89db, 0x2d330290, 0xfad182c8, 0x59870461, - 0x8e658439, 0xcdfa12f7, 0x1a1892af, 0xb94e1406, 0x6eac945e, - 0x24921f15, 0xf3709f4d, 0x502619e4, 0x87c499bc, 0xf19d426c, - 0x267fc234, 0x8529449d, 0x52cbc4c5, 0x18f54f8e, 0xcf17cfd6, - 0x6c41497f, 0xbba3c927, 0xf83c5fe9, 0x2fdedfb1, 0x8c885918, - 0x5b6ad940, 0x1154520b, 0xc6b6d253, 0x65e054fa, 0xb202d4a2, - 0xe2df7966, 0x353df93e, 0x966b7f97, 0x4189ffcf, 0x0bb77484, - 0xdc55f4dc, 0x7f037275, 0xa8e1f22d, 0xeb7e64e3, 0x3c9ce4bb, - 0x9fca6212, 0x4828e24a, 0x02166901, 0xd5f4e959, 0x76a26ff0, - 0xa140efa8}, - {0x00000000, 0xef52b6e1, 0x05d46b83, 0xea86dd62, 0x0ba8d706, - 0xe4fa61e7, 0x0e7cbc85, 0xe12e0a64, 0x1751ae0c, 0xf80318ed, - 0x1285c58f, 0xfdd7736e, 0x1cf9790a, 0xf3abcfeb, 0x192d1289, - 0xf67fa468, 0x2ea35c18, 0xc1f1eaf9, 0x2b77379b, 0xc425817a, - 0x250b8b1e, 0xca593dff, 0x20dfe09d, 0xcf8d567c, 0x39f2f214, - 0xd6a044f5, 0x3c269997, 0xd3742f76, 0x325a2512, 0xdd0893f3, - 0x378e4e91, 0xd8dcf870, 0x5d46b830, 0xb2140ed1, 0x5892d3b3, - 0xb7c06552, 0x56ee6f36, 0xb9bcd9d7, 0x533a04b5, 0xbc68b254, - 0x4a17163c, 0xa545a0dd, 0x4fc37dbf, 0xa091cb5e, 0x41bfc13a, - 0xaeed77db, 0x446baab9, 0xab391c58, 0x73e5e428, 0x9cb752c9, - 0x76318fab, 0x9963394a, 0x784d332e, 0x971f85cf, 0x7d9958ad, - 0x92cbee4c, 0x64b44a24, 0x8be6fcc5, 0x616021a7, 0x8e329746, - 0x6f1c9d22, 0x804e2bc3, 0x6ac8f6a1, 0x859a4040, 0xba8d7060, - 0x55dfc681, 0xbf591be3, 0x500bad02, 0xb125a766, 0x5e771187, - 0xb4f1cce5, 0x5ba37a04, 0xaddcde6c, 0x428e688d, 0xa808b5ef, - 0x475a030e, 0xa674096a, 0x4926bf8b, 0xa3a062e9, 0x4cf2d408, - 0x942e2c78, 0x7b7c9a99, 0x91fa47fb, 0x7ea8f11a, 0x9f86fb7e, - 0x70d44d9f, 0x9a5290fd, 0x7500261c, 0x837f8274, 0x6c2d3495, - 0x86abe9f7, 0x69f95f16, 0x88d75572, 0x6785e393, 0x8d033ef1, - 0x62518810, 0xe7cbc850, 0x08997eb1, 0xe21fa3d3, 0x0d4d1532, - 0xec631f56, 0x0331a9b7, 0xe9b774d5, 0x06e5c234, 0xf09a665c, - 0x1fc8d0bd, 0xf54e0ddf, 0x1a1cbb3e, 0xfb32b15a, 0x146007bb, - 0xfee6dad9, 0x11b46c38, 0xc9689448, 0x263a22a9, 0xccbcffcb, - 0x23ee492a, 0xc2c0434e, 0x2d92f5af, 0xc71428cd, 0x28469e2c, - 0xde393a44, 0x316b8ca5, 0xdbed51c7, 0x34bfe726, 0xd591ed42, - 0x3ac35ba3, 0xd04586c1, 0x3f173020, 0xae6be681, 0x41395060, - 0xabbf8d02, 0x44ed3be3, 0xa5c33187, 0x4a918766, 0xa0175a04, - 0x4f45ece5, 0xb93a488d, 0x5668fe6c, 0xbcee230e, 0x53bc95ef, - 0xb2929f8b, 0x5dc0296a, 0xb746f408, 0x581442e9, 0x80c8ba99, - 0x6f9a0c78, 0x851cd11a, 0x6a4e67fb, 0x8b606d9f, 0x6432db7e, - 0x8eb4061c, 0x61e6b0fd, 0x97991495, 0x78cba274, 0x924d7f16, - 0x7d1fc9f7, 0x9c31c393, 0x73637572, 0x99e5a810, 0x76b71ef1, - 0xf32d5eb1, 0x1c7fe850, 0xf6f93532, 0x19ab83d3, 0xf88589b7, - 0x17d73f56, 0xfd51e234, 0x120354d5, 0xe47cf0bd, 0x0b2e465c, - 0xe1a89b3e, 0x0efa2ddf, 0xefd427bb, 0x0086915a, 0xea004c38, - 0x0552fad9, 0xdd8e02a9, 0x32dcb448, 0xd85a692a, 0x3708dfcb, - 0xd626d5af, 0x3974634e, 0xd3f2be2c, 0x3ca008cd, 0xcadfaca5, - 0x258d1a44, 0xcf0bc726, 0x205971c7, 0xc1777ba3, 0x2e25cd42, - 0xc4a31020, 0x2bf1a6c1, 0x14e696e1, 0xfbb42000, 0x1132fd62, - 0xfe604b83, 0x1f4e41e7, 0xf01cf706, 0x1a9a2a64, 0xf5c89c85, - 0x03b738ed, 0xece58e0c, 0x0663536e, 0xe931e58f, 0x081fefeb, - 0xe74d590a, 0x0dcb8468, 0xe2993289, 0x3a45caf9, 0xd5177c18, - 0x3f91a17a, 0xd0c3179b, 0x31ed1dff, 0xdebfab1e, 0x3439767c, - 0xdb6bc09d, 0x2d1464f5, 0xc246d214, 0x28c00f76, 0xc792b997, - 0x26bcb3f3, 0xc9ee0512, 0x2368d870, 0xcc3a6e91, 0x49a02ed1, - 0xa6f29830, 0x4c744552, 0xa326f3b3, 0x4208f9d7, 0xad5a4f36, - 0x47dc9254, 0xa88e24b5, 0x5ef180dd, 0xb1a3363c, 0x5b25eb5e, - 0xb4775dbf, 0x555957db, 0xba0be13a, 0x508d3c58, 0xbfdf8ab9, - 0x670372c9, 0x8851c428, 0x62d7194a, 0x8d85afab, 0x6caba5cf, - 0x83f9132e, 0x697fce4c, 0x862d78ad, 0x7052dcc5, 0x9f006a24, - 0x7586b746, 0x9ad401a7, 0x7bfa0bc3, 0x94a8bd22, 0x7e2e6040, - 0x917cd6a1}, - {0x00000000, 0x87a6cb43, 0xd43c90c7, 0x539a5b84, 0x730827cf, - 0xf4aeec8c, 0xa734b708, 0x20927c4b, 0xe6104f9e, 0x61b684dd, - 0x322cdf59, 0xb58a141a, 0x95186851, 0x12bea312, 0x4124f896, - 0xc68233d5, 0x1751997d, 0x90f7523e, 0xc36d09ba, 0x44cbc2f9, - 0x6459beb2, 0xe3ff75f1, 0xb0652e75, 0x37c3e536, 0xf141d6e3, - 0x76e71da0, 0x257d4624, 0xa2db8d67, 0x8249f12c, 0x05ef3a6f, - 0x567561eb, 0xd1d3aaa8, 0x2ea332fa, 0xa905f9b9, 0xfa9fa23d, - 0x7d39697e, 0x5dab1535, 0xda0dde76, 0x899785f2, 0x0e314eb1, - 0xc8b37d64, 0x4f15b627, 0x1c8feda3, 0x9b2926e0, 0xbbbb5aab, - 0x3c1d91e8, 0x6f87ca6c, 0xe821012f, 0x39f2ab87, 0xbe5460c4, - 0xedce3b40, 0x6a68f003, 0x4afa8c48, 0xcd5c470b, 0x9ec61c8f, - 0x1960d7cc, 0xdfe2e419, 0x58442f5a, 0x0bde74de, 0x8c78bf9d, - 0xaceac3d6, 0x2b4c0895, 0x78d65311, 0xff709852, 0x5d4665f4, - 0xdae0aeb7, 0x897af533, 0x0edc3e70, 0x2e4e423b, 0xa9e88978, - 0xfa72d2fc, 0x7dd419bf, 0xbb562a6a, 0x3cf0e129, 0x6f6abaad, - 0xe8cc71ee, 0xc85e0da5, 0x4ff8c6e6, 0x1c629d62, 0x9bc45621, - 0x4a17fc89, 0xcdb137ca, 0x9e2b6c4e, 0x198da70d, 0x391fdb46, - 0xbeb91005, 0xed234b81, 0x6a8580c2, 0xac07b317, 0x2ba17854, - 0x783b23d0, 0xff9de893, 0xdf0f94d8, 0x58a95f9b, 0x0b33041f, - 0x8c95cf5c, 0x73e5570e, 0xf4439c4d, 0xa7d9c7c9, 0x207f0c8a, - 0x00ed70c1, 0x874bbb82, 0xd4d1e006, 0x53772b45, 0x95f51890, - 0x1253d3d3, 0x41c98857, 0xc66f4314, 0xe6fd3f5f, 0x615bf41c, - 0x32c1af98, 0xb56764db, 0x64b4ce73, 0xe3120530, 0xb0885eb4, - 0x372e95f7, 0x17bce9bc, 0x901a22ff, 0xc380797b, 0x4426b238, - 0x82a481ed, 0x05024aae, 0x5698112a, 0xd13eda69, 0xf1aca622, - 0x760a6d61, 0x259036e5, 0xa236fda6, 0xba8ccbe8, 0x3d2a00ab, - 0x6eb05b2f, 0xe916906c, 0xc984ec27, 0x4e222764, 0x1db87ce0, - 0x9a1eb7a3, 0x5c9c8476, 0xdb3a4f35, 0x88a014b1, 0x0f06dff2, - 0x2f94a3b9, 0xa83268fa, 0xfba8337e, 0x7c0ef83d, 0xaddd5295, - 0x2a7b99d6, 0x79e1c252, 0xfe470911, 0xded5755a, 0x5973be19, - 0x0ae9e59d, 0x8d4f2ede, 0x4bcd1d0b, 0xcc6bd648, 0x9ff18dcc, - 0x1857468f, 0x38c53ac4, 0xbf63f187, 0xecf9aa03, 0x6b5f6140, - 0x942ff912, 0x13893251, 0x401369d5, 0xc7b5a296, 0xe727dedd, - 0x6081159e, 0x331b4e1a, 0xb4bd8559, 0x723fb68c, 0xf5997dcf, - 0xa603264b, 0x21a5ed08, 0x01379143, 0x86915a00, 0xd50b0184, - 0x52adcac7, 0x837e606f, 0x04d8ab2c, 0x5742f0a8, 0xd0e43beb, - 0xf07647a0, 0x77d08ce3, 0x244ad767, 0xa3ec1c24, 0x656e2ff1, - 0xe2c8e4b2, 0xb152bf36, 0x36f47475, 0x1666083e, 0x91c0c37d, - 0xc25a98f9, 0x45fc53ba, 0xe7caae1c, 0x606c655f, 0x33f63edb, - 0xb450f598, 0x94c289d3, 0x13644290, 0x40fe1914, 0xc758d257, - 0x01dae182, 0x867c2ac1, 0xd5e67145, 0x5240ba06, 0x72d2c64d, - 0xf5740d0e, 0xa6ee568a, 0x21489dc9, 0xf09b3761, 0x773dfc22, - 0x24a7a7a6, 0xa3016ce5, 0x839310ae, 0x0435dbed, 0x57af8069, - 0xd0094b2a, 0x168b78ff, 0x912db3bc, 0xc2b7e838, 0x4511237b, - 0x65835f30, 0xe2259473, 0xb1bfcff7, 0x361904b4, 0xc9699ce6, - 0x4ecf57a5, 0x1d550c21, 0x9af3c762, 0xba61bb29, 0x3dc7706a, - 0x6e5d2bee, 0xe9fbe0ad, 0x2f79d378, 0xa8df183b, 0xfb4543bf, - 0x7ce388fc, 0x5c71f4b7, 0xdbd73ff4, 0x884d6470, 0x0febaf33, - 0xde38059b, 0x599eced8, 0x0a04955c, 0x8da25e1f, 0xad302254, - 0x2a96e917, 0x790cb293, 0xfeaa79d0, 0x38284a05, 0xbf8e8146, - 0xec14dac2, 0x6bb21181, 0x4b206dca, 0xcc86a689, 0x9f1cfd0d, - 0x18ba364e}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0x43cba687, 0xc7903cd4, 0x845b9a53, 0xcf270873, - 0x8cecaef4, 0x08b734a7, 0x4b7c9220, 0x9e4f10e6, 0xdd84b661, - 0x59df2c32, 0x1a148ab5, 0x51681895, 0x12a3be12, 0x96f82441, - 0xd53382c6, 0x7d995117, 0x3e52f790, 0xba096dc3, 0xf9c2cb44, - 0xb2be5964, 0xf175ffe3, 0x752e65b0, 0x36e5c337, 0xe3d641f1, - 0xa01de776, 0x24467d25, 0x678ddba2, 0x2cf14982, 0x6f3aef05, - 0xeb617556, 0xa8aad3d1, 0xfa32a32e, 0xb9f905a9, 0x3da29ffa, - 0x7e69397d, 0x3515ab5d, 0x76de0dda, 0xf2859789, 0xb14e310e, - 0x647db3c8, 0x27b6154f, 0xa3ed8f1c, 0xe026299b, 0xab5abbbb, - 0xe8911d3c, 0x6cca876f, 0x2f0121e8, 0x87abf239, 0xc46054be, - 0x403bceed, 0x03f0686a, 0x488cfa4a, 0x0b475ccd, 0x8f1cc69e, - 0xccd76019, 0x19e4e2df, 0x5a2f4458, 0xde74de0b, 0x9dbf788c, - 0xd6c3eaac, 0x95084c2b, 0x1153d678, 0x529870ff, 0xf465465d, - 0xb7aee0da, 0x33f57a89, 0x703edc0e, 0x3b424e2e, 0x7889e8a9, - 0xfcd272fa, 0xbf19d47d, 0x6a2a56bb, 0x29e1f03c, 0xadba6a6f, - 0xee71cce8, 0xa50d5ec8, 0xe6c6f84f, 0x629d621c, 0x2156c49b, - 0x89fc174a, 0xca37b1cd, 0x4e6c2b9e, 0x0da78d19, 0x46db1f39, - 0x0510b9be, 0x814b23ed, 0xc280856a, 0x17b307ac, 0x5478a12b, - 0xd0233b78, 0x93e89dff, 0xd8940fdf, 0x9b5fa958, 0x1f04330b, - 0x5ccf958c, 0x0e57e573, 0x4d9c43f4, 0xc9c7d9a7, 0x8a0c7f20, - 0xc170ed00, 0x82bb4b87, 0x06e0d1d4, 0x452b7753, 0x9018f595, - 0xd3d35312, 0x5788c941, 0x14436fc6, 0x5f3ffde6, 0x1cf45b61, - 0x98afc132, 0xdb6467b5, 0x73ceb464, 0x300512e3, 0xb45e88b0, - 0xf7952e37, 0xbce9bc17, 0xff221a90, 0x7b7980c3, 0x38b22644, - 0xed81a482, 0xae4a0205, 0x2a119856, 0x69da3ed1, 0x22a6acf1, - 0x616d0a76, 0xe5369025, 0xa6fd36a2, 0xe8cb8cba, 0xab002a3d, - 0x2f5bb06e, 0x6c9016e9, 0x27ec84c9, 0x6427224e, 0xe07cb81d, - 0xa3b71e9a, 0x76849c5c, 0x354f3adb, 0xb114a088, 0xf2df060f, - 0xb9a3942f, 0xfa6832a8, 0x7e33a8fb, 0x3df80e7c, 0x9552ddad, - 0xd6997b2a, 0x52c2e179, 0x110947fe, 0x5a75d5de, 0x19be7359, - 0x9de5e90a, 0xde2e4f8d, 0x0b1dcd4b, 0x48d66bcc, 0xcc8df19f, - 0x8f465718, 0xc43ac538, 0x87f163bf, 0x03aaf9ec, 0x40615f6b, - 0x12f92f94, 0x51328913, 0xd5691340, 0x96a2b5c7, 0xddde27e7, - 0x9e158160, 0x1a4e1b33, 0x5985bdb4, 0x8cb63f72, 0xcf7d99f5, - 0x4b2603a6, 0x08eda521, 0x43913701, 0x005a9186, 0x84010bd5, - 0xc7caad52, 0x6f607e83, 0x2cabd804, 0xa8f04257, 0xeb3be4d0, - 0xa04776f0, 0xe38cd077, 0x67d74a24, 0x241ceca3, 0xf12f6e65, - 0xb2e4c8e2, 0x36bf52b1, 0x7574f436, 0x3e086616, 0x7dc3c091, - 0xf9985ac2, 0xba53fc45, 0x1caecae7, 0x5f656c60, 0xdb3ef633, - 0x98f550b4, 0xd389c294, 0x90426413, 0x1419fe40, 0x57d258c7, - 0x82e1da01, 0xc12a7c86, 0x4571e6d5, 0x06ba4052, 0x4dc6d272, - 0x0e0d74f5, 0x8a56eea6, 0xc99d4821, 0x61379bf0, 0x22fc3d77, - 0xa6a7a724, 0xe56c01a3, 0xae109383, 0xeddb3504, 0x6980af57, - 0x2a4b09d0, 0xff788b16, 0xbcb32d91, 0x38e8b7c2, 0x7b231145, - 0x305f8365, 0x739425e2, 0xf7cfbfb1, 0xb4041936, 0xe69c69c9, - 0xa557cf4e, 0x210c551d, 0x62c7f39a, 0x29bb61ba, 0x6a70c73d, - 0xee2b5d6e, 0xade0fbe9, 0x78d3792f, 0x3b18dfa8, 0xbf4345fb, - 0xfc88e37c, 0xb7f4715c, 0xf43fd7db, 0x70644d88, 0x33afeb0f, - 0x9b0538de, 0xd8ce9e59, 0x5c95040a, 0x1f5ea28d, 0x542230ad, - 0x17e9962a, 0x93b20c79, 0xd079aafe, 0x054a2838, 0x46818ebf, - 0xc2da14ec, 0x8111b26b, 0xca6d204b, 0x89a686cc, 0x0dfd1c9f, - 0x4e36ba18}, - {0x00000000, 0xe1b652ef, 0x836bd405, 0x62dd86ea, 0x06d7a80b, - 0xe761fae4, 0x85bc7c0e, 0x640a2ee1, 0x0cae5117, 0xed1803f8, - 0x8fc58512, 0x6e73d7fd, 0x0a79f91c, 0xebcfabf3, 0x89122d19, - 0x68a47ff6, 0x185ca32e, 0xf9eaf1c1, 0x9b37772b, 0x7a8125c4, - 0x1e8b0b25, 0xff3d59ca, 0x9de0df20, 0x7c568dcf, 0x14f2f239, - 0xf544a0d6, 0x9799263c, 0x762f74d3, 0x12255a32, 0xf39308dd, - 0x914e8e37, 0x70f8dcd8, 0x30b8465d, 0xd10e14b2, 0xb3d39258, - 0x5265c0b7, 0x366fee56, 0xd7d9bcb9, 0xb5043a53, 0x54b268bc, - 0x3c16174a, 0xdda045a5, 0xbf7dc34f, 0x5ecb91a0, 0x3ac1bf41, - 0xdb77edae, 0xb9aa6b44, 0x581c39ab, 0x28e4e573, 0xc952b79c, - 0xab8f3176, 0x4a396399, 0x2e334d78, 0xcf851f97, 0xad58997d, - 0x4ceecb92, 0x244ab464, 0xc5fce68b, 0xa7216061, 0x4697328e, - 0x229d1c6f, 0xc32b4e80, 0xa1f6c86a, 0x40409a85, 0x60708dba, - 0x81c6df55, 0xe31b59bf, 0x02ad0b50, 0x66a725b1, 0x8711775e, - 0xe5ccf1b4, 0x047aa35b, 0x6cdedcad, 0x8d688e42, 0xefb508a8, - 0x0e035a47, 0x6a0974a6, 0x8bbf2649, 0xe962a0a3, 0x08d4f24c, - 0x782c2e94, 0x999a7c7b, 0xfb47fa91, 0x1af1a87e, 0x7efb869f, - 0x9f4dd470, 0xfd90529a, 0x1c260075, 0x74827f83, 0x95342d6c, - 0xf7e9ab86, 0x165ff969, 0x7255d788, 0x93e38567, 0xf13e038d, - 0x10885162, 0x50c8cbe7, 0xb17e9908, 0xd3a31fe2, 0x32154d0d, - 0x561f63ec, 0xb7a93103, 0xd574b7e9, 0x34c2e506, 0x5c669af0, - 0xbdd0c81f, 0xdf0d4ef5, 0x3ebb1c1a, 0x5ab132fb, 0xbb076014, - 0xd9dae6fe, 0x386cb411, 0x489468c9, 0xa9223a26, 0xcbffbccc, - 0x2a49ee23, 0x4e43c0c2, 0xaff5922d, 0xcd2814c7, 0x2c9e4628, - 0x443a39de, 0xa58c6b31, 0xc751eddb, 0x26e7bf34, 0x42ed91d5, - 0xa35bc33a, 0xc18645d0, 0x2030173f, 0x81e66bae, 0x60503941, - 0x028dbfab, 0xe33bed44, 0x8731c3a5, 0x6687914a, 0x045a17a0, - 0xe5ec454f, 0x8d483ab9, 0x6cfe6856, 0x0e23eebc, 0xef95bc53, - 0x8b9f92b2, 0x6a29c05d, 0x08f446b7, 0xe9421458, 0x99bac880, - 0x780c9a6f, 0x1ad11c85, 0xfb674e6a, 0x9f6d608b, 0x7edb3264, - 0x1c06b48e, 0xfdb0e661, 0x95149997, 0x74a2cb78, 0x167f4d92, - 0xf7c91f7d, 0x93c3319c, 0x72756373, 0x10a8e599, 0xf11eb776, - 0xb15e2df3, 0x50e87f1c, 0x3235f9f6, 0xd383ab19, 0xb78985f8, - 0x563fd717, 0x34e251fd, 0xd5540312, 0xbdf07ce4, 0x5c462e0b, - 0x3e9ba8e1, 0xdf2dfa0e, 0xbb27d4ef, 0x5a918600, 0x384c00ea, - 0xd9fa5205, 0xa9028edd, 0x48b4dc32, 0x2a695ad8, 0xcbdf0837, - 0xafd526d6, 0x4e637439, 0x2cbef2d3, 0xcd08a03c, 0xa5acdfca, - 0x441a8d25, 0x26c70bcf, 0xc7715920, 0xa37b77c1, 0x42cd252e, - 0x2010a3c4, 0xc1a6f12b, 0xe196e614, 0x0020b4fb, 0x62fd3211, - 0x834b60fe, 0xe7414e1f, 0x06f71cf0, 0x642a9a1a, 0x859cc8f5, - 0xed38b703, 0x0c8ee5ec, 0x6e536306, 0x8fe531e9, 0xebef1f08, - 0x0a594de7, 0x6884cb0d, 0x893299e2, 0xf9ca453a, 0x187c17d5, - 0x7aa1913f, 0x9b17c3d0, 0xff1ded31, 0x1eabbfde, 0x7c763934, - 0x9dc06bdb, 0xf564142d, 0x14d246c2, 0x760fc028, 0x97b992c7, - 0xf3b3bc26, 0x1205eec9, 0x70d86823, 0x916e3acc, 0xd12ea049, - 0x3098f2a6, 0x5245744c, 0xb3f326a3, 0xd7f90842, 0x364f5aad, - 0x5492dc47, 0xb5248ea8, 0xdd80f15e, 0x3c36a3b1, 0x5eeb255b, - 0xbf5d77b4, 0xdb575955, 0x3ae10bba, 0x583c8d50, 0xb98adfbf, - 0xc9720367, 0x28c45188, 0x4a19d762, 0xabaf858d, 0xcfa5ab6c, - 0x2e13f983, 0x4cce7f69, 0xad782d86, 0xc5dc5270, 0x246a009f, - 0x46b78675, 0xa701d49a, 0xc30bfa7b, 0x22bda894, 0x40602e7e, - 0xa1d67c91}, - {0x00000000, 0x5880e2d7, 0xf106b474, 0xa98656a3, 0xe20d68e9, - 0xba8d8a3e, 0x130bdc9d, 0x4b8b3e4a, 0x851da109, 0xdd9d43de, - 0x741b157d, 0x2c9bf7aa, 0x6710c9e0, 0x3f902b37, 0x96167d94, - 0xce969f43, 0x0a3b4213, 0x52bba0c4, 0xfb3df667, 0xa3bd14b0, - 0xe8362afa, 0xb0b6c82d, 0x19309e8e, 0x41b07c59, 0x8f26e31a, - 0xd7a601cd, 0x7e20576e, 0x26a0b5b9, 0x6d2b8bf3, 0x35ab6924, - 0x9c2d3f87, 0xc4addd50, 0x14768426, 0x4cf666f1, 0xe5703052, - 0xbdf0d285, 0xf67beccf, 0xaefb0e18, 0x077d58bb, 0x5ffdba6c, - 0x916b252f, 0xc9ebc7f8, 0x606d915b, 0x38ed738c, 0x73664dc6, - 0x2be6af11, 0x8260f9b2, 0xdae01b65, 0x1e4dc635, 0x46cd24e2, - 0xef4b7241, 0xb7cb9096, 0xfc40aedc, 0xa4c04c0b, 0x0d461aa8, - 0x55c6f87f, 0x9b50673c, 0xc3d085eb, 0x6a56d348, 0x32d6319f, - 0x795d0fd5, 0x21dded02, 0x885bbba1, 0xd0db5976, 0x28ec084d, - 0x706cea9a, 0xd9eabc39, 0x816a5eee, 0xcae160a4, 0x92618273, - 0x3be7d4d0, 0x63673607, 0xadf1a944, 0xf5714b93, 0x5cf71d30, - 0x0477ffe7, 0x4ffcc1ad, 0x177c237a, 0xbefa75d9, 0xe67a970e, - 0x22d74a5e, 0x7a57a889, 0xd3d1fe2a, 0x8b511cfd, 0xc0da22b7, - 0x985ac060, 0x31dc96c3, 0x695c7414, 0xa7caeb57, 0xff4a0980, - 0x56cc5f23, 0x0e4cbdf4, 0x45c783be, 0x1d476169, 0xb4c137ca, - 0xec41d51d, 0x3c9a8c6b, 0x641a6ebc, 0xcd9c381f, 0x951cdac8, - 0xde97e482, 0x86170655, 0x2f9150f6, 0x7711b221, 0xb9872d62, - 0xe107cfb5, 0x48819916, 0x10017bc1, 0x5b8a458b, 0x030aa75c, - 0xaa8cf1ff, 0xf20c1328, 0x36a1ce78, 0x6e212caf, 0xc7a77a0c, - 0x9f2798db, 0xd4aca691, 0x8c2c4446, 0x25aa12e5, 0x7d2af032, - 0xb3bc6f71, 0xeb3c8da6, 0x42badb05, 0x1a3a39d2, 0x51b10798, - 0x0931e54f, 0xa0b7b3ec, 0xf837513b, 0x50d8119a, 0x0858f34d, - 0xa1dea5ee, 0xf95e4739, 0xb2d57973, 0xea559ba4, 0x43d3cd07, - 0x1b532fd0, 0xd5c5b093, 0x8d455244, 0x24c304e7, 0x7c43e630, - 0x37c8d87a, 0x6f483aad, 0xc6ce6c0e, 0x9e4e8ed9, 0x5ae35389, - 0x0263b15e, 0xabe5e7fd, 0xf365052a, 0xb8ee3b60, 0xe06ed9b7, - 0x49e88f14, 0x11686dc3, 0xdffef280, 0x877e1057, 0x2ef846f4, - 0x7678a423, 0x3df39a69, 0x657378be, 0xccf52e1d, 0x9475ccca, - 0x44ae95bc, 0x1c2e776b, 0xb5a821c8, 0xed28c31f, 0xa6a3fd55, - 0xfe231f82, 0x57a54921, 0x0f25abf6, 0xc1b334b5, 0x9933d662, - 0x30b580c1, 0x68356216, 0x23be5c5c, 0x7b3ebe8b, 0xd2b8e828, - 0x8a380aff, 0x4e95d7af, 0x16153578, 0xbf9363db, 0xe713810c, - 0xac98bf46, 0xf4185d91, 0x5d9e0b32, 0x051ee9e5, 0xcb8876a6, - 0x93089471, 0x3a8ec2d2, 0x620e2005, 0x29851e4f, 0x7105fc98, - 0xd883aa3b, 0x800348ec, 0x783419d7, 0x20b4fb00, 0x8932ada3, - 0xd1b24f74, 0x9a39713e, 0xc2b993e9, 0x6b3fc54a, 0x33bf279d, - 0xfd29b8de, 0xa5a95a09, 0x0c2f0caa, 0x54afee7d, 0x1f24d037, - 0x47a432e0, 0xee226443, 0xb6a28694, 0x720f5bc4, 0x2a8fb913, - 0x8309efb0, 0xdb890d67, 0x9002332d, 0xc882d1fa, 0x61048759, - 0x3984658e, 0xf712facd, 0xaf92181a, 0x06144eb9, 0x5e94ac6e, - 0x151f9224, 0x4d9f70f3, 0xe4192650, 0xbc99c487, 0x6c429df1, - 0x34c27f26, 0x9d442985, 0xc5c4cb52, 0x8e4ff518, 0xd6cf17cf, - 0x7f49416c, 0x27c9a3bb, 0xe95f3cf8, 0xb1dfde2f, 0x1859888c, - 0x40d96a5b, 0x0b525411, 0x53d2b6c6, 0xfa54e065, 0xa2d402b2, - 0x6679dfe2, 0x3ef93d35, 0x977f6b96, 0xcfff8941, 0x8474b70b, - 0xdcf455dc, 0x7572037f, 0x2df2e1a8, 0xe3647eeb, 0xbbe49c3c, - 0x1262ca9f, 0x4ae22848, 0x01691602, 0x59e9f4d5, 0xf06fa276, - 0xa8ef40a1}, - {0x00000000, 0x463b6765, 0x8c76ceca, 0xca4da9af, 0x59ebed4e, - 0x1fd08a2b, 0xd59d2384, 0x93a644e1, 0xb2d6db9d, 0xf4edbcf8, - 0x3ea01557, 0x789b7232, 0xeb3d36d3, 0xad0651b6, 0x674bf819, - 0x21709f7c, 0x25abc6e0, 0x6390a185, 0xa9dd082a, 0xefe66f4f, - 0x7c402bae, 0x3a7b4ccb, 0xf036e564, 0xb60d8201, 0x977d1d7d, - 0xd1467a18, 0x1b0bd3b7, 0x5d30b4d2, 0xce96f033, 0x88ad9756, - 0x42e03ef9, 0x04db599c, 0x0b50fc1a, 0x4d6b9b7f, 0x872632d0, - 0xc11d55b5, 0x52bb1154, 0x14807631, 0xdecddf9e, 0x98f6b8fb, - 0xb9862787, 0xffbd40e2, 0x35f0e94d, 0x73cb8e28, 0xe06dcac9, - 0xa656adac, 0x6c1b0403, 0x2a206366, 0x2efb3afa, 0x68c05d9f, - 0xa28df430, 0xe4b69355, 0x7710d7b4, 0x312bb0d1, 0xfb66197e, - 0xbd5d7e1b, 0x9c2de167, 0xda168602, 0x105b2fad, 0x566048c8, - 0xc5c60c29, 0x83fd6b4c, 0x49b0c2e3, 0x0f8ba586, 0x16a0f835, - 0x509b9f50, 0x9ad636ff, 0xdced519a, 0x4f4b157b, 0x0970721e, - 0xc33ddbb1, 0x8506bcd4, 0xa47623a8, 0xe24d44cd, 0x2800ed62, - 0x6e3b8a07, 0xfd9dcee6, 0xbba6a983, 0x71eb002c, 0x37d06749, - 0x330b3ed5, 0x753059b0, 0xbf7df01f, 0xf946977a, 0x6ae0d39b, - 0x2cdbb4fe, 0xe6961d51, 0xa0ad7a34, 0x81dde548, 0xc7e6822d, - 0x0dab2b82, 0x4b904ce7, 0xd8360806, 0x9e0d6f63, 0x5440c6cc, - 0x127ba1a9, 0x1df0042f, 0x5bcb634a, 0x9186cae5, 0xd7bdad80, - 0x441be961, 0x02208e04, 0xc86d27ab, 0x8e5640ce, 0xaf26dfb2, - 0xe91db8d7, 0x23501178, 0x656b761d, 0xf6cd32fc, 0xb0f65599, - 0x7abbfc36, 0x3c809b53, 0x385bc2cf, 0x7e60a5aa, 0xb42d0c05, - 0xf2166b60, 0x61b02f81, 0x278b48e4, 0xedc6e14b, 0xabfd862e, - 0x8a8d1952, 0xccb67e37, 0x06fbd798, 0x40c0b0fd, 0xd366f41c, - 0x955d9379, 0x5f103ad6, 0x192b5db3, 0x2c40f16b, 0x6a7b960e, - 0xa0363fa1, 0xe60d58c4, 0x75ab1c25, 0x33907b40, 0xf9ddd2ef, - 0xbfe6b58a, 0x9e962af6, 0xd8ad4d93, 0x12e0e43c, 0x54db8359, - 0xc77dc7b8, 0x8146a0dd, 0x4b0b0972, 0x0d306e17, 0x09eb378b, - 0x4fd050ee, 0x859df941, 0xc3a69e24, 0x5000dac5, 0x163bbda0, - 0xdc76140f, 0x9a4d736a, 0xbb3dec16, 0xfd068b73, 0x374b22dc, - 0x717045b9, 0xe2d60158, 0xa4ed663d, 0x6ea0cf92, 0x289ba8f7, - 0x27100d71, 0x612b6a14, 0xab66c3bb, 0xed5da4de, 0x7efbe03f, - 0x38c0875a, 0xf28d2ef5, 0xb4b64990, 0x95c6d6ec, 0xd3fdb189, - 0x19b01826, 0x5f8b7f43, 0xcc2d3ba2, 0x8a165cc7, 0x405bf568, - 0x0660920d, 0x02bbcb91, 0x4480acf4, 0x8ecd055b, 0xc8f6623e, - 0x5b5026df, 0x1d6b41ba, 0xd726e815, 0x911d8f70, 0xb06d100c, - 0xf6567769, 0x3c1bdec6, 0x7a20b9a3, 0xe986fd42, 0xafbd9a27, - 0x65f03388, 0x23cb54ed, 0x3ae0095e, 0x7cdb6e3b, 0xb696c794, - 0xf0ada0f1, 0x630be410, 0x25308375, 0xef7d2ada, 0xa9464dbf, - 0x8836d2c3, 0xce0db5a6, 0x04401c09, 0x427b7b6c, 0xd1dd3f8d, - 0x97e658e8, 0x5dabf147, 0x1b909622, 0x1f4bcfbe, 0x5970a8db, - 0x933d0174, 0xd5066611, 0x46a022f0, 0x009b4595, 0xcad6ec3a, - 0x8ced8b5f, 0xad9d1423, 0xeba67346, 0x21ebdae9, 0x67d0bd8c, - 0xf476f96d, 0xb24d9e08, 0x780037a7, 0x3e3b50c2, 0x31b0f544, - 0x778b9221, 0xbdc63b8e, 0xfbfd5ceb, 0x685b180a, 0x2e607f6f, - 0xe42dd6c0, 0xa216b1a5, 0x83662ed9, 0xc55d49bc, 0x0f10e013, - 0x492b8776, 0xda8dc397, 0x9cb6a4f2, 0x56fb0d5d, 0x10c06a38, - 0x141b33a4, 0x522054c1, 0x986dfd6e, 0xde569a0b, 0x4df0deea, - 0x0bcbb98f, 0xc1861020, 0x87bd7745, 0xa6cde839, 0xe0f68f5c, - 0x2abb26f3, 0x6c804196, 0xff260577, 0xb91d6212, 0x7350cbbd, - 0x356bacd8}}; - -#endif - -#endif - -#if N == 6 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0x3db1ecdc, 0x7b63d9b8, 0x46d23564, 0xf6c7b370, - 0xcb765fac, 0x8da46ac8, 0xb0158614, 0x36fe60a1, 0x0b4f8c7d, - 0x4d9db919, 0x702c55c5, 0xc039d3d1, 0xfd883f0d, 0xbb5a0a69, - 0x86ebe6b5, 0x6dfcc142, 0x504d2d9e, 0x169f18fa, 0x2b2ef426, - 0x9b3b7232, 0xa68a9eee, 0xe058ab8a, 0xdde94756, 0x5b02a1e3, - 0x66b34d3f, 0x2061785b, 0x1dd09487, 0xadc51293, 0x9074fe4f, - 0xd6a6cb2b, 0xeb1727f7, 0xdbf98284, 0xe6486e58, 0xa09a5b3c, - 0x9d2bb7e0, 0x2d3e31f4, 0x108fdd28, 0x565de84c, 0x6bec0490, - 0xed07e225, 0xd0b60ef9, 0x96643b9d, 0xabd5d741, 0x1bc05155, - 0x2671bd89, 0x60a388ed, 0x5d126431, 0xb60543c6, 0x8bb4af1a, - 0xcd669a7e, 0xf0d776a2, 0x40c2f0b6, 0x7d731c6a, 0x3ba1290e, - 0x0610c5d2, 0x80fb2367, 0xbd4acfbb, 0xfb98fadf, 0xc6291603, - 0x763c9017, 0x4b8d7ccb, 0x0d5f49af, 0x30eea573, 0x6c820349, - 0x5133ef95, 0x17e1daf1, 0x2a50362d, 0x9a45b039, 0xa7f45ce5, - 0xe1266981, 0xdc97855d, 0x5a7c63e8, 0x67cd8f34, 0x211fba50, - 0x1cae568c, 0xacbbd098, 0x910a3c44, 0xd7d80920, 0xea69e5fc, - 0x017ec20b, 0x3ccf2ed7, 0x7a1d1bb3, 0x47acf76f, 0xf7b9717b, - 0xca089da7, 0x8cdaa8c3, 0xb16b441f, 0x3780a2aa, 0x0a314e76, - 0x4ce37b12, 0x715297ce, 0xc14711da, 0xfcf6fd06, 0xba24c862, - 0x879524be, 0xb77b81cd, 0x8aca6d11, 0xcc185875, 0xf1a9b4a9, - 0x41bc32bd, 0x7c0dde61, 0x3adfeb05, 0x076e07d9, 0x8185e16c, - 0xbc340db0, 0xfae638d4, 0xc757d408, 0x7742521c, 0x4af3bec0, - 0x0c218ba4, 0x31906778, 0xda87408f, 0xe736ac53, 0xa1e49937, - 0x9c5575eb, 0x2c40f3ff, 0x11f11f23, 0x57232a47, 0x6a92c69b, - 0xec79202e, 0xd1c8ccf2, 0x971af996, 0xaaab154a, 0x1abe935e, - 0x270f7f82, 0x61dd4ae6, 0x5c6ca63a, 0xd9040692, 0xe4b5ea4e, - 0xa267df2a, 0x9fd633f6, 0x2fc3b5e2, 0x1272593e, 0x54a06c5a, - 0x69118086, 0xeffa6633, 0xd24b8aef, 0x9499bf8b, 0xa9285357, - 0x193dd543, 0x248c399f, 0x625e0cfb, 0x5fefe027, 0xb4f8c7d0, - 0x89492b0c, 0xcf9b1e68, 0xf22af2b4, 0x423f74a0, 0x7f8e987c, - 0x395cad18, 0x04ed41c4, 0x8206a771, 0xbfb74bad, 0xf9657ec9, - 0xc4d49215, 0x74c11401, 0x4970f8dd, 0x0fa2cdb9, 0x32132165, - 0x02fd8416, 0x3f4c68ca, 0x799e5dae, 0x442fb172, 0xf43a3766, - 0xc98bdbba, 0x8f59eede, 0xb2e80202, 0x3403e4b7, 0x09b2086b, - 0x4f603d0f, 0x72d1d1d3, 0xc2c457c7, 0xff75bb1b, 0xb9a78e7f, - 0x841662a3, 0x6f014554, 0x52b0a988, 0x14629cec, 0x29d37030, - 0x99c6f624, 0xa4771af8, 0xe2a52f9c, 0xdf14c340, 0x59ff25f5, - 0x644ec929, 0x229cfc4d, 0x1f2d1091, 0xaf389685, 0x92897a59, - 0xd45b4f3d, 0xe9eaa3e1, 0xb58605db, 0x8837e907, 0xcee5dc63, - 0xf35430bf, 0x4341b6ab, 0x7ef05a77, 0x38226f13, 0x059383cf, - 0x8378657a, 0xbec989a6, 0xf81bbcc2, 0xc5aa501e, 0x75bfd60a, - 0x480e3ad6, 0x0edc0fb2, 0x336de36e, 0xd87ac499, 0xe5cb2845, - 0xa3191d21, 0x9ea8f1fd, 0x2ebd77e9, 0x130c9b35, 0x55deae51, - 0x686f428d, 0xee84a438, 0xd33548e4, 0x95e77d80, 0xa856915c, - 0x18431748, 0x25f2fb94, 0x6320cef0, 0x5e91222c, 0x6e7f875f, - 0x53ce6b83, 0x151c5ee7, 0x28adb23b, 0x98b8342f, 0xa509d8f3, - 0xe3dbed97, 0xde6a014b, 0x5881e7fe, 0x65300b22, 0x23e23e46, - 0x1e53d29a, 0xae46548e, 0x93f7b852, 0xd5258d36, 0xe89461ea, - 0x0383461d, 0x3e32aac1, 0x78e09fa5, 0x45517379, 0xf544f56d, - 0xc8f519b1, 0x8e272cd5, 0xb396c009, 0x357d26bc, 0x08ccca60, - 0x4e1eff04, 0x73af13d8, 0xc3ba95cc, 0xfe0b7910, 0xb8d94c74, - 0x8568a0a8}, - {0x00000000, 0x69790b65, 0xd2f216ca, 0xbb8b1daf, 0x7e952bd5, - 0x17ec20b0, 0xac673d1f, 0xc51e367a, 0xfd2a57aa, 0x94535ccf, - 0x2fd84160, 0x46a14a05, 0x83bf7c7f, 0xeac6771a, 0x514d6ab5, - 0x383461d0, 0x2125a915, 0x485ca270, 0xf3d7bfdf, 0x9aaeb4ba, - 0x5fb082c0, 0x36c989a5, 0x8d42940a, 0xe43b9f6f, 0xdc0ffebf, - 0xb576f5da, 0x0efde875, 0x6784e310, 0xa29ad56a, 0xcbe3de0f, - 0x7068c3a0, 0x1911c8c5, 0x424b522a, 0x2b32594f, 0x90b944e0, - 0xf9c04f85, 0x3cde79ff, 0x55a7729a, 0xee2c6f35, 0x87556450, - 0xbf610580, 0xd6180ee5, 0x6d93134a, 0x04ea182f, 0xc1f42e55, - 0xa88d2530, 0x1306389f, 0x7a7f33fa, 0x636efb3f, 0x0a17f05a, - 0xb19cedf5, 0xd8e5e690, 0x1dfbd0ea, 0x7482db8f, 0xcf09c620, - 0xa670cd45, 0x9e44ac95, 0xf73da7f0, 0x4cb6ba5f, 0x25cfb13a, - 0xe0d18740, 0x89a88c25, 0x3223918a, 0x5b5a9aef, 0x8496a454, - 0xedefaf31, 0x5664b29e, 0x3f1db9fb, 0xfa038f81, 0x937a84e4, - 0x28f1994b, 0x4188922e, 0x79bcf3fe, 0x10c5f89b, 0xab4ee534, - 0xc237ee51, 0x0729d82b, 0x6e50d34e, 0xd5dbcee1, 0xbca2c584, - 0xa5b30d41, 0xccca0624, 0x77411b8b, 0x1e3810ee, 0xdb262694, - 0xb25f2df1, 0x09d4305e, 0x60ad3b3b, 0x58995aeb, 0x31e0518e, - 0x8a6b4c21, 0xe3124744, 0x260c713e, 0x4f757a5b, 0xf4fe67f4, - 0x9d876c91, 0xc6ddf67e, 0xafa4fd1b, 0x142fe0b4, 0x7d56ebd1, - 0xb848ddab, 0xd131d6ce, 0x6abacb61, 0x03c3c004, 0x3bf7a1d4, - 0x528eaab1, 0xe905b71e, 0x807cbc7b, 0x45628a01, 0x2c1b8164, - 0x97909ccb, 0xfee997ae, 0xe7f85f6b, 0x8e81540e, 0x350a49a1, - 0x5c7342c4, 0x996d74be, 0xf0147fdb, 0x4b9f6274, 0x22e66911, - 0x1ad208c1, 0x73ab03a4, 0xc8201e0b, 0xa159156e, 0x64472314, - 0x0d3e2871, 0xb6b535de, 0xdfcc3ebb, 0xd25c4ee9, 0xbb25458c, - 0x00ae5823, 0x69d75346, 0xacc9653c, 0xc5b06e59, 0x7e3b73f6, - 0x17427893, 0x2f761943, 0x460f1226, 0xfd840f89, 0x94fd04ec, - 0x51e33296, 0x389a39f3, 0x8311245c, 0xea682f39, 0xf379e7fc, - 0x9a00ec99, 0x218bf136, 0x48f2fa53, 0x8deccc29, 0xe495c74c, - 0x5f1edae3, 0x3667d186, 0x0e53b056, 0x672abb33, 0xdca1a69c, - 0xb5d8adf9, 0x70c69b83, 0x19bf90e6, 0xa2348d49, 0xcb4d862c, - 0x90171cc3, 0xf96e17a6, 0x42e50a09, 0x2b9c016c, 0xee823716, - 0x87fb3c73, 0x3c7021dc, 0x55092ab9, 0x6d3d4b69, 0x0444400c, - 0xbfcf5da3, 0xd6b656c6, 0x13a860bc, 0x7ad16bd9, 0xc15a7676, - 0xa8237d13, 0xb132b5d6, 0xd84bbeb3, 0x63c0a31c, 0x0ab9a879, - 0xcfa79e03, 0xa6de9566, 0x1d5588c9, 0x742c83ac, 0x4c18e27c, - 0x2561e919, 0x9eeaf4b6, 0xf793ffd3, 0x328dc9a9, 0x5bf4c2cc, - 0xe07fdf63, 0x8906d406, 0x56caeabd, 0x3fb3e1d8, 0x8438fc77, - 0xed41f712, 0x285fc168, 0x4126ca0d, 0xfaadd7a2, 0x93d4dcc7, - 0xabe0bd17, 0xc299b672, 0x7912abdd, 0x106ba0b8, 0xd57596c2, - 0xbc0c9da7, 0x07878008, 0x6efe8b6d, 0x77ef43a8, 0x1e9648cd, - 0xa51d5562, 0xcc645e07, 0x097a687d, 0x60036318, 0xdb887eb7, - 0xb2f175d2, 0x8ac51402, 0xe3bc1f67, 0x583702c8, 0x314e09ad, - 0xf4503fd7, 0x9d2934b2, 0x26a2291d, 0x4fdb2278, 0x1481b897, - 0x7df8b3f2, 0xc673ae5d, 0xaf0aa538, 0x6a149342, 0x036d9827, - 0xb8e68588, 0xd19f8eed, 0xe9abef3d, 0x80d2e458, 0x3b59f9f7, - 0x5220f292, 0x973ec4e8, 0xfe47cf8d, 0x45ccd222, 0x2cb5d947, - 0x35a41182, 0x5cdd1ae7, 0xe7560748, 0x8e2f0c2d, 0x4b313a57, - 0x22483132, 0x99c32c9d, 0xf0ba27f8, 0xc88e4628, 0xa1f74d4d, - 0x1a7c50e2, 0x73055b87, 0xb61b6dfd, 0xdf626698, 0x64e97b37, - 0x0d907052}, - {0x00000000, 0x7fc99b93, 0xff933726, 0x805aacb5, 0x2457680d, - 0x5b9ef39e, 0xdbc45f2b, 0xa40dc4b8, 0x48aed01a, 0x37674b89, - 0xb73de73c, 0xc8f47caf, 0x6cf9b817, 0x13302384, 0x936a8f31, - 0xeca314a2, 0x915da034, 0xee943ba7, 0x6ece9712, 0x11070c81, - 0xb50ac839, 0xcac353aa, 0x4a99ff1f, 0x3550648c, 0xd9f3702e, - 0xa63aebbd, 0x26604708, 0x59a9dc9b, 0xfda41823, 0x826d83b0, - 0x02372f05, 0x7dfeb496, 0xf9ca4629, 0x8603ddba, 0x0659710f, - 0x7990ea9c, 0xdd9d2e24, 0xa254b5b7, 0x220e1902, 0x5dc78291, - 0xb1649633, 0xcead0da0, 0x4ef7a115, 0x313e3a86, 0x9533fe3e, - 0xeafa65ad, 0x6aa0c918, 0x1569528b, 0x6897e61d, 0x175e7d8e, - 0x9704d13b, 0xe8cd4aa8, 0x4cc08e10, 0x33091583, 0xb353b936, - 0xcc9a22a5, 0x20393607, 0x5ff0ad94, 0xdfaa0121, 0xa0639ab2, - 0x046e5e0a, 0x7ba7c599, 0xfbfd692c, 0x8434f2bf, 0x28e58a13, - 0x572c1180, 0xd776bd35, 0xa8bf26a6, 0x0cb2e21e, 0x737b798d, - 0xf321d538, 0x8ce84eab, 0x604b5a09, 0x1f82c19a, 0x9fd86d2f, - 0xe011f6bc, 0x441c3204, 0x3bd5a997, 0xbb8f0522, 0xc4469eb1, - 0xb9b82a27, 0xc671b1b4, 0x462b1d01, 0x39e28692, 0x9def422a, - 0xe226d9b9, 0x627c750c, 0x1db5ee9f, 0xf116fa3d, 0x8edf61ae, - 0x0e85cd1b, 0x714c5688, 0xd5419230, 0xaa8809a3, 0x2ad2a516, - 0x551b3e85, 0xd12fcc3a, 0xaee657a9, 0x2ebcfb1c, 0x5175608f, - 0xf578a437, 0x8ab13fa4, 0x0aeb9311, 0x75220882, 0x99811c20, - 0xe64887b3, 0x66122b06, 0x19dbb095, 0xbdd6742d, 0xc21fefbe, - 0x4245430b, 0x3d8cd898, 0x40726c0e, 0x3fbbf79d, 0xbfe15b28, - 0xc028c0bb, 0x64250403, 0x1bec9f90, 0x9bb63325, 0xe47fa8b6, - 0x08dcbc14, 0x77152787, 0xf74f8b32, 0x888610a1, 0x2c8bd419, - 0x53424f8a, 0xd318e33f, 0xacd178ac, 0x51cb1426, 0x2e028fb5, - 0xae582300, 0xd191b893, 0x759c7c2b, 0x0a55e7b8, 0x8a0f4b0d, - 0xf5c6d09e, 0x1965c43c, 0x66ac5faf, 0xe6f6f31a, 0x993f6889, - 0x3d32ac31, 0x42fb37a2, 0xc2a19b17, 0xbd680084, 0xc096b412, - 0xbf5f2f81, 0x3f058334, 0x40cc18a7, 0xe4c1dc1f, 0x9b08478c, - 0x1b52eb39, 0x649b70aa, 0x88386408, 0xf7f1ff9b, 0x77ab532e, - 0x0862c8bd, 0xac6f0c05, 0xd3a69796, 0x53fc3b23, 0x2c35a0b0, - 0xa801520f, 0xd7c8c99c, 0x57926529, 0x285bfeba, 0x8c563a02, - 0xf39fa191, 0x73c50d24, 0x0c0c96b7, 0xe0af8215, 0x9f661986, - 0x1f3cb533, 0x60f52ea0, 0xc4f8ea18, 0xbb31718b, 0x3b6bdd3e, - 0x44a246ad, 0x395cf23b, 0x469569a8, 0xc6cfc51d, 0xb9065e8e, - 0x1d0b9a36, 0x62c201a5, 0xe298ad10, 0x9d513683, 0x71f22221, - 0x0e3bb9b2, 0x8e611507, 0xf1a88e94, 0x55a54a2c, 0x2a6cd1bf, - 0xaa367d0a, 0xd5ffe699, 0x792e9e35, 0x06e705a6, 0x86bda913, - 0xf9743280, 0x5d79f638, 0x22b06dab, 0xa2eac11e, 0xdd235a8d, - 0x31804e2f, 0x4e49d5bc, 0xce137909, 0xb1dae29a, 0x15d72622, - 0x6a1ebdb1, 0xea441104, 0x958d8a97, 0xe8733e01, 0x97baa592, - 0x17e00927, 0x682992b4, 0xcc24560c, 0xb3edcd9f, 0x33b7612a, - 0x4c7efab9, 0xa0ddee1b, 0xdf147588, 0x5f4ed93d, 0x208742ae, - 0x848a8616, 0xfb431d85, 0x7b19b130, 0x04d02aa3, 0x80e4d81c, - 0xff2d438f, 0x7f77ef3a, 0x00be74a9, 0xa4b3b011, 0xdb7a2b82, - 0x5b208737, 0x24e91ca4, 0xc84a0806, 0xb7839395, 0x37d93f20, - 0x4810a4b3, 0xec1d600b, 0x93d4fb98, 0x138e572d, 0x6c47ccbe, - 0x11b97828, 0x6e70e3bb, 0xee2a4f0e, 0x91e3d49d, 0x35ee1025, - 0x4a278bb6, 0xca7d2703, 0xb5b4bc90, 0x5917a832, 0x26de33a1, - 0xa6849f14, 0xd94d0487, 0x7d40c03f, 0x02895bac, 0x82d3f719, - 0xfd1a6c8a}, - {0x00000000, 0xa396284c, 0x9c5d56d9, 0x3fcb7e95, 0xe3cbabf3, - 0x405d83bf, 0x7f96fd2a, 0xdc00d566, 0x1ce651a7, 0xbf7079eb, - 0x80bb077e, 0x232d2f32, 0xff2dfa54, 0x5cbbd218, 0x6370ac8d, - 0xc0e684c1, 0x39cca34e, 0x9a5a8b02, 0xa591f597, 0x0607dddb, - 0xda0708bd, 0x799120f1, 0x465a5e64, 0xe5cc7628, 0x252af2e9, - 0x86bcdaa5, 0xb977a430, 0x1ae18c7c, 0xc6e1591a, 0x65777156, - 0x5abc0fc3, 0xf92a278f, 0x7399469c, 0xd00f6ed0, 0xefc41045, - 0x4c523809, 0x9052ed6f, 0x33c4c523, 0x0c0fbbb6, 0xaf9993fa, - 0x6f7f173b, 0xcce93f77, 0xf32241e2, 0x50b469ae, 0x8cb4bcc8, - 0x2f229484, 0x10e9ea11, 0xb37fc25d, 0x4a55e5d2, 0xe9c3cd9e, - 0xd608b30b, 0x759e9b47, 0xa99e4e21, 0x0a08666d, 0x35c318f8, - 0x965530b4, 0x56b3b475, 0xf5259c39, 0xcaeee2ac, 0x6978cae0, - 0xb5781f86, 0x16ee37ca, 0x2925495f, 0x8ab36113, 0xe7328d38, - 0x44a4a574, 0x7b6fdbe1, 0xd8f9f3ad, 0x04f926cb, 0xa76f0e87, - 0x98a47012, 0x3b32585e, 0xfbd4dc9f, 0x5842f4d3, 0x67898a46, - 0xc41fa20a, 0x181f776c, 0xbb895f20, 0x844221b5, 0x27d409f9, - 0xdefe2e76, 0x7d68063a, 0x42a378af, 0xe13550e3, 0x3d358585, - 0x9ea3adc9, 0xa168d35c, 0x02fefb10, 0xc2187fd1, 0x618e579d, - 0x5e452908, 0xfdd30144, 0x21d3d422, 0x8245fc6e, 0xbd8e82fb, - 0x1e18aab7, 0x94abcba4, 0x373de3e8, 0x08f69d7d, 0xab60b531, - 0x77606057, 0xd4f6481b, 0xeb3d368e, 0x48ab1ec2, 0x884d9a03, - 0x2bdbb24f, 0x1410ccda, 0xb786e496, 0x6b8631f0, 0xc81019bc, - 0xf7db6729, 0x544d4f65, 0xad6768ea, 0x0ef140a6, 0x313a3e33, - 0x92ac167f, 0x4eacc319, 0xed3aeb55, 0xd2f195c0, 0x7167bd8c, - 0xb181394d, 0x12171101, 0x2ddc6f94, 0x8e4a47d8, 0x524a92be, - 0xf1dcbaf2, 0xce17c467, 0x6d81ec2b, 0x15141c31, 0xb682347d, - 0x89494ae8, 0x2adf62a4, 0xf6dfb7c2, 0x55499f8e, 0x6a82e11b, - 0xc914c957, 0x09f24d96, 0xaa6465da, 0x95af1b4f, 0x36393303, - 0xea39e665, 0x49afce29, 0x7664b0bc, 0xd5f298f0, 0x2cd8bf7f, - 0x8f4e9733, 0xb085e9a6, 0x1313c1ea, 0xcf13148c, 0x6c853cc0, - 0x534e4255, 0xf0d86a19, 0x303eeed8, 0x93a8c694, 0xac63b801, - 0x0ff5904d, 0xd3f5452b, 0x70636d67, 0x4fa813f2, 0xec3e3bbe, - 0x668d5aad, 0xc51b72e1, 0xfad00c74, 0x59462438, 0x8546f15e, - 0x26d0d912, 0x191ba787, 0xba8d8fcb, 0x7a6b0b0a, 0xd9fd2346, - 0xe6365dd3, 0x45a0759f, 0x99a0a0f9, 0x3a3688b5, 0x05fdf620, - 0xa66bde6c, 0x5f41f9e3, 0xfcd7d1af, 0xc31caf3a, 0x608a8776, - 0xbc8a5210, 0x1f1c7a5c, 0x20d704c9, 0x83412c85, 0x43a7a844, - 0xe0318008, 0xdffafe9d, 0x7c6cd6d1, 0xa06c03b7, 0x03fa2bfb, - 0x3c31556e, 0x9fa77d22, 0xf2269109, 0x51b0b945, 0x6e7bc7d0, - 0xcdedef9c, 0x11ed3afa, 0xb27b12b6, 0x8db06c23, 0x2e26446f, - 0xeec0c0ae, 0x4d56e8e2, 0x729d9677, 0xd10bbe3b, 0x0d0b6b5d, - 0xae9d4311, 0x91563d84, 0x32c015c8, 0xcbea3247, 0x687c1a0b, - 0x57b7649e, 0xf4214cd2, 0x282199b4, 0x8bb7b1f8, 0xb47ccf6d, - 0x17eae721, 0xd70c63e0, 0x749a4bac, 0x4b513539, 0xe8c71d75, - 0x34c7c813, 0x9751e05f, 0xa89a9eca, 0x0b0cb686, 0x81bfd795, - 0x2229ffd9, 0x1de2814c, 0xbe74a900, 0x62747c66, 0xc1e2542a, - 0xfe292abf, 0x5dbf02f3, 0x9d598632, 0x3ecfae7e, 0x0104d0eb, - 0xa292f8a7, 0x7e922dc1, 0xdd04058d, 0xe2cf7b18, 0x41595354, - 0xb87374db, 0x1be55c97, 0x242e2202, 0x87b80a4e, 0x5bb8df28, - 0xf82ef764, 0xc7e589f1, 0x6473a1bd, 0xa495257c, 0x07030d30, - 0x38c873a5, 0x9b5e5be9, 0x475e8e8f, 0xe4c8a6c3, 0xdb03d856, - 0x7895f01a}, - {0x00000000, 0x2a283862, 0x545070c4, 0x7e7848a6, 0xa8a0e188, - 0x8288d9ea, 0xfcf0914c, 0xd6d8a92e, 0x8a30c551, 0xa018fd33, - 0xde60b595, 0xf4488df7, 0x229024d9, 0x08b81cbb, 0x76c0541d, - 0x5ce86c7f, 0xcf108ce3, 0xe538b481, 0x9b40fc27, 0xb168c445, - 0x67b06d6b, 0x4d985509, 0x33e01daf, 0x19c825cd, 0x452049b2, - 0x6f0871d0, 0x11703976, 0x3b580114, 0xed80a83a, 0xc7a89058, - 0xb9d0d8fe, 0x93f8e09c, 0x45501f87, 0x6f7827e5, 0x11006f43, - 0x3b285721, 0xedf0fe0f, 0xc7d8c66d, 0xb9a08ecb, 0x9388b6a9, - 0xcf60dad6, 0xe548e2b4, 0x9b30aa12, 0xb1189270, 0x67c03b5e, - 0x4de8033c, 0x33904b9a, 0x19b873f8, 0x8a409364, 0xa068ab06, - 0xde10e3a0, 0xf438dbc2, 0x22e072ec, 0x08c84a8e, 0x76b00228, - 0x5c983a4a, 0x00705635, 0x2a586e57, 0x542026f1, 0x7e081e93, - 0xa8d0b7bd, 0x82f88fdf, 0xfc80c779, 0xd6a8ff1b, 0x8aa03f0e, - 0xa088076c, 0xdef04fca, 0xf4d877a8, 0x2200de86, 0x0828e6e4, - 0x7650ae42, 0x5c789620, 0x0090fa5f, 0x2ab8c23d, 0x54c08a9b, - 0x7ee8b2f9, 0xa8301bd7, 0x821823b5, 0xfc606b13, 0xd6485371, - 0x45b0b3ed, 0x6f988b8f, 0x11e0c329, 0x3bc8fb4b, 0xed105265, - 0xc7386a07, 0xb94022a1, 0x93681ac3, 0xcf8076bc, 0xe5a84ede, - 0x9bd00678, 0xb1f83e1a, 0x67209734, 0x4d08af56, 0x3370e7f0, - 0x1958df92, 0xcff02089, 0xe5d818eb, 0x9ba0504d, 0xb188682f, - 0x6750c101, 0x4d78f963, 0x3300b1c5, 0x192889a7, 0x45c0e5d8, - 0x6fe8ddba, 0x1190951c, 0x3bb8ad7e, 0xed600450, 0xc7483c32, - 0xb9307494, 0x93184cf6, 0x00e0ac6a, 0x2ac89408, 0x54b0dcae, - 0x7e98e4cc, 0xa8404de2, 0x82687580, 0xfc103d26, 0xd6380544, - 0x8ad0693b, 0xa0f85159, 0xde8019ff, 0xf4a8219d, 0x227088b3, - 0x0858b0d1, 0x7620f877, 0x5c08c015, 0xce31785d, 0xe419403f, - 0x9a610899, 0xb04930fb, 0x669199d5, 0x4cb9a1b7, 0x32c1e911, - 0x18e9d173, 0x4401bd0c, 0x6e29856e, 0x1051cdc8, 0x3a79f5aa, - 0xeca15c84, 0xc68964e6, 0xb8f12c40, 0x92d91422, 0x0121f4be, - 0x2b09ccdc, 0x5571847a, 0x7f59bc18, 0xa9811536, 0x83a92d54, - 0xfdd165f2, 0xd7f95d90, 0x8b1131ef, 0xa139098d, 0xdf41412b, - 0xf5697949, 0x23b1d067, 0x0999e805, 0x77e1a0a3, 0x5dc998c1, - 0x8b6167da, 0xa1495fb8, 0xdf31171e, 0xf5192f7c, 0x23c18652, - 0x09e9be30, 0x7791f696, 0x5db9cef4, 0x0151a28b, 0x2b799ae9, - 0x5501d24f, 0x7f29ea2d, 0xa9f14303, 0x83d97b61, 0xfda133c7, - 0xd7890ba5, 0x4471eb39, 0x6e59d35b, 0x10219bfd, 0x3a09a39f, - 0xecd10ab1, 0xc6f932d3, 0xb8817a75, 0x92a94217, 0xce412e68, - 0xe469160a, 0x9a115eac, 0xb03966ce, 0x66e1cfe0, 0x4cc9f782, - 0x32b1bf24, 0x18998746, 0x44914753, 0x6eb97f31, 0x10c13797, - 0x3ae90ff5, 0xec31a6db, 0xc6199eb9, 0xb861d61f, 0x9249ee7d, - 0xcea18202, 0xe489ba60, 0x9af1f2c6, 0xb0d9caa4, 0x6601638a, - 0x4c295be8, 0x3251134e, 0x18792b2c, 0x8b81cbb0, 0xa1a9f3d2, - 0xdfd1bb74, 0xf5f98316, 0x23212a38, 0x0909125a, 0x77715afc, - 0x5d59629e, 0x01b10ee1, 0x2b993683, 0x55e17e25, 0x7fc94647, - 0xa911ef69, 0x8339d70b, 0xfd419fad, 0xd769a7cf, 0x01c158d4, - 0x2be960b6, 0x55912810, 0x7fb91072, 0xa961b95c, 0x8349813e, - 0xfd31c998, 0xd719f1fa, 0x8bf19d85, 0xa1d9a5e7, 0xdfa1ed41, - 0xf589d523, 0x23517c0d, 0x0979446f, 0x77010cc9, 0x5d2934ab, - 0xced1d437, 0xe4f9ec55, 0x9a81a4f3, 0xb0a99c91, 0x667135bf, - 0x4c590ddd, 0x3221457b, 0x18097d19, 0x44e11166, 0x6ec92904, - 0x10b161a2, 0x3a9959c0, 0xec41f0ee, 0xc669c88c, 0xb811802a, - 0x9239b848}, - {0x00000000, 0x4713f6fb, 0x8e27edf6, 0xc9341b0d, 0xc73eddad, - 0x802d2b56, 0x4919305b, 0x0e0ac6a0, 0x550cbd1b, 0x121f4be0, - 0xdb2b50ed, 0x9c38a616, 0x923260b6, 0xd521964d, 0x1c158d40, - 0x5b067bbb, 0xaa197a36, 0xed0a8ccd, 0x243e97c0, 0x632d613b, - 0x6d27a79b, 0x2a345160, 0xe3004a6d, 0xa413bc96, 0xff15c72d, - 0xb80631d6, 0x71322adb, 0x3621dc20, 0x382b1a80, 0x7f38ec7b, - 0xb60cf776, 0xf11f018d, 0x8f43f22d, 0xc85004d6, 0x01641fdb, - 0x4677e920, 0x487d2f80, 0x0f6ed97b, 0xc65ac276, 0x8149348d, - 0xda4f4f36, 0x9d5cb9cd, 0x5468a2c0, 0x137b543b, 0x1d71929b, - 0x5a626460, 0x93567f6d, 0xd4458996, 0x255a881b, 0x62497ee0, - 0xab7d65ed, 0xec6e9316, 0xe26455b6, 0xa577a34d, 0x6c43b840, - 0x2b504ebb, 0x70563500, 0x3745c3fb, 0xfe71d8f6, 0xb9622e0d, - 0xb768e8ad, 0xf07b1e56, 0x394f055b, 0x7e5cf3a0, 0xc5f6e21b, - 0x82e514e0, 0x4bd10fed, 0x0cc2f916, 0x02c83fb6, 0x45dbc94d, - 0x8cefd240, 0xcbfc24bb, 0x90fa5f00, 0xd7e9a9fb, 0x1eddb2f6, - 0x59ce440d, 0x57c482ad, 0x10d77456, 0xd9e36f5b, 0x9ef099a0, - 0x6fef982d, 0x28fc6ed6, 0xe1c875db, 0xa6db8320, 0xa8d14580, - 0xefc2b37b, 0x26f6a876, 0x61e55e8d, 0x3ae32536, 0x7df0d3cd, - 0xb4c4c8c0, 0xf3d73e3b, 0xfdddf89b, 0xbace0e60, 0x73fa156d, - 0x34e9e396, 0x4ab51036, 0x0da6e6cd, 0xc492fdc0, 0x83810b3b, - 0x8d8bcd9b, 0xca983b60, 0x03ac206d, 0x44bfd696, 0x1fb9ad2d, - 0x58aa5bd6, 0x919e40db, 0xd68db620, 0xd8877080, 0x9f94867b, - 0x56a09d76, 0x11b36b8d, 0xe0ac6a00, 0xa7bf9cfb, 0x6e8b87f6, - 0x2998710d, 0x2792b7ad, 0x60814156, 0xa9b55a5b, 0xeea6aca0, - 0xb5a0d71b, 0xf2b321e0, 0x3b873aed, 0x7c94cc16, 0x729e0ab6, - 0x358dfc4d, 0xfcb9e740, 0xbbaa11bb, 0x509cc277, 0x178f348c, - 0xdebb2f81, 0x99a8d97a, 0x97a21fda, 0xd0b1e921, 0x1985f22c, - 0x5e9604d7, 0x05907f6c, 0x42838997, 0x8bb7929a, 0xcca46461, - 0xc2aea2c1, 0x85bd543a, 0x4c894f37, 0x0b9ab9cc, 0xfa85b841, - 0xbd964eba, 0x74a255b7, 0x33b1a34c, 0x3dbb65ec, 0x7aa89317, - 0xb39c881a, 0xf48f7ee1, 0xaf89055a, 0xe89af3a1, 0x21aee8ac, - 0x66bd1e57, 0x68b7d8f7, 0x2fa42e0c, 0xe6903501, 0xa183c3fa, - 0xdfdf305a, 0x98ccc6a1, 0x51f8ddac, 0x16eb2b57, 0x18e1edf7, - 0x5ff21b0c, 0x96c60001, 0xd1d5f6fa, 0x8ad38d41, 0xcdc07bba, - 0x04f460b7, 0x43e7964c, 0x4ded50ec, 0x0afea617, 0xc3cabd1a, - 0x84d94be1, 0x75c64a6c, 0x32d5bc97, 0xfbe1a79a, 0xbcf25161, - 0xb2f897c1, 0xf5eb613a, 0x3cdf7a37, 0x7bcc8ccc, 0x20caf777, - 0x67d9018c, 0xaeed1a81, 0xe9feec7a, 0xe7f42ada, 0xa0e7dc21, - 0x69d3c72c, 0x2ec031d7, 0x956a206c, 0xd279d697, 0x1b4dcd9a, - 0x5c5e3b61, 0x5254fdc1, 0x15470b3a, 0xdc731037, 0x9b60e6cc, - 0xc0669d77, 0x87756b8c, 0x4e417081, 0x0952867a, 0x075840da, - 0x404bb621, 0x897fad2c, 0xce6c5bd7, 0x3f735a5a, 0x7860aca1, - 0xb154b7ac, 0xf6474157, 0xf84d87f7, 0xbf5e710c, 0x766a6a01, - 0x31799cfa, 0x6a7fe741, 0x2d6c11ba, 0xe4580ab7, 0xa34bfc4c, - 0xad413aec, 0xea52cc17, 0x2366d71a, 0x647521e1, 0x1a29d241, - 0x5d3a24ba, 0x940e3fb7, 0xd31dc94c, 0xdd170fec, 0x9a04f917, - 0x5330e21a, 0x142314e1, 0x4f256f5a, 0x083699a1, 0xc10282ac, - 0x86117457, 0x881bb2f7, 0xcf08440c, 0x063c5f01, 0x412fa9fa, - 0xb030a877, 0xf7235e8c, 0x3e174581, 0x7904b37a, 0x770e75da, - 0x301d8321, 0xf929982c, 0xbe3a6ed7, 0xe53c156c, 0xa22fe397, - 0x6b1bf89a, 0x2c080e61, 0x2202c8c1, 0x65113e3a, 0xac252537, - 0xeb36d3cc}, - {0x00000000, 0xa13984ee, 0x99020f9d, 0x383b8b73, 0xe975197b, - 0x484c9d95, 0x707716e6, 0xd14e9208, 0x099b34b7, 0xa8a2b059, - 0x90993b2a, 0x31a0bfc4, 0xe0ee2dcc, 0x41d7a922, 0x79ec2251, - 0xd8d5a6bf, 0x1336696e, 0xb20fed80, 0x8a3466f3, 0x2b0de21d, - 0xfa437015, 0x5b7af4fb, 0x63417f88, 0xc278fb66, 0x1aad5dd9, - 0xbb94d937, 0x83af5244, 0x2296d6aa, 0xf3d844a2, 0x52e1c04c, - 0x6ada4b3f, 0xcbe3cfd1, 0x266cd2dc, 0x87555632, 0xbf6edd41, - 0x1e5759af, 0xcf19cba7, 0x6e204f49, 0x561bc43a, 0xf72240d4, - 0x2ff7e66b, 0x8ece6285, 0xb6f5e9f6, 0x17cc6d18, 0xc682ff10, - 0x67bb7bfe, 0x5f80f08d, 0xfeb97463, 0x355abbb2, 0x94633f5c, - 0xac58b42f, 0x0d6130c1, 0xdc2fa2c9, 0x7d162627, 0x452dad54, - 0xe41429ba, 0x3cc18f05, 0x9df80beb, 0xa5c38098, 0x04fa0476, - 0xd5b4967e, 0x748d1290, 0x4cb699e3, 0xed8f1d0d, 0x4cd9a5b8, - 0xede02156, 0xd5dbaa25, 0x74e22ecb, 0xa5acbcc3, 0x0495382d, - 0x3caeb35e, 0x9d9737b0, 0x4542910f, 0xe47b15e1, 0xdc409e92, - 0x7d791a7c, 0xac378874, 0x0d0e0c9a, 0x353587e9, 0x940c0307, - 0x5fefccd6, 0xfed64838, 0xc6edc34b, 0x67d447a5, 0xb69ad5ad, - 0x17a35143, 0x2f98da30, 0x8ea15ede, 0x5674f861, 0xf74d7c8f, - 0xcf76f7fc, 0x6e4f7312, 0xbf01e11a, 0x1e3865f4, 0x2603ee87, - 0x873a6a69, 0x6ab57764, 0xcb8cf38a, 0xf3b778f9, 0x528efc17, - 0x83c06e1f, 0x22f9eaf1, 0x1ac26182, 0xbbfbe56c, 0x632e43d3, - 0xc217c73d, 0xfa2c4c4e, 0x5b15c8a0, 0x8a5b5aa8, 0x2b62de46, - 0x13595535, 0xb260d1db, 0x79831e0a, 0xd8ba9ae4, 0xe0811197, - 0x41b89579, 0x90f60771, 0x31cf839f, 0x09f408ec, 0xa8cd8c02, - 0x70182abd, 0xd121ae53, 0xe91a2520, 0x4823a1ce, 0x996d33c6, - 0x3854b728, 0x006f3c5b, 0xa156b8b5, 0x99b34b70, 0x388acf9e, - 0x00b144ed, 0xa188c003, 0x70c6520b, 0xd1ffd6e5, 0xe9c45d96, - 0x48fdd978, 0x90287fc7, 0x3111fb29, 0x092a705a, 0xa813f4b4, - 0x795d66bc, 0xd864e252, 0xe05f6921, 0x4166edcf, 0x8a85221e, - 0x2bbca6f0, 0x13872d83, 0xb2bea96d, 0x63f03b65, 0xc2c9bf8b, - 0xfaf234f8, 0x5bcbb016, 0x831e16a9, 0x22279247, 0x1a1c1934, - 0xbb259dda, 0x6a6b0fd2, 0xcb528b3c, 0xf369004f, 0x525084a1, - 0xbfdf99ac, 0x1ee61d42, 0x26dd9631, 0x87e412df, 0x56aa80d7, - 0xf7930439, 0xcfa88f4a, 0x6e910ba4, 0xb644ad1b, 0x177d29f5, - 0x2f46a286, 0x8e7f2668, 0x5f31b460, 0xfe08308e, 0xc633bbfd, - 0x670a3f13, 0xace9f0c2, 0x0dd0742c, 0x35ebff5f, 0x94d27bb1, - 0x459ce9b9, 0xe4a56d57, 0xdc9ee624, 0x7da762ca, 0xa572c475, - 0x044b409b, 0x3c70cbe8, 0x9d494f06, 0x4c07dd0e, 0xed3e59e0, - 0xd505d293, 0x743c567d, 0xd56aeec8, 0x74536a26, 0x4c68e155, - 0xed5165bb, 0x3c1ff7b3, 0x9d26735d, 0xa51df82e, 0x04247cc0, - 0xdcf1da7f, 0x7dc85e91, 0x45f3d5e2, 0xe4ca510c, 0x3584c304, - 0x94bd47ea, 0xac86cc99, 0x0dbf4877, 0xc65c87a6, 0x67650348, - 0x5f5e883b, 0xfe670cd5, 0x2f299edd, 0x8e101a33, 0xb62b9140, - 0x171215ae, 0xcfc7b311, 0x6efe37ff, 0x56c5bc8c, 0xf7fc3862, - 0x26b2aa6a, 0x878b2e84, 0xbfb0a5f7, 0x1e892119, 0xf3063c14, - 0x523fb8fa, 0x6a043389, 0xcb3db767, 0x1a73256f, 0xbb4aa181, - 0x83712af2, 0x2248ae1c, 0xfa9d08a3, 0x5ba48c4d, 0x639f073e, - 0xc2a683d0, 0x13e811d8, 0xb2d19536, 0x8aea1e45, 0x2bd39aab, - 0xe030557a, 0x4109d194, 0x79325ae7, 0xd80bde09, 0x09454c01, - 0xa87cc8ef, 0x9047439c, 0x317ec772, 0xe9ab61cd, 0x4892e523, - 0x70a96e50, 0xd190eabe, 0x00de78b6, 0xa1e7fc58, 0x99dc772b, - 0x38e5f3c5}, - {0x00000000, 0xe81790a1, 0x0b5e2703, 0xe349b7a2, 0x16bc4e06, - 0xfeabdea7, 0x1de26905, 0xf5f5f9a4, 0x2d789c0c, 0xc56f0cad, - 0x2626bb0f, 0xce312bae, 0x3bc4d20a, 0xd3d342ab, 0x309af509, - 0xd88d65a8, 0x5af13818, 0xb2e6a8b9, 0x51af1f1b, 0xb9b88fba, - 0x4c4d761e, 0xa45ae6bf, 0x4713511d, 0xaf04c1bc, 0x7789a414, - 0x9f9e34b5, 0x7cd78317, 0x94c013b6, 0x6135ea12, 0x89227ab3, - 0x6a6bcd11, 0x827c5db0, 0xb5e27030, 0x5df5e091, 0xbebc5733, - 0x56abc792, 0xa35e3e36, 0x4b49ae97, 0xa8001935, 0x40178994, - 0x989aec3c, 0x708d7c9d, 0x93c4cb3f, 0x7bd35b9e, 0x8e26a23a, - 0x6631329b, 0x85788539, 0x6d6f1598, 0xef134828, 0x0704d889, - 0xe44d6f2b, 0x0c5aff8a, 0xf9af062e, 0x11b8968f, 0xf2f1212d, - 0x1ae6b18c, 0xc26bd424, 0x2a7c4485, 0xc935f327, 0x21226386, - 0xd4d79a22, 0x3cc00a83, 0xdf89bd21, 0x379e2d80, 0xb0b5e621, - 0x58a27680, 0xbbebc122, 0x53fc5183, 0xa609a827, 0x4e1e3886, - 0xad578f24, 0x45401f85, 0x9dcd7a2d, 0x75daea8c, 0x96935d2e, - 0x7e84cd8f, 0x8b71342b, 0x6366a48a, 0x802f1328, 0x68388389, - 0xea44de39, 0x02534e98, 0xe11af93a, 0x090d699b, 0xfcf8903f, - 0x14ef009e, 0xf7a6b73c, 0x1fb1279d, 0xc73c4235, 0x2f2bd294, - 0xcc626536, 0x2475f597, 0xd1800c33, 0x39979c92, 0xdade2b30, - 0x32c9bb91, 0x05579611, 0xed4006b0, 0x0e09b112, 0xe61e21b3, - 0x13ebd817, 0xfbfc48b6, 0x18b5ff14, 0xf0a26fb5, 0x282f0a1d, - 0xc0389abc, 0x23712d1e, 0xcb66bdbf, 0x3e93441b, 0xd684d4ba, - 0x35cd6318, 0xdddaf3b9, 0x5fa6ae09, 0xb7b13ea8, 0x54f8890a, - 0xbcef19ab, 0x491ae00f, 0xa10d70ae, 0x4244c70c, 0xaa5357ad, - 0x72de3205, 0x9ac9a2a4, 0x79801506, 0x919785a7, 0x64627c03, - 0x8c75eca2, 0x6f3c5b00, 0x872bcba1, 0xba1aca03, 0x520d5aa2, - 0xb144ed00, 0x59537da1, 0xaca68405, 0x44b114a4, 0xa7f8a306, - 0x4fef33a7, 0x9762560f, 0x7f75c6ae, 0x9c3c710c, 0x742be1ad, - 0x81de1809, 0x69c988a8, 0x8a803f0a, 0x6297afab, 0xe0ebf21b, - 0x08fc62ba, 0xebb5d518, 0x03a245b9, 0xf657bc1d, 0x1e402cbc, - 0xfd099b1e, 0x151e0bbf, 0xcd936e17, 0x2584feb6, 0xc6cd4914, - 0x2edad9b5, 0xdb2f2011, 0x3338b0b0, 0xd0710712, 0x386697b3, - 0x0ff8ba33, 0xe7ef2a92, 0x04a69d30, 0xecb10d91, 0x1944f435, - 0xf1536494, 0x121ad336, 0xfa0d4397, 0x2280263f, 0xca97b69e, - 0x29de013c, 0xc1c9919d, 0x343c6839, 0xdc2bf898, 0x3f624f3a, - 0xd775df9b, 0x5509822b, 0xbd1e128a, 0x5e57a528, 0xb6403589, - 0x43b5cc2d, 0xaba25c8c, 0x48ebeb2e, 0xa0fc7b8f, 0x78711e27, - 0x90668e86, 0x732f3924, 0x9b38a985, 0x6ecd5021, 0x86dac080, - 0x65937722, 0x8d84e783, 0x0aaf2c22, 0xe2b8bc83, 0x01f10b21, - 0xe9e69b80, 0x1c136224, 0xf404f285, 0x174d4527, 0xff5ad586, - 0x27d7b02e, 0xcfc0208f, 0x2c89972d, 0xc49e078c, 0x316bfe28, - 0xd97c6e89, 0x3a35d92b, 0xd222498a, 0x505e143a, 0xb849849b, - 0x5b003339, 0xb317a398, 0x46e25a3c, 0xaef5ca9d, 0x4dbc7d3f, - 0xa5abed9e, 0x7d268836, 0x95311897, 0x7678af35, 0x9e6f3f94, - 0x6b9ac630, 0x838d5691, 0x60c4e133, 0x88d37192, 0xbf4d5c12, - 0x575accb3, 0xb4137b11, 0x5c04ebb0, 0xa9f11214, 0x41e682b5, - 0xa2af3517, 0x4ab8a5b6, 0x9235c01e, 0x7a2250bf, 0x996be71d, - 0x717c77bc, 0x84898e18, 0x6c9e1eb9, 0x8fd7a91b, 0x67c039ba, - 0xe5bc640a, 0x0dabf4ab, 0xeee24309, 0x06f5d3a8, 0xf3002a0c, - 0x1b17baad, 0xf85e0d0f, 0x10499dae, 0xc8c4f806, 0x20d368a7, - 0xc39adf05, 0x2b8d4fa4, 0xde78b600, 0x366f26a1, 0xd5269103, - 0x3d3101a2}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0xa19017e800000000, 0x03275e0b00000000, - 0xa2b749e300000000, 0x064ebc1600000000, 0xa7deabfe00000000, - 0x0569e21d00000000, 0xa4f9f5f500000000, 0x0c9c782d00000000, - 0xad0c6fc500000000, 0x0fbb262600000000, 0xae2b31ce00000000, - 0x0ad2c43b00000000, 0xab42d3d300000000, 0x09f59a3000000000, - 0xa8658dd800000000, 0x1838f15a00000000, 0xb9a8e6b200000000, - 0x1b1faf5100000000, 0xba8fb8b900000000, 0x1e764d4c00000000, - 0xbfe65aa400000000, 0x1d51134700000000, 0xbcc104af00000000, - 0x14a4897700000000, 0xb5349e9f00000000, 0x1783d77c00000000, - 0xb613c09400000000, 0x12ea356100000000, 0xb37a228900000000, - 0x11cd6b6a00000000, 0xb05d7c8200000000, 0x3070e2b500000000, - 0x91e0f55d00000000, 0x3357bcbe00000000, 0x92c7ab5600000000, - 0x363e5ea300000000, 0x97ae494b00000000, 0x351900a800000000, - 0x9489174000000000, 0x3cec9a9800000000, 0x9d7c8d7000000000, - 0x3fcbc49300000000, 0x9e5bd37b00000000, 0x3aa2268e00000000, - 0x9b32316600000000, 0x3985788500000000, 0x98156f6d00000000, - 0x284813ef00000000, 0x89d8040700000000, 0x2b6f4de400000000, - 0x8aff5a0c00000000, 0x2e06aff900000000, 0x8f96b81100000000, - 0x2d21f1f200000000, 0x8cb1e61a00000000, 0x24d46bc200000000, - 0x85447c2a00000000, 0x27f335c900000000, 0x8663222100000000, - 0x229ad7d400000000, 0x830ac03c00000000, 0x21bd89df00000000, - 0x802d9e3700000000, 0x21e6b5b000000000, 0x8076a25800000000, - 0x22c1ebbb00000000, 0x8351fc5300000000, 0x27a809a600000000, - 0x86381e4e00000000, 0x248f57ad00000000, 0x851f404500000000, - 0x2d7acd9d00000000, 0x8ceada7500000000, 0x2e5d939600000000, - 0x8fcd847e00000000, 0x2b34718b00000000, 0x8aa4666300000000, - 0x28132f8000000000, 0x8983386800000000, 0x39de44ea00000000, - 0x984e530200000000, 0x3af91ae100000000, 0x9b690d0900000000, - 0x3f90f8fc00000000, 0x9e00ef1400000000, 0x3cb7a6f700000000, - 0x9d27b11f00000000, 0x35423cc700000000, 0x94d22b2f00000000, - 0x366562cc00000000, 0x97f5752400000000, 0x330c80d100000000, - 0x929c973900000000, 0x302bdeda00000000, 0x91bbc93200000000, - 0x1196570500000000, 0xb00640ed00000000, 0x12b1090e00000000, - 0xb3211ee600000000, 0x17d8eb1300000000, 0xb648fcfb00000000, - 0x14ffb51800000000, 0xb56fa2f000000000, 0x1d0a2f2800000000, - 0xbc9a38c000000000, 0x1e2d712300000000, 0xbfbd66cb00000000, - 0x1b44933e00000000, 0xbad484d600000000, 0x1863cd3500000000, - 0xb9f3dadd00000000, 0x09aea65f00000000, 0xa83eb1b700000000, - 0x0a89f85400000000, 0xab19efbc00000000, 0x0fe01a4900000000, - 0xae700da100000000, 0x0cc7444200000000, 0xad5753aa00000000, - 0x0532de7200000000, 0xa4a2c99a00000000, 0x0615807900000000, - 0xa785979100000000, 0x037c626400000000, 0xa2ec758c00000000, - 0x005b3c6f00000000, 0xa1cb2b8700000000, 0x03ca1aba00000000, - 0xa25a0d5200000000, 0x00ed44b100000000, 0xa17d535900000000, - 0x0584a6ac00000000, 0xa414b14400000000, 0x06a3f8a700000000, - 0xa733ef4f00000000, 0x0f56629700000000, 0xaec6757f00000000, - 0x0c713c9c00000000, 0xade12b7400000000, 0x0918de8100000000, - 0xa888c96900000000, 0x0a3f808a00000000, 0xabaf976200000000, - 0x1bf2ebe000000000, 0xba62fc0800000000, 0x18d5b5eb00000000, - 0xb945a20300000000, 0x1dbc57f600000000, 0xbc2c401e00000000, - 0x1e9b09fd00000000, 0xbf0b1e1500000000, 0x176e93cd00000000, - 0xb6fe842500000000, 0x1449cdc600000000, 0xb5d9da2e00000000, - 0x11202fdb00000000, 0xb0b0383300000000, 0x120771d000000000, - 0xb397663800000000, 0x33baf80f00000000, 0x922aefe700000000, - 0x309da60400000000, 0x910db1ec00000000, 0x35f4441900000000, - 0x946453f100000000, 0x36d31a1200000000, 0x97430dfa00000000, - 0x3f26802200000000, 0x9eb697ca00000000, 0x3c01de2900000000, - 0x9d91c9c100000000, 0x39683c3400000000, 0x98f82bdc00000000, - 0x3a4f623f00000000, 0x9bdf75d700000000, 0x2b82095500000000, - 0x8a121ebd00000000, 0x28a5575e00000000, 0x893540b600000000, - 0x2dccb54300000000, 0x8c5ca2ab00000000, 0x2eebeb4800000000, - 0x8f7bfca000000000, 0x271e717800000000, 0x868e669000000000, - 0x24392f7300000000, 0x85a9389b00000000, 0x2150cd6e00000000, - 0x80c0da8600000000, 0x2277936500000000, 0x83e7848d00000000, - 0x222caf0a00000000, 0x83bcb8e200000000, 0x210bf10100000000, - 0x809be6e900000000, 0x2462131c00000000, 0x85f204f400000000, - 0x27454d1700000000, 0x86d55aff00000000, 0x2eb0d72700000000, - 0x8f20c0cf00000000, 0x2d97892c00000000, 0x8c079ec400000000, - 0x28fe6b3100000000, 0x896e7cd900000000, 0x2bd9353a00000000, - 0x8a4922d200000000, 0x3a145e5000000000, 0x9b8449b800000000, - 0x3933005b00000000, 0x98a317b300000000, 0x3c5ae24600000000, - 0x9dcaf5ae00000000, 0x3f7dbc4d00000000, 0x9eedaba500000000, - 0x3688267d00000000, 0x9718319500000000, 0x35af787600000000, - 0x943f6f9e00000000, 0x30c69a6b00000000, 0x91568d8300000000, - 0x33e1c46000000000, 0x9271d38800000000, 0x125c4dbf00000000, - 0xb3cc5a5700000000, 0x117b13b400000000, 0xb0eb045c00000000, - 0x1412f1a900000000, 0xb582e64100000000, 0x1735afa200000000, - 0xb6a5b84a00000000, 0x1ec0359200000000, 0xbf50227a00000000, - 0x1de76b9900000000, 0xbc777c7100000000, 0x188e898400000000, - 0xb91e9e6c00000000, 0x1ba9d78f00000000, 0xba39c06700000000, - 0x0a64bce500000000, 0xabf4ab0d00000000, 0x0943e2ee00000000, - 0xa8d3f50600000000, 0x0c2a00f300000000, 0xadba171b00000000, - 0x0f0d5ef800000000, 0xae9d491000000000, 0x06f8c4c800000000, - 0xa768d32000000000, 0x05df9ac300000000, 0xa44f8d2b00000000, - 0x00b678de00000000, 0xa1266f3600000000, 0x039126d500000000, - 0xa201313d00000000}, - {0x0000000000000000, 0xee8439a100000000, 0x9d0f029900000000, - 0x738b3b3800000000, 0x7b1975e900000000, 0x959d4c4800000000, - 0xe616777000000000, 0x08924ed100000000, 0xb7349b0900000000, - 0x59b0a2a800000000, 0x2a3b999000000000, 0xc4bfa03100000000, - 0xcc2deee000000000, 0x22a9d74100000000, 0x5122ec7900000000, - 0xbfa6d5d800000000, 0x6e69361300000000, 0x80ed0fb200000000, - 0xf366348a00000000, 0x1de20d2b00000000, 0x157043fa00000000, - 0xfbf47a5b00000000, 0x887f416300000000, 0x66fb78c200000000, - 0xd95dad1a00000000, 0x37d994bb00000000, 0x4452af8300000000, - 0xaad6962200000000, 0xa244d8f300000000, 0x4cc0e15200000000, - 0x3f4bda6a00000000, 0xd1cfe3cb00000000, 0xdcd26c2600000000, - 0x3256558700000000, 0x41dd6ebf00000000, 0xaf59571e00000000, - 0xa7cb19cf00000000, 0x494f206e00000000, 0x3ac41b5600000000, - 0xd44022f700000000, 0x6be6f72f00000000, 0x8562ce8e00000000, - 0xf6e9f5b600000000, 0x186dcc1700000000, 0x10ff82c600000000, - 0xfe7bbb6700000000, 0x8df0805f00000000, 0x6374b9fe00000000, - 0xb2bb5a3500000000, 0x5c3f639400000000, 0x2fb458ac00000000, - 0xc130610d00000000, 0xc9a22fdc00000000, 0x2726167d00000000, - 0x54ad2d4500000000, 0xba2914e400000000, 0x058fc13c00000000, - 0xeb0bf89d00000000, 0x9880c3a500000000, 0x7604fa0400000000, - 0x7e96b4d500000000, 0x90128d7400000000, 0xe399b64c00000000, - 0x0d1d8fed00000000, 0xb8a5d94c00000000, 0x5621e0ed00000000, - 0x25aadbd500000000, 0xcb2ee27400000000, 0xc3bcaca500000000, - 0x2d38950400000000, 0x5eb3ae3c00000000, 0xb037979d00000000, - 0x0f91424500000000, 0xe1157be400000000, 0x929e40dc00000000, - 0x7c1a797d00000000, 0x748837ac00000000, 0x9a0c0e0d00000000, - 0xe987353500000000, 0x07030c9400000000, 0xd6ccef5f00000000, - 0x3848d6fe00000000, 0x4bc3edc600000000, 0xa547d46700000000, - 0xadd59ab600000000, 0x4351a31700000000, 0x30da982f00000000, - 0xde5ea18e00000000, 0x61f8745600000000, 0x8f7c4df700000000, - 0xfcf776cf00000000, 0x12734f6e00000000, 0x1ae101bf00000000, - 0xf465381e00000000, 0x87ee032600000000, 0x696a3a8700000000, - 0x6477b56a00000000, 0x8af38ccb00000000, 0xf978b7f300000000, - 0x17fc8e5200000000, 0x1f6ec08300000000, 0xf1eaf92200000000, - 0x8261c21a00000000, 0x6ce5fbbb00000000, 0xd3432e6300000000, - 0x3dc717c200000000, 0x4e4c2cfa00000000, 0xa0c8155b00000000, - 0xa85a5b8a00000000, 0x46de622b00000000, 0x3555591300000000, - 0xdbd160b200000000, 0x0a1e837900000000, 0xe49abad800000000, - 0x971181e000000000, 0x7995b84100000000, 0x7107f69000000000, - 0x9f83cf3100000000, 0xec08f40900000000, 0x028ccda800000000, - 0xbd2a187000000000, 0x53ae21d100000000, 0x20251ae900000000, - 0xcea1234800000000, 0xc6336d9900000000, 0x28b7543800000000, - 0x5b3c6f0000000000, 0xb5b856a100000000, 0x704bb39900000000, - 0x9ecf8a3800000000, 0xed44b10000000000, 0x03c088a100000000, - 0x0b52c67000000000, 0xe5d6ffd100000000, 0x965dc4e900000000, - 0x78d9fd4800000000, 0xc77f289000000000, 0x29fb113100000000, - 0x5a702a0900000000, 0xb4f413a800000000, 0xbc665d7900000000, - 0x52e264d800000000, 0x21695fe000000000, 0xcfed664100000000, - 0x1e22858a00000000, 0xf0a6bc2b00000000, 0x832d871300000000, - 0x6da9beb200000000, 0x653bf06300000000, 0x8bbfc9c200000000, - 0xf834f2fa00000000, 0x16b0cb5b00000000, 0xa9161e8300000000, - 0x4792272200000000, 0x34191c1a00000000, 0xda9d25bb00000000, - 0xd20f6b6a00000000, 0x3c8b52cb00000000, 0x4f0069f300000000, - 0xa184505200000000, 0xac99dfbf00000000, 0x421de61e00000000, - 0x3196dd2600000000, 0xdf12e48700000000, 0xd780aa5600000000, - 0x390493f700000000, 0x4a8fa8cf00000000, 0xa40b916e00000000, - 0x1bad44b600000000, 0xf5297d1700000000, 0x86a2462f00000000, - 0x68267f8e00000000, 0x60b4315f00000000, 0x8e3008fe00000000, - 0xfdbb33c600000000, 0x133f0a6700000000, 0xc2f0e9ac00000000, - 0x2c74d00d00000000, 0x5fffeb3500000000, 0xb17bd29400000000, - 0xb9e99c4500000000, 0x576da5e400000000, 0x24e69edc00000000, - 0xca62a77d00000000, 0x75c472a500000000, 0x9b404b0400000000, - 0xe8cb703c00000000, 0x064f499d00000000, 0x0edd074c00000000, - 0xe0593eed00000000, 0x93d205d500000000, 0x7d563c7400000000, - 0xc8ee6ad500000000, 0x266a537400000000, 0x55e1684c00000000, - 0xbb6551ed00000000, 0xb3f71f3c00000000, 0x5d73269d00000000, - 0x2ef81da500000000, 0xc07c240400000000, 0x7fdaf1dc00000000, - 0x915ec87d00000000, 0xe2d5f34500000000, 0x0c51cae400000000, - 0x04c3843500000000, 0xea47bd9400000000, 0x99cc86ac00000000, - 0x7748bf0d00000000, 0xa6875cc600000000, 0x4803656700000000, - 0x3b885e5f00000000, 0xd50c67fe00000000, 0xdd9e292f00000000, - 0x331a108e00000000, 0x40912bb600000000, 0xae15121700000000, - 0x11b3c7cf00000000, 0xff37fe6e00000000, 0x8cbcc55600000000, - 0x6238fcf700000000, 0x6aaab22600000000, 0x842e8b8700000000, - 0xf7a5b0bf00000000, 0x1921891e00000000, 0x143c06f300000000, - 0xfab83f5200000000, 0x8933046a00000000, 0x67b73dcb00000000, - 0x6f25731a00000000, 0x81a14abb00000000, 0xf22a718300000000, - 0x1cae482200000000, 0xa3089dfa00000000, 0x4d8ca45b00000000, - 0x3e079f6300000000, 0xd083a6c200000000, 0xd811e81300000000, - 0x3695d1b200000000, 0x451eea8a00000000, 0xab9ad32b00000000, - 0x7a5530e000000000, 0x94d1094100000000, 0xe75a327900000000, - 0x09de0bd800000000, 0x014c450900000000, 0xefc87ca800000000, - 0x9c43479000000000, 0x72c77e3100000000, 0xcd61abe900000000, - 0x23e5924800000000, 0x506ea97000000000, 0xbeea90d100000000, - 0xb678de0000000000, 0x58fce7a100000000, 0x2b77dc9900000000, - 0xc5f3e53800000000}, - {0x0000000000000000, 0xfbf6134700000000, 0xf6ed278e00000000, - 0x0d1b34c900000000, 0xaddd3ec700000000, 0x562b2d8000000000, - 0x5b30194900000000, 0xa0c60a0e00000000, 0x1bbd0c5500000000, - 0xe04b1f1200000000, 0xed502bdb00000000, 0x16a6389c00000000, - 0xb660329200000000, 0x4d9621d500000000, 0x408d151c00000000, - 0xbb7b065b00000000, 0x367a19aa00000000, 0xcd8c0aed00000000, - 0xc0973e2400000000, 0x3b612d6300000000, 0x9ba7276d00000000, - 0x6051342a00000000, 0x6d4a00e300000000, 0x96bc13a400000000, - 0x2dc715ff00000000, 0xd63106b800000000, 0xdb2a327100000000, - 0x20dc213600000000, 0x801a2b3800000000, 0x7bec387f00000000, - 0x76f70cb600000000, 0x8d011ff100000000, 0x2df2438f00000000, - 0xd60450c800000000, 0xdb1f640100000000, 0x20e9774600000000, - 0x802f7d4800000000, 0x7bd96e0f00000000, 0x76c25ac600000000, - 0x8d34498100000000, 0x364f4fda00000000, 0xcdb95c9d00000000, - 0xc0a2685400000000, 0x3b547b1300000000, 0x9b92711d00000000, - 0x6064625a00000000, 0x6d7f569300000000, 0x968945d400000000, - 0x1b885a2500000000, 0xe07e496200000000, 0xed657dab00000000, - 0x16936eec00000000, 0xb65564e200000000, 0x4da377a500000000, - 0x40b8436c00000000, 0xbb4e502b00000000, 0x0035567000000000, - 0xfbc3453700000000, 0xf6d871fe00000000, 0x0d2e62b900000000, - 0xade868b700000000, 0x561e7bf000000000, 0x5b054f3900000000, - 0xa0f35c7e00000000, 0x1be2f6c500000000, 0xe014e58200000000, - 0xed0fd14b00000000, 0x16f9c20c00000000, 0xb63fc80200000000, - 0x4dc9db4500000000, 0x40d2ef8c00000000, 0xbb24fccb00000000, - 0x005ffa9000000000, 0xfba9e9d700000000, 0xf6b2dd1e00000000, - 0x0d44ce5900000000, 0xad82c45700000000, 0x5674d71000000000, - 0x5b6fe3d900000000, 0xa099f09e00000000, 0x2d98ef6f00000000, - 0xd66efc2800000000, 0xdb75c8e100000000, 0x2083dba600000000, - 0x8045d1a800000000, 0x7bb3c2ef00000000, 0x76a8f62600000000, - 0x8d5ee56100000000, 0x3625e33a00000000, 0xcdd3f07d00000000, - 0xc0c8c4b400000000, 0x3b3ed7f300000000, 0x9bf8ddfd00000000, - 0x600eceba00000000, 0x6d15fa7300000000, 0x96e3e93400000000, - 0x3610b54a00000000, 0xcde6a60d00000000, 0xc0fd92c400000000, - 0x3b0b818300000000, 0x9bcd8b8d00000000, 0x603b98ca00000000, - 0x6d20ac0300000000, 0x96d6bf4400000000, 0x2dadb91f00000000, - 0xd65baa5800000000, 0xdb409e9100000000, 0x20b68dd600000000, - 0x807087d800000000, 0x7b86949f00000000, 0x769da05600000000, - 0x8d6bb31100000000, 0x006aace000000000, 0xfb9cbfa700000000, - 0xf6878b6e00000000, 0x0d71982900000000, 0xadb7922700000000, - 0x5641816000000000, 0x5b5ab5a900000000, 0xa0aca6ee00000000, - 0x1bd7a0b500000000, 0xe021b3f200000000, 0xed3a873b00000000, - 0x16cc947c00000000, 0xb60a9e7200000000, 0x4dfc8d3500000000, - 0x40e7b9fc00000000, 0xbb11aabb00000000, 0x77c29c5000000000, - 0x8c348f1700000000, 0x812fbbde00000000, 0x7ad9a89900000000, - 0xda1fa29700000000, 0x21e9b1d000000000, 0x2cf2851900000000, - 0xd704965e00000000, 0x6c7f900500000000, 0x9789834200000000, - 0x9a92b78b00000000, 0x6164a4cc00000000, 0xc1a2aec200000000, - 0x3a54bd8500000000, 0x374f894c00000000, 0xccb99a0b00000000, - 0x41b885fa00000000, 0xba4e96bd00000000, 0xb755a27400000000, - 0x4ca3b13300000000, 0xec65bb3d00000000, 0x1793a87a00000000, - 0x1a889cb300000000, 0xe17e8ff400000000, 0x5a0589af00000000, - 0xa1f39ae800000000, 0xace8ae2100000000, 0x571ebd6600000000, - 0xf7d8b76800000000, 0x0c2ea42f00000000, 0x013590e600000000, - 0xfac383a100000000, 0x5a30dfdf00000000, 0xa1c6cc9800000000, - 0xacddf85100000000, 0x572beb1600000000, 0xf7ede11800000000, - 0x0c1bf25f00000000, 0x0100c69600000000, 0xfaf6d5d100000000, - 0x418dd38a00000000, 0xba7bc0cd00000000, 0xb760f40400000000, - 0x4c96e74300000000, 0xec50ed4d00000000, 0x17a6fe0a00000000, - 0x1abdcac300000000, 0xe14bd98400000000, 0x6c4ac67500000000, - 0x97bcd53200000000, 0x9aa7e1fb00000000, 0x6151f2bc00000000, - 0xc197f8b200000000, 0x3a61ebf500000000, 0x377adf3c00000000, - 0xcc8ccc7b00000000, 0x77f7ca2000000000, 0x8c01d96700000000, - 0x811aedae00000000, 0x7aecfee900000000, 0xda2af4e700000000, - 0x21dce7a000000000, 0x2cc7d36900000000, 0xd731c02e00000000, - 0x6c206a9500000000, 0x97d679d200000000, 0x9acd4d1b00000000, - 0x613b5e5c00000000, 0xc1fd545200000000, 0x3a0b471500000000, - 0x371073dc00000000, 0xcce6609b00000000, 0x779d66c000000000, - 0x8c6b758700000000, 0x8170414e00000000, 0x7a86520900000000, - 0xda40580700000000, 0x21b64b4000000000, 0x2cad7f8900000000, - 0xd75b6cce00000000, 0x5a5a733f00000000, 0xa1ac607800000000, - 0xacb754b100000000, 0x574147f600000000, 0xf7874df800000000, - 0x0c715ebf00000000, 0x016a6a7600000000, 0xfa9c793100000000, - 0x41e77f6a00000000, 0xba116c2d00000000, 0xb70a58e400000000, - 0x4cfc4ba300000000, 0xec3a41ad00000000, 0x17cc52ea00000000, - 0x1ad7662300000000, 0xe121756400000000, 0x41d2291a00000000, - 0xba243a5d00000000, 0xb73f0e9400000000, 0x4cc91dd300000000, - 0xec0f17dd00000000, 0x17f9049a00000000, 0x1ae2305300000000, - 0xe114231400000000, 0x5a6f254f00000000, 0xa199360800000000, - 0xac8202c100000000, 0x5774118600000000, 0xf7b21b8800000000, - 0x0c4408cf00000000, 0x015f3c0600000000, 0xfaa92f4100000000, - 0x77a830b000000000, 0x8c5e23f700000000, 0x8145173e00000000, - 0x7ab3047900000000, 0xda750e7700000000, 0x21831d3000000000, - 0x2c9829f900000000, 0xd76e3abe00000000, 0x6c153ce500000000, - 0x97e32fa200000000, 0x9af81b6b00000000, 0x610e082c00000000, - 0xc1c8022200000000, 0x3a3e116500000000, 0x372525ac00000000, - 0xccd336eb00000000}, - {0x0000000000000000, 0x6238282a00000000, 0xc470505400000000, - 0xa648787e00000000, 0x88e1a0a800000000, 0xead9888200000000, - 0x4c91f0fc00000000, 0x2ea9d8d600000000, 0x51c5308a00000000, - 0x33fd18a000000000, 0x95b560de00000000, 0xf78d48f400000000, - 0xd924902200000000, 0xbb1cb80800000000, 0x1d54c07600000000, - 0x7f6ce85c00000000, 0xe38c10cf00000000, 0x81b438e500000000, - 0x27fc409b00000000, 0x45c468b100000000, 0x6b6db06700000000, - 0x0955984d00000000, 0xaf1de03300000000, 0xcd25c81900000000, - 0xb249204500000000, 0xd071086f00000000, 0x7639701100000000, - 0x1401583b00000000, 0x3aa880ed00000000, 0x5890a8c700000000, - 0xfed8d0b900000000, 0x9ce0f89300000000, 0x871f504500000000, - 0xe527786f00000000, 0x436f001100000000, 0x2157283b00000000, - 0x0ffef0ed00000000, 0x6dc6d8c700000000, 0xcb8ea0b900000000, - 0xa9b6889300000000, 0xd6da60cf00000000, 0xb4e248e500000000, - 0x12aa309b00000000, 0x709218b100000000, 0x5e3bc06700000000, - 0x3c03e84d00000000, 0x9a4b903300000000, 0xf873b81900000000, - 0x6493408a00000000, 0x06ab68a000000000, 0xa0e310de00000000, - 0xc2db38f400000000, 0xec72e02200000000, 0x8e4ac80800000000, - 0x2802b07600000000, 0x4a3a985c00000000, 0x3556700000000000, - 0x576e582a00000000, 0xf126205400000000, 0x931e087e00000000, - 0xbdb7d0a800000000, 0xdf8ff88200000000, 0x79c780fc00000000, - 0x1bffa8d600000000, 0x0e3fa08a00000000, 0x6c0788a000000000, - 0xca4ff0de00000000, 0xa877d8f400000000, 0x86de002200000000, - 0xe4e6280800000000, 0x42ae507600000000, 0x2096785c00000000, - 0x5ffa900000000000, 0x3dc2b82a00000000, 0x9b8ac05400000000, - 0xf9b2e87e00000000, 0xd71b30a800000000, 0xb523188200000000, - 0x136b60fc00000000, 0x715348d600000000, 0xedb3b04500000000, - 0x8f8b986f00000000, 0x29c3e01100000000, 0x4bfbc83b00000000, - 0x655210ed00000000, 0x076a38c700000000, 0xa12240b900000000, - 0xc31a689300000000, 0xbc7680cf00000000, 0xde4ea8e500000000, - 0x7806d09b00000000, 0x1a3ef8b100000000, 0x3497206700000000, - 0x56af084d00000000, 0xf0e7703300000000, 0x92df581900000000, - 0x8920f0cf00000000, 0xeb18d8e500000000, 0x4d50a09b00000000, - 0x2f6888b100000000, 0x01c1506700000000, 0x63f9784d00000000, - 0xc5b1003300000000, 0xa789281900000000, 0xd8e5c04500000000, - 0xbadde86f00000000, 0x1c95901100000000, 0x7eadb83b00000000, - 0x500460ed00000000, 0x323c48c700000000, 0x947430b900000000, - 0xf64c189300000000, 0x6aace00000000000, 0x0894c82a00000000, - 0xaedcb05400000000, 0xcce4987e00000000, 0xe24d40a800000000, - 0x8075688200000000, 0x263d10fc00000000, 0x440538d600000000, - 0x3b69d08a00000000, 0x5951f8a000000000, 0xff1980de00000000, - 0x9d21a8f400000000, 0xb388702200000000, 0xd1b0580800000000, - 0x77f8207600000000, 0x15c0085c00000000, 0x5d7831ce00000000, - 0x3f4019e400000000, 0x9908619a00000000, 0xfb3049b000000000, - 0xd599916600000000, 0xb7a1b94c00000000, 0x11e9c13200000000, - 0x73d1e91800000000, 0x0cbd014400000000, 0x6e85296e00000000, - 0xc8cd511000000000, 0xaaf5793a00000000, 0x845ca1ec00000000, - 0xe66489c600000000, 0x402cf1b800000000, 0x2214d99200000000, - 0xbef4210100000000, 0xdccc092b00000000, 0x7a84715500000000, - 0x18bc597f00000000, 0x361581a900000000, 0x542da98300000000, - 0xf265d1fd00000000, 0x905df9d700000000, 0xef31118b00000000, - 0x8d0939a100000000, 0x2b4141df00000000, 0x497969f500000000, - 0x67d0b12300000000, 0x05e8990900000000, 0xa3a0e17700000000, - 0xc198c95d00000000, 0xda67618b00000000, 0xb85f49a100000000, - 0x1e1731df00000000, 0x7c2f19f500000000, 0x5286c12300000000, - 0x30bee90900000000, 0x96f6917700000000, 0xf4ceb95d00000000, - 0x8ba2510100000000, 0xe99a792b00000000, 0x4fd2015500000000, - 0x2dea297f00000000, 0x0343f1a900000000, 0x617bd98300000000, - 0xc733a1fd00000000, 0xa50b89d700000000, 0x39eb714400000000, - 0x5bd3596e00000000, 0xfd9b211000000000, 0x9fa3093a00000000, - 0xb10ad1ec00000000, 0xd332f9c600000000, 0x757a81b800000000, - 0x1742a99200000000, 0x682e41ce00000000, 0x0a1669e400000000, - 0xac5e119a00000000, 0xce6639b000000000, 0xe0cfe16600000000, - 0x82f7c94c00000000, 0x24bfb13200000000, 0x4687991800000000, - 0x5347914400000000, 0x317fb96e00000000, 0x9737c11000000000, - 0xf50fe93a00000000, 0xdba631ec00000000, 0xb99e19c600000000, - 0x1fd661b800000000, 0x7dee499200000000, 0x0282a1ce00000000, - 0x60ba89e400000000, 0xc6f2f19a00000000, 0xa4cad9b000000000, - 0x8a63016600000000, 0xe85b294c00000000, 0x4e13513200000000, - 0x2c2b791800000000, 0xb0cb818b00000000, 0xd2f3a9a100000000, - 0x74bbd1df00000000, 0x1683f9f500000000, 0x382a212300000000, - 0x5a12090900000000, 0xfc5a717700000000, 0x9e62595d00000000, - 0xe10eb10100000000, 0x8336992b00000000, 0x257ee15500000000, - 0x4746c97f00000000, 0x69ef11a900000000, 0x0bd7398300000000, - 0xad9f41fd00000000, 0xcfa769d700000000, 0xd458c10100000000, - 0xb660e92b00000000, 0x1028915500000000, 0x7210b97f00000000, - 0x5cb961a900000000, 0x3e81498300000000, 0x98c931fd00000000, - 0xfaf119d700000000, 0x859df18b00000000, 0xe7a5d9a100000000, - 0x41eda1df00000000, 0x23d589f500000000, 0x0d7c512300000000, - 0x6f44790900000000, 0xc90c017700000000, 0xab34295d00000000, - 0x37d4d1ce00000000, 0x55ecf9e400000000, 0xf3a4819a00000000, - 0x919ca9b000000000, 0xbf35716600000000, 0xdd0d594c00000000, - 0x7b45213200000000, 0x197d091800000000, 0x6611e14400000000, - 0x0429c96e00000000, 0xa261b11000000000, 0xc059993a00000000, - 0xeef041ec00000000, 0x8cc869c600000000, 0x2a8011b800000000, - 0x48b8399200000000}, - {0x0000000000000000, 0x4c2896a300000000, 0xd9565d9c00000000, - 0x957ecb3f00000000, 0xf3abcbe300000000, 0xbf835d4000000000, - 0x2afd967f00000000, 0x66d500dc00000000, 0xa751e61c00000000, - 0xeb7970bf00000000, 0x7e07bb8000000000, 0x322f2d2300000000, - 0x54fa2dff00000000, 0x18d2bb5c00000000, 0x8dac706300000000, - 0xc184e6c000000000, 0x4ea3cc3900000000, 0x028b5a9a00000000, - 0x97f591a500000000, 0xdbdd070600000000, 0xbd0807da00000000, - 0xf120917900000000, 0x645e5a4600000000, 0x2876cce500000000, - 0xe9f22a2500000000, 0xa5dabc8600000000, 0x30a477b900000000, - 0x7c8ce11a00000000, 0x1a59e1c600000000, 0x5671776500000000, - 0xc30fbc5a00000000, 0x8f272af900000000, 0x9c46997300000000, - 0xd06e0fd000000000, 0x4510c4ef00000000, 0x0938524c00000000, - 0x6fed529000000000, 0x23c5c43300000000, 0xb6bb0f0c00000000, - 0xfa9399af00000000, 0x3b177f6f00000000, 0x773fe9cc00000000, - 0xe24122f300000000, 0xae69b45000000000, 0xc8bcb48c00000000, - 0x8494222f00000000, 0x11eae91000000000, 0x5dc27fb300000000, - 0xd2e5554a00000000, 0x9ecdc3e900000000, 0x0bb308d600000000, - 0x479b9e7500000000, 0x214e9ea900000000, 0x6d66080a00000000, - 0xf818c33500000000, 0xb430559600000000, 0x75b4b35600000000, - 0x399c25f500000000, 0xace2eeca00000000, 0xe0ca786900000000, - 0x861f78b500000000, 0xca37ee1600000000, 0x5f49252900000000, - 0x1361b38a00000000, 0x388d32e700000000, 0x74a5a44400000000, - 0xe1db6f7b00000000, 0xadf3f9d800000000, 0xcb26f90400000000, - 0x870e6fa700000000, 0x1270a49800000000, 0x5e58323b00000000, - 0x9fdcd4fb00000000, 0xd3f4425800000000, 0x468a896700000000, - 0x0aa21fc400000000, 0x6c771f1800000000, 0x205f89bb00000000, - 0xb521428400000000, 0xf909d42700000000, 0x762efede00000000, - 0x3a06687d00000000, 0xaf78a34200000000, 0xe35035e100000000, - 0x8585353d00000000, 0xc9ada39e00000000, 0x5cd368a100000000, - 0x10fbfe0200000000, 0xd17f18c200000000, 0x9d578e6100000000, - 0x0829455e00000000, 0x4401d3fd00000000, 0x22d4d32100000000, - 0x6efc458200000000, 0xfb828ebd00000000, 0xb7aa181e00000000, - 0xa4cbab9400000000, 0xe8e33d3700000000, 0x7d9df60800000000, - 0x31b560ab00000000, 0x5760607700000000, 0x1b48f6d400000000, - 0x8e363deb00000000, 0xc21eab4800000000, 0x039a4d8800000000, - 0x4fb2db2b00000000, 0xdacc101400000000, 0x96e486b700000000, - 0xf031866b00000000, 0xbc1910c800000000, 0x2967dbf700000000, - 0x654f4d5400000000, 0xea6867ad00000000, 0xa640f10e00000000, - 0x333e3a3100000000, 0x7f16ac9200000000, 0x19c3ac4e00000000, - 0x55eb3aed00000000, 0xc095f1d200000000, 0x8cbd677100000000, - 0x4d3981b100000000, 0x0111171200000000, 0x946fdc2d00000000, - 0xd8474a8e00000000, 0xbe924a5200000000, 0xf2badcf100000000, - 0x67c417ce00000000, 0x2bec816d00000000, 0x311c141500000000, - 0x7d3482b600000000, 0xe84a498900000000, 0xa462df2a00000000, - 0xc2b7dff600000000, 0x8e9f495500000000, 0x1be1826a00000000, - 0x57c914c900000000, 0x964df20900000000, 0xda6564aa00000000, - 0x4f1baf9500000000, 0x0333393600000000, 0x65e639ea00000000, - 0x29ceaf4900000000, 0xbcb0647600000000, 0xf098f2d500000000, - 0x7fbfd82c00000000, 0x33974e8f00000000, 0xa6e985b000000000, - 0xeac1131300000000, 0x8c1413cf00000000, 0xc03c856c00000000, - 0x55424e5300000000, 0x196ad8f000000000, 0xd8ee3e3000000000, - 0x94c6a89300000000, 0x01b863ac00000000, 0x4d90f50f00000000, - 0x2b45f5d300000000, 0x676d637000000000, 0xf213a84f00000000, - 0xbe3b3eec00000000, 0xad5a8d6600000000, 0xe1721bc500000000, - 0x740cd0fa00000000, 0x3824465900000000, 0x5ef1468500000000, - 0x12d9d02600000000, 0x87a71b1900000000, 0xcb8f8dba00000000, - 0x0a0b6b7a00000000, 0x4623fdd900000000, 0xd35d36e600000000, - 0x9f75a04500000000, 0xf9a0a09900000000, 0xb588363a00000000, - 0x20f6fd0500000000, 0x6cde6ba600000000, 0xe3f9415f00000000, - 0xafd1d7fc00000000, 0x3aaf1cc300000000, 0x76878a6000000000, - 0x10528abc00000000, 0x5c7a1c1f00000000, 0xc904d72000000000, - 0x852c418300000000, 0x44a8a74300000000, 0x088031e000000000, - 0x9dfefadf00000000, 0xd1d66c7c00000000, 0xb7036ca000000000, - 0xfb2bfa0300000000, 0x6e55313c00000000, 0x227da79f00000000, - 0x099126f200000000, 0x45b9b05100000000, 0xd0c77b6e00000000, - 0x9cefedcd00000000, 0xfa3aed1100000000, 0xb6127bb200000000, - 0x236cb08d00000000, 0x6f44262e00000000, 0xaec0c0ee00000000, - 0xe2e8564d00000000, 0x77969d7200000000, 0x3bbe0bd100000000, - 0x5d6b0b0d00000000, 0x11439dae00000000, 0x843d569100000000, - 0xc815c03200000000, 0x4732eacb00000000, 0x0b1a7c6800000000, - 0x9e64b75700000000, 0xd24c21f400000000, 0xb499212800000000, - 0xf8b1b78b00000000, 0x6dcf7cb400000000, 0x21e7ea1700000000, - 0xe0630cd700000000, 0xac4b9a7400000000, 0x3935514b00000000, - 0x751dc7e800000000, 0x13c8c73400000000, 0x5fe0519700000000, - 0xca9e9aa800000000, 0x86b60c0b00000000, 0x95d7bf8100000000, - 0xd9ff292200000000, 0x4c81e21d00000000, 0x00a974be00000000, - 0x667c746200000000, 0x2a54e2c100000000, 0xbf2a29fe00000000, - 0xf302bf5d00000000, 0x3286599d00000000, 0x7eaecf3e00000000, - 0xebd0040100000000, 0xa7f892a200000000, 0xc12d927e00000000, - 0x8d0504dd00000000, 0x187bcfe200000000, 0x5453594100000000, - 0xdb7473b800000000, 0x975ce51b00000000, 0x02222e2400000000, - 0x4e0ab88700000000, 0x28dfb85b00000000, 0x64f72ef800000000, - 0xf189e5c700000000, 0xbda1736400000000, 0x7c2595a400000000, - 0x300d030700000000, 0xa573c83800000000, 0xe95b5e9b00000000, - 0x8f8e5e4700000000, 0xc3a6c8e400000000, 0x56d803db00000000, - 0x1af0957800000000}, - {0x0000000000000000, 0x939bc97f00000000, 0x263793ff00000000, - 0xb5ac5a8000000000, 0x0d68572400000000, 0x9ef39e5b00000000, - 0x2b5fc4db00000000, 0xb8c40da400000000, 0x1ad0ae4800000000, - 0x894b673700000000, 0x3ce73db700000000, 0xaf7cf4c800000000, - 0x17b8f96c00000000, 0x8423301300000000, 0x318f6a9300000000, - 0xa214a3ec00000000, 0x34a05d9100000000, 0xa73b94ee00000000, - 0x1297ce6e00000000, 0x810c071100000000, 0x39c80ab500000000, - 0xaa53c3ca00000000, 0x1fff994a00000000, 0x8c64503500000000, - 0x2e70f3d900000000, 0xbdeb3aa600000000, 0x0847602600000000, - 0x9bdca95900000000, 0x2318a4fd00000000, 0xb0836d8200000000, - 0x052f370200000000, 0x96b4fe7d00000000, 0x2946caf900000000, - 0xbadd038600000000, 0x0f71590600000000, 0x9cea907900000000, - 0x242e9ddd00000000, 0xb7b554a200000000, 0x02190e2200000000, - 0x9182c75d00000000, 0x339664b100000000, 0xa00dadce00000000, - 0x15a1f74e00000000, 0x863a3e3100000000, 0x3efe339500000000, - 0xad65faea00000000, 0x18c9a06a00000000, 0x8b52691500000000, - 0x1de6976800000000, 0x8e7d5e1700000000, 0x3bd1049700000000, - 0xa84acde800000000, 0x108ec04c00000000, 0x8315093300000000, - 0x36b953b300000000, 0xa5229acc00000000, 0x0736392000000000, - 0x94adf05f00000000, 0x2101aadf00000000, 0xb29a63a000000000, - 0x0a5e6e0400000000, 0x99c5a77b00000000, 0x2c69fdfb00000000, - 0xbff2348400000000, 0x138ae52800000000, 0x80112c5700000000, - 0x35bd76d700000000, 0xa626bfa800000000, 0x1ee2b20c00000000, - 0x8d797b7300000000, 0x38d521f300000000, 0xab4ee88c00000000, - 0x095a4b6000000000, 0x9ac1821f00000000, 0x2f6dd89f00000000, - 0xbcf611e000000000, 0x04321c4400000000, 0x97a9d53b00000000, - 0x22058fbb00000000, 0xb19e46c400000000, 0x272ab8b900000000, - 0xb4b171c600000000, 0x011d2b4600000000, 0x9286e23900000000, - 0x2a42ef9d00000000, 0xb9d926e200000000, 0x0c757c6200000000, - 0x9feeb51d00000000, 0x3dfa16f100000000, 0xae61df8e00000000, - 0x1bcd850e00000000, 0x88564c7100000000, 0x309241d500000000, - 0xa30988aa00000000, 0x16a5d22a00000000, 0x853e1b5500000000, - 0x3acc2fd100000000, 0xa957e6ae00000000, 0x1cfbbc2e00000000, - 0x8f60755100000000, 0x37a478f500000000, 0xa43fb18a00000000, - 0x1193eb0a00000000, 0x8208227500000000, 0x201c819900000000, - 0xb38748e600000000, 0x062b126600000000, 0x95b0db1900000000, - 0x2d74d6bd00000000, 0xbeef1fc200000000, 0x0b43454200000000, - 0x98d88c3d00000000, 0x0e6c724000000000, 0x9df7bb3f00000000, - 0x285be1bf00000000, 0xbbc028c000000000, 0x0304256400000000, - 0x909fec1b00000000, 0x2533b69b00000000, 0xb6a87fe400000000, - 0x14bcdc0800000000, 0x8727157700000000, 0x328b4ff700000000, - 0xa110868800000000, 0x19d48b2c00000000, 0x8a4f425300000000, - 0x3fe318d300000000, 0xac78d1ac00000000, 0x2614cb5100000000, - 0xb58f022e00000000, 0x002358ae00000000, 0x93b891d100000000, - 0x2b7c9c7500000000, 0xb8e7550a00000000, 0x0d4b0f8a00000000, - 0x9ed0c6f500000000, 0x3cc4651900000000, 0xaf5fac6600000000, - 0x1af3f6e600000000, 0x89683f9900000000, 0x31ac323d00000000, - 0xa237fb4200000000, 0x179ba1c200000000, 0x840068bd00000000, - 0x12b496c000000000, 0x812f5fbf00000000, 0x3483053f00000000, - 0xa718cc4000000000, 0x1fdcc1e400000000, 0x8c47089b00000000, - 0x39eb521b00000000, 0xaa709b6400000000, 0x0864388800000000, - 0x9bfff1f700000000, 0x2e53ab7700000000, 0xbdc8620800000000, - 0x050c6fac00000000, 0x9697a6d300000000, 0x233bfc5300000000, - 0xb0a0352c00000000, 0x0f5201a800000000, 0x9cc9c8d700000000, - 0x2965925700000000, 0xbafe5b2800000000, 0x023a568c00000000, - 0x91a19ff300000000, 0x240dc57300000000, 0xb7960c0c00000000, - 0x1582afe000000000, 0x8619669f00000000, 0x33b53c1f00000000, - 0xa02ef56000000000, 0x18eaf8c400000000, 0x8b7131bb00000000, - 0x3edd6b3b00000000, 0xad46a24400000000, 0x3bf25c3900000000, - 0xa869954600000000, 0x1dc5cfc600000000, 0x8e5e06b900000000, - 0x369a0b1d00000000, 0xa501c26200000000, 0x10ad98e200000000, - 0x8336519d00000000, 0x2122f27100000000, 0xb2b93b0e00000000, - 0x0715618e00000000, 0x948ea8f100000000, 0x2c4aa55500000000, - 0xbfd16c2a00000000, 0x0a7d36aa00000000, 0x99e6ffd500000000, - 0x359e2e7900000000, 0xa605e70600000000, 0x13a9bd8600000000, - 0x803274f900000000, 0x38f6795d00000000, 0xab6db02200000000, - 0x1ec1eaa200000000, 0x8d5a23dd00000000, 0x2f4e803100000000, - 0xbcd5494e00000000, 0x097913ce00000000, 0x9ae2dab100000000, - 0x2226d71500000000, 0xb1bd1e6a00000000, 0x041144ea00000000, - 0x978a8d9500000000, 0x013e73e800000000, 0x92a5ba9700000000, - 0x2709e01700000000, 0xb492296800000000, 0x0c5624cc00000000, - 0x9fcdedb300000000, 0x2a61b73300000000, 0xb9fa7e4c00000000, - 0x1beedda000000000, 0x887514df00000000, 0x3dd94e5f00000000, - 0xae42872000000000, 0x16868a8400000000, 0x851d43fb00000000, - 0x30b1197b00000000, 0xa32ad00400000000, 0x1cd8e48000000000, - 0x8f432dff00000000, 0x3aef777f00000000, 0xa974be0000000000, - 0x11b0b3a400000000, 0x822b7adb00000000, 0x3787205b00000000, - 0xa41ce92400000000, 0x06084ac800000000, 0x959383b700000000, - 0x203fd93700000000, 0xb3a4104800000000, 0x0b601dec00000000, - 0x98fbd49300000000, 0x2d578e1300000000, 0xbecc476c00000000, - 0x2878b91100000000, 0xbbe3706e00000000, 0x0e4f2aee00000000, - 0x9dd4e39100000000, 0x2510ee3500000000, 0xb68b274a00000000, - 0x03277dca00000000, 0x90bcb4b500000000, 0x32a8175900000000, - 0xa133de2600000000, 0x149f84a600000000, 0x87044dd900000000, - 0x3fc0407d00000000, 0xac5b890200000000, 0x19f7d38200000000, - 0x8a6c1afd00000000}, - {0x0000000000000000, 0x650b796900000000, 0xca16f2d200000000, - 0xaf1d8bbb00000000, 0xd52b957e00000000, 0xb020ec1700000000, - 0x1f3d67ac00000000, 0x7a361ec500000000, 0xaa572afd00000000, - 0xcf5c539400000000, 0x6041d82f00000000, 0x054aa14600000000, - 0x7f7cbf8300000000, 0x1a77c6ea00000000, 0xb56a4d5100000000, - 0xd061343800000000, 0x15a9252100000000, 0x70a25c4800000000, - 0xdfbfd7f300000000, 0xbab4ae9a00000000, 0xc082b05f00000000, - 0xa589c93600000000, 0x0a94428d00000000, 0x6f9f3be400000000, - 0xbffe0fdc00000000, 0xdaf576b500000000, 0x75e8fd0e00000000, - 0x10e3846700000000, 0x6ad59aa200000000, 0x0fdee3cb00000000, - 0xa0c3687000000000, 0xc5c8111900000000, 0x2a524b4200000000, - 0x4f59322b00000000, 0xe044b99000000000, 0x854fc0f900000000, - 0xff79de3c00000000, 0x9a72a75500000000, 0x356f2cee00000000, - 0x5064558700000000, 0x800561bf00000000, 0xe50e18d600000000, - 0x4a13936d00000000, 0x2f18ea0400000000, 0x552ef4c100000000, - 0x30258da800000000, 0x9f38061300000000, 0xfa337f7a00000000, - 0x3ffb6e6300000000, 0x5af0170a00000000, 0xf5ed9cb100000000, - 0x90e6e5d800000000, 0xead0fb1d00000000, 0x8fdb827400000000, - 0x20c609cf00000000, 0x45cd70a600000000, 0x95ac449e00000000, - 0xf0a73df700000000, 0x5fbab64c00000000, 0x3ab1cf2500000000, - 0x4087d1e000000000, 0x258ca88900000000, 0x8a91233200000000, - 0xef9a5a5b00000000, 0x54a4968400000000, 0x31afefed00000000, - 0x9eb2645600000000, 0xfbb91d3f00000000, 0x818f03fa00000000, - 0xe4847a9300000000, 0x4b99f12800000000, 0x2e92884100000000, - 0xfef3bc7900000000, 0x9bf8c51000000000, 0x34e54eab00000000, - 0x51ee37c200000000, 0x2bd8290700000000, 0x4ed3506e00000000, - 0xe1cedbd500000000, 0x84c5a2bc00000000, 0x410db3a500000000, - 0x2406cacc00000000, 0x8b1b417700000000, 0xee10381e00000000, - 0x942626db00000000, 0xf12d5fb200000000, 0x5e30d40900000000, - 0x3b3bad6000000000, 0xeb5a995800000000, 0x8e51e03100000000, - 0x214c6b8a00000000, 0x444712e300000000, 0x3e710c2600000000, - 0x5b7a754f00000000, 0xf467fef400000000, 0x916c879d00000000, - 0x7ef6ddc600000000, 0x1bfda4af00000000, 0xb4e02f1400000000, - 0xd1eb567d00000000, 0xabdd48b800000000, 0xced631d100000000, - 0x61cbba6a00000000, 0x04c0c30300000000, 0xd4a1f73b00000000, - 0xb1aa8e5200000000, 0x1eb705e900000000, 0x7bbc7c8000000000, - 0x018a624500000000, 0x64811b2c00000000, 0xcb9c909700000000, - 0xae97e9fe00000000, 0x6b5ff8e700000000, 0x0e54818e00000000, - 0xa1490a3500000000, 0xc442735c00000000, 0xbe746d9900000000, - 0xdb7f14f000000000, 0x74629f4b00000000, 0x1169e62200000000, - 0xc108d21a00000000, 0xa403ab7300000000, 0x0b1e20c800000000, - 0x6e1559a100000000, 0x1423476400000000, 0x71283e0d00000000, - 0xde35b5b600000000, 0xbb3eccdf00000000, 0xe94e5cd200000000, - 0x8c4525bb00000000, 0x2358ae0000000000, 0x4653d76900000000, - 0x3c65c9ac00000000, 0x596eb0c500000000, 0xf6733b7e00000000, - 0x9378421700000000, 0x4319762f00000000, 0x26120f4600000000, - 0x890f84fd00000000, 0xec04fd9400000000, 0x9632e35100000000, - 0xf3399a3800000000, 0x5c24118300000000, 0x392f68ea00000000, - 0xfce779f300000000, 0x99ec009a00000000, 0x36f18b2100000000, - 0x53faf24800000000, 0x29ccec8d00000000, 0x4cc795e400000000, - 0xe3da1e5f00000000, 0x86d1673600000000, 0x56b0530e00000000, - 0x33bb2a6700000000, 0x9ca6a1dc00000000, 0xf9add8b500000000, - 0x839bc67000000000, 0xe690bf1900000000, 0x498d34a200000000, - 0x2c864dcb00000000, 0xc31c179000000000, 0xa6176ef900000000, - 0x090ae54200000000, 0x6c019c2b00000000, 0x163782ee00000000, - 0x733cfb8700000000, 0xdc21703c00000000, 0xb92a095500000000, - 0x694b3d6d00000000, 0x0c40440400000000, 0xa35dcfbf00000000, - 0xc656b6d600000000, 0xbc60a81300000000, 0xd96bd17a00000000, - 0x76765ac100000000, 0x137d23a800000000, 0xd6b532b100000000, - 0xb3be4bd800000000, 0x1ca3c06300000000, 0x79a8b90a00000000, - 0x039ea7cf00000000, 0x6695dea600000000, 0xc988551d00000000, - 0xac832c7400000000, 0x7ce2184c00000000, 0x19e9612500000000, - 0xb6f4ea9e00000000, 0xd3ff93f700000000, 0xa9c98d3200000000, - 0xccc2f45b00000000, 0x63df7fe000000000, 0x06d4068900000000, - 0xbdeaca5600000000, 0xd8e1b33f00000000, 0x77fc388400000000, - 0x12f741ed00000000, 0x68c15f2800000000, 0x0dca264100000000, - 0xa2d7adfa00000000, 0xc7dcd49300000000, 0x17bde0ab00000000, - 0x72b699c200000000, 0xddab127900000000, 0xb8a06b1000000000, - 0xc29675d500000000, 0xa79d0cbc00000000, 0x0880870700000000, - 0x6d8bfe6e00000000, 0xa843ef7700000000, 0xcd48961e00000000, - 0x62551da500000000, 0x075e64cc00000000, 0x7d687a0900000000, - 0x1863036000000000, 0xb77e88db00000000, 0xd275f1b200000000, - 0x0214c58a00000000, 0x671fbce300000000, 0xc802375800000000, - 0xad094e3100000000, 0xd73f50f400000000, 0xb234299d00000000, - 0x1d29a22600000000, 0x7822db4f00000000, 0x97b8811400000000, - 0xf2b3f87d00000000, 0x5dae73c600000000, 0x38a50aaf00000000, - 0x4293146a00000000, 0x27986d0300000000, 0x8885e6b800000000, - 0xed8e9fd100000000, 0x3defabe900000000, 0x58e4d28000000000, - 0xf7f9593b00000000, 0x92f2205200000000, 0xe8c43e9700000000, - 0x8dcf47fe00000000, 0x22d2cc4500000000, 0x47d9b52c00000000, - 0x8211a43500000000, 0xe71add5c00000000, 0x480756e700000000, - 0x2d0c2f8e00000000, 0x573a314b00000000, 0x3231482200000000, - 0x9d2cc39900000000, 0xf827baf000000000, 0x28468ec800000000, - 0x4d4df7a100000000, 0xe2507c1a00000000, 0x875b057300000000, - 0xfd6d1bb600000000, 0x986662df00000000, 0x377be96400000000, - 0x5270900d00000000}, - {0x0000000000000000, 0xdcecb13d00000000, 0xb8d9637b00000000, - 0x6435d24600000000, 0x70b3c7f600000000, 0xac5f76cb00000000, - 0xc86aa48d00000000, 0x148615b000000000, 0xa160fe3600000000, - 0x7d8c4f0b00000000, 0x19b99d4d00000000, 0xc5552c7000000000, - 0xd1d339c000000000, 0x0d3f88fd00000000, 0x690a5abb00000000, - 0xb5e6eb8600000000, 0x42c1fc6d00000000, 0x9e2d4d5000000000, - 0xfa189f1600000000, 0x26f42e2b00000000, 0x32723b9b00000000, - 0xee9e8aa600000000, 0x8aab58e000000000, 0x5647e9dd00000000, - 0xe3a1025b00000000, 0x3f4db36600000000, 0x5b78612000000000, - 0x8794d01d00000000, 0x9312c5ad00000000, 0x4ffe749000000000, - 0x2bcba6d600000000, 0xf72717eb00000000, 0x8482f9db00000000, - 0x586e48e600000000, 0x3c5b9aa000000000, 0xe0b72b9d00000000, - 0xf4313e2d00000000, 0x28dd8f1000000000, 0x4ce85d5600000000, - 0x9004ec6b00000000, 0x25e207ed00000000, 0xf90eb6d000000000, - 0x9d3b649600000000, 0x41d7d5ab00000000, 0x5551c01b00000000, - 0x89bd712600000000, 0xed88a36000000000, 0x3164125d00000000, - 0xc64305b600000000, 0x1aafb48b00000000, 0x7e9a66cd00000000, - 0xa276d7f000000000, 0xb6f0c24000000000, 0x6a1c737d00000000, - 0x0e29a13b00000000, 0xd2c5100600000000, 0x6723fb8000000000, - 0xbbcf4abd00000000, 0xdffa98fb00000000, 0x031629c600000000, - 0x17903c7600000000, 0xcb7c8d4b00000000, 0xaf495f0d00000000, - 0x73a5ee3000000000, 0x4903826c00000000, 0x95ef335100000000, - 0xf1dae11700000000, 0x2d36502a00000000, 0x39b0459a00000000, - 0xe55cf4a700000000, 0x816926e100000000, 0x5d8597dc00000000, - 0xe8637c5a00000000, 0x348fcd6700000000, 0x50ba1f2100000000, - 0x8c56ae1c00000000, 0x98d0bbac00000000, 0x443c0a9100000000, - 0x2009d8d700000000, 0xfce569ea00000000, 0x0bc27e0100000000, - 0xd72ecf3c00000000, 0xb31b1d7a00000000, 0x6ff7ac4700000000, - 0x7b71b9f700000000, 0xa79d08ca00000000, 0xc3a8da8c00000000, - 0x1f446bb100000000, 0xaaa2803700000000, 0x764e310a00000000, - 0x127be34c00000000, 0xce97527100000000, 0xda1147c100000000, - 0x06fdf6fc00000000, 0x62c824ba00000000, 0xbe24958700000000, - 0xcd817bb700000000, 0x116dca8a00000000, 0x755818cc00000000, - 0xa9b4a9f100000000, 0xbd32bc4100000000, 0x61de0d7c00000000, - 0x05ebdf3a00000000, 0xd9076e0700000000, 0x6ce1858100000000, - 0xb00d34bc00000000, 0xd438e6fa00000000, 0x08d457c700000000, - 0x1c52427700000000, 0xc0bef34a00000000, 0xa48b210c00000000, - 0x7867903100000000, 0x8f4087da00000000, 0x53ac36e700000000, - 0x3799e4a100000000, 0xeb75559c00000000, 0xfff3402c00000000, - 0x231ff11100000000, 0x472a235700000000, 0x9bc6926a00000000, - 0x2e2079ec00000000, 0xf2ccc8d100000000, 0x96f91a9700000000, - 0x4a15abaa00000000, 0x5e93be1a00000000, 0x827f0f2700000000, - 0xe64add6100000000, 0x3aa66c5c00000000, 0x920604d900000000, - 0x4eeab5e400000000, 0x2adf67a200000000, 0xf633d69f00000000, - 0xe2b5c32f00000000, 0x3e59721200000000, 0x5a6ca05400000000, - 0x8680116900000000, 0x3366faef00000000, 0xef8a4bd200000000, - 0x8bbf999400000000, 0x575328a900000000, 0x43d53d1900000000, - 0x9f398c2400000000, 0xfb0c5e6200000000, 0x27e0ef5f00000000, - 0xd0c7f8b400000000, 0x0c2b498900000000, 0x681e9bcf00000000, - 0xb4f22af200000000, 0xa0743f4200000000, 0x7c988e7f00000000, - 0x18ad5c3900000000, 0xc441ed0400000000, 0x71a7068200000000, - 0xad4bb7bf00000000, 0xc97e65f900000000, 0x1592d4c400000000, - 0x0114c17400000000, 0xddf8704900000000, 0xb9cda20f00000000, - 0x6521133200000000, 0x1684fd0200000000, 0xca684c3f00000000, - 0xae5d9e7900000000, 0x72b12f4400000000, 0x66373af400000000, - 0xbadb8bc900000000, 0xdeee598f00000000, 0x0202e8b200000000, - 0xb7e4033400000000, 0x6b08b20900000000, 0x0f3d604f00000000, - 0xd3d1d17200000000, 0xc757c4c200000000, 0x1bbb75ff00000000, - 0x7f8ea7b900000000, 0xa362168400000000, 0x5445016f00000000, - 0x88a9b05200000000, 0xec9c621400000000, 0x3070d32900000000, - 0x24f6c69900000000, 0xf81a77a400000000, 0x9c2fa5e200000000, - 0x40c314df00000000, 0xf525ff5900000000, 0x29c94e6400000000, - 0x4dfc9c2200000000, 0x91102d1f00000000, 0x859638af00000000, - 0x597a899200000000, 0x3d4f5bd400000000, 0xe1a3eae900000000, - 0xdb0586b500000000, 0x07e9378800000000, 0x63dce5ce00000000, - 0xbf3054f300000000, 0xabb6414300000000, 0x775af07e00000000, - 0x136f223800000000, 0xcf83930500000000, 0x7a65788300000000, - 0xa689c9be00000000, 0xc2bc1bf800000000, 0x1e50aac500000000, - 0x0ad6bf7500000000, 0xd63a0e4800000000, 0xb20fdc0e00000000, - 0x6ee36d3300000000, 0x99c47ad800000000, 0x4528cbe500000000, - 0x211d19a300000000, 0xfdf1a89e00000000, 0xe977bd2e00000000, - 0x359b0c1300000000, 0x51aede5500000000, 0x8d426f6800000000, - 0x38a484ee00000000, 0xe44835d300000000, 0x807de79500000000, - 0x5c9156a800000000, 0x4817431800000000, 0x94fbf22500000000, - 0xf0ce206300000000, 0x2c22915e00000000, 0x5f877f6e00000000, - 0x836bce5300000000, 0xe75e1c1500000000, 0x3bb2ad2800000000, - 0x2f34b89800000000, 0xf3d809a500000000, 0x97eddbe300000000, - 0x4b016ade00000000, 0xfee7815800000000, 0x220b306500000000, - 0x463ee22300000000, 0x9ad2531e00000000, 0x8e5446ae00000000, - 0x52b8f79300000000, 0x368d25d500000000, 0xea6194e800000000, - 0x1d46830300000000, 0xc1aa323e00000000, 0xa59fe07800000000, - 0x7973514500000000, 0x6df544f500000000, 0xb119f5c800000000, - 0xd52c278e00000000, 0x09c096b300000000, 0xbc267d3500000000, - 0x60cacc0800000000, 0x04ff1e4e00000000, 0xd813af7300000000, - 0xcc95bac300000000, 0x10790bfe00000000, 0x744cd9b800000000, - 0xa8a0688500000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0x81256527, 0xd93bcc0f, 0x581ea928, 0x69069e5f, - 0xe823fb78, 0xb03d5250, 0x31183777, 0xd20d3cbe, 0x53285999, - 0x0b36f0b1, 0x8a139596, 0xbb0ba2e1, 0x3a2ec7c6, 0x62306eee, - 0xe3150bc9, 0x7f6b7f3d, 0xfe4e1a1a, 0xa650b332, 0x2775d615, - 0x166de162, 0x97488445, 0xcf562d6d, 0x4e73484a, 0xad664383, - 0x2c4326a4, 0x745d8f8c, 0xf578eaab, 0xc460dddc, 0x4545b8fb, - 0x1d5b11d3, 0x9c7e74f4, 0xfed6fe7a, 0x7ff39b5d, 0x27ed3275, - 0xa6c85752, 0x97d06025, 0x16f50502, 0x4eebac2a, 0xcfcec90d, - 0x2cdbc2c4, 0xadfea7e3, 0xf5e00ecb, 0x74c56bec, 0x45dd5c9b, - 0xc4f839bc, 0x9ce69094, 0x1dc3f5b3, 0x81bd8147, 0x0098e460, - 0x58864d48, 0xd9a3286f, 0xe8bb1f18, 0x699e7a3f, 0x3180d317, - 0xb0a5b630, 0x53b0bdf9, 0xd295d8de, 0x8a8b71f6, 0x0bae14d1, - 0x3ab623a6, 0xbb934681, 0xe38defa9, 0x62a88a8e, 0x26dcfab5, - 0xa7f99f92, 0xffe736ba, 0x7ec2539d, 0x4fda64ea, 0xceff01cd, - 0x96e1a8e5, 0x17c4cdc2, 0xf4d1c60b, 0x75f4a32c, 0x2dea0a04, - 0xaccf6f23, 0x9dd75854, 0x1cf23d73, 0x44ec945b, 0xc5c9f17c, - 0x59b78588, 0xd892e0af, 0x808c4987, 0x01a92ca0, 0x30b11bd7, - 0xb1947ef0, 0xe98ad7d8, 0x68afb2ff, 0x8bbab936, 0x0a9fdc11, - 0x52817539, 0xd3a4101e, 0xe2bc2769, 0x6399424e, 0x3b87eb66, - 0xbaa28e41, 0xd80a04cf, 0x592f61e8, 0x0131c8c0, 0x8014ade7, - 0xb10c9a90, 0x3029ffb7, 0x6837569f, 0xe91233b8, 0x0a073871, - 0x8b225d56, 0xd33cf47e, 0x52199159, 0x6301a62e, 0xe224c309, - 0xba3a6a21, 0x3b1f0f06, 0xa7617bf2, 0x26441ed5, 0x7e5ab7fd, - 0xff7fd2da, 0xce67e5ad, 0x4f42808a, 0x175c29a2, 0x96794c85, - 0x756c474c, 0xf449226b, 0xac578b43, 0x2d72ee64, 0x1c6ad913, - 0x9d4fbc34, 0xc551151c, 0x4474703b, 0x4db9f56a, 0xcc9c904d, - 0x94823965, 0x15a75c42, 0x24bf6b35, 0xa59a0e12, 0xfd84a73a, - 0x7ca1c21d, 0x9fb4c9d4, 0x1e91acf3, 0x468f05db, 0xc7aa60fc, - 0xf6b2578b, 0x779732ac, 0x2f899b84, 0xaeacfea3, 0x32d28a57, - 0xb3f7ef70, 0xebe94658, 0x6acc237f, 0x5bd41408, 0xdaf1712f, - 0x82efd807, 0x03cabd20, 0xe0dfb6e9, 0x61fad3ce, 0x39e47ae6, - 0xb8c11fc1, 0x89d928b6, 0x08fc4d91, 0x50e2e4b9, 0xd1c7819e, - 0xb36f0b10, 0x324a6e37, 0x6a54c71f, 0xeb71a238, 0xda69954f, - 0x5b4cf068, 0x03525940, 0x82773c67, 0x616237ae, 0xe0475289, - 0xb859fba1, 0x397c9e86, 0x0864a9f1, 0x8941ccd6, 0xd15f65fe, - 0x507a00d9, 0xcc04742d, 0x4d21110a, 0x153fb822, 0x941add05, - 0xa502ea72, 0x24278f55, 0x7c39267d, 0xfd1c435a, 0x1e094893, - 0x9f2c2db4, 0xc732849c, 0x4617e1bb, 0x770fd6cc, 0xf62ab3eb, - 0xae341ac3, 0x2f117fe4, 0x6b650fdf, 0xea406af8, 0xb25ec3d0, - 0x337ba6f7, 0x02639180, 0x8346f4a7, 0xdb585d8f, 0x5a7d38a8, - 0xb9683361, 0x384d5646, 0x6053ff6e, 0xe1769a49, 0xd06ead3e, - 0x514bc819, 0x09556131, 0x88700416, 0x140e70e2, 0x952b15c5, - 0xcd35bced, 0x4c10d9ca, 0x7d08eebd, 0xfc2d8b9a, 0xa43322b2, - 0x25164795, 0xc6034c5c, 0x4726297b, 0x1f388053, 0x9e1de574, - 0xaf05d203, 0x2e20b724, 0x763e1e0c, 0xf71b7b2b, 0x95b3f1a5, - 0x14969482, 0x4c883daa, 0xcdad588d, 0xfcb56ffa, 0x7d900add, - 0x258ea3f5, 0xa4abc6d2, 0x47becd1b, 0xc69ba83c, 0x9e850114, - 0x1fa06433, 0x2eb85344, 0xaf9d3663, 0xf7839f4b, 0x76a6fa6c, - 0xead88e98, 0x6bfdebbf, 0x33e34297, 0xb2c627b0, 0x83de10c7, - 0x02fb75e0, 0x5ae5dcc8, 0xdbc0b9ef, 0x38d5b226, 0xb9f0d701, - 0xe1ee7e29, 0x60cb1b0e, 0x51d32c79, 0xd0f6495e, 0x88e8e076, - 0x09cd8551}, - {0x00000000, 0x9b73ead4, 0xed96d3e9, 0x76e5393d, 0x005ca193, - 0x9b2f4b47, 0xedca727a, 0x76b998ae, 0x00b94326, 0x9bcaa9f2, - 0xed2f90cf, 0x765c7a1b, 0x00e5e2b5, 0x9b960861, 0xed73315c, - 0x7600db88, 0x0172864c, 0x9a016c98, 0xece455a5, 0x7797bf71, - 0x012e27df, 0x9a5dcd0b, 0xecb8f436, 0x77cb1ee2, 0x01cbc56a, - 0x9ab82fbe, 0xec5d1683, 0x772efc57, 0x019764f9, 0x9ae48e2d, - 0xec01b710, 0x77725dc4, 0x02e50c98, 0x9996e64c, 0xef73df71, - 0x740035a5, 0x02b9ad0b, 0x99ca47df, 0xef2f7ee2, 0x745c9436, - 0x025c4fbe, 0x992fa56a, 0xefca9c57, 0x74b97683, 0x0200ee2d, - 0x997304f9, 0xef963dc4, 0x74e5d710, 0x03978ad4, 0x98e46000, - 0xee01593d, 0x7572b3e9, 0x03cb2b47, 0x98b8c193, 0xee5df8ae, - 0x752e127a, 0x032ec9f2, 0x985d2326, 0xeeb81a1b, 0x75cbf0cf, - 0x03726861, 0x980182b5, 0xeee4bb88, 0x7597515c, 0x05ca1930, - 0x9eb9f3e4, 0xe85ccad9, 0x732f200d, 0x0596b8a3, 0x9ee55277, - 0xe8006b4a, 0x7373819e, 0x05735a16, 0x9e00b0c2, 0xe8e589ff, - 0x7396632b, 0x052ffb85, 0x9e5c1151, 0xe8b9286c, 0x73cac2b8, - 0x04b89f7c, 0x9fcb75a8, 0xe92e4c95, 0x725da641, 0x04e43eef, - 0x9f97d43b, 0xe972ed06, 0x720107d2, 0x0401dc5a, 0x9f72368e, - 0xe9970fb3, 0x72e4e567, 0x045d7dc9, 0x9f2e971d, 0xe9cbae20, - 0x72b844f4, 0x072f15a8, 0x9c5cff7c, 0xeab9c641, 0x71ca2c95, - 0x0773b43b, 0x9c005eef, 0xeae567d2, 0x71968d06, 0x0796568e, - 0x9ce5bc5a, 0xea008567, 0x71736fb3, 0x07caf71d, 0x9cb91dc9, - 0xea5c24f4, 0x712fce20, 0x065d93e4, 0x9d2e7930, 0xebcb400d, - 0x70b8aad9, 0x06013277, 0x9d72d8a3, 0xeb97e19e, 0x70e40b4a, - 0x06e4d0c2, 0x9d973a16, 0xeb72032b, 0x7001e9ff, 0x06b87151, - 0x9dcb9b85, 0xeb2ea2b8, 0x705d486c, 0x0b943260, 0x90e7d8b4, - 0xe602e189, 0x7d710b5d, 0x0bc893f3, 0x90bb7927, 0xe65e401a, - 0x7d2daace, 0x0b2d7146, 0x905e9b92, 0xe6bba2af, 0x7dc8487b, - 0x0b71d0d5, 0x90023a01, 0xe6e7033c, 0x7d94e9e8, 0x0ae6b42c, - 0x91955ef8, 0xe77067c5, 0x7c038d11, 0x0aba15bf, 0x91c9ff6b, - 0xe72cc656, 0x7c5f2c82, 0x0a5ff70a, 0x912c1dde, 0xe7c924e3, - 0x7cbace37, 0x0a035699, 0x9170bc4d, 0xe7958570, 0x7ce66fa4, - 0x09713ef8, 0x9202d42c, 0xe4e7ed11, 0x7f9407c5, 0x092d9f6b, - 0x925e75bf, 0xe4bb4c82, 0x7fc8a656, 0x09c87dde, 0x92bb970a, - 0xe45eae37, 0x7f2d44e3, 0x0994dc4d, 0x92e73699, 0xe4020fa4, - 0x7f71e570, 0x0803b8b4, 0x93705260, 0xe5956b5d, 0x7ee68189, - 0x085f1927, 0x932cf3f3, 0xe5c9cace, 0x7eba201a, 0x08bafb92, - 0x93c91146, 0xe52c287b, 0x7e5fc2af, 0x08e65a01, 0x9395b0d5, - 0xe57089e8, 0x7e03633c, 0x0e5e2b50, 0x952dc184, 0xe3c8f8b9, - 0x78bb126d, 0x0e028ac3, 0x95716017, 0xe394592a, 0x78e7b3fe, - 0x0ee76876, 0x959482a2, 0xe371bb9f, 0x7802514b, 0x0ebbc9e5, - 0x95c82331, 0xe32d1a0c, 0x785ef0d8, 0x0f2cad1c, 0x945f47c8, - 0xe2ba7ef5, 0x79c99421, 0x0f700c8f, 0x9403e65b, 0xe2e6df66, - 0x799535b2, 0x0f95ee3a, 0x94e604ee, 0xe2033dd3, 0x7970d707, - 0x0fc94fa9, 0x94baa57d, 0xe25f9c40, 0x792c7694, 0x0cbb27c8, - 0x97c8cd1c, 0xe12df421, 0x7a5e1ef5, 0x0ce7865b, 0x97946c8f, - 0xe17155b2, 0x7a02bf66, 0x0c0264ee, 0x97718e3a, 0xe194b707, - 0x7ae75dd3, 0x0c5ec57d, 0x972d2fa9, 0xe1c81694, 0x7abbfc40, - 0x0dc9a184, 0x96ba4b50, 0xe05f726d, 0x7b2c98b9, 0x0d950017, - 0x96e6eac3, 0xe003d3fe, 0x7b70392a, 0x0d70e2a2, 0x96030876, - 0xe0e6314b, 0x7b95db9f, 0x0d2c4331, 0x965fa9e5, 0xe0ba90d8, - 0x7bc97a0c}, - {0x00000000, 0x172864c0, 0x2e50c980, 0x3978ad40, 0x5ca19300, - 0x4b89f7c0, 0x72f15a80, 0x65d93e40, 0xb9432600, 0xae6b42c0, - 0x9713ef80, 0x803b8b40, 0xe5e2b500, 0xf2cad1c0, 0xcbb27c80, - 0xdc9a1840, 0xa9f74a41, 0xbedf2e81, 0x87a783c1, 0x908fe701, - 0xf556d941, 0xe27ebd81, 0xdb0610c1, 0xcc2e7401, 0x10b46c41, - 0x079c0881, 0x3ee4a5c1, 0x29ccc101, 0x4c15ff41, 0x5b3d9b81, - 0x624536c1, 0x756d5201, 0x889f92c3, 0x9fb7f603, 0xa6cf5b43, - 0xb1e73f83, 0xd43e01c3, 0xc3166503, 0xfa6ec843, 0xed46ac83, - 0x31dcb4c3, 0x26f4d003, 0x1f8c7d43, 0x08a41983, 0x6d7d27c3, - 0x7a554303, 0x432dee43, 0x54058a83, 0x2168d882, 0x3640bc42, - 0x0f381102, 0x181075c2, 0x7dc94b82, 0x6ae12f42, 0x53998202, - 0x44b1e6c2, 0x982bfe82, 0x8f039a42, 0xb67b3702, 0xa15353c2, - 0xc48a6d82, 0xd3a20942, 0xeadaa402, 0xfdf2c0c2, 0xca4e23c7, - 0xdd664707, 0xe41eea47, 0xf3368e87, 0x96efb0c7, 0x81c7d407, - 0xb8bf7947, 0xaf971d87, 0x730d05c7, 0x64256107, 0x5d5dcc47, - 0x4a75a887, 0x2fac96c7, 0x3884f207, 0x01fc5f47, 0x16d43b87, - 0x63b96986, 0x74910d46, 0x4de9a006, 0x5ac1c4c6, 0x3f18fa86, - 0x28309e46, 0x11483306, 0x066057c6, 0xdafa4f86, 0xcdd22b46, - 0xf4aa8606, 0xe382e2c6, 0x865bdc86, 0x9173b846, 0xa80b1506, - 0xbf2371c6, 0x42d1b104, 0x55f9d5c4, 0x6c817884, 0x7ba91c44, - 0x1e702204, 0x095846c4, 0x3020eb84, 0x27088f44, 0xfb929704, - 0xecbaf3c4, 0xd5c25e84, 0xc2ea3a44, 0xa7330404, 0xb01b60c4, - 0x8963cd84, 0x9e4ba944, 0xeb26fb45, 0xfc0e9f85, 0xc57632c5, - 0xd25e5605, 0xb7876845, 0xa0af0c85, 0x99d7a1c5, 0x8effc505, - 0x5265dd45, 0x454db985, 0x7c3514c5, 0x6b1d7005, 0x0ec44e45, - 0x19ec2a85, 0x209487c5, 0x37bce305, 0x4fed41cf, 0x58c5250f, - 0x61bd884f, 0x7695ec8f, 0x134cd2cf, 0x0464b60f, 0x3d1c1b4f, - 0x2a347f8f, 0xf6ae67cf, 0xe186030f, 0xd8feae4f, 0xcfd6ca8f, - 0xaa0ff4cf, 0xbd27900f, 0x845f3d4f, 0x9377598f, 0xe61a0b8e, - 0xf1326f4e, 0xc84ac20e, 0xdf62a6ce, 0xbabb988e, 0xad93fc4e, - 0x94eb510e, 0x83c335ce, 0x5f592d8e, 0x4871494e, 0x7109e40e, - 0x662180ce, 0x03f8be8e, 0x14d0da4e, 0x2da8770e, 0x3a8013ce, - 0xc772d30c, 0xd05ab7cc, 0xe9221a8c, 0xfe0a7e4c, 0x9bd3400c, - 0x8cfb24cc, 0xb583898c, 0xa2abed4c, 0x7e31f50c, 0x691991cc, - 0x50613c8c, 0x4749584c, 0x2290660c, 0x35b802cc, 0x0cc0af8c, - 0x1be8cb4c, 0x6e85994d, 0x79adfd8d, 0x40d550cd, 0x57fd340d, - 0x32240a4d, 0x250c6e8d, 0x1c74c3cd, 0x0b5ca70d, 0xd7c6bf4d, - 0xc0eedb8d, 0xf99676cd, 0xeebe120d, 0x8b672c4d, 0x9c4f488d, - 0xa537e5cd, 0xb21f810d, 0x85a36208, 0x928b06c8, 0xabf3ab88, - 0xbcdbcf48, 0xd902f108, 0xce2a95c8, 0xf7523888, 0xe07a5c48, - 0x3ce04408, 0x2bc820c8, 0x12b08d88, 0x0598e948, 0x6041d708, - 0x7769b3c8, 0x4e111e88, 0x59397a48, 0x2c542849, 0x3b7c4c89, - 0x0204e1c9, 0x152c8509, 0x70f5bb49, 0x67dddf89, 0x5ea572c9, - 0x498d1609, 0x95170e49, 0x823f6a89, 0xbb47c7c9, 0xac6fa309, - 0xc9b69d49, 0xde9ef989, 0xe7e654c9, 0xf0ce3009, 0x0d3cf0cb, - 0x1a14940b, 0x236c394b, 0x34445d8b, 0x519d63cb, 0x46b5070b, - 0x7fcdaa4b, 0x68e5ce8b, 0xb47fd6cb, 0xa357b20b, 0x9a2f1f4b, - 0x8d077b8b, 0xe8de45cb, 0xfff6210b, 0xc68e8c4b, 0xd1a6e88b, - 0xa4cbba8a, 0xb3e3de4a, 0x8a9b730a, 0x9db317ca, 0xf86a298a, - 0xef424d4a, 0xd63ae00a, 0xc11284ca, 0x1d889c8a, 0x0aa0f84a, - 0x33d8550a, 0x24f031ca, 0x41290f8a, 0x56016b4a, 0x6f79c60a, - 0x7851a2ca}, - {0x00000000, 0x9fda839e, 0xe4c4017d, 0x7b1e82e3, 0x12f904bb, - 0x8d238725, 0xf63d05c6, 0x69e78658, 0x25f20976, 0xba288ae8, - 0xc136080b, 0x5eec8b95, 0x370b0dcd, 0xa8d18e53, 0xd3cf0cb0, - 0x4c158f2e, 0x4be412ec, 0xd43e9172, 0xaf201391, 0x30fa900f, - 0x591d1657, 0xc6c795c9, 0xbdd9172a, 0x220394b4, 0x6e161b9a, - 0xf1cc9804, 0x8ad21ae7, 0x15089979, 0x7cef1f21, 0xe3359cbf, - 0x982b1e5c, 0x07f19dc2, 0x97c825d8, 0x0812a646, 0x730c24a5, - 0xecd6a73b, 0x85312163, 0x1aeba2fd, 0x61f5201e, 0xfe2fa380, - 0xb23a2cae, 0x2de0af30, 0x56fe2dd3, 0xc924ae4d, 0xa0c32815, - 0x3f19ab8b, 0x44072968, 0xdbddaaf6, 0xdc2c3734, 0x43f6b4aa, - 0x38e83649, 0xa732b5d7, 0xced5338f, 0x510fb011, 0x2a1132f2, - 0xb5cbb16c, 0xf9de3e42, 0x6604bddc, 0x1d1a3f3f, 0x82c0bca1, - 0xeb273af9, 0x74fdb967, 0x0fe33b84, 0x9039b81a, 0xf4e14df1, - 0x6b3bce6f, 0x10254c8c, 0x8fffcf12, 0xe618494a, 0x79c2cad4, - 0x02dc4837, 0x9d06cba9, 0xd1134487, 0x4ec9c719, 0x35d745fa, - 0xaa0dc664, 0xc3ea403c, 0x5c30c3a2, 0x272e4141, 0xb8f4c2df, - 0xbf055f1d, 0x20dfdc83, 0x5bc15e60, 0xc41bddfe, 0xadfc5ba6, - 0x3226d838, 0x49385adb, 0xd6e2d945, 0x9af7566b, 0x052dd5f5, - 0x7e335716, 0xe1e9d488, 0x880e52d0, 0x17d4d14e, 0x6cca53ad, - 0xf310d033, 0x63296829, 0xfcf3ebb7, 0x87ed6954, 0x1837eaca, - 0x71d06c92, 0xee0aef0c, 0x95146def, 0x0aceee71, 0x46db615f, - 0xd901e2c1, 0xa21f6022, 0x3dc5e3bc, 0x542265e4, 0xcbf8e67a, - 0xb0e66499, 0x2f3ce707, 0x28cd7ac5, 0xb717f95b, 0xcc097bb8, - 0x53d3f826, 0x3a347e7e, 0xa5eefde0, 0xdef07f03, 0x412afc9d, - 0x0d3f73b3, 0x92e5f02d, 0xe9fb72ce, 0x7621f150, 0x1fc67708, - 0x801cf496, 0xfb027675, 0x64d8f5eb, 0x32b39da3, 0xad691e3d, - 0xd6779cde, 0x49ad1f40, 0x204a9918, 0xbf901a86, 0xc48e9865, - 0x5b541bfb, 0x174194d5, 0x889b174b, 0xf38595a8, 0x6c5f1636, - 0x05b8906e, 0x9a6213f0, 0xe17c9113, 0x7ea6128d, 0x79578f4f, - 0xe68d0cd1, 0x9d938e32, 0x02490dac, 0x6bae8bf4, 0xf474086a, - 0x8f6a8a89, 0x10b00917, 0x5ca58639, 0xc37f05a7, 0xb8618744, - 0x27bb04da, 0x4e5c8282, 0xd186011c, 0xaa9883ff, 0x35420061, - 0xa57bb87b, 0x3aa13be5, 0x41bfb906, 0xde653a98, 0xb782bcc0, - 0x28583f5e, 0x5346bdbd, 0xcc9c3e23, 0x8089b10d, 0x1f533293, - 0x644db070, 0xfb9733ee, 0x9270b5b6, 0x0daa3628, 0x76b4b4cb, - 0xe96e3755, 0xee9faa97, 0x71452909, 0x0a5babea, 0x95812874, - 0xfc66ae2c, 0x63bc2db2, 0x18a2af51, 0x87782ccf, 0xcb6da3e1, - 0x54b7207f, 0x2fa9a29c, 0xb0732102, 0xd994a75a, 0x464e24c4, - 0x3d50a627, 0xa28a25b9, 0xc652d052, 0x598853cc, 0x2296d12f, - 0xbd4c52b1, 0xd4abd4e9, 0x4b715777, 0x306fd594, 0xafb5560a, - 0xe3a0d924, 0x7c7a5aba, 0x0764d859, 0x98be5bc7, 0xf159dd9f, - 0x6e835e01, 0x159ddce2, 0x8a475f7c, 0x8db6c2be, 0x126c4120, - 0x6972c3c3, 0xf6a8405d, 0x9f4fc605, 0x0095459b, 0x7b8bc778, - 0xe45144e6, 0xa844cbc8, 0x379e4856, 0x4c80cab5, 0xd35a492b, - 0xbabdcf73, 0x25674ced, 0x5e79ce0e, 0xc1a34d90, 0x519af58a, - 0xce407614, 0xb55ef4f7, 0x2a847769, 0x4363f131, 0xdcb972af, - 0xa7a7f04c, 0x387d73d2, 0x7468fcfc, 0xebb27f62, 0x90acfd81, - 0x0f767e1f, 0x6691f847, 0xf94b7bd9, 0x8255f93a, 0x1d8f7aa4, - 0x1a7ee766, 0x85a464f8, 0xfebae61b, 0x61606585, 0x0887e3dd, - 0x975d6043, 0xec43e2a0, 0x7399613e, 0x3f8cee10, 0xa0566d8e, - 0xdb48ef6d, 0x44926cf3, 0x2d75eaab, 0xb2af6935, 0xc9b1ebd6, - 0x566b6848}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0x9e83da9f, 0x7d01c4e4, 0xe3821e7b, 0xbb04f912, - 0x2587238d, 0xc6053df6, 0x5886e769, 0x7609f225, 0xe88a28ba, - 0x0b0836c1, 0x958bec5e, 0xcd0d0b37, 0x538ed1a8, 0xb00ccfd3, - 0x2e8f154c, 0xec12e44b, 0x72913ed4, 0x911320af, 0x0f90fa30, - 0x57161d59, 0xc995c7c6, 0x2a17d9bd, 0xb4940322, 0x9a1b166e, - 0x0498ccf1, 0xe71ad28a, 0x79990815, 0x211fef7c, 0xbf9c35e3, - 0x5c1e2b98, 0xc29df107, 0xd825c897, 0x46a61208, 0xa5240c73, - 0x3ba7d6ec, 0x63213185, 0xfda2eb1a, 0x1e20f561, 0x80a32ffe, - 0xae2c3ab2, 0x30afe02d, 0xd32dfe56, 0x4dae24c9, 0x1528c3a0, - 0x8bab193f, 0x68290744, 0xf6aadddb, 0x34372cdc, 0xaab4f643, - 0x4936e838, 0xd7b532a7, 0x8f33d5ce, 0x11b00f51, 0xf232112a, - 0x6cb1cbb5, 0x423edef9, 0xdcbd0466, 0x3f3f1a1d, 0xa1bcc082, - 0xf93a27eb, 0x67b9fd74, 0x843be30f, 0x1ab83990, 0xf14de1f4, - 0x6fce3b6b, 0x8c4c2510, 0x12cfff8f, 0x4a4918e6, 0xd4cac279, - 0x3748dc02, 0xa9cb069d, 0x874413d1, 0x19c7c94e, 0xfa45d735, - 0x64c60daa, 0x3c40eac3, 0xa2c3305c, 0x41412e27, 0xdfc2f4b8, - 0x1d5f05bf, 0x83dcdf20, 0x605ec15b, 0xfedd1bc4, 0xa65bfcad, - 0x38d82632, 0xdb5a3849, 0x45d9e2d6, 0x6b56f79a, 0xf5d52d05, - 0x1657337e, 0x88d4e9e1, 0xd0520e88, 0x4ed1d417, 0xad53ca6c, - 0x33d010f3, 0x29682963, 0xb7ebf3fc, 0x5469ed87, 0xcaea3718, - 0x926cd071, 0x0cef0aee, 0xef6d1495, 0x71eece0a, 0x5f61db46, - 0xc1e201d9, 0x22601fa2, 0xbce3c53d, 0xe4652254, 0x7ae6f8cb, - 0x9964e6b0, 0x07e73c2f, 0xc57acd28, 0x5bf917b7, 0xb87b09cc, - 0x26f8d353, 0x7e7e343a, 0xe0fdeea5, 0x037ff0de, 0x9dfc2a41, - 0xb3733f0d, 0x2df0e592, 0xce72fbe9, 0x50f12176, 0x0877c61f, - 0x96f41c80, 0x757602fb, 0xebf5d864, 0xa39db332, 0x3d1e69ad, - 0xde9c77d6, 0x401fad49, 0x18994a20, 0x861a90bf, 0x65988ec4, - 0xfb1b545b, 0xd5944117, 0x4b179b88, 0xa89585f3, 0x36165f6c, - 0x6e90b805, 0xf013629a, 0x13917ce1, 0x8d12a67e, 0x4f8f5779, - 0xd10c8de6, 0x328e939d, 0xac0d4902, 0xf48bae6b, 0x6a0874f4, - 0x898a6a8f, 0x1709b010, 0x3986a55c, 0xa7057fc3, 0x448761b8, - 0xda04bb27, 0x82825c4e, 0x1c0186d1, 0xff8398aa, 0x61004235, - 0x7bb87ba5, 0xe53ba13a, 0x06b9bf41, 0x983a65de, 0xc0bc82b7, - 0x5e3f5828, 0xbdbd4653, 0x233e9ccc, 0x0db18980, 0x9332531f, - 0x70b04d64, 0xee3397fb, 0xb6b57092, 0x2836aa0d, 0xcbb4b476, - 0x55376ee9, 0x97aa9fee, 0x09294571, 0xeaab5b0a, 0x74288195, - 0x2cae66fc, 0xb22dbc63, 0x51afa218, 0xcf2c7887, 0xe1a36dcb, - 0x7f20b754, 0x9ca2a92f, 0x022173b0, 0x5aa794d9, 0xc4244e46, - 0x27a6503d, 0xb9258aa2, 0x52d052c6, 0xcc538859, 0x2fd19622, - 0xb1524cbd, 0xe9d4abd4, 0x7757714b, 0x94d56f30, 0x0a56b5af, - 0x24d9a0e3, 0xba5a7a7c, 0x59d86407, 0xc75bbe98, 0x9fdd59f1, - 0x015e836e, 0xe2dc9d15, 0x7c5f478a, 0xbec2b68d, 0x20416c12, - 0xc3c37269, 0x5d40a8f6, 0x05c64f9f, 0x9b459500, 0x78c78b7b, - 0xe64451e4, 0xc8cb44a8, 0x56489e37, 0xb5ca804c, 0x2b495ad3, - 0x73cfbdba, 0xed4c6725, 0x0ece795e, 0x904da3c1, 0x8af59a51, - 0x147640ce, 0xf7f45eb5, 0x6977842a, 0x31f16343, 0xaf72b9dc, - 0x4cf0a7a7, 0xd2737d38, 0xfcfc6874, 0x627fb2eb, 0x81fdac90, - 0x1f7e760f, 0x47f89166, 0xd97b4bf9, 0x3af95582, 0xa47a8f1d, - 0x66e77e1a, 0xf864a485, 0x1be6bafe, 0x85656061, 0xdde38708, - 0x43605d97, 0xa0e243ec, 0x3e619973, 0x10ee8c3f, 0x8e6d56a0, - 0x6def48db, 0xf36c9244, 0xabea752d, 0x3569afb2, 0xd6ebb1c9, - 0x48686b56}, - {0x00000000, 0xc0642817, 0x80c9502e, 0x40ad7839, 0x0093a15c, - 0xc0f7894b, 0x805af172, 0x403ed965, 0x002643b9, 0xc0426bae, - 0x80ef1397, 0x408b3b80, 0x00b5e2e5, 0xc0d1caf2, 0x807cb2cb, - 0x40189adc, 0x414af7a9, 0x812edfbe, 0xc183a787, 0x01e78f90, - 0x41d956f5, 0x81bd7ee2, 0xc11006db, 0x01742ecc, 0x416cb410, - 0x81089c07, 0xc1a5e43e, 0x01c1cc29, 0x41ff154c, 0x819b3d5b, - 0xc1364562, 0x01526d75, 0xc3929f88, 0x03f6b79f, 0x435bcfa6, - 0x833fe7b1, 0xc3013ed4, 0x036516c3, 0x43c86efa, 0x83ac46ed, - 0xc3b4dc31, 0x03d0f426, 0x437d8c1f, 0x8319a408, 0xc3277d6d, - 0x0343557a, 0x43ee2d43, 0x838a0554, 0x82d86821, 0x42bc4036, - 0x0211380f, 0xc2751018, 0x824bc97d, 0x422fe16a, 0x02829953, - 0xc2e6b144, 0x82fe2b98, 0x429a038f, 0x02377bb6, 0xc25353a1, - 0x826d8ac4, 0x4209a2d3, 0x02a4daea, 0xc2c0f2fd, 0xc7234eca, - 0x074766dd, 0x47ea1ee4, 0x878e36f3, 0xc7b0ef96, 0x07d4c781, - 0x4779bfb8, 0x871d97af, 0xc7050d73, 0x07612564, 0x47cc5d5d, - 0x87a8754a, 0xc796ac2f, 0x07f28438, 0x475ffc01, 0x873bd416, - 0x8669b963, 0x460d9174, 0x06a0e94d, 0xc6c4c15a, 0x86fa183f, - 0x469e3028, 0x06334811, 0xc6576006, 0x864ffada, 0x462bd2cd, - 0x0686aaf4, 0xc6e282e3, 0x86dc5b86, 0x46b87391, 0x06150ba8, - 0xc67123bf, 0x04b1d142, 0xc4d5f955, 0x8478816c, 0x441ca97b, - 0x0422701e, 0xc4465809, 0x84eb2030, 0x448f0827, 0x049792fb, - 0xc4f3baec, 0x845ec2d5, 0x443aeac2, 0x040433a7, 0xc4601bb0, - 0x84cd6389, 0x44a94b9e, 0x45fb26eb, 0x859f0efc, 0xc53276c5, - 0x05565ed2, 0x456887b7, 0x850cafa0, 0xc5a1d799, 0x05c5ff8e, - 0x45dd6552, 0x85b94d45, 0xc514357c, 0x05701d6b, 0x454ec40e, - 0x852aec19, 0xc5879420, 0x05e3bc37, 0xcf41ed4f, 0x0f25c558, - 0x4f88bd61, 0x8fec9576, 0xcfd24c13, 0x0fb66404, 0x4f1b1c3d, - 0x8f7f342a, 0xcf67aef6, 0x0f0386e1, 0x4faefed8, 0x8fcad6cf, - 0xcff40faa, 0x0f9027bd, 0x4f3d5f84, 0x8f597793, 0x8e0b1ae6, - 0x4e6f32f1, 0x0ec24ac8, 0xcea662df, 0x8e98bbba, 0x4efc93ad, - 0x0e51eb94, 0xce35c383, 0x8e2d595f, 0x4e497148, 0x0ee40971, - 0xce802166, 0x8ebef803, 0x4edad014, 0x0e77a82d, 0xce13803a, - 0x0cd372c7, 0xccb75ad0, 0x8c1a22e9, 0x4c7e0afe, 0x0c40d39b, - 0xcc24fb8c, 0x8c8983b5, 0x4cedaba2, 0x0cf5317e, 0xcc911969, - 0x8c3c6150, 0x4c584947, 0x0c669022, 0xcc02b835, 0x8cafc00c, - 0x4ccbe81b, 0x4d99856e, 0x8dfdad79, 0xcd50d540, 0x0d34fd57, - 0x4d0a2432, 0x8d6e0c25, 0xcdc3741c, 0x0da75c0b, 0x4dbfc6d7, - 0x8ddbeec0, 0xcd7696f9, 0x0d12beee, 0x4d2c678b, 0x8d484f9c, - 0xcde537a5, 0x0d811fb2, 0x0862a385, 0xc8068b92, 0x88abf3ab, - 0x48cfdbbc, 0x08f102d9, 0xc8952ace, 0x883852f7, 0x485c7ae0, - 0x0844e03c, 0xc820c82b, 0x888db012, 0x48e99805, 0x08d74160, - 0xc8b36977, 0x881e114e, 0x487a3959, 0x4928542c, 0x894c7c3b, - 0xc9e10402, 0x09852c15, 0x49bbf570, 0x89dfdd67, 0xc972a55e, - 0x09168d49, 0x490e1795, 0x896a3f82, 0xc9c747bb, 0x09a36fac, - 0x499db6c9, 0x89f99ede, 0xc954e6e7, 0x0930cef0, 0xcbf03c0d, - 0x0b94141a, 0x4b396c23, 0x8b5d4434, 0xcb639d51, 0x0b07b546, - 0x4baacd7f, 0x8bcee568, 0xcbd67fb4, 0x0bb257a3, 0x4b1f2f9a, - 0x8b7b078d, 0xcb45dee8, 0x0b21f6ff, 0x4b8c8ec6, 0x8be8a6d1, - 0x8abacba4, 0x4adee3b3, 0x0a739b8a, 0xca17b39d, 0x8a296af8, - 0x4a4d42ef, 0x0ae03ad6, 0xca8412c1, 0x8a9c881d, 0x4af8a00a, - 0x0a55d833, 0xca31f024, 0x8a0f2941, 0x4a6b0156, 0x0ac6796f, - 0xcaa25178}, - {0x00000000, 0xd4ea739b, 0xe9d396ed, 0x3d39e576, 0x93a15c00, - 0x474b2f9b, 0x7a72caed, 0xae98b976, 0x2643b900, 0xf2a9ca9b, - 0xcf902fed, 0x1b7a5c76, 0xb5e2e500, 0x6108969b, 0x5c3173ed, - 0x88db0076, 0x4c867201, 0x986c019a, 0xa555e4ec, 0x71bf9777, - 0xdf272e01, 0x0bcd5d9a, 0x36f4b8ec, 0xe21ecb77, 0x6ac5cb01, - 0xbe2fb89a, 0x83165dec, 0x57fc2e77, 0xf9649701, 0x2d8ee49a, - 0x10b701ec, 0xc45d7277, 0x980ce502, 0x4ce69699, 0x71df73ef, - 0xa5350074, 0x0badb902, 0xdf47ca99, 0xe27e2fef, 0x36945c74, - 0xbe4f5c02, 0x6aa52f99, 0x579ccaef, 0x8376b974, 0x2dee0002, - 0xf9047399, 0xc43d96ef, 0x10d7e574, 0xd48a9703, 0x0060e498, - 0x3d5901ee, 0xe9b37275, 0x472bcb03, 0x93c1b898, 0xaef85dee, - 0x7a122e75, 0xf2c92e03, 0x26235d98, 0x1b1ab8ee, 0xcff0cb75, - 0x61687203, 0xb5820198, 0x88bbe4ee, 0x5c519775, 0x3019ca05, - 0xe4f3b99e, 0xd9ca5ce8, 0x0d202f73, 0xa3b89605, 0x7752e59e, - 0x4a6b00e8, 0x9e817373, 0x165a7305, 0xc2b0009e, 0xff89e5e8, - 0x2b639673, 0x85fb2f05, 0x51115c9e, 0x6c28b9e8, 0xb8c2ca73, - 0x7c9fb804, 0xa875cb9f, 0x954c2ee9, 0x41a65d72, 0xef3ee404, - 0x3bd4979f, 0x06ed72e9, 0xd2070172, 0x5adc0104, 0x8e36729f, - 0xb30f97e9, 0x67e5e472, 0xc97d5d04, 0x1d972e9f, 0x20aecbe9, - 0xf444b872, 0xa8152f07, 0x7cff5c9c, 0x41c6b9ea, 0x952cca71, - 0x3bb47307, 0xef5e009c, 0xd267e5ea, 0x068d9671, 0x8e569607, - 0x5abce59c, 0x678500ea, 0xb36f7371, 0x1df7ca07, 0xc91db99c, - 0xf4245cea, 0x20ce2f71, 0xe4935d06, 0x30792e9d, 0x0d40cbeb, - 0xd9aab870, 0x77320106, 0xa3d8729d, 0x9ee197eb, 0x4a0be470, - 0xc2d0e406, 0x163a979d, 0x2b0372eb, 0xffe90170, 0x5171b806, - 0x859bcb9d, 0xb8a22eeb, 0x6c485d70, 0x6032940b, 0xb4d8e790, - 0x89e102e6, 0x5d0b717d, 0xf393c80b, 0x2779bb90, 0x1a405ee6, - 0xceaa2d7d, 0x46712d0b, 0x929b5e90, 0xafa2bbe6, 0x7b48c87d, - 0xd5d0710b, 0x013a0290, 0x3c03e7e6, 0xe8e9947d, 0x2cb4e60a, - 0xf85e9591, 0xc56770e7, 0x118d037c, 0xbf15ba0a, 0x6bffc991, - 0x56c62ce7, 0x822c5f7c, 0x0af75f0a, 0xde1d2c91, 0xe324c9e7, - 0x37ceba7c, 0x9956030a, 0x4dbc7091, 0x708595e7, 0xa46fe67c, - 0xf83e7109, 0x2cd40292, 0x11ede7e4, 0xc507947f, 0x6b9f2d09, - 0xbf755e92, 0x824cbbe4, 0x56a6c87f, 0xde7dc809, 0x0a97bb92, - 0x37ae5ee4, 0xe3442d7f, 0x4ddc9409, 0x9936e792, 0xa40f02e4, - 0x70e5717f, 0xb4b80308, 0x60527093, 0x5d6b95e5, 0x8981e67e, - 0x27195f08, 0xf3f32c93, 0xcecac9e5, 0x1a20ba7e, 0x92fbba08, - 0x4611c993, 0x7b282ce5, 0xafc25f7e, 0x015ae608, 0xd5b09593, - 0xe88970e5, 0x3c63037e, 0x502b5e0e, 0x84c12d95, 0xb9f8c8e3, - 0x6d12bb78, 0xc38a020e, 0x17607195, 0x2a5994e3, 0xfeb3e778, - 0x7668e70e, 0xa2829495, 0x9fbb71e3, 0x4b510278, 0xe5c9bb0e, - 0x3123c895, 0x0c1a2de3, 0xd8f05e78, 0x1cad2c0f, 0xc8475f94, - 0xf57ebae2, 0x2194c979, 0x8f0c700f, 0x5be60394, 0x66dfe6e2, - 0xb2359579, 0x3aee950f, 0xee04e694, 0xd33d03e2, 0x07d77079, - 0xa94fc90f, 0x7da5ba94, 0x409c5fe2, 0x94762c79, 0xc827bb0c, - 0x1ccdc897, 0x21f42de1, 0xf51e5e7a, 0x5b86e70c, 0x8f6c9497, - 0xb25571e1, 0x66bf027a, 0xee64020c, 0x3a8e7197, 0x07b794e1, - 0xd35de77a, 0x7dc55e0c, 0xa92f2d97, 0x9416c8e1, 0x40fcbb7a, - 0x84a1c90d, 0x504bba96, 0x6d725fe0, 0xb9982c7b, 0x1700950d, - 0xc3eae696, 0xfed303e0, 0x2a39707b, 0xa2e2700d, 0x76080396, - 0x4b31e6e0, 0x9fdb957b, 0x31432c0d, 0xe5a95f96, 0xd890bae0, - 0x0c7ac97b}, - {0x00000000, 0x27652581, 0x0fcc3bd9, 0x28a91e58, 0x5f9e0669, - 0x78fb23e8, 0x50523db0, 0x77371831, 0xbe3c0dd2, 0x99592853, - 0xb1f0360b, 0x9695138a, 0xe1a20bbb, 0xc6c72e3a, 0xee6e3062, - 0xc90b15e3, 0x3d7f6b7f, 0x1a1a4efe, 0x32b350a6, 0x15d67527, - 0x62e16d16, 0x45844897, 0x6d2d56cf, 0x4a48734e, 0x834366ad, - 0xa426432c, 0x8c8f5d74, 0xabea78f5, 0xdcdd60c4, 0xfbb84545, - 0xd3115b1d, 0xf4747e9c, 0x7afed6fe, 0x5d9bf37f, 0x7532ed27, - 0x5257c8a6, 0x2560d097, 0x0205f516, 0x2aaceb4e, 0x0dc9cecf, - 0xc4c2db2c, 0xe3a7fead, 0xcb0ee0f5, 0xec6bc574, 0x9b5cdd45, - 0xbc39f8c4, 0x9490e69c, 0xb3f5c31d, 0x4781bd81, 0x60e49800, - 0x484d8658, 0x6f28a3d9, 0x181fbbe8, 0x3f7a9e69, 0x17d38031, - 0x30b6a5b0, 0xf9bdb053, 0xded895d2, 0xf6718b8a, 0xd114ae0b, - 0xa623b63a, 0x814693bb, 0xa9ef8de3, 0x8e8aa862, 0xb5fadc26, - 0x929ff9a7, 0xba36e7ff, 0x9d53c27e, 0xea64da4f, 0xcd01ffce, - 0xe5a8e196, 0xc2cdc417, 0x0bc6d1f4, 0x2ca3f475, 0x040aea2d, - 0x236fcfac, 0x5458d79d, 0x733df21c, 0x5b94ec44, 0x7cf1c9c5, - 0x8885b759, 0xafe092d8, 0x87498c80, 0xa02ca901, 0xd71bb130, - 0xf07e94b1, 0xd8d78ae9, 0xffb2af68, 0x36b9ba8b, 0x11dc9f0a, - 0x39758152, 0x1e10a4d3, 0x6927bce2, 0x4e429963, 0x66eb873b, - 0x418ea2ba, 0xcf040ad8, 0xe8612f59, 0xc0c83101, 0xe7ad1480, - 0x909a0cb1, 0xb7ff2930, 0x9f563768, 0xb83312e9, 0x7138070a, - 0x565d228b, 0x7ef43cd3, 0x59911952, 0x2ea60163, 0x09c324e2, - 0x216a3aba, 0x060f1f3b, 0xf27b61a7, 0xd51e4426, 0xfdb75a7e, - 0xdad27fff, 0xade567ce, 0x8a80424f, 0xa2295c17, 0x854c7996, - 0x4c476c75, 0x6b2249f4, 0x438b57ac, 0x64ee722d, 0x13d96a1c, - 0x34bc4f9d, 0x1c1551c5, 0x3b707444, 0x6af5b94d, 0x4d909ccc, - 0x65398294, 0x425ca715, 0x356bbf24, 0x120e9aa5, 0x3aa784fd, - 0x1dc2a17c, 0xd4c9b49f, 0xf3ac911e, 0xdb058f46, 0xfc60aac7, - 0x8b57b2f6, 0xac329777, 0x849b892f, 0xa3feacae, 0x578ad232, - 0x70eff7b3, 0x5846e9eb, 0x7f23cc6a, 0x0814d45b, 0x2f71f1da, - 0x07d8ef82, 0x20bdca03, 0xe9b6dfe0, 0xced3fa61, 0xe67ae439, - 0xc11fc1b8, 0xb628d989, 0x914dfc08, 0xb9e4e250, 0x9e81c7d1, - 0x100b6fb3, 0x376e4a32, 0x1fc7546a, 0x38a271eb, 0x4f9569da, - 0x68f04c5b, 0x40595203, 0x673c7782, 0xae376261, 0x895247e0, - 0xa1fb59b8, 0x869e7c39, 0xf1a96408, 0xd6cc4189, 0xfe655fd1, - 0xd9007a50, 0x2d7404cc, 0x0a11214d, 0x22b83f15, 0x05dd1a94, - 0x72ea02a5, 0x558f2724, 0x7d26397c, 0x5a431cfd, 0x9348091e, - 0xb42d2c9f, 0x9c8432c7, 0xbbe11746, 0xccd60f77, 0xebb32af6, - 0xc31a34ae, 0xe47f112f, 0xdf0f656b, 0xf86a40ea, 0xd0c35eb2, - 0xf7a67b33, 0x80916302, 0xa7f44683, 0x8f5d58db, 0xa8387d5a, - 0x613368b9, 0x46564d38, 0x6eff5360, 0x499a76e1, 0x3ead6ed0, - 0x19c84b51, 0x31615509, 0x16047088, 0xe2700e14, 0xc5152b95, - 0xedbc35cd, 0xcad9104c, 0xbdee087d, 0x9a8b2dfc, 0xb22233a4, - 0x95471625, 0x5c4c03c6, 0x7b292647, 0x5380381f, 0x74e51d9e, - 0x03d205af, 0x24b7202e, 0x0c1e3e76, 0x2b7b1bf7, 0xa5f1b395, - 0x82949614, 0xaa3d884c, 0x8d58adcd, 0xfa6fb5fc, 0xdd0a907d, - 0xf5a38e25, 0xd2c6aba4, 0x1bcdbe47, 0x3ca89bc6, 0x1401859e, - 0x3364a01f, 0x4453b82e, 0x63369daf, 0x4b9f83f7, 0x6cfaa676, - 0x988ed8ea, 0xbfebfd6b, 0x9742e333, 0xb027c6b2, 0xc710de83, - 0xe075fb02, 0xc8dce55a, 0xefb9c0db, 0x26b2d538, 0x01d7f0b9, - 0x297eeee1, 0x0e1bcb60, 0x792cd351, 0x5e49f6d0, 0x76e0e888, - 0x5185cd09}}; - -#endif - -#endif - -#endif - -local const z_crc_t FAR x2n_table[] = { - 0x40000000, 0x20000000, 0x08000000, 0x00800000, 0x00008000, - 0xedb88320, 0xb1e6b092, 0xa06a2517, 0xed627dae, 0x88d14467, - 0xd7bbfe6a, 0xec447f11, 0x8e7ea170, 0x6427800e, 0x4d47bae0, - 0x09fe548f, 0x83852d0f, 0x30362f1a, 0x7b5a9cc3, 0x31fec169, - 0x9fec022a, 0x6c8dedc4, 0x15d6874d, 0x5fde7a4e, 0xbad90e37, - 0x2e4e5eef, 0x4eaba214, 0xa8a472c0, 0x429a969e, 0x148d302a, - 0xc40ba6d0, 0xc4e22c3c}; diff --git a/thirdparty/zlib-1.2.12/deflate.c b/thirdparty/zlib-1.2.12/deflate.c deleted file mode 100644 index 799fb93..0000000 --- a/thirdparty/zlib-1.2.12/deflate.c +++ /dev/null @@ -1,2211 +0,0 @@ -/* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * ALGORITHM - * - * The "deflation" process depends on being able to identify portions - * of the input text which are identical to earlier input (within a - * sliding window trailing behind the input currently being processed). - * - * The most straightforward technique turns out to be the fastest for - * most input files: try all possible matches and select the longest. - * The key feature of this algorithm is that insertions into the string - * dictionary are very simple and thus fast, and deletions are avoided - * completely. Insertions are performed at each input character, whereas - * string matches are performed only when the previous match ends. So it - * is preferable to spend more time in matches to allow very fast string - * insertions and avoid deletions. The matching algorithm for small - * strings is inspired from that of Rabin & Karp. A brute force approach - * is used to find longer strings when a small match has been found. - * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze - * (by Leonid Broukhis). - * A previous version of this file used a more sophisticated algorithm - * (by Fiala and Greene) which is guaranteed to run in linear amortized - * time, but has a larger average cost, uses more memory and is patented. - * However the F&G algorithm may be faster for some highly redundant - * files if the parameter max_chain_length (described below) is too large. - * - * ACKNOWLEDGEMENTS - * - * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and - * I found it in 'freeze' written by Leonid Broukhis. - * Thanks to many people for bug reports and testing. - * - * REFERENCES - * - * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification". - * Available in http://tools.ietf.org/html/rfc1951 - * - * A description of the Rabin and Karp algorithm is given in the book - * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. - * - * Fiala,E.R., and Greene,D.H. - * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 - * - */ - -/* @(#) $Id$ */ - -#include "deflate.h" - -const char deflate_copyright[] = - " deflate 1.2.12 Copyright 1995-2022 Jean-loup Gailly and Mark Adler "; -/* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot - include such an acknowledgment, I would appreciate that you keep this - copyright string in the executable of your product. - */ - -/* =========================================================================== - * Function prototypes. - */ -typedef enum { - need_more, /* block not completed, need more input or more output */ - block_done, /* block flush performed */ - finish_started, /* finish started, need only more output at next deflate */ - finish_done /* finish done, accept no more input or output */ -} block_state; - -typedef block_state (*compress_func) OF((deflate_state *s, int flush)); -/* Compression function. Returns the block state after the call. */ - -local int deflateStateCheck OF((z_streamp strm)); -local void slide_hash OF((deflate_state *s)); -local void fill_window OF((deflate_state *s)); -local block_state deflate_stored OF((deflate_state *s, int flush)); -local block_state deflate_fast OF((deflate_state *s, int flush)); -#ifndef FASTEST -local block_state deflate_slow OF((deflate_state *s, int flush)); -#endif -local block_state deflate_rle OF((deflate_state *s, int flush)); -local block_state deflate_huff OF((deflate_state *s, int flush)); -local void lm_init OF((deflate_state *s)); -local void putShortMSB OF((deflate_state *s, uInt b)); -local void flush_pending OF((z_streamp strm)); -local unsigned read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); -#ifdef ASMV -# pragma message("Assembler code may have bugs -- use at your own risk") - void match_init OF((void)); /* asm code initialization */ - uInt longest_match OF((deflate_state *s, IPos cur_match)); -#else -local uInt longest_match OF((deflate_state *s, IPos cur_match)); -#endif - -#ifdef ZLIB_DEBUG -local void check_match OF((deflate_state *s, IPos start, IPos match, - int length)); -#endif - -/* =========================================================================== - * Local data - */ - -#define NIL 0 -/* Tail of hash chains */ - -#ifndef TOO_FAR -# define TOO_FAR 4096 -#endif -/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -typedef struct config_s { - ush good_length; /* reduce lazy search above this match length */ - ush max_lazy; /* do not perform lazy search above this match length */ - ush nice_length; /* quit search above this match length */ - ush max_chain; - compress_func func; -} config; - -#ifdef FASTEST -local const config configuration_table[2] = { -/* good lazy nice chain */ -/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ -/* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */ -#else -local const config configuration_table[10] = { -/* good lazy nice chain */ -/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ -/* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */ -/* 2 */ {4, 5, 16, 8, deflate_fast}, -/* 3 */ {4, 6, 32, 32, deflate_fast}, - -/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */ -/* 5 */ {8, 16, 32, 32, deflate_slow}, -/* 6 */ {8, 16, 128, 128, deflate_slow}, -/* 7 */ {8, 32, 128, 256, deflate_slow}, -/* 8 */ {32, 128, 258, 1024, deflate_slow}, -/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */ -#endif - -/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 - * For deflate_fast() (levels <= 3) good is ignored and lazy has a different - * meaning. - */ - -/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ -#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0)) - -/* =========================================================================== - * Update a hash value with the given input byte - * IN assertion: all calls to UPDATE_HASH are made with consecutive input - * characters, so that a running hash key can be computed from the previous - * key instead of complete recalculation each time. - */ -#define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) - - -/* =========================================================================== - * Insert string str in the dictionary and set match_head to the previous head - * of the hash chain (the most recent string with same hash key). Return - * the previous length of the hash chain. - * If this file is compiled with -DFASTEST, the compression level is forced - * to 1, and no hash chains are maintained. - * IN assertion: all calls to INSERT_STRING are made with consecutive input - * characters and the first MIN_MATCH bytes of str are valid (except for - * the last MIN_MATCH-1 bytes of the input file). - */ -#ifdef FASTEST -#define INSERT_STRING(s, str, match_head) \ - (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ - match_head = s->head[s->ins_h], \ - s->head[s->ins_h] = (Pos)(str)) -#else -#define INSERT_STRING(s, str, match_head) \ - (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ - match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \ - s->head[s->ins_h] = (Pos)(str)) -#endif - -/* =========================================================================== - * Initialize the hash table (avoiding 64K overflow for 16 bit systems). - * prev[] will be initialized on the fly. - */ -#define CLEAR_HASH(s) \ - do { \ - s->head[s->hash_size-1] = NIL; \ - zmemzero((Bytef *)s->head, \ - (unsigned)(s->hash_size-1)*sizeof(*s->head)); \ - } while (0) - -/* =========================================================================== - * Slide the hash table when sliding the window down (could be avoided with 32 - * bit values at the expense of memory usage). We slide even when level == 0 to - * keep the hash table consistent if we switch back to level > 0 later. - */ -local void slide_hash(s) - deflate_state *s; -{ - unsigned n, m; - Posf *p; - uInt wsize = s->w_size; - - n = s->hash_size; - p = &s->head[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m - wsize : NIL); - } while (--n); - n = wsize; -#ifndef FASTEST - p = &s->prev[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m - wsize : NIL); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); -#endif -} - -/* ========================================================================= */ -int ZEXPORT deflateInit_(strm, level, version, stream_size) - z_streamp strm; - int level; - const char *version; - int stream_size; -{ - return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, - Z_DEFAULT_STRATEGY, version, stream_size); - /* To do: ignore strm->next_in if we use it as window */ -} - -/* ========================================================================= */ -int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, - version, stream_size) - z_streamp strm; - int level; - int method; - int windowBits; - int memLevel; - int strategy; - const char *version; - int stream_size; -{ - deflate_state *s; - int wrap = 1; - static const char my_version[] = ZLIB_VERSION; - - if (version == Z_NULL || version[0] != my_version[0] || - stream_size != sizeof(z_stream)) { - return Z_VERSION_ERROR; - } - if (strm == Z_NULL) return Z_STREAM_ERROR; - - strm->msg = Z_NULL; - if (strm->zalloc == (alloc_func)0) { -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; -#endif - } - if (strm->zfree == (free_func)0) -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zfree = zcfree; -#endif - -#ifdef FASTEST - if (level != 0) level = 1; -#else - if (level == Z_DEFAULT_COMPRESSION) level = 6; -#endif - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } -#ifdef GZIP - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } -#endif - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED || (windowBits == 8 && wrap != 1)) { - return Z_STREAM_ERROR; - } - if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ - s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); - if (s == Z_NULL) return Z_MEM_ERROR; - strm->state = (struct internal_state FAR *)s; - s->strm = strm; - s->status = INIT_STATE; /* to pass state test in deflateReset() */ - - s->wrap = wrap; - s->gzhead = Z_NULL; - s->w_bits = (uInt)windowBits; - s->w_size = 1 << s->w_bits; - s->w_mask = s->w_size - 1; - - s->hash_bits = (uInt)memLevel + 7; - s->hash_size = 1 << s->hash_bits; - s->hash_mask = s->hash_size - 1; - s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); - - s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); - s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); - s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); - - s->high_water = 0; /* nothing written to s->window yet */ - - s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - /* We overlay pending_buf and sym_buf. This works since the average size - * for length/distance pairs over any compressed block is assured to be 31 - * bits or less. - * - * Analysis: The longest fixed codes are a length code of 8 bits plus 5 - * extra bits, for lengths 131 to 257. The longest fixed distance codes are - * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest - * possible fixed-codes length/distance pair is then 31 bits total. - * - * sym_buf starts one-fourth of the way into pending_buf. So there are - * three bytes in sym_buf for every four bytes in pending_buf. Each symbol - * in sym_buf is three bytes -- two for the distance and one for the - * literal/length. As each symbol is consumed, the pointer to the next - * sym_buf value to read moves forward three bytes. From that symbol, up to - * 31 bits are written to pending_buf. The closest the written pending_buf - * bits gets to the next sym_buf symbol to read is just before the last - * code is written. At that time, 31*(n-2) bits have been written, just - * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at - * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1 - * symbols are written.) The closest the writing gets to what is unread is - * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and - * can range from 128 to 32768. - * - * Therefore, at a minimum, there are 142 bits of space between what is - * written and what is read in the overlain buffers, so the symbols cannot - * be overwritten by the compressed data. That space is actually 139 bits, - * due to the three-bit fixed-code block header. - * - * That covers the case where either Z_FIXED is specified, forcing fixed - * codes, or when the use of fixed codes is chosen, because that choice - * results in a smaller compressed block than dynamic codes. That latter - * condition then assures that the above analysis also covers all dynamic - * blocks. A dynamic-code block will only be chosen to be emitted if it has - * fewer bits than a fixed-code block would for the same set of symbols. - * Therefore its average symbol length is assured to be less than 31. So - * the compressed data for a dynamic block also cannot overwrite the - * symbols from which it is being constructed. - */ - - s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 4); - s->pending_buf_size = (ulg)s->lit_bufsize * 4; - - if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || - s->pending_buf == Z_NULL) { - s->status = FINISH_STATE; - strm->msg = ERR_MSG(Z_MEM_ERROR); - deflateEnd (strm); - return Z_MEM_ERROR; - } - s->sym_buf = s->pending_buf + s->lit_bufsize; - s->sym_end = (s->lit_bufsize - 1) * 3; - /* We avoid equality with lit_bufsize*3 because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ - - s->level = level; - s->strategy = strategy; - s->method = (Byte)method; - - return deflateReset(strm); -} - -/* ========================================================================= - * Check for a valid deflate stream state. Return 0 if ok, 1 if not. - */ -local int deflateStateCheck (strm) - z_streamp strm; -{ - deflate_state *s; - if (strm == Z_NULL || - strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) - return 1; - s = strm->state; - if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE && -#ifdef GZIP - s->status != GZIP_STATE && -#endif - s->status != EXTRA_STATE && - s->status != NAME_STATE && - s->status != COMMENT_STATE && - s->status != HCRC_STATE && - s->status != BUSY_STATE && - s->status != FINISH_STATE)) - return 1; - return 0; -} - -/* ========================================================================= */ -int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) - z_streamp strm; - const Bytef *dictionary; - uInt dictLength; -{ - deflate_state *s; - uInt str, n; - int wrap; - unsigned avail; - z_const unsigned char *next; - - if (deflateStateCheck(strm) || dictionary == Z_NULL) - return Z_STREAM_ERROR; - s = strm->state; - wrap = s->wrap; - if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead) - return Z_STREAM_ERROR; - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap == 1) - strm->adler = adler32(strm->adler, dictionary, dictLength); - s->wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s->w_size) { - if (wrap == 0) { /* already empty otherwise */ - CLEAR_HASH(s); - s->strstart = 0; - s->block_start = 0L; - s->insert = 0; - } - dictionary += dictLength - s->w_size; /* use the tail */ - dictLength = s->w_size; - } - - /* insert dictionary into window and hash */ - avail = strm->avail_in; - next = strm->next_in; - strm->avail_in = dictLength; - strm->next_in = (z_const Bytef *)dictionary; - fill_window(s); - while (s->lookahead >= MIN_MATCH) { - str = s->strstart; - n = s->lookahead - (MIN_MATCH-1); - do { - UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); -#ifndef FASTEST - s->prev[str & s->w_mask] = s->head[s->ins_h]; -#endif - s->head[s->ins_h] = (Pos)str; - str++; - } while (--n); - s->strstart = str; - s->lookahead = MIN_MATCH-1; - fill_window(s); - } - s->strstart += s->lookahead; - s->block_start = (long)s->strstart; - s->insert = s->lookahead; - s->lookahead = 0; - s->match_length = s->prev_length = MIN_MATCH-1; - s->match_available = 0; - strm->next_in = next; - strm->avail_in = avail; - s->wrap = wrap; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength) - z_streamp strm; - Bytef *dictionary; - uInt *dictLength; -{ - deflate_state *s; - uInt len; - - if (deflateStateCheck(strm)) - return Z_STREAM_ERROR; - s = strm->state; - len = s->strstart + s->lookahead; - if (len > s->w_size) - len = s->w_size; - if (dictionary != Z_NULL && len) - zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len); - if (dictLength != Z_NULL) - *dictLength = len; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateResetKeep (strm) - z_streamp strm; -{ - deflate_state *s; - - if (deflateStateCheck(strm)) { - return Z_STREAM_ERROR; - } - - strm->total_in = strm->total_out = 0; - strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ - strm->data_type = Z_UNKNOWN; - - s = (deflate_state *)strm->state; - s->pending = 0; - s->pending_out = s->pending_buf; - - if (s->wrap < 0) { - s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ - } - s->status = -#ifdef GZIP - s->wrap == 2 ? GZIP_STATE : -#endif - INIT_STATE; - strm->adler = -#ifdef GZIP - s->wrap == 2 ? crc32(0L, Z_NULL, 0) : -#endif - adler32(0L, Z_NULL, 0); - s->last_flush = -2; - - _tr_init(s); - - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateReset (strm) - z_streamp strm; -{ - int ret; - - ret = deflateResetKeep(strm); - if (ret == Z_OK) - lm_init(strm->state); - return ret; -} - -/* ========================================================================= */ -int ZEXPORT deflateSetHeader (strm, head) - z_streamp strm; - gz_headerp head; -{ - if (deflateStateCheck(strm) || strm->state->wrap != 2) - return Z_STREAM_ERROR; - strm->state->gzhead = head; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflatePending (strm, pending, bits) - unsigned *pending; - int *bits; - z_streamp strm; -{ - if (deflateStateCheck(strm)) return Z_STREAM_ERROR; - if (pending != Z_NULL) - *pending = strm->state->pending; - if (bits != Z_NULL) - *bits = strm->state->bi_valid; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflatePrime (strm, bits, value) - z_streamp strm; - int bits; - int value; -{ - deflate_state *s; - int put; - - if (deflateStateCheck(strm)) return Z_STREAM_ERROR; - s = strm->state; - if (bits < 0 || bits > 16 || - s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3)) - return Z_BUF_ERROR; - do { - put = Buf_size - s->bi_valid; - if (put > bits) - put = bits; - s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid); - s->bi_valid += put; - _tr_flush_bits(s); - value >>= put; - bits -= put; - } while (bits); - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateParams(strm, level, strategy) - z_streamp strm; - int level; - int strategy; -{ - deflate_state *s; - compress_func func; - - if (deflateStateCheck(strm)) return Z_STREAM_ERROR; - s = strm->state; - -#ifdef FASTEST - if (level != 0) level = 1; -#else - if (level == Z_DEFAULT_COMPRESSION) level = 6; -#endif - if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { - return Z_STREAM_ERROR; - } - func = configuration_table[s->level].func; - - if ((strategy != s->strategy || func != configuration_table[level].func) && - s->last_flush != -2) { - /* Flush the last buffer: */ - int err = deflate(strm, Z_BLOCK); - if (err == Z_STREAM_ERROR) - return err; - if (strm->avail_in || (s->strstart - s->block_start) + s->lookahead) - return Z_BUF_ERROR; - } - if (s->level != level) { - if (s->level == 0 && s->matches != 0) { - if (s->matches == 1) - slide_hash(s); - else - CLEAR_HASH(s); - s->matches = 0; - } - s->level = level; - s->max_lazy_match = configuration_table[level].max_lazy; - s->good_match = configuration_table[level].good_length; - s->nice_match = configuration_table[level].nice_length; - s->max_chain_length = configuration_table[level].max_chain; - } - s->strategy = strategy; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain) - z_streamp strm; - int good_length; - int max_lazy; - int nice_length; - int max_chain; -{ - deflate_state *s; - - if (deflateStateCheck(strm)) return Z_STREAM_ERROR; - s = strm->state; - s->good_match = (uInt)good_length; - s->max_lazy_match = (uInt)max_lazy; - s->nice_match = nice_length; - s->max_chain_length = (uInt)max_chain; - return Z_OK; -} - -/* ========================================================================= - * For the default windowBits of 15 and memLevel of 8, this function returns - * a close to exact, as well as small, upper bound on the compressed size. - * They are coded as constants here for a reason--if the #define's are - * changed, then this function needs to be changed as well. The return - * value for 15 and 8 only works for those exact settings. - * - * For any setting other than those defaults for windowBits and memLevel, - * the value returned is a conservative worst case for the maximum expansion - * resulting from using fixed blocks instead of stored blocks, which deflate - * can emit on compressed data for some combinations of the parameters. - * - * This function could be more sophisticated to provide closer upper bounds for - * every combination of windowBits and memLevel. But even the conservative - * upper bound of about 14% expansion does not seem onerous for output buffer - * allocation. - */ -uLong ZEXPORT deflateBound(strm, sourceLen) - z_streamp strm; - uLong sourceLen; -{ - deflate_state *s; - uLong complen, wraplen; - - /* conservative upper bound for compressed data */ - complen = sourceLen + - ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; - - /* if can't get parameters, return conservative bound plus zlib wrapper */ - if (deflateStateCheck(strm)) - return complen + 6; - - /* compute wrapper length */ - s = strm->state; - switch (s->wrap) { - case 0: /* raw deflate */ - wraplen = 0; - break; - case 1: /* zlib wrapper */ - wraplen = 6 + (s->strstart ? 4 : 0); - break; -#ifdef GZIP - case 2: /* gzip wrapper */ - wraplen = 18; - if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ - Bytef *str; - if (s->gzhead->extra != Z_NULL) - wraplen += 2 + s->gzhead->extra_len; - str = s->gzhead->name; - if (str != Z_NULL) - do { - wraplen++; - } while (*str++); - str = s->gzhead->comment; - if (str != Z_NULL) - do { - wraplen++; - } while (*str++); - if (s->gzhead->hcrc) - wraplen += 2; - } - break; -#endif - default: /* for compiler happiness */ - wraplen = 6; - } - - /* if not default parameters, return conservative bound */ - if (s->w_bits != 15 || s->hash_bits != 8 + 7) - return complen + wraplen; - - /* default settings: return tight bound for that case */ - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + - (sourceLen >> 25) + 13 - 6 + wraplen; -} - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -local void putShortMSB (s, b) - deflate_state *s; - uInt b; -{ - put_byte(s, (Byte)(b >> 8)); - put_byte(s, (Byte)(b & 0xff)); -} - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output, except for - * some deflate_stored() output, goes through this function so some - * applications may wish to modify it to avoid allocating a large - * strm->next_out buffer and copying into it. (See also read_buf()). - */ -local void flush_pending(strm) - z_streamp strm; -{ - unsigned len; - deflate_state *s = strm->state; - - _tr_flush_bits(s); - len = s->pending; - if (len > strm->avail_out) len = strm->avail_out; - if (len == 0) return; - - zmemcpy(strm->next_out, s->pending_out, len); - strm->next_out += len; - s->pending_out += len; - strm->total_out += len; - strm->avail_out -= len; - s->pending -= len; - if (s->pending == 0) { - s->pending_out = s->pending_buf; - } -} - -/* =========================================================================== - * Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. - */ -#define HCRC_UPDATE(beg) \ - do { \ - if (s->gzhead->hcrc && s->pending > (beg)) \ - strm->adler = crc32(strm->adler, s->pending_buf + (beg), \ - s->pending - (beg)); \ - } while (0) - -/* ========================================================================= */ -int ZEXPORT deflate (strm, flush) - z_streamp strm; - int flush; -{ - int old_flush; /* value of flush param for previous deflate call */ - deflate_state *s; - - if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) { - return Z_STREAM_ERROR; - } - s = strm->state; - - if (strm->next_out == Z_NULL || - (strm->avail_in != 0 && strm->next_in == Z_NULL) || - (s->status == FINISH_STATE && flush != Z_FINISH)) { - ERR_RETURN(strm, Z_STREAM_ERROR); - } - if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); - - old_flush = s->last_flush; - s->last_flush = flush; - - /* Flush as much pending output as possible */ - if (s->pending != 0) { - flush_pending(strm); - if (strm->avail_out == 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s->last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) && - flush != Z_FINISH) { - ERR_RETURN(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s->status == FINISH_STATE && strm->avail_in != 0) { - ERR_RETURN(strm, Z_BUF_ERROR); - } - - /* Write the header */ - if (s->status == INIT_STATE && s->wrap == 0) - s->status = BUSY_STATE; - if (s->status == INIT_STATE) { - /* zlib header */ - uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; - uInt level_flags; - - if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) - level_flags = 0; - else if (s->level < 6) - level_flags = 1; - else if (s->level == 6) - level_flags = 2; - else - level_flags = 3; - header |= (level_flags << 6); - if (s->strstart != 0) header |= PRESET_DICT; - header += 31 - (header % 31); - - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s->strstart != 0) { - putShortMSB(s, (uInt)(strm->adler >> 16)); - putShortMSB(s, (uInt)(strm->adler & 0xffff)); - } - strm->adler = adler32(0L, Z_NULL, 0); - s->status = BUSY_STATE; - - /* Compression must start with an empty pending buffer */ - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - } -#ifdef GZIP - if (s->status == GZIP_STATE) { - /* gzip header */ - strm->adler = crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (s->gzhead == Z_NULL) { - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s->level == 9 ? 2 : - (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s->status = BUSY_STATE; - - /* Compression must start with an empty pending buffer */ - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - } - else { - put_byte(s, (s->gzhead->text ? 1 : 0) + - (s->gzhead->hcrc ? 2 : 0) + - (s->gzhead->extra == Z_NULL ? 0 : 4) + - (s->gzhead->name == Z_NULL ? 0 : 8) + - (s->gzhead->comment == Z_NULL ? 0 : 16) - ); - put_byte(s, (Byte)(s->gzhead->time & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); - put_byte(s, s->level == 9 ? 2 : - (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? - 4 : 0)); - put_byte(s, s->gzhead->os & 0xff); - if (s->gzhead->extra != Z_NULL) { - put_byte(s, s->gzhead->extra_len & 0xff); - put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); - } - if (s->gzhead->hcrc) - strm->adler = crc32(strm->adler, s->pending_buf, - s->pending); - s->gzindex = 0; - s->status = EXTRA_STATE; - } - } - if (s->status == EXTRA_STATE) { - if (s->gzhead->extra != Z_NULL) { - ulg beg = s->pending; /* start of bytes to update crc */ - uInt left = (s->gzhead->extra_len & 0xffff) - s->gzindex; - while (s->pending + left > s->pending_buf_size) { - uInt copy = s->pending_buf_size - s->pending; - zmemcpy(s->pending_buf + s->pending, - s->gzhead->extra + s->gzindex, copy); - s->pending = s->pending_buf_size; - HCRC_UPDATE(beg); - s->gzindex += copy; - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - beg = 0; - left -= copy; - } - zmemcpy(s->pending_buf + s->pending, - s->gzhead->extra + s->gzindex, left); - s->pending += left; - HCRC_UPDATE(beg); - s->gzindex = 0; - } - s->status = NAME_STATE; - } - if (s->status == NAME_STATE) { - if (s->gzhead->name != Z_NULL) { - ulg beg = s->pending; /* start of bytes to update crc */ - int val; - do { - if (s->pending == s->pending_buf_size) { - HCRC_UPDATE(beg); - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - beg = 0; - } - val = s->gzhead->name[s->gzindex++]; - put_byte(s, val); - } while (val != 0); - HCRC_UPDATE(beg); - s->gzindex = 0; - } - s->status = COMMENT_STATE; - } - if (s->status == COMMENT_STATE) { - if (s->gzhead->comment != Z_NULL) { - ulg beg = s->pending; /* start of bytes to update crc */ - int val; - do { - if (s->pending == s->pending_buf_size) { - HCRC_UPDATE(beg); - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - beg = 0; - } - val = s->gzhead->comment[s->gzindex++]; - put_byte(s, val); - } while (val != 0); - HCRC_UPDATE(beg); - } - s->status = HCRC_STATE; - } - if (s->status == HCRC_STATE) { - if (s->gzhead->hcrc) { - if (s->pending + 2 > s->pending_buf_size) { - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - } - put_byte(s, (Byte)(strm->adler & 0xff)); - put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); - strm->adler = crc32(0L, Z_NULL, 0); - } - s->status = BUSY_STATE; - - /* Compression must start with an empty pending buffer */ - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - } -#endif - - /* Start a new block or continue the current one. - */ - if (strm->avail_in != 0 || s->lookahead != 0 || - (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { - block_state bstate; - - bstate = s->level == 0 ? deflate_stored(s, flush) : - s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : - s->strategy == Z_RLE ? deflate_rle(s, flush) : - (*(configuration_table[s->level].func))(s, flush); - - if (bstate == finish_started || bstate == finish_done) { - s->status = FINISH_STATE; - } - if (bstate == need_more || bstate == finish_started) { - if (strm->avail_out == 0) { - s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate == block_done) { - if (flush == Z_PARTIAL_FLUSH) { - _tr_align(s); - } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - _tr_stored_block(s, (char*)0, 0L, 0); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush == Z_FULL_FLUSH) { - CLEAR_HASH(s); /* forget history */ - if (s->lookahead == 0) { - s->strstart = 0; - s->block_start = 0L; - s->insert = 0; - } - } - } - flush_pending(strm); - if (strm->avail_out == 0) { - s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - - if (flush != Z_FINISH) return Z_OK; - if (s->wrap <= 0) return Z_STREAM_END; - - /* Write the trailer */ -#ifdef GZIP - if (s->wrap == 2) { - put_byte(s, (Byte)(strm->adler & 0xff)); - put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); - put_byte(s, (Byte)((strm->adler >> 16) & 0xff)); - put_byte(s, (Byte)((strm->adler >> 24) & 0xff)); - put_byte(s, (Byte)(strm->total_in & 0xff)); - put_byte(s, (Byte)((strm->total_in >> 8) & 0xff)); - put_byte(s, (Byte)((strm->total_in >> 16) & 0xff)); - put_byte(s, (Byte)((strm->total_in >> 24) & 0xff)); - } - else -#endif - { - putShortMSB(s, (uInt)(strm->adler >> 16)); - putShortMSB(s, (uInt)(strm->adler & 0xffff)); - } - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */ - return s->pending != 0 ? Z_OK : Z_STREAM_END; -} - -/* ========================================================================= */ -int ZEXPORT deflateEnd (strm) - z_streamp strm; -{ - int status; - - if (deflateStateCheck(strm)) return Z_STREAM_ERROR; - - status = strm->state->status; - - /* Deallocate in reverse order of allocations: */ - TRY_FREE(strm, strm->state->pending_buf); - TRY_FREE(strm, strm->state->head); - TRY_FREE(strm, strm->state->prev); - TRY_FREE(strm, strm->state->window); - - ZFREE(strm, strm->state); - strm->state = Z_NULL; - - return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; -} - -/* ========================================================================= - * Copy the source state to the destination state. - * To simplify the source, this is not supported for 16-bit MSDOS (which - * doesn't have enough memory anyway to duplicate compression states). - */ -int ZEXPORT deflateCopy (dest, source) - z_streamp dest; - z_streamp source; -{ -#ifdef MAXSEG_64K - return Z_STREAM_ERROR; -#else - deflate_state *ds; - deflate_state *ss; - - - if (deflateStateCheck(source) || dest == Z_NULL) { - return Z_STREAM_ERROR; - } - - ss = source->state; - - zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); - - ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); - if (ds == Z_NULL) return Z_MEM_ERROR; - dest->state = (struct internal_state FAR *) ds; - zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state)); - ds->strm = dest; - - ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); - ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); - ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); - ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, 4); - - if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || - ds->pending_buf == Z_NULL) { - deflateEnd (dest); - return Z_MEM_ERROR; - } - /* following zmemcpy do not work for 16-bit MSDOS */ - zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); - zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos)); - zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos)); - zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); - - ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); - ds->sym_buf = ds->pending_buf + ds->lit_bufsize; - - ds->l_desc.dyn_tree = ds->dyn_ltree; - ds->d_desc.dyn_tree = ds->dyn_dtree; - ds->bl_desc.dyn_tree = ds->bl_tree; - - return Z_OK; -#endif /* MAXSEG_64K */ -} - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->next_in buffer and copying from it. - * (See also flush_pending()). - */ -local unsigned read_buf(strm, buf, size) - z_streamp strm; - Bytef *buf; - unsigned size; -{ - unsigned len = strm->avail_in; - - if (len > size) len = size; - if (len == 0) return 0; - - strm->avail_in -= len; - - zmemcpy(buf, strm->next_in, len); - if (strm->state->wrap == 1) { - strm->adler = adler32(strm->adler, buf, len); - } -#ifdef GZIP - else if (strm->state->wrap == 2) { - strm->adler = crc32(strm->adler, buf, len); - } -#endif - strm->next_in += len; - strm->total_in += len; - - return len; -} - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -local void lm_init (s) - deflate_state *s; -{ - s->window_size = (ulg)2L*s->w_size; - - CLEAR_HASH(s); - - /* Set the default configuration parameters: - */ - s->max_lazy_match = configuration_table[s->level].max_lazy; - s->good_match = configuration_table[s->level].good_length; - s->nice_match = configuration_table[s->level].nice_length; - s->max_chain_length = configuration_table[s->level].max_chain; - - s->strstart = 0; - s->block_start = 0L; - s->lookahead = 0; - s->insert = 0; - s->match_length = s->prev_length = MIN_MATCH-1; - s->match_available = 0; - s->ins_h = 0; -#ifndef FASTEST -#ifdef ASMV - match_init(); /* initialize the asm code */ -#endif -#endif -} - -#ifndef FASTEST -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -#ifndef ASMV -/* For 80x86 and 680x0, an optimized version will be provided in match.asm or - * match.S. The code will be functionally equivalent. - */ -local uInt longest_match(s, cur_match) - deflate_state *s; - IPos cur_match; /* current match */ -{ - unsigned chain_length = s->max_chain_length;/* max hash chain length */ - register Bytef *scan = s->window + s->strstart; /* current string */ - register Bytef *match; /* matched string */ - register int len; /* length of current match */ - int best_len = (int)s->prev_length; /* best match length so far */ - int nice_match = s->nice_match; /* stop if match long enough */ - IPos limit = s->strstart > (IPos)MAX_DIST(s) ? - s->strstart - (IPos)MAX_DIST(s) : NIL; - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - Posf *prev = s->prev; - uInt wmask = s->w_mask; - -#ifdef UNALIGNED_OK - /* Compare two bytes at a time. Note: this is not always beneficial. - * Try with and without -DUNALIGNED_OK to check. - */ - register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; - register ush scan_start = *(ushf*)scan; - register ush scan_end = *(ushf*)(scan+best_len-1); -#else - register Bytef *strend = s->window + s->strstart + MAX_MATCH; - register Byte scan_end1 = scan[best_len-1]; - register Byte scan_end = scan[best_len]; -#endif - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s->prev_length >= s->good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if ((uInt)nice_match > s->lookahead) nice_match = (int)s->lookahead; - - Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - Assert(cur_match < s->strstart, "no future"); - match = s->window + cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ -#if (defined(UNALIGNED_OK) && MAX_MATCH == 258) - /* This code assumes sizeof(unsigned short) == 2. Do not use - * UNALIGNED_OK if your compiler uses a different size. - */ - if (*(ushf*)(match+best_len-1) != scan_end || - *(ushf*)match != scan_start) continue; - - /* It is not necessary to compare scan[2] and match[2] since they are - * always equal when the other bytes match, given that the hash keys - * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at - * strstart+3, +5, ... up to strstart+257. We check for insufficient - * lookahead only every 4th comparison; the 128th check will be made - * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is - * necessary to put more guard bytes at the end of the window, or - * to check more often for insufficient lookahead. - */ - Assert(scan[2] == match[2], "scan[2]?"); - scan++, match++; - do { - } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && - scan < strend); - /* The funny "do {}" generates better code on most compilers */ - - /* Here, scan <= window+strstart+257 */ - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - if (*scan == *match) scan++; - - len = (MAX_MATCH - 1) - (int)(strend-scan); - scan = strend - (MAX_MATCH-1); - -#else /* UNALIGNED_OK */ - - if (match[best_len] != scan_end || - match[best_len-1] != scan_end1 || - *match != *scan || - *++match != scan[1]) continue; - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2, match++; - Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - } while (*++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - scan < strend); - - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (int)(strend - scan); - scan = strend - MAX_MATCH; - -#endif /* UNALIGNED_OK */ - - if (len > best_len) { - s->match_start = cur_match; - best_len = len; - if (len >= nice_match) break; -#ifdef UNALIGNED_OK - scan_end = *(ushf*)(scan+best_len-1); -#else - scan_end1 = scan[best_len-1]; - scan_end = scan[best_len]; -#endif - } - } while ((cur_match = prev[cur_match & wmask]) > limit - && --chain_length != 0); - - if ((uInt)best_len <= s->lookahead) return (uInt)best_len; - return s->lookahead; -} -#endif /* ASMV */ - -#else /* FASTEST */ - -/* --------------------------------------------------------------------------- - * Optimized version for FASTEST only - */ -local uInt longest_match(s, cur_match) - deflate_state *s; - IPos cur_match; /* current match */ -{ - register Bytef *scan = s->window + s->strstart; /* current string */ - register Bytef *match; /* matched string */ - register int len; /* length of current match */ - register Bytef *strend = s->window + s->strstart + MAX_MATCH; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - Assert(cur_match < s->strstart, "no future"); - - match = s->window + cur_match; - - /* Return failure if the match length is less than 2: - */ - if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2, match += 2; - Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - } while (*++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - scan < strend); - - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (int)(strend - scan); - - if (len < MIN_MATCH) return MIN_MATCH - 1; - - s->match_start = cur_match; - return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead; -} - -#endif /* FASTEST */ - -#ifdef ZLIB_DEBUG - -#define EQUAL 0 -/* result of memcmp for equal strings */ - -/* =========================================================================== - * Check that the match at match_start is indeed a match. - */ -local void check_match(s, start, match, length) - deflate_state *s; - IPos start, match; - int length; -{ - /* check that the match is indeed a match */ - if (zmemcmp(s->window + match, - s->window + start, length) != EQUAL) { - fprintf(stderr, " start %u, match %u, length %d\n", - start, match, length); - do { - fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); - } while (--length != 0); - z_error("invalid match"); - } - if (z_verbose > 1) { - fprintf(stderr,"\\[%d,%d]", start-match, length); - do { putc(s->window[start++], stderr); } while (--length != 0); - } -} -#else -# define check_match(s, start, match, length) -#endif /* ZLIB_DEBUG */ - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -local void fill_window(s) - deflate_state *s; -{ - unsigned n; - unsigned more; /* Amount of free space at the end of the window. */ - uInt wsize = s->w_size; - - Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); - - /* Deal with !@#$% 64K limit: */ - if (sizeof(int) <= 2) { - if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - more = wsize; - - } else if (more == (unsigned)(-1)) { - /* Very unlikely, but possible on 16 bit machine if - * strstart == 0 && lookahead == 1 (input done a byte at time) - */ - more--; - } - } - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s->strstart >= wsize+MAX_DIST(s)) { - - zmemcpy(s->window, s->window+wsize, (unsigned)wsize - more); - s->match_start -= wsize; - s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ - s->block_start -= (long) wsize; - if (s->insert > s->strstart) - s->insert = s->strstart; - slide_hash(s); - more += wsize; - } - if (s->strm->avail_in == 0) break; - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - Assert(more >= 2, "more < 2"); - - n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); - s->lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s->lookahead + s->insert >= MIN_MATCH) { - uInt str = s->strstart - s->insert; - s->ins_h = s->window[str]; - UPDATE_HASH(s, s->ins_h, s->window[str + 1]); -#if MIN_MATCH != 3 - Call UPDATE_HASH() MIN_MATCH-3 more times -#endif - while (s->insert) { - UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); -#ifndef FASTEST - s->prev[str & s->w_mask] = s->head[s->ins_h]; -#endif - s->head[s->ins_h] = (Pos)str; - str++; - s->insert--; - if (s->lookahead + s->insert < MIN_MATCH) - break; - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ - if (s->high_water < s->window_size) { - ulg curr = s->strstart + (ulg)(s->lookahead); - ulg init; - - if (s->high_water < curr) { - /* Previous high water mark below current data -- zero WIN_INIT - * bytes or up to end of window, whichever is less. - */ - init = s->window_size - curr; - if (init > WIN_INIT) - init = WIN_INIT; - zmemzero(s->window + curr, (unsigned)init); - s->high_water = curr + init; - } - else if (s->high_water < (ulg)curr + WIN_INIT) { - /* High water mark at or above current data, but below current data - * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up - * to end of window, whichever is less. - */ - init = (ulg)curr + WIN_INIT - s->high_water; - if (init > s->window_size - s->high_water) - init = s->window_size - s->high_water; - zmemzero(s->window + s->high_water, (unsigned)init); - s->high_water += init; - } - } - - Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, - "not enough room for search"); -} - -/* =========================================================================== - * Flush the current block, with given end-of-file flag. - * IN assertion: strstart is set to the end of the current match. - */ -#define FLUSH_BLOCK_ONLY(s, last) { \ - _tr_flush_block(s, (s->block_start >= 0L ? \ - (charf *)&s->window[(unsigned)s->block_start] : \ - (charf *)Z_NULL), \ - (ulg)((long)s->strstart - s->block_start), \ - (last)); \ - s->block_start = s->strstart; \ - flush_pending(s->strm); \ - Tracev((stderr,"[FLUSH]")); \ -} - -/* Same but force premature exit if necessary. */ -#define FLUSH_BLOCK(s, last) { \ - FLUSH_BLOCK_ONLY(s, last); \ - if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ -} - -/* Maximum stored block length in deflate format (not including header). */ -#define MAX_STORED 65535 - -/* Minimum of a and b. */ -#define MIN(a, b) ((a) > (b) ? (b) : (a)) - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * - * In case deflateParams() is used to later switch to a non-zero compression - * level, s->matches (otherwise unused when storing) keeps track of the number - * of hash table slides to perform. If s->matches is 1, then one hash table - * slide will be done when switching. If s->matches is 2, the maximum value - * allowed here, then the hash table will be cleared, since two or more slides - * is the same as a clear. - * - * deflate_stored() is written to minimize the number of times an input byte is - * copied. It is most efficient with large input and output buffers, which - * maximizes the opportunites to have a single copy from next_in to next_out. - */ -local block_state deflate_stored(s, flush) - deflate_state *s; - int flush; -{ - /* Smallest worthy block size when not flushing or finishing. By default - * this is 32K. This can be as small as 507 bytes for memLevel == 1. For - * large input and output buffers, the stored block size will be larger. - */ - unsigned min_block = MIN(s->pending_buf_size - 5, s->w_size); - - /* Copy as many min_block or larger stored blocks directly to next_out as - * possible. If flushing, copy the remaining available input to next_out as - * stored blocks, if there is enough space. - */ - unsigned len, left, have, last = 0; - unsigned used = s->strm->avail_in; - do { - /* Set len to the maximum size block that we can copy directly with the - * available input data and output space. Set left to how much of that - * would be copied from what's left in the window. - */ - len = MAX_STORED; /* maximum deflate stored block length */ - have = (s->bi_valid + 42) >> 3; /* number of header bytes */ - if (s->strm->avail_out < have) /* need room for header */ - break; - /* maximum stored block length that will fit in avail_out: */ - have = s->strm->avail_out - have; - left = s->strstart - s->block_start; /* bytes left in window */ - if (len > (ulg)left + s->strm->avail_in) - len = left + s->strm->avail_in; /* limit len to the input */ - if (len > have) - len = have; /* limit len to the output */ - - /* If the stored block would be less than min_block in length, or if - * unable to copy all of the available input when flushing, then try - * copying to the window and the pending buffer instead. Also don't - * write an empty block when flushing -- deflate() does that. - */ - if (len < min_block && ((len == 0 && flush != Z_FINISH) || - flush == Z_NO_FLUSH || - len != left + s->strm->avail_in)) - break; - - /* Make a dummy stored block in pending to get the header bytes, - * including any pending bits. This also updates the debugging counts. - */ - last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0; - _tr_stored_block(s, (char *)0, 0L, last); - - /* Replace the lengths in the dummy stored block with len. */ - s->pending_buf[s->pending - 4] = len; - s->pending_buf[s->pending - 3] = len >> 8; - s->pending_buf[s->pending - 2] = ~len; - s->pending_buf[s->pending - 1] = ~len >> 8; - - /* Write the stored block header bytes. */ - flush_pending(s->strm); - -#ifdef ZLIB_DEBUG - /* Update debugging counts for the data about to be copied. */ - s->compressed_len += len << 3; - s->bits_sent += len << 3; -#endif - - /* Copy uncompressed bytes from the window to next_out. */ - if (left) { - if (left > len) - left = len; - zmemcpy(s->strm->next_out, s->window + s->block_start, left); - s->strm->next_out += left; - s->strm->avail_out -= left; - s->strm->total_out += left; - s->block_start += left; - len -= left; - } - - /* Copy uncompressed bytes directly from next_in to next_out, updating - * the check value. - */ - if (len) { - read_buf(s->strm, s->strm->next_out, len); - s->strm->next_out += len; - s->strm->avail_out -= len; - s->strm->total_out += len; - } - } while (last == 0); - - /* Update the sliding window with the last s->w_size bytes of the copied - * data, or append all of the copied data to the existing window if less - * than s->w_size bytes were copied. Also update the number of bytes to - * insert in the hash tables, in the event that deflateParams() switches to - * a non-zero compression level. - */ - used -= s->strm->avail_in; /* number of input bytes directly copied */ - if (used) { - /* If any input was used, then no unused input remains in the window, - * therefore s->block_start == s->strstart. - */ - if (used >= s->w_size) { /* supplant the previous history */ - s->matches = 2; /* clear hash */ - zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size); - s->strstart = s->w_size; - s->insert = s->strstart; - } - else { - if (s->window_size - s->strstart <= used) { - /* Slide the window down. */ - s->strstart -= s->w_size; - zmemcpy(s->window, s->window + s->w_size, s->strstart); - if (s->matches < 2) - s->matches++; /* add a pending slide_hash() */ - if (s->insert > s->strstart) - s->insert = s->strstart; - } - zmemcpy(s->window + s->strstart, s->strm->next_in - used, used); - s->strstart += used; - s->insert += MIN(used, s->w_size - s->insert); - } - s->block_start = s->strstart; - } - if (s->high_water < s->strstart) - s->high_water = s->strstart; - - /* If the last block was written to next_out, then done. */ - if (last) - return finish_done; - - /* If flushing and all input has been consumed, then done. */ - if (flush != Z_NO_FLUSH && flush != Z_FINISH && - s->strm->avail_in == 0 && (long)s->strstart == s->block_start) - return block_done; - - /* Fill the window with any remaining input. */ - have = s->window_size - s->strstart; - if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) { - /* Slide the window down. */ - s->block_start -= s->w_size; - s->strstart -= s->w_size; - zmemcpy(s->window, s->window + s->w_size, s->strstart); - if (s->matches < 2) - s->matches++; /* add a pending slide_hash() */ - have += s->w_size; /* more space now */ - if (s->insert > s->strstart) - s->insert = s->strstart; - } - if (have > s->strm->avail_in) - have = s->strm->avail_in; - if (have) { - read_buf(s->strm, s->window + s->strstart, have); - s->strstart += have; - s->insert += MIN(have, s->w_size - s->insert); - } - if (s->high_water < s->strstart) - s->high_water = s->strstart; - - /* There was not enough avail_out to write a complete worthy or flushed - * stored block to next_out. Write a stored block to pending instead, if we - * have enough input for a worthy block, or if flushing and there is enough - * room for the remaining input as a stored block in the pending buffer. - */ - have = (s->bi_valid + 42) >> 3; /* number of header bytes */ - /* maximum stored block length that will fit in pending: */ - have = MIN(s->pending_buf_size - have, MAX_STORED); - min_block = MIN(have, s->w_size); - left = s->strstart - s->block_start; - if (left >= min_block || - ((left || flush == Z_FINISH) && flush != Z_NO_FLUSH && - s->strm->avail_in == 0 && left <= have)) { - len = MIN(left, have); - last = flush == Z_FINISH && s->strm->avail_in == 0 && - len == left ? 1 : 0; - _tr_stored_block(s, (charf *)s->window + s->block_start, len, last); - s->block_start += len; - flush_pending(s->strm); - } - - /* We've done all we can with the available input and output. */ - return last ? finish_started : need_more; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -local block_state deflate_fast(s, flush) - deflate_state *s; - int flush; -{ - IPos hash_head; /* head of the hash chain */ - int bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s->lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = NIL; - if (s->lookahead >= MIN_MATCH) { - INSERT_STRING(s, s->strstart, hash_head); - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s->match_length = longest_match (s, hash_head); - /* longest_match() sets match_start */ - } - if (s->match_length >= MIN_MATCH) { - check_match(s, s->strstart, s->match_start, s->match_length); - - _tr_tally_dist(s, s->strstart - s->match_start, - s->match_length - MIN_MATCH, bflush); - - s->lookahead -= s->match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ -#ifndef FASTEST - if (s->match_length <= s->max_insert_length && - s->lookahead >= MIN_MATCH) { - s->match_length--; /* string at strstart already in table */ - do { - s->strstart++; - INSERT_STRING(s, s->strstart, hash_head); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s->match_length != 0); - s->strstart++; - } else -#endif - { - s->strstart += s->match_length; - s->match_length = 0; - s->ins_h = s->window[s->strstart]; - UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); -#if MIN_MATCH != 3 - Call UPDATE_HASH() MIN_MATCH-3 more times -#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - } - if (bflush) FLUSH_BLOCK(s, 0); - } - s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->sym_next) - FLUSH_BLOCK(s, 0); - return block_done; -} - -#ifndef FASTEST -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -local block_state deflate_slow(s, flush) - deflate_state *s; - int flush; -{ - IPos hash_head; /* head of hash chain */ - int bflush; /* set if current block must be flushed */ - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s->lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = NIL; - if (s->lookahead >= MIN_MATCH) { - INSERT_STRING(s, s->strstart, hash_head); - } - - /* Find the longest match, discarding those <= prev_length. - */ - s->prev_length = s->match_length, s->prev_match = s->match_start; - s->match_length = MIN_MATCH-1; - - if (hash_head != NIL && s->prev_length < s->max_lazy_match && - s->strstart - hash_head <= MAX_DIST(s)) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s->match_length = longest_match (s, hash_head); - /* longest_match() sets match_start */ - - if (s->match_length <= 5 && (s->strategy == Z_FILTERED -#if TOO_FAR <= 32767 - || (s->match_length == MIN_MATCH && - s->strstart - s->match_start > TOO_FAR) -#endif - )) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s->match_length = MIN_MATCH-1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { - uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - check_match(s, s->strstart-1, s->prev_match, s->prev_length); - - _tr_tally_dist(s, s->strstart -1 - s->prev_match, - s->prev_length - MIN_MATCH, bflush); - - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s->lookahead -= s->prev_length-1; - s->prev_length -= 2; - do { - if (++s->strstart <= max_insert) { - INSERT_STRING(s, s->strstart, hash_head); - } - } while (--s->prev_length != 0); - s->match_available = 0; - s->match_length = MIN_MATCH-1; - s->strstart++; - - if (bflush) FLUSH_BLOCK(s, 0); - - } else if (s->match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - Tracevv((stderr,"%c", s->window[s->strstart-1])); - _tr_tally_lit(s, s->window[s->strstart-1], bflush); - if (bflush) { - FLUSH_BLOCK_ONLY(s, 0); - } - s->strstart++; - s->lookahead--; - if (s->strm->avail_out == 0) return need_more; - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s->match_available = 1; - s->strstart++; - s->lookahead--; - } - } - Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s->match_available) { - Tracevv((stderr,"%c", s->window[s->strstart-1])); - _tr_tally_lit(s, s->window[s->strstart-1], bflush); - s->match_available = 0; - } - s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->sym_next) - FLUSH_BLOCK(s, 0); - return block_done; -} -#endif /* FASTEST */ - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -local block_state deflate_rle(s, flush) - deflate_state *s; - int flush; -{ - int bflush; /* set if current block must be flushed */ - uInt prev; /* byte at distance one to match */ - Bytef *scan, *strend; /* scan goes up to strend for length of run */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s->lookahead <= MAX_MATCH) { - fill_window(s); - if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s->match_length = 0; - if (s->lookahead >= MIN_MATCH && s->strstart > 0) { - scan = s->window + s->strstart - 1; - prev = *scan; - if (prev == *++scan && prev == *++scan && prev == *++scan) { - strend = s->window + s->strstart + MAX_MATCH; - do { - } while (prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - scan < strend); - s->match_length = MAX_MATCH - (uInt)(strend - scan); - if (s->match_length > s->lookahead) - s->match_length = s->lookahead; - } - Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s->match_length >= MIN_MATCH) { - check_match(s, s->strstart, s->strstart - 1, s->match_length); - - _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); - - s->lookahead -= s->match_length; - s->strstart += s->match_length; - s->match_length = 0; - } else { - /* No match, output a literal byte */ - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - } - if (bflush) FLUSH_BLOCK(s, 0); - } - s->insert = 0; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->sym_next) - FLUSH_BLOCK(s, 0); - return block_done; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -local block_state deflate_huff(s, flush) - deflate_state *s; - int flush; -{ - int bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s->lookahead == 0) { - fill_window(s); - if (s->lookahead == 0) { - if (flush == Z_NO_FLUSH) - return need_more; - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s->match_length = 0; - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - if (bflush) FLUSH_BLOCK(s, 0); - } - s->insert = 0; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->sym_next) - FLUSH_BLOCK(s, 0); - return block_done; -} diff --git a/thirdparty/zlib-1.2.12/deflate.h b/thirdparty/zlib-1.2.12/deflate.h deleted file mode 100644 index 17c2261..0000000 --- a/thirdparty/zlib-1.2.12/deflate.h +++ /dev/null @@ -1,346 +0,0 @@ -/* deflate.h -- internal compression state - * Copyright (C) 1995-2018 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id$ */ - -#ifndef DEFLATE_H -#define DEFLATE_H - -#include "zutil.h" - -/* define NO_GZIP when compiling if you want to disable gzip header and - trailer creation by deflate(). NO_GZIP would be used to avoid linking in - the crc code when it is not needed. For shared libraries, gzip encoding - should be left enabled. */ -#ifndef NO_GZIP -# define GZIP -#endif - -/* =========================================================================== - * Internal compression state. - */ - -#define LENGTH_CODES 29 -/* number of length codes, not counting the special END_BLOCK code */ - -#define LITERALS 256 -/* number of literal bytes 0..255 */ - -#define L_CODES (LITERALS+1+LENGTH_CODES) -/* number of Literal or Length codes, including the END_BLOCK code */ - -#define D_CODES 30 -/* number of distance codes */ - -#define BL_CODES 19 -/* number of codes used to transfer the bit lengths */ - -#define HEAP_SIZE (2*L_CODES+1) -/* maximum heap size */ - -#define MAX_BITS 15 -/* All codes must not exceed MAX_BITS bits */ - -#define Buf_size 16 -/* size of bit buffer in bi_buf */ - -#define INIT_STATE 42 /* zlib header -> BUSY_STATE */ -#ifdef GZIP -# define GZIP_STATE 57 /* gzip header -> BUSY_STATE | EXTRA_STATE */ -#endif -#define EXTRA_STATE 69 /* gzip extra block -> NAME_STATE */ -#define NAME_STATE 73 /* gzip file name -> COMMENT_STATE */ -#define COMMENT_STATE 91 /* gzip comment -> HCRC_STATE */ -#define HCRC_STATE 103 /* gzip header CRC -> BUSY_STATE */ -#define BUSY_STATE 113 /* deflate -> FINISH_STATE */ -#define FINISH_STATE 666 /* stream complete */ -/* Stream status */ - - -/* Data structure describing a single value and its code string. */ -typedef struct ct_data_s { - union { - ush freq; /* frequency count */ - ush code; /* bit string */ - } fc; - union { - ush dad; /* father node in Huffman tree */ - ush len; /* length of bit string */ - } dl; -} FAR ct_data; - -#define Freq fc.freq -#define Code fc.code -#define Dad dl.dad -#define Len dl.len - -typedef struct static_tree_desc_s static_tree_desc; - -typedef struct tree_desc_s { - ct_data *dyn_tree; /* the dynamic tree */ - int max_code; /* largest code with non zero frequency */ - const static_tree_desc *stat_desc; /* the corresponding static tree */ -} FAR tree_desc; - -typedef ush Pos; -typedef Pos FAR Posf; -typedef unsigned IPos; - -/* A Pos is an index in the character window. We use short instead of int to - * save space in the various tables. IPos is used only for parameter passing. - */ - -typedef struct internal_state { - z_streamp strm; /* pointer back to this zlib stream */ - int status; /* as the name implies */ - Bytef *pending_buf; /* output still pending */ - ulg pending_buf_size; /* size of pending_buf */ - Bytef *pending_out; /* next pending byte to output to the stream */ - ulg pending; /* nb of bytes in the pending buffer */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ - gz_headerp gzhead; /* gzip header information to write */ - ulg gzindex; /* where in extra, name, or comment */ - Byte method; /* can only be DEFLATED */ - int last_flush; /* value of flush param for previous deflate call */ - - /* used by deflate.c: */ - - uInt w_size; /* LZ77 window size (32K by default) */ - uInt w_bits; /* log2(w_size) (8..16) */ - uInt w_mask; /* w_size - 1 */ - - Bytef *window; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. Also, it limits - * the window size to 64K, which is quite useful on MSDOS. - * To do: use the user input buffer as sliding window. - */ - - ulg window_size; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - Posf *prev; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - Posf *head; /* Heads of the hash chains or NIL. */ - - uInt ins_h; /* hash index of string to be inserted */ - uInt hash_size; /* number of elements in hash table */ - uInt hash_bits; /* log2(hash_size) */ - uInt hash_mask; /* hash_size-1 */ - - uInt hash_shift; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - long block_start; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - uInt match_length; /* length of best match */ - IPos prev_match; /* previous match */ - int match_available; /* set if previous match exists */ - uInt strstart; /* start of string to insert */ - uInt match_start; /* start of matching string */ - uInt lookahead; /* number of valid bytes ahead in window */ - - uInt prev_length; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - uInt max_chain_length; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - uInt max_lazy_match; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ -# define max_insert_length max_lazy_match - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - int level; /* compression level (1..9) */ - int strategy; /* favor or force Huffman coding*/ - - uInt good_match; - /* Use a faster search when the previous match is longer than this */ - - int nice_match; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - /* Didn't use ct_data typedef below to suppress compiler warning */ - struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - struct tree_desc_s l_desc; /* desc. for literal tree */ - struct tree_desc_s d_desc; /* desc. for distance tree */ - struct tree_desc_s bl_desc; /* desc. for bit length tree */ - - ush bl_count[MAX_BITS+1]; - /* number of codes at each bit length for an optimal tree */ - - int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - int heap_len; /* number of elements in the heap */ - int heap_max; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - uch depth[2*L_CODES+1]; - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - uchf *sym_buf; /* buffer for distances and literals/lengths */ - - uInt lit_bufsize; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - uInt sym_next; /* running index in sym_buf */ - uInt sym_end; /* symbol table full when sym_next reaches this */ - - ulg opt_len; /* bit length of current block with optimal trees */ - ulg static_len; /* bit length of current block with static trees */ - uInt matches; /* number of string matches in current block */ - uInt insert; /* bytes at end of window left to insert */ - -#ifdef ZLIB_DEBUG - ulg compressed_len; /* total bit length of compressed file mod 2^32 */ - ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ -#endif - - ush bi_buf; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - int bi_valid; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - ulg high_water; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ - -} FAR deflate_state; - -/* Output a byte on the stream. - * IN assertion: there is enough room in pending_buf. - */ -#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);} - - -#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) -/* Minimum amount of lookahead, except at the end of the input file. - * See deflate.c for comments about the MIN_MATCH+1. - */ - -#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) -/* In order to simplify the code, particularly on 16 bit machines, match - * distances are limited to MAX_DIST instead of WSIZE. - */ - -#define WIN_INIT MAX_MATCH -/* Number of bytes after end of data in window to initialize in order to avoid - memory checker errors from longest match routines */ - - /* in trees.c */ -void ZLIB_INTERNAL _tr_init OF((deflate_state *s)); -int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); -void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, - ulg stored_len, int last)); -void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s)); -void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); -void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, - ulg stored_len, int last)); - -#define d_code(dist) \ - ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) -/* Mapping from a distance to a distance code. dist is the distance - 1 and - * must not have side effects. _dist_code[256] and _dist_code[257] are never - * used. - */ - -#ifndef ZLIB_DEBUG -/* Inline versions of _tr_tally for speed: */ - -#if defined(GEN_TREES_H) || !defined(STDC) - extern uch ZLIB_INTERNAL _length_code[]; - extern uch ZLIB_INTERNAL _dist_code[]; -#else - extern const uch ZLIB_INTERNAL _length_code[]; - extern const uch ZLIB_INTERNAL _dist_code[]; -#endif - -# define _tr_tally_lit(s, c, flush) \ - { uch cc = (c); \ - s->sym_buf[s->sym_next++] = 0; \ - s->sym_buf[s->sym_next++] = 0; \ - s->sym_buf[s->sym_next++] = cc; \ - s->dyn_ltree[cc].Freq++; \ - flush = (s->sym_next == s->sym_end); \ - } -# define _tr_tally_dist(s, distance, length, flush) \ - { uch len = (uch)(length); \ - ush dist = (ush)(distance); \ - s->sym_buf[s->sym_next++] = dist; \ - s->sym_buf[s->sym_next++] = dist >> 8; \ - s->sym_buf[s->sym_next++] = len; \ - dist--; \ - s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ - s->dyn_dtree[d_code(dist)].Freq++; \ - flush = (s->sym_next == s->sym_end); \ - } -#else -# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) -# define _tr_tally_dist(s, distance, length, flush) \ - flush = _tr_tally(s, distance, length) -#endif - -#endif /* DEFLATE_H */ diff --git a/thirdparty/zlib-1.2.12/doc/algorithm.txt b/thirdparty/zlib-1.2.12/doc/algorithm.txt deleted file mode 100644 index c97f495..0000000 --- a/thirdparty/zlib-1.2.12/doc/algorithm.txt +++ /dev/null @@ -1,209 +0,0 @@ -1. Compression algorithm (deflate) - -The deflation algorithm used by gzip (also zip and zlib) is a variation of -LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in -the input data. The second occurrence of a string is replaced by a -pointer to the previous string, in the form of a pair (distance, -length). Distances are limited to 32K bytes, and lengths are limited -to 258 bytes. When a string does not occur anywhere in the previous -32K bytes, it is emitted as a sequence of literal bytes. (In this -description, `string' must be taken as an arbitrary sequence of bytes, -and is not restricted to printable characters.) - -Literals or match lengths are compressed with one Huffman tree, and -match distances are compressed with another tree. The trees are stored -in a compact form at the start of each block. The blocks can have any -size (except that the compressed data for one block must fit in -available memory). A block is terminated when deflate() determines that -it would be useful to start another block with fresh trees. (This is -somewhat similar to the behavior of LZW-based _compress_.) - -Duplicated strings are found using a hash table. All input strings of -length 3 are inserted in the hash table. A hash index is computed for -the next 3 bytes. If the hash chain for this index is not empty, all -strings in the chain are compared with the current input string, and -the longest match is selected. - -The hash chains are searched starting with the most recent strings, to -favor small distances and thus take advantage of the Huffman encoding. -The hash chains are singly linked. There are no deletions from the -hash chains, the algorithm simply discards matches that are too old. - -To avoid a worst-case situation, very long hash chains are arbitrarily -truncated at a certain length, determined by a runtime option (level -parameter of deflateInit). So deflate() does not always find the longest -possible match but generally finds a match which is long enough. - -deflate() also defers the selection of matches with a lazy evaluation -mechanism. After a match of length N has been found, deflate() searches for -a longer match at the next input byte. If a longer match is found, the -previous match is truncated to a length of one (thus producing a single -literal byte) and the process of lazy evaluation begins again. Otherwise, -the original match is kept, and the next match search is attempted only N -steps later. - -The lazy match evaluation is also subject to a runtime parameter. If -the current match is long enough, deflate() reduces the search for a longer -match, thus speeding up the whole process. If compression ratio is more -important than speed, deflate() attempts a complete second search even if -the first match is already long enough. - -The lazy match evaluation is not performed for the fastest compression -modes (level parameter 1 to 3). For these fast modes, new strings -are inserted in the hash table only when no match was found, or -when the match is not too long. This degrades the compression ratio -but saves time since there are both fewer insertions and fewer searches. - - -2. Decompression algorithm (inflate) - -2.1 Introduction - -The key question is how to represent a Huffman code (or any prefix code) so -that you can decode fast. The most important characteristic is that shorter -codes are much more common than longer codes, so pay attention to decoding the -short codes fast, and let the long codes take longer to decode. - -inflate() sets up a first level table that covers some number of bits of -input less than the length of longest code. It gets that many bits from the -stream, and looks it up in the table. The table will tell if the next -code is that many bits or less and how many, and if it is, it will tell -the value, else it will point to the next level table for which inflate() -grabs more bits and tries to decode a longer code. - -How many bits to make the first lookup is a tradeoff between the time it -takes to decode and the time it takes to build the table. If building the -table took no time (and if you had infinite memory), then there would only -be a first level table to cover all the way to the longest code. However, -building the table ends up taking a lot longer for more bits since short -codes are replicated many times in such a table. What inflate() does is -simply to make the number of bits in the first table a variable, and then -to set that variable for the maximum speed. - -For inflate, which has 286 possible codes for the literal/length tree, the size -of the first table is nine bits. Also the distance trees have 30 possible -values, and the size of the first table is six bits. Note that for each of -those cases, the table ended up one bit longer than the ``average'' code -length, i.e. the code length of an approximately flat code which would be a -little more than eight bits for 286 symbols and a little less than five bits -for 30 symbols. - - -2.2 More details on the inflate table lookup - -Ok, you want to know what this cleverly obfuscated inflate tree actually -looks like. You are correct that it's not a Huffman tree. It is simply a -lookup table for the first, let's say, nine bits of a Huffman symbol. The -symbol could be as short as one bit or as long as 15 bits. If a particular -symbol is shorter than nine bits, then that symbol's translation is duplicated -in all those entries that start with that symbol's bits. For example, if the -symbol is four bits, then it's duplicated 32 times in a nine-bit table. If a -symbol is nine bits long, it appears in the table once. - -If the symbol is longer than nine bits, then that entry in the table points -to another similar table for the remaining bits. Again, there are duplicated -entries as needed. The idea is that most of the time the symbol will be short -and there will only be one table look up. (That's whole idea behind data -compression in the first place.) For the less frequent long symbols, there -will be two lookups. If you had a compression method with really long -symbols, you could have as many levels of lookups as is efficient. For -inflate, two is enough. - -So a table entry either points to another table (in which case nine bits in -the above example are gobbled), or it contains the translation for the symbol -and the number of bits to gobble. Then you start again with the next -ungobbled bit. - -You may wonder: why not just have one lookup table for how ever many bits the -longest symbol is? The reason is that if you do that, you end up spending -more time filling in duplicate symbol entries than you do actually decoding. -At least for deflate's output that generates new trees every several 10's of -kbytes. You can imagine that filling in a 2^15 entry table for a 15-bit code -would take too long if you're only decoding several thousand symbols. At the -other extreme, you could make a new table for every bit in the code. In fact, -that's essentially a Huffman tree. But then you spend too much time -traversing the tree while decoding, even for short symbols. - -So the number of bits for the first lookup table is a trade of the time to -fill out the table vs. the time spent looking at the second level and above of -the table. - -Here is an example, scaled down: - -The code being decoded, with 10 symbols, from 1 to 6 bits long: - -A: 0 -B: 10 -C: 1100 -D: 11010 -E: 11011 -F: 11100 -G: 11101 -H: 11110 -I: 111110 -J: 111111 - -Let's make the first table three bits long (eight entries): - -000: A,1 -001: A,1 -010: A,1 -011: A,1 -100: B,2 -101: B,2 -110: -> table X (gobble 3 bits) -111: -> table Y (gobble 3 bits) - -Each entry is what the bits decode as and how many bits that is, i.e. how -many bits to gobble. Or the entry points to another table, with the number of -bits to gobble implicit in the size of the table. - -Table X is two bits long since the longest code starting with 110 is five bits -long: - -00: C,1 -01: C,1 -10: D,2 -11: E,2 - -Table Y is three bits long since the longest code starting with 111 is six -bits long: - -000: F,2 -001: F,2 -010: G,2 -011: G,2 -100: H,2 -101: H,2 -110: I,3 -111: J,3 - -So what we have here are three tables with a total of 20 entries that had to -be constructed. That's compared to 64 entries for a single table. Or -compared to 16 entries for a Huffman tree (six two entry tables and one four -entry table). Assuming that the code ideally represents the probability of -the symbols, it takes on the average 1.25 lookups per symbol. That's compared -to one lookup for the single table, or 1.66 lookups per symbol for the -Huffman tree. - -There, I think that gives you a picture of what's going on. For inflate, the -meaning of a particular symbol is often more than just a letter. It can be a -byte (a "literal"), or it can be either a length or a distance which -indicates a base value and a number of bits to fetch after the code that is -added to the base value. Or it might be the special end-of-block code. The -data structures created in inftrees.c try to encode all that information -compactly in the tables. - - -Jean-loup Gailly Mark Adler -jloup@gzip.org madler@alumni.caltech.edu - - -References: - -[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data -Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3, -pp. 337-343. - -``DEFLATE Compressed Data Format Specification'' available in -http://tools.ietf.org/html/rfc1951 diff --git a/thirdparty/zlib-1.2.12/doc/crc-doc.1.0.pdf b/thirdparty/zlib-1.2.12/doc/crc-doc.1.0.pdf deleted file mode 100644 index d6942ecc09a3f8b2d7e4b6fbecc5955121e8e7cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 776142 zcmbT;V{~L|w>SJ)9owmx9ox2Tc5K_Wla7s!jgHx|ZQFL<-uvA9-204kzvJ1@Qy*%~ zvBtXAy6V&X)xYK{Qh8y~uMD)zFr-s+14}SW0D6F}p#^}O8-`BW*v8b!48Xw3zySF3 z1w$ulZsla`0H71KGH@~$Ha4>TW(>p23*+eIU~FIwGlkrNu9~7PF|qJ|pS3ODlxa4bFFunvyd8J@@?^hv*esX*(S09* zL)M~NzIq-}o@w5v#<3`kZs@F4=_94{i=7?Ss|LeiCMy%xVTk4w-FWUhdi-uH=yz$}^_D$DvcNs;CdwNIqNug!&Yv}uHjga}IwgRpJUmYSP!&~# z;Zh8Lj53x#>o-Fa+p~Ug0(`AZ0!hC&wIARGq_7`~T zjt#C0N9wHT^4e!#2n*?NdGWIo-_Xk=(=@{2}; zJO>YDVTMPcW3`t@&au_D6L<}TwjKfP^IE4q$c4$ATMl&N7O-C&D06{gRW~+y8`8HQ zLvTt5oaV2zNi_jO-myPMP}hLVR0EYH)KDQOH`;T1@=A1y2tuj|#MPVcM$>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eFX>~5fBJU&PJ$d2r>X?NG1o(Id1~QbKSNMhUz<&~IvnAAcm=3MOCxFbR ze<3-86(ws!M9bt5ux?ro`TB=P5(EgSWxW4jD9sp?`NIqRictsIjUgC8acqSV zB(uem9tT{+xtAt6w!&zFsms#$5(18o_!ysQ3#7*Jfe~OGU^E5CIl?Chcx?c~nb%Ly z^9T+<5Ye2q@o5lT@Vx{D^8?-$Ft29Va{wJs;6r;-7=oiDoWlS{aK`Zk2nBP-aqvj^ zc{s_uOJvUro=3qtKyZp{7o6hS1;=Tov5#pmAVj%xfa4dkKus z8HWSya_%L7hv9n(l;VuTNKU*_2+fDrLC`oyYXr^bXq+H$roUrz2C+pl?HwCKND$_* zT}TW#9U4c_Adn!8#6bXaFdBj5hy+!aGcU#UFG-PbjY3EQloe{F!fCHWwUNn@aU!8r2*rNQ|Wtc`|al`jCxg`Nj6 zPMroA0mlr$Xl9!##SgH9;|&LS1MbZLXRr|IdjSTTI4;J#AY#wKjH4i1F<3v(1I;q$ zUK(BpPND>C1Ax(R4~&zbe}Q}nFr0Z2BFzs2MF7S?2tvBTNgU()66fS+Fpd*5U=#-L zD*z^d_avaIf~EoHLZNV;1jP-5>$RV3Dn@Tt*0!#qkOCSOP9KXQf7+ga^A_03rXjNQ4NhFC;{vv5DI)aj{^)eXVAR@oaT%JT{f&g&31ohXXdBUY#)KPg!|rt*$Tnq024UQDL$xWkbfzVn&7+vFp7hb zpm~IH6Gfp2+@Asrh4su}?AjO>;_Vk83X#*-=jl56trLk~^5{AS1u?HzK}}}. - -Abstract - - This specification defines a lossless compressed data format. The - data can be produced or consumed, even for an arbitrarily long - sequentially presented input data stream, using only an a priori - bounded amount of intermediate storage. The format presently uses - the DEFLATE compression method but can be easily extended to use - other compression methods. It can be implemented readily in a manner - not covered by patents. This specification also defines the ADLER-32 - checksum (an extension and improvement of the Fletcher checksum), - used for detection of data corruption, and provides an algorithm for - computing it. - - - - -Deutsch & Gailly Informational [Page 1] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - -Table of Contents - - 1. Introduction ................................................... 2 - 1.1. Purpose ................................................... 2 - 1.2. Intended audience ......................................... 3 - 1.3. Scope ..................................................... 3 - 1.4. Compliance ................................................ 3 - 1.5. Definitions of terms and conventions used ................ 3 - 1.6. Changes from previous versions ............................ 3 - 2. Detailed specification ......................................... 3 - 2.1. Overall conventions ....................................... 3 - 2.2. Data format ............................................... 4 - 2.3. Compliance ................................................ 7 - 3. References ..................................................... 7 - 4. Source code .................................................... 8 - 5. Security Considerations ........................................ 8 - 6. Acknowledgements ............................................... 8 - 7. Authors' Addresses ............................................. 8 - 8. Appendix: Rationale ............................................ 9 - 9. Appendix: Sample code ..........................................10 - -1. Introduction - - 1.1. Purpose - - The purpose of this specification is to define a lossless - compressed data format that: - - * Is independent of CPU type, operating system, file system, - and character set, and hence can be used for interchange; - - * Can be produced or consumed, even for an arbitrarily long - sequentially presented input data stream, using only an a - priori bounded amount of intermediate storage, and hence can - be used in data communications or similar structures such as - Unix filters; - - * Can use a number of different compression methods; - - * Can be implemented readily in a manner not covered by - patents, and hence can be practiced freely. - - The data format defined by this specification does not attempt to - allow random access to compressed data. - - - - - - - -Deutsch & Gailly Informational [Page 2] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - 1.2. Intended audience - - This specification is intended for use by implementors of software - to compress data into zlib format and/or decompress data from zlib - format. - - The text of the specification assumes a basic background in - programming at the level of bits and other primitive data - representations. - - 1.3. Scope - - The specification specifies a compressed data format that can be - used for in-memory compression of a sequence of arbitrary bytes. - - 1.4. Compliance - - Unless otherwise indicated below, a compliant decompressor must be - able to accept and decompress any data set that conforms to all - the specifications presented here; a compliant compressor must - produce data sets that conform to all the specifications presented - here. - - 1.5. Definitions of terms and conventions used - - byte: 8 bits stored or transmitted as a unit (same as an octet). - (For this specification, a byte is exactly 8 bits, even on - machines which store a character on a number of bits different - from 8.) See below, for the numbering of bits within a byte. - - 1.6. Changes from previous versions - - Version 3.1 was the first public release of this specification. - In version 3.2, some terminology was changed and the Adler-32 - sample code was rewritten for clarity. In version 3.3, the - support for a preset dictionary was introduced, and the - specification was converted to RFC style. - -2. Detailed specification - - 2.1. Overall conventions - - In the diagrams below, a box like this: - - +---+ - | | <-- the vertical bars might be missing - +---+ - - - - -Deutsch & Gailly Informational [Page 3] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - represents one byte; a box like this: - - +==============+ - | | - +==============+ - - represents a variable number of bytes. - - Bytes stored within a computer do not have a "bit order", since - they are always treated as a unit. However, a byte considered as - an integer between 0 and 255 does have a most- and least- - significant bit, and since we write numbers with the most- - significant digit on the left, we also write bytes with the most- - significant bit on the left. In the diagrams below, we number the - bits of a byte so that bit 0 is the least-significant bit, i.e., - the bits are numbered: - - +--------+ - |76543210| - +--------+ - - Within a computer, a number may occupy multiple bytes. All - multi-byte numbers in the format described here are stored with - the MOST-significant byte first (at the lower memory address). - For example, the decimal number 520 is stored as: - - 0 1 - +--------+--------+ - |00000010|00001000| - +--------+--------+ - ^ ^ - | | - | + less significant byte = 8 - + more significant byte = 2 x 256 - - 2.2. Data format - - A zlib stream has the following structure: - - 0 1 - +---+---+ - |CMF|FLG| (more-->) - +---+---+ - - - - - - - - -Deutsch & Gailly Informational [Page 4] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - (if FLG.FDICT set) - - 0 1 2 3 - +---+---+---+---+ - | DICTID | (more-->) - +---+---+---+---+ - - +=====================+---+---+---+---+ - |...compressed data...| ADLER32 | - +=====================+---+---+---+---+ - - Any data which may appear after ADLER32 are not part of the zlib - stream. - - CMF (Compression Method and flags) - This byte is divided into a 4-bit compression method and a 4- - bit information field depending on the compression method. - - bits 0 to 3 CM Compression method - bits 4 to 7 CINFO Compression info - - CM (Compression method) - This identifies the compression method used in the file. CM = 8 - denotes the "deflate" compression method with a window size up - to 32K. This is the method used by gzip and PNG (see - references [1] and [2] in Chapter 3, below, for the reference - documents). CM = 15 is reserved. It might be used in a future - version of this specification to indicate the presence of an - extra field before the compressed data. - - CINFO (Compression info) - For CM = 8, CINFO is the base-2 logarithm of the LZ77 window - size, minus eight (CINFO=7 indicates a 32K window size). Values - of CINFO above 7 are not allowed in this version of the - specification. CINFO is not defined in this specification for - CM not equal to 8. - - FLG (FLaGs) - This flag byte is divided as follows: - - bits 0 to 4 FCHECK (check bits for CMF and FLG) - bit 5 FDICT (preset dictionary) - bits 6 to 7 FLEVEL (compression level) - - The FCHECK value must be such that CMF and FLG, when viewed as - a 16-bit unsigned integer stored in MSB order (CMF*256 + FLG), - is a multiple of 31. - - - - -Deutsch & Gailly Informational [Page 5] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - FDICT (Preset dictionary) - If FDICT is set, a DICT dictionary identifier is present - immediately after the FLG byte. The dictionary is a sequence of - bytes which are initially fed to the compressor without - producing any compressed output. DICT is the Adler-32 checksum - of this sequence of bytes (see the definition of ADLER32 - below). The decompressor can use this identifier to determine - which dictionary has been used by the compressor. - - FLEVEL (Compression level) - These flags are available for use by specific compression - methods. The "deflate" method (CM = 8) sets these flags as - follows: - - 0 - compressor used fastest algorithm - 1 - compressor used fast algorithm - 2 - compressor used default algorithm - 3 - compressor used maximum compression, slowest algorithm - - The information in FLEVEL is not needed for decompression; it - is there to indicate if recompression might be worthwhile. - - compressed data - For compression method 8, the compressed data is stored in the - deflate compressed data format as described in the document - "DEFLATE Compressed Data Format Specification" by L. Peter - Deutsch. (See reference [3] in Chapter 3, below) - - Other compressed data formats are not specified in this version - of the zlib specification. - - ADLER32 (Adler-32 checksum) - This contains a checksum value of the uncompressed data - (excluding any dictionary data) computed according to Adler-32 - algorithm. This algorithm is a 32-bit extension and improvement - of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073 - standard. See references [4] and [5] in Chapter 3, below) - - Adler-32 is composed of two sums accumulated per byte: s1 is - the sum of all bytes, s2 is the sum of all s1 values. Both sums - are done modulo 65521. s1 is initialized to 1, s2 to zero. The - Adler-32 checksum is stored as s2*65536 + s1 in most- - significant-byte first (network) order. - - - - - - - - -Deutsch & Gailly Informational [Page 6] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - 2.3. Compliance - - A compliant compressor must produce streams with correct CMF, FLG - and ADLER32, but need not support preset dictionaries. When the - zlib data format is used as part of another standard data format, - the compressor may use only preset dictionaries that are specified - by this other data format. If this other format does not use the - preset dictionary feature, the compressor must not set the FDICT - flag. - - A compliant decompressor must check CMF, FLG, and ADLER32, and - provide an error indication if any of these have incorrect values. - A compliant decompressor must give an error indication if CM is - not one of the values defined in this specification (only the - value 8 is permitted in this version), since another value could - indicate the presence of new features that would cause subsequent - data to be interpreted incorrectly. A compliant decompressor must - give an error indication if FDICT is set and DICTID is not the - identifier of a known preset dictionary. A decompressor may - ignore FLEVEL and still be compliant. When the zlib data format - is being used as a part of another standard format, a compliant - decompressor must support all the preset dictionaries specified by - the other format. When the other format does not use the preset - dictionary feature, a compliant decompressor must reject any - stream in which the FDICT flag is set. - -3. References - - [1] Deutsch, L.P.,"GZIP Compressed Data Format Specification", - available in ftp://ftp.uu.net/pub/archiving/zip/doc/ - - [2] Thomas Boutell, "PNG (Portable Network Graphics) specification", - available in ftp://ftp.uu.net/graphics/png/documents/ - - [3] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification", - available in ftp://ftp.uu.net/pub/archiving/zip/doc/ - - [4] Fletcher, J. G., "An Arithmetic Checksum for Serial - Transmissions," IEEE Transactions on Communications, Vol. COM-30, - No. 1, January 1982, pp. 247-252. - - [5] ITU-T Recommendation X.224, Annex D, "Checksum Algorithms," - November, 1993, pp. 144, 145. (Available from - gopher://info.itu.ch). ITU-T X.244 is also the same as ISO 8073. - - - - - - - -Deutsch & Gailly Informational [Page 7] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - -4. Source code - - Source code for a C language implementation of a "zlib" compliant - library is available at ftp://ftp.uu.net/pub/archiving/zip/zlib/. - -5. Security Considerations - - A decoder that fails to check the ADLER32 checksum value may be - subject to undetected data corruption. - -6. Acknowledgements - - Trademarks cited in this document are the property of their - respective owners. - - Jean-Loup Gailly and Mark Adler designed the zlib format and wrote - the related software described in this specification. Glenn - Randers-Pehrson converted this document to RFC and HTML format. - -7. Authors' Addresses - - L. Peter Deutsch - Aladdin Enterprises - 203 Santa Margarita Ave. - Menlo Park, CA 94025 - - Phone: (415) 322-0103 (AM only) - FAX: (415) 322-1734 - EMail: - - - Jean-Loup Gailly - - EMail: - - Questions about the technical content of this specification can be - sent by email to - - Jean-Loup Gailly and - Mark Adler - - Editorial comments on this specification can be sent by email to - - L. Peter Deutsch and - Glenn Randers-Pehrson - - - - - - -Deutsch & Gailly Informational [Page 8] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - -8. Appendix: Rationale - - 8.1. Preset dictionaries - - A preset dictionary is specially useful to compress short input - sequences. The compressor can take advantage of the dictionary - context to encode the input in a more compact manner. The - decompressor can be initialized with the appropriate context by - virtually decompressing a compressed version of the dictionary - without producing any output. However for certain compression - algorithms such as the deflate algorithm this operation can be - achieved without actually performing any decompression. - - The compressor and the decompressor must use exactly the same - dictionary. The dictionary may be fixed or may be chosen among a - certain number of predefined dictionaries, according to the kind - of input data. The decompressor can determine which dictionary has - been chosen by the compressor by checking the dictionary - identifier. This document does not specify the contents of - predefined dictionaries, since the optimal dictionaries are - application specific. Standard data formats using this feature of - the zlib specification must precisely define the allowed - dictionaries. - - 8.2. The Adler-32 algorithm - - The Adler-32 algorithm is much faster than the CRC32 algorithm yet - still provides an extremely low probability of undetected errors. - - The modulo on unsigned long accumulators can be delayed for 5552 - bytes, so the modulo operation time is negligible. If the bytes - are a, b, c, the second sum is 3a + 2b + c + 3, and so is position - and order sensitive, unlike the first sum, which is just a - checksum. That 65521 is prime is important to avoid a possible - large class of two-byte errors that leave the check unchanged. - (The Fletcher checksum uses 255, which is not prime and which also - makes the Fletcher check insensitive to single byte changes 0 <-> - 255.) - - The sum s1 is initialized to 1 instead of zero to make the length - of the sequence part of s2, so that the length does not have to be - checked separately. (Any sequence of zeroes has a Fletcher - checksum of zero.) - - - - - - - - -Deutsch & Gailly Informational [Page 9] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - -9. Appendix: Sample code - - The following C code computes the Adler-32 checksum of a data buffer. - It is written for clarity, not for speed. The sample code is in the - ANSI C programming language. Non C users may find it easier to read - with these hints: - - & Bitwise AND operator. - >> Bitwise right shift operator. When applied to an - unsigned quantity, as here, right shift inserts zero bit(s) - at the left. - << Bitwise left shift operator. Left shift inserts zero - bit(s) at the right. - ++ "n++" increments the variable n. - % modulo operator: a % b is the remainder of a divided by b. - - #define BASE 65521 /* largest prime smaller than 65536 */ - - /* - Update a running Adler-32 checksum with the bytes buf[0..len-1] - and return the updated checksum. The Adler-32 checksum should be - initialized to 1. - - Usage example: - - unsigned long adler = 1L; - - while (read_buffer(buffer, length) != EOF) { - adler = update_adler32(adler, buffer, length); - } - if (adler != original_adler) error(); - */ - unsigned long update_adler32(unsigned long adler, - unsigned char *buf, int len) - { - unsigned long s1 = adler & 0xffff; - unsigned long s2 = (adler >> 16) & 0xffff; - int n; - - for (n = 0; n < len; n++) { - s1 = (s1 + buf[n]) % BASE; - s2 = (s2 + s1) % BASE; - } - return (s2 << 16) + s1; - } - - /* Return the adler32 of the bytes buf[0..len-1] */ - - - - -Deutsch & Gailly Informational [Page 10] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - unsigned long adler32(unsigned char *buf, int len) - { - return update_adler32(1L, buf, len); - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Deutsch & Gailly Informational [Page 11] - diff --git a/thirdparty/zlib-1.2.12/doc/rfc1951.txt b/thirdparty/zlib-1.2.12/doc/rfc1951.txt deleted file mode 100644 index 403c8c7..0000000 --- a/thirdparty/zlib-1.2.12/doc/rfc1951.txt +++ /dev/null @@ -1,955 +0,0 @@ - - - - - - -Network Working Group P. Deutsch -Request for Comments: 1951 Aladdin Enterprises -Category: Informational May 1996 - - - DEFLATE Compressed Data Format Specification version 1.3 - -Status of This Memo - - This memo provides information for the Internet community. This memo - does not specify an Internet standard of any kind. Distribution of - this memo is unlimited. - -IESG Note: - - The IESG takes no position on the validity of any Intellectual - Property Rights statements contained in this document. - -Notices - - Copyright (c) 1996 L. Peter Deutsch - - Permission is granted to copy and distribute this document for any - purpose and without charge, including translations into other - languages and incorporation into compilations, provided that the - copyright notice and this notice are preserved, and that any - substantive changes or deletions from the original are clearly - marked. - - A pointer to the latest version of this and related documentation in - HTML format can be found at the URL - . - -Abstract - - This specification defines a lossless compressed data format that - compresses data using a combination of the LZ77 algorithm and Huffman - coding, with efficiency comparable to the best currently available - general-purpose compression methods. The data can be produced or - consumed, even for an arbitrarily long sequentially presented input - data stream, using only an a priori bounded amount of intermediate - storage. The format can be implemented readily in a manner not - covered by patents. - - - - - - - - -Deutsch Informational [Page 1] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - -Table of Contents - - 1. Introduction ................................................... 2 - 1.1. Purpose ................................................... 2 - 1.2. Intended audience ......................................... 3 - 1.3. Scope ..................................................... 3 - 1.4. Compliance ................................................ 3 - 1.5. Definitions of terms and conventions used ................ 3 - 1.6. Changes from previous versions ............................ 4 - 2. Compressed representation overview ............................. 4 - 3. Detailed specification ......................................... 5 - 3.1. Overall conventions ....................................... 5 - 3.1.1. Packing into bytes .................................. 5 - 3.2. Compressed block format ................................... 6 - 3.2.1. Synopsis of prefix and Huffman coding ............... 6 - 3.2.2. Use of Huffman coding in the "deflate" format ....... 7 - 3.2.3. Details of block format ............................. 9 - 3.2.4. Non-compressed blocks (BTYPE=00) ................... 11 - 3.2.5. Compressed blocks (length and distance codes) ...... 11 - 3.2.6. Compression with fixed Huffman codes (BTYPE=01) .... 12 - 3.2.7. Compression with dynamic Huffman codes (BTYPE=10) .. 13 - 3.3. Compliance ............................................... 14 - 4. Compression algorithm details ................................. 14 - 5. References .................................................... 16 - 6. Security Considerations ....................................... 16 - 7. Source code ................................................... 16 - 8. Acknowledgements .............................................. 16 - 9. Author's Address .............................................. 17 - -1. Introduction - - 1.1. Purpose - - The purpose of this specification is to define a lossless - compressed data format that: - * Is independent of CPU type, operating system, file system, - and character set, and hence can be used for interchange; - * Can be produced or consumed, even for an arbitrarily long - sequentially presented input data stream, using only an a - priori bounded amount of intermediate storage, and hence - can be used in data communications or similar structures - such as Unix filters; - * Compresses data with efficiency comparable to the best - currently available general-purpose compression methods, - and in particular considerably better than the "compress" - program; - * Can be implemented readily in a manner not covered by - patents, and hence can be practiced freely; - - - -Deutsch Informational [Page 2] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - * Is compatible with the file format produced by the current - widely used gzip utility, in that conforming decompressors - will be able to read data produced by the existing gzip - compressor. - - The data format defined by this specification does not attempt to: - - * Allow random access to compressed data; - * Compress specialized data (e.g., raster graphics) as well - as the best currently available specialized algorithms. - - A simple counting argument shows that no lossless compression - algorithm can compress every possible input data set. For the - format defined here, the worst case expansion is 5 bytes per 32K- - byte block, i.e., a size increase of 0.015% for large data sets. - English text usually compresses by a factor of 2.5 to 3; - executable files usually compress somewhat less; graphical data - such as raster images may compress much more. - - 1.2. Intended audience - - This specification is intended for use by implementors of software - to compress data into "deflate" format and/or decompress data from - "deflate" format. - - The text of the specification assumes a basic background in - programming at the level of bits and other primitive data - representations. Familiarity with the technique of Huffman coding - is helpful but not required. - - 1.3. Scope - - The specification specifies a method for representing a sequence - of bytes as a (usually shorter) sequence of bits, and a method for - packing the latter bit sequence into bytes. - - 1.4. Compliance - - Unless otherwise indicated below, a compliant decompressor must be - able to accept and decompress any data set that conforms to all - the specifications presented here; a compliant compressor must - produce data sets that conform to all the specifications presented - here. - - 1.5. Definitions of terms and conventions used - - Byte: 8 bits stored or transmitted as a unit (same as an octet). - For this specification, a byte is exactly 8 bits, even on machines - - - -Deutsch Informational [Page 3] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - which store a character on a number of bits different from eight. - See below, for the numbering of bits within a byte. - - String: a sequence of arbitrary bytes. - - 1.6. Changes from previous versions - - There have been no technical changes to the deflate format since - version 1.1 of this specification. In version 1.2, some - terminology was changed. Version 1.3 is a conversion of the - specification to RFC style. - -2. Compressed representation overview - - A compressed data set consists of a series of blocks, corresponding - to successive blocks of input data. The block sizes are arbitrary, - except that non-compressible blocks are limited to 65,535 bytes. - - Each block is compressed using a combination of the LZ77 algorithm - and Huffman coding. The Huffman trees for each block are independent - of those for previous or subsequent blocks; the LZ77 algorithm may - use a reference to a duplicated string occurring in a previous block, - up to 32K input bytes before. - - Each block consists of two parts: a pair of Huffman code trees that - describe the representation of the compressed data part, and a - compressed data part. (The Huffman trees themselves are compressed - using Huffman encoding.) The compressed data consists of a series of - elements of two types: literal bytes (of strings that have not been - detected as duplicated within the previous 32K input bytes), and - pointers to duplicated strings, where a pointer is represented as a - pair . The representation used in the - "deflate" format limits distances to 32K bytes and lengths to 258 - bytes, but does not limit the size of a block, except for - uncompressible blocks, which are limited as noted above. - - Each type of value (literals, distances, and lengths) in the - compressed data is represented using a Huffman code, using one code - tree for literals and lengths and a separate code tree for distances. - The code trees for each block appear in a compact form just before - the compressed data for that block. - - - - - - - - - - -Deutsch Informational [Page 4] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - -3. Detailed specification - - 3.1. Overall conventions In the diagrams below, a box like this: - - +---+ - | | <-- the vertical bars might be missing - +---+ - - represents one byte; a box like this: - - +==============+ - | | - +==============+ - - represents a variable number of bytes. - - Bytes stored within a computer do not have a "bit order", since - they are always treated as a unit. However, a byte considered as - an integer between 0 and 255 does have a most- and least- - significant bit, and since we write numbers with the most- - significant digit on the left, we also write bytes with the most- - significant bit on the left. In the diagrams below, we number the - bits of a byte so that bit 0 is the least-significant bit, i.e., - the bits are numbered: - - +--------+ - |76543210| - +--------+ - - Within a computer, a number may occupy multiple bytes. All - multi-byte numbers in the format described here are stored with - the least-significant byte first (at the lower memory address). - For example, the decimal number 520 is stored as: - - 0 1 - +--------+--------+ - |00001000|00000010| - +--------+--------+ - ^ ^ - | | - | + more significant byte = 2 x 256 - + less significant byte = 8 - - 3.1.1. Packing into bytes - - This document does not address the issue of the order in which - bits of a byte are transmitted on a bit-sequential medium, - since the final data format described here is byte- rather than - - - -Deutsch Informational [Page 5] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - bit-oriented. However, we describe the compressed block format - in below, as a sequence of data elements of various bit - lengths, not a sequence of bytes. We must therefore specify - how to pack these data elements into bytes to form the final - compressed byte sequence: - - * Data elements are packed into bytes in order of - increasing bit number within the byte, i.e., starting - with the least-significant bit of the byte. - * Data elements other than Huffman codes are packed - starting with the least-significant bit of the data - element. - * Huffman codes are packed starting with the most- - significant bit of the code. - - In other words, if one were to print out the compressed data as - a sequence of bytes, starting with the first byte at the - *right* margin and proceeding to the *left*, with the most- - significant bit of each byte on the left as usual, one would be - able to parse the result from right to left, with fixed-width - elements in the correct MSB-to-LSB order and Huffman codes in - bit-reversed order (i.e., with the first bit of the code in the - relative LSB position). - - 3.2. Compressed block format - - 3.2.1. Synopsis of prefix and Huffman coding - - Prefix coding represents symbols from an a priori known - alphabet by bit sequences (codes), one code for each symbol, in - a manner such that different symbols may be represented by bit - sequences of different lengths, but a parser can always parse - an encoded string unambiguously symbol-by-symbol. - - We define a prefix code in terms of a binary tree in which the - two edges descending from each non-leaf node are labeled 0 and - 1 and in which the leaf nodes correspond one-for-one with (are - labeled with) the symbols of the alphabet; then the code for a - symbol is the sequence of 0's and 1's on the edges leading from - the root to the leaf labeled with that symbol. For example: - - - - - - - - - - - -Deutsch Informational [Page 6] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - /\ Symbol Code - 0 1 ------ ---- - / \ A 00 - /\ B B 1 - 0 1 C 011 - / \ D 010 - A /\ - 0 1 - / \ - D C - - A parser can decode the next symbol from an encoded input - stream by walking down the tree from the root, at each step - choosing the edge corresponding to the next input bit. - - Given an alphabet with known symbol frequencies, the Huffman - algorithm allows the construction of an optimal prefix code - (one which represents strings with those symbol frequencies - using the fewest bits of any possible prefix codes for that - alphabet). Such a code is called a Huffman code. (See - reference [1] in Chapter 5, references for additional - information on Huffman codes.) - - Note that in the "deflate" format, the Huffman codes for the - various alphabets must not exceed certain maximum code lengths. - This constraint complicates the algorithm for computing code - lengths from symbol frequencies. Again, see Chapter 5, - references for details. - - 3.2.2. Use of Huffman coding in the "deflate" format - - The Huffman codes used for each alphabet in the "deflate" - format have two additional rules: - - * All codes of a given bit length have lexicographically - consecutive values, in the same order as the symbols - they represent; - - * Shorter codes lexicographically precede longer codes. - - - - - - - - - - - - -Deutsch Informational [Page 7] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - We could recode the example above to follow this rule as - follows, assuming that the order of the alphabet is ABCD: - - Symbol Code - ------ ---- - A 10 - B 0 - C 110 - D 111 - - I.e., 0 precedes 10 which precedes 11x, and 110 and 111 are - lexicographically consecutive. - - Given this rule, we can define the Huffman code for an alphabet - just by giving the bit lengths of the codes for each symbol of - the alphabet in order; this is sufficient to determine the - actual codes. In our example, the code is completely defined - by the sequence of bit lengths (2, 1, 3, 3). The following - algorithm generates the codes as integers, intended to be read - from most- to least-significant bit. The code lengths are - initially in tree[I].Len; the codes are produced in - tree[I].Code. - - 1) Count the number of codes for each code length. Let - bl_count[N] be the number of codes of length N, N >= 1. - - 2) Find the numerical value of the smallest code for each - code length: - - code = 0; - bl_count[0] = 0; - for (bits = 1; bits <= MAX_BITS; bits++) { - code = (code + bl_count[bits-1]) << 1; - next_code[bits] = code; - } - - 3) Assign numerical values to all codes, using consecutive - values for all codes of the same length with the base - values determined at step 2. Codes that are never used - (which have a bit length of zero) must not be assigned a - value. - - for (n = 0; n <= max_code; n++) { - len = tree[n].Len; - if (len != 0) { - tree[n].Code = next_code[len]; - next_code[len]++; - } - - - -Deutsch Informational [Page 8] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - } - - Example: - - Consider the alphabet ABCDEFGH, with bit lengths (3, 3, 3, 3, - 3, 2, 4, 4). After step 1, we have: - - N bl_count[N] - - ----------- - 2 1 - 3 5 - 4 2 - - Step 2 computes the following next_code values: - - N next_code[N] - - ------------ - 1 0 - 2 0 - 3 2 - 4 14 - - Step 3 produces the following code values: - - Symbol Length Code - ------ ------ ---- - A 3 010 - B 3 011 - C 3 100 - D 3 101 - E 3 110 - F 2 00 - G 4 1110 - H 4 1111 - - 3.2.3. Details of block format - - Each block of compressed data begins with 3 header bits - containing the following data: - - first bit BFINAL - next 2 bits BTYPE - - Note that the header bits do not necessarily begin on a byte - boundary, since a block does not necessarily occupy an integral - number of bytes. - - - - - -Deutsch Informational [Page 9] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - BFINAL is set if and only if this is the last block of the data - set. - - BTYPE specifies how the data are compressed, as follows: - - 00 - no compression - 01 - compressed with fixed Huffman codes - 10 - compressed with dynamic Huffman codes - 11 - reserved (error) - - The only difference between the two compressed cases is how the - Huffman codes for the literal/length and distance alphabets are - defined. - - In all cases, the decoding algorithm for the actual data is as - follows: - - do - read block header from input stream. - if stored with no compression - skip any remaining bits in current partially - processed byte - read LEN and NLEN (see next section) - copy LEN bytes of data to output - otherwise - if compressed with dynamic Huffman codes - read representation of code trees (see - subsection below) - loop (until end of block code recognized) - decode literal/length value from input stream - if value < 256 - copy value (literal byte) to output stream - otherwise - if value = end of block (256) - break from loop - otherwise (value = 257..285) - decode distance from input stream - - move backwards distance bytes in the output - stream, and copy length bytes from this - position to the output stream. - end loop - while not last block - - Note that a duplicated string reference may refer to a string - in a previous block; i.e., the backward distance may cross one - or more block boundaries. However a distance cannot refer past - the beginning of the output stream. (An application using a - - - -Deutsch Informational [Page 10] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - preset dictionary might discard part of the output stream; a - distance can refer to that part of the output stream anyway) - Note also that the referenced string may overlap the current - position; for example, if the last 2 bytes decoded have values - X and Y, a string reference with - adds X,Y,X,Y,X to the output stream. - - We now specify each compression method in turn. - - 3.2.4. Non-compressed blocks (BTYPE=00) - - Any bits of input up to the next byte boundary are ignored. - The rest of the block consists of the following information: - - 0 1 2 3 4... - +---+---+---+---+================================+ - | LEN | NLEN |... LEN bytes of literal data...| - +---+---+---+---+================================+ - - LEN is the number of data bytes in the block. NLEN is the - one's complement of LEN. - - 3.2.5. Compressed blocks (length and distance codes) - - As noted above, encoded data blocks in the "deflate" format - consist of sequences of symbols drawn from three conceptually - distinct alphabets: either literal bytes, from the alphabet of - byte values (0..255), or pairs, - where the length is drawn from (3..258) and the distance is - drawn from (1..32,768). In fact, the literal and length - alphabets are merged into a single alphabet (0..285), where - values 0..255 represent literal bytes, the value 256 indicates - end-of-block, and values 257..285 represent length codes - (possibly in conjunction with extra bits following the symbol - code) as follows: - - - - - - - - - - - - - - - - -Deutsch Informational [Page 11] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - Extra Extra Extra - Code Bits Length(s) Code Bits Lengths Code Bits Length(s) - ---- ---- ------ ---- ---- ------- ---- ---- ------- - 257 0 3 267 1 15,16 277 4 67-82 - 258 0 4 268 1 17,18 278 4 83-98 - 259 0 5 269 2 19-22 279 4 99-114 - 260 0 6 270 2 23-26 280 4 115-130 - 261 0 7 271 2 27-30 281 5 131-162 - 262 0 8 272 2 31-34 282 5 163-194 - 263 0 9 273 3 35-42 283 5 195-226 - 264 0 10 274 3 43-50 284 5 227-257 - 265 1 11,12 275 3 51-58 285 0 258 - 266 1 13,14 276 3 59-66 - - The extra bits should be interpreted as a machine integer - stored with the most-significant bit first, e.g., bits 1110 - represent the value 14. - - Extra Extra Extra - Code Bits Dist Code Bits Dist Code Bits Distance - ---- ---- ---- ---- ---- ------ ---- ---- -------- - 0 0 1 10 4 33-48 20 9 1025-1536 - 1 0 2 11 4 49-64 21 9 1537-2048 - 2 0 3 12 5 65-96 22 10 2049-3072 - 3 0 4 13 5 97-128 23 10 3073-4096 - 4 1 5,6 14 6 129-192 24 11 4097-6144 - 5 1 7,8 15 6 193-256 25 11 6145-8192 - 6 2 9-12 16 7 257-384 26 12 8193-12288 - 7 2 13-16 17 7 385-512 27 12 12289-16384 - 8 3 17-24 18 8 513-768 28 13 16385-24576 - 9 3 25-32 19 8 769-1024 29 13 24577-32768 - - 3.2.6. Compression with fixed Huffman codes (BTYPE=01) - - The Huffman codes for the two alphabets are fixed, and are not - represented explicitly in the data. The Huffman code lengths - for the literal/length alphabet are: - - Lit Value Bits Codes - --------- ---- ----- - 0 - 143 8 00110000 through - 10111111 - 144 - 255 9 110010000 through - 111111111 - 256 - 279 7 0000000 through - 0010111 - 280 - 287 8 11000000 through - 11000111 - - - -Deutsch Informational [Page 12] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - The code lengths are sufficient to generate the actual codes, - as described above; we show the codes in the table for added - clarity. Literal/length values 286-287 will never actually - occur in the compressed data, but participate in the code - construction. - - Distance codes 0-31 are represented by (fixed-length) 5-bit - codes, with possible additional bits as shown in the table - shown in Paragraph 3.2.5, above. Note that distance codes 30- - 31 will never actually occur in the compressed data. - - 3.2.7. Compression with dynamic Huffman codes (BTYPE=10) - - The Huffman codes for the two alphabets appear in the block - immediately after the header bits and before the actual - compressed data, first the literal/length code and then the - distance code. Each code is defined by a sequence of code - lengths, as discussed in Paragraph 3.2.2, above. For even - greater compactness, the code length sequences themselves are - compressed using a Huffman code. The alphabet for code lengths - is as follows: - - 0 - 15: Represent code lengths of 0 - 15 - 16: Copy the previous code length 3 - 6 times. - The next 2 bits indicate repeat length - (0 = 3, ... , 3 = 6) - Example: Codes 8, 16 (+2 bits 11), - 16 (+2 bits 10) will expand to - 12 code lengths of 8 (1 + 6 + 5) - 17: Repeat a code length of 0 for 3 - 10 times. - (3 bits of length) - 18: Repeat a code length of 0 for 11 - 138 times - (7 bits of length) - - A code length of 0 indicates that the corresponding symbol in - the literal/length or distance alphabet will not occur in the - block, and should not participate in the Huffman code - construction algorithm given earlier. If only one distance - code is used, it is encoded using one bit, not zero bits; in - this case there is a single code length of one, with one unused - code. One distance code of zero bits means that there are no - distance codes used at all (the data is all literals). - - We can now define the format of the block: - - 5 Bits: HLIT, # of Literal/Length codes - 257 (257 - 286) - 5 Bits: HDIST, # of Distance codes - 1 (1 - 32) - 4 Bits: HCLEN, # of Code Length codes - 4 (4 - 19) - - - -Deutsch Informational [Page 13] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - (HCLEN + 4) x 3 bits: code lengths for the code length - alphabet given just above, in the order: 16, 17, 18, - 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 - - These code lengths are interpreted as 3-bit integers - (0-7); as above, a code length of 0 means the - corresponding symbol (literal/length or distance code - length) is not used. - - HLIT + 257 code lengths for the literal/length alphabet, - encoded using the code length Huffman code - - HDIST + 1 code lengths for the distance alphabet, - encoded using the code length Huffman code - - The actual compressed data of the block, - encoded using the literal/length and distance Huffman - codes - - The literal/length symbol 256 (end of data), - encoded using the literal/length Huffman code - - The code length repeat codes can cross from HLIT + 257 to the - HDIST + 1 code lengths. In other words, all code lengths form - a single sequence of HLIT + HDIST + 258 values. - - 3.3. Compliance - - A compressor may limit further the ranges of values specified in - the previous section and still be compliant; for example, it may - limit the range of backward pointers to some value smaller than - 32K. Similarly, a compressor may limit the size of blocks so that - a compressible block fits in memory. - - A compliant decompressor must accept the full range of possible - values defined in the previous section, and must accept blocks of - arbitrary size. - -4. Compression algorithm details - - While it is the intent of this document to define the "deflate" - compressed data format without reference to any particular - compression algorithm, the format is related to the compressed - formats produced by LZ77 (Lempel-Ziv 1977, see reference [2] below); - since many variations of LZ77 are patented, it is strongly - recommended that the implementor of a compressor follow the general - algorithm presented here, which is known not to be patented per se. - The material in this section is not part of the definition of the - - - -Deutsch Informational [Page 14] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - specification per se, and a compressor need not follow it in order to - be compliant. - - The compressor terminates a block when it determines that starting a - new block with fresh trees would be useful, or when the block size - fills up the compressor's block buffer. - - The compressor uses a chained hash table to find duplicated strings, - using a hash function that operates on 3-byte sequences. At any - given point during compression, let XYZ be the next 3 input bytes to - be examined (not necessarily all different, of course). First, the - compressor examines the hash chain for XYZ. If the chain is empty, - the compressor simply writes out X as a literal byte and advances one - byte in the input. If the hash chain is not empty, indicating that - the sequence XYZ (or, if we are unlucky, some other 3 bytes with the - same hash function value) has occurred recently, the compressor - compares all strings on the XYZ hash chain with the actual input data - sequence starting at the current point, and selects the longest - match. - - The compressor searches the hash chains starting with the most recent - strings, to favor small distances and thus take advantage of the - Huffman encoding. The hash chains are singly linked. There are no - deletions from the hash chains; the algorithm simply discards matches - that are too old. To avoid a worst-case situation, very long hash - chains are arbitrarily truncated at a certain length, determined by a - run-time parameter. - - To improve overall compression, the compressor optionally defers the - selection of matches ("lazy matching"): after a match of length N has - been found, the compressor searches for a longer match starting at - the next input byte. If it finds a longer match, it truncates the - previous match to a length of one (thus producing a single literal - byte) and then emits the longer match. Otherwise, it emits the - original match, and, as described above, advances N bytes before - continuing. - - Run-time parameters also control this "lazy match" procedure. If - compression ratio is most important, the compressor attempts a - complete second search regardless of the length of the first match. - In the normal case, if the current match is "long enough", the - compressor reduces the search for a longer match, thus speeding up - the process. If speed is most important, the compressor inserts new - strings in the hash table only when no match was found, or when the - match is not "too long". This degrades the compression ratio but - saves time since there are both fewer insertions and fewer searches. - - - - - -Deutsch Informational [Page 15] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - -5. References - - [1] Huffman, D. A., "A Method for the Construction of Minimum - Redundancy Codes", Proceedings of the Institute of Radio - Engineers, September 1952, Volume 40, Number 9, pp. 1098-1101. - - [2] Ziv J., Lempel A., "A Universal Algorithm for Sequential Data - Compression", IEEE Transactions on Information Theory, Vol. 23, - No. 3, pp. 337-343. - - [3] Gailly, J.-L., and Adler, M., ZLIB documentation and sources, - available in ftp://ftp.uu.net/pub/archiving/zip/doc/ - - [4] Gailly, J.-L., and Adler, M., GZIP documentation and sources, - available as gzip-*.tar in ftp://prep.ai.mit.edu/pub/gnu/ - - [5] Schwartz, E. S., and Kallick, B. "Generating a canonical prefix - encoding." Comm. ACM, 7,3 (Mar. 1964), pp. 166-169. - - [6] Hirschberg and Lelewer, "Efficient decoding of prefix codes," - Comm. ACM, 33,4, April 1990, pp. 449-459. - -6. Security Considerations - - Any data compression method involves the reduction of redundancy in - the data. Consequently, any corruption of the data is likely to have - severe effects and be difficult to correct. Uncompressed text, on - the other hand, will probably still be readable despite the presence - of some corrupted bytes. - - It is recommended that systems using this data format provide some - means of validating the integrity of the compressed data. See - reference [3], for example. - -7. Source code - - Source code for a C language implementation of a "deflate" compliant - compressor and decompressor is available within the zlib package at - ftp://ftp.uu.net/pub/archiving/zip/zlib/. - -8. Acknowledgements - - Trademarks cited in this document are the property of their - respective owners. - - Phil Katz designed the deflate format. Jean-Loup Gailly and Mark - Adler wrote the related software described in this specification. - Glenn Randers-Pehrson converted this document to RFC and HTML format. - - - -Deutsch Informational [Page 16] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - -9. Author's Address - - L. Peter Deutsch - Aladdin Enterprises - 203 Santa Margarita Ave. - Menlo Park, CA 94025 - - Phone: (415) 322-0103 (AM only) - FAX: (415) 322-1734 - EMail: - - Questions about the technical content of this specification can be - sent by email to: - - Jean-Loup Gailly and - Mark Adler - - Editorial comments on this specification can be sent by email to: - - L. Peter Deutsch and - Glenn Randers-Pehrson - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Deutsch Informational [Page 17] - diff --git a/thirdparty/zlib-1.2.12/doc/rfc1952.txt b/thirdparty/zlib-1.2.12/doc/rfc1952.txt deleted file mode 100644 index a8e51b4..0000000 --- a/thirdparty/zlib-1.2.12/doc/rfc1952.txt +++ /dev/null @@ -1,675 +0,0 @@ - - - - - - -Network Working Group P. Deutsch -Request for Comments: 1952 Aladdin Enterprises -Category: Informational May 1996 - - - GZIP file format specification version 4.3 - -Status of This Memo - - This memo provides information for the Internet community. This memo - does not specify an Internet standard of any kind. Distribution of - this memo is unlimited. - -IESG Note: - - The IESG takes no position on the validity of any Intellectual - Property Rights statements contained in this document. - -Notices - - Copyright (c) 1996 L. Peter Deutsch - - Permission is granted to copy and distribute this document for any - purpose and without charge, including translations into other - languages and incorporation into compilations, provided that the - copyright notice and this notice are preserved, and that any - substantive changes or deletions from the original are clearly - marked. - - A pointer to the latest version of this and related documentation in - HTML format can be found at the URL - . - -Abstract - - This specification defines a lossless compressed data format that is - compatible with the widely used GZIP utility. The format includes a - cyclic redundancy check value for detecting data corruption. The - format presently uses the DEFLATE method of compression but can be - easily extended to use other compression methods. The format can be - implemented readily in a manner not covered by patents. - - - - - - - - - - -Deutsch Informational [Page 1] - -RFC 1952 GZIP File Format Specification May 1996 - - -Table of Contents - - 1. Introduction ................................................... 2 - 1.1. Purpose ................................................... 2 - 1.2. Intended audience ......................................... 3 - 1.3. Scope ..................................................... 3 - 1.4. Compliance ................................................ 3 - 1.5. Definitions of terms and conventions used ................. 3 - 1.6. Changes from previous versions ............................ 3 - 2. Detailed specification ......................................... 4 - 2.1. Overall conventions ....................................... 4 - 2.2. File format ............................................... 5 - 2.3. Member format ............................................. 5 - 2.3.1. Member header and trailer ........................... 6 - 2.3.1.1. Extra field ................................... 8 - 2.3.1.2. Compliance .................................... 9 - 3. References .................................................. 9 - 4. Security Considerations .................................... 10 - 5. Acknowledgements ........................................... 10 - 6. Author's Address ........................................... 10 - 7. Appendix: Jean-Loup Gailly's gzip utility .................. 11 - 8. Appendix: Sample CRC Code .................................. 11 - -1. Introduction - - 1.1. Purpose - - The purpose of this specification is to define a lossless - compressed data format that: - - * Is independent of CPU type, operating system, file system, - and character set, and hence can be used for interchange; - * Can compress or decompress a data stream (as opposed to a - randomly accessible file) to produce another data stream, - using only an a priori bounded amount of intermediate - storage, and hence can be used in data communications or - similar structures such as Unix filters; - * Compresses data with efficiency comparable to the best - currently available general-purpose compression methods, - and in particular considerably better than the "compress" - program; - * Can be implemented readily in a manner not covered by - patents, and hence can be practiced freely; - * Is compatible with the file format produced by the current - widely used gzip utility, in that conforming decompressors - will be able to read data produced by the existing gzip - compressor. - - - - -Deutsch Informational [Page 2] - -RFC 1952 GZIP File Format Specification May 1996 - - - The data format defined by this specification does not attempt to: - - * Provide random access to compressed data; - * Compress specialized data (e.g., raster graphics) as well as - the best currently available specialized algorithms. - - 1.2. Intended audience - - This specification is intended for use by implementors of software - to compress data into gzip format and/or decompress data from gzip - format. - - The text of the specification assumes a basic background in - programming at the level of bits and other primitive data - representations. - - 1.3. Scope - - The specification specifies a compression method and a file format - (the latter assuming only that a file can store a sequence of - arbitrary bytes). It does not specify any particular interface to - a file system or anything about character sets or encodings - (except for file names and comments, which are optional). - - 1.4. Compliance - - Unless otherwise indicated below, a compliant decompressor must be - able to accept and decompress any file that conforms to all the - specifications presented here; a compliant compressor must produce - files that conform to all the specifications presented here. The - material in the appendices is not part of the specification per se - and is not relevant to compliance. - - 1.5. Definitions of terms and conventions used - - byte: 8 bits stored or transmitted as a unit (same as an octet). - (For this specification, a byte is exactly 8 bits, even on - machines which store a character on a number of bits different - from 8.) See below for the numbering of bits within a byte. - - 1.6. Changes from previous versions - - There have been no technical changes to the gzip format since - version 4.1 of this specification. In version 4.2, some - terminology was changed, and the sample CRC code was rewritten for - clarity and to eliminate the requirement for the caller to do pre- - and post-conditioning. Version 4.3 is a conversion of the - specification to RFC style. - - - -Deutsch Informational [Page 3] - -RFC 1952 GZIP File Format Specification May 1996 - - -2. Detailed specification - - 2.1. Overall conventions - - In the diagrams below, a box like this: - - +---+ - | | <-- the vertical bars might be missing - +---+ - - represents one byte; a box like this: - - +==============+ - | | - +==============+ - - represents a variable number of bytes. - - Bytes stored within a computer do not have a "bit order", since - they are always treated as a unit. However, a byte considered as - an integer between 0 and 255 does have a most- and least- - significant bit, and since we write numbers with the most- - significant digit on the left, we also write bytes with the most- - significant bit on the left. In the diagrams below, we number the - bits of a byte so that bit 0 is the least-significant bit, i.e., - the bits are numbered: - - +--------+ - |76543210| - +--------+ - - This document does not address the issue of the order in which - bits of a byte are transmitted on a bit-sequential medium, since - the data format described here is byte- rather than bit-oriented. - - Within a computer, a number may occupy multiple bytes. All - multi-byte numbers in the format described here are stored with - the least-significant byte first (at the lower memory address). - For example, the decimal number 520 is stored as: - - 0 1 - +--------+--------+ - |00001000|00000010| - +--------+--------+ - ^ ^ - | | - | + more significant byte = 2 x 256 - + less significant byte = 8 - - - -Deutsch Informational [Page 4] - -RFC 1952 GZIP File Format Specification May 1996 - - - 2.2. File format - - A gzip file consists of a series of "members" (compressed data - sets). The format of each member is specified in the following - section. The members simply appear one after another in the file, - with no additional information before, between, or after them. - - 2.3. Member format - - Each member has the following structure: - - +---+---+---+---+---+---+---+---+---+---+ - |ID1|ID2|CM |FLG| MTIME |XFL|OS | (more-->) - +---+---+---+---+---+---+---+---+---+---+ - - (if FLG.FEXTRA set) - - +---+---+=================================+ - | XLEN |...XLEN bytes of "extra field"...| (more-->) - +---+---+=================================+ - - (if FLG.FNAME set) - - +=========================================+ - |...original file name, zero-terminated...| (more-->) - +=========================================+ - - (if FLG.FCOMMENT set) - - +===================================+ - |...file comment, zero-terminated...| (more-->) - +===================================+ - - (if FLG.FHCRC set) - - +---+---+ - | CRC16 | - +---+---+ - - +=======================+ - |...compressed blocks...| (more-->) - +=======================+ - - 0 1 2 3 4 5 6 7 - +---+---+---+---+---+---+---+---+ - | CRC32 | ISIZE | - +---+---+---+---+---+---+---+---+ - - - - -Deutsch Informational [Page 5] - -RFC 1952 GZIP File Format Specification May 1996 - - - 2.3.1. Member header and trailer - - ID1 (IDentification 1) - ID2 (IDentification 2) - These have the fixed values ID1 = 31 (0x1f, \037), ID2 = 139 - (0x8b, \213), to identify the file as being in gzip format. - - CM (Compression Method) - This identifies the compression method used in the file. CM - = 0-7 are reserved. CM = 8 denotes the "deflate" - compression method, which is the one customarily used by - gzip and which is documented elsewhere. - - FLG (FLaGs) - This flag byte is divided into individual bits as follows: - - bit 0 FTEXT - bit 1 FHCRC - bit 2 FEXTRA - bit 3 FNAME - bit 4 FCOMMENT - bit 5 reserved - bit 6 reserved - bit 7 reserved - - If FTEXT is set, the file is probably ASCII text. This is - an optional indication, which the compressor may set by - checking a small amount of the input data to see whether any - non-ASCII characters are present. In case of doubt, FTEXT - is cleared, indicating binary data. For systems which have - different file formats for ascii text and binary data, the - decompressor can use FTEXT to choose the appropriate format. - We deliberately do not specify the algorithm used to set - this bit, since a compressor always has the option of - leaving it cleared and a decompressor always has the option - of ignoring it and letting some other program handle issues - of data conversion. - - If FHCRC is set, a CRC16 for the gzip header is present, - immediately before the compressed data. The CRC16 consists - of the two least significant bytes of the CRC32 for all - bytes of the gzip header up to and not including the CRC16. - [The FHCRC bit was never set by versions of gzip up to - 1.2.4, even though it was documented with a different - meaning in gzip 1.2.4.] - - If FEXTRA is set, optional extra fields are present, as - described in a following section. - - - -Deutsch Informational [Page 6] - -RFC 1952 GZIP File Format Specification May 1996 - - - If FNAME is set, an original file name is present, - terminated by a zero byte. The name must consist of ISO - 8859-1 (LATIN-1) characters; on operating systems using - EBCDIC or any other character set for file names, the name - must be translated to the ISO LATIN-1 character set. This - is the original name of the file being compressed, with any - directory components removed, and, if the file being - compressed is on a file system with case insensitive names, - forced to lower case. There is no original file name if the - data was compressed from a source other than a named file; - for example, if the source was stdin on a Unix system, there - is no file name. - - If FCOMMENT is set, a zero-terminated file comment is - present. This comment is not interpreted; it is only - intended for human consumption. The comment must consist of - ISO 8859-1 (LATIN-1) characters. Line breaks should be - denoted by a single line feed character (10 decimal). - - Reserved FLG bits must be zero. - - MTIME (Modification TIME) - This gives the most recent modification time of the original - file being compressed. The time is in Unix format, i.e., - seconds since 00:00:00 GMT, Jan. 1, 1970. (Note that this - may cause problems for MS-DOS and other systems that use - local rather than Universal time.) If the compressed data - did not come from a file, MTIME is set to the time at which - compression started. MTIME = 0 means no time stamp is - available. - - XFL (eXtra FLags) - These flags are available for use by specific compression - methods. The "deflate" method (CM = 8) sets these flags as - follows: - - XFL = 2 - compressor used maximum compression, - slowest algorithm - XFL = 4 - compressor used fastest algorithm - - OS (Operating System) - This identifies the type of file system on which compression - took place. This may be useful in determining end-of-line - convention for text files. The currently defined values are - as follows: - - - - - - -Deutsch Informational [Page 7] - -RFC 1952 GZIP File Format Specification May 1996 - - - 0 - FAT filesystem (MS-DOS, OS/2, NT/Win32) - 1 - Amiga - 2 - VMS (or OpenVMS) - 3 - Unix - 4 - VM/CMS - 5 - Atari TOS - 6 - HPFS filesystem (OS/2, NT) - 7 - Macintosh - 8 - Z-System - 9 - CP/M - 10 - TOPS-20 - 11 - NTFS filesystem (NT) - 12 - QDOS - 13 - Acorn RISCOS - 255 - unknown - - XLEN (eXtra LENgth) - If FLG.FEXTRA is set, this gives the length of the optional - extra field. See below for details. - - CRC32 (CRC-32) - This contains a Cyclic Redundancy Check value of the - uncompressed data computed according to CRC-32 algorithm - used in the ISO 3309 standard and in section 8.1.1.6.2 of - ITU-T recommendation V.42. (See http://www.iso.ch for - ordering ISO documents. See gopher://info.itu.ch for an - online version of ITU-T V.42.) - - ISIZE (Input SIZE) - This contains the size of the original (uncompressed) input - data modulo 2^32. - - 2.3.1.1. Extra field - - If the FLG.FEXTRA bit is set, an "extra field" is present in - the header, with total length XLEN bytes. It consists of a - series of subfields, each of the form: - - +---+---+---+---+==================================+ - |SI1|SI2| LEN |... LEN bytes of subfield data ...| - +---+---+---+---+==================================+ - - SI1 and SI2 provide a subfield ID, typically two ASCII letters - with some mnemonic value. Jean-Loup Gailly - is maintaining a registry of subfield - IDs; please send him any subfield ID you wish to use. Subfield - IDs with SI2 = 0 are reserved for future use. The following - IDs are currently defined: - - - -Deutsch Informational [Page 8] - -RFC 1952 GZIP File Format Specification May 1996 - - - SI1 SI2 Data - ---------- ---------- ---- - 0x41 ('A') 0x70 ('P') Apollo file type information - - LEN gives the length of the subfield data, excluding the 4 - initial bytes. - - 2.3.1.2. Compliance - - A compliant compressor must produce files with correct ID1, - ID2, CM, CRC32, and ISIZE, but may set all the other fields in - the fixed-length part of the header to default values (255 for - OS, 0 for all others). The compressor must set all reserved - bits to zero. - - A compliant decompressor must check ID1, ID2, and CM, and - provide an error indication if any of these have incorrect - values. It must examine FEXTRA/XLEN, FNAME, FCOMMENT and FHCRC - at least so it can skip over the optional fields if they are - present. It need not examine any other part of the header or - trailer; in particular, a decompressor may ignore FTEXT and OS - and always produce binary output, and still be compliant. A - compliant decompressor must give an error indication if any - reserved bit is non-zero, since such a bit could indicate the - presence of a new field that would cause subsequent data to be - interpreted incorrectly. - -3. References - - [1] "Information Processing - 8-bit single-byte coded graphic - character sets - Part 1: Latin alphabet No.1" (ISO 8859-1:1987). - The ISO 8859-1 (Latin-1) character set is a superset of 7-bit - ASCII. Files defining this character set are available as - iso_8859-1.* in ftp://ftp.uu.net/graphics/png/documents/ - - [2] ISO 3309 - - [3] ITU-T recommendation V.42 - - [4] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification", - available in ftp://ftp.uu.net/pub/archiving/zip/doc/ - - [5] Gailly, J.-L., GZIP documentation, available as gzip-*.tar in - ftp://prep.ai.mit.edu/pub/gnu/ - - [6] Sarwate, D.V., "Computation of Cyclic Redundancy Checks via Table - Look-Up", Communications of the ACM, 31(8), pp.1008-1013. - - - - -Deutsch Informational [Page 9] - -RFC 1952 GZIP File Format Specification May 1996 - - - [7] Schwaderer, W.D., "CRC Calculation", April 85 PC Tech Journal, - pp.118-133. - - [8] ftp://ftp.adelaide.edu.au/pub/rocksoft/papers/crc_v3.txt, - describing the CRC concept. - -4. Security Considerations - - Any data compression method involves the reduction of redundancy in - the data. Consequently, any corruption of the data is likely to have - severe effects and be difficult to correct. Uncompressed text, on - the other hand, will probably still be readable despite the presence - of some corrupted bytes. - - It is recommended that systems using this data format provide some - means of validating the integrity of the compressed data, such as by - setting and checking the CRC-32 check value. - -5. Acknowledgements - - Trademarks cited in this document are the property of their - respective owners. - - Jean-Loup Gailly designed the gzip format and wrote, with Mark Adler, - the related software described in this specification. Glenn - Randers-Pehrson converted this document to RFC and HTML format. - -6. Author's Address - - L. Peter Deutsch - Aladdin Enterprises - 203 Santa Margarita Ave. - Menlo Park, CA 94025 - - Phone: (415) 322-0103 (AM only) - FAX: (415) 322-1734 - EMail: - - Questions about the technical content of this specification can be - sent by email to: - - Jean-Loup Gailly and - Mark Adler - - Editorial comments on this specification can be sent by email to: - - L. Peter Deutsch and - Glenn Randers-Pehrson - - - -Deutsch Informational [Page 10] - -RFC 1952 GZIP File Format Specification May 1996 - - -7. Appendix: Jean-Loup Gailly's gzip utility - - The most widely used implementation of gzip compression, and the - original documentation on which this specification is based, were - created by Jean-Loup Gailly . Since this - implementation is a de facto standard, we mention some more of its - features here. Again, the material in this section is not part of - the specification per se, and implementations need not follow it to - be compliant. - - When compressing or decompressing a file, gzip preserves the - protection, ownership, and modification time attributes on the local - file system, since there is no provision for representing protection - attributes in the gzip file format itself. Since the file format - includes a modification time, the gzip decompressor provides a - command line switch that assigns the modification time from the file, - rather than the local modification time of the compressed input, to - the decompressed output. - -8. Appendix: Sample CRC Code - - The following sample code represents a practical implementation of - the CRC (Cyclic Redundancy Check). (See also ISO 3309 and ITU-T V.42 - for a formal specification.) - - The sample code is in the ANSI C programming language. Non C users - may find it easier to read with these hints: - - & Bitwise AND operator. - ^ Bitwise exclusive-OR operator. - >> Bitwise right shift operator. When applied to an - unsigned quantity, as here, right shift inserts zero - bit(s) at the left. - ! Logical NOT operator. - ++ "n++" increments the variable n. - 0xNNN 0x introduces a hexadecimal (base 16) constant. - Suffix L indicates a long value (at least 32 bits). - - /* Table of CRCs of all 8-bit messages. */ - unsigned long crc_table[256]; - - /* Flag: has the table been computed? Initially false. */ - int crc_table_computed = 0; - - /* Make the table for a fast CRC. */ - void make_crc_table(void) - { - unsigned long c; - - - -Deutsch Informational [Page 11] - -RFC 1952 GZIP File Format Specification May 1996 - - - int n, k; - for (n = 0; n < 256; n++) { - c = (unsigned long) n; - for (k = 0; k < 8; k++) { - if (c & 1) { - c = 0xedb88320L ^ (c >> 1); - } else { - c = c >> 1; - } - } - crc_table[n] = c; - } - crc_table_computed = 1; - } - - /* - Update a running crc with the bytes buf[0..len-1] and return - the updated crc. The crc should be initialized to zero. Pre- and - post-conditioning (one's complement) is performed within this - function so it shouldn't be done by the caller. Usage example: - - unsigned long crc = 0L; - - while (read_buffer(buffer, length) != EOF) { - crc = update_crc(crc, buffer, length); - } - if (crc != original_crc) error(); - */ - unsigned long update_crc(unsigned long crc, - unsigned char *buf, int len) - { - unsigned long c = crc ^ 0xffffffffL; - int n; - - if (!crc_table_computed) - make_crc_table(); - for (n = 0; n < len; n++) { - c = crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8); - } - return c ^ 0xffffffffL; - } - - /* Return the CRC of the bytes buf[0..len-1]. */ - unsigned long crc(unsigned char *buf, int len) - { - return update_crc(0L, buf, len); - } - - - - -Deutsch Informational [Page 12] - diff --git a/thirdparty/zlib-1.2.12/doc/txtvsbin.txt b/thirdparty/zlib-1.2.12/doc/txtvsbin.txt deleted file mode 100644 index 2a901ea..0000000 --- a/thirdparty/zlib-1.2.12/doc/txtvsbin.txt +++ /dev/null @@ -1,107 +0,0 @@ -A Fast Method for Identifying Plain Text Files -============================================== - - -Introduction ------------- - -Given a file coming from an unknown source, it is sometimes desirable -to find out whether the format of that file is plain text. Although -this may appear like a simple task, a fully accurate detection of the -file type requires heavy-duty semantic analysis on the file contents. -It is, however, possible to obtain satisfactory results by employing -various heuristics. - -Previous versions of PKZip and other zip-compatible compression tools -were using a crude detection scheme: if more than 80% (4/5) of the bytes -found in a certain buffer are within the range [7..127], the file is -labeled as plain text, otherwise it is labeled as binary. A prominent -limitation of this scheme is the restriction to Latin-based alphabets. -Other alphabets, like Greek, Cyrillic or Asian, make extensive use of -the bytes within the range [128..255], and texts using these alphabets -are most often misidentified by this scheme; in other words, the rate -of false negatives is sometimes too high, which means that the recall -is low. Another weakness of this scheme is a reduced precision, due to -the false positives that may occur when binary files containing large -amounts of textual characters are misidentified as plain text. - -In this article we propose a new, simple detection scheme that features -a much increased precision and a near-100% recall. This scheme is -designed to work on ASCII, Unicode and other ASCII-derived alphabets, -and it handles single-byte encodings (ISO-8859, MacRoman, KOI8, etc.) -and variable-sized encodings (ISO-2022, UTF-8, etc.). Wider encodings -(UCS-2/UTF-16 and UCS-4/UTF-32) are not handled, however. - - -The Algorithm -------------- - -The algorithm works by dividing the set of bytecodes [0..255] into three -categories: -- The allow list of textual bytecodes: - 9 (TAB), 10 (LF), 13 (CR), 32 (SPACE) to 255. -- The gray list of tolerated bytecodes: - 7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB), 27 (ESC). -- The block list of undesired, non-textual bytecodes: - 0 (NUL) to 6, 14 to 31. - -If a file contains at least one byte that belongs to the allow list and -no byte that belongs to the block list, then the file is categorized as -plain text; otherwise, it is categorized as binary. (The boundary case, -when the file is empty, automatically falls into the latter category.) - - -Rationale ---------- - -The idea behind this algorithm relies on two observations. - -The first observation is that, although the full range of 7-bit codes -[0..127] is properly specified by the ASCII standard, most control -characters in the range [0..31] are not used in practice. The only -widely-used, almost universally-portable control codes are 9 (TAB), -10 (LF) and 13 (CR). There are a few more control codes that are -recognized on a reduced range of platforms and text viewers/editors: -7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB) and 27 (ESC); but these -codes are rarely (if ever) used alone, without being accompanied by -some printable text. Even the newer, portable text formats such as -XML avoid using control characters outside the list mentioned here. - -The second observation is that most of the binary files tend to contain -control characters, especially 0 (NUL). Even though the older text -detection schemes observe the presence of non-ASCII codes from the range -[128..255], the precision rarely has to suffer if this upper range is -labeled as textual, because the files that are genuinely binary tend to -contain both control characters and codes from the upper range. On the -other hand, the upper range needs to be labeled as textual, because it -is used by virtually all ASCII extensions. In particular, this range is -used for encoding non-Latin scripts. - -Since there is no counting involved, other than simply observing the -presence or the absence of some byte values, the algorithm produces -consistent results, regardless what alphabet encoding is being used. -(If counting were involved, it could be possible to obtain different -results on a text encoded, say, using ISO-8859-16 versus UTF-8.) - -There is an extra category of plain text files that are "polluted" with -one or more block-listed codes, either by mistake or by peculiar design -considerations. In such cases, a scheme that tolerates a small fraction -of block-listed codes would provide an increased recall (i.e. more true -positives). This, however, incurs a reduced precision overall, since -false positives are more likely to appear in binary files that contain -large chunks of textual data. Furthermore, "polluted" plain text should -be regarded as binary by general-purpose text detection schemes, because -general-purpose text processing algorithms might not be applicable. -Under this premise, it is safe to say that our detection method provides -a near-100% recall. - -Experiments have been run on many files coming from various platforms -and applications. We tried plain text files, system logs, source code, -formatted office documents, compiled object code, etc. The results -confirm the optimistic assumptions about the capabilities of this -algorithm. - - --- -Cosmin Truta -Last updated: 2006-May-28 diff --git a/thirdparty/zlib-1.2.12/examples/README.examples b/thirdparty/zlib-1.2.12/examples/README.examples deleted file mode 100644 index e3a4b88..0000000 --- a/thirdparty/zlib-1.2.12/examples/README.examples +++ /dev/null @@ -1,54 +0,0 @@ -This directory contains examples of the use of zlib and other relevant -programs and documentation. - -enough.c - calculation and justification of ENOUGH parameter in inftrees.h - - calculates the maximum table space used in inflate tree - construction over all possible Huffman codes - -fitblk.c - compress just enough input to nearly fill a requested output size - - zlib isn't designed to do this, but fitblk does it anyway - -gun.c - uncompress a gzip file - - illustrates the use of inflateBack() for high speed file-to-file - decompression using call-back functions - - is approximately twice as fast as gzip -d - - also provides Unix uncompress functionality, again twice as fast - -gzappend.c - append to a gzip file - - illustrates the use of the Z_BLOCK flush parameter for inflate() - - illustrates the use of deflatePrime() to start at any bit - -gzjoin.c - join gzip files without recalculating the crc or recompressing - - illustrates the use of the Z_BLOCK flush parameter for inflate() - - illustrates the use of crc32_combine() - -gzlog.c -gzlog.h - efficiently and robustly maintain a message log file in gzip format - - illustrates use of raw deflate, Z_PARTIAL_FLUSH, deflatePrime(), - and deflateSetDictionary() - - illustrates use of a gzip header extra field - -gznorm.c - normalize a gzip file by combining members into a single member - - demonstrates how to concatenate deflate streams using Z_BLOCK - -zlib_how.html - painfully comprehensive description of zpipe.c (see below) - - describes in excruciating detail the use of deflate() and inflate() - -zpipe.c - reads and writes zlib streams from stdin to stdout - - illustrates the proper use of deflate() and inflate() - - deeply commented in zlib_how.html (see above) - -zran.c -zran.h - index a zlib or gzip stream and randomly access it - - illustrates the use of Z_BLOCK, inflatePrime(), and - inflateSetDictionary() to provide random access diff --git a/thirdparty/zlib-1.2.12/examples/enough.c b/thirdparty/zlib-1.2.12/examples/enough.c deleted file mode 100644 index 19cf08c..0000000 --- a/thirdparty/zlib-1.2.12/examples/enough.c +++ /dev/null @@ -1,597 +0,0 @@ -/* enough.c -- determine the maximum size of inflate's Huffman code tables over - * all possible valid and complete prefix codes, subject to a length limit. - * Copyright (C) 2007, 2008, 2012, 2018 Mark Adler - * Version 1.5 5 August 2018 Mark Adler - */ - -/* Version history: - 1.0 3 Jan 2007 First version (derived from codecount.c version 1.4) - 1.1 4 Jan 2007 Use faster incremental table usage computation - Prune examine() search on previously visited states - 1.2 5 Jan 2007 Comments clean up - As inflate does, decrease root for short codes - Refuse cases where inflate would increase root - 1.3 17 Feb 2008 Add argument for initial root table size - Fix bug for initial root table size == max - 1 - Use a macro to compute the history index - 1.4 18 Aug 2012 Avoid shifts more than bits in type (caused endless loop!) - Clean up comparisons of different types - Clean up code indentation - 1.5 5 Aug 2018 Clean up code style, formatting, and comments - Show all the codes for the maximum, and only the maximum - */ - -/* - Examine all possible prefix codes for a given number of symbols and a - maximum code length in bits to determine the maximum table size for zlib's - inflate. Only complete prefix codes are counted. - - Two codes are considered distinct if the vectors of the number of codes per - length are not identical. So permutations of the symbol assignments result - in the same code for the counting, as do permutations of the assignments of - the bit values to the codes (i.e. only canonical codes are counted). - - We build a code from shorter to longer lengths, determining how many symbols - are coded at each length. At each step, we have how many symbols remain to - be coded, what the last code length used was, and how many bit patterns of - that length remain unused. Then we add one to the code length and double the - number of unused patterns to graduate to the next code length. We then - assign all portions of the remaining symbols to that code length that - preserve the properties of a correct and eventually complete code. Those - properties are: we cannot use more bit patterns than are available; and when - all the symbols are used, there are exactly zero possible bit patterns left - unused. - - The inflate Huffman decoding algorithm uses two-level lookup tables for - speed. There is a single first-level table to decode codes up to root bits - in length (root == 9 for literal/length codes and root == 6 for distance - codes, in the current inflate implementation). The base table has 1 << root - entries and is indexed by the next root bits of input. Codes shorter than - root bits have replicated table entries, so that the correct entry is - pointed to regardless of the bits that follow the short code. If the code is - longer than root bits, then the table entry points to a second-level table. - The size of that table is determined by the longest code with that root-bit - prefix. If that longest code has length len, then the table has size 1 << - (len - root), to index the remaining bits in that set of codes. Each - subsequent root-bit prefix then has its own sub-table. The total number of - table entries required by the code is calculated incrementally as the number - of codes at each bit length is populated. When all of the codes are shorter - than root bits, then root is reduced to the longest code length, resulting - in a single, smaller, one-level table. - - The inflate algorithm also provides for small values of root (relative to - the log2 of the number of symbols), where the shortest code has more bits - than root. In that case, root is increased to the length of the shortest - code. This program, by design, does not handle that case, so it is verified - that the number of symbols is less than 1 << (root + 1). - - In order to speed up the examination (by about ten orders of magnitude for - the default arguments), the intermediate states in the build-up of a code - are remembered and previously visited branches are pruned. The memory - required for this will increase rapidly with the total number of symbols and - the maximum code length in bits. However this is a very small price to pay - for the vast speedup. - - First, all of the possible prefix codes are counted, and reachable - intermediate states are noted by a non-zero count in a saved-results array. - Second, the intermediate states that lead to (root + 1) bit or longer codes - are used to look at all sub-codes from those junctures for their inflate - memory usage. (The amount of memory used is not affected by the number of - codes of root bits or less in length.) Third, the visited states in the - construction of those sub-codes and the associated calculation of the table - size is recalled in order to avoid recalculating from the same juncture. - Beginning the code examination at (root + 1) bit codes, which is enabled by - identifying the reachable nodes, accounts for about six of the orders of - magnitude of improvement for the default arguments. About another four - orders of magnitude come from not revisiting previous states. Out of - approximately 2x10^16 possible prefix codes, only about 2x10^6 sub-codes - need to be examined to cover all of the possible table memory usage cases - for the default arguments of 286 symbols limited to 15-bit codes. - - Note that the uintmax_t type is used for counting. It is quite easy to - exceed the capacity of an eight-byte integer with a large number of symbols - and a large maximum code length, so multiple-precision arithmetic would need - to replace the integer arithmetic in that case. This program will abort if - an overflow occurs. The big_t type identifies where the counting takes - place. - - The uintmax_t type is also used for calculating the number of possible codes - remaining at the maximum length. This limits the maximum code length to the - number of bits in a long long minus the number of bits needed to represent - the symbols in a flat code. The code_t type identifies where the bit-pattern - counting takes place. - */ - -#include -#include -#include -#include -#include -#include - -#define local static - -// Special data types. -typedef uintmax_t big_t; // type for code counting -#define PRIbig "ju" // printf format for big_t -typedef uintmax_t code_t; // type for bit pattern counting -struct tab { // type for been-here check - size_t len; // allocated length of bit vector in octets - char *vec; // allocated bit vector -}; - -/* The array for saving results, num[], is indexed with this triplet: - - syms: number of symbols remaining to code - left: number of available bit patterns at length len - len: number of bits in the codes currently being assigned - - Those indices are constrained thusly when saving results: - - syms: 3..totsym (totsym == total symbols to code) - left: 2..syms - 1, but only the evens (so syms == 8 -> 2, 4, 6) - len: 1..max - 1 (max == maximum code length in bits) - - syms == 2 is not saved since that immediately leads to a single code. left - must be even, since it represents the number of available bit patterns at - the current length, which is double the number at the previous length. left - ends at syms-1 since left == syms immediately results in a single code. - (left > sym is not allowed since that would result in an incomplete code.) - len is less than max, since the code completes immediately when len == max. - - The offset into the array is calculated for the three indices with the first - one (syms) being outermost, and the last one (len) being innermost. We build - the array with length max-1 lists for the len index, with syms-3 of those - for each symbol. There are totsym-2 of those, with each one varying in - length as a function of sym. See the calculation of index in map() for the - index, and the calculation of size in main() for the size of the array. - - For the deflate example of 286 symbols limited to 15-bit codes, the array - has 284,284 entries, taking up 2.17 MB for an 8-byte big_t. More than half - of the space allocated for saved results is actually used -- not all - possible triplets are reached in the generation of valid prefix codes. - */ - -/* The array for tracking visited states, done[], is itself indexed identically - to the num[] array as described above for the (syms, left, len) triplet. - Each element in the array is further indexed by the (mem, rem) doublet, - where mem is the amount of inflate table space used so far, and rem is the - remaining unused entries in the current inflate sub-table. Each indexed - element is simply one bit indicating whether the state has been visited or - not. Since the ranges for mem and rem are not known a priori, each bit - vector is of a variable size, and grows as needed to accommodate the visited - states. mem and rem are used to calculate a single index in a triangular - array. Since the range of mem is expected in the default case to be about - ten times larger than the range of rem, the array is skewed to reduce the - memory usage, with eight times the range for mem than for rem. See the - calculations for offset and bit in been_here() for the details. - - For the deflate example of 286 symbols limited to 15-bit codes, the bit - vectors grow to total 5.5 MB, in addition to the 4.3 MB done array itself. - */ - -// Type for a variable-length, allocated string. -typedef struct { - char *str; // pointer to allocated string - size_t size; // size of allocation - size_t len; // length of string, not including terminating zero -} string_t; - -// Clear a string_t. -local void string_clear(string_t *s) { - s->str[0] = 0; - s->len = 0; -} - -// Initialize a string_t. -local void string_init(string_t *s) { - s->size = 16; - s->str = malloc(s->size); - assert(s->str != NULL && "out of memory"); - string_clear(s); -} - -// Release the allocation of a string_t. -local void string_free(string_t *s) { - free(s->str); - s->str = NULL; - s->size = 0; - s->len = 0; -} - -// Save the results of printf with fmt and the subsequent argument list to s. -// Each call appends to s. The allocated space for s is increased as needed. -local void string_printf(string_t *s, char *fmt, ...) { - va_list ap; - va_start(ap, fmt); - size_t len = s->len; - int ret = vsnprintf(s->str + len, s->size - len, fmt, ap); - assert(ret >= 0 && "out of memory"); - s->len += ret; - if (s->size < s->len + 1) { - do { - s->size <<= 1; - assert(s->size != 0 && "overflow"); - } while (s->size < s->len + 1); - s->str = realloc(s->str, s->size); - assert(s->str != NULL && "out of memory"); - vsnprintf(s->str + len, s->size - len, fmt, ap); - } - va_end(ap); -} - -// Globals to avoid propagating constants or constant pointers recursively. -struct { - int max; // maximum allowed bit length for the codes - int root; // size of base code table in bits - int large; // largest code table so far - size_t size; // number of elements in num and done - big_t tot; // total number of codes with maximum tables size - string_t out; // display of subcodes for maximum tables size - int *code; // number of symbols assigned to each bit length - big_t *num; // saved results array for code counting - struct tab *done; // states already evaluated array -} g; - -// Index function for num[] and done[]. -local inline size_t map(int syms, int left, int len) { - return ((size_t)((syms - 1) >> 1) * ((syms - 2) >> 1) + - (left >> 1) - 1) * (g.max - 1) + - len - 1; -} - -// Free allocated space in globals. -local void cleanup(void) { - if (g.done != NULL) { - for (size_t n = 0; n < g.size; n++) - if (g.done[n].len) - free(g.done[n].vec); - g.size = 0; - free(g.done); g.done = NULL; - } - free(g.num); g.num = NULL; - free(g.code); g.code = NULL; - string_free(&g.out); -} - -// Return the number of possible prefix codes using bit patterns of lengths len -// through max inclusive, coding syms symbols, with left bit patterns of length -// len unused -- return -1 if there is an overflow in the counting. Keep a -// record of previous results in num to prevent repeating the same calculation. -local big_t count(int syms, int left, int len) { - // see if only one possible code - if (syms == left) - return 1; - - // note and verify the expected state - assert(syms > left && left > 0 && len < g.max); - - // see if we've done this one already - size_t index = map(syms, left, len); - big_t got = g.num[index]; - if (got) - return got; // we have -- return the saved result - - // we need to use at least this many bit patterns so that the code won't be - // incomplete at the next length (more bit patterns than symbols) - int least = (left << 1) - syms; - if (least < 0) - least = 0; - - // we can use at most this many bit patterns, lest there not be enough - // available for the remaining symbols at the maximum length (if there were - // no limit to the code length, this would become: most = left - 1) - int most = (((code_t)left << (g.max - len)) - syms) / - (((code_t)1 << (g.max - len)) - 1); - - // count all possible codes from this juncture and add them up - big_t sum = 0; - for (int use = least; use <= most; use++) { - got = count(syms - use, (left - use) << 1, len + 1); - sum += got; - if (got == (big_t)-1 || sum < got) // overflow - return (big_t)-1; - } - - // verify that all recursive calls are productive - assert(sum != 0); - - // save the result and return it - g.num[index] = sum; - return sum; -} - -// Return true if we've been here before, set to true if not. Set a bit in a -// bit vector to indicate visiting this state. Each (syms,len,left) state has a -// variable size bit vector indexed by (mem,rem). The bit vector is lengthened -// as needed to allow setting the (mem,rem) bit. -local int been_here(int syms, int left, int len, int mem, int rem) { - // point to vector for (syms,left,len), bit in vector for (mem,rem) - size_t index = map(syms, left, len); - mem -= 1 << g.root; // mem always includes the root table - mem >>= 1; // mem and rem are always even - rem >>= 1; - size_t offset = (mem >> 3) + rem; - offset = ((offset * (offset + 1)) >> 1) + rem; - int bit = 1 << (mem & 7); - - // see if we've been here - size_t length = g.done[index].len; - if (offset < length && (g.done[index].vec[offset] & bit) != 0) - return 1; // done this! - - // we haven't been here before -- set the bit to show we have now - - // see if we need to lengthen the vector in order to set the bit - if (length <= offset) { - // if we have one already, enlarge it, zero out the appended space - char *vector; - if (length) { - do { - length <<= 1; - } while (length <= offset); - vector = realloc(g.done[index].vec, length); - assert(vector != NULL && "out of memory"); - memset(vector + g.done[index].len, 0, length - g.done[index].len); - } - - // otherwise we need to make a new vector and zero it out - else { - length = 16; - while (length <= offset) - length <<= 1; - vector = calloc(length, 1); - assert(vector != NULL && "out of memory"); - } - - // install the new vector - g.done[index].len = length; - g.done[index].vec = vector; - } - - // set the bit - g.done[index].vec[offset] |= bit; - return 0; -} - -// Examine all possible codes from the given node (syms, len, left). Compute -// the amount of memory required to build inflate's decoding tables, where the -// number of code structures used so far is mem, and the number remaining in -// the current sub-table is rem. -local void examine(int syms, int left, int len, int mem, int rem) { - // see if we have a complete code - if (syms == left) { - // set the last code entry - g.code[len] = left; - - // complete computation of memory used by this code - while (rem < left) { - left -= rem; - rem = 1 << (len - g.root); - mem += rem; - } - assert(rem == left); - - // if this is at the maximum, show the sub-code - if (mem >= g.large) { - // if this is a new maximum, update the maximum and clear out the - // printed sub-codes from the previous maximum - if (mem > g.large) { - g.large = mem; - string_clear(&g.out); - } - - // compute the starting state for this sub-code - syms = 0; - left = 1 << g.max; - for (int bits = g.max; bits > g.root; bits--) { - syms += g.code[bits]; - left -= g.code[bits]; - assert((left & 1) == 0); - left >>= 1; - } - - // print the starting state and the resulting sub-code to g.out - string_printf(&g.out, "<%u, %u, %u>:", - syms, g.root + 1, ((1 << g.root) - left) << 1); - for (int bits = g.root + 1; bits <= g.max; bits++) - if (g.code[bits]) - string_printf(&g.out, " %d[%d]", g.code[bits], bits); - string_printf(&g.out, "\n"); - } - - // remove entries as we drop back down in the recursion - g.code[len] = 0; - return; - } - - // prune the tree if we can - if (been_here(syms, left, len, mem, rem)) - return; - - // we need to use at least this many bit patterns so that the code won't be - // incomplete at the next length (more bit patterns than symbols) - int least = (left << 1) - syms; - if (least < 0) - least = 0; - - // we can use at most this many bit patterns, lest there not be enough - // available for the remaining symbols at the maximum length (if there were - // no limit to the code length, this would become: most = left - 1) - int most = (((code_t)left << (g.max - len)) - syms) / - (((code_t)1 << (g.max - len)) - 1); - - // occupy least table spaces, creating new sub-tables as needed - int use = least; - while (rem < use) { - use -= rem; - rem = 1 << (len - g.root); - mem += rem; - } - rem -= use; - - // examine codes from here, updating table space as we go - for (use = least; use <= most; use++) { - g.code[len] = use; - examine(syms - use, (left - use) << 1, len + 1, - mem + (rem ? 1 << (len - g.root) : 0), rem << 1); - if (rem == 0) { - rem = 1 << (len - g.root); - mem += rem; - } - rem--; - } - - // remove entries as we drop back down in the recursion - g.code[len] = 0; -} - -// Look at all sub-codes starting with root + 1 bits. Look at only the valid -// intermediate code states (syms, left, len). For each completed code, -// calculate the amount of memory required by inflate to build the decoding -// tables. Find the maximum amount of memory required and show the codes that -// require that maximum. -local void enough(int syms) { - // clear code - for (int n = 0; n <= g.max; n++) - g.code[n] = 0; - - // look at all (root + 1) bit and longer codes - string_clear(&g.out); // empty saved results - g.large = 1 << g.root; // base table - if (g.root < g.max) // otherwise, there's only a base table - for (int n = 3; n <= syms; n++) - for (int left = 2; left < n; left += 2) { - // look at all reachable (root + 1) bit nodes, and the - // resulting codes (complete at root + 2 or more) - size_t index = map(n, left, g.root + 1); - if (g.root + 1 < g.max && g.num[index]) // reachable node - examine(n, left, g.root + 1, 1 << g.root, 0); - - // also look at root bit codes with completions at root + 1 - // bits (not saved in num, since complete), just in case - if (g.num[index - 1] && n <= left << 1) - examine((n - left) << 1, (n - left) << 1, g.root + 1, - 1 << g.root, 0); - } - - // done - printf("maximum of %d table entries for root = %d\n", g.large, g.root); - fputs(g.out.str, stdout); -} - -// Examine and show the total number of possible prefix codes for a given -// maximum number of symbols, initial root table size, and maximum code length -// in bits -- those are the command arguments in that order. The default values -// are 286, 9, and 15 respectively, for the deflate literal/length code. The -// possible codes are counted for each number of coded symbols from two to the -// maximum. The counts for each of those and the total number of codes are -// shown. The maximum number of inflate table entires is then calculated across -// all possible codes. Each new maximum number of table entries and the -// associated sub-code (starting at root + 1 == 10 bits) is shown. -// -// To count and examine prefix codes that are not length-limited, provide a -// maximum length equal to the number of symbols minus one. -// -// For the deflate literal/length code, use "enough". For the deflate distance -// code, use "enough 30 6". -int main(int argc, char **argv) { - // set up globals for cleanup() - g.code = NULL; - g.num = NULL; - g.done = NULL; - string_init(&g.out); - - // get arguments -- default to the deflate literal/length code - int syms = 286; - g.root = 9; - g.max = 15; - if (argc > 1) { - syms = atoi(argv[1]); - if (argc > 2) { - g.root = atoi(argv[2]); - if (argc > 3) - g.max = atoi(argv[3]); - } - } - if (argc > 4 || syms < 2 || g.root < 1 || g.max < 1) { - fputs("invalid arguments, need: [sym >= 2 [root >= 1 [max >= 1]]]\n", - stderr); - return 1; - } - - // if not restricting the code length, the longest is syms - 1 - if (g.max > syms - 1) - g.max = syms - 1; - - // determine the number of bits in a code_t - int bits = 0; - for (code_t word = 1; word; word <<= 1) - bits++; - - // make sure that the calculation of most will not overflow - if (g.max > bits || (code_t)(syms - 2) >= ((code_t)-1 >> (g.max - 1))) { - fputs("abort: code length too long for internal types\n", stderr); - return 1; - } - - // reject impossible code requests - if ((code_t)(syms - 1) > ((code_t)1 << g.max) - 1) { - fprintf(stderr, "%d symbols cannot be coded in %d bits\n", - syms, g.max); - return 1; - } - - // allocate code vector - g.code = calloc(g.max + 1, sizeof(int)); - assert(g.code != NULL && "out of memory"); - - // determine size of saved results array, checking for overflows, - // allocate and clear the array (set all to zero with calloc()) - if (syms == 2) // iff max == 1 - g.num = NULL; // won't be saving any results - else { - g.size = syms >> 1; - int n = (syms - 1) >> 1; - assert(g.size <= (size_t)-1 / n && "overflow"); - g.size *= n; - n = g.max - 1; - assert(g.size <= (size_t)-1 / n && "overflow"); - g.size *= n; - g.num = calloc(g.size, sizeof(big_t)); - assert(g.num != NULL && "out of memory"); - } - - // count possible codes for all numbers of symbols, add up counts - big_t sum = 0; - for (int n = 2; n <= syms; n++) { - big_t got = count(n, 2, 1); - sum += got; - assert(got != (big_t)-1 && sum >= got && "overflow"); - } - printf("%"PRIbig" total codes for 2 to %d symbols", sum, syms); - if (g.max < syms - 1) - printf(" (%d-bit length limit)\n", g.max); - else - puts(" (no length limit)"); - - // allocate and clear done array for been_here() - if (syms == 2) - g.done = NULL; - else { - g.done = calloc(g.size, sizeof(struct tab)); - assert(g.done != NULL && "out of memory"); - } - - // find and show maximum inflate table usage - if (g.root > g.max) // reduce root to max length - g.root = g.max; - if ((code_t)syms < ((code_t)1 << (g.root + 1))) - enough(syms); - else - fputs("cannot handle minimum code lengths > root", stderr); - - // done - cleanup(); - return 0; -} diff --git a/thirdparty/zlib-1.2.12/examples/fitblk.c b/thirdparty/zlib-1.2.12/examples/fitblk.c deleted file mode 100644 index c61de5c..0000000 --- a/thirdparty/zlib-1.2.12/examples/fitblk.c +++ /dev/null @@ -1,233 +0,0 @@ -/* fitblk.c: example of fitting compressed output to a specified size - Not copyrighted -- provided to the public domain - Version 1.1 25 November 2004 Mark Adler */ - -/* Version history: - 1.0 24 Nov 2004 First version - 1.1 25 Nov 2004 Change deflateInit2() to deflateInit() - Use fixed-size, stack-allocated raw buffers - Simplify code moving compression to subroutines - Use assert() for internal errors - Add detailed description of approach - */ - -/* Approach to just fitting a requested compressed size: - - fitblk performs three compression passes on a portion of the input - data in order to determine how much of that input will compress to - nearly the requested output block size. The first pass generates - enough deflate blocks to produce output to fill the requested - output size plus a specfied excess amount (see the EXCESS define - below). The last deflate block may go quite a bit past that, but - is discarded. The second pass decompresses and recompresses just - the compressed data that fit in the requested plus excess sized - buffer. The deflate process is terminated after that amount of - input, which is less than the amount consumed on the first pass. - The last deflate block of the result will be of a comparable size - to the final product, so that the header for that deflate block and - the compression ratio for that block will be about the same as in - the final product. The third compression pass decompresses the - result of the second step, but only the compressed data up to the - requested size minus an amount to allow the compressed stream to - complete (see the MARGIN define below). That will result in a - final compressed stream whose length is less than or equal to the - requested size. Assuming sufficient input and a requested size - greater than a few hundred bytes, the shortfall will typically be - less than ten bytes. - - If the input is short enough that the first compression completes - before filling the requested output size, then that compressed - stream is return with no recompression. - - EXCESS is chosen to be just greater than the shortfall seen in a - two pass approach similar to the above. That shortfall is due to - the last deflate block compressing more efficiently with a smaller - header on the second pass. EXCESS is set to be large enough so - that there is enough uncompressed data for the second pass to fill - out the requested size, and small enough so that the final deflate - block of the second pass will be close in size to the final deflate - block of the third and final pass. MARGIN is chosen to be just - large enough to assure that the final compression has enough room - to complete in all cases. - */ - -#include -#include -#include -#include "zlib.h" - -#define local static - -/* print nastygram and leave */ -local void quit(char *why) -{ - fprintf(stderr, "fitblk abort: %s\n", why); - exit(1); -} - -#define RAWLEN 4096 /* intermediate uncompressed buffer size */ - -/* compress from file to def until provided buffer is full or end of - input reached; return last deflate() return value, or Z_ERRNO if - there was read error on the file */ -local int partcompress(FILE *in, z_streamp def) -{ - int ret, flush; - unsigned char raw[RAWLEN]; - - flush = Z_NO_FLUSH; - do { - def->avail_in = fread(raw, 1, RAWLEN, in); - if (ferror(in)) - return Z_ERRNO; - def->next_in = raw; - if (feof(in)) - flush = Z_FINISH; - ret = deflate(def, flush); - assert(ret != Z_STREAM_ERROR); - } while (def->avail_out != 0 && flush == Z_NO_FLUSH); - return ret; -} - -/* recompress from inf's input to def's output; the input for inf and - the output for def are set in those structures before calling; - return last deflate() return value, or Z_MEM_ERROR if inflate() - was not able to allocate enough memory when it needed to */ -local int recompress(z_streamp inf, z_streamp def) -{ - int ret, flush; - unsigned char raw[RAWLEN]; - - flush = Z_NO_FLUSH; - do { - /* decompress */ - inf->avail_out = RAWLEN; - inf->next_out = raw; - ret = inflate(inf, Z_NO_FLUSH); - assert(ret != Z_STREAM_ERROR && ret != Z_DATA_ERROR && - ret != Z_NEED_DICT); - if (ret == Z_MEM_ERROR) - return ret; - - /* compress what was decompresed until done or no room */ - def->avail_in = RAWLEN - inf->avail_out; - def->next_in = raw; - if (inf->avail_out != 0) - flush = Z_FINISH; - ret = deflate(def, flush); - assert(ret != Z_STREAM_ERROR); - } while (ret != Z_STREAM_END && def->avail_out != 0); - return ret; -} - -#define EXCESS 256 /* empirically determined stream overage */ -#define MARGIN 8 /* amount to back off for completion */ - -/* compress from stdin to fixed-size block on stdout */ -int main(int argc, char **argv) -{ - int ret; /* return code */ - unsigned size; /* requested fixed output block size */ - unsigned have; /* bytes written by deflate() call */ - unsigned char *blk; /* intermediate and final stream */ - unsigned char *tmp; /* close to desired size stream */ - z_stream def, inf; /* zlib deflate and inflate states */ - - /* get requested output size */ - if (argc != 2) - quit("need one argument: size of output block"); - ret = strtol(argv[1], argv + 1, 10); - if (argv[1][0] != 0) - quit("argument must be a number"); - if (ret < 8) /* 8 is minimum zlib stream size */ - quit("need positive size of 8 or greater"); - size = (unsigned)ret; - - /* allocate memory for buffers and compression engine */ - blk = malloc(size + EXCESS); - def.zalloc = Z_NULL; - def.zfree = Z_NULL; - def.opaque = Z_NULL; - ret = deflateInit(&def, Z_DEFAULT_COMPRESSION); - if (ret != Z_OK || blk == NULL) - quit("out of memory"); - - /* compress from stdin until output full, or no more input */ - def.avail_out = size + EXCESS; - def.next_out = blk; - ret = partcompress(stdin, &def); - if (ret == Z_ERRNO) - quit("error reading input"); - - /* if it all fit, then size was undersubscribed -- done! */ - if (ret == Z_STREAM_END && def.avail_out >= EXCESS) { - /* write block to stdout */ - have = size + EXCESS - def.avail_out; - if (fwrite(blk, 1, have, stdout) != have || ferror(stdout)) - quit("error writing output"); - - /* clean up and print results to stderr */ - ret = deflateEnd(&def); - assert(ret != Z_STREAM_ERROR); - free(blk); - fprintf(stderr, - "%u bytes unused out of %u requested (all input)\n", - size - have, size); - return 0; - } - - /* it didn't all fit -- set up for recompression */ - inf.zalloc = Z_NULL; - inf.zfree = Z_NULL; - inf.opaque = Z_NULL; - inf.avail_in = 0; - inf.next_in = Z_NULL; - ret = inflateInit(&inf); - tmp = malloc(size + EXCESS); - if (ret != Z_OK || tmp == NULL) - quit("out of memory"); - ret = deflateReset(&def); - assert(ret != Z_STREAM_ERROR); - - /* do first recompression close to the right amount */ - inf.avail_in = size + EXCESS; - inf.next_in = blk; - def.avail_out = size + EXCESS; - def.next_out = tmp; - ret = recompress(&inf, &def); - if (ret == Z_MEM_ERROR) - quit("out of memory"); - - /* set up for next reocmpression */ - ret = inflateReset(&inf); - assert(ret != Z_STREAM_ERROR); - ret = deflateReset(&def); - assert(ret != Z_STREAM_ERROR); - - /* do second and final recompression (third compression) */ - inf.avail_in = size - MARGIN; /* assure stream will complete */ - inf.next_in = tmp; - def.avail_out = size; - def.next_out = blk; - ret = recompress(&inf, &def); - if (ret == Z_MEM_ERROR) - quit("out of memory"); - assert(ret == Z_STREAM_END); /* otherwise MARGIN too small */ - - /* done -- write block to stdout */ - have = size - def.avail_out; - if (fwrite(blk, 1, have, stdout) != have || ferror(stdout)) - quit("error writing output"); - - /* clean up and print results to stderr */ - free(tmp); - ret = inflateEnd(&inf); - assert(ret != Z_STREAM_ERROR); - ret = deflateEnd(&def); - assert(ret != Z_STREAM_ERROR); - free(blk); - fprintf(stderr, - "%u bytes unused out of %u requested (%lu input)\n", - size - have, size, def.total_in); - return 0; -} diff --git a/thirdparty/zlib-1.2.12/examples/gun.c b/thirdparty/zlib-1.2.12/examples/gun.c deleted file mode 100644 index be44fa5..0000000 --- a/thirdparty/zlib-1.2.12/examples/gun.c +++ /dev/null @@ -1,702 +0,0 @@ -/* gun.c -- simple gunzip to give an example of the use of inflateBack() - * Copyright (C) 2003, 2005, 2008, 2010, 2012 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - Version 1.7 12 August 2012 Mark Adler */ - -/* Version history: - 1.0 16 Feb 2003 First version for testing of inflateBack() - 1.1 21 Feb 2005 Decompress concatenated gzip streams - Remove use of "this" variable (C++ keyword) - Fix return value for in() - Improve allocation failure checking - Add typecasting for void * structures - Add -h option for command version and usage - Add a bunch of comments - 1.2 20 Mar 2005 Add Unix compress (LZW) decompression - Copy file attributes from input file to output file - 1.3 12 Jun 2005 Add casts for error messages [Oberhumer] - 1.4 8 Dec 2006 LZW decompression speed improvements - 1.5 9 Feb 2008 Avoid warning in latest version of gcc - 1.6 17 Jan 2010 Avoid signed/unsigned comparison warnings - 1.7 12 Aug 2012 Update for z_const usage in zlib 1.2.8 - */ - -/* - gun [ -t ] [ name ... ] - - decompresses the data in the named gzip files. If no arguments are given, - gun will decompress from stdin to stdout. The names must end in .gz, -gz, - .z, -z, _z, or .Z. The uncompressed data will be written to a file name - with the suffix stripped. On success, the original file is deleted. On - failure, the output file is deleted. For most failures, the command will - continue to process the remaining names on the command line. A memory - allocation failure will abort the command. If -t is specified, then the - listed files or stdin will be tested as gzip files for integrity (without - checking for a proper suffix), no output will be written, and no files - will be deleted. - - Like gzip, gun allows concatenated gzip streams and will decompress them, - writing all of the uncompressed data to the output. Unlike gzip, gun allows - an empty file on input, and will produce no error writing an empty output - file. - - gun will also decompress files made by Unix compress, which uses LZW - compression. These files are automatically detected by virtue of their - magic header bytes. Since the end of Unix compress stream is marked by the - end-of-file, they cannot be concantenated. If a Unix compress stream is - encountered in an input file, it is the last stream in that file. - - Like gunzip and uncompress, the file attributes of the original compressed - file are maintained in the final uncompressed file, to the extent that the - user permissions allow it. - - On my Mac OS X PowerPC G4, gun is almost twice as fast as gunzip (version - 1.2.4) is on the same file, when gun is linked with zlib 1.2.2. Also the - LZW decompression provided by gun is about twice as fast as the standard - Unix uncompress command. - */ - -/* external functions and related types and constants */ -#include /* fprintf() */ -#include /* malloc(), free() */ -#include /* strerror(), strcmp(), strlen(), memcpy() */ -#include /* errno */ -#include /* open() */ -#include /* read(), write(), close(), chown(), unlink() */ -#include -#include /* stat(), chmod() */ -#include /* utime() */ -#include "zlib.h" /* inflateBackInit(), inflateBack(), */ - /* inflateBackEnd(), crc32() */ - -/* function declaration */ -#define local static - -/* buffer constants */ -#define SIZE 32768U /* input and output buffer sizes */ -#define PIECE 16384 /* limits i/o chunks for 16-bit int case */ - -/* structure for infback() to pass to input function in() -- it maintains the - input file and a buffer of size SIZE */ -struct ind { - int infile; - unsigned char *inbuf; -}; - -/* Load input buffer, assumed to be empty, and return bytes loaded and a - pointer to them. read() is called until the buffer is full, or until it - returns end-of-file or error. Return 0 on error. */ -local unsigned in(void *in_desc, z_const unsigned char **buf) -{ - int ret; - unsigned len; - unsigned char *next; - struct ind *me = (struct ind *)in_desc; - - next = me->inbuf; - *buf = next; - len = 0; - do { - ret = PIECE; - if ((unsigned)ret > SIZE - len) - ret = (int)(SIZE - len); - ret = (int)read(me->infile, next, ret); - if (ret == -1) { - len = 0; - break; - } - next += ret; - len += ret; - } while (ret != 0 && len < SIZE); - return len; -} - -/* structure for infback() to pass to output function out() -- it maintains the - output file, a running CRC-32 check on the output and the total number of - bytes output, both for checking against the gzip trailer. (The length in - the gzip trailer is stored modulo 2^32, so it's ok if a long is 32 bits and - the output is greater than 4 GB.) */ -struct outd { - int outfile; - int check; /* true if checking crc and total */ - unsigned long crc; - unsigned long total; -}; - -/* Write output buffer and update the CRC-32 and total bytes written. write() - is called until all of the output is written or an error is encountered. - On success out() returns 0. For a write failure, out() returns 1. If the - output file descriptor is -1, then nothing is written. - */ -local int out(void *out_desc, unsigned char *buf, unsigned len) -{ - int ret; - struct outd *me = (struct outd *)out_desc; - - if (me->check) { - me->crc = crc32(me->crc, buf, len); - me->total += len; - } - if (me->outfile != -1) - do { - ret = PIECE; - if ((unsigned)ret > len) - ret = (int)len; - ret = (int)write(me->outfile, buf, ret); - if (ret == -1) - return 1; - buf += ret; - len -= ret; - } while (len != 0); - return 0; -} - -/* next input byte macro for use inside lunpipe() and gunpipe() */ -#define NEXT() (have ? 0 : (have = in(indp, &next)), \ - last = have ? (have--, (int)(*next++)) : -1) - -/* memory for gunpipe() and lunpipe() -- - the first 256 entries of prefix[] and suffix[] are never used, could - have offset the index, but it's faster to waste the memory */ -unsigned char inbuf[SIZE]; /* input buffer */ -unsigned char outbuf[SIZE]; /* output buffer */ -unsigned short prefix[65536]; /* index to LZW prefix string */ -unsigned char suffix[65536]; /* one-character LZW suffix */ -unsigned char match[65280 + 2]; /* buffer for reversed match or gzip - 32K sliding window */ - -/* throw out what's left in the current bits byte buffer (this is a vestigial - aspect of the compressed data format derived from an implementation that - made use of a special VAX machine instruction!) */ -#define FLUSHCODE() \ - do { \ - left = 0; \ - rem = 0; \ - if (chunk > have) { \ - chunk -= have; \ - have = 0; \ - if (NEXT() == -1) \ - break; \ - chunk--; \ - if (chunk > have) { \ - chunk = have = 0; \ - break; \ - } \ - } \ - have -= chunk; \ - next += chunk; \ - chunk = 0; \ - } while (0) - -/* Decompress a compress (LZW) file from indp to outfile. The compress magic - header (two bytes) has already been read and verified. There are have bytes - of buffered input at next. strm is used for passing error information back - to gunpipe(). - - lunpipe() will return Z_OK on success, Z_BUF_ERROR for an unexpected end of - file, read error, or write error (a write error indicated by strm->next_in - not equal to Z_NULL), or Z_DATA_ERROR for invalid input. - */ -local int lunpipe(unsigned have, z_const unsigned char *next, struct ind *indp, - int outfile, z_stream *strm) -{ - int last; /* last byte read by NEXT(), or -1 if EOF */ - unsigned chunk; /* bytes left in current chunk */ - int left; /* bits left in rem */ - unsigned rem; /* unused bits from input */ - int bits; /* current bits per code */ - unsigned code; /* code, table traversal index */ - unsigned mask; /* mask for current bits codes */ - int max; /* maximum bits per code for this stream */ - unsigned flags; /* compress flags, then block compress flag */ - unsigned end; /* last valid entry in prefix/suffix tables */ - unsigned temp; /* current code */ - unsigned prev; /* previous code */ - unsigned final; /* last character written for previous code */ - unsigned stack; /* next position for reversed string */ - unsigned outcnt; /* bytes in output buffer */ - struct outd outd; /* output structure */ - unsigned char *p; - - /* set up output */ - outd.outfile = outfile; - outd.check = 0; - - /* process remainder of compress header -- a flags byte */ - flags = NEXT(); - if (last == -1) - return Z_BUF_ERROR; - if (flags & 0x60) { - strm->msg = (char *)"unknown lzw flags set"; - return Z_DATA_ERROR; - } - max = flags & 0x1f; - if (max < 9 || max > 16) { - strm->msg = (char *)"lzw bits out of range"; - return Z_DATA_ERROR; - } - if (max == 9) /* 9 doesn't really mean 9 */ - max = 10; - flags &= 0x80; /* true if block compress */ - - /* clear table */ - bits = 9; - mask = 0x1ff; - end = flags ? 256 : 255; - - /* set up: get first 9-bit code, which is the first decompressed byte, but - don't create a table entry until the next code */ - if (NEXT() == -1) /* no compressed data is ok */ - return Z_OK; - final = prev = (unsigned)last; /* low 8 bits of code */ - if (NEXT() == -1) /* missing a bit */ - return Z_BUF_ERROR; - if (last & 1) { /* code must be < 256 */ - strm->msg = (char *)"invalid lzw code"; - return Z_DATA_ERROR; - } - rem = (unsigned)last >> 1; /* remaining 7 bits */ - left = 7; - chunk = bits - 2; /* 7 bytes left in this chunk */ - outbuf[0] = (unsigned char)final; /* write first decompressed byte */ - outcnt = 1; - - /* decode codes */ - stack = 0; - for (;;) { - /* if the table will be full after this, increment the code size */ - if (end >= mask && bits < max) { - FLUSHCODE(); - bits++; - mask <<= 1; - mask++; - } - - /* get a code of length bits */ - if (chunk == 0) /* decrement chunk modulo bits */ - chunk = bits; - code = rem; /* low bits of code */ - if (NEXT() == -1) { /* EOF is end of compressed data */ - /* write remaining buffered output */ - if (outcnt && out(&outd, outbuf, outcnt)) { - strm->next_in = outbuf; /* signal write error */ - return Z_BUF_ERROR; - } - return Z_OK; - } - code += (unsigned)last << left; /* middle (or high) bits of code */ - left += 8; - chunk--; - if (bits > left) { /* need more bits */ - if (NEXT() == -1) /* can't end in middle of code */ - return Z_BUF_ERROR; - code += (unsigned)last << left; /* high bits of code */ - left += 8; - chunk--; - } - code &= mask; /* mask to current code length */ - left -= bits; /* number of unused bits */ - rem = (unsigned)last >> (8 - left); /* unused bits from last byte */ - - /* process clear code (256) */ - if (code == 256 && flags) { - FLUSHCODE(); - bits = 9; /* initialize bits and mask */ - mask = 0x1ff; - end = 255; /* empty table */ - continue; /* get next code */ - } - - /* special code to reuse last match */ - temp = code; /* save the current code */ - if (code > end) { - /* Be picky on the allowed code here, and make sure that the code - we drop through (prev) will be a valid index so that random - input does not cause an exception. The code != end + 1 check is - empirically derived, and not checked in the original uncompress - code. If this ever causes a problem, that check could be safely - removed. Leaving this check in greatly improves gun's ability - to detect random or corrupted input after a compress header. - In any case, the prev > end check must be retained. */ - if (code != end + 1 || prev > end) { - strm->msg = (char *)"invalid lzw code"; - return Z_DATA_ERROR; - } - match[stack++] = (unsigned char)final; - code = prev; - } - - /* walk through linked list to generate output in reverse order */ - p = match + stack; - while (code >= 256) { - *p++ = suffix[code]; - code = prefix[code]; - } - stack = p - match; - match[stack++] = (unsigned char)code; - final = code; - - /* link new table entry */ - if (end < mask) { - end++; - prefix[end] = (unsigned short)prev; - suffix[end] = (unsigned char)final; - } - - /* set previous code for next iteration */ - prev = temp; - - /* write output in forward order */ - while (stack > SIZE - outcnt) { - while (outcnt < SIZE) - outbuf[outcnt++] = match[--stack]; - if (out(&outd, outbuf, outcnt)) { - strm->next_in = outbuf; /* signal write error */ - return Z_BUF_ERROR; - } - outcnt = 0; - } - p = match + stack; - do { - outbuf[outcnt++] = *--p; - } while (p > match); - stack = 0; - - /* loop for next code with final and prev as the last match, rem and - left provide the first 0..7 bits of the next code, end is the last - valid table entry */ - } -} - -/* Decompress a gzip file from infile to outfile. strm is assumed to have been - successfully initialized with inflateBackInit(). The input file may consist - of a series of gzip streams, in which case all of them will be decompressed - to the output file. If outfile is -1, then the gzip stream(s) integrity is - checked and nothing is written. - - The return value is a zlib error code: Z_MEM_ERROR if out of memory, - Z_DATA_ERROR if the header or the compressed data is invalid, or if the - trailer CRC-32 check or length doesn't match, Z_BUF_ERROR if the input ends - prematurely or a write error occurs, or Z_ERRNO if junk (not a another gzip - stream) follows a valid gzip stream. - */ -local int gunpipe(z_stream *strm, int infile, int outfile) -{ - int ret, first, last; - unsigned have, flags, len; - z_const unsigned char *next = NULL; - struct ind ind, *indp; - struct outd outd; - - /* setup input buffer */ - ind.infile = infile; - ind.inbuf = inbuf; - indp = &ind; - - /* decompress concatenated gzip streams */ - have = 0; /* no input data read in yet */ - first = 1; /* looking for first gzip header */ - strm->next_in = Z_NULL; /* so Z_BUF_ERROR means EOF */ - for (;;) { - /* look for the two magic header bytes for a gzip stream */ - if (NEXT() == -1) { - ret = Z_OK; - break; /* empty gzip stream is ok */ - } - if (last != 31 || (NEXT() != 139 && last != 157)) { - strm->msg = (char *)"incorrect header check"; - ret = first ? Z_DATA_ERROR : Z_ERRNO; - break; /* not a gzip or compress header */ - } - first = 0; /* next non-header is junk */ - - /* process a compress (LZW) file -- can't be concatenated after this */ - if (last == 157) { - ret = lunpipe(have, next, indp, outfile, strm); - break; - } - - /* process remainder of gzip header */ - ret = Z_BUF_ERROR; - if (NEXT() != 8) { /* only deflate method allowed */ - if (last == -1) break; - strm->msg = (char *)"unknown compression method"; - ret = Z_DATA_ERROR; - break; - } - flags = NEXT(); /* header flags */ - NEXT(); /* discard mod time, xflgs, os */ - NEXT(); - NEXT(); - NEXT(); - NEXT(); - NEXT(); - if (last == -1) break; - if (flags & 0xe0) { - strm->msg = (char *)"unknown header flags set"; - ret = Z_DATA_ERROR; - break; - } - if (flags & 4) { /* extra field */ - len = NEXT(); - len += (unsigned)(NEXT()) << 8; - if (last == -1) break; - while (len > have) { - len -= have; - have = 0; - if (NEXT() == -1) break; - len--; - } - if (last == -1) break; - have -= len; - next += len; - } - if (flags & 8) /* file name */ - while (NEXT() != 0 && last != -1) - ; - if (flags & 16) /* comment */ - while (NEXT() != 0 && last != -1) - ; - if (flags & 2) { /* header crc */ - NEXT(); - NEXT(); - } - if (last == -1) break; - - /* set up output */ - outd.outfile = outfile; - outd.check = 1; - outd.crc = crc32(0L, Z_NULL, 0); - outd.total = 0; - - /* decompress data to output */ - strm->next_in = next; - strm->avail_in = have; - ret = inflateBack(strm, in, indp, out, &outd); - if (ret != Z_STREAM_END) break; - next = strm->next_in; - have = strm->avail_in; - strm->next_in = Z_NULL; /* so Z_BUF_ERROR means EOF */ - - /* check trailer */ - ret = Z_BUF_ERROR; - if (NEXT() != (int)(outd.crc & 0xff) || - NEXT() != (int)((outd.crc >> 8) & 0xff) || - NEXT() != (int)((outd.crc >> 16) & 0xff) || - NEXT() != (int)((outd.crc >> 24) & 0xff)) { - /* crc error */ - if (last != -1) { - strm->msg = (char *)"incorrect data check"; - ret = Z_DATA_ERROR; - } - break; - } - if (NEXT() != (int)(outd.total & 0xff) || - NEXT() != (int)((outd.total >> 8) & 0xff) || - NEXT() != (int)((outd.total >> 16) & 0xff) || - NEXT() != (int)((outd.total >> 24) & 0xff)) { - /* length error */ - if (last != -1) { - strm->msg = (char *)"incorrect length check"; - ret = Z_DATA_ERROR; - } - break; - } - - /* go back and look for another gzip stream */ - } - - /* clean up and return */ - return ret; -} - -/* Copy file attributes, from -> to, as best we can. This is best effort, so - no errors are reported. The mode bits, including suid, sgid, and the sticky - bit are copied (if allowed), the owner's user id and group id are copied - (again if allowed), and the access and modify times are copied. */ -local void copymeta(char *from, char *to) -{ - struct stat was; - struct utimbuf when; - - /* get all of from's Unix meta data, return if not a regular file */ - if (stat(from, &was) != 0 || (was.st_mode & S_IFMT) != S_IFREG) - return; - - /* set to's mode bits, ignore errors */ - (void)chmod(to, was.st_mode & 07777); - - /* copy owner's user and group, ignore errors */ - (void)chown(to, was.st_uid, was.st_gid); - - /* copy access and modify times, ignore errors */ - when.actime = was.st_atime; - when.modtime = was.st_mtime; - (void)utime(to, &when); -} - -/* Decompress the file inname to the file outnname, of if test is true, just - decompress without writing and check the gzip trailer for integrity. If - inname is NULL or an empty string, read from stdin. If outname is NULL or - an empty string, write to stdout. strm is a pre-initialized inflateBack - structure. When appropriate, copy the file attributes from inname to - outname. - - gunzip() returns 1 if there is an out-of-memory error or an unexpected - return code from gunpipe(). Otherwise it returns 0. - */ -local int gunzip(z_stream *strm, char *inname, char *outname, int test) -{ - int ret; - int infile, outfile; - - /* open files */ - if (inname == NULL || *inname == 0) { - inname = "-"; - infile = 0; /* stdin */ - } - else { - infile = open(inname, O_RDONLY, 0); - if (infile == -1) { - fprintf(stderr, "gun cannot open %s\n", inname); - return 0; - } - } - if (test) - outfile = -1; - else if (outname == NULL || *outname == 0) { - outname = "-"; - outfile = 1; /* stdout */ - } - else { - outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666); - if (outfile == -1) { - close(infile); - fprintf(stderr, "gun cannot create %s\n", outname); - return 0; - } - } - errno = 0; - - /* decompress */ - ret = gunpipe(strm, infile, outfile); - if (outfile > 2) close(outfile); - if (infile > 2) close(infile); - - /* interpret result */ - switch (ret) { - case Z_OK: - case Z_ERRNO: - if (infile > 2 && outfile > 2) { - copymeta(inname, outname); /* copy attributes */ - unlink(inname); - } - if (ret == Z_ERRNO) - fprintf(stderr, "gun warning: trailing garbage ignored in %s\n", - inname); - break; - case Z_DATA_ERROR: - if (outfile > 2) unlink(outname); - fprintf(stderr, "gun data error on %s: %s\n", inname, strm->msg); - break; - case Z_MEM_ERROR: - if (outfile > 2) unlink(outname); - fprintf(stderr, "gun out of memory error--aborting\n"); - return 1; - case Z_BUF_ERROR: - if (outfile > 2) unlink(outname); - if (strm->next_in != Z_NULL) { - fprintf(stderr, "gun write error on %s: %s\n", - outname, strerror(errno)); - } - else if (errno) { - fprintf(stderr, "gun read error on %s: %s\n", - inname, strerror(errno)); - } - else { - fprintf(stderr, "gun unexpected end of file on %s\n", - inname); - } - break; - default: - if (outfile > 2) unlink(outname); - fprintf(stderr, "gun internal error--aborting\n"); - return 1; - } - return 0; -} - -/* Process the gun command line arguments. See the command syntax near the - beginning of this source file. */ -int main(int argc, char **argv) -{ - int ret, len, test; - char *outname; - unsigned char *window; - z_stream strm; - - /* initialize inflateBack state for repeated use */ - window = match; /* reuse LZW match buffer */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - ret = inflateBackInit(&strm, 15, window); - if (ret != Z_OK) { - fprintf(stderr, "gun out of memory error--aborting\n"); - return 1; - } - - /* decompress each file to the same name with the suffix removed */ - argc--; - argv++; - test = 0; - if (argc && strcmp(*argv, "-h") == 0) { - fprintf(stderr, "gun 1.6 (17 Jan 2010)\n"); - fprintf(stderr, "Copyright (C) 2003-2010 Mark Adler\n"); - fprintf(stderr, "usage: gun [-t] [file1.gz [file2.Z ...]]\n"); - return 0; - } - if (argc && strcmp(*argv, "-t") == 0) { - test = 1; - argc--; - argv++; - } - if (argc) - do { - if (test) - outname = NULL; - else { - len = (int)strlen(*argv); - if (strcmp(*argv + len - 3, ".gz") == 0 || - strcmp(*argv + len - 3, "-gz") == 0) - len -= 3; - else if (strcmp(*argv + len - 2, ".z") == 0 || - strcmp(*argv + len - 2, "-z") == 0 || - strcmp(*argv + len - 2, "_z") == 0 || - strcmp(*argv + len - 2, ".Z") == 0) - len -= 2; - else { - fprintf(stderr, "gun error: no gz type on %s--skipping\n", - *argv); - continue; - } - outname = malloc(len + 1); - if (outname == NULL) { - fprintf(stderr, "gun out of memory error--aborting\n"); - ret = 1; - break; - } - memcpy(outname, *argv, len); - outname[len] = 0; - } - ret = gunzip(&strm, *argv, outname, test); - if (outname != NULL) free(outname); - if (ret) break; - } while (argv++, --argc); - else - ret = gunzip(&strm, NULL, NULL, test); - - /* clean up */ - inflateBackEnd(&strm); - return ret; -} diff --git a/thirdparty/zlib-1.2.12/examples/gzappend.c b/thirdparty/zlib-1.2.12/examples/gzappend.c deleted file mode 100644 index d7eea3e..0000000 --- a/thirdparty/zlib-1.2.12/examples/gzappend.c +++ /dev/null @@ -1,504 +0,0 @@ -/* gzappend -- command to append to a gzip file - - Copyright (C) 2003, 2012 Mark Adler, all rights reserved - version 1.2, 11 Oct 2012 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Mark Adler madler@alumni.caltech.edu - */ - -/* - * Change history: - * - * 1.0 19 Oct 2003 - First version - * 1.1 4 Nov 2003 - Expand and clarify some comments and notes - * - Add version and copyright to help - * - Send help to stdout instead of stderr - * - Add some preemptive typecasts - * - Add L to constants in lseek() calls - * - Remove some debugging information in error messages - * - Use new data_type definition for zlib 1.2.1 - * - Simplfy and unify file operations - * - Finish off gzip file in gztack() - * - Use deflatePrime() instead of adding empty blocks - * - Keep gzip file clean on appended file read errors - * - Use in-place rotate instead of auxiliary buffer - * (Why you ask? Because it was fun to write!) - * 1.2 11 Oct 2012 - Fix for proper z_const usage - * - Check for input buffer malloc failure - */ - -/* - gzappend takes a gzip file and appends to it, compressing files from the - command line or data from stdin. The gzip file is written to directly, to - avoid copying that file, in case it's large. Note that this results in the - unfriendly behavior that if gzappend fails, the gzip file is corrupted. - - This program was written to illustrate the use of the new Z_BLOCK option of - zlib 1.2.x's inflate() function. This option returns from inflate() at each - block boundary to facilitate locating and modifying the last block bit at - the start of the final deflate block. Also whether using Z_BLOCK or not, - another required feature of zlib 1.2.x is that inflate() now provides the - number of unusued bits in the last input byte used. gzappend will not work - with versions of zlib earlier than 1.2.1. - - gzappend first decompresses the gzip file internally, discarding all but - the last 32K of uncompressed data, and noting the location of the last block - bit and the number of unused bits in the last byte of the compressed data. - The gzip trailer containing the CRC-32 and length of the uncompressed data - is verified. This trailer will be later overwritten. - - Then the last block bit is cleared by seeking back in the file and rewriting - the byte that contains it. Seeking forward, the last byte of the compressed - data is saved along with the number of unused bits to initialize deflate. - - A deflate process is initialized, using the last 32K of the uncompressed - data from the gzip file to initialize the dictionary. If the total - uncompressed data was less than 32K, then all of it is used to initialize - the dictionary. The deflate output bit buffer is also initialized with the - last bits from the original deflate stream. From here on, the data to - append is simply compressed using deflate, and written to the gzip file. - When that is complete, the new CRC-32 and uncompressed length are written - as the trailer of the gzip file. - */ - -#include -#include -#include -#include -#include -#include "zlib.h" - -#define local static -#define LGCHUNK 14 -#define CHUNK (1U << LGCHUNK) -#define DSIZE 32768U - -/* print an error message and terminate with extreme prejudice */ -local void bye(char *msg1, char *msg2) -{ - fprintf(stderr, "gzappend error: %s%s\n", msg1, msg2); - exit(1); -} - -/* return the greatest common divisor of a and b using Euclid's algorithm, - modified to be fast when one argument much greater than the other, and - coded to avoid unnecessary swapping */ -local unsigned gcd(unsigned a, unsigned b) -{ - unsigned c; - - while (a && b) - if (a > b) { - c = b; - while (a - c >= c) - c <<= 1; - a -= c; - } - else { - c = a; - while (b - c >= c) - c <<= 1; - b -= c; - } - return a + b; -} - -/* rotate list[0..len-1] left by rot positions, in place */ -local void rotate(unsigned char *list, unsigned len, unsigned rot) -{ - unsigned char tmp; - unsigned cycles; - unsigned char *start, *last, *to, *from; - - /* normalize rot and handle degenerate cases */ - if (len < 2) return; - if (rot >= len) rot %= len; - if (rot == 0) return; - - /* pointer to last entry in list */ - last = list + (len - 1); - - /* do simple left shift by one */ - if (rot == 1) { - tmp = *list; - memmove(list, list + 1, len - 1); - *last = tmp; - return; - } - - /* do simple right shift by one */ - if (rot == len - 1) { - tmp = *last; - memmove(list + 1, list, len - 1); - *list = tmp; - return; - } - - /* otherwise do rotate as a set of cycles in place */ - cycles = gcd(len, rot); /* number of cycles */ - do { - start = from = list + cycles; /* start index is arbitrary */ - tmp = *from; /* save entry to be overwritten */ - for (;;) { - to = from; /* next step in cycle */ - from += rot; /* go right rot positions */ - if (from > last) from -= len; /* (pointer better not wrap) */ - if (from == start) break; /* all but one shifted */ - *to = *from; /* shift left */ - } - *to = tmp; /* complete the circle */ - } while (--cycles); -} - -/* structure for gzip file read operations */ -typedef struct { - int fd; /* file descriptor */ - int size; /* 1 << size is bytes in buf */ - unsigned left; /* bytes available at next */ - unsigned char *buf; /* buffer */ - z_const unsigned char *next; /* next byte in buffer */ - char *name; /* file name for error messages */ -} file; - -/* reload buffer */ -local int readin(file *in) -{ - int len; - - len = read(in->fd, in->buf, 1 << in->size); - if (len == -1) bye("error reading ", in->name); - in->left = (unsigned)len; - in->next = in->buf; - return len; -} - -/* read from file in, exit if end-of-file */ -local int readmore(file *in) -{ - if (readin(in) == 0) bye("unexpected end of ", in->name); - return 0; -} - -#define read1(in) (in->left == 0 ? readmore(in) : 0, \ - in->left--, *(in->next)++) - -/* skip over n bytes of in */ -local void skip(file *in, unsigned n) -{ - unsigned bypass; - - if (n > in->left) { - n -= in->left; - bypass = n & ~((1U << in->size) - 1); - if (bypass) { - if (lseek(in->fd, (off_t)bypass, SEEK_CUR) == -1) - bye("seeking ", in->name); - n -= bypass; - } - readmore(in); - if (n > in->left) - bye("unexpected end of ", in->name); - } - in->left -= n; - in->next += n; -} - -/* read a four-byte unsigned integer, little-endian, from in */ -unsigned long read4(file *in) -{ - unsigned long val; - - val = read1(in); - val += (unsigned)read1(in) << 8; - val += (unsigned long)read1(in) << 16; - val += (unsigned long)read1(in) << 24; - return val; -} - -/* skip over gzip header */ -local void gzheader(file *in) -{ - int flags; - unsigned n; - - if (read1(in) != 31 || read1(in) != 139) bye(in->name, " not a gzip file"); - if (read1(in) != 8) bye("unknown compression method in", in->name); - flags = read1(in); - if (flags & 0xe0) bye("unknown header flags set in", in->name); - skip(in, 6); - if (flags & 4) { - n = read1(in); - n += (unsigned)(read1(in)) << 8; - skip(in, n); - } - if (flags & 8) while (read1(in) != 0) ; - if (flags & 16) while (read1(in) != 0) ; - if (flags & 2) skip(in, 2); -} - -/* decompress gzip file "name", return strm with a deflate stream ready to - continue compression of the data in the gzip file, and return a file - descriptor pointing to where to write the compressed data -- the deflate - stream is initialized to compress using level "level" */ -local int gzscan(char *name, z_stream *strm, int level) -{ - int ret, lastbit, left, full; - unsigned have; - unsigned long crc, tot; - unsigned char *window; - off_t lastoff, end; - file gz; - - /* open gzip file */ - gz.name = name; - gz.fd = open(name, O_RDWR, 0); - if (gz.fd == -1) bye("cannot open ", name); - gz.buf = malloc(CHUNK); - if (gz.buf == NULL) bye("out of memory", ""); - gz.size = LGCHUNK; - gz.left = 0; - - /* skip gzip header */ - gzheader(&gz); - - /* prepare to decompress */ - window = malloc(DSIZE); - if (window == NULL) bye("out of memory", ""); - strm->zalloc = Z_NULL; - strm->zfree = Z_NULL; - strm->opaque = Z_NULL; - ret = inflateInit2(strm, -15); - if (ret != Z_OK) bye("out of memory", " or library mismatch"); - - /* decompress the deflate stream, saving append information */ - lastbit = 0; - lastoff = lseek(gz.fd, 0L, SEEK_CUR) - gz.left; - left = 0; - strm->avail_in = gz.left; - strm->next_in = gz.next; - crc = crc32(0L, Z_NULL, 0); - have = full = 0; - do { - /* if needed, get more input */ - if (strm->avail_in == 0) { - readmore(&gz); - strm->avail_in = gz.left; - strm->next_in = gz.next; - } - - /* set up output to next available section of sliding window */ - strm->avail_out = DSIZE - have; - strm->next_out = window + have; - - /* inflate and check for errors */ - ret = inflate(strm, Z_BLOCK); - if (ret == Z_STREAM_ERROR) bye("internal stream error!", ""); - if (ret == Z_MEM_ERROR) bye("out of memory", ""); - if (ret == Z_DATA_ERROR) - bye("invalid compressed data--format violated in", name); - - /* update crc and sliding window pointer */ - crc = crc32(crc, window + have, DSIZE - have - strm->avail_out); - if (strm->avail_out) - have = DSIZE - strm->avail_out; - else { - have = 0; - full = 1; - } - - /* process end of block */ - if (strm->data_type & 128) { - if (strm->data_type & 64) - left = strm->data_type & 0x1f; - else { - lastbit = strm->data_type & 0x1f; - lastoff = lseek(gz.fd, 0L, SEEK_CUR) - strm->avail_in; - } - } - } while (ret != Z_STREAM_END); - inflateEnd(strm); - gz.left = strm->avail_in; - gz.next = strm->next_in; - - /* save the location of the end of the compressed data */ - end = lseek(gz.fd, 0L, SEEK_CUR) - gz.left; - - /* check gzip trailer and save total for deflate */ - if (crc != read4(&gz)) - bye("invalid compressed data--crc mismatch in ", name); - tot = strm->total_out; - if ((tot & 0xffffffffUL) != read4(&gz)) - bye("invalid compressed data--length mismatch in", name); - - /* if not at end of file, warn */ - if (gz.left || readin(&gz)) - fprintf(stderr, - "gzappend warning: junk at end of gzip file overwritten\n"); - - /* clear last block bit */ - lseek(gz.fd, lastoff - (lastbit != 0), SEEK_SET); - if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); - *gz.buf = (unsigned char)(*gz.buf ^ (1 << ((8 - lastbit) & 7))); - lseek(gz.fd, -1L, SEEK_CUR); - if (write(gz.fd, gz.buf, 1) != 1) bye("writing after seek to ", name); - - /* if window wrapped, build dictionary from window by rotating */ - if (full) { - rotate(window, DSIZE, have); - have = DSIZE; - } - - /* set up deflate stream with window, crc, total_in, and leftover bits */ - ret = deflateInit2(strm, level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY); - if (ret != Z_OK) bye("out of memory", ""); - deflateSetDictionary(strm, window, have); - strm->adler = crc; - strm->total_in = tot; - if (left) { - lseek(gz.fd, --end, SEEK_SET); - if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); - deflatePrime(strm, 8 - left, *gz.buf); - } - lseek(gz.fd, end, SEEK_SET); - - /* clean up and return */ - free(window); - free(gz.buf); - return gz.fd; -} - -/* append file "name" to gzip file gd using deflate stream strm -- if last - is true, then finish off the deflate stream at the end */ -local void gztack(char *name, int gd, z_stream *strm, int last) -{ - int fd, len, ret; - unsigned left; - unsigned char *in, *out; - - /* open file to compress and append */ - fd = 0; - if (name != NULL) { - fd = open(name, O_RDONLY, 0); - if (fd == -1) - fprintf(stderr, "gzappend warning: %s not found, skipping ...\n", - name); - } - - /* allocate buffers */ - in = malloc(CHUNK); - out = malloc(CHUNK); - if (in == NULL || out == NULL) bye("out of memory", ""); - - /* compress input file and append to gzip file */ - do { - /* get more input */ - len = read(fd, in, CHUNK); - if (len == -1) { - fprintf(stderr, - "gzappend warning: error reading %s, skipping rest ...\n", - name); - len = 0; - } - strm->avail_in = (unsigned)len; - strm->next_in = in; - if (len) strm->adler = crc32(strm->adler, in, (unsigned)len); - - /* compress and write all available output */ - do { - strm->avail_out = CHUNK; - strm->next_out = out; - ret = deflate(strm, last && len == 0 ? Z_FINISH : Z_NO_FLUSH); - left = CHUNK - strm->avail_out; - while (left) { - len = write(gd, out + CHUNK - strm->avail_out - left, left); - if (len == -1) bye("writing gzip file", ""); - left -= (unsigned)len; - } - } while (strm->avail_out == 0 && ret != Z_STREAM_END); - } while (len != 0); - - /* write trailer after last entry */ - if (last) { - deflateEnd(strm); - out[0] = (unsigned char)(strm->adler); - out[1] = (unsigned char)(strm->adler >> 8); - out[2] = (unsigned char)(strm->adler >> 16); - out[3] = (unsigned char)(strm->adler >> 24); - out[4] = (unsigned char)(strm->total_in); - out[5] = (unsigned char)(strm->total_in >> 8); - out[6] = (unsigned char)(strm->total_in >> 16); - out[7] = (unsigned char)(strm->total_in >> 24); - len = 8; - do { - ret = write(gd, out + 8 - len, len); - if (ret == -1) bye("writing gzip file", ""); - len -= ret; - } while (len); - close(gd); - } - - /* clean up and return */ - free(out); - free(in); - if (fd > 0) close(fd); -} - -/* process the compression level option if present, scan the gzip file, and - append the specified files, or append the data from stdin if no other file - names are provided on the command line -- the gzip file must be writable - and seekable */ -int main(int argc, char **argv) -{ - int gd, level; - z_stream strm; - - /* ignore command name */ - argc--; argv++; - - /* provide usage if no arguments */ - if (*argv == NULL) { - printf( - "gzappend 1.2 (11 Oct 2012) Copyright (C) 2003, 2012 Mark Adler\n" - ); - printf( - "usage: gzappend [-level] file.gz [ addthis [ andthis ... ]]\n"); - return 0; - } - - /* set compression level */ - level = Z_DEFAULT_COMPRESSION; - if (argv[0][0] == '-') { - if (argv[0][1] < '0' || argv[0][1] > '9' || argv[0][2] != 0) - bye("invalid compression level", ""); - level = argv[0][1] - '0'; - if (*++argv == NULL) bye("no gzip file name after options", ""); - } - - /* prepare to append to gzip file */ - gd = gzscan(*argv++, &strm, level); - - /* append files on command line, or from stdin if none */ - if (*argv == NULL) - gztack(NULL, gd, &strm, 1); - else - do { - gztack(*argv, gd, &strm, argv[1] == NULL); - } while (*++argv != NULL); - return 0; -} diff --git a/thirdparty/zlib-1.2.12/examples/gzjoin.c b/thirdparty/zlib-1.2.12/examples/gzjoin.c deleted file mode 100644 index 89e8098..0000000 --- a/thirdparty/zlib-1.2.12/examples/gzjoin.c +++ /dev/null @@ -1,449 +0,0 @@ -/* gzjoin -- command to join gzip files into one gzip file - - Copyright (C) 2004, 2005, 2012 Mark Adler, all rights reserved - version 1.2, 14 Aug 2012 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Mark Adler madler@alumni.caltech.edu - */ - -/* - * Change history: - * - * 1.0 11 Dec 2004 - First version - * 1.1 12 Jun 2005 - Changed ssize_t to long for portability - * 1.2 14 Aug 2012 - Clean up for z_const usage - */ - -/* - gzjoin takes one or more gzip files on the command line and writes out a - single gzip file that will uncompress to the concatenation of the - uncompressed data from the individual gzip files. gzjoin does this without - having to recompress any of the data and without having to calculate a new - crc32 for the concatenated uncompressed data. gzjoin does however have to - decompress all of the input data in order to find the bits in the compressed - data that need to be modified to concatenate the streams. - - gzjoin does not do an integrity check on the input gzip files other than - checking the gzip header and decompressing the compressed data. They are - otherwise assumed to be complete and correct. - - Each joint between gzip files removes at least 18 bytes of previous trailer - and subsequent header, and inserts an average of about three bytes to the - compressed data in order to connect the streams. The output gzip file - has a minimal ten-byte gzip header with no file name or modification time. - - This program was written to illustrate the use of the Z_BLOCK option of - inflate() and the crc32_combine() function. gzjoin will not compile with - versions of zlib earlier than 1.2.3. - */ - -#include /* fputs(), fprintf(), fwrite(), putc() */ -#include /* exit(), malloc(), free() */ -#include /* open() */ -#include /* close(), read(), lseek() */ -#include "zlib.h" - /* crc32(), crc32_combine(), inflateInit2(), inflate(), inflateEnd() */ - -#define local static - -/* exit with an error (return a value to allow use in an expression) */ -local int bail(char *why1, char *why2) -{ - fprintf(stderr, "gzjoin error: %s%s, output incomplete\n", why1, why2); - exit(1); - return 0; -} - -/* -- simple buffered file input with access to the buffer -- */ - -#define CHUNK 32768 /* must be a power of two and fit in unsigned */ - -/* bin buffered input file type */ -typedef struct { - char *name; /* name of file for error messages */ - int fd; /* file descriptor */ - unsigned left; /* bytes remaining at next */ - unsigned char *next; /* next byte to read */ - unsigned char *buf; /* allocated buffer of length CHUNK */ -} bin; - -/* close a buffered file and free allocated memory */ -local void bclose(bin *in) -{ - if (in != NULL) { - if (in->fd != -1) - close(in->fd); - if (in->buf != NULL) - free(in->buf); - free(in); - } -} - -/* open a buffered file for input, return a pointer to type bin, or NULL on - failure */ -local bin *bopen(char *name) -{ - bin *in; - - in = malloc(sizeof(bin)); - if (in == NULL) - return NULL; - in->buf = malloc(CHUNK); - in->fd = open(name, O_RDONLY, 0); - if (in->buf == NULL || in->fd == -1) { - bclose(in); - return NULL; - } - in->left = 0; - in->next = in->buf; - in->name = name; - return in; -} - -/* load buffer from file, return -1 on read error, 0 or 1 on success, with - 1 indicating that end-of-file was reached */ -local int bload(bin *in) -{ - long len; - - if (in == NULL) - return -1; - if (in->left != 0) - return 0; - in->next = in->buf; - do { - len = (long)read(in->fd, in->buf + in->left, CHUNK - in->left); - if (len < 0) - return -1; - in->left += (unsigned)len; - } while (len != 0 && in->left < CHUNK); - return len == 0 ? 1 : 0; -} - -/* get a byte from the file, bail if end of file */ -#define bget(in) (in->left ? 0 : bload(in), \ - in->left ? (in->left--, *(in->next)++) : \ - bail("unexpected end of file on ", in->name)) - -/* get a four-byte little-endian unsigned integer from file */ -local unsigned long bget4(bin *in) -{ - unsigned long val; - - val = bget(in); - val += (unsigned long)(bget(in)) << 8; - val += (unsigned long)(bget(in)) << 16; - val += (unsigned long)(bget(in)) << 24; - return val; -} - -/* skip bytes in file */ -local void bskip(bin *in, unsigned skip) -{ - /* check pointer */ - if (in == NULL) - return; - - /* easy case -- skip bytes in buffer */ - if (skip <= in->left) { - in->left -= skip; - in->next += skip; - return; - } - - /* skip what's in buffer, discard buffer contents */ - skip -= in->left; - in->left = 0; - - /* seek past multiples of CHUNK bytes */ - if (skip > CHUNK) { - unsigned left; - - left = skip & (CHUNK - 1); - if (left == 0) { - /* exact number of chunks: seek all the way minus one byte to check - for end-of-file with a read */ - lseek(in->fd, skip - 1, SEEK_CUR); - if (read(in->fd, in->buf, 1) != 1) - bail("unexpected end of file on ", in->name); - return; - } - - /* skip the integral chunks, update skip with remainder */ - lseek(in->fd, skip - left, SEEK_CUR); - skip = left; - } - - /* read more input and skip remainder */ - bload(in); - if (skip > in->left) - bail("unexpected end of file on ", in->name); - in->left -= skip; - in->next += skip; -} - -/* -- end of buffered input functions -- */ - -/* skip the gzip header from file in */ -local void gzhead(bin *in) -{ - int flags; - - /* verify gzip magic header and compression method */ - if (bget(in) != 0x1f || bget(in) != 0x8b || bget(in) != 8) - bail(in->name, " is not a valid gzip file"); - - /* get and verify flags */ - flags = bget(in); - if ((flags & 0xe0) != 0) - bail("unknown reserved bits set in ", in->name); - - /* skip modification time, extra flags, and os */ - bskip(in, 6); - - /* skip extra field if present */ - if (flags & 4) { - unsigned len; - - len = bget(in); - len += (unsigned)(bget(in)) << 8; - bskip(in, len); - } - - /* skip file name if present */ - if (flags & 8) - while (bget(in) != 0) - ; - - /* skip comment if present */ - if (flags & 16) - while (bget(in) != 0) - ; - - /* skip header crc if present */ - if (flags & 2) - bskip(in, 2); -} - -/* write a four-byte little-endian unsigned integer to out */ -local void put4(unsigned long val, FILE *out) -{ - putc(val & 0xff, out); - putc((val >> 8) & 0xff, out); - putc((val >> 16) & 0xff, out); - putc((val >> 24) & 0xff, out); -} - -/* Load up zlib stream from buffered input, bail if end of file */ -local void zpull(z_streamp strm, bin *in) -{ - if (in->left == 0) - bload(in); - if (in->left == 0) - bail("unexpected end of file on ", in->name); - strm->avail_in = in->left; - strm->next_in = in->next; -} - -/* Write header for gzip file to out and initialize trailer. */ -local void gzinit(unsigned long *crc, unsigned long *tot, FILE *out) -{ - fwrite("\x1f\x8b\x08\0\0\0\0\0\0\xff", 1, 10, out); - *crc = crc32(0L, Z_NULL, 0); - *tot = 0; -} - -/* Copy the compressed data from name, zeroing the last block bit of the last - block if clr is true, and adding empty blocks as needed to get to a byte - boundary. If clr is false, then the last block becomes the last block of - the output, and the gzip trailer is written. crc and tot maintains the - crc and length (modulo 2^32) of the output for the trailer. The resulting - gzip file is written to out. gzinit() must be called before the first call - of gzcopy() to write the gzip header and to initialize crc and tot. */ -local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot, - FILE *out) -{ - int ret; /* return value from zlib functions */ - int pos; /* where the "last block" bit is in byte */ - int last; /* true if processing the last block */ - bin *in; /* buffered input file */ - unsigned char *start; /* start of compressed data in buffer */ - unsigned char *junk; /* buffer for uncompressed data -- discarded */ - z_off_t len; /* length of uncompressed data (support > 4 GB) */ - z_stream strm; /* zlib inflate stream */ - - /* open gzip file and skip header */ - in = bopen(name); - if (in == NULL) - bail("could not open ", name); - gzhead(in); - - /* allocate buffer for uncompressed data and initialize raw inflate - stream */ - junk = malloc(CHUNK); - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, -15); - if (junk == NULL || ret != Z_OK) - bail("out of memory", ""); - - /* inflate and copy compressed data, clear last-block bit if requested */ - len = 0; - zpull(&strm, in); - start = in->next; - last = start[0] & 1; - if (last && clr) - start[0] &= ~1; - strm.avail_out = 0; - for (;;) { - /* if input used and output done, write used input and get more */ - if (strm.avail_in == 0 && strm.avail_out != 0) { - fwrite(start, 1, strm.next_in - start, out); - start = in->buf; - in->left = 0; - zpull(&strm, in); - } - - /* decompress -- return early when end-of-block reached */ - strm.avail_out = CHUNK; - strm.next_out = junk; - ret = inflate(&strm, Z_BLOCK); - switch (ret) { - case Z_MEM_ERROR: - bail("out of memory", ""); - case Z_DATA_ERROR: - bail("invalid compressed data in ", in->name); - } - - /* update length of uncompressed data */ - len += CHUNK - strm.avail_out; - - /* check for block boundary (only get this when block copied out) */ - if (strm.data_type & 128) { - /* if that was the last block, then done */ - if (last) - break; - - /* number of unused bits in last byte */ - pos = strm.data_type & 7; - - /* find the next last-block bit */ - if (pos != 0) { - /* next last-block bit is in last used byte */ - pos = 0x100 >> pos; - last = strm.next_in[-1] & pos; - if (last && clr) - in->buf[strm.next_in - in->buf - 1] &= ~pos; - } - else { - /* next last-block bit is in next unused byte */ - if (strm.avail_in == 0) { - /* don't have that byte yet -- get it */ - fwrite(start, 1, strm.next_in - start, out); - start = in->buf; - in->left = 0; - zpull(&strm, in); - } - last = strm.next_in[0] & 1; - if (last && clr) - in->buf[strm.next_in - in->buf] &= ~1; - } - } - } - - /* update buffer with unused input */ - in->left = strm.avail_in; - in->next = in->buf + (strm.next_in - in->buf); - - /* copy used input, write empty blocks to get to byte boundary */ - pos = strm.data_type & 7; - fwrite(start, 1, in->next - start - 1, out); - last = in->next[-1]; - if (pos == 0 || !clr) - /* already at byte boundary, or last file: write last byte */ - putc(last, out); - else { - /* append empty blocks to last byte */ - last &= ((0x100 >> pos) - 1); /* assure unused bits are zero */ - if (pos & 1) { - /* odd -- append an empty stored block */ - putc(last, out); - if (pos == 1) - putc(0, out); /* two more bits in block header */ - fwrite("\0\0\xff\xff", 1, 4, out); - } - else { - /* even -- append 1, 2, or 3 empty fixed blocks */ - switch (pos) { - case 6: - putc(last | 8, out); - last = 0; - case 4: - putc(last | 0x20, out); - last = 0; - case 2: - putc(last | 0x80, out); - putc(0, out); - } - } - } - - /* update crc and tot */ - *crc = crc32_combine(*crc, bget4(in), len); - *tot += (unsigned long)len; - - /* clean up */ - inflateEnd(&strm); - free(junk); - bclose(in); - - /* write trailer if this is the last gzip file */ - if (!clr) { - put4(*crc, out); - put4(*tot, out); - } -} - -/* join the gzip files on the command line, write result to stdout */ -int main(int argc, char **argv) -{ - unsigned long crc, tot; /* running crc and total uncompressed length */ - - /* skip command name */ - argc--; - argv++; - - /* show usage if no arguments */ - if (argc == 0) { - fputs("gzjoin usage: gzjoin f1.gz [f2.gz [f3.gz ...]] > fjoin.gz\n", - stderr); - return 0; - } - - /* join gzip files on command line and write to stdout */ - gzinit(&crc, &tot, stdout); - while (argc--) - gzcopy(*argv++, argc, &crc, &tot, stdout); - - /* done */ - return 0; -} diff --git a/thirdparty/zlib-1.2.12/examples/gzlog.c b/thirdparty/zlib-1.2.12/examples/gzlog.c deleted file mode 100644 index b977802..0000000 --- a/thirdparty/zlib-1.2.12/examples/gzlog.c +++ /dev/null @@ -1,1061 +0,0 @@ -/* - * gzlog.c - * Copyright (C) 2004, 2008, 2012, 2016, 2019 Mark Adler, all rights reserved - * For conditions of distribution and use, see copyright notice in gzlog.h - * version 2.3, 25 May 2019 - */ - -/* - gzlog provides a mechanism for frequently appending short strings to a gzip - file that is efficient both in execution time and compression ratio. The - strategy is to write the short strings in an uncompressed form to the end of - the gzip file, only compressing when the amount of uncompressed data has - reached a given threshold. - - gzlog also provides protection against interruptions in the process due to - system crashes. The status of the operation is recorded in an extra field - in the gzip file, and is only updated once the gzip file is brought to a - valid state. The last data to be appended or compressed is saved in an - auxiliary file, so that if the operation is interrupted, it can be completed - the next time an append operation is attempted. - - gzlog maintains another auxiliary file with the last 32K of data from the - compressed portion, which is preloaded for the compression of the subsequent - data. This minimizes the impact to the compression ratio of appending. - */ - -/* - Operations Concept: - - Files (log name "foo"): - foo.gz -- gzip file with the complete log - foo.add -- last message to append or last data to compress - foo.dict -- dictionary of the last 32K of data for next compression - foo.temp -- temporary dictionary file for compression after this one - foo.lock -- lock file for reading and writing the other files - foo.repairs -- log file for log file recovery operations (not compressed) - - gzip file structure: - - fixed-length (no file name) header with extra field (see below) - - compressed data ending initially with empty stored block - - uncompressed data filling out originally empty stored block and - subsequent stored blocks as needed (16K max each) - - gzip trailer - - no junk at end (no other gzip streams) - - When appending data, the information in the first three items above plus the - foo.add file are sufficient to recover an interrupted append operation. The - extra field has the necessary information to restore the start of the last - stored block and determine where to append the data in the foo.add file, as - well as the crc and length of the gzip data before the append operation. - - The foo.add file is created before the gzip file is marked for append, and - deleted after the gzip file is marked as complete. So if the append - operation is interrupted, the data to add will still be there. If due to - some external force, the foo.add file gets deleted between when the append - operation was interrupted and when recovery is attempted, the gzip file will - still be restored, but without the appended data. - - When compressing data, the information in the first two items above plus the - foo.add file are sufficient to recover an interrupted compress operation. - The extra field has the necessary information to find the end of the - compressed data, and contains both the crc and length of just the compressed - data and of the complete set of data including the contents of the foo.add - file. - - Again, the foo.add file is maintained during the compress operation in case - of an interruption. If in the unlikely event the foo.add file with the data - to be compressed is missing due to some external force, a gzip file with - just the previous compressed data will be reconstructed. In this case, all - of the data that was to be compressed is lost (approximately one megabyte). - This will not occur if all that happened was an interruption of the compress - operation. - - The third state that is marked is the replacement of the old dictionary with - the new dictionary after a compress operation. Once compression is - complete, the gzip file is marked as being in the replace state. This - completes the gzip file, so an interrupt after being so marked does not - result in recompression. Then the dictionary file is replaced, and the gzip - file is marked as completed. This state prevents the possibility of - restarting compression with the wrong dictionary file. - - All three operations are wrapped by a lock/unlock procedure. In order to - gain exclusive access to the log files, first a foo.lock file must be - exclusively created. When all operations are complete, the lock is - released by deleting the foo.lock file. If when attempting to create the - lock file, it already exists and the modify time of the lock file is more - than five minutes old (set by the PATIENCE define below), then the old - lock file is considered stale and deleted, and the exclusive creation of - the lock file is retried. To assure that there are no false assessments - of the staleness of the lock file, the operations periodically touch the - lock file to update the modified date. - - Following is the definition of the extra field with all of the information - required to enable the above append and compress operations and their - recovery if interrupted. Multi-byte values are stored little endian - (consistent with the gzip format). File pointers are eight bytes long. - The crc's and lengths for the gzip trailer are four bytes long. (Note that - the length at the end of a gzip file is used for error checking only, and - for large files is actually the length modulo 2^32.) The stored block - length is two bytes long. The gzip extra field two-byte identification is - "ap" for append. It is assumed that writing the extra field to the file is - an "atomic" operation. That is, either all of the extra field is written - to the file, or none of it is, if the operation is interrupted right at the - point of updating the extra field. This is a reasonable assumption, since - the extra field is within the first 52 bytes of the file, which is smaller - than any expected block size for a mass storage device (usually 512 bytes or - larger). - - Extra field (35 bytes): - - Pointer to first stored block length -- this points to the two-byte length - of the first stored block, which is followed by the two-byte, one's - complement of that length. The stored block length is preceded by the - three-bit header of the stored block, which is the actual start of the - stored block in the deflate format. See the bit offset field below. - - Pointer to the last stored block length. This is the same as above, but - for the last stored block of the uncompressed data in the gzip file. - Initially this is the same as the first stored block length pointer. - When the stored block gets to 16K (see the MAX_STORE define), then a new - stored block as added, at which point the last stored block length pointer - is different from the first stored block length pointer. When they are - different, the first bit of the last stored block header is eight bits, or - one byte back from the block length. - - Compressed data crc and length. This is the crc and length of the data - that is in the compressed portion of the deflate stream. These are used - only in the event that the foo.add file containing the data to compress is - lost after a compress operation is interrupted. - - Total data crc and length. This is the crc and length of all of the data - stored in the gzip file, compressed and uncompressed. It is used to - reconstruct the gzip trailer when compressing, as well as when recovering - interrupted operations. - - Final stored block length. This is used to quickly find where to append, - and allows the restoration of the original final stored block state when - an append operation is interrupted. - - First stored block start as the number of bits back from the final stored - block first length byte. This value is in the range of 3..10, and is - stored as the low three bits of the final byte of the extra field after - subtracting three (0..7). This allows the last-block bit of the stored - block header to be updated when a new stored block is added, for the case - when the first stored block and the last stored block are the same. (When - they are different, the numbers of bits back is known to be eight.) This - also allows for new compressed data to be appended to the old compressed - data in the compress operation, overwriting the previous first stored - block, or for the compressed data to be terminated and a valid gzip file - reconstructed on the off chance that a compression operation was - interrupted and the data to compress in the foo.add file was deleted. - - The operation in process. This is the next two bits in the last byte (the - bits under the mask 0x18). The are interpreted as 0: nothing in process, - 1: append in process, 2: compress in process, 3: replace in process. - - The top three bits of the last byte in the extra field are reserved and - are currently set to zero. - - Main procedure: - - Exclusively create the foo.lock file using the O_CREAT and O_EXCL modes of - the system open() call. If the modify time of an existing lock file is - more than PATIENCE seconds old, then the lock file is deleted and the - exclusive create is retried. - - Load the extra field from the foo.gz file, and see if an operation was in - progress but not completed. If so, apply the recovery procedure below. - - Perform the append procedure with the provided data. - - If the uncompressed data in the foo.gz file is 1MB or more, apply the - compress procedure. - - Delete the foo.lock file. - - Append procedure: - - Put what to append in the foo.add file so that the operation can be - restarted if this procedure is interrupted. - - Mark the foo.gz extra field with the append operation in progress. - + Restore the original last-block bit and stored block length of the last - stored block from the information in the extra field, in case a previous - append operation was interrupted. - - Append the provided data to the last stored block, creating new stored - blocks as needed and updating the stored blocks last-block bits and - lengths. - - Update the crc and length with the new data, and write the gzip trailer. - - Write over the extra field (with a single write operation) with the new - pointers, lengths, and crc's, and mark the gzip file as not in process. - Though there is still a foo.add file, it will be ignored since nothing - is in process. If a foo.add file is leftover from a previously - completed operation, it is truncated when writing new data to it. - - Delete the foo.add file. - - Compress and replace procedures: - - Read all of the uncompressed data in the stored blocks in foo.gz and write - it to foo.add. Also write foo.temp with the last 32K of that data to - provide a dictionary for the next invocation of this procedure. - - Rewrite the extra field marking foo.gz with a compression in process. - * If there is no data provided to compress (due to a missing foo.add file - when recovering), reconstruct and truncate the foo.gz file to contain - only the previous compressed data and proceed to the step after the next - one. Otherwise ... - - Compress the data with the dictionary in foo.dict, and write to the - foo.gz file starting at the bit immediately following the last previously - compressed block. If there is no foo.dict, proceed anyway with the - compression at slightly reduced efficiency. (For the foo.dict file to be - missing requires some external failure beyond simply the interruption of - a compress operation.) During this process, the foo.lock file is - periodically touched to assure that that file is not considered stale by - another process before we're done. The deflation is terminated with a - non-last empty static block (10 bits long), that is then located and - written over by a last-bit-set empty stored block. - - Append the crc and length of the data in the gzip file (previously - calculated during the append operations). - - Write over the extra field with the updated stored block offsets, bits - back, crc's, and lengths, and mark foo.gz as in process for a replacement - of the dictionary. - @ Delete the foo.add file. - - Replace foo.dict with foo.temp. - - Write over the extra field, marking foo.gz as complete. - - Recovery procedure: - - If not a replace recovery, read in the foo.add file, and provide that data - to the appropriate recovery below. If there is no foo.add file, provide - a zero data length to the recovery. In that case, the append recovery - restores the foo.gz to the previous compressed + uncompressed data state. - For the the compress recovery, a missing foo.add file results in foo.gz - being restored to the previous compressed-only data state. - - Append recovery: - - Pick up append at + step above - - Compress recovery: - - Pick up compress at * step above - - Replace recovery: - - Pick up compress at @ step above - - Log the repair with a date stamp in foo.repairs - */ - -#include -#include /* rename, fopen, fprintf, fclose */ -#include /* malloc, free */ -#include /* strlen, strrchr, strcpy, strncpy, strcmp */ -#include /* open */ -#include /* lseek, read, write, close, unlink, sleep, */ - /* ftruncate, fsync */ -#include /* errno */ -#include /* time, ctime */ -#include /* stat */ -#include /* utimes */ -#include "zlib.h" /* crc32 */ - -#include "gzlog.h" /* header for external access */ - -#define local static -typedef unsigned int uint; -typedef unsigned long ulong; - -/* Macro for debugging to deterministically force recovery operations */ -#ifdef GZLOG_DEBUG - #include /* longjmp */ - jmp_buf gzlog_jump; /* where to go back to */ - int gzlog_bail = 0; /* which point to bail at (1..8) */ - int gzlog_count = -1; /* number of times through to wait */ -# define BAIL(n) do { if (n == gzlog_bail && gzlog_count-- == 0) \ - longjmp(gzlog_jump, gzlog_bail); } while (0) -#else -# define BAIL(n) -#endif - -/* how old the lock file can be in seconds before considering it stale */ -#define PATIENCE 300 - -/* maximum stored block size in Kbytes -- must be in 1..63 */ -#define MAX_STORE 16 - -/* number of stored Kbytes to trigger compression (must be >= 32 to allow - dictionary construction, and <= 204 * MAX_STORE, in order for >> 10 to - discard the stored block headers contribution of five bytes each) */ -#define TRIGGER 1024 - -/* size of a deflate dictionary (this cannot be changed) */ -#define DICT 32768U - -/* values for the operation (2 bits) */ -#define NO_OP 0 -#define APPEND_OP 1 -#define COMPRESS_OP 2 -#define REPLACE_OP 3 - -/* macros to extract little-endian integers from an unsigned byte buffer */ -#define PULL2(p) ((p)[0]+((uint)((p)[1])<<8)) -#define PULL4(p) (PULL2(p)+((ulong)PULL2(p+2)<<16)) -#define PULL8(p) (PULL4(p)+((off_t)PULL4(p+4)<<32)) - -/* macros to store integers into a byte buffer in little-endian order */ -#define PUT2(p,a) do {(p)[0]=a;(p)[1]=(a)>>8;} while(0) -#define PUT4(p,a) do {PUT2(p,a);PUT2(p+2,a>>16);} while(0) -#define PUT8(p,a) do {PUT4(p,a);PUT4(p+4,a>>32);} while(0) - -/* internal structure for log information */ -#define LOGID "\106\035\172" /* should be three non-zero characters */ -struct log { - char id[4]; /* contains LOGID to detect inadvertent overwrites */ - int fd; /* file descriptor for .gz file, opened read/write */ - char *path; /* allocated path, e.g. "/var/log/foo" or "foo" */ - char *end; /* end of path, for appending suffices such as ".gz" */ - off_t first; /* offset of first stored block first length byte */ - int back; /* location of first block id in bits back from first */ - uint stored; /* bytes currently in last stored block */ - off_t last; /* offset of last stored block first length byte */ - ulong ccrc; /* crc of compressed data */ - ulong clen; /* length (modulo 2^32) of compressed data */ - ulong tcrc; /* crc of total data */ - ulong tlen; /* length (modulo 2^32) of total data */ - time_t lock; /* last modify time of our lock file */ -}; - -/* gzip header for gzlog */ -local unsigned char log_gzhead[] = { - 0x1f, 0x8b, /* magic gzip id */ - 8, /* compression method is deflate */ - 4, /* there is an extra field (no file name) */ - 0, 0, 0, 0, /* no modification time provided */ - 0, 0xff, /* no extra flags, no OS specified */ - 39, 0, 'a', 'p', 35, 0 /* extra field with "ap" subfield */ - /* 35 is EXTRA, 39 is EXTRA + 4 */ -}; - -#define HEAD sizeof(log_gzhead) /* should be 16 */ - -/* initial gzip extra field content (52 == HEAD + EXTRA + 1) */ -local unsigned char log_gzext[] = { - 52, 0, 0, 0, 0, 0, 0, 0, /* offset of first stored block length */ - 52, 0, 0, 0, 0, 0, 0, 0, /* offset of last stored block length */ - 0, 0, 0, 0, 0, 0, 0, 0, /* compressed data crc and length */ - 0, 0, 0, 0, 0, 0, 0, 0, /* total data crc and length */ - 0, 0, /* final stored block data length */ - 5 /* op is NO_OP, last bit 8 bits back */ -}; - -#define EXTRA sizeof(log_gzext) /* should be 35 */ - -/* initial gzip data and trailer */ -local unsigned char log_gzbody[] = { - 1, 0, 0, 0xff, 0xff, /* empty stored block (last) */ - 0, 0, 0, 0, /* crc */ - 0, 0, 0, 0 /* uncompressed length */ -}; - -#define BODY sizeof(log_gzbody) - -/* Exclusively create foo.lock in order to negotiate exclusive access to the - foo.* files. If the modify time of an existing lock file is greater than - PATIENCE seconds in the past, then consider the lock file to have been - abandoned, delete it, and try the exclusive create again. Save the lock - file modify time for verification of ownership. Return 0 on success, or -1 - on failure, usually due to an access restriction or invalid path. Note that - if stat() or unlink() fails, it may be due to another process noticing the - abandoned lock file a smidge sooner and deleting it, so those are not - flagged as an error. */ -local int log_lock(struct log *log) -{ - int fd; - struct stat st; - - strcpy(log->end, ".lock"); - while ((fd = open(log->path, O_CREAT | O_EXCL, 0644)) < 0) { - if (errno != EEXIST) - return -1; - if (stat(log->path, &st) == 0 && time(NULL) - st.st_mtime > PATIENCE) { - unlink(log->path); - continue; - } - sleep(2); /* relinquish the CPU for two seconds while waiting */ - } - close(fd); - if (stat(log->path, &st) == 0) - log->lock = st.st_mtime; - return 0; -} - -/* Update the modify time of the lock file to now, in order to prevent another - task from thinking that the lock is stale. Save the lock file modify time - for verification of ownership. */ -local void log_touch(struct log *log) -{ - struct stat st; - - strcpy(log->end, ".lock"); - utimes(log->path, NULL); - if (stat(log->path, &st) == 0) - log->lock = st.st_mtime; -} - -/* Check the log file modify time against what is expected. Return true if - this is not our lock. If it is our lock, touch it to keep it. */ -local int log_check(struct log *log) -{ - struct stat st; - - strcpy(log->end, ".lock"); - if (stat(log->path, &st) || st.st_mtime != log->lock) - return 1; - log_touch(log); - return 0; -} - -/* Unlock a previously acquired lock, but only if it's ours. */ -local void log_unlock(struct log *log) -{ - if (log_check(log)) - return; - strcpy(log->end, ".lock"); - unlink(log->path); - log->lock = 0; -} - -/* Check the gzip header and read in the extra field, filling in the values in - the log structure. Return op on success or -1 if the gzip header was not as - expected. op is the current operation in progress last written to the extra - field. This assumes that the gzip file has already been opened, with the - file descriptor log->fd. */ -local int log_head(struct log *log) -{ - int op; - unsigned char buf[HEAD + EXTRA]; - - if (lseek(log->fd, 0, SEEK_SET) < 0 || - read(log->fd, buf, HEAD + EXTRA) != HEAD + EXTRA || - memcmp(buf, log_gzhead, HEAD)) { - return -1; - } - log->first = PULL8(buf + HEAD); - log->last = PULL8(buf + HEAD + 8); - log->ccrc = PULL4(buf + HEAD + 16); - log->clen = PULL4(buf + HEAD + 20); - log->tcrc = PULL4(buf + HEAD + 24); - log->tlen = PULL4(buf + HEAD + 28); - log->stored = PULL2(buf + HEAD + 32); - log->back = 3 + (buf[HEAD + 34] & 7); - op = (buf[HEAD + 34] >> 3) & 3; - return op; -} - -/* Write over the extra field contents, marking the operation as op. Use fsync - to assure that the device is written to, and in the requested order. This - operation, and only this operation, is assumed to be atomic in order to - assure that the log is recoverable in the event of an interruption at any - point in the process. Return -1 if the write to foo.gz failed. */ -local int log_mark(struct log *log, int op) -{ - int ret; - unsigned char ext[EXTRA]; - - PUT8(ext, log->first); - PUT8(ext + 8, log->last); - PUT4(ext + 16, log->ccrc); - PUT4(ext + 20, log->clen); - PUT4(ext + 24, log->tcrc); - PUT4(ext + 28, log->tlen); - PUT2(ext + 32, log->stored); - ext[34] = log->back - 3 + (op << 3); - fsync(log->fd); - ret = lseek(log->fd, HEAD, SEEK_SET) < 0 || - write(log->fd, ext, EXTRA) != EXTRA ? -1 : 0; - fsync(log->fd); - return ret; -} - -/* Rewrite the last block header bits and subsequent zero bits to get to a byte - boundary, setting the last block bit if last is true, and then write the - remainder of the stored block header (length and one's complement). Leave - the file pointer after the end of the last stored block data. Return -1 if - there is a read or write failure on the foo.gz file */ -local int log_last(struct log *log, int last) -{ - int back, len, mask; - unsigned char buf[6]; - - /* determine the locations of the bytes and bits to modify */ - back = log->last == log->first ? log->back : 8; - len = back > 8 ? 2 : 1; /* bytes back from log->last */ - mask = 0x80 >> ((back - 1) & 7); /* mask for block last-bit */ - - /* get the byte to modify (one or two back) into buf[0] -- don't need to - read the byte if the last-bit is eight bits back, since in that case - the entire byte will be modified */ - buf[0] = 0; - if (back != 8 && (lseek(log->fd, log->last - len, SEEK_SET) < 0 || - read(log->fd, buf, 1) != 1)) - return -1; - - /* change the last-bit of the last stored block as requested -- note - that all bits above the last-bit are set to zero, per the type bits - of a stored block being 00 and per the convention that the bits to - bring the stream to a byte boundary are also zeros */ - buf[1] = 0; - buf[2 - len] = (*buf & (mask - 1)) + (last ? mask : 0); - - /* write the modified stored block header and lengths, move the file - pointer to after the last stored block data */ - PUT2(buf + 2, log->stored); - PUT2(buf + 4, log->stored ^ 0xffff); - return lseek(log->fd, log->last - len, SEEK_SET) < 0 || - write(log->fd, buf + 2 - len, len + 4) != len + 4 || - lseek(log->fd, log->stored, SEEK_CUR) < 0 ? -1 : 0; -} - -/* Append len bytes from data to the locked and open log file. len may be zero - if recovering and no .add file was found. In that case, the previous state - of the foo.gz file is restored. The data is appended uncompressed in - deflate stored blocks. Return -1 if there was an error reading or writing - the foo.gz file. */ -local int log_append(struct log *log, unsigned char *data, size_t len) -{ - uint put; - off_t end; - unsigned char buf[8]; - - /* set the last block last-bit and length, in case recovering an - interrupted append, then position the file pointer to append to the - block */ - if (log_last(log, 1)) - return -1; - - /* append, adding stored blocks and updating the offset of the last stored - block as needed, and update the total crc and length */ - while (len) { - /* append as much as we can to the last block */ - put = (MAX_STORE << 10) - log->stored; - if (put > len) - put = (uint)len; - if (put) { - if (write(log->fd, data, put) != put) - return -1; - BAIL(1); - log->tcrc = crc32(log->tcrc, data, put); - log->tlen += put; - log->stored += put; - data += put; - len -= put; - } - - /* if we need to, add a new empty stored block */ - if (len) { - /* mark current block as not last */ - if (log_last(log, 0)) - return -1; - - /* point to new, empty stored block */ - log->last += 4 + log->stored + 1; - log->stored = 0; - } - - /* mark last block as last, update its length */ - if (log_last(log, 1)) - return -1; - BAIL(2); - } - - /* write the new crc and length trailer, and truncate just in case (could - be recovering from partial append with a missing foo.add file) */ - PUT4(buf, log->tcrc); - PUT4(buf + 4, log->tlen); - if (write(log->fd, buf, 8) != 8 || - (end = lseek(log->fd, 0, SEEK_CUR)) < 0 || ftruncate(log->fd, end)) - return -1; - - /* write the extra field, marking the log file as done, delete .add file */ - if (log_mark(log, NO_OP)) - return -1; - strcpy(log->end, ".add"); - unlink(log->path); /* ignore error, since may not exist */ - return 0; -} - -/* Replace the foo.dict file with the foo.temp file. Also delete the foo.add - file, since the compress operation may have been interrupted before that was - done. Returns 1 if memory could not be allocated, or -1 if reading or - writing foo.gz fails, or if the rename fails for some reason other than - foo.temp not existing. foo.temp not existing is a permitted error, since - the replace operation may have been interrupted after the rename is done, - but before foo.gz is marked as complete. */ -local int log_replace(struct log *log) -{ - int ret; - char *dest; - - /* delete foo.add file */ - strcpy(log->end, ".add"); - unlink(log->path); /* ignore error, since may not exist */ - BAIL(3); - - /* rename foo.name to foo.dict, replacing foo.dict if it exists */ - strcpy(log->end, ".dict"); - dest = malloc(strlen(log->path) + 1); - if (dest == NULL) - return -2; - strcpy(dest, log->path); - strcpy(log->end, ".temp"); - ret = rename(log->path, dest); - free(dest); - if (ret && errno != ENOENT) - return -1; - BAIL(4); - - /* mark the foo.gz file as done */ - return log_mark(log, NO_OP); -} - -/* Compress the len bytes at data and append the compressed data to the - foo.gz deflate data immediately after the previous compressed data. This - overwrites the previous uncompressed data, which was stored in foo.add - and is the data provided in data[0..len-1]. If this operation is - interrupted, it picks up at the start of this routine, with the foo.add - file read in again. If there is no data to compress (len == 0), then we - simply terminate the foo.gz file after the previously compressed data, - appending a final empty stored block and the gzip trailer. Return -1 if - reading or writing the log.gz file failed, or -2 if there was a memory - allocation failure. */ -local int log_compress(struct log *log, unsigned char *data, size_t len) -{ - int fd; - uint got, max; - ssize_t dict; - off_t end; - z_stream strm; - unsigned char buf[DICT]; - - /* compress and append compressed data */ - if (len) { - /* set up for deflate, allocating memory */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - if (deflateInit2(&strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -15, 8, - Z_DEFAULT_STRATEGY) != Z_OK) - return -2; - - /* read in dictionary (last 32K of data that was compressed) */ - strcpy(log->end, ".dict"); - fd = open(log->path, O_RDONLY, 0); - if (fd >= 0) { - dict = read(fd, buf, DICT); - close(fd); - if (dict < 0) { - deflateEnd(&strm); - return -1; - } - if (dict) - deflateSetDictionary(&strm, buf, (uint)dict); - } - log_touch(log); - - /* prime deflate with last bits of previous block, position write - pointer to write those bits and overwrite what follows */ - if (lseek(log->fd, log->first - (log->back > 8 ? 2 : 1), - SEEK_SET) < 0 || - read(log->fd, buf, 1) != 1 || lseek(log->fd, -1, SEEK_CUR) < 0) { - deflateEnd(&strm); - return -1; - } - deflatePrime(&strm, (8 - log->back) & 7, *buf); - - /* compress, finishing with a partial non-last empty static block */ - strm.next_in = data; - max = (((uint)0 - 1) >> 1) + 1; /* in case int smaller than size_t */ - do { - strm.avail_in = len > max ? max : (uint)len; - len -= strm.avail_in; - do { - strm.avail_out = DICT; - strm.next_out = buf; - deflate(&strm, len ? Z_NO_FLUSH : Z_PARTIAL_FLUSH); - got = DICT - strm.avail_out; - if (got && write(log->fd, buf, got) != got) { - deflateEnd(&strm); - return -1; - } - log_touch(log); - } while (strm.avail_out == 0); - } while (len); - deflateEnd(&strm); - BAIL(5); - - /* find start of empty static block -- scanning backwards the first one - bit is the second bit of the block, if the last byte is zero, then - we know the byte before that has a one in the top bit, since an - empty static block is ten bits long */ - if ((log->first = lseek(log->fd, -1, SEEK_CUR)) < 0 || - read(log->fd, buf, 1) != 1) - return -1; - log->first++; - if (*buf) { - log->back = 1; - while ((*buf & ((uint)1 << (8 - log->back++))) == 0) - ; /* guaranteed to terminate, since *buf != 0 */ - } - else - log->back = 10; - - /* update compressed crc and length */ - log->ccrc = log->tcrc; - log->clen = log->tlen; - } - else { - /* no data to compress -- fix up existing gzip stream */ - log->tcrc = log->ccrc; - log->tlen = log->clen; - } - - /* complete and truncate gzip stream */ - log->last = log->first; - log->stored = 0; - PUT4(buf, log->tcrc); - PUT4(buf + 4, log->tlen); - if (log_last(log, 1) || write(log->fd, buf, 8) != 8 || - (end = lseek(log->fd, 0, SEEK_CUR)) < 0 || ftruncate(log->fd, end)) - return -1; - BAIL(6); - - /* mark as being in the replace operation */ - if (log_mark(log, REPLACE_OP)) - return -1; - - /* execute the replace operation and mark the file as done */ - return log_replace(log); -} - -/* log a repair record to the .repairs file */ -local void log_log(struct log *log, int op, char *record) -{ - time_t now; - FILE *rec; - - now = time(NULL); - strcpy(log->end, ".repairs"); - rec = fopen(log->path, "a"); - if (rec == NULL) - return; - fprintf(rec, "%.24s %s recovery: %s\n", ctime(&now), op == APPEND_OP ? - "append" : (op == COMPRESS_OP ? "compress" : "replace"), record); - fclose(rec); - return; -} - -/* Recover the interrupted operation op. First read foo.add for recovering an - append or compress operation. Return -1 if there was an error reading or - writing foo.gz or reading an existing foo.add, or -2 if there was a memory - allocation failure. */ -local int log_recover(struct log *log, int op) -{ - int fd, ret = 0; - unsigned char *data = NULL; - size_t len = 0; - struct stat st; - - /* log recovery */ - log_log(log, op, "start"); - - /* load foo.add file if expected and present */ - if (op == APPEND_OP || op == COMPRESS_OP) { - strcpy(log->end, ".add"); - if (stat(log->path, &st) == 0 && st.st_size) { - len = (size_t)(st.st_size); - if ((off_t)len != st.st_size || - (data = malloc(st.st_size)) == NULL) { - log_log(log, op, "allocation failure"); - return -2; - } - if ((fd = open(log->path, O_RDONLY, 0)) < 0) { - free(data); - log_log(log, op, ".add file read failure"); - return -1; - } - ret = (size_t)read(fd, data, len) != len; - close(fd); - if (ret) { - free(data); - log_log(log, op, ".add file read failure"); - return -1; - } - log_log(log, op, "loaded .add file"); - } - else - log_log(log, op, "missing .add file!"); - } - - /* recover the interrupted operation */ - switch (op) { - case APPEND_OP: - ret = log_append(log, data, len); - break; - case COMPRESS_OP: - ret = log_compress(log, data, len); - break; - case REPLACE_OP: - ret = log_replace(log); - } - - /* log status */ - log_log(log, op, ret ? "failure" : "complete"); - - /* clean up */ - if (data != NULL) - free(data); - return ret; -} - -/* Close the foo.gz file (if open) and release the lock. */ -local void log_close(struct log *log) -{ - if (log->fd >= 0) - close(log->fd); - log->fd = -1; - log_unlock(log); -} - -/* Open foo.gz, verify the header, and load the extra field contents, after - first creating the foo.lock file to gain exclusive access to the foo.* - files. If foo.gz does not exist or is empty, then write the initial header, - extra, and body content of an empty foo.gz log file. If there is an error - creating the lock file due to access restrictions, or an error reading or - writing the foo.gz file, or if the foo.gz file is not a proper log file for - this object (e.g. not a gzip file or does not contain the expected extra - field), then return true. If there is an error, the lock is released. - Otherwise, the lock is left in place. */ -local int log_open(struct log *log) -{ - int op; - - /* release open file resource if left over -- can occur if lock lost - between gzlog_open() and gzlog_write() */ - if (log->fd >= 0) - close(log->fd); - log->fd = -1; - - /* negotiate exclusive access */ - if (log_lock(log) < 0) - return -1; - - /* open the log file, foo.gz */ - strcpy(log->end, ".gz"); - log->fd = open(log->path, O_RDWR | O_CREAT, 0644); - if (log->fd < 0) { - log_close(log); - return -1; - } - - /* if new, initialize foo.gz with an empty log, delete old dictionary */ - if (lseek(log->fd, 0, SEEK_END) == 0) { - if (write(log->fd, log_gzhead, HEAD) != HEAD || - write(log->fd, log_gzext, EXTRA) != EXTRA || - write(log->fd, log_gzbody, BODY) != BODY) { - log_close(log); - return -1; - } - strcpy(log->end, ".dict"); - unlink(log->path); - } - - /* verify log file and load extra field information */ - if ((op = log_head(log)) < 0) { - log_close(log); - return -1; - } - - /* check for interrupted process and if so, recover */ - if (op != NO_OP && log_recover(log, op)) { - log_close(log); - return -1; - } - - /* touch the lock file to prevent another process from grabbing it */ - log_touch(log); - return 0; -} - -/* See gzlog.h for the description of the external methods below */ -gzlog *gzlog_open(char *path) -{ - size_t n; - struct log *log; - - /* check arguments */ - if (path == NULL || *path == 0) - return NULL; - - /* allocate and initialize log structure */ - log = malloc(sizeof(struct log)); - if (log == NULL) - return NULL; - strcpy(log->id, LOGID); - log->fd = -1; - - /* save path and end of path for name construction */ - n = strlen(path); - log->path = malloc(n + 9); /* allow for ".repairs" */ - if (log->path == NULL) { - free(log); - return NULL; - } - strcpy(log->path, path); - log->end = log->path + n; - - /* gain exclusive access and verify log file -- may perform a - recovery operation if needed */ - if (log_open(log)) { - free(log->path); - free(log); - return NULL; - } - - /* return pointer to log structure */ - return log; -} - -/* gzlog_compress() return values: - 0: all good - -1: file i/o error (usually access issue) - -2: memory allocation failure - -3: invalid log pointer argument */ -int gzlog_compress(gzlog *logd) -{ - int fd, ret; - uint block; - size_t len, next; - unsigned char *data, buf[5]; - struct log *log = logd; - - /* check arguments */ - if (log == NULL || strcmp(log->id, LOGID)) - return -3; - - /* see if we lost the lock -- if so get it again and reload the extra - field information (it probably changed), recover last operation if - necessary */ - if (log_check(log) && log_open(log)) - return -1; - - /* create space for uncompressed data */ - len = ((size_t)(log->last - log->first) & ~(((size_t)1 << 10) - 1)) + - log->stored; - if ((data = malloc(len)) == NULL) - return -2; - - /* do statement here is just a cheap trick for error handling */ - do { - /* read in the uncompressed data */ - if (lseek(log->fd, log->first - 1, SEEK_SET) < 0) - break; - next = 0; - while (next < len) { - if (read(log->fd, buf, 5) != 5) - break; - block = PULL2(buf + 1); - if (next + block > len || - read(log->fd, (char *)data + next, block) != block) - break; - next += block; - } - if (lseek(log->fd, 0, SEEK_CUR) != log->last + 4 + log->stored) - break; - log_touch(log); - - /* write the uncompressed data to the .add file */ - strcpy(log->end, ".add"); - fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd < 0) - break; - ret = (size_t)write(fd, data, len) != len; - if (ret | close(fd)) - break; - log_touch(log); - - /* write the dictionary for the next compress to the .temp file */ - strcpy(log->end, ".temp"); - fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd < 0) - break; - next = DICT > len ? len : DICT; - ret = (size_t)write(fd, (char *)data + len - next, next) != next; - if (ret | close(fd)) - break; - log_touch(log); - - /* roll back to compressed data, mark the compress in progress */ - log->last = log->first; - log->stored = 0; - if (log_mark(log, COMPRESS_OP)) - break; - BAIL(7); - - /* compress and append the data (clears mark) */ - ret = log_compress(log, data, len); - free(data); - return ret; - } while (0); - - /* broke out of do above on i/o error */ - free(data); - return -1; -} - -/* gzlog_write() return values: - 0: all good - -1: file i/o error (usually access issue) - -2: memory allocation failure - -3: invalid log pointer argument */ -int gzlog_write(gzlog *logd, void *data, size_t len) -{ - int fd, ret; - struct log *log = logd; - - /* check arguments */ - if (log == NULL || strcmp(log->id, LOGID)) - return -3; - if (data == NULL || len <= 0) - return 0; - - /* see if we lost the lock -- if so get it again and reload the extra - field information (it probably changed), recover last operation if - necessary */ - if (log_check(log) && log_open(log)) - return -1; - - /* create and write .add file */ - strcpy(log->end, ".add"); - fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd < 0) - return -1; - ret = (size_t)write(fd, data, len) != len; - if (ret | close(fd)) - return -1; - log_touch(log); - - /* mark log file with append in progress */ - if (log_mark(log, APPEND_OP)) - return -1; - BAIL(8); - - /* append data (clears mark) */ - if (log_append(log, data, len)) - return -1; - - /* check to see if it's time to compress -- if not, then done */ - if (((log->last - log->first) >> 10) + (log->stored >> 10) < TRIGGER) - return 0; - - /* time to compress */ - return gzlog_compress(log); -} - -/* gzlog_close() return values: - 0: ok - -3: invalid log pointer argument */ -int gzlog_close(gzlog *logd) -{ - struct log *log = logd; - - /* check arguments */ - if (log == NULL || strcmp(log->id, LOGID)) - return -3; - - /* close the log file and release the lock */ - log_close(log); - - /* free structure and return */ - if (log->path != NULL) - free(log->path); - strcpy(log->id, "bad"); - free(log); - return 0; -} diff --git a/thirdparty/zlib-1.2.12/examples/gzlog.h b/thirdparty/zlib-1.2.12/examples/gzlog.h deleted file mode 100644 index 86f0cec..0000000 --- a/thirdparty/zlib-1.2.12/examples/gzlog.h +++ /dev/null @@ -1,91 +0,0 @@ -/* gzlog.h - Copyright (C) 2004, 2008, 2012 Mark Adler, all rights reserved - version 2.2, 14 Aug 2012 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Mark Adler madler@alumni.caltech.edu - */ - -/* Version History: - 1.0 26 Nov 2004 First version - 2.0 25 Apr 2008 Complete redesign for recovery of interrupted operations - Interface changed slightly in that now path is a prefix - Compression now occurs as needed during gzlog_write() - gzlog_write() now always leaves the log file as valid gzip - 2.1 8 Jul 2012 Fix argument checks in gzlog_compress() and gzlog_write() - 2.2 14 Aug 2012 Clean up signed comparisons - */ - -/* - The gzlog object allows writing short messages to a gzipped log file, - opening the log file locked for small bursts, and then closing it. The log - object works by appending stored (uncompressed) data to the gzip file until - 1 MB has been accumulated. At that time, the stored data is compressed, and - replaces the uncompressed data in the file. The log file is truncated to - its new size at that time. After each write operation, the log file is a - valid gzip file that can decompressed to recover what was written. - - The gzlog operations can be interupted at any point due to an application or - system crash, and the log file will be recovered the next time the log is - opened with gzlog_open(). - */ - -#ifndef GZLOG_H -#define GZLOG_H - -/* gzlog object type */ -typedef void gzlog; - -/* Open a gzlog object, creating the log file if it does not exist. Return - NULL on error. Note that gzlog_open() could take a while to complete if it - has to wait to verify that a lock is stale (possibly for five minutes), or - if there is significant contention with other instantiations of this object - when locking the resource. path is the prefix of the file names created by - this object. If path is "foo", then the log file will be "foo.gz", and - other auxiliary files will be created and destroyed during the process: - "foo.dict" for a compression dictionary, "foo.temp" for a temporary (next) - dictionary, "foo.add" for data being added or compressed, "foo.lock" for the - lock file, and "foo.repairs" to log recovery operations performed due to - interrupted gzlog operations. A gzlog_open() followed by a gzlog_close() - will recover a previously interrupted operation, if any. */ -gzlog *gzlog_open(char *path); - -/* Write to a gzlog object. Return zero on success, -1 if there is a file i/o - error on any of the gzlog files (this should not happen if gzlog_open() - succeeded, unless the device has run out of space or leftover auxiliary - files have permissions or ownership that prevent their use), -2 if there is - a memory allocation failure, or -3 if the log argument is invalid (e.g. if - it was not created by gzlog_open()). This function will write data to the - file uncompressed, until 1 MB has been accumulated, at which time that data - will be compressed. The log file will be a valid gzip file upon successful - return. */ -int gzlog_write(gzlog *log, void *data, size_t len); - -/* Force compression of any uncompressed data in the log. This should be used - sparingly, if at all. The main application would be when a log file will - not be appended to again. If this is used to compress frequently while - appending, it will both significantly increase the execution time and - reduce the compression ratio. The return codes are the same as for - gzlog_write(). */ -int gzlog_compress(gzlog *log); - -/* Close a gzlog object. Return zero on success, -3 if the log argument is - invalid. The log object is freed, and so cannot be referenced again. */ -int gzlog_close(gzlog *log); - -#endif diff --git a/thirdparty/zlib-1.2.12/examples/gznorm.c b/thirdparty/zlib-1.2.12/examples/gznorm.c deleted file mode 100644 index 68e0a0f..0000000 --- a/thirdparty/zlib-1.2.12/examples/gznorm.c +++ /dev/null @@ -1,470 +0,0 @@ -/* gznorm.c -- normalize a gzip stream - * Copyright (C) 2018 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * Version 1.0 7 Oct 2018 Mark Adler */ - -// gznorm takes a gzip stream, potentially containing multiple members, and -// converts it to a gzip stream with a single member. In addition the gzip -// header is normalized, removing the file name and time stamp, and setting the -// other header contents (XFL, OS) to fixed values. gznorm does not recompress -// the data, so it is fast, but no advantage is gained from the history that -// could be available across member boundaries. - -#include // fread, fwrite, putc, fflush, ferror, fprintf, - // vsnprintf, stdout, stderr, NULL, FILE -#include // malloc, free -#include // strerror -#include // errno -#include // va_list, va_start, va_end -#include "zlib.h" // inflateInit2, inflate, inflateReset, inflateEnd, - // z_stream, z_off_t, crc32_combine, Z_NULL, Z_BLOCK, - // Z_OK, Z_STREAM_END, Z_BUF_ERROR, Z_DATA_ERROR, - // Z_MEM_ERROR - -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) -# include -# include -# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) -#else -# define SET_BINARY_MODE(file) -#endif - -#define local static - -// printf to an allocated string. Return the string, or NULL if the printf or -// allocation fails. -local char *aprintf(char *fmt, ...) { - // Get the length of the result of the printf. - va_list args; - va_start(args, fmt); - int len = vsnprintf(NULL, 0, fmt, args); - va_end(args); - if (len < 0) - return NULL; - - // Allocate the required space and printf to it. - char *str = malloc(len + 1); - if (str == NULL) - return NULL; - va_start(args, fmt); - vsnprintf(str, len + 1, fmt, args); - va_end(args); - return str; -} - -// Return with an error, putting an allocated error message in *err. Doing an -// inflateEnd() on an already ended state, or one with state set to Z_NULL, is -// permitted. -#define BYE(...) \ - do { \ - inflateEnd(&strm); \ - *err = aprintf(__VA_ARGS__); \ - return 1; \ - } while (0) - -// Chunk size for buffered reads and for decompression. Twice this many bytes -// will be allocated on the stack by gzip_normalize(). Must fit in an unsigned. -#define CHUNK 16384 - -// Read a gzip stream from in and write an equivalent normalized gzip stream to -// out. If given no input, an empty gzip stream will be written. If successful, -// 0 is returned, and *err is set to NULL. On error, 1 is returned, where the -// details of the error are returned in *err, a pointer to an allocated string. -// -// The input may be a stream with multiple gzip members, which is converted to -// a single gzip member on the output. Each gzip member is decompressed at the -// level of deflate blocks. This enables clearing the last-block bit, shifting -// the compressed data to concatenate to the previous member's compressed data, -// which can end at an arbitrary bit boundary, and identifying stored blocks in -// order to resynchronize those to byte boundaries. The deflate compressed data -// is terminated with a 10-bit empty fixed block. If any members on the input -// end with a 10-bit empty fixed block, then that block is excised from the -// stream. This avoids appending empty fixed blocks for every normalization, -// and assures that gzip_normalize applied a second time will not change the -// input. The pad bits after stored block headers and after the final deflate -// block are all forced to zeros. -local int gzip_normalize(FILE *in, FILE *out, char **err) { - // initialize the inflate engine to process a gzip member - z_stream strm; - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - if (inflateInit2(&strm, 15 + 16) != Z_OK) - BYE("out of memory"); - - // State while processing the input gzip stream. - enum { // BETWEEN -> HEAD -> BLOCK -> TAIL -> BETWEEN -> ... - BETWEEN, // between gzip members (must end in this state) - HEAD, // reading a gzip header - BLOCK, // reading deflate blocks - TAIL // reading a gzip trailer - } state = BETWEEN; // current component being processed - unsigned long crc = 0; // accumulated CRC of uncompressed data - unsigned long len = 0; // accumulated length of uncompressed data - unsigned long buf = 0; // deflate stream bit buffer of num bits - int num = 0; // number of bits in buf (at bottom) - - // Write a canonical gzip header (no mod time, file name, comment, extra - // block, or extra flags, and OS is marked as unknown). - fwrite("\x1f\x8b\x08\0\0\0\0\0\0\xff", 1, 10, out); - - // Process the gzip stream from in until reaching the end of the input, - // encountering invalid input, or experiencing an i/o error. - int more; // true if not at the end of the input - do { - // State inside this loop. - unsigned char *put; // next input buffer location to process - int prev; // number of bits from previous block in - // the bit buffer, or -1 if not at the - // start of a block - unsigned long long memb; // uncompressed length of member - size_t tail; // number of trailer bytes read (0..8) - unsigned long part; // accumulated trailer component - - // Get the next chunk of input from in. - unsigned char dat[CHUNK]; - strm.avail_in = fread(dat, 1, CHUNK, in); - if (strm.avail_in == 0) - break; - more = strm.avail_in == CHUNK; - strm.next_in = put = dat; - - // Run that chunk of input through the inflate engine to exhaustion. - do { - // At this point it is assured that strm.avail_in > 0. - - // Inflate until the end of a gzip component (header, deflate - // block, trailer) is reached, or until all of the chunk is - // consumed. The resulting decompressed data is discarded, though - // the total size of the decompressed data in each member is - // tracked, for the calculation of the total CRC. - do { - // inflate and handle any errors - unsigned char scrap[CHUNK]; - strm.avail_out = CHUNK; - strm.next_out = scrap; - int ret = inflate(&strm, Z_BLOCK); - if (ret == Z_MEM_ERROR) - BYE("out of memory"); - if (ret == Z_DATA_ERROR) - BYE("input invalid: %s", strm.msg); - if (ret != Z_OK && ret != Z_BUF_ERROR && ret != Z_STREAM_END) - BYE("internal error"); - - // Update the number of uncompressed bytes generated in this - // member. The actual count (not modulo 2^32) is required to - // correctly compute the total CRC. - unsigned got = CHUNK - strm.avail_out; - memb += got; - if (memb < got) - BYE("overflow error"); - - // Continue to process this chunk until it is consumed, or - // until the end of a component (header, deflate block, or - // trailer) is reached. - } while (strm.avail_out == 0 && (strm.data_type & 0x80) == 0); - - // Since strm.avail_in was > 0 for the inflate call, some input was - // just consumed. It is therefore assured that put < strm.next_in. - - // Disposition the consumed component or part of a component. - switch (state) { - case BETWEEN: - state = HEAD; - // Fall through to HEAD when some or all of the header is - // processed. - - case HEAD: - // Discard the header. - if (strm.data_type & 0x80) { - // End of header reached -- deflate blocks follow. - put = strm.next_in; - prev = num; - memb = 0; - state = BLOCK; - } - break; - - case BLOCK: - // Copy the deflate stream to the output, but with the - // last-block-bit cleared. Re-synchronize stored block - // headers to the output byte boundaries. The bytes at - // put..strm.next_in-1 is the compressed data that has been - // processed and is ready to be copied to the output. - - // At this point, it is assured that new compressed data is - // available, i.e., put < strm.next_in. If prev is -1, then - // that compressed data starts in the middle of a deflate - // block. If prev is not -1, then the bits in the bit - // buffer, possibly combined with the bits in *put, contain - // the three-bit header of the new deflate block. In that - // case, prev is the number of bits from the previous block - // that remain in the bit buffer. Since num is the number - // of bits in the bit buffer, we have that num - prev is - // the number of bits from the new block currently in the - // bit buffer. - - // If strm.data_type & 0xc0 is 0x80, then the last byte of - // the available compressed data includes the last bits of - // the end of a deflate block. In that case, that last byte - // also has strm.data_type & 0x1f bits of the next deflate - // block, in the range 0..7. If strm.data_type & 0xc0 is - // 0xc0, then the last byte of the compressed data is the - // end of the deflate stream, followed by strm.data_type & - // 0x1f pad bits, also in the range 0..7. - - // Set bits to the number of bits not yet consumed from the - // last byte. If we are at the end of the block, bits is - // either the number of bits in the last byte belonging to - // the next block, or the number of pad bits after the - // final block. In either of those cases, bits is in the - // range 0..7. - ; // (required due to C syntax oddity) - int bits = strm.data_type & 0x1f; - - if (prev != -1) { - // We are at the start of a new block. Clear the last - // block bit, and check for special cases. If it is a - // stored block, then emit the header and pad to the - // next byte boundary. If it is a final, empty fixed - // block, then excise it. - - // Some or all of the three header bits for this block - // may already be in the bit buffer. Load any remaining - // header bits into the bit buffer. - if (num - prev < 3) { - buf += (unsigned long)*put++ << num; - num += 8; - } - - // Set last to have a 1 in the position of the last - // block bit in the bit buffer. - unsigned long last = (unsigned long)1 << prev; - - if (((buf >> prev) & 7) == 3) { - // This is a final fixed block. Load at least ten - // bits from this block, including the header, into - // the bit buffer. We already have at least three, - // so at most one more byte needs to be loaded. - if (num - prev < 10) { - if (put == strm.next_in) - // Need to go get and process more input. - // We'll end up back here to finish this. - break; - buf += (unsigned long)*put++ << num; - num += 8; - } - if (((buf >> prev) & 0x3ff) == 3) { - // That final fixed block is empty. Delete it - // to avoid adding an empty block every time a - // gzip stream is normalized. - num = prev; - buf &= last - 1; // zero the pad bits - } - } - else if (((buf >> prev) & 6) == 0) { - // This is a stored block. Flush to the next - // byte boundary after the three-bit header. - num = (prev + 10) & ~7; - buf &= last - 1; // zero the pad bits - } - - // Clear the last block bit. - buf &= ~last; - - // Write out complete bytes in the bit buffer. - while (num >= 8) { - putc(buf, out); - buf >>= 8; - num -= 8; - } - - // If no more bytes left to process, then we have - // consumed the byte that had bits from the next block. - if (put == strm.next_in) - bits = 0; - } - - // We are done handling the deflate block header. Now copy - // all or almost all of the remaining compressed data that - // has been processed so far. Don't copy one byte at the - // end if it contains bits from the next deflate block or - // pad bits at the end of a deflate block. - - // mix is 1 if we are at the end of a deflate block, and if - // some of the bits in the last byte follow this block. mix - // is 0 if we are in the middle of a deflate block, if the - // deflate block ended on a byte boundary, or if all of the - // compressed data processed so far has been consumed. - int mix = (strm.data_type & 0x80) && bits; - - // Copy all of the processed compressed data to the output, - // except for the last byte if it contains bits from the - // next deflate block or pad bits at the end of the deflate - // stream. Copy the data after shifting in num bits from - // buf in front of it, leaving num bits from the end of the - // compressed data in buf when done. - unsigned char *end = strm.next_in - mix; - if (put < end) { - if (num) - // Insert num bits from buf before the data being - // copied. - do { - buf += (unsigned)(*put++) << num; - putc(buf, out); - buf >>= 8; - } while (put < end); - else { - // No shifting needed -- write directly. - fwrite(put, 1, end - put, out); - put = end; - } - } - - // Process the last processed byte if it wasn't written. - if (mix) { - // Load the last byte into the bit buffer. - buf += (unsigned)(*put++) << num; - num += 8; - - if (strm.data_type & 0x40) { - // We are at the end of the deflate stream and - // there are bits pad bits. Discard the pad bits - // and write a byte to the output, if available. - // Leave the num bits left over in buf to prepend - // to the next deflate stream. - num -= bits; - if (num >= 8) { - putc(buf, out); - num -= 8; - buf >>= 8; - } - - // Force the pad bits in the bit buffer to zeros. - buf &= ((unsigned long)1 << num) - 1; - - // Don't need to set prev here since going to TAIL. - } - else - // At the end of an internal deflate block. Leave - // the last byte in the bit buffer to examine on - // the next entry to BLOCK, when more bits from the - // next block will be available. - prev = num - bits; // number of bits in buffer - // from current block - } - - // Don't have a byte left over, so we are in the middle of - // a deflate block, or the deflate block ended on a byte - // boundary. Set prev appropriately for the next entry into - // BLOCK. - else if (strm.data_type & 0x80) - // The block ended on a byte boundary, so no header - // bits are in the bit buffer. - prev = num; - else - // In the middle of a deflate block, so no header here. - prev = -1; - - // Check for the end of the deflate stream. - if ((strm.data_type & 0xc0) == 0xc0) { - // That ends the deflate stream on the input side, the - // pad bits were discarded, and any remaining bits from - // the last block in the stream are saved in the bit - // buffer to prepend to the next stream. Process the - // gzip trailer next. - tail = 0; - part = 0; - state = TAIL; - } - break; - - case TAIL: - // Accumulate available trailer bytes to update the total - // CRC and the total uncompressed length. - do { - part = (part >> 8) + ((unsigned long)(*put++) << 24); - tail++; - if (tail == 4) { - // Update the total CRC. - z_off_t len2 = memb; - if (len2 < 0 || (unsigned long long)len2 != memb) - BYE("overflow error"); - crc = crc ? crc32_combine(crc, part, len2) : part; - part = 0; - } - else if (tail == 8) { - // Update the total uncompressed length. (It's ok - // if this sum is done modulo 2^32.) - len += part; - - // At the end of a member. Set up to inflate an - // immediately following gzip member. (If we made - // it this far, then the trailer was valid.) - if (inflateReset(&strm) != Z_OK) - BYE("internal error"); - state = BETWEEN; - break; - } - } while (put < strm.next_in); - break; - } - - // Process the input buffer until completely consumed. - } while (strm.avail_in > 0); - - // Process input until end of file, invalid input, or i/o error. - } while (more); - - // Done with the inflate engine. - inflateEnd(&strm); - - // Verify the validity of the input. - if (state != BETWEEN) - BYE("input invalid: incomplete gzip stream"); - - // Write the remaining deflate stream bits, followed by a terminating - // deflate fixed block. - buf += (unsigned long)3 << num; - putc(buf, out); - putc(buf >> 8, out); - if (num > 6) - putc(0, out); - - // Write the gzip trailer, which is the CRC and the uncompressed length - // modulo 2^32, both in little-endian order. - putc(crc, out); - putc(crc >> 8, out); - putc(crc >> 16, out); - putc(crc >> 24, out); - putc(len, out); - putc(len >> 8, out); - putc(len >> 16, out); - putc(len >> 24, out); - fflush(out); - - // Check for any i/o errors. - if (ferror(in) || ferror(out)) - BYE("i/o error: %s", strerror(errno)); - - // All good! - *err = NULL; - return 0; -} - -// Normalize the gzip stream on stdin, writing the result to stdout. -int main(void) { - // Avoid end-of-line conversions on evil operating systems. - SET_BINARY_MODE(stdin); - SET_BINARY_MODE(stdout); - - // Normalize from stdin to stdout, returning 1 on error, 0 if ok. - char *err; - int ret = gzip_normalize(stdin, stdout, &err); - if (ret) - fprintf(stderr, "gznorm error: %s\n", err); - free(err); - return ret; -} diff --git a/thirdparty/zlib-1.2.12/examples/zlib_how.html b/thirdparty/zlib-1.2.12/examples/zlib_how.html deleted file mode 100644 index 444ff1c..0000000 --- a/thirdparty/zlib-1.2.12/examples/zlib_how.html +++ /dev/null @@ -1,545 +0,0 @@ - - - - -zlib Usage Example - - - -

      zlib Usage Example

      -We often get questions about how the deflate() and inflate() functions should be used. -Users wonder when they should provide more input, when they should use more output, -what to do with a Z_BUF_ERROR, how to make sure the process terminates properly, and -so on. So for those who have read zlib.h (a few times), and -would like further edification, below is an annotated example in C of simple routines to compress and decompress -from an input file to an output file using deflate() and inflate() respectively. The -annotations are interspersed between lines of the code. So please read between the lines. -We hope this helps explain some of the intricacies of zlib. -

      -Without further adieu, here is the program zpipe.c: -

      
      -/* zpipe.c: example of proper use of zlib's inflate() and deflate()
      -   Not copyrighted -- provided to the public domain
      -   Version 1.4  11 December 2005  Mark Adler */
      -
      -/* Version history:
      -   1.0  30 Oct 2004  First version
      -   1.1   8 Nov 2004  Add void casting for unused return values
      -                     Use switch statement for inflate() return values
      -   1.2   9 Nov 2004  Add assertions to document zlib guarantees
      -   1.3   6 Apr 2005  Remove incorrect assertion in inf()
      -   1.4  11 Dec 2005  Add hack to avoid MSDOS end-of-line conversions
      -                     Avoid some compiler warnings for input and output buffers
      - */
      -
      -We now include the header files for the required definitions. From -stdio.h we use fopen(), fread(), fwrite(), -feof(), ferror(), and fclose() for file i/o, and -fputs() for error messages. From string.h we use -strcmp() for command line argument processing. -From assert.h we use the assert() macro. -From zlib.h -we use the basic compression functions deflateInit(), -deflate(), and deflateEnd(), and the basic decompression -functions inflateInit(), inflate(), and -inflateEnd(). -
      
      -#include <stdio.h>
      -#include <string.h>
      -#include <assert.h>
      -#include "zlib.h"
      -
      -This is an ugly hack required to avoid corruption of the input and output data on -Windows/MS-DOS systems. Without this, those systems would assume that the input and output -files are text, and try to convert the end-of-line characters from one standard to -another. That would corrupt binary data, and in particular would render the compressed data unusable. -This sets the input and output to binary which suppresses the end-of-line conversions. -SET_BINARY_MODE() will be used later on stdin and stdout, at the beginning of main(). -
      
      -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
      -#  include <fcntl.h>
      -#  include <io.h>
      -#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
      -#else
      -#  define SET_BINARY_MODE(file)
      -#endif
      -
      -CHUNK is simply the buffer size for feeding data to and pulling data -from the zlib routines. Larger buffer sizes would be more efficient, -especially for inflate(). If the memory is available, buffers sizes -on the order of 128K or 256K bytes should be used. -
      
      -#define CHUNK 16384
      -
      -The def() routine compresses data from an input file to an output file. The output data -will be in the zlib format, which is different from the gzip or zip -formats. The zlib format has a very small header of only two bytes to identify it as -a zlib stream and to provide decoding information, and a four-byte trailer with a fast -check value to verify the integrity of the uncompressed data after decoding. -
      
      -/* Compress from file source to file dest until EOF on source.
      -   def() returns Z_OK on success, Z_MEM_ERROR if memory could not be
      -   allocated for processing, Z_STREAM_ERROR if an invalid compression
      -   level is supplied, Z_VERSION_ERROR if the version of zlib.h and the
      -   version of the library linked do not match, or Z_ERRNO if there is
      -   an error reading or writing the files. */
      -int def(FILE *source, FILE *dest, int level)
      -{
      -
      -Here are the local variables for def(). ret will be used for zlib -return codes. flush will keep track of the current flushing state for deflate(), -which is either no flushing, or flush to completion after the end of the input file is reached. -have is the amount of data returned from deflate(). The strm structure -is used to pass information to and from the zlib routines, and to maintain the -deflate() state. in and out are the input and output buffers for -deflate(). -
      
      -    int ret, flush;
      -    unsigned have;
      -    z_stream strm;
      -    unsigned char in[CHUNK];
      -    unsigned char out[CHUNK];
      -
      -The first thing we do is to initialize the zlib state for compression using -deflateInit(). This must be done before the first use of deflate(). -The zalloc, zfree, and opaque fields in the strm -structure must be initialized before calling deflateInit(). Here they are -set to the zlib constant Z_NULL to request that zlib use -the default memory allocation routines. An application may also choose to provide -custom memory allocation routines here. deflateInit() will allocate on the -order of 256K bytes for the internal state. -(See zlib Technical Details.) -

      -deflateInit() is called with a pointer to the structure to be initialized and -the compression level, which is an integer in the range of -1 to 9. Lower compression -levels result in faster execution, but less compression. Higher levels result in -greater compression, but slower execution. The zlib constant Z_DEFAULT_COMPRESSION, -equal to -1, -provides a good compromise between compression and speed and is equivalent to level 6. -Level 0 actually does no compression at all, and in fact expands the data slightly to produce -the zlib format (it is not a byte-for-byte copy of the input). -More advanced applications of zlib -may use deflateInit2() here instead. Such an application may want to reduce how -much memory will be used, at some price in compression. Or it may need to request a -gzip header and trailer instead of a zlib header and trailer, or raw -encoding with no header or trailer at all. -

      -We must check the return value of deflateInit() against the zlib constant -Z_OK to make sure that it was able to -allocate memory for the internal state, and that the provided arguments were valid. -deflateInit() will also check that the version of zlib that the zlib.h -file came from matches the version of zlib actually linked with the program. This -is especially important for environments in which zlib is a shared library. -

      -Note that an application can initialize multiple, independent zlib streams, which can -operate in parallel. The state information maintained in the structure allows the zlib -routines to be reentrant. -

      
      -    /* allocate deflate state */
      -    strm.zalloc = Z_NULL;
      -    strm.zfree = Z_NULL;
      -    strm.opaque = Z_NULL;
      -    ret = deflateInit(&strm, level);
      -    if (ret != Z_OK)
      -        return ret;
      -
      -With the pleasantries out of the way, now we can get down to business. The outer do-loop -reads all of the input file and exits at the bottom of the loop once end-of-file is reached. -This loop contains the only call of deflate(). So we must make sure that all of the -input data has been processed and that all of the output data has been generated and consumed -before we fall out of the loop at the bottom. -
      
      -    /* compress until end of file */
      -    do {
      -
      -We start off by reading data from the input file. The number of bytes read is put directly -into avail_in, and a pointer to those bytes is put into next_in. We also -check to see if end-of-file on the input has been reached. If we are at the end of file, then flush is set to the -zlib constant Z_FINISH, which is later passed to deflate() to -indicate that this is the last chunk of input data to compress. We need to use feof() -to check for end-of-file as opposed to seeing if fewer than CHUNK bytes have been read. The -reason is that if the input file length is an exact multiple of CHUNK, we will miss -the fact that we got to the end-of-file, and not know to tell deflate() to finish -up the compressed stream. If we are not yet at the end of the input, then the zlib -constant Z_NO_FLUSH will be passed to deflate to indicate that we are still -in the middle of the uncompressed data. -

      -If there is an error in reading from the input file, the process is aborted with -deflateEnd() being called to free the allocated zlib state before returning -the error. We wouldn't want a memory leak, now would we? deflateEnd() can be called -at any time after the state has been initialized. Once that's done, deflateInit() (or -deflateInit2()) would have to be called to start a new compression process. There is -no point here in checking the deflateEnd() return code. The deallocation can't fail. -

      
      -        strm.avail_in = fread(in, 1, CHUNK, source);
      -        if (ferror(source)) {
      -            (void)deflateEnd(&strm);
      -            return Z_ERRNO;
      -        }
      -        flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
      -        strm.next_in = in;
      -
      -The inner do-loop passes our chunk of input data to deflate(), and then -keeps calling deflate() until it is done producing output. Once there is no more -new output, deflate() is guaranteed to have consumed all of the input, i.e., -avail_in will be zero. -
      
      -        /* run deflate() on input until output buffer not full, finish
      -           compression if all of source has been read in */
      -        do {
      -
      -Output space is provided to deflate() by setting avail_out to the number -of available output bytes and next_out to a pointer to that space. -
      
      -            strm.avail_out = CHUNK;
      -            strm.next_out = out;
      -
      -Now we call the compression engine itself, deflate(). It takes as many of the -avail_in bytes at next_in as it can process, and writes as many as -avail_out bytes to next_out. Those counters and pointers are then -updated past the input data consumed and the output data written. It is the amount of -output space available that may limit how much input is consumed. -Hence the inner loop to make sure that -all of the input is consumed by providing more output space each time. Since avail_in -and next_in are updated by deflate(), we don't have to mess with those -between deflate() calls until it's all used up. -

      -The parameters to deflate() are a pointer to the strm structure containing -the input and output information and the internal compression engine state, and a parameter -indicating whether and how to flush data to the output. Normally deflate will consume -several K bytes of input data before producing any output (except for the header), in order -to accumulate statistics on the data for optimum compression. It will then put out a burst of -compressed data, and proceed to consume more input before the next burst. Eventually, -deflate() -must be told to terminate the stream, complete the compression with provided input data, and -write out the trailer check value. deflate() will continue to compress normally as long -as the flush parameter is Z_NO_FLUSH. Once the Z_FINISH parameter is provided, -deflate() will begin to complete the compressed output stream. However depending on how -much output space is provided, deflate() may have to be called several times until it -has provided the complete compressed stream, even after it has consumed all of the input. The flush -parameter must continue to be Z_FINISH for those subsequent calls. -

      -There are other values of the flush parameter that are used in more advanced applications. You can -force deflate() to produce a burst of output that encodes all of the input data provided -so far, even if it wouldn't have otherwise, for example to control data latency on a link with -compressed data. You can also ask that deflate() do that as well as erase any history up to -that point so that what follows can be decompressed independently, for example for random access -applications. Both requests will degrade compression by an amount depending on how often such -requests are made. -

      -deflate() has a return value that can indicate errors, yet we do not check it here. Why -not? Well, it turns out that deflate() can do no wrong here. Let's go through -deflate()'s return values and dispense with them one by one. The possible values are -Z_OK, Z_STREAM_END, Z_STREAM_ERROR, or Z_BUF_ERROR. Z_OK -is, well, ok. Z_STREAM_END is also ok and will be returned for the last call of -deflate(). This is already guaranteed by calling deflate() with Z_FINISH -until it has no more output. Z_STREAM_ERROR is only possible if the stream is not -initialized properly, but we did initialize it properly. There is no harm in checking for -Z_STREAM_ERROR here, for example to check for the possibility that some -other part of the application inadvertently clobbered the memory containing the zlib state. -Z_BUF_ERROR will be explained further below, but -suffice it to say that this is simply an indication that deflate() could not consume -more input or produce more output. deflate() can be called again with more output space -or more available input, which it will be in this code. -

      
      -            ret = deflate(&strm, flush);    /* no bad return value */
      -            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
      -
      -Now we compute how much output deflate() provided on the last call, which is the -difference between how much space was provided before the call, and how much output space -is still available after the call. Then that data, if any, is written to the output file. -We can then reuse the output buffer for the next call of deflate(). Again if there -is a file i/o error, we call deflateEnd() before returning to avoid a memory leak. -
      
      -            have = CHUNK - strm.avail_out;
      -            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
      -                (void)deflateEnd(&strm);
      -                return Z_ERRNO;
      -            }
      -
      -The inner do-loop is repeated until the last deflate() call fails to fill the -provided output buffer. Then we know that deflate() has done as much as it can with -the provided input, and that all of that input has been consumed. We can then fall out of this -loop and reuse the input buffer. -

      -The way we tell that deflate() has no more output is by seeing that it did not fill -the output buffer, leaving avail_out greater than zero. However suppose that -deflate() has no more output, but just so happened to exactly fill the output buffer! -avail_out is zero, and we can't tell that deflate() has done all it can. -As far as we know, deflate() -has more output for us. So we call it again. But now deflate() produces no output -at all, and avail_out remains unchanged as CHUNK. That deflate() call -wasn't able to do anything, either consume input or produce output, and so it returns -Z_BUF_ERROR. (See, I told you I'd cover this later.) However this is not a problem at -all. Now we finally have the desired indication that deflate() is really done, -and so we drop out of the inner loop to provide more input to deflate(). -

      -With flush set to Z_FINISH, this final set of deflate() calls will -complete the output stream. Once that is done, subsequent calls of deflate() would return -Z_STREAM_ERROR if the flush parameter is not Z_FINISH, and do no more processing -until the state is reinitialized. -

      -Some applications of zlib have two loops that call deflate() -instead of the single inner loop we have here. The first loop would call -without flushing and feed all of the data to deflate(). The second loop would call -deflate() with no more -data and the Z_FINISH parameter to complete the process. As you can see from this -example, that can be avoided by simply keeping track of the current flush state. -

      
      -        } while (strm.avail_out == 0);
      -        assert(strm.avail_in == 0);     /* all input will be used */
      -
      -Now we check to see if we have already processed all of the input file. That information was -saved in the flush variable, so we see if that was set to Z_FINISH. If so, -then we're done and we fall out of the outer loop. We're guaranteed to get Z_STREAM_END -from the last deflate() call, since we ran it until the last chunk of input was -consumed and all of the output was generated. -
      
      -        /* done when last data in file processed */
      -    } while (flush != Z_FINISH);
      -    assert(ret == Z_STREAM_END);        /* stream will be complete */
      -
      -The process is complete, but we still need to deallocate the state to avoid a memory leak -(or rather more like a memory hemorrhage if you didn't do this). Then -finally we can return with a happy return value. -
      
      -    /* clean up and return */
      -    (void)deflateEnd(&strm);
      -    return Z_OK;
      -}
      -
      -Now we do the same thing for decompression in the inf() routine. inf() -decompresses what is hopefully a valid zlib stream from the input file and writes the -uncompressed data to the output file. Much of the discussion above for def() -applies to inf() as well, so the discussion here will focus on the differences between -the two. -
      
      -/* Decompress from file source to file dest until stream ends or EOF.
      -   inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
      -   allocated for processing, Z_DATA_ERROR if the deflate data is
      -   invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
      -   the version of the library linked do not match, or Z_ERRNO if there
      -   is an error reading or writing the files. */
      -int inf(FILE *source, FILE *dest)
      -{
      -
      -The local variables have the same functionality as they do for def(). The -only difference is that there is no flush variable, since inflate() -can tell from the zlib stream itself when the stream is complete. -
      
      -    int ret;
      -    unsigned have;
      -    z_stream strm;
      -    unsigned char in[CHUNK];
      -    unsigned char out[CHUNK];
      -
      -The initialization of the state is the same, except that there is no compression level, -of course, and two more elements of the structure are initialized. avail_in -and next_in must be initialized before calling inflateInit(). This -is because the application has the option to provide the start of the zlib stream in -order for inflateInit() to have access to information about the compression -method to aid in memory allocation. In the current implementation of zlib -(up through versions 1.2.x), the method-dependent memory allocations are deferred to the first call of -inflate() anyway. However those fields must be initialized since later versions -of zlib that provide more compression methods may take advantage of this interface. -In any case, no decompression is performed by inflateInit(), so the -avail_out and next_out fields do not need to be initialized before calling. -

      -Here avail_in is set to zero and next_in is set to Z_NULL to -indicate that no input data is being provided. -

      
      -    /* allocate inflate state */
      -    strm.zalloc = Z_NULL;
      -    strm.zfree = Z_NULL;
      -    strm.opaque = Z_NULL;
      -    strm.avail_in = 0;
      -    strm.next_in = Z_NULL;
      -    ret = inflateInit(&strm);
      -    if (ret != Z_OK)
      -        return ret;
      -
      -The outer do-loop decompresses input until inflate() indicates -that it has reached the end of the compressed data and has produced all of the uncompressed -output. This is in contrast to def() which processes all of the input file. -If end-of-file is reached before the compressed data self-terminates, then the compressed -data is incomplete and an error is returned. -
      
      -    /* decompress until deflate stream ends or end of file */
      -    do {
      -
      -We read input data and set the strm structure accordingly. If we've reached the -end of the input file, then we leave the outer loop and report an error, since the -compressed data is incomplete. Note that we may read more data than is eventually consumed -by inflate(), if the input file continues past the zlib stream. -For applications where zlib streams are embedded in other data, this routine would -need to be modified to return the unused data, or at least indicate how much of the input -data was not used, so the application would know where to pick up after the zlib stream. -
      
      -        strm.avail_in = fread(in, 1, CHUNK, source);
      -        if (ferror(source)) {
      -            (void)inflateEnd(&strm);
      -            return Z_ERRNO;
      -        }
      -        if (strm.avail_in == 0)
      -            break;
      -        strm.next_in = in;
      -
      -The inner do-loop has the same function it did in def(), which is to -keep calling inflate() until has generated all of the output it can with the -provided input. -
      
      -        /* run inflate() on input until output buffer not full */
      -        do {
      -
      -Just like in def(), the same output space is provided for each call of inflate(). -
      
      -            strm.avail_out = CHUNK;
      -            strm.next_out = out;
      -
      -Now we run the decompression engine itself. There is no need to adjust the flush parameter, since -the zlib format is self-terminating. The main difference here is that there are -return values that we need to pay attention to. Z_DATA_ERROR -indicates that inflate() detected an error in the zlib compressed data format, -which means that either the data is not a zlib stream to begin with, or that the data was -corrupted somewhere along the way since it was compressed. The other error to be processed is -Z_MEM_ERROR, which can occur since memory allocation is deferred until inflate() -needs it, unlike deflate(), whose memory is allocated at the start by deflateInit(). -

      -Advanced applications may use -deflateSetDictionary() to prime deflate() with a set of likely data to improve the -first 32K or so of compression. This is noted in the zlib header, so inflate() -requests that that dictionary be provided before it can start to decompress. Without the dictionary, -correct decompression is not possible. For this routine, we have no idea what the dictionary is, -so the Z_NEED_DICT indication is converted to a Z_DATA_ERROR. -

      -inflate() can also return Z_STREAM_ERROR, which should not be possible here, -but could be checked for as noted above for def(). Z_BUF_ERROR does not need to be -checked for here, for the same reasons noted for def(). Z_STREAM_END will be -checked for later. -

      
      -            ret = inflate(&strm, Z_NO_FLUSH);
      -            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
      -            switch (ret) {
      -            case Z_NEED_DICT:
      -                ret = Z_DATA_ERROR;     /* and fall through */
      -            case Z_DATA_ERROR:
      -            case Z_MEM_ERROR:
      -                (void)inflateEnd(&strm);
      -                return ret;
      -            }
      -
      -The output of inflate() is handled identically to that of deflate(). -
      
      -            have = CHUNK - strm.avail_out;
      -            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
      -                (void)inflateEnd(&strm);
      -                return Z_ERRNO;
      -            }
      -
      -The inner do-loop ends when inflate() has no more output as indicated -by not filling the output buffer, just as for deflate(). In this case, we cannot -assert that strm.avail_in will be zero, since the deflate stream may end before the file -does. -
      
      -        } while (strm.avail_out == 0);
      -
      -The outer do-loop ends when inflate() reports that it has reached the -end of the input zlib stream, has completed the decompression and integrity -check, and has provided all of the output. This is indicated by the inflate() -return value Z_STREAM_END. The inner loop is guaranteed to leave ret -equal to Z_STREAM_END if the last chunk of the input file read contained the end -of the zlib stream. So if the return value is not Z_STREAM_END, the -loop continues to read more input. -
      
      -        /* done when inflate() says it's done */
      -    } while (ret != Z_STREAM_END);
      -
      -At this point, decompression successfully completed, or we broke out of the loop due to no -more data being available from the input file. If the last inflate() return value -is not Z_STREAM_END, then the zlib stream was incomplete and a data error -is returned. Otherwise, we return with a happy return value. Of course, inflateEnd() -is called first to avoid a memory leak. -
      
      -    /* clean up and return */
      -    (void)inflateEnd(&strm);
      -    return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
      -}
      -
      -That ends the routines that directly use zlib. The following routines make this -a command-line program by running data through the above routines from stdin to -stdout, and handling any errors reported by def() or inf(). -

      -zerr() is used to interpret the possible error codes from def() -and inf(), as detailed in their comments above, and print out an error message. -Note that these are only a subset of the possible return values from deflate() -and inflate(). -

      
      -/* report a zlib or i/o error */
      -void zerr(int ret)
      -{
      -    fputs("zpipe: ", stderr);
      -    switch (ret) {
      -    case Z_ERRNO:
      -        if (ferror(stdin))
      -            fputs("error reading stdin\n", stderr);
      -        if (ferror(stdout))
      -            fputs("error writing stdout\n", stderr);
      -        break;
      -    case Z_STREAM_ERROR:
      -        fputs("invalid compression level\n", stderr);
      -        break;
      -    case Z_DATA_ERROR:
      -        fputs("invalid or incomplete deflate data\n", stderr);
      -        break;
      -    case Z_MEM_ERROR:
      -        fputs("out of memory\n", stderr);
      -        break;
      -    case Z_VERSION_ERROR:
      -        fputs("zlib version mismatch!\n", stderr);
      -    }
      -}
      -
      -Here is the main() routine used to test def() and inf(). The -zpipe command is simply a compression pipe from stdin to stdout, if -no arguments are given, or it is a decompression pipe if zpipe -d is used. If any other -arguments are provided, no compression or decompression is performed. Instead a usage -message is displayed. Examples are zpipe < foo.txt > foo.txt.z to compress, and -zpipe -d < foo.txt.z > foo.txt to decompress. -
      
      -/* compress or decompress from stdin to stdout */
      -int main(int argc, char **argv)
      -{
      -    int ret;
      -
      -    /* avoid end-of-line conversions */
      -    SET_BINARY_MODE(stdin);
      -    SET_BINARY_MODE(stdout);
      -
      -    /* do compression if no arguments */
      -    if (argc == 1) {
      -        ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION);
      -        if (ret != Z_OK)
      -            zerr(ret);
      -        return ret;
      -    }
      -
      -    /* do decompression if -d specified */
      -    else if (argc == 2 && strcmp(argv[1], "-d") == 0) {
      -        ret = inf(stdin, stdout);
      -        if (ret != Z_OK)
      -            zerr(ret);
      -        return ret;
      -    }
      -
      -    /* otherwise, report usage */
      -    else {
      -        fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr);
      -        return 1;
      -    }
      -}
      -
      -
      -Copyright (c) 2004, 2005 by Mark Adler
      Last modified 11 December 2005
      - - diff --git a/thirdparty/zlib-1.2.12/examples/zpipe.c b/thirdparty/zlib-1.2.12/examples/zpipe.c deleted file mode 100644 index 83535d1..0000000 --- a/thirdparty/zlib-1.2.12/examples/zpipe.c +++ /dev/null @@ -1,205 +0,0 @@ -/* zpipe.c: example of proper use of zlib's inflate() and deflate() - Not copyrighted -- provided to the public domain - Version 1.4 11 December 2005 Mark Adler */ - -/* Version history: - 1.0 30 Oct 2004 First version - 1.1 8 Nov 2004 Add void casting for unused return values - Use switch statement for inflate() return values - 1.2 9 Nov 2004 Add assertions to document zlib guarantees - 1.3 6 Apr 2005 Remove incorrect assertion in inf() - 1.4 11 Dec 2005 Add hack to avoid MSDOS end-of-line conversions - Avoid some compiler warnings for input and output buffers - */ - -#include -#include -#include -#include "zlib.h" - -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) -# include -# include -# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) -#else -# define SET_BINARY_MODE(file) -#endif - -#define CHUNK 16384 - -/* Compress from file source to file dest until EOF on source. - def() returns Z_OK on success, Z_MEM_ERROR if memory could not be - allocated for processing, Z_STREAM_ERROR if an invalid compression - level is supplied, Z_VERSION_ERROR if the version of zlib.h and the - version of the library linked do not match, or Z_ERRNO if there is - an error reading or writing the files. */ -int def(FILE *source, FILE *dest, int level) -{ - int ret, flush; - unsigned have; - z_stream strm; - unsigned char in[CHUNK]; - unsigned char out[CHUNK]; - - /* allocate deflate state */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - ret = deflateInit(&strm, level); - if (ret != Z_OK) - return ret; - - /* compress until end of file */ - do { - strm.avail_in = fread(in, 1, CHUNK, source); - if (ferror(source)) { - (void)deflateEnd(&strm); - return Z_ERRNO; - } - flush = feof(source) ? Z_FINISH : Z_NO_FLUSH; - strm.next_in = in; - - /* run deflate() on input until output buffer not full, finish - compression if all of source has been read in */ - do { - strm.avail_out = CHUNK; - strm.next_out = out; - ret = deflate(&strm, flush); /* no bad return value */ - assert(ret != Z_STREAM_ERROR); /* state not clobbered */ - have = CHUNK - strm.avail_out; - if (fwrite(out, 1, have, dest) != have || ferror(dest)) { - (void)deflateEnd(&strm); - return Z_ERRNO; - } - } while (strm.avail_out == 0); - assert(strm.avail_in == 0); /* all input will be used */ - - /* done when last data in file processed */ - } while (flush != Z_FINISH); - assert(ret == Z_STREAM_END); /* stream will be complete */ - - /* clean up and return */ - (void)deflateEnd(&strm); - return Z_OK; -} - -/* Decompress from file source to file dest until stream ends or EOF. - inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be - allocated for processing, Z_DATA_ERROR if the deflate data is - invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and - the version of the library linked do not match, or Z_ERRNO if there - is an error reading or writing the files. */ -int inf(FILE *source, FILE *dest) -{ - int ret; - unsigned have; - z_stream strm; - unsigned char in[CHUNK]; - unsigned char out[CHUNK]; - - /* allocate inflate state */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit(&strm); - if (ret != Z_OK) - return ret; - - /* decompress until deflate stream ends or end of file */ - do { - strm.avail_in = fread(in, 1, CHUNK, source); - if (ferror(source)) { - (void)inflateEnd(&strm); - return Z_ERRNO; - } - if (strm.avail_in == 0) - break; - strm.next_in = in; - - /* run inflate() on input until output buffer not full */ - do { - strm.avail_out = CHUNK; - strm.next_out = out; - ret = inflate(&strm, Z_NO_FLUSH); - assert(ret != Z_STREAM_ERROR); /* state not clobbered */ - switch (ret) { - case Z_NEED_DICT: - ret = Z_DATA_ERROR; /* and fall through */ - case Z_DATA_ERROR: - case Z_MEM_ERROR: - (void)inflateEnd(&strm); - return ret; - } - have = CHUNK - strm.avail_out; - if (fwrite(out, 1, have, dest) != have || ferror(dest)) { - (void)inflateEnd(&strm); - return Z_ERRNO; - } - } while (strm.avail_out == 0); - - /* done when inflate() says it's done */ - } while (ret != Z_STREAM_END); - - /* clean up and return */ - (void)inflateEnd(&strm); - return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR; -} - -/* report a zlib or i/o error */ -void zerr(int ret) -{ - fputs("zpipe: ", stderr); - switch (ret) { - case Z_ERRNO: - if (ferror(stdin)) - fputs("error reading stdin\n", stderr); - if (ferror(stdout)) - fputs("error writing stdout\n", stderr); - break; - case Z_STREAM_ERROR: - fputs("invalid compression level\n", stderr); - break; - case Z_DATA_ERROR: - fputs("invalid or incomplete deflate data\n", stderr); - break; - case Z_MEM_ERROR: - fputs("out of memory\n", stderr); - break; - case Z_VERSION_ERROR: - fputs("zlib version mismatch!\n", stderr); - } -} - -/* compress or decompress from stdin to stdout */ -int main(int argc, char **argv) -{ - int ret; - - /* avoid end-of-line conversions */ - SET_BINARY_MODE(stdin); - SET_BINARY_MODE(stdout); - - /* do compression if no arguments */ - if (argc == 1) { - ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION); - if (ret != Z_OK) - zerr(ret); - return ret; - } - - /* do decompression if -d specified */ - else if (argc == 2 && strcmp(argv[1], "-d") == 0) { - ret = inf(stdin, stdout); - if (ret != Z_OK) - zerr(ret); - return ret; - } - - /* otherwise, report usage */ - else { - fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr); - return 1; - } -} diff --git a/thirdparty/zlib-1.2.12/examples/zran.c b/thirdparty/zlib-1.2.12/examples/zran.c deleted file mode 100644 index f279db7..0000000 --- a/thirdparty/zlib-1.2.12/examples/zran.c +++ /dev/null @@ -1,479 +0,0 @@ -/* zran.c -- example of zlib/gzip stream indexing and random access - * Copyright (C) 2005, 2012, 2018 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * Version 1.2 14 Oct 2018 Mark Adler */ - -/* Version History: - 1.0 29 May 2005 First version - 1.1 29 Sep 2012 Fix memory reallocation error - 1.2 14 Oct 2018 Handle gzip streams with multiple members - Add a header file to facilitate usage in applications - */ - -/* Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary() - for random access of a compressed file. A file containing a zlib or gzip - stream is provided on the command line. The compressed stream is decoded in - its entirety, and an index built with access points about every SPAN bytes - in the uncompressed output. The compressed file is left open, and can then - be read randomly, having to decompress on the average SPAN/2 uncompressed - bytes before getting to the desired block of data. - - An access point can be created at the start of any deflate block, by saving - the starting file offset and bit of that block, and the 32K bytes of - uncompressed data that precede that block. Also the uncompressed offset of - that block is saved to provide a referece for locating a desired starting - point in the uncompressed stream. deflate_index_build() works by - decompressing the input zlib or gzip stream a block at a time, and at the - end of each block deciding if enough uncompressed data has gone by to - justify the creation of a new access point. If so, that point is saved in a - data structure that grows as needed to accommodate the points. - - To use the index, an offset in the uncompressed data is provided, for which - the latest access point at or preceding that offset is located in the index. - The input file is positioned to the specified location in the index, and if - necessary the first few bits of the compressed data is read from the file. - inflate is initialized with those bits and the 32K of uncompressed data, and - the decompression then proceeds until the desired offset in the file is - reached. Then the decompression continues to read the desired uncompressed - data from the file. - - Another approach would be to generate the index on demand. In that case, - requests for random access reads from the compressed data would try to use - the index, but if a read far enough past the end of the index is required, - then further index entries would be generated and added. - - There is some fair bit of overhead to starting inflation for the random - access, mainly copying the 32K byte dictionary. So if small pieces of the - file are being accessed, it would make sense to implement a cache to hold - some lookahead and avoid many calls to deflate_index_extract() for small - lengths. - - Another way to build an index would be to use inflateCopy(). That would - not be constrained to have access points at block boundaries, but requires - more memory per access point, and also cannot be saved to file due to the - use of pointers in the state. The approach here allows for storage of the - index in a file. - */ - -#include -#include -#include -#include "zlib.h" -#include "zran.h" - -#define WINSIZE 32768U /* sliding window size */ -#define CHUNK 16384 /* file input buffer size */ - -/* Access point entry. */ -struct point { - off_t out; /* corresponding offset in uncompressed data */ - off_t in; /* offset in input file of first full byte */ - int bits; /* number of bits (1-7) from byte at in-1, or 0 */ - unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */ -}; - -/* See comments in zran.h. */ -void deflate_index_free(struct deflate_index *index) -{ - if (index != NULL) { - free(index->list); - free(index); - } -} - -/* Add an entry to the access point list. If out of memory, deallocate the - existing list and return NULL. index->gzip is the allocated size of the - index in point entries, until it is time for deflate_index_build() to - return, at which point gzip is set to indicate a gzip file or not. - */ -static struct deflate_index *addpoint(struct deflate_index *index, int bits, - off_t in, off_t out, unsigned left, - unsigned char *window) -{ - struct point *next; - - /* if list is empty, create it (start with eight points) */ - if (index == NULL) { - index = malloc(sizeof(struct deflate_index)); - if (index == NULL) return NULL; - index->list = malloc(sizeof(struct point) << 3); - if (index->list == NULL) { - free(index); - return NULL; - } - index->gzip = 8; - index->have = 0; - } - - /* if list is full, make it bigger */ - else if (index->have == index->gzip) { - index->gzip <<= 1; - next = realloc(index->list, sizeof(struct point) * index->gzip); - if (next == NULL) { - deflate_index_free(index); - return NULL; - } - index->list = next; - } - - /* fill in entry and increment how many we have */ - next = (struct point *)(index->list) + index->have; - next->bits = bits; - next->in = in; - next->out = out; - if (left) - memcpy(next->window, window + WINSIZE - left, left); - if (left < WINSIZE) - memcpy(next->window + left, window, WINSIZE - left); - index->have++; - - /* return list, possibly reallocated */ - return index; -} - -/* See comments in zran.h. */ -int deflate_index_build(FILE *in, off_t span, struct deflate_index **built) -{ - int ret; - int gzip = 0; /* true if reading a gzip file */ - off_t totin, totout; /* our own total counters to avoid 4GB limit */ - off_t last; /* totout value of last access point */ - struct deflate_index *index; /* access points being generated */ - z_stream strm; - unsigned char input[CHUNK]; - unsigned char window[WINSIZE]; - - /* initialize inflate */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, 47); /* automatic zlib or gzip decoding */ - if (ret != Z_OK) - return ret; - - /* inflate the input, maintain a sliding window, and build an index -- this - also validates the integrity of the compressed data using the check - information in the gzip or zlib stream */ - totin = totout = last = 0; - index = NULL; /* will be allocated by first addpoint() */ - strm.avail_out = 0; - do { - /* get some compressed data from input file */ - strm.avail_in = fread(input, 1, CHUNK, in); - if (ferror(in)) { - ret = Z_ERRNO; - goto deflate_index_build_error; - } - if (strm.avail_in == 0) { - ret = Z_DATA_ERROR; - goto deflate_index_build_error; - } - strm.next_in = input; - - /* check for a gzip stream */ - if (totin == 0 && strm.avail_in >= 3 && - input[0] == 31 && input[1] == 139 && input[2] == 8) - gzip = 1; - - /* process all of that, or until end of stream */ - do { - /* reset sliding window if necessary */ - if (strm.avail_out == 0) { - strm.avail_out = WINSIZE; - strm.next_out = window; - } - - /* inflate until out of input, output, or at end of block -- - update the total input and output counters */ - totin += strm.avail_in; - totout += strm.avail_out; - ret = inflate(&strm, Z_BLOCK); /* return at end of block */ - totin -= strm.avail_in; - totout -= strm.avail_out; - if (ret == Z_NEED_DICT) - ret = Z_DATA_ERROR; - if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR) - goto deflate_index_build_error; - if (ret == Z_STREAM_END) { - if (gzip && - (strm.avail_in || ungetc(getc(in), in) != EOF)) { - ret = inflateReset(&strm); - if (ret != Z_OK) - goto deflate_index_build_error; - continue; - } - break; - } - - /* if at end of block, consider adding an index entry (note that if - data_type indicates an end-of-block, then all of the - uncompressed data from that block has been delivered, and none - of the compressed data after that block has been consumed, - except for up to seven bits) -- the totout == 0 provides an - entry point after the zlib or gzip header, and assures that the - index always has at least one access point; we avoid creating an - access point after the last block by checking bit 6 of data_type - */ - if ((strm.data_type & 128) && !(strm.data_type & 64) && - (totout == 0 || totout - last > span)) { - index = addpoint(index, strm.data_type & 7, totin, - totout, strm.avail_out, window); - if (index == NULL) { - ret = Z_MEM_ERROR; - goto deflate_index_build_error; - } - last = totout; - } - } while (strm.avail_in != 0); - } while (ret != Z_STREAM_END); - - /* clean up and return index (release unused entries in list) */ - (void)inflateEnd(&strm); - index->list = realloc(index->list, sizeof(struct point) * index->have); - index->gzip = gzip; - index->length = totout; - *built = index; - return index->have; - - /* return error */ - deflate_index_build_error: - (void)inflateEnd(&strm); - deflate_index_free(index); - return ret; -} - -/* See comments in zran.h. */ -int deflate_index_extract(FILE *in, struct deflate_index *index, off_t offset, - unsigned char *buf, int len) -{ - int ret, skip; - z_stream strm; - struct point *here; - unsigned char input[CHUNK]; - unsigned char discard[WINSIZE]; - - /* proceed only if something reasonable to do */ - if (len < 0) - return 0; - - /* find where in stream to start */ - here = index->list; - ret = index->have; - while (--ret && here[1].out <= offset) - here++; - - /* initialize file and inflate state to start there */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, -15); /* raw inflate */ - if (ret != Z_OK) - return ret; - ret = fseeko(in, here->in - (here->bits ? 1 : 0), SEEK_SET); - if (ret == -1) - goto deflate_index_extract_ret; - if (here->bits) { - ret = getc(in); - if (ret == -1) { - ret = ferror(in) ? Z_ERRNO : Z_DATA_ERROR; - goto deflate_index_extract_ret; - } - (void)inflatePrime(&strm, here->bits, ret >> (8 - here->bits)); - } - (void)inflateSetDictionary(&strm, here->window, WINSIZE); - - /* skip uncompressed bytes until offset reached, then satisfy request */ - offset -= here->out; - strm.avail_in = 0; - skip = 1; /* while skipping to offset */ - do { - /* define where to put uncompressed data, and how much */ - if (offset > WINSIZE) { /* skip WINSIZE bytes */ - strm.avail_out = WINSIZE; - strm.next_out = discard; - offset -= WINSIZE; - } - else if (offset > 0) { /* last skip */ - strm.avail_out = (unsigned)offset; - strm.next_out = discard; - offset = 0; - } - else if (skip) { /* at offset now */ - strm.avail_out = len; - strm.next_out = buf; - skip = 0; /* only do this once */ - } - - /* uncompress until avail_out filled, or end of stream */ - do { - if (strm.avail_in == 0) { - strm.avail_in = fread(input, 1, CHUNK, in); - if (ferror(in)) { - ret = Z_ERRNO; - goto deflate_index_extract_ret; - } - if (strm.avail_in == 0) { - ret = Z_DATA_ERROR; - goto deflate_index_extract_ret; - } - strm.next_in = input; - } - ret = inflate(&strm, Z_NO_FLUSH); /* normal inflate */ - if (ret == Z_NEED_DICT) - ret = Z_DATA_ERROR; - if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR) - goto deflate_index_extract_ret; - if (ret == Z_STREAM_END) { - /* the raw deflate stream has ended */ - if (index->gzip == 0) - /* this is a zlib stream that has ended -- done */ - break; - - /* near the end of a gzip member, which might be followed by - another gzip member -- skip the gzip trailer and see if - there is more input after it */ - if (strm.avail_in < 8) { - fseeko(in, 8 - strm.avail_in, SEEK_CUR); - strm.avail_in = 0; - } - else { - strm.avail_in -= 8; - strm.next_in += 8; - } - if (strm.avail_in == 0 && ungetc(getc(in), in) == EOF) - /* the input ended after the gzip trailer -- done */ - break; - - /* there is more input, so another gzip member should follow -- - validate and skip the gzip header */ - ret = inflateReset2(&strm, 31); - if (ret != Z_OK) - goto deflate_index_extract_ret; - do { - if (strm.avail_in == 0) { - strm.avail_in = fread(input, 1, CHUNK, in); - if (ferror(in)) { - ret = Z_ERRNO; - goto deflate_index_extract_ret; - } - if (strm.avail_in == 0) { - ret = Z_DATA_ERROR; - goto deflate_index_extract_ret; - } - strm.next_in = input; - } - ret = inflate(&strm, Z_BLOCK); - if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR) - goto deflate_index_extract_ret; - } while ((strm.data_type & 128) == 0); - - /* set up to continue decompression of the raw deflate stream - that follows the gzip header */ - ret = inflateReset2(&strm, -15); - if (ret != Z_OK) - goto deflate_index_extract_ret; - } - - /* continue to process the available input before reading more */ - } while (strm.avail_out != 0); - - if (ret == Z_STREAM_END) - /* reached the end of the compressed data -- return the data that - was available, possibly less than requested */ - break; - - /* do until offset reached and requested data read */ - } while (skip); - - /* compute the number of uncompressed bytes read after the offset */ - ret = skip ? 0 : len - strm.avail_out; - - /* clean up and return the bytes read, or the negative error */ - deflate_index_extract_ret: - (void)inflateEnd(&strm); - return ret; -} - -#ifdef TEST - -#define SPAN 1048576L /* desired distance between access points */ -#define LEN 16384 /* number of bytes to extract */ - -/* Demonstrate the use of deflate_index_build() and deflate_index_extract() by - processing the file provided on the command line, and extracting LEN bytes - from 2/3rds of the way through the uncompressed output, writing that to - stdout. An offset can be provided as the second argument, in which case the - data is extracted from there instead. */ -int main(int argc, char **argv) -{ - int len; - off_t offset = -1; - FILE *in; - struct deflate_index *index = NULL; - unsigned char buf[LEN]; - - /* open input file */ - if (argc < 2 || argc > 3) { - fprintf(stderr, "usage: zran file.gz [offset]\n"); - return 1; - } - in = fopen(argv[1], "rb"); - if (in == NULL) { - fprintf(stderr, "zran: could not open %s for reading\n", argv[1]); - return 1; - } - - /* get optional offset */ - if (argc == 3) { - char *end; - offset = strtoll(argv[2], &end, 10); - if (*end || offset < 0) { - fprintf(stderr, "zran: %s is not a valid offset\n", argv[2]); - return 1; - } - } - - /* build index */ - len = deflate_index_build(in, SPAN, &index); - if (len < 0) { - fclose(in); - switch (len) { - case Z_MEM_ERROR: - fprintf(stderr, "zran: out of memory\n"); - break; - case Z_DATA_ERROR: - fprintf(stderr, "zran: compressed data error in %s\n", argv[1]); - break; - case Z_ERRNO: - fprintf(stderr, "zran: read error on %s\n", argv[1]); - break; - default: - fprintf(stderr, "zran: error %d while building index\n", len); - } - return 1; - } - fprintf(stderr, "zran: built index with %d access points\n", len); - - /* use index by reading some bytes from an arbitrary offset */ - if (offset == -1) - offset = (index->length << 1) / 3; - len = deflate_index_extract(in, index, offset, buf, LEN); - if (len < 0) - fprintf(stderr, "zran: extraction failed: %s error\n", - len == Z_MEM_ERROR ? "out of memory" : "input corrupted"); - else { - fwrite(buf, 1, len, stdout); - fprintf(stderr, "zran: extracted %d bytes at %llu\n", len, offset); - } - - /* clean up and exit */ - deflate_index_free(index); - fclose(in); - return 0; -} - -#endif diff --git a/thirdparty/zlib-1.2.12/examples/zran.h b/thirdparty/zlib-1.2.12/examples/zran.h deleted file mode 100644 index 2314125..0000000 --- a/thirdparty/zlib-1.2.12/examples/zran.h +++ /dev/null @@ -1,40 +0,0 @@ -/* zran.h -- example of zlib/gzip stream indexing and random access - * Copyright (C) 2005, 2012, 2018 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * Version 1.2 14 Oct 2018 Mark Adler */ - -#include -#include "zlib.h" - -/* Access point list. */ -struct deflate_index { - int have; /* number of list entries */ - int gzip; /* 1 if the index is of a gzip file, 0 if it is of a - zlib stream */ - off_t length; /* total length of uncompressed data */ - void *list; /* allocated list of entries */ -}; - -/* Make one entire pass through a zlib or gzip compressed stream and build an - index, with access points about every span bytes of uncompressed output. - gzip files with multiple members are indexed in their entirety. span should - be chosen to balance the speed of random access against the memory - requirements of the list, about 32K bytes per access point. The return value - is the number of access points on success (>= 1), Z_MEM_ERROR for out of - memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a file - read error. On success, *built points to the resulting index. */ -int deflate_index_build(FILE *in, off_t span, struct deflate_index **built); - -/* Deallocate an index built by deflate_index_build() */ -void deflate_index_free(struct deflate_index *index); - -/* Use the index to read len bytes from offset into buf. Return bytes read or - negative for error (Z_DATA_ERROR or Z_MEM_ERROR). If data is requested past - the end of the uncompressed data, then deflate_index_extract() will return a - value less than len, indicating how much was actually read into buf. This - function should not return a data error unless the file was modified since - the index was generated, since deflate_index_build() validated all of the - input. deflate_index_extract() will return Z_ERRNO if there is an error on - reading or seeking the input file. */ -int deflate_index_extract(FILE *in, struct deflate_index *index, off_t offset, - unsigned char *buf, int len); diff --git a/thirdparty/zlib-1.2.12/gzclose.c b/thirdparty/zlib-1.2.12/gzclose.c deleted file mode 100644 index caeb99a..0000000 --- a/thirdparty/zlib-1.2.12/gzclose.c +++ /dev/null @@ -1,25 +0,0 @@ -/* gzclose.c -- zlib gzclose() function - * Copyright (C) 2004, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* gzclose() is in a separate file so that it is linked in only if it is used. - That way the other gzclose functions can be used instead to avoid linking in - unneeded compression or decompression routines. */ -int ZEXPORT gzclose(file) - gzFile file; -{ -#ifndef NO_GZCOMPRESS - gz_statep state; - - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); -#else - return gzclose_r(file); -#endif -} diff --git a/thirdparty/zlib-1.2.12/gzguts.h b/thirdparty/zlib-1.2.12/gzguts.h deleted file mode 100644 index 57faf37..0000000 --- a/thirdparty/zlib-1.2.12/gzguts.h +++ /dev/null @@ -1,219 +0,0 @@ -/* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004-2019 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#ifdef _LARGEFILE64_SOURCE -# ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE 1 -# endif -# ifdef _FILE_OFFSET_BITS -# undef _FILE_OFFSET_BITS -# endif -#endif - -#ifdef HAVE_HIDDEN -# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) -#else -# define ZLIB_INTERNAL -#endif - -#include -#include "zlib.h" -#ifdef STDC -# include -# include -# include -#endif - -#ifndef _POSIX_SOURCE -# define _POSIX_SOURCE -#endif -#include - -#ifdef _WIN32 -# include -#endif - -#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) -# include -#endif - -#if defined(_WIN32) -# define WIDECHAR -#endif - -#ifdef WINAPI_FAMILY -# define open _open -# define read _read -# define write _write -# define close _close -#endif - -#ifdef NO_DEFLATE /* for compatibility with old definition */ -# define NO_GZCOMPRESS -#endif - -#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#if defined(__CYGWIN__) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#ifndef HAVE_VSNPRINTF -# ifdef MSDOS -/* vsnprintf may exist on some MS-DOS compilers (DJGPP?), - but for now we just assume it doesn't. */ -# define NO_vsnprintf -# endif -# ifdef __TURBOC__ -# define NO_vsnprintf -# endif -# ifdef WIN32 -/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ -# if !defined(vsnprintf) && !defined(NO_vsnprintf) -# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) -# define vsnprintf _vsnprintf -# endif -# endif -# endif -# ifdef __SASC -# define NO_vsnprintf -# endif -# ifdef VMS -# define NO_vsnprintf -# endif -# ifdef __OS400__ -# define NO_vsnprintf -# endif -# ifdef __MVS__ -# define NO_vsnprintf -# endif -#endif - -/* unlike snprintf (which is required in C99), _snprintf does not guarantee - null termination of the result -- however this is only used in gzlib.c where - the result is assured to fit in the space provided */ -#if defined(_MSC_VER) && _MSC_VER < 1900 -# define snprintf _snprintf -#endif - -#ifndef local -# define local static -#endif -/* since "static" is used to mean two completely different things in C, we - define "local" for the non-static meaning of "static", for readability - (compile with -Dlocal if your debugger can't find static symbols) */ - -/* gz* functions always use library allocation functions */ -#ifndef STDC - extern voidp malloc OF((uInt size)); - extern void free OF((voidpf ptr)); -#endif - -/* get errno and strerror definition */ -#if defined UNDER_CE -# include -# define zstrerror() gz_strwinerror((DWORD)GetLastError()) -#else -# ifndef NO_STRERROR -# include -# define zstrerror() strerror(errno) -# else -# define zstrerror() "stdio error (consult errno)" -# endif -#endif - -/* provide prototypes for these when building zlib without LFS */ -#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); -#endif - -/* default memLevel */ -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif - -/* default i/o buffer size -- double this for output when reading (this and - twice this must be able to fit in an unsigned type) */ -#define GZBUFSIZE 8192 - -/* gzip modes, also provide a little integrity check on the passed structure */ -#define GZ_NONE 0 -#define GZ_READ 7247 -#define GZ_WRITE 31153 -#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */ - -/* values for gz_state how */ -#define LOOK 0 /* look for a gzip header */ -#define COPY 1 /* copy input directly */ -#define GZIP 2 /* decompress a gzip stream */ - -/* internal gzip file state data structure */ -typedef struct { - /* exposed contents for gzgetc() macro */ - struct gzFile_s x; /* "x" for exposed */ - /* x.have: number of bytes available at x.next */ - /* x.next: next output data to deliver or write */ - /* x.pos: current position in uncompressed data */ - /* used for both reading and writing */ - int mode; /* see gzip modes above */ - int fd; /* file descriptor */ - char *path; /* path or fd for error messages */ - unsigned size; /* buffer size, zero if not allocated yet */ - unsigned want; /* requested buffer size, default is GZBUFSIZE */ - unsigned char *in; /* input buffer (double-sized when writing) */ - unsigned char *out; /* output buffer (double-sized when reading) */ - int direct; /* 0 if processing gzip, 1 if transparent */ - /* just for reading */ - int how; /* 0: get header, 1: copy, 2: decompress */ - z_off64_t start; /* where the gzip data started, for rewinding */ - int eof; /* true if end of input file reached */ - int past; /* true if read requested past end */ - /* just for writing */ - int level; /* compression level */ - int strategy; /* compression strategy */ - int reset; /* true if a reset is pending after a Z_FINISH */ - /* seek request */ - z_off64_t skip; /* amount to skip (already rewound if backwards) */ - int seek; /* true if seek request pending */ - /* error information */ - int err; /* error code */ - char *msg; /* error message */ - /* zlib inflate or deflate stream */ - z_stream strm; /* stream structure in-place (not a pointer) */ -} gz_state; -typedef gz_state FAR *gz_statep; - -/* shared functions */ -void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); -#if defined UNDER_CE -char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); -#endif - -/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t - value -- needed when comparing unsigned to z_off64_t, which is signed - (possible z_off64_t types off_t, off64_t, and long are all signed) */ -#ifdef INT_MAX -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) -#else -unsigned ZLIB_INTERNAL gz_intmax OF((void)); -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) -#endif diff --git a/thirdparty/zlib-1.2.12/gzlib.c b/thirdparty/zlib-1.2.12/gzlib.c deleted file mode 100644 index dddaf26..0000000 --- a/thirdparty/zlib-1.2.12/gzlib.c +++ /dev/null @@ -1,639 +0,0 @@ -/* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004-2019 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -#if defined(_WIN32) && !defined(__BORLANDC__) -# define LSEEK _lseeki64 -#else -#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 -# define LSEEK lseek64 -#else -# define LSEEK lseek -#endif -#endif - -/* Local functions */ -local void gz_reset OF((gz_statep)); -local gzFile gz_open OF((const void *, int, const char *)); - -#if defined UNDER_CE - -/* Map the Windows error number in ERROR to a locale-dependent error message - string and return a pointer to it. Typically, the values for ERROR come - from GetLastError. - - The string pointed to shall not be modified by the application, but may be - overwritten by a subsequent call to gz_strwinerror - - The gz_strwinerror function does not change the current setting of - GetLastError. */ -char ZLIB_INTERNAL *gz_strwinerror (error) - DWORD error; -{ - static char buf[1024]; - - wchar_t *msgbuf; - DWORD lasterr = GetLastError(); - DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, - error, - 0, /* Default language */ - (LPVOID)&msgbuf, - 0, - NULL); - if (chars != 0) { - /* If there is an \r\n appended, zap it. */ - if (chars >= 2 - && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { - chars -= 2; - msgbuf[chars] = 0; - } - - if (chars > sizeof (buf) - 1) { - chars = sizeof (buf) - 1; - msgbuf[chars] = 0; - } - - wcstombs(buf, msgbuf, chars + 1); - LocalFree(msgbuf); - } - else { - sprintf(buf, "unknown win32 error (%ld)", error); - } - - SetLastError(lasterr); - return buf; -} - -#endif /* UNDER_CE */ - -/* Reset gzip file state */ -local void gz_reset(state) - gz_statep state; -{ - state->x.have = 0; /* no output data available */ - if (state->mode == GZ_READ) { /* for reading ... */ - state->eof = 0; /* not at end of file */ - state->past = 0; /* have not read past end yet */ - state->how = LOOK; /* look for gzip header */ - } - else /* for writing ... */ - state->reset = 0; /* no deflateReset pending */ - state->seek = 0; /* no seek request pending */ - gz_error(state, Z_OK, NULL); /* clear error */ - state->x.pos = 0; /* no uncompressed data yet */ - state->strm.avail_in = 0; /* no input data yet */ -} - -/* Open a gzip file either by name or file descriptor. */ -local gzFile gz_open(path, fd, mode) - const void *path; - int fd; - const char *mode; -{ - gz_statep state; - z_size_t len; - int oflag; -#ifdef O_CLOEXEC - int cloexec = 0; -#endif -#ifdef O_EXCL - int exclusive = 0; -#endif - - /* check input */ - if (path == NULL) - return NULL; - - /* allocate gzFile structure to return */ - state = (gz_statep)malloc(sizeof(gz_state)); - if (state == NULL) - return NULL; - state->size = 0; /* no buffers allocated yet */ - state->want = GZBUFSIZE; /* requested buffer size */ - state->msg = NULL; /* no error message yet */ - - /* interpret mode */ - state->mode = GZ_NONE; - state->level = Z_DEFAULT_COMPRESSION; - state->strategy = Z_DEFAULT_STRATEGY; - state->direct = 0; - while (*mode) { - if (*mode >= '0' && *mode <= '9') - state->level = *mode - '0'; - else - switch (*mode) { - case 'r': - state->mode = GZ_READ; - break; -#ifndef NO_GZCOMPRESS - case 'w': - state->mode = GZ_WRITE; - break; - case 'a': - state->mode = GZ_APPEND; - break; -#endif - case '+': /* can't read and write at the same time */ - free(state); - return NULL; - case 'b': /* ignore -- will request binary anyway */ - break; -#ifdef O_CLOEXEC - case 'e': - cloexec = 1; - break; -#endif -#ifdef O_EXCL - case 'x': - exclusive = 1; - break; -#endif - case 'f': - state->strategy = Z_FILTERED; - break; - case 'h': - state->strategy = Z_HUFFMAN_ONLY; - break; - case 'R': - state->strategy = Z_RLE; - break; - case 'F': - state->strategy = Z_FIXED; - break; - case 'T': - state->direct = 1; - break; - default: /* could consider as an error, but just ignore */ - ; - } - mode++; - } - - /* must provide an "r", "w", or "a" */ - if (state->mode == GZ_NONE) { - free(state); - return NULL; - } - - /* can't force transparent read */ - if (state->mode == GZ_READ) { - if (state->direct) { - free(state); - return NULL; - } - state->direct = 1; /* for empty file */ - } - - /* save the path name for error messages */ -#ifdef WIDECHAR - if (fd == -2) { - len = wcstombs(NULL, path, 0); - if (len == (z_size_t)-1) - len = 0; - } - else -#endif - len = strlen((const char *)path); - state->path = (char *)malloc(len + 1); - if (state->path == NULL) { - free(state); - return NULL; - } -#ifdef WIDECHAR - if (fd == -2) - if (len) - wcstombs(state->path, path, len + 1); - else - *(state->path) = 0; - else -#endif -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - (void)snprintf(state->path, len + 1, "%s", (const char *)path); -#else - strcpy(state->path, path); -#endif - - /* compute the flags for open() */ - oflag = -#ifdef O_LARGEFILE - O_LARGEFILE | -#endif -#ifdef O_BINARY - O_BINARY | -#endif -#ifdef O_CLOEXEC - (cloexec ? O_CLOEXEC : 0) | -#endif - (state->mode == GZ_READ ? - O_RDONLY : - (O_WRONLY | O_CREAT | -#ifdef O_EXCL - (exclusive ? O_EXCL : 0) | -#endif - (state->mode == GZ_WRITE ? - O_TRUNC : - O_APPEND))); - - /* open the file with the appropriate flags (or just use fd) */ - state->fd = fd > -1 ? fd : ( -#ifdef WIDECHAR - fd == -2 ? _wopen(path, oflag, 0666) : -#endif - open((const char *)path, oflag, 0666)); - if (state->fd == -1) { - free(state->path); - free(state); - return NULL; - } - if (state->mode == GZ_APPEND) { - LSEEK(state->fd, 0, SEEK_END); /* so gzoffset() is correct */ - state->mode = GZ_WRITE; /* simplify later checks */ - } - - /* save the current position for rewinding (only if reading) */ - if (state->mode == GZ_READ) { - state->start = LSEEK(state->fd, 0, SEEK_CUR); - if (state->start == -1) state->start = 0; - } - - /* initialize stream */ - gz_reset(state); - - /* return stream */ - return (gzFile)state; -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzopen(path, mode) - const char *path; - const char *mode; -{ - return gz_open(path, -1, mode); -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzopen64(path, mode) - const char *path; - const char *mode; -{ - return gz_open(path, -1, mode); -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzdopen(fd, mode) - int fd; - const char *mode; -{ - char *path; /* identifier for error messages */ - gzFile gz; - - if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL) - return NULL; -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - (void)snprintf(path, 7 + 3 * sizeof(int), "", fd); -#else - sprintf(path, "", fd); /* for debugging */ -#endif - gz = gz_open(path, fd, mode); - free(path); - return gz; -} - -/* -- see zlib.h -- */ -#ifdef WIDECHAR -gzFile ZEXPORT gzopen_w(path, mode) - const wchar_t *path; - const char *mode; -{ - return gz_open(path, -2, mode); -} -#endif - -/* -- see zlib.h -- */ -int ZEXPORT gzbuffer(file, size) - gzFile file; - unsigned size; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* make sure we haven't already allocated memory */ - if (state->size != 0) - return -1; - - /* check and set requested size */ - if ((size << 1) < size) - return -1; /* need to be able to double it */ - if (size < 2) - size = 2; /* need two bytes to check magic header */ - state->want = size; - return 0; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzrewind(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* back up and start over */ - if (LSEEK(state->fd, state->start, SEEK_SET) == -1) - return -1; - gz_reset(state); - return 0; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gzseek64(file, offset, whence) - gzFile file; - z_off64_t offset; - int whence; -{ - unsigned n; - z_off64_t ret; - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* check that there's no error */ - if (state->err != Z_OK && state->err != Z_BUF_ERROR) - return -1; - - /* can only seek from start or relative to current position */ - if (whence != SEEK_SET && whence != SEEK_CUR) - return -1; - - /* normalize offset to a SEEK_CUR specification */ - if (whence == SEEK_SET) - offset -= state->x.pos; - else if (state->seek) - offset += state->skip; - state->seek = 0; - - /* if within raw area while reading, just go there */ - if (state->mode == GZ_READ && state->how == COPY && - state->x.pos + offset >= 0) { - ret = LSEEK(state->fd, offset - (z_off64_t)state->x.have, SEEK_CUR); - if (ret == -1) - return -1; - state->x.have = 0; - state->eof = 0; - state->past = 0; - state->seek = 0; - gz_error(state, Z_OK, NULL); - state->strm.avail_in = 0; - state->x.pos += offset; - return state->x.pos; - } - - /* calculate skip amount, rewinding if needed for back seek when reading */ - if (offset < 0) { - if (state->mode != GZ_READ) /* writing -- can't go backwards */ - return -1; - offset += state->x.pos; - if (offset < 0) /* before start of file! */ - return -1; - if (gzrewind(file) == -1) /* rewind, then skip to offset */ - return -1; - } - - /* if reading, skip what's in output buffer (one less gzgetc() check) */ - if (state->mode == GZ_READ) { - n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ? - (unsigned)offset : state->x.have; - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - offset -= n; - } - - /* request skip (if not zero) */ - if (offset) { - state->seek = 1; - state->skip = offset; - } - return state->x.pos + offset; -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gzseek(file, offset, whence) - gzFile file; - z_off_t offset; - int whence; -{ - z_off64_t ret; - - ret = gzseek64(file, (z_off64_t)offset, whence); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gztell64(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* return position */ - return state->x.pos + (state->seek ? state->skip : 0); -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gztell(file) - gzFile file; -{ - z_off64_t ret; - - ret = gztell64(file); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gzoffset64(file) - gzFile file; -{ - z_off64_t offset; - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* compute and return effective offset in file */ - offset = LSEEK(state->fd, 0, SEEK_CUR); - if (offset == -1) - return -1; - if (state->mode == GZ_READ) /* reading */ - offset -= state->strm.avail_in; /* don't count buffered input */ - return offset; -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gzoffset(file) - gzFile file; -{ - z_off64_t ret; - - ret = gzoffset64(file); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzeof(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return 0; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return 0; - - /* return end-of-file state */ - return state->mode == GZ_READ ? state->past : 0; -} - -/* -- see zlib.h -- */ -const char * ZEXPORT gzerror(file, errnum) - gzFile file; - int *errnum; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return NULL; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return NULL; - - /* return error information */ - if (errnum != NULL) - *errnum = state->err; - return state->err == Z_MEM_ERROR ? "out of memory" : - (state->msg == NULL ? "" : state->msg); -} - -/* -- see zlib.h -- */ -void ZEXPORT gzclearerr(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return; - - /* clear error and end-of-file */ - if (state->mode == GZ_READ) { - state->eof = 0; - state->past = 0; - } - gz_error(state, Z_OK, NULL); -} - -/* Create an error message in allocated memory and set state->err and - state->msg accordingly. Free any previous error message already there. Do - not try to free or allocate space if the error is Z_MEM_ERROR (out of - memory). Simply save the error message as a static string. If there is an - allocation failure constructing the error message, then convert the error to - out of memory. */ -void ZLIB_INTERNAL gz_error(state, err, msg) - gz_statep state; - int err; - const char *msg; -{ - /* free previously allocated message and clear */ - if (state->msg != NULL) { - if (state->err != Z_MEM_ERROR) - free(state->msg); - state->msg = NULL; - } - - /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */ - if (err != Z_OK && err != Z_BUF_ERROR) - state->x.have = 0; - - /* set error code, and if no message, then done */ - state->err = err; - if (msg == NULL) - return; - - /* for an out of memory error, return literal string when requested */ - if (err == Z_MEM_ERROR) - return; - - /* construct error message with path */ - if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == - NULL) { - state->err = Z_MEM_ERROR; - return; - } -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, - "%s%s%s", state->path, ": ", msg); -#else - strcpy(state->msg, state->path); - strcat(state->msg, ": "); - strcat(state->msg, msg); -#endif -} - -#ifndef INT_MAX -/* portably return maximum value for an int (when limits.h presumed not - available) -- we need to do this to cover cases where 2's complement not - used, since C standard permits 1's complement and sign-bit representations, - otherwise we could just use ((unsigned)-1) >> 1 */ -unsigned ZLIB_INTERNAL gz_intmax() -{ - unsigned p, q; - - p = 1; - do { - q = p; - p <<= 1; - p++; - } while (p > q); - return q >> 1; -} -#endif diff --git a/thirdparty/zlib-1.2.12/gzread.c b/thirdparty/zlib-1.2.12/gzread.c deleted file mode 100644 index 884c9bf..0000000 --- a/thirdparty/zlib-1.2.12/gzread.c +++ /dev/null @@ -1,652 +0,0 @@ -/* gzread.c -- zlib functions for reading gzip files - * Copyright (C) 2004-2017 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* Local functions */ -local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *)); -local int gz_avail OF((gz_statep)); -local int gz_look OF((gz_statep)); -local int gz_decomp OF((gz_statep)); -local int gz_fetch OF((gz_statep)); -local int gz_skip OF((gz_statep, z_off64_t)); -local z_size_t gz_read OF((gz_statep, voidp, z_size_t)); - -/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from - state->fd, and update state->eof, state->err, and state->msg as appropriate. - This function needs to loop on read(), since read() is not guaranteed to - read the number of bytes requested, depending on the type of descriptor. */ -local int gz_load(state, buf, len, have) - gz_statep state; - unsigned char *buf; - unsigned len; - unsigned *have; -{ - int ret; - unsigned get, max = ((unsigned)-1 >> 2) + 1; - - *have = 0; - do { - get = len - *have; - if (get > max) - get = max; - ret = read(state->fd, buf + *have, get); - if (ret <= 0) - break; - *have += (unsigned)ret; - } while (*have < len); - if (ret < 0) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - if (ret == 0) - state->eof = 1; - return 0; -} - -/* Load up input buffer and set eof flag if last data loaded -- return -1 on - error, 0 otherwise. Note that the eof flag is set when the end of the input - file is reached, even though there may be unused data in the buffer. Once - that data has been used, no more attempts will be made to read the file. - If strm->avail_in != 0, then the current data is moved to the beginning of - the input buffer, and then the remainder of the buffer is loaded with the - available data from the input file. */ -local int gz_avail(state) - gz_statep state; -{ - unsigned got; - z_streamp strm = &(state->strm); - - if (state->err != Z_OK && state->err != Z_BUF_ERROR) - return -1; - if (state->eof == 0) { - if (strm->avail_in) { /* copy what's there to the start */ - unsigned char *p = state->in; - unsigned const char *q = strm->next_in; - unsigned n = strm->avail_in; - do { - *p++ = *q++; - } while (--n); - } - if (gz_load(state, state->in + strm->avail_in, - state->size - strm->avail_in, &got) == -1) - return -1; - strm->avail_in += got; - strm->next_in = state->in; - } - return 0; -} - -/* Look for gzip header, set up for inflate or copy. state->x.have must be 0. - If this is the first time in, allocate required memory. state->how will be - left unchanged if there is no more input data available, will be set to COPY - if there is no gzip header and direct copying will be performed, or it will - be set to GZIP for decompression. If direct copying, then leftover input - data from the input buffer will be copied to the output buffer. In that - case, all further file reads will be directly to either the output buffer or - a user buffer. If decompressing, the inflate state will be initialized. - gz_look() will return 0 on success or -1 on failure. */ -local int gz_look(state) - gz_statep state; -{ - z_streamp strm = &(state->strm); - - /* allocate read buffers and inflate memory */ - if (state->size == 0) { - /* allocate buffers */ - state->in = (unsigned char *)malloc(state->want); - state->out = (unsigned char *)malloc(state->want << 1); - if (state->in == NULL || state->out == NULL) { - free(state->out); - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - state->size = state->want; - - /* allocate inflate memory */ - state->strm.zalloc = Z_NULL; - state->strm.zfree = Z_NULL; - state->strm.opaque = Z_NULL; - state->strm.avail_in = 0; - state->strm.next_in = Z_NULL; - if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */ - free(state->out); - free(state->in); - state->size = 0; - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - } - - /* get at least the magic bytes in the input buffer */ - if (strm->avail_in < 2) { - if (gz_avail(state) == -1) - return -1; - if (strm->avail_in == 0) - return 0; - } - - /* look for gzip magic bytes -- if there, do gzip decoding (note: there is - a logical dilemma here when considering the case of a partially written - gzip file, to wit, if a single 31 byte is written, then we cannot tell - whether this is a single-byte file, or just a partially written gzip - file -- for here we assume that if a gzip file is being written, then - the header will be written in a single operation, so that reading a - single byte is sufficient indication that it is not a gzip file) */ - if (strm->avail_in > 1 && - strm->next_in[0] == 31 && strm->next_in[1] == 139) { - inflateReset(strm); - state->how = GZIP; - state->direct = 0; - return 0; - } - - /* no gzip header -- if we were decoding gzip before, then this is trailing - garbage. Ignore the trailing garbage and finish. */ - if (state->direct == 0) { - strm->avail_in = 0; - state->eof = 1; - state->x.have = 0; - return 0; - } - - /* doing raw i/o, copy any leftover input to output -- this assumes that - the output buffer is larger than the input buffer, which also assures - space for gzungetc() */ - state->x.next = state->out; - if (strm->avail_in) { - memcpy(state->x.next, strm->next_in, strm->avail_in); - state->x.have = strm->avail_in; - strm->avail_in = 0; - } - state->how = COPY; - state->direct = 1; - return 0; -} - -/* Decompress from input to the provided next_out and avail_out in the state. - On return, state->x.have and state->x.next point to the just decompressed - data. If the gzip stream completes, state->how is reset to LOOK to look for - the next gzip stream or raw data, once state->x.have is depleted. Returns 0 - on success, -1 on failure. */ -local int gz_decomp(state) - gz_statep state; -{ - int ret = Z_OK; - unsigned had; - z_streamp strm = &(state->strm); - - /* fill output buffer up to end of deflate stream */ - had = strm->avail_out; - do { - /* get more input for inflate() */ - if (strm->avail_in == 0 && gz_avail(state) == -1) - return -1; - if (strm->avail_in == 0) { - gz_error(state, Z_BUF_ERROR, "unexpected end of file"); - break; - } - - /* decompress and handle errors */ - ret = inflate(strm, Z_NO_FLUSH); - if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { - gz_error(state, Z_STREAM_ERROR, - "internal error: inflate stream corrupt"); - return -1; - } - if (ret == Z_MEM_ERROR) { - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - if (ret == Z_DATA_ERROR) { /* deflate stream invalid */ - gz_error(state, Z_DATA_ERROR, - strm->msg == NULL ? "compressed data error" : strm->msg); - return -1; - } - } while (strm->avail_out && ret != Z_STREAM_END); - - /* update available output */ - state->x.have = had - strm->avail_out; - state->x.next = strm->next_out - state->x.have; - - /* if the gzip stream completed successfully, look for another */ - if (ret == Z_STREAM_END) - state->how = LOOK; - - /* good decompression */ - return 0; -} - -/* Fetch data and put it in the output buffer. Assumes state->x.have is 0. - Data is either copied from the input file or decompressed from the input - file depending on state->how. If state->how is LOOK, then a gzip header is - looked for to determine whether to copy or decompress. Returns -1 on error, - otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the - end of the input file has been reached and all data has been processed. */ -local int gz_fetch(state) - gz_statep state; -{ - z_streamp strm = &(state->strm); - - do { - switch(state->how) { - case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */ - if (gz_look(state) == -1) - return -1; - if (state->how == LOOK) - return 0; - break; - case COPY: /* -> COPY */ - if (gz_load(state, state->out, state->size << 1, &(state->x.have)) - == -1) - return -1; - state->x.next = state->out; - return 0; - case GZIP: /* -> GZIP or LOOK (if end of gzip stream) */ - strm->avail_out = state->size << 1; - strm->next_out = state->out; - if (gz_decomp(state) == -1) - return -1; - } - } while (state->x.have == 0 && (!state->eof || strm->avail_in)); - return 0; -} - -/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */ -local int gz_skip(state, len) - gz_statep state; - z_off64_t len; -{ - unsigned n; - - /* skip over len bytes or reach end-of-file, whichever comes first */ - while (len) - /* skip over whatever is in output buffer */ - if (state->x.have) { - n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ? - (unsigned)len : state->x.have; - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - len -= n; - } - - /* output buffer empty -- return if we're at the end of the input */ - else if (state->eof && state->strm.avail_in == 0) - break; - - /* need more data to skip -- load up output buffer */ - else { - /* get more output, looking for header if required */ - if (gz_fetch(state) == -1) - return -1; - } - return 0; -} - -/* Read len bytes into buf from file, or less than len up to the end of the - input. Return the number of bytes read. If zero is returned, either the - end of file was reached, or there was an error. state->err must be - consulted in that case to determine which. */ -local z_size_t gz_read(state, buf, len) - gz_statep state; - voidp buf; - z_size_t len; -{ - z_size_t got; - unsigned n; - - /* if len is zero, avoid unnecessary operations */ - if (len == 0) - return 0; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return 0; - } - - /* get len bytes to buf, or less than len if at the end */ - got = 0; - do { - /* set n to the maximum amount of len that fits in an unsigned int */ - n = (unsigned)-1; - if (n > len) - n = (unsigned)len; - - /* first just try copying data from the output buffer */ - if (state->x.have) { - if (state->x.have < n) - n = state->x.have; - memcpy(buf, state->x.next, n); - state->x.next += n; - state->x.have -= n; - } - - /* output buffer empty -- return if we're at the end of the input */ - else if (state->eof && state->strm.avail_in == 0) { - state->past = 1; /* tried to read past end */ - break; - } - - /* need output data -- for small len or new stream load up our output - buffer */ - else if (state->how == LOOK || n < (state->size << 1)) { - /* get more output, looking for header if required */ - if (gz_fetch(state) == -1) - return 0; - continue; /* no progress yet -- go back to copy above */ - /* the copy above assures that we will leave with space in the - output buffer, allowing at least one gzungetc() to succeed */ - } - - /* large len -- read directly into user buffer */ - else if (state->how == COPY) { /* read directly */ - if (gz_load(state, (unsigned char *)buf, n, &n) == -1) - return 0; - } - - /* large len -- decompress directly into user buffer */ - else { /* state->how == GZIP */ - state->strm.avail_out = n; - state->strm.next_out = (unsigned char *)buf; - if (gz_decomp(state) == -1) - return 0; - n = state->x.have; - state->x.have = 0; - } - - /* update progress */ - len -= n; - buf = (char *)buf + n; - got += n; - state->x.pos += n; - } while (len); - - /* return number of bytes read into user buffer */ - return got; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzread(file, buf, len) - gzFile file; - voidp buf; - unsigned len; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* since an int is returned, make sure len fits in one, otherwise return - with an error (this avoids a flaw in the interface) */ - if ((int)len < 0) { - gz_error(state, Z_STREAM_ERROR, "request does not fit in an int"); - return -1; - } - - /* read len or fewer bytes to buf */ - len = (unsigned)gz_read(state, buf, len); - - /* check for an error */ - if (len == 0 && state->err != Z_OK && state->err != Z_BUF_ERROR) - return -1; - - /* return the number of bytes read (this is assured to fit in an int) */ - return (int)len; -} - -/* -- see zlib.h -- */ -z_size_t ZEXPORT gzfread(buf, size, nitems, file) - voidp buf; - z_size_t size; - z_size_t nitems; - gzFile file; -{ - z_size_t len; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return 0; - - /* compute bytes to read -- error on overflow */ - len = nitems * size; - if (size && len / size != nitems) { - gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t"); - return 0; - } - - /* read len or fewer bytes to buf, return the number of full items read */ - return len ? gz_read(state, buf, len) / size : 0; -} - -/* -- see zlib.h -- */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -#else -# undef gzgetc -#endif -int ZEXPORT gzgetc(file) - gzFile file; -{ - unsigned char buf[1]; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* try output buffer (no need to check for skip request) */ - if (state->x.have) { - state->x.have--; - state->x.pos++; - return *(state->x.next)++; - } - - /* nothing there -- try gz_read() */ - return gz_read(state, buf, 1) < 1 ? -1 : buf[0]; -} - -int ZEXPORT gzgetc_(file) -gzFile file; -{ - return gzgetc(file); -} - -/* -- see zlib.h -- */ -int ZEXPORT gzungetc(c, file) - int c; - gzFile file; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return -1; - } - - /* can't push EOF */ - if (c < 0) - return -1; - - /* if output buffer empty, put byte at end (allows more pushing) */ - if (state->x.have == 0) { - state->x.have = 1; - state->x.next = state->out + (state->size << 1) - 1; - state->x.next[0] = (unsigned char)c; - state->x.pos--; - state->past = 0; - return c; - } - - /* if no room, give up (must have already done a gzungetc()) */ - if (state->x.have == (state->size << 1)) { - gz_error(state, Z_DATA_ERROR, "out of room to push characters"); - return -1; - } - - /* slide output data if needed and insert byte before existing data */ - if (state->x.next == state->out) { - unsigned char *src = state->out + state->x.have; - unsigned char *dest = state->out + (state->size << 1); - while (src > state->out) - *--dest = *--src; - state->x.next = dest; - } - state->x.have++; - state->x.next--; - state->x.next[0] = (unsigned char)c; - state->x.pos--; - state->past = 0; - return c; -} - -/* -- see zlib.h -- */ -char * ZEXPORT gzgets(file, buf, len) - gzFile file; - char *buf; - int len; -{ - unsigned left, n; - char *str; - unsigned char *eol; - gz_statep state; - - /* check parameters and get internal structure */ - if (file == NULL || buf == NULL || len < 1) - return NULL; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return NULL; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return NULL; - } - - /* copy output bytes up to new line or len - 1, whichever comes first -- - append a terminating zero to the string (we don't check for a zero in - the contents, let the user worry about that) */ - str = buf; - left = (unsigned)len - 1; - if (left) do { - /* assure that something is in the output buffer */ - if (state->x.have == 0 && gz_fetch(state) == -1) - return NULL; /* error */ - if (state->x.have == 0) { /* end of file */ - state->past = 1; /* read past end */ - break; /* return what we have */ - } - - /* look for end-of-line in current output buffer */ - n = state->x.have > left ? left : state->x.have; - eol = (unsigned char *)memchr(state->x.next, '\n', n); - if (eol != NULL) - n = (unsigned)(eol - state->x.next) + 1; - - /* copy through end-of-line, or remainder if not found */ - memcpy(buf, state->x.next, n); - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - left -= n; - buf += n; - } while (left && eol == NULL); - - /* return terminated string, or if nothing, end of file */ - if (buf == str) - return NULL; - buf[0] = 0; - return str; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzdirect(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - - /* if the state is not known, but we can find out, then do so (this is - mainly for right after a gzopen() or gzdopen()) */ - if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0) - (void)gz_look(state); - - /* return 1 if transparent, 0 if processing a gzip stream */ - return state->direct; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzclose_r(file) - gzFile file; -{ - int ret, err; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - /* check that we're reading */ - if (state->mode != GZ_READ) - return Z_STREAM_ERROR; - - /* free memory and close file */ - if (state->size) { - inflateEnd(&(state->strm)); - free(state->out); - free(state->in); - } - err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK; - gz_error(state, Z_OK, NULL); - free(state->path); - ret = close(state->fd); - free(state); - return ret ? Z_ERRNO : err; -} diff --git a/thirdparty/zlib-1.2.12/gzwrite.c b/thirdparty/zlib-1.2.12/gzwrite.c deleted file mode 100644 index a8ffc8f..0000000 --- a/thirdparty/zlib-1.2.12/gzwrite.c +++ /dev/null @@ -1,677 +0,0 @@ -/* gzwrite.c -- zlib functions for writing gzip files - * Copyright (C) 2004-2019 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* Local functions */ -local int gz_init OF((gz_statep)); -local int gz_comp OF((gz_statep, int)); -local int gz_zero OF((gz_statep, z_off64_t)); -local z_size_t gz_write OF((gz_statep, voidpc, z_size_t)); - -/* Initialize state for writing a gzip file. Mark initialization by setting - state->size to non-zero. Return -1 on a memory allocation failure, or 0 on - success. */ -local int gz_init(state) - gz_statep state; -{ - int ret; - z_streamp strm = &(state->strm); - - /* allocate input buffer (double size for gzprintf) */ - state->in = (unsigned char *)malloc(state->want << 1); - if (state->in == NULL) { - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - - /* only need output buffer and deflate state if compressing */ - if (!state->direct) { - /* allocate output buffer */ - state->out = (unsigned char *)malloc(state->want); - if (state->out == NULL) { - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - - /* allocate deflate memory, set up for gzip compression */ - strm->zalloc = Z_NULL; - strm->zfree = Z_NULL; - strm->opaque = Z_NULL; - ret = deflateInit2(strm, state->level, Z_DEFLATED, - MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy); - if (ret != Z_OK) { - free(state->out); - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - strm->next_in = NULL; - } - - /* mark state as initialized */ - state->size = state->want; - - /* initialize write buffer if compressing */ - if (!state->direct) { - strm->avail_out = state->size; - strm->next_out = state->out; - state->x.next = strm->next_out; - } - return 0; -} - -/* Compress whatever is at avail_in and next_in and write to the output file. - Return -1 if there is an error writing to the output file or if gz_init() - fails to allocate memory, otherwise 0. flush is assumed to be a valid - deflate() flush value. If flush is Z_FINISH, then the deflate() state is - reset to start a new gzip stream. If gz->direct is true, then simply write - to the output file without compressing, and ignore flush. */ -local int gz_comp(state, flush) - gz_statep state; - int flush; -{ - int ret, writ; - unsigned have, put, max = ((unsigned)-1 >> 2) + 1; - z_streamp strm = &(state->strm); - - /* allocate memory if this is the first time through */ - if (state->size == 0 && gz_init(state) == -1) - return -1; - - /* write directly if requested */ - if (state->direct) { - while (strm->avail_in) { - put = strm->avail_in > max ? max : strm->avail_in; - writ = write(state->fd, strm->next_in, put); - if (writ < 0) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - strm->avail_in -= (unsigned)writ; - strm->next_in += writ; - } - return 0; - } - - /* check for a pending reset */ - if (state->reset) { - /* don't start a new gzip member unless there is data to write */ - if (strm->avail_in == 0) - return 0; - deflateReset(strm); - state->reset = 0; - } - - /* run deflate() on provided input until it produces no more output */ - ret = Z_OK; - do { - /* write out current buffer contents if full, or if flushing, but if - doing Z_FINISH then don't write until we get to Z_STREAM_END */ - if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && - (flush != Z_FINISH || ret == Z_STREAM_END))) { - while (strm->next_out > state->x.next) { - put = strm->next_out - state->x.next > (int)max ? max : - (unsigned)(strm->next_out - state->x.next); - writ = write(state->fd, state->x.next, put); - if (writ < 0) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - state->x.next += writ; - } - if (strm->avail_out == 0) { - strm->avail_out = state->size; - strm->next_out = state->out; - state->x.next = state->out; - } - } - - /* compress */ - have = strm->avail_out; - ret = deflate(strm, flush); - if (ret == Z_STREAM_ERROR) { - gz_error(state, Z_STREAM_ERROR, - "internal error: deflate stream corrupt"); - return -1; - } - have -= strm->avail_out; - } while (have); - - /* if that completed a deflate stream, allow another to start */ - if (flush == Z_FINISH) - state->reset = 1; - - /* all done, no errors */ - return 0; -} - -/* Compress len zeros to output. Return -1 on a write error or memory - allocation failure by gz_comp(), or 0 on success. */ -local int gz_zero(state, len) - gz_statep state; - z_off64_t len; -{ - int first; - unsigned n; - z_streamp strm = &(state->strm); - - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return -1; - - /* compress len zeros (len guaranteed > 0) */ - first = 1; - while (len) { - n = GT_OFF(state->size) || (z_off64_t)state->size > len ? - (unsigned)len : state->size; - if (first) { - memset(state->in, 0, n); - first = 0; - } - strm->avail_in = n; - strm->next_in = state->in; - state->x.pos += n; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return -1; - len -= n; - } - return 0; -} - -/* Write len bytes from buf to file. Return the number of bytes written. If - the returned value is less than len, then there was an error. */ -local z_size_t gz_write(state, buf, len) - gz_statep state; - voidpc buf; - z_size_t len; -{ - z_size_t put = len; - - /* if len is zero, avoid unnecessary operations */ - if (len == 0) - return 0; - - /* allocate memory if this is the first time through */ - if (state->size == 0 && gz_init(state) == -1) - return 0; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return 0; - } - - /* for small len, copy to input buffer, otherwise compress directly */ - if (len < state->size) { - /* copy to input buffer, compress when full */ - do { - unsigned have, copy; - - if (state->strm.avail_in == 0) - state->strm.next_in = state->in; - have = (unsigned)((state->strm.next_in + state->strm.avail_in) - - state->in); - copy = state->size - have; - if (copy > len) - copy = (unsigned)len; - memcpy(state->in + have, buf, copy); - state->strm.avail_in += copy; - state->x.pos += copy; - buf = (const char *)buf + copy; - len -= copy; - if (len && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - } while (len); - } - else { - /* consume whatever's left in the input buffer */ - if (state->strm.avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* directly compress user buffer to file */ - state->strm.next_in = (z_const Bytef *)buf; - do { - unsigned n = (unsigned)-1; - if (n > len) - n = (unsigned)len; - state->strm.avail_in = n; - state->x.pos += n; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - len -= n; - } while (len); - } - - /* input was all buffered or compressed */ - return put; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzwrite(file, buf, len) - gzFile file; - voidpc buf; - unsigned len; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* since an int is returned, make sure len fits in one, otherwise return - with an error (this avoids a flaw in the interface) */ - if ((int)len < 0) { - gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); - return 0; - } - - /* write len bytes from buf (the return value will fit in an int) */ - return (int)gz_write(state, buf, len); -} - -/* -- see zlib.h -- */ -z_size_t ZEXPORT gzfwrite(buf, size, nitems, file) - voidpc buf; - z_size_t size; - z_size_t nitems; - gzFile file; -{ - z_size_t len; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* compute bytes to read -- error on overflow */ - len = nitems * size; - if (size && len / size != nitems) { - gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t"); - return 0; - } - - /* write len bytes to buf, return the number of full items written */ - return len ? gz_write(state, buf, len) / size : 0; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzputc(file, c) - gzFile file; - int c; -{ - unsigned have; - unsigned char buf[1]; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return -1; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return -1; - } - - /* try writing to input buffer for speed (state->size == 0 if buffer not - initialized) */ - if (state->size) { - if (strm->avail_in == 0) - strm->next_in = state->in; - have = (unsigned)((strm->next_in + strm->avail_in) - state->in); - if (have < state->size) { - state->in[have] = (unsigned char)c; - strm->avail_in++; - state->x.pos++; - return c & 0xff; - } - } - - /* no room in buffer or not initialized, use gz_write() */ - buf[0] = (unsigned char)c; - if (gz_write(state, buf, 1) != 1) - return -1; - return c & 0xff; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzputs(file, s) - gzFile file; - const char *s; -{ - z_size_t len, put; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return -1; - - /* write string */ - len = strlen(s); - if ((int)len < 0 || (unsigned)len != len) { - gz_error(state, Z_STREAM_ERROR, "string length does not fit in int"); - return -1; - } - put = gz_write(state, s, len); - return put < len ? -1 : (int)len; -} - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -#include - -/* -- see zlib.h -- */ -int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) -{ - int len; - unsigned left; - char *next; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; - - /* make sure we have some buffer space */ - if (state->size == 0 && gz_init(state) == -1) - return state->err; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return state->err; - } - - /* do the printf() into the input buffer, put length in len -- the input - buffer is double-sized just for this function, so there is guaranteed to - be state->size bytes available after the current contents */ - if (strm->avail_in == 0) - strm->next_in = state->in; - next = (char *)(state->in + (strm->next_in - state->in) + strm->avail_in); - next[state->size - 1] = 0; -#ifdef NO_vsnprintf -# ifdef HAS_vsprintf_void - (void)vsprintf(next, format, va); - for (len = 0; len < state->size; len++) - if (next[len] == 0) break; -# else - len = vsprintf(next, format, va); -# endif -#else -# ifdef HAS_vsnprintf_void - (void)vsnprintf(next, state->size, format, va); - len = strlen(next); -# else - len = vsnprintf(next, state->size, format, va); -# endif -#endif - - /* check that printf() results fit in buffer */ - if (len == 0 || (unsigned)len >= state->size || next[state->size - 1] != 0) - return 0; - - /* update buffer and position, compress first half if past that */ - strm->avail_in += (unsigned)len; - state->x.pos += len; - if (strm->avail_in >= state->size) { - left = strm->avail_in - state->size; - strm->avail_in = state->size; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return state->err; - memmove(state->in, state->in + state->size, left); - strm->next_in = state->in; - strm->avail_in = left; - } - return len; -} - -int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) -{ - va_list va; - int ret; - - va_start(va, format); - ret = gzvprintf(file, format, va); - va_end(va); - return ret; -} - -#else /* !STDC && !Z_HAVE_STDARG_H */ - -/* -- see zlib.h -- */ -int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) - gzFile file; - const char *format; - int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; -{ - unsigned len, left; - char *next; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that can really pass pointer in ints */ - if (sizeof(int) != sizeof(void *)) - return Z_STREAM_ERROR; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; - - /* make sure we have some buffer space */ - if (state->size == 0 && gz_init(state) == -1) - return state->error; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return state->error; - } - - /* do the printf() into the input buffer, put length in len -- the input - buffer is double-sized just for this function, so there is guaranteed to - be state->size bytes available after the current contents */ - if (strm->avail_in == 0) - strm->next_in = state->in; - next = (char *)(strm->next_in + strm->avail_in); - next[state->size - 1] = 0; -#ifdef NO_snprintf -# ifdef HAS_sprintf_void - sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, - a13, a14, a15, a16, a17, a18, a19, a20); - for (len = 0; len < size; len++) - if (next[len] == 0) - break; -# else - len = sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, - a12, a13, a14, a15, a16, a17, a18, a19, a20); -# endif -#else -# ifdef HAS_snprintf_void - snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, - a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - len = strlen(next); -# else - len = snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); -# endif -#endif - - /* check that printf() results fit in buffer */ - if (len == 0 || len >= state->size || next[state->size - 1] != 0) - return 0; - - /* update buffer and position, compress first half if past that */ - strm->avail_in += len; - state->x.pos += len; - if (strm->avail_in >= state->size) { - left = strm->avail_in - state->size; - strm->avail_in = state->size; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return state->err; - memmove(state->in, state->in + state->size, left); - strm->next_in = state->in; - strm->avail_in = left; - } - return (int)len; -} - -#endif - -/* -- see zlib.h -- */ -int ZEXPORT gzflush(file, flush) - gzFile file; - int flush; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; - - /* check flush parameter */ - if (flush < 0 || flush > Z_FINISH) - return Z_STREAM_ERROR; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return state->err; - } - - /* compress remaining data with requested flush */ - (void)gz_comp(state, flush); - return state->err; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzsetparams(file, level, strategy) - gzFile file; - int level; - int strategy; -{ - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; - - /* if no change is requested, then do nothing */ - if (level == state->level && strategy == state->strategy) - return Z_OK; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return state->err; - } - - /* change compression parameters for subsequent input */ - if (state->size) { - /* flush previous input with previous parameters before changing */ - if (strm->avail_in && gz_comp(state, Z_BLOCK) == -1) - return state->err; - deflateParams(strm, level, strategy); - } - state->level = level; - state->strategy = strategy; - return Z_OK; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzclose_w(file) - gzFile file; -{ - int ret = Z_OK; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - /* check that we're writing */ - if (state->mode != GZ_WRITE) - return Z_STREAM_ERROR; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - ret = state->err; - } - - /* flush, free memory, and close file */ - if (gz_comp(state, Z_FINISH) == -1) - ret = state->err; - if (state->size) { - if (!state->direct) { - (void)deflateEnd(&(state->strm)); - free(state->out); - } - free(state->in); - } - gz_error(state, Z_OK, NULL); - free(state->path); - if (close(state->fd) == -1) - ret = Z_ERRNO; - free(state); - return ret; -} diff --git a/thirdparty/zlib-1.2.12/infback.c b/thirdparty/zlib-1.2.12/infback.c deleted file mode 100644 index a390c58..0000000 --- a/thirdparty/zlib-1.2.12/infback.c +++ /dev/null @@ -1,641 +0,0 @@ -/* infback.c -- inflate using a call-back interface - * Copyright (C) 1995-2022 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - This code is largely copied from inflate.c. Normally either infback.o or - inflate.o would be linked into an application--not both. The interface - with inffast.c is retained so that optimized assembler-coded versions of - inflate_fast() can be used with either inflate.c or infback.c. - */ - -#include "zutil.h" -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" - -/* function prototypes */ -local void fixedtables OF((struct inflate_state FAR *state)); - -/* - strm provides memory allocation functions in zalloc and zfree, or - Z_NULL to use the library memory allocation functions. - - windowBits is in the range 8..15, and window is a user-supplied - window and output buffer that is 2**windowBits bytes. - */ -int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size) -z_streamp strm; -int windowBits; -unsigned char FAR *window; -const char *version; -int stream_size; -{ - struct inflate_state FAR *state; - - if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || - stream_size != (int)(sizeof(z_stream))) - return Z_VERSION_ERROR; - if (strm == Z_NULL || window == Z_NULL || - windowBits < 8 || windowBits > 15) - return Z_STREAM_ERROR; - strm->msg = Z_NULL; /* in case we return an error */ - if (strm->zalloc == (alloc_func)0) { -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; -#endif - } - if (strm->zfree == (free_func)0) -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zfree = zcfree; -#endif - state = (struct inflate_state FAR *)ZALLOC(strm, 1, - sizeof(struct inflate_state)); - if (state == Z_NULL) return Z_MEM_ERROR; - Tracev((stderr, "inflate: allocated\n")); - strm->state = (struct internal_state FAR *)state; - state->dmax = 32768U; - state->wbits = (uInt)windowBits; - state->wsize = 1U << windowBits; - state->window = window; - state->wnext = 0; - state->whave = 0; - return Z_OK; -} - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -local void fixedtables(state) -struct inflate_state FAR *state; -{ -#ifdef BUILDFIXED - static int virgin = 1; - static code *lenfix, *distfix; - static code fixed[544]; - - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - unsigned sym, bits; - static code *next; - - /* literal/length table */ - sym = 0; - while (sym < 144) state->lens[sym++] = 8; - while (sym < 256) state->lens[sym++] = 9; - while (sym < 280) state->lens[sym++] = 7; - while (sym < 288) state->lens[sym++] = 8; - next = fixed; - lenfix = next; - bits = 9; - inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); - - /* distance table */ - sym = 0; - while (sym < 32) state->lens[sym++] = 5; - distfix = next; - bits = 5; - inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); - - /* do this just once */ - virgin = 0; - } -#else /* !BUILDFIXED */ -# include "inffixed.h" -#endif /* BUILDFIXED */ - state->lencode = lenfix; - state->lenbits = 9; - state->distcode = distfix; - state->distbits = 5; -} - -/* Macros for inflateBack(): */ - -/* Load returned state from inflate_fast() */ -#define LOAD() \ - do { \ - put = strm->next_out; \ - left = strm->avail_out; \ - next = strm->next_in; \ - have = strm->avail_in; \ - hold = state->hold; \ - bits = state->bits; \ - } while (0) - -/* Set state from registers for inflate_fast() */ -#define RESTORE() \ - do { \ - strm->next_out = put; \ - strm->avail_out = left; \ - strm->next_in = next; \ - strm->avail_in = have; \ - state->hold = hold; \ - state->bits = bits; \ - } while (0) - -/* Clear the input bit accumulator */ -#define INITBITS() \ - do { \ - hold = 0; \ - bits = 0; \ - } while (0) - -/* Assure that some input is available. If input is requested, but denied, - then return a Z_BUF_ERROR from inflateBack(). */ -#define PULL() \ - do { \ - if (have == 0) { \ - have = in(in_desc, &next); \ - if (have == 0) { \ - next = Z_NULL; \ - ret = Z_BUF_ERROR; \ - goto inf_leave; \ - } \ - } \ - } while (0) - -/* Get a byte of input into the bit accumulator, or return from inflateBack() - with an error if there is no input available. */ -#define PULLBYTE() \ - do { \ - PULL(); \ - have--; \ - hold += (unsigned long)(*next++) << bits; \ - bits += 8; \ - } while (0) - -/* Assure that there are at least n bits in the bit accumulator. If there is - not enough available input to do that, then return from inflateBack() with - an error. */ -#define NEEDBITS(n) \ - do { \ - while (bits < (unsigned)(n)) \ - PULLBYTE(); \ - } while (0) - -/* Return the low n bits of the bit accumulator (n < 16) */ -#define BITS(n) \ - ((unsigned)hold & ((1U << (n)) - 1)) - -/* Remove n bits from the bit accumulator */ -#define DROPBITS(n) \ - do { \ - hold >>= (n); \ - bits -= (unsigned)(n); \ - } while (0) - -/* Remove zero to seven bits as needed to go to a byte boundary */ -#define BYTEBITS() \ - do { \ - hold >>= bits & 7; \ - bits -= bits & 7; \ - } while (0) - -/* Assure that some output space is available, by writing out the window - if it's full. If the write fails, return from inflateBack() with a - Z_BUF_ERROR. */ -#define ROOM() \ - do { \ - if (left == 0) { \ - put = state->window; \ - left = state->wsize; \ - state->whave = left; \ - if (out(out_desc, put, left)) { \ - ret = Z_BUF_ERROR; \ - goto inf_leave; \ - } \ - } \ - } while (0) - -/* - strm provides the memory allocation functions and window buffer on input, - and provides information on the unused input on return. For Z_DATA_ERROR - returns, strm will also provide an error message. - - in() and out() are the call-back input and output functions. When - inflateBack() needs more input, it calls in(). When inflateBack() has - filled the window with output, or when it completes with data in the - window, it calls out() to write out the data. The application must not - change the provided input until in() is called again or inflateBack() - returns. The application must not change the window/output buffer until - inflateBack() returns. - - in() and out() are called with a descriptor parameter provided in the - inflateBack() call. This parameter can be a structure that provides the - information required to do the read or write, as well as accumulated - information on the input and output such as totals and check values. - - in() should return zero on failure. out() should return non-zero on - failure. If either in() or out() fails, than inflateBack() returns a - Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it - was in() or out() that caused in the error. Otherwise, inflateBack() - returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format - error, or Z_MEM_ERROR if it could not allocate memory for the state. - inflateBack() can also return Z_STREAM_ERROR if the input parameters - are not correct, i.e. strm is Z_NULL or the state was not initialized. - */ -int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc) -z_streamp strm; -in_func in; -void FAR *in_desc; -out_func out; -void FAR *out_desc; -{ - struct inflate_state FAR *state; - z_const unsigned char FAR *next; /* next input */ - unsigned char FAR *put; /* next output */ - unsigned have, left; /* available input and output */ - unsigned long hold; /* bit buffer */ - unsigned bits; /* bits in bit buffer */ - unsigned copy; /* number of stored or match bytes to copy */ - unsigned char FAR *from; /* where to copy match bytes from */ - code here; /* current decoding table entry */ - code last; /* parent table entry */ - unsigned len; /* length to copy for repeats, bits to drop */ - int ret; /* return code */ - static const unsigned short order[19] = /* permutation of code lengths */ - {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - - /* Check that the strm exists and that the state was initialized */ - if (strm == Z_NULL || strm->state == Z_NULL) - return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - - /* Reset the state */ - strm->msg = Z_NULL; - state->mode = TYPE; - state->last = 0; - state->whave = 0; - next = strm->next_in; - have = next != Z_NULL ? strm->avail_in : 0; - hold = 0; - bits = 0; - put = state->window; - left = state->wsize; - - /* Inflate until end of block marked as last */ - for (;;) - switch (state->mode) { - case TYPE: - /* determine and dispatch block type */ - if (state->last) { - BYTEBITS(); - state->mode = DONE; - break; - } - NEEDBITS(3); - state->last = BITS(1); - DROPBITS(1); - switch (BITS(2)) { - case 0: /* stored block */ - Tracev((stderr, "inflate: stored block%s\n", - state->last ? " (last)" : "")); - state->mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - Tracev((stderr, "inflate: fixed codes block%s\n", - state->last ? " (last)" : "")); - state->mode = LEN; /* decode codes */ - break; - case 2: /* dynamic block */ - Tracev((stderr, "inflate: dynamic codes block%s\n", - state->last ? " (last)" : "")); - state->mode = TABLE; - break; - case 3: - strm->msg = (char *)"invalid block type"; - state->mode = BAD; - } - DROPBITS(2); - break; - - case STORED: - /* get and verify stored block length */ - BYTEBITS(); /* go to byte boundary */ - NEEDBITS(32); - if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { - strm->msg = (char *)"invalid stored block lengths"; - state->mode = BAD; - break; - } - state->length = (unsigned)hold & 0xffff; - Tracev((stderr, "inflate: stored length %u\n", - state->length)); - INITBITS(); - - /* copy stored block from input to output */ - while (state->length != 0) { - copy = state->length; - PULL(); - ROOM(); - if (copy > have) copy = have; - if (copy > left) copy = left; - zmemcpy(put, next, copy); - have -= copy; - next += copy; - left -= copy; - put += copy; - state->length -= copy; - } - Tracev((stderr, "inflate: stored end\n")); - state->mode = TYPE; - break; - - case TABLE: - /* get dynamic table entries descriptor */ - NEEDBITS(14); - state->nlen = BITS(5) + 257; - DROPBITS(5); - state->ndist = BITS(5) + 1; - DROPBITS(5); - state->ncode = BITS(4) + 4; - DROPBITS(4); -#ifndef PKZIP_BUG_WORKAROUND - if (state->nlen > 286 || state->ndist > 30) { - strm->msg = (char *)"too many length or distance symbols"; - state->mode = BAD; - break; - } -#endif - Tracev((stderr, "inflate: table sizes ok\n")); - - /* get code length code lengths (not a typo) */ - state->have = 0; - while (state->have < state->ncode) { - NEEDBITS(3); - state->lens[order[state->have++]] = (unsigned short)BITS(3); - DROPBITS(3); - } - while (state->have < 19) - state->lens[order[state->have++]] = 0; - state->next = state->codes; - state->lencode = (code const FAR *)(state->next); - state->lenbits = 7; - ret = inflate_table(CODES, state->lens, 19, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid code lengths set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: code lengths ok\n")); - - /* get length and distance code code lengths */ - state->have = 0; - while (state->have < state->nlen + state->ndist) { - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.val < 16) { - DROPBITS(here.bits); - state->lens[state->have++] = here.val; - } - else { - if (here.val == 16) { - NEEDBITS(here.bits + 2); - DROPBITS(here.bits); - if (state->have == 0) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - len = (unsigned)(state->lens[state->have - 1]); - copy = 3 + BITS(2); - DROPBITS(2); - } - else if (here.val == 17) { - NEEDBITS(here.bits + 3); - DROPBITS(here.bits); - len = 0; - copy = 3 + BITS(3); - DROPBITS(3); - } - else { - NEEDBITS(here.bits + 7); - DROPBITS(here.bits); - len = 0; - copy = 11 + BITS(7); - DROPBITS(7); - } - if (state->have + copy > state->nlen + state->ndist) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - while (copy--) - state->lens[state->have++] = (unsigned short)len; - } - } - - /* handle error breaks in while */ - if (state->mode == BAD) break; - - /* check for end-of-block code (better have one) */ - if (state->lens[256] == 0) { - strm->msg = (char *)"invalid code -- missing end-of-block"; - state->mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state->next = state->codes; - state->lencode = (code const FAR *)(state->next); - state->lenbits = 9; - ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid literal/lengths set"; - state->mode = BAD; - break; - } - state->distcode = (code const FAR *)(state->next); - state->distbits = 6; - ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, - &(state->next), &(state->distbits), state->work); - if (ret) { - strm->msg = (char *)"invalid distances set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: codes ok\n")); - state->mode = LEN; - /* fallthrough */ - - case LEN: - /* use inflate_fast() if we have enough input and output */ - if (have >= 6 && left >= 258) { - RESTORE(); - if (state->whave < state->wsize) - state->whave = state->wsize - left; - inflate_fast(strm, state->wsize); - LOAD(); - break; - } - - /* get a literal, length, or end-of-block code */ - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.op && (here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->lencode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - } - DROPBITS(here.bits); - state->length = (unsigned)here.val; - - /* process literal */ - if (here.op == 0) { - Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here.val)); - ROOM(); - *put++ = (unsigned char)(state->length); - left--; - state->mode = LEN; - break; - } - - /* process end of block */ - if (here.op & 32) { - Tracevv((stderr, "inflate: end of block\n")); - state->mode = TYPE; - break; - } - - /* invalid code */ - if (here.op & 64) { - strm->msg = (char *)"invalid literal/length code"; - state->mode = BAD; - break; - } - - /* length code -- get extra bits, if any */ - state->extra = (unsigned)(here.op) & 15; - if (state->extra != 0) { - NEEDBITS(state->extra); - state->length += BITS(state->extra); - DROPBITS(state->extra); - } - Tracevv((stderr, "inflate: length %u\n", state->length)); - - /* get distance code */ - for (;;) { - here = state->distcode[BITS(state->distbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if ((here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->distcode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - } - DROPBITS(here.bits); - if (here.op & 64) { - strm->msg = (char *)"invalid distance code"; - state->mode = BAD; - break; - } - state->offset = (unsigned)here.val; - - /* get distance extra bits, if any */ - state->extra = (unsigned)(here.op) & 15; - if (state->extra != 0) { - NEEDBITS(state->extra); - state->offset += BITS(state->extra); - DROPBITS(state->extra); - } - if (state->offset > state->wsize - (state->whave < state->wsize ? - left : 0)) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } - Tracevv((stderr, "inflate: distance %u\n", state->offset)); - - /* copy match from window to output */ - do { - ROOM(); - copy = state->wsize - state->offset; - if (copy < left) { - from = put + copy; - copy = left - copy; - } - else { - from = put - state->offset; - copy = left; - } - if (copy > state->length) copy = state->length; - state->length -= copy; - left -= copy; - do { - *put++ = *from++; - } while (--copy); - } while (state->length != 0); - break; - - case DONE: - /* inflate stream terminated properly -- write leftover output */ - ret = Z_STREAM_END; - if (left < state->wsize) { - if (out(out_desc, state->window, state->wsize - left)) - ret = Z_BUF_ERROR; - } - goto inf_leave; - - case BAD: - ret = Z_DATA_ERROR; - goto inf_leave; - - default: /* can't happen, but makes compilers happy */ - ret = Z_STREAM_ERROR; - goto inf_leave; - } - - /* Return unused input */ - inf_leave: - strm->next_in = next; - strm->avail_in = have; - return ret; -} - -int ZEXPORT inflateBackEnd(strm) -z_streamp strm; -{ - if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) - return Z_STREAM_ERROR; - ZFREE(strm, strm->state); - strm->state = Z_NULL; - Tracev((stderr, "inflate: end\n")); - return Z_OK; -} diff --git a/thirdparty/zlib-1.2.12/inffast.c b/thirdparty/zlib-1.2.12/inffast.c deleted file mode 100644 index 1fec7f3..0000000 --- a/thirdparty/zlib-1.2.12/inffast.c +++ /dev/null @@ -1,323 +0,0 @@ -/* inffast.c -- fast decoding - * Copyright (C) 1995-2017 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" - -#ifdef ASMINF -# pragma message("Assembler code may have bugs -- use at your own risk") -#else - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state->mode == LEN - strm->avail_in >= 6 - strm->avail_out >= 258 - start >= strm->avail_out - state->bits < 8 - - On return, state->mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm->avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm->avail_out >= 258 for each loop to avoid checking for - output space. - */ -void ZLIB_INTERNAL inflate_fast(strm, start) -z_streamp strm; -unsigned start; /* inflate()'s starting value for strm->avail_out */ -{ - struct inflate_state FAR *state; - z_const unsigned char FAR *in; /* local strm->next_in */ - z_const unsigned char FAR *last; /* have enough input while in < last */ - unsigned char FAR *out; /* local strm->next_out */ - unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ - unsigned char FAR *end; /* while out < end, enough space available */ -#ifdef INFLATE_STRICT - unsigned dmax; /* maximum distance from zlib header */ -#endif - unsigned wsize; /* window size or zero if not using window */ - unsigned whave; /* valid bytes in the window */ - unsigned wnext; /* window write index */ - unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ - unsigned long hold; /* local strm->hold */ - unsigned bits; /* local strm->bits */ - code const FAR *lcode; /* local strm->lencode */ - code const FAR *dcode; /* local strm->distcode */ - unsigned lmask; /* mask for first level of length codes */ - unsigned dmask; /* mask for first level of distance codes */ - code const *here; /* retrieved table entry */ - unsigned op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - unsigned len; /* match length, unused bytes */ - unsigned dist; /* match distance */ - unsigned char FAR *from; /* where to copy match from */ - - /* copy state to local variables */ - state = (struct inflate_state FAR *)strm->state; - in = strm->next_in; - last = in + (strm->avail_in - 5); - out = strm->next_out; - beg = out - (start - strm->avail_out); - end = out + (strm->avail_out - 257); -#ifdef INFLATE_STRICT - dmax = state->dmax; -#endif - wsize = state->wsize; - whave = state->whave; - wnext = state->wnext; - window = state->window; - hold = state->hold; - bits = state->bits; - lcode = state->lencode; - dcode = state->distcode; - lmask = (1U << state->lenbits) - 1; - dmask = (1U << state->distbits) - 1; - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - do { - if (bits < 15) { - hold += (unsigned long)(*in++) << bits; - bits += 8; - hold += (unsigned long)(*in++) << bits; - bits += 8; - } - here = lcode + (hold & lmask); - dolen: - op = (unsigned)(here->bits); - hold >>= op; - bits -= op; - op = (unsigned)(here->op); - if (op == 0) { /* literal */ - Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here->val)); - *out++ = (unsigned char)(here->val); - } - else if (op & 16) { /* length base */ - len = (unsigned)(here->val); - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += (unsigned long)(*in++) << bits; - bits += 8; - } - len += (unsigned)hold & ((1U << op) - 1); - hold >>= op; - bits -= op; - } - Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += (unsigned long)(*in++) << bits; - bits += 8; - hold += (unsigned long)(*in++) << bits; - bits += 8; - } - here = dcode + (hold & dmask); - dodist: - op = (unsigned)(here->bits); - hold >>= op; - bits -= op; - op = (unsigned)(here->op); - if (op & 16) { /* distance base */ - dist = (unsigned)(here->val); - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += (unsigned long)(*in++) << bits; - bits += 8; - if (bits < op) { - hold += (unsigned long)(*in++) << bits; - bits += 8; - } - } - dist += (unsigned)hold & ((1U << op) - 1); -#ifdef INFLATE_STRICT - if (dist > dmax) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#endif - hold >>= op; - bits -= op; - Tracevv((stderr, "inflate: distance %u\n", dist)); - op = (unsigned)(out - beg); /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state->sane) { - strm->msg = - (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - if (len <= op - whave) { - do { - *out++ = 0; - } while (--len); - continue; - } - len -= op - whave; - do { - *out++ = 0; - } while (--op > whave); - if (op == 0) { - from = out - dist; - do { - *out++ = *from++; - } while (--len); - continue; - } -#endif - } - from = window; - if (wnext == 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - *out++ = *from++; - } while (--op); - from = out - dist; /* rest from output */ - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - *out++ = *from++; - } while (--op); - from = window; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - *out++ = *from++; - } while (--op); - from = out - dist; /* rest from output */ - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - *out++ = *from++; - } while (--op); - from = out - dist; /* rest from output */ - } - } - while (len > 2) { - *out++ = *from++; - *out++ = *from++; - *out++ = *from++; - len -= 3; - } - if (len) { - *out++ = *from++; - if (len > 1) - *out++ = *from++; - } - } - else { - from = out - dist; /* copy direct from output */ - do { /* minimum length is three */ - *out++ = *from++; - *out++ = *from++; - *out++ = *from++; - len -= 3; - } while (len > 2); - if (len) { - *out++ = *from++; - if (len > 1) - *out++ = *from++; - } - } - } - else if ((op & 64) == 0) { /* 2nd level distance code */ - here = dcode + here->val + (hold & ((1U << op) - 1)); - goto dodist; - } - else { - strm->msg = (char *)"invalid distance code"; - state->mode = BAD; - break; - } - } - else if ((op & 64) == 0) { /* 2nd level length code */ - here = lcode + here->val + (hold & ((1U << op) - 1)); - goto dolen; - } - else if (op & 32) { /* end-of-block */ - Tracevv((stderr, "inflate: end of block\n")); - state->mode = TYPE; - break; - } - else { - strm->msg = (char *)"invalid literal/length code"; - state->mode = BAD; - break; - } - } while (in < last && out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - in -= len; - bits -= len << 3; - hold &= (1U << bits) - 1; - - /* update state and return */ - strm->next_in = in; - strm->next_out = out; - strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); - strm->avail_out = (unsigned)(out < end ? - 257 + (end - out) : 257 - (out - end)); - state->hold = hold; - state->bits = bits; - return; -} - -/* - inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): - - Using bit fields for code structure - - Different op definition to avoid & for extra bits (do & for table bits) - - Three separate decoding do-loops for direct, window, and wnext == 0 - - Special case for distance > 1 copies to do overlapped load and store copy - - Explicit branch predictions (based on measured branch probabilities) - - Deferring match copy and interspersed it with decoding subsequent codes - - Swapping literal/length else - - Swapping window/direct else - - Larger unrolled copy loops (three is about right) - - Moving len -= 3 statement into middle of loop - */ - -#endif /* !ASMINF */ diff --git a/thirdparty/zlib-1.2.12/inffast.h b/thirdparty/zlib-1.2.12/inffast.h deleted file mode 100644 index e5c1aa4..0000000 --- a/thirdparty/zlib-1.2.12/inffast.h +++ /dev/null @@ -1,11 +0,0 @@ -/* inffast.h -- header to use inffast.c - * Copyright (C) 1995-2003, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); diff --git a/thirdparty/zlib-1.2.12/inffixed.h b/thirdparty/zlib-1.2.12/inffixed.h deleted file mode 100644 index d628327..0000000 --- a/thirdparty/zlib-1.2.12/inffixed.h +++ /dev/null @@ -1,94 +0,0 @@ - /* inffixed.h -- table for decoding fixed codes - * Generated automatically by makefixed(). - */ - - /* WARNING: this file should *not* be used by applications. - It is part of the implementation of this library and is - subject to change. Applications should only use zlib.h. - */ - - static const code lenfix[512] = { - {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, - {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, - {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, - {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, - {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, - {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, - {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, - {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, - {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, - {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, - {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, - {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, - {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, - {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, - {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, - {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, - {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, - {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, - {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, - {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, - {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, - {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, - {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, - {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, - {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, - {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, - {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, - {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, - {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, - {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, - {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, - {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, - {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55}, - {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, - {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, - {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, - {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, - {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, - {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, - {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, - {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, - {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, - {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, - {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, - {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, - {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, - {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, - {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, - {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, - {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, - {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51}, - {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, - {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, - {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, - {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, - {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, - {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, - {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, - {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, - {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258}, - {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, - {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, - {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, - {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, - {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, - {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, - {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, - {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, - {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, - {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, - {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, - {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, - {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, - {0,9,255} - }; - - static const code distfix[32] = { - {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, - {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, - {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, - {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, - {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, - {22,5,193},{64,5,0} - }; diff --git a/thirdparty/zlib-1.2.12/inflate.c b/thirdparty/zlib-1.2.12/inflate.c deleted file mode 100644 index 7be8c63..0000000 --- a/thirdparty/zlib-1.2.12/inflate.c +++ /dev/null @@ -1,1592 +0,0 @@ -/* inflate.c -- zlib decompression - * Copyright (C) 1995-2022 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * Change history: - * - * 1.2.beta0 24 Nov 2002 - * - First version -- complete rewrite of inflate to simplify code, avoid - * creation of window when not needed, minimize use of window when it is - * needed, make inffast.c even faster, implement gzip decoding, and to - * improve code readability and style over the previous zlib inflate code - * - * 1.2.beta1 25 Nov 2002 - * - Use pointers for available input and output checking in inffast.c - * - Remove input and output counters in inffast.c - * - Change inffast.c entry and loop from avail_in >= 7 to >= 6 - * - Remove unnecessary second byte pull from length extra in inffast.c - * - Unroll direct copy to three copies per loop in inffast.c - * - * 1.2.beta2 4 Dec 2002 - * - Change external routine names to reduce potential conflicts - * - Correct filename to inffixed.h for fixed tables in inflate.c - * - Make hbuf[] unsigned char to match parameter type in inflate.c - * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset) - * to avoid negation problem on Alphas (64 bit) in inflate.c - * - * 1.2.beta3 22 Dec 2002 - * - Add comments on state->bits assertion in inffast.c - * - Add comments on op field in inftrees.h - * - Fix bug in reuse of allocated window after inflateReset() - * - Remove bit fields--back to byte structure for speed - * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths - * - Change post-increments to pre-increments in inflate_fast(), PPC biased? - * - Add compile time option, POSTINC, to use post-increments instead (Intel?) - * - Make MATCH copy in inflate() much faster for when inflate_fast() not used - * - Use local copies of stream next and avail values, as well as local bit - * buffer and bit count in inflate()--for speed when inflate_fast() not used - * - * 1.2.beta4 1 Jan 2003 - * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings - * - Move a comment on output buffer sizes from inffast.c to inflate.c - * - Add comments in inffast.c to introduce the inflate_fast() routine - * - Rearrange window copies in inflate_fast() for speed and simplification - * - Unroll last copy for window match in inflate_fast() - * - Use local copies of window variables in inflate_fast() for speed - * - Pull out common wnext == 0 case for speed in inflate_fast() - * - Make op and len in inflate_fast() unsigned for consistency - * - Add FAR to lcode and dcode declarations in inflate_fast() - * - Simplified bad distance check in inflate_fast() - * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new - * source file infback.c to provide a call-back interface to inflate for - * programs like gzip and unzip -- uses window as output buffer to avoid - * window copying - * - * 1.2.beta5 1 Jan 2003 - * - Improved inflateBack() interface to allow the caller to provide initial - * input in strm. - * - Fixed stored blocks bug in inflateBack() - * - * 1.2.beta6 4 Jan 2003 - * - Added comments in inffast.c on effectiveness of POSTINC - * - Typecasting all around to reduce compiler warnings - * - Changed loops from while (1) or do {} while (1) to for (;;), again to - * make compilers happy - * - Changed type of window in inflateBackInit() to unsigned char * - * - * 1.2.beta7 27 Jan 2003 - * - Changed many types to unsigned or unsigned short to avoid warnings - * - Added inflateCopy() function - * - * 1.2.0 9 Mar 2003 - * - Changed inflateBack() interface to provide separate opaque descriptors - * for the in() and out() functions - * - Changed inflateBack() argument and in_func typedef to swap the length - * and buffer address return values for the input function - * - Check next_in and next_out for Z_NULL on entry to inflate() - * - * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. - */ - -#include "zutil.h" -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" - -#ifdef MAKEFIXED -# ifndef BUILDFIXED -# define BUILDFIXED -# endif -#endif - -/* function prototypes */ -local int inflateStateCheck OF((z_streamp strm)); -local void fixedtables OF((struct inflate_state FAR *state)); -local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, - unsigned copy)); -#ifdef BUILDFIXED - void makefixed OF((void)); -#endif -local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, - unsigned len)); - -local int inflateStateCheck(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - if (strm == Z_NULL || - strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) - return 1; - state = (struct inflate_state FAR *)strm->state; - if (state == Z_NULL || state->strm != strm || - state->mode < HEAD || state->mode > SYNC) - return 1; - return 0; -} - -int ZEXPORT inflateResetKeep(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - strm->total_in = strm->total_out = state->total = 0; - strm->msg = Z_NULL; - if (state->wrap) /* to support ill-conceived Java test suite */ - strm->adler = state->wrap & 1; - state->mode = HEAD; - state->last = 0; - state->havedict = 0; - state->flags = -1; - state->dmax = 32768U; - state->head = Z_NULL; - state->hold = 0; - state->bits = 0; - state->lencode = state->distcode = state->next = state->codes; - state->sane = 1; - state->back = -1; - Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -int ZEXPORT inflateReset(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - state->wsize = 0; - state->whave = 0; - state->wnext = 0; - return inflateResetKeep(strm); -} - -int ZEXPORT inflateReset2(strm, windowBits) -z_streamp strm; -int windowBits; -{ - int wrap; - struct inflate_state FAR *state; - - /* get the state */ - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 5; -#ifdef GUNZIP - if (windowBits < 48) - windowBits &= 15; -#endif - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) - return Z_STREAM_ERROR; - if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) { - ZFREE(strm, state->window); - state->window = Z_NULL; - } - - /* update state and reset the rest of it */ - state->wrap = wrap; - state->wbits = (unsigned)windowBits; - return inflateReset(strm); -} - -int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) -z_streamp strm; -int windowBits; -const char *version; -int stream_size; -{ - int ret; - struct inflate_state FAR *state; - - if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || - stream_size != (int)(sizeof(z_stream))) - return Z_VERSION_ERROR; - if (strm == Z_NULL) return Z_STREAM_ERROR; - strm->msg = Z_NULL; /* in case we return an error */ - if (strm->zalloc == (alloc_func)0) { -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; -#endif - } - if (strm->zfree == (free_func)0) -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zfree = zcfree; -#endif - state = (struct inflate_state FAR *) - ZALLOC(strm, 1, sizeof(struct inflate_state)); - if (state == Z_NULL) return Z_MEM_ERROR; - Tracev((stderr, "inflate: allocated\n")); - strm->state = (struct internal_state FAR *)state; - state->strm = strm; - state->window = Z_NULL; - state->mode = HEAD; /* to pass state test in inflateReset2() */ - ret = inflateReset2(strm, windowBits); - if (ret != Z_OK) { - ZFREE(strm, state); - strm->state = Z_NULL; - } - return ret; -} - -int ZEXPORT inflateInit_(strm, version, stream_size) -z_streamp strm; -const char *version; -int stream_size; -{ - return inflateInit2_(strm, DEF_WBITS, version, stream_size); -} - -int ZEXPORT inflatePrime(strm, bits, value) -z_streamp strm; -int bits; -int value; -{ - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (bits < 0) { - state->hold = 0; - state->bits = 0; - return Z_OK; - } - if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR; - value &= (1L << bits) - 1; - state->hold += (unsigned)value << state->bits; - state->bits += (uInt)bits; - return Z_OK; -} - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -local void fixedtables(state) -struct inflate_state FAR *state; -{ -#ifdef BUILDFIXED - static int virgin = 1; - static code *lenfix, *distfix; - static code fixed[544]; - - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - unsigned sym, bits; - static code *next; - - /* literal/length table */ - sym = 0; - while (sym < 144) state->lens[sym++] = 8; - while (sym < 256) state->lens[sym++] = 9; - while (sym < 280) state->lens[sym++] = 7; - while (sym < 288) state->lens[sym++] = 8; - next = fixed; - lenfix = next; - bits = 9; - inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); - - /* distance table */ - sym = 0; - while (sym < 32) state->lens[sym++] = 5; - distfix = next; - bits = 5; - inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); - - /* do this just once */ - virgin = 0; - } -#else /* !BUILDFIXED */ -# include "inffixed.h" -#endif /* BUILDFIXED */ - state->lencode = lenfix; - state->lenbits = 9; - state->distcode = distfix; - state->distbits = 5; -} - -#ifdef MAKEFIXED -#include - -/* - Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also - defines BUILDFIXED, so the tables are built on the fly. makefixed() writes - those tables to stdout, which would be piped to inffixed.h. A small program - can simply call makefixed to do this: - - void makefixed(void); - - int main(void) - { - makefixed(); - return 0; - } - - Then that can be linked with zlib built with MAKEFIXED defined and run: - - a.out > inffixed.h - */ -void makefixed() -{ - unsigned low, size; - struct inflate_state state; - - fixedtables(&state); - puts(" /* inffixed.h -- table for decoding fixed codes"); - puts(" * Generated automatically by makefixed()."); - puts(" */"); - puts(""); - puts(" /* WARNING: this file should *not* be used by applications."); - puts(" It is part of the implementation of this library and is"); - puts(" subject to change. Applications should only use zlib.h."); - puts(" */"); - puts(""); - size = 1U << 9; - printf(" static const code lenfix[%u] = {", size); - low = 0; - for (;;) { - if ((low % 7) == 0) printf("\n "); - printf("{%u,%u,%d}", (low & 127) == 99 ? 64 : state.lencode[low].op, - state.lencode[low].bits, state.lencode[low].val); - if (++low == size) break; - putchar(','); - } - puts("\n };"); - size = 1U << 5; - printf("\n static const code distfix[%u] = {", size); - low = 0; - for (;;) { - if ((low % 6) == 0) printf("\n "); - printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits, - state.distcode[low].val); - if (++low == size) break; - putchar(','); - } - puts("\n };"); -} -#endif /* MAKEFIXED */ - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -local int updatewindow(strm, end, copy) -z_streamp strm; -const Bytef *end; -unsigned copy; -{ - struct inflate_state FAR *state; - unsigned dist; - - state = (struct inflate_state FAR *)strm->state; - - /* if it hasn't been done already, allocate space for the window */ - if (state->window == Z_NULL) { - state->window = (unsigned char FAR *) - ZALLOC(strm, 1U << state->wbits, - sizeof(unsigned char)); - if (state->window == Z_NULL) return 1; - } - - /* if window not in use yet, initialize */ - if (state->wsize == 0) { - state->wsize = 1U << state->wbits; - state->wnext = 0; - state->whave = 0; - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state->wsize) { - zmemcpy(state->window, end - state->wsize, state->wsize); - state->wnext = 0; - state->whave = state->wsize; - } - else { - dist = state->wsize - state->wnext; - if (dist > copy) dist = copy; - zmemcpy(state->window + state->wnext, end - copy, dist); - copy -= dist; - if (copy) { - zmemcpy(state->window, end - copy, copy); - state->wnext = copy; - state->whave = state->wsize; - } - else { - state->wnext += dist; - if (state->wnext == state->wsize) state->wnext = 0; - if (state->whave < state->wsize) state->whave += dist; - } - } - return 0; -} - -/* Macros for inflate(): */ - -/* check function to use adler32() for zlib or crc32() for gzip */ -#ifdef GUNZIP -# define UPDATE_CHECK(check, buf, len) \ - (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) -#else -# define UPDATE_CHECK(check, buf, len) adler32(check, buf, len) -#endif - -/* check macros for header crc */ -#ifdef GUNZIP -# define CRC2(check, word) \ - do { \ - hbuf[0] = (unsigned char)(word); \ - hbuf[1] = (unsigned char)((word) >> 8); \ - check = crc32(check, hbuf, 2); \ - } while (0) - -# define CRC4(check, word) \ - do { \ - hbuf[0] = (unsigned char)(word); \ - hbuf[1] = (unsigned char)((word) >> 8); \ - hbuf[2] = (unsigned char)((word) >> 16); \ - hbuf[3] = (unsigned char)((word) >> 24); \ - check = crc32(check, hbuf, 4); \ - } while (0) -#endif - -/* Load registers with state in inflate() for speed */ -#define LOAD() \ - do { \ - put = strm->next_out; \ - left = strm->avail_out; \ - next = strm->next_in; \ - have = strm->avail_in; \ - hold = state->hold; \ - bits = state->bits; \ - } while (0) - -/* Restore state from registers in inflate() */ -#define RESTORE() \ - do { \ - strm->next_out = put; \ - strm->avail_out = left; \ - strm->next_in = next; \ - strm->avail_in = have; \ - state->hold = hold; \ - state->bits = bits; \ - } while (0) - -/* Clear the input bit accumulator */ -#define INITBITS() \ - do { \ - hold = 0; \ - bits = 0; \ - } while (0) - -/* Get a byte of input into the bit accumulator, or return from inflate() - if there is no input available. */ -#define PULLBYTE() \ - do { \ - if (have == 0) goto inf_leave; \ - have--; \ - hold += (unsigned long)(*next++) << bits; \ - bits += 8; \ - } while (0) - -/* Assure that there are at least n bits in the bit accumulator. If there is - not enough available input to do that, then return from inflate(). */ -#define NEEDBITS(n) \ - do { \ - while (bits < (unsigned)(n)) \ - PULLBYTE(); \ - } while (0) - -/* Return the low n bits of the bit accumulator (n < 16) */ -#define BITS(n) \ - ((unsigned)hold & ((1U << (n)) - 1)) - -/* Remove n bits from the bit accumulator */ -#define DROPBITS(n) \ - do { \ - hold >>= (n); \ - bits -= (unsigned)(n); \ - } while (0) - -/* Remove zero to seven bits as needed to go to a byte boundary */ -#define BYTEBITS() \ - do { \ - hold >>= bits & 7; \ - bits -= bits & 7; \ - } while (0) - -/* - inflate() uses a state machine to process as much input data and generate as - much output data as possible before returning. The state machine is - structured roughly as follows: - - for (;;) switch (state) { - ... - case STATEn: - if (not enough input data or output space to make progress) - return; - ... make progress ... - state = STATEm; - break; - ... - } - - so when inflate() is called again, the same case is attempted again, and - if the appropriate resources are provided, the machine proceeds to the - next state. The NEEDBITS() macro is usually the way the state evaluates - whether it can proceed or should return. NEEDBITS() does the return if - the requested bits are not available. The typical use of the BITS macros - is: - - NEEDBITS(n); - ... do something with BITS(n) ... - DROPBITS(n); - - where NEEDBITS(n) either returns from inflate() if there isn't enough - input left to load n bits into the accumulator, or it continues. BITS(n) - gives the low n bits in the accumulator. When done, DROPBITS(n) drops - the low n bits off the accumulator. INITBITS() clears the accumulator - and sets the number of available bits to zero. BYTEBITS() discards just - enough bits to put the accumulator on a byte boundary. After BYTEBITS() - and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. - - NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return - if there is no input available. The decoding of variable length codes uses - PULLBYTE() directly in order to pull just enough bytes to decode the next - code, and no more. - - Some states loop until they get enough input, making sure that enough - state information is maintained to continue the loop where it left off - if NEEDBITS() returns in the loop. For example, want, need, and keep - would all have to actually be part of the saved state in case NEEDBITS() - returns: - - case STATEw: - while (want < need) { - NEEDBITS(n); - keep[want++] = BITS(n); - DROPBITS(n); - } - state = STATEx; - case STATEx: - - As shown above, if the next state is also the next case, then the break - is omitted. - - A state may also return if there is not enough output space available to - complete that state. Those states are copying stored data, writing a - literal byte, and copying a matching string. - - When returning, a "goto inf_leave" is used to update the total counters, - update the check value, and determine whether any progress has been made - during that inflate() call in order to return the proper return code. - Progress is defined as a change in either strm->avail_in or strm->avail_out. - When there is a window, goto inf_leave will update the window with the last - output written. If a goto inf_leave occurs in the middle of decompression - and there is no window currently, goto inf_leave will create one and copy - output to the window for the next call of inflate(). - - In this implementation, the flush parameter of inflate() only affects the - return code (per zlib.h). inflate() always writes as much as possible to - strm->next_out, given the space available and the provided input--the effect - documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers - the allocation of and copying into a sliding window until necessary, which - provides the effect documented in zlib.h for Z_FINISH when the entire input - stream available. So the only thing the flush parameter actually does is: - when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it - will return Z_BUF_ERROR if it has not reached the end of the stream. - */ - -int ZEXPORT inflate(strm, flush) -z_streamp strm; -int flush; -{ - struct inflate_state FAR *state; - z_const unsigned char FAR *next; /* next input */ - unsigned char FAR *put; /* next output */ - unsigned have, left; /* available input and output */ - unsigned long hold; /* bit buffer */ - unsigned bits; /* bits in bit buffer */ - unsigned in, out; /* save starting available input and output */ - unsigned copy; /* number of stored or match bytes to copy */ - unsigned char FAR *from; /* where to copy match bytes from */ - code here; /* current decoding table entry */ - code last; /* parent table entry */ - unsigned len; /* length to copy for repeats, bits to drop */ - int ret; /* return code */ -#ifdef GUNZIP - unsigned char hbuf[4]; /* buffer for gzip header crc calculation */ -#endif - static const unsigned short order[19] = /* permutation of code lengths */ - {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - - if (inflateStateCheck(strm) || strm->next_out == Z_NULL || - (strm->next_in == Z_NULL && strm->avail_in != 0)) - return Z_STREAM_ERROR; - - state = (struct inflate_state FAR *)strm->state; - if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */ - LOAD(); - in = have; - out = left; - ret = Z_OK; - for (;;) - switch (state->mode) { - case HEAD: - if (state->wrap == 0) { - state->mode = TYPEDO; - break; - } - NEEDBITS(16); -#ifdef GUNZIP - if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ - if (state->wbits == 0) - state->wbits = 15; - state->check = crc32(0L, Z_NULL, 0); - CRC2(state->check, hold); - INITBITS(); - state->mode = FLAGS; - break; - } - if (state->head != Z_NULL) - state->head->done = -1; - if (!(state->wrap & 1) || /* check if zlib header allowed */ -#else - if ( -#endif - ((BITS(8) << 8) + (hold >> 8)) % 31) { - strm->msg = (char *)"incorrect header check"; - state->mode = BAD; - break; - } - if (BITS(4) != Z_DEFLATED) { - strm->msg = (char *)"unknown compression method"; - state->mode = BAD; - break; - } - DROPBITS(4); - len = BITS(4) + 8; - if (state->wbits == 0) - state->wbits = len; - if (len > 15 || len > state->wbits) { - strm->msg = (char *)"invalid window size"; - state->mode = BAD; - break; - } - state->dmax = 1U << len; - state->flags = 0; /* indicate zlib header */ - Tracev((stderr, "inflate: zlib header ok\n")); - strm->adler = state->check = adler32(0L, Z_NULL, 0); - state->mode = hold & 0x200 ? DICTID : TYPE; - INITBITS(); - break; -#ifdef GUNZIP - case FLAGS: - NEEDBITS(16); - state->flags = (int)(hold); - if ((state->flags & 0xff) != Z_DEFLATED) { - strm->msg = (char *)"unknown compression method"; - state->mode = BAD; - break; - } - if (state->flags & 0xe000) { - strm->msg = (char *)"unknown header flags set"; - state->mode = BAD; - break; - } - if (state->head != Z_NULL) - state->head->text = (int)((hold >> 8) & 1); - if ((state->flags & 0x0200) && (state->wrap & 4)) - CRC2(state->check, hold); - INITBITS(); - state->mode = TIME; - /* fallthrough */ - case TIME: - NEEDBITS(32); - if (state->head != Z_NULL) - state->head->time = hold; - if ((state->flags & 0x0200) && (state->wrap & 4)) - CRC4(state->check, hold); - INITBITS(); - state->mode = OS; - /* fallthrough */ - case OS: - NEEDBITS(16); - if (state->head != Z_NULL) { - state->head->xflags = (int)(hold & 0xff); - state->head->os = (int)(hold >> 8); - } - if ((state->flags & 0x0200) && (state->wrap & 4)) - CRC2(state->check, hold); - INITBITS(); - state->mode = EXLEN; - /* fallthrough */ - case EXLEN: - if (state->flags & 0x0400) { - NEEDBITS(16); - state->length = (unsigned)(hold); - if (state->head != Z_NULL) - state->head->extra_len = (unsigned)hold; - if ((state->flags & 0x0200) && (state->wrap & 4)) - CRC2(state->check, hold); - INITBITS(); - } - else if (state->head != Z_NULL) - state->head->extra = Z_NULL; - state->mode = EXTRA; - /* fallthrough */ - case EXTRA: - if (state->flags & 0x0400) { - copy = state->length; - if (copy > have) copy = have; - if (copy) { - if (state->head != Z_NULL && - state->head->extra != Z_NULL) { - len = state->head->extra_len - state->length; - zmemcpy(state->head->extra + len, next, - len + copy > state->head->extra_max ? - state->head->extra_max - len : copy); - } - if ((state->flags & 0x0200) && (state->wrap & 4)) - state->check = crc32(state->check, next, copy); - have -= copy; - next += copy; - state->length -= copy; - } - if (state->length) goto inf_leave; - } - state->length = 0; - state->mode = NAME; - /* fallthrough */ - case NAME: - if (state->flags & 0x0800) { - if (have == 0) goto inf_leave; - copy = 0; - do { - len = (unsigned)(next[copy++]); - if (state->head != Z_NULL && - state->head->name != Z_NULL && - state->length < state->head->name_max) - state->head->name[state->length++] = (Bytef)len; - } while (len && copy < have); - if ((state->flags & 0x0200) && (state->wrap & 4)) - state->check = crc32(state->check, next, copy); - have -= copy; - next += copy; - if (len) goto inf_leave; - } - else if (state->head != Z_NULL) - state->head->name = Z_NULL; - state->length = 0; - state->mode = COMMENT; - /* fallthrough */ - case COMMENT: - if (state->flags & 0x1000) { - if (have == 0) goto inf_leave; - copy = 0; - do { - len = (unsigned)(next[copy++]); - if (state->head != Z_NULL && - state->head->comment != Z_NULL && - state->length < state->head->comm_max) - state->head->comment[state->length++] = (Bytef)len; - } while (len && copy < have); - if ((state->flags & 0x0200) && (state->wrap & 4)) - state->check = crc32(state->check, next, copy); - have -= copy; - next += copy; - if (len) goto inf_leave; - } - else if (state->head != Z_NULL) - state->head->comment = Z_NULL; - state->mode = HCRC; - /* fallthrough */ - case HCRC: - if (state->flags & 0x0200) { - NEEDBITS(16); - if ((state->wrap & 4) && hold != (state->check & 0xffff)) { - strm->msg = (char *)"header crc mismatch"; - state->mode = BAD; - break; - } - INITBITS(); - } - if (state->head != Z_NULL) { - state->head->hcrc = (int)((state->flags >> 9) & 1); - state->head->done = 1; - } - strm->adler = state->check = crc32(0L, Z_NULL, 0); - state->mode = TYPE; - break; -#endif - case DICTID: - NEEDBITS(32); - strm->adler = state->check = ZSWAP32(hold); - INITBITS(); - state->mode = DICT; - /* fallthrough */ - case DICT: - if (state->havedict == 0) { - RESTORE(); - return Z_NEED_DICT; - } - strm->adler = state->check = adler32(0L, Z_NULL, 0); - state->mode = TYPE; - /* fallthrough */ - case TYPE: - if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; - /* fallthrough */ - case TYPEDO: - if (state->last) { - BYTEBITS(); - state->mode = CHECK; - break; - } - NEEDBITS(3); - state->last = BITS(1); - DROPBITS(1); - switch (BITS(2)) { - case 0: /* stored block */ - Tracev((stderr, "inflate: stored block%s\n", - state->last ? " (last)" : "")); - state->mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - Tracev((stderr, "inflate: fixed codes block%s\n", - state->last ? " (last)" : "")); - state->mode = LEN_; /* decode codes */ - if (flush == Z_TREES) { - DROPBITS(2); - goto inf_leave; - } - break; - case 2: /* dynamic block */ - Tracev((stderr, "inflate: dynamic codes block%s\n", - state->last ? " (last)" : "")); - state->mode = TABLE; - break; - case 3: - strm->msg = (char *)"invalid block type"; - state->mode = BAD; - } - DROPBITS(2); - break; - case STORED: - BYTEBITS(); /* go to byte boundary */ - NEEDBITS(32); - if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { - strm->msg = (char *)"invalid stored block lengths"; - state->mode = BAD; - break; - } - state->length = (unsigned)hold & 0xffff; - Tracev((stderr, "inflate: stored length %u\n", - state->length)); - INITBITS(); - state->mode = COPY_; - if (flush == Z_TREES) goto inf_leave; - /* fallthrough */ - case COPY_: - state->mode = COPY; - /* fallthrough */ - case COPY: - copy = state->length; - if (copy) { - if (copy > have) copy = have; - if (copy > left) copy = left; - if (copy == 0) goto inf_leave; - zmemcpy(put, next, copy); - have -= copy; - next += copy; - left -= copy; - put += copy; - state->length -= copy; - break; - } - Tracev((stderr, "inflate: stored end\n")); - state->mode = TYPE; - break; - case TABLE: - NEEDBITS(14); - state->nlen = BITS(5) + 257; - DROPBITS(5); - state->ndist = BITS(5) + 1; - DROPBITS(5); - state->ncode = BITS(4) + 4; - DROPBITS(4); -#ifndef PKZIP_BUG_WORKAROUND - if (state->nlen > 286 || state->ndist > 30) { - strm->msg = (char *)"too many length or distance symbols"; - state->mode = BAD; - break; - } -#endif - Tracev((stderr, "inflate: table sizes ok\n")); - state->have = 0; - state->mode = LENLENS; - /* fallthrough */ - case LENLENS: - while (state->have < state->ncode) { - NEEDBITS(3); - state->lens[order[state->have++]] = (unsigned short)BITS(3); - DROPBITS(3); - } - while (state->have < 19) - state->lens[order[state->have++]] = 0; - state->next = state->codes; - state->lencode = (const code FAR *)(state->next); - state->lenbits = 7; - ret = inflate_table(CODES, state->lens, 19, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid code lengths set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: code lengths ok\n")); - state->have = 0; - state->mode = CODELENS; - /* fallthrough */ - case CODELENS: - while (state->have < state->nlen + state->ndist) { - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.val < 16) { - DROPBITS(here.bits); - state->lens[state->have++] = here.val; - } - else { - if (here.val == 16) { - NEEDBITS(here.bits + 2); - DROPBITS(here.bits); - if (state->have == 0) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - len = state->lens[state->have - 1]; - copy = 3 + BITS(2); - DROPBITS(2); - } - else if (here.val == 17) { - NEEDBITS(here.bits + 3); - DROPBITS(here.bits); - len = 0; - copy = 3 + BITS(3); - DROPBITS(3); - } - else { - NEEDBITS(here.bits + 7); - DROPBITS(here.bits); - len = 0; - copy = 11 + BITS(7); - DROPBITS(7); - } - if (state->have + copy > state->nlen + state->ndist) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - while (copy--) - state->lens[state->have++] = (unsigned short)len; - } - } - - /* handle error breaks in while */ - if (state->mode == BAD) break; - - /* check for end-of-block code (better have one) */ - if (state->lens[256] == 0) { - strm->msg = (char *)"invalid code -- missing end-of-block"; - state->mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state->next = state->codes; - state->lencode = (const code FAR *)(state->next); - state->lenbits = 9; - ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid literal/lengths set"; - state->mode = BAD; - break; - } - state->distcode = (const code FAR *)(state->next); - state->distbits = 6; - ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, - &(state->next), &(state->distbits), state->work); - if (ret) { - strm->msg = (char *)"invalid distances set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: codes ok\n")); - state->mode = LEN_; - if (flush == Z_TREES) goto inf_leave; - /* fallthrough */ - case LEN_: - state->mode = LEN; - /* fallthrough */ - case LEN: - if (have >= 6 && left >= 258) { - RESTORE(); - inflate_fast(strm, out); - LOAD(); - if (state->mode == TYPE) - state->back = -1; - break; - } - state->back = 0; - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.op && (here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->lencode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - state->back += last.bits; - } - DROPBITS(here.bits); - state->back += here.bits; - state->length = (unsigned)here.val; - if ((int)(here.op) == 0) { - Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here.val)); - state->mode = LIT; - break; - } - if (here.op & 32) { - Tracevv((stderr, "inflate: end of block\n")); - state->back = -1; - state->mode = TYPE; - break; - } - if (here.op & 64) { - strm->msg = (char *)"invalid literal/length code"; - state->mode = BAD; - break; - } - state->extra = (unsigned)(here.op) & 15; - state->mode = LENEXT; - /* fallthrough */ - case LENEXT: - if (state->extra) { - NEEDBITS(state->extra); - state->length += BITS(state->extra); - DROPBITS(state->extra); - state->back += state->extra; - } - Tracevv((stderr, "inflate: length %u\n", state->length)); - state->was = state->length; - state->mode = DIST; - /* fallthrough */ - case DIST: - for (;;) { - here = state->distcode[BITS(state->distbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if ((here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->distcode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - state->back += last.bits; - } - DROPBITS(here.bits); - state->back += here.bits; - if (here.op & 64) { - strm->msg = (char *)"invalid distance code"; - state->mode = BAD; - break; - } - state->offset = (unsigned)here.val; - state->extra = (unsigned)(here.op) & 15; - state->mode = DISTEXT; - /* fallthrough */ - case DISTEXT: - if (state->extra) { - NEEDBITS(state->extra); - state->offset += BITS(state->extra); - DROPBITS(state->extra); - state->back += state->extra; - } -#ifdef INFLATE_STRICT - if (state->offset > state->dmax) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#endif - Tracevv((stderr, "inflate: distance %u\n", state->offset)); - state->mode = MATCH; - /* fallthrough */ - case MATCH: - if (left == 0) goto inf_leave; - copy = out - left; - if (state->offset > copy) { /* copy from window */ - copy = state->offset - copy; - if (copy > state->whave) { - if (state->sane) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - Trace((stderr, "inflate.c too far\n")); - copy -= state->whave; - if (copy > state->length) copy = state->length; - if (copy > left) copy = left; - left -= copy; - state->length -= copy; - do { - *put++ = 0; - } while (--copy); - if (state->length == 0) state->mode = LEN; - break; -#endif - } - if (copy > state->wnext) { - copy -= state->wnext; - from = state->window + (state->wsize - copy); - } - else - from = state->window + (state->wnext - copy); - if (copy > state->length) copy = state->length; - } - else { /* copy from output */ - from = put - state->offset; - copy = state->length; - } - if (copy > left) copy = left; - left -= copy; - state->length -= copy; - do { - *put++ = *from++; - } while (--copy); - if (state->length == 0) state->mode = LEN; - break; - case LIT: - if (left == 0) goto inf_leave; - *put++ = (unsigned char)(state->length); - left--; - state->mode = LEN; - break; - case CHECK: - if (state->wrap) { - NEEDBITS(32); - out -= left; - strm->total_out += out; - state->total += out; - if ((state->wrap & 4) && out) - strm->adler = state->check = - UPDATE_CHECK(state->check, put - out, out); - out = left; - if ((state->wrap & 4) && ( -#ifdef GUNZIP - state->flags ? hold : -#endif - ZSWAP32(hold)) != state->check) { - strm->msg = (char *)"incorrect data check"; - state->mode = BAD; - break; - } - INITBITS(); - Tracev((stderr, "inflate: check matches trailer\n")); - } -#ifdef GUNZIP - state->mode = LENGTH; - /* fallthrough */ - case LENGTH: - if (state->wrap && state->flags) { - NEEDBITS(32); - if ((state->wrap & 4) && hold != (state->total & 0xffffffff)) { - strm->msg = (char *)"incorrect length check"; - state->mode = BAD; - break; - } - INITBITS(); - Tracev((stderr, "inflate: length matches trailer\n")); - } -#endif - state->mode = DONE; - /* fallthrough */ - case DONE: - ret = Z_STREAM_END; - goto inf_leave; - case BAD: - ret = Z_DATA_ERROR; - goto inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* fallthrough */ - default: - return Z_STREAM_ERROR; - } - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - inf_leave: - RESTORE(); - if (state->wsize || (out != strm->avail_out && state->mode < BAD && - (state->mode < CHECK || flush != Z_FINISH))) - if (updatewindow(strm, strm->next_out, out - strm->avail_out)) { - state->mode = MEM; - return Z_MEM_ERROR; - } - in -= strm->avail_in; - out -= strm->avail_out; - strm->total_in += in; - strm->total_out += out; - state->total += out; - if ((state->wrap & 4) && out) - strm->adler = state->check = - UPDATE_CHECK(state->check, strm->next_out - out, out); - strm->data_type = (int)state->bits + (state->last ? 64 : 0) + - (state->mode == TYPE ? 128 : 0) + - (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); - if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) - ret = Z_BUF_ERROR; - return ret; -} - -int ZEXPORT inflateEnd(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - if (inflateStateCheck(strm)) - return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (state->window != Z_NULL) ZFREE(strm, state->window); - ZFREE(strm, strm->state); - strm->state = Z_NULL; - Tracev((stderr, "inflate: end\n")); - return Z_OK; -} - -int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength) -z_streamp strm; -Bytef *dictionary; -uInt *dictLength; -{ - struct inflate_state FAR *state; - - /* check state */ - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - - /* copy dictionary */ - if (state->whave && dictionary != Z_NULL) { - zmemcpy(dictionary, state->window + state->wnext, - state->whave - state->wnext); - zmemcpy(dictionary + state->whave - state->wnext, - state->window, state->wnext); - } - if (dictLength != Z_NULL) - *dictLength = state->whave; - return Z_OK; -} - -int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) -z_streamp strm; -const Bytef *dictionary; -uInt dictLength; -{ - struct inflate_state FAR *state; - unsigned long dictid; - int ret; - - /* check state */ - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (state->wrap != 0 && state->mode != DICT) - return Z_STREAM_ERROR; - - /* check for correct dictionary identifier */ - if (state->mode == DICT) { - dictid = adler32(0L, Z_NULL, 0); - dictid = adler32(dictid, dictionary, dictLength); - if (dictid != state->check) - return Z_DATA_ERROR; - } - - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary + dictLength, dictLength); - if (ret) { - state->mode = MEM; - return Z_MEM_ERROR; - } - state->havedict = 1; - Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -int ZEXPORT inflateGetHeader(strm, head) -z_streamp strm; -gz_headerp head; -{ - struct inflate_state FAR *state; - - /* check state */ - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if ((state->wrap & 2) == 0) return Z_STREAM_ERROR; - - /* save header structure */ - state->head = head; - head->done = 0; - return Z_OK; -} - -/* - Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found - or when out of input. When called, *have is the number of pattern bytes - found in order so far, in 0..3. On return *have is updated to the new - state. If on return *have equals four, then the pattern was found and the - return value is how many bytes were read including the last byte of the - pattern. If *have is less than four, then the pattern has not been found - yet and the return value is len. In the latter case, syncsearch() can be - called again with more data and the *have state. *have is initialized to - zero for the first call. - */ -local unsigned syncsearch(have, buf, len) -unsigned FAR *have; -const unsigned char FAR *buf; -unsigned len; -{ - unsigned got; - unsigned next; - - got = *have; - next = 0; - while (next < len && got < 4) { - if ((int)(buf[next]) == (got < 2 ? 0 : 0xff)) - got++; - else if (buf[next]) - got = 0; - else - got = 4 - got; - next++; - } - *have = got; - return next; -} - -int ZEXPORT inflateSync(strm) -z_streamp strm; -{ - unsigned len; /* number of bytes to look at or looked at */ - int flags; /* temporary to save header status */ - unsigned long in, out; /* temporary to save total_in and total_out */ - unsigned char buf[4]; /* to restore bit buffer to byte string */ - struct inflate_state FAR *state; - - /* check parameters */ - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; - - /* if first time, start search in bit buffer */ - if (state->mode != SYNC) { - state->mode = SYNC; - state->hold <<= state->bits & 7; - state->bits -= state->bits & 7; - len = 0; - while (state->bits >= 8) { - buf[len++] = (unsigned char)(state->hold); - state->hold >>= 8; - state->bits -= 8; - } - state->have = 0; - syncsearch(&(state->have), buf, len); - } - - /* search available input */ - len = syncsearch(&(state->have), strm->next_in, strm->avail_in); - strm->avail_in -= len; - strm->next_in += len; - strm->total_in += len; - - /* return no joy or set up to restart inflate() on a new block */ - if (state->have != 4) return Z_DATA_ERROR; - if (state->flags == -1) - state->wrap = 0; /* if no header yet, treat as raw */ - else - state->wrap &= ~4; /* no point in computing a check value now */ - flags = state->flags; - in = strm->total_in; out = strm->total_out; - inflateReset(strm); - strm->total_in = in; strm->total_out = out; - state->flags = flags; - state->mode = TYPE; - return Z_OK; -} - -/* - Returns true if inflate is currently at the end of a block generated by - Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP - implementation to provide an additional safety check. PPP uses - Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored - block. When decompressing, PPP checks that at the end of input packet, - inflate is waiting for these length bytes. - */ -int ZEXPORT inflateSyncPoint(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - return state->mode == STORED && state->bits == 0; -} - -int ZEXPORT inflateCopy(dest, source) -z_streamp dest; -z_streamp source; -{ - struct inflate_state FAR *state; - struct inflate_state FAR *copy; - unsigned char FAR *window; - unsigned wsize; - - /* check input */ - if (inflateStateCheck(source) || dest == Z_NULL) - return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)source->state; - - /* allocate space */ - copy = (struct inflate_state FAR *) - ZALLOC(source, 1, sizeof(struct inflate_state)); - if (copy == Z_NULL) return Z_MEM_ERROR; - window = Z_NULL; - if (state->window != Z_NULL) { - window = (unsigned char FAR *) - ZALLOC(source, 1U << state->wbits, sizeof(unsigned char)); - if (window == Z_NULL) { - ZFREE(source, copy); - return Z_MEM_ERROR; - } - } - - /* copy state */ - zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); - zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state)); - copy->strm = dest; - if (state->lencode >= state->codes && - state->lencode <= state->codes + ENOUGH - 1) { - copy->lencode = copy->codes + (state->lencode - state->codes); - copy->distcode = copy->codes + (state->distcode - state->codes); - } - copy->next = copy->codes + (state->next - state->codes); - if (window != Z_NULL) { - wsize = 1U << state->wbits; - zmemcpy(window, state->window, wsize); - } - copy->window = window; - dest->state = (struct internal_state FAR *)copy; - return Z_OK; -} - -int ZEXPORT inflateUndermine(strm, subvert) -z_streamp strm; -int subvert; -{ - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - state->sane = !subvert; - return Z_OK; -#else - (void)subvert; - state->sane = 1; - return Z_DATA_ERROR; -#endif -} - -int ZEXPORT inflateValidate(strm, check) -z_streamp strm; -int check; -{ - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (check && state->wrap) - state->wrap |= 4; - else - state->wrap &= ~4; - return Z_OK; -} - -long ZEXPORT inflateMark(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) - return -(1L << 16); - state = (struct inflate_state FAR *)strm->state; - return (long)(((unsigned long)((long)state->back)) << 16) + - (state->mode == COPY ? state->length : - (state->mode == MATCH ? state->was - state->length : 0)); -} - -unsigned long ZEXPORT inflateCodesUsed(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - if (inflateStateCheck(strm)) return (unsigned long)-1; - state = (struct inflate_state FAR *)strm->state; - return (unsigned long)(state->next - state->codes); -} diff --git a/thirdparty/zlib-1.2.12/inflate.h b/thirdparty/zlib-1.2.12/inflate.h deleted file mode 100644 index f127b6b..0000000 --- a/thirdparty/zlib-1.2.12/inflate.h +++ /dev/null @@ -1,126 +0,0 @@ -/* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2019 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* define NO_GZIP when compiling if you want to disable gzip header and - trailer decoding by inflate(). NO_GZIP would be used to avoid linking in - the crc code when it is not needed. For shared libraries, gzip decoding - should be left enabled. */ -#ifndef NO_GZIP -# define GUNZIP -#endif - -/* Possible inflate modes between inflate() calls */ -typedef enum { - HEAD = 16180, /* i: waiting for magic header */ - FLAGS, /* i: waiting for method and flags (gzip) */ - TIME, /* i: waiting for modification time (gzip) */ - OS, /* i: waiting for extra flags and operating system (gzip) */ - EXLEN, /* i: waiting for extra length (gzip) */ - EXTRA, /* i: waiting for extra bytes (gzip) */ - NAME, /* i: waiting for end of file name (gzip) */ - COMMENT, /* i: waiting for end of comment (gzip) */ - HCRC, /* i: waiting for header crc (gzip) */ - DICTID, /* i: waiting for dictionary check value */ - DICT, /* waiting for inflateSetDictionary() call */ - TYPE, /* i: waiting for type bits, including last-flag bit */ - TYPEDO, /* i: same, but skip check to exit inflate on new block */ - STORED, /* i: waiting for stored size (length and complement) */ - COPY_, /* i/o: same as COPY below, but only first time in */ - COPY, /* i/o: waiting for input or output to copy stored block */ - TABLE, /* i: waiting for dynamic block table lengths */ - LENLENS, /* i: waiting for code length code lengths */ - CODELENS, /* i: waiting for length/lit and distance code lengths */ - LEN_, /* i: same as LEN below, but only first time in */ - LEN, /* i: waiting for length/lit/eob code */ - LENEXT, /* i: waiting for length extra bits */ - DIST, /* i: waiting for distance code */ - DISTEXT, /* i: waiting for distance extra bits */ - MATCH, /* o: waiting for output space to copy string */ - LIT, /* o: waiting for output space to write literal */ - CHECK, /* i: waiting for 32-bit check value */ - LENGTH, /* i: waiting for 32-bit length (gzip) */ - DONE, /* finished check, done -- remain here until reset */ - BAD, /* got a data error -- remain here until reset */ - MEM, /* got an inflate() memory error -- remain here until reset */ - SYNC /* looking for synchronization bytes to restart inflate() */ -} inflate_mode; - -/* - State transitions between above modes - - - (most modes can go to BAD or MEM on error -- not shown for clarity) - - Process header: - HEAD -> (gzip) or (zlib) or (raw) - (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> - HCRC -> TYPE - (zlib) -> DICTID or TYPE - DICTID -> DICT -> TYPE - (raw) -> TYPEDO - Read deflate blocks: - TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK - STORED -> COPY_ -> COPY -> TYPE - TABLE -> LENLENS -> CODELENS -> LEN_ - LEN_ -> LEN - Read deflate codes in fixed or dynamic block: - LEN -> LENEXT or LIT or TYPE - LENEXT -> DIST -> DISTEXT -> MATCH -> LEN - LIT -> LEN - Process trailer: - CHECK -> LENGTH -> DONE - */ - -/* State maintained between inflate() calls -- approximately 7K bytes, not - including the allocated sliding window, which is up to 32K bytes. */ -struct inflate_state { - z_streamp strm; /* pointer back to this zlib stream */ - inflate_mode mode; /* current inflate mode */ - int last; /* true if processing last block */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip, - bit 2 true to validate check value */ - int havedict; /* true if dictionary provided */ - int flags; /* gzip header method and flags, 0 if zlib, or - -1 if raw or no header yet */ - unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ - unsigned long check; /* protected copy of check value */ - unsigned long total; /* protected copy of output count */ - gz_headerp head; /* where to save gzip header information */ - /* sliding window */ - unsigned wbits; /* log base 2 of requested window size */ - unsigned wsize; /* window size or zero if not using window */ - unsigned whave; /* valid bytes in the window */ - unsigned wnext; /* window write index */ - unsigned char FAR *window; /* allocated sliding window, if needed */ - /* bit accumulator */ - unsigned long hold; /* input bit accumulator */ - unsigned bits; /* number of bits in "in" */ - /* for string and stored block copying */ - unsigned length; /* literal or length of data to copy */ - unsigned offset; /* distance back to copy string from */ - /* for table and code decoding */ - unsigned extra; /* extra bits needed */ - /* fixed and dynamic code tables */ - code const FAR *lencode; /* starting table for length/literal codes */ - code const FAR *distcode; /* starting table for distance codes */ - unsigned lenbits; /* index bits for lencode */ - unsigned distbits; /* index bits for distcode */ - /* dynamic table building */ - unsigned ncode; /* number of code length code lengths */ - unsigned nlen; /* number of length code lengths */ - unsigned ndist; /* number of distance code lengths */ - unsigned have; /* number of code lengths in lens[] */ - code FAR *next; /* next available space in codes[] */ - unsigned short lens[320]; /* temporary storage for code lengths */ - unsigned short work[288]; /* work area for code table building */ - code codes[ENOUGH]; /* space for code tables */ - int sane; /* if false, allow invalid distance too far */ - int back; /* bits back of last unprocessed length/lit */ - unsigned was; /* initial length of match */ -}; diff --git a/thirdparty/zlib-1.2.12/inftrees.c b/thirdparty/zlib-1.2.12/inftrees.c deleted file mode 100644 index 09462a7..0000000 --- a/thirdparty/zlib-1.2.12/inftrees.c +++ /dev/null @@ -1,304 +0,0 @@ -/* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2022 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "inftrees.h" - -#define MAXBITS 15 - -const char inflate_copyright[] = - " inflate 1.2.12 Copyright 1995-2022 Mark Adler "; -/* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot - include such an acknowledgment, I would appreciate that you keep this - copyright string in the executable of your product. - */ - -/* - Build a set of tables to decode the provided canonical Huffman code. - The code lengths are lens[0..codes-1]. The result starts at *table, - whose indices are 0..2^bits-1. work is a writable array of at least - lens shorts, which is used as a work area. type is the type of code - to be generated, CODES, LENS, or DISTS. On return, zero is success, - -1 is an invalid code, and +1 means that ENOUGH isn't enough. table - on return points to the next available entry's address. bits is the - requested root table index bits, and on return it is the actual root - table index bits. It will differ if the request is greater than the - longest code or if it is less than the shortest code. - */ -int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work) -codetype type; -unsigned short FAR *lens; -unsigned codes; -code FAR * FAR *table; -unsigned FAR *bits; -unsigned short FAR *work; -{ - unsigned len; /* a code's length in bits */ - unsigned sym; /* index of code symbols */ - unsigned min, max; /* minimum and maximum code lengths */ - unsigned root; /* number of index bits for root table */ - unsigned curr; /* number of index bits for current table */ - unsigned drop; /* code bits to drop for sub-table */ - int left; /* number of prefix codes available */ - unsigned used; /* code entries in table used */ - unsigned huff; /* Huffman code */ - unsigned incr; /* for incrementing code, index */ - unsigned fill; /* index for replicating entries */ - unsigned low; /* low bits for current root entry */ - unsigned mask; /* mask for low root bits */ - code here; /* table entry for duplication */ - code FAR *next; /* next available space in table */ - const unsigned short FAR *base; /* base value table to use */ - const unsigned short FAR *extra; /* extra bits table to use */ - unsigned match; /* use base and extra for symbol >= match */ - unsigned short count[MAXBITS+1]; /* number of codes of each length */ - unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ - static const unsigned short lbase[31] = { /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; - static const unsigned short lext[31] = { /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 199, 202}; - static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0}; - static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64}; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) - count[len] = 0; - for (sym = 0; sym < codes; sym++) - count[lens[sym]]++; - - /* bound code lengths, force root to be within code lengths */ - root = *bits; - for (max = MAXBITS; max >= 1; max--) - if (count[max] != 0) break; - if (root > max) root = max; - if (max == 0) { /* no symbols to code at all */ - here.op = (unsigned char)64; /* invalid code marker */ - here.bits = (unsigned char)1; - here.val = (unsigned short)0; - *(*table)++ = here; /* make a table to force an error */ - *(*table)++ = here; - *bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) - if (count[min] != 0) break; - if (root < min) root = min; - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) return -1; /* over-subscribed */ - } - if (left > 0 && (type == CODES || max != 1)) - return -1; /* incomplete set */ - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) - offs[len + 1] = offs[len] + count[len]; - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) - if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - switch (type) { - case CODES: - base = extra = work; /* dummy value--not used */ - match = 20; - break; - case LENS: - base = lbase; - extra = lext; - match = 257; - break; - default: /* DISTS */ - base = dbase; - extra = dext; - match = 0; - } - - /* initialize state for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = *table; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = (unsigned)(-1); /* trigger new sub-table when len > root */ - used = 1U << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type == LENS && used > ENOUGH_LENS) || - (type == DISTS && used > ENOUGH_DISTS)) - return 1; - - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - here.bits = (unsigned char)(len - drop); - if (work[sym] + 1U < match) { - here.op = (unsigned char)0; - here.val = work[sym]; - } - else if (work[sym] >= match) { - here.op = (unsigned char)(extra[work[sym] - match]); - here.val = base[work[sym] - match]; - } - else { - here.op = (unsigned char)(32 + 64); /* end of block */ - here.val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1U << (len - drop); - fill = 1U << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - next[(huff >> drop) + fill] = here; - } while (fill != 0); - - /* backwards increment the len-bit code huff */ - incr = 1U << (len - 1); - while (huff & incr) - incr >>= 1; - if (incr != 0) { - huff &= incr - 1; - huff += incr; - } - else - huff = 0; - - /* go to next symbol, update count, len */ - sym++; - if (--(count[len]) == 0) { - if (len == max) break; - len = lens[work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) != low) { - /* if first time, transition to sub-tables */ - if (drop == 0) - drop = root; - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = (int)(1 << curr); - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) break; - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1U << curr; - if ((type == LENS && used > ENOUGH_LENS) || - (type == DISTS && used > ENOUGH_DISTS)) - return 1; - - /* point entry in root table to sub-table */ - low = huff & mask; - (*table)[low].op = (unsigned char)curr; - (*table)[low].bits = (unsigned char)root; - (*table)[low].val = (unsigned short)(next - *table); - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff != 0) { - here.op = (unsigned char)64; /* invalid code marker */ - here.bits = (unsigned char)(len - drop); - here.val = (unsigned short)0; - next[huff] = here; - } - - /* set return parameters */ - *table += used; - *bits = root; - return 0; -} diff --git a/thirdparty/zlib-1.2.12/inftrees.h b/thirdparty/zlib-1.2.12/inftrees.h deleted file mode 100644 index baa53a0..0000000 --- a/thirdparty/zlib-1.2.12/inftrees.h +++ /dev/null @@ -1,62 +0,0 @@ -/* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-2005, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* Structure for decoding tables. Each entry provides either the - information needed to do the operation requested by the code that - indexed that table entry, or it provides a pointer to another - table that indexes more bits of the code. op indicates whether - the entry is a pointer to another table, a literal, a length or - distance, an end-of-block, or an invalid code. For a table - pointer, the low four bits of op is the number of index bits of - that table. For a length or distance, the low four bits of op - is the number of extra bits to get after the code. bits is - the number of bits in this code or part of the code to drop off - of the bit buffer. val is the actual byte to output in the case - of a literal, the base length or distance, or the offset from - the current table to the next table. Each entry is four bytes. */ -typedef struct { - unsigned char op; /* operation, extra bits, table bits */ - unsigned char bits; /* bits in this part of the code */ - unsigned short val; /* offset in table or code value */ -} code; - -/* op values as set by inflate_table(): - 00000000 - literal - 0000tttt - table link, tttt != 0 is the number of table index bits - 0001eeee - length or distance, eeee is the number of extra bits - 01100000 - end of block - 01000000 - invalid code - */ - -/* Maximum size of the dynamic table. The maximum number of code structures is - 1444, which is the sum of 852 for literal/length codes and 592 for distance - codes. These values were found by exhaustive searches using the program - examples/enough.c found in the zlib distribtution. The arguments to that - program are the number of symbols, the initial root table size, and the - maximum bit length of a code. "enough 286 9 15" for literal/length codes - returns returns 852, and "enough 30 6 15" for distance codes returns 592. - The initial root table size (9 or 6) is found in the fifth argument of the - inflate_table() calls in inflate.c and infback.c. If the root table size is - changed, then these maximum sizes would be need to be recalculated and - updated. */ -#define ENOUGH_LENS 852 -#define ENOUGH_DISTS 592 -#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) - -/* Type of code to build for inflate_table() */ -typedef enum { - CODES, - LENS, - DISTS -} codetype; - -int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work)); diff --git a/thirdparty/zlib-1.2.12/make_vms.com b/thirdparty/zlib-1.2.12/make_vms.com deleted file mode 100644 index 65e9d0c..0000000 --- a/thirdparty/zlib-1.2.12/make_vms.com +++ /dev/null @@ -1,867 +0,0 @@ -$! make libz under VMS written by -$! Martin P.J. Zinser -$! -$! In case of problems with the install you might contact me at -$! zinser@zinser.no-ip.info(preferred) or -$! martin.zinser@eurexchange.com (work) -$! -$! Make procedure history for Zlib -$! -$!------------------------------------------------------------------------------ -$! Version history -$! 0.01 20060120 First version to receive a number -$! 0.02 20061008 Adapt to new Makefile.in -$! 0.03 20091224 Add support for large file check -$! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite -$! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in -$! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new exmples -$! subdir path, update module search in makefile.in -$! 0.07 20120115 Triggered by work done by Alexey Chupahin completly redesigned -$! shared image creation -$! 0.08 20120219 Make it work on VAX again, pre-load missing symbols to shared -$! image -$! 0.09 20120305 SMS. P1 sets builder ("MMK", "MMS", " " (built-in)). -$! "" -> automatic, preference: MMK, MMS, built-in. -$! -$ on error then goto err_exit -$! -$ true = 1 -$ false = 0 -$ tmpnam = "temp_" + f$getjpi("","pid") -$ tt = tmpnam + ".txt" -$ tc = tmpnam + ".c" -$ th = tmpnam + ".h" -$ define/nolog tconfig 'th' -$ its_decc = false -$ its_vaxc = false -$ its_gnuc = false -$ s_case = False -$! -$! Setup variables holding "config" information -$! -$ Make = "''p1'" -$ name = "Zlib" -$ version = "?.?.?" -$ v_string = "ZLIB_VERSION" -$ v_file = "zlib.h" -$ ccopt = "/include = []" -$ lopts = "" -$ dnsrl = "" -$ aconf_in_file = "zconf.h.in#zconf.h_in#zconf_h.in" -$ conf_check_string = "" -$ linkonly = false -$ optfile = name + ".opt" -$ mapfile = name + ".map" -$ libdefs = "" -$ vax = f$getsyi("HW_MODEL").lt.1024 -$ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096 -$ ia64 = f$getsyi("HW_MODEL").ge.4096 -$! -$! 2012-03-05 SMS. -$! Why is this needed? And if it is needed, why not simply ".not. vax"? -$! -$!!! if axp .or. ia64 then set proc/parse=extended -$! -$ whoami = f$parse(f$environment("Procedure"),,,,"NO_CONCEAL") -$ mydef = F$parse(whoami,,,"DEVICE") -$ mydir = f$parse(whoami,,,"DIRECTORY") - "][" -$ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type") -$! -$! Check for MMK/MMS -$! -$ if (Make .eqs. "") -$ then -$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" -$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK" -$ else -$ Make = f$edit( Make, "trim") -$ endif -$! -$ gosub find_version -$! -$ open/write topt tmp.opt -$ open/write optf 'optfile' -$! -$ gosub check_opts -$! -$! Look for the compiler used -$! -$ gosub check_compiler -$ close topt -$ close optf -$! -$ if its_decc -$ then -$ ccopt = "/prefix=all" + ccopt -$ if f$trnlnm("SYS") .eqs. "" -$ then -$ if axp -$ then -$ define sys sys$library: -$ else -$ ccopt = "/decc" + ccopt -$ define sys decc$library_include: -$ endif -$ endif -$! -$! 2012-03-05 SMS. -$! Why /NAMES = AS_IS? Why not simply ".not. vax"? And why not on VAX? -$! -$ if axp .or. ia64 -$ then -$ ccopt = ccopt + "/name=as_is/opt=(inline=speed)" -$ s_case = true -$ endif -$ endif -$ if its_vaxc .or. its_gnuc -$ then -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ endif -$! -$! Build a fake configure input header -$! -$ open/write conf_hin config.hin -$ write conf_hin "#undef _LARGEFILE64_SOURCE" -$ close conf_hin -$! -$! -$ i = 0 -$FIND_ACONF: -$ fname = f$element(i,"#",aconf_in_file) -$ if fname .eqs. "#" then goto AMISS_ERR -$ if f$search(fname) .eqs. "" -$ then -$ i = i + 1 -$ goto find_aconf -$ endif -$ open/read/err=aconf_err aconf_in 'fname' -$ open/write aconf zconf.h -$ACONF_LOOP: -$ read/end_of_file=aconf_exit aconf_in line -$ work = f$edit(line, "compress,trim") -$ if f$extract(0,6,work) .nes. "#undef" -$ then -$ if f$extract(0,12,work) .nes. "#cmakedefine" -$ then -$ write aconf line -$ endif -$ else -$ cdef = f$element(1," ",work) -$ gosub check_config -$ endif -$ goto aconf_loop -$ACONF_EXIT: -$ write aconf "" -$ write aconf "/* VMS specifics added by make_vms.com: */" -$ write aconf "#define VMS 1" -$ write aconf "#include " -$ write aconf "#include " -$ write aconf "#ifdef _LARGEFILE" -$ write aconf "# define off64_t __off64_t" -$ write aconf "# define fopen64 fopen" -$ write aconf "# define fseeko64 fseeko" -$ write aconf "# define lseek64 lseek" -$ write aconf "# define ftello64 ftell" -$ write aconf "#endif" -$ write aconf "#if !defined( __VAX) && (__CRTL_VER >= 70312000)" -$ write aconf "# define HAVE_VSNPRINTF" -$ write aconf "#endif" -$ close aconf_in -$ close aconf -$ if f$search("''th'") .nes. "" then delete 'th';* -$! Build the thing plain or with mms -$! -$ write sys$output "Compiling Zlib sources ..." -$ if make.eqs."" -$ then -$ if (f$search( "example.obj;*") .nes. "") then delete example.obj;* -$ if (f$search( "minigzip.obj;*") .nes. "") then delete minigzip.obj;* -$ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" - - adler32.c zlib.h zconf.h -$ CALL MAKE compress.OBJ "CC ''CCOPT' compress" - - compress.c zlib.h zconf.h -$ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" - - crc32.c zlib.h zconf.h -$ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" - - deflate.c deflate.h zutil.h zlib.h zconf.h -$ CALL MAKE gzclose.OBJ "CC ''CCOPT' gzclose" - - gzclose.c zutil.h zlib.h zconf.h -$ CALL MAKE gzlib.OBJ "CC ''CCOPT' gzlib" - - gzlib.c zutil.h zlib.h zconf.h -$ CALL MAKE gzread.OBJ "CC ''CCOPT' gzread" - - gzread.c zutil.h zlib.h zconf.h -$ CALL MAKE gzwrite.OBJ "CC ''CCOPT' gzwrite" - - gzwrite.c zutil.h zlib.h zconf.h -$ CALL MAKE infback.OBJ "CC ''CCOPT' infback" - - infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h -$ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" - - inffast.c zutil.h zlib.h zconf.h inffast.h -$ CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" - - inflate.c zutil.h zlib.h zconf.h infblock.h -$ CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" - - inftrees.c zutil.h zlib.h zconf.h inftrees.h -$ CALL MAKE trees.OBJ "CC ''CCOPT' trees" - - trees.c deflate.h zutil.h zlib.h zconf.h -$ CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" - - uncompr.c zlib.h zconf.h -$ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" - - zutil.c zutil.h zlib.h zconf.h -$ write sys$output "Building Zlib ..." -$ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ -$ write sys$output "Building example..." -$ CALL MAKE example.OBJ "CC ''CCOPT' [.test]example" - - [.test]example.c zlib.h zconf.h -$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb -$ write sys$output "Building minigzip..." -$ CALL MAKE minigzip.OBJ "CC ''CCOPT' [.test]minigzip" - - [.test]minigzip.c zlib.h zconf.h -$ call make minigzip.exe - - "LINK minigzip,libz.olb/lib" - - minigzip.obj libz.olb -$ else -$ gosub crea_mms -$ write sys$output "Make ''name' ''version' with ''Make' " -$ 'make' -$ endif -$! -$! Create shareable image -$! -$ gosub crea_olist -$ write sys$output "Creating libzshr.exe" -$ call map_2_shopt 'mapfile' 'optfile' -$ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,'optfile'/opt -$ write sys$output "Zlib build completed" -$ delete/nolog tmp.opt;* -$ exit -$AMISS_ERR: -$ write sys$output "No source for config.hin found." -$ write sys$output "Tried any of ''aconf_in_file'" -$ goto err_exit -$CC_ERR: -$ write sys$output "C compiler required to build ''name'" -$ goto err_exit -$ERR_EXIT: -$ set message/facil/ident/sever/text -$ close/nolog optf -$ close/nolog topt -$ close/nolog aconf_in -$ close/nolog aconf -$ close/nolog out -$ close/nolog min -$ close/nolog mod -$ close/nolog h_in -$ write sys$output "Exiting..." -$ exit 2 -$! -$! -$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES -$ V = 'F$Verify(0) -$! P1 = What we are trying to make -$! P2 = Command to make it -$! P3 - P8 What it depends on -$ -$ If F$Search(P1) .Eqs. "" Then Goto Makeit -$ Time = F$CvTime(F$File(P1,"RDT")) -$arg=3 -$Loop: -$ Argument = P'arg -$ If Argument .Eqs. "" Then Goto Exit -$ El=0 -$Loop2: -$ File = F$Element(El," ",Argument) -$ If File .Eqs. " " Then Goto Endl -$ AFile = "" -$Loop3: -$ OFile = AFile -$ AFile = F$Search(File) -$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl -$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit -$ Goto Loop3 -$NextEL: -$ El = El + 1 -$ Goto Loop2 -$EndL: -$ arg=arg+1 -$ If arg .Le. 8 Then Goto Loop -$ Goto Exit -$ -$Makeit: -$ VV=F$VERIFY(0) -$ write sys$output P2 -$ 'P2 -$ VV='F$Verify(VV) -$Exit: -$ If V Then Set Verify -$ENDSUBROUTINE -$!------------------------------------------------------------------------------ -$! -$! Check command line options and set symbols accordingly -$! -$!------------------------------------------------------------------------------ -$! Version history -$! 0.01 20041206 First version to receive a number -$! 0.02 20060126 Add new "HELP" target -$ CHECK_OPTS: -$ i = 1 -$ OPT_LOOP: -$ if i .lt. 9 -$ then -$ cparm = f$edit(p'i',"upcase") -$! -$! Check if parameter actually contains something -$! -$ if f$edit(cparm,"trim") .nes. "" -$ then -$ if cparm .eqs. "DEBUG" -$ then -$ ccopt = ccopt + "/noopt/deb" -$ lopts = lopts + "/deb" -$ endif -$ if f$locate("CCOPT=",cparm) .lt. f$length(cparm) -$ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ ccopt = ccopt + f$extract(start,len,cparm) -$ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) - - then s_case = true -$ endif -$ if cparm .eqs. "LINK" then linkonly = true -$ if f$locate("LOPTS=",cparm) .lt. f$length(cparm) -$ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ lopts = lopts + f$extract(start,len,cparm) -$ endif -$ if f$locate("CC=",cparm) .lt. f$length(cparm) -$ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ cc_com = f$extract(start,len,cparm) - if (cc_com .nes. "DECC") .and. - - (cc_com .nes. "VAXC") .and. - - (cc_com .nes. "GNUC") -$ then -$ write sys$output "Unsupported compiler choice ''cc_com' ignored" -$ write sys$output "Use DECC, VAXC, or GNUC instead" -$ else -$ if cc_com .eqs. "DECC" then its_decc = true -$ if cc_com .eqs. "VAXC" then its_vaxc = true -$ if cc_com .eqs. "GNUC" then its_gnuc = true -$ endif -$ endif -$ if f$locate("MAKE=",cparm) .lt. f$length(cparm) -$ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ mmks = f$extract(start,len,cparm) -$ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS") -$ then -$ make = mmks -$ else -$ write sys$output "Unsupported make choice ''mmks' ignored" -$ write sys$output "Use MMK or MMS instead" -$ endif -$ endif -$ if cparm .eqs. "HELP" then gosub bhelp -$ endif -$ i = i + 1 -$ goto opt_loop -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! Look for the compiler used -$! -$! Version history -$! 0.01 20040223 First version to receive a number -$! 0.02 20040229 Save/set value of decc$no_rooted_search_lists -$! 0.03 20060202 Extend handling of GNU C -$! 0.04 20090402 Compaq -> hp -$CHECK_COMPILER: -$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) -$ then -$ its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "") -$ its_vaxc = .not. its_decc .and. (F$Search("SYS$System:VAXC.Exe") .nes. "") -$ its_gnuc = .not. (its_decc .or. its_vaxc) .and. (f$trnlnm("gnu_cc") .nes. "") -$ endif -$! -$! Exit if no compiler available -$! -$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) -$ then goto CC_ERR -$ else -$ if its_decc -$ then -$ write sys$output "CC compiler check ... hp C" -$ if f$trnlnm("decc$no_rooted_search_lists") .nes. "" -$ then -$ dnrsl = f$trnlnm("decc$no_rooted_search_lists") -$ endif -$ define/nolog decc$no_rooted_search_lists 1 -$ else -$ if its_vaxc then write sys$output "CC compiler check ... VAX C" -$ if its_gnuc -$ then -$ write sys$output "CC compiler check ... GNU C" -$ if f$trnlnm(topt) then write topt "gnu_cc:[000000]gcclib.olb/lib" -$ if f$trnlnm(optf) then write optf "gnu_cc:[000000]gcclib.olb/lib" -$ cc = "gcc" -$ endif -$ if f$trnlnm(topt) then write topt "sys$share:vaxcrtl.exe/share" -$ if f$trnlnm(optf) then write optf "sys$share:vaxcrtl.exe/share" -$ endif -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! If MMS/MMK are available dump out the descrip.mms if required -$! -$CREA_MMS: -$ write sys$output "Creating descrip.mms..." -$ create descrip.mms -$ open/append out descrip.mms -$ copy sys$input: out -$ deck -# descrip.mms: MMS description file for building zlib on VMS -# written by Martin P.J. Zinser -# - -OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\ - gzread.obj, gzwrite.obj, uncompr.obj, infback.obj\ - deflate.obj, trees.obj, zutil.obj, inflate.obj, \ - inftrees.obj, inffast.obj - -$ eod -$ write out "CFLAGS=", ccopt -$ write out "LOPTS=", lopts -$ write out "all : example.exe minigzip.exe libz.olb" -$ copy sys$input: out -$ deck - @ write sys$output " Example applications available" - -libz.olb : libz.olb($(OBJS)) - @ write sys$output " libz available" - -example.exe : example.obj libz.olb - link $(LOPTS) example,libz.olb/lib - -minigzip.exe : minigzip.obj libz.olb - link $(LOPTS) minigzip,libz.olb/lib - -clean : - delete *.obj;*,libz.olb;*,*.opt;*,*.exe;* - - -# Other dependencies. -adler32.obj : adler32.c zutil.h zlib.h zconf.h -compress.obj : compress.c zlib.h zconf.h -crc32.obj : crc32.c zutil.h zlib.h zconf.h -deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h -example.obj : [.test]example.c zlib.h zconf.h -gzclose.obj : gzclose.c zutil.h zlib.h zconf.h -gzlib.obj : gzlib.c zutil.h zlib.h zconf.h -gzread.obj : gzread.c zutil.h zlib.h zconf.h -gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h -inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h -inflate.obj : inflate.c zutil.h zlib.h zconf.h -inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h -minigzip.obj : [.test]minigzip.c zlib.h zconf.h -trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h -uncompr.obj : uncompr.c zlib.h zconf.h -zutil.obj : zutil.c zutil.h zlib.h zconf.h -infback.obj : infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h -$ eod -$ close out -$ return -$!------------------------------------------------------------------------------ -$! -$! Read list of core library sources from makefile.in and create options -$! needed to build shareable image -$! -$CREA_OLIST: -$ open/read min makefile.in -$ open/write mod modules.opt -$ src_check_list = "OBJZ =#OBJG =" -$MRLOOP: -$ read/end=mrdone min rec -$ i = 0 -$SRC_CHECK_LOOP: -$ src_check = f$element(i, "#", src_check_list) -$ i = i+1 -$ if src_check .eqs. "#" then goto mrloop -$ if (f$extract(0,6,rec) .nes. src_check) then goto src_check_loop -$ rec = rec - src_check -$ gosub extra_filnam -$ if (f$element(1,"\",rec) .eqs. "\") then goto mrloop -$MRSLOOP: -$ read/end=mrdone min rec -$ gosub extra_filnam -$ if (f$element(1,"\",rec) .nes. "\") then goto mrsloop -$MRDONE: -$ close min -$ close mod -$ return -$!------------------------------------------------------------------------------ -$! -$! Take record extracted in crea_olist and split it into single filenames -$! -$EXTRA_FILNAM: -$ myrec = f$edit(rec - "\", "trim,compress") -$ i = 0 -$FELOOP: -$ srcfil = f$element(i," ", myrec) -$ if (srcfil .nes. " ") -$ then -$ write mod f$parse(srcfil,,,"NAME"), ".obj" -$ i = i + 1 -$ goto feloop -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! Find current Zlib version number -$! -$FIND_VERSION: -$ open/read h_in 'v_file' -$hloop: -$ read/end=hdone h_in rec -$ rec = f$edit(rec,"TRIM") -$ if (f$extract(0,1,rec) .nes. "#") then goto hloop -$ rec = f$edit(rec - "#", "TRIM") -$ if f$element(0," ",rec) .nes. "define" then goto hloop -$ if f$element(1," ",rec) .eqs. v_string -$ then -$ version = 'f$element(2," ",rec)' -$ goto hdone -$ endif -$ goto hloop -$hdone: -$ close h_in -$ return -$!------------------------------------------------------------------------------ -$! -$CHECK_CONFIG: -$! -$ in_ldef = f$locate(cdef,libdefs) -$ if (in_ldef .lt. f$length(libdefs)) -$ then -$ write aconf "#define ''cdef' 1" -$ libdefs = f$extract(0,in_ldef,libdefs) + - - f$extract(in_ldef + f$length(cdef) + 1, - - f$length(libdefs) - in_ldef - f$length(cdef) - 1, - - libdefs) -$ else -$ if (f$type('cdef') .eqs. "INTEGER") -$ then -$ write aconf "#define ''cdef' ", 'cdef' -$ else -$ if (f$type('cdef') .eqs. "STRING") -$ then -$ write aconf "#define ''cdef' ", """", '''cdef'', """" -$ else -$ gosub check_cc_def -$ endif -$ endif -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! Check if this is a define relating to the properties of the C/C++ -$! compiler -$! -$ CHECK_CC_DEF: -$ if (cdef .eqs. "_LARGEFILE64_SOURCE") -$ then -$ copy sys$input: 'tc' -$ deck -#include "tconfig" -#define _LARGEFILE -#include - -int main(){ -FILE *fp; - fp = fopen("temp.txt","r"); - fseeko(fp,1,SEEK_SET); - fclose(fp); -} - -$ eod -$ test_inv = false -$ comm_h = false -$ gosub cc_prop_check -$ return -$ endif -$ write aconf "/* ", line, " */" -$ return -$!------------------------------------------------------------------------------ -$! -$! Check for properties of C/C++ compiler -$! -$! Version history -$! 0.01 20031020 First version to receive a number -$! 0.02 20031022 Added logic for defines with value -$! 0.03 20040309 Make sure local config file gets not deleted -$! 0.04 20041230 Also write include for configure run -$! 0.05 20050103 Add processing of "comment defines" -$CC_PROP_CHECK: -$ cc_prop = true -$ is_need = false -$ is_need = (f$extract(0,4,cdef) .eqs. "NEED") .or. (test_inv .eq. true) -$ if f$search(th) .eqs. "" then create 'th' -$ set message/nofac/noident/nosever/notext -$ on error then continue -$ cc 'tmpnam' -$ if .not. ($status) then cc_prop = false -$ on error then continue -$! The headers might lie about the capabilities of the RTL -$ link 'tmpnam',tmp.opt/opt -$ if .not. ($status) then cc_prop = false -$ set message/fac/ident/sever/text -$ on error then goto err_exit -$ delete/nolog 'tmpnam'.*;*/exclude='th' -$ if (cc_prop .and. .not. is_need) .or. - - (.not. cc_prop .and. is_need) -$ then -$ write sys$output "Checking for ''cdef'... yes" -$ if f$type('cdef_val'_yes) .nes. "" -$ then -$ if f$type('cdef_val'_yes) .eqs. "INTEGER" - - then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_yes) -$ if f$type('cdef_val'_yes) .eqs. "STRING" - - then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_yes) -$ else -$ call write_config f$fao("#define !AS 1",cdef) -$ endif -$ if (cdef .eqs. "HAVE_FSEEKO") .or. (cdef .eqs. "_LARGE_FILES") .or. - - (cdef .eqs. "_LARGEFILE64_SOURCE") then - - call write_config f$string("#define _LARGEFILE 1") -$ else -$ write sys$output "Checking for ''cdef'... no" -$ if (comm_h) -$ then - call write_config f$fao("/* !AS */",line) -$ else -$ if f$type('cdef_val'_no) .nes. "" -$ then -$ if f$type('cdef_val'_no) .eqs. "INTEGER" - - then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_no) -$ if f$type('cdef_val'_no) .eqs. "STRING" - - then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_no) -$ else -$ call write_config f$fao("#undef !AS",cdef) -$ endif -$ endif -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! Check for properties of C/C++ compiler with multiple result values -$! -$! Version history -$! 0.01 20040127 First version -$! 0.02 20050103 Reconcile changes from cc_prop up to version 0.05 -$CC_MPROP_CHECK: -$ cc_prop = true -$ i = 1 -$ idel = 1 -$ MT_LOOP: -$ if f$type(result_'i') .eqs. "STRING" -$ then -$ set message/nofac/noident/nosever/notext -$ on error then continue -$ cc 'tmpnam'_'i' -$ if .not. ($status) then cc_prop = false -$ on error then continue -$! The headers might lie about the capabilities of the RTL -$ link 'tmpnam'_'i',tmp.opt/opt -$ if .not. ($status) then cc_prop = false -$ set message/fac/ident/sever/text -$ on error then goto err_exit -$ delete/nolog 'tmpnam'_'i'.*;* -$ if (cc_prop) -$ then -$ write sys$output "Checking for ''cdef'... ", mdef_'i' -$ if f$type(mdef_'i') .eqs. "INTEGER" - - then call write_config f$fao("#define !AS !UL",cdef,mdef_'i') -$ if f$type('cdef_val'_yes) .eqs. "STRING" - - then call write_config f$fao("#define !AS !AS",cdef,mdef_'i') -$ goto msym_clean -$ else -$ i = i + 1 -$ goto mt_loop -$ endif -$ endif -$ write sys$output "Checking for ''cdef'... no" -$ call write_config f$fao("#undef !AS",cdef) -$ MSYM_CLEAN: -$ if (idel .le. msym_max) -$ then -$ delete/sym mdef_'idel' -$ idel = idel + 1 -$ goto msym_clean -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! Write configuration to both permanent and temporary config file -$! -$! Version history -$! 0.01 20031029 First version to receive a number -$! -$WRITE_CONFIG: SUBROUTINE -$ write aconf 'p1' -$ open/append confh 'th' -$ write confh 'p1' -$ close confh -$ENDSUBROUTINE -$!------------------------------------------------------------------------------ -$! -$! Analyze the project map file and create the symbol vector for a shareable -$! image from it -$! -$! Version history -$! 0.01 20120128 First version -$! 0.02 20120226 Add pre-load logic -$! -$ MAP_2_SHOPT: Subroutine -$! -$ SAY := "WRITE_ SYS$OUTPUT" -$! -$ IF F$SEARCH("''P1'") .EQS. "" -$ THEN -$ SAY "MAP_2_SHOPT-E-NOSUCHFILE: Error, inputfile ''p1' not available" -$ goto exit_m2s -$ ENDIF -$ IF "''P2'" .EQS. "" -$ THEN -$ SAY "MAP_2_SHOPT: Error, no output file provided" -$ goto exit_m2s -$ ENDIF -$! -$ module1 = "deflate#deflateEnd#deflateInit_#deflateParams#deflateSetDictionary" -$ module2 = "gzclose#gzerror#gzgetc#gzgets#gzopen#gzprintf#gzputc#gzputs#gzread" -$ module3 = "gzseek#gztell#inflate#inflateEnd#inflateInit_#inflateSetDictionary" -$ module4 = "inflateSync#uncompress#zlibVersion#compress" -$ open/read map 'p1 -$ if axp .or. ia64 -$ then -$ open/write aopt a.opt -$ open/write bopt b.opt -$ write aopt " CASE_SENSITIVE=YES" -$ write bopt "SYMBOL_VECTOR= (-" -$ mod_sym_num = 1 -$ MOD_SYM_LOOP: -$ if f$type(module'mod_sym_num') .nes. "" -$ then -$ mod_in = 0 -$ MOD_SYM_IN: -$ shared_proc = f$element(mod_in, "#", module'mod_sym_num') -$ if shared_proc .nes. "#" -$ then -$ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",- - f$edit(shared_proc,"upcase"),shared_proc) -$ write bopt f$fao("!AS=PROCEDURE,-",shared_proc) -$ mod_in = mod_in + 1 -$ goto mod_sym_in -$ endif -$ mod_sym_num = mod_sym_num + 1 -$ goto mod_sym_loop -$ endif -$MAP_LOOP: -$ read/end=map_end map line -$ if (f$locate("{",line).lt. f$length(line)) .or. - - (f$locate("global:", line) .lt. f$length(line)) -$ then -$ proc = true -$ goto map_loop -$ endif -$ if f$locate("}",line).lt. f$length(line) then proc = false -$ if f$locate("local:", line) .lt. f$length(line) then proc = false -$ if proc -$ then -$ shared_proc = f$edit(line,"collapse") -$ chop_semi = f$locate(";", shared_proc) -$ if chop_semi .lt. f$length(shared_proc) then - - shared_proc = f$extract(0, chop_semi, shared_proc) -$ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",- - f$edit(shared_proc,"upcase"),shared_proc) -$ write bopt f$fao("!AS=PROCEDURE,-",shared_proc) -$ endif -$ goto map_loop -$MAP_END: -$ close/nolog aopt -$ close/nolog bopt -$ open/append libopt 'p2' -$ open/read aopt a.opt -$ open/read bopt b.opt -$ALOOP: -$ read/end=aloop_end aopt line -$ write libopt line -$ goto aloop -$ALOOP_END: -$ close/nolog aopt -$ sv = "" -$BLOOP: -$ read/end=bloop_end bopt svn -$ if (svn.nes."") -$ then -$ if (sv.nes."") then write libopt sv -$ sv = svn -$ endif -$ goto bloop -$BLOOP_END: -$ write libopt f$extract(0,f$length(sv)-2,sv), "-" -$ write libopt ")" -$ close/nolog bopt -$ delete/nolog/noconf a.opt;*,b.opt;* -$ else -$ if vax -$ then -$ open/append libopt 'p2' -$ mod_sym_num = 1 -$ VMOD_SYM_LOOP: -$ if f$type(module'mod_sym_num') .nes. "" -$ then -$ mod_in = 0 -$ VMOD_SYM_IN: -$ shared_proc = f$element(mod_in, "#", module'mod_sym_num') -$ if shared_proc .nes. "#" -$ then -$ write libopt f$fao("UNIVERSAL=!AS",- - f$edit(shared_proc,"upcase")) -$ mod_in = mod_in + 1 -$ goto vmod_sym_in -$ endif -$ mod_sym_num = mod_sym_num + 1 -$ goto vmod_sym_loop -$ endif -$VMAP_LOOP: -$ read/end=vmap_end map line -$ if (f$locate("{",line).lt. f$length(line)) .or. - - (f$locate("global:", line) .lt. f$length(line)) -$ then -$ proc = true -$ goto vmap_loop -$ endif -$ if f$locate("}",line).lt. f$length(line) then proc = false -$ if f$locate("local:", line) .lt. f$length(line) then proc = false -$ if proc -$ then -$ shared_proc = f$edit(line,"collapse") -$ chop_semi = f$locate(";", shared_proc) -$ if chop_semi .lt. f$length(shared_proc) then - - shared_proc = f$extract(0, chop_semi, shared_proc) -$ write libopt f$fao("UNIVERSAL=!AS",- - f$edit(shared_proc,"upcase")) -$ endif -$ goto vmap_loop -$VMAP_END: -$ else -$ write sys$output "Unknown Architecture (Not VAX, AXP, or IA64)" -$ write sys$output "No options file created" -$ endif -$ endif -$ EXIT_M2S: -$ close/nolog map -$ close/nolog libopt -$ endsubroutine diff --git a/thirdparty/zlib-1.2.12/msdos/Makefile.bor b/thirdparty/zlib-1.2.12/msdos/Makefile.bor deleted file mode 100644 index 3d12a2c..0000000 --- a/thirdparty/zlib-1.2.12/msdos/Makefile.bor +++ /dev/null @@ -1,115 +0,0 @@ -# Makefile for zlib -# Borland C++ -# Last updated: 15-Mar-2003 - -# To use, do "make -fmakefile.bor" -# To compile in small model, set below: MODEL=s - -# WARNING: the small model is supported but only for small values of -# MAX_WBITS and MAX_MEM_LEVEL. For example: -# -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3 -# If you wish to reduce the memory requirements (default 256K for big -# objects plus a few K), you can add to the LOC macro below: -# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 -# See zconf.h for details about the memory requirements. - -# ------------ Turbo C++, Borland C++ ------------ - -# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) -# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added -# to the declaration of LOC here: -LOC = $(LOCAL_ZLIB) - -# type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. -CPU_TYP = 0 - -# memory model: one of s, m, c, l (small, medium, compact, large) -MODEL=l - -# replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version -CC=bcc -LD=bcc -AR=tlib - -# compiler flags -# replace "-O2" by "-O -G -a -d" for Turbo C++ 1.0 -CFLAGS=-O2 -Z -m$(MODEL) $(LOC) - -LDFLAGS=-m$(MODEL) -f- - - -# variables -ZLIB_LIB = zlib_$(MODEL).lib - -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj -OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj -OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj - - -# targets -all: $(ZLIB_LIB) example.exe minigzip.exe - -.c.obj: - $(CC) -c $(CFLAGS) $*.c - -adler32.obj: adler32.c zlib.h zconf.h - -compress.obj: compress.c zlib.h zconf.h - -crc32.obj: crc32.c zlib.h zconf.h crc32.h - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - -gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h - -gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h - -gzread.obj: gzread.c zlib.h zconf.h gzguts.h - -gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h - -infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h - -inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - -trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h - -uncompr.obj: uncompr.c zlib.h zconf.h - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - -example.obj: test/example.c zlib.h zconf.h - -minigzip.obj: test/minigzip.c zlib.h zconf.h - - -# the command line is cut to fit in the MS-DOS 128 byte limit: -$(ZLIB_LIB): $(OBJ1) $(OBJ2) - -del $(ZLIB_LIB) - $(AR) $(ZLIB_LIB) $(OBJP1) - $(AR) $(ZLIB_LIB) $(OBJP2) - -example.exe: example.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) - -minigzip.exe: minigzip.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) - -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -clean: - -del *.obj - -del *.lib - -del *.exe - -del zlib_*.bak - -del foo.gz diff --git a/thirdparty/zlib-1.2.12/msdos/Makefile.dj2 b/thirdparty/zlib-1.2.12/msdos/Makefile.dj2 deleted file mode 100644 index 59d2037..0000000 --- a/thirdparty/zlib-1.2.12/msdos/Makefile.dj2 +++ /dev/null @@ -1,104 +0,0 @@ -# Makefile for zlib. Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96. -# Copyright (C) 1995-1998 Jean-loup Gailly. -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile, or to compile and test, type: -# -# make -fmakefile.dj2; make test -fmakefile.dj2 -# -# To install libz.a, zconf.h and zlib.h in the djgpp directories, type: -# -# make install -fmakefile.dj2 -# -# after first defining LIBRARY_PATH and INCLUDE_PATH in djgpp.env as -# in the sample below if the pattern of the DJGPP distribution is to -# be followed. Remember that, while 'es around <=> are ignored in -# makefiles, they are *not* in batch files or in djgpp.env. -# - - - - - -# [make] -# INCLUDE_PATH=%\>;INCLUDE_PATH%%\DJDIR%\include -# LIBRARY_PATH=%\>;LIBRARY_PATH%%\DJDIR%\lib -# BUTT=-m486 -# - - - - - -# Alternately, these variables may be defined below, overriding the values -# in djgpp.env, as -# INCLUDE_PATH=c:\usr\include -# LIBRARY_PATH=c:\usr\lib - -CC=gcc - -#CFLAGS=-MMD -O -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-MMD -g -DZLIB_DEBUG -CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ - -Wstrict-prototypes -Wmissing-prototypes - -# If cp.exe is available, replace "copy /Y" with "cp -fp" . -CP=copy /Y -# If gnu install.exe is available, replace $(CP) with ginstall. -INSTALL=$(CP) -# The default value of RM is "rm -f." If "rm.exe" is found, comment out: -RM=del -LDLIBS=-L. -lz -LD=$(CC) -s -o -LDSHARED=$(CC) - -INCL=zlib.h zconf.h -LIBS=libz.a - -AR=ar rcs - -prefix=/usr/local -exec_prefix = $(prefix) - -OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ - uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o - -OBJA = -# to use the asm code: make OBJA=match.o - -TEST_OBJS = example.o minigzip.o - -all: example.exe minigzip.exe - -check: test -test: all - ./example - echo hello world | .\minigzip | .\minigzip -d - -%.o : %.c - $(CC) $(CFLAGS) -c $< -o $@ - -libz.a: $(OBJS) $(OBJA) - $(AR) $@ $(OBJS) $(OBJA) - -%.exe : %.o $(LIBS) - $(LD) $@ $< $(LDLIBS) - -# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env . - -.PHONY : uninstall clean - -install: $(INCL) $(LIBS) - -@if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH) - -@if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH) - $(INSTALL) zlib.h $(INCLUDE_PATH) - $(INSTALL) zconf.h $(INCLUDE_PATH) - $(INSTALL) libz.a $(LIBRARY_PATH) - -uninstall: - $(RM) $(INCLUDE_PATH)\zlib.h - $(RM) $(INCLUDE_PATH)\zconf.h - $(RM) $(LIBRARY_PATH)\libz.a - -clean: - $(RM) *.d - $(RM) *.o - $(RM) *.exe - $(RM) libz.a - $(RM) foo.gz - -DEPS := $(wildcard *.d) -ifneq ($(DEPS),) -include $(DEPS) -endif diff --git a/thirdparty/zlib-1.2.12/msdos/Makefile.emx b/thirdparty/zlib-1.2.12/msdos/Makefile.emx deleted file mode 100644 index e30f67b..0000000 --- a/thirdparty/zlib-1.2.12/msdos/Makefile.emx +++ /dev/null @@ -1,69 +0,0 @@ -# Makefile for zlib. Modified for emx 0.9c by Chr. Spieler, 6/17/98. -# Copyright (C) 1995-1998 Jean-loup Gailly. -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile, or to compile and test, type: -# -# make -fmakefile.emx; make test -fmakefile.emx -# - -CC=gcc - -#CFLAGS=-MMD -O -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-MMD -g -DZLIB_DEBUG -CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ - -Wstrict-prototypes -Wmissing-prototypes - -# If cp.exe is available, replace "copy /Y" with "cp -fp" . -CP=copy /Y -# If gnu install.exe is available, replace $(CP) with ginstall. -INSTALL=$(CP) -# The default value of RM is "rm -f." If "rm.exe" is found, comment out: -RM=del -LDLIBS=-L. -lzlib -LD=$(CC) -s -o -LDSHARED=$(CC) - -INCL=zlib.h zconf.h -LIBS=zlib.a - -AR=ar rcs - -prefix=/usr/local -exec_prefix = $(prefix) - -OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ - uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o - -TEST_OBJS = example.o minigzip.o - -all: example.exe minigzip.exe - -test: all - ./example - echo hello world | .\minigzip | .\minigzip -d - -%.o : %.c - $(CC) $(CFLAGS) -c $< -o $@ - -zlib.a: $(OBJS) - $(AR) $@ $(OBJS) - -%.exe : %.o $(LIBS) - $(LD) $@ $< $(LDLIBS) - - -.PHONY : clean - -clean: - $(RM) *.d - $(RM) *.o - $(RM) *.exe - $(RM) zlib.a - $(RM) foo.gz - -DEPS := $(wildcard *.d) -ifneq ($(DEPS),) -include $(DEPS) -endif diff --git a/thirdparty/zlib-1.2.12/msdos/Makefile.msc b/thirdparty/zlib-1.2.12/msdos/Makefile.msc deleted file mode 100644 index ae83786..0000000 --- a/thirdparty/zlib-1.2.12/msdos/Makefile.msc +++ /dev/null @@ -1,112 +0,0 @@ -# Makefile for zlib -# Microsoft C 5.1 or later -# Last updated: 19-Mar-2003 - -# To use, do "make makefile.msc" -# To compile in small model, set below: MODEL=S - -# If you wish to reduce the memory requirements (default 256K for big -# objects plus a few K), you can add to the LOC macro below: -# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 -# See zconf.h for details about the memory requirements. - -# ------------- Microsoft C 5.1 and later ------------- - -# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) -# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added -# to the declaration of LOC here: -LOC = $(LOCAL_ZLIB) - -# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. -CPU_TYP = 0 - -# Memory model: one of S, M, C, L (small, medium, compact, large) -MODEL=L - -CC=cl -CFLAGS=-nologo -A$(MODEL) -G$(CPU_TYP) -W3 -Oait -Gs $(LOC) -#-Ox generates bad code with MSC 5.1 -LIB_CFLAGS=-Zl $(CFLAGS) - -LD=link -LDFLAGS=/noi/e/st:0x1500/noe/farcall/packcode -# "/farcall/packcode" are only useful for `large code' memory models -# but should be a "no-op" for small code models. - - -# variables -ZLIB_LIB = zlib_$(MODEL).lib - -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj -OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj - - -# targets -all: $(ZLIB_LIB) example.exe minigzip.exe - -.c.obj: - $(CC) -c $(LIB_CFLAGS) $*.c - -adler32.obj: adler32.c zlib.h zconf.h - -compress.obj: compress.c zlib.h zconf.h - -crc32.obj: crc32.c zlib.h zconf.h crc32.h - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - -gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h - -gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h - -gzread.obj: gzread.c zlib.h zconf.h gzguts.h - -gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h - -infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h - -inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - -trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h - -uncompr.obj: uncompr.c zlib.h zconf.h - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - -example.obj: test/example.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -minigzip.obj: test/minigzip.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - - -# the command line is cut to fit in the MS-DOS 128 byte limit: -$(ZLIB_LIB): $(OBJ1) $(OBJ2) - if exist $(ZLIB_LIB) del $(ZLIB_LIB) - lib $(ZLIB_LIB) $(OBJ1); - lib $(ZLIB_LIB) $(OBJ2); - -example.exe: example.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) example.obj,,,$(ZLIB_LIB); - -minigzip.exe: minigzip.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) minigzip.obj,,,$(ZLIB_LIB); - -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -clean: - -del *.obj - -del *.lib - -del *.exe - -del *.map - -del zlib_*.bak - -del foo.gz diff --git a/thirdparty/zlib-1.2.12/msdos/Makefile.tc b/thirdparty/zlib-1.2.12/msdos/Makefile.tc deleted file mode 100644 index 5aec82a..0000000 --- a/thirdparty/zlib-1.2.12/msdos/Makefile.tc +++ /dev/null @@ -1,100 +0,0 @@ -# Makefile for zlib -# Turbo C 2.01, Turbo C++ 1.01 -# Last updated: 15-Mar-2003 - -# To use, do "make -fmakefile.tc" -# To compile in small model, set below: MODEL=s - -# WARNING: the small model is supported but only for small values of -# MAX_WBITS and MAX_MEM_LEVEL. For example: -# -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 -# If you wish to reduce the memory requirements (default 256K for big -# objects plus a few K), you can add to CFLAGS below: -# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 -# See zconf.h for details about the memory requirements. - -# ------------ Turbo C 2.01, Turbo C++ 1.01 ------------ -MODEL=l -CC=tcc -LD=tcc -AR=tlib -# CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 -CFLAGS=-O2 -G -Z -m$(MODEL) -LDFLAGS=-m$(MODEL) -f- - - -# variables -ZLIB_LIB = zlib_$(MODEL).lib - -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj -OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj -OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj - - -# targets -all: $(ZLIB_LIB) example.exe minigzip.exe - -.c.obj: - $(CC) -c $(CFLAGS) $*.c - -adler32.obj: adler32.c zlib.h zconf.h - -compress.obj: compress.c zlib.h zconf.h - -crc32.obj: crc32.c zlib.h zconf.h crc32.h - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - -gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h - -gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h - -gzread.obj: gzread.c zlib.h zconf.h gzguts.h - -gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h - -infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h - -inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - -trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h - -uncompr.obj: uncompr.c zlib.h zconf.h - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - -example.obj: test/example.c zlib.h zconf.h - -minigzip.obj: test/minigzip.c zlib.h zconf.h - - -# the command line is cut to fit in the MS-DOS 128 byte limit: -$(ZLIB_LIB): $(OBJ1) $(OBJ2) - -del $(ZLIB_LIB) - $(AR) $(ZLIB_LIB) $(OBJP1) - $(AR) $(ZLIB_LIB) $(OBJP2) - -example.exe: example.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) - -minigzip.exe: minigzip.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) - -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -clean: - -del *.obj - -del *.lib - -del *.exe - -del zlib_*.bak - -del foo.gz diff --git a/thirdparty/zlib-1.2.12/nintendods/Makefile b/thirdparty/zlib-1.2.12/nintendods/Makefile deleted file mode 100644 index 21337d0..0000000 --- a/thirdparty/zlib-1.2.12/nintendods/Makefile +++ /dev/null @@ -1,126 +0,0 @@ -#--------------------------------------------------------------------------------- -.SUFFIXES: -#--------------------------------------------------------------------------------- - -ifeq ($(strip $(DEVKITARM)),) -$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") -endif - -include $(DEVKITARM)/ds_rules - -#--------------------------------------------------------------------------------- -# TARGET is the name of the output -# BUILD is the directory where object files & intermediate files will be placed -# SOURCES is a list of directories containing source code -# DATA is a list of directories containing data files -# INCLUDES is a list of directories containing header files -#--------------------------------------------------------------------------------- -TARGET := $(shell basename $(CURDIR)) -BUILD := build -SOURCES := ../../ -DATA := data -INCLUDES := include - -#--------------------------------------------------------------------------------- -# options for code generation -#--------------------------------------------------------------------------------- -ARCH := -mthumb -mthumb-interwork - -CFLAGS := -Wall -O2\ - -march=armv5te -mtune=arm946e-s \ - -fomit-frame-pointer -ffast-math \ - $(ARCH) - -CFLAGS += $(INCLUDE) -DARM9 -CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions - -ASFLAGS := $(ARCH) -march=armv5te -mtune=arm946e-s -LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) - -#--------------------------------------------------------------------------------- -# list of directories containing libraries, this must be the top level containing -# include and lib -#--------------------------------------------------------------------------------- -LIBDIRS := $(LIBNDS) - -#--------------------------------------------------------------------------------- -# no real need to edit anything past this point unless you need to add additional -# rules for different file extensions -#--------------------------------------------------------------------------------- -ifneq ($(BUILD),$(notdir $(CURDIR))) -#--------------------------------------------------------------------------------- - -export OUTPUT := $(CURDIR)/lib/libz.a - -export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ - $(foreach dir,$(DATA),$(CURDIR)/$(dir)) - -export DEPSDIR := $(CURDIR)/$(BUILD) - -CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) -CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) -SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) -BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) - -#--------------------------------------------------------------------------------- -# use CXX for linking C++ projects, CC for standard C -#--------------------------------------------------------------------------------- -ifeq ($(strip $(CPPFILES)),) -#--------------------------------------------------------------------------------- - export LD := $(CC) -#--------------------------------------------------------------------------------- -else -#--------------------------------------------------------------------------------- - export LD := $(CXX) -#--------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------- - -export OFILES := $(addsuffix .o,$(BINFILES)) \ - $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) - -export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ - $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ - -I$(CURDIR)/$(BUILD) - -.PHONY: $(BUILD) clean all - -#--------------------------------------------------------------------------------- -all: $(BUILD) - @[ -d $@ ] || mkdir -p include - @cp ../../*.h include - -lib: - @[ -d $@ ] || mkdir -p $@ - -$(BUILD): lib - @[ -d $@ ] || mkdir -p $@ - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile - -#--------------------------------------------------------------------------------- -clean: - @echo clean ... - @rm -fr $(BUILD) lib - -#--------------------------------------------------------------------------------- -else - -DEPENDS := $(OFILES:.o=.d) - -#--------------------------------------------------------------------------------- -# main targets -#--------------------------------------------------------------------------------- -$(OUTPUT) : $(OFILES) - -#--------------------------------------------------------------------------------- -%.bin.o : %.bin -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - @$(bin2o) - - --include $(DEPENDS) - -#--------------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------------- diff --git a/thirdparty/zlib-1.2.12/nintendods/README b/thirdparty/zlib-1.2.12/nintendods/README deleted file mode 100644 index ba7a37d..0000000 --- a/thirdparty/zlib-1.2.12/nintendods/README +++ /dev/null @@ -1,5 +0,0 @@ -This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. - -Eduardo Costa -January 3, 2009 - diff --git a/thirdparty/zlib-1.2.12/old/Makefile.emx b/thirdparty/zlib-1.2.12/old/Makefile.emx deleted file mode 100644 index 612b037..0000000 --- a/thirdparty/zlib-1.2.12/old/Makefile.emx +++ /dev/null @@ -1,69 +0,0 @@ -# Makefile for zlib. Modified for emx/rsxnt by Chr. Spieler, 6/16/98. -# Copyright (C) 1995-1998 Jean-loup Gailly. -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile, or to compile and test, type: -# -# make -fmakefile.emx; make test -fmakefile.emx -# - -CC=gcc -Zwin32 - -#CFLAGS=-MMD -O -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-MMD -g -DZLIB_DEBUG -CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ - -Wstrict-prototypes -Wmissing-prototypes - -# If cp.exe is available, replace "copy /Y" with "cp -fp" . -CP=copy /Y -# If gnu install.exe is available, replace $(CP) with ginstall. -INSTALL=$(CP) -# The default value of RM is "rm -f." If "rm.exe" is found, comment out: -RM=del -LDLIBS=-L. -lzlib -LD=$(CC) -s -o -LDSHARED=$(CC) - -INCL=zlib.h zconf.h -LIBS=zlib.a - -AR=ar rcs - -prefix=/usr/local -exec_prefix = $(prefix) - -OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ - gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o - -TEST_OBJS = example.o minigzip.o - -all: example.exe minigzip.exe - -test: all - ./example - echo hello world | .\minigzip | .\minigzip -d - -%.o : %.c - $(CC) $(CFLAGS) -c $< -o $@ - -zlib.a: $(OBJS) - $(AR) $@ $(OBJS) - -%.exe : %.o $(LIBS) - $(LD) $@ $< $(LDLIBS) - - -.PHONY : clean - -clean: - $(RM) *.d - $(RM) *.o - $(RM) *.exe - $(RM) zlib.a - $(RM) foo.gz - -DEPS := $(wildcard *.d) -ifneq ($(DEPS),) -include $(DEPS) -endif diff --git a/thirdparty/zlib-1.2.12/old/Makefile.riscos b/thirdparty/zlib-1.2.12/old/Makefile.riscos deleted file mode 100644 index 57e29d3..0000000 --- a/thirdparty/zlib-1.2.12/old/Makefile.riscos +++ /dev/null @@ -1,151 +0,0 @@ -# Project: zlib_1_03 -# Patched for zlib 1.1.2 rw@shadow.org.uk 19980430 -# test works out-of-the-box, installs `somewhere' on demand - -# Toolflags: -CCflags = -c -depend !Depend -IC: -g -throwback -DRISCOS -fah -C++flags = -c -depend !Depend -IC: -throwback -Linkflags = -aif -c++ -o $@ -ObjAsmflags = -throwback -NoCache -depend !Depend -CMHGflags = -LibFileflags = -c -l -o $@ -Squeezeflags = -o $@ - -# change the line below to where _you_ want the library installed. -libdest = lib:zlib - -# Final targets: -@.lib: @.o.adler32 @.o.compress @.o.crc32 @.o.deflate @.o.gzio \ - @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil @.o.trees \ - @.o.uncompr @.o.zutil - LibFile $(LibFileflags) @.o.adler32 @.o.compress @.o.crc32 @.o.deflate \ - @.o.gzio @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil \ - @.o.trees @.o.uncompr @.o.zutil -test: @.minigzip @.example @.lib - @copy @.lib @.libc A~C~DF~L~N~P~Q~RS~TV - @echo running tests: hang on. - @/@.minigzip -f -9 libc - @/@.minigzip -d libc-gz - @/@.minigzip -f -1 libc - @/@.minigzip -d libc-gz - @/@.minigzip -h -9 libc - @/@.minigzip -d libc-gz - @/@.minigzip -h -1 libc - @/@.minigzip -d libc-gz - @/@.minigzip -9 libc - @/@.minigzip -d libc-gz - @/@.minigzip -1 libc - @/@.minigzip -d libc-gz - @diff @.lib @.libc - @echo that should have reported '@.lib and @.libc identical' if you have diff. - @/@.example @.fred @.fred - @echo that will have given lots of hello!'s. - -@.minigzip: @.o.minigzip @.lib C:o.Stubs - Link $(Linkflags) @.o.minigzip @.lib C:o.Stubs -@.example: @.o.example @.lib C:o.Stubs - Link $(Linkflags) @.o.example @.lib C:o.Stubs - -install: @.lib - cdir $(libdest) - cdir $(libdest).h - @copy @.h.zlib $(libdest).h.zlib A~C~DF~L~N~P~Q~RS~TV - @copy @.h.zconf $(libdest).h.zconf A~C~DF~L~N~P~Q~RS~TV - @copy @.lib $(libdest).lib A~C~DF~L~N~P~Q~RS~TV - @echo okay, installed zlib in $(libdest) - -clean:; remove @.minigzip - remove @.example - remove @.libc - -wipe @.o.* F~r~cV - remove @.fred - -# User-editable dependencies: -.c.o: - cc $(ccflags) -o $@ $< - -# Static dependencies: - -# Dynamic dependencies: -o.example: c.example -o.example: h.zlib -o.example: h.zconf -o.minigzip: c.minigzip -o.minigzip: h.zlib -o.minigzip: h.zconf -o.adler32: c.adler32 -o.adler32: h.zlib -o.adler32: h.zconf -o.compress: c.compress -o.compress: h.zlib -o.compress: h.zconf -o.crc32: c.crc32 -o.crc32: h.zlib -o.crc32: h.zconf -o.deflate: c.deflate -o.deflate: h.deflate -o.deflate: h.zutil -o.deflate: h.zlib -o.deflate: h.zconf -o.gzio: c.gzio -o.gzio: h.zutil -o.gzio: h.zlib -o.gzio: h.zconf -o.infblock: c.infblock -o.infblock: h.zutil -o.infblock: h.zlib -o.infblock: h.zconf -o.infblock: h.infblock -o.infblock: h.inftrees -o.infblock: h.infcodes -o.infblock: h.infutil -o.infcodes: c.infcodes -o.infcodes: h.zutil -o.infcodes: h.zlib -o.infcodes: h.zconf -o.infcodes: h.inftrees -o.infcodes: h.infblock -o.infcodes: h.infcodes -o.infcodes: h.infutil -o.infcodes: h.inffast -o.inffast: c.inffast -o.inffast: h.zutil -o.inffast: h.zlib -o.inffast: h.zconf -o.inffast: h.inftrees -o.inffast: h.infblock -o.inffast: h.infcodes -o.inffast: h.infutil -o.inffast: h.inffast -o.inflate: c.inflate -o.inflate: h.zutil -o.inflate: h.zlib -o.inflate: h.zconf -o.inflate: h.infblock -o.inftrees: c.inftrees -o.inftrees: h.zutil -o.inftrees: h.zlib -o.inftrees: h.zconf -o.inftrees: h.inftrees -o.inftrees: h.inffixed -o.infutil: c.infutil -o.infutil: h.zutil -o.infutil: h.zlib -o.infutil: h.zconf -o.infutil: h.infblock -o.infutil: h.inftrees -o.infutil: h.infcodes -o.infutil: h.infutil -o.trees: c.trees -o.trees: h.deflate -o.trees: h.zutil -o.trees: h.zlib -o.trees: h.zconf -o.trees: h.trees -o.uncompr: c.uncompr -o.uncompr: h.zlib -o.uncompr: h.zconf -o.zutil: c.zutil -o.zutil: h.zutil -o.zutil: h.zlib -o.zutil: h.zconf diff --git a/thirdparty/zlib-1.2.12/old/README b/thirdparty/zlib-1.2.12/old/README deleted file mode 100644 index 800bf07..0000000 --- a/thirdparty/zlib-1.2.12/old/README +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains files that have not been updated for zlib 1.2.x - -(Volunteers are encouraged to help clean this up. Thanks.) diff --git a/thirdparty/zlib-1.2.12/old/descrip.mms b/thirdparty/zlib-1.2.12/old/descrip.mms deleted file mode 100644 index 7066da5..0000000 --- a/thirdparty/zlib-1.2.12/old/descrip.mms +++ /dev/null @@ -1,48 +0,0 @@ -# descrip.mms: MMS description file for building zlib on VMS -# written by Martin P.J. Zinser - -cc_defs = -c_deb = - -.ifdef __DECC__ -pref = /prefix=all -.endif - -OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj,\ - deflate.obj, trees.obj, zutil.obj, inflate.obj, infblock.obj,\ - inftrees.obj, infcodes.obj, infutil.obj, inffast.obj - -CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) - -all : example.exe minigzip.exe - @ write sys$output " Example applications available" -libz.olb : libz.olb($(OBJS)) - @ write sys$output " libz available" - -example.exe : example.obj libz.olb - link example,libz.olb/lib - -minigzip.exe : minigzip.obj libz.olb - link minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib - -clean : - delete *.obj;*,libz.olb;* - - -# Other dependencies. -adler32.obj : zutil.h zlib.h zconf.h -compress.obj : zlib.h zconf.h -crc32.obj : zutil.h zlib.h zconf.h -deflate.obj : deflate.h zutil.h zlib.h zconf.h -example.obj : zlib.h zconf.h -gzio.obj : zutil.h zlib.h zconf.h -infblock.obj : zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h -infcodes.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h -inffast.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h -inflate.obj : zutil.h zlib.h zconf.h infblock.h -inftrees.obj : zutil.h zlib.h zconf.h inftrees.h -infutil.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h -minigzip.obj : zlib.h zconf.h -trees.obj : deflate.h zutil.h zlib.h zconf.h -uncompr.obj : zlib.h zconf.h -zutil.obj : zutil.h zlib.h zconf.h diff --git a/thirdparty/zlib-1.2.12/old/os2/Makefile.os2 b/thirdparty/zlib-1.2.12/old/os2/Makefile.os2 deleted file mode 100644 index bb426c0..0000000 --- a/thirdparty/zlib-1.2.12/old/os2/Makefile.os2 +++ /dev/null @@ -1,136 +0,0 @@ -# Makefile for zlib under OS/2 using GCC (PGCC) -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile and test, type: -# cp Makefile.os2 .. -# cd .. -# make -f Makefile.os2 test - -# This makefile will build a static library z.lib, a shared library -# z.dll and a import library zdll.lib. You can use either z.lib or -# zdll.lib by specifying either -lz or -lzdll on gcc's command line - -CC=gcc -Zomf -s - -CFLAGS=-O6 -Wall -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-g -DZLIB_DEBUG -#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ -# -Wstrict-prototypes -Wmissing-prototypes - -#################### BUG WARNING: ##################### -## infcodes.c hits a bug in pgcc-1.0, so you have to use either -## -O# where # <= 4 or one of (-fno-ommit-frame-pointer or -fno-force-mem) -## This bug is reportedly fixed in pgcc >1.0, but this was not tested -CFLAGS+=-fno-force-mem - -LDFLAGS=-s -L. -lzdll -Zcrtdll -LDSHARED=$(CC) -s -Zomf -Zdll -Zcrtdll - -VER=1.1.0 -ZLIB=z.lib -SHAREDLIB=z.dll -SHAREDLIBIMP=zdll.lib -LIBS=$(ZLIB) $(SHAREDLIB) $(SHAREDLIBIMP) - -AR=emxomfar cr -IMPLIB=emximp -RANLIB=echo -TAR=tar -SHELL=bash - -prefix=/usr/local -exec_prefix = $(prefix) - -OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ - zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o - -TEST_OBJS = example.o minigzip.o - -DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \ - algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \ - nt/Makefile.nt nt/zlib.dnt contrib/README.contrib contrib/*.txt \ - contrib/asm386/*.asm contrib/asm386/*.c \ - contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/iostream/*.cpp \ - contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \ - contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 - -all: example.exe minigzip.exe - -test: all - @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ - echo hello world | ./minigzip | ./minigzip -d || \ - echo ' *** minigzip test FAILED ***' ; \ - if ./example; then \ - echo ' *** zlib test OK ***'; \ - else \ - echo ' *** zlib test FAILED ***'; \ - fi - -$(ZLIB): $(OBJS) - $(AR) $@ $(OBJS) - -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 - -$(SHAREDLIB): $(OBJS) os2/z.def - $(LDSHARED) -o $@ $^ - -$(SHAREDLIBIMP): os2/z.def - $(IMPLIB) -o $@ $^ - -example.exe: example.o $(LIBS) - $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) - -minigzip.exe: minigzip.o $(LIBS) - $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) - -clean: - rm -f *.o *~ example minigzip libz.a libz.so* foo.gz - -distclean: clean - -zip: - mv Makefile Makefile~; cp -p Makefile.in Makefile - rm -f test.c ztest*.c - v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ - zip -ul9 zlib$$v $(DISTFILES) - mv Makefile~ Makefile - -dist: - mv Makefile Makefile~; cp -p Makefile.in Makefile - rm -f test.c ztest*.c - d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ - rm -f $$d.tar.gz; \ - if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \ - files=""; \ - for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \ - cd ..; \ - GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \ - if test ! -d $$d; then rm -f $$d; fi - mv Makefile~ Makefile - -tags: - etags *.[ch] - -depend: - makedepend -- $(CFLAGS) -- *.[ch] - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -adler32.o: zlib.h zconf.h -compress.o: zlib.h zconf.h -crc32.o: zlib.h zconf.h -deflate.o: deflate.h zutil.h zlib.h zconf.h -example.o: zlib.h zconf.h -gzio.o: zutil.h zlib.h zconf.h -infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h -infcodes.o: zutil.h zlib.h zconf.h -infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h -inffast.o: zutil.h zlib.h zconf.h inftrees.h -inffast.o: infblock.h infcodes.h infutil.h inffast.h -inflate.o: zutil.h zlib.h zconf.h infblock.h -inftrees.o: zutil.h zlib.h zconf.h inftrees.h -infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h -minigzip.o: zlib.h zconf.h -trees.o: deflate.h zutil.h zlib.h zconf.h trees.h -uncompr.o: zlib.h zconf.h -zutil.o: zutil.h zlib.h zconf.h diff --git a/thirdparty/zlib-1.2.12/old/os2/zlib.def b/thirdparty/zlib-1.2.12/old/os2/zlib.def deleted file mode 100644 index 4c753f1..0000000 --- a/thirdparty/zlib-1.2.12/old/os2/zlib.def +++ /dev/null @@ -1,51 +0,0 @@ -; -; Slightly modified version of ../nt/zlib.dnt :-) -; - -LIBRARY Z -DESCRIPTION "Zlib compression library for OS/2" -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE - -EXPORTS - adler32 - compress - crc32 - deflate - deflateCopy - deflateEnd - deflateInit2_ - deflateInit_ - deflateParams - deflateReset - deflateSetDictionary - gzclose - gzdopen - gzerror - gzflush - gzopen - gzread - gzwrite - inflate - inflateEnd - inflateInit2_ - inflateInit_ - inflateReset - inflateSetDictionary - inflateSync - uncompress - zlibVersion - gzprintf - gzputc - gzgetc - gzseek - gzrewind - gztell - gzeof - gzsetparams - zError - inflateSyncPoint - get_crc_table - compress2 - gzputs - gzgets diff --git a/thirdparty/zlib-1.2.12/old/visual-basic.txt b/thirdparty/zlib-1.2.12/old/visual-basic.txt deleted file mode 100644 index 57efe58..0000000 --- a/thirdparty/zlib-1.2.12/old/visual-basic.txt +++ /dev/null @@ -1,160 +0,0 @@ -See below some functions declarations for Visual Basic. - -Frequently Asked Question: - -Q: Each time I use the compress function I get the -5 error (not enough - room in the output buffer). - -A: Make sure that the length of the compressed buffer is passed by - reference ("as any"), not by value ("as long"). Also check that - before the call of compress this length is equal to the total size of - the compressed buffer and not zero. - - -From: "Jon Caruana" -Subject: Re: How to port zlib declares to vb? -Date: Mon, 28 Oct 1996 18:33:03 -0600 - -Got the answer! (I haven't had time to check this but it's what I got, and -looks correct): - -He has the following routines working: - compress - uncompress - gzopen - gzwrite - gzread - gzclose - -Declares follow: (Quoted from Carlos Rios , in Vb4 form) - -#If Win16 Then 'Use Win16 calls. -Declare Function compress Lib "ZLIB.DLL" (ByVal compr As - String, comprLen As Any, ByVal buf As String, ByVal buflen - As Long) As Integer -Declare Function uncompress Lib "ZLIB.DLL" (ByVal uncompr - As String, uncomprLen As Any, ByVal compr As String, ByVal - lcompr As Long) As Integer -Declare Function gzopen Lib "ZLIB.DLL" (ByVal filePath As - String, ByVal mode As String) As Long -Declare Function gzread Lib "ZLIB.DLL" (ByVal file As - Long, ByVal uncompr As String, ByVal uncomprLen As Integer) - As Integer -Declare Function gzwrite Lib "ZLIB.DLL" (ByVal file As - Long, ByVal uncompr As String, ByVal uncomprLen As Integer) - As Integer -Declare Function gzclose Lib "ZLIB.DLL" (ByVal file As - Long) As Integer -#Else -Declare Function compress Lib "ZLIB32.DLL" - (ByVal compr As String, comprLen As Any, ByVal buf As - String, ByVal buflen As Long) As Integer -Declare Function uncompress Lib "ZLIB32.DLL" - (ByVal uncompr As String, uncomprLen As Any, ByVal compr As - String, ByVal lcompr As Long) As Long -Declare Function gzopen Lib "ZLIB32.DLL" - (ByVal file As String, ByVal mode As String) As Long -Declare Function gzread Lib "ZLIB32.DLL" - (ByVal file As Long, ByVal uncompr As String, ByVal - uncomprLen As Long) As Long -Declare Function gzwrite Lib "ZLIB32.DLL" - (ByVal file As Long, ByVal uncompr As String, ByVal - uncomprLen As Long) As Long -Declare Function gzclose Lib "ZLIB32.DLL" - (ByVal file As Long) As Long -#End If - --Jon Caruana -jon-net@usa.net -Microsoft Sitebuilder Network Level 1 Member - HTML Writer's Guild Member - - -Here is another example from Michael that he -says conforms to the VB guidelines, and that solves the problem of not -knowing the uncompressed size by storing it at the end of the file: - -'Calling the functions: -'bracket meaning: [optional] {Range of possible values} -'Call subCompressFile( [, , [level of compression {1..9}]]) -'Call subUncompressFile() - -Option Explicit -Private lngpvtPcnSml As Long 'Stores value for 'lngPercentSmaller' -Private Const SUCCESS As Long = 0 -Private Const strFilExt As String = ".cpr" -Private Declare Function lngfncCpr Lib "zlib.dll" Alias "compress2" (ByRef -dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long, -ByVal level As Integer) As Long -Private Declare Function lngfncUcp Lib "zlib.dll" Alias "uncompress" (ByRef -dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long) -As Long - -Public Sub subCompressFile(ByVal strargOriFilPth As String, Optional ByVal -strargCprFilPth As String, Optional ByVal intLvl As Integer = 9) - Dim strCprPth As String - Dim lngOriSiz As Long - Dim lngCprSiz As Long - Dim bytaryOri() As Byte - Dim bytaryCpr() As Byte - lngOriSiz = FileLen(strargOriFilPth) - ReDim bytaryOri(lngOriSiz - 1) - Open strargOriFilPth For Binary Access Read As #1 - Get #1, , bytaryOri() - Close #1 - strCprPth = IIf(strargCprFilPth = "", strargOriFilPth, strargCprFilPth) -'Select file path and name - strCprPth = strCprPth & IIf(Right(strCprPth, Len(strFilExt)) = -strFilExt, "", strFilExt) 'Add file extension if not exists - lngCprSiz = (lngOriSiz * 1.01) + 12 'Compression needs temporary a bit -more space then original file size - ReDim bytaryCpr(lngCprSiz - 1) - If lngfncCpr(bytaryCpr(0), lngCprSiz, bytaryOri(0), lngOriSiz, intLvl) = -SUCCESS Then - lngpvtPcnSml = (1# - (lngCprSiz / lngOriSiz)) * 100 - ReDim Preserve bytaryCpr(lngCprSiz - 1) - Open strCprPth For Binary Access Write As #1 - Put #1, , bytaryCpr() - Put #1, , lngOriSiz 'Add the the original size value to the end -(last 4 bytes) - Close #1 - Else - MsgBox "Compression error" - End If - Erase bytaryCpr - Erase bytaryOri -End Sub - -Public Sub subUncompressFile(ByVal strargFilPth As String) - Dim bytaryCpr() As Byte - Dim bytaryOri() As Byte - Dim lngOriSiz As Long - Dim lngCprSiz As Long - Dim strOriPth As String - lngCprSiz = FileLen(strargFilPth) - ReDim bytaryCpr(lngCprSiz - 1) - Open strargFilPth For Binary Access Read As #1 - Get #1, , bytaryCpr() - Close #1 - 'Read the original file size value: - lngOriSiz = bytaryCpr(lngCprSiz - 1) * (2 ^ 24) _ - + bytaryCpr(lngCprSiz - 2) * (2 ^ 16) _ - + bytaryCpr(lngCprSiz - 3) * (2 ^ 8) _ - + bytaryCpr(lngCprSiz - 4) - ReDim Preserve bytaryCpr(lngCprSiz - 5) 'Cut of the original size value - ReDim bytaryOri(lngOriSiz - 1) - If lngfncUcp(bytaryOri(0), lngOriSiz, bytaryCpr(0), lngCprSiz) = SUCCESS -Then - strOriPth = Left(strargFilPth, Len(strargFilPth) - Len(strFilExt)) - Open strOriPth For Binary Access Write As #1 - Put #1, , bytaryOri() - Close #1 - Else - MsgBox "Uncompression error" - End If - Erase bytaryCpr - Erase bytaryOri -End Sub -Public Property Get lngPercentSmaller() As Long - lngPercentSmaller = lngpvtPcnSml -End Property diff --git a/thirdparty/zlib-1.2.12/os400/README400 b/thirdparty/zlib-1.2.12/os400/README400 deleted file mode 100644 index 10f6c9d..0000000 --- a/thirdparty/zlib-1.2.12/os400/README400 +++ /dev/null @@ -1,48 +0,0 @@ - ZLIB version 1.2.12 for OS/400 installation instructions - -1) Download and unpack the zlib tarball to some IFS directory. - (i.e.: /path/to/the/zlib/ifs/source/directory) - - If the installed IFS command suppors gzip format, this is straightforward, -else you have to unpack first to some directory on a system supporting it, -then move the whole directory to the IFS via the network (via SMB or FTP). - -2) Edit the configuration parameters in the compilation script. - - EDTF STMF('/path/to/the/zlib/ifs/source/directory/os400/make.sh') - -Tune the parameters according to your needs if not matching the defaults. -Save the file and exit after edition. - -3) Enter qshell, then work in the zlib OS/400 specific directory. - - QSH - cd /path/to/the/zlib/ifs/source/directory/os400 - -4) Compile and install - - sh make.sh - -The script will: -- create the libraries, objects and IFS directories for the zlib environment, -- compile all modules, -- create a service program, -- create a static and a dynamic binding directory, -- install header files for C/C++ and for ILE/RPG, both for compilation in - DB2 and IFS environments. - -That's all. - - -Notes: For OS/400 ILE RPG programmers, a /copy member defining the ZLIB - API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC). - In the ILE environment, the same definitions are available from - file zlib.inc located in the same IFS include directory as the - C/C++ header files. - Please read comments in this member for more information. - - Remember that most foreign textual data are ASCII coded: this - implementation does not handle conversion from/to ASCII, so - text data code conversions must be done explicitely. - - Mainly for the reason above, always open zipped files in binary mode. diff --git a/thirdparty/zlib-1.2.12/os400/bndsrc b/thirdparty/zlib-1.2.12/os400/bndsrc deleted file mode 100644 index 5e6e0a2..0000000 --- a/thirdparty/zlib-1.2.12/os400/bndsrc +++ /dev/null @@ -1,119 +0,0 @@ -STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB') - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.1.3 entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("adler32") - EXPORT SYMBOL("compress") - EXPORT SYMBOL("compress2") - EXPORT SYMBOL("crc32") - EXPORT SYMBOL("get_crc_table") - EXPORT SYMBOL("deflate") - EXPORT SYMBOL("deflateEnd") - EXPORT SYMBOL("deflateSetDictionary") - EXPORT SYMBOL("deflateCopy") - EXPORT SYMBOL("deflateReset") - EXPORT SYMBOL("deflateParams") - EXPORT SYMBOL("deflatePrime") - EXPORT SYMBOL("deflateInit_") - EXPORT SYMBOL("deflateInit2_") - EXPORT SYMBOL("gzopen") - EXPORT SYMBOL("gzdopen") - EXPORT SYMBOL("gzsetparams") - EXPORT SYMBOL("gzread") - EXPORT SYMBOL("gzwrite") - EXPORT SYMBOL("gzprintf") - EXPORT SYMBOL("gzputs") - EXPORT SYMBOL("gzgets") - EXPORT SYMBOL("gzputc") - EXPORT SYMBOL("gzgetc") - EXPORT SYMBOL("gzflush") - EXPORT SYMBOL("gzseek") - EXPORT SYMBOL("gzrewind") - EXPORT SYMBOL("gztell") - EXPORT SYMBOL("gzeof") - EXPORT SYMBOL("gzclose") - EXPORT SYMBOL("gzerror") - EXPORT SYMBOL("inflate") - EXPORT SYMBOL("inflateEnd") - EXPORT SYMBOL("inflateSetDictionary") - EXPORT SYMBOL("inflateSync") - EXPORT SYMBOL("inflateReset") - EXPORT SYMBOL("inflateInit_") - EXPORT SYMBOL("inflateInit2_") - EXPORT SYMBOL("inflateSyncPoint") - EXPORT SYMBOL("uncompress") - EXPORT SYMBOL("zlibVersion") - EXPORT SYMBOL("zError") - EXPORT SYMBOL("z_errmsg") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.1 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("compressBound") - EXPORT SYMBOL("deflateBound") - EXPORT SYMBOL("deflatePending") - EXPORT SYMBOL("gzungetc") - EXPORT SYMBOL("gzclearerr") - EXPORT SYMBOL("inflateBack") - EXPORT SYMBOL("inflateBackEnd") - EXPORT SYMBOL("inflateBackInit_") - EXPORT SYMBOL("inflateCopy") - EXPORT SYMBOL("zlibCompileFlags") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.4 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("adler32_combine") - EXPORT SYMBOL("adler32_combine64") - EXPORT SYMBOL("crc32_combine") - EXPORT SYMBOL("crc32_combine64") - EXPORT SYMBOL("deflateSetHeader") - EXPORT SYMBOL("deflateTune") - EXPORT SYMBOL("gzbuffer") - EXPORT SYMBOL("gzclose_r") - EXPORT SYMBOL("gzclose_w") - EXPORT SYMBOL("gzdirect") - EXPORT SYMBOL("gzoffset") - EXPORT SYMBOL("gzoffset64") - EXPORT SYMBOL("gzopen64") - EXPORT SYMBOL("gzseek64") - EXPORT SYMBOL("gztell64") - EXPORT SYMBOL("inflateGetHeader") - EXPORT SYMBOL("inflateMark") - EXPORT SYMBOL("inflatePrime") - EXPORT SYMBOL("inflateReset2") - EXPORT SYMBOL("inflateUndermine") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.6 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("deflateResetKeep") - EXPORT SYMBOL("gzgetc_") - EXPORT SYMBOL("inflateResetKeep") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.8 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("gzvprintf") - EXPORT SYMBOL("inflateGetDictionary") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.9 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("adler32_z") - EXPORT SYMBOL("crc32_z") - EXPORT SYMBOL("deflateGetDictionary") - EXPORT SYMBOL("gzfread") - EXPORT SYMBOL("gzfwrite") - EXPORT SYMBOL("inflateCodesUsed") - EXPORT SYMBOL("inflateValidate") - EXPORT SYMBOL("uncompress2") - -ENDPGMEXP diff --git a/thirdparty/zlib-1.2.12/os400/make.sh b/thirdparty/zlib-1.2.12/os400/make.sh deleted file mode 100644 index 19eec11..0000000 --- a/thirdparty/zlib-1.2.12/os400/make.sh +++ /dev/null @@ -1,366 +0,0 @@ -#!/bin/sh -# -# ZLIB compilation script for the OS/400. -# -# -# This is a shell script since make is not a standard component of OS/400. - - -################################################################################ -# -# Tunable configuration parameters. -# -################################################################################ - -TARGETLIB='ZLIB' # Target OS/400 program library -STATBNDDIR='ZLIB_A' # Static binding directory. -DYNBNDDIR='ZLIB' # Dynamic binding directory. -SRVPGM="ZLIB" # Service program. -IFSDIR='/zlib' # IFS support base directory. -TGTCCSID='500' # Target CCSID of objects -DEBUG='*NONE' # Debug level -OPTIMIZE='40' # Optimisation level -OUTPUT='*NONE' # Compilation output option. -TGTRLS='V6R1M0' # Target OS release - -export TARGETLIB STATBNDDIR DYNBNDDIR SRVPGM IFSDIR -export TGTCCSID DEBUG OPTIMIZE OUTPUT TGTRLS - - -################################################################################ -# -# OS/400 specific definitions. -# -################################################################################ - -LIBIFSNAME="/QSYS.LIB/${TARGETLIB}.LIB" - - -################################################################################ -# -# Procedures. -# -################################################################################ - -# action_needed dest [src] -# -# dest is an object to build -# if specified, src is an object on which dest depends. -# -# exit 0 (succeeds) if some action has to be taken, else 1. - -action_needed() - -{ - [ ! -e "${1}" ] && return 0 - [ "${2}" ] || return 1 - [ "${1}" -ot "${2}" ] && return 0 - return 1 -} - - -# make_module module_name source_name [additional_definitions] -# -# Compile source name into module if needed. -# As side effect, append the module name to variable MODULES. -# Set LINK to "YES" if the module has been compiled. - -make_module() - -{ - MODULES="${MODULES} ${1}" - MODIFSNAME="${LIBIFSNAME}/${1}.MODULE" - CSRC="`basename \"${2}\"`" - - if action_needed "${MODIFSNAME}" "${2}" - then : - elif [ ! "`sed -e \"//,/<\\\\/source>/!d\" \ - -e '/ tmphdrfile - - # Need to translate to target CCSID. - - CMD="CPY OBJ('`pwd`/tmphdrfile') TOOBJ('${DEST}')" - CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)" - system "${CMD}" - # touch -r "${HFILE}" "${DEST}" - rm -f tmphdrfile - fi - - IFSFILE="${IFSDIR}/include/`basename \"${HFILE}\"`" - - if action_needed "${IFSFILE}" "${DEST}" - then rm -f "${IFSFILE}" - ln -s "${DEST}" "${IFSFILE}" - fi -done - - -# Install the ILE/RPG header file. - - -HFILE="${SCRIPTDIR}/zlib.inc" -DEST="${SRCPF}/ZLIB.INC.MBR" - -if action_needed "${DEST}" "${HFILE}" -then CMD="CPY OBJ('${HFILE}') TOOBJ('${DEST}')" - CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)" - system "${CMD}" - # touch -r "${HFILE}" "${DEST}" -fi - -IFSFILE="${IFSDIR}/include/`basename \"${HFILE}\"`" - -if action_needed "${IFSFILE}" "${DEST}" -then rm -f "${IFSFILE}" - ln -s "${DEST}" "${IFSFILE}" -fi - - -# Create and compile the identification source file. - -echo '#pragma comment(user, "ZLIB version '"${VERSION}"'")' > os400.c -echo '#pragma comment(user, __DATE__)' >> os400.c -echo '#pragma comment(user, __TIME__)' >> os400.c -echo '#pragma comment(copyright, "Copyright (C) 1995-2017 Jean-Loup Gailly, Mark Adler. OS/400 version by P. Monnerat.")' >> os400.c -make_module OS400 os400.c -LINK= # No need to rebuild service program yet. -MODULES= - - -# Get source list. - -CSOURCES=`sed -e '/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Library - - Medium - - 2.0 - - - - zlib - zlib - alain.bonnefoy@icbt.com - Public - public - www.gzip.org/zlib - - - Jean-Loup Gailly,Mark Adler - www.gzip.org/zlib - - zlib@gzip.org - - - A massively spiffy yet delicately unobtrusive compression library. - zlib is designed to be a free, general-purpose, legally unencumbered, lossless data compression library for use on virtually any computer hardware and operating system. - http://www.gzip.org/zlib - - - - - 1.2.12 - Medium - Stable - - - - - - - No License - - - - Software Development/Libraries and Extensions/C Libraries - zlib,compression - qnx6 - qnx6 - None - Developer - - - - - - - - - - - - - - Install - Post - No - Ignore - - No - Optional - - - - - - - - - - - - - InstallOver - zlib - - - - - - - - - - - - - InstallOver - zlib-dev - - - - - - - - - diff --git a/thirdparty/zlib-1.2.12/test/example.c b/thirdparty/zlib-1.2.12/test/example.c deleted file mode 100644 index 949f4f6..0000000 --- a/thirdparty/zlib-1.2.12/test/example.c +++ /dev/null @@ -1,601 +0,0 @@ -/* example.c -- usage example of the zlib compression library - * Copyright (C) 1995-2006, 2011, 2016 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "zlib.h" -#include - -#ifdef STDC -# include -# include -#endif - -#if defined(VMS) || defined(RISCOS) -# define TESTFILE "foo-gz" -#else -# define TESTFILE "foo.gz" -#endif - -#define CHECK_ERR(err, msg) { \ - if (err != Z_OK) { \ - fprintf(stderr, "%s error: %d\n", msg, err); \ - exit(1); \ - } \ -} - -static z_const char hello[] = "hello, hello!"; -/* "hello world" would be more standard, but the repeated "hello" - * stresses the compression code better, sorry... - */ - -static const char dictionary[] = "hello"; -static uLong dictId; /* Adler32 value of the dictionary */ - -void test_deflate OF((Byte *compr, uLong comprLen)); -void test_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_large_deflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_large_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_flush OF((Byte *compr, uLong *comprLen)); -void test_sync OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_dict_deflate OF((Byte *compr, uLong comprLen)); -void test_dict_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -int main OF((int argc, char *argv[])); - - -#ifdef Z_SOLO - -void *myalloc OF((void *, unsigned, unsigned)); -void myfree OF((void *, void *)); - -void *myalloc(q, n, m) - void *q; - unsigned n, m; -{ - (void)q; - return calloc(n, m); -} - -void myfree(void *q, void *p) -{ - (void)q; - free(p); -} - -static alloc_func zalloc = myalloc; -static free_func zfree = myfree; - -#else /* !Z_SOLO */ - -static alloc_func zalloc = (alloc_func)0; -static free_func zfree = (free_func)0; - -void test_compress OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_gzio OF((const char *fname, - Byte *uncompr, uLong uncomprLen)); - -/* =========================================================================== - * Test compress() and uncompress() - */ -void test_compress(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - uLong len = (uLong)strlen(hello)+1; - - err = compress(compr, &comprLen, (const Bytef*)hello, len); - CHECK_ERR(err, "compress"); - - strcpy((char*)uncompr, "garbage"); - - err = uncompress(uncompr, &uncomprLen, compr, comprLen); - CHECK_ERR(err, "uncompress"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad uncompress\n"); - exit(1); - } else { - printf("uncompress(): %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Test read/write of .gz files - */ -void test_gzio(fname, uncompr, uncomprLen) - const char *fname; /* compressed file name */ - Byte *uncompr; - uLong uncomprLen; -{ -#ifdef NO_GZCOMPRESS - fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n"); -#else - int err; - int len = (int)strlen(hello)+1; - gzFile file; - z_off_t pos; - - file = gzopen(fname, "wb"); - if (file == NULL) { - fprintf(stderr, "gzopen error\n"); - exit(1); - } - gzputc(file, 'h'); - if (gzputs(file, "ello") != 4) { - fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err)); - exit(1); - } - if (gzprintf(file, ", %s!", "hello") != 8) { - fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err)); - exit(1); - } - gzseek(file, 1L, SEEK_CUR); /* add one zero byte */ - gzclose(file); - - file = gzopen(fname, "rb"); - if (file == NULL) { - fprintf(stderr, "gzopen error\n"); - exit(1); - } - strcpy((char*)uncompr, "garbage"); - - if (gzread(file, uncompr, (unsigned)uncomprLen) != len) { - fprintf(stderr, "gzread err: %s\n", gzerror(file, &err)); - exit(1); - } - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad gzread: %s\n", (char*)uncompr); - exit(1); - } else { - printf("gzread(): %s\n", (char*)uncompr); - } - - pos = gzseek(file, -8L, SEEK_CUR); - if (pos != 6 || gztell(file) != pos) { - fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n", - (long)pos, (long)gztell(file)); - exit(1); - } - - if (gzgetc(file) != ' ') { - fprintf(stderr, "gzgetc error\n"); - exit(1); - } - - if (gzungetc(' ', file) != ' ') { - fprintf(stderr, "gzungetc error\n"); - exit(1); - } - - gzgets(file, (char*)uncompr, (int)uncomprLen); - if (strlen((char*)uncompr) != 7) { /* " hello!" */ - fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err)); - exit(1); - } - if (strcmp((char*)uncompr, hello + 6)) { - fprintf(stderr, "bad gzgets after gzseek\n"); - exit(1); - } else { - printf("gzgets() after gzseek: %s\n", (char*)uncompr); - } - - gzclose(file); -#endif -} - -#endif /* Z_SOLO */ - -/* =========================================================================== - * Test deflate() with small buffers - */ -void test_deflate(compr, comprLen) - Byte *compr; - uLong comprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - uLong len = (uLong)strlen(hello)+1; - - c_stream.zalloc = zalloc; - c_stream.zfree = zfree; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_in = (z_const unsigned char *)hello; - c_stream.next_out = compr; - - while (c_stream.total_in != len && c_stream.total_out < comprLen) { - c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */ - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - } - /* Finish the stream, still forcing small buffers: */ - for (;;) { - c_stream.avail_out = 1; - err = deflate(&c_stream, Z_FINISH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "deflate"); - } - - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with small buffers - */ -void test_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = zalloc; - d_stream.zfree = zfree; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = 0; - d_stream.next_out = uncompr; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) { - d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */ - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "inflate"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad inflate\n"); - exit(1); - } else { - printf("inflate(): %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Test deflate() with large buffers and dynamic change of compression level - */ -void test_large_deflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - - c_stream.zalloc = zalloc; - c_stream.zfree = zfree; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_BEST_SPEED); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_out = compr; - c_stream.avail_out = (uInt)comprLen; - - /* At this point, uncompr is still mostly zeroes, so it should compress - * very well: - */ - c_stream.next_in = uncompr; - c_stream.avail_in = (uInt)uncomprLen; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - if (c_stream.avail_in != 0) { - fprintf(stderr, "deflate not greedy\n"); - exit(1); - } - - /* Feed in already compressed data and switch to no compression: */ - deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY); - c_stream.next_in = compr; - c_stream.avail_in = (uInt)comprLen/2; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - - /* Switch back to compressing mode: */ - deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED); - c_stream.next_in = uncompr; - c_stream.avail_in = (uInt)uncomprLen; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - fprintf(stderr, "deflate should report Z_STREAM_END\n"); - exit(1); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with large buffers - */ -void test_large_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = zalloc; - d_stream.zfree = zfree; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = (uInt)comprLen; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - for (;;) { - d_stream.next_out = uncompr; /* discard the output */ - d_stream.avail_out = (uInt)uncomprLen; - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "large inflate"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (d_stream.total_out != 2*uncomprLen + comprLen/2) { - fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out); - exit(1); - } else { - printf("large_inflate(): OK\n"); - } -} - -/* =========================================================================== - * Test deflate() with full flush - */ -void test_flush(compr, comprLen) - Byte *compr; - uLong *comprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - uInt len = (uInt)strlen(hello)+1; - - c_stream.zalloc = zalloc; - c_stream.zfree = zfree; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_in = (z_const unsigned char *)hello; - c_stream.next_out = compr; - c_stream.avail_in = 3; - c_stream.avail_out = (uInt)*comprLen; - err = deflate(&c_stream, Z_FULL_FLUSH); - CHECK_ERR(err, "deflate"); - - compr[3]++; /* force an error in first compressed block */ - c_stream.avail_in = len - 3; - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - CHECK_ERR(err, "deflate"); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); - - *comprLen = c_stream.total_out; -} - -/* =========================================================================== - * Test inflateSync() - */ -void test_sync(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = zalloc; - d_stream.zfree = zfree; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = 2; /* just read the zlib header */ - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - d_stream.next_out = uncompr; - d_stream.avail_out = (uInt)uncomprLen; - - err = inflate(&d_stream, Z_NO_FLUSH); - CHECK_ERR(err, "inflate"); - - d_stream.avail_in = (uInt)comprLen-2; /* read all compressed data */ - err = inflateSync(&d_stream); /* but skip the damaged part */ - CHECK_ERR(err, "inflateSync"); - - err = inflate(&d_stream, Z_FINISH); - if (err != Z_STREAM_END) { - fprintf(stderr, "inflate should report Z_STREAM_END\n"); - exit(1); - } - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - printf("after inflateSync(): hel%s\n", (char *)uncompr); -} - -/* =========================================================================== - * Test deflate() with preset dictionary - */ -void test_dict_deflate(compr, comprLen) - Byte *compr; - uLong comprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - - c_stream.zalloc = zalloc; - c_stream.zfree = zfree; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_BEST_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - err = deflateSetDictionary(&c_stream, - (const Bytef*)dictionary, (int)sizeof(dictionary)); - CHECK_ERR(err, "deflateSetDictionary"); - - dictId = c_stream.adler; - c_stream.next_out = compr; - c_stream.avail_out = (uInt)comprLen; - - c_stream.next_in = (z_const unsigned char *)hello; - c_stream.avail_in = (uInt)strlen(hello)+1; - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - fprintf(stderr, "deflate should report Z_STREAM_END\n"); - exit(1); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with a preset dictionary - */ -void test_dict_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = zalloc; - d_stream.zfree = zfree; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = (uInt)comprLen; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - d_stream.next_out = uncompr; - d_stream.avail_out = (uInt)uncomprLen; - - for (;;) { - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - if (err == Z_NEED_DICT) { - if (d_stream.adler != dictId) { - fprintf(stderr, "unexpected dictionary"); - exit(1); - } - err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary, - (int)sizeof(dictionary)); - } - CHECK_ERR(err, "inflate with dict"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad inflate with dict\n"); - exit(1); - } else { - printf("inflate with dictionary: %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Usage: example [output.gz [input.gz]] - */ - -int main(argc, argv) - int argc; - char *argv[]; -{ - Byte *compr, *uncompr; - uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */ - uLong uncomprLen = comprLen; - static const char* myVersion = ZLIB_VERSION; - - if (zlibVersion()[0] != myVersion[0]) { - fprintf(stderr, "incompatible zlib version\n"); - exit(1); - - } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) { - fprintf(stderr, "warning: different zlib version\n"); - } - - printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n", - ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags()); - - compr = (Byte*)calloc((uInt)comprLen, 1); - uncompr = (Byte*)calloc((uInt)uncomprLen, 1); - /* compr and uncompr are cleared to avoid reading uninitialized - * data and to ensure that uncompr compresses well. - */ - if (compr == Z_NULL || uncompr == Z_NULL) { - printf("out of memory\n"); - exit(1); - } - -#ifdef Z_SOLO - (void)argc; - (void)argv; -#else - test_compress(compr, comprLen, uncompr, uncomprLen); - - test_gzio((argc > 1 ? argv[1] : TESTFILE), - uncompr, uncomprLen); -#endif - - test_deflate(compr, comprLen); - test_inflate(compr, comprLen, uncompr, uncomprLen); - - test_large_deflate(compr, comprLen, uncompr, uncomprLen); - test_large_inflate(compr, comprLen, uncompr, uncomprLen); - - test_flush(compr, &comprLen); - test_sync(compr, comprLen, uncompr, uncomprLen); - comprLen = uncomprLen; - - test_dict_deflate(compr, comprLen); - test_dict_inflate(compr, comprLen, uncompr, uncomprLen); - - free(compr); - free(uncompr); - - return 0; -} diff --git a/thirdparty/zlib-1.2.12/test/infcover.c b/thirdparty/zlib-1.2.12/test/infcover.c deleted file mode 100644 index 2be0164..0000000 --- a/thirdparty/zlib-1.2.12/test/infcover.c +++ /dev/null @@ -1,671 +0,0 @@ -/* infcover.c -- test zlib's inflate routines with full code coverage - * Copyright (C) 2011, 2016 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* to use, do: ./configure --cover && make cover */ - -#include -#include -#include -#include -#include "zlib.h" - -/* get definition of internal structure so we can mess with it (see pull()), - and so we can call inflate_trees() (see cover5()) */ -#define ZLIB_INTERNAL -#include "inftrees.h" -#include "inflate.h" - -#define local static - -/* -- memory tracking routines -- */ - -/* - These memory tracking routines are provided to zlib and track all of zlib's - allocations and deallocations, check for LIFO operations, keep a current - and high water mark of total bytes requested, optionally set a limit on the - total memory that can be allocated, and when done check for memory leaks. - - They are used as follows: - - z_stream strm; - mem_setup(&strm) initializes the memory tracking and sets the - zalloc, zfree, and opaque members of strm to use - memory tracking for all zlib operations on strm - mem_limit(&strm, limit) sets a limit on the total bytes requested -- a - request that exceeds this limit will result in an - allocation failure (returns NULL) -- setting the - limit to zero means no limit, which is the default - after mem_setup() - mem_used(&strm, "msg") prints to stderr "msg" and the total bytes used - mem_high(&strm, "msg") prints to stderr "msg" and the high water mark - mem_done(&strm, "msg") ends memory tracking, releases all allocations - for the tracking as well as leaked zlib blocks, if - any. If there was anything unusual, such as leaked - blocks, non-FIFO frees, or frees of addresses not - allocated, then "msg" and information about the - problem is printed to stderr. If everything is - normal, nothing is printed. mem_done resets the - strm members to Z_NULL to use the default memory - allocation routines on the next zlib initialization - using strm. - */ - -/* these items are strung together in a linked list, one for each allocation */ -struct mem_item { - void *ptr; /* pointer to allocated memory */ - size_t size; /* requested size of allocation */ - struct mem_item *next; /* pointer to next item in list, or NULL */ -}; - -/* this structure is at the root of the linked list, and tracks statistics */ -struct mem_zone { - struct mem_item *first; /* pointer to first item in list, or NULL */ - size_t total, highwater; /* total allocations, and largest total */ - size_t limit; /* memory allocation limit, or 0 if no limit */ - int notlifo, rogue; /* counts of non-LIFO frees and rogue frees */ -}; - -/* memory allocation routine to pass to zlib */ -local void *mem_alloc(void *mem, unsigned count, unsigned size) -{ - void *ptr; - struct mem_item *item; - struct mem_zone *zone = mem; - size_t len = count * (size_t)size; - - /* induced allocation failure */ - if (zone == NULL || (zone->limit && zone->total + len > zone->limit)) - return NULL; - - /* perform allocation using the standard library, fill memory with a - non-zero value to make sure that the code isn't depending on zeros */ - ptr = malloc(len); - if (ptr == NULL) - return NULL; - memset(ptr, 0xa5, len); - - /* create a new item for the list */ - item = malloc(sizeof(struct mem_item)); - if (item == NULL) { - free(ptr); - return NULL; - } - item->ptr = ptr; - item->size = len; - - /* insert item at the beginning of the list */ - item->next = zone->first; - zone->first = item; - - /* update the statistics */ - zone->total += item->size; - if (zone->total > zone->highwater) - zone->highwater = zone->total; - - /* return the allocated memory */ - return ptr; -} - -/* memory free routine to pass to zlib */ -local void mem_free(void *mem, void *ptr) -{ - struct mem_item *item, *next; - struct mem_zone *zone = mem; - - /* if no zone, just do a free */ - if (zone == NULL) { - free(ptr); - return; - } - - /* point next to the item that matches ptr, or NULL if not found -- remove - the item from the linked list if found */ - next = zone->first; - if (next) { - if (next->ptr == ptr) - zone->first = next->next; /* first one is it, remove from list */ - else { - do { /* search the linked list */ - item = next; - next = item->next; - } while (next != NULL && next->ptr != ptr); - if (next) { /* if found, remove from linked list */ - item->next = next->next; - zone->notlifo++; /* not a LIFO free */ - } - - } - } - - /* if found, update the statistics and free the item */ - if (next) { - zone->total -= next->size; - free(next); - } - - /* if not found, update the rogue count */ - else - zone->rogue++; - - /* in any case, do the requested free with the standard library function */ - free(ptr); -} - -/* set up a controlled memory allocation space for monitoring, set the stream - parameters to the controlled routines, with opaque pointing to the space */ -local void mem_setup(z_stream *strm) -{ - struct mem_zone *zone; - - zone = malloc(sizeof(struct mem_zone)); - assert(zone != NULL); - zone->first = NULL; - zone->total = 0; - zone->highwater = 0; - zone->limit = 0; - zone->notlifo = 0; - zone->rogue = 0; - strm->opaque = zone; - strm->zalloc = mem_alloc; - strm->zfree = mem_free; -} - -/* set a limit on the total memory allocation, or 0 to remove the limit */ -local void mem_limit(z_stream *strm, size_t limit) -{ - struct mem_zone *zone = strm->opaque; - - zone->limit = limit; -} - -/* show the current total requested allocations in bytes */ -local void mem_used(z_stream *strm, char *prefix) -{ - struct mem_zone *zone = strm->opaque; - - fprintf(stderr, "%s: %lu allocated\n", prefix, zone->total); -} - -/* show the high water allocation in bytes */ -local void mem_high(z_stream *strm, char *prefix) -{ - struct mem_zone *zone = strm->opaque; - - fprintf(stderr, "%s: %lu high water mark\n", prefix, zone->highwater); -} - -/* release the memory allocation zone -- if there are any surprises, notify */ -local void mem_done(z_stream *strm, char *prefix) -{ - int count = 0; - struct mem_item *item, *next; - struct mem_zone *zone = strm->opaque; - - /* show high water mark */ - mem_high(strm, prefix); - - /* free leftover allocations and item structures, if any */ - item = zone->first; - while (item != NULL) { - free(item->ptr); - next = item->next; - free(item); - item = next; - count++; - } - - /* issue alerts about anything unexpected */ - if (count || zone->total) - fprintf(stderr, "** %s: %lu bytes in %d blocks not freed\n", - prefix, zone->total, count); - if (zone->notlifo) - fprintf(stderr, "** %s: %d frees not LIFO\n", prefix, zone->notlifo); - if (zone->rogue) - fprintf(stderr, "** %s: %d frees not recognized\n", - prefix, zone->rogue); - - /* free the zone and delete from the stream */ - free(zone); - strm->opaque = Z_NULL; - strm->zalloc = Z_NULL; - strm->zfree = Z_NULL; -} - -/* -- inflate test routines -- */ - -/* Decode a hexadecimal string, set *len to length, in[] to the bytes. This - decodes liberally, in that hex digits can be adjacent, in which case two in - a row writes a byte. Or they can be delimited by any non-hex character, - where the delimiters are ignored except when a single hex digit is followed - by a delimiter, where that single digit writes a byte. The returned data is - allocated and must eventually be freed. NULL is returned if out of memory. - If the length is not needed, then len can be NULL. */ -local unsigned char *h2b(const char *hex, unsigned *len) -{ - unsigned char *in, *re; - unsigned next, val; - - in = malloc((strlen(hex) + 1) >> 1); - if (in == NULL) - return NULL; - next = 0; - val = 1; - do { - if (*hex >= '0' && *hex <= '9') - val = (val << 4) + *hex - '0'; - else if (*hex >= 'A' && *hex <= 'F') - val = (val << 4) + *hex - 'A' + 10; - else if (*hex >= 'a' && *hex <= 'f') - val = (val << 4) + *hex - 'a' + 10; - else if (val != 1 && val < 32) /* one digit followed by delimiter */ - val += 240; /* make it look like two digits */ - if (val > 255) { /* have two digits */ - in[next++] = val & 0xff; /* save the decoded byte */ - val = 1; /* start over */ - } - } while (*hex++); /* go through the loop with the terminating null */ - if (len != NULL) - *len = next; - re = realloc(in, next); - return re == NULL ? in : re; -} - -/* generic inflate() run, where hex is the hexadecimal input data, what is the - text to include in an error message, step is how much input data to feed - inflate() on each call, or zero to feed it all, win is the window bits - parameter to inflateInit2(), len is the size of the output buffer, and err - is the error code expected from the first inflate() call (the second - inflate() call is expected to return Z_STREAM_END). If win is 47, then - header information is collected with inflateGetHeader(). If a zlib stream - is looking for a dictionary, then an empty dictionary is provided. - inflate() is run until all of the input data is consumed. */ -local void inf(char *hex, char *what, unsigned step, int win, unsigned len, - int err) -{ - int ret; - unsigned have; - unsigned char *in, *out; - z_stream strm, copy; - gz_header head; - - mem_setup(&strm); - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, win); - if (ret != Z_OK) { - mem_done(&strm, what); - return; - } - out = malloc(len); assert(out != NULL); - if (win == 47) { - head.extra = out; - head.extra_max = len; - head.name = out; - head.name_max = len; - head.comment = out; - head.comm_max = len; - ret = inflateGetHeader(&strm, &head); assert(ret == Z_OK); - } - in = h2b(hex, &have); assert(in != NULL); - if (step == 0 || step > have) - step = have; - strm.avail_in = step; - have -= step; - strm.next_in = in; - do { - strm.avail_out = len; - strm.next_out = out; - ret = inflate(&strm, Z_NO_FLUSH); assert(err == 9 || ret == err); - if (ret != Z_OK && ret != Z_BUF_ERROR && ret != Z_NEED_DICT) - break; - if (ret == Z_NEED_DICT) { - ret = inflateSetDictionary(&strm, in, 1); - assert(ret == Z_DATA_ERROR); - mem_limit(&strm, 1); - ret = inflateSetDictionary(&strm, out, 0); - assert(ret == Z_MEM_ERROR); - mem_limit(&strm, 0); - ((struct inflate_state *)strm.state)->mode = DICT; - ret = inflateSetDictionary(&strm, out, 0); - assert(ret == Z_OK); - ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_BUF_ERROR); - } - ret = inflateCopy(©, &strm); assert(ret == Z_OK); - ret = inflateEnd(©); assert(ret == Z_OK); - err = 9; /* don't care next time around */ - have += strm.avail_in; - strm.avail_in = step > have ? have : step; - have -= strm.avail_in; - } while (strm.avail_in); - free(in); - free(out); - ret = inflateReset2(&strm, -8); assert(ret == Z_OK); - ret = inflateEnd(&strm); assert(ret == Z_OK); - mem_done(&strm, what); -} - -/* cover all of the lines in inflate.c up to inflate() */ -local void cover_support(void) -{ - int ret; - z_stream strm; - - mem_setup(&strm); - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit(&strm); assert(ret == Z_OK); - mem_used(&strm, "inflate init"); - ret = inflatePrime(&strm, 5, 31); assert(ret == Z_OK); - ret = inflatePrime(&strm, -1, 0); assert(ret == Z_OK); - ret = inflateSetDictionary(&strm, Z_NULL, 0); - assert(ret == Z_STREAM_ERROR); - ret = inflateEnd(&strm); assert(ret == Z_OK); - mem_done(&strm, "prime"); - - inf("63 0", "force window allocation", 0, -15, 1, Z_OK); - inf("63 18 5", "force window replacement", 0, -8, 259, Z_OK); - inf("63 18 68 30 d0 0 0", "force split window update", 4, -8, 259, Z_OK); - inf("3 0", "use fixed blocks", 0, -15, 1, Z_STREAM_END); - inf("", "bad window size", 0, 1, 0, Z_STREAM_ERROR); - - mem_setup(&strm); - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit_(&strm, ZLIB_VERSION - 1, (int)sizeof(z_stream)); - assert(ret == Z_VERSION_ERROR); - mem_done(&strm, "wrong version"); - - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit(&strm); assert(ret == Z_OK); - ret = inflateEnd(&strm); assert(ret == Z_OK); - fputs("inflate built-in memory routines\n", stderr); -} - -/* cover all inflate() header and trailer cases and code after inflate() */ -local void cover_wrap(void) -{ - int ret; - z_stream strm, copy; - unsigned char dict[257]; - - ret = inflate(Z_NULL, 0); assert(ret == Z_STREAM_ERROR); - ret = inflateEnd(Z_NULL); assert(ret == Z_STREAM_ERROR); - ret = inflateCopy(Z_NULL, Z_NULL); assert(ret == Z_STREAM_ERROR); - fputs("inflate bad parameters\n", stderr); - - inf("1f 8b 0 0", "bad gzip method", 0, 31, 0, Z_DATA_ERROR); - inf("1f 8b 8 80", "bad gzip flags", 0, 31, 0, Z_DATA_ERROR); - inf("77 85", "bad zlib method", 0, 15, 0, Z_DATA_ERROR); - inf("8 99", "set window size from header", 0, 0, 0, Z_OK); - inf("78 9c", "bad zlib window size", 0, 8, 0, Z_DATA_ERROR); - inf("78 9c 63 0 0 0 1 0 1", "check adler32", 0, 15, 1, Z_STREAM_END); - inf("1f 8b 8 1e 0 0 0 0 0 0 1 0 0 0 0 0 0", "bad header crc", 0, 47, 1, - Z_DATA_ERROR); - inf("1f 8b 8 2 0 0 0 0 0 0 1d 26 3 0 0 0 0 0 0 0 0 0", "check gzip length", - 0, 47, 0, Z_STREAM_END); - inf("78 90", "bad zlib header check", 0, 47, 0, Z_DATA_ERROR); - inf("8 b8 0 0 0 1", "need dictionary", 0, 8, 0, Z_NEED_DICT); - inf("78 9c 63 0", "compute adler32", 0, 15, 1, Z_OK); - - mem_setup(&strm); - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, -8); - strm.avail_in = 2; - strm.next_in = (void *)"\x63"; - strm.avail_out = 1; - strm.next_out = (void *)&ret; - mem_limit(&strm, 1); - ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_MEM_ERROR); - ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_MEM_ERROR); - mem_limit(&strm, 0); - memset(dict, 0, 257); - ret = inflateSetDictionary(&strm, dict, 257); - assert(ret == Z_OK); - mem_limit(&strm, (sizeof(struct inflate_state) << 1) + 256); - ret = inflatePrime(&strm, 16, 0); assert(ret == Z_OK); - strm.avail_in = 2; - strm.next_in = (void *)"\x80"; - ret = inflateSync(&strm); assert(ret == Z_DATA_ERROR); - ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_STREAM_ERROR); - strm.avail_in = 4; - strm.next_in = (void *)"\0\0\xff\xff"; - ret = inflateSync(&strm); assert(ret == Z_OK); - (void)inflateSyncPoint(&strm); - ret = inflateCopy(©, &strm); assert(ret == Z_MEM_ERROR); - mem_limit(&strm, 0); - ret = inflateUndermine(&strm, 1); assert(ret == Z_DATA_ERROR); - (void)inflateMark(&strm); - ret = inflateEnd(&strm); assert(ret == Z_OK); - mem_done(&strm, "miscellaneous, force memory errors"); -} - -/* input and output functions for inflateBack() */ -local unsigned pull(void *desc, unsigned char **buf) -{ - static unsigned int next = 0; - static unsigned char dat[] = {0x63, 0, 2, 0}; - struct inflate_state *state; - - if (desc == Z_NULL) { - next = 0; - return 0; /* no input (already provided at next_in) */ - } - state = (void *)((z_stream *)desc)->state; - if (state != Z_NULL) - state->mode = SYNC; /* force an otherwise impossible situation */ - return next < sizeof(dat) ? (*buf = dat + next++, 1) : 0; -} - -local int push(void *desc, unsigned char *buf, unsigned len) -{ - buf += len; - return desc != Z_NULL; /* force error if desc not null */ -} - -/* cover inflateBack() up to common deflate data cases and after those */ -local void cover_back(void) -{ - int ret; - z_stream strm; - unsigned char win[32768]; - - ret = inflateBackInit_(Z_NULL, 0, win, 0, 0); - assert(ret == Z_VERSION_ERROR); - ret = inflateBackInit(Z_NULL, 0, win); assert(ret == Z_STREAM_ERROR); - ret = inflateBack(Z_NULL, Z_NULL, Z_NULL, Z_NULL, Z_NULL); - assert(ret == Z_STREAM_ERROR); - ret = inflateBackEnd(Z_NULL); assert(ret == Z_STREAM_ERROR); - fputs("inflateBack bad parameters\n", stderr); - - mem_setup(&strm); - ret = inflateBackInit(&strm, 15, win); assert(ret == Z_OK); - strm.avail_in = 2; - strm.next_in = (void *)"\x03"; - ret = inflateBack(&strm, pull, Z_NULL, push, Z_NULL); - assert(ret == Z_STREAM_END); - /* force output error */ - strm.avail_in = 3; - strm.next_in = (void *)"\x63\x00"; - ret = inflateBack(&strm, pull, Z_NULL, push, &strm); - assert(ret == Z_BUF_ERROR); - /* force mode error by mucking with state */ - ret = inflateBack(&strm, pull, &strm, push, Z_NULL); - assert(ret == Z_STREAM_ERROR); - ret = inflateBackEnd(&strm); assert(ret == Z_OK); - mem_done(&strm, "inflateBack bad state"); - - ret = inflateBackInit(&strm, 15, win); assert(ret == Z_OK); - ret = inflateBackEnd(&strm); assert(ret == Z_OK); - fputs("inflateBack built-in memory routines\n", stderr); -} - -/* do a raw inflate of data in hexadecimal with both inflate and inflateBack */ -local int try(char *hex, char *id, int err) -{ - int ret; - unsigned len, size; - unsigned char *in, *out, *win; - char *prefix; - z_stream strm; - - /* convert to hex */ - in = h2b(hex, &len); - assert(in != NULL); - - /* allocate work areas */ - size = len << 3; - out = malloc(size); - assert(out != NULL); - win = malloc(32768); - assert(win != NULL); - prefix = malloc(strlen(id) + 6); - assert(prefix != NULL); - - /* first with inflate */ - strcpy(prefix, id); - strcat(prefix, "-late"); - mem_setup(&strm); - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, err < 0 ? 47 : -15); - assert(ret == Z_OK); - strm.avail_in = len; - strm.next_in = in; - do { - strm.avail_out = size; - strm.next_out = out; - ret = inflate(&strm, Z_TREES); - assert(ret != Z_STREAM_ERROR && ret != Z_MEM_ERROR); - if (ret == Z_DATA_ERROR || ret == Z_NEED_DICT) - break; - } while (strm.avail_in || strm.avail_out == 0); - if (err) { - assert(ret == Z_DATA_ERROR); - assert(strcmp(id, strm.msg) == 0); - } - inflateEnd(&strm); - mem_done(&strm, prefix); - - /* then with inflateBack */ - if (err >= 0) { - strcpy(prefix, id); - strcat(prefix, "-back"); - mem_setup(&strm); - ret = inflateBackInit(&strm, 15, win); - assert(ret == Z_OK); - strm.avail_in = len; - strm.next_in = in; - ret = inflateBack(&strm, pull, Z_NULL, push, Z_NULL); - assert(ret != Z_STREAM_ERROR); - if (err) { - assert(ret == Z_DATA_ERROR); - assert(strcmp(id, strm.msg) == 0); - } - inflateBackEnd(&strm); - mem_done(&strm, prefix); - } - - /* clean up */ - free(prefix); - free(win); - free(out); - free(in); - return ret; -} - -/* cover deflate data cases in both inflate() and inflateBack() */ -local void cover_inflate(void) -{ - try("0 0 0 0 0", "invalid stored block lengths", 1); - try("3 0", "fixed", 0); - try("6", "invalid block type", 1); - try("1 1 0 fe ff 0", "stored", 0); - try("fc 0 0", "too many length or distance symbols", 1); - try("4 0 fe ff", "invalid code lengths set", 1); - try("4 0 24 49 0", "invalid bit length repeat", 1); - try("4 0 24 e9 ff ff", "invalid bit length repeat", 1); - try("4 0 24 e9 ff 6d", "invalid code -- missing end-of-block", 1); - try("4 80 49 92 24 49 92 24 71 ff ff 93 11 0", - "invalid literal/lengths set", 1); - try("4 80 49 92 24 49 92 24 f b4 ff ff c3 84", "invalid distances set", 1); - try("4 c0 81 8 0 0 0 0 20 7f eb b 0 0", "invalid literal/length code", 1); - try("2 7e ff ff", "invalid distance code", 1); - try("c c0 81 0 0 0 0 0 90 ff 6b 4 0", "invalid distance too far back", 1); - - /* also trailer mismatch just in inflate() */ - try("1f 8b 8 0 0 0 0 0 0 0 3 0 0 0 0 1", "incorrect data check", -1); - try("1f 8b 8 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 1", - "incorrect length check", -1); - try("5 c0 21 d 0 0 0 80 b0 fe 6d 2f 91 6c", "pull 17", 0); - try("5 e0 81 91 24 cb b2 2c 49 e2 f 2e 8b 9a 47 56 9f fb fe ec d2 ff 1f", - "long code", 0); - try("ed c0 1 1 0 0 0 40 20 ff 57 1b 42 2c 4f", "length extra", 0); - try("ed cf c1 b1 2c 47 10 c4 30 fa 6f 35 1d 1 82 59 3d fb be 2e 2a fc f c", - "long distance and extra", 0); - try("ed c0 81 0 0 0 0 80 a0 fd a9 17 a9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 " - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6", "window end", 0); - inf("2 8 20 80 0 3 0", "inflate_fast TYPE return", 0, -15, 258, - Z_STREAM_END); - inf("63 18 5 40 c 0", "window wrap", 3, -8, 300, Z_OK); -} - -/* cover remaining lines in inftrees.c */ -local void cover_trees(void) -{ - int ret; - unsigned bits; - unsigned short lens[16], work[16]; - code *next, table[ENOUGH_DISTS]; - - /* we need to call inflate_table() directly in order to manifest not- - enough errors, since zlib insures that enough is always enough */ - for (bits = 0; bits < 15; bits++) - lens[bits] = (unsigned short)(bits + 1); - lens[15] = 15; - next = table; - bits = 15; - ret = inflate_table(DISTS, lens, 16, &next, &bits, work); - assert(ret == 1); - next = table; - bits = 1; - ret = inflate_table(DISTS, lens, 16, &next, &bits, work); - assert(ret == 1); - fputs("inflate_table not enough errors\n", stderr); -} - -/* cover remaining inffast.c decoding and window copying */ -local void cover_fast(void) -{ - inf("e5 e0 81 ad 6d cb b2 2c c9 01 1e 59 63 ae 7d ee fb 4d fd b5 35 41 68" - " ff 7f 0f 0 0 0", "fast length extra bits", 0, -8, 258, Z_DATA_ERROR); - inf("25 fd 81 b5 6d 59 b6 6a 49 ea af 35 6 34 eb 8c b9 f6 b9 1e ef 67 49" - " 50 fe ff ff 3f 0 0", "fast distance extra bits", 0, -8, 258, - Z_DATA_ERROR); - inf("3 7e 0 0 0 0 0", "fast invalid distance code", 0, -8, 258, - Z_DATA_ERROR); - inf("1b 7 0 0 0 0 0", "fast invalid literal/length code", 0, -8, 258, - Z_DATA_ERROR); - inf("d c7 1 ae eb 38 c 4 41 a0 87 72 de df fb 1f b8 36 b1 38 5d ff ff 0", - "fast 2nd level codes and too far back", 0, -8, 258, Z_DATA_ERROR); - inf("63 18 5 8c 10 8 0 0 0 0", "very common case", 0, -8, 259, Z_OK); - inf("63 60 60 18 c9 0 8 18 18 18 26 c0 28 0 29 0 0 0", - "contiguous and wrap around window", 6, -8, 259, Z_OK); - inf("63 0 3 0 0 0 0 0", "copy direct from output", 0, -8, 259, - Z_STREAM_END); -} - -int main(void) -{ - fprintf(stderr, "%s\n", zlibVersion()); - cover_support(); - cover_wrap(); - cover_back(); - cover_inflate(); - cover_trees(); - cover_fast(); - return 0; -} diff --git a/thirdparty/zlib-1.2.12/test/minigzip.c b/thirdparty/zlib-1.2.12/test/minigzip.c deleted file mode 100644 index e22fb08..0000000 --- a/thirdparty/zlib-1.2.12/test/minigzip.c +++ /dev/null @@ -1,651 +0,0 @@ -/* minigzip.c -- simulate gzip using the zlib compression library - * Copyright (C) 1995-2006, 2010, 2011, 2016 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * minigzip is a minimal implementation of the gzip utility. This is - * only an example of using zlib and isn't meant to replace the - * full-featured gzip. No attempt is made to deal with file systems - * limiting names to 14 or 8+3 characters, etc... Error checking is - * very limited. So use minigzip only for testing; use gzip for the - * real thing. On MSDOS, use only on file names without extension - * or in pipe mode. - */ - -/* @(#) $Id$ */ - -#include "zlib.h" -#include - -#ifdef STDC -# include -# include -#endif - -#ifdef USE_MMAP -# include -# include -# include -#endif - -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) -# include -# include -# ifdef UNDER_CE -# include -# endif -# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) -#else -# define SET_BINARY_MODE(file) -#endif - -#if defined(_MSC_VER) && _MSC_VER < 1900 -# define snprintf _snprintf -#endif - -#ifdef VMS -# define unlink delete -# define GZ_SUFFIX "-gz" -#endif -#ifdef RISCOS -# define unlink remove -# define GZ_SUFFIX "-gz" -# define fileno(file) file->__file -#endif -#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include /* for fileno */ -#endif - -#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE) -#ifndef WIN32 /* unlink already in stdio.h for WIN32 */ - extern int unlink OF((const char *)); -#endif -#endif - -#if defined(UNDER_CE) -# include -# define perror(s) pwinerror(s) - -/* Map the Windows error number in ERROR to a locale-dependent error - message string and return a pointer to it. Typically, the values - for ERROR come from GetLastError. - - The string pointed to shall not be modified by the application, - but may be overwritten by a subsequent call to strwinerror - - The strwinerror function does not change the current setting - of GetLastError. */ - -static char *strwinerror (error) - DWORD error; -{ - static char buf[1024]; - - wchar_t *msgbuf; - DWORD lasterr = GetLastError(); - DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, - error, - 0, /* Default language */ - (LPVOID)&msgbuf, - 0, - NULL); - if (chars != 0) { - /* If there is an \r\n appended, zap it. */ - if (chars >= 2 - && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { - chars -= 2; - msgbuf[chars] = 0; - } - - if (chars > sizeof (buf) - 1) { - chars = sizeof (buf) - 1; - msgbuf[chars] = 0; - } - - wcstombs(buf, msgbuf, chars + 1); - LocalFree(msgbuf); - } - else { - sprintf(buf, "unknown win32 error (%ld)", error); - } - - SetLastError(lasterr); - return buf; -} - -static void pwinerror (s) - const char *s; -{ - if (s && *s) - fprintf(stderr, "%s: %s\n", s, strwinerror(GetLastError ())); - else - fprintf(stderr, "%s\n", strwinerror(GetLastError ())); -} - -#endif /* UNDER_CE */ - -#ifndef GZ_SUFFIX -# define GZ_SUFFIX ".gz" -#endif -#define SUFFIX_LEN (sizeof(GZ_SUFFIX)-1) - -#define BUFLEN 16384 -#define MAX_NAME_LEN 1024 - -#ifdef MAXSEG_64K -# define local static - /* Needed for systems with limitation on stack size. */ -#else -# define local -#endif - -#ifdef Z_SOLO -/* for Z_SOLO, create simplified gz* functions using deflate and inflate */ - -#if defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE) -# include /* for unlink() */ -#endif - -void *myalloc OF((void *, unsigned, unsigned)); -void myfree OF((void *, void *)); - -void *myalloc(q, n, m) - void *q; - unsigned n, m; -{ - (void)q; - return calloc(n, m); -} - -void myfree(q, p) - void *q, *p; -{ - (void)q; - free(p); -} - -typedef struct gzFile_s { - FILE *file; - int write; - int err; - char *msg; - z_stream strm; -} *gzFile; - -gzFile gzopen OF((const char *, const char *)); -gzFile gzdopen OF((int, const char *)); -gzFile gz_open OF((const char *, int, const char *)); - -gzFile gzopen(path, mode) -const char *path; -const char *mode; -{ - return gz_open(path, -1, mode); -} - -gzFile gzdopen(fd, mode) -int fd; -const char *mode; -{ - return gz_open(NULL, fd, mode); -} - -gzFile gz_open(path, fd, mode) - const char *path; - int fd; - const char *mode; -{ - gzFile gz; - int ret; - - gz = malloc(sizeof(struct gzFile_s)); - if (gz == NULL) - return NULL; - gz->write = strchr(mode, 'w') != NULL; - gz->strm.zalloc = myalloc; - gz->strm.zfree = myfree; - gz->strm.opaque = Z_NULL; - if (gz->write) - ret = deflateInit2(&(gz->strm), -1, 8, 15 + 16, 8, 0); - else { - gz->strm.next_in = 0; - gz->strm.avail_in = Z_NULL; - ret = inflateInit2(&(gz->strm), 15 + 16); - } - if (ret != Z_OK) { - free(gz); - return NULL; - } - gz->file = path == NULL ? fdopen(fd, gz->write ? "wb" : "rb") : - fopen(path, gz->write ? "wb" : "rb"); - if (gz->file == NULL) { - gz->write ? deflateEnd(&(gz->strm)) : inflateEnd(&(gz->strm)); - free(gz); - return NULL; - } - gz->err = 0; - gz->msg = ""; - return gz; -} - -int gzwrite OF((gzFile, const void *, unsigned)); - -int gzwrite(gz, buf, len) - gzFile gz; - const void *buf; - unsigned len; -{ - z_stream *strm; - unsigned char out[BUFLEN]; - - if (gz == NULL || !gz->write) - return 0; - strm = &(gz->strm); - strm->next_in = (void *)buf; - strm->avail_in = len; - do { - strm->next_out = out; - strm->avail_out = BUFLEN; - (void)deflate(strm, Z_NO_FLUSH); - fwrite(out, 1, BUFLEN - strm->avail_out, gz->file); - } while (strm->avail_out == 0); - return len; -} - -int gzread OF((gzFile, void *, unsigned)); - -int gzread(gz, buf, len) - gzFile gz; - void *buf; - unsigned len; -{ - int ret; - unsigned got; - unsigned char in[1]; - z_stream *strm; - - if (gz == NULL || gz->write) - return 0; - if (gz->err) - return 0; - strm = &(gz->strm); - strm->next_out = (void *)buf; - strm->avail_out = len; - do { - got = fread(in, 1, 1, gz->file); - if (got == 0) - break; - strm->next_in = in; - strm->avail_in = 1; - ret = inflate(strm, Z_NO_FLUSH); - if (ret == Z_DATA_ERROR) { - gz->err = Z_DATA_ERROR; - gz->msg = strm->msg; - return 0; - } - if (ret == Z_STREAM_END) - inflateReset(strm); - } while (strm->avail_out); - return len - strm->avail_out; -} - -int gzclose OF((gzFile)); - -int gzclose(gz) - gzFile gz; -{ - z_stream *strm; - unsigned char out[BUFLEN]; - - if (gz == NULL) - return Z_STREAM_ERROR; - strm = &(gz->strm); - if (gz->write) { - strm->next_in = Z_NULL; - strm->avail_in = 0; - do { - strm->next_out = out; - strm->avail_out = BUFLEN; - (void)deflate(strm, Z_FINISH); - fwrite(out, 1, BUFLEN - strm->avail_out, gz->file); - } while (strm->avail_out == 0); - deflateEnd(strm); - } - else - inflateEnd(strm); - fclose(gz->file); - free(gz); - return Z_OK; -} - -const char *gzerror OF((gzFile, int *)); - -const char *gzerror(gz, err) - gzFile gz; - int *err; -{ - *err = gz->err; - return gz->msg; -} - -#endif - -static char *prog; - -void error OF((const char *msg)); -void gz_compress OF((FILE *in, gzFile out)); -#ifdef USE_MMAP -int gz_compress_mmap OF((FILE *in, gzFile out)); -#endif -void gz_uncompress OF((gzFile in, FILE *out)); -void file_compress OF((char *file, char *mode)); -void file_uncompress OF((char *file)); -int main OF((int argc, char *argv[])); - -/* =========================================================================== - * Display error message and exit - */ -void error(msg) - const char *msg; -{ - fprintf(stderr, "%s: %s\n", prog, msg); - exit(1); -} - -/* =========================================================================== - * Compress input to output then close both files. - */ - -void gz_compress(in, out) - FILE *in; - gzFile out; -{ - local char buf[BUFLEN]; - int len; - int err; - -#ifdef USE_MMAP - /* Try first compressing with mmap. If mmap fails (minigzip used in a - * pipe), use the normal fread loop. - */ - if (gz_compress_mmap(in, out) == Z_OK) return; -#endif - for (;;) { - len = (int)fread(buf, 1, sizeof(buf), in); - if (ferror(in)) { - perror("fread"); - exit(1); - } - if (len == 0) break; - - if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err)); - } - fclose(in); - if (gzclose(out) != Z_OK) error("failed gzclose"); -} - -#ifdef USE_MMAP /* MMAP version, Miguel Albrecht */ - -/* Try compressing the input file at once using mmap. Return Z_OK if - * if success, Z_ERRNO otherwise. - */ -int gz_compress_mmap(in, out) - FILE *in; - gzFile out; -{ - int len; - int err; - int ifd = fileno(in); - caddr_t buf; /* mmap'ed buffer for the entire input file */ - off_t buf_len; /* length of the input file */ - struct stat sb; - - /* Determine the size of the file, needed for mmap: */ - if (fstat(ifd, &sb) < 0) return Z_ERRNO; - buf_len = sb.st_size; - if (buf_len <= 0) return Z_ERRNO; - - /* Now do the actual mmap: */ - buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0); - if (buf == (caddr_t)(-1)) return Z_ERRNO; - - /* Compress the whole file at once: */ - len = gzwrite(out, (char *)buf, (unsigned)buf_len); - - if (len != (int)buf_len) error(gzerror(out, &err)); - - munmap(buf, buf_len); - fclose(in); - if (gzclose(out) != Z_OK) error("failed gzclose"); - return Z_OK; -} -#endif /* USE_MMAP */ - -/* =========================================================================== - * Uncompress input to output then close both files. - */ -void gz_uncompress(in, out) - gzFile in; - FILE *out; -{ - local char buf[BUFLEN]; - int len; - int err; - - for (;;) { - len = gzread(in, buf, sizeof(buf)); - if (len < 0) error (gzerror(in, &err)); - if (len == 0) break; - - if ((int)fwrite(buf, 1, (unsigned)len, out) != len) { - error("failed fwrite"); - } - } - if (fclose(out)) error("failed fclose"); - - if (gzclose(in) != Z_OK) error("failed gzclose"); -} - - -/* =========================================================================== - * Compress the given file: create a corresponding .gz file and remove the - * original. - */ -void file_compress(file, mode) - char *file; - char *mode; -{ - local char outfile[MAX_NAME_LEN]; - FILE *in; - gzFile out; - - if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) { - fprintf(stderr, "%s: filename too long\n", prog); - exit(1); - } - -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(outfile, sizeof(outfile), "%s%s", file, GZ_SUFFIX); -#else - strcpy(outfile, file); - strcat(outfile, GZ_SUFFIX); -#endif - - in = fopen(file, "rb"); - if (in == NULL) { - perror(file); - exit(1); - } - out = gzopen(outfile, mode); - if (out == NULL) { - fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile); - exit(1); - } - gz_compress(in, out); - - unlink(file); -} - - -/* =========================================================================== - * Uncompress the given file and remove the original. - */ -void file_uncompress(file) - char *file; -{ - local char buf[MAX_NAME_LEN]; - char *infile, *outfile; - FILE *out; - gzFile in; - unsigned len = strlen(file); - - if (len + strlen(GZ_SUFFIX) >= sizeof(buf)) { - fprintf(stderr, "%s: filename too long\n", prog); - exit(1); - } - -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(buf, sizeof(buf), "%s", file); -#else - strcpy(buf, file); -#endif - - if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) { - infile = file; - outfile = buf; - outfile[len-3] = '\0'; - } else { - outfile = file; - infile = buf; -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(buf + len, sizeof(buf) - len, "%s", GZ_SUFFIX); -#else - strcat(infile, GZ_SUFFIX); -#endif - } - in = gzopen(infile, "rb"); - if (in == NULL) { - fprintf(stderr, "%s: can't gzopen %s\n", prog, infile); - exit(1); - } - out = fopen(outfile, "wb"); - if (out == NULL) { - perror(file); - exit(1); - } - - gz_uncompress(in, out); - - unlink(infile); -} - - -/* =========================================================================== - * Usage: minigzip [-c] [-d] [-f] [-h] [-r] [-1 to -9] [files...] - * -c : write to standard output - * -d : decompress - * -f : compress with Z_FILTERED - * -h : compress with Z_HUFFMAN_ONLY - * -r : compress with Z_RLE - * -1 to -9 : compression level - */ - -int main(argc, argv) - int argc; - char *argv[]; -{ - int copyout = 0; - int uncompr = 0; - gzFile file; - char *bname, outmode[20]; - -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(outmode, sizeof(outmode), "%s", "wb6 "); -#else - strcpy(outmode, "wb6 "); -#endif - - prog = argv[0]; - bname = strrchr(argv[0], '/'); - if (bname) - bname++; - else - bname = argv[0]; - argc--, argv++; - - if (!strcmp(bname, "gunzip")) - uncompr = 1; - else if (!strcmp(bname, "zcat")) - copyout = uncompr = 1; - - while (argc > 0) { - if (strcmp(*argv, "-c") == 0) - copyout = 1; - else if (strcmp(*argv, "-d") == 0) - uncompr = 1; - else if (strcmp(*argv, "-f") == 0) - outmode[3] = 'f'; - else if (strcmp(*argv, "-h") == 0) - outmode[3] = 'h'; - else if (strcmp(*argv, "-r") == 0) - outmode[3] = 'R'; - else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' && - (*argv)[2] == 0) - outmode[2] = (*argv)[1]; - else - break; - argc--, argv++; - } - if (outmode[3] == ' ') - outmode[3] = 0; - if (argc == 0) { - SET_BINARY_MODE(stdin); - SET_BINARY_MODE(stdout); - if (uncompr) { - file = gzdopen(fileno(stdin), "rb"); - if (file == NULL) error("can't gzdopen stdin"); - gz_uncompress(file, stdout); - } else { - file = gzdopen(fileno(stdout), outmode); - if (file == NULL) error("can't gzdopen stdout"); - gz_compress(stdin, file); - } - } else { - if (copyout) { - SET_BINARY_MODE(stdout); - } - do { - if (uncompr) { - if (copyout) { - file = gzopen(*argv, "rb"); - if (file == NULL) - fprintf(stderr, "%s: can't gzopen %s\n", prog, *argv); - else - gz_uncompress(file, stdout); - } else { - file_uncompress(*argv); - } - } else { - if (copyout) { - FILE * in = fopen(*argv, "rb"); - - if (in == NULL) { - perror(*argv); - } else { - file = gzdopen(fileno(stdout), outmode); - if (file == NULL) error("can't gzdopen stdout"); - - gz_compress(in, file); - } - - } else { - file_compress(*argv, outmode); - } - } - } while (argv++, --argc); - } - return 0; -} diff --git a/thirdparty/zlib-1.2.12/treebuild.xml b/thirdparty/zlib-1.2.12/treebuild.xml deleted file mode 100644 index 781b4c9..0000000 --- a/thirdparty/zlib-1.2.12/treebuild.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - zip compression library - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/thirdparty/zlib-1.2.12/trees.c b/thirdparty/zlib-1.2.12/trees.c deleted file mode 100644 index f73fd99..0000000 --- a/thirdparty/zlib-1.2.12/trees.c +++ /dev/null @@ -1,1182 +0,0 @@ -/* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2021 Jean-loup Gailly - * detect_data_type() function provided freely by Cosmin Truta, 2006 - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * ALGORITHM - * - * The "deflation" process uses several Huffman trees. The more - * common source values are represented by shorter bit sequences. - * - * Each code tree is stored in a compressed form which is itself - * a Huffman encoding of the lengths of all the code strings (in - * ascending order by source values). The actual code strings are - * reconstructed from the lengths in the inflate process, as described - * in the deflate specification. - * - * REFERENCES - * - * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification". - * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc - * - * Storer, James A. - * Data Compression: Methods and Theory, pp. 49-50. - * Computer Science Press, 1988. ISBN 0-7167-8156-5. - * - * Sedgewick, R. - * Algorithms, p290. - * Addison-Wesley, 1983. ISBN 0-201-06672-6. - */ - -/* @(#) $Id$ */ - -/* #define GEN_TREES_H */ - -#include "deflate.h" - -#ifdef ZLIB_DEBUG -# include -#endif - -/* =========================================================================== - * Constants - */ - -#define MAX_BL_BITS 7 -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -#define END_BLOCK 256 -/* end of block literal code */ - -#define REP_3_6 16 -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -#define REPZ_3_10 17 -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -#define REPZ_11_138 18 -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */ - = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; - -local const int extra_dbits[D_CODES] /* extra bits for each distance code */ - = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; - -local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */ - = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; - -local const uch bl_order[BL_CODES] - = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -#define DIST_CODE_LEN 512 /* see definition of array dist_code below */ - -#if defined(GEN_TREES_H) || !defined(STDC) -/* non ANSI compilers may not accept trees.h */ - -local ct_data static_ltree[L_CODES+2]; -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -local ct_data static_dtree[D_CODES]; -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -uch _dist_code[DIST_CODE_LEN]; -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -uch _length_code[MAX_MATCH-MIN_MATCH+1]; -/* length code for each normalized match length (0 == MIN_MATCH) */ - -local int base_length[LENGTH_CODES]; -/* First normalized length for each code (0 = MIN_MATCH) */ - -local int base_dist[D_CODES]; -/* First normalized distance for each code (0 = distance of 1) */ - -#else -# include "trees.h" -#endif /* GEN_TREES_H */ - -struct static_tree_desc_s { - const ct_data *static_tree; /* static tree or NULL */ - const intf *extra_bits; /* extra bits for each code or NULL */ - int extra_base; /* base index for extra_bits */ - int elems; /* max number of elements in the tree */ - int max_length; /* max bit length for the codes */ -}; - -local const static_tree_desc static_l_desc = -{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; - -local const static_tree_desc static_d_desc = -{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; - -local const static_tree_desc static_bl_desc = -{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; - -/* =========================================================================== - * Local (static) routines in this file. - */ - -local void tr_static_init OF((void)); -local void init_block OF((deflate_state *s)); -local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); -local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); -local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count)); -local void build_tree OF((deflate_state *s, tree_desc *desc)); -local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); -local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); -local int build_bl_tree OF((deflate_state *s)); -local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, - int blcodes)); -local void compress_block OF((deflate_state *s, const ct_data *ltree, - const ct_data *dtree)); -local int detect_data_type OF((deflate_state *s)); -local unsigned bi_reverse OF((unsigned code, int len)); -local void bi_windup OF((deflate_state *s)); -local void bi_flush OF((deflate_state *s)); - -#ifdef GEN_TREES_H -local void gen_trees_header OF((void)); -#endif - -#ifndef ZLIB_DEBUG -# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) - /* Send a code of the given tree. c and tree must not have side effects */ - -#else /* !ZLIB_DEBUG */ -# define send_code(s, c, tree) \ - { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ - send_bits(s, tree[c].Code, tree[c].Len); } -#endif - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -#define put_short(s, w) { \ - put_byte(s, (uch)((w) & 0xff)); \ - put_byte(s, (uch)((ush)(w) >> 8)); \ -} - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -#ifdef ZLIB_DEBUG -local void send_bits OF((deflate_state *s, int value, int length)); - -local void send_bits(s, value, length) - deflate_state *s; - int value; /* value to send */ - int length; /* number of bits */ -{ - Tracevv((stderr," l %2d v %4x ", length, value)); - Assert(length > 0 && length <= 15, "invalid length"); - s->bits_sent += (ulg)length; - - /* If not enough room in bi_buf, use (valid) bits from bi_buf and - * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) - * unused bits in value. - */ - if (s->bi_valid > (int)Buf_size - length) { - s->bi_buf |= (ush)value << s->bi_valid; - put_short(s, s->bi_buf); - s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); - s->bi_valid += length - Buf_size; - } else { - s->bi_buf |= (ush)value << s->bi_valid; - s->bi_valid += length; - } -} -#else /* !ZLIB_DEBUG */ - -#define send_bits(s, value, length) \ -{ int len = length;\ - if (s->bi_valid > (int)Buf_size - len) {\ - int val = (int)value;\ - s->bi_buf |= (ush)val << s->bi_valid;\ - put_short(s, s->bi_buf);\ - s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ - s->bi_valid += len - Buf_size;\ - } else {\ - s->bi_buf |= (ush)(value) << s->bi_valid;\ - s->bi_valid += len;\ - }\ -} -#endif /* ZLIB_DEBUG */ - - -/* the arguments must not have side effects */ - -/* =========================================================================== - * Initialize the various 'constant' tables. - */ -local void tr_static_init() -{ -#if defined(GEN_TREES_H) || !defined(STDC) - static int static_init_done = 0; - int n; /* iterates over tree elements */ - int bits; /* bit counter */ - int length; /* length value */ - int code; /* code value */ - int dist; /* distance index */ - ush bl_count[MAX_BITS+1]; - /* number of codes at each bit length for an optimal tree */ - - if (static_init_done) return; - - /* For some embedded targets, global variables are not initialized: */ -#ifdef NO_INIT_GLOBAL_POINTERS - static_l_desc.static_tree = static_ltree; - static_l_desc.extra_bits = extra_lbits; - static_d_desc.static_tree = static_dtree; - static_d_desc.extra_bits = extra_dbits; - static_bl_desc.extra_bits = extra_blbits; -#endif - - /* Initialize the mapping length (0..255) -> length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES-1; code++) { - base_length[code] = length; - for (n = 0; n < (1< dist code (0..29) */ - dist = 0; - for (code = 0 ; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ - for ( ; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { - _dist_code[256 + dist++] = (uch)code; - } - } - Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; - n = 0; - while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; - while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; - while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; - while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n].Len = 5; - static_dtree[n].Code = bi_reverse((unsigned)n, 5); - } - static_init_done = 1; - -# ifdef GEN_TREES_H - gen_trees_header(); -# endif -#endif /* defined(GEN_TREES_H) || !defined(STDC) */ -} - -/* =========================================================================== - * Genererate the file trees.h describing the static trees. - */ -#ifdef GEN_TREES_H -# ifndef ZLIB_DEBUG -# include -# endif - -# define SEPARATOR(i, last, width) \ - ((i) == (last)? "\n};\n\n" : \ - ((i) % (width) == (width)-1 ? ",\n" : ", ")) - -void gen_trees_header() -{ - FILE *header = fopen("trees.h", "w"); - int i; - - Assert (header != NULL, "Can't open trees.h"); - fprintf(header, - "/* header created automatically with -DGEN_TREES_H */\n\n"); - - fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); - for (i = 0; i < L_CODES+2; i++) { - fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, - static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); - } - - fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); - for (i = 0; i < D_CODES; i++) { - fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, - static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); - } - - fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n"); - for (i = 0; i < DIST_CODE_LEN; i++) { - fprintf(header, "%2u%s", _dist_code[i], - SEPARATOR(i, DIST_CODE_LEN-1, 20)); - } - - fprintf(header, - "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); - for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { - fprintf(header, "%2u%s", _length_code[i], - SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); - } - - fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); - for (i = 0; i < LENGTH_CODES; i++) { - fprintf(header, "%1u%s", base_length[i], - SEPARATOR(i, LENGTH_CODES-1, 20)); - } - - fprintf(header, "local const int base_dist[D_CODES] = {\n"); - for (i = 0; i < D_CODES; i++) { - fprintf(header, "%5u%s", base_dist[i], - SEPARATOR(i, D_CODES-1, 10)); - } - - fclose(header); -} -#endif /* GEN_TREES_H */ - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -void ZLIB_INTERNAL _tr_init(s) - deflate_state *s; -{ - tr_static_init(); - - s->l_desc.dyn_tree = s->dyn_ltree; - s->l_desc.stat_desc = &static_l_desc; - - s->d_desc.dyn_tree = s->dyn_dtree; - s->d_desc.stat_desc = &static_d_desc; - - s->bl_desc.dyn_tree = s->bl_tree; - s->bl_desc.stat_desc = &static_bl_desc; - - s->bi_buf = 0; - s->bi_valid = 0; -#ifdef ZLIB_DEBUG - s->compressed_len = 0L; - s->bits_sent = 0L; -#endif - - /* Initialize the first block of the first file: */ - init_block(s); -} - -/* =========================================================================== - * Initialize a new block. - */ -local void init_block(s) - deflate_state *s; -{ - int n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; - for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; - for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; - - s->dyn_ltree[END_BLOCK].Freq = 1; - s->opt_len = s->static_len = 0L; - s->sym_next = s->matches = 0; -} - -#define SMALLEST 1 -/* Index within the heap array of least frequent node in the Huffman tree */ - - -/* =========================================================================== - * Remove the smallest element from the heap and recreate the heap with - * one less element. Updates heap and heap_len. - */ -#define pqremove(s, tree, top) \ -{\ - top = s->heap[SMALLEST]; \ - s->heap[SMALLEST] = s->heap[s->heap_len--]; \ - pqdownheap(s, tree, SMALLEST); \ -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -#define smaller(tree, n, m, depth) \ - (tree[n].Freq < tree[m].Freq || \ - (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -local void pqdownheap(s, tree, k) - deflate_state *s; - ct_data *tree; /* the tree to restore */ - int k; /* node to move down */ -{ - int v = s->heap[k]; - int j = k << 1; /* left son of k */ - while (j <= s->heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s->heap_len && - smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s->heap[j], s->depth)) break; - - /* Exchange v with the smallest son */ - s->heap[k] = s->heap[j]; k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s->heap[k] = v; -} - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -local void gen_bitlen(s, desc) - deflate_state *s; - tree_desc *desc; /* the tree descriptor */ -{ - ct_data *tree = desc->dyn_tree; - int max_code = desc->max_code; - const ct_data *stree = desc->stat_desc->static_tree; - const intf *extra = desc->stat_desc->extra_bits; - int base = desc->stat_desc->extra_base; - int max_length = desc->stat_desc->max_length; - int h; /* heap index */ - int n, m; /* iterate over the tree elements */ - int bits; /* bit length */ - int xbits; /* extra bits */ - ush f; /* frequency */ - int overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ - - for (h = s->heap_max+1; h < HEAP_SIZE; h++) { - n = s->heap[h]; - bits = tree[tree[n].Dad].Len + 1; - if (bits > max_length) bits = max_length, overflow++; - tree[n].Len = (ush)bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) continue; /* not a leaf node */ - - s->bl_count[bits]++; - xbits = 0; - if (n >= base) xbits = extra[n-base]; - f = tree[n].Freq; - s->opt_len += (ulg)f * (unsigned)(bits + xbits); - if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits); - } - if (overflow == 0) return; - - Tracev((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length-1; - while (s->bl_count[bits] == 0) bits--; - s->bl_count[bits]--; /* move one leaf down the tree */ - s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ - s->bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits != 0; bits--) { - n = s->bl_count[bits]; - while (n != 0) { - m = s->heap[--h]; - if (m > max_code) continue; - if ((unsigned) tree[m].Len != (unsigned) bits) { - Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq; - tree[m].Len = (ush)bits; - } - n--; - } - } -} - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -local void gen_codes (tree, max_code, bl_count) - ct_data *tree; /* the tree to decorate */ - int max_code; /* largest code with non zero frequency */ - ushf *bl_count; /* number of codes at each bit length */ -{ - ush next_code[MAX_BITS+1]; /* next code value for each bit length */ - unsigned code = 0; /* running code value */ - int bits; /* bit index */ - int n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - code = (code + bl_count[bits-1]) << 1; - next_code[bits] = (ush)code; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - Assert (code + bl_count[MAX_BITS]-1 == (1<dyn_tree; - const ct_data *stree = desc->stat_desc->static_tree; - int elems = desc->stat_desc->elems; - int n, m; /* iterate over heap elements */ - int max_code = -1; /* largest code with non zero frequency */ - int node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s->heap_len = 0, s->heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n].Freq != 0) { - s->heap[++(s->heap_len)] = max_code = n; - s->depth[n] = 0; - } else { - tree[n].Len = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s->heap_len < 2) { - node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); - tree[node].Freq = 1; - s->depth[node] = 0; - s->opt_len--; if (stree) s->static_len -= stree[node].Len; - /* node is 0 or 1 so it does not have extra bits */ - } - desc->max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - pqremove(s, tree, n); /* n = node of least frequency */ - m = s->heap[SMALLEST]; /* m = node of next least frequency */ - - s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ - s->heap[--(s->heap_max)] = m; - - /* Create a new node father of n and m */ - tree[node].Freq = tree[n].Freq + tree[m].Freq; - s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ? - s->depth[n] : s->depth[m]) + 1); - tree[n].Dad = tree[m].Dad = (ush)node; -#ifdef DUMP_BL_TREE - if (tree == s->bl_tree) { - fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", - node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); - } -#endif - /* and insert the new node in the heap */ - s->heap[SMALLEST] = node++; - pqdownheap(s, tree, SMALLEST); - - } while (s->heap_len >= 2); - - s->heap[--(s->heap_max)] = s->heap[SMALLEST]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, (tree_desc *)desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes ((ct_data *)tree, max_code, s->bl_count); -} - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -local void scan_tree (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ -{ - int n; /* iterates over all tree elements */ - int prevlen = -1; /* last emitted length */ - int curlen; /* length of current code */ - int nextlen = tree[0].Len; /* length of next code */ - int count = 0; /* repeat count of the current code */ - int max_count = 7; /* max repeat count */ - int min_count = 4; /* min repeat count */ - - if (nextlen == 0) max_count = 138, min_count = 3; - tree[max_code+1].Len = (ush)0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; nextlen = tree[n+1].Len; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - s->bl_tree[curlen].Freq += count; - } else if (curlen != 0) { - if (curlen != prevlen) s->bl_tree[curlen].Freq++; - s->bl_tree[REP_3_6].Freq++; - } else if (count <= 10) { - s->bl_tree[REPZ_3_10].Freq++; - } else { - s->bl_tree[REPZ_11_138].Freq++; - } - count = 0; prevlen = curlen; - if (nextlen == 0) { - max_count = 138, min_count = 3; - } else if (curlen == nextlen) { - max_count = 6, min_count = 3; - } else { - max_count = 7, min_count = 4; - } - } -} - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -local void send_tree (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ -{ - int n; /* iterates over all tree elements */ - int prevlen = -1; /* last emitted length */ - int curlen; /* length of current code */ - int nextlen = tree[0].Len; /* length of next code */ - int count = 0; /* repeat count of the current code */ - int max_count = 7; /* max repeat count */ - int min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen == 0) max_count = 138, min_count = 3; - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; nextlen = tree[n+1].Len; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - do { send_code(s, curlen, s->bl_tree); } while (--count != 0); - - } else if (curlen != 0) { - if (curlen != prevlen) { - send_code(s, curlen, s->bl_tree); count--; - } - Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3); - - } else { - send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7); - } - count = 0; prevlen = curlen; - if (nextlen == 0) { - max_count = 138, min_count = 3; - } else if (curlen == nextlen) { - max_count = 6, min_count = 3; - } else { - max_count = 7, min_count = 4; - } - } -} - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -local int build_bl_tree(s) - deflate_state *s; -{ - int max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); - scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, (tree_desc *)(&(s->bl_desc))); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { - if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; - } - /* Update opt_len to include the bit length tree and counts */ - s->opt_len += 3*((ulg)max_blindex+1) + 5+5+4; - Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - s->opt_len, s->static_len)); - - return max_blindex; -} - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -local void send_all_trees(s, lcodes, dcodes, blcodes) - deflate_state *s; - int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - int rank; /* index in bl_order */ - - Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - "too many codes"); - Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes-1, 5); - send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); - } - Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */ - Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */ - Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - -/* =========================================================================== - * Send a stored block - */ -void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ - bi_windup(s); /* align on byte boundary */ - put_short(s, (ush)stored_len); - put_short(s, (ush)~stored_len); - if (stored_len) - zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len); - s->pending += stored_len; -#ifdef ZLIB_DEBUG - s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; - s->compressed_len += (stored_len + 4) << 3; - s->bits_sent += 2*16; - s->bits_sent += stored_len<<3; -#endif -} - -/* =========================================================================== - * Flush the bits in the bit buffer to pending output (leaves at most 7 bits) - */ -void ZLIB_INTERNAL _tr_flush_bits(s) - deflate_state *s; -{ - bi_flush(s); -} - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -void ZLIB_INTERNAL _tr_align(s) - deflate_state *s; -{ - send_bits(s, STATIC_TREES<<1, 3); - send_code(s, END_BLOCK, static_ltree); -#ifdef ZLIB_DEBUG - s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ -#endif - bi_flush(s); -} - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and write out the encoded block. - */ -void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block, or NULL if too old */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ -{ - ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - int max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s->level > 0) { - - /* Check if the file is binary or text */ - if (s->strm->data_type == Z_UNKNOWN) - s->strm->data_type = detect_data_type(s); - - /* Construct the literal and distance trees */ - build_tree(s, (tree_desc *)(&(s->l_desc))); - Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - s->static_len)); - - build_tree(s, (tree_desc *)(&(s->d_desc))); - Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s->opt_len+3+7)>>3; - static_lenb = (s->static_len+3+7)>>3; - - Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - s->sym_next / 3)); - - if (static_lenb <= opt_lenb) opt_lenb = static_lenb; - - } else { - Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - -#ifdef FORCE_STORED - if (buf != (char*)0) { /* force stored block */ -#else - if (stored_len+4 <= opt_lenb && buf != (char*)0) { - /* 4: two words for the lengths */ -#endif - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - -#ifdef FORCE_STATIC - } else if (static_lenb >= 0) { /* force static trees */ -#else - } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { -#endif - send_bits(s, (STATIC_TREES<<1)+last, 3); - compress_block(s, (const ct_data *)static_ltree, - (const ct_data *)static_dtree); -#ifdef ZLIB_DEBUG - s->compressed_len += 3 + s->static_len; -#endif - } else { - send_bits(s, (DYN_TREES<<1)+last, 3); - send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, - max_blindex+1); - compress_block(s, (const ct_data *)s->dyn_ltree, - (const ct_data *)s->dyn_dtree); -#ifdef ZLIB_DEBUG - s->compressed_len += 3 + s->opt_len; -#endif - } - Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); -#ifdef ZLIB_DEBUG - s->compressed_len += 7; /* align on byte boundary */ -#endif - } - Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -int ZLIB_INTERNAL _tr_tally (s, dist, lc) - deflate_state *s; - unsigned dist; /* distance of matched string */ - unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - s->sym_buf[s->sym_next++] = dist; - s->sym_buf[s->sym_next++] = dist >> 8; - s->sym_buf[s->sym_next++] = lc; - if (dist == 0) { - /* lc is the unmatched char */ - s->dyn_ltree[lc].Freq++; - } else { - s->matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - Assert((ush)dist < (ush)MAX_DIST(s) && - (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++; - s->dyn_dtree[d_code(dist)].Freq++; - } - return (s->sym_next == s->sym_end); -} - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -local void compress_block(s, ltree, dtree) - deflate_state *s; - const ct_data *ltree; /* literal tree */ - const ct_data *dtree; /* distance tree */ -{ - unsigned dist; /* distance of matched string */ - int lc; /* match length or unmatched char (if dist == 0) */ - unsigned sx = 0; /* running index in sym_buf */ - unsigned code; /* the code to send */ - int extra; /* number of extra bits to send */ - - if (s->sym_next != 0) do { - dist = s->sym_buf[sx++] & 0xff; - dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8; - lc = s->sym_buf[sx++]; - if (dist == 0) { - send_code(s, lc, ltree); /* send a literal byte */ - Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code+LITERALS+1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra != 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra != 0) { - dist -= (unsigned)base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and sym_buf is ok: */ - Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow"); - - } while (sx < s->sym_next); - - send_code(s, END_BLOCK, ltree); -} - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "block list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "allow list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -local int detect_data_type(s) - deflate_state *s; -{ - /* block_mask is the bit mask of block-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - unsigned long block_mask = 0xf3ffc07fUL; - int n; - - /* Check for non-textual ("block-listed") bytes. */ - for (n = 0; n <= 31; n++, block_mask >>= 1) - if ((block_mask & 1) && (s->dyn_ltree[n].Freq != 0)) - return Z_BINARY; - - /* Check for textual ("allow-listed") bytes. */ - if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0 - || s->dyn_ltree[13].Freq != 0) - return Z_TEXT; - for (n = 32; n < LITERALS; n++) - if (s->dyn_ltree[n].Freq != 0) - return Z_TEXT; - - /* There are no "block-listed" or "allow-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -local unsigned bi_reverse(code, len) - unsigned code; /* the value to invert */ - int len; /* its bit length */ -{ - register unsigned res = 0; - do { - res |= code & 1; - code >>= 1, res <<= 1; - } while (--len > 0); - return res >> 1; -} - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -local void bi_flush(s) - deflate_state *s; -{ - if (s->bi_valid == 16) { - put_short(s, s->bi_buf); - s->bi_buf = 0; - s->bi_valid = 0; - } else if (s->bi_valid >= 8) { - put_byte(s, (Byte)s->bi_buf); - s->bi_buf >>= 8; - s->bi_valid -= 8; - } -} - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -local void bi_windup(s) - deflate_state *s; -{ - if (s->bi_valid > 8) { - put_short(s, s->bi_buf); - } else if (s->bi_valid > 0) { - put_byte(s, (Byte)s->bi_buf); - } - s->bi_buf = 0; - s->bi_valid = 0; -#ifdef ZLIB_DEBUG - s->bits_sent = (s->bits_sent+7) & ~7; -#endif -} diff --git a/thirdparty/zlib-1.2.12/trees.h b/thirdparty/zlib-1.2.12/trees.h deleted file mode 100644 index d35639d..0000000 --- a/thirdparty/zlib-1.2.12/trees.h +++ /dev/null @@ -1,128 +0,0 @@ -/* header created automatically with -DGEN_TREES_H */ - -local const ct_data static_ltree[L_CODES+2] = { -{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, -{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, -{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, -{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, -{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, -{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, -{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, -{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, -{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, -{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, -{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, -{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, -{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, -{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, -{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, -{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, -{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, -{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, -{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, -{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, -{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, -{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, -{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, -{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, -{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, -{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, -{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, -{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, -{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, -{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, -{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, -{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, -{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, -{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, -{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, -{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, -{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, -{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, -{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, -{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, -{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, -{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, -{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, -{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, -{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, -{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, -{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, -{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, -{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, -{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, -{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, -{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, -{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, -{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, -{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, -{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, -{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, -{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} -}; - -local const ct_data static_dtree[D_CODES] = { -{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, -{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, -{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, -{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, -{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, -{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} -}; - -const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = { - 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, - 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, -10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, -11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, -12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, -18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 -}; - -const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, -13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, -17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, -19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, -21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, -22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 -}; - -local const int base_length[LENGTH_CODES] = { -0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, -64, 80, 96, 112, 128, 160, 192, 224, 0 -}; - -local const int base_dist[D_CODES] = { - 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, - 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, - 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 -}; - diff --git a/thirdparty/zlib-1.2.12/uncompr.c b/thirdparty/zlib-1.2.12/uncompr.c deleted file mode 100644 index f03a1a8..0000000 --- a/thirdparty/zlib-1.2.12/uncompr.c +++ /dev/null @@ -1,93 +0,0 @@ -/* uncompr.c -- decompress a memory buffer - * Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#define ZLIB_INTERNAL -#include "zlib.h" - -/* =========================================================================== - Decompresses the source buffer into the destination buffer. *sourceLen is - the byte length of the source buffer. Upon entry, *destLen is the total size - of the destination buffer, which must be large enough to hold the entire - uncompressed data. (The size of the uncompressed data must have been saved - previously by the compressor and transmitted to the decompressor by some - mechanism outside the scope of this compression library.) Upon exit, - *destLen is the size of the decompressed data and *sourceLen is the number - of source bytes consumed. Upon return, source + *sourceLen points to the - first unused input byte. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, or - Z_DATA_ERROR if the input data was corrupted, including if the input data is - an incomplete zlib stream. -*/ -int ZEXPORT uncompress2 (dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong *sourceLen; -{ - z_stream stream; - int err; - const uInt max = (uInt)-1; - uLong len, left; - Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */ - - len = *sourceLen; - if (*destLen) { - left = *destLen; - *destLen = 0; - } - else { - left = 1; - dest = buf; - } - - stream.next_in = (z_const Bytef *)source; - stream.avail_in = 0; - stream.zalloc = (alloc_func)0; - stream.zfree = (free_func)0; - stream.opaque = (voidpf)0; - - err = inflateInit(&stream); - if (err != Z_OK) return err; - - stream.next_out = dest; - stream.avail_out = 0; - - do { - if (stream.avail_out == 0) { - stream.avail_out = left > (uLong)max ? max : (uInt)left; - left -= stream.avail_out; - } - if (stream.avail_in == 0) { - stream.avail_in = len > (uLong)max ? max : (uInt)len; - len -= stream.avail_in; - } - err = inflate(&stream, Z_NO_FLUSH); - } while (err == Z_OK); - - *sourceLen -= len + stream.avail_in; - if (dest != buf) - *destLen = stream.total_out; - else if (stream.total_out && err == Z_BUF_ERROR) - left = 1; - - inflateEnd(&stream); - return err == Z_STREAM_END ? Z_OK : - err == Z_NEED_DICT ? Z_DATA_ERROR : - err == Z_BUF_ERROR && left + stream.avail_out ? Z_DATA_ERROR : - err; -} - -int ZEXPORT uncompress (dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; -{ - return uncompress2(dest, destLen, source, &sourceLen); -} diff --git a/thirdparty/zlib-1.2.12/watcom/watcom_f.mak b/thirdparty/zlib-1.2.12/watcom/watcom_f.mak deleted file mode 100644 index 37f4d74..0000000 --- a/thirdparty/zlib-1.2.12/watcom/watcom_f.mak +++ /dev/null @@ -1,43 +0,0 @@ -# Makefile for zlib -# OpenWatcom flat model -# Last updated: 28-Dec-2005 - -# To use, do "wmake -f watcom_f.mak" - -C_SOURCE = adler32.c compress.c crc32.c deflate.c & - gzclose.c gzlib.c gzread.c gzwrite.c & - infback.c inffast.c inflate.c inftrees.c & - trees.c uncompr.c zutil.c - -OBJS = adler32.obj compress.obj crc32.obj deflate.obj & - gzclose.obj gzlib.obj gzread.obj gzwrite.obj & - infback.obj inffast.obj inflate.obj inftrees.obj & - trees.obj uncompr.obj zutil.obj - -CC = wcc386 -LINKER = wcl386 -CFLAGS = -zq -mf -3r -fp3 -s -bt=dos -oilrtfm -fr=nul -wx -ZLIB_LIB = zlib_f.lib - -.C.OBJ: - $(CC) $(CFLAGS) $[@ - -all: $(ZLIB_LIB) example.exe minigzip.exe - -$(ZLIB_LIB): $(OBJS) - wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj - wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj - wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj - wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj - wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj - -example.exe: $(ZLIB_LIB) example.obj - $(LINKER) -ldos32a -fe=example.exe example.obj $(ZLIB_LIB) - -minigzip.exe: $(ZLIB_LIB) minigzip.obj - $(LINKER) -ldos32a -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) - -clean: .SYMBOLIC - del *.obj - del $(ZLIB_LIB) - @echo Cleaning done diff --git a/thirdparty/zlib-1.2.12/watcom/watcom_l.mak b/thirdparty/zlib-1.2.12/watcom/watcom_l.mak deleted file mode 100644 index 193eed7..0000000 --- a/thirdparty/zlib-1.2.12/watcom/watcom_l.mak +++ /dev/null @@ -1,43 +0,0 @@ -# Makefile for zlib -# OpenWatcom large model -# Last updated: 28-Dec-2005 - -# To use, do "wmake -f watcom_l.mak" - -C_SOURCE = adler32.c compress.c crc32.c deflate.c & - gzclose.c gzlib.c gzread.c gzwrite.c & - infback.c inffast.c inflate.c inftrees.c & - trees.c uncompr.c zutil.c - -OBJS = adler32.obj compress.obj crc32.obj deflate.obj & - gzclose.obj gzlib.obj gzread.obj gzwrite.obj & - infback.obj inffast.obj inflate.obj inftrees.obj & - trees.obj uncompr.obj zutil.obj - -CC = wcc -LINKER = wcl -CFLAGS = -zq -ml -s -bt=dos -oilrtfm -fr=nul -wx -ZLIB_LIB = zlib_l.lib - -.C.OBJ: - $(CC) $(CFLAGS) $[@ - -all: $(ZLIB_LIB) example.exe minigzip.exe - -$(ZLIB_LIB): $(OBJS) - wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj - wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj - wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj - wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj - wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj - -example.exe: $(ZLIB_LIB) example.obj - $(LINKER) -fe=example.exe example.obj $(ZLIB_LIB) - -minigzip.exe: $(ZLIB_LIB) minigzip.obj - $(LINKER) -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) - -clean: .SYMBOLIC - del *.obj - del $(ZLIB_LIB) - @echo Cleaning done diff --git a/thirdparty/zlib-1.2.12/win32/DLL_FAQ.txt b/thirdparty/zlib-1.2.12/win32/DLL_FAQ.txt deleted file mode 100644 index 12c0090..0000000 --- a/thirdparty/zlib-1.2.12/win32/DLL_FAQ.txt +++ /dev/null @@ -1,397 +0,0 @@ - - Frequently Asked Questions about ZLIB1.DLL - - -This document describes the design, the rationale, and the usage -of the official DLL build of zlib, named ZLIB1.DLL. If you have -general questions about zlib, you should see the file "FAQ" found -in the zlib distribution, or at the following location: - http://www.gzip.org/zlib/zlib_faq.html - - - 1. What is ZLIB1.DLL, and how can I get it? - - - ZLIB1.DLL is the official build of zlib as a DLL. - (Please remark the character '1' in the name.) - - Pointers to a precompiled ZLIB1.DLL can be found in the zlib - web site at: - http://www.zlib.net/ - - Applications that link to ZLIB1.DLL can rely on the following - specification: - - * The exported symbols are exclusively defined in the source - files "zlib.h" and "zlib.def", found in an official zlib - source distribution. - * The symbols are exported by name, not by ordinal. - * The exported names are undecorated. - * The calling convention of functions is "C" (CDECL). - * The ZLIB1.DLL binary is linked to MSVCRT.DLL. - - The archive in which ZLIB1.DLL is bundled contains compiled - test programs that must run with a valid build of ZLIB1.DLL. - It is recommended to download the prebuilt DLL from the zlib - web site, instead of building it yourself, to avoid potential - incompatibilities that could be introduced by your compiler - and build settings. If you do build the DLL yourself, please - make sure that it complies with all the above requirements, - and it runs with the precompiled test programs, bundled with - the original ZLIB1.DLL distribution. - - If, for any reason, you need to build an incompatible DLL, - please use a different file name. - - - 2. Why did you change the name of the DLL to ZLIB1.DLL? - What happened to the old ZLIB.DLL? - - - The old ZLIB.DLL, built from zlib-1.1.4 or earlier, required - compilation settings that were incompatible to those used by - a static build. The DLL settings were supposed to be enabled - by defining the macro ZLIB_DLL, before including "zlib.h". - Incorrect handling of this macro was silently accepted at - build time, resulting in two major problems: - - * ZLIB_DLL was missing from the old makefile. When building - the DLL, not all people added it to the build options. In - consequence, incompatible incarnations of ZLIB.DLL started - to circulate around the net. - - * When switching from using the static library to using the - DLL, applications had to define the ZLIB_DLL macro and - to recompile all the sources that contained calls to zlib - functions. Failure to do so resulted in creating binaries - that were unable to run with the official ZLIB.DLL build. - - The only possible solution that we could foresee was to make - a binary-incompatible change in the DLL interface, in order to - remove the dependency on the ZLIB_DLL macro, and to release - the new DLL under a different name. - - We chose the name ZLIB1.DLL, where '1' indicates the major - zlib version number. We hope that we will not have to break - the binary compatibility again, at least not as long as the - zlib-1.x series will last. - - There is still a ZLIB_DLL macro, that can trigger a more - efficient build and use of the DLL, but compatibility no - longer dependents on it. - - - 3. Can I build ZLIB.DLL from the new zlib sources, and replace - an old ZLIB.DLL, that was built from zlib-1.1.4 or earlier? - - - In principle, you can do it by assigning calling convention - keywords to the macros ZEXPORT and ZEXPORTVA. In practice, - it depends on what you mean by "an old ZLIB.DLL", because the - old DLL exists in several mutually-incompatible versions. - You have to find out first what kind of calling convention is - being used in your particular ZLIB.DLL build, and to use the - same one in the new build. If you don't know what this is all - about, you might be better off if you would just leave the old - DLL intact. - - - 4. Can I compile my application using the new zlib interface, and - link it to an old ZLIB.DLL, that was built from zlib-1.1.4 or - earlier? - - - The official answer is "no"; the real answer depends again on - what kind of ZLIB.DLL you have. Even if you are lucky, this - course of action is unreliable. - - If you rebuild your application and you intend to use a newer - version of zlib (post- 1.1.4), it is strongly recommended to - link it to the new ZLIB1.DLL. - - - 5. Why are the zlib symbols exported by name, and not by ordinal? - - - Although exporting symbols by ordinal is a little faster, it - is risky. Any single glitch in the maintenance or use of the - DEF file that contains the ordinals can result in incompatible - builds and frustrating crashes. Simply put, the benefits of - exporting symbols by ordinal do not justify the risks. - - Technically, it should be possible to maintain ordinals in - the DEF file, and still export the symbols by name. Ordinals - exist in every DLL, and even if the dynamic linking performed - at the DLL startup is searching for names, ordinals serve as - hints, for a faster name lookup. However, if the DEF file - contains ordinals, the Microsoft linker automatically builds - an implib that will cause the executables linked to it to use - those ordinals, and not the names. It is interesting to - notice that the GNU linker for Win32 does not suffer from this - problem. - - It is possible to avoid the DEF file if the exported symbols - are accompanied by a "__declspec(dllexport)" attribute in the - source files. You can do this in zlib by predefining the - ZLIB_DLL macro. - - - 6. I see that the ZLIB1.DLL functions use the "C" (CDECL) calling - convention. Why not use the STDCALL convention? - STDCALL is the standard convention in Win32, and I need it in - my Visual Basic project! - - (For readability, we use CDECL to refer to the convention - triggered by the "__cdecl" keyword, STDCALL to refer to - the convention triggered by "__stdcall", and FASTCALL to - refer to the convention triggered by "__fastcall".) - - - Most of the native Windows API functions (without varargs) use - indeed the WINAPI convention (which translates to STDCALL in - Win32), but the standard C functions use CDECL. If a user - application is intrinsically tied to the Windows API (e.g. - it calls native Windows API functions such as CreateFile()), - sometimes it makes sense to decorate its own functions with - WINAPI. But if ANSI C or POSIX portability is a goal (e.g. - it calls standard C functions such as fopen()), it is not a - sound decision to request the inclusion of , or to - use non-ANSI constructs, for the sole purpose to make the user - functions STDCALL-able. - - The functionality offered by zlib is not in the category of - "Windows functionality", but is more like "C functionality". - - Technically, STDCALL is not bad; in fact, it is slightly - faster than CDECL, and it works with variable-argument - functions, just like CDECL. It is unfortunate that, in spite - of using STDCALL in the Windows API, it is not the default - convention used by the C compilers that run under Windows. - The roots of the problem reside deep inside the unsafety of - the K&R-style function prototypes, where the argument types - are not specified; but that is another story for another day. - - The remaining fact is that CDECL is the default convention. - Even if an explicit convention is hard-coded into the function - prototypes inside C headers, problems may appear. The - necessity to expose the convention in users' callbacks is one - of these problems. - - The calling convention issues are also important when using - zlib in other programming languages. Some of them, like Ada - (GNAT) and Fortran (GNU G77), have C bindings implemented - initially on Unix, and relying on the C calling convention. - On the other hand, the pre- .NET versions of Microsoft Visual - Basic require STDCALL, while Borland Delphi prefers, although - it does not require, FASTCALL. - - In fairness to all possible uses of zlib outside the C - programming language, we choose the default "C" convention. - Anyone interested in different bindings or conventions is - encouraged to maintain specialized projects. The "contrib/" - directory from the zlib distribution already holds a couple - of foreign bindings, such as Ada, C++, and Delphi. - - - 7. I need a DLL for my Visual Basic project. What can I do? - - - Define the ZLIB_WINAPI macro before including "zlib.h", when - building both the DLL and the user application (except that - you don't need to define anything when using the DLL in Visual - Basic). The ZLIB_WINAPI macro will switch on the WINAPI - (STDCALL) convention. The name of this DLL must be different - than the official ZLIB1.DLL. - - Gilles Vollant has contributed a build named ZLIBWAPI.DLL, - with the ZLIB_WINAPI macro turned on, and with the minizip - functionality built in. For more information, please read - the notes inside "contrib/vstudio/readme.txt", found in the - zlib distribution. - - - 8. I need to use zlib in my Microsoft .NET project. What can I - do? - - - Henrik Ravn has contributed a .NET wrapper around zlib. Look - into contrib/dotzlib/, inside the zlib distribution. - - - 9. If my application uses ZLIB1.DLL, should I link it to - MSVCRT.DLL? Why? - - - It is not required, but it is recommended to link your - application to MSVCRT.DLL, if it uses ZLIB1.DLL. - - The executables (.EXE, .DLL, etc.) that are involved in the - same process and are using the C run-time library (i.e. they - are calling standard C functions), must link to the same - library. There are several libraries in the Win32 system: - CRTDLL.DLL, MSVCRT.DLL, the static C libraries, etc. - Since ZLIB1.DLL is linked to MSVCRT.DLL, the executables that - depend on it should also be linked to MSVCRT.DLL. - - -10. Why are you saying that ZLIB1.DLL and my application should - be linked to the same C run-time (CRT) library? I linked my - application and my DLLs to different C libraries (e.g. my - application to a static library, and my DLLs to MSVCRT.DLL), - and everything works fine. - - - If a user library invokes only pure Win32 API (accessible via - and the related headers), its DLL build will work - in any context. But if this library invokes standard C API, - things get more complicated. - - There is a single Win32 library in a Win32 system. Every - function in this library resides in a single DLL module, that - is safe to call from anywhere. On the other hand, there are - multiple versions of the C library, and each of them has its - own separate internal state. Standalone executables and user - DLLs that call standard C functions must link to a C run-time - (CRT) library, be it static or shared (DLL). Intermixing - occurs when an executable (not necessarily standalone) and a - DLL are linked to different CRTs, and both are running in the - same process. - - Intermixing multiple CRTs is possible, as long as their - internal states are kept intact. The Microsoft Knowledge Base - articles KB94248 "HOWTO: Use the C Run-Time" and KB140584 - "HOWTO: Link with the Correct C Run-Time (CRT) Library" - mention the potential problems raised by intermixing. - - If intermixing works for you, it's because your application - and DLLs are avoiding the corruption of each of the CRTs' - internal states, maybe by careful design, or maybe by fortune. - - Also note that linking ZLIB1.DLL to non-Microsoft CRTs, such - as those provided by Borland, raises similar problems. - - -11. Why are you linking ZLIB1.DLL to MSVCRT.DLL? - - - MSVCRT.DLL exists on every Windows 95 with a new service pack - installed, or with Microsoft Internet Explorer 4 or later, and - on all other Windows 4.x or later (Windows 98, Windows NT 4, - or later). It is freely distributable; if not present in the - system, it can be downloaded from Microsoft or from other - software provider for free. - - The fact that MSVCRT.DLL does not exist on a virgin Windows 95 - is not so problematic. Windows 95 is scarcely found nowadays, - Microsoft ended its support a long time ago, and many recent - applications from various vendors, including Microsoft, do not - even run on it. Furthermore, no serious user should run - Windows 95 without a proper update installed. - - -12. Why are you not linking ZLIB1.DLL to - <> ? - - - We considered and abandoned the following alternatives: - - * Linking ZLIB1.DLL to a static C library (LIBC.LIB, or - LIBCMT.LIB) is not a good option. People are using the DLL - mainly to save disk space. If you are linking your program - to a static C library, you may as well consider linking zlib - in statically, too. - - * Linking ZLIB1.DLL to CRTDLL.DLL looks appealing, because - CRTDLL.DLL is present on every Win32 installation. - Unfortunately, it has a series of problems: it does not - work properly with Microsoft's C++ libraries, it does not - provide support for 64-bit file offsets, (and so on...), - and Microsoft discontinued its support a long time ago. - - * Linking ZLIB1.DLL to MSVCR70.DLL or MSVCR71.DLL, supplied - with the Microsoft .NET platform, and Visual C++ 7.0/7.1, - raises problems related to the status of ZLIB1.DLL as a - system component. According to the Microsoft Knowledge Base - article KB326922 "INFO: Redistribution of the Shared C - Runtime Component in Visual C++ .NET", MSVCR70.DLL and - MSVCR71.DLL are not supposed to function as system DLLs, - because they may clash with MSVCRT.DLL. Instead, the - application's installer is supposed to put these DLLs - (if needed) in the application's private directory. - If ZLIB1.DLL depends on a non-system runtime, it cannot - function as a redistributable system component. - - * Linking ZLIB1.DLL to non-Microsoft runtimes, such as - Borland's, or Cygwin's, raises problems related to the - reliable presence of these runtimes on Win32 systems. - It's easier to let the DLL build of zlib up to the people - who distribute these runtimes, and who may proceed as - explained in the answer to Question 14. - - -13. If ZLIB1.DLL cannot be linked to MSVCR70.DLL or MSVCR71.DLL, - how can I build/use ZLIB1.DLL in Microsoft Visual C++ 7.0 - (Visual Studio .NET) or newer? - - - Due to the problems explained in the Microsoft Knowledge Base - article KB326922 (see the previous answer), the C runtime that - comes with the VC7 environment is no longer considered a - system component. That is, it should not be assumed that this - runtime exists, or may be installed in a system directory. - Since ZLIB1.DLL is supposed to be a system component, it may - not depend on a non-system component. - - In order to link ZLIB1.DLL and your application to MSVCRT.DLL - in VC7, you need the library of Visual C++ 6.0 or older. If - you don't have this library at hand, it's probably best not to - use ZLIB1.DLL. - - We are hoping that, in the future, Microsoft will provide a - way to build applications linked to a proper system runtime, - from the Visual C++ environment. Until then, you have a - couple of alternatives, such as linking zlib in statically. - If your application requires dynamic linking, you may proceed - as explained in the answer to Question 14. - - -14. I need to link my own DLL build to a CRT different than - MSVCRT.DLL. What can I do? - - - Feel free to rebuild the DLL from the zlib sources, and link - it the way you want. You should, however, clearly state that - your build is unofficial. You should give it a different file - name, and/or install it in a private directory that can be - accessed by your application only, and is not visible to the - others (i.e. it's neither in the PATH, nor in the SYSTEM or - SYSTEM32 directories). Otherwise, your build may clash with - applications that link to the official build. - - For example, in Cygwin, zlib is linked to the Cygwin runtime - CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL. - - -15. May I include additional pieces of code that I find useful, - link them in ZLIB1.DLL, and export them? - - - No. A legitimate build of ZLIB1.DLL must not include code - that does not originate from the official zlib source code. - But you can make your own private DLL build, under a different - file name, as suggested in the previous answer. - - For example, zlib is a part of the VCL library, distributed - with Borland Delphi and C++ Builder. The DLL build of VCL - is a redistributable file, named VCLxx.DLL. - - -16. May I remove some functionality out of ZLIB1.DLL, by enabling - macros like NO_GZCOMPRESS or NO_GZIP at compile time? - - - No. A legitimate build of ZLIB1.DLL must provide the complete - zlib functionality, as implemented in the official zlib source - code. But you can make your own private DLL build, under a - different file name, as suggested in the previous answer. - - -17. I made my own ZLIB1.DLL build. Can I test it for compliance? - - - We prefer that you download the official DLL from the zlib - web site. If you need something peculiar from this DLL, you - can send your suggestion to the zlib mailing list. - - However, in case you do rebuild the DLL yourself, you can run - it with the test programs found in the DLL distribution. - Running these test programs is not a guarantee of compliance, - but a failure can imply a detected problem. - -** - -This document is written and maintained by -Cosmin Truta diff --git a/thirdparty/zlib-1.2.12/win32/Makefile.bor b/thirdparty/zlib-1.2.12/win32/Makefile.bor deleted file mode 100644 index 4495353..0000000 --- a/thirdparty/zlib-1.2.12/win32/Makefile.bor +++ /dev/null @@ -1,109 +0,0 @@ -# Makefile for zlib -# Borland C++ for Win32 -# -# Usage: -# make -f win32/Makefile.bor - -# ------------ Borland C++ ------------ - -# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) -# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or -# added to the declaration of LOC here: -LOC = $(LOCAL_ZLIB) - -CC = bcc32 -AS = bcc32 -LD = bcc32 -AR = tlib -CFLAGS = -a -d -k- -O2 $(LOC) -ASFLAGS = $(LOC) -LDFLAGS = $(LOC) - - -# variables -ZLIB_LIB = zlib.lib - -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj -OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -#OBJA = -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj -OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj -#OBJPA= - - -# targets -all: $(ZLIB_LIB) example.exe minigzip.exe - -.c.obj: - $(CC) -c $(CFLAGS) $< - -.asm.obj: - $(AS) -c $(ASFLAGS) $< - -adler32.obj: adler32.c zlib.h zconf.h - -compress.obj: compress.c zlib.h zconf.h - -crc32.obj: crc32.c zlib.h zconf.h crc32.h - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - -gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h - -gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h - -gzread.obj: gzread.c zlib.h zconf.h gzguts.h - -gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h - -infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h - -inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - -trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h - -uncompr.obj: uncompr.c zlib.h zconf.h - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - -example.obj: test/example.c zlib.h zconf.h - -minigzip.obj: test/minigzip.c zlib.h zconf.h - - -# For the sake of the old Borland make, -# the command line is cut to fit in the MS-DOS 128 byte limit: -$(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA) - -del $(ZLIB_LIB) - $(AR) $(ZLIB_LIB) $(OBJP1) - $(AR) $(ZLIB_LIB) $(OBJP2) - $(AR) $(ZLIB_LIB) $(OBJPA) - - -# testing -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -example.exe: example.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) - -minigzip.exe: minigzip.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) - - -# cleanup -clean: - -del $(ZLIB_LIB) - -del *.obj - -del *.exe - -del *.tds - -del zlib.bak - -del foo.gz diff --git a/thirdparty/zlib-1.2.12/win32/Makefile.gcc b/thirdparty/zlib-1.2.12/win32/Makefile.gcc deleted file mode 100644 index 081e391..0000000 --- a/thirdparty/zlib-1.2.12/win32/Makefile.gcc +++ /dev/null @@ -1,177 +0,0 @@ -# Makefile for zlib, derived from Makefile.dj2. -# Modified for mingw32 by C. Spieler, 6/16/98. -# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003. -# Last updated: Mar 2012. -# Tested under Cygwin and MinGW. - -# Copyright (C) 1995-2003 Jean-loup Gailly. -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile, or to compile and test, type from the top level zlib directory: -# -# make -fwin32/Makefile.gcc; make test testdll -fwin32/Makefile.gcc -# -# To install libz.a, zconf.h and zlib.h in the system directories, type: -# -# make install -fwin32/Makefile.gcc -# -# BINARY_PATH, INCLUDE_PATH and LIBRARY_PATH must be set. -# -# To install the shared lib, append SHARED_MODE=1 to the make command : -# -# make install -fwin32/Makefile.gcc SHARED_MODE=1 - -# Note: -# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN), -# the DLL name should be changed from "zlib1.dll". - -STATICLIB = libz.a -SHAREDLIB = zlib1.dll -IMPLIB = libz.dll.a - -# -# Set to 1 if shared object needs to be installed -# -SHARED_MODE=0 - -#LOC = -DZLIB_DEBUG -g - -PREFIX = -CC = $(PREFIX)gcc -CFLAGS = $(LOC) -O3 -Wall - -AS = $(CC) -ASFLAGS = $(LOC) -Wall - -LD = $(CC) -LDFLAGS = $(LOC) - -AR = $(PREFIX)ar -ARFLAGS = rcs - -RC = $(PREFIX)windres -RCFLAGS = --define GCC_WINDRES - -STRIP = $(PREFIX)strip - -CP = cp -fp -# If GNU install is available, replace $(CP) with install. -INSTALL = $(CP) -RM = rm -f - -prefix ?= /usr/local -exec_prefix = $(prefix) - -OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ - gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o -OBJA = - -all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example.exe minigzip.exe example_d.exe minigzip_d.exe - -test: example.exe minigzip.exe - ./example - echo hello world | ./minigzip | ./minigzip -d - -testdll: example_d.exe minigzip_d.exe - ./example_d - echo hello world | ./minigzip_d | ./minigzip_d -d - -.c.o: - $(CC) $(CFLAGS) -c -o $@ $< - -.S.o: - $(AS) $(ASFLAGS) -c -o $@ $< - -$(STATICLIB): $(OBJS) $(OBJA) - $(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA) - -$(IMPLIB): $(SHAREDLIB) - -$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o - $(CC) -shared -Wl,--out-implib,$(IMPLIB) $(LDFLAGS) \ - -o $@ win32/zlib.def $(OBJS) $(OBJA) zlibrc.o - $(STRIP) $@ - -example.exe: example.o $(STATICLIB) - $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB) - $(STRIP) $@ - -minigzip.exe: minigzip.o $(STATICLIB) - $(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB) - $(STRIP) $@ - -example_d.exe: example.o $(IMPLIB) - $(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB) - $(STRIP) $@ - -minigzip_d.exe: minigzip.o $(IMPLIB) - $(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB) - $(STRIP) $@ - -example.o: test/example.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -c -o $@ test/example.c - -minigzip.o: test/minigzip.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -c -o $@ test/minigzip.c - -zlibrc.o: win32/zlib1.rc - $(RC) $(RCFLAGS) -o $@ win32/zlib1.rc - -.PHONY: install uninstall clean - -install: zlib.h zconf.h $(STATICLIB) $(IMPLIB) - @if test -z "$(DESTDIR)$(INCLUDE_PATH)" -o -z "$(DESTDIR)$(LIBRARY_PATH)" -o -z "$(DESTDIR)$(BINARY_PATH)"; then \ - echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \ - exit 1; \ - fi - -@mkdir -p '$(DESTDIR)$(INCLUDE_PATH)' - -@mkdir -p '$(DESTDIR)$(LIBRARY_PATH)' '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig - -if [ "$(SHARED_MODE)" = "1" ]; then \ - mkdir -p '$(DESTDIR)$(BINARY_PATH)'; \ - $(INSTALL) $(SHAREDLIB) '$(DESTDIR)$(BINARY_PATH)'; \ - $(INSTALL) $(IMPLIB) '$(DESTDIR)$(LIBRARY_PATH)'; \ - fi - -$(INSTALL) zlib.h '$(DESTDIR)$(INCLUDE_PATH)' - -$(INSTALL) zconf.h '$(DESTDIR)$(INCLUDE_PATH)' - -$(INSTALL) $(STATICLIB) '$(DESTDIR)$(LIBRARY_PATH)' - sed \ - -e 's|@prefix@|${prefix}|g' \ - -e 's|@exec_prefix@|${exec_prefix}|g' \ - -e 's|@libdir@|$(LIBRARY_PATH)|g' \ - -e 's|@sharedlibdir@|$(LIBRARY_PATH)|g' \ - -e 's|@includedir@|$(INCLUDE_PATH)|g' \ - -e 's|@VERSION@|'`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' zlib.h`'|g' \ - zlib.pc.in > '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig/zlib.pc - -uninstall: - -if [ "$(SHARED_MODE)" = "1" ]; then \ - $(RM) '$(DESTDIR)$(BINARY_PATH)'/$(SHAREDLIB); \ - $(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(IMPLIB); \ - fi - -$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zlib.h - -$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zconf.h - -$(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(STATICLIB) - -clean: - -$(RM) $(STATICLIB) - -$(RM) $(SHAREDLIB) - -$(RM) $(IMPLIB) - -$(RM) *.o - -$(RM) *.exe - -$(RM) foo.gz - -adler32.o: zlib.h zconf.h -compress.o: zlib.h zconf.h -crc32.o: crc32.h zlib.h zconf.h -deflate.o: deflate.h zutil.h zlib.h zconf.h -gzclose.o: zlib.h zconf.h gzguts.h -gzlib.o: zlib.h zconf.h gzguts.h -gzread.o: zlib.h zconf.h gzguts.h -gzwrite.o: zlib.h zconf.h gzguts.h -inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -inftrees.o: zutil.h zlib.h zconf.h inftrees.h -trees.o: deflate.h zutil.h zlib.h zconf.h trees.h -uncompr.o: zlib.h zconf.h -zutil.o: zutil.h zlib.h zconf.h diff --git a/thirdparty/zlib-1.2.12/win32/Makefile.msc b/thirdparty/zlib-1.2.12/win32/Makefile.msc deleted file mode 100644 index 9c65153..0000000 --- a/thirdparty/zlib-1.2.12/win32/Makefile.msc +++ /dev/null @@ -1,159 +0,0 @@ -# Makefile for zlib using Microsoft (Visual) C -# zlib is copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler -# -# Usage: -# nmake -f win32/Makefile.msc (standard build) -# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build) - -# The toplevel directory of the source tree. -# -TOP = . - -# optional build flags -LOC = - -# variables -STATICLIB = zlib.lib -SHAREDLIB = zlib1.dll -IMPLIB = zdll.lib - -CC = cl -AS = ml -LD = link -AR = lib -RC = rc -CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC) -WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -ASFLAGS = -coff -Zi $(LOC) -LDFLAGS = -nologo -debug -incremental:no -opt:ref -ARFLAGS = -nologo -RCFLAGS = /dWIN32 /r - -OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj \ - gzwrite.obj infback.obj inflate.obj inftrees.obj inffast.obj trees.obj uncompr.obj zutil.obj -OBJA = - - -# targets -all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) \ - example.exe minigzip.exe example_d.exe minigzip_d.exe - -$(STATICLIB): $(OBJS) $(OBJA) - $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(OBJA) - -$(IMPLIB): $(SHAREDLIB) - -$(SHAREDLIB): $(TOP)/win32/zlib.def $(OBJS) $(OBJA) zlib1.res - $(LD) $(LDFLAGS) -def:$(TOP)/win32/zlib.def -dll -implib:$(IMPLIB) \ - -out:$@ -base:0x5A4C0000 $(OBJS) $(OBJA) zlib1.res - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;2 - -example.exe: example.obj $(STATICLIB) - $(LD) $(LDFLAGS) example.obj $(STATICLIB) - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;1 - -minigzip.exe: minigzip.obj $(STATICLIB) - $(LD) $(LDFLAGS) minigzip.obj $(STATICLIB) - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;1 - -example_d.exe: example.obj $(IMPLIB) - $(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB) - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;1 - -minigzip_d.exe: minigzip.obj $(IMPLIB) - $(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB) - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;1 - -{$(TOP)}.c.obj: - $(CC) -c $(WFLAGS) $(CFLAGS) $< - -{$(TOP)/test}.c.obj: - $(CC) -c -I$(TOP) $(WFLAGS) $(CFLAGS) $< - -{$(TOP)/contrib/masmx64}.c.obj: - $(CC) -c $(WFLAGS) $(CFLAGS) $< - -{$(TOP)/contrib/masmx64}.asm.obj: - $(AS) -c $(ASFLAGS) $< - -{$(TOP)/contrib/masmx86}.asm.obj: - $(AS) -c $(ASFLAGS) $< - -adler32.obj: $(TOP)/adler32.c $(TOP)/zlib.h $(TOP)/zconf.h - -compress.obj: $(TOP)/compress.c $(TOP)/zlib.h $(TOP)/zconf.h - -crc32.obj: $(TOP)/crc32.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/crc32.h - -deflate.obj: $(TOP)/deflate.c $(TOP)/deflate.h $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h - -gzclose.obj: $(TOP)/gzclose.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - -gzlib.obj: $(TOP)/gzlib.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - -gzread.obj: $(TOP)/gzread.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - -gzwrite.obj: $(TOP)/gzwrite.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - -infback.obj: $(TOP)/infback.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ - $(TOP)/inffast.h $(TOP)/inffixed.h - -inffast.obj: $(TOP)/inffast.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ - $(TOP)/inffast.h - -inflate.obj: $(TOP)/inflate.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ - $(TOP)/inffast.h $(TOP)/inffixed.h - -inftrees.obj: $(TOP)/inftrees.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h - -trees.obj: $(TOP)/trees.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/deflate.h $(TOP)/trees.h - -uncompr.obj: $(TOP)/uncompr.c $(TOP)/zlib.h $(TOP)/zconf.h - -zutil.obj: $(TOP)/zutil.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h - -gvmat64.obj: $(TOP)/contrib\masmx64\gvmat64.asm - -inffasx64.obj: $(TOP)/contrib\masmx64\inffasx64.asm - -inffas8664.obj: $(TOP)/contrib\masmx64\inffas8664.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h \ - $(TOP)/inftrees.h $(TOP)/inflate.h $(TOP)/inffast.h - -inffas32.obj: $(TOP)/contrib\masmx86\inffas32.asm - -match686.obj: $(TOP)/contrib\masmx86\match686.asm - -example.obj: $(TOP)/test/example.c $(TOP)/zlib.h $(TOP)/zconf.h - -minigzip.obj: $(TOP)/test/minigzip.c $(TOP)/zlib.h $(TOP)/zconf.h - -zlib1.res: $(TOP)/win32/zlib1.rc - $(RC) $(RCFLAGS) /fo$@ $(TOP)/win32/zlib1.rc - -# testing -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -testdll: example_d.exe minigzip_d.exe - example_d - echo hello world | minigzip_d | minigzip_d -d - - -# cleanup -clean: - -del $(STATICLIB) - -del $(SHAREDLIB) - -del $(IMPLIB) - -del *.obj - -del *.res - -del *.exp - -del *.exe - -del *.pdb - -del *.manifest - -del foo.gz diff --git a/thirdparty/zlib-1.2.12/win32/README-WIN32.txt b/thirdparty/zlib-1.2.12/win32/README-WIN32.txt deleted file mode 100644 index 536cfec..0000000 --- a/thirdparty/zlib-1.2.12/win32/README-WIN32.txt +++ /dev/null @@ -1,103 +0,0 @@ -ZLIB DATA COMPRESSION LIBRARY - -zlib 1.2.12 is a general purpose data compression library. All the code is -thread safe. The data format used by the zlib library is described by RFCs -(Request for Comments) 1950 to 1952 in the files -http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) -and rfc1952.txt (gzip format). - -All functions of the compression library are documented in the file zlib.h -(volunteer to write man pages welcome, contact zlib@gzip.org). Two compiled -examples are distributed in this package, example and minigzip. The example_d -and minigzip_d flavors validate that the zlib1.dll file is working correctly. - -Questions about zlib should be sent to . The zlib home page -is http://zlib.net/ . Before reporting a problem, please check this site to -verify that you have the latest version of zlib; otherwise get the latest -version and check whether the problem still exists or not. - -PLEASE read DLL_FAQ.txt, and the the zlib FAQ http://zlib.net/zlib_faq.html -before asking for help. - - -Manifest: - -The package zlib-1.2.12-win32-x86.zip will contain the following files: - - README-WIN32.txt This document - ChangeLog Changes since previous zlib packages - DLL_FAQ.txt Frequently asked questions about zlib1.dll - zlib.3.pdf Documentation of this library in Adobe Acrobat format - - example.exe A statically-bound example (using zlib.lib, not the dll) - example.pdb Symbolic information for debugging example.exe - - example_d.exe A zlib1.dll bound example (using zdll.lib) - example_d.pdb Symbolic information for debugging example_d.exe - - minigzip.exe A statically-bound test program (using zlib.lib, not the dll) - minigzip.pdb Symbolic information for debugging minigzip.exe - - minigzip_d.exe A zlib1.dll bound test program (using zdll.lib) - minigzip_d.pdb Symbolic information for debugging minigzip_d.exe - - zlib.h Install these files into the compilers' INCLUDE path to - zconf.h compile programs which use zlib.lib or zdll.lib - - zdll.lib Install these files into the compilers' LIB path if linking - zdll.exp a compiled program to the zlib1.dll binary - - zlib.lib Install these files into the compilers' LIB path to link zlib - zlib.pdb into compiled programs, without zlib1.dll runtime dependency - (zlib.pdb provides debugging info to the compile time linker) - - zlib1.dll Install this binary shared library into the system PATH, or - the program's runtime directory (where the .exe resides) - zlib1.pdb Install in the same directory as zlib1.dll, in order to debug - an application crash using WinDbg or similar tools. - -All .pdb files above are entirely optional, but are very useful to a developer -attempting to diagnose program misbehavior or a crash. Many additional -important files for developers can be found in the zlib127.zip source package -available from http://zlib.net/ - review that package's README file for details. - - -Acknowledgments: - -The deflate format used by zlib was defined by Phil Katz. The deflate and -zlib specifications were written by L. Peter Deutsch. Thanks to all the -people who reported problems and suggested various improvements in zlib; they -are too numerous to cite here. - - -Copyright notice: - - (C) 1995-2017 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - -If you use the zlib library in a product, we would appreciate *not* receiving -lengthy legal documents to sign. The sources are provided for free but without -warranty of any kind. The library has been entirely written by Jean-loup -Gailly and Mark Adler; it does not include third-party code. - -If you redistribute modified sources, we would appreciate that you include in -the file ChangeLog history information documenting your changes. Please read -the FAQ for more information on the distribution of modified source versions. diff --git a/thirdparty/zlib-1.2.12/win32/VisualC.txt b/thirdparty/zlib-1.2.12/win32/VisualC.txt deleted file mode 100644 index 1005b21..0000000 --- a/thirdparty/zlib-1.2.12/win32/VisualC.txt +++ /dev/null @@ -1,3 +0,0 @@ - -To build zlib using the Microsoft Visual C++ environment, -use the appropriate project from the contrib/vstudio/ directory. diff --git a/thirdparty/zlib-1.2.12/win32/zlib.def b/thirdparty/zlib-1.2.12/win32/zlib.def deleted file mode 100644 index 53c8011..0000000 --- a/thirdparty/zlib-1.2.12/win32/zlib.def +++ /dev/null @@ -1,97 +0,0 @@ -; zlib data compression library -EXPORTS -; basic functions - zlibVersion - deflate - deflateEnd - inflate - inflateEnd -; advanced functions - deflateSetDictionary - deflateGetDictionary - deflateCopy - deflateReset - deflateParams - deflateTune - deflateBound - deflatePending - deflatePrime - deflateSetHeader - inflateSetDictionary - inflateGetDictionary - inflateSync - inflateCopy - inflateReset - inflateReset2 - inflatePrime - inflateMark - inflateGetHeader - inflateBack - inflateBackEnd - zlibCompileFlags -; utility functions - compress - compress2 - compressBound - uncompress - uncompress2 - gzopen - gzdopen - gzbuffer - gzsetparams - gzread - gzfread - gzwrite - gzfwrite - gzprintf - gzvprintf - gzputs - gzgets - gzputc - gzgetc - gzungetc - gzflush - gzseek - gzrewind - gztell - gzoffset - gzeof - gzdirect - gzclose - gzclose_r - gzclose_w - gzerror - gzclearerr -; large file functions - gzopen64 - gzseek64 - gztell64 - gzoffset64 - adler32_combine64 - crc32_combine64 - crc32_combine_gen64 -; checksum functions - adler32 - adler32_z - crc32 - crc32_z - adler32_combine - crc32_combine - crc32_combine_gen - crc32_combine_op -; various hacks, don't look :) - deflateInit_ - deflateInit2_ - inflateInit_ - inflateInit2_ - inflateBackInit_ - gzgetc_ - zError - inflateSyncPoint - get_crc_table - inflateUndermine - inflateValidate - inflateCodesUsed - inflateResetKeep - deflateResetKeep - gzopen_w diff --git a/thirdparty/zlib-1.2.12/win32/zlib1.rc b/thirdparty/zlib-1.2.12/win32/zlib1.rc deleted file mode 100644 index 234e641..0000000 --- a/thirdparty/zlib-1.2.12/win32/zlib1.rc +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include "../zlib.h" - -#ifdef GCC_WINDRES -VS_VERSION_INFO VERSIONINFO -#else -VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE -#endif - FILEVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 - PRODUCTVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS 1 -#else - FILEFLAGS 0 -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - BEGIN - VALUE "FileDescription", "zlib data compression library\0" - VALUE "FileVersion", ZLIB_VERSION "\0" - VALUE "InternalName", "zlib1.dll\0" - VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" - VALUE "OriginalFilename", "zlib1.dll\0" - VALUE "ProductName", "zlib\0" - VALUE "ProductVersion", ZLIB_VERSION "\0" - VALUE "Comments", "For more information visit http://www.zlib.net/\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/thirdparty/zlib-1.2.12/zconf.h b/thirdparty/zlib-1.2.12/zconf.h deleted file mode 100644 index 77398c1..0000000 --- a/thirdparty/zlib-1.2.12/zconf.h +++ /dev/null @@ -1,534 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols and init macros */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# define adler32_z z_adler32_z -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define crc32_z z_crc32_z -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateGetDictionary z_deflateGetDictionary -# define deflateInit z_deflateInit -# define deflateInit2 z_deflateInit2 -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzfread z_gzfread -# define gzfwrite z_gzfwrite -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzvprintf z_gzvprintf -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit z_inflateBackInit -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCodesUsed z_inflateCodesUsed -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetDictionary z_inflateGetDictionary -# define inflateGetHeader z_inflateGetHeader -# define inflateInit z_inflateInit -# define inflateInit2 z_inflateInit2 -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateResetKeep z_inflateResetKeep -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateValidate z_inflateValidate -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# ifndef Z_SOLO -# define uncompress z_uncompress -# define uncompress2 z_uncompress2 -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const -#endif - -#ifdef Z_SOLO - typedef unsigned long z_size_t; -#else -# define z_longlong long long -# if defined(NO_SIZE_T) - typedef unsigned NO_SIZE_T z_size_t; -# elif defined(STDC) -# include - typedef size_t z_size_t; -# else - typedef unsigned long z_size_t; -# endif -# undef z_longlong -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus about 7 kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#if 1 /* was set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#if 1 /* was set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) -# define Z_HAVE_UNISTD_H -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) -# define z_off64_t __int64 -# else -# define z_off64_t z_off_t -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/thirdparty/zlib-1.2.12/zconf.h.cmakein b/thirdparty/zlib-1.2.12/zconf.h.cmakein deleted file mode 100644 index a7f24cc..0000000 --- a/thirdparty/zlib-1.2.12/zconf.h.cmakein +++ /dev/null @@ -1,536 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H -#cmakedefine Z_PREFIX -#cmakedefine Z_HAVE_UNISTD_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols and init macros */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# define adler32_z z_adler32_z -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define crc32_z z_crc32_z -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateGetDictionary z_deflateGetDictionary -# define deflateInit z_deflateInit -# define deflateInit2 z_deflateInit2 -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzfread z_gzfread -# define gzfwrite z_gzfwrite -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzvprintf z_gzvprintf -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit z_inflateBackInit -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCodesUsed z_inflateCodesUsed -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetDictionary z_inflateGetDictionary -# define inflateGetHeader z_inflateGetHeader -# define inflateInit z_inflateInit -# define inflateInit2 z_inflateInit2 -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateResetKeep z_inflateResetKeep -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateValidate z_inflateValidate -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# ifndef Z_SOLO -# define uncompress z_uncompress -# define uncompress2 z_uncompress2 -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const -#endif - -#ifdef Z_SOLO - typedef unsigned long z_size_t; -#else -# define z_longlong long long -# if defined(NO_SIZE_T) - typedef unsigned NO_SIZE_T z_size_t; -# elif defined(STDC) -# include - typedef size_t z_size_t; -# else - typedef unsigned long z_size_t; -# endif -# undef z_longlong -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus about 7 kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) -# define Z_HAVE_UNISTD_H -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) -# define z_off64_t __int64 -# else -# define z_off64_t z_off_t -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/thirdparty/zlib-1.2.12/zconf.h.in b/thirdparty/zlib-1.2.12/zconf.h.in deleted file mode 100644 index 5e1d68a..0000000 --- a/thirdparty/zlib-1.2.12/zconf.h.in +++ /dev/null @@ -1,534 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols and init macros */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# define adler32_z z_adler32_z -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define crc32_z z_crc32_z -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateGetDictionary z_deflateGetDictionary -# define deflateInit z_deflateInit -# define deflateInit2 z_deflateInit2 -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzfread z_gzfread -# define gzfwrite z_gzfwrite -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzvprintf z_gzvprintf -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit z_inflateBackInit -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCodesUsed z_inflateCodesUsed -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetDictionary z_inflateGetDictionary -# define inflateGetHeader z_inflateGetHeader -# define inflateInit z_inflateInit -# define inflateInit2 z_inflateInit2 -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateResetKeep z_inflateResetKeep -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateValidate z_inflateValidate -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# ifndef Z_SOLO -# define uncompress z_uncompress -# define uncompress2 z_uncompress2 -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const -#endif - -#ifdef Z_SOLO - typedef unsigned long z_size_t; -#else -# define z_longlong long long -# if defined(NO_SIZE_T) - typedef unsigned NO_SIZE_T z_size_t; -# elif defined(STDC) -# include - typedef size_t z_size_t; -# else - typedef unsigned long z_size_t; -# endif -# undef z_longlong -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus about 7 kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) -# define Z_HAVE_UNISTD_H -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) -# define z_off64_t __int64 -# else -# define z_off64_t z_off_t -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/thirdparty/zlib-1.2.12/zlib.3 b/thirdparty/zlib-1.2.12/zlib.3 deleted file mode 100644 index bcaebd9..0000000 --- a/thirdparty/zlib-1.2.12/zlib.3 +++ /dev/null @@ -1,149 +0,0 @@ -.TH ZLIB 3 "27 Mar 2022" -.SH NAME -zlib \- compression/decompression library -.SH SYNOPSIS -[see -.I zlib.h -for full description] -.SH DESCRIPTION -The -.I zlib -library is a general purpose data compression library. -The code is thread safe, assuming that the standard library functions -used are thread safe, such as memory allocation routines. -It provides in-memory compression and decompression functions, -including integrity checks of the uncompressed data. -This version of the library supports only one compression method (deflation) -but other algorithms may be added later -with the same stream interface. -.LP -Compression can be done in a single step if the buffers are large enough -or can be done by repeated calls of the compression function. -In the latter case, -the application must provide more input and/or consume the output -(providing more output space) before each call. -.LP -The library also supports reading and writing files in -.IR gzip (1) -(.gz) format -with an interface similar to that of stdio. -.LP -The library does not install any signal handler. -The decoder checks the consistency of the compressed data, -so the library should never crash even in the case of corrupted input. -.LP -All functions of the compression library are documented in the file -.IR zlib.h . -The distribution source includes examples of use of the library -in the files -.I test/example.c -and -.IR test/minigzip.c, -as well as other examples in the -.IR examples/ -directory. -.LP -Changes to this version are documented in the file -.I ChangeLog -that accompanies the source. -.LP -.I zlib -is built in to many languages and operating systems, including but not limited to -Java, Python, .NET, PHP, Perl, Ruby, Swift, and Go. -.LP -An experimental package to read and write files in the .zip format, -written on top of -.I zlib -by Gilles Vollant (info@winimage.com), -is available at: -.IP -http://www.winimage.com/zLibDll/minizip.html -and also in the -.I contrib/minizip -directory of the main -.I zlib -source distribution. -.SH "SEE ALSO" -The -.I zlib -web site can be found at: -.IP -http://zlib.net/ -.LP -The data format used by the -.I zlib -library is described by RFC -(Request for Comments) 1950 to 1952 in the files: -.IP -http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format) -.br -http://tools.ietf.org/html/rfc1951 (for the deflate compressed data format) -.br -http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer format) -.LP -Mark Nelson wrote an article about -.I zlib -for the Jan. 1997 issue of Dr. Dobb's Journal; -a copy of the article is available at: -.IP -http://marknelson.us/1997/01/01/zlib-engine/ -.SH "REPORTING PROBLEMS" -Before reporting a problem, -please check the -.I zlib -web site to verify that you have the latest version of -.IR zlib ; -otherwise, -obtain the latest version and see if the problem still exists. -Please read the -.I zlib -FAQ at: -.IP -http://zlib.net/zlib_faq.html -.LP -before asking for help. -Send questions and/or comments to zlib@gzip.org, -or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). -.SH AUTHORS AND LICENSE -Version 1.2.12 -.LP -Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler -.LP -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. -.LP -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: -.LP -.nr step 1 1 -.IP \n[step]. 3 -The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software -in a product, an acknowledgment in the product documentation would be -appreciated but is not required. -.IP \n+[step]. -Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -.IP \n+[step]. -This notice may not be removed or altered from any source distribution. -.LP -Jean-loup Gailly Mark Adler -.br -jloup@gzip.org madler@alumni.caltech.edu -.LP -The deflate format used by -.I zlib -was defined by Phil Katz. -The deflate and -.I zlib -specifications were written by L. Peter Deutsch. -Thanks to all the people who reported problems and suggested various -improvements in -.IR zlib ; -who are too numerous to cite here. -.LP -UNIX manual page by R. P. C. Rodgers, -U.S. National Library of Medicine (rodgers@nlm.nih.gov). -.\" end of man page diff --git a/thirdparty/zlib-1.2.12/zlib.3.pdf b/thirdparty/zlib-1.2.12/zlib.3.pdf deleted file mode 100644 index 54d677ab01708639e04f9972ef20c52b00ba432d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8848 zcmch7c|4Ts8+S?46e6i)8M0=X88c(7BL*RpUDg<8tiv!f_K>YCQOKUHEXf{PEQQFH zkYp)aq3oiNqW2lqIi1t_y}#f4`JB)D{NtYMxvuNJ*8Be6_d`%uRb2umi2w<<%w4$w zLV}@Sl8qBcK>?yoaJ8p8fTaP7K1AJ-NF|WL5OpGsN>C-(lJEpH8bqOz2{;#!_w`(} zSL9dfZ2tXcpPJX7a1TBDIzDOr27X?j*sM=*?$>e&5)iP#(jj)5B|gHf8LaZIeS8hQ zAYydK{7eF2XY%wk+JA$pgRZ!`kK;M-${N{^yvk?mHLTgXa0Z>p_~~lOqeS!7WlqS% z$Eev?2REawQ}Cu-6|?i2h7$@6I%~oWqmYr>+Pyc@j#895OTI;v?mOQZ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Xjy=05Qv@x zs-rDVLdS;a=#5VS?5E`6&qoM@Xa5KaK_pO5ScbTW10lY(ubjbX62yta&61cEl?R zpG9J!ST_v8!BNAPOfc|0V`%H^Y%7ZwRziamlyE@p5G1^DZW4Ce-=rvD0>xI5AEU3W z&QD|Tmh*OTa{;Oo?CnByrO0_J3U7CKyu2j6;F2V=Jp?8z zD+_^2L8PQ401gR?k1G}DE#XQz4$QZ0h@;6LVy+a)ZJQ)*NiGma69`Na3i&yaD&P*; z(T(azas|^S#@UcOsEWcK9*%f9s4Pkfijam$5TxNU5-^w@N&*Tz5;z$o!iGSQg+Xm# zKc{p1#mv9V2fP3#gadH^MsmOsiTAK2kQIeb>1u;dIglvS@AHFYC8c1(kRR^(k1DXhqotrgNTF~EDU=}$DF>65g91NMa!{xO;5_{M+%u zxnZ&Y_lUW;&`O%dC#OoX^>6`pE=|?{mxB4XbBwqB!(cZLGI6^*@U{>FkwCMJ0;CxR zSd6!ovm=pRa6oP2+}w!3ib^Ya2vC#4Xa(RU)sadhptpNZnMnOUAUe`|NsfqfwO17O zmcSG2a2`aeFxtpUbe%UgA_O-}AwY4aKacErv1f13up{z`*FX(02jG`O_PZ!~EsDF8YAl}{Qe4eZ)~rvaAzoraJC zaK+#Fq@@3WCi@!=DGUG2W;hD^n|(+W5=iXd=71x9(QXj5<^m{ogq(X@HYL#gVDog&`v)iv$S@s_CeM{tv?$gG~Sc diff --git a/thirdparty/zlib-1.2.12/zlib.h b/thirdparty/zlib-1.2.12/zlib.h deleted file mode 100644 index 4a98e38..0000000 --- a/thirdparty/zlib-1.2.12/zlib.h +++ /dev/null @@ -1,1935 +0,0 @@ -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.12, March 11th, 2022 - - Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 - (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). -*/ - -#ifndef ZLIB_H -#define ZLIB_H - -#include "zconf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define ZLIB_VERSION "1.2.12" -#define ZLIB_VERNUM 0x12c0 -#define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 12 -#define ZLIB_VER_SUBREVISION 0 - -/* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed data. - This version of the library supports only one compression method (deflation) - but other algorithms will be added later and will have the same stream - interface. - - Compression can be done in a single step if the buffers are large enough, - or can be done by repeated calls of the compression function. In the latter - case, the application must provide more input and/or consume the output - (providing more output space) before each call. - - The compressed data format used by default by the in-memory functions is - the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped - around a deflate stream, which is itself documented in RFC 1951. - - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio using the functions that start - with "gz". The gzip format is different from the zlib format. gzip is a - gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - - This library can optionally read and write gzip and raw deflate streams in - memory as well. - - The zlib format was designed to be compact and fast for use in memory - and on communications channels. The gzip format was designed for single- - file compression on file systems, has a larger header than zlib to maintain - directory information, and uses a different, slower check method than zlib. - - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never crash - even in the case of corrupted input. -*/ - -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); - -struct internal_state; - -typedef struct z_stream_s { - z_const Bytef *next_in; /* next input byte */ - uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total number of input bytes read so far */ - - Bytef *next_out; /* next output byte will go here */ - uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total number of bytes output so far */ - - z_const char *msg; /* last error message, NULL if no error */ - struct internal_state FAR *state; /* not visible by applications */ - - alloc_func zalloc; /* used to allocate the internal state */ - free_func zfree; /* used to free the internal state */ - voidpf opaque; /* private data object passed to zalloc and zfree */ - - int data_type; /* best guess about the data type: binary or text - for deflate, or the decoding state for inflate */ - uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */ - uLong reserved; /* reserved for future use */ -} z_stream; - -typedef z_stream FAR *z_streamp; - -/* - gzip header information passed to and from zlib routines. See RFC 1952 - for more details on the meanings of these fields. -*/ -typedef struct gz_header_s { - int text; /* true if compressed data believed to be text */ - uLong time; /* modification time */ - int xflags; /* extra flags (not used when writing a gzip file) */ - int os; /* operating system */ - Bytef *extra; /* pointer to extra field or Z_NULL if none */ - uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ - uInt extra_max; /* space at extra (only when reading header) */ - Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ - uInt name_max; /* space at name (only when reading header) */ - Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ - uInt comm_max; /* space at comment (only when reading header) */ - int hcrc; /* true if there was or will be a header crc */ - int done; /* true when done reading gzip header (not used - when writing a gzip file) */ -} gz_header; - -typedef gz_header FAR *gz_headerp; - -/* - The application must update next_in and avail_in when avail_in has dropped - to zero. It must update next_out and avail_out when avail_out has dropped - to zero. The application must initialize zalloc, zfree and opaque before - calling the init function. All other fields are set by the compression - library and must not be updated by the application. - - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the - opaque value. - - zalloc must return Z_NULL if there is not enough memory for the object. - If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. In that case, zlib is thread-safe. When zalloc and zfree are - Z_NULL on entry to the initialization function, they are set to internal - routines that use the standard library functions malloc() and free(). - - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this if - the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers - returned by zalloc for objects of exactly 65536 bytes *must* have their - offset normalized to zero. The default allocation function provided by this - library ensures this (see zutil.c). To reduce memory requirements and avoid - any allocation of 64K objects, at the expense of compression ratio, compile - the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or progress - reports. After compression, total_in holds the total size of the - uncompressed data and may be saved for use by the decompressor (particularly - if the decompressor wants to decompress everything in a single step). -*/ - - /* constants */ - -#define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 -#define Z_SYNC_FLUSH 2 -#define Z_FULL_FLUSH 3 -#define Z_FINISH 4 -#define Z_BLOCK 5 -#define Z_TREES 6 -/* Allowed flush values; see deflate() and inflate() below for details */ - -#define Z_OK 0 -#define Z_STREAM_END 1 -#define Z_NEED_DICT 2 -#define Z_ERRNO (-1) -#define Z_STREAM_ERROR (-2) -#define Z_DATA_ERROR (-3) -#define Z_MEM_ERROR (-4) -#define Z_BUF_ERROR (-5) -#define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - -#define Z_NO_COMPRESSION 0 -#define Z_BEST_SPEED 1 -#define Z_BEST_COMPRESSION 9 -#define Z_DEFAULT_COMPRESSION (-1) -/* compression levels */ - -#define Z_FILTERED 1 -#define Z_HUFFMAN_ONLY 2 -#define Z_RLE 3 -#define Z_FIXED 4 -#define Z_DEFAULT_STRATEGY 0 -/* compression strategy; see deflateInit2() below for details */ - -#define Z_BINARY 0 -#define Z_TEXT 1 -#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ -#define Z_UNKNOWN 2 -/* Possible values of the data_type field for deflate() */ - -#define Z_DEFLATED 8 -/* The deflate compression method (the only one supported in this version) */ - -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ - -#define zlib_version zlibVersion() -/* for compatibility with versions < 1.0.2 */ - - - /* basic functions */ - -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); -/* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is not - compatible with the zlib.h header file used by the application. This check - is automatically made by deflateInit and inflateInit. - */ - -/* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. If - zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. - - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at all - (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION - requests a default compromise between speed and compression (currently - equivalent to level 6). - - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if level is not a valid compression level, or - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). msg is set to null - if there is no error message. deflateInit does not perform any compression: - this will be done by deflate(). -*/ - - -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); -/* - deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. deflate performs one or both of the - following actions: - - - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in and avail_in are updated and - processing will resume at this point for the next call of deflate(). - - - Generate more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. - Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary. Some output may be provided even if - flush is zero. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating avail_in or avail_out accordingly; avail_out should - never be zero before the call. The application can consume the compressed - output when it wants, for example when the output buffer is full (avail_out - == 0), or after each call of deflate(). If deflate returns Z_OK and with - zero avail_out, it must be called again after making room in the output - buffer because there might be more output pending. See deflatePending(), - which can be used if desired to determine whether or not there is more ouput - in that case. - - Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumulate before producing output, in order to - maximize compression. - - If the parameter flush is set to Z_SYNC_FLUSH, all pending output is - flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In - particular avail_in is zero after the call if enough output space has been - provided before the call.) Flushing may degrade compression for some - compression algorithms and so it should be used only when necessary. This - completes the current deflate block and follows it with an empty stored block - that is three bits plus filler bits to the next byte, followed by four bytes - (00 00 ff ff). - - If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the - output buffer, but the output is not aligned to a byte boundary. All of the - input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. - This completes the current deflate block and follows it with an empty fixed - codes block that is 10 bits long. This assures that enough bytes are output - in order for the decompressor to finish the block before the empty fixed - codes block. - - If flush is set to Z_BLOCK, a deflate block is completed and emitted, as - for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to - seven bits of the current block are held to be written as the next byte after - the next deflate block is completed. In this case, the decompressor may not - be provided enough bits at this point in order to complete decompression of - the data provided so far to the compressor. It may need to wait for the next - block to be emitted. This is for advanced applications that need to control - the emission of deflate blocks. - - If flush is set to Z_FULL_FLUSH, all output is flushed as with - Z_SYNC_FLUSH, and the compression state is reset so that decompression can - restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - compression. - - If deflate returns with avail_out == 0, this function must be called again - with the same value of the flush parameter and more output space (updated - avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. - - If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there was - enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this - function must be called again with Z_FINISH and more output space (updated - avail_out) but no more input data, until it returns with Z_STREAM_END or an - error. After deflate has returned Z_STREAM_END, the only possible operations - on the stream are deflateReset or deflateEnd. - - Z_FINISH can be used in the first deflate call after deflateInit if all the - compression is to be done in a single step. In order to complete in one - call, avail_out must be at least the value returned by deflateBound (see - below). Then deflate is guaranteed to return Z_STREAM_END. If not enough - output space is provided, deflate will not return Z_STREAM_END, and it must - be called again as described above. - - deflate() sets strm->adler to the Adler-32 checksum of all input read - so far (that is, total_in bytes). If a gzip stream is being generated, then - strm->adler will be the CRC-32 checksum of the input read so far. (See - deflateInit2 below.) - - deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is - considered binary. This field is only for information purposes and does not - affect the compression algorithm in any manner. - - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was Z_NULL or the state was inadvertently written over - by the application), or Z_BUF_ERROR if no progress is possible (for example - avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and - deflate() can be called again with more input and more output space to - continue compressing. -*/ - - -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, msg - may be set but then points to a static string (which must not be - deallocated). -*/ - - -/* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. In the current version of inflate, the provided input is not - read or consumed. The allocation of a sliding window will be deferred to - the first call of inflate (if the decompression does not complete on the - first call). If zalloc and zfree are set to Z_NULL, inflateInit updates - them to use default allocation functions. - - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit does not perform any decompression. - Actual decompression will be done by inflate(). So next_in, and avail_in, - next_out, and avail_out are unused and unchanged. The current - implementation of inflateInit() does not process any header information -- - that is deferred until inflate() is called. -*/ - - -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); -/* - inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. inflate performs one or both of the - following actions: - - - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), then next_in and avail_in are updated - accordingly, and processing will resume at this point for the next call of - inflate(). - - - Generate more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there is - no more input data or no more space in the output buffer (see below about - the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating the next_* and avail_* values accordingly. If the - caller of inflate() does not provide both available input and available - output space, it is possible that there will be no progress made. The - application can consume the uncompressed output when it wants, for example - when the output buffer is full (avail_out == 0), or after each call of - inflate(). If inflate returns Z_OK and with zero avail_out, it must be - called again after making room in the output buffer because there might be - more output pending. - - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, - Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() - stop if and when it gets to the next deflate block boundary. When decoding - the zlib or gzip format, this will cause inflate() to return immediately - after the header and before the first block. When doing a raw inflate, - inflate() will go ahead and process the first block, and will return when it - gets to the end of that block, or when it runs out of data. - - The Z_BLOCK option assists in appending to or combining deflate streams. - To assist in this, on return inflate() always sets strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 if - inflate() is currently decoding the last block in the deflate stream, plus - 128 if inflate() returned immediately after decoding an end-of-block code or - decoding the complete header up to just before the first byte of the deflate - stream. The end-of-block will not be indicated until all of the uncompressed - data from that block has been written to strm->next_out. The number of - unused bits may in general be greater than seven, except when bit 7 of - data_type is set, in which case the number of unused bits will be less than - eight. data_type is set as noted here every time inflate() returns for all - flush options, and so can be used to determine the amount of currently - consumed input in bits. - - The Z_TREES option behaves as Z_BLOCK does, but it also returns when the - end of each deflate block header is reached, before any actual data in that - block is decoded. This allows the caller to determine the length of the - deflate block header for later use in random access within a deflate block. - 256 is added to the value of strm->data_type when inflate() returns - immediately after reaching the end of the deflate block header. - - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step (a - single call of inflate), the parameter flush should be set to Z_FINISH. In - this case all pending input is processed and all pending output is flushed; - avail_out must be large enough to hold all of the uncompressed data for the - operation to complete. (The size of the uncompressed data may have been - saved by the compressor for this purpose.) The use of Z_FINISH is not - required to perform an inflation in one step. However it may be used to - inform inflate that a faster approach can be used for the single inflate() - call. Z_FINISH also informs inflate to not maintain a sliding window if the - stream completes, which reduces inflate's memory footprint. If the stream - does not complete, either because not all of the stream is provided or not - enough output space is provided, then a sliding window will be allocated and - inflate() can be called again to continue the operation as if Z_NO_FLUSH had - been used. - - In this implementation, inflate() always flushes as much output as - possible to the output buffer, and always uses the faster approach on the - first call. So the effects of the flush parameter in this implementation are - on the return value of inflate() as noted below, when inflate() returns early - when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of - memory for a sliding window when Z_FINISH is used. - - If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the Adler-32 checksum of the dictionary - chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the Adler-32 checksum of all output produced so far (that is, - total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed Adler-32 - checksum is equal to that saved by the compressor and returns Z_STREAM_END - only if the checksum is correct. - - inflate() can decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically, if requested when - initializing with inflateInit2(). Any information contained in the gzip - header is not retained unless inflateGetHeader() is used. When processing - gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output - produced so far. The CRC-32 is checked against the gzip trailer, as is the - uncompressed length, modulo 2^32. - - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect check - value, in which case strm->msg points to a string with a more specific - error), Z_STREAM_ERROR if the stream structure was inconsistent (for example - next_in or next_out was Z_NULL, or the state was inadvertently written over - by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR - if no progress was possible or if there was not enough room in the output - buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and - inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may - then call inflateSync() to look for a good compression block if a partial - recovery of the data is to be attempted. -*/ - - -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state - was inconsistent. -*/ - - - /* Advanced functions */ - -/* - The following functions are needed only in some special applications. -*/ - -/* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); - - This is another version of deflateInit with more compression options. The - fields zalloc, zfree and opaque must be initialized before by the caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - For the current implementation of deflate(), a windowBits value of 8 (a - window size of 256 bytes) is not supported. As a result, a request for 8 - will result in 9 (a 512-byte window). In that case, providing 8 to - inflateInit2() will result in an error when the zlib header with 9 is - checked against the initialization of inflate(). The remedy is to not use 8 - with deflateInit2() with this initialization, or at least in that case use 9 - with inflateInit2(). - - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute a check value. - - windowBits can also be greater than 15 for optional gzip encoding. Add - 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), no - header crc, and the operating system will be set to the appropriate value, - if the operating system was determined at compile time. If a gzip stream is - being written, strm->adler is a CRC-32 instead of an Adler-32. - - For raw deflate or gzip encoding, a request for a 256-byte window is - rejected as invalid, since only the zlib header provides a means of - transmitting the window size to the decompressor. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but is - slow and reduces compression ratio; memLevel=9 uses maximum memory for - optimal speed. The default value is 8. See zconf.h for total memory usage - as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman - coding and less string matching; it is somewhat intermediate between - Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as - fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The - strategy parameter only affects the compression ratio but not the - correctness of the compressed output even if it is not set appropriately. - Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler - decoder for special applications. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid - method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is - incompatible with the version assumed by the caller (ZLIB_VERSION). msg is - set to null if there is no error message. deflateInit2 does not perform any - compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the compression dictionary from the given byte sequence - without producing any compressed output. When using the zlib format, this - function must be called immediately after deflateInit, deflateInit2 or - deflateReset, and before any call of deflate. When doing raw deflate, this - function must be called either before any call of deflate, or immediately - after the completion of a deflate block, i.e. after all input has been - consumed and all output has been delivered when using any of the flush - options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The - compressor and decompressor must use exactly the same dictionary (see - inflateSetDictionary). - - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy; the data can then be compressed better than - with the default empty dictionary. - - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size - provided in deflateInit or deflateInit2. Thus the strings most likely to be - useful should be put at the end of the dictionary, not at the front. In - addition, the current implementation of deflate will use at most the window - size minus 262 bytes of the provided dictionary. - - Upon return of this function, strm->adler is set to the Adler-32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The Adler-32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) If a raw deflate was requested, then the - Adler-32 value is not computed and strm->adler is not set. - - deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if not at a block boundary for raw deflate). deflateSetDictionary does - not perform any compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); -/* - Returns the sliding dictionary being maintained by deflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If deflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similary, if dictLength is Z_NULL, then it is not set. - - deflateGetDictionary() may return a length less than the window size, even - when more than the window size in input has been provided. It may return up - to 258 bytes less in that case, due to how zlib's implementation of deflate - manages the sliding window and lookahead for matches, where matches can be - up to 258 bytes long. If the application needs the last window-size bytes of - input, then that would need to be saved by the application outside of zlib. - - deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and can - consume lots of memory. - - deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); -/* - This function is equivalent to deflateEnd followed by deflateInit, but - does not free and reallocate the internal compression state. The stream - will leave the compression level and any other attributes that may have been - set unchanged. - - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); -/* - Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2(). This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different strategy. - If the compression approach (which is a function of the level) or the - strategy is changed, and if there have been any deflate() calls since the - state was initialized or reset, then the input available so far is - compressed with the old level and strategy using deflate(strm, Z_BLOCK). - There are three approaches for the compression levels 0, 1..3, and 4..9 - respectively. The new level and strategy will take effect at the next call - of deflate(). - - If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does - not have enough output space to complete, then the parameter change will not - take effect. In this case, deflateParams() can be called again with the - same parameters and more output space to try again. - - In order to assure a change in the parameters on the first try, the - deflate stream should be flushed using deflate() with Z_BLOCK or other flush - request until strm.avail_out is not zero, before calling deflateParams(). - Then no more input data should be provided before the deflateParams() call. - If this is done, the old level and strategy will be applied to the data - compressed before deflateParams(), and the new level and strategy will be - applied to the the data compressed after deflateParams(). - - deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream - state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if - there was not enough output space to complete the compression of the - available input data before a change in the strategy or approach. Note that - in the case of a Z_BUF_ERROR, the parameters are not changed. A return - value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be - retried with more output space. -*/ - -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); -/* - Fine tune deflate's internal compression parameters. This should only be - used by someone who understands the algorithm used by zlib's deflate for - searching for the best matching string, and even then only by the most - fanatic optimizer trying to squeeze out the last compressed bit for their - specific input data. Read the deflate.c source code for the meaning of the - max_lazy, good_length, nice_length, and max_chain parameters. - - deflateTune() can be called after deflateInit() or deflateInit2(), and - returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. - */ - -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); -/* - deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() or - deflateInit2(), and after deflateSetHeader(), if used. This would be used - to allocate an output buffer for deflation in a single pass, and so would be - called before deflate(). If that first deflate() call is provided the - sourceLen input bytes, an output buffer allocated to the size returned by - deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed - to return Z_STREAM_END. Note that it is possible for the compressed size to - be larger than the value returned by deflateBound() if flush options other - than Z_FINISH or Z_NO_FLUSH are used. -*/ - -ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, - unsigned *pending, - int *bits)); -/* - deflatePending() returns the number of bytes and bits of output that have - been generated, but not yet provided in the available output. The bytes not - provided would be due to the available output space having being consumed. - The number of bits of output not provided are between 0 and 7, where they - await more bits to join them in order to fill out a full byte. If pending - or bits are Z_NULL, then those values are not set. - - deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. - */ - -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the bits - leftover from a previous deflate stream when appending to it. As such, this - function can only be used for raw deflate, and must be used before the first - deflate() call after a deflateInit2() or deflateReset(). bits must be less - than or equal to 16, and that many of the least significant bits of value - will be inserted in the output. - - deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough - room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); -/* - deflateSetHeader() provides gzip header information for when a gzip - stream is requested by deflateInit2(). deflateSetHeader() may be called - after deflateInit2() or deflateReset() and before the first call of - deflate(). The text, time, os, extra field, name, and comment information - in the provided gz_header structure are written to the gzip header (xflag is - ignored -- the extra flags are set according to the compression level). The - caller must assure that, if not Z_NULL, name and comment are terminated with - a zero byte, and that if extra is not Z_NULL, that extra_len bytes are - available there. If hcrc is true, a gzip header crc is included. Note that - the current versions of the command-line version of gzip (up through version - 1.3.x) do not support header crc's, and will report that it is a "multi-part - gzip file" and give up. - - If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). - - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); - - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - windowBits can also be zero to request that inflate use the window size in - the zlib header of the compressed stream. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an Adler-32 or a CRC-32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a - CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see - below), inflate() will *not* automatically decode concatenated gzip members. - inflate() will return Z_STREAM_END at the end of the gzip member. The state - would need to be reset to continue decoding a subsequent gzip member. This - *must* be done if there is more data after a gzip member, in order for the - decompression to be compliant with the gzip standard (RFC 1952). - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit2 does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit2() does not process any header information -- that is - deferred until inflate() is called. -*/ - -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the Adler-32 value returned by that call of inflate. - The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called at any - time to set the dictionary. If the provided dictionary is smaller than the - window and there is already data in the window, then the provided dictionary - will amend what's there. The application must insure that the dictionary - that was used for compression is provided. - - inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect Adler-32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate(). -*/ - -ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); -/* - Returns the sliding dictionary being maintained by inflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If inflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similary, if dictLength is Z_NULL, then it is not set. - - inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); -/* - Skips invalid compressed data until a possible full flush point (see above - for the description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - inflateSync searches for a 00 00 FF FF pattern in the compressed data. - All full flush points have this pattern, but not all occurrences of this - pattern are full flush points. - - inflateSync returns Z_OK if a possible full flush point has been found, - Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point - has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. - In the success case, the application may save the current current value of - total_in which indicates where valid compressed data was found. In the - error case, the application may repeatedly call inflateSync, providing more - input each time, until success or end of the input data. -*/ - -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when randomly accessing a large stream. The - first pass through the stream can periodically record the inflate state, - allowing restarting inflate at those points when randomly accessing the - stream. - - inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); -/* - This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate the internal decompression state. The - stream will keep attributes that may have been set by inflateInit2. - - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, - int windowBits)); -/* - This function is the same as inflateReset, but it also permits changing - the wrap and window size requests. The windowBits parameter is interpreted - the same as it is for inflateInit2. If the window size is changed, then the - memory allocated for the window is freed, and the window will be reallocated - by inflate() if needed. - - inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL), or if - the windowBits parameter is invalid. -*/ - -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - - If bits is negative, then the input stream bit buffer is emptied. Then - inflatePrime() can be called again to put bits in the buffer. This is used - to clear out bits leftover after feeding inflate a block description prior - to feeding inflate codes. - - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); -/* - This function returns two values, one in the lower 16 bits of the return - value, and the other in the remaining upper bits, obtained by shifting the - return value down 16 bits. If the upper value is -1 and the lower value is - zero, then inflate() is currently decoding information outside of a block. - If the upper value is -1 and the lower value is non-zero, then inflate is in - the middle of a stored block, with the lower value equaling the number of - bytes from the input remaining to copy. If the upper value is not -1, then - it is the number of bits back from the current bit position in the input of - the code (literal or length/distance pair) currently being processed. In - that case the lower value is the number of bytes already emitted for that - code. - - A code is being processed if inflate is waiting for more input to complete - decoding of the code, or if it has completed decoding but is waiting for - more output space to write the literal or match data. - - inflateMark() is used to mark locations in the input data for random - access, which may be at bit positions, and to note those cases where the - output of a code may span boundaries of random access blocks. The current - location in the input stream can be determined from avail_in and data_type - as noted in the description for the Z_BLOCK flush parameter for inflate. - - inflateMark returns the value noted above, or -65536 if the provided - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); -/* - inflateGetHeader() requests that gzip header information be stored in the - provided gz_header structure. inflateGetHeader() may be called after - inflateInit2() or inflateReset(), and before the first call of inflate(). - As inflate() processes the gzip stream, head->done is zero until the header - is completed, at which time head->done is set to one. If a zlib stream is - being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be - used to force inflate() to return immediately after header processing is - complete and before any actual data is decompressed. - - The text, time, xflags, and os fields are filled in with the gzip header - contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max - contains the maximum number of bytes to write to extra. Once done is true, - extra_len contains the actual extra field length, and extra contains the - extra field, or that field truncated if extra_max is less than extra_len. - If name is not Z_NULL, then up to name_max characters are written there, - terminated with a zero unless the length is greater than name_max. If - comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When any - of extra, name, or comment are not Z_NULL and the respective field is not - present in the header, then that field is set to Z_NULL to signal its - absence. This allows the use of deflateSetHeader() with the returned - structure to duplicate the header. However if those fields are set to - allocated memory, then the application will need to save those pointers - elsewhere so that they can be eventually freed. - - If inflateGetHeader is not used, then the header information is simply - discarded. The header is always checked for validity, including the header - CRC if present. inflateReset() will reset the process to discard the header - information. The application would need to call inflateGetHeader() again to - retrieve the header from the next gzip stream. - - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); - - Initialize the internal stream state for decompression using inflateBack() - calls. The fields zalloc, zfree and opaque in strm must be initialized - before the call. If zalloc and zfree are Z_NULL, then the default library- - derived memory allocation routines are used. windowBits is the base two - logarithm of the window size, in the range 8..15. window is a caller - supplied buffer of that size. Except for special applications where it is - assured that deflate was used with small window sizes, windowBits must be 15 - and a 32K byte window must be supplied to be able to decompress general - deflate streams. - - See inflateBack() for the usage of these routines. - - inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the parameters are invalid, Z_MEM_ERROR if the internal state could not be - allocated, or Z_VERSION_ERROR if the version of the library does not match - the version of the header file. -*/ - -typedef unsigned (*in_func) OF((void FAR *, - z_const unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); -/* - inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is potentially more efficient than - inflate() for file i/o applications, in that it avoids copying between the - output and the sliding window by simply making the window itself the output - buffer. inflate() can be faster on modern CPUs when used with large - buffers. inflateBack() trusts the application to not change the output - buffer passed by the output function, at least until inflateBack() returns. - - inflateBackInit() must be called first to allocate the internal state - and to initialize the state with the user-provided window buffer. - inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free the - allocated state. - - A raw deflate stream is one with no zlib or gzip header or trailer. - This routine would normally be used in a utility that reads zip or gzip - files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects only - the raw deflate stream to decompress. This is different from the default - behavior of inflate(), which expects a zlib header and trailer around the - deflate stream. - - inflateBack() uses two subroutines supplied by the caller that are then - called by inflateBack() for input and output. inflateBack() calls those - routines until it reads a complete deflate stream and writes out all of the - uncompressed data, or until it encounters an error. The function's - parameters and return types are defined above in the in_func and out_func - typedefs. inflateBack() will call in(in_desc, &buf) which should return the - number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero -- buf is ignored in that - case -- and inflateBack() will return a buffer error. inflateBack() will - call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. - out() should return zero on success, or non-zero on failure. If out() - returns non-zero, inflateBack() will return with an error. Neither in() nor - out() are permitted to change the contents of the window provided to - inflateBackInit(), which is also the buffer that out() uses to write from. - The length written by out() will be at most the window size. Any non-zero - amount of input may be provided by in(). - - For convenience, inflateBack() can be provided input on the first call by - setting strm->next_in and strm->avail_in. If that input is exhausted, then - in() will be called. Therefore strm->next_in must be initialized before - calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called - immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in - must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. - - The in_desc and out_desc parameters of inflateBack() is passed as the - first parameter of in() and out() respectively when they are called. These - descriptors can be optionally used to pass any information that the caller- - supplied in() and out() functions need to do their job. - - On return, inflateBack() will set strm->next_in and strm->avail_in to - pass back any unused input that was provided by the last in() call. The - return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format error - in the deflate stream (in which case strm->msg is set to indicate the nature - of the error), or Z_STREAM_ERROR if the stream was not properly initialized. - In the case of Z_BUF_ERROR, an input or output error can be distinguished - using strm->next_in which will be Z_NULL only if in() returned an error. If - strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning - non-zero. (in() will always be called before out(), so strm->next_in is - assured to be defined if out() returns non-zero.) Note that inflateBack() - cannot return Z_OK. -*/ - -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); -/* - All memory allocated by inflateBackInit() is freed. - - inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream - state was inconsistent. -*/ - -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); -/* Return flags indicating compile-time options. - - Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: - 1.0: size of uInt - 3.2: size of uLong - 5.4: size of voidpf (pointer) - 7.6: size of z_off_t - - Compiler, assembler, and debug options: - 8: ZLIB_DEBUG - 9: ASMV or ASMINF -- use ASM code - 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention - 11: 0 (reserved) - - One-time table building (smaller code, but not thread-safe if true): - 12: BUILDFIXED -- build static block decoding tables when needed - 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed - 14,15: 0 (reserved) - - Library content (indicates missing functionality): - 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking - deflate code when not needed) - 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect - and decode gzip streams (to avoid linking crc code) - 18-19: 0 (reserved) - - Operation variations (changes in library functionality): - 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate - 21: FASTEST -- deflate algorithm with only one, lowest compression level - 22,23: 0 (reserved) - - The sprintf variant used by gzprintf (zero is best): - 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format - 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! - 26: 0 = returns value, 1 = void -- 1 means inferred string length returned - - Remainder: - 27-31: 0 (reserved) - */ - -#ifndef Z_SOLO - - /* utility functions */ - -/* - The following utility functions are implemented on top of the basic - stream-oriented functions. To simplify the interface, some default options - are assumed (compression level and memory usage, standard memory allocation - functions). The source code of these utility functions can be modified if - you need special options. -*/ - -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed data. compress() is equivalent to compress2() with a level - parameter of Z_DEFAULT_COMPRESSION. - - compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer. -*/ - -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); -/* - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed data. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ - -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); -/* - compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before a - compress() or compress2() call to allocate the destination buffer. -*/ - -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be large enough to hold the entire - uncompressed data. (The size of the uncompressed data must have been saved - previously by the compressor and transmitted to the decompressor by some - mechanism outside the scope of this compression library.) Upon exit, destLen - is the actual size of the uncompressed data. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In - the case where there is not enough room, uncompress() will fill the output - buffer with the uncompressed data up to that point. -*/ - -ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong *sourceLen)); -/* - Same as uncompress, except that sourceLen is a pointer, where the - length of the source is *sourceLen. On return, *sourceLen is the number of - source bytes consumed. -*/ - - /* gzip file access functions */ - -/* - This library supports reading and writing files in gzip (.gz) format with - an interface similar to that of stdio, using the functions that start with - "gz". The gzip format is different from the zlib format. gzip is a gzip - wrapper, documented in RFC 1952, wrapped around a deflate stream. -*/ - -typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ - -/* -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); - - Open the gzip (.gz) file at path for reading and decompressing, or - compressing and writing. The mode parameter is as in fopen ("rb" or "wb") - but can also include a compression level ("wb9") or a strategy: 'f' for - filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h", - 'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression - as in "wb9F". (See the description of deflateInit2 for more information - about the strategy parameter.) 'T' will request transparent writing or - appending with no compression and not using the gzip format. - - "a" can be used instead of "w" to request that the gzip stream that will - be written be appended to the file. "+" will result in an error, since - reading and writing to the same gzip file is not supported. The addition of - "x" when writing will create the file exclusively, which fails if the file - already exists. On systems that support it, the addition of "e" when - reading or writing will set the flag to close the file on an execve() call. - - These functions, as well as gzip, will read and decode a sequence of gzip - streams in a file. The append function of gzopen() can be used to create - such a file. (Also see gzflush() for another way to do this.) When - appending, gzopen does not test whether the file begins with a gzip stream, - nor does it look for the end of the gzip streams to begin appending. gzopen - will simply append a gzip stream to the existing file. - - gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. When - reading, this will be detected automatically by looking for the magic two- - byte gzip header. - - gzopen returns NULL if the file could not be opened, if there was - insufficient memory to allocate the gzFile state, or if an invalid mode was - specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). - errno can be checked to determine if the reason gzopen failed was that the - file could not be opened. -*/ - -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); -/* - Associate a gzFile with the file descriptor fd. File descriptors are - obtained from calls like open, dup, creat, pipe or fileno (if the file has - been previously opened with fopen). The mode parameter is as in gzopen. - - The next call of gzclose on the returned gzFile will also close the file - descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor - fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, - mode);. The duplicated descriptor should be saved to avoid a leak, since - gzdopen does not close fd if it fails. If you are using fileno() to get the - file descriptor from a FILE *, then you will have to use dup() to avoid - double-close()ing the file descriptor. Both gzclose() and fclose() will - close the associated file descriptor, so they need to have different file - descriptors. - - gzdopen returns NULL if there was insufficient memory to allocate the - gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not - provided, or '+' was provided), or if fd is -1. The file descriptor is not - used until the next gz* read, write, seek, or close operation, so gzdopen - will not detect if fd is invalid (unless fd is -1). -*/ - -ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); -/* - Set the internal buffer size used by this library's functions for file to - size. The default buffer size is 8192 bytes. This function must be called - after gzopen() or gzdopen(), and before any other calls that read or write - the file. The buffer memory allocation is always deferred to the first read - or write. Three times that size in buffer space is allocated. A larger - buffer size of, for example, 64K or 128K bytes will noticeably increase the - speed of decompression (reading). - - The new buffer size also affects the maximum length for gzprintf(). - - gzbuffer() returns 0 on success, or -1 on failure, such as being called - too late. -*/ - -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); -/* - Dynamically update the compression level and strategy for file. See the - description of deflateInit2 for the meaning of these parameters. Previously - provided data is flushed before applying the parameter changes. - - gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not - opened for writing, Z_ERRNO if there is an error writing the flushed data, - or Z_MEM_ERROR if there is a memory allocation error. -*/ - -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); -/* - Read and decompress up to len uncompressed bytes from file into buf. If - the input file is not in gzip format, gzread copies the given number of - bytes into the buffer directly from the file. - - After reaching the end of a gzip stream in the input, gzread will continue - to read, looking for another gzip stream. Any number of gzip streams may be - concatenated in the input file, and will all be decompressed by gzread(). - If something other than a gzip stream is encountered after a gzip stream, - that remaining trailing garbage is ignored (and no error is returned). - - gzread can be used to read a gzip file that is being concurrently written. - Upon reaching the end of the input, gzread will return with the available - data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then - gzclearerr can be used to clear the end of file indicator in order to permit - gzread to be tried again. Z_OK indicates that a gzip stream was completed - on the last gzread. Z_BUF_ERROR indicates that the input file ended in the - middle of a gzip stream. Note that gzread does not return -1 in the event - of an incomplete gzip stream. This error is deferred until gzclose(), which - will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip - stream. Alternatively, gzerror can be used before gzclose to detect this - case. - - gzread returns the number of uncompressed bytes actually read, less than - len for end of file, or -1 for error. If len is too large to fit in an int, - then nothing is read, -1 is returned, and the error state is set to - Z_STREAM_ERROR. -*/ - -ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, - gzFile file)); -/* - Read and decompress up to nitems items of size size from file into buf, - otherwise operating as gzread() does. This duplicates the interface of - stdio's fread(), with size_t request and return types. If the library - defines size_t, then z_size_t is identical to size_t. If not, then z_size_t - is an unsigned integer type that can contain a pointer. - - gzfread() returns the number of full items read of size size, or zero if - the end of the file was reached and a full item could not be read, or if - there was an error. gzerror() must be consulted if zero is returned in - order to determine if there was an error. If the multiplication of size and - nitems overflows, i.e. the product does not fit in a z_size_t, then nothing - is read, zero is returned, and the error state is set to Z_STREAM_ERROR. - - In the event that the end of file is reached and only a partial item is - available at the end, i.e. the remaining uncompressed data length is not a - multiple of size, then the final partial item is nevetheless read into buf - and the end-of-file flag is set. The length of the partial item read is not - provided, but could be inferred from the result of gztell(). This behavior - is the same as the behavior of fread() implementations in common libraries, - but it prevents the direct use of gzfread() to read a concurrently written - file, reseting and retrying on end-of-file, when size is not 1. -*/ - -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len)); -/* - Compress and write the len uncompressed bytes at buf to file. gzwrite - returns the number of uncompressed bytes written or 0 in case of error. -*/ - -ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, - z_size_t nitems, gzFile file)); -/* - Compress and write nitems items of size size from buf to file, duplicating - the interface of stdio's fwrite(), with size_t request and return types. If - the library defines size_t, then z_size_t is identical to size_t. If not, - then z_size_t is an unsigned integer type that can contain a pointer. - - gzfwrite() returns the number of full items written of size size, or zero - if there was an error. If the multiplication of size and nitems overflows, - i.e. the product does not fit in a z_size_t, then nothing is written, zero - is returned, and the error state is set to Z_STREAM_ERROR. -*/ - -ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); -/* - Convert, format, compress, and write the arguments (...) to file under - control of the string format, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written, or a negative zlib error code in case - of error. The number of uncompressed bytes written is limited to 8191, or - one less than the buffer size given to gzbuffer(). The caller should assure - that this limit is not exceeded. If it is exceeded, then gzprintf() will - return an error (0) with nothing written. In this case, there may also be a - buffer overflow with unpredictable consequences, which is possible only if - zlib was compiled with the insecure functions sprintf() or vsprintf(), - because the secure snprintf() or vsnprintf() functions were not available. - This can be determined using zlibCompileFlags(). -*/ - -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); -/* - Compress and write the given null-terminated string s to file, excluding - the terminating null character. - - gzputs returns the number of characters written, or -1 in case of error. -*/ - -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); -/* - Read and decompress bytes from file into buf, until len-1 characters are - read, or until a newline character is read and transferred to buf, or an - end-of-file condition is encountered. If any characters are read or if len - is one, the string is terminated with a null character. If no characters - are read due to an end-of-file or len is less than one, then the buffer is - left untouched. - - gzgets returns buf which is a null-terminated string, or it returns NULL - for end-of-file or in case of error. If there was an error, the contents at - buf are indeterminate. -*/ - -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); -/* - Compress and write c, converted to an unsigned char, into file. gzputc - returns the value that was written, or -1 in case of error. -*/ - -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); -/* - Read and decompress one byte from file. gzgetc returns this byte or -1 - in case of end of file or error. This is implemented as a macro for speed. - As such, it does not do all of the checking the other functions do. I.e. - it does not check to see if file is NULL, nor whether the structure file - points to has been clobbered or not. -*/ - -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); -/* - Push c back onto the stream for file to be read as the first character on - the next read. At least one character of push-back is always allowed. - gzungetc() returns the character pushed, or -1 on failure. gzungetc() will - fail if c is -1, and may fail if a character has been pushed but not read - yet. If gzungetc is used immediately after gzopen or gzdopen, at least the - output buffer size of pushed characters is allowed. (See gzbuffer above.) - The pushed character will be discarded if the stream is repositioned with - gzseek() or gzrewind(). -*/ - -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); -/* - Flush all pending output to file. The parameter flush is as in the - deflate() function. The return value is the zlib error number (see function - gzerror below). gzflush is only permitted when writing. - - If the flush parameter is Z_FINISH, the remaining data is written and the - gzip stream is completed in the output. If gzwrite() is called again, a new - gzip stream will be started in the output. gzread() is able to read such - concatenated gzip streams. - - gzflush should be called only when strictly necessary because it will - degrade compression if called too often. -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); - - Set the starting position to offset relative to whence for the next gzread - or gzwrite on file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. - - If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported; gzseek then compresses a sequence of zeroes up to the new - starting position. - - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -*/ - -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); -/* - Rewind file. This function is supported only for reading. - - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET). -*/ - -/* -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); - - Return the starting position for the next gzread or gzwrite on file. - This position represents a number of bytes in the uncompressed data stream, - and is zero when starting, even if appending or reading a gzip stream from - the middle of a file using gzdopen(). - - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); - - Return the current compressed (actual) read or write offset of file. This - offset includes the count of bytes that precede the gzip stream, for example - when appending or when using gzdopen() for reading. When reading, the - offset does not include as yet unused buffered input. This information can - be used for a progress indicator. On error, gzoffset() returns -1. -*/ - -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); -/* - Return true (1) if the end-of-file indicator for file has been set while - reading, false (0) otherwise. Note that the end-of-file indicator is set - only if the read tried to go past the end of the input, but came up short. - Therefore, just like feof(), gzeof() may return false even if there is no - more data to read, in the event that the last read request was for the exact - number of bytes remaining in the input file. This will happen if the input - file size is an exact multiple of the buffer size. - - If gzeof() returns true, then the read functions will return no more data, - unless the end-of-file indicator is reset by gzclearerr() and the input file - has grown since the previous end of file was detected. -*/ - -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); -/* - Return true (1) if file is being copied directly while reading, or false - (0) if file is a gzip stream being decompressed. - - If the input file is empty, gzdirect() will return true, since the input - does not contain a gzip stream. - - If gzdirect() is used immediately after gzopen() or gzdopen() it will - cause buffers to be allocated to allow reading the file to determine if it - is a gzip file. Therefore if gzbuffer() is used, it should be called before - gzdirect(). - - When writing, gzdirect() returns true (1) if transparent writing was - requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: - gzdirect() is not needed when writing. Transparent writing must be - explicitly requested, so the application already knows the answer. When - linking statically, using gzdirect() will include all of the zlib code for - gzip file reading and decompression, which may not be desired.) -*/ - -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); -/* - Flush all pending output for file, if necessary, close file and - deallocate the (de)compression state. Note that once file is closed, you - cannot call gzerror with file, since its structures have been deallocated. - gzclose must not be called more than once on the same file, just as free - must not be called more than once on the same allocation. - - gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a - file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the - last read ended in the middle of a gzip stream, or Z_OK on success. -*/ - -ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); -ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); -/* - Same as gzclose(), but gzclose_r() is only for use when reading, and - gzclose_w() is only for use when writing or appending. The advantage to - using these instead of gzclose() is that they avoid linking in zlib - compression or decompression code that is not used when only reading or only - writing respectively. If gzclose() is used, then both compression and - decompression code will be included the application when linking to a static - zlib library. -*/ - -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); -/* - Return the error message for the last error which occurred on file. - errnum is set to zlib error number. If an error occurred in the file system - and not in the compression library, errnum is set to Z_ERRNO and the - application may consult errno to get the exact error code. - - The application must not modify the returned string. Future calls to - this function may invalidate the previously returned string. If file is - closed, then the string previously returned by gzerror will no longer be - available. - - gzerror() should be used to distinguish errors from end-of-file for those - functions above that do not distinguish those cases in their return values. -*/ - -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); -/* - Clear the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip - file that is being written concurrently. -*/ - -#endif /* !Z_SOLO */ - - /* checksum functions */ - -/* - These functions are not related to compression but are exported - anyway because they might be useful in applications using the compression - library. -*/ - -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); -/* - Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. An Adler-32 value is in the range of a 32-bit - unsigned integer. If buf is Z_NULL, this function returns the required - initial value for the checksum. - - An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed - much faster. - - Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); -*/ - -ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, - z_size_t len)); -/* - Same as adler32(), but with a size_t length. -*/ - -/* -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); - - Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 - and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for - each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of - seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note - that the z_off_t type (like off_t) is a signed integer. If len2 is - negative, the result has no meaning or utility. -*/ - -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); -/* - Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer. - If buf is Z_NULL, this function returns the required initial value for the - crc. Pre- and post-conditioning (one's complement) is performed within this - function so it shouldn't be done by the application. - - Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); -*/ - -ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf, - z_size_t len)); -/* - Same as crc32(), but with a size_t length. -*/ - -/* -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); - - Combine two CRC-32 check values into one. For two sequences of bytes, - seq1 and seq2 with lengths len1 and len2, CRC-32 check values were - calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 - check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and - len2. -*/ - -/* -ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2)); - - Return the operator corresponding to length len2, to be used with - crc32_combine_op(). -*/ - -ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op)); -/* - Give the same result as crc32_combine(), using op in place of len2. op is - is generated from len2 by crc32_combine_gen(). This will be faster than - crc32_combine() if the generated op is used more than once. -*/ - - - /* various hacks, don't look :) */ - -/* deflateInit and inflateInit are macros to allow checking the zlib version - * and the compiler's view of z_stream: - */ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); -#ifdef Z_PREFIX_SET -# define z_deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -# define z_inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) -#else -# define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -# define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -# define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -# define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) -#endif - -#ifndef Z_SOLO - -/* gzgetc() macro and its supporting function and exposed data structure. Note - * that the real internal state is much larger than the exposed structure. - * This abbreviated structure exposes just enough for the gzgetc() macro. The - * user should not mess with these exposed elements, since their names or - * behavior could change in the future, perhaps even capriciously. They can - * only be used by the gzgetc() macro. You have been warned. - */ -struct gzFile_s { - unsigned have; - unsigned char *next; - z_off64_t pos; -}; -ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -# define z_gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) -#else -# define gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) -#endif - -/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or - * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if - * both are true, the application gets the *64 functions, and the regular - * functions are changed to 64 bits) -- in case these are set on systems - * without large file support, _LFS64_LARGEFILE must also be true - */ -#ifdef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t)); -#endif - -#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) -# ifdef Z_PREFIX_SET -# define z_gzopen z_gzopen64 -# define z_gzseek z_gzseek64 -# define z_gztell z_gztell64 -# define z_gzoffset z_gzoffset64 -# define z_adler32_combine z_adler32_combine64 -# define z_crc32_combine z_crc32_combine64 -# define z_crc32_combine_gen z_crc32_combine_gen64 -# else -# define gzopen gzopen64 -# define gzseek gzseek64 -# define gztell gztell64 -# define gzoffset gzoffset64 -# define adler32_combine adler32_combine64 -# define crc32_combine crc32_combine64 -# define crc32_combine_gen crc32_combine_gen64 -# endif -# ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t)); -# endif -#else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); -#endif - -#else /* Z_SOLO */ - - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); - -#endif /* !Z_SOLO */ - -/* undocumented functions */ -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); -ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); -ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp)); -ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); -#if defined(_WIN32) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - const char *format, - va_list va)); -# endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ZLIB_H */ diff --git a/thirdparty/zlib-1.2.12/zlib.map b/thirdparty/zlib-1.2.12/zlib.map deleted file mode 100644 index b330b60..0000000 --- a/thirdparty/zlib-1.2.12/zlib.map +++ /dev/null @@ -1,100 +0,0 @@ -ZLIB_1.2.0 { - global: - compressBound; - deflateBound; - inflateBack; - inflateBackEnd; - inflateBackInit_; - inflateCopy; - local: - deflate_copyright; - inflate_copyright; - inflate_fast; - inflate_table; - zcalloc; - zcfree; - z_errmsg; - gz_error; - gz_intmax; - _*; -}; - -ZLIB_1.2.0.2 { - gzclearerr; - gzungetc; - zlibCompileFlags; -} ZLIB_1.2.0; - -ZLIB_1.2.0.8 { - deflatePrime; -} ZLIB_1.2.0.2; - -ZLIB_1.2.2 { - adler32_combine; - crc32_combine; - deflateSetHeader; - inflateGetHeader; -} ZLIB_1.2.0.8; - -ZLIB_1.2.2.3 { - deflateTune; - gzdirect; -} ZLIB_1.2.2; - -ZLIB_1.2.2.4 { - inflatePrime; -} ZLIB_1.2.2.3; - -ZLIB_1.2.3.3 { - adler32_combine64; - crc32_combine64; - gzopen64; - gzseek64; - gztell64; - inflateUndermine; -} ZLIB_1.2.2.4; - -ZLIB_1.2.3.4 { - inflateReset2; - inflateMark; -} ZLIB_1.2.3.3; - -ZLIB_1.2.3.5 { - gzbuffer; - gzoffset; - gzoffset64; - gzclose_r; - gzclose_w; -} ZLIB_1.2.3.4; - -ZLIB_1.2.5.1 { - deflatePending; -} ZLIB_1.2.3.5; - -ZLIB_1.2.5.2 { - deflateResetKeep; - gzgetc_; - inflateResetKeep; -} ZLIB_1.2.5.1; - -ZLIB_1.2.7.1 { - inflateGetDictionary; - gzvprintf; -} ZLIB_1.2.5.2; - -ZLIB_1.2.9 { - inflateCodesUsed; - inflateValidate; - uncompress2; - gzfread; - gzfwrite; - deflateGetDictionary; - adler32_z; - crc32_z; -} ZLIB_1.2.7.1; - -ZLIB_1.2.12 { - crc32_combine_gen; - crc32_combine_gen64; - crc32_combine_op; -} ZLIB_1.2.9; diff --git a/thirdparty/zlib-1.2.12/zlib.pc b/thirdparty/zlib-1.2.12/zlib.pc deleted file mode 100644 index 7a5f15d..0000000 --- a/thirdparty/zlib-1.2.12/zlib.pc +++ /dev/null @@ -1,13 +0,0 @@ -prefix=/home/scott/code/gui/installed/linux -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -sharedlibdir=${libdir} -includedir=${prefix}/include - -Name: zlib -Description: zlib compression library -Version: 1.2.12 - -Requires: -Libs: -L${libdir} -L${sharedlibdir} -lz -Cflags: -I${includedir} diff --git a/thirdparty/zlib-1.2.12/zlib.pc.cmakein b/thirdparty/zlib-1.2.12/zlib.pc.cmakein deleted file mode 100644 index a5e6429..0000000 --- a/thirdparty/zlib-1.2.12/zlib.pc.cmakein +++ /dev/null @@ -1,13 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -exec_prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@INSTALL_LIB_DIR@ -sharedlibdir=@INSTALL_LIB_DIR@ -includedir=@INSTALL_INC_DIR@ - -Name: zlib -Description: zlib compression library -Version: @VERSION@ - -Requires: -Libs: -L${libdir} -L${sharedlibdir} -lz -Cflags: -I${includedir} diff --git a/thirdparty/zlib-1.2.12/zlib.pc.in b/thirdparty/zlib-1.2.12/zlib.pc.in deleted file mode 100644 index 7e5acf9..0000000 --- a/thirdparty/zlib-1.2.12/zlib.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -sharedlibdir=@sharedlibdir@ -includedir=@includedir@ - -Name: zlib -Description: zlib compression library -Version: @VERSION@ - -Requires: -Libs: -L${libdir} -L${sharedlibdir} -lz -Cflags: -I${includedir} diff --git a/thirdparty/zlib-1.2.12/zlib2ansi b/thirdparty/zlib-1.2.12/zlib2ansi deleted file mode 100755 index 15e3e16..0000000 --- a/thirdparty/zlib-1.2.12/zlib2ansi +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/perl - -# Transform K&R C function definitions into ANSI equivalent. -# -# Author: Paul Marquess -# Version: 1.0 -# Date: 3 October 2006 - -# TODO -# -# Asumes no function pointer parameters. unless they are typedefed. -# Assumes no literal strings that look like function definitions -# Assumes functions start at the beginning of a line - -use strict; -use warnings; - -local $/; -$_ = <>; - -my $sp = qr{ \s* (?: /\* .*? \*/ )? \s* }x; # assume no nested comments - -my $d1 = qr{ $sp (?: [\w\*\s]+ $sp)* $sp \w+ $sp [\[\]\s]* $sp }x ; -my $decl = qr{ $sp (?: \w+ $sp )+ $d1 }xo ; -my $dList = qr{ $sp $decl (?: $sp , $d1 )* $sp ; $sp }xo ; - - -while (s/^ - ( # Start $1 - ( # Start $2 - .*? # Minimal eat content - ( ^ \w [\w\s\*]+ ) # $3 -- function name - \s* # optional whitespace - ) # $2 - Matched up to before parameter list - - \( \s* # Literal "(" + optional whitespace - ( [^\)]+ ) # $4 - one or more anythings except ")" - \s* \) # optional whitespace surrounding a Literal ")" - - ( (?: $dList )+ ) # $5 - - $sp ^ { # literal "{" at start of line - ) # Remember to $1 - //xsom - ) -{ - my $all = $1 ; - my $prefix = $2; - my $param_list = $4 ; - my $params = $5; - - StripComments($params); - StripComments($param_list); - $param_list =~ s/^\s+//; - $param_list =~ s/\s+$//; - - my $i = 0 ; - my %pList = map { $_ => $i++ } - split /\s*,\s*/, $param_list; - my $pMatch = '(\b' . join('|', keys %pList) . '\b)\W*$' ; - - my @params = split /\s*;\s*/, $params; - my @outParams = (); - foreach my $p (@params) - { - if ($p =~ /,/) - { - my @bits = split /\s*,\s*/, $p; - my $first = shift @bits; - $first =~ s/^\s*//; - push @outParams, $first; - $first =~ /^(\w+\s*)/; - my $type = $1 ; - push @outParams, map { $type . $_ } @bits; - } - else - { - $p =~ s/^\s+//; - push @outParams, $p; - } - } - - - my %tmp = map { /$pMatch/; $_ => $pList{$1} } - @outParams ; - - @outParams = map { " $_" } - sort { $tmp{$a} <=> $tmp{$b} } - @outParams ; - - print $prefix ; - print "(\n" . join(",\n", @outParams) . ")\n"; - print "{" ; - -} - -# Output any trailing code. -print ; -exit 0; - - -sub StripComments -{ - - no warnings; - - # Strip C & C++ coments - # From the perlfaq - $_[0] =~ - - s{ - /\* ## Start of /* ... */ comment - [^*]*\*+ ## Non-* followed by 1-or-more *'s - ( - [^/*][^*]*\*+ - )* ## 0-or-more things which don't start with / - ## but do end with '*' - / ## End of /* ... */ comment - - | ## OR C++ Comment - // ## Start of C++ comment // - [^\n]* ## followed by 0-or-more non end of line characters - - | ## OR various things which aren't comments: - - ( - " ## Start of " ... " string - ( - \\. ## Escaped char - | ## OR - [^"\\] ## Non "\ - )* - " ## End of " ... " string - - | ## OR - - ' ## Start of ' ... ' string - ( - \\. ## Escaped char - | ## OR - [^'\\] ## Non '\ - )* - ' ## End of ' ... ' string - - | ## OR - - . ## Anything other char - [^/"'\\]* ## Chars which doesn't start a comment, string or escape - ) - }{$2}gxs; - -} diff --git a/thirdparty/zlib-1.2.12/zutil.c b/thirdparty/zlib-1.2.12/zutil.c deleted file mode 100644 index dcab28a..0000000 --- a/thirdparty/zlib-1.2.12/zutil.c +++ /dev/null @@ -1,325 +0,0 @@ -/* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-2017 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "zutil.h" -#ifndef Z_SOLO -# include "gzguts.h" -#endif - -z_const char * const z_errmsg[10] = { - (z_const char *)"need dictionary", /* Z_NEED_DICT 2 */ - (z_const char *)"stream end", /* Z_STREAM_END 1 */ - (z_const char *)"", /* Z_OK 0 */ - (z_const char *)"file error", /* Z_ERRNO (-1) */ - (z_const char *)"stream error", /* Z_STREAM_ERROR (-2) */ - (z_const char *)"data error", /* Z_DATA_ERROR (-3) */ - (z_const char *)"insufficient memory", /* Z_MEM_ERROR (-4) */ - (z_const char *)"buffer error", /* Z_BUF_ERROR (-5) */ - (z_const char *)"incompatible version",/* Z_VERSION_ERROR (-6) */ - (z_const char *)"" -}; - - -const char * ZEXPORT zlibVersion() -{ - return ZLIB_VERSION; -} - -uLong ZEXPORT zlibCompileFlags() -{ - uLong flags; - - flags = 0; - switch ((int)(sizeof(uInt))) { - case 2: break; - case 4: flags += 1; break; - case 8: flags += 2; break; - default: flags += 3; - } - switch ((int)(sizeof(uLong))) { - case 2: break; - case 4: flags += 1 << 2; break; - case 8: flags += 2 << 2; break; - default: flags += 3 << 2; - } - switch ((int)(sizeof(voidpf))) { - case 2: break; - case 4: flags += 1 << 4; break; - case 8: flags += 2 << 4; break; - default: flags += 3 << 4; - } - switch ((int)(sizeof(z_off_t))) { - case 2: break; - case 4: flags += 1 << 6; break; - case 8: flags += 2 << 6; break; - default: flags += 3 << 6; - } -#ifdef ZLIB_DEBUG - flags += 1 << 8; -#endif -#if defined(ASMV) || defined(ASMINF) - flags += 1 << 9; -#endif -#ifdef ZLIB_WINAPI - flags += 1 << 10; -#endif -#ifdef BUILDFIXED - flags += 1 << 12; -#endif -#ifdef DYNAMIC_CRC_TABLE - flags += 1 << 13; -#endif -#ifdef NO_GZCOMPRESS - flags += 1L << 16; -#endif -#ifdef NO_GZIP - flags += 1L << 17; -#endif -#ifdef PKZIP_BUG_WORKAROUND - flags += 1L << 20; -#endif -#ifdef FASTEST - flags += 1L << 21; -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifdef NO_vsnprintf - flags += 1L << 25; -# ifdef HAS_vsprintf_void - flags += 1L << 26; -# endif -# else -# ifdef HAS_vsnprintf_void - flags += 1L << 26; -# endif -# endif -#else - flags += 1L << 24; -# ifdef NO_snprintf - flags += 1L << 25; -# ifdef HAS_sprintf_void - flags += 1L << 26; -# endif -# else -# ifdef HAS_snprintf_void - flags += 1L << 26; -# endif -# endif -#endif - return flags; -} - -#ifdef ZLIB_DEBUG -#include -# ifndef verbose -# define verbose 0 -# endif -int ZLIB_INTERNAL z_verbose = verbose; - -void ZLIB_INTERNAL z_error (m) - char *m; -{ - fprintf(stderr, "%s\n", m); - exit(1); -} -#endif - -/* exported to allow conversion of error code to string for compress() and - * uncompress() - */ -const char * ZEXPORT zError(err) - int err; -{ - return ERR_MSG(err); -} - -#if defined(_WIN32_WCE) && _WIN32_WCE < 0x800 - /* The older Microsoft C Run-Time Library for Windows CE doesn't have - * errno. We define it as a global variable to simplify porting. - * Its value is always 0 and should not be used. - */ - int errno = 0; -#endif - -#ifndef HAVE_MEMCPY - -void ZLIB_INTERNAL zmemcpy(dest, source, len) - Bytef* dest; - const Bytef* source; - uInt len; -{ - if (len == 0) return; - do { - *dest++ = *source++; /* ??? to be unrolled */ - } while (--len != 0); -} - -int ZLIB_INTERNAL zmemcmp(s1, s2, len) - const Bytef* s1; - const Bytef* s2; - uInt len; -{ - uInt j; - - for (j = 0; j < len; j++) { - if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; - } - return 0; -} - -void ZLIB_INTERNAL zmemzero(dest, len) - Bytef* dest; - uInt len; -{ - if (len == 0) return; - do { - *dest++ = 0; /* ??? to be unrolled */ - } while (--len != 0); -} -#endif - -#ifndef Z_SOLO - -#ifdef SYS16BIT - -#ifdef __TURBOC__ -/* Turbo C in 16-bit mode */ - -# define MY_ZCALLOC - -/* Turbo C malloc() does not allow dynamic allocation of 64K bytes - * and farmalloc(64K) returns a pointer with an offset of 8, so we - * must fix the pointer. Warning: the pointer must be put back to its - * original form in order to free it, use zcfree(). - */ - -#define MAX_PTR 10 -/* 10*64K = 640K */ - -local int next_ptr = 0; - -typedef struct ptr_table_s { - voidpf org_ptr; - voidpf new_ptr; -} ptr_table; - -local ptr_table table[MAX_PTR]; -/* This table is used to remember the original form of pointers - * to large buffers (64K). Such pointers are normalized with a zero offset. - * Since MSDOS is not a preemptive multitasking OS, this table is not - * protected from concurrent access. This hack doesn't work anyway on - * a protected system like OS/2. Use Microsoft C instead. - */ - -voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size) -{ - voidpf buf; - ulg bsize = (ulg)items*size; - - (void)opaque; - - /* If we allocate less than 65520 bytes, we assume that farmalloc - * will return a usable pointer which doesn't have to be normalized. - */ - if (bsize < 65520L) { - buf = farmalloc(bsize); - if (*(ush*)&buf != 0) return buf; - } else { - buf = farmalloc(bsize + 16L); - } - if (buf == NULL || next_ptr >= MAX_PTR) return NULL; - table[next_ptr].org_ptr = buf; - - /* Normalize the pointer to seg:0 */ - *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; - *(ush*)&buf = 0; - table[next_ptr++].new_ptr = buf; - return buf; -} - -void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) -{ - int n; - - (void)opaque; - - if (*(ush*)&ptr != 0) { /* object < 64K */ - farfree(ptr); - return; - } - /* Find the original pointer */ - for (n = 0; n < next_ptr; n++) { - if (ptr != table[n].new_ptr) continue; - - farfree(table[n].org_ptr); - while (++n < next_ptr) { - table[n-1] = table[n]; - } - next_ptr--; - return; - } - Assert(0, "zcfree: ptr not found"); -} - -#endif /* __TURBOC__ */ - - -#ifdef M_I86 -/* Microsoft C in 16-bit mode */ - -# define MY_ZCALLOC - -#if (!defined(_MSC_VER) || (_MSC_VER <= 600)) -# define _halloc halloc -# define _hfree hfree -#endif - -voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size) -{ - (void)opaque; - return _halloc((long)items, size); -} - -void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) -{ - (void)opaque; - _hfree(ptr); -} - -#endif /* M_I86 */ - -#endif /* SYS16BIT */ - - -#ifndef MY_ZCALLOC /* Any system without a special alloc function */ - -#ifndef STDC -extern voidp malloc OF((uInt size)); -extern voidp calloc OF((uInt items, uInt size)); -extern void free OF((voidpf ptr)); -#endif - -voidpf ZLIB_INTERNAL zcalloc (opaque, items, size) - voidpf opaque; - unsigned items; - unsigned size; -{ - (void)opaque; - return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : - (voidpf)calloc(items, size); -} - -void ZLIB_INTERNAL zcfree (opaque, ptr) - voidpf opaque; - voidpf ptr; -{ - (void)opaque; - free(ptr); -} - -#endif /* MY_ZCALLOC */ - -#endif /* !Z_SOLO */ diff --git a/thirdparty/zlib-1.2.12/zutil.h b/thirdparty/zlib-1.2.12/zutil.h deleted file mode 100644 index d9a20ae..0000000 --- a/thirdparty/zlib-1.2.12/zutil.h +++ /dev/null @@ -1,274 +0,0 @@ -/* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2022 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id$ */ - -#ifndef ZUTIL_H -#define ZUTIL_H - -#ifdef HAVE_HIDDEN -# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) -#else -# define ZLIB_INTERNAL -#endif - -#include "zlib.h" - -#if defined(STDC) && !defined(Z_SOLO) -# if !(defined(_WIN32_WCE) && defined(_MSC_VER)) -# include -# endif -# include -# include -#endif - -#ifndef local -# define local static -#endif -/* since "static" is used to mean two completely different things in C, we - define "local" for the non-static meaning of "static", for readability - (compile with -Dlocal if your debugger can't find static symbols) */ - -typedef unsigned char uch; -typedef uch FAR uchf; -typedef unsigned short ush; -typedef ush FAR ushf; -typedef unsigned long ulg; - -#if !defined(Z_U8) && !defined(Z_SOLO) && defined(STDC) -# include -# if (ULONG_MAX == 0xffffffffffffffff) -# define Z_U8 unsigned long -# elif (ULLONG_MAX == 0xffffffffffffffff) -# define Z_U8 unsigned long long -# elif (UINT_MAX == 0xffffffffffffffff) -# define Z_U8 unsigned -# endif -#endif - -extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ -/* (size given to avoid silly warnings with Visual C++) */ - -#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] - -#define ERR_RETURN(strm,err) \ - return (strm->msg = ERR_MSG(err), (err)) -/* To be used only when the state is known to be valid */ - - /* common constants */ - -#ifndef DEF_WBITS -# define DEF_WBITS MAX_WBITS -#endif -/* default windowBits for decompression. MAX_WBITS is for compression only */ - -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif -/* default memLevel */ - -#define STORED_BLOCK 0 -#define STATIC_TREES 1 -#define DYN_TREES 2 -/* The three kinds of block type */ - -#define MIN_MATCH 3 -#define MAX_MATCH 258 -/* The minimum and maximum match lengths */ - -#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ - - /* target dependencies */ - -#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) -# define OS_CODE 0x00 -# ifndef Z_SOLO -# if defined(__TURBOC__) || defined(__BORLANDC__) -# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) - /* Allow compilation with ANSI keywords only enabled */ - void _Cdecl farfree( void *block ); - void *_Cdecl farmalloc( unsigned long nbytes ); -# else -# include -# endif -# else /* MSC or DJGPP */ -# include -# endif -# endif -#endif - -#ifdef AMIGA -# define OS_CODE 1 -#endif - -#if defined(VAXC) || defined(VMS) -# define OS_CODE 2 -# define F_OPEN(name, mode) \ - fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") -#endif - -#ifdef __370__ -# if __TARGET_LIB__ < 0x20000000 -# define OS_CODE 4 -# elif __TARGET_LIB__ < 0x40000000 -# define OS_CODE 11 -# else -# define OS_CODE 8 -# endif -#endif - -#if defined(ATARI) || defined(atarist) -# define OS_CODE 5 -#endif - -#ifdef OS2 -# define OS_CODE 6 -# if defined(M_I86) && !defined(Z_SOLO) -# include -# endif -#endif - -#if defined(MACOS) || defined(TARGET_OS_MAC) -# define OS_CODE 7 -# ifndef Z_SOLO -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -# endif -# endif -#endif - -#ifdef __acorn -# define OS_CODE 13 -#endif - -#if defined(WIN32) && !defined(__CYGWIN__) -# define OS_CODE 10 -#endif - -#ifdef _BEOS_ -# define OS_CODE 16 -#endif - -#ifdef __TOS_OS400__ -# define OS_CODE 18 -#endif - -#ifdef __APPLE__ -# define OS_CODE 19 -#endif - -#if defined(_BEOS_) || defined(RISCOS) -# define fdopen(fd,mode) NULL /* No fdopen() */ -#endif - -#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX -# if defined(_WIN32_WCE) -# define fdopen(fd,mode) NULL /* No fdopen() */ -# else -# define fdopen(fd,type) _fdopen(fd,type) -# endif -#endif - -#if defined(__BORLANDC__) && !defined(MSDOS) - #pragma warn -8004 - #pragma warn -8008 - #pragma warn -8066 -#endif - -/* provide prototypes for these when building zlib without LFS */ -#if !defined(_WIN32) && \ - (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); -#endif - - /* common defaults */ - -#ifndef OS_CODE -# define OS_CODE 3 /* assume Unix */ -#endif - -#ifndef F_OPEN -# define F_OPEN(name, mode) fopen((name), (mode)) -#endif - - /* functions */ - -#if defined(pyr) || defined(Z_SOLO) -# define NO_MEMCPY -#endif -#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) - /* Use our own functions for small and medium model with MSC <= 5.0. - * You may have to use the same strategy for Borland C (untested). - * The __SC__ check is for Symantec. - */ -# define NO_MEMCPY -#endif -#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) -# define HAVE_MEMCPY -#endif -#ifdef HAVE_MEMCPY -# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ -# define zmemcpy _fmemcpy -# define zmemcmp _fmemcmp -# define zmemzero(dest, len) _fmemset(dest, 0, len) -# else -# define zmemcpy memcpy -# define zmemcmp memcmp -# define zmemzero(dest, len) memset(dest, 0, len) -# endif -#else - void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); -#endif - -/* Diagnostic functions */ -#ifdef ZLIB_DEBUG -# include - extern int ZLIB_INTERNAL z_verbose; - extern void ZLIB_INTERNAL z_error OF((char *m)); -# define Assert(cond,msg) {if(!(cond)) z_error(msg);} -# define Trace(x) {if (z_verbose>=0) fprintf x ;} -# define Tracev(x) {if (z_verbose>0) fprintf x ;} -# define Tracevv(x) {if (z_verbose>1) fprintf x ;} -# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} -# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} -#else -# define Assert(cond,msg) -# define Trace(x) -# define Tracev(x) -# define Tracevv(x) -# define Tracec(c,x) -# define Tracecv(c,x) -#endif - -#ifndef Z_SOLO - voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, - unsigned size)); - void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); -#endif - -#define ZALLOC(strm, items, size) \ - (*((strm)->zalloc))((strm)->opaque, (items), (size)) -#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) -#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} - -/* Reverse the bytes in a 32-bit value */ -#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \ - (((q) & 0xff00) << 8) + (((q) & 0xff) << 24)) - -#endif /* ZUTIL_H */

      %JsNkXdx;FXJuvRP^{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